@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.
Files changed (151) hide show
  1. package/dist/{AlertDialogTrigger-BGo_acd5.js → AlertDialogTrigger-BOrb536P.js} +39 -39
  2. package/dist/{Breadcrumb-Cp3abB2w.js → Breadcrumb-DVBxqgW_.js} +2 -2
  3. package/dist/Checkbox-B20uoUKD.js +249 -0
  4. package/dist/{CommandInput-BLq69pOT.js → CommandInput-BWt6-vUK.js} +3 -3
  5. package/dist/{Counter-BV680M5r.js → Counter-DiQb-he2.js} +2 -2
  6. package/dist/{DayPicker-kweJz134.js → DayPicker-C22j0Y-u.js} +539 -518
  7. package/dist/{DropdownButton-DfNojmCW.js → DropdownButton-hCVYZ1LA.js} +5 -5
  8. package/dist/{FlagSelectorList-CkTR3j6O.js → FlagSelectorList-CnJjnsp6.js} +11 -8
  9. package/dist/{HamburgerTrigger-DRylBL2d.js → HamburgerTrigger-BT2yUUJ-.js} +2 -2
  10. package/dist/{ImageUpload-DiwymQcU.js → ImageUpload-DgCBCa5X.js} +1 -1
  11. package/dist/{Input-Cf44DzfE.js → Input-wp-rsCmX.js} +2 -2
  12. package/dist/{Modal-Dyn088X7.js → Modal-CkAf9UY7.js} +3 -3
  13. package/dist/{Switch-aPhL5rNG.js → Switch-CyJXptgc.js} +80 -77
  14. package/dist/{Toast-3NEz7LLa.js → Toast-DLJDExxw.js} +7 -6
  15. package/dist/{Wrapper-DP6Sxngx.js → Wrapper-B8Ja3k4j.js} +63 -63
  16. package/dist/{Wrapper-CVJSuYWx.js → Wrapper-CvDRHgN4.js} +3 -3
  17. package/dist/components/Alert/Alert.js +1 -1
  18. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  19. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  20. package/dist/components/AlertDialog/components/index.js +1 -1
  21. package/dist/components/Autocomplete/hooks/useAutocomplete.js +27 -25
  22. package/dist/components/Autocomplete/hooks/useNavigationList.js +2 -3
  23. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  24. package/dist/components/Breadcrumb/components/BackButton/BackButton.js +1 -1
  25. package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
  26. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  27. package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
  28. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
  29. package/dist/components/Checkbox/Checkbox.js +1 -1
  30. package/dist/components/Command/Command.js +1 -1
  31. package/dist/components/Command/components/Command.js +1 -1
  32. package/dist/components/Command/components/CommandEmpty.js +1 -1
  33. package/dist/components/Command/components/CommandGroup.js +1 -1
  34. package/dist/components/Command/components/CommandInput.js +1 -1
  35. package/dist/components/Command/components/CommandItem.js +1 -1
  36. package/dist/components/Command/components/CommandList.js +1 -1
  37. package/dist/components/Command/components/CommandSeparator.js +1 -1
  38. package/dist/components/Command/components/DialogContent.js +2 -2
  39. package/dist/components/Command/components/DialogOverlay.js +1 -1
  40. package/dist/components/Command/components/index.js +1 -1
  41. package/dist/components/Counter/Counter.js +1 -1
  42. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +2 -2
  43. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +2 -2
  44. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
  45. package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
  46. package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
  47. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
  48. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +30 -28
  49. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +23 -21
  50. package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
  51. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
  52. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
  53. package/dist/components/Datepicker/DatePicker.js +1 -1
  54. package/dist/components/Drawer/Drawer.js +27 -25
  55. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  56. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +51 -36
  57. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +40 -38
  58. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +1 -1
  59. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +1 -1
  60. package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +1 -1
  61. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +42 -40
  62. package/dist/components/Filter/utils/index.js +1 -1
  63. package/dist/components/ImageUpload/ImageUpload.js +1 -1
  64. package/dist/components/Input/Input.js +1 -1
  65. package/dist/components/LineChart/LineChart.js +1 -1
  66. package/dist/components/Modal/Modal.js +1 -1
  67. package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
  68. package/dist/components/Modal/components/index.js +1 -1
  69. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
  70. package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
  71. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
  72. package/dist/components/MultiSelectDropdown/components/index.js +1 -1
  73. package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +11 -11
  74. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +2 -2
  75. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
  76. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +2 -2
  77. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +3 -3
  78. package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
  79. package/dist/components/PhoneNumberInput/components/index.js +2 -2
  80. package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
  81. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
  82. package/dist/components/PhoneNumberInput/utils/index.js +1 -1
  83. package/dist/components/PieChart/PieChart.js +30 -27
  84. package/dist/components/Range/Range.js +1 -1
  85. package/dist/components/Select/Select.js +36 -33
  86. package/dist/components/Select/components/List/List.js +31 -31
  87. package/dist/components/Select/hooks/useNavigationList.js +2 -3
  88. package/dist/components/Select/hooks/useSelect.js +8 -8
  89. package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
  90. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +1 -1
  91. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +1 -1
  92. package/dist/components/Sidebar/components/index.js +1 -1
  93. package/dist/components/Slider/Slider.js +1 -1
  94. package/dist/components/Switch/Switch.js +1 -1
  95. package/dist/components/Switch/Switch.variants.js +15 -7
  96. package/dist/components/Table/components/Filter.js +1 -1
  97. package/dist/components/Tabs/Tabs.js +1 -1
  98. package/dist/components/Tabs/components/Content.js +1 -1
  99. package/dist/components/Tabs/components/List.js +1 -1
  100. package/dist/components/Tabs/components/Trigger.js +1 -1
  101. package/dist/components/TagSelect/TagSelect.js +1 -1
  102. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
  103. package/dist/components/TagSelect/components/index.js +1 -1
  104. package/dist/components/TagSelect/hooks/useTagSelect.js +11 -11
  105. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +16 -16
  106. package/dist/components/Toast/Toast.js +1 -1
  107. package/dist/components/Tooltip/Tooltip.js +1 -1
  108. package/dist/components/Typography/Typography.js +19 -16
  109. package/dist/components/VirtualizedTable/VirtualizedTable.js +1 -1
  110. package/dist/components/VirtualizedTable/components/Body/Body.js +1 -1
  111. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +1 -1
  112. package/dist/components/VirtualizedTable/components/Filter/Filter.js +3 -3
  113. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
  114. package/dist/components/VirtualizedTable/components/Header/Header.js +1 -1
  115. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +2 -2
  116. package/dist/components/VirtualizedTable/contexts/index.js +1 -1
  117. package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
  118. package/dist/components/index.js +10 -10
  119. package/dist/{components-Cf345jTv.js → components-MnxnhLqM.js} +1 -1
  120. package/dist/{constants-CxJJRVK3.js → constants-CSsr7_YV.js} +1 -1
  121. package/dist/{debounce-C5Ycjilj.js → debounce-BdyZeJQk.js} +2 -2
  122. package/dist/{dist-BaPW7qXd2.js → dist-B6ExqXM_2.js} +1 -1
  123. package/dist/{dist-BZNE2Tnx.js → dist-BbX4Nrk2.js} +1 -1
  124. package/dist/{dist-BdobXn93.js → dist-C87gsBDM.js} +1 -1
  125. package/dist/{dist-DDck_2lb.js → dist-CqNOgbfR.js} +117 -116
  126. package/dist/{dist-C3YVLapk.js → dist-DO3apbIh.js} +24 -24
  127. package/dist/{dist-CzKqHuqJ2.js → dist-DwxO2RoR2.js} +38 -38
  128. package/dist/{dist-DFCz63oC2.js → dist-Z0F27ATp2.js} +157 -158
  129. package/dist/{dist-AihTpWdF.js → dist-iUAHw-3y.js} +272 -272
  130. package/dist/{dist-tGUUcv8n.js → dist-oJzmvhAb.js} +114 -115
  131. package/dist/{dist-BlPTJNIm.js → dist-ut_BEHii.js} +1 -1
  132. package/dist/es2015-B_07N-UL.js +796 -0
  133. package/dist/index.js +10 -10
  134. package/dist/{isObject-BeFFiVJK.js → isObject-pLoSfdr0.js} +1 -1
  135. package/dist/lib/components/Checkbox/Checkbox.d.ts +1 -1
  136. package/dist/lib/components/Checkbox/Checkbox.types.d.ts +2 -1
  137. package/dist/lib/components/Switch/Switch.variants.d.ts +3 -1
  138. package/dist/{libphonenumber-hGupNnJu.js → libphonenumber-BMq3Thej.js} +356 -347
  139. package/dist/package.json +21 -21
  140. package/dist/{phone-number.provider-BxQCTxp8.js → phone-number.provider-Dkq_p1Gi.js} +2 -2
  141. package/dist/{prop-types-CfEYxTbR.js → prop-types-BCUW56rg.js} +1 -1
  142. package/dist/{react-CvUtBTMg.js → react-B6Nc0Fib.js} +835 -827
  143. package/dist/{rolldown-runtime-Ck3dxwZt.js → rolldown-runtime-Dw9YIBcH.js} +1 -1
  144. package/dist/styles.css +1 -1
  145. package/dist/{table.provider-B0BafHuU.js → table.provider-DfZ74xMZ.js} +95 -95
  146. package/dist/{useBreadcrumb-DYfZL_2p.js → useBreadcrumb-Ds_9BeFz.js} +7 -6
  147. package/dist/{utils-B-BTGYA5.js → utils-DVYdP0CJ.js} +2 -3
  148. package/dist/{x-BI9jmc7e.js → x-Ierxf0uI.js} +2 -2
  149. package/package.json +21 -21
  150. package/dist/Checkbox-B_ngk9Dj.js +0 -249
  151. 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-CvUtBTMg.js";
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-CxJJRVK3.js";
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-CvUtBTMg.js";
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,4 +1,4 @@
1
- import { s as e } from "../../../../../constants-CxJJRVK3.js";
1
+ import { s as e } from "../../../../../constants-CSsr7_YV.js";
2
2
  export {
3
3
  e as createDayPickerClassNames
4
4
  };
