@alfadocs/ui-kit-debug 1.88.0 → 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.
- package/dist/_chunks/{booking-DjQuhfN7.js → booking-C0FoW8Yx.js} +2 -1
- package/dist/_chunks/booking-C0FoW8Yx.js.map +1 -0
- package/dist/_chunks/{header-settings-CifwJEKB.js → header-settings-BVhjndtV.js} +188 -168
- package/dist/_chunks/header-settings-BVhjndtV.js.map +1 -0
- package/dist/_chunks/{locale-picker-QbT1p60X.js → locale-picker-DVvinQXU.js} +339 -310
- package/dist/_chunks/locale-picker-DVvinQXU.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-vON3WhD0.js → marketplace-app-shell-x_abo_ye.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-vON3WhD0.js.map → marketplace-app-shell-x_abo_ye.js.map} +1 -1
- package/dist/_chunks/{patient-search-Dy0sxcwv.js → patient-search-BPjP2__L.js} +15 -13
- package/dist/_chunks/patient-search-BPjP2__L.js.map +1 -0
- package/dist/agent-catalog.json +4 -4
- package/dist/agent-i18n/en.json +3 -3
- package/dist/components/booking/details-form.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts +14 -0
- package/dist/components/header-settings/header-settings.d.ts.map +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/locale-picker/index.js +4 -3
- package/dist/components/locale-picker/locale-picker.d.ts +31 -1
- package/dist/components/locale-picker/locale-picker.d.ts.map +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-search/patient-search.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/booking-DjQuhfN7.js.map +0 -1
- package/dist/_chunks/header-settings-CifwJEKB.js.map +0 -1
- package/dist/_chunks/locale-picker-QbT1p60X.js.map +0 -1
- package/dist/_chunks/patient-search-Dy0sxcwv.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { B as
|
|
6
|
-
import { I as
|
|
1
|
+
import { jsx as t, jsxs as p, Fragment as X } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as le, useRef as d, useImperativeHandle as de, useState as ue, useCallback as pe, useMemo as ge } from "react";
|
|
3
|
+
import { c as _ } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as ee } from "react-i18next";
|
|
5
|
+
import { B as me } from "./button-DohK_Ak_.js";
|
|
6
|
+
import { I as he } from "./icon-button-S8_weU3g.js";
|
|
7
7
|
import { D as n } from "./dropdown-menu-D1we7oAY.js";
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import { a as
|
|
13
|
-
import { u as
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
16
|
-
import { S as
|
|
17
|
-
import { A as
|
|
18
|
-
import { C as
|
|
19
|
-
const
|
|
8
|
+
import { u as fe, p as ye, d as S, r as be, b as te } from "./locale-picker-DVvinQXU.js";
|
|
9
|
+
import { u as we } from "./use-media-query-CcAx5SMM.js";
|
|
10
|
+
import { u as ve } from "./use-locale-BExNy9Dl.js";
|
|
11
|
+
import { u as Se } from "./use-theme-CYGyzFgZ.js";
|
|
12
|
+
import { a as Le } from "./use-direction-Dp8h70PP.js";
|
|
13
|
+
import { u as ke } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
14
|
+
import { u as Te } from "./registry-DvAUVLHh.js";
|
|
15
|
+
import { u as Re } from "./length-token-DwMnGEYT.js";
|
|
16
|
+
import { S as Ae } from "./settings-d25ju_6L.js";
|
|
17
|
+
import { A as Y } from "./arrow-left-BfaGqVam.js";
|
|
18
|
+
import { C as Z } from "./chevron-right-I9AeSxH2.js";
|
|
19
|
+
const Ce = {
|
|
20
20
|
id: "header-settings",
|
|
21
21
|
// Each setter persists a single preference value (locale / theme /
|
|
22
22
|
// accessibility) — `set_value` semantics, not an ephemeral view switch.
|
|
@@ -32,7 +32,7 @@ const Te = {
|
|
|
32
32
|
locale: {
|
|
33
33
|
type: "string",
|
|
34
34
|
descriptionKey: "ui.agent.headerSettings.state.locale",
|
|
35
|
-
description: 'Active IETF language tag (e.g. "en", "it", "ar"). Initially uses storage, then HTML lang when initialLocaleFromHtmlLang is enabled, then the browser. Read after set_locale to confirm the switch; unknown tags leave it unchanged.',
|
|
35
|
+
description: 'Active IETF language tag (e.g. "en", "it", "ar"). Initially uses HTML lang first when followHtmlLang is enabled; otherwise storage, then HTML lang when initialLocaleFromHtmlLang is enabled, then the browser. Read after set_locale to confirm the switch; unknown tags leave it unchanged.',
|
|
36
36
|
read: (a) => a.getLocale()
|
|
37
37
|
},
|
|
38
38
|
theme: {
|
|
@@ -70,13 +70,13 @@ const Te = {
|
|
|
70
70
|
},
|
|
71
71
|
idempotent: !0,
|
|
72
72
|
descriptionKey: "ui.agent.headerSettings.actions.setLocale",
|
|
73
|
-
description: "Switch the active locale to the given IETF tag. Unknown tags are silently dropped — read the `locale` state slot afterwards to confirm.",
|
|
73
|
+
description: "Switch the active locale to the given IETF tag. Unknown tags are silently dropped — read the `locale` state slot afterwards to confirm. On a site with one address per language, the host may then load that language's address.",
|
|
74
74
|
errors: [
|
|
75
75
|
"Silently ignored when the tag names a locale the kit ships no bundle for — `locale` is unchanged."
|
|
76
76
|
],
|
|
77
77
|
examples: [{ args: { locale: "it" }, note: "Switch to Italian." }],
|
|
78
|
-
invoke: (a,
|
|
79
|
-
a.setLocale(
|
|
78
|
+
invoke: (a, i) => {
|
|
79
|
+
a.setLocale(i.locale);
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
set_theme: {
|
|
@@ -93,8 +93,8 @@ const Te = {
|
|
|
93
93
|
examples: [
|
|
94
94
|
{ args: { theme: "dark" }, note: "Switch to the dark theme." }
|
|
95
95
|
],
|
|
96
|
-
invoke: (a,
|
|
97
|
-
a.setTheme(
|
|
96
|
+
invoke: (a, i) => {
|
|
97
|
+
a.setTheme(i.theme);
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
set_accessibility: {
|
|
@@ -119,8 +119,8 @@ const Te = {
|
|
|
119
119
|
note: "Enable the AAA-accessible profile."
|
|
120
120
|
}
|
|
121
121
|
],
|
|
122
|
-
invoke: (a,
|
|
123
|
-
a.setAccessibility(
|
|
122
|
+
invoke: (a, i) => {
|
|
123
|
+
a.setAccessibility(i.accessibility);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
},
|
|
@@ -137,12 +137,12 @@ const Te = {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
|
-
function
|
|
140
|
+
function De(a) {
|
|
141
141
|
if (typeof document > "u") return;
|
|
142
|
-
const
|
|
143
|
-
|
|
142
|
+
const i = document.documentElement;
|
|
143
|
+
i.lang = a, i.dir = S[a].dir;
|
|
144
144
|
}
|
|
145
|
-
const
|
|
145
|
+
const Ie = _("ds:inline-flex ds:items-center", {
|
|
146
146
|
variants: {
|
|
147
147
|
align: {
|
|
148
148
|
start: "",
|
|
@@ -150,59 +150,62 @@ const Ae = N("ds:inline-flex ds:items-center", {
|
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
152
|
defaultVariants: { align: "end" }
|
|
153
|
-
}),
|
|
153
|
+
}), Ke = "ds:w-[var(--popover-size-md)]", Pe = _("", {
|
|
154
154
|
variants: {
|
|
155
155
|
language: {
|
|
156
156
|
true: "ds:[inline-size:var(--popover-size-md)] ds:[min-inline-size:0] ds:[max-inline-size:calc(100vw_-_2_*_var(--spacing-lg))] ds:[&_input]:min-w-0",
|
|
157
157
|
false: ""
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
}),
|
|
160
|
+
}), Ee = _(
|
|
161
161
|
"ds:flex ds:flex-1 ds:min-w-0 ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]"
|
|
162
162
|
);
|
|
163
163
|
function A({
|
|
164
164
|
label: a,
|
|
165
|
-
value:
|
|
166
|
-
lang:
|
|
165
|
+
value: i,
|
|
166
|
+
lang: g
|
|
167
167
|
}) {
|
|
168
|
-
return /* @__PURE__ */
|
|
168
|
+
return /* @__PURE__ */ p("span", { className: Ee(), children: [
|
|
169
169
|
/* @__PURE__ */ t("span", { className: "ds:truncate", children: a }),
|
|
170
170
|
/* @__PURE__ */ t(
|
|
171
171
|
"span",
|
|
172
172
|
{
|
|
173
|
-
lang:
|
|
173
|
+
lang: g,
|
|
174
174
|
className: "ds:shrink-0 ds:text-muted-foreground ds:[[data-highlighted]_&]:text-current",
|
|
175
|
-
children:
|
|
175
|
+
children: i
|
|
176
176
|
}
|
|
177
177
|
)
|
|
178
178
|
] });
|
|
179
179
|
}
|
|
180
|
-
function
|
|
181
|
-
return Object.prototype.hasOwnProperty.call(
|
|
180
|
+
function ae(a) {
|
|
181
|
+
return Object.prototype.hasOwnProperty.call(S, a);
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
183
|
+
function Ne({
|
|
184
|
+
locale: a,
|
|
185
|
+
onLocaleChange: i
|
|
186
|
+
}) {
|
|
187
|
+
const { t: g } = ee("ui"), b = S[ae(a) ? a : "en"], C = (r) => {
|
|
188
|
+
var o;
|
|
189
|
+
r.target === r.currentTarget && ((o = r.currentTarget.querySelector("input")) == null || o.focus({ preventScroll: !0 }));
|
|
187
190
|
}, D = (r) => {
|
|
188
|
-
const
|
|
189
|
-
if (
|
|
191
|
+
const o = r.target;
|
|
192
|
+
if (o instanceof HTMLInputElement) {
|
|
190
193
|
if (r.nativeEvent.isComposing) {
|
|
191
194
|
r.stopPropagation();
|
|
192
195
|
return;
|
|
193
196
|
}
|
|
194
|
-
r.key !== "ArrowLeft" && r.key !== "ArrowRight" || (
|
|
197
|
+
r.key !== "ArrowLeft" && r.key !== "ArrowRight" || (o.selectionStart !== 0 || o.selectionEnd !== 0) && r.stopPropagation();
|
|
195
198
|
}
|
|
196
199
|
};
|
|
197
|
-
return /* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */ t(n.SubTrigger, { "aria-haspopup": "dialog", "data-value":
|
|
199
|
-
/* @__PURE__ */ t("span", { className: "ds:truncate", children:
|
|
200
|
+
return /* @__PURE__ */ p(n.Sub, { children: [
|
|
201
|
+
/* @__PURE__ */ t(n.SubTrigger, { "aria-haspopup": "dialog", "data-value": b.code, children: /* @__PURE__ */ p("span", { className: "ds:flex ds:min-w-0 ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
202
|
+
/* @__PURE__ */ t("span", { className: "ds:truncate", children: g("navigation.headerSettings.language.label") }),
|
|
200
203
|
/* @__PURE__ */ t(
|
|
201
204
|
"span",
|
|
202
205
|
{
|
|
203
|
-
lang:
|
|
206
|
+
lang: b.code,
|
|
204
207
|
className: "ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:[[data-highlighted]_&]:text-current",
|
|
205
|
-
children:
|
|
208
|
+
children: b.nativeName
|
|
206
209
|
}
|
|
207
210
|
)
|
|
208
211
|
] }) }),
|
|
@@ -211,79 +214,90 @@ function Ce({ locale: a }) {
|
|
|
211
214
|
{
|
|
212
215
|
role: "dialog",
|
|
213
216
|
"aria-orientation": void 0,
|
|
214
|
-
className:
|
|
215
|
-
onFocus:
|
|
217
|
+
className: Ke,
|
|
218
|
+
onFocus: C,
|
|
216
219
|
onKeyDownCapture: D,
|
|
217
220
|
onEscapeKeyDown: (r) => {
|
|
218
221
|
r.isComposing && r.preventDefault();
|
|
219
222
|
},
|
|
220
|
-
children: /* @__PURE__ */ t(
|
|
223
|
+
children: /* @__PURE__ */ t(te.SearchList, { onLocaleChange: i })
|
|
221
224
|
}
|
|
222
225
|
)
|
|
223
226
|
] });
|
|
224
227
|
}
|
|
225
|
-
const
|
|
226
|
-
(a,
|
|
227
|
-
var
|
|
228
|
+
const xe = le(
|
|
229
|
+
(a, i) => {
|
|
230
|
+
var Q;
|
|
228
231
|
const {
|
|
229
|
-
align:
|
|
230
|
-
size:
|
|
231
|
-
disabled:
|
|
232
|
-
initialLocaleFromHtmlLang:
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
232
|
+
align: g = "end",
|
|
233
|
+
size: b = "md",
|
|
234
|
+
disabled: C = !1,
|
|
235
|
+
initialLocaleFromHtmlLang: D = !1,
|
|
236
|
+
followHtmlLang: r = !1,
|
|
237
|
+
onLocaleChange: o,
|
|
238
|
+
className: ne,
|
|
239
|
+
id: z,
|
|
240
|
+
...re
|
|
241
|
+
} = a, { t: u } = ee("ui"), c = Se(), { locale: w, setLocale: M } = ve();
|
|
242
|
+
fe(D, r);
|
|
243
|
+
const j = d(o);
|
|
244
|
+
j.current = o;
|
|
245
|
+
const I = d(null);
|
|
246
|
+
de(i, () => I.current, []);
|
|
247
|
+
const m = we("(width < 48rem)"), F = Le(), [L, h] = ue("main"), l = m ? L : "main", k = d(null), O = d(null), V = d(null), f = d(null), T = d("keyboard");
|
|
248
|
+
ke(() => {
|
|
249
|
+
var e, s, v, W, $;
|
|
250
|
+
if (!m && L !== "main" && (f.current = L, h("main")), l === "language")
|
|
251
|
+
(s = (e = k.current) == null ? void 0 : e.querySelector(
|
|
245
252
|
T.current === "keyboard" ? "input" : "button"
|
|
246
|
-
)) == null ||
|
|
247
|
-
else if (
|
|
248
|
-
(
|
|
253
|
+
)) == null || s.focus({ preventScroll: !0 });
|
|
254
|
+
else if (l === "appearance")
|
|
255
|
+
(W = (v = k.current) == null ? void 0 : v.querySelector('[role="menuitem"]')) == null || W.focus({ preventScroll: !0 });
|
|
249
256
|
else if (f.current) {
|
|
250
|
-
const
|
|
251
|
-
`[role="menuitem"][aria-haspopup="${
|
|
257
|
+
const J = f.current, H = m ? (J === "language" ? O : V).current : ($ = k.current) == null ? void 0 : $.querySelector(
|
|
258
|
+
`[role="menuitem"][aria-haspopup="${J === "language" ? "dialog" : "menu"}"]`
|
|
252
259
|
);
|
|
253
|
-
|
|
260
|
+
H == null || H.focus({ preventScroll: !0 }), f.current = null;
|
|
254
261
|
}
|
|
255
|
-
}, [
|
|
256
|
-
const
|
|
262
|
+
}, [m, L, l]);
|
|
263
|
+
const q = (e, s) => {
|
|
257
264
|
if (e.nativeEvent.isComposing) return;
|
|
258
|
-
const v =
|
|
259
|
-
(e.key === "Enter" || e.key === " " || e.key === v) && (T.current = "keyboard"), e.key === v && (e.preventDefault(), h(
|
|
260
|
-
},
|
|
261
|
-
|
|
262
|
-
},
|
|
263
|
-
if (
|
|
265
|
+
const v = F === "rtl" ? "ArrowLeft" : "ArrowRight";
|
|
266
|
+
(e.key === "Enter" || e.key === " " || e.key === v) && (T.current = "keyboard"), e.key === v && (e.preventDefault(), h(s));
|
|
267
|
+
}, K = () => {
|
|
268
|
+
l !== "main" && (f.current = l, h("main"));
|
|
269
|
+
}, se = (e) => {
|
|
270
|
+
if (l === "main") return;
|
|
264
271
|
if (e.nativeEvent.isComposing) {
|
|
265
272
|
e.stopPropagation();
|
|
266
273
|
return;
|
|
267
274
|
}
|
|
268
|
-
if (e.key !== (
|
|
275
|
+
if (e.key !== (F === "rtl" ? "ArrowRight" : "ArrowLeft"))
|
|
269
276
|
return;
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
},
|
|
277
|
+
const s = e.target;
|
|
278
|
+
s instanceof HTMLInputElement && (s.selectionStart !== 0 || s.selectionEnd !== 0) || (e.preventDefault(), e.stopPropagation(), K());
|
|
279
|
+
}, B = pe(
|
|
273
280
|
(e) => {
|
|
274
|
-
|
|
281
|
+
M(e), De(e), ye(e);
|
|
275
282
|
},
|
|
276
|
-
[
|
|
277
|
-
),
|
|
278
|
-
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
const y =
|
|
282
|
-
y.current =
|
|
283
|
-
const
|
|
283
|
+
[M]
|
|
284
|
+
), U = d(B);
|
|
285
|
+
U.current = B;
|
|
286
|
+
const P = d(w);
|
|
287
|
+
P.current = w;
|
|
288
|
+
const y = d(c);
|
|
289
|
+
y.current = c;
|
|
290
|
+
const ie = ge(
|
|
284
291
|
() => ({
|
|
285
292
|
setLocale: (e) => {
|
|
286
|
-
Object.prototype.hasOwnProperty.call(
|
|
293
|
+
if (Object.prototype.hasOwnProperty.call(S, e)) {
|
|
294
|
+
const s = P.current;
|
|
295
|
+
U.current(e), be(
|
|
296
|
+
j.current,
|
|
297
|
+
e,
|
|
298
|
+
s
|
|
299
|
+
);
|
|
300
|
+
}
|
|
287
301
|
},
|
|
288
302
|
setTheme: (e) => y.current.setTheme(e),
|
|
289
303
|
setAccessibility: (e) => y.current.setAccessibility(e),
|
|
@@ -292,34 +306,34 @@ const Ke = ie(
|
|
|
292
306
|
// class, so `theme: 'system'` and `theme: 'light'` both paint
|
|
293
307
|
// `.theme-light`. Without these an agent cannot tell a switch
|
|
294
308
|
// that landed from one that was dropped.
|
|
295
|
-
getLocale: () =>
|
|
309
|
+
getLocale: () => P.current,
|
|
296
310
|
getTheme: () => y.current.theme,
|
|
297
311
|
getAccessibility: () => y.current.accessibility,
|
|
298
312
|
getResolvedTheme: () => y.current.resolvedTheme
|
|
299
313
|
}),
|
|
300
314
|
[]
|
|
301
315
|
);
|
|
302
|
-
|
|
303
|
-
const
|
|
316
|
+
Te(Ce, ie, z);
|
|
317
|
+
const oe = c.accessibility === "accessible", ce = Re("--spacing-lg", I, 24), E = u("navigation.headerSettings.language.label"), R = u("navigation.headerSettings.appearance.label"), N = S[ae(w) ? w : "en"], x = [
|
|
304
318
|
{
|
|
305
319
|
value: "light",
|
|
306
|
-
label:
|
|
320
|
+
label: u("navigation.headerSettings.appearance.light")
|
|
307
321
|
},
|
|
308
|
-
{ value: "dark", label:
|
|
322
|
+
{ value: "dark", label: u("navigation.headerSettings.appearance.dark") },
|
|
309
323
|
{
|
|
310
324
|
value: "system",
|
|
311
|
-
label:
|
|
325
|
+
label: u("navigation.headerSettings.appearance.system")
|
|
312
326
|
}
|
|
313
|
-
],
|
|
327
|
+
], G = u("navigation.headerSettings.back");
|
|
314
328
|
return /* @__PURE__ */ t(
|
|
315
329
|
"div",
|
|
316
330
|
{
|
|
317
331
|
ref: I,
|
|
318
332
|
"data-component": "header-settings",
|
|
319
|
-
"data-component-id":
|
|
320
|
-
className:
|
|
321
|
-
...
|
|
322
|
-
children: /* @__PURE__ */
|
|
333
|
+
"data-component-id": z,
|
|
334
|
+
className: Ie({ align: g, className: ne }),
|
|
335
|
+
...re,
|
|
336
|
+
children: /* @__PURE__ */ p(
|
|
323
337
|
n.Root,
|
|
324
338
|
{
|
|
325
339
|
onOpenChange: (e) => {
|
|
@@ -327,102 +341,102 @@ const Ke = ie(
|
|
|
327
341
|
},
|
|
328
342
|
children: [
|
|
329
343
|
/* @__PURE__ */ t(n.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
330
|
-
|
|
344
|
+
he,
|
|
331
345
|
{
|
|
332
|
-
size:
|
|
333
|
-
disabled:
|
|
334
|
-
icon: /* @__PURE__ */ t(
|
|
335
|
-
"aria-label":
|
|
346
|
+
size: b,
|
|
347
|
+
disabled: C,
|
|
348
|
+
icon: /* @__PURE__ */ t(Ae, { "aria-hidden": !0 }),
|
|
349
|
+
"aria-label": u("navigation.headerSettings.trigger")
|
|
336
350
|
}
|
|
337
351
|
) }),
|
|
338
352
|
/* @__PURE__ */ t(
|
|
339
353
|
n.Content,
|
|
340
354
|
{
|
|
341
355
|
ref: k,
|
|
342
|
-
align:
|
|
343
|
-
collisionPadding:
|
|
344
|
-
className:
|
|
345
|
-
...
|
|
356
|
+
align: g,
|
|
357
|
+
collisionPadding: ce,
|
|
358
|
+
className: Pe({ language: l === "language" }),
|
|
359
|
+
...l === "language" ? {
|
|
346
360
|
role: "dialog",
|
|
347
361
|
"aria-orientation": void 0,
|
|
348
|
-
"aria-label":
|
|
362
|
+
"aria-label": E,
|
|
349
363
|
"aria-labelledby": void 0
|
|
350
364
|
} : {},
|
|
351
|
-
onKeyDownCapture:
|
|
365
|
+
onKeyDownCapture: se,
|
|
352
366
|
onEscapeKeyDown: (e) => {
|
|
353
367
|
e.isComposing && e.preventDefault();
|
|
354
368
|
},
|
|
355
|
-
children:
|
|
369
|
+
children: l === "language" ? /* @__PURE__ */ p(
|
|
356
370
|
"div",
|
|
357
371
|
{
|
|
358
372
|
role: "presentation",
|
|
359
373
|
onKeyDown: (e) => {
|
|
360
|
-
var
|
|
361
|
-
e.key === "Tab" && !e.altKey && !e.ctrlKey && !e.metaKey && (e.preventDefault(), (
|
|
374
|
+
var s;
|
|
375
|
+
e.key === "Tab" && !e.altKey && !e.ctrlKey && !e.metaKey && (e.preventDefault(), (s = e.currentTarget.querySelector(
|
|
362
376
|
e.target instanceof HTMLInputElement ? "button" : "input"
|
|
363
|
-
)) == null ||
|
|
377
|
+
)) == null || s.focus()), e.stopPropagation();
|
|
364
378
|
},
|
|
365
379
|
children: [
|
|
366
380
|
/* @__PURE__ */ t(
|
|
367
|
-
|
|
381
|
+
me,
|
|
368
382
|
{
|
|
369
383
|
intent: "ghost",
|
|
370
384
|
size: "sm",
|
|
371
385
|
className: "ds:w-full ds:justify-start ds:text-start ds:font-normal ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:gap-[var(--spacing-sm)] ds:[&>span:last-child]:flex-1",
|
|
372
|
-
startIcon: /* @__PURE__ */ t(
|
|
386
|
+
startIcon: /* @__PURE__ */ t(Y, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
373
387
|
flipIconInRtl: !0,
|
|
374
|
-
onClick:
|
|
375
|
-
children: /* @__PURE__ */ t(A, { label:
|
|
388
|
+
onClick: K,
|
|
389
|
+
children: /* @__PURE__ */ t(A, { label: G, value: E })
|
|
376
390
|
}
|
|
377
391
|
),
|
|
378
392
|
/* @__PURE__ */ t(n.Separator, {}),
|
|
379
|
-
/* @__PURE__ */ t(
|
|
393
|
+
/* @__PURE__ */ t(te.SearchList, { onLocaleChange: o })
|
|
380
394
|
]
|
|
381
395
|
}
|
|
382
|
-
) :
|
|
396
|
+
) : l === "appearance" ? /* @__PURE__ */ p(X, { children: [
|
|
383
397
|
/* @__PURE__ */ t(
|
|
384
398
|
n.Item,
|
|
385
399
|
{
|
|
386
400
|
startIcon: /* @__PURE__ */ t(
|
|
387
|
-
|
|
401
|
+
Y,
|
|
388
402
|
{
|
|
389
403
|
"aria-hidden": !0,
|
|
390
404
|
className: "ds:size-4 ds:rtl:-scale-x-100"
|
|
391
405
|
}
|
|
392
406
|
),
|
|
393
407
|
onSelect: (e) => {
|
|
394
|
-
e.preventDefault(),
|
|
408
|
+
e.preventDefault(), K();
|
|
395
409
|
},
|
|
396
|
-
children: /* @__PURE__ */ t(A, { label:
|
|
410
|
+
children: /* @__PURE__ */ t(A, { label: G, value: R })
|
|
397
411
|
}
|
|
398
412
|
),
|
|
399
413
|
/* @__PURE__ */ t(n.Separator, {}),
|
|
400
414
|
/* @__PURE__ */ t(
|
|
401
415
|
n.RadioGroup,
|
|
402
416
|
{
|
|
403
|
-
"aria-label":
|
|
404
|
-
value:
|
|
405
|
-
onValueChange: (e) =>
|
|
417
|
+
"aria-label": R,
|
|
418
|
+
value: c.theme,
|
|
419
|
+
onValueChange: (e) => c.setTheme(e),
|
|
406
420
|
children: x.map((e) => /* @__PURE__ */ t(
|
|
407
421
|
n.RadioItem,
|
|
408
422
|
{
|
|
409
423
|
value: e.value,
|
|
410
|
-
onSelect: (
|
|
424
|
+
onSelect: (s) => s.preventDefault(),
|
|
411
425
|
children: e.label
|
|
412
426
|
},
|
|
413
427
|
e.value
|
|
414
428
|
))
|
|
415
429
|
}
|
|
416
430
|
)
|
|
417
|
-
] }) : /* @__PURE__ */
|
|
418
|
-
|
|
431
|
+
] }) : /* @__PURE__ */ p(X, { children: [
|
|
432
|
+
m ? /* @__PURE__ */ t(
|
|
419
433
|
n.Item,
|
|
420
434
|
{
|
|
421
|
-
ref:
|
|
435
|
+
ref: O,
|
|
422
436
|
"aria-haspopup": "dialog",
|
|
423
|
-
"data-value":
|
|
437
|
+
"data-value": N.code,
|
|
424
438
|
endIcon: /* @__PURE__ */ t(
|
|
425
|
-
|
|
439
|
+
Z,
|
|
426
440
|
{
|
|
427
441
|
"aria-hidden": !0,
|
|
428
442
|
className: "ds:size-4 ds:rtl:-scale-x-100"
|
|
@@ -431,29 +445,35 @@ const Ke = ie(
|
|
|
431
445
|
onPointerDown: (e) => {
|
|
432
446
|
T.current = e.pointerType;
|
|
433
447
|
},
|
|
434
|
-
onKeyDown: (e) =>
|
|
448
|
+
onKeyDown: (e) => q(e, "language"),
|
|
435
449
|
onSelect: (e) => {
|
|
436
450
|
e.preventDefault(), h("language");
|
|
437
451
|
},
|
|
438
452
|
children: /* @__PURE__ */ t(
|
|
439
453
|
A,
|
|
440
454
|
{
|
|
441
|
-
label:
|
|
442
|
-
value:
|
|
443
|
-
lang:
|
|
455
|
+
label: E,
|
|
456
|
+
value: N.nativeName,
|
|
457
|
+
lang: N.code
|
|
444
458
|
}
|
|
445
459
|
)
|
|
446
460
|
}
|
|
447
|
-
) : /* @__PURE__ */ t(
|
|
461
|
+
) : /* @__PURE__ */ t(
|
|
462
|
+
Ne,
|
|
463
|
+
{
|
|
464
|
+
locale: w,
|
|
465
|
+
onLocaleChange: o
|
|
466
|
+
}
|
|
467
|
+
),
|
|
448
468
|
/* @__PURE__ */ t(n.Separator, {}),
|
|
449
|
-
|
|
469
|
+
m ? /* @__PURE__ */ t(
|
|
450
470
|
n.Item,
|
|
451
471
|
{
|
|
452
|
-
ref:
|
|
472
|
+
ref: V,
|
|
453
473
|
"aria-haspopup": "menu",
|
|
454
|
-
"data-value":
|
|
474
|
+
"data-value": c.theme,
|
|
455
475
|
endIcon: /* @__PURE__ */ t(
|
|
456
|
-
|
|
476
|
+
Z,
|
|
457
477
|
{
|
|
458
478
|
"aria-hidden": !0,
|
|
459
479
|
className: "ds:size-4 ds:rtl:-scale-x-100"
|
|
@@ -462,35 +482,35 @@ const Ke = ie(
|
|
|
462
482
|
onPointerDown: (e) => {
|
|
463
483
|
T.current = e.pointerType;
|
|
464
484
|
},
|
|
465
|
-
onKeyDown: (e) =>
|
|
485
|
+
onKeyDown: (e) => q(e, "appearance"),
|
|
466
486
|
onSelect: (e) => {
|
|
467
487
|
e.preventDefault(), h("appearance");
|
|
468
488
|
},
|
|
469
489
|
children: /* @__PURE__ */ t(
|
|
470
490
|
A,
|
|
471
491
|
{
|
|
472
|
-
label:
|
|
473
|
-
value: ((
|
|
474
|
-
(e) => e.value ===
|
|
475
|
-
)) == null ? void 0 :
|
|
492
|
+
label: R,
|
|
493
|
+
value: ((Q = x.find(
|
|
494
|
+
(e) => e.value === c.theme
|
|
495
|
+
)) == null ? void 0 : Q.label) ?? ""
|
|
476
496
|
}
|
|
477
497
|
)
|
|
478
498
|
}
|
|
479
499
|
) : /* @__PURE__ */ t(
|
|
480
500
|
n.ChoiceSub,
|
|
481
501
|
{
|
|
482
|
-
label:
|
|
483
|
-
value:
|
|
484
|
-
onValueChange:
|
|
502
|
+
label: R,
|
|
503
|
+
value: c.theme,
|
|
504
|
+
onValueChange: c.setTheme,
|
|
485
505
|
options: x
|
|
486
506
|
}
|
|
487
507
|
),
|
|
488
508
|
/* @__PURE__ */ t(
|
|
489
509
|
n.SwitchItem,
|
|
490
510
|
{
|
|
491
|
-
checked:
|
|
492
|
-
onCheckedChange: (e) =>
|
|
493
|
-
children:
|
|
511
|
+
checked: oe,
|
|
512
|
+
onCheckedChange: (e) => c.setAccessibility(e ? "accessible" : "default"),
|
|
513
|
+
children: u("navigation.headerSettings.appearance.accessible")
|
|
494
514
|
}
|
|
495
515
|
)
|
|
496
516
|
] })
|
|
@@ -503,8 +523,8 @@ const Ke = ie(
|
|
|
503
523
|
);
|
|
504
524
|
}
|
|
505
525
|
);
|
|
506
|
-
|
|
526
|
+
xe.displayName = "HeaderSettings";
|
|
507
527
|
export {
|
|
508
|
-
|
|
528
|
+
xe as H
|
|
509
529
|
};
|
|
510
|
-
//# sourceMappingURL=header-settings-
|
|
530
|
+
//# sourceMappingURL=header-settings-BVhjndtV.js.map
|