@alfadocs/ui-kit 0.50.1 → 0.52.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/{agenda-card-BaSfVfrL.js → agenda-card-Bl-SBiCh.js} +55 -45
- package/dist/_chunks/agenda-tray-DA6qj8BL.js +203 -0
- package/dist/_chunks/{ai-consent-banner-F2md5JD3.js → ai-consent-banner-DBKV27je.js} +2 -2
- package/dist/_chunks/ai-tools-rail-7tC3GT4h.js +340 -0
- package/dist/_chunks/{alert-CUTxnym2.js → alert-_mUKLmwA.js} +54 -44
- package/dist/_chunks/{audio-recorder-DVJXV7_k.js → audio-recorder-D6OVfNiZ.js} +2 -2
- package/dist/_chunks/{booking-DljH0JkS.js → booking-BUV9fspj.js} +2 -2
- package/dist/_chunks/{document-scanner-Cxqvq7GR.js → document-scanner-biBS_f6c.js} +2 -2
- package/dist/_chunks/dropdown-menu-DwwPovMZ.js +354 -0
- package/dist/_chunks/{editable-currency-cell-renderer-Bh48OHRv.js → editable-currency-cell-renderer-D5C5tCfu.js} +3 -3
- package/dist/_chunks/{freemium-paywall-BWaLWje-.js → freemium-paywall-gHGA44dW.js} +2 -2
- package/dist/_chunks/{header-settings-Bx0Biimh.js → header-settings-D5Z2B_Yz.js} +3 -3
- package/dist/_chunks/{logo-yituK7sE.js → logo-1FuSGx0n.js} +2 -1
- package/dist/_chunks/marketplace-app-shell-C4OYAC22.js +513 -0
- package/dist/_chunks/maximize-2-Cm9OUQ2m.js +17 -0
- package/dist/_chunks/{patient-search-BJOmTmDA.js → patient-search-CArmRKeg.js} +3 -3
- package/dist/_chunks/patient-shell-Coarf346.js +162 -0
- package/dist/_chunks/{payment-form-xmeCkxas.js → payment-form-DJ9vnzrT.js} +2 -2
- package/dist/_chunks/{pdf-viewer-q1D3Uion.js → pdf-viewer-4odMFuFW.js} +2 -2
- package/dist/_chunks/{practice-results-Cq1y8JFD.js → practice-results-CtfciF2v.js} +3 -3
- package/dist/_chunks/{pregnancy-dating-DT_244bG.js → pregnancy-dating-BA37LSkF.js} +15 -15
- package/dist/_chunks/{privacy-lock-BmX_gkvt.js → privacy-lock-BN3L-alb.js} +2 -2
- package/dist/_chunks/{public-footer.agent-okt8ZRc5.js → public-footer.agent-CfXuW1x6.js} +2 -2
- package/dist/_chunks/{recaptcha-widget-CFYyLSEX.js → recaptcha-widget-BCNHsgqt.js} +2 -2
- package/dist/_chunks/{sidebar-h78cTNLh.js → sidebar-DPEHzxLZ.js} +397 -346
- package/dist/_chunks/{sign-document-CZkAf28g.js → sign-document-Bzld9jVM.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-CuYn_kKP.js → sign-in-with-alfadocs-button-BpAjVmsI.js} +2 -2
- package/dist/_chunks/{task-card-CPyQ5AXC.js → task-card-BwY9jaV1.js} +48 -42
- package/dist/_chunks/task-tray-Cb_hK4yb.js +234 -0
- package/dist/_chunks/{theme-toggle-ClATnY4Q.js → theme-toggle-DAW7uC0B.js} +3 -3
- package/dist/_chunks/use-edge-resize-ZnGG7gyO.js +139 -0
- package/dist/_chunks/use-theme-CAuo6EYT.js +159 -0
- package/dist/_chunks/{warning-stack-CXfoAT-_.js → warning-stack-Cv4fr5zo.js} +2 -2
- package/dist/_chunks/{workflow-map-DzX_LI4y.js → workflow-map-BJDUNYlX.js} +3 -3
- package/dist/agent-catalog.json +1 -1
- package/dist/brand/product-lockup/product-lockup.d.ts +47 -12
- package/dist/components/agenda-card/agenda-card.d.ts +19 -2
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/agenda-tray.d.ts +24 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +8 -0
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button-group/button-group.d.ts +1 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +2 -0
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/form-field/form-field.d.ts +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/icon-button-group/icon-button-group.d.ts +15 -15
- package/dist/components/key-value-pair/key-value-pair.d.ts +1 -1
- package/dist/components/logo/index.js +1 -1
- package/dist/components/patient-search/index.js +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/pregnancy-dating/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/radio-group/radio-group.d.ts +1 -1
- package/dist/components/recaptcha-widget/index.js +1 -1
- package/dist/components/separator/separator.d.ts +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sidebar/sidebar.d.ts +8 -0
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/tabs/tabs.d.ts +2 -2
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-card/task-card.d.ts +15 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/task-tray/task-tray.d.ts +24 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/components/workflow/workflow-map.d.ts +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +12 -10
- package/dist/hooks/use-edge-resize.d.ts +78 -0
- package/dist/i18n/locales/ar.d.ts +4 -0
- package/dist/i18n/locales/ar.js +7 -3
- package/dist/i18n/locales/de.d.ts +4 -0
- package/dist/i18n/locales/de.js +7 -3
- package/dist/i18n/locales/el.d.ts +4 -0
- package/dist/i18n/locales/el.js +7 -3
- package/dist/i18n/locales/en.d.ts +4 -0
- package/dist/i18n/locales/en.js +7 -3
- package/dist/i18n/locales/es.d.ts +4 -0
- package/dist/i18n/locales/es.js +7 -3
- package/dist/i18n/locales/fr.d.ts +4 -0
- package/dist/i18n/locales/fr.js +7 -3
- package/dist/i18n/locales/hi.d.ts +4 -0
- package/dist/i18n/locales/hi.js +7 -3
- package/dist/i18n/locales/it.d.ts +4 -0
- package/dist/i18n/locales/it.js +7 -3
- package/dist/i18n/locales/ja.d.ts +4 -0
- package/dist/i18n/locales/ja.js +7 -3
- package/dist/i18n/locales/nl.d.ts +4 -0
- package/dist/i18n/locales/nl.js +7 -3
- package/dist/i18n/locales/pl.d.ts +4 -0
- package/dist/i18n/locales/pl.js +7 -3
- package/dist/i18n/locales/pt.d.ts +4 -0
- package/dist/i18n/locales/pt.js +7 -3
- package/dist/i18n/locales/ro.d.ts +4 -0
- package/dist/i18n/locales/ro.js +7 -3
- package/dist/i18n/locales/ru.d.ts +4 -0
- package/dist/i18n/locales/ru.js +7 -3
- package/dist/i18n/locales/sq.d.ts +4 -0
- package/dist/i18n/locales/sq.js +7 -3
- package/dist/i18n/locales/sv.d.ts +4 -0
- package/dist/i18n/locales/sv.js +7 -3
- package/dist/i18n/locales/tr.d.ts +4 -0
- package/dist/i18n/locales/tr.js +7 -3
- package/dist/i18n/locales/zh.d.ts +4 -0
- package/dist/i18n/locales/zh.js +7 -3
- package/dist/index.js +31 -31
- package/dist/locales/ar.json +7 -3
- package/dist/locales/de.json +7 -3
- package/dist/locales/el.json +7 -3
- package/dist/locales/en.json +7 -3
- package/dist/locales/es.json +7 -3
- package/dist/locales/fr.json +7 -3
- package/dist/locales/hi.json +7 -3
- package/dist/locales/it.json +7 -3
- package/dist/locales/ja.json +7 -3
- package/dist/locales/nl.json +7 -3
- package/dist/locales/pl.json +7 -3
- package/dist/locales/pt.json +7 -3
- package/dist/locales/ro.json +7 -3
- package/dist/locales/ru.json +7 -3
- package/dist/locales/sq.json +7 -3
- package/dist/locales/sv.json +7 -3
- package/dist/locales/tr.json +7 -3
- package/dist/locales/zh.json +7 -3
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +8 -6
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/agenda-tray-DQayYmQ0.js +0 -165
- package/dist/_chunks/ai-tools-rail-CYLWrRmm.js +0 -280
- package/dist/_chunks/circle-arrow-up-CC_85SuH.js +0 -16
- package/dist/_chunks/dropdown-menu-CUEXqKis.js +0 -299
- package/dist/_chunks/marketplace-app-shell-UKSLx9K_.js +0 -428
- package/dist/_chunks/patient-shell-DUmhXnFq.js +0 -174
- package/dist/_chunks/task-tray-B8jFv5FV.js +0 -196
- package/dist/_chunks/use-theme-C2dHKUAN.js +0 -145
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { A as
|
|
6
|
-
import { B as
|
|
7
|
-
import { i as
|
|
8
|
-
import { C } from "./chevron-right-BrpYejk0.js";
|
|
9
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as h } from "react";
|
|
3
|
+
import { c as x } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as y } from "react-i18next";
|
|
5
|
+
import { A as N } from "./avatar-BNQNhoyL.js";
|
|
6
|
+
import { B as C } from "./badge-zsf5i5bH.js";
|
|
7
|
+
import { i as w } from "./is-safe-url-DkETxeHz.js";
|
|
8
|
+
import { C as k } from "./chevron-right-BrpYejk0.js";
|
|
9
|
+
const L = x(
|
|
10
10
|
[
|
|
11
11
|
"ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
12
12
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -31,7 +31,7 @@ const w = h(
|
|
|
31
31
|
interactive: !1
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
),
|
|
34
|
+
), m = [
|
|
35
35
|
"ds:focus-visible:outline-none",
|
|
36
36
|
"ds:after:content-[''] ds:after:absolute ds:after:inset-0 ds:after:rounded-[var(--radius-sm)]",
|
|
37
37
|
"ds:after:pointer-events-auto",
|
|
@@ -40,86 +40,96 @@ const w = h(
|
|
|
40
40
|
"ds:focus-visible:after:outline-[color:var(--ring)]",
|
|
41
41
|
"ds:focus-visible:after:outline-offset-[length:var(--focus-ring-offset)]",
|
|
42
42
|
"ds:forced-colors:focus-visible:after:outline-[CanvasText]"
|
|
43
|
-
].join(" "),
|
|
43
|
+
].join(" "), T = {
|
|
44
44
|
confirmed: "success",
|
|
45
45
|
pending: "warning",
|
|
46
|
-
cancelled: "error"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
cancelled: "error",
|
|
47
|
+
absent: "error"
|
|
48
|
+
}, z = h(
|
|
49
|
+
({ item: s, size: l = "sm", onActivate: a, actions: i, className: p, ...g }, v) => {
|
|
50
|
+
const { t: c } = y(), r = !!a, b = !!s.url && w(s.url), u = c("agendaCard.itemLabel", {
|
|
50
51
|
time: s.time,
|
|
51
52
|
patient: s.patient.name,
|
|
52
53
|
treatment: s.treatment ?? "",
|
|
53
54
|
defaultValue: '{{time}} · {{patient}}{{treatment, prepend, " · "}}'
|
|
54
|
-
}), n = /* @__PURE__ */
|
|
55
|
+
}), f = s.dateLabel ? `${s.dateLabel} · ${u}` : u, n = /* @__PURE__ */ e("span", { className: "ds:flex-1 ds:min-w-0 ds:truncate type-body-sm ds:text-[color:var(--foreground)]", children: s.patient.name });
|
|
55
56
|
let t;
|
|
56
|
-
return r &&
|
|
57
|
+
return r && b ? t = /* @__PURE__ */ e(
|
|
57
58
|
"a",
|
|
58
59
|
{
|
|
59
60
|
href: s.url,
|
|
60
|
-
"aria-label":
|
|
61
|
-
className:
|
|
61
|
+
"aria-label": f,
|
|
62
|
+
className: m + " ds:contents",
|
|
62
63
|
onClick: (d) => {
|
|
63
|
-
d.defaultPrevented || d.metaKey || d.ctrlKey || d.shiftKey ||
|
|
64
|
+
d.defaultPrevented || d.metaKey || d.ctrlKey || d.shiftKey || a == null || a(s);
|
|
64
65
|
},
|
|
65
66
|
children: n
|
|
66
67
|
}
|
|
67
|
-
) : r ? t = /* @__PURE__ */
|
|
68
|
+
) : r ? t = /* @__PURE__ */ e(
|
|
68
69
|
"button",
|
|
69
70
|
{
|
|
70
71
|
type: "button",
|
|
71
|
-
"aria-label":
|
|
72
|
-
className:
|
|
73
|
-
onClick: () =>
|
|
72
|
+
"aria-label": f,
|
|
73
|
+
className: m + " ds:contents ds:bg-transparent ds:border-0 ds:p-0 ds:text-start",
|
|
74
|
+
onClick: () => a == null ? void 0 : a(s),
|
|
74
75
|
children: n
|
|
75
76
|
}
|
|
76
|
-
) : t = n, /* @__PURE__ */
|
|
77
|
+
) : t = n, /* @__PURE__ */ o(
|
|
77
78
|
"div",
|
|
78
79
|
{
|
|
79
|
-
ref:
|
|
80
|
+
ref: v,
|
|
80
81
|
role: "listitem",
|
|
81
82
|
"data-component": "agenda-card",
|
|
82
83
|
"data-component-id": s.id,
|
|
83
84
|
"data-status": s.status ?? "confirmed",
|
|
84
|
-
className:
|
|
85
|
-
...
|
|
85
|
+
className: L({ size: l, interactive: r, className: p }),
|
|
86
|
+
...g,
|
|
86
87
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ o(
|
|
88
89
|
"span",
|
|
89
90
|
{
|
|
90
91
|
"aria-hidden": "true",
|
|
91
|
-
className: "ds:inline-flex ds:w-12 ds:shrink-0 type-body-sm ds:font-medium ds:text-[color:var(--foreground)] ds:tabular-nums",
|
|
92
|
-
children:
|
|
92
|
+
className: "ds:inline-flex ds:flex-col ds:w-12 ds:shrink-0 type-body-sm ds:font-medium ds:text-[color:var(--foreground)] ds:tabular-nums",
|
|
93
|
+
children: [
|
|
94
|
+
s.time,
|
|
95
|
+
s.dateLabel ? /* @__PURE__ */ e("span", { className: "type-eyebrow ds:font-normal ds:text-[color:var(--muted-foreground)]", children: s.dateLabel }) : null
|
|
96
|
+
]
|
|
93
97
|
}
|
|
94
98
|
),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
|
|
99
|
+
/* @__PURE__ */ e(
|
|
100
|
+
N,
|
|
97
101
|
{
|
|
98
102
|
name: s.patient.name,
|
|
99
103
|
src: s.patient.avatarUrl,
|
|
100
|
-
size:
|
|
104
|
+
size: l === "md" ? "md" : "sm",
|
|
101
105
|
className: "ds:shrink-0",
|
|
102
106
|
"aria-hidden": "true",
|
|
103
107
|
role: "presentation",
|
|
104
108
|
"aria-label": void 0
|
|
105
109
|
}
|
|
106
110
|
),
|
|
107
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ o("div", { className: "ds:flex-1 ds:min-w-0 ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
108
112
|
t,
|
|
109
|
-
s.treatment ? /* @__PURE__ */
|
|
113
|
+
s.treatment ? /* @__PURE__ */ e("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)] ds:truncate", children: s.treatment }) : null,
|
|
114
|
+
s.meta ? /* @__PURE__ */ e("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)] ds:truncate", children: s.meta }) : null,
|
|
115
|
+
s.note ? /* @__PURE__ */ e("span", { className: "type-body-sm ds:text-[color:var(--muted-foreground)] ds:line-clamp-2", children: s.note }) : null
|
|
110
116
|
] }),
|
|
111
|
-
|
|
112
|
-
|
|
117
|
+
i ? (
|
|
118
|
+
// Above the stretched-link overlay so the buttons stay clickable.
|
|
119
|
+
/* @__PURE__ */ e("span", { className: "ds:relative ds:z-[1] ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:shrink-0", children: i })
|
|
120
|
+
) : null,
|
|
121
|
+
s.status && s.status !== "confirmed" ? /* @__PURE__ */ e(
|
|
122
|
+
C,
|
|
113
123
|
{
|
|
114
|
-
variant:
|
|
124
|
+
variant: T[s.status],
|
|
115
125
|
size: "sm",
|
|
116
126
|
withDot: !0,
|
|
117
127
|
className: "ds:shrink-0",
|
|
118
|
-
children:
|
|
128
|
+
children: c(`agendaCard.status.${s.status}`, s.status)
|
|
119
129
|
}
|
|
120
130
|
) : null,
|
|
121
|
-
r ? /* @__PURE__ */
|
|
122
|
-
|
|
131
|
+
r ? /* @__PURE__ */ e(
|
|
132
|
+
k,
|
|
123
133
|
{
|
|
124
134
|
"aria-hidden": "true",
|
|
125
135
|
className: "ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:opacity-0 ds:transition-opacity ds:motion-reduce:transition-none ds:group-hover:opacity-100 ds:group-focus-within:opacity-100 ds:rtl:rotate-180"
|
|
@@ -130,8 +140,8 @@ const w = h(
|
|
|
130
140
|
);
|
|
131
141
|
}
|
|
132
142
|
);
|
|
133
|
-
|
|
143
|
+
z.displayName = "AgendaCard";
|
|
134
144
|
export {
|
|
135
|
-
|
|
145
|
+
z as A
|
|
136
146
|
};
|
|
137
|
-
//# sourceMappingURL=agenda-card-
|
|
147
|
+
//# sourceMappingURL=agenda-card-Bl-SBiCh.js.map
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as P, useRef as T, useImperativeHandle as B, useMemo as H } from "react";
|
|
3
|
+
import { c as K } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as M } from "react-i18next";
|
|
5
|
+
import { I as q } from "./icon-button-CKEOrN37.js";
|
|
6
|
+
import { S as A } from "./skeleton-CZbwyJAA.js";
|
|
7
|
+
import { E as D } from "./empty-state-BLy7tigq.js";
|
|
8
|
+
import { A as V } from "./agenda-card-Bl-SBiCh.js";
|
|
9
|
+
import { u as F } from "./registry-nPAVE19X.js";
|
|
10
|
+
import { C as G } from "./calendar-days-C4BmpCZg.js";
|
|
11
|
+
import { P as J } from "./plus-CYKNmfuA.js";
|
|
12
|
+
const L = {
|
|
13
|
+
id: "agenda-tray",
|
|
14
|
+
capabilities: ["select_single"],
|
|
15
|
+
state: {
|
|
16
|
+
items: {
|
|
17
|
+
type: "Array<{ id: string; status: string }>",
|
|
18
|
+
descriptionKey: "ui.agent.agendaTray.state.items",
|
|
19
|
+
description: "Currently-displayed appointments. Ids + status only — never patient identity.",
|
|
20
|
+
read: (s) => s.getItems()
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
actions: {
|
|
24
|
+
select_item: {
|
|
25
|
+
safety: "read",
|
|
26
|
+
argsType: "{ id: string }",
|
|
27
|
+
descriptionKey: "ui.agent.agendaTray.actions.selectItem",
|
|
28
|
+
description: "Activate the appointment with the given id.",
|
|
29
|
+
invoke: (s, t) => {
|
|
30
|
+
s.selectItem(t.id);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
domHooks: {
|
|
35
|
+
root: {
|
|
36
|
+
attr: "data-component",
|
|
37
|
+
value: "agenda-tray",
|
|
38
|
+
description: "Marks the AgendaTray wrapper."
|
|
39
|
+
},
|
|
40
|
+
instanceId: {
|
|
41
|
+
attr: "data-component-id",
|
|
42
|
+
sourceProp: "id",
|
|
43
|
+
description: "Sourced from the id prop. Required to address a specific tray from the agent."
|
|
44
|
+
},
|
|
45
|
+
item: {
|
|
46
|
+
attr: "data-appointment-id",
|
|
47
|
+
description: "Stable appointment id emitted on each rendered AgendaCard inside the tray."
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}, Q = K(
|
|
51
|
+
[
|
|
52
|
+
"ds:flex ds:flex-col",
|
|
53
|
+
"ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)]",
|
|
54
|
+
"ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2",
|
|
55
|
+
"ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]",
|
|
56
|
+
"ds:overflow-hidden"
|
|
57
|
+
].join(" "),
|
|
58
|
+
{
|
|
59
|
+
variants: {
|
|
60
|
+
size: {
|
|
61
|
+
sm: "",
|
|
62
|
+
md: ""
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
size: "sm"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
), U = P(
|
|
70
|
+
({
|
|
71
|
+
id: s,
|
|
72
|
+
items: t,
|
|
73
|
+
title: N,
|
|
74
|
+
caption: f,
|
|
75
|
+
size: u = "sm",
|
|
76
|
+
onOpenAppointment: r,
|
|
77
|
+
onAddAppointment: g,
|
|
78
|
+
addLabel: w,
|
|
79
|
+
loading: o = !1,
|
|
80
|
+
emptyTitle: k,
|
|
81
|
+
emptyDescription: C,
|
|
82
|
+
emptyAction: I,
|
|
83
|
+
viewAllLabel: v,
|
|
84
|
+
onViewAll: y,
|
|
85
|
+
renderItemActions: l,
|
|
86
|
+
scrollable: c = !1,
|
|
87
|
+
className: j,
|
|
88
|
+
...R
|
|
89
|
+
}, z) => {
|
|
90
|
+
const { t: d } = M(), m = N ?? d("agendaTray.title", "Today's appointments"), S = w ?? d("agendaTray.add", "Add appointment"), h = !o && t.length === 0;
|
|
91
|
+
let i;
|
|
92
|
+
o ? i = /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [0, 1, 2].map((a) => /* @__PURE__ */ e(A, { variant: "rectangular", height: "2.5rem" }, a)) }) : h ? i = /* @__PURE__ */ e("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ e(
|
|
93
|
+
D,
|
|
94
|
+
{
|
|
95
|
+
variant: "first-use",
|
|
96
|
+
size: "sm",
|
|
97
|
+
title: k ?? d("agendaTray.empty.title", "No appointments"),
|
|
98
|
+
description: C ?? d(
|
|
99
|
+
"agendaTray.empty.description",
|
|
100
|
+
"New appointments will appear here."
|
|
101
|
+
),
|
|
102
|
+
primaryAction: I
|
|
103
|
+
}
|
|
104
|
+
) }) : i = /* @__PURE__ */ e(
|
|
105
|
+
"ul",
|
|
106
|
+
{
|
|
107
|
+
className: [
|
|
108
|
+
// flex-1 unconditionally so a footer pins to the tray's
|
|
109
|
+
// bottom edge in equal-height grid rows.
|
|
110
|
+
"ds:flex ds:list-none ds:flex-col ds:flex-1 ds:min-h-0",
|
|
111
|
+
// Keyboard-focusable when it scrolls (axe
|
|
112
|
+
// scrollable-region-focusable) — pair with a height on the
|
|
113
|
+
// tray's className.
|
|
114
|
+
c ? "ds:overflow-y-auto" : ""
|
|
115
|
+
].filter(Boolean).join(" "),
|
|
116
|
+
tabIndex: c ? 0 : void 0,
|
|
117
|
+
"aria-label": c ? m : void 0,
|
|
118
|
+
children: t.map((a) => /* @__PURE__ */ e(
|
|
119
|
+
V,
|
|
120
|
+
{
|
|
121
|
+
item: a,
|
|
122
|
+
size: u,
|
|
123
|
+
onActivate: r,
|
|
124
|
+
actions: l == null ? void 0 : l(a),
|
|
125
|
+
"data-appointment-id": a.id
|
|
126
|
+
},
|
|
127
|
+
a.id
|
|
128
|
+
))
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
const p = T(t);
|
|
132
|
+
p.current = t;
|
|
133
|
+
const b = T(null);
|
|
134
|
+
B(z, () => b.current, []);
|
|
135
|
+
const _ = H(
|
|
136
|
+
() => ({
|
|
137
|
+
getItems: () => p.current.map((a) => ({
|
|
138
|
+
id: a.id,
|
|
139
|
+
status: a.status ?? "confirmed"
|
|
140
|
+
})),
|
|
141
|
+
selectItem: (a) => {
|
|
142
|
+
const x = p.current.find((E) => E.id === a);
|
|
143
|
+
x && (r == null || r(x));
|
|
144
|
+
}
|
|
145
|
+
}),
|
|
146
|
+
[r]
|
|
147
|
+
);
|
|
148
|
+
return F(L, _, s), /* @__PURE__ */ n(
|
|
149
|
+
"section",
|
|
150
|
+
{
|
|
151
|
+
ref: b,
|
|
152
|
+
"aria-label": m,
|
|
153
|
+
"data-component": "agenda-tray",
|
|
154
|
+
"data-component-id": s,
|
|
155
|
+
className: Q({ size: u, className: j }),
|
|
156
|
+
...R,
|
|
157
|
+
children: [
|
|
158
|
+
/* @__PURE__ */ n("header", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [
|
|
159
|
+
/* @__PURE__ */ n("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:min-w-0", children: [
|
|
160
|
+
/* @__PURE__ */ n("h3", { className: "ds:m-0 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-card", children: [
|
|
161
|
+
/* @__PURE__ */ e(G, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
162
|
+
m
|
|
163
|
+
] }),
|
|
164
|
+
f ? /* @__PURE__ */ e("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: f }) : null
|
|
165
|
+
] }),
|
|
166
|
+
g ? /* @__PURE__ */ e(
|
|
167
|
+
q,
|
|
168
|
+
{
|
|
169
|
+
icon: /* @__PURE__ */ e(J, {}),
|
|
170
|
+
intent: "outline",
|
|
171
|
+
size: "sm",
|
|
172
|
+
"aria-label": S,
|
|
173
|
+
onClick: g
|
|
174
|
+
}
|
|
175
|
+
) : null
|
|
176
|
+
] }),
|
|
177
|
+
i,
|
|
178
|
+
v && y && !h && !o ? /* @__PURE__ */ e("footer", { className: "ds:[border-block-start:var(--border-width-sm)_solid_var(--card-border)] ds:p-[var(--spacing-sm)]", children: /* @__PURE__ */ e(
|
|
179
|
+
"button",
|
|
180
|
+
{
|
|
181
|
+
type: "button",
|
|
182
|
+
onClick: y,
|
|
183
|
+
className: [
|
|
184
|
+
"type-label ds:text-[color:var(--link)] ds:underline ds:underline-offset-2 ds:hover:no-underline",
|
|
185
|
+
"ds:rounded-[var(--radius-sm)] ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
|
|
186
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
187
|
+
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
188
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
189
|
+
].join(" "),
|
|
190
|
+
children: v
|
|
191
|
+
}
|
|
192
|
+
) }) : null
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
U.displayName = "AgendaTray";
|
|
199
|
+
export {
|
|
200
|
+
U as A,
|
|
201
|
+
L as a
|
|
202
|
+
};
|
|
203
|
+
//# sourceMappingURL=agenda-tray-DA6qj8BL.js.map
|
|
@@ -2,7 +2,7 @@ import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as N, useState as k, useRef as q, useMemo as I } from "react";
|
|
3
3
|
import { c as L } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as R } from "react-i18next";
|
|
5
|
-
import { A as d } from "./alert-
|
|
5
|
+
import { A as d } from "./alert-_mUKLmwA.js";
|
|
6
6
|
import { B as w } from "./badge-zsf5i5bH.js";
|
|
7
7
|
import { B as T } from "./button-DD_0Xdmr.js";
|
|
8
8
|
import { C as V } from "./checkbox-DRcOdmXv.js";
|
|
@@ -166,4 +166,4 @@ export {
|
|
|
166
166
|
P as A,
|
|
167
167
|
K as a
|
|
168
168
|
};
|
|
169
|
-
//# sourceMappingURL=ai-consent-banner-
|
|
169
|
+
//# sourceMappingURL=ai-consent-banner-DBKV27je.js.map
|