@alfadocs/ui-kit 1.6.1 → 1.8.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 (141) hide show
  1. package/dist/_chunks/{anamnesis-summary-rows-F-cCmFAn.js → anamnesis-summary-rows-d44s_whc.js} +2 -2
  2. package/dist/_chunks/{antenatal-schedule-timeline-BjlF2rTz.js → antenatal-schedule-timeline-B1k8QkA6.js} +3 -3
  3. package/dist/_chunks/{appointment-card-BhcPJpXh.js → appointment-card-Dzr3GeVz.js} +73 -90
  4. package/dist/_chunks/{appointment-timeline-CMPvzlGZ.js → appointment-timeline-0mwtpErq.js} +3 -3
  5. package/dist/_chunks/{appointment-tray-3c_FLxXJ.js → appointment-tray-4FUu_5NX.js} +2 -2
  6. package/dist/_chunks/armchair-BaLDW6Hz.js +23 -0
  7. package/dist/_chunks/{booking-CQMJUFG-.js → booking-DHkKcUIl.js} +4 -4
  8. package/dist/_chunks/{calendar-4dXTvsCz.js → calendar-B4Gnyu1C.js} +553 -437
  9. package/dist/_chunks/calendar-event-card-Bjdbik8G.js +425 -0
  10. package/dist/_chunks/{care-plan-card-DQjVRDxO.js → care-plan-card-aDN4oem9.js} +3 -3
  11. package/dist/_chunks/{care-plan-entry-card-CMpoeNkb.js → care-plan-entry-card-BEhANdBE.js} +2 -2
  12. package/dist/_chunks/{care-plan-header-CxYoq23f.js → care-plan-header-CkpPyQqG.js} +2 -2
  13. package/dist/_chunks/{color-picker-D-tUwxxT.js → color-picker-oZ6zYks8.js} +164 -151
  14. package/dist/_chunks/control-room-rail-Cj2iX9h_.js +337 -0
  15. package/dist/_chunks/{cycle-calculator-DzgO1vzP.js → cycle-calculator-DmtYGhqq.js} +3 -3
  16. package/dist/_chunks/{date-picker-Bp64zk2p.js → date-picker-CepI_oI2.js} +77 -74
  17. package/dist/_chunks/{date-picker-variants-pKAJfnWr.js → date-picker-variants-DfuooXEK.js} +7 -2
  18. package/dist/_chunks/{date-range-picker-CDrZ8Zh0.js → date-range-picker-BD8P_rJq.js} +46 -45
  19. package/dist/_chunks/{date-time-picker-DVETwpzc.js → date-time-picker-3I2vVKGV.js} +2 -2
  20. package/dist/_chunks/{due-date-calculator-wK8Tajzz.js → due-date-calculator-BF_Ikofx.js} +4 -4
  21. package/dist/_chunks/{entity-card-9_62gY7l.js → entity-card-DmrgYSEX.js} +4 -4
  22. package/dist/_chunks/{gestational-age-calculator-C_uDAeP_.js → gestational-age-calculator-CxZelpu2.js} +5 -5
  23. package/dist/_chunks/{hcg-doubling-BaXkJhT-.js → hcg-doubling-CpU7H5rQ.js} +3 -3
  24. package/dist/_chunks/{link-cell-renderer-DH4JYpKU.js → link-cell-renderer-BZQtsuFz.js} +2 -2
  25. package/dist/_chunks/{notes-panel-DlnENphf.js → notes-panel-e9cJWVRg.js} +2 -2
  26. package/dist/_chunks/{operator-hero-CCDnIa1S.js → operator-hero-BnFv-Uef.js} +2 -2
  27. package/dist/_chunks/{parse-JqixfsU0.js → parse-MN9bGkrY.js} +2 -2
  28. package/dist/_chunks/{patient-details-qnsqYBGQ.js → patient-details-xrqe13az.js} +160 -159
  29. package/dist/_chunks/{patient-table-DwshfVsQ.js → patient-table-BqYomX50.js} +2 -2
  30. package/dist/_chunks/{payment-automation-upsell-BBIG7NFL.js → payment-automation-upsell-DwQW2fRp.js} +52 -63
  31. package/dist/_chunks/{payment-request-card-BjjBMdsp.js → payment-request-card-YVCcCZ25.js} +2 -2
  32. package/dist/_chunks/{practice-results-F_Rf7c4H.js → practice-results-BEsAdW-B.js} +719 -633
  33. package/dist/_chunks/{pregnancy-dating-BVS_9YU2.js → pregnancy-dating-DtToyMyc.js} +5 -5
  34. package/dist/_chunks/{radiograph-panel.agent-CiHwgISa.js → radiograph-panel.agent-C3trfWqB.js} +3 -3
  35. package/dist/_chunks/repeat-CvQa5rZt.js +17 -0
  36. package/dist/_chunks/resource-chip-DYTG0IQQ.js +83 -0
  37. package/dist/_chunks/{rich-text-editor-DARnq_6N.js → rich-text-editor-BDfFtK4H.js} +2 -2
  38. package/dist/_chunks/subDays-BLl3y3pd.js +8 -0
  39. package/dist/agent-catalog.json +3 -3
  40. package/dist/components/appointment-card/index.js +2 -2
  41. package/dist/components/appointment-timeline/index.js +1 -1
  42. package/dist/components/booking/index.js +1 -1
  43. package/dist/components/calendar/calendar.d.ts +138 -12
  44. package/dist/components/calendar/index.js +1 -1
  45. package/dist/components/calendar-event-card/calendar-event-card.d.ts +48 -11
  46. package/dist/components/calendar-event-card/index.js +1 -1
  47. package/dist/components/care-plan-card/index.js +1 -1
  48. package/dist/components/care-plan-entry-card/index.js +1 -1
  49. package/dist/components/care-plan-header/index.js +1 -1
  50. package/dist/components/color-picker/index.d.ts +1 -1
  51. package/dist/components/color-picker/index.js +4 -3
  52. package/dist/components/color-picker/palettes.d.ts +10 -0
  53. package/dist/components/control-room-rail/control-room-rail.d.ts +9 -0
  54. package/dist/components/control-room-rail/index.js +1 -1
  55. package/dist/components/cycle-calculator/index.js +1 -1
  56. package/dist/components/data-table/index.js +1 -1
  57. package/dist/components/date-picker/date-picker.d.ts +11 -0
  58. package/dist/components/date-picker/index.js +1 -1
  59. package/dist/components/date-range-picker/index.js +1 -1
  60. package/dist/components/date-time-picker/index.js +1 -1
  61. package/dist/components/due-date-calculator/index.js +2 -2
  62. package/dist/components/gestational-age-calculator/index.js +1 -1
  63. package/dist/components/hcg-doubling/index.js +1 -1
  64. package/dist/components/index.d.ts +1 -0
  65. package/dist/components/notes-panel/index.js +1 -1
  66. package/dist/components/operator-hero/index.js +1 -1
  67. package/dist/components/patient-details/index.js +1 -1
  68. package/dist/components/patient-details/patient-details.d.ts +8 -0
  69. package/dist/components/patient-table/index.js +1 -1
  70. package/dist/components/payment-card/index.js +1 -1
  71. package/dist/components/practice-results/index.js +1 -1
  72. package/dist/components/practice-results/practice-results.d.ts +47 -7
  73. package/dist/components/pregnancy-dating/index.js +1 -1
  74. package/dist/components/radiograph-panel/index.js +1 -1
  75. package/dist/components/resource-chip/index.d.ts +3 -0
  76. package/dist/components/resource-chip/index.js +5 -0
  77. package/dist/components/resource-chip/resource-chip.d.ts +26 -0
  78. package/dist/components/rich-text-editor/index.js +1 -1
  79. package/dist/host-compat.css +7 -1
  80. package/dist/i18n/locales/ar.d.ts +5 -0
  81. package/dist/i18n/locales/ar.js +6 -1
  82. package/dist/i18n/locales/de.d.ts +5 -0
  83. package/dist/i18n/locales/de.js +6 -1
  84. package/dist/i18n/locales/el.d.ts +5 -0
  85. package/dist/i18n/locales/el.js +6 -1
  86. package/dist/i18n/locales/en.d.ts +5 -0
  87. package/dist/i18n/locales/en.js +6 -1
  88. package/dist/i18n/locales/es.d.ts +5 -0
  89. package/dist/i18n/locales/es.js +6 -1
  90. package/dist/i18n/locales/fr.d.ts +5 -0
  91. package/dist/i18n/locales/fr.js +6 -1
  92. package/dist/i18n/locales/hi.d.ts +5 -0
  93. package/dist/i18n/locales/hi.js +6 -1
  94. package/dist/i18n/locales/it.d.ts +5 -0
  95. package/dist/i18n/locales/it.js +6 -1
  96. package/dist/i18n/locales/ja.d.ts +5 -0
  97. package/dist/i18n/locales/ja.js +6 -1
  98. package/dist/i18n/locales/nl.d.ts +5 -0
  99. package/dist/i18n/locales/nl.js +6 -1
  100. package/dist/i18n/locales/pl.d.ts +5 -0
  101. package/dist/i18n/locales/pl.js +6 -1
  102. package/dist/i18n/locales/pt.d.ts +5 -0
  103. package/dist/i18n/locales/pt.js +6 -1
  104. package/dist/i18n/locales/ro.d.ts +5 -0
  105. package/dist/i18n/locales/ro.js +6 -1
  106. package/dist/i18n/locales/ru.d.ts +5 -0
  107. package/dist/i18n/locales/ru.js +6 -1
  108. package/dist/i18n/locales/sq.d.ts +5 -0
  109. package/dist/i18n/locales/sq.js +6 -1
  110. package/dist/i18n/locales/sv.d.ts +5 -0
  111. package/dist/i18n/locales/sv.js +6 -1
  112. package/dist/i18n/locales/tr.d.ts +5 -0
  113. package/dist/i18n/locales/tr.js +6 -1
  114. package/dist/i18n/locales/zh.d.ts +5 -0
  115. package/dist/i18n/locales/zh.js +6 -1
  116. package/dist/index.js +961 -958
  117. package/dist/locales/ar.json +6 -1
  118. package/dist/locales/de.json +6 -1
  119. package/dist/locales/el.json +6 -1
  120. package/dist/locales/en.json +6 -1
  121. package/dist/locales/es.json +6 -1
  122. package/dist/locales/fr.json +6 -1
  123. package/dist/locales/hi.json +6 -1
  124. package/dist/locales/it.json +6 -1
  125. package/dist/locales/ja.json +6 -1
  126. package/dist/locales/nl.json +6 -1
  127. package/dist/locales/pl.json +6 -1
  128. package/dist/locales/pt.json +6 -1
  129. package/dist/locales/ro.json +6 -1
  130. package/dist/locales/ru.json +6 -1
  131. package/dist/locales/sq.json +6 -1
  132. package/dist/locales/sv.json +6 -1
  133. package/dist/locales/tr.json +6 -1
  134. package/dist/locales/zh.json +6 -1
  135. package/dist/patterns/anamnesis/index.js +1 -1
  136. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  137. package/dist/tokens.css +40 -24
  138. package/package.json +5 -1
  139. package/dist/_chunks/calendar-event-card-C6qGtywL.js +0 -257
  140. package/dist/_chunks/control-room-rail-IH1eBjrK.js +0 -333
  141. package/dist/_chunks/subDays-CAUv47M1.js +0 -8
