@alfadocs/ui-kit 1.37.0 → 1.38.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 (62) hide show
  1. package/dist/_chunks/{agenda-tray-DYGCTIWB.js → agenda-tray-CG6jUjKc.js} +2 -2
  2. package/dist/_chunks/{anamnesis-summary-card-GYHa7VGp.js → anamnesis-summary-card-CclBbiXg.js} +2 -2
  3. package/dist/_chunks/{appointment-timeline-ByfovxqR.js → appointment-timeline-D-rNwKpS.js} +2 -2
  4. package/dist/_chunks/{appointment-tray-D6UyJHej.js → appointment-tray-CK2CULg_.js} +2 -2
  5. package/dist/_chunks/{balance-badge-cell-B0Z8Dwn8.js → balance-badge-cell-DHs5p0bA.js} +2 -2
  6. package/dist/_chunks/{booking-Dp-9qR6F.js → booking-x3J7sS2G.js} +3 -3
  7. package/dist/_chunks/{calendar-workspace-BqKBj26r.js → calendar-workspace-Cc1LRVWY.js} +1665 -1480
  8. package/dist/_chunks/{data-table-BYGK-gUJ.js → data-table-Dy1lyumT.js} +2 -2
  9. package/dist/_chunks/editable-description-7ptNpJEg.js +142 -0
  10. package/dist/_chunks/{file-manager-DvkFgj7d.js → file-manager-UlcYQv8n.js} +3 -3
  11. package/dist/_chunks/{message-tray-BcLyaO-G.js → message-tray-CXjVsKqp.js} +2 -2
  12. package/dist/_chunks/{note-timeline-CXfSV3yX.js → note-timeline-D2oPuQP6.js} +134 -73
  13. package/dist/_chunks/notes-panel-CkbfDDzj.js +614 -0
  14. package/dist/_chunks/{notification-tray-CJ8jOe-U.js → notification-tray-_NoChRKi.js} +2 -2
  15. package/dist/_chunks/{patient-summary-card-BzmJH9a-.js → patient-summary-card-B131Q7Bp.js} +2 -2
  16. package/dist/_chunks/{practice-results-DOcORTkP.js → practice-results-CBNRJNnY.js} +2 -2
  17. package/dist/_chunks/{product-hub-panel-C0TO69P7.js → product-hub-panel-C3bMjscm.js} +2 -2
  18. package/dist/_chunks/{reviews-panel-BaHZb_ai.js → reviews-panel-Cy969x7q.js} +2 -2
  19. package/dist/_chunks/{signature-request-Dej2g86d.js → signature-request-b-86AGlT.js} +2 -2
  20. package/dist/_chunks/{skeleton-CZbwyJAA.js → skeleton-B1KTdJ4N.js} +46 -33
  21. package/dist/_chunks/{slot-grid-8Ko6thzz.js → slot-grid-Bk3GZL1p.js} +2 -2
  22. package/dist/_chunks/{task-tray-CQ8UAR2j.js → task-tray-5co9Jr2L.js} +2 -2
  23. package/dist/_chunks/{tasks-panel-CBGMtQ_f.js → tasks-panel-BpH-x7U3.js} +2 -2
  24. package/dist/_chunks/treatment-receipt-dUm99mdn.js +160 -0
  25. package/dist/agent-catalog.json +1 -1
  26. package/dist/components/agenda-tray/index.js +1 -1
  27. package/dist/components/anamnesis-summary-card/index.js +1 -1
  28. package/dist/components/appointment-card/index.js +1 -1
  29. package/dist/components/appointment-timeline/index.js +1 -1
  30. package/dist/components/booking/index.js +1 -1
  31. package/dist/components/data-table/index.js +1 -1
  32. package/dist/components/editable-description/editable-description.d.ts +6 -0
  33. package/dist/components/editable-description/index.js +1 -1
  34. package/dist/components/file-manager/index.js +1 -1
  35. package/dist/components/message-tray/index.js +1 -1
  36. package/dist/components/note-timeline/index.js +1 -1
  37. package/dist/components/note-timeline/note-timeline.d.ts +8 -0
  38. package/dist/components/notes-panel/index.js +1 -1
  39. package/dist/components/notification-tray/index.js +1 -1
  40. package/dist/components/patient-summary-card/index.js +1 -1
  41. package/dist/components/patient-table/index.js +1 -1
  42. package/dist/components/practice-results/index.js +1 -1
  43. package/dist/components/product-hub-tray/index.js +1 -1
  44. package/dist/components/reviews-panel/index.js +1 -1
  45. package/dist/components/skeleton/index.d.ts +1 -1
  46. package/dist/components/skeleton/index.js +3 -2
  47. package/dist/components/skeleton/skeleton.d.ts +12 -0
  48. package/dist/components/slot-grid/index.js +1 -1
  49. package/dist/components/task-tray/index.js +1 -1
  50. package/dist/components/tasks-panel/index.js +1 -1
  51. package/dist/components/treatment-receipt/index.js +1 -1
  52. package/dist/components/treatment-receipt/treatment-receipt.d.ts +8 -0
  53. package/dist/index.js +755 -754
  54. package/dist/patterns/calendar/calendar-appointment-details.d.ts +1 -1
  55. package/dist/patterns/calendar/calendar-editor-hydration.d.ts +0 -2
  56. package/dist/patterns/calendar/index.js +1 -1
  57. package/dist/patterns/signature-request/index.js +1 -1
  58. package/dist/tokens.css +1 -1
  59. package/package.json +1 -1
  60. package/dist/_chunks/editable-description-BOfAeY3T.js +0 -112
  61. package/dist/_chunks/notes-panel-4y5JioWN.js +0 -556
  62. package/dist/_chunks/treatment-receipt-D4kOLXOk.js +0 -94
