@alfadocs/ui-kit 1.12.6 → 1.14.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 (182) hide show
  1. package/dist/_chunks/actions-cell-renderer-yy03OgRL.js +137 -0
  2. package/dist/_chunks/{address-fields-CZP4Wncx.js → address-fields-CZ0pEdEI.js} +4 -4
  3. package/dist/_chunks/{ai-prompt-input-DnbfEJnr.js → ai-prompt-input-CrHr-5H8.js} +2 -2
  4. package/dist/_chunks/{anamnesis-summary-rows-BfhxWPO3.js → anamnesis-summary-rows-CRWO8x8g.js} +4 -4
  5. package/dist/_chunks/{audio-recorder-EWBCNIsd.js → audio-recorder-DXG6LTtO.js} +2 -2
  6. package/dist/_chunks/{autocomplete-BrONKN8l.js → autocomplete-MpBhz-fG.js} +86 -74
  7. package/dist/_chunks/{balance-badge-cell-7L6nzB29.js → balance-badge-cell-CgkxYO96.js} +9 -8
  8. package/dist/_chunks/{bishop-score-Cnu0xs-z.js → bishop-score-CJUVBfAu.js} +2 -2
  9. package/dist/_chunks/{booking-CBHKdsZl.js → booking-DQbo6mQF.js} +609 -591
  10. package/dist/_chunks/{calendar-B4Gnyu1C.js → calendar-CHT9Rm3M.js} +2 -2
  11. package/dist/_chunks/{calendar-event-card-Bjdbik8G.js → calendar-event-card-BjdHZaqz.js} +18 -14
  12. package/dist/_chunks/calendar-plus-BFrIRE4r.js +19 -0
  13. package/dist/_chunks/calendar-workspace-DI49_t6t.js +7429 -0
  14. package/dist/_chunks/{care-plan-card-aDN4oem9.js → care-plan-card-D-FMfDKH.js} +2 -2
  15. package/dist/_chunks/{care-plan-entry-card-BEhANdBE.js → care-plan-entry-card-Bvw_9T-d.js} +2 -2
  16. package/dist/_chunks/{care-plan-header-CkpPyQqG.js → care-plan-header-B5CBE0zu.js} +2 -2
  17. package/dist/_chunks/{city-input-towzBenY.js → city-input-DaQc-Hbj.js} +2 -2
  18. package/dist/_chunks/clipboard-list-rSzfIYZB.js +25 -0
  19. package/dist/_chunks/{color-picker-oZ6zYks8.js → color-picker-CU303VjY.js} +4 -2
  20. package/dist/_chunks/{combobox-DiMLItyu.js → combobox-D7_NLE2Z.js} +89 -81
  21. package/dist/_chunks/{contact-profile-card-BMIBr5s9.js → contact-profile-card-BZqi8Hck.js} +38 -36
  22. package/dist/_chunks/{country-select-UEF9BEeQ.js → country-select-DzbPFktV.js} +2 -2
  23. package/dist/_chunks/data-table-DC5rO3Ty.js +1817 -0
  24. package/dist/_chunks/{document-preview-oyx9RhCo.js → document-preview-CDb-n_W7.js} +2 -2
  25. package/dist/_chunks/{face-scheme-CZaKm6fG.js → face-scheme-DA2vjqaM.js} +2 -2
  26. package/dist/_chunks/{field-value-DG8zaZvo.js → field-value-D-vkX9uL.js} +120 -140
  27. package/dist/_chunks/{file-manager-C0y7HBAN.js → file-manager-DJMeB3V8.js} +138 -153
  28. package/dist/_chunks/folder-plus-CutOs4DP.js +22 -0
  29. package/dist/_chunks/{gestational-age-calculator-CxZelpu2.js → gestational-age-calculator-CiOQjzgx.js} +2 -2
  30. package/dist/_chunks/hourglass-BEAzW1wE.js +26 -0
  31. package/dist/_chunks/key-value-pair-BIBdZBLg.js +188 -0
  32. package/dist/_chunks/{link-cell-renderer-CenJx-_7.js → link-cell-renderer-CIASXsVM.js} +4 -4
  33. package/dist/_chunks/{multi-select-DqL4o0qV.js → multi-select-DYOvx2SJ.js} +56 -48
  34. package/dist/_chunks/{muscle-scheme-yfzP_xoJ.js → muscle-scheme-BSJsI4-I.js} +2 -2
  35. package/dist/_chunks/{notes-panel-CymneXtl.js → notes-panel-DYAtlq_i.js} +2 -2
  36. package/dist/_chunks/{optical-prescription-Dj3Eh5Ok.js → optical-prescription-BvwuqTpl.js} +2 -2
  37. package/dist/_chunks/{patient-details-xrqe13az.js → patient-details-BfzvFnxQ.js} +75 -94
  38. package/dist/_chunks/{patient-search-D5ufYoRc.js → patient-search-HeEUB-_X.js} +2 -2
  39. package/dist/_chunks/{patient-summary-card-CBfuDvJ5.js → patient-summary-card-D5Vfa321.js} +3 -3
  40. package/dist/_chunks/{payment-request-card-YVCcCZ25.js → payment-request-card-lmKLwsDs.js} +2 -2
  41. package/dist/_chunks/{periodontal-chart-BatZEFar.js → periodontal-chart-B9fphroR.js} +2 -2
  42. package/dist/_chunks/{periodontal-chart-card-BBpY_rBc.js → periodontal-chart-card-qEZPXj83.js} +2 -2
  43. package/dist/_chunks/{practice-results-D7ygCj_W.js → practice-results-DL_ExLYE.js} +159 -172
  44. package/dist/_chunks/{pregnancy-dating-DtToyMyc.js → pregnancy-dating-D2wchD11.js} +2 -2
  45. package/dist/_chunks/{province-select-BDywtmL-.js → province-select-BBc7s7vR.js} +2 -2
  46. package/dist/_chunks/{rich-text-editor-BDfFtK4H.js → rich-text-editor-DtbcA6s1.js} +2 -2
  47. package/dist/_chunks/{select-BW5ecXlX.js → select-Bi8zril7.js} +165 -136
  48. package/dist/_chunks/signature-CpFNpsVK.js +21 -0
  49. package/dist/_chunks/{signature-field-0rFODJlW.js → signature-field-CEiPe-vX.js} +19 -34
  50. package/dist/_chunks/{signature-request-DVDTKLjM.js → signature-request-CUe903hj.js} +2 -2
  51. package/dist/_chunks/smartphone-C0rFF2if.js +15 -0
  52. package/dist/_chunks/{tabs-CBb2AidH.js → tabs-DqKtTIjZ.js} +2 -2
  53. package/dist/_chunks/{tasks-panel-Do5SFp-j.js → tasks-panel-DPCNaRko.js} +2 -2
  54. package/dist/_chunks/{toast.agent-D1tdg6DS.js → toast-YZz2sBzB.js} +160 -212
  55. package/dist/_chunks/toast.agent-DNQ0JYGv.js +56 -0
  56. package/dist/_chunks/{tooth-scheme-WdyVymQ1.js → tooth-scheme-2IsmbE6w.js} +2 -2
  57. package/dist/_chunks/{unit-converter-BPumXMA6.js → unit-converter-C6jMjqL9.js} +2 -2
  58. package/dist/_chunks/{workflow-map-DE_ribRM.js → workflow-map-dNzJjBWG.js} +104 -113
  59. package/dist/agent-catalog.json +867 -1
  60. package/dist/agent-i18n/en.json +27 -0
  61. package/dist/components/_shared/option.d.ts +1 -0
  62. package/dist/components/address-fields/index.js +1 -1
  63. package/dist/components/ai-prompt-input/index.js +1 -1
  64. package/dist/components/audio-recorder/index.js +1 -1
  65. package/dist/components/autocomplete/index.js +1 -1
  66. package/dist/components/bishop-score/index.js +1 -1
  67. package/dist/components/booking/index.js +1 -1
  68. package/dist/components/calendar/index.js +1 -1
  69. package/dist/components/calendar-event-card/index.js +1 -1
  70. package/dist/components/care-plan-card/index.js +1 -1
  71. package/dist/components/care-plan-entry-card/index.js +1 -1
  72. package/dist/components/care-plan-header/index.js +1 -1
  73. package/dist/components/city-input/index.js +1 -1
  74. package/dist/components/color-picker/index.js +1 -1
  75. package/dist/components/combobox/index.js +1 -1
  76. package/dist/components/contact-profile-card/index.js +1 -1
  77. package/dist/components/country-select/index.js +1 -1
  78. package/dist/components/data-table/index.js +39 -38
  79. package/dist/components/document-preview/index.js +1 -1
  80. package/dist/components/face-scheme/index.js +1 -1
  81. package/dist/components/file-manager/index.js +1 -1
  82. package/dist/components/gestational-age-calculator/index.js +1 -1
  83. package/dist/components/index.d.ts +1 -0
  84. package/dist/components/key-value-pair/index.js +1 -1
  85. package/dist/components/key-value-pair/key-value-pair.d.ts +16 -0
  86. package/dist/components/multi-select/index.js +1 -1
  87. package/dist/components/muscle-scheme/index.js +1 -1
  88. package/dist/components/notes-panel/index.js +1 -1
  89. package/dist/components/optical-prescription/index.js +1 -1
  90. package/dist/components/patient-details/index.js +1 -1
  91. package/dist/components/patient-search/index.js +1 -1
  92. package/dist/components/patient-summary-card/index.js +1 -1
  93. package/dist/components/patient-table/index.js +1 -1
  94. package/dist/components/payment-card/index.js +1 -1
  95. package/dist/components/periodontal-chart/index.js +1 -1
  96. package/dist/components/periodontal-chart-card/index.js +1 -1
  97. package/dist/components/practice-results/index.js +1 -1
  98. package/dist/components/pregnancy-dating/index.js +1 -1
  99. package/dist/components/province-select/index.js +1 -1
  100. package/dist/components/rich-text-editor/index.js +1 -1
  101. package/dist/components/select/index.js +1 -1
  102. package/dist/components/select/select.d.ts +24 -0
  103. package/dist/components/signature-field/index.js +1 -1
  104. package/dist/components/skeleton-scheme/index.js +1 -1
  105. package/dist/components/tabs/index.js +1 -1
  106. package/dist/components/tasks-panel/index.js +1 -1
  107. package/dist/components/toast/index.js +7 -6
  108. package/dist/components/tooth-scheme/index.js +1 -1
  109. package/dist/components/unit-converter/index.js +1 -1
  110. package/dist/components/workflow/index.js +1 -1
  111. package/dist/i18n/locales/ar.d.ts +680 -0
  112. package/dist/i18n/locales/ar.js +680 -0
  113. package/dist/i18n/locales/de.d.ts +680 -0
  114. package/dist/i18n/locales/de.js +680 -0
  115. package/dist/i18n/locales/el.d.ts +680 -0
  116. package/dist/i18n/locales/el.js +680 -0
  117. package/dist/i18n/locales/en.d.ts +680 -0
  118. package/dist/i18n/locales/en.js +680 -0
  119. package/dist/i18n/locales/es.d.ts +680 -0
  120. package/dist/i18n/locales/es.js +680 -0
  121. package/dist/i18n/locales/fr.d.ts +680 -0
  122. package/dist/i18n/locales/fr.js +680 -0
  123. package/dist/i18n/locales/hi.d.ts +680 -0
  124. package/dist/i18n/locales/hi.js +680 -0
  125. package/dist/i18n/locales/it.d.ts +680 -0
  126. package/dist/i18n/locales/it.js +680 -0
  127. package/dist/i18n/locales/ja.d.ts +680 -0
  128. package/dist/i18n/locales/ja.js +680 -0
  129. package/dist/i18n/locales/nl.d.ts +680 -0
  130. package/dist/i18n/locales/nl.js +680 -0
  131. package/dist/i18n/locales/pl.d.ts +680 -0
  132. package/dist/i18n/locales/pl.js +680 -0
  133. package/dist/i18n/locales/pt.d.ts +680 -0
  134. package/dist/i18n/locales/pt.js +680 -0
  135. package/dist/i18n/locales/ro.d.ts +680 -0
  136. package/dist/i18n/locales/ro.js +680 -0
  137. package/dist/i18n/locales/ru.d.ts +680 -0
  138. package/dist/i18n/locales/ru.js +680 -0
  139. package/dist/i18n/locales/sq.d.ts +680 -0
  140. package/dist/i18n/locales/sq.js +680 -0
  141. package/dist/i18n/locales/sv.d.ts +680 -0
  142. package/dist/i18n/locales/sv.js +680 -0
  143. package/dist/i18n/locales/tr.d.ts +680 -0
  144. package/dist/i18n/locales/tr.js +680 -0
  145. package/dist/i18n/locales/zh.d.ts +680 -0
  146. package/dist/i18n/locales/zh.js +680 -0
  147. package/dist/index.js +830 -812
  148. package/dist/locales/ar.json +680 -0
  149. package/dist/locales/de.json +680 -0
  150. package/dist/locales/el.json +680 -0
  151. package/dist/locales/en.json +680 -0
  152. package/dist/locales/es.json +680 -0
  153. package/dist/locales/fr.json +680 -0
  154. package/dist/locales/hi.json +680 -0
  155. package/dist/locales/it.json +680 -0
  156. package/dist/locales/ja.json +680 -0
  157. package/dist/locales/nl.json +680 -0
  158. package/dist/locales/pl.json +680 -0
  159. package/dist/locales/pt.json +680 -0
  160. package/dist/locales/ro.json +680 -0
  161. package/dist/locales/ru.json +680 -0
  162. package/dist/locales/sq.json +680 -0
  163. package/dist/locales/sv.json +680 -0
  164. package/dist/locales/tr.json +680 -0
  165. package/dist/locales/zh.json +680 -0
  166. package/dist/patterns/anamnesis/index.js +1 -1
  167. package/dist/patterns/calendar/calendar-workspace.d.ts +62 -0
  168. package/dist/patterns/calendar/calendar-workspace.model.d.ts +358 -0
  169. package/dist/patterns/calendar/calendar.data.d.ts +122 -0
  170. package/dist/patterns/calendar/calendar.host.d.ts +10 -0
  171. package/dist/patterns/calendar/calendar.journey.d.ts +119 -0
  172. package/dist/patterns/calendar/calendar.model.d.ts +684 -0
  173. package/dist/patterns/calendar/calendar.preferences.d.ts +74 -0
  174. package/dist/patterns/calendar/calendar.sheets.d.ts +398 -0
  175. package/dist/patterns/calendar/calendar.surface.d.ts +77 -0
  176. package/dist/patterns/calendar/calendar.types.d.ts +413 -0
  177. package/dist/patterns/calendar/index.d.ts +13 -0
  178. package/dist/patterns/calendar/index.js +19 -0
  179. package/dist/patterns/signature-request/index.js +1 -1
  180. package/package.json +5 -1
  181. package/dist/_chunks/actions-cell-renderer-DnSLrgQD.js +0 -1945
  182. package/dist/_chunks/key-value-pair-BubG4fUa.js +0 -144
