@alfadocs/ui-kit 1.33.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.
Files changed (126) hide show
  1. package/dist/_chunks/appointment-card-Bh_CIlc6.js +431 -0
  2. package/dist/_chunks/appointment-timeline-De-Wqdkw.js +449 -0
  3. package/dist/_chunks/{appointment-tray-DCk8gHod.js → appointment-tray-4I9wTAi4.js} +2 -2
  4. package/dist/_chunks/{calendar-workspace-BX-zDyVR.js → calendar-workspace-UywR5gUl.js} +7 -7
  5. package/dist/_chunks/{care-plan-card-CZW476Kg.js → care-plan-card-DHVhBcvs.js} +3 -3
  6. package/dist/_chunks/{care-plan-entry-card-BMUYagEw.js → care-plan-entry-card-Dx6IdTcR.js} +2 -2
  7. package/dist/_chunks/{care-plan-header-B5CBE0zu.js → care-plan-header-UTX5ZD74.js} +2 -2
  8. package/dist/_chunks/{clinical-note-card-D2WTV2CO.js → clinical-note-card-CTRzmqvv.js} +83 -81
  9. package/dist/_chunks/{contact-profile-card-BZqi8Hck.js → contact-profile-card-DSI9uumA.js} +17 -16
  10. package/dist/_chunks/{control-room-rail-iO_BCaq1.js → control-room-rail-5MbhjsxN.js} +2 -2
  11. package/dist/_chunks/{entity-card-DmrgYSEX.js → entity-card-9_62gY7l.js} +4 -4
  12. package/dist/_chunks/format-price-BkMEbeW3.js +47 -0
  13. package/dist/_chunks/{format-price-DNqXPa_q.js → languages-CZqBaPwI.js} +8 -38
  14. package/dist/_chunks/money.agent-Dw55UxUA.js +116 -0
  15. package/dist/_chunks/notes-panel-BjLt-kiP.js +469 -0
  16. package/dist/_chunks/{operator-hero-D7-iiFQ9.js → operator-hero-aG_qyn6g.js} +2 -2
  17. package/dist/_chunks/{payment-request-card-lmKLwsDs.js → payment-request-card-DvEsWEkC.js} +2 -2
  18. package/dist/_chunks/{practice-results-DjEzPgAK.js → practice-results-kayDEorM.js} +15 -14
  19. package/dist/_chunks/{rich-text-editor-CQ7yZdG3.js → rich-text-editor-CCI-Y3DN.js} +3 -5
  20. package/dist/_chunks/{task-card-BUgK6yZT.js → task-card-BalrLkSz.js} +41 -40
  21. package/dist/_chunks/{task-tray-CYG6rj2s.js → task-tray-COo-RlDv.js} +2 -2
  22. package/dist/_chunks/tasks-panel-DLKpSNoE.js +844 -0
  23. package/dist/_chunks/tool-rail-ONaV-Nzz.js +588 -0
  24. package/dist/_chunks/use-check-animation--I3cS00X.js +28 -0
  25. package/dist/_chunks/use-list-reflow-Cw43nxw5.js +100 -0
  26. package/dist/agent-catalog.json +15 -1
  27. package/dist/components/_shared/format-price.d.ts +15 -0
  28. package/dist/components/appointment-card/appointment-card.d.ts +36 -1
  29. package/dist/components/appointment-card/index.js +2 -2
  30. package/dist/components/appointment-timeline/appointment-timeline.d.ts +6 -0
  31. package/dist/components/appointment-timeline/index.js +1 -1
  32. package/dist/components/care-plan-card/index.js +1 -1
  33. package/dist/components/care-plan-entry-card/index.js +1 -1
  34. package/dist/components/care-plan-header/index.js +1 -1
  35. package/dist/components/clinical-note-card/clinical-note-card.d.ts +8 -1
  36. package/dist/components/clinical-note-card/index.js +1 -1
  37. package/dist/components/command-palette/command-palette.d.ts +7 -7
  38. package/dist/components/contact-profile-card/index.js +1 -1
  39. package/dist/components/control-room-rail/index.js +1 -1
  40. package/dist/components/index.d.ts +1 -0
  41. package/dist/components/money/index.d.ts +4 -0
  42. package/dist/components/money/index.js +6 -0
  43. package/dist/components/money/money.agent.d.ts +3 -0
  44. package/dist/components/money/money.d.ts +38 -0
  45. package/dist/components/notes-panel/index.js +1 -1
  46. package/dist/components/notes-panel/notes-panel.d.ts +16 -1
  47. package/dist/components/operator-hero/index.js +1 -1
  48. package/dist/components/payment-card/index.js +1 -1
  49. package/dist/components/practice-results/index.js +1 -1
  50. package/dist/components/rich-text-editor/index.js +1 -1
  51. package/dist/components/rich-text-editor/rich-text-editor.d.ts +1 -1
  52. package/dist/components/task-card/index.js +1 -1
  53. package/dist/components/task-card/task-card.d.ts +11 -3
  54. package/dist/components/task-tray/index.js +1 -1
  55. package/dist/components/tasks-panel/index.js +1 -1
  56. package/dist/components/tasks-panel/tasks-panel.d.ts +1 -1
  57. package/dist/components/tool-rail/index.js +1 -1
  58. package/dist/hooks/index.d.ts +3 -0
  59. package/dist/hooks/index.js +43 -37
  60. package/dist/hooks/use-check-animation.d.ts +53 -0
  61. package/dist/hooks/use-exit-transition.d.ts +48 -0
  62. package/dist/hooks/use-list-reflow.d.ts +47 -0
  63. package/dist/host-compat.css +8 -2
  64. package/dist/i18n/locales/ar.d.ts +10 -0
  65. package/dist/i18n/locales/ar.js +12 -2
  66. package/dist/i18n/locales/de.d.ts +10 -0
  67. package/dist/i18n/locales/de.js +12 -2
  68. package/dist/i18n/locales/el.d.ts +10 -0
  69. package/dist/i18n/locales/el.js +12 -2
  70. package/dist/i18n/locales/en.d.ts +10 -0
  71. package/dist/i18n/locales/en.js +12 -2
  72. package/dist/i18n/locales/es.d.ts +10 -0
  73. package/dist/i18n/locales/es.js +12 -2
  74. package/dist/i18n/locales/fr.d.ts +10 -0
  75. package/dist/i18n/locales/fr.js +12 -2
  76. package/dist/i18n/locales/hi.d.ts +10 -0
  77. package/dist/i18n/locales/hi.js +12 -2
  78. package/dist/i18n/locales/it.d.ts +13 -3
  79. package/dist/i18n/locales/it.js +14 -4
  80. package/dist/i18n/locales/ja.d.ts +10 -0
  81. package/dist/i18n/locales/ja.js +12 -2
  82. package/dist/i18n/locales/nl.d.ts +10 -0
  83. package/dist/i18n/locales/nl.js +12 -2
  84. package/dist/i18n/locales/pl.d.ts +10 -0
  85. package/dist/i18n/locales/pl.js +12 -2
  86. package/dist/i18n/locales/pt.d.ts +10 -0
  87. package/dist/i18n/locales/pt.js +12 -2
  88. package/dist/i18n/locales/ro.d.ts +10 -0
  89. package/dist/i18n/locales/ro.js +12 -2
  90. package/dist/i18n/locales/ru.d.ts +10 -0
  91. package/dist/i18n/locales/ru.js +12 -2
  92. package/dist/i18n/locales/sq.d.ts +10 -0
  93. package/dist/i18n/locales/sq.js +12 -2
  94. package/dist/i18n/locales/sv.d.ts +10 -0
  95. package/dist/i18n/locales/sv.js +12 -2
  96. package/dist/i18n/locales/tr.d.ts +10 -0
  97. package/dist/i18n/locales/tr.js +12 -2
  98. package/dist/i18n/locales/zh.d.ts +10 -0
  99. package/dist/i18n/locales/zh.js +12 -2
  100. package/dist/index.js +919 -916
  101. package/dist/locales/ar.json +12 -2
  102. package/dist/locales/de.json +12 -2
  103. package/dist/locales/el.json +12 -2
  104. package/dist/locales/en.json +12 -2
  105. package/dist/locales/es.json +12 -2
  106. package/dist/locales/fr.json +12 -2
  107. package/dist/locales/hi.json +12 -2
  108. package/dist/locales/it.json +14 -4
  109. package/dist/locales/ja.json +12 -2
  110. package/dist/locales/nl.json +12 -2
  111. package/dist/locales/pl.json +12 -2
  112. package/dist/locales/pt.json +12 -2
  113. package/dist/locales/ro.json +12 -2
  114. package/dist/locales/ru.json +12 -2
  115. package/dist/locales/sq.json +12 -2
  116. package/dist/locales/sv.json +12 -2
  117. package/dist/locales/tr.json +12 -2
  118. package/dist/locales/zh.json +12 -2
  119. package/dist/patterns/calendar/index.js +1 -1
  120. package/dist/tokens.css +2 -1
  121. package/package.json +5 -1
  122. package/dist/_chunks/appointment-card-D-oj_ugh.js +0 -296
  123. package/dist/_chunks/appointment-timeline-CymGHyIP.js +0 -403
  124. package/dist/_chunks/notes-panel-C4G-mhZ9.js +0 -380
  125. package/dist/_chunks/tasks-panel-DQuaVvl5.js +0 -757
  126. package/dist/_chunks/tool-rail-8Scslq3X.js +0 -524
