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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/README.md +15 -21
  2. package/dist/{AdditionalOptions-Cj29eeMF.js → AdditionalOptions-D0BAS2HG.js} +1 -1
  3. package/dist/{AlertDialogTrigger-CgcsW_ta.js → AlertDialogTrigger-BGo_acd5.js} +3 -3
  4. package/dist/{Checkbox-DzAx7n67.js → Checkbox-B_ngk9Dj.js} +56 -56
  5. package/dist/{Combination-cjXRJS03.js → Combination-CnMM05mt.js} +51 -45
  6. package/dist/{CommandInput-BnvRMfLI.js → CommandInput-BLq69pOT.js} +1 -1
  7. package/dist/Counter-BV680M5r.js +195 -0
  8. package/dist/DropdownButton-DfNojmCW.js +493 -0
  9. package/dist/{FlagSelectorList-BoYG-_It.js → FlagSelectorList-CkTR3j6O.js} +222 -218
  10. package/dist/{HamburgerTrigger-1vOTrm8-.js → HamburgerTrigger-DRylBL2d.js} +1 -1
  11. package/dist/{ImageUpload-DZTm4SBB.js → ImageUpload-DiwymQcU.js} +1 -1
  12. package/dist/{Input-CW0VwW2T.js → Input-Cf44DzfE.js} +18 -18
  13. package/dist/{Loading-fD0Xiyeq.js → Loading-DUh9PMJN.js} +3 -1
  14. package/dist/Modal-Dyn088X7.js +81 -0
  15. package/dist/Sidebar.css +1 -1
  16. package/dist/{Spinner-Lw9mZYhg.js → Spinner-CUwE2bLm.js} +1 -1
  17. package/dist/{Switch-WBRr8uOJ.js → Switch-aPhL5rNG.js} +4 -4
  18. package/dist/{Toast-ByH-l4XK.js → Toast-3NEz7LLa.js} +149 -148
  19. package/dist/Wrapper-CVJSuYWx.js +114 -0
  20. package/dist/{Wrapper-XeeD3av7.js → Wrapper-DP6Sxngx.js} +185 -180
  21. package/dist/Wrapper-R8fik3ah.js +182 -0
  22. package/dist/components/Alert/Alert.js +21 -21
  23. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  24. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  25. package/dist/components/AlertDialog/components/index.js +1 -1
  26. package/dist/components/AlertDialog/hooks/useAlertDialog.js +14 -10
  27. package/dist/components/Autocomplete/components/List/List.js +22 -26
  28. package/dist/components/Autocomplete/components/List/List.variants.js +7 -19
  29. package/dist/components/Autocomplete/hooks/useAutocomplete.js +39 -38
  30. package/dist/components/Autocomplete/hooks/useNavigationList.js +2 -1
  31. package/dist/components/Badge/Badge.js +37 -36
  32. package/dist/components/Button/Button.js +1 -1
  33. package/dist/components/Checkbox/Checkbox.js +1 -1
  34. package/dist/components/Command/Command.js +2 -2
  35. package/dist/components/Command/components/Command.js +6 -6
  36. package/dist/components/Command/components/CommandEmpty.js +1 -1
  37. package/dist/components/Command/components/CommandGroup.js +1 -1
  38. package/dist/components/Command/components/CommandInput.js +1 -1
  39. package/dist/components/Command/components/CommandItem.js +1 -1
  40. package/dist/components/Command/components/CommandList.js +2 -2
  41. package/dist/components/Command/components/CommandSeparator.js +1 -1
  42. package/dist/components/Command/components/DialogContent.js +2 -2
  43. package/dist/components/Command/components/DialogOverlay.js +1 -1
  44. package/dist/components/Command/components/index.js +1 -1
  45. package/dist/components/Command/contexts/Command.provider.js +16 -12
  46. package/dist/components/Counter/Counter.js +1 -1
  47. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
  48. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +57 -58
  49. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +42 -43
  50. package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
  51. package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
  52. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
  53. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +42 -50
  54. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +61 -79
  55. package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
  56. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
  57. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
  58. package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +89 -122
  59. package/dist/components/Datepicker/DatePicker.js +13 -13
  60. package/dist/components/Drawer/Drawer.js +54 -49
  61. package/dist/components/Drawer/hooks/useDrawer.js +39 -44
  62. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  63. package/dist/components/Filter/Filter.js +23 -22
  64. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +42 -56
  65. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  66. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +30 -43
  67. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +36 -49
  68. package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +1 -1
  69. package/dist/components/Filter/components/ResetButton/ResetButton.js +21 -18
  70. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +1 -1
  71. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +31 -45
  72. package/dist/components/Filter/contexts/filter.provider.js +15 -10
  73. package/dist/components/Filter/events/index.js +26 -5
  74. package/dist/components/Filter/hooks/index.js +4 -0
  75. package/dist/components/Filter/hooks/useFilterDropdownSync.js +26 -0
  76. package/dist/components/ImageUpload/ImageUpload.js +1 -1
  77. package/dist/components/Input/Input.js +1 -1
  78. package/dist/components/Loading/Loading.js +1 -1
  79. package/dist/components/Modal/Modal.js +1 -1
  80. package/dist/components/Modal/components/Body/Body.js +1 -1
  81. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  82. package/dist/components/Modal/components/Header/Header.js +1 -1
  83. package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
  84. package/dist/components/Modal/components/index.js +1 -1
  85. package/dist/components/Modal/contexts/Modal.provider.js +26 -19
  86. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
  87. package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
  88. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
  89. package/dist/components/MultiSelectDropdown/components/index.js +1 -1
  90. package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +14 -13
  91. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
  92. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +6 -4
  93. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
  94. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +16 -16
  95. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
  96. package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
  97. package/dist/components/PhoneNumberInput/components/index.js +2 -2
  98. package/dist/components/PieChart/PieChart.js +33 -32
  99. package/dist/components/ProgressBar/ProgressBar.js +26 -20
  100. package/dist/components/Radio/Radio.js +28 -30
  101. package/dist/components/RadioCardGroup/RadioCardGroup.js +18 -18
  102. package/dist/components/RadioGroup/RadioGroup.js +24 -24
  103. package/dist/components/Range/Range.js +15 -13
  104. package/dist/components/Select/Select.js +2 -2
  105. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
  106. package/dist/components/Select/components/List/List.js +2 -2
  107. package/dist/components/Select/components/ListItem/ListItem.js +30 -30
  108. package/dist/components/Select/components/Wrapper.js +1 -1
  109. package/dist/components/Select/components/index.js +2 -2
  110. package/dist/components/Select/hooks/useSelect.js +28 -39
  111. package/dist/components/Sidebar/Sidebar.js +21 -18
  112. package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +30 -0
  113. package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.js +20 -0
  114. package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
  115. package/dist/components/Sidebar/components/Logo/Logo.js +14 -10
  116. package/dist/components/Sidebar/components/Logo/Logo.variants.js +14 -4
  117. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +41 -37
  118. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +4 -5
  119. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +75 -68
  120. package/dist/components/Sidebar/components/index.js +17 -15
  121. package/dist/components/Sidebar/contexts/SidebarContext.js +8 -5
  122. package/dist/components/Slider/Slider.js +17 -15
  123. package/dist/components/Spinner/Spinner.js +1 -1
  124. package/dist/components/Stepper/Stepper.variants.js +6 -6
  125. package/dist/components/Stepper/hooks/useStepItemLogic.js +12 -17
  126. package/dist/components/Switch/Switch.js +1 -1
  127. package/dist/components/Table/components/Filter.js +1 -1
  128. package/dist/components/Tabs/Tabs.js +1 -1
  129. package/dist/components/Tabs/Tabs.variants.js +1 -1
  130. package/dist/components/Tabs/components/Content.js +1 -1
  131. package/dist/components/Tabs/components/List.js +1 -1
  132. package/dist/components/Tabs/components/Trigger.js +1 -1
  133. package/dist/components/Tag/Tag.js +1 -1
  134. package/dist/components/Tag/Tag.variants.js +17 -17
  135. package/dist/components/TagSelect/TagSelect.js +1 -1
  136. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
  137. package/dist/components/TagSelect/components/index.js +1 -1
  138. package/dist/components/TagSelect/hooks/useTagSelect.js +12 -11
  139. package/dist/components/TimePicker/components/HoursList/HoursList.js +34 -38
  140. package/dist/components/TimePicker/components/MeridianList/MeridianList.js +25 -29
  141. package/dist/components/TimePicker/components/MinutesList/MinutesList.js +33 -33
  142. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +91 -99
  143. package/dist/components/TimePicker/components/WrapperList/WrapperList.js +29 -30
  144. package/dist/components/TimePicker/contexts/time-picker.provider.js +10 -10
  145. package/dist/components/Toast/Toast.js +1 -1
  146. package/dist/components/Toast/Toast.variants.js +1 -1
  147. package/dist/components/Tooltip/Tooltip.js +1 -1
  148. package/dist/components/VirtualizedTable/VirtualizedTable.js +32 -29
  149. package/dist/components/VirtualizedTable/components/Actions/Actions.js +0 -2
  150. package/dist/components/VirtualizedTable/components/Body/Body.js +5 -5
  151. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +1 -1
  152. package/dist/components/VirtualizedTable/components/Filter/Filter.js +55 -53
  153. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +1 -1
  154. package/dist/components/VirtualizedTable/components/Header/Header.js +1 -1
  155. package/dist/components/VirtualizedTable/contexts/index.js +1 -1
  156. package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
  157. package/dist/components/VirtualizedTable/events/filters/filters.js +7 -0
  158. package/dist/components/VirtualizedTable/events/index.js +10 -25
  159. package/dist/components/VirtualizedTable/events/refresh/refresh.js +7 -0
  160. package/dist/components/VirtualizedTable/events/row/row.js +22 -0
  161. package/dist/components/VirtualizedTable/utils/get-table-id.js +4 -0
  162. package/dist/components/VirtualizedTable/utils/index.js +4 -2
  163. package/dist/components/index.js +95 -89
  164. package/dist/{components-BIHlj4yH.js → components-Cf345jTv.js} +45 -41
  165. package/dist/constants-CxJJRVK3.js +31 -0
  166. package/dist/{dist-DISvWx7U.js → dist-BUocnzkM.js} +1 -1
  167. package/dist/{dist-Dse3gSmZ.js → dist-BZNE2Tnx.js} +4 -4
  168. package/dist/{dist-2bGlmy8N2.js → dist-BaPW7qXd2.js} +27 -26
  169. package/dist/dist-BdobXn93.js +192 -0
  170. package/dist/dist-BlPTJNIm.js +118 -0
  171. package/dist/{dist-BiJrNvNo.js → dist-C3YVLapk.js} +29 -28
  172. package/dist/dist-C4j75TwZ.js +20 -0
  173. package/dist/dist-CCdbu9GU.js +46 -0
  174. package/dist/dist-CzKqHuqJ2.js +427 -0
  175. package/dist/dist-D-yS0HN8.js +228 -0
  176. package/dist/dist-D5XYRjmR.js +15 -0
  177. package/dist/dist-DDck_2lb.js +451 -0
  178. package/dist/{dist-C2aTw0m62.js → dist-DFCz63oC2.js} +5 -5
  179. package/dist/dist-DGOjiAnB2.js +14 -0
  180. package/dist/dist-DKryKPmP.js +193 -0
  181. package/dist/{dist-CTvBzxW8.js → dist-DX0sBG3Q.js} +1 -1
  182. package/dist/dist-DYIabsrY.js +17 -0
  183. package/dist/dist-pWlMx4Fi2.js +36 -0
  184. package/dist/{dist-CVDFmWf2.js → dist-tGUUcv8n.js} +17 -16
  185. package/dist/dist-xCbHbMLA.js +116 -0
  186. package/dist/{es2015-BWf6xQHm.js → es2015-CoHq2g4y.js} +95 -86
  187. package/dist/es2015-DigR3dar.js +795 -0
  188. package/dist/events.types-BG1Uh8i6.js +6 -0
  189. package/dist/hooks/index.js +6 -4
  190. package/dist/hooks/useClickOutside.js +14 -0
  191. package/dist/index.js +146 -138
  192. package/dist/lib/components/Autocomplete/components/List/List.variants.d.ts +0 -1
  193. package/dist/lib/components/DropdownButton/DropdownButton.d.ts +5 -6
  194. package/dist/lib/components/DropdownButton/DropdownButton.types.d.ts +2 -0
  195. package/dist/lib/components/Filter/Filter.types.d.ts +2 -0
  196. package/dist/lib/components/Filter/contexts/filter.context.d.ts +1 -0
  197. package/dist/lib/components/Filter/events/index.d.ts +10 -2
  198. package/dist/lib/components/Filter/hooks/index.d.ts +1 -0
  199. package/dist/lib/components/Filter/hooks/useFilterDropdownSync.d.ts +2 -0
  200. package/dist/lib/components/Filter/hooks/useFilterDropdownSync.types.d.ts +5 -0
  201. package/dist/lib/components/PieChart/PieChart.types.d.ts +4 -4
  202. package/dist/lib/components/ProgressBar/ProgressBar.types.d.ts +2 -0
  203. package/dist/lib/components/Select/hooks/useSelect.d.ts +2 -3
  204. package/dist/lib/components/Sidebar/Sidebar.d.ts +2 -2
  205. package/dist/lib/components/Sidebar/Sidebar.types.d.ts +6 -5
  206. package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.d.ts +4 -0
  207. package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.types.d.ts +4 -0
  208. package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.d.ts +1 -0
  209. package/dist/lib/components/Sidebar/components/Logo/Logo.types.d.ts +8 -0
  210. package/dist/lib/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -1
  211. package/dist/lib/components/Sidebar/components/index.d.ts +2 -0
  212. package/dist/lib/components/Sidebar/contexts/SidebarContext.d.ts +12 -0
  213. package/dist/lib/components/VirtualizedTable/VirtualizedTable.d.ts +1 -0
  214. package/dist/lib/components/VirtualizedTable/events/events.types.d.ts +11 -0
  215. package/dist/lib/components/VirtualizedTable/events/filters/filters.d.ts +1 -0
  216. package/dist/lib/components/VirtualizedTable/events/index.d.ts +4 -14
  217. package/dist/lib/components/VirtualizedTable/events/refresh/refresh.d.ts +2 -0
  218. package/dist/lib/components/VirtualizedTable/events/refresh/refresh.types.d.ts +3 -0
  219. package/dist/lib/components/VirtualizedTable/events/row/row.d.ts +3 -0
  220. package/dist/lib/components/VirtualizedTable/utils/get-table-id.d.ts +1 -0
  221. package/dist/lib/components/VirtualizedTable/utils/index.d.ts +1 -0
  222. package/dist/lib/components/index.d.ts +2 -2
  223. package/dist/lib/hooks/index.d.ts +1 -0
  224. package/dist/lib/hooks/useClickOutside.d.ts +2 -0
  225. package/dist/package.json +24 -24
  226. package/dist/styles.css +1 -1
  227. package/dist/{table.provider-2sAkE7z_.js → table.provider-B0BafHuU.js} +395 -381
  228. package/dist/ui/civo-theme.css +4 -0
  229. package/dist/ui/kubefirst-theme.css +4 -0
  230. package/package.json +24 -24
  231. package/dist/Counter-CY0xGnVM.js +0 -208
  232. package/dist/DropdownButton-DnlwdPmb.js +0 -92
  233. package/dist/Modal-Bfzggwlr.js +0 -76
  234. package/dist/Wrapper-ClJ_Mham.js +0 -110
  235. package/dist/Wrapper-DNEn4fef.js +0 -161
  236. package/dist/constants-DXrF9vV4.js +0 -31
  237. package/dist/dist-B-Aoze_D.js +0 -10
  238. package/dist/dist-BuFiu480.js +0 -13
  239. package/dist/dist-C2s4VX-42.js +0 -31
  240. package/dist/dist-CT6d9xe7.js +0 -441
  241. package/dist/dist-CVy-ulDZ.js +0 -42
  242. package/dist/dist-D4FePjTS.js +0 -194
  243. package/dist/dist-Db6UeFo4.js +0 -291
  244. package/dist/dist-DqKFpce5.js +0 -98
  245. package/dist/dist-j7FOUrFU.js +0 -206
  246. package/dist/dist-l-aDnQZC.js +0 -62
  247. package/dist/dist-ppXKUlVt.js +0 -10
  248. /package/dist/{x-a_LpoXzG.js → x-a_LpoXzG2.js} +0 -0