@@ -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-CxJJRVK3.js";
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-CxJJRVK3.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-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";
@@ -1,10 +1,10 @@
1
- import { r as w } from "../../../../../constants-CxJJRVK3.js";
2
- import { calculateCalendarHeight as j, getNextMonth as m, getPrevMonth as h, getWeeksInMonth as O } from "../utils/index.js";
3
- import { useEffect as g, useMemo as p, useRef as I, useState as i } from "react";
4
- var Q = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
5
- const [f, x] = i(u[0]), [s, S] = i(null), [r, b] = i(!1), [a, L] = i(!1), [W, C] = i(!0), T = I(null), N = I(!0), [o, E] = i(u[1]), [l, D] = i(null), [n, P] = i(!1), [c, H] = i(!1), [X, _] = i(!0), A = I(null), d = I(!0);
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 (F === "independent") {
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 q = t - e, R = Math.round(q / w);
16
- Math.abs(R) === 1 ? (S(R > 0 ? "left" : "right"), b(!0), L(!1)) : x(u[0]);
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
- F
24
+ I
25
25
  ]), g(() => {
26
- if (F === "independent") {
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 q = t - e, R = Math.round(q / w);
35
- Math.abs(R) === 1 ? (D(R > 0 ? "left" : "right"), P(!0), H(!1)) : E(u[1]);
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
- F
43
+ I
44
44
  ]), g(() => {
45
45
  r && !a && s && (T.current && T.current.offsetHeight, requestAnimationFrame(() => {
46
- L(!0);
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
- H(!0);
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), L(!1), requestAnimationFrame(() => {
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
- }, M);
70
+ }, F);
71
71
  return () => clearTimeout(e);
72
72
  }
73
73
  }, [
74
74
  r,
75
75
  a,
76
- M,
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), H(!1), requestAnimationFrame(() => {
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
- }, M);
88
+ }, F);
89
89
  return () => clearTimeout(e);