@@ -7,7 +7,7 @@ import { C as B } from "./card-DPmk26CL.js";
7
7
  import { E as G } from "./empty-state-X0sVPfVo.js";
8
8
  import { P as Y } from "./panel-header-D313n_9-.js";
9
9
  import { P as J } from "./pdf-viewer-DUIsV9s5.js";
10
- import { T as O, b as Q, c as X, a as Z } from "./tabs-CBb2AidH.js";
10
+ import { T as O, b as Q, c as X, a as Z } from "./tabs-DqKtTIjZ.js";
11
11
  import { u as ee } from "./registry-DvAUVLHh.js";
12
12
  import { F as ie, a as te } from "./file-Cwe9VC1A.js";
13
13
  import { F as se } from "./file-text-5yv6r2ls.js";
@@ -287,4 +287,4 @@ export {
287
287
  ue as D,
288
288
  de as d
289
289
  };
290
- //# sourceMappingURL=document-preview-oyx9RhCo.js.map
290
+ //# sourceMappingURL=document-preview-CDb-n_W7.js.map
@@ -8,7 +8,7 @@ import { m as tt, M as Ji, A as Qi } from "./annotation-marker-CsUJGZjQ.js";
8
8
  import { B as P } from "./button-nJaPh_HC.js";
9
9
  import { I as Ze } from "./icon-button-DA2CAGHZ.js";
