@alfadocs/ui-kit 1.139.0 → 1.141.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 (155) hide show
  1. package/dist/_chunks/{anamnesis-summary-rows-BgfBnjp0.js → anamnesis-summary-rows-YJGs2uWD.js} +2 -2
  2. package/dist/_chunks/{appointment-card-CaxFXtSn.js → appointment-card-r0OZm77v.js} +170 -168
  3. package/dist/_chunks/appointment-timeline-Bs-rTMzi.js +689 -0
  4. package/dist/_chunks/{appointment-tray-DPpeR9JT.js → appointment-tray-t_ltp-Yi.js} +2 -2
  5. package/dist/_chunks/{balance-badge-cell-CRrIv2hy.js → balance-badge-cell-CRStPNDd.js} +2 -2
  6. package/dist/_chunks/{bill-line-table-DCqxhode.js → bill-line-table-DTqXdBED.js} +2 -2
  7. package/dist/_chunks/{bmi-calculator-rri5vvMt.js → bmi-calculator-rq3ZsKp0.js} +2 -2
  8. package/dist/_chunks/{calendar-appointment-editor-dialog-GdnaPIOV.js → calendar-appointment-editor-dialog-CuXpgLCw.js} +5 -5
  9. package/dist/_chunks/{calendar-waiting-list-panel-CkZBAv_E.js → calendar-waiting-list-panel-BNQrUndD.js} +2 -2
  10. package/dist/_chunks/{calendar.sheets-B0jP2Yt0.js → calendar.sheets-DcW8A3DI.js} +3 -3
  11. package/dist/_chunks/calls-panel-CJNQm7r8.js +1446 -0
  12. package/dist/_chunks/{cycle-calculator-WFhMfJHt.js → cycle-calculator-Cb66X2Pf.js} +2 -2
  13. package/dist/_chunks/{data-grid-bQ6iFm10.js → data-grid-CRUSZcVT.js} +2 -2
  14. package/dist/_chunks/{default-tabs-Dm_vk6hd.js → default-tabs-CRbVCDSU.js} +3 -3
  15. package/dist/_chunks/{due-date-calculator-CALlODZe.js → due-date-calculator-Dlqegxx9.js} +2 -2
  16. package/dist/_chunks/{fetal-weight-D0KofJJw.js → fetal-weight-DWj-_ME8.js} +2 -2
  17. package/dist/_chunks/{hcg-doubling-Dhdt3Jyd.js → hcg-doubling-Dqbj6PQj.js} +2 -2
  18. package/dist/_chunks/{invoice-upload-list-Dz3CXHPP.js → invoice-upload-list-BR6vycF7.js} +3 -3
  19. package/dist/_chunks/{kit-extensions-BB_ksnVl.js → kit-extensions-QddOSnIq.js} +6 -6
  20. package/dist/_chunks/{link-cell-renderer-CSA0KKPe.js → link-cell-renderer-hAJplRFF.js} +2 -2
  21. package/dist/_chunks/medication-line-BohqbCYD.js +238 -0
  22. package/dist/_chunks/{notes-panel-CnmQqhwq.js → notes-panel-C4HSUudf.js} +2 -2
  23. package/dist/_chunks/{number-input-DUSvP7Dq.js → number-input-Bi5Yk6PX.js} +135 -133
  24. package/dist/_chunks/{optical-prescription-C4jpDFOE.js → optical-prescription-GzeK_2cf.js} +2 -2
  25. package/dist/_chunks/{patient-account-settings-DfEPHmCh.js → patient-account-settings-nSvNKKOL.js} +2 -2
  26. package/dist/_chunks/{patient-check-in-resume-TWs8CPQr.js → patient-check-in-resume-Cj2wg_NQ.js} +4 -4
  27. package/dist/_chunks/{patient-details-DQTxSWY4.js → patient-details-D0PjzALT.js} +2 -2
  28. package/dist/_chunks/{patient-field-row-CXuWQeQJ.js → patient-field-row-DlpIModg.js} +2 -2
  29. package/dist/_chunks/{patient-summary-card-j5u7c5Us.js → patient-summary-card-BP_K7g_q.js} +2 -2
  30. package/dist/_chunks/{portal-details-VfeOI4PB.js → portal-details-Cnyqf9kY.js} +2 -2
  31. package/dist/_chunks/{portal-documents-hGHlwmbv.js → portal-documents-g109Dl0O.js} +2 -2
  32. package/dist/_chunks/{portal-parts-C99CreYO.js → portal-parts-DgDFuED8.js} +2 -2
  33. package/dist/_chunks/{pregnancy-dating-C-3NLI6K.js → pregnancy-dating-a6WIg4oy.js} +2 -2
  34. package/dist/_chunks/{pregnancy-weight-gain-DkGcEc_l.js → pregnancy-weight-gain-DmrVHk9y.js} +2 -2
  35. package/dist/_chunks/prescription-history-Bp_JHhdF.js +1719 -0
  36. package/dist/_chunks/{print-sheet-CSeqkM3_.js → print-sheet-gaxObGcm.js} +110 -100
  37. package/dist/_chunks/{rich-text-editor-DFsH5RAj.js → rich-text-editor-orJ-hPgm.js} +1323 -1308
  38. package/dist/_chunks/{toolbar-Dz_hAUIZ.js → toolbar-B7UHCMSr.js} +2 -2
  39. package/dist/_chunks/{unit-converter-CBy7S4Tl.js → unit-converter-OBhSDXee.js} +2 -2
  40. package/dist/_chunks/{use-appointment-details-read-CBSpX4DI.js → use-appointment-details-read-DeQnmmZw.js} +2 -2
  41. package/dist/agent-catalog.json +141 -16
  42. package/dist/agent-i18n/en.json +11 -5
  43. package/dist/appointment-editor-panel/index.js +1 -1
  44. package/dist/browser-support.js +1 -1
  45. package/dist/components/appointment-card/appointment-card.d.ts +4 -0
  46. package/dist/components/appointment-card/index.js +2 -2
  47. package/dist/components/appointment-details-panel/index.js +1 -1
  48. package/dist/components/appointment-timeline/appointment-timeline.d.ts +51 -0
  49. package/dist/components/appointment-timeline/index.d.ts +1 -1
  50. package/dist/components/appointment-timeline/index.js +1 -1
  51. package/dist/components/bill-line-table/index.js +1 -1
  52. package/dist/components/bill-table/index.js +1 -1
  53. package/dist/components/bmi-calculator/index.js +1 -1
  54. package/dist/components/calls-panel/calls-panel.d.ts +91 -0
  55. package/dist/components/calls-panel/index.d.ts +1 -1
  56. package/dist/components/calls-panel/index.js +1 -1
  57. package/dist/components/cycle-calculator/index.js +1 -1
  58. package/dist/components/data-grid/index.js +2 -2
  59. package/dist/components/data-table/index.js +1 -1
  60. package/dist/components/due-date-calculator/index.js +1 -1
  61. package/dist/components/fetal-weight/index.js +1 -1
  62. package/dist/components/hcg-doubling/index.js +1 -1
  63. package/dist/components/invoice-upload-list/index.js +1 -1
  64. package/dist/components/medication-line/index.js +1 -1
  65. package/dist/components/medication-line/medication-line.d.ts +6 -0
  66. package/dist/components/notes-panel/index.js +1 -1
  67. package/dist/components/number-input/index.js +1 -1
  68. package/dist/components/optical-prescription/index.js +1 -1
  69. package/dist/components/patient-details/index.js +1 -1
  70. package/dist/components/patient-summary-card/index.js +1 -1
  71. package/dist/components/patient-table/index.js +1 -1
  72. package/dist/components/pregnancy-dating/index.js +1 -1
  73. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  74. package/dist/components/print-sheet/index.js +1 -1
  75. package/dist/components/print-sheet/print-sheet.d.ts +7 -0
  76. package/dist/components/rich-text-editor/index.js +2 -2
  77. package/dist/components/unit-converter/index.js +1 -1
  78. package/dist/core.css +1 -1
  79. package/dist/find-free-slots-panel/index.js +1 -1
  80. package/dist/host-compat.css +18 -1
  81. package/dist/i18n/locales/ar.d.ts +72 -10
  82. package/dist/i18n/locales/ar.js +76 -17
  83. package/dist/i18n/locales/de.d.ts +72 -10
  84. package/dist/i18n/locales/de.js +76 -17
  85. package/dist/i18n/locales/el.d.ts +72 -10
  86. package/dist/i18n/locales/el.js +79 -17
  87. package/dist/i18n/locales/en.d.ts +64 -10
  88. package/dist/i18n/locales/en.js +71 -17
  89. package/dist/i18n/locales/es.d.ts +72 -10
  90. package/dist/i18n/locales/es.js +76 -17
  91. package/dist/i18n/locales/fr.d.ts +72 -10
  92. package/dist/i18n/locales/fr.js +76 -17
  93. package/dist/i18n/locales/hi.d.ts +72 -10
  94. package/dist/i18n/locales/hi.js +79 -17
  95. package/dist/i18n/locales/it.d.ts +72 -10
  96. package/dist/i18n/locales/it.js +76 -17
  97. package/dist/i18n/locales/ja.d.ts +72 -10
  98. package/dist/i18n/locales/ja.js +79 -17
  99. package/dist/i18n/locales/nl.d.ts +72 -10
  100. package/dist/i18n/locales/nl.js +76 -17
  101. package/dist/i18n/locales/pl.d.ts +72 -10
  102. package/dist/i18n/locales/pl.js +79 -17
  103. package/dist/i18n/locales/pt.d.ts +72 -10
  104. package/dist/i18n/locales/pt.js +76 -17
  105. package/dist/i18n/locales/ro.d.ts +72 -10
  106. package/dist/i18n/locales/ro.js +76 -17
  107. package/dist/i18n/locales/ru.d.ts +72 -10
  108. package/dist/i18n/locales/ru.js +76 -17
  109. package/dist/i18n/locales/sq.d.ts +72 -10
  110. package/dist/i18n/locales/sq.js +79 -17
  111. package/dist/i18n/locales/sv.d.ts +72 -10
  112. package/dist/i18n/locales/sv.js +76 -17
  113. package/dist/i18n/locales/tr.d.ts +72 -10
  114. package/dist/i18n/locales/tr.js +76 -17
  115. package/dist/i18n/locales/zh.d.ts +72 -10
  116. package/dist/i18n/locales/zh.js +76 -17
  117. package/dist/index.js +37 -37
  118. package/dist/locales/ar.json +79 -17
  119. package/dist/locales/de.json +79 -17
  120. package/dist/locales/el.json +79 -17
  121. package/dist/locales/en.json +71 -17
  122. package/dist/locales/es.json +79 -17
  123. package/dist/locales/fr.json +79 -17
  124. package/dist/locales/hi.json +79 -17
  125. package/dist/locales/it.json +79 -17
  126. package/dist/locales/ja.json +79 -17
  127. package/dist/locales/nl.json +79 -17
  128. package/dist/locales/pl.json +79 -17
  129. package/dist/locales/pt.json +79 -17
  130. package/dist/locales/ro.json +79 -17
  131. package/dist/locales/ru.json +79 -17
  132. package/dist/locales/sq.json +79 -17
  133. package/dist/locales/sv.json +79 -17
  134. package/dist/locales/tr.json +79 -17
  135. package/dist/locales/zh.json +79 -17
  136. package/dist/online-bookings-panel/index.js +1 -1
  137. package/dist/patterns/anamnesis/index.js +1 -1
  138. package/dist/patterns/calendar/index.js +2 -2
  139. package/dist/patterns/patient-account-settings/index.js +1 -1
  140. package/dist/patterns/patient-check-in/index.js +1 -1
  141. package/dist/patterns/patient-portal/index.js +2 -2
  142. package/dist/patterns/prescription/index.d.ts +1 -1
  143. package/dist/patterns/prescription/index.js +1 -1
  144. package/dist/patterns/prescription/prescription-composer-item.d.ts +8 -1
  145. package/dist/patterns/prescription/prescription-composer.d.ts +14 -9
  146. package/dist/patterns/prescription/prescription-sheet.d.ts +23 -4
  147. package/dist/patterns/prescription/prescription-types.d.ts +35 -10
  148. package/dist/patterns/prescription/prescription-validation.d.ts +17 -11
  149. package/dist/tokens.css +1 -1
  150. package/dist/waiting-list-panel/index.js +2 -2
  151. package/package.json +1 -1
  152. package/dist/_chunks/appointment-timeline-BEwgbYyG.js +0 -455
  153. package/dist/_chunks/calls-panel-CtxJAzkJ.js +0 -1094
  154. package/dist/_chunks/medication-line-CHdlh-F7.js +0 -222
  155. package/dist/_chunks/prescription-history-748qDVwZ.js +0 -1544
