@alfadocs/ui-kit 1.3.13 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/agenda-card.agent-Cb5tuEh3.js +28 -0
- package/dist/_chunks/{alia-sidebar-DzNz1gDf.js → alia-sidebar-DSBZMick.js} +3 -3
- package/dist/_chunks/{anamnesis-i18n-CfC0qYzy.js → anamnesis-i18n-DZcrt8dP.js} +2141 -2069
- package/dist/_chunks/{antenatal-schedule-timeline-BMMpi2lb.js → antenatal-schedule-timeline-u8TsS2QJ.js} +27 -26
- package/dist/_chunks/{appointment-timeline-B630OT_J.js → appointment-timeline-Bqf1sTU5.js} +2 -2
- package/dist/_chunks/{ar-THMLfSoN.js → ar-BR1FGFP2.js} +14 -14
- package/dist/_chunks/{bmi-calculator-CM0-G2mg.js → bmi-calculator-CpyY13MV.js} +2 -2
- package/dist/_chunks/{booking-DjNbd7C1.js → booking-BjsA7j1-.js} +699 -688
- package/dist/_chunks/calculator-dialog-12d3Sxaz.js +48 -0
- package/dist/_chunks/{care-plan-card-1G_f4I5s.js → care-plan-card-BvQy366X.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-DmBsffHS.js → care-plan-entry-card-apk_5B3O.js} +2 -2
- package/dist/_chunks/{chat-container-HlFnoEIl.js → chat-container-CYYego1W.js} +105 -81
- package/dist/_chunks/cycle-calculator-B7fyH-h4.js +425 -0
- package/dist/_chunks/{date-picker-ZHejTVAJ.js → date-picker-Bp64zk2p.js} +19 -19
- package/dist/_chunks/date-picker-variants-pKAJfnWr.js +2089 -0
- package/dist/_chunks/{date-range-picker-pEG3Ln3i.js → date-range-picker-CDrZ8Zh0.js} +27 -27
- package/dist/_chunks/{date-time-picker-695QvBGj.js → date-time-picker-DafkGDGO.js} +10 -10
- package/dist/_chunks/{de-DmZ-8rTN.js → de-3iM4rGqo.js} +7 -7
- package/dist/_chunks/{document-preview-D3gg4MXB.js → document-preview-DOrsqiN1.js} +2 -2
- package/dist/_chunks/due-date-calculator-CnkbbAej.js +571 -0
- package/dist/_chunks/{editor-overlay-DE3esyio.js → editor-overlay-B1tr2i7B.js} +22 -21
- package/dist/_chunks/{el-Bela9mxs.js → el-C96rGJvU.js} +2 -2
- package/dist/_chunks/{es-BNncHKex.js → es-Cxiqjx8r.js} +12 -12
- package/dist/_chunks/fetal-weight-avlj-l-S.js +223 -0
- package/dist/_chunks/format-4HNwNGrN.js +1315 -0
- package/dist/_chunks/{fr-CH8ADfhN.js → fr-Bhr6SYKj.js} +21 -21
- package/dist/_chunks/{freemium-paywall-C_Ue6wxU.js → freemium-paywall-DRDdWuOg.js} +3 -3
- package/dist/_chunks/gestational-age-calculator-BljY_DVJ.js +488 -0
- package/dist/_chunks/hcg-doubling-Cv_vH61p.js +312 -0
- package/dist/_chunks/header-settings-Cn5fPXCE.js +335 -0
- package/dist/_chunks/{hi-Bppfxp8l.js → hi-BxXX26d_.js} +12 -12
- package/dist/_chunks/isSameWeek-B73MagWB.js +13 -0
- package/dist/_chunks/{it-B4ySaRyK.js → it-Xmjomvyj.js} +24 -24
- package/dist/_chunks/{ja-CGF6Io9P.js → ja-mfZvt1ZV.js} +16 -16
- package/dist/_chunks/{link-cell-renderer-C5XLwVXQ.js → link-cell-renderer-CJ_gk7gl.js} +3 -3
- package/dist/_chunks/{locale-picker-BfBUdT1m.js → locale-picker-D9Kv2zrK.js} +153 -132
- package/dist/_chunks/map-view-2yZCQW2l.js +445 -0
- package/dist/_chunks/{marketplace-app-shell-DwcFMxzp.js → marketplace-app-shell-BLRvg-M0.js} +49 -40
- package/dist/_chunks/{nl-DuShqwuV.js → nl-DDs-KEnD.js} +15 -15
- package/dist/_chunks/{notes-panel-DPsgB4Mv.js → notes-panel-CiFN3sLW.js} +2 -2
- package/dist/_chunks/{number-input-DrozbZAU.js → number-input-DOe5VYei.js} +64 -64
- package/dist/_chunks/{optical-prescription-BDHJr8Zz.js → optical-prescription-CRemE8fL.js} +2 -2
- package/dist/_chunks/{parse-DvA97ro9.js → parse-JqixfsU0.js} +43 -43
- package/dist/_chunks/parseISO-fOGpHKXm.js +120 -0
- package/dist/_chunks/{patient-details-DqjjwPmt.js → patient-details-CpunD0qx.js} +3 -3
- package/dist/_chunks/{patient-table-BmIDrLIS.js → patient-table-2eWx-Rrk.js} +2 -2
- package/dist/_chunks/{payment-form-h-BZ8onk.js → payment-form-Ds1I9KqB.js} +308 -231
- package/dist/_chunks/{pdf-viewer-Ddx-T053.js → pdf-viewer-DUIsV9s5.js} +429 -369
- package/dist/_chunks/{pl-CKQwX9Fk.js → pl-BYYMnEWP.js} +18 -18
- package/dist/_chunks/{practice-results-B-HPc13W.js → practice-results-SjCniMd2.js} +2 -2
- package/dist/_chunks/pregnancy-dating-BmpHScZ0.js +770 -0
- package/dist/_chunks/pregnancy-weight-gain-B5KSJzdc.js +553 -0
- package/dist/_chunks/progress-CK8otcQ-.js +343 -0
- package/dist/_chunks/{pt-_njpXyOZ.js → pt-BSPnVrQ7.js} +20 -20
- package/dist/_chunks/{radiograph-panel.agent-BQZ64Riy.js → radiograph-panel.agent-CtFtNMzk.js} +3 -3
- package/dist/_chunks/{rich-text-editor-CfeXPPWs.js → rich-text-editor-BedTpWzL.js} +2 -2
- package/dist/_chunks/{ro-3X6_4FcN.js → ro-BbiylGmG.js} +14 -14
- package/dist/_chunks/{ru-bAcgmnS-.js → ru-BX_qsV67.js} +14 -14
- package/dist/_chunks/{session-countdown-Bc70VXN1.js → session-countdown-BL-Psg8u.js} +2 -2
- package/dist/_chunks/{sign-document-CW_ByDUh.js → sign-document-jF4fZDJ5.js} +2 -2
- package/dist/_chunks/slot-grid-DNiUcXy2.js +640 -0
- package/dist/_chunks/{sparkline-BTY4B5tv.js → sparkline-BmGcEyZO.js} +209 -164
- package/dist/_chunks/{sq-jYFqr4Ga.js → sq-i9UOk4P7.js} +10 -10
- package/dist/_chunks/subDays-CAUv47M1.js +8 -0
- package/dist/_chunks/{sv-BSGEJ-8B.js → sv-CpTdtmDQ.js} +8 -8
- package/dist/_chunks/{tab-bar-Axhk6xzx.js → tab-bar-BYESZINM.js} +83 -77
- package/dist/_chunks/task-card.agent-CF2N_uu4.js +29 -0
- package/dist/_chunks/{tr-CTpgUtw6.js → tr-DXG2QN1K.js} +17 -17
- package/dist/_chunks/{unit-converter-COgkN7YP.js → unit-converter-CHPDuV7W.js} +2 -2
- package/dist/_chunks/{warning-stack-BtjmJChC.js → warning-stack-B7t_8jRE.js} +42 -37
- package/dist/_chunks/{zh-CN-BgM0Io2O.js → zh-CN-vPkPEK6H.js} +18 -18
- package/dist/agent-catalog.json +6426 -3382
- package/dist/agent-i18n/en.json +234 -15
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/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/chat-container/chat-container.d.ts +14 -0
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.agent.d.ts +4 -0
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +42 -0
- package/dist/components/cycle-calculator/index.d.ts +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +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/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.agent.d.ts +4 -0
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +61 -1
- package/dist/components/due-date-calculator/index.d.ts +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editor-overlay/editor-overlay.d.ts +7 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/fetal-weight/fetal-weight.agent.d.ts +4 -0
- package/dist/components/fetal-weight/fetal-weight.d.ts +26 -0
- package/dist/components/fetal-weight/index.d.ts +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.agent.d.ts +4 -0
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +44 -2
- package/dist/components/gestational-age-calculator/index.d.ts +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/hcg-doubling.agent.d.ts +4 -0
- package/dist/components/hcg-doubling/hcg-doubling.d.ts +30 -0
- package/dist/components/hcg-doubling/index.d.ts +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts +13 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/locale-picker/locale-picker.d.ts +9 -0
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +22 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.d.ts +2 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-form/index.d.ts +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/payment-form/payment-form.d.ts +32 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts +13 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.d.ts +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-dating/pregnancy-dating.agent.d.ts +4 -0
- package/dist/components/pregnancy-dating/pregnancy-dating.d.ts +65 -1
- package/dist/components/pregnancy-weight-gain/index.d.ts +2 -1
- package/dist/components/pregnancy-weight-gain/index.js +6 -5
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.agent.d.ts +4 -0
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +35 -0
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/progress.d.ts +13 -0
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/slot-grid/index.d.ts +2 -1
- package/dist/components/slot-grid/index.js +5 -4
- package/dist/components/slot-grid/slot-grid.agent.d.ts +4 -0
- package/dist/components/slot-grid/slot-grid.d.ts +34 -0
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.d.ts +10 -0
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +13 -0
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/index.js +630 -627
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/anamnesis-derive.d.ts +27 -8
- package/dist/patterns/anamnesis/anamnesis-format.d.ts +11 -3
- package/dist/patterns/anamnesis/anamnesis-highlight.d.ts +6 -0
- package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +23 -9
- package/dist/patterns/anamnesis/anamnesis-types.d.ts +7 -0
- package/dist/patterns/anamnesis/anamnesis.d.ts +16 -7
- package/dist/patterns/anamnesis/index.d.ts +3 -2
- package/dist/patterns/anamnesis/index.js +7 -6
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +6 -0
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/agenda-card.agent-mTCrkKSZ.js +0 -27
- package/dist/_chunks/calculator-dialog-DuXMQSdm.js +0 -40
- package/dist/_chunks/cycle-calculator-BwqYVPB4.js +0 -252
- package/dist/_chunks/date-picker-variants-eL6HjWvw.js +0 -3363
- package/dist/_chunks/due-date-calculator-CwfsFd3T.js +0 -256
- package/dist/_chunks/fetal-weight-ePlLjJPc.js +0 -122
- package/dist/_chunks/gestational-age-calculator-DdgbH69Z.js +0 -311
- package/dist/_chunks/hcg-doubling-BBqD2wI2.js +0 -170
- package/dist/_chunks/header-settings--pjYOe6g.js +0 -284
- package/dist/_chunks/isSameDay-DUEiAT0G.js +0 -39
- package/dist/_chunks/isSameWeek-CK4HS9lH.js +0 -14
- package/dist/_chunks/map-view-CsaHfoo6.js +0 -378
- package/dist/_chunks/pregnancy-dating-DzYTlBkT.js +0 -421
- package/dist/_chunks/pregnancy-weight-gain-O6J0sUIi.js +0 -322
- package/dist/_chunks/progress-DA413-zn.js +0 -299
- package/dist/_chunks/slot-grid-CQSULZjd.js +0 -502
- package/dist/_chunks/subDays-BcNi04uf.js +0 -8
- package/dist/_chunks/task-card.agent-Bt14CzUd.js +0 -25
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { type InsertPayload, type InsertVariant, type InsertMode } from '../_shared/insert-result';
|
|
3
|
-
import { type GestationalAge, type DueDateResult, type Plurality, type Chorionicity } from '../_shared/obstetrics';
|
|
3
|
+
import { type EmbryoAge, type GestationalAge, type DueDateResult, type Plurality, type Chorionicity } from '../_shared/obstetrics';
|
|
4
4
|
import { type AntenatalScheduleOptions, type GdmRisk } from '../_shared/antenatal-schedule';
|
|
5
5
|
declare const rootVariants: (props?: ({
|
|
6
6
|
width?: "auto" | "full" | null | undefined;
|
|
@@ -16,6 +16,70 @@ export interface PregnancyDatingResult {
|
|
|
16
16
|
gestationalAge: GestationalAge | null;
|
|
17
17
|
trimester: DueDateResult['trimester'];
|
|
18
18
|
}
|
|
19
|
+
/** The dating inputs as entered. */
|
|
20
|
+
export interface PregnancyDatingInputsSnapshot {
|
|
21
|
+
/** Which anchor the pregnancy is dated from. */
|
|
22
|
+
method: DatingMethod;
|
|
23
|
+
/** The method's reference date (`yyyy-MM-dd`), or null when unset. */
|
|
24
|
+
referenceDate: string | null;
|
|
25
|
+
/** LMP only — average cycle length in days, or null for the 28-day default. */
|
|
26
|
+
cycleLength: number | null;
|
|
27
|
+
/** IVF only — embryo age at transfer, in days. */
|
|
28
|
+
embryoAge: EmbryoAge;
|
|
29
|
+
/** LMP only — crown-rump length in millimetres, or null. */
|
|
30
|
+
crlMm: number | null;
|
|
31
|
+
/** LMP only — date of the CRL scan (`yyyy-MM-dd`), or null. */
|
|
32
|
+
scanDate: string | null;
|
|
33
|
+
/** Manual ±days nudge applied to the dating, or null. */
|
|
34
|
+
datingAdjustment: number | null;
|
|
35
|
+
/** The date gestational age and trimester are evaluated against. */
|
|
36
|
+
asOfDate: string;
|
|
37
|
+
}
|
|
38
|
+
/** `PregnancyDatingResult` projected onto the agent boundary — ISO dates. */
|
|
39
|
+
export interface PregnancyDatingSnapshot {
|
|
40
|
+
/** Estimated date of delivery, `yyyy-MM-dd`. */
|
|
41
|
+
dueDate: string;
|
|
42
|
+
/** GA day-0 anchor after any re-dating / adjustment, `yyyy-MM-dd`. */
|
|
43
|
+
gestationalStart: string;
|
|
44
|
+
/** Gestational age as of the evaluation date; null before conception. */
|
|
45
|
+
gestationalAge: {
|
|
46
|
+
weeks: number;
|
|
47
|
+
days: number;
|
|
48
|
+
totalDays: number;
|
|
49
|
+
} | null;
|
|
50
|
+
/** Trimester band as of the evaluation date. */
|
|
51
|
+
trimester: DueDateResult['trimester'];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Curated imperative handle for agent / external automation. Reads the dating
|
|
55
|
+
* inputs and the computed EDD + gestational age, and drives the inputs the way
|
|
56
|
+
* a user would. Never exposes patient identity — only structural dates and
|
|
57
|
+
* numbers. Consumed by `pregnancy-dating.agent.ts`; the public `ref` stays the
|
|
58
|
+
* root DOM element.
|
|
59
|
+
*/
|
|
60
|
+
export interface PregnancyDatingHandle {
|
|
61
|
+
/** The dating inputs as entered. */
|
|
62
|
+
getInputs: () => PregnancyDatingInputsSnapshot;
|
|
63
|
+
/** Computed due date, gestational age and trimester, or null until a reference date is set. */
|
|
64
|
+
getResult: () => PregnancyDatingSnapshot | null;
|
|
65
|
+
/** Switch the dating anchor. Keeps the reference date, which is re-interpreted. */
|
|
66
|
+
setMethod: (method: DatingMethod) => boolean;
|
|
67
|
+
/** Set the method's reference date (`yyyy-MM-dd`); only a known EDD may be in the future. */
|
|
68
|
+
setReferenceDate: (isoDate: string | null) => boolean;
|
|
69
|
+
/** LMP only — set the average cycle length in days (20–45). */
|
|
70
|
+
setCycleLength: (days: number | null) => boolean;
|
|
71
|
+
/** IVF only — set the embryo age at transfer (3 or 5 days). */
|
|
72
|
+
setEmbryoAge: (days: EmbryoAge) => boolean;
|
|
73
|
+
/** LMP only — set the CRL measurement and/or its scan date for ACOG re-dating. */
|
|
74
|
+
setCrl: (next: {
|
|
75
|
+
crlMm?: number | null;
|
|
76
|
+
scanDate?: string | null;
|
|
77
|
+
}) => boolean;
|
|
78
|
+
/** Set the manual ±days dating nudge (positive = further along). */
|
|
79
|
+
setDatingAdjustment: (days: number | null) => boolean;
|
|
80
|
+
/** Set the date gestational age and trimester are evaluated against. */
|
|
81
|
+
setAsOfDate: (isoDate: string) => boolean;
|
|
82
|
+
}
|
|
19
83
|
export interface PregnancyDatingProps extends VariantProps<typeof rootVariants> {
|
|
20
84
|
/** Initial dating method. Defaults to `'lmp'`. */
|
|
21
85
|
defaultMethod?: DatingMethod;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { PregnancyWeightGain } from './pregnancy-weight-gain';
|
|
2
|
-
export type { PregnancyWeightGainProps } from './pregnancy-weight-gain';
|
|
2
|
+
export type { PregnancyWeightGainProps, PregnancyWeightGainHandle, PregnancyWeightGainInputs, } from './pregnancy-weight-gain';
|
|
3
|
+
export { pregnancyWeightGainAgent } from './pregnancy-weight-gain.agent';
|
|
3
4
|
export { assessWeightGain, recommendedGainToDate, TOTAL_GAIN_BANDS, RATE_BANDS, type GainBand, type GainStatus, type WeightGainInput, type WeightGainResult, } from './weight-gain';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { P as
|
|
1
|
+
import { P as n, R as s, T as i, a as g, p as r, r as t } from "../../_chunks/pregnancy-weight-gain-B5KSJzdc.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
n as PregnancyWeightGain,
|
|
4
|
+
s as RATE_BANDS,
|
|
5
5
|
i as TOTAL_GAIN_BANDS,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
g as assessWeightGain,
|
|
7
|
+
r as pregnancyWeightGainAgent,
|
|
8
|
+
t as recommendedGainToDate
|
|
8
9
|
};
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentAdapter } from '../../agent/types';
|
|
2
|
+
import type { PregnancyWeightGainHandle } from './pregnancy-weight-gain';
|
|
3
|
+
export declare const pregnancyWeightGainAgent: AgentAdapter<PregnancyWeightGainHandle>;
|
|
4
|
+
//# sourceMappingURL=pregnancy-weight-gain.agent.d.ts.map
|
|
@@ -5,6 +5,41 @@ import { type WeightGainResult } from './weight-gain';
|
|
|
5
5
|
declare const rootVariants: (props?: ({
|
|
6
6
|
width?: "auto" | "full" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
/**
|
|
9
|
+
* Canonical metric snapshot of the four inputs. Measurements only — the
|
|
10
|
+
* calculator is never handed a patient, so no identity can reach the agent.
|
|
11
|
+
*/
|
|
12
|
+
export interface PregnancyWeightGainInputs {
|
|
13
|
+
/** Height, cm. */
|
|
14
|
+
heightCm: number | null;
|
|
15
|
+
/** Pre-pregnancy weight, kg. */
|
|
16
|
+
prePregnancyKg: number | null;
|
|
17
|
+
/** Current weight, kg. */
|
|
18
|
+
currentKg: number | null;
|
|
19
|
+
/** Completed gestational weeks. */
|
|
20
|
+
gestationalWeeks: number | null;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Curated imperative handle for agent / external automation. Reads and writes
|
|
24
|
+
* the four measurements plus the plurality choice, and reads back the computed
|
|
25
|
+
* IOM assessment. Never exposes patient identity — the component only ever
|
|
26
|
+
* holds numbers. Consumed by the `pregnancy-weight-gain.agent.ts` adapter; the
|
|
27
|
+
* public `ref` stays the DOM element.
|
|
28
|
+
*/
|
|
29
|
+
export interface PregnancyWeightGainHandle {
|
|
30
|
+
/** Canonical metric snapshot of the four inputs. */
|
|
31
|
+
getInputs: () => PregnancyWeightGainInputs;
|
|
32
|
+
/** Set one or more inputs; omitted fields are left unchanged. */
|
|
33
|
+
setInputs: (next: Partial<PregnancyWeightGainInputs>) => void;
|
|
34
|
+
/** Number of babies the assessment is computed for. */
|
|
35
|
+
getPlurality: () => Plurality;
|
|
36
|
+
/** Switch the plurality (re-keys the IOM bands). */
|
|
37
|
+
setPlurality: (next: Plurality) => void;
|
|
38
|
+
/** Current computed assessment, or null until every input is valid. */
|
|
39
|
+
getResult: () => WeightGainResult | null;
|
|
40
|
+
/** Clear the four measurements (plurality is a setting and is kept). */
|
|
41
|
+
reset: () => void;
|
|
42
|
+
}
|
|
8
43
|
export interface PregnancyWeightGainProps extends VariantProps<typeof rootVariants> {
|
|
9
44
|
/** Initial number of babies. Defaults to `'singleton'`. */
|
|
10
45
|
defaultPlurality?: Plurality;
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
2
|
export interface ProgressHandle {
|
|
3
|
+
/**
|
|
4
|
+
* Paint a progress value straight onto the DOM, bypassing React. High-
|
|
5
|
+
* frequency escape hatch — the `value` prop is NOT updated, so read the
|
|
6
|
+
* painted figure back with `getValue()`, not from props.
|
|
7
|
+
*/
|
|
3
8
|
setValue: (value: number) => void;
|
|
9
|
+
/**
|
|
10
|
+
* What the bar currently SHOWS, in the same units as `value` / `max` —
|
|
11
|
+
* written by both the render path and `setValue`, so it stays defined after
|
|
12
|
+
* an imperative write. `null` while indeterminate.
|
|
13
|
+
*/
|
|
14
|
+
getValue: () => number | null;
|
|
15
|
+
/** True when no measurable progress is set (`value` prop omitted). */
|
|
16
|
+
isIndeterminate: () => boolean;
|
|
4
17
|
}
|
|
5
18
|
export interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'role'> {
|
|
6
19
|
value?: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { SlotGrid, isSameDate, findFirstAvailable } from './slot-grid';
|
|
2
|
-
export type { SlotGridProps, SlotGridSlot, SlotGridDay, SlotGridState, SlotGridSize, } from './slot-grid';
|
|
2
|
+
export type { SlotGridProps, SlotGridSlot, SlotGridDay, SlotGridState, SlotGridSize, SlotGridHandle, } from './slot-grid';
|
|
3
|
+
export { slotGridAgent } from './slot-grid.agent';
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { S as
|
|
1
|
+
import { S as i, f as t, i as e, s as r } from "../../_chunks/slot-grid-DNiUcXy2.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
i as SlotGrid,
|
|
4
|
+
t as findFirstAvailable,
|
|
5
|
+
e as isSameDate,
|
|
6
|
+
r as slotGridAgent
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -67,6 +67,40 @@ export interface SlotGridProps extends Omit<HTMLAttributes<HTMLDivElement>, 'ari
|
|
|
67
67
|
/** Fires when the user clicks the "Next available" CTA. */
|
|
68
68
|
onJumpToNextAvailable?: () => void;
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Imperative handle the agent adapter (`slot-grid.agent.ts`) reads and drives.
|
|
72
|
+
*
|
|
73
|
+
* It is NOT the `ref` — `ref` stays the outer `HTMLDivElement` so existing
|
|
74
|
+
* consumers are unaffected. The handle is built with `useMemo` and handed to
|
|
75
|
+
* `useAgentRegistration`, the same shape Autocomplete uses.
|
|
76
|
+
*
|
|
77
|
+
* Every getter returns identifiers and structural state only — availability
|
|
78
|
+
* slot ids, calendar day keys, booleans. Never patient data (PRS §26 §7).
|
|
79
|
+
*/
|
|
80
|
+
export interface SlotGridHandle {
|
|
81
|
+
/** Current visual / interactive state (`default` / `loading` / `disabled` / `empty`). */
|
|
82
|
+
getStatus: () => SlotGridState;
|
|
83
|
+
/** Controlled `selectedSlotId` prop, or `null` when nothing is selected. */
|
|
84
|
+
getSelectedSlotId: () => string | null;
|
|
85
|
+
/** Day keys (`yyyy-MM-dd`) of the currently-rendered columns, in order. */
|
|
86
|
+
getVisibleDays: () => string[];
|
|
87
|
+
/** Day key → ids of that day's AVAILABLE slots (collapsed ones included). */
|
|
88
|
+
getSlotsByDay: () => Record<string, string[]>;
|
|
89
|
+
/** Day keys whose "Show more" control has been used. */
|
|
90
|
+
getExpandedDays: () => string[];
|
|
91
|
+
/** Mirrors the `hasPrevious` prop — whether an earlier window exists. */
|
|
92
|
+
getHasPrevious: () => boolean;
|
|
93
|
+
/** Mirrors the `hasNext` prop — whether a later window exists. */
|
|
94
|
+
getHasNext: () => boolean;
|
|
95
|
+
/** Select an available slot by id. Returns `false` when it cannot be selected. */
|
|
96
|
+
selectSlot: (slotId: string) => boolean;
|
|
97
|
+
/** Page the window forward. Returns `false` when the arrow would be disabled. */
|
|
98
|
+
nextDays: () => boolean;
|
|
99
|
+
/** Page the window back. Returns `false` when the arrow would be disabled. */
|
|
100
|
+
previousDays: () => boolean;
|
|
101
|
+
/** Reveal a day's collapsed slots. Returns `false` when the day is not visible. */
|
|
102
|
+
showMoreDay: (dayKey: string) => boolean;
|
|
103
|
+
}
|
|
70
104
|
declare const slotGridVariants: (props?: ({
|
|
71
105
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
72
106
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -13,6 +13,16 @@ export interface SparklineHandle {
|
|
|
13
13
|
* annotation's band would. No-op when the sparkline is not selectable, or
|
|
14
14
|
* when `id` names no currently drawn annotation. */
|
|
15
15
|
selectAnnotation: (id: string) => void;
|
|
16
|
+
/** Ids of the annotations currently drawn — the only ids `selectAnnotation`
|
|
17
|
+
* will accept. Ids only: an annotation's `label` is human-readable and could
|
|
18
|
+
* name a clinical event, so it is never exposed. */
|
|
19
|
+
getAnnotationIds: () => string[];
|
|
20
|
+
/** True when the host wired `onAnnotationSelect`. False means every
|
|
21
|
+
* `selectAnnotation` call is a no-op. */
|
|
22
|
+
isSelectable: () => boolean;
|
|
23
|
+
/** Number of positions in the currently rendered series, gaps included.
|
|
24
|
+
* A count only — the plotted values are measurements and stay private. */
|
|
25
|
+
getPointCount: () => number;
|
|
16
26
|
}
|
|
17
27
|
/** Semantic tint for an annotation. Decorative reinforcement of `shape` —
|
|
18
28
|
* never the only channel carrying which event this is. */
|
|
@@ -70,12 +70,25 @@ export interface TabBarRenderLinkProps {
|
|
|
70
70
|
children: ReactNode;
|
|
71
71
|
/** `'page'` on the active tab, otherwise omitted — forward to the link. */
|
|
72
72
|
'aria-current'?: 'page';
|
|
73
|
+
/**
|
|
74
|
+
* The tab's stable `TabBarItem.id`, as the agent / automation DOM hook.
|
|
75
|
+
* Spread it onto your router link (`{...rest}`) so the tab stays addressable
|
|
76
|
+
* by `[data-tab-id]` the same way the kit's own `<a>` / `<button>` tabs are —
|
|
77
|
+
* see PRS §26 §6.
|
|
78
|
+
*/
|
|
79
|
+
'data-tab-id'?: string;
|
|
73
80
|
/** Optional per-item click handler (the item's `onClick`), if supplied. */
|
|
74
81
|
onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
75
82
|
}
|
|
76
83
|
export interface TabBarProps {
|
|
77
84
|
/** The tabs, in order. */
|
|
78
85
|
items: TabBarItem[];
|
|
86
|
+
/**
|
|
87
|
+
* Opaque instance id, emitted on the strip as `data-component-id`. Pass it
|
|
88
|
+
* when more than one TabBar can be on screen so an agent / automation tool
|
|
89
|
+
* can scope its `[data-tab-id]` lookup to one bar (PRS §26 §6).
|
|
90
|
+
*/
|
|
91
|
+
id?: string;
|
|
79
92
|
/** Accessible name for the `<nav>` landmark. */
|
|
80
93
|
ariaLabel: string;
|
|
81
94
|
/** Fires with the tab `id` when a button tab (one without `href`) is chosen. */
|