@alfadocs/ui-kit 1.25.1-calendar.7 → 1.26.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/{address-fields-jFfjxOQR.js → address-fields-CZ0pEdEI.js} +3 -3
- package/dist/_chunks/{appointment-card-CvUFFEdS.js → appointment-card-Dzr3GeVz.js} +6 -8
- package/dist/_chunks/{appointment-timeline-DsMZY7U9.js → appointment-timeline-DhHwmHo1.js} +2 -2
- package/dist/_chunks/{appointment-tray-Z2GaOIYQ.js → appointment-tray-4FUu_5NX.js} +2 -2
- package/dist/_chunks/{booking-B8C7jMrn.js → booking-BtSOKjQu.js} +401 -384
- package/dist/_chunks/{calendar-CBqU-UIR.js → calendar-CI9MINcR.js} +2 -4
- package/dist/_chunks/calendar-workspace-CTXjHC4R.js +7506 -0
- package/dist/_chunks/{color-picker-Bl5f0iK1.js → color-picker-CU303VjY.js} +25 -28
- package/dist/_chunks/{combobox-DnSdYssy.js → combobox-D7_NLE2Z.js} +215 -216
- package/dist/_chunks/{country-select-CfDNFG5c.js → country-select-DzbPFktV.js} +2 -2
- package/dist/_chunks/{face-scheme-l-CQyLs-.js → face-scheme-DA2vjqaM.js} +2 -2
- package/dist/_chunks/{notes-panel-D4S2VwDx.js → notes-panel-CTNpsByN.js} +2 -2
- package/dist/_chunks/{patient-details-CdfursHt.js → patient-details-DYAmq76G.js} +3 -3
- package/dist/_chunks/{province-select-BaUnkg4S.js → province-select-BBc7s7vR.js} +2 -2
- package/dist/_chunks/{rich-text-editor-VJATL1Tk.js → rich-text-editor-lSCiE0Zz.js} +2 -2
- package/dist/_chunks/signature-status-chip-n57D-hhv.js +179 -0
- package/dist/agent-catalog.json +3 -6
- package/dist/agent-i18n/en.json +2 -2
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/combobox.d.ts +0 -5
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/province-select/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/signature-status-chip/index.d.ts +2 -2
- package/dist/components/signature-status-chip/index.js +4 -3
- package/dist/components/signature-status-chip/signature-status-chip.d.ts +100 -1
- package/dist/i18n/locales/ar.d.ts +13 -0
- package/dist/i18n/locales/ar.js +17 -1
- package/dist/i18n/locales/de.d.ts +13 -0
- package/dist/i18n/locales/de.js +17 -1
- package/dist/i18n/locales/el.d.ts +13 -0
- package/dist/i18n/locales/el.js +17 -1
- package/dist/i18n/locales/en.d.ts +13 -0
- package/dist/i18n/locales/en.js +17 -1
- package/dist/i18n/locales/es.d.ts +13 -0
- package/dist/i18n/locales/es.js +17 -1
- package/dist/i18n/locales/fr.d.ts +13 -0
- package/dist/i18n/locales/fr.js +17 -1
- package/dist/i18n/locales/hi.d.ts +13 -0
- package/dist/i18n/locales/hi.js +13 -1
- package/dist/i18n/locales/it.d.ts +13 -0
- package/dist/i18n/locales/it.js +17 -1
- package/dist/i18n/locales/ja.d.ts +13 -0
- package/dist/i18n/locales/ja.js +17 -1
- package/dist/i18n/locales/nl.d.ts +13 -0
- package/dist/i18n/locales/nl.js +17 -1
- package/dist/i18n/locales/pl.d.ts +13 -0
- package/dist/i18n/locales/pl.js +17 -1
- package/dist/i18n/locales/pt.d.ts +13 -0
- package/dist/i18n/locales/pt.js +17 -1
- package/dist/i18n/locales/ro.d.ts +13 -0
- package/dist/i18n/locales/ro.js +17 -1
- package/dist/i18n/locales/ru.d.ts +13 -0
- package/dist/i18n/locales/ru.js +17 -1
- package/dist/i18n/locales/sq.d.ts +13 -0
- package/dist/i18n/locales/sq.js +17 -1
- package/dist/i18n/locales/sv.d.ts +13 -0
- package/dist/i18n/locales/sv.js +17 -1
- package/dist/i18n/locales/tr.d.ts +13 -0
- package/dist/i18n/locales/tr.js +17 -1
- package/dist/i18n/locales/zh.d.ts +13 -0
- package/dist/i18n/locales/zh.js +13 -1
- package/dist/index.js +281 -280
- package/dist/locales/ar.json +14 -1
- package/dist/locales/de.json +14 -1
- package/dist/locales/el.json +14 -1
- package/dist/locales/en.json +14 -1
- package/dist/locales/es.json +14 -1
- package/dist/locales/fr.json +14 -1
- package/dist/locales/hi.json +14 -1
- package/dist/locales/it.json +14 -1
- package/dist/locales/ja.json +14 -1
- package/dist/locales/nl.json +14 -1
- package/dist/locales/pl.json +14 -1
- package/dist/locales/pt.json +14 -1
- package/dist/locales/ro.json +14 -1
- package/dist/locales/ru.json +14 -1
- package/dist/locales/sq.json +14 -1
- package/dist/locales/sv.json +14 -1
- package/dist/locales/tr.json +14 -1
- package/dist/locales/zh.json +14 -1
- package/dist/patterns/calendar/calendar-workspace.d.ts +1 -21
- package/dist/patterns/calendar/calendar-workspace.model.d.ts +3 -1
- package/dist/patterns/calendar/calendar.data.d.ts +0 -17
- package/dist/patterns/calendar/calendar.journey.d.ts +1 -3
- package/dist/patterns/calendar/calendar.model.d.ts +0 -9
- package/dist/patterns/calendar/calendar.sheets.d.ts +4 -12
- package/dist/patterns/calendar/calendar.surface.d.ts +1 -3
- package/dist/patterns/calendar/index.d.ts +2 -3
- package/dist/patterns/calendar/index.js +1 -1
- package/package.json +2 -3
- package/dist/_chunks/calendar-workspace-CDhW8tPy.js +0 -7881
- package/dist/_chunks/signature-status-chip-DqrPIJtH.js +0 -97
- package/dist/patterns/calendar/calendar-editor-hydration.d.ts +0 -36
- package/dist/patterns/calendar/calendar-patient-picker.d.ts +0 -11
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import * as
|
|
4
|
-
import { R as
|
|
5
|
-
import { c as
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { u as
|
|
8
|
-
import { c as
|
|
9
|
-
import { n as
|
|
10
|
-
import { g as
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { I as
|
|
14
|
-
import { u as
|
|
15
|
-
import { X as
|
|
16
|
-
import { C as
|
|
17
|
-
const
|
|
1
|
+
import { jsx as t, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ke, useContext as Ke, useMemo as B, useState as oe, useRef as g, useEffect as I, useCallback as Oe } from "react";
|
|
3
|
+
import * as _ from "@radix-ui/react-popover";
|
|
4
|
+
import { R as Te, _ as c, P as $e } from "./index-4xgbg-sn.js";
|
|
5
|
+
import { c as F } from "./index-D2ZczOXr.js";
|
|
6
|
+
import { useTranslation as Be } from "react-i18next";
|
|
7
|
+
import { u as Ue, F as He } from "./form-field-context-B3APVHKx.js";
|
|
8
|
+
import { c as Ge } from "./compose-refs-C0k0tdqF.js";
|
|
9
|
+
import { n as U } from "./normalize-diacritics-BNGbFNlJ.js";
|
|
10
|
+
import { g as Me } from "./group-options-BvKhQ3xb.js";
|
|
11
|
+
import { u as Le } from "./use-controllable-state-BiY4xTzM.js";
|
|
12
|
+
import { u as Qe } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
13
|
+
import { I as Xe, a as H, d as G, c as We } from "./input-surface-xyERuLU_.js";
|
|
14
|
+
import { u as Je } from "./registry-DvAUVLHh.js";
|
|
15
|
+
import { X as Ye } from "./x-B5YnXwCz.js";
|
|
16
|
+
import { C as Ze } from "./check-DrFSN__t.js";
|
|
17
|
+
const et = {
|
|
18
18
|
id: "combobox",
|
|
19
19
|
// Persisted single choice (value state + set_value) → select_single + set_value,
|
|
20
20
|
// plus type-to-filter and open/close of the option list.
|
|
@@ -58,8 +58,8 @@ const tt = {
|
|
|
58
58
|
descriptionKey: "ui.agent.combobox.actions.setValue",
|
|
59
59
|
description: "Set the selected value programmatically.",
|
|
60
60
|
examples: [{ args: { value: "it" }, note: 'Select the "it" option.' }],
|
|
61
|
-
invoke: (s,
|
|
62
|
-
s.setValue(
|
|
61
|
+
invoke: (s, a) => {
|
|
62
|
+
s.setValue(a.value);
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
apply_filter: {
|
|
@@ -76,8 +76,8 @@ const tt = {
|
|
|
76
76
|
idempotent: !0,
|
|
77
77
|
descriptionKey: "ui.agent.combobox.actions.applyFilter",
|
|
78
78
|
description: "Set the filter query for the option list.",
|
|
79
|
-
invoke: (s,
|
|
80
|
-
s.setQuery(
|
|
79
|
+
invoke: (s, a) => {
|
|
80
|
+
s.setQuery(a.query);
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
clear_selection: {
|
|
@@ -121,7 +121,7 @@ const tt = {
|
|
|
121
121
|
description: "Each option emits its value as data-option-id."
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
},
|
|
124
|
+
}, tt = F(
|
|
125
125
|
[
|
|
126
126
|
"ds:peer ds:w-full ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground",
|
|
127
127
|
"ds:outline-none ds:border-0",
|
|
@@ -139,26 +139,26 @@ const tt = {
|
|
|
139
139
|
size: "md"
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
),
|
|
142
|
+
), st = F(
|
|
143
143
|
[
|
|
144
144
|
"ds:group ds:relative ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)] ds:w-full",
|
|
145
|
-
|
|
145
|
+
We
|
|
146
146
|
].join(" "),
|
|
147
147
|
{
|
|
148
148
|
variants: {
|
|
149
149
|
size: {
|
|
150
|
-
sm: `${
|
|
151
|
-
md: `${
|
|
152
|
-
lg: `${
|
|
150
|
+
sm: `${H.sm} ${G.sm}`,
|
|
151
|
+
md: `${H.md} ${G.md}`,
|
|
152
|
+
lg: `${H.lg} ${G.lg}`
|
|
153
153
|
},
|
|
154
|
-
tone:
|
|
154
|
+
tone: Xe
|
|
155
155
|
},
|
|
156
156
|
defaultVariants: {
|
|
157
157
|
size: "md",
|
|
158
158
|
tone: "default"
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
),
|
|
161
|
+
), ot = F(
|
|
162
162
|
[
|
|
163
163
|
"ds:z-[var(--z-popover)] ds:overflow-hidden ds:w-[var(--radix-popover-trigger-width)]",
|
|
164
164
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background ds:text-foreground",
|
|
@@ -170,7 +170,7 @@ const tt = {
|
|
|
170
170
|
"ds:data-[side=top]:slide-in-from-bottom-2",
|
|
171
171
|
"ds:motion-reduce:animate-none"
|
|
172
172
|
].join(" ")
|
|
173
|
-
),
|
|
173
|
+
), ne = F(
|
|
174
174
|
[
|
|
175
175
|
"ds:relative ds:flex ds:cursor-pointer ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
176
176
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -192,212 +192,211 @@ const tt = {
|
|
|
192
192
|
size: "md"
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
),
|
|
195
|
+
), nt = [
|
|
196
196
|
"ds:ps-3 ds:pe-3 ds:py-1.5",
|
|
197
197
|
"type-eyebrow ds:text-muted-foreground"
|
|
198
|
-
].join(" "),
|
|
198
|
+
].join(" "), rt = "ds:max-h-[18rem] ds:overflow-y-auto ds:p-[var(--spacing-xs)]", at = "ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", it = {
|
|
199
199
|
sm: "ds:size-3.5",
|
|
200
200
|
md: "ds:size-4",
|
|
201
201
|
lg: "ds:size-5"
|
|
202
202
|
};
|
|
203
|
-
function
|
|
203
|
+
function dt({
|
|
204
204
|
search: s,
|
|
205
|
-
label:
|
|
206
|
-
iconClass:
|
|
207
|
-
size:
|
|
208
|
-
onSelect:
|
|
205
|
+
label: a,
|
|
206
|
+
iconClass: E,
|
|
207
|
+
size: V,
|
|
208
|
+
onSelect: j
|
|
209
209
|
}) {
|
|
210
|
-
return
|
|
211
|
-
|
|
210
|
+
return $e((q) => q.filtered.count) > 0 ? null : /* @__PURE__ */ S(
|
|
211
|
+
c.Item,
|
|
212
212
|
{
|
|
213
213
|
value: `__combobox-create__${s}`,
|
|
214
214
|
keywords: [],
|
|
215
215
|
forceMount: !0,
|
|
216
|
-
onSelect: () =>
|
|
217
|
-
className:
|
|
216
|
+
onSelect: () => j(s),
|
|
217
|
+
className: ne({ size: V }),
|
|
218
218
|
children: [
|
|
219
219
|
/* @__PURE__ */ t(
|
|
220
220
|
"span",
|
|
221
221
|
{
|
|
222
222
|
"aria-hidden": "true",
|
|
223
|
-
className: `ds:inline-flex ds:items-center ds:justify-center ${
|
|
223
|
+
className: `ds:inline-flex ds:items-center ds:justify-center ${E}`
|
|
224
224
|
}
|
|
225
225
|
),
|
|
226
|
-
/* @__PURE__ */ t("span", { className: "ds:flex-1 ds:truncate", children:
|
|
226
|
+
/* @__PURE__ */ t("span", { className: "ds:flex-1 ds:truncate", children: a })
|
|
227
227
|
]
|
|
228
228
|
}
|
|
229
229
|
);
|
|
230
230
|
}
|
|
231
|
-
const
|
|
231
|
+
const re = ke(
|
|
232
232
|
function({
|
|
233
|
-
options:
|
|
234
|
-
value:
|
|
235
|
-
defaultValue:
|
|
236
|
-
onValueChange:
|
|
237
|
-
placeholder:
|
|
233
|
+
options: a,
|
|
234
|
+
value: E,
|
|
235
|
+
defaultValue: V,
|
|
236
|
+
onValueChange: j,
|
|
237
|
+
placeholder: M,
|
|
238
238
|
clearable: q = !1,
|
|
239
|
-
disabled:
|
|
240
|
-
readOnly:
|
|
241
|
-
required:
|
|
242
|
-
name:
|
|
243
|
-
id:
|
|
244
|
-
size:
|
|
245
|
-
tone:
|
|
246
|
-
filter:
|
|
247
|
-
allowCreate:
|
|
248
|
-
onCreate:
|
|
249
|
-
open:
|
|
250
|
-
onOpenChange:
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
"aria-
|
|
255
|
-
"aria-
|
|
256
|
-
"aria-describedby": ve,
|
|
239
|
+
disabled: ae,
|
|
240
|
+
readOnly: ie,
|
|
241
|
+
required: de,
|
|
242
|
+
name: le,
|
|
243
|
+
id: A,
|
|
244
|
+
size: v = "md",
|
|
245
|
+
tone: ce = "default",
|
|
246
|
+
filter: D,
|
|
247
|
+
allowCreate: ue = !1,
|
|
248
|
+
onCreate: P,
|
|
249
|
+
open: L,
|
|
250
|
+
onOpenChange: u,
|
|
251
|
+
emptyMessage: me,
|
|
252
|
+
className: pe,
|
|
253
|
+
"aria-label": Q,
|
|
254
|
+
"aria-invalid": fe,
|
|
255
|
+
"aria-describedby": be,
|
|
257
256
|
autoComplete: he
|
|
258
257
|
}, ge) {
|
|
259
|
-
const { t: y } =
|
|
260
|
-
value:
|
|
261
|
-
defaultValue:
|
|
262
|
-
onChange:
|
|
263
|
-
}),
|
|
264
|
-
() =>
|
|
265
|
-
[
|
|
266
|
-
),
|
|
267
|
-
|
|
258
|
+
const { t: y } = Be(), b = Ue(), x = Ke(He) !== null, [ve, N] = Le({
|
|
259
|
+
value: E,
|
|
260
|
+
defaultValue: V ?? "",
|
|
261
|
+
onChange: j
|
|
262
|
+
}), m = ve ?? "", k = B(
|
|
263
|
+
() => a.find((e) => e.value === m),
|
|
264
|
+
[a, m]
|
|
265
|
+
), C = (k == null ? void 0 : k.label) ?? "", [p, i] = oe(C), [ye, X] = oe(!1), z = L !== void 0, d = z ? L : ye, R = g(!1), w = g(null), W = g(null);
|
|
266
|
+
Qe(() => {
|
|
268
267
|
var e;
|
|
269
|
-
(e =
|
|
270
|
-
}),
|
|
271
|
-
|
|
272
|
-
}, [
|
|
273
|
-
const
|
|
274
|
-
() => (e, o,
|
|
275
|
-
if (
|
|
276
|
-
const
|
|
277
|
-
return
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
268
|
+
(e = w.current) == null || e.setAttribute("aria-expanded", String(d));
|
|
269
|
+
}), I(() => {
|
|
270
|
+
d || i(C);
|
|
271
|
+
}, [C, d]);
|
|
272
|
+
const xe = A ?? (x ? b.id : void 0), K = (x ? b.disabled : !1) || !!ae, h = !!ie, Ce = (x ? b.required : !1) || !!de, J = x ? b.invalid : !!fe, Se = J ? "error" : ce, Ne = x && b.describedBy ? b.describedBy : be, Y = M ?? y("inputs.combobox.placeholder", "Search…"), ze = B(
|
|
273
|
+
() => (e, o, r) => {
|
|
274
|
+
if (R.current) return 1;
|
|
275
|
+
const f = U(e), n = U(o), $ = r == null ? void 0 : r.map(U);
|
|
276
|
+
return D ? D(f, n) : Te(
|
|
277
|
+
f,
|
|
278
|
+
n,
|
|
279
|
+
$
|
|
281
280
|
);
|
|
282
281
|
},
|
|
283
|
-
[
|
|
284
|
-
),
|
|
285
|
-
|
|
286
|
-
},
|
|
287
|
-
|
|
282
|
+
[D]
|
|
283
|
+
), Z = (e) => {
|
|
284
|
+
N(e);
|
|
285
|
+
}, l = (e) => {
|
|
286
|
+
z || X(e), u == null || u(e);
|
|
287
|
+
}, Re = (e) => {
|
|
288
|
+
const o = a.find((r) => r.value === e);
|
|
289
|
+
Z(e), i((o == null ? void 0 : o.label) ?? ""), l(!1);
|
|
290
|
+
}, we = (e) => {
|
|
291
|
+
P == null || P(e), l(!1);
|
|
288
292
|
}, Ie = (e) => {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
h || (d(e), z.current || r == null || r(e), !l && e.length > 0 && !z.current && c(!0));
|
|
293
|
+
h || (i(e), !d && e.length > 0 && !R.current && l(!0));
|
|
294
|
+
}, _e = () => {
|
|
295
|
+
!K && !h && l(!0);
|
|
296
|
+
}, Fe = () => {
|
|
297
|
+
R.current = !0;
|
|
295
298
|
}, Ee = () => {
|
|
296
|
-
!O && !h && c(!0);
|
|
297
|
-
}, Ve = () => {
|
|
298
|
-
z.current = !0;
|
|
299
|
-
}, Ce = () => {
|
|
300
299
|
var o;
|
|
301
|
-
if (
|
|
302
|
-
const e = ((o =
|
|
303
|
-
|
|
300
|
+
if (R.current = !1, h) return;
|
|
301
|
+
const e = ((o = w.current) == null ? void 0 : o.value) ?? "";
|
|
302
|
+
i(e), e.length > 0 && l(!0);
|
|
303
|
+
}, Ve = (e) => {
|
|
304
|
+
e.nativeEvent.isComposing || e.key === "Escape" && d && (e.preventDefault(), l(!1), i(C));
|
|
304
305
|
}, je = (e) => {
|
|
305
|
-
e.nativeEvent.isComposing || e.key === "Escape" && l && (e.preventDefault(), c(!1), d(N));
|
|
306
|
-
}, Ae = (e) => {
|
|
307
306
|
var o;
|
|
308
|
-
e.preventDefault(), e.stopPropagation(),
|
|
307
|
+
e.preventDefault(), e.stopPropagation(), Z(""), i(""), l(!0), (o = w.current) == null || o.focus();
|
|
309
308
|
}, qe = (e) => {
|
|
310
|
-
h && e || (
|
|
311
|
-
},
|
|
312
|
-
|
|
309
|
+
h && e || (l(e), e || i(C));
|
|
310
|
+
}, ee = g(m);
|
|
311
|
+
I(() => {
|
|
312
|
+
ee.current = m;
|
|
313
|
+
}, [m]);
|
|
314
|
+
const te = g(p);
|
|
315
|
+
I(() => {
|
|
313
316
|
te.current = p;
|
|
314
317
|
}, [p]);
|
|
315
|
-
const se = g(
|
|
316
|
-
|
|
317
|
-
se.current =
|
|
318
|
-
}, [
|
|
319
|
-
const
|
|
320
|
-
F(() => {
|
|
321
|
-
oe.current = l;
|
|
322
|
-
}, [l]);
|
|
323
|
-
const T = Te(
|
|
318
|
+
const se = g(d);
|
|
319
|
+
I(() => {
|
|
320
|
+
se.current = d;
|
|
321
|
+
}, [d]);
|
|
322
|
+
const O = Oe(
|
|
324
323
|
(e) => {
|
|
325
|
-
|
|
324
|
+
z || X(e), u == null || u(e);
|
|
326
325
|
},
|
|
327
|
-
[
|
|
328
|
-
),
|
|
326
|
+
[z, u]
|
|
327
|
+
), Ae = B(
|
|
329
328
|
() => ({
|
|
330
|
-
getValue: () =>
|
|
331
|
-
getQuery: () =>
|
|
332
|
-
getIsOpen: () =>
|
|
329
|
+
getValue: () => ee.current || null,
|
|
330
|
+
getQuery: () => te.current,
|
|
331
|
+
getIsOpen: () => se.current,
|
|
333
332
|
setValue: (e) => {
|
|
334
333
|
const o = e ?? "";
|
|
335
|
-
|
|
336
|
-
const
|
|
337
|
-
|
|
334
|
+
N(o);
|
|
335
|
+
const r = a.find((f) => f.value === o);
|
|
336
|
+
i((r == null ? void 0 : r.label) ?? "");
|
|
338
337
|
},
|
|
339
338
|
setQuery: (e) => {
|
|
340
|
-
|
|
339
|
+
i(e);
|
|
341
340
|
},
|
|
342
341
|
clear: () => {
|
|
343
|
-
|
|
342
|
+
N(""), i("");
|
|
344
343
|
},
|
|
345
|
-
open: () =>
|
|
346
|
-
close: () =>
|
|
344
|
+
open: () => O(!0),
|
|
345
|
+
close: () => O(!1)
|
|
347
346
|
}),
|
|
348
|
-
[
|
|
347
|
+
[N, a, O]
|
|
349
348
|
);
|
|
350
|
-
|
|
351
|
-
const
|
|
352
|
-
return /* @__PURE__ */ t(
|
|
353
|
-
|
|
349
|
+
Je(et, Ae, A);
|
|
350
|
+
const De = q && !!m && !K && !h, Pe = Me(a), T = it[v];
|
|
351
|
+
return /* @__PURE__ */ t(_.Root, { open: d, onOpenChange: qe, children: /* @__PURE__ */ S(
|
|
352
|
+
c,
|
|
354
353
|
{
|
|
355
|
-
filter:
|
|
354
|
+
filter: ze,
|
|
356
355
|
shouldFilter: !0,
|
|
357
356
|
loop: !0,
|
|
358
|
-
label:
|
|
357
|
+
label: Q ?? Y,
|
|
359
358
|
className: "ds:w-full",
|
|
360
359
|
children: [
|
|
361
|
-
/* @__PURE__ */ t(
|
|
360
|
+
/* @__PURE__ */ t(_.Anchor, { asChild: !0, children: /* @__PURE__ */ S(
|
|
362
361
|
"div",
|
|
363
362
|
{
|
|
364
|
-
ref:
|
|
365
|
-
className:
|
|
366
|
-
size:
|
|
367
|
-
tone:
|
|
368
|
-
className:
|
|
363
|
+
ref: W,
|
|
364
|
+
className: st({
|
|
365
|
+
size: v,
|
|
366
|
+
tone: Se,
|
|
367
|
+
className: pe
|
|
369
368
|
}),
|
|
370
369
|
"data-component": "combobox",
|
|
371
|
-
"data-component-id":
|
|
370
|
+
"data-component-id": A,
|
|
372
371
|
children: [
|
|
373
372
|
/* @__PURE__ */ t(
|
|
374
|
-
|
|
373
|
+
c.Input,
|
|
375
374
|
{
|
|
376
|
-
ref:
|
|
377
|
-
value:
|
|
378
|
-
onValueChange:
|
|
379
|
-
id:
|
|
380
|
-
name:
|
|
381
|
-
placeholder:
|
|
382
|
-
disabled:
|
|
375
|
+
ref: Ge(ge, w),
|
|
376
|
+
value: p,
|
|
377
|
+
onValueChange: Ie,
|
|
378
|
+
id: xe,
|
|
379
|
+
name: le,
|
|
380
|
+
placeholder: Y,
|
|
381
|
+
disabled: K,
|
|
383
382
|
readOnly: h,
|
|
384
|
-
required:
|
|
383
|
+
required: Ce,
|
|
385
384
|
autoComplete: he,
|
|
386
|
-
"aria-describedby":
|
|
387
|
-
"aria-invalid":
|
|
388
|
-
onFocus:
|
|
389
|
-
onKeyDown:
|
|
390
|
-
onCompositionStart:
|
|
391
|
-
onCompositionEnd:
|
|
392
|
-
className:
|
|
385
|
+
"aria-describedby": Ne,
|
|
386
|
+
"aria-invalid": J || void 0,
|
|
387
|
+
onFocus: _e,
|
|
388
|
+
onKeyDown: Ve,
|
|
389
|
+
onCompositionStart: Fe,
|
|
390
|
+
onCompositionEnd: Ee,
|
|
391
|
+
className: tt({ size: v })
|
|
393
392
|
}
|
|
394
393
|
),
|
|
395
|
-
|
|
394
|
+
De ? /* @__PURE__ */ t(
|
|
396
395
|
"button",
|
|
397
396
|
{
|
|
398
397
|
type: "button",
|
|
399
398
|
"aria-label": y("inputs.combobox.clear", "Clear selection"),
|
|
400
|
-
onClick:
|
|
399
|
+
onClick: je,
|
|
401
400
|
onPointerDown: (e) => e.stopPropagation(),
|
|
402
401
|
className: [
|
|
403
402
|
"ds:inline-flex ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)]",
|
|
@@ -407,52 +406,52 @@ const ae = Ke(
|
|
|
407
406
|
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
408
407
|
"ds:size-4"
|
|
409
408
|
].join(" "),
|
|
410
|
-
children: /* @__PURE__ */ t(
|
|
409
|
+
children: /* @__PURE__ */ t(Ye, { "aria-hidden": "true", className: "ds:size-3.5" })
|
|
411
410
|
}
|
|
412
411
|
) : null
|
|
413
412
|
]
|
|
414
413
|
}
|
|
415
414
|
) }),
|
|
416
|
-
/* @__PURE__ */ t(
|
|
417
|
-
|
|
415
|
+
/* @__PURE__ */ t(_.Portal, { forceMount: !0, children: /* @__PURE__ */ t(
|
|
416
|
+
_.Content,
|
|
418
417
|
{
|
|
419
418
|
forceMount: !0,
|
|
420
|
-
hidden: !
|
|
421
|
-
"aria-label":
|
|
419
|
+
hidden: !d,
|
|
420
|
+
"aria-label": Q ?? y("inputs.combobox.popupLabel", "Options"),
|
|
422
421
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
423
422
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
424
423
|
onInteractOutside: (e) => {
|
|
425
|
-
var
|
|
424
|
+
var r;
|
|
426
425
|
const o = e.target;
|
|
427
|
-
o && ((
|
|
426
|
+
o && ((r = W.current) != null && r.contains(o)) && e.preventDefault();
|
|
428
427
|
},
|
|
429
428
|
sideOffset: 4,
|
|
430
429
|
align: "start",
|
|
431
|
-
className:
|
|
432
|
-
children: /* @__PURE__ */
|
|
433
|
-
/* @__PURE__ */ t(
|
|
434
|
-
|
|
435
|
-
const
|
|
436
|
-
const
|
|
437
|
-
return /* @__PURE__ */
|
|
438
|
-
|
|
430
|
+
className: ot(),
|
|
431
|
+
children: /* @__PURE__ */ S(c.List, { className: rt, children: [
|
|
432
|
+
/* @__PURE__ */ t(c.Empty, { className: at, children: me ?? y("inputs.combobox.empty", "No results found") }),
|
|
433
|
+
Pe.map(({ group: e, items: o }, r) => {
|
|
434
|
+
const f = o.map((n) => {
|
|
435
|
+
const $ = n.value === m;
|
|
436
|
+
return /* @__PURE__ */ S(
|
|
437
|
+
c.Item,
|
|
439
438
|
{
|
|
440
|
-
value:
|
|
441
|
-
"data-option-id":
|
|
442
|
-
keywords: [
|
|
443
|
-
disabled:
|
|
444
|
-
onSelect:
|
|
445
|
-
className:
|
|
439
|
+
value: n.value,
|
|
440
|
+
"data-option-id": n.value,
|
|
441
|
+
keywords: [n.label],
|
|
442
|
+
disabled: n.disabled,
|
|
443
|
+
onSelect: Re,
|
|
444
|
+
className: ne({ size: v }),
|
|
446
445
|
children: [
|
|
447
446
|
/* @__PURE__ */ t(
|
|
448
447
|
"span",
|
|
449
448
|
{
|
|
450
449
|
"aria-hidden": "true",
|
|
451
|
-
className: `ds:inline-flex ds:items-center ds:justify-center ${
|
|
452
|
-
children:
|
|
450
|
+
className: `ds:inline-flex ds:items-center ds:justify-center ${T}`,
|
|
451
|
+
children: $ ? /* @__PURE__ */ t(Ze, { className: T }) : null
|
|
453
452
|
}
|
|
454
453
|
),
|
|
455
|
-
|
|
454
|
+
n.startAdornment ? (
|
|
456
455
|
// Decorative by contract — the option's accessible
|
|
457
456
|
// name comes from its label. Hide so a text-bearing
|
|
458
457
|
// adornment can't leak into the computed name.
|
|
@@ -461,44 +460,44 @@ const ae = Ke(
|
|
|
461
460
|
{
|
|
462
461
|
"aria-hidden": "true",
|
|
463
462
|
className: "ds:inline-flex ds:items-center ds:shrink-0",
|
|
464
|
-
children:
|
|
463
|
+
children: n.startAdornment
|
|
465
464
|
}
|
|
466
465
|
)
|
|
467
466
|
) : null,
|
|
468
|
-
/* @__PURE__ */ t("span", { className: "ds:flex-1 ds:truncate", children:
|
|
469
|
-
|
|
470
|
-
|
|
467
|
+
/* @__PURE__ */ t("span", { className: "ds:flex-1 ds:truncate", children: n.label }),
|
|
468
|
+
n.description ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-muted-foreground", children: n.description }) : null,
|
|
469
|
+
n.endContent ? (
|
|
471
470
|
// Deliberately NOT aria-hidden — unlike
|
|
472
471
|
// `startAdornment`, this slot carries meaning
|
|
473
472
|
// (a price, a count) and must reach the
|
|
474
473
|
// option's accessible name. `ms-auto` pins it
|
|
475
474
|
// to the inline-end and flips under RTL.
|
|
476
|
-
/* @__PURE__ */ t("span", { className: "ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0", children:
|
|
475
|
+
/* @__PURE__ */ t("span", { className: "ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0", children: n.endContent })
|
|
477
476
|
) : null
|
|
478
477
|
]
|
|
479
478
|
},
|
|
480
|
-
|
|
479
|
+
n.value
|
|
481
480
|
);
|
|
482
481
|
});
|
|
483
482
|
return e ? /* @__PURE__ */ t(
|
|
484
|
-
|
|
483
|
+
c.Group,
|
|
485
484
|
{
|
|
486
|
-
heading: /* @__PURE__ */ t("span", { className:
|
|
487
|
-
children:
|
|
485
|
+
heading: /* @__PURE__ */ t("span", { className: nt, children: e }),
|
|
486
|
+
children: f
|
|
488
487
|
},
|
|
489
488
|
`group-${e}`
|
|
490
|
-
) : /* @__PURE__ */ t(
|
|
489
|
+
) : /* @__PURE__ */ t(c.Group, { children: f }, `group-${r}`);
|
|
491
490
|
}),
|
|
492
|
-
|
|
493
|
-
|
|
491
|
+
ue && p.length > 0 ? /* @__PURE__ */ t(
|
|
492
|
+
dt,
|
|
494
493
|
{
|
|
495
|
-
search:
|
|
494
|
+
search: p,
|
|
496
495
|
label: y("inputs.combobox.create", 'Create "{{value}}"', {
|
|
497
|
-
value:
|
|
496
|
+
value: p
|
|
498
497
|
}),
|
|
499
|
-
iconClass:
|
|
500
|
-
size:
|
|
501
|
-
onSelect:
|
|
498
|
+
iconClass: T,
|
|
499
|
+
size: v,
|
|
500
|
+
onSelect: we
|
|
502
501
|
}
|
|
503
502
|
) : null
|
|
504
503
|
] })
|
|
@@ -509,14 +508,14 @@ const ae = Ke(
|
|
|
509
508
|
) });
|
|
510
509
|
}
|
|
511
510
|
);
|
|
512
|
-
|
|
513
|
-
const
|
|
511
|
+
re.displayName = "Combobox";
|
|
512
|
+
const zt = re;
|
|
514
513
|
export {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
514
|
+
zt as C,
|
|
515
|
+
ot as a,
|
|
516
|
+
tt as b,
|
|
517
|
+
et as c,
|
|
518
|
+
ne as d,
|
|
519
|
+
st as e
|
|
521
520
|
};
|
|
522
|
-
//# sourceMappingURL=combobox-
|
|
521
|
+
//# sourceMappingURL=combobox-D7_NLE2Z.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as O } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as P, useMemo as n, useCallback as x, useRef as aa, useEffect as ea } from "react";
|
|
3
3
|
import { useTranslation as ra } from "react-i18next";
|
|
4
|
-
import { C as ia } from "./combobox-
|
|
4
|
+
import { C as ia } from "./combobox-D7_NLE2Z.js";
|
|
5
5
|
import { h as ca, a as sa } from "./flag-DVBE6DnB.js";
|
|
6
6
|
import { u as ta } from "./use-controllable-state-BiY4xTzM.js";
|
|
7
7
|
import { u as oa } from "./registry-DvAUVLHh.js";
|
|
@@ -706,4 +706,4 @@ export {
|
|
|
706
706
|
ua as c,
|
|
707
707
|
Aa as r
|
|
708
708
|
};
|
|
709
|
-
//# sourceMappingURL=country-select-
|
|
709
|
+
//# sourceMappingURL=country-select-DzbPFktV.js.map
|
|
@@ -8,7 +8,7 @@ import { m as tt, M as Ji, A as Qi } from "./annotation-marker-CsUJGZjQ.js";
|
|
|
8
8
|
import { B as P } from "./button-nJaPh_HC.js";
|
|
9
9
|
import { I as Ze } from "./icon-button-DA2CAGHZ.js";
|
|
10
10
|
import { B as es } from "./button-group-CaxRJsNG.js";
|
|
11
|
-
import { C as ts } from "./combobox-
|
|
11
|
+
import { C as ts } from "./combobox-D7_NLE2Z.js";
|
|
12
12
|
import { I as vn } from "./icon-button-group-VCCod3Hz.js";
|
|
13
13
|
import { T as Ar } from "./text-input-CUvCb6ST.js";
|
|
14
14
|
import { C as Oe } from "./card-DPmk26CL.js";
|
|
@@ -3137,4 +3137,4 @@ export {
|
|
|
3137
3137
|
Nn as t,
|
|
3138
3138
|
Kr as u
|
|
3139
3139
|
};
|
|
3140
|
-
//# sourceMappingURL=face-scheme-
|
|
3140
|
+
//# sourceMappingURL=face-scheme-DA2vjqaM.js.map
|