@alfadocs/ui-kit 1.30.0 → 1.31.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 (121) hide show
  1. package/dist/_chunks/{address-fields-CZ0pEdEI.js → address-fields-jFfjxOQR.js} +3 -3
  2. package/dist/_chunks/{appointment-card-Dzr3GeVz.js → appointment-card-CvUFFEdS.js} +8 -6
  3. package/dist/_chunks/{appointment-timeline-DhHwmHo1.js → appointment-timeline-DsMZY7U9.js} +2 -2
  4. package/dist/_chunks/{appointment-tray-4FUu_5NX.js → appointment-tray-Z2GaOIYQ.js} +2 -2
  5. package/dist/_chunks/{booking-AabCk7CI.js → booking-jGzRUETo.js} +2 -2
  6. package/dist/_chunks/{calendar-CI9MINcR.js → calendar-BNQKpxhE.js} +494 -438
  7. package/dist/_chunks/{calendar-event-card-66CEEWU6.js → calendar-event-card-DSh-69HT.js} +130 -122
  8. package/dist/_chunks/calendar-workspace-Dy1jHBvG.js +9392 -0
  9. package/dist/_chunks/{clinical-note-card-BBgFd2nB.js → clinical-note-card-yCTR9DB6.js} +185 -188
  10. package/dist/_chunks/{color-picker-CU303VjY.js → color-picker-Bl5f0iK1.js} +28 -25
  11. package/dist/_chunks/{combobox-D7_NLE2Z.js → combobox-DnSdYssy.js} +216 -215
  12. package/dist/_chunks/{country-select-DzbPFktV.js → country-select-CfDNFG5c.js} +2 -2
  13. package/dist/_chunks/{face-scheme-DA2vjqaM.js → face-scheme-l-CQyLs-.js} +2 -2
  14. package/dist/_chunks/notes-panel-am6e-Lwh.js +380 -0
  15. package/dist/_chunks/{patient-details-DYAmq76G.js → patient-details-CdfursHt.js} +3 -3
  16. package/dist/_chunks/{province-select-BBc7s7vR.js → province-select-BaUnkg4S.js} +2 -2
  17. package/dist/_chunks/{rich-text-editor-lSCiE0Zz.js → rich-text-editor-VJATL1Tk.js} +2 -2
  18. package/dist/_chunks/{timeline-r-8IUoBS.js → timeline-u-2t9t_M.js} +37 -35
  19. package/dist/agent-catalog.json +51 -10
  20. package/dist/agent-i18n/en.json +9 -7
  21. package/dist/components/_shared/get-error-message.d.ts +3 -0
  22. package/dist/components/address-fields/index.js +1 -1
  23. package/dist/components/appointment-card/index.js +2 -2
  24. package/dist/components/appointment-timeline/index.js +1 -1
  25. package/dist/components/booking/index.js +1 -1
  26. package/dist/components/calendar/calendar.d.ts +26 -2
  27. package/dist/components/calendar/index.js +1 -1
  28. package/dist/components/calendar-event-card/calendar-event-card.d.ts +9 -0
  29. package/dist/components/calendar-event-card/index.js +1 -1
  30. package/dist/components/clinical-note-card/clinical-note-card.d.ts +16 -1
  31. package/dist/components/clinical-note-card/index.js +1 -1
  32. package/dist/components/color-picker/index.js +1 -1
  33. package/dist/components/combobox/combobox.d.ts +5 -0
  34. package/dist/components/combobox/index.js +1 -1
  35. package/dist/components/country-select/index.js +1 -1
  36. package/dist/components/face-scheme/index.js +1 -1
  37. package/dist/components/notes-panel/index.d.ts +1 -1
  38. package/dist/components/notes-panel/index.js +1 -1
  39. package/dist/components/notes-panel/notes-panel.d.ts +24 -5
  40. package/dist/components/patient-details/index.js +1 -1
  41. package/dist/components/province-select/index.js +1 -1
  42. package/dist/components/rich-text-editor/index.js +1 -1
  43. package/dist/components/timeline/index.js +1 -1
  44. package/dist/components/timeline/timeline.d.ts +2 -0
  45. package/dist/host-compat.css +7 -1
  46. package/dist/i18n/locales/ar.d.ts +50 -0
  47. package/dist/i18n/locales/ar.js +54 -4
  48. package/dist/i18n/locales/de.d.ts +60 -10
  49. package/dist/i18n/locales/de.js +64 -14
  50. package/dist/i18n/locales/el.d.ts +50 -0
  51. package/dist/i18n/locales/el.js +54 -4
  52. package/dist/i18n/locales/en.d.ts +50 -0
  53. package/dist/i18n/locales/en.js +54 -4
  54. package/dist/i18n/locales/es.d.ts +50 -0
  55. package/dist/i18n/locales/es.js +54 -4
  56. package/dist/i18n/locales/fr.d.ts +50 -0
  57. package/dist/i18n/locales/fr.js +53 -3
  58. package/dist/i18n/locales/hi.d.ts +50 -0
  59. package/dist/i18n/locales/hi.js +54 -4
  60. package/dist/i18n/locales/it.d.ts +60 -10
  61. package/dist/i18n/locales/it.js +64 -14
  62. package/dist/i18n/locales/ja.d.ts +50 -0
  63. package/dist/i18n/locales/ja.js +54 -4
  64. package/dist/i18n/locales/nl.d.ts +50 -0
  65. package/dist/i18n/locales/nl.js +54 -4
  66. package/dist/i18n/locales/pl.d.ts +50 -0
  67. package/dist/i18n/locales/pl.js +54 -4
  68. package/dist/i18n/locales/pt.d.ts +50 -0
  69. package/dist/i18n/locales/pt.js +54 -4
  70. package/dist/i18n/locales/ro.d.ts +50 -0
  71. package/dist/i18n/locales/ro.js +53 -3
  72. package/dist/i18n/locales/ru.d.ts +50 -0
  73. package/dist/i18n/locales/ru.js +54 -4
  74. package/dist/i18n/locales/sq.d.ts +50 -0
  75. package/dist/i18n/locales/sq.js +54 -4
  76. package/dist/i18n/locales/sv.d.ts +50 -0
  77. package/dist/i18n/locales/sv.js +54 -4
  78. package/dist/i18n/locales/tr.d.ts +50 -0
  79. package/dist/i18n/locales/tr.js +54 -4
  80. package/dist/i18n/locales/zh.d.ts +50 -0
  81. package/dist/i18n/locales/zh.js +54 -4
  82. package/dist/index.js +91 -90
  83. package/dist/locales/ar.json +54 -4
  84. package/dist/locales/de.json +64 -14
  85. package/dist/locales/el.json +54 -4
  86. package/dist/locales/en.json +54 -4
  87. package/dist/locales/es.json +54 -4
  88. package/dist/locales/fr.json +53 -3
  89. package/dist/locales/hi.json +54 -4
  90. package/dist/locales/it.json +64 -14
  91. package/dist/locales/ja.json +54 -4
  92. package/dist/locales/nl.json +54 -4
  93. package/dist/locales/pl.json +54 -4
  94. package/dist/locales/pt.json +54 -4
  95. package/dist/locales/ro.json +53 -3
  96. package/dist/locales/ru.json +54 -4
  97. package/dist/locales/sq.json +54 -4
  98. package/dist/locales/sv.json +54 -4
  99. package/dist/locales/tr.json +54 -4
  100. package/dist/locales/zh.json +54 -4
  101. package/dist/patterns/calendar/calendar-appointment-details.d.ts +145 -0
  102. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +32 -0
  103. package/dist/patterns/calendar/calendar-editor-hydration.d.ts +59 -0
  104. package/dist/patterns/calendar/calendar-notes-tool.d.ts +14 -0
  105. package/dist/patterns/calendar/calendar-patient-picker.d.ts +11 -0
  106. package/dist/patterns/calendar/calendar-series-scope-chooser.d.ts +18 -0
  107. package/dist/patterns/calendar/calendar-workspace.d.ts +26 -1
  108. package/dist/patterns/calendar/calendar-workspace.model.d.ts +8 -5
  109. package/dist/patterns/calendar/calendar.data.d.ts +66 -1
  110. package/dist/patterns/calendar/calendar.host.d.ts +2 -0
  111. package/dist/patterns/calendar/calendar.journey.d.ts +42 -7
  112. package/dist/patterns/calendar/calendar.model.d.ts +54 -5
  113. package/dist/patterns/calendar/calendar.sheets.d.ts +68 -15
  114. package/dist/patterns/calendar/calendar.surface.d.ts +12 -2
  115. package/dist/patterns/calendar/calendar.types.d.ts +29 -1
  116. package/dist/patterns/calendar/index.d.ts +9 -6
  117. package/dist/patterns/calendar/index.js +15 -14
  118. package/dist/tokens.css +10 -2
  119. package/package.json +1 -1
  120. package/dist/_chunks/calendar-workspace-a84AHQwj.js +0 -7506
  121. package/dist/_chunks/notes-panel-CTNpsByN.js +0 -353
