@konstructio/ui 0.1.2-alpha.77 → 0.1.2-alpha.78

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 (329) hide show
  1. package/dist/AdditionalOptions-C2FDVZhu.js +45 -0
  2. package/dist/Modal-DAWdufZ_.js +120 -0
  3. package/dist/assets/icons/components/Accounts.js +35 -23
  4. package/dist/assets/icons/components/AddChart.js +26 -20
  5. package/dist/assets/icons/components/AlertOutline.js +26 -20
  6. package/dist/assets/icons/components/AppRepo.js +26 -20
  7. package/dist/assets/icons/components/Apps.js +26 -20
  8. package/dist/assets/icons/components/Archives.js +26 -20
  9. package/dist/assets/icons/components/ArrowDown.js +26 -20
  10. package/dist/assets/icons/components/ArrowLeft.js +26 -20
  11. package/dist/assets/icons/components/ArrowRight.js +26 -20
  12. package/dist/assets/icons/components/ArrowUp.js +25 -19
  13. package/dist/assets/icons/components/BarChart.js +36 -24
  14. package/dist/assets/icons/components/BookOpen.js +30 -20
  15. package/dist/assets/icons/components/CalendarMonth.js +26 -20
  16. package/dist/assets/icons/components/Check.js +26 -20
  17. package/dist/assets/icons/components/CheckCircleFilled.js +29 -25
  18. package/dist/assets/icons/components/CheckCircleOutline.js +26 -20
  19. package/dist/assets/icons/components/CheckboxMarkedCircleOutline.js +24 -20
  20. package/dist/assets/icons/components/ClockAlert.js +26 -20
  21. package/dist/assets/icons/components/ClockOutline.js +26 -20
  22. package/dist/assets/icons/components/Close.js +26 -20
  23. package/dist/assets/icons/components/Cloud.js +20 -20
  24. package/dist/assets/icons/components/CloudLockOutline.js +26 -20
  25. package/dist/assets/icons/components/Clusters.js +42 -24
  26. package/dist/assets/icons/components/CogOutline.js +26 -20
  27. package/dist/assets/icons/components/Copy.js +26 -20
  28. package/dist/assets/icons/components/Cpu.js +39 -23
  29. package/dist/assets/icons/components/Cube.js +26 -20
  30. package/dist/assets/icons/components/Datacenter.js +26 -20
  31. package/dist/assets/icons/components/Delete.js +26 -20
  32. package/dist/assets/icons/components/DollarSign.js +28 -20
  33. package/dist/assets/icons/components/Download.js +26 -20
  34. package/dist/assets/icons/components/Edit.js +26 -20
  35. package/dist/assets/icons/components/Ellipses.js +26 -20
  36. package/dist/assets/icons/components/Environments.js +28 -20
  37. package/dist/assets/icons/components/Error.js +26 -20
  38. package/dist/assets/icons/components/ErrorOutline.js +26 -20
  39. package/dist/assets/icons/components/Exclamation.js +26 -20
  40. package/dist/assets/icons/components/Git.js +26 -20
  41. package/dist/assets/icons/components/GitOpsCatalog.js +39 -23
  42. package/dist/assets/icons/components/GridView.js +20 -20
  43. package/dist/assets/icons/components/Help.js +23 -25
  44. package/dist/assets/icons/components/HideOutline.js +35 -23
  45. package/dist/assets/icons/components/Home.js +26 -20
  46. package/dist/assets/icons/components/Home2.js +26 -20
  47. package/dist/assets/icons/components/Id.js +25 -19
  48. package/dist/assets/icons/components/InfoCircle.js +29 -25
  49. package/dist/assets/icons/components/InformationOutline.js +26 -20
  50. package/dist/assets/icons/components/InvoiceList.js +26 -20
  51. package/dist/assets/icons/components/Key.js +26 -20
  52. package/dist/assets/icons/components/LightBulb.js +41 -23
  53. package/dist/assets/icons/components/Loader.js +26 -20
  54. package/dist/assets/icons/components/Network.js +26 -20
  55. package/dist/assets/icons/components/PagesStack.js +23 -25
  56. package/dist/assets/icons/components/Pageview.js +26 -20
  57. package/dist/assets/icons/components/People.js +26 -20
  58. package/dist/assets/icons/components/PhotoLibrary.js +25 -19
  59. package/dist/assets/icons/components/Pipeline.js +28 -20
  60. package/dist/assets/icons/components/Plus.js +26 -20
  61. package/dist/assets/icons/components/PowerSettings.js +26 -20
  62. package/dist/assets/icons/components/Preview.js +26 -20
  63. package/dist/assets/icons/components/ReceiptLong.js +20 -20
  64. package/dist/assets/icons/components/Refresh.js +26 -20
  65. package/dist/assets/icons/components/ScatterPlot.js +20 -20
  66. package/dist/assets/icons/components/Search.js +30 -25
  67. package/dist/assets/icons/components/Server.js +26 -20
  68. package/dist/assets/icons/components/Start.js +26 -20
  69. package/dist/assets/icons/components/TabNew.js +48 -24
  70. package/dist/assets/icons/components/Teams.js +26 -20
  71. package/dist/assets/icons/components/Upload.js +25 -19
  72. package/dist/assets/icons/components/Warning.js +26 -20
  73. package/dist/assets/icons/components/WarningTriangle.js +26 -20
  74. package/dist/assets/icons/components/X.js +26 -20
  75. package/dist/components/Alert/Alert.js +61 -78
  76. package/dist/components/Alert/Alert.variants.js +85 -30
  77. package/dist/components/AlertDialog/AlertDialog.js +128 -102
  78. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +2 -3
  79. package/dist/components/AlertDialog/components/index.js +1 -1
  80. package/dist/components/AlertDialog/hooks/useAlertDialog.js +7 -25
  81. package/dist/components/Autocomplete/Autocomplete.js +83 -55
  82. package/dist/components/Autocomplete/Autocomplete.variants.js +21 -1
  83. package/dist/components/Autocomplete/components/List/List.js +45 -48
  84. package/dist/components/Autocomplete/components/List/List.variants.js +29 -1
  85. package/dist/components/Autocomplete/hooks/useAutocomplete.js +58 -74
  86. package/dist/components/Autocomplete/hooks/useNavigationList.js +62 -68
  87. package/dist/components/Badge/Badge.js +77 -66
  88. package/dist/components/Badge/Badge.variants.js +96 -33
  89. package/dist/components/Breadcrumb/Breadcrumb.js +70 -78
  90. package/dist/components/Breadcrumb/Breadcrumb.variants.js +7 -1
  91. package/dist/components/Breadcrumb/components/Item/Item.js +47 -33
  92. package/dist/components/Breadcrumb/components/Item/Item.variants.js +63 -26
  93. package/dist/components/Button/Button.js +40 -37
  94. package/dist/components/Button/Button.variants.js +292 -96
  95. package/dist/components/ButtonGroup/ButtonGroup.js +138 -101
  96. package/dist/components/ButtonGroup/ButtonGroup.variants.js +31 -9
  97. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +113 -105
  98. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +94 -48
  99. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +43 -26
  100. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +35 -28
  101. package/dist/components/ButtonGroup/hooks/useButtonGroup.js +61 -63
  102. package/dist/components/Card/Card.js +35 -35
  103. package/dist/components/Card/Card.variants.js +37 -25
  104. package/dist/components/Checkbox/Checkbox.js +268 -247
  105. package/dist/components/Checkbox/Checkbox.variants.js +65 -18
  106. package/dist/components/Command/Command.js +38 -46
  107. package/dist/components/Command/Command.variants.js +44 -1
  108. package/dist/components/Command/components/Command.js +6 -19
  109. package/dist/components/Command/components/CommandEmpty.js +13 -11
  110. package/dist/components/Command/components/CommandGroup.js +17 -19
  111. package/dist/components/Command/components/CommandInput.js +52 -60
  112. package/dist/components/Command/components/CommandItem.js +26 -28
  113. package/dist/components/Command/components/CommandList.js +14 -19
  114. package/dist/components/Command/components/CommandSeparator.js +14 -19
  115. package/dist/components/Command/components/CommandShortcut.js +16 -16
  116. package/dist/components/Command/components/DialogContent.js +29 -35
  117. package/dist/components/Command/components/DialogOverlay.js +16 -18
  118. package/dist/components/Command/contexts/Command.provider.js +21 -23
  119. package/dist/components/Counter/Counter.js +154 -151
  120. package/dist/components/Counter/Counter.variants.js +53 -6
  121. package/dist/components/DateRangePicker/DateRangePicker.js +162 -93
  122. package/dist/components/DateRangePicker/DateRangePicker.variants.js +20 -1
  123. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +115 -81
  124. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.variants.js +45 -1
  125. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +20 -14
  126. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +57 -50
  127. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +250 -55
  128. package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +37 -33
  129. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +94 -29
  130. package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +126 -10
  131. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +113 -138
  132. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +16 -2
  133. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +102 -68
  134. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.js +22 -1
  135. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +90 -55
  136. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +90 -55
  137. package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +177 -204
  138. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +63 -58
  139. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.js +19 -1
  140. package/dist/components/DateRangePicker/constants/presets.js +7 -16
  141. package/dist/components/DateRangePicker/contexts/date-range-picker.hook.js +3 -1
  142. package/dist/components/DateRangePicker/contexts/date-range-picker.provider.js +171 -187
  143. package/dist/components/DateRangePicker/utils/disabled-dates.js +22 -16
  144. package/dist/components/DateRangePicker/utils/validation.js +17 -2
  145. package/dist/components/Datepicker/DatePicker.js +135 -80
  146. package/dist/components/Divider/Divider.js +7 -18
  147. package/dist/components/Drawer/Drawer.js +130 -108
  148. package/dist/components/Drawer/Drawer.variants.js +81 -17
  149. package/dist/components/Drawer/components/Body/Body.js +21 -18
  150. package/dist/components/Drawer/components/Footer/Footer.js +23 -18
  151. package/dist/components/Drawer/components/Header/Header.js +24 -20
  152. package/dist/components/Drawer/contexts/Drawer.context.js +2 -2
  153. package/dist/components/Drawer/hooks/useDrawer.js +57 -81
  154. package/dist/components/DropdownButton/DropdownButton.js +114 -99
  155. package/dist/components/Filter/Filter.js +29 -40
  156. package/dist/components/Filter/Filter.variants.js +17 -1
  157. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +94 -128
  158. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +144 -83
  159. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +81 -87
  160. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +120 -66
  161. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +34 -22
  162. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +117 -74
  163. package/dist/components/Filter/components/ResetButton/ResetButton.js +29 -24
  164. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +135 -83
  165. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +69 -83
  166. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +151 -80
  167. package/dist/components/Filter/contexts/filter.provider.js +4 -16
  168. package/dist/components/Filter/events/index.js +3 -3
  169. package/dist/components/ImageUpload/ImageUpload.js +150 -48
  170. package/dist/components/ImageUpload/ImageUpload.variants.js +93 -41
  171. package/dist/components/Input/Input.js +168 -43
  172. package/dist/components/Input/Input.variants.js +51 -9
  173. package/dist/components/LineChart/LineChart.js +120 -83
  174. package/dist/components/Loading/Loading.js +18 -22
  175. package/dist/components/Loading/Loading.variants.js +8 -1
  176. package/dist/components/Modal/Modal.js +2 -3
  177. package/dist/components/Modal/components/Body/Body.js +5 -16
  178. package/dist/components/Modal/components/Footer/Footer.js +11 -16
  179. package/dist/components/Modal/components/Header/Header.js +11 -16
  180. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -4
  181. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +28 -1
  182. package/dist/components/Modal/components/index.js +1 -1
  183. package/dist/components/Modal/contexts/Modal.context.js +3 -1
  184. package/dist/components/Modal/contexts/Modal.provider.js +23 -33
  185. package/dist/components/Modal/hooks/useModal.js +18 -29
  186. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +32 -26
  187. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +25 -1
  188. package/dist/components/MultiSelectDropdown/components/Item/Item.js +27 -32
  189. package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +32 -13
  190. package/dist/components/MultiSelectDropdown/components/List/List.js +27 -26
  191. package/dist/components/MultiSelectDropdown/components/List/List.variants.js +21 -1
  192. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +123 -73
  193. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +3 -1
  194. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +131 -128
  195. package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +26 -30
  196. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +6 -19
  197. package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +39 -9
  198. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +33 -28
  199. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +79 -21
  200. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +41 -7
  201. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +36 -47
  202. package/dist/components/PhoneNumberInput/components/Wrapper.js +503 -465
  203. package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +3 -1
  204. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1135 -1163
  205. package/dist/components/PieChart/PieChart.js +72 -82
  206. package/dist/components/ProgressBar/ProgressBar.js +38 -47
  207. package/dist/components/ProgressBar/ProgressBar.variants.js +28 -11
  208. package/dist/components/Radio/Radio.js +95 -71
  209. package/dist/components/Radio/Radio.variants.js +85 -33
  210. package/dist/components/RadioCard/RadioCard.js +36 -32
  211. package/dist/components/RadioCardGroup/RadioCardGroup.js +43 -42
  212. package/dist/components/RadioGroup/RadioGroup.js +48 -48
  213. package/dist/components/Range/Range.js +61 -83
  214. package/dist/components/Range/Range.variants.js +49 -19
  215. package/dist/components/Select/Select.js +65 -52
  216. package/dist/components/Select/Select.variants.js +66 -13
  217. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +2 -3
  218. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +22 -1
  219. package/dist/components/Select/components/EmptyList.js +3 -8
  220. package/dist/components/Select/components/List/List.js +168 -89
  221. package/dist/components/Select/components/List/List.variants.js +41 -1
  222. package/dist/components/Select/components/ListItem/ListItem.js +96 -41
  223. package/dist/components/Select/components/ListItem/ListItem.variants.js +19 -1
  224. package/dist/components/Select/components/Wrapper.js +233 -110
  225. package/dist/components/Select/components/index.js +1 -1
  226. package/dist/components/Select/contexts/select.provider.js +41 -34
  227. package/dist/components/Select/hooks/useNavigationList.js +44 -50
  228. package/dist/components/Select/hooks/useSelect.js +94 -104
  229. package/dist/components/Sidebar/Sidebar.js +21 -26
  230. package/dist/components/Sidebar/Sidebar.variants.js +27 -1
  231. package/dist/components/Sidebar/components/Footer/Footer.js +6 -18
  232. package/dist/components/Sidebar/components/Footer/Footer.variants.js +8 -1
  233. package/dist/components/Sidebar/components/Logo/Logo.js +6 -18
  234. package/dist/components/Sidebar/components/Logo/Logo.variants.js +19 -1
  235. package/dist/components/Sidebar/components/Navigation/Navigation.js +17 -26
  236. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +24 -33
  237. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +24 -24
  238. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +39 -12
  239. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +6 -17
  240. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +5 -1
  241. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +5 -20
  242. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +10 -1
  243. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +60 -21
  244. package/dist/components/Slider/Slider.js +56 -70
  245. package/dist/components/Slider/Slider.variants.js +41 -19
  246. package/dist/components/Spinner/Spinner.js +55 -56
  247. package/dist/components/Spinner/Spinner.variants.js +45 -19
  248. package/dist/components/Stepper/Stepper.js +72 -56
  249. package/dist/components/Stepper/Stepper.variants.js +188 -132
  250. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +197 -151
  251. package/dist/components/Stepper/components/StepConnector/StepConnector.js +27 -24
  252. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +20 -39
  253. package/dist/components/Stepper/components/StepItem/StepItem.js +6 -15
  254. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +111 -93
  255. package/dist/components/Stepper/hooks/useStepItemLogic.js +6 -3
  256. package/dist/components/Switch/Switch.js +178 -135
  257. package/dist/components/Switch/Switch.variants.js +40 -1
  258. package/dist/components/Table/Table.js +25 -29
  259. package/dist/components/Table/Table.variants.js +30 -6
  260. package/dist/components/Table/components/Body.js +16 -20
  261. package/dist/components/Table/components/Filter.js +7 -21
  262. package/dist/components/Table/components/Head.js +16 -20
  263. package/dist/components/Table/components/Row.js +26 -28
  264. package/dist/components/Tabs/Tabs.js +26 -34
  265. package/dist/components/Tabs/Tabs.variants.js +39 -10
  266. package/dist/components/Tabs/components/Content.js +14 -23
  267. package/dist/components/Tabs/components/List.js +19 -28
  268. package/dist/components/Tabs/components/Trigger.js +21 -25
  269. package/dist/components/Tag/Tag.js +17 -33
  270. package/dist/components/Tag/Tag.variants.js +36 -23
  271. package/dist/components/TagSelect/TagSelect.js +8 -19
  272. package/dist/components/TagSelect/TagSelect.variants.js +22 -1
  273. package/dist/components/TagSelect/components/Item/Item.js +18 -24
  274. package/dist/components/TagSelect/components/Item/Item.variants.js +26 -13
  275. package/dist/components/TagSelect/components/List/List.js +9 -22
  276. package/dist/components/TagSelect/components/List/List.variants.js +19 -1
  277. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +84 -68
  278. package/dist/components/TagSelect/contexts/TagSelect.provider.js +65 -75
  279. package/dist/components/TagSelect/hooks/useTagSelect.js +26 -30
  280. package/dist/components/TextArea/TextArea.js +34 -35
  281. package/dist/components/TextArea/TextArea.variants.js +16 -1
  282. package/dist/components/TimePicker/TimePicker.js +11 -21
  283. package/dist/components/TimePicker/TimePicker.variants.js +64 -1
  284. package/dist/components/TimePicker/components/HoursList/HoursList.js +116 -77
  285. package/dist/components/TimePicker/components/MeridianList/MeridianList.js +88 -79
  286. package/dist/components/TimePicker/components/MinutesList/MinutesList.js +89 -66
  287. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +228 -144
  288. package/dist/components/TimePicker/components/WrapperList/WrapperList.js +75 -44
  289. package/dist/components/TimePicker/contexts/time-picker.hook.js +3 -1
  290. package/dist/components/TimePicker/contexts/time-picker.provider.js +58 -76
  291. package/dist/components/Toast/Toast.js +338 -374
  292. package/dist/components/Toast/Toast.variants.js +43 -10
  293. package/dist/components/Tooltip/Tooltip.js +35 -36
  294. package/dist/components/Typography/Typography.js +23 -26
  295. package/dist/components/Typography/Typography.variants.js +59 -24
  296. package/dist/components/VirtualizedTable/VirtualizedTable.js +91 -9
  297. package/dist/components/VirtualizedTable/assets/chevron-down.js +23 -13
  298. package/dist/components/VirtualizedTable/assets/chevron-up.js +22 -12
  299. package/dist/components/VirtualizedTable/components/Actions/Actions.js +115 -62
  300. package/dist/components/VirtualizedTable/components/Body/Body.js +83 -29
  301. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +165 -104
  302. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +19 -13
  303. package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +49 -43
  304. package/dist/components/VirtualizedTable/components/Filter/Filter.js +174 -116
  305. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +57 -32
  306. package/dist/components/VirtualizedTable/components/Header/Header.js +98 -61
  307. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +63 -65
  308. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +102 -32
  309. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +58 -51
  310. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +24 -20
  311. package/dist/components/VirtualizedTable/contexts/table.provider.js +158 -129
  312. package/dist/components/VirtualizedTable/events/index.js +18 -18
  313. package/dist/components/index.js +1 -1
  314. package/dist/contexts/theme.provider.js +49 -61
  315. package/dist/hooks/useToggle.js +8 -10
  316. package/dist/index-C7zAY3xv.js +139 -0
  317. package/dist/{index-kTGTSLpq.js → index-Cmf-IG4l.js} +1 -1
  318. package/dist/{index-Dy4FVowi.js → index-CrCTywU1.js} +1 -1
  319. package/dist/{index-C6mt--X_.js → index-DWyM654o.js} +5 -5
  320. package/dist/{index-B9v5VxE2.js → index-Jr0cra7i.js} +6 -6
  321. package/dist/{index-CiACf4ao.js → index-mPinF0Ho.js} +3 -3
  322. package/dist/index.js +1 -1
  323. package/dist/package.json +1 -2
  324. package/dist/utils/index.js +3 -1
  325. package/package.json +1 -2
  326. package/dist/AdditionalOptions-DiXvUzhu.js +0 -42
  327. package/dist/Modal-h5H4yxYg.js +0 -128
  328. package/dist/compiler-runtime-DA41awpA.js +0 -36
  329. package/dist/index-0g-eSmV1.js +0 -142
