@alfadocs/ui-kit 1.29.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 (132) hide show
  1. package/dist/_chunks/{address-fields-CZ0pEdEI.js → address-fields-jFfjxOQR.js} +3 -3
  2. package/dist/_chunks/{anamnesis-summary-rows-DwjqZgR5.js → anamnesis-summary-rows-DMO3MWSt.js} +2 -2
  3. package/dist/_chunks/{appointment-card-Dzr3GeVz.js → appointment-card-CvUFFEdS.js} +8 -6
  4. package/dist/_chunks/{appointment-timeline-DhHwmHo1.js → appointment-timeline-DsMZY7U9.js} +2 -2
  5. package/dist/_chunks/{appointment-tray-4FUu_5NX.js → appointment-tray-Z2GaOIYQ.js} +2 -2
  6. package/dist/_chunks/{booking-AabCk7CI.js → booking-jGzRUETo.js} +2 -2
  7. package/dist/_chunks/{calendar-CI9MINcR.js → calendar-BNQKpxhE.js} +494 -438
  8. package/dist/_chunks/{calendar-event-card-66CEEWU6.js → calendar-event-card-DSh-69HT.js} +130 -122
  9. package/dist/_chunks/calendar-workspace-Dy1jHBvG.js +9392 -0
  10. package/dist/_chunks/{clinical-note-card-BBgFd2nB.js → clinical-note-card-yCTR9DB6.js} +185 -188
  11. package/dist/_chunks/{color-picker-CU303VjY.js → color-picker-Bl5f0iK1.js} +28 -25
  12. package/dist/_chunks/{combobox-D7_NLE2Z.js → combobox-DnSdYssy.js} +216 -215
  13. package/dist/_chunks/{country-select-DzbPFktV.js → country-select-CfDNFG5c.js} +2 -2
  14. package/dist/_chunks/{face-scheme-DA2vjqaM.js → face-scheme-l-CQyLs-.js} +2 -2
  15. package/dist/_chunks/notes-panel-am6e-Lwh.js +380 -0
  16. package/dist/_chunks/{patient-details-DYAmq76G.js → patient-details-CdfursHt.js} +3 -3
  17. package/dist/_chunks/{province-select-BBc7s7vR.js → province-select-BaUnkg4S.js} +2 -2
  18. package/dist/_chunks/{rich-text-editor-lSCiE0Zz.js → rich-text-editor-VJATL1Tk.js} +2 -2
  19. package/dist/_chunks/{sparkline-BmGcEyZO.js → sparkline-Dx_sxK3J.js} +228 -198
  20. package/dist/_chunks/{timeline-r-8IUoBS.js → timeline-u-2t9t_M.js} +37 -35
  21. package/dist/_chunks/use-zoom-drilldown-qCX34w9I.js +210 -0
  22. package/dist/agent-catalog.json +55 -11
  23. package/dist/agent-i18n/en.json +10 -8
  24. package/dist/components/_shared/get-error-message.d.ts +3 -0
  25. package/dist/components/address-fields/index.js +1 -1
  26. package/dist/components/appointment-card/index.js +2 -2
  27. package/dist/components/appointment-timeline/index.js +1 -1
  28. package/dist/components/booking/index.js +1 -1
  29. package/dist/components/calendar/calendar.d.ts +26 -2
  30. package/dist/components/calendar/index.js +1 -1
  31. package/dist/components/calendar-event-card/calendar-event-card.d.ts +9 -0
  32. package/dist/components/calendar-event-card/index.js +1 -1
  33. package/dist/components/clinical-note-card/clinical-note-card.d.ts +16 -1
  34. package/dist/components/clinical-note-card/index.js +1 -1
  35. package/dist/components/color-picker/index.js +1 -1
  36. package/dist/components/combobox/combobox.d.ts +5 -0
  37. package/dist/components/combobox/index.js +1 -1
  38. package/dist/components/country-select/index.js +1 -1
  39. package/dist/components/face-scheme/index.js +1 -1
  40. package/dist/components/index.d.ts +2 -2
  41. package/dist/components/notes-panel/index.d.ts +1 -1
  42. package/dist/components/notes-panel/index.js +1 -1
  43. package/dist/components/notes-panel/notes-panel.d.ts +24 -5
  44. package/dist/components/patient-details/index.js +1 -1
  45. package/dist/components/province-select/index.js +1 -1
  46. package/dist/components/rich-text-editor/index.js +1 -1
  47. package/dist/components/sparkline/index.js +1 -1
  48. package/dist/components/sparkline/sparkline.d.ts +6 -0
  49. package/dist/components/timeline/index.js +1 -1
  50. package/dist/components/timeline/timeline.d.ts +2 -0
  51. package/dist/hooks/index.d.ts +1 -0
  52. package/dist/hooks/index.js +56 -54
  53. package/dist/hooks/use-zoom-drilldown.d.ts +23 -0
  54. package/dist/host-compat.css +10 -1
  55. package/dist/i18n/locales/ar.d.ts +50 -0
  56. package/dist/i18n/locales/ar.js +54 -4
  57. package/dist/i18n/locales/de.d.ts +60 -10
  58. package/dist/i18n/locales/de.js +64 -14
  59. package/dist/i18n/locales/el.d.ts +50 -0
  60. package/dist/i18n/locales/el.js +54 -4
  61. package/dist/i18n/locales/en.d.ts +50 -0
  62. package/dist/i18n/locales/en.js +54 -4
  63. package/dist/i18n/locales/es.d.ts +50 -0
  64. package/dist/i18n/locales/es.js +54 -4
  65. package/dist/i18n/locales/fr.d.ts +50 -0
  66. package/dist/i18n/locales/fr.js +53 -3
  67. package/dist/i18n/locales/hi.d.ts +50 -0
  68. package/dist/i18n/locales/hi.js +54 -4
  69. package/dist/i18n/locales/it.d.ts +60 -10
  70. package/dist/i18n/locales/it.js +64 -14
  71. package/dist/i18n/locales/ja.d.ts +50 -0
  72. package/dist/i18n/locales/ja.js +54 -4
  73. package/dist/i18n/locales/nl.d.ts +50 -0
  74. package/dist/i18n/locales/nl.js +54 -4
  75. package/dist/i18n/locales/pl.d.ts +50 -0
  76. package/dist/i18n/locales/pl.js +54 -4
  77. package/dist/i18n/locales/pt.d.ts +50 -0
  78. package/dist/i18n/locales/pt.js +54 -4
  79. package/dist/i18n/locales/ro.d.ts +50 -0
  80. package/dist/i18n/locales/ro.js +53 -3
  81. package/dist/i18n/locales/ru.d.ts +50 -0
  82. package/dist/i18n/locales/ru.js +54 -4
  83. package/dist/i18n/locales/sq.d.ts +50 -0
  84. package/dist/i18n/locales/sq.js +54 -4
  85. package/dist/i18n/locales/sv.d.ts +50 -0
  86. package/dist/i18n/locales/sv.js +54 -4
  87. package/dist/i18n/locales/tr.d.ts +50 -0
  88. package/dist/i18n/locales/tr.js +54 -4
  89. package/dist/i18n/locales/zh.d.ts +50 -0
  90. package/dist/i18n/locales/zh.js +54 -4
  91. package/dist/index.js +1073 -1070
  92. package/dist/locales/ar.json +54 -4
  93. package/dist/locales/de.json +64 -14
  94. package/dist/locales/el.json +54 -4
  95. package/dist/locales/en.json +54 -4
  96. package/dist/locales/es.json +54 -4
  97. package/dist/locales/fr.json +53 -3
  98. package/dist/locales/hi.json +54 -4
  99. package/dist/locales/it.json +64 -14
  100. package/dist/locales/ja.json +54 -4
  101. package/dist/locales/nl.json +54 -4
  102. package/dist/locales/pl.json +54 -4
  103. package/dist/locales/pt.json +54 -4
  104. package/dist/locales/ro.json +53 -3
  105. package/dist/locales/ru.json +54 -4
  106. package/dist/locales/sq.json +54 -4
  107. package/dist/locales/sv.json +54 -4
  108. package/dist/locales/tr.json +54 -4
  109. package/dist/locales/zh.json +54 -4
  110. package/dist/patterns/anamnesis/index.js +1 -1
  111. package/dist/patterns/calendar/calendar-appointment-details.d.ts +145 -0
  112. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +32 -0
  113. package/dist/patterns/calendar/calendar-editor-hydration.d.ts +59 -0
  114. package/dist/patterns/calendar/calendar-notes-tool.d.ts +14 -0
  115. package/dist/patterns/calendar/calendar-patient-picker.d.ts +11 -0
  116. package/dist/patterns/calendar/calendar-series-scope-chooser.d.ts +18 -0
  117. package/dist/patterns/calendar/calendar-workspace.d.ts +26 -1
  118. package/dist/patterns/calendar/calendar-workspace.model.d.ts +8 -5
  119. package/dist/patterns/calendar/calendar.data.d.ts +66 -1
  120. package/dist/patterns/calendar/calendar.host.d.ts +2 -0
  121. package/dist/patterns/calendar/calendar.journey.d.ts +42 -7
  122. package/dist/patterns/calendar/calendar.model.d.ts +54 -5
  123. package/dist/patterns/calendar/calendar.sheets.d.ts +68 -15
  124. package/dist/patterns/calendar/calendar.surface.d.ts +12 -2
  125. package/dist/patterns/calendar/calendar.types.d.ts +29 -1
  126. package/dist/patterns/calendar/index.d.ts +9 -6
  127. package/dist/patterns/calendar/index.js +15 -14
  128. package/dist/tokens.css +10 -2
  129. package/package.json +1 -1
  130. package/dist/_chunks/calendar-workspace-a84AHQwj.js +0 -7506
  131. package/dist/_chunks/notes-panel-CTNpsByN.js +0 -353
  132. package/dist/_chunks/use-signing-session-CyOZWinp.js +0 -147
