@konstructio/ui 0.0.12-alpha.0 → 0.0.12-alpha.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.
- package/dist/{Combination-Cmu9JRkv.js → Combination-b348x__d.js} +89 -89
- package/dist/Modal-DZUwNzSW.js +914 -0
- package/dist/{chevron-up-CvquEaNg.js → chevron-up-DgLBQCKD.js} +1 -1
- package/dist/components/Alert/Alert.js +58 -0
- package/dist/components/Alert/Alert.variants.js +77 -0
- package/dist/components/AlertDialog/AlertDialog.js +20 -23
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +3 -6
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +15 -17
- package/dist/components/Autocomplete/components/List/List.js +7 -7
- package/dist/components/Breadcrumb/Breadcrumb.js +68 -69
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +16 -17
- package/dist/components/Breadcrumb/components/Item/Item.js +61 -0
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +90 -0
- package/dist/components/Breadcrumb/components/index.js +4 -0
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +2 -3
- package/dist/components/Button/Button.js +15 -17
- package/dist/components/Card/Card.js +11 -13
- package/dist/components/Checkbox/Checkbox.js +16 -18
- package/dist/components/Divider/Divider.js +10 -0
- package/dist/components/Divider/Divider.variants.js +14 -0
- package/dist/components/Dropdown/Dropdown.js +4 -6
- package/dist/components/Dropdown/components/List/List.js +9 -10
- package/dist/components/Dropdown/components/ListItem/ListItem.js +20 -21
- package/dist/components/Dropdown/components/Wrapper.js +31 -34
- package/dist/components/Dropdown/contexts/dropdown.provider.js +4 -4
- package/dist/components/Dropdown/hooks/useDropdown.js +12 -14
- package/dist/components/Dropdown/hooks/useNavigationList.js +8 -10
- package/dist/components/Input/Input.js +12 -14
- package/dist/components/Loading/Loading.js +28 -0
- package/dist/components/Loading/Loading.variants.js +20 -0
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +7 -9
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/contexts/Modal.provider.js +4 -4
- package/dist/components/NumberInput/NumberInput.js +9 -11
- package/dist/components/ProgressBar/ProgressBar.js +12 -15
- package/dist/components/Radio/Radio.js +55 -37
- package/dist/components/Radio/Radio.variants.js +69 -16
- package/dist/components/RadioCard/RadioCard.js +41 -0
- package/dist/components/RadioCard/RadioCard.variants.js +19 -0
- package/dist/components/RadioCardGroup/RadioCardGroup.js +47 -0
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +21 -0
- package/dist/components/RadioGroup/RadioGroup.js +37 -27
- package/dist/components/RadioGroup/RadioGroup.variants.js +21 -0
- package/dist/components/Range/Range.js +20 -22
- package/dist/components/Sidebar/Sidebar.js +20 -22
- package/dist/components/Sidebar/components/Footer/Footer.js +9 -12
- package/dist/components/Sidebar/components/Logo/Logo.js +9 -12
- package/dist/components/Sidebar/components/Navigation/Navigation.js +12 -15
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +12 -15
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +17 -20
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +8 -11
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +10 -13
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +29 -27
- package/dist/components/Slider/Slider.js +11 -13
- package/dist/components/Switch/Switch.js +28 -30
- package/dist/components/TagSelect/TagSelect.js +18 -20
- package/dist/components/TextArea/TextArea.js +17 -19
- package/dist/components/Toast/Toast.js +56 -58
- package/dist/components/Tooltip/Tooltip.js +10 -12
- package/dist/components/Typography/Typography.js +30 -0
- package/dist/components/Typography/Typography.variants.js +36 -0
- package/dist/components/index.js +64 -50
- package/dist/contexts/theme.provider.js +84 -14
- package/dist/{AlertDialogTrigger-D4Tm_9M0.js → index-3jTPaVvh.js} +25 -27
- package/dist/{index-BxeV34ij.js → index-4ecjw_Aj.js} +1 -1
- package/dist/{index-BedjZUuB.js → index-B33at13_.js} +3 -3
- package/dist/{index-BaNV0qac.js → index-BTeAm7mx.js} +7113 -7144
- package/dist/index-B_6_jmOO.js +68 -0
- package/dist/{index-BBjak_0p.js → index-BbsJ0VIJ.js} +2 -2
- package/dist/{index-D68N8v8R.js → index-C5psggHV.js} +17 -17
- package/dist/{index-z-AJyzdv.js → index-C6WtlN_F.js} +11 -11
- package/dist/{index-8vgf-x5i.js → index-Cva-e5M4.js} +2 -2
- package/dist/{index-D4Q2rMby.js → index-Dj1pom3_.js} +2 -2
- package/dist/{index-BtibbG81.js → index-Z1voPZOH.js} +1 -1
- package/dist/index.d.ts +561 -4
- package/dist/index.js +74 -60
- package/dist/package.json +27 -28
- package/dist/plugins/konstruct.js +34 -31
- package/dist/plugins/utils/animation.styles.js +162 -0
- package/dist/plugins/utils/index.js +7 -0
- package/dist/styles.css +1 -1
- package/dist/styles.js +1 -1
- package/dist/useBreadcrumb-BsIeMoR1.js +1279 -0
- package/dist/{x-CRBgmX1Q.js → x-DU-Zw-L_.js} +1 -1
- package/package.json +27 -28
- package/dist/Modal-L73dmnHv.js +0 -914
- package/dist/components/AlertDialog/AlertDialog.d.ts +0 -3
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +0 -18
- package/dist/components/AlertDialog/AlertDialog.types.js +0 -1
- package/dist/components/AlertDialog/AlertDialog.variants.d.ts +0 -3
- package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +0 -3
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +0 -6
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.js +0 -1
- package/dist/components/AlertDialog/components/index.d.ts +0 -1
- package/dist/components/AlertDialog/hooks/index.d.ts +0 -1
- package/dist/components/AlertDialog/hooks/useAlertDialog.d.ts +0 -7
- package/dist/components/Autocomplete/Autocomplete.d.ts +0 -3
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +0 -18
- package/dist/components/Autocomplete/Autocomplete.types.js +0 -1
- package/dist/components/Autocomplete/Autocomplete.variants.d.ts +0 -8
- package/dist/components/Autocomplete/components/List/List.d.ts +0 -3
- package/dist/components/Autocomplete/components/List/List.types.d.ts +0 -13
- package/dist/components/Autocomplete/components/List/List.types.js +0 -1
- package/dist/components/Autocomplete/components/List/List.variants.d.ts +0 -16
- package/dist/components/Autocomplete/components/index.d.ts +0 -1
- package/dist/components/Autocomplete/hooks/index.d.ts +0 -2
- package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +0 -17
- package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +0 -10
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +0 -3
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +0 -11
- package/dist/components/Breadcrumb/Breadcrumb.types.js +0 -1
- package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +0 -12
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.d.ts +0 -3
- package/dist/components/Button/Button.d.ts +0 -4
- package/dist/components/Button/Button.types.d.ts +0 -7
- package/dist/components/Button/Button.types.js +0 -1
- package/dist/components/Button/Button.variants.d.ts +0 -7
- package/dist/components/Card/Card.d.ts +0 -4
- package/dist/components/Card/Card.types.d.ts +0 -8
- package/dist/components/Card/Card.types.js +0 -1
- package/dist/components/Card/Card.variants.d.ts +0 -10
- package/dist/components/Checkbox/Checkbox.d.ts +0 -3
- package/dist/components/Checkbox/Checkbox.types.d.ts +0 -14
- package/dist/components/Checkbox/Checkbox.types.js +0 -1
- package/dist/components/Checkbox/Checkbox.variants.d.ts +0 -9
- package/dist/components/Dropdown/Dropdown.d.ts +0 -3
- package/dist/components/Dropdown/Dropdown.types.d.ts +0 -16
- package/dist/components/Dropdown/Dropdown.types.js +0 -1
- package/dist/components/Dropdown/Dropdown.variants.d.ts +0 -3
- package/dist/components/Dropdown/components/EmptyList.d.ts +0 -2
- package/dist/components/Dropdown/components/List/List.d.ts +0 -3
- package/dist/components/Dropdown/components/List/List.types.d.ts +0 -6
- package/dist/components/Dropdown/components/List/List.types.js +0 -1
- package/dist/components/Dropdown/components/List/List.variants.d.ts +0 -3
- package/dist/components/Dropdown/components/ListItem/ListItem.d.ts +0 -3
- package/dist/components/Dropdown/components/ListItem/ListItem.types.d.ts +0 -4
- package/dist/components/Dropdown/components/ListItem/ListItem.types.js +0 -1
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.d.ts +0 -3
- package/dist/components/Dropdown/components/Wrapper.d.ts +0 -3
- package/dist/components/Dropdown/components/index.d.ts +0 -3
- package/dist/components/Dropdown/contexts/dropdown.context.d.ts +0 -8
- package/dist/components/Dropdown/contexts/dropdown.hook.d.ts +0 -2
- package/dist/components/Dropdown/contexts/dropdown.provider.d.ts +0 -5
- package/dist/components/Dropdown/contexts/index.d.ts +0 -2
- package/dist/components/Dropdown/hooks/useDropdown.d.ts +0 -11
- package/dist/components/Dropdown/hooks/useNavigationList.d.ts +0 -8
- package/dist/components/Input/Input.d.ts +0 -3
- package/dist/components/Input/Input.types.d.ts +0 -9
- package/dist/components/Input/Input.types.js +0 -1
- package/dist/components/Input/Input.variants.d.ts +0 -4
- package/dist/components/Modal/Modal.d.ts +0 -8
- package/dist/components/Modal/Modal.types.d.ts +0 -12
- package/dist/components/Modal/Modal.types.js +0 -1
- package/dist/components/Modal/components/Body/Body.d.ts +0 -3
- package/dist/components/Modal/components/Body/Body.types.d.ts +0 -5
- package/dist/components/Modal/components/Body/Body.types.js +0 -1
- package/dist/components/Modal/components/Footer/Footer.d.ts +0 -3
- package/dist/components/Modal/components/Footer/Footer.types.d.ts +0 -5
- package/dist/components/Modal/components/Footer/Footer.types.js +0 -1
- package/dist/components/Modal/components/Header/Header.d.ts +0 -3
- package/dist/components/Modal/components/Header/Header.types.d.ts +0 -5
- package/dist/components/Modal/components/Header/Header.types.js +0 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.d.ts +0 -3
- package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +0 -7
- package/dist/components/Modal/components/Wrapper/Wrapper.types.js +0 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +0 -6
- package/dist/components/Modal/components/index.d.ts +0 -4
- package/dist/components/Modal/contexts/Modal.context.d.ts +0 -2
- package/dist/components/Modal/contexts/Modal.provider.d.ts +0 -4
- package/dist/components/Modal/contexts/Modal.types.d.ts +0 -9
- package/dist/components/Modal/contexts/Modal.types.js +0 -1
- package/dist/components/Modal/contexts/index.d.ts +0 -1
- package/dist/components/Modal/hooks/index.d.ts +0 -1
- package/dist/components/Modal/hooks/useModal.d.ts +0 -9
- package/dist/components/NumberInput/NumberInput.d.ts +0 -3
- package/dist/components/NumberInput/NumberInput.types.d.ts +0 -11
- package/dist/components/NumberInput/NumberInput.types.js +0 -1
- package/dist/components/NumberInput/NumberInput.variants.d.ts +0 -11
- package/dist/components/ProgressBar/ProgressBar.d.ts +0 -3
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +0 -8
- package/dist/components/ProgressBar/ProgressBar.types.js +0 -1
- package/dist/components/ProgressBar/ProgressBar.variants.d.ts +0 -7
- package/dist/components/Radio/Radio.d.ts +0 -3
- package/dist/components/Radio/Radio.types.d.ts +0 -12
- package/dist/components/Radio/Radio.types.js +0 -1
- package/dist/components/Radio/Radio.variants.d.ts +0 -3
- package/dist/components/RadioGroup/RadioGroup.d.ts +0 -3
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +0 -12
- package/dist/components/RadioGroup/RadioGroup.types.js +0 -1
- package/dist/components/Range/Range.d.ts +0 -3
- package/dist/components/Range/Range.types.d.ts +0 -13
- package/dist/components/Range/Range.types.js +0 -1
- package/dist/components/Range/Range.variants.d.ts +0 -14
- package/dist/components/Sidebar/Sidebar.d.ts +0 -5
- package/dist/components/Sidebar/Sidebar.types.d.ts +0 -18
- package/dist/components/Sidebar/Sidebar.types.js +0 -1
- package/dist/components/Sidebar/Sidebar.variants.d.ts +0 -6
- package/dist/components/Sidebar/components/Footer/Footer.d.ts +0 -3
- package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +0 -6
- package/dist/components/Sidebar/components/Footer/Footer.types.js +0 -1
- package/dist/components/Sidebar/components/Footer/Footer.variants.d.ts +0 -3
- package/dist/components/Sidebar/components/Logo/Logo.d.ts +0 -3
- package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +0 -6
- package/dist/components/Sidebar/components/Logo/Logo.types.js +0 -1
- package/dist/components/Sidebar/components/Logo/Logo.variants.d.ts +0 -3
- package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +0 -4
- package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +0 -16
- package/dist/components/Sidebar/components/Navigation/Navigation.types.js +0 -1
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +0 -8
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.js +0 -1
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +0 -17
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.js +0 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +0 -4
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +0 -5
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.js +0 -1
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +0 -8
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.js +0 -1
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +0 -3
- package/dist/components/Sidebar/components/Wrapper/Wrapper.d.ts +0 -3
- package/dist/components/Sidebar/components/index.d.ts +0 -15
- package/dist/components/Slider/Slider.d.ts +0 -3
- package/dist/components/Slider/Slider.types.d.ts +0 -13
- package/dist/components/Slider/Slider.types.js +0 -1
- package/dist/components/Slider/Slider.variants.d.ts +0 -11
- package/dist/components/Switch/Switch.d.ts +0 -3
- package/dist/components/Switch/Switch.types.d.ts +0 -10
- package/dist/components/Switch/Switch.types.js +0 -1
- package/dist/components/Switch/Switch.variants.d.ts +0 -6
- package/dist/components/Tag/Tag.d.ts +0 -3
- package/dist/components/Tag/Tag.types.d.ts +0 -4
- package/dist/components/Tag/Tag.types.js +0 -1
- package/dist/components/Tag/Tag.variants.d.ts +0 -3
- package/dist/components/TagSelect/TagSelect.d.ts +0 -3
- package/dist/components/TagSelect/TagSelect.types.d.ts +0 -9
- package/dist/components/TagSelect/TagSelect.types.js +0 -1
- package/dist/components/TagSelect/TagSelect.variants.d.ts +0 -9
- package/dist/components/TagSelect/hooks/useTagSelect.d.ts +0 -9
- package/dist/components/TextArea/TextArea.d.ts +0 -3
- package/dist/components/TextArea/TextArea.types.d.ts +0 -10
- package/dist/components/TextArea/TextArea.types.js +0 -1
- package/dist/components/TextArea/TextArea.variants.d.ts +0 -3
- package/dist/components/Toast/Toast.d.ts +0 -3
- package/dist/components/Toast/Toast.types.d.ts +0 -12
- package/dist/components/Toast/Toast.types.js +0 -1
- package/dist/components/Toast/Toast.variants.d.ts +0 -9
- package/dist/components/Tooltip/Tooltip.d.ts +0 -3
- package/dist/components/Tooltip/Tooltip.types.d.ts +0 -8
- package/dist/components/Tooltip/Tooltip.types.js +0 -1
- package/dist/components/Tooltip/Tooltip.variants.d.ts +0 -8
- package/dist/components/Tooltip/hooks/useTooltip.d.ts +0 -4
- package/dist/components/index.d.ts +0 -21
- package/dist/contexts/index.d.ts +0 -3
- package/dist/contexts/theme.context.d.ts +0 -6
- package/dist/contexts/theme.hook.d.ts +0 -7
- package/dist/contexts/theme.provider.d.ts +0 -6
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useToggle.d.ts +0 -1
- package/dist/index-DoOsnuB6.js +0 -72
- package/dist/js.cookie-OLEfuq_g.js +0 -74
- package/dist/plugins/index.d.ts +0 -1
- package/dist/plugins/konstruct.d.ts +0 -4
- package/dist/plugins/utils/colors.d.ts +0 -328
- package/dist/styles.d.ts +0 -0
- package/dist/useBreadcrumb-DxYsZvj_.js +0 -1398
- package/dist/utils/index.d.ts +0 -4
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as ae, S as j } from "../../index-
|
|
1
|
+
import { jsx as c, jsxs as D, Fragment as se } from "react/jsx-runtime";
|
|
2
|
+
import { u as ae, S as j } from "../../index-B_6_jmOO.js";
|
|
3
3
|
import * as s from "react";
|
|
4
4
|
import { useState as Re, useRef as be, useEffect as ge, useMemo as oe, isValidElement as re, useCallback as Se } from "react";
|
|
5
|
-
import { P as L, r as Ie, d as Ne } from "../../index-
|
|
6
|
-
import { c as Ae, a as Fe, b
|
|
7
|
-
import { c as De } from "../../index-
|
|
8
|
-
import { B as Le, R as Oe, P as Me } from "../../index-
|
|
9
|
-
import { P as ke } from "../../index-
|
|
10
|
-
import { V as ie, R as Ve } from "../../index-
|
|
11
|
-
import "../../contexts/theme.context.js";
|
|
12
|
-
import { useTheme as Ke } from "../../contexts/theme.hook.js";
|
|
13
|
-
import "../../js.cookie-OLEfuq_g.js";
|
|
5
|
+
import { P as L, r as Ie, d as Ne } from "../../index-BTeAm7mx.js";
|
|
6
|
+
import { c as Ae, a as Fe, b, d as X, u as _e } from "../../index-Cva-e5M4.js";
|
|
7
|
+
import { c as De } from "../../index-BbsJ0VIJ.js";
|
|
8
|
+
import { B as Le, R as Oe, P as Me } from "../../index-B33at13_.js";
|
|
9
|
+
import { P as ke } from "../../index-Dj1pom3_.js";
|
|
10
|
+
import { V as ie, R as Ve } from "../../index-Z1voPZOH.js";
|
|
14
11
|
import { cn as q } from "../../utils/index.js";
|
|
15
|
-
import {
|
|
16
|
-
import { X as
|
|
17
|
-
|
|
12
|
+
import { closeToastVariants as Ke, toastVariants as He, viewportToastVariants as We } from "./Toast.variants.js";
|
|
13
|
+
import { X as Xe } from "../../x-DU-Zw-L_.js";
|
|
14
|
+
import { useTheme as $e } from "../../contexts/theme.hook.js";
|
|
15
|
+
var Z = "ToastProvider", [ee, Ue, Ye] = De("Toast"), [ce, gt] = Ae("Toast", [Ye]), [Be, $] = ce(Z), ue = (e) => {
|
|
18
16
|
const {
|
|
19
17
|
__scopeToast: r,
|
|
20
18
|
label: o = "Notification",
|
|
21
19
|
duration: t = 5e3,
|
|
22
20
|
swipeDirection: u = "right",
|
|
23
21
|
swipeThreshold: d = 50,
|
|
24
|
-
children:
|
|
22
|
+
children: f
|
|
25
23
|
} = e, [m, v] = s.useState(null), [n, w] = s.useState(0), E = s.useRef(!1), I = s.useRef(!1);
|
|
26
24
|
return o.trim() || console.error(
|
|
27
25
|
`Invalid prop \`label\` supplied to \`${Z}\`. Expected non-empty \`string\`.`
|
|
@@ -40,7 +38,7 @@ var Z = "ToastProvider", [ee, Ue, Ye] = De("Toast"), [ce, It] = Ae("Toast", [Ye]
|
|
|
40
38
|
onToastRemove: s.useCallback(() => w((R) => R - 1), []),
|
|
41
39
|
isFocusedToastEscapeKeyDownRef: E,
|
|
42
40
|
isClosePausedRef: I,
|
|
43
|
-
children:
|
|
41
|
+
children: f
|
|
44
42
|
}
|
|
45
43
|
) });
|
|
46
44
|
};
|
|
@@ -52,7 +50,7 @@ var le = "ToastViewport", je = ["F8"], G = "toast.viewportPause", J = "toast.vie
|
|
|
52
50
|
hotkey: t = je,
|
|
53
51
|
label: u = "Notifications ({hotkey})",
|
|
54
52
|
...d
|
|
55
|
-
} = e,
|
|
53
|
+
} = e, f = $(le, o), m = Ue(o), v = s.useRef(null), n = s.useRef(null), w = s.useRef(null), E = s.useRef(null), I = ae(r, E, f.onViewportChange), R = t.join("+").replace(/Key/g, "").replace(/Digit/g, ""), g = f.toastCount > 0;
|
|
56
54
|
s.useEffect(() => {
|
|
57
55
|
const a = (P) => {
|
|
58
56
|
var T;
|
|
@@ -62,50 +60,50 @@ var le = "ToastViewport", je = ["F8"], G = "toast.viewportPause", J = "toast.vie
|
|
|
62
60
|
}, [t]), s.useEffect(() => {
|
|
63
61
|
const a = v.current, P = E.current;
|
|
64
62
|
if (g && a && P) {
|
|
65
|
-
const
|
|
66
|
-
if (!
|
|
63
|
+
const p = () => {
|
|
64
|
+
if (!f.isClosePausedRef.current) {
|
|
67
65
|
const C = new CustomEvent(G);
|
|
68
|
-
P.dispatchEvent(C),
|
|
66
|
+
P.dispatchEvent(C), f.isClosePausedRef.current = !0;
|
|
69
67
|
}
|
|
70
68
|
}, T = () => {
|
|
71
|
-
if (
|
|
69
|
+
if (f.isClosePausedRef.current) {
|
|
72
70
|
const C = new CustomEvent(J);
|
|
73
|
-
P.dispatchEvent(C),
|
|
71
|
+
P.dispatchEvent(C), f.isClosePausedRef.current = !1;
|
|
74
72
|
}
|
|
75
73
|
}, h = (C) => {
|
|
76
74
|
!a.contains(C.relatedTarget) && T();
|
|
77
75
|
}, y = () => {
|
|
78
76
|
a.contains(document.activeElement) || T();
|
|
79
77
|
};
|
|
80
|
-
return a.addEventListener("focusin",
|
|
81
|
-
a.removeEventListener("focusin",
|
|
78
|
+
return a.addEventListener("focusin", p), a.addEventListener("focusout", h), a.addEventListener("pointermove", p), a.addEventListener("pointerleave", y), window.addEventListener("blur", p), window.addEventListener("focus", T), () => {
|
|
79
|
+
a.removeEventListener("focusin", p), a.removeEventListener("focusout", h), a.removeEventListener("pointermove", p), a.removeEventListener("pointerleave", y), window.removeEventListener("blur", p), window.removeEventListener("focus", T);
|
|
82
80
|
};
|
|
83
81
|
}
|
|
84
|
-
}, [g,
|
|
82
|
+
}, [g, f.isClosePausedRef]);
|
|
85
83
|
const l = s.useCallback(
|
|
86
84
|
({ tabbingDirection: a }) => {
|
|
87
|
-
const
|
|
85
|
+
const p = m().map((T) => {
|
|
88
86
|
const h = T.ref.current, y = [h, ...at(h)];
|
|
89
87
|
return a === "forwards" ? y : y.reverse();
|
|
90
88
|
});
|
|
91
|
-
return (a === "forwards" ?
|
|
89
|
+
return (a === "forwards" ? p.reverse() : p).flat();
|
|
92
90
|
},
|
|
93
91
|
[m]
|
|
94
92
|
);
|
|
95
93
|
return s.useEffect(() => {
|
|
96
94
|
const a = E.current;
|
|
97
95
|
if (a) {
|
|
98
|
-
const P = (
|
|
96
|
+
const P = (p) => {
|
|
99
97
|
var y, C, N;
|
|
100
|
-
const T =
|
|
101
|
-
if (
|
|
102
|
-
const O = document.activeElement, F =
|
|
103
|
-
if (
|
|
98
|
+
const T = p.altKey || p.ctrlKey || p.metaKey;
|
|
99
|
+
if (p.key === "Tab" && !T) {
|
|
100
|
+
const O = document.activeElement, F = p.shiftKey;
|
|
101
|
+
if (p.target === a && F) {
|
|
104
102
|
(y = n.current) == null || y.focus();
|
|
105
103
|
return;
|
|
106
104
|
}
|
|
107
105
|
const A = l({ tabbingDirection: F ? "backwards" : "forwards" }), V = A.findIndex((i) => i === O);
|
|
108
|
-
z(A.slice(V + 1)) ?
|
|
106
|
+
z(A.slice(V + 1)) ? p.preventDefault() : F ? (C = n.current) == null || C.focus() : (N = w.current) == null || N.focus();
|
|
109
107
|
}
|
|
110
108
|
};
|
|
111
109
|
return a.addEventListener("keydown", P), () => a.removeEventListener("keydown", P);
|
|
@@ -150,9 +148,9 @@ var le = "ToastViewport", je = ["F8"], G = "toast.viewportPause", J = "toast.vie
|
|
|
150
148
|
}
|
|
151
149
|
);
|
|
152
150
|
de.displayName = le;
|
|
153
|
-
var
|
|
151
|
+
var fe = "ToastFocusProxy", Q = s.forwardRef(
|
|
154
152
|
(e, r) => {
|
|
155
|
-
const { __scopeToast: o, onFocusFromOutsideViewport: t, ...u } = e, d = $(
|
|
153
|
+
const { __scopeToast: o, onFocusFromOutsideViewport: t, ...u } = e, d = $(fe, o);
|
|
156
154
|
return /* @__PURE__ */ c(
|
|
157
155
|
ie,
|
|
158
156
|
{
|
|
@@ -161,19 +159,19 @@ var pe = "ToastFocusProxy", Q = s.forwardRef(
|
|
|
161
159
|
...u,
|
|
162
160
|
ref: r,
|
|
163
161
|
style: { position: "fixed" },
|
|
164
|
-
onFocus: (
|
|
162
|
+
onFocus: (f) => {
|
|
165
163
|
var n;
|
|
166
|
-
const m =
|
|
164
|
+
const m = f.relatedTarget;
|
|
167
165
|
!((n = d.viewport) != null && n.contains(m)) && t();
|
|
168
166
|
}
|
|
169
167
|
}
|
|
170
168
|
);
|
|
171
169
|
}
|
|
172
170
|
);
|
|
173
|
-
Q.displayName =
|
|
174
|
-
var U = "Toast", qe = "toast.swipeStart", ze = "toast.swipeMove", Ge = "toast.swipeCancel", Je = "toast.swipeEnd",
|
|
171
|
+
Q.displayName = fe;
|
|
172
|
+
var U = "Toast", qe = "toast.swipeStart", ze = "toast.swipeMove", Ge = "toast.swipeCancel", Je = "toast.swipeEnd", pe = s.forwardRef(
|
|
175
173
|
(e, r) => {
|
|
176
|
-
const { forceMount: o, open: t, defaultOpen: u, onOpenChange: d, ...
|
|
174
|
+
const { forceMount: o, open: t, defaultOpen: u, onOpenChange: d, ...f } = e, [m = !0, v] = Fe({
|
|
177
175
|
prop: t,
|
|
178
176
|
defaultProp: u,
|
|
179
177
|
onChange: d
|
|
@@ -182,7 +180,7 @@ var U = "Toast", qe = "toast.swipeStart", ze = "toast.swipeMove", Ge = "toast.sw
|
|
|
182
180
|
et,
|
|
183
181
|
{
|
|
184
182
|
open: m,
|
|
185
|
-
...
|
|
183
|
+
...f,
|
|
186
184
|
ref: r,
|
|
187
185
|
onClose: () => v(!1),
|
|
188
186
|
onPause: X(e.onPause),
|
|
@@ -205,7 +203,7 @@ var U = "Toast", qe = "toast.swipeStart", ze = "toast.swipeMove", Ge = "toast.sw
|
|
|
205
203
|
) });
|
|
206
204
|
}
|
|
207
205
|
);
|
|
208
|
-
|
|
206
|
+
pe.displayName = U;
|
|
209
207
|
var [Qe, Ze] = ce(U, {
|
|
210
208
|
onClose() {
|
|
211
209
|
}
|
|
@@ -216,7 +214,7 @@ var [Qe, Ze] = ce(U, {
|
|
|
216
214
|
type: t = "foreground",
|
|
217
215
|
duration: u,
|
|
218
216
|
open: d,
|
|
219
|
-
onClose:
|
|
217
|
+
onClose: f,
|
|
220
218
|
onEscapeKeyDown: m,
|
|
221
219
|
onPause: v,
|
|
222
220
|
onResume: n,
|
|
@@ -225,9 +223,9 @@ var [Qe, Ze] = ce(U, {
|
|
|
225
223
|
onSwipeCancel: I,
|
|
226
224
|
onSwipeEnd: R,
|
|
227
225
|
...g
|
|
228
|
-
} = e, l = $(U, o), [a, P] = s.useState(null),
|
|
226
|
+
} = e, l = $(U, o), [a, P] = s.useState(null), p = ae(r, (i) => P(i)), T = s.useRef(null), h = s.useRef(null), y = u || l.duration, C = s.useRef(0), N = s.useRef(y), O = s.useRef(0), { onToastAdd: F, onToastRemove: Y } = l, _ = X(() => {
|
|
229
227
|
var x;
|
|
230
|
-
(a == null ? void 0 : a.contains(document.activeElement)) && ((x = l.viewport) == null || x.focus()),
|
|
228
|
+
(a == null ? void 0 : a.contains(document.activeElement)) && ((x = l.viewport) == null || x.focus()), f();
|
|
231
229
|
}), A = s.useCallback(
|
|
232
230
|
(i) => {
|
|
233
231
|
!i || i === 1 / 0 || (window.clearTimeout(O.current), C.current = (/* @__PURE__ */ new Date()).getTime(), O.current = window.setTimeout(_, i));
|
|
@@ -280,7 +278,7 @@ var [Qe, Ze] = ce(U, {
|
|
|
280
278
|
"data-state": d ? "open" : "closed",
|
|
281
279
|
"data-swipe-direction": l.swipeDirection,
|
|
282
280
|
...g,
|
|
283
|
-
ref:
|
|
281
|
+
ref: p,
|
|
284
282
|
style: { userSelect: "none", touchAction: "none", ...e.style },
|
|
285
283
|
onKeyDown: b(e.onKeyDown, (i) => {
|
|
286
284
|
i.key === "Escape" && (m == null || m(i.nativeEvent), i.nativeEvent.defaultPrevented || (l.isFocusedToastEscapeKeyDownRef.current = !0, _()));
|
|
@@ -324,8 +322,8 @@ var [Qe, Ze] = ce(U, {
|
|
|
324
322
|
] }) : null;
|
|
325
323
|
}
|
|
326
324
|
), tt = (e) => {
|
|
327
|
-
const { __scopeToast: r, children: o, ...t } = e, u = $(U, r), [d,
|
|
328
|
-
return nt(() =>
|
|
325
|
+
const { __scopeToast: r, children: o, ...t } = e, u = $(U, r), [d, f] = s.useState(!1), [m, v] = s.useState(!1);
|
|
326
|
+
return nt(() => f(!0)), s.useEffect(() => {
|
|
329
327
|
const n = window.setTimeout(() => v(!0), 1e3);
|
|
330
328
|
return () => window.clearTimeout(n);
|
|
331
329
|
}, []), m ? null : /* @__PURE__ */ c(Me, { asChild: !0, children: /* @__PURE__ */ c(ie, { ...t, children: d && /* @__PURE__ */ D(se, { children: [
|
|
@@ -390,8 +388,8 @@ function Pe(e) {
|
|
|
390
388
|
const u = t.ariaHidden || t.hidden || t.style.display === "none", d = t.dataset.radixToastAnnounceExclude === "";
|
|
391
389
|
if (!u)
|
|
392
390
|
if (d) {
|
|
393
|
-
const
|
|
394
|
-
|
|
391
|
+
const f = t.dataset.radixToastAnnounceAlt;
|
|
392
|
+
f && r.push(f);
|
|
395
393
|
} else
|
|
396
394
|
r.push(...Pe(t));
|
|
397
395
|
}
|
|
@@ -432,19 +430,19 @@ function z(e) {
|
|
|
432
430
|
const r = document.activeElement;
|
|
433
431
|
return e.some((o) => o === r ? !0 : (o.focus(), document.activeElement !== r));
|
|
434
432
|
}
|
|
435
|
-
var it = ue, ct = de, ut =
|
|
436
|
-
const
|
|
433
|
+
var it = ue, ct = de, ut = pe, lt = me, dt = Te, ft = we;
|
|
434
|
+
const St = ({
|
|
437
435
|
title: e,
|
|
438
436
|
duration: r = 5e3,
|
|
439
437
|
titleClassName: o,
|
|
440
438
|
descriptionClassName: t,
|
|
441
439
|
description: u,
|
|
442
440
|
children: d,
|
|
443
|
-
theme:
|
|
441
|
+
theme: f,
|
|
444
442
|
showCloseButton: m = !0,
|
|
445
443
|
className: v
|
|
446
444
|
}) => {
|
|
447
|
-
const [n, w] = Re(!1), E = be(0), { theme: I } =
|
|
445
|
+
const [n, w] = Re(!1), E = be(0), { theme: I } = $e(), R = f ?? I;
|
|
448
446
|
ge(() => () => clearTimeout(E.current), []);
|
|
449
447
|
const g = oe(() => re(e) ? /* @__PURE__ */ c(j, { className: o, children: e }) : /* @__PURE__ */ c("h6", { className: o, children: e }), [e, o]), l = oe(() => re(u) ? /* @__PURE__ */ c(j, { className: t, children: u }) : /* @__PURE__ */ c("h6", { className: t, children: u }), [u, t]), a = Se(() => {
|
|
450
448
|
w(!1), E.current = window.setTimeout(() => w(!0), 100);
|
|
@@ -460,8 +458,8 @@ const Nt = ({
|
|
|
460
458
|
children: [
|
|
461
459
|
/* @__PURE__ */ c(lt, { asChild: !0, className: "text-lg mb-2 font-semibold", children: g }),
|
|
462
460
|
/* @__PURE__ */ c(dt, { asChild: !0, children: l }),
|
|
463
|
-
m && /* @__PURE__ */ c(
|
|
464
|
-
/* @__PURE__ */ c(
|
|
461
|
+
m && /* @__PURE__ */ c(ft, { asChild: !0, altText: "Close the toast", children: /* @__PURE__ */ D("button", { type: "button", className: "absolute right-1.5 top-1.5", children: [
|
|
462
|
+
/* @__PURE__ */ c(Xe, { className: q(Ke({ theme: R })) }),
|
|
465
463
|
/* @__PURE__ */ c(Ve, { children: "Close toast" })
|
|
466
464
|
] }) })
|
|
467
465
|
]
|
|
@@ -470,11 +468,11 @@ const Nt = ({
|
|
|
470
468
|
/* @__PURE__ */ c(
|
|
471
469
|
ct,
|
|
472
470
|
{
|
|
473
|
-
className: q(
|
|
471
|
+
className: q(We({ theme: R }))
|
|
474
472
|
}
|
|
475
473
|
)
|
|
476
474
|
] });
|
|
477
475
|
};
|
|
478
476
|
export {
|
|
479
|
-
|
|
477
|
+
St as Toast
|
|
480
478
|
};
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as N, useRef as w, useImperativeHandle as x, useMemo as R, isValidElement as T } from "react";
|
|
3
|
-
import { S as a } from "../../index-
|
|
4
|
-
import "../../contexts/theme.context.js";
|
|
5
|
-
import { useTheme as V } from "../../contexts/theme.hook.js";
|
|
6
|
-
import "../../js.cookie-OLEfuq_g.js";
|
|
3
|
+
import { S as a } from "../../index-B_6_jmOO.js";
|
|
7
4
|
import { cn as o } from "../../utils/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import { useTooltip as
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
import { arrowVariants as V, tooltipVariants as b } from "./Tooltip.variants.js";
|
|
6
|
+
import { useTooltip as j } from "./hooks/useTooltip.js";
|
|
7
|
+
import { useTheme as C } from "../../contexts/theme.hook.js";
|
|
8
|
+
const q = N(
|
|
9
|
+
({ children: t, content: l, className: n, theme: c, position: s, wrapperClassName: p }, f) => {
|
|
10
|
+
const d = w(null), { theme: h } = C(), m = c ?? h, { isVisible: u, componentRef: r } = j();
|
|
13
11
|
x(f, () => r.current, [r]);
|
|
14
12
|
const v = R(
|
|
15
13
|
() => T(t) ? t : /* @__PURE__ */ e("p", { className: "p-2", children: t }),
|
|
16
14
|
[t]
|
|
17
15
|
);
|
|
18
|
-
return /* @__PURE__ */ e("div", { className: o("w-full",
|
|
16
|
+
return /* @__PURE__ */ e("div", { className: o("w-full", p), children: /* @__PURE__ */ i("div", { className: "relative w-max", children: [
|
|
19
17
|
/* @__PURE__ */ e(a, { ref: r, className: o("cursor-pointer ", n), children: v }),
|
|
20
18
|
/* @__PURE__ */ i(
|
|
21
19
|
"div",
|
|
@@ -27,7 +25,7 @@ const z = N(
|
|
|
27
25
|
/* @__PURE__ */ e(
|
|
28
26
|
"span",
|
|
29
27
|
{
|
|
30
|
-
className: o(
|
|
28
|
+
className: o(V({ theme: m, position: s }))
|
|
31
29
|
}
|
|
32
30
|
),
|
|
33
31
|
/* @__PURE__ */ e(a, { children: l })
|
|
@@ -38,5 +36,5 @@ const z = N(
|
|
|
38
36
|
}
|
|
39
37
|
);
|
|
40
38
|
export {
|
|
41
|
-
|
|
39
|
+
q as Tooltip
|
|
42
40
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useId as h } from "react";
|
|
3
|
+
import { typographyVariants as i } from "./Typography.variants.js";
|
|
4
|
+
import { useTheme as y } from "../../contexts/theme.hook.js";
|
|
5
|
+
const n = ({
|
|
6
|
+
className: o,
|
|
7
|
+
theme: t,
|
|
8
|
+
children: e,
|
|
9
|
+
variant: r,
|
|
10
|
+
...m
|
|
11
|
+
}) => {
|
|
12
|
+
const p = h(), { theme: s } = y();
|
|
13
|
+
return /* @__PURE__ */ a(
|
|
14
|
+
"p",
|
|
15
|
+
{
|
|
16
|
+
id: p,
|
|
17
|
+
className: i({
|
|
18
|
+
className: o,
|
|
19
|
+
theme: t ?? s,
|
|
20
|
+
variant: r
|
|
21
|
+
}),
|
|
22
|
+
...m,
|
|
23
|
+
children: e
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
n.displayName = "Typography";
|
|
28
|
+
export {
|
|
29
|
+
n as Typography
|
|
30
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { c as t } from "../../index-BNmRGtA6.js";
|
|
2
|
+
const x = t([""], {
|
|
3
|
+
variants: {
|
|
4
|
+
variant: {
|
|
5
|
+
h1: "text-[57px] font-normal leading-[64px]",
|
|
6
|
+
h2: "text-[45px] font-normal leading-[52px]",
|
|
7
|
+
h3: "text-[36px] font-normal leading-[44px]",
|
|
8
|
+
h4: "text-[32px] font-normal leading-[40px]",
|
|
9
|
+
h5: "text-[28px] font-normal leading-[36px]",
|
|
10
|
+
h6: "text-[24px] font-medium leading-[32px] tracking-[0.15px]",
|
|
11
|
+
subtitle1: "text-[22px] font-normal leading-[28px]",
|
|
12
|
+
subtitle2: "text-[16px] font-medium leading-[24px] tracking-[0.15px]",
|
|
13
|
+
subtitle3: "text-[14px] font-medium leading-[20px] tracking-[0.1px]",
|
|
14
|
+
labelLarge: "text-[14px] font-normal leading-[20px] tracking-[0.1px]",
|
|
15
|
+
labelMedium: "text-[12px] font-medium leading-[16px] tracking-[0.5px] uppercase",
|
|
16
|
+
labelSmall: "text-[11px] font-medium leading-[16px] tracking-[0.5px] uppercase",
|
|
17
|
+
buttonSmall: "text-[14px] font-semibold leading-[20px] tracking-[0.25px]",
|
|
18
|
+
body1: "text-[16px] font-normal leading-[24px] tracking-[0.5px]",
|
|
19
|
+
body2: "text-[14px] font-normal leading-[20px] tracking-[0.25px]",
|
|
20
|
+
body3: "text-[12px] font-normal leading-[16px] tracking-[0.4px]",
|
|
21
|
+
tooltip: "text-[14px] font-normal leading-[22px]"
|
|
22
|
+
},
|
|
23
|
+
theme: {
|
|
24
|
+
kubefirst: "text-zinc-700",
|
|
25
|
+
colony: "text-zinc-700",
|
|
26
|
+
civo: "text-zinc-700"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "body1",
|
|
31
|
+
theme: "kubefirst"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
x as typographyVariants
|
|
36
|
+
};
|
package/dist/components/index.js
CHANGED
|
@@ -1,56 +1,70 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { Alert as t } from "./Alert/Alert.js";
|
|
2
|
+
import { AlertDialog as p } from "./AlertDialog/AlertDialog.js";
|
|
3
|
+
import { Autocomplete as x } from "./Autocomplete/Autocomplete.js";
|
|
4
|
+
import { Breadcrumb as a } from "./Breadcrumb/Breadcrumb.js";
|
|
5
|
+
import { Button as d } from "./Button/Button.js";
|
|
6
|
+
import { Card as n } from "./Card/Card.js";
|
|
7
|
+
import { Checkbox as l } from "./Checkbox/Checkbox.js";
|
|
8
|
+
import { Dropdown as c } from "./Dropdown/Dropdown.js";
|
|
8
9
|
import { Input as N } from "./Input/Input.js";
|
|
9
|
-
import { M as
|
|
10
|
+
import { M as S } from "../Modal-DZUwNzSW.js";
|
|
10
11
|
import { NumberInput as s } from "./NumberInput/NumberInput.js";
|
|
11
|
-
import { ProgressBar as
|
|
12
|
-
import { Radio as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
12
|
+
import { ProgressBar as C } from "./ProgressBar/ProgressBar.js";
|
|
13
|
+
import { Radio as B } from "./Radio/Radio.js";
|
|
14
|
+
import { RadioCard as G } from "./RadioCard/RadioCard.js";
|
|
15
|
+
import { RadioCardGroup as y } from "./RadioCardGroup/RadioCardGroup.js";
|
|
16
|
+
import { RadioGroup as L } from "./RadioGroup/RadioGroup.js";
|
|
17
|
+
import { Range as k } from "./Range/Range.js";
|
|
18
|
+
import { Sidebar as O } from "./Sidebar/Sidebar.js";
|
|
19
|
+
import { Slider as j } from "./Slider/Slider.js";
|
|
20
|
+
import { Switch as z } from "./Switch/Switch.js";
|
|
21
|
+
import { Tag as H } from "./Tag/Tag.js";
|
|
22
|
+
import { TagSelect as K } from "./TagSelect/TagSelect.js";
|
|
23
|
+
import { TextArea as U } from "./TextArea/TextArea.js";
|
|
24
|
+
import { Toast as W } from "./Toast/Toast.js";
|
|
25
|
+
import { Tooltip as Y } from "./Tooltip/Tooltip.js";
|
|
26
|
+
import { Loading as _ } from "./Loading/Loading.js";
|
|
27
|
+
import { Typography as oo } from "./Typography/Typography.js";
|
|
28
|
+
import { Divider as to } from "./Divider/Divider.js";
|
|
29
|
+
import { Footer as po } from "./Sidebar/components/Footer/Footer.js";
|
|
30
|
+
import { Logo as xo } from "./Sidebar/components/Logo/Logo.js";
|
|
31
|
+
import { Navigation as ao } from "./Sidebar/components/Navigation/Navigation.js";
|
|
32
|
+
import { NavigationGroup as go } from "./Sidebar/components/NavigationGroup/NavigationGroup.js";
|
|
33
|
+
import { NavigationOption as uo } from "./Sidebar/components/NavigationOption/NavigationOption.js";
|
|
34
|
+
import { NavigationSeparator as To } from "./Sidebar/components/NavigationSeparator/NavigationSeparator.js";
|
|
28
35
|
export {
|
|
29
|
-
t as
|
|
30
|
-
p as
|
|
31
|
-
x as
|
|
32
|
-
a as
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
t as Alert,
|
|
37
|
+
p as AlertDialog,
|
|
38
|
+
x as Autocomplete,
|
|
39
|
+
a as Breadcrumb,
|
|
40
|
+
d as Button,
|
|
41
|
+
n as Card,
|
|
42
|
+
l as Checkbox,
|
|
43
|
+
to as Divider,
|
|
44
|
+
c as Dropdown,
|
|
45
|
+
po as Footer,
|
|
37
46
|
N as Input,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
_ as Loading,
|
|
48
|
+
xo as Logo,
|
|
49
|
+
S as Modal,
|
|
50
|
+
ao as Navigation,
|
|
51
|
+
go as NavigationGroup,
|
|
52
|
+
uo as NavigationOption,
|
|
53
|
+
To as NavigationSeparator,
|
|
44
54
|
s as NumberInput,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
C as ProgressBar,
|
|
56
|
+
B as Radio,
|
|
57
|
+
G as RadioCard,
|
|
58
|
+
y as RadioCardGroup,
|
|
59
|
+
L as RadioGroup,
|
|
60
|
+
k as Range,
|
|
61
|
+
O as Sidebar,
|
|
62
|
+
j as Slider,
|
|
63
|
+
z as Switch,
|
|
64
|
+
H as Tag,
|
|
65
|
+
K as TagSelect,
|
|
66
|
+
U as TextArea,
|
|
67
|
+
W as Toast,
|
|
68
|
+
Y as Tooltip,
|
|
69
|
+
oo as Typography
|
|
56
70
|
};
|
|
@@ -1,20 +1,90 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h } from "react";
|
|
3
|
+
import { isClient as g } from "../utils/index.js";
|
|
4
|
+
import { ThemeContext as C } from "./theme.context.js";
|
|
5
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
6
|
+
function u(r) {
|
|
7
|
+
for (var o = 1; o < arguments.length; o++) {
|
|
8
|
+
var t = arguments[o];
|
|
9
|
+
for (var f in t)
|
|
10
|
+
r[f] = t[f];
|
|
11
|
+
}
|
|
12
|
+
return r;
|
|
13
|
+
}
|
|
14
|
+
var l = {
|
|
15
|
+
read: function(r) {
|
|
16
|
+
return r[0] === '"' && (r = r.slice(1, -1)), r.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
17
|
+
},
|
|
18
|
+
write: function(r) {
|
|
19
|
+
return encodeURIComponent(r).replace(
|
|
20
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
21
|
+
decodeURIComponent
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
function s(r, o) {
|
|
26
|
+
function t(n, p, e) {
|
|
27
|
+
if (!(typeof document > "u")) {
|
|
28
|
+
e = u({}, o, e), typeof e.expires == "number" && (e.expires = new Date(Date.now() + e.expires * 864e5)), e.expires && (e.expires = e.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
29
|
+
var i = "";
|
|
30
|
+
for (var c in e)
|
|
31
|
+
e[c] && (i += "; " + c, e[c] !== !0 && (i += "=" + e[c].split(";")[0]));
|
|
32
|
+
return document.cookie = n + "=" + r.write(p, n) + i;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function f(n) {
|
|
36
|
+
if (!(typeof document > "u" || arguments.length && !n)) {
|
|
37
|
+
for (var p = document.cookie ? document.cookie.split("; ") : [], e = {}, i = 0; i < p.length; i++) {
|
|
38
|
+
var c = p[i].split("="), m = c.slice(1).join("=");
|
|
39
|
+
try {
|
|
40
|
+
var d = decodeURIComponent(c[0]);
|
|
41
|
+
if (e[d] = r.read(m, d), n === d)
|
|
42
|
+
break;
|
|
43
|
+
} catch {
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return n ? e[n] : e;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return Object.create(
|
|
50
|
+
{
|
|
51
|
+
set: t,
|
|
52
|
+
get: f,
|
|
53
|
+
remove: function(n, p) {
|
|
54
|
+
t(
|
|
55
|
+
n,
|
|
56
|
+
"",
|
|
57
|
+
u({}, p, {
|
|
58
|
+
expires: -1
|
|
59
|
+
})
|
|
60
|
+
);
|
|
61
|
+
},
|
|
62
|
+
withAttributes: function(n) {
|
|
63
|
+
return s(this.converter, u({}, this.attributes, n));
|
|
64
|
+
},
|
|
65
|
+
withConverter: function(n) {
|
|
66
|
+
return s(u({}, this.converter, n), this.attributes);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
attributes: { value: Object.freeze(o) },
|
|
71
|
+
converter: { value: Object.freeze(r) }
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
var a = s(l, { path: "/" });
|
|
76
|
+
const R = ({
|
|
7
77
|
children: r,
|
|
8
|
-
theme:
|
|
78
|
+
theme: o
|
|
9
79
|
}) => {
|
|
10
|
-
const [t,
|
|
11
|
-
if (
|
|
12
|
-
return
|
|
13
|
-
if (
|
|
14
|
-
return
|
|
80
|
+
const [t, f] = h(() => {
|
|
81
|
+
if (o)
|
|
82
|
+
return o;
|
|
83
|
+
if (g)
|
|
84
|
+
return a.get("konstruct-theme");
|
|
15
85
|
});
|
|
16
|
-
return /* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ v(C.Provider, { value: { theme: t, setTheme: f }, children: r });
|
|
17
87
|
};
|
|
18
88
|
export {
|
|
19
|
-
|
|
89
|
+
R as ThemeProvider
|
|
20
90
|
};
|