@alfadocs/ui-kit-debug 1.74.0 → 1.75.1

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 (56) hide show
  1. package/dist/_chunks/booking-D2r19Lia.js +3901 -0
  2. package/dist/_chunks/booking-D2r19Lia.js.map +1 -0
  3. package/dist/_chunks/{calendar-appointment-editor-dialog-CctI6mpd.js → calendar-appointment-editor-dialog-B4My4eiB.js} +2 -2
  4. package/dist/_chunks/{calendar-appointment-editor-dialog-CctI6mpd.js.map → calendar-appointment-editor-dialog-B4My4eiB.js.map} +1 -1
  5. package/dist/_chunks/{header-settings-DBlTL6Qj.js → header-settings-Coh1r41O.js} +148 -154
  6. package/dist/_chunks/header-settings-Coh1r41O.js.map +1 -0
  7. package/dist/_chunks/{locale-picker-KT-Vz3bx.js → locale-picker-DzdGDSBI.js} +311 -282
  8. package/dist/_chunks/locale-picker-DzdGDSBI.js.map +1 -0
  9. package/dist/_chunks/{marketplace-app-shell-B0ix9yNI.js → marketplace-app-shell-Ck5NVJcO.js} +2 -2
  10. package/dist/_chunks/{marketplace-app-shell-B0ix9yNI.js.map → marketplace-app-shell-Ck5NVJcO.js.map} +1 -1
  11. package/dist/_chunks/{patient-details-Dgd_tocD.js → patient-details-B-I9Xkh9.js} +2 -2
  12. package/dist/_chunks/{patient-details-Dgd_tocD.js.map → patient-details-B-I9Xkh9.js.map} +1 -1
  13. package/dist/_chunks/{patient-field-row-BFVlJnS9.js → patient-field-row-Bn0z6lAZ.js} +2 -2
  14. package/dist/_chunks/{patient-field-row-BFVlJnS9.js.map → patient-field-row-Bn0z6lAZ.js.map} +1 -1
  15. package/dist/_chunks/{patient-summary-card-BTKvFUmh.js → patient-summary-card-bhDo0gVX.js} +2 -2
  16. package/dist/_chunks/{patient-summary-card-BTKvFUmh.js.map → patient-summary-card-bhDo0gVX.js.map} +1 -1
  17. package/dist/_chunks/{phone-input-EwVuqFik.js → phone-input-C3NrD-nl.js} +78 -73
  18. package/dist/_chunks/phone-input-C3NrD-nl.js.map +1 -0
  19. package/dist/_chunks/{registration-form-B6qqeXP1.js → registration-form-DeK2QiJu.js} +2 -2
  20. package/dist/_chunks/{registration-form-B6qqeXP1.js.map → registration-form-DeK2QiJu.js.map} +1 -1
  21. package/dist/_chunks/{send-registration-link-form-pO2bGjGa.js → send-registration-link-form-__DWY62q.js} +2 -2
  22. package/dist/_chunks/{send-registration-link-form-pO2bGjGa.js.map → send-registration-link-form-__DWY62q.js.map} +1 -1
  23. package/dist/_chunks/{use-appointment-details-read-BFslxbRr.js → use-appointment-details-read-lFUL4kkd.js} +2 -2
  24. package/dist/_chunks/{use-appointment-details-read-BFslxbRr.js.map → use-appointment-details-read-lFUL4kkd.js.map} +1 -1
  25. package/dist/agent-catalog.json +4 -4
  26. package/dist/agent-i18n/en.json +2 -2
  27. package/dist/components/appointment-details-panel/index.js +1 -1
  28. package/dist/components/booking/booking-types.d.ts +9 -1
  29. package/dist/components/booking/booking-types.d.ts.map +1 -1
  30. package/dist/components/booking/booking.agent.d.ts.map +1 -1
  31. package/dist/components/booking/booking.d.ts.map +1 -1
  32. package/dist/components/booking/details-form.d.ts +2 -0
  33. package/dist/components/booking/details-form.d.ts.map +1 -1
  34. package/dist/components/booking/index.js +1 -1
  35. package/dist/components/header-settings/header-settings.d.ts +6 -0
  36. package/dist/components/header-settings/header-settings.d.ts.map +1 -1
  37. package/dist/components/header-settings/index.js +1 -1
  38. package/dist/components/locale-picker/index.js +1 -1
  39. package/dist/components/locale-picker/locale-picker.d.ts +16 -4
  40. package/dist/components/locale-picker/locale-picker.d.ts.map +1 -1
  41. package/dist/components/patient-details/index.js +1 -1
  42. package/dist/components/patient-summary-card/index.js +1 -1
  43. package/dist/components/phone-input/index.js +1 -1
  44. package/dist/components/phone-input/phone-input.d.ts.map +1 -1
  45. package/dist/index.js +9 -9
  46. package/dist/patterns/calendar/index.js +1 -1
  47. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  48. package/dist/patterns/registration-form/index.js +1 -1
  49. package/dist/patterns/send-registration-link-form/index.js +1 -1
  50. package/dist/tokens.css +1 -1
  51. package/package.json +1 -1
  52. package/dist/_chunks/booking-sq9sa29d.js +0 -3889
  53. package/dist/_chunks/booking-sq9sa29d.js.map +0 -1
  54. package/dist/_chunks/header-settings-DBlTL6Qj.js.map +0 -1
  55. package/dist/_chunks/locale-picker-KT-Vz3bx.js.map +0 -1
  56. package/dist/_chunks/phone-input-EwVuqFik.js.map +0 -1
