@alfadocs/ui-kit 1.139.0 → 1.140.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 (130) hide show
  1. package/dist/_chunks/{anamnesis-summary-rows-BgfBnjp0.js → anamnesis-summary-rows-YJGs2uWD.js} +2 -2
  2. package/dist/_chunks/{balance-badge-cell-CRrIv2hy.js → balance-badge-cell-CRStPNDd.js} +2 -2
  3. package/dist/_chunks/{bill-line-table-DCqxhode.js → bill-line-table-DTqXdBED.js} +2 -2
  4. package/dist/_chunks/{bmi-calculator-rri5vvMt.js → bmi-calculator-rq3ZsKp0.js} +2 -2
  5. package/dist/_chunks/{calendar-appointment-editor-dialog-GdnaPIOV.js → calendar-appointment-editor-dialog-BBrJlmyd.js} +4 -4
  6. package/dist/_chunks/{calendar-waiting-list-panel-CkZBAv_E.js → calendar-waiting-list-panel-Cdg9YssA.js} +2 -2
  7. package/dist/_chunks/{calendar.sheets-B0jP2Yt0.js → calendar.sheets-DbMOO7YV.js} +2 -2
  8. package/dist/_chunks/{cycle-calculator-WFhMfJHt.js → cycle-calculator-Cb66X2Pf.js} +2 -2
  9. package/dist/_chunks/{data-grid-bQ6iFm10.js → data-grid-CRUSZcVT.js} +2 -2
  10. package/dist/_chunks/{default-tabs-Dm_vk6hd.js → default-tabs-CRbVCDSU.js} +3 -3
  11. package/dist/_chunks/{due-date-calculator-CALlODZe.js → due-date-calculator-Dlqegxx9.js} +2 -2
  12. package/dist/_chunks/{fetal-weight-D0KofJJw.js → fetal-weight-DWj-_ME8.js} +2 -2
  13. package/dist/_chunks/{hcg-doubling-Dhdt3Jyd.js → hcg-doubling-Dqbj6PQj.js} +2 -2
  14. package/dist/_chunks/{invoice-upload-list-Dz3CXHPP.js → invoice-upload-list-BR6vycF7.js} +3 -3
  15. package/dist/_chunks/{kit-extensions-BB_ksnVl.js → kit-extensions-QddOSnIq.js} +6 -6
  16. package/dist/_chunks/{link-cell-renderer-CSA0KKPe.js → link-cell-renderer-hAJplRFF.js} +2 -2
  17. package/dist/_chunks/medication-line-BohqbCYD.js +238 -0
  18. package/dist/_chunks/{number-input-DUSvP7Dq.js → number-input-Bi5Yk6PX.js} +135 -133
  19. package/dist/_chunks/{optical-prescription-C4jpDFOE.js → optical-prescription-GzeK_2cf.js} +2 -2
  20. package/dist/_chunks/{patient-details-DQTxSWY4.js → patient-details-D0PjzALT.js} +2 -2
  21. package/dist/_chunks/{patient-field-row-CXuWQeQJ.js → patient-field-row-DlpIModg.js} +2 -2
  22. package/dist/_chunks/{patient-summary-card-j5u7c5Us.js → patient-summary-card-BP_K7g_q.js} +2 -2
  23. package/dist/_chunks/{pregnancy-dating-C-3NLI6K.js → pregnancy-dating-a6WIg4oy.js} +2 -2
  24. package/dist/_chunks/{pregnancy-weight-gain-DkGcEc_l.js → pregnancy-weight-gain-DmrVHk9y.js} +2 -2
  25. package/dist/_chunks/prescription-history-Bp_JHhdF.js +1719 -0
  26. package/dist/_chunks/{print-sheet-CSeqkM3_.js → print-sheet-gaxObGcm.js} +110 -100
  27. package/dist/_chunks/{toolbar-Dz_hAUIZ.js → toolbar-B7UHCMSr.js} +2 -2
  28. package/dist/_chunks/{unit-converter-CBy7S4Tl.js → unit-converter-OBhSDXee.js} +2 -2
  29. package/dist/_chunks/{use-appointment-details-read-CBSpX4DI.js → use-appointment-details-read-DeQnmmZw.js} +2 -2
  30. package/dist/agent-catalog.json +8 -14
  31. package/dist/agent-i18n/en.json +3 -3
  32. package/dist/appointment-editor-panel/index.js +1 -1
  33. package/dist/browser-support.js +1 -1
  34. package/dist/components/appointment-details-panel/index.js +1 -1
  35. package/dist/components/bill-line-table/index.js +1 -1
  36. package/dist/components/bill-table/index.js +1 -1
  37. package/dist/components/bmi-calculator/index.js +1 -1
  38. package/dist/components/cycle-calculator/index.js +1 -1
  39. package/dist/components/data-grid/index.js +2 -2
  40. package/dist/components/data-table/index.js +1 -1
  41. package/dist/components/due-date-calculator/index.js +1 -1
  42. package/dist/components/fetal-weight/index.js +1 -1
  43. package/dist/components/hcg-doubling/index.js +1 -1
  44. package/dist/components/invoice-upload-list/index.js +1 -1
  45. package/dist/components/medication-line/index.js +1 -1
  46. package/dist/components/medication-line/medication-line.d.ts +6 -0
  47. package/dist/components/number-input/index.js +1 -1
  48. package/dist/components/optical-prescription/index.js +1 -1
  49. package/dist/components/patient-details/index.js +1 -1
  50. package/dist/components/patient-summary-card/index.js +1 -1
  51. package/dist/components/patient-table/index.js +1 -1
  52. package/dist/components/pregnancy-dating/index.js +1 -1
  53. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  54. package/dist/components/print-sheet/index.js +1 -1
  55. package/dist/components/print-sheet/print-sheet.d.ts +7 -0
  56. package/dist/components/rich-text-editor/index.js +1 -1
  57. package/dist/components/unit-converter/index.js +1 -1
  58. package/dist/core.css +1 -1
  59. package/dist/find-free-slots-panel/index.js +1 -1
  60. package/dist/host-compat.css +6 -1
  61. package/dist/i18n/locales/ar.d.ts +27 -10
  62. package/dist/i18n/locales/ar.js +32 -15
  63. package/dist/i18n/locales/de.d.ts +27 -10
  64. package/dist/i18n/locales/de.js +32 -15
  65. package/dist/i18n/locales/el.d.ts +27 -10
  66. package/dist/i18n/locales/el.js +32 -15
  67. package/dist/i18n/locales/en.d.ts +27 -10
  68. package/dist/i18n/locales/en.js +32 -15
  69. package/dist/i18n/locales/es.d.ts +27 -10
  70. package/dist/i18n/locales/es.js +32 -15
  71. package/dist/i18n/locales/fr.d.ts +27 -10
  72. package/dist/i18n/locales/fr.js +32 -15
  73. package/dist/i18n/locales/hi.d.ts +27 -10
  74. package/dist/i18n/locales/hi.js +32 -15
  75. package/dist/i18n/locales/it.d.ts +27 -10
  76. package/dist/i18n/locales/it.js +32 -15
  77. package/dist/i18n/locales/ja.d.ts +27 -10
  78. package/dist/i18n/locales/ja.js +32 -15
  79. package/dist/i18n/locales/nl.d.ts +27 -10
  80. package/dist/i18n/locales/nl.js +32 -15
  81. package/dist/i18n/locales/pl.d.ts +27 -10
  82. package/dist/i18n/locales/pl.js +32 -15
  83. package/dist/i18n/locales/pt.d.ts +27 -10
  84. package/dist/i18n/locales/pt.js +32 -15
  85. package/dist/i18n/locales/ro.d.ts +27 -10
  86. package/dist/i18n/locales/ro.js +32 -15
  87. package/dist/i18n/locales/ru.d.ts +27 -10
  88. package/dist/i18n/locales/ru.js +32 -15
  89. package/dist/i18n/locales/sq.d.ts +27 -10
  90. package/dist/i18n/locales/sq.js +32 -15
  91. package/dist/i18n/locales/sv.d.ts +27 -10
  92. package/dist/i18n/locales/sv.js +32 -15
  93. package/dist/i18n/locales/tr.d.ts +27 -10
  94. package/dist/i18n/locales/tr.js +32 -15
  95. package/dist/i18n/locales/zh.d.ts +27 -10
  96. package/dist/i18n/locales/zh.js +32 -15
  97. package/dist/index.js +27 -27
  98. package/dist/locales/ar.json +32 -15
  99. package/dist/locales/de.json +32 -15
  100. package/dist/locales/el.json +32 -15
  101. package/dist/locales/en.json +32 -15
  102. package/dist/locales/es.json +32 -15
  103. package/dist/locales/fr.json +32 -15
  104. package/dist/locales/hi.json +32 -15
  105. package/dist/locales/it.json +32 -15
  106. package/dist/locales/ja.json +32 -15
  107. package/dist/locales/nl.json +32 -15
  108. package/dist/locales/pl.json +32 -15
  109. package/dist/locales/pt.json +32 -15
  110. package/dist/locales/ro.json +32 -15
  111. package/dist/locales/ru.json +32 -15
  112. package/dist/locales/sq.json +32 -15
  113. package/dist/locales/sv.json +32 -15
  114. package/dist/locales/tr.json +32 -15
  115. package/dist/locales/zh.json +32 -15
  116. package/dist/online-bookings-panel/index.js +1 -1
  117. package/dist/patterns/anamnesis/index.js +1 -1
  118. package/dist/patterns/calendar/index.js +2 -2
  119. package/dist/patterns/prescription/index.d.ts +1 -1
  120. package/dist/patterns/prescription/index.js +1 -1
  121. package/dist/patterns/prescription/prescription-composer-item.d.ts +8 -1
  122. package/dist/patterns/prescription/prescription-composer.d.ts +14 -9
  123. package/dist/patterns/prescription/prescription-sheet.d.ts +23 -4
  124. package/dist/patterns/prescription/prescription-types.d.ts +35 -10
  125. package/dist/patterns/prescription/prescription-validation.d.ts +17 -11
  126. package/dist/tokens.css +1 -1
  127. package/dist/waiting-list-panel/index.js +2 -2
  128. package/package.json +1 -1
  129. package/dist/_chunks/medication-line-CHdlh-F7.js +0 -222
  130. package/dist/_chunks/prescription-history-748qDVwZ.js +0 -1544
@@ -4,8 +4,8 @@ import { useTranslation as K } from "react-i18next";
4
4
  import { d as s, b as L } from "../_chunks/toast-DQ1Zu1kk.js";
5
5
  import { a as M } from "../_chunks/tooltip-uEBdD1-5.js";
6
6
  import { C as Q } from "../_chunks/calendar-editor-guard-9fShhNIA.js";
7
- import { S as V } from "../_chunks/calendar.sheets-B0jP2Yt0.js";
8
- import { W as X } from "../_chunks/calendar-waiting-list-panel-CkZBAv_E.js";
7
+ import { S as V } from "../_chunks/calendar.sheets-DbMOO7YV.js";
8
+ import { W as X } from "../_chunks/calendar-waiting-list-panel-Cdg9YssA.js";
9
9
  import { P as Y } from "../_chunks/privacy-mask-C2ZLKrMh.js";
10
10
  import { H as Z } from "../_chunks/hourglass-BEAzW1wE.js";
11
11
  const q = { open: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "1.139.0",
3
+ "version": "1.140.0",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",
@@ -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