@@ -1,41 +1,41 @@
1
- import { jsx as t, jsxs as c, Fragment as te } from "react/jsx-runtime";
2
- import { forwardRef as ae, useId as A, useMemo as se, Fragment as ie, useState as v, useCallback as I } from "react";
3
- import { c as q } from "./index-D2ZczOXr.js";
4
- import { useTranslation as V } from "react-i18next";
5
- import { A as re } from "./avatar-BNQNhoyL.js";
1
+ import { jsx as t, jsxs as c, Fragment as ae } from "react/jsx-runtime";
2
+ import { forwardRef as se, useId as M, useMemo as ie, Fragment as re, useState as v, useCallback as I } from "react";
3
+ import { c as H } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as C } from "react-i18next";
5
+ import { A as ne } from "./avatar-BNQNhoyL.js";
6
6
  import { I as z } from "./icon-button-DA2CAGHZ.js";
7
7
  import { C as F } from "./card-DPmk26CL.js";
8
- import { C as ne, b as le, a as oe } from "./collapsible-CTjxzGuF.js";
9
- import { D as de } from "./date-picker-Bp64zk2p.js";
8
+ import { C as le, b as oe, a as de } from "./collapsible-CTjxzGuF.js";
9
+ import { D as ce } from "./date-picker-CepI_oI2.js";
10
10
  import { D as S } from "./description-list-CjJqR8WK.js";
