@flipdish/ui-library 0.2.1 → 0.2.2

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 (124) hide show
  1. package/README.md +66 -297
  2. package/dist/hooks/useBreakpoints/index.cjs +39 -0
  3. package/dist/hooks/useBreakpoints/index.cjs.map +1 -0
  4. package/dist/hooks/useBreakpoints/index.d.ts +19 -0
  5. package/dist/hooks/useBreakpoints/index.d.ts.map +1 -0
  6. package/dist/hooks/useBreakpoints/index.js +37 -0
  7. package/dist/hooks/useBreakpoints/index.js.map +1 -0
  8. package/dist/hooks/useClipboard/index.cjs +70 -0
  9. package/dist/hooks/useClipboard/index.cjs.map +1 -0
  10. package/dist/hooks/useClipboard/index.d.ts +29 -0
  11. package/dist/hooks/useClipboard/index.d.ts.map +1 -0
  12. package/dist/hooks/useClipboard/index.js +68 -0
  13. package/dist/hooks/useClipboard/index.js.map +1 -0
  14. package/dist/providers/RouteProvider/index.cjs +16 -0
  15. package/dist/providers/RouteProvider/index.cjs.map +1 -0
  16. package/dist/providers/RouteProvider/index.d.ts +12 -0
  17. package/dist/providers/RouteProvider/index.d.ts.map +1 -0
  18. package/dist/providers/RouteProvider/index.js +14 -0
  19. package/dist/providers/RouteProvider/index.js.map +1 -0
  20. package/dist/providers/ThemeProvider/index.cjs +54 -0
  21. package/dist/providers/ThemeProvider/index.cjs.map +1 -0
  22. package/dist/providers/ThemeProvider/index.d.ts +31 -0
  23. package/dist/providers/ThemeProvider/index.d.ts.map +1 -0
  24. package/dist/providers/ThemeProvider/index.js +51 -0
  25. package/dist/providers/ThemeProvider/index.js.map +1 -0
  26. package/package.json +17 -17
  27. package/dist/src/components/atoms/Avatar/avatar.utils.d.ts +0 -10
  28. package/dist/src/components/atoms/Avatar/avatar.utils.d.ts.map +0 -1
  29. package/dist/src/components/atoms/Avatar/components/avatar-add-button.d.ts +0 -9
  30. package/dist/src/components/atoms/Avatar/components/avatar-add-button.d.ts.map +0 -1
  31. package/dist/src/components/atoms/Avatar/components/avatar-company-icon.d.ts +0 -8
  32. package/dist/src/components/atoms/Avatar/components/avatar-company-icon.d.ts.map +0 -1
  33. package/dist/src/components/atoms/Avatar/components/avatar-count.d.ts +0 -7
  34. package/dist/src/components/atoms/Avatar/components/avatar-count.d.ts.map +0 -1
  35. package/dist/src/components/atoms/Avatar/components/avatar-online-indicator.d.ts +0 -8
  36. package/dist/src/components/atoms/Avatar/components/avatar-online-indicator.d.ts.map +0 -1
  37. package/dist/src/components/atoms/Avatar/components/verified-tick.d.ts +0 -7
  38. package/dist/src/components/atoms/Avatar/components/verified-tick.d.ts.map +0 -1
  39. package/dist/src/components/atoms/Avatar/index.d.ts +0 -65
  40. package/dist/src/components/atoms/Avatar/index.d.ts.map +0 -1
  41. package/dist/src/components/atoms/Badge/badge.types.d.ts +0 -22
  42. package/dist/src/components/atoms/Badge/badge.types.d.ts.map +0 -1
  43. package/dist/src/components/atoms/Badge/index.d.ts +0 -129
  44. package/dist/src/components/atoms/Badge/index.d.ts.map +0 -1
  45. package/dist/src/components/atoms/Button/index.d.ts +0 -111
  46. package/dist/src/components/atoms/Button/index.d.ts.map +0 -1
  47. package/dist/src/components/atoms/Checkbox/index.d.ts +0 -26
  48. package/dist/src/components/atoms/Checkbox/index.d.ts.map +0 -1
  49. package/dist/src/components/atoms/Divider/index.d.ts +0 -17
  50. package/dist/src/components/atoms/Divider/index.d.ts.map +0 -1
  51. package/dist/src/components/atoms/Dot/index.d.ts +0 -5
  52. package/dist/src/components/atoms/Dot/index.d.ts.map +0 -1
  53. package/dist/src/components/atoms/FeaturedIcon/index.d.ts +0 -15
  54. package/dist/src/components/atoms/FeaturedIcon/index.d.ts.map +0 -1
  55. package/dist/src/components/atoms/Input/components/hint-text.d.ts +0 -15
  56. package/dist/src/components/atoms/Input/components/hint-text.d.ts.map +0 -1
  57. package/dist/src/components/atoms/Input/components/label.d.ts +0 -16
  58. package/dist/src/components/atoms/Input/components/label.d.ts.map +0 -1
  59. package/dist/src/components/atoms/Input/index.d.ts +0 -60
  60. package/dist/src/components/atoms/Input/index.d.ts.map +0 -1
  61. package/dist/src/components/atoms/LoadingIndicator/index.d.ts +0 -19
  62. package/dist/src/components/atoms/LoadingIndicator/index.d.ts.map +0 -1
  63. package/dist/src/components/atoms/RadioButton/index.d.ts +0 -33
  64. package/dist/src/components/atoms/RadioButton/index.d.ts.map +0 -1
  65. package/dist/src/components/atoms/Toggle/index.d.ts +0 -21
  66. package/dist/src/components/atoms/Toggle/index.d.ts.map +0 -1
  67. package/dist/src/components/atoms/Tooltip/index.d.ts +0 -30
  68. package/dist/src/components/atoms/Tooltip/index.d.ts.map +0 -1
  69. package/dist/src/components/molecules/Breadcrumbs/components/breadcrumb-account-item.d.ts +0 -13
  70. package/dist/src/components/molecules/Breadcrumbs/components/breadcrumb-account-item.d.ts.map +0 -1
  71. package/dist/src/components/molecules/Breadcrumbs/components/breadcrumb-item.d.ts +0 -19
  72. package/dist/src/components/molecules/Breadcrumbs/components/breadcrumb-item.d.ts.map +0 -1
  73. package/dist/src/components/molecules/Breadcrumbs/index.d.ts +0 -25
  74. package/dist/src/components/molecules/Breadcrumbs/index.d.ts.map +0 -1
  75. package/dist/src/components/molecules/ButtonGroup/index.d.ts +0 -41
  76. package/dist/src/components/molecules/ButtonGroup/index.d.ts.map +0 -1
  77. package/dist/src/components/molecules/Dropdown/index.d.ts +0 -35
  78. package/dist/src/components/molecules/Dropdown/index.d.ts.map +0 -1
  79. package/dist/src/components/molecules/RadioGroup/components/radio-group-avatar.d.ts +0 -16
  80. package/dist/src/components/molecules/RadioGroup/components/radio-group-avatar.d.ts.map +0 -1
  81. package/dist/src/components/molecules/RadioGroup/components/radio-group-checkbox.d.ts +0 -9
  82. package/dist/src/components/molecules/RadioGroup/components/radio-group-checkbox.d.ts.map +0 -1
  83. package/dist/src/components/molecules/RadioGroup/components/radio-group-icon-card.d.ts +0 -21
  84. package/dist/src/components/molecules/RadioGroup/components/radio-group-icon-card.d.ts.map +0 -1
  85. package/dist/src/components/molecules/RadioGroup/components/radio-group-icon-simple.d.ts +0 -19
  86. package/dist/src/components/molecules/RadioGroup/components/radio-group-icon-simple.d.ts.map +0 -1
  87. package/dist/src/components/molecules/RadioGroup/components/radio-group-payment-icon.d.ts +0 -16
  88. package/dist/src/components/molecules/RadioGroup/components/radio-group-payment-icon.d.ts.map +0 -1
  89. package/dist/src/components/molecules/RadioGroup/components/radio-group-radio-button.d.ts +0 -9
  90. package/dist/src/components/molecules/RadioGroup/components/radio-group-radio-button.d.ts.map +0 -1
  91. package/dist/src/components/molecules/RadioGroup/index.d.ts +0 -7
  92. package/dist/src/components/molecules/RadioGroup/index.d.ts.map +0 -1
  93. package/dist/src/components/molecules/RadioGroup/radioGroup.types.d.ts +0 -12
  94. package/dist/src/components/molecules/RadioGroup/radioGroup.types.d.ts.map +0 -1
  95. package/dist/src/components/molecules/SectionHeader/index.d.ts +0 -9
  96. package/dist/src/components/molecules/SectionHeader/index.d.ts.map +0 -1
  97. package/dist/src/components/molecules/Select/components/combobox.d.ts +0 -15
  98. package/dist/src/components/molecules/Select/components/combobox.d.ts.map +0 -1
  99. package/dist/src/components/molecules/Select/components/popover.d.ts +0 -8
  100. package/dist/src/components/molecules/Select/components/popover.d.ts.map +0 -1
  101. package/dist/src/components/molecules/Select/components/select-item.d.ts +0 -11
  102. package/dist/src/components/molecules/Select/components/select-item.d.ts.map +0 -1
  103. package/dist/src/components/molecules/Select/components/select-shared.d.ts +0 -59
  104. package/dist/src/components/molecules/Select/components/select-shared.d.ts.map +0 -1
  105. package/dist/src/components/molecules/Select/index.d.ts +0 -19
  106. package/dist/src/components/molecules/Select/index.d.ts.map +0 -1
  107. package/dist/src/components/organisms/PageHeader/components/page-header-simple.d.ts +0 -24
  108. package/dist/src/components/organisms/PageHeader/components/page-header-simple.d.ts.map +0 -1
  109. package/dist/src/components/organisms/PageHeader/index.d.ts +0 -2
  110. package/dist/src/components/organisms/PageHeader/index.d.ts.map +0 -1
  111. package/dist/src/components/templates/NotFoundPage/index.d.ts +0 -25
  112. package/dist/src/components/templates/NotFoundPage/index.d.ts.map +0 -1
  113. package/dist/src/components/templates/PageLayout/index.d.ts +0 -43
  114. package/dist/src/components/templates/PageLayout/index.d.ts.map +0 -1
  115. package/dist/src/hooks/useResizeObserver/index.d.ts +0 -25
  116. package/dist/src/hooks/useResizeObserver/index.d.ts.map +0 -1
  117. package/dist/src/providers/ErrorBoundary/index.d.ts +0 -32
  118. package/dist/src/providers/ErrorBoundary/index.d.ts.map +0 -1
  119. package/dist/src/utilities/cx/index.d.ts +0 -22
  120. package/dist/src/utilities/cx/index.d.ts.map +0 -1
  121. package/dist/src/utilities/isReactComponent/index.d.ts +0 -24
  122. package/dist/src/utilities/isReactComponent/index.d.ts.map +0 -1
  123. package/dist/src/utilities/renderUtils/index.d.ts +0 -56
  124. package/dist/src/utilities/renderUtils/index.d.ts.map +0 -1
