@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.
- package/dist/_chunks/{agenda-card-C4h0xMGi.js → agenda-card-CjjxlA9K.js} +2 -2
- package/dist/_chunks/{agenda-card-C4h0xMGi.js.map → agenda-card-CjjxlA9K.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-DNZYW2xt.js → agenda-tray-BhZASyJm.js} +2 -2
- package/dist/_chunks/{agenda-tray-DNZYW2xt.js.map → agenda-tray-BhZASyJm.js.map} +1 -1
- package/dist/_chunks/{alia-sidebar-Crn8OGPF.js → alia-sidebar-Dx-oeOV2.js} +3 -3
- package/dist/_chunks/{alia-sidebar-Crn8OGPF.js.map → alia-sidebar-Dx-oeOV2.js.map} +1 -1
- package/dist/_chunks/{appointment-card-CvGU0QP6.js → appointment-card-BgLpE6T5.js} +2 -2
- package/dist/_chunks/{appointment-card-CvGU0QP6.js.map → appointment-card-BgLpE6T5.js.map} +1 -1
- package/dist/_chunks/{appointment-peek--dmWznLZ.js → appointment-peek-BDiCIBb-.js} +2 -2
- package/dist/_chunks/{appointment-peek--dmWznLZ.js.map → appointment-peek-BDiCIBb-.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-y9uYZMUd.js → appointment-timeline-wQ-PdkFV.js} +2 -2
- package/dist/_chunks/{appointment-timeline-y9uYZMUd.js.map → appointment-timeline-wQ-PdkFV.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-BTecNeSb.js → appointment-tray-D7Gt6m8x.js} +2 -2
- package/dist/_chunks/{appointment-tray-BTecNeSb.js.map → appointment-tray-D7Gt6m8x.js.map} +1 -1
- package/dist/_chunks/{avatar-CkDeQOSI.js → avatar-BVvjKNTp.js} +2 -2
- package/dist/_chunks/avatar-BVvjKNTp.js.map +1 -0
- package/dist/_chunks/{balance-badge-cell-CA0YNJMR.js → balance-badge-cell-klaxFNL_.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-CA0YNJMR.js.map → balance-badge-cell-klaxFNL_.js.map} +1 -1
- package/dist/_chunks/{booking-BQYFDcrz.js → booking-BF9pVa2n.js} +377 -381
- package/dist/_chunks/booking-BF9pVa2n.js.map +1 -0
- package/dist/_chunks/{calendar-DjoJ9ovF.js → calendar-Bt44KMNO.js} +3 -2
- package/dist/_chunks/{calendar-DjoJ9ovF.js.map → calendar-Bt44KMNO.js.map} +1 -1
- package/dist/_chunks/calendar-workspace-C_eXL1by.js +10464 -0
- package/dist/_chunks/{calendar-workspace-D8zX9JWm.js.map → calendar-workspace-C_eXL1by.js.map} +1 -1
- package/dist/_chunks/{chat-message-Co_NRGM4.js → chat-message-B4ihjNy3.js} +2 -2
- package/dist/_chunks/{chat-message-Co_NRGM4.js.map → chat-message-B4ihjNy3.js.map} +1 -1
- package/dist/_chunks/{clinical-note-card-DYDQ3q2x.js → clinical-note-card-B7s5BtEl.js} +2 -2
- package/dist/_chunks/{clinical-note-card-DYDQ3q2x.js.map → clinical-note-card-B7s5BtEl.js.map} +1 -1
- package/dist/_chunks/{data-table-DWOSxlsy.js → data-table-CrI3_bjH.js} +411 -410
- package/dist/_chunks/data-table-CrI3_bjH.js.map +1 -0
- package/dist/_chunks/{dependent-selector-BR_8D2Qu.js → dependent-selector-58hTg5rB.js} +2 -2
- package/dist/_chunks/{dependent-selector-BR_8D2Qu.js.map → dependent-selector-58hTg5rB.js.map} +1 -1
- package/dist/_chunks/{entity-summary-Ckz_U00H.js → entity-summary-CFJfBdVP.js} +2 -2
- package/dist/_chunks/{entity-summary-Ckz_U00H.js.map → entity-summary-CFJfBdVP.js.map} +1 -1
- package/dist/_chunks/{file-manager-CqgxLqoA.js → file-manager-C6QQPQV5.js} +2 -2
- package/dist/_chunks/{file-manager-CqgxLqoA.js.map → file-manager-C6QQPQV5.js.map} +1 -1
- package/dist/_chunks/link-cell-renderer-CkNbUsBM.js +867 -0
- package/dist/_chunks/link-cell-renderer-CkNbUsBM.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-Dehuxbi-.js → marketplace-app-shell-1uKqs4gD.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-Dehuxbi-.js.map → marketplace-app-shell-1uKqs4gD.js.map} +1 -1
- package/dist/_chunks/{message-card-DKOtnBHy.js → message-card-C2zsvyj0.js} +2 -2
- package/dist/_chunks/{message-card-DKOtnBHy.js.map → message-card-C2zsvyj0.js.map} +1 -1
- package/dist/_chunks/{message-tray-COMEtmyr.js → message-tray-CMlmxdH2.js} +2 -2
- package/dist/_chunks/{message-tray-COMEtmyr.js.map → message-tray-CMlmxdH2.js.map} +1 -1
- package/dist/_chunks/{notes-panel-BiOxZL_0.js → notes-panel-xxpFt-I1.js} +2 -2
- package/dist/_chunks/{notes-panel-BiOxZL_0.js.map → notes-panel-xxpFt-I1.js.map} +1 -1
- package/dist/_chunks/{operator-hero-5061fkY5.js → operator-hero-DyrNLoRO.js} +2 -2
- package/dist/_chunks/{operator-hero-5061fkY5.js.map → operator-hero-DyrNLoRO.js.map} +1 -1
- package/dist/_chunks/{patient-details-C23Hdm8v.js → patient-details-tTlvrJSU.js} +2 -2
- package/dist/_chunks/{patient-details-C23Hdm8v.js.map → patient-details-tTlvrJSU.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-C36L3h7h.js → patient-summary-card-DQ__6DR-.js} +2 -2
- package/dist/_chunks/{patient-summary-card-C36L3h7h.js.map → patient-summary-card-DQ__6DR-.js.map} +1 -1
- package/dist/_chunks/{practice-profile-hero-CPy5h2yI.js → practice-profile-hero-B-WcJYNH.js} +2 -2
- package/dist/_chunks/{practice-profile-hero-CPy5h2yI.js.map → practice-profile-hero-B-WcJYNH.js.map} +1 -1
- package/dist/_chunks/{practice-results-t2BHht91.js → practice-results-EKRiqWtQ.js} +2 -2
- package/dist/_chunks/{practice-results-t2BHht91.js.map → practice-results-EKRiqWtQ.js.map} +1 -1
- package/dist/_chunks/{signature-request-15D363w5.js → signature-request-BUGeG8oD.js} +2 -2
- package/dist/_chunks/{signature-request-15D363w5.js.map → signature-request-BUGeG8oD.js.map} +1 -1
- package/dist/_chunks/{task-card-CTTQfPS6.js → task-card-jaOhnj_q.js} +31 -30
- package/dist/_chunks/task-card-jaOhnj_q.js.map +1 -0
- package/dist/_chunks/{task-tray-JA-qp_pB.js → task-tray-HHyxi9ga.js} +2 -2
- package/dist/_chunks/{task-tray-JA-qp_pB.js.map → task-tray-HHyxi9ga.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-C_dVDQKJ.js → tasks-panel-DbSjq_mz.js} +2 -2
- package/dist/_chunks/{tasks-panel-C_dVDQKJ.js.map → tasks-panel-DbSjq_mz.js.map} +1 -1
- package/dist/_chunks/{timeline-61AihzYz.js → timeline-ChY7iZrs.js} +2 -2
- package/dist/_chunks/{timeline-61AihzYz.js.map → timeline-ChY7iZrs.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-D2FH-cHF.js → use-appointment-details-read-5-hV-2xA.js} +4 -4
- package/dist/_chunks/{use-appointment-details-read-D2FH-cHF.js.map → use-appointment-details-read-5-hV-2xA.js.map} +1 -1
- package/dist/agent-catalog.json +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/cascade.d.ts +5 -0
- package/dist/components/booking/cascade.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/data-table/filters/number-filter.d.ts +26 -12
- package/dist/components/data-table/filters/number-filter.d.ts.map +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/data-table/toolbar.d.ts.map +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-card/task-card.d.ts +3 -2
- package/dist/components/task-card/task-card.d.ts.map +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +19 -14
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +19 -14
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +19 -14
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +19 -14
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +19 -14
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +19 -14
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +5 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +6 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +19 -14
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +19 -14
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +19 -14
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +19 -14
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +19 -14
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +19 -14
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +5 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +6 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +19 -14
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +19 -14
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +19 -14
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +19 -14
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +19 -14
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +19 -14
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +19 -14
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +19 -14
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +19 -14
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +19 -14
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +19 -14
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +19 -14
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +19 -14
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +19 -14
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +19 -14
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +19 -14
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +19 -14
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +19 -14
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +19 -14
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +19 -14
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +34 -34
- package/dist/locales/ar.json +19 -14
- package/dist/locales/de.json +19 -14
- package/dist/locales/el.json +19 -14
- package/dist/locales/en.json +5 -0
- package/dist/locales/es.json +19 -14
- package/dist/locales/fr.json +19 -14
- package/dist/locales/hi.json +19 -14
- package/dist/locales/it.json +5 -0
- package/dist/locales/ja.json +19 -14
- package/dist/locales/nl.json +19 -14
- package/dist/locales/pl.json +19 -14
- package/dist/locales/pt.json +19 -14
- package/dist/locales/ro.json +19 -14
- package/dist/locales/ru.json +19 -14
- package/dist/locales/sq.json +19 -14
- package/dist/locales/sv.json +19 -14
- package/dist/locales/tr.json +19 -14
- package/dist/locales/zh.json +19 -14
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/calendar/calendar-workspace.d.ts +10 -0
- package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.surface.d.ts +4 -1
- package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +12 -12
- package/dist/_chunks/avatar-CkDeQOSI.js.map +0 -1
- package/dist/_chunks/booking-BQYFDcrz.js.map +0 -1
- package/dist/_chunks/calendar-workspace-D8zX9JWm.js +0 -10423
- package/dist/_chunks/data-table-DWOSxlsy.js.map +0 -1
- package/dist/_chunks/link-cell-renderer-Tswqf6BT.js +0 -778
- package/dist/_chunks/link-cell-renderer-Tswqf6BT.js.map +0 -1
- package/dist/_chunks/task-card-CTTQfPS6.js.map +0 -1
package/dist/_chunks/{dependent-selector-BR_8D2Qu.js.map → dependent-selector-58hTg5rB.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependent-selector-BR_8D2Qu.js","sources":["../../src/components/dependent-selector/dependent-selector.agent.ts","../../src/components/dependent-selector/dependent-selector.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — DependentSelector. */\n/* */\n/* Mirrors radio-group.agent.ts: a single-select domain control. The */\n/* selected person id is the externally-observable state; `select_single` */\n/* is the capability. Per-row `data-option-id` lets an agent address each */\n/* person by their stable opaque id. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { DependentSelectorHandle } from './dependent-selector';\n\nexport const dependentSelectorAgent: AgentAdapter<DependentSelectorHandle> = {\n id: 'dependent-selector',\n capabilities: ['select_single'],\n state: {\n value: {\n type: 'string',\n descriptionKey: 'ui.agent.dependentSelector.state.value',\n description:\n 'Id of the currently selected person, or empty string when none.',\n read: (handle) => handle.getValue(),\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ value: string }',\n argsSchema: {\n type: 'object',\n properties: {\n value: {\n type: 'string',\n description: 'Stable opaque id of the person row to select.',\n },\n },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.dependentSelector.actions.setValue',\n description: 'Select the person row with the given id.',\n examples: [\n { args: { value: 'person-2' }, note: 'Select the second dependent.' },\n ],\n invoke: (handle, args: { value: string }) => {\n handle.setValue(args.value);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'dependent-selector',\n description: 'Marks the DependentSelector root (role=radiogroup).',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-option-id',\n description: 'Stable person id emitted on each rendered person row.',\n },\n },\n};\n","import {\n forwardRef,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from 'react';\nimport * as RadixRadioGroup from '@radix-ui/react-radio-group';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CircleAlert } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { Avatar } from '../avatar';\nimport { Badge } from '../badge';\nimport { Tooltip } from '../tooltip';\nimport { useDirection } from '../_shared/use-direction';\nimport { composeRefs } from '../_shared/compose-refs';\nimport { useAgentRegistration } from '../../agent';\nimport { dependentSelectorAgent } from './dependent-selector.agent';\n\n/* -------------------------------------------------------------------- */\n/* DependentSelector */\n/* */\n/* Single-select roster of people — the verified guardian (\"You\") plus */\n/* their registered dependents/minors — that a check-in kiosk uses to */\n/* answer \"Who are you checking in?\". Built on Radix RadioGroup semantics */\n/* (role=radiogroup, single tab stop, roving arrow-key focus, one */\n/* selected value), mirroring the proven src/components/radio-group/ */\n/* pattern. Each option is a person row (Avatar + name + relationship + */\n/* optional age/Minor badge) wrapped in a <label> so the whole card is */\n/* the click target. */\n/* */\n/* The kit owns the localised relationship + age strings via the closed */\n/* `relationshipKey` enum — consumers pass data, never free-text labels, */\n/* or i18n/RTL breaks. `age` is display-only (pre-computed whole years); */\n/* `isMinor` is an explicit per-person flag, NOT age<18 inference. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\n/**\n * Closed relationship vocabulary. The kit owns the localised label for\n * each key (`dependentSelector.relationship.<key>`). `'other'` is the\n * escape hatch for relationships the enum doesn't model.\n */\nexport type DependentRelationship =\n | 'self'\n | 'son'\n | 'daughter'\n | 'child'\n | 'spouse'\n | 'parent'\n | 'sibling'\n | 'ward'\n | 'other';\n\nexport interface DependentSelectorPerson {\n /** Stable id — becomes the radio value + `data-option-id`. */\n id: string;\n /** Display-formatted name (already formatted by the consumer). */\n name: string;\n /** Closed relationship key — the kit owns the localised label. */\n relationshipKey: DependentRelationship;\n /**\n * Explicit \"minor\" flag — drives the localised \"Minor\" badge.\n * Consumer-supplied, NOT derived from `age < 18` (legal age of\n * majority varies by market).\n */\n isMinor?: boolean;\n /** Avatar image source — falls back to initials, then icon. */\n avatarSrc?: string;\n /** Whole years, pre-computed by the consumer. Display-only. */\n age?: number;\n /**\n * ISO 8601 date of birth. Used ONLY for the row title/tooltip — never\n * parsed for display math (timezone/locale birthday math is the\n * consumer's job).\n */\n dob?: string;\n /** Disables this row; skipped by arrow navigation. */\n disabled?: boolean;\n /** Shown in a Tooltip on the disabled row (like Radio.disabledReason). */\n disabledReason?: string;\n}\n\n/** Agent-readiness curated handle for DependentSelector. */\nexport interface DependentSelectorHandle {\n getValue: () => string;\n setValue: (value: string) => void;\n}\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:min-w-0',\n {\n variants: {\n size: { sm: '', md: '', lg: '' },\n tone: { default: '', checkin: '' },\n },\n defaultVariants: { size: 'md', tone: 'checkin' },\n },\n);\n\nconst rowVariants = cva(\n [\n // The row IS the Radix Item (`<button role=\"radio\">`). Reset the\n // button chrome, lay out avatar + text on the inline axis. Logical\n // properties only.\n 'ds:group ds:flex ds:items-center ds:gap-[var(--spacing-md)] ds:w-full ds:text-start ds:appearance-none',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-card',\n // Touch-target floor: even sm clears AA/AAA (44 → 48px in accessible).\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n // Selected state: low-alpha accent tint BEHIND tokenised text +\n // a ring-coloured border (never accent as a foreground meeting text).\n 'ds:data-[state=checked]:border-ring',\n // Roving focus ring on the item itself — single tab stop, arrow keys\n // move focus+selection.\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n // Forced-colours: repaint a ButtonBorder edge + a Highlight checked\n // edge + a CanvasText focus ring so the row + its checked state\n // survive Windows High Contrast Mode.\n 'ds:forced-colors:border-[ButtonBorder]',\n 'ds:forced-colors:data-[state=checked]:border-[Highlight]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-md)] ds:py-[var(--spacing-xs)]',\n md: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:py-[var(--spacing-sm)]',\n lg: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-lg)] ds:py-[var(--spacing-md)]',\n },\n tone: {\n // Neutral RadioGroup-card tint for plain forms.\n default:\n 'ds:data-[state=checked]:bg-[color-mix(in_srgb,var(--accent)_5%,transparent)]',\n // Accent-tinted selected surface tuned for the check-in kiosk —\n // slightly stronger low-alpha mix BEHIND the tokenised foreground.\n checkin:\n 'ds:data-[state=checked]:bg-[color-mix(in_srgb,var(--accent)_8%,transparent)]',\n },\n disabled: {\n true: 'ds:cursor-not-allowed ds:opacity-50',\n false:\n 'ds:cursor-pointer ds:hover:bg-[color-mix(in_srgb,var(--accent)_4%,transparent)]',\n },\n },\n defaultVariants: { size: 'md', tone: 'checkin', disabled: false },\n },\n);\n\nconst avatarSizeBySize = { sm: 'sm', md: 'md', lg: 'lg' } as const;\n\n// Keep the loading skeleton's avatar footprint in lock-step with the real\n// Avatar scale (sm=size-8 / md=size-10 / lg=size-12) so the roster\n// resolving in doesn't shift the row height.\nconst skeletonAvatarSizeBySize = {\n sm: 'ds:size-8',\n md: 'ds:size-10',\n lg: 'ds:size-12',\n} as const;\n\nconst nameTypeBySize = {\n sm: 'type-body-sm',\n md: 'type-label',\n lg: 'type-body',\n} as const;\n\n/* -------------------------------------------------------------------- */\n/* Props */\n/* -------------------------------------------------------------------- */\n\ntype RadixRootProps = ComponentPropsWithoutRef<typeof RadixRadioGroup.Root>;\n\nexport interface DependentSelectorProps\n extends\n Omit<\n RadixRootProps,\n 'children' | 'orientation' | 'value' | 'defaultValue' | 'onValueChange'\n >,\n VariantProps<typeof rootVariants> {\n /** Ordered roster to render as options. */\n people: DependentSelectorPerson[];\n /** Controlled selected person id. */\n value?: string;\n /** Uncontrolled initial selection. Ignored when `value` is set. */\n defaultValue?: string;\n /** Fires with the newly selected person id on user selection. */\n onValueChange?: (personId: string) => void;\n /** Accessible group name, rendered as the `<legend>`. */\n label?: string;\n /** Optional helper paragraph under the legend (wired via aria-describedby). */\n description?: string;\n /** Shows N skeleton rows while the roster resolves; sets aria-busy. */\n loading?: boolean;\n /** Validation/empty-confirmation message — role=alert + aria-invalid. */\n error?: string;\n /** Slot shown when no selectable dependents exist (only self / empty). */\n emptyState?: ReactNode;\n /** Forwarded to the radiogroup root as id + data-component-id. */\n id?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const DependentSelector = forwardRef<\n HTMLDivElement,\n DependentSelectorProps\n>(\n (\n {\n people,\n value,\n defaultValue,\n onValueChange,\n label,\n description,\n size: sizeProp = 'md',\n tone: toneProp = 'checkin',\n loading = false,\n error,\n emptyState,\n id,\n className,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...props\n },\n ref,\n ) => {\n // CVA's VariantProps types each axis as `T | null | undefined`; the\n // destructure default only covers `undefined`, so coalesce `null`\n // too before the values index the size→class lookup maps.\n const size = sizeProp ?? 'md';\n const tone = toneProp ?? 'checkin';\n const { t } = useTranslation();\n const baseId = useId();\n const legendId = `${baseId}-legend`;\n const descriptionId = `${baseId}-description`;\n const errorId = `${baseId}-error`;\n\n /* ---- Dev-mode accessible-name enforcement ---- */\n const warnedRef = useRef(false);\n useEffect(() => {\n if (\n import.meta.env.DEV &&\n !warnedRef.current &&\n !label &&\n !ariaLabel &&\n !ariaLabelledBy\n ) {\n warnedRef.current = true;\n console.warn(\n '<DependentSelector> rendered without an accessible name. Pass `label`, or `aria-label` / `aria-labelledby`, so the radiogroup is never unnamed.',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n /* ---- Selectable roster + single-selectable auto-select ---- */\n const selectablePeople = useMemo(\n () => people.filter((person) => !person.disabled),\n [people],\n );\n // The dependents region (everything that isn't the verified self row)\n // drives the empty-state slot.\n const hasDependents = people.some(\n (person) => person.relationshipKey !== 'self',\n );\n const autoSelectId =\n selectablePeople.length === 1 ? selectablePeople[0].id : undefined;\n\n /* ---- Controlled / uncontrolled value handling (mirrors RadioGroup) ---- */\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState<string>(\n defaultValue ?? autoSelectId ?? '',\n );\n const currentValue = isControlled ? (value ?? '') : internalValue;\n const currentValueRef = useRef<string>(currentValue);\n currentValueRef.current = currentValue;\n\n const handleValueChange = (next: string) => {\n if (loading) return;\n if (!isControlled) setInternalValue(next);\n onValueChange?.(next);\n };\n\n /* ---- Auto-select change notification ---- */\n /* When exactly one selectable person exists we seed the uncontrolled */\n /* selection (Radix `defaultValue` + internal state) so the row */\n /* paints checked — but Radix never fires onValueChange for a */\n /* defaultValue. In the kiosk consent flow the consumer wires the */\n /* consent audit trail off onValueChange, so we fire it once on mount */\n /* for that auto-selection. Only when uncontrolled, not loading, and */\n /* the consumer didn't pass an explicit defaultValue. */\n const onValueChangeRef = useRef(onValueChange);\n onValueChangeRef.current = onValueChange;\n const autoSelectNotifiedRef = useRef(false);\n useEffect(() => {\n if (\n !autoSelectNotifiedRef.current &&\n !isControlled &&\n !loading &&\n defaultValue === undefined &&\n autoSelectId !== undefined\n ) {\n autoSelectNotifiedRef.current = true;\n onValueChangeRef.current?.(autoSelectId);\n }\n }, [isControlled, loading, defaultValue, autoSelectId]);\n\n /* ---- Agent registration ---- */\n const agentHandle = useMemo<DependentSelectorHandle>(\n () => ({\n getValue: () => currentValueRef.current,\n setValue: (next) => handleValueChange(next),\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isControlled, loading, onValueChange],\n );\n useAgentRegistration(dependentSelectorAgent, agentHandle, id);\n\n /* ---- Direction (Radix auto-flips Left/Right for rtl) ---- */\n const rootRef = useRef<HTMLDivElement>(null);\n const composedRef = composeRefs(ref, rootRef);\n const dir = useDirection(rootRef);\n\n /* ---- Resolved a11y wiring ---- */\n /* ONE grouping mechanism: when `label` is set we render a plain */\n /* heading <div id={legendId}> (NOT a native <fieldset>/<legend>) and */\n /* name the single role=radiogroup via aria-labelledby. A fieldset */\n /* would add a second, redundant named group nested around the */\n /* radiogroup — so we deliberately avoid it. */\n const resolvedAriaLabelledBy =\n ariaLabelledBy ?? (label ? legendId : undefined);\n const describedBy =\n [description ? descriptionId : null, error ? errorId : null]\n .filter(Boolean)\n .join(' ') || undefined;\n\n /* ---- Helpers ---- */\n const relationshipLabel = (key: DependentRelationship): string =>\n t(`dependentSelector.relationship.${key}`);\n\n const ageLabel = (age: number): string =>\n t('dependentSelector.age', { count: age });\n\n /** Compose the full accessible name a screen reader announces. */\n const personAccessibleName = (person: DependentSelectorPerson): string => {\n const base = t('dependentSelector.optionLabel', {\n name: person.name,\n relationship: relationshipLabel(person.relationshipKey),\n });\n const parts = [base];\n if (typeof person.age === 'number') parts.push(ageLabel(person.age));\n if (person.isMinor) parts.push(t('dependentSelector.minorBadge'));\n return parts.join(', ');\n };\n\n /* ---- Description + error nodes ---- */\n const descriptionNode = description ? (\n <p id={descriptionId} className=\"type-body-sm ds:text-muted-foreground\">\n {description}\n </p>\n ) : null;\n\n const errorNode = error ? (\n <p\n id={errorId}\n role=\"alert\"\n className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-body-sm ds:text-destructive\"\n >\n <CircleAlert aria-hidden=\"true\" className=\"ds:size-4 ds:shrink-0\" />\n <span>{error}</span>\n </p>\n ) : null;\n\n /* ---- Skeleton rows (loading) ---- */\n const skeletonRows = (\n <div\n aria-hidden=\"true\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n >\n {Array.from({ length: 3 }).map((_, index) => (\n <div\n key={index}\n className={rowVariants({ size, tone, disabled: false })}\n >\n <span\n className={`ds:inline-flex ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-muted ds:animate-pulse ${skeletonAvatarSizeBySize[size]}`}\n />\n <span className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:min-w-0 ds:flex-1\">\n <span className=\"ds:h-4 ds:w-1/2 ds:rounded-[var(--radius-sm)] ds:bg-muted ds:animate-pulse\" />\n <span className=\"ds:h-3 ds:w-1/3 ds:rounded-[var(--radius-sm)] ds:bg-muted ds:animate-pulse\" />\n </span>\n </div>\n ))}\n </div>\n );\n\n /* ---- Person row ---- */\n /* The Radix Item IS the card: it renders the `<button role=\"radio\">` */\n /* that owns the roving tabindex + arrow navigation, so the whole row */\n /* is the focus + click target. The composed name lives on */\n /* `aria-label`; the visible content is aria-hidden so a screen reader */\n /* hears the clean composed name once (no duplication). */\n const renderPerson = (person: DependentSelectorPerson) => {\n const rowId = `${baseId}-row-${person.id}`;\n const accessibleName = personAccessibleName(person);\n\n const row = (\n <RadixRadioGroup.Item\n key={person.id}\n id={rowId}\n value={person.id}\n // Native `disabled` is the single disabled model: Radix renders\n // a <button disabled> that is skipped by roving arrow nav and is\n // non-selectable. `aria-disabled` is intentionally NOT also set —\n // on a natively-disabled button it is redundant (it is meant for\n // elements that REMAIN focusable). The disabledReason tooltip is\n // reached via a focusable wrapper span below, not this button.\n disabled={person.disabled}\n aria-label={accessibleName}\n title={person.dob ?? undefined}\n data-option-id={person.id}\n className={rowVariants({\n size,\n tone,\n disabled: Boolean(person.disabled),\n })}\n >\n {/* The Avatar is intentionally aria-hidden: its name only feeds\n initials/colour, and the radio's own aria-label is the sole\n accessible name. Keep aria-hidden so a future refactor doesn't\n reintroduce a duplicate \"image, <name>\" announcement (the kit\n Avatar always renders role=\"img\" + aria-label={name}). */}\n <Avatar\n src={person.avatarSrc}\n name={person.name}\n size={avatarSizeBySize[size]}\n aria-hidden=\"true\"\n />\n <span\n aria-hidden=\"true\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:min-w-0 ds:flex-1\"\n >\n <span className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:min-w-0\">\n <span\n className={`${nameTypeBySize[size]} ds:text-foreground ds:truncate ds:min-w-0`}\n >\n {person.name}\n </span>\n {person.isMinor ? (\n // Neutral chip (validated AA ~6:1) — the \"Minor\" flag is\n // informational, not a warning STATE. The tonal `warning`\n // variant fails AA at the small chip font size.\n <Badge variant=\"neutral\" size=\"sm\">\n {t('dependentSelector.minorBadge')}\n </Badge>\n ) : null}\n </span>\n <span className=\"type-body-sm ds:text-muted-foreground ds:truncate ds:min-w-0\">\n {relationshipLabel(person.relationshipKey)}\n {typeof person.age === 'number'\n ? ` · ${ageLabel(person.age)}`\n : null}\n </span>\n </span>\n </RadixRadioGroup.Item>\n );\n\n if (person.disabled && person.disabledReason) {\n // The Radix Item renders a <button disabled>, which is removed\n // from the tab order and does not fire hover/pointer events — so a\n // Tooltip wrapped directly around it would never open. Wrap the row\n // in a focusable, hoverable <span tabIndex={0}> and make THAT the\n // tooltip trigger, so the disabledReason is reachable by both mouse\n // hover and keyboard focus (mirrors radio.tsx putting the Tooltip\n // on the non-disabled wrapper, not the disabled control).\n return (\n <Tooltip key={person.id} label={person.disabledReason}>\n <span\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- intentional focusable tooltip trigger so keyboard users can reach the disabled reason\n tabIndex={0}\n data-disabled-row={person.id}\n aria-label={accessibleName}\n className=\"ds:flex ds:min-w-0 ds:rounded-[var(--radius-md)] 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)]\"\n >\n {row}\n </span>\n </Tooltip>\n );\n }\n return row;\n };\n\n /* ---- Empty-state slot ---- */\n const resolvedEmptyState = emptyState ?? (\n <p className=\"type-body-sm ds:text-muted-foreground\">\n {t('dependentSelector.empty')}\n </p>\n );\n\n /* ---- Radiogroup body ---- */\n /* While loading we still render a role=radiogroup container (carrying */\n /* the data-component marker + aria-busy) holding aria-hidden skeleton */\n /* rows — selection is inert. Otherwise the Radix root renders the */\n /* real person rows. */\n const body = loading ? (\n <div\n ref={composedRef}\n id={id}\n role=\"radiogroup\"\n aria-label={!resolvedAriaLabelledBy ? ariaLabel : undefined}\n aria-labelledby={resolvedAriaLabelledBy}\n aria-describedby={describedBy}\n aria-invalid={Boolean(error) || undefined}\n aria-busy=\"true\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:min-w-0\"\n data-component=\"dependent-selector\"\n data-component-id={id}\n >\n <span className=\"ds:sr-only\">\n {t('dependentSelector.loadingLabel')}\n </span>\n {skeletonRows}\n </div>\n ) : (\n <RadixRadioGroup.Root\n ref={composedRef}\n id={id}\n dir={dir}\n value={isControlled ? (value ?? '') : undefined}\n defaultValue={\n !isControlled ? (defaultValue ?? autoSelectId) : undefined\n }\n onValueChange={handleValueChange}\n aria-label={!resolvedAriaLabelledBy ? ariaLabel : undefined}\n aria-labelledby={resolvedAriaLabelledBy}\n aria-describedby={describedBy}\n aria-invalid={Boolean(error) || undefined}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:min-w-0\"\n data-component=\"dependent-selector\"\n data-component-id={id}\n {...props}\n >\n {people.map(renderPerson)}\n </RadixRadioGroup.Root>\n );\n\n /* ---- Outer wrapper ---- */\n /* When `label` is set we render a plain heading <div id={legendId}> */\n /* styled like a legend, and the single role=radiogroup is named via */\n /* aria-labelledby={legendId}. We do NOT wrap in <fieldset>/<legend>: */\n /* that would create a second named grouping container nested around */\n /* the radiogroup (the legend announced twice). One grouping */\n /* mechanism only. */\n const outerClasses = rootVariants({ size, tone, className });\n\n return (\n <div className={outerClasses}>\n {label ? (\n <div id={legendId} className=\"type-label ds:text-foreground\">\n {label}\n </div>\n ) : null}\n {descriptionNode}\n {body}\n {!loading && !hasDependents ? resolvedEmptyState : null}\n {errorNode}\n </div>\n );\n },\n);\n\nDependentSelector.displayName = 'DependentSelector';\n"],"names":["dependentSelectorAgent","handle","args","rootVariants","cva","rowVariants","avatarSizeBySize","skeletonAvatarSizeBySize","nameTypeBySize","DependentSelector","forwardRef","people","value","defaultValue","onValueChange","label","description","sizeProp","toneProp","loading","error","emptyState","id","className","ariaLabel","ariaLabelledBy","props","ref","size","tone","t","useTranslation","baseId","useId","legendId","descriptionId","errorId","useRef","useEffect","selectablePeople","useMemo","person","hasDependents","autoSelectId","isControlled","internalValue","setInternalValue","useState","currentValue","currentValueRef","handleValueChange","next","onValueChangeRef","autoSelectNotifiedRef","_a","agentHandle","useAgentRegistration","rootRef","composedRef","composeRefs","dir","useDirection","resolvedAriaLabelledBy","describedBy","relationshipLabel","key","ageLabel","age","personAccessibleName","parts","descriptionNode","jsx","errorNode","jsxs","CircleAlert","skeletonRows","_","index","renderPerson","rowId","accessibleName","row","RadixRadioGroup","Avatar","Badge","Tooltip","resolvedEmptyState","body","outerClasses"],"mappings":";;;;;;;;;;;;AAcO,MAAMA,KAAgE;AAAA,EAC3E,IAAI;AAAA,EACJ,cAAc,CAAC,eAAe;AAAA,EAC9B,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,EACpC;AAAA,EAEF,SAAS;AAAA,IACP,WAAW;AAAA,MACT,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY;AAAA,UACV,OAAO;AAAA,YACL,MAAM;A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gC,GACrC;AAAA,UACC6C;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,IAGH,gBAAAJ;AAAA,MAACW,EAAgB;AAAA,MAAhB;AAAA,QACC,KAAKxB;AAAA,QACL,IAAApC;AAAA,QACA,KAAAsC;AAAA,QACA,OAAOhB,IAAgBhC,KAAS,KAAM;AAAA,QACtC,cACGgC,IAAgD,SAAhC/B,KAAgB8B;AAAA,QAEnC,eAAeO;AAAA,QACf,cAAaY,IAAqC,SAAZtC;AAAA,QACtC,mBAAiBsC;AAAA,QACjB,oBAAkBC;AAAA,QAClB,gBAAc,EAAQ3C,KAAU;AAAA,QAChC,WAAU;AAAA,QACV,kBAAe;AAAA,QACf,qBAAmBE;AAAA,QAClB,GAAGI;AAAA,QAEH,UAAAf,EAAO,IAAImE,EAAY;AAAA,MAAA;AAAA,IAAA,GAWtBU,KAAerF,GAAa,EAAE,MAAAyB,GAAM,MAAAC,GAAM,WAAAN,GAAW;AAE3D,WACE,gBAAAkD,EAAC,OAAA,EAAI,WAAWe,IACb,UAAA;AAAA,MAAAzE,sBACE,OAAA,EAAI,IAAImB,GAAU,WAAU,iCAC1B,aACH,IACE;AAAA,MACHoC;AAAA,MACAiB;AAAA,MACA,CAACpE,KAAW,CAACuB,IAAgB4C,KAAqB;AAAA,MAClDd;AAAA,IAAA,GACH;AAAA,EAEJ;AACF;AAEA/D,GAAkB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"dependent-selector-58hTg5rB.js","sources":["../../src/components/dependent-selector/dependent-selector.agent.ts","../../src/components/dependent-selector/dependent-selector.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — DependentSelector. */\n/* */\n/* Mirrors radio-group.agent.ts: a single-select domain control. The */\n/* selected person id is the externally-observable state; `select_single` */\n/* is the capability. Per-row `data-option-id` lets an agent address each */\n/* person by their stable opaque id. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { DependentSelectorHandle } from './dependent-selector';\n\nexport const dependentSelectorAgent: AgentAdapter<DependentSelectorHandle> = {\n id: 'dependent-selector',\n capabilities: ['select_single'],\n state: {\n value: {\n type: 'string',\n descriptionKey: 'ui.agent.dependentSelector.state.value',\n description:\n 'Id of the currently selected person, or empty string when none.',\n read: (handle) => handle.getValue(),\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ value: string }',\n argsSchema: {\n type: 'object',\n properties: {\n value: {\n type: 'string',\n description: 'Stable opaque id of the person row to select.',\n },\n },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.dependentSelector.actions.setValue',\n description: 'Select the person row with the given id.',\n examples: [\n { args: { value: 'person-2' }, note: 'Select the second dependent.' },\n ],\n invoke: (handle, args: { value: string }) => {\n handle.setValue(args.value);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'dependent-selector',\n description: 'Marks the DependentSelector root (role=radiogroup).',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-option-id',\n description: 'Stable person id emitted on each rendered person row.',\n },\n },\n};\n","import {\n forwardRef,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from 'react';\nimport * as RadixRadioGroup from '@radix-ui/react-radio-group';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CircleAlert } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { Avatar } from '../avatar';\nimport { Badge } from '../badge';\nimport { Tooltip } from '../tooltip';\nimport { useDirection } from '../_shared/use-direction';\nimport { composeRefs } from '../_shared/compose-refs';\nimport { useAgentRegistration } from '../../agent';\nimport { dependentSelectorAgent } from './dependent-selector.agent';\n\n/* -------------------------------------------------------------------- */\n/* DependentSelector */\n/* */\n/* Single-select roster of people — the verified guardian (\"You\") plus */\n/* their registered dependents/minors — that a check-in kiosk uses to */\n/* answer \"Who are you checking in?\". Built on Radix RadioGroup semantics */\n/* (role=radiogroup, single tab stop, roving arrow-key focus, one */\n/* selected value), mirroring the proven src/components/radio-group/ */\n/* pattern. Each option is a person row (Avatar + name + relationship + */\n/* optional age/Minor badge) wrapped in a <label> so the whole card is */\n/* the click target. */\n/* */\n/* The kit owns the localised relationship + age strings via the closed */\n/* `relationshipKey` enum — consumers pass data, never free-text labels, */\n/* or i18n/RTL breaks. `age` is display-only (pre-computed whole years); */\n/* `isMinor` is an explicit per-person flag, NOT age<18 inference. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\n/**\n * Closed relationship vocabulary. The kit owns the localised label for\n * each key (`dependentSelector.relationship.<key>`). `'other'` is the\n * escape hatch for relationships the enum doesn't model.\n */\nexport type DependentRelationship =\n | 'self'\n | 'son'\n | 'daughter'\n | 'child'\n | 'spouse'\n | 'parent'\n | 'sibling'\n | 'ward'\n | 'other';\n\nexport interface DependentSelectorPerson {\n /** Stable id — becomes the radio value + `data-option-id`. */\n id: string;\n /** Display-formatted name (already formatted by the consumer). */\n name: string;\n /** Closed relationship key — the kit owns the localised label. */\n relationshipKey: DependentRelationship;\n /**\n * Explicit \"minor\" flag — drives the localised \"Minor\" badge.\n * Consumer-supplied, NOT derived from `age < 18` (legal age of\n * majority varies by market).\n */\n isMinor?: boolean;\n /** Avatar image source — falls back to initials, then icon. */\n avatarSrc?: string;\n /** Whole years, pre-computed by the consumer. Display-only. */\n age?: number;\n /**\n * ISO 8601 date of birth. Used ONLY for the row title/tooltip — never\n * parsed for display math (timezone/locale birthday math is the\n * consumer's job).\n */\n dob?: string;\n /** Disables this row; skipped by arrow navigation. */\n disabled?: boolean;\n /** Shown in a Tooltip on the disabled row (like Radio.disabledReason). */\n disabledReason?: string;\n}\n\n/** Agent-readiness curated handle for DependentSelector. */\nexport interface DependentSelectorHandle {\n getValue: () => string;\n setValue: (value: string) => void;\n}\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:min-w-0',\n {\n variants: {\n size: { sm: '', md: '', lg: '' },\n tone: { default: '', checkin: '' },\n },\n defaultVariants: { size: 'md', tone: 'checkin' },\n },\n);\n\nconst rowVariants = cva(\n [\n // The row IS the Radix Item (`<button role=\"radio\">`). Reset the\n // button chrome, lay out avatar + text on the inline axis. Logical\n // properties only.\n 'ds:group ds:flex ds:items-center ds:gap-[var(--spacing-md)] ds:w-full ds:text-start ds:appearance-none',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-card',\n // Touch-target floor: even sm clears AA/AAA (44 → 48px in accessible).\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n // Selected state: low-alpha accent tint BEHIND tokenised text +\n // a ring-coloured border (never accent as a foreground meeting text).\n 'ds:data-[state=checked]:border-ring',\n // Roving focus ring on the item itself — single tab stop, arrow keys\n // move focus+selection.\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n // Forced-colours: repaint a ButtonBorder edge + a Highlight checked\n // edge + a CanvasText focus ring so the row + its checked state\n // survive Windows High Contrast Mode.\n 'ds:forced-colors:border-[ButtonBorder]',\n 'ds:forced-colors:data-[state=checked]:border-[Highlight]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-md)] ds:py-[var(--spacing-xs)]',\n md: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:py-[var(--spacing-sm)]',\n lg: 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-lg)] ds:py-[var(--spacing-md)]',\n },\n tone: {\n // Neutral RadioGroup-card tint for plain forms.\n default:\n 'ds:data-[state=checked]:bg-[color-mix(in_srgb,var(--accent)_5%,transparent)]',\n // Accent-tinted selected surface tuned for the check-in kiosk —\n // slightly stronger low-alpha mix BEHIND the tokenised foreground.\n checkin:\n 'ds:data-[state=checked]:bg-[color-mix(in_srgb,var(--accent)_8%,transparent)]',\n },\n disabled: {\n true: 'ds:cursor-not-allowed ds:opacity-50',\n false:\n 'ds:cursor-pointer ds:hover:bg-[color-mix(in_srgb,var(--accent)_4%,transparent)]',\n },\n },\n defaultVariants: { size: 'md', tone: 'checkin', disabled: false },\n },\n);\n\nconst avatarSizeBySize = { sm: 'sm', md: 'md', lg: 'lg' } as const;\n\n// Keep the loading skeleton's avatar footprint in lock-step with the real\n// Avatar scale (sm=size-8 / md=size-10 / lg=size-12) so the roster\n// resolving in doesn't shift the row height.\nconst skeletonAvatarSizeBySize = {\n sm: 'ds:size-8',\n md: 'ds:size-10',\n lg: 'ds:size-12',\n} as const;\n\nconst nameTypeBySize = {\n sm: 'type-body-sm',\n md: 'type-label',\n lg: 'type-body',\n} as const;\n\n/* -------------------------------------------------------------------- */\n/* Props */\n/* -------------------------------------------------------------------- */\n\ntype RadixRootProps = ComponentPropsWithoutRef<typeof RadixRadioGroup.Root>;\n\nexport interface DependentSelectorProps\n extends\n Omit<\n RadixRootProps,\n 'children' | 'orientation' | 'value' | 'defaultValue' | 'onValueChange'\n >,\n VariantProps<typeof rootVariants> {\n /** Ordered roster to render as options. */\n people: DependentSelectorPerson[];\n /** Controlled selected person id. */\n value?: string;\n /** Uncontrolled initial selection. Ignored when `value` is set. */\n defaultValue?: string;\n /** Fires with the newly selected person id on user selection. */\n onValueChange?: (personId: string) => void;\n /** Accessible group name, rendered as the `<legend>`. */\n label?: string;\n /** Optional helper paragraph under the legend (wired via aria-describedby). */\n description?: string;\n /** Shows N skeleton rows while the roster resolves; sets aria-busy. */\n loading?: boolean;\n /** Validation/empty-confirmation message — role=alert + aria-invalid. */\n error?: string;\n /** Slot shown when no selectable dependents exist (only self / empty). */\n emptyState?: ReactNode;\n /** Forwarded to the radiogroup root as id + data-component-id. */\n id?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const DependentSelector = forwardRef<\n HTMLDivElement,\n DependentSelectorProps\n>(\n (\n {\n people,\n value,\n defaultValue,\n onValueChange,\n label,\n description,\n size: sizeProp = 'md',\n tone: toneProp = 'checkin',\n loading = false,\n error,\n emptyState,\n id,\n className,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n ...props\n },\n ref,\n ) => {\n // CVA's VariantProps types each axis as `T | null | undefined`; the\n // destructure default only covers `undefined`, so coalesce `null`\n // too before the values index the size→class lookup maps.\n const size = sizeProp ?? 'md';\n const tone = toneProp ?? 'checkin';\n const { t } = useTranslation();\n const baseId = useId();\n const legendId = `${baseId}-legend`;\n const descriptionId = `${baseId}-description`;\n const errorId = `${baseId}-error`;\n\n /* ---- Dev-mode accessible-name enforcement ---- */\n const warnedRef = useRef(false);\n useEffect(() => {\n if (\n import.meta.env.DEV &&\n !warnedRef.current &&\n !label &&\n !ariaLabel &&\n !ariaLabelledBy\n ) {\n warnedRef.current = true;\n console.warn(\n '<DependentSelector> rendered without an accessible name. Pass `label`, or `aria-label` / `aria-labelledby`, so the radiogroup is never unnamed.',\n );\n }\n }, [label, ariaLabel, ariaLabelledBy]);\n\n /* ---- Selectable roster + single-selectable auto-select ---- */\n const selectablePeople = useMemo(\n () => people.filter((person) => !person.disabled),\n [people],\n );\n // The dependents region (everything that isn't the verified self row)\n // drives the empty-state slot.\n const hasDependents = people.some(\n (person) => person.relationshipKey !== 'self',\n );\n const autoSelectId =\n selectablePeople.length === 1 ? selectablePeople[0].id : undefined;\n\n /* ---- Controlled / uncontrolled value handling (mirrors RadioGroup) ---- */\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState<string>(\n defaultValue ?? autoSelectId ?? '',\n );\n const currentValue = isControlled ? (value ?? '') : internalValue;\n const currentValueRef = useRef<string>(currentValue);\n currentValueRef.current = currentValue;\n\n const handleValueChange = (next: string) => {\n if (loading) return;\n if (!isControlled) setInternalValue(next);\n onValueChange?.(next);\n };\n\n /* ---- Auto-select change notification ---- */\n /* When exactly one selectable person exists we seed the uncontrolled */\n /* selection (Radix `defaultValue` + internal state) so the row */\n /* paints checked — but Radix never fires onValueChange for a */\n /* defaultValue. In the kiosk consent flow the consumer wires the */\n /* consent audit trail off onValueChange, so we fire it once on mount */\n /* for that auto-selection. Only when uncontrolled, not loading, and */\n /* the consumer didn't pass an explicit defaultValue. */\n const onValueChangeRef = useRef(onValueChange);\n onValueChangeRef.current = onValueChange;\n const autoSelectNotifiedRef = useRef(false);\n useEffect(() => {\n if (\n !autoSelectNotifiedRef.current &&\n !isControlled &&\n !loading &&\n defaultValue === undefined &&\n autoSelectId !== undefined\n ) {\n autoSelectNotifiedRef.current = true;\n onValueChangeRef.current?.(autoSelectId);\n }\n }, [isControlled, loading, defaultValue, autoSelectId]);\n\n /* ---- Agent registration ---- */\n const agentHandle = useMemo<DependentSelectorHandle>(\n () => ({\n getValue: () => currentValueRef.current,\n setValue: (next) => handleValueChange(next),\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isControlled, loading, onValueChange],\n );\n useAgentRegistration(dependentSelectorAgent, agentHandle, id);\n\n /* ---- Direction (Radix auto-flips Left/Right for rtl) ---- */\n const rootRef = useRef<HTMLDivElement>(null);\n const composedRef = composeRefs(ref, rootRef);\n const dir = useDirection(rootRef);\n\n /* ---- Resolved a11y wiring ---- */\n /* ONE grouping mechanism: when `label` is set we render a plain */\n /* heading <div id={legendId}> (NOT a native <fieldset>/<legend>) and */\n /* name the single role=radiogroup via aria-labelledby. A fieldset */\n /* would add a second, redundant named group nested around the */\n /* radiogroup — so we deliberately avoid it. */\n const resolvedAriaLabelledBy =\n ariaLabelledBy ?? (label ? legendId : undefined);\n const describedBy =\n [description ? descriptionId : null, error ? errorId : null]\n .filter(Boolean)\n .join(' ') || undefined;\n\n /* ---- Helpers ---- */\n const relationshipLabel = (key: DependentRelationship): string =>\n t(`dependentSelector.relationship.${key}`);\n\n const ageLabel = (age: number): string =>\n t('dependentSelector.age', { count: age });\n\n /** Compose the full accessible name a screen reader announces. */\n const personAccessibleName = (person: DependentSelectorPerson): string => {\n const base = t('dependentSelector.optionLabel', {\n name: person.name,\n relationship: relationshipLabel(person.relationshipKey),\n });\n const parts = [base];\n if (typeof person.age === 'number') parts.push(ageLabel(person.age));\n if (person.isMinor) parts.push(t('dependentSelector.minorBadge'));\n return parts.join(', ');\n };\n\n /* ---- Description + error nodes ---- */\n const descriptionNode = description ? (\n <p id={descriptionId} className=\"type-body-sm ds:text-muted-foreground\">\n {description}\n </p>\n ) : null;\n\n const errorNode = error ? (\n <p\n id={errorId}\n role=\"alert\"\n className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-body-sm ds:text-destructive\"\n >\n <CircleAlert aria-hidden=\"true\" className=\"ds:size-4 ds:shrink-0\" />\n <span>{error}</span>\n </p>\n ) : null;\n\n /* ---- Skeleton rows (loading) ---- */\n const skeletonRows = (\n <div\n aria-hidden=\"true\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n >\n {Array.from({ length: 3 }).map((_, index) => (\n <div\n key={index}\n className={rowVariants({ size, tone, disabled: false })}\n >\n <span\n className={`ds:inline-flex ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-muted ds:animate-pulse ${skeletonAvatarSizeBySize[size]}`}\n />\n <span className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:min-w-0 ds:flex-1\">\n <span className=\"ds:h-4 ds:w-1/2 ds:rounded-[var(--radius-sm)] ds:bg-muted ds:animate-pulse\" />\n <span className=\"ds:h-3 ds:w-1/3 ds:rounded-[var(--radius-sm)] ds:bg-muted ds:animate-pulse\" />\n </span>\n </div>\n ))}\n </div>\n );\n\n /* ---- Person row ---- */\n /* The Radix Item IS the card: it renders the `<button role=\"radio\">` */\n /* that owns the roving tabindex + arrow navigation, so the whole row */\n /* is the focus + click target. The composed name lives on */\n /* `aria-label`; the visible content is aria-hidden so a screen reader */\n /* hears the clean composed name once (no duplication). */\n const renderPerson = (person: DependentSelectorPerson) => {\n const rowId = `${baseId}-row-${person.id}`;\n const accessibleName = personAccessibleName(person);\n\n const row = (\n <RadixRadioGroup.Item\n key={person.id}\n id={rowId}\n value={person.id}\n // Native `disabled` is the single disabled model: Radix renders\n // a <button disabled> that is skipped by roving arrow nav and is\n // non-selectable. `aria-disabled` is intentionally NOT also set —\n // on a natively-disabled button it is redundant (it is meant for\n // elements that REMAIN focusable). The disabledReason tooltip is\n // reached via a focusable wrapper span below, not this button.\n disabled={person.disabled}\n aria-label={accessibleName}\n title={person.dob ?? undefined}\n data-option-id={person.id}\n className={rowVariants({\n size,\n tone,\n disabled: Boolean(person.disabled),\n })}\n >\n {/* The Avatar is intentionally aria-hidden: its name only feeds\n initials/colour, and the radio's own aria-label is the sole\n accessible name. Keep aria-hidden so a future refactor doesn't\n reintroduce a duplicate \"image, <name>\" announcement (the kit\n Avatar always renders role=\"img\" + aria-label={name}). */}\n <Avatar\n src={person.avatarSrc}\n name={person.name}\n size={avatarSizeBySize[size]}\n aria-hidden=\"true\"\n />\n <span\n aria-hidden=\"true\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:min-w-0 ds:flex-1\"\n >\n <span className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:min-w-0\">\n <span\n className={`${nameTypeBySize[size]} ds:text-foreground ds:truncate ds:min-w-0`}\n >\n {person.name}\n </span>\n {person.isMinor ? (\n // Neutral chip (validated AA ~6:1) — the \"Minor\" flag is\n // informational, not a warning STATE. The tonal `warning`\n // variant fails AA at the small chip font size.\n <Badge variant=\"neutral\" size=\"sm\">\n {t('dependentSelector.minorBadge')}\n </Badge>\n ) : null}\n </span>\n <span className=\"type-body-sm ds:text-muted-foreground ds:truncate ds:min-w-0\">\n {relationshipLabel(person.relationshipKey)}\n {typeof person.age === 'number'\n ? ` · ${ageLabel(person.age)}`\n : null}\n </span>\n </span>\n </RadixRadioGroup.Item>\n );\n\n if (person.disabled && person.disabledReason) {\n // The Radix Item renders a <button disabled>, which is removed\n // from the tab order and does not fire hover/pointer events — so a\n // Tooltip wrapped directly around it would never open. Wrap the row\n // in a focusable, hoverable <span tabIndex={0}> and make THAT the\n // tooltip trigger, so the disabledReason is reachable by both mouse\n // hover and keyboard focus (mirrors radio.tsx putting the Tooltip\n // on the non-disabled wrapper, not the disabled control).\n return (\n <Tooltip key={person.id} label={person.disabledReason}>\n <span\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- intentional focusable tooltip trigger so keyboard users can reach the disabled reason\n tabIndex={0}\n data-disabled-row={person.id}\n aria-label={accessibleName}\n className=\"ds:flex ds:min-w-0 ds:rounded-[var(--radius-md)] 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)]\"\n >\n {row}\n </span>\n </Tooltip>\n );\n }\n return row;\n };\n\n /* ---- Empty-state slot ---- */\n const resolvedEmptyState = emptyState ?? (\n <p className=\"type-body-sm ds:text-muted-foreground\">\n {t('dependentSelector.empty')}\n </p>\n );\n\n /* ---- Radiogroup body ---- */\n /* While loading we still render a role=radiogroup container (carrying */\n /* the data-component marker + aria-busy) holding aria-hidden skeleton */\n /* rows — selection is inert. Otherwise the Radix root renders the */\n /* real person rows. */\n const body = loading ? (\n <div\n ref={composedRef}\n id={id}\n role=\"radiogroup\"\n aria-label={!resolvedAriaLabelledBy ? ariaLabel : undefined}\n aria-labelledby={resolvedAriaLabelledBy}\n aria-describedby={describedBy}\n aria-invalid={Boolean(error) || undefined}\n aria-busy=\"true\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:min-w-0\"\n data-component=\"dependent-selector\"\n data-component-id={id}\n >\n <span className=\"ds:sr-only\">\n {t('dependentSelector.loadingLabel')}\n </span>\n {skeletonRows}\n </div>\n ) : (\n <RadixRadioGroup.Root\n ref={composedRef}\n id={id}\n dir={dir}\n value={isControlled ? (value ?? '') : undefined}\n defaultValue={\n !isControlled ? (defaultValue ?? autoSelectId) : undefined\n }\n onValueChange={handleValueChange}\n aria-label={!resolvedAriaLabelledBy ? ariaLabel : undefined}\n aria-labelledby={resolvedAriaLabelledBy}\n aria-describedby={describedBy}\n aria-invalid={Boolean(error) || undefined}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:min-w-0\"\n data-component=\"dependent-selector\"\n data-component-id={id}\n {...props}\n >\n {people.map(renderPerson)}\n </RadixRadioGroup.Root>\n );\n\n /* ---- Outer wrapper ---- */\n /* When `label` is set we render a plain heading <div id={legendId}> */\n /* styled like a legend, and the single role=radiogroup is named via */\n /* aria-labelledby={legendId}. We do NOT wrap in <fieldset>/<legend>: */\n /* that would create a second named grouping container nested around */\n /* the radiogroup (the legend announced twice). One grouping */\n /* mechanism only. */\n const outerClasses = rootVariants({ size, tone, className });\n\n return (\n <div className={outerClasses}>\n {label ? (\n <div id={legendId} className=\"type-label ds:text-foreground\">\n {label}\n </div>\n ) : null}\n {descriptionNode}\n {body}\n {!loading && !hasDependents ? resolvedEmptyState : null}\n {errorNode}\n </div>\n );\n },\n);\n\nDependentSelector.displayName = 'DependentSelector';\n"],"names":["dependentSelectorAgent","handle","args","rootVariants","cva","rowVariants","avatarSizeBySize","skeletonAvatarSizeBySize","nameTypeBySize","DependentSelector","forwardRef","people","value","defaultValue","onValueChange","label","description","sizeProp","toneProp","loading","error","emptyState","id","className","ariaLabel","ariaLabelledBy","props","ref","size","tone","t","useTranslation","baseId","useId","legendId","descriptionId","errorId","useRef","useEffect","selectablePeople","useMemo","person","hasDependents","autoSelectId","isControlled","internalValue","setInternalValue","useState","currentValue","currentValueRef","handleValueChange","next","onValueChangeRef","autoSelectNotifiedRef","_a","agentHandle","useAgentRegistration","rootRef","composedRef","composeRefs","dir","useDirection","resolvedAriaLabelledBy","describedBy","relationshipLabel","key","ageLabel","age","personAccessibleName","parts","descriptionNode","jsx","errorNode","jsxs","CircleAlert","skeletonRows","_","index","renderPerson","rowId","accessibleName","row","RadixRadioGroup","Avatar","Badge","Tooltip","resolvedEmptyState","body","outerClasses"],"mappings":";;;;;;;;;;;;AAcO,MAAMA,KAAgE;AAAA,EAC3E,IAAI;AAAA,EACJ,cAAc,CAAC,eAAe;AAAA,EAC9B,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,EACpC;AAAA,EAEF,SAAS;AAAA,IACP,WAAW;AAAA,MACT,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY;AAAA,UACV,OAAO;AAAA,YACL,MAAM;AAAA,YACN,aAAa;AAAA,UAAA;AAAA,QACf;AAAA,QAEF,UAAU,CAAC,OAAO;AAAA,MAAA;AAAA,MAEpB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,UAAU;AAAA,QACR,EAAE,MAAM,EAAE,OAAO,WAAA,GAAc,MAAM,+BAAA;AAAA,MAA+B;AAAA,MAEtE,QAAQ,CAACA,GAAQC,MAA4B;AAC3C,QAAAD,EAAO,SAASC,EAAK,KAAK;AAAA,MAC5B;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,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,IAEf,MAAM;AAAA,MACJ,MAAM;AAAA,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AAC,GAAM,WAAAN,GAAW;AAE3D,WACE,gBAAAkD,EAAC,OAAA,EAAI,WAAWe,IACb,UAAA;AAAA,MAAAzE,sBACE,OAAA,EAAI,IAAImB,GAAU,WAAU,iCAC1B,aACH,IACE;AAAA,MACHoC;AAAA,MACAiB;AAAA,MACA,CAACpE,KAAW,CAACuB,IAAgB4C,KAAqB;AAAA,MAClDd;AAAA,IAAA,GACH;AAAA,EAEJ;AACF;AAEA/D,GAAkB,cAAc;"}
|
|
@@ -2,7 +2,7 @@ import { jsxs as a, jsx as e, Fragment as _ } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as q, useId as w, useRef as f, useImperativeHandle as K, useMemo as P } from "react";
|
|
3
3
|
import { useTranslation as D } from "react-i18next";
|
|
4
4
|
import { A as I } from "./alert-CiQ5Pa3Q.js";
|
|
5
|
-
import { A as H } from "./avatar-
|
|
5
|
+
import { A as H } from "./avatar-BVvjKNTp.js";
|
|
6
6
|
import { B as $ } from "./button-18oBsI3n.js";
|
|
7
7
|
import { I as O } from "./icon-button-CY7GU_Se.js";
|
|
8
8
|
import { C } from "./card-DPmk26CL.js";
|
|
@@ -274,4 +274,4 @@ function ae({ section: t }) {
|
|
|
274
274
|
export {
|
|
275
275
|
be as E
|
|
276
276
|
};
|
|
277
|
-
//# sourceMappingURL=entity-summary-
|
|
277
|
+
//# sourceMappingURL=entity-summary-CFJfBdVP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-summary-Ckz_U00H.js","sources":["../../node_modules/lucide-react/dist/esm/icons/contact-round.mjs","../../src/components/entity-summary/entity-summary.agent.ts","../../src/components/entity-summary/entity-summary.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M16 2v2\", key: \"scm5qe\" }],\n [\"path\", { d: \"M17.915 22a6 6 0 0 0-12 0\", key: \"suqz9p\" }],\n [\"path\", { d: \"M8 2v2\", key: \"pbkmx\" }],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"4\", key: \"4exip2\" }],\n [\"rect\", { x: \"3\", y: \"4\", width: \"18\", height: \"18\", rx: \"2\", key: \"12vinp\" }]\n];\nconst ContactRound = createLucideIcon(\"contact-round\", __iconNode);\n\nexport { __iconNode, ContactRound as default };\n//# sourceMappingURL=contact-round.mjs.map\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — EntitySummary. */\n/* */\n/* The AI narrative brief (\"Sintesi IA\") for an entity. The agent can */\n/* read the brief's STRUCTURE (generated-at + section ids / headings / */\n/* tone / item counts — fixed category labels, never the entity name or */\n/* the bullet items, both PHI) and drive the two affordances: regenerate */\n/* the brief and dismiss the panel. Generation itself is gated upstream */\n/* by AiConsentBanner; this adapter only re-requests an already-consented */\n/* brief. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { EntitySummaryHandle } from './entity-summary';\n\nexport const entitySummaryAgent: AgentAdapter<EntitySummaryHandle> = {\n id: 'entity-summary',\n // 'close' backs close; regenerate is a host-driven refresh with no\n // dedicated capability in the closed vocabulary.\n capabilities: ['close'],\n state: {\n sections: {\n type: 'Array<{ id: string; heading: string; tone: \"default\" | \"attention\"; itemCount: number }>',\n descriptionKey: 'ui.agent.entitySummary.state.sections',\n description:\n 'Structural section list — ids, fixed category headings, tone and item counts. Never the entity name or the bullet items (both PHI).',\n read: (handle) => handle.getState().sections,\n },\n generatedAtIso: {\n type: 'string | undefined',\n descriptionKey: 'ui.agent.entitySummary.state.generatedAtIso',\n description: 'ISO-8601 instant the brief was generated, when known.',\n read: (handle) => handle.getState().generatedAtIso,\n },\n },\n actions: {\n regenerate: {\n // Re-requests a fresh brief from the model — reaches an external system.\n safety: 'write',\n openWorld: true,\n descriptionKey: 'ui.agent.entitySummary.actions.regenerate',\n description:\n 'Request the host to regenerate the AI brief. No-op when the regenerate affordance is not available.',\n invoke: (handle) => {\n if (handle.canRegenerate()) handle.regenerate();\n },\n },\n close: {\n // Ephemeral panel-visibility change — read.\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.entitySummary.actions.close',\n description:\n 'Dismiss the summary panel. No-op when the close affordance is not available (e.g. docked in the rail).',\n invoke: (handle) => {\n if (handle.canClose()) handle.close();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'entity-summary',\n description: 'Marks the EntitySummary panel region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific summary panel from the agent.',\n },\n },\n};\n","import {\n forwardRef,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { ContactRound, Clock, RefreshCw, X } from 'lucide-react';\nimport { Alert } from '../alert';\nimport { Avatar } from '../avatar';\nimport { Button } from '../button';\nimport { Card } from '../card';\nimport { IconButton } from '../button/icon-button';\nimport { Link } from '../link';\nimport { PanelHeader } from '../panel-header';\nimport { Timestamp } from '../timestamp';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { entitySummaryAgent } from './entity-summary.agent';\n\n/* ------------------------------------------------------------------ */\n/* EntitySummary — the AI narrative brief for an entity. */\n/* */\n/* The kit form of platform's \"Sintesi IA\": a generated, sectioned */\n/* brief of a patient / care plan — header (entity · generated-at · */\n/* regenerate · corpus stats), N labelled sections of bullet items */\n/* (with inline entity links), and a BETA disclaimer. The `attention` */\n/* section tone carries the clinically valuable risk flags. */\n/* */\n/* The kit owns the layout, i18n and theming; the consumer passes */\n/* structured `sections` (data-in) so the brief re-themes and */\n/* localises rather than rendering a model HTML blob. Gate generation */\n/* behind `AiConsentBanner` upstream. */\n/* ------------------------------------------------------------------ */\n\n/** A corpus stat shown in the header (e.g. `{ value: 5, label: 'care plans' }`). */\nexport interface EntitySummaryStat {\n value: string | number;\n label: string;\n}\n\n/** One narrative section — a heading over a list of bullet items. */\nexport interface EntitySummarySection {\n id: string;\n heading: string;\n /**\n * Leading glyph for the section. On default sections it's the scannability\n * anchor shown in a `--primary`-tinted medallion beside the heading (e.g. a\n * calendar for \"Scheduled\", a wallet for \"Financial\"); omit it to render no\n * medallion. On `attention` sections it overrides the warning Alert's icon\n * (which defaults to an alert triangle).\n */\n icon?: ReactNode;\n /**\n * `attention` renders the section as the kit's warning `Alert` — the\n * standard risk-flag treatment (border, warning surface, alert glyph,\n * `--warning-foreground` text) — for clinically important callouts.\n */\n tone?: 'default' | 'attention';\n /** Bullet items — `ReactNode` so consumers compose inline entity links. */\n items: ReactNode[];\n}\n\n/**\n * Curated agent handle for EntitySummary. Exposes structural state only —\n * never the entity name or the section items (both PHI). See\n * `entity-summary.agent.ts`.\n */\nexport interface EntitySummaryHandle {\n /** Structural snapshot — generated-at + section ids/headings/tone/count. No PHI. */\n getState: () => {\n generatedAtIso?: string;\n sections: Array<{\n id: string;\n heading: string;\n tone: 'default' | 'attention';\n itemCount: number;\n }>;\n };\n /** Whether the regenerate affordance is available. */\n canRegenerate: () => boolean;\n /** Request the host to regenerate the brief (mirrors onRegenerate). */\n regenerate: () => void;\n /** Whether the close affordance is available. */\n canClose: () => boolean;\n /** Dismiss the panel (mirrors onClose). */\n close: () => void;\n}\n\nexport interface EntitySummaryProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'title' | 'children'\n> {\n /**\n * Stable instance id. Surfaced on the root as `data-component-id` so an\n * agent / MCP UI bridge can address this specific summary panel.\n */\n id?: string;\n /** Panel title. Defaults to the localised \"AI summary\". */\n title?: string;\n /** Entity name shown beside its avatar in the header (links when `entityHref` is set). */\n entityName?: string;\n /** Entity href for the name link. */\n entityHref?: string;\n /** Avatar image URL for the entity. Falls back to initials derived from `entityName`. */\n entityAvatarSrc?: string;\n /** ISO-8601 instant the brief was generated. */\n generatedAtIso?: string;\n /** Corpus the brief was built from, shown as a compact KPI card. */\n stats?: EntitySummaryStat[];\n /** The narrative sections, in order. */\n sections: EntitySummarySection[];\n /** Regenerate the brief. Omit to hide the affordance. */\n onRegenerate?: () => void;\n /** Regenerate-button label. */\n regenerateLabel?: string;\n /**\n * Dismiss the panel. Renders a close button in the panel header for\n * STANDALONE use (outside the rail). When docked in `ControlRoomRail`, omit\n * this — the rail injects its own close via `PanelHeaderActionsProvider`\n * (passing it while docked would render a duplicate close control).\n */\n onClose?: () => void;\n /** Footer disclaimer. Defaults to the BETA clinical-judgement note. */\n disclaimer?: ReactNode;\n /** BCP-47 locale for the generated-at timestamp. */\n locale?: string;\n /** Accessible name for the panel region (defaults to `title`). */\n 'aria-label'?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Section presentation. The `attention` tone renders a different */\n/* element tree (the kit's warning Alert) rather than a class variant, */\n/* so the branch lives in `Section`; these constants carry the shared */\n/* class sets for the default (prose) sections. */\n/* ------------------------------------------------------------------ */\n\n// The default section's leading icon chip — a --primary-tinted medallion\n// that anchors the heading. No tone variants: the attention tone is owned\n// by the Alert primitive, so this stays a plain class set.\nconst MEDALLION_CLASSES =\n 'ds:flex ds:size-7 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-[var(--radius-md)] ds:[&_svg]:size-4 ds:bg-primary/10 ds:text-[color:var(--primary)]';\n\n// The bullet list shared by every section — indented disc items.\nconst ITEMS_CLASSES =\n 'ds:m-0 ds:flex ds:list-disc ds:flex-col ds:gap-[var(--spacing-2xs)] ds:ps-[var(--spacing-md)] type-body-sm';\n\nexport const EntitySummary = forwardRef<HTMLElement, EntitySummaryProps>(\n function EntitySummary(\n {\n id,\n title,\n entityName,\n entityHref,\n entityAvatarSrc,\n generatedAtIso,\n stats,\n sections,\n onRegenerate,\n regenerateLabel,\n onClose,\n disclaimer,\n locale,\n className,\n 'aria-label': ariaLabel,\n ...rest\n },\n ref,\n ) {\n const { t } = useTranslation();\n const headingId = useId();\n const heading =\n title ?? t('entitySummary.title', { defaultValue: 'AI summary' });\n\n /* ----- Agent handle (structural state + regenerate / close) ----- */\n const sectionsRef = useRef(sections);\n sectionsRef.current = sections;\n const generatedAtRef = useRef(generatedAtIso);\n generatedAtRef.current = generatedAtIso;\n const onRegenerateRef = useRef(onRegenerate);\n onRegenerateRef.current = onRegenerate;\n const onCloseRef = useRef(onClose);\n onCloseRef.current = onClose;\n\n const rootRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => rootRef.current as HTMLElement, []);\n\n const handle = useMemo<EntitySummaryHandle>(\n () => ({\n // Structural only — section headings are fixed category labels, never\n // the entity name or the bullet items (both PHI).\n getState: () => ({\n generatedAtIso: generatedAtRef.current,\n sections: sectionsRef.current.map((s) => ({\n id: s.id,\n heading: s.heading,\n tone: s.tone ?? 'default',\n itemCount: s.items.length,\n })),\n }),\n canRegenerate: () => !!onRegenerateRef.current,\n regenerate: () => onRegenerateRef.current?.(),\n canClose: () => !!onCloseRef.current,\n close: () => onCloseRef.current?.(),\n }),\n [],\n );\n useAgentRegistration(entitySummaryAgent, handle, id);\n\n // The generated-at line — the brief's \"subtitle\" under the entity name,\n // or a standalone line when there's no entity. A clock glyph leads it.\n const generatedLine = generatedAtIso ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] type-meta ds:text-[color:var(--muted-foreground)]\">\n <Clock aria-hidden=\"true\" className=\"ds:size-3.5 ds:shrink-0\" />\n <span>\n {t('entitySummary.generatedAt', { defaultValue: 'Generated' })}\n </span>\n <Timestamp value={generatedAtIso} format=\"absolute\" locale={locale} />\n </span>\n ) : null;\n\n return (\n <section\n ref={rootRef}\n data-component=\"entity-summary\"\n data-component-id={id}\n aria-labelledby={ariaLabel ? undefined : headingId}\n aria-label={ariaLabel}\n className={['ds:flex ds:flex-col', className].filter(Boolean).join(' ')}\n {...rest}\n >\n {/* Header — the shared rail-panel pattern. Title + Regenerate;\n the close affordance is injected by the rail, not the panel. */}\n <PanelHeader\n title={heading}\n icon={<ContactRound aria-hidden=\"true\" />}\n headingId={ariaLabel ? undefined : headingId}\n sticky\n divider\n actions={\n onRegenerate || onClose ? (\n <>\n {onRegenerate ? (\n <Button\n type=\"button\"\n size=\"sm\"\n intent=\"ghost\"\n startIcon={<RefreshCw aria-hidden=\"true\" />}\n onClick={onRegenerate}\n >\n {regenerateLabel ??\n t('entitySummary.regenerate', {\n defaultValue: 'Regenerate',\n })}\n </Button>\n ) : null}\n {onClose ? (\n <IconButton\n icon={<X aria-hidden=\"true\" />}\n size=\"sm\"\n intent=\"ghost\"\n aria-label={t('common.close', { defaultValue: 'Close' })}\n onClick={onClose}\n />\n ) : null}\n </>\n ) : undefined\n }\n />\n\n {/* Body */}\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]\">\n {entityName || generatedAtIso || (stats && stats.length > 0) ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {/* Identity — the entity's avatar + name, generated-at as the\n subtitle beneath. Without a name, the generated line stands\n alone. */}\n {entityName ? (\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <Avatar\n name={entityName}\n src={entityAvatarSrc}\n size=\"sm\"\n className=\"ds:shrink-0\"\n />\n <div className=\"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n {entityHref ? (\n <Link\n href={entityHref}\n className=\"type-body-sm ds:font-semibold\"\n >\n {entityName}\n </Link>\n ) : (\n <span className=\"type-body-sm ds:font-semibold ds:text-[color:var(--foreground)]\">\n {entityName}\n </span>\n )}\n {generatedLine}\n </div>\n </div>\n ) : (\n generatedLine\n )}\n\n {/* Corpus stats — a compact KPI card: value over label, with a\n hairline divider between cells. */}\n {stats && stats.length > 0 ? (\n <Card variant=\"elevated\">\n {/* eslint-disable-next-line jsx-a11y/no-redundant-roles -- role=\"list\" restores list semantics that ds:list-none strips in Safari/VoiceOver */}\n <ul\n role=\"list\"\n className=\"ds:m-0 ds:flex ds:list-none ds:items-stretch\"\n >\n {stats.map((stat, index) => (\n <li\n key={`${stat.label}-${index}`}\n className={[\n 'ds:flex ds:flex-1 ds:flex-col ds:items-center ds:gap-[var(--spacing-2xs)] ds:p-[var(--spacing-sm)] ds:text-center',\n index > 0\n ? 'ds:border-s ds:border-[color:var(--card-border)]'\n : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <span className=\"type-metric ds:[--type-metric-size:var(--font-size-lg)] ds:text-[color:var(--foreground)]\">\n {stat.value}\n </span>\n <span className=\"type-meta ds:text-[color:var(--muted-foreground)]\">\n {stat.label}\n </span>\n </li>\n ))}\n </ul>\n </Card>\n ) : null}\n </div>\n ) : null}\n\n {/* Sections */}\n {sections.map((section) => (\n <Section key={section.id} section={section} />\n ))}\n\n {/* Disclaimer */}\n <p className=\"ds:m-0 type-meta ds:text-[color:var(--muted-foreground)]\">\n {disclaimer ??\n t('entitySummary.disclaimer', {\n defaultValue:\n 'Does not replace clinical judgement · verify accuracy before clinical use · BETA',\n })}\n </p>\n </div>\n </section>\n );\n },\n);\n\nfunction Section({ section }: { section: EntitySummarySection }): ReactNode {\n const headingId = useId();\n\n // The risk-flag section composes the kit's warning `Alert` primitive rather\n // than re-painting the warning tokens by hand — same border, surface, alert\n // glyph, and `--warning-foreground` treatment as every other warning in the\n // app. `live=\"off\"`: the brief is static content, not a just-occurred event,\n // so the items read in normal flow instead of being announced assertively.\n // A per-section `icon` overrides Alert's default alert triangle.\n if (section.tone === 'attention') {\n // The shared `--shadow-card` lifts the warning callout to the same\n // elevation as the surrounding section cards, so the stack reads as one\n // set of raised panels rather than a flat warning band among cards.\n return (\n <Alert\n variant=\"warning\"\n live=\"off\"\n icon={section.icon}\n className=\"ds:shadow-[var(--shadow-card)]\"\n >\n <Alert.Title as=\"h3\">{section.heading}</Alert.Title>\n <ul className={ITEMS_CLASSES}>\n {section.items.map((item, index) => (\n <li key={index}>{item}</li>\n ))}\n </ul>\n </Alert>\n );\n }\n\n // Default sections are raised cards — the scannable \"panel per topic\" stack,\n // matching platform's Sintesi IA. The card owns its own padding (so we drive\n // it from a single content div rather than Card.Header/Body) and is named by\n // its heading for assistive tech.\n return (\n <Card variant=\"elevated\" aria-labelledby={headingId}>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]\">\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n {section.icon ? (\n <span aria-hidden=\"true\" className={MEDALLION_CLASSES}>\n {section.icon}\n </span>\n ) : null}\n <h3\n id={headingId}\n className=\"ds:m-0 type-eyebrow ds:text-[color:var(--foreground)]\"\n >\n {section.heading}\n </h3>\n </div>\n <ul className={`${ITEMS_CLASSES} ds:text-[color:var(--foreground)]`}>\n {section.items.map((item, index) => (\n <li key={index}>{item}</li>\n ))}\n </ul>\n </div>\n </Card>\n );\n}\n"],"names":["__iconNode","ContactRound","createLucideIcon","entitySummaryAgent","handle","MEDALLION_CLASSES","ITEMS_CLASSES","EntitySummary","forwardRef","id","title","entityName","entityHref","entityAvatarSrc","generatedAtIso","stats","sections","onRegenerate","regenerateLabel","onClose","disclaimer","locale","className","ariaLabel","rest","ref","t","useTranslation","headingId","useId","heading","sectionsRef","useRef","generatedAtRef","onRegenerateRef","onCloseRef","rootRef","useImperativeHandle","useMemo","s","_a","useAgentRegistration","generatedLine","jsxs","jsx","Clock","Timestamp","PanelHeader","Fragment","Button","RefreshCw","IconButton","X","Avatar","Link","Card","stat","index","section","Section","Alert","item"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,6BAA6B,KAAK,SAAQ,CAAE;AAAA,EAC1D,CAAC,QAAQ,EAAE,GAAG,UAAU,KAAK,QAAO,CAAE;AAAA,EACtC,CAAC,UAAU,EAAE,IAAI,MA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,GACZ,YAAQ,MAAM,IAAI,CAACuD,GAAMJ,MACxB,gBAAAb,EAAC,MAAA,EAAgB,UAAAiB,EAAA,GAARJ,CAAa,CACvB,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAUJ,gBAAAb,EAACW,KAAK,SAAQ,YAAW,mBAAiB3B,GACxC,UAAA,gBAAAe,EAAC,OAAA,EAAI,WAAU,2EACb,UAAA;AAAA,IAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,sDACZ,UAAA;AAAA,MAAAe,EAAQ,yBACN,QAAA,EAAK,eAAY,QAAO,WAAWrD,IACjC,UAAAqD,EAAQ,KAAA,CACX,IACE;AAAA,MACJ,gBAAAd;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAIhB;AAAA,UACJ,WAAU;AAAA,UAET,UAAA8B,EAAQ;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,GACF;AAAA,sBACC,MAAA,EAAG,WAAW,GAAGpD,CAAa,sCAC5B,UAAAoD,EAAQ,MAAM,IAAI,CAACG,GAAMJ,MACxB,gBAAAb,EAAC,QAAgB,UAAAiB,EAAA,GAARJ,CAAa,CACvB,EAAA,CACH;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"entity-summary-CFJfBdVP.js","sources":["../../node_modules/lucide-react/dist/esm/icons/contact-round.mjs","../../src/components/entity-summary/entity-summary.agent.ts","../../src/components/entity-summary/entity-summary.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M16 2v2\", key: \"scm5qe\" }],\n [\"path\", { d: \"M17.915 22a6 6 0 0 0-12 0\", key: \"suqz9p\" }],\n [\"path\", { d: \"M8 2v2\", key: \"pbkmx\" }],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"4\", key: \"4exip2\" }],\n [\"rect\", { x: \"3\", y: \"4\", width: \"18\", height: \"18\", rx: \"2\", key: \"12vinp\" }]\n];\nconst ContactRound = createLucideIcon(\"contact-round\", __iconNode);\n\nexport { __iconNode, ContactRound as default };\n//# sourceMappingURL=contact-round.mjs.map\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — EntitySummary. */\n/* */\n/* The AI narrative brief (\"Sintesi IA\") for an entity. The agent can */\n/* read the brief's STRUCTURE (generated-at + section ids / headings / */\n/* tone / item counts — fixed category labels, never the entity name or */\n/* the bullet items, both PHI) and drive the two affordances: regenerate */\n/* the brief and dismiss the panel. Generation itself is gated upstream */\n/* by AiConsentBanner; this adapter only re-requests an already-consented */\n/* brief. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { EntitySummaryHandle } from './entity-summary';\n\nexport const entitySummaryAgent: AgentAdapter<EntitySummaryHandle> = {\n id: 'entity-summary',\n // 'close' backs close; regenerate is a host-driven refresh with no\n // dedicated capability in the closed vocabulary.\n capabilities: ['close'],\n state: {\n sections: {\n type: 'Array<{ id: string; heading: string; tone: \"default\" | \"attention\"; itemCount: number }>',\n descriptionKey: 'ui.agent.entitySummary.state.sections',\n description:\n 'Structural section list — ids, fixed category headings, tone and item counts. Never the entity name or the bullet items (both PHI).',\n read: (handle) => handle.getState().sections,\n },\n generatedAtIso: {\n type: 'string | undefined',\n descriptionKey: 'ui.agent.entitySummary.state.generatedAtIso',\n description: 'ISO-8601 instant the brief was generated, when known.',\n read: (handle) => handle.getState().generatedAtIso,\n },\n },\n actions: {\n regenerate: {\n // Re-requests a fresh brief from the model — reaches an external system.\n safety: 'write',\n openWorld: true,\n descriptionKey: 'ui.agent.entitySummary.actions.regenerate',\n description:\n 'Request the host to regenerate the AI brief. No-op when the regenerate affordance is not available.',\n invoke: (handle) => {\n if (handle.canRegenerate()) handle.regenerate();\n },\n },\n close: {\n // Ephemeral panel-visibility change — read.\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.entitySummary.actions.close',\n description:\n 'Dismiss the summary panel. No-op when the close affordance is not available (e.g. docked in the rail).',\n invoke: (handle) => {\n if (handle.canClose()) handle.close();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'entity-summary',\n description: 'Marks the EntitySummary panel region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific summary panel from the agent.',\n },\n },\n};\n","import {\n forwardRef,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { ContactRound, Clock, RefreshCw, X } from 'lucide-react';\nimport { Alert } from '../alert';\nimport { Avatar } from '../avatar';\nimport { Button } from '../button';\nimport { Card } from '../card';\nimport { IconButton } from '../button/icon-button';\nimport { Link } from '../link';\nimport { PanelHeader } from '../panel-header';\nimport { Timestamp } from '../timestamp';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { entitySummaryAgent } from './entity-summary.agent';\n\n/* ------------------------------------------------------------------ */\n/* EntitySummary — the AI narrative brief for an entity. */\n/* */\n/* The kit form of platform's \"Sintesi IA\": a generated, sectioned */\n/* brief of a patient / care plan — header (entity · generated-at · */\n/* regenerate · corpus stats), N labelled sections of bullet items */\n/* (with inline entity links), and a BETA disclaimer. The `attention` */\n/* section tone carries the clinically valuable risk flags. */\n/* */\n/* The kit owns the layout, i18n and theming; the consumer passes */\n/* structured `sections` (data-in) so the brief re-themes and */\n/* localises rather than rendering a model HTML blob. Gate generation */\n/* behind `AiConsentBanner` upstream. */\n/* ------------------------------------------------------------------ */\n\n/** A corpus stat shown in the header (e.g. `{ value: 5, label: 'care plans' }`). */\nexport interface EntitySummaryStat {\n value: string | number;\n label: string;\n}\n\n/** One narrative section — a heading over a list of bullet items. */\nexport interface EntitySummarySection {\n id: string;\n heading: string;\n /**\n * Leading glyph for the section. On default sections it's the scannability\n * anchor shown in a `--primary`-tinted medallion beside the heading (e.g. a\n * calendar for \"Scheduled\", a wallet for \"Financial\"); omit it to render no\n * medallion. On `attention` sections it overrides the warning Alert's icon\n * (which defaults to an alert triangle).\n */\n icon?: ReactNode;\n /**\n * `attention` renders the section as the kit's warning `Alert` — the\n * standard risk-flag treatment (border, warning surface, alert glyph,\n * `--warning-foreground` text) — for clinically important callouts.\n */\n tone?: 'default' | 'attention';\n /** Bullet items — `ReactNode` so consumers compose inline entity links. */\n items: ReactNode[];\n}\n\n/**\n * Curated agent handle for EntitySummary. Exposes structural state only —\n * never the entity name or the section items (both PHI). See\n * `entity-summary.agent.ts`.\n */\nexport interface EntitySummaryHandle {\n /** Structural snapshot — generated-at + section ids/headings/tone/count. No PHI. */\n getState: () => {\n generatedAtIso?: string;\n sections: Array<{\n id: string;\n heading: string;\n tone: 'default' | 'attention';\n itemCount: number;\n }>;\n };\n /** Whether the regenerate affordance is available. */\n canRegenerate: () => boolean;\n /** Request the host to regenerate the brief (mirrors onRegenerate). */\n regenerate: () => void;\n /** Whether the close affordance is available. */\n canClose: () => boolean;\n /** Dismiss the panel (mirrors onClose). */\n close: () => void;\n}\n\nexport interface EntitySummaryProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'title' | 'children'\n> {\n /**\n * Stable instance id. Surfaced on the root as `data-component-id` so an\n * agent / MCP UI bridge can address this specific summary panel.\n */\n id?: string;\n /** Panel title. Defaults to the localised \"AI summary\". */\n title?: string;\n /** Entity name shown beside its avatar in the header (links when `entityHref` is set). */\n entityName?: string;\n /** Entity href for the name link. */\n entityHref?: string;\n /** Avatar image URL for the entity. Falls back to initials derived from `entityName`. */\n entityAvatarSrc?: string;\n /** ISO-8601 instant the brief was generated. */\n generatedAtIso?: string;\n /** Corpus the brief was built from, shown as a compact KPI card. */\n stats?: EntitySummaryStat[];\n /** The narrative sections, in order. */\n sections: EntitySummarySection[];\n /** Regenerate the brief. Omit to hide the affordance. */\n onRegenerate?: () => void;\n /** Regenerate-button label. */\n regenerateLabel?: string;\n /**\n * Dismiss the panel. Renders a close button in the panel header for\n * STANDALONE use (outside the rail). When docked in `ControlRoomRail`, omit\n * this — the rail injects its own close via `PanelHeaderActionsProvider`\n * (passing it while docked would render a duplicate close control).\n */\n onClose?: () => void;\n /** Footer disclaimer. Defaults to the BETA clinical-judgement note. */\n disclaimer?: ReactNode;\n /** BCP-47 locale for the generated-at timestamp. */\n locale?: string;\n /** Accessible name for the panel region (defaults to `title`). */\n 'aria-label'?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Section presentation. The `attention` tone renders a different */\n/* element tree (the kit's warning Alert) rather than a class variant, */\n/* so the branch lives in `Section`; these constants carry the shared */\n/* class sets for the default (prose) sections. */\n/* ------------------------------------------------------------------ */\n\n// The default section's leading icon chip — a --primary-tinted medallion\n// that anchors the heading. No tone variants: the attention tone is owned\n// by the Alert primitive, so this stays a plain class set.\nconst MEDALLION_CLASSES =\n 'ds:flex ds:size-7 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-[var(--radius-md)] ds:[&_svg]:size-4 ds:bg-primary/10 ds:text-[color:var(--primary)]';\n\n// The bullet list shared by every section — indented disc items.\nconst ITEMS_CLASSES =\n 'ds:m-0 ds:flex ds:list-disc ds:flex-col ds:gap-[var(--spacing-2xs)] ds:ps-[var(--spacing-md)] type-body-sm';\n\nexport const EntitySummary = forwardRef<HTMLElement, EntitySummaryProps>(\n function EntitySummary(\n {\n id,\n title,\n entityName,\n entityHref,\n entityAvatarSrc,\n generatedAtIso,\n stats,\n sections,\n onRegenerate,\n regenerateLabel,\n onClose,\n disclaimer,\n locale,\n className,\n 'aria-label': ariaLabel,\n ...rest\n },\n ref,\n ) {\n const { t } = useTranslation();\n const headingId = useId();\n const heading =\n title ?? t('entitySummary.title', { defaultValue: 'AI summary' });\n\n /* ----- Agent handle (structural state + regenerate / close) ----- */\n const sectionsRef = useRef(sections);\n sectionsRef.current = sections;\n const generatedAtRef = useRef(generatedAtIso);\n generatedAtRef.current = generatedAtIso;\n const onRegenerateRef = useRef(onRegenerate);\n onRegenerateRef.current = onRegenerate;\n const onCloseRef = useRef(onClose);\n onCloseRef.current = onClose;\n\n const rootRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => rootRef.current as HTMLElement, []);\n\n const handle = useMemo<EntitySummaryHandle>(\n () => ({\n // Structural only — section headings are fixed category labels, never\n // the entity name or the bullet items (both PHI).\n getState: () => ({\n generatedAtIso: generatedAtRef.current,\n sections: sectionsRef.current.map((s) => ({\n id: s.id,\n heading: s.heading,\n tone: s.tone ?? 'default',\n itemCount: s.items.length,\n })),\n }),\n canRegenerate: () => !!onRegenerateRef.current,\n regenerate: () => onRegenerateRef.current?.(),\n canClose: () => !!onCloseRef.current,\n close: () => onCloseRef.current?.(),\n }),\n [],\n );\n useAgentRegistration(entitySummaryAgent, handle, id);\n\n // The generated-at line — the brief's \"subtitle\" under the entity name,\n // or a standalone line when there's no entity. A clock glyph leads it.\n const generatedLine = generatedAtIso ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] type-meta ds:text-[color:var(--muted-foreground)]\">\n <Clock aria-hidden=\"true\" className=\"ds:size-3.5 ds:shrink-0\" />\n <span>\n {t('entitySummary.generatedAt', { defaultValue: 'Generated' })}\n </span>\n <Timestamp value={generatedAtIso} format=\"absolute\" locale={locale} />\n </span>\n ) : null;\n\n return (\n <section\n ref={rootRef}\n data-component=\"entity-summary\"\n data-component-id={id}\n aria-labelledby={ariaLabel ? undefined : headingId}\n aria-label={ariaLabel}\n className={['ds:flex ds:flex-col', className].filter(Boolean).join(' ')}\n {...rest}\n >\n {/* Header — the shared rail-panel pattern. Title + Regenerate;\n the close affordance is injected by the rail, not the panel. */}\n <PanelHeader\n title={heading}\n icon={<ContactRound aria-hidden=\"true\" />}\n headingId={ariaLabel ? undefined : headingId}\n sticky\n divider\n actions={\n onRegenerate || onClose ? (\n <>\n {onRegenerate ? (\n <Button\n type=\"button\"\n size=\"sm\"\n intent=\"ghost\"\n startIcon={<RefreshCw aria-hidden=\"true\" />}\n onClick={onRegenerate}\n >\n {regenerateLabel ??\n t('entitySummary.regenerate', {\n defaultValue: 'Regenerate',\n })}\n </Button>\n ) : null}\n {onClose ? (\n <IconButton\n icon={<X aria-hidden=\"true\" />}\n size=\"sm\"\n intent=\"ghost\"\n aria-label={t('common.close', { defaultValue: 'Close' })}\n onClick={onClose}\n />\n ) : null}\n </>\n ) : undefined\n }\n />\n\n {/* Body */}\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]\">\n {entityName || generatedAtIso || (stats && stats.length > 0) ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {/* Identity — the entity's avatar + name, generated-at as the\n subtitle beneath. Without a name, the generated line stands\n alone. */}\n {entityName ? (\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <Avatar\n name={entityName}\n src={entityAvatarSrc}\n size=\"sm\"\n className=\"ds:shrink-0\"\n />\n <div className=\"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n {entityHref ? (\n <Link\n href={entityHref}\n className=\"type-body-sm ds:font-semibold\"\n >\n {entityName}\n </Link>\n ) : (\n <span className=\"type-body-sm ds:font-semibold ds:text-[color:var(--foreground)]\">\n {entityName}\n </span>\n )}\n {generatedLine}\n </div>\n </div>\n ) : (\n generatedLine\n )}\n\n {/* Corpus stats — a compact KPI card: value over label, with a\n hairline divider between cells. */}\n {stats && stats.length > 0 ? (\n <Card variant=\"elevated\">\n {/* eslint-disable-next-line jsx-a11y/no-redundant-roles -- role=\"list\" restores list semantics that ds:list-none strips in Safari/VoiceOver */}\n <ul\n role=\"list\"\n className=\"ds:m-0 ds:flex ds:list-none ds:items-stretch\"\n >\n {stats.map((stat, index) => (\n <li\n key={`${stat.label}-${index}`}\n className={[\n 'ds:flex ds:flex-1 ds:flex-col ds:items-center ds:gap-[var(--spacing-2xs)] ds:p-[var(--spacing-sm)] ds:text-center',\n index > 0\n ? 'ds:border-s ds:border-[color:var(--card-border)]'\n : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <span className=\"type-metric ds:[--type-metric-size:var(--font-size-lg)] ds:text-[color:var(--foreground)]\">\n {stat.value}\n </span>\n <span className=\"type-meta ds:text-[color:var(--muted-foreground)]\">\n {stat.label}\n </span>\n </li>\n ))}\n </ul>\n </Card>\n ) : null}\n </div>\n ) : null}\n\n {/* Sections */}\n {sections.map((section) => (\n <Section key={section.id} section={section} />\n ))}\n\n {/* Disclaimer */}\n <p className=\"ds:m-0 type-meta ds:text-[color:var(--muted-foreground)]\">\n {disclaimer ??\n t('entitySummary.disclaimer', {\n defaultValue:\n 'Does not replace clinical judgement · verify accuracy before clinical use · BETA',\n })}\n </p>\n </div>\n </section>\n );\n },\n);\n\nfunction Section({ section }: { section: EntitySummarySection }): ReactNode {\n const headingId = useId();\n\n // The risk-flag section composes the kit's warning `Alert` primitive rather\n // than re-painting the warning tokens by hand — same border, surface, alert\n // glyph, and `--warning-foreground` treatment as every other warning in the\n // app. `live=\"off\"`: the brief is static content, not a just-occurred event,\n // so the items read in normal flow instead of being announced assertively.\n // A per-section `icon` overrides Alert's default alert triangle.\n if (section.tone === 'attention') {\n // The shared `--shadow-card` lifts the warning callout to the same\n // elevation as the surrounding section cards, so the stack reads as one\n // set of raised panels rather than a flat warning band among cards.\n return (\n <Alert\n variant=\"warning\"\n live=\"off\"\n icon={section.icon}\n className=\"ds:shadow-[var(--shadow-card)]\"\n >\n <Alert.Title as=\"h3\">{section.heading}</Alert.Title>\n <ul className={ITEMS_CLASSES}>\n {section.items.map((item, index) => (\n <li key={index}>{item}</li>\n ))}\n </ul>\n </Alert>\n );\n }\n\n // Default sections are raised cards — the scannable \"panel per topic\" stack,\n // matching platform's Sintesi IA. The card owns its own padding (so we drive\n // it from a single content div rather than Card.Header/Body) and is named by\n // its heading for assistive tech.\n return (\n <Card variant=\"elevated\" aria-labelledby={headingId}>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]\">\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n {section.icon ? (\n <span aria-hidden=\"true\" className={MEDALLION_CLASSES}>\n {section.icon}\n </span>\n ) : null}\n <h3\n id={headingId}\n className=\"ds:m-0 type-eyebrow ds:text-[color:var(--foreground)]\"\n >\n {section.heading}\n </h3>\n </div>\n <ul className={`${ITEMS_CLASSES} ds:text-[color:var(--foreground)]`}>\n {section.items.map((item, index) => (\n <li key={index}>{item}</li>\n ))}\n </ul>\n </div>\n </Card>\n );\n}\n"],"names":["__iconNode","ContactRound","createLucideIcon","entitySummaryAgent","handle","MEDALLION_CLASSES","ITEMS_CLASSES","EntitySummary","forwardRef","id","title","entityName","entityHref","entityAvatarSrc","generatedAtIso","stats","sections","onRegenerate","regenerateLabel","onClose","disclaimer","locale","className","ariaLabel","rest","ref","t","useTranslation","headingId","useId","heading","sectionsRef","useRef","generatedAtRef","onRegenerateRef","onCloseRef","rootRef","useImperativeHandle","useMemo","s","_a","useAgentRegistration","generatedLine","jsxs","jsx","Clock","Timestamp","PanelHeader","Fragment","Button","RefreshCw","IconButton","X","Avatar","Link","Card","stat","index","section","Section","Alert","item"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,6BAA6B,KAAK,SAAQ,CAAE;AAAA,EAC1D,CAAC,QAAQ,EAAE,GAAG,UAAU,KAAK,QAAO,CAAE;AAAA,EACtC,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,KAAK,KAAK,UAAU;AAAA,EACxD,CAAC,QAAQ,EAAE,GAAG,KAAK,GAAG,KAAK,OAAO,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a,CACvB,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAUJ,gBAAAb,EAACW,KAAK,SAAQ,YAAW,mBAAiB3B,GACxC,UAAA,gBAAAe,EAAC,OAAA,EAAI,WAAU,2EACb,UAAA;AAAA,IAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,sDACZ,UAAA;AAAA,MAAAe,EAAQ,yBACN,QAAA,EAAK,eAAY,QAAO,WAAWrD,IACjC,UAAAqD,EAAQ,KAAA,CACX,IACE;AAAA,MACJ,gBAAAd;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAIhB;AAAA,UACJ,WAAU;AAAA,UAET,UAAA8B,EAAQ;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,GACF;AAAA,sBACC,MAAA,EAAG,WAAW,GAAGpD,CAAa,sCAC5B,UAAAoD,EAAQ,MAAM,IAAI,CAACG,GAAMJ,MACxB,gBAAAb,EAAC,QAAgB,UAAAiB,EAAA,GAARJ,CAAa,CACvB,EAAA,CACH;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;","x_google_ignoreList":[0]}
|
|
@@ -18,7 +18,7 @@ import { F as Tt } from "./file-text-5yv6r2ls.js";
|
|
|
18
18
|
import { F as Ft } from "./file-spreadsheet-DmwyfV4O.js";
|
|
19
19
|
import { F as At } from "./file-BuG1VMAy.js";
|
|
20
20
|
import { C as Dt } from "./chevron-right-I9AeSxH2.js";
|
|
21
|
-
import { D as Te } from "./data-table-
|
|
21
|
+
import { D as Te } from "./data-table-CrI3_bjH.js";
|
|
22
22
|
import { A as Rt, a as It } from "./actions-cell-renderer-DMittsR3.js";
|
|
23
23
|
import { B as $e } from "./badge-BAkd6_Pj.js";
|
|
24
24
|
import { D as Ue } from "./download-CfYKJO_j.js";
|
|
@@ -1744,4 +1744,4 @@ export {
|
|
|
1744
1744
|
hn as F,
|
|
1745
1745
|
Gt as f
|
|
1746
1746
|
};
|
|
1747
|
-
//# sourceMappingURL=file-manager-
|
|
1747
|
+
//# sourceMappingURL=file-manager-C6QQPQV5.js.map
|