@@ -0,0 +1,614 @@
1
+ import { jsxs as o, jsx as n, Fragment as $e } from "react/jsx-runtime";
2
+ import { forwardRef as Je, useRef as f, useState as x, useId as Qe, useCallback as w, useEffect as me, useImperativeHandle as Ue, useMemo as Xe } from "react";
3
+ import { c as Ze } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as et } from "react-i18next";
5
+ import { u as tt } from "./registry-DvAUVLHh.js";
6
+ import { C as nt } from "./clinical-note-card-DdsGYMmI.js";
7
+ import { R as at } from "./rich-text-editor-BTXlorm5.js";
8
+ import { T as it } from "./text-area-Bt3p7Pt0.js";
9
+ import { A as z } from "./alert-CiQ5Pa3Q.js";
10
+ import { B as j } from "./button-nJaPh_HC.js";
11
+ import { I as pe } from "./icon-button-8xqRnkdG.js";
12
+ import { C as rt } from "./checkbox-CZkipDn7.js";
13
+ import { C as ge } from "./card-DPmk26CL.js";
14
+ import { C as lt, S as W } from "./skeleton-B1KTdJ4N.js";
15
+ import { D as h } from "./dialog-BJiLqhx6.js";
16
+ import { P as st } from "./panel-header-D_mTdhUp.js";
17
+ import { a as ot, u as dt, R as ct } from "./use-list-reflow-Cw43nxw5.js";
18
+ import { u as ut } from "./use-theme-CAuo6EYT.js";
19
+ import { N as ft } from "./notebook-pen-CO7HoM-W.js";
20
+ import { P as mt } from "./pencil-B1sKKyuT.js";
21
+ import { T as pt } from "./trash-2-uumy3fy1.js";
22
+ function he(i, c) {
23
+ return typeof i == "object" && i !== null && "message" in i && typeof i.message == "string" && i.message.trim() ? i.message : c;
24
+ }
25
+ const gt = {
26
+ id: "notes-panel",
27
+ // 'submit' backs add_note (compose + commit a note). pin / flag are toggles
28
+ // with no dedicated capability in the closed vocabulary.
29
+ capabilities: ["submit"],
30
+ state: {
31
+ notes: {
32
+ type: "Array<{ id?: string; pinned: boolean; flagged: boolean; clinical: boolean }>",
33
+ descriptionKey: "ui.agent.notesPanel.state.notes",
34
+ description: "Timeline note ids + pinned / flagged / clinical flags. Never the note body or author (both PHI).",
35
+ read: (i) => i.getNotes()
36
+ },
37
+ canAddClinical: {
38
+ type: "boolean",
39
+ descriptionKey: "ui.agent.notesPanel.state.canAddClinical",
40
+ description: "Whether the current user may write clinical notes (the practice_add_clinical_note permission gate).",
41
+ read: (i) => i.canAddClinical()
42
+ },
43
+ currentNoteId: {
44
+ type: "string | null",
45
+ descriptionKey: "ui.agent.notesPanel.state.currentNoteId",
46
+ description: "Id of the note the host has addressed — the one marked, scrolled to and focused. Null when none is. An id only, never note content.",
47
+ read: (i) => i.getCurrentNoteId()
48
+ }
49
+ },
50
+ actions: {
51
+ add_note: {
52
+ // Writes a clinical/admin note body — patient-identifiable content. PHI.
53
+ safety: "phi",
54
+ argsType: "{ content: string; clinical: boolean }",
55
+ argsSchema: {
56
+ type: "object",
57
+ properties: {
58
+ content: {
59
+ type: "string",
60
+ description: "Note body. Rich HTML for the rich composer, else plain text."
61
+ },
62
+ clinical: {
63
+ type: "boolean",
64
+ description: "Whether the note is clinical. Requires the clinical-note permission; the submission is dropped when the gate is closed."
65
+ }
66
+ },
67
+ required: ["content", "clinical"]
68
+ },
69
+ openWorld: !0,
70
+ descriptionKey: "ui.agent.notesPanel.actions.addNote",
71
+ description: "Compose and commit a new note. A clinical note requires the clinical-note permission (read canAddClinical first).",
72
+ examples: [
73
+ {
74
+ args: { content: "Patient reported improvement.", clinical: !0 },
75
+ note: "Add a clinical note."
76
+ }
77
+ ],
78
+ invoke: (i, c) => i.addNote(c)
79
+ },
80
+ toggle_pin: {
81
+ // Re-orders the timeline (pinned notes lead) — reversible view write.
82
+ safety: "write",
83
+ argsType: "{ id: string }",
84
+ argsSchema: {
85
+ type: "object",
86
+ properties: { id: { type: "string" } },
87
+ required: ["id"]
88
+ },
89
+ idempotent: !1,
90
+ descriptionKey: "ui.agent.notesPanel.actions.togglePin",
91
+ description: "Toggle the pinned state of the note with the given id. Refused for a deleted note or one whose actions.pin is false.",
92
+ invoke: (i, c) => {
93
+ i.togglePin(c.id);
94
+ }
95
+ },
96
+ toggle_flag: {
97
+ safety: "write",
98
+ argsType: "{ id: string }",
99
+ argsSchema: {
100
+ type: "object",
101
+ properties: { id: { type: "string" } },
102
+ required: ["id"]
103
+ },
104
+ idempotent: !1,
105
+ descriptionKey: "ui.agent.notesPanel.actions.toggleFlag",
106
+ description: "Toggle the flagged state of the note with the given id.",
107
+ invoke: (i, c) => {
108
+ i.toggleFlag(c.id);
109
+ }
110
+ }
111
+ },
112
+ domHooks: {
113
+ root: {
114
+ attr: "data-component",
115
+ value: "notes-panel",
116
+ description: "Marks the NotesPanel region."
117
+ },
118
+ instanceId: {
119
+ attr: "data-component-id",
120
+ sourceProp: "id",
121
+ description: "Sourced from the id prop. Required to address a specific notes panel from the agent."
122
+ }
123
+ }
124
+ }, ht = Ze(
125
+ "ds:flex ds:flex-col ds:rounded-[var(--radius-md)] ds:border-s-2 ds:ps-[var(--spacing-sm)]",
126
+ {
127
+ variants: {
128
+ current: {
129
+ true: "ds:border-[color:var(--info)] ds:bg-[color:var(--info)]/10 ds:focus:outline-[length:var(--focus-ring-width)] ds:focus:outline-solid ds:focus:outline-[color:var(--ring)] ds:focus:outline-offset-[length:var(--focus-ring-offset)]",
130
+ false: "ds:border-transparent"
131
+ }
132
+ },
133
+ defaultVariants: { current: !1 }
134
+ }
135
+ ), vt = "ds:opacity-0", yt = [
136
+ "ds:transition-opacity ds:duration-[var(--animation-duration)]",
137
+ "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
138
+ ].join(" "), bt = [3, 2, 3];
139
+ function ve(i) {
140
+ return i ? /<img\b/i.test(i) ? !0 : i.replace(/<[^>]*>/g, "").replace(/&nbsp;/gi, " ").trim().length > 0 : !1;
141
+ }
142
+ const Kt = Je(
143
+ function({
144
+ id: c,
145
+ notes: L,
146
+ onAddNote: m,
147
+ status: y = "ready",
148
+ onRetry: X,
149
+ currentNoteId: b,
150
+ currentNoteKey: ye,
151
+ composer: p = "rich",
152
+ editorToolbar: be = "standard",
153
+ redactor: Ce,
154
+ imageUploadUrl: Pe,
155
+ showClinicalToggle: xe = !0,
156
+ canAddClinicalNote: _ = !0,
157
+ clinicalGatedReason: we,
158
+ defaultClinical: R = !1,
159
+ onRequestAiDraft: Re,
160
+ aiDraftFormat: Te,
161
+ aiPrivacyNotice: ke,
162
+ onDictate: Ne,
163
+ onProofread: Ve,
164
+ onAutoFormat: Ee,
165
+ onTogglePin: A,
166
+ onToggleFlag: H,
167
+ noteActions: Z,
168
+ onEditNote: T,
169
+ editClinical: Ie = !1,
170
+ onDeleteNote: g,
171
+ confirmDelete: G = !0,
172
+ title: Se,
173
+ composerPlaceholder: ze,
174
+ addNoteLabel: je,
175
+ emptyState: Le,
176
+ className: _e,
177
+ "aria-label": Y,
178
+ ...Ae
179
+ }, He) {
180
+ const { t: a, i18n: ee } = et(), v = f(null), [C, k] = x(""), [B, O] = x(R), [u, te] = x(!1), [ne, N] = x(null), [l, $] = x(null), ae = f(!1);
181
+ y === "loading" && (ae.current = !0);
182
+ const Be = ae.current ? lt : "", Oe = Se ?? a("notesPanel.title", { defaultValue: "Notes" }), ie = Qe(), re = ze ?? a("notesPanel.placeholder", { defaultValue: "Add a note…" }), le = l !== null ? a("notesPanel.edit", { defaultValue: "Edit note" }) : a("notesPanel.composerLabel", { defaultValue: "New note" }), De = p === "rich" ? ve(C) : C.trim().length > 0, Ke = w(() => {
183
+ var S;
184
+ if (!(l !== null ? T : m) || u) return;
185
+ const t = p === "rich", d = t ? ((S = v.current) == null ? void 0 : S.getHTML()) ?? C : C.trim();
186
+ if (t ? !ve(d) : !d) return;
187
+ const s = () => {
188
+ var P;
189
+ t && ((P = v.current) == null || P.clear()), k(""), O(R), $(null);
190
+ };
191
+ N(null);
192
+ let r;
193
+ try {
194
+ r = l !== null && T ? T(l, { content: d, clinical: B }) : m == null ? void 0 : m({ content: d, clinical: B });
195
+ } catch (P) {
196
+ N(he(P, a("notesPanel.addFailed")));
197
+ return;
198
+ }
199
+ if (!r || typeof r.then != "function") return s();
200
+ te(!0), Promise.resolve(r).then(
201
+ s,
202
+ (P) => N(he(P, a("notesPanel.addFailed")))
203
+ ).finally(() => te(!1));
204
+ }, [
205
+ p,
206
+ C,
207
+ B,
208
+ R,
209
+ l,
210
+ m,
211
+ T,
212
+ u,
213
+ a
214
+ ]), se = xe && (l === null || Ie), oe = w(
215
+ (e) => {
216
+ try {
217
+ return new Intl.DateTimeFormat(ee.language, {
218
+ day: "numeric",
219
+ month: "long",
220
+ year: "numeric",
221
+ hour: "2-digit",
222
+ minute: "2-digit"
223
+ }).format(new Date(e.dateIso));
224
+ } catch {
225
+ return e.dateIso;
226
+ }
227
+ },
228
+ [ee.language]
229
+ ), qe = w(
230
+ (e) => {
231
+ var d, s, r;
232
+ if (!e.id || u) return;
233
+ const t = e.content ?? "";
234
+ N(null), $(e.id), O(e.clinical ?? !1), k(t), p === "rich" && ((d = v.current) == null || d.clear(), (s = v.current) == null || s.insertAtCursor(t, { asHtml: !0 })), (r = v.current) == null || r.focus();
235
+ },
236
+ [p, u]
237
+ ), D = w(() => {
238
+ var e;
239
+ p === "rich" && ((e = v.current) == null || e.clear()), k(""), O(R), N(null), $(null);
240
+ }, [p, R]), de = l === null || L.some((e) => e.id === l && !e.deleted);
241
+ me(() => {
242
+ de || D();
243
+ }, [de, D]);
244
+ const V = [...L].sort(
245
+ (e, t) => Number(t.pinned ?? !1) - Number(e.pinned ?? !1)
246
+ ), { resolvedTheme: Fe } = ut(), ce = Fe.endsWith("-accessible") || void 0, { containerRef: Me } = ot({
247
+ key: V.map((e) => e.id).join(),
248
+ reduceMotion: ce
249
+ }), E = dt({ reduceMotion: ce }), [K, q] = x(null), We = w(
250
+ (e) => {
251
+ g && (G ? q(e) : E.leave(e, () => g(e)));
252
+ },
253
+ [G, E, g]
254
+ ), Ge = w(() => {
255
+ if (!K || !g) return;
256
+ const e = K;
257
+ q(null), E.leave(e, () => g(e));
258
+ }, [K, g, E]), J = f(null);
259
+ me(() => {
260
+ var e, t;
261
+ b && ((e = J.current) == null || e.scrollIntoView({ block: "center" }), (t = J.current) == null || t.focus());
262
+ }, [b, ye]);
263
+ const Q = f(L);
264
+ Q.current = L;
265
+ const I = f(m);
266
+ I.current = m;
267
+ const F = f(A);
268
+ F.current = A;
269
+ const M = f(H);
270
+ M.current = H;
271
+ const U = f(_);
272
+ U.current = _;
273
+ const ue = f(b);
274
+ ue.current = b;
275
+ const fe = f(null);
276
+ Ue(He, () => fe.current, []);
277
+ const Ye = Xe(
278
+ () => ({
279
+ // Ids + flags only — never the note body or author (both PHI).
280
+ getNotes: () => Q.current.map((e) => ({
281
+ id: e.id,
282
+ pinned: !!e.pinned,
283
+ flagged: !!e.flagged,
284
+ clinical: !!e.clinical
285
+ })),
286
+ canAddNote: () => !!I.current,
287
+ canAddClinical: () => U.current,
288
+ getCurrentNoteId: () => ue.current ?? null,
289
+ addNote: (e) => {
290
+ var t;
291
+ if (!(e.clinical && !U.current))
292
+ return (t = I.current) == null ? void 0 : t.call(I, e);
293
+ },
294
+ togglePin: (e) => {
295
+ var d, s;
296
+ const t = Q.current.find((r) => r.id === e);
297
+ t && (t.deleted || ((d = t.actions) == null ? void 0 : d.pin) === !1) || (s = F.current) == null || s.call(F, e);
298
+ },
299
+ toggleFlag: (e) => {
300
+ var t;
301
+ return (t = M.current) == null ? void 0 : t.call(M, e);
302
+ }
303
+ }),
304
+ []
305
+ );
306
+ return tt(gt, Ye, c), /* @__PURE__ */ o(
307
+ "section",
308
+ {
309
+ ref: fe,
310
+ "data-component": "notes-panel",
311
+ "data-component-id": c,
312
+ "aria-labelledby": Y ? void 0 : ie,
313
+ "aria-label": Y,
314
+ className: ["ds:flex ds:flex-col", _e].filter(Boolean).join(" "),
315
+ ...Ae,
316
+ children: [
317
+ /* @__PURE__ */ n(
318
+ st,
319
+ {
320
+ title: Oe,
321
+ icon: /* @__PURE__ */ n(ft, { "aria-hidden": "true" }),
322
+ headingId: Y ? void 0 : ie,
323
+ sticky: !0,
324
+ divider: !0
325
+ }
326
+ ),
327
+ /* @__PURE__ */ o("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
328
+ m || l !== null ? /* @__PURE__ */ o(
329
+ "div",
330
+ {
331
+ "data-notes-panel-composer": l !== null ? "edit" : "add",
332
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
333
+ children: [
334
+ p === "rich" ? /* @__PURE__ */ n(
335
+ at,
336
+ {
337
+ ref: v,
338
+ ariaLabel: le,
339
+ placeholder: re,
340
+ toolbar: be,
341
+ minHeight: "fill",
342
+ redactor: Ce,
343
+ imageUploadUrl: Pe,
344
+ readOnly: u,
345
+ onChange: ({ html: e }) => k(e),
346
+ onRequestAiDraft: Re,
347
+ aiDraftFormat: Te,
348
+ aiPrivacyNotice: ke,
349
+ onDictate: Ne,
350
+ onProofread: Ve,
351
+ onAutoFormat: Ee
352
+ }
353
+ ) : /* @__PURE__ */ n(
354
+ it,
355
+ {
356
+ value: C,
357
+ readOnly: u,
358
+ onChange: (e) => k(e.target.value),
359
+ placeholder: re,
360
+ autoResize: !0,
361
+ minRows: 2,
362
+ maxRows: 6,
363
+ "aria-label": le
364
+ }
365
+ ),
366
+ /* @__PURE__ */ o(
367
+ "div",
368
+ {
369
+ className: [
370
+ "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
371
+ se ? "ds:justify-between" : "ds:justify-end"
372
+ ].join(" "),
373
+ children: [
374
+ se ? /* @__PURE__ */ n(
375
+ rt,
376
+ {
377
+ size: "sm",
378
+ label: a("notesPanel.clinicalToggle", {
379
+ defaultValue: "Clinical note"
380
+ }),
381
+ checked: B,
382
+ onCheckedChange: (e) => O(e === !0),
383
+ disabled: u || !_,
384
+ disabledReason: _ ? void 0 : we ?? a("notesPanel.clinicalGated", {
385
+ defaultValue: "You do not have permission to write clinical notes."
386
+ })
387
+ }
388
+ ) : null,
389
+ /* @__PURE__ */ o("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
390
+ l !== null ? /* @__PURE__ */ n(
391
+ j,
392
+ {
393
+ type: "button",
394
+ size: "sm",
395
+ intent: "ghost",
396
+ onClick: D,
397
+ disabled: u,
398
+ children: a("notesPanel.cancelEdit", { defaultValue: "Cancel" })
399
+ }
400
+ ) : null,
401
+ /* @__PURE__ */ n(
402
+ j,
403
+ {
404
+ type: "button",
405
+ size: "sm",
406
+ onClick: Ke,
407
+ disabled: !De,
408
+ loading: u,
409
+ children: l !== null ? a("notesPanel.saveEdit", { defaultValue: "Save note" }) : je ?? a("notesPanel.add", { defaultValue: "Add note" })
410
+ }
411
+ )
412
+ ] })
413
+ ]
414
+ }
415
+ ),
416
+ ne ? /* @__PURE__ */ n(z, { variant: "error", children: /* @__PURE__ */ n(z.Description, { children: ne }) }) : null
417
+ ]
418
+ }
419
+ ) : null,
420
+ y === "loading" && V.length === 0 ? (
421
+ /* Note-shaped placeholders, not a spinner: the reader sees where
422
+ the notes will land and how many to expect. The status text is
423
+ for assistive tech only; sighted readers get the motion. */
424
+ /* @__PURE__ */ o(
425
+ "div",
426
+ {
427
+ "data-notes-panel-loading": "",
428
+ "aria-busy": "true",
429
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
430
+ children: [
431
+ /* @__PURE__ */ n("span", { role: "status", className: "ds:sr-only", children: a("notesPanel.loading") }),
432
+ bt.map((e, t) => /* @__PURE__ */ n(ge, { variant: "elevated", "aria-hidden": "true", children: /* @__PURE__ */ n(ge.Body, { children: /* @__PURE__ */ o("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
433
+ /* @__PURE__ */ o("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
434
+ /* @__PURE__ */ n(
435
+ W,
436
+ {
437
+ variant: "circular",
438
+ size: "sm",
439
+ stagger: t * 2
440
+ }
441
+ ),
442
+ /* @__PURE__ */ o("div", { className: "ds:flex ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
443
+ /* @__PURE__ */ n(
444
+ W,
445
+ {
446
+ variant: "text",
447
+ size: "sm",
448
+ stagger: t * 2,
449
+ width: "40%"
450
+ }
451
+ ),
452
+ /* @__PURE__ */ n(
453
+ W,
454
+ {
455
+ variant: "text",
456
+ size: "sm",
457
+ stagger: t * 2,
458
+ width: "25%"
459
+ }
460
+ )
461
+ ] })
462
+ ] }),
463
+ /* @__PURE__ */ n(
464
+ W,
465
+ {
466
+ variant: "text",
467
+ size: "sm",
468
+ lines: e,
469
+ stagger: t * 2 + 1
470
+ }
471
+ )
472
+ ] }) }) }, t))
473
+ ]
474
+ }
475
+ )
476
+ ) : y === "error" ? /* @__PURE__ */ o(z, { variant: "error", children: [
477
+ /* @__PURE__ */ n(z.Description, { children: a("notesPanel.loadError") }),
478
+ X ? /* @__PURE__ */ n(z.Action, { children: /* @__PURE__ */ n(j, { intent: "secondary", size: "sm", onClick: X, children: a("notesPanel.retry") }) }) : null
479
+ ] }) : null,
480
+ y === "loading" && V.length > 0 ? /* @__PURE__ */ n("span", { role: "status", className: "ds:sr-only", children: a("notesPanel.loading") }) : null,
481
+ V.length > 0 ? /* @__PURE__ */ n(
482
+ "ul",
483
+ {
484
+ ref: Me,
485
+ "aria-busy": y === "loading" || void 0,
486
+ className: `ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0 ${Be}`.trim(),
487
+ children: V.map(({ actions: e, ...t }, d) => {
488
+ const s = b != null && t.id === b, r = t.id, S = r != null && E.isLeaving(r);
489
+ return /* @__PURE__ */ o(
490
+ "li",
491
+ {
492
+ ref: s ? J : void 0,
493
+ tabIndex: s ? -1 : void 0,
494
+ "aria-current": s ? "true" : void 0,
495
+ "data-reflow-id": r,
496
+ "data-leaving": S ? "" : void 0,
497
+ "data-editing": l === r ? "" : void 0,
498
+ className: [
499
+ ht({
500
+ current: s || l === r
501
+ }),
502
+ yt,
503
+ ct,
504
+ S ? vt : ""
505
+ ].filter(Boolean).join(" "),
506
+ children: [
507
+ s ? /* @__PURE__ */ n("span", { className: "ds:sr-only", children: a("notesPanel.current", {
508
+ defaultValue: "Current note"
509
+ }) }) : null,
510
+ /* @__PURE__ */ n(
511
+ nt,
512
+ {
513
+ surface: "elevated",
514
+ truncate: !s,
515
+ headerActions: /* @__PURE__ */ o($e, { children: [
516
+ Z ? Z({ ...t, actions: e }) : null,
517
+ T && r && !t.deleted && (e == null ? void 0 : e.edit) !== !1 ? /* @__PURE__ */ n(
518
+ pe,
519
+ {
520
+ icon: /* @__PURE__ */ n(mt, {}),
521
+ intent: "ghost",
522
+ size: "sm",
523
+ "aria-label": a("notesPanel.editNamed", {
524
+ date: oe(t),
525
+ defaultValue: "Edit note · {{date}}"
526
+ }),
527
+ tooltip: a("notesPanel.edit", {
528
+ defaultValue: "Edit note"
529
+ }),
530
+ "aria-pressed": l === r,
531
+ disabled: u,
532
+ "data-notes-panel-edit": "",
533
+ onClick: () => l === r ? D() : qe(t)
534
+ }
535
+ ) : null,
536
+ g && r && !t.deleted ? /* @__PURE__ */ n(
537
+ pe,
538
+ {
539
+ icon: /* @__PURE__ */ n(pt, {}),
540
+ intent: "ghost",
541
+ size: "sm",
542
+ "aria-label": a("notesPanel.deleteNamed", {
543
+ date: oe(t),
544
+ defaultValue: "Delete note · {{date}}"
545
+ }),
546
+ tooltip: a("notesPanel.delete", {
547
+ defaultValue: "Delete note"
548
+ }),
549
+ onClick: () => We(r)
550
+ }
551
+ ) : null
552
+ ] }),
553
+ ...t,
554
+ onTogglePin: A && t.id && (e == null ? void 0 : e.pin) !== !1 && !t.deleted ? () => A(t.id) : void 0,
555
+ onToggleFlag: H && t.id ? () => H(t.id) : void 0
556
+ }
557
+ )
558
+ ]
559
+ },
560
+ t.id ?? d
561
+ );
562
+ })
563
+ }
564
+ ) : y !== "ready" ? null : Le ?? /* @__PURE__ */ n("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: a("notesPanel.empty", { defaultValue: "No notes yet." }) })
565
+ ] }),
566
+ g && G ? /* @__PURE__ */ n(
567
+ h,
568
+ {
569
+ open: K !== null,
570
+ onOpenChange: (e) => !e && q(null),
571
+ children: /* @__PURE__ */ o(h.Content, { variant: "alert", size: "sm", children: [
572
+ /* @__PURE__ */ n(h.Header, { children: /* @__PURE__ */ n(h.Title, { children: a("notesPanel.deleteConfirmTitle", {
573
+ defaultValue: "Delete this note?"
574
+ }) }) }),
575
+ /* @__PURE__ */ n(h.Body, { children: /* @__PURE__ */ n(h.Description, { children: a("notesPanel.deleteConfirmBody", {
576
+ defaultValue: "The note will be removed from the record."
577
+ }) }) }),
578
+ /* @__PURE__ */ o(h.Footer, { children: [
579
+ /* @__PURE__ */ n(h.Close, { asChild: !0, children: /* @__PURE__ */ n(
580
+ j,
581
+ {
582
+ intent: "secondary",
583
+ size: "sm",
584
+ onClick: () => q(null),
585
+ children: a("notesPanel.deleteConfirmCancel", {
586
+ defaultValue: "Cancel"
587
+ })
588
+ }
589
+ ) }),
590
+ /* @__PURE__ */ n(
591
+ j,
592
+ {
593
+ intent: "destructive",
594
+ size: "sm",
595
+ onClick: Ge,
596
+ children: a("notesPanel.deleteConfirmAction", {
597
+ defaultValue: "Delete"
598
+ })
599
+ }
600
+ )
601
+ ] })
602
+ ] })
603
+ }
604
+ ) : null
605
+ ]
606
+ }
607
+ );
608
+ }
609
+ );
610
+ export {
611
+ Kt as N,
612
+ he as g
613
+ };
614
+ //# sourceMappingURL=notes-panel-CkbfDDzj.js.map
@@ -8,7 +8,7 @@ import { u as le } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
8
8
  import { I as pe } from "./icon-button-8xqRnkdG.js";