@@ -0,0 +1,68 @@
1
+ import { useState, useRef, useEffect, useCallback } from 'react';
2
+
3
+ const DEFAULT_TIMEOUT = 2000;
4
+ /**
5
+ * Custom hook to copy text to the clipboard.
6
+ *
7
+ * @returns {UseClipboardReturnType} - An object containing the copied state and the copy function.
8
+ */
9
+ const useClipboard = () => {
10
+ const [copied, setCopied] = useState(false);
11
+ const resetTimerRef = useRef(null);
12
+ const scheduleReset = () => {
13
+ if (resetTimerRef.current)
14
+ clearTimeout(resetTimerRef.current);
15
+ resetTimerRef.current = setTimeout(() => setCopied(false), DEFAULT_TIMEOUT);
16
+ };
17
+ useEffect(() => {
18
+ return () => {
19
+ if (resetTimerRef.current)
20
+ clearTimeout(resetTimerRef.current);
21
+ };
22
+ }, []);
23
+ // Fallback function for older browsers
24
+ const fallback = (text, id) => {
25
+ try {
26
+ // Textarea to copy the text to the clipboard
27
+ const textArea = document.createElement('textarea');
28
+ textArea.value = text;
29
+ textArea.style.position = 'absolute';
30
+ textArea.style.left = '-99999px';
31
+ document.body.appendChild(textArea);
32
+ textArea.select();
33
+ const success = document.execCommand('copy');
34
+ textArea.remove();
35
+ if (success) {
36
+ setCopied(id || true);
37
+ scheduleReset();
38
+ }
39
+ return success ? { success: true } : { success: false, error: new Error('execCommand returned false') };
40
+ }
41
+ catch (err) {
42
+ return {
43
+ success: false,
44
+ error: err instanceof Error ? err : new Error('Fallback copy failed'),
45
+ };
46
+ }
47
+ };
48
+ // biome-ignore lint/correctness/useExhaustiveDependencies: We need to return the copied state and the copy function
49
+ const copy = useCallback(async (text, id) => {
50
+ if (navigator.clipboard && window.isSecureContext) {
51
+ try {
52
+ await navigator.clipboard.writeText(text);
53
+ setCopied(id || true);
54
+ scheduleReset();
55
+ return { success: true };
56
+ }
57
+ catch (_err) {
58
+ // If modern method fails, try fallback
59
+ return fallback(text, id);
60
+ }
61
+ }
62
+ return fallback(text, id);
63
+ }, []);
64
+ return { copied, copy };
65
+ };
66
+
67
+ export { useClipboard };
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/hooks/useClipboard/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA,MAAM,eAAe,GAAG,IAAI;AAqB5B;;;;AAIG;AACI,MAAM,YAAY,GAAG,MAA6B;IACvD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAmB,KAAK,CAAC;AAC7D,IAAA,MAAM,aAAa,GAAG,MAAM,CAAuC,IAAI,CAAC;IAExE,MAAM,aAAa,GAAG,MAAK;QACzB,IAAI,aAAa,CAAC,OAAO;AAAE,YAAA,YAAY,CAAC,aAAa,CAAC,OAAO,CAAC;AAC9D,QAAA,aAAa,CAAC,OAAO,GAAG,UAAU,CAAC,MAAM,SAAS,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;AAC7E,IAAA,CAAC;IAED,SAAS,CAAC,MAAK;AACb,QAAA,OAAO,MAAK;YACV,IAAI,aAAa,CAAC,OAAO;AAAE,gBAAA,YAAY,CAAC,aAAa,CAAC,O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IAAI,CAAC;AACrB,gBAAA,aAAa,EAAE;AAEf,gBAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;YAC1B;YAAE,OAAO,IAAI,EAAE;;AAEb,gBAAA,OAAO,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;YAC3B;QACF;AACA,QAAA,OAAO,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;IAC3B,CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;AACzB;;;;"}
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var reactAriaComponents = require('react-aria-components');
5
+ var reactRouter = require('react-router');
6
+
7
+ /**
8
+ * @summary wires react-aria-components routing into react-router navigation
9
+ */
10
+ const RouteProvider = ({ children }) => {
11
+ const navigate = reactRouter.useNavigate();
12
+ return (jsxRuntime.jsx(reactAriaComponents.RouterProvider, { navigate: navigate, useHref: reactRouter.useHref, children: children }));
13
+ };
14
+
15
+ exports.RouteProvider = RouteProvider;
16
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/providers/RouteProvider/index.tsx"],"sourcesContent":[null],"names":["useNavigate","_jsx","RouterProvider","useHref"],"mappings":";;;;;;AAWA;;AAEG;MACU,aAAa,GAAG,CAAC,EAAE,QAAQ,EAAqB,KAAI;AAC/D,IAAA,MAAM,QAAQ,GAAGA,uBAAW,EAAE;AAE9B,IAAA,QACEC,cAAA,CAACC,kCAAc,EAAA,EAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAEC,mBAAO,EAAA,QAAA,EACjD,QAAQ,EAAA,CACM;AAErB;;;;"}
@@ -0,0 +1,12 @@
1
+ import type { PropsWithChildren } from 'react';
2
+ import type { NavigateOptions } from 'react-router';
3
+ declare module 'react-aria-components' {
4
+ interface RouterConfig {
5
+ routerOptions: NavigateOptions;
6
+ }
7
+ }
8
+ /**
9
+ * @summary wires react-aria-components routing into react-router navigation
10
+ */
11
+ export declare const RouteProvider: ({ children }: PropsWithChildren) => import("react").JSX.Element;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/RouteProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,OAAO,QAAQ,uBAAuB,CAAC;IACrC,UAAU,YAAY;QACpB,aAAa,EAAE,eAAe,CAAC;KAChC;CACF;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,cAAc,iBAAiB,gCAQ5D,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { RouterProvider } from 'react-aria-components';
3
+ import { useNavigate, useHref } from 'react-router';
4
+
5
+ /**
6
+ * @summary wires react-aria-components routing into react-router navigation
7
+ */
8
+ const RouteProvider = ({ children }) => {
9
+ const navigate = useNavigate();
10
+ return (jsx(RouterProvider, { navigate: navigate, useHref: useHref, children: children }));
11
+ };
12
+
13
+ export { RouteProvider };
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/providers/RouteProvider/index.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;AAWA;;AAEG;MACU,aAAa,GAAG,CAAC,EAAE,QAAQ,EAAqB,KAAI;AAC/D,IAAA,MAAM,QAAQ,GAAG,WAAW,EAAE;AAE9B,IAAA,QACEA,GAAA,CAAC,cAAc,EAAA,EAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAA,QAAA,EACjD,QAAQ,EAAA,CACM;AAErB;;;;"}
@@ -0,0 +1,54 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var React = require('react');
5
+
6
+ const ThemeContext = React.createContext(undefined);
7
+ const useTheme = () => {
8
+ const context = React.useContext(ThemeContext);
9
+ if (context === undefined) {
10
+ throw new Error('useTheme must be used within a ThemeProvider');
11
+ }
12
+ return context;
13
+ };
14
+ /**
15
+ * @summary app-wide light/dark/system theme provider that syncs the root dark-mode class
16
+ */
17
+ const ThemeProvider = ({ children, defaultTheme = 'system', storageKey = 'ui-theme', darkModeClass = 'dark-mode' }) => {
18
+ const [theme, setTheme] = React.useState(() => {
19
+ if (typeof window !== 'undefined') {
20
+ const savedTheme = localStorage.getItem(storageKey);
21
+ return savedTheme || defaultTheme;
22
+ }
23
+ return defaultTheme;
24
+ });
25
+ React.useEffect(() => {
26
+ const applyTheme = () => {
27
+ const root = window.document.documentElement;
28
+ if (theme === 'system') {
29
+ const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
30
+ root.classList.toggle(darkModeClass, systemTheme === 'dark');
31
+ localStorage.removeItem(storageKey);
32
+ }
33
+ else {
34
+ root.classList.toggle(darkModeClass, theme === 'dark');
35
+ localStorage.setItem(storageKey, theme);
36
+ }
37
+ };
38
+ applyTheme();
39
+ // Listen for system theme changes
40
+ const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
41
+ const handleChange = () => {
42
+ if (theme === 'system') {
43
+ applyTheme();
44
+ }
45
+ };
46
+ mediaQuery.addEventListener('change', handleChange);
47
+ return () => mediaQuery.removeEventListener('change', handleChange);
48
+ }, [theme, darkModeClass, storageKey]);
49
+ return jsxRuntime.jsx(ThemeContext.Provider, { value: { theme, setTheme }, children: children });
50
+ };
51
+
52
+ exports.ThemeProvider = ThemeProvider;
53
+ exports.useTheme = useTheme;
54
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/providers/ThemeProvider/index.tsx"],"sourcesContent":[null],"names":["createContext","useContext","useState","useEffect","_jsx"],"mappings":";;;;;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ACF,QAAA,CAAC;AAED,QAAA,UAAU,EAAE;;QAGZ,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC;QAEpE,MAAM,YAAY,GAAG,MAAK;AACxB,YAAA,IAAI,KAAK,KAAK,QAAQ,EAAE;AACtB,gBAAA,UAAU,EAAE;YACd;AACF,QAAA,CAAC;AAED,QAAA,UAAU,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC;QACnD,OAAO,MAAM,UAAU,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC;IACrE,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;AAEtC,IAAA,OAAOC,cAAA,CAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAA,QAAA,EAAG,QAAQ,GAAyB;AAC9F;;;;;"}
@@ -0,0 +1,31 @@
1
+ import type { ReactNode } from 'react';
2
+ type Theme = 'light' | 'dark' | 'system';
3
+ interface ThemeContextType {
4
+ theme: Theme;
5
+ setTheme: (theme: Theme) => void;
6
+ }
7
+ export declare const useTheme: () => ThemeContextType;
8
+ interface ThemeProviderProps {
9
+ children: ReactNode;
10
+ /**
11
+ * The class to add to the root element when the theme is dark
12
+ * @default "dark-mode"
13
+ */
14
+ darkModeClass?: string;
15
+ /**
16
+ * The default theme to use if no theme is stored in localStorage
17
+ * @default "system"
18
+ */
19
+ defaultTheme?: Theme;
20
+ /**
21
+ * The key to use to store the theme in localStorage
22
+ * @default "ui-theme"
23
+ */
24
+ storageKey?: string;
25
+ }
26
+ /**
27
+ * @summary app-wide light/dark/system theme provider that syncs the root dark-mode class
28
+ */
29
+ export declare const ThemeProvider: ({ children, defaultTheme, storageKey, darkModeClass }: ThemeProviderProps) => import("react").JSX.Element;
30
+ export {};
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/ThemeProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,KAAK,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzC,UAAU,gBAAgB;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAID,eAAO,MAAM,QAAQ,QAAO,gBAQ3B,CAAC;AAEF,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,uDAA6F,kBAAkB,gCAwC5I,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { createContext, useState, useEffect, useContext } from 'react';
3
+
4
+ const ThemeContext = createContext(undefined);
5
+ const useTheme = () => {
6
+ const context = useContext(ThemeContext);
7
+ if (context === undefined) {
8
+ throw new Error('useTheme must be used within a ThemeProvider');
9
+ }
10
+ return context;
11
+ };
12
+ /**
13
+ * @summary app-wide light/dark/system theme provider that syncs the root dark-mode class
14
+ */
15
+ const ThemeProvider = ({ children, defaultTheme = 'system', storageKey = 'ui-theme', darkModeClass = 'dark-mode' }) => {
16
+ const [theme, setTheme] = useState(() => {
17
+ if (typeof window !== 'undefined') {
18
+ const savedTheme = localStorage.getItem(storageKey);
19
+ return savedTheme || defaultTheme;
20
+ }
21
+ return defaultTheme;
22
+ });
23
+ useEffect(() => {
24
+ const applyTheme = () => {
25
+ const root = window.document.documentElement;
26
+ if (theme === 'system') {
27
+ const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
28
+ root.classList.toggle(darkModeClass, systemTheme === 'dark');
29
+ localStorage.removeItem(storageKey);
30
+ }
31
+ else {
32
+ root.classList.toggle(darkModeClass, theme === 'dark');
33
+ localStorage.setItem(storageKey, theme);
34
+ }
35
+ };
36
+ applyTheme();
37
+ // Listen for system theme changes
38
+ const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
39
+ const handleChange = () => {
40
+ if (theme === 'system') {
41
+ applyTheme();
42
+ }
43
+ };
44
+ mediaQuery.addEventListener('change', handleChange);
45
+ return () => mediaQuery.removeEventListener('change', handleChange);
46
+ }, [theme, darkModeClass, storageKey]);
47
+ return jsx(ThemeContext.Provider, { value: { theme, setTheme }, children: children });
48
+ };
49
+
50
+ export { ThemeProvider, useTheme };
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/providers/ThemeProvider/index.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;AAUA,MAAM,YAAY,GAAG,aAAa,CAA+B,SAAS,CAAC;AAEpE,MAAM,QAAQ,GAAG,MAAuB;AAC7C,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC;AAExC,IAAA,IAAI,OAAO,KAAK,SAAS,EAAE;AACzB,QAAA,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC;IACjE;AAEA,IAAA,OAAO,OAAO;AAChB;AAqBA;;AAEG;MACU,aAAa,GAAG,CAAC,EAAE,QAAQ,EAAE,YAAY,GAAG,QAAQ,EAAE,UAAU,GAAG,UAAU,EAAE,aAAa,GAAG,WAAW,EAAsB,KAAI;IAC/I,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAQ,MAAK;AAC7C,QAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,UAAU,CAAiB;YACnE,OAAO,UAAU,IAAI,YAAY;QACnC;AACA,Q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",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Flipdish Design System — atomic-design component library (Tailwind v4 + UntitledUI + React Aria).",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -55,24 +55,11 @@
55
55
  "require": "./dist/utilities/*/index.cjs"