@@ -1,20 +1,21 @@
1
- import { o as Ae } from "./rolldown-runtime-Ck3dxwZt.js";
1
+ import { o as Ne } from "./rolldown-runtime-Ck3dxwZt.js";
2
2
  import { t as X } from "./utils-Cx-WzRZF.js";
3
+ import { useClickOutside as Be } from "./hooks/useClickOutside.js";
3
4
  import { Typography as ee } from "./components/Typography/Typography.js";
4
- import { n as Ne } from "./phone-number.provider-BxQCTxp8.js";
5
- import { usePhoneNumberContext as Be } from "./components/PhoneNumberInput/contexts/phone-number.hook.js";
6
- import { labelVariants as Re, phoneNumberInputVariants as Ge } from "./components/PhoneNumberInput/PhoneNumberInput.variants.js";
7
- import { getPhoneMask as Le } from "./components/PhoneNumberInput/utils/index.js";
8
- import { FlagContent as Ve } from "./components/PhoneNumberInput/components/FlagContent/FlagContent.js";
9
- import { FlagSelectorWrapper as xe } from "./components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js";
10
- import { forwardRef as Ke, useCallback as De, useEffect as pe, useId as Fe, useImperativeHandle as Ue, useMemo as _e, useRef as te } from "react";
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";
11
12
  import { jsx as B, jsxs as Z } from "react/jsx-runtime";