90
90
  }
91
91
  }, [
92
92
  n,
93
93
  c,
94
- M,
94
+ F,
95
95
  l
96
96
  ]);
97
- const $ = p(() => {
97
+ const X = p(() => {
98
98
  let e = f, t = o;
99
- return r && s === "left" ? e = m(f) : r && s === "right" && (e = h(f)), n && l === "left" ? t = m(o) : n && l === "right" && (t = h(o)), j(Math.max(O(e), O(t)));
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
- ]), k = () => {
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: W,
122
+ enableLeftTransition: w,
121
123
  leftAnimateTransform: a,
122
- getLeftTransform: k,
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: X,
130
+ enableRightTransition: O,
129
131
  rightAnimateTransform: c,
130
132
  getRightTransform: G,
131
- calendarHeight: $
133
+ calendarHeight: X
132
134
  };
133
135
  };
134
136
  export {
@@ -1,35 +1,37 @@
1
- import { r as w } from "../../../../../constants-CxJJRVK3.js";
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, u] = a(null), [e, c] = a(!1), [o, i] = a(!1), [p, F] = a(!0), [r, P] = a(l), f = q(null), R = q(!0), W = 291, C = g(g(r[0])), M = g(r[0]), h = r[0], m = r[1], d = T(r[1]), O = T(T(r[1])), v = $(() => {
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
- return e && n === "left" ? t = [m, d] : e && n === "right" ? t = [M, h] : t = [h, m], L(Math.max(...t.map(X)));
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
- ]), G = 6 * 259 + 160, x = -2 * 291;
17
+ ]), v = 6 * 259 + 160, x = -2 * 291;
16
18
  return A(() => {
17
19
  if (N !== "independent") {
18
- if (R.current) {
19
- R.current = !1;
20
+ if (P.current) {
21
+ P.current = !1;
20
22
  return;
21
23
  }
22
24
  if (!e) {
23
- const t = r[0].getTime(), s = l[0].getTime();
24
- if (t !== s) {
25
- const k = s - t, _ = Math.round(k / w);
26
- Math.abs(_) === 1 ? (u(_ > 0 ? "left" : "right"), c(!0), i(!1)) : P(l);
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
- r,
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
- F(!1), requestAnimationFrame(() => {
47
- f.current && f.current.offsetHeight, P((s) => n === "left" ? [s[1], T(s[1])] : [g(s[0]), s[0]]), c(!1), u(null), i(!1), requestAnimationFrame(() => {
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
- F(!0);
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: v,
67
- carouselTotalWidth: G,
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 || (u("right"), c(!0), i(!1), S());
79
+ e || I || !D || (c("right"), u(!0), i(!1), S());
78
80
  },
79
81
  handleNextMonth: () => {
80
- e || I || !E || (u("left"), c(!0), i(!1), b());
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 - W : n === "right" && (t = x + W)), `translateX(${t}px)`;
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 "../../../../../constants-CxJJRVK3.js";
1
+ import "../../../../../constants-CSsr7_YV.js";
2
2
  var E = (t) => {
3
3
  const e = t.getFullYear(), a = t.getMonth(), n = new Date(e, a, 1), r = new Date(e, a + 1, 0), o = n.getDay() + r.getDate();
4
4
  return Math.ceil(o / 7);
@@ -1,4 +1,4 @@
1
- import { t as I } from "../../../../../../Input-Cf44DzfE.js";
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-Cf44DzfE.js";
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-kweJz134.js";
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-BI9jmc7e.js";
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 C } from "../../es2015-DigR3dar.js";
7
- import { DrawerContext as I } from "./contexts/Drawer.context.js";
8
- import { Header as M } from "./components/Header/Header.js";
9
- import { Body as j } from "./components/Body/Body.js";
10
- import { Footer as k } from "./components/Footer/Footer.js";
11
- import { buttonCloseVariants as A, drawerVariants as K, overlayVariants as P, resizeHandleVariants as R } from "./Drawer.variants.js";
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 T } from "./hooks/useDrawer.js";
14
- import { useId as _, useMemo as E } from "react";
15
- import { createPortal as L } from "react-dom";
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: u, className: c, 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 = _(), { handleKeyDown: b, handleMouseDown: D, isAnimating: s, isVisible: x, translateClass: V, width: H } = T({
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
- }), F = E(() => ({
26
+ }), C = L(() => ({
27
27
  classNames: r,
28
28
  headerId: n
29
29
  }), [r, n]);
30
- return x ? L(/* @__PURE__ */ e(I.Provider, {
31
- value: F,
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(P(), {
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(C, {
44
+ }), /* @__PURE__ */ e(I, {
44
45
  returnFocus: !0,
45
46
  className: "contents",
46
47
  children: /* @__PURE__ */ l("div", {
47
- className: o(K({ position: a }), V, r?.panel, c),
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(R({ position: a }), r?.resizeHandle),
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(A(), r?.closeButton),
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: u
69
+ children: c
69
70
  })
70
71
  ]
71
72
  })
72
73
  })]
73
74
  }) })
74
- }), f || document.body) : null;
75
+ });
76
+ return S(F, f || document.body);
75
77
  };