56
56
  }
57
57
  },
58
- "scripts": {
59
- "build": "rollup -c && tsc -p tsconfig.build.json",
60
- "typecheck": "tsc --noEmit",
61
- "test": "echo 'No tests yet'",
62
- "typecheck:native": "tsc --noEmit -p tsconfig.native.json",
63
- "storybook": "storybook dev -p 6006",
64
- "build-storybook": "storybook build",
65
- "chromatic": "chromatic --exit-zero-on-changes",
66
- "figma:connect": "figma connect create",
67
- "figma:publish": "figma connect publish",
68
- "figma:publish:dry": "figma connect publish --dry-run",
69
- "figma:unpublish": "figma connect unpublish"
70
- },
71
58
  "dependencies": {
72
- "@flipdish/ui-icons": "workspace:*",
73
59
  "react-error-boundary": "^4.1.2",
74
60
  "tailwindcss-animate": "^1.0.7",
75
- "tailwindcss-react-aria-components": "^2.1.1"
61
+ "tailwindcss-react-aria-components": "^2.1.1",
62
+ "@flipdish/ui-icons": "^0.2.1"
76
63
  },
77
64
  "peerDependencies": {
78
65
  "@react-native-aria/focus": ">=0.2.7",
@@ -131,5 +118,18 @@
131
118
  "tailwind-variants": "^3.2.2",
132
119
  "tailwindcss": "^4.3.1",
133
120
  "vite": "^8.0.16"
121
+ },
122
+ "scripts": {
123
+ "build": "rollup -c && tsc -p tsconfig.build.json",
124
+ "typecheck": "tsc --noEmit",
125
+ "test": "echo 'No tests yet'",
126
+ "typecheck:native": "tsc --noEmit -p tsconfig.native.json",
127
+ "storybook": "storybook dev -p 6006",
128
+ "build-storybook": "storybook build",
129
+ "chromatic": "chromatic --exit-zero-on-changes",
130
+ "figma:connect": "figma connect create",
131
+ "figma:publish": "figma connect publish",
132
+ "figma:publish:dry": "figma connect publish --dry-run",
133
+ "figma:unpublish": "figma connect unpublish"
134
134
  }
