@konstructio/ui 0.1.2-alpha.5 → 0.1.2-alpha.51
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-VYaRRJBZ.js → Combination-BtmnusWq.js} +141 -138
- package/dist/DatePicker.css +1 -1
- package/dist/Modal-CjC-CIJ8.js +99 -0
- package/dist/assets/icons/index.js +7 -0
- package/dist/chevron-down-DgT-uSF9.js +5 -0
- package/dist/chevron-right-DYvXLeql.js +7 -0
- package/dist/chevron-up-DEfvgPCw.js +54 -0
- package/dist/chevron-up-DrQr2Fwd.js +5 -0
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +81 -53
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +3 -2
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Badge/Badge.js +41 -44
- package/dist/components/Badge/Badge.variants.js +52 -13
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +3 -3
- package/dist/components/Breadcrumb/components/Item/Item.js +22 -22
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +25 -14
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.variants.js +108 -98
- package/dist/components/Card/Card.variants.js +7 -12
- package/dist/components/Checkbox/Checkbox.js +108 -105
- package/dist/components/Checkbox/Checkbox.variants.js +34 -7
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +2 -2
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Counter/Counter.js +210 -0
- package/dist/components/Counter/Counter.variants.js +70 -0
- package/dist/components/Datepicker/DatePicker.js +1587 -1353
- package/dist/components/Divider/Divider.variants.js +1 -1
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +1 -1
- package/dist/components/Filter/Filter.variants.js +8 -7
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +71 -45
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +2 -2
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +76 -43
- package/dist/components/Filter/components/ResetButton/ResetButton.js +15 -12
- package/dist/components/Filter/events/index.js +3 -3
- package/dist/components/ImageUpload/ImageUpload.js +221 -0
- package/dist/components/ImageUpload/ImageUpload.variants.js +109 -0
- package/dist/components/Input/Input.js +185 -118
- package/dist/components/Input/Input.variants.js +24 -19
- package/dist/components/Loading/Loading.js +1 -7
- package/dist/components/Modal/Modal.js +2 -2
- 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 +4 -4
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +34 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +30 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.js +30 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +38 -0
- package/dist/components/MultiSelectDropdown/components/List/List.js +30 -0
- package/dist/components/MultiSelectDropdown/components/List/List.variants.js +25 -0
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +119 -0
- package/dist/components/MultiSelectDropdown/components/index.js +8 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +21 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +13 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +138 -0
- package/dist/components/MultiSelectDropdown/contexts/index.js +6 -0
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +32 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +8 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +46 -0
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +36 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +690 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +60 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +45 -0
- package/dist/components/PhoneNumberInput/components/Wrapper.js +651 -0
- package/dist/components/PhoneNumberInput/components/index.js +6 -0
- package/dist/components/PhoneNumberInput/contexts/index.js +8 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +28 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +13 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +6144 -0
- package/dist/components/PhoneNumberInput/utils/index.js +11 -0
- package/dist/components/PieChart/PieChart.js +463 -482
- package/dist/components/Radio/Radio.js +47 -44
- package/dist/components/Radio/Radio.variants.js +12 -8
- package/dist/components/RadioCard/RadioCard.variants.js +1 -6
- package/dist/components/RadioGroup/RadioGroup.js +10 -10
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Select/Select.js +48 -0
- package/dist/components/{Dropdown/Dropdown.variants.js → Select/Select.variants.js} +17 -11
- package/dist/components/Select/components/List/List.js +172 -0
- package/dist/components/{Dropdown → Select}/components/List/List.variants.js +11 -8
- package/dist/components/Select/components/ListItem/ListItem.js +117 -0
- package/dist/components/{Dropdown → Select}/components/ListItem/ListItem.variants.js +5 -4
- package/dist/components/Select/components/Wrapper.js +226 -0
- package/dist/components/Select/constants/index.js +4 -0
- package/dist/components/Select/constants/pagination.js +4 -0
- package/dist/components/Select/contexts/index.js +6 -0
- package/dist/components/Select/contexts/select.context.js +36 -0
- package/dist/components/Select/contexts/select.hook.js +11 -0
- package/dist/components/Select/contexts/select.provider.js +58 -0
- package/dist/components/Select/hooks/useNavigationList.js +50 -0
- package/dist/components/Select/hooks/useSelect.js +103 -0
- package/dist/components/Sidebar/Sidebar.variants.js +2 -2
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +156 -129
- package/dist/components/Switch/Switch.variants.js +19 -10
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.variants.js +4 -3
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/Tag.variants.js +1 -0
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +49 -98
- package/dist/components/TimePicker/TimePicker.js +1 -1
- package/dist/components/TimePicker/TimePicker.variants.js +26 -14
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +30 -20
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +57 -35
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +53 -45
- package/dist/components/Toast/Toast.js +283 -256
- package/dist/components/Toast/Toast.variants.js +37 -24
- package/dist/components/Tooltip/Tooltip.js +15 -14
- package/dist/components/Tooltip/Tooltip.variants.js +5 -4
- package/dist/components/Typography/Typography.js +23 -25
- package/dist/components/Typography/Typography.variants.js +55 -52
- package/dist/components/VirtualizedTable/VirtualizedTable.js +97 -71
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +95 -33
- package/dist/components/VirtualizedTable/components/Body/Body.js +73 -21
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +94 -91
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +20 -20
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +61 -44
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +33 -21
- package/dist/components/VirtualizedTable/components/Header/Header.js +61 -41
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +43 -22
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +106 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +22 -1858
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
- package/dist/components/VirtualizedTable/components/index.js +8 -6
- package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +68 -761
- package/dist/components/index.js +94 -86
- package/dist/contexts/theme.provider.js +0 -1
- package/dist/{createLucideIcon-D2CN7Ma9.js → createLucideIcon-D4r5Phnh.js} +0 -24
- package/dist/ellipsis-vertical-BVPtjl5f.js +9 -0
- package/dist/{index-C1g_chDT.js → index-AV6ZtGhy.js} +2 -2
- package/dist/index-BG8O18ZY.js +93 -0
- package/dist/index-BKjcReYh.js +55 -0
- package/dist/{index-N2OStZoU.js → index-BOE_3f_Z.js} +4 -25
- package/dist/{index-Cd2vhaop.js → index-BlSRBdPy.js} +5 -6
- package/dist/index-BmVmDQGH.js +662 -0
- package/dist/index-BvoZGpli.js +60 -0
- package/dist/index-Byr10W8m.js +1873 -0
- package/dist/{index-Dx2grAuN.js → index-CSWGJT-v.js} +0 -20
- package/dist/index-CeZcoQDw.js +479 -0
- package/dist/index-D6KzX_ef.js +135 -0
- package/dist/{index-B7t8D14s.js → index-D9SSJ6om.js} +4 -4
- package/dist/index-DKfEnhKr.js +200 -0
- package/dist/index-DLcqcWxM.js +29 -0
- package/dist/{index-ti1b9kqV.js → index-DMb4KD0b.js} +4 -4
- package/dist/{index-BAEWsOG1.js → index-DtEcCIrM.js} +1 -1
- package/dist/{index-bwWKd82e.js → index-Dy59FQl5.js} +1 -1
- package/dist/{index-C84F4YyO.js → index-gSPwC-1I.js} +10 -11
- package/dist/{index-Bnb0ezr3.js → index-vcSp8YRZ.js} +11 -12
- package/dist/index.d.ts +2142 -99
- package/dist/index.js +116 -106
- package/dist/libphonenumber-FTwQ9nyV.js +11549 -0
- package/dist/loader-juvMSJ9L.js +5 -0
- package/dist/package.json +43 -33
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +194 -168
- package/dist/ui/theme.css +27 -0
- package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
- package/dist/utils/index.js +534 -501
- package/dist/x-BXShoIAM.js +8 -0
- package/dist/{x-4F_5p77m.js → x-Eoa9FJjA.js} +1 -1
- package/package.json +43 -33
- package/dist/Modal-D-NOEWMX.js +0 -98
- package/dist/chevron-down-MZvQoT2F.js +0 -11
- package/dist/chevron-right-VYBOBhRt.js +0 -19
- package/dist/components/Dropdown/Dropdown.js +0 -42
- package/dist/components/Dropdown/components/List/List.js +0 -79
- package/dist/components/Dropdown/components/ListItem/ListItem.js +0 -67
- package/dist/components/Dropdown/components/Wrapper.js +0 -205
- package/dist/components/Dropdown/contexts/dropdown.context.js +0 -19
- package/dist/components/Dropdown/contexts/dropdown.hook.js +0 -13
- package/dist/components/Dropdown/contexts/dropdown.provider.js +0 -30
- package/dist/components/Dropdown/contexts/index.js +0 -6
- package/dist/components/Dropdown/hooks/useDropdown.js +0 -58
- package/dist/components/Dropdown/hooks/useNavigationList.js +0 -62
- package/dist/components/NumberInput/NumberInput.js +0 -179
- package/dist/components/NumberInput/NumberInput.variants.js +0 -50
- package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +0 -16
- package/dist/index-BITvcJAz.js +0 -423
- package/dist/index-BfXxHr_2.js +0 -125
- package/dist/index-Cvx4lqTq.js +0 -47
- package/dist/index-DBbEcSUG.js +0 -31
- package/dist/index-DQH6odE9.js +0 -82
- package/dist/index-DzIBBMjs.js +0 -436
- package/dist/index-os7vysFS.js +0 -131
- /package/dist/components/{Dropdown → Select}/components/EmptyList.js +0 -0
- /package/dist/components/{Dropdown → Select}/components/index.js +0 -0
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { createContext as e } from "react";
|
|
2
|
-
const t = e({
|
|
3
|
-
highlightSearchEnabled: !1,
|
|
4
|
-
isOpen: !1,
|
|
5
|
-
searchTerm: "",
|
|
6
|
-
value: void 0,
|
|
7
|
-
setSearchTerm() {
|
|
8
|
-
throw new Error("setSearchTerm function must be overridden");
|
|
9
|
-
},
|
|
10
|
-
setValue() {
|
|
11
|
-
throw new Error("setValue function must be overridden");
|
|
12
|
-
},
|
|
13
|
-
toggleOpen() {
|
|
14
|
-
throw new Error("toggleOpen function must be overridden");
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
export {
|
|
18
|
-
t as DropdownContext
|
|
19
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useContext as t } from "react";
|
|
2
|
-
import { DropdownContext as r } from "./dropdown.context.js";
|
|
3
|
-
const p = () => {
|
|
4
|
-
const o = t(r);
|
|
5
|
-
if (!o)
|
|
6
|
-
throw new Error(
|
|
7
|
-
"useDropdownContext must be used within a DropdownProvider"
|
|
8
|
-
);
|
|
9
|
-
return o;
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
p as useDropdownContext
|
|
13
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as p, useState as d, useCallback as v } from "react";
|
|
3
|
-
import { DropdownContext as S } from "./dropdown.context.js";
|
|
4
|
-
import { useToggle as b } from "../../../hooks/useToggle.js";
|
|
5
|
-
const D = ({ children: s, value: n, name: e, highlightSearch: c = !1, onChange: r, onBlur: t }) => {
|
|
6
|
-
const l = p(c), [h, i] = b(!1), [m, g] = d(""), u = v(
|
|
7
|
-
(o, a) => {
|
|
8
|
-
a?.current && (a.current.value = o), r?.({ target: { value: o, name: e ?? "" } }), t?.();
|
|
9
|
-
},
|
|
10
|
-
[r, e, t]
|
|
11
|
-
);
|
|
12
|
-
return /* @__PURE__ */ f(
|
|
13
|
-
S.Provider,
|
|
14
|
-
{
|
|
15
|
-
value: {
|
|
16
|
-
highlightSearchEnabled: l.current,
|
|
17
|
-
isOpen: h,
|
|
18
|
-
searchTerm: m,
|
|
19
|
-
value: n,
|
|
20
|
-
setSearchTerm: g,
|
|
21
|
-
setValue: u,
|
|
22
|
-
toggleOpen: i
|
|
23
|
-
},
|
|
24
|
-
children: s
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
D as DropdownProvider
|
|
30
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { useRef as c, useEffect as u, useCallback as f } from "react";
|
|
2
|
-
import { useDropdownContext as g } from "../contexts/dropdown.hook.js";
|
|
3
|
-
const w = ({ ulRef: l, inputRef: i }) => {
|
|
4
|
-
const o = c(null), t = c(null), { toggleOpen: n } = g();
|
|
5
|
-
u(() => {
|
|
6
|
-
const e = new AbortController(), s = (a) => {
|
|
7
|
-
a.key === "Escape" && n(!1);
|
|
8
|
-
}, r = (a) => {
|
|
9
|
-
o.current?.contains(a.target) || n(!1);
|
|
10
|
-
};
|
|
11
|
-
return document.addEventListener("keydown", s, {
|
|
12
|
-
signal: e.signal
|
|
13
|
-
}), document.addEventListener("mousedown", r, {
|
|
14
|
-
signal: e.signal
|
|
15
|
-
}), document.addEventListener(
|
|
16
|
-
"visibilitychange",
|
|
17
|
-
() => {
|
|
18
|
-
document.hidden && n(!1);
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
signal: e.signal
|
|
22
|
-
}
|
|
23
|
-
), t.current?.addEventListener(
|
|
24
|
-
"focus",
|
|
25
|
-
() => {
|
|
26
|
-
n(!0);
|
|
27
|
-
},
|
|
28
|
-
{ signal: e.signal }
|
|
29
|
-
), () => {
|
|
30
|
-
e.abort();
|
|
31
|
-
};
|
|
32
|
-
}, [n, o]), u(() => {
|
|
33
|
-
const e = new AbortController();
|
|
34
|
-
return t.current?.addEventListener(
|
|
35
|
-
"keydown",
|
|
36
|
-
(s) => {
|
|
37
|
-
if (s.key === "ArrowDown") {
|
|
38
|
-
const r = l.current?.querySelector("li");
|
|
39
|
-
r && r.focus();
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
{ signal: e.signal }
|
|
43
|
-
), () => {
|
|
44
|
-
e.abort();
|
|
45
|
-
};
|
|
46
|
-
}, [t, l]);
|
|
47
|
-
const d = f(() => {
|
|
48
|
-
n(!0), requestAnimationFrame(() => i?.current?.focus());
|
|
49
|
-
}, [i, n]);
|
|
50
|
-
return {
|
|
51
|
-
wrapperRef: o,
|
|
52
|
-
wrapperInputRef: t,
|
|
53
|
-
handleOpen: d
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
export {
|
|
57
|
-
w as useDropdown
|
|
58
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { useRef as g, useEffect as i } from "react";
|
|
2
|
-
import { useDropdownContext as d } from "../contexts/dropdown.hook.js";
|
|
3
|
-
const w = ({
|
|
4
|
-
inputRef: s,
|
|
5
|
-
searchable: l,
|
|
6
|
-
ulRef: t,
|
|
7
|
-
wrapperInputRef: u,
|
|
8
|
-
wrapperRef: a
|
|
9
|
-
}) => {
|
|
10
|
-
const r = g(0), { isOpen: f } = d();
|
|
11
|
-
i(() => {
|
|
12
|
-
const c = t.current?.querySelectorAll("li") ?? [], e = Array.from(c).filter(
|
|
13
|
-
(n) => n.getAttribute("data-action") !== "true"
|
|
14
|
-
), o = new AbortController(), m = () => {
|
|
15
|
-
r.current < e.length - 1 ? (r.current = r.current + 1, e[r.current].focus()) : (r.current = 0, e[0].focus());
|
|
16
|
-
}, b = () => {
|
|
17
|
-
r.current > 0 ? (r.current = r.current - 1, e[r.current].focus()) : (r.current = 0, s?.current && l ? s.current.focus() : u.current?.focus());
|
|
18
|
-
};
|
|
19
|
-
return t.current?.addEventListener(
|
|
20
|
-
"keydown",
|
|
21
|
-
(n) => {
|
|
22
|
-
switch (n.preventDefault(), n.key) {
|
|
23
|
-
case "ArrowDown": {
|
|
24
|
-
m();
|
|
25
|
-
break;
|
|
26
|
-
}
|
|
27
|
-
case "Tab": {
|
|
28
|
-
n.shiftKey ? b() : m();
|
|
29
|
-
break;
|
|
30
|
-
}
|
|
31
|
-
case "ArrowUp": {
|
|
32
|
-
r.current === 0 ? u.current?.focus() : b();
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
case "Enter": {
|
|
36
|
-
e[r.current]?.click();
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
{ signal: o.signal }
|
|
42
|
-
), () => {
|
|
43
|
-
o.abort();
|
|
44
|
-
};
|
|
45
|
-
}, [t, r, u, s, l]), i(() => {
|
|
46
|
-
const c = new AbortController();
|
|
47
|
-
return a.current?.addEventListener(
|
|
48
|
-
"mouseenter",
|
|
49
|
-
() => {
|
|
50
|
-
(t.current?.querySelectorAll("li") ?? []).forEach((o) => o.blur());
|
|
51
|
-
},
|
|
52
|
-
{ signal: c.signal }
|
|
53
|
-
), () => {
|
|
54
|
-
c.abort();
|
|
55
|
-
};
|
|
56
|
-
}, [t, a]), i(() => {
|
|
57
|
-
f || (r.current = 0);
|
|
58
|
-
}, [f]);
|
|
59
|
-
};
|
|
60
|
-
export {
|
|
61
|
-
w as useNavigationUlList
|
|
62
|
-
};
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { jsxs as m, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { R as O } from "../../index-DBbEcSUG.js";
|
|
3
|
-
import f, { forwardRef as b, useId as N, useCallback as w } from "react";
|
|
4
|
-
import { cn as y } from "../../utils/index.js";
|
|
5
|
-
import { labelVariants as z, buttonVariants as j, numberInputVariants as _ } from "./NumberInput.variants.js";
|
|
6
|
-
import { P as l } from "../../index-N2OStZoU.js";
|
|
7
|
-
function h() {
|
|
8
|
-
return h = Object.assign || function(e) {
|
|
9
|
-
for (var o = 1; o < arguments.length; o++) {
|
|
10
|
-
var r = arguments[o];
|
|
11
|
-
for (var t in r)
|
|
12
|
-
Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
|
|
13
|
-
}
|
|
14
|
-
return e;
|
|
15
|
-
}, h.apply(this, arguments);
|
|
16
|
-
}
|
|
17
|
-
function E(e, o) {
|
|
18
|
-
if (e == null) return {};
|
|
19
|
-
var r = $(e, o), t, n;
|
|
20
|
-
if (Object.getOwnPropertySymbols) {
|
|
21
|
-
var i = Object.getOwnPropertySymbols(e);
|
|
22
|
-
for (n = 0; n < i.length; n++)
|
|
23
|
-
t = i[n], !(o.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
|
|
24
|
-
}
|
|
25
|
-
return r;
|
|
26
|
-
}
|
|
27
|
-
function $(e, o) {
|
|
28
|
-
if (e == null) return {};
|
|
29
|
-
var r = {}, t = Object.keys(e), n, i;
|
|
30
|
-
for (i = 0; i < t.length; i++)
|
|
31
|
-
n = t[i], !(o.indexOf(n) >= 0) && (r[n] = e[n]);
|
|
32
|
-
return r;
|
|
33
|
-
}
|
|
34
|
-
var g = b(function(e, o) {
|
|
35
|
-
var r = e.color, t = r === void 0 ? "currentColor" : r, n = e.size, i = n === void 0 ? 24 : n, u = E(e, ["color", "size"]);
|
|
36
|
-
return /* @__PURE__ */ f.createElement("svg", h({
|
|
37
|
-
ref: o,
|
|
38
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
-
width: i,
|
|
40
|
-
height: i,
|
|
41
|
-
viewBox: "0 0 24 24",
|
|
42
|
-
fill: "none",
|
|
43
|
-
stroke: t,
|
|
44
|
-
strokeWidth: "2",
|
|
45
|
-
strokeLinecap: "round",
|
|
46
|
-
strokeLinejoin: "round"
|
|
47
|
-
}, u), /* @__PURE__ */ f.createElement("line", {
|
|
48
|
-
x1: "5",
|
|
49
|
-
y1: "12",
|
|
50
|
-
x2: "19",
|
|
51
|
-
y2: "12"
|
|
52
|
-
}));
|
|
53
|
-
});
|
|
54
|
-
g.propTypes = {
|
|
55
|
-
color: l.string,
|
|
56
|
-
size: l.oneOfType([l.string, l.number])
|
|
57
|
-
};
|
|
58
|
-
g.displayName = "Minus";
|
|
59
|
-
function v() {
|
|
60
|
-
return v = Object.assign || function(e) {
|
|
61
|
-
for (var o = 1; o < arguments.length; o++) {
|
|
62
|
-
var r = arguments[o];
|
|
63
|
-
for (var t in r)
|
|
64
|
-
Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
|
|
65
|
-
}
|
|
66
|
-
return e;
|
|
67
|
-
}, v.apply(this, arguments);
|
|
68
|
-
}
|
|
69
|
-
function L(e, o) {
|
|
70
|
-
if (e == null) return {};
|
|
71
|
-
var r = W(e, o), t, n;
|
|
72
|
-
if (Object.getOwnPropertySymbols) {
|
|
73
|
-
var i = Object.getOwnPropertySymbols(e);
|
|
74
|
-
for (n = 0; n < i.length; n++)
|
|
75
|
-
t = i[n], !(o.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(e, t) && (r[t] = e[t]);
|
|
76
|
-
}
|
|
77
|
-
return r;
|
|
78
|
-
}
|
|
79
|
-
function W(e, o) {
|
|
80
|
-
if (e == null) return {};
|
|
81
|
-
var r = {}, t = Object.keys(e), n, i;
|
|
82
|
-
for (i = 0; i < t.length; i++)
|
|
83
|
-
n = t[i], !(o.indexOf(n) >= 0) && (r[n] = e[n]);
|
|
84
|
-
return r;
|
|
85
|
-
}
|
|
86
|
-
var d = b(function(e, o) {
|
|
87
|
-
var r = e.color, t = r === void 0 ? "currentColor" : r, n = e.size, i = n === void 0 ? 24 : n, u = L(e, ["color", "size"]);
|
|
88
|
-
return /* @__PURE__ */ f.createElement("svg", v({
|
|
89
|
-
ref: o,
|
|
90
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
91
|
-
width: i,
|
|
92
|
-
height: i,
|
|
93
|
-
viewBox: "0 0 24 24",
|
|
94
|
-
fill: "none",
|
|
95
|
-
stroke: t,
|
|
96
|
-
strokeWidth: "2",
|
|
97
|
-
strokeLinecap: "round",
|
|
98
|
-
strokeLinejoin: "round"
|
|
99
|
-
}, u), /* @__PURE__ */ f.createElement("line", {
|
|
100
|
-
x1: "12",
|
|
101
|
-
y1: "5",
|
|
102
|
-
x2: "12",
|
|
103
|
-
y2: "19"
|
|
104
|
-
}), /* @__PURE__ */ f.createElement("line", {
|
|
105
|
-
x1: "5",
|
|
106
|
-
y1: "12",
|
|
107
|
-
x2: "19",
|
|
108
|
-
y2: "12"
|
|
109
|
-
}));
|
|
110
|
-
});
|
|
111
|
-
d.propTypes = {
|
|
112
|
-
color: l.string,
|
|
113
|
-
size: l.oneOfType([l.string, l.number])
|
|
114
|
-
};
|
|
115
|
-
d.displayName = "Plus";
|
|
116
|
-
const D = b(
|
|
117
|
-
({
|
|
118
|
-
className: e,
|
|
119
|
-
label: o,
|
|
120
|
-
max: r = -1 / 0,
|
|
121
|
-
min: t = 1 / 0,
|
|
122
|
-
name: n,
|
|
123
|
-
theme: i,
|
|
124
|
-
value: u,
|
|
125
|
-
onChange: p
|
|
126
|
-
}, x) => {
|
|
127
|
-
const P = N(), a = u ?? 0, k = w(() => {
|
|
128
|
-
let s = 0;
|
|
129
|
-
t === 1 / 0 ? s = a - 1 : s = Math.max(t, a - 1), p?.({ target: { value: s } });
|
|
130
|
-
}, [a, t, p]), I = w(() => {
|
|
131
|
-
let s = 0;
|
|
132
|
-
r === -1 / 0 ? s = a + 1 : s = Math.min(r, a + 1), p?.({ target: { value: s } });
|
|
133
|
-
}, [a, r, p]);
|
|
134
|
-
return /* @__PURE__ */ m("div", { className: "flex flex-col gap-1", "data-theme": i, children: [
|
|
135
|
-
o ? /* @__PURE__ */ c("label", { htmlFor: n ?? P, className: y(z()), children: o }) : null,
|
|
136
|
-
/* @__PURE__ */ m("div", { className: "flex items-center", role: "presentation", children: [
|
|
137
|
-
/* @__PURE__ */ m(
|
|
138
|
-
"button",
|
|
139
|
-
{
|
|
140
|
-
type: "button",
|
|
141
|
-
onClick: k,
|
|
142
|
-
className: y(j({ button: "rigth" })),
|
|
143
|
-
children: [
|
|
144
|
-
/* @__PURE__ */ c(g, { className: "w-4 h-4" }),
|
|
145
|
-
/* @__PURE__ */ c(O, { children: "Decrement" })
|
|
146
|
-
]
|
|
147
|
-
}
|
|
148
|
-
),
|
|
149
|
-
/* @__PURE__ */ c(
|
|
150
|
-
"input",
|
|
151
|
-
{
|
|
152
|
-
ref: x,
|
|
153
|
-
type: "number",
|
|
154
|
-
value: a,
|
|
155
|
-
name: n,
|
|
156
|
-
className: y(_({ className: e })),
|
|
157
|
-
readOnly: !0,
|
|
158
|
-
"aria-label": typeof o == "string" ? o : "number input"
|
|
159
|
-
}
|
|
160
|
-
),
|
|
161
|
-
/* @__PURE__ */ m(
|
|
162
|
-
"button",
|
|
163
|
-
{
|
|
164
|
-
type: "button",
|
|
165
|
-
onClick: I,
|
|
166
|
-
className: y(j({ button: "left" })),
|
|
167
|
-
children: [
|
|
168
|
-
/* @__PURE__ */ c(d, { className: "w-4 h-4" }),
|
|
169
|
-
/* @__PURE__ */ c(O, { children: "Increment" })
|
|
170
|
-
]
|
|
171
|
-
}
|
|
172
|
-
)
|
|
173
|
-
] })
|
|
174
|
-
] });
|
|
175
|
-
}
|
|
176
|
-
);
|
|
177
|
-
export {
|
|
178
|
-
D as NumberInput
|
|
179
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { c as e } from "../../index-D29mdTf5.js";
|
|
2
|
-
const r = e([
|
|
3
|
-
"[&::-webkit-inner-spin-button]:appearance-none",
|
|
4
|
-
"[&::-webkit-outer-spin-button]:appearance-none",
|
|
5
|
-
"[-moz-appearance:textfield]",
|
|
6
|
-
"appearance-none",
|
|
7
|
-
"border",
|
|
8
|
-
"border-x-0",
|
|
9
|
-
"focus-visible:outline-none",
|
|
10
|
-
"focus-visible:ring-transparent",
|
|
11
|
-
"h-9",
|
|
12
|
-
"max-w-16",
|
|
13
|
-
"text-right",
|
|
14
|
-
"px-3",
|
|
15
|
-
"border-gray-200"
|
|
16
|
-
]), n = e(
|
|
17
|
-
[
|
|
18
|
-
"h-9",
|
|
19
|
-
"w-9",
|
|
20
|
-
"flex",
|
|
21
|
-
"items-center",
|
|
22
|
-
"justify-center",
|
|
23
|
-
"border",
|
|
24
|
-
"text-slate-400",
|
|
25
|
-
"border-gray-200",
|
|
26
|
-
"cursor-pointer"
|
|
27
|
-
],
|
|
28
|
-
{
|
|
29
|
-
variants: {
|
|
30
|
-
button: {
|
|
31
|
-
left: ["rounded-e"],
|
|
32
|
-
rigth: ["rounded-s"]
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
), a = e(["cursor-pointer"], {
|
|
37
|
-
variants: {
|
|
38
|
-
variant: {
|
|
39
|
-
default: ""
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
defaultVariants: {
|
|
43
|
-
variant: "default"
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
export {
|
|
47
|
-
n as buttonVariants,
|
|
48
|
-
a as labelVariants,
|
|
49
|
-
r as numberInputVariants
|
|
50
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { c as a } from "../../../../index-D29mdTf5.js";
|
|
2
|
-
const p = a([
|
|
3
|
-
"flex",
|
|
4
|
-
"gap-1.5",
|
|
5
|
-
"p-2",
|
|
6
|
-
"rounded-md",
|
|
7
|
-
"shadow",
|
|
8
|
-
"w-full",
|
|
9
|
-
"max-h-[216px]",
|
|
10
|
-
"absolute mt-1",
|
|
11
|
-
"bg-white",
|
|
12
|
-
"z-10"
|
|
13
|
-
]);
|
|
14
|
-
export {
|
|
15
|
-
p as wrapperVariants
|
|
16
|
-
};
|