@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
@@ -5,7 +5,7 @@ import { useTranslation as z } from "react-i18next";
5
5
  import { u as B } from "./registry-DvAUVLHh.js";
6
6
  import { F as S } from "./form-field-CyHfOVKF.js";
7
7
  import { D as Y } from "./date-picker-BmVBVpVu.js";
8
- import { N as H } from "./number-input-DUSvP7Dq.js";
8
+ import { N as H } from "./number-input-Bi5Yk6PX.js";
9
9
  import { C as M } from "./card-n6W6LW-N.js";
10
10
  import { B as T } from "./badge-BUk4RjTS.js";
11
11
  import { I as U } from "./insert-result-CDMMt7q8.js";
@@ -423,4 +423,4 @@ export {
423
423
  ie as L,
424
424
  se as p
425
425
  };
426
- //# sourceMappingURL=cycle-calculator-WFhMfJHt.js.map
426
+ //# sourceMappingURL=cycle-calculator-Cb66X2Pf.js.map
@@ -17,7 +17,7 @@ import { j as no, k as ga, b as ma, l as pa, o as ha, p as wa, m as ba, c as Bn,
17
17
  import { c as Y } from "./index-D2ZczOXr.js";
18
18
  import { a as cs } from "./compact-editor-fields-cP6yh7xv.js";
19
19
  import { F as _a } from "./form-field-context-DtiROUJV.js";
20
- import { N as us } from "./number-input-DUSvP7Dq.js";
20
+ import { N as us } from "./number-input-Bi5Yk6PX.js";
21
21
  import { S as br } from "./select-Bm8s3q-X.js";
22
22
  import { T as xa } from "./text-input-B6iAgCr3.js";
23
23
  import { a as ds, b as gi } from "./accessible-target-D3j6F-AG.js";
@@ -9867,4 +9867,4 @@ export {
9867
9867
  Rm as f,
9868
9868
  xh as g
9869
9869
  };
9870
- //# sourceMappingURL=data-grid-bQ6iFm10.js.map
9870
+ //# sourceMappingURL=data-grid-CRUSZcVT.js.map
@@ -2,8 +2,8 @@ import { jsxs as T, jsx as l, Fragment as ne } from "react/jsx-runtime";
2
2
  import { useId as Pe, useMemo as M, createElement as mt, forwardRef as ft, useRef as K, useState as yt, useImperativeHandle as ht, useCallback as gt } from "react";
3
3
  import { useTranslation as v } from "react-i18next";
4
4
  import { u as Tt } from "./registry-DvAUVLHh.js";
5
- import { D as St, e as vt } from "./data-grid-bQ6iFm10.js";
6
- import { D as N } from "./toolbar-Dz_hAUIZ.js";
5
+ import { D as St, e as vt } from "./data-grid-CRUSZcVT.js";
6
+ import { D as N } from "./toolbar-B7UHCMSr.js";
7
7
  import { I as wt } from "./icon-button-group-SmkdVCNx.js";
8
8
  import { c as w } from "./index-D2ZczOXr.js";
9
9
  import { b as It, a as kt } from "./accessible-target-D3j6F-AG.js";
@@ -2211,4 +2211,4 @@ export {
2211
2211
  ii as m,
2212
2212
  Ka as u
2213
2213
  };
2214
- //# sourceMappingURL=default-tabs-Dm_vk6hd.js.map
2214
+ //# sourceMappingURL=default-tabs-CRbVCDSU.js.map
@@ -7,7 +7,7 @@ import { R as C } from "./radio-BZQs6_36.js";
7
7
  import { R as z } from "./radio-group-ChIKyeSJ.js";
8
8
  import { F as w } from "./form-field-CyHfOVKF.js";
9
9
  import { D as T } from "./date-picker-BmVBVpVu.js";
10
- import { N as Y } from "./number-input-DUSvP7Dq.js";
10
+ import { N as Y } from "./number-input-Bi5Yk6PX.js";
11
11
  import { C as U } from "./card-n6W6LW-N.js";
12
12
  import { B as W } from "./badge-BUk4RjTS.js";
13
13
  import { I as ce } from "./insert-result-CDMMt7q8.js";
@@ -568,4 +568,4 @@ Ae.displayName = "DueDateCalculator";
568
568
  export {
569
569
  Ae as D
570
570
  };
571
- //# sourceMappingURL=due-date-calculator-CALlODZe.js.map
571
+ //# sourceMappingURL=due-date-calculator-Dlqegxx9.js.map
@@ -4,7 +4,7 @@ import { c as P } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as V } from "react-i18next";
5
5
  import { u as _ } from "./registry-DvAUVLHh.js";
