@konstructio/ui 0.0.12-alpha.1 → 0.0.12
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/{index-BVppSRDQ.js → AlertDialogTrigger-D4Tm_9M0.js} +21 -19
- package/dist/{Combination-BQYb0Gw7.js → Combination-Cmu9JRkv.js} +72 -72
- package/dist/{Modal-W2GbkC_F.js → Modal-L73dmnHv.js} +246 -238
- package/dist/{chevron-up-DgLBQCKD.js → chevron-up-CvquEaNg.js} +1 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts +3 -0
- package/dist/components/AlertDialog/AlertDialog.js +23 -20
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +18 -0
- package/dist/components/AlertDialog/AlertDialog.types.js +1 -0
- package/dist/components/AlertDialog/AlertDialog.variants.d.ts +3 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +3 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +6 -3
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +6 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.js +1 -0
- package/dist/components/AlertDialog/components/index.d.ts +1 -0
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/AlertDialog/hooks/index.d.ts +1 -0
- package/dist/components/AlertDialog/hooks/useAlertDialog.d.ts +7 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +3 -0
- package/dist/components/Autocomplete/Autocomplete.js +17 -15
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +18 -0
- package/dist/components/Autocomplete/Autocomplete.types.js +1 -0
- package/dist/components/Autocomplete/Autocomplete.variants.d.ts +8 -0
- package/dist/components/Autocomplete/components/List/List.d.ts +3 -0
- package/dist/components/Autocomplete/components/List/List.js +7 -7
- package/dist/components/Autocomplete/components/List/List.types.d.ts +13 -0
- package/dist/components/Autocomplete/components/List/List.types.js +1 -0
- package/dist/components/Autocomplete/components/List/List.variants.d.ts +16 -0
- package/dist/components/Autocomplete/components/index.d.ts +1 -0
- package/dist/components/Autocomplete/hooks/index.d.ts +2 -0
- package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +17 -0
- package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +10 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +3 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +69 -68
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +11 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +12 -0
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +17 -16
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.d.ts +3 -0
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +3 -2
- package/dist/components/Button/Button.d.ts +4 -0
- package/dist/components/Button/Button.js +16 -14
- package/dist/components/Button/Button.types.d.ts +7 -0
- package/dist/components/Button/Button.types.js +1 -0
- package/dist/components/Button/Button.variants.d.ts +7 -0
- package/dist/components/Card/Card.d.ts +4 -0
- package/dist/components/Card/Card.js +12 -10
- package/dist/components/Card/Card.types.d.ts +8 -0
- package/dist/components/Card/Card.types.js +1 -0
- package/dist/components/Card/Card.variants.d.ts +10 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.js +15 -13
- package/dist/components/Checkbox/Checkbox.types.d.ts +14 -0
- package/dist/components/Checkbox/Checkbox.types.js +1 -0
- package/dist/components/Checkbox/Checkbox.variants.d.ts +9 -0
- package/dist/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.js +6 -4
- package/dist/components/Dropdown/Dropdown.types.d.ts +16 -0
- package/dist/components/Dropdown/Dropdown.types.js +1 -0
- package/dist/components/Dropdown/Dropdown.variants.d.ts +3 -0
- package/dist/components/Dropdown/components/EmptyList.d.ts +2 -0
- package/dist/components/Dropdown/components/List/List.d.ts +3 -0
- package/dist/components/Dropdown/components/List/List.js +10 -9
- package/dist/components/Dropdown/components/List/List.types.d.ts +6 -0
- package/dist/components/Dropdown/components/List/List.types.js +1 -0
- package/dist/components/Dropdown/components/List/List.variants.d.ts +3 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.d.ts +3 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.js +21 -20
- package/dist/components/Dropdown/components/ListItem/ListItem.types.d.ts +4 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.types.js +1 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.d.ts +3 -0
- package/dist/components/Dropdown/components/Wrapper.d.ts +3 -0
- package/dist/components/Dropdown/components/Wrapper.js +34 -31
- package/dist/components/Dropdown/components/index.d.ts +3 -0
- package/dist/components/Dropdown/contexts/dropdown.context.d.ts +8 -0
- package/dist/components/Dropdown/contexts/dropdown.hook.d.ts +2 -0
- package/dist/components/Dropdown/contexts/dropdown.provider.d.ts +5 -0
- package/dist/components/Dropdown/contexts/dropdown.provider.js +4 -4
- package/dist/components/Dropdown/contexts/index.d.ts +2 -0
- package/dist/components/Dropdown/hooks/useDropdown.d.ts +11 -0
- package/dist/components/Dropdown/hooks/useDropdown.js +14 -12
- package/dist/components/Dropdown/hooks/useNavigationList.d.ts +8 -0
- package/dist/components/Dropdown/hooks/useNavigationList.js +10 -8
- package/dist/components/Input/Input.d.ts +3 -0
- package/dist/components/Input/Input.js +14 -12
- package/dist/components/Input/Input.types.d.ts +9 -0
- package/dist/components/Input/Input.types.js +1 -0
- package/dist/components/Input/Input.variants.d.ts +4 -0
- package/dist/components/Modal/Modal.d.ts +8 -0
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/Modal/Modal.types.d.ts +12 -0
- package/dist/components/Modal/Modal.types.js +1 -0
- package/dist/components/Modal/components/Body/Body.d.ts +3 -0
- package/dist/components/Modal/components/Body/Body.types.d.ts +5 -0
- package/dist/components/Modal/components/Body/Body.types.js +1 -0
- package/dist/components/Modal/components/Footer/Footer.d.ts +3 -0
- package/dist/components/Modal/components/Footer/Footer.types.d.ts +5 -0
- package/dist/components/Modal/components/Footer/Footer.types.js +1 -0
- package/dist/components/Modal/components/Header/Header.d.ts +3 -0
- package/dist/components/Modal/components/Header/Header.types.d.ts +5 -0
- package/dist/components/Modal/components/Header/Header.types.js +1 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.js +9 -7
- package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +7 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.types.js +1 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +6 -0
- package/dist/components/Modal/components/index.d.ts +4 -0
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/contexts/Modal.context.d.ts +2 -0
- package/dist/components/Modal/contexts/Modal.provider.d.ts +4 -0
- package/dist/components/Modal/contexts/Modal.provider.js +4 -4
- package/dist/components/Modal/contexts/Modal.types.d.ts +9 -0
- package/dist/components/Modal/contexts/Modal.types.js +1 -0
- package/dist/components/Modal/contexts/index.d.ts +1 -0
- package/dist/components/Modal/hooks/index.d.ts +1 -0
- package/dist/components/Modal/hooks/useModal.d.ts +9 -0
- package/dist/components/NumberInput/NumberInput.d.ts +3 -0
- package/dist/components/NumberInput/NumberInput.js +11 -9
- package/dist/components/NumberInput/NumberInput.types.d.ts +11 -0
- package/dist/components/NumberInput/NumberInput.types.js +1 -0
- package/dist/components/NumberInput/NumberInput.variants.d.ts +11 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
- package/dist/components/ProgressBar/ProgressBar.js +16 -13
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +8 -0
- package/dist/components/ProgressBar/ProgressBar.types.js +1 -0
- package/dist/components/ProgressBar/ProgressBar.variants.d.ts +7 -0
- package/dist/components/Radio/Radio.d.ts +3 -0
- package/dist/components/Radio/Radio.js +37 -55
- package/dist/components/Radio/Radio.types.d.ts +12 -0
- package/dist/components/Radio/Radio.types.js +1 -0
- package/dist/components/Radio/Radio.variants.d.ts +3 -0
- package/dist/components/Radio/Radio.variants.js +16 -69
- package/dist/components/RadioGroup/RadioGroup.d.ts +3 -0
- package/dist/components/RadioGroup/RadioGroup.js +27 -37
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +12 -0
- package/dist/components/RadioGroup/RadioGroup.types.js +1 -0
- package/dist/components/Range/Range.d.ts +3 -0
- package/dist/components/Range/Range.js +22 -20
- package/dist/components/Range/Range.types.d.ts +13 -0
- package/dist/components/Range/Range.types.js +1 -0
- package/dist/components/Range/Range.variants.d.ts +14 -0
- package/dist/components/Sidebar/Sidebar.d.ts +5 -0
- package/dist/components/Sidebar/Sidebar.js +22 -20
- package/dist/components/Sidebar/Sidebar.types.d.ts +18 -0
- package/dist/components/Sidebar/Sidebar.types.js +1 -0
- package/dist/components/Sidebar/Sidebar.variants.d.ts +6 -0
- package/dist/components/Sidebar/components/Footer/Footer.d.ts +3 -0
- package/dist/components/Sidebar/components/Footer/Footer.js +12 -9
- package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +6 -0
- package/dist/components/Sidebar/components/Footer/Footer.types.js +1 -0
- package/dist/components/Sidebar/components/Footer/Footer.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/Logo/Logo.d.ts +3 -0
- package/dist/components/Sidebar/components/Logo/Logo.js +12 -9
- package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +6 -0
- package/dist/components/Sidebar/components/Logo/Logo.types.js +1 -0
- package/dist/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +4 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.js +15 -12
- package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +16 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.types.js +1 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +26 -24
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +7 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +20 -17
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +17 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +4 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +11 -8
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +5 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +13 -10
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +8 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +27 -29
- package/dist/components/Sidebar/components/index.d.ts +15 -0
- package/dist/components/Slider/Slider.d.ts +3 -0
- package/dist/components/Slider/Slider.js +20 -18
- package/dist/components/Slider/Slider.types.d.ts +13 -0
- package/dist/components/Slider/Slider.types.js +1 -0
- package/dist/components/Slider/Slider.variants.d.ts +11 -0
- package/dist/components/Switch/Switch.d.ts +3 -0
- package/dist/components/Switch/Switch.js +21 -19
- package/dist/components/Switch/Switch.types.d.ts +10 -0
- package/dist/components/Switch/Switch.types.js +1 -0
- package/dist/components/Switch/Switch.variants.d.ts +6 -0
- package/dist/components/Tag/Tag.d.ts +3 -0
- package/dist/components/Tag/Tag.types.d.ts +4 -0
- package/dist/components/Tag/Tag.types.js +1 -0
- package/dist/components/Tag/Tag.variants.d.ts +3 -0
- package/dist/components/TagSelect/TagSelect.d.ts +3 -0
- package/dist/components/TagSelect/TagSelect.js +21 -19
- package/dist/components/TagSelect/TagSelect.types.d.ts +9 -0
- package/dist/components/TagSelect/TagSelect.types.js +1 -0
- package/dist/components/TagSelect/TagSelect.variants.d.ts +9 -0
- package/dist/components/TagSelect/hooks/useTagSelect.d.ts +9 -0
- package/dist/components/TextArea/TextArea.d.ts +3 -0
- package/dist/components/TextArea/TextArea.js +19 -17
- package/dist/components/TextArea/TextArea.types.d.ts +10 -0
- package/dist/components/TextArea/TextArea.types.js +1 -0
- package/dist/components/TextArea/TextArea.variants.d.ts +3 -0
- package/dist/components/Toast/Toast.d.ts +3 -0
- package/dist/components/Toast/Toast.js +54 -52
- package/dist/components/Toast/Toast.types.d.ts +12 -0
- package/dist/components/Toast/Toast.types.js +1 -0
- package/dist/components/Toast/Toast.variants.d.ts +9 -0
- package/dist/components/Tooltip/Tooltip.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.js +12 -10
- package/dist/components/Tooltip/Tooltip.types.d.ts +8 -0
- package/dist/components/Tooltip/Tooltip.types.js +1 -0
- package/dist/components/Tooltip/Tooltip.variants.d.ts +8 -0
- package/dist/components/Tooltip/hooks/useTooltip.d.ts +4 -0
- package/dist/components/index.d.ts +21 -0
- package/dist/components/index.js +44 -50
- package/dist/contexts/index.d.ts +3 -0
- package/dist/contexts/theme.context.d.ts +6 -0
- package/dist/contexts/theme.hook.d.ts +7 -0
- package/dist/contexts/theme.provider.d.ts +6 -0
- package/dist/contexts/theme.provider.js +14 -84
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useToggle.d.ts +1 -0
- package/dist/{index-1GLoikpT.js → index-BaNV0qac.js} +6585 -6555
- package/dist/{index-CoqDsznq.js → index-BedjZUuB.js} +1 -1
- package/dist/{index-KEdwcThH.js → index-BtibbG81.js} +1 -1
- package/dist/{index-C5psggHV.js → index-D68N8v8R.js} +17 -17
- package/dist/{index-CJsYodgi.js → index-z-AJyzdv.js} +10 -10
- package/dist/index.d.ts +4 -522
- package/dist/index.js +53 -59
- package/dist/js.cookie-OLEfuq_g.js +74 -0
- package/dist/package.json +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/konstruct.d.ts +4 -0
- package/dist/plugins/konstruct.js +3 -3
- package/dist/plugins/utils/colors.d.ts +328 -0
- package/dist/styles.css +1 -1
- package/dist/styles.d.ts +0 -0
- package/dist/styles.js +1 -1
- package/dist/useBreadcrumb-DxYsZvj_.js +1398 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/{x-DU-Zw-L_.js → x-CRBgmX1Q.js} +1 -1
- package/package.json +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +0 -61
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +0 -90
- package/dist/components/Breadcrumb/components/index.js +0 -4
- package/dist/components/RadioCard/RadioCard.js +0 -41
- package/dist/components/RadioCard/RadioCard.variants.js +0 -19
- package/dist/components/RadioCardGroup/RadioCardGroup.js +0 -47
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +0 -21
- package/dist/components/RadioGroup/RadioGroup.variants.js +0 -21
- package/dist/useBreadcrumb-CojbXFVD.js +0 -1279
|
@@ -1,49 +1,52 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { R as C, A as b, P as y, O as N, C as O, T as A, D, a as T, b as v } from "../../
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
2
|
+
import { R as C, A as b, P as y, O as N, C as O, T as A, D, a as T, b as v } from "../../AlertDialogTrigger-D4Tm_9M0.js";
|
|
3
|
+
import "../../contexts/theme.context.js";
|
|
4
|
+
import { useTheme as j } from "../../contexts/theme.hook.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import "../../js.cookie-OLEfuq_g.js";
|
|
7
|
+
import { cn as r } from "../../utils/index.js";
|
|
8
|
+
import { Button as l } from "../Button/Button.js";
|
|
9
|
+
import { useAlertDialog as k } from "./hooks/useAlertDialog.js";
|
|
10
|
+
const G = ({
|
|
8
11
|
buttonCancelClassName: o,
|
|
9
12
|
buttonCancelText: i = "Cancel",
|
|
10
13
|
buttonConfirmClassName: s,
|
|
11
14
|
buttonConfirmText: c = "OK",
|
|
12
|
-
buttonText:
|
|
13
|
-
description:
|
|
15
|
+
buttonText: m,
|
|
16
|
+
description: d,
|
|
14
17
|
theme: a,
|
|
15
|
-
title:
|
|
16
|
-
onConfirm:
|
|
18
|
+
title: p,
|
|
19
|
+
onConfirm: h
|
|
17
20
|
}) => {
|
|
18
|
-
const { theme: n } =
|
|
19
|
-
onConfirm:
|
|
21
|
+
const { theme: n } = j(), { isOpen: f, handleCancel: x, handleConfirm: g, handleOpen: u } = k({
|
|
22
|
+
onConfirm: h
|
|
20
23
|
});
|
|
21
24
|
return /* @__PURE__ */ t(C, { open: f, children: [
|
|
22
|
-
/* @__PURE__ */ e(b, { text:
|
|
25
|
+
/* @__PURE__ */ e(b, { text: m, theme: a, onOpen: u }),
|
|
23
26
|
/* @__PURE__ */ t(y, { children: [
|
|
24
27
|
/* @__PURE__ */ e(N, { className: "bg-black opacity-75 inset-0 fixed" }),
|
|
25
28
|
/* @__PURE__ */ t(O, { className: "bg-white rounded-md fixed top-1/2 left-1/2 -translate-y-2/4 -translate-x-2/4 flex flex-col gap-8 p-6", children: [
|
|
26
|
-
/* @__PURE__ */ e(A, { className: "font-bold text-center text-2xl", children:
|
|
27
|
-
/* @__PURE__ */ e(D, { children:
|
|
29
|
+
/* @__PURE__ */ e(A, { className: "font-bold text-center text-2xl", children: p }),
|
|
30
|
+
/* @__PURE__ */ e(D, { children: d }),
|
|
28
31
|
/* @__PURE__ */ t("div", { className: "flex flex-row gap-5 justify-end", children: [
|
|
29
32
|
/* @__PURE__ */ e(T, { asChild: !0, children: /* @__PURE__ */ e(
|
|
30
|
-
|
|
33
|
+
l,
|
|
31
34
|
{
|
|
32
35
|
type: "button",
|
|
33
36
|
theme: a ?? n,
|
|
34
37
|
variant: "secondary",
|
|
35
|
-
className:
|
|
38
|
+
className: r(o),
|
|
36
39
|
onClick: x,
|
|
37
40
|
children: i
|
|
38
41
|
}
|
|
39
42
|
) }),
|
|
40
43
|
/* @__PURE__ */ e(v, { asChild: !0, children: /* @__PURE__ */ e(
|
|
41
|
-
|
|
44
|
+
l,
|
|
42
45
|
{
|
|
43
46
|
type: "button",
|
|
44
47
|
theme: a ?? n,
|
|
45
48
|
variant: "danger",
|
|
46
|
-
className:
|
|
49
|
+
className: r(s),
|
|
47
50
|
onClick: g,
|
|
48
51
|
children: c
|
|
49
52
|
}
|
|
@@ -54,5 +57,5 @@ const z = ({
|
|
|
54
57
|
] });
|
|
55
58
|
};
|
|
56
59
|
export {
|
|
57
|
-
|
|
60
|
+
G as AlertDialog
|
|
58
61
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { buttonAlertDialogVariants } from './AlertDialog.variants';
|
|
4
|
+
export interface AlertDialogProps extends PropsWithChildren, VariantProps<typeof buttonAlertDialogVariants> {
|
|
5
|
+
buttonCancelClassName?: string;
|
|
6
|
+
buttonCancelText?: string;
|
|
7
|
+
buttonConfirmClassName?: string;
|
|
8
|
+
buttonConfirmText?: string;
|
|
9
|
+
buttonText?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
o?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
onConfirm?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export type UseAlertiDialogProps = {
|
|
17
|
+
onConfirm: AlertDialogProps['onConfirm'];
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { A as
|
|
3
|
-
import "
|
|
2
|
+
import { A as a } from "../../../AlertDialogTrigger-D4Tm_9M0.js";
|
|
3
|
+
import "../../../contexts/theme.context.js";
|
|
4
4
|
import "../../../contexts/theme.hook.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import "../../../js.cookie-OLEfuq_g.js";
|
|
7
|
+
import "../../Button/Button.js";
|
|
5
8
|
export {
|
|
6
|
-
|
|
9
|
+
a as AlertDialogTrigger
|
|
7
10
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AlertDialogTrigger';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useAlertDialog';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { jsxs as R, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as A, useRef as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { forwardRef as A, useRef as p, useId as O, useImperativeHandle as T } from "react";
|
|
3
|
+
import "../../contexts/theme.context.js";
|
|
4
|
+
import { useTheme as V } from "../../contexts/theme.hook.js";
|
|
5
|
+
import "../../js.cookie-OLEfuq_g.js";
|
|
6
|
+
import { cn as c } from "../../utils/index.js";
|
|
7
|
+
import { useAutocomplete as g } from "./hooks/useAutocomplete.js";
|
|
8
|
+
import { List as j } from "./components/List/List.js";
|
|
9
|
+
import { labelVariants as y, autocompleteVariants as I } from "./Autocomplete.variants.js";
|
|
8
10
|
const k = A(
|
|
9
11
|
({
|
|
10
12
|
autoComplete: u = "off",
|
|
@@ -20,9 +22,9 @@ const k = A(
|
|
|
20
22
|
variant: r,
|
|
21
23
|
onChange: b
|
|
22
24
|
}, v) => {
|
|
23
|
-
const s =
|
|
25
|
+
const s = p(null), o = p(null), i = O(), { theme: C } = V(), m = N ?? C;
|
|
24
26
|
T(v, () => o.current, [o]);
|
|
25
|
-
const e =
|
|
27
|
+
const e = g({
|
|
26
28
|
options: f,
|
|
27
29
|
inputRef: o,
|
|
28
30
|
wrapperRef: s,
|
|
@@ -32,9 +34,9 @@ const k = A(
|
|
|
32
34
|
n ? /* @__PURE__ */ t(
|
|
33
35
|
"label",
|
|
34
36
|
{
|
|
35
|
-
htmlFor: l ??
|
|
36
|
-
className:
|
|
37
|
-
|
|
37
|
+
htmlFor: l ?? i,
|
|
38
|
+
className: c(
|
|
39
|
+
y({
|
|
38
40
|
theme: m,
|
|
39
41
|
variant: r,
|
|
40
42
|
className: d
|
|
@@ -47,13 +49,13 @@ const k = A(
|
|
|
47
49
|
"input",
|
|
48
50
|
{
|
|
49
51
|
ref: o,
|
|
50
|
-
id: l ??
|
|
52
|
+
id: l ?? i,
|
|
51
53
|
type: "text",
|
|
52
54
|
name: l,
|
|
53
55
|
role: "combobox",
|
|
54
56
|
autoComplete: u,
|
|
55
|
-
className:
|
|
56
|
-
|
|
57
|
+
className: c(
|
|
58
|
+
I({
|
|
57
59
|
theme: m,
|
|
58
60
|
variant: r,
|
|
59
61
|
className: a
|
|
@@ -66,7 +68,7 @@ const k = A(
|
|
|
66
68
|
}
|
|
67
69
|
),
|
|
68
70
|
e.showOptions && /* @__PURE__ */ t("div", { className: "absolute z-10 top-full w-full rounded-md mt-1 border shadow-sm", children: /* @__PURE__ */ t(
|
|
69
|
-
|
|
71
|
+
j,
|
|
70
72
|
{
|
|
71
73
|
className: a,
|
|
72
74
|
inputRef: o,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { autocompleteVariants } from './Autocomplete.variants';
|
|
4
|
+
export type Option = {
|
|
5
|
+
value: string;
|
|
6
|
+
};
|
|
7
|
+
export interface AutocompleteProps extends VariantProps<typeof autocompleteVariants> {
|
|
8
|
+
autoComplete?: 'off';
|
|
9
|
+
className?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
labelClassName?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
options: Option[];
|
|
14
|
+
placeHolderEmptyValues?: string | ReactNode;
|
|
15
|
+
placeHolderEmptyValuesClassName?: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
onChange(value: string): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const autocompleteVariants: (props?: ({
|
|
2
|
+
variant?: "default" | null | undefined;
|
|
3
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export declare const labelVariants: (props?: ({
|
|
6
|
+
variant?: "default" | null | undefined;
|
|
7
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as u } from "react";
|
|
3
3
|
import { cn as l } from "../../../../utils/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useNavigationUlList as b } from "../../hooks/useNavigationList.js";
|
|
5
|
+
import { emptyListVariants as N, listVariants as d, listItemVariants as x, buttonVariants as V } from "./List.variants.js";
|
|
6
6
|
const R = ({
|
|
7
7
|
className: e,
|
|
8
8
|
inputRef: a,
|
|
@@ -15,11 +15,11 @@ const R = ({
|
|
|
15
15
|
onClick: p
|
|
16
16
|
}) => {
|
|
17
17
|
const n = u(null);
|
|
18
|
-
return
|
|
18
|
+
return b({ ulRef: n, inputRef: a, wrapperRef: f, options: o }), o.length === 0 ? /* @__PURE__ */ s(
|
|
19
19
|
"span",
|
|
20
20
|
{
|
|
21
21
|
className: l(
|
|
22
|
-
|
|
22
|
+
N({
|
|
23
23
|
theme: r,
|
|
24
24
|
variant: t,
|
|
25
25
|
className: c
|
|
@@ -32,19 +32,19 @@ const R = ({
|
|
|
32
32
|
{
|
|
33
33
|
ref: n,
|
|
34
34
|
role: "listbox",
|
|
35
|
-
className: l(
|
|
35
|
+
className: l(d({ variant: t, theme: r, className: e })),
|
|
36
36
|
children: o.map(({ value: i }) => /* @__PURE__ */ s(
|
|
37
37
|
"li",
|
|
38
38
|
{
|
|
39
39
|
role: "option",
|
|
40
40
|
tabIndex: 0,
|
|
41
|
-
className: l(
|
|
41
|
+
className: l(x({ theme: r, variant: t })),
|
|
42
42
|
children: /* @__PURE__ */ s(
|
|
43
43
|
"button",
|
|
44
44
|
{
|
|
45
45
|
type: "button",
|
|
46
46
|
role: "button",
|
|
47
|
-
className: l(
|
|
47
|
+
className: l(V({ theme: r, variant: t })),
|
|
48
48
|
onClick: () => p(i),
|
|
49
49
|
children: i
|
|
50
50
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { ComponentRef, ReactNode, RefObject } from 'react';
|
|
3
|
+
import { Option } from '../../Autocomplete.types';
|
|
4
|
+
import { autocompleteVariants } from '../../Autocomplete.variants';
|
|
5
|
+
export interface Props extends VariantProps<typeof autocompleteVariants> {
|
|
6
|
+
className?: string;
|
|
7
|
+
inputRef: RefObject<ComponentRef<'input'> | null>;
|
|
8
|
+
wrapperRef: RefObject<ComponentRef<'div'> | null>;
|
|
9
|
+
options: Option[];
|
|
10
|
+
placeholder: string | ReactNode;
|
|
11
|
+
placeholderClassName?: string;
|
|
12
|
+
onClick(value: string): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const listVariants: (props?: ({
|
|
2
|
+
variant?: "default" | null | undefined;
|
|
3
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export declare const emptyListVariants: (props?: ({
|
|
6
|
+
variant?: "default" | null | undefined;
|
|
7
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export declare const listItemVariants: (props?: ({
|
|
10
|
+
variant?: "default" | null | undefined;
|
|
11
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
12
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
13
|
+
export declare const buttonVariants: (props?: ({
|
|
14
|
+
variant?: "default" | null | undefined;
|
|
15
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
16
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './List/List';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ChangeEvent, ComponentRef, RefObject } from 'react';
|
|
2
|
+
import { Option } from '../Autocomplete.types';
|
|
3
|
+
type UseAutocompleteProps = {
|
|
4
|
+
options: Option[];
|
|
5
|
+
inputRef: RefObject<ComponentRef<'input'> | null>;
|
|
6
|
+
wrapperRef: RefObject<ComponentRef<'div'> | null>;
|
|
7
|
+
onChange(value: string): void;
|
|
8
|
+
};
|
|
9
|
+
export declare const useAutocomplete: ({ options, inputRef, wrapperRef, onChange, }: UseAutocompleteProps) => {
|
|
10
|
+
inputRef: RefObject<HTMLInputElement | null>;
|
|
11
|
+
newOptions: Option[];
|
|
12
|
+
showOptions: boolean;
|
|
13
|
+
value: string;
|
|
14
|
+
handleChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
handleSelectValue: (value: string) => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentRef, RefObject } from 'react';
|
|
2
|
+
import { Option } from '../Autocomplete.types';
|
|
3
|
+
type UseNavigationListProps = {
|
|
4
|
+
ulRef: RefObject<ComponentRef<'ul'> | null>;
|
|
5
|
+
inputRef: RefObject<ComponentRef<'input'> | null>;
|
|
6
|
+
wrapperRef: RefObject<ComponentRef<'div'> | null>;
|
|
7
|
+
options: Option[];
|
|
8
|
+
};
|
|
9
|
+
export declare const useNavigationUlList: ({ ulRef, inputRef, wrapperRef, options, }: UseNavigationListProps) => void;
|
|
10
|
+
export {};
|
|
@@ -1,109 +1,110 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import d, { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as a, jsxs as g, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import d, { forwardRef as y, Fragment as O } from "react";
|
|
3
|
+
import "../../contexts/theme.context.js";
|
|
4
|
+
import { useTheme as j } from "../../contexts/theme.hook.js";
|
|
5
|
+
import "../../js.cookie-OLEfuq_g.js";
|
|
6
|
+
import { cn as h } from "../../utils/index.js";
|
|
7
|
+
import { breadcrumbVariants as w, breadcrumbItemVariants as x, chevronVariants as P } from "./Breadcrumb.variants.js";
|
|
8
|
+
import { u as k, L as N } from "../../useBreadcrumb-DxYsZvj_.js";
|
|
9
|
+
import { P as c } from "../../index-D68N8v8R.js";
|
|
10
|
+
function f() {
|
|
11
|
+
return f = Object.assign || function(e) {
|
|
10
12
|
for (var n = 1; n < arguments.length; n++) {
|
|
11
|
-
var
|
|
12
|
-
for (var
|
|
13
|
-
Object.prototype.hasOwnProperty.call(
|
|
13
|
+
var t = arguments[n];
|
|
14
|
+
for (var r in t)
|
|
15
|
+
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
14
16
|
}
|
|
15
17
|
return e;
|
|
16
|
-
},
|
|
18
|
+
}, f.apply(this, arguments);
|
|
17
19
|
}
|
|
18
|
-
function
|
|
20
|
+
function T(e, n) {
|
|
19
21
|
if (e == null) return {};
|
|
20
|
-
var
|
|
22
|
+
var t = L(e, n), r, o;
|
|
21
23
|
if (Object.getOwnPropertySymbols) {
|
|
22
24
|
var i = Object.getOwnPropertySymbols(e);
|
|
23
25
|
for (o = 0; o < i.length; o++)
|
|
24
|
-
|
|
26
|
+
r = i[o], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
|
|
25
27
|
}
|
|
26
|
-
return
|
|
28
|
+
return t;
|
|
27
29
|
}
|
|
28
30
|
function L(e, n) {
|
|
29
31
|
if (e == null) return {};
|
|
30
|
-
var
|
|
31
|
-
for (i = 0; i <
|
|
32
|
-
o =
|
|
33
|
-
return
|
|
32
|
+
var t = {}, r = Object.keys(e), o, i;
|
|
33
|
+
for (i = 0; i < r.length; i++)
|
|
34
|
+
o = r[i], !(n.indexOf(o) >= 0) && (t[o] = e[o]);
|
|
35
|
+
return t;
|
|
34
36
|
}
|
|
35
|
-
var p =
|
|
36
|
-
var
|
|
37
|
-
return /* @__PURE__ */ d.createElement("svg",
|
|
37
|
+
var p = y(function(e, n) {
|
|
38
|
+
var t = e.color, r = t === void 0 ? "currentColor" : t, o = e.size, i = o === void 0 ? 24 : o, s = T(e, ["color", "size"]);
|
|
39
|
+
return /* @__PURE__ */ d.createElement("svg", f({
|
|
38
40
|
ref: n,
|
|
39
41
|
xmlns: "http://www.w3.org/2000/svg",
|
|
40
42
|
width: i,
|
|
41
43
|
height: i,
|
|
42
44
|
viewBox: "0 0 24 24",
|
|
43
45
|
fill: "none",
|
|
44
|
-
stroke:
|
|
46
|
+
stroke: r,
|
|
45
47
|
strokeWidth: "2",
|
|
46
48
|
strokeLinecap: "round",
|
|
47
49
|
strokeLinejoin: "round"
|
|
48
|
-
},
|
|
50
|
+
}, s), /* @__PURE__ */ d.createElement("polyline", {
|
|
49
51
|
points: "9 18 15 12 9 6"
|
|
50
52
|
}));
|
|
51
53
|
});
|
|
52
54
|
p.propTypes = {
|
|
53
|
-
color:
|
|
54
|
-
size:
|
|
55
|
+
color: c.string,
|
|
56
|
+
size: c.oneOfType([c.string, c.number])
|
|
55
57
|
};
|
|
56
58
|
p.displayName = "ChevronRight";
|
|
57
|
-
const
|
|
59
|
+
const W = ({
|
|
58
60
|
className: e,
|
|
59
61
|
size: n,
|
|
60
|
-
steps:
|
|
61
|
-
theme:
|
|
62
|
-
"aria-label": o = "breadcrumb",
|
|
63
|
-
wrapperClassName: i,
|
|
64
|
-
...l
|
|
62
|
+
steps: t,
|
|
63
|
+
theme: r
|
|
65
64
|
}) => {
|
|
66
|
-
const
|
|
67
|
-
return /* @__PURE__ */ a(
|
|
68
|
-
"
|
|
65
|
+
const { theme: o } = j(), { isInsideRouter: i } = k(), s = r ?? o;
|
|
66
|
+
return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", children: /* @__PURE__ */ a(
|
|
67
|
+
"ol",
|
|
69
68
|
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
x({
|
|
73
|
-
className: i,
|
|
74
|
-
theme: m
|
|
75
|
-
})
|
|
69
|
+
className: h(
|
|
70
|
+
w({ theme: s, className: e, size: n })
|
|
76
71
|
),
|
|
77
|
-
children: /* @__PURE__ */
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
k,
|
|
72
|
+
children: t.map(({ label: m, to: l, target: u }, v) => /* @__PURE__ */ g(O, { children: [
|
|
73
|
+
/* @__PURE__ */ a(
|
|
74
|
+
"li",
|
|
75
|
+
{
|
|
76
|
+
className: h(
|
|
77
|
+
x({ theme: s, size: n })
|
|
78
|
+
),
|
|
79
|
+
children: l ? /* @__PURE__ */ a(b, { children: i ? /* @__PURE__ */ a(
|
|
80
|
+
N,
|
|
87
81
|
{
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
theme: m
|
|
82
|
+
to: l,
|
|
83
|
+
target: u,
|
|
84
|
+
className: "hover:underline hover:underline-offset-2",
|
|
85
|
+
children: m
|
|
93
86
|
}
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
p,
|
|
87
|
+
) : /* @__PURE__ */ a(
|
|
88
|
+
"a",
|
|
97
89
|
{
|
|
98
|
-
|
|
90
|
+
href: l,
|
|
91
|
+
target: u,
|
|
92
|
+
className: "hover:underline hover:underline-offset-2",
|
|
93
|
+
children: m
|
|
99
94
|
}
|
|
100
|
-
) })
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
95
|
+
) }) : /* @__PURE__ */ a("span", { "aria-current": "page", children: m })
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
v !== t.length - 1 && /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
|
|
99
|
+
p,
|
|
100
|
+
{
|
|
101
|
+
className: h(P({ size: n, theme: s }))
|
|
102
|
+
}
|
|
103
|
+
) })
|
|
104
|
+
] }, m))
|
|
104
105
|
}
|
|
105
|
-
);
|
|
106
|
+
) });
|
|
106
107
|
};
|
|
107
108
|
export {
|
|
108
|
-
|
|
109
|
+
W as Breadcrumb
|
|
109
110
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { breadcrumbVariants } from './Breadcrumb.variants';
|
|
3
|
+
export type Step = {
|
|
4
|
+
label: string;
|
|
5
|
+
to?: string;
|
|
6
|
+
target?: '_self' | '_blank';
|
|
7
|
+
};
|
|
8
|
+
export interface BreadcrumbProps extends VariantProps<typeof breadcrumbVariants> {
|
|
9
|
+
steps: Step[];
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const breadcrumbVariants: (props?: ({
|
|
2
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
3
|
+
size?: "base" | "sm" | "lg" | "xl" | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export declare const breadcrumbItemVariants: (props?: ({
|
|
6
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
7
|
+
size?: "base" | "sm" | "lg" | "xl" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
+
export declare const chevronVariants: (props?: ({
|
|
10
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
11
|
+
size?: "base" | "sm" | "lg" | "xl" | null | undefined;
|
|
12
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|