@alfadocs/ui-kit 1.75.0 → 1.76.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.
- package/dist/_chunks/{booking-ojunD_Y_.js → booking-D2r19Lia.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-CctI6mpd.js → calendar-appointment-editor-dialog-B4My4eiB.js} +2 -2
- package/dist/_chunks/{patient-details-Dgd_tocD.js → patient-details-B-I9Xkh9.js} +2 -2
- package/dist/_chunks/{patient-field-row-BFVlJnS9.js → patient-field-row-Bn0z6lAZ.js} +2 -2
- package/dist/_chunks/{patient-summary-card-BTKvFUmh.js → patient-summary-card-bhDo0gVX.js} +2 -2
- package/dist/_chunks/{phone-input-EwVuqFik.js → phone-input-C3NrD-nl.js} +78 -73
- package/dist/_chunks/{practice-results-B4Z5q46r.js → practice-results-C5SJTgcd.js} +471 -457
- package/dist/_chunks/{registration-form-B6qqeXP1.js → registration-form-DeK2QiJu.js} +2 -2
- package/dist/_chunks/{send-registration-link-form-pO2bGjGa.js → send-registration-link-form-__DWY62q.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-BFslxbRr.js → use-appointment-details-read-lFUL4kkd.js} +2 -2
- package/dist/agent-catalog.json +2 -2
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/practice-results/index.d.ts +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +4 -0
- package/dist/index.js +9 -9
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/send-registration-link-form/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ import { R as Ws } from "./radio-group-ChIKyeSJ.js";
|
|
|
12
12
|
import { D as Ys } from "./date-picker-CdhXlgVI.js";
|
|
13
13
|
import { E as Zs } from "./email-input-C7THAwh2.js";
|
|
14
14
|
import { F as He } from "./form-field-Ani72sVY.js";
|
|
15
|
-
import { P as Qs } from "./phone-input-
|
|
15
|
+
import { P as Qs } from "./phone-input-C3NrD-nl.js";
|
|
16
16
|
import { T as Xs } from "./text-area-COMVJ1yE.js";
|
|
17
17
|
import { T as Dt } from "./text-input-CaG9ApoE.js";
|
|
18
18
|
import { A as en } from "./address-fields-BUPRs3n-.js";
|
|
@@ -3898,4 +3898,4 @@ export {
|
|
|
3898
3898
|
Re as O,
|
|
3899
3899
|
jn as b
|
|
3900
3900
|
};
|
|
3901
|
-
//# sourceMappingURL=booking-
|
|
3901
|
+
//# sourceMappingURL=booking-D2r19Lia.js.map
|
|
@@ -16,7 +16,7 @@ import { d as vt, c as qs, b as ra } from "./toast-BNoN8Qjh.js";
|
|
|
16
16
|
import { T as Ga, a as Si } from "./tooltip-uEBdD1-5.js";
|
|
17
17
|
import { A as he } from "./alert-9kEwDza3.js";
|
|
18
18
|
import { B as ge } from "./button-DohK_Ak_.js";
|
|
19
|
-
import { f as ft, b as ja, c as _o, d as $o, e as zo, A as wi, u as Fo, R as wr, g as Ho, D as Ti, M as Vo, C as js, h as Uo, i as Ko, j as Go, k as qo, l as wa, I as jo, s as Yo } from "./use-appointment-details-read-
|
|
19
|
+
import { f as ft, b as ja, c as _o, d as $o, e as zo, A as wi, u as Fo, R as wr, g as Ho, D as Ti, M as Vo, C as js, h as Uo, i as Ko, j as Go, k as qo, l as wa, I as jo, s as Yo } from "./use-appointment-details-read-lFUL4kkd.js";
|
|
20
20
|
import { V as va } from "./visually-hidden-BHxEUGyT.js";
|
|
21
21
|
import { C as Xo } from "./calendar-ClB-jWH1.js";
|
|
22
22
|
import { C as lr } from "./card-BA4Ig_kn.js";
|
|
@@ -10983,4 +10983,4 @@ export {
|
|
|
10983
10983
|
hp as r,
|
|
10984
10984
|
Vn as u
|
|
10985
10985
|
};
|
|
10986
|
-
//# sourceMappingURL=calendar-appointment-editor-dialog-
|
|
10986
|
+
//# sourceMappingURL=calendar-appointment-editor-dialog-B4My4eiB.js.map
|
|
@@ -8,7 +8,7 @@ import { C as ie, b as te, a as se } from "./collapsible-DVPM46bq.js";
|
|
|
8
8
|
import { D as ae } from "./description-list-BxzDN9o2.js";
|
|
9
9
|
import { P as de } from "./panel-header-CbtlTe85.js";
|
|
10
10
|
import { u as re } from "./registry-DvAUVLHh.js";
|
|
11
|
-
import { u as ne, F as le, r as oe, P as ce } from "./patient-field-row-
|
|
11
|
+
import { u as ne, F as le, r as oe, P as ce } from "./patient-field-row-Bn0z6lAZ.js";
|
|
12
12
|
import { C as pe } from "./clipboard-list-rSzfIYZB.js";
|
|
13
13
|
const me = {
|
|
14
14
|
id: "patient-details",
|
|
@@ -368,4 +368,4 @@ export {
|
|
|
368
368
|
ue as P,
|
|
369
369
|
me as p
|
|
370
370
|
};
|
|
371
|
-
//# sourceMappingURL=patient-details-
|
|
371
|
+
//# sourceMappingURL=patient-details-B-I9Xkh9.js.map
|
|
@@ -24,7 +24,7 @@ import { D as me } from "./date-picker-CdhXlgVI.js";
|
|
|
24
24
|
import { E as pe } from "./email-input-C7THAwh2.js";
|
|
25
25
|
import { F as fe } from "./fiscal-code-input-BzWmNDnl.js";
|
|
26
26
|
import { N as ge } from "./number-input-CVwI1ltI.js";
|
|
27
|
-
import { P as he } from "./phone-input-
|
|
27
|
+
import { P as he } from "./phone-input-C3NrD-nl.js";
|
|
28
28
|
import { P as ye } from "./postal-code-input-CfZOnIkW.js";
|
|
29
29
|
import { P as be } from "./province-select-CDjs5obD.js";
|
|
30
30
|
import { S as ve } from "./select-4S-eYZUf.js";
|
|
@@ -805,4 +805,4 @@ export {
|
|
|
805
805
|
Dt as r,
|
|
806
806
|
St as u
|
|
807
807
|
};
|
|
808
|
-
//# sourceMappingURL=patient-field-row-
|
|
808
|
+
//# sourceMappingURL=patient-field-row-Bn0z6lAZ.js.map
|
|
@@ -14,7 +14,7 @@ import { T as Ke } from "./transaction-chip-CohY6sTA.js";
|
|
|
14
14
|
import { T as je } from "./tooltip-uEBdD1-5.js";
|
|
15
15
|
import { H as G } from "./hover-card-CuRIA4wN.js";
|
|
16
16
|
import { i as de } from "./is-safe-url-DkETxeHz.js";
|
|
17
|
-
import { u as qe, r as We, a as He, b as Je, F as Qe, S as Xe, A as Ye, N as Ze } from "./patient-field-row-
|
|
17
|
+
import { u as qe, r as We, a as He, b as Je, F as Qe, S as Xe, A as Ye, N as Ze } from "./patient-field-row-Bn0z6lAZ.js";
|
|
18
18
|
import { u as Oe } from "./registry-DvAUVLHh.js";
|
|
19
19
|
import { M as ea } from "./mail-BqXVF2zH.js";
|
|
20
20
|
import { P as aa } from "./phone-FceYcIFQ.js";
|
|
@@ -548,4 +548,4 @@ export {
|
|
|
548
548
|
Ca as P,
|
|
549
549
|
ma as p
|
|
550
550
|
};
|
|
551
|
-
//# sourceMappingURL=patient-summary-card-
|
|
551
|
+
//# sourceMappingURL=patient-summary-card-bhDo0gVX.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Xe, useContext as et, useMemo as v, useState as G, useRef as
|
|
2
|
+
import { forwardRef as Xe, useContext as et, useMemo as v, useState as G, useRef as y, useEffect as de, useCallback as U } from "react";
|
|
3
3
|
import { u as tt } from "./registry-DvAUVLHh.js";
|
|
4
4
|
import { u as nt } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
5
5
|
import { u as st } from "./use-dom-value-DTxHhQAN.js";
|
|
6
6
|
import * as O from "@radix-ui/react-popover";
|
|
7
7
|
import { u as ot, f as rt } from "./non-modal-tab-exit-j3CPOuE3.js";
|
|
8
|
-
import { R as at, _ as
|
|
8
|
+
import { R as at, _ as I } from "./index-4xgbg-sn.js";
|
|
9
9
|
import { c as pe } from "./index-D2ZczOXr.js";
|
|
10
10
|
import { useTranslation as it } from "react-i18next";
|
|
11
|
-
import { getCountries as dt, parsePhoneNumberFromString as T, AsYouType as W, getCountryCallingCode as
|
|
12
|
-
import { u as
|
|
11
|
+
import { getCountries as dt, parsePhoneNumberFromString as T, AsYouType as W, getCountryCallingCode as lt } from "libphonenumber-js/min";
|
|
12
|
+
import { u as ut, F as ct, a as pt } from "./form-field-context-DtiROUJV.js";
|
|
13
13
|
import { c as ft } from "./compose-refs-C0k0tdqF.js";
|
|
14
|
-
import { n as
|
|
14
|
+
import { n as le } from "./normalize-diacritics-BNGbFNlJ.js";
|
|
15
15
|
import { b as mt } from "./menu-row-BAr8bx1I.js";
|
|
16
|
-
import { a as
|
|
16
|
+
import { a as ue } from "./flag-DVBE6DnB.js";
|
|
17
17
|
import { C as ht } from "./chevron-down-DWE7GSq9.js";
|
|
18
18
|
const gt = {
|
|
19
19
|
id: "phone-input",
|
|
@@ -100,7 +100,11 @@ const gt = {
|
|
|
100
100
|
"ds:has-[input:focus]:outline-[length:var(--focus-ring-width)] ds:has-[input:focus]:outline-solid",
|
|
101
101
|
"ds:has-[input:focus]:outline-ring ds:has-[input:focus]:outline-offset-[length:var(--focus-ring-offset)]",
|
|
102
102
|
"ds:forced-colors:has-[input:focus]:outline-[CanvasText]",
|
|
103
|
-
"ds:has-[input:disabled]:cursor-not-allowed ds:has-[input:disabled]:opacity-50"
|
|
103
|
+
"ds:has-[input:disabled]:cursor-not-allowed ds:has-[input:disabled]:opacity-50",
|
|
104
|
+
/* A locked number looks like a locked TextInput: muted, flat, no dimming.
|
|
105
|
+
Keyed on an explicit attribute, not `has-[input:read-only]`, which also
|
|
106
|
+
matches hidden inputs inside the wrapper. */
|
|
107
|
+
"ds:data-[read-only]:bg-muted ds:data-[read-only]:shadow-none ds:data-[read-only]:cursor-default"
|
|
104
108
|
].join(" "),
|
|
105
109
|
{
|
|
106
110
|
variants: {
|
|
@@ -143,7 +147,7 @@ const gt = {
|
|
|
143
147
|
},
|
|
144
148
|
defaultVariants: { size: "md" }
|
|
145
149
|
}
|
|
146
|
-
),
|
|
150
|
+
), yt = pe(
|
|
147
151
|
[
|
|
148
152
|
"ds:flex-1 ds:min-w-0 ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground",
|
|
149
153
|
"ds:border-0 ds:outline-none",
|
|
@@ -160,7 +164,7 @@ const gt = {
|
|
|
160
164
|
},
|
|
161
165
|
defaultVariants: { size: "md" }
|
|
162
166
|
}
|
|
163
|
-
),
|
|
167
|
+
), bt = [
|
|
164
168
|
"ds:z-[var(--z-popover)] ds:overflow-hidden ds:w-72",
|
|
165
169
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background ds:text-foreground",
|
|
166
170
|
"ds:shadow-[var(--shadow-lg)]",
|
|
@@ -212,16 +216,16 @@ function Re(s, a, c, o, f) {
|
|
|
212
216
|
if (c) {
|
|
213
217
|
const C = typeof navigator < "u" ? navigator.language : void 0;
|
|
214
218
|
if (C) {
|
|
215
|
-
const
|
|
216
|
-
if (
|
|
217
|
-
const
|
|
218
|
-
if (d(
|
|
219
|
+
const b = C.match(/-([A-Za-z]{2})/);
|
|
220
|
+
if (b) {
|
|
221
|
+
const x = b[1].toUpperCase();
|
|
222
|
+
if (d(x)) return x;
|
|
219
223
|
}
|
|
220
224
|
}
|
|
221
225
|
try {
|
|
222
|
-
const
|
|
223
|
-
if (
|
|
224
|
-
return
|
|
226
|
+
const b = new Intl.Locale(o).region;
|
|
227
|
+
if (b && d(b.toUpperCase()))
|
|
228
|
+
return b.toUpperCase();
|
|
225
229
|
} catch {
|
|
226
230
|
}
|
|
227
231
|
}
|
|
@@ -237,7 +241,7 @@ function St(s, a) {
|
|
|
237
241
|
const o = a.map((i) => ({
|
|
238
242
|
code: i,
|
|
239
243
|
name: c.of(i) ?? i,
|
|
240
|
-
dialCode:
|
|
244
|
+
dialCode: lt(i)
|
|
241
245
|
})), f = new Intl.Collator(s);
|
|
242
246
|
return o.sort((i, d) => f.compare(i.name, d.name));
|
|
243
247
|
}
|
|
@@ -250,8 +254,8 @@ const Et = Xe(
|
|
|
250
254
|
onChange: i,
|
|
251
255
|
size: d = "md",
|
|
252
256
|
tone: C = "default",
|
|
253
|
-
disabled:
|
|
254
|
-
readOnly:
|
|
257
|
+
disabled: b,
|
|
258
|
+
readOnly: x,
|
|
255
259
|
placeholder: Se,
|
|
256
260
|
popularCountries: V,
|
|
257
261
|
allowedCountries: D,
|
|
@@ -264,7 +268,7 @@ const Et = Xe(
|
|
|
264
268
|
"aria-label": Fe
|
|
265
269
|
}, Te) {
|
|
266
270
|
var Ne;
|
|
267
|
-
const { t: z, i18n: E } = it("ui"), R =
|
|
271
|
+
const { t: z, i18n: E } = it("ui"), R = ut(), k = et(ct) !== null, h = v(
|
|
268
272
|
() => new Set(dt()),
|
|
269
273
|
[]
|
|
270
274
|
), p = v(() => {
|
|
@@ -294,9 +298,9 @@ const Et = Xe(
|
|
|
294
298
|
} : { country: e, display: t, pinned: !1 };
|
|
295
299
|
}
|
|
296
300
|
return { country: e, display: "", pinned: !1 };
|
|
297
|
-
}, []), [
|
|
301
|
+
}, []), [l, j] = G(J.country), [Q, g] = G(
|
|
298
302
|
J.display
|
|
299
|
-
), [X, A] = G(!1), [De, fe] = G(""), me = a !== void 0, ee =
|
|
303
|
+
), [X, A] = G(!1), [De, fe] = G(""), me = a !== void 0, ee = y(""), B = y(null), $ = y(J.pinned), P = y(null), Le = ft(Te, P), je = st(P, Q), he = y(null), ge = y(null);
|
|
300
304
|
de(() => {
|
|
301
305
|
if ($.current) return;
|
|
302
306
|
const e = Re(
|
|
@@ -330,10 +334,10 @@ const Et = Xe(
|
|
|
330
334
|
const t = P.current;
|
|
331
335
|
t && document.activeElement === t && t.setSelectionRange(e, e);
|
|
332
336
|
});
|
|
333
|
-
const
|
|
337
|
+
const N = U(
|
|
334
338
|
(e, t) => {
|
|
335
|
-
const n = T(e, t),
|
|
336
|
-
ee.current =
|
|
339
|
+
const n = T(e, t), u = (n == null ? void 0 : n.number) ?? "";
|
|
340
|
+
ee.current = u, i == null || i(u, {
|
|
337
341
|
country: t,
|
|
338
342
|
isValid: (n == null ? void 0 : n.isValid()) ?? !1,
|
|
339
343
|
isPossible: (n == null ? void 0 : n.isPossible()) ?? !1,
|
|
@@ -341,9 +345,9 @@ const Et = Xe(
|
|
|
341
345
|
});
|
|
342
346
|
},
|
|
343
347
|
[i]
|
|
344
|
-
), Ae = pt(R, L), Be = L ?? (k ? Ae : void 0), te = (k ? R.disabled : !1) || !!
|
|
348
|
+
), Ae = pt(R, L), Be = L ?? (k ? Ae : void 0), te = (k ? R.disabled : !1) || !!b, $e = (k ? R.required : !1) || !!Pe, ve = k ? R.invalid : !1, He = ve ? "error" : C, Ke = k && R.describedBy ? R.describedBy : void 0, Me = Se ?? z("inputs.phone.placeholder", "Phone number"), H = y(Z);
|
|
345
349
|
H.current = Z;
|
|
346
|
-
const ne =
|
|
350
|
+
const ne = y(!1), K = y(!1), M = U(
|
|
347
351
|
(e) => {
|
|
348
352
|
var t, n;
|
|
349
353
|
return e instanceof Node && !!((t = he.current) != null && t.contains(e) || (n = ge.current) != null && n.contains(e));
|
|
@@ -357,12 +361,12 @@ const Et = Xe(
|
|
|
357
361
|
}, qe = (e) => {
|
|
358
362
|
const t = e.relatedTarget;
|
|
359
363
|
M(t) || t === null && K.current || se();
|
|
360
|
-
},
|
|
364
|
+
}, ye = Z !== void 0;
|
|
361
365
|
de(() => {
|
|
362
|
-
if (!
|
|
366
|
+
if (!ye) return;
|
|
363
367
|
let e;
|
|
364
|
-
const t = (
|
|
365
|
-
K.current = M(
|
|
368
|
+
const t = (u) => {
|
|
369
|
+
K.current = M(u.target), !K.current && (e = window.setTimeout(() => {
|
|
366
370
|
M(document.activeElement) || se();
|
|
367
371
|
}, 0));
|
|
368
372
|
}, n = () => {
|
|
@@ -371,52 +375,52 @@ const Et = Xe(
|
|
|
371
375
|
return document.addEventListener("pointerdown", t, !0), document.addEventListener("pointerup", n, !0), document.addEventListener("pointercancel", n, !0), () => {
|
|
372
376
|
window.clearTimeout(e), document.removeEventListener("pointerdown", t, !0), document.removeEventListener("pointerup", n, !0), document.removeEventListener("pointercancel", n, !0);
|
|
373
377
|
};
|
|
374
|
-
}, [
|
|
375
|
-
const oe = ke === "e164" && Y !== void 0, Ge = oe ? ((Ne = T(Q,
|
|
376
|
-
if (je(),
|
|
377
|
-
const t = e.target, n = t.value,
|
|
378
|
-
B.current = Rt(ie, S), g(ie),
|
|
379
|
-
},
|
|
378
|
+
}, [ye, M, se]);
|
|
379
|
+
const oe = ke === "e164" && Y !== void 0, Ge = oe ? ((Ne = T(Q, l)) == null ? void 0 : Ne.number) ?? "" : "", Ue = (e) => {
|
|
380
|
+
if (je(), x) return;
|
|
381
|
+
const t = e.target, n = t.value, u = t.selectionStart ?? n.length, S = zt(n, u), ie = new W(l).input(n);
|
|
382
|
+
B.current = Rt(ie, S), g(ie), N(ie, l);
|
|
383
|
+
}, be = ee, Oe = v(
|
|
380
384
|
() => ({
|
|
381
|
-
getValue: () =>
|
|
385
|
+
getValue: () => be.current,
|
|
382
386
|
setValue: (e) => {
|
|
383
387
|
if (e === "") {
|
|
384
|
-
g(""),
|
|
388
|
+
g(""), N("", l);
|
|
385
389
|
return;
|
|
386
390
|
}
|
|
387
391
|
const t = T(e);
|
|
388
392
|
if (t != null && t.country)
|
|
389
|
-
$.current = !0, j(t.country), g(t.formatNational()),
|
|
393
|
+
$.current = !0, j(t.country), g(t.formatNational()), N(t.formatNational(), t.country);
|
|
390
394
|
else {
|
|
391
|
-
const
|
|
392
|
-
g(
|
|
395
|
+
const u = new W(l).input(e);
|
|
396
|
+
g(u), N(u, l);
|
|
393
397
|
}
|
|
394
398
|
},
|
|
395
399
|
clear: () => {
|
|
396
|
-
g(""),
|
|
400
|
+
g(""), N("", l);
|
|
397
401
|
},
|
|
398
402
|
focus: () => {
|
|
399
403
|
var e;
|
|
400
404
|
return (e = P.current) == null ? void 0 : e.focus();
|
|
401
405
|
}
|
|
402
406
|
}),
|
|
403
|
-
[
|
|
407
|
+
[l, N, be]
|
|
404
408
|
);
|
|
405
409
|
tt(gt, Oe, L);
|
|
406
410
|
const We = ot(!0, {
|
|
407
411
|
getAnchor: rt,
|
|
408
412
|
onReturnToTrigger: () => A(!1)
|
|
409
413
|
}), Ye = (e) => {
|
|
410
|
-
if (e ===
|
|
414
|
+
if (e === l) {
|
|
411
415
|
A(!1);
|
|
412
416
|
return;
|
|
413
417
|
}
|
|
414
|
-
const t = Q.replace(/\D/g, ""), n = new W(e),
|
|
415
|
-
$.current = !0, j(e), g(
|
|
418
|
+
const t = Q.replace(/\D/g, ""), n = new W(e), u = t ? n.input(t) : "";
|
|
419
|
+
$.current = !0, j(e), g(u), A(!1), fe(""), N(u, e), requestAnimationFrame(() => {
|
|
416
420
|
var S;
|
|
417
421
|
(S = P.current) == null || S.focus();
|
|
418
422
|
});
|
|
419
|
-
},
|
|
423
|
+
}, w = v(
|
|
420
424
|
() => St(
|
|
421
425
|
E.language,
|
|
422
426
|
p ?? Array.from(h)
|
|
@@ -424,22 +428,22 @@ const Et = Xe(
|
|
|
424
428
|
[E.language, h, p]
|
|
425
429
|
), F = v(() => {
|
|
426
430
|
if (!V || V.length === 0) return [];
|
|
427
|
-
const e = new Map(
|
|
431
|
+
const e = new Map(w.map((t) => [t.code, t]));
|
|
428
432
|
return V.filter((t) => h.has(t)).map((t) => e.get(t)).filter((t) => !!t);
|
|
429
|
-
}, [V,
|
|
433
|
+
}, [V, w, h]), re = v(
|
|
430
434
|
() => new Set(F.map((e) => e.code)),
|
|
431
435
|
[F]
|
|
432
436
|
), Ze = v(
|
|
433
|
-
() => re.size > 0 ?
|
|
434
|
-
[
|
|
437
|
+
() => re.size > 0 ? w.filter((e) => !re.has(e.code)) : w,
|
|
438
|
+
[w, re]
|
|
435
439
|
), _ = v(
|
|
436
|
-
() =>
|
|
437
|
-
[
|
|
438
|
-
), ae = _ ? _.dialCode : "", Ce = _ ? _.name :
|
|
440
|
+
() => w.find((e) => e.code === l),
|
|
441
|
+
[w, l]
|
|
442
|
+
), ae = _ ? _.dialCode : "", Ce = _ ? _.name : l, q = z("inputs.phone.countryPickerLabel", "Country"), Je = `${q}: ${Ce}, +${ae}`, Qe = U(
|
|
439
443
|
(e, t, n) => {
|
|
440
|
-
const
|
|
444
|
+
const u = le(e), S = le(t), we = n == null ? void 0 : n.map(le);
|
|
441
445
|
return at(
|
|
442
|
-
|
|
446
|
+
u,
|
|
443
447
|
S,
|
|
444
448
|
we
|
|
445
449
|
);
|
|
@@ -448,7 +452,7 @@ const Et = Xe(
|
|
|
448
452
|
), xe = (e) => {
|
|
449
453
|
const t = `${e.name}, +${e.dialCode}`;
|
|
450
454
|
return /* @__PURE__ */ m(
|
|
451
|
-
|
|
455
|
+
I.Item,
|
|
452
456
|
{
|
|
453
457
|
value: e.code,
|
|
454
458
|
keywords: [e.name, e.dialCode, `+${e.dialCode}`],
|
|
@@ -456,7 +460,7 @@ const Et = Xe(
|
|
|
456
460
|
className: Nt,
|
|
457
461
|
"aria-label": t,
|
|
458
462
|
children: [
|
|
459
|
-
/* @__PURE__ */ r(
|
|
463
|
+
/* @__PURE__ */ r(ue, { country: e.code, size: ce[d] }),
|
|
460
464
|
/* @__PURE__ */ r("span", { className: "ds:flex-1 ds:truncate", children: e.name }),
|
|
461
465
|
/* @__PURE__ */ m("bdi", { dir: "ltr", className: "ds:text-muted-foreground ds:tabular-nums", children: [
|
|
462
466
|
"+",
|
|
@@ -476,6 +480,7 @@ const Et = Xe(
|
|
|
476
480
|
"data-component": "phone-input",
|
|
477
481
|
"data-component-id": L,
|
|
478
482
|
"data-slot": "phone-input",
|
|
483
|
+
"data-read-only": x ? "" : void 0,
|
|
479
484
|
className: vt({
|
|
480
485
|
size: d,
|
|
481
486
|
tone: He,
|
|
@@ -489,7 +494,7 @@ const Et = Xe(
|
|
|
489
494
|
className: `${Ie({ size: d })} ds:cursor-default ds:hover:bg-transparent`,
|
|
490
495
|
children: [
|
|
491
496
|
/* @__PURE__ */ r("span", { className: "ds:sr-only", children: `${q}: ${Ce}` }),
|
|
492
|
-
/* @__PURE__ */ r(
|
|
497
|
+
/* @__PURE__ */ r(ue, { country: l, size: ce[d] }),
|
|
493
498
|
/* @__PURE__ */ m("bdi", { dir: "ltr", className: "ds:tabular-nums", children: [
|
|
494
499
|
"+",
|
|
495
500
|
ae
|
|
@@ -501,13 +506,13 @@ const Et = Xe(
|
|
|
501
506
|
"button",
|
|
502
507
|
{
|
|
503
508
|
type: "button",
|
|
504
|
-
disabled: te || !!
|
|
509
|
+
disabled: te || !!x,
|
|
505
510
|
"aria-haspopup": "dialog",
|
|
506
511
|
"aria-expanded": X,
|
|
507
512
|
"aria-label": Je,
|
|
508
513
|
className: Ie({ size: d }),
|
|
509
514
|
children: [
|
|
510
|
-
/* @__PURE__ */ r(
|
|
515
|
+
/* @__PURE__ */ r(ue, { country: l, size: ce[d] }),
|
|
511
516
|
/* @__PURE__ */ m("bdi", { dir: "ltr", className: "ds:tabular-nums", children: [
|
|
512
517
|
"+",
|
|
513
518
|
ae
|
|
@@ -535,9 +540,9 @@ const Et = Xe(
|
|
|
535
540
|
sideOffset: 6,
|
|
536
541
|
align: "start",
|
|
537
542
|
"aria-label": q,
|
|
538
|
-
className:
|
|
543
|
+
className: bt,
|
|
539
544
|
children: /* @__PURE__ */ m(
|
|
540
|
-
|
|
545
|
+
I,
|
|
541
546
|
{
|
|
542
547
|
filter: Qe,
|
|
543
548
|
shouldFilter: !0,
|
|
@@ -545,7 +550,7 @@ const Et = Xe(
|
|
|
545
550
|
label: q,
|
|
546
551
|
children: [
|
|
547
552
|
/* @__PURE__ */ r(
|
|
548
|
-
|
|
553
|
+
I.Input,
|
|
549
554
|
{
|
|
550
555
|
asChild: !0,
|
|
551
556
|
value: De,
|
|
@@ -567,17 +572,17 @@ const Et = Xe(
|
|
|
567
572
|
)
|
|
568
573
|
}
|
|
569
574
|
),
|
|
570
|
-
/* @__PURE__ */ m(
|
|
571
|
-
/* @__PURE__ */ r(
|
|
575
|
+
/* @__PURE__ */ m(I.List, { className: xt, children: [
|
|
576
|
+
/* @__PURE__ */ r(I.Empty, { className: wt, children: z("inputs.phone.noCountryFound", "No country found") }),
|
|
572
577
|
F.length > 0 ? /* @__PURE__ */ r(
|
|
573
|
-
|
|
578
|
+
I.Group,
|
|
574
579
|
{
|
|
575
580
|
heading: /* @__PURE__ */ r("span", { className: ze, children: z("inputs.phone.popularCountries", "Popular") }),
|
|
576
581
|
children: F.map(xe)
|
|
577
582
|
}
|
|
578
583
|
) : null,
|
|
579
584
|
/* @__PURE__ */ r(
|
|
580
|
-
|
|
585
|
+
I.Group,
|
|
581
586
|
{
|
|
582
587
|
heading: F.length > 0 ? /* @__PURE__ */ r("span", { className: ze, children: z("inputs.phone.allCountries", "All countries") }) : void 0,
|
|
583
588
|
children: Ze.map(xe)
|
|
@@ -601,13 +606,13 @@ const Et = Xe(
|
|
|
601
606
|
autoComplete: "tel-national",
|
|
602
607
|
placeholder: Me,
|
|
603
608
|
disabled: te,
|
|
604
|
-
readOnly:
|
|
609
|
+
readOnly: x,
|
|
605
610
|
required: $e,
|
|
606
611
|
"aria-label": Fe,
|
|
607
612
|
"aria-describedby": Ke,
|
|
608
613
|
"aria-invalid": ve || void 0,
|
|
609
614
|
onChange: Ue,
|
|
610
|
-
className:
|
|
615
|
+
className: yt({ size: d })
|
|
611
616
|
}
|
|
612
617
|
),
|
|
613
618
|
oe ? /* @__PURE__ */ r(
|
|
@@ -627,8 +632,8 @@ const Et = Xe(
|
|
|
627
632
|
Et.displayName = "PhoneInput";
|
|
628
633
|
export {
|
|
629
634
|
Et as P,
|
|
630
|
-
|
|
635
|
+
yt as a,
|
|
631
636
|
Ie as c,
|
|
632
637
|
vt as p
|
|
633
638
|
};
|
|
634
|
-
//# sourceMappingURL=phone-input-
|
|
639
|
+
//# sourceMappingURL=phone-input-C3NrD-nl.js.map
|