10
10
  import { B as es } from "./button-group-CaxRJsNG.js";
11
- import { C as ts } from "./combobox-DiMLItyu.js";
11
+ import { C as ts } from "./combobox-D7_NLE2Z.js";
12
12
  import { I as vn } from "./icon-button-group-VCCod3Hz.js";
13
13
  import { T as Ar } from "./text-input-CUvCb6ST.js";
14
14
  import { C as Oe } from "./card-DPmk26CL.js";
@@ -3137,4 +3137,4 @@ export {
3137
3137
  Nn as t,
3138
3138
  Kr as u
3139
3139
  };
3140
- //# sourceMappingURL=face-scheme-CZaKm6fG.js.map
3140
+ //# sourceMappingURL=face-scheme-DA2vjqaM.js.map
@@ -1,11 +1,11 @@
1
- import { useMemo as O, useCallback as D, useState as E, cloneElement as X } from "react";
1
+ import { useMemo as O, useCallback as S, useState as _, cloneElement as X } from "react";
2
2
  import { u as J } from "./use-controllable-state-BiY4xTzM.js";
3
3
  import { jsxs as I, jsx as r, Fragment as Q } from "react/jsx-runtime";
4
4
  import { useTranslation as P } from "react-i18next";
5
5
  import { B as W } from "./button-nJaPh_HC.js";
