@konstructio/ui 0.1.2-alpha.5 → 0.1.2-alpha.50

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