fictoan-react 2.0.0-beta.16 → 2.0.0-beta.18
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.
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.js +27 -0
- package/dist/components/Accordion/Accordion.js.map +1 -0
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.js +56 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +65 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -0
- package/dist/components/Button/Button.js +28 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +27 -0
- package/dist/components/ButtonGroup/ButtonGroup.js.map +1 -0
- package/dist/components/Callout/Callout.js +31 -0
- package/dist/components/Callout/Callout.js.map +1 -0
- package/dist/components/Card/Card.js +27 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/CodeBlock/CodeBlock.js +191 -0
- package/dist/components/CodeBlock/CodeBlock.js.map +1 -0
- package/dist/components/Divider/Divider.js +29 -0
- package/dist/components/Divider/Divider.js.map +1 -0
- package/dist/components/Drawer/Drawer.d.ts +3 -0
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.js +96 -0
- package/dist/components/Drawer/Drawer.js.map +1 -0
- package/dist/components/Element/Element.d.ts +6 -2
- package/dist/components/Element/Element.d.ts.map +1 -1
- package/dist/components/Element/Element.js +152 -0
- package/dist/components/Element/Element.js.map +1 -0
- package/dist/components/Element/Tags.js +31 -0
- package/dist/components/Element/Tags.js.map +1 -0
- package/dist/components/Element/constants.js +8 -0
- package/dist/components/Element/constants.js.map +1 -0
- package/dist/components/Form/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Form/Checkbox/Checkbox.js +78 -0
- package/dist/components/Form/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Form/Checkbox/CheckboxAndSwitchGroup.d.ts.map +1 -1
- package/dist/components/Form/Checkbox/CheckboxAndSwitchGroup.js +177 -0
- package/dist/components/Form/Checkbox/CheckboxAndSwitchGroup.js.map +1 -0
- package/dist/components/Form/Checkbox/Switch.d.ts.map +1 -1
- package/dist/components/Form/Checkbox/Switch.js +78 -0
- package/dist/components/Form/Checkbox/Switch.js.map +1 -0
- package/dist/components/Form/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/Form/FileUpload/FileUpload.js +142 -0
- package/dist/components/Form/FileUpload/FileUpload.js.map +1 -0
- package/dist/components/Form/Form/Form.js +37 -0
- package/dist/components/Form/Form/Form.js.map +1 -0
- package/dist/components/Form/Form/FormGenerator.js +64 -0
- package/dist/components/Form/Form/FormGenerator.js.map +1 -0
- package/dist/components/Form/FormItem/FormItem.d.ts +16 -0
- package/dist/components/Form/FormItem/FormItem.d.ts.map +1 -1
- package/dist/components/Form/FormItem/FormItem.js +127 -0
- package/dist/components/Form/FormItem/FormItem.js.map +1 -0
- package/dist/components/Form/FormItemGroup/FormItemGroup.js +42 -0
- package/dist/components/Form/FormItemGroup/FormItemGroup.js.map +1 -0
- package/dist/components/Form/InputField/InputField.d.ts.map +1 -1
- package/dist/components/Form/InputField/InputField.js +156 -0
- package/dist/components/Form/InputField/InputField.js.map +1 -0
- package/dist/components/Form/InputLabel/InputLabel.js +30 -0
- package/dist/components/Form/InputLabel/InputLabel.js.map +1 -0
- package/dist/components/Form/ListBox/ListBox.d.ts.map +1 -1
- package/dist/components/Form/ListBox/ListBox.js +284 -0
- package/dist/components/Form/ListBox/ListBox.js.map +1 -0
- package/dist/components/Form/ListBox/constants.d.ts +1 -1
- package/dist/components/Form/ListBox/constants.d.ts.map +1 -1
- package/dist/components/Form/ListBox/listBoxUtils.js +49 -0
- package/dist/components/Form/ListBox/listBoxUtils.js.map +1 -0
- package/dist/components/Form/PinInputField/PinInputField.d.ts +6 -1
- package/dist/components/Form/PinInputField/PinInputField.d.ts.map +1 -1
- package/dist/components/Form/PinInputField/PinInputField.js +165 -0
- package/dist/components/Form/PinInputField/PinInputField.js.map +1 -0
- package/dist/components/Form/RadioButton/RadioButton.d.ts.map +1 -1
- package/dist/components/Form/RadioButton/RadioButton.js +82 -0
- package/dist/components/Form/RadioButton/RadioButton.js.map +1 -0
- package/dist/components/Form/RadioButton/RadioGroup.d.ts.map +1 -1
- package/dist/components/Form/RadioButton/RadioGroup.js +97 -0
- package/dist/components/Form/RadioButton/RadioGroup.js.map +1 -0
- package/dist/components/Form/RadioButton/RadioTabGroup.d.ts.map +1 -1
- package/dist/components/Form/RadioButton/RadioTabGroup.js +182 -0
- package/dist/components/Form/RadioButton/RadioTabGroup.js.map +1 -0
- package/dist/components/Form/Range/Range.js +376 -0
- package/dist/components/Form/Range/Range.js.map +1 -0
- package/dist/components/Form/Select/Select.d.ts.map +1 -1
- package/dist/components/Form/Select/Select.js +83 -0
- package/dist/components/Form/Select/Select.js.map +1 -0
- package/dist/components/Form/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/Form/TextArea/TextArea.js +111 -0
- package/dist/components/Form/TextArea/TextArea.js.map +1 -0
- package/dist/components/Meter/Meter.js +110 -0
- package/dist/components/Meter/Meter.js.map +1 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +75 -0
- package/dist/components/Modal/Modal.js.map +1 -0
- package/dist/components/Notification/NotificationItem/NotificationItem.d.ts.map +1 -1
- package/dist/components/Notification/NotificationItem/NotificationItem.js +70 -0
- package/dist/components/Notification/NotificationItem/NotificationItem.js.map +1 -0
- package/dist/components/Notification/NotificationsProvider/NotificationsProvider.js +88 -0
- package/dist/components/Notification/NotificationsProvider/NotificationsProvider.js.map +1 -0
- package/dist/components/Notification/NotificationsWrapper/NotificationsWrapper.d.ts.map +1 -1
- package/dist/components/Notification/NotificationsWrapper/NotificationsWrapper.js +35 -0
- package/dist/components/Notification/NotificationsWrapper/NotificationsWrapper.js.map +1 -0
- package/dist/components/OptionCard/OptionCard.js +150 -0
- package/dist/components/OptionCard/OptionCard.js.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +206 -0
- package/dist/components/Pagination/Pagination.js.map +1 -0
- package/dist/components/Pagination/usePagination.js +35 -0
- package/dist/components/Pagination/usePagination.js.map +1 -0
- package/dist/components/Portion/Portion.js +34 -0
- package/dist/components/Portion/Portion.js.map +1 -0
- package/dist/components/ProgressBar/ProgressBar.js +63 -0
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/components/Row/Row.js +40 -0
- package/dist/components/Row/Row.js.map +1 -0
- package/dist/components/Sidebar/ContentWrapper/ContentWrapper.js +23 -0
- package/dist/components/Sidebar/ContentWrapper/ContentWrapper.js.map +1 -0
- package/dist/components/Sidebar/SidebarFooter/SidebarFooter.js +25 -0
- package/dist/components/Sidebar/SidebarFooter/SidebarFooter.js.map +1 -0
- package/dist/components/Sidebar/SidebarHeader/SidebarHeader.js +25 -0
- package/dist/components/Sidebar/SidebarHeader/SidebarHeader.js.map +1 -0
- package/dist/components/Sidebar/SidebarItem/SidebarItem.js +30 -0
- package/dist/components/Sidebar/SidebarItem/SidebarItem.js.map +1 -0
- package/dist/components/Sidebar/SidebarItemsGroup/SidebarItemsGroup.js +29 -0
- package/dist/components/Sidebar/SidebarItemsGroup/SidebarItemsGroup.js.map +1 -0
- package/dist/components/Sidebar/SidebarWrapper/SidebarWrapper.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarWrapper/SidebarWrapper.js +35 -0
- package/dist/components/Sidebar/SidebarWrapper/SidebarWrapper.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.js +84 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Spinner/Spinner.js +33 -0
- package/dist/components/Spinner/Spinner.js.map +1 -0
- package/dist/components/Table/Table.js +53 -0
- package/dist/components/Table/Table.js.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +104 -0
- package/dist/components/Tabs/Tabs.js.map +1 -0
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +6 -0
- package/dist/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/components/ThemeProvider/ThemeProvider.js +52 -0
- package/dist/components/ThemeProvider/ThemeProvider.js.map +1 -0
- package/dist/components/Toast/ToastItem/ToastItem.js +47 -0
- package/dist/components/Toast/ToastItem/ToastItem.js.map +1 -0
- package/dist/components/Toast/ToastsProvider/ToastsProvider.js +45 -0
- package/dist/components/Toast/ToastsProvider/ToastsProvider.js.map +1 -0
- package/dist/components/Toast/ToastsWrapper/ToastsWrapper.d.ts.map +1 -1
- package/dist/components/Toast/ToastsWrapper/ToastsWrapper.js +28 -0
- package/dist/components/Toast/ToastsWrapper/ToastsWrapper.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +62 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/Typography/Heading.js +30 -0
- package/dist/components/Typography/Heading.js.map +1 -0
- package/dist/components/Typography/Text.js +15 -0
- package/dist/components/Typography/Text.js.map +1 -0
- package/dist/components/index.js +124 -75
- package/dist/components/index.js.map +1 -1
- package/dist/fictoan-schema.json +2070 -0
- package/dist/hooks/UseClickOutside.js +17 -0
- package/dist/hooks/UseClickOutside.js.map +1 -0
- package/dist/hooks/UseViewTransition.d.ts +2 -0
- package/dist/hooks/UseViewTransition.d.ts.map +1 -0
- package/dist/hooks/UseViewTransition.js +17 -0
- package/dist/hooks/UseViewTransition.js.map +1 -0
- package/dist/index.css +6 -10635
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +142 -151
- package/dist/index.js.map +1 -1
- package/dist/scripts/generateSchema.d.ts +2 -0
- package/dist/scripts/generateSchema.d.ts.map +1 -0
- package/dist/scripts/schema-meta.d.ts +12 -0
- package/dist/scripts/schema-meta.d.ts.map +1 -0
- package/dist/styles/colours.js +55 -0
- package/dist/styles/colours.js.map +1 -0
- package/dist/utils/classNames.js +6 -0
- package/dist/utils/classNames.js.map +1 -0
- package/dist/utils/propSeparation.js +77 -0
- package/dist/utils/propSeparation.js.map +1 -0
- package/package.json +12 -18
- package/dist/Accordion-CeGNgNW8.js +0 -4254
- package/dist/Accordion-CeGNgNW8.js.map +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as w, jsx as h } from "react/jsx-runtime";
|
|
3
|
+
import m, { useState as N, useCallback as C, useEffect as _ } from "react";
|
|
4
|
+
import { Element as I } from "../Element/Element.js";
|
|
5
|
+
const p = "fictoan-theme";
|
|
6
|
+
let y = !1;
|
|
7
|
+
const P = ["", (e) => {
|
|
8
|
+
}], v = m.createContext(void 0), R = () => {
|
|
9
|
+
const e = m.useContext(v);
|
|
10
|
+
return e === void 0 ? P : e;
|
|
11
|
+
}, g = (e, o) => {
|
|
12
|
+
let a;
|
|
13
|
+
try {
|
|
14
|
+
a = localStorage.getItem(e) || void 0;
|
|
15
|
+
} catch {
|
|
16
|
+
}
|
|
17
|
+
return a || o;
|
|
18
|
+
}, k = m.forwardRef(
|
|
19
|
+
({ currentTheme: e, themeList: o, children: a, nonce: u, storageKey: c, ...S }, T) => {
|
|
20
|
+
const t = c ?? p, [r, E] = N(() => g(t) || e), i = C(
|
|
21
|
+
(n) => {
|
|
22
|
+
const s = typeof n == "function" ? n(r) : n, d = o.includes(s) ? s : o[0], f = () => {
|
|
23
|
+
document.documentElement.className = "", document.documentElement.classList.add(d);
|
|
24
|
+
}, l = typeof document < "u" ? document : null;
|
|
25
|
+
l && typeof l.startViewTransition == "function" ? l.startViewTransition(f) : typeof document < "u" && f(), E(d);
|
|
26
|
+
try {
|
|
27
|
+
localStorage.setItem(t, d);
|
|
28
|
+
} catch {
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
[r, o, t]
|
|
32
|
+
);
|
|
33
|
+
_(() => {
|
|
34
|
+
var s;
|
|
35
|
+
const n = g(t);
|
|
36
|
+
i(n || e), c === void 0 && !y && typeof process < "u" && ((s = process.env) == null ? void 0 : s.NODE_ENV) !== "production" && (y = !0, console.warn(
|
|
37
|
+
`[fictoan-react] ThemeProvider is persisting the theme to the default localStorage key "${p}". If more than one Fictoan app can share an origin (e.g. localhost during dev, GitHub Pages), pass a unique \`storageKey\` (your package.json name works well) so their themes don't collide.`
|
|
38
|
+
));
|
|
39
|
+
}, [e, i, t, c]);
|
|
40
|
+
const x = `(function(){try{var t=localStorage.getItem(${JSON.stringify(t)})||${JSON.stringify(e)};if(t){document.documentElement.className=t;}}catch(e){}})();`;
|
|
41
|
+
return /* @__PURE__ */ w(v.Provider, { value: [r, i], children: [
|
|
42
|
+
/* @__PURE__ */ h("script", { nonce: u, dangerouslySetInnerHTML: { __html: x } }),
|
|
43
|
+
/* @__PURE__ */ h(I, { as: "div", "data-theme-provider": !0, ref: T, ...S, children: a })
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
k.displayName = "ThemeProvider";
|
|
48
|
+
export {
|
|
49
|
+
k as ThemeProvider,
|
|
50
|
+
R as useTheme
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","sources":["../../../src/components/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["// REACT CORE ==========================================================================================================\nimport React, { useCallback, useEffect, useState } from \"react\";\n\n// ELEMENT =============================================================================================================\nimport { CommonAndHTMLProps } from \"../Element/constants\";\nimport { Element } from \"$element\";\n\nconst DEFAULT_STORAGE_KEY = \"fictoan-theme\";\nlet hasWarnedDefaultKey = false;\n\n// Create a tuple type for the theme context\ntype ThemeContextType = [string, React.Dispatch<React.SetStateAction<string>>];\n\nconst defaultContext: ThemeContextType = [\"\", (_) => {}];\nconst ThemeContext = React.createContext<ThemeContextType | undefined>(undefined);\n\nexport const useTheme = (): ThemeContextType => {\n const context = React.useContext(ThemeContext);\n if (context === undefined) {\n return defaultContext;\n }\n return context;\n};\n\nexport type ThemeProviderElementType = HTMLDivElement;\nexport interface ThemeProviderProps extends CommonAndHTMLProps<ThemeProviderElementType> {\n themeList : string[];\n currentTheme : string;\n /** localStorage key the theme is persisted under. Defaults to \"fictoan-theme\"; pass a unique\n * value (your package.json name works well) when multiple Fictoan apps can share an origin\n * (e.g. localhost during dev, GitHub Pages) so their themes don't collide. */\n storageKey ? : string;\n /** Pass your CSP nonce so the no-flash inline script is allowed under a strict `script-src`. */\n nonce ? : string;\n}\n\nconst getTheme = (key: string, fallback?: string) => {\n let theme;\n try {\n theme = localStorage.getItem(key) || undefined;\n } catch (e) {\n // Unsupported\n }\n return theme || fallback;\n};\n\n// COMPONENT ///////////////////////////////////////////////////////////////////////////////////////////////////////////\nexport const ThemeProvider = React.forwardRef(\n ({ currentTheme, themeList, children, nonce, storageKey, ...props }: ThemeProviderProps, ref: React.Ref<ThemeProviderElementType>) => {\n const resolvedKey = storageKey ?? DEFAULT_STORAGE_KEY;\n const [themeState, setThemeState] = useState<string>(() =>\n getTheme(resolvedKey) || currentTheme);\n\n const setTheme = useCallback(\n (value: React.SetStateAction<string>) => {\n // Handle both direct values and updater functions\n const newTheme = typeof value === \"function\"\n ? value(themeState)\n : value;\n\n const finalTheme = themeList.includes(newTheme)\n ? newTheme\n : themeList[0];\n\n // The visible theme switch is documentElement.className changing,\n // which all theme-* CSS rules cascade off. Wrap that mutation in\n // a view transition so consumers get a smooth crossfade between\n // themes without writing animation CSS. Falls back to instant\n // change on browsers that don't support the API.\n const applyClass = () => {\n document.documentElement.className = \"\";\n document.documentElement.classList.add(finalTheme);\n };\n\n const doc = typeof document !== \"undefined\"\n ? document as Document & { startViewTransition?: (cb: () => void) => unknown }\n : null;\n\n if (doc && typeof doc.startViewTransition === \"function\") {\n doc.startViewTransition(applyClass);\n } else if (typeof document !== \"undefined\") {\n applyClass();\n }\n\n setThemeState(finalTheme);\n try {\n localStorage.setItem(resolvedKey, finalTheme);\n } catch (e) {\n // Unsupported\n }\n },\n [themeState, themeList, resolvedKey]\n );\n\n useEffect(() => {\n const theme = getTheme(resolvedKey);\n setTheme(theme || currentTheme);\n\n if (\n storageKey === undefined && !hasWarnedDefaultKey &&\n typeof process !== \"undefined\" && process.env?.NODE_ENV !== \"production\"\n ) {\n hasWarnedDefaultKey = true;\n console.warn(\n `[fictoan-react] ThemeProvider is persisting the theme to the default localStorage ` +\n `key \"${DEFAULT_STORAGE_KEY}\". If more than one Fictoan app can share an origin (e.g. ` +\n `localhost during dev, GitHub Pages), pass a unique \\`storageKey\\` (your package.json ` +\n `name works well) so their themes don't collide.`,\n );\n }\n }, [currentTheme, setTheme, resolvedKey, storageKey]);\n\n // No-flash pre-hydration script: set the persisted theme class on <html>\n // before first paint, so the (un-gated, SSR-rendered) children don't flash\n // the default theme. Reads the same storageKey as the component; falls back\n // to currentTheme. Inline → strict-CSP consumers should pass a `nonce`.\n // SSR/SSG: runs during initial HTML parse; pure CSR: a no-op (the mount\n // effect applies the theme).\n const noFlashScript =\n `(function(){try{var t=localStorage.getItem(${JSON.stringify(resolvedKey)})` +\n `||${JSON.stringify(currentTheme)};` +\n `if(t){document.documentElement.className=t;}}catch(e){}})();`;\n\n return (\n <ThemeContext.Provider value={[themeState, setTheme]}>\n <script nonce={nonce} dangerouslySetInnerHTML={{ __html: noFlashScript }} />\n <Element<ThemeProviderElementType> as=\"div\" data-theme-provider ref={ref} {...props}>\n {children}\n </Element>\n </ThemeContext.Provider>\n );\n }\n);\nThemeProvider.displayName = \"ThemeProvider\";\n"],"names":["DEFAULT_STORAGE_KEY","hasWarnedDefaultKey","defaultContext","_","ThemeContext","React","useTheme","context","getTheme","key","fallback","theme","ThemeProvider","currentTheme","themeList","children","nonce","storageKey","props","ref","resolvedKey","themeState","setThemeState","useState","setTheme","useCallback","value","newTheme","finalTheme","applyClass","doc","useEffect","_a","noFlashScript","jsxs","jsx","Element"],"mappings":";;;AAOA,MAAMA,IAAsB;AAC5B,IAAIC,IAAsB;AAK1B,MAAMC,IAAmC,CAAC,IAAI,CAACC,MAAM;AAAC,CAAC,GACjDC,IAAeC,EAAM,cAA4C,MAAS,GAEnEC,IAAW,MAAwB;AAC5C,QAAMC,IAAUF,EAAM,WAAWD,CAAY;AAC7C,SAAIG,MAAY,SACLL,IAEJK;AACX,GAcMC,IAAW,CAACC,GAAaC,MAAsB;AACjD,MAAIC;AACJ,MAAI;AACA,IAAAA,IAAQ,aAAa,QAAQF,CAAG,KAAK;AAAA,EACzC,QAAY;AAAA,EAEZ;AACA,SAAOE,KAASD;AACpB,GAGaE,IAAgBP,EAAM;AAAA,EAC/B,CAAC,EAAE,cAAAQ,GAAc,WAAAC,GAAW,UAAAC,GAAU,OAAAC,GAAO,YAAAC,GAAY,GAAGC,EAAA,GAA6BC,MAA6C;AAClI,UAAMC,IAAcH,KAAcjB,GAC5B,CAACqB,GAAYC,CAAa,IAAIC,EAAiB,MACjDf,EAASY,CAAW,KAAKP,CAAY,GAEnCW,IAAWC;AAAA,MACb,CAACC,MAAwC;AAErC,cAAMC,IAAW,OAAOD,KAAU,aAC5BA,EAAML,CAAU,IAChBK,GAEAE,IAAad,EAAU,SAASa,CAAQ,IACxCA,IACAb,EAAU,CAAC,GAOXe,IAAa,MAAM;AACrB,mBAAS,gBAAgB,YAAY,IACrC,SAAS,gBAAgB,UAAU,IAAID,CAAU;AAAA,QACrD,GAEME,IAAM,OAAO,WAAa,MAC1B,WACA;AAEN,QAAIA,KAAO,OAAOA,EAAI,uBAAwB,aAC1CA,EAAI,oBAAoBD,CAAU,IAC3B,OAAO,WAAa,OAC3BA,EAAA,GAGJP,EAAcM,CAAU;AACxB,YAAI;AACA,uBAAa,QAAQR,GAAaQ,CAAU;AAAA,QAChD,QAAY;AAAA,QAEZ;AAAA,MACJ;AAAA,MACA,CAACP,GAAYP,GAAWM,CAAW;AAAA,IAAA;AAGvC,IAAAW,EAAU,MAAM;;AACZ,YAAMpB,IAAQH,EAASY,CAAW;AAClC,MAAAI,EAASb,KAASE,CAAY,GAG1BI,MAAe,UAAa,CAAChB,KAC7B,OAAO,UAAY,SAAe+B,IAAA,QAAQ,QAAR,gBAAAA,EAAa,cAAa,iBAE5D/B,IAAsB,IACtB,QAAQ;AAAA,QACJ,0FACQD,CAAmB;AAAA,MAAA;AAAA,IAKvC,GAAG,CAACa,GAAcW,GAAUJ,GAAaH,CAAU,CAAC;AAQpD,UAAMgB,IACF,8CAA8C,KAAK,UAAUb,CAAW,CAAC,MACpE,KAAK,UAAUP,CAAY,CAAC;AAGrC,WACI,gBAAAqB,EAAC9B,EAAa,UAAb,EAAsB,OAAO,CAACiB,GAAYG,CAAQ,GAC/C,UAAA;AAAA,MAAA,gBAAAW,EAAC,YAAO,OAAAnB,GAAc,yBAAyB,EAAE,QAAQiB,KAAiB;AAAA,MAC1E,gBAAAE,EAACC,KAAkC,IAAG,OAAM,uBAAmB,IAAC,KAAAjB,GAAW,GAAGD,GACzE,UAAAH,EAAA,CACL;AAAA,IAAA,GACJ;AAAA,EAER;AACJ;AACAH,EAAc,cAAc;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { useState as u, useEffect as r } from "react";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { Element as c } from "../../Element/Element.js";
|
|
6
|
+
const f = ({
|
|
7
|
+
id: a,
|
|
8
|
+
duration: e = 4,
|
|
9
|
+
onClose: i,
|
|
10
|
+
children: o
|
|
11
|
+
}) => {
|
|
12
|
+
const [t, m] = u(!1);
|
|
13
|
+
return r(() => {
|
|
14
|
+
if (e === 0) return;
|
|
15
|
+
const s = setTimeout(() => {
|
|
16
|
+
m(!0);
|
|
17
|
+
}, e * 1e3);
|
|
18
|
+
return () => clearTimeout(s);
|
|
19
|
+
}, [e]), r(() => {
|
|
20
|
+
if (!t) return;
|
|
21
|
+
const s = setTimeout(() => {
|
|
22
|
+
i();
|
|
23
|
+
}, 500);
|
|
24
|
+
return () => clearTimeout(s);
|
|
25
|
+
}, [t, i]), /* @__PURE__ */ n(
|
|
26
|
+
c,
|
|
27
|
+
{
|
|
28
|
+
as: "div",
|
|
29
|
+
"data-toast-item": !0,
|
|
30
|
+
id: a,
|
|
31
|
+
classNames: t ? ["dismissed"] : [],
|
|
32
|
+
onTransitionEnd: () => {
|
|
33
|
+
t && i();
|
|
34
|
+
},
|
|
35
|
+
role: "status",
|
|
36
|
+
"aria-live": "polite",
|
|
37
|
+
"aria-atomic": "true",
|
|
38
|
+
shadow: "soft",
|
|
39
|
+
children: o
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
f.displayName = "ToastItem";
|
|
44
|
+
export {
|
|
45
|
+
f as ToastItem
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=ToastItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastItem.js","sources":["../../../../src/components/Toast/ToastItem/ToastItem.tsx"],"sourcesContent":["// REACT CORE ==========================================================================================================\nimport React, { useState, useEffect } from \"react\";\n\n// STYLES ==============================================================================================================\nimport \"./toast-item.css\";\n\n// OTHER ===============================================================================================================\nimport { Element } from \"$element\";\n\n// TYPES ===============================================================================================================\nexport interface ToastItemProps {\n id : string;\n duration ? : number;\n onClose : () => void;\n children : React.ReactNode;\n}\n\nexport type ToastItemElementType = HTMLDivElement;\n\n// COMPONENT ===========================================================================================================\nexport const ToastItem = ({\n id,\n duration = 4,\n onClose,\n children,\n}: ToastItemProps) => {\n const [isExiting, setIsExiting] = useState(false);\n\n useEffect(() => {\n if (duration === 0) return;\n\n const timer = setTimeout(() => {\n setIsExiting(true);\n }, duration * 1000);\n\n return () => clearTimeout(timer);\n }, [duration]);\n\n // Fallback: if transition doesn't fire, remove after animation duration\n useEffect(() => {\n if (!isExiting) return;\n\n const fallbackTimer = setTimeout(() => {\n onClose();\n }, 500);\n\n return () => clearTimeout(fallbackTimer);\n }, [isExiting, onClose]);\n\n const handleTransitionEnd = () => {\n if (isExiting) {\n onClose();\n }\n };\n\n return (\n <Element<ToastItemElementType>\n as=\"div\"\n data-toast-item\n id={id}\n classNames={isExiting ? [\"dismissed\"] : []}\n onTransitionEnd={handleTransitionEnd}\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n shadow=\"soft\"\n >\n {children}\n </Element>\n );\n};\nToastItem.displayName = \"ToastItem\";\n"],"names":["ToastItem","id","duration","onClose","children","isExiting","setIsExiting","useState","useEffect","timer","fallbackTimer","jsx","Element"],"mappings":";;;;AAoBO,MAAMA,IAAY,CAAC;AAAA,EACtB,IAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,SAAAC;AAAA,EACA,UAAAC;AACJ,MAAsB;AAClB,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK;AAEhD,SAAAC,EAAU,MAAM;AACZ,QAAIN,MAAa,EAAG;AAEpB,UAAMO,IAAQ,WAAW,MAAM;AAC3B,MAAAH,EAAa,EAAI;AAAA,IACrB,GAAGJ,IAAW,GAAI;AAElB,WAAO,MAAM,aAAaO,CAAK;AAAA,EACnC,GAAG,CAACP,CAAQ,CAAC,GAGbM,EAAU,MAAM;AACZ,QAAI,CAACH,EAAW;AAEhB,UAAMK,IAAgB,WAAW,MAAM;AACnC,MAAAP,EAAA;AAAA,IACJ,GAAG,GAAG;AAEN,WAAO,MAAM,aAAaO,CAAa;AAAA,EAC3C,GAAG,CAACL,GAAWF,CAAO,CAAC,GASnB,gBAAAQ;AAAA,IAACC;AAAA,IAAA;AAAA,MACG,IAAG;AAAA,MACH,mBAAe;AAAA,MACf,IAAAX;AAAA,MACA,YAAYI,IAAY,CAAC,WAAW,IAAI,CAAA;AAAA,MACxC,iBAZoB,MAAM;AAC9B,QAAIA,KACAF,EAAA;AAAA,MAER;AAAA,MASQ,MAAK;AAAA,MACL,aAAU;AAAA,MACV,eAAY;AAAA,MACZ,QAAO;AAAA,MAEN,UAAAC;AAAA,IAAA;AAAA,EAAA;AAGb;AACAJ,EAAU,cAAc;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as p, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { useState as T, useCallback as n, createContext as x, useContext as f } from "react";
|
|
4
|
+
import { ToastsWrapper as h } from "../ToastsWrapper/ToastsWrapper.js";
|
|
5
|
+
import { ToastItem as v } from "../ToastItem/ToastItem.js";
|
|
6
|
+
const i = x(null), C = ({
|
|
7
|
+
children: r,
|
|
8
|
+
anchor: c = "top"
|
|
9
|
+
}) => {
|
|
10
|
+
const [m, e] = T([]), u = n((t) => {
|
|
11
|
+
e((o) => o.filter((s) => s.id !== t));
|
|
12
|
+
}, []), l = n((t, o = 4) => {
|
|
13
|
+
const s = `toast-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
14
|
+
e((d) => [...d, {
|
|
15
|
+
id: s,
|
|
16
|
+
message: t,
|
|
17
|
+
duration: o
|
|
18
|
+
}]);
|
|
19
|
+
}, []);
|
|
20
|
+
return /* @__PURE__ */ p(i.Provider, { value: { toast: l }, children: [
|
|
21
|
+
r,
|
|
22
|
+
/* @__PURE__ */ a(h, { anchor: c, children: m.map(({ id: t, message: o, duration: s }) => /* @__PURE__ */ a(
|
|
23
|
+
v,
|
|
24
|
+
{
|
|
25
|
+
id: t,
|
|
26
|
+
duration: s,
|
|
27
|
+
onClose: () => u(t),
|
|
28
|
+
children: o
|
|
29
|
+
},
|
|
30
|
+
t
|
|
31
|
+
)) })
|
|
32
|
+
] });
|
|
33
|
+
};
|
|
34
|
+
C.displayName = "ToastsProvider";
|
|
35
|
+
const j = () => {
|
|
36
|
+
const r = f(i);
|
|
37
|
+
if (!r)
|
|
38
|
+
throw new Error("useToasts must be used within a ToastsProvider");
|
|
39
|
+
return r.toast;
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
C as ToastsProvider,
|
|
43
|
+
j as useToasts
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=ToastsProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastsProvider.js","sources":["../../../../src/components/Toast/ToastsProvider/ToastsProvider.tsx"],"sourcesContent":["// REACT CORE ==========================================================================================================\nimport React, { createContext, useContext, useState, useCallback, ReactNode } from \"react\";\n\n// INTERNAL ============================================================================================================\nimport { ToastsWrapper } from \"../ToastsWrapper/ToastsWrapper\";\nimport { ToastItem } from \"../ToastItem/ToastItem\";\n\n// TYPES ===============================================================================================================\ninterface InternalToast {\n id : string;\n message : string;\n duration : number;\n}\n\n// prettier-ignore\nexport interface ToastsProviderProps {\n children : ReactNode;\n anchor ? : \"top\" | \"bottom\";\n}\n\n// TOAST FUNCTION TYPE =================================================================================================\nexport type ToastFunction = (message: string, duration?: number) => void;\n\ninterface ToastsContextValue {\n toast: ToastFunction;\n}\n\n// CONTEXT =============================================================================================================\nconst ToastsContext = createContext<ToastsContextValue | null>(null);\n\n// PROVIDER ============================================================================================================\nexport const ToastsProvider = ({\n children,\n anchor = \"top\",\n}: ToastsProviderProps) => {\n const [toasts, setToasts] = useState<InternalToast[]>([]);\n\n // Remove a toast by ID\n const removeToast = useCallback((id: string) => {\n setToasts(prev => prev.filter(t => t.id !== id));\n }, []);\n\n // Main toast function\n const toast: ToastFunction = useCallback((message: string, duration: number = 4) => {\n const id = `toast-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;\n\n setToasts(prev => [...prev, {\n id,\n message,\n duration,\n }]);\n }, []);\n\n return (\n <ToastsContext.Provider value={{ toast }}>\n {children}\n\n <ToastsWrapper anchor={anchor}>\n {toasts.map(({ id, message, duration }) => (\n <ToastItem\n key={id}\n id={id}\n duration={duration}\n onClose={() => removeToast(id)}\n >\n {message}\n </ToastItem>\n ))}\n </ToastsWrapper>\n </ToastsContext.Provider>\n );\n};\nToastsProvider.displayName = \"ToastsProvider\";\n\n// HOOK ================================================================================================================\nexport const useToasts = (): ToastFunction => {\n const context = useContext(ToastsContext);\n\n if (!context) {\n throw new Error(\"useToasts must be used within a ToastsProvider\");\n }\n\n return context.toast;\n};\n"],"names":["ToastsContext","createContext","ToastsProvider","children","anchor","toasts","setToasts","useState","removeToast","useCallback","id","prev","t","toast","message","duration","jsx","ToastsWrapper","ToastItem","useToasts","context","useContext"],"mappings":";;;;AA4BA,MAAMA,IAAgBC,EAAyC,IAAI,GAGtDC,IAAiB,CAAC;AAAA,EAC3B,UAAAC;AAAA,EACA,QAAAC,IAAS;AACb,MAA2B;AACvB,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAA0B,CAAA,CAAE,GAGlDC,IAAcC,EAAY,CAACC,MAAe;AAC5C,IAAAJ,EAAU,OAAQK,EAAK,OAAO,OAAKC,EAAE,OAAOF,CAAE,CAAC;AAAA,EACnD,GAAG,CAAA,CAAE,GAGCG,IAAuBJ,EAAY,CAACK,GAAiBC,IAAmB,MAAM;AAChF,UAAML,IAAK,SAAS,KAAK,IAAA,CAAK,IAAI,KAAK,OAAA,EAAS,SAAS,EAAE,EAAE,UAAU,GAAG,CAAC,CAAC;AAE5E,IAAAJ,EAAU,CAAAK,MAAQ,CAAC,GAAGA,GAAM;AAAA,MACxB,IAAAD;AAAA,MACA,SAAAI;AAAA,MACA,UAAAC;AAAA,IAAA,CACH,CAAC;AAAA,EACN,GAAG,CAAA,CAAE;AAEL,2BACKf,EAAc,UAAd,EAAuB,OAAO,EAAE,OAAAa,KAC5B,UAAA;AAAA,IAAAV;AAAA,IAED,gBAAAa,EAACC,GAAA,EAAc,QAAAb,GACV,UAAAC,EAAO,IAAI,CAAC,EAAE,IAAAK,GAAI,SAAAI,GAAS,UAAAC,EAAA,MACxB,gBAAAC;AAAA,MAACE;AAAA,MAAA;AAAA,QAEG,IAAAR;AAAA,QACA,UAAAK;AAAA,QACA,SAAS,MAAMP,EAAYE,CAAE;AAAA,QAE5B,UAAAI;AAAA,MAAA;AAAA,MALIJ;AAAA,IAAA,CAOZ,EAAA,CACL;AAAA,EAAA,GACJ;AAER;AACAR,EAAe,cAAc;AAGtB,MAAMiB,IAAY,MAAqB;AAC1C,QAAMC,IAAUC,EAAWrB,CAAa;AAExC,MAAI,CAACoB;AACD,UAAM,IAAI,MAAM,gDAAgD;AAGpE,SAAOA,EAAQ;AACnB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastsWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/ToastsWrapper/ToastsWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,sBAAsB,CAAC;AAM9B,MAAM,WAAW,wBAAwB;IACrC,MAAO,CAAC,EAAG,KAAK,GAAG,QAAQ,CAAC;CAC/B;AAED,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC;AACtD,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,wBAAwB,CAAC,GACzE,wBAAwB,CAAC;AAG7B,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"ToastsWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/ToastsWrapper/ToastsWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,sBAAsB,CAAC;AAM9B,MAAM,WAAW,wBAAwB;IACrC,MAAO,CAAC,EAAG,KAAK,GAAG,QAAQ,CAAC;CAC/B;AAED,MAAM,MAAM,wBAAwB,GAAG,cAAc,CAAC;AACtD,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,wBAAwB,CAAC,GACzE,wBAAwB,CAAC;AAG7B,eAAO,MAAM,aAAa,sIAyBzB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import t from "react";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { Element as p } from "../../Element/Element.js";
|
|
6
|
+
const n = t.forwardRef(
|
|
7
|
+
({
|
|
8
|
+
anchor: o = "top",
|
|
9
|
+
children: r,
|
|
10
|
+
...a
|
|
11
|
+
}, e) => t.Children.count(r) === 0 ? null : /* @__PURE__ */ s(
|
|
12
|
+
p,
|
|
13
|
+
{
|
|
14
|
+
as: "section",
|
|
15
|
+
"data-toasts-wrapper": !0,
|
|
16
|
+
ref: e,
|
|
17
|
+
classNames: [o],
|
|
18
|
+
"aria-label": "Toasts",
|
|
19
|
+
...a,
|
|
20
|
+
children: r
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
n.displayName = "ToastsWrapper";
|
|
25
|
+
export {
|
|
26
|
+
n as ToastsWrapper
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ToastsWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastsWrapper.js","sources":["../../../../src/components/Toast/ToastsWrapper/ToastsWrapper.tsx"],"sourcesContent":["// REACT CORE ==========================================================================================================\nimport React from \"react\";\n\n// ELEMENT =============================================================================================================\nimport { CommonAndHTMLProps } from \"../../Element/constants\";\n\n// STYLES ==============================================================================================================\nimport \"./toasts-wrapper.css\";\n\n// OTHER ===============================================================================================================\nimport { Element } from \"$element\";\n\n// prettier-ignore\nexport interface ToastsWrapperCustomProps {\n anchor ? : \"top\" | \"bottom\";\n}\n\nexport type ToastsWrapperElementType = HTMLDivElement;\nexport type ToastsWrapperProps = CommonAndHTMLProps<ToastsWrapperElementType> &\n ToastsWrapperCustomProps;\n\n// COMPONENT ///////////////////////////////////////////////////////////////////////////////////////////////////////////\nexport const ToastsWrapper = React.forwardRef(\n (\n {\n anchor = \"top\",\n children,\n ...props\n }: ToastsWrapperProps,\n ref: React.Ref<ToastsWrapperElementType>\n ) => {\n const childrenCount = React.Children.count(children);\n if (childrenCount === 0) return null;\n\n return (\n <Element<ToastsWrapperElementType>\n as=\"section\"\n data-toasts-wrapper\n ref={ref}\n classNames={[anchor]}\n aria-label=\"Toasts\"\n {...props}\n >\n {children}\n </Element>\n );\n }\n);\nToastsWrapper.displayName = \"ToastsWrapper\";\n"],"names":["ToastsWrapper","React","anchor","children","props","ref","jsx","Element"],"mappings":";;;;AAsBO,MAAMA,IAAgBC,EAAM;AAAA,EAC/B,CACI;AAAA,IACI,QAAAC,IAAS;AAAA,IACT,UAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAEPC,MAEsBJ,EAAM,SAAS,MAAME,CAAQ,MAC7B,IAAU,OAG5B,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACG,IAAG;AAAA,MACH,uBAAmB;AAAA,MACnB,KAAAF;AAAA,MACA,YAAY,CAACH,CAAM;AAAA,MACnB,cAAW;AAAA,MACV,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAIjB;AACAH,EAAc,cAAc;"}
|
|
@@ -9,6 +9,6 @@ export interface TooltipProps {
|
|
|
9
9
|
position?: Position;
|
|
10
10
|
zIndex?: number;
|
|
11
11
|
}
|
|
12
|
-
export declare const Tooltip: ({ children, isTooltipFor, showOn, position, zIndex, }: TooltipProps) =>
|
|
12
|
+
export declare const Tooltip: ({ children, isTooltipFor, showOn, position, zIndex, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export {};
|
|
14
14
|
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAc,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAc,EAAoB,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,eAAe,CAAC;AAGvB,KAAK,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AACpD,KAAK,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEhC,MAAM,WAAW,YAAY;IACzB,QAAQ,EAAO,SAAS,CAAC;IACzB,YAAY,EAAG,MAAM,CAAC;IACtB,MAAW,CAAC,EAAG,MAAM,CAAC;IACtB,QAAW,CAAC,EAAG,QAAQ,CAAC;IACxB,MAAW,CAAC,EAAG,MAAM,CAAC;CACzB;AAOD,eAAO,MAAM,OAAO,GAAI,uDAMrB,YAAY,4CAqFd,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as L } from "react/jsx-runtime";
|
|
3
|
+
import { useId as y, useEffect as g } from "react";
|
|
4
|
+
/* empty css */
|
|
5
|
+
const P = ({
|
|
6
|
+
children: h,
|
|
7
|
+
isTooltipFor: p,
|
|
8
|
+
showOn: c = "hover",
|
|
9
|
+
position: f = "top",
|
|
10
|
+
zIndex: m
|
|
11
|
+
}) => {
|
|
12
|
+
const u = y(), r = `tooltip-${u.replace(/:/g, "")}`, i = `--anchor-${u.replace(/:/g, "")}`;
|
|
13
|
+
return g(() => {
|
|
14
|
+
const e = document.getElementById(p), t = document.getElementById(r);
|
|
15
|
+
if (!e || !t) return;
|
|
16
|
+
e.style.setProperty("anchor-name", i), e.setAttribute("aria-describedby", r);
|
|
17
|
+
const n = () => {
|
|
18
|
+
t.matches(":popover-open") || t.showPopover();
|
|
19
|
+
}, o = () => {
|
|
20
|
+
t.matches(":popover-open") && t.hidePopover();
|
|
21
|
+
}, l = () => t.matches(":popover-open") ? o() : n(), a = [];
|
|
22
|
+
if (c === "hover")
|
|
23
|
+
e.addEventListener("mouseenter", n), e.addEventListener("mouseleave", o), e.addEventListener("focusin", n), e.addEventListener("focusout", o), a.push(() => {
|
|
24
|
+
e.removeEventListener("mouseenter", n), e.removeEventListener("mouseleave", o), e.removeEventListener("focusin", n), e.removeEventListener("focusout", o);
|
|
25
|
+
});
|
|
26
|
+
else {
|
|
27
|
+
e.addEventListener("click", l);
|
|
28
|
+
const s = (d) => {
|
|
29
|
+
const v = d.target;
|
|
30
|
+
v === e || e.contains(v) || t.contains(v) || o();
|
|
31
|
+
}, E = (d) => {
|
|
32
|
+
d.key === "Escape" && o();
|
|
33
|
+
};
|
|
34
|
+
document.addEventListener("click", s), document.addEventListener("keydown", E), a.push(() => {
|
|
35
|
+
e.removeEventListener("click", l), document.removeEventListener("click", s), document.removeEventListener("keydown", E);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return () => {
|
|
39
|
+
a.forEach((s) => s()), e.style.removeProperty("anchor-name"), e.removeAttribute("aria-describedby");
|
|
40
|
+
};
|
|
41
|
+
}, [p, c, r, i]), /* @__PURE__ */ L(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
id: r,
|
|
45
|
+
"data-tooltip": !0,
|
|
46
|
+
"data-position": f,
|
|
47
|
+
"data-show-on": c,
|
|
48
|
+
popover: "manual",
|
|
49
|
+
role: "tooltip",
|
|
50
|
+
style: {
|
|
51
|
+
// CSS anchor positioning: tie this popover to the target's anchor-name.
|
|
52
|
+
positionAnchor: i,
|
|
53
|
+
...m !== void 0 ? { zIndex: m } : {}
|
|
54
|
+
},
|
|
55
|
+
children: h
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
P as Tooltip
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["// REACT CORE ==========================================================================================================\nimport React, { useEffect, useId, ReactNode } from \"react\";\n\n// STYLES ==============================================================================================================\nimport \"./tooltip.css\";\n\n// TYPES ===============================================================================================================\ntype Position = \"top\" | \"bottom\" | \"left\" | \"right\";\ntype ShowOn = \"click\" | \"hover\";\n\nexport interface TooltipProps {\n children : ReactNode;\n isTooltipFor : string;\n showOn ? : ShowOn;\n position ? : Position;\n zIndex ? : number;\n}\n\n// COMPONENT ===========================================================================================================\n// Each Tooltip is its own popover. Show/hide goes through the native popover\n// API; placement uses CSS anchor positioning (anchor-name / position-anchor +\n// position-area), so there's no JS getBoundingClientRect math, no scroll/resize\n// listeners, no shared singleton DOM node.\nexport const Tooltip = ({\n children,\n isTooltipFor,\n showOn = \"hover\",\n position = \"top\",\n zIndex,\n}: TooltipProps) => {\n const reactId = useId();\n const tooltipId = `tooltip-${reactId.replace(/:/g, \"\")}`;\n const anchorName = `--anchor-${reactId.replace(/:/g, \"\")}`;\n\n useEffect(() => {\n const target = document.getElementById(isTooltipFor);\n const tooltip = document.getElementById(tooltipId) as HTMLElement | null;\n if (!target || !tooltip) return;\n\n // Brand the target as the anchor. We set this dynamically rather than\n // requiring the caller to add the anchor-name themselves.\n target.style.setProperty(\"anchor-name\", anchorName);\n // Link the target to the tooltip for assistive tech (WCAG 4.1.2).\n target.setAttribute(\"aria-describedby\", tooltipId);\n\n const show = () => {\n if (!tooltip.matches(\":popover-open\")) tooltip.showPopover();\n };\n const hide = () => {\n if (tooltip.matches(\":popover-open\")) tooltip.hidePopover();\n };\n const toggle = () => (tooltip.matches(\":popover-open\") ? hide() : show());\n\n const cleanups: Array<() => void> = [];\n\n if (showOn === \"hover\") {\n // Pointer + keyboard parity. focusin/focusout cover keyboard users\n // who tab to the target.\n target.addEventListener(\"mouseenter\", show);\n target.addEventListener(\"mouseleave\", hide);\n target.addEventListener(\"focusin\", show);\n target.addEventListener(\"focusout\", hide);\n cleanups.push(() => {\n target.removeEventListener(\"mouseenter\", show);\n target.removeEventListener(\"mouseleave\", hide);\n target.removeEventListener(\"focusin\", show);\n target.removeEventListener(\"focusout\", hide);\n });\n } else {\n // click: toggle on target click, close on click anywhere else\n // (manual light-dismiss because popover=\"auto\" interacts badly with\n // re-toggling from the same target).\n target.addEventListener(\"click\", toggle);\n const handleOutside = (e: MouseEvent) => {\n const node = e.target as Node;\n if (node === target || target.contains(node) || tooltip.contains(node)) return;\n hide();\n };\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") hide();\n };\n document.addEventListener(\"click\", handleOutside);\n document.addEventListener(\"keydown\", handleEscape);\n cleanups.push(() => {\n target.removeEventListener(\"click\", toggle);\n document.removeEventListener(\"click\", handleOutside);\n document.removeEventListener(\"keydown\", handleEscape);\n });\n }\n\n return () => {\n cleanups.forEach((fn) => fn());\n target.style.removeProperty(\"anchor-name\");\n target.removeAttribute(\"aria-describedby\");\n };\n }, [ isTooltipFor, showOn, tooltipId, anchorName ]);\n\n return (\n <div\n id={tooltipId}\n data-tooltip\n data-position={position}\n data-show-on={showOn}\n popover=\"manual\"\n role=\"tooltip\"\n style={{\n // CSS anchor positioning: tie this popover to the target's anchor-name.\n [\"positionAnchor\" as keyof React.CSSProperties]: anchorName,\n ...(zIndex !== undefined ? { zIndex } : {}),\n } as React.CSSProperties}\n >\n {children}\n </div>\n );\n};\n"],"names":["Tooltip","children","isTooltipFor","showOn","position","zIndex","reactId","useId","tooltipId","anchorName","useEffect","target","tooltip","show","hide","toggle","cleanups","handleOutside","e","node","handleEscape","fn","jsx"],"mappings":";;;AAuBO,MAAMA,IAAU,CAAC;AAAA,EACpB,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,QAAAC,IAAW;AAAA,EACX,UAAAC,IAAW;AAAA,EACX,QAAAC;AACJ,MAAoB;AAChB,QAAMC,IAAYC,EAAA,GACZC,IAAY,WAAWF,EAAQ,QAAQ,MAAM,EAAE,CAAC,IAChDG,IAAa,YAAYH,EAAQ,QAAQ,MAAM,EAAE,CAAC;AAExD,SAAAI,EAAU,MAAM;AACZ,UAAMC,IAAS,SAAS,eAAeT,CAAY,GAC7CU,IAAU,SAAS,eAAeJ,CAAS;AACjD,QAAI,CAACG,KAAU,CAACC,EAAS;AAIzB,IAAAD,EAAO,MAAM,YAAY,eAAeF,CAAU,GAElDE,EAAO,aAAa,oBAAoBH,CAAS;AAEjD,UAAMK,IAAO,MAAM;AACf,MAAKD,EAAQ,QAAQ,eAAe,OAAW,YAAA;AAAA,IACnD,GACME,IAAO,MAAM;AACf,MAAIF,EAAQ,QAAQ,eAAe,OAAW,YAAA;AAAA,IAClD,GACMG,IAAS,MAAOH,EAAQ,QAAQ,eAAe,IAAIE,EAAA,IAASD,EAAA,GAE5DG,IAA8B,CAAA;AAEpC,QAAIb,MAAW;AAGX,MAAAQ,EAAO,iBAAiB,cAAcE,CAAI,GAC1CF,EAAO,iBAAiB,cAAcG,CAAI,GAC1CH,EAAO,iBAAiB,WAAWE,CAAI,GACvCF,EAAO,iBAAiB,YAAYG,CAAI,GACxCE,EAAS,KAAK,MAAM;AAChB,QAAAL,EAAO,oBAAoB,cAAcE,CAAI,GAC7CF,EAAO,oBAAoB,cAAcG,CAAI,GAC7CH,EAAO,oBAAoB,WAAWE,CAAI,GAC1CF,EAAO,oBAAoB,YAAYG,CAAI;AAAA,MAC/C,CAAC;AAAA,SACE;AAIH,MAAAH,EAAO,iBAAiB,SAASI,CAAM;AACvC,YAAME,IAAgB,CAACC,MAAkB;AACrC,cAAMC,IAAOD,EAAE;AACf,QAAIC,MAASR,KAAUA,EAAO,SAASQ,CAAI,KAAKP,EAAQ,SAASO,CAAI,KACrEL,EAAA;AAAA,MACJ,GACMM,IAAe,CAACF,MAAqB;AACvC,QAAIA,EAAE,QAAQ,YAAUJ,EAAA;AAAA,MAC5B;AACA,eAAS,iBAAiB,SAASG,CAAa,GAChD,SAAS,iBAAiB,WAAWG,CAAY,GACjDJ,EAAS,KAAK,MAAM;AAChB,QAAAL,EAAO,oBAAoB,SAASI,CAAM,GAC1C,SAAS,oBAAoB,SAASE,CAAa,GACnD,SAAS,oBAAoB,WAAWG,CAAY;AAAA,MACxD,CAAC;AAAA,IACL;AAEA,WAAO,MAAM;AACT,MAAAJ,EAAS,QAAQ,CAACK,MAAOA,EAAA,CAAI,GAC7BV,EAAO,MAAM,eAAe,aAAa,GACzCA,EAAO,gBAAgB,kBAAkB;AAAA,IAC7C;AAAA,EACJ,GAAG,CAAET,GAAcC,GAAQK,GAAWC,CAAW,CAAC,GAG9C,gBAAAa;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,IAAId;AAAA,MACJ,gBAAY;AAAA,MACZ,iBAAeJ;AAAA,MACf,gBAAcD;AAAA,MACd,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAO;AAAA;AAAA,QAEF,gBAAgDM;AAAA,QACjD,GAAIJ,MAAW,SAAY,EAAE,QAAAA,MAAW,CAAA;AAAA,MAAC;AAAA,MAG5C,UAAAJ;AAAA,IAAA;AAAA,EAAA;AAGb;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import d from "react";
|
|
4
|
+
import { Element as t } from "../Element/Element.js";
|
|
5
|
+
const i = d.forwardRef(
|
|
6
|
+
({ fontStyle: a = "sans-serif", weight: e, align: n, ...f }, o) => {
|
|
7
|
+
let r = [];
|
|
8
|
+
return e && r.push(`weight-${e}`), a && r.push(`font-${a}`), n && r.push(`text-${n}`), /* @__PURE__ */ s(t, { ref: o, classNames: r, ...f });
|
|
9
|
+
}
|
|
10
|
+
), m = d.forwardRef((a, e) => /* @__PURE__ */ s(i, { as: "h1", ref: e, ...a }));
|
|
11
|
+
m.displayName = "Heading1";
|
|
12
|
+
const p = d.forwardRef((a, e) => /* @__PURE__ */ s(i, { as: "h2", ref: e, ...a }));
|
|
13
|
+
p.displayName = "Heading2";
|
|
14
|
+
const H = d.forwardRef((a, e) => /* @__PURE__ */ s(i, { as: "h3", ref: e, ...a }));
|
|
15
|
+
H.displayName = "Heading3";
|
|
16
|
+
const g = d.forwardRef((a, e) => /* @__PURE__ */ s(i, { as: "h4", ref: e, ...a }));
|
|
17
|
+
g.displayName = "Heading4";
|
|
18
|
+
const c = d.forwardRef((a, e) => /* @__PURE__ */ s(i, { as: "h5", ref: e, ...a }));
|
|
19
|
+
c.displayName = "Heading5";
|
|
20
|
+
const h = d.forwardRef((a, e) => /* @__PURE__ */ s(i, { as: "h6", ref: e, ...a }));
|
|
21
|
+
h.displayName = "Heading6";
|
|
22
|
+
export {
|
|
23
|
+
m as Heading1,
|
|
24
|
+
p as Heading2,
|
|
25
|
+
H as Heading3,
|
|
26
|
+
g as Heading4,
|
|
27
|
+
c as Heading5,
|
|
28
|
+
h as Heading6
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=Heading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Heading.js","sources":["../../../src/components/Typography/Heading.tsx"],"sourcesContent":["// FRAMEWORK ===========================================================================================================\nimport React from \"react\";\n\n// FICTOAN =============================================================================================================\nimport { Element } from \"../Element\";\n\n// TYPES ===============================================================================================================\nimport { CommonAndHTMLProps, WeightTypes } from \"../Element/constants\";\n\n// prettier-ignore\ninterface HeadingBaseProps {\n as ? : \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n fontStyle ? : \"sans-serif\" | \"serif\" | \"monospace\";\n weight ? : WeightTypes;\n align ? : \"left\" | \"centre\" | \"center\" | \"right\";\n}\n\nexport type HeadingElementType = HTMLHeadingElement;\nexport type HeadingProps = Omit<CommonAndHTMLProps<HeadingElementType>, keyof HeadingBaseProps> & HeadingBaseProps;\n\n// COMPONENT ///////////////////////////////////////////////////////////////////////////////////////////////////////////\nconst Heading = React.forwardRef(\n ({ fontStyle = \"sans-serif\", weight, align, ...props }: HeadingProps, ref: React.Ref<HeadingElementType>) => {\n let classNames = [];\n\n if (weight) {\n classNames.push(`weight-${weight}`);\n }\n\n if (fontStyle) {\n classNames.push(`font-${fontStyle}`);\n }\n\n if (align) {\n classNames.push(`text-${align}`);\n }\n\n return <Element<HeadingElementType> ref={ref} classNames={classNames} {...props} />;\n }\n);\n\nexport const Heading1 = React.forwardRef((props: HeadingProps, ref: React.Ref<HeadingElementType>) => (\n <Heading as=\"h1\" ref={ref} {...props} />\n));\nHeading1.displayName = \"Heading1\";\n\nexport const Heading2 = React.forwardRef((props: HeadingProps, ref: React.Ref<HeadingElementType>) => (\n <Heading as=\"h2\" ref={ref} {...props} />\n));\nHeading2.displayName = \"Heading2\";\n\nexport const Heading3 = React.forwardRef((props: HeadingProps, ref: React.Ref<HeadingElementType>) => (\n <Heading as=\"h3\" ref={ref} {...props} />\n));\nHeading3.displayName = \"Heading3\";\n\nexport const Heading4 = React.forwardRef((props: HeadingProps, ref: React.Ref<HeadingElementType>) => (\n <Heading as=\"h4\" ref={ref} {...props} />\n));\nHeading4.displayName = \"Heading4\";\n\nexport const Heading5 = React.forwardRef((props: HeadingProps, ref: React.Ref<HeadingElementType>) => (\n <Heading as=\"h5\" ref={ref} {...props} />\n));\nHeading5.displayName = \"Heading5\";\n\nexport const Heading6 = React.forwardRef((props: HeadingProps, ref: React.Ref<HeadingElementType>) => (\n <Heading as=\"h6\" ref={ref} {...props} />\n));\nHeading6.displayName = \"Heading6\";\n"],"names":["Heading","React","fontStyle","weight","align","props","ref","classNames","jsx","Element","Heading1","Heading2","Heading3","Heading4","Heading5","Heading6"],"mappings":";;;AAqBA,MAAMA,IAAUC,EAAM;AAAA,EAClB,CAAC,EAAE,WAAAC,IAAY,cAAc,QAAAC,GAAQ,OAAAC,GAAO,GAAGC,EAAA,GAAuBC,MAAuC;AACzG,QAAIC,IAAa,CAAA;AAEjB,WAAIJ,KACAI,EAAW,KAAK,UAAUJ,CAAM,EAAE,GAGlCD,KACAK,EAAW,KAAK,QAAQL,CAAS,EAAE,GAGnCE,KACAG,EAAW,KAAK,QAAQH,CAAK,EAAE,GAG5B,gBAAAI,EAACC,GAAA,EAA4B,KAAAH,GAAU,YAAAC,GAAyB,GAAGF,GAAO;AAAA,EACrF;AACJ,GAEaK,IAAWT,EAAM,WAAW,CAACI,GAAqBC,MAC3D,gBAAAE,EAACR,GAAA,EAAQ,IAAG,MAAK,KAAAM,GAAW,GAAGD,GAAO,CACzC;AACDK,EAAS,cAAc;AAEhB,MAAMC,IAAWV,EAAM,WAAW,CAACI,GAAqBC,MAC3D,gBAAAE,EAACR,GAAA,EAAQ,IAAG,MAAK,KAAAM,GAAW,GAAGD,GAAO,CACzC;AACDM,EAAS,cAAc;AAEhB,MAAMC,IAAWX,EAAM,WAAW,CAACI,GAAqBC,MAC3D,gBAAAE,EAACR,GAAA,EAAQ,IAAG,MAAK,KAAAM,GAAW,GAAGD,GAAO,CACzC;AACDO,EAAS,cAAc;AAEhB,MAAMC,IAAWZ,EAAM,WAAW,CAACI,GAAqBC,MAC3D,gBAAAE,EAACR,GAAA,EAAQ,IAAG,MAAK,KAAAM,GAAW,GAAGD,GAAO,CACzC;AACDQ,EAAS,cAAc;AAEhB,MAAMC,IAAWb,EAAM,WAAW,CAACI,GAAqBC,MAC3D,gBAAAE,EAACR,GAAA,EAAQ,IAAG,MAAK,KAAAM,GAAW,GAAGD,GAAO,CACzC;AACDS,EAAS,cAAc;AAEhB,MAAMC,IAAWd,EAAM,WAAW,CAACI,GAAqBC,MAC3D,gBAAAE,EAACR,GAAA,EAAQ,IAAG,MAAK,KAAAM,GAAW,GAAGD,GAAO,CACzC;AACDU,EAAS,cAAc;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import a from "react";
|
|
4
|
+
import { Element as u } from "../Element/Element.js";
|
|
5
|
+
const x = a.forwardRef(
|
|
6
|
+
({ weight: s, size: e, fontStyle: r = "sans-serif", align: f, isSubtext: p, ...m }, o) => {
|
|
7
|
+
let t = [];
|
|
8
|
+
return s && t.push(`weight-${s}`), e && t.push(`text-${e}`), r && t.push(`font-${r}`), p && t.push("sub-text"), f && t.push(`text-${f}`), /* @__PURE__ */ i(u, { as: "p", ref: o, classNames: t, ...m });
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
x.displayName = "Text";
|
|
12
|
+
export {
|
|
13
|
+
x as Text
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../src/components/Typography/Text.tsx"],"sourcesContent":["// REACT CORE ==========================================================================================================\nimport React from \"react\";\n\n// LOCAL COMPONENTS ====================================================================================================\nimport { CommonAndHTMLProps, SpacingTypes, WeightTypes } from \"../Element/constants\";\nimport { Element } from \"$element\";\n\n// prettier-ignore\nexport interface TextCustomProps {\n fontStyle ? : \"sans-serif\" | \"serif\" | \"monospace\";\n weight ? : WeightTypes;\n size ? : SpacingTypes;\n align ? : \"left\" | \"centre\" | \"center\" | \"right\";\n isSubtext ? : boolean;\n}\n\nexport type TextElementType = HTMLParagraphElement;\nexport type TextProps = Omit<CommonAndHTMLProps<TextElementType>, keyof TextCustomProps> & TextCustomProps;\n\nexport const Text = React.forwardRef(\n (\n {weight, size, fontStyle = \"sans-serif\", align, isSubtext, ...props} : TextProps,\n ref : React.Ref<TextElementType>,\n ) => {\n let classNames = [];\n\n if (weight) {\n classNames.push(`weight-${weight}`);\n }\n\n if (size) {\n classNames.push(`text-${size}`);\n }\n\n if (fontStyle) {\n classNames.push(`font-${fontStyle}`);\n }\n\n if (isSubtext) {\n classNames.push(\"sub-text\");\n }\n\n if (align) {\n classNames.push(`text-${align}`);\n }\n\n return <Element<TextElementType> as=\"p\" ref={ref} classNames={classNames} {...props} />;\n },\n);\nText.displayName = \"Text\";\n"],"names":["Text","React","weight","size","fontStyle","align","isSubtext","props","ref","classNames","Element"],"mappings":";;;AAmBO,MAAMA,IAAOC,EAAM;AAAA,EACtB,CACI,EAAC,QAAAC,GAAQ,MAAAC,GAAM,WAAAC,IAAY,cAAc,OAAAC,GAAO,WAAAC,GAAW,GAAGC,EAAA,GAC9DC,MACC;AACD,QAAIC,IAAa,CAAA;AAEjB,WAAIP,KACAO,EAAW,KAAK,UAAUP,CAAM,EAAE,GAGlCC,KACAM,EAAW,KAAK,QAAQN,CAAI,EAAE,GAG9BC,KACAK,EAAW,KAAK,QAAQL,CAAS,EAAE,GAGnCE,KACAG,EAAW,KAAK,UAAU,GAG1BJ,KACAI,EAAW,KAAK,QAAQJ,CAAK,EAAE,qBAG3BK,GAAA,EAAyB,IAAG,KAAI,KAAAF,GAAU,YAAAC,GAAyB,GAAGF,GAAO;AAAA,EACzF;AACJ;AACAP,EAAK,cAAc;"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,80 +1,129 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import {
|
|
2
|
+
import { Accordion as e } from "./Accordion/Accordion.js";
|
|
3
|
+
import { Badge as p } from "./Badge/Badge.js";
|
|
4
|
+
import { Drawer as x } from "./Drawer/Drawer.js";
|
|
5
|
+
import { Button as i } from "./Button/Button.js";
|
|
6
|
+
import { ButtonGroup as n } from "./ButtonGroup/ButtonGroup.js";
|
|
7
|
+
import { Breadcrumbs as u } from "./Breadcrumbs/Breadcrumbs.js";
|
|
8
|
+
import { Callout as l } from "./Callout/Callout.js";
|
|
9
|
+
import { Card as S } from "./Card/Card.js";
|
|
10
|
+
import { CodeBlock as g } from "./CodeBlock/CodeBlock.js";
|
|
11
|
+
import { Divider as T } from "./Divider/Divider.js";
|
|
12
|
+
import { Element as G } from "./Element/Element.js";
|
|
13
|
+
import { Article as F, Aside as P, Body as h, Div as k, Footer as v, Header as I, Hyperlink as R, Main as w, Nav as A, Section as O, Span as D } from "./Element/Tags.js";
|
|
14
|
+
import { Checkbox as N } from "./Form/Checkbox/Checkbox.js";
|
|
15
|
+
import { CheckboxGroup as L, SwitchGroup as W } from "./Form/Checkbox/CheckboxAndSwitchGroup.js";
|
|
16
|
+
import { FileUpload as U } from "./Form/FileUpload/FileUpload.js";
|
|
17
|
+
import { Form as q } from "./Form/Form/Form.js";
|
|
18
|
+
import { FormItem as J } from "./Form/FormItem/FormItem.js";
|
|
19
|
+
import { FormItemGroup as Q } from "./Form/FormItemGroup/FormItemGroup.js";
|
|
20
|
+
import { InputField as X } from "./Form/InputField/InputField.js";
|
|
21
|
+
import { InputLabel as Z } from "./Form/InputLabel/InputLabel.js";
|
|
22
|
+
import { ListBox as $ } from "./Form/ListBox/ListBox.js";
|
|
23
|
+
import { PinInputField as ro } from "./Form/PinInputField/PinInputField.js";
|
|
24
|
+
import { RadioButton as to } from "./Form/RadioButton/RadioButton.js";
|
|
25
|
+
import { RadioGroup as mo } from "./Form/RadioButton/RadioGroup.js";
|
|
26
|
+
import { RadioTabGroup as fo } from "./Form/RadioButton/RadioTabGroup.js";
|
|
27
|
+
import { Range as ao } from "./Form/Range/Range.js";
|
|
28
|
+
import { Select as uo } from "./Form/Select/Select.js";
|
|
29
|
+
import { Switch as lo } from "./Form/Checkbox/Switch.js";
|
|
30
|
+
import { TextArea as So } from "./Form/TextArea/TextArea.js";
|
|
31
|
+
import { Meter as go } from "./Meter/Meter.js";
|
|
32
|
+
import { Modal as To } from "./Modal/Modal.js";
|
|
33
|
+
import { NotificationsProvider as Go, useNotifications as Ho } from "./Notification/NotificationsProvider/NotificationsProvider.js";
|
|
34
|
+
import { Pagination as Po } from "./Pagination/Pagination.js";
|
|
35
|
+
import { Portion as ko } from "./Portion/Portion.js";
|
|
36
|
+
import { ProgressBar as Io } from "./ProgressBar/ProgressBar.js";
|
|
37
|
+
import { Row as wo } from "./Row/Row.js";
|
|
38
|
+
import { OptionCard as Oo, OptionCardsGroup as Do, useOptionCard as Mo, useOptionCardsGroup as No } from "./OptionCard/OptionCard.js";
|
|
39
|
+
import { SidebarWrapper as Lo } from "./Sidebar/SidebarWrapper/SidebarWrapper.js";
|
|
40
|
+
import { ContentWrapper as Eo } from "./Sidebar/ContentWrapper/ContentWrapper.js";
|
|
41
|
+
import { SidebarHeader as jo } from "./Sidebar/SidebarHeader/SidebarHeader.js";
|
|
42
|
+
import { SidebarItem as zo } from "./Sidebar/SidebarItem/SidebarItem.js";
|
|
43
|
+
import { SidebarFooter as Ko } from "./Sidebar/SidebarFooter/SidebarFooter.js";
|
|
44
|
+
import { Skeleton as Vo, SkeletonGroup as Xo } from "./Skeleton/Skeleton.js";
|
|
45
|
+
import { Spinner as Zo } from "./Spinner/Spinner.js";
|
|
46
|
+
import { Table as $o } from "./Table/Table.js";
|
|
47
|
+
import { Tabs as rr } from "./Tabs/Tabs.js";
|
|
48
|
+
import { ThemeProvider as tr, useTheme as pr } from "./ThemeProvider/ThemeProvider.js";
|
|
49
|
+
import { ToastsProvider as xr, useToasts as fr } from "./Toast/ToastsProvider/ToastsProvider.js";
|
|
50
|
+
import { Tooltip as ar } from "./Tooltip/Tooltip.js";
|
|
51
|
+
import { Heading1 as dr, Heading2 as ur, Heading3 as sr, Heading4 as lr, Heading5 as cr, Heading6 as Sr } from "./Typography/Heading.js";
|
|
52
|
+
import { Text as gr } from "./Typography/Text.js";
|
|
4
53
|
export {
|
|
5
54
|
e as Accordion,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
55
|
+
F as Article,
|
|
56
|
+
P as Aside,
|
|
57
|
+
p as Badge,
|
|
58
|
+
h as Body,
|
|
59
|
+
u as Breadcrumbs,
|
|
60
|
+
i as Button,
|
|
61
|
+
n as ButtonGroup,
|
|
62
|
+
l as Callout,
|
|
63
|
+
S as Card,
|
|
64
|
+
N as Checkbox,
|
|
65
|
+
L as CheckboxGroup,
|
|
66
|
+
g as CodeBlock,
|
|
67
|
+
Eo as ContentWrapper,
|
|
68
|
+
k as Div,
|
|
69
|
+
T as Divider,
|
|
70
|
+
x as Drawer,
|
|
71
|
+
G as Element,
|
|
72
|
+
U as FileUpload,
|
|
73
|
+
v as Footer,
|
|
74
|
+
q as Form,
|
|
75
|
+
J as FormItem,
|
|
76
|
+
Q as FormItemGroup,
|
|
77
|
+
I as Header,
|
|
78
|
+
dr as Heading1,
|
|
79
|
+
ur as Heading2,
|
|
80
|
+
sr as Heading3,
|
|
81
|
+
lr as Heading4,
|
|
82
|
+
cr as Heading5,
|
|
83
|
+
Sr as Heading6,
|
|
84
|
+
R as Hyperlink,
|
|
85
|
+
X as InputField,
|
|
86
|
+
Z as InputLabel,
|
|
87
|
+
$ as ListBox,
|
|
88
|
+
w as Main,
|
|
89
|
+
go as Meter,
|
|
90
|
+
To as Modal,
|
|
91
|
+
A as Nav,
|
|
92
|
+
Go as NotificationsProvider,
|
|
93
|
+
Oo as OptionCard,
|
|
94
|
+
Do as OptionCardsGroup,
|
|
95
|
+
Po as Pagination,
|
|
96
|
+
ro as PinInputField,
|
|
97
|
+
ko as Portion,
|
|
98
|
+
Io as ProgressBar,
|
|
99
|
+
to as RadioButton,
|
|
100
|
+
mo as RadioGroup,
|
|
101
|
+
fo as RadioTabGroup,
|
|
102
|
+
ao as Range,
|
|
103
|
+
wo as Row,
|
|
104
|
+
O as Section,
|
|
105
|
+
uo as Select,
|
|
106
|
+
Ko as SidebarFooter,
|
|
107
|
+
jo as SidebarHeader,
|
|
108
|
+
zo as SidebarItem,
|
|
109
|
+
Lo as SidebarWrapper,
|
|
110
|
+
Vo as Skeleton,
|
|
111
|
+
Xo as SkeletonGroup,
|
|
112
|
+
D as Span,
|
|
113
|
+
Zo as Spinner,
|
|
114
|
+
lo as Switch,
|
|
115
|
+
W as SwitchGroup,
|
|
116
|
+
$o as Table,
|
|
117
|
+
rr as Tabs,
|
|
118
|
+
gr as Text,
|
|
119
|
+
So as TextArea,
|
|
120
|
+
tr as ThemeProvider,
|
|
121
|
+
xr as ToastsProvider,
|
|
122
|
+
ar as Tooltip,
|
|
123
|
+
Ho as useNotifications,
|
|
124
|
+
Mo as useOptionCard,
|
|
125
|
+
No as useOptionCardsGroup,
|
|
126
|
+
pr as useTheme,
|
|
127
|
+
fr as useToasts
|
|
79
128
|
};
|
|
80
129
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|