@alfadocs/ui-kit 0.62.0 → 0.64.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/{ai-prompt-input-C6sCr1Vi.js → ai-prompt-input-Dx8eXoPm.js} +2 -2
- package/dist/_chunks/{audio-recorder-D6OVfNiZ.js → audio-recorder-CdXuT9ln.js} +2 -2
- package/dist/_chunks/{bishop-score-B9tvgoIq.js → bishop-score-CzjSx-dm.js} +2 -2
- package/dist/_chunks/{booking-BUV9fspj.js → booking-ChfvWy3P.js} +2 -2
- package/dist/_chunks/{care-plan-card-QmNpGggC.js → care-plan-card-DhZNoXs4.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-Cnra7vUc.js → care-plan-entry-card-DW70yBOD.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-D5C5tCfu.js → editable-currency-cell-renderer-BQgaKFCz.js} +2 -2
- package/dist/_chunks/finished-terminal-VjZ_-eDD.js +122 -0
- package/dist/_chunks/{gestational-age-calculator-AkNFfZYs.js → gestational-age-calculator-D85E8lGN.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-Dg6dTe1p.js → pregnancy-dating-7NUaAfob.js} +2 -2
- package/dist/_chunks/{select-hsCaJSX3.js → select-CEtRcon5.js} +46 -45
- package/dist/_chunks/{tabs-BpPYVme_.js → tabs-BIQ0ew1T.js} +2 -2
- package/dist/_chunks/tooth-scheme-CiphQaON.js +1257 -0
- package/dist/_chunks/{unit-converter-3sINXO3m.js → unit-converter-BIbXHIQA.js} +2 -2
- package/dist/_chunks/use-countdown-Yd6ts0_a.js +26 -0
- package/dist/agent-catalog.json +55 -4
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/finished-terminal/finished-terminal.d.ts +55 -0
- package/dist/components/finished-terminal/index.d.ts +3 -0
- package/dist/components/finished-terminal/index.js +5 -0
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts +8 -0
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tooth-scheme/index.d.ts +2 -2
- package/dist/components/tooth-scheme/index.js +22 -15
- package/dist/components/tooth-scheme/tooth-data.d.ts +79 -18
- package/dist/components/tooth-scheme/tooth-scheme.agent.d.ts +2 -0
- package/dist/components/tooth-scheme/tooth-scheme.d.ts +48 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/hooks/index.js +79 -99
- package/dist/i18n/locales/ar.d.ts +22 -0
- package/dist/i18n/locales/ar.js +23 -1
- package/dist/i18n/locales/de.d.ts +22 -0
- package/dist/i18n/locales/de.js +23 -1
- package/dist/i18n/locales/el.d.ts +22 -0
- package/dist/i18n/locales/el.js +23 -1
- package/dist/i18n/locales/en.d.ts +22 -0
- package/dist/i18n/locales/en.js +23 -1
- package/dist/i18n/locales/es.d.ts +22 -0
- package/dist/i18n/locales/es.js +23 -1
- package/dist/i18n/locales/fr.d.ts +22 -0
- package/dist/i18n/locales/fr.js +23 -1
- package/dist/i18n/locales/hi.d.ts +22 -0
- package/dist/i18n/locales/hi.js +23 -1
- package/dist/i18n/locales/it.d.ts +22 -0
- package/dist/i18n/locales/it.js +23 -1
- package/dist/i18n/locales/ja.d.ts +22 -0
- package/dist/i18n/locales/ja.js +23 -1
- package/dist/i18n/locales/nl.d.ts +22 -0
- package/dist/i18n/locales/nl.js +23 -1
- package/dist/i18n/locales/pl.d.ts +22 -0
- package/dist/i18n/locales/pl.js +23 -1
- package/dist/i18n/locales/pt.d.ts +22 -0
- package/dist/i18n/locales/pt.js +23 -1
- package/dist/i18n/locales/ro.d.ts +22 -0
- package/dist/i18n/locales/ro.js +23 -1
- package/dist/i18n/locales/ru.d.ts +22 -0
- package/dist/i18n/locales/ru.js +23 -1
- package/dist/i18n/locales/sq.d.ts +22 -0
- package/dist/i18n/locales/sq.js +23 -1
- package/dist/i18n/locales/sv.d.ts +22 -0
- package/dist/i18n/locales/sv.js +23 -1
- package/dist/i18n/locales/tr.d.ts +22 -0
- package/dist/i18n/locales/tr.js +23 -1
- package/dist/i18n/locales/zh.d.ts +22 -0
- package/dist/i18n/locales/zh.js +23 -1
- package/dist/index.js +354 -345
- package/dist/locales/ar.json +23 -1
- package/dist/locales/de.json +23 -1
- package/dist/locales/el.json +23 -1
- package/dist/locales/en.json +23 -1
- package/dist/locales/es.json +23 -1
- package/dist/locales/fr.json +23 -1
- package/dist/locales/hi.json +23 -1
- package/dist/locales/it.json +23 -1
- package/dist/locales/ja.json +23 -1
- package/dist/locales/nl.json +23 -1
- package/dist/locales/pl.json +23 -1
- package/dist/locales/pt.json +23 -1
- package/dist/locales/ro.json +23 -1
- package/dist/locales/ru.json +23 -1
- package/dist/locales/sq.json +23 -1
- package/dist/locales/sv.json +23 -1
- package/dist/locales/tr.json +23 -1
- package/dist/locales/zh.json +23 -1
- package/dist/tokens.css +1 -1
- package/package.json +5 -1
- package/dist/_chunks/tooth-scheme-CxlsLjfN.js +0 -753
|
@@ -8,7 +8,7 @@ import { u as Re } from "./registry-nPAVE19X.js";
|
|
|
8
8
|
import { _ as g } from "./index-4xgbg-sn.js";
|
|
9
9
|
import { u as De } from "./index-BcMWc8W2.js";
|
|
10
10
|
import { I as te } from "./icon-button-CKEOrN37.js";
|
|
11
|
-
import { S as _e } from "./select-
|
|
11
|
+
import { S as _e } from "./select-CEtRcon5.js";
|
|
12
12
|
import { S as Ae } from "./send-CySZIRPJ.js";
|
|
13
13
|
import { X as Le } from "./x-CCcI3eJp.js";
|
|
14
14
|
const Ue = {
|
|
@@ -478,4 +478,4 @@ export {
|
|
|
478
478
|
Ze as A,
|
|
479
479
|
Ue as a
|
|
480
480
|
};
|
|
481
|
-
//# sourceMappingURL=ai-prompt-input-
|
|
481
|
+
//# sourceMappingURL=ai-prompt-input-Dx8eXoPm.js.map
|
|
@@ -4,7 +4,7 @@ import { c as oe } from "./index-D2ZczOXr.js";
|
|
|
4
4
|
import { useTranslation as ue } from "react-i18next";
|
|
5
5
|
import { B as G } from "./button-DD_0Xdmr.js";
|
|
6
6
|
import { I as N } from "./icon-button-CKEOrN37.js";
|
|
7
|
-
import { S as pe } from "./select-
|
|
7
|
+
import { S as pe } from "./select-CEtRcon5.js";
|
|
8
8
|
import { A as le } from "./audio-visualiser-l6zPd0AG.js";
|
|
9
9
|
import { A as F } from "./alert-_mUKLmwA.js";
|
|
10
10
|
import { u as me } from "./registry-nPAVE19X.js";
|
|
@@ -444,4 +444,4 @@ export {
|
|
|
444
444
|
Ne as A,
|
|
445
445
|
Re as a
|
|
446
446
|
};
|
|
447
|
-
//# sourceMappingURL=audio-recorder-
|
|
447
|
+
//# sourceMappingURL=audio-recorder-CdXuT9ln.js.map
|
|
@@ -3,7 +3,7 @@ import { forwardRef as $, useState as w, useMemo as L, useEffect as _ } from "re
|
|
|
3
3
|
import { c as E } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as F } from "react-i18next";
|
|
5
5
|
import { F as I } from "./form-field-BOm9hK35.js";
|
|
6
|
-
import { S as P } from "./select-
|
|
6
|
+
import { S as P } from "./select-CEtRcon5.js";
|
|
7
7
|
import { C as m } from "./card-DPmk26CL.js";
|
|
8
8
|
import { B as T } from "./badge-zsf5i5bH.js";
|
|
9
9
|
import { I as A } from "./insert-result-C1SYdueh.js";
|
|
@@ -182,4 +182,4 @@ export {
|
|
|
182
182
|
D as d,
|
|
183
183
|
M as e
|
|
184
184
|
};
|
|
185
|
-
//# sourceMappingURL=bishop-score-
|
|
185
|
+
//# sourceMappingURL=bishop-score-CzjSx-dm.js.map
|
|
@@ -15,7 +15,7 @@ import { T as Rt } from "./text-area-BIx0tZ05.js";
|
|
|
15
15
|
import { T as Ce } from "./text-input-BaClJL8Y.js";
|
|
16
16
|
import { S as Ft } from "./spinner-OjQNn8oN.js";
|
|
17
17
|
import { I as tt } from "./icon-button-CKEOrN37.js";
|
|
18
|
-
import { S as Oe } from "./select-
|
|
18
|
+
import { S as Oe } from "./select-CEtRcon5.js";
|
|
19
19
|
import { C as Ge } from "./combobox-BC-DFx8G.js";
|
|
20
20
|
import { M as Ue } from "./multi-select-DOLO3K_z.js";
|
|
21
21
|
import { S as _e } from "./skeleton-CZbwyJAA.js";
|
|
@@ -2685,4 +2685,4 @@ export {
|
|
|
2685
2685
|
X as O,
|
|
2686
2686
|
Ma as b
|
|
2687
2687
|
};
|
|
2688
|
-
//# sourceMappingURL=booking-
|
|
2688
|
+
//# sourceMappingURL=booking-ChfvWy3P.js.map
|
|
@@ -7,7 +7,7 @@ import { P as A } from "./progress-kzIRcdaq.js";
|
|
|
7
7
|
import { T as C } from "./timestamp-BV2lC-wV.js";
|
|
8
8
|
import { T as L } from "./transaction-chip-BZCa6XDn.js";
|
|
9
9
|
import { A as O, b as G, c as Y, a as $ } from "./accordion-9lJSMMsZ.js";
|
|
10
|
-
import { C as q } from "./care-plan-entry-card-
|
|
10
|
+
import { C as q } from "./care-plan-entry-card-DW70yBOD.js";
|
|
11
11
|
import { u as J } from "./registry-nPAVE19X.js";
|
|
12
12
|
import { C as Q, e as W } from "./entity-card-COhmqHly.js";
|
|
13
13
|
import { i as X } from "./is-safe-url-DkETxeHz.js";
|
|
@@ -249,4 +249,4 @@ export {
|
|
|
249
249
|
de as C,
|
|
250
250
|
Z as c
|
|
251
251
|
};
|
|
252
|
-
//# sourceMappingURL=care-plan-card-
|
|
252
|
+
//# sourceMappingURL=care-plan-card-DhZNoXs4.js.map
|
|
@@ -6,7 +6,7 @@ import { P as O } from "./progress-kzIRcdaq.js";
|
|
|
6
6
|
import { T as q } from "./tag-CdA0s_VV.js";
|
|
7
7
|
import { T as b } from "./timestamp-BV2lC-wV.js";
|
|
8
8
|
import { T as G } from "./transaction-chip-BZCa6XDn.js";
|
|
9
|
-
import {
|
|
9
|
+
import { T as J } from "./tooth-scheme-CiphQaON.js";
|
|
10
10
|
import { C as Q, b as X, a as Z } from "./collapsible-X3oaLPU3.js";
|
|
11
11
|
import { u as ee } from "./registry-nPAVE19X.js";
|
|
12
12
|
import { C as ae } from "./chevron-down-BX_NP2Yh.js";
|
|
@@ -315,4 +315,4 @@ export {
|
|
|
315
315
|
le as C,
|
|
316
316
|
re as c
|
|
317
317
|
};
|
|
318
|
-
//# sourceMappingURL=care-plan-entry-card-
|
|
318
|
+
//# sourceMappingURL=care-plan-entry-card-DW70yBOD.js.map
|
|
@@ -23,7 +23,7 @@ import { F as ke } from "./file-text-DSNuv2B8.js";
|
|
|
23
23
|
import { D as ne } from "./download-CDF1sbL9.js";
|
|
24
24
|
import { F as Et } from "./file-spreadsheet-zUkY8rJ2.js";
|
|
25
25
|
import It from "i18next";
|
|
26
|
-
import { S as Ee } from "./select-
|
|
26
|
+
import { S as Ee } from "./select-CEtRcon5.js";
|
|
27
27
|
import { u as zt } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
28
28
|
import { u as At } from "./use-theme-CAuo6EYT.js";
|
|
29
29
|
import { u as Pt } from "./registry-nPAVE19X.js";
|
|
@@ -2322,4 +2322,4 @@ export {
|
|
|
2322
2322
|
Be as q,
|
|
2323
2323
|
Cn as u
|
|
2324
2324
|
};
|
|
2325
|
-
//# sourceMappingURL=editable-currency-cell-renderer-
|
|
2325
|
+
//# sourceMappingURL=editable-currency-cell-renderer-BQgaKFCz.js.map
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as k, useState as A, useRef as g, useEffect as F, useCallback as j } from "react";
|
|
3
|
+
import { useTranslation as z } from "react-i18next";
|
|
4
|
+
import { C as w } from "./card-DPmk26CL.js";
|
|
5
|
+
import { B as E } from "./button-DD_0Xdmr.js";
|
|
6
|
+
import { u as D } from "./use-countdown-Yd6ts0_a.js";
|
|
7
|
+
import { C as L } from "./circle-check-9AeSgJD_.js";
|
|
8
|
+
function W(s) {
|
|
9
|
+
const t = globalThis.window !== void 0 && globalThis;
|
|
10
|
+
return !!(t && (/Chromatic/.test(t.navigator.userAgent) || /chromatic=true/.test(t.location.href)));
|
|
11
|
+
}
|
|
12
|
+
const _ = "https://www.alfadocs.com";
|
|
13
|
+
function x(s) {
|
|
14
|
+
if (typeof s != "string" || s.length === 0 || s.startsWith("//")) return !1;
|
|
15
|
+
if (s.startsWith("/")) return !0;
|
|
16
|
+
try {
|
|
17
|
+
const { protocol: t } = new URL(s, window.location.origin);
|
|
18
|
+
return t === "https:" || t === "http:";
|
|
19
|
+
} catch {
|
|
20
|
+
return !1;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const I = k(
|
|
24
|
+
({
|
|
25
|
+
title: s,
|
|
26
|
+
body: t,
|
|
27
|
+
autoCloseSeconds: i = 10,
|
|
28
|
+
redirectUrl: n,
|
|
29
|
+
brandUrl: o = _,
|
|
30
|
+
onClose: a,
|
|
31
|
+
countdownLabel: d,
|
|
32
|
+
closeNowLabel: v,
|
|
33
|
+
redirectingLabel: y,
|
|
34
|
+
className: N,
|
|
35
|
+
...C
|
|
36
|
+
}, T) => {
|
|
37
|
+
const { t: r } = z(), [R, b] = A(!1), c = g(!1), l = g(null);
|
|
38
|
+
F(() => {
|
|
39
|
+
var h;
|
|
40
|
+
(h = l.current) == null || h.focus();
|
|
41
|
+
}, []);
|
|
42
|
+
const m = j(() => {
|
|
43
|
+
if (!c.current) {
|
|
44
|
+
if (c.current = !0, b(!0), a) {
|
|
45
|
+
a();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
n ? x(n) && window.location.assign(n) : (window.close(), x(o) && window.location.assign(o));
|
|
49
|
+
}
|
|
50
|
+
}, [a, n, o]), { remaining: f } = D(i, {
|
|
51
|
+
autoStart: i > 0 && !W(),
|
|
52
|
+
onElapsed: m
|
|
53
|
+
}), u = i > 0, B = d ? d(f) : r("finishedTerminal.autoClose", { seconds: f });
|
|
54
|
+
return /* @__PURE__ */ e(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
ref: T,
|
|
58
|
+
"data-component": "finished-terminal",
|
|
59
|
+
className: [
|
|
60
|
+
"ds:flex ds:flex-1 ds:flex-col ds:items-center ds:overflow-y-auto ds:p-[var(--spacing-lg)]",
|
|
61
|
+
N
|
|
62
|
+
].filter(Boolean).join(" "),
|
|
63
|
+
...C,
|
|
64
|
+
children: /* @__PURE__ */ e(
|
|
65
|
+
w,
|
|
66
|
+
{
|
|
67
|
+
variant: "elevated",
|
|
68
|
+
className: "ds:my-auto ds:min-w-0 ds:[inline-size:100%] ds:max-w-[28rem] ds:text-center",
|
|
69
|
+
children: /* @__PURE__ */ e(w.Body, { children: /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-md)]", children: [
|
|
70
|
+
/* @__PURE__ */ e(
|
|
71
|
+
L,
|
|
72
|
+
{
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
className: "ds:size-12 ds:text-[var(--success)]"
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ e(
|
|
78
|
+
"h1",
|
|
79
|
+
{
|
|
80
|
+
ref: l,
|
|
81
|
+
tabIndex: -1,
|
|
82
|
+
className: "type-title-card ds:m-0 ds:outline-none",
|
|
83
|
+
children: s
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ e("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: t }),
|
|
87
|
+
u && R ? (
|
|
88
|
+
// Mounts once when closing begins → role="status" announces the
|
|
89
|
+
// hand-off exactly once (no churn).
|
|
90
|
+
/* @__PURE__ */ e(
|
|
91
|
+
"p",
|
|
92
|
+
{
|
|
93
|
+
role: "status",
|
|
94
|
+
className: "type-body-sm ds:m-0 ds:text-[var(--muted-foreground)]",
|
|
95
|
+
children: y ?? r("finishedTerminal.redirecting")
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
) : u ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
99
|
+
/* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:text-[var(--muted-foreground)]", children: B }),
|
|
100
|
+
/* @__PURE__ */ e(
|
|
101
|
+
E,
|
|
102
|
+
{
|
|
103
|
+
intent: "secondary",
|
|
104
|
+
size: "lg",
|
|
105
|
+
type: "button",
|
|
106
|
+
onClick: m,
|
|
107
|
+
children: v ?? r("finishedTerminal.closeNow")
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
] }) : null
|
|
111
|
+
] }) })
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
I.displayName = "FinishedTerminal";
|
|
119
|
+
export {
|
|
120
|
+
I as F
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=finished-terminal-VjZ_-eDD.js.map
|
|
@@ -6,7 +6,7 @@ import { R as i } from "./radio-TWf9Q-mp.js";
|
|
|
6
6
|
import { R as y } from "./radio-group-CLjK-SlK.js";
|
|
7
7
|
import { F as x } from "./form-field-BOm9hK35.js";
|
|
8
8
|
import { D as w } from "./date-picker-BfHblqwA.js";
|
|
9
|
-
import { S as le } from "./select-
|
|
9
|
+
import { S as le } from "./select-CEtRcon5.js";
|
|
10
10
|
import { S as se } from "./switch-BJ6HD3Mn.js";
|
|
11
11
|
import { C as R } from "./card-DPmk26CL.js";
|
|
12
12
|
import { B as T } from "./badge-zsf5i5bH.js";
|
|
@@ -308,4 +308,4 @@ ve.displayName = "GestationalAgeCalculator";
|
|
|
308
308
|
export {
|
|
309
309
|
ve as G
|
|
310
310
|
};
|
|
311
|
-
//# sourceMappingURL=gestational-age-calculator-
|
|
311
|
+
//# sourceMappingURL=gestational-age-calculator-D85E8lGN.js.map
|
|
@@ -7,7 +7,7 @@ import { R as L } from "./radio-group-CLjK-SlK.js";
|
|
|
7
7
|
import { F as g } from "./form-field-BOm9hK35.js";
|
|
8
8
|
import { D as O } from "./date-picker-BfHblqwA.js";
|
|
9
9
|
import { N as _ } from "./number-input-Dj5L3pXK.js";
|
|
10
|
-
import { S as xe } from "./select-
|
|
10
|
+
import { S as xe } from "./select-CEtRcon5.js";
|
|
11
11
|
import { S as Ne } from "./switch-BJ6HD3Mn.js";
|
|
12
12
|
import { C as M } from "./card-DPmk26CL.js";
|
|
13
13
|
import { B as j } from "./badge-zsf5i5bH.js";
|
|
@@ -418,4 +418,4 @@ je.displayName = "PregnancyDating";
|
|
|
418
418
|
export {
|
|
419
419
|
je as P
|
|
420
420
|
};
|
|
421
|
-
//# sourceMappingURL=pregnancy-dating-
|
|
421
|
+
//# sourceMappingURL=pregnancy-dating-7NUaAfob.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as a, useContext as
|
|
2
|
+
import { forwardRef as a, useContext as fe, useState as P, useRef as G, useMemo as ge } from "react";
|
|
3
3
|
import * as o from "@radix-ui/react-select";
|
|
4
4
|
import { c as z } from "./index-D2ZczOXr.js";
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { u as
|
|
7
|
-
import { g as
|
|
8
|
-
import { C as
|
|
5
|
+
import { useTranslation as he } from "react-i18next";
|
|
6
|
+
import { u as ve, F as be } from "./form-field-context-B3APVHKx.js";
|
|
7
|
+
import { g as ye } from "./group-options-BvKhQ3xb.js";
|
|
8
|
+
import { C as Se } from "./chevron-up-zOEDrmBB.js";
|
|
9
9
|
import { C as q } from "./chevron-down-BX_NP2Yh.js";
|
|
10
|
-
import { C as
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { X as
|
|
14
|
-
const
|
|
10
|
+
import { C as xe } from "./check-DPdL_Sm7.js";
|
|
11
|
+
import { u as Ne } from "./use-direction-Dp8h70PP.js";
|
|
12
|
+
import { u as Ce } from "./registry-nPAVE19X.js";
|
|
13
|
+
import { X as we } from "./x-CCcI3eJp.js";
|
|
14
|
+
const ze = {
|
|
15
15
|
id: "select",
|
|
16
16
|
capabilities: ["select_single", "open", "close"],
|
|
17
17
|
state: {
|
|
@@ -109,7 +109,7 @@ const we = {
|
|
|
109
109
|
tone: "default"
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
),
|
|
112
|
+
), Ie = z(
|
|
113
113
|
[
|
|
114
114
|
"ds:z-[var(--z-dropdown)] ds:overflow-hidden",
|
|
115
115
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background ds:text-foreground",
|
|
@@ -121,7 +121,7 @@ const we = {
|
|
|
121
121
|
"ds:data-[side=top]:slide-in-from-bottom-2",
|
|
122
122
|
"ds:motion-reduce:animate-none"
|
|
123
123
|
].join(" ")
|
|
124
|
-
),
|
|
124
|
+
), je = z(
|
|
125
125
|
[
|
|
126
126
|
"ds:relative ds:flex ds:cursor-pointer ds:items-center",
|
|
127
127
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -141,20 +141,20 @@ const we = {
|
|
|
141
141
|
size: "md"
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
),
|
|
144
|
+
), Ve = [
|
|
145
145
|
"ds:ps-8 ds:pe-3 ds:py-1.5",
|
|
146
146
|
"type-eyebrow ds:text-muted-foreground",
|
|
147
147
|
"ds:sticky ds:top-0 ds:bg-background"
|
|
148
|
-
].join(" "),
|
|
148
|
+
].join(" "), ke = {
|
|
149
149
|
sm: "ds:size-3.5",
|
|
150
150
|
md: "ds:size-4",
|
|
151
151
|
lg: "ds:size-5"
|
|
152
|
-
},
|
|
152
|
+
}, Te = {
|
|
153
153
|
sm: "ds:start-2",
|
|
154
154
|
md: "ds:start-2",
|
|
155
155
|
lg: "ds:start-3"
|
|
156
156
|
};
|
|
157
|
-
function
|
|
157
|
+
function Re(...e) {
|
|
158
158
|
return (s) => {
|
|
159
159
|
for (const n of e)
|
|
160
160
|
n && (typeof n == "function" ? n(s) : n.current = s);
|
|
@@ -191,10 +191,10 @@ const I = a(
|
|
|
191
191
|
position: n,
|
|
192
192
|
sideOffset: r,
|
|
193
193
|
"data-component": "select-content",
|
|
194
|
-
className:
|
|
194
|
+
className: Ie({ className: e }),
|
|
195
195
|
...c,
|
|
196
196
|
children: [
|
|
197
|
-
/* @__PURE__ */ t(o.ScrollUpButton, { className: "ds:flex ds:items-center ds:justify-center ds:h-6 ds:bg-background ds:cursor-default", children: /* @__PURE__ */ t(
|
|
197
|
+
/* @__PURE__ */ t(o.ScrollUpButton, { className: "ds:flex ds:items-center ds:justify-center ds:h-6 ds:bg-background ds:cursor-default", children: /* @__PURE__ */ t(Se, { "aria-hidden": "true", className: "ds:size-4" }) }),
|
|
198
198
|
s,
|
|
199
199
|
/* @__PURE__ */ t(o.ScrollDownButton, { className: "ds:flex ds:items-center ds:justify-center ds:h-6 ds:bg-background ds:cursor-default", children: /* @__PURE__ */ t(q, { "aria-hidden": "true", className: "ds:size-4" }) })
|
|
200
200
|
]
|
|
@@ -212,12 +212,12 @@ const j = a(({ className: e, ...s }, n) => /* @__PURE__ */ t(
|
|
|
212
212
|
));
|
|
213
213
|
j.displayName = "Select.Viewport";
|
|
214
214
|
const V = a(({ size: e = "md", className: s, children: n, ...r }, l) => {
|
|
215
|
-
const c =
|
|
215
|
+
const c = Te[e ?? "md"], g = ke[e ?? "md"];
|
|
216
216
|
return /* @__PURE__ */ f(
|
|
217
217
|
o.Item,
|
|
218
218
|
{
|
|
219
219
|
ref: l,
|
|
220
|
-
className:
|
|
220
|
+
className: je({ size: e, className: s }),
|
|
221
221
|
...r,
|
|
222
222
|
children: [
|
|
223
223
|
/* @__PURE__ */ t(
|
|
@@ -225,7 +225,7 @@ const V = a(({ size: e = "md", className: s, children: n, ...r }, l) => {
|
|
|
225
225
|
{
|
|
226
226
|
className: `ds:absolute ${c} ds:inline-flex ds:items-center ds:justify-center`,
|
|
227
227
|
"aria-hidden": "true",
|
|
228
|
-
children: /* @__PURE__ */ t(o.ItemIndicator, { children: /* @__PURE__ */ t(
|
|
228
|
+
children: /* @__PURE__ */ t(o.ItemIndicator, { children: /* @__PURE__ */ t(xe, { className: g }) })
|
|
229
229
|
}
|
|
230
230
|
),
|
|
231
231
|
/* @__PURE__ */ t(o.ItemText, { children: n })
|
|
@@ -242,7 +242,7 @@ const k = a(({ className: e, ...s }, n) => /* @__PURE__ */ t(
|
|
|
242
242
|
o.Label,
|
|
243
243
|
{
|
|
244
244
|
ref: n,
|
|
245
|
-
className: [
|
|
245
|
+
className: [Ve, e].filter(Boolean).join(" "),
|
|
246
246
|
...s
|
|
247
247
|
}
|
|
248
248
|
));
|
|
@@ -270,18 +270,19 @@ const _ = a(function({
|
|
|
270
270
|
size: T = "md",
|
|
271
271
|
tone: Q = "default",
|
|
272
272
|
className: Y,
|
|
273
|
+
container: Z,
|
|
273
274
|
"aria-label": R
|
|
274
|
-
},
|
|
275
|
-
const { t: x } =
|
|
275
|
+
}, ee) {
|
|
276
|
+
const { t: x } = he(), u = ve(), p = fe(be) !== null, [te, b] = P(
|
|
276
277
|
n ?? r ?? ""
|
|
277
|
-
), m = n !== void 0, h = m ? n :
|
|
278
|
+
), m = n !== void 0, h = m ? n : te, [N, C] = P(!1), B = G(h);
|
|
278
279
|
B.current = h;
|
|
279
|
-
const
|
|
280
|
+
const se = S ?? (p ? u.id : void 0), O = (p ? u.disabled : !1) || !!E, oe = (p ? u.required : !1) || !!X, D = p ? u.invalid : !1, ne = D ? "error" : Q, de = p && u.describedBy ? u.describedBy : void 0, w = G(null), ie = Re(ee, w), ae = Ne(w), i = l, re = (d) => {
|
|
280
281
|
m || b(d), i == null || i(d);
|
|
281
|
-
},
|
|
282
|
+
}, le = (d) => {
|
|
282
283
|
var y;
|
|
283
284
|
d.preventDefault(), d.stopPropagation(), m || b(""), i == null || i(""), (y = w.current) == null || y.focus();
|
|
284
|
-
}, F = c ?? x("inputs.select.placeholder", "Select…"),
|
|
285
|
+
}, F = c ?? x("inputs.select.placeholder", "Select…"), ce = g && !!h && !O, ue = ye(s), pe = ge(
|
|
285
286
|
() => ({
|
|
286
287
|
getValue: () => B.current,
|
|
287
288
|
setValue: (d) => {
|
|
@@ -296,43 +297,43 @@ const _ = a(function({
|
|
|
296
297
|
}),
|
|
297
298
|
[i, m, N]
|
|
298
299
|
);
|
|
299
|
-
return
|
|
300
|
+
return Ce(ze, pe, S), /* @__PURE__ */ f(
|
|
300
301
|
o.Root,
|
|
301
302
|
{
|
|
302
303
|
value: h === "" ? void 0 : h,
|
|
303
|
-
onValueChange:
|
|
304
|
+
onValueChange: re,
|
|
304
305
|
open: N,
|
|
305
306
|
onOpenChange: C,
|
|
306
307
|
disabled: O,
|
|
307
|
-
required:
|
|
308
|
+
required: oe,
|
|
308
309
|
name: J,
|
|
309
|
-
dir:
|
|
310
|
+
dir: ae,
|
|
310
311
|
children: [
|
|
311
312
|
/* @__PURE__ */ f(
|
|
312
313
|
o.Trigger,
|
|
313
314
|
{
|
|
314
|
-
ref:
|
|
315
|
-
id:
|
|
315
|
+
ref: ie,
|
|
316
|
+
id: se,
|
|
316
317
|
"aria-label": R ?? (p ? void 0 : F),
|
|
317
318
|
"aria-labelledby": !R && p ? `${u.id}-label` : void 0,
|
|
318
|
-
"aria-describedby":
|
|
319
|
+
"aria-describedby": de,
|
|
319
320
|
"aria-invalid": D || void 0,
|
|
320
321
|
"data-component": "select",
|
|
321
322
|
"data-component-id": S,
|
|
322
323
|
className: L({
|
|
323
324
|
size: T,
|
|
324
|
-
tone:
|
|
325
|
+
tone: ne,
|
|
325
326
|
className: Y
|
|
326
327
|
}),
|
|
327
328
|
children: [
|
|
328
329
|
/* @__PURE__ */ t(o.Value, { placeholder: F }),
|
|
329
330
|
/* @__PURE__ */ f("span", { className: "ds:ms-auto ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
330
|
-
|
|
331
|
+
ce ? /* @__PURE__ */ t(
|
|
331
332
|
"button",
|
|
332
333
|
{
|
|
333
334
|
type: "button",
|
|
334
335
|
"aria-label": x("inputs.select.clear", "Clear selection"),
|
|
335
|
-
onClick:
|
|
336
|
+
onClick: le,
|
|
336
337
|
onPointerDown: (d) => d.stopPropagation(),
|
|
337
338
|
onKeyDown: (d) => {
|
|
338
339
|
(d.key === "Enter" || d.key === " ") && d.stopPropagation();
|
|
@@ -345,7 +346,7 @@ const _ = a(function({
|
|
|
345
346
|
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
346
347
|
"ds:size-4"
|
|
347
348
|
].join(" "),
|
|
348
|
-
children: /* @__PURE__ */ t(
|
|
349
|
+
children: /* @__PURE__ */ t(we, { "aria-hidden": "true", className: "ds:size-3.5" })
|
|
349
350
|
}
|
|
350
351
|
) : null,
|
|
351
352
|
/* @__PURE__ */ t(o.Icon, { asChild: !0, children: /* @__PURE__ */ t(
|
|
@@ -363,7 +364,7 @@ const _ = a(function({
|
|
|
363
364
|
]
|
|
364
365
|
}
|
|
365
366
|
),
|
|
366
|
-
/* @__PURE__ */ t(I, { children: /* @__PURE__ */ t(j, { children: s.length === 0 ? /* @__PURE__ */ t("div", { className: "ds:ps-8 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", children: x("inputs.select.noOptions", "No options") }) :
|
|
367
|
+
/* @__PURE__ */ t(I, { container: Z, children: /* @__PURE__ */ t(j, { children: s.length === 0 ? /* @__PURE__ */ t("div", { className: "ds:ps-8 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", children: x("inputs.select.noOptions", "No options") }) : ue.map(({ group: d, items: y }, me) => {
|
|
367
368
|
const K = y.map((v) => /* @__PURE__ */ t(
|
|
368
369
|
V,
|
|
369
370
|
{
|
|
@@ -378,14 +379,14 @@ const _ = a(function({
|
|
|
378
379
|
return d ? /* @__PURE__ */ f(o.Group, { children: [
|
|
379
380
|
/* @__PURE__ */ t(k, { children: d }),
|
|
380
381
|
K
|
|
381
|
-
] }, `group-${d}`) : /* @__PURE__ */ t(o.Group, { children: K }, `group-${
|
|
382
|
+
] }, `group-${d}`) : /* @__PURE__ */ t(o.Group, { children: K }, `group-${me}`);
|
|
382
383
|
}) }) })
|
|
383
384
|
]
|
|
384
385
|
}
|
|
385
386
|
);
|
|
386
387
|
});
|
|
387
388
|
_.displayName = "Select";
|
|
388
|
-
const
|
|
389
|
+
const Be = Object.assign(_, {
|
|
389
390
|
Root: $,
|
|
390
391
|
Trigger: A,
|
|
391
392
|
Value: H,
|
|
@@ -396,9 +397,9 @@ const Re = Object.assign(_, {
|
|
|
396
397
|
Group: U,
|
|
397
398
|
Label: k,
|
|
398
399
|
Separator: W
|
|
399
|
-
}),
|
|
400
|
+
}), Ue = Be;
|
|
400
401
|
export {
|
|
401
|
-
|
|
402
|
+
Ue as S,
|
|
402
403
|
I as a,
|
|
403
404
|
U as b,
|
|
404
405
|
V as c,
|
|
@@ -410,4 +411,4 @@ export {
|
|
|
410
411
|
H as i,
|
|
411
412
|
j
|
|
412
413
|
};
|
|
413
|
-
//# sourceMappingURL=select-
|
|
414
|
+
//# sourceMappingURL=select-CEtRcon5.js.map
|
|
@@ -5,7 +5,7 @@ import * as k from "@radix-ui/react-dropdown-menu";
|
|
|
5
5
|
import { a as N, c as q } from "./index-D2ZczOXr.js";
|
|
6
6
|
import { useTranslation as Z } from "react-i18next";
|
|
7
7
|
import { c as K } from "./compose-refs-C0k0tdqF.js";
|
|
8
|
-
import { S as D } from "./select-
|
|
8
|
+
import { S as D } from "./select-CEtRcon5.js";
|
|
9
9
|
import { X as ee } from "./x-CCcI3eJp.js";
|
|
10
10
|
import { u as te } from "./use-direction-Dp8h70PP.js";
|
|
11
11
|
import { u as se } from "./registry-nPAVE19X.js";
|
|
@@ -396,4 +396,4 @@ export {
|
|
|
396
396
|
F as c,
|
|
397
397
|
re as t
|
|
398
398
|
};
|
|
399
|
-
//# sourceMappingURL=tabs-
|
|
399
|
+
//# sourceMappingURL=tabs-BIQ0ew1T.js.map
|