@konstructio/ui 0.0.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/LICENSE.md +21 -0
- package/README.md +19 -0
- package/dist/AlertDialogTrigger-BIbxXexQ.js +553 -0
- package/dist/Combination-Cmu9JRkv.js +479 -0
- package/dist/Modal-CO0_SnXD.js +909 -0
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/chevron-up-Cmu1oXfj.js +54 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +3 -0
- package/dist/components/AlertDialog/AlertDialog.js +54 -0
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +13 -0
- package/dist/components/AlertDialog/AlertDialog.types.js +1 -0
- package/dist/components/AlertDialog/AlertDialog.variants.d.ts +3 -0
- package/dist/components/AlertDialog/AlertDialog.variants.js +16 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +3 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +10 -0
- 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 +4 -0
- package/dist/components/AlertDialog/hooks/index.d.ts +1 -0
- package/dist/components/AlertDialog/hooks/index.js +4 -0
- package/dist/components/AlertDialog/hooks/useAlertDialog.d.ts +7 -0
- package/dist/components/AlertDialog/hooks/useAlertDialog.js +10 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +3 -0
- package/dist/components/Autocomplete/Autocomplete.js +84 -0
- 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/Autocomplete.variants.js +61 -0
- package/dist/components/Autocomplete/components/List.d.ts +3 -0
- package/dist/components/Autocomplete/components/List.js +57 -0
- package/dist/components/Autocomplete/components/List.types.d.ts +13 -0
- package/dist/components/Autocomplete/components/List.types.js +1 -0
- package/dist/components/Autocomplete/components/List.variants.d.ts +16 -0
- package/dist/components/Autocomplete/components/List.variants.js +81 -0
- package/dist/components/Autocomplete/hooks/index.d.ts +2 -0
- package/dist/components/Autocomplete/hooks/index.js +6 -0
- package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +17 -0
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +81 -0
- package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +10 -0
- package/dist/components/Autocomplete/hooks/useNavigationList.js +78 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +3 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +460 -0
- 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 +61 -0
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.d.ts +3 -0
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +5 -0
- package/dist/components/Button/Button.d.ts +4 -0
- package/dist/components/Button/Button.js +42 -0
- 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 +6 -0
- package/dist/components/Button/Button.variants.js +102 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.js +233 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +12 -0
- package/dist/components/Checkbox/Checkbox.types.js +1 -0
- package/dist/components/Checkbox/Checkbox.variants.d.ts +9 -0
- package/dist/components/Checkbox/Checkbox.variants.js +82 -0
- package/dist/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.js +10 -0
- package/dist/components/Dropdown/Dropdown.types.d.ts +15 -0
- package/dist/components/Dropdown/Dropdown.types.js +1 -0
- package/dist/components/Dropdown/Dropdown.variants.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.variants.js +45 -0
- package/dist/components/Dropdown/components/EmptyList.d.ts +2 -0
- package/dist/components/Dropdown/components/EmptyList.js +5 -0
- package/dist/components/Dropdown/components/List/List.d.ts +3 -0
- package/dist/components/Dropdown/components/List/List.js +25 -0
- package/dist/components/Dropdown/components/List/List.types.d.ts +8 -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/List/List.variants.js +34 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.d.ts +3 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.js +29 -0
- 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/ListItem/ListItem.variants.js +19 -0
- package/dist/components/Dropdown/components/Wrapper.d.ts +3 -0
- package/dist/components/Dropdown/components/Wrapper.js +90 -0
- package/dist/components/Dropdown/components/index.d.ts +3 -0
- package/dist/components/Dropdown/components/index.js +8 -0
- package/dist/components/Dropdown/contexts/dropdown.context.d.ts +8 -0
- package/dist/components/Dropdown/contexts/dropdown.context.js +14 -0
- package/dist/components/Dropdown/contexts/dropdown.hook.d.ts +2 -0
- package/dist/components/Dropdown/contexts/dropdown.hook.js +11 -0
- package/dist/components/Dropdown/contexts/dropdown.provider.d.ts +2 -0
- package/dist/components/Dropdown/contexts/dropdown.provider.js +11 -0
- package/dist/components/Dropdown/contexts/index.d.ts +2 -0
- package/dist/components/Dropdown/contexts/index.js +6 -0
- package/dist/components/Dropdown/hooks/useDropdown.d.ts +11 -0
- package/dist/components/Dropdown/hooks/useDropdown.js +65 -0
- package/dist/components/Dropdown/hooks/useNavigationList.d.ts +8 -0
- package/dist/components/Dropdown/hooks/useNavigationList.js +66 -0
- package/dist/components/Input/Input.d.ts +3 -0
- package/dist/components/Input/Input.js +178 -0
- 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/Input/Input.variants.js +43 -0
- package/dist/components/Modal/Modal.d.ts +8 -0
- package/dist/components/Modal/Modal.js +10 -0
- 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.js +7 -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.js +6 -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.js +6 -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 +13 -0
- 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/Wrapper/Wrapper.variants.js +48 -0
- package/dist/components/Modal/components/index.d.ts +4 -0
- package/dist/components/Modal/components/index.js +10 -0
- package/dist/components/Modal/contexts/Modal.context.d.ts +2 -0
- package/dist/components/Modal/contexts/Modal.context.js +20 -0
- package/dist/components/Modal/contexts/Modal.provider.d.ts +4 -0
- package/dist/components/Modal/contexts/Modal.provider.js +26 -0
- 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/contexts/index.js +4 -0
- package/dist/components/Modal/hooks/index.d.ts +1 -0
- package/dist/components/Modal/hooks/index.js +4 -0
- package/dist/components/Modal/hooks/useModal.d.ts +9 -0
- package/dist/components/Modal/hooks/useModal.js +27 -0
- package/dist/components/NumberInput/NumberInput.d.ts +3 -0
- package/dist/components/NumberInput/NumberInput.js +181 -0
- 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/NumberInput/NumberInput.variants.js +78 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
- package/dist/components/ProgressBar/ProgressBar.js +37 -0
- 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/ProgressBar/ProgressBar.variants.js +62 -0
- package/dist/components/Radio/Radio.d.ts +3 -0
- package/dist/components/Radio/Radio.js +58 -0
- 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 +49 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +3 -0
- package/dist/components/RadioGroup/RadioGroup.js +37 -0
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +11 -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 +70 -0
- 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/Range/Range.variants.js +93 -0
- package/dist/components/Slider/Slider.d.ts +3 -0
- package/dist/components/Slider/Slider.js +52 -0
- 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/Slider/Slider.variants.js +69 -0
- package/dist/components/Switch/Switch.d.ts +3 -0
- package/dist/components/Switch/Switch.js +176 -0
- 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/Switch/Switch.variants.js +58 -0
- package/dist/components/Tag/Tag.d.ts +3 -0
- package/dist/components/Tag/Tag.js +6 -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/Tag/Tag.variants.js +31 -0
- package/dist/components/TagSelect/TagSelect.d.ts +3 -0
- package/dist/components/TagSelect/TagSelect.js +75 -0
- 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/TagSelect.variants.js +83 -0
- package/dist/components/TagSelect/hooks/useTagSelect.d.ts +9 -0
- package/dist/components/TagSelect/hooks/useTagSelect.js +39 -0
- package/dist/components/TextArea/TextArea.d.ts +3 -0
- package/dist/components/TextArea/TextArea.js +34 -0
- 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/TextArea/TextArea.variants.js +34 -0
- package/dist/components/Toast/Toast.d.ts +3 -0
- package/dist/components/Toast/Toast.js +471 -0
- 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/Toast/Toast.variants.js +74 -0
- package/dist/components/Tooltip/Tooltip.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.js +42 -0
- 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/Tooltip.variants.js +93 -0
- package/dist/components/Tooltip/hooks/useTooltip.d.ts +4 -0
- package/dist/components/Tooltip/hooks/useTooltip.js +25 -0
- package/dist/components/index.d.ts +19 -0
- package/dist/components/index.js +40 -0
- package/dist/contexts/index.d.ts +3 -0
- package/dist/contexts/index.js +8 -0
- package/dist/contexts/theme.context.d.ts +6 -0
- package/dist/contexts/theme.context.js +10 -0
- package/dist/contexts/theme.hook.d.ts +7 -0
- package/dist/contexts/theme.hook.js +9 -0
- package/dist/contexts/theme.provider.d.ts +7 -0
- package/dist/contexts/theme.provider.js +17 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/useToggle.d.ts +1 -0
- package/dist/hooks/useToggle.js +11 -0
- package/dist/index-2K8qjK4R.js +145 -0
- package/dist/index-2hJuj4UN.js +19069 -0
- package/dist/index-4qm4jAkj.js +92 -0
- package/dist/index-8vgf-x5i.js +118 -0
- package/dist/index-BJ7FQg17.js +35 -0
- package/dist/index-B_GWswUP.js +71 -0
- package/dist/index-BqM_XclQ.js +94 -0
- package/dist/index-BwYCDOHZ.js +44 -0
- package/dist/index-BxeV34ij.js +32 -0
- package/dist/index-CCavb-1K.js +57 -0
- package/dist/index-DFbnnPzA.js +423 -0
- package/dist/index-DQMInta3.js +663 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +50 -0
- package/dist/js.cookie-OLEfuq_g.js +74 -0
- package/dist/package.json +118 -0
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +4 -0
- package/dist/plugins/konstruct.d.ts +4 -0
- package/dist/plugins/konstruct.js +104 -0
- package/dist/plugins/utils/colors.d.ts +206 -0
- package/dist/plugins/utils/colors.js +626 -0
- package/dist/styles.css +1 -0
- package/dist/styles.d.ts +0 -0
- package/dist/styles.js +1 -0
- package/dist/useBreadcrumb-BSMnc4Fu.js +341 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +2278 -0
- package/package.json +118 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as l, useRef as p, useImperativeHandle as a } from "react";
|
|
3
|
+
import { cn as u } from "../../../../utils/index.js";
|
|
4
|
+
import { useNavigationUlList as c } from "../../hooks/useNavigationList.js";
|
|
5
|
+
import { useDropdownContext as d } from "../../contexts/dropdown.hook.js";
|
|
6
|
+
import "../../contexts/dropdown.context.js";
|
|
7
|
+
import { ListItem as x } from "../ListItem/ListItem.js";
|
|
8
|
+
import { listVariants as v } from "./List.variants.js";
|
|
9
|
+
const j = l(
|
|
10
|
+
({ options: i, theme: o, wrapperRef: m, wrapperInputRef: s }, n) => {
|
|
11
|
+
const r = p(null), { isOpen: f } = d();
|
|
12
|
+
return a(n, () => r.current, [r]), c({ ulRef: r, wrapperRef: m, wrapperInputRef: s }), /* @__PURE__ */ e(
|
|
13
|
+
"ul",
|
|
14
|
+
{
|
|
15
|
+
ref: r,
|
|
16
|
+
role: "listbox",
|
|
17
|
+
className: u(v({ theme: o }), f ? "flex" : "hidden"),
|
|
18
|
+
children: i.map((t) => /* @__PURE__ */ e(x, { theme: o, ...t }, t.value))
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
export {
|
|
24
|
+
j as List
|
|
25
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { DropdownProps } from '../../Dropdown.types';
|
|
3
|
+
export type ListProps = {
|
|
4
|
+
options: DropdownProps['options'];
|
|
5
|
+
theme: DropdownProps['theme'];
|
|
6
|
+
wrapperRef: RefObject<HTMLDivElement>;
|
|
7
|
+
wrapperInputRef: RefObject<HTMLDivElement>;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { c as r } from "../../../../index-BwYCDOHZ.js";
|
|
2
|
+
const t = r(
|
|
3
|
+
[
|
|
4
|
+
"absolute",
|
|
5
|
+
"bg-white",
|
|
6
|
+
"border",
|
|
7
|
+
"duration-100",
|
|
8
|
+
"ease-in-out",
|
|
9
|
+
"flex-col",
|
|
10
|
+
"mt-1",
|
|
11
|
+
"overflow-hidden",
|
|
12
|
+
"rounded-md",
|
|
13
|
+
"shadow-sm",
|
|
14
|
+
"top-full",
|
|
15
|
+
"transition-all",
|
|
16
|
+
"w-full",
|
|
17
|
+
"z-10"
|
|
18
|
+
],
|
|
19
|
+
{
|
|
20
|
+
variants: {
|
|
21
|
+
theme: {
|
|
22
|
+
colony: ["border-red-400"],
|
|
23
|
+
konstruct: ["border-orange-400"],
|
|
24
|
+
kubefirst: ["border-kubefirst-purple-light"]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
theme: "kubefirst"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
export {
|
|
33
|
+
t as listVariants
|
|
34
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as s, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as c } from "react";
|
|
3
|
+
import { useDropdownContext as m } from "../../contexts/dropdown.hook.js";
|
|
4
|
+
import "../../contexts/dropdown.context.js";
|
|
5
|
+
import { listItemVariants as i } from "./ListItem.variants.js";
|
|
6
|
+
const d = ({ theme: n, ...e }) => {
|
|
7
|
+
const { setValue: t, toggleOpen: l } = m(), r = c(
|
|
8
|
+
(o) => {
|
|
9
|
+
t(o), l(!1);
|
|
10
|
+
},
|
|
11
|
+
[t, l]
|
|
12
|
+
);
|
|
13
|
+
return /* @__PURE__ */ s("li", { className: i({ theme: n }), role: "option", tabIndex: 0, children: /* @__PURE__ */ a(
|
|
14
|
+
"button",
|
|
15
|
+
{
|
|
16
|
+
type: "button",
|
|
17
|
+
role: "button",
|
|
18
|
+
className: "m-0 p-0 w-full flex items-center gap-3",
|
|
19
|
+
onClick: () => r(e),
|
|
20
|
+
children: [
|
|
21
|
+
e.leftIcon ? /* @__PURE__ */ s("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }) : null,
|
|
22
|
+
e.label
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
d as ListItem
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { c as e } from "../../../../index-BwYCDOHZ.js";
|
|
2
|
+
const o = e(
|
|
3
|
+
["cursor-pointer", "py-1", "px-2", "h-full", "focus-visible:outline-none"],
|
|
4
|
+
{
|
|
5
|
+
variants: {
|
|
6
|
+
theme: {
|
|
7
|
+
kubefirst: ["focus:bg-purple-100", "hover:bg-purple-100"],
|
|
8
|
+
konstruct: ["focus:bg-orange-100", "hover:bg-orange-100"],
|
|
9
|
+
colony: ["focus:bg-red-100", "hover:bg-red-100"]
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
defaultVariants: {
|
|
13
|
+
theme: "kubefirst"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
export {
|
|
18
|
+
o as listItemVariants
|
|
19
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as D, useId as F, useRef as b, useImperativeHandle as L, useEffect as m } from "react";
|
|
3
|
+
import { cn as $ } from "../../../utils/index.js";
|
|
4
|
+
import "../../../contexts/theme.context.js";
|
|
5
|
+
import { useTheme as A } from "../../../contexts/theme.hook.js";
|
|
6
|
+
import "../../../js.cookie-OLEfuq_g.js";
|
|
7
|
+
import { dropdownVariants as H } from "../Dropdown.variants.js";
|
|
8
|
+
import { useDropdown as U } from "../hooks/useDropdown.js";
|
|
9
|
+
import { useDropdownContext as W } from "../contexts/dropdown.hook.js";
|
|
10
|
+
import "../contexts/dropdown.context.js";
|
|
11
|
+
import { List as q } from "./List/List.js";
|
|
12
|
+
import { C as z } from "../../../chevron-up-Cmu1oXfj.js";
|
|
13
|
+
const _ = D(
|
|
14
|
+
({ theme: R, label: f, placeholder: g, name: i, options: l, defaultValue: c }, O) => {
|
|
15
|
+
const p = F(), r = b(null), u = b(null), { wrapperRef: n, wrapperInputRef: d, handleOpen: j, handleOpenIfClosed: E } = U({ ulRef: u }), { isOpen: h, value: e, setValue: x, toggleOpen: w } = W(), { theme: T } = A(), v = R ?? T, C = i ? `${p}-${i}` : p;
|
|
16
|
+
L(O, () => r.current, [r]), m(() => {
|
|
17
|
+
r.current && (r.current.value = e ? e.value : "");
|
|
18
|
+
}, [e]), m(() => {
|
|
19
|
+
if (c) {
|
|
20
|
+
const o = l.find(
|
|
21
|
+
(s) => s.value === c
|
|
22
|
+
);
|
|
23
|
+
o && x(o);
|
|
24
|
+
}
|
|
25
|
+
}, [c, l, x]), m(() => {
|
|
26
|
+
var s;
|
|
27
|
+
const o = new AbortController();
|
|
28
|
+
return (s = n.current) == null || s.addEventListener("focusout", (y) => {
|
|
29
|
+
var N;
|
|
30
|
+
const I = y.relatedTarget;
|
|
31
|
+
(!I || !((N = n.current) != null && N.contains(I))) && w(!1);
|
|
32
|
+
}), () => {
|
|
33
|
+
o.abort();
|
|
34
|
+
};
|
|
35
|
+
}, [w, n]);
|
|
36
|
+
const k = () => e != null && e.leftIcon ? /* @__PURE__ */ t("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }) : null;
|
|
37
|
+
return /* @__PURE__ */ a("div", { ref: n, className: "flex flex-col w-full relative", children: [
|
|
38
|
+
f ? /* @__PURE__ */ t(
|
|
39
|
+
"label",
|
|
40
|
+
{
|
|
41
|
+
className: "m-2 cursor-pointer",
|
|
42
|
+
htmlFor: C,
|
|
43
|
+
onClick: E,
|
|
44
|
+
children: f
|
|
45
|
+
}
|
|
46
|
+
) : null,
|
|
47
|
+
/* @__PURE__ */ a(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
ref: d,
|
|
51
|
+
id: C,
|
|
52
|
+
className: H({ theme: v }),
|
|
53
|
+
role: "combobox",
|
|
54
|
+
onClick: j,
|
|
55
|
+
"aria-expanded": h,
|
|
56
|
+
tabIndex: 0,
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ t("span", { className: "text-base text-inherit", children: e ? /* @__PURE__ */ a("span", { className: "flex gap-3 items-center", children: [
|
|
59
|
+
k(),
|
|
60
|
+
e.label
|
|
61
|
+
] }) : g }),
|
|
62
|
+
/* @__PURE__ */ t(
|
|
63
|
+
z,
|
|
64
|
+
{
|
|
65
|
+
className: $(
|
|
66
|
+
"w-4 h-4 text-inherit transition-all duration-50",
|
|
67
|
+
h ? "rotate-0" : "rotate-180"
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ t("input", { ref: r, type: "text", name: i, className: "hidden" }),
|
|
75
|
+
/* @__PURE__ */ t(
|
|
76
|
+
q,
|
|
77
|
+
{
|
|
78
|
+
ref: u,
|
|
79
|
+
wrapperRef: n,
|
|
80
|
+
wrapperInputRef: d,
|
|
81
|
+
options: l,
|
|
82
|
+
theme: v
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] });
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
export {
|
|
89
|
+
_ as Wrapper
|
|
90
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Option } from '../Dropdown.types';
|
|
2
|
+
export type DropdownContextType = {
|
|
3
|
+
value: Option | null;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
setValue: (value: Option) => void;
|
|
6
|
+
toggleOpen: (value?: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const DropdownContext: import('react').Context<DropdownContextType>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createContext as e } from "react";
|
|
2
|
+
const t = e({
|
|
3
|
+
value: null,
|
|
4
|
+
isOpen: !1,
|
|
5
|
+
toggleOpen() {
|
|
6
|
+
throw new Error("toggleOpen function must be overridden");
|
|
7
|
+
},
|
|
8
|
+
setValue() {
|
|
9
|
+
throw new Error("setValue function must be overridden");
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
t as DropdownContext
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useContext as t } from "react";
|
|
2
|
+
import { DropdownContext as r } from "./dropdown.context.js";
|
|
3
|
+
const s = () => {
|
|
4
|
+
const o = t(r);
|
|
5
|
+
if (!o)
|
|
6
|
+
throw new Error("useTheme must be used within a DropdownProvider");
|
|
7
|
+
return o;
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
s as useDropdownContext
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useState as s } from "react";
|
|
3
|
+
import { useToggle as l } from "../../../hooks/useToggle.js";
|
|
4
|
+
import { DropdownContext as m } from "./dropdown.context.js";
|
|
5
|
+
const d = ({ children: o }) => {
|
|
6
|
+
const [e, r] = l(!1), [t, n] = s(null);
|
|
7
|
+
return /* @__PURE__ */ p(m.Provider, { value: { value: t, isOpen: e, setValue: n, toggleOpen: r }, children: o });
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
d as DropdownProvider
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ElementRef, RefObject } from 'react';
|
|
2
|
+
type UseDropDownParams = {
|
|
3
|
+
ulRef: RefObject<ElementRef<'ul'>>;
|
|
4
|
+
};
|
|
5
|
+
export declare const useDropdown: ({ ulRef }: UseDropDownParams) => {
|
|
6
|
+
wrapperRef: RefObject<HTMLDivElement>;
|
|
7
|
+
wrapperInputRef: RefObject<HTMLDivElement>;
|
|
8
|
+
handleOpen: () => void;
|
|
9
|
+
handleOpenIfClosed: () => void;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useRef as u, useEffect as f, useCallback as p } from "react";
|
|
2
|
+
import { useDropdownContext as w } from "../contexts/dropdown.hook.js";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
import "../contexts/dropdown.context.js";
|
|
5
|
+
const k = ({ ulRef: a }) => {
|
|
6
|
+
const l = u(null), o = u(null), { isOpen: c, toggleOpen: e } = w();
|
|
7
|
+
f(() => {
|
|
8
|
+
var r;
|
|
9
|
+
const n = new AbortController(), s = (t) => {
|
|
10
|
+
t.key === "Escape" && e(!1);
|
|
11
|
+
}, i = (t) => {
|
|
12
|
+
var d;
|
|
13
|
+
(d = l.current) != null && d.contains(t.target) || e(!1);
|
|
14
|
+
};
|
|
15
|
+
return document.addEventListener("keydown", s, {
|
|
16
|
+
signal: n.signal
|
|
17
|
+
}), document.addEventListener("mousedown", i, {
|
|
18
|
+
signal: n.signal
|
|
19
|
+
}), document.addEventListener(
|
|
20
|
+
"visibilitychange",
|
|
21
|
+
() => {
|
|
22
|
+
document.hidden && e(!1);
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
signal: n.signal
|
|
26
|
+
}
|
|
27
|
+
), (r = o.current) == null || r.addEventListener(
|
|
28
|
+
"focus",
|
|
29
|
+
() => {
|
|
30
|
+
e(!0);
|
|
31
|
+
},
|
|
32
|
+
{ signal: n.signal }
|
|
33
|
+
), () => {
|
|
34
|
+
n.abort();
|
|
35
|
+
};
|
|
36
|
+
}, [e, l]), f(() => {
|
|
37
|
+
var s;
|
|
38
|
+
const n = new AbortController();
|
|
39
|
+
return (s = o.current) == null || s.addEventListener(
|
|
40
|
+
"keydown",
|
|
41
|
+
(i) => {
|
|
42
|
+
var r;
|
|
43
|
+
if (i.key === "ArrowDown") {
|
|
44
|
+
const t = (r = a.current) == null ? void 0 : r.querySelector("li");
|
|
45
|
+
t && t.focus();
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{ signal: n.signal }
|
|
49
|
+
), () => {
|
|
50
|
+
n.abort();
|
|
51
|
+
};
|
|
52
|
+
}, [o, a]);
|
|
53
|
+
const g = p(() => e(!0), [e]), m = p(() => {
|
|
54
|
+
c || e(!1);
|
|
55
|
+
}, [c, e]);
|
|
56
|
+
return {
|
|
57
|
+
wrapperRef: l,
|
|
58
|
+
wrapperInputRef: o,
|
|
59
|
+
handleOpen: g,
|
|
60
|
+
handleOpenIfClosed: m
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
k as useDropdown
|
|
65
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
type UseNavigationListProps = {
|
|
3
|
+
ulRef: RefObject<HTMLUListElement>;
|
|
4
|
+
wrapperRef: RefObject<HTMLDivElement>;
|
|
5
|
+
wrapperInputRef: RefObject<HTMLDivElement>;
|
|
6
|
+
};
|
|
7
|
+
export declare const useNavigationUlList: ({ ulRef, wrapperRef, wrapperInputRef, }: UseNavigationListProps) => void;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useRef as k, useEffect as a } from "react";
|
|
2
|
+
import { useDropdownContext as d } from "../contexts/dropdown.hook.js";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
import "../contexts/dropdown.context.js";
|
|
5
|
+
const h = ({
|
|
6
|
+
ulRef: n,
|
|
7
|
+
wrapperRef: f,
|
|
8
|
+
wrapperInputRef: u
|
|
9
|
+
}) => {
|
|
10
|
+
const r = k(0), { isOpen: b } = d();
|
|
11
|
+
a(() => {
|
|
12
|
+
var s, m;
|
|
13
|
+
const e = ((s = n.current) == null ? void 0 : s.querySelectorAll("li")) ?? [], c = new AbortController(), i = () => {
|
|
14
|
+
r.current < e.length - 1 ? (r.current = r.current + 1, e[r.current].focus()) : (r.current = 0, e[0].focus());
|
|
15
|
+
}, o = () => {
|
|
16
|
+
var t;
|
|
17
|
+
r.current > 0 ? (r.current = r.current - 1, e[r.current].focus()) : (r.current = 0, (t = u.current) == null || t.focus());
|
|
18
|
+
};
|
|
19
|
+
return (m = n.current) == null || m.addEventListener(
|
|
20
|
+
"keydown",
|
|
21
|
+
(t) => {
|
|
22
|
+
var g;
|
|
23
|
+
switch (t.preventDefault(), t.key) {
|
|
24
|
+
case "ArrowDown": {
|
|
25
|
+
i();
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
case "Tab": {
|
|
29
|
+
t.shiftKey ? o() : i();
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
case "ArrowUp": {
|
|
33
|
+
r.current === 0 ? (g = u.current) == null || g.focus() : o();
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
case "Enter": {
|
|
37
|
+
const l = e[r.current].querySelector("button");
|
|
38
|
+
l == null || l.click();
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{ signal: c.signal }
|
|
44
|
+
), () => {
|
|
45
|
+
c.abort();
|
|
46
|
+
};
|
|
47
|
+
}, [n, r, u]), a(() => {
|
|
48
|
+
var c;
|
|
49
|
+
const e = new AbortController();
|
|
50
|
+
return (c = f.current) == null || c.addEventListener(
|
|
51
|
+
"mouseenter",
|
|
52
|
+
() => {
|
|
53
|
+
var o;
|
|
54
|
+
(((o = n.current) == null ? void 0 : o.querySelectorAll("li")) ?? []).forEach((s) => s.blur());
|
|
55
|
+
},
|
|
56
|
+
{ signal: e.signal }
|
|
57
|
+
), () => {
|
|
58
|
+
e.abort();
|
|
59
|
+
};
|
|
60
|
+
}, [n, f]), a(() => {
|
|
61
|
+
b || (r.current = 0);
|
|
62
|
+
}, [b]);
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
h as useNavigationUlList
|
|
66
|
+
};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { jsxs as y, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import s, { forwardRef as m, useId as b } from "react";
|
|
3
|
+
import { cn as w } from "../../utils/index.js";
|
|
4
|
+
import { inputVariants as j } from "./Input.variants.js";
|
|
5
|
+
import "../../contexts/theme.context.js";
|
|
6
|
+
import { useTheme as N } from "../../contexts/theme.hook.js";
|
|
7
|
+
import "../../js.cookie-OLEfuq_g.js";
|
|
8
|
+
import { P as l } from "../../index-DQMInta3.js";
|
|
9
|
+
function p() {
|
|
10
|
+
return p = Object.assign || function(e) {
|
|
11
|
+
for (var o = 1; o < arguments.length; o++) {
|
|
12
|
+
var r = arguments[o];
|
|
13
|
+
for (var t in r)
|
|
14
|
+
Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
|
|
15
|
+
}
|
|
16
|
+
return e;
|
|
17
|
+
}, p.apply(this, arguments);
|
|
18
|
+
}
|
|
19
|
+
function P(e, o) {
|
|
20
|
+
if (e == null) return {};
|
|
21
|
+
var r = k(e, o), t, n;
|
|
22
|
+
if (Object.getOwnPropertySymbols) {
|
|
23
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
24
|
+
for (n = 0; n < i.length; n++)
|
|
25
|
+
t = i[n], !(o.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
|
|
26
|
+
}
|
|
27
|
+
return r;
|
|
28
|
+
}
|
|
29
|
+
function k(e, o) {
|
|
30
|
+
if (e == null) return {};
|
|
31
|
+
var r = {}, t = Object.keys(e), n, i;
|
|
32
|
+
for (i = 0; i < t.length; i++)
|
|
33
|
+
n = t[i], !(o.indexOf(n) >= 0) && (r[n] = e[n]);
|
|
34
|
+
return r;
|
|
35
|
+
}
|
|
36
|
+
var u = m(function(e, o) {
|
|
37
|
+
var r = e.color, t = r === void 0 ? "currentColor" : r, n = e.size, i = n === void 0 ? 24 : n, c = P(e, ["color", "size"]);
|
|
38
|
+
return /* @__PURE__ */ s.createElement("svg", p({
|
|
39
|
+
ref: o,
|
|
40
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
+
width: i,
|
|
42
|
+
height: i,
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
fill: "none",
|
|
45
|
+
stroke: t,
|
|
46
|
+
strokeWidth: "2",
|
|
47
|
+
strokeLinecap: "round",
|
|
48
|
+
strokeLinejoin: "round"
|
|
49
|
+
}, c), /* @__PURE__ */ s.createElement("circle", {
|
|
50
|
+
cx: "12",
|
|
51
|
+
cy: "12",
|
|
52
|
+
r: "10"
|
|
53
|
+
}), /* @__PURE__ */ s.createElement("line", {
|
|
54
|
+
x1: "12",
|
|
55
|
+
y1: "8",
|
|
56
|
+
x2: "12",
|
|
57
|
+
y2: "12"
|
|
58
|
+
}), /* @__PURE__ */ s.createElement("line", {
|
|
59
|
+
x1: "12",
|
|
60
|
+
y1: "16",
|
|
61
|
+
x2: "12.01",
|
|
62
|
+
y2: "16"
|
|
63
|
+
}));
|
|
64
|
+
});
|
|
65
|
+
u.propTypes = {
|
|
66
|
+
color: l.string,
|
|
67
|
+
size: l.oneOfType([l.string, l.number])
|
|
68
|
+
};
|
|
69
|
+
u.displayName = "AlertCircle";
|
|
70
|
+
function f() {
|
|
71
|
+
return f = Object.assign || function(e) {
|
|
72
|
+
for (var o = 1; o < arguments.length; o++) {
|
|
73
|
+
var r = arguments[o];
|
|
74
|
+
for (var t in r)
|
|
75
|
+
Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
|
|
76
|
+
}
|
|
77
|
+
return e;
|
|
78
|
+
}, f.apply(this, arguments);
|
|
79
|
+
}
|
|
80
|
+
function E(e, o) {
|
|
81
|
+
if (e == null) return {};
|
|
82
|
+
var r = z(e, o), t, n;
|
|
83
|
+
if (Object.getOwnPropertySymbols) {
|
|
84
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
85
|
+
for (n = 0; n < i.length; n++)
|
|
86
|
+
t = i[n], !(o.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
|
|
87
|
+
}
|
|
88
|
+
return r;
|
|
89
|
+
}
|
|
90
|
+
function z(e, o) {
|
|
91
|
+
if (e == null) return {};
|
|
92
|
+
var r = {}, t = Object.keys(e), n, i;
|
|
93
|
+
for (i = 0; i < t.length; i++)
|
|
94
|
+
n = t[i], !(o.indexOf(n) >= 0) && (r[n] = e[n]);
|
|
95
|
+
return r;
|
|
96
|
+
}
|
|
97
|
+
var h = m(function(e, o) {
|
|
98
|
+
var r = e.color, t = r === void 0 ? "currentColor" : r, n = e.size, i = n === void 0 ? 24 : n, c = E(e, ["color", "size"]);
|
|
99
|
+
return /* @__PURE__ */ s.createElement("svg", f({
|
|
100
|
+
ref: o,
|
|
101
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
102
|
+
width: i,
|
|
103
|
+
height: i,
|
|
104
|
+
viewBox: "0 0 24 24",
|
|
105
|
+
fill: "none",
|
|
106
|
+
stroke: t,
|
|
107
|
+
strokeWidth: "2",
|
|
108
|
+
strokeLinecap: "round",
|
|
109
|
+
strokeLinejoin: "round"
|
|
110
|
+
}, c), /* @__PURE__ */ s.createElement("path", {
|
|
111
|
+
d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"
|
|
112
|
+
}), /* @__PURE__ */ s.createElement("line", {
|
|
113
|
+
x1: "1",
|
|
114
|
+
y1: "1",
|
|
115
|
+
x2: "23",
|
|
116
|
+
y2: "23"
|
|
117
|
+
}));
|
|
118
|
+
});
|
|
119
|
+
h.propTypes = {
|
|
120
|
+
color: l.string,
|
|
121
|
+
size: l.oneOfType([l.string, l.number])
|
|
122
|
+
};
|
|
123
|
+
h.displayName = "EyeOff";
|
|
124
|
+
const _ = m(
|
|
125
|
+
({
|
|
126
|
+
className: e,
|
|
127
|
+
error: o,
|
|
128
|
+
label: r,
|
|
129
|
+
labelClassName: t,
|
|
130
|
+
name: n,
|
|
131
|
+
type: i,
|
|
132
|
+
theme: c,
|
|
133
|
+
onClickIcon: g,
|
|
134
|
+
...d
|
|
135
|
+
}, x) => {
|
|
136
|
+
const v = b(), { theme: O } = N();
|
|
137
|
+
return /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
|
|
138
|
+
r ? /* @__PURE__ */ a(
|
|
139
|
+
"label",
|
|
140
|
+
{
|
|
141
|
+
htmlFor: v,
|
|
142
|
+
className: w("pl-1 cursor-pointer", t),
|
|
143
|
+
children: r
|
|
144
|
+
}
|
|
145
|
+
) : null,
|
|
146
|
+
/* @__PURE__ */ y("div", { className: "relative", children: [
|
|
147
|
+
/* @__PURE__ */ a(
|
|
148
|
+
"input",
|
|
149
|
+
{
|
|
150
|
+
id: v,
|
|
151
|
+
ref: x,
|
|
152
|
+
name: n,
|
|
153
|
+
type: i,
|
|
154
|
+
className: j({
|
|
155
|
+
className: e,
|
|
156
|
+
theme: c ?? O,
|
|
157
|
+
variant: o ? "error" : "default"
|
|
158
|
+
}),
|
|
159
|
+
...d
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
o ? /* @__PURE__ */ a("i", { className: "absolute right-2 text-red-600 top-0 translate-y-[40%]", children: /* @__PURE__ */ a(u, { className: "w-5 h-5" }) }) : null,
|
|
163
|
+
i === "password" ? /* @__PURE__ */ a("i", { className: "absolute right-2 text-slate-400 top-0 translate-y-[40%]", children: /* @__PURE__ */ a(
|
|
164
|
+
h,
|
|
165
|
+
{
|
|
166
|
+
className: "w-5 h-5 cursor-pointer",
|
|
167
|
+
onClick: g
|
|
168
|
+
}
|
|
169
|
+
) }) : null
|
|
170
|
+
] }),
|
|
171
|
+
o ? /* @__PURE__ */ a("span", { className: "text-xs text-red-600 -mt-0.5 pl-2", children: o }) : null
|
|
172
|
+
] });
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
_.displayName = "Input";
|
|
176
|
+
export {
|
|
177
|
+
_ as Input
|
|
178
|
+
};
|