@konstructio/ui 0.1.2-alpha.103 → 0.1.2-alpha.105

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 (248) hide show
  1. package/README.md +15 -21
  2. package/dist/{AdditionalOptions-Cj29eeMF.js → AdditionalOptions-D0BAS2HG.js} +1 -1
  3. package/dist/{AlertDialogTrigger-CgcsW_ta.js → AlertDialogTrigger-BGo_acd5.js} +3 -3
  4. package/dist/{Checkbox-DzAx7n67.js → Checkbox-B_ngk9Dj.js} +56 -56
  5. package/dist/{Combination-cjXRJS03.js → Combination-CnMM05mt.js} +51 -45
  6. package/dist/{CommandInput-BnvRMfLI.js → CommandInput-BLq69pOT.js} +1 -1
  7. package/dist/Counter-BV680M5r.js +195 -0
  8. package/dist/DropdownButton-DfNojmCW.js +493 -0
  9. package/dist/{FlagSelectorList-BoYG-_It.js → FlagSelectorList-CkTR3j6O.js} +222 -218
  10. package/dist/{HamburgerTrigger-1vOTrm8-.js → HamburgerTrigger-DRylBL2d.js} +1 -1
  11. package/dist/{ImageUpload-DZTm4SBB.js → ImageUpload-DiwymQcU.js} +1 -1
  12. package/dist/{Input-CW0VwW2T.js → Input-Cf44DzfE.js} +18 -18
  13. package/dist/{Loading-fD0Xiyeq.js → Loading-DUh9PMJN.js} +3 -1
  14. package/dist/Modal-Dyn088X7.js +81 -0
  15. package/dist/Sidebar.css +1 -1
  16. package/dist/{Spinner-Lw9mZYhg.js → Spinner-CUwE2bLm.js} +1 -1
  17. package/dist/{Switch-WBRr8uOJ.js → Switch-aPhL5rNG.js} +4 -4
  18. package/dist/{Toast-ByH-l4XK.js → Toast-3NEz7LLa.js} +149 -148
  19. package/dist/Wrapper-CVJSuYWx.js +114 -0
  20. package/dist/{Wrapper-XeeD3av7.js → Wrapper-DP6Sxngx.js} +185 -180
  21. package/dist/Wrapper-R8fik3ah.js +182 -0
  22. package/dist/components/Alert/Alert.js +21 -21
  23. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  24. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  25. package/dist/components/AlertDialog/components/index.js +1 -1
  26. package/dist/components/AlertDialog/hooks/useAlertDialog.js +14 -10
  27. package/dist/components/Autocomplete/components/List/List.js +22 -26
  28. package/dist/components/Autocomplete/components/List/List.variants.js +7 -19
  29. package/dist/components/Autocomplete/hooks/useAutocomplete.js +39 -38
  30. package/dist/components/Autocomplete/hooks/useNavigationList.js +2 -1
  31. package/dist/components/Badge/Badge.js +37 -36
  32. package/dist/components/Button/Button.js +1 -1
  33. package/dist/components/Checkbox/Checkbox.js +1 -1
  34. package/dist/components/Command/Command.js +2 -2
  35. package/dist/components/Command/components/Command.js +6 -6
  36. package/dist/components/Command/components/CommandEmpty.js +1 -1
  37. package/dist/components/Command/components/CommandGroup.js +1 -1
  38. package/dist/components/Command/components/CommandInput.js +1 -1
  39. package/dist/components/Command/components/CommandItem.js +1 -1
  40. package/dist/components/Command/components/CommandList.js +2 -2
  41. package/dist/components/Command/components/CommandSeparator.js +1 -1
  42. package/dist/components/Command/components/DialogContent.js +2 -2
  43. package/dist/components/Command/components/DialogOverlay.js +1 -1
  44. package/dist/components/Command/components/index.js +1 -1
  45. package/dist/components/Command/contexts/Command.provider.js +16 -12
  46. package/dist/components/Counter/Counter.js +1 -1
  47. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
  48. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +57 -58
  49. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +42 -43
  50. package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
  51. package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
  52. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
  53. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +42 -50
  54. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +61 -79
  55. package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
  56. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
  57. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
  58. package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +89 -122
  59. package/dist/components/Datepicker/DatePicker.js +13 -13
  60. package/dist/components/Drawer/Drawer.js +54 -49
  61. package/dist/components/Drawer/hooks/useDrawer.js +39 -44
  62. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  63. package/dist/components/Filter/Filter.js +23 -22
  64. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +42 -56
  65. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  66. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +30 -43
  67. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +36 -49
  68. package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +1 -1
  69. package/dist/components/Filter/components/ResetButton/ResetButton.js +21 -18
  70. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +1 -1
  71. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +31 -45
  72. package/dist/components/Filter/contexts/filter.provider.js +15 -10
  73. package/dist/components/Filter/events/index.js +26 -5
  74. package/dist/components/Filter/hooks/index.js +4 -0
  75. package/dist/components/Filter/hooks/useFilterDropdownSync.js +26 -0
  76. package/dist/components/ImageUpload/ImageUpload.js +1 -1
  77. package/dist/components/Input/Input.js +1 -1
  78. package/dist/components/Loading/Loading.js +1 -1
  79. package/dist/components/Modal/Modal.js +1 -1
  80. package/dist/components/Modal/components/Body/Body.js +1 -1
  81. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  82. package/dist/components/Modal/components/Header/Header.js +1 -1
  83. package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
  84. package/dist/components/Modal/components/index.js +1 -1
  85. package/dist/components/Modal/contexts/Modal.provider.js +26 -19
  86. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
  87. package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
  88. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
  89. package/dist/components/MultiSelectDropdown/components/index.js +1 -1
  90. package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +14 -13
  91. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
  92. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +6 -4
  93. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
  94. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +16 -16
  95. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
  96. package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
  97. package/dist/components/PhoneNumberInput/components/index.js +2 -2
  98. package/dist/components/PieChart/PieChart.js +33 -32
  99. package/dist/components/ProgressBar/ProgressBar.js +26 -20
  100. package/dist/components/Radio/Radio.js +28 -30
  101. package/dist/components/RadioCardGroup/RadioCardGroup.js +18 -18
  102. package/dist/components/RadioGroup/RadioGroup.js +24 -24
  103. package/dist/components/Range/Range.js +15 -13
  104. package/dist/components/Select/Select.js +2 -2
  105. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
  106. package/dist/components/Select/components/List/List.js +2 -2
  107. package/dist/components/Select/components/ListItem/ListItem.js +30 -30
  108. package/dist/components/Select/components/Wrapper.js +1 -1
  109. package/dist/components/Select/components/index.js +2 -2
  110. package/dist/components/Select/hooks/useSelect.js +28 -39
  111. package/dist/components/Sidebar/Sidebar.js +21 -18
  112. package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +30 -0
  113. package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.js +20 -0
  114. package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
  115. package/dist/components/Sidebar/components/Logo/Logo.js +14 -10
  116. package/dist/components/Sidebar/components/Logo/Logo.variants.js +14 -4
  117. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +41 -37
  118. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +4 -5
  119. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +75 -68
  120. package/dist/components/Sidebar/components/index.js +17 -15
  121. package/dist/components/Sidebar/contexts/SidebarContext.js +8 -5
  122. package/dist/components/Slider/Slider.js +17 -15
  123. package/dist/components/Spinner/Spinner.js +1 -1
  124. package/dist/components/Stepper/Stepper.variants.js +6 -6
  125. package/dist/components/Stepper/hooks/useStepItemLogic.js +12 -17
  126. package/dist/components/Switch/Switch.js +1 -1
  127. package/dist/components/Table/components/Filter.js +1 -1
  128. package/dist/components/Tabs/Tabs.js +1 -1
  129. package/dist/components/Tabs/Tabs.variants.js +1 -1
  130. package/dist/components/Tabs/components/Content.js +1 -1
  131. package/dist/components/Tabs/components/List.js +1 -1
  132. package/dist/components/Tabs/components/Trigger.js +1 -1
  133. package/dist/components/Tag/Tag.js +1 -1
  134. package/dist/components/Tag/Tag.variants.js +17 -17
  135. package/dist/components/TagSelect/TagSelect.js +1 -1
  136. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
  137. package/dist/components/TagSelect/components/index.js +1 -1
  138. package/dist/components/TagSelect/hooks/useTagSelect.js +12 -11
  139. package/dist/components/TimePicker/components/HoursList/HoursList.js +34 -38
  140. package/dist/components/TimePicker/components/MeridianList/MeridianList.js +25 -29
  141. package/dist/components/TimePicker/components/MinutesList/MinutesList.js +33 -33
  142. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +91 -99
  143. package/dist/components/TimePicker/components/WrapperList/WrapperList.js +29 -30
  144. package/dist/components/TimePicker/contexts/time-picker.provider.js +10 -10
  145. package/dist/components/Toast/Toast.js +1 -1
  146. package/dist/components/Toast/Toast.variants.js +1 -1
  147. package/dist/components/Tooltip/Tooltip.js +1 -1
  148. package/dist/components/VirtualizedTable/VirtualizedTable.js +32 -29
  149. package/dist/components/VirtualizedTable/components/Actions/Actions.js +0 -2
  150. package/dist/components/VirtualizedTable/components/Body/Body.js +5 -5
  151. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +1 -1
  152. package/dist/components/VirtualizedTable/components/Filter/Filter.js +55 -53
  153. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
  154. package/dist/components/VirtualizedTable/components/Header/Header.js +1 -1
  155. package/dist/components/VirtualizedTable/contexts/index.js +1 -1
  156. package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
  157. package/dist/components/VirtualizedTable/events/filters/filters.js +7 -0
  158. package/dist/components/VirtualizedTable/events/index.js +10 -25
  159. package/dist/components/VirtualizedTable/events/refresh/refresh.js +7 -0
  160. package/dist/components/VirtualizedTable/events/row/row.js +22 -0
  161. package/dist/components/VirtualizedTable/utils/get-table-id.js +4 -0
  162. package/dist/components/VirtualizedTable/utils/index.js +4 -2
  163. package/dist/components/index.js +95 -89
  164. package/dist/{components-BIHlj4yH.js → components-Cf345jTv.js} +45 -41
  165. package/dist/constants-CxJJRVK3.js +31 -0
  166. package/dist/{dist-DISvWx7U.js → dist-BUocnzkM.js} +1 -1
  167. package/dist/{dist-Dse3gSmZ.js → dist-BZNE2Tnx.js} +4 -4
  168. package/dist/{dist-2bGlmy8N2.js → dist-BaPW7qXd2.js} +27 -26
  169. package/dist/dist-BdobXn93.js +192 -0
  170. package/dist/dist-BlPTJNIm.js +118 -0
  171. package/dist/{dist-BiJrNvNo.js → dist-C3YVLapk.js} +29 -28
  172. package/dist/dist-C4j75TwZ.js +20 -0
  173. package/dist/dist-CCdbu9GU.js +46 -0
  174. package/dist/dist-CzKqHuqJ2.js +427 -0
  175. package/dist/dist-D-yS0HN8.js +228 -0
  176. package/dist/dist-D5XYRjmR.js +15 -0
  177. package/dist/dist-DDck_2lb.js +451 -0
  178. package/dist/{dist-C2aTw0m62.js → dist-DFCz63oC2.js} +5 -5
  179. package/dist/dist-DGOjiAnB2.js +14 -0
  180. package/dist/dist-DKryKPmP.js +193 -0
  181. package/dist/{dist-CTvBzxW8.js → dist-DX0sBG3Q.js} +1 -1
  182. package/dist/dist-DYIabsrY.js +17 -0
  183. package/dist/dist-pWlMx4Fi2.js +36 -0
  184. package/dist/{dist-CVDFmWf2.js → dist-tGUUcv8n.js} +17 -16
  185. package/dist/dist-xCbHbMLA.js +116 -0
  186. package/dist/{es2015-BWf6xQHm.js → es2015-CoHq2g4y.js} +95 -86
  187. package/dist/es2015-DigR3dar.js +795 -0
  188. package/dist/events.types-BG1Uh8i6.js +6 -0
  189. package/dist/hooks/index.js +6 -4
  190. package/dist/hooks/useClickOutside.js +14 -0
  191. package/dist/index.js +146 -138
  192. package/dist/lib/components/Autocomplete/components/List/List.variants.d.ts +0 -1
  193. package/dist/lib/components/DropdownButton/DropdownButton.d.ts +5 -6
  194. package/dist/lib/components/DropdownButton/DropdownButton.types.d.ts +2 -0
  195. package/dist/lib/components/Filter/Filter.types.d.ts +2 -0
  196. package/dist/lib/components/Filter/contexts/filter.context.d.ts +1 -0
  197. package/dist/lib/components/Filter/events/index.d.ts +10 -2
  198. package/dist/lib/components/Filter/hooks/index.d.ts +1 -0
  199. package/dist/lib/components/Filter/hooks/useFilterDropdownSync.d.ts +2 -0
  200. package/dist/lib/components/Filter/hooks/useFilterDropdownSync.types.d.ts +5 -0
  201. package/dist/lib/components/PieChart/PieChart.types.d.ts +4 -4
  202. package/dist/lib/components/ProgressBar/ProgressBar.types.d.ts +2 -0
  203. package/dist/lib/components/Select/hooks/useSelect.d.ts +2 -3
  204. package/dist/lib/components/Sidebar/Sidebar.d.ts +2 -2
  205. package/dist/lib/components/Sidebar/Sidebar.types.d.ts +6 -5
  206. package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.d.ts +4 -0
  207. package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.types.d.ts +4 -0
  208. package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.d.ts +1 -0
  209. package/dist/lib/components/Sidebar/components/Logo/Logo.types.d.ts +8 -0
  210. package/dist/lib/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -1
  211. package/dist/lib/components/Sidebar/components/index.d.ts +2 -0
  212. package/dist/lib/components/Sidebar/contexts/SidebarContext.d.ts +12 -0
  213. package/dist/lib/components/VirtualizedTable/VirtualizedTable.d.ts +1 -0
  214. package/dist/lib/components/VirtualizedTable/events/events.types.d.ts +11 -0
  215. package/dist/lib/components/VirtualizedTable/events/filters/filters.d.ts +1 -0
  216. package/dist/lib/components/VirtualizedTable/events/index.d.ts +4 -14
  217. package/dist/lib/components/VirtualizedTable/events/refresh/refresh.d.ts +2 -0
  218. package/dist/lib/components/VirtualizedTable/events/refresh/refresh.types.d.ts +3 -0
  219. package/dist/lib/components/VirtualizedTable/events/row/row.d.ts +3 -0
  220. package/dist/lib/components/VirtualizedTable/utils/get-table-id.d.ts +1 -0
  221. package/dist/lib/components/VirtualizedTable/utils/index.d.ts +1 -0
  222. package/dist/lib/components/index.d.ts +2 -2
  223. package/dist/lib/hooks/index.d.ts +1 -0
  224. package/dist/lib/hooks/useClickOutside.d.ts +2 -0
  225. package/dist/package.json +24 -24
  226. package/dist/styles.css +1 -1
  227. package/dist/{table.provider-2sAkE7z_.js → table.provider-B0BafHuU.js} +395 -381
  228. package/dist/ui/civo-theme.css +4 -0
  229. package/dist/ui/kubefirst-theme.css +4 -0
  230. package/package.json +24 -24
  231. package/dist/Counter-CY0xGnVM.js +0 -208
  232. package/dist/DropdownButton-DnlwdPmb.js +0 -92
  233. package/dist/Modal-Bfzggwlr.js +0 -76
  234. package/dist/Wrapper-ClJ_Mham.js +0 -110
  235. package/dist/Wrapper-DNEn4fef.js +0 -161
  236. package/dist/constants-DXrF9vV4.js +0 -31
  237. package/dist/dist-B-Aoze_D.js +0 -10
  238. package/dist/dist-BuFiu480.js +0 -13
  239. package/dist/dist-C2s4VX-42.js +0 -31
  240. package/dist/dist-CT6d9xe7.js +0 -441
  241. package/dist/dist-CVy-ulDZ.js +0 -42
  242. package/dist/dist-D4FePjTS.js +0 -194
  243. package/dist/dist-Db6UeFo4.js +0 -291
  244. package/dist/dist-DqKFpce5.js +0 -98
  245. package/dist/dist-j7FOUrFU.js +0 -206
  246. package/dist/dist-l-aDnQZC.js +0 -62
  247. package/dist/dist-ppXKUlVt.js +0 -10
  248. /package/dist/{x-a_LpoXzG.js → x-a_LpoXzG2.js} +0 -0