6
6
  import { F as D } from "./form-field-CyHfOVKF.js";
7
- import { N as q } from "./number-input-DUSvP7Dq.js";
7
+ import { N as q } from "./number-input-Bi5Yk6PX.js";
8
8
  import { C } from "./card-n6W6LW-N.js";
9
9
  import { B as z } from "./badge-BUk4RjTS.js";
10
10
  import { I as G } from "./insert-result-CDMMt7q8.js";
@@ -220,4 +220,4 @@ export {
220
220
  Y as F,
221
221
  Q as e
222
222
  };
223
- //# sourceMappingURL=fetal-weight-D0KofJJw.js.map
223
+ //# sourceMappingURL=fetal-weight-DWj-_ME8.js.map
@@ -4,7 +4,7 @@ import { c as q } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as J } from "react-i18next";
5
5
  import { u as Q } from "./registry-DvAUVLHh.js";
6
6
  import { F as S } from "./form-field-CyHfOVKF.js";
7
- import { N as P } from "./number-input-DUSvP7Dq.js";
7
+ import { N as P } from "./number-input-Bi5Yk6PX.js";
8
8
  import { D as G } from "./date-time-picker-C6b_Vymc.js";
9
9
  import { C as B } from "./card-n6W6LW-N.js";
10
10
  import { B as X } from "./badge-BUk4RjTS.js";
@@ -310,4 +310,4 @@ export {
310
310
  re as M,
311
311
  oe as a
312
312
  };
313
- //# sourceMappingURL=hcg-doubling-Dhdt3Jyd.js.map
313
+ //# sourceMappingURL=hcg-doubling-Dqbj6PQj.js.map
@@ -4,8 +4,8 @@ import { useTranslation as L } from "react-i18next";
4
4
  import { u as Ve } from "./registry-DvAUVLHh.js";
5
5
  import { B as Be } from "./button-DohK_Ak_.js";
6
6
  import { V as x } from "./visually-hidden-BHxEUGyT.js";
7
- import { e as Me } from "./data-grid-bQ6iFm10.js";
8
- import { D as g } from "./toolbar-Dz_hAUIZ.js";
7
+ import { e as Me } from "./data-grid-CRUSZcVT.js";
8
+ import { D as g } from "./toolbar-B7UHCMSr.js";
9
9
  import { a as se } from "./format-number-DdzqwMs1.js";
10
10
  import { c as v } from "./index-D2ZczOXr.js";
11
11
  import { R as Fe } from "./row-actions-BF2-uizV.js";
@@ -951,4 +951,4 @@ export {
951
951
  kt as d,
952
952
  et as i
953
953
  };
954
- //# sourceMappingURL=invoice-upload-list-Dz3CXHPP.js.map
954
+ //# sourceMappingURL=invoice-upload-list-BR6vycF7.js.map
@@ -1,10 +1,10 @@
1
1
  import { createElement as e } from "react";
2
- import { B as i } from "./bmi-calculator-rri5vvMt.js";
3
- import { P as o } from "./pregnancy-dating-C-3NLI6K.js";
4
- import { P as r } from "./pregnancy-weight-gain-DkGcEc_l.js";
2
+ import { B as i } from "./bmi-calculator-rq3ZsKp0.js";
3
+ import { P as o } from "./pregnancy-dating-a6WIg4oy.js";
4
+ import { P as r } from "./pregnancy-weight-gain-DmrVHk9y.js";
5
5
  import { G as c } from "./gestational-age-calculator-DXSPWG8u.js";
6
- import { C as s } from "./cycle-calculator-WFhMfJHt.js";
7
- import { F as d } from "./fetal-weight-D0KofJJw.js";
6
+ import { C as s } from "./cycle-calculator-Cb66X2Pf.js";
7
+ import { F as d } from "./fetal-weight-DWj-_ME8.js";
8
8
  import { c as n } from "./createLucideIcon-DhHxpK9K.js";
9
9
  import { B as a } from "./baby-Dku-Xvg9.js";
10
10
  import { H as l } from "./heart--qCA4ffe.js";