@@ -1,222 +0,0 @@
1
- import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as I, useContext as L, useRef as v, useCallback as B, useMemo as q, useImperativeHandle as G, createContext as k } from "react";
3
- import { c as a } from "./index-D2ZczOXr.js";
4
- import { useTranslation as J } from "react-i18next";
5
- import { I as Q } from "./icon-button-S8_weU3g.js";
6
- import { u as U } from "./registry-DvAUVLHh.js";
7
- import { f as W, m as X, M as Y } from "./medication-I6QvOq6k.js";
8
- import { T as Z } from "./trash-2-uumy3fy1.js";
9
- const $ = {
10
- id: "medication-line",
11
- // Closed set (§4): `dismiss` is "hide or acknowledge with no commitment";
12
- // removing a line changes the list, so it is `edit_inline`, as field-array
13
- // declares for its `remove`.
14
- capabilities: ["edit_inline"],
15
- state: {
16
- value: {
17
- type: "string",
18
- descriptionKey: "ui.agent.medicationLine.state.value",
19
- description: "The catalogue id of the medication on this line. An id only, never a name.",
20
- read: (e) => e.getMedicationId()
21
- }
22
- },
23
- actions: {
24
- remove: {
25
- // §3: `destructive`. Taking a medication off a prescription or therapy
26
- // list has no undo in this UI (the host owns the list), so it is "hard
27
- // to reverse via the same UI", the same class field-array and
28
- // suggestion-chip give removal. It is not `phi`: the line holds a
29
- // catalogue id, not patient identity.
30
- safety: "destructive",
31
- idempotent: !0,
32
- descriptionKey: "ui.agent.medicationLine.actions.remove",
33
- description: "Remove this medication from the list. Does nothing on a read-only line.",
34
- invoke: (e) => {
35
- e.remove();
36
- }
37
- }
38
- },
39
- domHooks: {
40
- root: {
41
- attr: "data-component",
42
- value: "medication-line",
43
- description: "Marks one medication line. The remove button is present only on the removable variant."
44
- },
45
- instanceId: {
46
- attr: "data-component-id",
47
- sourceProp: "id",
48
- description: "Sourced from the id prop, when provided."
49
- },
50
- item: {
51
- attr: "data-medication-id",
52
- description: "The root also emits the catalogue id of the medication. An id only, never a name."
53
- }
54
- }
55
- }, ee = a(
56
- [
57
- "ds:flex ds:items-start ds:justify-between",
58
- "ds:text-foreground ds:break-inside-avoid",
59
- "ds:m-0 ds:list-none"
60
- ].join(" "),
61
- {
62
- variants: {
63
- density: {
64
- default: "ds:gap-[var(--spacing-md)] ds:py-[var(--spacing-sm)]",
65
- compact: "ds:gap-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]"
66
- }
67
- },
68
- defaultVariants: { density: "default" }
69
- }
70
- ), te = a("ds:flex ds:flex-col ds:flex-1 ds:min-w-0", {
71
- variants: {
72
- density: {
73
- default: "ds:gap-[var(--spacing-xs)]",
74
- compact: "ds:gap-0"
75
- }
76
- },
77
- defaultVariants: { density: "default" }
78
- }), ie = a(
79
- "ds:m-0 ds:[overflow-wrap:anywhere] ds:text-foreground",
80
- {
81
- variants: {
82
- density: {
83
- default: "type-title-item",
84
- compact: "type-label"
85
- }
86
- },
87
- defaultVariants: { density: "default" }
88
- }
89
- ), ae = a(
90
- "ds:m-0 ds:[overflow-wrap:anywhere] ds:text-muted-foreground",
91
- {
92
- variants: {
93
- density: {
94
- default: "type-body-sm",
95
- compact: "type-meta"
96
- }
97
- },
98
- defaultVariants: { density: "default" }
99
- }
100
- ), N = a(
101
- "ds:flex ds:flex-wrap ds:items-baseline ds:gap-x-[var(--spacing-xs)]"
102
- ), V = a("ds:shrink-0 ds:text-muted-foreground", {
103
- variants: {
104
- density: { default: "type-label", compact: "type-meta" }
105
- },
106
- defaultVariants: { density: "default" }
107
- }), M = a(
108
- "ds:m-0 ds:min-w-0 ds:[overflow-wrap:anywhere] ds:text-foreground",
109
- {
110
- variants: {
111
- density: { default: "type-body", compact: "type-body-sm" }
112
- },
113
- defaultVariants: { density: "default" }
114
- }
115
- ), ne = a(
116
- [
117
- "ds:m-0 ds:p-0 ds:list-none",
118
- "ds:divide-y ds:divide-[color:var(--border)]"
119
- ].join(" ")
120
- ), A = k("default"), C = k(!1);
121
- function T(e) {
122
- return e !== void 0 && e.trim() !== "";
123
- }
124
- const se = I(
125
- ({
126
- medication: e,
127
- dosage: r,
128
- notes: d,
129
- codeLabel: c,
130
- showDetail: l = !0,
131
- density: R,
132
- as: j,
133
- onRemove: m,
134
- removeLabel: P,
135
- disabled: u = !1,
136
- id: y,
137
- className: D,
138
- ...S
139
- }, _) => {
140
- const { t: n } = J("ui"), z = L(A), i = R ?? z, E = L(C), F = j ?? (E ? "li" : "div"), h = W(e), H = T(e.code) ? n("medicationSearch.code", {
141
- label: c ?? n("medicationSearch.codeFallbackLabel"),
142
- code: e.code.trim()
143
- }) : void 0, g = X(
144
- { ...e, strength: void 0, form: void 0 },
145
- H
146
- ).join(Y), K = m !== void 0, o = v(m);
147
- o.current = m;
148
- const x = v(u);
149
- x.current = u;
150
- const b = v(e.id);
151
- b.current = e.id;
152
- const p = B(() => {
153
- var w;
154
- x.current || (w = o.current) == null || w.call(o);
155
- }, []), f = q(
156
- () => ({
157
- getMedicationId: () => b.current,
158
- remove: p
159
- }),
160
- [p]
161
- );
162
- G(_, () => f, [f]), U($, f, y);
163
- const O = P ?? n("medicationLine.remove", { name: h });
164
- return /* @__PURE__ */ s(
165
- F,
166
- {
167
- ...S,
168
- className: ee({ density: i, className: D }),
169
- "data-component": "medication-line",
170
- "data-component-id": y,
171
- "data-medication-id": e.id,
172
- children: [
173
- /* @__PURE__ */ s("div", { className: te({ density: i }), children: [
174
- /* @__PURE__ */ t("p", { dir: "auto", className: ie({ density: i }), children: h }),
175
- l && g !== "" ? /* @__PURE__ */ t("p", { dir: "auto", className: ae({ density: i }), children: g }) : null,
176
- /* @__PURE__ */ s("dl", { className: "ds:m-0 ds:flex ds:flex-col", children: [
177
- /* @__PURE__ */ s("div", { className: N(), children: [
178
- /* @__PURE__ */ t("dt", { className: V({ density: i }), children: n("medicationLine.dosage") }),
179
- /* @__PURE__ */ t("dd", { dir: "auto", className: M({ density: i }), children: r })
180
- ] }),
181
- T(d) ? /* @__PURE__ */ s("div", { className: N(), children: [
182
- /* @__PURE__ */ t("dt", { className: V({ density: i }), children: n("medicationLine.notes") }),
183
- /* @__PURE__ */ t("dd", { dir: "auto", className: M({ density: i }), children: d })
184
- ] }) : null
185
- ] })
186
- ] }),
187
- K ? /* @__PURE__ */ t(
188
- Q,
189
- {
190
- type: "button",
191
- intent: "ghost",
192
- icon: /* @__PURE__ */ t(Z, { "aria-hidden": "true" }),
193
- "aria-label": O,
194
- disabled: u,
195
- onClick: p,
196
- className: "ds:shrink-0 ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)] ds:print:hidden"
197
- }
198
- ) : null
199
- ]
200
- }
201
- );
202
- }
203
- );
204
- se.displayName = "MedicationLine";
205
- const de = I(({ density: e = "default", className: r, children: d, ...c }, l) => /* @__PURE__ */ t(A.Provider, { value: e, children: /* @__PURE__ */ t(C.Provider, { value: !0, children: /* @__PURE__ */ t(
206
- "ul",
207
- {
208
- ref: l,
209
- role: "list",
210
- ...c,
211
- className: ne({ className: r }),
212
- "data-component": "medication-line-list",
213
- children: d
214
- }
215
- ) }) }));
216
- de.displayName = "MedicationLineList";
217
- export {
218
- se as M,
219
- de as a,
220
- $ as m
221
- };
222
- //# sourceMappingURL=medication-line-CHdlh-F7.js.map