@alfadocs/ui-kit-debug 1.48.0 → 1.49.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 (215) hide show
  1. package/dist/_chunks/{agenda-card-C4h0xMGi.js → agenda-card-CjjxlA9K.js} +2 -2
  2. package/dist/_chunks/{agenda-card-C4h0xMGi.js.map → agenda-card-CjjxlA9K.js.map} +1 -1
  3. package/dist/_chunks/{agenda-tray-DNZYW2xt.js → agenda-tray-BhZASyJm.js} +2 -2
  4. package/dist/_chunks/{agenda-tray-DNZYW2xt.js.map → agenda-tray-BhZASyJm.js.map} +1 -1
  5. package/dist/_chunks/{alia-sidebar-Crn8OGPF.js → alia-sidebar-Dx-oeOV2.js} +3 -3
  6. package/dist/_chunks/{alia-sidebar-Crn8OGPF.js.map → alia-sidebar-Dx-oeOV2.js.map} +1 -1
  7. package/dist/_chunks/{appointment-card-CvGU0QP6.js → appointment-card-BgLpE6T5.js} +2 -2
  8. package/dist/_chunks/{appointment-card-CvGU0QP6.js.map → appointment-card-BgLpE6T5.js.map} +1 -1
  9. package/dist/_chunks/{appointment-peek--dmWznLZ.js → appointment-peek-BDiCIBb-.js} +2 -2
  10. package/dist/_chunks/{appointment-peek--dmWznLZ.js.map → appointment-peek-BDiCIBb-.js.map} +1 -1
  11. package/dist/_chunks/{appointment-timeline-y9uYZMUd.js → appointment-timeline-wQ-PdkFV.js} +2 -2
  12. package/dist/_chunks/{appointment-timeline-y9uYZMUd.js.map → appointment-timeline-wQ-PdkFV.js.map} +1 -1
  13. package/dist/_chunks/{appointment-tray-BTecNeSb.js → appointment-tray-D7Gt6m8x.js} +2 -2
  14. package/dist/_chunks/{appointment-tray-BTecNeSb.js.map → appointment-tray-D7Gt6m8x.js.map} +1 -1
  15. package/dist/_chunks/{avatar-CkDeQOSI.js → avatar-BVvjKNTp.js} +2 -2
  16. package/dist/_chunks/avatar-BVvjKNTp.js.map +1 -0
  17. package/dist/_chunks/{balance-badge-cell-CA0YNJMR.js → balance-badge-cell-klaxFNL_.js} +3 -3
  18. package/dist/_chunks/{balance-badge-cell-CA0YNJMR.js.map → balance-badge-cell-klaxFNL_.js.map} +1 -1
  19. package/dist/_chunks/{booking-BQYFDcrz.js → booking-BF9pVa2n.js} +377 -381
  20. package/dist/_chunks/booking-BF9pVa2n.js.map +1 -0
  21. package/dist/_chunks/{calendar-DjoJ9ovF.js → calendar-Bt44KMNO.js} +3 -2
  22. package/dist/_chunks/{calendar-DjoJ9ovF.js.map → calendar-Bt44KMNO.js.map} +1 -1
  23. package/dist/_chunks/calendar-workspace-C_eXL1by.js +10464 -0
  24. package/dist/_chunks/{calendar-workspace-D8zX9JWm.js.map → calendar-workspace-C_eXL1by.js.map} +1 -1
  25. package/dist/_chunks/{chat-message-Co_NRGM4.js → chat-message-B4ihjNy3.js} +2 -2
  26. package/dist/_chunks/{chat-message-Co_NRGM4.js.map → chat-message-B4ihjNy3.js.map} +1 -1
  27. package/dist/_chunks/{clinical-note-card-DYDQ3q2x.js → clinical-note-card-B7s5BtEl.js} +2 -2
  28. package/dist/_chunks/{clinical-note-card-DYDQ3q2x.js.map → clinical-note-card-B7s5BtEl.js.map} +1 -1
  29. package/dist/_chunks/{data-table-DWOSxlsy.js → data-table-CrI3_bjH.js} +411 -410
  30. package/dist/_chunks/data-table-CrI3_bjH.js.map +1 -0
  31. package/dist/_chunks/{dependent-selector-BR_8D2Qu.js → dependent-selector-58hTg5rB.js} +2 -2
  32. package/dist/_chunks/{dependent-selector-BR_8D2Qu.js.map → dependent-selector-58hTg5rB.js.map} +1 -1
  33. package/dist/_chunks/{entity-summary-Ckz_U00H.js → entity-summary-CFJfBdVP.js} +2 -2
  34. package/dist/_chunks/{entity-summary-Ckz_U00H.js.map → entity-summary-CFJfBdVP.js.map} +1 -1
  35. package/dist/_chunks/{file-manager-CqgxLqoA.js → file-manager-C6QQPQV5.js} +2 -2
  36. package/dist/_chunks/{file-manager-CqgxLqoA.js.map → file-manager-C6QQPQV5.js.map} +1 -1
  37. package/dist/_chunks/link-cell-renderer-CkNbUsBM.js +867 -0
  38. package/dist/_chunks/link-cell-renderer-CkNbUsBM.js.map +1 -0
  39. package/dist/_chunks/{marketplace-app-shell-Dehuxbi-.js → marketplace-app-shell-1uKqs4gD.js} +2 -2
  40. package/dist/_chunks/{marketplace-app-shell-Dehuxbi-.js.map → marketplace-app-shell-1uKqs4gD.js.map} +1 -1
  41. package/dist/_chunks/{message-card-DKOtnBHy.js → message-card-C2zsvyj0.js} +2 -2
  42. package/dist/_chunks/{message-card-DKOtnBHy.js.map → message-card-C2zsvyj0.js.map} +1 -1
  43. package/dist/_chunks/{message-tray-COMEtmyr.js → message-tray-CMlmxdH2.js} +2 -2
  44. package/dist/_chunks/{message-tray-COMEtmyr.js.map → message-tray-CMlmxdH2.js.map} +1 -1
  45. package/dist/_chunks/{notes-panel-BiOxZL_0.js → notes-panel-xxpFt-I1.js} +2 -2
  46. package/dist/_chunks/{notes-panel-BiOxZL_0.js.map → notes-panel-xxpFt-I1.js.map} +1 -1
  47. package/dist/_chunks/{operator-hero-5061fkY5.js → operator-hero-DyrNLoRO.js} +2 -2
  48. package/dist/_chunks/{operator-hero-5061fkY5.js.map → operator-hero-DyrNLoRO.js.map} +1 -1
  49. package/dist/_chunks/{patient-details-C23Hdm8v.js → patient-details-tTlvrJSU.js} +2 -2
  50. package/dist/_chunks/{patient-details-C23Hdm8v.js.map → patient-details-tTlvrJSU.js.map} +1 -1
  51. package/dist/_chunks/{patient-summary-card-C36L3h7h.js → patient-summary-card-DQ__6DR-.js} +2 -2
  52. package/dist/_chunks/{patient-summary-card-C36L3h7h.js.map → patient-summary-card-DQ__6DR-.js.map} +1 -1
  53. package/dist/_chunks/{practice-profile-hero-CPy5h2yI.js → practice-profile-hero-B-WcJYNH.js} +2 -2
  54. package/dist/_chunks/{practice-profile-hero-CPy5h2yI.js.map → practice-profile-hero-B-WcJYNH.js.map} +1 -1
  55. package/dist/_chunks/{practice-results-t2BHht91.js → practice-results-EKRiqWtQ.js} +2 -2
  56. package/dist/_chunks/{practice-results-t2BHht91.js.map → practice-results-EKRiqWtQ.js.map} +1 -1
  57. package/dist/_chunks/{signature-request-15D363w5.js → signature-request-BUGeG8oD.js} +2 -2
  58. package/dist/_chunks/{signature-request-15D363w5.js.map → signature-request-BUGeG8oD.js.map} +1 -1
  59. package/dist/_chunks/{task-card-CTTQfPS6.js → task-card-jaOhnj_q.js} +31 -30
  60. package/dist/_chunks/task-card-jaOhnj_q.js.map +1 -0
  61. package/dist/_chunks/{task-tray-JA-qp_pB.js → task-tray-HHyxi9ga.js} +2 -2
  62. package/dist/_chunks/{task-tray-JA-qp_pB.js.map → task-tray-HHyxi9ga.js.map} +1 -1
  63. package/dist/_chunks/{tasks-panel-C_dVDQKJ.js → tasks-panel-DbSjq_mz.js} +2 -2
  64. package/dist/_chunks/{tasks-panel-C_dVDQKJ.js.map → tasks-panel-DbSjq_mz.js.map} +1 -1
  65. package/dist/_chunks/{timeline-61AihzYz.js → timeline-ChY7iZrs.js} +2 -2
  66. package/dist/_chunks/{timeline-61AihzYz.js.map → timeline-ChY7iZrs.js.map} +1 -1
  67. package/dist/_chunks/{use-appointment-details-read-D2FH-cHF.js → use-appointment-details-read-5-hV-2xA.js} +4 -4
  68. package/dist/_chunks/{use-appointment-details-read-D2FH-cHF.js.map → use-appointment-details-read-5-hV-2xA.js.map} +1 -1
  69. package/dist/agent-catalog.json +1 -1
  70. package/dist/components/agenda-card/index.js +1 -1
  71. package/dist/components/agenda-tray/index.js +1 -1
  72. package/dist/components/appointment-card/index.js +2 -2
  73. package/dist/components/appointment-details-panel/index.js +1 -1
  74. package/dist/components/appointment-peek/index.js +1 -1
  75. package/dist/components/appointment-timeline/index.js +1 -1
  76. package/dist/components/avatar/avatar.d.ts.map +1 -1
  77. package/dist/components/avatar/index.js +1 -1
  78. package/dist/components/booking/booking.d.ts.map +1 -1
  79. package/dist/components/booking/cascade.d.ts +5 -0
  80. package/dist/components/booking/cascade.d.ts.map +1 -1
  81. package/dist/components/booking/index.js +1 -1
  82. package/dist/components/calendar/calendar.d.ts.map +1 -1
  83. package/dist/components/calendar/index.js +1 -1
  84. package/dist/components/chat-message/index.js +1 -1
  85. package/dist/components/clinical-note-card/index.js +1 -1
  86. package/dist/components/data-table/filters/number-filter.d.ts +26 -12
  87. package/dist/components/data-table/filters/number-filter.d.ts.map +1 -1
  88. package/dist/components/data-table/index.js +2 -2
  89. package/dist/components/data-table/toolbar.d.ts.map +1 -1
  90. package/dist/components/dependent-selector/index.js +1 -1
  91. package/dist/components/entity-summary/index.js +1 -1
  92. package/dist/components/file-manager/index.js +1 -1
  93. package/dist/components/message-card/index.js +1 -1
  94. package/dist/components/message-tray/index.js +1 -1
  95. package/dist/components/notes-panel/index.js +1 -1
  96. package/dist/components/operator-hero/index.js +1 -1
  97. package/dist/components/patient-details/index.js +1 -1
  98. package/dist/components/patient-summary-card/index.js +1 -1
  99. package/dist/components/patient-table/index.js +1 -1
  100. package/dist/components/practice-profile-hero/index.js +1 -1
  101. package/dist/components/practice-results/index.js +1 -1
  102. package/dist/components/task-card/index.js +1 -1
  103. package/dist/components/task-card/task-card.d.ts +3 -2
  104. package/dist/components/task-card/task-card.d.ts.map +1 -1
  105. package/dist/components/task-tray/index.js +1 -1
  106. package/dist/components/tasks-panel/index.js +1 -1
  107. package/dist/components/timeline/index.js +1 -1
  108. package/dist/i18n/locales/ar.d.ts +19 -14
  109. package/dist/i18n/locales/ar.d.ts.map +1 -1
  110. package/dist/i18n/locales/ar.js +19 -14
  111. package/dist/i18n/locales/ar.js.map +1 -1
  112. package/dist/i18n/locales/de.d.ts +19 -14
  113. package/dist/i18n/locales/de.d.ts.map +1 -1
  114. package/dist/i18n/locales/de.js +19 -14
  115. package/dist/i18n/locales/de.js.map +1 -1
  116. package/dist/i18n/locales/el.d.ts +19 -14
  117. package/dist/i18n/locales/el.d.ts.map +1 -1
  118. package/dist/i18n/locales/el.js +19 -14
  119. package/dist/i18n/locales/el.js.map +1 -1
  120. package/dist/i18n/locales/en.d.ts +5 -0
  121. package/dist/i18n/locales/en.d.ts.map +1 -1
  122. package/dist/i18n/locales/en.js +6 -0
  123. package/dist/i18n/locales/en.js.map +1 -1
  124. package/dist/i18n/locales/es.d.ts +19 -14
  125. package/dist/i18n/locales/es.d.ts.map +1 -1
  126. package/dist/i18n/locales/es.js +19 -14
  127. package/dist/i18n/locales/es.js.map +1 -1
  128. package/dist/i18n/locales/fr.d.ts +19 -14
  129. package/dist/i18n/locales/fr.d.ts.map +1 -1
  130. package/dist/i18n/locales/fr.js +19 -14
  131. package/dist/i18n/locales/fr.js.map +1 -1
  132. package/dist/i18n/locales/hi.d.ts +19 -14
  133. package/dist/i18n/locales/hi.d.ts.map +1 -1
  134. package/dist/i18n/locales/hi.js +19 -14
  135. package/dist/i18n/locales/hi.js.map +1 -1
  136. package/dist/i18n/locales/it.d.ts +5 -0
  137. package/dist/i18n/locales/it.d.ts.map +1 -1
  138. package/dist/i18n/locales/it.js +6 -0
  139. package/dist/i18n/locales/it.js.map +1 -1
  140. package/dist/i18n/locales/ja.d.ts +19 -14
  141. package/dist/i18n/locales/ja.d.ts.map +1 -1
  142. package/dist/i18n/locales/ja.js +19 -14
  143. package/dist/i18n/locales/ja.js.map +1 -1
  144. package/dist/i18n/locales/nl.d.ts +19 -14
  145. package/dist/i18n/locales/nl.d.ts.map +1 -1
  146. package/dist/i18n/locales/nl.js +19 -14
  147. package/dist/i18n/locales/nl.js.map +1 -1
  148. package/dist/i18n/locales/pl.d.ts +19 -14
  149. package/dist/i18n/locales/pl.d.ts.map +1 -1
  150. package/dist/i18n/locales/pl.js +19 -14
  151. package/dist/i18n/locales/pl.js.map +1 -1
  152. package/dist/i18n/locales/pt.d.ts +19 -14
  153. package/dist/i18n/locales/pt.d.ts.map +1 -1
  154. package/dist/i18n/locales/pt.js +19 -14
  155. package/dist/i18n/locales/pt.js.map +1 -1
  156. package/dist/i18n/locales/ro.d.ts +19 -14
  157. package/dist/i18n/locales/ro.d.ts.map +1 -1
  158. package/dist/i18n/locales/ro.js +19 -14
  159. package/dist/i18n/locales/ro.js.map +1 -1
  160. package/dist/i18n/locales/ru.d.ts +19 -14
  161. package/dist/i18n/locales/ru.d.ts.map +1 -1
  162. package/dist/i18n/locales/ru.js +19 -14
  163. package/dist/i18n/locales/ru.js.map +1 -1
  164. package/dist/i18n/locales/sq.d.ts +19 -14
  165. package/dist/i18n/locales/sq.d.ts.map +1 -1
  166. package/dist/i18n/locales/sq.js +19 -14
  167. package/dist/i18n/locales/sq.js.map +1 -1
  168. package/dist/i18n/locales/sv.d.ts +19 -14
  169. package/dist/i18n/locales/sv.d.ts.map +1 -1
  170. package/dist/i18n/locales/sv.js +19 -14
  171. package/dist/i18n/locales/sv.js.map +1 -1
  172. package/dist/i18n/locales/tr.d.ts +19 -14
  173. package/dist/i18n/locales/tr.d.ts.map +1 -1
  174. package/dist/i18n/locales/tr.js +19 -14
  175. package/dist/i18n/locales/tr.js.map +1 -1
  176. package/dist/i18n/locales/zh.d.ts +19 -14
  177. package/dist/i18n/locales/zh.d.ts.map +1 -1
  178. package/dist/i18n/locales/zh.js +19 -14
  179. package/dist/i18n/locales/zh.js.map +1 -1
  180. package/dist/index.js +34 -34
  181. package/dist/locales/ar.json +19 -14
  182. package/dist/locales/de.json +19 -14
  183. package/dist/locales/el.json +19 -14
  184. package/dist/locales/en.json +5 -0
  185. package/dist/locales/es.json +19 -14
  186. package/dist/locales/fr.json +19 -14
  187. package/dist/locales/hi.json +19 -14
  188. package/dist/locales/it.json +5 -0
  189. package/dist/locales/ja.json +19 -14
  190. package/dist/locales/nl.json +19 -14
  191. package/dist/locales/pl.json +19 -14
  192. package/dist/locales/pt.json +19 -14
  193. package/dist/locales/ro.json +19 -14
  194. package/dist/locales/ru.json +19 -14
  195. package/dist/locales/sq.json +19 -14
  196. package/dist/locales/sv.json +19 -14
  197. package/dist/locales/tr.json +19 -14
  198. package/dist/locales/zh.json +19 -14
  199. package/dist/patterns/alia-assistant/index.js +1 -1
  200. package/dist/patterns/calendar/calendar-workspace.d.ts +10 -0
  201. package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
  202. package/dist/patterns/calendar/calendar.surface.d.ts +4 -1
  203. package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
  204. package/dist/patterns/calendar/index.js +1 -1
  205. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  206. package/dist/patterns/signature-request/index.js +1 -1
  207. package/dist/tokens.css +1 -1
  208. package/package.json +12 -12
  209. package/dist/_chunks/avatar-CkDeQOSI.js.map +0 -1
  210. package/dist/_chunks/booking-BQYFDcrz.js.map +0 -1
  211. package/dist/_chunks/calendar-workspace-D8zX9JWm.js +0 -10423
  212. package/dist/_chunks/data-table-DWOSxlsy.js.map +0 -1
  213. package/dist/_chunks/link-cell-renderer-Tswqf6BT.js +0 -778
  214. package/dist/_chunks/link-cell-renderer-Tswqf6BT.js.map +0 -1
  215. package/dist/_chunks/task-card-CTTQfPS6.js.map +0 -1