@@ -1,614 +1,652 @@
1
1
  import "./FlagSelectorList/FlagSelectorList.js";
2
- import { jsx as H, jsxs as se } from "react/jsx-runtime";
3
- import { c as $e } from "../../../compiler-runtime-DA41awpA.js";
4
- import { i as ze } from "../../../index-BmVmDQGH.js";
5
- import { useRef as ge, useMemo as He, forwardRef as We, useId as Ze, useImperativeHandle as Je, useEffect as Pe } from "react";
6
- import { Typography as he } from "../../Typography/Typography.js";
7
- import { cn as ve } from "../../../utils/index.js";
8
- import { labelVariants as Ye, phoneNumberInputVariants as Qe } from "../PhoneNumberInput.variants.js";
9
- import { usePhoneNumberContext as qe } from "../contexts/phone-number.hook.js";
10
- import { getPhoneMask as Xe } from "../utils/index.js";
11
- import { FlagContent as et } from "./FlagContent/FlagContent.js";
12
- import { FlagSelectorWrapper as tt } from "./FlagSelectorWrapper/FlagSelectorWrapper.js";
13
- function Me(t, n) {
14
- (n == null || n > t.length) && (n = t.length);
15
- for (var e = 0, r = Array(n); e < n; e++) r[e] = t[e];
2
+ import { jsxs as Z, jsx as B } from "react/jsx-runtime";
3
+ import { i as Ae } from "../../../index-BmVmDQGH.js";
4
+ import { useRef as ne, useMemo as Ne, forwardRef as Be, useId as Re, useImperativeHandle as Ge, useCallback as Le, useEffect as pe } from "react";
5
+ import { Typography as X } from "../../Typography/Typography.js";
6
+ import { cn as ee } from "../../../utils/index.js";
7
+ import { labelVariants as Ve, phoneNumberInputVariants as xe } from "../PhoneNumberInput.variants.js";
8
+ import { usePhoneNumberContext as Ke } from "../contexts/phone-number.hook.js";
9
+ import { getPhoneMask as De } from "../utils/index.js";
10
+ import { FlagContent as Fe } from "./FlagContent/FlagContent.js";
11
+ import { FlagSelectorWrapper as Ue } from "./FlagSelectorWrapper/FlagSelectorWrapper.js";
12
+ function fe(e, t) {
13
+ (t == null || t > e.length) && (t = e.length);
14
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
16
15
  return r;
17
16
  }
18
- function nt(t, n, e) {
19
- return n = fe(n), (function(r, a) {
20
- if (a && (typeof a == "object" || typeof a == "function")) return a;
21
- if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
22
- return (function(o) {
23
- if (o === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
24
- return o;
17
+ function $e(e, t, n) {
18
+ return t = Y(t), (function(r, o) {
19
+ if (o && (typeof o == "object" || typeof o == "function")) return o;
20
+ if (o !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
21
+ return (function(a) {
22
+ if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
23
+ return a;
25
24
  })(r);
26
- })(t, Ge() ? Reflect.construct(n, e || [], fe(t).constructor) : n.apply(t, e));
25
+ })(e, we() ? Reflect.construct(t, n || [], Y(e).constructor) : t.apply(e, n));
27
26
  }
28
- function rt(t, n) {
29
- if (!(t instanceof n)) throw new TypeError("Cannot call a class as a function");
27
+ function ze(e, t) {
28
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
30
29
  }
31
- function at(t, n, e) {
32
- return Object.defineProperty(t, "prototype", { writable: !1 }), t;
30
+ function He(e, t, n) {
31
+ return Object.defineProperty(e, "prototype", { writable: !1 }), e;
33
32
  }
34
- function Re(t, n) {
35
- var e = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
36
- if (!e) {
37
- if (Array.isArray(t) || (e = (function(i, u) {
33
+ function Oe(e, t) {
34
+ var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
35
+ if (!n) {
36
+ if (Array.isArray(e) || (n = (function(i, c) {
38
37
  if (i) {
39
- if (typeof i == "string") return Me(i, u);
38
+ if (typeof i == "string") return fe(i, c);
40
39
  var s = {}.toString.call(i).slice(8, -1);
41
- return s === "Object" && i.constructor && (s = i.constructor.name), s === "Map" || s === "Set" ? Array.from(i) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? Me(i, u) : void 0;
40
+ return s === "Object" && i.constructor && (s = i.constructor.name), s === "Map" || s === "Set" ? Array.from(i) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? fe(i, c) : void 0;
42
41
  }
43
- })(t)) || n) {
44
- e && (t = e);
45
- var r = 0, a = function() {
42
+ })(e)) || t) {
43
+ n && (e = n);
44
+ var r = 0, o = function() {
46
45
  };
47
- return { s: a, n: function() {
48
- return r >= t.length ? { done: !0 } : { done: !1, value: t[r++] };
46
+ return { s: o, n: function() {
47
+ return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] };
49
48
  }, e: function(i) {
50
49
  throw i;
51
- }, f: a };
50
+ }, f: o };
52
51
  }
53
52
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
54
53
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
55
54
  }
56
- var o, l = !0, c = !1;
55
+ var a, l = !0, u = !1;
57
56
  return { s: function() {
58
- e = e.call(t);
57
+ n = n.call(e);
59
58
  }, n: function() {
60
- var i = e.next();
59
+ var i = n.next();
61
60
  return l = i.done, i;
62
61
  }, e: function(i) {
63
- c = !0, o = i;
62
+ u = !0, a = i;
64
63
  }, f: function() {
65
64
  try {
66
- l || e.return == null || e.return();
65
+ l || n.return == null || n.return();
67
66
  } finally {
68
- if (c) throw o;
67
+ if (u) throw a;
69
68
  }
70
69
  } };
71
70
  }
72
- function Be(t, n, e) {
73
- return (n = (function(r) {
74
- var a = (function(o, l) {
75
- if (typeof o != "object" || !o) return o;
76
- var c = o[Symbol.toPrimitive];
77
- if (c !== void 0) {
78
- var i = c.call(o, l);
71
+ function Se(e, t, n) {
72
+ return (t = (function(r) {
73
+ var o = (function(a, l) {
74
+ if (typeof a != "object" || !a) return a;
75
+ var u = a[Symbol.toPrimitive];
76
+ if (u !== void 0) {
77
+ var i = u.call(a, l);
79
78
  if (typeof i != "object") return i;
80
79
  throw new TypeError("@@toPrimitive must return a primitive value.");
81
80
  }
82
- return (l === "string" ? String : Number)(o);
81
+ return (l === "string" ? String : Number)(a);
83
82
  })(r, "string");
84
- return typeof a == "symbol" ? a : a + "";
85
- })(n)) in t ? Object.defineProperty(t, n, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = e, t;
83
+ return typeof o == "symbol" ? o : o + "";
84
+ })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
86
85
  }
87
- function fe(t) {
88
- return fe = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
89
- return n.__proto__ || Object.getPrototypeOf(n);
90
- }, fe(t);
86
+ function Y(e) {
87
+ return Y = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
88
+ return t.__proto__ || Object.getPrototypeOf(t);
89
+ }, Y(e);
91
90
  }
92
- function ot(t, n) {
93
- if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function");
94
- t.prototype = Object.create(n && n.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), n && be(t, n);
91
+ function _e(e, t) {
92
+ if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
93
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && re(e, t);
95
94
  }
96
- function Ge() {
95
+ function we() {
97
96
  try {
98
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {
97
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {
99
98
  })));
100
99
  } catch {
101
100
  }
102
- return (Ge = function() {
103
- return !!t;
101
+ return (we = function() {
102
+ return !!e;
104
103
  })();
105
104
  }
106
- function Ee(t, n) {
107
- var e = Object.keys(t);
105
+ function de(e, t) {
106
+ var n = Object.keys(e);
108
107
  if (Object.getOwnPropertySymbols) {
109
- var r = Object.getOwnPropertySymbols(t);
110
- n && (r = r.filter((function(a) {
111
- return Object.getOwnPropertyDescriptor(t, a).enumerable;
112
- }))), e.push.apply(e, r);
108
+ var r = Object.getOwnPropertySymbols(e);
109
+ t && (r = r.filter((function(o) {
110
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
111
+ }))), n.push.apply(n, r);
113
112
  }
114
- return e;
115
- }
116
- function pe(t) {
117
- for (var n = 1; n < arguments.length; n++) {
118
- var e = arguments[n] != null ? arguments[n] : {};
119
- n % 2 ? Ee(Object(e), !0).forEach((function(r) {
120
- Be(t, r, e[r]);
121
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : Ee(Object(e)).forEach((function(r) {
122
- Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(e, r));
113
+ return n;
114
+ }
115
+ function J(e) {
116
+ for (var t = 1; t < arguments.length; t++) {
117
+ var n = arguments[t] != null ? arguments[t] : {};
118
+ t % 2 ? de(Object(n), !0).forEach((function(r) {
119
+ Se(e, r, n[r]);
120
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : de(Object(n)).forEach((function(r) {
121
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
123
122
  }));
124
123
  }
125
- return t;
124
+ return e;
126
125
  }
127
- function it(t, n) {
128
- if (t == null) return {};
129
- var e, r, a = (function(l, c) {
126
+ function We(e, t) {
127
+ if (e == null) return {};
128
+ var n, r, o = (function(l, u) {
130
129
  if (l == null) return {};
131
130
  var i = {};
132
- for (var u in l) if ({}.hasOwnProperty.call(l, u)) {
133
- if (c.includes(u)) continue;
134
- i[u] = l[u];
131
+ for (var c in l) if ({}.hasOwnProperty.call(l, c)) {
132
+ if (u.includes(c)) continue;
133
+ i[c] = l[c];
135
134
  }
136
135
  return i;
137
- })(t, n);
136
+ })(e, t);
138
137
  if (Object.getOwnPropertySymbols) {
139
- var o = Object.getOwnPropertySymbols(t);
140
- for (r = 0; r < o.length; r++) e = o[r], n.includes(e) || {}.propertyIsEnumerable.call(t, e) && (a[e] = t[e]);
138
+ var a = Object.getOwnPropertySymbols(e);
139
+ for (r = 0; r < a.length; r++) n = a[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
141
140
  }
142
- return a;
141
+ return o;
143
142
  }
144
- function be(t, n) {
145
- return be = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, r) {
146
- return e.__proto__ = r, e;
147
- }, be(t, n);
143
+ function re(e, t) {
144
+ return re = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
145
+ return n.__proto__ = r, n;
146
+ }, re(e, t);
148
147
  }
149
- function re(t, n) {
150
- var e, r = n.replacementChars, a = n.replacement, o = n.separate, l = r, c = "", i = Re(t);
148
+ function U(e, t) {
149
+ var n, r = t.replacementChars, o = t.replacement, a = t.separate, l = r, u = "", i = Oe(e);
151
150
  try {
152
- for (i.s(); !(e = i.n()).done; ) {
153
- var u, s = e.value, p = !Object.prototype.hasOwnProperty.call(a, s) && ((u = a[l[0]]) === null || u === void 0 ? void 0 : u.test(s));
154
- (o && s === l[0] || p) && (l = l.slice(1), c += s);
151
+ for (i.s(); !(n = i.n()).done; ) {
152
+ var c, s = n.value, f = !Object.prototype.hasOwnProperty.call(o, s) && ((c = o[l[0]]) === null || c === void 0 ? void 0 : c.test(s));
153
+ (a && s === l[0] || f) && (l = l.slice(1), u += s);
155
154
  }
156
- } catch (y) {
157
- i.e(y);
155
+ } catch (S) {
156
+ i.e(S);
158
157
  } finally {
159
158
  i.f();
160
159
  }
161
- return c;
160
+ return u;
162
161
  }
163
- function xe(t, n) {
164
- var e, r = n.mask, a = n.replacement, o = n.separate, l = n.showMask, c = 0, i = "", u = Re(r);
162
+ function ke(e, t) {
163
+ var n, r = t.mask, o = t.replacement, a = t.separate, l = t.showMask, u = 0, i = "", c = Oe(r);
165
164
  try {
166
- for (u.s(); !(e = u.n()).done; ) {
167
- var s = e.value;
168
- if (!l && t[c] === void 0) break;
169
- Object.prototype.hasOwnProperty.call(a, s) && t[c] !== void 0 ? i += t[c++] : i += s;
165
+ for (c.s(); !(n = c.n()).done; ) {
166
+ var s = n.value;
167
+ if (!l && e[u] === void 0) break;
168
+ Object.prototype.hasOwnProperty.call(o, s) && e[u] !== void 0 ? i += e[u++] : i += s;
170
169
  }
171
- } catch (y) {
172
- u.e(y);
170
+ } catch (S) {
171
+ c.e(S);
173
172
  } finally {
174
- u.f();
173
+ c.f();
175
174
  }
176
- if (o && !l) {
177
- for (var p = r.length - 1; p >= 0 && i[p] === r[p]; p--) ;
178
- i = i.slice(0, p + 1);
175
+ if (a && !l) {
176
+ for (var f = r.length - 1; f >= 0 && i[f] === r[f]; f--) ;
177
+ i = i.slice(0, f + 1);
179
178
  }
180
179
  return i;
181
180
  }
182
- function Le(t, n) {
183
- for (var e = n.mask, r = n.replacement, a = [], o = 0; o < e.length; o++) {
184
- var l, c = (l = t[o]) !== null && l !== void 0 ? l : e[o], i = Object.prototype.hasOwnProperty.call(r, c) ? "replacement" : t[o] !== void 0 && t[o] !== e[o] ? "input" : "mask";
185
- a.push({ type: i, value: c, index: o });
181
+ function Pe(e, t) {
182
+ for (var n = t.mask, r = t.replacement, o = [], a = 0; a < n.length; a++) {
183
+ var l, u = (l = e[a]) !== null && l !== void 0 ? l : n[a], i = Object.prototype.hasOwnProperty.call(r, u) ? "replacement" : e[a] !== void 0 && e[a] !== n[a] ? "input" : "mask";
184
+ o.push({ type: i, value: u, index: a });
186
185
  }
187
- return a;
186
+ return o;
188
187
  }
189
- function ne(t) {
190
- return t.length > 0 ? Be({}, t, /./) : {};
188
+ function K(e) {
189
+ return e.length > 0 ? Se({}, e, /./) : {};
191
190
  }
192
- function Se(t, n) {
193
- for (var e = n.start, r = e === void 0 ? 0 : e, a = n.end, o = n.mask, l = n.replacement, c = n.separate, i = t.slice(r, a), u = o.slice(r, a), s = "", p = 0; p < u.length; p++) {
194
- var y = Object.prototype.hasOwnProperty.call(l, u[p]);
195
- y && i[p] !== void 0 && i[p] !== u[p] ? s += i[p] : y && c && (s += u[p]);
191
+ function ae(e, t) {
192
+ for (var n = t.start, r = n === void 0 ? 0 : n, o = t.end, a = t.mask, l = t.replacement, u = t.separate, i = e.slice(r, o), c = a.slice(r, o), s = "", f = 0; f < c.length; f++) {
193
+ var S = Object.prototype.hasOwnProperty.call(l, c[f]);
194
+ S && i[f] !== void 0 && i[f] !== c[f] ? s += i[f] : S && u && (s += c[f]);
196
195
  }
197
196
  return s;
198
197
  }
199
- function Ve(t, n) {
200
- var e = n.mask, r = n.replacement, a = typeof r == "string" ? ne(r) : r, o = RegExp("[^".concat(Object.keys(a).join(""), "]"), "g");
201
- return xe(re(t, { replacementChars: e.replace(o, ""), replacement: a, separate: !1 }), { mask: e, replacement: a, separate: !1, showMask: !1 });
198
+ function Me(e, t) {
199
+ var n = t.mask, r = t.replacement, o = typeof r == "string" ? K(r) : r, a = RegExp("[^".concat(Object.keys(o).join(""), "]"), "g");
200
+ return ke(U(e, { replacementChars: n.replace(a, ""), replacement: o, separate: !1 }), { mask: n, replacement: o, separate: !1, showMask: !1 });
202
201
  }
203
- function lt(t, n) {
204
- var e = n.mask, r = n.replacement, a = typeof r == "string" ? ne(r) : r, o = Se(t, { mask: e, replacement: a, separate: !1 }), l = RegExp("[^".concat(Object.keys(a).join(""), "]"), "g");
205
- return re(o, { replacementChars: e.replace(l, ""), replacement: a, separate: !1 });
202
+ function Ze(e, t) {
203
+ var n = t.mask, r = t.replacement, o = typeof r == "string" ? K(r) : r, a = ae(e, { mask: n, replacement: o, separate: !1 }), l = RegExp("[^".concat(Object.keys(o).join(""), "]"), "g");
204
+ return U(a, { replacementChars: n.replace(l, ""), replacement: o, separate: !1 });
206
205
  }
207
- function ct(t, n) {
208
- var e = n.mask, r = n.replacement, a = typeof r == "string" ? ne(r) : r;
209
- return Le(Ve(t, { mask: e, replacement: a }), { mask: e, replacement: a });
206
+ function Je(e, t) {
207
+ var n = t.mask, r = t.replacement, o = typeof r == "string" ? K(r) : r;
208
+ return Pe(Me(e, { mask: n, replacement: o }), { mask: n, replacement: o });
210
209
  }
211
- var ut = ["[", "]", "\\", "/", "^", "$", ".", "|", "?", "*", "+", "(", ")", "{", "}"];
212
- function Ce(t) {
213
- return ut.includes(t) ? "\\".concat(t) : t;
210
+ var Ye = ["[", "]", "\\", "/", "^", "$", ".", "|", "?", "*", "+", "(", ")", "{", "}"];
211
+ function me(e) {
212
+ return Ye.includes(e) ? "\\".concat(e) : e;
214
213
  }
215
- function st(t, n) {
216
- for (var e = n.mask, r = n.replacement, a = typeof r == "string" ? ne(r) : r, o = t === "partial" || t === "partial-inexact", l = t === "full" || t === "partial", c = "", i = 0; i < e.length; i++) {
217
- var u = e[i];
218
- i === 0 && (c = "^"), o && (c += "("), c += Object.prototype.hasOwnProperty.call(a, u) ? "".concat(l ? "(?!".concat(Ce(u), ")") : "", "(").concat(a[u].source, ")") : Ce(u), i === e.length - 1 && (o && (c += ")?".repeat(e.length)), c += "$");
214
+ function Qe(e, t) {
215
+ for (var n = t.mask, r = t.replacement, o = typeof r == "string" ? K(r) : r, a = e === "partial" || e === "partial-inexact", l = e === "full" || e === "partial", u = "", i = 0; i < n.length; i++) {
216
+ var c = n[i];
217
+ i === 0 && (u = "^"), a && (u += "("), u += Object.prototype.hasOwnProperty.call(o, c) ? "".concat(l ? "(?!".concat(me(c), ")") : "", "(").concat(o[c].source, ")") : me(c), i === n.length - 1 && (a && (u += ")?".repeat(n.length)), u += "$");
219
218
  }
220
- return c;
219
+ return u;
221
220
  }
222
- function pt(t, n) {
223
- return new Proxy(t, { set: function(e, r, a) {
224
- return r === "current" && (a !== t.current && (t.current !== null && n.unregister(t.current), a !== null && n.register(a)), e[r] = a, !0);
221
+ function qe(e, t) {
222
+ return new Proxy(e, { set: function(n, r, o) {
223
+ return r === "current" && (o !== e.current && (e.current !== null && t.unregister(e.current), o !== null && t.register(o)), n[r] = o, !0);
225
224
  } });
226
225
  }
227
- function ft(t, n, e) {
228
- return n = oe(n), (function(r, a) {
229
- if (a && (typeof a == "object" || typeof a == "function")) return a;
230
- if (a !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
231
- return (function(o) {
232
- if (o === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
233
- return o;
226
+ function Xe(e, t, n) {
227
+ return t = z(t), (function(r, o) {
228
+ if (o && (typeof o == "object" || typeof o == "function")) return o;
229
+ if (o !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
230
+ return (function(a) {
231
+ if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
232
+ return a;
234
233
  })(r);
235
- })(t, we() ? Reflect.construct(n, e || [], oe(t).constructor) : n.apply(t, e));
234
+ })(e, ie() ? Reflect.construct(t, n || [], z(e).constructor) : t.apply(e, n));
236
235
  }
237
- function Fe(t, n) {
238
- if (!(t instanceof n)) throw new TypeError("Cannot call a class as a function");
236
+ function Ee(e, t) {
237
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
239
238
  }
240
- function Ke(t, n, e) {
241
- return Object.defineProperty(t, "prototype", { writable: !1 }), t;
239
+ function Ce(e, t, n) {
240
+ return Object.defineProperty(e, "prototype", { writable: !1 }), e;
242
241
  }
243
- function dt(t, n, e) {
244
- return (n = (function(r) {
245
- var a = (function(o, l) {
246
- if (typeof o != "object" || !o) return o;
247
- var c = o[Symbol.toPrimitive];
248
- if (c !== void 0) {
249
- var i = c.call(o, l);
242
+ function et(e, t, n) {
243
+ return (t = (function(r) {
244
+ var o = (function(a, l) {
245
+ if (typeof a != "object" || !a) return a;
246
+ var u = a[Symbol.toPrimitive];
247
+ if (u !== void 0) {
248
+ var i = u.call(a, l);
250
249
  if (typeof i != "object") return i;
251
250
  throw new TypeError("@@toPrimitive must return a primitive value.");
252
251
  }
253
- return (l === "string" ? String : Number)(o);
252
+ return (l === "string" ? String : Number)(a);
254
253
  })(r, "string");
255
- return typeof a == "symbol" ? a : a + "";
256
- })(n)) in t ? Object.defineProperty(t, n, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = e, t;
254
+ return typeof o == "symbol" ? o : o + "";
255
+ })(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
257
256
  }
258
- function oe(t) {
259
- return oe = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
260
- return n.__proto__ || Object.getPrototypeOf(n);
261
- }, oe(t);
257
+ function z(e) {
258
+ return z = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
259
+ return t.__proto__ || Object.getPrototypeOf(t);
260
+ }, z(e);
262
261
  }
263
- function mt(t, n) {
264
- if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function");
265
- t.prototype = Object.create(n && n.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), n && ie(t, n);
262
+ function tt(e, t) {
263
+ if (typeof t != "function" && t !== null) throw new TypeError("Super expression must either be null or a function");
264
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && H(e, t);
266
265
  }
267
- function we() {
266
+ function ie() {
268
267
  try {
269
- var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {
268
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {
270
269
  })));
271
270
  } catch {
272
271
  }
273
- return (we = function() {
274
- return !!t;
272
+ return (ie = function() {
273
+ return !!e;
275
274
  })();
276
275
  }
277
- function je(t, n) {
278
- var e = Object.keys(t);
276
+ function ve(e, t) {
277
+ var n = Object.keys(e);
279
278
  if (Object.getOwnPropertySymbols) {
280
- var r = Object.getOwnPropertySymbols(t);
281
- n && (r = r.filter((function(a) {
282
- return Object.getOwnPropertyDescriptor(t, a).enumerable;
283
- }))), e.push.apply(e, r);
279
+ var r = Object.getOwnPropertySymbols(e);
280
+ t && (r = r.filter((function(o) {
281
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
282
+ }))), n.push.apply(n, r);
284
283
  }
285
- return e;
286
- }
287
- function Te(t) {
288
- for (var n = 1; n < arguments.length; n++) {
289
- var e = arguments[n] != null ? arguments[n] : {};
290
- n % 2 ? je(Object(e), !0).forEach((function(r) {
291
- dt(t, r, e[r]);
292
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : je(Object(e)).forEach((function(r) {
293
- Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(e, r));
284
+ return n;
285
+ }
286
+ function he(e) {
287
+ for (var t = 1; t < arguments.length; t++) {
288
+ var n = arguments[t] != null ? arguments[t] : {};
289
+ t % 2 ? ve(Object(n), !0).forEach((function(r) {
290
+ et(e, r, n[r]);
291
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ve(Object(n)).forEach((function(r) {
292
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
294
293
  }));
295
294
  }
296
- return t;
295
+ return e;
297
296
  }
298
- function ht(t, n) {
299
- if (t == null) return {};
300
- var e, r, a = (function(l, c) {
297
+ function nt(e, t) {
298
+ if (e == null) return {};
299
+ var n, r, o = (function(l, u) {
301
300
  if (l == null) return {};
302
301
  var i = {};
303
- for (var u in l) if ({}.hasOwnProperty.call(l, u)) {
304
- if (c.includes(u)) continue;
305
- i[u] = l[u];
302
+ for (var c in l) if ({}.hasOwnProperty.call(l, c)) {
303
+ if (u.includes(c)) continue;
304
+ i[c] = l[c];
306
305
  }
307
306
  return i;
308
- })(t, n);
307
+ })(e, t);
309
308
  if (Object.getOwnPropertySymbols) {
310
- var o = Object.getOwnPropertySymbols(t);
311
- for (r = 0; r < o.length; r++) e = o[r], n.includes(e) || {}.propertyIsEnumerable.call(t, e) && (a[e] = t[e]);
309
+ var a = Object.getOwnPropertySymbols(e);
310
+ for (r = 0; r < a.length; r++) n = a[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
312
311
  }
313
- return a;
312
+ return o;
314
313
  }
315
- function ie(t, n) {
316
- return ie = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, r) {
317
- return e.__proto__ = r, e;
318
- }, ie(t, n);
314
+ function H(e, t) {
315
+ return H = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
316
+ return n.__proto__ = r, n;
317
+ }, H(e, t);
319
318
  }
320
- function Oe(t) {
321
- var n = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
322
- return Oe = function(e) {
323
- if (e === null || !(function(a) {
319
+ function oe(e) {
320
+ var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
321
+ return oe = function(n) {
322
+ if (n === null || !(function(o) {
324
323
  try {
325
- return Function.toString.call(a).indexOf("[native code]") !== -1;
324
+ return Function.toString.call(o).indexOf("[native code]") !== -1;
326
325
  } catch {
327
- return typeof a == "function";
326
+ return typeof o == "function";
328
327
  }
329
- })(e)) return e;
330
- if (typeof e != "function") throw new TypeError("Super expression must either be null or a function");
331
- if (n !== void 0) {
332
- if (n.has(e)) return n.get(e);
333
- n.set(e, r);
328
+ })(n)) return n;
329
+ if (typeof n != "function") throw new TypeError("Super expression must either be null or a function");
330
+ if (t !== void 0) {
331
+ if (t.has(n)) return t.get(n);
332
+ t.set(n, r);
334
333
  }
335
334
  function r() {
336
- return (function(a, o, l) {
337
- if (we()) return Reflect.construct.apply(null, arguments);
338
- var c = [null];
339
- c.push.apply(c, o);
340
- var i = new (a.bind.apply(a, c))();
341
- return l && ie(i, l.prototype), i;
342
- })(e, arguments, oe(this).constructor);
335
+ return (function(o, a, l) {
336
+ if (ie()) return Reflect.construct.apply(null, arguments);
337
+ var u = [null];
338
+ u.push.apply(u, a);
339
+ var i = new (o.bind.apply(o, u))();
340
+ return l && H(i, l.prototype), i;
341
+ })(n, arguments, z(this).constructor);
343
342
  }
344
- return r.prototype = Object.create(e.prototype, { constructor: { value: r, enumerable: !1, writable: !0, configurable: !0 } }), ie(r, e);
345
- }, Oe(t);
343
+ return r.prototype = Object.create(n.prototype, { constructor: { value: r, enumerable: !1, writable: !0, configurable: !0 } }), H(r, n);
344
+ }, oe(e);
346
345
  }
347
- var ae = (function(t) {
348
- function n(e) {
346
+ var $ = (function(e) {
347
+ function t(n) {
349
348
  var r;
350
- return Fe(this, n), (r = ft(this, n, [e])).name = "SyntheticChangeError", r;
349
+ return Ee(this, t), (r = Xe(this, t, [n])).name = "SyntheticChangeError", r;
351
350
  }
352
- return mt(n, t), Ke(n);
353
- })(Oe(Error)), Ie, vt = ["options"], Ne = ["text", "email", "tel", "search", "url"], De = Ke((function t(n) {
354
- var e = n.init, r = n.tracking;
355
- Fe(this, t);
356
- var a = /* @__PURE__ */ new WeakMap();
357
- this.register = function(o) {
351
+ return tt(t, e), Ce(t);
352
+ })(oe(Error)), ye, rt = ["options"], ge = ["text", "email", "tel", "search", "url"], je = Ce((function e(t) {
353
+ var n = t.init, r = t.tracking;
354
+ Ee(this, e);
355
+ var o = /* @__PURE__ */ new WeakMap();
356
+ this.register = function(a) {
358
357
  var l;
359
- if (Ne.includes(o.type)) {
360
- var c = (l = o._wrapperState) !== null && l !== void 0 ? l : {}, i = c.initialValue, u = i === void 0 ? "" : i, s = c.controlled, p = s !== void 0 && s, y = e({ initialValue: o.value || u, controlled: p }), k = y.value, C = y.options, m = { value: k, options: C, fallbackOptions: C }, d = { id: -1, cachedId: -1 }, f = { value: "", selectionStart: 0, selectionEnd: 0 }, b = Object.getOwnPropertyDescriptor("_valueTracker" in o ? o : HTMLInputElement.prototype, "value");
361
- Object.defineProperty(o, "value", Te(Te({}, b), {}, { set: function(w) {
362
- var g;
363
- f.value = w, b == null || (g = b.set) === null || g === void 0 || g.call(o, w);
364
- } })), o.value = k;
365
- var S = function() {
366
- var w = function() {
367
- var g, j;
368
- f.selectionStart = (g = o.selectionStart) !== null && g !== void 0 ? g : 0, f.selectionEnd = (j = o.selectionEnd) !== null && j !== void 0 ? j : 0, d.id = window.setTimeout(w);
358
+ if (ge.includes(a.type)) {
359
+ var u = (l = a._wrapperState) !== null && l !== void 0 ? l : {}, i = u.initialValue, c = i === void 0 ? "" : i, s = u.controlled, f = s !== void 0 && s, S = n({ initialValue: a.value || c, controlled: f }), M = S.value, j = S.options, y = { value: M, options: j, fallbackOptions: j }, m = { id: -1, cachedId: -1 }, p = { value: "", selectionStart: 0, selectionEnd: 0 }, w = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
360
+ Object.defineProperty(a, "value", he(he({}, w), {}, { set: function(h) {
361
+ var d;
362
+ p.value = h, w == null || (d = w.set) === null || d === void 0 || d.call(a, h);
363
+ } })), a.value = M;
364
+ var g = function() {
365
+ var h = function() {
366
+ var d, k;
367
+ p.selectionStart = (d = a.selectionStart) !== null && d !== void 0 ? d : 0, p.selectionEnd = (k = a.selectionEnd) !== null && k !== void 0 ? k : 0, m.id = window.setTimeout(h);
369
368
  };
370
- d.id = window.setTimeout(w);
371
- }, N = function() {
372
- window.clearTimeout(d.id), d.id = -1, d.cachedId = -1;
373
- }, h = function(w) {
369
+ m.id = window.setTimeout(h);
370
+ }, E = function() {
371
+ window.clearTimeout(m.id), m.id = -1, m.cachedId = -1;
372
+ }, v = function(h) {
374
373
  try {
375
- var g, j;
376
- if (d.cachedId === d.id) throw new ae("The input selection has not been updated.");
377
- d.cachedId = d.id;
378
- var P = o.value, M = o.selectionStart, B = o.selectionEnd;
379
- if (M === null || B === null) throw new ae("The selection attributes have not been initialized.");
380
- var v, T = f.value;
381
- if (w.inputType === void 0 && (f.selectionStart = 0, f.selectionEnd = T.length), M > f.selectionStart ? v = "insert" : M <= f.selectionStart && M < f.selectionEnd ? v = "deleteBackward" : M === f.selectionEnd && P.length < T.length && (v = "deleteForward"), v === void 0 || (v === "deleteBackward" || v === "deleteForward") && P.length > T.length) throw new ae("Input type detection error.");
382
- var E = "", D = f.selectionStart, A = f.selectionEnd;
383
- if (v === "insert") E = P.slice(f.selectionStart, M);
374
+ var d, k;
375
+ if (m.cachedId === m.id) throw new $("The input selection has not been updated.");
376
+ m.cachedId = m.id;
377
+ var P = a.value, b = a.selectionStart, N = a.selectionEnd;
378
+ if (b === null || N === null) throw new $("The selection attributes have not been initialized.");
379
+ var O, C = p.value;
380
+ if (h.inputType === void 0 && (p.selectionStart = 0, p.selectionEnd = C.length), b > p.selectionStart ? O = "insert" : b <= p.selectionStart && b < p.selectionEnd ? O = "deleteBackward" : b === p.selectionEnd && P.length < C.length && (O = "deleteForward"), O === void 0 || (O === "deleteBackward" || O === "deleteForward") && P.length > C.length) throw new $("Input type detection error.");
381
+ var T = "", I = p.selectionStart, R = p.selectionEnd;
382
+ if (O === "insert") T = P.slice(p.selectionStart, b);
384
383
  else {
385
- var x = T.length - P.length;
386
- D = M, A = M + x;
384
+ var D = C.length - P.length;
385
+ I = b, R = b + D;
387
386
  }
388
- m.value !== T ? m.options = m.fallbackOptions : m.fallbackOptions = m.options;
389
- var L = m.options, O = r({ inputType: v, previousValue: T, previousOptions: L, value: P, addedValue: E, changeStart: D, changeEnd: A, selectionStart: M, selectionEnd: B }), V = O.options, I = ht(O, vt);
390
- o.value = I.value, o.setSelectionRange(I.selectionStart, I.selectionEnd), m.value = I.value, m.options = V, f.selectionStart = I.selectionStart, f.selectionEnd = I.selectionEnd, (g = o._valueTracker) === null || g === void 0 || (j = g.setValue) === null || j === void 0 || j.call(g, T);
391
- } catch (F) {
392
- if (o.value = f.value, o.setSelectionRange(f.selectionStart, f.selectionEnd), w.preventDefault(), w.stopPropagation(), F.name !== "SyntheticChangeError") throw F;
387
+ y.value !== C ? y.options = y.fallbackOptions : y.fallbackOptions = y.options;
388
+ var F = y.options, G = r({ inputType: O, previousValue: C, previousOptions: F, value: P, addedValue: T, changeStart: I, changeEnd: R, selectionStart: b, selectionEnd: N }), _ = G.options, A = nt(G, rt);
389
+ a.value = A.value, a.setSelectionRange(A.selectionStart, A.selectionEnd), y.value = A.value, y.options = _, p.selectionStart = A.selectionStart, p.selectionEnd = A.selectionEnd, (d = a._valueTracker) === null || d === void 0 || (k = d.setValue) === null || k === void 0 || k.call(d, C);
390
+ } catch (W) {
391
+ if (a.value = p.value, a.setSelectionRange(p.selectionStart, p.selectionEnd), h.preventDefault(), h.stopPropagation(), W.name !== "SyntheticChangeError") throw W;
393
392
  }
394
393
  };
395
- document.activeElement === o && S(), o.addEventListener("focus", S), o.addEventListener("blur", N), o.addEventListener("input", h), a.set(o, { onFocus: S, onBlur: N, onInput: h });
396
- } else process.env.NODE_ENV !== "production" && console.warn("Warn: The input element type does not match one of the types: ".concat(Ne.join(", "), "."));
397
- }, this.unregister = function(o) {
398
- var l = a.get(o);
399
- l !== void 0 && (o.removeEventListener("focus", l.onFocus), o.removeEventListener("blur", l.onBlur), o.removeEventListener("input", l.onInput), a.delete(o));
394
+ document.activeElement === a && g(), a.addEventListener("focus", g), a.addEventListener("blur", E), a.addEventListener("input", v), o.set(a, { onFocus: g, onBlur: E, onInput: v });
395
+ } else process.env.NODE_ENV !== "production" && console.warn("Warn: The input element type does not match one of the types: ".concat(ge.join(", "), "."));
396
+ }, this.unregister = function(a) {
397
+ var l = o.get(a);
398
+ l !== void 0 && (a.removeEventListener("focus", l.onFocus), a.removeEventListener("blur", l.onBlur), a.removeEventListener("input", l.onInput), o.delete(a));
400
399
  };
401
400
  }));
402
- Ie = De, Object.defineProperty(Ie.prototype, Symbol.toStringTag, { writable: !1, enumerable: !1, configurable: !0, value: "Input" });
403
- var ye = function(t) {
401
+ ye = je, Object.defineProperty(ye.prototype, Symbol.toStringTag, { writable: !1, enumerable: !1, configurable: !0, value: "Input" });
402
+ var te = function(e) {
404
403
  return function() {
405
- for (var n = arguments.length, e = new Array(n), r = 0; r < n; r++) e[r] = arguments[r];
406
- return new t("".concat(e.join(`
404
+ for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r];
405
+ return new e("".concat(n.join(`
407
406
 
408
407
  `), `
409
408
  `));
410
409
  };
411
- }, Ae, yt = ["track", "modify"];
412
- function te(t) {
413
- var n, e, r, a;
414
- return { mask: (n = t.mask) !== null && n !== void 0 ? n : "", replacement: typeof t.replacement == "string" ? ne(t.replacement) : (e = t.replacement) !== null && e !== void 0 ? e : {}, showMask: (r = t.showMask) !== null && r !== void 0 && r, separate: (a = t.separate) !== null && a !== void 0 && a, track: t.track, modify: t.modify };
415
- }
416
- var Ue = (function(t) {
417
- function n() {
418
- var e, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
419
- return rt(this, n), (e = nt(this, n, [{ init: function(a) {
420
- var o = a.initialValue, l = a.controlled, c = te(r), i = c.mask, u = c.replacement, s = c.separate, p = c.showMask;
421
- return o = l || o ? o : p ? i : "", process.env.NODE_ENV !== "production" && (function(y) {
422
- var k = y.initialValue, C = y.mask, m = y.replacement;
423
- k.length > C.length && console.error(ye(Error)("The initialized value of the `value` or `defaultValue` property is longer than the value specified in the `mask` property. Check the correctness of the initialized value in the specified property.", 'Invalid value: "'.concat(k, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
424
- var d = Object.keys(m).filter((function(h) {
425
- return h.length > 1;
410
+ }, be, at = ["track", "modify"];
411
+ function x(e) {
412
+ var t, n, r, o;
413
+ return { mask: (t = e.mask) !== null && t !== void 0 ? t : "", replacement: typeof e.replacement == "string" ? K(e.replacement) : (n = e.replacement) !== null && n !== void 0 ? n : {}, showMask: (r = e.showMask) !== null && r !== void 0 && r, separate: (o = e.separate) !== null && o !== void 0 && o, track: e.track, modify: e.modify };
414
+ }
415
+ var Te = (function(e) {
416
+ function t() {
417
+ var n, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
418
+ return ze(this, t), (n = $e(this, t, [{ init: function(o) {
419
+ var a = o.initialValue, l = o.controlled, u = x(r), i = u.mask, c = u.replacement, s = u.separate, f = u.showMask;
420
+ return a = l || a ? a : f ? i : "", process.env.NODE_ENV !== "production" && (function(S) {
421
+ var M = S.initialValue, j = S.mask, y = S.replacement;
422
+ M.length > j.length && console.error(te(Error)("The initialized value of the `value` or `defaultValue` property is longer than the value specified in the `mask` property. Check the correctness of the initialized value in the specified property.", 'Invalid value: "'.concat(M, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
423
+ var m = Object.keys(y).filter((function(v) {
424
+ return v.length > 1;
426
425
  }));
427
- d.length > 0 && console.error(ye(Error)("Object keys in the `replacement` property are longer than one character. Replacement keys must be one character long. Check the correctness of the value in the specified property.", "Invalid keys: ".concat(d.join(", "), "."), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
428
- for (var f = C.slice(0, k.length), b = -1, S = 0; S < f.length; S++) {
429
- var N = Object.prototype.hasOwnProperty.call(m, f[S]);
430
- if (!(f[S] === k[S] || N && m[f[S]].test(k[S]))) {
431
- b = S;
426
+ m.length > 0 && console.error(te(Error)("Object keys in the `replacement` property are longer than one character. Replacement keys must be one character long. Check the correctness of the value in the specified property.", "Invalid keys: ".concat(m.join(", "), "."), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
427
+ for (var p = j.slice(0, M.length), w = -1, g = 0; g < p.length; g++) {
428
+ var E = Object.prototype.hasOwnProperty.call(y, p[g]);
429
+ if (!(p[g] === M[g] || E && y[p[g]].test(M[g]))) {
430
+ w = g;
432
431
  break;
433
432
  }
434
433
  }
435
- b !== -1 && console.error(ye(Error)("An invalid character was found in the initialized property value `value` or `defaultValue` (index: ".concat(b, "). Check the correctness of the initialized value in the specified property."), 'Invalid value: "'.concat(k, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
436
- })({ initialValue: o, mask: i, replacement: u }), { value: o, options: { mask: i, replacement: u, separate: s } };
437
- }, tracking: function(a) {
438
- var o = a.inputType, l = a.previousValue, c = a.previousOptions, i = a.addedValue, u = a.changeStart, s = a.changeEnd, p = te(r), y = p.track, k = p.modify, C = it(p, yt), m = C.mask, d = C.replacement, f = C.showMask, b = C.separate, S = pe(pe({}, o === "insert" ? { inputType: o, data: i } : { inputType: o, data: null }), {}, { value: l, selectionStart: u, selectionEnd: s }), N = y?.(S);
439
- if (N === !1) throw new ae("Custom tracking stop.");
440
- N === null ? i = "" : N !== !0 && N !== void 0 && (i = N);
441
- var h = k?.(S);
442
- h?.mask !== void 0 && (m = h.mask), h?.replacement !== void 0 && (d = typeof h?.replacement == "string" ? ne(h?.replacement) : h.replacement), h?.showMask !== void 0 && (f = h.showMask), h?.separate !== void 0 && (b = h.separate);
443
- var w = Se(l, pe({ end: u }, c)), g = Se(l, pe({ start: s }, c)), j = RegExp("[^".concat(Object.keys(d).join(""), "]"), "g"), P = m.replace(j, "");
444
- if (w && (w = re(w, { replacementChars: P, replacement: d, separate: b }), P = P.slice(w.length)), i && (i = re(i, { replacementChars: P, replacement: d, separate: !1 }), P = P.slice(i.length)), o === "insert" && i === "") throw new ae("The character does not match the key value of the `replacement` object.");
445
- if (b) {
446
- var M = m.slice(u, s).replace(j, ""), B = M.length - i.length;
447
- B < 0 ? g = g.slice(-B) : B > 0 && (g = M.slice(-B) + g);
434
+ w !== -1 && console.error(te(Error)("An invalid character was found in the initialized property value `value` or `defaultValue` (index: ".concat(w, "). Check the correctness of the initialized value in the specified property."), 'Invalid value: "'.concat(M, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
435
+ })({ initialValue: a, mask: i, replacement: c }), { value: a, options: { mask: i, replacement: c, separate: s } };
436
+ }, tracking: function(o) {
437
+ var a = o.inputType, l = o.previousValue, u = o.previousOptions, i = o.addedValue, c = o.changeStart, s = o.changeEnd, f = x(r), S = f.track, M = f.modify, j = We(f, at), y = j.mask, m = j.replacement, p = j.showMask, w = j.separate, g = J(J({}, a === "insert" ? { inputType: a, data: i } : { inputType: a, data: null }), {}, { value: l, selectionStart: c, selectionEnd: s }), E = S?.(g);
438
+ if (E === !1) throw new $("Custom tracking stop.");
439
+ E === null ? i = "" : E !== !0 && E !== void 0 && (i = E);
440
+ var v = M?.(g);
441
+ v?.mask !== void 0 && (y = v.mask), v?.replacement !== void 0 && (m = typeof v?.replacement == "string" ? K(v?.replacement) : v.replacement), v?.showMask !== void 0 && (p = v.showMask), v?.separate !== void 0 && (w = v.separate);
442
+ var h = ae(l, J({ end: c }, u)), d = ae(l, J({ start: s }, u)), k = RegExp("[^".concat(Object.keys(m).join(""), "]"), "g"), P = y.replace(k, "");
443
+ if (h && (h = U(h, { replacementChars: P, replacement: m, separate: w }), P = P.slice(h.length)), i && (i = U(i, { replacementChars: P, replacement: m, separate: !1 }), P = P.slice(i.length)), a === "insert" && i === "") throw new $("The character does not match the key value of the `replacement` object.");
444
+ if (w) {
445
+ var b = y.slice(c, s).replace(k, ""), N = b.length - i.length;
446
+ N < 0 ? d = d.slice(-N) : N > 0 && (d = b.slice(-N) + d);
448
447
  }
449
- g && (g = re(g, { replacementChars: P, replacement: d, separate: b }));
450
- var v = xe(w + i + g, { mask: m, replacement: d, separate: b, showMask: f }), T = (function(E) {
451
- var D, A, x, L = E.inputType, O = E.value, V = E.addedValue, I = E.beforeChangeValue, F = E.mask, W = E.replacement, Z = E.separate, U = Le(O, { mask: F, replacement: W }).filter((function($) {
452
- var K = $.type;
453
- return K === "input" || Z && K === "replacement";
454
- })), _ = (D = U[I.length + V.length - 1]) === null || D === void 0 ? void 0 : D.index, G = (A = U[I.length - 1]) === null || A === void 0 ? void 0 : A.index, R = (x = U[I.length + V.length]) === null || x === void 0 ? void 0 : x.index;
455
- if (L === "insert") {
456
- if (_ !== void 0) return _ + 1;
457
- if (R !== void 0) return R;
458
- if (G !== void 0) return G + 1;
448
+ d && (d = U(d, { replacementChars: P, replacement: m, separate: w }));
449
+ var O = ke(h + i + d, { mask: y, replacement: m, separate: w, showMask: p }), C = (function(T) {
450
+ var I, R, D, F = T.inputType, G = T.value, _ = T.addedValue, A = T.beforeChangeValue, W = T.mask, le = T.replacement, Ie = T.separate, Q = Pe(G, { mask: W, replacement: le }).filter((function(q) {
451
+ var se = q.type;
452
+ return se === "input" || Ie && se === "replacement";
453
+ })), ue = (I = Q[A.length + _.length - 1]) === null || I === void 0 ? void 0 : I.index, L = (R = Q[A.length - 1]) === null || R === void 0 ? void 0 : R.index, V = (D = Q[A.length + _.length]) === null || D === void 0 ? void 0 : D.index;
454
+ if (F === "insert") {
455
+ if (ue !== void 0) return ue + 1;
456
+ if (V !== void 0) return V;
457
+ if (L !== void 0) return L + 1;
459
458
  }
460
- if (L === "deleteForward") {
461
- if (R !== void 0) return R;
462
- if (G !== void 0) return G + 1;
459
+ if (F === "deleteForward") {
460
+ if (V !== void 0) return V;
461
+ if (L !== void 0) return L + 1;
463
462
  }
464
- if (L === "deleteBackward") {
465
- if (G !== void 0) return G + 1;
466
- if (R !== void 0) return R;
463
+ if (F === "deleteBackward") {
464
+ if (L !== void 0) return L + 1;
465
+ if (V !== void 0) return V;
467
466
  }
468
- var J = O.split("").findIndex((function($) {
469
- return Object.prototype.hasOwnProperty.call(W, $);
467
+ var ce = G.split("").findIndex((function(q) {
468
+ return Object.prototype.hasOwnProperty.call(le, q);
470
469
  }));
471
- return J !== -1 ? J : O.length;
472
- })({ inputType: o, value: v, addedValue: i, beforeChangeValue: w, mask: m, replacement: d, separate: b });
473
- return { value: v, selectionStart: T, selectionEnd: T, options: { mask: m, replacement: d, separate: b } };
474
- } }])).format = function(a) {
475
- return Ve(a, te(r));
476
- }, e.formatToParts = function(a) {
477
- return ct(a, te(r));
478
- }, e.unformat = function(a) {
479
- return lt(a, te(r));
480
- }, e.generatePattern = function(a) {
481
- return st(a, te(r));
482
- }, e;
470
+ return ce !== -1 ? ce : G.length;
471
+ })({ inputType: a, value: O, addedValue: i, beforeChangeValue: h, mask: y, replacement: m, separate: w });
472
+ return { value: O, selectionStart: C, selectionEnd: C, options: { mask: y, replacement: m, separate: w } };
473
+ } }])).format = function(o) {
474
+ return Me(o, x(r));
475
+ }, n.formatToParts = function(o) {
476
+ return Je(o, x(r));
477
+ }, n.unformat = function(o) {
478
+ return Ze(o, x(r));
479
+ }, n.generatePattern = function(o) {
480
+ return Qe(o, x(r));
481
+ }, n;
483
482
  }
484
- return ot(n, De), at(n);
483
+ return _e(t, je), He(t);
485
484
  })();
486
- Ae = Ue, Object.defineProperty(Ae.prototype, Symbol.toStringTag, { writable: !1, enumerable: !1, configurable: !0, value: "Mask" });
487
- function gt() {
488
- var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = t.mask, e = t.replacement, r = t.showMask, a = t.separate, o = t.track, l = t.modify, c = ge(null), i = ge({ mask: n, replacement: e, showMask: r, separate: a, track: o, modify: l });
489
- return i.current.mask = n, i.current.replacement = e, i.current.showMask = r, i.current.separate = a, i.current.track = o, i.current.modify = l, He((function() {
490
- return pt(c, new Ue(i.current));
485
+ be = Te, Object.defineProperty(be.prototype, Symbol.toStringTag, { writable: !1, enumerable: !1, configurable: !0, value: "Mask" });
486
+ function ot() {
487
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.mask, n = e.replacement, r = e.showMask, o = e.separate, a = e.track, l = e.modify, u = ne(null), i = ne({ mask: t, replacement: n, showMask: r, separate: o, track: a, modify: l });
488
+ return i.current.mask = t, i.current.replacement = n, i.current.showMask = r, i.current.separate = o, i.current.track = a, i.current.modify = l, Ne((function() {
489
+ return qe(u, new Te(i.current));
491
490
  }), []);
492
491
  }
493
- const bt = "en", St = { AF: "Afghanistan", AL: "Albania", DZ: "Algeria", AS: "American Samoa", AD: "Andorra", AO: "Angola", AI: "Anguilla", AQ: "Antarctica", AG: "Antigua and Barbuda", AR: "Argentina", AM: "Armenia", AW: "Aruba", AU: "Australia", AT: "Austria", AZ: "Azerbaijan", BS: "Bahamas", BH: "Bahrain", BD: "Bangladesh", BB: "Barbados", BY: "Belarus", BE: "Belgium", BZ: "Belize", BJ: "Benin", BM: "Bermuda", BT: "Bhutan", BO: "Bolivia", BA: "Bosnia and Herzegovina", BW: "Botswana", BV: "Bouvet Island", BR: "Brazil", IO: "British Indian Ocean Territory", BN: "Brunei Darussalam", BG: "Bulgaria", BF: "Burkina Faso", BI: "Burundi", KH: "Cambodia", CM: "Cameroon", CA: "Canada", CV: "Cape Verde", KY: "Cayman Islands", CF: "Central African Republic", TD: "Chad", CL: "Chile", CN: ["People's Republic of China", "China"], CX: "Christmas Island", CC: "Cocos (Keeling) Islands", CO: "Colombia", KM: "Comoros", CG: ["Republic of the Congo", "Congo"], CD: ["Democratic Republic of the Congo", "Congo"], CK: "Cook Islands", CR: "Costa Rica", CI: ["Cote d'Ivoire", "Côte d'Ivoire", "Ivory Coast"], HR: "Croatia", CU: "Cuba", CY: "Cyprus", CZ: ["Czech Republic", "Czechia"], DK: "Denmark", DJ: "Djibouti", DM: "Dominica", DO: "Dominican Republic", EC: "Ecuador", EG: "Egypt", SV: "El Salvador", GQ: "Equatorial Guinea", ER: "Eritrea", EE: "Estonia", ET: "Ethiopia", FK: "Falkland Islands (Malvinas)", FO: "Faroe Islands", FJ: "Fiji", FI: "Finland", FR: "France", GF: "French Guiana", PF: "French Polynesia", TF: "French Southern Territories", GA: "Gabon", GM: ["Republic of The Gambia", "The Gambia", "Gambia"], GE: "Georgia", DE: "Germany", GH: "Ghana", GI: "Gibraltar", GR: "Greece", GL: "Greenland", GD: "Grenada", GP: "Guadeloupe", GU: "Guam", GT: "Guatemala", GN: "Guinea", GW: "Guinea-Bissau", GY: "Guyana", HT: "Haiti", HM: "Heard Island and McDonald Islands", VA: "Holy See (Vatican City State)", HN: "Honduras", HK: "Hong Kong", HU: "Hungary", IS: "Iceland", IN: "India", ID: "Indonesia", IR: ["Islamic Republic of Iran", "Iran"], IQ: "Iraq", IE: "Ireland", IL: "Israel", IT: "Italy", JM: "Jamaica", JP: "Japan", JO: "Jordan", KZ: "Kazakhstan", KE: "Kenya", KI: "Kiribati", KP: "North Korea", KR: ["South Korea", "Korea, Republic of", "Republic of Korea"], KW: "Kuwait", KG: "Kyrgyzstan", LA: "Lao People's Democratic Republic", LV: "Latvia", LB: "Lebanon", LS: "Lesotho", LR: "Liberia", LY: "Libya", LI: "Liechtenstein", LT: "Lithuania", LU: "Luxembourg", MO: "Macao", MG: "Madagascar", MW: "Malawi", MY: "Malaysia", MV: "Maldives", ML: "Mali", MT: "Malta", MH: "Marshall Islands", MQ: "Martinique", MR: "Mauritania", MU: "Mauritius", YT: "Mayotte", MX: "Mexico", FM: "Micronesia, Federated States of", MD: "Moldova, Republic of", MC: "Monaco", MN: "Mongolia", MS: "Montserrat", MA: "Morocco", MZ: "Mozambique", MM: "Myanmar", NA: "Namibia", NR: "Nauru", NP: "Nepal", NL: ["Netherlands", "The Netherlands", "Netherlands (Kingdom of the)"], NC: "New Caledonia", NZ: "New Zealand", NI: "Nicaragua", NE: "Niger", NG: "Nigeria", NU: "Niue", NF: "Norfolk Island", MK: ["The Republic of North Macedonia", "North Macedonia"], MP: "Northern Mariana Islands", NO: "Norway", OM: "Oman", PK: "Pakistan", PW: "Palau", PS: ["State of Palestine", "Palestine"], PA: "Panama", PG: "Papua New Guinea", PY: "Paraguay", PE: "Peru", PH: "Philippines", PN: ["Pitcairn", "Pitcairn Islands"], PL: "Poland", PT: "Portugal", PR: "Puerto Rico", QA: "Qatar", RE: "Reunion", RO: "Romania", RU: ["Russian Federation", "Russia"], RW: "Rwanda", SH: "Saint Helena", KN: "Saint Kitts and Nevis", LC: "Saint Lucia", PM: "Saint Pierre and Miquelon", VC: "Saint Vincent and the Grenadines", WS: "Samoa", SM: "San Marino", ST: "Sao Tome and Principe", SA: "Saudi Arabia", SN: "Senegal", SC: "Seychelles", SL: "Sierra Leone", SG: "Singapore", SK: "Slovakia", SI: "Slovenia", SB: "Solomon Islands", SO: "Somalia", ZA: "South Africa", GS: "South Georgia and the South Sandwich Islands", ES: "Spain", LK: "Sri Lanka", SD: "Sudan", SR: "Suriname", SJ: "Svalbard and Jan Mayen", SZ: "Eswatini", SE: "Sweden", CH: "Switzerland", SY: "Syrian Arab Republic", TW: ["Taiwan, Province of China", "Taiwan"], TJ: "Tajikistan", TZ: ["United Republic of Tanzania", "Tanzania"], TH: "Thailand", TL: "Timor-Leste", TG: "Togo", TK: "Tokelau", TO: "Tonga", TT: "Trinidad and Tobago", TN: "Tunisia", TR: ["Türkiye", "Turkey"], TM: "Turkmenistan", TC: "Turks and Caicos Islands", TV: "Tuvalu", UG: "Uganda", UA: "Ukraine", AE: ["United Arab Emirates", "UAE"], GB: ["United Kingdom", "UK", "Great Britain"], US: ["United States of America", "United States", "USA", "U.S.A.", "US", "U.S."], UM: "United States Minor Outlying Islands", UY: "Uruguay", UZ: "Uzbekistan", VU: "Vanuatu", VE: "Venezuela", VN: "Vietnam", VG: "Virgin Islands, British", VI: "Virgin Islands, U.S.", WF: "Wallis and Futuna", EH: "Western Sahara", YE: "Yemen", ZM: "Zambia", ZW: "Zimbabwe", AX: ["Åland Islands", "Aland Islands"], BQ: "Bonaire, Sint Eustatius and Saba", CW: "Curaçao", GG: "Guernsey", IM: "Isle of Man", JE: "Jersey", ME: "Montenegro", BL: "Saint Barthélemy", MF: "Saint Martin (French part)", RS: "Serbia", SX: "Sint Maarten (Dutch part)", SS: "South Sudan", XK: "Kosovo" }, Ot = {
494
- locale: bt,
495
- countries: St
492
+ const it = "en", lt = { AF: "Afghanistan", AL: "Albania", DZ: "Algeria", AS: "American Samoa", AD: "Andorra", AO: "Angola", AI: "Anguilla", AQ: "Antarctica", AG: "Antigua and Barbuda", AR: "Argentina", AM: "Armenia", AW: "Aruba", AU: "Australia", AT: "Austria", AZ: "Azerbaijan", BS: "Bahamas", BH: "Bahrain", BD: "Bangladesh", BB: "Barbados", BY: "Belarus", BE: "Belgium", BZ: "Belize", BJ: "Benin", BM: "Bermuda", BT: "Bhutan", BO: "Bolivia", BA: "Bosnia and Herzegovina", BW: "Botswana", BV: "Bouvet Island", BR: "Brazil", IO: "British Indian Ocean Territory", BN: "Brunei Darussalam", BG: "Bulgaria", BF: "Burkina Faso", BI: "Burundi", KH: "Cambodia", CM: "Cameroon", CA: "Canada", CV: "Cape Verde", KY: "Cayman Islands", CF: "Central African Republic", TD: "Chad", CL: "Chile", CN: ["People's Republic of China", "China"], CX: "Christmas Island", CC: "Cocos (Keeling) Islands", CO: "Colombia", KM: "Comoros", CG: ["Republic of the Congo", "Congo"], CD: ["Democratic Republic of the Congo", "Congo"], CK: "Cook Islands", CR: "Costa Rica", CI: ["Cote d'Ivoire", "Côte d'Ivoire", "Ivory Coast"], HR: "Croatia", CU: "Cuba", CY: "Cyprus", CZ: ["Czech Republic", "Czechia"], DK: "Denmark", DJ: "Djibouti", DM: "Dominica", DO: "Dominican Republic", EC: "Ecuador", EG: "Egypt", SV: "El Salvador", GQ: "Equatorial Guinea", ER: "Eritrea", EE: "Estonia", ET: "Ethiopia", FK: "Falkland Islands (Malvinas)", FO: "Faroe Islands", FJ: "Fiji", FI: "Finland", FR: "France", GF: "French Guiana", PF: "French Polynesia", TF: "French Southern Territories", GA: "Gabon", GM: ["Republic of The Gambia", "The Gambia", "Gambia"], GE: "Georgia", DE: "Germany", GH: "Ghana", GI: "Gibraltar", GR: "Greece", GL: "Greenland", GD: "Grenada", GP: "Guadeloupe", GU: "Guam", GT: "Guatemala", GN: "Guinea", GW: "Guinea-Bissau", GY: "Guyana", HT: "Haiti", HM: "Heard Island and McDonald Islands", VA: "Holy See (Vatican City State)", HN: "Honduras", HK: "Hong Kong", HU: "Hungary", IS: "Iceland", IN: "India", ID: "Indonesia", IR: ["Islamic Republic of Iran", "Iran"], IQ: "Iraq", IE: "Ireland", IL: "Israel", IT: "Italy", JM: "Jamaica", JP: "Japan", JO: "Jordan", KZ: "Kazakhstan", KE: "Kenya", KI: "Kiribati", KP: "North Korea", KR: ["South Korea", "Korea, Republic of", "Republic of Korea"], KW: "Kuwait", KG: "Kyrgyzstan", LA: "Lao People's Democratic Republic", LV: "Latvia", LB: "Lebanon", LS: "Lesotho", LR: "Liberia", LY: "Libya", LI: "Liechtenstein", LT: "Lithuania", LU: "Luxembourg", MO: "Macao", MG: "Madagascar", MW: "Malawi", MY: "Malaysia", MV: "Maldives", ML: "Mali", MT: "Malta", MH: "Marshall Islands", MQ: "Martinique", MR: "Mauritania", MU: "Mauritius", YT: "Mayotte", MX: "Mexico", FM: "Micronesia, Federated States of", MD: "Moldova, Republic of", MC: "Monaco", MN: "Mongolia", MS: "Montserrat", MA: "Morocco", MZ: "Mozambique", MM: "Myanmar", NA: "Namibia", NR: "Nauru", NP: "Nepal", NL: ["Netherlands", "The Netherlands", "Netherlands (Kingdom of the)"], NC: "New Caledonia", NZ: "New Zealand", NI: "Nicaragua", NE: "Niger", NG: "Nigeria", NU: "Niue", NF: "Norfolk Island", MK: ["The Republic of North Macedonia", "North Macedonia"], MP: "Northern Mariana Islands", NO: "Norway", OM: "Oman", PK: "Pakistan", PW: "Palau", PS: ["State of Palestine", "Palestine"], PA: "Panama", PG: "Papua New Guinea", PY: "Paraguay", PE: "Peru", PH: "Philippines", PN: ["Pitcairn", "Pitcairn Islands"], PL: "Poland", PT: "Portugal", PR: "Puerto Rico", QA: "Qatar", RE: "Reunion", RO: "Romania", RU: ["Russian Federation", "Russia"], RW: "Rwanda", SH: "Saint Helena", KN: "Saint Kitts and Nevis", LC: "Saint Lucia", PM: "Saint Pierre and Miquelon", VC: "Saint Vincent and the Grenadines", WS: "Samoa", SM: "San Marino", ST: "Sao Tome and Principe", SA: "Saudi Arabia", SN: "Senegal", SC: "Seychelles", SL: "Sierra Leone", SG: "Singapore", SK: "Slovakia", SI: "Slovenia", SB: "Solomon Islands", SO: "Somalia", ZA: "South Africa", GS: "South Georgia and the South Sandwich Islands", ES: "Spain", LK: "Sri Lanka", SD: "Sudan", SR: "Suriname", SJ: "Svalbard and Jan Mayen", SZ: "Eswatini", SE: "Sweden", CH: "Switzerland", SY: "Syrian Arab Republic", TW: ["Taiwan, Province of China", "Taiwan"], TJ: "Tajikistan", TZ: ["United Republic of Tanzania", "Tanzania"], TH: "Thailand", TL: "Timor-Leste", TG: "Togo", TK: "Tokelau", TO: "Tonga", TT: "Trinidad and Tobago", TN: "Tunisia", TR: ["Türkiye", "Turkey"], TM: "Turkmenistan", TC: "Turks and Caicos Islands", TV: "Tuvalu", UG: "Uganda", UA: "Ukraine", AE: ["United Arab Emirates", "UAE"], GB: ["United Kingdom", "UK", "Great Britain"], US: ["United States of America", "United States", "USA", "U.S.A.", "US", "U.S."], UM: "United States Minor Outlying Islands", UY: "Uruguay", UZ: "Uzbekistan", VU: "Vanuatu", VE: "Venezuela", VN: "Vietnam", VG: "Virgin Islands, British", VI: "Virgin Islands, U.S.", WF: "Wallis and Futuna", EH: "Western Sahara", YE: "Yemen", ZM: "Zambia", ZW: "Zimbabwe", AX: ["Åland Islands", "Aland Islands"], BQ: "Bonaire, Sint Eustatius and Saba", CW: "Curaçao", GG: "Guernsey", IM: "Isle of Man", JE: "Jersey", ME: "Montenegro", BL: "Saint Barthélemy", MF: "Saint Martin (French part)", RS: "Serbia", SX: "Sint Maarten (Dutch part)", SS: "South Sudan", XK: "Kosovo" }, ut = {
493
+ locale: it,
494
+ countries: lt
496
495
  };
497
- ze.registerLocale(Ot);
498
- const Bt = We((t, n) => {
499
- const e = $e.c(80);
500
- let r, a, o, l, c, i, u, s, p, y, k, C, m, d, f, b;
501
- e[0] !== t ? ({
502
- disabled: C,
503
- error: a,
504
- helperText: o,
505
- helperTextClassName: l,
506
- isRequired: c,
507
- label: i,
508
- labelClassName: u,
509
- labelWrapperClassName: s,
510
- name: p,
511
- placeholder: y,
512
- showFlagOnSearch: m,
513
- showInputFilter: d,
514
- showNameOnSearch: f,
515
- wrapperClassName: b,
516
- showPlaceHolder: k,
517
- ...r
518
- } = t, e[0] = t, e[1] = r, e[2] = a, e[3] = o, e[4] = l, e[5] = c, e[6] = i, e[7] = u, e[8] = s, e[9] = p, e[10] = y, e[11] = k, e[12] = C, e[13] = m, e[14] = d, e[15] = f, e[16] = b) : (r = e[1], a = e[2], o = e[3], l = e[4], c = e[5], i = e[6], u = e[7], s = e[8], p = e[9], y = e[10], k = e[11], C = e[12], m = e[13], d = e[14], f = e[15], b = e[16]);
519
- const S = C === void 0 ? !1 : C, N = m === void 0 ? !0 : m, h = d === void 0 ? !0 : d, w = f === void 0 ? !0 : f, g = Ze(), j = p ?? g, P = ge(null), {
520
- isOpenSelector: M,
521
- value: B,
522
- selectedCountry: v,
523
- onChangeValue: T,
524
- handleOpenSelector: E
525
- } = qe(), D = typeof a == "string" && a.length >= 0;
526
- let A;
527
- e[17] !== v ? (A = Xe(v), e[17] = v, e[18] = A) : A = e[18];
528
- let x;
529
- e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = {
530
- _: /\d/
531
- }, e[19] = x) : x = e[19];
532
- let L;
533
- e[20] !== A ? (L = {
534
- mask: A,
535
- replacement: x
536
- }, e[20] = A, e[21] = L) : L = e[21];
537
- const O = gt(L);
538
- let V, I;
539
- e[22] !== O ? (V = () => O.current, I = [O], e[22] = O, e[23] = V, e[24] = I) : (V = e[23], I = e[24]), Je(n, V, I);
540
- let F;
541
- e[25] !== T || e[26] !== v.prefix ? (F = (z) => {
542
- z.target.value.startsWith(v.prefix) ? T(z.target.value) : T(`${v.prefix} `);
543
- }, e[25] = T, e[26] = v.prefix, e[27] = F) : F = e[27];
544
- const W = F;
545
- let Z, U;
546
- e[28] !== E ? (Z = () => {
547
- const z = new AbortController(), ke = (me) => {
548
- me.key === "Escape" && E(!1);
549
- }, _e = (me) => {
550
- P.current?.contains(me.target) || E(!1);
551
- };
552
- return document.addEventListener("keydown", ke, {
553
- signal: z.signal
554
- }), document.addEventListener("mousedown", _e, {
555
- signal: z.signal
556
- }), document.addEventListener("visibilitychange", () => {
557
- document.hidden && E(!1);
558
- }, {
559
- signal: z.signal
560
- }), () => {
561
- z.abort();
562
- };
563
- }, U = [E, P], e[28] = E, e[29] = Z, e[30] = U) : (Z = e[29], U = e[30]), Pe(Z, U);
564
- let _;
565
- e[31] !== O || e[32] !== v.prefix ? (_ = () => {
566
- O.current && (O.current.value = v.prefix + " ");
567
- }, e[31] = O, e[32] = v.prefix, e[33] = _) : _ = e[33];
568
- let G;
569
- e[34] !== v.code ? (G = [v.code], e[34] = v.code, e[35] = G) : G = e[35], Pe(_, G);
570
- let R;
571
- e[36] !== S || e[37] !== j || e[38] !== O || e[39] !== c || e[40] !== i || e[41] !== u || e[42] !== s ? (R = i ? /* @__PURE__ */ H("div", { className: ve(s), children: /* @__PURE__ */ se("label", { id: j, className: Ye({
572
- className: u
573
- }), onClick: () => !S && O.current?.focus(), children: [
574
- i,
575
- c && /* @__PURE__ */ H(he, { component: "span", className: "text-red-600 dark:text-red-500 ml-1", children: "*" })
576
- ] }) }) : null, e[36] = S, e[37] = j, e[38] = O, e[39] = c, e[40] = i, e[41] = u, e[42] = s, e[43] = R) : R = e[43];
577
- const J = M ? "open" : "closed", $ = D ? "error" : "default";
578
- let K;
579
- e[44] !== $ || e[45] !== b ? (K = Qe({
580
- className: b,
581
- variant: $
582
- }), e[44] = $, e[45] = b, e[46] = K) : K = e[46];
583
- let le;
584
- e[47] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (le = /* @__PURE__ */ H(et, {}), e[47] = le) : le = e[47];
585
- const de = i ? j : void 0;
586
- let ce;
587
- e[48] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ce = ve("outline-0", "w-full", "caret-slate-800", "text-slate-800", "bg-transparent", "dark:caret-metal-50", "dark:text-metal-50", "disabled:cursor-not-allowed", "disabled:opacity-50"), e[48] = ce) : ce = e[48];
588
- let Y;
589
- e[49] !== r || e[50] !== S || e[51] !== O || e[52] !== p || e[53] !== W || e[54] !== de || e[55] !== B ? (Y = /* @__PURE__ */ se("div", { className: "p-2 flex items-center gap-2.5", children: [
590
- le,
591
- /* @__PURE__ */ H("input", { id: de, ref: O, name: p, autoComplete: "off", className: ce, type: "tel", inputMode: "tel", value: B, onChange: W, disabled: S, ...r })
592
- ] }), e[49] = r, e[50] = S, e[51] = O, e[52] = p, e[53] = W, e[54] = de, e[55] = B, e[56] = Y) : Y = e[56];
593
- let Q;
594
- e[57] !== M || e[58] !== y || e[59] !== N || e[60] !== h || e[61] !== w || e[62] !== k ? (Q = M && /* @__PURE__ */ H(tt, { placeholder: y, showFlagOnSearch: N, showInputFilter: h, showNameOnSearch: w, showPlaceHolder: k }), e[57] = M, e[58] = y, e[59] = N, e[60] = h, e[61] = w, e[62] = k, e[63] = Q) : Q = e[63];
595
- let q;
596
- e[64] !== J || e[65] !== K || e[66] !== Y || e[67] !== Q ? (q = /* @__PURE__ */ se("div", { ref: P, "data-state": J, className: K, children: [
597
- Y,
598
- Q
599
- ] }), e[64] = J, e[65] = K, e[66] = Y, e[67] = Q, e[68] = q) : q = e[68];
600
- let X;
601
- e[69] !== a ? (X = a ? /* @__PURE__ */ H(he, { component: "span", className: "text-xs text-red-700 dark:text-red-500", children: a }) : null, e[69] = a, e[70] = X) : X = e[70];
602
- let ee;
603
- e[71] !== a || e[72] !== o || e[73] !== l ? (ee = !a && o ? /* @__PURE__ */ H(he, { component: "span", className: ve("text-xs kubefirst-dark:text-slate-200", l), children: o }) : null, e[71] = a, e[72] = o, e[73] = l, e[74] = ee) : ee = e[74];
604
- let ue;
605
- return e[75] !== R || e[76] !== q || e[77] !== X || e[78] !== ee ? (ue = /* @__PURE__ */ se("div", { className: "w-full flex flex-col gap-2", children: [
606
- R,
607
- q,
608
- X,
609
- ee
610
- ] }), e[75] = R, e[76] = q, e[77] = X, e[78] = ee, e[79] = ue) : ue = e[79], ue;
611
- });
496
+ Ae.registerLocale(ut);
497
+ const Ot = Be(
498
+ ({
499
+ disabled: e = !1,
500
+ error: t,
501
+ helperText: n,
502
+ helperTextClassName: r,
503
+ isRequired: o,
504
+ label: a,
505
+ labelClassName: l,
506
+ labelWrapperClassName: u,
507
+ name: i,
508
+ placeholder: c,
509
+ showFlagOnSearch: s = !0,
510
+ showInputFilter: f = !0,
511
+ showNameOnSearch: S = !0,
512
+ wrapperClassName: M,
513
+ showPlaceHolder: j,
514
+ ...y
515
+ }, m) => {
516
+ const p = Re(), w = i ?? p, g = ne(null), {
517
+ isOpenSelector: E,
518
+ value: v,
519
+ selectedCountry: h,
520
+ onChangeValue: d,
521
+ handleOpenSelector: k
522
+ } = Ke(), P = typeof t == "string" && t.length >= 0, b = ot({
523
+ mask: De(h),
524
+ replacement: { _: /\d/ }
525
+ });
526
+ Ge(m, () => b.current, [b]);
527
+ const N = Le(
528
+ (O) => {
529
+ O.target.value.startsWith(h.prefix) ? d(O.target.value) : d(`${h.prefix} `);
530
+ },
531
+ [h.prefix, d]
532
+ );
533
+ return pe(() => {
534
+ const O = new AbortController(), C = (I) => {
535
+ I.key === "Escape" && k(!1);
536
+ }, T = (I) => {
537
+ g.current?.contains(I.target) || k(!1);
538
+ };
539
+ return document.addEventListener("keydown", C, {
540
+ signal: O.signal
541
+ }), document.addEventListener("mousedown", T, {
542
+ signal: O.signal
543
+ }), document.addEventListener(
544
+ "visibilitychange",
545
+ () => {
546
+ document.hidden && k(!1);
547
+ },
548
+ {
549
+ signal: O.signal
550
+ }
551
+ ), () => {
552
+ O.abort();
553
+ };
554
+ }, [k, g]), pe(() => {
555
+ b.current && (b.current.value = h.prefix + " ");
556
+ }, [h.code]), /* @__PURE__ */ Z("div", { className: "w-full flex flex-col gap-2", children: [
557
+ a ? /* @__PURE__ */ B("div", { className: ee(u), children: /* @__PURE__ */ Z(
558
+ "label",
559
+ {
560
+ id: w,
561
+ className: Ve({ className: l }),
562
+ onClick: () => !e && b.current?.focus(),
563
+ children: [
564
+ a,
565
+ o && /* @__PURE__ */ B(
566
+ X,
567
+ {
568
+ component: "span",
569
+ className: "text-red-600 dark:text-red-500 ml-1",
570
+ children: "*"
571
+ }
572
+ )
573
+ ]
574
+ }
575
+ ) }) : null,
576
+ /* @__PURE__ */ Z(
577
+ "div",
578
+ {
579
+ ref: g,
580
+ "data-state": E ? "open" : "closed",
581
+ className: xe({
582
+ className: M,
583
+ variant: P ? "error" : "default"
584
+ }),
585
+ children: [
586
+ /* @__PURE__ */ Z("div", { className: "p-2 flex items-center gap-2.5", children: [
587
+ /* @__PURE__ */ B(Fe, {}),
588
+ /* @__PURE__ */ B(
589
+ "input",
590
+ {
591
+ id: a ? w : void 0,
592
+ ref: b,
593
+ name: i,
594
+ autoComplete: "off",
595
+ className: ee(
596
+ "outline-0",
597
+ "w-full",
598
+ "caret-slate-800",
599
+ "text-slate-800",
600
+ "bg-transparent",
601
+ "dark:caret-metal-50",
602
+ "dark:text-metal-50",
603
+ "disabled:cursor-not-allowed",
604
+ "disabled:opacity-50"
605
+ ),
606
+ type: "tel",
607
+ inputMode: "tel",
608
+ value: v,
609
+ onChange: N,
610
+ disabled: e,
611
+ ...y
612
+ }
613
+ )
614
+ ] }),
615
+ E && /* @__PURE__ */ B(
616
+ Ue,
617
+ {
618
+ placeholder: c,
619
+ showFlagOnSearch: s,
620
+ showInputFilter: f,
621
+ showNameOnSearch: S,
622
+ showPlaceHolder: j
623
+ }
624
+ )
625
+ ]
626
+ }
627
+ ),
628
+ t ? /* @__PURE__ */ B(
629
+ X,
630
+ {
631
+ component: "span",
632
+ className: "text-xs text-red-700 dark:text-red-500",
633
+ children: t
634
+ }
635
+ ) : null,
636
+ !t && n ? /* @__PURE__ */ B(
637
+ X,
638
+ {
639
+ component: "span",
640
+ className: ee(
641
+ "text-xs kubefirst-dark:text-slate-200",
642
+ r
643
+ ),
644
+ children: n
645
+ }
646
+ ) : null
647
+ ] });
648
+ }
649
+ );
612
650
  export {
613
- Bt as Wrapper
651
+ Ot as Wrapper
614
652
  };