@konstructio/ui 0.1.2-alpha.105 → 0.1.2-alpha.106
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-BGo_acd5.js → AlertDialogTrigger-BOrb536P.js} +39 -39
- package/dist/{Breadcrumb-Cp3abB2w.js → Breadcrumb-DVBxqgW_.js} +2 -2
- package/dist/Checkbox-B20uoUKD.js +249 -0
- package/dist/{CommandInput-BLq69pOT.js → CommandInput-BWt6-vUK.js} +3 -3
- package/dist/{Counter-BV680M5r.js → Counter-DiQb-he2.js} +2 -2
- package/dist/{DayPicker-kweJz134.js → DayPicker-C22j0Y-u.js} +539 -518
- package/dist/{DropdownButton-DfNojmCW.js → DropdownButton-hCVYZ1LA.js} +5 -5
- package/dist/{FlagSelectorList-CkTR3j6O.js → FlagSelectorList-CnJjnsp6.js} +11 -8
- package/dist/{HamburgerTrigger-DRylBL2d.js → HamburgerTrigger-BT2yUUJ-.js} +2 -2
- package/dist/{ImageUpload-DiwymQcU.js → ImageUpload-DgCBCa5X.js} +1 -1
- package/dist/{Input-Cf44DzfE.js → Input-wp-rsCmX.js} +2 -2
- package/dist/{Modal-Dyn088X7.js → Modal-CkAf9UY7.js} +3 -3
- package/dist/{Switch-aPhL5rNG.js → Switch-CyJXptgc.js} +80 -77
- package/dist/{Toast-3NEz7LLa.js → Toast-DLJDExxw.js} +7 -6
- package/dist/{Wrapper-DP6Sxngx.js → Wrapper-B8Ja3k4j.js} +63 -63
- package/dist/{Wrapper-CVJSuYWx.js → Wrapper-CvDRHgN4.js} +3 -3
- package/dist/components/Alert/Alert.js +1 -1
- 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/Autocomplete/hooks/useAutocomplete.js +27 -25
- package/dist/components/Autocomplete/hooks/useNavigationList.js +2 -3
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/BackButton/BackButton.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +1 -1
- 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 +2 -2
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +2 -2
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +30 -28
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +23 -21
- package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.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 +1 -1
- package/dist/components/Drawer/Drawer.js +27 -25
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +51 -36
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +40 -38
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +1 -1
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +1 -1
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +42 -40
- package/dist/components/Filter/utils/index.js +1 -1
- package/dist/components/ImageUpload/ImageUpload.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/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +11 -11
- 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 +3 -3
- 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/PhoneNumberInput/utils/index.js +1 -1
- package/dist/components/PieChart/PieChart.js +30 -27
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Select/Select.js +36 -33
- package/dist/components/Select/components/List/List.js +31 -31
- package/dist/components/Select/hooks/useNavigationList.js +2 -3
- package/dist/components/Select/hooks/useSelect.js +8 -8
- 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/Switch/Switch.js +1 -1
- package/dist/components/Switch/Switch.variants.js +15 -7
- 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/TagSelect/hooks/useTagSelect.js +11 -11
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +16 -16
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Typography/Typography.js +19 -16
- package/dist/components/VirtualizedTable/VirtualizedTable.js +1 -1
- package/dist/components/VirtualizedTable/components/Body/Body.js +1 -1
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +3 -3
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +1 -1
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +2 -2
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/index.js +10 -10
- package/dist/{components-Cf345jTv.js → components-MnxnhLqM.js} +1 -1
- package/dist/{constants-CxJJRVK3.js → constants-CSsr7_YV.js} +1 -1
- package/dist/{debounce-C5Ycjilj.js → debounce-BdyZeJQk.js} +2 -2
- package/dist/{dist-BaPW7qXd2.js → dist-B6ExqXM_2.js} +1 -1
- package/dist/{dist-BZNE2Tnx.js → dist-BbX4Nrk2.js} +1 -1
- package/dist/{dist-BdobXn93.js → dist-C87gsBDM.js} +1 -1
- package/dist/{dist-DDck_2lb.js → dist-CqNOgbfR.js} +117 -116
- package/dist/{dist-C3YVLapk.js → dist-DO3apbIh.js} +24 -24
- package/dist/{dist-CzKqHuqJ2.js → dist-DwxO2RoR2.js} +38 -38
- package/dist/{dist-DFCz63oC2.js → dist-Z0F27ATp2.js} +157 -158
- package/dist/{dist-AihTpWdF.js → dist-iUAHw-3y.js} +272 -272
- package/dist/{dist-tGUUcv8n.js → dist-oJzmvhAb.js} +114 -115
- package/dist/{dist-BlPTJNIm.js → dist-ut_BEHii.js} +1 -1
- package/dist/es2015-B_07N-UL.js +796 -0
- package/dist/index.js +10 -10
- package/dist/{isObject-BeFFiVJK.js → isObject-pLoSfdr0.js} +1 -1
- package/dist/lib/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/lib/components/Checkbox/Checkbox.types.d.ts +2 -1
- package/dist/lib/components/Switch/Switch.variants.d.ts +3 -1
- package/dist/{libphonenumber-hGupNnJu.js → libphonenumber-BMq3Thej.js} +356 -347
- package/dist/package.json +21 -21
- package/dist/{phone-number.provider-BxQCTxp8.js → phone-number.provider-Dkq_p1Gi.js} +2 -2
- package/dist/{prop-types-CfEYxTbR.js → prop-types-BCUW56rg.js} +1 -1
- package/dist/{react-CvUtBTMg.js → react-B6Nc0Fib.js} +835 -827
- package/dist/{rolldown-runtime-Ck3dxwZt.js → rolldown-runtime-Dw9YIBcH.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table.provider-B0BafHuU.js → table.provider-DfZ74xMZ.js} +95 -95
- package/dist/{useBreadcrumb-DYfZL_2p.js → useBreadcrumb-Ds_9BeFz.js} +7 -6
- package/dist/{utils-B-BTGYA5.js → utils-DVYdP0CJ.js} +2 -3
- package/dist/{x-BI9jmc7e.js → x-Ierxf0uI.js} +2 -2
- package/package.json +21 -21
- package/dist/Checkbox-B_ngk9Dj.js +0 -249
- package/dist/es2015-DigR3dar.js +0 -795
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as a } from "../../../../../../utils-Cx-WzRZF.js";
|
|
2
|
-
import { t as Q } from "../../../../../../react-
|
|
2
|
+
import { t as Q } from "../../../../../../react-B6Nc0Fib.js";
|
|
3
3
|
import { CalendarDivider as U } from "../CalendarDivider/CalendarDivider.js";
|
|
4
4
|
import { calendarGridContainerVariants as X, calendarPanelVariants as Y } from "../../CalendarPanel.variants.js";
|
|
5
|
-
import "../../../../../../constants-
|
|
5
|
+
import "../../../../../../constants-CSsr7_YV.js";
|
|
6
6
|
import { CalendarMonth as s } from "../CalendarMonth/CalendarMonth.js";
|
|
7
7
|
import { useIndependentCarousel as Z } from "../../hooks/useIndependentCarousel.js";
|
|
8
8
|
import { NavigationButton as c } from "../NavigationButton/NavigationButton.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as n } from "../../../../../../utils-Cx-WzRZF.js";
|
|
2
|
-
import { t as P } from "../../../../../../react-
|
|
2
|
+
import { t as P } from "../../../../../../react-B6Nc0Fib.js";
|
|
3
3
|
import { CalendarDivider as W } from "../CalendarDivider/CalendarDivider.js";
|
|
4
4
|
import { calendarGridContainerVariants as z, calendarPanelVariants as L } from "../../CalendarPanel.variants.js";
|
|
5
5
|
import { CalendarMonth as R } from "../CalendarMonth/CalendarMonth.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getMonthName as E } from "../../../utils/validation.js";
|
|
2
|
-
import { a as s, i as _, n as r, o as T, r as e, s as o, t } from "../../../../../constants-
|
|
2
|
+
import { a as s, i as _, n as r, o as T, r as e, s as o, t } from "../../../../../constants-CSsr7_YV.js";
|
|
3
3
|
export {
|
|
4
4
|
t as GAP_WIDTH,
|
|
5
5
|
r as MONTH_HEADER_HEIGHT,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getMonthName as t } from "../../../utils/validation.js";
|
|
2
|
-
import { a as o, i as r, n as s, o as H, r as E, s as m, t as _ } from "../../../../../constants-
|
|
2
|
+
import { a as o, i as r, n as s, o as H, r as E, s as m, t as _ } from "../../../../../constants-CSsr7_YV.js";
|
|
3
3
|
import { calculateCalendarHeight as T, getNextMonth as i, getPrevMonth as I, getWeeksInMonth as M } from "../utils/index.js";
|
|
4
4
|
import { useTogetherCarousel as N } from "./useTogetherCarousel.js";
|
|
5
5
|
import { useIndependentCarousel as h } from "./useIndependentCarousel.js";
|
package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { calculateCalendarHeight as j, getNextMonth as m, getPrevMonth as h, getWeeksInMonth as
|
|
3
|
-
import { useEffect as g, useMemo as p, useRef as
|
|
4
|
-
var Q = ({ displayedMonths: u, animationDuration:
|
|
5
|
-
const [f, x] = i(u[0]), [s, S] = i(null), [r, b] = i(!1), [a,
|
|
1
|
+
import { r as W } from "../../../../../constants-CSsr7_YV.js";
|
|
2
|
+
import { calculateCalendarHeight as j, getNextMonth as m, getPrevMonth as h, getWeeksInMonth as k } from "../utils/index.js";
|
|
3
|
+
import { useEffect as g, useMemo as p, useRef as L, useState as i } from "react";
|
|
4
|
+
var Q = ({ displayedMonths: u, animationDuration: F, navigationMode: I }) => {
|
|
5
|
+
const [f, x] = i(u[0]), [s, S] = i(null), [r, b] = i(!1), [a, H] = i(!1), [w, C] = i(!0), T = L(null), N = L(!0), [o, E] = i(u[1]), [l, D] = i(null), [n, P] = i(!1), [c, q] = i(!1), [O, _] = i(!0), A = L(null), d = L(!0);
|
|
6
6
|
g(() => {
|
|
7
|
-
if (
|
|
7
|
+
if (I === "independent") {
|
|
8
8
|
if (N.current) {
|
|
9
9
|
N.current = !1;
|
|
10
10
|
return;
|
|
@@ -12,8 +12,8 @@ var Q = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
|
|
|
12
12
|
if (!r) {
|
|
13
13
|
const e = f.getTime(), t = u[0].getTime();
|
|
14
14
|
if (e !== t) {
|
|
15
|
-
const
|
|
16
|
-
Math.abs(
|
|
15
|
+
const R = t - e, M = Math.round(R / W);
|
|
16
|
+
Math.abs(M) === 1 ? (S(M > 0 ? "left" : "right"), b(!0), H(!1)) : x(u[0]);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -21,9 +21,9 @@ var Q = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
|
|
|
21
21
|
u,
|
|
22
22
|
f,
|
|
23
23
|
r,
|
|
24
|
-
|
|
24
|
+
I
|
|
25
25
|
]), g(() => {
|
|
26
|
-
if (
|
|
26
|
+
if (I === "independent") {
|
|
27
27
|
if (d.current) {
|
|
28
28
|
d.current = !1;
|
|
29
29
|
return;
|
|
@@ -31,8 +31,8 @@ var Q = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
|
|
|
31
31
|
if (!n) {
|
|
32
32
|
const e = o.getTime(), t = u[1].getTime();
|
|
33
33
|
if (e !== t) {
|
|
34
|
-
const
|
|
35
|
-
Math.abs(
|
|
34
|
+
const R = t - e, M = Math.round(R / W);
|
|
35
|
+
Math.abs(M) === 1 ? (D(M > 0 ? "left" : "right"), P(!0), q(!1)) : E(u[1]);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -40,10 +40,10 @@ var Q = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
|
|
|
40
40
|
u,
|
|
41
41
|
o,
|
|
42
42
|
n,
|
|
43
|
-
|
|
43
|
+
I
|
|
44
44
|
]), g(() => {
|
|
45
45
|
r && !a && s && (T.current && T.current.offsetHeight, requestAnimationFrame(() => {
|
|
46
|
-
|
|
46
|
+
H(!0);
|
|
47
47
|
}));
|
|
48
48
|
}, [
|
|
49
49
|
r,
|
|
@@ -51,7 +51,7 @@ var Q = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
|
|
|
51
51
|
s
|
|
52
52
|
]), g(() => {
|
|
53
53
|
n && !c && l && (A.current && A.current.offsetHeight, requestAnimationFrame(() => {
|
|
54
|
-
|
|
54
|
+
q(!0);
|
|
55
55
|
}));
|
|
56
56
|
}, [
|
|
57
57
|
n,
|
|
@@ -61,42 +61,44 @@ var Q = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
|
|
|
61
61
|
if (r && a) {
|
|
62
62
|
const e = setTimeout(() => {
|
|
63
63
|
C(!1), requestAnimationFrame(() => {
|
|
64
|
-
T.current && T.current.offsetHeight, x((t) => s === "left" ? m(t) : h(t)), b(!1), S(null),
|
|
64
|
+
T.current && T.current.offsetHeight, x((t) => s === "left" ? m(t) : h(t)), b(!1), S(null), H(!1), requestAnimationFrame(() => {
|
|
65
65
|
requestAnimationFrame(() => {
|
|
66
66
|
C(!0);
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
|
-
},
|
|
70
|
+
}, F);
|
|
71
71
|
return () => clearTimeout(e);
|
|
72
72
|
}
|
|
73
73
|
}, [
|
|
74
74
|
r,
|
|
75
75
|
a,
|
|
76
|
-
|
|
76
|
+
F,
|
|
77
77
|
s
|
|
78
78
|
]), g(() => {
|
|
79
79
|
if (n && c) {
|
|
80
80
|
const e = setTimeout(() => {
|
|
81
81
|
_(!1), requestAnimationFrame(() => {
|
|
82
|
-
A.current && A.current.offsetHeight, E((t) => l === "left" ? m(t) : h(t)), P(!1), D(null),
|
|
82
|
+
A.current && A.current.offsetHeight, E((t) => l === "left" ? m(t) : h(t)), P(!1), D(null), q(!1), requestAnimationFrame(() => {
|
|
83
83
|
requestAnimationFrame(() => {
|
|
84
84
|
_(!0);
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
|
-
},
|
|
88
|
+
}, F);
|
|
89
89
|
return () => clearTimeout(e);
|
|
90
90
|
}
|
|
91
91
|
}, [
|
|
92
92
|
n,
|
|
93
93
|
c,
|
|
94
|
-
|
|
94
|
+
F,
|
|
95
95
|
l
|
|
96
96
|
]);
|
|
97
|
-
const
|
|
97
|
+
const X = p(() => {
|
|
98
98
|
let e = f, t = o;
|
|
99
|
-
|
|
99
|
+
r && s === "left" ? e = m(f) : r && s === "right" && (e = h(f)), n && l === "left" ? t = m(o) : n && l === "right" && (t = h(o));
|
|
100
|
+
const R = Math.max(k(e), k(t));
|
|
101
|
+
return j(R);
|
|
100
102
|
}, [
|
|
101
103
|
f,
|
|
102
104
|
o,
|
|
@@ -104,7 +106,7 @@ var Q = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
|
|
|
104
106
|
n,
|
|
105
107
|
s,
|
|
106
108
|
l
|
|
107
|
-
]),
|
|
109
|
+
]), $ = () => {
|
|
108
110
|
let e = -259;
|
|
109
111
|
return r && a && (s === "left" ? e = -2 * 259 : s === "right" && (e = 0)), `translateX(${e}px)`;
|
|
110
112
|
}, G = () => {
|
|
@@ -117,18 +119,18 @@ var Q = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
|
|
|
117
119
|
leftNextMonth: m(f),
|
|
118
120
|
leftCarouselRef: T,
|
|
119
121
|
isLeftAnimating: r,
|
|
120
|
-
enableLeftTransition:
|
|
122
|
+
enableLeftTransition: w,
|
|
121
123
|
leftAnimateTransform: a,
|
|
122
|
-
getLeftTransform:
|
|
124
|
+
getLeftTransform: $,
|
|
123
125
|
rightInternalMonth: o,
|
|
124
126
|
rightPrevMonth: h(o),
|
|
125
127
|
rightNextMonth: m(o),
|
|
126
128
|
rightCarouselRef: A,
|
|
127
129
|
isRightAnimating: n,
|
|
128
|
-
enableRightTransition:
|
|
130
|
+
enableRightTransition: O,
|
|
129
131
|
rightAnimateTransform: c,
|
|
130
132
|
getRightTransform: G,
|
|
131
|
-
calendarHeight:
|
|
133
|
+
calendarHeight: X
|
|
132
134
|
};
|
|
133
135
|
};
|
|
134
136
|
export {
|
package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import { r as w } from "../../../../../constants-
|
|
1
|
+
import { r as w } from "../../../../../constants-CSsr7_YV.js";
|
|
2
2
|
import { calculateCalendarHeight as L, getNextMonth as T, getPrevMonth as g, getWeeksInMonth as X } from "../utils/index.js";
|
|
3
3
|
import { useEffect as A, useMemo as $, useRef as q, useState as a } from "react";
|
|
4
4
|
var Y = ({ displayedMonths: l, animationDuration: H, disabled: I, canNavigatePrev: D, canNavigateNext: E, navigationMode: N, navigatePrevMonth: S, navigateNextMonth: b }) => {
|
|
5
|
-
const [n,
|
|
5
|
+
const [n, c] = a(null), [e, u] = a(!1), [o, i] = a(!1), [p, W] = a(!0), [s, F] = a(l), f = q(null), P = q(!0), R = 291, C = g(g(s[0])), M = g(s[0]), m = s[0], h = s[1], d = T(s[1]), O = T(T(s[1])), k = $(() => {
|
|
6
6
|
let t;
|
|
7
|
-
|
|
7
|
+
e && n === "left" ? t = [h, d] : e && n === "right" ? t = [M, m] : t = [m, h];
|
|
8
|
+
const r = Math.max(...t.map(X));
|
|
9
|
+
return L(r);
|
|
8
10
|
}, [
|
|
9
11
|
e,
|
|
10
12
|
n,
|
|
11
|
-
h,
|
|
12
13
|
m,
|
|
14
|
+
h,
|
|
13
15
|
d,
|
|
14
16
|
M
|
|
15
|
-
]),
|
|
17
|
+
]), v = 6 * 259 + 160, x = -2 * 291;
|
|
16
18
|
return A(() => {
|
|
17
19
|
if (N !== "independent") {
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
+
if (P.current) {
|
|
21
|
+
P.current = !1;
|
|
20
22
|
return;
|
|
21
23
|
}
|
|
22
24
|
if (!e) {
|
|
23
|
-
const t =
|
|
24
|
-
if (t !==
|
|
25
|
-
const
|
|
26
|
-
Math.abs(_) === 1 ? (
|
|
25
|
+
const t = s[0].getTime(), r = l[0].getTime();
|
|
26
|
+
if (t !== r) {
|
|
27
|
+
const G = r - t, _ = Math.round(G / w);
|
|
28
|
+
Math.abs(_) === 1 ? (c(_ > 0 ? "left" : "right"), u(!0), i(!1)) : F(l);
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
}, [
|
|
31
33
|
l,
|
|
32
|
-
|
|
34
|
+
s,
|
|
33
35
|
e,
|
|
34
36
|
N
|
|
35
37
|
]), A(() => {
|
|
@@ -43,10 +45,10 @@ var Y = ({ displayedMonths: l, animationDuration: H, disabled: I, canNavigatePre
|
|
|
43
45
|
]), A(() => {
|
|
44
46
|
if (e && o) {
|
|
45
47
|
const t = setTimeout(() => {
|
|
46
|
-
|
|
47
|
-
f.current && f.current.offsetHeight,
|
|
48
|
+
W(!1), requestAnimationFrame(() => {
|
|
49
|
+
f.current && f.current.offsetHeight, F((r) => n === "left" ? [r[1], T(r[1])] : [g(r[0]), r[0]]), u(!1), c(null), i(!1), requestAnimationFrame(() => {
|
|
48
50
|
requestAnimationFrame(() => {
|
|
49
|
-
|
|
51
|
+
W(!0);
|
|
50
52
|
});
|
|
51
53
|
});
|
|
52
54
|
});
|
|
@@ -63,25 +65,25 @@ var Y = ({ displayedMonths: l, animationDuration: H, disabled: I, canNavigatePre
|
|
|
63
65
|
isAnimating: e,
|
|
64
66
|
enableTransition: p,
|
|
65
67
|
animateTransform: o,
|
|
66
|
-
calendarHeight:
|
|
67
|
-
carouselTotalWidth:
|
|
68
|
+
calendarHeight: k,
|
|
69
|
+
carouselTotalWidth: v,
|
|
68
70
|
monthsToRender: [
|
|
69
71
|
C,
|
|
70
72
|
M,
|
|
71
|
-
h,
|
|
72
73
|
m,
|
|
74
|
+
h,
|
|
73
75
|
d,
|
|
74
76
|
O
|
|
75
77
|
],
|
|
76
78
|
handlePrevMonth: () => {
|
|
77
|
-
e || I || !D || (
|
|
79
|
+
e || I || !D || (c("right"), u(!0), i(!1), S());
|
|
78
80
|
},
|
|
79
81
|
handleNextMonth: () => {
|
|
80
|
-
e || I || !E || (
|
|
82
|
+
e || I || !E || (c("left"), u(!0), i(!1), b());
|
|
81
83
|
},
|
|
82
84
|
getTransform: () => {
|
|
83
85
|
let t = x;
|
|
84
|
-
return e && o && (n === "left" ? t = x -
|
|
86
|
+
return e && o && (n === "left" ? t = x - R : n === "right" && (t = x + R)), `translateX(${t}px)`;
|
|
85
87
|
}
|
|
86
88
|
};
|
|
87
89
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as I } from "../../../../../../Input-
|
|
1
|
+
import { t as I } from "../../../../../../Input-wp-rsCmX.js";
|
|
2
2
|
import { t as r } from "../../../../../../utils-Cx-WzRZF.js";
|
|
3
3
|
import { Typography as p } from "../../../../../Typography/Typography.js";
|
|
4
4
|
import { TimePicker as g } from "../../../../../TimePicker/TimePicker.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as I } from "../../../../../../Input-
|
|
1
|
+
import { t as I } from "../../../../../../Input-wp-rsCmX.js";
|
|
2
2
|
import { t as r } from "../../../../../../utils-Cx-WzRZF.js";
|
|
3
3
|
import { Typography as n } from "../../../../../Typography/Typography.js";
|
|
4
4
|
import { TimePicker as g } from "../../../../../TimePicker/TimePicker.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t } from "../../utils-Cx-WzRZF.js";
|
|
2
2
|
import { t as h } from "../../chevron-left-DxGDBBKA.js";
|
|
3
3
|
import { t as f } from "../../chevron-right-CDwgDdp-.js";
|
|
4
|
-
import { t as p } from "../../DayPicker-
|
|
4
|
+
import { t as p } from "../../DayPicker-C22j0Y-u.js";
|
|
5
5
|
import { datePickerVariants as k } from "./DatePicker.variants.js";
|
|
6
6
|
import '../../style.css';/* empty css */
|
|
7
7
|
import { useState as g } from "react";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as g } from "../../x-
|
|
2
|
+
import { t as g } from "../../x-Ierxf0uI.js";
|
|
3
3
|
import { t as z } from "../../dist-DX0sBG3Q.js";
|
|
4
4
|
import { t as o } from "../../utils-Cx-WzRZF.js";
|
|
5
5
|
import { t as B } from "../../Combination-CnMM05mt.js";
|
|
6
|
-
import { t as
|
|
7
|
-
import { DrawerContext as
|
|
8
|
-
import { Header as
|
|
9
|
-
import { Body as
|
|
10
|
-
import { Footer as
|
|
11
|
-
import { buttonCloseVariants as
|
|
6
|
+
import { t as I } from "../../es2015-B_07N-UL.js";
|
|
7
|
+
import { DrawerContext as M } from "./contexts/Drawer.context.js";
|
|
8
|
+
import { Header as j } from "./components/Header/Header.js";
|
|
9
|
+
import { Body as k } from "./components/Body/Body.js";
|
|
10
|
+
import { Footer as A } from "./components/Footer/Footer.js";
|
|
11
|
+
import { buttonCloseVariants as K, drawerVariants as P, overlayVariants as R, resizeHandleVariants as T } from "./Drawer.variants.js";
|
|
12
12
|
import "./constants/index.js";
|
|
13
|
-
import { useDrawer as
|
|
14
|
-
import { useId as
|
|
15
|
-
import { createPortal as
|
|
13
|
+
import { useDrawer as _ } from "./hooks/useDrawer.js";
|
|
14
|
+
import { useId as E, useMemo as L } from "react";
|
|
15
|
+
import { createPortal as S } from "react-dom";
|
|
16
16
|
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
17
|
-
var d = ({ canResize: t = !1, children:
|
|
18
|
-
const n =
|
|
17
|
+
var d = ({ canResize: t = !1, children: c, className: u, classNames: r, container: f, defaultWidth: m = 500, isOpen: p, maxWidth: h, minWidth: w, position: a = "right", showCloseButton: y = !0, theme: v, onClose: i }) => {
|
|
18
|
+
const n = E(), { handleKeyDown: b, handleMouseDown: D, isAnimating: s, isVisible: x, translateClass: V, width: H } = _({
|
|
19
19
|
canResize: t,
|
|
20
20
|
defaultWidth: m,
|
|
21
21
|
isOpen: p,
|
|
@@ -23,28 +23,29 @@ var d = ({ canResize: t = !1, children: u, className: c, classNames: r, containe
|
|
|
23
23
|
minWidth: w,
|
|
24
24
|
position: a,
|
|
25
25
|
onClose: i
|
|
26
|
-
}),
|
|
26
|
+
}), C = L(() => ({
|
|
27
27
|
classNames: r,
|
|
28
28
|
headerId: n
|
|
29
29
|
}), [r, n]);
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
if (!x) return null;
|
|
31
|
+
const F = /* @__PURE__ */ e(M.Provider, {
|
|
32
|
+
value: C,
|
|
32
33
|
children: /* @__PURE__ */ e(B, { children: /* @__PURE__ */ l("div", {
|
|
33
34
|
className: o("fixed inset-0 z-40", r?.root),
|
|
34
35
|
"data-theme": v,
|
|
35
36
|
children: [/* @__PURE__ */ e("div", {
|
|
36
|
-
className: o(
|
|
37
|
+
className: o(R(), {
|
|
37
38
|
"opacity-50": s,
|
|
38
39
|
"opacity-0": !s
|
|
39
40
|
}, r?.overlay),
|
|
40
41
|
"aria-hidden": "true",
|
|
41
42
|
onClick: i,
|
|
42
43
|
role: "presentation"
|
|
43
|
-
}), /* @__PURE__ */ e(
|
|
44
|
+
}), /* @__PURE__ */ e(I, {
|
|
44
45
|
returnFocus: !0,
|
|
45
46
|
className: "contents",
|
|
46
47
|
children: /* @__PURE__ */ l("div", {
|
|
47
|
-
className: o(
|
|
48
|
+
className: o(P({ position: a }), V, r?.panel, u),
|
|
48
49
|
style: { width: t ? H : m },
|
|
49
50
|
role: "dialog",
|
|
50
51
|
"aria-modal": "true",
|
|
@@ -53,29 +54,30 @@ var d = ({ canResize: t = !1, children: u, className: c, classNames: r, containe
|
|
|
53
54
|
t && /* @__PURE__ */ e("button", {
|
|
54
55
|
type: "button",
|
|
55
56
|
"aria-label": "Resize drawer",
|
|
56
|
-
className: o(
|
|
57
|
+
className: o(T({ position: a }), r?.resizeHandle),
|
|
57
58
|
onMouseDown: D,
|
|
58
59
|
onKeyDown: b
|
|
59
60
|
}),
|
|
60
61
|
y && /* @__PURE__ */ l("button", {
|
|
61
|
-
className: o(
|
|
62
|
+
className: o(K(), r?.closeButton),
|
|
62
63
|
onClick: i,
|
|
63
64
|
type: "button",
|
|
64
65
|
children: [/* @__PURE__ */ e(g, { size: 20 }), /* @__PURE__ */ e(z, { children: "Dismiss drawer" })]
|
|
65
66
|
}),
|
|
66
67
|
/* @__PURE__ */ e("div", {
|
|
67
68
|
className: o("flex flex-1 flex-col h-full overflow-hidden", r?.content),
|
|
68
|
-
children:
|
|
69
|
+
children: c
|
|
69
70
|
})
|
|
70
71
|
]
|
|
71
72
|
})
|
|
72
73
|
})]
|
|
73
74
|
}) })
|
|
74
|
-
})
|
|
75
|
+
});
|
|
76
|
+
return S(F, f || document.body);
|
|
75
77
|
};
|
|
76
|
-
d.Header =
|
|
77
|
-
d.Body =
|
|
78
|
-
d.Footer =
|
|
78
|
+
d.Header = j;
|
|
79
|
+
d.Body = k;
|
|
80
|
+
d.Footer = A;
|
|
79
81
|
export {
|
|
80
82
|
d as Drawer
|
|
81
83
|
};
|
|
@@ -1,52 +1,67 @@
|
|
|
1
|
-
import { useFilterContext as
|
|
2
|
-
import { sendOpenFilterEvent as
|
|
3
|
-
import { useFilterDropdownSync as
|
|
4
|
-
import { useCallback as
|
|
5
|
-
var
|
|
6
|
-
const { closeOnApply:
|
|
7
|
-
|
|
8
|
-
}, [
|
|
9
|
-
|
|
1
|
+
import { useFilterContext as w } from "../../contexts/filter.hook.js";
|
|
2
|
+
import { sendOpenFilterEvent as y } from "../../events/index.js";
|
|
3
|
+
import { useFilterDropdownSync as I } from "../../hooks/useFilterDropdownSync.js";
|
|
4
|
+
import { useCallback as p, useId as M, useMemo as u, useState as R } from "react";
|
|
5
|
+
var E = ({ onApply: r, options: o = [] }) => {
|
|
6
|
+
const { closeOnApply: a } = w(), c = M(), [v, d] = R(!1), [n, l] = R([]), A = p(() => d(!1), []), m = p(() => {
|
|
7
|
+
l([]), r?.([]);
|
|
8
|
+
}, [r]);
|
|
9
|
+
I({
|
|
10
10
|
id: c,
|
|
11
|
-
onClose:
|
|
12
|
-
onReset:
|
|
11
|
+
onClose: A,
|
|
12
|
+
onReset: m
|
|
13
13
|
});
|
|
14
|
-
const
|
|
15
|
-
e && (
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const h = (e) => {
|
|
15
|
+
e && (y(c), l((t) => t.filter((i) => i.isApplied).map((i) => ({
|
|
16
|
+
...i,
|
|
17
|
+
isRemoved: !1
|
|
18
|
+
})))), d(e);
|
|
19
|
+
}, O = (e, t) => {
|
|
20
|
+
l(t ? (i) => i.some((s) => s.id === e.id) ? i.map((s) => s.id === e.id ? {
|
|
21
|
+
...s,
|
|
22
|
+
isRemoved: !1
|
|
23
|
+
} : s) : [...i, {
|
|
18
24
|
...e,
|
|
19
25
|
isApplied: !1
|
|
20
|
-
}] :
|
|
21
|
-
...
|
|
26
|
+
}] : (i) => i.map((s) => s.id === e.id ? {
|
|
27
|
+
...s,
|
|
22
28
|
isRemoved: !0
|
|
23
|
-
} :
|
|
29
|
+
} : s));
|
|
24
30
|
}, S = () => {
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
const e =
|
|
28
|
-
...
|
|
31
|
+
m(), a && d(!1);
|
|
32
|
+
}, C = () => {
|
|
33
|
+
const e = n.filter((t) => !t.isRemoved).map((t) => ({
|
|
34
|
+
...t,
|
|
29
35
|
isApplied: !0
|
|
30
36
|
}));
|
|
31
|
-
|
|
32
|
-
},
|
|
37
|
+
l(e), r?.(e.map(({ isApplied: t, isRemoved: i, ...s }) => s)), a && d(!1);
|
|
38
|
+
}, g = u(() => n.filter((e) => e.isApplied), [n]), x = u(() => o.length > 0 && o.every((e) => n.some((t) => t.id === e.id && !t.isRemoved)), [o, n]);
|
|
33
39
|
return {
|
|
34
|
-
isOpen:
|
|
35
|
-
isAllSelected:
|
|
36
|
-
selectedCount:
|
|
37
|
-
selectedOptions:
|
|
38
|
-
handleApplyOptions:
|
|
39
|
-
handleOpenChange:
|
|
40
|
+
isOpen: v,
|
|
41
|
+
isAllSelected: x,
|
|
42
|
+
selectedCount: g,
|
|
43
|
+
selectedOptions: n,
|
|
44
|
+
handleApplyOptions: C,
|
|
45
|
+
handleOpenChange: h,
|
|
40
46
|
handleResetOptions: S,
|
|
41
|
-
handleSelectAll: (e,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
handleSelectAll: (e, t) => {
|
|
48
|
+
l(t ? (i) => e.map((s) => {
|
|
49
|
+
const f = i.find((F) => F.id === s.id);
|
|
50
|
+
return f ? {
|
|
51
|
+
...f,
|
|
52
|
+
isRemoved: !1
|
|
53
|
+
} : {
|
|
54
|
+
...s,
|
|
55
|
+
isApplied: !1
|
|
56
|
+
};
|
|
57
|
+
}) : (i) => i.map((s) => ({
|
|
58
|
+
...s,
|
|
59
|
+
isRemoved: !0
|
|
45
60
|
})));
|
|
46
61
|
},
|
|
47
|
-
handleSelectOption:
|
|
62
|
+
handleSelectOption: O
|
|
48
63
|
};
|
|
49
64
|
};
|
|
50
65
|
export {
|
|
51
|
-
|
|
66
|
+
E as useBadgeMultiSelect
|
|
52
67
|
};
|