76
- d.Header = M;
77
- d.Body = j;
78
- d.Footer = k;
78
+ d.Header = j;
79
+ d.Body = k;
80
+ d.Footer = A;
79
81
  export {
80
82
  d as Drawer
81
83
  };
@@ -1,4 +1,4 @@
1
- import { t } from "../../DropdownButton-DfNojmCW.js";
1
+ import { t } from "../../DropdownButton-hCVYZ1LA.js";
2
2
  export {
3
3
  t as DropdownButton
4
4
  };
@@ -1,52 +1,67 @@
1
- import { useFilterContext as F } from "../../contexts/filter.hook.js";
2
- import { sendOpenFilterEvent as w } from "../../events/index.js";
3
- import { useFilterDropdownSync as x } from "../../hooks/useFilterDropdownSync.js";
4
- import { useCallback as a, useId as y, useMemo as f, useState as m } from "react";
5
- var B = ({ onApply: o, options: d = [] }) => {
6
- const { closeOnApply: p } = F(), c = y(), [u, n] = m(!1), [t, i] = m([]), O = a(() => n(!1), []), r = a(() => {
7
- i([]), o?.([]);
8
- }, [o]);
9
- x({
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: O,
12
- onReset: r
11
+ onClose: A,
12
+ onReset: m
13
13
  });
14
- const A = (e) => {
15
- e && (w(c), i((s) => s.filter((l) => l.isApplied))), n(e);
16
- }, h = (e, s) => {
17
- i(s ? [...t, {
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
- }] : t.map((l) => l.id === e.id ? {
21
- ...l,
26
+ }] : (i) => i.map((s) => s.id === e.id ? {
27
+ ...s,
22
28
  isRemoved: !0
23
- } : l));
29
+ } : s));
24
30
  }, S = () => {
25
- r(), p && n(!1);
26
- }, v = () => {
27
- const e = t?.filter((s) => !s.isRemoved).map((s) => ({
28
- ...s,
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
- i(e), o?.(e.map(({ isApplied: s, isRemoved: l, ...g }) => g)), p && n(!1);
32
- }, R = f(() => t.filter((e) => e.isApplied), [t]), C = f(() => d.length > 0 && d.every((e) => t.some((s) => s.id === e.id && !s.isRemoved)), [d, t]);
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: u,
35
- isAllSelected: C,
36
- selectedCount: R,
37
- selectedOptions: t,
38
- handleApplyOptions: v,
39
- handleOpenChange: A,
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, s) => {
42
- s && i(e.map((l) => ({
43
- ...l,
44
- isApplied: !1
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: h
62
+ handleSelectOption: O
48
63
  };
49
64
  };
50
65
  export {
51
- B as useBadgeMultiSelect
66
+ E as useBadgeMultiSelect
52
67
  };