@alfadocs/ui-kit 1.140.0 → 1.141.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-CaxFXtSn.js → appointment-card-r0OZm77v.js} +170 -168
- package/dist/_chunks/appointment-timeline-Bs-rTMzi.js +689 -0
- package/dist/_chunks/{appointment-tray-DPpeR9JT.js → appointment-tray-t_ltp-Yi.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-BBrJlmyd.js → calendar-appointment-editor-dialog-CuXpgLCw.js} +4 -4
- package/dist/_chunks/{calendar-waiting-list-panel-Cdg9YssA.js → calendar-waiting-list-panel-BNQrUndD.js} +2 -2
- package/dist/_chunks/{calendar.sheets-DbMOO7YV.js → calendar.sheets-DcW8A3DI.js} +2 -2
- package/dist/_chunks/calls-panel-CJNQm7r8.js +1446 -0
- package/dist/_chunks/{notes-panel-CnmQqhwq.js → notes-panel-C4HSUudf.js} +2 -2
- package/dist/_chunks/{patient-account-settings-DfEPHmCh.js → patient-account-settings-nSvNKKOL.js} +2 -2
- package/dist/_chunks/{patient-check-in-resume-TWs8CPQr.js → patient-check-in-resume-Cj2wg_NQ.js} +4 -4
- package/dist/_chunks/{portal-details-VfeOI4PB.js → portal-details-Cnyqf9kY.js} +2 -2
- package/dist/_chunks/{portal-documents-hGHlwmbv.js → portal-documents-g109Dl0O.js} +2 -2
- package/dist/_chunks/{portal-parts-C99CreYO.js → portal-parts-DgDFuED8.js} +2 -2
- package/dist/_chunks/{rich-text-editor-DFsH5RAj.js → rich-text-editor-orJ-hPgm.js} +1323 -1308
- package/dist/agent-catalog.json +134 -3
- package/dist/agent-i18n/en.json +8 -2
- package/dist/appointment-editor-panel/index.js +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/components/appointment-card/appointment-card.d.ts +4 -0
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/appointment-timeline.d.ts +51 -0
- package/dist/components/appointment-timeline/index.d.ts +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/calls-panel/calls-panel.d.ts +91 -0
- package/dist/components/calls-panel/index.d.ts +1 -1
- package/dist/components/calls-panel/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/find-free-slots-panel/index.js +1 -1
- package/dist/host-compat.css +13 -1
- package/dist/i18n/locales/ar.d.ts +45 -0
- package/dist/i18n/locales/ar.js +44 -2
- package/dist/i18n/locales/de.d.ts +45 -0
- package/dist/i18n/locales/de.js +44 -2
- package/dist/i18n/locales/el.d.ts +45 -0
- package/dist/i18n/locales/el.js +47 -2
- package/dist/i18n/locales/en.d.ts +37 -0
- package/dist/i18n/locales/en.js +39 -2
- package/dist/i18n/locales/es.d.ts +45 -0
- package/dist/i18n/locales/es.js +44 -2
- package/dist/i18n/locales/fr.d.ts +45 -0
- package/dist/i18n/locales/fr.js +44 -2
- package/dist/i18n/locales/hi.d.ts +45 -0
- package/dist/i18n/locales/hi.js +47 -2
- package/dist/i18n/locales/it.d.ts +45 -0
- package/dist/i18n/locales/it.js +44 -2
- package/dist/i18n/locales/ja.d.ts +45 -0
- package/dist/i18n/locales/ja.js +47 -2
- package/dist/i18n/locales/nl.d.ts +45 -0
- package/dist/i18n/locales/nl.js +44 -2
- package/dist/i18n/locales/pl.d.ts +45 -0
- package/dist/i18n/locales/pl.js +47 -2
- package/dist/i18n/locales/pt.d.ts +45 -0
- package/dist/i18n/locales/pt.js +44 -2
- package/dist/i18n/locales/ro.d.ts +45 -0
- package/dist/i18n/locales/ro.js +44 -2
- package/dist/i18n/locales/ru.d.ts +45 -0
- package/dist/i18n/locales/ru.js +44 -2
- package/dist/i18n/locales/sq.d.ts +45 -0
- package/dist/i18n/locales/sq.js +47 -2
- package/dist/i18n/locales/sv.d.ts +45 -0
- package/dist/i18n/locales/sv.js +44 -2
- package/dist/i18n/locales/tr.d.ts +45 -0
- package/dist/i18n/locales/tr.js +44 -2
- package/dist/i18n/locales/zh.d.ts +45 -0
- package/dist/i18n/locales/zh.js +44 -2
- package/dist/index.js +12 -12
- package/dist/locales/ar.json +47 -2
- package/dist/locales/de.json +47 -2
- package/dist/locales/el.json +47 -2
- package/dist/locales/en.json +39 -2
- package/dist/locales/es.json +47 -2
- package/dist/locales/fr.json +47 -2
- package/dist/locales/hi.json +47 -2
- package/dist/locales/it.json +47 -2
- package/dist/locales/ja.json +47 -2
- package/dist/locales/nl.json +47 -2
- package/dist/locales/pl.json +47 -2
- package/dist/locales/pt.json +47 -2
- package/dist/locales/ro.json +47 -2
- package/dist/locales/ru.json +47 -2
- package/dist/locales/sq.json +47 -2
- package/dist/locales/sv.json +47 -2
- package/dist/locales/tr.json +47 -2
- package/dist/locales/zh.json +47 -2
- package/dist/online-bookings-panel/index.js +1 -1
- package/dist/patterns/calendar/index.js +2 -2
- package/dist/patterns/patient-account-settings/index.js +1 -1
- package/dist/patterns/patient-check-in/index.js +1 -1
- package/dist/patterns/patient-portal/index.js +2 -2
- package/dist/tokens.css +1 -1
- package/dist/waiting-list-panel/index.js +2 -2
- package/package.json +1 -1
- package/dist/_chunks/appointment-timeline-BEwgbYyG.js +0 -455
- package/dist/_chunks/calls-panel-CtxJAzkJ.js +0 -1094
|
@@ -4,8 +4,8 @@ import { useTranslation as K } from "react-i18next";
|
|
|
4
4
|
import { d as s, b as L } from "../_chunks/toast-DQ1Zu1kk.js";
|
|
5
5
|
import { a as M } from "../_chunks/tooltip-uEBdD1-5.js";
|
|
6
6
|
import { C as Q } from "../_chunks/calendar-editor-guard-9fShhNIA.js";
|
|
7
|
-
import { S as V } from "../_chunks/calendar.sheets-
|
|
8
|
-
import { W as X } from "../_chunks/calendar-waiting-list-panel-
|
|
7
|
+
import { S as V } from "../_chunks/calendar.sheets-DcW8A3DI.js";
|
|
8
|
+
import { W as X } from "../_chunks/calendar-waiting-list-panel-BNQrUndD.js";
|
|
9
9
|
import { P as Y } from "../_chunks/privacy-mask-C2ZLKrMh.js";
|
|
10
10
|
import { H as Z } from "../_chunks/hourglass-BEAzW1wE.js";
|
|
11
11
|
const q = { open: () => {
|
package/package.json
CHANGED
|
@@ -1,455 +0,0 @@
|
|
|
1
|
-
import { jsxs as x, jsx as o, Fragment as Me } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Ne, useId as Fe, useMemo as j, useRef as y, useState as $, useEffect as _e, useCallback as b, useImperativeHandle as ze } from "react";
|
|
3
|
-
import { c as Ae } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as Be } from "react-i18next";
|
|
5
|
-
import { A as ae } from "./appointment-card-CaxFXtSn.js";
|
|
6
|
-
import { B as P } from "./button-DohK_Ak_.js";
|
|
7
|
-
import { B as Ke } from "./button-group-DuQuuulC.js";
|
|
8
|
-
import { D as Ee } from "./date-picker-BmVBVpVu.js";
|
|
9
|
-
import { P as Ye } from "./panel-header-CbtlTe85.js";
|
|
10
|
-
import { S as $e } from "./skeleton-tTWJpvAq.js";
|
|
11
|
-
import { E as Pe } from "./empty-state-DwJ5YNzz.js";
|
|
12
|
-
import { u as ie } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
13
|
-
import { u as We } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
14
|
-
import { a as qe, u as Ge, R as Ve } from "./use-list-reflow-C7O4Uqnl.js";
|
|
15
|
-
import { u as Le } from "./registry-DvAUVLHh.js";
|
|
16
|
-
import { C as Oe } from "./calendar-days-BGWklvE-.js";
|
|
17
|
-
const Qe = {
|
|
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
|
-
}, oe = 96, Ue = Ae(
|
|
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
|
-
), Xe = [
|
|
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:var(--accessible-off,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:forced-colors:[mask-image:none]",
|
|
89
|
-
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
90
|
-
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:[outline-offset:-2px]",
|
|
91
|
-
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
92
|
-
].join(" ");
|
|
93
|
-
function k(i) {
|
|
94
|
-
const n = `${i.getMonth() + 1}`.padStart(2, "0"), d = `${i.getDate()}`.padStart(2, "0");
|
|
95
|
-
return `${i.getFullYear()}-${n}-${d}`;
|
|
96
|
-
}
|
|
97
|
-
function Ze(i) {
|
|
98
|
-
const n = [...i].sort(
|
|
99
|
-
(g, m) => +new Date(g.startIso) - +new Date(m.startIso)
|
|
100
|
-
), d = /* @__PURE__ */ new Map();
|
|
101
|
-
for (const g of n) {
|
|
102
|
-
const m = new Date(g.startIso), h = k(m);
|
|
103
|
-
let r = d.get(h);
|
|
104
|
-
r || (r = {
|
|
105
|
-
key: h,
|
|
106
|
-
date: new Date(m.getFullYear(), m.getMonth(), m.getDate()),
|
|
107
|
-
items: []
|
|
108
|
-
}, d.set(h, r)), r.items.push(g);
|
|
109
|
-
}
|
|
110
|
-
return [...d.values()];
|
|
111
|
-
}
|
|
112
|
-
const Je = Ne(
|
|
113
|
-
({
|
|
114
|
-
id: i,
|
|
115
|
-
items: n,
|
|
116
|
-
nowIso: d,
|
|
117
|
-
title: g,
|
|
118
|
-
locale: m,
|
|
119
|
-
currency: h,
|
|
120
|
-
size: r = "sm",
|
|
121
|
-
showPatient: C = !1,
|
|
122
|
-
onOpenAppointment: v,
|
|
123
|
-
selectedId: H,
|
|
124
|
-
onLoadEarlier: f,
|
|
125
|
-
onLoadLater: p,
|
|
126
|
-
hasMoreEarlier: _,
|
|
127
|
-
hasMoreLater: re,
|
|
128
|
-
loadingEarlier: M = !1,
|
|
129
|
-
loadingLater: N = !1,
|
|
130
|
-
showFilters: le = !0,
|
|
131
|
-
onJumpToDate: F,
|
|
132
|
-
emptyTitle: ce,
|
|
133
|
-
emptyDescription: de,
|
|
134
|
-
className: me,
|
|
135
|
-
"aria-label": pe,
|
|
136
|
-
headerExtra: ue,
|
|
137
|
-
hideDefaultStatus: fe = !1,
|
|
138
|
-
wrapText: W = !1,
|
|
139
|
-
...ge
|
|
140
|
-
}, he) => {
|
|
141
|
-
const { t: l, i18n: ve } = Be("ui"), q = Fe(), z = We(), A = m ?? ve.language, G = g ?? l("appointmentTimeline.title"), c = j(
|
|
142
|
-
() => d ? new Date(d) : /* @__PURE__ */ new Date(),
|
|
143
|
-
[d]
|
|
144
|
-
), u = j(() => Ze(n), [n]), V = z || void 0, ye = j(
|
|
145
|
-
() => u.flatMap((e) => e.items.map((t) => t.id)).join(),
|
|
146
|
-
[u]
|
|
147
|
-
), { containerRef: ke } = qe({
|
|
148
|
-
key: ye,
|
|
149
|
-
reduceMotion: V
|
|
150
|
-
}), L = Ge({ reduceMotion: V }), O = y(n), [Q, U] = $([]);
|
|
151
|
-
_e(() => {
|
|
152
|
-
const e = O.current;
|
|
153
|
-
if (e === n) return;
|
|
154
|
-
const t = new Set(n.map((a) => a.id)), s = e.filter((a) => !t.has(a.id));
|
|
155
|
-
s.length > 0 && (U((a) => [...a, ...s]), s.forEach((a) => {
|
|
156
|
-
L.leave(a.id, () => {
|
|
157
|
-
U((Y) => Y.filter((S) => S.id !== a.id));
|
|
158
|
-
});
|
|
159
|
-
})), O.current = n;
|
|
160
|
-
}, [n, L]);
|
|
161
|
-
const X = _ ?? !!f, Z = re ?? !!p, B = j(() => {
|
|
162
|
-
if (u.length === 0) return;
|
|
163
|
-
const e = k(c), t = u.map((s) => s.key);
|
|
164
|
-
return t.includes(e) ? e : t.find((s) => s >= e) ?? t[t.length - 1];
|
|
165
|
-
}, [u, c]), D = y(null), R = y(/* @__PURE__ */ new Map()), J = y(!1), K = y(void 0), ee = y(0), [Te, be] = $(!1), [xe, De] = $(!1), w = b(() => {
|
|
166
|
-
const e = D.current;
|
|
167
|
-
if (!e) return;
|
|
168
|
-
const { scrollTop: t, scrollHeight: s, clientHeight: a } = e;
|
|
169
|
-
be(t > 1), De(t + a < s - 1);
|
|
170
|
-
}, []), I = b(
|
|
171
|
-
(e, t) => {
|
|
172
|
-
const s = D.current;
|
|
173
|
-
if (!s) return;
|
|
174
|
-
let a = R.current.get(e);
|
|
175
|
-
if (!a) {
|
|
176
|
-
const S = [...R.current.keys()].sort(), ne = S.find((He) => He >= e) ?? S[S.length - 1];
|
|
177
|
-
a = ne ? R.current.get(ne) : void 0;
|
|
178
|
-
}
|
|
179
|
-
if (!a) return;
|
|
180
|
-
const Y = a.getBoundingClientRect().top - s.getBoundingClientRect().top;
|
|
181
|
-
s.scrollTo({
|
|
182
|
-
top: s.scrollTop + Y,
|
|
183
|
-
behavior: t && !z ? "smooth" : "auto"
|
|
184
|
-
});
|
|
185
|
-
},
|
|
186
|
-
[z]
|
|
187
|
-
);
|
|
188
|
-
ie(() => {
|
|
189
|
-
var s;
|
|
190
|
-
const e = D.current;
|
|
191
|
-
if (!e) return;
|
|
192
|
-
const t = (s = u[0]) == null ? void 0 : s.key;
|
|
193
|
-
if (!J.current)
|
|
194
|
-
u.length > 0 && B && (I(B, !1), J.current = !0);
|
|
195
|
-
else if (K.current && t && t < K.current) {
|
|
196
|
-
const a = e.scrollHeight - ee.current;
|
|
197
|
-
a > 0 && (e.scrollTop += a);
|
|
198
|
-
}
|
|
199
|
-
K.current = t, ee.current = e.scrollHeight, w();
|
|
200
|
-
}, [u, B, I, w]), ie(() => {
|
|
201
|
-
const e = D.current;
|
|
202
|
-
if (!e || typeof ResizeObserver > "u") return;
|
|
203
|
-
const t = new ResizeObserver(w);
|
|
204
|
-
return t.observe(e), () => t.disconnect();
|
|
205
|
-
}, [w]);
|
|
206
|
-
const Re = b(() => {
|
|
207
|
-
w();
|
|
208
|
-
const e = D.current;
|
|
209
|
-
if (!e) return;
|
|
210
|
-
const { scrollTop: t, scrollHeight: s, clientHeight: a } = e;
|
|
211
|
-
f && X && !M && t <= oe && f(), p && Z && !N && s - t - a <= oe && p();
|
|
212
|
-
}, [
|
|
213
|
-
w,
|
|
214
|
-
f,
|
|
215
|
-
p,
|
|
216
|
-
X,
|
|
217
|
-
Z,
|
|
218
|
-
M,
|
|
219
|
-
N
|
|
220
|
-
]), T = b(
|
|
221
|
-
(e) => {
|
|
222
|
-
const t = k(e), s = R.current.has(t);
|
|
223
|
-
I(t, !0), s || F == null || F(e.toISOString());
|
|
224
|
-
},
|
|
225
|
-
[I, F]
|
|
226
|
-
), we = b(() => T(c), [T, c]), Ie = b(() => {
|
|
227
|
-
const e = new Date(c), t = (e.getDay() + 6) % 7;
|
|
228
|
-
e.setDate(e.getDate() - t), T(e);
|
|
229
|
-
}, [T, c]), Se = b(() => {
|
|
230
|
-
T(new Date(c.getFullYear(), c.getMonth(), 1));
|
|
231
|
-
}, [T, c]), E = y(n);
|
|
232
|
-
E.current = n;
|
|
233
|
-
const te = y(null);
|
|
234
|
-
ze(he, () => te.current, []);
|
|
235
|
-
const je = j(
|
|
236
|
-
() => ({
|
|
237
|
-
getItems: () => E.current.map((e) => ({ id: e.id, state: e.state ?? "" })),
|
|
238
|
-
selectItem: (e) => {
|
|
239
|
-
const t = E.current.find((s) => s.id === e);
|
|
240
|
-
t && (v == null || v(t));
|
|
241
|
-
},
|
|
242
|
-
jumpToToday: () => I(k(c), !0)
|
|
243
|
-
}),
|
|
244
|
-
[v, I, c]
|
|
245
|
-
);
|
|
246
|
-
Le(Qe, je, i);
|
|
247
|
-
const Ce = u.length === 0 && !M && !N, se = (e) => /* @__PURE__ */ o(
|
|
248
|
-
"div",
|
|
249
|
-
{
|
|
250
|
-
"aria-hidden": "true",
|
|
251
|
-
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:py-[var(--spacing-xs)]",
|
|
252
|
-
children: /* @__PURE__ */ o($e, { variant: "rectangular", height: "3.5rem" })
|
|
253
|
-
},
|
|
254
|
-
e
|
|
255
|
-
);
|
|
256
|
-
return /* @__PURE__ */ x(
|
|
257
|
-
"section",
|
|
258
|
-
{
|
|
259
|
-
ref: te,
|
|
260
|
-
"data-component": "appointment-timeline",
|
|
261
|
-
"data-component-id": i,
|
|
262
|
-
"aria-label": pe ?? G,
|
|
263
|
-
className: Ue({ size: r, className: me }),
|
|
264
|
-
...ge,
|
|
265
|
-
children: [
|
|
266
|
-
/* @__PURE__ */ o(
|
|
267
|
-
Ye,
|
|
268
|
-
{
|
|
269
|
-
icon: /* @__PURE__ */ o(Oe, {}),
|
|
270
|
-
title: G,
|
|
271
|
-
filters: le ? /* @__PURE__ */ x(Me, { children: [
|
|
272
|
-
/* @__PURE__ */ x(Ke, { label: l("appointmentTimeline.filtersLabel"), children: [
|
|
273
|
-
/* @__PURE__ */ o(P, { intent: "outline", size: "sm", onClick: we, children: l("appointmentTimeline.today") }),
|
|
274
|
-
/* @__PURE__ */ o(P, { intent: "outline", size: "sm", onClick: Ie, children: l("appointmentTimeline.thisWeek") }),
|
|
275
|
-
/* @__PURE__ */ o(P, { intent: "outline", size: "sm", onClick: Se, children: l("appointmentTimeline.thisMonth") })
|
|
276
|
-
] }),
|
|
277
|
-
/* @__PURE__ */ o("label", { htmlFor: q, className: "ds:sr-only", children: l("appointmentTimeline.jumpToDate") }),
|
|
278
|
-
/* @__PURE__ */ o(
|
|
279
|
-
Ee,
|
|
280
|
-
{
|
|
281
|
-
id: q,
|
|
282
|
-
size: "sm",
|
|
283
|
-
placeholder: l("appointmentTimeline.jumpToDate"),
|
|
284
|
-
onChange: (e) => {
|
|
285
|
-
e && T(e);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
)
|
|
289
|
-
] }) : void 0
|
|
290
|
-
}
|
|
291
|
-
),
|
|
292
|
-
ue,
|
|
293
|
-
Ce ? /* @__PURE__ */ o("div", { className: "ds:flex-1 ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ o(
|
|
294
|
-
Pe,
|
|
295
|
-
{
|
|
296
|
-
variant: "first-use",
|
|
297
|
-
size: "sm",
|
|
298
|
-
title: ce ?? l("appointmentTimeline.empty.title"),
|
|
299
|
-
description: de ?? l("appointmentTimeline.empty.description")
|
|
300
|
-
}
|
|
301
|
-
) }) : /* @__PURE__ */ x(
|
|
302
|
-
"div",
|
|
303
|
-
{
|
|
304
|
-
ref: D,
|
|
305
|
-
tabIndex: 0,
|
|
306
|
-
onScroll: Re,
|
|
307
|
-
"data-fade-top": Te ? "true" : void 0,
|
|
308
|
-
"data-fade-bottom": xe ? "true" : void 0,
|
|
309
|
-
className: Xe,
|
|
310
|
-
children: [
|
|
311
|
-
M ? se("loading-earlier") : null,
|
|
312
|
-
/* @__PURE__ */ x(
|
|
313
|
-
"ol",
|
|
314
|
-
{
|
|
315
|
-
ref: ke,
|
|
316
|
-
role: "list",
|
|
317
|
-
className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-md)] ds:p-0",
|
|
318
|
-
children: [
|
|
319
|
-
u.map((e) => /* @__PURE__ */ x(
|
|
320
|
-
"li",
|
|
321
|
-
{
|
|
322
|
-
ref: (t) => {
|
|
323
|
-
t ? R.current.set(e.key, t) : R.current.delete(e.key);
|
|
324
|
-
},
|
|
325
|
-
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
326
|
-
children: [
|
|
327
|
-
/* @__PURE__ */ o(
|
|
328
|
-
et,
|
|
329
|
-
{
|
|
330
|
-
date: e.date,
|
|
331
|
-
now: c,
|
|
332
|
-
locale: A,
|
|
333
|
-
todayLabel: l("appointmentTimeline.today"),
|
|
334
|
-
tomorrowLabel: l("appointmentTimeline.tomorrow"),
|
|
335
|
-
yesterdayLabel: l("appointmentTimeline.yesterday")
|
|
336
|
-
}
|
|
337
|
-
),
|
|
338
|
-
/* @__PURE__ */ o(
|
|
339
|
-
"ul",
|
|
340
|
-
{
|
|
341
|
-
role: "list",
|
|
342
|
-
className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0",
|
|
343
|
-
children: e.items.map((t) => /* @__PURE__ */ o(
|
|
344
|
-
ae,
|
|
345
|
-
{
|
|
346
|
-
item: t,
|
|
347
|
-
size: r,
|
|
348
|
-
surface: "elevated",
|
|
349
|
-
showPatient: C,
|
|
350
|
-
locale: A,
|
|
351
|
-
currency: h,
|
|
352
|
-
onActivate: v,
|
|
353
|
-
selected: t.id === H,
|
|
354
|
-
hideDefaultStatus: fe,
|
|
355
|
-
wrapText: W,
|
|
356
|
-
"data-appointment-id": t.id,
|
|
357
|
-
"data-reflow-id": t.id,
|
|
358
|
-
className: Ve
|
|
359
|
-
},
|
|
360
|
-
t.id
|
|
361
|
-
))
|
|
362
|
-
}
|
|
363
|
-
)
|
|
364
|
-
]
|
|
365
|
-
},
|
|
366
|
-
e.key
|
|
367
|
-
)),
|
|
368
|
-
Q.length > 0 ? Q.map((e) => /* @__PURE__ */ o(
|
|
369
|
-
ae,
|
|
370
|
-
{
|
|
371
|
-
item: e,
|
|
372
|
-
size: r,
|
|
373
|
-
surface: "elevated",
|
|
374
|
-
showPatient: C,
|
|
375
|
-
wrapText: W,
|
|
376
|
-
locale: A,
|
|
377
|
-
currency: h,
|
|
378
|
-
"aria-hidden": "true",
|
|
379
|
-
"data-leaving": !0,
|
|
380
|
-
className: [
|
|
381
|
-
"ds:opacity-0",
|
|
382
|
-
"ds:transition-opacity",
|
|
383
|
-
"ds:duration-[var(--animation-duration)]",
|
|
384
|
-
"ds:ease-[var(--ease-out)]",
|
|
385
|
-
"ds:motion-reduce:transition-none"
|
|
386
|
-
].join(" ")
|
|
387
|
-
},
|
|
388
|
-
`leaving-${e.id}`
|
|
389
|
-
)) : null
|
|
390
|
-
]
|
|
391
|
-
}
|
|
392
|
-
),
|
|
393
|
-
N ? se("loading-later") : null
|
|
394
|
-
]
|
|
395
|
-
}
|
|
396
|
-
)
|
|
397
|
-
]
|
|
398
|
-
}
|
|
399
|
-
);
|
|
400
|
-
}
|
|
401
|
-
);
|
|
402
|
-
Je.displayName = "AppointmentTimeline";
|
|
403
|
-
function et({
|
|
404
|
-
date: i,
|
|
405
|
-
now: n,
|
|
406
|
-
locale: d,
|
|
407
|
-
todayLabel: g,
|
|
408
|
-
tomorrowLabel: m,
|
|
409
|
-
yesterdayLabel: h
|
|
410
|
-
}) {
|
|
411
|
-
const r = k(i), C = k(n), v = new Date(n);
|
|
412
|
-
v.setDate(n.getDate() + 1);
|
|
413
|
-
const H = new Date(n);
|
|
414
|
-
H.setDate(n.getDate() - 1);
|
|
415
|
-
const f = r === C;
|
|
416
|
-
let p;
|
|
417
|
-
if (f) p = g;
|
|
418
|
-
else if (r === k(v)) p = m;
|
|
419
|
-
else if (r === k(H)) p = h;
|
|
420
|
-
else {
|
|
421
|
-
const _ = i.getFullYear() === n.getFullYear();
|
|
422
|
-
p = new Intl.DateTimeFormat(d, {
|
|
423
|
-
weekday: "short",
|
|
424
|
-
day: "numeric",
|
|
425
|
-
month: "short",
|
|
426
|
-
..._ ? {} : { year: "numeric" }
|
|
427
|
-
}).format(i);
|
|
428
|
-
}
|
|
429
|
-
return /* @__PURE__ */ x(
|
|
430
|
-
"div",
|
|
431
|
-
{
|
|
432
|
-
"data-today": f ? "true" : void 0,
|
|
433
|
-
className: [
|
|
434
|
-
"ds:sticky ds:top-0 ds:z-[1] ds:bg-[color:var(--card)] ds:py-[var(--spacing-2xs)]",
|
|
435
|
-
"ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] type-eyebrow",
|
|
436
|
-
f ? "ds:text-[color:var(--primary)] ds:font-semibold" : "ds:text-[color:var(--muted-foreground)]"
|
|
437
|
-
].join(" "),
|
|
438
|
-
children: [
|
|
439
|
-
f ? /* @__PURE__ */ o(
|
|
440
|
-
"span",
|
|
441
|
-
{
|
|
442
|
-
"aria-hidden": "true",
|
|
443
|
-
className: "ds:size-1.5 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--primary)]"
|
|
444
|
-
}
|
|
445
|
-
) : null,
|
|
446
|
-
p
|
|
447
|
-
]
|
|
448
|
-
}
|
|
449
|
-
);
|
|
450
|
-
}
|
|
451
|
-
export {
|
|
452
|
-
Je as A,
|
|
453
|
-
Qe as a
|
|
454
|
-
};
|
|
455
|
-
//# sourceMappingURL=appointment-timeline-BEwgbYyG.js.map
|