@alfadocs/ui-kit 1.4.11 → 1.4.13

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 (202) hide show
  1. package/dist/_chunks/actions-cell-renderer-BD-jruqA.js +1784 -0
  2. package/dist/_chunks/{address-fields-pHsfkXGk.js → address-fields-D-8akw2m.js} +2 -2
  3. package/dist/_chunks/{agenda-card-BCGaQazD.js → agenda-card-BQDs2ZMp.js} +2 -2
  4. package/dist/_chunks/{agenda-tray-CG6FuccE.js → agenda-tray-BTyWsVwT.js} +2 -2
  5. package/dist/_chunks/{ai-consent-banner-CpF_rbG9.js → ai-consent-banner-gVcoiXxv.js} +2 -2
  6. package/dist/_chunks/{anamnesis-card-C4FVp9wO.js → anamnesis-card-Bt0twrML.js} +2 -2
  7. package/dist/_chunks/anamnesis-summary-card-BKGVcwny.js +350 -0
  8. package/dist/_chunks/{anamnesis-summary-rows-Dw3l6nOD.js → anamnesis-summary-rows-B5MAYkJ-.js} +2768 -2951
  9. package/dist/_chunks/{antenatal-schedule-timeline-u8TsS2QJ.js → antenatal-schedule-timeline-BSLrOQ3S.js} +2 -2
  10. package/dist/_chunks/{appointment-card-DgKI5QKD.js → appointment-card-kcUC7vWR.js} +2 -2
  11. package/dist/_chunks/{appointment-timeline-CUijZCxZ.js → appointment-timeline-BC3dlZu5.js} +2 -2
  12. package/dist/_chunks/{appointment-tray-B1aUk46V.js → appointment-tray-BPY5rATW.js} +2 -2
  13. package/dist/_chunks/{badge-DCOqV9mI.js → badge-CIt-UFEx.js} +28 -28
  14. package/dist/_chunks/{bishop-score-Bpe20Ctl.js → bishop-score-B6iYYO0c.js} +3 -3
  15. package/dist/_chunks/{bmi-calculator-DF5bNsDD.js → bmi-calculator-DC5SaqXT.js} +5 -5
  16. package/dist/_chunks/{booking-DuSkvE5x.js → booking-CmHX15dh.js} +2 -2
  17. package/dist/_chunks/{care-plan-card-DiyK3Eys.js → care-plan-card-9tLgsDYY.js} +3 -3
  18. package/dist/_chunks/{care-plan-entry-card-6du8PYVk.js → care-plan-entry-card-CSan4h7A.js} +2 -2
  19. package/dist/_chunks/{care-plan-header-BWvDvly-.js → care-plan-header-D_BTi77b.js} +2 -2
  20. package/dist/_chunks/{clinical-note-card-D63x_AkK.js → clinical-note-card-ByzQ86uz.js} +2 -2
  21. package/dist/_chunks/{connection-status-Bi4Hwpd1.js → connection-status-D8mZ4klk.js} +2 -2
  22. package/dist/_chunks/{contact-profile-card-CGS_NABR.js → contact-profile-card-DuW6VpzY.js} +2 -2
  23. package/dist/_chunks/{cycle-calculator-Bd4_fJhq.js → cycle-calculator-B_NlctlQ.js} +4 -4
  24. package/dist/_chunks/{date-time-picker-DafkGDGO.js → date-time-picker-DVETwpzc.js} +2 -2
  25. package/dist/_chunks/{dependent-selector-DyFpdzZV.js → dependent-selector-BUvrZRi0.js} +2 -2
  26. package/dist/_chunks/{document-preview-DuMzmupZ.js → document-preview-Di15VrpQ.js} +2 -2
  27. package/dist/_chunks/{due-date-calculator-Do67C-Z-.js → due-date-calculator-le1z3KpW.js} +6 -6
  28. package/dist/_chunks/{fetal-weight-DHxXx7Uz.js → fetal-weight-DXA6ZpMq.js} +4 -4
  29. package/dist/_chunks/{field-value-C5A4t4OE.js → field-value-BCFLVBmu.js} +2 -2
  30. package/dist/_chunks/{file-manager-BY6FdHAt.js → file-manager-BjCM2fZB.js} +3 -3
  31. package/dist/_chunks/form-field-D1oqYisL.js +127 -0
  32. package/dist/_chunks/{gestational-age-calculator-CMhOtFE_.js → gestational-age-calculator-Ch8vmJAl.js} +5 -5
  33. package/dist/_chunks/{hcg-doubling-DNG9Q2go.js → hcg-doubling-BT6lki_i.js} +5 -5
  34. package/dist/_chunks/{link-cell-renderer-C8npOgmM.js → link-cell-renderer-C7GvyK66.js} +3 -3
  35. package/dist/_chunks/{marketplace-app-shell-BxOiy25s.js → marketplace-app-shell-BhRH7Zi4.js} +2 -2
  36. package/dist/_chunks/{notes-panel-BoyzMHI_.js → notes-panel-Bz83SO4-.js} +2 -2
  37. package/dist/_chunks/number-input-CM1q9zvH.js +414 -0
  38. package/dist/_chunks/{operator-hero-DVy0RGoD.js → operator-hero-CpJkDNAM.js} +2 -2
  39. package/dist/_chunks/{optical-prescription-Brs0CeP3.js → optical-prescription-CQR_WJiS.js} +2 -2
  40. package/dist/_chunks/{patient-details-Bf4iTAPp.js → patient-details-CnFgF3MU.js} +3 -3
  41. package/dist/_chunks/{patient-summary-card-dkV6a53T.js → patient-summary-card-DfbOtOV6.js} +3 -3
  42. package/dist/_chunks/{patient-table-zifAcsjV.js → patient-table-BXzcrC79.js} +4 -4
  43. package/dist/_chunks/{payment-automation-upsell-CZZPGfs0.js → payment-automation-upsell-Ckh3b7Xx.js} +2 -2
  44. package/dist/_chunks/{payment-request-card-Dy7_DA-2.js → payment-request-card-Dn6-tH-D.js} +2 -2
  45. package/dist/_chunks/{periodontal-chart-CfFgKXWa.js → periodontal-chart-B0yko9Xm.js} +2 -2
  46. package/dist/_chunks/{periodontal-chart-card--6yTUsrQ.js → periodontal-chart-card-HbYTmWlo.js} +2 -2
  47. package/dist/_chunks/{periodontal-diagnosis-cco40xTa.js → periodontal-diagnosis-Qk4F3Wc_.js} +3 -3
  48. package/dist/_chunks/{periodontal-risk-chart-bUGkMwDg.js → periodontal-risk-chart-ByKuM4cF.js} +2 -2
  49. package/dist/_chunks/{practice-results-Mys11x9p.js → practice-results-C5exrEn0.js} +2 -2
  50. package/dist/_chunks/{pregnancy-dating-t3oM4ZzC.js → pregnancy-dating-4tPV_Yko.js} +6 -6
  51. package/dist/_chunks/{pregnancy-weight-gain-Bfz7SbIw.js → pregnancy-weight-gain-BBgbWBGe.js} +5 -5
  52. package/dist/_chunks/radio-group-BmIqhIT2.js +171 -0
  53. package/dist/_chunks/{radiograph-panel.agent-DyA4wsZA.js → radiograph-panel.agent-Drj0hYVV.js} +3 -3
  54. package/dist/_chunks/signature-status-chip-DlLJk1VA.js +97 -0
  55. package/dist/_chunks/{tab-bar-BYESZINM.js → tab-bar-Ddp_ZbnL.js} +2 -2
  56. package/dist/_chunks/{tasks-panel-CoESdfZI.js → tasks-panel-T7vaKJcA.js} +2 -2
  57. package/dist/_chunks/{time-picker-BPlJWm8w.js → time-picker-D0RS391l.js} +66 -63
  58. package/dist/_chunks/{unit-converter-lUW9Q888.js → unit-converter-Dsk__pjA.js} +3 -3
  59. package/dist/_chunks/{widget-picker-DEmTVuFL.js → widget-picker-DqMbjQy_.js} +2 -2
  60. package/dist/_chunks/{workflow-map-C5PGP6cD.js → workflow-map-BNBeG2zn.js} +2 -2
  61. package/dist/agent-catalog.json +34 -34
  62. package/dist/agent-i18n/en.json +4 -4
  63. package/dist/components/address-fields/index.js +1 -1
  64. package/dist/components/agenda-card/index.js +1 -1
  65. package/dist/components/agenda-tray/index.js +1 -1
  66. package/dist/components/ai-consent-banner/index.js +1 -1
  67. package/dist/components/anamnesis-card/index.js +1 -1
  68. package/dist/components/anamnesis-summary-card/index.js +1 -1
  69. package/dist/components/appointment-card/index.js +2 -2
  70. package/dist/components/appointment-timeline/index.js +1 -1
  71. package/dist/components/badge/badge.d.ts +1 -0
  72. package/dist/components/badge/index.js +1 -1
  73. package/dist/components/bishop-score/index.js +1 -1
  74. package/dist/components/bmi-calculator/index.js +1 -1
  75. package/dist/components/booking/index.js +1 -1
  76. package/dist/components/care-plan-card/index.js +1 -1
  77. package/dist/components/care-plan-entry-card/index.js +1 -1
  78. package/dist/components/care-plan-header/index.js +1 -1
  79. package/dist/components/clinical-note-card/index.js +1 -1
  80. package/dist/components/connection-status/index.js +1 -1
  81. package/dist/components/contact-profile-card/index.js +1 -1
  82. package/dist/components/cycle-calculator/index.js +1 -1
  83. package/dist/components/data-table/data-table.d.ts +19 -0
  84. package/dist/components/data-table/expanded-row-renderer.d.ts +47 -0
  85. package/dist/components/data-table/index.d.ts +2 -0
  86. package/dist/components/data-table/index.js +31 -27
  87. package/dist/components/date-time-picker/index.js +1 -1
  88. package/dist/components/dependent-selector/index.js +1 -1
  89. package/dist/components/document-preview/index.js +1 -1
  90. package/dist/components/due-date-calculator/index.js +2 -2
  91. package/dist/components/fetal-weight/index.js +1 -1
  92. package/dist/components/file-manager/index.js +1 -1
  93. package/dist/components/form-field/form-field.d.ts +6 -0
  94. package/dist/components/form-field/index.js +1 -1
  95. package/dist/components/gestational-age-calculator/index.js +1 -1
  96. package/dist/components/hcg-doubling/index.js +1 -1
  97. package/dist/components/index.d.ts +1 -0
  98. package/dist/components/notes-panel/index.js +1 -1
  99. package/dist/components/number-input/index.js +1 -1
  100. package/dist/components/number-input/number-input.d.ts +11 -0
  101. package/dist/components/operator-hero/index.js +1 -1
  102. package/dist/components/optical-prescription/index.js +1 -1
  103. package/dist/components/patient-details/index.js +1 -1
  104. package/dist/components/patient-summary-card/index.js +1 -1
  105. package/dist/components/patient-table/index.js +1 -1
  106. package/dist/components/payment-card/index.js +1 -1
  107. package/dist/components/periodontal-chart/index.js +1 -1
  108. package/dist/components/periodontal-chart-card/index.js +1 -1
  109. package/dist/components/periodontal-diagnosis/index.js +1 -1
  110. package/dist/components/periodontal-risk-chart/index.js +1 -1
  111. package/dist/components/practice-results/index.js +1 -1
  112. package/dist/components/pregnancy-dating/index.js +1 -1
  113. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  114. package/dist/components/radio-group/index.js +1 -1
  115. package/dist/components/radio-group/radio-group.d.ts +3 -0
  116. package/dist/components/radiograph-panel/index.js +1 -1
  117. package/dist/components/signature-status-chip/index.d.ts +3 -0
  118. package/dist/components/signature-status-chip/index.js +6 -0
  119. package/dist/components/signature-status-chip/signature-status-chip.d.ts +29 -0
  120. package/dist/components/tab-bar/index.js +1 -1
  121. package/dist/components/tasks-panel/index.js +1 -1
  122. package/dist/components/time-picker/index.js +1 -1
  123. package/dist/components/unit-converter/index.js +1 -1
  124. package/dist/components/widget-picker/index.js +1 -1
  125. package/dist/components/workflow/index.js +1 -1
  126. package/dist/host-compat.css +4 -1
  127. package/dist/i18n/locales/ar.d.ts +17 -0
  128. package/dist/i18n/locales/ar.js +11 -0
  129. package/dist/i18n/locales/de.d.ts +17 -0
  130. package/dist/i18n/locales/de.js +11 -0
  131. package/dist/i18n/locales/el.d.ts +17 -0
  132. package/dist/i18n/locales/el.js +11 -0
  133. package/dist/i18n/locales/en.d.ts +17 -0
  134. package/dist/i18n/locales/en.js +11 -0
  135. package/dist/i18n/locales/es.d.ts +17 -0
  136. package/dist/i18n/locales/es.js +11 -0
  137. package/dist/i18n/locales/fr.d.ts +17 -0
  138. package/dist/i18n/locales/fr.js +11 -0
  139. package/dist/i18n/locales/hi.d.ts +17 -0
  140. package/dist/i18n/locales/hi.js +11 -0
  141. package/dist/i18n/locales/it.d.ts +17 -0
  142. package/dist/i18n/locales/it.js +11 -0
  143. package/dist/i18n/locales/ja.d.ts +17 -0
  144. package/dist/i18n/locales/ja.js +11 -0
  145. package/dist/i18n/locales/nl.d.ts +17 -0
  146. package/dist/i18n/locales/nl.js +11 -0
  147. package/dist/i18n/locales/pl.d.ts +17 -0
  148. package/dist/i18n/locales/pl.js +11 -0
  149. package/dist/i18n/locales/pt.d.ts +17 -0
  150. package/dist/i18n/locales/pt.js +11 -0
  151. package/dist/i18n/locales/ro.d.ts +17 -0
  152. package/dist/i18n/locales/ro.js +11 -0
  153. package/dist/i18n/locales/ru.d.ts +17 -0
  154. package/dist/i18n/locales/ru.js +11 -0
  155. package/dist/i18n/locales/sq.d.ts +17 -0
  156. package/dist/i18n/locales/sq.js +11 -0
  157. package/dist/i18n/locales/sv.d.ts +17 -0
  158. package/dist/i18n/locales/sv.js +11 -0
  159. package/dist/i18n/locales/tr.d.ts +17 -0
  160. package/dist/i18n/locales/tr.js +11 -0
  161. package/dist/i18n/locales/zh.d.ts +17 -0
  162. package/dist/i18n/locales/zh.js +11 -0
  163. package/dist/index.js +799 -792
  164. package/dist/locales/ar.json +17 -0
  165. package/dist/locales/de.json +17 -0
  166. package/dist/locales/el.json +17 -0
  167. package/dist/locales/en.json +17 -0
  168. package/dist/locales/es.json +17 -0
  169. package/dist/locales/fr.json +17 -0
  170. package/dist/locales/hi.json +17 -0
  171. package/dist/locales/it.json +17 -0
  172. package/dist/locales/ja.json +17 -0
  173. package/dist/locales/nl.json +17 -0
  174. package/dist/locales/pl.json +17 -0
  175. package/dist/locales/pt.json +17 -0
  176. package/dist/locales/ro.json +17 -0
  177. package/dist/locales/ru.json +17 -0
  178. package/dist/locales/sq.json +17 -0
  179. package/dist/locales/sv.json +17 -0
  180. package/dist/locales/tr.json +17 -0
  181. package/dist/locales/zh.json +17 -0
  182. package/dist/patterns/anamnesis/anamnesis-baseline.d.ts +6 -0
  183. package/dist/patterns/anamnesis/anamnesis-compile.d.ts +4 -1
  184. package/dist/patterns/anamnesis/anamnesis-evolution-grid.d.ts +8 -9
  185. package/dist/patterns/anamnesis/anamnesis-evolution.d.ts +24 -12
  186. package/dist/patterns/anamnesis/anamnesis-intake.d.ts +5 -1
  187. package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +4 -1
  188. package/dist/patterns/anamnesis/anamnesis-readonly.d.ts +4 -1
  189. package/dist/patterns/anamnesis/anamnesis-source-blocks.d.ts +29 -0
  190. package/dist/patterns/anamnesis/anamnesis-window.d.ts +3 -5
  191. package/dist/patterns/anamnesis/anamnesis.d.ts +4 -1
  192. package/dist/patterns/anamnesis/index.js +1 -1
  193. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  194. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  195. package/dist/tokens.css +5 -2
  196. package/package.json +5 -1
  197. package/dist/_chunks/actions-cell-renderer-C67oj7mR.js +0 -1581
  198. package/dist/_chunks/anamnesis-summary-card-CpQViN5l.js +0 -392
  199. package/dist/_chunks/form-field-M5UpX65Z.js +0 -123
  200. package/dist/_chunks/number-input-DOe5VYei.js +0 -370
  201. package/dist/_chunks/radio-group-CI-6SmSw.js +0 -167
  202. package/dist/patterns/anamnesis/anamnesis-compare-panel.d.ts +0 -89