@@ -1,28 +1,28 @@
1
1
  import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
- import { forwardRef as D, useId as A, useState as F, useMemo as G } from "react";
2
+ import { forwardRef as ie, useId as I, useState as A, useMemo as te } from "react";
3
3
  import { c as P } from "./index-D2ZczOXr.js";
4
- import { useTranslation as J } from "react-i18next";
5
- import { A as Q } from "./avatar-BNQNhoyL.js";
6
- import { B as c } from "./badge-sTusUqZD.js";
7
- import { C as $ } from "./card-DPmk26CL.js";
8
- import { L as X } from "./link-CPb_pZPr.js";
9
- import { T as L } from "./timestamp-BV2lC-wV.js";
10
- import { SafeHtml as Y } from "../safe-html/index.js";
11
- import { i as Z } from "./is-safe-url-DkETxeHz.js";
12
- import { u as T } from "./use-clamp-overflow-DQE2kwZ9.js";
13
- import { u as ee } from "./registry-DvAUVLHh.js";
14
- import { S as ae } from "./scan-line-CNseIHQ0.js";
15
- import { L as se } from "./layers-DcAENmsZ.js";
16
- import { F as y } from "./file-text-5yv6r2ls.js";
17
- import { U as re } from "./user-B12p7bVF.js";
18
- import { c as S } from "./createLucideIcon-DhHxpK9K.js";
4
+ import { useTranslation as ne } from "react-i18next";
5
+ import { A as le } from "./avatar-BNQNhoyL.js";
6
+ import { B as v } from "./badge-sTusUqZD.js";
7
+ import { C as V } from "./card-DPmk26CL.js";
8
+ import { L as de } from "./link-CPb_pZPr.js";
9
+ import { T as D } from "./timestamp-BV2lC-wV.js";
10
+ import { SafeHtml as oe } from "../safe-html/index.js";
11
+ import { i as ce } from "./is-safe-url-DkETxeHz.js";
12
+ import { u as me } from "./use-clamp-overflow-DQE2kwZ9.js";
13
+ import { u as pe } from "./registry-DvAUVLHh.js";
14
+ import { S as ue } from "./scan-line-CNseIHQ0.js";
15
+ import { L as fe } from "./layers-DcAENmsZ.js";
16
+ import { F as O } from "./file-text-5yv6r2ls.js";
17
+ import { U as ve } from "./user-B12p7bVF.js";
18
+ import { c as W } from "./createLucideIcon-DhHxpK9K.js";
19
19
  /**
20
20
  * @license lucide-react v1.22.0 - ISC
21
21
  *
22
22
  * This source code is licensed under the ISC license.
23
23
  * See the LICENSE file in the root directory of this source tree.
24
24
  */
