@iress-oss/ids-components 6.0.0-alpha.20 → 6.0.0-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/{Button-BTkololu.js → Button-BwZzMODc.js} +8 -9
  2. package/dist/{Provider-B87u_maF.js → Provider-Dw49edAo.js} +21 -31
  3. package/dist/components/Alert/Alert.js +34 -34
  4. package/dist/components/Button/Button.js +1 -1
  5. package/dist/components/Button/CloseButton/CloseButton.js +12 -11
  6. package/dist/components/Button/index.js +1 -1
  7. package/dist/components/Field/components/FieldFooter.js +10 -9
  8. package/dist/components/Field/components/FieldHint.js +3 -2
  9. package/dist/components/Filter/Filter.js +2 -1
  10. package/dist/components/Filter/components/FilterResetButton.js +1 -1
  11. package/dist/components/Filter/components/FilterSearch.d.ts +1 -1
  12. package/dist/components/Icon/Icon.constants.d.ts +7 -0
  13. package/dist/components/Icon/Icon.constants.js +10 -0
  14. package/dist/components/Icon/Icon.d.ts +34 -16
  15. package/dist/components/Icon/Icon.js +68 -30
  16. package/dist/components/Icon/Icon.styles.d.ts +23 -0
  17. package/dist/components/Icon/Icon.styles.js +38 -4
  18. package/dist/components/Icon/IconProvider.d.ts +100 -0
  19. package/dist/components/Icon/IconProvider.js +66 -0
  20. package/dist/components/Icon/components/FontLoader.d.ts +31 -0
  21. package/dist/components/Icon/components/FontLoader.js +29 -0
  22. package/dist/components/Icon/helpers/getMaterialSymbolsList.d.ts +12 -0
  23. package/dist/components/Icon/helpers/getMaterialSymbolsList.js +12 -0
  24. package/dist/components/Icon/helpers/iconMapping.d.ts +78 -0
  25. package/dist/components/Icon/helpers/iconMapping.js +75 -0
  26. package/dist/components/Icon/hooks/useDynamicFontSubsetting.d.ts +45 -0
  27. package/dist/components/Icon/hooks/useDynamicFontSubsetting.js +78 -0
  28. package/dist/components/Icon/index.d.ts +2 -0
  29. package/dist/components/Icon/index.js +6 -2
  30. package/dist/components/Input/Input.js +1 -1
  31. package/dist/components/Input/Input.styles.js +12 -1
  32. package/dist/components/Link/Link.js +39 -40
  33. package/dist/components/Modal/Modal.js +1 -1
  34. package/dist/components/Panel/Panel.styles.js +1 -1
  35. package/dist/components/Placeholder/Placeholder.d.ts +5 -1
  36. package/dist/components/Placeholder/Placeholder.js +48 -28
  37. package/dist/components/Placeholder/Placeholder.styles.js +10 -9
  38. package/dist/components/Progress/Progress.js +1 -1
  39. package/dist/components/Provider/Provider.d.ts +9 -5
  40. package/dist/components/Provider/Provider.js +5 -2
  41. package/dist/components/Provider/index.js +1 -1
  42. package/dist/components/RichSelect/RichSelect.styles.js +1 -1
  43. package/dist/components/RichSelect/SelectCreate/SelectCreate.js +1 -0
  44. package/dist/components/RichSelect/SelectHeading/SelectHeading.js +1 -1
  45. package/dist/components/RichSelect/SelectLabel/SelectLabel.styles.d.ts +1 -1
  46. package/dist/components/RichSelect/SelectSearchInput/SelectSearchInput.js +11 -10
  47. package/dist/components/RichSelect/SelectTags/SelectTags.js +3 -2
  48. package/dist/components/RichSelect/SelectTags/SelectTags.styles.d.ts +1 -1
  49. package/dist/components/SkipLink/SkipLink.js +1 -1
  50. package/dist/components/Slideout/components/SlideoutInner.js +1 -1
  51. package/dist/components/Slideout/hooks/usePushElement.js +1 -1
  52. package/dist/components/Spinner/Spinner.js +5 -4
  53. package/dist/components/TabSet/TabSet.styles.js +3 -1
  54. package/dist/components/Table/Table.styles.js +7 -3
  55. package/dist/components/Table/components/TableSortButton.js +24 -15
  56. package/dist/components/Tag/Tag.js +1 -1
  57. package/dist/components/Toaster/components/Toast/Toast.js +30 -30
  58. package/dist/components/Toaster/components/Toast/Toast.styles.d.ts +1 -1
  59. package/dist/components/Toaster/components/Toast/Toast.styles.js +0 -4
  60. package/dist/{index-0AvnPY9d.js → index-Bir9MtY7.js} +0 -4
  61. package/dist/index.d-CZvOUeIl.js +3808 -0
  62. package/dist/main.js +257 -253
  63. package/dist/patterns/Loading/components/ValidateLoading.js +1 -1
  64. package/dist/patterns/Shadow/Shadow.d.ts +0 -4
  65. package/dist/patterns/Shadow/Shadow.js +407 -459
  66. package/dist/style.css +1 -1
  67. package/dist/styled-system/recipes/table.d.ts +1 -1
  68. package/dist/styled-system/tokens/tokens.d.ts +1 -1
  69. package/dist/types.d.ts +4 -0
  70. package/package.json +5 -4