@@ -1,392 +0,0 @@
1
- import { jsxs as r, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as de, useId as ne, useMemo as H, useImperativeHandle as ie } from "react";
3
- import { c as g } from "./index-D2ZczOXr.js";
4
- import { useTranslation as oe } from "react-i18next";
5
- import { B as M } from "./badge-DCOqV9mI.js";
6
- import { C as y } from "./card-DPmk26CL.js";
7
- import { S as P } from "./skeleton-CZbwyJAA.js";
8
- import { a as le, T as ce } from "./tooltip-DvmfrNvB.js";
9
- import { u as me } from "./registry-DvAUVLHh.js";
10
- import { H as E } from "./heart-pulse-BCppJyN2.js";
11
- import { c as R } from "./createLucideIcon-DhHxpK9K.js";
12
- /**
13
- * @license lucide-react v1.22.0 - ISC
14
- *
15
- * This source code is licensed under the ISC license.
16
- * See the LICENSE file in the root directory of this source tree.
17
- */
18
- const ue = [
19
- [
20
- "path",
21
- {
22
- d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
23
- key: "1sd12s"
24
- }
25
- ],
26
- ["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
27
- ["path", { d: "M12 17h.01", key: "p32p05" }]
28
- ], pe = R("message-circle-question-mark", ue);
29
- /**
30
- * @license lucide-react v1.22.0 - ISC
31
- *
32
- * This source code is licensed under the ISC license.
33
- * See the LICENSE file in the root directory of this source tree.
34
- */
35
- const ge = [
36
- [
37
- "path",
38
- {
39
- d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
40
- key: "1sd12s"
41
- }
42
- ],
43
- ["path", { d: "m10 15-3-3 3-3", key: "1pgupc" }],
44
- ["path", { d: "M7 12h8a2 2 0 0 1 2 2v1", key: "89sh1g" }]
45
- ], he = R("message-circle-reply", ge), fe = {
46
- id: "anamnesis-summary-card",
47
- // The card is read-only: the only handle method is a getSummary
48
- // projection, so there is no capability to declare.
49
- capabilities: [],
50
- state: {
51
- summary: {
52
- type: "{ id?: string; sectionCount: number; answerCount: number; highlightedCount: number; unansweredCount: number }",
53
- descriptionKey: "ui.agent.anamnesisSummaryCard.state.summary",
54
- description: "Structural summary of the anamnesis card — section, answer, highlighted and unanswered counts plus the consumer id. Never question labels or answer values.",
55
- read: (d) => d.getSummary()
56
- }
57
- },
58
- actions: {},
59
- domHooks: {
60
- root: {
61
- attr: "data-component",
62
- value: "anamnesis-summary-card",
63
- description: "Marks the AnamnesisSummaryCard root region."
64
- },
65
- instanceId: {
66
- attr: "data-component-id",
67
- sourceProp: "id",
68
- description: "Sourced from the id prop."
69
- },
70
- item: {
71
- attr: "data-answer-id",
72
- description: "One per answer row (KeyValuePair); the value is the intake field key. Highlighted rows also carry data-highlighted."
73
- }
74
- }
75
- }, ve = g("ds:w-full ds:text-[color:var(--foreground)]", {
76
- variants: {
77
- // Same `surface` vocabulary as PatientSummaryCard / ContactProfileCard.
78
- // Both surfaces keep the Card chrome — `flat` only drops the shadow.
79
- surface: {
80
- flat: "",
81
- elevated: ""
82
- },
83
- density: {
84
- comfortable: "",
85
- compact: ""
86
- }
87
- },
88
- defaultVariants: {
89
- surface: "elevated",
90
- density: "comfortable"
91
- }
92
- }), ye = g("ds:flex ds:flex-col", {
93
- variants: {
94
- density: {
95
- comfortable: "ds:gap-[var(--spacing-lg)]",
96
- compact: "ds:gap-[var(--spacing-md)]"
97
- }
98
- },
99
- defaultVariants: { density: "comfortable" }
100
- }), be = g("", {
101
- variants: {
102
- density: {
103
- comfortable: "",
104
- compact: "ds:p-[var(--spacing-sm)] ds:pb-0"
105
- }
106
- },
107
- defaultVariants: { density: "comfortable" }
108
- }), xe = g("", {
109
- variants: {
110
- density: {
111
- comfortable: "",
112
- compact: "ds:p-[var(--spacing-sm)]"
113
- }
114
- },
115
- defaultVariants: { density: "comfortable" }
116
- }), Ne = g("", {
117
- variants: {
118
- density: {
119
- comfortable: "",
120
- compact: "ds:p-[var(--spacing-sm)] ds:pt-0"
121
- }
122
- },
123
- defaultVariants: { density: "comfortable" }
124
- }), Ce = /^(\d{4})-(\d{2})-(\d{2})$/, Se = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/, we = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/;
125
- function Ae(d) {
126
- const l = Ce.exec(d);
127
- if (l)
128
- return {
129
- date: new Date(Number(l[1]), Number(l[2]) - 1, Number(l[3])),
130
- hasTime: !1
131
- };
132
- const t = Se.exec(d);
133
- if (t)
134
- return {
135
- date: new Date(
136
- Number(t[1]),
137
- Number(t[2]) - 1,
138
- Number(t[3]),
139
- Number(t[4]),
140
- Number(t[5]),
141
- t[6] ? Number(t[6]) : 0
142
- ),
143
- hasTime: !0
144
- };
145
- const i = new Date(d);
146
- return Number.isNaN(i.getTime()) ? null : { date: i, hasTime: we.test(d) };
147
- }
148
- function B(d, l) {
149
- const t = Ae(d);
150
- if (!t) return null;
151
- const i = t.hasTime ? { dateStyle: "medium", timeStyle: "short" } : { dateStyle: "medium" };
152
- try {
153
- return new Intl.DateTimeFormat(l, i).format(t.date);
154
- } catch {
155
- return new Intl.DateTimeFormat(void 0, i).format(t.date);
156
- }
157
- }
158
- const Te = "ds:rounded-[var(--radius-md)] ds:bg-[color:color-mix(in_srgb,var(--accent)_6%,transparent)] ds:px-[var(--spacing-xs)] ds:-mx-[var(--spacing-xs)]", Le = 'ds:relative ds:inline-flex ds:appearance-none ds:border-0 ds:bg-transparent ds:p-0 ds:m-0 ds:cursor-default ds:rounded-[var(--radius-full)] ds:before:absolute ds:before:content-[""] ds:before:inset-x-[calc((var(--min-target-size)-100%)/-2)] ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:sm:before:inset-x-[calc((var(--spacing-lg)-100%)/-2)] ds:sm:before:inset-y-[calc((var(--spacing-lg)-100%)/-2)] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]', D = "ds:mt-[var(--spacing-2xs)] ds:size-4 ds:shrink-0 ds:text-[color:var(--accent)]", b = "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", ke = de(
159
- ({
160
- sections: d,
161
- title: l,
162
- subtitle: t,
163
- unansweredCount: i = 0,
164
- locale: $,
165
- highlightedFirst: C = !0,
166
- highlightedGroup: j = !0,
167
- highlightedOnly: m = !1,
168
- surface: S = "elevated",
169
- density: c = "comfortable",
170
- loading: h = !1,
171
- actionSlot: w,
172
- id: p,
173
- className: z,
174
- "aria-label": G,
175
- ...O
176
- }, q) => {
177
- const { t: o, i18n: F } = oe(), K = ne(), A = $ ?? F.language ?? "en", u = H(
178
- () => d.filter((e) => e.answers.length > 0).map((e) => ({
179
- ...e,
180
- answers: C ? [...e.answers].sort(
181
- (s, n) => +!!n.highlighted - +!!s.highlighted
182
- ) : e.answers
183
- })),
184
- [d, C]
185
- ), T = u.reduce(
186
- (e, s) => e + s.answers.length,
187
- 0
188
- ), f = u.reduce(
189
- (e, s) => e + s.answers.filter((n) => n.highlighted).length,
190
- 0
191
- ), L = u.length, x = u.flatMap(
192
- (e) => e.answers.filter((s) => s.highlighted)
193
- ), Q = m ? [] : u, U = (e) => {
194
- const s = e.reportedAtIso ? B(e.reportedAtIso, A) : null, n = [e.sourceLabel, s].filter(
195
- (v) => !!v
196
- );
197
- return n.length > 0 ? n.join(" · ") : null;
198
- }, N = H(
199
- () => ({
200
- getSummary: () => ({
201
- id: p,
202
- sectionCount: L,
203
- answerCount: T,
204
- highlightedCount: f,
205
- unansweredCount: i
206
- })
207
- }),
208
- [p, L, T, f, i]
209
- );
210
- ie(q, () => N, [N]), me(fe, N, p);
211
- const W = o("anamnesisSummaryCard.regionLabel", {
212
- defaultValue: "Anamnesis summary"
213
- }), k = l ?? W, Y = G ?? k, V = o("anamnesisSummaryCard.highlighted", {
214
- defaultValue: "Highlighted"
215
- }), J = c === "comfortable" ? "type-title-card" : "type-title-item", X = c === "comfortable" ? "md" : "sm", Z = (e) => {
216
- const s = e.reportedAtIso ? B(e.reportedAtIso, A) : null, n = s && e.sourceLabel ? o("anamnesisSummaryCard.reportedOnFrom", {
217
- date: s,
218
- source: e.sourceLabel,
219
- defaultValue: "Highlighted on {{date}} · {{source}}"
220
- }) : s ? o("anamnesisSummaryCard.reportedOn", {
221
- date: s,
222
- defaultValue: "Highlighted on {{date}}"
223
- }) : V;
224
- return /* @__PURE__ */ a(ce, { label: n, side: "top", children: /* @__PURE__ */ a(
225
- "button",
226
- {
227
- type: "button",
228
- className: Le,
229
- "data-highlighted-chip": "",
230
- children: /* @__PURE__ */ a(
231
- M,
232
- {
233
- variant: "accentSoft",
234
- size: "sm",
235
- leading: /* @__PURE__ */ a(E, { "aria-hidden": "true" }),
236
- children: V
237
- }
238
- )
239
- }
240
- ) });
241
- }, ee = /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-wrap ds:items-start ds:gap-[var(--spacing-sm)]", children: [
242
- /* @__PURE__ */ r("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
243
- /* @__PURE__ */ a(
244
- "h3",
245
- {
246
- id: K,
247
- className: `ds:m-0 ${J} ds:text-[color:var(--foreground)]`,
248
- children: k
249
- }
250
- ),
251
- t ? /* @__PURE__ */ a("p", { className: b, children: t }) : null
252
- ] }),
253
- !h && f > 0 ? /* @__PURE__ */ a(
254
- M,
255
- {
256
- variant: "accentSoft",
257
- size: "sm",
258
- leading: /* @__PURE__ */ a(E, { "aria-hidden": "true" }),
259
- className: "ds:shrink-0",
260
- children: o("anamnesisSummaryCard.highlightedCount", {
261
- count: f,
262
- defaultValue: "{{count}} highlighted"
263
- })
264
- }
265
- ) : null,
266
- w ? /* @__PURE__ */ a("div", { className: "ds:ms-auto ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-xs)]", children: w }) : null
267
- ] }), ae = /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
268
- /* @__PURE__ */ a(P, { variant: "text", width: "40%" }),
269
- /* @__PURE__ */ a(P, { variant: "text", lines: 4 })
270
- ] }), se = /* @__PURE__ */ a("p", { className: b, children: o("anamnesisSummaryCard.empty", {
271
- defaultValue: "No answers recorded yet"
272
- }) }), _ = [
273
- "ds:m-0 ds:grid ds:grid-cols-1 ds:@[672px]/afields:grid-cols-2",
274
- "ds:gap-x-[var(--spacing-lg)]",
275
- X === "md" ? "ds:gap-y-[var(--spacing-md)]" : "ds:gap-y-[var(--spacing-sm)]"
276
- ].join(" "), I = (e, s) => {
277
- const n = s.chip && e.highlighted, v = s.recorded ? U(e) : null;
278
- return /* @__PURE__ */ r(
279
- "div",
280
- {
281
- "data-answer-id": e.id,
282
- "data-highlighted": e.highlighted ? "" : void 0,
283
- className: [
284
- "ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]",
285
- n ? Te : ""
286
- ].filter(Boolean).join(" "),
287
- children: [
288
- /* @__PURE__ */ r("dt", { className: "type-label ds:m-0 ds:flex ds:items-start ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
289
- /* @__PURE__ */ a(
290
- pe,
291
- {
292
- "aria-hidden": "true",
293
- className: D
294
- }
295
- ),
296
- /* @__PURE__ */ a("span", { children: e.label })
297
- ] }),
298
- /* @__PURE__ */ r("dd", { className: "type-body ds:m-0 ds:flex ds:items-start ds:gap-[var(--spacing-xs)] ds:text-[color:var(--foreground)]", children: [
299
- /* @__PURE__ */ a(he, { "aria-hidden": "true", className: D }),
300
- /* @__PURE__ */ r("span", { className: "ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
301
- /* @__PURE__ */ r("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-xs)] ds:gap-y-[var(--spacing-2xs)]", children: [
302
- /* @__PURE__ */ a("span", { children: e.value }),
303
- e.unit ? /* @__PURE__ */ a("span", { className: "type-body-sm ds:text-[color:var(--muted-foreground)]", children: e.unit }) : null,
304
- n ? Z(e) : null
305
- ] }),
306
- v ? /* @__PURE__ */ a("span", { className: b, children: v }) : null
307
- ] })
308
- ] })
309
- ]
310
- },
311
- `${s.keyPrefix}${e.id}`
312
- );
313
- }, te = /* @__PURE__ */ r(
314
- "div",
315
- {
316
- role: "group",
317
- "aria-label": o("anamnesisSummaryCard.sectionsLabel", {
318
- defaultValue: "Anamnesis sections"
319
- }),
320
- className: ye({ density: c }),
321
- children: [
322
- (j || m) && x.length > 0 ? /* @__PURE__ */ r(
323
- "div",
324
- {
325
- "data-highlighted-group": "",
326
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
327
- children: [
328
- m ? null : /* @__PURE__ */ a("h4", { className: "ds:m-0 type-eyebrow ds:text-[color:var(--muted-foreground)]", children: o("anamnesisSummaryCard.highlightedGroup", {
329
- defaultValue: "Highlighted answers"
330
- }) }),
331
- /* @__PURE__ */ a("div", { className: "ds:@container/afields", children: /* @__PURE__ */ a("dl", { className: _, children: x.map(
332
- (e) => I(e, {
333
- recorded: !0,
334
- chip: !1,
335
- keyPrefix: "highlighted-"
336
- })
337
- ) }) })
338
- ]
339
- }
340
- ) : null,
341
- Q.map((e) => /* @__PURE__ */ r(
342
- "div",
343
- {
344
- "data-section-id": e.id,
345
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
346
- children: [
347
- /* @__PURE__ */ a("h4", { className: "ds:m-0 type-eyebrow ds:text-[color:var(--muted-foreground)]", children: e.heading }),
348
- /* @__PURE__ */ a("div", { className: "ds:@container/afields", children: /* @__PURE__ */ a("dl", { className: _, children: e.answers.map(
349
- (s) => I(s, {
350
- recorded: !1,
351
- chip: !0,
352
- keyPrefix: ""
353
- })
354
- ) }) })
355
- ]
356
- },
357
- e.id
358
- ))
359
- ]
360
- }
361
- ), re = h ? ae : u.length === 0 || m && x.length === 0 ? se : te;
362
- return /* @__PURE__ */ a(
363
- "div",
364
- {
365
- role: "region",
366
- "aria-label": Y,
367
- "aria-busy": h || void 0,
368
- "data-component": "anamnesis-summary-card",
369
- "data-component-id": p,
370
- "data-density": c,
371
- "data-highlighted-only": m ? "" : void 0,
372
- id: p,
373
- className: ve({ surface: S, density: c, className: z }),
374
- ...O,
375
- children: /* @__PURE__ */ r(y, { variant: S === "flat" ? "outlined" : "elevated", children: [
376
- /* @__PURE__ */ a(y.Header, { className: be({ density: c }), children: ee }),
377
- /* @__PURE__ */ a(le, { children: /* @__PURE__ */ a(y.Body, { className: xe({ density: c }), children: re }) }),
378
- !h && !m && i > 0 ? /* @__PURE__ */ a(y.Footer, { className: Ne({ density: c }), children: /* @__PURE__ */ a("p", { className: b, children: o("anamnesisSummaryCard.unanswered", {
379
- count: i,
380
- defaultValue: "{{count}} questions not answered"
381
- }) }) }) : null
382
- ] })
383
- }
384
- );
385
- }
386
- );
387
- ke.displayName = "AnamnesisSummaryCard";
388
- export {
389
- ke as A,
390
- fe as a
391
- };
392
- //# sourceMappingURL=anamnesis-summary-card-CpQViN5l.js.map
@@ -1,123 +0,0 @@
1
- import { jsx as i, jsxs as t } from "react/jsx-runtime";
2
- import { forwardRef as z, useId as V, useMemo as p } from "react";
3
- import { c as f } from "./index-D2ZczOXr.js";
4
- import { useTranslation as j } from "react-i18next";
5
- import { F as w } from "./form-field-context-B3APVHKx.js";
6
- import { C as B } from "./circle-alert-rGDZ73Wh.js";
7
- const C = f("ds:text-start", {
8
- variants: {
9
- orientation: {
10
- vertical: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
11
- horizontal: "ds:grid ds:grid-cols-[minmax(0,var(--form-label-inline-size))_minmax(0,1fr)] ds:items-start ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)]"
12
- },
13
- disabled: {
14
- true: "ds:opacity-50 ds:cursor-not-allowed",
15
- false: ""
16
- }
17
- },
18
- defaultVariants: {
19
- orientation: "vertical",
20
- disabled: !1
21
- }
22
- }), I = f("ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", {
23
- variants: {
24
- orientation: {
25
- vertical: "",
26
- horizontal: "ds:min-w-0"
27
- }
28
- },
29
- defaultVariants: {
30
- orientation: "vertical"
31
- }
32
- }), $ = z(
33
- (x, v) => {
34
- const {
35
- label: u,
36
- description: o,
37
- error: e,
38
- required: d = !1,
39
- optional: h = !1,
40
- orientation: n = "vertical",
41
- disabled: l = !1,
42
- className: g,
43
- children: b,
44
- ...N
45
- } = x, { t: y } = j(), s = V(), a = `${s}-help`, r = `${s}-error`, c = !!e, m = p(
46
- () => [o ? a : null, e ? r : null].filter(Boolean).join(" "),
47
- [o, e, a, r]
48
- ), F = p(
49
- () => ({
50
- id: s,
51
- helpId: a,
52
- errorId: r,
53
- describedBy: m,
54
- invalid: c,
55
- required: d,
56
- disabled: l
57
- }),
58
- [s, a, r, m, c, d, l]
59
- );
60
- return /* @__PURE__ */ i(w.Provider, { value: F, children: /* @__PURE__ */ t(
61
- "div",
62
- {
63
- ref: v,
64
- className: C({ orientation: n, disabled: l, className: g }),
65
- "data-component": "form-field",
66
- ...N,
67
- children: [
68
- /* @__PURE__ */ t(
69
- "label",
70
- {
71
- id: `${s}-label`,
72
- htmlFor: s,
73
- className: "type-label ds:text-foreground",
74
- children: [
75
- u,
76
- d && /* @__PURE__ */ i(
77
- "span",
78
- {
79
- "aria-hidden": "true",
80
- className: "ds:text-destructive ds:ms-[var(--spacing-xs)]",
81
- children: "*"
82
- }
83
- ),
84
- h && /* @__PURE__ */ t("span", { className: "ds:text-muted-foreground ds:ms-[var(--spacing-xs)] ds:font-normal", children: [
85
- "(",
86
- y("common.optional", "optional"),
87
- ")"
88
- ] })
89
- ]
90
- }
91
- ),
92
- /* @__PURE__ */ t("div", { className: I({ orientation: n }), children: [
93
- b,
94
- o && /* @__PURE__ */ i("p", { id: a, className: "type-body-sm ds:text-muted-foreground", children: o }),
95
- e && /* @__PURE__ */ t(
96
- "p",
97
- {
98
- id: r,
99
- role: "alert",
100
- className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-body-sm ds:text-destructive",
101
- children: [
102
- /* @__PURE__ */ i(
103
- B,
104
- {
105
- "aria-hidden": "true",
106
- className: "ds:size-4 ds:shrink-0"
107
- }
108
- ),
109
- /* @__PURE__ */ i("span", { children: e })
110
- ]
111
- }
112
- )
113
- ] })
114
- ]
115
- }
116
- ) });
117
- }
118
- );
119
- $.displayName = "FormField";
120
- export {
121
- $ as F
122
- };
123
- //# sourceMappingURL=form-field-M5UpX65Z.js.map