@@ -1,8 +1,8 @@
1
- import { r as k } from "../../../../../constants-DXrF9vV4.js";
2
- import { calculateCalendarHeight as p, getNextMonth as m, getPrevMonth as h, getWeeksInMonth as w } from "../utils/index.js";
3
- import { useCallback as O, useEffect as g, useMemo as z, useRef as I, useState as s } from "react";
4
- var U = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
5
- const [o, b] = s(u[0]), [i, x] = s(null), [r, C] = s(!1), [a, L] = s(!1), [W, S] = s(!0), T = I(null), N = I(!0), [l, E] = s(u[1]), [f, D] = s(null), [n, P] = s(!1), [c, H] = s(!1), [X, _] = s(!0), A = I(null), d = I(!0);
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);
6
6
  g(() => {
7
7
  if (F === "independent") {
8
8
  if (N.current) {
@@ -10,16 +10,16 @@ var U = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
10
10
  return;
11
11
  }
12
12
  if (!r) {
13
- const e = o.getTime(), t = u[0].getTime();
13
+ const e = f.getTime(), t = u[0].getTime();
14
14
  if (e !== t) {
15
- const q = t - e, R = Math.round(q / k);
16
- Math.abs(R) === 1 ? (x(R > 0 ? "left" : "right"), C(!0), L(!1)) : b(u[0]);
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]);
17
17
  }
18
18
  }
19
19
  }