9
9
  import { B as F } from "./button-nJaPh_HC.js";
10
10
  import { S as H } from "./separator-CYU_bGFn.js";
11
- import { S as b } from "./skeleton-CZbwyJAA.js";
11
+ import { S as b } from "./skeleton-B1KTdJ4N.js";
12
12
  import { C as fe } from "./counter-WsvRuum1.js";
13
13
  import { S as me } from "./scroll-area-BZOvUhwQ.js";
14
14
  import { N as ue } from "./notification-card-ChcK9Wat.js";
@@ -496,4 +496,4 @@ export {
496
496
  ze as N,
497
497
  ye as n
498
498
  };
499
- //# sourceMappingURL=notification-tray-CJ8jOe-U.js.map
499
+ //# sourceMappingURL=notification-tray-_NoChRKi.js.map
@@ -8,7 +8,7 @@ import { I as Ue } from "./icon-button-8xqRnkdG.js";
8
8
  import { C as le } from "./card-DPmk26CL.js";
9
9
  import { K as Be, a as Re } from "./key-value-pair-DczGb4yz.js";
10
10
  import { L as V } from "./link-CPb_pZPr.js";
11
- import { S as k } from "./skeleton-CZbwyJAA.js";
11
+ import { S as k } from "./skeleton-B1KTdJ4N.js";
12
12
  import { T as oe } from "./tag-Ci3xJPcH.js";
