@alfadocs/ui-kit 1.34.0 → 1.35.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/appointment-card-Bh_CIlc6.js +431 -0
- package/dist/_chunks/appointment-timeline-De-Wqdkw.js +449 -0
- package/dist/_chunks/{appointment-tray-6rg071CL.js → appointment-tray-4I9wTAi4.js} +2 -2
- package/dist/_chunks/{calendar-workspace-4NH1Z47_.js → calendar-workspace-UywR5gUl.js} +3 -3
- package/dist/_chunks/{care-plan-card-CZW476Kg.js → care-plan-card-DHVhBcvs.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-BMUYagEw.js → care-plan-entry-card-Dx6IdTcR.js} +2 -2
- package/dist/_chunks/{care-plan-header-B5CBE0zu.js → care-plan-header-UTX5ZD74.js} +2 -2
- package/dist/_chunks/{entity-card-DmrgYSEX.js → entity-card-9_62gY7l.js} +4 -4
- package/dist/_chunks/{operator-hero-D7-iiFQ9.js → operator-hero-aG_qyn6g.js} +2 -2
- package/dist/_chunks/{payment-request-card-lmKLwsDs.js → payment-request-card-DvEsWEkC.js} +2 -2
- package/dist/agent-catalog.json +1 -1
- package/dist/components/appointment-card/appointment-card.d.ts +36 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/appointment-timeline.d.ts +6 -0
- package/dist/components/appointment-timeline/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/care-plan-header/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +5 -0
- package/dist/i18n/locales/ar.js +6 -1
- package/dist/i18n/locales/de.d.ts +5 -0
- package/dist/i18n/locales/de.js +6 -1
- package/dist/i18n/locales/el.d.ts +5 -0
- package/dist/i18n/locales/el.js +6 -1
- package/dist/i18n/locales/en.d.ts +5 -0
- package/dist/i18n/locales/en.js +6 -1
- package/dist/i18n/locales/es.d.ts +5 -0
- package/dist/i18n/locales/es.js +6 -1
- package/dist/i18n/locales/fr.d.ts +5 -0
- package/dist/i18n/locales/fr.js +6 -1
- package/dist/i18n/locales/hi.d.ts +5 -0
- package/dist/i18n/locales/hi.js +6 -1
- package/dist/i18n/locales/it.d.ts +8 -3
- package/dist/i18n/locales/it.js +8 -3
- package/dist/i18n/locales/ja.d.ts +5 -0
- package/dist/i18n/locales/ja.js +6 -1
- package/dist/i18n/locales/nl.d.ts +5 -0
- package/dist/i18n/locales/nl.js +6 -1
- package/dist/i18n/locales/pl.d.ts +5 -0
- package/dist/i18n/locales/pl.js +6 -1
- package/dist/i18n/locales/pt.d.ts +5 -0
- package/dist/i18n/locales/pt.js +6 -1
- package/dist/i18n/locales/ro.d.ts +5 -0
- package/dist/i18n/locales/ro.js +6 -1
- package/dist/i18n/locales/ru.d.ts +5 -0
- package/dist/i18n/locales/ru.js +6 -1
- package/dist/i18n/locales/sq.d.ts +5 -0
- package/dist/i18n/locales/sq.js +6 -1
- package/dist/i18n/locales/sv.d.ts +5 -0
- package/dist/i18n/locales/sv.js +6 -1
- package/dist/i18n/locales/tr.d.ts +5 -0
- package/dist/i18n/locales/tr.js +6 -1
- package/dist/i18n/locales/zh.d.ts +5 -0
- package/dist/i18n/locales/zh.js +6 -1
- package/dist/index.js +9 -9
- package/dist/locales/ar.json +6 -1
- package/dist/locales/de.json +6 -1
- package/dist/locales/el.json +6 -1
- package/dist/locales/en.json +6 -1
- package/dist/locales/es.json +6 -1
- package/dist/locales/fr.json +6 -1
- package/dist/locales/hi.json +6 -1
- package/dist/locales/it.json +8 -3
- package/dist/locales/ja.json +6 -1
- package/dist/locales/nl.json +6 -1
- package/dist/locales/pl.json +6 -1
- package/dist/locales/pt.json +6 -1
- package/dist/locales/ro.json +6 -1
- package/dist/locales/ru.json +6 -1
- package/dist/locales/sq.json +6 -1
- package/dist/locales/sv.json +6 -1
- package/dist/locales/tr.json +6 -1
- package/dist/locales/zh.json +6 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/appointment-card-D6mk39NB.js +0 -296
- package/dist/_chunks/appointment-timeline-D-V97Bhc.js +0 -403
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
import { jsxs as x, jsx as o, Fragment as je } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Ce, useId as He, useMemo as j, useRef as v, useState as $, useEffect as Me, useCallback as b, useImperativeHandle as Ne } from "react";
|
|
3
|
+
import { c as _e } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as Fe } from "react-i18next";
|
|
5
|
+
import { A as ne } from "./appointment-card-Bh_CIlc6.js";
|
|
6
|
+
import { B as P } from "./button-nJaPh_HC.js";
|
|
7
|
+
import { B as ze } from "./button-group-CaxRJsNG.js";
|
|
8
|
+
import { D as Ae } from "./date-picker-B6NW_PS5.js";
|
|
9
|
+
import { P as Be } from "./panel-header-D313n_9-.js";
|
|
10
|
+
import { S as Ke } from "./skeleton-CZbwyJAA.js";
|
|
11
|
+
import { E as Ee } from "./empty-state-X0sVPfVo.js";
|
|
12
|
+
import { u as ae } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
13
|
+
import { u as Ye } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
14
|
+
import { a as $e, u as Pe, R as We } from "./use-list-reflow-Cw43nxw5.js";
|
|
15
|
+
import { u as qe } from "./registry-DvAUVLHh.js";
|
|
16
|
+
import { C as Ge } from "./calendar-days-BGWklvE-.js";
|
|
17
|
+
const Ve = {
|
|
18
|
+
id: "appointment-timeline",
|
|
19
|
+
// 'pick' backs select_item (non-persisting activation through
|
|
20
|
+
// onOpenAppointment); 'scroll' backs jump_to_today, which re-anchors the
|
|
21
|
+
// scroll viewport (mirrors practice-results' scroll_to_result).
|
|
22
|
+
capabilities: ["scroll", "pick"],
|
|
23
|
+
state: {
|
|
24
|
+
items: {
|
|
25
|
+
type: "Array<{ id: string; state: string }>",
|
|
26
|
+
descriptionKey: "ui.agent.appointmentTimeline.state.items",
|
|
27
|
+
description: "Currently-rendered appointments. Ids + lifecycle state only — never patient identity.",
|
|
28
|
+
read: (i) => i.getItems()
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
actions: {
|
|
32
|
+
select_item: {
|
|
33
|
+
safety: "read",
|
|
34
|
+
argsType: "{ id: string }",
|
|
35
|
+
argsSchema: {
|
|
36
|
+
type: "object",
|
|
37
|
+
properties: { id: { type: "string" } },
|
|
38
|
+
required: ["id"]
|
|
39
|
+
},
|
|
40
|
+
idempotent: !0,
|
|
41
|
+
descriptionKey: "ui.agent.appointmentTimeline.actions.selectItem",
|
|
42
|
+
description: "Activate the appointment with the given id.",
|
|
43
|
+
invoke: (i, n) => {
|
|
44
|
+
i.selectItem(n.id);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
jump_to_today: {
|
|
48
|
+
safety: "read",
|
|
49
|
+
idempotent: !0,
|
|
50
|
+
descriptionKey: "ui.agent.appointmentTimeline.actions.jumpToToday",
|
|
51
|
+
description: "Re-anchor the timeline scroll on today's appointments.",
|
|
52
|
+
invoke: (i) => {
|
|
53
|
+
i.jumpToToday();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
domHooks: {
|
|
58
|
+
root: {
|
|
59
|
+
attr: "data-component",
|
|
60
|
+
value: "appointment-timeline",
|
|
61
|
+
description: "Marks the AppointmentTimeline wrapper."
|
|
62
|
+
},
|
|
63
|
+
instanceId: {
|
|
64
|
+
attr: "data-component-id",
|
|
65
|
+
sourceProp: "id",
|
|
66
|
+
description: "Sourced from the id prop. Required to address a specific timeline from the agent."
|
|
67
|
+
},
|
|
68
|
+
item: {
|
|
69
|
+
attr: "data-appointment-id",
|
|
70
|
+
description: "Stable appointment id emitted on each rendered AppointmentCard inside the timeline."
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}, ie = 96, Le = _e(
|
|
74
|
+
[
|
|
75
|
+
"ds:flex ds:flex-col ds:h-full ds:min-h-0",
|
|
76
|
+
"ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]"
|
|
77
|
+
].join(" "),
|
|
78
|
+
{ variants: { size: { sm: "", md: "" } }, defaultVariants: { size: "sm" } }
|
|
79
|
+
), Oe = [
|
|
80
|
+
"ds:flex-1 ds:min-h-0 ds:overflow-y-auto",
|
|
81
|
+
"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
82
|
+
"ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
|
|
83
|
+
"ds:[--atl-mask-top:black] ds:[--atl-mask-bottom:black]",
|
|
84
|
+
"ds:data-[fade-top=true]:[--atl-mask-top:transparent]",
|
|
85
|
+
"ds:data-[fade-bottom=true]:[--atl-mask-bottom:transparent]",
|
|
86
|
+
"ds:[mask-image:linear-gradient(to_bottom,var(--atl-mask-top)_0,black_var(--atl-fade-distance,var(--spacing-lg)),black_calc(100%-var(--atl-fade-distance,var(--spacing-lg))),var(--atl-mask-bottom)_100%)]",
|
|
87
|
+
"ds:motion-reduce:[mask-image:none]",
|
|
88
|
+
"ds:[.theme-accessible_&]:[mask-image:none]",
|
|
89
|
+
"ds:forced-colors:[mask-image:none]",
|
|
90
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
91
|
+
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:[outline-offset:-2px]",
|
|
92
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
93
|
+
].join(" ");
|
|
94
|
+
function k(i) {
|
|
95
|
+
const n = `${i.getMonth() + 1}`.padStart(2, "0"), d = `${i.getDate()}`.padStart(2, "0");
|
|
96
|
+
return `${i.getFullYear()}-${n}-${d}`;
|
|
97
|
+
}
|
|
98
|
+
function Qe(i) {
|
|
99
|
+
const n = [...i].sort(
|
|
100
|
+
(g, m) => +new Date(g.startIso) - +new Date(m.startIso)
|
|
101
|
+
), d = /* @__PURE__ */ new Map();
|
|
102
|
+
for (const g of n) {
|
|
103
|
+
const m = new Date(g.startIso), h = k(m);
|
|
104
|
+
let r = d.get(h);
|
|
105
|
+
r || (r = {
|
|
106
|
+
key: h,
|
|
107
|
+
date: new Date(m.getFullYear(), m.getMonth(), m.getDate()),
|
|
108
|
+
items: []
|
|
109
|
+
}, d.set(h, r)), r.items.push(g);
|
|
110
|
+
}
|
|
111
|
+
return [...d.values()];
|
|
112
|
+
}
|
|
113
|
+
const Ue = Ce(
|
|
114
|
+
({
|
|
115
|
+
id: i,
|
|
116
|
+
items: n,
|
|
117
|
+
nowIso: d,
|
|
118
|
+
title: g,
|
|
119
|
+
locale: m,
|
|
120
|
+
currency: h,
|
|
121
|
+
size: r = "sm",
|
|
122
|
+
showPatient: C = !1,
|
|
123
|
+
onOpenAppointment: y,
|
|
124
|
+
selectedId: H,
|
|
125
|
+
onLoadEarlier: f,
|
|
126
|
+
onLoadLater: p,
|
|
127
|
+
hasMoreEarlier: F,
|
|
128
|
+
hasMoreLater: oe,
|
|
129
|
+
loadingEarlier: M = !1,
|
|
130
|
+
loadingLater: N = !1,
|
|
131
|
+
showFilters: re = !0,
|
|
132
|
+
onJumpToDate: _,
|
|
133
|
+
emptyTitle: le,
|
|
134
|
+
emptyDescription: ce,
|
|
135
|
+
className: de,
|
|
136
|
+
"aria-label": me,
|
|
137
|
+
...pe
|
|
138
|
+
}, ue) => {
|
|
139
|
+
const { t: l, i18n: fe } = Fe(), W = He(), z = Ye(), A = m ?? fe.language, q = g ?? l("appointmentTimeline.title"), c = j(
|
|
140
|
+
() => d ? new Date(d) : /* @__PURE__ */ new Date(),
|
|
141
|
+
[d]
|
|
142
|
+
), u = j(() => Qe(n), [n]), G = z || void 0, ge = j(
|
|
143
|
+
() => u.flatMap((e) => e.items.map((t) => t.id)).join(),
|
|
144
|
+
[u]
|
|
145
|
+
), { containerRef: he } = $e({
|
|
146
|
+
key: ge,
|
|
147
|
+
reduceMotion: G
|
|
148
|
+
}), V = Pe({ reduceMotion: G }), L = v(n), [O, Q] = $([]);
|
|
149
|
+
Me(() => {
|
|
150
|
+
const e = L.current;
|
|
151
|
+
if (e === n) return;
|
|
152
|
+
const t = new Set(n.map((a) => a.id)), s = e.filter((a) => !t.has(a.id));
|
|
153
|
+
s.length > 0 && (Q((a) => [...a, ...s]), s.forEach((a) => {
|
|
154
|
+
V.leave(a.id, () => {
|
|
155
|
+
Q((Y) => Y.filter((S) => S.id !== a.id));
|
|
156
|
+
});
|
|
157
|
+
})), L.current = n;
|
|
158
|
+
}, [n, V]);
|
|
159
|
+
const U = F ?? !!f, X = oe ?? !!p, B = j(() => {
|
|
160
|
+
if (u.length === 0) return;
|
|
161
|
+
const e = k(c), t = u.map((s) => s.key);
|
|
162
|
+
return t.includes(e) ? e : t.find((s) => s >= e) ?? t[t.length - 1];
|
|
163
|
+
}, [u, c]), D = v(null), w = v(/* @__PURE__ */ new Map()), Z = v(!1), K = v(void 0), J = v(0), [ye, ve] = $(!1), [ke, Te] = $(!1), R = b(() => {
|
|
164
|
+
const e = D.current;
|
|
165
|
+
if (!e) return;
|
|
166
|
+
const { scrollTop: t, scrollHeight: s, clientHeight: a } = e;
|
|
167
|
+
ve(t > 1), Te(t + a < s - 1);
|
|
168
|
+
}, []), I = b(
|
|
169
|
+
(e, t) => {
|
|
170
|
+
const s = D.current;
|
|
171
|
+
if (!s) return;
|
|
172
|
+
let a = w.current.get(e);
|
|
173
|
+
if (!a) {
|
|
174
|
+
const S = [...w.current.keys()].sort(), se = S.find((Se) => Se >= e) ?? S[S.length - 1];
|
|
175
|
+
a = se ? w.current.get(se) : void 0;
|
|
176
|
+
}
|
|
177
|
+
if (!a) return;
|
|
178
|
+
const Y = a.getBoundingClientRect().top - s.getBoundingClientRect().top;
|
|
179
|
+
s.scrollTo({
|
|
180
|
+
top: s.scrollTop + Y,
|
|
181
|
+
behavior: t && !z ? "smooth" : "auto"
|
|
182
|
+
});
|
|
183
|
+
},
|
|
184
|
+
[z]
|
|
185
|
+
);
|
|
186
|
+
ae(() => {
|
|
187
|
+
var s;
|
|
188
|
+
const e = D.current;
|
|
189
|
+
if (!e) return;
|
|
190
|
+
const t = (s = u[0]) == null ? void 0 : s.key;
|
|
191
|
+
if (!Z.current)
|
|
192
|
+
u.length > 0 && B && (I(B, !1), Z.current = !0);
|
|
193
|
+
else if (K.current && t && t < K.current) {
|
|
194
|
+
const a = e.scrollHeight - J.current;
|
|
195
|
+
a > 0 && (e.scrollTop += a);
|
|
196
|
+
}
|
|
197
|
+
K.current = t, J.current = e.scrollHeight, R();
|
|
198
|
+
}, [u, B, I, R]), ae(() => {
|
|
199
|
+
const e = D.current;
|
|
200
|
+
if (!e || typeof ResizeObserver > "u") return;
|
|
201
|
+
const t = new ResizeObserver(R);
|
|
202
|
+
return t.observe(e), () => t.disconnect();
|
|
203
|
+
}, [R]);
|
|
204
|
+
const be = b(() => {
|
|
205
|
+
R();
|
|
206
|
+
const e = D.current;
|
|
207
|
+
if (!e) return;
|
|
208
|
+
const { scrollTop: t, scrollHeight: s, clientHeight: a } = e;
|
|
209
|
+
f && U && !M && t <= ie && f(), p && X && !N && s - t - a <= ie && p();
|
|
210
|
+
}, [
|
|
211
|
+
R,
|
|
212
|
+
f,
|
|
213
|
+
p,
|
|
214
|
+
U,
|
|
215
|
+
X,
|
|
216
|
+
M,
|
|
217
|
+
N
|
|
218
|
+
]), T = b(
|
|
219
|
+
(e) => {
|
|
220
|
+
const t = k(e), s = w.current.has(t);
|
|
221
|
+
I(t, !0), s || _ == null || _(e.toISOString());
|
|
222
|
+
},
|
|
223
|
+
[I, _]
|
|
224
|
+
), xe = b(() => T(c), [T, c]), De = b(() => {
|
|
225
|
+
const e = new Date(c), t = (e.getDay() + 6) % 7;
|
|
226
|
+
e.setDate(e.getDate() - t), T(e);
|
|
227
|
+
}, [T, c]), we = b(() => {
|
|
228
|
+
T(new Date(c.getFullYear(), c.getMonth(), 1));
|
|
229
|
+
}, [T, c]), E = v(n);
|
|
230
|
+
E.current = n;
|
|
231
|
+
const ee = v(null);
|
|
232
|
+
Ne(ue, () => ee.current, []);
|
|
233
|
+
const Re = j(
|
|
234
|
+
() => ({
|
|
235
|
+
getItems: () => E.current.map((e) => ({ id: e.id, state: e.state })),
|
|
236
|
+
selectItem: (e) => {
|
|
237
|
+
const t = E.current.find((s) => s.id === e);
|
|
238
|
+
t && (y == null || y(t));
|
|
239
|
+
},
|
|
240
|
+
jumpToToday: () => I(k(c), !0)
|
|
241
|
+
}),
|
|
242
|
+
[y, I, c]
|
|
243
|
+
);
|
|
244
|
+
qe(Ve, Re, i);
|
|
245
|
+
const Ie = u.length === 0 && !M && !N, te = (e) => /* @__PURE__ */ o(
|
|
246
|
+
"div",
|
|
247
|
+
{
|
|
248
|
+
"aria-hidden": "true",
|
|
249
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:py-[var(--spacing-xs)]",
|
|
250
|
+
children: /* @__PURE__ */ o(Ke, { variant: "rectangular", height: "3.5rem" })
|
|
251
|
+
},
|
|
252
|
+
e
|
|
253
|
+
);
|
|
254
|
+
return /* @__PURE__ */ x(
|
|
255
|
+
"section",
|
|
256
|
+
{
|
|
257
|
+
ref: ee,
|
|
258
|
+
"data-component": "appointment-timeline",
|
|
259
|
+
"data-component-id": i,
|
|
260
|
+
"aria-label": me ?? q,
|
|
261
|
+
className: Le({ size: r, className: de }),
|
|
262
|
+
...pe,
|
|
263
|
+
children: [
|
|
264
|
+
/* @__PURE__ */ o(
|
|
265
|
+
Be,
|
|
266
|
+
{
|
|
267
|
+
icon: /* @__PURE__ */ o(Ge, {}),
|
|
268
|
+
title: q,
|
|
269
|
+
filters: re ? /* @__PURE__ */ x(je, { children: [
|
|
270
|
+
/* @__PURE__ */ x(ze, { label: l("appointmentTimeline.filtersLabel"), children: [
|
|
271
|
+
/* @__PURE__ */ o(P, { intent: "outline", size: "sm", onClick: xe, children: l("appointmentTimeline.today") }),
|
|
272
|
+
/* @__PURE__ */ o(P, { intent: "outline", size: "sm", onClick: De, children: l("appointmentTimeline.thisWeek") }),
|
|
273
|
+
/* @__PURE__ */ o(P, { intent: "outline", size: "sm", onClick: we, children: l("appointmentTimeline.thisMonth") })
|
|
274
|
+
] }),
|
|
275
|
+
/* @__PURE__ */ o("label", { htmlFor: W, className: "ds:sr-only", children: l("appointmentTimeline.jumpToDate") }),
|
|
276
|
+
/* @__PURE__ */ o(
|
|
277
|
+
Ae,
|
|
278
|
+
{
|
|
279
|
+
id: W,
|
|
280
|
+
size: "sm",
|
|
281
|
+
placeholder: l("appointmentTimeline.jumpToDate"),
|
|
282
|
+
onChange: (e) => {
|
|
283
|
+
e && T(e);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
] }) : void 0
|
|
288
|
+
}
|
|
289
|
+
),
|
|
290
|
+
Ie ? /* @__PURE__ */ o("div", { className: "ds:flex-1 ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ o(
|
|
291
|
+
Ee,
|
|
292
|
+
{
|
|
293
|
+
variant: "first-use",
|
|
294
|
+
size: "sm",
|
|
295
|
+
title: le ?? l("appointmentTimeline.empty.title"),
|
|
296
|
+
description: ce ?? l("appointmentTimeline.empty.description")
|
|
297
|
+
}
|
|
298
|
+
) }) : /* @__PURE__ */ x(
|
|
299
|
+
"div",
|
|
300
|
+
{
|
|
301
|
+
ref: D,
|
|
302
|
+
tabIndex: 0,
|
|
303
|
+
onScroll: be,
|
|
304
|
+
"data-fade-top": ye ? "true" : void 0,
|
|
305
|
+
"data-fade-bottom": ke ? "true" : void 0,
|
|
306
|
+
className: Oe,
|
|
307
|
+
children: [
|
|
308
|
+
M ? te("loading-earlier") : null,
|
|
309
|
+
/* @__PURE__ */ x(
|
|
310
|
+
"ol",
|
|
311
|
+
{
|
|
312
|
+
ref: he,
|
|
313
|
+
role: "list",
|
|
314
|
+
className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-md)] ds:p-0",
|
|
315
|
+
children: [
|
|
316
|
+
u.map((e) => /* @__PURE__ */ x(
|
|
317
|
+
"li",
|
|
318
|
+
{
|
|
319
|
+
ref: (t) => {
|
|
320
|
+
t ? w.current.set(e.key, t) : w.current.delete(e.key);
|
|
321
|
+
},
|
|
322
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
323
|
+
children: [
|
|
324
|
+
/* @__PURE__ */ o(
|
|
325
|
+
Xe,
|
|
326
|
+
{
|
|
327
|
+
date: e.date,
|
|
328
|
+
now: c,
|
|
329
|
+
locale: A,
|
|
330
|
+
todayLabel: l("appointmentTimeline.today"),
|
|
331
|
+
tomorrowLabel: l("appointmentTimeline.tomorrow"),
|
|
332
|
+
yesterdayLabel: l("appointmentTimeline.yesterday")
|
|
333
|
+
}
|
|
334
|
+
),
|
|
335
|
+
/* @__PURE__ */ o(
|
|
336
|
+
"ul",
|
|
337
|
+
{
|
|
338
|
+
role: "list",
|
|
339
|
+
className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0",
|
|
340
|
+
children: e.items.map((t) => /* @__PURE__ */ o(
|
|
341
|
+
ne,
|
|
342
|
+
{
|
|
343
|
+
item: t,
|
|
344
|
+
size: r,
|
|
345
|
+
surface: "elevated",
|
|
346
|
+
showPatient: C,
|
|
347
|
+
locale: A,
|
|
348
|
+
currency: h,
|
|
349
|
+
onActivate: y,
|
|
350
|
+
selected: t.id === H,
|
|
351
|
+
"data-appointment-id": t.id,
|
|
352
|
+
"data-reflow-id": t.id,
|
|
353
|
+
className: We
|
|
354
|
+
},
|
|
355
|
+
t.id
|
|
356
|
+
))
|
|
357
|
+
}
|
|
358
|
+
)
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
e.key
|
|
362
|
+
)),
|
|
363
|
+
O.length > 0 ? O.map((e) => /* @__PURE__ */ o(
|
|
364
|
+
ne,
|
|
365
|
+
{
|
|
366
|
+
item: e,
|
|
367
|
+
size: r,
|
|
368
|
+
surface: "elevated",
|
|
369
|
+
showPatient: C,
|
|
370
|
+
locale: A,
|
|
371
|
+
currency: h,
|
|
372
|
+
"aria-hidden": "true",
|
|
373
|
+
"data-leaving": !0,
|
|
374
|
+
className: [
|
|
375
|
+
"ds:opacity-0",
|
|
376
|
+
"ds:transition-opacity",
|
|
377
|
+
"ds:duration-[var(--animation-duration)]",
|
|
378
|
+
"ds:ease-[var(--ease-out)]",
|
|
379
|
+
"ds:motion-reduce:transition-none"
|
|
380
|
+
].join(" ")
|
|
381
|
+
},
|
|
382
|
+
`leaving-${e.id}`
|
|
383
|
+
)) : null
|
|
384
|
+
]
|
|
385
|
+
}
|
|
386
|
+
),
|
|
387
|
+
N ? te("loading-later") : null
|
|
388
|
+
]
|
|
389
|
+
}
|
|
390
|
+
)
|
|
391
|
+
]
|
|
392
|
+
}
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
);
|
|
396
|
+
Ue.displayName = "AppointmentTimeline";
|
|
397
|
+
function Xe({
|
|
398
|
+
date: i,
|
|
399
|
+
now: n,
|
|
400
|
+
locale: d,
|
|
401
|
+
todayLabel: g,
|
|
402
|
+
tomorrowLabel: m,
|
|
403
|
+
yesterdayLabel: h
|
|
404
|
+
}) {
|
|
405
|
+
const r = k(i), C = k(n), y = new Date(n);
|
|
406
|
+
y.setDate(n.getDate() + 1);
|
|
407
|
+
const H = new Date(n);
|
|
408
|
+
H.setDate(n.getDate() - 1);
|
|
409
|
+
const f = r === C;
|
|
410
|
+
let p;
|
|
411
|
+
if (f) p = g;
|
|
412
|
+
else if (r === k(y)) p = m;
|
|
413
|
+
else if (r === k(H)) p = h;
|
|
414
|
+
else {
|
|
415
|
+
const F = i.getFullYear() === n.getFullYear();
|
|
416
|
+
p = new Intl.DateTimeFormat(d, {
|
|
417
|
+
weekday: "short",
|
|
418
|
+
day: "numeric",
|
|
419
|
+
month: "short",
|
|
420
|
+
...F ? {} : { year: "numeric" }
|
|
421
|
+
}).format(i);
|
|
422
|
+
}
|
|
423
|
+
return /* @__PURE__ */ x(
|
|
424
|
+
"div",
|
|
425
|
+
{
|
|
426
|
+
"data-today": f ? "true" : void 0,
|
|
427
|
+
className: [
|
|
428
|
+
"ds:sticky ds:top-0 ds:z-[1] ds:bg-[color:var(--card)] ds:py-[var(--spacing-2xs)]",
|
|
429
|
+
"ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] type-eyebrow",
|
|
430
|
+
f ? "ds:text-[color:var(--primary)] ds:font-semibold" : "ds:text-[color:var(--muted-foreground)]"
|
|
431
|
+
].join(" "),
|
|
432
|
+
children: [
|
|
433
|
+
f ? /* @__PURE__ */ o(
|
|
434
|
+
"span",
|
|
435
|
+
{
|
|
436
|
+
"aria-hidden": "true",
|
|
437
|
+
className: "ds:size-1.5 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--primary)]"
|
|
438
|
+
}
|
|
439
|
+
) : null,
|
|
440
|
+
p
|
|
441
|
+
]
|
|
442
|
+
}
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
export {
|
|
446
|
+
Ue as A,
|
|
447
|
+
Ve as a
|
|
448
|
+
};
|
|
449
|
+
//# sourceMappingURL=appointment-timeline-De-Wqdkw.js.map
|
|
@@ -5,7 +5,7 @@ import { useTranslation as H } from "react-i18next";
|
|
|
5
5
|
import { I as M } from "./icon-button-DA2CAGHZ.js";
|
|
6
6
|
import { S as q } from "./skeleton-CZbwyJAA.js";
|
|
7
7
|
import { E as K } from "./empty-state-X0sVPfVo.js";
|
|
8
|
-
import { A as V } from "./appointment-card-
|
|
8
|
+
import { A as V } from "./appointment-card-Bh_CIlc6.js";
|
|
9
9
|
import { u as _ } from "./registry-DvAUVLHh.js";
|
|
10
10
|
import { C as B } from "./calendar-days-BGWklvE-.js";
|
|
11
11
|
import { P as D } from "./plus-DzMQ_c6b.js";
|
|
@@ -190,4 +190,4 @@ export {
|
|
|
190
190
|
ae as a,
|
|
191
191
|
L as b
|
|
192
192
|
};
|
|
193
|
-
//# sourceMappingURL=appointment-tray-
|
|
193
|
+
//# sourceMappingURL=appointment-tray-4I9wTAi4.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as h, jsx as n, Fragment as Oe } from "react/jsx-runtime";
|
|
2
2
|
import { useState as A, useCallback as oe, useRef as H, useEffect as ce, createElement as Tr, useContext as Wi, createContext as Pi, useId as ra, useMemo as Ce, Fragment as Lr } from "react";
|
|
3
3
|
import { useTranslation as me } from "react-i18next";
|
|
4
|
-
import { A as Ar } from "./appointment-timeline-
|
|
4
|
+
import { A as Ar } from "./appointment-timeline-De-Wqdkw.js";
|
|
5
5
|
import { C as Rr, a as Er, u as zi, d as Mr } from "./control-room-rail-5MbhjsxN.js";
|
|
6
6
|
import { S as Bi } from "./scroll-area-BZOvUhwQ.js";
|
|
7
7
|
import { d as Hn, c as mi, b as ft } from "./toast-YZz2sBzB.js";
|
|
@@ -35,7 +35,7 @@ import { T as Jr } from "./text-input-CUvCb6ST.js";
|
|
|
35
35
|
import { T as Os } from "./text-area-Bt3p7Pt0.js";
|
|
36
36
|
import { N as Ns } from "./number-input-Cgu2TtA8.js";
|
|
37
37
|
import { T as Zr } from "./time-picker-D0RS391l.js";
|
|
38
|
-
import { A as Qr } from "./appointment-card-
|
|
38
|
+
import { A as Qr } from "./appointment-card-Bh_CIlc6.js";
|
|
39
39
|
import { B as On } from "./badge-sTusUqZD.js";
|
|
40
40
|
import { D as eo } from "./data-table-DC96JJIq.js";
|
|
41
41
|
import { C as Sn } from "./checkbox-BuZ1u__2.js";
|
|
@@ -9389,4 +9389,4 @@ export {
|
|
|
9389
9389
|
em as r,
|
|
9390
9390
|
Wn as u
|
|
9391
9391
|
};
|
|
9392
|
-
//# sourceMappingURL=calendar-workspace-
|
|
9392
|
+
//# sourceMappingURL=calendar-workspace-UywR5gUl.js.map
|
|
@@ -7,9 +7,9 @@ import { P as A } from "./progress-CK8otcQ-.js";
|
|
|
7
7
|
import { T as C } from "./timestamp-BV2lC-wV.js";
|
|
8
8
|
import { T as L } from "./transaction-chip-DJCstquX.js";
|
|
9
9
|
import { A as O, b as G, c as Y, a as $ } from "./accordion-C11v9ouP.js";
|
|
10
|
-
import { C as q } from "./care-plan-entry-card-
|
|
10
|
+
import { C as q } from "./care-plan-entry-card-Dx6IdTcR.js";
|
|
11
11
|
import { u as J } from "./registry-DvAUVLHh.js";
|
|
12
|
-
import { C as Q, e as W } from "./entity-card-
|
|
12
|
+
import { C as Q, e as W } from "./entity-card-9_62gY7l.js";
|
|
13
13
|
import { i as X } from "./is-safe-url-DkETxeHz.js";
|
|
14
14
|
const Z = {
|
|
15
15
|
id: "care-plan-card",
|
|
@@ -253,4 +253,4 @@ export {
|
|
|
253
253
|
de as C,
|
|
254
254
|
Z as c
|
|
255
255
|
};
|
|
256
|
-
//# sourceMappingURL=care-plan-card-
|
|
256
|
+
//# sourceMappingURL=care-plan-card-DHVhBcvs.js.map
|
|
@@ -10,7 +10,7 @@ import { T as J } from "./tooth-scheme-Qe7LO5Di.js";
|
|
|
10
10
|
import { C as Q, b as X, a as Z } from "./collapsible-CTjxzGuF.js";
|
|
11
11
|
import { u as ee } from "./registry-DvAUVLHh.js";
|
|
12
12
|
import { C as ae } from "./chevron-down-DWE7GSq9.js";
|
|
13
|
-
import { e as te } from "./entity-card-
|
|
13
|
+
import { e as te } from "./entity-card-9_62gY7l.js";
|
|
14
14
|
const re = {
|
|
15
15
|
id: "care-plan-entry-card",
|
|
16
16
|
// `expand` is host-delegated: the per-phase breakdown is an in-component
|
|
@@ -319,4 +319,4 @@ export {
|
|
|
319
319
|
le as C,
|
|
320
320
|
re as c
|
|
321
321
|
};
|
|
322
|
-
//# sourceMappingURL=care-plan-entry-card-
|
|
322
|
+
//# sourceMappingURL=care-plan-entry-card-Dx6IdTcR.js.map
|
|
@@ -7,7 +7,7 @@ import { L as O } from "./link-CPb_pZPr.js";
|
|
|
7
7
|
import { S as $ } from "./separator-CYU_bGFn.js";
|
|
8
8
|
import { T as A } from "./timestamp-BV2lC-wV.js";
|
|
9
9
|
import { u as q } from "./registry-DvAUVLHh.js";
|
|
10
|
-
import { C as J, e as Q } from "./entity-card-
|
|
10
|
+
import { C as J, e as Q } from "./entity-card-9_62gY7l.js";
|
|
11
11
|
import { i as W } from "./is-safe-url-DkETxeHz.js";
|
|
12
12
|
const X = {
|
|
13
13
|
id: "care-plan-header",
|
|
@@ -195,4 +195,4 @@ export {
|
|
|
195
195
|
ee as C,
|
|
196
196
|
X as c
|
|
197
197
|
};
|
|
198
|
-
//# sourceMappingURL=care-plan-header-
|
|
198
|
+
//# sourceMappingURL=care-plan-header-UTX5ZD74.js.map
|
|
@@ -8,7 +8,7 @@ import { C as T } from "./card-DPmk26CL.js";
|
|
|
8
8
|
import { R as B } from "./rating-BYbUowdK.js";
|
|
9
9
|
import { u as F } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
10
10
|
import { u as K } from "./registry-DvAUVLHh.js";
|
|
11
|
-
import {
|
|
11
|
+
import { c as S } from "./entity-card-9_62gY7l.js";
|
|
12
12
|
const V = {
|
|
13
13
|
id: "operator-hero",
|
|
14
14
|
// Purely observable hero region — no interactive affordances and no
|
|
@@ -199,4 +199,4 @@ export {
|
|
|
199
199
|
M as O,
|
|
200
200
|
V as o
|
|
201
201
|
};
|
|
202
|
-
//# sourceMappingURL=operator-hero-
|
|
202
|
+
//# sourceMappingURL=operator-hero-aG_qyn6g.js.map
|
|
@@ -14,7 +14,7 @@ import { R as ne, C as $ } from "./receipt-euro-C6k4Gzhr.js";
|
|
|
14
14
|
import { F as J } from "./file-text-5yv6r2ls.js";
|
|
15
15
|
import { U as ie } from "./user-B12p7bVF.js";
|
|
16
16
|
import { U as le } from "./user-cog-BTn98Arm.js";
|
|
17
|
-
import { e as Q } from "./entity-card-
|
|
17
|
+
import { e as Q } from "./entity-card-9_62gY7l.js";
|
|
18
18
|
import { A as de } from "./arrow-up-right-C2v_MKsK.js";
|
|
19
19
|
import { L as oe } from "./link-CPb_pZPr.js";
|
|
20
20
|
import { C as se } from "./calendar-clock-hbObjfGY.js";
|
|
@@ -438,4 +438,4 @@ export {
|
|
|
438
438
|
Ce as b,
|
|
439
439
|
me as p
|
|
440
440
|
};
|
|
441
|
-
//# sourceMappingURL=payment-request-card-
|
|
441
|
+
//# sourceMappingURL=payment-request-card-DvEsWEkC.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -13,12 +13,15 @@ export interface AppointmentOperator {
|
|
|
13
13
|
/** Numeric palette colour id, resolved to a kit token for the colour dot. */
|
|
14
14
|
colorId?: number | string;
|
|
15
15
|
}
|
|
16
|
-
/** Patient summary — identity
|
|
16
|
+
/** Patient summary — identity + optional age driver. */
|
|
17
17
|
export interface AppointmentPatient {
|
|
18
18
|
/** Patient display name. */
|
|
19
19
|
name: string;
|
|
20
20
|
/** Optional avatar image URL. */
|
|
21
21
|
avatarUrl?: string;
|
|
22
|
+
/** ISO-8601 date of birth — when present, the card renders the age as a
|
|
23
|
+
* suffix on the name (e.g. "Carol Danvers · 45"). */
|
|
24
|
+
dobIso?: string;
|
|
22
25
|
}
|
|
23
26
|
/** One treatment line within the appointment. */
|
|
24
27
|
export interface AppointmentTreatment {
|
|
@@ -38,6 +41,22 @@ export interface AppointmentBookingReason {
|
|
|
38
41
|
/** Localised specialty label. */
|
|
39
42
|
specialty?: string;
|
|
40
43
|
}
|
|
44
|
+
/** Money summary for the appointment. */
|
|
45
|
+
export interface AppointmentMoney {
|
|
46
|
+
/** Total billable amount in cents. When present, rendered as a
|
|
47
|
+
* TransactionChip. */
|
|
48
|
+
billableAmountCents?: number;
|
|
49
|
+
/** Outstanding unpaid amount in cents. When > 0, rendered as a warning
|
|
50
|
+
* TransactionChip so the front desk can flag it at a glance. */
|
|
51
|
+
unpaidAmountCents?: number;
|
|
52
|
+
}
|
|
53
|
+
/** Signing status for documents attached to the appointment. */
|
|
54
|
+
export interface AppointmentSigning {
|
|
55
|
+
/** How many documents require a signature. */
|
|
56
|
+
required: number;
|
|
57
|
+
/** How many have been completed so far. */
|
|
58
|
+
toComplete: number;
|
|
59
|
+
}
|
|
41
60
|
/** Boolean appointment flags surfaced as chips / indicators. */
|
|
42
61
|
export interface AppointmentFlags {
|
|
43
62
|
bookedOnline?: boolean;
|
|
@@ -80,6 +99,15 @@ export interface AppointmentItem {
|
|
|
80
99
|
bookingReason?: AppointmentBookingReason;
|
|
81
100
|
/** Boolean flags. */
|
|
82
101
|
flags?: AppointmentFlags;
|
|
102
|
+
/** Money summary — billable + unpaid amounts. */
|
|
103
|
+
money?: AppointmentMoney;
|
|
104
|
+
/** Whether this appointment is part of a recurring series. */
|
|
105
|
+
recurring?: boolean;
|
|
106
|
+
/** Signing status for attached documents. */
|
|
107
|
+
signing?: AppointmentSigning;
|
|
108
|
+
/** A note left by the patient at booking time. When present, a small
|
|
109
|
+
* message icon signals it. */
|
|
110
|
+
bookingNote?: string;
|
|
83
111
|
/** Optional deep link — when present (and safe) the row renders as an anchor. */
|
|
84
112
|
url?: string;
|
|
85
113
|
}
|
|
@@ -87,6 +115,7 @@ declare const appointmentCardVariants: (props?: ({
|
|
|
87
115
|
size?: "sm" | "md" | null | undefined;
|
|
88
116
|
interactive?: boolean | null | undefined;
|
|
89
117
|
surface?: "elevated" | "flat" | null | undefined;
|
|
118
|
+
selected?: boolean | null | undefined;
|
|
90
119
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
91
120
|
export interface AppointmentCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'title'>, VariantProps<typeof appointmentCardVariants> {
|
|
92
121
|
/** The appointment to render. */
|
|
@@ -112,6 +141,12 @@ export interface AppointmentCardProps extends Omit<HTMLAttributes<HTMLDivElement
|
|
|
112
141
|
showPatient?: boolean;
|
|
113
142
|
/** Fires when the row is activated. */
|
|
114
143
|
onActivate?: (item: AppointmentItem) => void;
|
|
144
|
+
/**
|
|
145
|
+
* Mark this row as the active/selected appointment — an info-tinted
|
|
146
|
+
* inline-start bar plus a soft wash, so the eye keeps its place in the
|
|
147
|
+
* list after a click. Renders `aria-current="true"` for assistive tech.
|
|
148
|
+
*/
|
|
149
|
+
selected?: boolean;
|
|
115
150
|
}
|
|
116
151
|
export declare const AppointmentCard: import("react").ForwardRefExoticComponent<AppointmentCardProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
117
152
|
//# sourceMappingURL=appointment-card.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as p } from "../../_chunks/appointment-card-
|
|
2
|
-
import { A as e, a as o, b as r } from "../../_chunks/appointment-tray-
|
|
1
|
+
import { A as p } from "../../_chunks/appointment-card-Bh_CIlc6.js";
|
|
2
|
+
import { A as e, a as o, b as r } from "../../_chunks/appointment-tray-4I9wTAi4.js";
|
|
3
3
|
import { i } from "../../_chunks/is-safe-url-DkETxeHz.js";
|
|
4
4
|
export {
|
|
5
5
|
p as AppointmentCard,
|