@@ -1,91 +1,91 @@
1
- import { jsx as o, jsxs as _ } from "react/jsx-runtime";
2
- import { forwardRef as P, createElement as se, useId as oe, useState as B, useCallback as I, useEffect as ae, useMemo as U, useRef as G, useImperativeHandle as te } from "react";
3
- import { c as q } from "./index-D2ZczOXr.js";
4
- import { useTranslation as T } from "react-i18next";
5
- import { _ as y, R as ne } from "./index-4xgbg-sn.js";
6
- import { I as ie } from "./icon-button-S8_weU3g.js";
1
+ import { jsx as o, jsxs as f } from "react/jsx-runtime";
2
+ import { forwardRef as F, createElement as te, useId as ne, useState as ie, useCallback as j, useEffect as re, useMemo as B, useRef as q, useImperativeHandle as le, useSyncExternalStore as ce } from "react";
3
+ import { c as W } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as O } from "react-i18next";
5
+ import { _ as y, R as de } from "./index-4xgbg-sn.js";
6
+ import { I as ue } from "./icon-button-S8_weU3g.js";
7
7
  import { P as b } from "./popover-Da1ekjV1.js";
8
- import { F as re, f as le, s as J, _ as ce, a as de, b as ue, c as ge, d as me, e as _e, g as fe, h as ve, i as pe, j as he, k as ye, l as be, m as Ne, n as Le, o as xe, p as Ce, q as Se, r as ke, t as we, u as Ee, v as Re, w as Pe, x as Ie, y as Te, z as Ae, A as De, B as je, C as Fe, D as Oe, E as Ue, G as Ge, H as ze, I as He, J as Me, K as Be, L as qe } from "./flag-view-udarpAot.js";
9
- import { b as Je } from "./menu-row-BAr8bx1I.js";
10
- import { c as Ke, a as Ve, d as We } from "./input-surface-iBmxVBfr.js";
11
- import { LOCALES_WITH_BUNDLES as A } from "../i18n/config.js";
12
- import { u as K } from "./use-locale-BExNy9Dl.js";
13
- import { u as Ye } from "./registry-DvAUVLHh.js";
14
- import { G as D } from "./globe-sHBW1JN5.js";
15
- import { M as Qe } from "./monitor-xXSrufmP.js";
16
- import { C as z } from "./check-DrFSN__t.js";
17
- const j = J(
8
+ import { F as ge, f as me, s as Y, _ as _e, a as fe, b as ve, c as pe, d as he, e as ye, g as be, h as Ne, i as Le, j as Se, k as xe, l as Ce, m as ke, n as we, o as Pe, p as Ee, q as Re, r as Ie, t as Te, u as Ae, v as De, w as Fe, x as je, y as Oe, z as Ue, A as Ge, B as ze, C as He, D as Me, E as Be, G as qe, H as Je, I as Ke, J as Ve, K as We, L as Ye } from "./flag-view-udarpAot.js";
9
+ import { b as Qe } from "./menu-row-BAr8bx1I.js";
10
+ import { c as Xe, a as $e, d as Ze } from "./input-surface-iBmxVBfr.js";
11
+ import { LOCALES_WITH_BUNDLES as U, resolveUiLanguage as es } from "../i18n/config.js";
12
+ import { u as Q } from "./use-locale-BExNy9Dl.js";
13
+ import { u as ss } from "./registry-DvAUVLHh.js";
14
+ import { G } from "./globe-sHBW1JN5.js";
15
+ import { M as os } from "./monitor-xXSrufmP.js";
16
+ import { C as J } from "./check-DrFSN__t.js";
17
+ const z = Y(
18
18
  () => /* @__PURE__ */ Object.assign({
19
- "/node_modules/country-flag-icons/3x2/AL.svg": ke,
20
- "/node_modules/country-flag-icons/3x2/CN.svg": Se,
21
- "/node_modules/country-flag-icons/3x2/DE.svg": Ce,
22
- "/node_modules/country-flag-icons/3x2/ES.svg": xe,
23
- "/node_modules/country-flag-icons/3x2/FR.svg": Le,
24
- "/node_modules/country-flag-icons/3x2/GB.svg": Ne,
25
- "/node_modules/country-flag-icons/3x2/GR.svg": be,
26
- "/node_modules/country-flag-icons/3x2/IN.svg": ye,
27
- "/node_modules/country-flag-icons/3x2/IT.svg": he,
28
- "/node_modules/country-flag-icons/3x2/JP.svg": pe,
29
- "/node_modules/country-flag-icons/3x2/NL.svg": ve,
30
- "/node_modules/country-flag-icons/3x2/PL.svg": fe,
31
- "/node_modules/country-flag-icons/3x2/PT.svg": _e,
32
- "/node_modules/country-flag-icons/3x2/RO.svg": me,
33
- "/node_modules/country-flag-icons/3x2/RU.svg": ge,
34
- "/node_modules/country-flag-icons/3x2/SA.svg": ue,
35
- "/node_modules/country-flag-icons/3x2/SE.svg": de,
36
- "/node_modules/country-flag-icons/3x2/TR.svg": ce
19
+ "/node_modules/country-flag-icons/3x2/AL.svg": Ie,
20
+ "/node_modules/country-flag-icons/3x2/CN.svg": Re,
21
+ "/node_modules/country-flag-icons/3x2/DE.svg": Ee,
22
+ "/node_modules/country-flag-icons/3x2/ES.svg": Pe,
23
+ "/node_modules/country-flag-icons/3x2/FR.svg": we,
24
+ "/node_modules/country-flag-icons/3x2/GB.svg": ke,
25
+ "/node_modules/country-flag-icons/3x2/GR.svg": Ce,
26
+ "/node_modules/country-flag-icons/3x2/IN.svg": xe,
27
+ "/node_modules/country-flag-icons/3x2/IT.svg": Se,
28
+ "/node_modules/country-flag-icons/3x2/JP.svg": Le,
29
+ "/node_modules/country-flag-icons/3x2/NL.svg": Ne,
30
+ "/node_modules/country-flag-icons/3x2/PL.svg": be,
31
+ "/node_modules/country-flag-icons/3x2/PT.svg": ye,
32
+ "/node_modules/country-flag-icons/3x2/RO.svg": he,
33
+ "/node_modules/country-flag-icons/3x2/RU.svg": pe,
34
+ "/node_modules/country-flag-icons/3x2/SA.svg": ve,
35
+ "/node_modules/country-flag-icons/3x2/SE.svg": fe,
36
+ "/node_modules/country-flag-icons/3x2/TR.svg": _e
37
37
  })
38
- ), Xe = J(
38
+ ), as = Y(
39
39
  () => /* @__PURE__ */ Object.assign({
40
- "/node_modules/country-flag-icons/1x1/AL.svg": qe,
41
- "/node_modules/country-flag-icons/1x1/CN.svg": Be,
42
- "/node_modules/country-flag-icons/1x1/DE.svg": Me,
43
- "/node_modules/country-flag-icons/1x1/ES.svg": He,
44
- "/node_modules/country-flag-icons/1x1/FR.svg": ze,
45
- "/node_modules/country-flag-icons/1x1/GB.svg": Ge,
46
- "/node_modules/country-flag-icons/1x1/GR.svg": Ue,
47
- "/node_modules/country-flag-icons/1x1/IN.svg": Oe,
48
- "/node_modules/country-flag-icons/1x1/IT.svg": Fe,
49
- "/node_modules/country-flag-icons/1x1/JP.svg": je,
50
- "/node_modules/country-flag-icons/1x1/NL.svg": De,
51
- "/node_modules/country-flag-icons/1x1/PL.svg": Ae,
52
- "/node_modules/country-flag-icons/1x1/PT.svg": Te,
53
- "/node_modules/country-flag-icons/1x1/RO.svg": Ie,
54
- "/node_modules/country-flag-icons/1x1/RU.svg": Pe,
55
- "/node_modules/country-flag-icons/1x1/SA.svg": Re,
56
- "/node_modules/country-flag-icons/1x1/SE.svg": Ee,
57
- "/node_modules/country-flag-icons/1x1/TR.svg": we
40
+ "/node_modules/country-flag-icons/1x1/AL.svg": Ye,
41
+ "/node_modules/country-flag-icons/1x1/CN.svg": We,
42
+ "/node_modules/country-flag-icons/1x1/DE.svg": Ve,
43
+ "/node_modules/country-flag-icons/1x1/ES.svg": Ke,
44
+ "/node_modules/country-flag-icons/1x1/FR.svg": Je,
45
+ "/node_modules/country-flag-icons/1x1/GB.svg": qe,
46
+ "/node_modules/country-flag-icons/1x1/GR.svg": Be,
47
+ "/node_modules/country-flag-icons/1x1/IN.svg": Me,
48
+ "/node_modules/country-flag-icons/1x1/IT.svg": He,
49
+ "/node_modules/country-flag-icons/1x1/JP.svg": ze,
50
+ "/node_modules/country-flag-icons/1x1/NL.svg": Ge,
51
+ "/node_modules/country-flag-icons/1x1/PL.svg": Ue,
52
+ "/node_modules/country-flag-icons/1x1/PT.svg": Oe,
53
+ "/node_modules/country-flag-icons/1x1/RO.svg": je,
54
+ "/node_modules/country-flag-icons/1x1/RU.svg": Fe,
55
+ "/node_modules/country-flag-icons/1x1/SA.svg": De,
56
+ "/node_modules/country-flag-icons/1x1/SE.svg": Ae,
57
+ "/node_modules/country-flag-icons/1x1/TR.svg": Te
58
58
  })
59
59
  );
60
60
  Object.freeze(
61
- Object.keys(j).sort()
61
+ Object.keys(z).sort()
62
62
  );
63
- function F(e) {
64
- return e.toUpperCase() in j;
63
+ function H(e) {
64
+ return e.toUpperCase() in z;
65
65
  }
66
- const E = P(
66
+ const R = F(
67
67
  ({
68
68
  country: e,
69
69
  label: s,
70
- shape: l = "rectangle",
71
- size: r = "sm",
72
- rounded: i = "sm",
70
+ shape: r = "rectangle",
71
+ size: t = "sm",
72
+ rounded: n = "sm",
73
73
  className: d,
74
- ...c
75
- }, n) => {
76
- const t = e.toUpperCase();
77
- return se(re, {
78
- ref: n,
79
- code: t,
80
- src: (l === "square" ? Xe : j)[t],
74
+ ...i
75
+ }, l) => {
76
+ const c = e.toUpperCase();
77
+ return te(ge, {
78
+ ref: l,
79
+ code: c,
80
+ src: (r === "square" ? as : z)[c],
81
81
  label: s,
82
- className: le({ shape: l, size: r, rounded: i }, d),
83
- ...c
82
+ className: me({ shape: r, size: t, rounded: n }, d),
83
+ ...i
84
84
  });
85
85
  }
86
86
  );
87
- E.displayName = "CoreFlag";
88
- const x = {
87
+ R.displayName = "CoreFlag";
88
+ const L = {
89
89
  en: {
90
90
  code: "en",
91
91
  nativeName: "English",
@@ -231,10 +231,10 @@ const x = {
231
231
  dir: "ltr"
232
232
  }
233
233
  };
234
- A.map((e) => x[e]);
235
- const $e = [
236
- ...A.map((e) => x[e])
237
- ].sort((e, s) => e.englishName.localeCompare(s.englishName, "en")), Ze = {
234
+ U.map((e) => L[e]);
235
+ const ts = [
236
+ ...U.map((e) => L[e])
237
+ ].sort((e, s) => e.englishName.localeCompare(s.englishName, "en")), ns = {
238
238
  id: "locale-picker",
239
239
  // Persists a single locale choice via the handle's `setLocale` → set_value.
240
240
  capabilities: ["set_value"],
@@ -248,7 +248,7 @@ const $e = [
248
248
  isSystemDefault: {
249
249
  type: "boolean",
250
250
  descriptionKey: "ui.agent.localePicker.state.isSystemDefault",
251
- description: 'True when the resolved locale came from `navigator.language` rather than an explicit user choice. Distinguishes "the user chose English" from "we are following the browser, which happens to be English" — a distinction the resolved tag alone destroys.',
251
+ description: "True when following navigator.language. False for a saved or explicit choice, or when initialLocaleFromHtmlLang used the page language. Read alongside locale to distinguish browser detection from a concrete language selection.",
252
252
  read: (e) => e.getIsSystemDefault()
253
253
  }
254
254
  },
@@ -284,12 +284,26 @@ const $e = [
284
284
  description: "Marks the LocalePicker wrapper."
285
285
  }
286
286
  }
287
- }, N = "alfadocs-ui.locale", m = "system";
288
- let H = !1;
287
+ }, P = "alfadocs-ui.locale", u = "system";
288
+ let K = !1, T;
289
+ const A = /* @__PURE__ */ new Set();
290
+ function is(e) {
291
+ return A.add(e), () => {
292
+ A.delete(e);
293
+ };
294
+ }
295
+ function rs() {
296
+ if (T !== void 0) return T;
297
+ const e = X(P);
298
+ return e === null ? u : v(e) ? e : "en";
299
+ }
300
+ function D(e) {
301
+ T = e, A.forEach((s) => s());
302
+ }
289
303
  function v(e) {
290
- return typeof e == "string" && A.includes(e);
304
+ return typeof e == "string" && U.includes(e);
291
305
  }
292
- function V(e) {
306
+ function X(e) {
293
307
  if (typeof window > "u") return null;
294
308
  try {
295
309
  return window.localStorage.getItem(e);
@@ -297,64 +311,73 @@ function V(e) {
297
311
  return null;
298
312
  }
299
313
  }
300
- function W(e, s) {
314
+ function ls(e, s) {
301
315
  if (!(typeof window > "u"))
302
316
  try {
303
317
  window.localStorage.setItem(e, s);
304
318
  } catch {
305
319
  }
306
320
  }
307
- function O() {
321
+ function M() {
308
322
  if (typeof navigator > "u") return "en";
309
323
  const e = navigator.language;
310
324
  if (!e) return "en";
311
325
  const s = e.toLowerCase().split("-")[0];
312
326
  return v(s) ? s : "en";
313
327
  }
314
- function L(e) {
328
+ function N(e) {
315
329
  if (typeof document > "u") return;
316
330
  const s = document.documentElement;
317
- s.lang = e, s.dir = x[e].dir;
331
+ s.lang = e, s.dir = L[e].dir;
318
332
  }
319
- function Y(e) {
333
+ function cs(e) {
320
334
  if (!(typeof window > "u"))
321
335
  try {
322
336
  window.localStorage.removeItem(e);
323
337
  } catch {
324
338
  }
325
339
  }
326
- function Q() {
327
- const { locale: e, setLocale: s } = K(), [l, r] = B(
328
- () => V(N) === null
329
- ), i = v(e) ? e : "en", d = I(
330
- (c) => {
331
- if (c === m) {
332
- Y(N);
333
- const n = O();
334
- s(n), L(n), r(!0);
340
+ function E(e) {
341
+ e === u ? cs(P) : ls(P, e), D(e);
342
+ }
343
+ function $(e = !1) {
344
+ const { locale: s, setLocale: r } = Q(), t = ce(
345
+ is,
346
+ rs,
347
+ () => u
348
+ ), n = v(s) ? s : "en", d = j(
349
+ (i) => {
350
+ if (i === u) {
351
+ E(u);
352
+ const l = M();
353
+ r(l), N(l);
335
354
  return;
336
355
  }
337
- v(c) && (s(c), L(c), W(N, c), r(!1));
356
+ v(i) && (r(i), N(i), E(i));
338
357
  },
339
- [s]
358
+ [r]
340
359
  );
341
- return es(), { locale: i, isSystemDefault: l, setLocale: d };
360
+ return ds(e), {
361
+ locale: n,
362
+ isSystemDefault: t === u,
363
+ setLocale: d
364
+ };
342
365
  }
343
- function es() {
344
- const { locale: e, setLocale: s } = K();
345
- ae(() => {
346
- if (H) return;
347
- H = !0;
348
- const l = V(N);
349
- if (v(l)) {
350
- l !== e && s(l), L(l);
366
+ function ds(e = !1) {
367
+ const { locale: s, setLocale: r } = Q();
368
+ re(() => {
369
+ if (K) return;
370
+ K = !0;
371
+ const t = X(P);
372
+ if (v(t)) {
373
+ t !== s && r(t), N(t), D(t);
351
374
  return;
352
375
  }
353
- const r = O();
354
- s(r), L(r);
376
+ const n = e && typeof document < "u" ? es(document.documentElement.lang.trim()) : void 0, d = v(n) ? n : void 0, i = d ?? M();
377
+ D(d ?? u), r(i), N(i);
355
378
  }, []);
356
379
  }
357
- const X = q("ds:inline-flex ds:items-center", {
380
+ const Z = W("ds:inline-flex ds:items-center", {
358
381
  variants: {
359
382
  variant: {
360
383
  icon: "",
@@ -362,7 +385,7 @@ const X = q("ds:inline-flex ds:items-center", {
362
385
  }
363
386
  },
364
387
  defaultVariants: { variant: "icon" }
365
- }), ss = [
388
+ }), us = [
366
389
  "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
367
390
  "ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-sm)]",
368
391
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
@@ -373,21 +396,21 @@ const X = q("ds:inline-flex ds:items-center", {
373
396
  "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
374
397
  "ds:disabled:opacity-50 ds:disabled:cursor-not-allowed",
375
398
  "type-body-sm"
376
- ].join(" "), $ = [
399
+ ].join(" "), ee = [
377
400
  "ds:w-[18rem] ds:rounded-[var(--radius-md)]",
378
401
  "ds:bg-background ds:text-foreground ds:border ds:border-border",
379
402
  "ds:shadow-[var(--shadow-lg)]",
380
403
  "ds:overflow-hidden"
381
- ].join(" "), M = [
404
+ ].join(" "), V = [
382
405
  "ds:relative ds:flex ds:cursor-pointer ds:select-none",
383
406
  "ds:items-center ds:gap-[var(--spacing-sm)]",
384
407
  "ds:rounded-[var(--radius-sm)]",
385
408
  "ds:min-h-[var(--min-target-size)]",
386
409
  "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
387
410
  "ds:text-foreground ds:outline-none",
388
- Je.selected,
411
+ Qe.selected,
389
412
  "ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed"
390
- ].join(" "), os = q("ds:flex ds:flex-col", {
413
+ ].join(" "), gs = W("ds:flex ds:flex-col", {
391
414
  variants: {
392
415
  loading: {
393
416
  true: "ds:opacity-60 ds:pointer-events-none",
@@ -395,53 +418,53 @@ const X = q("ds:inline-flex ds:items-center", {
395
418
  }
396
419
  },
397
420
  defaultVariants: { loading: !1 }
398
- }), R = P(
421
+ }), I = F(
399
422
  ({
400
423
  value: e,
401
424
  onValueChange: s,
402
- inputId: l,
403
- disabled: r = !1,
404
- loading: i = !1,
425
+ inputId: r,
426
+ disabled: t = !1,
427
+ loading: n = !1,
405
428
  className: d
406
- }, c) => {
407
- const { t: n } = T("ui"), t = Q(), S = t.locale, C = e ?? (t.isSystemDefault ? m : t.locale), f = oe(), k = l ?? `${f}-search`, [w, p] = B(""), h = I(
429
+ }, i) => {
430
+ const { t: l } = O("ui"), c = $(), g = c.locale, x = e ?? (c.isSystemDefault ? u : c.locale), C = ne(), p = r ?? `${C}-search`, [S, k] = ie(""), h = j(
408
431
  (a) => {
409
- if (!(r || i)) {
410
- if (a === m) {
411
- s ? s(m) : t.setLocale(m);
432
+ if (!(t || n)) {
433
+ if (a === u) {
434
+ s ? s(u) : c.setLocale(u);
412
435
  return;
413
436
  }
414
- v(a) && (s ? s(a) : t.setLocale(a));
437
+ v(a) && (s ? s(a) : c.setLocale(a));
415
438
  }
416
439
  },
417
- [r, i, s, t]
440
+ [t, n, s, c]
418
441
  );
419
442
  return /* @__PURE__ */ o(
420
443
  "div",
421
444
  {
422
- ref: c,
423
- className: [os({ loading: i }), d].filter(Boolean).join(" "),
445
+ ref: i,
446
+ className: [gs({ loading: n }), d].filter(Boolean).join(" "),
424
447
  "data-component": "locale-picker-search-list",
425
- children: /* @__PURE__ */ _(
448
+ children: /* @__PURE__ */ f(
426
449
  y,
427
450
  {
428
- label: n("navigation.localePicker.commandLabel"),
429
- filter: ne,
451
+ label: l("navigation.localePicker.commandLabel"),
452
+ filter: de,
430
453
  shouldFilter: !0,
431
454
  children: [
432
- /* @__PURE__ */ _(
455
+ /* @__PURE__ */ f(
433
456
  "div",
434
457
  {
435
458
  className: [
436
- Ke,
437
- Ve.sm,
438
- We.sm,
459
+ Xe,
460
+ $e.sm,
461
+ Ze.sm,
439
462
  "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
440
463
  "ds:m-[var(--spacing-xs)]"
441
464
  ].join(" "),
442
465
  children: [
443
466
  /* @__PURE__ */ o(
444
- D,
467
+ G,
445
468
  {
446
469
  "aria-hidden": "true",
447
470
  className: "ds:size-4 ds:text-muted-foreground ds:shrink-0"
@@ -450,12 +473,12 @@ const X = q("ds:inline-flex ds:items-center", {
450
473
  /* @__PURE__ */ o(
451
474
  y.Input,
452
475
  {
453
- id: k,
454
- value: w,
455
- onValueChange: p,
456
- placeholder: n("navigation.localePicker.searchPlaceholder"),
457
- "aria-label": n("navigation.localePicker.searchLabel"),
458
- disabled: r || i,
476
+ id: p,
477
+ value: S,
478
+ onValueChange: k,
479
+ placeholder: l("navigation.localePicker.searchPlaceholder"),
480
+ "aria-label": l("navigation.localePicker.searchLabel"),
481
+ disabled: t || n,
459
482
  className: [
460
483
  "ds:peer ds:flex-1 ds:bg-transparent ds:border-0 ds:outline-none",
461
484
  "ds:placeholder:text-muted-foreground ds:text-foreground",
@@ -466,7 +489,7 @@ const X = q("ds:inline-flex ds:items-center", {
466
489
  ]
467
490
  }
468
491
  ),
469
- /* @__PURE__ */ _(
492
+ /* @__PURE__ */ f(
470
493
  y.List,
471
494
  {
472
495
  className: [
@@ -481,68 +504,68 @@ const X = q("ds:inline-flex ds:items-center", {
481
504
  "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]",
482
505
  "type-body-sm ds:text-muted-foreground"
483
506
  ].join(" "),
484
- children: n("navigation.localePicker.empty")
507
+ children: l("navigation.localePicker.empty")
485
508
  }
486
509
  ),
487
510
  (() => {
488
- const a = C === m, u = x[S];
489
- return /* @__PURE__ */ _(
511
+ const a = x === u, m = L[g];
512
+ return /* @__PURE__ */ f(
490
513
  y.Item,
491
514
  {
492
- value: m,
515
+ value: u,
493
516
  keywords: [
494
517
  "system",
495
518
  "default",
496
519
  "auto",
497
520
  "browser",
498
- u.nativeName,
499
- u.englishName
521
+ m.nativeName,
522
+ m.englishName
500
523
  ],
501
- disabled: r || i,
524
+ disabled: t || n,
502
525
  onSelect: h,
503
- className: M,
526
+ className: V,
504
527
  "aria-selected": a || void 0,
505
528
  "data-current": a ? "true" : void 0,
506
529
  children: [
507
530
  /* @__PURE__ */ o(
508
- Qe,
531
+ os,
509
532
  {
510
533
  "aria-hidden": "true",
511
534
  className: "ds:size-4 ds:text-muted-foreground ds:shrink-0"
512
535
  }
513
536
  ),
514
- /* @__PURE__ */ o("span", { className: "ds:flex-1 ds:min-w-0 ds:truncate type-body-sm", children: n("navigation.localePicker.systemDefault", {
515
- locale: u.nativeName
537
+ /* @__PURE__ */ o("span", { className: "ds:flex-1 ds:min-w-0 ds:truncate type-body-sm", children: l("navigation.localePicker.systemDefault", {
538
+ locale: m.nativeName
516
539
  }) }),
517
540
  a ? /* @__PURE__ */ o(
518
- z,
541
+ J,
519
542
  {
520
543
  "aria-hidden": "true",
521
544
  className: "ds:size-4 ds:text-primary ds:shrink-0"
522
545
  }
523
546
  ) : null,
524
- a ? /* @__PURE__ */ o("span", { className: "ds:sr-only", children: n("navigation.localePicker.currentSelection") }) : null
547
+ a ? /* @__PURE__ */ o("span", { className: "ds:sr-only", children: l("navigation.localePicker.currentSelection") }) : null
525
548
  ]
526
549
  },
527
- m
550
+ u
528
551
  );
529
552
  })(),
530
- $e.map((a) => {
531
- const u = C === a.code;
532
- return /* @__PURE__ */ _(
553
+ ts.map((a) => {
554
+ const m = x === a.code;
555
+ return /* @__PURE__ */ f(
533
556
  y.Item,
534
557
  {
535
558
  value: a.code,
536
559
  keywords: [a.nativeName, a.englishName],
537
- disabled: r || i,
560
+ disabled: t || n,
538
561
  onSelect: h,
539
- className: M,
540
- "aria-selected": u || void 0,
541
- "data-current": u ? "true" : void 0,
562
+ className: V,
563
+ "aria-selected": m || void 0,
564
+ "data-current": m ? "true" : void 0,
542
565
  lang: a.code,
543
566
  children: [
544
- F(a.countryCode) ? /* @__PURE__ */ o(
545
- E,
567
+ H(a.countryCode) ? /* @__PURE__ */ o(
568
+ R,
546
569
  {
547
570
  country: a.countryCode,
548
571
  size: "sm",
@@ -567,14 +590,14 @@ const X = q("ds:inline-flex ds:items-center", {
567
590
  )
568
591
  ),
569
592
  /* @__PURE__ */ o("span", { className: "ds:flex-1 ds:min-w-0 ds:truncate type-body-sm", children: a.nativeName }),
570
- u ? /* @__PURE__ */ o(
571
- z,
593
+ m ? /* @__PURE__ */ o(
594
+ J,
572
595
  {
573
596
  "aria-hidden": "true",
574
597
  className: "ds:size-4 ds:text-primary ds:shrink-0"
575
598
  }
576
599
  ) : null,
577
- u ? /* @__PURE__ */ o("span", { className: "ds:sr-only", children: n("navigation.localePicker.currentSelection") }) : null
600
+ m ? /* @__PURE__ */ o("span", { className: "ds:sr-only", children: l("navigation.localePicker.currentSelection") }) : null
578
601
  ]
579
602
  },
580
603
  a.code
@@ -590,36 +613,37 @@ const X = q("ds:inline-flex ds:items-center", {
590
613
  );
591
614
  }
592
615
  );
593
- R.displayName = "LocalePicker.SearchList";
594
- function as({
616
+ I.displayName = "LocalePicker.SearchList";
617
+ function ms({
595
618
  state: e,
596
- rest: s,
597
- forwardedRef: l,
598
- className: r,
599
- disabled: i,
600
- loading: d,
601
- popoverSide: c
619
+ selection: s,
620
+ rest: r,
621
+ forwardedRef: t,
622
+ className: n,
623
+ disabled: d,
624
+ loading: i,
625
+ popoverSide: l
602
626
  }) {
603
- const { t: n } = T("ui"), t = x[e.locale];
627
+ const { t: c } = O("ui"), g = L[e.locale];
604
628
  return /* @__PURE__ */ o(
605
629
  "div",
606
630
  {
607
- ref: l,
631
+ ref: t,
608
632
  "data-component": "locale-picker",
609
- "data-component-id": s.id,
610
- className: X({ variant: "icon", className: r }),
611
- ...s,
612
- children: /* @__PURE__ */ _(b.Root, { children: [
633
+ "data-component-id": r.id,
634
+ className: Z({ variant: "icon", className: n }),
635
+ ...r,
636
+ children: /* @__PURE__ */ f(b.Root, { children: [
613
637
  /* @__PURE__ */ o(b.Trigger, { asChild: !0, children: /* @__PURE__ */ o(
614
- ie,
638
+ ue,
615
639
  {
616
- disabled: i || d,
617
- icon: /* @__PURE__ */ _("span", { className: "ds:relative ds:inline-flex ds:items-center ds:justify-center", children: [
618
- /* @__PURE__ */ o(D, { "aria-hidden": !0, className: "ds:size-5" }),
619
- F(t.countryCode) ? /* @__PURE__ */ o(
620
- E,
640
+ disabled: d || i,
641
+ icon: /* @__PURE__ */ f("span", { className: "ds:relative ds:inline-flex ds:items-center ds:justify-center", children: [
642
+ /* @__PURE__ */ o(G, { "aria-hidden": !0, className: "ds:size-5" }),
643
+ H(g.countryCode) ? /* @__PURE__ */ o(
644
+ R,
621
645
  {
622
- country: t.countryCode,
646
+ country: g.countryCode,
623
647
  size: "sm",
624
648
  shape: "rectangle",
625
649
  rounded: "sm",
@@ -637,26 +661,26 @@ function as({
637
661
  }
638
662
  ) : null
639
663
  ] }),
640
- "aria-label": n("navigation.localePicker.trigger", {
641
- locale: t.nativeName
664
+ "aria-label": c("navigation.localePicker.trigger", {
665
+ locale: g.nativeName
642
666
  })
643
667
  }
644
668
  ) }),
645
669
  /* @__PURE__ */ o(
646
670
  b.Content,
647
671
  {
648
- side: c,
672
+ side: l,
649
673
  align: "start",
650
674
  sideOffset: 8,
651
- className: $,
652
- "aria-label": n("navigation.localePicker.popupLabel"),
675
+ className: ee,
676
+ "aria-label": c("navigation.localePicker.popupLabel"),
653
677
  children: /* @__PURE__ */ o(
654
- R,
678
+ I,
655
679
  {
656
- value: e.locale,
680
+ value: s,
657
681
  onValueChange: e.setLocale,
658
- disabled: i,
659
- loading: d
682
+ disabled: d,
683
+ loading: i
660
684
  }
661
685
  )
662
686
  }
@@ -665,51 +689,52 @@ function as({
665
689
  }
666
690
  );
667
691
  }
668
- function ts({
692
+ function _s({
669
693
  state: e,
670
- rest: s,
671
- forwardedRef: l,
672
- className: r,
673
- disabled: i,
674
- loading: d,
675
- popoverSide: c
694
+ selection: s,
695
+ rest: r,
696
+ forwardedRef: t,
697
+ className: n,
698
+ disabled: d,
699
+ loading: i,
700
+ popoverSide: l
676
701
  }) {
677
- const { t: n } = T("ui"), t = x[e.locale];
702
+ const { t: c } = O("ui"), g = L[e.locale];
678
703
  return /* @__PURE__ */ o(
679
704
  "div",
680
705
  {
681
- ref: l,
706
+ ref: t,
682
707
  "data-component": "locale-picker",
683
- "data-component-id": s.id,
684
- className: X({ variant: "compact", className: r }),
685
- ...s,
686
- children: /* @__PURE__ */ _(b.Root, { children: [
687
- /* @__PURE__ */ o(b.Trigger, { asChild: !0, children: /* @__PURE__ */ _(
708
+ "data-component-id": r.id,
709
+ className: Z({ variant: "compact", className: n }),
710
+ ...r,
711
+ children: /* @__PURE__ */ f(b.Root, { children: [
712
+ /* @__PURE__ */ o(b.Trigger, { asChild: !0, children: /* @__PURE__ */ f(
688
713
  "button",
689
714
  {
690
715
  type: "button",
691
- disabled: i || d,
692
- className: ss,
693
- "aria-label": n("navigation.localePicker.trigger", {
694
- locale: t.nativeName
716
+ disabled: d || i,
717
+ className: us,
718
+ "aria-label": c("navigation.localePicker.trigger", {
719
+ locale: g.nativeName
695
720
  }),
696
721
  children: [
697
- F(t.countryCode) ? /* @__PURE__ */ o(
698
- E,
722
+ H(g.countryCode) ? /* @__PURE__ */ o(
723
+ R,
699
724
  {
700
- country: t.countryCode,
725
+ country: g.countryCode,
701
726
  size: "sm",
702
727
  shape: "rectangle",
703
728
  rounded: "sm",
704
729
  className: "ds:shrink-0"
705
730
  }
706
- ) : /* @__PURE__ */ o(D, { "aria-hidden": !0, className: "ds:size-4 ds:shrink-0" }),
731
+ ) : /* @__PURE__ */ o(G, { "aria-hidden": !0, className: "ds:size-4 ds:shrink-0" }),
707
732
  /* @__PURE__ */ o(
708
733
  "span",
709
734
  {
710
735
  className: "ds:flex-1 ds:truncate type-body-sm",
711
- lang: t.code,
712
- children: t.nativeName
736
+ lang: g.code,
737
+ children: g.nativeName
713
738
  }
714
739
  )
715
740
  ]
@@ -718,18 +743,18 @@ function ts({
718
743
  /* @__PURE__ */ o(
719
744
  b.Content,
720
745
  {
721
- side: c,
746
+ side: l,
722
747
  align: "start",
723
748
  sideOffset: 8,
724
- className: $,
725
- "aria-label": n("navigation.localePicker.popupLabel"),
749
+ className: ee,
750
+ "aria-label": c("navigation.localePicker.popupLabel"),
726
751
  children: /* @__PURE__ */ o(
727
- R,
752
+ I,
728
753
  {
729
- value: e.locale,
754
+ value: s,
730
755
  onValueChange: e.setLocale,
731
- disabled: i,
732
- loading: d
756
+ disabled: d,
757
+ loading: i
733
758
  }
734
759
  )
735
760
  }
@@ -738,89 +763,93 @@ function ts({
738
763
  }
739
764
  );
740
765
  }
741
- const Z = P(
766
+ const se = F(
742
767
  (e, s) => {
743
768
  const {
744
- variant: l = "icon",
745
- value: r,
746
- onValueChange: i,
769
+ variant: r = "icon",
770
+ value: t,
771
+ onValueChange: n,
747
772
  disabled: d = !1,
748
- loading: c = !1,
749
- popoverSide: n = "bottom",
750
- className: t,
751
- id: S,
773
+ loading: i = !1,
774
+ initialLocaleFromHtmlLang: l = !1,
775
+ popoverSide: c = "bottom",
776
+ className: g,
777
+ id: x,
752
778
  ...C
753
- } = e, f = Q(), k = r ?? f.locale, w = I(
754
- (g) => {
755
- if (i) {
756
- if (i(g), g === m) {
757
- Y(N);
758
- const ee = O();
759
- L(ee);
760
- } else v(g) && (L(g), W(N, g));
779
+ } = e, p = $(l), S = t ?? p.locale, k = j(
780
+ (_) => {
781
+ if (n) {
782
+ if (n(_), _ === u) {
783
+ E(u);
784
+ const ae = M();
785
+ N(ae);
786
+ } else v(_) && (N(_), E(_));
761
787
  return;
762
788
  }
763
- f.setLocale(g);
789
+ p.setLocale(_);
764
790
  },
765
- [i, f]
766
- ), p = U(
791
+ [n, p]
792
+ ), h = B(
767
793
  () => ({
768
- locale: k,
769
- isSystemDefault: f.isSystemDefault,
770
- setLocale: w
794
+ locale: S,
795
+ isSystemDefault: p.isSystemDefault,
796
+ setLocale: k
771
797
  }),
772
- [k, f.isSystemDefault, w]
773
- ), h = G(null);
774
- te(s, () => h.current, []);
775
- const a = G(p);
776
- a.current = p;
777
- const u = U(
798
+ [S, p.isSystemDefault, k]
799
+ ), a = l && t === void 0 && p.isSystemDefault ? u : S, m = q(null);
800
+ le(s, () => m.current, []);
801
+ const w = q(h);
802
+ w.current = h;
803
+ const oe = B(
778
804
  () => ({
779
- setLocale: (g) => {
780
- v(g) && a.current.setLocale(g);
805
+ setLocale: (_) => {
806
+ v(_) && w.current.setLocale(_);
781
807
  },
782
808
  // Read-back for `set_locale` — the setter swallows unsupported
783
809
  // tags, so these are the only way an agent can tell a switch
784
810
  // landed from one that was dropped.
785
- getLocale: () => a.current.locale,
786
- getIsSystemDefault: () => a.current.isSystemDefault
811
+ getLocale: () => w.current.locale,
812
+ getIsSystemDefault: () => w.current.isSystemDefault
787
813
  }),
788
814
  []
789
815
  );
790
- return Ye(Ze, u, S), l === "compact" ? /* @__PURE__ */ o(
791
- ts,
816
+ return ss(ns, oe, x), r === "compact" ? /* @__PURE__ */ o(
817
+ _s,
792
818
  {
793
- state: p,
819
+ state: h,
820
+ selection: a,
794
821
  rest: C,
795
- forwardedRef: h,
796
- className: t,
822
+ forwardedRef: m,
823
+ className: g,
797
824
  disabled: d,
798
- loading: c,
799
- popoverSide: n
825
+ loading: i,
826
+ popoverSide: c
800
827
  }
801
828
  ) : /* @__PURE__ */ o(
802
- as,
829
+ ms,
803
830
  {
804
- state: p,
831
+ state: h,
832
+ selection: a,
805
833
  rest: C,
806
- forwardedRef: h,
807
- className: t,
834
+ forwardedRef: m,
835
+ className: g,
808
836
  disabled: d,
809
- loading: c,
810
- popoverSide: n
837
+ loading: i,
838
+ popoverSide: c
811
839
  }
812
840
  );
813
841
  }
814
842
  );
815
- Z.displayName = "LocalePicker";
816
- const Ns = Object.assign(Z, {
817
- SearchList: R
843
+ se.displayName = "LocalePicker";
844
+ const Is = Object.assign(se, {
845
+ SearchList: I
818
846
  });
819
847
  export {
820
- N as L,
821
- Ns as a,
822
- R as b,
823
- x as c,
824
- es as u
848
+ P as L,
849
+ Is as a,
850
+ I as b,
851
+ L as c,
852
+ E as p,
853
+ ds as u
825
854
  };
826
- //# sourceMappingURL=locale-picker-KT-Vz3bx.js.map
855
+ //# sourceMappingURL=locale-picker-DzdGDSBI.js.map