@@ -2,7 +2,7 @@ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
2
  import { forwardRef as w, useId as A, useRef as O } from "react";
3
3
  import { c as P } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as z } from "react-i18next";
5
- import { A as j } from "./avatar-CkDeQOSI.js";
5
+ import { A as j } from "./avatar-BVvjKNTp.js";
6
6
  import { B as I } from "./badge-BAkd6_Pj.js";
7
7
  import { C as T } from "./card-DPmk26CL.js";
8
8
  import { R as B } from "./rating-BYbUowdK.js";
@@ -199,4 +199,4 @@ export {
199
199
  M as O,
200
200
  V as o
201
201
  };
202
- //# sourceMappingURL=operator-hero-5061fkY5.js.map
202
+ //# sourceMappingURL=operator-hero-DyrNLoRO.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"operator-hero-5061fkY5.js","sources":["../../src/components/operator-hero/operator-hero.agent.ts","../../src/components/operator-hero/operator-hero.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { OperatorHeroHandle } from './operator-hero';\n\nexport const operatorHeroAgent: AgentAdapter<OperatorHeroHandle> = {\n id: 'operator-hero',\n // Purely observable hero region — no interactive affordances and no\n // imperative actions on the handle (getName / getHasColor are read-only\n // projections). The previous `view_change` capability had no backing\n // action and is removed.\n capabilities: [],\n state: {\n name: {\n type: 'string',\n descriptionKey: 'ui.agent.operatorHero.state.name',\n description: 'Operator display name currently rendered.',\n read: (handle) => handle.getName(),\n },\n hasColor: {\n type: 'boolean',\n descriptionKey: 'ui.agent.operatorHero.state.hasColor',\n description:\n 'Whether a calendar-colour identity dot is rendered. Structural flag only — never the colour id or any PHI.',\n read: (handle) => handle.getHasColor(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'operator-hero',\n description: 'Marks the OperatorHero root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useId,\n useRef,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Avatar } from '../avatar/avatar';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { Rating } from '../rating/rating';\nimport { colorIdToToken } from '../_shared/entity-card';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { operatorHeroAgent } from './operator-hero.agent';\n\n/* -------------------------------------------------------------------- */\n/* OperatorHero */\n/* */\n/* The operator-page counterpart to the consumer-side `<PracticeHero>` */\n/* / `<PracticeProfileHero>` pattern. Differences from the practice */\n/* hero (per the spec): */\n/* */\n/* - Avatar instead of a full hero image background */\n/* - Ratings + reviews summary rendered inline */\n/* - Slightly shorter vertically — no cover strip, denser padding */\n/* */\n/* Use case: individual operator profile page (`/dentista/<slug>/ */\n/* operatori/<name>`), pair with `<ContactProfileCard>` below to fill */\n/* in the operator's contact + profession info. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva('ds:w-full ds:text-[color:var(--foreground)]', {\n variants: {\n // Density toggle. Default `comfortable` matches the practice hero's\n // visual weight minus the cover strip. `compact` is for embedded\n // surfaces (booking aside, ROI Dashboard practice panel) where the\n // hero needs to fit in <12rem vertical.\n density: {\n comfortable: '',\n compact: '',\n },\n // Matches the kit's other `surface` props (Booking, ReviewsPanel,\n // ContactProfileCard). `'elevated'` wraps in `<Card>`.\n surface: {\n flat: '',\n elevated: '',\n },\n },\n defaultVariants: {\n density: 'comfortable',\n surface: 'elevated',\n },\n});\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface OperatorHeroBadge {\n /** Display key — i18n is up to the consumer. */\n key: string;\n /** Display label. */\n label: string;\n /** Badge variant — falls back to `neutral`. */\n variant?: 'neutral' | 'info' | 'success' | 'warning' | 'error';\n}\n\nexport interface OperatorHeroRating {\n /** Mean rating, 0–5. */\n value: number;\n /** Total number of reviews. */\n count: number;\n}\n\nexport interface OperatorHeroHandle {\n getName: () => string;\n /** Structural flag — whether a calendar-colour dot is rendered. No PHI. */\n getHasColor: () => boolean;\n}\n\nexport interface OperatorHeroProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'aria-label' | 'children'\n> {\n /** Operator's display name. Rendered as the H1 heading. */\n name: string;\n /**\n * Optional calendar-colour identity for the operator. AlfaDocs assigns each\n * operator a numeric colour id; when present, a small colour dot is rendered\n * next to the name, tinted via `colorIdToToken(colorId)` (a `var(--…)` palette\n * token — never a literal). The id itself is a structural identifier, not PHI.\n */\n colorId?: string;\n /** Specialty / tagline subtitle (e.g. \"Dermatologa · 12 anni di esperienza\"). */\n tagline?: string;\n /**\n * Optional photo / avatar URL. The kit always renders an `<Avatar>` —\n * when `imageUrl` is missing the avatar falls back to initials.\n */\n imageUrl?: string;\n /** Rating summary — when present, renders a Rating + numeric breakdown line. */\n rating?: OperatorHeroRating;\n /**\n * Optional badge row beneath the rating. Use sparingly — 1–3 chips\n * suit the hero's density; longer lists belong in `<ContactProfileCard>`.\n */\n badges?: OperatorHeroBadge[];\n\n /* ----- Slots ----- */\n\n /**\n * Rendered at the inline-end of the heading row (right side on LTR).\n * Use for a \"Book with this operator\" `<Button>` or a \"Back to\n * practice\" link.\n */\n actionSlot?: ReactNode;\n\n /* ----- Styling ----- */\n\n /**\n * `comfortable` (default) — matches the practice hero's visual\n * weight minus the cover strip. `compact` halves the vertical\n * padding for embedded surfaces.\n */\n density?: 'comfortable' | 'compact';\n /**\n * `elevated` (default) wraps in `<Card variant=\"elevated\">`. `flat`\n * drops the Card — use inside another card / sheet.\n */\n surface?: 'flat' | 'elevated';\n\n /* ----- a11y ----- */\n\n 'aria-label'?: string;\n id?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const OperatorHero = forwardRef<HTMLDivElement, OperatorHeroProps>(\n (\n {\n name,\n colorId,\n tagline,\n imageUrl,\n rating,\n badges,\n actionSlot,\n density = 'comfortable',\n surface = 'elevated',\n 'aria-label': ariaLabel,\n id,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const headingId = useId();\n const resolvedAriaLabel = ariaLabel ?? t('operatorHero.regionLabel');\n\n // Calendar-colour dot. Tint via a component-scoped CSS custom property set\n // imperatively on a ref — mirrors the Avatar `--avatar-color-override`\n // idiom so no `style={{…}}` attribute lands on the JSX (constraint §4).\n const hasColor = colorId !== undefined && colorId !== null;\n const dotRef = useRef<HTMLSpanElement>(null);\n\n useAgentRegistration(\n operatorHeroAgent,\n { getName: () => name, getHasColor: () => hasColor },\n id,\n );\n useIsomorphicLayoutEffect(() => {\n const el = dotRef.current;\n if (!el) return;\n if (hasColor) {\n el.style.setProperty('--operator-hero-color', colorIdToToken(colorId));\n } else {\n el.style.removeProperty('--operator-hero-color');\n }\n }, [hasColor, colorId]);\n\n const ratingLabel = rating\n ? t('operatorHero.ratingLabel', {\n value: rating.value.toFixed(1),\n count: rating.count,\n })\n : undefined;\n\n // Padding scales with density. Comfortable matches the practice\n // hero's `pt-xl pb-md` minus the cover strip; compact halves it.\n const bodyPaddingClass =\n density === 'comfortable'\n ? 'ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]'\n : 'ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]';\n\n // Avatar size keys off density. Comfortable = 2xl (~72px) to read\n // as the page hero. Compact = xl (~56px) for embedded use.\n const avatarSize = density === 'comfortable' ? '2xl' : 'xl';\n\n // Heading scale tracks density too. Comfortable uses the kit's\n // page-title token; compact drops to title-card so the operator\n // name doesn't dominate an embedded surface.\n const headingClass =\n density === 'comfortable' ? 'type-title-page' : 'type-title-card';\n\n const inner = (\n <div\n className={[\n 'ds:flex ds:items-start ds:gap-[var(--spacing-lg)]',\n bodyPaddingClass,\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n ].join(' ')}\n >\n <Avatar\n size={avatarSize}\n name={name}\n src={imageUrl}\n className=\"ds:shrink-0\"\n />\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-md)] ds:flex-wrap\">\n <h1\n id={headingId}\n className={`${headingClass} ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--foreground)]`}\n >\n {hasColor ? (\n <span\n ref={dotRef}\n role=\"img\"\n aria-label={t('operatorHero.colorLabel', 'Calendar colour')}\n className=\"ds:inline-block ds:size-[var(--spacing-sm)] ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[var(--operator-hero-color)]\"\n />\n ) : null}\n {name}\n </h1>\n {actionSlot ? (\n <div className=\"ds:ms-auto ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-xs)]\">\n {actionSlot}\n </div>\n ) : null}\n </div>\n {tagline ? (\n <p className=\"type-body ds:m-0 ds:text-[color:var(--foreground)]\">\n {tagline}\n </p>\n ) : null}\n {rating ? (\n <div\n className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\"\n aria-label={ratingLabel}\n >\n <Rating\n value={rating.value}\n max={5}\n size={density === 'comfortable' ? 'md' : 'sm'}\n />\n <span className=\"type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {rating.value.toFixed(1)} · {rating.count}\n </span>\n </div>\n ) : null}\n {badges && badges.length > 0 ? (\n <div\n role=\"list\"\n className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)] ds:mt-[var(--spacing-2xs)]\"\n >\n {badges.map((badge) => (\n <Badge\n key={badge.key}\n variant={badge.variant ?? 'neutral'}\n role=\"listitem\"\n >\n {badge.label}\n </Badge>\n ))}\n </div>\n ) : null}\n </div>\n </div>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-labelledby={headingId}\n data-component=\"operator-hero\"\n data-component-id={id}\n data-density={density}\n id={id}\n className={rootVariants({ surface, density, className })}\n {...rest}\n >\n {surface === 'elevated' ? (\n <Card variant=\"elevated\">{inner}</Card>\n ) : (\n inner\n )}\n </div>\n );\n },\n);\n\nOperatorHero.displayName = 'OperatorHero';\n\nexport type OperatorHeroDensity = NonNullable<\n VariantProps<typeof rootVariants>['density']\n>;\n"],"names":["operatorHeroAgent","handle","rootVariants","cva","OperatorHero","forwardRef","name","colorId","tagline","imageUrl","rating","badges","actionSlot","density","surface","ariaLabel","id","className","rest","ref","t","useTranslation","headingId","useId","resolvedAriaLabel","hasColor","dotRef","useRef","useAgentRegistration","useIsomorphicLayoutEffect","el","colorIdToToken","ratingLabel","bodyPaddingClass","avatarSize","headingClass","inner","jsxs","jsx","Avatar","Rating","badge","Badge","Card"],"mappings":";;;;;;;;;;;AAGO,MAAMA,IA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,gBAAAH;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAnB;AAAA,QACA,MAAK;AAAA,QACL,cAAYK;AAAA,QACZ,mBAAiBF;AAAA,QACjB,kBAAe;AAAA,QACf,qBAAmBN;AAAA,QACnB,gBAAcH;AAAA,QACd,IAAAG;AAAA,QACA,WAAWd,EAAa,EAAE,SAAAY,GAAS,SAAAD,GAAS,WAAAI,GAAW;AAAA,QACtD,GAAGC;AAAA,QAEH,gBAAY,aACX,gBAAAoB,EAACK,KAAK,SAAQ,YAAY,aAAM,IAEhCP;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAhC,EAAa,cAAc;"}
1
+ {"version":3,"file":"operator-hero-DyrNLoRO.js","sources":["../../src/components/operator-hero/operator-hero.agent.ts","../../src/components/operator-hero/operator-hero.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { OperatorHeroHandle } from './operator-hero';\n\nexport const operatorHeroAgent: AgentAdapter<OperatorHeroHandle> = {\n id: 'operator-hero',\n // Purely observable hero region — no interactive affordances and no\n // imperative actions on the handle (getName / getHasColor are read-only\n // projections). The previous `view_change` capability had no backing\n // action and is removed.\n capabilities: [],\n state: {\n name: {\n type: 'string',\n descriptionKey: 'ui.agent.operatorHero.state.name',\n description: 'Operator display name currently rendered.',\n read: (handle) => handle.getName(),\n },\n hasColor: {\n type: 'boolean',\n descriptionKey: 'ui.agent.operatorHero.state.hasColor',\n description:\n 'Whether a calendar-colour identity dot is rendered. Structural flag only — never the colour id or any PHI.',\n read: (handle) => handle.getHasColor(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'operator-hero',\n description: 'Marks the OperatorHero root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useId,\n useRef,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Avatar } from '../avatar/avatar';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { Rating } from '../rating/rating';\nimport { colorIdToToken } from '../_shared/entity-card';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { operatorHeroAgent } from './operator-hero.agent';\n\n/* -------------------------------------------------------------------- */\n/* OperatorHero */\n/* */\n/* The operator-page counterpart to the consumer-side `<PracticeHero>` */\n/* / `<PracticeProfileHero>` pattern. Differences from the practice */\n/* hero (per the spec): */\n/* */\n/* - Avatar instead of a full hero image background */\n/* - Ratings + reviews summary rendered inline */\n/* - Slightly shorter vertically — no cover strip, denser padding */\n/* */\n/* Use case: individual operator profile page (`/dentista/<slug>/ */\n/* operatori/<name>`), pair with `<ContactProfileCard>` below to fill */\n/* in the operator's contact + profession info. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva('ds:w-full ds:text-[color:var(--foreground)]', {\n variants: {\n // Density toggle. Default `comfortable` matches the practice hero's\n // visual weight minus the cover strip. `compact` is for embedded\n // surfaces (booking aside, ROI Dashboard practice panel) where the\n // hero needs to fit in <12rem vertical.\n density: {\n comfortable: '',\n compact: '',\n },\n // Matches the kit's other `surface` props (Booking, ReviewsPanel,\n // ContactProfileCard). `'elevated'` wraps in `<Card>`.\n surface: {\n flat: '',\n elevated: '',\n },\n },\n defaultVariants: {\n density: 'comfortable',\n surface: 'elevated',\n },\n});\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface OperatorHeroBadge {\n /** Display key — i18n is up to the consumer. */\n key: string;\n /** Display label. */\n label: string;\n /** Badge variant — falls back to `neutral`. */\n variant?: 'neutral' | 'info' | 'success' | 'warning' | 'error';\n}\n\nexport interface OperatorHeroRating {\n /** Mean rating, 0–5. */\n value: number;\n /** Total number of reviews. */\n count: number;\n}\n\nexport interface OperatorHeroHandle {\n getName: () => string;\n /** Structural flag — whether a calendar-colour dot is rendered. No PHI. */\n getHasColor: () => boolean;\n}\n\nexport interface OperatorHeroProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'aria-label' | 'children'\n> {\n /** Operator's display name. Rendered as the H1 heading. */\n name: string;\n /**\n * Optional calendar-colour identity for the operator. AlfaDocs assigns each\n * operator a numeric colour id; when present, a small colour dot is rendered\n * next to the name, tinted via `colorIdToToken(colorId)` (a `var(--…)` palette\n * token — never a literal). The id itself is a structural identifier, not PHI.\n */\n colorId?: string;\n /** Specialty / tagline subtitle (e.g. \"Dermatologa · 12 anni di esperienza\"). */\n tagline?: string;\n /**\n * Optional photo / avatar URL. The kit always renders an `<Avatar>` —\n * when `imageUrl` is missing the avatar falls back to initials.\n */\n imageUrl?: string;\n /** Rating summary — when present, renders a Rating + numeric breakdown line. */\n rating?: OperatorHeroRating;\n /**\n * Optional badge row beneath the rating. Use sparingly — 1–3 chips\n * suit the hero's density; longer lists belong in `<ContactProfileCard>`.\n */\n badges?: OperatorHeroBadge[];\n\n /* ----- Slots ----- */\n\n /**\n * Rendered at the inline-end of the heading row (right side on LTR).\n * Use for a \"Book with this operator\" `<Button>` or a \"Back to\n * practice\" link.\n */\n actionSlot?: ReactNode;\n\n /* ----- Styling ----- */\n\n /**\n * `comfortable` (default) — matches the practice hero's visual\n * weight minus the cover strip. `compact` halves the vertical\n * padding for embedded surfaces.\n */\n density?: 'comfortable' | 'compact';\n /**\n * `elevated` (default) wraps in `<Card variant=\"elevated\">`. `flat`\n * drops the Card — use inside another card / sheet.\n */\n surface?: 'flat' | 'elevated';\n\n /* ----- a11y ----- */\n\n 'aria-label'?: string;\n id?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const OperatorHero = forwardRef<HTMLDivElement, OperatorHeroProps>(\n (\n {\n name,\n colorId,\n tagline,\n imageUrl,\n rating,\n badges,\n actionSlot,\n density = 'comfortable',\n surface = 'elevated',\n 'aria-label': ariaLabel,\n id,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const headingId = useId();\n const resolvedAriaLabel = ariaLabel ?? t('operatorHero.regionLabel');\n\n // Calendar-colour dot. Tint via a component-scoped CSS custom property set\n // imperatively on a ref — mirrors the Avatar `--avatar-color-override`\n // idiom so no `style={{…}}` attribute lands on the JSX (constraint §4).\n const hasColor = colorId !== undefined && colorId !== null;\n const dotRef = useRef<HTMLSpanElement>(null);\n\n useAgentRegistration(\n operatorHeroAgent,\n { getName: () => name, getHasColor: () => hasColor },\n id,\n );\n useIsomorphicLayoutEffect(() => {\n const el = dotRef.current;\n if (!el) return;\n if (hasColor) {\n el.style.setProperty('--operator-hero-color', colorIdToToken(colorId));\n } else {\n el.style.removeProperty('--operator-hero-color');\n }\n }, [hasColor, colorId]);\n\n const ratingLabel = rating\n ? t('operatorHero.ratingLabel', {\n value: rating.value.toFixed(1),\n count: rating.count,\n })\n : undefined;\n\n // Padding scales with density. Comfortable matches the practice\n // hero's `pt-xl pb-md` minus the cover strip; compact halves it.\n const bodyPaddingClass =\n density === 'comfortable'\n ? 'ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]'\n : 'ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]';\n\n // Avatar size keys off density. Comfortable = 2xl (~72px) to read\n // as the page hero. Compact = xl (~56px) for embedded use.\n const avatarSize = density === 'comfortable' ? '2xl' : 'xl';\n\n // Heading scale tracks density too. Comfortable uses the kit's\n // page-title token; compact drops to title-card so the operator\n // name doesn't dominate an embedded surface.\n const headingClass =\n density === 'comfortable' ? 'type-title-page' : 'type-title-card';\n\n const inner = (\n <div\n className={[\n 'ds:flex ds:items-start ds:gap-[var(--spacing-lg)]',\n bodyPaddingClass,\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n ].join(' ')}\n >\n <Avatar\n size={avatarSize}\n name={name}\n src={imageUrl}\n className=\"ds:shrink-0\"\n />\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-md)] ds:flex-wrap\">\n <h1\n id={headingId}\n className={`${headingClass} ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--foreground)]`}\n >\n {hasColor ? (\n <span\n ref={dotRef}\n role=\"img\"\n aria-label={t('operatorHero.colorLabel', 'Calendar colour')}\n className=\"ds:inline-block ds:size-[var(--spacing-sm)] ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[var(--operator-hero-color)]\"\n />\n ) : null}\n {name}\n </h1>\n {actionSlot ? (\n <div className=\"ds:ms-auto ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-xs)]\">\n {actionSlot}\n </div>\n ) : null}\n </div>\n {tagline ? (\n <p className=\"type-body ds:m-0 ds:text-[color:var(--foreground)]\">\n {tagline}\n </p>\n ) : null}\n {rating ? (\n <div\n className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\"\n aria-label={ratingLabel}\n >\n <Rating\n value={rating.value}\n max={5}\n size={density === 'comfortable' ? 'md' : 'sm'}\n />\n <span className=\"type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {rating.value.toFixed(1)} · {rating.count}\n </span>\n </div>\n ) : null}\n {badges && badges.length > 0 ? (\n <div\n role=\"list\"\n className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)] ds:mt-[var(--spacing-2xs)]\"\n >\n {badges.map((badge) => (\n <Badge\n key={badge.key}\n variant={badge.variant ?? 'neutral'}\n role=\"listitem\"\n >\n {badge.label}\n </Badge>\n ))}\n </div>\n ) : null}\n </div>\n </div>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-labelledby={headingId}\n data-component=\"operator-hero\"\n data-component-id={id}\n data-density={density}\n id={id}\n className={rootVariants({ surface, density, className })}\n {...rest}\n >\n {surface === 'elevated' ? (\n <Card variant=\"elevated\">{inner}</Card>\n ) : (\n inner\n )}\n </div>\n );\n },\n);\n\nOperatorHero.displayName = 'OperatorHero';\n\nexport type OperatorHeroDensity = NonNullable<\n VariantProps<typeof rootVariants>['density']\n>;\n"],"names":["operatorHeroAgent","handle","rootVariants","cva","OperatorHero","forwardRef","name","colorId","tagline","imageUrl","rating","badges","actionSlot","density","surface","ariaLabel","id","className","rest","ref","t","useTranslation","headingId","useId","resolvedAriaLabel","hasColor","dotRef","useRef","useAgentRegistration","useIsomorphicLayoutEffect","el","colorIdToToken","ratingLabel","bodyPaddingClass","avatarSize","headingClass","inner","jsxs","jsx","Avatar","Rating","badge","Badge","Card"],"mappings":";;;;;;;;;;;AAGO,MAAMA,IAAsD;AAAA,EACjE,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,EAKJ,cAAc,CAAA;AAAA,EACd,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,QAAA;AAAA,IAAQ;AAAA,IAEnC,UAAU;AAAA,MACR,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,YAAA;AAAA,IAAY;AAAA,EACvC;AAAA,EAEF,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GCAMC,IAAeC,EAAI,+CAA+C;AAAA,EACtE,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,IAKR,SAAS;AAAA,MACP,aAAa;AAAA,MACb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MAAM,QAAQ,CAAC;AAAA,oBAAE;AAAA,oBAAIA,EAAO;AAAA,kBAAA,EAAA,CACtC;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA,IAEA;AAAA,YACHC,KAAUA,EAAO,SAAS,IACzB,gBAAA2B;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,WAAU;AAAA,gBAET,UAAA3B,EAAO,IAAI,CAAC8B,MACX,gBAAAH;AAAA,kBAACI;AAAA,kBAAA;AAAA,oBAEC,SAASD,EAAM,WAAW;AAAA,oBAC1B,MAAK;AAAA,oBAEJ,UAAAA,EAAM;AAAA,kBAAA;AAAA,kBAJFA,EAAM;AAAA,gBAAA,CAMd;AAAA,cAAA;AAAA,YAAA,IAED;AAAA,UAAA,EAAA,CACN;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAIJ,WACE,gBAAAH;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAnB;AAAA,QACA,MAAK;AAAA,QACL,cAAYK;AAAA,QACZ,mBAAiBF;AAAA,QACjB,kBAAe;AAAA,QACf,qBAAmBN;AAAA,QACnB,gBAAcH;AAAA,QACd,IAAAG;AAAA,QACA,WAAWd,EAAa,EAAE,SAAAY,GAAS,SAAAD,GAAS,WAAAI,GAAW;AAAA,QACtD,GAAGC;AAAA,QAEH,gBAAY,aACX,gBAAAoB,EAACK,KAAK,SAAQ,YAAY,aAAM,IAEhCP;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAhC,EAAa,cAAc;"}
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
2
  import { forwardRef as X, useId as T, useMemo as Z, Fragment as $ } from "react";
