@konstructio/ui 0.1.2-alpha.109 → 0.1.2-alpha.110

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 (319) hide show
  1. package/dist/{AdditionalOptions-Crcnz0_g.js → AdditionalOptions-D3SZ2WFJ.js} +1 -1
  2. package/dist/{AlertDialogTrigger-ouMGAlJW.js → AlertDialogTrigger-Cdw3C2Tv.js} +2 -2
  3. package/dist/AnimatePresence-V0yte2ER.js +186 -0
  4. package/dist/{Breadcrumb-MrF1Z6w2.js → Breadcrumb-CHi5-wVa.js} +2 -3
  5. package/dist/{Checkbox-8KnRLpQG.js → Checkbox-CrNxsm3G.js} +2 -3
  6. package/dist/{CommandInput-CGnqfudl.js → CommandInput-DiRv6fEA.js} +3 -4
  7. package/dist/{Counter-CDXdP1Af.js → Counter-DN50BVq6.js} +4 -5
  8. package/dist/{DayPicker-C22j0Y-u.js → DayPicker-BtpJg2q3.js} +355 -349
  9. package/dist/{DropdownButton-LEDrhn1j.js → DropdownButton-Blhkj-Oi.js} +114 -117
  10. package/dist/FlagSelectorList-ClKGwDpS.js +918 -0
  11. package/dist/{HamburgerTrigger-B_NGSZ2r.js → HamburgerTrigger-DjHmNEJD.js} +2 -3
  12. package/dist/{ImageUpload-D7HKSXK8.js → ImageUpload-BNZjCUTX.js} +2 -2
  13. package/dist/{Input-is8n7emP.js → Input-2M2I_H60.js} +3 -5
  14. package/dist/Loading-u8hXrFJR.js +25 -0
  15. package/dist/{Modal-DL4p692X.js → Modal-B6lSyPYQ.js} +3 -3
  16. package/dist/{Spinner-BJE79VTl.js → Spinner-smR3esbL.js} +28 -22
  17. package/dist/StepIndicatorContent-yB2HfOdY.js +36 -0
  18. package/dist/{Switch-C7286Bcu.js → Switch-CPE8v6Zh.js} +1 -1
  19. package/dist/Toast-DTb03cfB.js +76 -0
  20. package/dist/{Wrapper-a7RVCcrn.js → Wrapper-BxfB3BDa.js} +2 -2
  21. package/dist/{Wrapper-CyHxGs4E.js → Wrapper-JmStmade.js} +3 -4
  22. package/dist/{Wrapper-Bbaaa7YA.js → Wrapper-MmlrJppS.js} +76 -70
  23. package/dist/chevron-down-BODx0Q7h.js +14 -0
  24. package/dist/chevron-left-B1zWfqll.js +14 -0
  25. package/dist/chevron-right-D4OkgIIT.js +14 -0
  26. package/dist/chevron-up-B8hiVgxZ.js +14 -0
  27. package/dist/components/Alert/Alert.js +2 -2
  28. package/dist/components/AlertDialog/AlertDialog.js +2 -2
  29. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  30. package/dist/components/AlertDialog/components/index.js +1 -1
  31. package/dist/components/Autocomplete/Autocomplete.js +1 -1
  32. package/dist/components/Autocomplete/components/List/List.js +1 -1
  33. package/dist/components/Autocomplete/hooks/useAutocomplete.js +1 -1
  34. package/dist/components/Badge/Badge.js +2 -2
  35. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  36. package/dist/components/Breadcrumb/components/BackButton/BackButton.js +2 -2
  37. package/dist/components/Breadcrumb/components/Item/Item.js +2 -2
  38. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  39. package/dist/components/Button/Button.js +1 -1
  40. package/dist/components/ButtonGroup/ButtonGroup.js +2 -2
  41. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +2 -2
  42. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +1 -1
  43. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +1 -1
  44. package/dist/components/Card/Card.js +1 -1
  45. package/dist/components/Checkbox/Checkbox.js +1 -1
  46. package/dist/components/Command/Command.js +2 -2
  47. package/dist/components/Command/components/Command.js +1 -1
  48. package/dist/components/Command/components/CommandEmpty.js +1 -1
  49. package/dist/components/Command/components/CommandGroup.js +2 -2
  50. package/dist/components/Command/components/CommandInput.js +1 -1
  51. package/dist/components/Command/components/CommandItem.js +2 -2
  52. package/dist/components/Command/components/CommandList.js +2 -2
  53. package/dist/components/Command/components/CommandSeparator.js +2 -2
  54. package/dist/components/Command/components/CommandShortcut.js +1 -1
  55. package/dist/components/Command/components/DialogContent.js +3 -3
  56. package/dist/components/Command/components/DialogOverlay.js +2 -2
  57. package/dist/components/Command/components/index.js +1 -1
  58. package/dist/components/CopyButton/CopyButton.js +2 -2
  59. package/dist/components/Counter/Counter.js +1 -1
  60. package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
  61. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +1 -1
  62. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +1 -1
  63. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +3 -3
  64. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +3 -3
  65. package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +3 -3
  66. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +2 -2
  67. package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
  68. package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
  69. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
  70. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +1 -1
  71. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +1 -1
  72. package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
  73. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +1 -1
  74. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +2 -2
  75. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +2 -2
  76. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +1 -1
  77. package/dist/components/DateRangePicker/components/RightPanel/RightPanel.js +3 -3
  78. package/dist/components/Datepicker/DatePicker.js +4 -4
  79. package/dist/components/Divider/Divider.js +1 -1
  80. package/dist/components/Drawer/Drawer.js +2 -2
  81. package/dist/components/Drawer/components/Body/Body.js +1 -1
  82. package/dist/components/Drawer/components/Footer/Footer.js +1 -1
  83. package/dist/components/Drawer/components/Header/Header.js +1 -1
  84. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  85. package/dist/components/Filter/Filter.js +1 -1
  86. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +3 -3
  87. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Actions/Actions.js +3 -3
  88. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Trigger/Trigger.js +2 -2
  89. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Wrapper/Wrapper.js +1 -1
  90. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +2 -2
  91. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +2 -2
  92. package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +2 -2
  93. package/dist/components/Filter/components/ResetButton/ResetButton.js +1 -1
  94. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +3 -3
  95. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +2 -2
  96. package/dist/components/ImageUpload/ImageUpload.js +1 -1
  97. package/dist/components/Input/Input.js +1 -1
  98. package/dist/components/LineChart/LineChart.js +2 -2
  99. package/dist/components/Loading/Loading.js +1 -1
  100. package/dist/components/Modal/Modal.js +1 -1
  101. package/dist/components/Modal/components/Body/Body.js +1 -1
  102. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  103. package/dist/components/Modal/components/Header/Header.js +1 -1
  104. package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
  105. package/dist/components/Modal/components/index.js +1 -1
  106. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
  107. package/dist/components/MultiSelectDropdown/components/Item/Item.js +1 -1
  108. package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
  109. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
  110. package/dist/components/MultiSelectDropdown/components/index.js +1 -1
  111. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +2 -2
  112. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +2 -2
  113. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
  114. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +3 -3
  115. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
  116. package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
  117. package/dist/components/PhoneNumberInput/components/index.js +2 -2
  118. package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
  119. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
  120. package/dist/components/PhoneNumberInput/utils/index.js +1 -1
  121. package/dist/components/PieChart/PieChart.js +2 -2
  122. package/dist/components/ProgressBar/ProgressBar.js +1 -1
  123. package/dist/components/Radio/Radio.js +1 -1
  124. package/dist/components/RadioCard/RadioCard.js +1 -1
  125. package/dist/components/RadioCardGroup/RadioCardGroup.js +1 -1
  126. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  127. package/dist/components/Range/Range.js +2 -2
  128. package/dist/components/Select/Select.js +3 -3
  129. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
  130. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +1 -1
  131. package/dist/components/Select/components/List/List.js +3 -3
  132. package/dist/components/Select/components/ListItem/ListItem.js +1 -1
  133. package/dist/components/Select/components/Wrapper.js +1 -1
  134. package/dist/components/Select/components/index.js +2 -2
  135. package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +1 -1
  136. package/dist/components/Sidebar/components/Footer/Footer.js +1 -1
  137. package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
  138. package/dist/components/Sidebar/components/Label/Label.js +1 -1
  139. package/dist/components/Sidebar/components/Logo/Logo.js +1 -1
  140. package/dist/components/Sidebar/components/Navigation/Navigation.js +1 -1
  141. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +1 -1
  142. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +2 -2
  143. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +1 -1
  144. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +1 -1
  145. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +2 -2
  146. package/dist/components/Sidebar/components/index.js +1 -1
  147. package/dist/components/Slider/Slider.js +2 -2
  148. package/dist/components/Spinner/Spinner.js +3 -2
  149. package/dist/components/Stepper/Stepper.js +1 -1
  150. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +2 -2
  151. package/dist/components/Stepper/components/StepConnector/StepConnector.js +1 -1
  152. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +1 -1
  153. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +2 -2
  154. package/dist/components/Switch/Switch.js +1 -1
  155. package/dist/components/Table/Table.js +1 -1
  156. package/dist/components/Table/components/Body.js +1 -1
  157. package/dist/components/Table/components/Filter.js +1 -1
  158. package/dist/components/Table/components/Head.js +1 -1
  159. package/dist/components/Table/components/Row.js +1 -1
  160. package/dist/components/Tabs/Tabs.js +2 -2
  161. package/dist/components/Tabs/components/Content.js +2 -2
  162. package/dist/components/Tabs/components/List.js +2 -2
  163. package/dist/components/Tabs/components/Trigger.js +2 -2
  164. package/dist/components/Tag/Tag.js +1 -1
  165. package/dist/components/TagSelect/TagSelect.js +1 -1
  166. package/dist/components/TagSelect/components/Item/Item.js +1 -1
  167. package/dist/components/TagSelect/components/List/List.js +1 -1
  168. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
  169. package/dist/components/TagSelect/components/index.js +1 -1
  170. package/dist/components/TextArea/TextArea.js +1 -1
  171. package/dist/components/TimePicker/components/HoursList/HoursList.js +1 -1
  172. package/dist/components/TimePicker/components/MeridianList/MeridianList.js +1 -1
  173. package/dist/components/TimePicker/components/MinutesList/MinutesList.js +1 -1
  174. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +2 -2
  175. package/dist/components/TimePicker/components/WrapperList/WrapperList.js +1 -1
  176. package/dist/components/Toast/Toast.js +1 -1
  177. package/dist/components/Toast/Toast.variants.js +73 -41
  178. package/dist/components/Toast/ToastProvider.js +19 -0
  179. package/dist/components/Toast/components/ToastCard/ToastCard.js +103 -0
  180. package/dist/components/Toast/components/index.js +4 -0
  181. package/dist/components/Toast/constants/index.js +35 -0
  182. package/dist/components/Toast/contexts/index.js +4 -0
  183. package/dist/components/Toast/contexts/toast-store.context.js +5 -0
  184. package/dist/components/Toast/hooks/index.js +15 -0
  185. package/dist/components/Toast/hooks/useStackExpansion/useStackExpansion.js +29 -0
  186. package/dist/components/Toast/hooks/useToast/useToast.js +17 -0
  187. package/dist/components/Toast/hooks/useToastHeights/useToastHeights.js +23 -0
  188. package/dist/components/Toast/hooks/useToastSource/useToastSource.js +15 -0
  189. package/dist/components/Toast/hooks/useToastStore/useToastStore.js +11 -0
  190. package/dist/components/Toast/hooks/useToastTimer/useToastTimer.js +26 -0
  191. package/dist/components/Toast/store/create-toast-store.js +46 -0
  192. package/dist/components/Toast/store/default-toast-store.js +5 -0
  193. package/dist/components/Toast/store/index.js +6 -0
  194. package/dist/components/Toast/utils/compute-stack-layout/compute-stack-layout.js +24 -0
  195. package/dist/components/Toast/utils/index.js +4 -0
  196. package/dist/components/Tooltip/Tooltip.js +2 -2
  197. package/dist/components/Typography/Typography.js +1 -1
  198. package/dist/components/VirtualizedTable/VirtualizedTable.js +2 -2
  199. package/dist/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.js +1 -1
  200. package/dist/components/VirtualizedTable/components/Actions/components/ActionsTrigger/ActionsTrigger.js +2 -2
  201. package/dist/components/VirtualizedTable/components/Actions/components/InlineActions/InlineActions.js +1 -1
  202. package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/PortalActions.js +1 -1
  203. package/dist/components/VirtualizedTable/components/Body/Body.js +2 -2
  204. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +3 -3
  205. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +3 -3
  206. package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +1 -1
  207. package/dist/components/VirtualizedTable/components/Filter/Filter.js +2 -2
  208. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
  209. package/dist/components/VirtualizedTable/components/Header/Header.js +2 -2
  210. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +1 -1
  211. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +2 -2
  212. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
  213. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +1 -1
  214. package/dist/components/VirtualizedTable/contexts/index.js +1 -1
  215. package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
  216. package/dist/components/index.js +143 -130
  217. package/dist/{components-CaEW5ge4.js → components-z-LYRWfq.js} +3 -3
  218. package/dist/{constants-HQIXhj2t.js → constants-q2QnJrOb.js} +1 -1
  219. package/dist/contexts/index.js +1 -1
  220. package/dist/contexts/theme.provider.js +1 -1
  221. package/dist/createLucideIcon-C7E_xycG.js +119 -0
  222. package/dist/{dist-CszFjHAP.js → dist-Bi8Y5nEx.js} +7 -9
  223. package/dist/{dist-BIBFLVt1.js → dist-CNui_Egg.js} +9 -10
  224. package/dist/{dist-pxvIAJzo.js → dist-CR3FMRzF.js} +3 -3
  225. package/dist/{dist-BbX4Nrk2.js → dist-CgzF5_J6.js} +2 -2
  226. package/dist/{dist-AxOGvL82.js → dist-D5Q2IYuC.js} +3 -3
  227. package/dist/dist-D70ZJkHf.js +29 -0
  228. package/dist/{dist-DwxO2RoR.js → dist-DZ_SU77k.js} +82 -72
  229. package/dist/{dist-9WbMf_jT.js → dist-DcFwF4XM.js} +1 -1
  230. package/dist/{dist-iUAHw-3y.js → dist-Dg3vyTx9.js} +6 -6
  231. package/dist/{dist-ByCJijZd.js → dist-LRkZdylX.js} +4 -4
  232. package/dist/{dist-DO3apbIh.js → dist-f8EwfITY.js} +3 -3
  233. package/dist/dist-uerXivvM.js +178 -0
  234. package/dist/ellipsis-vertical-C_yX7aQe.js +31 -0
  235. package/dist/{es2015-CoHq2g4y.js → es2015-Hhb87ipX.js} +1 -1
  236. package/dist/hooks/index.js +8 -6
  237. package/dist/hooks/useIsHydrated/useIsHydrated.js +6 -0
  238. package/dist/hooks/useIsHydrated/utils/index.js +4 -0
  239. package/dist/hooks/useIsHydrated/utils/noop-subscribe/noop-subscribe.js +5 -0
  240. package/dist/hooks/useMediaQuery.js +1 -1
  241. package/dist/index.js +164 -149
  242. package/dist/lib/components/Command/components/CommandShortcut.d.ts +1 -1
  243. package/dist/lib/components/Command/contexts/Command.provider.d.ts +1 -1
  244. package/dist/lib/components/ImageUpload/ImageUpload.d.ts +1 -1
  245. package/dist/lib/components/Modal/contexts/Modal.provider.d.ts +1 -1
  246. package/dist/lib/components/Toast/Toast.d.ts +19 -14
  247. package/dist/lib/components/Toast/Toast.types.d.ts +62 -35
  248. package/dist/lib/components/Toast/Toast.variants.d.ts +16 -3
  249. package/dist/lib/components/Toast/ToastProvider.d.ts +11 -0
  250. package/dist/lib/components/Toast/ToastProvider.types.d.ts +17 -0
  251. package/dist/lib/components/Toast/components/ToastCard/ToastCard.d.ts +3 -0
  252. package/dist/lib/components/Toast/components/ToastCard/ToastCard.types.d.ts +17 -0
  253. package/dist/lib/components/Toast/components/index.d.ts +1 -0
  254. package/dist/lib/components/Toast/constants/index.d.ts +25 -0
  255. package/dist/lib/components/Toast/contexts/index.d.ts +1 -0
  256. package/dist/lib/components/Toast/contexts/toast-store.context.d.ts +2 -0
  257. package/dist/lib/components/Toast/hooks/index.d.ts +6 -0
  258. package/dist/lib/components/Toast/hooks/useStackExpansion/useStackExpansion.d.ts +2 -0
  259. package/dist/lib/components/Toast/hooks/useStackExpansion/useStackExpansion.types.d.ts +6 -0
  260. package/dist/lib/components/Toast/hooks/useToast/useToast.d.ts +2 -0
  261. package/dist/lib/components/Toast/hooks/useToastHeights/useToastHeights.d.ts +2 -0
  262. package/dist/lib/components/Toast/hooks/useToastHeights/useToastHeights.types.d.ts +6 -0
  263. package/dist/lib/components/Toast/hooks/useToastSource/useToastSource.d.ts +2 -0
  264. package/dist/lib/components/Toast/hooks/useToastSource/useToastSource.types.d.ts +11 -0
  265. package/dist/lib/components/Toast/hooks/useToastStore/useToastStore.d.ts +3 -0
  266. package/dist/lib/components/Toast/hooks/useToastTimer/useToastTimer.d.ts +2 -0
  267. package/dist/lib/components/Toast/hooks/useToastTimer/useToastTimer.types.d.ts +7 -0
  268. package/dist/lib/components/Toast/store/create-toast-store.d.ts +2 -0
  269. package/dist/lib/components/Toast/store/create-toast-store.types.d.ts +24 -0
  270. package/dist/lib/components/Toast/store/default-toast-store.d.ts +1 -0
  271. package/dist/lib/components/Toast/store/index.d.ts +2 -0
  272. package/dist/lib/components/Toast/utils/compute-stack-layout/compute-stack-layout.d.ts +2 -0
  273. package/dist/lib/components/Toast/utils/compute-stack-layout/compute-stack-layout.types.d.ts +12 -0
  274. package/dist/lib/components/Toast/utils/index.d.ts +1 -0
  275. package/dist/lib/components/VirtualizedTable/components/Actions/Actions.d.ts +1 -1
  276. package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.d.ts +1 -1
  277. package/dist/lib/components/VirtualizedTable/components/Actions/components/InlineActions/InlineActions.d.ts +1 -1
  278. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/PortalActions.d.ts +1 -1
  279. package/dist/lib/components/VirtualizedTable/components/Body/Body.d.ts +1 -1
  280. package/dist/lib/components/VirtualizedTable/components/DotPaginate/DotPaginate.d.ts +1 -1
  281. package/dist/lib/components/VirtualizedTable/components/FormPaginate/FormPaginate.d.ts +1 -1
  282. package/dist/lib/components/VirtualizedTable/components/Header/Header.d.ts +1 -1
  283. package/dist/lib/components/VirtualizedTable/components/Skeleton/Skeleton.d.ts +1 -1
  284. package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.d.ts +1 -1
  285. package/dist/lib/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
  286. package/dist/lib/components/index.d.ts +8 -0
  287. package/dist/lib/hooks/index.d.ts +1 -0
  288. package/dist/lib/hooks/useIsHydrated/useIsHydrated.d.ts +1 -0
  289. package/dist/lib/hooks/useIsHydrated/utils/index.d.ts +1 -0
  290. package/dist/lib/hooks/useIsHydrated/utils/noop-subscribe/noop-subscribe.d.ts +1 -0
  291. package/dist/{libphonenumber-BMq3Thej.js → libphonenumber-DtibHRPP.js} +123 -114
  292. package/dist/package.json +28 -28
  293. package/dist/{phone-number.provider-Dkq_p1Gi.js → phone-number.provider-BASl9fGG.js} +2 -3
  294. package/dist/{react-DRLuFcbk.js → react-DpRKGbW_.js} +1935 -1841
  295. package/dist/styles.css +1 -1
  296. package/dist/{table.provider-CWzODR1t.js → table.provider-MQ4T5Xb5.js} +2 -2
  297. package/dist/{theme.provider-CSL1WCYG.js → theme.provider-CvL6sqHq.js} +1 -1
  298. package/dist/{useBreadcrumb-Ds_9BeFz.js → useBreadcrumb-BvP9cgD8.js} +580 -545
  299. package/dist/utils/index.js +1 -1
  300. package/dist/{utils-B-6R7kNE.js → utils-DnIJruo0.js} +208 -129
  301. package/dist/x-C8O1IsaM.js +17 -0
  302. package/dist/{x-Ierxf0uI.js → x-Vur_9PXW.js} +1 -2
  303. package/package.json +28 -28
  304. package/dist/AnimatePresence-C5PSMIZj.js +0 -186
  305. package/dist/FlagSelectorList-tYZNl-tz.js +0 -863
  306. package/dist/Loading-DO8JOWBV.js +0 -18
  307. package/dist/StepIndicatorContent-BGDvxLzV.js +0 -30
  308. package/dist/Toast-jSx3Lao8.js +0 -461
  309. package/dist/chevron-down-DNP-OOAQ.js +0 -8
  310. package/dist/chevron-left-DxGDBBKA.js +0 -8
  311. package/dist/chevron-right-CDwgDdp-.js +0 -8
  312. package/dist/chevron-up-Bjpvg6ui.js +0 -8
  313. package/dist/createLucideIcon-MbzNWCaI.js +0 -42
  314. package/dist/dist-D5XYRjmR.js +0 -15
  315. package/dist/dist-DGOjiAnB.js +0 -14
  316. package/dist/dist-DKryKPmP.js +0 -193
  317. package/dist/dist-DYIabsrY.js +0 -17
  318. package/dist/ellipsis-vertical-BBmhzIXn.js +0 -24
  319. package/dist/x-a_LpoXzG.js +0 -11
