@alfadocs/ui-kit-debug 1.88.1 → 1.89.0

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