@alfadocs/ui-kit-debug 0.98.0 → 0.99.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/README.md +11 -4
- package/dist/_chunks/{address-fields-7k59FnJ6.js → address-fields-pHsfkXGk.js} +2 -2
- package/dist/_chunks/{address-fields-7k59FnJ6.js.map → address-fields-pHsfkXGk.js.map} +1 -1
- package/dist/_chunks/{booking-BSpSMmJ2.js → booking-DSOK-bnR.js} +3 -3
- package/dist/_chunks/{booking-BSpSMmJ2.js.map → booking-DSOK-bnR.js.map} +1 -1
- package/dist/_chunks/{country-select-BN9nedAp.js → country-select-UEF9BEeQ.js} +2 -2
- package/dist/_chunks/{country-select-BN9nedAp.js.map → country-select-UEF9BEeQ.js.map} +1 -1
- package/dist/_chunks/flag-DVBE6DnB.js +576 -0
- package/dist/_chunks/flag-DVBE6DnB.js.map +1 -0
- package/dist/_chunks/flag-view-udarpAot.js +131 -0
- package/dist/_chunks/flag-view-udarpAot.js.map +1 -0
- package/dist/_chunks/{header-settings-CLwFqMHI.js → header-settings--pjYOe6g.js} +2 -2
- package/dist/_chunks/{header-settings-CLwFqMHI.js.map → header-settings--pjYOe6g.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-flfZh2qY.js → link-cell-renderer-Bt-mXeQY.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-flfZh2qY.js.map → link-cell-renderer-Bt-mXeQY.js.map} +1 -1
- package/dist/_chunks/{locale-picker-EyvPrwDc.js → locale-picker-BfBUdT1m.js} +310 -239
- package/dist/_chunks/locale-picker-BfBUdT1m.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-Bv1ZO4XO.js → marketplace-app-shell-pCHBp8bo.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-Bv1ZO4XO.js.map → marketplace-app-shell-pCHBp8bo.js.map} +1 -1
- package/dist/_chunks/{multi-select-D5QLBJM1.js → multi-select-CC52Qws6.js} +275 -263
- package/dist/_chunks/multi-select-CC52Qws6.js.map +1 -0
- package/dist/_chunks/{patient-details-DrhlTrLf.js → patient-details-UmNcxL0c.js} +3 -3
- package/dist/_chunks/{patient-details-DrhlTrLf.js.map → patient-details-UmNcxL0c.js.map} +1 -1
- package/dist/_chunks/{patient-table-CvZTIM2R.js → patient-table-QEVsFvwq.js} +2 -2
- package/dist/_chunks/{patient-table-CvZTIM2R.js.map → patient-table-QEVsFvwq.js.map} +1 -1
- package/dist/_chunks/{phone-input-D00ZBAm-.js → phone-input-BsZIoE36.js} +2 -2
- package/dist/_chunks/{phone-input-D00ZBAm-.js.map → phone-input-BsZIoE36.js.map} +1 -1
- package/dist/_chunks/{public-header.agent-rX_VA6hd.js → public-header.agent-_8W9biCO.js} +4 -2
- package/dist/_chunks/public-header.agent-_8W9biCO.js.map +1 -0
- package/dist/_chunks/use-theme-CAuo6EYT.js.map +1 -1
- package/dist/_chunks/workflow-map-SIfAhmWz.js.map +1 -1
- package/dist/agent-catalog.json +291 -1
- package/dist/agent-i18n/en.json +23 -0
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/flag/flag-core.d.ts +12 -0
- package/dist/components/flag/flag-core.d.ts.map +1 -0
- package/dist/components/flag/flag-view.d.ts +38 -0
- package/dist/components/flag/flag-view.d.ts.map +1 -0
- package/dist/components/flag/flag.d.ts +3 -10
- package/dist/components/flag/flag.d.ts.map +1 -1
- package/dist/components/flag/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/multi-select/multi-select.d.ts.map +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts.map +1 -1
- package/dist/components/workflow/workflow-types.d.ts +4 -5
- package/dist/components/workflow/workflow-types.d.ts.map +1 -1
- package/dist/hooks/use-theme.d.ts.map +1 -1
- package/dist/host-compat.css +7 -1
- package/dist/index.js +11 -11
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/flag-Cnmivlrl.js +0 -641
- package/dist/_chunks/flag-Cnmivlrl.js.map +0 -1
- package/dist/_chunks/locale-picker-EyvPrwDc.js.map +0 -1
- package/dist/_chunks/multi-select-D5QLBJM1.js.map +0 -1
- package/dist/_chunks/public-header.agent-rX_VA6hd.js.map +0 -1
|
@@ -1,19 +1,90 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { _ as y, R as
|
|
6
|
-
import { I as
|
|
7
|
-
import { P as
|
|
8
|
-
import { h as A,
|
|
9
|
-
import { c as
|
|
1
|
+
import { jsx as a, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as I, createElement as Z, useId as ee, useState as B, useCallback as T, useMemo as D, useRef as U, useImperativeHandle as se, useEffect as ae } from "react";
|
|
3
|
+
import { c as q } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as A } from "react-i18next";
|
|
5
|
+
import { _ as y, R as oe } from "./index-4xgbg-sn.js";
|
|
6
|
+
import { I as te } from "./icon-button-C_kbcd7I.js";
|
|
7
|
+
import { P as x } from "./popover-Cc0a69sw.js";
|
|
8
|
+
import { F as ne, f as ie, s as J, _ as re, a as le, b as de, c as ce, d as ue, e as ge, g as me, h as _e, i as fe, j as ve, k as pe, l as he, m as ye, n as be, o as Ne, p as xe, q as Le, r as Ce, t as Se, u as ke, v as Pe, w as Ee, x as Re, y as we, z as Ie, A as Te, B as Ae, C as je, D as Fe, E as Oe, G as ze, H as De, I as Ue, J as Ge, K as Me, L as He } from "./flag-view-udarpAot.js";
|
|
9
|
+
import { c as Be, a as qe, d as Je } from "./input-surface-xyERuLU_.js";
|
|
10
10
|
import { LOCALES_WITH_BUNDLES as j } from "../i18n/config.js";
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { G as
|
|
14
|
-
import { M as
|
|
15
|
-
import { C as
|
|
16
|
-
const
|
|
11
|
+
import { u as Ve } from "./use-locale-BkCIHujH.js";
|
|
12
|
+
import { u as Ke } from "./registry-DvAUVLHh.js";
|
|
13
|
+
import { G as F } from "./globe-sHBW1JN5.js";
|
|
14
|
+
import { M as We } from "./monitor-xXSrufmP.js";
|
|
15
|
+
import { C as G } from "./check-DrFSN__t.js";
|
|
16
|
+
const O = J(
|
|
17
|
+
() => /* @__PURE__ */ Object.assign({
|
|
18
|
+
"/node_modules/country-flag-icons/3x2/AL.svg": Ce,
|
|
19
|
+
"/node_modules/country-flag-icons/3x2/CN.svg": Le,
|
|
20
|
+
"/node_modules/country-flag-icons/3x2/DE.svg": xe,
|
|
21
|
+
"/node_modules/country-flag-icons/3x2/ES.svg": Ne,
|
|
22
|
+
"/node_modules/country-flag-icons/3x2/FR.svg": be,
|
|
23
|
+
"/node_modules/country-flag-icons/3x2/GB.svg": ye,
|
|
24
|
+
"/node_modules/country-flag-icons/3x2/GR.svg": he,
|
|
25
|
+
"/node_modules/country-flag-icons/3x2/IN.svg": pe,
|
|
26
|
+
"/node_modules/country-flag-icons/3x2/IT.svg": ve,
|
|
27
|
+
"/node_modules/country-flag-icons/3x2/JP.svg": fe,
|
|
28
|
+
"/node_modules/country-flag-icons/3x2/NL.svg": _e,
|
|
29
|
+
"/node_modules/country-flag-icons/3x2/PL.svg": me,
|
|
30
|
+
"/node_modules/country-flag-icons/3x2/PT.svg": ge,
|
|
31
|
+
"/node_modules/country-flag-icons/3x2/RO.svg": ue,
|
|
32
|
+
"/node_modules/country-flag-icons/3x2/RU.svg": ce,
|
|
33
|
+
"/node_modules/country-flag-icons/3x2/SA.svg": de,
|
|
34
|
+
"/node_modules/country-flag-icons/3x2/SE.svg": le,
|
|
35
|
+
"/node_modules/country-flag-icons/3x2/TR.svg": re
|
|
36
|
+
})
|
|
37
|
+
), Ye = J(
|
|
38
|
+
() => /* @__PURE__ */ Object.assign({
|
|
39
|
+
"/node_modules/country-flag-icons/1x1/AL.svg": He,
|
|
40
|
+
"/node_modules/country-flag-icons/1x1/CN.svg": Me,
|
|
41
|
+
"/node_modules/country-flag-icons/1x1/DE.svg": Ge,
|
|
42
|
+
"/node_modules/country-flag-icons/1x1/ES.svg": Ue,
|
|
43
|
+
"/node_modules/country-flag-icons/1x1/FR.svg": De,
|
|
44
|
+
"/node_modules/country-flag-icons/1x1/GB.svg": ze,
|
|
45
|
+
"/node_modules/country-flag-icons/1x1/GR.svg": Oe,
|
|
46
|
+
"/node_modules/country-flag-icons/1x1/IN.svg": Fe,
|
|
47
|
+
"/node_modules/country-flag-icons/1x1/IT.svg": je,
|
|
48
|
+
"/node_modules/country-flag-icons/1x1/JP.svg": Ae,
|
|
49
|
+
"/node_modules/country-flag-icons/1x1/NL.svg": Te,
|
|
50
|
+
"/node_modules/country-flag-icons/1x1/PL.svg": Ie,
|
|
51
|
+
"/node_modules/country-flag-icons/1x1/PT.svg": we,
|
|
52
|
+
"/node_modules/country-flag-icons/1x1/RO.svg": Re,
|
|
53
|
+
"/node_modules/country-flag-icons/1x1/RU.svg": Ee,
|
|
54
|
+
"/node_modules/country-flag-icons/1x1/SA.svg": Pe,
|
|
55
|
+
"/node_modules/country-flag-icons/1x1/SE.svg": ke,
|
|
56
|
+
"/node_modules/country-flag-icons/1x1/TR.svg": Se
|
|
57
|
+
})
|
|
58
|
+
);
|
|
59
|
+
Object.freeze(
|
|
60
|
+
Object.keys(O).sort()
|
|
61
|
+
);
|
|
62
|
+
function z(e) {
|
|
63
|
+
return e.toUpperCase() in O;
|
|
64
|
+
}
|
|
65
|
+
const E = I(
|
|
66
|
+
({
|
|
67
|
+
country: e,
|
|
68
|
+
label: s,
|
|
69
|
+
shape: c = "rectangle",
|
|
70
|
+
size: l = "sm",
|
|
71
|
+
rounded: r = "sm",
|
|
72
|
+
className: d,
|
|
73
|
+
...i
|
|
74
|
+
}, o) => {
|
|
75
|
+
const n = e.toUpperCase();
|
|
76
|
+
return Z(ne, {
|
|
77
|
+
ref: o,
|
|
78
|
+
code: n,
|
|
79
|
+
src: (c === "square" ? Ye : O)[n],
|
|
80
|
+
label: s,
|
|
81
|
+
className: ie({ shape: c, size: l, rounded: r }, d),
|
|
82
|
+
...i
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
E.displayName = "CoreFlag";
|
|
87
|
+
const L = {
|
|
17
88
|
en: {
|
|
18
89
|
code: "en",
|
|
19
90
|
nativeName: "English",
|
|
@@ -159,10 +230,10 @@ const k = {
|
|
|
159
230
|
dir: "ltr"
|
|
160
231
|
}
|
|
161
232
|
};
|
|
162
|
-
j.map((e) =>
|
|
163
|
-
const
|
|
164
|
-
...j.map((e) =>
|
|
165
|
-
].sort((e,
|
|
233
|
+
j.map((e) => L[e]);
|
|
234
|
+
const Qe = [
|
|
235
|
+
...j.map((e) => L[e])
|
|
236
|
+
].sort((e, s) => e.englishName.localeCompare(s.englishName, "en")), Xe = {
|
|
166
237
|
id: "locale-picker",
|
|
167
238
|
// Persists a single locale choice via the handle's `setLocale` → set_value.
|
|
168
239
|
capabilities: ["set_value"],
|
|
@@ -184,8 +255,8 @@ const de = [
|
|
|
184
255
|
idempotent: !0,
|
|
185
256
|
descriptionKey: "ui.agent.localePicker.actions.setLocale",
|
|
186
257
|
description: "Switch the active locale to the given IETF tag.",
|
|
187
|
-
invoke: (e,
|
|
188
|
-
e.setLocale(
|
|
258
|
+
invoke: (e, s) => {
|
|
259
|
+
e.setLocale(s.locale);
|
|
189
260
|
}
|
|
190
261
|
}
|
|
191
262
|
},
|
|
@@ -196,12 +267,12 @@ const de = [
|
|
|
196
267
|
description: "Marks the LocalePicker wrapper."
|
|
197
268
|
}
|
|
198
269
|
}
|
|
199
|
-
}, b = "alfadocs-ui.locale",
|
|
200
|
-
let
|
|
201
|
-
function
|
|
270
|
+
}, b = "alfadocs-ui.locale", m = "system";
|
|
271
|
+
let M = !1;
|
|
272
|
+
function v(e) {
|
|
202
273
|
return typeof e == "string" && j.includes(e);
|
|
203
274
|
}
|
|
204
|
-
function
|
|
275
|
+
function H(e) {
|
|
205
276
|
if (typeof window > "u") return null;
|
|
206
277
|
try {
|
|
207
278
|
return window.localStorage.getItem(e);
|
|
@@ -209,60 +280,60 @@ function G(e) {
|
|
|
209
280
|
return null;
|
|
210
281
|
}
|
|
211
282
|
}
|
|
212
|
-
function
|
|
283
|
+
function V(e, s) {
|
|
213
284
|
if (!(typeof window > "u"))
|
|
214
285
|
try {
|
|
215
|
-
window.localStorage.setItem(e,
|
|
286
|
+
window.localStorage.setItem(e, s);
|
|
216
287
|
} catch {
|
|
217
288
|
}
|
|
218
289
|
}
|
|
219
|
-
function
|
|
290
|
+
function w() {
|
|
220
291
|
if (typeof navigator > "u") return "en";
|
|
221
292
|
const e = navigator.language;
|
|
222
293
|
if (!e) return "en";
|
|
223
|
-
const
|
|
224
|
-
return
|
|
294
|
+
const s = e.toLowerCase().split("-")[0];
|
|
295
|
+
return v(s) ? s : "en";
|
|
225
296
|
}
|
|
226
|
-
function
|
|
297
|
+
function N(e) {
|
|
227
298
|
if (typeof document > "u") return;
|
|
228
|
-
const
|
|
229
|
-
|
|
299
|
+
const s = document.documentElement;
|
|
300
|
+
s.lang = e, s.dir = L[e].dir;
|
|
230
301
|
}
|
|
231
|
-
function
|
|
302
|
+
function K(e) {
|
|
232
303
|
if (!(typeof window > "u"))
|
|
233
304
|
try {
|
|
234
305
|
window.localStorage.removeItem(e);
|
|
235
306
|
} catch {
|
|
236
307
|
}
|
|
237
308
|
}
|
|
238
|
-
function
|
|
239
|
-
const { locale: e, setLocale:
|
|
240
|
-
() =>
|
|
241
|
-
),
|
|
242
|
-
(
|
|
243
|
-
if (
|
|
244
|
-
|
|
245
|
-
const
|
|
246
|
-
|
|
309
|
+
function W() {
|
|
310
|
+
const { locale: e, setLocale: s } = Ve(), [c, l] = B(
|
|
311
|
+
() => H(b) === null
|
|
312
|
+
), r = v(e) ? e : "en", d = T(
|
|
313
|
+
(i) => {
|
|
314
|
+
if (i === m) {
|
|
315
|
+
K(b);
|
|
316
|
+
const o = w();
|
|
317
|
+
s(o), N(o), l(!0);
|
|
247
318
|
return;
|
|
248
319
|
}
|
|
249
|
-
|
|
320
|
+
v(i) && (s(i), N(i), V(b, i), l(!1));
|
|
250
321
|
},
|
|
251
|
-
[
|
|
322
|
+
[s]
|
|
252
323
|
);
|
|
253
|
-
return
|
|
254
|
-
if (
|
|
255
|
-
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
258
|
-
|
|
324
|
+
return ae(() => {
|
|
325
|
+
if (M) return;
|
|
326
|
+
M = !0;
|
|
327
|
+
const i = H(b);
|
|
328
|
+
if (v(i)) {
|
|
329
|
+
i !== e && s(i), N(i);
|
|
259
330
|
return;
|
|
260
331
|
}
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
}, []), { locale:
|
|
332
|
+
const o = w();
|
|
333
|
+
s(o), N(o);
|
|
334
|
+
}, []), { locale: r, isSystemDefault: c, setLocale: d };
|
|
264
335
|
}
|
|
265
|
-
const
|
|
336
|
+
const Y = q("ds:inline-flex ds:items-center", {
|
|
266
337
|
variants: {
|
|
267
338
|
variant: {
|
|
268
339
|
icon: "",
|
|
@@ -270,7 +341,7 @@ const K = B("ds:inline-flex ds:items-center", {
|
|
|
270
341
|
}
|
|
271
342
|
},
|
|
272
343
|
defaultVariants: { variant: "icon" }
|
|
273
|
-
}),
|
|
344
|
+
}), $e = [
|
|
274
345
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
275
346
|
"ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-sm)]",
|
|
276
347
|
"ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
|
|
@@ -281,12 +352,12 @@ const K = B("ds:inline-flex ds:items-center", {
|
|
|
281
352
|
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
282
353
|
"ds:disabled:opacity-50 ds:disabled:cursor-not-allowed",
|
|
283
354
|
"type-body-sm"
|
|
284
|
-
].join(" "),
|
|
355
|
+
].join(" "), Q = [
|
|
285
356
|
"ds:w-[18rem] ds:rounded-[var(--radius-md)]",
|
|
286
357
|
"ds:bg-background ds:text-foreground ds:border ds:border-border",
|
|
287
358
|
"ds:shadow-[var(--shadow-lg)]",
|
|
288
359
|
"ds:overflow-hidden"
|
|
289
|
-
].join(" "),
|
|
360
|
+
].join(" "), Ze = q("ds:flex ds:flex-col", {
|
|
290
361
|
variants: {
|
|
291
362
|
loading: {
|
|
292
363
|
true: "ds:opacity-60 ds:pointer-events-none",
|
|
@@ -294,67 +365,67 @@ const K = B("ds:inline-flex ds:items-center", {
|
|
|
294
365
|
}
|
|
295
366
|
},
|
|
296
367
|
defaultVariants: { loading: !1 }
|
|
297
|
-
}),
|
|
368
|
+
}), R = I(
|
|
298
369
|
({
|
|
299
370
|
value: e,
|
|
300
|
-
onValueChange:
|
|
301
|
-
inputId:
|
|
302
|
-
disabled:
|
|
303
|
-
loading:
|
|
304
|
-
className:
|
|
305
|
-
},
|
|
306
|
-
const { t:
|
|
371
|
+
onValueChange: s,
|
|
372
|
+
inputId: c,
|
|
373
|
+
disabled: l = !1,
|
|
374
|
+
loading: r = !1,
|
|
375
|
+
className: d
|
|
376
|
+
}, i) => {
|
|
377
|
+
const { t: o } = A(), n = W(), S = n.locale, C = e ?? (n.isSystemDefault ? m : n.locale), f = ee(), k = c ?? `${f}-search`, [P, p] = B(""), h = T(
|
|
307
378
|
(t) => {
|
|
308
|
-
if (!(
|
|
309
|
-
if (t ===
|
|
310
|
-
|
|
379
|
+
if (!(l || r)) {
|
|
380
|
+
if (t === m) {
|
|
381
|
+
s ? s(m) : n.setLocale(m);
|
|
311
382
|
return;
|
|
312
383
|
}
|
|
313
|
-
|
|
384
|
+
v(t) && (s ? s(t) : n.setLocale(t));
|
|
314
385
|
}
|
|
315
386
|
},
|
|
316
|
-
[
|
|
387
|
+
[l, r, s, n]
|
|
317
388
|
);
|
|
318
|
-
return /* @__PURE__ */
|
|
389
|
+
return /* @__PURE__ */ a(
|
|
319
390
|
"div",
|
|
320
391
|
{
|
|
321
|
-
ref:
|
|
322
|
-
className: [
|
|
392
|
+
ref: i,
|
|
393
|
+
className: [Ze({ loading: r }), d].filter(Boolean).join(" "),
|
|
323
394
|
"data-component": "locale-picker-search-list",
|
|
324
|
-
children: /* @__PURE__ */
|
|
395
|
+
children: /* @__PURE__ */ _(
|
|
325
396
|
y,
|
|
326
397
|
{
|
|
327
|
-
label:
|
|
328
|
-
filter:
|
|
398
|
+
label: o("navigation.localePicker.commandLabel"),
|
|
399
|
+
filter: oe,
|
|
329
400
|
shouldFilter: !0,
|
|
330
401
|
children: [
|
|
331
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ _(
|
|
332
403
|
"div",
|
|
333
404
|
{
|
|
334
405
|
className: [
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
406
|
+
Be,
|
|
407
|
+
qe.sm,
|
|
408
|
+
Je.sm,
|
|
338
409
|
"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
339
410
|
"ds:m-[var(--spacing-xs)]"
|
|
340
411
|
].join(" "),
|
|
341
412
|
children: [
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
-
|
|
413
|
+
/* @__PURE__ */ a(
|
|
414
|
+
F,
|
|
344
415
|
{
|
|
345
416
|
"aria-hidden": "true",
|
|
346
417
|
className: "ds:size-4 ds:text-muted-foreground ds:shrink-0"
|
|
347
418
|
}
|
|
348
419
|
),
|
|
349
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ a(
|
|
350
421
|
y.Input,
|
|
351
422
|
{
|
|
352
|
-
id:
|
|
423
|
+
id: k,
|
|
353
424
|
value: P,
|
|
354
|
-
onValueChange:
|
|
355
|
-
placeholder:
|
|
356
|
-
"aria-label":
|
|
357
|
-
disabled:
|
|
425
|
+
onValueChange: p,
|
|
426
|
+
placeholder: o("navigation.localePicker.searchPlaceholder"),
|
|
427
|
+
"aria-label": o("navigation.localePicker.searchLabel"),
|
|
428
|
+
disabled: l || r,
|
|
358
429
|
className: [
|
|
359
430
|
"ds:peer ds:flex-1 ds:bg-transparent ds:border-0 ds:outline-none",
|
|
360
431
|
"ds:placeholder:text-muted-foreground ds:text-foreground",
|
|
@@ -365,7 +436,7 @@ const K = B("ds:inline-flex ds:items-center", {
|
|
|
365
436
|
]
|
|
366
437
|
}
|
|
367
438
|
),
|
|
368
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ _(
|
|
369
440
|
y.List,
|
|
370
441
|
{
|
|
371
442
|
className: [
|
|
@@ -373,32 +444,32 @@ const K = B("ds:inline-flex ds:items-center", {
|
|
|
373
444
|
"ds:p-[var(--spacing-xs)]"
|
|
374
445
|
].join(" "),
|
|
375
446
|
children: [
|
|
376
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ a(
|
|
377
448
|
y.Empty,
|
|
378
449
|
{
|
|
379
450
|
className: [
|
|
380
451
|
"ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]",
|
|
381
452
|
"type-body-sm ds:text-muted-foreground"
|
|
382
453
|
].join(" "),
|
|
383
|
-
children:
|
|
454
|
+
children: o("navigation.localePicker.empty")
|
|
384
455
|
}
|
|
385
456
|
),
|
|
386
457
|
(() => {
|
|
387
|
-
const t =
|
|
388
|
-
return /* @__PURE__ */
|
|
458
|
+
const t = C === m, u = L[S];
|
|
459
|
+
return /* @__PURE__ */ _(
|
|
389
460
|
y.Item,
|
|
390
461
|
{
|
|
391
|
-
value:
|
|
462
|
+
value: m,
|
|
392
463
|
keywords: [
|
|
393
464
|
"system",
|
|
394
465
|
"default",
|
|
395
466
|
"auto",
|
|
396
467
|
"browser",
|
|
397
|
-
|
|
398
|
-
|
|
468
|
+
u.nativeName,
|
|
469
|
+
u.englishName
|
|
399
470
|
],
|
|
400
|
-
disabled:
|
|
401
|
-
onSelect:
|
|
471
|
+
disabled: l || r,
|
|
472
|
+
onSelect: h,
|
|
402
473
|
className: [
|
|
403
474
|
"ds:relative ds:flex ds:cursor-pointer ds:select-none",
|
|
404
475
|
"ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
@@ -413,38 +484,38 @@ const K = B("ds:inline-flex ds:items-center", {
|
|
|
413
484
|
"aria-selected": t || void 0,
|
|
414
485
|
"data-current": t ? "true" : void 0,
|
|
415
486
|
children: [
|
|
416
|
-
/* @__PURE__ */
|
|
417
|
-
|
|
487
|
+
/* @__PURE__ */ a(
|
|
488
|
+
We,
|
|
418
489
|
{
|
|
419
490
|
"aria-hidden": "true",
|
|
420
491
|
className: "ds:size-4 ds:text-muted-foreground ds:shrink-0"
|
|
421
492
|
}
|
|
422
493
|
),
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
locale:
|
|
494
|
+
/* @__PURE__ */ a("span", { className: "ds:flex-1 ds:min-w-0 ds:truncate type-body-sm", children: o("navigation.localePicker.systemDefault", {
|
|
495
|
+
locale: u.nativeName
|
|
425
496
|
}) }),
|
|
426
|
-
t ? /* @__PURE__ */
|
|
427
|
-
|
|
497
|
+
t ? /* @__PURE__ */ a(
|
|
498
|
+
G,
|
|
428
499
|
{
|
|
429
500
|
"aria-hidden": "true",
|
|
430
501
|
className: "ds:size-4 ds:text-primary ds:shrink-0"
|
|
431
502
|
}
|
|
432
503
|
) : null,
|
|
433
|
-
t ? /* @__PURE__ */
|
|
504
|
+
t ? /* @__PURE__ */ a("span", { className: "ds:sr-only", children: o("navigation.localePicker.currentSelection") }) : null
|
|
434
505
|
]
|
|
435
506
|
},
|
|
436
|
-
|
|
507
|
+
m
|
|
437
508
|
);
|
|
438
509
|
})(),
|
|
439
|
-
|
|
440
|
-
const
|
|
441
|
-
return /* @__PURE__ */
|
|
510
|
+
Qe.map((t) => {
|
|
511
|
+
const u = C === t.code;
|
|
512
|
+
return /* @__PURE__ */ _(
|
|
442
513
|
y.Item,
|
|
443
514
|
{
|
|
444
515
|
value: t.code,
|
|
445
516
|
keywords: [t.nativeName, t.englishName],
|
|
446
|
-
disabled:
|
|
447
|
-
onSelect:
|
|
517
|
+
disabled: l || r,
|
|
518
|
+
onSelect: h,
|
|
448
519
|
className: [
|
|
449
520
|
"ds:relative ds:flex ds:cursor-pointer ds:select-none",
|
|
450
521
|
"ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
@@ -456,12 +527,12 @@ const K = B("ds:inline-flex ds:items-center", {
|
|
|
456
527
|
"ds:aria-selected:bg-muted",
|
|
457
528
|
"ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed"
|
|
458
529
|
].join(" "),
|
|
459
|
-
"aria-selected":
|
|
460
|
-
"data-current":
|
|
530
|
+
"aria-selected": u || void 0,
|
|
531
|
+
"data-current": u ? "true" : void 0,
|
|
461
532
|
lang: t.code,
|
|
462
533
|
children: [
|
|
463
|
-
|
|
464
|
-
|
|
534
|
+
z(t.countryCode) ? /* @__PURE__ */ a(
|
|
535
|
+
E,
|
|
465
536
|
{
|
|
466
537
|
country: t.countryCode,
|
|
467
538
|
size: "sm",
|
|
@@ -470,13 +541,13 @@ const K = B("ds:inline-flex ds:items-center", {
|
|
|
470
541
|
className: "ds:shrink-0"
|
|
471
542
|
}
|
|
472
543
|
) : (
|
|
473
|
-
/*
|
|
544
|
+
/* hasCoreFlag fallback: render the emoji glyph only
|
|
474
545
|
when the kit doesn't ship an SVG for this
|
|
475
546
|
country code. All 18 bundled locales currently
|
|
476
547
|
have SVG flags, so this is dead code on the
|
|
477
548
|
canonical set — kept for resilience when
|
|
478
549
|
consumers extend the registry. */
|
|
479
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ a(
|
|
480
551
|
"span",
|
|
481
552
|
{
|
|
482
553
|
"aria-hidden": "true",
|
|
@@ -485,15 +556,15 @@ const K = B("ds:inline-flex ds:items-center", {
|
|
|
485
556
|
}
|
|
486
557
|
)
|
|
487
558
|
),
|
|
488
|
-
/* @__PURE__ */
|
|
489
|
-
|
|
490
|
-
|
|
559
|
+
/* @__PURE__ */ a("span", { className: "ds:flex-1 ds:min-w-0 ds:truncate type-body-sm", children: t.nativeName }),
|
|
560
|
+
u ? /* @__PURE__ */ a(
|
|
561
|
+
G,
|
|
491
562
|
{
|
|
492
563
|
"aria-hidden": "true",
|
|
493
564
|
className: "ds:size-4 ds:text-primary ds:shrink-0"
|
|
494
565
|
}
|
|
495
566
|
) : null,
|
|
496
|
-
|
|
567
|
+
u ? /* @__PURE__ */ a("span", { className: "ds:sr-only", children: o("navigation.localePicker.currentSelection") }) : null
|
|
497
568
|
]
|
|
498
569
|
},
|
|
499
570
|
t.code
|
|
@@ -509,34 +580,34 @@ const K = B("ds:inline-flex ds:items-center", {
|
|
|
509
580
|
);
|
|
510
581
|
}
|
|
511
582
|
);
|
|
512
|
-
|
|
513
|
-
function
|
|
583
|
+
R.displayName = "LocalePicker.SearchList";
|
|
584
|
+
function es({
|
|
514
585
|
state: e,
|
|
515
|
-
rest:
|
|
516
|
-
forwardedRef:
|
|
517
|
-
className:
|
|
518
|
-
disabled:
|
|
519
|
-
loading:
|
|
520
|
-
popoverSide:
|
|
586
|
+
rest: s,
|
|
587
|
+
forwardedRef: c,
|
|
588
|
+
className: l,
|
|
589
|
+
disabled: r,
|
|
590
|
+
loading: d,
|
|
591
|
+
popoverSide: i
|
|
521
592
|
}) {
|
|
522
|
-
const { t:
|
|
523
|
-
return /* @__PURE__ */
|
|
593
|
+
const { t: o } = A(), n = L[e.locale];
|
|
594
|
+
return /* @__PURE__ */ a(
|
|
524
595
|
"div",
|
|
525
596
|
{
|
|
526
|
-
ref:
|
|
597
|
+
ref: c,
|
|
527
598
|
"data-component": "locale-picker",
|
|
528
|
-
"data-component-id":
|
|
529
|
-
className:
|
|
530
|
-
...
|
|
531
|
-
children: /* @__PURE__ */
|
|
532
|
-
/* @__PURE__ */
|
|
533
|
-
|
|
599
|
+
"data-component-id": s.id,
|
|
600
|
+
className: Y({ variant: "icon", className: l }),
|
|
601
|
+
...s,
|
|
602
|
+
children: /* @__PURE__ */ _(x.Root, { children: [
|
|
603
|
+
/* @__PURE__ */ a(x.Trigger, { asChild: !0, children: /* @__PURE__ */ a(
|
|
604
|
+
te,
|
|
534
605
|
{
|
|
535
|
-
disabled:
|
|
536
|
-
icon: /* @__PURE__ */
|
|
537
|
-
/* @__PURE__ */
|
|
538
|
-
|
|
539
|
-
|
|
606
|
+
disabled: r || d,
|
|
607
|
+
icon: /* @__PURE__ */ _("span", { className: "ds:relative ds:inline-flex ds:items-center ds:justify-center", children: [
|
|
608
|
+
/* @__PURE__ */ a(F, { "aria-hidden": !0, className: "ds:size-5" }),
|
|
609
|
+
z(n.countryCode) ? /* @__PURE__ */ a(
|
|
610
|
+
E,
|
|
540
611
|
{
|
|
541
612
|
country: n.countryCode,
|
|
542
613
|
size: "sm",
|
|
@@ -556,26 +627,26 @@ function me({
|
|
|
556
627
|
}
|
|
557
628
|
) : null
|
|
558
629
|
] }),
|
|
559
|
-
"aria-label":
|
|
630
|
+
"aria-label": o("navigation.localePicker.trigger", {
|
|
560
631
|
locale: n.nativeName
|
|
561
632
|
})
|
|
562
633
|
}
|
|
563
634
|
) }),
|
|
564
|
-
/* @__PURE__ */
|
|
565
|
-
|
|
635
|
+
/* @__PURE__ */ a(
|
|
636
|
+
x.Content,
|
|
566
637
|
{
|
|
567
|
-
side:
|
|
638
|
+
side: i,
|
|
568
639
|
align: "start",
|
|
569
640
|
sideOffset: 8,
|
|
570
|
-
className:
|
|
571
|
-
"aria-label":
|
|
572
|
-
children: /* @__PURE__ */
|
|
573
|
-
|
|
641
|
+
className: Q,
|
|
642
|
+
"aria-label": o("navigation.localePicker.popupLabel"),
|
|
643
|
+
children: /* @__PURE__ */ a(
|
|
644
|
+
R,
|
|
574
645
|
{
|
|
575
646
|
value: e.locale,
|
|
576
647
|
onValueChange: e.setLocale,
|
|
577
|
-
disabled:
|
|
578
|
-
loading:
|
|
648
|
+
disabled: r,
|
|
649
|
+
loading: d
|
|
579
650
|
}
|
|
580
651
|
)
|
|
581
652
|
}
|
|
@@ -584,37 +655,37 @@ function me({
|
|
|
584
655
|
}
|
|
585
656
|
);
|
|
586
657
|
}
|
|
587
|
-
function
|
|
658
|
+
function ss({
|
|
588
659
|
state: e,
|
|
589
|
-
rest:
|
|
590
|
-
forwardedRef:
|
|
591
|
-
className:
|
|
592
|
-
disabled:
|
|
593
|
-
loading:
|
|
594
|
-
popoverSide:
|
|
660
|
+
rest: s,
|
|
661
|
+
forwardedRef: c,
|
|
662
|
+
className: l,
|
|
663
|
+
disabled: r,
|
|
664
|
+
loading: d,
|
|
665
|
+
popoverSide: i
|
|
595
666
|
}) {
|
|
596
|
-
const { t:
|
|
597
|
-
return /* @__PURE__ */
|
|
667
|
+
const { t: o } = A(), n = L[e.locale];
|
|
668
|
+
return /* @__PURE__ */ a(
|
|
598
669
|
"div",
|
|
599
670
|
{
|
|
600
|
-
ref:
|
|
671
|
+
ref: c,
|
|
601
672
|
"data-component": "locale-picker",
|
|
602
|
-
"data-component-id":
|
|
603
|
-
className:
|
|
604
|
-
...
|
|
605
|
-
children: /* @__PURE__ */
|
|
606
|
-
/* @__PURE__ */
|
|
673
|
+
"data-component-id": s.id,
|
|
674
|
+
className: Y({ variant: "compact", className: l }),
|
|
675
|
+
...s,
|
|
676
|
+
children: /* @__PURE__ */ _(x.Root, { children: [
|
|
677
|
+
/* @__PURE__ */ a(x.Trigger, { asChild: !0, children: /* @__PURE__ */ _(
|
|
607
678
|
"button",
|
|
608
679
|
{
|
|
609
680
|
type: "button",
|
|
610
|
-
disabled:
|
|
611
|
-
className:
|
|
612
|
-
"aria-label":
|
|
681
|
+
disabled: r || d,
|
|
682
|
+
className: $e,
|
|
683
|
+
"aria-label": o("navigation.localePicker.trigger", {
|
|
613
684
|
locale: n.nativeName
|
|
614
685
|
}),
|
|
615
686
|
children: [
|
|
616
|
-
|
|
617
|
-
|
|
687
|
+
z(n.countryCode) ? /* @__PURE__ */ a(
|
|
688
|
+
E,
|
|
618
689
|
{
|
|
619
690
|
country: n.countryCode,
|
|
620
691
|
size: "sm",
|
|
@@ -622,8 +693,8 @@ function ge({
|
|
|
622
693
|
rounded: "sm",
|
|
623
694
|
className: "ds:shrink-0"
|
|
624
695
|
}
|
|
625
|
-
) : /* @__PURE__ */
|
|
626
|
-
/* @__PURE__ */
|
|
696
|
+
) : /* @__PURE__ */ a(F, { "aria-hidden": !0, className: "ds:size-4 ds:shrink-0" }),
|
|
697
|
+
/* @__PURE__ */ a(
|
|
627
698
|
"span",
|
|
628
699
|
{
|
|
629
700
|
className: "ds:flex-1 ds:truncate type-body-sm",
|
|
@@ -634,21 +705,21 @@ function ge({
|
|
|
634
705
|
]
|
|
635
706
|
}
|
|
636
707
|
) }),
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
|
|
708
|
+
/* @__PURE__ */ a(
|
|
709
|
+
x.Content,
|
|
639
710
|
{
|
|
640
|
-
side:
|
|
711
|
+
side: i,
|
|
641
712
|
align: "start",
|
|
642
713
|
sideOffset: 8,
|
|
643
|
-
className:
|
|
644
|
-
"aria-label":
|
|
645
|
-
children: /* @__PURE__ */
|
|
646
|
-
|
|
714
|
+
className: Q,
|
|
715
|
+
"aria-label": o("navigation.localePicker.popupLabel"),
|
|
716
|
+
children: /* @__PURE__ */ a(
|
|
717
|
+
R,
|
|
647
718
|
{
|
|
648
719
|
value: e.locale,
|
|
649
720
|
onValueChange: e.setLocale,
|
|
650
|
-
disabled:
|
|
651
|
-
loading:
|
|
721
|
+
disabled: r,
|
|
722
|
+
loading: d
|
|
652
723
|
}
|
|
653
724
|
)
|
|
654
725
|
}
|
|
@@ -657,83 +728,83 @@ function ge({
|
|
|
657
728
|
}
|
|
658
729
|
);
|
|
659
730
|
}
|
|
660
|
-
const
|
|
661
|
-
(e,
|
|
731
|
+
const X = I(
|
|
732
|
+
(e, s) => {
|
|
662
733
|
const {
|
|
663
|
-
variant:
|
|
664
|
-
value:
|
|
665
|
-
onValueChange:
|
|
666
|
-
disabled:
|
|
667
|
-
loading:
|
|
668
|
-
popoverSide:
|
|
734
|
+
variant: c = "icon",
|
|
735
|
+
value: l,
|
|
736
|
+
onValueChange: r,
|
|
737
|
+
disabled: d = !1,
|
|
738
|
+
loading: i = !1,
|
|
739
|
+
popoverSide: o = "bottom",
|
|
669
740
|
className: n,
|
|
670
|
-
id:
|
|
671
|
-
...
|
|
672
|
-
} = e,
|
|
673
|
-
(
|
|
674
|
-
if (
|
|
675
|
-
if (
|
|
676
|
-
|
|
677
|
-
const
|
|
678
|
-
|
|
679
|
-
} else
|
|
741
|
+
id: S,
|
|
742
|
+
...C
|
|
743
|
+
} = e, f = W(), k = l ?? f.locale, P = T(
|
|
744
|
+
(g) => {
|
|
745
|
+
if (r) {
|
|
746
|
+
if (r(g), g === m) {
|
|
747
|
+
K(b);
|
|
748
|
+
const $ = w();
|
|
749
|
+
N($);
|
|
750
|
+
} else v(g) && (N(g), V(b, g));
|
|
680
751
|
return;
|
|
681
752
|
}
|
|
682
|
-
|
|
753
|
+
f.setLocale(g);
|
|
683
754
|
},
|
|
684
|
-
[
|
|
685
|
-
),
|
|
755
|
+
[r, f]
|
|
756
|
+
), p = D(
|
|
686
757
|
() => ({
|
|
687
|
-
locale:
|
|
688
|
-
isSystemDefault:
|
|
758
|
+
locale: k,
|
|
759
|
+
isSystemDefault: f.isSystemDefault,
|
|
689
760
|
setLocale: P
|
|
690
761
|
}),
|
|
691
|
-
[
|
|
692
|
-
),
|
|
693
|
-
|
|
694
|
-
const t =
|
|
695
|
-
t.current =
|
|
696
|
-
const
|
|
762
|
+
[k, f.isSystemDefault, P]
|
|
763
|
+
), h = U(null);
|
|
764
|
+
se(s, () => h.current, []);
|
|
765
|
+
const t = U(p);
|
|
766
|
+
t.current = p;
|
|
767
|
+
const u = D(
|
|
697
768
|
() => ({
|
|
698
|
-
setLocale: (
|
|
699
|
-
|
|
769
|
+
setLocale: (g) => {
|
|
770
|
+
v(g) && t.current.setLocale(g);
|
|
700
771
|
}
|
|
701
772
|
}),
|
|
702
773
|
[]
|
|
703
774
|
);
|
|
704
|
-
return
|
|
705
|
-
|
|
775
|
+
return Ke(Xe, u, S), c === "compact" ? /* @__PURE__ */ a(
|
|
776
|
+
ss,
|
|
706
777
|
{
|
|
707
|
-
state:
|
|
708
|
-
rest:
|
|
709
|
-
forwardedRef:
|
|
778
|
+
state: p,
|
|
779
|
+
rest: C,
|
|
780
|
+
forwardedRef: h,
|
|
710
781
|
className: n,
|
|
711
|
-
disabled:
|
|
712
|
-
loading:
|
|
713
|
-
popoverSide:
|
|
782
|
+
disabled: d,
|
|
783
|
+
loading: i,
|
|
784
|
+
popoverSide: o
|
|
714
785
|
}
|
|
715
|
-
) : /* @__PURE__ */
|
|
716
|
-
|
|
786
|
+
) : /* @__PURE__ */ a(
|
|
787
|
+
es,
|
|
717
788
|
{
|
|
718
|
-
state:
|
|
719
|
-
rest:
|
|
720
|
-
forwardedRef:
|
|
789
|
+
state: p,
|
|
790
|
+
rest: C,
|
|
791
|
+
forwardedRef: h,
|
|
721
792
|
className: n,
|
|
722
|
-
disabled:
|
|
723
|
-
loading:
|
|
724
|
-
popoverSide:
|
|
793
|
+
disabled: d,
|
|
794
|
+
loading: i,
|
|
795
|
+
popoverSide: o
|
|
725
796
|
}
|
|
726
797
|
);
|
|
727
798
|
}
|
|
728
799
|
);
|
|
729
|
-
|
|
730
|
-
const
|
|
731
|
-
SearchList:
|
|
800
|
+
X.displayName = "LocalePicker";
|
|
801
|
+
const ps = Object.assign(X, {
|
|
802
|
+
SearchList: R
|
|
732
803
|
});
|
|
733
804
|
export {
|
|
734
805
|
b as L,
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
806
|
+
ps as a,
|
|
807
|
+
R as b,
|
|
808
|
+
L as c
|
|
738
809
|
};
|
|
739
|
-
//# sourceMappingURL=locale-picker-
|
|
810
|
+
//# sourceMappingURL=locale-picker-BfBUdT1m.js.map
|