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

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 (263) hide show
  1. package/README.md +118 -31
  2. package/dist/{AdditionalOptions-D0BAS2HG.js → AdditionalOptions-Crcnz0_g.js} +1 -1
  3. package/dist/{AlertDialogTrigger-BGo_acd5.js → AlertDialogTrigger-ouMGAlJW.js} +39 -39
  4. package/dist/{Breadcrumb-Cp3abB2w.js → Breadcrumb-MrF1Z6w2.js} +3 -3
  5. package/dist/{Checkbox-B_ngk9Dj.js → Checkbox-8KnRLpQG.js} +60 -61
  6. package/dist/{CommandInput-BLq69pOT.js → CommandInput-CGnqfudl.js} +4 -4
  7. package/dist/{Counter-BV680M5r.js → Counter-CDXdP1Af.js} +3 -3
  8. package/dist/{DayPicker-kweJz134.js → DayPicker-C22j0Y-u.js} +539 -518
  9. package/dist/{DropdownButton-DfNojmCW.js → DropdownButton-D4QlKGg7.js} +7 -7
  10. package/dist/{FlagSelectorList-CkTR3j6O.js → FlagSelectorList-tYZNl-tz.js} +31 -24
  11. package/dist/{HamburgerTrigger-DRylBL2d.js → HamburgerTrigger-B_NGSZ2r.js} +20 -20
  12. package/dist/{ImageUpload-DiwymQcU.js → ImageUpload-D7HKSXK8.js} +71 -66
  13. package/dist/Input-is8n7emP.js +195 -0
  14. package/dist/{Loading-DUh9PMJN.js → Loading-DO8JOWBV.js} +1 -1
  15. package/dist/{Modal-Dyn088X7.js → Modal-Dq9BHD_9.js} +4 -4
  16. package/dist/{Spinner-CUwE2bLm.js → Spinner-BJE79VTl.js} +1 -1
  17. package/dist/{StepIndicatorContent-CjbjVjS1.js → StepIndicatorContent-BGDvxLzV.js} +1 -1
  18. package/dist/Switch-C7286Bcu.js +199 -0
  19. package/dist/{Toast-3NEz7LLa.js → Toast-jSx3Lao8.js} +8 -7
  20. package/dist/Wrapper-2AUlYAHQ.js +195 -0
  21. package/dist/{Wrapper-CVJSuYWx.js → Wrapper-CyHxGs4E.js} +4 -4
  22. package/dist/{Wrapper-DP6Sxngx.js → Wrapper-a7RVCcrn.js} +248 -242
  23. package/dist/components/Alert/Alert.js +2 -2
  24. package/dist/components/AlertDialog/AlertDialog.js +2 -2
  25. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  26. package/dist/components/AlertDialog/components/index.js +1 -1
  27. package/dist/components/Autocomplete/Autocomplete.js +1 -1
  28. package/dist/components/Autocomplete/components/List/List.js +1 -1
  29. package/dist/components/Autocomplete/hooks/useAutocomplete.js +27 -25
  30. package/dist/components/Autocomplete/hooks/useNavigationList.js +2 -3
  31. package/dist/components/Badge/Badge.js +2 -2
  32. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  33. package/dist/components/Breadcrumb/components/BackButton/BackButton.js +2 -2
  34. package/dist/components/Breadcrumb/components/Item/Item.js +2 -2
  35. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  36. package/dist/components/Button/Button.js +1 -1
  37. package/dist/components/ButtonGroup/ButtonGroup.js +65 -60
  38. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +2 -2
  39. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +10 -9
  40. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +8 -6
  41. package/dist/components/Card/Card.js +25 -22
  42. package/dist/components/Checkbox/Checkbox.js +1 -1
  43. package/dist/components/Command/Command.js +2 -2
  44. package/dist/components/Command/components/Command.js +1 -1
  45. package/dist/components/Command/components/CommandEmpty.js +1 -1
  46. package/dist/components/Command/components/CommandGroup.js +2 -2
  47. package/dist/components/Command/components/CommandInput.js +1 -1
  48. package/dist/components/Command/components/CommandItem.js +2 -2
  49. package/dist/components/Command/components/CommandList.js +2 -2
  50. package/dist/components/Command/components/CommandSeparator.js +2 -2
  51. package/dist/components/Command/components/CommandShortcut.js +1 -1
  52. package/dist/components/Command/components/DialogContent.js +3 -3
  53. package/dist/components/Command/components/DialogOverlay.js +2 -2
  54. package/dist/components/Command/components/index.js +1 -1
  55. package/dist/components/Counter/Counter.js +1 -1
  56. package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
  57. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +1 -1
  58. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +3 -3
  59. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +3 -3
  60. package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +1 -1
  61. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +2 -2
  62. package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
  63. package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
  64. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
  65. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +30 -28
  66. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +23 -21
  67. package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
  68. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +1 -1
  69. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +48 -41
  70. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +48 -41
  71. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +1 -1
  72. package/dist/components/Datepicker/DatePicker.js +2 -2
  73. package/dist/components/Divider/Divider.js +7 -7
  74. package/dist/components/Drawer/Drawer.js +28 -26
  75. package/dist/components/Drawer/components/Body/Body.js +1 -1
  76. package/dist/components/Drawer/components/Footer/Footer.js +1 -1
  77. package/dist/components/Drawer/components/Header/Header.js +1 -1
  78. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  79. package/dist/components/Filter/Filter.js +1 -1
  80. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +51 -36
  81. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +40 -38
  82. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +1 -1
  83. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
  84. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +1 -1
  85. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +1 -1
  86. package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +2 -2
  87. package/dist/components/Filter/components/ResetButton/ResetButton.js +1 -1
  88. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +43 -41
  89. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +1 -1
  90. package/dist/components/Filter/utils/index.js +1 -1
  91. package/dist/components/ImageUpload/ImageUpload.js +1 -1
  92. package/dist/components/Input/Input.js +1 -1
  93. package/dist/components/LineChart/LineChart.js +2 -2
  94. package/dist/components/Loading/Loading.js +1 -1
  95. package/dist/components/Modal/Modal.js +1 -1
  96. package/dist/components/Modal/components/Body/Body.js +1 -1
  97. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  98. package/dist/components/Modal/components/Header/Header.js +1 -1
  99. package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
  100. package/dist/components/Modal/components/index.js +1 -1
  101. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
  102. package/dist/components/MultiSelectDropdown/components/Item/Item.js +1 -1
  103. package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
  104. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
  105. package/dist/components/MultiSelectDropdown/components/index.js +1 -1
  106. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +4 -3
  107. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +17 -16
  108. package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +11 -11
  109. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +2 -2
  110. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +1 -1
  111. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
  112. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +3 -3
  113. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +3 -3
  114. package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
  115. package/dist/components/PhoneNumberInput/components/index.js +2 -2
  116. package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
  117. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
  118. package/dist/components/PhoneNumberInput/utils/index.js +1 -1
  119. package/dist/components/PieChart/PieChart.js +31 -28
  120. package/dist/components/ProgressBar/ProgressBar.js +1 -1
  121. package/dist/components/Radio/Radio.js +1 -1
  122. package/dist/components/RadioCard/RadioCard.js +1 -1
  123. package/dist/components/RadioCardGroup/RadioCardGroup.js +1 -1
  124. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  125. package/dist/components/Range/Range.js +2 -2
  126. package/dist/components/Select/Select.js +43 -36
  127. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
  128. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +1 -1
  129. package/dist/components/Select/components/List/List.js +78 -67
  130. package/dist/components/Select/components/ListItem/ListItem.js +1 -1
  131. package/dist/components/Select/components/Wrapper.js +1 -1
  132. package/dist/components/Select/components/index.js +2 -2
  133. package/dist/components/Select/hooks/useNavigationList.js +2 -3
  134. package/dist/components/Select/hooks/useSelect.js +8 -8
  135. package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +1 -1
  136. package/dist/components/Sidebar/components/Footer/Footer.js +1 -1
  137. package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
  138. package/dist/components/Sidebar/components/Label/Label.js +1 -1
  139. package/dist/components/Sidebar/components/Logo/Logo.js +1 -1
  140. package/dist/components/Sidebar/components/Navigation/Navigation.js +1 -1
  141. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +1 -1
  142. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +2 -2
  143. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +1 -1
  144. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +1 -1
  145. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +25 -24
  146. package/dist/components/Sidebar/components/index.js +1 -1
  147. package/dist/components/Slider/Slider.js +2 -2
  148. package/dist/components/Spinner/Spinner.js +1 -1
  149. package/dist/components/Stepper/Stepper.js +1 -1
  150. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +2 -2
  151. package/dist/components/Stepper/components/StepConnector/StepConnector.js +1 -1
  152. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +1 -1
  153. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +2 -2
  154. package/dist/components/Switch/Switch.js +1 -1
  155. package/dist/components/Switch/Switch.variants.js +15 -7
  156. package/dist/components/Table/Table.js +1 -1
  157. package/dist/components/Table/components/Body.js +1 -1
  158. package/dist/components/Table/components/Filter.js +1 -1
  159. package/dist/components/Table/components/Head.js +1 -1
  160. package/dist/components/Table/components/Row.js +1 -1
  161. package/dist/components/Tabs/Tabs.js +2 -2
  162. package/dist/components/Tabs/components/Content.js +2 -2
  163. package/dist/components/Tabs/components/List.js +2 -2
  164. package/dist/components/Tabs/components/Trigger.js +2 -2
  165. package/dist/components/Tag/Tag.js +8 -8
  166. package/dist/components/TagSelect/TagSelect.js +1 -1
  167. package/dist/components/TagSelect/components/Item/Item.js +1 -1
  168. package/dist/components/TagSelect/components/List/List.js +1 -1
  169. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
  170. package/dist/components/TagSelect/components/index.js +1 -1
  171. package/dist/components/TagSelect/hooks/useTagSelect.js +11 -11
  172. package/dist/components/TextArea/TextArea.js +71 -26
  173. package/dist/components/TextArea/TextArea.variants.js +49 -13
  174. package/dist/components/TimePicker/components/HoursList/HoursList.js +1 -1
  175. package/dist/components/TimePicker/components/MeridianList/MeridianList.js +1 -1
  176. package/dist/components/TimePicker/components/MinutesList/MinutesList.js +1 -1
  177. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +114 -99
  178. package/dist/components/TimePicker/components/WrapperList/WrapperList.js +19 -18
  179. package/dist/components/Toast/Toast.js +1 -1
  180. package/dist/components/Tooltip/Tooltip.js +2 -2
  181. package/dist/components/Typography/Typography.js +19 -16
  182. package/dist/components/VirtualizedTable/VirtualizedTable.js +2 -2
  183. package/dist/components/VirtualizedTable/components/Actions/Actions.js +1 -1
  184. package/dist/components/VirtualizedTable/components/Body/Body.js +2 -2
  185. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +1 -1
  186. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +2 -2
  187. package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +1 -1
  188. package/dist/components/VirtualizedTable/components/Filter/Filter.js +4 -4
  189. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
  190. package/dist/components/VirtualizedTable/components/Header/Header.js +2 -2
  191. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +1 -1
  192. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +1 -1
  193. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +3 -3
  194. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +1 -1
  195. package/dist/components/VirtualizedTable/contexts/index.js +1 -1
  196. package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
  197. package/dist/components/index.js +12 -12
  198. package/dist/{components-Cf345jTv.js → components-CaEW5ge4.js} +32 -32
  199. package/dist/{constants-CxJJRVK3.js → constants-HQIXhj2t.js} +2 -2
  200. package/dist/contexts/index.js +1 -1
  201. package/dist/contexts/theme.provider.js +1 -1
  202. package/dist/{debounce-C5Ycjilj.js → debounce-BdyZeJQk.js} +2 -2
  203. package/dist/{dist-DFCz63oC2.js → dist-9WbMf_jT.js} +158 -159
  204. package/dist/{dist-tGUUcv8n.js → dist-AxOGvL82.js} +114 -115
  205. package/dist/{dist-DDck_2lb.js → dist-BIBFLVt1.js} +117 -116
  206. package/dist/{dist-BZNE2Tnx.js → dist-BbX4Nrk2.js} +1 -1
  207. package/dist/{dist-BaPW7qXd2.js → dist-BnCbAI-c.js} +1 -1
  208. package/dist/{dist-BdobXn93.js → dist-CszFjHAP.js} +2 -2
  209. package/dist/{dist-C3YVLapk.js → dist-DO3apbIh.js} +24 -24
  210. package/dist/{dist-CzKqHuqJ2.js → dist-DwxO2RoR.js} +38 -38
  211. package/dist/{dist-AihTpWdF.js → dist-iUAHw-3y.js} +272 -272
  212. package/dist/{dist-BlPTJNIm.js → dist-pxvIAJzo.js} +2 -2
  213. package/dist/es2015-B_07N-UL.js +796 -0
  214. package/dist/hooks/useMediaQuery.js +1 -1
  215. package/dist/index.js +14 -14
  216. package/dist/{isObject-BeFFiVJK.js → isObject-pLoSfdr0.js} +1 -1
  217. package/dist/lib/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.types.d.ts +1 -1
  218. package/dist/lib/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.types.d.ts +2 -0
  219. package/dist/lib/components/Card/Card.types.d.ts +1 -0
  220. package/dist/lib/components/Checkbox/Checkbox.d.ts +1 -1
  221. package/dist/lib/components/Checkbox/Checkbox.types.d.ts +2 -1
  222. package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.types.d.ts +1 -0
  223. package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.types.d.ts +1 -0
  224. package/dist/lib/components/Divider/Divider.d.ts +3 -2
  225. package/dist/lib/components/Divider/Divider.types.d.ts +4 -0
  226. package/dist/lib/components/Input/Input.types.d.ts +4 -0
  227. package/dist/lib/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +2 -0
  228. package/dist/lib/components/MultiSelectDropdown/contexts/MultiSelectDropdown.types.d.ts +2 -0
  229. package/dist/lib/components/Select/Select.types.d.ts +2 -0
  230. package/dist/lib/components/Select/components/List/List.types.d.ts +3 -0
  231. package/dist/lib/components/Select/components/Wrapper.d.ts +2 -0
  232. package/dist/lib/components/Sidebar/Sidebar.types.d.ts +2 -0
  233. package/dist/lib/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.types.d.ts +2 -0
  234. package/dist/lib/components/Switch/Switch.variants.d.ts +3 -1
  235. package/dist/lib/components/Tag/Tag.types.d.ts +1 -0
  236. package/dist/lib/components/TextArea/TextArea.d.ts +6 -0
  237. package/dist/lib/components/TextArea/TextArea.types.d.ts +13 -2
  238. package/dist/lib/components/TextArea/TextArea.variants.d.ts +4 -1
  239. package/dist/lib/components/TimePicker/TimePicker.types.d.ts +4 -0
  240. package/dist/lib/components/TimePicker/components/WrapperList/WrapperList.types.d.ts +1 -0
  241. package/dist/lib/utils/index.d.ts +1 -0
  242. package/dist/{libphonenumber-hGupNnJu.js → libphonenumber-BMq3Thej.js} +356 -347
  243. package/dist/package.json +27 -27
  244. package/dist/{phone-number.provider-BxQCTxp8.js → phone-number.provider-Dkq_p1Gi.js} +2 -2
  245. package/dist/{prop-types-CfEYxTbR.js → prop-types-BCUW56rg.js} +1 -1
  246. package/dist/{react-CvUtBTMg.js → react-7zQ6bvbE.js} +837 -828
  247. package/dist/{rolldown-runtime-Ck3dxwZt.js → rolldown-runtime-Dw9YIBcH.js} +1 -1
  248. package/dist/styles.css +1 -1
  249. package/dist/{table.provider-B0BafHuU.js → table.provider-CWzODR1t.js} +96 -96
  250. package/dist/{theme.provider-Dw4O3ocC.js → theme.provider-CSL1WCYG.js} +1 -1
  251. package/dist/{useBreadcrumb-DYfZL_2p.js → useBreadcrumb-Ds_9BeFz.js} +7 -6
  252. package/dist/utils/index.js +6 -5
  253. package/dist/{utils-Cx-WzRZF.js → utils-B-6R7kNE.js} +8 -4
  254. package/dist/{utils-B-BTGYA5.js → utils-DVYdP0CJ.js} +2 -3
  255. package/dist/{x-BI9jmc7e.js → x-Ierxf0uI.js} +2 -2
  256. package/package.json +27 -27
  257. package/dist/Input-Cf44DzfE.js +0 -188
  258. package/dist/Switch-aPhL5rNG.js +0 -196
  259. package/dist/Wrapper-R8fik3ah.js +0 -182
  260. package/dist/es2015-DigR3dar.js +0 -795
  261. /package/dist/{dist-DGOjiAnB2.js → dist-DGOjiAnB.js} +0 -0
  262. /package/dist/{dist-pWlMx4Fi2.js → dist-pWlMx4Fi.js} +0 -0
  263. /package/dist/{x-a_LpoXzG2.js → x-a_LpoXzG.js} +0 -0