6
- import { I as j } from "./icon-button-DA2CAGHZ.js";
7
- import { C as $ } from "./checkbox-BuZ1u__2.js";
8
- import { P as T } from "./popover-Cqcjx-Ny.js";
6
+ import { I as U } from "./icon-button-DA2CAGHZ.js";
7
+ import { C as j } from "./checkbox-BuZ1u__2.js";
8
+ import { P as M } from "./popover-Cqcjx-Ny.js";
9
9
  import { S as Y } from "./separator-CYU_bGFn.js";
10
10
  import { S as Z } from "./settings-d25ju_6L.js";
11
11
  import { G as ee } from "./grip-vertical-onSb1JXO.js";
@@ -13,154 +13,134 @@ import { B as H } from "./badge-sTusUqZD.js";
13
13
  import { L as te } from "./link-CPb_pZPr.js";
14
14
  import { T as ne } from "./transaction-chip-DJCstquX.js";
15
15
  import { H as re } from "./hash-CSQ9SChR.js";
16
- import { C as ae } from "./calendar-days-BGWklvE-.js";
17
- import { c as U } from "./createLucideIcon-DhHxpK9K.js";
18
- import { U as se } from "./user-B12p7bVF.js";
16
+ import { C as se } from "./calendar-days-BGWklvE-.js";
17
+ import { H as ae } from "./hourglass-BEAzW1wE.js";
18
+ import { c as $ } from "./createLucideIcon-DhHxpK9K.js";
19
+ import { U as ie } from "./user-B12p7bVF.js";
19
20
  /**
20
21
  * @license lucide-react v1.22.0 - ISC
21
22
  *
22
23
  * This source code is licensed under the ISC license.
23
24
  * See the LICENSE file in the root directory of this source tree.
24
25
  */
25
- const ie = [
26
- ["path", { d: "M5 22h14", key: "ehvnwv" }],
27
- ["path", { d: "M5 2h14", key: "pdyrp9" }],
28
- [
29
- "path",
30
- {
31
- d: "M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",
32
- key: "1d314k"
33
- }
34
- ],
35
- [
36
- "path",
37
- { d: "M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2", key: "1vvvr6" }
38
- ]
39
- ], oe = U("hourglass", ie);
40
- /**
41
- * @license lucide-react v1.22.0 - ISC
42
- *
43
- * This source code is licensed under the ISC license.
44
- * See the LICENSE file in the root directory of this source tree.
45
- */
46
- const le = [
26
+ const oe = [
47
27
  ["path", { d: "M16 3h5v5", key: "1806ms" }],
48
28
  ["path", { d: "m21 3-6.75 6.75", key: "pv0uzu" }],
49
29
  ["circle", { cx: "10", cy: "14", r: "6", key: "1qwbdc" }]
50
- ], ce = U("mars", le);
30
+ ], le = $("mars", oe);
51
31
  /**
52
32
  * @license lucide-react v1.22.0 - ISC
53
33
  *
54
34
  * This source code is licensed under the ISC license.
55
35
  * See the LICENSE file in the root directory of this source tree.
56
36
  */