@@ -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-D-oj_ugh.js";
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-DCk8gHod.js.map
193
+ //# sourceMappingURL=appointment-tray-4I9wTAi4.js.map
@@ -1,8 +1,8 @@
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-CymGHyIP.js";
5
- import { C as Rr, a as Er, u as zi, d as Mr } from "./control-room-rail-iO_BCaq1.js";
4
+ import { A as Ar } from "./appointment-timeline-De-Wqdkw.js";
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";
8
8
  import { T as fs, a as Or } from "./tooltip-DvmfrNvB.js";
@@ -23,10 +23,10 @@ import { createPortal as Kr } from "react-dom";
23
23
  import { C as Ma } from "./combobox-DnSdYssy.js";
24
24
  import { R as jn } from "./radio-DNRe6H_8.js";
25
25
  import { R as Ot } from "./radio-group-DyVBgnA3.js";
26
- import { N as qr, g as jr } from "./notes-panel-C4G-mhZ9.js";
26
+ import { N as qr, g as jr } from "./notes-panel-BjLt-kiP.js";
27
27
  import { V as Kt } from "./visually-hidden-BHxEUGyT.js";
28
- import { R as Gr } from "./rich-text-editor-CQ7yZdG3.js";
29
- import { C as Yr } from "./clinical-note-card-D2WTV2CO.js";
28
+ import { R as Gr } from "./rich-text-editor-CCI-Y3DN.js";
29
+ import { C as Yr } from "./clinical-note-card-CTRzmqvv.js";
30
30
  import { S as Xr } from "./spinner-hbwuKwMf.js";
31
31
  import { A as Sa } from "./avatar-CkDeQOSI.js";
32
32
  import { E as is } from "./empty-state-X0sVPfVo.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-D-oj_ugh.js";
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-BX-zDyVR.js.map
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-BMUYagEw.js";
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-DmrgYSEX.js";
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-CZW476Kg.js.map
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-DmrgYSEX.js";
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-BMUYagEw.js.map
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-DmrgYSEX.js";
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-B5CBE0zu.js.map
198
+ //# sourceMappingURL=care-plan-header-UTX5ZD74.js.map