@@ -0,0 +1,380 @@
1
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as be, useRef as o, useState as w, useId as Pe, useCallback as xe, useEffect as Ne, useImperativeHandle as Ce, useMemo as we } from "react";
3
+ import { c as Re } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as ke } from "react-i18next";
5
+ import { u as je } from "./registry-DvAUVLHh.js";
6
+ import { C as Ve } from "./clinical-note-card-yCTR9DB6.js";
7
+ import { R as Ae } from "./rich-text-editor-VJATL1Tk.js";
8
+ import { T as Ie } from "./text-area-Bt3p7Pt0.js";
9
+ import { A as h } from "./alert-CiJT540z.js";
10
+ import { B as J } from "./button-nJaPh_HC.js";
11
+ import { C as He } from "./checkbox-BuZ1u__2.js";
12
+ import { S as Se } from "./spinner-hbwuKwMf.js";
13
+ import { P as qe } from "./panel-header-D313n_9-.js";
14
+ import { N as Ee } from "./notebook-pen-CO7HoM-W.js";
15
+ function Q(n, a) {
16
+ return typeof n == "object" && n !== null && "message" in n && typeof n.message == "string" && n.message.trim() ? n.message : a;
17
+ }
18
+ const Ke = {
19
+ id: "notes-panel",
20
+ // 'submit' backs add_note (compose + commit a note). pin / flag are toggles
21
+ // with no dedicated capability in the closed vocabulary.
22
+ capabilities: ["submit"],
23
+ state: {
24
+ notes: {
25
+ type: "Array<{ id?: string; pinned: boolean; flagged: boolean; clinical: boolean }>",
26
+ descriptionKey: "ui.agent.notesPanel.state.notes",
27
+ description: "Timeline note ids + pinned / flagged / clinical flags. Never the note body or author (both PHI).",
28
+ read: (n) => n.getNotes()
29
+ },
30
+ canAddClinical: {
31
+ type: "boolean",
32
+ descriptionKey: "ui.agent.notesPanel.state.canAddClinical",
33
+ description: "Whether the current user may write clinical notes (the practice_add_clinical_note permission gate).",
34
+ read: (n) => n.canAddClinical()
35
+ },
36
+ currentNoteId: {
37
+ type: "string | null",
38
+ descriptionKey: "ui.agent.notesPanel.state.currentNoteId",
39
+ 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.",
40
+ read: (n) => n.getCurrentNoteId()
41
+ }
42
+ },
43
+ actions: {
44
+ add_note: {
45
+ // Writes a clinical/admin note body — patient-identifiable content. PHI.
46
+ safety: "phi",
47
+ argsType: "{ content: string; clinical: boolean }",
48
+ argsSchema: {
49
+ type: "object",
50
+ properties: {
51
+ content: {
52
+ type: "string",
53
+ description: "Note body. Rich HTML for the rich composer, else plain text."
54
+ },
55
+ clinical: {
56
+ type: "boolean",
57
+ description: "Whether the note is clinical. Requires the clinical-note permission; the submission is dropped when the gate is closed."
58
+ }
59
+ },
60
+ required: ["content", "clinical"]
61
+ },
62
+ openWorld: !0,
63
+ descriptionKey: "ui.agent.notesPanel.actions.addNote",
64
+ description: "Compose and commit a new note. A clinical note requires the clinical-note permission (read canAddClinical first).",
65
+ examples: [
66
+ {
67
+ args: { content: "Patient reported improvement.", clinical: !0 },
68
+ note: "Add a clinical note."
69
+ }
70
+ ],
71
+ invoke: (n, a) => n.addNote(a)
72
+ },
73
+ toggle_pin: {
74
+ // Re-orders the timeline (pinned notes lead) — reversible view write.
75
+ safety: "write",
76
+ argsType: "{ id: string }",
77
+ argsSchema: {
78
+ type: "object",
79
+ properties: { id: { type: "string" } },
80
+ required: ["id"]
81
+ },
82
+ idempotent: !1,
83
+ descriptionKey: "ui.agent.notesPanel.actions.togglePin",
84
+ description: "Toggle the pinned state of the note with the given id. Refused for a deleted note or one whose actions.pin is false.",
85
+ invoke: (n, a) => {
86
+ n.togglePin(a.id);
87
+ }
88
+ },
89
+ toggle_flag: {
90
+ safety: "write",
91
+ argsType: "{ id: string }",
92
+ argsSchema: {
93
+ type: "object",
94
+ properties: { id: { type: "string" } },
95
+ required: ["id"]
96
+ },
97
+ idempotent: !1,
98
+ descriptionKey: "ui.agent.notesPanel.actions.toggleFlag",
99
+ description: "Toggle the flagged state of the note with the given id.",
100
+ invoke: (n, a) => {
101
+ n.toggleFlag(a.id);
102
+ }
103
+ }
104
+ },
105
+ domHooks: {
106
+ root: {
107
+ attr: "data-component",
108
+ value: "notes-panel",
109
+ description: "Marks the NotesPanel region."
110
+ },
111
+ instanceId: {
112
+ attr: "data-component-id",
113
+ sourceProp: "id",
114
+ description: "Sourced from the id prop. Required to address a specific notes panel from the agent."
115
+ }
116
+ }
117
+ }, Te = Re(
118
+ "ds:flex ds:flex-col ds:rounded-[var(--radius-md)] ds:border-s-2 ds:ps-[var(--spacing-sm)]",
119
+ {
120
+ variants: {
121
+ current: {
122
+ 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)]",
123
+ false: "ds:border-transparent"
124
+ }
125
+ },
126
+ defaultVariants: { current: !1 }
127
+ }
128
+ );
129
+ function U(n) {
130
+ return n ? /<img\b/i.test(n) ? !0 : n.replace(/<[^>]*>/g, "").replace(/&nbsp;/gi, " ").trim().length > 0 : !1;
131
+ }
132
+ const Xe = be(
133
+ function({
134
+ id: a,
135
+ notes: R,
136
+ onAddNote: c,
137
+ status: k = "ready",
138
+ onRetry: T,
139
+ currentNoteId: u,
140
+ currentNoteKey: X,
141
+ composer: y = "rich",
142
+ editorToolbar: Z = "standard",
143
+ redactor: $,
144
+ imageUploadUrl: ee,
145
+ showClinicalToggle: _ = !0,
146
+ canAddClinicalNote: v = !0,
147
+ clinicalGatedReason: te,
148
+ defaultClinical: j = !1,
149
+ onRequestAiDraft: ne,
150
+ aiDraftFormat: re,
151
+ aiPrivacyNotice: ie,
152
+ onDictate: se,
153
+ onProofread: ae,
154
+ onAutoFormat: oe,
155
+ onTogglePin: b,
156
+ onToggleFlag: P,
157
+ noteActions: z,
158
+ title: le,
159
+ composerPlaceholder: de,
160
+ addNoteLabel: ce,
161
+ emptyState: ue,
162
+ className: pe,
163
+ "aria-label": V,
164
+ ...fe
165
+ }, me) {
166
+ const { t: i } = ke(), A = o(null), [p, I] = w(""), [H, M] = w(j), [f, B] = w(!1), [D, S] = w(null), ge = le ?? i("notesPanel.title", { defaultValue: "Notes" }), L = Pe(), W = de ?? i("notesPanel.placeholder", { defaultValue: "Add a note…" }), F = i("notesPanel.composerLabel", {
167
+ defaultValue: "New note"
168
+ }), he = y === "rich" ? U(p) : p.trim().length > 0, ye = xe(() => {
169
+ var C;
170
+ if (!c || f) return;
171
+ const e = y === "rich", t = e ? ((C = A.current) == null ? void 0 : C.getHTML()) ?? p : p.trim();
172
+ if (e ? !U(t) : !t) return;
173
+ const l = () => {
174
+ var m;
175
+ e && ((m = A.current) == null || m.clear()), I(""), M(j);
176
+ };
177
+ S(null);
178
+ let s;
179
+ try {
180
+ s = c({ content: t, clinical: H });
181
+ } catch (m) {
182
+ S(Q(m, i("notesPanel.addFailed")));
183
+ return;
184
+ }
185
+ if (!s || typeof s.then != "function") return l();
186
+ B(!0), Promise.resolve(s).then(
187
+ l,
188
+ (m) => S(Q(m, i("notesPanel.addFailed")))
189
+ ).finally(() => B(!1));
190
+ }, [y, p, H, j, c, f, i]), O = [...R].sort(
191
+ (e, t) => Number(t.pinned ?? !1) - Number(e.pinned ?? !1)
192
+ ), q = o(null);
193
+ Ne(() => {
194
+ var e, t;
195
+ u && ((e = q.current) == null || e.scrollIntoView({ block: "center" }), (t = q.current) == null || t.focus());
196
+ }, [u, X]);
197
+ const E = o(R);
198
+ E.current = R;
199
+ const g = o(c);
200
+ g.current = c;
201
+ const x = o(b);
202
+ x.current = b;
203
+ const N = o(P);
204
+ N.current = P;
205
+ const K = o(v);
206
+ K.current = v;
207
+ const G = o(u);
208
+ G.current = u;
209
+ const Y = o(null);
210
+ Ce(me, () => Y.current, []);
211
+ const ve = we(
212
+ () => ({
213
+ // Ids + flags only — never the note body or author (both PHI).
214
+ getNotes: () => E.current.map((e) => ({
215
+ id: e.id,
216
+ pinned: !!e.pinned,
217
+ flagged: !!e.flagged,
218
+ clinical: !!e.clinical
219
+ })),
220
+ canAddNote: () => !!g.current,
221
+ canAddClinical: () => K.current,
222
+ getCurrentNoteId: () => G.current ?? null,
223
+ addNote: (e) => {
224
+ var t;
225
+ if (!(e.clinical && !K.current))
226
+ return (t = g.current) == null ? void 0 : t.call(g, e);
227
+ },
228
+ togglePin: (e) => {
229
+ var l, s;
230
+ const t = E.current.find((C) => C.id === e);
231
+ t && (t.deleted || ((l = t.actions) == null ? void 0 : l.pin) === !1) || (s = x.current) == null || s.call(x, e);
232
+ },
233
+ toggleFlag: (e) => {
234
+ var t;
235
+ return (t = N.current) == null ? void 0 : t.call(N, e);
236
+ }
237
+ }),
238
+ []
239
+ );
240
+ return je(Ke, ve, a), /* @__PURE__ */ d(
241
+ "section",
242
+ {
243
+ ref: Y,
244
+ "data-component": "notes-panel",
245
+ "data-component-id": a,
246
+ "aria-labelledby": V ? void 0 : L,
247
+ "aria-label": V,
248
+ className: ["ds:flex ds:flex-col", pe].filter(Boolean).join(" "),
249
+ ...fe,
250
+ children: [
251
+ /* @__PURE__ */ r(
252
+ qe,
253
+ {
254
+ title: ge,
255
+ icon: /* @__PURE__ */ r(Ee, { "aria-hidden": "true" }),
256
+ headingId: V ? void 0 : L,
257
+ sticky: !0,
258
+ divider: !0
259
+ }
260
+ ),
261
+ /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
262
+ c ? /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
263
+ y === "rich" ? /* @__PURE__ */ r(
264
+ Ae,
265
+ {
266
+ ref: A,
267
+ ariaLabel: F,
268
+ placeholder: W,
269
+ toolbar: Z,
270
+ minHeight: "sm",
271
+ redactor: $,
272
+ imageUploadUrl: ee,
273
+ readOnly: f,
274
+ onChange: ({ html: e }) => I(e),
275
+ onRequestAiDraft: ne,
276
+ aiDraftFormat: re,
277
+ aiPrivacyNotice: ie,
278
+ onDictate: se,
279
+ onProofread: ae,
280
+ onAutoFormat: oe
281
+ }
282
+ ) : /* @__PURE__ */ r(
283
+ Ie,
284
+ {
285
+ value: p,
286
+ readOnly: f,
287
+ onChange: (e) => I(e.target.value),
288
+ placeholder: W,
289
+ autoResize: !0,
290
+ minRows: 2,
291
+ maxRows: 6,
292
+ "aria-label": F
293
+ }
294
+ ),
295
+ /* @__PURE__ */ d(
296
+ "div",
297
+ {
298
+ className: [
299
+ "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
300
+ _ ? "ds:justify-between" : "ds:justify-end"
301
+ ].join(" "),
302
+ children: [
303
+ _ ? /* @__PURE__ */ r(
304
+ He,
305
+ {
306
+ size: "sm",
307
+ label: i("notesPanel.clinicalToggle", {
308
+ defaultValue: "Clinical note"
309
+ }),
310
+ checked: H,
311
+ onCheckedChange: (e) => M(e === !0),
312
+ disabled: f || !v,
313
+ disabledReason: v ? void 0 : te ?? i("notesPanel.clinicalGated", {
314
+ defaultValue: "You do not have permission to write clinical notes."
315
+ })
316
+ }
317
+ ) : null,
318
+ /* @__PURE__ */ r(
319
+ J,
320
+ {
321
+ type: "button",
322
+ size: "sm",
323
+ onClick: ye,
324
+ disabled: !he,
325
+ loading: f,
326
+ children: ce ?? i("notesPanel.add", { defaultValue: "Add note" })
327
+ }
328
+ )
329
+ ]
330
+ }
331
+ ),
332
+ D ? /* @__PURE__ */ r(h, { variant: "error", children: /* @__PURE__ */ r(h.Description, { children: D }) }) : null
333
+ ] }) : null,
334
+ k === "loading" ? /* @__PURE__ */ d("p", { className: "ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-xs)] type-body-sm ds:text-[color:var(--muted-foreground)]", children: [
335
+ /* @__PURE__ */ r(Se, { size: "sm", label: i("notesPanel.loading") }),
336
+ /* @__PURE__ */ r("span", { "aria-hidden": "true", children: i("notesPanel.loading") })
337
+ ] }) : k === "error" ? /* @__PURE__ */ d(h, { variant: "error", children: [
338
+ /* @__PURE__ */ r(h.Description, { children: i("notesPanel.loadError") }),
339
+ T ? /* @__PURE__ */ r(h.Action, { children: /* @__PURE__ */ r(J, { intent: "secondary", size: "sm", onClick: T, children: i("notesPanel.retry") }) }) : null
340
+ ] }) : null,
341
+ O.length > 0 ? /* @__PURE__ */ r("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: O.map(({ actions: e, ...t }, l) => {
342
+ const s = u != null && t.id === u;
343
+ return /* @__PURE__ */ d(
344
+ "li",
345
+ {
346
+ ref: s ? q : void 0,
347
+ tabIndex: s ? -1 : void 0,
348
+ "aria-current": s ? "true" : void 0,
349
+ className: Te({ current: s }),
350
+ children: [
351
+ s ? /* @__PURE__ */ r("span", { className: "ds:sr-only", children: i("notesPanel.current", {
352
+ defaultValue: "Current note"
353
+ }) }) : null,
354
+ /* @__PURE__ */ r(
355
+ Ve,
356
+ {
357
+ surface: "elevated",
358
+ truncate: !s,
359
+ ...t,
360
+ onTogglePin: b && t.id && (e == null ? void 0 : e.pin) !== !1 && !t.deleted ? () => b(t.id) : void 0,
361
+ onToggleFlag: P && t.id ? () => P(t.id) : void 0
362
+ }
363
+ ),
364
+ z ? /* @__PURE__ */ r("div", { className: "ds:flex ds:justify-end ds:gap-[var(--spacing-2xs)] ds:pt-[var(--spacing-2xs)]", children: z({ ...t, actions: e }) }) : null
365
+ ]
366
+ },
367
+ t.id ?? l
368
+ );
369
+ }) }) : k !== "ready" ? null : ue ?? /* @__PURE__ */ r("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: i("notesPanel.empty", { defaultValue: "No notes yet." }) })
370
+ ] })
371
+ ]
372
+ }
373
+ );
374
+ }
375
+ );
376
+ export {
377
+ Xe as N,
378
+ Q as g
379
+ };
380
+ //# sourceMappingURL=notes-panel-am6e-Lwh.js.map
@@ -17,8 +17,8 @@ import { S as be } from "./select-Bi8zril7.js";
17
17
  import { S as ye } from "./switch-OILsBLWo.js";