57
- const de = [
37
+ const ce = [
58
38
  ["path", { d: "M12 15v7", key: "t2xh3l" }],
59
39
  ["path", { d: "M9 19h6", key: "456am0" }],
60
40
  ["circle", { cx: "12", cy: "9", r: "6", key: "1nw4tq" }]
61
- ], ue = U("venus", de);
41
+ ], de = $("venus", ce);
62
42
  function G(e) {
63
43
  return e.flatMap((d) => d.fields.map((t) => t.id));
64
44
  }
65
45
  function ze(e, d) {
66
- const t = d ?? G(e), m = new Map(t.map((s, y) => [s, y]));
67
- return e.map((s) => ({
68
- section: s,
69
- fields: s.fields.filter((y) => m.has(y.id)).sort(
70
- (y, S) => m.get(y.id) - m.get(S.id)
46
+ const t = d ?? G(e), m = new Map(t.map((a, x) => [a, x]));
47
+ return e.map((a) => ({
48
+ section: a,
49
+ fields: a.fields.filter((x) => m.has(x.id)).sort(
50
+ (x, w) => m.get(x.id) - m.get(w.id)
71
51
  )
72
52
  }));
73
53
  }
74
54
  function Pe(e, { value: d, defaultValue: t, onChange: m } = {}) {
75
- const s = O(
55
+ const a = O(
76
56
  () => G(e),
77
57
  [e]
78
- ), [y, S] = J({
58
+ ), [x, w] = J({
79
59
  value: d,
80
- defaultValue: t ?? s,
60
+ defaultValue: t ?? a,
81
61
  onChange: m
82
- }), i = y ?? t ?? s, x = O(() => {
83
- const p = /* @__PURE__ */ new Map();
84
- for (const f of e)
85
- for (const g of f.fields)
86
- p.set(g.id, { field: g, sectionId: f.id });
87
- return p;
88
- }, [e]), u = D(
89
- (p) => {
90
- S(p.filter((f) => x.has(f)));
62
+ }), i = x ?? t ?? a, y = O(() => {
63
+ const f = /* @__PURE__ */ new Map();
64
+ for (const p of e)
65
+ for (const g of p.fields)
66
+ f.set(g.id, { field: g, sectionId: p.id });
67
+ return f;
68
+ }, [e]), u = S(
69
+ (f) => {
70
+ w(f.filter((p) => y.has(p)));
91
71
  },
92
- [S, x]
93
- ), M = D(
94
- (p) => {
72
+ [w, y]
73
+ ), T = S(
74
+ (f) => {
95
75
  u(
96
- i.includes(p) ? i.filter((f) => f !== p) : [...i, p]
76
+ i.includes(f) ? i.filter((p) => p !== f) : [...i, f]
97
77
  );
98
78
  },
99
79
  [i, u]
100
- ), L = D(
101
- (p, f) => {
102
- var w;
103
- const g = ((w = e.find((o) => o.id === p)) == null ? void 0 : w.fields.map((o) => o.id)) ?? [], V = new Set(g);
104
- if (f) {
80
+ ), B = S(
81
+ (f, p) => {
82
+ var D;
83
+ const g = ((D = e.find((o) => o.id === f)) == null ? void 0 : D.fields.map((o) => o.id)) ?? [], C = new Set(g);
84
+ if (p) {
105
85
  const o = g.filter((l) => !i.includes(l));
106
86
  u([...i, ...o]);
107
87
  } else
108
- u(i.filter((o) => !V.has(o)));
88
+ u(i.filter((o) => !C.has(o)));
109
89
  },
110
90
  [e, i, u]
111
- ), N = D(
112
- (p, f) => {
113
- var A, n, C;
114
- if (p === f) return;
115
- const g = (A = x.get(p)) == null ? void 0 : A.sectionId, V = (n = x.get(f)) == null ? void 0 : n.sectionId;
116
- if (!g || g !== V) return;
117
- const w = new Set(
118
- ((C = e.find((c) => c.id === g)) == null ? void 0 : C.fields.map((c) => c.id)) ?? []
119
- ), o = i.filter((c) => w.has(c)), l = o.indexOf(p), v = o.indexOf(f);
91
+ ), N = S(
92
+ (f, p) => {
93
+ var A, n, V;
94
+ if (f === p) return;
95
+ const g = (A = y.get(f)) == null ? void 0 : A.sectionId, C = (n = y.get(p)) == null ? void 0 : n.sectionId;
96
+ if (!g || g !== C) return;
97
+ const D = new Set(
98
+ ((V = e.find((c) => c.id === g)) == null ? void 0 : V.fields.map((c) => c.id)) ?? []
99
+ ), o = i.filter((c) => D.has(c)), l = o.indexOf(f), v = o.indexOf(p);
120
100
  if (l < 0 || v < 0) return;
121
101
  const [b] = o.splice(l, 1);
122
102
  o.splice(v, 0, b);
123
103
  let h = 0;
124
- const B = i.map(
125
- (c) => w.has(c) ? o[h++] : c
104
+ const L = i.map(
105
+ (c) => D.has(c) ? o[h++] : c
126
106
  );
127
- u(B);
107
+ u(L);
128
108
  },
129
- [x, e, i, u]
130
- ), _ = D(() => {
131
- u(t ?? s);
132
- }, [t, s, u]);
109
+ [y, e, i, u]
110
+ ), E = S(() => {
111
+ u(t ?? a);
112
+ }, [t, a, u]);
133
113
  return {
134
114
  visible: i,
135
- catalogueIds: s,
136
- fieldById: x,
115
+ catalogueIds: a,
116
+ fieldById: y,
137
117
  setOrder: u,
138
- toggleField: M,
139
- toggleSection: L,
118
+ toggleField: T,
119
+ toggleSection: B,
140
120
  moveFieldOnto: N,
141
- reset: _
121
+ reset: E
142
122
  };
143
123
  }
144
- function Le({
124
+ function Be({
145
125
  sections: e,
146
126
  visible: d,
147
127
  onToggleField: t,
148
128
  onToggleSection: m,
149
- onMoveFieldOnto: s,
150
- onReset: y,
151
- label: S
129
+ onMoveFieldOnto: a,
130
+ onReset: x,
131
+ label: w
152
132
  }) {
153
- const { t: i } = P(), x = O(() => new Set(d), [d]), [u, M] = E(null), [L, N] = E(null), [_, p] = E(""), { sectionOfField: f, labelOfField: g } = O(() => {
133
+ const { t: i } = P(), y = O(() => new Set(d), [d]), [u, T] = _(null), [B, N] = _(null), [E, f] = _(""), { sectionOfField: p, labelOfField: g } = O(() => {
154
134
  const l = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map();
155
135
  for (const b of e)
156
136
  for (const h of b.fields)
157
137
  l.set(h.id, b.id), v.set(h.id, h.label);
158
138
  return { sectionOfField: l, labelOfField: v };
159
- }, [e]), V = u ? f.get(u) : void 0, w = D(() => {
160
- M(null), N(null);
161
- }, []), o = D(
139
+ }, [e]), C = u ? p.get(u) : void 0, D = S(() => {
140
+ T(null), N(null);
141
+ }, []), o = S(
162
142
  (l, v, b) => {
163
- p(
143
+ f(
164
144
  i("fieldPicker.moved", {
165
145
  field: g.get(l) ?? "",
166
146
  position: v + 1,
@@ -171,37 +151,37 @@ function Le({
171
151
  },
172
152
  [i, g]
173
153
  );
174
- return /* @__PURE__ */ I(T.Root, { children: [
175
- /* @__PURE__ */ r(T.Trigger, { asChild: !0, children: /* @__PURE__ */ r(
176
- j,
154
+ return /* @__PURE__ */ I(M.Root, { children: [
155
+ /* @__PURE__ */ r(M.Trigger, { asChild: !0, children: /* @__PURE__ */ r(
156
+ U,
177
157
  {
178
158
  size: "sm",
179
159
  intent: "outline",
180
160
  icon: /* @__PURE__ */ r(Z, { "aria-hidden": "true" }),
181
- "aria-label": S ?? i("fieldPicker.trigger", { defaultValue: "Customize fields" }),
161
+ "aria-label": w ?? i("fieldPicker.trigger", { defaultValue: "Customize fields" }),
182
162
  className: "ds:shrink-0"
183
163
  }
184
164
  ) }),
185
- /* @__PURE__ */ I(T.Content, { align: "end", size: "sm", children: [
186
- /* @__PURE__ */ r(T.Heading, { children: i("fieldPicker.title", { defaultValue: "Customize fields" }) }),
165
+ /* @__PURE__ */ I(M.Content, { align: "end", size: "sm", children: [
166
+ /* @__PURE__ */ r(M.Heading, { children: i("fieldPicker.title", { defaultValue: "Customize fields" }) }),
187
167
  /* @__PURE__ */ I("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:mt-[var(--spacing-xs)]", children: [
188
168
  e.map((l) => {
189
169
  const v = l.fields.map((n) => n.id), b = v.filter(
190
- (n) => x.has(n)
170
+ (n) => y.has(n)
191
171
  ).length, h = d.filter(
192
172
  (n) => v.includes(n)
193
- ), B = b === 0 ? !1 : b === v.length ? !0 : "indeterminate", A = !!l.heading;
173
+ ), L = b === 0 ? !1 : b === v.length ? !0 : "indeterminate", A = !!l.heading;
194
174
  return /* @__PURE__ */ I(
195
175
  "div",
196
176
  {
197
177
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
198
178
  children: [
199
179
  A ? /* @__PURE__ */ r(
200
- $,
180
+ j,
201
181
  {
202
182
  size: "sm",
203
183
  label: l.heading,
204
- checked: B,
184
+ checked: L,
205
185
  onCheckedChange: (n) => m(l.id, n === !0)
206
186
  }
207
187
  ) : null,
@@ -213,27 +193,27 @@ function Le({
213
193
  A ? "ds:ps-[var(--spacing-md)]" : "ds:ps-0"
214
194
  ].join(" "),
215
195
  children: l.fields.map((n) => {
216
- const C = x.has(n.id), c = h.indexOf(n.id), k = h.length, q = u === n.id, K = L === n.id && u !== null && u !== n.id && V === l.id;
196
+ const V = y.has(n.id), c = h.indexOf(n.id), k = h.length, q = u === n.id, K = B === n.id && u !== null && u !== n.id && C === l.id;
217
197
  return /* @__PURE__ */ I(
218
198
  "li",
219
199
  {
220
- ...C ? {
200
+ ...V ? {
221
201
  draggable: !0,
222
- onDragStart: (a) => {
223
- M(n.id), a.dataTransfer.effectAllowed = "move", a.dataTransfer.setData("text/plain", n.id);
202
+ onDragStart: (s) => {
203
+ T(n.id), s.dataTransfer.effectAllowed = "move", s.dataTransfer.setData("text/plain", n.id);
224
204
  },
225
- onDragOver: (a) => {
226
- u === null || V !== l.id || (a.preventDefault(), a.dataTransfer.dropEffect = "move", N(n.id));
205
+ onDragOver: (s) => {
206
+ u === null || C !== l.id || (s.preventDefault(), s.dataTransfer.dropEffect = "move", N(n.id));
227
207
  },
228
208
  onDragLeave: () => N(
229
- (a) => a === n.id ? null : a
209
+ (s) => s === n.id ? null : s
230
210
  ),
231
- onDrop: (a) => {
232
- a.preventDefault();
233
- const F = a.dataTransfer.getData("text/plain");
234
- F && F !== n.id && f.get(F) === l.id && (s(F, n.id), o(F, c, k)), w();
211
+ onDrop: (s) => {
212
+ s.preventDefault();
213
+ const F = s.dataTransfer.getData("text/plain");
214
+ F && F !== n.id && p.get(F) === l.id && (a(F, n.id), o(F, c, k)), D();
235
215
  },
236
- onDragEnd: w
216
+ onDragEnd: D
237
217
  } : {},
238
218
  className: [
239
219
  "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-2xs)] ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-2xs)] ds:py-[var(--spacing-2xs)] ds:transition-colors ds:motion-reduce:transition-none",
@@ -242,16 +222,16 @@ function Le({
242
222
  ].filter(Boolean).join(" "),
243
223
  children: [
244
224
  /* @__PURE__ */ r(
245
- $,
225
+ j,
246
226
  {
247
227
  size: "sm",
248
228
  label: n.label,
249
- checked: C,
229
+ checked: V,
250
230
  onCheckedChange: () => t(n.id)
251
231
  }
252
232
  ),
253
- C ? /* @__PURE__ */ r(
254
- j,
233
+ V ? /* @__PURE__ */ r(
234
+ U,
255
235
  {
256
236
  size: "sm",
257
237
  intent: "ghost",
@@ -262,26 +242,26 @@ function Le({
262
242
  }),
263
243
  "aria-keyshortcuts": "Alt+ArrowUp Alt+ArrowDown Alt+Home Alt+End",
264
244
  className: "ds:shrink-0 ds:cursor-grab ds:active:cursor-grabbing",
265
- onKeyDown: (a) => {
266
- if (a.altKey) {
267
- if (a.key === "ArrowUp") {
245
+ onKeyDown: (s) => {
246
+ if (s.altKey) {
247
+ if (s.key === "ArrowUp") {
268
248
  if (c <= 0) return;
269
- a.preventDefault(), s(
249
+ s.preventDefault(), a(
270
250
  n.id,
271
251
  h[c - 1]
272
252
  ), o(n.id, c - 1, k);
273
- } else if (a.key === "ArrowDown") {
253
+ } else if (s.key === "ArrowDown") {
274
254
  if (c >= k - 1) return;
275
- a.preventDefault(), s(
255
+ s.preventDefault(), a(
276
256
  n.id,
277
257
  h[c + 1]
278
258
  ), o(n.id, c + 1, k);
279
- } else if (a.key === "Home") {
259
+ } else if (s.key === "Home") {
280
260
  if (c <= 0) return;
281
- a.preventDefault(), s(n.id, h[0]), o(n.id, 0, k);
282
- } else if (a.key === "End") {
261
+ s.preventDefault(), a(n.id, h[0]), o(n.id, 0, k);
262
+ } else if (s.key === "End") {
283
263
  if (c >= k - 1) return;
284
- a.preventDefault(), s(
264
+ s.preventDefault(), a(
285
265
  n.id,
286
266
  h[k - 1]
287
267
  ), o(n.id, k - 1, k);
@@ -303,13 +283,13 @@ function Le({
303
283
  );
304
284
  }),
305
285
  /* @__PURE__ */ r(Y, { orientation: "horizontal" }),
306
- /* @__PURE__ */ r(W, { type: "button", size: "sm", intent: "ghost", onClick: y, children: i("fieldPicker.reset", { defaultValue: "Reset to defaults" }) })
286
+ /* @__PURE__ */ r(W, { type: "button", size: "sm", intent: "ghost", onClick: x, children: i("fieldPicker.reset", { defaultValue: "Reset to defaults" }) })
307
287
  ] }),
308
- /* @__PURE__ */ r("span", { role: "status", className: "ds:sr-only", children: _ })
288
+ /* @__PURE__ */ r("span", { role: "status", className: "ds:sr-only", children: E })
309
289
  ] })
310
290
  ] });
311
291
  }
312
- const R = "ds:text-[color:var(--foreground)]", me = {
292
+ const R = "ds:text-[color:var(--foreground)]", ue = {
313
293
  m: "Male",
314
294
  f: "Female",
315
295
  x: "Other"
@@ -331,20 +311,20 @@ function z({
331
311
  }
332
312
  );
333
313
  }
334
- function pe({ code: e }) {
314
+ function me({ code: e }) {
335
315
  const { t: d } = P(), t = e.toLowerCase(), m = d(`patientField.sex.${t}`, {
336
- defaultValue: me[t] ?? e
316
+ defaultValue: ue[t] ?? e
337
317
  });
338
- return t === "f" ? /* @__PURE__ */ r(H, { variant: "accentSoft", leading: /* @__PURE__ */ r(ue, {}), children: m }) : t === "m" ? /* @__PURE__ */ r(H, { variant: "info", leading: /* @__PURE__ */ r(ce, {}), children: m }) : /* @__PURE__ */ r(z, { icon: /* @__PURE__ */ r(se, {}), children: m });
318
+ return t === "f" ? /* @__PURE__ */ r(H, { variant: "accentSoft", leading: /* @__PURE__ */ r(de, {}), children: m }) : t === "m" ? /* @__PURE__ */ r(H, { variant: "info", leading: /* @__PURE__ */ r(le, {}), children: m }) : /* @__PURE__ */ r(z, { icon: /* @__PURE__ */ r(ie, {}), children: m });
339
319
  }
340
320
  function fe({ years: e }) {
341
321
  const { t: d } = P();
342
- return /* @__PURE__ */ r(z, { icon: /* @__PURE__ */ r(oe, {}), children: d("patientField.age", {
322
+ return /* @__PURE__ */ r(z, { icon: /* @__PURE__ */ r(ae, {}), children: d("patientField.age", {
343
323
  count: e,
344
324
  defaultValue: "{{count}} years old"
345
325
  }) });
346
326
  }
347
- function _e({ field: e }) {
327
+ function Ee({ field: e }) {
348
328
  const { i18n: d } = P();
349
329
  if (e.kind === "email" || e.kind === "phone") {
350
330
  const t = typeof e.value == "string" ? e.value : e.copyText ?? (typeof e.editValue == "string" ? e.editValue : "");
@@ -359,18 +339,18 @@ function _e({ field: e }) {
359
339
  return null;
360
340
  switch (e.kind) {
361
341
  case "sex":
362
- return /* @__PURE__ */ r(pe, { code: String(e.editValue ?? "") });
342
+ return /* @__PURE__ */ r(me, { code: String(e.editValue ?? "") });
363
343
  case "age": {
364
344
  const t = typeof e.editValue == "number" ? e.editValue : Number(e.editValue);
365
345
  return Number.isFinite(t) ? /* @__PURE__ */ r(fe, { years: t }) : null;
366
346
  }
367
347
  case "dob": {
368
- const t = e.editValue, m = t instanceof Date ? t : new Date(String(t ?? "")), s = Number.isNaN(m.getTime()) ? String(t ?? "") : new Intl.DateTimeFormat(d.language, {
348
+ const t = e.editValue, m = t instanceof Date ? t : new Date(String(t ?? "")), a = Number.isNaN(m.getTime()) ? String(t ?? "") : new Intl.DateTimeFormat(d.language, {
369
349
  day: "numeric",
370
350
  month: "short",
371
351
  year: "numeric"
372
352
  }).format(m);
373
- return s ? /* @__PURE__ */ r(z, { icon: /* @__PURE__ */ r(ae, {}), children: s }) : null;
353
+ return a ? /* @__PURE__ */ r(z, { icon: /* @__PURE__ */ r(se, {}), children: a }) : null;
374
354
  }
375
355
  case "fiscalCode": {
376
356
  const t = e.copyText ?? (typeof e.editValue == "string" ? e.editValue : "");
@@ -394,11 +374,11 @@ function _e({ field: e }) {
394
374
  }
395
375
  export {
396
376
  fe as A,
397
- Le as F,
377
+ Be as F,
398
378
  z as N,
399
- pe as S,
400
- _e as a,
379
+ me as S,
380
+ Ee as a,
401
381
  ze as r,
402
382
  Pe as u
403
383
  };
404
- //# sourceMappingURL=field-value-DG8zaZvo.js.map
384
+ //# sourceMappingURL=field-value-D-vkX9uL.js.map