11
- import { E as ce } from "./email-input-Dpe63k0K.js";
12
- import { F as pe } from "./fiscal-code-input-B_nYMSEM.js";
13
- import { N as ue } from "./number-input-Cgu2TtA8.js";
14
- import { P as me } from "./panel-header-D313n_9-.js";
15
- import { P as fe } from "./phone-input-BsZIoE36.js";
16
- import { S as ge } from "./select-BW5ecXlX.js";
17
- import { S as ye } from "./switch-OILsBLWo.js";
18
- import { T as be } from "./text-area-Bt3p7Pt0.js";
19
- import { T as he } from "./text-input-CUvCb6ST.js";
20
- import { C as ve } from "./country-select-UEF9BEeQ.js";
21
- import { P as xe } from "./province-select-BDywtmL-.js";
22
- import { P as Ne } from "./postal-code-input-BznBxVxf.js";
23
- import { C as Ve } from "./city-input-towzBenY.js";
24
- import { u as Ce } from "./registry-DvAUVLHh.js";
25
- import { u as ke, F as we, r as De, a as Pe } from "./field-value-DG8zaZvo.js";
26
- import { c as Te } from "./createLucideIcon-DhHxpK9K.js";
27
- import { L as Fe } from "./lock-ClAFG1gy.js";
28
- import { C as H } from "./check-DrFSN__t.js";
29
- import { X as Ie } from "./x-B5YnXwCz.js";
30
- import { P as ze } from "./pencil-B1sKKyuT.js";
31
- import { C as Se } from "./copy-vRpqqHtY.js";
11
+ import { E as pe } from "./email-input-Dpe63k0K.js";
12
+ import { F as ue } from "./fiscal-code-input-B_nYMSEM.js";
13
+ import { N as me } from "./number-input-Cgu2TtA8.js";
14
+ import { P as fe } from "./panel-header-D313n_9-.js";
15
+ import { P as ge } from "./phone-input-BsZIoE36.js";
16
+ import { S as ye } from "./select-BW5ecXlX.js";
17
+ import { S as be } from "./switch-OILsBLWo.js";
18
+ import { T as he } from "./text-area-Bt3p7Pt0.js";
19
+ import { T as ve } from "./text-input-CUvCb6ST.js";
20
+ import { C as xe } from "./country-select-UEF9BEeQ.js";
21
+ import { P as Ne } from "./province-select-BDywtmL-.js";
22
+ import { P as Ve } from "./postal-code-input-BznBxVxf.js";
23
+ import { C as Ce } from "./city-input-towzBenY.js";
24
+ import { u as ke } from "./registry-DvAUVLHh.js";
25
+ import { u as we, F as De, r as Pe, a as Te } from "./field-value-DG8zaZvo.js";
26
+ import { c as Fe } from "./createLucideIcon-DhHxpK9K.js";
27
+ import { L as Ie } from "./lock-ClAFG1gy.js";
28
+ import { C as $ } from "./check-DrFSN__t.js";
29
+ import { X as ze } from "./x-B5YnXwCz.js";
30
+ import { P as Se } from "./pencil-B1sKKyuT.js";
31
+ import { C as Ee } from "./copy-vRpqqHtY.js";
32
32
  /**
33
33
  * @license lucide-react v1.22.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
37
  */
