@alfadocs/ui-kit 0.38.0 → 0.40.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/{accordion-bSU21uTV.js → accordion-9lJSMMsZ.js} +6 -6
- package/dist/_chunks/{agenda-tray-By_asPN9.js → agenda-tray-Dyj9ChHC.js} +22 -21
- package/dist/_chunks/{bmi-calculator-BRUru9QX.js → bmi-calculator-DnEr513I.js} +2 -2
- package/dist/_chunks/{booking-DK_BPHnQ.js → booking-4mCw3Mpl.js} +2 -2
- package/dist/_chunks/{chart-DnHvmiDX.js → chart-Cbt0_sKv.js} +46 -37
- package/dist/_chunks/{collapsible-CERONory.js → collapsible-X3oaLPU3.js} +5 -5
- package/dist/_chunks/{document-scanner-CdHQ6lTN.js → document-scanner-CqS_klIr.js} +56 -55
- package/dist/_chunks/{editable-currency-cell-renderer-DGKuRNVG.js → editable-currency-cell-renderer-DgkCIIcO.js} +2 -2
- package/dist/_chunks/{file-upload-CnzRcErt.js → file-upload-BosbPDb1.js} +2 -2
- package/dist/_chunks/{freemium-paywall-D1N02Oam.js → freemium-paywall-BAk3a6er.js} +7 -7
- package/dist/_chunks/header-settings-CBLwUK6t.js +244 -0
- package/dist/_chunks/{map-view-vD5pvWs9.js → map-view-qJLybrmN.js} +2 -2
- package/dist/_chunks/marketplace-app-shell-BlxVizU4.js +296 -0
- package/dist/_chunks/{message-card-BbRhZkDI.js → message-card-DSPw5ghw.js} +20 -19
- package/dist/_chunks/{message-tray-B762TKuv.js → message-tray-hSQff9u4.js} +3 -3
- package/dist/_chunks/{notification-card-DMdO4g54.js → notification-card-CObnGdJu.js} +22 -21
- package/dist/_chunks/{notification-tray-Dl3FTleW.js → notification-tray-BWHDIjgd.js} +2 -2
- package/dist/_chunks/{otp-input-CDTWT5EK.js → otp-input-CMphfBxZ.js} +70 -71
- package/dist/_chunks/{patient-shell-Bz3CdO84.js → patient-shell-DF81lALv.js} +36 -35
- package/dist/_chunks/{payment-form-D5rgnZu7.js → payment-form-Dy3WIIsC.js} +18 -18
- package/dist/_chunks/{pdf-viewer-DvtEHcEP.js → pdf-viewer-Cy6Ul3hZ.js} +2 -2
- package/dist/_chunks/{practice-results-C8ciLQap.js → practice-results-C0d4IL5E.js} +2 -2
- package/dist/_chunks/{public-footer.agent-zw1vFin_.js → public-footer.agent-okt8ZRc5.js} +2 -2
- package/dist/_chunks/{reviews-panel-Dow8Dzoa.js → reviews-panel-CPrXu5TX.js} +2 -2
- package/dist/_chunks/{sidebar-BbR8f6oe.js → sidebar-_vJXI9rB.js} +2 -2
- package/dist/_chunks/sign-document-CpLDZ6Db.js +316 -0
- package/dist/_chunks/{signature-capture-C-fF71xI.js → signature-capture-DoiBd6i3.js} +138 -143
- package/dist/_chunks/{sparkline-DEROcSl0.js → sparkline-DGhCSw8M.js} +55 -46
- package/dist/_chunks/{stepper-accordion-BfS6lUB9.js → stepper-accordion-Dki6r9ZE.js} +2 -2
- package/dist/_chunks/{tag-CyoaEmf_.js → tag-CdA0s_VV.js} +16 -16
- package/dist/_chunks/{task-card-BUVMh6HN.js → task-card-CPyQ5AXC.js} +6 -5
- package/dist/_chunks/{task-tray-DRK0b0Qb.js → task-tray-B8jFv5FV.js} +36 -35
- package/dist/_chunks/{transcript-panel-DyhTpAP7.js → transcript-panel-CR7VY1uw.js} +8 -7
- package/dist/_chunks/{warning-stack-bDicCvxs.js → warning-stack-DNR3-IbP.js} +17 -16
- package/dist/_chunks/{workflow-map-uSiHbOWQ.js → workflow-map-C3gB0FvB.js} +3 -2
- package/dist/agent-catalog.json +39 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/chart/chart.d.ts +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/header-settings/header-settings.agent.d.ts +4 -0
- package/dist/components/header-settings/header-settings.d.ts +36 -0
- package/dist/components/header-settings/index.d.ts +2 -0
- package/dist/components/header-settings/index.js +2 -241
- package/dist/components/index.d.ts +1 -0
- package/dist/components/locale-picker/locale-picker.agent.d.ts +4 -0
- package/dist/components/locale-picker/locale-picker.d.ts +80 -0
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/otp-input/index.d.ts +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/otp-input/otp-input.d.ts +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sign-document/index.d.ts +4 -0
- package/dist/components/sign-document/index.js +6 -0
- package/dist/components/sign-document/sign-document.agent.d.ts +4 -0
- package/dist/components/sign-document/sign-document.d.ts +47 -0
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.d.ts +1 -1
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locale-meta.d.ts +56 -0
- package/dist/i18n/locales/ar.d.ts +22 -0
- package/dist/i18n/locales/ar.js +22 -0
- package/dist/i18n/locales/de.d.ts +22 -0
- package/dist/i18n/locales/de.js +22 -0
- package/dist/i18n/locales/el.d.ts +22 -0
- package/dist/i18n/locales/el.js +22 -0
- package/dist/i18n/locales/en.d.ts +22 -0
- package/dist/i18n/locales/en.js +22 -0
- package/dist/i18n/locales/es.d.ts +22 -0
- package/dist/i18n/locales/es.js +22 -0
- package/dist/i18n/locales/fr.d.ts +22 -0
- package/dist/i18n/locales/fr.js +22 -0
- package/dist/i18n/locales/hi.d.ts +22 -0
- package/dist/i18n/locales/hi.js +22 -0
- package/dist/i18n/locales/it.d.ts +22 -0
- package/dist/i18n/locales/it.js +22 -0
- package/dist/i18n/locales/ja.d.ts +22 -0
- package/dist/i18n/locales/ja.js +22 -0
- package/dist/i18n/locales/nl.d.ts +22 -0
- package/dist/i18n/locales/nl.js +22 -0
- package/dist/i18n/locales/pl.d.ts +22 -0
- package/dist/i18n/locales/pl.js +22 -0
- package/dist/i18n/locales/pt.d.ts +22 -0
- package/dist/i18n/locales/pt.js +22 -0
- package/dist/i18n/locales/ro.d.ts +22 -0
- package/dist/i18n/locales/ro.js +22 -0
- package/dist/i18n/locales/ru.d.ts +22 -0
- package/dist/i18n/locales/ru.js +22 -0
- package/dist/i18n/locales/sq.d.ts +22 -0
- package/dist/i18n/locales/sq.js +22 -0
- package/dist/i18n/locales/sv.d.ts +22 -0
- package/dist/i18n/locales/sv.js +22 -0
- package/dist/i18n/locales/tr.d.ts +22 -0
- package/dist/i18n/locales/tr.js +22 -0
- package/dist/i18n/locales/zh.d.ts +22 -0
- package/dist/i18n/locales/zh.js +22 -0
- package/dist/index.js +110 -107
- package/dist/locales/ar.json +22 -0
- package/dist/locales/de.json +22 -0
- package/dist/locales/el.json +22 -0
- package/dist/locales/en.json +22 -0
- package/dist/locales/es.json +22 -0
- package/dist/locales/fr.json +22 -0
- package/dist/locales/hi.json +22 -0
- package/dist/locales/it.json +22 -0
- package/dist/locales/ja.json +22 -0
- package/dist/locales/nl.json +22 -0
- package/dist/locales/pl.json +22 -0
- package/dist/locales/pt.json +22 -0
- package/dist/locales/ro.json +22 -0
- package/dist/locales/ru.json +22 -0
- package/dist/locales/sq.json +22 -0
- package/dist/locales/sv.json +22 -0
- package/dist/locales/tr.json +22 -0
- package/dist/locales/zh.json +22 -0
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +12 -8
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +5 -1
- package/dist/_chunks/marketplace-app-shell-BnClrL2B.js +0 -295
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as _, useMemo as B, useState as L, useRef as U, useCallback as W } from "react";
|
|
3
3
|
import { c as D } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as E } from "react-i18next";
|
|
5
5
|
import { I as H } from "./icon-button-CKEOrN37.js";
|
|
@@ -18,13 +18,14 @@ const J = D(
|
|
|
18
18
|
"ds:data-[leaving=true]:pointer-events-none",
|
|
19
19
|
"ds:motion-reduce:transition-none",
|
|
20
20
|
"ds:text-start",
|
|
21
|
+
"ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2",
|
|
21
22
|
"ds:forced-colors:border ds:forced-colors:border-[CanvasText]"
|
|
22
23
|
].join(" "),
|
|
23
24
|
{
|
|
24
25
|
variants: {
|
|
25
26
|
variant: {
|
|
26
27
|
compact: "ds:items-start ds:group",
|
|
27
|
-
dashboard: "ds:flex-col ds:sm:flex-row ds:items-stretch ds:sm:items-start ds:border ds:border-[color:var(--border)] ds:bg-[color:var(--card)]"
|
|
28
|
+
dashboard: "ds:flex-col ds:sm:flex-row ds:items-stretch ds:sm:items-start ds:border ds:border-[color:var(--card-border)] ds:shadow-[var(--shadow-card)] ds:[.theme-accessible_&]:border-2 ds:bg-[color:var(--card)]"
|
|
28
29
|
},
|
|
29
30
|
size: {
|
|
30
31
|
sm: "ds:p-[var(--spacing-sm)]",
|
|
@@ -71,40 +72,40 @@ const J = D(
|
|
|
71
72
|
function O(e) {
|
|
72
73
|
return /^(https?:\/\/(?!\/)|\/(?!\/)|#)/.test(e);
|
|
73
74
|
}
|
|
74
|
-
const Q =
|
|
75
|
+
const Q = _(
|
|
75
76
|
({
|
|
76
77
|
item: e,
|
|
77
78
|
variant: d = "compact",
|
|
78
79
|
size: h = "sm",
|
|
79
80
|
onActivate: r,
|
|
80
|
-
onDismiss:
|
|
81
|
+
onDismiss: o,
|
|
81
82
|
ctaLabel: c,
|
|
82
83
|
dismissLabel: u,
|
|
83
84
|
leaving: b,
|
|
84
85
|
className: T,
|
|
85
86
|
...z
|
|
86
87
|
}, K) => {
|
|
87
|
-
const { t: n, i18n: v } = E(), M =
|
|
88
|
+
const { t: n, i18n: v } = E(), M = B(() => {
|
|
88
89
|
const s = new Date(e.sentAt);
|
|
89
90
|
return Number.isNaN(s.getTime()) ? "" : new Intl.DateTimeFormat(v.language, {
|
|
90
91
|
dateStyle: "medium",
|
|
91
92
|
timeStyle: "short"
|
|
92
93
|
}).format(s);
|
|
93
|
-
}, [e.sentAt, v.language]), f = b !== void 0, [S, V] =
|
|
94
|
+
}, [e.sentAt, v.language]), f = b !== void 0, [S, V] = L(!1), m = U(null), x = f ? b : S, w = typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, y = W(
|
|
94
95
|
(s) => {
|
|
95
|
-
if (s == null || s.preventDefault(), s == null || s.stopPropagation(), !
|
|
96
|
+
if (s == null || s.preventDefault(), s == null || s.stopPropagation(), !o) return;
|
|
96
97
|
if (f || w) {
|
|
97
|
-
|
|
98
|
+
o(e);
|
|
98
99
|
return;
|
|
99
100
|
}
|
|
100
101
|
V(!0), m.current && clearTimeout(m.current);
|
|
101
102
|
const g = typeof window < "u" && window.getComputedStyle(document.documentElement).getPropertyValue("--animation-duration") || "200ms", N = g.trim().endsWith("ms") ? parseFloat(g) : parseFloat(g) * 1e3;
|
|
102
103
|
m.current = setTimeout(
|
|
103
|
-
() =>
|
|
104
|
+
() => o(e),
|
|
104
105
|
Number.isFinite(N) ? N : 200
|
|
105
106
|
);
|
|
106
107
|
},
|
|
107
|
-
[
|
|
108
|
+
[o, e, f, w]
|
|
108
109
|
), F = e.read ? "read" : "unread", P = e.read ? "" : n("messageCard.unreadSuffix", ", unread"), I = e.subject ? n("messageCard.subjectFragment", {
|
|
109
110
|
subject: e.subject,
|
|
110
111
|
defaultValue: " — {{subject}}"
|
|
@@ -124,8 +125,8 @@ const Q = B(
|
|
|
124
125
|
children: e.sender.name
|
|
125
126
|
}
|
|
126
127
|
);
|
|
127
|
-
let
|
|
128
|
-
d === "compact" && p && r ?
|
|
128
|
+
let t;
|
|
129
|
+
d === "compact" && p && r ? t = /* @__PURE__ */ a(
|
|
129
130
|
"a",
|
|
130
131
|
{
|
|
131
132
|
href: e.url,
|
|
@@ -136,7 +137,7 @@ const Q = B(
|
|
|
136
137
|
},
|
|
137
138
|
children: i
|
|
138
139
|
}
|
|
139
|
-
) : d === "compact" && r ?
|
|
140
|
+
) : d === "compact" && r ? t = /* @__PURE__ */ a(
|
|
140
141
|
"button",
|
|
141
142
|
{
|
|
142
143
|
type: "button",
|
|
@@ -145,7 +146,7 @@ const Q = B(
|
|
|
145
146
|
onClick: () => r(e),
|
|
146
147
|
children: i
|
|
147
148
|
}
|
|
148
|
-
) : d === "dashboard" && p && r ?
|
|
149
|
+
) : d === "dashboard" && p && r ? t = /* @__PURE__ */ a(
|
|
149
150
|
"a",
|
|
150
151
|
{
|
|
151
152
|
href: e.url,
|
|
@@ -155,7 +156,7 @@ const Q = B(
|
|
|
155
156
|
},
|
|
156
157
|
children: i
|
|
157
158
|
}
|
|
158
|
-
) :
|
|
159
|
+
) : t = i;
|
|
159
160
|
const R = typeof e.unreadCount == "number" && e.unreadCount > 1;
|
|
160
161
|
return /* @__PURE__ */ l(
|
|
161
162
|
"div",
|
|
@@ -191,7 +192,7 @@ const Q = B(
|
|
|
191
192
|
className: "ds:inline-block ds:size-1.5 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--primary)] ds:forced-colors:bg-[Highlight]"
|
|
192
193
|
}
|
|
193
194
|
),
|
|
194
|
-
d === "dashboard" ? /* @__PURE__ */ a("h3", { className: "ds:m-0 ds:flex-1 ds:min-w-0 type-title-item", children:
|
|
195
|
+
d === "dashboard" ? /* @__PURE__ */ a("h3", { className: "ds:m-0 ds:flex-1 ds:min-w-0 type-title-item", children: t }) : /* @__PURE__ */ a("span", { className: "ds:flex-1 ds:min-w-0 type-title-item ds:text-[color:var(--foreground)]", children: t }),
|
|
195
196
|
R ? /* @__PURE__ */ a(
|
|
196
197
|
"span",
|
|
197
198
|
{
|
|
@@ -245,7 +246,7 @@ const Q = B(
|
|
|
245
246
|
)
|
|
246
247
|
}
|
|
247
248
|
) : null,
|
|
248
|
-
u &&
|
|
249
|
+
u && o ? /* @__PURE__ */ a(
|
|
249
250
|
k,
|
|
250
251
|
{
|
|
251
252
|
intent: "link",
|
|
@@ -257,7 +258,7 @@ const Q = B(
|
|
|
257
258
|
) : null
|
|
258
259
|
] }) : null
|
|
259
260
|
] }),
|
|
260
|
-
d === "compact" &&
|
|
261
|
+
d === "compact" && o ? /* @__PURE__ */ a("span", { className: "ds:relative ds:z-[1] ds:opacity-0 ds:group-hover:opacity-100 ds:group-focus-within:opacity-100 ds:transition-opacity ds:motion-reduce:transition-none", children: /* @__PURE__ */ a(
|
|
261
262
|
H,
|
|
262
263
|
{
|
|
263
264
|
icon: /* @__PURE__ */ a(G, {}),
|
|
@@ -277,4 +278,4 @@ export {
|
|
|
277
278
|
Q as M,
|
|
278
279
|
O as i
|
|
279
280
|
};
|
|
280
|
-
//# sourceMappingURL=message-card-
|
|
281
|
+
//# sourceMappingURL=message-card-DSPw5ghw.js.map
|
|
@@ -9,7 +9,7 @@ import { I as me } from "./icon-button-CKEOrN37.js";
|
|
|
9
9
|
import { B as E } from "./button-DD_0Xdmr.js";
|
|
10
10
|
import { S as L } from "./separator-CYU_bGFn.js";
|
|
11
11
|
import { S as f } from "./skeleton-CZbwyJAA.js";
|
|
12
|
-
import { M as pe } from "./message-card-
|
|
12
|
+
import { M as pe } from "./message-card-DSPw5ghw.js";
|
|
13
13
|
import { u as ue } from "./registry-nPAVE19X.js";
|
|
14
14
|
import { M as F } from "./mail-C8irm52s.js";
|
|
15
15
|
const ge = {
|
|
@@ -110,7 +110,7 @@ const ge = {
|
|
|
110
110
|
[
|
|
111
111
|
"ds:flex ds:flex-col",
|
|
112
112
|
"ds:bg-[var(--popover)] ds:text-[var(--popover-foreground)]",
|
|
113
|
-
"ds:border ds:border-[color:var(--border)]",
|
|
113
|
+
"ds:border ds:border-[color:var(--card-border)]",
|
|
114
114
|
"ds:rounded-[var(--radius-md)]",
|
|
115
115
|
"ds:shadow-[var(--shadow-lg)]",
|
|
116
116
|
"ds:z-[var(--z-popover)]",
|
|
@@ -412,4 +412,4 @@ export {
|
|
|
412
412
|
be as M,
|
|
413
413
|
ge as m
|
|
414
414
|
};
|
|
415
|
-
//# sourceMappingURL=message-tray-
|
|
415
|
+
//# sourceMappingURL=message-tray-hSQff9u4.js.map
|
|
@@ -23,13 +23,14 @@ const X = D(
|
|
|
23
23
|
"ds:data-[leaving=true]:pointer-events-none",
|
|
24
24
|
"ds:motion-reduce:transition-none",
|
|
25
25
|
"ds:text-start",
|
|
26
|
+
"ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2",
|
|
26
27
|
"ds:forced-colors:border ds:forced-colors:border-[CanvasText]"
|
|
27
28
|
].join(" "),
|
|
28
29
|
{
|
|
29
30
|
variants: {
|
|
30
31
|
variant: {
|
|
31
32
|
compact: "ds:items-start",
|
|
32
|
-
dashboard: "ds:flex-col ds:sm:flex-row ds:items-stretch ds:sm:items-start ds:border ds:border-[color:var(--border)] ds:shadow-[var(--shadow-
|
|
33
|
+
dashboard: "ds:flex-col ds:sm:flex-row ds:items-stretch ds:sm:items-start ds:border ds:border-[color:var(--card-border)] ds:shadow-[var(--shadow-card)] ds:bg-[color:var(--card)]"
|
|
33
34
|
},
|
|
34
35
|
size: {
|
|
35
36
|
sm: "ds:p-[var(--spacing-sm)]",
|
|
@@ -73,15 +74,15 @@ const X = D(
|
|
|
73
74
|
"ds:focus-visible:after:outline-offset-[length:var(--focus-ring-offset)]",
|
|
74
75
|
"ds:forced-colors:focus-visible:after:outline-[CanvasText]"
|
|
75
76
|
].join(" ");
|
|
76
|
-
function
|
|
77
|
+
function _(e) {
|
|
77
78
|
return /^(https?:\/\/(?!\/)|\/(?!\/)|#)/.test(e);
|
|
78
79
|
}
|
|
79
|
-
const
|
|
80
|
+
const q = M(
|
|
80
81
|
({
|
|
81
82
|
item: e,
|
|
82
|
-
variant:
|
|
83
|
+
variant: t = "compact",
|
|
83
84
|
size: k = "sm",
|
|
84
|
-
onActivate:
|
|
85
|
+
onActivate: r,
|
|
85
86
|
onDismiss: d,
|
|
86
87
|
ctaLabel: l,
|
|
87
88
|
dismissLabel: c,
|
|
@@ -112,7 +113,7 @@ const G = M(
|
|
|
112
113
|
time: S,
|
|
113
114
|
unreadSuffix: I,
|
|
114
115
|
defaultValue: "{{title}}, {{time}}{{unreadSuffix}}"
|
|
115
|
-
}), p = !!e.url &&
|
|
116
|
+
}), p = !!e.url && _(e.url), i = /* @__PURE__ */ a(
|
|
116
117
|
"span",
|
|
117
118
|
{
|
|
118
119
|
className: [
|
|
@@ -123,33 +124,33 @@ const G = M(
|
|
|
123
124
|
}
|
|
124
125
|
);
|
|
125
126
|
let o;
|
|
126
|
-
return
|
|
127
|
+
return t === "compact" && p && r ? o = /* @__PURE__ */ a(
|
|
127
128
|
"a",
|
|
128
129
|
{
|
|
129
130
|
href: e.url,
|
|
130
131
|
"aria-label": x,
|
|
131
132
|
className: C + " ds:contents",
|
|
132
133
|
onClick: (s) => {
|
|
133
|
-
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || (s.preventDefault(),
|
|
134
|
+
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || (s.preventDefault(), r(e));
|
|
134
135
|
},
|
|
135
136
|
children: i
|
|
136
137
|
}
|
|
137
|
-
) :
|
|
138
|
+
) : t === "compact" && r ? o = /* @__PURE__ */ a(
|
|
138
139
|
"button",
|
|
139
140
|
{
|
|
140
141
|
type: "button",
|
|
141
142
|
"aria-label": x,
|
|
142
143
|
className: C + " ds:contents ds:bg-transparent ds:border-0 ds:p-0",
|
|
143
|
-
onClick: () =>
|
|
144
|
+
onClick: () => r(e),
|
|
144
145
|
children: i
|
|
145
146
|
}
|
|
146
|
-
) :
|
|
147
|
+
) : t === "dashboard" && p && r ? o = /* @__PURE__ */ a(
|
|
147
148
|
"a",
|
|
148
149
|
{
|
|
149
150
|
href: e.url,
|
|
150
151
|
className: "ds:text-[color:var(--foreground)] ds:no-underline ds:hover:underline ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
151
152
|
onClick: (s) => {
|
|
152
|
-
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || (s.preventDefault(),
|
|
153
|
+
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || (s.preventDefault(), r(e));
|
|
153
154
|
},
|
|
154
155
|
children: i
|
|
155
156
|
}
|
|
@@ -163,7 +164,7 @@ const G = M(
|
|
|
163
164
|
"data-read": e.read ? "true" : "false",
|
|
164
165
|
"data-leaving": g ? "true" : void 0,
|
|
165
166
|
"aria-hidden": g || void 0,
|
|
166
|
-
className: X({ variant:
|
|
167
|
+
className: X({ variant: t, size: k, state: F, className: z }),
|
|
167
168
|
...T,
|
|
168
169
|
children: [
|
|
169
170
|
e.icon ? /* @__PURE__ */ a(
|
|
@@ -183,7 +184,7 @@ const G = M(
|
|
|
183
184
|
className: "ds:inline-block ds:size-1.5 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--primary)] ds:forced-colors:bg-[Highlight]"
|
|
184
185
|
}
|
|
185
186
|
),
|
|
186
|
-
|
|
187
|
+
t === "dashboard" ? (
|
|
187
188
|
// `h3` keeps the dashboard heading ladder continuous:
|
|
188
189
|
// h1 (page) → h2 (WarningStack + NotificationsPanel) → h3 (notification title).
|
|
189
190
|
/* @__PURE__ */ a("h3", { className: "ds:m-0 ds:flex-1 ds:min-w-0 type-title-item", children: o })
|
|
@@ -199,7 +200,7 @@ const G = M(
|
|
|
199
200
|
relativeWindow: 720 * 60 * 1e3
|
|
200
201
|
}
|
|
201
202
|
),
|
|
202
|
-
|
|
203
|
+
t === "dashboard" && (l || c) ? /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
203
204
|
l && p ? /* @__PURE__ */ a(
|
|
204
205
|
N,
|
|
205
206
|
{
|
|
@@ -212,7 +213,7 @@ const G = M(
|
|
|
212
213
|
{
|
|
213
214
|
href: e.url,
|
|
214
215
|
onClick: (s) => {
|
|
215
|
-
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || (s.preventDefault(),
|
|
216
|
+
s.defaultPrevented || s.metaKey || s.ctrlKey || s.shiftKey || (s.preventDefault(), r == null || r(e));
|
|
216
217
|
},
|
|
217
218
|
children: l
|
|
218
219
|
}
|
|
@@ -231,7 +232,7 @@ const G = M(
|
|
|
231
232
|
) : null
|
|
232
233
|
] }) : null
|
|
233
234
|
] }),
|
|
234
|
-
|
|
235
|
+
t === "compact" && d ? /* @__PURE__ */ a("span", { className: "ds:relative ds:z-[1] ds:opacity-0 ds:group-hover:opacity-100 ds:group-focus-within:opacity-100 ds:transition-opacity ds:motion-reduce:transition-none", children: /* @__PURE__ */ a(
|
|
235
236
|
W,
|
|
236
237
|
{
|
|
237
238
|
icon: /* @__PURE__ */ a(H, {}),
|
|
@@ -246,9 +247,9 @@ const G = M(
|
|
|
246
247
|
);
|
|
247
248
|
}
|
|
248
249
|
);
|
|
249
|
-
|
|
250
|
+
q.displayName = "NotificationCard";
|
|
250
251
|
export {
|
|
251
|
-
|
|
252
|
-
|
|
252
|
+
q as N,
|
|
253
|
+
_ as i
|
|
253
254
|
};
|
|
254
|
-
//# sourceMappingURL=notification-card-
|
|
255
|
+
//# sourceMappingURL=notification-card-CObnGdJu.js.map
|
|
@@ -9,7 +9,7 @@ import { I as fe } from "./icon-button-CKEOrN37.js";
|
|
|
9
9
|
import { B as E } from "./button-DD_0Xdmr.js";
|
|
10
10
|
import { S as q } from "./separator-CYU_bGFn.js";
|
|
11
11
|
import { S as x } from "./skeleton-CZbwyJAA.js";
|
|
12
|
-
import { N as pe } from "./notification-card-
|
|
12
|
+
import { N as pe } from "./notification-card-CObnGdJu.js";
|
|
13
13
|
import { u as ue } from "./registry-nPAVE19X.js";
|
|
14
14
|
import { c as me } from "./createLucideIcon-CrFbzy84.js";
|
|
15
15
|
/**
|
|
@@ -446,4 +446,4 @@ export {
|
|
|
446
446
|
Te as N,
|
|
447
447
|
ve as n
|
|
448
448
|
};
|
|
449
|
-
//# sourceMappingURL=notification-tray-
|
|
449
|
+
//# sourceMappingURL=notification-tray-BWHDIjgd.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as x, jsx as
|
|
2
|
-
import { forwardRef as ee, useId as te, useRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
const
|
|
1
|
+
import { jsxs as x, jsx as R } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ee, useId as te, useRef as M, useState as se, useEffect as re, useCallback as N, useMemo as ae, useImperativeHandle as oe } from "react";
|
|
3
|
+
import { c as O } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as ie } from "react-i18next";
|
|
5
|
+
import { u as ne } from "./use-controllable-state-BiY4xTzM.js";
|
|
6
|
+
import { u as ce } from "./use-web-otp-D_utzp6S.js";
|
|
7
|
+
import { u as ue } from "./form-field-context-B3APVHKx.js";
|
|
8
|
+
import { u as le } from "./registry-nPAVE19X.js";
|
|
9
|
+
const de = {
|
|
10
10
|
id: "otp-input",
|
|
11
11
|
capabilities: ["edit_inline", "submit"],
|
|
12
12
|
state: {
|
|
@@ -62,7 +62,7 @@ const le = {
|
|
|
62
62
|
description: "Sourced from the id prop."
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
},
|
|
65
|
+
}, pe = O("ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]"), fe = O(
|
|
66
66
|
[
|
|
67
67
|
"ds:w-[var(--min-target-size)] ds:h-[var(--min-target-size)]",
|
|
68
68
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -83,77 +83,77 @@ const le = {
|
|
|
83
83
|
defaultVariants: { tone: "default" }
|
|
84
84
|
}
|
|
85
85
|
);
|
|
86
|
-
function
|
|
86
|
+
function F(e) {
|
|
87
87
|
return e.replace(/[\u0660-\u0669]/g, (a) => String(a.charCodeAt(0) - 1632)).replace(/[\u06F0-\u06F9]/g, (a) => String(a.charCodeAt(0) - 1776));
|
|
88
88
|
}
|
|
89
89
|
function y(e, a) {
|
|
90
|
-
return
|
|
90
|
+
return F(e).replace(/\D/g, "").slice(0, a);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function me(e, a) {
|
|
93
93
|
const m = y(e, a), l = new Array(a).fill("");
|
|
94
94
|
for (let n = 0; n < m.length; n += 1)
|
|
95
95
|
l[n] = m[n];
|
|
96
96
|
return l;
|
|
97
97
|
}
|
|
98
|
-
const
|
|
98
|
+
const ve = ee(
|
|
99
99
|
({
|
|
100
100
|
length: e = 6,
|
|
101
101
|
value: a,
|
|
102
102
|
defaultValue: m,
|
|
103
103
|
onChange: l,
|
|
104
104
|
onComplete: n,
|
|
105
|
-
disabled:
|
|
106
|
-
error:
|
|
105
|
+
disabled: S,
|
|
106
|
+
error: H,
|
|
107
107
|
label: w,
|
|
108
|
-
id:
|
|
108
|
+
id: K,
|
|
109
109
|
className: $,
|
|
110
110
|
webOtp: j = !1
|
|
111
111
|
}, z) => {
|
|
112
|
-
const { t:
|
|
112
|
+
const { t: W } = ie(), v = ue(), _ = te(), C = w ? _ : void 0, [q, P] = ne({
|
|
113
113
|
value: a,
|
|
114
114
|
defaultValue: y(m ?? "", e)
|
|
115
|
-
}), p = y(
|
|
115
|
+
}), p = y(q ?? "", e), G = me(p, e), b = v.disabled || !!S, B = v.invalid || !!H, J = B ? "error" : "default", E = M([]), I = M(p.length === e), d = M(p);
|
|
116
116
|
d.current = p;
|
|
117
|
-
const
|
|
117
|
+
const Q = () => {
|
|
118
118
|
const s = p.length;
|
|
119
119
|
return s >= e ? e - 1 : s;
|
|
120
|
-
}, [f, h] = se(
|
|
120
|
+
}, [f, h] = se(Q);
|
|
121
121
|
re(() => {
|
|
122
122
|
f >= e && h(e - 1);
|
|
123
123
|
}, [f, e]);
|
|
124
|
-
const c =
|
|
124
|
+
const c = N(
|
|
125
125
|
(s) => {
|
|
126
126
|
const t = Math.max(0, Math.min(e - 1, s));
|
|
127
127
|
h(t);
|
|
128
|
-
const r =
|
|
128
|
+
const r = E.current[t];
|
|
129
129
|
r && (r.focus(), r.select());
|
|
130
130
|
},
|
|
131
131
|
[e]
|
|
132
|
-
), u =
|
|
132
|
+
), u = N(
|
|
133
133
|
(s) => {
|
|
134
134
|
const t = y(s, e);
|
|
135
|
-
|
|
135
|
+
P(t), d.current = t, l == null || l(t), t.length === e ? I.current || (I.current = !0, n == null || n(t)) : I.current = !1;
|
|
136
136
|
},
|
|
137
|
-
[
|
|
137
|
+
[P, e, l, n]
|
|
138
138
|
);
|
|
139
|
-
|
|
140
|
-
enabled: j && !
|
|
139
|
+
ce({
|
|
140
|
+
enabled: j && !b,
|
|
141
141
|
onCode: u
|
|
142
142
|
});
|
|
143
|
-
const
|
|
144
|
-
const r = t.target.value, o =
|
|
143
|
+
const U = (s) => (t) => {
|
|
144
|
+
const r = t.target.value, o = F(r).replace(/\D/g, ""), i = d.current;
|
|
145
145
|
if (o.length === 0) {
|
|
146
146
|
if (r === "" && s < i.length) {
|
|
147
|
-
const
|
|
148
|
-
u(
|
|
147
|
+
const A = i.slice(0, s) + i.slice(s + 1);
|
|
148
|
+
u(A);
|
|
149
149
|
}
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
const g = i.slice(0, s),
|
|
153
|
-
u(
|
|
154
|
-
const
|
|
155
|
-
c(
|
|
156
|
-
},
|
|
152
|
+
const g = i.slice(0, s), V = i.slice(s + o.length), D = (g + o + V).slice(0, e);
|
|
153
|
+
u(D);
|
|
154
|
+
const T = Math.min(s + o.length, e - 1);
|
|
155
|
+
c(T);
|
|
156
|
+
}, X = (s) => (t) => {
|
|
157
157
|
const r = d.current;
|
|
158
158
|
if (t.key === "Backspace") {
|
|
159
159
|
if (r[s]) {
|
|
@@ -182,17 +182,17 @@ const me = ee(
|
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
184
|
t.key === "End" && (t.preventDefault(), c(e - 1));
|
|
185
|
-
},
|
|
186
|
-
const o = t.clipboardData.getData("text").replace(/\s+/g, ""), i =
|
|
185
|
+
}, Y = (s) => (t) => {
|
|
186
|
+
const o = t.clipboardData.getData("text").replace(/\s+/g, ""), i = F(o);
|
|
187
187
|
if (!/^[0-9]+$/.test(i)) return;
|
|
188
188
|
t.preventDefault();
|
|
189
|
-
const g = d.current,
|
|
190
|
-
u(
|
|
191
|
-
const
|
|
192
|
-
c(
|
|
193
|
-
},
|
|
189
|
+
const g = d.current, V = g.slice(0, s), D = g.slice(s + i.length), T = (V + i + D).slice(0, e);
|
|
190
|
+
u(T);
|
|
191
|
+
const A = Math.min(s + i.length, e - 1);
|
|
192
|
+
c(A);
|
|
193
|
+
}, Z = (s) => (t) => {
|
|
194
194
|
h(s), t.currentTarget.select();
|
|
195
|
-
},
|
|
195
|
+
}, L = v.id, k = ae(
|
|
196
196
|
() => ({
|
|
197
197
|
getValue: () => d.current,
|
|
198
198
|
setValue: (s) => u(s),
|
|
@@ -202,55 +202,54 @@ const me = ee(
|
|
|
202
202
|
}),
|
|
203
203
|
[u, c, f, e]
|
|
204
204
|
);
|
|
205
|
-
return
|
|
206
|
-
w ? /* @__PURE__ */
|
|
205
|
+
return le(de, k, K), oe(z, () => k, [k]), /* @__PURE__ */ x("div", { className: pe({ className: $ }), children: [
|
|
206
|
+
w ? /* @__PURE__ */ R(
|
|
207
207
|
"label",
|
|
208
208
|
{
|
|
209
|
-
id:
|
|
210
|
-
htmlFor: `${
|
|
209
|
+
id: C,
|
|
210
|
+
htmlFor: `${L}-0`,
|
|
211
211
|
className: "type-label ds:text-foreground",
|
|
212
212
|
children: w
|
|
213
213
|
}
|
|
214
214
|
) : null,
|
|
215
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ R(
|
|
216
216
|
"div",
|
|
217
217
|
{
|
|
218
|
-
ref: z,
|
|
219
218
|
role: "group",
|
|
220
219
|
dir: "ltr",
|
|
221
|
-
"aria-labelledby":
|
|
222
|
-
"aria-invalid":
|
|
223
|
-
"aria-describedby":
|
|
224
|
-
"aria-disabled":
|
|
220
|
+
"aria-labelledby": C,
|
|
221
|
+
"aria-invalid": B || void 0,
|
|
222
|
+
"aria-describedby": v.describedBy || void 0,
|
|
223
|
+
"aria-disabled": b || void 0,
|
|
225
224
|
"data-component": "otp-input",
|
|
226
|
-
"data-component-id":
|
|
225
|
+
"data-component-id": K,
|
|
227
226
|
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
228
|
-
children:
|
|
229
|
-
const r = !
|
|
230
|
-
return /* @__PURE__ */
|
|
227
|
+
children: G.map((s, t) => {
|
|
228
|
+
const r = !b && t === f;
|
|
229
|
+
return /* @__PURE__ */ R(
|
|
231
230
|
"input",
|
|
232
231
|
{
|
|
233
232
|
ref: (o) => {
|
|
234
|
-
|
|
233
|
+
E.current[t] = o;
|
|
235
234
|
},
|
|
236
|
-
id: `${
|
|
235
|
+
id: `${L}-${t}`,
|
|
237
236
|
type: "text",
|
|
238
237
|
inputMode: "numeric",
|
|
239
238
|
pattern: "[0-9]*",
|
|
240
239
|
autoComplete: t === 0 ? "one-time-code" : "off",
|
|
241
240
|
maxLength: 1,
|
|
242
241
|
value: s,
|
|
243
|
-
disabled:
|
|
242
|
+
disabled: b,
|
|
244
243
|
tabIndex: r ? 0 : -1,
|
|
245
|
-
"aria-label":
|
|
244
|
+
"aria-label": W("inputs.otp.digitLabel", {
|
|
246
245
|
current: t + 1,
|
|
247
246
|
total: e
|
|
248
247
|
}),
|
|
249
|
-
onChange:
|
|
250
|
-
onKeyDown:
|
|
251
|
-
onPaste:
|
|
252
|
-
onFocus:
|
|
253
|
-
className:
|
|
248
|
+
onChange: U(t),
|
|
249
|
+
onKeyDown: X(t),
|
|
250
|
+
onPaste: Y(t),
|
|
251
|
+
onFocus: Z(t),
|
|
252
|
+
className: fe({ tone: J })
|
|
254
253
|
},
|
|
255
254
|
t
|
|
256
255
|
);
|
|
@@ -260,8 +259,8 @@ const me = ee(
|
|
|
260
259
|
] });
|
|
261
260
|
}
|
|
262
261
|
);
|
|
263
|
-
|
|
262
|
+
ve.displayName = "OTPInput";
|
|
264
263
|
export {
|
|
265
|
-
|
|
264
|
+
ve as O
|
|
266
265
|
};
|
|
267
|
-
//# sourceMappingURL=otp-input-
|
|
266
|
+
//# sourceMappingURL=otp-input-CMphfBxZ.js.map
|