@konstructio/ui 0.1.2-alpha.101 → 0.1.2-alpha.103
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/AlertDialogTrigger-CgcsW_ta.js +109 -0
- package/dist/{Breadcrumb-Bmv0vzgt.js → Breadcrumb-Cp3abB2w.js} +1 -1
- package/dist/Checkbox-DzAx7n67.js +249 -0
- package/dist/{CommandInput-CYYsk_31.js → CommandInput-BnvRMfLI.js} +2 -2
- package/dist/{Counter-DWKyr569.js → Counter-CY0xGnVM.js} +2 -2
- package/dist/{DayPicker-CwO8Zff5.js → DayPicker-kweJz134.js} +750 -746
- package/dist/{DropdownButton-Beel5_gN.js → DropdownButton-DnlwdPmb.js} +1 -1
- package/dist/FlagSelectorList-BoYG-_It.js +852 -0
- package/dist/{HamburgerTrigger-7a4POUaM.js → HamburgerTrigger-1vOTrm8-.js} +2 -2
- package/dist/{Input-DG3snJf_.js → Input-CW0VwW2T.js} +4 -4
- package/dist/{Modal-Bcu6LLAp.js → Modal-Bfzggwlr.js} +2 -2
- package/dist/{Spinner-BegZ5yd7.js → Spinner-Lw9mZYhg.js} +1 -1
- package/dist/Switch-WBRr8uOJ.js +196 -0
- package/dist/Toast-ByH-l4XK.js +459 -0
- package/dist/{Wrapper-DwxJAkNQ.js → Wrapper-ClJ_Mham.js} +2 -2
- package/dist/{Wrapper-DtT29fc5.js → Wrapper-XeeD3av7.js} +1 -1
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- 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 +1 -1
- 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/Command/components/index.js +1 -1
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +2 -3
- package/dist/components/Drawer/Drawer.js +2 -2
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +4 -3
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +23 -24
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +60 -65
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +35 -43
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +40 -45
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +33 -34
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +45 -51
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +28 -0
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +56 -61
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +33 -34
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +70 -75
- package/dist/components/Filter/contexts/filter.provider.js +8 -5
- package/dist/components/Filter/utils/index.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/LineChart/LineChart.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +2 -2
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +2 -2
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PieChart/PieChart.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Select/components/List/List.js +1 -1
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/components/Filter.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- 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/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +87 -87
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +19 -19
- package/dist/components/VirtualizedTable/components/Body/Body.js +50 -49
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +67 -21
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +53 -63
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +10 -10
- package/dist/components/VirtualizedTable/components/Header/Header.js +47 -34
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +19 -15
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +10 -10
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +8 -8
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/index.js +10 -10
- package/dist/{components-CYt24H4n.js → components-BIHlj4yH.js} +1 -1
- package/dist/{debounce-KoeGNmnW.js → debounce-C5Ycjilj.js} +14 -14
- package/dist/dist-2bGlmy8N2.js +165 -0
- package/dist/dist-BiJrNvNo.js +193 -0
- package/dist/dist-BuFiu480.js +13 -0
- package/dist/dist-C2aTw0m62.js +1320 -0
- package/dist/{dist-DvoMuWKO2.js → dist-C2s4VX-42.js} +4 -4
- package/dist/dist-CT6d9xe7.js +441 -0
- package/dist/dist-CTvBzxW8.js +31 -0
- package/dist/dist-CVDFmWf2.js +358 -0
- package/dist/dist-D4FePjTS.js +194 -0
- package/dist/dist-DISvWx7U.js +99 -0
- package/dist/dist-Db6UeFo4.js +291 -0
- package/dist/{dist-DGO9opgu.js → dist-Dse3gSmZ.js} +49 -49
- package/dist/dist-j7FOUrFU.js +206 -0
- package/dist/{dist-C8NWUTUh.js → dist-l-aDnQZC.js} +1 -1
- package/dist/es2015-BWf6xQHm.js +222 -0
- package/dist/index.js +10 -10
- package/dist/{isObject-1ZmdWuhC.js → isObject-BeFFiVJK.js} +8 -8
- package/dist/lib/components/Alert/Alert.types.d.ts +1 -1
- package/dist/lib/components/AlertDialog/AlertDialog.types.d.ts +1 -1
- package/dist/lib/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +2 -2
- package/dist/lib/components/Autocomplete/Autocomplete.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/Breadcrumb.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/components/BackButton/BackButton.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/components/Item/Item.types.d.ts +1 -1
- package/dist/lib/components/Button/Button.types.d.ts +1 -1
- package/dist/lib/components/ButtonGroup/ButtonGroup.types.d.ts +1 -1
- package/dist/lib/components/Card/Card.types.d.ts +1 -1
- package/dist/lib/components/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/lib/components/Command/Command.types.d.ts +1 -1
- package/dist/lib/components/Counter/Counter.types.d.ts +1 -1
- package/dist/lib/components/DateRangePicker/DateRangePicker.types.d.ts +1 -1
- package/dist/lib/components/Drawer/Drawer.types.d.ts +1 -1
- package/dist/lib/components/Filter/Filter.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +2 -3
- package/dist/lib/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.d.ts +1 -2
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.d.ts +2 -3
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.d.ts +3 -0
- package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.types.d.ts +9 -0
- package/dist/lib/components/Filter/components/ResetButton/ResetButton.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.d.ts +1 -2
- package/dist/lib/components/Filter/contexts/filter.context.d.ts +1 -0
- package/dist/lib/components/ImageUpload/ImageUpload.types.d.ts +1 -1
- package/dist/lib/components/Input/Input.types.d.ts +1 -1
- package/dist/lib/components/LineChart/LineChart.types.d.ts +1 -1
- package/dist/lib/components/Loading/Loading.types.d.ts +1 -1
- package/dist/lib/components/Modal/Modal.types.d.ts +1 -1
- package/dist/lib/components/Modal/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/Item/Item.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/List/List.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/ProgressBar/ProgressBar.types.d.ts +1 -1
- package/dist/lib/components/Radio/Radio.types.d.ts +1 -1
- package/dist/lib/components/RadioCard/RadioCard.types.d.ts +1 -1
- package/dist/lib/components/RadioCardGroup/RadioCardGroup.types.d.ts +1 -1
- package/dist/lib/components/RadioGroup/RadioGroup.types.d.ts +1 -1
- package/dist/lib/components/Range/Range.types.d.ts +1 -1
- package/dist/lib/components/Select/Select.types.d.ts +1 -1
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +2 -2
- package/dist/lib/components/Sidebar/components/Label/Label.types.d.ts +1 -1
- package/dist/lib/components/Slider/Slider.types.d.ts +1 -1
- package/dist/lib/components/Spinner/Spinner.types.d.ts +2 -2
- package/dist/lib/components/Stepper/Stepper.types.d.ts +1 -1
- package/dist/lib/components/Stepper/components/StepItem/StepItem.types.d.ts +1 -1
- package/dist/lib/components/Switch/Switch.types.d.ts +1 -1
- package/dist/lib/components/Table/Table.types.d.ts +1 -1
- package/dist/lib/components/Tabs/Tabs.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/TagSelect.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/components/Item/Item.types.d.ts +2 -2
- package/dist/lib/components/TagSelect/components/List/List.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/contexts/TagSelect.types.d.ts +1 -1
- package/dist/lib/components/TextArea/TextArea.types.d.ts +1 -1
- package/dist/lib/components/Toast/Toast.types.d.ts +1 -1
- package/dist/lib/components/Typography/Typography.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +27 -3
- package/dist/lib/components/VirtualizedTable/components/Body/Body.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Body/Body.types.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Header/Header.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Header/Header.types.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/components/Pagination/Pagination.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.context.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.types.d.ts +1 -0
- package/dist/lib/contexts/theme.context.d.ts +1 -1
- package/dist/lib/contexts/theme.hook.d.ts +1 -1
- package/dist/package.json +34 -33
- package/dist/{phone-number.provider-CJJOFYk-.js → phone-number.provider-BxQCTxp8.js} +457 -457
- package/dist/{prop-types-CaJpPVsa.js → prop-types-CfEYxTbR.js} +52 -52
- package/dist/styles.css +1 -1
- package/dist/{table.provider-9uUt5a-s.js → table.provider-2sAkE7z_.js} +395 -368
- package/dist/{utils-B6A9pnrH.js → utils-B-BTGYA5.js} +193 -193
- package/dist/{x-CESTrenk.js → x-BI9jmc7e.js} +1 -1
- package/package.json +34 -33
- package/dist/AlertDialogTrigger-HhbFOOUE.js +0 -124
- package/dist/Checkbox-B1rTwzR3.js +0 -240
- package/dist/FlagSelectorList-BARhzfj2.js +0 -848
- package/dist/Switch-1RGhhTtg.js +0 -178
- package/dist/Toast-CS-igZor.js +0 -467
- package/dist/dist-7edduNXi.js +0 -398
- package/dist/dist-BkYHh2kH.js +0 -408
- package/dist/dist-C6Cif8-U.js +0 -28
- package/dist/dist-CeuUxVmT.js +0 -13
- package/dist/dist-CfYOvauX.js +0 -125
- package/dist/dist-CktbIsHq.js +0 -264
- package/dist/dist-DGqWMRtc.js +0 -183
- package/dist/dist-DdFwUrO22.js +0 -11
- package/dist/dist-DnGj9MTf.js +0 -1692
- package/dist/dist-eAwtFCCA.js +0 -87
- /package/dist/{dist-AihTpWdF2.js → dist-AihTpWdF.js} +0 -0
package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js
CHANGED
|
@@ -1,58 +1,52 @@
|
|
|
1
|
-
import { t
|
|
2
|
-
import { Button as
|
|
3
|
-
import { t as
|
|
4
|
-
import { Badge as
|
|
5
|
-
import { DateRangePicker as
|
|
6
|
-
import { filterButtonIconVariants as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { t } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
+
import { Button as o } from "../../../Button/Button.js";
|
|
3
|
+
import { t as w } from "../../../../chevron-down-DNP-OOAQ.js";
|
|
4
|
+
import { Badge as k } from "../../../Badge/Badge.js";
|
|
5
|
+
import { DateRangePicker as v } from "../../../DateRangePicker/DateRangePicker.js";
|
|
6
|
+
import { filterButtonIconVariants as y, filterButtonVariants as B } from "../../Filter.variants.js";
|
|
7
|
+
import { FilterDropdown as F } from "../FilterDropdown/FilterDropdown.js";
|
|
8
|
+
import { useDateRangeFilterDropdown as N } from "./DateRangeFilterDropdown.hook.js";
|
|
9
|
+
import { Fragment as j, jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
10
|
+
var z = ({ label: i, position: l = "left", showTime: p = !1, timeFormat: s = "24", showPresets: m = !0, defaultRange: c, minDate: d, maxDate: g, countryCode: f = "US", onApply: h }) => {
|
|
11
|
+
const { appliedRange: n, isOpen: a, selectedRange: u, handleApply: R, handleOpenChange: C, handleRangeChange: x, handleReset: D } = N({
|
|
12
|
+
defaultRange: c,
|
|
13
|
+
onApply: h,
|
|
14
|
+
countryCode: f
|
|
14
15
|
});
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
onClick: w,
|
|
46
|
-
children: "Reset"
|
|
47
|
-
}), /* @__PURE__ */ e(l, {
|
|
48
|
-
appearance: "compact",
|
|
49
|
-
onClick: b,
|
|
50
|
-
children: "Apply"
|
|
51
|
-
})]
|
|
16
|
+
return /* @__PURE__ */ r(F, {
|
|
17
|
+
isOpen: a,
|
|
18
|
+
position: l,
|
|
19
|
+
triggerClassName: t(B(), { "text-slate-700": a }),
|
|
20
|
+
trigger: /* @__PURE__ */ r(j, { children: [
|
|
21
|
+
i,
|
|
22
|
+
n && /* @__PURE__ */ e(k, { label: n }),
|
|
23
|
+
/* @__PURE__ */ e(w, { className: t(y(), { "rotate-180 text-blue-600 dark:text-aurora-500": a }) })
|
|
24
|
+
] }),
|
|
25
|
+
onOpenChange: C,
|
|
26
|
+
children: [/* @__PURE__ */ e(v, {
|
|
27
|
+
defaultRange: u,
|
|
28
|
+
showTime: p,
|
|
29
|
+
timeFormat: s,
|
|
30
|
+
showPresets: m,
|
|
31
|
+
minDate: d,
|
|
32
|
+
maxDate: g,
|
|
33
|
+
onRangeChange: x,
|
|
34
|
+
classNames: { container: "shadow-none" }
|
|
35
|
+
}), /* @__PURE__ */ r("div", {
|
|
36
|
+
className: t("flex", "justify-end", "items-center", "gap-4", "p-4", "pt-0"),
|
|
37
|
+
children: [/* @__PURE__ */ e(o, {
|
|
38
|
+
variant: "secondary",
|
|
39
|
+
appearance: "compact",
|
|
40
|
+
onClick: D,
|
|
41
|
+
children: "Reset"
|
|
42
|
+
}), /* @__PURE__ */ e(o, {
|
|
43
|
+
appearance: "compact",
|
|
44
|
+
onClick: R,
|
|
45
|
+
children: "Apply"
|
|
52
46
|
})]
|
|
53
47
|
})]
|
|
54
48
|
});
|
|
55
49
|
};
|
|
56
50
|
export {
|
|
57
|
-
|
|
51
|
+
z as DateRangeFilterDropdown
|
|
58
52
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { t as l } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
+
import { useFilterContext as f } from "../../contexts/filter.hook.js";
|
|
3
|
+
import { i as p, n as c, r as h, t as g } from "../../../../dist-2bGlmy8N2.js";
|
|
4
|
+
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
5
|
+
var j = ({ isOpen: t, trigger: r, triggerClassName: o, position: a = "left", contentClassName: n, children: s, onOpenChange: i }) => {
|
|
6
|
+
const { theme: m } = f();
|
|
7
|
+
return /* @__PURE__ */ u(h, {
|
|
8
|
+
open: t,
|
|
9
|
+
onOpenChange: i,
|
|
10
|
+
children: [/* @__PURE__ */ e(p, {
|
|
11
|
+
className: o,
|
|
12
|
+
children: r
|
|
13
|
+
}), /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(g, {
|
|
14
|
+
"data-theme": m,
|
|
15
|
+
side: "bottom",
|
|
16
|
+
sideOffset: 4,
|
|
17
|
+
align: a === "right" ? "end" : "start",
|
|
18
|
+
onOpenAutoFocus: (d) => {
|
|
19
|
+
d.preventDefault();
|
|
20
|
+
},
|
|
21
|
+
className: l("bg-white", "rounded-md", "shadow-md", "animate-in", "fade-in-0", "z-50", "dark:bg-metal-800", "dark:border-metal-700", n),
|
|
22
|
+
children: s
|
|
23
|
+
}) })]
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
j as FilterDropdown
|
|
28
|
+
};
|
|
@@ -1,76 +1,71 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as
|
|
3
|
-
import { Button as
|
|
1
|
+
import { t as m } from "../../../../Checkbox-DzAx7n67.js";
|
|
2
|
+
import { t as s } from "../../../../utils-Cx-WzRZF.js";
|
|
3
|
+
import { Button as o } from "../../../Button/Button.js";
|
|
4
4
|
import { t as y } from "../../../../chevron-down-DNP-OOAQ.js";
|
|
5
|
-
import { Badge as
|
|
6
|
-
import { filterButtonIconVariants as
|
|
5
|
+
import { Badge as O } from "../../../Badge/Badge.js";
|
|
6
|
+
import { filterButtonIconVariants as S, filterButtonVariants as w } from "../../Filter.variants.js";
|
|
7
|
+
import { FilterDropdown as A } from "../FilterDropdown/FilterDropdown.js";
|
|
7
8
|
import { useBadgeMultiSelect as B } from "../BadgeDropdown/BadgeMultiSelect.hook.js";
|
|
8
|
-
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
9
|
-
var
|
|
10
|
-
const {
|
|
9
|
+
import { Fragment as j, jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
10
|
+
var z = ({ options: l, label: p, position: h = "left", onApply: f, showSelectAll: x = !0, selectAllLabel: g = "All" }) => {
|
|
11
|
+
const { isOpen: r, isAllSelected: c, selectedOptions: u, selectedCount: d, handleOpenChange: C, handleResetOptions: b, handleApplyOptions: k, handleSelectAll: N, handleSelectOption: v } = B({
|
|
11
12
|
onApply: f,
|
|
12
13
|
options: l
|
|
13
14
|
});
|
|
14
|
-
return l.length === 0 ? null : /* @__PURE__ */ a(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
className:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
return l.length === 0 ? null : /* @__PURE__ */ a(A, {
|
|
16
|
+
isOpen: r,
|
|
17
|
+
position: h,
|
|
18
|
+
contentClassName: "border border-gray-200",
|
|
19
|
+
triggerClassName: s(w(), { "text-slate-700 dark:text-metal-50": r }),
|
|
20
|
+
trigger: /* @__PURE__ */ a(j, { children: [
|
|
21
|
+
p,
|
|
22
|
+
d.length > 0 && /* @__PURE__ */ e(O, { label: d.length.toString() }),
|
|
23
|
+
/* @__PURE__ */ e(y, { className: s(S(), { "rotate-180 text-blue-600 dark:text-aurora-500": r }) })
|
|
24
|
+
] }),
|
|
25
|
+
onOpenChange: C,
|
|
26
|
+
children: [/* @__PURE__ */ e("div", {
|
|
27
|
+
className: "px-6 py-4",
|
|
28
|
+
children: /* @__PURE__ */ a("div", {
|
|
29
|
+
className: "flex flex-col gap-2",
|
|
30
|
+
children: [x && /* @__PURE__ */ a("div", {
|
|
31
|
+
className: "flex gap-4",
|
|
32
|
+
children: [/* @__PURE__ */ e(m, {
|
|
33
|
+
defaultChecked: c,
|
|
34
|
+
onChange: (t) => N(l, t)
|
|
35
|
+
}, `select-all-${c}`), /* @__PURE__ */ e("span", {
|
|
36
|
+
className: "text-sm text-slate-700 dark:text-metal-200 whitespace-nowrap",
|
|
37
|
+
children: g
|
|
38
|
+
})]
|
|
39
|
+
}), l.map((t) => {
|
|
40
|
+
const i = !!u.find((n) => n.id === t.id);
|
|
41
|
+
return /* @__PURE__ */ a("div", {
|
|
35
42
|
className: "flex gap-4",
|
|
36
|
-
children: [/* @__PURE__ */ e(
|
|
37
|
-
defaultChecked:
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
children: [/* @__PURE__ */ e(m, {
|
|
44
|
+
defaultChecked: i,
|
|
45
|
+
"data-label": t.id,
|
|
46
|
+
onChange: (n) => v(t, n)
|
|
47
|
+
}, `${t.id}-${i}`), /* @__PURE__ */ e("span", {
|
|
40
48
|
className: "text-sm text-slate-700 dark:text-metal-200 whitespace-nowrap",
|
|
41
|
-
children:
|
|
49
|
+
children: t.label
|
|
42
50
|
})]
|
|
43
|
-
}
|
|
44
|
-
const m = !!b.find((n) => n.id === t.id);
|
|
45
|
-
return /* @__PURE__ */ a("div", {
|
|
46
|
-
className: "flex gap-4",
|
|
47
|
-
children: [/* @__PURE__ */ e(o, {
|
|
48
|
-
defaultChecked: m,
|
|
49
|
-
"data-label": t.id,
|
|
50
|
-
onChange: (n) => w(t, n)
|
|
51
|
-
}, `${t.id}-${m}`), /* @__PURE__ */ e("span", {
|
|
52
|
-
className: "text-sm text-slate-700 dark:text-metal-200 whitespace-nowrap",
|
|
53
|
-
children: t.label
|
|
54
|
-
})]
|
|
55
|
-
}, t.id);
|
|
56
|
-
})]
|
|
57
|
-
})
|
|
58
|
-
}), /* @__PURE__ */ a("div", {
|
|
59
|
-
className: r("flex", "justify-center", "items-center", "gap-4", "px-6", "py-4", "border-t", "border-gray-200", "dark:border-metal-700"),
|
|
60
|
-
children: [/* @__PURE__ */ e(p, {
|
|
61
|
-
variant: "secondary",
|
|
62
|
-
appearance: "compact",
|
|
63
|
-
onClick: v,
|
|
64
|
-
children: "Reset"
|
|
65
|
-
}), /* @__PURE__ */ e(p, {
|
|
66
|
-
appearance: "compact",
|
|
67
|
-
onClick: N,
|
|
68
|
-
children: "Apply"
|
|
51
|
+
}, t.id);
|
|
69
52
|
})]
|
|
53
|
+
})
|
|
54
|
+
}), /* @__PURE__ */ a("div", {
|
|
55
|
+
className: s("flex", "justify-center", "items-center", "gap-4", "px-6", "py-4", "border-t", "border-gray-200", "dark:border-metal-700"),
|
|
56
|
+
children: [/* @__PURE__ */ e(o, {
|
|
57
|
+
variant: "secondary",
|
|
58
|
+
appearance: "compact",
|
|
59
|
+
onClick: b,
|
|
60
|
+
children: "Reset"
|
|
61
|
+
}), /* @__PURE__ */ e(o, {
|
|
62
|
+
appearance: "compact",
|
|
63
|
+
onClick: k,
|
|
64
|
+
children: "Apply"
|
|
70
65
|
})]
|
|
71
66
|
})]
|
|
72
67
|
});
|
|
73
68
|
};
|
|
74
69
|
export {
|
|
75
|
-
|
|
70
|
+
z as TextMultiSelect
|
|
76
71
|
};
|
|
@@ -1,54 +1,53 @@
|
|
|
1
|
-
import { getFormattedTime as
|
|
1
|
+
import { getFormattedTime as w } from "../../../TimePicker/utils/index.js";
|
|
2
2
|
import { useFilterContext as x } from "../../contexts/filter.hook.js";
|
|
3
|
-
import { FilterEvent as
|
|
4
|
-
import { useCallback as
|
|
5
|
-
var
|
|
6
|
-
const { closeOnApply: l } = x(),
|
|
3
|
+
import { FilterEvent as b, sendOpenFilterEvent as I } from "../../events/index.js";
|
|
4
|
+
import { useCallback as s, useEffect as p, useId as R, useState as i } from "react";
|
|
5
|
+
var j = ({ onApply: t, format: g = "24" }) => {
|
|
6
|
+
const { closeOnApply: l } = x(), n = R(), [h, o] = i(!1), [d, r] = i(), [f, c] = i(), [m, a] = i(), [E, v] = i(), L = E ?? (f ? w(f, g) : void 0), C = s((e) => {
|
|
7
|
+
e && I(n), o(e);
|
|
8
|
+
}, [n]), T = s((e) => {
|
|
7
9
|
r(e.value), a(e.label);
|
|
8
|
-
}, []),
|
|
10
|
+
}, []), O = s((e) => {
|
|
9
11
|
r(e), a(void 0);
|
|
10
|
-
}, []),
|
|
11
|
-
|
|
12
|
+
}, []), P = s(() => {
|
|
13
|
+
c(d), v(m), t?.(d), l && o(!1);
|
|
12
14
|
}, [
|
|
13
15
|
l,
|
|
14
16
|
t,
|
|
15
17
|
d,
|
|
16
|
-
|
|
17
|
-
]),
|
|
18
|
-
r(void 0),
|
|
18
|
+
m
|
|
19
|
+
]), u = s(() => o(!1), []), S = s(() => {
|
|
20
|
+
r(void 0), c(void 0), a(void 0), v(void 0), t?.(), l && o(!1);
|
|
19
21
|
}, [l, t]);
|
|
20
|
-
return
|
|
22
|
+
return p(() => {
|
|
21
23
|
const e = new AbortController();
|
|
22
|
-
return document.addEventListener(
|
|
23
|
-
|
|
24
|
-
}, { signal: e.signal }), document.addEventListener(
|
|
25
|
-
r(void 0),
|
|
24
|
+
return document.addEventListener(b.OPEN, (F) => {
|
|
25
|
+
F.detail !== n && o(!1);
|
|
26
|
+
}, { signal: e.signal }), document.addEventListener(b.RESET, () => {
|
|
27
|
+
r(void 0), c(void 0), a(void 0), v(void 0), t?.();
|
|
26
28
|
}, { signal: e.signal }), () => {
|
|
27
29
|
e.abort();
|
|
28
30
|
};
|
|
29
|
-
}, [
|
|
30
|
-
const e = new AbortController()
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return document.addEventListener("mousedown", p, { signal: e.signal }), document.addEventListener("visibilitychange", () => {
|
|
34
|
-
document.hidden && v();
|
|
31
|
+
}, [n, t]), p(() => {
|
|
32
|
+
const e = new AbortController();
|
|
33
|
+
return document.addEventListener("visibilitychange", () => {
|
|
34
|
+
document.hidden && u();
|
|
35
35
|
}, { signal: e.signal }), () => {
|
|
36
36
|
e.abort();
|
|
37
37
|
};
|
|
38
|
-
}, [
|
|
39
|
-
id:
|
|
40
|
-
appliedLabel:
|
|
41
|
-
isOpen:
|
|
38
|
+
}, [u]), {
|
|
39
|
+
id: n,
|
|
40
|
+
appliedLabel: L,
|
|
41
|
+
isOpen: h,
|
|
42
42
|
selectedTime: d,
|
|
43
|
-
selectedPresetLabel:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
handleReset: F
|
|
43
|
+
selectedPresetLabel: m,
|
|
44
|
+
handleApply: P,
|
|
45
|
+
handleOpenChange: C,
|
|
46
|
+
handleSelectPreset: T,
|
|
47
|
+
handleSelectCustom: O,
|
|
48
|
+
handleReset: S
|
|
50
49
|
};
|
|
51
50
|
};
|
|
52
51
|
export {
|
|
53
|
-
|
|
52
|
+
j as useTimeFilterDropdown
|
|
54
53
|
};
|
|
@@ -1,84 +1,79 @@
|
|
|
1
1
|
import { t as a } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
-
import { Button as
|
|
3
|
-
import { t as
|
|
4
|
-
import { Badge as
|
|
2
|
+
import { Button as s } from "../../../Button/Button.js";
|
|
3
|
+
import { t as k } from "../../../../chevron-down-DNP-OOAQ.js";
|
|
4
|
+
import { Badge as N } from "../../../Badge/Badge.js";
|
|
5
5
|
import { TimePicker as C } from "../../../TimePicker/TimePicker.js";
|
|
6
|
-
import { filterButtonIconVariants as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
import { filterButtonIconVariants as w, filterButtonVariants as B } from "../../Filter.variants.js";
|
|
7
|
+
import { FilterDropdown as D } from "../FilterDropdown/FilterDropdown.js";
|
|
8
|
+
import { useTimeFilterDropdown as F } from "./TimeFilterDropdown.hook.js";
|
|
9
|
+
import { Fragment as j, jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
10
|
+
var q = ({ label: p, position: g = "left", format: r = "24", presets: n, showTimePicker: i = !0, onApply: x }) => {
|
|
11
|
+
const { appliedLabel: c, isOpen: o, selectedTime: h, selectedPresetLabel: d, handleApply: b, handleOpenChange: u, handleSelectPreset: f, handleSelectCustom: y, handleReset: v } = F({
|
|
12
|
+
onApply: x,
|
|
12
13
|
format: r
|
|
13
|
-
}),
|
|
14
|
-
return /* @__PURE__ */ l(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
children: /* @__PURE__ */ e(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
children: /* @__PURE__ */ e(C, {
|
|
55
|
-
format: r,
|
|
56
|
-
time: x,
|
|
57
|
-
onChange: y,
|
|
58
|
-
mode: "input"
|
|
59
|
-
})
|
|
14
|
+
}), m = n && n.length > 0;
|
|
15
|
+
return /* @__PURE__ */ l(D, {
|
|
16
|
+
isOpen: o,
|
|
17
|
+
position: g,
|
|
18
|
+
contentClassName: a("border", "border-gray-200", "flex", "flex-col"),
|
|
19
|
+
triggerClassName: a(B(), { "text-slate-700 dark:text-metal-100": o }),
|
|
20
|
+
trigger: /* @__PURE__ */ l(j, { children: [
|
|
21
|
+
p,
|
|
22
|
+
c && /* @__PURE__ */ e(N, { label: c }),
|
|
23
|
+
/* @__PURE__ */ e(k, { className: a(w(), { "rotate-180 text-blue-600 dark:text-aurora-500": o }) })
|
|
24
|
+
] }),
|
|
25
|
+
onOpenChange: u,
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ l("div", {
|
|
28
|
+
className: "flex",
|
|
29
|
+
children: [
|
|
30
|
+
m && /* @__PURE__ */ e("div", {
|
|
31
|
+
className: "flex flex-col gap-1 py-4 px-4 min-w-40",
|
|
32
|
+
children: n.map((t) => /* @__PURE__ */ e("button", {
|
|
33
|
+
type: "button",
|
|
34
|
+
className: a("text-left", "px-3", "py-1.5", "rounded", "cursor-pointer", "text-sm", "whitespace-nowrap", "transition-colors", "hover:bg-gray-100", "dark:hover:bg-metal-700", {
|
|
35
|
+
"bg-blue-50 text-blue-600 dark:bg-metal-700 dark:text-aurora-500": d === t.label,
|
|
36
|
+
"text-gray-700 dark:text-gray-300": d !== t.label
|
|
37
|
+
}),
|
|
38
|
+
onClick: () => f(t),
|
|
39
|
+
children: t.label
|
|
40
|
+
}, t.label))
|
|
41
|
+
}),
|
|
42
|
+
m && i && /* @__PURE__ */ e("div", { className: "w-px bg-gray-200 dark:bg-metal-700" }),
|
|
43
|
+
i && /* @__PURE__ */ e("div", {
|
|
44
|
+
className: "py-4 px-6",
|
|
45
|
+
children: /* @__PURE__ */ e("div", {
|
|
46
|
+
className: a({
|
|
47
|
+
"w-35.5": r === "24",
|
|
48
|
+
"w-52": r === "12"
|
|
49
|
+
}),
|
|
50
|
+
children: /* @__PURE__ */ e(C, {
|
|
51
|
+
format: r,
|
|
52
|
+
time: h,
|
|
53
|
+
onChange: y,
|
|
54
|
+
mode: "input"
|
|
60
55
|
})
|
|
61
56
|
})
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ e("div", { className: "h-px bg-gray-200 dark:bg-metal-700" }),
|
|
61
|
+
/* @__PURE__ */ l("div", {
|
|
62
|
+
className: a("flex", "justify-end", "items-center", "gap-4", "px-6", "py-3"),
|
|
63
|
+
children: [/* @__PURE__ */ e(s, {
|
|
64
|
+
variant: "secondary",
|
|
65
|
+
appearance: "compact",
|
|
66
|
+
onClick: v,
|
|
67
|
+
children: "Reset"
|
|
68
|
+
}), /* @__PURE__ */ e(s, {
|
|
69
|
+
appearance: "compact",
|
|
70
|
+
onClick: b,
|
|
71
|
+
children: "Apply"
|
|
72
|
+
})]
|
|
73
|
+
})
|
|
74
|
+
]
|
|
80
75
|
});
|
|
81
76
|
};
|
|
82
77
|
export {
|
|
83
|
-
|
|
78
|
+
q as TimeFilterDropdown
|
|
84
79
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { FilterContext as
|
|
2
|
-
import { jsx as
|
|
3
|
-
var
|
|
4
|
-
value: {
|
|
1
|
+
import { FilterContext as t } from "./filter.context.js";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
var l = ({ children: r, closeOnApply: o, theme: e }) => /* @__PURE__ */ i(t.Provider, {
|
|
4
|
+
value: {
|
|
5
|
+
closeOnApply: o,
|
|
6
|
+
theme: e
|
|
7
|
+
},
|
|
5
8
|
children: r
|
|
6
9
|
});
|
|
7
10
|
export {
|
|
8
|
-
|
|
11
|
+
l as FilterProvider
|
|
9
12
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as l, t as _ } from "../../utils-Cx-WzRZF.js";
|
|
2
2
|
import { Typography as z } from "../Typography/Typography.js";
|
|
3
|
-
import { a as P, c as j, d as D, i as E, l as F, n as H, o as N, s as O, u as M } from "../../dist-
|
|
3
|
+
import { a as P, c as j, d as D, i as E, l as F, n as H, o as N, s as O, u as M } from "../../dist-AihTpWdF.js";
|
|
4
4
|
import { useMemo as h } from "react";
|
|
5
5
|
import { jsx as p, jsxs as V } from "react/jsx-runtime";
|
|
6
6
|
P.register(E, F, M, O, N, j, D);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Body as o } from "./Body/Body.js";
|
|
2
2
|
import { Footer as p } from "./Footer/Footer.js";
|
|
3
3
|
import { Header as e } from "./Header/Header.js";
|
|
4
|
-
import { n as i } from "../../../Modal-
|
|
4
|
+
import { n as i } from "../../../Modal-Bfzggwlr.js";
|
|
5
5
|
export {
|
|
6
6
|
o as Body,
|
|
7
7
|
p as Footer,
|