25
- const ie = [
25
+ const ge = [
26
26
  [
27
27
  "path",
28
28
  {
@@ -30,14 +30,14 @@ const ie = [
30
30
  key: "1jaruq"
31
31
  }
32
32
  ]
33
- ], I = S("flag", ie);
33
+ ], U = W("flag", ge);
34
34
  /**
35
35
  * @license lucide-react v1.22.0 - ISC
36
36
  *
37
37
  * This source code is licensed under the ISC license.
38
38
  * See the LICENSE file in the root directory of this source tree.
39
39
  */
40
- const te = [
40
+ const he = [
41
41
  ["path", { d: "M12 17v5", key: "bb1du9" }],
42
42
  [
43
43
  "path",
@@ -46,7 +46,7 @@ const te = [
46
46
  key: "1nkz8b"
47
47
  }
48
48
  ]
49
- ], K = S("pin", te), ne = {
49
+ ], B = W("pin", he), be = {
50
50
  id: "clinical-note-card",
51
51
  capabilities: [],
52
52
  state: {
@@ -54,25 +54,25 @@ const te = [
54
54
  type: "string | undefined",
55
55
  descriptionKey: "ui.agent.clinicalNoteCard.state.noteId",
56
56
  description: "Stable identifier of the rendered note, when supplied.",
57
- read: (s) => s.getNoteId()
57
+ read: (r) => r.getNoteId()
58
58
  },
59
59
  pinned: {
60
60
  type: "boolean",
61
61
  descriptionKey: "ui.agent.clinicalNoteCard.state.pinned",
62
62
  description: "Whether the note is pinned to the top of the timeline.",
63
- read: (s) => s.isPinned()
63
+ read: (r) => r.isPinned()
64
64
  },
65
65
  flagged: {
66
66
  type: "boolean",
67
67
  descriptionKey: "ui.agent.clinicalNoteCard.state.flagged",
68
68
  description: "Whether the note is flagged for follow-up.",
69
- read: (s) => s.isFlagged()
69
+ read: (r) => r.isFlagged()
70
70
  },
71
71
  attachmentKind: {
72
72
  type: "'patient' | 'carePlan' | 'carePlanEntry' | 'phase' | 'xray' | undefined",
73
73
  descriptionKey: "ui.agent.clinicalNoteCard.state.attachmentKind",
74
74
  description: "Structural kind the note is attached to. Never the attachment identity or content.",
75
- read: (s) => s.getAttachmentKind()
75
+ read: (r) => r.getAttachmentKind()
76
76
  }
77
77
  },
78
78
  actions: {},
@@ -88,12 +88,12 @@ const te = [
88
88
  description: "Sourced from the id prop — addresses a specific note."
89
89
  }
90
90
  }
91
- }, le = P("ds:w-full ds:text-[color:var(--foreground)]", {
91
+ }, xe = P("ds:w-full ds:text-[color:var(--foreground)]", {
92
92
  variants: {
93
93
  surface: { flat: "", elevated: "" }
94
94
  },
95
95
  defaultVariants: { surface: "elevated" }
96
- }), de = P(
96
+ }), Ne = P(
97
97
  [
98
98
  "type-body-sm ds:text-[color:var(--foreground)]",
99
99
  "ds:break-words",
@@ -121,7 +121,7 @@ const te = [
121
121
  },
122
122
  defaultVariants: { truncate: !1 }
123
123
  }
124
- ), oe = [
124
+ ), ye = [
125
125
  "ds:relative ds:inline-flex ds:items-center ds:justify-center ds:shrink-0",
126
126
  "ds:size-7 ds:rounded-[var(--radius-sm)]",
127
127
  'ds:before:absolute ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[""] ds:sm:before:hidden',
@@ -131,7 +131,7 @@ const te = [
131
131
  "ds:forced-colors:focus-visible:outline-[CanvasText]",
132
132
  "ds:transition-[color,background-color] ds:duration-[var(--animation-duration)]",
133
133
  "ds:motion-reduce:transition-none"
134
- ].join(" "), ce = [
134
+ ].join(" "), q = [
135
135
  "ds:mt-[var(--spacing-2xs)] ds:inline-flex ds:items-center ds:self-start",
136
136
  "ds:text-[length:var(--font-size-xs)] ds:font-semibold",
137
137
  "ds:underline ds:underline-offset-2 ds:text-[color:var(--primary)] ds:hover:no-underline",
@@ -139,12 +139,15 @@ const te = [
139
139
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
140
140
  "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
141
141
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
142
- ].join(" ");
143
- function M({
144
- icon: s,
142
+ ].join(" "), Ce = P([
143
+ q,
144
+ "ds:[min-block-size:var(--min-target-size)] ds:[min-inline-size:var(--min-target-size)]"
145
+ ]);
146
+ function R({
147
+ icon: r,
145
148
  pressed: i,
146
149
  label: d,
147
- activeClassName: n,
150
+ activeClassName: t,
148
151
  onToggle: u
149
152
  }) {
150
153
  return /* @__PURE__ */ e(
@@ -155,158 +158,137 @@ function M({
155
158
  "aria-label": d,
156
159
  onClick: u,
157
160
  className: [
158
- oe,
159
- i ? n : "ds:text-[color:var(--muted-foreground)] ds:hover:text-[color:var(--foreground)]"
161
+ ye,
162
+ i ? t : "ds:text-[color:var(--muted-foreground)] ds:hover:text-[color:var(--foreground)]"
160
163
  ].join(" "),
161
- children: s
164
+ children: r
162
165
  }
163
166
  );
164
167
  }
165
- function C(s) {
166
- return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
168
+ function $(r) {
169
+ return r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
167
170
  }
168
- function _(s) {
169
- let i = s;
171
+ function L(r) {
172
+ let i = r;
170
173
  return i = i.replace(/`([^`]+)`/g, "<code>$1</code>"), i = i.replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>"), i = i.replace(/\*([^*]+)\*/g, "<em>$1</em>"), i = i.replace(
171
174
  /\[([^\]]+)\]\(([^)\s]+)\)/g,
172
175
  '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'
173
176
  ), i;
174
177
  }
175
- function me(s) {
176
- return s.split(/\n{2,}/).map((d) => {
177
- const n = d.split(`
178
- `), u = n.every((l) => /^\s*[-*]\s+/.test(l)), a = n.every((l) => /^\s*\d+\.\s+/.test(l));
179
- return u && n.length > 0 ? `<ul>${n.map((t) => t.replace(/^\s*[-*]\s+/, "")).map((t) => `<li>${_(C(t))}</li>`).join("")}</ul>` : a && n.length > 0 ? `<ol>${n.map((t) => t.replace(/^\s*\d+\.\s+/, "")).map((t) => `<li>${_(C(t))}</li>`).join("")}</ol>` : `<p>${_(C(d)).replace(
178
+ function _e(r) {
179
+ return r.split(/\n{2,}/).map((d) => {
180
+ const t = d.split(`
181
+ `), u = t.every((a) => /^\s*[-*]\s+/.test(a)), n = t.every((a) => /^\s*\d+\.\s+/.test(a));
182
+ return u && t.length > 0 ? `<ul>${t.map((l) => l.replace(/^\s*[-*]\s+/, "")).map((l) => `<li>${L($(l))}</li>`).join("")}</ul>` : n && t.length > 0 ? `<ol>${t.map((l) => l.replace(/^\s*\d+\.\s+/, "")).map((l) => `<li>${L($(l))}</li>`).join("")}</ol>` : `<p>${L($(d)).replace(
180
183
  /\n/g,
181
184
  "<br />"
182
185
  )}</p>`;
183
186
  }).join("");
184
187
  }
185
- const pe = D(
188
+ const ke = ie(
186
189
  ({
187
- id: s,
190
+ id: r,
188
191
  dateIso: i,
189
192
  createdAtIso: d,
190
- author: n,
191
- clinical: u,
193
+ author: t,
194
+ operatorName: u,
195
+ deleted: n,
196
+ clinical: C,
192
197
  attachedTo: a,
193
- content: g,
194
- contentFormat: l = "markdown",
195
- pinned: t,
196
- flagged: o,
198
+ content: l,
199
+ contentFormat: _ = "markdown",
200
+ pinned: o,
201
+ flagged: c,
197
202
  onTogglePin: h,
198
203
  onToggleFlag: b,
199
204
  truncate: x = !1,
200
- surface: k = "elevated",
201
- "aria-label": E,
202
- className: H,
203
- ...V
204
- }, U) => {
205
- const { t: r } = J(), N = A(), w = A(), [v, B] = F(!1), { ref: R, isOverflowing: W } = T(
206
- x && !v
207
- ), q = x && (W || v), O = G(
208
- () => l === "html" ? g : me(g),
209
- [g, l]
210
- ), z = E ?? r("clinicalNoteCard.regionLabel");
211
- ee(
212
- ne,
205
+ surface: H = "elevated",
206
+ "aria-label": F,
207
+ className: G,
208
+ ...J
209
+ }, Q) => {
210
+ const { t: s } = ne(), k = I(), w = I(), [g, X] = A(!1), [z, K] = A(!1), [Y, Z] = A(!!n);
211
+ Y !== !!n && (Z(!!n), K(!1));
212
+ const N = !!n && !z, { ref: T, isOverflowing: ee } = me(
213
+ x && !g && !N
214
+ ), ae = x && !N && (ee || g), se = te(
215
+ () => _ === "html" ? l : _e(l),
216
+ [l, _]
217
+ ), M = F ?? s("clinicalNoteCard.regionLabel");
218
+ pe(
219
+ be,
213
220
  {
214
- getNoteId: () => s,
215
- isPinned: () => !!t,
216
- isFlagged: () => !!o,
221
+ getNoteId: () => r,
222
+ isPinned: () => !!o,
223
+ isFlagged: () => !!c,
217
224
  getAttachmentKind: () => a == null ? void 0 : a.kind
218
225
  },
219
- s
226
+ r
220
227
  );
228
+ const y = (f, E, re, j) => j && ce(j) ? /* @__PURE__ */ e(de, { href: j, intent: "default", startIcon: E, children: f }) : /* @__PURE__ */ e(v, { variant: re, size: "sm", leading: E, children: f });
221
229
  let m = null;
222
230
  if (a)
223
231
  switch (a.kind) {
224
232
  case "patient":
225
233
  m = /* @__PURE__ */ e(
226
- c,
234
+ v,
227
235
  {
228
236
  variant: "neutral",
229
237
  size: "sm",
230
- leading: /* @__PURE__ */ e(re, { "aria-hidden": "true" }),
231
- children: r("clinicalNoteCard.attachment.patient")
238
+ leading: /* @__PURE__ */ e(ve, { "aria-hidden": "true" }),
239
+ children: s("clinicalNoteCard.attachment.patient")
232
240
  }
233
241
  );
234
242
  break;
235
- case "carePlan": {
236
- const f = r("clinicalNoteCard.attachment.carePlan", {
237
- number: a.number
238
- });
239
- m = a.url && Z(a.url) ? /* @__PURE__ */ e(
240
- X,
241
- {
242
- href: a.url,
243
- intent: "default",
244
- startIcon: /* @__PURE__ */ e(y, { "aria-hidden": "true" }),
245
- children: f
246
- }
247
- ) : /* @__PURE__ */ e(
248
- c,
249
- {
250
- variant: "info",
251
- size: "sm",
252
- leading: /* @__PURE__ */ e(y, { "aria-hidden": "true" }),
253
- children: f
254
- }
243
+ case "carePlan":
244
+ m = y(
245
+ s("clinicalNoteCard.attachment.carePlan", {
246
+ number: a.number
247
+ }),
248
+ /* @__PURE__ */ e(O, { "aria-hidden": "true" }),
249
+ "info",
250
+ a.url
255
251
  );
256
252
  break;
257
- }
258
- case "carePlanEntry": {
259
- const f = a.elements && a.elements.length > 0 ? r("clinicalNoteCard.attachment.carePlanEntryWithElements", {
260
- care: a.careName,
261
- elements: a.elements.join(", ")
262
- }) : r("clinicalNoteCard.attachment.carePlanEntry", {
263
- care: a.careName
264
- });
265
- m = /* @__PURE__ */ e(
266
- c,
267
- {
268
- variant: "info",
269
- size: "sm",
270
- leading: /* @__PURE__ */ e(y, { "aria-hidden": "true" }),
271
- children: f
272
- }
253
+ case "carePlanEntry":
254
+ m = y(
255
+ a.elements && a.elements.length > 0 ? s("clinicalNoteCard.attachment.carePlanEntryWithElements", {
256
+ care: a.careName,
257
+ elements: a.elements.join(", ")
258
+ }) : s("clinicalNoteCard.attachment.carePlanEntry", {
259
+ care: a.careName
260
+ }),
261
+ /* @__PURE__ */ e(O, { "aria-hidden": "true" }),
262
+ "info",
263
+ a.url
273
264
  );
274
265
  break;
275
- }
276
266
  case "phase":
277
- m = /* @__PURE__ */ e(
278
- c,
279
- {
280
- variant: "neutral",
281
- size: "sm",
282
- leading: /* @__PURE__ */ e(se, { "aria-hidden": "true" }),
283
- children: r("clinicalNoteCard.attachment.phase", {
284
- label: a.label
285
- })
286
- }
267
+ m = y(
268
+ s("clinicalNoteCard.attachment.phase", { label: a.label }),
269
+ /* @__PURE__ */ e(fe, { "aria-hidden": "true" }),
270
+ "neutral",
271
+ a.url
287
272
  );
288
273
  break;
289
274
  case "xray":
290
- m = /* @__PURE__ */ e(
291
- c,
292
- {
293
- variant: "neutral",
294
- size: "sm",
295
- leading: /* @__PURE__ */ e(ae, { "aria-hidden": "true" }),
296
- children: a.label ? r("clinicalNoteCard.attachment.xrayWithLabel", {
297
- label: a.label
298
- }) : r("clinicalNoteCard.attachment.xray")
299
- }
275
+ m = y(
276
+ a.label ? s("clinicalNoteCard.attachment.xrayWithLabel", {
277
+ label: a.label
278
+ }) : s("clinicalNoteCard.attachment.xray"),
279
+ /* @__PURE__ */ e(ue, { "aria-hidden": "true" }),
280
+ "neutral",
281
+ a.url
300
282
  );
301
283
  break;
302
284
  }
303
- const j = /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
285
+ const S = /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
304
286
  /* @__PURE__ */ p("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)]", children: [
305
- n ? /* @__PURE__ */ e(
306
- Q,
287
+ t ? /* @__PURE__ */ e(
288
+ le,
307
289
  {
308
- name: n.name,
309
- src: n.avatarUrl,
290
+ name: t.name,
291
+ src: t.avatarUrl,
310
292
  size: "sm",
311
293
  className: "ds:shrink-0",
312
294
  "aria-hidden": "true",
@@ -315,98 +297,112 @@ const pe = D(
315
297
  }
316
298
  ) : null,
317
299
  /* @__PURE__ */ p("div", { className: "ds:flex-1 ds:min-w-0 ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
318
- n ? /* @__PURE__ */ e(
300
+ t ? /* @__PURE__ */ e(
319
301
  "span",
320
302
  {
321
- id: N,
303
+ id: k,
322
304
  className: "type-title-item ds:text-[color:var(--foreground)] ds:truncate",
323
- children: n.name
305
+ children: t.name
324
306
  }
325
- ) : /* @__PURE__ */ e("span", { id: N, className: "ds:sr-only", children: z }),
326
- /* @__PURE__ */ p("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-xs)] ds:gap-y-[var(--spacing-2xs)]", children: [
327
- /* @__PURE__ */ e(L, { value: i, shape: "bare", size: "sm" }),
307
+ ) : /* @__PURE__ */ e("span", { id: k, className: "ds:sr-only", children: M }),
308
+ u ? /* @__PURE__ */ e("span", { className: "type-meta ds:text-[color:var(--muted-foreground)] ds:break-words", children: s("clinicalNoteCard.operator", { name: u }) }) : null,
309
+ /* @__PURE__ */ p("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-xs)] ds:gap-y-[var(--spacing-2xs)] ds:empty:hidden", children: [
310
+ i ? /* @__PURE__ */ e(D, { value: i, shape: "bare", size: "sm" }) : null,
328
311
  d && d !== i ? /* @__PURE__ */ p("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: [
329
- r("clinicalNoteCard.added"),
312
+ s("clinicalNoteCard.added"),
330
313
  " ",
331
- /* @__PURE__ */ e(L, { value: d, shape: "bare", size: "sm" })
314
+ /* @__PURE__ */ e(D, { value: d, shape: "bare", size: "sm" })
332
315
  ] }) : null
333
316
  ] })
334
317
  ] }),
335
- u || h || b || t || o ? /* @__PURE__ */ p("span", { className: "ds:ms-auto ds:flex ds:shrink-0 ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)]", children: [
336
- u ? /* @__PURE__ */ e(c, { variant: "brand", size: "sm", children: r("clinicalNoteCard.clinical") }) : null,
337
- h || b || t || o ? /* @__PURE__ */ p("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
318
+ n || C || h || b || o || c ? /* @__PURE__ */ p("span", { className: "ds:ms-auto ds:flex ds:shrink-0 ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)]", children: [
319
+ n ? /* @__PURE__ */ e(v, { variant: "error", size: "sm", children: s("clinicalNoteCard.deleted") }) : null,
320
+ C ? /* @__PURE__ */ e(v, { variant: "brand", size: "sm", children: s("clinicalNoteCard.clinical") }) : null,
321
+ h || b || o || c ? /* @__PURE__ */ p("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
338
322
  h ? /* @__PURE__ */ e(
339
- M,
323
+ R,
340
324
  {
341
- pressed: !!t,
325
+ pressed: !!o,
342
326
  onToggle: h,
343
- label: r(t ? "clinicalNoteCard.unpin" : "clinicalNoteCard.pin"),
327
+ label: s(o ? "clinicalNoteCard.unpin" : "clinicalNoteCard.pin"),
344
328
  activeClassName: "ds:text-[color:var(--accent)]",
345
329
  icon: /* @__PURE__ */ e(
346
- K,
330
+ B,
347
331
  {
348
332
  "aria-hidden": "true",
349
333
  className: "ds:size-4",
350
- fill: t ? "currentColor" : "none"
334
+ fill: o ? "currentColor" : "none"
351
335
  }
352
336
  )
353
337
  }
354
- ) : t ? /* @__PURE__ */ e(
355
- c,
338
+ ) : o ? /* @__PURE__ */ e(
339
+ v,
356
340
  {
357
341
  variant: "accent",
358
342
  size: "sm",
359
- leading: /* @__PURE__ */ e(K, { "aria-hidden": "true" }),
360
- children: r("clinicalNoteCard.pinned")
343
+ leading: /* @__PURE__ */ e(B, { "aria-hidden": "true" }),
344
+ children: s("clinicalNoteCard.pinned")
361
345
  }
362
346
  ) : null,
363
347
  b ? /* @__PURE__ */ e(
364
- M,
348
+ R,
365
349
  {
366
- pressed: !!o,
350
+ pressed: !!c,
367
351
  onToggle: b,
368
- label: r(o ? "clinicalNoteCard.unflag" : "clinicalNoteCard.flag"),
352
+ label: s(c ? "clinicalNoteCard.unflag" : "clinicalNoteCard.flag"),
369
353
  activeClassName: "ds:text-[color:var(--warning-readable)]",
370
354
  icon: /* @__PURE__ */ e(
371
- I,
355
+ U,
372
356
  {
373
357
  "aria-hidden": "true",
374
358
  className: "ds:size-4",
375
- fill: o ? "currentColor" : "none"
359
+ fill: c ? "currentColor" : "none"
376
360
  }
377
361
  )
378
362
  }
379
- ) : o ? /* @__PURE__ */ e(
380
- c,
363
+ ) : c ? /* @__PURE__ */ e(
364
+ v,
381
365
  {
382
366
  variant: "warning",
383
367
  size: "sm",
384
- leading: /* @__PURE__ */ e(I, { "aria-hidden": "true" }),
385
- children: r("clinicalNoteCard.flagged")
368
+ leading: /* @__PURE__ */ e(U, { "aria-hidden": "true" }),
369
+ children: s("clinicalNoteCard.flagged")
386
370
  }
387
371
  ) : null
388
372
  ] }) : null
389
373
  ] }) : null
390
374
  ] }),
375
+ n ? /* @__PURE__ */ e(
376
+ "button",
377
+ {
378
+ type: "button",
379
+ "aria-expanded": z,
380
+ "aria-controls": w,
381
+ onClick: () => K((f) => !f),
382
+ className: Ce(),
383
+ children: s(z ? "clinicalNoteCard.hideDeleted" : "clinicalNoteCard.showDeleted")
384
+ }
385
+ ) : null,
391
386
  /* @__PURE__ */ e(
392
- Y,
387
+ oe,
393
388
  {
394
- ref: R,
395
- id: x ? w : void 0,
396
- html: O,
397
- profile: l === "html" ? "rich-text" : "markdown",
398
- className: de({ truncate: x && !v })
389
+ ref: T,
390
+ id: x || n ? w : void 0,
391
+ hidden: N,
392
+ html: N ? "" : se,
393
+ profile: _ === "html" ? "rich-text" : "markdown",
394
+ className: Ne({ truncate: x && !g })
399
395
  }
400
396
  ),
401
- q ? /* @__PURE__ */ e(
397
+ ae ? /* @__PURE__ */ e(
402
398
  "button",
403
399
  {
404
400
  type: "button",
405
- "aria-expanded": v,
401
+ "aria-expanded": g,
406
402
  "aria-controls": w,
407
- onClick: () => B((f) => !f),
408
- className: ce,
409
- children: r(v ? "clinicalNoteCard.readLess" : "clinicalNoteCard.readMore")
403
+ onClick: () => X((f) => !f),
404
+ className: q,
405
+ children: s(g ? "clinicalNoteCard.readLess" : "clinicalNoteCard.readMore")
410
406
  }
411
407
  ) : null,
412
408
  m ? /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: m }) : null
@@ -414,26 +410,27 @@ const pe = D(
414
410
  return /* @__PURE__ */ e(
415
411
  "div",
416
412
  {
417
- ref: U,
413
+ ref: Q,
418
414
  role: "article",
419
- "aria-label": z,
420
- "aria-labelledby": N,
415
+ "aria-label": M,
416
+ "aria-labelledby": k,
421
417
  "data-component": "clinical-note-card",
422
- "data-component-id": s,
423
- "data-pinned": t ? "true" : void 0,
424
- "data-flagged": o ? "true" : void 0,
418
+ "data-component-id": r,
419
+ "data-pinned": o ? "true" : void 0,
420
+ "data-flagged": c ? "true" : void 0,
421
+ "data-deleted": n ? "true" : void 0,
425
422
  "data-attached-to": a == null ? void 0 : a.kind,
426
- id: s,
427
- className: le({ surface: k, className: H }),
428
- ...V,
429
- children: k === "elevated" ? /* @__PURE__ */ e($, { variant: "elevated", children: /* @__PURE__ */ e($.Body, { children: j }) }) : j
423
+ id: r,
424
+ className: xe({ surface: H, className: G }),
425
+ ...J,
426
+ children: H === "elevated" ? /* @__PURE__ */ e(V, { variant: "elevated", children: /* @__PURE__ */ e(V.Body, { children: S }) }) : S
430
427
  }
431
428
  );
432
429
  }
433
430
  );
434
- pe.displayName = "ClinicalNoteCard";
431
+ ke.displayName = "ClinicalNoteCard";
435
432
  export {
436
- pe as C,
437
- ne as c
433
+ ke as C,
434
+ be as c
438
435
  };
439
- //# sourceMappingURL=clinical-note-card-BBgFd2nB.js.map
436
+ //# sourceMappingURL=clinical-note-card-yCTR9DB6.js.map