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