20
20
  }, [
21
21
  u,
22
- o,
22
+ f,
23
23
  r,
24
24
  F
25
25
  ]), g(() => {
@@ -29,41 +29,41 @@ var U = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
29
29
  return;
30
30
  }
31
31
  if (!n) {
32
- const e = l.getTime(), t = u[1].getTime();
32
+ const e = o.getTime(), t = u[1].getTime();
33
33
  if (e !== t) {
34
- const q = t - e, R = Math.round(q / k);
34
+ const q = t - e, R = Math.round(q / w);
35
35
  Math.abs(R) === 1 ? (D(R > 0 ? "left" : "right"), P(!0), H(!1)) : E(u[1]);
36
36
  }
37
37
  }
38
38
  }
39
39
  }, [
40
40
  u,
41
- l,
41
+ o,
42
42
  n,
43
43
  F
44
44
  ]), g(() => {
45
- r && !a && i && (T.current && T.current.offsetHeight, requestAnimationFrame(() => {
45
+ r && !a && s && (T.current && T.current.offsetHeight, requestAnimationFrame(() => {
46
46
  L(!0);
47
47
  }));
48
48
  }, [
49
49
  r,
50
50
  a,
51
- i
51
+ s
52
52
  ]), g(() => {
53
- n && !c && f && (A.current && A.current.offsetHeight, requestAnimationFrame(() => {
53
+ n && !c && l && (A.current && A.current.offsetHeight, requestAnimationFrame(() => {
54
54
  H(!0);
55
55
  }));
56
56
  }, [
57
57
  n,
58
58
  c,
59
- f
59
+ l
60
60
  ]), g(() => {
61
61
  if (r && a) {
62
62
  const e = setTimeout(() => {
63
- S(!1), requestAnimationFrame(() => {
64
- T.current && T.current.offsetHeight, b((t) => i === "left" ? m(t) : h(t)), C(!1), x(null), L(!1), requestAnimationFrame(() => {
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(() => {
65
65
  requestAnimationFrame(() => {
66
- S(!0);
66
+ C(!0);
67
67
  });
68
68
  });
69
69
  });
@@ -74,12 +74,12 @@ var U = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
74
74
  r,
75
75
  a,
76
76
  M,
77
- i
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) => f === "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), H(!1), requestAnimationFrame(() => {
83
83
  requestAnimationFrame(() => {
84
84
  _(!0);
85
85
  });
@@ -92,53 +92,45 @@ var U = ({ displayedMonths: u, animationDuration: M, navigationMode: F }) => {
92
92
  n,
93
93
  c,
94
94
  M,
95
- f
95
+ l
96
96
  ]);
97
- const $ = z(() => {
98
- let e = o, t = l;
99
- return r && i === "left" ? e = m(o) : r && i === "right" && (e = h(o)), n && f === "left" ? t = m(l) : n && f === "right" && (t = h(l)), p(Math.max(w(e), w(t)));
97
+ const $ = p(() => {
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)));
100
100
  }, [
101
+ f,
101
102
  o,
102
- l,
103
103
  r,
104
104
  n,
105
- i,
106
- f
107
- ]), G = O(() => {
105
+ s,
106
+ l
107
+ ]), k = () => {
108
108
  let e = -259;
109
- return r && a && (i === "left" ? e = -2 * 259 : i === "right" && (e = 0)), `translateX(${e}px)`;
110
- }, [
111
- r,
112
- a,
113
- i
114
- ]), j = O(() => {
109
+ return r && a && (s === "left" ? e = -2 * 259 : s === "right" && (e = 0)), `translateX(${e}px)`;
110
+ }, G = () => {
115
111
  let e = -259;
116
- return n && c && (f === "left" ? e = -2 * 259 : f === "right" && (e = 0)), `translateX(${e}px)`;
117
- }, [
118
- n,
119
- c,
120
- f
121
- ]);
112
+ return n && c && (l === "left" ? e = -2 * 259 : l === "right" && (e = 0)), `translateX(${e}px)`;
113
+ };
122
114
  return {
123
- leftInternalMonth: o,
124
- leftPrevMonth: h(o),
125
- leftNextMonth: m(o),
115
+ leftInternalMonth: f,
116
+ leftPrevMonth: h(f),
117
+ leftNextMonth: m(f),
126
118
  leftCarouselRef: T,
127
119
  isLeftAnimating: r,
128
120
  enableLeftTransition: W,
129
121
  leftAnimateTransform: a,
130
- getLeftTransform: G,
131
- rightInternalMonth: l,
132
- rightPrevMonth: h(l),
133
- rightNextMonth: m(l),
122
+ getLeftTransform: k,
123
+ rightInternalMonth: o,
124
+ rightPrevMonth: h(o),
125
+ rightNextMonth: m(o),
134
126
  rightCarouselRef: A,
135
127
  isRightAnimating: n,
136
128
  enableRightTransition: X,
137
129
  rightAnimateTransform: c,
138
- getRightTransform: j,
130
+ getRightTransform: G,
139
131
  calendarHeight: $
140
132
  };
141
133
  };
142
134
  export {
143
- U as useIndependentCarousel
135
+ Q as useIndependentCarousel
144
136
  };
@@ -1,108 +1,90 @@
1
- import { r as z } from "../../../../../constants-DXrF9vV4.js";
2
- import { calculateCalendarHeight as B, getNextMonth as g, getPrevMonth as A, getWeeksInMonth as J } from "../utils/index.js";
3
- import { useCallback as F, useEffect as R, useMemo as K, useRef as b, useState as l } from "react";
4
- var y = ({ displayedMonths: u, animationDuration: W, disabled: c, canNavigatePrev: _, canNavigateNext: q, navigationMode: C, navigatePrevMonth: D, navigateNextMonth: E }) => {
5
- const [n, a] = l(null), [t, m] = l(!1), [s, i] = l(!1), [k, S] = l(!0), [r, d] = l(u), f = b(null), p = b(!0), H = 291, G = A(A(r[0])), I = A(r[0]), h = r[0], T = r[1], x = g(r[1]), P = g(g(r[1])), w = K(() => {
6
- let e;
7
- return t && n === "left" ? e = [T, x] : t && n === "right" ? e = [I, h] : e = [h, T], B(Math.max(...e.map(J)));
1
+ import { r as w } from "../../../../../constants-CxJJRVK3.js";
2
+ import { calculateCalendarHeight as L, getNextMonth as T, getPrevMonth as g, getWeeksInMonth as X } from "../utils/index.js";
3
+ import { useEffect as A, useMemo as $, useRef as q, useState as a } from "react";
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 = $(() => {
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)));
8
8
  }, [
9
- t,
9
+ e,
10
10
  n,
11
11
  h,
12
- T,
13
- x,
14
- I
15
- ]), L = 6 * 259 + 160, M = -2 * 291;
16
- R(() => {
17
- if (C !== "independent") {
18
- if (p.current) {
19
- p.current = !1;
12
+ m,
13
+ d,
14
+ M
15
+ ]), G = 6 * 259 + 160, x = -2 * 291;
16
+ return A(() => {
17
+ if (N !== "independent") {
18
+ if (R.current) {
19
+ R.current = !1;
20
20
  return;
21
21
  }
22
- if (!t) {
23
- const e = r[0].getTime(), o = u[0].getTime();
24
- if (e !== o) {
25
- const j = o - e, O = Math.round(j / z);
26
- Math.abs(O) === 1 ? (a(O > 0 ? "left" : "right"), m(!0), i(!1)) : d(u);
22
+ 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);
27
27
  }
28
28
  }
29
29
  }
30
30
  }, [
31
- u,
31
+ l,
32
32
  r,
33
- t,
34
- C
35
- ]), R(() => {
36
- t && !s && n && (f.current && f.current.offsetHeight, requestAnimationFrame(() => {
33
+ e,
34
+ N
35
+ ]), A(() => {
36
+ e && !o && n && (f.current && f.current.offsetHeight, requestAnimationFrame(() => {
37
37
  i(!0);
38
38
  }));
39
39
  }, [
40
- t,
41
- s,
40
+ e,
41
+ o,
42
42
  n
43
- ]), R(() => {
44
- if (t && s) {
45
- const e = setTimeout(() => {
46
- S(!1), requestAnimationFrame(() => {
47
- f.current && f.current.offsetHeight, d((o) => n === "left" ? [o[1], g(o[1])] : [A(o[0]), o[0]]), m(!1), a(null), i(!1), requestAnimationFrame(() => {
43
+ ]), A(() => {
44
+ if (e && o) {
45
+ 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
48
  requestAnimationFrame(() => {
49
- S(!0);
49
+ F(!0);
50
50
  });
51
51
  });
52
52
  });
53
- }, W);
54
- return () => clearTimeout(e);
53
+ }, H);
54
+ return () => clearTimeout(t);
55
55
  }
56
56
  }, [
57
- t,
58
- s,
59
- W,
57
+ e,
58
+ o,
59
+ H,
60
60
  n
61
- ]);
62
- const N = F(() => {
63
- t || c || !_ || (a("right"), m(!0), i(!1), D());
64
- }, [
65
- t,
66
- c,
67
- _,
68
- D
69
- ]), X = F(() => {
70
- t || c || !q || (a("left"), m(!0), i(!1), E());
71
- }, [
72
- t,
73
- c,
74
- q,
75
- E
76
- ]), $ = F(() => {
77
- let e = M;
78
- return t && s && (n === "left" ? e = M - H : n === "right" && (e = M + H)), `translateX(${e}px)`;
79
- }, [
80
- M,
81
- t,
82
- s,
83
- n,
84
- H
85
- ]);
86
- return {
61
+ ]), {
87
62
  carouselRef: f,
88
- isAnimating: t,
89
- enableTransition: k,
90
- animateTransform: s,
91
- calendarHeight: w,
92
- carouselTotalWidth: L,
63
+ isAnimating: e,
64
+ enableTransition: p,
65
+ animateTransform: o,
66
+ calendarHeight: v,
67
+ carouselTotalWidth: G,
93
68
  monthsToRender: [
94
- G,
95
- I,
69
+ C,
70
+ M,
96
71
  h,
97
- T,
98
- x,
99
- P
72
+ m,
73
+ d,
74
+ O
100
75
  ],
101
- handlePrevMonth: N,
102
- handleNextMonth: X,
103
- getTransform: $
76
+ handlePrevMonth: () => {
77
+ e || I || !D || (u("right"), c(!0), i(!1), S());
78
+ },
79
+ handleNextMonth: () => {
80
+ e || I || !E || (u("left"), c(!0), i(!1), b());
81
+ },
82
+ getTransform: () => {
83
+ let t = x;
84
+ return e && o && (n === "left" ? t = x - W : n === "right" && (t = x + W)), `translateX(${t}px)`;
85
+ }
104
86
  };
105
87
  };
106
88
  export {
107
- y as useTogetherCarousel
89
+ Y as useTogetherCarousel
108
90
  };
@@ -1,4 +1,4 @@
1
- import "../../../../../constants-DXrF9vV4.js";
1
+ import "../../../../../constants-CxJJRVK3.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-CW0VwW2T.js";
1
+ import { t as I } from "../../../../../../Input-Cf44DzfE.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-CW0VwW2T.js";
1
+ import { t as I } from "../../../../../../Input-Cf44DzfE.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,179 +1,146 @@
1
- import { useDateRangePicker as $ } from "../../../contexts/date-range-picker.hook.js";
2
- import { isDateSelectable as C } from "../../../utils/disabled-dates.js";
3
- import { autoFormatDateInput as B, combineDateAndTime as j, formatDateToDisplayString as T, formatDateToString as P, parseDateString as i, parseDisplayDateString as g } from "../../../utils/validation.js";
4
- import { useCallback as f, useEffect as q, useMemo as k, useRef as z, useState as R } from "react";
5
- var et = ({ errorInvalidDate: E, errorDateNotAvailable: V, errorStartAfterEnd: F, errorEndBeforeStart: b }) => {
6
- const { range: t, time: u, timeFormat: G, showTime: J, name: K, disabled: L, blockedDays: w, blockedMonths: x, minDate: H, maxDate: M, setRange: n, setTime: y } = $(), c = k(() => ({
7
- blockedDays: w,
8
- blockedMonths: x,
9
- minDate: H,
10
- maxDate: M
11
- }), [
12
- w,
13
- x,
14
- H,
15
- M
16
- ]), v = z(!1), h = z(!1), [o, D] = R(() => T(t.from)), [s, p] = R(() => T(t.to)), [O, m] = R(), [Q, l] = R();
17
- q(() => {
18
- v.current || D(T(t.from));
19
- }, [t.from]), q(() => {
20
- h.current || p(T(t.to));
1
+ import { useDateRangePicker as Z } from "../../../contexts/date-range-picker.hook.js";
2
+ import { isDateSelectable as E } from "../../../utils/disabled-dates.js";
3
+ import { autoFormatDateInput as P, combineDateAndTime as R, formatDateToDisplayString as D, formatDateToString as V, parseDateString as n, parseDisplayDateString as p } from "../../../utils/validation.js";
4
+ import { useCallback as k, useEffect as F, useMemo as w, useRef as x, useState as b } from "react";
5
+ var et = ({ errorInvalidDate: y, errorDateNotAvailable: C, errorStartAfterEnd: B, errorEndBeforeStart: H }) => {
6
+ const { range: t, time: o, timeFormat: M, showTime: I, name: j, disabled: q, blockedDays: z, blockedMonths: A, minDate: G, maxDate: J, setRange: i, setTime: h } = Z(), S = {
7
+ blockedDays: z,
8
+ blockedMonths: A,
9
+ minDate: G,
10
+ maxDate: J
11
+ }, v = x(!1), T = x(!1), [d, m] = b(() => D(t.from)), [u, l] = b(() => D(t.to)), [K, c] = b(), [L, f] = b();
12
+ F(() => {
13
+ v.current || m(D(t.from));
14
+ }, [t.from]), F(() => {
15
+ T.current || l(D(t.to));
21
16
  }, [t.to]);
22
- const U = f(() => {
23
- if (v.current = !0, m(void 0), t.from) D(P(t.from));
17
+ const O = () => {
18
+ if (v.current = !0, c(void 0), t.from) m(V(t.from));
24
19
  else {
25
- const e = i(o) || g(o);
26
- e && D(P(e));
20
+ const e = n(d) || p(d);
21
+ e && m(V(e));
27
22
  }
28
- }, [t.from, o]), W = f((e) => {
29
- const d = e.target.value, r = B(d, o);
30
- D(r), m(void 0);
31
- const a = i(r);
32
- if (a && C(a, c)) {
33
- const S = t.to || i(s) || g(s);
34
- if (S && a > S) return;
35
- n({
23
+ }, Q = (e) => {
24
+ const s = e.target.value, r = P(s, d);
25
+ m(r), c(void 0);
26
+ const a = n(r);
27
+ if (a && E(a, S)) {
28
+ const g = t.to || n(u) || p(u);
29
+ if (g && a > g) return;
30
+ i({
36
31
  ...t,
37
32
  from: a
38
33
  });
39
34
  }
40
- }, [
41
- o,
42
- s,
43
- t,
44
- n,
45
- c
46
- ]), X = f((e) => {
47
- const d = e.currentTarget.value.trim();
48
- if (d === "") {
49
- v.current = !1, m(void 0), D(""), n({
35
+ }, U = (e) => {
36
+ const s = e.currentTarget.value.trim();
37
+ if (s === "") {
38
+ v.current = !1, c(void 0), m(""), i({
50
39
  ...t,
51
40
  from: void 0
52
41
  });
53
42
  return;
54
43
  }
55
- const r = i(d);
44
+ const r = n(s);
56
45
  if (!r) {
57
- m(E);
46
+ c(y);
58
47
  return;
59
48
  }
60
- if (!C(r, c)) {
61
- m(V);
49
+ if (!E(r, S)) {
50
+ c(C);
62
51
  return;
63
52
  }
64
- const a = i(s) || g(s);
53
+ const a = n(u) || p(u);
65
54
  if (a && r > a) {
66
- m(F), h.current = !0, n({
55
+ c(B), T.current = !0, i({
67
56
  from: void 0,
68
57
  to: void 0
69
58
  });
70
59
  return;
71
60
  }
72
- v.current = !1, m(void 0), n({
61
+ v.current = !1, c(void 0), i({
73
62
  ...t,
74
63
  from: r
75
- }), D(T(r));
76
- }, [
77
- t,
78
- n,
79
- c,
80
- E,
81
- V,
82
- F,
83
- s
84
- ]), Y = f(() => {
85
- if (h.current = !0, l(void 0), t.to) p(P(t.to));
64
+ }), m(D(r));
65
+ }, W = () => {
66
+ if (T.current = !0, f(void 0), t.to) l(V(t.to));
86
67
  else {
87
- const e = i(s) || g(s);
88
- e && p(P(e));
68
+ const e = n(u) || p(u);
69
+ e && l(V(e));
89
70
  }
90
- }, [t.to, s]), Z = f((e) => {
91
- const d = e.target.value, r = B(d, s);
92
- p(r), l(void 0);
93
- const a = i(r);
94
- if (a && C(a, c)) {
95
- const S = t.from || i(o) || g(o);
96
- if (S && a < S) return;
97
- n({
71
+ }, X = (e) => {
72
+ const s = e.target.value, r = P(s, u);
73
+ l(r), f(void 0);
74
+ const a = n(r);
75
+ if (a && E(a, S)) {
76
+ const g = t.from || n(d) || p(d);
77
+ if (g && a < g) return;
78
+ i({
98
79
  ...t,
99
80
  to: a
100
81
  });
101
82
  }
102
- }, [
103
- s,
104
- o,
105
- t,
106
- n,
107
- c
108
- ]), _ = f((e) => {
109
- const d = e.currentTarget.value.trim();
110
- if (d === "") {
111
- h.current = !1, l(void 0), p(""), n({
83
+ }, Y = (e) => {
84
+ const s = e.currentTarget.value.trim();
85
+ if (s === "") {
86
+ T.current = !1, f(void 0), l(""), i({
112
87
  ...t,
113
88
  to: void 0
114
89
  });
115
90
  return;
116
91
  }
117
- const r = i(d);
92
+ const r = n(s);
118
93
  if (!r) {
119
- l(E);
94
+ f(y);
120
95
  return;
121
96
  }
122
- if (!C(r, c)) {
123
- l(V);
97
+ if (!E(r, S)) {
98
+ f(C);
124
99
  return;
125
100
  }
126
- const a = i(o) || g(o);
101
+ const a = n(d) || p(d);
127
102
  if (a && r < a) {
128
- l(b), v.current = !0, n({
103
+ f(H), v.current = !0, i({
129
104
  from: void 0,
130
105
  to: void 0
131
106
  });
132
107
  return;
133
108
  }
134
- h.current = !1, l(void 0), n({
109
+ T.current = !1, f(void 0), i({
135
110
  ...t,
136
111
  to: r
137
- }), p(T(r));
138
- }, [
139
- t,
140
- n,
141
- c,
142
- E,
143
- V,
144
- b,
145
- o
146
- ]);
112
+ }), l(D(r));
113
+ };
147
114
  return {
148
- timeFormat: G,
149
- showTime: J,
150
- name: K,
151
- disabled: L,
152
- time: u,
153
- startDateValue: o,
154
- startDateError: O,
155
- handleStartDateFocus: U,
156
- handleStartDateChange: W,
157
- handleStartDateBlur: X,
158
- handleStartTimeChange: f((e) => {
159
- y({
160
- ...u,
115
+ timeFormat: M,
116
+ showTime: I,
117
+ name: j,
118
+ disabled: q,
119
+ time: o,
120
+ startDateValue: d,
121
+ startDateError: K,
122
+ handleStartDateFocus: O,
123
+ handleStartDateChange: Q,
124
+ handleStartDateBlur: U,
125
+ handleStartTimeChange: k((e) => {
126
+ h({
127
+ ...o,
161
128
  startTime: e
162
129
  });
163
- }, [u, y]),
164
- endDateValue: s,
165
- endDateError: Q,
166
- handleEndDateFocus: Y,
167
- handleEndDateChange: Z,
168
- handleEndDateBlur: _,
169
- handleEndTimeChange: f((e) => {
170
- y({
171
- ...u,
130
+ }, [o, h]),
131
+ endDateValue: u,
132
+ endDateError: L,
133
+ handleEndDateFocus: W,
134
+ handleEndDateChange: X,
135
+ handleEndDateBlur: Y,
136
+ handleEndTimeChange: k((e) => {
137
+ h({
138
+ ...o,
172
139
  endTime: e
173
140
  });
174
- }, [u, y]),
175
- startHiddenValue: k(() => j(t.from, u.startTime), [t.from, u.startTime]),
176
- endHiddenValue: k(() => j(t.to, u.endTime), [t.to, u.endTime])
141
+ }, [o, h]),
142
+ startHiddenValue: w(() => R(t.from, o.startTime), [t.from, o.startTime]),
143
+ endHiddenValue: w(() => R(t.to, o.endTime), [t.to, o.endTime])
177
144
  };
178
145
  };
179
146
  export {