@@ -1,43 +1,81 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { s as e } from "../../factory-CsinCTPr.js";
3
- import { c as n } from "../../cx-DN21T1EH.js";
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { s as d } from "../../factory-CsinCTPr.js";
3
+ import { s as v } from "../../is-valid-prop-DweT-eOL.js";
4
+ import { c as L } from "../../css-DNdLYQld.js";
5
+ import { c as p } from "../../cx-DN21T1EH.js";
4
6
  import { icon as I } from "./Icon.styles.js";
5
- import { GlobalCSSClass as x } from "../../enums.js";
6
- const d = ({
7
- className: s,
8
- fixedWidth: r,
9
- flip: a,
10
- name: i,
11
- rotate: m,
12
- screenreaderText: o,
13
- set: f = "fal",
14
- spin: l,
7
+ import { GlobalCSSClass as u } from "../../enums.js";
8
+ import { useContext as M, useEffect as N } from "react";
9
+ import { IconContext as S } from "./IconProvider.js";
10
+ import { idsLogger as _ } from "../../helpers/utility/idsLogger.js";
11
+ import { FA_TO_MATERIAL_MAP as $ } from "./helpers/iconMapping.js";
12
+ const E = ({
13
+ className: r,
14
+ flip: m,
15
+ name: s,
16
+ rotate: l,
17
+ screenreaderText: a,
18
+ spin: n,
19
+ type: f,
15
20
  ...t
16
21
  }) => {
17
- const c = I({
18
- flip: a,
19
- rotate: m,
20
- spin: l
22
+ const i = M(S), e = f ?? i?.type ?? "material";
23
+ f == "fontawesome" && _(
24
+ `[IressIcon] Font Awesome is deprecated and will be removed in a future version. Please migrate to Material Symbols. Icon name: "${s}"`
25
+ );
26
+ let o;
27
+ if (e === "material" && (o = $[s] ?? s), N(() => {
28
+ e === "material" && i && o && i.registerIcon(o);
29
+ }, [e, i, o]), e === "material" && o) {
30
+ const x = i ? i.isIconLoaded(o) : !0, C = I.raw({
31
+ flip: m,
32
+ rotate: l,
33
+ spin: n,
34
+ filled: t.filled,
35
+ type: e,
36
+ loading: !x
37
+ }), [w, A] = v(t);
38
+ return /* @__PURE__ */ c(
39
+ d.span,
40
+ {
41
+ role: "img",
42
+ className: p(
43
+ L(C, w),
44
+ u.Icon,
45
+ "material-symbols-rounded",
46
+ r
47
+ ),
48
+ "aria-hidden": !a && "true",
49
+ "aria-label": a,
50
+ ...A,
51
+ children: o
52
+ }
53
+ );
54
+ }
55
+ const g = "fa-", y = t.set ?? "fal", b = t.fixedWidth ?? !1, h = I({
56
+ flip: m,
57
+ rotate: l,
58
+ spin: n
21
59
  });
22
- return /* @__PURE__ */ p(
23
- e.span,
60
+ return /* @__PURE__ */ c(
61
+ d.span,
24
62
  {
25
63
  role: "img",
26
- className: n(
27
- c,
28
- x.Icon,
29
- f,
30
- `fa-${i}`,
31
- r && "fa-fw",
32
- s
64
+ className: p(
65
+ h,
66
+ u.Icon,
67
+ y,
68
+ `${g}${s}`,
69
+ b && "fa-fw",
70
+ r
33
71
  ),
34
- "aria-hidden": !o && "true",
35
- "aria-label": o,
72
+ "aria-hidden": !a && "true",
73
+ "aria-label": a,
36
74
  ...t
37
75
  }
38
76
  );
39
77
  };
40
- d.displayName = "IressIcon";
78
+ E.displayName = "IressIcon";
41
79
  export {
42
- d as IressIcon
80
+ E as IressIcon
43
81
  };
@@ -1,4 +1,20 @@
1
1
  export declare const icon: import('../../styled-system/types').RecipeRuntimeFn<{
2
+ type: {
3
+ fontawesome: {};
4
+ material: {
5
+ fontFamily: "Material Symbols Rounded";
6
+ textStyle: "inherit";
7
+ verticalAlign: "middle";
8
+ fontVariationSettings: "'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 36";
9
+ scale: "[1.5]";
10
+ fontFeatureSettings: "liga";
11
+ };
12
+ };
13
+ filled: {
14
+ true: {
15
+ fontVariationSettings: "'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 36";
16
+ };
17
+ };
2
18
  flip: {
3
19
  horizontal: {
4
20
  transform: "scaleX(-1)";
@@ -10,6 +26,13 @@ export declare const icon: import('../../styled-system/types').RecipeRuntimeFn<{
10
26
  transform: "scale(-1)";
11
27
  };
12
28
  };
29
+ loading: {
30
+ true: {
31
+ visibility: "hidden";
32
+ width: "[1em]";
33
+ height: "[1em]";
34
+ };
35
+ };
13
36
  rotate: {
14
37
  90: {
15
38
  transform: "rotate(90deg)";
@@ -1,6 +1,24 @@
1
- import { c as a } from "../../cva-DtPMccE9.js";
2
- const n = a({
1
+ import { c as i } from "../../cva-DtPMccE9.js";
2
+ import { MATERIAL_SYMBOLS as t } from "./Icon.constants.js";
3
+ const o = i({
4
+ base: {},
3
5
  variants: {
6
+ type: {
7
+ fontawesome: {},
8
+ material: {
9
+ fontFamily: "Material Symbols Rounded",
10
+ textStyle: "inherit",
11
+ verticalAlign: "middle",
12
+ fontVariationSettings: `'FILL' 0, 'wght' ${t.weight}, 'GRAD' ${t.grade}, 'opsz' ${t.opticalSize}`,
13
+ scale: "[1.5]",
14
+ fontFeatureSettings: "liga"
15
+ }
16
+ },
17
+ filled: {
18
+ true: {
19
+ fontVariationSettings: `'FILL' 1, 'wght' ${t.weight}, 'GRAD' ${t.grade}, 'opsz' ${t.opticalSize}`
20
+ }
21
+ },
4
22
  flip: {
5
23
  horizontal: {
6
24
  transform: "scaleX(-1)"
@@ -12,6 +30,13 @@ const n = a({
12
30
  transform: "scale(-1)"
13
31
  }
14
32
  },
33
+ loading: {
34
+ true: {
35
+ visibility: "hidden",
36
+ width: "[1em]",
37
+ height: "[1em]"
38
+ }
39
+ },
15
40
  rotate: {
16
41
  90: {
17
42
  transform: "rotate(90deg)"
@@ -37,8 +62,17 @@ const n = a({
37
62
  animationStyle: "icon-spin-3"
38
63
  }
39
64
  }
40
- }
65
+ },
66
+ compoundVariants: [
67
+ {
68
+ type: "material",
69
+ filled: !0,
70
+ css: {
71
+ fontVariationSettings: `'FILL' 1, 'wght' ${t.weight}, 'GRAD' ${t.grade}, 'opsz' ${t.opticalSize}`
72
+ }
73
+ }
74
+ ]
41
75
  });
42
76
  export {
43
- n as icon
77
+ o as icon
44
78
  };
@@ -0,0 +1,100 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { MaterialSymbol } from 'material-symbols';
3
+ import { ShadowContainer } from '../../types';
4
+ import { IressTestProps } from '../../interfaces';
5
+ export type IconType = 'fontawesome' | 'material';
6
+ export interface IconContextValue<P extends IconType = IconType> {
7
+ /**
8
+ * Check if an icon is already loaded (for Material Symbols only)
9
+ * @param name - The name of the Material Symbol icon
10
+ * @returns True if the icon is loaded, false otherwise
11
+ */
12
+ isIconLoaded: (name: MaterialSymbol) => boolean;
13
+ /**
14
+ * Register an icon as used (for Material Symbols only)
15
+ * @param name - The name of the Material Symbol icon
16
+ * @returns void
17
+ */
18
+ registerIcon: (name: MaterialSymbol) => void;
19
+ /**
20
+ * The icon provider type being used
21
+ * @default 'material'
22
+ */
23
+ type: P;
24
+ }
25
+ export declare const IconContext: import('react').Context<IconContextValue<IconType> | null>;
26
+ export interface IressIconProviderProps<P extends IconType = 'material'> extends PropsWithChildren, IressTestProps {
27
+ /**
28
+ * Optional container to inject the font styles into.
29
+ * Can be a ShadowRoot, HTMLElement, or a ref to either.
30
+ * Note: Font is always injected into document head as well.
31
+ */
32
+ container?: ShadowContainer;
33
+ /**
34
+ * Disable automatic font subsetting via Google Fonts CDN
35
+ * When false, only icons actually used in the component tree are loaded
36
+ * When true, the full Material Symbols font is loaded
37
+ * @default false
38
+ */
39
+ noSubsetting?: P extends 'material' ? boolean : never;
40
+ /**
41
+ * The icon provider to use for all child icons
42
+ * @default 'material'
43
+ */
44
+ type?: P;
45
+ }
46
+ /**
47
+ * This provider tracks Material Symbols usage across your app and dynamically
48
+ * loads only the icons you use via Google Fonts CDN, dramatically reducing
49
+ * font payload size.
50
+ *
51
+ * Loads Material Symbols Rounded with fixed parameters:
52
+ * - Weight: 300
53
+ * - FILL: 0 (default state) to 1 (active state)
54
+ * - Grade: 24
55
+ * - Optical Size: 24dp
56
+ *
57
+ * @example
58
+ * ```tsx
59
+ * import { IconProvider } from '@iress-oss/ids-components';
60
+ *
61
+ * function App() {
62
+ * return (
63
+ * <IconProvider>
64
+ * <YourApp />
65
+ * </IconProvider>
66
+ * );
67
+ * }
68
+ * ```
69
+ *
70
+ * **Bundle Size Optimization:**
71
+ * - Full font: ~1.4MB
72
+ * - 18 icons (typical usage): ~15-20KB (85% savings)
73
+ * - Auto-optimizes based on actual usage
74
+ *
75
+ * **Trade-offs:**
76
+ * - ✅ Automatic optimization (no consumer config needed)
77
+ * - ✅ Works for any number of icons (1 to 1000+)
78
+ * - ✅ Google CDN handles caching
79
+ * - ⚠️ Requires internet connection
80
+ * - ⚠️ Brief icon loading delay
81
+ *
82
+ * **When to Use:**
83
+ * - You want automatic bundle size optimization
84
+ * - Network connectivity is expected
85
+ * - Icon loading delay is acceptable (typically <500ms on fast connections)
86
+ *
87
+ * **When NOT to Use:**
88
+ * - Using more than ~50 icons (consider full font instead)
89
+ * - Offline apps (use full bundled font instead)
90
+ * - SSR with critical icons (icons may flash during hydration)
91
+ * - Need deterministic font versions (Google controls CDN updates)
92
+ *
93
+ * ---
94
+ *
95
+ * It also provides Font Awesome fonts when using that icon set.
96
+ */
97
+ export declare const IressIconProvider: {
98
+ <P extends IconType = "material">({ children, container, "data-testid": dataTestId, type, noSubsetting, }: IressIconProviderProps<P>): import("react/jsx-runtime").JSX.Element;
99
+ displayName: string;
100
+ };
@@ -0,0 +1,66 @@
1
+ import { jsxs as h, jsx as l } from "react/jsx-runtime";
2
+ import { createContext as w, useState as y, useCallback as S } from "react";
3
+ import { FontLoader as m } from "./components/FontLoader.js";
4
+ import { useDynamicFontSubsetting as g } from "./hooks/useDynamicFontSubsetting.js";
5
+ import { MATERIAL_SYMBOLS as e } from "./Icon.constants.js";
6
+ const L = w(null), $ = ({
7
+ children: c,
8
+ container: i,
9
+ "data-testid": n,
10
+ type: t = "material",
11
+ noSubsetting: a = !1
12
+ }) => {
13
+ const [d, f] = y(/* @__PURE__ */ new Set()), u = S(
14
+ (o) => {
15
+ a || f((s) => {
16
+ if (!s.has(o)) {
17
+ const r = new Set(s);
18
+ return r.add(o), r;
19
+ }
20
+ return s;
21
+ });
22
+ },
23
+ [a]
24
+ ), { isIconLoaded: I } = g({
25
+ icons: d,
26
+ buildUrl: (o) => {
27
+ let s = a ? "" : `&icon_names=${encodeURIComponent(o.join(","))}`;
28
+ return `https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@${e.opticalSize},${e.weight},0..1,${e.grade}${s}`;
29
+ },
30
+ dataAttribute: "material-icons-subset",
31
+ fontFamily: "Material Symbols Rounded",
32
+ disabled: t !== "material",
33
+ noSubsetting: a
34
+ }), p = {
35
+ type: t,
36
+ registerIcon: u,
37
+ isIconLoaded: (o) => t !== "material" ? !0 : I(o)
38
+ };
39
+ return /* @__PURE__ */ h(L.Provider, { value: p, children: [
40
+ c,
41
+ t === "material" && i && /* @__PURE__ */ l(
42
+ m,
43
+ {
44
+ url: `https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@${e.opticalSize},${e.weight},0..1,${e.grade}`,
45
+ container: i,
46
+ onlyShadow: !0,
47
+ keyPrefix: "material-symbols-fonts",
48
+ "data-testid": n
49
+ }
50
+ ),
51
+ t === "fontawesome" && /* @__PURE__ */ l(
52
+ m,
53
+ {
54
+ url: "https://cdn.iress.com/icons/5.15.4/css/combined.min.css",
55
+ container: i,
56
+ keyPrefix: "font-awesome-fonts",
57
+ "data-testid": n
58
+ }
59
+ )
60
+ ] });
61
+ };
62
+ $.displayName = "IressIconProvider";
63
+ export {
64
+ L as IconContext,
65
+ $ as IressIconProvider
66
+ };
@@ -0,0 +1,31 @@
1
+ import { ShadowContainer } from '../../../types';
2
+ import { IressTestProps } from '../../../interfaces';
3
+ export interface FontLoaderProps extends IressTestProps {
4
+ /**
5
+ * Optional container to inject the font styles into.
6
+ * Can be a ShadowRoot, HTMLElement, or a ref to either.
7
+ * Note: Font is always injected into document head as well.
8
+ */
9
+ container?: ShadowContainer;
10
+ /**
11
+ * Unique key prefix for the portal keys
12
+ */
13
+ keyPrefix: string;
14
+ /**
15
+ * Only load into the shadow container, not the head
16
+ * Used when the font is already loaded in the head in a different method (eg. subsetting)
17
+ */
18
+ onlyShadow?: boolean;
19
+ /**
20
+ * The URL of the font stylesheet to load
21
+ */
22
+ url: string;
23
+ }
24
+ /**
25
+ * Shared component for injecting font stylesheets into document head and optional shadow container.
26
+ * This component uses React's createPortal to ensure the font styles are added where required.
27
+ *
28
+ * Uses <style> tags with @import to support CSS layers, which has lower priority
29
+ * than Panda CSS utilities. This allows Panda CSS styling props to override the default font styles.
30
+ */
31
+ export declare const FontLoader: ({ container, keyPrefix, onlyShadow, url, }: FontLoaderProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,29 @@
1
+ import { jsxs as a, Fragment as u, jsx as d } from "react/jsx-runtime";
2
+ import { createPortal as o } from "react-dom";
3
+ const i = ({
4
+ container: e,
5
+ keyPrefix: l,
6
+ onlyShadow: s,
7
+ url: r
8
+ }) => {
9
+ if (typeof document > "u")
10
+ return null;
11
+ let t = null;
12
+ e && ("current" in e ? t = e.current : t = e);
13
+ const n = `@import url("${r}") layer(reset);`;
14
+ return /* @__PURE__ */ a(u, { children: [
15
+ !s && o(
16
+ /* @__PURE__ */ d("style", { "data-url": r, children: n }),
17
+ document.head,
18
+ `${l}-head`
19
+ ),
20
+ t && o(
21
+ /* @__PURE__ */ d("style", { "data-url": r, children: n }),
22
+ t,
23
+ `${l}-shadow`
24
+ )
25
+ ] });
26
+ };
27
+ export {
28
+ i as FontLoader
29
+ };
@@ -0,0 +1,12 @@
1
+ import { MaterialSymbol } from 'material-symbols';
2
+ /**
3
+ * Extracts all Material Symbol names from the type definition.
4
+ * This is done lazily to avoid processing 3800+ icon names until needed.
5
+ *
6
+ * @returns Promise resolving to array of all Material Symbol names
7
+ */
8
+ export declare const getMaterialSymbolsList: () => Promise<MaterialSymbol[]>;
9
+ /**
10
+ * Get the Material Symbols list with caching
11
+ */
12
+ export declare const getMaterialSymbolsListCached: () => Promise<MaterialSymbol[]>;
@@ -0,0 +1,12 @@
1
+ const a = async () => {
2
+ const { default: o } = await import("../../../index.d-CZvOUeIl.js"), l = o, s = /type MaterialSymbols = (\[)([\s\S]*?)(\]);/.exec(l);
3
+ if (!s)
4
+ throw new Error("Could not parse Material Symbols type definition");
5
+ return s[2].split(",").map((t) => t.trim()).filter((t) => t.startsWith('"')).map((t) => t.replace(/(^")|("$)/g, ""));
6
+ };
7
+ let e = null;
8
+ const m = () => (e ??= a(), e);
9
+ export {
10
+ a as getMaterialSymbolsList,
11
+ m as getMaterialSymbolsListCached
12
+ };
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Maps Font Awesome icon names to Material Symbols names
3
+ *
4
+ * This mapping is based on actual consumer usage patterns and provides
5
+ * semantic equivalents for common icons used in the design system.
6
+ *
7
+ * Naming convention differences:
8
+ * - Font Awesome: kebab-case (e.g., 'arrow-left', 'smile-wink')
9
+ * - Material Symbols: snake_case (e.g., 'arrow_back', 'sentiment_satisfied')
10
+ */
11
+ export declare const FA_TO_MATERIAL_MAP: {
12
+ check: "check";
13
+ times: "close";
14
+ 'times-circle': "cancel";
15
+ spinner: "progress_activity";
16
+ 'lock-alt': "lock";
17
+ lock: "lock";
18
+ 'chevron-down': "keyboard_arrow_down";
19
+ 'chevron-up': "keyboard_arrow_up";
20
+ 'chevron-left': "keyboard_arrow_left";
21
+ 'chevron-right': "keyboard_arrow_right";
22
+ 'chevron-double-down': "keyboard_double_arrow_down";
23
+ 'chevron-double-up': "keyboard_double_arrow_up";
24
+ 'chevron-circle-down': "expand_circle_down";
25
+ 'arrow-left': "arrow_back";
26
+ 'arrow-right': "arrow_forward";
27
+ 'arrow-up': "arrow_upward";
28
+ 'arrow-down': "arrow_downward";
29
+ 'user-circle': "account_circle";
30
+ 'power-off': "power_settings_new";
31
+ 'ellipsis-v': "more_vert";
32
+ 'ellipsis-h': "more_horiz";
33
+ bars: "menu";
34
+ search: "search";
35
+ cog: "settings";
36
+ 'file-image': "image";
37
+ 'file-pdf': "picture_as_pdf";
38
+ 'file-spreadsheet': "table_chart";
39
+ 'file-word': "description";
40
+ file: "drive_folder_upload";
41
+ folder: "folder";
42
+ 'folder-open': "folder_open";
43
+ home: "home";
44
+ trash: "delete";
45
+ edit: "edit";
46
+ pencil: "edit";
47
+ plus: "add";
48
+ minus: "remove";
49
+ info: "info";
50
+ 'info-circle': "info";
51
+ question: "help";
52
+ 'question-circle': "help";
53
+ 'exclamation-triangle': "warning";
54
+ star: "star";
55
+ heart: "favorite";
56
+ calendar: "calendar_today";
57
+ clock: "schedule";
58
+ bell: "notifications";
59
+ envelope: "mail";
60
+ download: "download";
61
+ upload: "upload";
62
+ print: "print";
63
+ share: "share";
64
+ link: "link";
65
+ 'external-link': "open_in_new";
66
+ ban: "block";
67
+ 'info-square': "info";
68
+ 'align-left': "format_align_left";
69
+ 'align-center': "format_align_center";
70
+ 'align-right': "format_align_right";
71
+ 'align-justify': "format_align_justify";
72
+ eye: "visibility";
73
+ 'spinner-third': "progress_activity";
74
+ 'file-alt': "draft";
75
+ user: "account_circle";
76
+ 'plus-circle': "add_circle";
77
+ };
78
+ export type FontAwesomeIconWithMaterialEquivalent = keyof typeof FA_TO_MATERIAL_MAP;
@@ -0,0 +1,75 @@
1
+ const e = {
2
+ // Status & Feedback
3
+ check: "check",
4
+ times: "close",
5
+ "times-circle": "cancel",
6
+ spinner: "progress_activity",
7
+ "lock-alt": "lock",
8
+ lock: "lock",
9
+ // Navigation & Arrows
10
+ "chevron-down": "keyboard_arrow_down",
11
+ "chevron-up": "keyboard_arrow_up",
12
+ "chevron-left": "keyboard_arrow_left",
13
+ "chevron-right": "keyboard_arrow_right",
14
+ "chevron-double-down": "keyboard_double_arrow_down",
15
+ "chevron-double-up": "keyboard_double_arrow_up",
16
+ "chevron-circle-down": "expand_circle_down",
17
+ "arrow-left": "arrow_back",
18
+ "arrow-right": "arrow_forward",
19
+ "arrow-up": "arrow_upward",
20
+ "arrow-down": "arrow_downward",
21
+ // UI Controls & Actions
22
+ "user-circle": "account_circle",
23
+ "power-off": "power_settings_new",
24
+ "ellipsis-v": "more_vert",
25
+ "ellipsis-h": "more_horiz",
26
+ bars: "menu",
27
+ search: "search",
28
+ cog: "settings",
29
+ // File Types
30
+ "file-image": "image",
31
+ "file-pdf": "picture_as_pdf",
32
+ "file-spreadsheet": "table_chart",
33
+ "file-word": "description",
34
+ file: "drive_folder_upload",
35
+ folder: "folder",
36
+ "folder-open": "folder_open",
37
+ // Common Icons
38
+ home: "home",
39
+ trash: "delete",
40
+ edit: "edit",
41
+ pencil: "edit",
42
+ plus: "add",
43
+ minus: "remove",
44
+ info: "info",
45
+ "info-circle": "info",
46
+ question: "help",
47
+ "question-circle": "help",
48
+ "exclamation-triangle": "warning",
49
+ star: "star",
50
+ heart: "favorite",
51
+ calendar: "calendar_today",
52
+ clock: "schedule",
53
+ bell: "notifications",
54
+ envelope: "mail",
55
+ download: "download",
56
+ upload: "upload",
57
+ print: "print",
58
+ share: "share",
59
+ link: "link",
60
+ "external-link": "open_in_new",
61
+ ban: "block",
62
+ "info-square": "info",
63
+ "align-left": "format_align_left",
64
+ "align-center": "format_align_center",
65
+ "align-right": "format_align_right",
66
+ "align-justify": "format_align_justify",
67
+ eye: "visibility",
68
+ "spinner-third": "progress_activity",
69
+ "file-alt": "draft",
70
+ user: "account_circle",
71
+ "plus-circle": "add_circle"
72
+ };
73
+ export {
74
+ e as FA_TO_MATERIAL_MAP
75
+ };
@@ -0,0 +1,45 @@
1
+ export interface UseDynamicFontSubsettingOptions {
2
+ /**
3
+ * Set of icon names to load
4
+ */
5
+ icons: Set<string>;
6
+ /**
7
+ * Function to build the font URL from an array of icon names
8
+ */
9
+ buildUrl: (icons: string[]) => string;
10
+ /**
11
+ * Data attribute to identify the link element in the DOM. Must be kebab-case.
12
+ */
13
+ dataAttribute: string;
14
+ /**
15
+ * Font family name for the Font Loading API
16
+ */
17
+ fontFamily: string;
18
+ /**
19
+ * Whether the hook is disabled (loads nothing if true)
20
+ */
21
+ disabled?: boolean;
22
+ /**
23
+ * Whether font subsetting is disabled (full font loaded at once)
24
+ * When true, all icons are considered loaded after first font load
25
+ */
26
+ noSubsetting?: boolean;
27
+ }
28
+ /**
29
+ * Hook to dynamically load fonts with text subsetting from a CDN.
30
+ * Only loads the specific glyphs that are actually used, dramatically reducing payload size.
31
+ *
32
+ * @example Material Symbols: 1407KB → 15-20KB (98.5% reduction)
33
+ */
34
+ export declare const useDynamicFontSubsetting: ({ icons, buildUrl, dataAttribute, fontFamily, disabled, noSubsetting, }: UseDynamicFontSubsettingOptions) => {
35
+ /**
36
+ * Set of icons that have been loaded and are ready to use
37
+ */
38
+ loadedIcons: Set<string>;
39
+ /**
40
+ * Check if a specific icon has been loaded
41
+ * In noSubsetting mode, returns true if fullyLoaded
42
+ * In subsetting mode, only returns true for individually loaded icons
43
+ */
44
+ isIconLoaded: (name: string) => boolean;
45
+ };