@@ -116,4 +116,4 @@ const h = [
116
116
  export {
117
117
  w as k
118
118
  };
119
- //# sourceMappingURL=kit-extensions-BB_ksnVl.js.map
119
+ //# sourceMappingURL=kit-extensions-QddOSnIq.js.map
@@ -10,7 +10,7 @@ import { B as j } from "./button-DohK_Ak_.js";
10
10
  import { M as fe } from "./multi-select-DeMiHm8T.js";
11
11
  import { S as me } from "./scroll-area-CY5SLYNw.js";
12
12
  import { A as ne } from "./autocomplete-HZNW7_Pa.js";
13
- import { N as E } from "./number-input-DUSvP7Dq.js";
13
+ import { N as E } from "./number-input-Bi5Yk6PX.js";
14
14
  import { S as pe } from "./select-Bm8s3q-X.js";
15
15
  import { B as he } from "./badge-BUk4RjTS.js";
16
16
  import { A as H } from "./avatar-Dp5apm1d.js";
@@ -797,4 +797,4 @@ export {
797
797
  Ce as f,
798
798
  Xe as g
799
799
  };
800
- //# sourceMappingURL=link-cell-renderer-CSA0KKPe.js.map
800
+ //# sourceMappingURL=link-cell-renderer-hAJplRFF.js.map
@@ -0,0 +1,238 @@
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as I, useContext as T, useRef as g, useCallback as U, useMemo as W, useImperativeHandle as X, createContext as k } from "react";
3
+ import { c as n } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as Y } from "react-i18next";
5
+ import { B as Z } from "./badge-BUk4RjTS.js";
6
+ import { I as $ } from "./icon-button-S8_weU3g.js";
7
+ import { u as q } from "./registry-DvAUVLHh.js";
8
+ import { n as ee } from "./intl-locale-FWh-Y5_3.js";
9
+ import { f as te, m as ae, M as ie } from "./medication-I6QvOq6k.js";
10
+ import { T as ne } from "./trash-2-uumy3fy1.js";
11
+ const se = {
12
+ id: "medication-line",
13
+ // Closed set (§4): `dismiss` is "hide or acknowledge with no commitment";
14
+ // removing a line changes the list, so it is `edit_inline`, as field-array
15
+ // declares for its `remove`.
16
+ capabilities: ["edit_inline"],
17
+ state: {
18
+ value: {
19
+ type: "string",
20
+ descriptionKey: "ui.agent.medicationLine.state.value",
21
+ description: "The catalogue id of the medication on this line. An id only, never a name.",
22
+ read: (t) => t.getMedicationId()
23
+ }
24
+ },
25
+ actions: {
26
+ remove: {
27
+ // §3: `destructive`. Taking a medication off a prescription or therapy
28
+ // list has no undo in this UI (the host owns the list), so it is "hard
29
+ // to reverse via the same UI", the same class field-array and
30
+ // suggestion-chip give removal. It is not `phi`: the line holds a
31
+ // catalogue id, not patient identity.
32
+ safety: "destructive",
33
+ idempotent: !0,
34
+ descriptionKey: "ui.agent.medicationLine.actions.remove",
35
+ description: "Remove this medication from the list. Does nothing on a read-only line.",
36
+ invoke: (t) => {
37
+ t.remove();
38
+ }
39
+ }
40
+ },
41
+ domHooks: {
42
+ root: {
43
+ attr: "data-component",
44
+ value: "medication-line",
45
+ description: "Marks one medication line. The remove button is present only on the removable variant."
46
+ },
47
+ instanceId: {
48
+ attr: "data-component-id",
49
+ sourceProp: "id",
50
+ description: "Sourced from the id prop, when provided."
51
+ },
52
+ item: {
53
+ attr: "data-medication-id",
54
+ description: "The root also emits the catalogue id of the medication. An id only, never a name."
55
+ }
56
+ }
57
+ }, de = n(
58
+ [
59
+ "ds:flex ds:items-start ds:justify-between",
60
+ "ds:text-foreground ds:break-inside-avoid",
61
+ "ds:m-0 ds:list-none"
62
+ ].join(" "),
63
+ {
64
+ variants: {
65
+ density: {
66
+ default: "ds:gap-[var(--spacing-md)] ds:py-[var(--spacing-sm)]",
67
+ compact: "ds:gap-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]"
68
+ }
69
+ },
70
+ defaultVariants: { density: "default" }
71
+ }
72
+ ), oe = n("ds:flex ds:flex-col ds:flex-1 ds:min-w-0", {
73
+ variants: {
74
+ density: {
75
+ default: "ds:gap-[var(--spacing-xs)]",
76
+ compact: "ds:gap-0"
77
+ }
78
+ },
79
+ defaultVariants: { density: "default" }
80
+ }), re = n(
81
+ "ds:m-0 ds:[overflow-wrap:anywhere] ds:text-foreground",
82
+ {
83
+ variants: {
84
+ density: {
85
+ default: "type-title-item",
86
+ compact: "type-label"
87
+ }
88
+ },
89
+ defaultVariants: { density: "default" }
90
+ }
91
+ ), le = n(
92
+ "ds:m-0 ds:[overflow-wrap:anywhere] ds:text-muted-foreground",
93
+ {
94
+ variants: {
95
+ density: {
96
+ default: "type-body-sm",
97
+ compact: "type-meta"
98
+ }
99
+ },
100
+ defaultVariants: { density: "default" }
101
+ }
102
+ ), c = n(
103
+ "ds:flex ds:flex-wrap ds:items-baseline ds:gap-x-[var(--spacing-xs)]"
104
+ ), m = n("ds:shrink-0 ds:text-muted-foreground", {
105
+ variants: {
106
+ density: { default: "type-label", compact: "type-meta" }
107
+ },
108
+ defaultVariants: { density: "default" }
109
+ }), u = n(
110
+ "ds:m-0 ds:min-w-0 ds:[overflow-wrap:anywhere] ds:text-foreground",
111
+ {
112
+ variants: {
113
+ density: { default: "type-body", compact: "type-body-sm" }
114
+ },
115
+ defaultVariants: { density: "default" }
116
+ }
117
+ ), ce = n(
118
+ [
119
+ "ds:m-0 ds:p-0 ds:list-none",
120
+ "ds:divide-y ds:divide-[color:var(--border)]"
121
+ ].join(" ")
122
+ ), A = k("default"), C = k(!1);
123
+ function b(t) {
124
+ return t !== void 0 && t.trim() !== "";
125
+ }
126
+ const me = I(
127
+ ({
128
+ medication: t,
129
+ dosage: p,
130
+ notes: o,
131
+ quantity: d,
132
+ duration: r,
133
+ notSubstitutable: R = !1,
134
+ codeLabel: j,
135
+ showDetail: P = !0,
136
+ density: D,
137
+ as: S,
138
+ onRemove: f,
139
+ removeLabel: F,
140
+ disabled: v = !1,
141
+ id: N,
142
+ className: z,
143
+ ...B
144
+ }, _) => {
145
+ const { t: i, i18n: E } = Y("ui"), H = T(A), a = D ?? H, K = T(C), O = S ?? (K ? "li" : "div"), x = te(t), G = b(t.code) ? i("medicationSearch.code", {
146
+ label: j ?? i("medicationSearch.codeFallbackLabel"),
147
+ code: t.code.trim()
148
+ }) : void 0, L = ae(
149
+ { ...t, strength: void 0, form: void 0 },
150
+ G
151
+ ).join(ie), J = f !== void 0, l = g(f);
152
+ l.current = f;
153
+ const w = g(v);
154
+ w.current = v;
155
+ const V = g(t.id);
156
+ V.current = t.id;
157
+ const h = U(() => {
158
+ var M;
159
+ w.current || (M = l.current) == null || M.call(l);
160
+ }, []), y = W(
161
+ () => ({
162
+ getMedicationId: () => V.current,
163
+ remove: h
164
+ }),
165
+ [h]
166
+ );
167
+ X(_, () => y, [y]), q(se, y, N);
168
+ const Q = F ?? i("medicationLine.remove", { name: x });
169
+ return /* @__PURE__ */ s(
170
+ O,
171
+ {
172
+ ...B,
173
+ className: de({ density: a, className: z }),
174
+ "data-component": "medication-line",
175
+ "data-component-id": N,
176
+ "data-medication-id": t.id,
177
+ children: [
178
+ /* @__PURE__ */ s("div", { className: oe({ density: a }), children: [
179
+ /* @__PURE__ */ e("p", { dir: "auto", className: re({ density: a }), children: x }),
180
+ P && L !== "" ? /* @__PURE__ */ e("p", { dir: "auto", className: le({ density: a }), children: L }) : null,
181
+ /* @__PURE__ */ s("dl", { className: "ds:m-0 ds:flex ds:flex-col", children: [
182
+ /* @__PURE__ */ s("div", { className: c(), children: [
183
+ /* @__PURE__ */ e("dt", { className: m({ density: a }), children: i("medicationLine.dosage") }),
184
+ /* @__PURE__ */ e("dd", { dir: "auto", className: u({ density: a }), children: p })
185
+ ] }),
186
+ d !== void 0 && Number.isFinite(d) ? /* @__PURE__ */ s("div", { className: c(), children: [
187
+ /* @__PURE__ */ e("dt", { className: m({ density: a }), children: i("medicationLine.quantity") }),
188
+ /* @__PURE__ */ e("dd", { className: u({ density: a }), children: new Intl.NumberFormat(ee(E.language)).format(
189
+ d
190
+ ) })
191
+ ] }) : null,
192
+ b(r) ? /* @__PURE__ */ s("div", { className: c(), children: [
193
+ /* @__PURE__ */ e("dt", { className: m({ density: a }), children: i("medicationLine.duration") }),
194
+ /* @__PURE__ */ e("dd", { dir: "auto", className: u({ density: a }), children: r })
195
+ ] }) : null,
196
+ b(o) ? /* @__PURE__ */ s("div", { className: c(), children: [
197
+ /* @__PURE__ */ e("dt", { className: m({ density: a }), children: i("medicationLine.notes") }),
198
+ /* @__PURE__ */ e("dd", { dir: "auto", className: u({ density: a }), children: o })
199
+ ] }) : null
200
+ ] }),
201
+ R ? /* @__PURE__ */ e("p", { className: "ds:m-0", "data-slot": "not-substitutable", children: /* @__PURE__ */ e(Z, { size: "sm", variant: "neutral", children: i("medicationLine.notSubstitutable") }) }) : null
202
+ ] }),
203
+ J ? /* @__PURE__ */ e(
204
+ $,
205
+ {
206
+ type: "button",
207
+ intent: "ghost",
208
+ icon: /* @__PURE__ */ e(ne, { "aria-hidden": "true" }),
209
+ "aria-label": Q,
210
+ disabled: v,
211
+ onClick: h,
212
+ className: "ds:shrink-0 ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)] ds:print:hidden"
213
+ }
214
+ ) : null
215
+ ]
216
+ }
217
+ );
218
+ }
219
+ );
220
+ me.displayName = "MedicationLine";
221
+ const ue = I(({ density: t = "default", className: p, children: o, ...d }, r) => /* @__PURE__ */ e(A.Provider, { value: t, children: /* @__PURE__ */ e(C.Provider, { value: !0, children: /* @__PURE__ */ e(
222
+ "ul",
223
+ {
224
+ ref: r,
225
+ role: "list",
226
+ ...d,
227
+ className: ce({ className: p }),
228
+ "data-component": "medication-line-list",
229
+ children: o
230
+ }
231
+ ) }) }));
232
+ ue.displayName = "MedicationLineList";
233
+ export {
234
+ me as M,
235
+ ue as a,
236
+ se as m
237
+ };
238
+ //# sourceMappingURL=medication-line-BohqbCYD.js.map
@@ -6,7 +6,7 @@ import { g as mt } from "./get-error-message-DbFUzuja.js";
6
6
  import { h as Rt } from "./handled-rejection-C-6Dq0As.js";
7
7
  import { u as zn } from "./registry-DvAUVLHh.js";
8
8
  import { C as Hn } from "./clinical-note-card-D--IwbZa.js";
9
- import { R as Mn } from "./rich-text-editor-DFsH5RAj.js";
9
+ import { R as Mn } from "./rich-text-editor-orJ-hPgm.js";
10
10
  import { T as Wn } from "./text-area-COMVJ1yE.js";
11
11
  import { A as j } from "./alert-C4WKViaS.js";
12
12
  import { B as te } from "./button-DohK_Ak_.js";
@@ -1110,4 +1110,4 @@ const Lr = qn(
1110
1110
  export {
1111
1111
  Lr as N
1112
1112
  };
1113
- //# sourceMappingURL=notes-panel-CnmQqhwq.js.map
1113
+ //# sourceMappingURL=notes-panel-C4HSUudf.js.map