38
- const Ee = [
38
+ const Oe = [
39
39
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
40
40
  [
41
41
  "path",
@@ -48,7 +48,7 @@ const Ee = [
48
48
  ["path", { d: "M12 16h4", key: "n85exb" }],
49
49
  ["path", { d: "M8 11h.01", key: "1dfujw" }],
50
50
  ["path", { d: "M8 16h.01", key: "18s6g9" }]
51
- ], Oe = Te("clipboard-list", Ee), je = {
51
+ ], je = Fe("clipboard-list", Oe), Ae = {
52
52
  id: "patient-details",
53
53
  // `view_change` backs the view-config actions (show/hide + reorder are both
54
54
  // view reconfigurations); `set_value` backs the single-value `update_field`
@@ -152,7 +152,7 @@ const Ee = [
152
152
  description: "Stable field KEY on each row. Never the field value (no PHI in the DOM hook)."
153
153
  }
154
154
  }
155
- }, R = q(
155
+ }, L = H(
156
156
  "ds:flex ds:flex-col ds:text-[color:var(--foreground)]",
157
157
  {
158
158
  variants: {
@@ -167,7 +167,7 @@ const Ee = [
167
167
  density: "compact"
168
168
  }
169
169
  }
170
- ), L = q("ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", {
170
+ ), q = H("ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", {
171
171
  variants: {
172
172
  density: {
173
173
  comfortable: "ds:p-[var(--spacing-md)]",
@@ -177,7 +177,7 @@ const Ee = [
177
177
  defaultVariants: {
178
178
  density: "compact"
179
179
  }
180
- }), Ae = ae(
180
+ }), Me = se(
181
181
  function({
182
182
  title: a,
183
183
  sections: n,
@@ -187,68 +187,69 @@ const Ee = [
187
187
  editable: r = !1,
188
188
  onFieldSave: o,
189
189
  validate: d,
190
- visibleFieldOrder: g,
190
+ visibleFieldOrder: f,
191
191
  defaultVisibleFieldOrder: s,
192
- onVisibleFieldsChange: b,
193
- loading: C = !1,
194
- emptyState: h,
192
+ onVisibleFieldsChange: y,
193
+ loading: k = !1,
194
+ emptyState: b,
195
195
  patientId: m,
196
- id: y,
197
- locale: k,
196
+ id: g,
197
+ locale: w,
198
198
  cogLabel: E,
199
+ panelTitle: O,
199
200
  "aria-label": x,
200
- className: w,
201
- ...D
202
- }, P) {
203
- const { t: T } = V(), N = A(), {
204
- visible: f,
205
- catalogueIds: $,
206
- setOrder: O,
207
- toggleField: U,
208
- toggleSection: W,
209
- moveFieldOnto: Y,
210
- reset: X
211
- } = ke(n, {
212
- value: g,
201
+ className: D,
202
+ ...P
203
+ }, T) {
204
+ const { t: N } = C(), h = M(), {
205
+ visible: V,
206
+ catalogueIds: U,
207
+ setOrder: j,
208
+ toggleField: W,
209
+ toggleSection: Y,
210
+ moveFieldOnto: X,
211
+ reset: G
212
+ } = we(n, {
213
+ value: f,
213
214
  defaultValue: s,
214
- onChange: b
215
- }), G = se(
215
+ onChange: y
216
+ }), J = ie(
216
217
  () => ({
217
- getVisibleFieldOrder: () => f,
218
+ getVisibleFieldOrder: () => V,
218
219
  getPatientId: () => m,
219
- setVisibleFields: (p) => O(p),
220
- setFieldOrder: (p) => O(p),
221
- updateField: (p, j) => o ? o(p, j) : Promise.reject(
220
+ setVisibleFields: (p) => j(p),
221
+ setFieldOrder: (p) => j(p),
222
+ updateField: (p, A) => o ? o(p, A) : Promise.reject(
222
223
  new Error("PatientDetails: no onFieldSave handler is wired.")
223
224
  )
224
225
  }),
225
- [f, m, O, o]
226
+ [V, m, j, o]
226
227
  );
227
- Ce(je, G, y);
228
- const M = T("patientDetails.regionLabel", {
228
+ ke(Ae, J, g);
229
+ const _ = O ?? N("patientDetails.regionLabel", {
229
230
  defaultValue: "Patient details"
230
- }), J = x ?? M, _ = (i == null ? void 0 : i.name) ?? (typeof a == "string" ? a : void 0), Q = !!(i != null && i.src || _), Z = $.some((p) => f.includes(p));
231
- if (C)
231
+ }), Q = x ?? _, B = (i == null ? void 0 : i.name) ?? (typeof a == "string" ? a : void 0), Z = !!(i != null && i.src || B), ee = U.some((p) => V.includes(p));
232
+ if (k)
232
233
  return /* @__PURE__ */ t(
233
234
  "section",
234
235
  {
235
- ref: P,
236
+ ref: T,
236
237
  "data-component": "patient-details",
237
- "data-component-id": y,
238
+ "data-component-id": g,
238
239
  "data-patient-id": m,
239
- "aria-label": J,
240
+ "aria-label": Q,
240
241
  "aria-busy": "true",
241
- className: R({ className: w }),
242
- ...D,
243
- children: /* @__PURE__ */ t("div", { className: L(), children: /* @__PURE__ */ t(Re, {}) })
242
+ className: L({ className: D }),
243
+ ...P,
244
+ children: /* @__PURE__ */ t("div", { className: q(), children: /* @__PURE__ */ t(Le, {}) })
244
245
  }
245
246
  );
246
- const ee = n.length === 0 || !Z, B = /* @__PURE__ */ c("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)]", children: [
247
- Q ? /* @__PURE__ */ t(
248
- re,
247
+ const te = n.length === 0 || !ee, K = /* @__PURE__ */ c("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)]", children: [
248
+ Z ? /* @__PURE__ */ t(
249
+ ne,
249
250
  {
250
251
  size: "md",
251
- name: _,
252
+ name: B,
252
253
  src: i == null ? void 0 : i.src,
253
254
  className: "ds:shrink-0"
254
255
  }
@@ -261,54 +262,54 @@ const Ee = [
261
262
  return /* @__PURE__ */ c(
262
263
  "section",
263
264
  {
264
- ref: P,
265
+ ref: T,
265
266
  "data-component": "patient-details",
266
- "data-component-id": y,
267
+ "data-component-id": g,
267
268
  "data-patient-id": m,
268
- "aria-labelledby": x ? void 0 : N,
269
+ "aria-labelledby": x ? void 0 : h,
269
270
  "aria-label": x ?? void 0,
270
- className: R({ className: w }),
271
- ...D,
271
+ className: L({ className: D }),
272
+ ...P,
272
273
  children: [
273
274
  /* @__PURE__ */ t(
274
- me,
275
+ fe,
275
276
  {
276
- title: M,
277
- icon: /* @__PURE__ */ t(Oe, { "aria-hidden": "true" }),
278
- headingId: N,
277
+ title: _,
278
+ icon: /* @__PURE__ */ t(je, { "aria-hidden": "true" }),
279
+ headingId: h,
279
280
  sticky: !0,
280
281
  divider: !0,
281
282
  actions: /* @__PURE__ */ t(
282
- we,
283
+ De,
283
284
  {
284
285
  sections: n,
285
- visible: f,
286
- onToggleField: U,
287
- onToggleSection: W,
288
- onMoveFieldOnto: Y,
289
- onReset: X,
286
+ visible: V,
287
+ onToggleField: W,
288
+ onToggleSection: Y,
289
+ onMoveFieldOnto: X,
290
+ onReset: G,
290
291
  label: E
291
292
  }
292
293
  )
293
294
  }
294
295
  ),
295
- /* @__PURE__ */ c("div", { className: L(), children: [
296
- u ? /* @__PURE__ */ t(F, { variant: "elevated", children: /* @__PURE__ */ t(F.Body, { children: B }) }) : B,
297
- ee ? /* @__PURE__ */ t("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: h ?? T("patientDetails.empty", {
296
+ /* @__PURE__ */ c("div", { className: q(), children: [
297
+ u ? /* @__PURE__ */ t(F, { variant: "elevated", children: /* @__PURE__ */ t(F.Body, { children: K }) }) : K,
298
+ te ? /* @__PURE__ */ t("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: b ?? N("patientDetails.empty", {
298
299
  defaultValue: "No patient selected."
299
- }) }) : De(n, f).filter(({ fields: p }) => p.length > 0).map(({ section: p, fields: j }) => {
300
- const K = /* @__PURE__ */ t(
301
- Me,
300
+ }) }) : Pe(n, V).filter(({ fields: p }) => p.length > 0).map(({ section: p, fields: A }) => {
301
+ const R = /* @__PURE__ */ t(
302
+ _e,
302
303
  {
303
304
  section: p,
304
- fields: j,
305
+ fields: A,
305
306
  editable: r,
306
307
  onFieldSave: o,
307
308
  validate: d,
308
- locale: k
309
+ locale: w
309
310
  }
310
311
  );
311
- return u ? /* @__PURE__ */ t(F, { variant: "elevated", children: /* @__PURE__ */ t(F.Body, { children: K }) }, p.id) : /* @__PURE__ */ t(ie, { children: K }, p.id);
312
+ return u ? /* @__PURE__ */ t(F, { variant: "elevated", children: /* @__PURE__ */ t(F.Body, { children: R }) }, p.id) : /* @__PURE__ */ t(re, { children: R }, p.id);
312
313
  })
313
314
  ] })
314
315
  ]
@@ -316,8 +317,8 @@ const Ee = [
316
317
  );
317
318
  }
318
319
  );
319
- Ae.displayName = "PatientDetails";
320
- function Me({
320
+ Me.displayName = "PatientDetails";
321
+ function _e({
321
322
  section: e,
322
323
  fields: a,
323
324
  editable: n,
@@ -325,7 +326,7 @@ function Me({
325
326
  validate: l,
326
327
  locale: u
327
328
  }) {
328
- const { t: r } = V(), o = A(), d = e.collapsible ?? !0, g = a.length === 0 ? /* @__PURE__ */ t("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: r("patientDetails.section.empty", {
329
+ const { t: r } = C(), o = M(), d = e.collapsible ?? !0, f = a.length === 0 ? /* @__PURE__ */ t("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: r("patientDetails.section.empty", {
329
330
  defaultValue: "No fields shown."
330
331
  }) }) : /* @__PURE__ */ t(
331
332
  S,
@@ -335,7 +336,7 @@ function Me({
335
336
  divider: "none",
336
337
  className: "ds:[--description-list-icon-color:var(--accent)]",
337
338
  children: a.map((s) => /* @__PURE__ */ t(
338
- _e,
339
+ Be,
339
340
  {
340
341
  field: s,
341
342
  icon: s.icon ?? null,
@@ -349,13 +350,13 @@ function Me({
349
350
  }
350
351
  );
351
352
  return d ? /* @__PURE__ */ c(
352
- ne,
353
+ le,
353
354
  {
354
355
  defaultOpen: e.defaultOpen ?? !0,
355
356
  variant: "minimal",
356
357
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
357
358
  children: [
358
- /* @__PURE__ */ t("h3", { className: "ds:m-0", children: /* @__PURE__ */ t(le, { asChild: !0, children: /* @__PURE__ */ t(
359
+ /* @__PURE__ */ t("h3", { className: "ds:m-0", children: /* @__PURE__ */ t(oe, { asChild: !0, children: /* @__PURE__ */ t(
359
360
  "button",
360
361
  {
361
362
  type: "button",
@@ -364,7 +365,7 @@ function Me({
364
365
  children: e.heading
365
366
  }
366
367
  ) }) }),
367
- /* @__PURE__ */ t(oe, { "aria-labelledby": o, children: g })
368
+ /* @__PURE__ */ t(de, { "aria-labelledby": o, children: f })
368
369
  ]
369
370
  }
370
371
  ) : /* @__PURE__ */ c(
@@ -381,12 +382,12 @@ function Me({
381
382
  children: e.heading
382
383
  }
383
384
  ),
384
- g
385
+ f
385
386
  ]
386
387
  }
387
388
  );
388
389
  }
389
- function _e({
390
+ function Be({
390
391
  field: e,
391
392
  icon: a,
392
393
  editable: n,
@@ -394,33 +395,33 @@ function _e({
394
395
  validate: l,
395
396
  locale: u
396
397
  }) {
397
- const { t: r } = V(), o = A(), d = n && !!e.editable && !!i, [g, s] = v(!1), [b, C] = v(e.editValue), [h, m] = v(null), [y, k] = v(!1), E = I(() => {
398
- C(e.editValue), m(null), s(!0);
399
- }, [e.editValue]), x = I(() => {
398
+ const { t: r } = C(), o = M(), d = n && !!e.editable && !!i, [f, s] = v(!1), [y, k] = v(e.editValue), [b, m] = v(null), [g, w] = v(!1), E = I(() => {
399
+ k(e.editValue), m(null), s(!0);
400
+ }, [e.editValue]), O = I(() => {
400
401
  s(!1), m(null);
401
- }, []), w = I(async () => {
402
+ }, []), x = I(async () => {
402
403
  if (!i) return;
403
- const N = (l == null ? void 0 : l(e.id, b)) ?? null;
404
+ const N = (l == null ? void 0 : l(e.id, y)) ?? null;
404
405
  if (N) {
405
406
  m(N);
406
407
  return;
407
408
  }
408
- k(!0), m(null);
409
+ w(!0), m(null);
409
410
  try {
410
- await i(e.id, b), s(!1);
411
- } catch (f) {
411
+ await i(e.id, y), s(!1);
412
+ } catch (h) {
412
413
  m(
413
- f instanceof Error && f.message ? f.message : r("patientDetails.edit.saveFailed", {
414
+ h instanceof Error && h.message ? h.message : r("patientDetails.edit.saveFailed", {
414
415
  defaultValue: "Could not save. Try again."
415
416
  })
416
417
  );
417
418
  } finally {
418
- k(!1);
419
+ w(!1);
419
420
  }
420
- }, [i, l, e.id, b, r]), D = /* @__PURE__ */ c("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
421
+ }, [i, l, e.id, y, r]), D = /* @__PURE__ */ c("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
421
422
  e.label,
422
423
  e.sensitive ? /* @__PURE__ */ t(
423
- Fe,
424
+ Ie,
424
425
  {
425
426
  "aria-label": r("patientDetails.sensitive", {
426
427
  defaultValue: "Sensitive"
@@ -428,18 +429,18 @@ function _e({
428
429
  className: "ds:size-3 ds:shrink-0 ds:text-[color:var(--muted-foreground)]"
429
430
  }
430
431
  ) : null
431
- ] }), P = typeof e.value == "string" ? e.value : e.copyText ?? (typeof e.editValue == "string" ? e.editValue : void 0), T = g ? /* @__PURE__ */ c("span", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
432
+ ] }), P = typeof e.value == "string" ? e.value : e.copyText ?? (typeof e.editValue == "string" ? e.editValue : void 0), T = f ? /* @__PURE__ */ c("span", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
432
433
  /* @__PURE__ */ c("span", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-2xs)]", children: [
433
434
  /* @__PURE__ */ t(
434
- Be,
435
+ Ke,
435
436
  {
436
437
  field: e,
437
- value: b,
438
- onChange: C,
439
- invalid: !!h,
440
- errorId: h ? o : void 0,
438
+ value: y,
439
+ onChange: k,
440
+ invalid: !!b,
441
+ errorId: b ? o : void 0,
441
442
  locale: u,
442
- disabled: y
443
+ disabled: g
443
444
  }
444
445
  ),
445
446
  /* @__PURE__ */ t(
@@ -447,10 +448,10 @@ function _e({
447
448
  {
448
449
  size: "sm",
449
450
  intent: "primary",
450
- icon: /* @__PURE__ */ t(H, { "aria-hidden": "true" }),
451
+ icon: /* @__PURE__ */ t($, { "aria-hidden": "true" }),
451
452
  "aria-label": r("patientDetails.edit.save", { defaultValue: "Save" }),
452
- loading: y,
453
- onClick: w
453
+ loading: g,
454
+ onClick: x
454
455
  }
455
456
  ),
456
457
  /* @__PURE__ */ t(
@@ -458,22 +459,22 @@ function _e({
458
459
  {
459
460
  size: "sm",
460
461
  intent: "ghost",
461
- icon: /* @__PURE__ */ t(Ie, { "aria-hidden": "true" }),
462
+ icon: /* @__PURE__ */ t(ze, { "aria-hidden": "true" }),
462
463
  "aria-label": r("patientDetails.edit.cancel", {
463
464
  defaultValue: "Cancel"
464
465
  }),
465
- disabled: y,
466
- onClick: x
466
+ disabled: g,
467
+ onClick: O
467
468
  }
468
469
  )
469
470
  ] }),
470
- h ? /* @__PURE__ */ t(
471
+ b ? /* @__PURE__ */ t(
471
472
  "span",
472
473
  {
473
474
  id: o,
474
475
  role: "alert",
475
476
  className: "type-meta ds:text-[color:var(--destructive)]",
476
- children: h
477
+ children: b
477
478
  }
478
479
  ) : null
479
480
  ] }) : /* @__PURE__ */ c("span", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-2xs)] ds:min-w-0", children: [
@@ -482,17 +483,17 @@ function _e({
482
483
  {
483
484
  className: `ds:min-w-0 ${e.editType === "textarea" ? "" : "ds:truncate"}${e.mono ? " ds:font-mono" : ""}`,
484
485
  title: P,
485
- children: /* @__PURE__ */ t(Pe, { field: e })
486
+ children: /* @__PURE__ */ t(Te, { field: e })
486
487
  }
487
488
  ),
488
- e.copyable && e.copyText ? /* @__PURE__ */ t(Ke, { text: e.copyText, label: e.label }) : null,
489
+ e.copyable && e.copyText ? /* @__PURE__ */ t(Re, { text: e.copyText, label: e.label }) : null,
489
490
  d ? /* @__PURE__ */ t(
490
491
  z,
491
492
  {
492
493
  size: "sm",
493
494
  intent: "ghost",
494
495
  className: "ds:shrink-0 ds:opacity-0 ds:transition-opacity ds:motion-reduce:transition-none ds:group-hover:opacity-100 ds:focus-visible:opacity-100",
495
- icon: /* @__PURE__ */ t(ze, { "aria-hidden": "true" }),
496
+ icon: /* @__PURE__ */ t(Se, { "aria-hidden": "true" }),
496
497
  "aria-label": r("patientDetails.edit.editField", {
497
498
  field: e.label,
498
499
  defaultValue: "Edit {{field}}"
@@ -514,7 +515,7 @@ function _e({
514
515
  }
515
516
  );
516
517
  }
517
- function Be({
518
+ function Ke({
518
519
  field: e,
519
520
  value: a,
520
521
  onChange: n,
@@ -523,11 +524,11 @@ function Be({
523
524
  locale: u,
524
525
  disabled: r
525
526
  }) {
526
- const { t: o } = V(), d = i ? "error" : "default";
527
+ const { t: o } = C(), d = i ? "error" : "default";
527
528
  switch (e.editType ?? "text") {
528
529
  case "textarea":
529
530
  return /* @__PURE__ */ t(
530
- be,
531
+ he,
531
532
  {
532
533
  size: "sm",
533
534
  value: typeof a == "string" ? a : "",
@@ -542,7 +543,7 @@ function Be({
542
543
  );
543
544
  case "select":
544
545
  return /* @__PURE__ */ t(
545
- ge,
546
+ ye,
546
547
  {
547
548
  size: "sm",
548
549
  options: e.options ?? [],
@@ -557,7 +558,7 @@ function Be({
557
558
  );
558
559
  case "boolean":
559
560
  return /* @__PURE__ */ t(
560
- ye,
561
+ be,
561
562
  {
562
563
  label: e.label,
563
564
  checked: a === !0,
@@ -567,7 +568,7 @@ function Be({
567
568
  );
568
569
  case "date":
569
570
  return /* @__PURE__ */ t(
570
- de,
571
+ ce,
571
572
  {
572
573
  size: "sm",
573
574
  value: a instanceof Date ? a : void 0,
@@ -578,7 +579,7 @@ function Be({
578
579
  );
579
580
  case "number":
580
581
  return /* @__PURE__ */ t(
581
- ue,
582
+ me,
582
583
  {
583
584
  size: "sm",
584
585
  value: typeof a == "number" ? a : null,
@@ -595,7 +596,7 @@ function Be({
595
596
  );
596
597
  case "email":
597
598
  return /* @__PURE__ */ t(
598
- ce,
599
+ pe,
599
600
  {
600
601
  size: "sm",
601
602
  value: typeof a == "string" ? a : "",
@@ -609,7 +610,7 @@ function Be({
609
610
  );
610
611
  case "phone":
611
612
  return /* @__PURE__ */ t(
612
- fe,
613
+ ge,
613
614
  {
614
615
  size: "sm",
615
616
  value: typeof a == "string" ? a : "",
@@ -624,7 +625,7 @@ function Be({
624
625
  );
625
626
  case "fiscalCode":
626
627
  return /* @__PURE__ */ t(
627
- pe,
628
+ ue,
628
629
  {
629
630
  size: "sm",
630
631
  value: typeof a == "string" ? a : "",
@@ -643,7 +644,7 @@ function Be({
643
644
  // conveyed by colour alone.
644
645
  case "province":
645
646
  return /* @__PURE__ */ t(
646
- xe,
647
+ Ne,
647
648
  {
648
649
  size: "sm",
649
650
  country: "it",
@@ -659,7 +660,7 @@ function Be({
659
660
  );
660
661
  case "country":
661
662
  return /* @__PURE__ */ t(
662
- ve,
663
+ xe,
663
664
  {
664
665
  size: "sm",
665
666
  value: typeof a == "string" ? a : "",
@@ -674,7 +675,7 @@ function Be({
674
675
  );
675
676
  case "postalCode":
676
677
  return /* @__PURE__ */ t(
677
- Ne,
678
+ Ve,
678
679
  {
679
680
  size: "sm",
680
681
  country: "it",
@@ -689,7 +690,7 @@ function Be({
689
690
  );
690
691
  case "city":
691
692
  return /* @__PURE__ */ t(
692
- Ve,
693
+ Ce,
693
694
  {
694
695
  size: "sm",
695
696
  value: typeof a == "string" ? a : "",
@@ -705,7 +706,7 @@ function Be({
705
706
  case "text":
706
707
  default:
707
708
  return /* @__PURE__ */ t(
708
- he,
709
+ ve,
709
710
  {
710
711
  size: "sm",
711
712
  value: typeof a == "string" ? a : "",
@@ -724,11 +725,11 @@ function Be({
724
725
  );
725
726
  }
726
727
  }
727
- function Ke({
728
+ function Re({
728
729
  text: e,
729
730
  label: a
730
731
  }) {
731
- const { t: n } = V(), [i, l] = v(!1), [u, r] = v(""), o = I(async () => {
732
+ const { t: n } = C(), [i, l] = v(!1), [u, r] = v(""), o = I(async () => {
732
733
  try {
733
734
  await navigator.clipboard.writeText(e), l(!0), r(n("keyValuePair.copied", { defaultValue: "Copied" })), setTimeout(() => {
734
735
  l(!1), r("");
@@ -739,13 +740,13 @@ function Ke({
739
740
  ), setTimeout(() => r(""), 3e3);
740
741
  }
741
742
  }, [e, n]);
742
- return /* @__PURE__ */ c(te, { children: [
743
+ return /* @__PURE__ */ c(ae, { children: [
743
744
  /* @__PURE__ */ t(
744
745
  z,
745
746
  {
746
747
  size: "sm",
747
748
  intent: "ghost",
748
- icon: i ? /* @__PURE__ */ t(H, { "aria-hidden": "true" }) : /* @__PURE__ */ t(Se, { "aria-hidden": "true" }),
749
+ icon: i ? /* @__PURE__ */ t($, { "aria-hidden": "true" }) : /* @__PURE__ */ t(Ee, { "aria-hidden": "true" }),
749
750
  "aria-label": n("keyValuePair.copy", {
750
751
  label: a,
751
752
  defaultValue: "Copy {{label}}"
@@ -756,7 +757,7 @@ function Ke({
756
757
  /* @__PURE__ */ t("span", { role: "status", className: "ds:sr-only", children: u })
757
758
  ] });
758
759
  }
759
- function Re() {
760
+ function Le() {
760
761
  return /* @__PURE__ */ c("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
761
762
  /* @__PURE__ */ c("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
762
763
  /* @__PURE__ */ t("span", { className: "ds:size-10 ds:shrink-0 ds:rounded-full ds:bg-[color:var(--muted)]" }),
@@ -772,7 +773,7 @@ function Re() {
772
773
  ] });
773
774
  }
774
775
  export {
775
- Ae as P,
776
- je as p
776
+ Me as P,
777
+ Ae as p
777
778
  };
778
- //# sourceMappingURL=patient-details-qnsqYBGQ.js.map
779
+ //# sourceMappingURL=patient-details-xrqe13az.js.map