@alfadocs/ui-kit-debug 1.7.0 → 1.9.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-ALEAGO3j.js → actions-cell-renderer-B2pw6iH8.js} +2 -2
- package/dist/_chunks/{actions-cell-renderer-ALEAGO3j.js.map → actions-cell-renderer-B2pw6iH8.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-F-cCmFAn.js → anamnesis-summary-rows-d44s_whc.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-F-cCmFAn.js.map → anamnesis-summary-rows-d44s_whc.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-BjlF2rTz.js → antenatal-schedule-timeline-B1k8QkA6.js} +3 -3
- package/dist/_chunks/{antenatal-schedule-timeline-BjlF2rTz.js.map → antenatal-schedule-timeline-B1k8QkA6.js.map} +1 -1
- package/dist/_chunks/{appointment-card-BhcPJpXh.js → appointment-card-Dzr3GeVz.js} +73 -90
- package/dist/_chunks/appointment-card-Dzr3GeVz.js.map +1 -0
- package/dist/_chunks/{appointment-timeline-CMPvzlGZ.js → appointment-timeline-0mwtpErq.js} +3 -3
- package/dist/_chunks/{appointment-timeline-CMPvzlGZ.js.map → appointment-timeline-0mwtpErq.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-3c_FLxXJ.js → appointment-tray-4FUu_5NX.js} +2 -2
- package/dist/_chunks/{appointment-tray-3c_FLxXJ.js.map → appointment-tray-4FUu_5NX.js.map} +1 -1
- package/dist/_chunks/armchair-BaLDW6Hz.js +23 -0
- package/dist/_chunks/armchair-BaLDW6Hz.js.map +1 -0
- package/dist/_chunks/{booking-CQMJUFG-.js → booking-DHkKcUIl.js} +4 -4
- package/dist/_chunks/{booking-CQMJUFG-.js.map → booking-DHkKcUIl.js.map} +1 -1
- package/dist/_chunks/{calendar-4dXTvsCz.js → calendar-B4Gnyu1C.js} +553 -437
- package/dist/_chunks/calendar-B4Gnyu1C.js.map +1 -0
- package/dist/_chunks/calendar-event-card-Bjdbik8G.js +425 -0
- package/dist/_chunks/calendar-event-card-Bjdbik8G.js.map +1 -0
- package/dist/_chunks/{care-plan-card-DQjVRDxO.js → care-plan-card-aDN4oem9.js} +3 -3
- package/dist/_chunks/{care-plan-card-DQjVRDxO.js.map → care-plan-card-aDN4oem9.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-CMpoeNkb.js → care-plan-entry-card-BEhANdBE.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-CMpoeNkb.js.map → care-plan-entry-card-BEhANdBE.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-CxYoq23f.js → care-plan-header-CkpPyQqG.js} +2 -2
- package/dist/_chunks/{care-plan-header-CxYoq23f.js.map → care-plan-header-CkpPyQqG.js.map} +1 -1
- package/dist/_chunks/{color-picker-D-tUwxxT.js → color-picker-oZ6zYks8.js} +164 -151
- package/dist/_chunks/color-picker-oZ6zYks8.js.map +1 -0
- package/dist/_chunks/control-room-rail-Cj2iX9h_.js +337 -0
- package/dist/_chunks/control-room-rail-Cj2iX9h_.js.map +1 -0
- package/dist/_chunks/{cycle-calculator-DzgO1vzP.js → cycle-calculator-DmtYGhqq.js} +3 -3
- package/dist/_chunks/{cycle-calculator-DzgO1vzP.js.map → cycle-calculator-DmtYGhqq.js.map} +1 -1
- package/dist/_chunks/{date-picker-Bp64zk2p.js → date-picker-CepI_oI2.js} +77 -74
- package/dist/_chunks/date-picker-CepI_oI2.js.map +1 -0
- package/dist/_chunks/{date-picker-variants-pKAJfnWr.js → date-picker-variants-DfuooXEK.js} +7 -2
- package/dist/_chunks/{date-picker-variants-pKAJfnWr.js.map → date-picker-variants-DfuooXEK.js.map} +1 -1
- package/dist/_chunks/{date-range-picker-CDrZ8Zh0.js → date-range-picker-BD8P_rJq.js} +46 -45
- package/dist/_chunks/{date-range-picker-CDrZ8Zh0.js.map → date-range-picker-BD8P_rJq.js.map} +1 -1
- package/dist/_chunks/{date-time-picker-DVETwpzc.js → date-time-picker-3I2vVKGV.js} +2 -2
- package/dist/_chunks/{date-time-picker-DVETwpzc.js.map → date-time-picker-3I2vVKGV.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-wK8Tajzz.js → due-date-calculator-BF_Ikofx.js} +4 -4
- package/dist/_chunks/{due-date-calculator-wK8Tajzz.js.map → due-date-calculator-BF_Ikofx.js.map} +1 -1
- package/dist/_chunks/{entity-card-9_62gY7l.js → entity-card-DmrgYSEX.js} +4 -4
- package/dist/_chunks/{entity-card-9_62gY7l.js.map → entity-card-DmrgYSEX.js.map} +1 -1
- package/dist/_chunks/{file-manager-Cc_upjZX.js → file-manager-Crg5dKez.js} +2 -2
- package/dist/_chunks/{file-manager-Cc_upjZX.js.map → file-manager-Crg5dKez.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-C_uDAeP_.js → gestational-age-calculator-CxZelpu2.js} +5 -5
- package/dist/_chunks/{gestational-age-calculator-C_uDAeP_.js.map → gestational-age-calculator-CxZelpu2.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-BaXkJhT-.js → hcg-doubling-CpU7H5rQ.js} +3 -3
- package/dist/_chunks/{hcg-doubling-BaXkJhT-.js.map → hcg-doubling-CpU7H5rQ.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-DH4JYpKU.js → link-cell-renderer-BZQtsuFz.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-DH4JYpKU.js.map → link-cell-renderer-BZQtsuFz.js.map} +1 -1
- package/dist/_chunks/{notes-panel-DlnENphf.js → notes-panel-e9cJWVRg.js} +2 -2
- package/dist/_chunks/{notes-panel-DlnENphf.js.map → notes-panel-e9cJWVRg.js.map} +1 -1
- package/dist/_chunks/{operator-hero-CCDnIa1S.js → operator-hero-BnFv-Uef.js} +2 -2
- package/dist/_chunks/{operator-hero-CCDnIa1S.js.map → operator-hero-BnFv-Uef.js.map} +1 -1
- package/dist/_chunks/{parse-JqixfsU0.js → parse-MN9bGkrY.js} +2 -2
- package/dist/_chunks/{parse-JqixfsU0.js.map → parse-MN9bGkrY.js.map} +1 -1
- package/dist/_chunks/{patient-details-qnsqYBGQ.js → patient-details-xrqe13az.js} +160 -159
- package/dist/_chunks/patient-details-xrqe13az.js.map +1 -0
- package/dist/_chunks/{patient-table-DwshfVsQ.js → patient-table-ChXM2K7H.js} +11 -7
- package/dist/_chunks/patient-table-ChXM2K7H.js.map +1 -0
- package/dist/_chunks/{payment-automation-upsell-BBIG7NFL.js → payment-automation-upsell-DwQW2fRp.js} +52 -63
- package/dist/_chunks/payment-automation-upsell-DwQW2fRp.js.map +1 -0
- package/dist/_chunks/{payment-request-card-BjjBMdsp.js → payment-request-card-YVCcCZ25.js} +2 -2
- package/dist/_chunks/{payment-request-card-BjjBMdsp.js.map → payment-request-card-YVCcCZ25.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-BVS_9YU2.js → pregnancy-dating-DtToyMyc.js} +5 -5
- package/dist/_chunks/{pregnancy-dating-BVS_9YU2.js.map → pregnancy-dating-DtToyMyc.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-CiHwgISa.js → radiograph-panel.agent-C3trfWqB.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-CiHwgISa.js.map → radiograph-panel.agent-C3trfWqB.js.map} +1 -1
- package/dist/_chunks/repeat-CvQa5rZt.js +17 -0
- package/dist/_chunks/repeat-CvQa5rZt.js.map +1 -0
- package/dist/_chunks/resource-chip-DYTG0IQQ.js +83 -0
- package/dist/_chunks/resource-chip-DYTG0IQQ.js.map +1 -0
- package/dist/_chunks/{rich-text-editor-DARnq_6N.js → rich-text-editor-BDfFtK4H.js} +2 -2
- package/dist/_chunks/{rich-text-editor-DARnq_6N.js.map → rich-text-editor-BDfFtK4H.js.map} +1 -1
- package/dist/_chunks/subDays-BLl3y3pd.js +8 -0
- package/dist/_chunks/{subDays-CAUv47M1.js.map → subDays-BLl3y3pd.js.map} +1 -1
- package/dist/agent-catalog.json +2 -2
- package/dist/components/_shared/date-picker-variants.d.ts.map +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calendar/calendar.agent.d.ts.map +1 -1
- package/dist/components/calendar/calendar.d.ts +138 -12
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/calendar-event-card.d.ts +48 -11
- package/dist/components/calendar-event-card/calendar-event-card.d.ts.map +1 -1
- package/dist/components/calendar-event-card/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/color-picker/index.d.ts +1 -1
- package/dist/components/color-picker/index.d.ts.map +1 -1
- package/dist/components/color-picker/index.js +4 -3
- package/dist/components/color-picker/palettes.d.ts +10 -0
- package/dist/components/color-picker/palettes.d.ts.map +1 -1
- package/dist/components/control-room-rail/control-room-rail.d.ts +9 -0
- package/dist/components/control-room-rail/control-room-rail.d.ts.map +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/cell-renderers/actions-cell-renderer.d.ts.map +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/date-picker/date-picker.d.ts +11 -0
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +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-details/patient-details.d.ts +8 -0
- package/dist/components/patient-details/patient-details.d.ts.map +1 -1
- package/dist/components/patient-table/columns.d.ts.map +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/patient-table/patient-table.d.ts +5 -4
- package/dist/components/patient-table/patient-table.d.ts.map +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/resource-chip/index.d.ts +3 -0
- package/dist/components/resource-chip/index.d.ts.map +1 -0
- package/dist/components/resource-chip/index.js +5 -0
- package/dist/components/resource-chip/index.js.map +1 -0
- package/dist/components/resource-chip/resource-chip.d.ts +26 -0
- package/dist/components/resource-chip/resource-chip.d.ts.map +1 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/host-compat.css +7 -1
- package/dist/i18n/locales/ar.d.ts +4 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +4 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +4 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +4 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +4 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +4 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +4 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +4 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +4 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +4 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +4 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +4 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +4 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +4 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +4 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +4 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +4 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +4 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +4 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +4 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +4 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +4 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +4 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +4 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +4 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +4 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +4 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +4 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +4 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +4 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +4 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +4 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +4 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +4 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +4 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +4 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +961 -958
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +4 -0
- package/dist/locales/de.json +4 -0
- package/dist/locales/el.json +4 -0
- package/dist/locales/en.json +4 -0
- package/dist/locales/es.json +4 -0
- package/dist/locales/fr.json +4 -0
- package/dist/locales/hi.json +4 -0
- package/dist/locales/it.json +4 -0
- package/dist/locales/ja.json +4 -0
- package/dist/locales/nl.json +4 -0
- package/dist/locales/pl.json +4 -0
- package/dist/locales/pt.json +4 -0
- package/dist/locales/ro.json +4 -0
- package/dist/locales/ru.json +4 -0
- package/dist/locales/sq.json +4 -0
- package/dist/locales/sv.json +4 -0
- package/dist/locales/tr.json +4 -0
- package/dist/locales/zh.json +4 -0
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/tokens.css +41 -24
- package/package.json +5 -1
- package/dist/_chunks/appointment-card-BhcPJpXh.js.map +0 -1
- package/dist/_chunks/calendar-4dXTvsCz.js.map +0 -1
- package/dist/_chunks/calendar-event-card-C6qGtywL.js +0 -257
- package/dist/_chunks/calendar-event-card-C6qGtywL.js.map +0 -1
- package/dist/_chunks/color-picker-D-tUwxxT.js.map +0 -1
- package/dist/_chunks/control-room-rail-IH1eBjrK.js +0 -333
- package/dist/_chunks/control-room-rail-IH1eBjrK.js.map +0 -1
- package/dist/_chunks/date-picker-Bp64zk2p.js.map +0 -1
- package/dist/_chunks/patient-details-qnsqYBGQ.js.map +0 -1
- package/dist/_chunks/patient-table-DwshfVsQ.js.map +0 -1
- package/dist/_chunks/payment-automation-upsell-BBIG7NFL.js.map +0 -1
- package/dist/_chunks/subDays-CAUv47M1.js +0 -8
package/dist/_chunks/{payment-automation-upsell-BBIG7NFL.js → payment-automation-upsell-DwQW2fRp.js}
RENAMED
|
@@ -1,88 +1,77 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as D, useId as r } from "react";
|
|
3
3
|
import { A as p } from "./alert-CiJT540z.js";
|
|
4
|
-
import { B as
|
|
4
|
+
import { B as M } from "./badge-sTusUqZD.js";
|
|
5
5
|
import { B as y } from "./benefit-card-DB1Kdrmc.js";
|
|
6
6
|
import { B as C } from "./button-nJaPh_HC.js";
|
|
7
7
|
import { C as d } from "./card-DPmk26CL.js";
|
|
8
8
|
import { L as n } from "./list-DgE1xWBM.js";
|
|
9
|
-
import { S as
|
|
10
|
-
import { C as f, R as
|
|
11
|
-
import { C as
|
|
9
|
+
import { S as P } from "./stat-Bs80Z6Yv.js";
|
|
10
|
+
import { C as f, R as U } from "./receipt-euro-C6k4Gzhr.js";
|
|
11
|
+
import { C as I } from "./circle-check-BN6rz4NV.js";
|
|
12
12
|
import { L as F } from "./lock-ClAFG1gy.js";
|
|
13
|
-
import { S as
|
|
14
|
-
import { c as
|
|
15
|
-
import { C as
|
|
16
|
-
import { R as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
13
|
+
import { S as q } from "./send-C5kDJ-Mz.js";
|
|
14
|
+
import { c as O } from "./createLucideIcon-DhHxpK9K.js";
|
|
15
|
+
import { C as W } from "./calendar-clock-hbObjfGY.js";
|
|
16
|
+
import { R as $ } from "./refresh-cw-DnI0cLFC.js";
|
|
17
|
+
import { R as G } from "./repeat-CvQa5rZt.js";
|
|
18
|
+
import { T as J } from "./triangle-alert-CBnO6nq_.js";
|
|
19
|
+
import { C as K } from "./clock-Drd4Wtis.js";
|
|
20
|
+
import { S as Q } from "./shield-check-DCJALLVh.js";
|
|
20
21
|
/**
|
|
21
22
|
* @license lucide-react v1.22.0 - ISC
|
|
22
23
|
*
|
|
23
24
|
* This source code is licensed under the ISC license.
|
|
24
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
25
26
|
*/
|
|
26
|
-
const
|
|
27
|
+
const V = [
|
|
27
28
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
28
29
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
29
|
-
],
|
|
30
|
-
/**
|
|
31
|
-
* @license lucide-react v1.22.0 - ISC
|
|
32
|
-
*
|
|
33
|
-
* This source code is licensed under the ISC license.
|
|
34
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/
|
|
36
|
-
const X = [
|
|
37
|
-
["path", { d: "m17 2 4 4-4 4", key: "nntrym" }],
|
|
38
|
-
["path", { d: "M3 11v-1a4 4 0 0 1 4-4h14", key: "84bu3i" }],
|
|
39
|
-
["path", { d: "m7 22-4-4 4-4", key: "1wqhfi" }],
|
|
40
|
-
["path", { d: "M21 13v1a4 4 0 0 1-4 4H3", key: "1rx37r" }]
|
|
41
|
-
], Y = I("repeat", X), Z = [
|
|
30
|
+
], X = O("arrow-right", V), Y = [
|
|
42
31
|
// eslint-disable-next-line no-restricted-syntax -- sanctioned PAU marketing serif display heading (constraint 10)
|
|
43
32
|
"ds:[font-family:var(--font-serif)] ds:italic ds:font-semibold ds:leading-tight",
|
|
44
33
|
"ds:text-[color:var(--primary)]"
|
|
45
34
|
].join(" "), w = [
|
|
46
|
-
/* @__PURE__ */ e(
|
|
35
|
+
/* @__PURE__ */ e(W, { "aria-hidden": "true", className: "ds:size-5" }, "0"),
|
|
47
36
|
/* @__PURE__ */ e(f, { "aria-hidden": "true", className: "ds:size-5" }, "1"),
|
|
48
|
-
/* @__PURE__ */ e(
|
|
49
|
-
/* @__PURE__ */ e(
|
|
50
|
-
], z = ["violet", "purple", "magenta"],
|
|
37
|
+
/* @__PURE__ */ e($, { "aria-hidden": "true", className: "ds:size-5" }, "2"),
|
|
38
|
+
/* @__PURE__ */ e(G, { "aria-hidden": "true", className: "ds:size-5" }, "3")
|
|
39
|
+
], z = ["violet", "purple", "magenta"], Z = {
|
|
51
40
|
paid: {
|
|
52
41
|
variant: "success",
|
|
53
|
-
icon: /* @__PURE__ */ e(
|
|
42
|
+
icon: /* @__PURE__ */ e(I, { "aria-hidden": "true", className: "ds:size-3.5" })
|
|
54
43
|
},
|
|
55
44
|
authorized: {
|
|
56
45
|
variant: "info",
|
|
57
|
-
icon: /* @__PURE__ */ e(
|
|
46
|
+
icon: /* @__PURE__ */ e(Q, { "aria-hidden": "true", className: "ds:size-3.5" })
|
|
58
47
|
},
|
|
59
48
|
pending: {
|
|
60
49
|
variant: "warning",
|
|
61
|
-
icon: /* @__PURE__ */ e(
|
|
50
|
+
icon: /* @__PURE__ */ e(K, { "aria-hidden": "true", className: "ds:size-3.5" })
|
|
62
51
|
},
|
|
63
52
|
overdue: {
|
|
64
53
|
variant: "error",
|
|
65
|
-
icon: /* @__PURE__ */ e(
|
|
54
|
+
icon: /* @__PURE__ */ e(J, { "aria-hidden": "true", className: "ds:size-3.5" })
|
|
66
55
|
}
|
|
67
|
-
},
|
|
56
|
+
}, ee = D(
|
|
68
57
|
({
|
|
69
|
-
role:
|
|
58
|
+
role: b = "owner",
|
|
70
59
|
labels: a,
|
|
71
|
-
steps:
|
|
60
|
+
steps: g,
|
|
72
61
|
features: l,
|
|
73
62
|
metrics: c,
|
|
74
63
|
previewRows: S,
|
|
75
64
|
locale: T = "it-IT",
|
|
76
65
|
currency: A = "EUR",
|
|
77
|
-
onActivate:
|
|
78
|
-
onNotifyAdmin:
|
|
79
|
-
className:
|
|
80
|
-
...
|
|
66
|
+
onActivate: k,
|
|
67
|
+
onNotifyAdmin: L,
|
|
68
|
+
className: R,
|
|
69
|
+
...B
|
|
81
70
|
}, E) => {
|
|
82
|
-
const
|
|
71
|
+
const h = r(), u = r(), o = r(), m = r(), v = r(), H = new Intl.NumberFormat(T, {
|
|
83
72
|
style: "currency",
|
|
84
73
|
currency: A
|
|
85
|
-
}),
|
|
74
|
+
}), j = Math.min(Math.max(g.length, 1), 4), x = Math.ceil(l.length / 2), _ = [
|
|
86
75
|
l.slice(0, x),
|
|
87
76
|
l.slice(x)
|
|
88
77
|
].filter((s) => s.length > 0);
|
|
@@ -91,13 +80,13 @@ const X = [
|
|
|
91
80
|
{
|
|
92
81
|
ref: E,
|
|
93
82
|
"data-component": "payment-automation-upsell",
|
|
94
|
-
"aria-labelledby":
|
|
83
|
+
"aria-labelledby": h,
|
|
95
84
|
className: [
|
|
96
85
|
"ds:mx-auto ds:flex ds:w-full ds:max-w-[80rem] ds:flex-col ds:gap-[var(--spacing-lg)]",
|
|
97
86
|
"ds:text-[color:var(--foreground)]",
|
|
98
|
-
|
|
87
|
+
R ?? ""
|
|
99
88
|
].filter(Boolean).join(" "),
|
|
100
|
-
...
|
|
89
|
+
...B,
|
|
101
90
|
children: [
|
|
102
91
|
/* @__PURE__ */ e(d, { variant: "elevated", children: /* @__PURE__ */ i(d.Body, { className: "ds:relative ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:overflow-hidden ds:sm:flex-row ds:sm:items-center ds:sm:justify-between ds:sm:gap-[var(--spacing-lg)]", children: [
|
|
103
92
|
/* @__PURE__ */ i("div", { className: "ds:flex ds:max-w-prose ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
@@ -108,8 +97,8 @@ const X = [
|
|
|
108
97
|
/* @__PURE__ */ e(
|
|
109
98
|
"h1",
|
|
110
99
|
{
|
|
111
|
-
id:
|
|
112
|
-
className: `${
|
|
100
|
+
id: h,
|
|
101
|
+
className: `${Y} ds:text-[length:var(--font-size-4xl)]`,
|
|
113
102
|
children: a.title
|
|
114
103
|
}
|
|
115
104
|
),
|
|
@@ -130,7 +119,7 @@ const X = [
|
|
|
130
119
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
131
120
|
children: [
|
|
132
121
|
/* @__PURE__ */ e("h2", { id: u, className: "type-title-section", children: a.howItWorksHeading }),
|
|
133
|
-
/* @__PURE__ */ e(y.Row, { columns:
|
|
122
|
+
/* @__PURE__ */ e(y.Row, { columns: j, children: g.map((s, t) => /* @__PURE__ */ e(
|
|
134
123
|
y,
|
|
135
124
|
{
|
|
136
125
|
step: t + 1,
|
|
@@ -161,23 +150,23 @@ const X = [
|
|
|
161
150
|
density: "relaxed",
|
|
162
151
|
"aria-labelledby": o,
|
|
163
152
|
children: S.map((s) => {
|
|
164
|
-
const t =
|
|
153
|
+
const t = Z[s.status];
|
|
165
154
|
return /* @__PURE__ */ e(
|
|
166
155
|
n.Item,
|
|
167
156
|
{
|
|
168
157
|
title: s.title,
|
|
169
158
|
description: s.meta,
|
|
170
159
|
leading: /* @__PURE__ */ e("span", { className: "ds:flex ds:size-10 ds:items-center ds:justify-center ds:rounded-full ds:bg-[color:var(--muted)] ds:text-[color:var(--accent)]", children: /* @__PURE__ */ e(
|
|
171
|
-
|
|
160
|
+
U,
|
|
172
161
|
{
|
|
173
162
|
"aria-hidden": "true",
|
|
174
163
|
className: "ds:size-5"
|
|
175
164
|
}
|
|
176
165
|
) }),
|
|
177
166
|
trailing: /* @__PURE__ */ i("span", { className: "ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-2xs)]", children: [
|
|
178
|
-
/* @__PURE__ */ e("span", { className: "type-metric ds:text-[color:var(--foreground)] ds:[--type-metric-size:var(--font-size-xl)]", children:
|
|
167
|
+
/* @__PURE__ */ e("span", { className: "type-metric ds:text-[color:var(--foreground)] ds:[--type-metric-size:var(--font-size-xl)]", children: H.format(s.amountCents / 100) }),
|
|
179
168
|
/* @__PURE__ */ e(
|
|
180
|
-
|
|
169
|
+
M,
|
|
181
170
|
{
|
|
182
171
|
variant: t.variant,
|
|
183
172
|
size: "sm",
|
|
@@ -206,7 +195,7 @@ const X = [
|
|
|
206
195
|
a.ctaCardSubtitle ? /* @__PURE__ */ e("p", { className: "type-body ds:text-[color:var(--muted-foreground)]", children: a.ctaCardSubtitle }) : null
|
|
207
196
|
] }),
|
|
208
197
|
c && c.length > 0 ? /* @__PURE__ */ e("div", { className: "ds:grid ds:gap-[var(--spacing-md)] ds:[grid-template-columns:repeat(auto-fit,minmax(14rem,1fr))]", children: c.map((s) => /* @__PURE__ */ e(
|
|
209
|
-
|
|
198
|
+
P,
|
|
210
199
|
{
|
|
211
200
|
label: s.label,
|
|
212
201
|
value: s.value,
|
|
@@ -226,7 +215,7 @@ const X = [
|
|
|
226
215
|
children: a.featuresHeading
|
|
227
216
|
}
|
|
228
217
|
) : null,
|
|
229
|
-
/* @__PURE__ */ e("div", { className: "ds:grid ds:gap-x-[var(--spacing-2xl)] ds:gap-y-[var(--spacing-sm)] ds:sm:grid-cols-2", children:
|
|
218
|
+
/* @__PURE__ */ e("div", { className: "ds:grid ds:gap-x-[var(--spacing-2xl)] ds:gap-y-[var(--spacing-sm)] ds:sm:grid-cols-2", children: _.map((s, t) => /* @__PURE__ */ e(
|
|
230
219
|
n,
|
|
231
220
|
{
|
|
232
221
|
divider: "spaced",
|
|
@@ -237,7 +226,7 @@ const X = [
|
|
|
237
226
|
{
|
|
238
227
|
title: N.label,
|
|
239
228
|
leading: /* @__PURE__ */ e(
|
|
240
|
-
|
|
229
|
+
I,
|
|
241
230
|
{
|
|
242
231
|
"aria-hidden": "true",
|
|
243
232
|
className: "ds:size-5 ds:text-[color:var(--success)]"
|
|
@@ -251,7 +240,7 @@ const X = [
|
|
|
251
240
|
)) })
|
|
252
241
|
] }) }),
|
|
253
242
|
/* @__PURE__ */ i("div", { className: "ds:mx-auto ds:flex ds:w-full ds:max-w-[28rem] ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
254
|
-
|
|
243
|
+
b === "member" ? /* @__PURE__ */ i("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
255
244
|
a.memberNoticeTitle || a.memberNoticeDescription ? /* @__PURE__ */ i(
|
|
256
245
|
p,
|
|
257
246
|
{
|
|
@@ -269,9 +258,9 @@ const X = [
|
|
|
269
258
|
{
|
|
270
259
|
intent: "secondary",
|
|
271
260
|
size: "lg",
|
|
272
|
-
startIcon: /* @__PURE__ */ e(
|
|
261
|
+
startIcon: /* @__PURE__ */ e(q, {}),
|
|
273
262
|
flipIconInRtl: !0,
|
|
274
|
-
onClick:
|
|
263
|
+
onClick: L,
|
|
275
264
|
className: "ds:w-full",
|
|
276
265
|
children: a.notifyAdminLabel ?? a.activateLabel
|
|
277
266
|
}
|
|
@@ -281,9 +270,9 @@ const X = [
|
|
|
281
270
|
{
|
|
282
271
|
intent: "primary",
|
|
283
272
|
size: "lg",
|
|
284
|
-
endIcon: /* @__PURE__ */ e(
|
|
273
|
+
endIcon: /* @__PURE__ */ e(X, {}),
|
|
285
274
|
flipIconInRtl: !0,
|
|
286
|
-
onClick:
|
|
275
|
+
onClick: k,
|
|
287
276
|
className: "ds:w-full",
|
|
288
277
|
children: a.activateLabel
|
|
289
278
|
}
|
|
@@ -298,8 +287,8 @@ const X = [
|
|
|
298
287
|
);
|
|
299
288
|
}
|
|
300
289
|
);
|
|
301
|
-
|
|
290
|
+
ee.displayName = "PaymentAutomationUpsell";
|
|
302
291
|
export {
|
|
303
|
-
|
|
292
|
+
ee as P
|
|
304
293
|
};
|
|
305
|
-
//# sourceMappingURL=payment-automation-upsell-
|
|
294
|
+
//# sourceMappingURL=payment-automation-upsell-DwQW2fRp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-automation-upsell-DwQW2fRp.js","sources":["../../node_modules/lucide-react/dist/esm/icons/arrow-right.mjs","../../src/patterns/payment-automation-upsell/payment-automation-upsell.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: \"M5 12h14\", key: \"1ays0h\" }],\n [\"path\", { d: \"m12 5 7 7-7 7\", key: \"xquz4c\" }]\n];\nconst ArrowRight = createLucideIcon(\"arrow-right\", __iconNode);\n\nexport { __iconNode, ArrowRight as default };\n//# sourceMappingURL=arrow-right.mjs.map\n","/* -------------------------------------------------------------------- */\n/* Payment Automation Upsell — PLG surface for the payment-request index */\n/* when the Payment Automation (PAU) module is NOT enabled. */\n/* */\n/* Replaces the old dead-end \"module disabled\" page with a value preview */\n/* + role-aware call to action. Ships as a RUNTIME pattern (an importable */\n/* component) so the platform mounts it directly instead of hand-rolling */\n/* markup — see src/patterns/README.md § \"Exception — runtime patterns\". */\n/* */\n/* Copy is consumer-owned: every user-visible string arrives pre- */\n/* translated via props (the host app localises through its own i18n), */\n/* mirroring MarketplaceAppShell. The kit owns the design, not the words. */\n/* Marketing-serif display heading is the DS-owner-sanctioned PAU */\n/* exception (CLAUDE.md constraint 10 / 06-i18n § Font Requirements). */\n/* -------------------------------------------------------------------- */\n\nimport { forwardRef, useId, type HTMLAttributes, type ReactNode } from 'react';\nimport {\n ArrowRight,\n CalendarClock,\n CircleCheck,\n Clock,\n CreditCard,\n Lock,\n ReceiptEuro,\n RefreshCw,\n Repeat,\n Send,\n ShieldCheck,\n TriangleAlert,\n} from 'lucide-react';\n\nimport { Alert } from '../../components/alert';\nimport { Badge } from '../../components/badge';\nimport { BenefitCard } from '../../components/benefit-card';\nimport { Button } from '../../components/button';\nimport { Card } from '../../components/card';\nimport { List } from '../../components/list';\nimport { Stat } from '../../components/stat';\n\n/** Who is viewing the surface — drives which CTA is shown. */\nexport type PaymentAutomationUpsellRole = 'owner' | 'member';\n\n/** Status of a mock payment request in the preview. */\nexport type PaymentAutomationUpsellRequestStatus =\n | 'paid'\n | 'authorized'\n | 'pending'\n | 'overdue';\n\nexport interface PaymentAutomationUpsellStep {\n id: string;\n /** Pre-translated step title. */\n title: string;\n /** Pre-translated step body. */\n description: string;\n /** Optional icon override; a sensible default is chosen per position. */\n icon?: ReactNode;\n}\n\nexport interface PaymentAutomationUpsellFeature {\n id: string;\n /** Pre-translated single line of the \"what's included\" checklist. */\n label: string;\n}\n\nexport interface PaymentAutomationUpsellMetric {\n id: string;\n /** Headline value, already formatted/localised, e.g. \"3×\" or \"−75%\". */\n value: string;\n /** Pre-translated caption under the value. */\n label: string;\n}\n\nexport interface PaymentAutomationUpsellPreviewRow {\n id: string;\n /** Pre-translated row title, e.g. \"Richiesta RDP-2026-0042\". */\n title: string;\n /** Optional pre-translated secondary line (plan / date). Never real PHI. */\n meta?: string;\n /** Amount in minor units (cents); formatted with `locale` + `currency`. */\n amountCents: number;\n /** Drives the status badge colour + icon. */\n status: PaymentAutomationUpsellRequestStatus;\n /** Pre-translated status label shown in the badge. */\n statusLabel: string;\n}\n\nexport interface PaymentAutomationUpsellLabels {\n /** Small eyebrow above the headline — usually the module name. */\n eyebrow?: string;\n /** Serif display headline. */\n title: string;\n /** One- or two-sentence supporting subtitle. */\n subtitle: string;\n /** Heading for the \"how it works\" step column. */\n howItWorksHeading: string;\n /** Heading for the mock preview. */\n previewHeading: string;\n /** Optional small caption flagging the preview as illustrative. */\n previewCaption?: string;\n /** Title of the right-hand call-to-action card. */\n ctaCardTitle: string;\n /** Optional pitch line under the CTA card title. */\n ctaCardSubtitle?: string;\n /** Optional heading above the feature checklist. */\n featuresHeading?: string;\n /** Optional price / plan note, e.g. \"Incluso nel piano Premium\". */\n priceNote?: string;\n /** Owner primary CTA label. */\n activateLabel: string;\n /** Member: notice title explaining they cannot self-activate. */\n memberNoticeTitle?: string;\n /** Member: notice body. */\n memberNoticeDescription?: string;\n /** Member CTA label. */\n notifyAdminLabel?: string;\n}\n\nexport interface PaymentAutomationUpsellProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'title'\n> {\n /** Who is viewing. Owners can self-activate; members ask an admin. Default `owner`. */\n role?: PaymentAutomationUpsellRole;\n /** All user-visible copy — pre-translated by the host app. */\n labels: PaymentAutomationUpsellLabels;\n /** \"How it works\" steps, rendered as numbered BenefitCards. */\n steps: PaymentAutomationUpsellStep[];\n /** \"What's included\" checklist. */\n features: PaymentAutomationUpsellFeature[];\n /** Optional proof metrics shown in the CTA card. */\n metrics?: PaymentAutomationUpsellMetric[];\n /** Mock payment-request rows for the preview. */\n previewRows: PaymentAutomationUpsellPreviewRow[];\n /** BCP-47 locale used for currency formatting. Default `it-IT`. */\n locale?: string;\n /** ISO-4217 currency for the preview amounts. Default `EUR`. */\n currency?: string;\n /** Owner CTA handler — host navigates to the activation / upgrade flow. */\n onActivate?: () => void;\n /** Member CTA handler — host notifies the practice owner / admin. */\n onNotifyAdmin?: () => void;\n}\n\n/* Marketing serif is the DS-owner-sanctioned PAU exception; body/UI stays sans. */\nconst HEADLINE_CLASS = [\n // eslint-disable-next-line no-restricted-syntax -- sanctioned PAU marketing serif display heading (constraint 10)\n 'ds:[font-family:var(--font-serif)] ds:italic ds:font-semibold ds:leading-tight',\n 'ds:text-[color:var(--primary)]',\n].join(' ');\n\nconst DEFAULT_STEP_ICONS: ReactNode[] = [\n <CalendarClock aria-hidden=\"true\" className=\"ds:size-5\" key=\"0\" />,\n <CreditCard aria-hidden=\"true\" className=\"ds:size-5\" key=\"1\" />,\n <RefreshCw aria-hidden=\"true\" className=\"ds:size-5\" key=\"2\" />,\n <Repeat aria-hidden=\"true\" className=\"ds:size-5\" key=\"3\" />,\n];\n\n/* Brand-only accent rotation. The BenefitCard `auto`/`blue`+ wheel pairs each\n hue with the next (blue→green, green→red), so anything past `magenta` bleeds\n into semantic colours. Cap to the three brand hues and wrap. */\nconst STEP_ACCENTS = ['violet', 'purple', 'magenta'] as const;\n\nconst STATUS_META: Record<\n PaymentAutomationUpsellRequestStatus,\n { variant: 'success' | 'info' | 'warning' | 'error'; icon: ReactNode }\n> = {\n paid: {\n variant: 'success',\n icon: <CircleCheck aria-hidden=\"true\" className=\"ds:size-3.5\" />,\n },\n authorized: {\n variant: 'info',\n icon: <ShieldCheck aria-hidden=\"true\" className=\"ds:size-3.5\" />,\n },\n pending: {\n variant: 'warning',\n icon: <Clock aria-hidden=\"true\" className=\"ds:size-3.5\" />,\n },\n overdue: {\n variant: 'error',\n icon: <TriangleAlert aria-hidden=\"true\" className=\"ds:size-3.5\" />,\n },\n};\n\nexport const PaymentAutomationUpsell = forwardRef<\n HTMLElement,\n PaymentAutomationUpsellProps\n>(\n (\n {\n role = 'owner',\n labels,\n steps,\n features,\n metrics,\n previewRows,\n locale = 'it-IT',\n currency = 'EUR',\n onActivate,\n onNotifyAdmin,\n className,\n ...rest\n },\n ref,\n ) => {\n const headingId = useId();\n const howHeadingId = useId();\n const previewHeadingId = useId();\n const ctaTitleId = useId();\n const featuresHeadingId = useId();\n\n const money = new Intl.NumberFormat(locale, {\n style: 'currency',\n currency,\n });\n\n const stepColumns = Math.min(Math.max(steps.length, 1), 4) as 1 | 2 | 3 | 4;\n\n // Split the \"what's included\" checklist into two balanced columns so the\n // full-width card reads as a filled panel rather than a left-hugging strip.\n const featureMid = Math.ceil(features.length / 2);\n const featureColumns = [\n features.slice(0, featureMid),\n features.slice(featureMid),\n ].filter((column) => column.length > 0);\n\n return (\n <section\n ref={ref}\n data-component=\"payment-automation-upsell\"\n aria-labelledby={headingId}\n className={[\n 'ds:mx-auto ds:flex ds:w-full ds:max-w-[80rem] ds:flex-col ds:gap-[var(--spacing-lg)]',\n 'ds:text-[color:var(--foreground)]',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ')}\n {...rest}\n >\n {/* Hero — pure value proposition, no action. */}\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:relative ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:overflow-hidden ds:sm:flex-row ds:sm:items-center ds:sm:justify-between ds:sm:gap-[var(--spacing-lg)]\">\n <div className=\"ds:flex ds:max-w-prose ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {labels.eyebrow ? (\n <span className=\"type-eyebrow ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[color:var(--accent)]\">\n <CreditCard aria-hidden=\"true\" className=\"ds:size-4\" />\n {labels.eyebrow}\n </span>\n ) : null}\n <h1\n id={headingId}\n className={`${HEADLINE_CLASS} ds:text-[length:var(--font-size-4xl)]`}\n >\n {labels.title}\n </h1>\n <p className=\"type-body ds:text-[color:var(--muted-foreground)]\">\n {labels.subtitle}\n </p>\n </div>\n <CreditCard\n aria-hidden=\"true\"\n className=\"ds:pointer-events-none ds:hidden ds:size-28 ds:shrink-0 ds:text-[color:var(--accent)] ds:opacity-15 ds:lg:block\"\n />\n </Card.Body>\n </Card>\n\n {/* How it works — the flow, as numbered steps. */}\n <section\n aria-labelledby={howHeadingId}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\"\n >\n <h2 id={howHeadingId} className=\"type-title-section\">\n {labels.howItWorksHeading}\n </h2>\n <BenefitCard.Row columns={stepColumns}>\n {steps.map((step, index) => (\n <BenefitCard\n key={step.id}\n step={index + 1}\n accent={STEP_ACCENTS[index % STEP_ACCENTS.length]}\n icon={\n step.icon ??\n DEFAULT_STEP_ICONS[index % DEFAULT_STEP_ICONS.length]\n }\n title={step.title}\n >\n {step.description}\n </BenefitCard>\n ))}\n </BenefitCard.Row>\n </section>\n\n {/* Preview — an illustrative peek at the generated requests. */}\n <section\n aria-labelledby={previewHeadingId}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n >\n <div className=\"ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <h2 id={previewHeadingId} className=\"type-title-section\">\n {labels.previewHeading}\n </h2>\n {labels.previewCaption ? (\n <span className=\"type-eyebrow ds:text-[color:var(--muted-foreground)]\">\n {labels.previewCaption}\n </span>\n ) : null}\n </div>\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:p-[var(--spacing-lg)]\">\n <List\n divider=\"spaced\"\n density=\"relaxed\"\n aria-labelledby={previewHeadingId}\n >\n {previewRows.map((row) => {\n const status = STATUS_META[row.status];\n return (\n <List.Item\n key={row.id}\n title={row.title}\n description={row.meta}\n leading={\n <span className=\"ds:flex ds:size-10 ds:items-center ds:justify-center ds:rounded-full ds:bg-[color:var(--muted)] ds:text-[color:var(--accent)]\">\n <ReceiptEuro\n aria-hidden=\"true\"\n className=\"ds:size-5\"\n />\n </span>\n }\n trailing={\n <span className=\"ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-2xs)]\">\n <span className=\"type-metric ds:text-[color:var(--foreground)] ds:[--type-metric-size:var(--font-size-xl)]\">\n {money.format(row.amountCents / 100)}\n </span>\n <Badge\n variant={status.variant}\n size=\"sm\"\n leading={status.icon}\n >\n {row.statusLabel}\n </Badge>\n </span>\n }\n />\n );\n })}\n </List>\n </Card.Body>\n </Card>\n </section>\n\n {/* Conversion — proof metrics + what's included + the CTA. */}\n <section\n aria-labelledby={ctaTitleId}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]\"\n >\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <h2 id={ctaTitleId} className=\"type-title-section\">\n {labels.ctaCardTitle}\n </h2>\n {labels.ctaCardSubtitle ? (\n <p className=\"type-body ds:text-[color:var(--muted-foreground)]\">\n {labels.ctaCardSubtitle}\n </p>\n ) : null}\n </div>\n\n {metrics && metrics.length > 0 ? (\n <div className=\"ds:grid ds:gap-[var(--spacing-md)] ds:[grid-template-columns:repeat(auto-fit,minmax(14rem,1fr))]\">\n {metrics.map((metric) => (\n <Stat\n key={metric.id}\n label={metric.label}\n value={metric.value}\n variant=\"elevated\"\n size=\"lg\"\n intent=\"primary\"\n // eslint-disable-next-line no-restricted-syntax -- sanctioned PAU marketing serif KPI numerals (constraint 10)\n className=\"ds:[--type-metric-family:var(--font-serif)]\"\n />\n ))}\n </div>\n ) : null}\n\n {/* What's included — full-width card, two balanced columns. */}\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-lg)]\">\n {labels.featuresHeading ? (\n <span\n id={featuresHeadingId}\n className=\"type-eyebrow ds:text-[color:var(--muted-foreground)]\"\n >\n {labels.featuresHeading}\n </span>\n ) : null}\n <div className=\"ds:grid ds:gap-x-[var(--spacing-2xl)] ds:gap-y-[var(--spacing-sm)] ds:sm:grid-cols-2\">\n {featureColumns.map((column, columnIndex) => (\n <List\n key={columnIndex}\n divider=\"spaced\"\n density=\"default\"\n aria-labelledby={\n labels.featuresHeading ? featuresHeadingId : ctaTitleId\n }\n >\n {column.map((feature) => (\n <List.Item\n key={feature.id}\n title={feature.label}\n leading={\n <CircleCheck\n aria-hidden=\"true\"\n className=\"ds:size-5 ds:text-[color:var(--success)]\"\n />\n }\n />\n ))}\n </List>\n ))}\n </div>\n </Card.Body>\n </Card>\n\n {/* CTA — centred + width-capped so the button never stretches full-bleed. */}\n <div className=\"ds:mx-auto ds:flex ds:w-full ds:max-w-[28rem] ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {role === 'member' ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {labels.memberNoticeTitle || labels.memberNoticeDescription ? (\n <Alert\n variant=\"info\"\n live=\"off\"\n icon={<Lock aria-hidden=\"true\" className=\"ds:size-4\" />}\n >\n {labels.memberNoticeTitle ? (\n <Alert.Title as=\"p\">\n {labels.memberNoticeTitle}\n </Alert.Title>\n ) : null}\n {labels.memberNoticeDescription ? (\n <Alert.Description>\n {labels.memberNoticeDescription}\n </Alert.Description>\n ) : null}\n </Alert>\n ) : null}\n <Button\n intent=\"secondary\"\n size=\"lg\"\n startIcon={<Send />}\n flipIconInRtl\n onClick={onNotifyAdmin}\n className=\"ds:w-full\"\n >\n {labels.notifyAdminLabel ?? labels.activateLabel}\n </Button>\n </div>\n ) : (\n <Button\n intent=\"primary\"\n size=\"lg\"\n endIcon={<ArrowRight />}\n flipIconInRtl\n onClick={onActivate}\n className=\"ds:w-full\"\n >\n {labels.activateLabel}\n </Button>\n )}\n\n {labels.priceNote ? (\n <p className=\"type-meta ds:text-center ds:text-[color:var(--muted-foreground)]\">\n {labels.priceNote}\n </p>\n ) : null}\n </div>\n </section>\n </section>\n );\n },\n);\n\nPaymentAutomationUpsell.displayName = 'PaymentAutomationUpsell';\n"],"names":["__iconNode","ArrowRight","createLucideIcon","HEADLINE_CLASS","DEFAULT_STEP_ICONS","CalendarClock","CreditCard","RefreshCw","Repeat","STEP_ACCENTS","STATUS_META","jsx","CircleCheck","ShieldCheck","Clock","TriangleAlert","PaymentAutomationUpsell","forwardRef","role","labels","steps","features","metrics","previewRows","locale","currency","onActivate","onNotifyAdmin","className","rest","ref","headingId","useId","howHeadingId","previewHeadingId","ctaTitleId","featuresHeadingId","money","stepColumns","featureMid","featureColumns","column","jsxs","Card","BenefitCard","step","index","List","row","status","ReceiptEuro","Badge","metric","Stat","columnIndex","feature","Alert","Lock","Button","Send"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAAA,EACzC,CAAC,QAAQ,EAAE,GAAG,iBAAiB,KAAK,SAAQ,CAAE;AAChD,GACMC,IAAaC,EAAiB,eAAeF,CAAU,GCqIvDG,IAAiB;AAAA;AAAA,EAErB;AAAA,EACA;AACF,EAAE,KAAK,GAAG,GAEJC,IAAkC;AAAA,oBACrCC,GAAA,EAAc,eAAY,QAAO,WAAU,eAAgB,GAAI;AAAA,oBAC/DC,GAAA,EAAW,eAAY,QAAO,WAAU,eAAgB,GAAI;AAAA,oBAC5DC,GAAA,EAAU,eAAY,QAAO,WAAU,eAAgB,GAAI;AAAA,oBAC3DC,GAAA,EAAO,eAAY,QAAO,WAAU,eAAgB,GAAI;AAC3D,GAKMC,IAAe,CAAC,UAAU,UAAU,SAAS,GAE7CC,IAGF;AAAA,EACF,MAAM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AArC,EAAO,kBAAA,CACV,IACE;AAAA,0BACHA,EAAO,0BACN,gBAAAR,EAAC6C,EAAM,aAAN,EACE,UAAArC,EAAO,yBACV,IACE;AAAA,wBAAA;AAAA,sBAAA;AAAA,oBAAA,IAEJ;AAAA,oBACJ,gBAAAR;AAAA,sBAAC+C;AAAA,sBAAA;AAAA,wBACC,QAAO;AAAA,wBACP,MAAK;AAAA,wBACL,6BAAYC,GAAA,EAAK;AAAA,wBACjB,eAAa;AAAA,wBACb,SAAShC;AAAA,wBACT,WAAU;AAAA,wBAET,UAAAR,EAAO,oBAAoBA,EAAO;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBACrC,EAAA,CACF,IAEA,gBAAAR;AAAA,oBAAC+C;AAAA,oBAAA;AAAA,sBACC,QAAO;AAAA,sBACP,MAAK;AAAA,sBACL,2BAAUzD,GAAA,EAAW;AAAA,sBACrB,eAAa;AAAA,sBACb,SAASyB;AAAA,sBACT,WAAU;AAAA,sBAET,UAAAP,EAAO;AAAA,oBAAA;AAAA,kBAAA;AAAA,kBAIXA,EAAO,YACN,gBAAAR,EAAC,KAAA,EAAE,WAAU,oEACV,UAAAQ,EAAO,WACV,IACE;AAAA,gBAAA,EAAA,CACN;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAH,GAAwB,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -14,7 +14,7 @@ import { R as ne, C as $ } from "./receipt-euro-C6k4Gzhr.js";
|
|
|
14
14
|
import { F as J } from "./file-text-5yv6r2ls.js";
|
|
15
15
|
import { U as ie } from "./user-B12p7bVF.js";
|
|
16
16
|
import { U as le } from "./user-cog-BTn98Arm.js";
|
|
17
|
-
import { e as Q } from "./entity-card-
|
|
17
|
+
import { e as Q } from "./entity-card-DmrgYSEX.js";
|
|
18
18
|
import { A as de } from "./arrow-up-right-C2v_MKsK.js";
|
|
19
19
|
import { L as oe } from "./link-CPb_pZPr.js";
|
|
20
20
|
import { C as se } from "./calendar-clock-hbObjfGY.js";
|
|
@@ -438,4 +438,4 @@ export {
|
|
|
438
438
|
Ce as b,
|
|
439
439
|
me as p
|
|
440
440
|
};
|
|
441
|
-
//# sourceMappingURL=payment-request-card-
|
|
441
|
+
//# sourceMappingURL=payment-request-card-YVCcCZ25.js.map
|
package/dist/_chunks/{payment-request-card-BjjBMdsp.js.map → payment-request-card-YVCcCZ25.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-request-card-BjjBMdsp.js","sources":["../../src/components/payment-card/payment-card.agent.ts","../../src/components/payment-card/payment-card.tsx","../../src/components/payment-card/payment-request-card.agent.ts","../../src/components/payment-card/payment-request-card.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — PaymentCard. */\n/* */\n/* Read-only financial-record surface. Exposes the payment number */\n/* (identifier) and the resolved headline state (structural) — never */\n/* patient / operator names or any other PHI. No actions: the card is a */\n/* passive presentation surface. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { PaymentCardHandle } from './payment-card';\n\nexport const paymentCardAgent: AgentAdapter<PaymentCardHandle> = {\n id: 'payment-card',\n capabilities: [],\n state: {\n number: {\n type: 'string',\n descriptionKey: 'ui.agent.paymentCard.state.number',\n description: 'Payment number / reference currently rendered.',\n read: (handle) => handle.getNumber(),\n },\n state: {\n type: \"'debt' | 'to-invoice' | 'settled'\",\n descriptionKey: 'ui.agent.paymentCard.state.state',\n description:\n 'Resolved headline financial state. Structural state only — never patient identity.',\n read: (handle) => handle.getState(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'payment-card',\n description: 'Marks the PaymentCard root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop. Addresses a specific card.',\n },\n },\n};\n","import {\n forwardRef,\n useId,\n useMemo,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport {\n ArrowDownLeft,\n ArrowUpRight,\n CalendarDays,\n FileText,\n Hash,\n ReceiptEuro,\n User,\n UserCog,\n} from 'lucide-react';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { DescriptionList } from '../description-list/description-list';\nimport { KeyValueList, KeyValuePair } from '../key-value-pair/key-value-pair';\nimport { TransactionChip } from '../transaction-chip/transaction-chip';\nimport { entitySurfaceVariants } from '../_shared/entity-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { paymentCardAgent } from './payment-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* PaymentCard */\n/* */\n/* Financial-record card for a single payment / receipt. Replaces the */\n/* hand-rolled \"Pagamento\" / payment-row cards that the platform's */\n/* care-plan and patient-ledger surfaces compose today. Composes */\n/* TransactionChip (the settled/debt/to-invoice headline) + KeyValueList */\n/* (number, date, type, direction, relations) + DescriptionList (line */\n/* items) + Badge (the payment type). */\n/* */\n/* The component owns the ORDER, ICONS, and LABELS; the consumer passes */\n/* the data. Every visible string flows through `useTranslation('ui')` */\n/* against the `paymentCard.*` namespace. The agent state slot exposes */\n/* identifiers + structural state only — never patient names. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* Vocabulary */\n/* -------------------------------------------------------------------- */\n\n/** Payment type → translation-key segment + Badge variant. */\nexport type PaymentType = 'full' | 'partial' | 'credit' | 'proforma' | 'other';\n\nexport type PaymentDirection = 'incoming' | 'outgoing';\n\ntype BadgeVariant = NonNullable<\n ComponentPropsWithoutRef<typeof Badge>['variant']\n>;\n\nconst PAYMENT_TYPE_BADGE = {\n full: 'success',\n partial: 'warning',\n credit: 'info',\n proforma: 'neutral',\n other: 'neutral',\n} as const satisfies Record<PaymentType, BadgeVariant>;\n\nconst DEFAULT_CURRENCY = 'EUR';\n\n// Inline English fallbacks — belt-and-braces only. The canonical keys\n// live in the locale bundle (`ui.paymentCard.*`); these guard against a\n// stale / not-yet-wired bundle so the card never renders a raw key.\nconst TYPE_DEFAULTS: Record<PaymentType, string> = {\n full: 'Full payment',\n partial: 'Partial payment',\n credit: 'Credit note',\n proforma: 'Proforma',\n other: 'Other',\n};\n\nconst DIRECTION_DEFAULTS: Record<PaymentDirection, string> = {\n incoming: 'Incoming',\n outgoing: 'Outgoing',\n};\n\n/* -------------------------------------------------------------------- */\n/* CVA — root */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva('ds:w-full ds:text-[color:var(--foreground)]', {\n variants: {\n surface: {\n flat: '',\n elevated: '',\n },\n },\n defaultVariants: { surface: 'elevated' },\n});\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface PaymentLineItem {\n /** Human-readable description of the line. */\n description: string;\n /** Amount in the smallest currency unit (cents / centesimi). */\n amountCents: number;\n /** Optional VAT percentage (e.g. `22` for 22%). */\n vatPercentage?: number;\n}\n\nexport interface PaymentCardRelations {\n /** Care-plan / treatment-plan number this payment belongs to. */\n carePlanNumber?: string;\n /** Patient display name — rendered, but never exposed to the agent. */\n patientName?: string;\n /** Operator display name — rendered, but never exposed to the agent. */\n operatorName?: string;\n}\n\nexport interface PaymentCardHandle {\n /** Stable payment number currently rendered. Identifier only — no PHI. */\n getNumber: () => string;\n /** Resolved headline financial state. Structural state only. */\n getState: () => TransactionStateValue;\n}\n\n/** The TransactionChip state this card resolves the payment to. */\ntype TransactionStateValue = 'debt' | 'to-invoice' | 'settled';\n\nexport interface PaymentCardProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'aria-label' | 'children'\n> {\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n /** Human-readable payment number / reference. Rendered as the heading. */\n number: string;\n /** ISO-8601 date string for the payment date. */\n dateIso?: string;\n /** Payment type — drives the type Badge + label. */\n type: PaymentType;\n /** Money flow direction — incoming (patient → practice) or outgoing. */\n direction: PaymentDirection;\n /** Gross total in the smallest currency unit (cents). */\n grossCents?: number;\n /** Amount already paid, in cents. */\n paidCents?: number;\n /** Amount still outstanding, in cents. */\n unpaidCents?: number;\n /** Marks the record as written-off — renders a neutral chip. */\n writtenOff?: boolean;\n /** Linked entities (care plan / patient / operator). */\n relations?: PaymentCardRelations;\n /** Itemised breakdown rendered as a DescriptionList. */\n lineItems?: PaymentLineItem[];\n /** BCP-47 locale override. Falls back to the active i18next language. */\n locale?: string;\n /** ISO-4217 currency code. Defaults to `EUR`. */\n currency?: string;\n\n /* ----- Styling ----- */\n\n /**\n * `'elevated'` (default) wraps in `<Card variant=\"elevated\">`. `'flat'`\n * drops the Card — use inside an existing card / sheet.\n */\n surface?: 'flat' | 'elevated';\n\n /* ----- a11y ----- */\n\n /** Override the default region aria-label. */\n 'aria-label'?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\n/** Format cents → currency string for the consumer's locale. */\nfunction formatMoney(cents: number, currency: string, locale: string): string {\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency,\n }).format(cents / 100);\n } catch {\n return (cents / 100).toFixed(2);\n }\n}\n\n/** Format an ISO date for the consumer's locale, gracefully degrading. */\nfunction formatDate(iso: string, locale: string): string {\n const date = new Date(iso);\n if (Number.isNaN(date.getTime())) return iso;\n try {\n return new Intl.DateTimeFormat(locale, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n }).format(date);\n } catch {\n return iso;\n }\n}\n\n/**\n * Resolve the headline TransactionChip state from the paid / unpaid /\n * written-off inputs. Written-off → settled chip; an outstanding balance\n * → debt; a proforma with nothing paid → to-invoice; otherwise settled.\n */\nfunction resolveState(\n type: PaymentType,\n paidCents: number | undefined,\n unpaidCents: number | undefined,\n writtenOff: boolean | undefined,\n): TransactionStateValue {\n if (writtenOff) return 'settled';\n if (unpaidCents != null && unpaidCents > 0) return 'debt';\n if (type === 'proforma' && (paidCents == null || paidCents === 0)) {\n return 'to-invoice';\n }\n return 'settled';\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const PaymentCard = forwardRef<HTMLDivElement, PaymentCardProps>(\n (\n {\n id,\n number,\n dateIso,\n type,\n direction,\n grossCents,\n paidCents,\n unpaidCents,\n writtenOff = false,\n relations,\n lineItems,\n locale,\n currency = DEFAULT_CURRENCY,\n surface = 'elevated',\n 'aria-label': ariaLabel,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const activeLocale = locale ?? i18n.language ?? 'en';\n\n const resolvedAriaLabel =\n ariaLabel ??\n t('paymentCard.regionLabel', {\n number,\n defaultValue: 'Payment {{number}}',\n });\n\n const state = resolveState(type, paidCents, unpaidCents, writtenOff);\n\n // The chip headline reflects the most informative figure: the\n // outstanding balance when there's a debt, otherwise the gross total.\n const chipAmountCents =\n state === 'debt' && unpaidCents != null\n ? unpaidCents\n : (grossCents ?? paidCents ?? unpaidCents ?? 0);\n\n useAgentRegistration(\n paymentCardAgent,\n {\n getNumber: () => number,\n getState: () => state,\n },\n id,\n );\n\n const typeLabel = t(`paymentCard.type.${type}`, {\n defaultValue: TYPE_DEFAULTS[type],\n });\n const directionIcon =\n direction === 'incoming' ? (\n <ArrowDownLeft aria-hidden=\"true\" />\n ) : (\n <ArrowUpRight aria-hidden=\"true\" />\n );\n const directionLabel = t(`paymentCard.direction.${direction}`, {\n defaultValue: DIRECTION_DEFAULTS[direction],\n });\n\n // Compose the metadata rows in display order. Omitting a field omits\n // the row — KeyValueList collapses the subgrid cleanly.\n const rows: Array<{\n key: string;\n icon: ReactNode;\n label: string;\n value: ReactNode;\n }> = [];\n\n rows.push({\n key: 'number',\n icon: <Hash aria-hidden=\"true\" />,\n label: t('paymentCard.label.number', 'Number'),\n value: number,\n });\n\n if (dateIso) {\n rows.push({\n key: 'date',\n icon: <CalendarDays aria-hidden=\"true\" />,\n label: t('paymentCard.label.date', 'Date'),\n value: formatDate(dateIso, activeLocale),\n });\n }\n\n rows.push({\n key: 'type',\n icon: <ReceiptEuro aria-hidden=\"true\" />,\n label: t('paymentCard.label.type', 'Type'),\n value: <Badge variant={PAYMENT_TYPE_BADGE[type]}>{typeLabel}</Badge>,\n });\n\n rows.push({\n key: 'direction',\n icon: directionIcon,\n label: t('paymentCard.label.direction', 'Direction'),\n value: directionLabel,\n });\n\n if (relations?.carePlanNumber) {\n rows.push({\n key: 'carePlan',\n icon: <FileText aria-hidden=\"true\" />,\n label: t('paymentCard.label.carePlan', 'Care plan'),\n value: relations.carePlanNumber,\n });\n }\n\n if (relations?.patientName) {\n rows.push({\n key: 'patient',\n icon: <User aria-hidden=\"true\" />,\n label: t('paymentCard.label.patient', 'Patient'),\n value: relations.patientName,\n });\n }\n\n if (relations?.operatorName) {\n rows.push({\n key: 'operator',\n icon: <UserCog aria-hidden=\"true\" />,\n label: t('paymentCard.label.operator', 'Operator'),\n value: relations.operatorName,\n });\n }\n\n const formattedGross = useMemo(\n () =>\n grossCents != null\n ? formatMoney(grossCents, currency, activeLocale)\n : undefined,\n [grossCents, currency, activeLocale],\n );\n const formattedPaid = useMemo(\n () =>\n paidCents != null\n ? formatMoney(paidCents, currency, activeLocale)\n : undefined,\n [paidCents, currency, activeLocale],\n );\n const formattedUnpaid = useMemo(\n () =>\n unpaidCents != null\n ? formatMoney(unpaidCents, currency, activeLocale)\n : undefined,\n [unpaidCents, currency, activeLocale],\n );\n\n const hasAmounts =\n formattedGross != null ||\n formattedPaid != null ||\n formattedUnpaid != null;\n\n const hasLineItems = !!lineItems && lineItems.length > 0;\n\n const inner = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {/* Heading row — payment number + headline TransactionChip. */}\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-md)] ds:flex-wrap\">\n <h3\n id={headingId}\n className=\"type-title-card ds:m-0 ds:text-[color:var(--foreground)]\"\n >\n {t('paymentCard.heading', {\n number,\n defaultValue: 'Payment {{number}}',\n })}\n </h3>\n <span className=\"ds:ms-auto ds:shrink-0\">\n <TransactionChip\n state={state}\n amount={chipAmountCents / 100}\n currency={currency}\n locale={activeLocale}\n size=\"lg\"\n />\n </span>\n </div>\n\n {/* Metadata rows. */}\n <KeyValueList rowGap=\"sm\">\n {rows.map((row) => (\n <KeyValuePair\n key={row.key}\n icon={row.icon as React.ReactElement}\n label={row.label}\n value={row.value}\n />\n ))}\n </KeyValueList>\n\n {/* Amount summary — gross / paid / outstanding. */}\n {hasAmounts ? (\n <DescriptionList layout=\"inline\" density=\"compact\" labelWidth=\"fixed\">\n {formattedGross != null ? (\n <DescriptionList.Row>\n <DescriptionList.Term>\n {t('paymentCard.label.gross', 'Gross total')}\n </DescriptionList.Term>\n <DescriptionList.Detail numeric>\n {formattedGross}\n </DescriptionList.Detail>\n </DescriptionList.Row>\n ) : null}\n {formattedPaid != null ? (\n <DescriptionList.Row>\n <DescriptionList.Term>\n {t('paymentCard.label.paid', 'Paid')}\n </DescriptionList.Term>\n <DescriptionList.Detail numeric>\n {formattedPaid}\n </DescriptionList.Detail>\n </DescriptionList.Row>\n ) : null}\n {formattedUnpaid != null ? (\n <DescriptionList.Row>\n <DescriptionList.Term>\n {t('paymentCard.label.unpaid', 'Outstanding')}\n </DescriptionList.Term>\n <DescriptionList.Detail numeric>\n {formattedUnpaid}\n </DescriptionList.Detail>\n </DescriptionList.Row>\n ) : null}\n </DescriptionList>\n ) : null}\n\n {/* Line items. */}\n {hasLineItems ? (\n <section\n aria-label={t('paymentCard.lineItems.heading', 'Line items')}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\"\n >\n <h4 className=\"type-eyebrow ds:m-0 ds:text-[color:var(--muted-foreground)]\">\n {t('paymentCard.lineItems.heading', 'Line items')}\n </h4>\n <DescriptionList\n layout=\"inline\"\n density=\"compact\"\n labelWidth=\"auto\"\n >\n {lineItems!.map((item, index) => (\n <DescriptionList.Row key={`${item.description}-${index}`}>\n <DescriptionList.Term>\n {item.vatPercentage != null\n ? t('paymentCard.lineItems.withVat', {\n description: item.description,\n vat: item.vatPercentage,\n defaultValue: '{{description}} (VAT {{vat}}%)',\n })\n : item.description}\n </DescriptionList.Term>\n <DescriptionList.Detail numeric>\n {formatMoney(item.amountCents, currency, activeLocale)}\n </DescriptionList.Detail>\n </DescriptionList.Row>\n ))}\n </DescriptionList>\n </section>\n ) : null}\n </div>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-labelledby={headingId}\n data-component=\"payment-card\"\n data-component-id={id}\n data-state={state}\n data-type={type}\n data-direction={direction}\n id={id}\n className={rootVariants({ surface, className })}\n {...rest}\n >\n {surface === 'elevated' ? (\n <Card variant=\"elevated\">\n <Card.Body>{inner}</Card.Body>\n </Card>\n ) : (\n <div className={entitySurfaceVariants({ surface: 'flat' })}>\n {inner}\n </div>\n )}\n </div>\n );\n },\n);\n\nPaymentCard.displayName = 'PaymentCard';\n\nexport type PaymentCardSurface = NonNullable<\n VariantProps<typeof rootVariants>['surface']\n>;\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — PaymentRequestCard. */\n/* */\n/* Read-only payment-request surface. Exposes the lifecycle status */\n/* (structural state) only — never any patient identity or the hosted */\n/* payment URL. No actions: navigation to the pay link is a user-driven */\n/* affordance, not an agent operation. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { PaymentRequestCardHandle } from './payment-request-card';\n\nexport const paymentRequestCardAgent: AgentAdapter<PaymentRequestCardHandle> = {\n id: 'payment-request-card',\n capabilities: [],\n state: {\n status: {\n type: \"'new' | 'authorization_requested' | 'authorized' | 'paid' | 'failed' | 'cancelled'\",\n descriptionKey: 'ui.agent.paymentRequestCard.state.status',\n description:\n 'Current lifecycle status of the payment request. Structural state only.',\n read: (handle) => handle.getStatus(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'payment-request-card',\n description: 'Marks the PaymentRequestCard root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Addresses a specific request card.',\n },\n },\n};\n","import {\n forwardRef,\n useId,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CalendarClock, CreditCard, FileText } from 'lucide-react';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { KeyValueList, KeyValuePair } from '../key-value-pair/key-value-pair';\nimport { Link } from '../link/link';\nimport { TransactionChip } from '../transaction-chip/transaction-chip';\nimport { entitySurfaceVariants, isSafeEntityUrl } from '../_shared/entity-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { paymentRequestCardAgent } from './payment-request-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* PaymentRequestCard */\n/* */\n/* Companion to PaymentCard: a card for an *outstanding* payment request */\n/* (a Stripe / online-payment ask) rather than a recorded payment. Shows */\n/* the amount as a TransactionChip, the lifecycle status as a Badge, and */\n/* — when a safe `paymentUrl` is supplied — a \"Pay now\" Link. */\n/* */\n/* Every visible string flows through `useTranslation('ui')` against the */\n/* `paymentRequestCard.*` namespace. The agent state exposes the request */\n/* status (structural state) and never any patient identity. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* Vocabulary */\n/* -------------------------------------------------------------------- */\n\nexport type PaymentRequestStatus =\n | 'new'\n | 'authorization_requested'\n | 'authorized'\n | 'paid'\n | 'failed'\n | 'cancelled';\n\ntype BadgeVariant = NonNullable<\n ComponentPropsWithoutRef<typeof Badge>['variant']\n>;\n\nconst STATUS_BADGE = {\n new: 'info',\n authorization_requested: 'warning',\n authorized: 'info',\n paid: 'success',\n failed: 'error',\n cancelled: 'neutral',\n} as const satisfies Record<PaymentRequestStatus, BadgeVariant>;\n\nconst DEFAULT_CURRENCY = 'EUR';\n\n// Inline English fallbacks — belt-and-braces only. The canonical keys\n// live in the locale bundle (`ui.paymentRequestCard.*`); these guard\n// against a stale / not-yet-wired bundle so the card never shows a key.\nconst STATUS_DEFAULTS: Record<PaymentRequestStatus, string> = {\n new: 'New',\n authorization_requested: 'Authorization requested',\n authorized: 'Authorized',\n paid: 'Paid',\n failed: 'Failed',\n cancelled: 'Cancelled',\n};\n\n/* -------------------------------------------------------------------- */\n/* CVA — root */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva('ds:w-full ds:text-[color:var(--foreground)]', {\n variants: {\n surface: {\n flat: '',\n elevated: '',\n },\n },\n defaultVariants: { surface: 'elevated' },\n});\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface PaymentRequestCardHandle {\n /** Current lifecycle status. Structural state only — no PHI. */\n getStatus: () => PaymentRequestStatus;\n}\n\nexport interface PaymentRequestCardProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'aria-label' | 'children' | 'title'\n> {\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n /** Heading for the request. Falls back to a localised default. */\n title?: string;\n /** Optional supporting copy rendered beneath the heading. */\n description?: string;\n /** Requested amount in the smallest currency unit (cents). */\n amountCents: number;\n /** ISO-8601 due date. */\n dueDateIso?: string;\n /** Lifecycle status — drives the status Badge and pay-link gating. */\n status: PaymentRequestStatus;\n /** Hosted payment URL. Only rendered when it passes the URL allow-list. */\n paymentUrl?: string;\n /** Care-plan / treatment-plan number this request relates to. */\n carePlanNumber?: string;\n /** BCP-47 locale override. Falls back to the active i18next language. */\n locale?: string;\n /** ISO-4217 currency code. Defaults to `EUR`. */\n currency?: string;\n\n /* ----- Styling ----- */\n\n /**\n * `'elevated'` (default) wraps in `<Card variant=\"elevated\">`. `'flat'`\n * drops the Card — use inside an existing card / sheet.\n */\n surface?: 'flat' | 'elevated';\n\n /* ----- a11y ----- */\n\n /** Override the default region aria-label. */\n 'aria-label'?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nfunction formatDate(iso: string, locale: string): string {\n const date = new Date(iso);\n if (Number.isNaN(date.getTime())) return iso;\n try {\n return new Intl.DateTimeFormat(locale, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n }).format(date);\n } catch {\n return iso;\n }\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const PaymentRequestCard = forwardRef<\n HTMLDivElement,\n PaymentRequestCardProps\n>(\n (\n {\n id,\n title,\n description,\n amountCents,\n dueDateIso,\n status,\n paymentUrl,\n carePlanNumber,\n locale,\n currency = DEFAULT_CURRENCY,\n surface = 'elevated',\n 'aria-label': ariaLabel,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const activeLocale = locale ?? i18n.language ?? 'en';\n\n const resolvedTitle =\n title ?? t('paymentRequestCard.heading', 'Payment request');\n const resolvedAriaLabel = ariaLabel ?? resolvedTitle;\n\n useAgentRegistration(\n paymentRequestCardAgent,\n { getStatus: () => status },\n id,\n );\n\n const statusLabel = t(`paymentRequestCard.status.${status}`, {\n defaultValue: STATUS_DEFAULTS[status],\n });\n\n // A paid request settles; an open one is \"to-invoice\" (awaiting money);\n // anything terminal-but-unpaid renders as a debt.\n const chipState: 'to-invoice' | 'settled' | 'debt' =\n status === 'paid'\n ? 'settled'\n : status === 'failed' || status === 'cancelled'\n ? 'debt'\n : 'to-invoice';\n\n // The pay link only renders when the request is still actionable AND\n // the URL passes the shared card-family allow-list (no javascript:,\n // data:, protocol-relative). Otherwise the affordance is suppressed.\n const isActionable =\n status === 'new' ||\n status === 'authorization_requested' ||\n status === 'authorized';\n const showPayLink =\n isActionable && !!paymentUrl && isSafeEntityUrl(paymentUrl);\n\n const rows: Array<{\n key: string;\n icon: ReactNode;\n label: string;\n value: ReactNode;\n }> = [];\n\n rows.push({\n key: 'status',\n icon: <CreditCard aria-hidden=\"true\" />,\n label: t('paymentRequestCard.label.status', 'Status'),\n value: <Badge variant={STATUS_BADGE[status]}>{statusLabel}</Badge>,\n });\n\n if (dueDateIso) {\n rows.push({\n key: 'dueDate',\n icon: <CalendarClock aria-hidden=\"true\" />,\n label: t('paymentRequestCard.label.dueDate', 'Due date'),\n value: formatDate(dueDateIso, activeLocale),\n });\n }\n\n if (carePlanNumber) {\n rows.push({\n key: 'carePlan',\n icon: <FileText aria-hidden=\"true\" />,\n label: t('paymentRequestCard.label.carePlan', 'Care plan'),\n value: carePlanNumber,\n });\n }\n\n const inner = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {/* Heading row — title + amount TransactionChip. */}\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-md)] ds:flex-wrap\">\n <div className=\"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <h3\n id={headingId}\n className=\"type-title-card ds:m-0 ds:text-[color:var(--foreground)]\"\n >\n {resolvedTitle}\n </h3>\n {description ? (\n <p className=\"type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]\">\n {description}\n </p>\n ) : null}\n </div>\n <span className=\"ds:ms-auto ds:shrink-0\">\n <TransactionChip\n state={chipState}\n amount={amountCents / 100}\n currency={currency}\n locale={activeLocale}\n size=\"lg\"\n />\n </span>\n </div>\n\n {/* Metadata rows. */}\n <KeyValueList rowGap=\"sm\">\n {rows.map((row) => (\n <KeyValuePair\n key={row.key}\n icon={row.icon as React.ReactElement}\n label={row.label}\n value={row.value}\n />\n ))}\n </KeyValueList>\n\n {/* Pay affordance — only when actionable + the URL is safe. */}\n {showPayLink ? (\n <div className=\"ds:flex\">\n <Link href={paymentUrl!} external startIcon={<CreditCard />}>\n {t('paymentRequestCard.pay', 'Pay now')}\n </Link>\n </div>\n ) : null}\n </div>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-labelledby={headingId}\n data-component=\"payment-request-card\"\n data-component-id={id}\n data-status={status}\n id={id}\n className={rootVariants({ surface, className })}\n {...rest}\n >\n {surface === 'elevated' ? (\n <Card variant=\"elevated\">\n <Card.Body>{inner}</Card.Body>\n </Card>\n ) : (\n <div className={entitySurfaceVariants({ surface: 'flat' })}>\n {inner}\n </div>\n )}\n </div>\n );\n },\n);\n\nPaymentRequestCard.displayName = 'PaymentRequestCard';\n\nexport type PaymentRequestCardSurface = NonNullable<\n VariantProps<typeof rootVariants>['surface']\n>;\n"],"names":["paymentCardAgent","handle","PAYMENT_TYPE_BADGE","DEFAULT_CURRENCY","TYPE_DEFAULTS","DIRECTION_DEFAULTS","rootVariants","cva","formatMoney","cents","currency","locale","formatDate","iso","date","resolveState","type","paidCents","unpaidCents","writtenOff","PaymentCard","forwardRef","id","number","dateIso","direction","grossCents","relations","lineItems","surface","ariaLabel","className","rest","ref","i18n","useTranslation","headingId","useId","activeLocale","resolvedAriaLabel","state","chipAmountCents","useAgentRegistration","typeLabel","directionIcon","jsx","ArrowDownLeft","ArrowUpRight","directionLabel","rows","Hash","CalendarDays","ReceiptEuro","Badge","FileText","User","UserCog","formattedGross","useMemo","formattedPaid","formattedUnpaid","hasAmounts","hasLineItems","inner","jsxs","TransactionChip","KeyValueList","row","KeyValuePair","DescriptionList","item","index","Card","entitySurfaceVariants","paymentRequestCardAgent","STATUS_BADGE","STATUS_DEFAULTS","PaymentRequestCard","title","description","amountCents","dueDateIso","status","paymentUrl","carePlanNumber","t","resolvedTitle","statusLabel","chipState","showPayLink","isSafeEntityUrl","CreditCard","CalendarClock","Link"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAYO,MAAMA,KAAoD;AAAA,EAC/D,IAAI;AAAA,EACJ,cAAc,CAAA;AAAA,EACd,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,OAAO;AAAA,MACL,MAAM;AAA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AjB,EAAK,IAAI,CAACkB,MACT,gBAAAtB;AAAA,QAACuB;AAAA,QAAA;AAAA,UAEC,MAAMD,EAAI;AAAA,UACV,OAAOA,EAAI;AAAA,UACX,OAAOA,EAAI;AAAA,QAAA;AAAA,QAHNA,EAAI;AAAA,MAAA,CAKZ,GACH;AAAA,MAGCsB,sBACE,OAAA,EAAI,WAAU,WACb,UAAA,gBAAA5C,EAACgD,IAAA,EAAK,MAAMV,GAAa,UAAQ,IAAC,WAAW,gBAAAtC,EAAC8C,KAAW,GACtD,UAAAN,EAAE,0BAA0B,SAAS,EAAA,CACxC,GACF,IACE;AAAA,IAAA,GACN;AAGF,WACE,gBAAAxC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAZ;AAAA,QACA,MAAK;AAAA,QACL,cAAYM;AAAA,QACZ,mBAAiBH;AAAA,QACjB,kBAAe;AAAA,QACf,qBAAmBd;AAAA,QACnB,eAAa4D;AAAA,QACb,IAAA5D;AAAA,QACA,WAAWhB,GAAa,EAAE,SAAAuB,GAAS,WAAAE,GAAW;AAAA,QAC7C,GAAGC;AAAA,QAEH,UAAAH,MAAY,aACX,gBAAAgB,EAAC2B,GAAA,EAAK,SAAQ,YACZ,UAAA,gBAAA3B,EAAC2B,EAAK,MAAL,EAAW,UAAAT,EAAA,CAAM,GACpB,IAEA,gBAAAlB,EAAC,SAAI,WAAW4B,EAAsB,EAAE,SAAS,OAAA,CAAQ,GACtD,UAAAV,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAc,GAAmB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"payment-request-card-YVCcCZ25.js","sources":["../../src/components/payment-card/payment-card.agent.ts","../../src/components/payment-card/payment-card.tsx","../../src/components/payment-card/payment-request-card.agent.ts","../../src/components/payment-card/payment-request-card.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — PaymentCard. */\n/* */\n/* Read-only financial-record surface. Exposes the payment number */\n/* (identifier) and the resolved headline state (structural) — never */\n/* patient / operator names or any other PHI. No actions: the card is a */\n/* passive presentation surface. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { PaymentCardHandle } from './payment-card';\n\nexport const paymentCardAgent: AgentAdapter<PaymentCardHandle> = {\n id: 'payment-card',\n capabilities: [],\n state: {\n number: {\n type: 'string',\n descriptionKey: 'ui.agent.paymentCard.state.number',\n description: 'Payment number / reference currently rendered.',\n read: (handle) => handle.getNumber(),\n },\n state: {\n type: \"'debt' | 'to-invoice' | 'settled'\",\n descriptionKey: 'ui.agent.paymentCard.state.state',\n description:\n 'Resolved headline financial state. Structural state only — never patient identity.',\n read: (handle) => handle.getState(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'payment-card',\n description: 'Marks the PaymentCard root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop. Addresses a specific card.',\n },\n },\n};\n","import {\n forwardRef,\n useId,\n useMemo,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport {\n ArrowDownLeft,\n ArrowUpRight,\n CalendarDays,\n FileText,\n Hash,\n ReceiptEuro,\n User,\n UserCog,\n} from 'lucide-react';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { DescriptionList } from '../description-list/description-list';\nimport { KeyValueList, KeyValuePair } from '../key-value-pair/key-value-pair';\nimport { TransactionChip } from '../transaction-chip/transaction-chip';\nimport { entitySurfaceVariants } from '../_shared/entity-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { paymentCardAgent } from './payment-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* PaymentCard */\n/* */\n/* Financial-record card for a single payment / receipt. Replaces the */\n/* hand-rolled \"Pagamento\" / payment-row cards that the platform's */\n/* care-plan and patient-ledger surfaces compose today. Composes */\n/* TransactionChip (the settled/debt/to-invoice headline) + KeyValueList */\n/* (number, date, type, direction, relations) + DescriptionList (line */\n/* items) + Badge (the payment type). */\n/* */\n/* The component owns the ORDER, ICONS, and LABELS; the consumer passes */\n/* the data. Every visible string flows through `useTranslation('ui')` */\n/* against the `paymentCard.*` namespace. The agent state slot exposes */\n/* identifiers + structural state only — never patient names. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* Vocabulary */\n/* -------------------------------------------------------------------- */\n\n/** Payment type → translation-key segment + Badge variant. */\nexport type PaymentType = 'full' | 'partial' | 'credit' | 'proforma' | 'other';\n\nexport type PaymentDirection = 'incoming' | 'outgoing';\n\ntype BadgeVariant = NonNullable<\n ComponentPropsWithoutRef<typeof Badge>['variant']\n>;\n\nconst PAYMENT_TYPE_BADGE = {\n full: 'success',\n partial: 'warning',\n credit: 'info',\n proforma: 'neutral',\n other: 'neutral',\n} as const satisfies Record<PaymentType, BadgeVariant>;\n\nconst DEFAULT_CURRENCY = 'EUR';\n\n// Inline English fallbacks — belt-and-braces only. The canonical keys\n// live in the locale bundle (`ui.paymentCard.*`); these guard against a\n// stale / not-yet-wired bundle so the card never renders a raw key.\nconst TYPE_DEFAULTS: Record<PaymentType, string> = {\n full: 'Full payment',\n partial: 'Partial payment',\n credit: 'Credit note',\n proforma: 'Proforma',\n other: 'Other',\n};\n\nconst DIRECTION_DEFAULTS: Record<PaymentDirection, string> = {\n incoming: 'Incoming',\n outgoing: 'Outgoing',\n};\n\n/* -------------------------------------------------------------------- */\n/* CVA — root */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva('ds:w-full ds:text-[color:var(--foreground)]', {\n variants: {\n surface: {\n flat: '',\n elevated: '',\n },\n },\n defaultVariants: { surface: 'elevated' },\n});\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface PaymentLineItem {\n /** Human-readable description of the line. */\n description: string;\n /** Amount in the smallest currency unit (cents / centesimi). */\n amountCents: number;\n /** Optional VAT percentage (e.g. `22` for 22%). */\n vatPercentage?: number;\n}\n\nexport interface PaymentCardRelations {\n /** Care-plan / treatment-plan number this payment belongs to. */\n carePlanNumber?: string;\n /** Patient display name — rendered, but never exposed to the agent. */\n patientName?: string;\n /** Operator display name — rendered, but never exposed to the agent. */\n operatorName?: string;\n}\n\nexport interface PaymentCardHandle {\n /** Stable payment number currently rendered. Identifier only — no PHI. */\n getNumber: () => string;\n /** Resolved headline financial state. Structural state only. */\n getState: () => TransactionStateValue;\n}\n\n/** The TransactionChip state this card resolves the payment to. */\ntype TransactionStateValue = 'debt' | 'to-invoice' | 'settled';\n\nexport interface PaymentCardProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'aria-label' | 'children'\n> {\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n /** Human-readable payment number / reference. Rendered as the heading. */\n number: string;\n /** ISO-8601 date string for the payment date. */\n dateIso?: string;\n /** Payment type — drives the type Badge + label. */\n type: PaymentType;\n /** Money flow direction — incoming (patient → practice) or outgoing. */\n direction: PaymentDirection;\n /** Gross total in the smallest currency unit (cents). */\n grossCents?: number;\n /** Amount already paid, in cents. */\n paidCents?: number;\n /** Amount still outstanding, in cents. */\n unpaidCents?: number;\n /** Marks the record as written-off — renders a neutral chip. */\n writtenOff?: boolean;\n /** Linked entities (care plan / patient / operator). */\n relations?: PaymentCardRelations;\n /** Itemised breakdown rendered as a DescriptionList. */\n lineItems?: PaymentLineItem[];\n /** BCP-47 locale override. Falls back to the active i18next language. */\n locale?: string;\n /** ISO-4217 currency code. Defaults to `EUR`. */\n currency?: string;\n\n /* ----- Styling ----- */\n\n /**\n * `'elevated'` (default) wraps in `<Card variant=\"elevated\">`. `'flat'`\n * drops the Card — use inside an existing card / sheet.\n */\n surface?: 'flat' | 'elevated';\n\n /* ----- a11y ----- */\n\n /** Override the default region aria-label. */\n 'aria-label'?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\n/** Format cents → currency string for the consumer's locale. */\nfunction formatMoney(cents: number, currency: string, locale: string): string {\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency,\n }).format(cents / 100);\n } catch {\n return (cents / 100).toFixed(2);\n }\n}\n\n/** Format an ISO date for the consumer's locale, gracefully degrading. */\nfunction formatDate(iso: string, locale: string): string {\n const date = new Date(iso);\n if (Number.isNaN(date.getTime())) return iso;\n try {\n return new Intl.DateTimeFormat(locale, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n }).format(date);\n } catch {\n return iso;\n }\n}\n\n/**\n * Resolve the headline TransactionChip state from the paid / unpaid /\n * written-off inputs. Written-off → settled chip; an outstanding balance\n * → debt; a proforma with nothing paid → to-invoice; otherwise settled.\n */\nfunction resolveState(\n type: PaymentType,\n paidCents: number | undefined,\n unpaidCents: number | undefined,\n writtenOff: boolean | undefined,\n): TransactionStateValue {\n if (writtenOff) return 'settled';\n if (unpaidCents != null && unpaidCents > 0) return 'debt';\n if (type === 'proforma' && (paidCents == null || paidCents === 0)) {\n return 'to-invoice';\n }\n return 'settled';\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const PaymentCard = forwardRef<HTMLDivElement, PaymentCardProps>(\n (\n {\n id,\n number,\n dateIso,\n type,\n direction,\n grossCents,\n paidCents,\n unpaidCents,\n writtenOff = false,\n relations,\n lineItems,\n locale,\n currency = DEFAULT_CURRENCY,\n surface = 'elevated',\n 'aria-label': ariaLabel,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const activeLocale = locale ?? i18n.language ?? 'en';\n\n const resolvedAriaLabel =\n ariaLabel ??\n t('paymentCard.regionLabel', {\n number,\n defaultValue: 'Payment {{number}}',\n });\n\n const state = resolveState(type, paidCents, unpaidCents, writtenOff);\n\n // The chip headline reflects the most informative figure: the\n // outstanding balance when there's a debt, otherwise the gross total.\n const chipAmountCents =\n state === 'debt' && unpaidCents != null\n ? unpaidCents\n : (grossCents ?? paidCents ?? unpaidCents ?? 0);\n\n useAgentRegistration(\n paymentCardAgent,\n {\n getNumber: () => number,\n getState: () => state,\n },\n id,\n );\n\n const typeLabel = t(`paymentCard.type.${type}`, {\n defaultValue: TYPE_DEFAULTS[type],\n });\n const directionIcon =\n direction === 'incoming' ? (\n <ArrowDownLeft aria-hidden=\"true\" />\n ) : (\n <ArrowUpRight aria-hidden=\"true\" />\n );\n const directionLabel = t(`paymentCard.direction.${direction}`, {\n defaultValue: DIRECTION_DEFAULTS[direction],\n });\n\n // Compose the metadata rows in display order. Omitting a field omits\n // the row — KeyValueList collapses the subgrid cleanly.\n const rows: Array<{\n key: string;\n icon: ReactNode;\n label: string;\n value: ReactNode;\n }> = [];\n\n rows.push({\n key: 'number',\n icon: <Hash aria-hidden=\"true\" />,\n label: t('paymentCard.label.number', 'Number'),\n value: number,\n });\n\n if (dateIso) {\n rows.push({\n key: 'date',\n icon: <CalendarDays aria-hidden=\"true\" />,\n label: t('paymentCard.label.date', 'Date'),\n value: formatDate(dateIso, activeLocale),\n });\n }\n\n rows.push({\n key: 'type',\n icon: <ReceiptEuro aria-hidden=\"true\" />,\n label: t('paymentCard.label.type', 'Type'),\n value: <Badge variant={PAYMENT_TYPE_BADGE[type]}>{typeLabel}</Badge>,\n });\n\n rows.push({\n key: 'direction',\n icon: directionIcon,\n label: t('paymentCard.label.direction', 'Direction'),\n value: directionLabel,\n });\n\n if (relations?.carePlanNumber) {\n rows.push({\n key: 'carePlan',\n icon: <FileText aria-hidden=\"true\" />,\n label: t('paymentCard.label.carePlan', 'Care plan'),\n value: relations.carePlanNumber,\n });\n }\n\n if (relations?.patientName) {\n rows.push({\n key: 'patient',\n icon: <User aria-hidden=\"true\" />,\n label: t('paymentCard.label.patient', 'Patient'),\n value: relations.patientName,\n });\n }\n\n if (relations?.operatorName) {\n rows.push({\n key: 'operator',\n icon: <UserCog aria-hidden=\"true\" />,\n label: t('paymentCard.label.operator', 'Operator'),\n value: relations.operatorName,\n });\n }\n\n const formattedGross = useMemo(\n () =>\n grossCents != null\n ? formatMoney(grossCents, currency, activeLocale)\n : undefined,\n [grossCents, currency, activeLocale],\n );\n const formattedPaid = useMemo(\n () =>\n paidCents != null\n ? formatMoney(paidCents, currency, activeLocale)\n : undefined,\n [paidCents, currency, activeLocale],\n );\n const formattedUnpaid = useMemo(\n () =>\n unpaidCents != null\n ? formatMoney(unpaidCents, currency, activeLocale)\n : undefined,\n [unpaidCents, currency, activeLocale],\n );\n\n const hasAmounts =\n formattedGross != null ||\n formattedPaid != null ||\n formattedUnpaid != null;\n\n const hasLineItems = !!lineItems && lineItems.length > 0;\n\n const inner = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {/* Heading row — payment number + headline TransactionChip. */}\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-md)] ds:flex-wrap\">\n <h3\n id={headingId}\n className=\"type-title-card ds:m-0 ds:text-[color:var(--foreground)]\"\n >\n {t('paymentCard.heading', {\n number,\n defaultValue: 'Payment {{number}}',\n })}\n </h3>\n <span className=\"ds:ms-auto ds:shrink-0\">\n <TransactionChip\n state={state}\n amount={chipAmountCents / 100}\n currency={currency}\n locale={activeLocale}\n size=\"lg\"\n />\n </span>\n </div>\n\n {/* Metadata rows. */}\n <KeyValueList rowGap=\"sm\">\n {rows.map((row) => (\n <KeyValuePair\n key={row.key}\n icon={row.icon as React.ReactElement}\n label={row.label}\n value={row.value}\n />\n ))}\n </KeyValueList>\n\n {/* Amount summary — gross / paid / outstanding. */}\n {hasAmounts ? (\n <DescriptionList layout=\"inline\" density=\"compact\" labelWidth=\"fixed\">\n {formattedGross != null ? (\n <DescriptionList.Row>\n <DescriptionList.Term>\n {t('paymentCard.label.gross', 'Gross total')}\n </DescriptionList.Term>\n <DescriptionList.Detail numeric>\n {formattedGross}\n </DescriptionList.Detail>\n </DescriptionList.Row>\n ) : null}\n {formattedPaid != null ? (\n <DescriptionList.Row>\n <DescriptionList.Term>\n {t('paymentCard.label.paid', 'Paid')}\n </DescriptionList.Term>\n <DescriptionList.Detail numeric>\n {formattedPaid}\n </DescriptionList.Detail>\n </DescriptionList.Row>\n ) : null}\n {formattedUnpaid != null ? (\n <DescriptionList.Row>\n <DescriptionList.Term>\n {t('paymentCard.label.unpaid', 'Outstanding')}\n </DescriptionList.Term>\n <DescriptionList.Detail numeric>\n {formattedUnpaid}\n </DescriptionList.Detail>\n </DescriptionList.Row>\n ) : null}\n </DescriptionList>\n ) : null}\n\n {/* Line items. */}\n {hasLineItems ? (\n <section\n aria-label={t('paymentCard.lineItems.heading', 'Line items')}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\"\n >\n <h4 className=\"type-eyebrow ds:m-0 ds:text-[color:var(--muted-foreground)]\">\n {t('paymentCard.lineItems.heading', 'Line items')}\n </h4>\n <DescriptionList\n layout=\"inline\"\n density=\"compact\"\n labelWidth=\"auto\"\n >\n {lineItems!.map((item, index) => (\n <DescriptionList.Row key={`${item.description}-${index}`}>\n <DescriptionList.Term>\n {item.vatPercentage != null\n ? t('paymentCard.lineItems.withVat', {\n description: item.description,\n vat: item.vatPercentage,\n defaultValue: '{{description}} (VAT {{vat}}%)',\n })\n : item.description}\n </DescriptionList.Term>\n <DescriptionList.Detail numeric>\n {formatMoney(item.amountCents, currency, activeLocale)}\n </DescriptionList.Detail>\n </DescriptionList.Row>\n ))}\n </DescriptionList>\n </section>\n ) : null}\n </div>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-labelledby={headingId}\n data-component=\"payment-card\"\n data-component-id={id}\n data-state={state}\n data-type={type}\n data-direction={direction}\n id={id}\n className={rootVariants({ surface, className })}\n {...rest}\n >\n {surface === 'elevated' ? (\n <Card variant=\"elevated\">\n <Card.Body>{inner}</Card.Body>\n </Card>\n ) : (\n <div className={entitySurfaceVariants({ surface: 'flat' })}>\n {inner}\n </div>\n )}\n </div>\n );\n },\n);\n\nPaymentCard.displayName = 'PaymentCard';\n\nexport type PaymentCardSurface = NonNullable<\n VariantProps<typeof rootVariants>['surface']\n>;\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — PaymentRequestCard. */\n/* */\n/* Read-only payment-request surface. Exposes the lifecycle status */\n/* (structural state) only — never any patient identity or the hosted */\n/* payment URL. No actions: navigation to the pay link is a user-driven */\n/* affordance, not an agent operation. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { PaymentRequestCardHandle } from './payment-request-card';\n\nexport const paymentRequestCardAgent: AgentAdapter<PaymentRequestCardHandle> = {\n id: 'payment-request-card',\n capabilities: [],\n state: {\n status: {\n type: \"'new' | 'authorization_requested' | 'authorized' | 'paid' | 'failed' | 'cancelled'\",\n descriptionKey: 'ui.agent.paymentRequestCard.state.status',\n description:\n 'Current lifecycle status of the payment request. Structural state only.',\n read: (handle) => handle.getStatus(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'payment-request-card',\n description: 'Marks the PaymentRequestCard root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Addresses a specific request card.',\n },\n },\n};\n","import {\n forwardRef,\n useId,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CalendarClock, CreditCard, FileText } from 'lucide-react';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { KeyValueList, KeyValuePair } from '../key-value-pair/key-value-pair';\nimport { Link } from '../link/link';\nimport { TransactionChip } from '../transaction-chip/transaction-chip';\nimport { entitySurfaceVariants, isSafeEntityUrl } from '../_shared/entity-card';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { paymentRequestCardAgent } from './payment-request-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* PaymentRequestCard */\n/* */\n/* Companion to PaymentCard: a card for an *outstanding* payment request */\n/* (a Stripe / online-payment ask) rather than a recorded payment. Shows */\n/* the amount as a TransactionChip, the lifecycle status as a Badge, and */\n/* — when a safe `paymentUrl` is supplied — a \"Pay now\" Link. */\n/* */\n/* Every visible string flows through `useTranslation('ui')` against the */\n/* `paymentRequestCard.*` namespace. The agent state exposes the request */\n/* status (structural state) and never any patient identity. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* Vocabulary */\n/* -------------------------------------------------------------------- */\n\nexport type PaymentRequestStatus =\n | 'new'\n | 'authorization_requested'\n | 'authorized'\n | 'paid'\n | 'failed'\n | 'cancelled';\n\ntype BadgeVariant = NonNullable<\n ComponentPropsWithoutRef<typeof Badge>['variant']\n>;\n\nconst STATUS_BADGE = {\n new: 'info',\n authorization_requested: 'warning',\n authorized: 'info',\n paid: 'success',\n failed: 'error',\n cancelled: 'neutral',\n} as const satisfies Record<PaymentRequestStatus, BadgeVariant>;\n\nconst DEFAULT_CURRENCY = 'EUR';\n\n// Inline English fallbacks — belt-and-braces only. The canonical keys\n// live in the locale bundle (`ui.paymentRequestCard.*`); these guard\n// against a stale / not-yet-wired bundle so the card never shows a key.\nconst STATUS_DEFAULTS: Record<PaymentRequestStatus, string> = {\n new: 'New',\n authorization_requested: 'Authorization requested',\n authorized: 'Authorized',\n paid: 'Paid',\n failed: 'Failed',\n cancelled: 'Cancelled',\n};\n\n/* -------------------------------------------------------------------- */\n/* CVA — root */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva('ds:w-full ds:text-[color:var(--foreground)]', {\n variants: {\n surface: {\n flat: '',\n elevated: '',\n },\n },\n defaultVariants: { surface: 'elevated' },\n});\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface PaymentRequestCardHandle {\n /** Current lifecycle status. Structural state only — no PHI. */\n getStatus: () => PaymentRequestStatus;\n}\n\nexport interface PaymentRequestCardProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'aria-label' | 'children' | 'title'\n> {\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n /** Heading for the request. Falls back to a localised default. */\n title?: string;\n /** Optional supporting copy rendered beneath the heading. */\n description?: string;\n /** Requested amount in the smallest currency unit (cents). */\n amountCents: number;\n /** ISO-8601 due date. */\n dueDateIso?: string;\n /** Lifecycle status — drives the status Badge and pay-link gating. */\n status: PaymentRequestStatus;\n /** Hosted payment URL. Only rendered when it passes the URL allow-list. */\n paymentUrl?: string;\n /** Care-plan / treatment-plan number this request relates to. */\n carePlanNumber?: string;\n /** BCP-47 locale override. Falls back to the active i18next language. */\n locale?: string;\n /** ISO-4217 currency code. Defaults to `EUR`. */\n currency?: string;\n\n /* ----- Styling ----- */\n\n /**\n * `'elevated'` (default) wraps in `<Card variant=\"elevated\">`. `'flat'`\n * drops the Card — use inside an existing card / sheet.\n */\n surface?: 'flat' | 'elevated';\n\n /* ----- a11y ----- */\n\n /** Override the default region aria-label. */\n 'aria-label'?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nfunction formatDate(iso: string, locale: string): string {\n const date = new Date(iso);\n if (Number.isNaN(date.getTime())) return iso;\n try {\n return new Intl.DateTimeFormat(locale, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n }).format(date);\n } catch {\n return iso;\n }\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const PaymentRequestCard = forwardRef<\n HTMLDivElement,\n PaymentRequestCardProps\n>(\n (\n {\n id,\n title,\n description,\n amountCents,\n dueDateIso,\n status,\n paymentUrl,\n carePlanNumber,\n locale,\n currency = DEFAULT_CURRENCY,\n surface = 'elevated',\n 'aria-label': ariaLabel,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const activeLocale = locale ?? i18n.language ?? 'en';\n\n const resolvedTitle =\n title ?? t('paymentRequestCard.heading', 'Payment request');\n const resolvedAriaLabel = ariaLabel ?? resolvedTitle;\n\n useAgentRegistration(\n paymentRequestCardAgent,\n { getStatus: () => status },\n id,\n );\n\n const statusLabel = t(`paymentRequestCard.status.${status}`, {\n defaultValue: STATUS_DEFAULTS[status],\n });\n\n // A paid request settles; an open one is \"to-invoice\" (awaiting money);\n // anything terminal-but-unpaid renders as a debt.\n const chipState: 'to-invoice' | 'settled' | 'debt' =\n status === 'paid'\n ? 'settled'\n : status === 'failed' || status === 'cancelled'\n ? 'debt'\n : 'to-invoice';\n\n // The pay link only renders when the request is still actionable AND\n // the URL passes the shared card-family allow-list (no javascript:,\n // data:, protocol-relative). Otherwise the affordance is suppressed.\n const isActionable =\n status === 'new' ||\n status === 'authorization_requested' ||\n status === 'authorized';\n const showPayLink =\n isActionable && !!paymentUrl && isSafeEntityUrl(paymentUrl);\n\n const rows: Array<{\n key: string;\n icon: ReactNode;\n label: string;\n value: ReactNode;\n }> = [];\n\n rows.push({\n key: 'status',\n icon: <CreditCard aria-hidden=\"true\" />,\n label: t('paymentRequestCard.label.status', 'Status'),\n value: <Badge variant={STATUS_BADGE[status]}>{statusLabel}</Badge>,\n });\n\n if (dueDateIso) {\n rows.push({\n key: 'dueDate',\n icon: <CalendarClock aria-hidden=\"true\" />,\n label: t('paymentRequestCard.label.dueDate', 'Due date'),\n value: formatDate(dueDateIso, activeLocale),\n });\n }\n\n if (carePlanNumber) {\n rows.push({\n key: 'carePlan',\n icon: <FileText aria-hidden=\"true\" />,\n label: t('paymentRequestCard.label.carePlan', 'Care plan'),\n value: carePlanNumber,\n });\n }\n\n const inner = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {/* Heading row — title + amount TransactionChip. */}\n <div className=\"ds:flex ds:items-start ds:gap-[var(--spacing-md)] ds:flex-wrap\">\n <div className=\"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <h3\n id={headingId}\n className=\"type-title-card ds:m-0 ds:text-[color:var(--foreground)]\"\n >\n {resolvedTitle}\n </h3>\n {description ? (\n <p className=\"type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]\">\n {description}\n </p>\n ) : null}\n </div>\n <span className=\"ds:ms-auto ds:shrink-0\">\n <TransactionChip\n state={chipState}\n amount={amountCents / 100}\n currency={currency}\n locale={activeLocale}\n size=\"lg\"\n />\n </span>\n </div>\n\n {/* Metadata rows. */}\n <KeyValueList rowGap=\"sm\">\n {rows.map((row) => (\n <KeyValuePair\n key={row.key}\n icon={row.icon as React.ReactElement}\n label={row.label}\n value={row.value}\n />\n ))}\n </KeyValueList>\n\n {/* Pay affordance — only when actionable + the URL is safe. */}\n {showPayLink ? (\n <div className=\"ds:flex\">\n <Link href={paymentUrl!} external startIcon={<CreditCard />}>\n {t('paymentRequestCard.pay', 'Pay now')}\n </Link>\n </div>\n ) : null}\n </div>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-labelledby={headingId}\n data-component=\"payment-request-card\"\n data-component-id={id}\n data-status={status}\n id={id}\n className={rootVariants({ surface, className })}\n {...rest}\n >\n {surface === 'elevated' ? (\n <Card variant=\"elevated\">\n <Card.Body>{inner}</Card.Body>\n </Card>\n ) : (\n <div className={entitySurfaceVariants({ surface: 'flat' })}>\n {inner}\n </div>\n )}\n </div>\n );\n },\n);\n\nPaymentRequestCard.displayName = 'PaymentRequestCard';\n\nexport type PaymentRequestCardSurface = NonNullable<\n VariantProps<typeof rootVariants>['surface']\n>;\n"],"names":["paymentCardAgent","handle","PAYMENT_TYPE_BADGE","DEFAULT_CURRENCY","TYPE_DEFAULTS","DIRECTION_DEFAULTS","rootVariants","cva","formatMoney","cents","currency","locale","formatDate","iso","date","resolveState","type","paidCents","unpaidCents","writtenOff","PaymentCard","forwardRef","id","number","dateIso","direction","grossCents","relations","lineItems","surface","ariaLabel","className","rest","ref","i18n","useTranslation","headingId","useId","activeLocale","resolvedAriaLabel","state","chipAmountCents","useAgentRegistration","typeLabel","directionIcon","jsx","ArrowDownLeft","ArrowUpRight","directionLabel","rows","Hash","CalendarDays","ReceiptEuro","Badge","FileText","User","UserCog","formattedGross","useMemo","formattedPaid","formattedUnpaid","hasAmounts","hasLineItems","inner","jsxs","TransactionChip","KeyValueList","row","KeyValuePair","DescriptionList","item","index","Card","entitySurfaceVariants","paymentRequestCardAgent","STATUS_BADGE","STATUS_DEFAULTS","PaymentRequestCard","title","description","amountCents","dueDateIso","status","paymentUrl","carePlanNumber","t","resolvedTitle","statusLabel","chipState","showPayLink","isSafeEntityUrl","CreditCard","CalendarClock","Link"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAYO,MAAMA,KAAoD;AAAA,EAC/D,IAAI;AAAA,EACJ,cAAc,CAAA;AAAA,EACd,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,EACpC;AAAA,EAEF,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GCcMC,KAAqB;AAAA,EACzB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AACT,GAEMC,KAAmB,OAKnBC,KAA6C;AAAA,EACjD,MAAM;AAAA,EACN,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AACT,GAEMC,KAAuD;AAAA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ACnB,eAAa4D;AAAA,QACb,IAAA5D;AAAA,QACA,WAAWhB,GAAa,EAAE,SAAAuB,GAAS,WAAAE,GAAW;AAAA,QAC7C,GAAGC;AAAA,QAEH,UAAAH,MAAY,aACX,gBAAAgB,EAAC2B,GAAA,EAAK,SAAQ,YACZ,UAAA,gBAAA3B,EAAC2B,EAAK,MAAL,EAAW,UAAAT,EAAA,CAAM,GACpB,IAEA,gBAAAlB,EAAC,SAAI,WAAW4B,EAAsB,EAAE,SAAS,OAAA,CAAQ,GACtD,UAAAV,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAc,GAAmB,cAAc;"}
|
|
@@ -6,16 +6,16 @@ import { u as Te } from "./registry-DvAUVLHh.js";
|
|
|
6
6
|
import { R as u } from "./radio-TWf9Q-mp.js";
|
|
7
7
|
import { R as j } from "./radio-group-rXDJADzW.js";
|
|
8
8
|
import { F as f } from "./form-field-CahJzTxp.js";
|
|
9
|
-
import { D as V } from "./date-picker-
|
|
9
|
+
import { D as V } from "./date-picker-CepI_oI2.js";
|
|
10
10
|
import { N as H } from "./number-input-Cgu2TtA8.js";
|
|
11
11
|
import { S as Ce } from "./select-BW5ecXlX.js";
|
|
12
12
|
import { S as je } from "./switch-OILsBLWo.js";
|
|
13
13
|
import { C as ie } from "./card-DPmk26CL.js";
|
|
14
14
|
import { B as $ } from "./badge-sTusUqZD.js";
|
|
15
15
|
import { I as Ee } from "./insert-result-LCNTskNJ.js";
|
|
16
|
-
import { D as E, r as Pe, c as Oe, g as _e, e as Ie, f as Fe, A as Ge, h as Ke, i as Ve, j as le, G as He } from "./antenatal-schedule-timeline-
|
|
17
|
-
import { s as P } from "./subDays-
|
|
18
|
-
import { c as q } from "./date-picker-variants-
|
|
16
|
+
import { D as E, r as Pe, c as Oe, g as _e, e as Ie, f as Fe, A as Ge, h as Ke, i as Ve, j as le, G as He } from "./antenatal-schedule-timeline-B1k8QkA6.js";
|
|
17
|
+
import { s as P } from "./subDays-BLl3y3pd.js";
|
|
18
|
+
import { c as q } from "./date-picker-variants-DfuooXEK.js";
|
|
19
19
|
import { p as $e } from "./parseISO-fOGpHKXm.js";
|
|
20
20
|
import { f as qe } from "./format-4HNwNGrN.js";
|
|
21
21
|
const B = {
|
|
@@ -767,4 +767,4 @@ Ue.displayName = "PregnancyDating";
|
|
|
767
767
|
export {
|
|
768
768
|
Ue as P
|
|
769
769
|
};
|
|
770
|
-
//# sourceMappingURL=pregnancy-dating-
|
|
770
|
+
//# sourceMappingURL=pregnancy-dating-DtToyMyc.js.map
|