UNPKG

1.49 kBTypeScriptView Raw
1import { Icon } from './icon';
2export declare const getIconMap: () => Map<string, string>;
3export declare const addIcons: (icons: {
4 [name: string]: string;
5}) => void;
6export declare const getUrl: (i: Icon) => string | null | undefined;
7export declare const getName: (iconName: string | undefined, icon: string | undefined, mode: string | undefined, ios: string | undefined, md: string | undefined) => string | null;
8export declare const getSrc: (src: string | undefined) => string | null;
9export declare const isSrc: (str: string) => boolean;
10export declare const isStr: (val: any) => val is string;
11export declare const toLower: (val: string) => string;
12/**
13 * Elements inside of web components sometimes need to inherit global attributes
14 * set on the host. For example, the inner input in `ion-input` should inherit
15 * the `title` attribute that developers set directly on `ion-input`. This
16 * helper function should be called in componentWillLoad and assigned to a variable
17 * that is later used in the render function.
18 *
19 * This does not need to be reactive as changing attributes on the host element
20 * does not trigger a re-render.
21 */
22export declare const inheritAttributes: (el: HTMLElement, attributes?: string[]) => {
23 [k: string]: any;
24};
25/**
26 * Returns `true` if the document or host element
27 * has a `dir` set to `rtl`. The host value will always
28 * take priority over the root document value.
29 */
30export declare const isRTL: (hostEl?: Pick<HTMLElement, 'dir'>) => boolean;