18
18
  import { T as he } from "./text-area-Bt3p7Pt0.js";
19
19
  import { T as ve } from "./text-input-CUvCb6ST.js";
20
- import { C as xe } from "./country-select-DzbPFktV.js";
21
- import { P as Ne } from "./province-select-BBc7s7vR.js";
20
+ import { C as xe } from "./country-select-CfDNFG5c.js";
21
+ import { P as Ne } from "./province-select-BaUnkg4S.js";
22
22
  import { P as Ce } from "./postal-code-input-BznBxVxf.js";
23
23
  import { C as Ve } from "./city-input-DaQc-Hbj.js";
24
24
  import { u as we } from "./registry-DvAUVLHh.js";
@@ -757,4 +757,4 @@ export {
757
757
  Ae as P,
758
758
  Oe as p
759
759
  };
760
- //# sourceMappingURL=patient-details-DYAmq76G.js.map
760
+ //# sourceMappingURL=patient-details-CdfursHt.js.map
@@ -1,7 +1,7 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { forwardRef as N, useMemo as p, useCallback as O, useRef as h, useEffect as z } from "react";
3
3
  import { useTranslation as U } from "react-i18next";
4
- import { C as F } from "./combobox-D7_NLE2Z.js";
4
+ import { C as F } from "./combobox-DnSdYssy.js";
5
5
  import { u as y } from "./use-controllable-state-BiY4xTzM.js";