135
- }
135
+ }
@@ -1,10 +0,0 @@
1
- /**
2
- * Extracts the initials from a full name.
3
- *
4
- * @param name - The full name from which to extract initials.
5
- * @returns The initials of the provided name. If the name contains only one word,
6
- * it returns the first character of that word. If the name contains two words,
7
- * it returns the first character of each word.
8
- */
9
- export declare const getInitials: (name: string) => string;
10
- //# sourceMappingURL=avatar.utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"avatar.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Avatar/avatar.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,WAGvC,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { ButtonProps as AriaButtonProps } from 'react-aria-components';
2
- interface AvatarAddButtonProps extends AriaButtonProps {
3
- size: 'xs' | 'sm' | 'md';
4
- title?: string;
5
- className?: string;
6
- }
7
- export declare const AvatarAddButton: ({ size, className, title, ...props }: AvatarAddButtonProps) => import("react").JSX.Element;
8
- export {};
9
- //# sourceMappingURL=avatar-add-button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"avatar-add-button.d.ts","sourceRoot":"","sources":["../../../../../../src/components/atoms/Avatar/components/avatar-add-button.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAQ5E,UAAU,oBAAqB,SAAQ,eAAe;IACpD,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,GAAI,sCAAmD,oBAAoB,gCActG,CAAC"}
@@ -1,8 +0,0 @@
1
- interface AvatarCompanyIconProps {
2
- size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
3
- src: string;
4
- alt?: string;
5
- }
6
- export declare const AvatarCompanyIcon: ({ size, src, alt }: AvatarCompanyIconProps) => import("react").JSX.Element;
7
- export {};
8
- //# sourceMappingURL=avatar-company-icon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"avatar-company-icon.d.ts","sourceRoot":"","sources":["../../../../../../src/components/atoms/Avatar/components/avatar-company-icon.tsx"],"names":[],"mappings":"AAaA,UAAU,sBAAsB;IAC9B,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,iBAAiB,GAAI,oBAAoB,sBAAsB,gCAM3E,CAAC"}
@@ -1,7 +0,0 @@
1
- interface AvatarCountProps {
2
- count: number;
3
- className?: string;
4
- }
5
- export declare const AvatarCount: ({ count, className }: AvatarCountProps) => import("react").JSX.Element;
6
- export {};
7
- //# sourceMappingURL=avatar-count.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"avatar-count.d.ts","sourceRoot":"","sources":["../../../../../../src/components/atoms/Avatar/components/avatar-count.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,GAAI,sBAAsB,gBAAgB,gCAMjE,CAAC"}
@@ -1,8 +0,0 @@
1
- interface AvatarOnlineIndicatorProps {
2
- size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
3
- status: 'online' | 'offline';
4
- className?: string;
5
- }
6
- export declare const AvatarOnlineIndicator: ({ size, status, className }: AvatarOnlineIndicatorProps) => import("react").JSX.Element;
7
- export {};
8
- //# sourceMappingURL=avatar-online-indicator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"avatar-online-indicator.d.ts","sourceRoot":"","sources":["../../../../../../src/components/atoms/Avatar/components/avatar-online-indicator.tsx"],"names":[],"mappings":"AAeA,UAAU,0BAA0B;IAClC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAC/D,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,qBAAqB,GAAI,6BAA6B,0BAA0B,gCA6B5F,CAAC"}
@@ -1,7 +0,0 @@
1
- interface VerifiedTickProps {
2
- size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
3
- className?: string;
4
- }
5
- export declare const VerifiedTick: ({ size, className }: VerifiedTickProps) => import("react").JSX.Element;
6
- export {};
7
- //# sourceMappingURL=verified-tick.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verified-tick.d.ts","sourceRoot":"","sources":["../../../../../../src/components/atoms/Avatar/components/verified-tick.tsx"],"names":[],"mappings":"AAeA,UAAU,iBAAiB;IACzB,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,GAAI,qBAAqB,iBAAiB,gCAclE,CAAC"}
@@ -1,65 +0,0 @@
1
- import { type FC, type ReactNode } from 'react';
2
- export interface AvatarProps {
3
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
4
- className?: string;
5
- /**
6
- * The class name for the main child of the avatar.
7
- */
8
- contentClassName?: string;
9
- src?: string | null;
10
- alt?: string;
11
- /**
12
- * Display an inner contrast border around the avatar image.
13
- */
14
- contrastBorder?: boolean;
15
- /**
16
- * Whether the avatar should be rounded.
17
- * @default true
18
- */
19
- rounded?: boolean;
20
- /**
21
- * Display an outer border around the avatar.
22
- */
23
- border?: boolean;
24
- /**
25
- * Display a badge (i.e. company logo).
26
- */
27
- badge?: ReactNode;
28
- /**
29
- * Display a status indicator.
30
- */
31
- status?: 'online' | 'offline';
32
- /**
33
- * Display a verified tick icon.
34
- *
35
- * @default false
36
- */
37
- verified?: boolean;
38
- /**
39
- * Display a count badge.
40
- */
41
- count?: number;
42
- /**
43
- * The initials of the user to display if no image is available.
44
- */
45
- initials?: string;
46
- /**
47
- * An icon to display if no image is available.
48
- */
49
- placeholderIcon?: FC<{
50
- className?: string;
51
- }>;
52
- /**
53
- * A placeholder to display if no image is available.
54
- */
55
- placeholder?: ReactNode;
56
- /**
57
- * Whether the avatar should show a focus ring when the parent group is in focus.
58
- * For example, when the avatar is wrapped inside a link.
59
- *
60
- * @default false
61
- */
62
- focusable?: boolean;
63
- }
64
- export declare const Avatar: ({ size, src, alt, initials, placeholder, placeholderIcon: PlaceholderIcon, border, badge, status, verified, count, focusable, rounded, className, contentClassName, }: AvatarProps) => import("react").JSX.Element;
65
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Avatar/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAK1D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAWD,eAAO,MAAM,MAAM,GAAI,uKAgBpB,WAAW,gCAkEb,CAAC"}
@@ -1,22 +0,0 @@
1
- export type IconComponentType = React.FunctionComponent<{
2
- className?: string;
3
- strokeWidth?: string | number;
4
- }>;
5
- export type Sizes = 'sm' | 'md' | 'lg';
6
- export type BadgeColors = 'gray' | 'brand' | 'error' | 'warning' | 'success' | 'slate' | 'sky' | 'blue' | 'indigo' | 'purple' | 'pink' | 'orange';
7
- export type FlagTypes = 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO' | 'AR' | 'AS' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ-1' | 'BQ-2' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD-1' | 'CD' | 'CF' | 'CH' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DS' | 'DZ' | 'earth' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FM' | 'FO' | 'FR' | 'GA' | 'GB-2' | 'GB' | 'GD' | 'GE' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GQ' | 'GR' | 'GT' | 'GU' | 'GW' | 'GY' | 'HK' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MG' | 'MH' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MP' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PR' | 'PT' | 'PW' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW';
8
- export type ExtractColorKeys<T> = T extends {
9
- styles: infer C;
10
- } ? keyof C : never;
11
- export type ExtractBadgeKeys<T> = keyof T;
12
- export type BadgeTypeToColorMap<T> = {
13
- [K in ExtractBadgeKeys<T>]: ExtractColorKeys<T[K]>;
14
- };
15
- export type BadgeTypeColors<T> = ExtractColorKeys<T[keyof T]>;
16
- export declare const badgeTypes: {
17
- readonly pillColor: "pill-color";
18
- readonly badgeColor: "color";
19
- readonly badgeModern: "modern";
20
- };
21
- export type BadgeTypes = (typeof badgeTypes)[keyof typeof badgeTypes];
22
- //# sourceMappingURL=badge.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"badge.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Badge/badge.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC,CAAC;AAE/G,MAAM,MAAM,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEvC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAElJ,MAAM,MAAM,SAAS,GACjB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,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