@alfadocs/ui-kit-debug 1.12.5 → 1.13.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/{actions-cell-renderer-DnSLrgQD.js → actions-cell-renderer-ReurEy5i.js} +2 -2
- package/dist/_chunks/{actions-cell-renderer-DnSLrgQD.js.map → actions-cell-renderer-ReurEy5i.js.map} +1 -1
- package/dist/_chunks/{address-fields-CZP4Wncx.js → address-fields-CZ0pEdEI.js} +4 -4
- package/dist/_chunks/{address-fields-CZP4Wncx.js.map → address-fields-CZ0pEdEI.js.map} +1 -1
- package/dist/_chunks/{ai-prompt-input-DnbfEJnr.js → ai-prompt-input-CrHr-5H8.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-DnbfEJnr.js.map → ai-prompt-input-CrHr-5H8.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-BfhxWPO3.js → anamnesis-summary-rows-CRWO8x8g.js} +4 -4
- package/dist/_chunks/{anamnesis-summary-rows-BfhxWPO3.js.map → anamnesis-summary-rows-CRWO8x8g.js.map} +1 -1
- package/dist/_chunks/{audio-recorder-EWBCNIsd.js → audio-recorder-DXG6LTtO.js} +2 -2
- package/dist/_chunks/{audio-recorder-EWBCNIsd.js.map → audio-recorder-DXG6LTtO.js.map} +1 -1
- package/dist/_chunks/{autocomplete-BrONKN8l.js → autocomplete-MpBhz-fG.js} +86 -74
- package/dist/_chunks/{autocomplete-BrONKN8l.js.map → autocomplete-MpBhz-fG.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-7L6nzB29.js → balance-badge-cell--iQ_gtmi.js} +4 -4
- package/dist/_chunks/{balance-badge-cell-7L6nzB29.js.map → balance-badge-cell--iQ_gtmi.js.map} +1 -1
- package/dist/_chunks/{bishop-score-Cnu0xs-z.js → bishop-score-CJUVBfAu.js} +2 -2
- package/dist/_chunks/{bishop-score-Cnu0xs-z.js.map → bishop-score-CJUVBfAu.js.map} +1 -1
- package/dist/_chunks/{booking-CBHKdsZl.js → booking-DQbo6mQF.js} +609 -591
- package/dist/_chunks/booking-DQbo6mQF.js.map +1 -0
- package/dist/_chunks/{care-plan-card-aDN4oem9.js → care-plan-card-D-FMfDKH.js} +2 -2
- package/dist/_chunks/{care-plan-card-aDN4oem9.js.map → care-plan-card-D-FMfDKH.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-BEhANdBE.js → care-plan-entry-card-Bvw_9T-d.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-BEhANdBE.js.map → care-plan-entry-card-Bvw_9T-d.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-CkpPyQqG.js → care-plan-header-B5CBE0zu.js} +2 -2
- package/dist/_chunks/{care-plan-header-CkpPyQqG.js.map → care-plan-header-B5CBE0zu.js.map} +1 -1
- package/dist/_chunks/{city-input-towzBenY.js → city-input-DaQc-Hbj.js} +2 -2
- package/dist/_chunks/{city-input-towzBenY.js.map → city-input-DaQc-Hbj.js.map} +1 -1
- package/dist/_chunks/{combobox-DiMLItyu.js → combobox-D7_NLE2Z.js} +89 -81
- package/dist/_chunks/{combobox-DiMLItyu.js.map → combobox-D7_NLE2Z.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-BMIBr5s9.js → contact-profile-card-BZqi8Hck.js} +38 -36
- package/dist/_chunks/{contact-profile-card-BMIBr5s9.js.map → contact-profile-card-BZqi8Hck.js.map} +1 -1
- package/dist/_chunks/{country-select-UEF9BEeQ.js → country-select-DzbPFktV.js} +2 -2
- package/dist/_chunks/{country-select-UEF9BEeQ.js.map → country-select-DzbPFktV.js.map} +1 -1
- package/dist/_chunks/{document-preview-oyx9RhCo.js → document-preview-CDb-n_W7.js} +2 -2
- package/dist/_chunks/{document-preview-oyx9RhCo.js.map → document-preview-CDb-n_W7.js.map} +1 -1
- package/dist/_chunks/{face-scheme-CZaKm6fG.js → face-scheme-DA2vjqaM.js} +2 -2
- package/dist/_chunks/{face-scheme-CZaKm6fG.js.map → face-scheme-DA2vjqaM.js.map} +1 -1
- package/dist/_chunks/{file-manager-C0y7HBAN.js → file-manager-UsD8e_AB.js} +2 -2
- package/dist/_chunks/{file-manager-C0y7HBAN.js.map → file-manager-UsD8e_AB.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-CxZelpu2.js → gestational-age-calculator-CiOQjzgx.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-CxZelpu2.js.map → gestational-age-calculator-CiOQjzgx.js.map} +1 -1
- package/dist/_chunks/key-value-pair-BIBdZBLg.js +188 -0
- package/dist/_chunks/key-value-pair-BIBdZBLg.js.map +1 -0
- package/dist/_chunks/{link-cell-renderer-CenJx-_7.js → link-cell-renderer-CIASXsVM.js} +4 -4
- package/dist/_chunks/{link-cell-renderer-CenJx-_7.js.map → link-cell-renderer-CIASXsVM.js.map} +1 -1
- package/dist/_chunks/{multi-select-DqL4o0qV.js → multi-select-DYOvx2SJ.js} +56 -48
- package/dist/_chunks/{multi-select-DqL4o0qV.js.map → multi-select-DYOvx2SJ.js.map} +1 -1
- package/dist/_chunks/{muscle-scheme-yfzP_xoJ.js → muscle-scheme-BSJsI4-I.js} +2 -2
- package/dist/_chunks/{muscle-scheme-yfzP_xoJ.js.map → muscle-scheme-BSJsI4-I.js.map} +1 -1
- package/dist/_chunks/{optical-prescription-Dj3Eh5Ok.js → optical-prescription-BvwuqTpl.js} +2 -2
- package/dist/_chunks/{optical-prescription-Dj3Eh5Ok.js.map → optical-prescription-BvwuqTpl.js.map} +1 -1
- package/dist/_chunks/{patient-details-xrqe13az.js → patient-details-BQaUzPqp.js} +5 -5
- package/dist/_chunks/{patient-details-xrqe13az.js.map → patient-details-BQaUzPqp.js.map} +1 -1
- package/dist/_chunks/{patient-search-D5ufYoRc.js → patient-search-HeEUB-_X.js} +2 -2
- package/dist/_chunks/{patient-search-D5ufYoRc.js.map → patient-search-HeEUB-_X.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-CBfuDvJ5.js → patient-summary-card-CvDxhbBR.js} +2 -2
- package/dist/_chunks/{patient-summary-card-CBfuDvJ5.js.map → patient-summary-card-CvDxhbBR.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-YVCcCZ25.js → payment-request-card-lmKLwsDs.js} +2 -2
- package/dist/_chunks/{payment-request-card-YVCcCZ25.js.map → payment-request-card-lmKLwsDs.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-BatZEFar.js → periodontal-chart-B9fphroR.js} +2 -2
- package/dist/_chunks/{periodontal-chart-BatZEFar.js.map → periodontal-chart-B9fphroR.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-card-BBpY_rBc.js → periodontal-chart-card-qEZPXj83.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-BBpY_rBc.js.map → periodontal-chart-card-qEZPXj83.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-DtToyMyc.js → pregnancy-dating-D2wchD11.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-DtToyMyc.js.map → pregnancy-dating-D2wchD11.js.map} +1 -1
- package/dist/_chunks/{province-select-BDywtmL-.js → province-select-BBc7s7vR.js} +2 -2
- package/dist/_chunks/{province-select-BDywtmL-.js.map → province-select-BBc7s7vR.js.map} +1 -1
- package/dist/_chunks/{select-BW5ecXlX.js → select-Bi8zril7.js} +165 -136
- package/dist/_chunks/select-Bi8zril7.js.map +1 -0
- package/dist/_chunks/{signature-request-DVDTKLjM.js → signature-request-CUe903hj.js} +2 -2
- package/dist/_chunks/{signature-request-DVDTKLjM.js.map → signature-request-CUe903hj.js.map} +1 -1
- package/dist/_chunks/{tabs-CBb2AidH.js → tabs-DqKtTIjZ.js} +2 -2
- package/dist/_chunks/{tabs-CBb2AidH.js.map → tabs-DqKtTIjZ.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-Do5SFp-j.js → tasks-panel-DPCNaRko.js} +2 -2
- package/dist/_chunks/{tasks-panel-Do5SFp-j.js.map → tasks-panel-DPCNaRko.js.map} +1 -1
- package/dist/_chunks/{tooth-scheme-WdyVymQ1.js → tooth-scheme-2IsmbE6w.js} +2 -2
- package/dist/_chunks/{tooth-scheme-WdyVymQ1.js.map → tooth-scheme-2IsmbE6w.js.map} +1 -1
- package/dist/_chunks/{unit-converter-BPumXMA6.js → unit-converter-C6jMjqL9.js} +2 -2
- package/dist/_chunks/{unit-converter-BPumXMA6.js.map → unit-converter-C6jMjqL9.js.map} +1 -1
- package/dist/_chunks/{workflow-map-DE_ribRM.js → workflow-map-wcw3t6g4.js} +2 -2
- package/dist/_chunks/{workflow-map-DE_ribRM.js.map → workflow-map-wcw3t6g4.js.map} +1 -1
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/option.d.ts +1 -0
- package/dist/components/_shared/option.d.ts.map +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/city-input/index.js +1 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/contact-profile-card/contact-profile-card.d.ts.map +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/key-value-pair/key-value-pair.d.ts +16 -0
- package/dist/components/key-value-pair/key-value-pair.d.ts.map +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/multi-select/multi-select.d.ts.map +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/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/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/province-select/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts +24 -0
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/index.js +40 -40
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/booking-CBHKdsZl.js.map +0 -1
- package/dist/_chunks/key-value-pair-BubG4fUa.js +0 -144
- package/dist/_chunks/key-value-pair-BubG4fUa.js.map +0 -1
- package/dist/_chunks/select-BW5ecXlX.js.map +0 -1
|
@@ -7,7 +7,7 @@ import { R as d } from "./radio-TWf9Q-mp.js";
|
|
|
7
7
|
import { R as S } from "./radio-group-rXDJADzW.js";
|
|
8
8
|
import { F as k } from "./form-field-CahJzTxp.js";
|
|
9
9
|
import { D as _ } from "./date-picker-CepI_oI2.js";
|
|
10
|
-
import { S as me } from "./select-
|
|
10
|
+
import { S as me } from "./select-Bi8zril7.js";
|
|
11
11
|
import { S as ge } from "./switch-OILsBLWo.js";
|
|
12
12
|
import { C as E } from "./card-DPmk26CL.js";
|
|
13
13
|
import { B as G } from "./badge-sTusUqZD.js";
|
|
@@ -485,4 +485,4 @@ Re.displayName = "GestationalAgeCalculator";
|
|
|
485
485
|
export {
|
|
486
486
|
Re as G
|
|
487
487
|
};
|
|
488
|
-
//# sourceMappingURL=gestational-age-calculator-
|
|
488
|
+
//# sourceMappingURL=gestational-age-calculator-CiOQjzgx.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gestational-age-calculator-CxZelpu2.js","sources":["../../src/components/gestational-age-calculator/gestational-age-calculator.agent.ts","../../src/components/gestational-age-calculator/gestational-age-calculator.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — GestationalAgeCalculator. */\n/* */\n/* Clinical calculator: a known LMP or due date → current gestational */\n/* age, trimester and milestone dates (with an optional antenatal exam */\n/* schedule). The agent surface is the dating inputs plus the computed */\n/* gestational age / trimester / due date; the handle is the curated */\n/* `GestationalAgeCalculatorHandle` (the public `ref` stays the root */\n/* <div>, exactly as `slider.tsx` and `bmi-calculator.tsx` keep theirs). */\n/* */\n/* Dates cross the boundary as local-time `yyyy-MM-dd` strings, never */\n/* `Date` objects, so nothing shifts a day under JSON/UTC serialisation. */\n/* */\n/* DEPRECATED surface: this component is superseded by PregnancyDating, */\n/* which unifies dating + gestational age. Prefer the `pregnancy-dating` */\n/* adapter for new work — every action here is marked deprecated. */\n/* */\n/* PHI (§7): never exposes patient identity — the slots return the */\n/* operator's own structural dating inputs and the dates derived from */\n/* them. See `src/docs/26-agent-readiness.mdx`. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { GestationalAgeCalculatorHandle } from './gestational-age-calculator';\n\nconst DEPRECATED = 'Superseded by the `pregnancy-dating` adapter.';\n\n/** Shared JSON Schema fragment for a local calendar date. */\nconst isoDate = {\n type: 'string',\n pattern: '^\\\\d{4}-\\\\d{2}-\\\\d{2}$',\n} as const;\n\nexport const gestationalAgeCalculatorAgent: AgentAdapter<GestationalAgeCalculatorHandle> =\n {\n id: 'gestational-age-calculator',\n // set_value → the three `set_*` actions + the `inputs` state slot.\n capabilities: ['set_value'],\n state: {\n inputs: {\n type: \"{ method: 'lmp' | 'edd', referenceDate: string | null, asOfDate: string }\",\n descriptionKey: 'ui.agent.gestationalAgeCalculator.state.inputs',\n description:\n 'The dating inputs as entered — whether the reference date is a last period or a known due date, that date, and the evaluation date. Dates are `yyyy-MM-dd`. Read this to see which method a reference date will be interpreted under.',\n read: (handle) => handle.getInputs(),\n },\n result: {\n type: '{ gestationalAge: { weeks: number, days: number, totalDays: number } | null, trimester: string, dueDate: string } | null',\n descriptionKey: 'ui.agent.gestationalAgeCalculator.state.result',\n description:\n 'Computed gestational age in completed weeks + days as of the evaluation date, the trimester band (preconception / first / second / third / postterm), and the estimated delivery date. Null until a reference date is set.',\n read: (handle) => handle.getResult(),\n },\n },\n actions: {\n set_method: {\n // Drives the same local input state a user picks; nothing is persisted\n // to a record, and the choice is reversible in the same UI.\n safety: 'write',\n argsType: \"{ method: 'lmp' | 'edd' }\",\n argsSchema: {\n type: 'object',\n properties: {\n method: {\n enum: ['lmp', 'edd'],\n description:\n 'Whether the reference date is the last menstrual period or a known estimated delivery date.',\n },\n },\n required: ['method'],\n additionalProperties: false,\n },\n idempotent: true,\n deprecated: DEPRECATED,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the method was applied.',\n },\n errors: ['Returns false for a method other than `lmp` or `edd`.'],\n descriptionKey: 'ui.agent.gestationalAgeCalculator.actions.setMethod',\n description:\n 'Choose how the reference date is read. The date is kept and re-interpreted under the new method, so set the method first — an EDD may be in the future, an LMP may not.',\n invoke: (handle, args: { method: 'lmp' | 'edd' }) =>\n handle.setMethod(args.method),\n },\n set_reference_date: {\n safety: 'write',\n argsType: '{ date: string | null }',\n argsSchema: {\n type: 'object',\n properties: {\n date: {\n oneOf: [\n {\n ...isoDate,\n description: 'Local calendar date, `yyyy-MM-dd`.',\n },\n { type: 'null' },\n ],\n description:\n 'The last period (not in the future) or the known due date, depending on the active method — or null to clear it.',\n },\n },\n required: ['date'],\n additionalProperties: false,\n },\n idempotent: true,\n deprecated: DEPRECATED,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the date was applied.',\n },\n errors: [\n 'Returns false for an unparseable date, or for a future date under the `lmp` method — the on-screen DatePicker caps an LMP at today.',\n ],\n examples: [\n {\n args: { date: '2026-01-12' },\n note: 'Under the default LMP method, a last period starting 12 January.',\n },\n ],\n descriptionKey:\n 'ui.agent.gestationalAgeCalculator.actions.setReferenceDate',\n description:\n 'Set the dating anchor. This is the only required input — the result stays null without it.',\n invoke: (handle, args: { date: string | null }) =>\n handle.setReferenceDate(args.date),\n },\n set_as_of_date: {\n safety: 'write',\n argsType: '{ date: string }',\n argsSchema: {\n type: 'object',\n properties: {\n date: {\n ...isoDate,\n description:\n 'Date to evaluate gestational age and trimester against, `yyyy-MM-dd`. May be in the future to project forward.',\n },\n },\n required: ['date'],\n additionalProperties: false,\n },\n idempotent: true,\n deprecated: DEPRECATED,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the date was applied.',\n },\n errors: ['Returns false for an unparseable date.'],\n examples: [\n {\n args: { date: '2026-09-15' },\n note: 'Project gestational age forward to an upcoming appointment.',\n },\n ],\n descriptionKey: 'ui.agent.gestationalAgeCalculator.actions.setAsOfDate',\n description:\n 'Set the date gestational age, trimester and the antenatal schedule are evaluated against. Defaults to today; the estimated delivery date itself does not depend on it.',\n invoke: (handle, args: { date: string }) =>\n handle.setAsOfDate(args.date),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'gestational-age-calculator',\n description:\n 'Marks the GestationalAgeCalculator (current gestational age, trimester and milestones from LMP or due date).',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Also the registry key — without an `id` the instance does not register and the handle-driven actions/state are unreachable.',\n },\n },\n };\n","/* ------------------------------------------------------------------ */\n/* GestationalAgeCalculator — current gestational age, trimester and */\n/* milestone dates, from either a known LMP or a known due date. */\n/* */\n/* Reuses the shared `gestation` maths from due-date-calculator: GA day */\n/* 0 is the LMP; from an EDD we back out LMP = EDD − 280 days. */\n/* ------------------------------------------------------------------ */\n\nimport { forwardRef, useEffect, useMemo, useRef, useState } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { format, parseISO, subDays, isAfter } from 'date-fns';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { gestationalAgeCalculatorAgent } from './gestational-age-calculator.agent';\nimport { RadioGroup, Radio } from '../radio-group';\nimport { FormField } from '../form-field';\nimport { DatePicker } from '../date-picker';\nimport { Select } from '../select';\nimport { Switch } from '../switch';\nimport { Card } from '../card';\nimport { Badge } from '../badge';\nimport {\n InsertButton,\n type InsertPayload,\n type InsertVariant,\n type InsertMode,\n} from '../_shared/insert-result';\nimport {\n type Trimester,\n type GestationalAge,\n type Plurality,\n type Chorionicity,\n computeDueDate,\n gestationalMilestones,\n GESTATION_DAYS,\n TRIMESTER_BADGE_VARIANT,\n trimesterHighlightToken,\n} from '../_shared/obstetrics';\nimport {\n computeAntenatalSchedule,\n type AntenatalScheduleOptions,\n type GdmRisk,\n} from '../_shared/antenatal-schedule';\nimport {\n AntenatalScheduleTimeline,\n buildScheduleInsertFields,\n} from '../_shared/antenatal-schedule-timeline';\n\nconst rootVariants = cva('ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]', {\n variants: {\n width: { full: 'ds:w-full', auto: 'ds:inline-flex' },\n },\n defaultVariants: { width: 'full' },\n});\n\n/** Whether the entered date is the last period (`lmp`) or the due date (`edd`). */\nexport type GestationalAgeMethod = 'lmp' | 'edd';\n\nexport interface GestationalAgeResult {\n gestationalAge: GestationalAge | null;\n trimester: Trimester;\n dueDate: Date;\n}\n\n/* ------------------------------------------------------------------ */\n/* Agent boundary */\n/* */\n/* Dates cross the agent boundary as local-time `yyyy-MM-dd` strings, */\n/* never `Date` objects — a Date JSON-serialises to UTC and silently */\n/* shifts the day for anyone east or west of Greenwich. */\n/* ------------------------------------------------------------------ */\n\nconst toIsoDate = (d: Date): string => format(d, 'yyyy-MM-dd');\n\nconst fromIsoDate = (iso: string): Date | null => {\n const d = parseISO(iso);\n return Number.isNaN(d.getTime()) ? null : d;\n};\n\n/** The dating inputs as entered. */\nexport interface GestationalAgeInputsSnapshot {\n /** Whether the reference date is a last period or a due date. */\n method: GestationalAgeMethod;\n /** The reference date (`yyyy-MM-dd`), or null when unset. */\n referenceDate: string | null;\n /** The date gestational age and trimester are evaluated against. */\n asOfDate: string;\n}\n\n/** `GestationalAgeResult` projected onto the agent boundary — ISO dates. */\nexport interface GestationalAgeSnapshot {\n /** Gestational age as of the evaluation date; null before conception. */\n gestationalAge: { weeks: number; days: number; totalDays: number } | null;\n /** Trimester band as of the evaluation date. */\n trimester: Trimester;\n /** Estimated date of delivery, `yyyy-MM-dd`. */\n dueDate: string;\n}\n\n/**\n * Curated imperative handle for agent / external automation. Reads the dating\n * inputs and the computed gestational age, and drives the inputs the way a\n * user would. Never exposes patient identity — only structural dates and\n * numbers. Consumed by `gestational-age-calculator.agent.ts`; the public `ref`\n * stays the root DOM element.\n */\nexport interface GestationalAgeCalculatorHandle {\n /** The dating inputs as entered. */\n getInputs: () => GestationalAgeInputsSnapshot;\n /** Computed gestational age, trimester and due date, or null until a reference date is set. */\n getResult: () => GestationalAgeSnapshot | null;\n /** Switch between dating from a last period and dating from a known due date. */\n setMethod: (method: GestationalAgeMethod) => boolean;\n /** Set the reference date (`yyyy-MM-dd`); a last period may not be in the future. */\n setReferenceDate: (isoDate: string | null) => boolean;\n /** Set the date gestational age and trimester are evaluated against. */\n setAsOfDate: (isoDate: string) => boolean;\n}\n\nexport interface GestationalAgeCalculatorProps extends VariantProps<\n typeof rootVariants\n> {\n /** Whether the input date is the last period (`lmp`) or the due date (`edd`). */\n defaultMethod?: GestationalAgeMethod;\n /** Pre-fill the reference date (e.g. a known LMP from the patient record). */\n defaultReferenceDate?: Date;\n /** Fires whenever a result can be computed (and `null` when it can't). */\n onResultChange?: (result: GestationalAgeResult | null) => void;\n /** When provided, shows the result-action buttons that emit / copy the result. */\n onInsert?: (payload: InsertPayload) => void;\n /**\n * Which verb the result button performs. Defaults to `'insert'`.\n * Use `'copy'` in an app-shell surface (no editor to insert into) — the\n * button writes the result to the clipboard as a multi-format `ClipboardItem`.\n */\n insertVariant?: InsertVariant;\n /** `copy` variant only — fired after a successful clipboard write. */\n onCopy?: (mode: InsertMode) => void;\n /** `copy` variant only — fired if the clipboard write can't proceed. */\n onError?: (error: unknown) => void;\n /**\n * Brand wordmark printed in the inserted/copied result-card footer.\n * Omitted → no brand line (and no footer hairline); a string → that custom\n * brand; `false` → no brand line. Brand is opt-in.\n */\n insertBrand?: string | false;\n /**\n * Append the antenatal exam schedule (the time-sensitive screening windows)\n * below the result, dated from the computed gestational start, and reveal the\n * plurality / chorionicity inputs that drive it.\n */\n showSchedule?: boolean;\n /** `showSchedule` only — initial number of babies. Defaults to `'singleton'`. */\n defaultPlurality?: Plurality;\n /** `showSchedule` only — initial chorionicity for multiples. Defaults to `'unknown'`. */\n defaultChorionicity?: Chorionicity;\n /** `showSchedule` only — initial Rh-negative state (surfaces anti-D). */\n defaultRhNegative?: boolean;\n /** `showSchedule` only — initial gestational-diabetes risk tier (surfaces OGTT). */\n defaultGdmRisk?: GdmRisk;\n /**\n * Passthrough options for the appended schedule (national `schedule`,\n * `includeOnIndication`, `birthGuideline`). `today`, `plurality`,\n * `chorionicity`, `rhNegative` and `gdmRisk` come from the component's own\n * inputs. Ignored unless `showSchedule` is set.\n */\n scheduleOptions?: Omit<\n AntenatalScheduleOptions,\n 'today' | 'plurality' | 'chorionicity' | 'rhNegative' | 'gdmRisk'\n >;\n /** Opaque instance id, emitted as `data-component-id`. */\n id?: string;\n /** Extra class names on the wrapper. */\n className?: string;\n}\n\n/**\n * @deprecated Superseded by `PregnancyDating`, which unifies the due-date and\n * gestational-age calculators (any anchor → both EDD and current GA) and adds a\n * manual ±days dating adjustment. This component will be removed in a future\n * release; migrate to `PregnancyDating` (`defaultMethod=\"edd\"` for the\n * date-back-from-EDD flow).\n */\nexport const GestationalAgeCalculator = forwardRef<\n HTMLDivElement,\n GestationalAgeCalculatorProps\n>(\n (\n {\n defaultMethod = 'lmp',\n defaultReferenceDate,\n onResultChange,\n onInsert,\n insertVariant = 'insert',\n onCopy,\n onError,\n insertBrand,\n showSchedule = false,\n defaultPlurality = 'singleton',\n defaultChorionicity = 'unknown',\n defaultRhNegative = false,\n defaultGdmRisk,\n scheduleOptions,\n id,\n width,\n className,\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n\n const [method, setMethod] = useState<GestationalAgeMethod>(defaultMethod);\n const [refDate, setRefDate] = useState<Date | undefined>(\n defaultReferenceDate,\n );\n // The date the result is evaluated against (\"as of\"); defaults to today but\n // can be a future appointment date to project the GA/schedule forward.\n const [asOfDate, setAsOfDate] = useState<Date>(() => new Date());\n // Real today — caps the dating-anchor input (an LMP can't be in the future).\n const today = useMemo(() => new Date(), []);\n const [plurality, setPlurality] = useState<Plurality>(defaultPlurality);\n const [chorionicity, setChorionicity] =\n useState<Chorionicity>(defaultChorionicity);\n const [rhNegative, setRhNegative] = useState<boolean>(defaultRhNegative);\n const [gdmRisk, setGdmRisk] = useState<GdmRisk | 'none'>(\n defaultGdmRisk ?? 'none',\n );\n\n const data = useMemo(() => {\n if (!refDate) return null;\n // Normalise to an LMP, then reuse the shared gestation maths.\n const lmp = method === 'lmp' ? refDate : subDays(refDate, GESTATION_DAYS);\n const r = computeDueDate({ method: 'lmp', date: lmp }, asOfDate);\n return {\n result: {\n gestationalAge: r.gestationalAge,\n trimester: r.trimester,\n dueDate: r.dueDate,\n } satisfies GestationalAgeResult,\n milestones: gestationalMilestones(r.gestationalStart),\n gestationalStart: r.gestationalStart,\n };\n }, [method, refDate, asOfDate]);\n\n const schedule = useMemo(() => {\n if (!showSchedule || !data) return null;\n return computeAntenatalSchedule(data.gestationalStart, {\n ...scheduleOptions,\n today: asOfDate,\n plurality,\n chorionicity,\n rhNegative,\n gdmRisk: gdmRisk === 'none' ? undefined : gdmRisk,\n });\n }, [\n showSchedule,\n data,\n asOfDate,\n scheduleOptions,\n plurality,\n chorionicity,\n rhNegative,\n gdmRisk,\n ]);\n\n const chorionicityOptions = useMemo(\n () =>\n (\n [\n 'unknown',\n 'dichorionic-diamniotic',\n 'monochorionic-diamniotic',\n 'monochorionic-monoamniotic',\n ] as const\n ).map((c) => ({\n value: c,\n label: t(`antenatalSchedule.chorionicity.${c}`),\n })),\n [t],\n );\n\n const dateFormatter = useMemo(\n () => new Intl.DateTimeFormat(i18n.language, { dateStyle: 'medium' }),\n [i18n.language],\n );\n\n useEffect(() => {\n onResultChange?.(data?.result ?? null);\n }, [data, onResultChange]);\n\n /* ── Agent handle ────────────────────────────────────────────────── */\n const liveRef = useRef({ method, refDate, asOfDate, data });\n liveRef.current = { method, refDate, asOfDate, data };\n\n const agentHandle = useMemo<GestationalAgeCalculatorHandle>(\n () => ({\n getInputs: () => {\n const live = liveRef.current;\n return {\n method: live.method,\n referenceDate: live.refDate ? toIsoDate(live.refDate) : null,\n asOfDate: toIsoDate(live.asOfDate),\n };\n },\n getResult: () => {\n const r = liveRef.current.data?.result;\n if (!r) return null;\n return {\n gestationalAge: r.gestationalAge ? { ...r.gestationalAge } : null,\n trimester: r.trimester,\n dueDate: toIsoDate(r.dueDate),\n };\n },\n setMethod: (next) => {\n if (next !== 'lmp' && next !== 'edd') return false;\n setMethod(next);\n return true;\n },\n setReferenceDate: (isoDate) => {\n if (isoDate === null) {\n setRefDate(undefined);\n return true;\n }\n const parsed = fromIsoDate(isoDate);\n if (!parsed) return false;\n // The DatePicker caps an LMP at today; a known EDD is in the future.\n if (liveRef.current.method === 'lmp' && isAfter(parsed, new Date())) {\n return false;\n }\n setRefDate(parsed);\n return true;\n },\n setAsOfDate: (isoDate) => {\n const parsed = fromIsoDate(isoDate);\n if (!parsed) return false;\n setAsOfDate(parsed);\n return true;\n },\n }),\n [],\n );\n useAgentRegistration(gestationalAgeCalculatorAgent, agentHandle, id);\n\n const gaText = (ga: GestationalAge | null): string =>\n ga\n ? t('gestationalAgeCalculator.gestation', {\n weeks: ga.weeks,\n days: ga.days,\n })\n : '—';\n\n return (\n <div\n ref={ref}\n data-component=\"gestational-age-calculator\"\n data-component-id={id}\n className={rootVariants({ width, className })}\n >\n <RadioGroup\n label={t('gestationalAgeCalculator.method.label')}\n variant=\"horizontal\"\n value={method}\n onValueChange={(next) => setMethod(next as GestationalAgeMethod)}\n >\n <Radio label={t('gestationalAgeCalculator.method.lmp')} value=\"lmp\" />\n <Radio label={t('gestationalAgeCalculator.method.edd')} value=\"edd\" />\n </RadioGroup>\n\n <FormField\n label={t(\n method === 'lmp'\n ? 'gestationalAgeCalculator.lmpDate'\n : 'gestationalAgeCalculator.eddDate',\n )}\n >\n <DatePicker\n value={refDate}\n onChange={setRefDate}\n maxDate={method === 'lmp' ? today : undefined}\n />\n </FormField>\n\n <FormField\n label={t('gestationalAgeCalculator.asOfDate')}\n description={t('gestationalAgeCalculator.asOfDateHint')}\n >\n <DatePicker value={asOfDate} onChange={(d) => d && setAsOfDate(d)} />\n </FormField>\n\n {showSchedule ? (\n <>\n <RadioGroup\n label={t('antenatalSchedule.plurality.label')}\n variant=\"horizontal\"\n value={plurality}\n onValueChange={(next) => setPlurality(next as Plurality)}\n >\n <Radio\n label={t('antenatalSchedule.plurality.singleton')}\n value=\"singleton\"\n />\n <Radio\n label={t('antenatalSchedule.plurality.twin')}\n value=\"twin\"\n />\n <Radio\n label={t('antenatalSchedule.plurality.triplet')}\n value=\"triplet\"\n />\n </RadioGroup>\n\n {plurality !== 'singleton' ? (\n <FormField label={t('antenatalSchedule.chorionicity.label')}>\n <Select\n options={chorionicityOptions}\n value={chorionicity}\n onValueChange={(next) =>\n setChorionicity(next as Chorionicity)\n }\n />\n </FormField>\n ) : null}\n\n <Switch\n label={t('antenatalSchedule.rhNegative')}\n checked={rhNegative}\n onCheckedChange={setRhNegative}\n />\n\n <RadioGroup\n label={t('antenatalSchedule.gdmRisk.label')}\n variant=\"horizontal\"\n value={gdmRisk}\n onValueChange={(next) => setGdmRisk(next as GdmRisk | 'none')}\n >\n <Radio label={t('antenatalSchedule.gdmRisk.none')} value=\"none\" />\n <Radio\n label={t('antenatalSchedule.gdmRisk.medium')}\n value=\"medium\"\n />\n <Radio label={t('antenatalSchedule.gdmRisk.high')} value=\"high\" />\n </RadioGroup>\n </>\n ) : null}\n\n <p className=\"ds:sr-only\" role=\"status\" aria-live=\"polite\">\n {data\n ? `${t('gestationalAgeCalculator.gestationLabel')}: ${gaText(\n data.result.gestationalAge,\n )}. ${t('gestationalAgeCalculator.trimesterLabel')}: ${t(\n `gestationalAgeCalculator.trimester.${data.result.trimester}`,\n )}.`\n : ''}\n </p>\n\n {data ? (\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n <dl className=\"ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2\">\n <div className=\"ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]\">\n <dt className=\"type-label ds:text-muted-foreground\">\n {t('gestationalAgeCalculator.trimesterLabel')}\n </dt>\n <dd>\n <Badge\n variant={TRIMESTER_BADGE_VARIANT[data.result.trimester]}\n size=\"lg\"\n >\n {t(\n `gestationalAgeCalculator.trimester.${data.result.trimester}`,\n )}\n </Badge>\n </dd>\n </div>\n <div className=\"ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-xs)] ds:text-end\">\n <dt className=\"type-label ds:text-muted-foreground\">\n {t('gestationalAgeCalculator.gestationLabel')}\n </dt>\n <dd className=\"type-metric ds:text-foreground\">\n {gaText(data.result.gestationalAge)}\n </dd>\n </div>\n </dl>\n\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <span className=\"type-label ds:text-muted-foreground\">\n {t('gestationalAgeCalculator.milestonesLabel')}\n </span>\n <ul className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n {data.milestones.map((m) => {\n const reached = isAfter(asOfDate, m.date);\n return (\n <li\n key={m.key}\n className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-md)]\"\n >\n <span className=\"type-body ds:text-foreground\">\n {t(`gestationalAgeCalculator.milestone.${m.key}`)}\n </span>\n <span className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <span className=\"type-body ds:text-muted-foreground\">\n {dateFormatter.format(m.date)}\n </span>\n {reached ? (\n <Badge variant=\"success\">\n {t('gestationalAgeCalculator.reached')}\n </Badge>\n ) : null}\n </span>\n </li>\n );\n })}\n </ul>\n </div>\n </Card.Body>\n </Card>\n ) : (\n <p className=\"type-body ds:text-muted-foreground\">\n {t('gestationalAgeCalculator.empty')}\n </p>\n )}\n\n {schedule ? <AntenatalScheduleTimeline events={schedule} /> : null}\n\n {/* One result-action group for the whole result — sits after both the\n gestational-age card and the schedule, and its payload carries the\n schedule rows when shown (no per-card buttons). */}\n {data && (insertVariant === 'copy' || onInsert) ? (\n <InsertButton\n onInsert={onInsert}\n variant={insertVariant}\n onCopy={onCopy}\n onError={onError}\n card={{\n title: t('insert.title.gestationalAge'),\n icon: 'baby',\n highlight: t(\n `gestationalAgeCalculator.trimester.${data.result.trimester}`,\n ),\n // Chip shares the trimester's semantic token so the inserted PNG\n // chip matches the on-screen trimester badge — with the\n // contrast-safe orange override for the `--warning` third trimester.\n highlightToken: trimesterHighlightToken(data.result.trimester),\n brand: insertBrand,\n fields: [\n {\n // Gestational age is an elapsed duration → clock glyph.\n icon: 'clock',\n label: t('gestationalAgeCalculator.gestationLabel'),\n value: gaText(data.result.gestationalAge),\n },\n {\n // Trimester is a clinical-stage classification → tag.\n icon: 'tag',\n label: t('gestationalAgeCalculator.trimesterLabel'),\n value: t(\n `gestationalAgeCalculator.trimester.${data.result.trimester}`,\n ),\n },\n // When the schedule is shown, the single Insert button carries\n // the exam windows too (no second button).\n ...(schedule\n ? buildScheduleInsertFields(schedule, t, (d) =>\n dateFormatter.format(d),\n )\n : []),\n ],\n }}\n />\n ) : null}\n </div>\n );\n },\n);\n\nGestationalAgeCalculator.displayName = 'GestationalAgeCalculator';\n"],"names":["DEPRECATED","isoDate","gestationalAgeCalculatorAgent","handle","args","rootVariants","cva","toIsoDate","d","format","fromIsoDate","iso","parseISO","GestationalAgeCalculator","forwardRef","defaultMethod","defaultReferenceDate","onResultChange","onInsert","insertVariant","onCopy","onError","insertBrand","showSchedule","defaultPlurality","defaultChorionicity","defaultRhNegative","defaultGdmRisk","scheduleOptions","id","width","className","ref","i18n","useTranslation","method","setMethod","useState","refDate","setRefDate","asOfDate","setAsOfDate","today","useMemo","plurality","setPlurality","chorionicity","setChorionicity","rhNegative","setRhNegative","gdmRisk","setGdmRisk","data","lmp","subDays","GESTATION_DAYS","r","computeDueDate","gestationalMilestones","schedule","computeAntenatalSchedule","chorionicityOptions","c","dateFormatter","useEffect","liveRef","useRef","agentHandle","live","_a","next","parsed","isAfter","useAgentRegistration","gaText","ga","jsxs","RadioGroup","jsx","Radio","FormField","DatePicker","Fragment","Select","Switch","Card","Badge","TRIMESTER_BADGE_VARIANT","m","reached","AntenatalScheduleTimeline","InsertButton","trimesterHighlightToken","buildScheduleInsertFields"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,MAAMA,IAAa,iDAGbC,IAAU;AAAA,EACd,MAAM;AAAA,EACN,SAAS;AACX,GAEaC,KACX;AAAA,EACE,IAAI;AAAA;AAAA,EAEJ,cAAc,CAAC,WAAW;AAAA,EAC1B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MA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AA;AAAA;AAAA,gBAK7D,gBAAgBwC,GAAwBxC,EAAK,OAAO,SAAS;AAAA,gBAC7D,OAAO9B;AAAA,gBACP,QAAQ;AAAA,kBACN;AAAA;AAAA,oBAEE,MAAM;AAAA,oBACN,OAAO,EAAE,yCAAyC;AAAA,oBAClD,OAAOoD,EAAOtB,EAAK,OAAO,cAAc;AAAA,kBAAA;AAAA,kBAE1C;AAAA;AAAA,oBAEE,MAAM;AAAA,oBACN,OAAO,EAAE,yCAAyC;AAAA,oBAClD,OAAO;AAAA,sBACL,sCAAsCA,EAAK,OAAO,SAAS;AAAA,oBAAA;AAAA,kBAC7D;AAAA;AAAA;AAAA,kBAIF,GAAIO,IACAkC;AAAA,oBAA0BlC;AAAA,oBAAU;AAAA,oBAAG,CAACnD,MACtCuD,EAAc,OAAOvD,CAAC;AAAA,kBAAA,IAExB,CAAA;AAAA,gBAAC;AAAA,cACP;AAAA,YACF;AAAA,UAAA,IAEA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGV;AACF;AAEAK,GAAyB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"gestational-age-calculator-CiOQjzgx.js","sources":["../../src/components/gestational-age-calculator/gestational-age-calculator.agent.ts","../../src/components/gestational-age-calculator/gestational-age-calculator.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — GestationalAgeCalculator. */\n/* */\n/* Clinical calculator: a known LMP or due date → current gestational */\n/* age, trimester and milestone dates (with an optional antenatal exam */\n/* schedule). The agent surface is the dating inputs plus the computed */\n/* gestational age / trimester / due date; the handle is the curated */\n/* `GestationalAgeCalculatorHandle` (the public `ref` stays the root */\n/* <div>, exactly as `slider.tsx` and `bmi-calculator.tsx` keep theirs). */\n/* */\n/* Dates cross the boundary as local-time `yyyy-MM-dd` strings, never */\n/* `Date` objects, so nothing shifts a day under JSON/UTC serialisation. */\n/* */\n/* DEPRECATED surface: this component is superseded by PregnancyDating, */\n/* which unifies dating + gestational age. Prefer the `pregnancy-dating` */\n/* adapter for new work — every action here is marked deprecated. */\n/* */\n/* PHI (§7): never exposes patient identity — the slots return the */\n/* operator's own structural dating inputs and the dates derived from */\n/* them. See `src/docs/26-agent-readiness.mdx`. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { GestationalAgeCalculatorHandle } from './gestational-age-calculator';\n\nconst DEPRECATED = 'Superseded by the `pregnancy-dating` adapter.';\n\n/** Shared JSON Schema fragment for a local calendar date. */\nconst isoDate = {\n type: 'string',\n pattern: '^\\\\d{4}-\\\\d{2}-\\\\d{2}$',\n} as const;\n\nexport const gestationalAgeCalculatorAgent: AgentAdapter<GestationalAgeCalculatorHandle> =\n {\n id: 'gestational-age-calculator',\n // set_value → the three `set_*` actions + the `inputs` state slot.\n capabilities: ['set_value'],\n state: {\n inputs: {\n type: \"{ method: 'lmp' | 'edd', referenceDate: string | null, asOfDate: string }\",\n descriptionKey: 'ui.agent.gestationalAgeCalculator.state.inputs',\n description:\n 'The dating inputs as entered — whether the reference date is a last period or a known due date, that date, and the evaluation date. Dates are `yyyy-MM-dd`. Read this to see which method a reference date will be interpreted under.',\n read: (handle) => handle.getInputs(),\n },\n result: {\n type: '{ gestationalAge: { weeks: number, days: number, totalDays: number } | null, trimester: string, dueDate: string } | null',\n descriptionKey: 'ui.agent.gestationalAgeCalculator.state.result',\n description:\n 'Computed gestational age in completed weeks + days as of the evaluation date, the trimester band (preconception / first / second / third / postterm), and the estimated delivery date. Null until a reference date is set.',\n read: (handle) => handle.getResult(),\n },\n },\n actions: {\n set_method: {\n // Drives the same local input state a user picks; nothing is persisted\n // to a record, and the choice is reversible in the same UI.\n safety: 'write',\n argsType: \"{ method: 'lmp' | 'edd' }\",\n argsSchema: {\n type: 'object',\n properties: {\n method: {\n enum: ['lmp', 'edd'],\n description:\n 'Whether the reference date is the last menstrual period or a known estimated delivery date.',\n },\n },\n required: ['method'],\n additionalProperties: false,\n },\n idempotent: true,\n deprecated: DEPRECATED,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the method was applied.',\n },\n errors: ['Returns false for a method other than `lmp` or `edd`.'],\n descriptionKey: 'ui.agent.gestationalAgeCalculator.actions.setMethod',\n description:\n 'Choose how the reference date is read. The date is kept and re-interpreted under the new method, so set the method first — an EDD may be in the future, an LMP may not.',\n invoke: (handle, args: { method: 'lmp' | 'edd' }) =>\n handle.setMethod(args.method),\n },\n set_reference_date: {\n safety: 'write',\n argsType: '{ date: string | null }',\n argsSchema: {\n type: 'object',\n properties: {\n date: {\n oneOf: [\n {\n ...isoDate,\n description: 'Local calendar date, `yyyy-MM-dd`.',\n },\n { type: 'null' },\n ],\n description:\n 'The last period (not in the future) or the known due date, depending on the active method — or null to clear it.',\n },\n },\n required: ['date'],\n additionalProperties: false,\n },\n idempotent: true,\n deprecated: DEPRECATED,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the date was applied.',\n },\n errors: [\n 'Returns false for an unparseable date, or for a future date under the `lmp` method — the on-screen DatePicker caps an LMP at today.',\n ],\n examples: [\n {\n args: { date: '2026-01-12' },\n note: 'Under the default LMP method, a last period starting 12 January.',\n },\n ],\n descriptionKey:\n 'ui.agent.gestationalAgeCalculator.actions.setReferenceDate',\n description:\n 'Set the dating anchor. This is the only required input — the result stays null without it.',\n invoke: (handle, args: { date: string | null }) =>\n handle.setReferenceDate(args.date),\n },\n set_as_of_date: {\n safety: 'write',\n argsType: '{ date: string }',\n argsSchema: {\n type: 'object',\n properties: {\n date: {\n ...isoDate,\n description:\n 'Date to evaluate gestational age and trimester against, `yyyy-MM-dd`. May be in the future to project forward.',\n },\n },\n required: ['date'],\n additionalProperties: false,\n },\n idempotent: true,\n deprecated: DEPRECATED,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the date was applied.',\n },\n errors: ['Returns false for an unparseable date.'],\n examples: [\n {\n args: { date: '2026-09-15' },\n note: 'Project gestational age forward to an upcoming appointment.',\n },\n ],\n descriptionKey: 'ui.agent.gestationalAgeCalculator.actions.setAsOfDate',\n description:\n 'Set the date gestational age, trimester and the antenatal schedule are evaluated against. Defaults to today; the estimated delivery date itself does not depend on it.',\n invoke: (handle, args: { date: string }) =>\n handle.setAsOfDate(args.date),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'gestational-age-calculator',\n description:\n 'Marks the GestationalAgeCalculator (current gestational age, trimester and milestones from LMP or due date).',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Also the registry key — without an `id` the instance does not register and the handle-driven actions/state are unreachable.',\n },\n },\n };\n","/* ------------------------------------------------------------------ */\n/* GestationalAgeCalculator — current gestational age, trimester and */\n/* milestone dates, from either a known LMP or a known due date. */\n/* */\n/* Reuses the shared `gestation` maths from due-date-calculator: GA day */\n/* 0 is the LMP; from an EDD we back out LMP = EDD − 280 days. */\n/* ------------------------------------------------------------------ */\n\nimport { forwardRef, useEffect, useMemo, useRef, useState } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { format, parseISO, subDays, isAfter } from 'date-fns';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { gestationalAgeCalculatorAgent } from './gestational-age-calculator.agent';\nimport { RadioGroup, Radio } from '../radio-group';\nimport { FormField } from '../form-field';\nimport { DatePicker } from '../date-picker';\nimport { Select } from '../select';\nimport { Switch } from '../switch';\nimport { Card } from '../card';\nimport { Badge } from '../badge';\nimport {\n InsertButton,\n type InsertPayload,\n type InsertVariant,\n type InsertMode,\n} from '../_shared/insert-result';\nimport {\n type Trimester,\n type GestationalAge,\n type Plurality,\n type Chorionicity,\n computeDueDate,\n gestationalMilestones,\n GESTATION_DAYS,\n TRIMESTER_BADGE_VARIANT,\n trimesterHighlightToken,\n} from '../_shared/obstetrics';\nimport {\n computeAntenatalSchedule,\n type AntenatalScheduleOptions,\n type GdmRisk,\n} from '../_shared/antenatal-schedule';\nimport {\n AntenatalScheduleTimeline,\n buildScheduleInsertFields,\n} from '../_shared/antenatal-schedule-timeline';\n\nconst rootVariants = cva('ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]', {\n variants: {\n width: { full: 'ds:w-full', auto: 'ds:inline-flex' },\n },\n defaultVariants: { width: 'full' },\n});\n\n/** Whether the entered date is the last period (`lmp`) or the due date (`edd`). */\nexport type GestationalAgeMethod = 'lmp' | 'edd';\n\nexport interface GestationalAgeResult {\n gestationalAge: GestationalAge | null;\n trimester: Trimester;\n dueDate: Date;\n}\n\n/* ------------------------------------------------------------------ */\n/* Agent boundary */\n/* */\n/* Dates cross the agent boundary as local-time `yyyy-MM-dd` strings, */\n/* never `Date` objects — a Date JSON-serialises to UTC and silently */\n/* shifts the day for anyone east or west of Greenwich. */\n/* ------------------------------------------------------------------ */\n\nconst toIsoDate = (d: Date): string => format(d, 'yyyy-MM-dd');\n\nconst fromIsoDate = (iso: string): Date | null => {\n const d = parseISO(iso);\n return Number.isNaN(d.getTime()) ? null : d;\n};\n\n/** The dating inputs as entered. */\nexport interface GestationalAgeInputsSnapshot {\n /** Whether the reference date is a last period or a due date. */\n method: GestationalAgeMethod;\n /** The reference date (`yyyy-MM-dd`), or null when unset. */\n referenceDate: string | null;\n /** The date gestational age and trimester are evaluated against. */\n asOfDate: string;\n}\n\n/** `GestationalAgeResult` projected onto the agent boundary — ISO dates. */\nexport interface GestationalAgeSnapshot {\n /** Gestational age as of the evaluation date; null before conception. */\n gestationalAge: { weeks: number; days: number; totalDays: number } | null;\n /** Trimester band as of the evaluation date. */\n trimester: Trimester;\n /** Estimated date of delivery, `yyyy-MM-dd`. */\n dueDate: string;\n}\n\n/**\n * Curated imperative handle for agent / external automation. Reads the dating\n * inputs and the computed gestational age, and drives the inputs the way a\n * user would. Never exposes patient identity — only structural dates and\n * numbers. Consumed by `gestational-age-calculator.agent.ts`; the public `ref`\n * stays the root DOM element.\n */\nexport interface GestationalAgeCalculatorHandle {\n /** The dating inputs as entered. */\n getInputs: () => GestationalAgeInputsSnapshot;\n /** Computed gestational age, trimester and due date, or null until a reference date is set. */\n getResult: () => GestationalAgeSnapshot | null;\n /** Switch between dating from a last period and dating from a known due date. */\n setMethod: (method: GestationalAgeMethod) => boolean;\n /** Set the reference date (`yyyy-MM-dd`); a last period may not be in the future. */\n setReferenceDate: (isoDate: string | null) => boolean;\n /** Set the date gestational age and trimester are evaluated against. */\n setAsOfDate: (isoDate: string) => boolean;\n}\n\nexport interface GestationalAgeCalculatorProps extends VariantProps<\n typeof rootVariants\n> {\n /** Whether the input date is the last period (`lmp`) or the due date (`edd`). */\n defaultMethod?: GestationalAgeMethod;\n /** Pre-fill the reference date (e.g. a known LMP from the patient record). */\n defaultReferenceDate?: Date;\n /** Fires whenever a result can be computed (and `null` when it can't). */\n onResultChange?: (result: GestationalAgeResult | null) => void;\n /** When provided, shows the result-action buttons that emit / copy the result. */\n onInsert?: (payload: InsertPayload) => void;\n /**\n * Which verb the result button performs. Defaults to `'insert'`.\n * Use `'copy'` in an app-shell surface (no editor to insert into) — the\n * button writes the result to the clipboard as a multi-format `ClipboardItem`.\n */\n insertVariant?: InsertVariant;\n /** `copy` variant only — fired after a successful clipboard write. */\n onCopy?: (mode: InsertMode) => void;\n /** `copy` variant only — fired if the clipboard write can't proceed. */\n onError?: (error: unknown) => void;\n /**\n * Brand wordmark printed in the inserted/copied result-card footer.\n * Omitted → no brand line (and no footer hairline); a string → that custom\n * brand; `false` → no brand line. Brand is opt-in.\n */\n insertBrand?: string | false;\n /**\n * Append the antenatal exam schedule (the time-sensitive screening windows)\n * below the result, dated from the computed gestational start, and reveal the\n * plurality / chorionicity inputs that drive it.\n */\n showSchedule?: boolean;\n /** `showSchedule` only — initial number of babies. Defaults to `'singleton'`. */\n defaultPlurality?: Plurality;\n /** `showSchedule` only — initial chorionicity for multiples. Defaults to `'unknown'`. */\n defaultChorionicity?: Chorionicity;\n /** `showSchedule` only — initial Rh-negative state (surfaces anti-D). */\n defaultRhNegative?: boolean;\n /** `showSchedule` only — initial gestational-diabetes risk tier (surfaces OGTT). */\n defaultGdmRisk?: GdmRisk;\n /**\n * Passthrough options for the appended schedule (national `schedule`,\n * `includeOnIndication`, `birthGuideline`). `today`, `plurality`,\n * `chorionicity`, `rhNegative` and `gdmRisk` come from the component's own\n * inputs. Ignored unless `showSchedule` is set.\n */\n scheduleOptions?: Omit<\n AntenatalScheduleOptions,\n 'today' | 'plurality' | 'chorionicity' | 'rhNegative' | 'gdmRisk'\n >;\n /** Opaque instance id, emitted as `data-component-id`. */\n id?: string;\n /** Extra class names on the wrapper. */\n className?: string;\n}\n\n/**\n * @deprecated Superseded by `PregnancyDating`, which unifies the due-date and\n * gestational-age calculators (any anchor → both EDD and current GA) and adds a\n * manual ±days dating adjustment. This component will be removed in a future\n * release; migrate to `PregnancyDating` (`defaultMethod=\"edd\"` for the\n * date-back-from-EDD flow).\n */\nexport const GestationalAgeCalculator = forwardRef<\n HTMLDivElement,\n GestationalAgeCalculatorProps\n>(\n (\n {\n defaultMethod = 'lmp',\n defaultReferenceDate,\n onResultChange,\n onInsert,\n insertVariant = 'insert',\n onCopy,\n onError,\n insertBrand,\n showSchedule = false,\n defaultPlurality = 'singleton',\n defaultChorionicity = 'unknown',\n defaultRhNegative = false,\n defaultGdmRisk,\n scheduleOptions,\n id,\n width,\n className,\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n\n const [method, setMethod] = useState<GestationalAgeMethod>(defaultMethod);\n const [refDate, setRefDate] = useState<Date | undefined>(\n defaultReferenceDate,\n );\n // The date the result is evaluated against (\"as of\"); defaults to today but\n // can be a future appointment date to project the GA/schedule forward.\n const [asOfDate, setAsOfDate] = useState<Date>(() => new Date());\n // Real today — caps the dating-anchor input (an LMP can't be in the future).\n const today = useMemo(() => new Date(), []);\n const [plurality, setPlurality] = useState<Plurality>(defaultPlurality);\n const [chorionicity, setChorionicity] =\n useState<Chorionicity>(defaultChorionicity);\n const [rhNegative, setRhNegative] = useState<boolean>(defaultRhNegative);\n const [gdmRisk, setGdmRisk] = useState<GdmRisk | 'none'>(\n defaultGdmRisk ?? 'none',\n );\n\n const data = useMemo(() => {\n if (!refDate) return null;\n // Normalise to an LMP, then reuse the shared gestation maths.\n const lmp = method === 'lmp' ? refDate : subDays(refDate, GESTATION_DAYS);\n const r = computeDueDate({ method: 'lmp', date: lmp }, asOfDate);\n return {\n result: {\n gestationalAge: r.gestationalAge,\n trimester: r.trimester,\n dueDate: r.dueDate,\n } satisfies GestationalAgeResult,\n milestones: gestationalMilestones(r.gestationalStart),\n gestationalStart: r.gestationalStart,\n };\n }, [method, refDate, asOfDate]);\n\n const schedule = useMemo(() => {\n if (!showSchedule || !data) return null;\n return computeAntenatalSchedule(data.gestationalStart, {\n ...scheduleOptions,\n today: asOfDate,\n plurality,\n chorionicity,\n rhNegative,\n gdmRisk: gdmRisk === 'none' ? undefined : gdmRisk,\n });\n }, [\n showSchedule,\n data,\n asOfDate,\n scheduleOptions,\n plurality,\n chorionicity,\n rhNegative,\n gdmRisk,\n ]);\n\n const chorionicityOptions = useMemo(\n () =>\n (\n [\n 'unknown',\n 'dichorionic-diamniotic',\n 'monochorionic-diamniotic',\n 'monochorionic-monoamniotic',\n ] as const\n ).map((c) => ({\n value: c,\n label: t(`antenatalSchedule.chorionicity.${c}`),\n })),\n [t],\n );\n\n const dateFormatter = useMemo(\n () => new Intl.DateTimeFormat(i18n.language, { dateStyle: 'medium' }),\n [i18n.language],\n );\n\n useEffect(() => {\n onResultChange?.(data?.result ?? null);\n }, [data, onResultChange]);\n\n /* ── Agent handle ────────────────────────────────────────────────── */\n const liveRef = useRef({ method, refDate, asOfDate, data });\n liveRef.current = { method, refDate, asOfDate, data };\n\n const agentHandle = useMemo<GestationalAgeCalculatorHandle>(\n () => ({\n getInputs: () => {\n const live = liveRef.current;\n return {\n method: live.method,\n referenceDate: live.refDate ? toIsoDate(live.refDate) : null,\n asOfDate: toIsoDate(live.asOfDate),\n };\n },\n getResult: () => {\n const r = liveRef.current.data?.result;\n if (!r) return null;\n return {\n gestationalAge: r.gestationalAge ? { ...r.gestationalAge } : null,\n trimester: r.trimester,\n dueDate: toIsoDate(r.dueDate),\n };\n },\n setMethod: (next) => {\n if (next !== 'lmp' && next !== 'edd') return false;\n setMethod(next);\n return true;\n },\n setReferenceDate: (isoDate) => {\n if (isoDate === null) {\n setRefDate(undefined);\n return true;\n }\n const parsed = fromIsoDate(isoDate);\n if (!parsed) return false;\n // The DatePicker caps an LMP at today; a known EDD is in the future.\n if (liveRef.current.method === 'lmp' && isAfter(parsed, new Date())) {\n return false;\n }\n setRefDate(parsed);\n return true;\n },\n setAsOfDate: (isoDate) => {\n const parsed = fromIsoDate(isoDate);\n if (!parsed) return false;\n setAsOfDate(parsed);\n return true;\n },\n }),\n [],\n );\n useAgentRegistration(gestationalAgeCalculatorAgent, agentHandle, id);\n\n const gaText = (ga: GestationalAge | null): string =>\n ga\n ? t('gestationalAgeCalculator.gestation', {\n weeks: ga.weeks,\n days: ga.days,\n })\n : '—';\n\n return (\n <div\n ref={ref}\n data-component=\"gestational-age-calculator\"\n data-component-id={id}\n className={rootVariants({ width, className })}\n >\n <RadioGroup\n label={t('gestationalAgeCalculator.method.label')}\n variant=\"horizontal\"\n value={method}\n onValueChange={(next) => setMethod(next as GestationalAgeMethod)}\n >\n <Radio label={t('gestationalAgeCalculator.method.lmp')} value=\"lmp\" />\n <Radio label={t('gestationalAgeCalculator.method.edd')} value=\"edd\" />\n </RadioGroup>\n\n <FormField\n label={t(\n method === 'lmp'\n ? 'gestationalAgeCalculator.lmpDate'\n : 'gestationalAgeCalculator.eddDate',\n )}\n >\n <DatePicker\n value={refDate}\n onChange={setRefDate}\n maxDate={method === 'lmp' ? today : undefined}\n />\n </FormField>\n\n <FormField\n label={t('gestationalAgeCalculator.asOfDate')}\n description={t('gestationalAgeCalculator.asOfDateHint')}\n >\n <DatePicker value={asOfDate} onChange={(d) => d && setAsOfDate(d)} />\n </FormField>\n\n {showSchedule ? (\n <>\n <RadioGroup\n label={t('antenatalSchedule.plurality.label')}\n variant=\"horizontal\"\n value={plurality}\n onValueChange={(next) => setPlurality(next as Plurality)}\n >\n <Radio\n label={t('antenatalSchedule.plurality.singleton')}\n value=\"singleton\"\n />\n <Radio\n label={t('antenatalSchedule.plurality.twin')}\n value=\"twin\"\n />\n <Radio\n label={t('antenatalSchedule.plurality.triplet')}\n value=\"triplet\"\n />\n </RadioGroup>\n\n {plurality !== 'singleton' ? (\n <FormField label={t('antenatalSchedule.chorionicity.label')}>\n <Select\n options={chorionicityOptions}\n value={chorionicity}\n onValueChange={(next) =>\n setChorionicity(next as Chorionicity)\n }\n />\n </FormField>\n ) : null}\n\n <Switch\n label={t('antenatalSchedule.rhNegative')}\n checked={rhNegative}\n onCheckedChange={setRhNegative}\n />\n\n <RadioGroup\n label={t('antenatalSchedule.gdmRisk.label')}\n variant=\"horizontal\"\n value={gdmRisk}\n onValueChange={(next) => setGdmRisk(next as GdmRisk | 'none')}\n >\n <Radio label={t('antenatalSchedule.gdmRisk.none')} value=\"none\" />\n <Radio\n label={t('antenatalSchedule.gdmRisk.medium')}\n value=\"medium\"\n />\n <Radio label={t('antenatalSchedule.gdmRisk.high')} value=\"high\" />\n </RadioGroup>\n </>\n ) : null}\n\n <p className=\"ds:sr-only\" role=\"status\" aria-live=\"polite\">\n {data\n ? `${t('gestationalAgeCalculator.gestationLabel')}: ${gaText(\n data.result.gestationalAge,\n )}. ${t('gestationalAgeCalculator.trimesterLabel')}: ${t(\n `gestationalAgeCalculator.trimester.${data.result.trimester}`,\n )}.`\n : ''}\n </p>\n\n {data ? (\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n <dl className=\"ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2\">\n <div className=\"ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]\">\n <dt className=\"type-label ds:text-muted-foreground\">\n {t('gestationalAgeCalculator.trimesterLabel')}\n </dt>\n <dd>\n <Badge\n variant={TRIMESTER_BADGE_VARIANT[data.result.trimester]}\n size=\"lg\"\n >\n {t(\n `gestationalAgeCalculator.trimester.${data.result.trimester}`,\n )}\n </Badge>\n </dd>\n </div>\n <div className=\"ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-xs)] ds:text-end\">\n <dt className=\"type-label ds:text-muted-foreground\">\n {t('gestationalAgeCalculator.gestationLabel')}\n </dt>\n <dd className=\"type-metric ds:text-foreground\">\n {gaText(data.result.gestationalAge)}\n </dd>\n </div>\n </dl>\n\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <span className=\"type-label ds:text-muted-foreground\">\n {t('gestationalAgeCalculator.milestonesLabel')}\n </span>\n <ul className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n {data.milestones.map((m) => {\n const reached = isAfter(asOfDate, m.date);\n return (\n <li\n key={m.key}\n className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-md)]\"\n >\n <span className=\"type-body ds:text-foreground\">\n {t(`gestationalAgeCalculator.milestone.${m.key}`)}\n </span>\n <span className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <span className=\"type-body ds:text-muted-foreground\">\n {dateFormatter.format(m.date)}\n </span>\n {reached ? (\n <Badge variant=\"success\">\n {t('gestationalAgeCalculator.reached')}\n </Badge>\n ) : null}\n </span>\n </li>\n );\n })}\n </ul>\n </div>\n </Card.Body>\n </Card>\n ) : (\n <p className=\"type-body ds:text-muted-foreground\">\n {t('gestationalAgeCalculator.empty')}\n </p>\n )}\n\n {schedule ? <AntenatalScheduleTimeline events={schedule} /> : null}\n\n {/* One result-action group for the whole result — sits after both the\n gestational-age card and the schedule, and its payload carries the\n schedule rows when shown (no per-card buttons). */}\n {data && (insertVariant === 'copy' || onInsert) ? (\n <InsertButton\n onInsert={onInsert}\n variant={insertVariant}\n onCopy={onCopy}\n onError={onError}\n card={{\n title: t('insert.title.gestationalAge'),\n icon: 'baby',\n highlight: t(\n `gestationalAgeCalculator.trimester.${data.result.trimester}`,\n ),\n // Chip shares the trimester's semantic token so the inserted PNG\n // chip matches the on-screen trimester badge — with the\n // contrast-safe orange override for the `--warning` third trimester.\n highlightToken: trimesterHighlightToken(data.result.trimester),\n brand: insertBrand,\n fields: [\n {\n // Gestational age is an elapsed duration → clock glyph.\n icon: 'clock',\n label: t('gestationalAgeCalculator.gestationLabel'),\n value: gaText(data.result.gestationalAge),\n },\n {\n // Trimester is a clinical-stage classification → tag.\n icon: 'tag',\n label: t('gestationalAgeCalculator.trimesterLabel'),\n value: t(\n `gestationalAgeCalculator.trimester.${data.result.trimester}`,\n ),\n },\n // When the schedule is shown, the single Insert button carries\n // the exam windows too (no second button).\n ...(schedule\n ? buildScheduleInsertFields(schedule, t, (d) =>\n dateFormatter.format(d),\n )\n : []),\n ],\n }}\n />\n ) : null}\n </div>\n );\n },\n);\n\nGestationalAgeCalculator.displayName = 'GestationalAgeCalculator';\n"],"names":["DEPRECATED","isoDate","gestationalAgeCalculatorAgent","handle","args","rootVariants","cva","toIsoDate","d","format","fromIsoDate","iso","parseISO","GestationalAgeCalculator","forwardRef","defaultMethod","defaultReferenceDate","onResultChange","onInsert","insertVariant","onCopy","onError","insertBrand","showSchedule","defaultPlurality","defaultChorionicity","defaultRhNegative","defaultGdmRisk","scheduleOptions","id","width","className","ref","i18n","useTranslation","method","setMethod","useState","refDate","setRefDate","asOfDate","setAsOfDate","today","useMemo","plurality","setPlurality","chorionicity","setChorionicity","rhNegative","setRhNegative","gdmRisk","setGdmRisk","data","lmp","subDays","GESTATION_DAYS","r","computeDueDate","gestationalMilestones","schedule","computeAntenatalSchedule","chorionicityOptions","c","dateFormatter","useEffect","liveRef","useRef","agentHandle","live","_a","next","parsed","isAfter","useAgentRegistration","gaText","ga","jsxs","RadioGroup","jsx","Radio","FormField","DatePicker","Fragment","Select","Switch","Card","Badge","TRIMESTER_BADGE_VARIANT","m","reached","AntenatalScheduleTimeline","InsertButton","trimesterHighlightToken","buildScheduleInsertFields"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,MAAMA,IAAa,iDAGbC,IAAU;AAAA,EACd,MAAM;AAAA,EACN,SAAS;AACX,GAEaC,KACX;AAAA,EACE,IAAI;AAAA;AAAA,EAEJ,cAAc,CAAC,WAAW;AAAA,EAC1B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,EACrC;AAAA,EAEF,SAAS;AAAA,IACP,YAAY;AAAA;AAAA;AAAA,MAGV,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY;AAAA,UACV,QAAQ;AAAA,YACN,MAAM,CAAC,OAAO,KAAK;AAAA,YACnB,aACE;AAAA,UAAA;AAAA,QACJ;AAAA,QAEF,UAAU,CAAC,QAAQ;AAAA,QACnB,sBAAsB;AAAA,MAAA;AAAA,MAExB,YAAY;AAAA,MACZ,YAAYH;AAAA,MACZ,SAAS;AAAA,MACT,eAAe;AAAA,QACb,MAAM;AAAA,QACN,aAAa;AAAA,MAAA;AAAA,MAEf,QAAQ,CAAC,uDAAuD;AAAA,MAChE,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,QAAQ,CAACG,GAAQC,MACfD,EAAO,UAAUC,EAAK,MAAM;AAAA,IAAA;AAAA,IAEhC,oBAAoB;AAAA,MAClB,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY;AAAA,UACV,MAAM;AAAA,YACJ,OAAO;AAAA,cACL;AAAA,gB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as g, useState as f, useCallback as I } from "react";
|
|
3
|
+
import { c as h } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as K } from "react-i18next";
|
|
5
|
+
import { I as T } from "./icon-button-DA2CAGHZ.js";
|
|
6
|
+
import { C as j } from "./check-DrFSN__t.js";
|
|
7
|
+
import { C as _ } from "./copy-vRpqqHtY.js";
|
|
8
|
+
const A = h(
|
|
9
|
+
"type-body ds:text-foreground ds:min-w-0 ds:[unicode-bidi:isolate]",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
layout: {
|
|
13
|
+
horizontal: "",
|
|
14
|
+
vertical: "ds:shrink"
|
|
15
|
+
},
|
|
16
|
+
alignValue: {
|
|
17
|
+
start: "",
|
|
18
|
+
end: ""
|
|
19
|
+
},
|
|
20
|
+
mono: {
|
|
21
|
+
true: "ds:font-[family-name:var(--font-mono)]",
|
|
22
|
+
false: ""
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
compoundVariants: [
|
|
26
|
+
// `flex-1` lets the value absorb the remaining inline space when
|
|
27
|
+
// the KVP root flexes icon / label / value as direct siblings.
|
|
28
|
+
// Without it the value shrinks to its content width and the row
|
|
29
|
+
// leaves inline-end whitespace.
|
|
30
|
+
{
|
|
31
|
+
layout: "horizontal",
|
|
32
|
+
alignValue: "start",
|
|
33
|
+
class: "ds:flex-1 ds:shrink"
|
|
34
|
+
},
|
|
35
|
+
// Pinned: drop `flex-1` so the cell is content-width, then let an
|
|
36
|
+
// auto inline-start margin eat the slack. `ms-*` is the logical
|
|
37
|
+
// spelling, so this flips correctly in a right-to-left locale.
|
|
38
|
+
{
|
|
39
|
+
layout: "horizontal",
|
|
40
|
+
alignValue: "end",
|
|
41
|
+
class: "ds:ms-auto ds:shrink-0"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
layout: "horizontal",
|
|
46
|
+
alignValue: "start",
|
|
47
|
+
mono: !1
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
), B = h("ds:flex", {
|
|
51
|
+
variants: {
|
|
52
|
+
layout: {
|
|
53
|
+
horizontal: "ds:flex-row ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
54
|
+
vertical: "ds:flex-col ds:gap-[var(--spacing-xs)]"
|
|
55
|
+
},
|
|
56
|
+
/** Internal — flips the root to a horizontal flex when an icon
|
|
57
|
+
is present so the icon can sit at the leading edge of both
|
|
58
|
+
horizontal and vertical inner stacks. `items-start` keeps the
|
|
59
|
+
icon anchored to the label row even when the value wraps. */
|
|
60
|
+
hasIcon: {
|
|
61
|
+
true: "ds:flex-row ds:items-start ds:gap-[var(--spacing-sm)]",
|
|
62
|
+
false: ""
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
layout: "horizontal",
|
|
67
|
+
hasIcon: !1
|
|
68
|
+
}
|
|
69
|
+
}), L = g(
|
|
70
|
+
({
|
|
71
|
+
label: t,
|
|
72
|
+
value: e,
|
|
73
|
+
layout: s = "horizontal",
|
|
74
|
+
alignValue: n = "start",
|
|
75
|
+
mono: l = !1,
|
|
76
|
+
copyable: v = !1,
|
|
77
|
+
copyText: k,
|
|
78
|
+
icon: d,
|
|
79
|
+
className: x,
|
|
80
|
+
...V
|
|
81
|
+
}, C) => {
|
|
82
|
+
const { t: o } = K(), [z, p] = f(!1), [N, r] = f(""), c = k ?? (typeof e == "string" ? e : void 0), b = I(async () => {
|
|
83
|
+
if (c)
|
|
84
|
+
try {
|
|
85
|
+
await navigator.clipboard.writeText(c), p(!0), r(o("keyValuePair.copied")), setTimeout(() => {
|
|
86
|
+
p(!1), r("");
|
|
87
|
+
}, 2e3);
|
|
88
|
+
} catch {
|
|
89
|
+
r(o("keyValuePair.notAvailable")), setTimeout(() => r(""), 3e3);
|
|
90
|
+
}
|
|
91
|
+
}, [c, o]), w = A({
|
|
92
|
+
layout: s,
|
|
93
|
+
alignValue: n,
|
|
94
|
+
mono: l
|
|
95
|
+
}), u = d != null, P = "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:min-w-0 ds:flex-1", m = /* @__PURE__ */ i(y, { children: [
|
|
96
|
+
/* @__PURE__ */ i("span", { className: "type-label ds:text-muted-foreground ds:shrink-0", children: [
|
|
97
|
+
t,
|
|
98
|
+
/* @__PURE__ */ a("span", { className: "ds:sr-only", children: ": " })
|
|
99
|
+
] }),
|
|
100
|
+
/* @__PURE__ */ a("span", { className: w, children: e }),
|
|
101
|
+
v && /* @__PURE__ */ a(
|
|
102
|
+
T,
|
|
103
|
+
{
|
|
104
|
+
icon: z ? /* @__PURE__ */ a(j, {}) : /* @__PURE__ */ a(_, {}),
|
|
105
|
+
size: "sm",
|
|
106
|
+
"aria-label": o("keyValuePair.copy", { label: t }),
|
|
107
|
+
onClick: b,
|
|
108
|
+
intent: "ghost",
|
|
109
|
+
className: s === "horizontal" ? (
|
|
110
|
+
// Only one element on the row may claim the slack. When
|
|
111
|
+
// the value is pinned it has already taken it with its
|
|
112
|
+
// own `ms-auto`; a second auto margin here would split
|
|
113
|
+
// the free space between them and strand the value in
|
|
114
|
+
// the middle of the row instead of at its end.
|
|
115
|
+
n === "end" ? "ds:shrink-0" : "ds:ms-auto ds:shrink-0"
|
|
116
|
+
) : "ds:self-start"
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] });
|
|
120
|
+
return /* @__PURE__ */ i(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
ref: C,
|
|
124
|
+
className: B({ layout: s, hasIcon: u, className: x }),
|
|
125
|
+
"data-component": "key-value-pair",
|
|
126
|
+
...V,
|
|
127
|
+
children: [
|
|
128
|
+
u ? /* @__PURE__ */ i(y, { children: [
|
|
129
|
+
/* @__PURE__ */ a(
|
|
130
|
+
"span",
|
|
131
|
+
{
|
|
132
|
+
"aria-hidden": "true",
|
|
133
|
+
className: "ds:inline-flex ds:shrink-0 ds:translate-y-0.5 ds:text-[color:var(--key-value-pair-icon-color)] ds:[&_svg]:size-4",
|
|
134
|
+
children: d
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
s === "horizontal" ? m : /* @__PURE__ */ a("div", { className: P, children: m })
|
|
138
|
+
] }) : m,
|
|
139
|
+
/* @__PURE__ */ a("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: N })
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
L.displayName = "KeyValuePair";
|
|
146
|
+
const S = {
|
|
147
|
+
sm: "ds:gap-y-[var(--spacing-sm)]",
|
|
148
|
+
md: "ds:gap-y-[var(--spacing-md)]",
|
|
149
|
+
lg: "ds:gap-y-[var(--spacing-lg)]"
|
|
150
|
+
}, F = g(
|
|
151
|
+
({ children: t, className: e, rowGap: s = "md", ...n }, l) => /* @__PURE__ */ a(
|
|
152
|
+
"div",
|
|
153
|
+
{
|
|
154
|
+
ref: l,
|
|
155
|
+
"data-component": "key-value-list",
|
|
156
|
+
className: [
|
|
157
|
+
"ds:grid ds:grid-cols-[auto_auto_minmax(0,1fr)]",
|
|
158
|
+
"ds:gap-x-[var(--spacing-md)]",
|
|
159
|
+
S[s],
|
|
160
|
+
// Each direct `data-component="key-value-pair"` child becomes
|
|
161
|
+
// a subgrid row spanning all three columns. The KVP's own
|
|
162
|
+
// flex layout still works inside the cell (icon shrinks-0,
|
|
163
|
+
// label shrinks-0, value flexes) — subgrid just aligns the
|
|
164
|
+
// boundaries between siblings.
|
|
165
|
+
'ds:[&>[data-component="key-value-pair"]]:grid',
|
|
166
|
+
'ds:[&>[data-component="key-value-pair"]]:grid-cols-subgrid',
|
|
167
|
+
'ds:[&>[data-component="key-value-pair"]]:col-span-3',
|
|
168
|
+
'ds:[&>[data-component="key-value-pair"]]:items-baseline',
|
|
169
|
+
// Unset the KVP's intra-row `gap-sm` so the subgrid inherits
|
|
170
|
+
// the parent KeyValueList's `gap-x-md` for every track gap
|
|
171
|
+
// (icon→label and label→value). `gap-0` here would override
|
|
172
|
+
// the parent's gap and crowd the icon against the label;
|
|
173
|
+
// `[gap:normal]` is the subgrid-spec way to defer to the
|
|
174
|
+
// parent.
|
|
175
|
+
'ds:[&>[data-component="key-value-pair"]]:[gap:normal]',
|
|
176
|
+
e
|
|
177
|
+
].filter(Boolean).join(" "),
|
|
178
|
+
...n,
|
|
179
|
+
children: t
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
);
|
|
183
|
+
F.displayName = "KeyValueList";
|
|
184
|
+
export {
|
|
185
|
+
F as K,
|
|
186
|
+
L as a
|
|
187
|
+
};
|
|
188
|
+
//# sourceMappingURL=key-value-pair-BIBdZBLg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"key-value-pair-BIBdZBLg.js","sources":["../../src/components/key-value-pair/key-value-pair.tsx"],"sourcesContent":["import { forwardRef, useState, useCallback, type HTMLAttributes } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Copy, Check } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\n\n/* ------------------------------------------------------------------ */\n/* CVA — root wrapper */\n/* */\n/* The layout variants below describe the LOGICAL flow of label/value. */\n/* When an `icon` prop is supplied, the root flips to `flex-row` and */\n/* renders the icon at the leading edge regardless of the chosen */\n/* layout — the layout then governs the inner label/value stack. Cap- */\n/* height alignment is handled by `items-start` + a small `mt` offset */\n/* on the icon wrapper so a wrapping value doesn't push the icon */\n/* downward. */\n/* ------------------------------------------------------------------ */\n\n/* ------------------------------------------------------------------ */\n/* CVA — value cell */\n/* */\n/* `alignValue` decides whether the value starts beside the label or */\n/* is pinned to the inline-end of the row. Pinning matters when a */\n/* column of rows carries one comparable figure (a price, a count): */\n/* left where it falls, its position shifts with the label width and */\n/* the eye can't run down it. */\n/* */\n/* Standalone, the value is a flex sibling — `start` lets it absorb */\n/* the free space, `end` pushes it over with an auto inline margin. */\n/* Inside a `<KeyValueList>` the value is a grid item in the third */\n/* track (`minmax(0,1fr)`), where the same auto margin pins it to the */\n/* track's end. One pair of classes covers both. */\n/* */\n/* Horizontal only. In `vertical` the value already sits below the */\n/* label with nothing to pin against, so `alignValue` is a documented */\n/* no-op there rather than a surprise. */\n/* ------------------------------------------------------------------ */\n\nconst keyValuePairValueVariants = cva(\n 'type-body ds:text-foreground ds:min-w-0 ds:[unicode-bidi:isolate]',\n {\n variants: {\n layout: {\n horizontal: '',\n vertical: 'ds:shrink',\n },\n alignValue: {\n start: '',\n end: '',\n },\n mono: {\n true: 'ds:font-[family-name:var(--font-mono)]',\n false: '',\n },\n },\n compoundVariants: [\n // `flex-1` lets the value absorb the remaining inline space when\n // the KVP root flexes icon / label / value as direct siblings.\n // Without it the value shrinks to its content width and the row\n // leaves inline-end whitespace.\n {\n layout: 'horizontal',\n alignValue: 'start',\n class: 'ds:flex-1 ds:shrink',\n },\n // Pinned: drop `flex-1` so the cell is content-width, then let an\n // auto inline-start margin eat the slack. `ms-*` is the logical\n // spelling, so this flips correctly in a right-to-left locale.\n {\n layout: 'horizontal',\n alignValue: 'end',\n class: 'ds:ms-auto ds:shrink-0',\n },\n ],\n defaultVariants: {\n layout: 'horizontal',\n alignValue: 'start',\n mono: false,\n },\n },\n);\n\nconst keyValuePairVariants = cva('ds:flex', {\n variants: {\n layout: {\n horizontal: 'ds:flex-row ds:items-center ds:gap-[var(--spacing-sm)]',\n vertical: 'ds:flex-col ds:gap-[var(--spacing-xs)]',\n },\n /** Internal — flips the root to a horizontal flex when an icon\n is present so the icon can sit at the leading edge of both\n horizontal and vertical inner stacks. `items-start` keeps the\n icon anchored to the label row even when the value wraps. */\n hasIcon: {\n true: 'ds:flex-row ds:items-start ds:gap-[var(--spacing-sm)]',\n false: '',\n },\n },\n defaultVariants: {\n layout: 'horizontal',\n hasIcon: false,\n },\n});\n\n/* ------------------------------------------------------------------ */\n/* KeyValuePairProps */\n/* ------------------------------------------------------------------ */\n\nexport interface KeyValuePairProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<VariantProps<typeof keyValuePairVariants>, 'hasIcon'> {\n /** The label (term) */\n label: string;\n /** The value — accepts plain text, Badge, Tag, monospace code, any ReactNode */\n value: React.ReactNode;\n /** Layout direction */\n layout?: 'horizontal' | 'vertical';\n /** Render value in monospace font */\n mono?: boolean;\n /**\n * Where the value sits on the row.\n *\n * `start` (default) keeps the existing behaviour — the value begins\n * immediately after the label and absorbs the remaining width.\n *\n * `end` pins the value to the inline-end of the row, so its position\n * no longer moves with the label's length. Use it for the one\n * comparable figure in a list of rows — a price, a count, a score —\n * where a reader wants to scan down a column rather than read each\n * line. Pinning every row defeats the point.\n *\n * Horizontal layout only: in `vertical` the value already sits below\n * the label, so there is nothing to pin against and this is ignored.\n */\n alignValue?: 'start' | 'end';\n /** Show a copy-to-clipboard IconButton beside the value */\n copyable?: boolean;\n /** The text to copy — defaults to `value` if value is a string */\n copyText?: string;\n /**\n * Optional decorative icon rendered at the leading edge of the pair.\n * Pass a `lucide-react` icon (or any single React element) for\n * visual consistency. The wrapper applies `aria-hidden=\"true\"` and\n * paints the icon with `var(--key-value-pair-icon-color)` (defaults\n * to `--muted-foreground`); consumers can recolour the slot via\n * that token without forking the component.\n *\n * Cap-height alignment with the label is automatic — the wrapper\n * uses `mt-0.5` so the glyph rides the label row, not the\n * geometric centre of a wrapping value.\n *\n * Type is `ReactElement` (not the broader `ReactNode`) so the\n * intent is clear at the call site: this slot is for a single\n * SVG/icon, not arbitrary fragments, strings, or numbers.\n */\n icon?: React.ReactElement | null;\n}\n\n/* ------------------------------------------------------------------ */\n/* KeyValuePair */\n/* ------------------------------------------------------------------ */\n\nexport const KeyValuePair = forwardRef<HTMLDivElement, KeyValuePairProps>(\n (\n {\n label,\n value,\n layout = 'horizontal',\n alignValue = 'start',\n mono = false,\n copyable = false,\n copyText,\n icon,\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const [copied, setCopied] = useState(false);\n const [announcement, setAnnouncement] = useState('');\n\n const textToCopy =\n copyText ?? (typeof value === 'string' ? value : undefined);\n\n const handleCopy = useCallback(async () => {\n if (!textToCopy) {\n if (import.meta.env.DEV) {\n console.warn(\n 'KeyValuePair: copyable is true but no copyText was provided and value is not a string. Copy no-op.',\n );\n }\n return;\n }\n\n try {\n await navigator.clipboard.writeText(textToCopy);\n setCopied(true);\n setAnnouncement(t('keyValuePair.copied'));\n setTimeout(() => {\n setCopied(false);\n setAnnouncement('');\n }, 2000);\n } catch {\n setAnnouncement(t('keyValuePair.notAvailable'));\n setTimeout(() => setAnnouncement(''), 3000);\n }\n }, [textToCopy, t]);\n\n const valueClasses = keyValuePairValueVariants({\n layout,\n alignValue,\n mono,\n });\n\n const hasIcon = icon !== undefined && icon !== null;\n\n // Inner stack — used ONLY for `layout=\"vertical\"` when an icon is\n // present (icon on the leading edge, label-on-top-of-value stacked\n // next to it). For `layout=\"horizontal\"` we render the icon /\n // label / value as direct flex children of the root — wrapping\n // them in a single `<div>` would break the KeyValueList subgrid\n // (the subgrid's 3 tracks would collapse to 2: the wrapper +\n // icon). See the conditional below.\n const innerStackClass =\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:min-w-0 ds:flex-1';\n\n const stack = (\n <>\n <span className=\"type-label ds:text-muted-foreground ds:shrink-0\">\n {label}\n <span className=\"ds:sr-only\">: </span>\n </span>\n <span className={valueClasses}>{value}</span>\n {copyable && (\n <IconButton\n icon={copied ? <Check /> : <Copy />}\n size=\"sm\"\n aria-label={t('keyValuePair.copy', { label })}\n onClick={handleCopy}\n intent=\"ghost\"\n className={\n layout === 'horizontal'\n ? // Only one element on the row may claim the slack. When\n // the value is pinned it has already taken it with its\n // own `ms-auto`; a second auto margin here would split\n // the free space between them and strand the value in\n // the middle of the row instead of at its end.\n alignValue === 'end'\n ? 'ds:shrink-0'\n : 'ds:ms-auto ds:shrink-0'\n : 'ds:self-start'\n }\n />\n )}\n </>\n );\n\n return (\n <div\n ref={ref}\n className={keyValuePairVariants({ layout, hasIcon, className })}\n data-component=\"key-value-pair\"\n {...props}\n >\n {hasIcon ? (\n <>\n {/* Decorative icon wrapper. `aria-hidden` so SR users only\n hear \"<label>: <value>\" — the icon is brand polish,\n not semantic content.\n\n `translate-y` shifts the icon down by 2px visually so\n its centre lines up with the label's x-height centre.\n In a baseline-aligned subgrid row, the icon's margin-\n box bottom pins to the label's text baseline — that\n leaves the 16px SVG sitting visually 3-4px above the\n label's centre. `translate-y` adjusts only the paint\n position; the underlying baseline math still holds,\n so multi-line value cells (e.g. address + map link)\n stay correctly aligned with the FIRST line of the\n value. */}\n <span\n aria-hidden=\"true\"\n className=\"ds:inline-flex ds:shrink-0 ds:translate-y-0.5 ds:text-[color:var(--key-value-pair-icon-color)] ds:[&_svg]:size-4\"\n >\n {icon}\n </span>\n {/* `horizontal` layout: render label / value / copy as\n direct flex children of the root so each piece falls\n into its own track when this KVP is promoted to a\n subgrid row by `<KeyValueList>`. Wrapping them in a\n `<div>` here would collapse the subgrid's 3 tracks\n (icon | label | value) to 2 (icon | wrapper) and labels\n across rows would no longer share a column. The root's\n `flex flex-row` + `gap-sm` keeps the standalone visual\n identical.\n\n `vertical` layout still needs the wrapper because the\n stack is column-flow — label-on-top-of-value next to\n the icon. */}\n {layout === 'horizontal' ? (\n stack\n ) : (\n <div className={innerStackClass}>{stack}</div>\n )}\n </>\n ) : (\n stack\n )}\n <span role=\"status\" aria-live=\"polite\" className=\"ds:sr-only\">\n {announcement}\n </span>\n </div>\n );\n },\n);\n\nKeyValuePair.displayName = 'KeyValuePair';\n\n/* ------------------------------------------------------------------ */\n/* KeyValueList — subgrid alignment for a column of KVP rows */\n/* */\n/* When several `<KeyValuePair>` rows live in the same card (practice */\n/* profile, settings panel, contact card, etc.), the per-row flex */\n/* layout means each row's label column has a different width. The */\n/* values end up zigzagged. Wrapping in `<KeyValueList>` puts all rows */\n/* into a single 3-column CSS subgrid (icon | label | value), so */\n/* labels share a column across rows and values start at the same */\n/* inline-start edge. */\n/* */\n/* Standalone `<KeyValuePair>` instances outside a `<KeyValueList>` */\n/* keep their existing per-row flex layout — no behaviour change for */\n/* consumers that didn't opt in. */\n/* ------------------------------------------------------------------ */\n\nexport interface KeyValueListProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Gap between rows. Maps to spacing tokens — defaults to `md`.\n * Smaller gaps suit dense settings panels; larger gaps suit\n * profile cards.\n */\n rowGap?: 'sm' | 'md' | 'lg';\n}\n\nconst rowGapClassMap: Record<\n NonNullable<KeyValueListProps['rowGap']>,\n string\n> = {\n sm: 'ds:gap-y-[var(--spacing-sm)]',\n md: 'ds:gap-y-[var(--spacing-md)]',\n lg: 'ds:gap-y-[var(--spacing-lg)]',\n};\n\nexport const KeyValueList = forwardRef<HTMLDivElement, KeyValueListProps>(\n ({ children, className, rowGap = 'md', ...props }, ref) => {\n // Three-column subgrid: icon | label | value.\n // - col 1: `auto` — width of the widest icon (or 0 if no rows have icons)\n // - col 2: `auto` — width of the widest label, shared across all rows\n // - col 3: `minmax(0, 1fr)` — value flexes; `minmax` prevents the\n // value from forcing the grid wider than its container when the\n // value contains a long unbroken string (e.g. an email or URL).\n //\n // Each child `<KeyValuePair>` (which renders as a `<div>` with a\n // `data-component=\"key-value-pair\"` marker) is promoted into a\n // subgrid row by the CSS below — the cell boundaries align across\n // every direct child.\n //\n // We render as `<div>` (not `<dl>`): axe enforces \"dl can only\n // contain dt/dd\" and the inner KVP renders as a `<div>`. The KVP's\n // own SR markup (label + `<span class=\"sr-only\">: </span>` + value)\n // already conveys term-value semantics — wrapping in a `<dl>`\n // doesn't add anything the screen reader doesn't already get.\n return (\n <div\n ref={ref}\n data-component=\"key-value-list\"\n className={[\n 'ds:grid ds:grid-cols-[auto_auto_minmax(0,1fr)]',\n 'ds:gap-x-[var(--spacing-md)]',\n rowGapClassMap[rowGap],\n // Each direct `data-component=\"key-value-pair\"` child becomes\n // a subgrid row spanning all three columns. The KVP's own\n // flex layout still works inside the cell (icon shrinks-0,\n // label shrinks-0, value flexes) — subgrid just aligns the\n // boundaries between siblings.\n 'ds:[&>[data-component=\"key-value-pair\"]]:grid',\n 'ds:[&>[data-component=\"key-value-pair\"]]:grid-cols-subgrid',\n 'ds:[&>[data-component=\"key-value-pair\"]]:col-span-3',\n 'ds:[&>[data-component=\"key-value-pair\"]]:items-baseline',\n // Unset the KVP's intra-row `gap-sm` so the subgrid inherits\n // the parent KeyValueList's `gap-x-md` for every track gap\n // (icon→label and label→value). `gap-0` here would override\n // the parent's gap and crowd the icon against the label;\n // `[gap:normal]` is the subgrid-spec way to defer to the\n // parent.\n 'ds:[&>[data-component=\"key-value-pair\"]]:[gap:normal]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nKeyValueList.displayName = 'KeyValueList';\n"],"names":["keyValuePairValueVariants","cva","keyValuePairVariants","KeyValuePair","forwardRef","label","value","layout","alignValue","mono","copyable","copyText","icon","className","props","ref","t","useTranslation","copied","setCopied","useState","announcement","setAnnouncement","textToCopy","handleCopy","useCallback","valueClasses","hasIcon","innerStackClass","stack","jsxs","Fragment","jsx","IconButton","Check","Copy","rowGapClassMap","KeyValueList","children","rowGap"],"mappings":";;;;;;;AAsCA,MAAMA,IAA4BC;AAAA,EAChC;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,QAAQ;AAAA,QACN,YAAY;AAAA,QACZ,UAAU;AAAA,MAAA;AAAA,MAEZ,YAAY;AAAA,QACV,OAAO;AAAA,QACP,KAAK;AAAA,MAAA;AAAA,MAEP,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA,MAKhB;AAAA,QACE,QAAQ;AAAA,QACR,YAAY;AAAA,QACZ,OAAO;AAAA,MAAA;AAAA;AAAA;AAAA;AAAA,MAKT;AAAA,QACE,QAAQ;AAAA,QACR,YAAY;AAAA,QACZ,OAA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CAE5C,IAEAA;AAAA,UAEF,gBAAAG,EAAC,UAAK,MAAK,UAAS,aAAU,UAAS,WAAU,cAC9C,UAAAX,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAlB,EAAa,cAAc;AA2B3B,MAAMiC,IAGF;AAAA,EACF,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAejC;AAAA,EAC1B,CAAC,EAAE,UAAAkC,GAAU,WAAAzB,GAAW,QAAA0B,IAAS,MAAM,GAAGzB,EAAA,GAASC,MAmB/C,gBAAAiB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAjB;AAAA,MACA,kBAAe;AAAA,MACf,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACAqB,EAAeG,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMrB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAOA;AAAA,QACA1B;AAAA,MAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACV,GAAGC;AAAA,MAEH,UAAAwB;AAAA,IAAA;AAAA,EAAA;AAIT;AAEAD,EAAa,cAAc;"}
|
|
@@ -5,11 +5,11 @@ import { D as H } from "./date-range-picker-BD8P_rJq.js";
|
|
|
5
5
|
import { useTranslation as D } from "react-i18next";
|
|
6
6
|
import { C as Z } from "./checkbox-BuZ1u__2.js";
|
|
7
7
|
import { B as E } from "./button-nJaPh_HC.js";
|
|
8
|
-
import { M as J } from "./multi-select-
|
|
8
|
+
import { M as J } from "./multi-select-DYOvx2SJ.js";
|
|
9
9
|
import { S as Q } from "./scroll-area-BZOvUhwQ.js";
|
|
10
|
-
import { A as Y } from "./autocomplete-
|
|
10
|
+
import { A as Y } from "./autocomplete-MpBhz-fG.js";
|
|
11
11
|
import { N as M } from "./number-input-Cgu2TtA8.js";
|
|
12
|
-
import { S as W } from "./select-
|
|
12
|
+
import { S as W } from "./select-Bi8zril7.js";
|
|
13
13
|
import { B as ee } from "./badge-sTusUqZD.js";
|
|
14
14
|
import { A as j } from "./avatar-BNQNhoyL.js";
|
|
15
15
|
import { T as I } from "./tag-3wgkwwDB.js";
|
|
@@ -763,4 +763,4 @@ export {
|
|
|
763
763
|
Ie as f,
|
|
764
764
|
Be as g
|
|
765
765
|
};
|
|
766
|
-
//# sourceMappingURL=link-cell-renderer-
|
|
766
|
+
//# sourceMappingURL=link-cell-renderer-CIASXsVM.js.map
|