maz-ui 3.37.1 → 3.37.2
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.
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/chunks/{MazBtn-Da6kUAyv.mjs → MazBtn-D-Axz-X0.mjs} +2 -2
- package/components/chunks/{MazCheckbox-CPiIoQZk.mjs → MazCheckbox-CXVe5vda.mjs} +1 -1
- package/components/chunks/{MazPhoneNumberInput-CLBAzGI-.mjs → MazPhoneNumberInput-CsX6Kqob.mjs} +321 -324
- package/components/chunks/{MazSpinner-B0I3Jv_p.mjs → MazSpinner-BAhgxOgg.mjs} +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
package/components/chunks/{MazPhoneNumberInput-CLBAzGI-.mjs → MazPhoneNumberInput-CsX6Kqob.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../assets/MazPhoneNumberInput.css';
|
|
2
|
-
import { getCurrentInstance as to, computed as v, defineComponent as re, defineAsyncComponent as U, ref as
|
|
3
|
-
import { getCountries as Te, getCountryCallingCode as de, getExampleNumber as fo, isSupportedCountry as
|
|
4
|
-
function
|
|
2
|
+
import { getCurrentInstance as to, computed as v, defineComponent as re, defineAsyncComponent as U, ref as I, onMounted as we, useSlots as lo, openBlock as C, createElementBlock as P, normalizeClass as E, normalizeStyle as _, createElementVNode as R, createCommentVNode as V, renderSlot as H, createBlock as K, unref as b, resolveDynamicComponent as Fe, withDirectives as Ne, mergeProps as pe, toHandlers as no, vModelDynamic as ao, createTextVNode as Ce, toDisplayString as G, withModifiers as x, withCtx as ae, createVNode as q, nextTick as ee, useCssVars as ro, onBeforeMount as so, Transition as uo, Fragment as Ae, renderList as io, reactive as co, mergeModels as Le, useModel as po, watch as he } from "vue";
|
|
3
|
+
import { getCountries as Te, getCountryCallingCode as de, getExampleNumber as fo, isSupportedCountry as mo, parsePhoneNumberFromString as yo, AsYouType as vo } from "libphonenumber-js";
|
|
4
|
+
function ho(t, l) {
|
|
5
5
|
let o;
|
|
6
6
|
return function(...c) {
|
|
7
7
|
clearTimeout(o), o = setTimeout(() => {
|
|
@@ -9,19 +9,19 @@ function bo(t, l) {
|
|
|
9
9
|
}, l);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const ke = ({
|
|
13
13
|
componentName: t,
|
|
14
14
|
providedId: l
|
|
15
15
|
}) => {
|
|
16
16
|
const o = to();
|
|
17
17
|
return v(() => l ?? `${t}-${o == null ? void 0 : o.uid}`);
|
|
18
|
-
},
|
|
18
|
+
}, bo = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "m-input-wrapper-left"
|
|
21
|
-
},
|
|
21
|
+
}, go = { class: "m-input-wrapper-input" }, zo = ["id", "type", "name", "inputmode", "placeholder", "aria-label", "disabled", "readonly", "required"], Co = { key: 0 }, Vo = {
|
|
22
22
|
key: 1,
|
|
23
23
|
class: "m-input-wrapper-right"
|
|
24
|
-
},
|
|
24
|
+
}, wo = /* @__PURE__ */ re({
|
|
25
25
|
inheritAttrs: !1,
|
|
26
26
|
__name: "MazInput",
|
|
27
27
|
props: {
|
|
@@ -59,15 +59,15 @@ const we = ({
|
|
|
59
59
|
},
|
|
60
60
|
emits: ["update:model-value", "focus", "blur", "click", "change"],
|
|
61
61
|
setup(t, { emit: l }) {
|
|
62
|
-
const o = U(() => import("./MazBtn-
|
|
62
|
+
const o = U(() => import("./MazBtn-D-Axz-X0.mjs")), c = U(() => import("./MazIcon-Cxrv3_OK.mjs")), m = U(() => import("./eye-slash-tjfxO0LK.mjs")), f = U(() => import("./eye-DqO_Jx56.mjs")), n = U(() => import("./check-7UA4j2f2.mjs")), i = t, k = l, h = I(!1), B = I(!1), M = I(), d = ke({
|
|
63
63
|
componentName: "MazInput",
|
|
64
64
|
providedId: i.id
|
|
65
65
|
});
|
|
66
|
-
|
|
67
|
-
var
|
|
68
|
-
i.autoFocus && ((
|
|
66
|
+
we(() => {
|
|
67
|
+
var r;
|
|
68
|
+
i.autoFocus && ((r = M.value) == null || r.focus());
|
|
69
69
|
});
|
|
70
|
-
const g = v(() => i.type === "password"), y = v(() => h.value ? "text" : i.type),
|
|
70
|
+
const g = v(() => i.type === "password"), y = v(() => h.value ? "text" : i.type), F = v(() => {
|
|
71
71
|
if (!i.noBorder) {
|
|
72
72
|
if (i.error)
|
|
73
73
|
return "maz-border-danger";
|
|
@@ -95,144 +95,144 @@ const we = ({
|
|
|
95
95
|
}
|
|
96
96
|
return "--default-border";
|
|
97
97
|
}
|
|
98
|
-
}), z = lo(),
|
|
99
|
-
const { required:
|
|
98
|
+
}), z = lo(), $ = v(() => {
|
|
99
|
+
const { required: r, placeholder: L } = i;
|
|
100
100
|
if (L)
|
|
101
|
-
return
|
|
102
|
-
}),
|
|
103
|
-
(
|
|
104
|
-
N.value =
|
|
101
|
+
return r ? `${L} *` : L;
|
|
102
|
+
}), a = v(() => N.value !== void 0 && N.value !== ""), S = ho(
|
|
103
|
+
(r) => {
|
|
104
|
+
N.value = r;
|
|
105
105
|
},
|
|
106
106
|
typeof i.debounce == "number" ? i.debounce : i.debounceDelay ?? 500
|
|
107
107
|
), N = v({
|
|
108
108
|
get: () => i.modelValue,
|
|
109
|
-
set: (
|
|
109
|
+
set: (r) => {
|
|
110
110
|
if (i.debounce)
|
|
111
|
-
return
|
|
112
|
-
k("update:model-value",
|
|
111
|
+
return S(r);
|
|
112
|
+
k("update:model-value", r);
|
|
113
113
|
}
|
|
114
|
-
}), ue = v(() => (!!i.label || !!i.hint) && (B.value || !!
|
|
114
|
+
}), ue = v(() => (!!i.label || !!i.hint) && (B.value || !!a.value || !!i.placeholder || ["date", "month", "week"].includes(i.type))), ie = v(() => !!i.label || !!i.hint);
|
|
115
115
|
function O() {
|
|
116
116
|
return !!z["right-icon"] || g.value || !!z["valid-button"] || i.validButton || !!i.rightIcon;
|
|
117
117
|
}
|
|
118
118
|
function te() {
|
|
119
119
|
return !!z["left-icon"] || !!i.leftIcon;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
k("focus",
|
|
121
|
+
function fe(r) {
|
|
122
|
+
k("focus", r), B.value = !0;
|
|
123
123
|
}
|
|
124
|
-
function
|
|
125
|
-
k("blur",
|
|
124
|
+
function me(r) {
|
|
125
|
+
k("blur", r), B.value = !1;
|
|
126
126
|
}
|
|
127
|
-
function j(
|
|
128
|
-
return k("change",
|
|
127
|
+
function j(r) {
|
|
128
|
+
return k("change", r);
|
|
129
129
|
}
|
|
130
|
-
return (
|
|
130
|
+
return (r, L) => (C(), P(
|
|
131
131
|
"div",
|
|
132
132
|
{
|
|
133
133
|
class: E(["m-input", [
|
|
134
134
|
{
|
|
135
|
-
"--is-focused": B.value ||
|
|
135
|
+
"--is-focused": B.value || r.borderActive,
|
|
136
136
|
"--should-up": ue.value,
|
|
137
137
|
"--has-label": ie.value,
|
|
138
|
-
"--is-disabled":
|
|
139
|
-
"--is-readonly":
|
|
140
|
-
"--has-z-2":
|
|
141
|
-
"--has-state":
|
|
142
|
-
"--block":
|
|
138
|
+
"--is-disabled": r.disabled,
|
|
139
|
+
"--is-readonly": r.readonly,
|
|
140
|
+
"--has-z-2": r.error || r.warning || r.success,
|
|
141
|
+
"--has-state": r.error || r.warning || r.success,
|
|
142
|
+
"--block": r.block
|
|
143
143
|
},
|
|
144
144
|
i.class,
|
|
145
|
-
`--${
|
|
146
|
-
`--${
|
|
145
|
+
`--${r.color}`,
|
|
146
|
+
`--${r.size}`
|
|
147
147
|
]]),
|
|
148
|
-
style: _(
|
|
148
|
+
style: _(r.style)
|
|
149
149
|
},
|
|
150
150
|
[
|
|
151
151
|
R(
|
|
152
152
|
"div",
|
|
153
153
|
{
|
|
154
154
|
class: E(["m-input-wrapper", [
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
r.inputClasses,
|
|
156
|
+
F.value,
|
|
157
|
+
r.roundedSize ? `--rounded-${r.roundedSize}` : { "maz-rounded": !r.noRadius }
|
|
158
158
|
]])
|
|
159
159
|
},
|
|
160
160
|
[
|
|
161
|
-
te() ? (C(),
|
|
161
|
+
te() ? (C(), P("div", bo, [
|
|
162
162
|
V(`
|
|
163
163
|
@slot left-icon - The icon to display on the left of the input
|
|
164
164
|
`),
|
|
165
|
-
|
|
166
|
-
typeof
|
|
165
|
+
r.$slots["left-icon"] || r.leftIcon ? H(r.$slots, "left-icon", { key: 0 }, () => [
|
|
166
|
+
typeof r.leftIcon == "string" ? (C(), K(b(c), {
|
|
167
167
|
key: 0,
|
|
168
|
-
name:
|
|
168
|
+
name: r.leftIcon,
|
|
169
169
|
class: "maz-text-xl maz-text-muted"
|
|
170
|
-
}, null, 8, ["name"])) :
|
|
170
|
+
}, null, 8, ["name"])) : r.leftIcon ? (C(), K(Fe(r.leftIcon), {
|
|
171
171
|
key: 1,
|
|
172
172
|
class: "maz-text-xl maz-text-muted"
|
|
173
173
|
})) : V("v-if", !0)
|
|
174
174
|
], !0) : V("v-if", !0)
|
|
175
175
|
])) : V("v-if", !0),
|
|
176
|
-
R("div",
|
|
176
|
+
R("div", go, [
|
|
177
177
|
Ne(R("input", pe({
|
|
178
178
|
id: b(d),
|
|
179
179
|
ref_key: "input",
|
|
180
180
|
ref: M,
|
|
181
181
|
"onUpdate:modelValue": L[0] || (L[0] = (Y) => N.value = Y),
|
|
182
182
|
type: y.value,
|
|
183
|
-
name:
|
|
184
|
-
},
|
|
185
|
-
inputmode:
|
|
186
|
-
placeholder:
|
|
187
|
-
"aria-label":
|
|
188
|
-
disabled:
|
|
189
|
-
readonly:
|
|
190
|
-
required:
|
|
183
|
+
name: r.name
|
|
184
|
+
}, r.$attrs, {
|
|
185
|
+
inputmode: r.inputmode,
|
|
186
|
+
placeholder: $.value,
|
|
187
|
+
"aria-label": r.label || r.placeholder,
|
|
188
|
+
disabled: r.disabled,
|
|
189
|
+
readonly: r.readonly,
|
|
190
|
+
required: r.required,
|
|
191
191
|
class: "m-input-input"
|
|
192
192
|
}, no({
|
|
193
|
-
blur:
|
|
194
|
-
focus:
|
|
193
|
+
blur: me,
|
|
194
|
+
focus: fe,
|
|
195
195
|
change: j
|
|
196
196
|
}, !0), {
|
|
197
|
-
onClick: L[1] || (L[1] = (Y) =>
|
|
198
|
-
}), null, 16,
|
|
197
|
+
onClick: L[1] || (L[1] = (Y) => r.$emit("click", Y))
|
|
198
|
+
}), null, 16, zo), [
|
|
199
199
|
[ao, N.value]
|
|
200
200
|
]),
|
|
201
|
-
|
|
201
|
+
r.label || r.hint ? (C(), P(
|
|
202
202
|
"span",
|
|
203
203
|
{
|
|
204
204
|
key: 0,
|
|
205
205
|
ref: "label",
|
|
206
206
|
class: E(["m-input-label", [
|
|
207
207
|
{
|
|
208
|
-
"maz-text-danger-600":
|
|
209
|
-
"maz-text-success-600":
|
|
210
|
-
"maz-text-warning-600":
|
|
208
|
+
"maz-text-danger-600": r.error,
|
|
209
|
+
"maz-text-success-600": r.success,
|
|
210
|
+
"maz-text-warning-600": r.warning
|
|
211
211
|
}
|
|
212
212
|
]])
|
|
213
213
|
},
|
|
214
214
|
[
|
|
215
215
|
Ce(
|
|
216
|
-
G(
|
|
216
|
+
G(r.hint || r.label) + " ",
|
|
217
217
|
1
|
|
218
218
|
/* TEXT */
|
|
219
219
|
),
|
|
220
|
-
|
|
220
|
+
r.required ? (C(), P("sup", Co, "*")) : V("v-if", !0)
|
|
221
221
|
],
|
|
222
222
|
2
|
|
223
223
|
/* CLASS */
|
|
224
224
|
)) : V("v-if", !0)
|
|
225
225
|
]),
|
|
226
|
-
O() ? (C(),
|
|
226
|
+
O() ? (C(), P("div", Vo, [
|
|
227
227
|
V(`
|
|
228
228
|
@slot right-icon - The icon to display on the right of the input
|
|
229
229
|
`),
|
|
230
|
-
|
|
231
|
-
typeof
|
|
230
|
+
r.$slots["right-icon"] || r.rightIcon ? H(r.$slots, "right-icon", { key: 0 }, () => [
|
|
231
|
+
typeof r.rightIcon == "string" ? (C(), K(b(c), {
|
|
232
232
|
key: 0,
|
|
233
|
-
name:
|
|
233
|
+
name: r.rightIcon,
|
|
234
234
|
class: "maz-text-xl maz-text-muted"
|
|
235
|
-
}, null, 8, ["name"])) :
|
|
235
|
+
}, null, 8, ["name"])) : r.rightIcon ? (C(), K(Fe(r.rightIcon), {
|
|
236
236
|
key: 1,
|
|
237
237
|
class: "maz-text-xl maz-text-muted"
|
|
238
238
|
})) : V("v-if", !0)
|
|
@@ -245,10 +245,10 @@ const we = ({
|
|
|
245
245
|
onClick: L[2] || (L[2] = x((Y) => h.value = !h.value, ["stop"]))
|
|
246
246
|
}, {
|
|
247
247
|
default: ae(() => [
|
|
248
|
-
h.value ? (C(), K(b(
|
|
248
|
+
h.value ? (C(), K(b(m), {
|
|
249
249
|
key: 0,
|
|
250
250
|
class: "maz-text-xl maz-text-muted"
|
|
251
|
-
})) : (C(), K(b(
|
|
251
|
+
})) : (C(), K(b(f), {
|
|
252
252
|
key: 1,
|
|
253
253
|
class: "maz-text-xl maz-text-muted"
|
|
254
254
|
}))
|
|
@@ -259,12 +259,12 @@ const we = ({
|
|
|
259
259
|
V(`
|
|
260
260
|
@slot valid-button - Replace the valid button by your own
|
|
261
261
|
`),
|
|
262
|
-
|
|
262
|
+
r.$slots["valid-button"] || r.validButton ? H(r.$slots, "valid-button", { key: 2 }, () => [
|
|
263
263
|
q(b(o), {
|
|
264
264
|
color: "transparent",
|
|
265
|
-
disabled:
|
|
265
|
+
disabled: r.disabled,
|
|
266
266
|
tabindex: "-1",
|
|
267
|
-
loading:
|
|
267
|
+
loading: r.validButtonLoading,
|
|
268
268
|
class: "m-input-valid-button",
|
|
269
269
|
size: "mini",
|
|
270
270
|
type: "submit"
|
|
@@ -288,27 +288,27 @@ const we = ({
|
|
|
288
288
|
}
|
|
289
289
|
}), se = (t, l) => {
|
|
290
290
|
const o = t.__vccOpts || t;
|
|
291
|
-
for (const [c,
|
|
292
|
-
o[c] =
|
|
291
|
+
for (const [c, m] of l)
|
|
292
|
+
o[c] = m;
|
|
293
293
|
return o;
|
|
294
|
-
},
|
|
294
|
+
}, Ve = /* @__PURE__ */ se(wo, [["__scopeId", "data-v-78090be8"]]);
|
|
295
295
|
let be = null;
|
|
296
|
-
function
|
|
296
|
+
function ko(t, l) {
|
|
297
297
|
be && clearTimeout(be), be = setTimeout(t, l);
|
|
298
298
|
}
|
|
299
299
|
const ce = "__maz-click-outside__", De = () => document.ontouchstart === null ? "touchstart" : "click";
|
|
300
300
|
async function Ue(t, l) {
|
|
301
301
|
try {
|
|
302
302
|
Re(t);
|
|
303
|
-
const o = l.instance, c = l.value,
|
|
304
|
-
if (!
|
|
303
|
+
const o = l.instance, c = l.value, m = typeof c == "function";
|
|
304
|
+
if (!m)
|
|
305
305
|
throw new Error("[maz-ui](vClickOutside) the callback should be a function");
|
|
306
306
|
await ee(), t[ce] = (n) => {
|
|
307
|
-
if ((!t || n.target && !t.contains(n.target)) && c &&
|
|
307
|
+
if ((!t || n.target && !t.contains(n.target)) && c && m)
|
|
308
308
|
return c.call(o, n);
|
|
309
309
|
};
|
|
310
|
-
const
|
|
311
|
-
document.addEventListener(
|
|
310
|
+
const f = De();
|
|
311
|
+
document.addEventListener(f, t[ce], { passive: !0 });
|
|
312
312
|
} catch (o) {
|
|
313
313
|
console.error("[maz-ui](vClickOutside)", o);
|
|
314
314
|
}
|
|
@@ -321,7 +321,7 @@ function Re(t) {
|
|
|
321
321
|
console.error("[maz-ui](vClickOutside)", l);
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Io(t, l) {
|
|
325
325
|
try {
|
|
326
326
|
if (l.value === l.oldValue)
|
|
327
327
|
return;
|
|
@@ -330,56 +330,56 @@ function So(t, l) {
|
|
|
330
330
|
console.error("[maz-ui](vClickOutside)", o);
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
|
-
const
|
|
333
|
+
const So = {
|
|
334
334
|
mounted: Ue,
|
|
335
|
-
updated:
|
|
335
|
+
updated: Io,
|
|
336
336
|
unmounted: Re
|
|
337
337
|
};
|
|
338
|
-
function
|
|
339
|
-
const o = t.length, c = l.length,
|
|
340
|
-
for (let
|
|
341
|
-
f
|
|
342
|
-
for (let
|
|
343
|
-
|
|
344
|
-
for (let
|
|
338
|
+
function Bo(t, l) {
|
|
339
|
+
const o = t.length, c = l.length, m = [];
|
|
340
|
+
for (let f = 0; f <= o; f++)
|
|
341
|
+
m[f] = [f];
|
|
342
|
+
for (let f = 0; f <= c; f++)
|
|
343
|
+
m[0][f] = f;
|
|
344
|
+
for (let f = 1; f <= o; f++)
|
|
345
345
|
for (let n = 1; n <= c; n++) {
|
|
346
|
-
const i = t[
|
|
347
|
-
f
|
|
348
|
-
f
|
|
349
|
-
f
|
|
350
|
-
f
|
|
346
|
+
const i = t[f - 1] === l[n - 1] ? 0 : 1;
|
|
347
|
+
m[f][n] = Math.min(
|
|
348
|
+
m[f - 1][n] + 1,
|
|
349
|
+
m[f][n - 1] + 1,
|
|
350
|
+
m[f - 1][n - 1] + i
|
|
351
351
|
);
|
|
352
352
|
}
|
|
353
|
-
return
|
|
353
|
+
return m[o][c];
|
|
354
354
|
}
|
|
355
355
|
function Me(t) {
|
|
356
356
|
return t.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").toLowerCase();
|
|
357
357
|
}
|
|
358
358
|
function Oe(t, l) {
|
|
359
|
-
const o =
|
|
359
|
+
const o = Bo(t, l), c = Math.max(t.length, l.length);
|
|
360
360
|
return 1 - o / c;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function $o(t, l, o = 0.75) {
|
|
363
363
|
return Oe(t, l) >= o;
|
|
364
364
|
}
|
|
365
365
|
function ge(t, l, o = 0.75) {
|
|
366
366
|
const c = v(
|
|
367
367
|
() => Me(typeof t == "string" ? t : t.value)
|
|
368
|
-
),
|
|
368
|
+
), m = v(
|
|
369
369
|
() => Me(typeof l == "string" ? l : l.value)
|
|
370
|
-
),
|
|
370
|
+
), f = v(() => typeof o == "number" ? o : o.value), n = v(() => Oe(c.value, m.value));
|
|
371
371
|
return {
|
|
372
372
|
isMatching: v(
|
|
373
|
-
() =>
|
|
373
|
+
() => $o(c.value, m.value, f.value)
|
|
374
374
|
),
|
|
375
375
|
score: n
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
|
-
const
|
|
378
|
+
const Po = ["aria-label"], Fo = { class: "m-select-list__no-results" }, Ao = {
|
|
379
379
|
key: 2,
|
|
380
380
|
class: "m-select-list__scroll-wrapper",
|
|
381
381
|
tabindex: "-1"
|
|
382
|
-
},
|
|
382
|
+
}, Lo = { class: "m-select-list-optgroup" }, Mo = ["onClick"], Eo = /* @__PURE__ */ re({
|
|
383
383
|
inheritAttrs: !1,
|
|
384
384
|
__name: "MazSelect",
|
|
385
385
|
props: {
|
|
@@ -412,7 +412,7 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
412
412
|
"619dedd3": M.value,
|
|
413
413
|
"72c218fb": d.value
|
|
414
414
|
}));
|
|
415
|
-
const o = U(() => import("./MazCheckbox-
|
|
415
|
+
const o = U(() => import("./MazCheckbox-CXVe5vda.mjs")), c = U(() => import("./magnifying-glass-DZGg7953.mjs")), m = U(() => import("./chevron-down-CzMH-gFW.mjs")), f = U(() => import("./no-symbol-QAqP9IlR.mjs")), n = t, i = l, k = I(!1), h = I(), B = v(
|
|
416
416
|
() => ["black", "transparent", "white"].includes(n.color)
|
|
417
417
|
), M = v(
|
|
418
418
|
() => B.value ? "var(--maz-color-black)" : `var(--maz-color-${n.color}-800)`
|
|
@@ -420,7 +420,7 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
420
420
|
() => B.value ? "var(--maz-color-muted)" : `var(--maz-color-${n.color}-100)`
|
|
421
421
|
), g = v(
|
|
422
422
|
() => B.value ? "var(--maz-color-muted)" : `var(--maz-color-${n.color}-200)`
|
|
423
|
-
), y = v(() => k.value || n.open),
|
|
423
|
+
), y = v(() => k.value || n.open), F = ke({
|
|
424
424
|
componentName: "MazSelect",
|
|
425
425
|
providedId: n.id
|
|
426
426
|
});
|
|
@@ -431,7 +431,7 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
431
431
|
[n.optionInputValueKey]: e
|
|
432
432
|
};
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function $(e) {
|
|
435
435
|
return {
|
|
436
436
|
...e,
|
|
437
437
|
[n.optionValueKey]: e[n.optionValueKey],
|
|
@@ -439,7 +439,7 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
439
439
|
[n.optionInputValueKey]: e[n.optionInputValueKey]
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
|
-
const
|
|
442
|
+
const a = v(() => {
|
|
443
443
|
var s;
|
|
444
444
|
const e = [];
|
|
445
445
|
if (!((s = n.options) != null && s.length))
|
|
@@ -448,57 +448,57 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
448
448
|
typeof u == "string" || typeof u == "number" || typeof u == "boolean" ? e.push(z(u)) : "options" in u && Array.isArray(u.options) ? e.push(
|
|
449
449
|
{ label: u.label, isOptGroup: !0 },
|
|
450
450
|
...u.options.map(
|
|
451
|
-
(p) => typeof p == "string" || typeof p == "number" || typeof p == "boolean" ? z(p) :
|
|
451
|
+
(p) => typeof p == "string" || typeof p == "number" || typeof p == "boolean" ? z(p) : $(p)
|
|
452
452
|
)
|
|
453
|
-
) : e.push(
|
|
453
|
+
) : e.push($(u));
|
|
454
454
|
return e;
|
|
455
|
-
}),
|
|
455
|
+
}), S = v(
|
|
456
456
|
() => {
|
|
457
457
|
var e;
|
|
458
|
-
return ((e =
|
|
458
|
+
return ((e = a.value) == null ? void 0 : e.filter((s) => n.multiple ? Array.isArray(n.modelValue) ? n.modelValue.includes(s[n.optionValueKey]) && !O(s[n.optionValueKey]) : !1 : n.modelValue === s[n.optionValueKey] && !O(s[n.optionValueKey]))) ?? [];
|
|
459
459
|
}
|
|
460
460
|
);
|
|
461
461
|
so(() => {
|
|
462
462
|
var e;
|
|
463
463
|
(e = n.options) != null && e.length || console.warn("[maz-ui](MazSelect) you must provide options"), ve();
|
|
464
464
|
});
|
|
465
|
-
const Z =
|
|
465
|
+
const Z = I(), N = I(), ue = I(), ie = I(), O = (e) => e == null;
|
|
466
466
|
function te(e) {
|
|
467
467
|
var u;
|
|
468
|
-
return (((u =
|
|
468
|
+
return (((u = S.value) == null ? void 0 : u.some(
|
|
469
469
|
(p) => p[n.optionValueKey] === e[n.optionValueKey]
|
|
470
470
|
)) ?? !1) && !O(e[n.optionValueKey]);
|
|
471
471
|
}
|
|
472
|
-
const
|
|
472
|
+
const fe = v(() => {
|
|
473
473
|
var s;
|
|
474
474
|
if (n.multiple && n.modelValue && Array.isArray(n.modelValue))
|
|
475
475
|
return n.modelValue.map(
|
|
476
476
|
(u) => {
|
|
477
477
|
var p, w;
|
|
478
|
-
return (w = (p =
|
|
478
|
+
return (w = (p = a.value) == null ? void 0 : p.find((A) => A[n.optionValueKey] === u)) == null ? void 0 : w[n.optionInputValueKey];
|
|
479
479
|
}
|
|
480
480
|
).join(", ");
|
|
481
|
-
const e = (s =
|
|
481
|
+
const e = (s = a.value) == null ? void 0 : s.find(
|
|
482
482
|
(u) => u[n.optionValueKey] === n.modelValue
|
|
483
483
|
);
|
|
484
484
|
return O(n.modelValue) || e == null ? void 0 : e[n.optionInputValueKey];
|
|
485
|
-
}),
|
|
485
|
+
}), me = v(
|
|
486
486
|
() => n.listPosition.includes("bottom") ? "maz-slide" : "maz-slideinvert"
|
|
487
|
-
), j =
|
|
487
|
+
), j = I(""), r = I("");
|
|
488
488
|
function L(e) {
|
|
489
489
|
return e.normalize("NFD").replaceAll(/[\u0300-\u036F]/g, "").replaceAll(/[^\dA-Za-z\u0400-\u04FF]/g, "");
|
|
490
490
|
}
|
|
491
491
|
const Y = (e, s) => s && e && L(e.toString().toLocaleLowerCase().trim()).includes(
|
|
492
492
|
L(s.toLocaleLowerCase().trim())
|
|
493
493
|
);
|
|
494
|
-
function
|
|
494
|
+
function Se(e) {
|
|
495
495
|
var s;
|
|
496
|
-
return e ? (s =
|
|
496
|
+
return e ? (s = a.value) == null ? void 0 : s.filter((u) => {
|
|
497
497
|
const p = u[n.optionLabelKey], w = u[n.optionValueKey], A = u[n.optionInputValueKey];
|
|
498
498
|
return Y(p, e) || Y(A, e) || Y(w, e) || typeof p == "string" && ge(p, e).isMatching.value || typeof A == "string" && ge(A, e).isMatching.value || typeof w == "string" && ge(w, e).isMatching.value;
|
|
499
|
-
}) :
|
|
499
|
+
}) : a.value;
|
|
500
500
|
}
|
|
501
|
-
const T = v(() =>
|
|
501
|
+
const T = v(() => Se(j.value));
|
|
502
502
|
async function le(e) {
|
|
503
503
|
var s;
|
|
504
504
|
if (y.value) {
|
|
@@ -510,12 +510,12 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
510
510
|
async function ne(e) {
|
|
511
511
|
n.disabled || y.value || (e == null || e.preventDefault(), k.value = !0, await ye(), i("focus", e), i("open", k.value));
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function Be() {
|
|
514
514
|
var e, s;
|
|
515
515
|
(s = ((e = N.value) == null ? void 0 : e.$el).querySelector("input")) == null || s.focus();
|
|
516
516
|
}
|
|
517
517
|
function Ze(e) {
|
|
518
|
-
k.value ? le(e) :
|
|
518
|
+
k.value ? le(e) : Be();
|
|
519
519
|
}
|
|
520
520
|
function Xe(e) {
|
|
521
521
|
var s, u;
|
|
@@ -523,18 +523,18 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
523
523
|
}
|
|
524
524
|
function xe(e) {
|
|
525
525
|
var u;
|
|
526
|
-
e === "Backspace" &&
|
|
527
|
-
const s =
|
|
526
|
+
e === "Backspace" && r.value.length > 0 ? r.value = r.value.slice(0, -1) : r.value += e;
|
|
527
|
+
const s = Se(r.value);
|
|
528
528
|
s != null && s.length && (h.value = (u = T.value) == null ? void 0 : u.findIndex(
|
|
529
529
|
(p) => p[n.optionValueKey] === s[0][n.optionValueKey]
|
|
530
|
-
), typeof h.value == "number" && h.value >= 0 && ye(h.value)),
|
|
531
|
-
|
|
530
|
+
), typeof h.value == "number" && h.value >= 0 && ye(h.value)), ko(() => {
|
|
531
|
+
r.value = "";
|
|
532
532
|
}, 1e3);
|
|
533
533
|
}
|
|
534
534
|
const _e = (e) => {
|
|
535
535
|
const s = e.key;
|
|
536
|
-
/^[\dA-Za-z\u0400-\u04FF]$/.test(s) ? (e.preventDefault(), ne(e), n.search ? Xe(s) : xe(s)) :
|
|
537
|
-
},
|
|
536
|
+
/^[\dA-Za-z\u0400-\u04FF]$/.test(s) ? (e.preventDefault(), ne(e), n.search ? Xe(s) : xe(s)) : $e(e);
|
|
537
|
+
}, $e = (e) => {
|
|
538
538
|
const s = e.code, u = ["ArrowUp", "ArrowDown"].includes(s), p = ["Enter", "Space"].includes(s), w = s === "Escape" && y.value;
|
|
539
539
|
u ? eo(e, h.value) : p ? oo(e, h.value) : w && le();
|
|
540
540
|
}, eo = (e, s) => {
|
|
@@ -549,7 +549,7 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
549
549
|
if (e.preventDefault(), !y.value)
|
|
550
550
|
return ne(e);
|
|
551
551
|
const u = s ? ((p = T.value) == null ? void 0 : p[s]) ?? ((w = T.value) == null ? void 0 : w[0]) : (A = T.value) == null ? void 0 : A[0];
|
|
552
|
-
O(u) ||
|
|
552
|
+
O(u) || Pe(u);
|
|
553
553
|
};
|
|
554
554
|
async function ye(e) {
|
|
555
555
|
var u, p;
|
|
@@ -565,24 +565,24 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
565
565
|
var u;
|
|
566
566
|
const s = (u = T.value) == null ? void 0 : u.findIndex((p) => {
|
|
567
567
|
var w, A;
|
|
568
|
-
return n.multiple && Array.isArray(n.modelValue) ? e ? e[n.optionValueKey] === p[n.optionValueKey] : [...n.modelValue].reverse()[0] === p[n.optionValueKey] : ((A = (w =
|
|
568
|
+
return n.multiple && Array.isArray(n.modelValue) ? e ? e[n.optionValueKey] === p[n.optionValueKey] : [...n.modelValue].reverse()[0] === p[n.optionValueKey] : ((A = (w = S.value) == null ? void 0 : w[0]) == null ? void 0 : A[n.optionValueKey]) === p[n.optionValueKey];
|
|
569
569
|
});
|
|
570
570
|
h.value = s && s >= 0 ? s : 0;
|
|
571
571
|
}
|
|
572
|
-
const
|
|
572
|
+
const Pe = (e, s = !0) => {
|
|
573
573
|
var A;
|
|
574
574
|
s && !n.multiple && ee(() => le()), j.value = "";
|
|
575
|
-
const u = (A =
|
|
575
|
+
const u = (A = S.value) == null ? void 0 : A.some(
|
|
576
576
|
(X) => X[n.optionValueKey] === e[n.optionValueKey]
|
|
577
577
|
);
|
|
578
|
-
let p =
|
|
578
|
+
let p = S.value;
|
|
579
579
|
u && n.multiple ? p = p == null ? void 0 : p.filter(
|
|
580
580
|
(X) => X[n.optionValueKey] !== e[n.optionValueKey]
|
|
581
581
|
) : n.multiple ? p.push(e) : p = [e];
|
|
582
582
|
const w = p.map((X) => X[n.optionValueKey]);
|
|
583
|
-
i("update:model-value", n.multiple ? w : w[0]), i("selected-option", e), ve(e),
|
|
583
|
+
i("update:model-value", n.multiple ? w : w[0]), i("selected-option", e), ve(e), Be();
|
|
584
584
|
};
|
|
585
|
-
return (e, s) => Ne((C(),
|
|
585
|
+
return (e, s) => Ne((C(), P(
|
|
586
586
|
"div",
|
|
587
587
|
{
|
|
588
588
|
ref_key: "mazSelectElement",
|
|
@@ -595,8 +595,8 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
595
595
|
style: _(e.style)
|
|
596
596
|
},
|
|
597
597
|
[
|
|
598
|
-
q(
|
|
599
|
-
id: b(
|
|
598
|
+
q(Ve, pe({
|
|
599
|
+
id: b(F),
|
|
600
600
|
ref_key: "mazInputComponent",
|
|
601
601
|
ref: N,
|
|
602
602
|
class: "m-select-input"
|
|
@@ -604,7 +604,7 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
604
604
|
required: e.required,
|
|
605
605
|
"border-active": k.value,
|
|
606
606
|
color: e.color,
|
|
607
|
-
"model-value":
|
|
607
|
+
"model-value": fe.value,
|
|
608
608
|
autocomplete: "off",
|
|
609
609
|
size: e.size,
|
|
610
610
|
block: "",
|
|
@@ -623,15 +623,15 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
623
623
|
"aria-label": `${y.value ? "collapse" : "expand"} list of options`,
|
|
624
624
|
onClick: x(Ze, ["stop"])
|
|
625
625
|
}, [
|
|
626
|
-
q(b(
|
|
627
|
-
], 8,
|
|
626
|
+
q(b(m), { class: "m-select-chevron maz-text-xl" })
|
|
627
|
+
], 8, Po)
|
|
628
628
|
]),
|
|
629
629
|
_: 1
|
|
630
630
|
/* STABLE */
|
|
631
631
|
}, 16, ["id", "required", "border-active", "color", "model-value", "size", "disabled"]),
|
|
632
|
-
q(uo, { name:
|
|
632
|
+
q(uo, { name: me.value }, {
|
|
633
633
|
default: ae(() => [
|
|
634
|
-
y.value ? (C(),
|
|
634
|
+
y.value ? (C(), P(
|
|
635
635
|
"div",
|
|
636
636
|
{
|
|
637
637
|
key: 0,
|
|
@@ -649,7 +649,7 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
649
649
|
})
|
|
650
650
|
},
|
|
651
651
|
[
|
|
652
|
-
e.search ? (C(), K(
|
|
652
|
+
e.search ? (C(), K(Ve, {
|
|
653
653
|
key: 0,
|
|
654
654
|
ref_key: "searchInputComponent",
|
|
655
655
|
ref: ue,
|
|
@@ -666,21 +666,21 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
666
666
|
tabindex: "-1",
|
|
667
667
|
class: "m-select-list__search-input maz-flex-none",
|
|
668
668
|
"left-icon": b(c),
|
|
669
|
-
onKeydown:
|
|
669
|
+
onKeydown: $e
|
|
670
670
|
}, null, 8, ["modelValue", "color", "placeholder", "left-icon"])) : V("v-if", !0),
|
|
671
671
|
V(`
|
|
672
672
|
@slot No results slot - Displayed when no results corresponding with search query
|
|
673
673
|
`),
|
|
674
674
|
!T.value || T.value.length <= 0 ? H(e.$slots, "no-results", { key: 1 }, () => [
|
|
675
|
-
R("span",
|
|
676
|
-
q(b(
|
|
675
|
+
R("span", Fo, [
|
|
676
|
+
q(b(f), { class: "maz-h-6 maz-w-6 maz-text-normal" })
|
|
677
677
|
])
|
|
678
|
-
], !0) : (C(),
|
|
679
|
-
(C(!0),
|
|
680
|
-
|
|
678
|
+
], !0) : (C(), P("div", Ao, [
|
|
679
|
+
(C(!0), P(
|
|
680
|
+
Ae,
|
|
681
681
|
null,
|
|
682
|
-
io(T.value, (u, p) => (C(),
|
|
683
|
-
|
|
682
|
+
io(T.value, (u, p) => (C(), P(
|
|
683
|
+
Ae,
|
|
684
684
|
{ key: p },
|
|
685
685
|
[
|
|
686
686
|
V(`
|
|
@@ -693,12 +693,12 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
693
693
|
}, () => [
|
|
694
694
|
R(
|
|
695
695
|
"span",
|
|
696
|
-
|
|
696
|
+
Lo,
|
|
697
697
|
G(u.label),
|
|
698
698
|
1
|
|
699
699
|
/* TEXT */
|
|
700
700
|
)
|
|
701
|
-
], !0) : (C(),
|
|
701
|
+
], !0) : (C(), P("button", {
|
|
702
702
|
key: 1,
|
|
703
703
|
tabindex: "-1",
|
|
704
704
|
type: "button",
|
|
@@ -710,7 +710,7 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
710
710
|
}
|
|
711
711
|
]]),
|
|
712
712
|
style: _(e.itemHeight ? { height: `${e.itemHeight}px` } : void 0),
|
|
713
|
-
onClick: x((w) =>
|
|
713
|
+
onClick: x((w) => Pe(u), ["prevent", "stop"])
|
|
714
714
|
}, [
|
|
715
715
|
e.multiple ? (C(), K(b(o), {
|
|
716
716
|
key: 0,
|
|
@@ -736,7 +736,7 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
736
736
|
/* TEXT */
|
|
737
737
|
)
|
|
738
738
|
], !0)
|
|
739
|
-
], 14,
|
|
739
|
+
], 14, Mo))
|
|
740
740
|
],
|
|
741
741
|
64
|
|
742
742
|
/* STABLE_FRAGMENT */
|
|
@@ -757,10 +757,10 @@ const Fo = ["aria-label"], Ao = { class: "m-select-list__no-results" }, Lo = {
|
|
|
757
757
|
6
|
|
758
758
|
/* CLASS, STYLE */
|
|
759
759
|
)), [
|
|
760
|
-
[b(
|
|
760
|
+
[b(So), le]
|
|
761
761
|
]);
|
|
762
762
|
}
|
|
763
|
-
}),
|
|
763
|
+
}), Ko = /* @__PURE__ */ se(Eo, [["__scopeId", "data-v-7825a2da"]]);
|
|
764
764
|
function Ye(t) {
|
|
765
765
|
return !!t;
|
|
766
766
|
}
|
|
@@ -770,17 +770,17 @@ function Ee(t) {
|
|
|
770
770
|
return o ? o % 32 + 127461 : void 0;
|
|
771
771
|
}).filter(Ye).map((l) => String.fromCodePoint(l)).join("");
|
|
772
772
|
}
|
|
773
|
-
const J =
|
|
774
|
-
async function
|
|
773
|
+
const J = I();
|
|
774
|
+
async function No() {
|
|
775
775
|
if (J.value)
|
|
776
776
|
return J.value;
|
|
777
777
|
const { default: t } = await import("./examples.mobile.json-zD8w3Qhl.mjs");
|
|
778
778
|
return J.value = t, J.value;
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function To(t, l) {
|
|
781
781
|
return de(t) === de(l);
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function Do(t) {
|
|
784
784
|
var l;
|
|
785
785
|
try {
|
|
786
786
|
return J.value && t ? (l = fo(t, J.value)) == null ? void 0 : l.formatNational() : void 0;
|
|
@@ -788,15 +788,15 @@ function Uo(t) {
|
|
|
788
788
|
console.error(`[maz-ui](MazPhoneNumberInput) ${o}`);
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function Uo(t) {
|
|
792
792
|
try {
|
|
793
|
-
const l =
|
|
793
|
+
const l = mo(t);
|
|
794
794
|
return l || (console.error(`[maz-ui](MazPhoneNumberInput) The code country "${t}" is not available`), !1);
|
|
795
795
|
} catch (l) {
|
|
796
796
|
return console.error(`[maz-ui](MazPhoneNumberInput) ${l}`), !1;
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function Ro({
|
|
800
800
|
phoneNumber: t,
|
|
801
801
|
countryCode: l
|
|
802
802
|
}) {
|
|
@@ -806,7 +806,7 @@ function Oo({
|
|
|
806
806
|
isValid: !1,
|
|
807
807
|
countryCode: l
|
|
808
808
|
};
|
|
809
|
-
const o =
|
|
809
|
+
const o = yo(t, l);
|
|
810
810
|
return {
|
|
811
811
|
countryCode: (o == null ? void 0 : o.country) ?? l,
|
|
812
812
|
isValid: (o == null ? void 0 : o.isValid()) ?? !1,
|
|
@@ -825,9 +825,9 @@ function Oo({
|
|
|
825
825
|
throw new Error(`[MazPhoneNumberInput](getResultsFromPhoneNumber) ${o}`);
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function Oo(t, l) {
|
|
829
829
|
try {
|
|
830
|
-
return l ? new
|
|
830
|
+
return l ? new vo(t).input(l) : "";
|
|
831
831
|
} catch (o) {
|
|
832
832
|
throw new Error(`[MazPhoneNumberInput](getAsYouTypeFormat) ${o}`);
|
|
833
833
|
}
|
|
@@ -835,25 +835,25 @@ function Yo(t, l) {
|
|
|
835
835
|
function qe() {
|
|
836
836
|
return {
|
|
837
837
|
examples: J,
|
|
838
|
-
getAsYouTypeFormat:
|
|
839
|
-
getPhoneNumberResults:
|
|
840
|
-
loadPhoneNumberExamplesFile:
|
|
841
|
-
getPhoneNumberExample:
|
|
842
|
-
isSameCountryCallingCode:
|
|
843
|
-
isCountryAvailable:
|
|
838
|
+
getAsYouTypeFormat: Oo,
|
|
839
|
+
getPhoneNumberResults: Ro,
|
|
840
|
+
loadPhoneNumberExamplesFile: No,
|
|
841
|
+
getPhoneNumberExample: Do,
|
|
842
|
+
isSameCountryCallingCode: To,
|
|
843
|
+
isCountryAvailable: Uo,
|
|
844
844
|
getCountries: Te,
|
|
845
845
|
getCountryCallingCode: de
|
|
846
846
|
};
|
|
847
847
|
}
|
|
848
|
-
const { isCountryAvailable:
|
|
848
|
+
const { isCountryAvailable: Yo, getPhoneNumberResults: He, getAsYouTypeFormat: qo } = qe(), oe = I(""), W = I(), Q = co({
|
|
849
849
|
start: 0,
|
|
850
850
|
end: 0,
|
|
851
851
|
cursorAtEnd: !0
|
|
852
|
-
}), D =
|
|
852
|
+
}), D = I({
|
|
853
853
|
isValid: !1,
|
|
854
854
|
countryCode: void 0
|
|
855
855
|
});
|
|
856
|
-
async function
|
|
856
|
+
async function Ho() {
|
|
857
857
|
try {
|
|
858
858
|
const t = await fetch("https://ipwho.is"), { country_code: l } = await t.json();
|
|
859
859
|
return l;
|
|
@@ -867,13 +867,13 @@ function We(t) {
|
|
|
867
867
|
const l = new RegExp(/[^\d ()+-]/g);
|
|
868
868
|
return t.replaceAll(l, "").trim();
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function Wo(t, l) {
|
|
871
871
|
const o = t == null ? void 0 : t.$el.querySelector("input");
|
|
872
872
|
Q.start = o == null ? void 0 : o.selectionStart, Q.end = o == null ? void 0 : o.selectionEnd, Q.cursorAtEnd = l && typeof Q.start == "number" && l.length > 0 ? Q.start >= l.length : !0;
|
|
873
873
|
}
|
|
874
874
|
function je(t) {
|
|
875
875
|
if (t) {
|
|
876
|
-
if (!
|
|
876
|
+
if (!Yo(t)) {
|
|
877
877
|
W.value = void 0;
|
|
878
878
|
return;
|
|
879
879
|
}
|
|
@@ -886,17 +886,17 @@ function Qe({
|
|
|
886
886
|
noFormattingAsYouType: o,
|
|
887
887
|
updateResults: c = !0
|
|
888
888
|
}) {
|
|
889
|
-
const
|
|
889
|
+
const m = We(t);
|
|
890
890
|
if (c && (D.value = He({
|
|
891
|
-
phoneNumber:
|
|
891
|
+
phoneNumber: m,
|
|
892
892
|
countryCode: W.value
|
|
893
893
|
})), D.value.isValid && D.value.formatNational && l)
|
|
894
894
|
oe.value = D.value.formatNational;
|
|
895
895
|
else if (Q.cursorAtEnd && !o) {
|
|
896
|
-
const
|
|
897
|
-
oe.value = m;
|
|
898
|
-
} else
|
|
896
|
+
const f = qo(W.value, m);
|
|
899
897
|
oe.value = f;
|
|
898
|
+
} else
|
|
899
|
+
oe.value = m;
|
|
900
900
|
D.value.countryCode && D.value.countryCode !== W.value && Ge({
|
|
901
901
|
countryCode: D.value.countryCode,
|
|
902
902
|
autoFormat: l,
|
|
@@ -937,20 +937,20 @@ function Je() {
|
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
939
|
let ze, Ke;
|
|
940
|
-
function
|
|
940
|
+
function jo(t, l, o) {
|
|
941
941
|
return o != null && o[l] ? o[l] : ((Ke !== t || !ze) && (Ke = t, ze = new Intl.DisplayNames([t], { type: "region" })), ze.of(l));
|
|
942
942
|
}
|
|
943
|
-
function
|
|
944
|
-
var
|
|
943
|
+
function Qo(t, l) {
|
|
944
|
+
var m;
|
|
945
945
|
const o = [], c = Te();
|
|
946
|
-
t = t ?? ((
|
|
947
|
-
for (const
|
|
948
|
-
const n =
|
|
946
|
+
t = t ?? ((m = Je()) == null ? void 0 : m.browserLocale) ?? "en-US";
|
|
947
|
+
for (const f of c) {
|
|
948
|
+
const n = jo(t, f, l);
|
|
949
949
|
if (n)
|
|
950
950
|
try {
|
|
951
|
-
const i = de(
|
|
951
|
+
const i = de(f);
|
|
952
952
|
o.push({
|
|
953
|
-
iso2:
|
|
953
|
+
iso2: f,
|
|
954
954
|
dialCode: i,
|
|
955
955
|
name: n
|
|
956
956
|
});
|
|
@@ -960,26 +960,26 @@ function Go(t, l) {
|
|
|
960
960
|
}
|
|
961
961
|
return o;
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function Ie() {
|
|
964
964
|
return {
|
|
965
965
|
setSelectedCountry: je,
|
|
966
966
|
results: D,
|
|
967
967
|
sanitizePhoneNumber: We,
|
|
968
|
-
fetchCountryCode:
|
|
968
|
+
fetchCountryCode: Ho,
|
|
969
969
|
selectedCountry: W,
|
|
970
970
|
phoneNumber: oe,
|
|
971
971
|
selectionRange: Q,
|
|
972
|
-
saveCursorPosition:
|
|
972
|
+
saveCursorPosition: Wo,
|
|
973
973
|
onPhoneNumberChanged: Qe,
|
|
974
974
|
onCountryChanged: Ge,
|
|
975
975
|
getBrowserLocale: Je,
|
|
976
|
-
getCountriesList:
|
|
976
|
+
getCountriesList: Qo
|
|
977
977
|
};
|
|
978
978
|
}
|
|
979
|
-
const
|
|
979
|
+
const Go = {
|
|
980
980
|
key: 0,
|
|
981
981
|
class: "maz-text-lg"
|
|
982
|
-
},
|
|
982
|
+
}, Jo = /* @__PURE__ */ re({
|
|
983
983
|
__name: "CountrySelector",
|
|
984
984
|
props: {
|
|
985
985
|
style: { default: void 0 },
|
|
@@ -1006,9 +1006,9 @@ const Jo = {
|
|
|
1006
1006
|
},
|
|
1007
1007
|
emits: ["update:model-value"],
|
|
1008
1008
|
setup(t) {
|
|
1009
|
-
const l = t, o =
|
|
1009
|
+
const l = t, o = I(), { phoneNumber: c, getCountriesList: m } = Ie(), f = v(() => m(l.countryLocale, l.customCountriesList)), n = v(() => {
|
|
1010
1010
|
var d;
|
|
1011
|
-
return (d =
|
|
1011
|
+
return (d = f.value) == null ? void 0 : d.filter((g) => {
|
|
1012
1012
|
var y;
|
|
1013
1013
|
return !((y = l.ignoredCountries) != null && y.includes(g.iso2));
|
|
1014
1014
|
});
|
|
@@ -1017,7 +1017,7 @@ const Jo = {
|
|
|
1017
1017
|
return d == null ? void 0 : d.map(
|
|
1018
1018
|
(g) => {
|
|
1019
1019
|
var y;
|
|
1020
|
-
return (y = n.value) == null ? void 0 : y.find((
|
|
1020
|
+
return (y = n.value) == null ? void 0 : y.find((F) => F.iso2.includes(g));
|
|
1021
1021
|
}
|
|
1022
1022
|
);
|
|
1023
1023
|
}), k = v(() => {
|
|
@@ -1037,14 +1037,14 @@ const Jo = {
|
|
|
1037
1037
|
var d, g;
|
|
1038
1038
|
(g = (d = o.value) == null ? void 0 : d.$el.querySelector("input")) == null || g.focus();
|
|
1039
1039
|
}
|
|
1040
|
-
return (d, g) => (C(),
|
|
1040
|
+
return (d, g) => (C(), P(
|
|
1041
1041
|
"div",
|
|
1042
1042
|
{
|
|
1043
1043
|
class: E(["m-country-selector", [l.class, { "--no-flags": d.noFlags }]]),
|
|
1044
1044
|
style: _(d.style)
|
|
1045
1045
|
},
|
|
1046
1046
|
[
|
|
1047
|
-
d.modelValue && !d.noFlags ? (C(),
|
|
1047
|
+
d.modelValue && !d.noFlags ? (C(), P(
|
|
1048
1048
|
"button",
|
|
1049
1049
|
{
|
|
1050
1050
|
key: 0,
|
|
@@ -1071,7 +1071,7 @@ const Jo = {
|
|
|
1071
1071
|
2
|
|
1072
1072
|
/* CLASS */
|
|
1073
1073
|
)) : V("v-if", !0),
|
|
1074
|
-
q(
|
|
1074
|
+
q(Ko, pe({
|
|
1075
1075
|
id: `country-selector-${d.id}`,
|
|
1076
1076
|
ref_key: "CountrySelectorRef",
|
|
1077
1077
|
ref: o,
|
|
@@ -1099,16 +1099,16 @@ const Jo = {
|
|
|
1099
1099
|
},
|
|
1100
1100
|
"onUpdate:modelValue": g[0] || (g[0] = (y) => d.$emit("update:model-value", y))
|
|
1101
1101
|
}), {
|
|
1102
|
-
default: ae(({ option: y, isSelected:
|
|
1102
|
+
default: ae(({ option: y, isSelected: F }) => [
|
|
1103
1103
|
R(
|
|
1104
1104
|
"div",
|
|
1105
1105
|
{
|
|
1106
1106
|
class: E(["m-country-selector__select__item maz-flex maz-items-center maz-gap-1 maz-truncate", {
|
|
1107
|
-
"m-country-selector__select__item--selected":
|
|
1107
|
+
"m-country-selector__select__item--selected": F
|
|
1108
1108
|
}])
|
|
1109
1109
|
},
|
|
1110
1110
|
[
|
|
1111
|
-
!d.noFlags && typeof y.iso2 == "string" ? (C(),
|
|
1111
|
+
!d.noFlags && typeof y.iso2 == "string" ? (C(), P("span", Go, [
|
|
1112
1112
|
V(`
|
|
1113
1113
|
@slot Country list flag
|
|
1114
1114
|
@binding {String} country-code - country code of option - Ex: \`"FR"\`
|
|
@@ -1118,7 +1118,7 @@ const Jo = {
|
|
|
1118
1118
|
H(d.$slots, "country-list-flag", {
|
|
1119
1119
|
countryCode: y.iso2,
|
|
1120
1120
|
option: y,
|
|
1121
|
-
isSelected:
|
|
1121
|
+
isSelected: F
|
|
1122
1122
|
}, () => [
|
|
1123
1123
|
Ce(
|
|
1124
1124
|
G(b(Ee)(y.iso2)),
|
|
@@ -1127,11 +1127,11 @@ const Jo = {
|
|
|
1127
1127
|
)
|
|
1128
1128
|
], !0)
|
|
1129
1129
|
])) : V("v-if", !0),
|
|
1130
|
-
d.showCodeOnList ? (C(),
|
|
1130
|
+
d.showCodeOnList ? (C(), P(
|
|
1131
1131
|
"span",
|
|
1132
1132
|
{
|
|
1133
1133
|
key: 1,
|
|
1134
|
-
class: E(["maz-w-9 maz-flex-none", { "maz-text-muted": !
|
|
1134
|
+
class: E(["maz-w-9 maz-flex-none", { "maz-text-muted": !F }])
|
|
1135
1135
|
},
|
|
1136
1136
|
G(y.dialCode),
|
|
1137
1137
|
3
|
|
@@ -1140,7 +1140,7 @@ const Jo = {
|
|
|
1140
1140
|
R(
|
|
1141
1141
|
"span",
|
|
1142
1142
|
{
|
|
1143
|
-
class: E(["maz-flex-1 maz-truncate", { "maz-font-semibold":
|
|
1143
|
+
class: E(["maz-flex-1 maz-truncate", { "maz-font-semibold": F }])
|
|
1144
1144
|
},
|
|
1145
1145
|
G(y.name),
|
|
1146
1146
|
3
|
|
@@ -1159,9 +1159,9 @@ const Jo = {
|
|
|
1159
1159
|
/* CLASS, STYLE */
|
|
1160
1160
|
));
|
|
1161
1161
|
}
|
|
1162
|
-
}),
|
|
1162
|
+
}), Zo = /* @__PURE__ */ se(Jo, [["__scopeId", "data-v-e21defba"]]), Xo = /* @__PURE__ */ re({
|
|
1163
1163
|
__name: "PhoneInput",
|
|
1164
|
-
props: /* @__PURE__ */
|
|
1164
|
+
props: /* @__PURE__ */ Le({
|
|
1165
1165
|
id: {},
|
|
1166
1166
|
color: {},
|
|
1167
1167
|
size: {},
|
|
@@ -1178,60 +1178,57 @@ const Jo = {
|
|
|
1178
1178
|
modelValue: {},
|
|
1179
1179
|
modelModifiers: {}
|
|
1180
1180
|
}),
|
|
1181
|
-
emits: /* @__PURE__ */
|
|
1181
|
+
emits: /* @__PURE__ */ Le(["update:model-value"], ["update:modelValue"]),
|
|
1182
1182
|
setup(t, { emit: l }) {
|
|
1183
|
-
const o = t, c = l,
|
|
1184
|
-
var
|
|
1183
|
+
const o = t, c = l, m = po(t, "modelValue"), { loadPhoneNumberExamplesFile: f, getPhoneNumberExample: n, examples: i } = qe(), { selectedCountry: k, results: h, saveCursorPosition: B } = Ie(), M = I(!1), d = v(() => {
|
|
1184
|
+
var $;
|
|
1185
1185
|
if (o.label)
|
|
1186
1186
|
return o.label;
|
|
1187
1187
|
const z = o.locales.phoneInput.placeholder;
|
|
1188
1188
|
if (o.noExample || !i.value)
|
|
1189
1189
|
return z;
|
|
1190
1190
|
{
|
|
1191
|
-
const
|
|
1192
|
-
return (
|
|
1191
|
+
const a = n(k.value);
|
|
1192
|
+
return ($ = h.value) != null && $.isValid || !a ? z : `${o.locales.phoneInput.example} ${a}`;
|
|
1193
1193
|
}
|
|
1194
|
-
}), g =
|
|
1194
|
+
}), g = I();
|
|
1195
1195
|
async function y() {
|
|
1196
1196
|
try {
|
|
1197
|
-
return
|
|
1197
|
+
return f();
|
|
1198
1198
|
} catch (z) {
|
|
1199
1199
|
console.error("[maz-ui](MazPhoneNumberInput) while loading phone number examples file", z);
|
|
1200
1200
|
}
|
|
1201
1201
|
}
|
|
1202
|
-
async function
|
|
1202
|
+
async function F(z) {
|
|
1203
1203
|
g.value && z && B(g.value, z), await ee(), c("update:model-value", z);
|
|
1204
1204
|
}
|
|
1205
|
-
return
|
|
1205
|
+
return we(() => {
|
|
1206
1206
|
o.noExample || y();
|
|
1207
|
-
}), (z,
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
"onUpdate:modelValue": P
|
|
1231
|
-
}), null, 16, ["id", "model-value", "label", "disabled", "color", "error", "size", "success", "class"]);
|
|
1232
|
-
};
|
|
1207
|
+
}), (z, $) => (C(), K(Ve, pe({
|
|
1208
|
+
id: `phone-number-${z.id}`,
|
|
1209
|
+
ref_key: "PhoneInputRef",
|
|
1210
|
+
ref: g,
|
|
1211
|
+
"model-value": m.value
|
|
1212
|
+
}, z.$attrs, {
|
|
1213
|
+
label: d.value,
|
|
1214
|
+
disabled: z.disabled,
|
|
1215
|
+
color: z.color,
|
|
1216
|
+
error: z.error,
|
|
1217
|
+
size: z.size,
|
|
1218
|
+
success: z.success,
|
|
1219
|
+
type: "tel",
|
|
1220
|
+
inputmode: "tel",
|
|
1221
|
+
class: ["m-phone-input", {
|
|
1222
|
+
"--border-radius": z.hasRadius,
|
|
1223
|
+
"--error": z.error || !b(h).isValid,
|
|
1224
|
+
"--focused": M.value
|
|
1225
|
+
}],
|
|
1226
|
+
onFocus: $[0] || ($[0] = (a) => M.value = !0),
|
|
1227
|
+
onBlur: $[1] || ($[1] = (a) => M.value = !1),
|
|
1228
|
+
"onUpdate:modelValue": $[2] || ($[2] = (a) => F(a))
|
|
1229
|
+
}), null, 16, ["id", "model-value", "label", "disabled", "color", "error", "size", "success", "class"]));
|
|
1233
1230
|
}
|
|
1234
|
-
}),
|
|
1231
|
+
}), xo = /* @__PURE__ */ se(Xo, [["__scopeId", "data-v-e2bf70df"]]), _o = {
|
|
1235
1232
|
countrySelector: {
|
|
1236
1233
|
placeholder: "Country code",
|
|
1237
1234
|
error: "Choose country",
|
|
@@ -1241,7 +1238,7 @@ const Jo = {
|
|
|
1241
1238
|
placeholder: "Phone number",
|
|
1242
1239
|
example: "Example:"
|
|
1243
1240
|
}
|
|
1244
|
-
},
|
|
1241
|
+
}, et = /* @__PURE__ */ re({
|
|
1245
1242
|
inheritAttrs: !1,
|
|
1246
1243
|
__name: "MazPhoneNumberInput",
|
|
1247
1244
|
props: {
|
|
@@ -1283,53 +1280,53 @@ const Jo = {
|
|
|
1283
1280
|
emits: ["update", "data", "country-code", "update:model-value", "update:country-code"],
|
|
1284
1281
|
setup(t, { emit: l }) {
|
|
1285
1282
|
const o = l, c = t, {
|
|
1286
|
-
phoneNumber:
|
|
1287
|
-
selectedCountry:
|
|
1283
|
+
phoneNumber: m,
|
|
1284
|
+
selectedCountry: f,
|
|
1288
1285
|
results: n,
|
|
1289
1286
|
fetchCountryCode: i,
|
|
1290
1287
|
setSelectedCountry: k,
|
|
1291
1288
|
onPhoneNumberChanged: h,
|
|
1292
1289
|
onCountryChanged: B,
|
|
1293
1290
|
getBrowserLocale: M
|
|
1294
|
-
} =
|
|
1291
|
+
} = Ie(), d = ke({
|
|
1295
1292
|
componentName: "MazPhoneNumberInput",
|
|
1296
1293
|
providedId: c.id
|
|
1297
1294
|
}), g = v(() => ({
|
|
1298
|
-
...
|
|
1295
|
+
..._o,
|
|
1299
1296
|
...c.translations
|
|
1300
1297
|
}));
|
|
1301
|
-
|
|
1302
|
-
var
|
|
1303
|
-
if (k(c.countryCode ?? c.defaultCountryCode), c.fetchCountry && !
|
|
1304
|
-
const
|
|
1305
|
-
k(
|
|
1298
|
+
we(async () => {
|
|
1299
|
+
var a;
|
|
1300
|
+
if (k(c.countryCode ?? c.defaultCountryCode), c.fetchCountry && !f.value) {
|
|
1301
|
+
const S = await i();
|
|
1302
|
+
k(S);
|
|
1306
1303
|
}
|
|
1307
|
-
if (!c.defaultCountryCode && !c.noUseBrowserLocale && !
|
|
1308
|
-
const
|
|
1309
|
-
k(
|
|
1304
|
+
if (!c.defaultCountryCode && !c.noUseBrowserLocale && !f.value) {
|
|
1305
|
+
const S = (a = M()) == null ? void 0 : a.locale;
|
|
1306
|
+
k(S);
|
|
1310
1307
|
}
|
|
1311
1308
|
});
|
|
1312
|
-
const y =
|
|
1313
|
-
function
|
|
1314
|
-
var
|
|
1315
|
-
return (
|
|
1309
|
+
const y = I();
|
|
1310
|
+
function F() {
|
|
1311
|
+
var a;
|
|
1312
|
+
return (a = y.value) == null ? void 0 : a.$el.querySelector("input");
|
|
1316
1313
|
}
|
|
1317
1314
|
async function z() {
|
|
1318
|
-
var
|
|
1319
|
-
await ee(), (
|
|
1315
|
+
var a;
|
|
1316
|
+
await ee(), (a = F()) == null || a.select();
|
|
1320
1317
|
}
|
|
1321
|
-
function
|
|
1318
|
+
function $(a) {
|
|
1322
1319
|
B({
|
|
1323
|
-
countryCode:
|
|
1320
|
+
countryCode: a,
|
|
1324
1321
|
autoFormat: c.autoFormat,
|
|
1325
1322
|
noFormattingAsYouType: c.noFormattingAsYouType
|
|
1326
1323
|
}), z();
|
|
1327
1324
|
}
|
|
1328
1325
|
return he(
|
|
1329
1326
|
() => c.modelValue ?? c.defaultPhoneNumber,
|
|
1330
|
-
(
|
|
1331
|
-
|
|
1332
|
-
newPhoneNumber:
|
|
1327
|
+
(a, S) => {
|
|
1328
|
+
a && a !== S && a !== m.value && h({
|
|
1329
|
+
newPhoneNumber: a,
|
|
1333
1330
|
autoFormat: c.autoFormat,
|
|
1334
1331
|
noFormattingAsYouType: c.noFormattingAsYouType
|
|
1335
1332
|
});
|
|
@@ -1339,9 +1336,9 @@ const Jo = {
|
|
|
1339
1336
|
}
|
|
1340
1337
|
), he(
|
|
1341
1338
|
() => c.countryCode ?? c.defaultCountryCode,
|
|
1342
|
-
(
|
|
1343
|
-
|
|
1344
|
-
countryCode:
|
|
1339
|
+
(a, S) => {
|
|
1340
|
+
a && a !== S && a !== f.value && B({
|
|
1341
|
+
countryCode: a,
|
|
1345
1342
|
autoFormat: c.autoFormat,
|
|
1346
1343
|
noFormattingAsYouType: c.noFormattingAsYouType
|
|
1347
1344
|
});
|
|
@@ -1351,65 +1348,65 @@ const Jo = {
|
|
|
1351
1348
|
}
|
|
1352
1349
|
), he(
|
|
1353
1350
|
n,
|
|
1354
|
-
(
|
|
1355
|
-
o("update",
|
|
1351
|
+
(a) => {
|
|
1352
|
+
o("update", a), o("data", a), a.e164 && a.isValid ? o("update:model-value", a.e164) : o("update:model-value", m.value), o("country-code", f.value), o("update:country-code", f.value);
|
|
1356
1353
|
},
|
|
1357
1354
|
{
|
|
1358
1355
|
immediate: !0
|
|
1359
1356
|
}
|
|
1360
|
-
), (
|
|
1357
|
+
), (a, S) => {
|
|
1361
1358
|
var Z;
|
|
1362
|
-
return C(),
|
|
1359
|
+
return C(), P(
|
|
1363
1360
|
"div",
|
|
1364
1361
|
{
|
|
1365
|
-
class: E(["m-phone-number-input", [c.class, { "--block":
|
|
1366
|
-
style: _(
|
|
1362
|
+
class: E(["m-phone-number-input", [c.class, { "--block": a.block }]]),
|
|
1363
|
+
style: _(a.style)
|
|
1367
1364
|
},
|
|
1368
1365
|
[
|
|
1369
|
-
|
|
1366
|
+
a.noCountrySelector ? V("v-if", !0) : (C(), K(Zo, {
|
|
1370
1367
|
key: 0,
|
|
1371
1368
|
id: b(d),
|
|
1372
|
-
"model-value": b(
|
|
1373
|
-
color:
|
|
1374
|
-
size:
|
|
1375
|
-
"country-locale":
|
|
1376
|
-
"country-selector-display-name":
|
|
1377
|
-
"custom-countries-list":
|
|
1378
|
-
"ignored-countries":
|
|
1379
|
-
"list-position":
|
|
1380
|
-
"no-flags":
|
|
1381
|
-
"no-search":
|
|
1382
|
-
error:
|
|
1383
|
-
success:
|
|
1369
|
+
"model-value": b(f),
|
|
1370
|
+
color: a.color,
|
|
1371
|
+
size: a.size,
|
|
1372
|
+
"country-locale": a.countryLocale,
|
|
1373
|
+
"country-selector-display-name": a.countrySelectorDisplayName,
|
|
1374
|
+
"custom-countries-list": a.customCountriesList,
|
|
1375
|
+
"ignored-countries": a.ignoredCountries,
|
|
1376
|
+
"list-position": a.listPosition,
|
|
1377
|
+
"no-flags": a.noFlags,
|
|
1378
|
+
"no-search": a.noSearch,
|
|
1379
|
+
error: a.error || (a.noValidationError ? !1 : !!b(m) && !b(f)),
|
|
1380
|
+
success: a.success || (a.noValidationSuccess ? !1 : (Z = b(n)) == null ? void 0 : Z.isValid),
|
|
1384
1381
|
locales: g.value,
|
|
1385
|
-
disabled:
|
|
1386
|
-
"show-code-on-list":
|
|
1387
|
-
"only-countries":
|
|
1388
|
-
"preferred-countries":
|
|
1389
|
-
width:
|
|
1390
|
-
"onUpdate:modelValue":
|
|
1382
|
+
disabled: a.disabled,
|
|
1383
|
+
"show-code-on-list": a.showCodeOnList,
|
|
1384
|
+
"only-countries": a.onlyCountries,
|
|
1385
|
+
"preferred-countries": a.preferredCountries,
|
|
1386
|
+
width: a.countrySelectorWidth,
|
|
1387
|
+
"onUpdate:modelValue": $
|
|
1391
1388
|
}, null, 8, ["id", "model-value", "color", "size", "country-locale", "country-selector-display-name", "custom-countries-list", "ignored-countries", "list-position", "no-flags", "no-search", "error", "success", "locales", "disabled", "show-code-on-list", "only-countries", "preferred-countries", "width"])),
|
|
1392
|
-
q(
|
|
1389
|
+
q(xo, {
|
|
1393
1390
|
id: b(d),
|
|
1394
1391
|
ref_key: "PhoneInputRef",
|
|
1395
1392
|
ref: y,
|
|
1396
|
-
"model-value": b(
|
|
1397
|
-
color:
|
|
1398
|
-
size:
|
|
1399
|
-
"no-example":
|
|
1393
|
+
"model-value": b(m),
|
|
1394
|
+
color: a.color,
|
|
1395
|
+
size: a.size,
|
|
1396
|
+
"no-example": a.noExample,
|
|
1400
1397
|
block: "",
|
|
1401
|
-
disabled:
|
|
1402
|
-
"has-radius": !
|
|
1403
|
-
success:
|
|
1404
|
-
error:
|
|
1398
|
+
disabled: a.disabled,
|
|
1399
|
+
"has-radius": !a.noCountrySelector,
|
|
1400
|
+
success: a.success || (a.noValidationSuccess ? !1 : b(n).isValid),
|
|
1401
|
+
error: a.error || (a.noValidationError ? !1 : !!b(m) && !b(n).isValid),
|
|
1405
1402
|
locales: g.value,
|
|
1406
|
-
"no-formatting-as-you-type":
|
|
1407
|
-
"auto-format":
|
|
1408
|
-
label:
|
|
1409
|
-
"onUpdate:modelValue":
|
|
1403
|
+
"no-formatting-as-you-type": a.noFormattingAsYouType,
|
|
1404
|
+
"auto-format": a.autoFormat,
|
|
1405
|
+
label: a.placeholder,
|
|
1406
|
+
"onUpdate:modelValue": S[0] || (S[0] = (N) => b(h)({
|
|
1410
1407
|
newPhoneNumber: N,
|
|
1411
|
-
autoFormat:
|
|
1412
|
-
noFormattingAsYouType:
|
|
1408
|
+
autoFormat: a.autoFormat,
|
|
1409
|
+
noFormattingAsYouType: a.noFormattingAsYouType
|
|
1413
1410
|
}))
|
|
1414
1411
|
}, null, 8, ["id", "model-value", "color", "size", "no-example", "disabled", "has-radius", "success", "error", "locales", "no-formatting-as-you-type", "auto-format", "label"])
|
|
1415
1412
|
],
|
|
@@ -1418,9 +1415,9 @@ const Jo = {
|
|
|
1418
1415
|
);
|
|
1419
1416
|
};
|
|
1420
1417
|
}
|
|
1421
|
-
}),
|
|
1418
|
+
}), lt = /* @__PURE__ */ se(et, [["__scopeId", "data-v-5481a936"]]);
|
|
1422
1419
|
export {
|
|
1423
|
-
|
|
1420
|
+
lt as M,
|
|
1424
1421
|
se as _,
|
|
1425
|
-
|
|
1422
|
+
ke as u
|
|
1426
1423
|
};
|