13
13
  import { T as Ke } from "./transaction-chip-Dth1nThY.js";
14
14
  import { T as je } from "./tooltip-Cp-PLePW.js";
@@ -530,4 +530,4 @@ export {
530
530
  Ca as P,
531
531
  ma as p
532
532
  };
533
- //# sourceMappingURL=patient-summary-card-BzmJH9a-.js.map
533
+ //# sourceMappingURL=patient-summary-card-B131Q7Bp.js.map
@@ -10,7 +10,7 @@ import { E as st } from "./empty-state-X0sVPfVo.js";
10
10
  import { M as it } from "./map-view-CCAlC9IL.js";
11
11
  import { R as Ne } from "./rating-BYbUowdK.js";
12
12
  import { S as I } from "./sheet-hm04DGFd.js";
13
- import { S as rt } from "./skeleton-CZbwyJAA.js";
13
+ import { S as rt } from "./skeleton-B1KTdJ4N.js";
14
14
  import { S as ot } from "./spinner-hbwuKwMf.js";
15
15
  import { B as O } from "./badge-BudgzTe_.js";
16
16
  import { u as ct } from "./use-media-query-CcAx5SMM.js";
@@ -1737,4 +1737,4 @@ export {
1737
1737
  Dt as P,
1738
1738
  bt as p
1739
1739
  };
1740
- //# sourceMappingURL=practice-results-DOcORTkP.js.map
1740
+ //# sourceMappingURL=practice-results-CBNRJNnY.js.map
@@ -11,7 +11,7 @@ import * as j from "@radix-ui/react-popover";
11
11
  import { u as te } from "./use-controllable-state-BiY4xTzM.js";
12
12
  import { I as Q } from "./icon-button-8xqRnkdG.js";
13
13
  import { S as re } from "./scroll-area-BZOvUhwQ.js";
14
- import { S as R } from "./skeleton-CZbwyJAA.js";
14
+ import { S as R } from "./skeleton-B1KTdJ4N.js";
15
15
  import { T as de } from "./timestamp-BV2lC-wV.js";
16
16
  import { s as ne } from "./safe-image-src-DstKgCo7.js";
17
17
  import { c as oe } from "./createLucideIcon-DhHxpK9K.js";
@@ -675,4 +675,4 @@ export {
675
675
  le as b,
676
676
  ye as p
677
677
  };
678
- //# sourceMappingURL=product-hub-panel-C0TO69P7.js.map
678
+ //# sourceMappingURL=product-hub-panel-C3bMjscm.js.map