@konstructio/ui 0.1.2-alpha.5 → 0.1.2-alpha.50
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
|
@@ -2,7 +2,7 @@ import { jsxs as h, jsx as p } from "react/jsx-runtime";
|
|
|
2
2
|
import v, { forwardRef as x, useState as C, useRef as w, useCallback as b, useEffect as E } from "react";
|
|
3
3
|
import { cn as l } from "../../utils/index.js";
|
|
4
4
|
import { Button as P } from "../Button/Button.js";
|
|
5
|
-
import { P as c } from "../../index-
|
|
5
|
+
import { P as c } from "../../index-BOE_3f_Z.js";
|
|
6
6
|
function m() {
|
|
7
7
|
return m = Object.assign || function(e) {
|
|
8
8
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -9,7 +9,7 @@ const t = ({
|
|
|
9
9
|
theme: o = "civo",
|
|
10
10
|
children: r
|
|
11
11
|
}) => /* @__PURE__ */ i("div", { className: m(a({ className: e })), "data-theme": o, children: r });
|
|
12
|
-
t.displayName = "
|
|
12
|
+
t.displayName = "KonstructFilter";
|
|
13
13
|
t.BadgeMultiSelect = l;
|
|
14
14
|
t.DateFilterDropdown = p;
|
|
15
15
|
t.ResetButton = s;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { c as t } from "../../index-D29mdTf5.js";
|
|
2
|
-
const a = t(["flex", "gap-8", "items-center"]),
|
|
2
|
+
const a = t(["flex", "gap-8", "items-center"]), r = t([
|
|
3
3
|
"flex",
|
|
4
4
|
"items-center",
|
|
5
5
|
"gap-1",
|
|
6
6
|
"text-slate-500",
|
|
7
7
|
"cursor-pointer",
|
|
8
8
|
"text-sm",
|
|
9
|
-
"w-max"
|
|
10
|
-
|
|
9
|
+
"w-max",
|
|
10
|
+
"dark:text-metal-300"
|
|
11
|
+
]), n = t([
|
|
11
12
|
"text-slate-400",
|
|
12
|
-
"h-
|
|
13
|
-
"w-
|
|
13
|
+
"h-5",
|
|
14
|
+
"w-5",
|
|
14
15
|
"transition-all",
|
|
15
16
|
"duration-150",
|
|
16
17
|
"ease-in-out"
|
|
17
18
|
]);
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
n as filterButtonIconVariants,
|
|
21
|
+
r as filterButtonVariants,
|
|
21
22
|
a as filterVariants
|
|
22
23
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Badge as o } from "../../../Badge/Badge.js";
|
|
3
3
|
import { Button as m } from "../../../Button/Button.js";
|
|
4
|
-
import { Checkbox as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useBadgeMultiSelect as
|
|
8
|
-
import { C as
|
|
4
|
+
import { Checkbox as k } from "../../../Checkbox/Checkbox.js";
|
|
5
|
+
import { filterButtonIconVariants as C, filterButtonVariants as y } from "../../Filter.variants.js";
|
|
6
|
+
import { cn as r } from "../../../../utils/index.js";
|
|
7
|
+
import { useBadgeMultiSelect as N } from "./BadgeMultiSelect.hook.js";
|
|
8
|
+
import { C as B } from "../../../../chevron-down-DgT-uSF9.js";
|
|
9
9
|
const $ = ({
|
|
10
|
-
options:
|
|
10
|
+
options: n,
|
|
11
11
|
label: p,
|
|
12
|
-
position:
|
|
12
|
+
position: i = "left",
|
|
13
13
|
onApply: f
|
|
14
14
|
}) => {
|
|
15
15
|
const {
|
|
@@ -19,72 +19,98 @@ const $ = ({
|
|
|
19
19
|
selectedCount: c,
|
|
20
20
|
handleOpen: g,
|
|
21
21
|
handleResetOptions: b,
|
|
22
|
-
handleApplyOptions:
|
|
23
|
-
handleSelectOption:
|
|
24
|
-
} =
|
|
25
|
-
return
|
|
26
|
-
/* @__PURE__ */
|
|
22
|
+
handleApplyOptions: x,
|
|
23
|
+
handleSelectOption: v
|
|
24
|
+
} = N({ onApply: f });
|
|
25
|
+
return n.length === 0 ? null : /* @__PURE__ */ t("div", { ref: h, className: "relative", children: [
|
|
26
|
+
/* @__PURE__ */ t(
|
|
27
27
|
"button",
|
|
28
28
|
{
|
|
29
|
-
className:
|
|
30
|
-
"text-slate-700": l
|
|
29
|
+
className: r(y(), {
|
|
30
|
+
"text-slate-700 dark:text-metal-50": l
|
|
31
31
|
}),
|
|
32
32
|
onClick: g,
|
|
33
33
|
children: [
|
|
34
34
|
p,
|
|
35
35
|
c.length > 0 && /* @__PURE__ */ e(o, { label: c.length.toString() }),
|
|
36
36
|
/* @__PURE__ */ e(
|
|
37
|
-
|
|
37
|
+
B,
|
|
38
38
|
{
|
|
39
|
-
className:
|
|
40
|
-
"rotate-180": l
|
|
41
|
-
"text-blue-600": l
|
|
39
|
+
className: r(C(), {
|
|
40
|
+
"rotate-180 text-blue-600 dark:text-aurora-500": l
|
|
42
41
|
})
|
|
43
42
|
}
|
|
44
43
|
)
|
|
45
44
|
]
|
|
46
45
|
}
|
|
47
46
|
),
|
|
48
|
-
l && /* @__PURE__ */
|
|
47
|
+
l && /* @__PURE__ */ t(
|
|
49
48
|
"div",
|
|
50
49
|
{
|
|
51
|
-
className:
|
|
52
|
-
"absolute
|
|
50
|
+
className: r(
|
|
51
|
+
"absolute",
|
|
52
|
+
"top-full",
|
|
53
|
+
"mt-1",
|
|
54
|
+
"bg-white",
|
|
55
|
+
"rounded-md",
|
|
56
|
+
"shadow-md",
|
|
57
|
+
"animate-in",
|
|
58
|
+
"fade-in-0",
|
|
59
|
+
"z-10",
|
|
60
|
+
"border",
|
|
61
|
+
"border-gray-200",
|
|
62
|
+
"dark:bg-metal-800",
|
|
63
|
+
"dark:border-metal-700",
|
|
53
64
|
{
|
|
54
|
-
"left-0":
|
|
55
|
-
"right-0":
|
|
65
|
+
"left-0": i === "left",
|
|
66
|
+
"right-0": i === "right"
|
|
56
67
|
}
|
|
57
68
|
),
|
|
58
69
|
children: [
|
|
59
|
-
/* @__PURE__ */ e("div", { className: "py-4", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children:
|
|
70
|
+
/* @__PURE__ */ e("div", { className: "py-4", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: n.map((a) => {
|
|
60
71
|
const s = !!u.find(
|
|
61
|
-
(
|
|
72
|
+
(d) => d.id === a.id
|
|
62
73
|
);
|
|
63
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ t("div", { className: "flex gap-4 px-6", children: [
|
|
64
75
|
/* @__PURE__ */ e(
|
|
65
|
-
|
|
76
|
+
k,
|
|
66
77
|
{
|
|
67
78
|
defaultChecked: s,
|
|
68
|
-
"data-label":
|
|
69
|
-
onChange: (
|
|
79
|
+
"data-label": a.id,
|
|
80
|
+
onChange: (d) => v(a, d)
|
|
70
81
|
},
|
|
71
|
-
`${
|
|
82
|
+
`${a.id}-${s}`
|
|
72
83
|
),
|
|
73
|
-
/* @__PURE__ */ e(o, { label:
|
|
74
|
-
] },
|
|
84
|
+
/* @__PURE__ */ e(o, { label: a.label, variant: a.variant })
|
|
85
|
+
] }, a.id);
|
|
75
86
|
}) }) }),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
/* @__PURE__ */ t(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
className: r(
|
|
91
|
+
"flex",
|
|
92
|
+
"justify-center",
|
|
93
|
+
"items-center",
|
|
94
|
+
"gap-4",
|
|
95
|
+
"py-4",
|
|
96
|
+
"border-t",
|
|
97
|
+
"border-gray-200",
|
|
98
|
+
"dark:border-metal-700"
|
|
99
|
+
),
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ e(
|
|
102
|
+
m,
|
|
103
|
+
{
|
|
104
|
+
variant: "secondary",
|
|
105
|
+
appearance: "compact",
|
|
106
|
+
onClick: b,
|
|
107
|
+
children: "Reset"
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
/* @__PURE__ */ e(m, { appearance: "compact", onClick: x, children: "Apply" })
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
)
|
|
88
114
|
]
|
|
89
115
|
}
|
|
90
116
|
)
|
|
@@ -1,55 +1,71 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Badge as
|
|
2
|
+
import { Badge as b } from "../../../Badge/Badge.js";
|
|
3
3
|
import { Button as i } from "../../../Button/Button.js";
|
|
4
|
-
import { DatePicker as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useDateFilterDropdown as
|
|
8
|
-
import { C as
|
|
4
|
+
import { DatePicker as g } from "../../../Datepicker/DatePicker.js";
|
|
5
|
+
import { filterButtonIconVariants as x, filterButtonVariants as w } from "../../Filter.variants.js";
|
|
6
|
+
import { cn as t } from "../../../../utils/index.js";
|
|
7
|
+
import { useDateFilterDropdown as y } from "./DateFilterDropdown.hook.js";
|
|
8
|
+
import { C as k } from "../../../../chevron-down-DgT-uSF9.js";
|
|
9
9
|
const R = ({
|
|
10
|
-
label:
|
|
10
|
+
label: d,
|
|
11
11
|
position: l = "left",
|
|
12
|
-
onApply:
|
|
12
|
+
onApply: s
|
|
13
13
|
}) => {
|
|
14
14
|
const {
|
|
15
|
-
id:
|
|
15
|
+
id: p,
|
|
16
16
|
appliedDay: n,
|
|
17
|
-
isOpen:
|
|
18
|
-
selectedDay:
|
|
19
|
-
wrapperRef:
|
|
20
|
-
handleApply:
|
|
17
|
+
isOpen: r,
|
|
18
|
+
selectedDay: o,
|
|
19
|
+
wrapperRef: m,
|
|
20
|
+
handleApply: c,
|
|
21
21
|
handleOpen: f,
|
|
22
22
|
handleSelect: h,
|
|
23
23
|
handleReset: u
|
|
24
|
-
} =
|
|
25
|
-
return /* @__PURE__ */ a("div", { ref:
|
|
24
|
+
} = y({ onApply: s });
|
|
25
|
+
return /* @__PURE__ */ a("div", { ref: m, className: "relative", children: [
|
|
26
26
|
/* @__PURE__ */ a(
|
|
27
27
|
"button",
|
|
28
28
|
{
|
|
29
|
-
className:
|
|
30
|
-
"text-slate-700":
|
|
29
|
+
className: t(w(), {
|
|
30
|
+
"text-slate-700": r
|
|
31
31
|
}),
|
|
32
32
|
onClick: f,
|
|
33
33
|
children: [
|
|
34
|
-
|
|
35
|
-
n && /* @__PURE__ */ e(
|
|
34
|
+
d,
|
|
35
|
+
n && /* @__PURE__ */ e(b, { label: n }),
|
|
36
36
|
/* @__PURE__ */ e(
|
|
37
|
-
|
|
37
|
+
k,
|
|
38
38
|
{
|
|
39
|
-
className:
|
|
40
|
-
"rotate-180":
|
|
41
|
-
"text-blue-600": t
|
|
39
|
+
className: t(x(), {
|
|
40
|
+
"rotate-180 text-blue-600 dark:text-aurora-500": r
|
|
42
41
|
})
|
|
43
42
|
}
|
|
44
43
|
)
|
|
45
44
|
]
|
|
46
45
|
}
|
|
47
46
|
),
|
|
48
|
-
|
|
47
|
+
r && /* @__PURE__ */ a(
|
|
49
48
|
"div",
|
|
50
49
|
{
|
|
51
|
-
className:
|
|
52
|
-
"absolute
|
|
50
|
+
className: t(
|
|
51
|
+
"absolute",
|
|
52
|
+
"top-full",
|
|
53
|
+
"mt-1",
|
|
54
|
+
"bg-white",
|
|
55
|
+
"rounded-md",
|
|
56
|
+
"shadow-md",
|
|
57
|
+
"animate-in",
|
|
58
|
+
"fade-in-0",
|
|
59
|
+
"z-10",
|
|
60
|
+
"border",
|
|
61
|
+
"border-gray-200",
|
|
62
|
+
"flex",
|
|
63
|
+
"flex-col",
|
|
64
|
+
"gap-4",
|
|
65
|
+
"py-4",
|
|
66
|
+
"px-6",
|
|
67
|
+
"dark:bg-metal-800",
|
|
68
|
+
"dark:border-metal-700",
|
|
53
69
|
{
|
|
54
70
|
"left-0": l === "left",
|
|
55
71
|
"right-0": l === "right"
|
|
@@ -57,29 +73,46 @@ const R = ({
|
|
|
57
73
|
),
|
|
58
74
|
children: [
|
|
59
75
|
/* @__PURE__ */ e(
|
|
60
|
-
|
|
76
|
+
g,
|
|
61
77
|
{
|
|
62
78
|
className: "p-0",
|
|
63
79
|
arrowClassName: "-top-1 right-0",
|
|
64
|
-
monthsClassName:
|
|
65
|
-
|
|
66
|
-
|
|
80
|
+
monthsClassName: t(
|
|
81
|
+
"shadow-none",
|
|
82
|
+
"p-0",
|
|
83
|
+
"w-auto",
|
|
84
|
+
"dark:border-transparent"
|
|
85
|
+
),
|
|
86
|
+
defaultSelected: o,
|
|
87
|
+
defaultMonth: o,
|
|
67
88
|
onSelect: h
|
|
68
89
|
},
|
|
69
|
-
|
|
90
|
+
o?.toISOString() ?? p
|
|
70
91
|
),
|
|
71
|
-
/* @__PURE__ */ a(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
92
|
+
/* @__PURE__ */ a(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
className: t(
|
|
96
|
+
"flex",
|
|
97
|
+
"justify-end",
|
|
98
|
+
"items-center",
|
|
99
|
+
"gap-4",
|
|
100
|
+
"py-2"
|
|
101
|
+
),
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ e(
|
|
104
|
+
i,
|
|
105
|
+
{
|
|
106
|
+
variant: "secondary",
|
|
107
|
+
appearance: "compact",
|
|
108
|
+
onClick: u,
|
|
109
|
+
children: "Reset"
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ e(i, { appearance: "compact", onClick: c, children: "Apply" })
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
)
|
|
83
116
|
]
|
|
84
117
|
}
|
|
85
118
|
)
|
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import { Button as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as m } from "react";
|
|
3
|
+
import { Button as i } from "../../../Button/Button.js";
|
|
4
|
+
import { cn as c } from "../../../../utils/index.js";
|
|
4
5
|
import { resetEvent as p } from "../../events/index.js";
|
|
5
|
-
const
|
|
6
|
+
const d = ({
|
|
6
7
|
disabled: e,
|
|
8
|
+
className: r,
|
|
7
9
|
onClick: t,
|
|
8
|
-
...
|
|
10
|
+
...o
|
|
9
11
|
}) => {
|
|
10
|
-
const
|
|
12
|
+
const n = m(() => {
|
|
11
13
|
p(), t?.();
|
|
12
14
|
}, [t]);
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
|
|
15
|
+
return /* @__PURE__ */ a(
|
|
16
|
+
i,
|
|
15
17
|
{
|
|
16
18
|
type: "button",
|
|
17
|
-
variant: "
|
|
19
|
+
variant: "link",
|
|
18
20
|
appearance: "compact",
|
|
19
21
|
version: "alternate",
|
|
20
|
-
onClick:
|
|
22
|
+
onClick: n,
|
|
21
23
|
disabled: e,
|
|
22
|
-
|
|
24
|
+
className: c("hover:no-underline", r),
|
|
25
|
+
...o,
|
|
23
26
|
children: "Reset"
|
|
24
27
|
}
|
|
25
28
|
);
|
|
26
29
|
};
|
|
27
30
|
export {
|
|
28
|
-
|
|
31
|
+
d as ResetButton
|
|
29
32
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var e = /* @__PURE__ */ ((t) => (t.OPEN = "@konstrtuctio/
|
|
1
|
+
var e = /* @__PURE__ */ ((t) => (t.OPEN = "@konstrtuctio/KonstructFilter/event-OPEN", t.RESET = "@konstrtuctio/KonstructFilter/event-RESET", t))(e || {});
|
|
2
2
|
const n = (t) => document.dispatchEvent(
|
|
3
|
-
new CustomEvent("@konstrtuctio/
|
|
3
|
+
new CustomEvent("@konstrtuctio/KonstructFilter/event-OPEN", { detail: t })
|
|
4
4
|
), o = () => document.dispatchEvent(new CustomEvent(
|
|
5
|
-
"@konstrtuctio/
|
|
5
|
+
"@konstrtuctio/KonstructFilter/event-RESET"
|
|
6
6
|
/* RESET */
|
|
7
7
|
));
|
|
8
8
|
export {
|