12
13
  function de(e, n) {
13
14
  (n == null || n > e.length) && (n = e.length);
14
15
  for (var t = 0, r = Array(n); t < n; t++) r[t] = e[t];
15
16
  return r;
16
17
  }
17
- function $e(e, n, t) {
18
+ function ze(e, n, t) {
18
19
  return n = Y(n), (function(r, o) {
19
20
  if (o && (typeof o == "object" || typeof o == "function")) return o;
20
21
  if (o !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
@@ -22,15 +23,15 @@ function $e(e, n, t) {
22
23
  if (a === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
23
24
  return a;
24
25
  })(r);
25
- })(e, we() ? Reflect.construct(n, t || [], Y(e).constructor) : n.apply(e, t));
26
+ })(e, ke() ? Reflect.construct(n, t || [], Y(e).constructor) : n.apply(e, t));
26
27
  }
27
- function ze(e, n) {
28
+ function He(e, n) {
28
29
  if (!(e instanceof n)) throw new TypeError("Cannot call a class as a function");
29
30
  }
30
- function He(e, n, t) {
31
+ function We(e, n, t) {
31
32
  return Object.defineProperty(e, "prototype", { writable: !1 }), e;
32
33
  }
33
- function Oe(e, n) {
34
+ function Se(e, n) {
34
35
  var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
35
36
  if (!t) {
36
37
  if (Array.isArray(e) || (t = (function(i, u) {
@@ -81,7 +82,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
81
82
  }
82
83
  };
83
84
  }
84
- function Se(e, n, t) {
85
+ function we(e, n, t) {
85
86
  return (n = (function(r) {
86
87
  var o = (function(a, l) {
87
88
  if (typeof a != "object" || !a) return a;
@@ -106,7 +107,7 @@ function Y(e) {
106
107
  return n.__proto__ || Object.getPrototypeOf(n);
107
108
  }, Y(e);
108
109
  }
109
- function We(e, n) {
110
+ function Ze(e, n) {
110
111
  if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function");
111
112
  e.prototype = Object.create(n && n.prototype, { constructor: {
112
113
  value: e,
@@ -114,17 +115,17 @@ function We(e, n) {
114
115
  configurable: !0
115
116
  } }), Object.defineProperty(e, "prototype", { writable: !1 }), n && re(e, n);
116
117
  }
117
- function we() {
118
+ function ke() {
118
119
  try {
119
120
  var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {
120
121
  })));
121
122
  } catch {
122
123
  }
123
- return (we = function() {
124
+ return (ke = function() {
124
125
  return !!e;
125
126
  })();
126
127
  }
127
- function fe(e, n) {
128
+ function me(e, n) {
128
129
  var t = Object.keys(e);
129
130
  if (Object.getOwnPropertySymbols) {
130
131
  var r = Object.getOwnPropertySymbols(e);
@@ -137,15 +138,15 @@ function fe(e, n) {
137
138
  function J(e) {
138
139
  for (var n = 1; n < arguments.length; n++) {
139
140
  var t = arguments[n] != null ? arguments[n] : {};
140
- n % 2 ? fe(Object(t), !0).forEach((function(r) {
141
- Se(e, r, t[r]);
142
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : fe(Object(t)).forEach((function(r) {
141
+ n % 2 ? me(Object(t), !0).forEach((function(r) {
142
+ we(e, r, t[r]);
143
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : me(Object(t)).forEach((function(r) {
143
144
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
144
145
  }));
145
146
  }
146
147
  return e;
147
148
  }
148
- function Ze(e, n) {
149
+ function Je(e, n) {
149
150
  if (e == null) return {};
150
151
  var t, r, o = (function(l, c) {
151
152
  if (l == null) return {};
@@ -168,39 +169,39 @@ function re(e, n) {
168
169
  }, re(e, n);
169
170
  }
170
171
  function U(e, n) {
171
- var t, r = n.replacementChars, o = n.replacement, a = n.separate, l = r, c = "", i = Oe(e);
172
+ var t, r = n.replacementChars, o = n.replacement, a = n.separate, l = r, c = "", i = Se(e);
172
173
  try {
173
174
  for (i.s(); !(t = i.n()).done; ) {
174
- 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));
175
- (a && s === l[0] || d) && (l = l.slice(1), c += s);
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);
176
177
  }
177
- } catch (S) {
178
- i.e(S);
178
+ } catch (O) {
179
+ i.e(O);
179
180
  } finally {
180
181
  i.f();
181
182
  }
182
183
  return c;
183
184
  }
184
- function ke(e, n) {
185
- var t, r = n.mask, o = n.replacement, a = n.separate, l = n.showMask, c = 0, i = "", u = Oe(r);
185
+ function Me(e, n) {
186
+ var t, r = n.mask, o = n.replacement, a = n.separate, l = n.showMask, c = 0, i = "", u = Se(r);
186
187
  try {
187
188
  for (u.s(); !(t = u.n()).done; ) {
188
189
  var s = t.value;
189
190
  if (!l && e[c] === void 0) break;
190
191
  Object.prototype.hasOwnProperty.call(o, s) && e[c] !== void 0 ? i += e[c++] : i += s;
191
192
  }
192
- } catch (S) {
193
- u.e(S);
193
+ } catch (O) {
194
+ u.e(O);
194
195
  } finally {
195
196
  u.f();
196
197
  }
197
198
  if (a && !l) {
198
- for (var d = r.length - 1; d >= 0 && i[d] === r[d]; d--) ;
199
- i = i.slice(0, d + 1);
199
+ for (var f = r.length - 1; f >= 0 && i[f] === r[f]; f--) ;
200
+ i = i.slice(0, f + 1);
200
201
  }
201
202
  return i;
202
203
  }
203
- function Me(e, n) {
204
+ function Pe(e, n) {
204
205
  for (var t = n.mask, r = n.replacement, o = [], a = 0; a < t.length; a++) {
205
206
  var l, c = (l = e[a]) !== null && l !== void 0 ? l : t[a], i = Object.prototype.hasOwnProperty.call(r, c) ? "replacement" : e[a] !== void 0 && e[a] !== t[a] ? "input" : "mask";
206
207
  o.push({
@@ -212,18 +213,18 @@ function Me(e, n) {
212
213
  return o;
213
214
  }
214
215
  function K(e) {
215
- return e.length > 0 ? Se({}, e, /./) : {};
216
+ return e.length > 0 ? we({}, e, /./) : {};
216
217
  }
217
218
  function ae(e, n) {
218
- 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++) {
219
- var S = Object.prototype.hasOwnProperty.call(l, u[d]);
220
- S && i[d] !== void 0 && i[d] !== u[d] ? s += i[d] : S && c && (s += u[d]);
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]);
221
222
  }
222
223
  return s;
223
224
  }
224
- function Pe(e, n) {
225
+ function Ee(e, n) {
225
226
  var t = n.mask, r = n.replacement, o = typeof r == "string" ? K(r) : r, a = RegExp("[^".concat(Object.keys(o).join(""), "]"), "g");
226
- return ke(U(e, {
227
+ return Me(U(e, {
227
228
  replacementChars: t.replace(a, ""),
228
229
  replacement: o,
229
230
  separate: !1
@@ -234,7 +235,7 @@ function Pe(e, n) {
234
235
  showMask: !1
235
236
  });
236
237
  }
237
- function Je(e, n) {
238
+ function Ye(e, n) {
238
239
  var t = n.mask, r = n.replacement, o = typeof r == "string" ? K(r) : r, a = ae(e, {
239
240
  mask: t,
240
241
  replacement: o,
@@ -246,9 +247,9 @@ function Je(e, n) {
246
247
  separate: !1
247
248
  });
248
249
  }
249
- function Ye(e, n) {
250
+ function Qe(e, n) {
250
251
  var t = n.mask, r = n.replacement, o = typeof r == "string" ? K(r) : r;
251
- return Me(Pe(e, {
252
+ return Pe(Ee(e, {
252
253
  mask: t,
253
254
  replacement: o
254
255
  }), {
@@ -256,7 +257,7 @@ function Ye(e, n) {
256
257
  replacement: o
257
258
  });
258
259
  }
259
- var Qe = [
260
+ var qe = [
260
261
  "[",
261
262
  "]",
262
263
  "\\",
@@ -273,22 +274,22 @@ var Qe = [
273
274
  "{",
274
275
  "}"
275
276
  ];
276
- function me(e) {
277
- return Qe.includes(e) ? "\\".concat(e) : e;
277
+ function ve(e) {
278
+ return qe.includes(e) ? "\\".concat(e) : e;
278
279
  }
279
- function qe(e, n) {
280
+ function Xe(e, n) {
280
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++) {
281
282
  var u = t[i];
282
- i === 0 && (c = "^"), a && (c += "("), c += Object.prototype.hasOwnProperty.call(o, u) ? "".concat(l ? "(?!".concat(me(u), ")") : "", "(").concat(o[u].source, ")") : me(u), i === t.length - 1 && (a && (c += ")?".repeat(t.length)), c += "$");
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 += "$");
283
284
  }
284
285
  return c;
285
286
  }
286
- function Xe(e, n) {
287
+ function en(e, n) {
287
288
  return new Proxy(e, { set: function(t, r, o) {
288
289
  return r === "current" && (o !== e.current && (e.current !== null && n.unregister(e.current), o !== null && n.register(o)), t[r] = o, !0);
289
290
  } });
290
291
  }
291
- function en(e, n, t) {
292
+ function nn(e, n, t) {
292
293
  return n = $(n), (function(r, o) {
293
294
  if (o && (typeof o == "object" || typeof o == "function")) return o;
294
295
  if (o !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
@@ -298,13 +299,13 @@ function en(e, n, t) {
298
299
  })(r);
299
300
  })(e, ie() ? Reflect.construct(n, t || [], $(e).constructor) : n.apply(e, t));
300
301
  }
301
- function Ee(e, n) {
302
+ function Ce(e, n) {
302
303
  if (!(e instanceof n)) throw new TypeError("Cannot call a class as a function");
303
304
  }
304
- function Ce(e, n, t) {
305
+ function je(e, n, t) {
305
306
  return Object.defineProperty(e, "prototype", { writable: !1 }), e;
306
307
  }
307
- function nn(e, n, t) {
308
+ function tn(e, n, t) {
308
309
  return (n = (function(r) {
309
310
  var o = (function(a, l) {
310
311
  if (typeof a != "object" || !a) return a;
@@ -329,7 +330,7 @@ function $(e) {
329
330
  return n.__proto__ || Object.getPrototypeOf(n);
330
331
  }, $(e);
331
332
  }
332
- function tn(e, n) {
333
+ function rn(e, n) {
333
334
  if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function");
334
335
  e.prototype = Object.create(n && n.prototype, { constructor: {
335
336
  value: e,
@@ -347,7 +348,7 @@ function ie() {
347
348
  return !!e;
348
349
  })();
349
350
  }
350
- function ve(e, n) {
351
+ function he(e, n) {
351
352
  var t = Object.keys(e);
352
353
  if (Object.getOwnPropertySymbols) {
353
354
  var r = Object.getOwnPropertySymbols(e);
@@ -357,18 +358,18 @@ function ve(e, n) {
357
358
  }
358
359
  return t;
359
360
  }
360
- function he(e) {
361
+ function ye(e) {
361
362
  for (var n = 1; n < arguments.length; n++) {
362
363
  var t = arguments[n] != null ? arguments[n] : {};
363
- n % 2 ? ve(Object(t), !0).forEach((function(r) {
364
- nn(e, r, t[r]);
365
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ve(Object(t)).forEach((function(r) {
364
+ n % 2 ? he(Object(t), !0).forEach((function(r) {
365
+ tn(e, r, t[r]);
366
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : he(Object(t)).forEach((function(r) {
366
367
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
367
368
  }));
368
369
  }
369
370
  return e;
370
371
  }
371
- function rn(e, n) {
372
+ function an(e, n) {
372
373
  if (e == null) return {};
373
374
  var t, r, o = (function(l, c) {
374
375
  if (l == null) return {};
@@ -425,29 +426,29 @@ function oe(e) {
425
426
  var _ = (function(e) {
426
427
  function n(t) {
427
428
  var r;
428
- return Ee(this, n), (r = en(this, n, [t])).name = "SyntheticChangeError", r;
429
+ return Ce(this, n), (r = nn(this, n, [t])).name = "SyntheticChangeError", r;
429
430
  }
430
- return tn(n, e), Ce(n);
431
- })(oe(Error)), ye, an = ["options"], ge = [
431
+ return rn(n, e), je(n);
432
+ })(oe(Error)), ge, on = ["options"], be = [
432
433
  "text",
433
434
  "email",
434
435
  "tel",
435
436
  "search",
436
437
  "url"
437
- ], je = Ce((function e(n) {
438
+ ], Te = je((function e(n) {
438
439
  var t = n.init, r = n.tracking;
439
- Ee(this, e);
440
+ Ce(this, e);
440
441
  var o = /* @__PURE__ */ new WeakMap();
441
442
  this.register = function(a) {
442
443
  var l;
443
- if (ge.includes(a.type)) {
444
- 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, S = t({
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
446
  initialValue: a.value || u,
446
- controlled: d
447
- }), P = S.value, C = S.options, y = {
447
+ controlled: f
448
+ }), P = O.value, j = O.options, y = {
448
449
  value: P,
449
- options: C,
450
- fallbackOptions: C
450
+ options: j,
451
+ fallbackOptions: j
451
452
  }, m = {
452
453
  id: -1,
453
454
  cachedId: -1
@@ -455,63 +456,63 @@ var _ = (function(e) {
455
456
  value: "",
456
457
  selectionStart: 0,
457
458
  selectionEnd: 0
458
- }, w = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
459
- Object.defineProperty(a, "value", he(he({}, w), {}, { set: function(h) {
460
- var f;
461
- p.value = h, w == null || (f = w.set) === null || f === void 0 || f.call(a, h);
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);
462
463
  } })), a.value = P;
463
- var g = function() {
464
+ var w = function() {
464
465
  var h = function() {
465
- var f, k;
466
- p.selectionStart = (f = a.selectionStart) !== null && f !== void 0 ? f : 0, p.selectionEnd = (k = a.selectionEnd) !== null && k !== void 0 ? k : 0, m.id = window.setTimeout(h);
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);
467
468
  };
468
469
  m.id = window.setTimeout(h);
469
470
  }, E = function() {
470
471
  window.clearTimeout(m.id), m.id = -1, m.cachedId = -1;
471
472
  }, v = function(h) {
472
473
  try {
473
- var f, k;
474
+ var d, k;
474
475
  if (m.cachedId === m.id) throw new _("The input selection has not been updated.");
475
476
  m.cachedId = m.id;
476
- var M = a.value, b = a.selectionStart, N = a.selectionEnd;
477
- if (b === null || N === null) throw new _("The selection attributes have not been initialized.");
478
- var O, j = p.value;
479
- if (h.inputType === void 0 && (p.selectionStart = 0, p.selectionEnd = j.length), b > p.selectionStart ? O = "insert" : b <= p.selectionStart && b < p.selectionEnd ? O = "deleteBackward" : b === p.selectionEnd && M.length < j.length && (O = "deleteForward"), O === void 0 || (O === "deleteBackward" || O === "deleteForward") && M.length > j.length) throw new _("Input type detection error.");
480
- var T = "", I = p.selectionStart, R = p.selectionEnd;
481
- if (O === "insert") T = M.slice(p.selectionStart, b);
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);
482
483
  else {
483
- var D = j.length - M.length;
484
- I = b, R = b + D;
484
+ var D = b.length - M.length;
485
+ N = g, R = g + D;
485
486
  }
486
- y.value !== j ? y.options = y.fallbackOptions : y.fallbackOptions = y.options;
487
+ y.value !== b ? y.options = y.fallbackOptions : y.fallbackOptions = y.options;
487
488
  var F = y.options, G = r({
488
- inputType: O,
489
- previousValue: j,
489
+ inputType: C,
490
+ previousValue: b,
490
491
  previousOptions: F,
491
492
  value: M,
492
493
  addedValue: T,
493
- changeStart: I,
494
+ changeStart: N,
494
495
  changeEnd: R,
495
- selectionStart: b,
496
- selectionEnd: N
497
- }), H = G.options, A = rn(G, an);
498
- a.value = A.value, a.setSelectionRange(A.selectionStart, A.selectionEnd), y.value = A.value, y.options = H, p.selectionStart = A.selectionStart, p.selectionEnd = A.selectionEnd, (f = a._valueTracker) === null || f === void 0 || (k = f.setValue) === null || k === void 0 || k.call(f, j);
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);
499
500
  } catch (W) {
500
501
  if (a.value = p.value, a.setSelectionRange(p.selectionStart, p.selectionEnd), h.preventDefault(), h.stopPropagation(), W.name !== "SyntheticChangeError") throw W;
501
502
  }
502
503
  };
503
- document.activeElement === a && g(), a.addEventListener("focus", g), a.addEventListener("blur", E), a.addEventListener("input", v), o.set(a, {
504
- onFocus: g,
504
+ document.activeElement === a && w(), a.addEventListener("focus", w), a.addEventListener("blur", E), a.addEventListener("input", v), o.set(a, {
505
+ onFocus: w,
505
506
  onBlur: E,
506
507
  onInput: v
507
508
  });
508
- } else process.env.NODE_ENV !== "production" && console.warn("Warn: The input element type does not match one of the types: ".concat(ge.join(", "), "."));
509
+ } else process.env.NODE_ENV !== "production" && console.warn("Warn: The input element type does not match one of the types: ".concat(be.join(", "), "."));
509
510
  }, this.unregister = function(a) {
510
511
  var l = o.get(a);
511
512
  l !== void 0 && (a.removeEventListener("focus", l.onFocus), a.removeEventListener("blur", l.onBlur), a.removeEventListener("input", l.onInput), o.delete(a));
512
513
  };
513
514
  }));
514
- ye = je, Object.defineProperty(ye.prototype, Symbol.toStringTag, {
515
+ ge = Te, Object.defineProperty(ge.prototype, Symbol.toStringTag, {
515
516
  writable: !1,
516
517
  enumerable: !1,
517
518
  configurable: !0,
@@ -525,7 +526,7 @@ var ne = function(e) {
525
526
  `), `
526
527
  `));
527
528
  };
528
- }, be, on = ["track", "modify"];
529
+ }, Oe, ln = ["track", "modify"];
529
530
  function x(e) {
530
531
  var n, t, r, o;
531
532
  return {
@@ -537,27 +538,27 @@ function x(e) {
537
538
  modify: e.modify
538
539
  };
539
540
  }
540
- var Te = (function(e) {
541
+ var Ie = (function(e) {
541
542
  function n() {
542
543
  var t, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
543
- return ze(this, n), (t = $e(this, n, [{
544
+ return He(this, n), (t = ze(this, n, [{
544
545
  init: function(o) {
545
- var a = o.initialValue, l = o.controlled, c = x(r), i = c.mask, u = c.replacement, s = c.separate, d = c.showMask;
546
- return a = l || a ? a : d ? i : "", process.env.NODE_ENV !== "production" && (function(S) {
547
- var P = S.initialValue, C = S.mask, y = S.replacement;
548
- P.length > C.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."));
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."));
549
550
  var m = Object.keys(y).filter((function(v) {
550
551
  return v.length > 1;
551
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."));
553
- for (var p = C.slice(0, P.length), w = -1, g = 0; g < p.length; g++) {
554
- var E = Object.prototype.hasOwnProperty.call(y, p[g]);
555
- if (!(p[g] === P[g] || E && y[p[g]].test(P[g]))) {
556
- w = g;
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;
557
558
  break;
558
559
  }
559
560
  }
560
- w !== -1 && console.error(ne(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(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
+ 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
562
  })({
562
563
  initialValue: a,
563
564
  mask: i,
@@ -572,7 +573,7 @@ var Te = (function(e) {
572
573
  };
573
574
  },
574
575
  tracking: function(o) {
575
- var a = o.inputType, l = o.previousValue, c = o.previousOptions, i = o.addedValue, u = o.changeStart, s = o.changeEnd, d = x(r), S = d.track, P = d.modify, C = Ze(d, on), y = C.mask, m = C.replacement, p = C.showMask, w = C.separate, g = J(J({}, a === "insert" ? {
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
577
  inputType: a,
577
578
  data: i
578
579
  } : {
@@ -582,43 +583,43 @@ var Te = (function(e) {
582
583
  value: l,
583
584
  selectionStart: u,
584
585
  selectionEnd: s
585
- }), E = S?.(g);
586
+ }), E = O?.(w);
586
587
  if (E === !1) throw new _("Custom tracking stop.");
587
588
  E === null ? i = "" : E !== !0 && E !== void 0 && (i = E);
588
- var v = P?.(g);
589
- 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);
590
- var h = ae(l, J({ end: u }, c)), f = ae(l, J({ start: s }, c)), k = RegExp("[^".concat(Object.keys(m).join(""), "]"), "g"), M = y.replace(k, "");
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, "");
591
592
  if (h && (h = U(h, {
592
593
  replacementChars: M,
593
594
  replacement: m,
594
- separate: w
595
+ separate: S
595
596
  }), M = M.slice(h.length)), i && (i = U(i, {
596
597
  replacementChars: M,
597
598
  replacement: m,
598
599
  separate: !1
599
600
  }), M = M.slice(i.length)), a === "insert" && i === "") throw new _("The character does not match the key value of the `replacement` object.");
600
- if (w) {
601
- var b = y.slice(u, s).replace(k, ""), N = b.length - i.length;
602
- N < 0 ? f = f.slice(-N) : N > 0 && (f = b.slice(-N) + f);
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);
603
604
  }
604
- f && (f = U(f, {
605
+ d && (d = U(d, {
605
606
  replacementChars: M,
606
607
  replacement: m,
607
- separate: w
608
+ separate: S
608
609
  }));
609
- var O = ke(h + i + f, {
610
+ var C = Me(h + i + d, {
610
611
  mask: y,
611
612
  replacement: m,
612
- separate: w,
613
+ separate: S,
613
614
  showMask: p
614
- }), j = (function(T) {
615
- var I, R, D, F = T.inputType, G = T.value, H = T.addedValue, A = T.beforeChangeValue, W = T.mask, le = T.replacement, Ie = T.separate, Q = Me(G, {
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, {
616
617
  mask: W,
617
618
  replacement: le
618
619
  }).filter((function(q) {
619
620
  var se = q.type;
620
- return se === "input" || Ie && se === "replacement";
621
- })), ce = (I = Q[A.length + H.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 + H.length]) === null || D === void 0 ? void 0 : D.index;
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;
622
623
  if (F === "insert") {
623
624
  if (ce !== void 0) return ce + 1;
624
625
  if (V !== void 0) return V;
@@ -638,43 +639,43 @@ var Te = (function(e) {
638
639
  return ue !== -1 ? ue : G.length;
639
640
  })({
640
641
  inputType: a,
641
- value: O,
642
+ value: C,
642
643
  addedValue: i,
643
644
  beforeChangeValue: h,
644
645
  mask: y,
645
646
  replacement: m,
646
- separate: w
647
+ separate: S
647
648
  });
648
649
  return {
649
- value: O,
650
- selectionStart: j,
651
- selectionEnd: j,
650
+ value: C,
651
+ selectionStart: b,
652
+ selectionEnd: b,
652
653
  options: {
653
654
  mask: y,
654
655
  replacement: m,
655
- separate: w
656
+ separate: S
656
657
  }
657
658
  };
658
659
  }
659
660
  }])).format = function(o) {
660
- return Pe(o, x(r));
661
+ return Ee(o, x(r));
661
662
  }, t.formatToParts = function(o) {
662
- return Ye(o, x(r));
663
+ return Qe(o, x(r));
663
664
  }, t.unformat = function(o) {
664
- return Je(o, x(r));
665
+ return Ye(o, x(r));
665
666
  }, t.generatePattern = function(o) {
666
- return qe(o, x(r));
667
+ return Xe(o, x(r));
667
668
  }, t;
668
669
  }
669
- return We(n, je), He(n);
670
+ return Ze(n, Te), We(n);
670
671
  })();
671
- be = Te, Object.defineProperty(be.prototype, Symbol.toStringTag, {
672
+ Oe = Ie, Object.defineProperty(Oe.prototype, Symbol.toStringTag, {
672
673
  writable: !1,
673
674
  enumerable: !1,
674
675
  configurable: !0,
675
676
  value: "Mask"
676
677
  });
677
- function ln() {
678
+ function cn() {
678
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({
679
680
  mask: n,
680
681
  replacement: t,
@@ -683,12 +684,12 @@ function ln() {
683
684
  track: a,
684
685
  modify: l
685
686
  });
686
- 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() {
687
- return Xe(c, new Te(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, $e((function() {
688
+ return en(c, new Ie(i.current));
688
689
  }), []);
689
690
  }
690
- var cn = /* @__PURE__ */ Ae(Ne(), 1);
691
- var un = {
691
+ var un = /* @__PURE__ */ Ne(Re(), 1);
692
+ var sn = {
692
693
  AF: "Afghanistan",
693
694
  AL: "Albania",
694
695
  DZ: "Algeria",
@@ -966,42 +967,46 @@ var un = {
966
967
  SX: "Sint Maarten (Dutch part)",
967
968
  SS: "South Sudan",
968
969
  XK: "Kosovo"
969
- }, sn = {
970
+ }, pn = {
970
971
  locale: "en",
971
- countries: un
972
+ countries: sn
972
973
  };
973
- cn.registerLocale(sn);
974
- var wn = Ke(({ 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: d = !0, showNameOnSearch: S = !0, wrapperClassName: P, showPlaceHolder: C, ...y }, m) => {
975
- const p = Fe(), w = i ?? p, g = te(null), { isOpenSelector: E, value: v, selectedCountry: h, onChangeValue: f, handleOpenSelector: k } = Be(), M = typeof n == "string" && n.length >= 0, b = ln({
976
- mask: Le(h),
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),
977
978
  replacement: { _: /\d/ }
978
979
  });
979
- Ue(m, () => b.current, [b]);
980
- const N = De((O) => {
981
- O.target.value.startsWith(h.prefix) ? f(O.target.value) : f(`${h.prefix} `);
982
- }, [h.prefix, f]);
983
- return pe(() => {
984
- const O = new AbortController(), j = (I) => {
985
- I.key === "Escape" && k(!1);
986
- }, T = (I) => {
987
- g.current?.contains(I.target) || k(!1);
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);
988
989
  };
989
- return document.addEventListener("keydown", j, { signal: O.signal }), document.addEventListener("mousedown", T, { signal: O.signal }), document.addEventListener("visibilitychange", () => {
990
+ return document.addEventListener("keydown", T, { signal: b.signal }), document.addEventListener("visibilitychange", () => {
990
991
  document.hidden && k(!1);
991
- }, { signal: O.signal }), () => {
992
- O.abort();
992
+ }, { signal: b.signal }), () => {
993
+ b.abort();
993
994
  };
994
- }, [k, g]), pe(() => {
995
- b.current && (b.current.value = h.prefix + " ");
996
- }, [h.code]), /* @__PURE__ */ Z("div", {
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]);
1001
+ return /* @__PURE__ */ Z("div", {
997
1002
  className: "w-full flex flex-col gap-2",
998
1003
  children: [
999
1004
  a ? /* @__PURE__ */ B("div", {
1000
1005
  className: X(c),
1001
1006
  children: /* @__PURE__ */ Z("label", {
1002
- id: w,
1003
- className: Re({ className: l }),
1004
- onClick: () => !e && b.current?.focus(),
1007
+ htmlFor: S,
1008
+ className: Le({ className: l }),
1009
+ onClick: () => !e && g.current?.focus(),
1005
1010
  children: [a, o && /* @__PURE__ */ B(ee, {
1006
1011
  component: "span",
1007
1012
  className: "text-red-600 dark:text-red-500 ml-1",
@@ -1010,33 +1015,33 @@ var wn = Ke(({ disabled: e = !1, error: n, helperText: t, helperTextClassName: r
1010
1015
  })
1011
1016
  }) : null,
1012
1017
  /* @__PURE__ */ Z("div", {
1013
- ref: g,
1018
+ ref: w,
1014
1019
  "data-state": E ? "open" : "closed",
1015
- className: Ge({
1020
+ className: Ve({
1016
1021
  className: P,
1017
1022
  variant: M ? "error" : "default"
1018
1023
  }),
1019
1024
  children: [/* @__PURE__ */ Z("div", {
1020
1025
  className: "p-2 flex items-center gap-2.5",
1021
- children: [/* @__PURE__ */ B(Ve, {}), /* @__PURE__ */ B("input", {
1022
- id: a ? w : void 0,
1023
- ref: b,
1026
+ children: [/* @__PURE__ */ B(Ke, {}), /* @__PURE__ */ B("input", {
1027
+ id: a ? S : void 0,
1028
+ ref: C,
1024
1029
  name: i,
1025
1030
  autoComplete: "off",
1026
1031
  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"),
1027
1032
  type: "tel",
1028
1033
  inputMode: "tel",
1029
1034
  value: v,
1030
- onChange: N,
1035
+ onChange: A,
1031
1036
  disabled: e,
1032
1037
  ...y
1033
1038
  })]
1034
- }), E && /* @__PURE__ */ B(xe, {
1039
+ }), E && /* @__PURE__ */ B(De, {
1035
1040
  placeholder: u,
1036
1041
  showFlagOnSearch: s,
1037
- showInputFilter: d,
1038
- showNameOnSearch: S,
1039
- showPlaceHolder: C
1042
+ showInputFilter: f,
1043
+ showNameOnSearch: O,
1044
+ showPlaceHolder: j
1040
1045
  })]
1041
1046
  }),
1042
1047
  n ? /* @__PURE__ */ B(ee, {
@@ -1053,5 +1058,5 @@ var wn = Ke(({ disabled: e = !1, error: n, helperText: t, helperTextClassName: r
1053
1058
  });
1054
1059
  });
1055
1060
  export {
1056
- wn as t
1061
+ Mn as t
1057
1062
  };