@alfadocs/ui-kit 0.38.0 → 0.39.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-DId1p-nn.js +315 -0
- package/dist/_chunks/{signature-capture-C-fF71xI.js → signature-capture-BRzCklg4.js} +27 -24
- 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
|
@@ -11,6 +11,7 @@ const L = W(
|
|
|
11
11
|
"ds:rounded-[var(--radius-lg)]",
|
|
12
12
|
"ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]",
|
|
13
13
|
"ds:shadow-[var(--shadow-card)]",
|
|
14
|
+
"ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2",
|
|
14
15
|
"ds:p-[var(--spacing-md)]"
|
|
15
16
|
].join(" "),
|
|
16
17
|
{
|
|
@@ -55,9 +56,9 @@ const L = W(
|
|
|
55
56
|
ariaLabel: A,
|
|
56
57
|
emptyState: m,
|
|
57
58
|
className: w,
|
|
58
|
-
...
|
|
59
|
-
},
|
|
60
|
-
const { t: e } = q(),
|
|
59
|
+
...b
|
|
60
|
+
}, x) => {
|
|
61
|
+
const { t: e } = q(), c = N(), k = N(), i = t !== void 0 && r.length > t, [o, B] = O(z), g = y(null), S = y(r.length);
|
|
61
62
|
V(() => {
|
|
62
63
|
if (!g.current) return;
|
|
63
64
|
const n = S.current, s = r.length;
|
|
@@ -66,7 +67,7 @@ const L = W(
|
|
|
66
67
|
defaultValue: "{{count}} warnings to review"
|
|
67
68
|
})), S.current = s;
|
|
68
69
|
}, [r.length, e]);
|
|
69
|
-
const R = _(() => !
|
|
70
|
+
const R = _(() => !i || !o ? r : r.slice(0, t), [r, i, o, t]), E = i ? r.length - (t ?? 0) : 0, I = j(
|
|
70
71
|
(n) => (s) => {
|
|
71
72
|
s || d == null || d(n);
|
|
72
73
|
},
|
|
@@ -75,21 +76,21 @@ const L = W(
|
|
|
75
76
|
/* @__PURE__ */ a(
|
|
76
77
|
"h2",
|
|
77
78
|
{
|
|
78
|
-
id:
|
|
79
|
+
id: c,
|
|
79
80
|
className: "ds:text-start type-title-section ds:text-[var(--foreground)]",
|
|
80
81
|
children: h
|
|
81
82
|
}
|
|
82
83
|
),
|
|
83
84
|
p ? /* @__PURE__ */ a("p", { className: "ds:text-start type-body-sm ds:text-[var(--muted-foreground)]", children: p }) : null
|
|
84
|
-
] }) : /* @__PURE__ */ a("h2", { id:
|
|
85
|
+
] }) : /* @__PURE__ */ a("h2", { id: c, className: "ds:sr-only", children: G });
|
|
85
86
|
return r.length === 0 ? m ? /* @__PURE__ */ l(
|
|
86
87
|
"section",
|
|
87
88
|
{
|
|
88
|
-
ref:
|
|
89
|
-
"aria-labelledby":
|
|
89
|
+
ref: x,
|
|
90
|
+
"aria-labelledby": c,
|
|
90
91
|
"data-component": "warning-stack",
|
|
91
92
|
className: [L({ size: f, stretch: v }), w].filter(Boolean).join(" "),
|
|
92
|
-
...
|
|
93
|
+
...b,
|
|
93
94
|
children: [
|
|
94
95
|
C,
|
|
95
96
|
m
|
|
@@ -98,11 +99,11 @@ const L = W(
|
|
|
98
99
|
) : null : /* @__PURE__ */ l(
|
|
99
100
|
"section",
|
|
100
101
|
{
|
|
101
|
-
ref:
|
|
102
|
-
"aria-labelledby":
|
|
102
|
+
ref: x,
|
|
103
|
+
"aria-labelledby": c,
|
|
103
104
|
"data-component": "warning-stack",
|
|
104
105
|
className: [L({ size: f, stretch: v }), w].filter(Boolean).join(" "),
|
|
105
|
-
...
|
|
106
|
+
...b,
|
|
106
107
|
children: [
|
|
107
108
|
C,
|
|
108
109
|
/* @__PURE__ */ a(
|
|
@@ -117,7 +118,7 @@ const L = W(
|
|
|
117
118
|
/* @__PURE__ */ a(
|
|
118
119
|
"ul",
|
|
119
120
|
{
|
|
120
|
-
id:
|
|
121
|
+
id: k,
|
|
121
122
|
className: J({ size: f }),
|
|
122
123
|
"aria-label": e("warningStack.listLabel", "Warning list"),
|
|
123
124
|
children: R.map((n) => {
|
|
@@ -139,14 +140,14 @@ const L = W(
|
|
|
139
140
|
})
|
|
140
141
|
}
|
|
141
142
|
),
|
|
142
|
-
|
|
143
|
+
i ? /* @__PURE__ */ l(
|
|
143
144
|
F,
|
|
144
145
|
{
|
|
145
146
|
type: "button",
|
|
146
147
|
intent: "link",
|
|
147
148
|
size: "sm",
|
|
148
149
|
"aria-expanded": !o,
|
|
149
|
-
"aria-controls":
|
|
150
|
+
"aria-controls": k,
|
|
150
151
|
onClick: T,
|
|
151
152
|
className: K,
|
|
152
153
|
children: [
|
|
@@ -176,4 +177,4 @@ P.displayName = "WarningStack";
|
|
|
176
177
|
export {
|
|
177
178
|
P as W
|
|
178
179
|
};
|
|
179
|
-
//# sourceMappingURL=warning-stack-
|
|
180
|
+
//# sourceMappingURL=warning-stack-DNR3-IbP.js.map
|
|
@@ -1077,7 +1077,8 @@ const lt = {
|
|
|
1077
1077
|
"ds:relative ds:flex ds:items-center",
|
|
1078
1078
|
"ds:gap-[var(--spacing-sm)]",
|
|
1079
1079
|
"ds:rounded-[var(--radius-md)]",
|
|
1080
|
-
|
|
1080
|
+
// Flat-hairline: 1px card-border, no shadow; accessible theme bumps to 2px.
|
|
1081
|
+
"ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2",
|
|
1081
1082
|
"ds:bg-[var(--card)] ds:text-[var(--card-foreground)]",
|
|
1082
1083
|
// Motion honours the accessible theme (--animation-duration → 0ms).
|
|
1083
1084
|
"ds:transition-[box-shadow,transform,opacity] ds:duration-[var(--animation-duration)]",
|
|
@@ -1398,4 +1399,4 @@ export {
|
|
|
1398
1399
|
ee as r,
|
|
1399
1400
|
D as w
|
|
1400
1401
|
};
|
|
1401
|
-
//# sourceMappingURL=workflow-map-
|
|
1402
|
+
//# sourceMappingURL=workflow-map-C3gB0FvB.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"packageVersion": "0.
|
|
3
|
+
"packageVersion": "0.39.0",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"kind": "component",
|
|
@@ -3553,6 +3553,44 @@
|
|
|
3553
3553
|
}
|
|
3554
3554
|
}
|
|
3555
3555
|
},
|
|
3556
|
+
{
|
|
3557
|
+
"kind": "component",
|
|
3558
|
+
"id": "sign-document",
|
|
3559
|
+
"capabilities": [
|
|
3560
|
+
"submit"
|
|
3561
|
+
],
|
|
3562
|
+
"state": [
|
|
3563
|
+
{
|
|
3564
|
+
"name": "isReadComplete",
|
|
3565
|
+
"type": "boolean",
|
|
3566
|
+
"description": "True when the reader has reached the last page (or read-gating is off)."
|
|
3567
|
+
}
|
|
3568
|
+
],
|
|
3569
|
+
"actions": [
|
|
3570
|
+
{
|
|
3571
|
+
"name": "submit",
|
|
3572
|
+
"safety": "write",
|
|
3573
|
+
"description": "Confirm the current signature and emit it via onSign. No-op if unsigned."
|
|
3574
|
+
},
|
|
3575
|
+
{
|
|
3576
|
+
"name": "reset",
|
|
3577
|
+
"safety": "destructive",
|
|
3578
|
+
"description": "Clear the captured signature and return to the unsigned state."
|
|
3579
|
+
}
|
|
3580
|
+
],
|
|
3581
|
+
"domHooks": {
|
|
3582
|
+
"root": {
|
|
3583
|
+
"attr": "data-component",
|
|
3584
|
+
"value": "sign-document",
|
|
3585
|
+
"description": "Marks the SignDocument wrapper."
|
|
3586
|
+
},
|
|
3587
|
+
"instanceId": {
|
|
3588
|
+
"attr": "data-component-id",
|
|
3589
|
+
"sourceProp": "id",
|
|
3590
|
+
"description": "Sourced from the id prop."
|
|
3591
|
+
}
|
|
3592
|
+
}
|
|
3593
|
+
},
|
|
3556
3594
|
{
|
|
3557
3595
|
"kind": "component",
|
|
3558
3596
|
"id": "sign-in-with-alfadocs-button",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as m } from "../../_chunks/bmi-calculator-
|
|
1
|
+
import { B as m } from "../../_chunks/bmi-calculator-DnEr513I.js";
|
|
2
2
|
import { b as e, a as t, c as r, d as T, e as c, f as i, i as b, k as n, l as f } from "../../_chunks/bmi-BxD-tFzU.js";
|
|
3
3
|
export {
|
|
4
4
|
m as BmiCalculator,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
declare const chartVariants: (props?: ({
|
|
3
|
-
density?: "compact" | "comfortable" | null | undefined;
|
|
3
|
+
density?: "none" | "compact" | "comfortable" | null | undefined;
|
|
4
4
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
5
|
export type ChartType = 'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar';
|
|
6
6
|
export interface ChartSeries {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as l, B as r, C as t, a as s, D as n, b as d, c as i, d as o, E as C, e as R, I as F, L as g, N as T, f as b, S as u, g as c, h as D, T as m, i as p, j as x, k as f, l as y, m as E, n as S, o as h, U as A, p as L, q as N, u as k } from "../../_chunks/editable-currency-cell-renderer-
|
|
1
|
+
import { A as l, B as r, C as t, a as s, D as n, b as d, c as i, d as o, E as C, e as R, I as F, L as g, N as T, f as b, S as u, g as c, h as D, T as m, i as p, j as x, k as f, l as y, m as E, n as S, o as h, U as A, p as L, q as N, u as k } from "../../_chunks/editable-currency-cell-renderer-DgkCIIcO.js";
|
|
2
2
|
export {
|
|
3
3
|
l as ActionsCellRenderer,
|
|
4
4
|
r as BalanceCellRenderer,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { type AccessibilityPreference, type ThemePreference } from '../../hooks';
|
|
4
|
+
declare const wrapperVariants: (props?: ({
|
|
5
|
+
align?: "end" | "start" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface HeaderSettingsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>, VariantProps<typeof wrapperVariants> {
|
|
8
|
+
/** Anchor side for the dropdown. Defaults to `end` (matches LTR + RTL). */
|
|
9
|
+
align?: 'start' | 'end';
|
|
10
|
+
/**
|
|
11
|
+
* Size of the cog trigger only. Forwards to the underlying
|
|
12
|
+
* `IconButton`. Defaults to `md` to preserve the existing visual.
|
|
13
|
+
* Use `sm` when composing alongside other `<Button size="sm">`
|
|
14
|
+
* actions in a header row — keeps the visual rhythm consistent.
|
|
15
|
+
*
|
|
16
|
+
* The internal dropdown chrome (Appearance toggle group, locale
|
|
17
|
+
* picker, accessibility switch) stays at kit defaults regardless
|
|
18
|
+
* — this prop only sizes the trigger.
|
|
19
|
+
*/
|
|
20
|
+
size?: 'sm' | 'md' | 'lg';
|
|
21
|
+
/** Disable the trigger entirely. */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface HeaderSettingsHandle {
|
|
25
|
+
/**
|
|
26
|
+
* Switch the active locale. Widened to `string` (vs. `Locale`) so
|
|
27
|
+
* agent surfaces with untyped inputs can call through without
|
|
28
|
+
* extra casting — invalid tags no-op silently.
|
|
29
|
+
*/
|
|
30
|
+
setLocale: (next: string) => void;
|
|
31
|
+
setTheme: (next: ThemePreference) => void;
|
|
32
|
+
setAccessibility: (next: AccessibilityPreference) => void;
|
|
33
|
+
}
|
|
34
|
+
export declare const HeaderSettings: import("react").ForwardRefExoticComponent<HeaderSettingsProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=header-settings.d.ts.map
|
|
@@ -1,244 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as A, useRef as p, useImperativeHandle as C, useCallback as x, useMemo as I } from "react";
|
|
3
|
-
import { c as N } from "../../_chunks/index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as E } from "react-i18next";
|
|
5
|
-
import { I as o } from "../../_chunks/icon-button-CKEOrN37.js";
|
|
6
|
-
import { I as M } from "../../_chunks/icon-button-group-C48khLE0.js";
|
|
7
|
-
import { D as r } from "../../_chunks/dropdown-menu-BC5ZdOMo.js";
|
|
8
|
-
import { S as R } from "../../_chunks/switch-BJ6HD3Mn.js";
|
|
9
|
-
import { c as v, a as _, L as H } from "../../_chunks/locale-picker-D99UyZVJ.js";
|
|
10
|
-
import { u as O } from "../../_chunks/use-locale-BkCIHujH.js";
|
|
11
|
-
import { u as P } from "../../_chunks/use-theme-C2dHKUAN.js";
|
|
12
|
-
import { u as j } from "../../_chunks/registry-nPAVE19X.js";
|
|
13
|
-
import { S as K } from "../../_chunks/settings-ca2Yi9R8.js";
|
|
14
|
-
import { S as D, M as z } from "../../_chunks/sun-BuXE0xUS.js";
|
|
15
|
-
import { M as V } from "../../_chunks/monitor-D-SFdbrU.js";
|
|
16
|
-
const B = {
|
|
17
|
-
id: "header-settings",
|
|
18
|
-
capabilities: ["view_change"],
|
|
19
|
-
state: {},
|
|
20
|
-
actions: {
|
|
21
|
-
set_locale: {
|
|
22
|
-
safety: "write",
|
|
23
|
-
argsType: "{ locale: string }",
|
|
24
|
-
descriptionKey: "ui.agent.headerSettings.actions.setLocale",
|
|
25
|
-
description: "Switch the active locale to the given IETF tag.",
|
|
26
|
-
invoke: (t, i) => {
|
|
27
|
-
t.setLocale(i.locale);
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
set_theme: {
|
|
31
|
-
safety: "write",
|
|
32
|
-
argsType: '{ theme: "light" | "dark" | "system" }',
|
|
33
|
-
descriptionKey: "ui.agent.headerSettings.actions.setTheme",
|
|
34
|
-
description: "Switch the theme preference.",
|
|
35
|
-
invoke: (t, i) => {
|
|
36
|
-
t.setTheme(i.theme);
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
set_accessibility: {
|
|
40
|
-
safety: "write",
|
|
41
|
-
argsType: '{ accessibility: "default" | "accessible" }',
|
|
42
|
-
descriptionKey: "ui.agent.headerSettings.actions.setAccessibility",
|
|
43
|
-
description: "Switch the accessibility preference.",
|
|
44
|
-
invoke: (t, i) => {
|
|
45
|
-
t.setAccessibility(i.accessibility);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
domHooks: {
|
|
50
|
-
root: {
|
|
51
|
-
attr: "data-component",
|
|
52
|
-
value: "header-settings",
|
|
53
|
-
description: "Marks the HeaderSettings wrapper."
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
function G(t, i) {
|
|
58
|
-
if (!(typeof window > "u"))
|
|
59
|
-
try {
|
|
60
|
-
window.localStorage.setItem(t, i);
|
|
61
|
-
} catch {
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function W(t) {
|
|
65
|
-
if (typeof document > "u") return;
|
|
66
|
-
const i = document.documentElement;
|
|
67
|
-
i.lang = t, i.dir = v[t].dir;
|
|
68
|
-
}
|
|
69
|
-
const F = N("ds:inline-flex ds:items-center", {
|
|
70
|
-
variants: {
|
|
71
|
-
align: {
|
|
72
|
-
start: "",
|
|
73
|
-
end: ""
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
defaultVariants: { align: "end" }
|
|
77
|
-
}), U = [
|
|
78
|
-
"ds:w-[20rem] ds:p-[var(--spacing-xs)]",
|
|
79
|
-
"ds:rounded-[var(--radius-md)] ds:border ds:border-border",
|
|
80
|
-
"ds:bg-background ds:text-foreground ds:shadow-[var(--shadow-lg)]"
|
|
81
|
-
].join(" "), Y = A(
|
|
82
|
-
(t, i) => {
|
|
83
|
-
const {
|
|
84
|
-
align: g = "end",
|
|
85
|
-
size: y = "md",
|
|
86
|
-
disabled: S = !1,
|
|
87
|
-
className: w,
|
|
88
|
-
id: m,
|
|
89
|
-
...L
|
|
90
|
-
} = t, { t: s } = E(), n = P(), { setLocale: h } = O(), u = p(null);
|
|
91
|
-
C(i, () => u.current, []);
|
|
92
|
-
const f = x(
|
|
93
|
-
(a) => {
|
|
94
|
-
h(a), W(a), G(H, a);
|
|
95
|
-
},
|
|
96
|
-
[h]
|
|
97
|
-
), b = p(f);
|
|
98
|
-
b.current = f;
|
|
99
|
-
const c = p(n);
|
|
100
|
-
c.current = n;
|
|
101
|
-
const k = I(
|
|
102
|
-
() => ({
|
|
103
|
-
setLocale: (a) => {
|
|
104
|
-
Object.prototype.hasOwnProperty.call(v, a) && b.current(a);
|
|
105
|
-
},
|
|
106
|
-
setTheme: (a) => c.current.setTheme(a),
|
|
107
|
-
setAccessibility: (a) => c.current.setAccessibility(a)
|
|
108
|
-
}),
|
|
109
|
-
[]
|
|
110
|
-
);
|
|
111
|
-
j(B, k, m);
|
|
112
|
-
const T = n.accessibility === "accessible";
|
|
113
|
-
return /* @__PURE__ */ e(
|
|
114
|
-
"div",
|
|
115
|
-
{
|
|
116
|
-
ref: u,
|
|
117
|
-
"data-component": "header-settings",
|
|
118
|
-
"data-component-id": m,
|
|
119
|
-
className: F({ align: g, className: w }),
|
|
120
|
-
...L,
|
|
121
|
-
children: /* @__PURE__ */ l(r.Root, { children: [
|
|
122
|
-
/* @__PURE__ */ e(r.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
123
|
-
o,
|
|
124
|
-
{
|
|
125
|
-
size: y,
|
|
126
|
-
disabled: S,
|
|
127
|
-
icon: /* @__PURE__ */ e(K, { "aria-hidden": !0 }),
|
|
128
|
-
"aria-label": s("navigation.headerSettings.trigger")
|
|
129
|
-
}
|
|
130
|
-
) }),
|
|
131
|
-
/* @__PURE__ */ e(r.Portal, { children: /* @__PURE__ */ l(
|
|
132
|
-
r.Content,
|
|
133
|
-
{
|
|
134
|
-
align: g,
|
|
135
|
-
sideOffset: 8,
|
|
136
|
-
className: U,
|
|
137
|
-
onKeyDownCapture: (a) => {
|
|
138
|
-
const d = a.target;
|
|
139
|
-
(d == null ? void 0 : d.tagName) === "INPUT" && // Always allow Escape so the menu can close.
|
|
140
|
-
a.key !== "Escape" && a.stopPropagation();
|
|
141
|
-
},
|
|
142
|
-
children: [
|
|
143
|
-
/* @__PURE__ */ e(r.Label, { children: s("navigation.headerSettings.language.label") }),
|
|
144
|
-
/* @__PURE__ */ e(
|
|
145
|
-
"div",
|
|
146
|
-
{
|
|
147
|
-
role: "group",
|
|
148
|
-
"aria-label": s("navigation.headerSettings.language.label"),
|
|
149
|
-
className: [
|
|
150
|
-
"ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
|
|
151
|
-
// Stretch the compact LocalePicker to the full menu
|
|
152
|
-
// width so it reads as a single row affordance (not
|
|
153
|
-
// a centred pill). The picker's root is
|
|
154
|
-
// inline-flex; the `*:` child selector + `flex-1`
|
|
155
|
-
// gives it `flex: 1 1 0%` once it's a child of the
|
|
156
|
-
// flex container we make this div into.
|
|
157
|
-
"ds:flex ds:[&>*]:flex-1"
|
|
158
|
-
].join(" "),
|
|
159
|
-
children: /* @__PURE__ */ e(_, { variant: "compact", popoverSide: "end" })
|
|
160
|
-
}
|
|
161
|
-
),
|
|
162
|
-
/* @__PURE__ */ e(r.Separator, {}),
|
|
163
|
-
/* @__PURE__ */ e(r.Label, { children: s("navigation.headerSettings.appearance.label") }),
|
|
164
|
-
/* @__PURE__ */ e(
|
|
165
|
-
"div",
|
|
166
|
-
{
|
|
167
|
-
role: "group",
|
|
168
|
-
"aria-label": s("navigation.headerSettings.appearance.label"),
|
|
169
|
-
className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
|
|
170
|
-
children: /* @__PURE__ */ l(
|
|
171
|
-
M,
|
|
172
|
-
{
|
|
173
|
-
role: "radiogroup",
|
|
174
|
-
mode: "toggle-single",
|
|
175
|
-
size: "sm",
|
|
176
|
-
"aria-label": s("navigation.headerSettings.appearance.label"),
|
|
177
|
-
value: n.theme,
|
|
178
|
-
onValueChange: (a) => n.setTheme(a),
|
|
179
|
-
children: [
|
|
180
|
-
/* @__PURE__ */ e(
|
|
181
|
-
o,
|
|
182
|
-
{
|
|
183
|
-
icon: /* @__PURE__ */ e(D, { "aria-hidden": !0 }),
|
|
184
|
-
"aria-label": s("navigation.headerSettings.appearance.light"),
|
|
185
|
-
value: "light"
|
|
186
|
-
}
|
|
187
|
-
),
|
|
188
|
-
/* @__PURE__ */ e(
|
|
189
|
-
o,
|
|
190
|
-
{
|
|
191
|
-
icon: /* @__PURE__ */ e(z, { "aria-hidden": !0 }),
|
|
192
|
-
"aria-label": s("navigation.headerSettings.appearance.dark"),
|
|
193
|
-
value: "dark"
|
|
194
|
-
}
|
|
195
|
-
),
|
|
196
|
-
/* @__PURE__ */ e(
|
|
197
|
-
o,
|
|
198
|
-
{
|
|
199
|
-
icon: /* @__PURE__ */ e(V, { "aria-hidden": !0 }),
|
|
200
|
-
"aria-label": s(
|
|
201
|
-
"navigation.headerSettings.appearance.system"
|
|
202
|
-
),
|
|
203
|
-
value: "system"
|
|
204
|
-
}
|
|
205
|
-
)
|
|
206
|
-
]
|
|
207
|
-
}
|
|
208
|
-
)
|
|
209
|
-
}
|
|
210
|
-
),
|
|
211
|
-
/* @__PURE__ */ e(r.Separator, {}),
|
|
212
|
-
/* @__PURE__ */ e(
|
|
213
|
-
"div",
|
|
214
|
-
{
|
|
215
|
-
role: "group",
|
|
216
|
-
"aria-label": s(
|
|
217
|
-
"navigation.headerSettings.appearance.accessible"
|
|
218
|
-
),
|
|
219
|
-
className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]",
|
|
220
|
-
children: /* @__PURE__ */ e(
|
|
221
|
-
R,
|
|
222
|
-
{
|
|
223
|
-
label: s("navigation.headerSettings.appearance.accessible"),
|
|
224
|
-
labelSide: "start",
|
|
225
|
-
size: "sm",
|
|
226
|
-
checked: T,
|
|
227
|
-
onCheckedChange: (a) => n.setAccessibility(a ? "accessible" : "default")
|
|
228
|
-
}
|
|
229
|
-
)
|
|
230
|
-
}
|
|
231
|
-
)
|
|
232
|
-
]
|
|
233
|
-
}
|
|
234
|
-
) })
|
|
235
|
-
] })
|
|
236
|
-
}
|
|
237
|
-
);
|
|
238
|
-
}
|
|
239
|
-
);
|
|
240
|
-
Y.displayName = "HeaderSettings";
|
|
1
|
+
import { H as t } from "../../_chunks/header-settings-CBLwUK6t.js";
|
|
241
2
|
export {
|
|
242
|
-
|
|
3
|
+
t as HeaderSettings
|
|
243
4
|
};
|
|
244
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -135,6 +135,7 @@ export * from './pdf-viewer';
|
|
|
135
135
|
export * from './reviews-panel';
|
|
136
136
|
export * from './rich-text-editor';
|
|
137
137
|
export * from './signature-capture';
|
|
138
|
+
export * from './sign-document';
|
|
138
139
|
export * from './slot-grid';
|
|
139
140
|
export * from './tooth-scheme';
|
|
140
141
|
export * from './transaction-chip';
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { type Locale } from '../../i18n/locale-meta';
|
|
4
|
+
export declare const LOCALE_STORAGE_KEY = "alfadocs-ui.locale";
|
|
5
|
+
/**
|
|
6
|
+
* Sentinel value (and Combobox-row key) for "follow the browser /
|
|
7
|
+
* OS locale". Mirrors the ThemeToggle's `'system'` preference: the
|
|
8
|
+
* picker doesn't store a concrete locale code; the runtime resolves
|
|
9
|
+
* to `navigator.language` on each mount.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LOCALE_SYSTEM_DEFAULT: "system";
|
|
12
|
+
export type LocalePreference = Locale | typeof LOCALE_SYSTEM_DEFAULT;
|
|
13
|
+
declare const wrapperVariants: (props?: ({
|
|
14
|
+
variant?: "icon" | "compact" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
export type LocalePickerVariant = 'icon' | 'compact';
|
|
17
|
+
export interface LocalePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>, VariantProps<typeof wrapperVariants> {
|
|
18
|
+
variant?: LocalePickerVariant;
|
|
19
|
+
/**
|
|
20
|
+
* Controlled escape hatch — when omitted the picker reads/writes
|
|
21
|
+
* `useLocale()` directly so a bare `<LocalePicker />` works with no
|
|
22
|
+
* wiring. Pass both to opt into controlled mode.
|
|
23
|
+
*/
|
|
24
|
+
value?: Locale;
|
|
25
|
+
onValueChange?: (next: LocalePreference) => void;
|
|
26
|
+
/** Disable interaction (greys out the trigger). */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Mark as busy (kept open / focusable but read-only). */
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Side the search popover opens onto, relative to the trigger.
|
|
32
|
+
* Defaults to `bottom` (standard dropdown). Use `end` (inline-end —
|
|
33
|
+
* right in LTR, left in RTL) when nesting the LocalePicker inside
|
|
34
|
+
* another popover/menu so the search surface flies out to the side
|
|
35
|
+
* rather than stacking below.
|
|
36
|
+
*/
|
|
37
|
+
popoverSide?: 'top' | 'bottom' | 'start' | 'end';
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Curated imperative handle for agent / external automation. The
|
|
41
|
+
* `setLocale` parameter is widened to `string` (rather than the
|
|
42
|
+
* narrower `Locale`) so untyped agent inputs don't have to thread the
|
|
43
|
+
* `LOCALES_WITH_BUNDLES` constraint at the call site — the
|
|
44
|
+
* implementation validates internally and no-ops on an unsupported
|
|
45
|
+
* tag.
|
|
46
|
+
*/
|
|
47
|
+
export interface LocalePickerHandle {
|
|
48
|
+
setLocale: (next: string) => void;
|
|
49
|
+
}
|
|
50
|
+
export interface LocalePickerSearchListProps {
|
|
51
|
+
/**
|
|
52
|
+
* Active selection. Either a `Locale` code or the
|
|
53
|
+
* `LOCALE_SYSTEM_DEFAULT` sentinel (when the user hasn't made an
|
|
54
|
+
* explicit choice and the kit is following `navigator.language`).
|
|
55
|
+
* Defaults to the shared store.
|
|
56
|
+
*/
|
|
57
|
+
value?: LocalePreference;
|
|
58
|
+
/**
|
|
59
|
+
* Fires after a successful selection. Accepts a concrete `Locale`
|
|
60
|
+
* or `LOCALE_SYSTEM_DEFAULT` (when the user picks the "System
|
|
61
|
+
* Default" row at the top of the list).
|
|
62
|
+
*
|
|
63
|
+
* Defaults to the shared setter (delegates to useLocale, persists
|
|
64
|
+
* or clears storage, updates document.dir/lang).
|
|
65
|
+
*/
|
|
66
|
+
onValueChange?: (next: LocalePreference) => void;
|
|
67
|
+
/** Optional id for the search input (axe `aria-labelledby` chain). */
|
|
68
|
+
inputId?: string;
|
|
69
|
+
/** Disable the input + list interactions. */
|
|
70
|
+
disabled?: boolean;
|
|
71
|
+
/** Mark as busy (read-only). */
|
|
72
|
+
loading?: boolean;
|
|
73
|
+
className?: string;
|
|
74
|
+
}
|
|
75
|
+
export declare const LocalePickerSearchList: import("react").ForwardRefExoticComponent<LocalePickerSearchListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
76
|
+
export declare const LocalePicker: import("react").ForwardRefExoticComponent<LocalePickerProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
77
|
+
SearchList: import("react").ForwardRefExoticComponent<LocalePickerSearchListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
78
|
+
};
|
|
79
|
+
export {};
|
|
80
|
+
//# sourceMappingURL=locale-picker.d.ts.map
|