3
3
  import { c as j } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as A } from "react-i18next";
5
- import { A as ee } from "./avatar-CkDeQOSI.js";
5
+ import { A as ee } from "./avatar-BVvjKNTp.js";
6
6
  import { C as f } from "./card-DPmk26CL.js";
7
7
  import { C as ie, b as te, a as se } from "./collapsible-CTjxzGuF.js";
8
8
  import { D as ae } from "./description-list-1A2DEbE6.js";
@@ -368,4 +368,4 @@ export {
368
368
  ue as P,
369
369
  me as p
370
370
  };
371
- //# sourceMappingURL=patient-details-C23Hdm8v.js.map
371
+ //# sourceMappingURL=patient-details-tTlvrJSU.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"patient-details-C23Hdm8v.js","sources":["../../src/components/patient-details/patient-details.agent.ts","../../src/components/patient-details/patient-details.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { PatientDetailsHandle } from './patient-details';\n\n/* -------------------------------------------------------------------- */\n/* Agent adapter — PatientDetails */\n/* */\n/* Exposes the patient panel to a future MCP runtime: */\n/* - VIEW CONFIG (safety: write) — show/hide + reorder the visible */\n/* field set. These mutate the user's view, not the patient record. */\n/* - PHI WRITE (safety: phi) — `update_field` writes a patient field */\n/* value. It is the ONLY PHI mutation and routes through the same */\n/* `onFieldSave` path as a human inline edit, so the consumer's */\n/* permission + validation + audit are the single write authority. */\n/* `phi` (not `write`) forces the runtime's confirm-before-act gate. */\n/* */\n/* STATE exposes only field KEYS (`visibleFieldOrder`) and an opaque */\n/* `patientId` — never a field value or patient identity (PRS §Security, */\n/* 26-agent-readiness §6.1/§7). */\n/* -------------------------------------------------------------------- */\n\nexport const patientDetailsAgent: AgentAdapter<PatientDetailsHandle> = {\n id: 'patient-details',\n // `view_change` backs the view-config actions (show/hide + reorder are both\n // view reconfigurations); `set_value` backs the single-value `update_field`\n // (not `edit_inline`, which is for granular free-text/formatting edits).\n capabilities: ['view_change', 'set_value'],\n state: {\n visibleFieldOrder: {\n type: 'string[]',\n descriptionKey: 'ui.agent.patientDetails.state.visibleFieldOrder',\n description:\n 'Ordered list of visible field KEYS (e.g. \"fiscalCode\"). Never a field value.',\n read: (handle) => handle.getVisibleFieldOrder(),\n },\n patientId: {\n type: 'string | undefined',\n descriptionKey: 'ui.agent.patientDetails.state.patientId',\n description:\n 'Opaque patient id the panel is bound to. No patient-identifiable data.',\n read: (handle) => handle.getPatientId(),\n },\n },\n actions: {\n set_visible_fields: {\n safety: 'write',\n argsType: '{ fieldIds: string[] }',\n argsSchema: {\n type: 'object',\n properties: {\n fieldIds: { type: 'array', items: { type: 'string' } },\n },\n required: ['fieldIds'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.patientDetails.actions.setVisibleFields',\n description:\n 'Set which fields are visible (and their order). Unknown ids are ignored.',\n examples: [\n {\n args: { fieldIds: ['lastName', 'firstName', 'phone', 'email'] },\n note: 'Show only name + contact fields.',\n },\n ],\n invoke: (handle, args: { fieldIds: string[] }) => {\n handle.setVisibleFields(args.fieldIds);\n },\n },\n set_field_order: {\n safety: 'write',\n argsType: '{ orderedIds: string[] }',\n argsSchema: {\n type: 'object',\n properties: {\n orderedIds: { type: 'array', items: { type: 'string' } },\n },\n required: ['orderedIds'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.patientDetails.actions.setFieldOrder',\n description:\n 'Reorder the visible fields. Order within a section is honoured; sections stay fixed.',\n invoke: (handle, args: { orderedIds: string[] }) => {\n handle.setFieldOrder(args.orderedIds);\n },\n },\n update_field: {\n // PHI: mutates a patient-identifiable value. NOT `write` — the runtime\n // must confirm + audit. Routes through `onFieldSave` (server write).\n safety: 'phi',\n openWorld: true,\n argsType: '{ fieldId: string; value: unknown }',\n argsSchema: {\n type: 'object',\n properties: {\n fieldId: { type: 'string' },\n value: {},\n },\n required: ['fieldId', 'value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.patientDetails.actions.updateField',\n description:\n \"Write a patient field value via the consumer's audited save path. Subject to the same permissions and validation as a human edit.\",\n errors: ['no-save-handler', 'validation-failed', 'permission-denied'],\n examples: [\n {\n args: { fieldId: 'job', value: 'Architect' },\n note: 'Update the patient’s occupation.',\n },\n ],\n invoke: (handle, args: { fieldId: string; value: unknown }) =>\n handle.updateField(args.fieldId, args.value),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'patient-details',\n description: 'Marks the PatientDetails root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop. Addresses a specific panel.',\n },\n item: {\n attr: 'data-field-id',\n description:\n 'Stable field KEY on each row. Never the field value (no PHI in the DOM hook).',\n },\n },\n};\n","import {\n forwardRef,\n Fragment,\n useId,\n useMemo,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ClipboardList } from 'lucide-react';\nimport { Avatar } from '../avatar/avatar';\nimport { Card } from '../card/card';\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from '../collapsible/collapsible';\nimport { DescriptionList } from '../description-list/description-list';\nimport { PanelHeader } from '../panel-header/panel-header';\nimport { useAgentRegistration } from '../../agent/registry';\nimport {\n resolveVisibleFields,\n type PatientField,\n type PatientFieldEditType,\n type PatientFieldEditValue,\n type PatientFieldOption,\n type PatientFieldSection,\n} from '../_shared/patient-fields';\nimport { usePatientFieldVisibility } from '../_shared/field-visibility';\nimport { FieldVisibilityCog } from '../_shared/field-visibility-cog';\nimport { PatientFieldRow } from '../_shared/patient-field-row';\nimport { patientDetailsAgent } from './patient-details.agent';\n\n/* -------------------------------------------------------------------- */\n/* PatientDetails */\n/* */\n/* The customizable, inline-editable patient record panel — the kit's */\n/* replacement for platform's hardcoded, per-user-identical patient */\n/* \"scheda paziente\" table. Mounts as a CONTEXTUAL tool in the Control */\n/* Room rail (a separate tool from EntitySummary, the AI brief). */\n/* */\n/* Boundaries (PRS §Security + 26-agent-readiness §PHI): */\n/* - DATA-IN for values: the consumer maps DoctorPatient → sections. */\n/* The kit owns the layout, the cog field-picker, i18n & theming. */\n/* - PERSISTENCE-OUT: the cog emits `onVisibleFieldsChange`; the */\n/* consumer persists the user's chosen ordered field set (platform: */\n/* a per-user × per-practice JSON column). */\n/* - WRITE-OUT: inline edits AND the agent's `update_field` BOTH route */\n/* through the single `onFieldSave` callback, so platform's */\n/* permission + validation + audit path is the only write channel. */\n/* - DOM hooks + agent state carry only field KEYS and an opaque */\n/* `patientId` — never a field VALUE / patient identity. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA — root */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n 'ds:flex ds:flex-col ds:text-[color:var(--foreground)]',\n {\n variants: {\n // `compact` (default) suits the narrow rail panel; `comfortable`\n // relaxes spacing for a wider host (a full-width profile page).\n density: {\n comfortable: '',\n compact: '',\n },\n },\n defaultVariants: {\n density: 'compact',\n },\n },\n);\n\n// The scrolling body sits BELOW the shared PanelHeader (which owns the title\n// row + divider + its own top/side padding). The header is full-bleed at the\n// top of the scroll region; the body carries the panel's content padding.\nconst bodyVariants = cva('ds:flex ds:flex-col ds:gap-[var(--spacing-md)]', {\n variants: {\n density: {\n comfortable: 'ds:p-[var(--spacing-md)]',\n compact: 'ds:p-[var(--spacing-sm)]',\n },\n },\n defaultVariants: {\n density: 'compact',\n },\n});\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* */\n/* The field model is the shared `_shared/patient-fields` vocabulary, so */\n/* PatientDetails and PatientSummaryCard speak ONE field language. The */\n/* visible set + order are a PER-CONTEXT preference the consumer owns and */\n/* wires per placement — never a single value synced across surfaces. The */\n/* `PatientDetails*` names below are kept as aliases for back-compat. */\n/* -------------------------------------------------------------------- */\n\nexport type {\n PatientField,\n PatientFieldSection,\n PatientFieldOption,\n PatientFieldEditType,\n PatientFieldEditValue,\n} from '../_shared/patient-fields';\n\n/** A label→value patient field. Alias of the shared {@link PatientField}. */\nexport type PatientDetailsField = PatientField;\n/** A labelled, collapsible group of fields. Alias of {@link PatientFieldSection}. */\nexport type PatientDetailsSection = PatientFieldSection;\n/** Alias of the shared {@link PatientFieldOption}. */\nexport type PatientDetailsFieldOption = PatientFieldOption;\n/** Alias of the shared {@link PatientFieldEditType}. */\nexport type PatientDetailsEditType = PatientFieldEditType;\n/** Alias of the shared {@link PatientFieldEditValue}. */\nexport type PatientDetailsEditValue = PatientFieldEditValue;\n\n/**\n * Imperative handle the agent adapter drives. Exposes only field KEYS and\n * an opaque `patientId` for reads; `updateField` routes writes through the\n * same `onFieldSave` path as a human inline edit (no second channel).\n */\nexport interface PatientDetailsHandle {\n /** The current ordered list of visible field ids. */\n getVisibleFieldOrder: () => string[];\n /** Opaque patient id (no PHI). */\n getPatientId: () => string | undefined;\n /** Replace the visible set, preserving the given order (filtered to known fields). */\n setVisibleFields: (fieldIds: string[]) => void;\n /** Replace the full ordered visible list (filtered to known fields). */\n setFieldOrder: (orderedIds: string[]) => void;\n /** Write a field value — delegates to `onFieldSave`. Rejects if no handler. */\n updateField: (fieldId: string, value: unknown) => Promise<void>;\n}\n\nexport interface PatientDetailsProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'title' | 'children'\n> {\n /** Patient display name — the panel heading. */\n title: ReactNode;\n /** The sectioned field catalogue (consumer-mapped from DoctorPatient). */\n sections: PatientDetailsSection[];\n /**\n * Header avatar photo / initials override. The panel always fronts the name\n * with an Avatar — initials derive from a string `title` by default; pass\n * `src` for a photo, or `name` to override the initials source.\n */\n avatar?: { src?: string; name?: string };\n /** At-a-glance chips under the name (consumer-composed Badge/Tag/Chip row). */\n headerChips?: ReactNode;\n\n /* ----- inline editing (kit-owned controls, consumer-owned write) ----- */\n\n /**\n * Frame the identity header and each section in its own elevated `Card`,\n * for a \"control-room\" rail that reads as a stack of cards rather than one\n * flat panel. Default `false` (the flat panel with a header rule + eyebrow\n * section headings). When framed, the header rule is dropped — the cards\n * provide the separation.\n */\n framed?: boolean;\n /** Master switch — show edit affordances on `editable` fields. */\n editable?: boolean;\n /**\n * Persist a field edit. Resolve ⇒ committed; reject(Error) ⇒ the message\n * is shown inline and the row stays in edit mode. Also the single channel\n * the agent's `update_field` uses.\n */\n onFieldSave?: (fieldId: string, value: unknown) => Promise<void>;\n /** Domain validation — return an error message, or `null` when valid. */\n validate?: (fieldId: string, value: unknown) => string | null;\n\n /* ----- customization (the cog; controlled OR uncontrolled) ----- */\n\n /**\n * Controlled ordered list of visible field ids. `undefined` ⇒ every field\n * visible; an explicit `[]` ⇒ none (a panel that starts collapsed).\n */\n visibleFieldOrder?: string[];\n /** Uncontrolled initial order. Omit both ⇒ every field visible, in declaration order. */\n defaultVisibleFieldOrder?: string[];\n /** Fired whenever the user shows/hides/reorders fields via the cog. */\n onVisibleFieldsChange?: (orderedIds: string[]) => void;\n\n /* ----- states ----- */\n\n /** Render the loading skeleton. */\n loading?: boolean;\n /** Shown when there are no sections / no patient. Defaults to a localised hint. */\n emptyState?: ReactNode;\n\n /* ----- agent / a11y ----- */\n\n /** Opaque patient id — emitted as `data-patient-id` + agent stateRead. No PHI. */\n patientId?: string;\n /** Agent-readiness instance id, surfaced as `data-component-id`. */\n id?: string;\n /** BCP-47 locale override (currency / number editors). */\n locale?: string;\n /** Override the cog trigger's accessible name. */\n cogLabel?: string;\n /**\n * Visible panel-chrome heading (the sticky PanelHeader title). Defaults\n * to the kit's localised \"Patient details\". Pass an app-translated\n * string when the panel fronts a different record built from the same\n * chrome — \"Appointment details\", \"Task details\" — so the header names\n * what is actually shown. Also the `aria-label` fallback.\n */\n panelTitle?: string;\n /** Override the panel region's accessible name (defaults to the heading). */\n 'aria-label'?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const PatientDetails = forwardRef<HTMLElement, PatientDetailsProps>(\n function PatientDetails(\n {\n title,\n sections,\n avatar,\n headerChips,\n framed = false,\n editable = false,\n onFieldSave,\n validate,\n visibleFieldOrder,\n defaultVisibleFieldOrder,\n onVisibleFieldsChange,\n loading = false,\n emptyState,\n patientId,\n id,\n locale,\n cogLabel,\n panelTitle: panelTitleProp,\n 'aria-label': ariaLabel,\n className,\n ...rest\n },\n ref,\n ) {\n const { t } = useTranslation();\n const headingId = useId();\n\n // Per-context field visibility + ordering. The order is a per-INSTANCE\n // preference the kit never persists — the consumer wires its own\n // value/onChange, so the same field vocabulary can render differently in\n // different parts of the app (see usePatientFieldVisibility).\n const {\n visible,\n catalogueIds,\n setOrder,\n toggleField,\n toggleSection,\n moveFieldOnto,\n reset: resetToDefaults,\n } = usePatientFieldVisibility(sections, {\n value: visibleFieldOrder,\n defaultValue: defaultVisibleFieldOrder,\n onChange: onVisibleFieldsChange,\n });\n\n /* ---- imperative handle (agent) ------------------------------- */\n\n const handle = useMemo<PatientDetailsHandle>(\n () => ({\n getVisibleFieldOrder: () => visible,\n getPatientId: () => patientId,\n setVisibleFields: (fieldIds) => setOrder(fieldIds),\n setFieldOrder: (orderedIds) => setOrder(orderedIds),\n updateField: (fieldId, value) => {\n if (!onFieldSave) {\n return Promise.reject(\n new Error('PatientDetails: no onFieldSave handler is wired.'),\n );\n }\n return onFieldSave(fieldId, value);\n },\n }),\n [visible, patientId, setOrder, onFieldSave],\n );\n useAgentRegistration(patientDetailsAgent, handle, id);\n\n /* ---- region accessible name ---------------------------------- */\n\n const panelTitle =\n panelTitleProp ??\n t('patientDetails.regionLabel', {\n defaultValue: 'Patient details',\n });\n const resolvedAriaLabel = ariaLabel ?? panelTitle;\n\n /* ---- header avatar ------------------------------------------- */\n // Parity with the card: the panel fronts the name with an Avatar (photo via\n // `avatar.src`, else initials from the name). Omitted only when `title` is a\n // non-string node and no `avatar.name` is given (nothing to derive from).\n const avatarName =\n avatar?.name ?? (typeof title === 'string' ? title : undefined);\n const showAvatar = Boolean(avatar?.src || avatarName);\n\n /* ---- loading / empty ----------------------------------------- */\n\n const hasVisible = catalogueIds.some((cid) => visible.includes(cid));\n\n if (loading) {\n return (\n <section\n ref={ref}\n data-component=\"patient-details\"\n data-component-id={id}\n data-patient-id={patientId}\n aria-label={resolvedAriaLabel}\n aria-busy=\"true\"\n className={rootVariants({ className })}\n {...rest}\n >\n <div className={bodyVariants()}>\n <PatientDetailsSkeleton />\n </div>\n </section>\n );\n }\n\n const isEmpty = sections.length === 0 || !hasVisible;\n\n // The identity card (avatar + name + chips) is now the FIRST block of the\n // scrolling body — the shared PanelHeader owns the panel title row. The\n // name demotes to <h3> (the PanelHeader title is the <h2>).\n const identityBlock = (\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-sm)]\">\n {showAvatar ? (\n <Avatar\n size=\"md\"\n name={avatarName}\n src={avatar?.src}\n className=\"ds:shrink-0\"\n />\n ) : null}\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <h3 className=\"ds:m-0 type-title-item ds:text-[color:var(--foreground)]\">\n {title}\n </h3>\n {/* Chips sit under the NAME (not the avatar) — same column shape\n as the card's identity line. */}\n {headerChips ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]\">\n {headerChips}\n </div>\n ) : null}\n </div>\n </div>\n );\n\n return (\n <section\n ref={ref}\n data-component=\"patient-details\"\n data-component-id={id}\n data-patient-id={patientId}\n aria-labelledby={ariaLabel ? undefined : headingId}\n aria-label={ariaLabel ?? undefined}\n className={rootVariants({ className })}\n {...rest}\n >\n {/* The shared rail-panel header: panel title + the field-picker cog as\n its panel-owned action; the rail injects favourite/close after it.\n Sticky + divider so the title stays as the body scrolls. */}\n <PanelHeader\n title={panelTitle}\n icon={<ClipboardList aria-hidden=\"true\" />}\n headingId={headingId}\n sticky\n divider\n actions={\n <FieldVisibilityCog\n sections={sections}\n visible={visible}\n onToggleField={toggleField}\n onToggleSection={toggleSection}\n onMoveFieldOnto={moveFieldOnto}\n onReset={resetToDefaults}\n label={cogLabel}\n />\n }\n />\n\n <div className={bodyVariants()}>\n {/* Identity card — first block of the body; framed wraps it in its\n own elevated card alongside each section. */}\n {framed ? (\n <Card variant=\"elevated\">\n <Card.Body>{identityBlock}</Card.Body>\n </Card>\n ) : (\n identityBlock\n )}\n\n {/* Body — one card per section when framed, otherwise a flat stack. */}\n {isEmpty ? (\n <p className=\"ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {emptyState ??\n t('patientDetails.empty', {\n defaultValue: 'No patient selected.',\n })}\n </p>\n ) : (\n resolveVisibleFields(sections, visible)\n // A section whose fields are all hidden drops out entirely —\n // no empty card / \"No fields shown.\" placeholder. (The field\n // picker still lists it, so hidden fields can be re-added.)\n .filter(({ fields }) => fields.length > 0)\n .map(({ section, fields }) => {\n const block = (\n <SectionBlock\n section={section}\n fields={fields}\n editable={editable}\n onFieldSave={onFieldSave}\n validate={validate}\n locale={locale}\n />\n );\n return framed ? (\n <Card key={section.id} variant=\"elevated\">\n <Card.Body>{block}</Card.Body>\n </Card>\n ) : (\n <Fragment key={section.id}>{block}</Fragment>\n );\n })\n )}\n </div>\n </section>\n );\n },\n);\n\nPatientDetails.displayName = 'PatientDetails';\n\n/* -------------------------------------------------------------------- */\n/* SectionBlock — one collapsible group */\n/* -------------------------------------------------------------------- */\n\nfunction SectionBlock({\n section,\n fields,\n editable,\n onFieldSave,\n validate,\n locale,\n}: {\n section: PatientDetailsSection;\n fields: PatientDetailsField[];\n editable: boolean;\n onFieldSave?: (fieldId: string, value: unknown) => Promise<void>;\n validate?: (fieldId: string, value: unknown) => string | null;\n locale?: string;\n}): ReactNode {\n const { t } = useTranslation();\n const headingId = useId();\n const collapsible = section.collapsible ?? true;\n\n // The empty hint must be a SIBLING of the <dl>, never a child — a <p> is\n // not a valid direct child of <dl> (axe `definition-list`).\n const rows =\n fields.length === 0 ? (\n <p className=\"ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {t('patientDetails.section.empty', {\n defaultValue: 'No fields shown.',\n })}\n </p>\n ) : (\n <DescriptionList\n layout=\"inline\"\n density=\"compact\"\n divider=\"none\"\n // Label icons paint in the accent (the slot's recolour hook); no row rules.\n className=\"ds:[--description-list-icon-color:var(--accent)]\"\n >\n {fields.map((field) => (\n <PatientFieldRow\n key={field.id}\n field={field}\n // Surface the icon on the direct child: DescriptionList reserves its\n // icon column by inspecting direct children only, so the FieldRow\n // wrapper must carry it (not just the nested Row).\n icon={field.icon ?? null}\n editable={editable}\n onFieldSave={onFieldSave}\n validate={validate}\n locale={locale}\n />\n ))}\n </DescriptionList>\n );\n\n if (!collapsible) {\n return (\n <section\n aria-labelledby={headingId}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\"\n >\n <h3\n id={headingId}\n className=\"ds:m-0 type-eyebrow ds:text-[color:var(--foreground)]\"\n >\n {section.heading}\n </h3>\n {rows}\n </section>\n );\n }\n\n return (\n <Collapsible\n defaultOpen={section.defaultOpen ?? true}\n variant=\"minimal\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\"\n >\n {/* Real <h3> so collapsible sections appear in the heading outline\n (the non-collapsible branch is an <h3> too); the WAI-ARIA accordion\n pattern is a heading wrapping the disclosure button. */}\n <h3 className=\"ds:m-0\">\n <CollapsibleTrigger asChild>\n <button\n type=\"button\"\n id={headingId}\n className=\"ds:flex ds:w-full ds:items-center ds:justify-between ds:gap-[var(--spacing-xs)] ds:bg-transparent ds:border-0 ds:p-0 ds:text-start ds:cursor-pointer ds:rounded-[var(--radius-sm)] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText] type-eyebrow ds:text-[color:var(--foreground)]\"\n >\n {section.heading}\n </button>\n </CollapsibleTrigger>\n </h3>\n <CollapsibleContent aria-labelledby={headingId}>\n {rows}\n </CollapsibleContent>\n </Collapsible>\n );\n}\n\n/* -------------------------------------------------------------------- */\n/* Skeleton */\n/* -------------------------------------------------------------------- */\n\nfunction PatientDetailsSkeleton(): ReactNode {\n return (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <span className=\"ds:size-10 ds:shrink-0 ds:rounded-full ds:bg-[color:var(--muted)]\" />\n <span className=\"ds:h-4 ds:w-1/2 ds:rounded-[var(--radius-sm)] ds:bg-[color:var(--muted)]\" />\n </div>\n {[0, 1, 2].map((i) => (\n <span\n key={i}\n className=\"ds:h-4 ds:w-full ds:rounded-[var(--radius-sm)] ds:bg-[color:var(--muted)]\"\n />\n ))}\n </div>\n );\n}\n\n/** Density variant union re-exported for downstream typing. */\nexport type PatientDetailsDensity = NonNullable<\n VariantProps<typeof rootVariants>['density']\n>;\n"],"names":["patientDetailsAgent","handle","args","rootVariants","cva","bodyVariants","PatientDetails","forwardRef","title","sections","avatar","headerChips","framed","editable","onFieldSave","validate","visibleFieldOrder","defaultVisibleFieldOrder","onVisibleFieldsChange","loading","emptyState","patientId","id","locale","cogLabel","panelTitleProp","ariaLabel","className","rest","ref","t","useTranslation","headingId","useId","visible","catalogueIds","setOrder","toggleField","toggleSection","moveFieldOnto","resetToDefaults","usePatientFieldVisibility","useMemo","fieldIds","orderedIds","fieldId","value","useAgentRegistration","panelTitle","resolvedAriaLabel","avatarName","showAvatar","hasVisible","cid","jsx","PatientDetailsSkeleton","isEmpty","identityBlock","jsxs","Avatar","PanelHeader","ClipboardList","FieldVisibilityCog","Card","resolveVisibleFields","fields","section","block","SectionBlock","Fragment","collapsible","rows","DescriptionList","field","PatientFieldRow","Collapsible","CollapsibleTrigger","CollapsibleContent"],"mappings":";;;;;;;;;;;;AAoBO,MAAMA,KAA0D;AAAA,EACrE,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,cAAc,CAAC,eAAe,WAAW;AAAA,EACzC,OAAO;AAAA,IACL,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,qBAAA;AAAA,IAAqB;AAAA,IAEhD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,aAAA;AAAA,IAAa;AA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AAA;AAAA,IAAA;AAAA,EAAA,IArCA,gBAAAb;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,mBAAiB1B;AAAA,MACjB,WAAU;AAAA,MAEV,UAAA;AAAA,QAAA,gBAAAsB;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAItB;AAAA,YACJ,WAAU;AAAA,YAET,UAAAkC,EAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,QAEVK;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AA8BT;AAMA,SAAShB,KAAoC;AAC3C,SACE,gBAAAG,EAAC,OAAA,EAAI,WAAU,kDACb,UAAA;AAAA,IAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,sDACb,UAAA;AAAA,MAAA,gBAAAJ,EAAC,QAAA,EAAK,WAAU,oEAAA,CAAoE;AAAA,MACpF,gBAAAA,EAAC,QAAA,EAAK,WAAU,2EAAA,CAA2E;AAAA,IAAA,GAC7F;AAAA,IACC,CAAC,GAAG,GAAG,CAAC,EAAE,IAAI,CAAC,MACd,gBAAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,WAAU;AAAA,MAAA;AAAA,MADL;AAAA,IAAA,CAGR;AAAA,EAAA,GACH;AAEJ;"}
1
+ {"version":3,"file":"patient-details-tTlvrJSU.js","sources":["../../src/components/patient-details/patient-details.agent.ts","../../src/components/patient-details/patient-details.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { PatientDetailsHandle } from './patient-details';\n\n/* -------------------------------------------------------------------- */\n/* Agent adapter — PatientDetails */\n/* */\n/* Exposes the patient panel to a future MCP runtime: */\n/* - VIEW CONFIG (safety: write) — show/hide + reorder the visible */\n/* field set. These mutate the user's view, not the patient record. */\n/* - PHI WRITE (safety: phi) — `update_field` writes a patient field */\n/* value. It is the ONLY PHI mutation and routes through the same */\n/* `onFieldSave` path as a human inline edit, so the consumer's */\n/* permission + validation + audit are the single write authority. */\n/* `phi` (not `write`) forces the runtime's confirm-before-act gate. */\n/* */\n/* STATE exposes only field KEYS (`visibleFieldOrder`) and an opaque */\n/* `patientId` — never a field value or patient identity (PRS §Security, */\n/* 26-agent-readiness §6.1/§7). */\n/* -------------------------------------------------------------------- */\n\nexport const patientDetailsAgent: AgentAdapter<PatientDetailsHandle> = {\n id: 'patient-details',\n // `view_change` backs the view-config actions (show/hide + reorder are both\n // view reconfigurations); `set_value` backs the single-value `update_field`\n // (not `edit_inline`, which is for granular free-text/formatting edits).\n capabilities: ['view_change', 'set_value'],\n state: {\n visibleFieldOrder: {\n type: 'string[]',\n descriptionKey: 'ui.agent.patientDetails.state.visibleFieldOrder',\n description:\n 'Ordered list of visible field KEYS (e.g. \"fiscalCode\"). Never a field value.',\n read: (handle) => handle.getVisibleFieldOrder(),\n },\n patientId: {\n type: 'string | undefined',\n descriptionKey: 'ui.agent.patientDetails.state.patientId',\n description:\n 'Opaque patient id the panel is bound to. No patient-identifiable data.',\n read: (handle) => handle.getPatientId(),\n },\n },\n actions: {\n set_visible_fields: {\n safety: 'write',\n argsType: '{ fieldIds: string[] }',\n argsSchema: {\n type: 'object',\n properties: {\n fieldIds: { type: 'array', items: { type: 'string' } },\n },\n required: ['fieldIds'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.patientDetails.actions.setVisibleFields',\n description:\n 'Set which fields are visible (and their order). Unknown ids are ignored.',\n examples: [\n {\n args: { fieldIds: ['lastName', 'firstName', 'phone', 'email'] },\n note: 'Show only name + contact fields.',\n },\n ],\n invoke: (handle, args: { fieldIds: string[] }) => {\n handle.setVisibleFields(args.fieldIds);\n },\n },\n set_field_order: {\n safety: 'write',\n argsType: '{ orderedIds: string[] }',\n argsSchema: {\n type: 'object',\n properties: {\n orderedIds: { type: 'array', items: { type: 'string' } },\n },\n required: ['orderedIds'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.patientDetails.actions.setFieldOrder',\n description:\n 'Reorder the visible fields. Order within a section is honoured; sections stay fixed.',\n invoke: (handle, args: { orderedIds: string[] }) => {\n handle.setFieldOrder(args.orderedIds);\n },\n },\n update_field: {\n // PHI: mutates a patient-identifiable value. NOT `write` — the runtime\n // must confirm + audit. Routes through `onFieldSave` (server write).\n safety: 'phi',\n openWorld: true,\n argsType: '{ fieldId: string; value: unknown }',\n argsSchema: {\n type: 'object',\n properties: {\n fieldId: { type: 'string' },\n value: {},\n },\n required: ['fieldId', 'value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.patientDetails.actions.updateField',\n description:\n \"Write a patient field value via the consumer's audited save path. Subject to the same permissions and validation as a human edit.\",\n errors: ['no-save-handler', 'validation-failed', 'permission-denied'],\n examples: [\n {\n args: { fieldId: 'job', value: 'Architect' },\n note: 'Update the patient’s occupation.',\n },\n ],\n invoke: (handle, args: { fieldId: string; value: unknown }) =>\n handle.updateField(args.fieldId, args.value),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'patient-details',\n description: 'Marks the PatientDetails root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop. Addresses a specific panel.',\n },\n item: {\n attr: 'data-field-id',\n description:\n 'Stable field KEY on each row. Never the field value (no PHI in the DOM hook).',\n },\n },\n};\n","import {\n forwardRef,\n Fragment,\n useId,\n useMemo,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ClipboardList } from 'lucide-react';\nimport { Avatar } from '../avatar/avatar';\nimport { Card } from '../card/card';\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from '../collapsible/collapsible';\nimport { DescriptionList } from '../description-list/description-list';\nimport { PanelHeader } from '../panel-header/panel-header';\nimport { useAgentRegistration } from '../../agent/registry';\nimport {\n resolveVisibleFields,\n type PatientField,\n type PatientFieldEditType,\n type PatientFieldEditValue,\n type PatientFieldOption,\n type PatientFieldSection,\n} from '../_shared/patient-fields';\nimport { usePatientFieldVisibility } from '../_shared/field-visibility';\nimport { FieldVisibilityCog } from '../_shared/field-visibility-cog';\nimport { PatientFieldRow } from '../_shared/patient-field-row';\nimport { patientDetailsAgent } from './patient-details.agent';\n\n/* -------------------------------------------------------------------- */\n/* PatientDetails */\n/* */\n/* The customizable, inline-editable patient record panel — the kit's */\n/* replacement for platform's hardcoded, per-user-identical patient */\n/* \"scheda paziente\" table. Mounts as a CONTEXTUAL tool in the Control */\n/* Room rail (a separate tool from EntitySummary, the AI brief). */\n/* */\n/* Boundaries (PRS §Security + 26-agent-readiness §PHI): */\n/* - DATA-IN for values: the consumer maps DoctorPatient → sections. */\n/* The kit owns the layout, the cog field-picker, i18n & theming. */\n/* - PERSISTENCE-OUT: the cog emits `onVisibleFieldsChange`; the */\n/* consumer persists the user's chosen ordered field set (platform: */\n/* a per-user × per-practice JSON column). */\n/* - WRITE-OUT: inline edits AND the agent's `update_field` BOTH route */\n/* through the single `onFieldSave` callback, so platform's */\n/* permission + validation + audit path is the only write channel. */\n/* - DOM hooks + agent state carry only field KEYS and an opaque */\n/* `patientId` — never a field VALUE / patient identity. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA — root */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n 'ds:flex ds:flex-col ds:text-[color:var(--foreground)]',\n {\n variants: {\n // `compact` (default) suits the narrow rail panel; `comfortable`\n // relaxes spacing for a wider host (a full-width profile page).\n density: {\n comfortable: '',\n compact: '',\n },\n },\n defaultVariants: {\n density: 'compact',\n },\n },\n);\n\n// The scrolling body sits BELOW the shared PanelHeader (which owns the title\n// row + divider + its own top/side padding). The header is full-bleed at the\n// top of the scroll region; the body carries the panel's content padding.\nconst bodyVariants = cva('ds:flex ds:flex-col ds:gap-[var(--spacing-md)]', {\n variants: {\n density: {\n comfortable: 'ds:p-[var(--spacing-md)]',\n compact: 'ds:p-[var(--spacing-sm)]',\n },\n },\n defaultVariants: {\n density: 'compact',\n },\n});\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* */\n/* The field model is the shared `_shared/patient-fields` vocabulary, so */\n/* PatientDetails and PatientSummaryCard speak ONE field language. The */\n/* visible set + order are a PER-CONTEXT preference the consumer owns and */\n/* wires per placement — never a single value synced across surfaces. The */\n/* `PatientDetails*` names below are kept as aliases for back-compat. */\n/* -------------------------------------------------------------------- */\n\nexport type {\n PatientField,\n PatientFieldSection,\n PatientFieldOption,\n PatientFieldEditType,\n PatientFieldEditValue,\n} from '../_shared/patient-fields';\n\n/** A label→value patient field. Alias of the shared {@link PatientField}. */\nexport type PatientDetailsField = PatientField;\n/** A labelled, collapsible group of fields. Alias of {@link PatientFieldSection}. */\nexport type PatientDetailsSection = PatientFieldSection;\n/** Alias of the shared {@link PatientFieldOption}. */\nexport type PatientDetailsFieldOption = PatientFieldOption;\n/** Alias of the shared {@link PatientFieldEditType}. */\nexport type PatientDetailsEditType = PatientFieldEditType;\n/** Alias of the shared {@link PatientFieldEditValue}. */\nexport type PatientDetailsEditValue = PatientFieldEditValue;\n\n/**\n * Imperative handle the agent adapter drives. Exposes only field KEYS and\n * an opaque `patientId` for reads; `updateField` routes writes through the\n * same `onFieldSave` path as a human inline edit (no second channel).\n */\nexport interface PatientDetailsHandle {\n /** The current ordered list of visible field ids. */\n getVisibleFieldOrder: () => string[];\n /** Opaque patient id (no PHI). */\n getPatientId: () => string | undefined;\n /** Replace the visible set, preserving the given order (filtered to known fields). */\n setVisibleFields: (fieldIds: string[]) => void;\n /** Replace the full ordered visible list (filtered to known fields). */\n setFieldOrder: (orderedIds: string[]) => void;\n /** Write a field value — delegates to `onFieldSave`. Rejects if no handler. */\n updateField: (fieldId: string, value: unknown) => Promise<void>;\n}\n\nexport interface PatientDetailsProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'title' | 'children'\n> {\n /** Patient display name — the panel heading. */\n title: ReactNode;\n /** The sectioned field catalogue (consumer-mapped from DoctorPatient). */\n sections: PatientDetailsSection[];\n /**\n * Header avatar photo / initials override. The panel always fronts the name\n * with an Avatar — initials derive from a string `title` by default; pass\n * `src` for a photo, or `name` to override the initials source.\n */\n avatar?: { src?: string; name?: string };\n /** At-a-glance chips under the name (consumer-composed Badge/Tag/Chip row). */\n headerChips?: ReactNode;\n\n /* ----- inline editing (kit-owned controls, consumer-owned write) ----- */\n\n /**\n * Frame the identity header and each section in its own elevated `Card`,\n * for a \"control-room\" rail that reads as a stack of cards rather than one\n * flat panel. Default `false` (the flat panel with a header rule + eyebrow\n * section headings). When framed, the header rule is dropped — the cards\n * provide the separation.\n */\n framed?: boolean;\n /** Master switch — show edit affordances on `editable` fields. */\n editable?: boolean;\n /**\n * Persist a field edit. Resolve ⇒ committed; reject(Error) ⇒ the message\n * is shown inline and the row stays in edit mode. Also the single channel\n * the agent's `update_field` uses.\n */\n onFieldSave?: (fieldId: string, value: unknown) => Promise<void>;\n /** Domain validation — return an error message, or `null` when valid. */\n validate?: (fieldId: string, value: unknown) => string | null;\n\n /* ----- customization (the cog; controlled OR uncontrolled) ----- */\n\n /**\n * Controlled ordered list of visible field ids. `undefined` ⇒ every field\n * visible; an explicit `[]` ⇒ none (a panel that starts collapsed).\n */\n visibleFieldOrder?: string[];\n /** Uncontrolled initial order. Omit both ⇒ every field visible, in declaration order. */\n defaultVisibleFieldOrder?: string[];\n /** Fired whenever the user shows/hides/reorders fields via the cog. */\n onVisibleFieldsChange?: (orderedIds: string[]) => void;\n\n /* ----- states ----- */\n\n /** Render the loading skeleton. */\n loading?: boolean;\n /** Shown when there are no sections / no patient. Defaults to a localised hint. */\n emptyState?: ReactNode;\n\n /* ----- agent / a11y ----- */\n\n /** Opaque patient id — emitted as `data-patient-id` + agent stateRead. No PHI. */\n patientId?: string;\n /** Agent-readiness instance id, surfaced as `data-component-id`. */\n id?: string;\n /** BCP-47 locale override (currency / number editors). */\n locale?: string;\n /** Override the cog trigger's accessible name. */\n cogLabel?: string;\n /**\n * Visible panel-chrome heading (the sticky PanelHeader title). Defaults\n * to the kit's localised \"Patient details\". Pass an app-translated\n * string when the panel fronts a different record built from the same\n * chrome — \"Appointment details\", \"Task details\" — so the header names\n * what is actually shown. Also the `aria-label` fallback.\n */\n panelTitle?: string;\n /** Override the panel region's accessible name (defaults to the heading). */\n 'aria-label'?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const PatientDetails = forwardRef<HTMLElement, PatientDetailsProps>(\n function PatientDetails(\n {\n title,\n sections,\n avatar,\n headerChips,\n framed = false,\n editable = false,\n onFieldSave,\n validate,\n visibleFieldOrder,\n defaultVisibleFieldOrder,\n onVisibleFieldsChange,\n loading = false,\n emptyState,\n patientId,\n id,\n locale,\n cogLabel,\n panelTitle: panelTitleProp,\n 'aria-label': ariaLabel,\n className,\n ...rest\n },\n ref,\n ) {\n const { t } = useTranslation();\n const headingId = useId();\n\n // Per-context field visibility + ordering. The order is a per-INSTANCE\n // preference the kit never persists — the consumer wires its own\n // value/onChange, so the same field vocabulary can render differently in\n // different parts of the app (see usePatientFieldVisibility).\n const {\n visible,\n catalogueIds,\n setOrder,\n toggleField,\n toggleSection,\n moveFieldOnto,\n reset: resetToDefaults,\n } = usePatientFieldVisibility(sections, {\n value: visibleFieldOrder,\n defaultValue: defaultVisibleFieldOrder,\n onChange: onVisibleFieldsChange,\n });\n\n /* ---- imperative handle (agent) ------------------------------- */\n\n const handle = useMemo<PatientDetailsHandle>(\n () => ({\n getVisibleFieldOrder: () => visible,\n getPatientId: () => patientId,\n setVisibleFields: (fieldIds) => setOrder(fieldIds),\n setFieldOrder: (orderedIds) => setOrder(orderedIds),\n updateField: (fieldId, value) => {\n if (!onFieldSave) {\n return Promise.reject(\n new Error('PatientDetails: no onFieldSave handler is wired.'),\n );\n }\n return onFieldSave(fieldId, value);\n },\n }),\n [visible, patientId, setOrder, onFieldSave],\n );\n useAgentRegistration(patientDetailsAgent, handle, id);\n\n /* ---- region accessible name ---------------------------------- */\n\n const panelTitle =\n panelTitleProp ??\n t('patientDetails.regionLabel', {\n defaultValue: 'Patient details',\n });\n const resolvedAriaLabel = ariaLabel ?? panelTitle;\n\n /* ---- header avatar ------------------------------------------- */\n // Parity with the card: the panel fronts the name with an Avatar (photo via\n // `avatar.src`, else initials from the name). Omitted only when `title` is a\n // non-string node and no `avatar.name` is given (nothing to derive from).\n const avatarName =\n avatar?.name ?? (typeof title === 'string' ? title : undefined);\n const showAvatar = Boolean(avatar?.src || avatarName);\n\n /* ---- loading / empty ----------------------------------------- */\n\n const hasVisible = catalogueIds.some((cid) => visible.includes(cid));\n\n if (loading) {\n return (\n <section\n ref={ref}\n data-component=\"patient-details\"\n data-component-id={id}\n data-patient-id={patientId}\n aria-label={resolvedAriaLabel}\n aria-busy=\"true\"\n className={rootVariants({ className })}\n {...rest}\n >\n <div className={bodyVariants()}>\n <PatientDetailsSkeleton />\n </div>\n </section>\n );\n }\n\n const isEmpty = sections.length === 0 || !hasVisible;\n\n // The identity card (avatar + name + chips) is now the FIRST block of the\n // scrolling body — the shared PanelHeader owns the panel title row. The\n // name demotes to <h3> (the PanelHeader title is the <h2>).\n const identityBlock = (\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-sm)]\">\n {showAvatar ? (\n <Avatar\n size=\"md\"\n name={avatarName}\n src={avatar?.src}\n className=\"ds:shrink-0\"\n />\n ) : null}\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <h3 className=\"ds:m-0 type-title-item ds:text-[color:var(--foreground)]\">\n {title}\n </h3>\n {/* Chips sit under the NAME (not the avatar) — same column shape\n as the card's identity line. */}\n {headerChips ? (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]\">\n {headerChips}\n </div>\n ) : null}\n </div>\n </div>\n );\n\n return (\n <section\n ref={ref}\n data-component=\"patient-details\"\n data-component-id={id}\n data-patient-id={patientId}\n aria-labelledby={ariaLabel ? undefined : headingId}\n aria-label={ariaLabel ?? undefined}\n className={rootVariants({ className })}\n {...rest}\n >\n {/* The shared rail-panel header: panel title + the field-picker cog as\n its panel-owned action; the rail injects favourite/close after it.\n Sticky + divider so the title stays as the body scrolls. */}\n <PanelHeader\n title={panelTitle}\n icon={<ClipboardList aria-hidden=\"true\" />}\n headingId={headingId}\n sticky\n divider\n actions={\n <FieldVisibilityCog\n sections={sections}\n visible={visible}\n onToggleField={toggleField}\n onToggleSection={toggleSection}\n onMoveFieldOnto={moveFieldOnto}\n onReset={resetToDefaults}\n label={cogLabel}\n />\n }\n />\n\n <div className={bodyVariants()}>\n {/* Identity card — first block of the body; framed wraps it in its\n own elevated card alongside each section. */}\n {framed ? (\n <Card variant=\"elevated\">\n <Card.Body>{identityBlock}</Card.Body>\n </Card>\n ) : (\n identityBlock\n )}\n\n {/* Body — one card per section when framed, otherwise a flat stack. */}\n {isEmpty ? (\n <p className=\"ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {emptyState ??\n t('patientDetails.empty', {\n defaultValue: 'No patient selected.',\n })}\n </p>\n ) : (\n resolveVisibleFields(sections, visible)\n // A section whose fields are all hidden drops out entirely —\n // no empty card / \"No fields shown.\" placeholder. (The field\n // picker still lists it, so hidden fields can be re-added.)\n .filter(({ fields }) => fields.length > 0)\n .map(({ section, fields }) => {\n const block = (\n <SectionBlock\n section={section}\n fields={fields}\n editable={editable}\n onFieldSave={onFieldSave}\n validate={validate}\n locale={locale}\n />\n );\n return framed ? (\n <Card key={section.id} variant=\"elevated\">\n <Card.Body>{block}</Card.Body>\n </Card>\n ) : (\n <Fragment key={section.id}>{block}</Fragment>\n );\n })\n )}\n </div>\n </section>\n );\n },\n);\n\nPatientDetails.displayName = 'PatientDetails';\n\n/* -------------------------------------------------------------------- */\n/* SectionBlock — one collapsible group */\n/* -------------------------------------------------------------------- */\n\nfunction SectionBlock({\n section,\n fields,\n editable,\n onFieldSave,\n validate,\n locale,\n}: {\n section: PatientDetailsSection;\n fields: PatientDetailsField[];\n editable: boolean;\n onFieldSave?: (fieldId: string, value: unknown) => Promise<void>;\n validate?: (fieldId: string, value: unknown) => string | null;\n locale?: string;\n}): ReactNode {\n const { t } = useTranslation();\n const headingId = useId();\n const collapsible = section.collapsible ?? true;\n\n // The empty hint must be a SIBLING of the <dl>, never a child — a <p> is\n // not a valid direct child of <dl> (axe `definition-list`).\n const rows =\n fields.length === 0 ? (\n <p className=\"ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {t('patientDetails.section.empty', {\n defaultValue: 'No fields shown.',\n })}\n </p>\n ) : (\n <DescriptionList\n layout=\"inline\"\n density=\"compact\"\n divider=\"none\"\n // Label icons paint in the accent (the slot's recolour hook); no row rules.\n className=\"ds:[--description-list-icon-color:var(--accent)]\"\n >\n {fields.map((field) => (\n <PatientFieldRow\n key={field.id}\n field={field}\n // Surface the icon on the direct child: DescriptionList reserves its\n // icon column by inspecting direct children only, so the FieldRow\n // wrapper must carry it (not just the nested Row).\n icon={field.icon ?? null}\n editable={editable}\n onFieldSave={onFieldSave}\n validate={validate}\n locale={locale}\n />\n ))}\n </DescriptionList>\n );\n\n if (!collapsible) {\n return (\n <section\n aria-labelledby={headingId}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\"\n >\n <h3\n id={headingId}\n className=\"ds:m-0 type-eyebrow ds:text-[color:var(--foreground)]\"\n >\n {section.heading}\n </h3>\n {rows}\n </section>\n );\n }\n\n return (\n <Collapsible\n defaultOpen={section.defaultOpen ?? true}\n variant=\"minimal\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\"\n >\n {/* Real <h3> so collapsible sections appear in the heading outline\n (the non-collapsible branch is an <h3> too); the WAI-ARIA accordion\n pattern is a heading wrapping the disclosure button. */}\n <h3 className=\"ds:m-0\">\n <CollapsibleTrigger asChild>\n <button\n type=\"button\"\n id={headingId}\n className=\"ds:flex ds:w-full ds:items-center ds:justify-between ds:gap-[var(--spacing-xs)] ds:bg-transparent ds:border-0 ds:p-0 ds:text-start ds:cursor-pointer ds:rounded-[var(--radius-sm)] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText] type-eyebrow ds:text-[color:var(--foreground)]\"\n >\n {section.heading}\n </button>\n </CollapsibleTrigger>\n </h3>\n <CollapsibleContent aria-labelledby={headingId}>\n {rows}\n </CollapsibleContent>\n </Collapsible>\n );\n}\n\n/* -------------------------------------------------------------------- */\n/* Skeleton */\n/* -------------------------------------------------------------------- */\n\nfunction PatientDetailsSkeleton(): ReactNode {\n return (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <span className=\"ds:size-10 ds:shrink-0 ds:rounded-full ds:bg-[color:var(--muted)]\" />\n <span className=\"ds:h-4 ds:w-1/2 ds:rounded-[var(--radius-sm)] ds:bg-[color:var(--muted)]\" />\n </div>\n {[0, 1, 2].map((i) => (\n <span\n key={i}\n className=\"ds:h-4 ds:w-full ds:rounded-[var(--radius-sm)] ds:bg-[color:var(--muted)]\"\n />\n ))}\n </div>\n );\n}\n\n/** Density variant union re-exported for downstream typing. */\nexport type PatientDetailsDensity = NonNullable<\n VariantProps<typeof rootVariants>['density']\n>;\n"],"names":["patientDetailsAgent","handle","args","rootVariants","cva","bodyVariants","PatientDetails","forwardRef","title","sections","avatar","headerChips","framed","editable","onFieldSave","validate","visibleFieldOrder","defaultVisibleFieldOrder","onVisibleFieldsChange","loading","emptyState","patientId","id","locale","cogLabel","panelTitleProp","ariaLabel","className","rest","ref","t","useTranslation","headingId","useId","visible","catalogueIds","setOrder","toggleField","toggleSection","moveFieldOnto","resetToDefaults","usePatientFieldVisibility","useMemo","fieldIds","orderedIds","fieldId","value","useAgentRegistration","panelTitle","resolvedAriaLabel","avatarName","showAvatar","hasVisible","cid","jsx","PatientDetailsSkeleton","isEmpty","identityBlock","jsxs","Avatar","PanelHeader","ClipboardList","FieldVisibilityCog","Card","resolveVisibleFields","fields","section","block","SectionBlock","Fragment","collapsible","rows","DescriptionList","field","PatientFieldRow","Collapsible","CollapsibleTrigger","CollapsibleContent"],"mappings":";;;;;;;;;;;;AAoBO,MAAMA,KAA0D;AAAA,EACrE,IAAI;AAAA;AAAA;AAAA;AAAA,EAIJ,cAAc,CAAC,eAAe,WAAW;AAAA,EACzC,OAAO;AAAA,IACL,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,qBAAA;AAAA,IAAqB;AAAA,IAEhD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,aAAA;AAAA,IAAa;AAAA,EACxC;AAAA,EAEF,SAAS;AAAA,IACP,oBAAoB;AAAA,MAClB,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY;AAAA,UACV,UAAU,EAAE,MAAM,SAAS,OAAO,EAAE,MAAM,WAAS;AAAA,QAAE;AAAA,QAEvD,UAAU,CAAC,UAAU;AAAA,MAAA;AAAA,MAEvB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,UAAU;AAAA,QACR;AAAA,UACE,MAAM,EAAE,UAAU,CAAC,YAAY,aAAa,SAAS,OAAO,EAAA;AAAA,UAC5D,MAAM;AAAA,QAAA;AAAA,MACR;AAAA,MAEF,QAAQ,CAACA,GAAQC,MAAiC;AAChD,QAAAD,EAAO,iBAAiBC,EAAK,QAAQ;AAAA,MACvC;AAAA,IAAA;AAAA,IAEF,iBAAiB;AAAA,MACf,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY;AAAA,UACV,YAAY,EAAE,MAAM,SAAS,OAAO,E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;AAAA,MAAA;AAAA,MADL;AAAA,IAAA,CAGR;AAAA,EAAA,GACH;AAEJ;"}
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
2
  import { forwardRef as $e, useId as Ie, useMemo as De } from "react";
3
3
  import { c as Ge } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as Le } from "react-i18next";
5
- import { A as re } from "./avatar-CkDeQOSI.js";
5
+ import { A as re } from "./avatar-BVvjKNTp.js";
6
6
  import { B as D } from "./badge-BAkd6_Pj.js";
7
7
  import { I as Ue } from "./icon-button-CY7GU_Se.js";
8
8
  import { C as le } from "./card-DPmk26CL.js";
@@ -544,4 +544,4 @@ export {
544
544
  Ca as P,
545
545
  ma as p
546
546
  };
547
- //# sourceMappingURL=patient-summary-card-C36L3h7h.js.map
547
+ //# sourceMappingURL=patient-summary-card-DQ__6DR-.js.map