6
6
  import { u as G } from "./registry-DvAUVLHh.js";
7
7
  const w = [
@@ -258,4 +258,4 @@ export {
258
258
  k as P,
259
259
  _ as p
260
260
  };
261
- //# sourceMappingURL=province-select-BBc7s7vR.js.map
261
+ //# sourceMappingURL=province-select-BaUnkg4S.js.map
@@ -19,7 +19,7 @@ import { a as pt } from "./tooltip-DvmfrNvB.js";
19
19
  import { P as q } from "./popover-DP6WCVwm.js";
20
20
  import { D as Ae } from "./dropdown-menu-DU-Hrf33.js";
21
21
  import { D as B } from "./dialog-UbKJCi1X.js";
22
- import { C as We } from "./color-picker-CU303VjY.js";
22
+ import { C as We } from "./color-picker-Bl5f0iK1.js";
23
23
  import { T as Ie } from "./text-input-CUvCb6ST.js";
24
24
  import { C as Xt } from "./checkbox-BuZ1u__2.js";
25
25
  import { F as Ut } from "./file-upload-CwxdqkMK.js";
@@ -2626,4 +2626,4 @@ export {
2626
2626
  hn as r,
2627
2627
  Qn as w
2628
2628
  };
2629
- //# sourceMappingURL=rich-text-editor-lSCiE0Zz.js.map
2629
+ //# sourceMappingURL=rich-text-editor-VJATL1Tk.js.map
@@ -130,10 +130,10 @@ const K = {
130
130
  layout: t = "rail-start",
131
131
  order: r = "newest-first",
132
132
  className: s,
133
- children: i,
133
+ children: a,
134
134
  ...n
135
- }, a) => {
136
- const d = p(() => ({ layout: t, order: r }), [t, r]), o = w(null), [l, z] = V(null), h = w(null);
135
+ }, d) => {
136
+ const i = p(() => ({ layout: t, order: r }), [t, r]), o = w(null), [l, z] = V(null), h = w(null);
137
137
  h.current = l;
138
138
  const x = I((y) => {
139
139
  var T;
@@ -149,7 +149,7 @@ const K = {
149
149
  }),
150
150
  [x]
151
151
  );
152
- return O(a, () => o.current, []), B(K, R, n.id), /* @__PURE__ */ e(v.Provider, { value: d, children: /* @__PURE__ */ e(
152
+ return O(d, () => o.current, []), B(K, R, n.id), /* @__PURE__ */ e(v.Provider, { value: i, children: /* @__PURE__ */ e(
153
153
  "ol",
154
154
  {
155
155
  ref: o,
@@ -158,37 +158,37 @@ const K = {
158
158
  "data-selected-event": l ?? void 0,
159
159
  className: U({ layout: t, order: r, className: s }),
160
160
  ...n,
161
- children: i
161
+ children: a
162
162
  }
163
163
  ) });
164
164
  }
165
165
  );
166
166
  E.displayName = "Timeline";
167
167
  const S = m(
168
- ({ type: t = "neutral", eventId: r, className: s, children: i, ...n }, a) => {
169
- const { layout: d } = u(v), { t: o } = A(), l = p(() => ({ type: t }), [t]);
170
- return d === "alternating" ? /* @__PURE__ */ e(g.Provider, { value: l, children: /* @__PURE__ */ c(
168
+ ({ type: t = "neutral", eventId: r, className: s, children: a, ...n }, d) => {
169
+ const { layout: i } = u(v), { t: o } = A(), l = p(() => ({ type: t }), [t]);
170
+ return i === "alternating" ? /* @__PURE__ */ e(g.Provider, { value: l, children: /* @__PURE__ */ c(
171
171
  "li",
172
172
  {
173
- ref: a,
173
+ ref: d,
174
174
  "data-event-id": r,
175
175
  className: ["ds:contents", s].filter(Boolean).join(" "),
176
176
  ...n,
177
177
  children: [
178
178
  /* @__PURE__ */ e("span", { className: "ds:sr-only", children: o(`timeline.type.${t}`) }),
179
- i
179
+ a
180
180
  ]
181
181
  }
182
182
  ) }) : /* @__PURE__ */ e(g.Provider, { value: l, children: /* @__PURE__ */ c(
183
183
  "li",
184
184
  {
185
- ref: a,
185
+ ref: d,
186
186
  "data-event-id": r,
187
- className: W({ layout: d, className: s }),
187
+ className: W({ layout: i, className: s }),
188
188
  ...n,
189
189
  children: [
190
190
  /* @__PURE__ */ e("span", { className: "ds:sr-only", children: o(`timeline.type.${t}`) }),
191
- i
191
+ a
192
192
  ]
193
193
  }
194
194
  ) });
@@ -196,38 +196,38 @@ const S = m(
196
196
  );
197
197
  S.displayName = "Timeline.Event";
198
198
  const _ = m(
199
- ({ icon: t, className: r, ...s }, i) => {
200
- const { type: n } = u(g), { layout: a } = u(v), d = /* @__PURE__ */ e(
199
+ ({ icon: t, className: r, ...s }, a) => {
200
+ const { type: n } = u(g), { layout: d } = u(v), i = /* @__PURE__ */ e(
201
201
  "div",
202
202
  {
203
- ref: i,
203
+ ref: a,
204
204
  "aria-hidden": "true",
205
205
  className: Y({ type: n, className: r }),
206
206
  ...s,
207
207
  children: t ?? X[n]
208
208
  }
209
209
  );
210
- return a === "alternating" ? /* @__PURE__ */ c(
210
+ return d === "alternating" ? /* @__PURE__ */ c(
211
211
  "div",
212
212
  {
213
213
  "aria-hidden": "true",
214
214
  className: "ds:col-start-2 ds:flex ds:flex-col ds:items-center",
215
215
  children: [
216
216
  /* @__PURE__ */ e("div", { className: "ds:w-[var(--border-width-md)] ds:flex-1 ds:bg-[var(--border)] ds:first:hidden" }),
217
- d,
217
+ i,
218
218
  /* @__PURE__ */ e("div", { className: "ds:w-[var(--border-width-md)] ds:flex-1 ds:bg-[var(--border)]" })
219
219
  ]
220
220
  }
221
- ) : d;
221
+ ) : i;
222
222
  }
223
223
  );
224
224
  _.displayName = "Timeline.Dot";
225
225
  const j = m(
226
- ({ title: t, description: r, actor: s, children: i, className: n, ...a }, d) => {
226
+ ({ title: t, description: r, actor: s, children: a, className: n, ...d }, i) => {
227
227
  const { layout: o } = u(v), l = /* @__PURE__ */ e(
228
228
  "div",
229
229
  {
230
- ref: d,
230
+ ref: i,
231
231
  className: [
232
232
  "ds:flex-1 ds:min-w-0 ds:pb-[var(--spacing-md)]",
233
233
  // Wrap policy: `break-word` (not `anywhere`) preserves word-
@@ -240,7 +240,7 @@ const j = m(
240
240
  "ds:[&_*]:break-normal ds:[&_*]:[overflow-wrap:break-word]",
241
241
  n
242
242
  ].filter(Boolean).join(" "),
243
- ...a,
243
+ ...d,
244
244
  children: /* @__PURE__ */ e(N, { variant: "outlined", children: /* @__PURE__ */ c(N.Body, { children: [
245
245
  /* @__PURE__ */ e("p", { className: "type-label ds:text-[var(--foreground)]", children: t }),
246
246
  r && /* @__PURE__ */ e("p", { className: "ds:mt-[var(--spacing-xs)] type-body-sm ds:text-[var(--muted-foreground)]", children: r }),
@@ -248,7 +248,7 @@ const j = m(
248
248
  /* @__PURE__ */ e(P, { size: "xs", name: s.name, src: s.src }),
249
249
  /* @__PURE__ */ e("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: s.name })
250
250
  ] }),
251
- i
251
+ a
252
252
  ] }) })
253
253
  }
254
254
  );
@@ -259,24 +259,26 @@ j.displayName = "Timeline.Content";
259
259
  const G = 1440 * 60 * 1e3, k = m(
260
260
  ({
261
261
  date: t,
262
- relative: r = !0,
263
- format: s = { dateStyle: "medium", timeStyle: "short" },
264
- className: i,
265
- ...n
266
- }, a) => /* @__PURE__ */ e(
262
+ locale: r,
263
+ relative: s = !0,
264
+ format: a = { dateStyle: "medium", timeStyle: "short" },
265
+ className: n,
266
+ ...d
267
+ }, i) => /* @__PURE__ */ e(
267
268
  q,
268
269
  {
269
- ref: a,
270
+ ref: i,
270
271
  value: t,
271
- format: r ? "relative" : "absolute",
272
- relativeWindow: r ? G : void 0,
273
- absoluteFormat: s,
272
+ locale: r,
273
+ format: s ? "relative" : "absolute",
274
+ relativeWindow: s ? G : void 0,
275
+ absoluteFormat: a,
274
276
  className: [
275
277
  "ds:text-[var(--muted-foreground)]",
276
278
  "ds:[font-variant-numeric:var(--font-feature-tabular)]",
277
- i
279
+ n
278
280
  ].filter(Boolean).join(" "),
279
- ...n
281
+ ...d
280
282
  }
281
283
  )
282
284
  );
@@ -291,4 +293,4 @@ export {
291
293
  le as T,
292
294
  K as t
293
295
  };
294
- //# sourceMappingURL=timeline-r-8IUoBS.js.map
296
+ //# sourceMappingURL=timeline-u-2t9t_M.js.map