@wssto2/vue-core 0.1.0 → 0.2.0

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 (95) hide show
  1. package/README.md +20 -9
  2. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-CKghARkW.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-CeKK8_g5.js} +2 -2
  3. package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-BZb4qKXo.js → AlertDialog.vue_vue_type_script_setup_true_lang-e4hzkzg3.js} +1 -1
  4. package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-B82bl36A.js → AsyncSection.vue_vue_type_script_setup_true_lang-CWLB3xsR.js} +1 -1
  5. package/dist/Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js +51 -0
  6. package/dist/Button.vue_vue_type_script_setup_true_lang-B1eZgLae.js +182 -0
  7. package/dist/CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js +299 -0
  8. package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-Bx5O1RZJ.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-DyhYHRyz.js} +1 -1
  9. package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-DH6EB8br.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CvwoT1JF.js} +1 -1
  10. package/dist/{Menu.vue_vue_type_script_setup_true_lang-D44EHXQZ.js → Menu.vue_vue_type_script_setup_true_lang-CrMj6KPD.js} +1 -1
  11. package/dist/{Modal.vue_vue_type_script_setup_true_lang-DYQgaUtj.js → Modal.vue_vue_type_script_setup_true_lang-BQZM49gC.js} +138 -128
  12. package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-DDVQXJRB.js → PhotoViewer.vue_vue_type_script_setup_true_lang-ElDizaW2.js} +1 -1
  13. package/dist/{SectionList.vue_vue_type_script_setup_true_lang-DGcKX_OJ.js → SectionList.vue_vue_type_script_setup_true_lang-L9ita_Kx.js} +2 -2
  14. package/dist/SelectField.vue_vue_type_script_setup_true_lang-DZTrU8NJ.js +661 -0
  15. package/dist/{Sheet.vue_vue_type_script_setup_true_lang-BLBD5ps8.js → Sheet.vue_vue_type_script_setup_true_lang-CtkJ-4e3.js} +1 -1
  16. package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-BJWPVyfT.js → Tooltip.vue_vue_type_script_setup_true_lang-OOD_XNWx.js} +1 -1
  17. package/dist/app/application.d.ts +5 -0
  18. package/dist/app/environment.d.ts +2 -0
  19. package/dist/app/index.js +75 -72
  20. package/dist/button/index.d.ts +1 -1
  21. package/dist/button/index.js +5 -3
  22. package/dist/button/shortcut.d.ts +28 -2
  23. package/dist/collection/CollectionPage.vue.d.ts +1 -0
  24. package/dist/collection/CollectionRows.vue.d.ts +59 -0
  25. package/dist/collection/CollectionTable.vue.d.ts +1 -1
  26. package/dist/collection/DataTable.vue.d.ts +47 -0
  27. package/dist/collection/RowActions.vue.d.ts +19 -0
  28. package/dist/collection/columns.d.ts +2 -0
  29. package/dist/collection/index.d.ts +4 -2
  30. package/dist/collection/index.js +1752 -1610
  31. package/dist/collection/rowLayout.d.ts +10 -0
  32. package/dist/collection/slots.d.ts +6 -3
  33. package/dist/describeError-l5T9b8Uv.js +41 -0
  34. package/dist/dialogStack-DZZg55w0.js +31 -0
  35. package/dist/form/CommandDialog.vue.d.ts +12 -1
  36. package/dist/form/FormGroup.vue.d.ts +1 -1
  37. package/dist/form/MultiSelectField.vue.d.ts +4 -1
  38. package/dist/form/NumberField.vue.d.ts +6 -0
  39. package/dist/form/OptionList.vue.d.ts +6 -2
  40. package/dist/form/SelectField.vue.d.ts +4 -1
  41. package/dist/form/index.d.ts +2 -0
  42. package/dist/form/index.js +1940 -2008
  43. package/dist/form/suggestions.d.ts +11 -0
  44. package/dist/form/useOptions.d.ts +60 -0
  45. package/dist/i18n/describeError.d.ts +31 -0
  46. package/dist/i18n/index.d.ts +26 -0
  47. package/dist/i18n/index.js +22 -20
  48. package/dist/index.d.ts +1 -1
  49. package/dist/index.js +1 -1
  50. package/dist/internal/CountryFlag.vue.d.ts +10 -0
  51. package/dist/modal/Modal.vue.d.ts +4 -0
  52. package/dist/modal/ShortcutHelp.vue.d.ts +2 -0
  53. package/dist/modal/index.d.ts +2 -0
  54. package/dist/modal/index.js +64 -6
  55. package/dist/modal/placement.d.ts +22 -0
  56. package/dist/{options-CjSz2dQK.js → options-DAkBtYkI.js} +3 -3
  57. package/dist/overlay/Popover.vue.d.ts +3 -0
  58. package/dist/overlay/dialogStack.d.ts +9 -0
  59. package/dist/overlay/index.d.ts +1 -1
  60. package/dist/overlay/index.js +18 -17
  61. package/dist/page/index.js +4 -4
  62. package/dist/phone/index.js +247 -540
  63. package/dist/platform/AccessGate.vue.d.ts +50 -0
  64. package/dist/platform/index.d.ts +2 -0
  65. package/dist/platform/index.js +86 -66
  66. package/dist/resource/index.js +42 -42
  67. package/dist/shell/AccountMenuItem.vue.d.ts +3 -0
  68. package/dist/shell/NavigationList.vue.d.ts +1 -1
  69. package/dist/shell/index.js +406 -394
  70. package/dist/state/Badge.vue.d.ts +17 -10
  71. package/dist/state/hue.d.ts +8 -0
  72. package/dist/state/index.d.ts +2 -0
  73. package/dist/state/index.js +92 -56
  74. package/dist/state/useLoad.d.ts +41 -0
  75. package/dist/styles.css +1 -1
  76. package/dist/testing/app.d.ts +61 -0
  77. package/dist/testing/async.d.ts +12 -0
  78. package/dist/testing/collection.d.ts +18 -0
  79. package/dist/testing/format.d.ts +9 -0
  80. package/dist/testing/i18n.d.ts +16 -0
  81. package/dist/testing/index.d.ts +14 -0
  82. package/dist/testing/index.js +178 -0
  83. package/dist/testing/media.d.ts +23 -0
  84. package/dist/testing/platform.d.ts +40 -0
  85. package/dist/testing/transport.d.ts +40 -0
  86. package/dist/{toast-BTeX0r66.js → toast-DvrHQ6Ag.js} +45 -43
  87. package/dist/{useDialog-wmyNx2j_.js → useDialog-CXR3hN0G.js} +1 -1
  88. package/package.json +5 -1
  89. package/src/styles/theme.css +60 -0
  90. package/dist/Badge.vue_vue_type_script_setup_true_lang-DKc6ugmr.js +0 -31
  91. package/dist/Button.vue_vue_type_script_setup_true_lang-3f0emVNU.js +0 -141
  92. package/dist/SelectField.vue_vue_type_script_setup_true_lang-SyFWE33A.js +0 -422
  93. package/dist/dialogStack-DiTG1rZc.js +0 -26
  94. package/dist/phone/CountryFlag.vue.d.ts +0 -10
  95. /package/dist/{phone → internal}/flagLoaders.d.ts +0 -0