@@ -1,21 +1,21 @@
1
- import { o as Ne } from "./rolldown-runtime-Ck3dxwZt.js";
2
- import { t as X } from "./utils-Cx-WzRZF.js";
3
- import { useClickOutside as Be } from "./hooks/useClickOutside.js";
1
+ import { o as Ne } from "./rolldown-runtime-Dw9YIBcH.js";
2
+ import { n as Be, t as X } from "./utils-B-6R7kNE.js";
3
+ import { useClickOutside as Re } from "./hooks/useClickOutside.js";
4
4
  import { Typography as ee } from "./components/Typography/Typography.js";
5
- import { n as Re } from "./phone-number.provider-BxQCTxp8.js";
6
- import { usePhoneNumberContext as Ge } from "./components/PhoneNumberInput/contexts/phone-number.hook.js";
7
- import { labelVariants as Le, phoneNumberInputVariants as Ve } from "./components/PhoneNumberInput/PhoneNumberInput.variants.js";
8
- import { getPhoneMask as xe } from "./components/PhoneNumberInput/utils/index.js";
9
- import { FlagContent as Ke } from "./components/PhoneNumberInput/components/FlagContent/FlagContent.js";
10
- import { FlagSelectorWrapper as De } from "./components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js";
11
- import { forwardRef as Fe, useCallback as pe, useEffect as fe, useId as Ue, useImperativeHandle as _e, useMemo as $e, useRef as te } from "react";
12
- import { jsx as B, jsxs as Z } from "react/jsx-runtime";
13
- function de(e, n) {
5
+ import { n as Ge } from "./phone-number.provider-Dkq_p1Gi.js";
6
+ import { usePhoneNumberContext as Le } from "./components/PhoneNumberInput/contexts/phone-number.hook.js";
7
+ import { labelVariants as xe, phoneNumberInputVariants as Ve } from "./components/PhoneNumberInput/PhoneNumberInput.variants.js";
8
+ import { getPhoneMask as Ke } from "./components/PhoneNumberInput/utils/index.js";
9
+ import { FlagContent as De } from "./components/PhoneNumberInput/components/FlagContent/FlagContent.js";
10
+ import { FlagSelectorWrapper as Fe } from "./components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js";
11
+ import { forwardRef as Ue, useCallback as pe, useEffect as de, useId as _e, useImperativeHandle as $e, useMemo as ze, useRef as te } from "react";
12
+ import { jsx as V, jsxs as Z } from "react/jsx-runtime";
13
+ function fe(e, n) {
14
14
  (n == null || n > e.length) && (n = e.length);
15
15
  for (var t = 0, r = Array(n); t < n; t++) r[t] = e[t];
16
16
  return r;
17
17
  }
18
- function ze(e, n, t) {
18
+ function He(e, n, t) {
19
19
  return n = Y(n), (function(r, o) {
20
20
  if (o && (typeof o == "object" || typeof o == "function")) return o;
21
21
  if (o !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
@@ -25,10 +25,10 @@ function ze(e, n, t) {
25
25
  })(r);
26
26
  })(e, ke() ? Reflect.construct(n, t || [], Y(e).constructor) : n.apply(e, t));
27
27
  }
28
- function He(e, n) {
28
+ function We(e, n) {
29
29
  if (!(e instanceof n)) throw new TypeError("Cannot call a class as a function");
30
30
  }
31
- function We(e, n, t) {
31
+ function Ze(e, n, t) {
32
32
  return Object.defineProperty(e, "prototype", { writable: !1 }), e;
33
33
  }
34
34
  function Se(e, n) {
@@ -36,9 +36,9 @@ function Se(e, n) {
36
36
  if (!t) {
37
37
  if (Array.isArray(e) || (t = (function(i, u) {
38
38
  if (i) {
39
- if (typeof i == "string") return de(i, u);
39
+ if (typeof i == "string") return fe(i, u);
40
40
  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) ? de(i, u) : void 0;
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) ? fe(i, u) : void 0;
42
42
  }
43
43
  })(e)) || n) {
44
44
  t && (e = t);
@@ -107,7 +107,7 @@ function Y(e) {
107
107
  return n.__proto__ || Object.getPrototypeOf(n);
108
108
  }, Y(e);
109
109
  }
110
- function Ze(e, n) {
110
+ function Je(e, n) {
111
111
  if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function");
112
112
  e.prototype = Object.create(n && n.prototype, { constructor: {
113
113
  value: e,
@@ -146,7 +146,7 @@ function J(e) {
146
146
  }
147
147
  return e;
148
148
  }
149
- function Je(e, n) {
149
+ function Ye(e, n) {
150
150
  if (e == null) return {};
151
151
  var t, r, o = (function(l, c) {
152
152
  if (l == null) return {};
@@ -168,15 +168,15 @@ function re(e, n) {
168
168
  return t.__proto__ = r, t;
169
169
  }, re(e, n);
170
170
  }
171
- function U(e, n) {
171
+ function $(e, n) {
172
172
  var t, r = n.replacementChars, o = n.replacement, a = n.separate, l = r, c = "", i = Se(e);
173
173
  try {
174
174
  for (i.s(); !(t = i.n()).done; ) {
175
- var u, s = t.value, f = !Object.prototype.hasOwnProperty.call(o, s) && ((u = o[l[0]]) === null || u === void 0 ? void 0 : u.test(s));
176
- (a && s === l[0] || f) && (l = l.slice(1), c += s);
175
+ var u, s = t.value, d = !Object.prototype.hasOwnProperty.call(o, s) && ((u = o[l[0]]) === null || u === void 0 ? void 0 : u.test(s));
176
+ (a && s === l[0] || d) && (l = l.slice(1), c += s);
177
177
  }
178
- } catch (O) {
179
- i.e(O);
178
+ } catch (g) {
179
+ i.e(g);
180
180
  } finally {
181
181
  i.f();
182
182
  }
@@ -190,14 +190,14 @@ function Me(e, n) {
190
190
  if (!l && e[c] === void 0) break;
191
191
  Object.prototype.hasOwnProperty.call(o, s) && e[c] !== void 0 ? i += e[c++] : i += s;
192
192
  }
193
- } catch (O) {
194
- u.e(O);
193
+ } catch (g) {
194
+ u.e(g);
195
195
  } finally {
196
196
  u.f();
197
197
  }
198
198
  if (a && !l) {
199
- for (var f = r.length - 1; f >= 0 && i[f] === r[f]; f--) ;
200
- i = i.slice(0, f + 1);
199
+ for (var d = r.length - 1; d >= 0 && i[d] === r[d]; d--) ;
200
+ i = i.slice(0, d + 1);
201
201
  }
202
202
  return i;
203
203
  }
@@ -212,19 +212,19 @@ function Pe(e, n) {
212
212
  }
213
213
  return o;
214
214
  }
215
- function K(e) {
215
+ function _(e) {
216
216
  return e.length > 0 ? we({}, e, /./) : {};
217
217
  }
218
218
  function ae(e, n) {
219
- for (var t = n.start, r = t === void 0 ? 0 : t, o = n.end, a = n.mask, l = n.replacement, c = n.separate, i = e.slice(r, o), u = a.slice(r, o), s = "", f = 0; f < u.length; f++) {
220
- var O = Object.prototype.hasOwnProperty.call(l, u[f]);
221
- O && i[f] !== void 0 && i[f] !== u[f] ? s += i[f] : O && c && (s += u[f]);
219
+ for (var t = n.start, r = t === void 0 ? 0 : t, o = n.end, a = n.mask, l = n.replacement, c = n.separate, i = e.slice(r, o), u = a.slice(r, o), s = "", d = 0; d < u.length; d++) {
220
+ var g = Object.prototype.hasOwnProperty.call(l, u[d]);
221
+ g && i[d] !== void 0 && i[d] !== u[d] ? s += i[d] : g && c && (s += u[d]);
222
222
  }
223
223
  return s;
224
224
  }
225
225
  function Ee(e, n) {
226
- var t = n.mask, r = n.replacement, o = typeof r == "string" ? K(r) : r, a = RegExp("[^".concat(Object.keys(o).join(""), "]"), "g");
227
- return Me(U(e, {
226
+ var t = n.mask, r = n.replacement, o = typeof r == "string" ? _(r) : r, a = RegExp("[^".concat(Object.keys(o).join(""), "]"), "g");
227
+ return Me($(e, {
228
228
  replacementChars: t.replace(a, ""),
229
229
  replacement: o,
230
230
  separate: !1
@@ -235,20 +235,20 @@ function Ee(e, n) {
235
235
  showMask: !1
236
236
  });
237
237
  }
238
- function Ye(e, n) {
239
- var t = n.mask, r = n.replacement, o = typeof r == "string" ? K(r) : r, a = ae(e, {
238
+ function Qe(e, n) {
239
+ var t = n.mask, r = n.replacement, o = typeof r == "string" ? _(r) : r, a = ae(e, {
240
240
  mask: t,
241
241
  replacement: o,
242
242
  separate: !1
243
243
  }), l = RegExp("[^".concat(Object.keys(o).join(""), "]"), "g");
244
- return U(a, {
244
+ return $(a, {
245
245
  replacementChars: t.replace(l, ""),
246
246
  replacement: o,
247
247
  separate: !1
248
248
  });
249
249
  }
250
- function Qe(e, n) {
251
- var t = n.mask, r = n.replacement, o = typeof r == "string" ? K(r) : r;
250
+ function qe(e, n) {
251
+ var t = n.mask, r = n.replacement, o = typeof r == "string" ? _(r) : r;
252
252
  return Pe(Ee(e, {
253
253
  mask: t,
254
254
  replacement: o
@@ -257,7 +257,7 @@ function Qe(e, n) {
257
257
  replacement: o
258
258
  });
259
259
  }
260
- var qe = [
260
+ var Xe = [
261
261
  "[",
262
262
  "]",
263
263
  "\\",
@@ -275,29 +275,29 @@ var qe = [
275
275
  "}"
276
276
  ];
277
277
  function ve(e) {
278
- return qe.includes(e) ? "\\".concat(e) : e;
278
+ return Xe.includes(e) ? "\\".concat(e) : e;
279
279
  }
280
- function Xe(e, n) {
281
- for (var t = n.mask, r = n.replacement, o = typeof r == "string" ? K(r) : r, a = e === "partial" || e === "partial-inexact", l = e === "full" || e === "partial", c = "", i = 0; i < t.length; i++) {
280
+ function en(e, n) {
281
+ for (var t = n.mask, r = n.replacement, o = typeof r == "string" ? _(r) : r, a = e === "partial" || e === "partial-inexact", l = e === "full" || e === "partial", c = "", i = 0; i < t.length; i++) {
282
282
  var u = t[i];
283
283
  i === 0 && (c = "^"), a && (c += "("), c += Object.prototype.hasOwnProperty.call(o, u) ? "".concat(l ? "(?!".concat(ve(u), ")") : "", "(").concat(o[u].source, ")") : ve(u), i === t.length - 1 && (a && (c += ")?".repeat(t.length)), c += "$");
284
284
  }
285
285
  return c;
286
286
  }
287
- function en(e, n) {
287
+ function nn(e, n) {
288
288
  return new Proxy(e, { set: function(t, r, o) {
289
289
  return r === "current" && (o !== e.current && (e.current !== null && n.unregister(e.current), o !== null && n.register(o)), t[r] = o, !0);
290
290
  } });
291
291
  }
292
- function nn(e, n, t) {
293
- return n = $(n), (function(r, o) {
292
+ function tn(e, n, t) {
293
+ return n = H(n), (function(r, o) {
294
294
  if (o && (typeof o == "object" || typeof o == "function")) return o;
295
295
  if (o !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
296
296
  return (function(a) {
297
297
  if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
298
298
  return a;
299
299
  })(r);
300
- })(e, ie() ? Reflect.construct(n, t || [], $(e).constructor) : n.apply(e, t));
300
+ })(e, ie() ? Reflect.construct(n, t || [], H(e).constructor) : n.apply(e, t));
301
301
  }
302
302
  function Ce(e, n) {
303
303
  if (!(e instanceof n)) throw new TypeError("Cannot call a class as a function");
@@ -305,7 +305,7 @@ function Ce(e, n) {
305
305
  function je(e, n, t) {
306
306
  return Object.defineProperty(e, "prototype", { writable: !1 }), e;
307
307
  }
308
- function tn(e, n, t) {
308
+ function rn(e, n, t) {
309
309
  return (n = (function(r) {
310
310
  var o = (function(a, l) {
311
311
  if (typeof a != "object" || !a) return a;
@@ -325,18 +325,18 @@ function tn(e, n, t) {
325
325
  writable: !0
326
326
  }) : e[n] = t, e;
327
327
  }
328
- function $(e) {
329
- return $ = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
328
+ function H(e) {
329
+ return H = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
330
330
  return n.__proto__ || Object.getPrototypeOf(n);
331
- }, $(e);
331
+ }, H(e);
332
332
  }
333
- function rn(e, n) {
333
+ function an(e, n) {
334
334
  if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function");
335
335
  e.prototype = Object.create(n && n.prototype, { constructor: {
336
336
  value: e,
337
337
  writable: !0,
338
338
  configurable: !0
339
- } }), Object.defineProperty(e, "prototype", { writable: !1 }), n && z(e, n);
339
+ } }), Object.defineProperty(e, "prototype", { writable: !1 }), n && W(e, n);
340
340
  }
341
341
  function ie() {
342
342
  try {
@@ -362,14 +362,14 @@ function ye(e) {
362
362
  for (var n = 1; n < arguments.length; n++) {
363
363
  var t = arguments[n] != null ? arguments[n] : {};
364
364
  n % 2 ? he(Object(t), !0).forEach((function(r) {
365
- tn(e, r, t[r]);
365
+ rn(e, r, t[r]);
366
366
  })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : he(Object(t)).forEach((function(r) {
367
367
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
368
368
  }));
369
369
  }
370
370
  return e;
371
371
  }
372
- function an(e, n) {
372
+ function on(e, n) {
373
373
  if (e == null) return {};
374
374
  var t, r, o = (function(l, c) {
375
375
  if (l == null) return {};
@@ -386,10 +386,10 @@ function an(e, n) {
386
386
  }
387
387
  return o;
388
388
  }
389
- function z(e, n) {
390
- return z = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
389
+ function W(e, n) {
390
+ return W = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
391
391
  return t.__proto__ = r, t;
392
- }, z(e, n);
392
+ }, W(e, n);
393
393
  }
394
394
  function oe(e) {
395
395
  var n = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
@@ -412,24 +412,24 @@ function oe(e) {
412
412
  var c = [null];
413
413
  c.push.apply(c, a);
414
414
  var i = new (o.bind.apply(o, c))();
415
- return l && z(i, l.prototype), i;
416
- })(t, arguments, $(this).constructor);
415
+ return l && W(i, l.prototype), i;
416
+ })(t, arguments, H(this).constructor);
417
417
  }
418
418
  return r.prototype = Object.create(t.prototype, { constructor: {
419
419
  value: r,
420
420
  enumerable: !1,
421
421
  writable: !0,
422
422
  configurable: !0
423
- } }), z(r, t);
423
+ } }), W(r, t);
424
424
  }, oe(e);
425
425
  }
426
- var _ = (function(e) {
426
+ var z = (function(e) {
427
427
  function n(t) {
428
428
  var r;
429
- return Ce(this, n), (r = nn(this, n, [t])).name = "SyntheticChangeError", r;
429
+ return Ce(this, n), (r = tn(this, n, [t])).name = "SyntheticChangeError", r;
430
430
  }
431
- return rn(n, e), je(n);
432
- })(oe(Error)), ge, on = ["options"], be = [
431
+ return an(n, e), je(n);
432
+ })(oe(Error)), ge, ln = ["options"], be = [
433
433
  "text",
434
434
  "email",
435
435
  "tel",
@@ -442,69 +442,69 @@ var _ = (function(e) {
442
442
  this.register = function(a) {
443
443
  var l;
444
444
  if (be.includes(a.type)) {
445
- var c = (l = a._wrapperState) !== null && l !== void 0 ? l : {}, i = c.initialValue, u = i === void 0 ? "" : i, s = c.controlled, f = s !== void 0 && s, O = t({
445
+ var c = (l = a._wrapperState) !== null && l !== void 0 ? l : {}, i = c.initialValue, u = i === void 0 ? "" : i, s = c.controlled, d = s !== void 0 && s, g = t({
446
446
  initialValue: a.value || u,
447
- controlled: f
448
- }), P = O.value, j = O.options, y = {
449
- value: P,
450
- options: j,
451
- fallbackOptions: j
452
- }, m = {
447
+ controlled: d
448
+ }), j = g.value, A = g.options, h = {
449
+ value: j,
450
+ options: A,
451
+ fallbackOptions: A
452
+ }, v = {
453
453
  id: -1,
454
454
  cachedId: -1
455
455
  }, p = {
456
456
  value: "",
457
457
  selectionStart: 0,
458
458
  selectionEnd: 0
459
- }, S = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
460
- Object.defineProperty(a, "value", ye(ye({}, S), {}, { set: function(h) {
461
- var d;
462
- p.value = h, S == null || (d = S.set) === null || d === void 0 || d.call(a, h);
463
- } })), a.value = P;
464
- var w = function() {
465
- var h = function() {
466
- var d, k;
467
- 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);
459
+ }, O = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
460
+ Object.defineProperty(a, "value", ye(ye({}, O), {}, { set: function(y) {
461
+ var m;
462
+ p.value = y, O == null || (m = O.set) === null || m === void 0 || m.call(a, y);
463
+ } })), a.value = j;
464
+ var S = function() {
465
+ var y = function() {
466
+ var m, T;
467
+ p.selectionStart = (m = a.selectionStart) !== null && m !== void 0 ? m : 0, p.selectionEnd = (T = a.selectionEnd) !== null && T !== void 0 ? T : 0, v.id = window.setTimeout(y);
468
468
  };
469
- m.id = window.setTimeout(h);
470
- }, E = function() {
471
- window.clearTimeout(m.id), m.id = -1, m.cachedId = -1;
472
- }, v = function(h) {
469
+ v.id = window.setTimeout(y);
470
+ }, M = function() {
471
+ window.clearTimeout(v.id), v.id = -1, v.cachedId = -1;
472
+ }, f = function(y) {
473
473
  try {
474
- var d, k;
475
- if (m.cachedId === m.id) throw new _("The input selection has not been updated.");
476
- m.cachedId = m.id;
477
- var M = a.value, g = a.selectionStart, A = a.selectionEnd;
478
- if (g === null || A === null) throw new _("The selection attributes have not been initialized.");
479
- var C, b = p.value;
480
- if (h.inputType === void 0 && (p.selectionStart = 0, p.selectionEnd = b.length), g > p.selectionStart ? C = "insert" : g <= p.selectionStart && g < p.selectionEnd ? C = "deleteBackward" : g === p.selectionEnd && M.length < b.length && (C = "deleteForward"), C === void 0 || (C === "deleteBackward" || C === "deleteForward") && M.length > b.length) throw new _("Input type detection error.");
481
- var T = "", N = p.selectionStart, R = p.selectionEnd;
482
- if (C === "insert") T = M.slice(p.selectionStart, g);
474
+ var m, T;
475
+ if (v.cachedId === v.id) throw new z("The input selection has not been updated.");
476
+ v.cachedId = v.id;
477
+ var P = a.value, b = a.selectionStart, B = a.selectionEnd;
478
+ if (b === null || B === null) throw new z("The selection attributes have not been initialized.");
479
+ var w, k = p.value;
480
+ if (y.inputType === void 0 && (p.selectionStart = 0, p.selectionEnd = k.length), b > p.selectionStart ? w = "insert" : b <= p.selectionStart && b < p.selectionEnd ? w = "deleteBackward" : b === p.selectionEnd && P.length < k.length && (w = "deleteForward"), w === void 0 || (w === "deleteBackward" || w === "deleteForward") && P.length > k.length) throw new z("Input type detection error.");
481
+ var I = "", R = p.selectionStart, E = p.selectionEnd;
482
+ if (w === "insert") I = P.slice(p.selectionStart, b);
483
483
  else {
484
- var D = b.length - M.length;
485
- N = g, R = g + D;
484
+ var L = k.length - P.length;
485
+ R = b, E = b + L;
486
486
  }
487
- y.value !== b ? y.options = y.fallbackOptions : y.fallbackOptions = y.options;
488
- var F = y.options, G = r({
489
- inputType: C,
490
- previousValue: b,
491
- previousOptions: F,
492
- value: M,
493
- addedValue: T,
494
- changeStart: N,
495
- changeEnd: R,
496
- selectionStart: g,
497
- selectionEnd: A
498
- }), H = G.options, I = an(G, on);
499
- a.value = I.value, a.setSelectionRange(I.selectionStart, I.selectionEnd), y.value = I.value, y.options = H, p.selectionStart = I.selectionStart, p.selectionEnd = I.selectionEnd, (d = a._valueTracker) === null || d === void 0 || (k = d.setValue) === null || k === void 0 || k.call(d, b);
500
- } catch (W) {
501
- if (a.value = p.value, a.setSelectionRange(p.selectionStart, p.selectionEnd), h.preventDefault(), h.stopPropagation(), W.name !== "SyntheticChangeError") throw W;
487
+ h.value !== k ? h.options = h.fallbackOptions : h.fallbackOptions = h.options;
488
+ var x = h.options, G = r({
489
+ inputType: w,
490
+ previousValue: k,
491
+ previousOptions: x,
492
+ value: P,
493
+ addedValue: I,
494
+ changeStart: R,
495
+ changeEnd: E,
496
+ selectionStart: b,
497
+ selectionEnd: B
498
+ }), C = G.options, N = on(G, ln);
499
+ a.value = N.value, a.setSelectionRange(N.selectionStart, N.selectionEnd), h.value = N.value, h.options = C, p.selectionStart = N.selectionStart, p.selectionEnd = N.selectionEnd, (m = a._valueTracker) === null || m === void 0 || (T = m.setValue) === null || T === void 0 || T.call(m, k);
500
+ } catch (K) {
501
+ if (a.value = p.value, a.setSelectionRange(p.selectionStart, p.selectionEnd), y.preventDefault(), y.stopPropagation(), K.name !== "SyntheticChangeError") throw K;
502
502
  }
503
503
  };
504
- document.activeElement === a && w(), a.addEventListener("focus", w), a.addEventListener("blur", E), a.addEventListener("input", v), o.set(a, {
505
- onFocus: w,
506
- onBlur: E,
507
- onInput: v
504
+ document.activeElement === a && S(), a.addEventListener("focus", S), a.addEventListener("blur", M), a.addEventListener("input", f), o.set(a, {
505
+ onFocus: S,
506
+ onBlur: M,
507
+ onInput: f
508
508
  });
509
509
  } else process.env.NODE_ENV !== "production" && console.warn("Warn: The input element type does not match one of the types: ".concat(be.join(", "), "."));
510
510
  }, this.unregister = function(a) {
@@ -526,12 +526,12 @@ var ne = function(e) {
526
526
  `), `
527
527
  `));
528
528
  };
529
- }, Oe, ln = ["track", "modify"];
530
- function x(e) {
529
+ }, Oe, cn = ["track", "modify"];
530
+ function U(e) {
531
531
  var n, t, r, o;
532
532
  return {
533
533
  mask: (n = e.mask) !== null && n !== void 0 ? n : "",
534
- replacement: typeof e.replacement == "string" ? K(e.replacement) : (t = e.replacement) !== null && t !== void 0 ? t : {},
534
+ replacement: typeof e.replacement == "string" ? _(e.replacement) : (t = e.replacement) !== null && t !== void 0 ? t : {},
535
535
  showMask: (r = e.showMask) !== null && r !== void 0 && r,
536
536
  separate: (o = e.separate) !== null && o !== void 0 && o,
537
537
  track: e.track,
@@ -541,24 +541,24 @@ function x(e) {
541
541
  var Ie = (function(e) {
542
542
  function n() {
543
543
  var t, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
544
- return He(this, n), (t = ze(this, n, [{
544
+ return We(this, n), (t = He(this, n, [{
545
545
  init: function(o) {
546
- var a = o.initialValue, l = o.controlled, c = x(r), i = c.mask, u = c.replacement, s = c.separate, f = c.showMask;
547
- return a = l || a ? a : f ? i : "", process.env.NODE_ENV !== "production" && (function(O) {
548
- var P = O.initialValue, j = O.mask, y = O.replacement;
549
- P.length > j.length && console.error(ne(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(P, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
550
- var m = Object.keys(y).filter((function(v) {
551
- return v.length > 1;
546
+ var a = o.initialValue, l = o.controlled, c = U(r), i = c.mask, u = c.replacement, s = c.separate, d = c.showMask;
547
+ return a = l || a ? a : d ? i : "", process.env.NODE_ENV !== "production" && (function(g) {
548
+ var j = g.initialValue, A = g.mask, h = g.replacement;
549
+ j.length > A.length && console.error(ne(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(j, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
550
+ var v = Object.keys(h).filter((function(f) {
551
+ return f.length > 1;
552
552
  }));
553
- m.length > 0 && console.error(ne(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."));
554
- for (var p = j.slice(0, P.length), S = -1, w = 0; w < p.length; w++) {
555
- var E = Object.prototype.hasOwnProperty.call(y, p[w]);
556
- if (!(p[w] === P[w] || E && y[p[w]].test(P[w]))) {
557
- S = w;
553
+ v.length > 0 && console.error(ne(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(v.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."));
554
+ for (var p = A.slice(0, j.length), O = -1, S = 0; S < p.length; S++) {
555
+ var M = Object.prototype.hasOwnProperty.call(h, p[S]);
556
+ if (!(p[S] === j[S] || M && h[p[S]].test(j[S]))) {
557
+ O = S;
558
558
  break;
559
559
  }
560
560
  }
561
- S !== -1 && console.error(ne(Error)("An invalid character was found in the initialized property value `value` or `defaultValue` (index: ".concat(S, "). Check the correctness of the initialized value in the specified property."), 'Invalid value: "'.concat(P, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
561
+ O !== -1 && console.error(ne(Error)("An invalid character was found in the initialized property value `value` or `defaultValue` (index: ".concat(O, "). Check the correctness of the initialized value in the specified property."), 'Invalid value: "'.concat(j, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
562
562
  })({
563
563
  initialValue: a,
564
564
  mask: i,
@@ -573,7 +573,7 @@ var Ie = (function(e) {
573
573
  };
574
574
  },
575
575
  tracking: function(o) {
576
- var a = o.inputType, l = o.previousValue, c = o.previousOptions, i = o.addedValue, u = o.changeStart, s = o.changeEnd, f = x(r), O = f.track, P = f.modify, j = Je(f, ln), y = j.mask, m = j.replacement, p = j.showMask, S = j.separate, w = J(J({}, a === "insert" ? {
576
+ var a = o.inputType, l = o.previousValue, c = o.previousOptions, i = o.addedValue, u = o.changeStart, s = o.changeEnd, d = U(r), g = d.track, j = d.modify, A = Ye(d, cn), h = A.mask, v = A.replacement, p = A.showMask, O = A.separate, S = J(J({}, a === "insert" ? {
577
577
  inputType: a,
578
578
  data: i
579
579
  } : {
@@ -583,55 +583,55 @@ var Ie = (function(e) {
583
583
  value: l,
584
584
  selectionStart: u,
585
585
  selectionEnd: s
586
- }), E = O?.(w);
587
- if (E === !1) throw new _("Custom tracking stop.");
588
- E === null ? i = "" : E !== !0 && E !== void 0 && (i = E);
589
- var v = P?.(w);
590
- 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 && (S = v.separate);
591
- var h = ae(l, J({ end: u }, c)), d = ae(l, J({ start: s }, c)), k = RegExp("[^".concat(Object.keys(m).join(""), "]"), "g"), M = y.replace(k, "");
592
- if (h && (h = U(h, {
593
- replacementChars: M,
594
- replacement: m,
595
- separate: S
596
- }), M = M.slice(h.length)), i && (i = U(i, {
597
- replacementChars: M,
598
- replacement: m,
586
+ }), M = g?.(S);
587
+ if (M === !1) throw new z("Custom tracking stop.");
588
+ M === null ? i = "" : M !== !0 && M !== void 0 && (i = M);
589
+ var f = j?.(S);
590
+ f?.mask !== void 0 && (h = f.mask), f?.replacement !== void 0 && (v = typeof f?.replacement == "string" ? _(f?.replacement) : f.replacement), f?.showMask !== void 0 && (p = f.showMask), f?.separate !== void 0 && (O = f.separate);
591
+ var y = ae(l, J({ end: u }, c)), m = ae(l, J({ start: s }, c)), T = RegExp("[^".concat(Object.keys(v).join(""), "]"), "g"), P = h.replace(T, "");
592
+ if (y && (y = $(y, {
593
+ replacementChars: P,
594
+ replacement: v,
595
+ separate: O
596
+ }), P = P.slice(y.length)), i && (i = $(i, {
597
+ replacementChars: P,
598
+ replacement: v,
599
599
  separate: !1
600
- }), M = M.slice(i.length)), a === "insert" && i === "") throw new _("The character does not match the key value of the `replacement` object.");
601
- if (S) {
602
- var g = y.slice(u, s).replace(k, ""), A = g.length - i.length;
603
- A < 0 ? d = d.slice(-A) : A > 0 && (d = g.slice(-A) + d);
600
+ }), P = P.slice(i.length)), a === "insert" && i === "") throw new z("The character does not match the key value of the `replacement` object.");
601
+ if (O) {
602
+ var b = h.slice(u, s).replace(T, ""), B = b.length - i.length;
603
+ B < 0 ? m = m.slice(-B) : B > 0 && (m = b.slice(-B) + m);
604
604
  }
605
- d && (d = U(d, {
606
- replacementChars: M,
607
- replacement: m,
608
- separate: S
605
+ m && (m = $(m, {
606
+ replacementChars: P,
607
+ replacement: v,
608
+ separate: O
609
609
  }));
610
- var C = Me(h + i + d, {
611
- mask: y,
612
- replacement: m,
613
- separate: S,
610
+ var w = Me(y + i + m, {
611
+ mask: h,
612
+ replacement: v,
613
+ separate: O,
614
614
  showMask: p
615
- }), b = (function(T) {
616
- var N, R, D, F = T.inputType, G = T.value, H = T.addedValue, I = T.beforeChangeValue, W = T.mask, le = T.replacement, Ae = T.separate, Q = Pe(G, {
617
- mask: W,
615
+ }), k = (function(I) {
616
+ var R, E, L, x = I.inputType, G = I.value, C = I.addedValue, N = I.beforeChangeValue, K = I.mask, le = I.replacement, Ae = I.separate, Q = Pe(G, {
617
+ mask: K,
618
618
  replacement: le
619
619
  }).filter((function(q) {
620
620
  var se = q.type;
621
621
  return se === "input" || Ae && se === "replacement";
622
- })), ce = (N = Q[I.length + H.length - 1]) === null || N === void 0 ? void 0 : N.index, L = (R = Q[I.length - 1]) === null || R === void 0 ? void 0 : R.index, V = (D = Q[I.length + H.length]) === null || D === void 0 ? void 0 : D.index;
623
- if (F === "insert") {
622
+ })), ce = (R = Q[N.length + C.length - 1]) === null || R === void 0 ? void 0 : R.index, D = (E = Q[N.length - 1]) === null || E === void 0 ? void 0 : E.index, F = (L = Q[N.length + C.length]) === null || L === void 0 ? void 0 : L.index;
623
+ if (x === "insert") {
624
624
  if (ce !== void 0) return ce + 1;
625
- if (V !== void 0) return V;
626
- if (L !== void 0) return L + 1;
625
+ if (F !== void 0) return F;
626
+ if (D !== void 0) return D + 1;
627
627
  }
628
- if (F === "deleteForward") {
629
- if (V !== void 0) return V;
630
- if (L !== void 0) return L + 1;
628
+ if (x === "deleteForward") {
629
+ if (F !== void 0) return F;
630
+ if (D !== void 0) return D + 1;
631
631
  }
632
- if (F === "deleteBackward") {
633
- if (L !== void 0) return L + 1;
634
- if (V !== void 0) return V;
632
+ if (x === "deleteBackward") {
633
+ if (D !== void 0) return D + 1;
634
+ if (F !== void 0) return F;
635
635
  }
636
636
  var ue = G.split("").findIndex((function(q) {
637
637
  return Object.prototype.hasOwnProperty.call(le, q);
@@ -639,35 +639,35 @@ var Ie = (function(e) {
639
639
  return ue !== -1 ? ue : G.length;
640
640
  })({
641
641
  inputType: a,
642
- value: C,
642
+ value: w,
643
643
  addedValue: i,
644
- beforeChangeValue: h,
645
- mask: y,
646
- replacement: m,
647
- separate: S
644
+ beforeChangeValue: y,
645
+ mask: h,
646
+ replacement: v,
647
+ separate: O
648
648
  });
649
649
  return {
650
- value: C,
651
- selectionStart: b,
652
- selectionEnd: b,
650
+ value: w,
651
+ selectionStart: k,
652
+ selectionEnd: k,
653
653
  options: {
654
- mask: y,
655
- replacement: m,
656
- separate: S
654
+ mask: h,
655
+ replacement: v,
656
+ separate: O
657
657
  }
658
658
  };
659
659
  }
660
660
  }])).format = function(o) {
661
- return Ee(o, x(r));
661
+ return Ee(o, U(r));
662
662
  }, t.formatToParts = function(o) {
663
- return Qe(o, x(r));
663
+ return qe(o, U(r));
664
664
  }, t.unformat = function(o) {
665
- return Ye(o, x(r));
665
+ return Qe(o, U(r));
666
666
  }, t.generatePattern = function(o) {
667
- return Xe(o, x(r));
667
+ return en(o, U(r));
668
668
  }, t;
669
669
  }
670
- return Ze(n, Te), We(n);
670
+ return Je(n, Te), Ze(n);
671
671
  })();
672
672
  Oe = Ie, Object.defineProperty(Oe.prototype, Symbol.toStringTag, {
673
673
  writable: !1,
@@ -675,7 +675,7 @@ Oe = Ie, Object.defineProperty(Oe.prototype, Symbol.toStringTag, {
675
675
  configurable: !0,
676
676
  value: "Mask"
677
677
  });
678
- function cn() {
678
+ function un() {
679
679
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = e.mask, t = e.replacement, r = e.showMask, o = e.separate, a = e.track, l = e.modify, c = te(null), i = te({
680
680
  mask: n,
681
681
  replacement: t,
@@ -684,12 +684,12 @@ function cn() {
684
684
  track: a,
685
685
  modify: l
686
686
  });
687
- return i.current.mask = n, i.current.replacement = t, i.current.showMask = r, i.current.separate = o, i.current.track = a, i.current.modify = l, $e((function() {
688
- return en(c, new Ie(i.current));
687
+ return i.current.mask = n, i.current.replacement = t, i.current.showMask = r, i.current.separate = o, i.current.track = a, i.current.modify = l, ze((function() {
688
+ return nn(c, new Ie(i.current));
689
689
  }), []);
690
690
  }
691
- var un = /* @__PURE__ */ Ne(Re(), 1);
692
- var sn = {
691
+ var sn = /* @__PURE__ */ Ne(Ge(), 1);
692
+ var pn = {
693
693
  AF: "Afghanistan",
694
694
  AL: "Albania",
695
695
  DZ: "Algeria",
@@ -967,90 +967,96 @@ var sn = {
967
967
  SX: "Sint Maarten (Dutch part)",
968
968
  SS: "South Sudan",
969
969
  XK: "Kosovo"
970
- }, pn = {
970
+ }, dn = {
971
971
  locale: "en",
972
- countries: sn
972
+ countries: pn
973
973
  };
974
- un.registerLocale(pn);
975
- var Mn = Fe(({ disabled: e = !1, error: n, helperText: t, helperTextClassName: r, isRequired: o, label: a, labelClassName: l, labelWrapperClassName: c, name: i, placeholder: u, showFlagOnSearch: s = !0, showInputFilter: f = !0, showNameOnSearch: O = !0, wrapperClassName: P, showPlaceHolder: j, ...y }, m) => {
976
- const p = Ue(), S = i ?? p, w = te(null), { isOpenSelector: E, value: v, selectedCountry: h, onChangeValue: d, handleOpenSelector: k } = Ge(), M = typeof n == "string" && n.length >= 0, g = cn({
977
- mask: xe(h),
974
+ sn.registerLocale(dn);
975
+ var Pn = Ue(({ disabled: e = !1, error: n, helperText: t, helperTextClassName: r, id: o, isRequired: a, label: l, labelClassName: c, labelWrapperClassName: i, name: u, placeholder: s, showFlagOnSearch: d = !0, showInputFilter: g = !0, showNameOnSearch: j = !0, wrapperClassName: A, showPlaceHolder: h, onChange: v, ...p }, O) => {
976
+ const S = _e(), M = o ?? S, f = `${M}-error`, y = `${M}-helper-text`, m = te(null), { isOpenSelector: T, value: P, selectedCountry: b, onChangeValue: B, handleOpenSelector: w } = Le(), k = typeof n == "string" && n.length > 0, I = !k && !!t, R = Be(k && f, I && y), E = un({
977
+ mask: Ke(b),
978
978
  replacement: { _: /\d/ }
979
979
  });
980
- _e(m, () => g.current, [g]);
981
- const A = (b) => {
982
- b.target.value.startsWith(h.prefix) ? d(b.target.value) : d(`${h.prefix} `);
983
- };
984
- Be(w, pe(() => {
985
- k(!1);
986
- }, [k])), fe(() => {
987
- const b = new AbortController(), T = (N) => {
988
- N.key === "Escape" && k(!1);
980
+ $e(O, () => E.current, [E]);
981
+ const L = (C) => {
982
+ C.target.value.startsWith(b.prefix) ? B(C.target.value) : B(`${b.prefix} `), v?.(C);
983
+ }, x = pe(() => {
984
+ w(!1);
985
+ }, [w]);
986
+ Re(m, x), de(() => {
987
+ const C = new AbortController(), N = (K) => {
988
+ K.key === "Escape" && w(!1);
989
989
  };
990
- return document.addEventListener("keydown", T, { signal: b.signal }), document.addEventListener("visibilitychange", () => {
991
- document.hidden && k(!1);
992
- }, { signal: b.signal }), () => {
993
- b.abort();
990
+ return document.addEventListener("keydown", N, { signal: C.signal }), document.addEventListener("visibilitychange", () => {
991
+ document.hidden && w(!1);
992
+ }, { signal: C.signal }), () => {
993
+ C.abort();
994
994
  };
995
- }, [k]), fe(() => {
996
- g.current && (g.current.value = h.prefix + " ");
997
- }, [h.code]);
998
- const C = pe((b) => {
999
- b === null && g.current?.blur(), g.current = b;
1000
- }, [g]);
995
+ }, [w]), de(() => {
996
+ E.current && (E.current.value = b.prefix + " ");
997
+ }, [b.code]);
998
+ const G = pe((C) => {
999
+ C === null && E.current?.blur(), E.current = C;
1000
+ }, [E]);
1001
1001
  return /* @__PURE__ */ Z("div", {
1002
1002
  className: "w-full flex flex-col gap-2",
1003
1003
  children: [
1004
- a ? /* @__PURE__ */ B("div", {
1005
- className: X(c),
1004
+ l ? /* @__PURE__ */ V("div", {
1005
+ className: X(i),
1006
1006
  children: /* @__PURE__ */ Z("label", {
1007
- htmlFor: S,
1008
- className: Le({ className: l }),
1009
- onClick: () => !e && g.current?.focus(),
1010
- children: [a, o && /* @__PURE__ */ B(ee, {
1007
+ htmlFor: M,
1008
+ className: xe({ className: c }),
1009
+ onClick: () => !e && E.current?.focus(),
1010
+ children: [l, a && /* @__PURE__ */ V(ee, {
1011
1011
  component: "span",
1012
+ "aria-hidden": "true",
1012
1013
  className: "text-red-600 dark:text-red-500 ml-1",
1013
1014
  children: "*"
1014
1015
  })]
1015
1016
  })
1016
1017
  }) : null,
1017
1018
  /* @__PURE__ */ Z("div", {
1018
- ref: w,
1019
- "data-state": E ? "open" : "closed",
1019
+ ref: m,
1020
+ "data-state": T ? "open" : "closed",
1020
1021
  className: Ve({
1021
- className: P,
1022
- variant: M ? "error" : "default"
1022
+ className: A,
1023
+ variant: k ? "error" : "default"
1023
1024
  }),
1024
1025
  children: [/* @__PURE__ */ Z("div", {
1025
1026
  className: "p-2 flex items-center gap-2.5",
1026
- children: [/* @__PURE__ */ B(Ke, {}), /* @__PURE__ */ B("input", {
1027
- id: a ? S : void 0,
1028
- ref: C,
1029
- name: i,
1027
+ children: [/* @__PURE__ */ V(De, {}), /* @__PURE__ */ V("input", {
1028
+ ...p,
1029
+ id: M,
1030
+ ref: G,
1031
+ name: u,
1030
1032
  autoComplete: "off",
1031
1033
  className: X("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"),
1032
1034
  type: "tel",
1033
1035
  inputMode: "tel",
1034
- value: v,
1035
- onChange: A,
1036
+ value: P,
1037
+ onChange: L,
1036
1038
  disabled: e,
1037
- ...y
1039
+ "aria-invalid": k || void 0,
1040
+ "aria-describedby": R,
1041
+ "aria-required": a || void 0
1038
1042
  })]
1039
- }), E && /* @__PURE__ */ B(De, {
1040
- placeholder: u,
1041
- showFlagOnSearch: s,
1042
- showInputFilter: f,
1043
- showNameOnSearch: O,
1044
- showPlaceHolder: j
1043
+ }), T && /* @__PURE__ */ V(Fe, {
1044
+ placeholder: s,
1045
+ showFlagOnSearch: d,
1046
+ showInputFilter: g,
1047
+ showNameOnSearch: j,
1048
+ showPlaceHolder: h
1045
1049
  })]
1046
1050
  }),
1047
- n ? /* @__PURE__ */ B(ee, {
1051
+ k ? /* @__PURE__ */ V(ee, {
1048
1052
  component: "span",
1053
+ id: f,
1049
1054
  className: "text-xs text-red-700 dark:text-red-500",
1050
1055
  children: n
1051
1056
  }) : null,
1052
- !n && t ? /* @__PURE__ */ B(ee, {
1057
+ I ? /* @__PURE__ */ V(ee, {
1053
1058
  component: "span",
1059
+ id: y,
1054
1060
  className: X("text-xs kubefirst-dark:text-slate-200", r),
1055
1061
  children: t
1056
1062
  }) : null
@@ -1058,5 +1064,5 @@ var Mn = Fe(({ disabled: e = !1, error: n, helperText: t, helperTextClassName: r
1058
1064
  });
1059
1065
  });
1060
1066
  export {
1061
- Mn as t
1067
+ Pn as t
1062
1068
  };