@@ -1,863 +0,0 @@
1
- import { t as N } from "./utils-B-6R7kNE.js";
2
- import { Typography as L } from "./components/Typography/Typography.js";
3
- import { usePhoneNumberContext as K } from "./components/PhoneNumberInput/contexts/phone-number.hook.js";
4
- import { TruncateText as $ } from "./components/PhoneNumberInput/components/TruncateText/TruncateText.js";
5
- import * as M from "react";
6
- import { useEffect as B, useMemo as H, useRef as J } from "react";
7
- import { flushSync as q } from "react-dom";
8
- import { jsx as x, jsxs as U } from "react/jsx-runtime";
9
- function G(l, t, e) {
10
- const s = new Array(l);
11
- return new Proxy(s, { get(i, n, o) {
12
- if (typeof n == "string") {
13
- const h = n.charCodeAt(0);
14
- if (h >= 48 && h <= 57) {
15
- const a = +n;
16
- if (Number.isInteger(a) && a >= 0 && a < l) {
17
- let d = i[a];
18
- if (!d) {
19
- const c = t[a * 2];
20
- d = i[a] = {
21
- index: a,
22
- key: e(a),
23
- start: c,
24
- size: t[a * 2 + 1],
25
- end: c + t[a * 2 + 1],
26
- lane: 0
27
- };
28
- }
29
- return d;
30
- }
31
- }
32
- if (n === "length") return l;
33
- }
34
- return Reflect.get(i, n, o);
35
- } });
36
- }
37
- function I(l, t, e) {
38
- let s = e.initialDeps ?? [], i, n = !0;
39
- function o() {
40
- var h;
41
- const a = process.env.NODE_ENV !== "production" && !!e.key && !!((h = e.debug) != null && h.call(e));
42
- let d = 0;
43
- a && (d = Date.now());
44
- const c = l();
45
- if (!(c.length !== s.length || c.some((f, m) => s[m] !== f))) return i;
46
- s = c;
47
- let r = 0;
48
- if (a && (r = Date.now()), i = t(...c), a) {
49
- const f = Math.round((Date.now() - d) * 100) / 100, m = Math.round((Date.now() - r) * 100) / 100, S = m / 16, p = (u, g) => {
50
- for (u = String(u); u.length < g; ) u = " " + u;
51
- return u;
52
- };
53
- console.info(`%c⏱ ${p(m, 5)} /${p(f, 5)} ms`, `
54
- font-size: .6rem;
55
- font-weight: bold;
56
- color: hsl(${Math.max(0, Math.min(120 - 120 * S, 120))}deg 100% 31%);`, e?.key);
57
- }
58
- return e?.onChange && !(n && e.skipInitialOnChange) && e.onChange(i), n = !1, i;
59
- }
60
- return o.updateDeps = (h) => {
61
- s = h;
62
- }, o;
63
- }
64
- function V(l, t) {
65
- if (l === void 0) throw new Error(`Unexpected undefined${t ? `: ${t}` : ""}`);
66
- return l;
67
- }
68
- var Q = (l, t) => Math.abs(l - t) < 1.01, X = (l, t, e) => {
69
- let s;
70
- return Object.assign(function(...i) {
71
- l.clearTimeout(s), s = l.setTimeout(() => t.apply(this, i), e);
72
- }, { cancel: () => {
73
- l.clearTimeout(s);
74
- } });
75
- }, T, D = () => {
76
- if (T !== void 0) return T;
77
- if (typeof navigator > "u") return T = !1;
78
- if (/iP(hone|od|ad)/.test(navigator.userAgent)) return T = !0;
79
- const l = navigator.maxTouchPoints;
80
- return T = navigator.platform === "MacIntel" && l !== void 0 && l > 0;
81
- }, W = (l) => {
82
- const { offsetWidth: t, offsetHeight: e } = l;
83
- return {
84
- width: t,
85
- height: e
86
- };
87
- }, Y = (l) => l, Z = (l) => {
88
- const t = Math.max(l.startIndex - l.overscan, 0), e = Math.min(l.endIndex + l.overscan, l.count - 1) - t + 1, s = new Array(e);
89
- for (let i = 0; i < e; i++) s[i] = t + i;
90
- return s;
91
- }, tt = (l, t) => {
92
- const e = l.scrollElement;
93
- if (!e) return;
94
- const s = l.targetWindow;
95
- if (!s) return;
96
- const i = (o) => {
97
- const { width: h, height: a } = o;
98
- t({
99
- width: Math.round(h),
100
- height: Math.round(a)
101
- });
102
- };
103
- if (i(W(e)), !s.ResizeObserver) return () => {
104
- };
105
- const n = new s.ResizeObserver((o) => {
106
- const h = () => {
107
- const a = o[0];
108
- if (a?.borderBoxSize) {
109
- const d = a.borderBoxSize[0];
110
- if (d) {
111
- i({
112
- width: d.inlineSize,
113
- height: d.blockSize
114
- });
115
- return;
116
- }
117
- }
118
- i(W(e));
119
- };
120
- l.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(h) : h();
121
- });
122
- return n.observe(e, { box: "border-box" }), () => {
123
- n.unobserve(e);
124
- };
125
- }, C = { passive: !0 }, et = typeof window > "u" ? !0 : "onscrollend" in window, st = (l, t, e) => {
126
- const s = l.scrollElement;
127
- if (!s) return;
128
- const i = l.targetWindow;
129
- if (!i) return;
130
- const n = l.options.useScrollendEvent && et;
131
- let o = 0;
132
- const h = n ? null : X(i, () => t(o, !1), l.options.isScrollingResetDelay), a = (r) => () => {
133
- o = e(s), h?.(), t(o, r);
134
- }, d = a(!0), c = a(!1);
135
- return s.addEventListener("scroll", d, C), n && s.addEventListener("scrollend", c, C), () => {
136
- s.removeEventListener("scroll", d), n && s.removeEventListener("scrollend", c), h?.cancel();
137
- };
138
- }, it = (l, t) => st(l, t, (e) => {
139
- const { horizontal: s, isRtl: i } = l.options;
140
- return s ? e.scrollLeft * (i && -1 || 1) : e.scrollTop;
141
- }), nt = (l, t, e) => {
142
- if (e.options.useCachedMeasurements) {
143
- const s = e.indexFromElement(l), i = e.options.getItemKey(s);
144
- return e.itemSizeCache.get(i) ?? e.options.estimateSize(s);
145
- }
146
- if (t?.borderBoxSize) {
147
- const s = t.borderBoxSize[0];
148
- if (s) return Math.round(s[e.options.horizontal ? "inlineSize" : "blockSize"]);
149
- }
150
- if (!t) {
151
- const s = e.indexFromElement(l), i = e.options.getItemKey(s), n = e.itemSizeCache.get(i);
152
- if (n !== void 0) return n;
153
- }
154
- return l[e.options.horizontal ? "offsetWidth" : "offsetHeight"];
155
- }, ot = (l, { adjustments: t = 0, behavior: e }, s) => {
156
- var i, n;
157
- (n = (i = s.scrollElement) == null ? void 0 : i.scrollTo) == null || n.call(i, {
158
- [s.options.horizontal ? "left" : "top"]: l + t,
159
- behavior: e
160
- });
161
- }, lt = ot, rt = class {
162
- constructor(l) {
163
- this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollState = null, this.measurementsCache = [], this._flatMeasurements = null, this.itemSizeCache = /* @__PURE__ */ new Map(), this.itemSizeCacheVersion = 0, this.laneAssignments = /* @__PURE__ */ new Map(), this.pendingMin = null, this.prevLanes = void 0, this.lanesChangedFlag = !1, this.lanesSettling = !1, this.pendingScrollAnchor = null, this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this._iosDeferredAdjustment = 0, this._iosTouching = !1, this._iosJustTouchEnded = !1, this._iosTouchEndTimerId = null, this._intendedScrollOffset = null, this.elementsCache = /* @__PURE__ */ new Map(), this.now = () => {
164
- var t, e, s;
165
- return ((s = (e = (t = this.targetWindow) == null ? void 0 : t.performance) == null ? void 0 : e.now) == null ? void 0 : s.call(e)) ?? Date.now();
166
- }, this.observer = /* @__PURE__ */ (() => {
167
- let t = null;
168
- const e = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((s) => {
169
- s.forEach((i) => {
170
- const n = () => {
171
- const o = i.target, h = this.indexFromElement(o);
172
- if (!o.isConnected) {
173
- this.observer.unobserve(o);
174
- for (const [a, d] of this.elementsCache) if (d === o) {
175
- this.elementsCache.delete(a);
176
- break;
177
- }
178
- return;
179
- }
180
- this.isIndexInRange(h) && this.shouldMeasureDuringScroll(h) && this.resizeItem(h, this.options.measureElement(o, i, this));
181
- };
182
- this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(n) : n();
183
- });
184
- }));
185
- return {
186
- disconnect: () => {
187
- var s;
188
- (s = e()) == null || s.disconnect(), t = null;
189
- },
190
- observe: (s) => {
191
- var i;
192
- return (i = e()) == null ? void 0 : i.observe(s, { box: "border-box" });
193
- },
194
- unobserve: (s) => {
195
- var i;
196
- return (i = e()) == null ? void 0 : i.unobserve(s);
197
- }
198
- };
199
- })(), this.range = null, this.setOptions = (t) => {
200
- var e, s;
201
- const i = {
202
- debug: !1,
203
- initialOffset: 0,
204
- overscan: 1,
205
- paddingStart: 0,
206
- paddingEnd: 0,
207
- scrollPaddingStart: 0,
208
- scrollPaddingEnd: 0,
209
- horizontal: !1,
210
- getItemKey: Y,
211
- rangeExtractor: Z,
212
- onChange: () => {
213
- },
214
- measureElement: nt,
215
- initialRect: {
216
- width: 0,
217
- height: 0
218
- },
219
- scrollMargin: 0,
220
- gap: 0,
221
- indexAttribute: "data-index",
222
- initialMeasurementsCache: [],
223
- lanes: 1,
224
- anchorTo: "start",
225
- followOnAppend: !1,
226
- scrollEndThreshold: 1,
227
- isScrollingResetDelay: 150,
228
- enabled: !0,
229
- isRtl: !1,
230
- useScrollendEvent: !1,
231
- useAnimationFrameWithResizeObserver: !1,
232
- laneAssignmentMode: "estimate",
233
- useCachedMeasurements: !1
234
- };
235
- for (const r in t) {
236
- const f = t[r];
237
- f !== void 0 && (i[r] = f);
238
- }
239
- const n = this.options;
240
- let o = null, h = null, a = !1;
241
- if (n !== void 0 && n.enabled && i.enabled && i.anchorTo === "end" && this.scrollElement !== null) {
242
- const r = n.count, f = i.count, m = this.getMeasurements(), S = r > 0 ? ((e = m[0]) == null ? void 0 : e.key) ?? n.getItemKey(0) : null, p = r > 0 ? ((s = m[r - 1]) == null ? void 0 : s.key) ?? n.getItemKey(r - 1) : null;
243
- if (f !== r || r > 0 && f > 0 && (i.getItemKey(0) !== S || i.getItemKey(f - 1) !== p)) {
244
- a = !0;
245
- const u = r > 0 ? this.getVirtualItemForOffset(this.getScrollOffset()) ?? m[0] : null;
246
- u && (o = [u.key, this.getScrollOffset() - u.start]);
247
- const g = i.followOnAppend === !0 ? "auto" : i.followOnAppend || null;
248
- g && f > r && this.isAtEnd(n.scrollEndThreshold) && (r === 0 || i.getItemKey(f - 1) !== p) && (h = g);
249
- }
250
- }
251
- this.options = i, a && (this.pendingMin = 0, this.itemSizeCacheVersion++);
252
- let d = !1, c = 0;
253
- if (o && this.scrollOffset !== null) {
254
- const [r, f] = o, m = this.getMeasurements(), { count: S, getItemKey: p } = this.options;
255
- let u = 0;
256
- for (; u < S && p(u) !== r; ) u++;
257
- if (u < S) {
258
- const g = m[u];
259
- if (g) {
260
- const E = Math.max(0, g.start + f);
261
- E !== this.scrollOffset && (c = E - this.scrollOffset, this.scrollOffset = E, d = !0);
262
- }
263
- }
264
- }
265
- (d || h) && (this.pendingScrollAnchor = [
266
- d ? o[0] : null,
267
- d ? o[1] : 0,
268
- h,
269
- c
270
- ]);
271
- }, this.notify = (t) => {
272
- var e, s;
273
- (s = (e = this.options).onChange) == null || s.call(e, this, t);
274
- }, this.maybeNotify = I(() => (this.calculateRange(), [
275
- this.isScrolling,
276
- this.range ? this.range.startIndex : null,
277
- this.range ? this.range.endIndex : null
278
- ]), (t) => {
279
- this.notify(t);
280
- }, {
281
- key: process.env.NODE_ENV !== "production" && "maybeNotify",
282
- debug: () => this.options.debug,
283
- initialDeps: [
284
- this.isScrolling,
285
- this.range ? this.range.startIndex : null,
286
- this.range ? this.range.endIndex : null
287
- ]
288
- }), this.cleanup = () => {
289
- this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.observer.disconnect(), this.rafId != null && this.targetWindow && (this.targetWindow.cancelAnimationFrame(this.rafId), this.rafId = null), this.scrollState = null, this.isScrolling = !1, this.scrollDirection = null, this._iosDeferredAdjustment = 0, this._iosTouching = !1, this._iosJustTouchEnded = !1, this.scrollElement = null, this.targetWindow = null;
290
- }, this._didMount = () => () => {
291
- this.cleanup();
292
- }, this._willUpdate = () => {
293
- var t;
294
- const e = this.options.enabled ? this.options.getScrollElement() : null;
295
- if (this.scrollElement !== e) {
296
- if (this.cleanup(), !e) {
297
- this.maybeNotify();
298
- return;
299
- }
300
- if (this.scrollElement = e, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((i) => {
301
- this.observer.observe(i);
302
- }), this.unsubs.push(this.options.observeElementRect(this, (i) => {
303
- this.scrollRect = i, this.maybeNotify();
304
- })), this.unsubs.push(this.options.observeElementOffset(this, (i, n) => {
305
- if (n && this._intendedScrollOffset === null && i === this.scrollOffset) return;
306
- this._intendedScrollOffset !== null && Math.abs(i - this._intendedScrollOffset) < 1.5 && (i = this._intendedScrollOffset), this._intendedScrollOffset = null, this.scrollAdjustments = 0;
307
- const o = this.getScrollOffset();
308
- this.scrollDirection = n ? o === i ? this.scrollDirection : o < i ? "forward" : "backward" : null, this.scrollOffset = i, this.isScrolling = n, this._flushIosDeferredIfReady(), this.scrollState && this.scheduleScrollReconcile(), this.maybeNotify();
309
- })), "addEventListener" in this.scrollElement) {
310
- const i = this.scrollElement, n = () => {
311
- this._iosTouching = !0, this._iosJustTouchEnded = !1, this._iosTouchEndTimerId !== null && this.targetWindow != null && (this.targetWindow.clearTimeout(this._iosTouchEndTimerId), this._iosTouchEndTimerId = null);
312
- }, o = () => {
313
- this._iosTouching = !1, !(!D() || this.targetWindow == null) && (this._iosJustTouchEnded = !0, this._iosTouchEndTimerId = this.targetWindow.setTimeout(() => {
314
- this._iosJustTouchEnded = !1, this._iosTouchEndTimerId = null, this._flushIosDeferredIfReady();
315
- }, 150));
316
- };
317
- i.addEventListener("touchstart", n, C), i.addEventListener("touchend", o, C), this.unsubs.push(() => {
318
- i.removeEventListener("touchstart", n), i.removeEventListener("touchend", o), this._iosTouchEndTimerId !== null && this.targetWindow != null && (this.targetWindow.clearTimeout(this._iosTouchEndTimerId), this._iosTouchEndTimerId = null);
319
- });
320
- }
321
- this._scrollToOffset(this.getScrollOffset(), {
322
- adjustments: void 0,
323
- behavior: void 0
324
- });
325
- }
326
- const s = this.pendingScrollAnchor;
327
- if (this.pendingScrollAnchor = null, s && this.scrollElement && this.options.enabled) {
328
- const [i, n, o, h] = s;
329
- i !== null && !o && (D() && (this.isScrolling || this._iosTouching || this._iosJustTouchEnded) ? h !== 0 && (this._iosDeferredAdjustment += h) : this._scrollToOffset(this.getScrollOffset(), {
330
- adjustments: void 0,
331
- behavior: void 0
332
- })), o && this.scrollToEnd({ behavior: o });
333
- }
334
- }, this._flushIosDeferredIfReady = () => {
335
- if (this._iosDeferredAdjustment === 0 || this.isScrolling || this._iosTouching || this._iosJustTouchEnded) return;
336
- const t = this.getScrollOffset(), e = this.getMaxScrollOffset();
337
- if (t < 0 || t > e) return;
338
- if (this._iosDeferredAdjustment < 0 && t >= e - 1) {
339
- this._iosDeferredAdjustment = 0;
340
- return;
341
- }
342
- const s = this._iosDeferredAdjustment;
343
- this._iosDeferredAdjustment = 0, this._scrollToOffset(t, {
344
- adjustments: this.scrollAdjustments += s,
345
- behavior: void 0
346
- });
347
- }, this.rafId = null, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getMeasurementOptions = I(() => [
348
- this.options.count,
349
- this.options.paddingStart,
350
- this.options.scrollMargin,
351
- this.options.getItemKey,
352
- this.options.enabled,
353
- this.options.lanes,
354
- this.options.laneAssignmentMode,
355
- this.options.gap
356
- ], (t, e, s, i, n, o, h, a) => (this.prevLanes !== void 0 && this.prevLanes !== o && (this.lanesChangedFlag = !0), this.prevLanes = o, this.pendingMin = null, {
357
- count: t,
358
- paddingStart: e,
359
- scrollMargin: s,
360
- getItemKey: i,
361
- enabled: n,
362
- lanes: o,
363
- laneAssignmentMode: h,
364
- gap: a
365
- }), { key: !1 }), this.isIndexInRange = (t) => t >= 0 && t < this.options.count, this.getMeasurements = I(() => [this.getMeasurementOptions(), this.itemSizeCacheVersion], ({ count: t, paddingStart: e, scrollMargin: s, getItemKey: i, enabled: n, lanes: o, laneAssignmentMode: h, gap: a }, d) => {
366
- const c = this.itemSizeCache;
367
- if (!n)
368
- return this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), [];
369
- if (this.laneAssignments.size > t)
370
- for (const u of this.laneAssignments.keys()) u >= t && this.laneAssignments.delete(u);
371
- this.lanesChangedFlag && (this.lanesChangedFlag = !1, this.lanesSettling = !0, this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), this.pendingMin = null), this.measurementsCache.length === 0 && !this.lanesSettling && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((u) => {
372
- this.itemSizeCache.set(u.key, u.size);
373
- }));
374
- const r = this.lanesSettling ? 0 : this.pendingMin ?? 0;
375
- if (this.pendingMin = null, this.lanesSettling && this.measurementsCache.length === t && (this.lanesSettling = !1), o === 1) {
376
- const u = t * 2;
377
- let g = this._flatMeasurements;
378
- if (!g || g.length < u) {
379
- const b = new Float64Array(u);
380
- g && r > 0 && b.set(g.subarray(0, r * 2)), g = b, this._flatMeasurements = g;
381
- }
382
- let E;
383
- if (r === 0) E = e + s;
384
- else {
385
- const b = r - 1;
386
- E = g[b * 2] + g[b * 2 + 1] + a;
387
- }
388
- for (let b = r; b < t; b++) {
389
- const A = i(b), z = c.get(A), w = typeof z == "number" ? z : this.options.estimateSize(b);
390
- g[b * 2] = E, g[b * 2 + 1] = w, E += w + a;
391
- }
392
- const v = G(t, g, i);
393
- return this.measurementsCache = v, v;
394
- }
395
- const f = this.measurementsCache.slice(0, r), m = new Array(o).fill(void 0), S = new Float64Array(o);
396
- let p = 0;
397
- for (let u = 0; u < r; u++) {
398
- const g = f[u];
399
- g && (m[g.lane] === void 0 && p++, m[g.lane] = u, S[g.lane] = g.end);
400
- }
401
- for (let u = r; u < t; u++) {
402
- const g = i(u), E = this.laneAssignments.get(u);
403
- let v, b;
404
- const A = h === "estimate" || c.has(g);
405
- if (E !== void 0 && this.options.lanes > 1) {
406
- v = E;
407
- const _ = m[v], y = _ !== void 0 ? f[_] : void 0;
408
- b = y ? y.end + a : e + s;
409
- } else if (p === o) {
410
- let _ = 0, y = S[0], j = m[0];
411
- for (let O = 1; O < o; O++) {
412
- const R = S[O];
413
- (R < y || R === y && m[O] < j) && (_ = O, y = R, j = m[O]);
414
- }
415
- v = _, b = y + a, A && this.laneAssignments.set(u, v);
416
- } else
417
- v = u % this.options.lanes, b = e + s, A && this.laneAssignments.set(u, v);
418
- const z = c.get(g), w = typeof z == "number" ? z : this.options.estimateSize(u), k = b + w;
419
- f[u] = {
420
- index: u,
421
- start: b,
422
- size: w,
423
- end: k,
424
- key: g,
425
- lane: v
426
- }, m[v] === void 0 && p++, m[v] = u, S[v] = k;
427
- }
428
- return this.measurementsCache = f, f;
429
- }, {
430
- key: process.env.NODE_ENV !== "production" && "getMeasurements",
431
- debug: () => this.options.debug
432
- }), this.calculateRange = I(() => [
433
- this.getMeasurements(),
434
- this.getSize(),
435
- this.getScrollOffset(),
436
- this.options.lanes
437
- ], (t, e, s, i) => t.length === 0 || e === 0 ? (this.range = null, null) : (this.range = ht(t, e, s, i, i === 1 && this._flatMeasurements != null ? this._flatMeasurements : null), this.range), {
438
- key: process.env.NODE_ENV !== "production" && "calculateRange",
439
- debug: () => this.options.debug
440
- }), this.getVirtualIndexes = I(() => {
441
- let t = null, e = null;
442
- const s = this.calculateRange();
443
- return s && (t = s.startIndex, e = s.endIndex), this.maybeNotify.updateDeps([
444
- this.isScrolling,
445
- t,
446
- e
447
- ]), [
448
- this.options.rangeExtractor,
449
- this.options.overscan,
450
- this.options.count,
451
- t,
452
- e
453
- ];
454
- }, (t, e, s, i, n) => i === null || n === null ? [] : t({
455
- startIndex: i,
456
- endIndex: n,
457
- overscan: e,
458
- count: s
459
- }), {
460
- key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
461
- debug: () => this.options.debug
462
- }), this.indexFromElement = (t) => {
463
- const e = this.options.indexAttribute, s = t.getAttribute(e);
464
- return s ? parseInt(s, 10) : (console.warn(`Missing attribute name '${e}={index}' on measured element.`), -1);
465
- }, this.shouldMeasureDuringScroll = (t) => {
466
- var e;
467
- if (!this.scrollState || this.scrollState.behavior !== "smooth") return !0;
468
- const s = this.scrollState.index ?? ((e = this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)) == null ? void 0 : e.index);
469
- if (s !== void 0 && this.range) {
470
- const i = Math.max(this.options.overscan, Math.ceil((this.range.endIndex - this.range.startIndex) / 2)), n = Math.max(0, s - i), o = Math.min(this.options.count - 1, s + i);
471
- return t >= n && t <= o;
472
- }
473
- return !0;
474
- }, this.measureElement = (t) => {
475
- if (!t) {
476
- this.elementsCache.forEach((n, o) => {
477
- n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(o));
478
- });
479
- return;
480
- }
481
- const e = this.indexFromElement(t);
482
- if (!this.isIndexInRange(e)) return;
483
- const s = this.options.getItemKey(e), i = this.elementsCache.get(s);
484
- i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(s, t)), (!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(e) && this.resizeItem(e, this.options.measureElement(t, void 0, this));
485
- }, this.resizeItem = (t, e) => {
486
- var s, i;
487
- if (!this.isIndexInRange(t)) return;
488
- let n, o, h;
489
- const a = this._flatMeasurements;
490
- if (this.options.lanes === 1 && a !== null)
491
- h = this.options.getItemKey(t), o = a[t * 2], n = a[t * 2 + 1];
492
- else {
493
- const r = this.measurementsCache[t];
494
- if (!r) return;
495
- h = r.key, o = r.start, n = r.size;
496
- }
497
- const d = this.itemSizeCache.get(h) ?? n, c = e - d;
498
- if (c !== 0) {
499
- const r = this.options.anchorTo === "end" && ((s = this.scrollState) == null ? void 0 : s.behavior) !== "smooth" && this.getVirtualDistanceFromEnd() <= this.options.scrollEndThreshold, f = r ? this.getTotalSize() : 0, m = this.getScrollOffset() + this.scrollAdjustments, S = this.itemSizeCache.has(h) ? o + d <= m && this.scrollDirection !== "backward" : o < m, p = ((i = this.scrollState) == null ? void 0 : i.behavior) !== "smooth" && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[t] ?? {
500
- index: t,
501
- key: h,
502
- start: o,
503
- size: n,
504
- end: o + n,
505
- lane: 0
506
- }, c, this) : S);
507
- (this.pendingMin === null || t < this.pendingMin) && (this.pendingMin = t), this.itemSizeCache.set(h, e), this.itemSizeCacheVersion++;
508
- let u = !1;
509
- r ? u = this.applyScrollAdjustment(this.getTotalSize() - f) : p && (u = this.applyScrollAdjustment(c)), this.notify(u);
510
- }
511
- }, this.getVirtualItems = I(() => [this.getVirtualIndexes(), this.getMeasurements()], (t, e) => {
512
- const s = [];
513
- for (let i = 0, n = t.length; i < n; i++) {
514
- const o = e[t[i]];
515
- s.push(o);
516
- }
517
- return s;
518
- }, {
519
- key: process.env.NODE_ENV !== "production" && "getVirtualItems",
520
- debug: () => this.options.debug
521
- }), this.getVirtualItemForOffset = (t) => {
522
- const e = this.getMeasurements();
523
- if (e.length === 0) return;
524
- const s = this._flatMeasurements, i = this.options.lanes === 1 && s != null, n = P(0, e.length - 1, i ? (o) => s[o * 2] : (o) => V(e[o]).start, t);
525
- return V(e[n]);
526
- }, this.getMaxScrollOffset = () => {
527
- if (!this.scrollElement) return 0;
528
- if ("scrollHeight" in this.scrollElement) return this.options.horizontal ? this.scrollElement.scrollWidth - this.scrollElement.clientWidth : this.scrollElement.scrollHeight - this.scrollElement.clientHeight;
529
- {
530
- const t = this.scrollElement.document.documentElement;
531
- return this.options.horizontal ? t.scrollWidth - this.scrollElement.innerWidth : t.scrollHeight - this.scrollElement.innerHeight;
532
- }
533
- }, this.getVirtualDistanceFromEnd = () => Math.max(this.getTotalSize() - this.getSize() - this.getScrollOffset(), 0), this.getDistanceFromEnd = () => Math.max(this.getMaxScrollOffset() - this.getScrollOffset(), 0), this.isAtEnd = (t = this.options.scrollEndThreshold) => this.getDistanceFromEnd() <= t, this.getOffsetForAlignment = (t, e, s = 0) => {
534
- if (!this.scrollElement) return 0;
535
- const i = this.getSize(), n = this.getScrollOffset();
536
- e === "auto" && (e = t >= n + i ? "end" : "start"), e === "center" ? t += (s - i) / 2 : e === "end" && (t -= i);
537
- const o = this.getMaxScrollOffset();
538
- return Math.max(Math.min(o, t), 0);
539
- }, this.getOffsetForIndex = (t, e = "auto") => {
540
- t = Math.max(0, Math.min(t, this.options.count - 1));
541
- const s = this.getSize(), i = this.getScrollOffset(), n = this.measurementsCache[t];
542
- if (!n) return;
543
- if (e === "auto")
544
- if (n.end >= i + s - this.options.scrollPaddingEnd) e = "end";
545
- else if (n.start <= i + this.options.scrollPaddingStart) e = "start";
546
- else return [i, e];
547
- if (e === "end" && t === this.options.count - 1) return [this.getMaxScrollOffset(), e];
548
- const o = e === "end" ? n.end + this.options.scrollPaddingEnd : n.start - this.options.scrollPaddingStart;
549
- return [this.getOffsetForAlignment(o, e, n.size), e];
550
- }, this.scrollToOffset = (t, { align: e = "start", behavior: s = "auto" } = {}) => {
551
- this._iosDeferredAdjustment = 0;
552
- const i = this.getOffsetForAlignment(t, e), n = this.now();
553
- this.scrollState = {
554
- index: null,
555
- align: e,
556
- behavior: s,
557
- startedAt: n,
558
- lastTargetOffset: i,
559
- stableFrames: 0
560
- }, this._scrollToOffset(i, {
561
- adjustments: void 0,
562
- behavior: s
563
- }), this.scheduleScrollReconcile();
564
- }, this.scrollToIndex = (t, { align: e = "auto", behavior: s = "auto" } = {}) => {
565
- this._iosDeferredAdjustment = 0, t = Math.max(0, Math.min(t, this.options.count - 1));
566
- const i = this.getOffsetForIndex(t, e);
567
- if (!i) return;
568
- const [n, o] = i, h = this.now();
569
- this.scrollState = {
570
- index: t,
571
- align: o,
572
- behavior: s,
573
- startedAt: h,
574
- lastTargetOffset: n,
575
- stableFrames: 0
576
- }, this._scrollToOffset(n, {
577
- adjustments: void 0,
578
- behavior: s
579
- }), this.scheduleScrollReconcile();
580
- }, this.scrollBy = (t, { behavior: e = "auto" } = {}) => {
581
- const s = this.getScrollOffset() + t, i = this.now();
582
- this.scrollState = {
583
- index: null,
584
- align: "start",
585
- behavior: e,
586
- startedAt: i,
587
- lastTargetOffset: s,
588
- stableFrames: 0
589
- }, this._scrollToOffset(s, {
590
- adjustments: void 0,
591
- behavior: e
592
- }), this.scheduleScrollReconcile();
593
- }, this.scrollToEnd = ({ behavior: t = "auto" } = {}) => {
594
- if (this.options.count > 0) {
595
- this.scrollToIndex(this.options.count - 1, {
596
- align: "end",
597
- behavior: t
598
- });
599
- return;
600
- }
601
- this.scrollToOffset(Math.max(this.getTotalSize() - this.getSize(), 0), { behavior: t });
602
- }, this.getTotalSize = () => {
603
- var t;
604
- const e = this.getMeasurements();
605
- let s;
606
- if (e.length === 0) s = this.options.paddingStart;
607
- else if (this.options.lanes === 1) {
608
- const i = e.length - 1, n = this._flatMeasurements;
609
- n != null ? s = n[i * 2] + n[i * 2 + 1] : s = ((t = e[i]) == null ? void 0 : t.end) ?? 0;
610
- } else {
611
- const i = Array(this.options.lanes).fill(null);
612
- let n = e.length - 1;
613
- for (; n >= 0 && i.some((o) => o === null); ) {
614
- const o = e[n];
615
- i[o.lane] === null && (i[o.lane] = o.end), n--;
616
- }
617
- s = Math.max(...i.filter((o) => o !== null));
618
- }
619
- return Math.max(s - this.options.scrollMargin + this.options.paddingEnd, 0);
620
- }, this.takeSnapshot = () => {
621
- const t = [];
622
- if (this.itemSizeCache.size === 0) return t;
623
- const e = this.getMeasurements();
624
- for (const s of e) s && this.itemSizeCache.has(s.key) && t.push({
625
- index: s.index,
626
- key: s.key,
627
- start: s.start,
628
- size: s.size,
629
- end: s.end,
630
- lane: s.lane
631
- });
632
- return t;
633
- }, this._scrollToOffset = (t, { adjustments: e, behavior: s }) => {
634
- this._intendedScrollOffset = t + (e ?? 0), this.options.scrollToFn(t, {
635
- behavior: s,
636
- adjustments: e
637
- }, this);
638
- }, this.measure = () => {
639
- this.pendingMin = null, this.itemSizeCache.clear(), this.laneAssignments.clear(), this.itemSizeCacheVersion++, this.notify(!1);
640
- }, this.setOptions(l);
641
- }
642
- applyScrollAdjustment(l, t) {
643
- return l === 0 ? !1 : (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", l), D() && (this.isScrolling || this._iosTouching || this._iosJustTouchEnded) ? (this._iosDeferredAdjustment += l, !1) : (this._scrollToOffset(this.getScrollOffset(), {
644
- adjustments: this.scrollAdjustments += l,
645
- behavior: t
646
- }), this.scrollOffset !== null && (this.scrollOffset += this.scrollAdjustments, this.scrollOffset < 0 && (this.scrollOffset = 0), this.scrollAdjustments = 0), !0));
647
- }
648
- scheduleScrollReconcile() {
649
- if (!this.targetWindow) {
650
- this.scrollState = null;
651
- return;
652
- }
653
- this.rafId == null && (this.rafId = this.targetWindow.requestAnimationFrame(() => {
654
- this.rafId = null, this.reconcileScroll();
655
- }));
656
- }
657
- reconcileScroll() {
658
- if (!this.scrollState || !this.scrollElement) return;
659
- if (this.now() - this.scrollState.startedAt > 5e3) {
660
- this.scrollState = null;
661
- return;
662
- }
663
- const l = this.scrollState.index != null ? this.getOffsetForIndex(this.scrollState.index, this.scrollState.align) : void 0, t = l ? l[0] : this.scrollState.lastTargetOffset, e = 1, s = t !== this.scrollState.lastTargetOffset;
664
- if (!s && Q(t, this.getScrollOffset())) {
665
- if (this.scrollState.stableFrames++, this.scrollState.stableFrames >= e) {
666
- this.getScrollOffset() !== t && this._scrollToOffset(t, {
667
- adjustments: void 0,
668
- behavior: "auto"
669
- }), this.scrollState = null;
670
- return;
671
- }
672
- } else if (this.scrollState.stableFrames = 0, s) {
673
- const i = this.getSize() || 600, n = Math.abs(t - this.getScrollOffset()), o = this.scrollState.behavior === "smooth" && n > i;
674
- this.scrollState.lastTargetOffset = t, o || (this.scrollState.behavior = "auto"), this._scrollToOffset(t, {
675
- adjustments: void 0,
676
- behavior: o ? "smooth" : "auto"
677
- });
678
- }
679
- this.scheduleScrollReconcile();
680
- }
681
- }, P = (l, t, e, s) => {
682
- for (; l <= t; ) {
683
- const i = (l + t) / 2 | 0, n = e(i);
684
- if (n < s) l = i + 1;
685
- else if (n > s) t = i - 1;
686
- else return i;
687
- }
688
- return l > 0 ? l - 1 : 0;
689
- };
690
- function at(l, t, e) {
691
- let s = 0;
692
- for (; s <= t; ) {
693
- const i = (s + t) / 2 | 0, n = l[i * 2];
694
- if (n < e) s = i + 1;
695
- else if (n > e) t = i - 1;
696
- else return i;
697
- }
698
- return s > 0 ? s - 1 : 0;
699
- }
700
- function ht(l, t, e, s, i) {
701
- const n = l.length - 1;
702
- if (l.length <= s) return {
703
- startIndex: 0,
704
- endIndex: n
705
- };
706
- if (s === 1 && i !== null) {
707
- const d = at(i, n, e);
708
- let c = d;
709
- const r = e + t;
710
- for (; c < n && i[c * 2] + i[c * 2 + 1] < r; ) c++;
711
- return {
712
- startIndex: d,
713
- endIndex: c
714
- };
715
- }
716
- let h = P(0, n, (d) => l[d].start, e), a = h;
717
- if (s === 1) for (; a < n && l[a].end < e + t; ) a++;
718
- else if (s > 1) {
719
- const d = Array(s).fill(0);
720
- for (; a < n && d.some((r) => r < e + t); ) {
721
- const r = l[a];
722
- d[r.lane] = r.end, a++;
723
- }
724
- const c = Array(s).fill(e + t);
725
- for (; h >= 0 && c.some((r) => r >= e); ) {
726
- const r = l[h];
727
- c[r.lane] = r.start, h--;
728
- }
729
- h = Math.max(0, h - h % s), a = Math.min(n, a + (s - 1 - a % s));
730
- }
731
- return {
732
- startIndex: h,
733
- endIndex: a
734
- };
735
- }
736
- var F = typeof document < "u" ? M.useLayoutEffect : M.useEffect;
737
- function ct({ useFlushSync: l = !0, directDomUpdates: t = !1, directDomUpdatesMode: e = "transform", ...s }) {
738
- const i = M.useReducer((c) => c + 1, 0)[1], n = M.useRef({
739
- enabled: t,
740
- mode: e,
741
- container: null,
742
- lastSize: null,
743
- lastPositions: /* @__PURE__ */ new WeakMap(),
744
- prevRange: null
745
- });
746
- n.current.enabled = t, n.current.mode = e;
747
- const o = (c) => {
748
- const r = n.current;
749
- if (!r.enabled || !r.container) return;
750
- const f = c.getTotalSize();
751
- if (f !== r.lastSize) {
752
- r.lastSize = f;
753
- const m = c.options.horizontal ? "width" : "height";
754
- r.container.style[m] = `${f}px`;
755
- }
756
- }, h = (c) => {
757
- const r = n.current;
758
- if (!r.enabled || !r.container) return;
759
- o(c);
760
- const f = !!c.options.horizontal, m = r.mode === "transform", S = f ? "left" : "top", p = c.options.scrollMargin, u = c.getVirtualItems();
761
- for (const g of u) {
762
- const E = g.start - p, v = c.elementsCache.get(g.key);
763
- v && r.lastPositions.get(v) !== E && (r.lastPositions.set(v, E), m ? v.style.transform = f ? `translate3d(${E}px, 0, 0)` : `translate3d(0, ${E}px, 0)` : v.style[S] = `${E}px`);
764
- }
765
- }, a = {
766
- ...s,
767
- onChange: (c, r) => {
768
- var f;
769
- const m = n.current;
770
- let S = !0;
771
- if (m.enabled) {
772
- h(c);
773
- const p = c.range, u = m.prevRange;
774
- S = !u || u.isScrolling !== c.isScrolling || u.startIndex !== p?.startIndex || u.endIndex !== p?.endIndex, S && (m.prevRange = p ? {
775
- startIndex: p.startIndex,
776
- endIndex: p.endIndex,
777
- isScrolling: c.isScrolling
778
- } : null);
779
- }
780
- S && (l && r ? q(i) : i()), (f = s.onChange) == null || f.call(s, c, r);
781
- }
782
- }, [d] = M.useState(() => {
783
- const c = new rt(a);
784
- return Object.assign(c, { containerRef: (r) => {
785
- const f = n.current;
786
- if (f.container = r, f.lastSize = null, r && f.enabled) {
787
- const m = c.getTotalSize();
788
- f.lastSize = m;
789
- const S = c.options.horizontal ? "width" : "height";
790
- r.style[S] = `${m}px`;
791
- }
792
- } });
793
- });
794
- return d.setOptions(a), F(() => d._didMount(), []), F(() => (o(d), d._willUpdate())), F(() => {
795
- h(d);
796
- }), d;
797
- }
798
- function ut(l) {
799
- return ct({
800
- observeElementRect: tt,
801
- observeElementOffset: it,
802
- scrollToFn: lt,
803
- ...l
804
- });
805
- }
806
- var bt = ({ showFlagOnSearch: l, showNameOnSearch: t }) => {
807
- const e = J(null), { termOfSearch: s, countries: i, handleSelectCountry: n } = K(), o = H(() => i.filter((a) => a.name.toLocaleLowerCase().includes(s.toLowerCase())), [s]), h = ut({
808
- count: o.length,
809
- overscan: 5,
810
- getScrollElement: () => e.current,
811
- estimateSize: () => 40
812
- });
813
- return B(() => {
814
- o.length > 0 && h.scrollToIndex(0);
815
- }, [s, h]), o.length === 0 ? /* @__PURE__ */ x("div", {
816
- className: "overflow-y-auto max-h-60 snap-y snap-mandatory",
817
- children: /* @__PURE__ */ x("ul", {
818
- className: "relative",
819
- children: /* @__PURE__ */ x("li", {
820
- className: "w-full flex items-center h-10 select-none px-6",
821
- children: /* @__PURE__ */ x(L, {
822
- variant: "body2",
823
- component: "span",
824
- className: "flex gap-2 items-center text-left",
825
- children: "No options"
826
- })
827
- })
828
- })
829
- }) : /* @__PURE__ */ x("div", {
830
- ref: e,
831
- className: "overflow-y-auto max-h-60 snap-y snap-mandatory scrollbar",
832
- children: /* @__PURE__ */ x("ul", {
833
- className: "relative",
834
- style: { height: h.getTotalSize() },
835
- children: h.getVirtualItems().map((a) => {
836
- const d = o[a.index], { flag: c, name: r, prefix: f } = d;
837
- return /* @__PURE__ */ x("li", {
838
- className: N("absolute", "w-full", "snap-start", "snap-always", "scroll-m-0", "flex", "items-center", "h-10"),
839
- style: {
840
- top: a.start,
841
- height: a.size
842
- },
843
- children: /* @__PURE__ */ x("button", {
844
- className: N("w-full", "h-full", "cursor-pointer", "px-6", "hover:bg-gray-50", "transition-colors", "duration-150", "focus-visible:outline-0", "hover:outline-gray-100", "focus:bg-gray-50", "dark:hover:bg-metal-700"),
845
- onClick: () => n(d),
846
- children: /* @__PURE__ */ U(L, {
847
- variant: "body2",
848
- component: "span",
849
- className: "flex gap-2 items-center text-left",
850
- children: [l && /* @__PURE__ */ x(c, {}), t && /* @__PURE__ */ x($, {
851
- text: r,
852
- prefix: f
853
- })]
854
- })
855
- })
856
- }, a.key);
857
- })
858
- })
859
- });
860
- };
861
- export {
862
- bt as t
863
- };