@@ -1,378 +1,85 @@
1
- import { defineComponent as at, useTemplateRef as L, shallowRef as dt, ref as E, onMounted as Ct, onBeforeUnmount as ft, watch as j, openBlock as g, createElementBlock as _, createCommentVNode as K, useModel as vt, computed as w, nextTick as F, createElementVNode as v, normalizeClass as $, unref as s, createVNode as N, toDisplayString as A, normalizeStyle as _t, Fragment as et, renderList as lt, withModifiers as wt, withDirectives as Mt, vModelText as kt, mergeModels as it, inject as St, createBlock as Tt, mergeProps as Nt, createSlots as At, withCtx as st, createTextVNode as Dt, renderSlot as It, mergeDefaults as Bt } from "vue";
2
- import { useI18n as ht } from "vue-i18n";
3
- import { b as $t } from "../controlSurface-t7OEFESJ.js";
4
- import { c as ut, u as Et, a as Gt, _ as Pt, f as Rt, b as Lt } from "../options-CjSz2dQK.js";
5
- import { _ as V } from "../Icon.vue_vue_type_script_lang-DtC4_mkz.js";
6
- import { u as Ot } from "../anchored-Cj4--8dT.js";
7
- import { AsYouType as U, validatePhoneNumberLength as Vt, parsePhoneNumberFromString as yt, getCountries as Kt, getCountryCallingCode as Ft } from "libphonenumber-js/max";
8
- import Ut from "libphonenumber-js/max/metadata";
9
- const Wt = {
10
- AC: () => import("country-flag-icons/string/3x2/AC"),
11
- AD: () => import("country-flag-icons/string/3x2/AD"),
12
- AE: () => import("country-flag-icons/string/3x2/AE"),
13
- AF: () => import("country-flag-icons/string/3x2/AF"),
14
- AG: () => import("country-flag-icons/string/3x2/AG"),
15
- AI: () => import("country-flag-icons/string/3x2/AI"),
16
- AL: () => import("country-flag-icons/string/3x2/AL"),
17
- AM: () => import("country-flag-icons/string/3x2/AM"),
18
- AO: () => import("country-flag-icons/string/3x2/AO"),
19
- AQ: () => import("country-flag-icons/string/3x2/AQ"),
20
- AR: () => import("country-flag-icons/string/3x2/AR"),
21
- AS: () => import("country-flag-icons/string/3x2/AS"),
22
- AT: () => import("country-flag-icons/string/3x2/AT"),
23
- AU: () => import("country-flag-icons/string/3x2/AU"),
24
- AW: () => import("country-flag-icons/string/3x2/AW"),
25
- AX: () => import("country-flag-icons/string/3x2/AX"),
26
- AZ: () => import("country-flag-icons/string/3x2/AZ"),
27
- BA: () => import("country-flag-icons/string/3x2/BA"),
28
- BB: () => import("country-flag-icons/string/3x2/BB"),
29
- BD: () => import("country-flag-icons/string/3x2/BD"),
30
- BE: () => import("country-flag-icons/string/3x2/BE"),
31
- BF: () => import("country-flag-icons/string/3x2/BF"),
32
- BG: () => import("country-flag-icons/string/3x2/BG"),
33
- BH: () => import("country-flag-icons/string/3x2/BH"),
34
- BI: () => import("country-flag-icons/string/3x2/BI"),
35
- BJ: () => import("country-flag-icons/string/3x2/BJ"),
36
- BL: () => import("country-flag-icons/string/3x2/BL"),
37
- BM: () => import("country-flag-icons/string/3x2/BM"),
38
- BN: () => import("country-flag-icons/string/3x2/BN"),
39
- BO: () => import("country-flag-icons/string/3x2/BO"),
40
- BQ: () => import("country-flag-icons/string/3x2/BQ"),
41
- BR: () => import("country-flag-icons/string/3x2/BR"),
42
- BS: () => import("country-flag-icons/string/3x2/BS"),
43
- BT: () => import("country-flag-icons/string/3x2/BT"),
44
- BV: () => import("country-flag-icons/string/3x2/BV"),
45
- BW: () => import("country-flag-icons/string/3x2/BW"),
46
- BY: () => import("country-flag-icons/string/3x2/BY"),
47
- BZ: () => import("country-flag-icons/string/3x2/BZ"),
48
- CA: () => import("country-flag-icons/string/3x2/CA"),
49
- CC: () => import("country-flag-icons/string/3x2/CC"),
50
- CD: () => import("country-flag-icons/string/3x2/CD"),
51
- CF: () => import("country-flag-icons/string/3x2/CF"),
52
- CG: () => import("country-flag-icons/string/3x2/CG"),
53
- CH: () => import("country-flag-icons/string/3x2/CH"),
54
- CI: () => import("country-flag-icons/string/3x2/CI"),
55
- CK: () => import("country-flag-icons/string/3x2/CK"),
56
- CL: () => import("country-flag-icons/string/3x2/CL"),
57
- CM: () => import("country-flag-icons/string/3x2/CM"),
58
- CN: () => import("country-flag-icons/string/3x2/CN"),
59
- CO: () => import("country-flag-icons/string/3x2/CO"),
60
- CR: () => import("country-flag-icons/string/3x2/CR"),
61
- CU: () => import("country-flag-icons/string/3x2/CU"),
62
- CV: () => import("country-flag-icons/string/3x2/CV"),
63
- CW: () => import("country-flag-icons/string/3x2/CW"),
64
- CX: () => import("country-flag-icons/string/3x2/CX"),
65
- CY: () => import("country-flag-icons/string/3x2/CY"),
66
- CZ: () => import("country-flag-icons/string/3x2/CZ"),
67
- DE: () => import("country-flag-icons/string/3x2/DE"),
68
- DJ: () => import("country-flag-icons/string/3x2/DJ"),
69
- DK: () => import("country-flag-icons/string/3x2/DK"),
70
- DM: () => import("country-flag-icons/string/3x2/DM"),
71
- DO: () => import("country-flag-icons/string/3x2/DO"),
72
- DZ: () => import("country-flag-icons/string/3x2/DZ"),
73
- EC: () => import("country-flag-icons/string/3x2/EC"),
74
- EE: () => import("country-flag-icons/string/3x2/EE"),
75
- EG: () => import("country-flag-icons/string/3x2/EG"),
76
- EH: () => import("country-flag-icons/string/3x2/EH"),
77
- ER: () => import("country-flag-icons/string/3x2/ER"),
78
- ES: () => import("country-flag-icons/string/3x2/ES"),
79
- ET: () => import("country-flag-icons/string/3x2/ET"),
80
- EU: () => import("country-flag-icons/string/3x2/EU"),
81
- FI: () => import("country-flag-icons/string/3x2/FI"),
82
- FJ: () => import("country-flag-icons/string/3x2/FJ"),
83
- FK: () => import("country-flag-icons/string/3x2/FK"),
84
- FM: () => import("country-flag-icons/string/3x2/FM"),
85
- FO: () => import("country-flag-icons/string/3x2/FO"),
86
- FR: () => import("country-flag-icons/string/3x2/FR"),
87
- GA: () => import("country-flag-icons/string/3x2/GA"),
88
- GB: () => import("country-flag-icons/string/3x2/GB"),
89
- GD: () => import("country-flag-icons/string/3x2/GD"),
90
- GE: () => import("country-flag-icons/string/3x2/GE"),
91
- GF: () => import("country-flag-icons/string/3x2/GF"),
92
- GG: () => import("country-flag-icons/string/3x2/GG"),
93
- GH: () => import("country-flag-icons/string/3x2/GH"),
94
- GI: () => import("country-flag-icons/string/3x2/GI"),
95
- GL: () => import("country-flag-icons/string/3x2/GL"),
96
- GM: () => import("country-flag-icons/string/3x2/GM"),
97
- GN: () => import("country-flag-icons/string/3x2/GN"),
98
- GP: () => import("country-flag-icons/string/3x2/GP"),
99
- GQ: () => import("country-flag-icons/string/3x2/GQ"),
100
- GR: () => import("country-flag-icons/string/3x2/GR"),
101
- GS: () => import("country-flag-icons/string/3x2/GS"),
102
- GT: () => import("country-flag-icons/string/3x2/GT"),
103
- GU: () => import("country-flag-icons/string/3x2/GU"),
104
- GW: () => import("country-flag-icons/string/3x2/GW"),
105
- GY: () => import("country-flag-icons/string/3x2/GY"),
106
- HK: () => import("country-flag-icons/string/3x2/HK"),
107
- HM: () => import("country-flag-icons/string/3x2/HM"),
108
- HN: () => import("country-flag-icons/string/3x2/HN"),
109
- HR: () => import("country-flag-icons/string/3x2/HR"),
110
- HT: () => import("country-flag-icons/string/3x2/HT"),
111
- HU: () => import("country-flag-icons/string/3x2/HU"),
112
- IC: () => import("country-flag-icons/string/3x2/IC"),
113
- ID: () => import("country-flag-icons/string/3x2/ID"),
114
- IE: () => import("country-flag-icons/string/3x2/IE"),
115
- IL: () => import("country-flag-icons/string/3x2/IL"),
116
- IM: () => import("country-flag-icons/string/3x2/IM"),
117
- IN: () => import("country-flag-icons/string/3x2/IN"),
118
- IO: () => import("country-flag-icons/string/3x2/IO"),
119
- IQ: () => import("country-flag-icons/string/3x2/IQ"),
120
- IR: () => import("country-flag-icons/string/3x2/IR"),
121
- IS: () => import("country-flag-icons/string/3x2/IS"),
122
- IT: () => import("country-flag-icons/string/3x2/IT"),
123
- JE: () => import("country-flag-icons/string/3x2/JE"),
124
- JM: () => import("country-flag-icons/string/3x2/JM"),
125
- JO: () => import("country-flag-icons/string/3x2/JO"),
126
- JP: () => import("country-flag-icons/string/3x2/JP"),
127
- KE: () => import("country-flag-icons/string/3x2/KE"),
128
- KG: () => import("country-flag-icons/string/3x2/KG"),
129
- KH: () => import("country-flag-icons/string/3x2/KH"),
130
- KI: () => import("country-flag-icons/string/3x2/KI"),
131
- KM: () => import("country-flag-icons/string/3x2/KM"),
132
- KN: () => import("country-flag-icons/string/3x2/KN"),
133
- KP: () => import("country-flag-icons/string/3x2/KP"),
134
- KR: () => import("country-flag-icons/string/3x2/KR"),
135
- KW: () => import("country-flag-icons/string/3x2/KW"),
136
- KY: () => import("country-flag-icons/string/3x2/KY"),
137
- KZ: () => import("country-flag-icons/string/3x2/KZ"),
138
- LA: () => import("country-flag-icons/string/3x2/LA"),
139
- LB: () => import("country-flag-icons/string/3x2/LB"),
140
- LC: () => import("country-flag-icons/string/3x2/LC"),
141
- LI: () => import("country-flag-icons/string/3x2/LI"),
142
- LK: () => import("country-flag-icons/string/3x2/LK"),
143
- LR: () => import("country-flag-icons/string/3x2/LR"),
144
- LS: () => import("country-flag-icons/string/3x2/LS"),
145
- LT: () => import("country-flag-icons/string/3x2/LT"),
146
- LU: () => import("country-flag-icons/string/3x2/LU"),
147
- LV: () => import("country-flag-icons/string/3x2/LV"),
148
- LY: () => import("country-flag-icons/string/3x2/LY"),
149
- MA: () => import("country-flag-icons/string/3x2/MA"),
150
- MC: () => import("country-flag-icons/string/3x2/MC"),
151
- MD: () => import("country-flag-icons/string/3x2/MD"),
152
- ME: () => import("country-flag-icons/string/3x2/ME"),
153
- MF: () => import("country-flag-icons/string/3x2/MF"),
154
- MG: () => import("country-flag-icons/string/3x2/MG"),
155
- MH: () => import("country-flag-icons/string/3x2/MH"),
156
- MK: () => import("country-flag-icons/string/3x2/MK"),
157
- ML: () => import("country-flag-icons/string/3x2/ML"),
158
- MM: () => import("country-flag-icons/string/3x2/MM"),
159
- MN: () => import("country-flag-icons/string/3x2/MN"),
160
- MO: () => import("country-flag-icons/string/3x2/MO"),
161
- MP: () => import("country-flag-icons/string/3x2/MP"),
162
- MQ: () => import("country-flag-icons/string/3x2/MQ"),
163
- MR: () => import("country-flag-icons/string/3x2/MR"),
164
- MS: () => import("country-flag-icons/string/3x2/MS"),
165
- MT: () => import("country-flag-icons/string/3x2/MT"),
166
- MU: () => import("country-flag-icons/string/3x2/MU"),
167
- MV: () => import("country-flag-icons/string/3x2/MV"),
168
- MW: () => import("country-flag-icons/string/3x2/MW"),
169
- MX: () => import("country-flag-icons/string/3x2/MX"),
170
- MY: () => import("country-flag-icons/string/3x2/MY"),
171
- MZ: () => import("country-flag-icons/string/3x2/MZ"),
172
- NA: () => import("country-flag-icons/string/3x2/NA"),
173
- NC: () => import("country-flag-icons/string/3x2/NC"),
174
- NE: () => import("country-flag-icons/string/3x2/NE"),
175
- NF: () => import("country-flag-icons/string/3x2/NF"),
176
- NG: () => import("country-flag-icons/string/3x2/NG"),
177
- NI: () => import("country-flag-icons/string/3x2/NI"),
178
- NL: () => import("country-flag-icons/string/3x2/NL"),
179
- NO: () => import("country-flag-icons/string/3x2/NO"),
180
- NP: () => import("country-flag-icons/string/3x2/NP"),
181
- NR: () => import("country-flag-icons/string/3x2/NR"),
182
- NU: () => import("country-flag-icons/string/3x2/NU"),
183
- NZ: () => import("country-flag-icons/string/3x2/NZ"),
184
- OM: () => import("country-flag-icons/string/3x2/OM"),
185
- PA: () => import("country-flag-icons/string/3x2/PA"),
186
- PE: () => import("country-flag-icons/string/3x2/PE"),
187
- PF: () => import("country-flag-icons/string/3x2/PF"),
188
- PG: () => import("country-flag-icons/string/3x2/PG"),
189
- PH: () => import("country-flag-icons/string/3x2/PH"),
190
- PK: () => import("country-flag-icons/string/3x2/PK"),
191
- PL: () => import("country-flag-icons/string/3x2/PL"),
192
- PM: () => import("country-flag-icons/string/3x2/PM"),
193
- PN: () => import("country-flag-icons/string/3x2/PN"),
194
- PR: () => import("country-flag-icons/string/3x2/PR"),
195
- PS: () => import("country-flag-icons/string/3x2/PS"),
196
- PT: () => import("country-flag-icons/string/3x2/PT"),
197
- PW: () => import("country-flag-icons/string/3x2/PW"),
198
- PY: () => import("country-flag-icons/string/3x2/PY"),
199
- QA: () => import("country-flag-icons/string/3x2/QA"),
200
- RE: () => import("country-flag-icons/string/3x2/RE"),
201
- RO: () => import("country-flag-icons/string/3x2/RO"),
202
- RS: () => import("country-flag-icons/string/3x2/RS"),
203
- RU: () => import("country-flag-icons/string/3x2/RU"),
204
- RW: () => import("country-flag-icons/string/3x2/RW"),
205
- SA: () => import("country-flag-icons/string/3x2/SA"),
206
- SB: () => import("country-flag-icons/string/3x2/SB"),
207
- SC: () => import("country-flag-icons/string/3x2/SC"),
208
- SD: () => import("country-flag-icons/string/3x2/SD"),
209
- SE: () => import("country-flag-icons/string/3x2/SE"),
210
- SG: () => import("country-flag-icons/string/3x2/SG"),
211
- SH: () => import("country-flag-icons/string/3x2/SH"),
212
- SI: () => import("country-flag-icons/string/3x2/SI"),
213
- SJ: () => import("country-flag-icons/string/3x2/SJ"),
214
- SK: () => import("country-flag-icons/string/3x2/SK"),
215
- SL: () => import("country-flag-icons/string/3x2/SL"),
216
- SM: () => import("country-flag-icons/string/3x2/SM"),
217
- SN: () => import("country-flag-icons/string/3x2/SN"),
218
- SO: () => import("country-flag-icons/string/3x2/SO"),
219
- SR: () => import("country-flag-icons/string/3x2/SR"),
220
- SS: () => import("country-flag-icons/string/3x2/SS"),
221
- ST: () => import("country-flag-icons/string/3x2/ST"),
222
- SV: () => import("country-flag-icons/string/3x2/SV"),
223
- SX: () => import("country-flag-icons/string/3x2/SX"),
224
- SY: () => import("country-flag-icons/string/3x2/SY"),
225
- SZ: () => import("country-flag-icons/string/3x2/SZ"),
226
- TA: () => import("country-flag-icons/string/3x2/TA"),
227
- TC: () => import("country-flag-icons/string/3x2/TC"),
228
- TD: () => import("country-flag-icons/string/3x2/TD"),
229
- TF: () => import("country-flag-icons/string/3x2/TF"),
230
- TG: () => import("country-flag-icons/string/3x2/TG"),
231
- TH: () => import("country-flag-icons/string/3x2/TH"),
232
- TJ: () => import("country-flag-icons/string/3x2/TJ"),
233
- TK: () => import("country-flag-icons/string/3x2/TK"),
234
- TL: () => import("country-flag-icons/string/3x2/TL"),
235
- TM: () => import("country-flag-icons/string/3x2/TM"),
236
- TN: () => import("country-flag-icons/string/3x2/TN"),
237
- TO: () => import("country-flag-icons/string/3x2/TO"),
238
- TR: () => import("country-flag-icons/string/3x2/TR"),
239
- TT: () => import("country-flag-icons/string/3x2/TT"),
240
- TV: () => import("country-flag-icons/string/3x2/TV"),
241
- TW: () => import("country-flag-icons/string/3x2/TW"),
242
- TZ: () => import("country-flag-icons/string/3x2/TZ"),
243
- UA: () => import("country-flag-icons/string/3x2/UA"),
244
- UG: () => import("country-flag-icons/string/3x2/UG"),
245
- UM: () => import("country-flag-icons/string/3x2/UM"),
246
- US: () => import("country-flag-icons/string/3x2/US"),
247
- UY: () => import("country-flag-icons/string/3x2/UY"),
248
- UZ: () => import("country-flag-icons/string/3x2/UZ"),
249
- VA: () => import("country-flag-icons/string/3x2/VA"),
250
- VC: () => import("country-flag-icons/string/3x2/VC"),
251
- VE: () => import("country-flag-icons/string/3x2/VE"),
252
- VG: () => import("country-flag-icons/string/3x2/VG"),
253
- VI: () => import("country-flag-icons/string/3x2/VI"),
254
- VN: () => import("country-flag-icons/string/3x2/VN"),
255
- VU: () => import("country-flag-icons/string/3x2/VU"),
256
- WF: () => import("country-flag-icons/string/3x2/WF"),
257
- WS: () => import("country-flag-icons/string/3x2/WS"),
258
- XA: () => import("country-flag-icons/string/3x2/XA"),
259
- XC: () => import("country-flag-icons/string/3x2/XC"),
260
- XK: () => import("country-flag-icons/string/3x2/XK"),
261
- XO: () => import("country-flag-icons/string/3x2/XO"),
262
- YE: () => import("country-flag-icons/string/3x2/YE"),
263
- YT: () => import("country-flag-icons/string/3x2/YT"),
264
- ZA: () => import("country-flag-icons/string/3x2/ZA"),
265
- ZM: () => import("country-flag-icons/string/3x2/ZM"),
266
- ZW: () => import("country-flag-icons/string/3x2/ZW")
267
- }, Ht = ["data-country"], Zt = ["src"], mt = /* @__PURE__ */ at({
268
- __name: "CountryFlag",
269
- props: {
270
- country: {}
271
- },
272
- setup(e) {
273
- const i = e, o = L("holder"), r = dt(null), a = E(typeof IntersectionObserver > "u");
274
- let y = null;
275
- async function d(f) {
276
- const c = Wt[f];
277
- if (!c) return void (r.value = null);
278
- const { default: S } = await c();
279
- f === i.country && (r.value = `data:image/svg+xml,${encodeURIComponent(S)}`);
280
- }
281
- return Ct(() => {
282
- a.value || !o.value || (y = new IntersectionObserver((f) => {
283
- f.some((c) => c.isIntersecting) && (a.value = !0, y?.disconnect());
284
- }), y.observe(o.value));
285
- }), ft(() => y?.disconnect()), j([() => i.country, a], ([f, c]) => {
286
- r.value = null, c && d(f);
287
- }, { immediate: !0 }), (f, c) => (g(), _("span", {
288
- ref_key: "holder",
289
- ref: o,
290
- class: "inline-block h-3.5 w-5 shrink-0 overflow-hidden rounded-xs bg-fill-strong ring-1 ring-border-separator",
291
- "data-test": "flag",
292
- "data-country": i.country
293
- }, [
294
- r.value ? (g(), _("img", {
295
- key: 0,
296
- src: r.value,
297
- alt: "",
298
- class: "size-full object-cover",
299
- draggable: "false"
300
- }, null, 8, Zt)) : K("", !0)
301
- ], 8, Ht));
302
- }
303
- }), pt = ["HR", "BA", "SI", "RS"], zt = 15;
304
- function bt(e) {
305
- return Ut.country_calling_codes[e]?.[0];
1
+ import { defineComponent as fe, useModel as me, useTemplateRef as F, ref as B, computed as g, watch as ne, nextTick as A, openBlock as w, createElementBlock as $, createElementVNode as f, normalizeClass as P, unref as i, createVNode as M, toDisplayString as T, normalizeStyle as ge, Fragment as ee, renderList as le, createCommentVNode as J, withModifiers as xe, withDirectives as we, vModelText as _e, mergeModels as ae, inject as ke, shallowRef as Ce, onBeforeUnmount as $e, createBlock as De, mergeProps as Me, createSlots as Te, withCtx as se, createTextVNode as Se, renderSlot as Ne, mergeDefaults as Ie } from "vue";
2
+ import { useI18n as pe } from "vue-i18n";
3
+ import { b as Pe } from "../controlSurface-t7OEFESJ.js";
4
+ import { f as ie, u as Ve, a as Oe, _ as Re, b as Ee, c as Be } from "../options-DAkBtYkI.js";
5
+ import { _ as q } from "../Icon.vue_vue_type_script_lang-DtC4_mkz.js";
6
+ import { _ as ue } from "../CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js";
7
+ import { u as ze } from "../anchored-Cj4--8dT.js";
8
+ import { AsYouType as L, validatePhoneNumberLength as Fe, parsePhoneNumberFromString as ve, getCountries as qe, getCountryCallingCode as Ae } from "libphonenumber-js/max";
9
+ import Le from "libphonenumber-js/max/metadata";
10
+ const ce = ["HR", "BA", "SI", "RS"], We = 15;
11
+ function he(t) {
12
+ return Le.country_calling_codes[t]?.[0];
306
13
  }
307
- const W = (e) => Ft(e), ct = (e) => `+${W(e)}`, ot = () => Kt();
308
- function Yt(e, i) {
309
- const o = `+${e}`;
310
- return new U().input(`${o}${i}`).slice(o.length).trim();
14
+ const W = (t) => Ae(t), de = (t) => `+${W(t)}`, te = () => qe();
15
+ function Ke(t, a) {
16
+ const o = `+${t}`;
17
+ return new L().input(`${o}${a}`).slice(o.length).trim();
311
18
  }
312
- function nt(e, i, o) {
313
- const r = o.slice(0, Math.max(0, zt - i.length));
314
- return r === "" ? { country: e, e164: "", text: "" } : { country: e, e164: `+${i}${r}`, text: Yt(i, r) };
19
+ function re(t, a, o) {
20
+ const r = o.slice(0, Math.max(0, We - a.length));
21
+ return r === "" ? { country: t, e164: "", text: "" } : { country: t, e164: `+${a}${r}`, text: Ke(a, r) };
315
22
  }
316
- function rt(e, i) {
317
- const o = e.trim().replace(/^00(?=\d)/, "+");
23
+ function oe(t, a) {
24
+ const o = t.trim().replace(/^00(?=\d)/, "+");
318
25
  if (o.startsWith("+")) {
319
- const a = new U();
320
- a.input(o);
321
- const y = a.getCallingCode();
322
- if (!y) return { country: i, e164: "", text: o.replace(/[^\d+]/g, "") };
323
- const d = a.getCountry() ?? (W(i) === y ? i : bt(y) ?? i);
324
- return nt(d, y, a.getNumber()?.nationalNumber ?? "");
26
+ const l = new L();
27
+ l.input(o);
28
+ const x = l.getCallingCode();
29
+ if (!x) return { country: a, e164: "", text: o.replace(/[^\d+]/g, "") };
30
+ const p = l.getCountry() ?? (W(a) === x ? a : he(x) ?? a);
31
+ return re(p, x, l.getNumber()?.nationalNumber ?? "");
325
32
  }
326
- const r = new U(i);
327
- return r.input(o.replace(/\D/g, "")), nt(i, W(i), r.getNumber()?.nationalNumber ?? "");
33
+ const r = new L(a);
34
+ return r.input(o.replace(/\D/g, "")), re(a, W(a), r.getNumber()?.nationalNumber ?? "");
328
35
  }
329
- function qt(e, i) {
330
- return nt(i, W(i), e.text.replace(/\D/g, ""));
36
+ function Ue(t, a) {
37
+ return re(a, W(a), t.text.replace(/\D/g, ""));
331
38
  }
332
- function Xt(e) {
333
- return e.startsWith("+") ? new U().input(e) : e;
39
+ function je(t) {
40
+ return t.startsWith("+") ? new L().input(t) : t;
334
41
  }
335
- const Jt = { MOBILE: "mobile", FIXED_LINE: "landline", TOLL_FREE: "toll_free", PREMIUM_RATE: "premium_rate", VOIP: "voip" };
336
- function jt(e) {
337
- const i = e ? yt(e) : void 0, o = i?.isValid() ? i.getType() : void 0;
338
- return o ? Jt[o] : void 0;
42
+ const He = { MOBILE: "mobile", FIXED_LINE: "landline", TOLL_FREE: "toll_free", PREMIUM_RATE: "premium_rate", VOIP: "voip" };
43
+ function Ge(t) {
44
+ const a = t ? ve(t) : void 0, o = a?.isValid() ? a.getType() : void 0;
45
+ return o ? He[o] : void 0;
339
46
  }
340
- function Qt(e) {
341
- const i = new U();
342
- i.input(e);
343
- const o = i.getCallingCode();
344
- return i.getCountry() ?? (o ? bt(o) : void 0);
47
+ function Xe(t) {
48
+ const a = new L();
49
+ a.input(t);
50
+ const o = a.getCallingCode();
51
+ return a.getCountry() ?? (o ? he(o) : void 0);
345
52
  }
346
- function gt(e) {
347
- if (e === "") return null;
348
- const i = Qt(e), o = Vt(e);
349
- return o === "TOO_SHORT" ? { kind: "too_short", country: i } : o === "TOO_LONG" ? { kind: "too_long", country: i } : o !== void 0 ? { kind: "invalid", country: i } : yt(e)?.isValid() ? null : { kind: "invalid", country: i };
53
+ function ye(t) {
54
+ if (t === "") return null;
55
+ const a = Xe(t), o = Fe(t);
56
+ return o === "TOO_SHORT" ? { kind: "too_short", country: a } : o === "TOO_LONG" ? { kind: "too_long", country: a } : o !== void 0 ? { kind: "invalid", country: a } : ve(t)?.isValid() ? null : { kind: "invalid", country: a };
350
57
  }
351
- const Te = (e) => gt(e) === null;
352
- function xt(e, i) {
58
+ const Ct = (t) => ye(t) === null;
59
+ function be(t, a) {
353
60
  try {
354
- return new Intl.DisplayNames([i], { type: "region" }).of(e) ?? e;
61
+ return new Intl.DisplayNames([a], { type: "region" }).of(t) ?? t;
355
62
  } catch {
356
- return e;
63
+ return t;
357
64
  }
358
65
  }
359
- function te(e, i, o) {
360
- const r = ut(e.trim());
66
+ function Ye(t, a, o) {
67
+ const r = ie(t.trim());
361
68
  if (r === "") return o;
362
- const a = r.replace(/\D/g, ""), y = new Intl.DisplayNames([i], { type: "region" }), d = (c) => ut(y.of(c) ?? c), f = r.startsWith("+") || /^\d+$/.test(r);
363
- return o.filter((c) => f ? W(c).startsWith(a) : d(c).includes(r) || c.toLowerCase() === r);
69
+ const l = r.replace(/\D/g, ""), x = new Intl.DisplayNames([a], { type: "region" }), p = (h) => ie(x.of(h) ?? h), _ = r.startsWith("+") || /^\d+$/.test(r);
70
+ return o.filter((h) => _ ? W(h).startsWith(l) : p(h).includes(r) || h.toLowerCase() === r);
364
71
  }
365
- const ee = ["id", "disabled", "aria-label", "aria-expanded"], oe = { class: "tabular-nums" }, re = ["id", "aria-label"], ie = {
72
+ const Je = ["id", "disabled", "aria-label", "aria-expanded"], Qe = { class: "tabular-nums" }, Ze = ["id", "aria-label"], et = {
366
73
  key: 0,
367
74
  role: "presentation",
368
75
  class: "px-2 pb-1 pt-1.5 text-caption font-semibold uppercase text-content-disabled"
369
- }, ne = ["id", "aria-selected", "data-country", "onMouseenter", "onClick"], ae = { class: "shrink-0 tabular-nums text-content-muted" }, le = {
76
+ }, tt = ["id", "aria-selected", "data-country", "onMouseenter", "onClick"], ot = { class: "shrink-0 tabular-nums text-content-muted" }, nt = {
370
77
  key: 0,
371
78
  class: "px-3 py-2 text-footnote text-content-muted",
372
79
  role: "status"
373
- }, se = { class: "border-t border-border-separator px-3 py-2" }, ue = ["aria-controls", "aria-activedescendant", "aria-label", "placeholder"], me = /* @__PURE__ */ at({
80
+ }, at = { class: "border-t border-border-separator px-3 py-2" }, rt = ["aria-controls", "aria-activedescendant", "aria-label", "placeholder"], lt = /* @__PURE__ */ fe({
374
81
  __name: "CountryPicker",
375
- props: /* @__PURE__ */ it({
82
+ props: /* @__PURE__ */ ae({
376
83
  id: {},
377
84
  common: {},
378
85
  disabled: { type: Boolean },
@@ -381,158 +88,158 @@ const ee = ["id", "disabled", "aria-label", "aria-expanded"], oe = { class: "tab
381
88
  modelValue: { required: !0 },
382
89
  modelModifiers: {}
383
90
  }),
384
- emits: /* @__PURE__ */ it(["picked"], ["update:modelValue"]),
385
- setup(e, { expose: i, emit: o }) {
386
- const r = e, a = vt(e, "modelValue"), y = o, { t: d, locale: f } = ht(), c = L("root"), S = L("trigger"), M = L("panel"), H = L("search"), k = E(!1), b = E(""), p = E(0), G = w(() => {
387
- const t = /* @__PURE__ */ new Map();
388
- for (const l of ot()) t.set(l, xt(l, f.value));
389
- return t;
390
- }), D = (t) => G.value.get(t) ?? t, T = w(() => {
391
- const t = r.common.filter((m) => G.value.has(m));
392
- if (b.value.trim() !== "") {
393
- const m = te(b.value, f.value, ot());
394
- return [{ title: null, countries: [...m.filter((n) => t.includes(n)), ...m.filter((n) => !t.includes(n))] }];
91
+ emits: /* @__PURE__ */ ae(["picked"], ["update:modelValue"]),
92
+ setup(t, { expose: a, emit: o }) {
93
+ const r = t, l = me(t, "modelValue"), x = o, { t: p, locale: _ } = pe(), h = F("root"), V = F("trigger"), k = F("panel"), K = F("search"), C = B(!1), v = B(""), d = B(0), O = g(() => {
94
+ const e = /* @__PURE__ */ new Map();
95
+ for (const s of te()) e.set(s, be(s, _.value));
96
+ return e;
97
+ }), S = (e) => O.value.get(e) ?? e, D = g(() => {
98
+ const e = r.common.filter((c) => O.value.has(c));
99
+ if (v.value.trim() !== "") {
100
+ const c = Ye(v.value, _.value, te());
101
+ return [{ title: null, countries: [...c.filter((n) => e.includes(n)), ...c.filter((n) => !e.includes(n))] }];
395
102
  }
396
- const l = ot().filter((m) => !t.includes(m)).sort((m, n) => D(m).localeCompare(D(n), f.value));
397
- return [{ title: d("core.form.phone.common"), countries: t }, { title: d("core.form.phone.all"), countries: l }].filter((m) => m.countries.length > 0);
398
- }), x = w(() => T.value.flatMap((t) => t.countries)), O = w(() => T.value.map((t, l) => T.value.slice(0, l).reduce((m, n) => m + n.countries.length, 0))), Z = (t) => `${r.id}-country-${t}`, { style: Q } = Ot(M, {
399
- reference: () => S.value,
103
+ const s = te().filter((c) => !e.includes(c)).sort((c, n) => S(c).localeCompare(S(n), _.value));
104
+ return [{ title: p("core.form.phone.common"), countries: e }, { title: p("core.form.phone.all"), countries: s }].filter((c) => c.countries.length > 0);
105
+ }), y = g(() => D.value.flatMap((e) => e.countries)), z = g(() => D.value.map((e, s) => D.value.slice(0, s).reduce((c, n) => c + n.countries.length, 0))), U = (e) => `${r.id}-country-${e}`, { style: Q } = ze(k, {
106
+ reference: () => V.value,
400
107
  placement: () => "bottom-start",
401
108
  offset: 4,
402
109
  padding: 8,
403
- fit: (t, l) => {
404
- t.style.width = "min(20rem, calc(100vw - 1rem))", t.style.maxHeight = `${Math.max(200, Math.min(380, l.height))}px`;
110
+ fit: (e, s) => {
111
+ e.style.width = "min(20rem, calc(100vw - 1rem))", e.style.maxHeight = `${Math.max(200, Math.min(380, s.height))}px`;
405
112
  }
406
113
  });
407
- async function z() {
408
- r.disabled || k.value || (b.value = "", p.value = Math.max(0, x.value.indexOf(a.value)), k.value = !0, await F(), H.value?.focus());
114
+ async function j() {
115
+ r.disabled || C.value || (v.value = "", d.value = Math.max(0, y.value.indexOf(l.value)), C.value = !0, await A(), K.value?.focus());
409
116
  }
410
- function I(t) {
411
- k.value = !1, t && S.value?.focus();
117
+ function N(e) {
118
+ C.value = !1, e && V.value?.focus();
412
119
  }
413
- function P(t) {
414
- a.value = t, y("picked", t), I(!1);
120
+ function R(e) {
121
+ l.value = e, x("picked", e), N(!1);
415
122
  }
416
- j(b, () => p.value = 0), j(p, () => void F(() => M.value?.querySelector("[aria-selected='true']")?.scrollIntoView?.({ block: "nearest" })));
417
- function Y(t) {
418
- k.value && !c.value?.contains(t.relatedTarget) && I(!1);
123
+ ne(v, () => d.value = 0), ne(d, () => void A(() => k.value?.querySelector("[aria-selected='true']")?.scrollIntoView?.({ block: "nearest" })));
124
+ function H(e) {
125
+ C.value && !h.value?.contains(e.relatedTarget) && N(!1);
419
126
  }
420
- function q(t) {
421
- if (t.key === "Escape")
422
- t.stopPropagation(), t.preventDefault(), I(!0);
423
- else if (t.key === "ArrowDown" || t.key === "ArrowUp")
424
- t.preventDefault(), p.value = Math.min(Math.max(p.value + (t.key === "ArrowDown" ? 1 : -1), 0), x.value.length - 1);
425
- else if (t.key === "Enter") {
426
- t.preventDefault();
427
- const l = x.value[p.value];
428
- l && P(l);
127
+ function G(e) {
128
+ if (e.key === "Escape")
129
+ e.stopPropagation(), e.preventDefault(), N(!0);
130
+ else if (e.key === "ArrowDown" || e.key === "ArrowUp")
131
+ e.preventDefault(), d.value = Math.min(Math.max(d.value + (e.key === "ArrowDown" ? 1 : -1), 0), y.value.length - 1);
132
+ else if (e.key === "Enter") {
133
+ e.preventDefault();
134
+ const s = y.value[d.value];
135
+ s && R(s);
429
136
  }
430
137
  }
431
- function R(t) {
432
- (t.key === "ArrowDown" || t.key === "ArrowUp") && (t.preventDefault(), z());
138
+ function E(e) {
139
+ (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), j());
433
140
  }
434
- return i({ focus: () => S.value?.focus() }), (t, l) => (g(), _("div", {
141
+ return a({ focus: () => V.value?.focus() }), (e, s) => (w(), $("div", {
435
142
  ref_key: "root",
436
- ref: c,
143
+ ref: h,
437
144
  class: "shrink-0",
438
- onFocusout: Y
145
+ onFocusout: H
439
146
  }, [
440
- v("button", {
147
+ f("button", {
441
148
  id: `${r.id}-country`,
442
149
  ref_key: "trigger",
443
- ref: S,
150
+ ref: V,
444
151
  type: "button",
445
152
  disabled: r.disabled,
446
- "aria-label": s(d)("core.form.phone.country", { country: D(a.value) }),
153
+ "aria-label": i(p)("core.form.phone.country", { country: S(l.value) }),
447
154
  "aria-haspopup": "listbox",
448
- "aria-expanded": k.value,
155
+ "aria-expanded": C.value,
449
156
  "data-test": "country-button",
450
- class: $(["flex h-full min-h-8 cursor-pointer items-center gap-1.5 whitespace-nowrap text-body font-medium text-content-strong focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus disabled:cursor-not-allowed compact:border-r compact:border-border-separator", r.surface]),
451
- onClick: l[0] || (l[0] = (m) => k.value ? I(!0) : z()),
452
- onKeydown: R
157
+ class: P(["flex h-full min-h-8 cursor-pointer items-center gap-1.5 whitespace-nowrap text-body font-medium text-content-strong focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus disabled:cursor-not-allowed compact:border-r compact:border-border-separator", r.surface]),
158
+ onClick: s[0] || (s[0] = (c) => C.value ? N(!0) : j()),
159
+ onKeydown: E
453
160
  }, [
454
- N(mt, { country: a.value }, null, 8, ["country"]),
455
- v("span", oe, A(s(ct)(a.value)), 1),
456
- N(s(V), {
161
+ M(ue, { country: l.value }, null, 8, ["country"]),
162
+ f("span", Qe, T(i(de)(l.value)), 1),
163
+ M(i(q), {
457
164
  name: "arrowDownSLine",
458
165
  size: 14,
459
166
  class: "text-content-muted"
460
167
  })
461
- ], 42, ee),
462
- k.value ? (g(), _("div", {
168
+ ], 42, Je),
169
+ C.value ? (w(), $("div", {
463
170
  key: 0,
464
171
  ref_key: "panel",
465
- ref: M,
466
- style: _t(s(Q)),
172
+ ref: k,
173
+ style: ge(i(Q)),
467
174
  "data-test": "country-list",
468
175
  class: "z-1000 flex flex-col overflow-hidden rounded-menu bg-surface-overlay shadow-float"
469
176
  }, [
470
- v("div", {
177
+ f("div", {
471
178
  id: `${r.id}-countries`,
472
179
  role: "listbox",
473
- "aria-label": s(d)("core.form.phone.countries"),
180
+ "aria-label": i(p)("core.form.phone.countries"),
474
181
  class: "min-h-0 flex-1 overflow-y-auto p-2"
475
182
  }, [
476
- (g(!0), _(et, null, lt(T.value, (m, n) => (g(), _(et, {
477
- key: m.title ?? "found"
183
+ (w(!0), $(ee, null, le(D.value, (c, n) => (w(), $(ee, {
184
+ key: c.title ?? "found"
478
185
  }, [
479
- m.title ? (g(), _("p", ie, A(m.title), 1)) : K("", !0),
480
- (g(!0), _(et, null, lt(m.countries, (u, C) => (g(), _("div", {
481
- id: Z(u),
186
+ c.title ? (w(), $("p", et, T(c.title), 1)) : J("", !0),
187
+ (w(!0), $(ee, null, le(c.countries, (u, b) => (w(), $("div", {
188
+ id: U(u),
482
189
  key: u,
483
190
  role: "option",
484
- "aria-selected": (O.value[n] ?? 0) + C === p.value,
191
+ "aria-selected": (z.value[n] ?? 0) + b === d.value,
485
192
  "data-test": "country-option",
486
193
  "data-country": u,
487
- class: $(["flex cursor-pointer items-center gap-2.5 rounded-control px-2 py-2 text-body", (O.value[n] ?? 0) + C === p.value ? "bg-tint-soft" : "hover:bg-fill"]),
488
- onMousedown: l[1] || (l[1] = wt(() => {
194
+ class: P(["flex cursor-pointer items-center gap-2.5 rounded-control px-2 py-2 text-body", (z.value[n] ?? 0) + b === d.value ? "bg-tint-soft" : "hover:bg-fill"]),
195
+ onMousedown: s[1] || (s[1] = xe(() => {
489
196
  }, ["prevent"])),
490
- onMouseenter: (h) => p.value = (O.value[n] ?? 0) + C,
491
- onClick: (h) => P(u)
197
+ onMouseenter: (m) => d.value = (z.value[n] ?? 0) + b,
198
+ onClick: (m) => R(u)
492
199
  }, [
493
- N(mt, { country: u }, null, 8, ["country"]),
494
- v("span", {
495
- class: $(["min-w-0 flex-1 truncate text-content-strong", u === a.value ? "font-semibold" : ""])
496
- }, A(D(u)), 3),
497
- v("span", ae, A(s(ct)(u)), 1)
498
- ], 42, ne))), 128))
200
+ M(ue, { country: u }, null, 8, ["country"]),
201
+ f("span", {
202
+ class: P(["min-w-0 flex-1 truncate text-content-strong", u === l.value ? "font-semibold" : ""])
203
+ }, T(S(u)), 3),
204
+ f("span", ot, T(i(de)(u)), 1)
205
+ ], 42, tt))), 128))
499
206
  ], 64))), 128)),
500
- x.value.length === 0 ? (g(), _("p", le, A(s(d)("core.form.phone.no_match")), 1)) : K("", !0)
501
- ], 8, re),
502
- v("div", se, [
503
- Mt(v("input", {
207
+ y.value.length === 0 ? (w(), $("p", nt, T(i(p)("core.form.phone.no_match")), 1)) : J("", !0)
208
+ ], 8, Ze),
209
+ f("div", at, [
210
+ we(f("input", {
504
211
  ref_key: "search",
505
- ref: H,
506
- "onUpdate:modelValue": l[2] || (l[2] = (m) => b.value = m),
212
+ ref: K,
213
+ "onUpdate:modelValue": s[2] || (s[2] = (c) => v.value = c),
507
214
  type: "text",
508
215
  role: "combobox",
509
216
  autocomplete: "off",
510
217
  "aria-autocomplete": "list",
511
218
  "aria-expanded": "true",
512
219
  "aria-controls": `${r.id}-countries`,
513
- "aria-activedescendant": x.value[p.value] ? Z(x.value[p.value]) : void 0,
514
- "aria-label": s(d)("core.form.phone.search"),
515
- placeholder: s(d)("core.form.phone.search"),
220
+ "aria-activedescendant": y.value[d.value] ? U(y.value[d.value]) : void 0,
221
+ "aria-label": i(p)("core.form.phone.search"),
222
+ placeholder: i(p)("core.form.phone.search"),
516
223
  "data-test": "country-search",
517
224
  class: "block w-full border-0 bg-transparent p-0 text-body text-content-strong placeholder:text-content-muted focus:outline-none focus:ring-0",
518
- onKeydown: q
519
- }, null, 40, ue), [
520
- [kt, b.value]
225
+ onKeydown: G
226
+ }, null, 40, rt), [
227
+ [_e, v.value]
521
228
  ])
522
229
  ])
523
- ], 4)) : K("", !0)
230
+ ], 4)) : J("", !0)
524
231
  ], 544));
525
232
  }
526
- }), pe = Symbol("vue-core.phoneDefaults"), ce = { class: "w-full min-w-0" }, de = ["id", "value", "name", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], fe = {
233
+ }), st = Symbol("vue-core.phoneDefaults"), it = { class: "w-full min-w-0" }, ut = ["id", "value", "name", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], ct = {
527
234
  key: 0,
528
235
  class: "mt-1.5 flex items-center gap-1.5 text-footnote text-status-success-content",
529
236
  "data-test": "phone-kind"
530
- }, ve = ["href", "aria-label", "title"], he = ["href", "aria-label", "title"], ye = ["aria-label", "title"], be = {
237
+ }, dt = ["href", "aria-label", "title"], ft = ["href", "aria-label", "title"], mt = ["aria-label", "title"], pt = {
531
238
  class: "sr-only",
532
239
  role: "status"
533
- }, Ne = /* @__PURE__ */ at({
240
+ }, $t = /* @__PURE__ */ fe({
534
241
  __name: "PhoneField",
535
- props: /* @__PURE__ */ it(/* @__PURE__ */ Bt({
242
+ props: /* @__PURE__ */ ae(/* @__PURE__ */ Ie({
536
243
  label: {},
537
244
  hint: {},
538
245
  error: {},
@@ -546,89 +253,89 @@ const ee = ["id", "disabled", "aria-label", "aria-expanded"], oe = { class: "tab
546
253
  commonCountries: {},
547
254
  placeholder: {},
548
255
  width: {}
549
- }, { ...Lt, defaultCountry: void 0, commonCountries: void 0, placeholder: void 0, width: "lg" }), {
256
+ }, { ...Be, defaultCountry: void 0, commonCountries: void 0, placeholder: void 0, width: "lg" }), {
550
257
  modelValue: { default: "" },
551
258
  modelModifiers: {}
552
259
  }),
553
260
  emits: ["update:modelValue"],
554
- setup(e, { expose: i }) {
555
- const o = e, r = vt(e, "modelValue"), { t: a, locale: y } = ht(), d = St(pe, {}), f = !!Et(), c = Gt("text", () => o.error || P.value ? "error" : o.disabled ? "locked" : "rest"), S = w(() => f ? $t(o.width) : "w-full"), M = L("input"), H = w(() => o.defaultCountry ?? d.defaultCountry ?? (o.commonCountries ?? d.commonCountries ?? pt)[0] ?? "HR"), k = w(() => o.commonCountries ?? d.commonCountries ?? pt), b = dt(H.value), p = E("");
556
- let G = null;
557
- function D(n) {
558
- b.value = n.country, p.value = n.text;
261
+ setup(t, { expose: a }) {
262
+ const o = t, r = me(t, "modelValue"), { t: l, locale: x } = pe(), p = ke(st, {}), _ = !!Ve(), h = Oe("text", () => o.error || R.value ? "error" : o.disabled ? "locked" : "rest"), V = g(() => _ ? Pe(o.width) : "w-full"), k = F("input"), K = g(() => o.defaultCountry ?? p.defaultCountry ?? (o.commonCountries ?? p.commonCountries ?? ce)[0] ?? "HR"), C = g(() => o.commonCountries ?? p.commonCountries ?? ce), v = Ce(K.value), d = B("");
263
+ let O = null;
264
+ function S(n) {
265
+ v.value = n.country, d.value = n.text;
559
266
  }
560
- j(() => r.value, (n) => {
561
- n !== G && (G = null, D(rt(n, b.value)));
267
+ ne(() => r.value, (n) => {
268
+ n !== O && (O = null, S(oe(n, v.value)));
562
269
  }, { immediate: !0 });
563
- function T(n) {
564
- D(n), G = n.e164, r.value = n.e164;
270
+ function D(n) {
271
+ S(n), O = n.e164, r.value = n.e164;
565
272
  }
566
- const x = (n) => n.replace(/\D/g, "").length;
567
- async function O(n) {
568
- await F();
569
- const u = M.value;
273
+ const y = (n) => n.replace(/\D/g, "").length;
274
+ async function z(n) {
275
+ await A();
276
+ const u = k.value;
570
277
  if (!u || document.activeElement !== u) return;
571
- u.value = p.value;
572
- let C = 0, h = 0;
573
- for (; h < p.value.length && C < n; ) /\d/.test(p.value[h++] ?? "") && C++;
574
- u.setSelectionRange(h, h);
278
+ u.value = d.value;
279
+ let b = 0, m = 0;
280
+ for (; m < d.value.length && b < n; ) /\d/.test(d.value[m++] ?? "") && b++;
281
+ u.setSelectionRange(m, m);
575
282
  }
576
- function Z(n) {
577
- const u = n.target, C = u.selectionStart ?? u.value.length;
578
- let h = u.value, B = x(h.slice(0, C));
283
+ function U(n) {
284
+ const u = n.target, b = u.selectionStart ?? u.value.length;
285
+ let m = u.value, I = y(m.slice(0, b));
579
286
  const X = n.inputType ?? "";
580
- if (X.startsWith("delete") && x(h) === x(p.value) && x(h) > 0) {
581
- const tt = h.replace(/\D/g, ""), J = X === "deleteContentForward" ? B : B - 1;
582
- J >= 0 && J < tt.length && (h = (h.trimStart().startsWith("+") ? "+" : "") + tt.slice(0, J) + tt.slice(J + 1), B = Math.max(0, B - (X === "deleteContentForward" ? 0 : 1)));
287
+ if (X.startsWith("delete") && y(m) === y(d.value) && y(m) > 0) {
288
+ const Z = m.replace(/\D/g, ""), Y = X === "deleteContentForward" ? I : I - 1;
289
+ Y >= 0 && Y < Z.length && (m = (m.trimStart().startsWith("+") ? "+" : "") + Z.slice(0, Y) + Z.slice(Y + 1), I = Math.max(0, I - (X === "deleteContentForward" ? 0 : 1)));
583
290
  }
584
- T(rt(h, b.value)), O(B);
291
+ D(oe(m, v.value)), z(I);
585
292
  }
586
293
  function Q(n) {
587
294
  const u = n.clipboardData?.getData("text")?.trim() ?? "";
588
- /^(\+|00)\d/.test(u) && (n.preventDefault(), T(rt(u, b.value)), F(() => M.value?.setSelectionRange(p.value.length, p.value.length)));
295
+ /^(\+|00)\d/.test(u) && (n.preventDefault(), D(oe(u, v.value)), A(() => k.value?.setSelectionRange(d.value.length, d.value.length)));
589
296
  }
590
- function z(n) {
591
- T(qt({ country: b.value, e164: r.value, text: p.value }, n)), F(() => M.value?.focus());
297
+ function j(n) {
298
+ D(Ue({ country: v.value, e164: r.value, text: d.value }, n)), A(() => k.value?.focus());
592
299
  }
593
- const I = E(!1), P = w(() => I.value && r.value !== "" ? gt(r.value) : null), Y = w(() => {
594
- const n = P.value;
300
+ const N = B(!1), R = g(() => N.value && r.value !== "" ? ye(r.value) : null), H = g(() => {
301
+ const n = R.value;
595
302
  if (n)
596
- return n.country ? a(`core.form.phone.${n.kind}`, { country: xt(n.country, y.value) }) : a("core.form.phone.invalid_any");
597
- }), q = w(() => r.value !== "" && !P.value ? jt(r.value) : void 0), R = w(() => Xt(r.value)), t = E(!1);
598
- let l = null;
599
- async function m() {
303
+ return n.country ? l(`core.form.phone.${n.kind}`, { country: be(n.country, x.value) }) : l("core.form.phone.invalid_any");
304
+ }), G = g(() => r.value !== "" && !R.value ? Ge(r.value) : void 0), E = g(() => je(r.value)), e = B(!1);
305
+ let s = null;
306
+ async function c() {
600
307
  try {
601
- await navigator.clipboard.writeText(R.value);
308
+ await navigator.clipboard.writeText(E.value);
602
309
  } catch {
603
310
  return;
604
311
  }
605
- t.value = !0, l && clearTimeout(l), l = setTimeout(() => t.value = !1, 1800);
312
+ e.value = !0, s && clearTimeout(s), s = setTimeout(() => e.value = !1, 1800);
606
313
  }
607
- return ft(() => l && clearTimeout(l)), i({ focus: () => M.value?.focus() }), (n, u) => (g(), Tt(Pt, Nt({ ...s(Rt)(o), error: o.error ?? Y.value }, {
608
- value: r.value === "" ? null : R.value,
314
+ return $e(() => s && clearTimeout(s)), a({ focus: () => k.value?.focus() }), (n, u) => (w(), De(Re, Me({ ...i(Ee)(o), error: o.error ?? H.value }, {
315
+ value: r.value === "" ? null : E.value,
609
316
  "value-style": "numeric"
610
- }), At({
611
- default: st(({ id: C, describedby: h, invalid: B }) => [
612
- v("div", ce, [
613
- v("div", {
614
- class: $(["flex items-stretch gap-1.5", S.value])
317
+ }), Te({
318
+ default: se(({ id: b, describedby: m, invalid: I }) => [
319
+ f("div", it, [
320
+ f("div", {
321
+ class: P(["flex items-stretch gap-1.5", V.value])
615
322
  }, [
616
- N(me, {
617
- id: C,
618
- "model-value": b.value,
619
- common: k.value,
323
+ M(lt, {
324
+ id: b,
325
+ "model-value": v.value,
326
+ common: C.value,
620
327
  disabled: o.disabled,
621
- surface: `${s(c)} px-2.5`,
622
- onPicked: z
328
+ surface: `${i(h)} px-2.5`,
329
+ onPicked: j
623
330
  }, null, 8, ["id", "model-value", "common", "disabled", "surface"]),
624
- v("div", {
625
- class: $(["min-w-0 flex-1", s(c)])
331
+ f("div", {
332
+ class: P(["min-w-0 flex-1", i(h)])
626
333
  }, [
627
- v("input", {
628
- id: C,
334
+ f("input", {
335
+ id: b,
629
336
  ref_key: "input",
630
- ref: M,
631
- value: p.value,
337
+ ref: k,
338
+ value: d.value,
632
339
  type: "tel",
633
340
  inputmode: "tel",
634
341
  autocomplete: "tel-national",
@@ -637,80 +344,80 @@ const ee = ["id", "disabled", "aria-label", "aria-expanded"], oe = { class: "tab
637
344
  disabled: o.disabled,
638
345
  required: o.required,
639
346
  "aria-required": o.required || void 0,
640
- "aria-invalid": B || void 0,
641
- "aria-describedby": h,
347
+ "aria-invalid": I || void 0,
348
+ "aria-describedby": m,
642
349
  "data-test": "phone-input",
643
350
  class: "block w-full min-w-0 border-0 bg-transparent px-0 py-1 text-body tabular-nums text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
644
- onInput: Z,
351
+ onInput: U,
645
352
  onPaste: Q,
646
- onBlur: u[0] || (u[0] = (X) => I.value = !0)
647
- }, null, 40, de)
353
+ onBlur: u[0] || (u[0] = (X) => N.value = !0)
354
+ }, null, 40, ut)
648
355
  ], 2)
649
356
  ], 2),
650
- q.value && !(o.error ?? Y.value) ? (g(), _("p", fe, [
651
- N(s(V), {
357
+ G.value && !(o.error ?? H.value) ? (w(), $("p", ct, [
358
+ M(i(q), {
652
359
  name: "checkCustom",
653
360
  size: 14,
654
361
  class: "shrink-0"
655
362
  }),
656
- Dt(" " + A(s(a)(`core.form.phone.kind_${q.value}`)), 1)
657
- ])) : K("", !0)
363
+ Se(" " + T(i(l)(`core.form.phone.kind_${G.value}`)), 1)
364
+ ])) : J("", !0)
658
365
  ])
659
366
  ]),
660
367
  _: 2
661
368
  }, [
662
369
  r.value !== "" ? {
663
370
  name: "readonly",
664
- fn: st(() => [
665
- v("div", {
666
- class: $(["flex w-full min-w-0 flex-wrap items-center gap-x-2 gap-y-1.5", f ? "justify-end" : ""]),
371
+ fn: se(() => [
372
+ f("div", {
373
+ class: P(["flex w-full min-w-0 flex-wrap items-center gap-x-2 gap-y-1.5", _ ? "justify-end" : ""]),
667
374
  "data-test": "phone-read"
668
375
  }, [
669
- v("span", {
670
- class: $(["flex-auto whitespace-nowrap text-body tabular-nums text-content-strong", f ? "text-right" : ""])
671
- }, A(R.value), 3),
672
- v("a", {
376
+ f("span", {
377
+ class: P(["flex-auto whitespace-nowrap text-body tabular-nums text-content-strong", _ ? "text-right" : ""])
378
+ }, T(E.value), 3),
379
+ f("a", {
673
380
  href: `tel:${r.value}`,
674
- "aria-label": s(a)("core.form.phone.call"),
675
- title: s(a)("core.form.phone.call"),
381
+ "aria-label": i(l)("core.form.phone.call"),
382
+ title: i(l)("core.form.phone.call"),
676
383
  "data-test": "phone-call",
677
384
  class: "flex size-9 shrink-0 items-center justify-center rounded-full bg-tint-soft text-content-link transition-colors duration-motion-fast hover:bg-fill focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus"
678
385
  }, [
679
- N(s(V), {
386
+ M(i(q), {
680
387
  name: "phone",
681
388
  size: 18
682
389
  })
683
- ], 8, ve),
684
- v("a", {
390
+ ], 8, dt),
391
+ f("a", {
685
392
  href: `sms:${r.value}`,
686
- "aria-label": s(a)("core.form.phone.message"),
687
- title: s(a)("core.form.phone.message"),
393
+ "aria-label": i(l)("core.form.phone.message"),
394
+ title: i(l)("core.form.phone.message"),
688
395
  "data-test": "phone-message",
689
396
  class: "flex size-9 shrink-0 items-center justify-center rounded-full bg-tint-soft text-content-link transition-colors duration-motion-fast hover:bg-fill focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus"
690
397
  }, [
691
- N(s(V), {
398
+ M(i(q), {
692
399
  name: "message",
693
400
  size: 18
694
401
  })
695
- ], 8, he),
696
- It(n.$slots, "actions", {
402
+ ], 8, ft),
403
+ Ne(n.$slots, "actions", {
697
404
  number: r.value,
698
- formatted: R.value
405
+ formatted: E.value
699
406
  }),
700
- v("button", {
407
+ f("button", {
701
408
  type: "button",
702
- "aria-label": s(a)("core.form.phone.copy"),
703
- title: s(a)("core.form.phone.copy"),
409
+ "aria-label": i(l)("core.form.phone.copy"),
410
+ title: i(l)("core.form.phone.copy"),
704
411
  "data-test": "phone-copy",
705
412
  class: "flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full bg-fill text-content-strong transition-colors duration-motion-fast hover:bg-fill-strong focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
706
- onClick: m
413
+ onClick: c
707
414
  }, [
708
- N(s(V), {
709
- name: t.value ? "checkCustom" : "copy",
415
+ M(i(q), {
416
+ name: e.value ? "checkCustom" : "copy",
710
417
  size: 18
711
418
  }, null, 8, ["name"])
712
- ], 8, ye),
713
- v("span", be, A(t.value ? s(a)("core.form.phone.copied") : ""), 1)
419
+ ], 8, mt),
420
+ f("span", pt, T(e.value ? i(l)("core.form.phone.copied") : ""), 1)
714
421
  ], 2)
715
422
  ]),
716
423
  key: "0"
@@ -719,14 +426,14 @@ const ee = ["id", "disabled", "aria-label", "aria-expanded"], oe = { class: "tab
719
426
  }
720
427
  });
721
428
  export {
722
- pt as COMMON_COUNTRIES,
723
- Ne as PhoneField,
724
- xt as countryName,
725
- ct as dialCode,
726
- Xt as formatInternational,
727
- Te as isValidPhone,
728
- Qt as phoneCountry,
729
- pe as phoneDefaultsKey,
730
- jt as phoneKind,
731
- gt as phoneProblem
429
+ ce as COMMON_COUNTRIES,
430
+ $t as PhoneField,
431
+ be as countryName,
432
+ de as dialCode,
433
+ je as formatInternational,
434
+ Ct as isValidPhone,
435
+ Xe as phoneCountry,
436
+ st as phoneDefaultsKey,
437
+ Ge as phoneKind,
438
+ ye as phoneProblem
732
439
  };