@alfadocs/ui-kit 0.36.0 → 0.38.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/Alfadocs_Logo_Mark-7o3L3WBI.js +56 -0
- package/dist/_chunks/{alia-sidebar-BEoMl6UL.js → alia-sidebar-DXsYPinm.js} +2 -2
- package/dist/_chunks/{ar-CEpIJtcO.js → ar-Cn_NxqkN.js} +2 -2
- package/dist/_chunks/bmi-BxD-tFzU.js +32 -0
- package/dist/_chunks/bmi-calculator-BRUru9QX.js +213 -0
- package/dist/_chunks/{booking-eM0y0NIR.js → booking-DK_BPHnQ.js} +4 -4
- package/dist/_chunks/calculator-dialog-B74fqpFZ.js +40 -0
- package/dist/_chunks/chart-DnHvmiDX.js +312 -0
- package/dist/_chunks/{chat-message-D53_fH2w.js → chat-message-ASgGtj-L.js} +30 -39
- package/dist/_chunks/{contact-profile-card-BA6fgS45.js → contact-profile-card-DHyuAPXM.js} +14 -13
- package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +185 -0
- package/dist/_chunks/{date-picker-B94HAV4A.js → date-picker-CvQfs6Xh.js} +2 -2
- package/dist/_chunks/{date-range-picker-D8CHNYQT.js → date-range-picker-U9fn1g9d.js} +3 -3
- package/dist/_chunks/{date-time-picker-D1GEzf8p.js → date-time-picker-Cva0ZCWw.js} +2 -2
- package/dist/_chunks/{de-Dfbeau59.js → de-BMM2H7Bs.js} +2 -2
- package/dist/_chunks/dependent-selector-CRWgieHm.js +324 -0
- package/dist/_chunks/document-scanner-CdHQ6lTN.js +702 -0
- package/dist/_chunks/due-date-calculator-CUspKSTw.js +171 -0
- package/dist/_chunks/{editable-currency-cell-renderer-CZcVWBPo.js → editable-currency-cell-renderer-DGKuRNVG.js} +2 -2
- package/dist/_chunks/{el-Dro3J7CP.js → el-BYPonAaK.js} +2 -2
- package/dist/_chunks/{es-Dvg8u70B.js → es-CMkVCQ4F.js} +2 -2
- package/dist/_chunks/{file-upload-CdozCPct.js → file-upload-CnzRcErt.js} +2 -1
- package/dist/_chunks/fiscal-code-input-BZ0FxwUl.js +540 -0
- package/dist/_chunks/{fr-VOGjBSPP.js → fr-BcuWxqft.js} +2 -2
- package/dist/_chunks/gestation-BXEgDGmP.js +50 -0
- package/dist/_chunks/gestational-age-calculator-CsQ05qDy.js +165 -0
- package/dist/_chunks/heart-C0faivFf.js +20 -0
- package/dist/_chunks/{hi-BSDxWU_y.js → hi-wkq_rQAh.js} +2 -2
- package/dist/_chunks/image-C6RM5hfF.js +16 -0
- package/dist/_chunks/insert-result-yJ0QavoN.js +133 -0
- package/dist/_chunks/{isSameWeek-Dfzu29cW.js → isSameWeek-Bim5ftRd.js} +2 -2
- package/dist/_chunks/{it-CuonvcI_.js → it-GiQrQ9p4.js} +3 -3
- package/dist/_chunks/{ja-DO57gIOT.js → ja-qfYg3Rua.js} +2 -2
- package/dist/_chunks/{logo-_Z-jLq80.js → logo-yituK7sE.js} +42 -91
- package/dist/_chunks/{marketplace-app-shell-DXHxy9dj.js → marketplace-app-shell-BnClrL2B.js} +2 -2
- package/dist/_chunks/{nl-DjPaaWaW.js → nl-xOogO4sZ.js} +2 -2
- package/dist/_chunks/{patient-shell-CDvMw_Nk.js → patient-shell-Bz3CdO84.js} +2 -2
- package/dist/_chunks/{pl-Cl4lOx2N.js → pl-GnOW6eGK.js} +3 -3
- package/dist/_chunks/{practice-results-BFM_lyUs.js → practice-results-C8ciLQap.js} +3 -2
- package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +209 -0
- package/dist/_chunks/{privacy-lock-DD-wHxBg.js → privacy-lock-BmX_gkvt.js} +2 -2
- package/dist/_chunks/{pt-D7qO5CzD.js → pt-_bV5b5RW.js} +2 -2
- package/dist/_chunks/{public-footer.agent-Cjfe5jus.js → public-footer.agent-zw1vFin_.js} +2 -2
- package/dist/_chunks/qr-code-DNXhi6se.js +568 -0
- package/dist/_chunks/{react-day-picker-DsjfS7uI.js → react-day-picker-CdtIiKjx.js} +27 -27
- package/dist/_chunks/{rich-text-editor-CHmr9Bz8.js → rich-text-editor-DLbg2852.js} +114 -124
- package/dist/_chunks/{ro-CP2-VJ_O.js → ro-BEcyh5Nj.js} +2 -2
- package/dist/_chunks/rotate-ccw-BWANpitO.js +15 -0
- package/dist/_chunks/{ru-RPn9_Lpq.js → ru-Bi86hqMf.js} +3 -3
- package/dist/_chunks/session-countdown-LPnhTHjn.js +214 -0
- package/dist/_chunks/{shield-check-BhHyReu8.js → shield-check-C73ma9Cs.js} +8 -24
- package/dist/_chunks/{sign-in-with-alfadocs-button-BI0fVonM.js → sign-in-with-alfadocs-button-DeHBFRNS.js} +2 -2
- package/dist/_chunks/social-sign-in-button-X54ySJr1.js +243 -0
- package/dist/_chunks/{sq-AQvefouo.js → sq-BujHSAWu.js} +2 -2
- package/dist/_chunks/subDays-_T9YeKPX.js +8 -0
- package/dist/_chunks/{sv-zkx9eBtD.js → sv-C8AeDrTA.js} +2 -2
- package/dist/_chunks/{tr-Dmr412Ac.js → tr-CMSs_Vgf.js} +2 -2
- package/dist/_chunks/unit-converter-EUwO6QYq.js +168 -0
- package/dist/_chunks/wallet-pay-button-DK4ESYge.js +250 -0
- package/dist/_chunks/{zh-CN-DxVt64Zk.js → zh-CN-eXB-PFu4.js} +3 -3
- package/dist/agent-catalog.json +203 -1
- package/dist/brand/provider-marks/apple-pay.d.ts +12 -0
- package/dist/brand/provider-marks/apple.d.ts +12 -0
- package/dist/brand/provider-marks/google-pay.d.ts +12 -0
- package/dist/brand/provider-marks/google.d.ts +13 -0
- package/dist/components/_shared/insert-result.d.ts +47 -0
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +27 -0
- package/dist/components/bmi-calculator/bmi.d.ts +37 -0
- package/dist/components/bmi-calculator/index.d.ts +4 -0
- package/dist/components/bmi-calculator/index.js +15 -0
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/calculator-dialog.d.ts +26 -0
- package/dist/components/calculator-dialog/index.d.ts +3 -0
- package/dist/components/calculator-dialog/index.js +5 -0
- package/dist/components/chart/chart.d.ts +7 -0
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +21 -0
- package/dist/components/cycle-calculator/cycle.d.ts +37 -0
- package/dist/components/cycle-calculator/index.d.ts +4 -0
- package/dist/components/cycle-calculator/index.js +7 -0
- 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/dependent-selector/dependent-selector.agent.d.ts +4 -0
- package/dist/components/dependent-selector/dependent-selector.d.ts +72 -0
- package/dist/components/dependent-selector/index.d.ts +4 -0
- package/dist/components/dependent-selector/index.js +6 -0
- package/dist/components/document-scanner/document-scanner.agent.d.ts +4 -0
- package/dist/components/document-scanner/document-scanner.d.ts +93 -0
- package/dist/components/document-scanner/index.d.ts +4 -0
- package/dist/components/document-scanner/index.js +6 -0
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +21 -0
- package/dist/components/due-date-calculator/gestation.d.ts +60 -0
- package/dist/components/due-date-calculator/index.d.ts +4 -0
- package/dist/components/due-date-calculator/index.js +13 -0
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/fiscal-code-input/calculate-codice-fiscale.d.ts +24 -0
- package/dist/components/fiscal-code-input/fiscal-code-input.agent.d.ts +4 -0
- package/dist/components/fiscal-code-input/fiscal-code-input.d.ts +61 -0
- package/dist/components/fiscal-code-input/index.d.ts +6 -0
- package/dist/components/fiscal-code-input/index.js +11 -0
- package/dist/components/fiscal-code-input/is-valid-codice-fiscale.d.ts +21 -0
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +27 -0
- package/dist/components/gestational-age-calculator/index.d.ts +3 -0
- package/dist/components/gestational-age-calculator/index.js +5 -0
- package/dist/components/index.d.ts +15 -0
- package/dist/components/logo/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.d.ts +4 -0
- package/dist/components/pregnancy-weight-gain/index.js +9 -0
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +19 -0
- package/dist/components/pregnancy-weight-gain/weight-gain.d.ts +41 -0
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/qr-code/index.d.ts +5 -0
- package/dist/components/qr-code/index.js +8 -0
- package/dist/components/qr-code/qr-code.agent.d.ts +3 -0
- package/dist/components/qr-code/qr-code.d.ts +59 -0
- package/dist/components/qr-code/qr-encode.d.ts +46 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/session-countdown/index.d.ts +4 -0
- package/dist/components/session-countdown/index.js +6 -0
- package/dist/components/session-countdown/session-countdown.agent.d.ts +3 -0
- package/dist/components/session-countdown/session-countdown.d.ts +38 -0
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/skeleton/skeleton.d.ts +1 -1
- package/dist/components/social-sign-in-button/index.d.ts +3 -0
- package/dist/components/social-sign-in-button/index.js +5 -0
- package/dist/components/social-sign-in-button/social-sign-in-button.d.ts +56 -0
- package/dist/components/unit-converter/index.d.ts +4 -0
- package/dist/components/unit-converter/index.js +9 -0
- package/dist/components/unit-converter/unit-converter.d.ts +21 -0
- package/dist/components/unit-converter/units.d.ts +18 -0
- package/dist/components/wallet-pay-button/index.d.ts +3 -0
- package/dist/components/wallet-pay-button/index.js +5 -0
- package/dist/components/wallet-pay-button/wallet-pay-button.d.ts +63 -0
- package/dist/i18n/locales/ar.d.ts +316 -0
- package/dist/i18n/locales/ar.js +307 -0
- package/dist/i18n/locales/de.d.ts +316 -0
- package/dist/i18n/locales/de.js +307 -0
- package/dist/i18n/locales/el.d.ts +316 -0
- package/dist/i18n/locales/el.js +307 -0
- package/dist/i18n/locales/en.d.ts +316 -0
- package/dist/i18n/locales/en.js +310 -0
- package/dist/i18n/locales/es.d.ts +316 -0
- package/dist/i18n/locales/es.js +307 -0
- package/dist/i18n/locales/fr.d.ts +316 -0
- package/dist/i18n/locales/fr.js +307 -0
- package/dist/i18n/locales/hi.d.ts +316 -0
- package/dist/i18n/locales/hi.js +307 -0
- package/dist/i18n/locales/it.d.ts +316 -0
- package/dist/i18n/locales/it.js +307 -0
- package/dist/i18n/locales/ja.d.ts +316 -0
- package/dist/i18n/locales/ja.js +303 -0
- package/dist/i18n/locales/nl.d.ts +316 -0
- package/dist/i18n/locales/nl.js +307 -0
- package/dist/i18n/locales/pl.d.ts +316 -0
- package/dist/i18n/locales/pl.js +307 -0
- package/dist/i18n/locales/pt.d.ts +316 -0
- package/dist/i18n/locales/pt.js +310 -0
- package/dist/i18n/locales/ro.d.ts +316 -0
- package/dist/i18n/locales/ro.js +307 -0
- package/dist/i18n/locales/ru.d.ts +316 -0
- package/dist/i18n/locales/ru.js +307 -0
- package/dist/i18n/locales/sq.d.ts +316 -0
- package/dist/i18n/locales/sq.js +307 -0
- package/dist/i18n/locales/sv.d.ts +316 -0
- package/dist/i18n/locales/sv.js +307 -0
- package/dist/i18n/locales/tr.d.ts +316 -0
- package/dist/i18n/locales/tr.js +307 -0
- package/dist/i18n/locales/zh.d.ts +316 -0
- package/dist/i18n/locales/zh.js +303 -0
- package/dist/index.js +597 -527
- package/dist/locales/ar.json +316 -0
- package/dist/locales/de.json +316 -0
- package/dist/locales/el.json +316 -0
- package/dist/locales/en.json +316 -0
- package/dist/locales/es.json +316 -0
- package/dist/locales/fr.json +316 -0
- package/dist/locales/hi.json +316 -0
- package/dist/locales/it.json +316 -0
- package/dist/locales/ja.json +316 -0
- package/dist/locales/nl.json +316 -0
- package/dist/locales/pl.json +316 -0
- package/dist/locales/pt.json +316 -0
- package/dist/locales/ro.json +316 -0
- package/dist/locales/ru.json +316 -0
- package/dist/locales/sq.json +316 -0
- package/dist/locales/sv.json +316 -0
- package/dist/locales/tr.json +316 -0
- package/dist/locales/zh.json +316 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +57 -1
- package/dist/_chunks/chart-DLkVn_ex.js +0 -292
- package/dist/_chunks/subDays-CANHP9hz.js +0 -8
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export type DueDateMethod = 'lmp' | 'conception' | 'ivf';
|
|
2
|
+
/** Embryo age at transfer, in days (cleavage vs blastocyst). */
|
|
3
|
+
export type EmbryoAge = 3 | 5;
|
|
4
|
+
export type Trimester = 'preconception' | 'first' | 'second' | 'third' | 'postterm';
|
|
5
|
+
/** Naegele's rule: a term pregnancy is 280 days from the LMP. */
|
|
6
|
+
export declare const GESTATION_DAYS = 280;
|
|
7
|
+
/** Ovulation/conception sits ~14 days after the LMP in a 28-day cycle. */
|
|
8
|
+
export declare const CONCEPTION_OFFSET_DAYS = 14;
|
|
9
|
+
/** A term pregnancy is 266 days from conception. */
|
|
10
|
+
export declare const TERM_FROM_CONCEPTION_DAYS = 266;
|
|
11
|
+
/** Standard menstrual-cycle length Naegele assumes. */
|
|
12
|
+
export declare const DEFAULT_CYCLE_LENGTH = 28;
|
|
13
|
+
export interface DueDateInput {
|
|
14
|
+
method: DueDateMethod;
|
|
15
|
+
/** The reference date for the chosen method (LMP / conception / transfer). */
|
|
16
|
+
date: Date;
|
|
17
|
+
/** LMP only — average cycle length in days. Defaults to 28. */
|
|
18
|
+
cycleLength?: number;
|
|
19
|
+
/** IVF only — embryo age at transfer in days. Defaults to 5 (blastocyst). */
|
|
20
|
+
embryoAge?: EmbryoAge;
|
|
21
|
+
}
|
|
22
|
+
export interface GestationalAge {
|
|
23
|
+
weeks: number;
|
|
24
|
+
days: number;
|
|
25
|
+
totalDays: number;
|
|
26
|
+
}
|
|
27
|
+
export interface DueDateResult {
|
|
28
|
+
/** Estimated date of delivery. */
|
|
29
|
+
dueDate: Date;
|
|
30
|
+
/** GA day-0 anchor (notional LMP) the trimester maths counts from. */
|
|
31
|
+
gestationalStart: Date;
|
|
32
|
+
/** Gestational age as of `today`; `null` before conception. */
|
|
33
|
+
gestationalAge: GestationalAge | null;
|
|
34
|
+
trimester: Trimester;
|
|
35
|
+
}
|
|
36
|
+
/** Classify gestational age (in completed weeks) into a trimester. */
|
|
37
|
+
export declare function trimesterForWeeks(totalDays: number): Trimester;
|
|
38
|
+
/**
|
|
39
|
+
* Resolve the gestational start (notional LMP) and due date for a method.
|
|
40
|
+
* `cycleLength` shifts a longer/shorter cycle's ovulation, moving the due
|
|
41
|
+
* date while GA stays counted from the LMP — the standard convention.
|
|
42
|
+
*/
|
|
43
|
+
export declare function computeDueDate(input: DueDateInput, today: Date): DueDateResult;
|
|
44
|
+
/** Gestational weeks at which clinically notable milestones fall. */
|
|
45
|
+
export declare const MILESTONE_WEEKS: readonly [12, 24, 28, 37, 40];
|
|
46
|
+
export interface GestationalMilestone {
|
|
47
|
+
/** Stable key (`w12`, `w24`, …) for i18n lookup. */
|
|
48
|
+
key: string;
|
|
49
|
+
/** Completed gestational weeks. */
|
|
50
|
+
week: number;
|
|
51
|
+
/** Calendar date the milestone is reached. */
|
|
52
|
+
date: Date;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Project the standard milestone dates from a gestational start (notional
|
|
56
|
+
* LMP / GA day 0): end of first trimester (12w), viability (24w), third
|
|
57
|
+
* trimester (28w), term (37w) and the 40-week due date.
|
|
58
|
+
*/
|
|
59
|
+
export declare function gestationalMilestones(gestationalStart: Date): GestationalMilestone[];
|
|
60
|
+
//# sourceMappingURL=gestation.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { DueDateCalculator } from './due-date-calculator';
|
|
2
|
+
export type { DueDateCalculatorProps } from './due-date-calculator';
|
|
3
|
+
export { computeDueDate, trimesterForWeeks, gestationalMilestones, MILESTONE_WEEKS, GESTATION_DAYS, TERM_FROM_CONCEPTION_DAYS, DEFAULT_CYCLE_LENGTH, type DueDateMethod, type EmbryoAge, type Trimester, type DueDateInput, type DueDateResult, type GestationalAge, type GestationalMilestone, } from './gestation';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { D as s } from "../../_chunks/due-date-calculator-CUspKSTw.js";
|
|
2
|
+
import { D as E, G as o, M as D, T as r, c as T, g as _, t as C } from "../../_chunks/gestation-BXEgDGmP.js";
|
|
3
|
+
export {
|
|
4
|
+
E as DEFAULT_CYCLE_LENGTH,
|
|
5
|
+
s as DueDateCalculator,
|
|
6
|
+
o as GESTATION_DAYS,
|
|
7
|
+
D as MILESTONE_WEEKS,
|
|
8
|
+
r as TERM_FROM_CONCEPTION_DAYS,
|
|
9
|
+
T as computeDueDate,
|
|
10
|
+
_ as gestationalMilestones,
|
|
11
|
+
C as trimesterForWeeks
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Identity inputs needed to derive the (non-omocodic) codice fiscale. */
|
|
2
|
+
export interface CodiceFiscaleInput {
|
|
3
|
+
/** Family name (cognome). Diacritics are folded; non-letters ignored. */
|
|
4
|
+
surname: string;
|
|
5
|
+
/** Given name (nome). Diacritics are folded; non-letters ignored. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Date of birth — a `Date` or an ISO `YYYY-MM-DD` (or full ISO) string. */
|
|
8
|
+
birthDate: Date | string;
|
|
9
|
+
/** Biological sex as recorded for the fiscal code: 'M' or 'F'. */
|
|
10
|
+
sex: 'M' | 'F';
|
|
11
|
+
/** 4-character cadastral / Belfiore code of the birthplace (e.g. H501). */
|
|
12
|
+
belfioreCode: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Compute the full 16-character (non-omocodic) codice fiscale from a
|
|
16
|
+
* person's identity data. The caller supplies the 4-char Belfiore code of
|
|
17
|
+
* the birthplace (the kit does not bundle the municipality table).
|
|
18
|
+
*
|
|
19
|
+
* Throws if `birthDate` is unparseable or `belfioreCode` is not 4
|
|
20
|
+
* `[A-Z][0-9]{3}`-shaped characters — i.e. a letter followed by 3 digits,
|
|
21
|
+
* the canonical Belfiore shape.
|
|
22
|
+
*/
|
|
23
|
+
export declare function calculateCodiceFiscale(input: CodiceFiscaleInput): string;
|
|
24
|
+
//# sourceMappingURL=calculate-codice-fiscale.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type FiscalCodeReason } from './is-valid-codice-fiscale';
|
|
2
|
+
import { type CodiceFiscaleInput } from './calculate-codice-fiscale';
|
|
3
|
+
/** Agent-readiness curated handle for FiscalCodeInput. */
|
|
4
|
+
export interface FiscalCodeInputHandle {
|
|
5
|
+
getValue: () => string;
|
|
6
|
+
setValue: (value: string) => void;
|
|
7
|
+
clear: () => void;
|
|
8
|
+
focus: () => void;
|
|
9
|
+
isValid: () => boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Structured payload emitted on every keystroke alongside the raw value. */
|
|
12
|
+
export interface FiscalCodeChangeMeta {
|
|
13
|
+
/** Structurally sound AND control character matches (always 16 chars). */
|
|
14
|
+
isValid: boolean;
|
|
15
|
+
/** Whether all 16 characters are present (regardless of validity). */
|
|
16
|
+
isComplete: boolean;
|
|
17
|
+
/** Why the value is (in)valid — drives consumer messaging. */
|
|
18
|
+
reason: FiscalCodeReason;
|
|
19
|
+
}
|
|
20
|
+
export interface FiscalCodeInputProps {
|
|
21
|
+
/** Controlled value (raw, uppercased, no spaces). Pair with onChange. */
|
|
22
|
+
value?: string;
|
|
23
|
+
/** Uncontrolled initial value. Normalised on mount. */
|
|
24
|
+
defaultValue?: string;
|
|
25
|
+
/** Fires on every keystroke with the normalised raw string + meta. */
|
|
26
|
+
onChange?: (raw: string, meta: FiscalCodeChangeMeta) => void;
|
|
27
|
+
size?: 'sm' | 'md' | 'lg';
|
|
28
|
+
tone?: 'default' | 'error';
|
|
29
|
+
/** When the invalid tone + error string surface. Never marks partial input invalid. */
|
|
30
|
+
validateOn?: 'change' | 'blur' | 'submit';
|
|
31
|
+
/** Controlled escape hatch to force the invalid state (e.g. server rejection). */
|
|
32
|
+
showError?: boolean;
|
|
33
|
+
/** Overrides the kit's default i18n error string. */
|
|
34
|
+
errorMessage?: string;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
readOnly?: boolean;
|
|
37
|
+
required?: boolean;
|
|
38
|
+
placeholder?: string;
|
|
39
|
+
/** Render the "16 characters" caption when NOT inside a FormField. */
|
|
40
|
+
showFormatHint?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* OPT-IN. When the consuming form already holds the person's identity
|
|
43
|
+
* data, supply it here to render an inline "calculate" affordance: a
|
|
44
|
+
* small icon button that derives the codice fiscale and fills the field.
|
|
45
|
+
* The caller supplies the 4-char `belfioreCode` of the birthplace — the
|
|
46
|
+
* kit does not bundle the municipality lookup table. Omit to render
|
|
47
|
+
* nothing extra (no behavioural change). Ignored when readOnly/disabled.
|
|
48
|
+
*/
|
|
49
|
+
calculateFrom?: CodiceFiscaleInput;
|
|
50
|
+
id?: string;
|
|
51
|
+
name?: string;
|
|
52
|
+
className?: string;
|
|
53
|
+
'aria-label'?: string;
|
|
54
|
+
}
|
|
55
|
+
declare const wrapperVariants: (props?: ({
|
|
56
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
57
|
+
tone?: "default" | "error" | null | undefined;
|
|
58
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
59
|
+
export declare const FiscalCodeInput: import("react").ForwardRefExoticComponent<FiscalCodeInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
60
|
+
export { wrapperVariants as fiscalCodeWrapperVariants };
|
|
61
|
+
//# sourceMappingURL=fiscal-code-input.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { FiscalCodeInput, fiscalCodeWrapperVariants, } from './fiscal-code-input';
|
|
2
|
+
export type { FiscalCodeInputProps, FiscalCodeInputHandle, FiscalCodeChangeMeta, } from './fiscal-code-input';
|
|
3
|
+
export { fiscalCodeInputAgent } from './fiscal-code-input.agent';
|
|
4
|
+
export { classifyCodiceFiscale, isValidCodiceFiscale, computeControlChar, type FiscalCodeReason, } from './is-valid-codice-fiscale';
|
|
5
|
+
export { calculateCodiceFiscale, type CodiceFiscaleInput, } from './calculate-codice-fiscale';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { F as c, c as e, a as i, b as l, f as o, w as t, i as C } from "../../_chunks/fiscal-code-input-BZ0FxwUl.js";
|
|
2
|
+
export {
|
|
3
|
+
c as FiscalCodeInput,
|
|
4
|
+
e as calculateCodiceFiscale,
|
|
5
|
+
i as classifyCodiceFiscale,
|
|
6
|
+
l as computeControlChar,
|
|
7
|
+
o as fiscalCodeInputAgent,
|
|
8
|
+
t as fiscalCodeWrapperVariants,
|
|
9
|
+
C as isValidCodiceFiscale
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Outcome of a structural + checksum check on a 16-char candidate. */
|
|
2
|
+
export type FiscalCodeReason = 'empty' | 'incomplete' | 'badFormat' | 'badChecksum' | 'valid';
|
|
3
|
+
/**
|
|
4
|
+
* Compute the expected 16th control character from the first 15
|
|
5
|
+
* informative characters. The input MUST already be 15 uppercase
|
|
6
|
+
* `[A-Z0-9]` characters (callers guard with `hasValidStructure`).
|
|
7
|
+
*/
|
|
8
|
+
export declare function computeControlChar(first15: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Classify a normalised (uppercased, `[A-Z0-9]`-only) candidate.
|
|
11
|
+
*
|
|
12
|
+
* - `empty` — no characters.
|
|
13
|
+
* - `incomplete` — fewer than 16 characters.
|
|
14
|
+
* - `badFormat` — 16 characters but the position-class pattern fails.
|
|
15
|
+
* - `badChecksum` — 16 well-formed characters but the control char is wrong.
|
|
16
|
+
* - `valid` — structurally sound and the control char matches.
|
|
17
|
+
*/
|
|
18
|
+
export declare function classifyCodiceFiscale(raw: string): FiscalCodeReason;
|
|
19
|
+
/** Convenience boolean: structurally sound AND control character matches. */
|
|
20
|
+
export declare function isValidCodiceFiscale(raw: string): boolean;
|
|
21
|
+
//# sourceMappingURL=is-valid-codice-fiscale.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { type InsertPayload } from '../_shared/insert-result';
|
|
3
|
+
import { type Trimester, type GestationalAge } from '../due-date-calculator';
|
|
4
|
+
declare const rootVariants: (props?: ({
|
|
5
|
+
width?: "auto" | "full" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
type DateMethod = 'lmp' | 'edd';
|
|
8
|
+
export interface GestationalAgeResult {
|
|
9
|
+
gestationalAge: GestationalAge | null;
|
|
10
|
+
trimester: Trimester;
|
|
11
|
+
dueDate: Date;
|
|
12
|
+
}
|
|
13
|
+
export interface GestationalAgeCalculatorProps extends VariantProps<typeof rootVariants> {
|
|
14
|
+
/** Whether the input date is the last period (`lmp`) or the due date (`edd`). */
|
|
15
|
+
defaultMethod?: DateMethod;
|
|
16
|
+
/** Fires whenever a result can be computed (and `null` when it can't). */
|
|
17
|
+
onResultChange?: (result: GestationalAgeResult | null) => void;
|
|
18
|
+
/** When provided, shows an "Insert" button that emits the result for an editor. */
|
|
19
|
+
onInsert?: (payload: InsertPayload) => void;
|
|
20
|
+
/** Opaque instance id, emitted as `data-component-id`. */
|
|
21
|
+
id?: string;
|
|
22
|
+
/** Extra class names on the wrapper. */
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const GestationalAgeCalculator: import("react").ForwardRefExoticComponent<GestationalAgeCalculatorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=gestational-age-calculator.d.ts.map
|
|
@@ -18,6 +18,8 @@ export * from './copy-field';
|
|
|
18
18
|
export * from './date-picker';
|
|
19
19
|
export * from './date-range-picker';
|
|
20
20
|
export * from './date-time-picker';
|
|
21
|
+
export * from './due-date-calculator';
|
|
22
|
+
export * from './gestational-age-calculator';
|
|
21
23
|
export * from './email-input';
|
|
22
24
|
export * from './file-upload';
|
|
23
25
|
export * from './form-field';
|
|
@@ -36,10 +38,14 @@ export * from './switch';
|
|
|
36
38
|
export * from './text-area';
|
|
37
39
|
export * from './text-input';
|
|
38
40
|
export * from './time-picker';
|
|
41
|
+
export { InsertButton, type InsertButtonProps, type InsertPayload, type InsertMode, type InsertCardData, type InsertCardField, } from './_shared/insert-result';
|
|
39
42
|
export * from './accordion';
|
|
40
43
|
export * from './avatar';
|
|
41
44
|
export * from './badge';
|
|
42
45
|
export * from './benefit-card';
|
|
46
|
+
export * from './bmi-calculator';
|
|
47
|
+
export * from './calculator-dialog';
|
|
48
|
+
export * from './cycle-calculator';
|
|
43
49
|
export * from './card';
|
|
44
50
|
export * from './carousel';
|
|
45
51
|
export * from './contact-card';
|
|
@@ -87,6 +93,7 @@ export * from './message-tray';
|
|
|
87
93
|
export * from './notification-card';
|
|
88
94
|
export * from './notification-tray';
|
|
89
95
|
export * from './popover';
|
|
96
|
+
export * from './pregnancy-weight-gain';
|
|
90
97
|
export * from './privacy-lock';
|
|
91
98
|
export * from './progress';
|
|
92
99
|
export * from './sheet';
|
|
@@ -103,6 +110,7 @@ export * from './resizable';
|
|
|
103
110
|
export * from './scroll-area';
|
|
104
111
|
export * from './separator';
|
|
105
112
|
export * from './theme-root';
|
|
113
|
+
export * from './unit-converter';
|
|
106
114
|
export * from './visually-hidden';
|
|
107
115
|
export * from './chart';
|
|
108
116
|
export * from './ai-prompt-input';
|
|
@@ -135,4 +143,11 @@ export * from './workflow';
|
|
|
135
143
|
export * from '../patterns/alia-assistant';
|
|
136
144
|
export * from '../patterns/patient-shell';
|
|
137
145
|
export * from '../patterns/marketplace-app-shell';
|
|
146
|
+
export * from './dependent-selector';
|
|
147
|
+
export * from './document-scanner';
|
|
148
|
+
export * from './fiscal-code-input';
|
|
149
|
+
export * from './qr-code';
|
|
150
|
+
export * from './session-countdown';
|
|
151
|
+
export * from './social-sign-in-button';
|
|
152
|
+
export * from './wallet-pay-button';
|
|
138
153
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { PregnancyWeightGain } from './pregnancy-weight-gain';
|
|
2
|
+
export type { PregnancyWeightGainProps } from './pregnancy-weight-gain';
|
|
3
|
+
export { assessWeightGain, recommendedGainToDate, TOTAL_GAIN_BANDS, RATE_BANDS, type GainBand, type GainStatus, type WeightGainInput, type WeightGainResult, } from './weight-gain';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { P as s, R as n, T as i, a as r, r as A } from "../../_chunks/pregnancy-weight-gain-BCdi-JSv.js";
|
|
2
|
+
export {
|
|
3
|
+
s as PregnancyWeightGain,
|
|
4
|
+
n as RATE_BANDS,
|
|
5
|
+
i as TOTAL_GAIN_BANDS,
|
|
6
|
+
r as assessWeightGain,
|
|
7
|
+
A as recommendedGainToDate
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { type InsertPayload } from '../_shared/insert-result';
|
|
3
|
+
import { type WeightGainResult } from './weight-gain';
|
|
4
|
+
declare const rootVariants: (props?: ({
|
|
5
|
+
width?: "auto" | "full" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface PregnancyWeightGainProps extends VariantProps<typeof rootVariants> {
|
|
8
|
+
/** Fires whenever a result can be computed (and `null` when it can't). */
|
|
9
|
+
onResultChange?: (result: WeightGainResult | null) => void;
|
|
10
|
+
/** When provided, shows an "Insert" button that emits the result for an editor. */
|
|
11
|
+
onInsert?: (payload: InsertPayload) => void;
|
|
12
|
+
/** Opaque instance id, emitted as `data-component-id`. */
|
|
13
|
+
id?: string;
|
|
14
|
+
/** Extra class names on the wrapper. */
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const PregnancyWeightGain: import("react").ForwardRefExoticComponent<PregnancyWeightGainProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=pregnancy-weight-gain.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type BmiCategory } from '../bmi-calculator/bmi';
|
|
2
|
+
export interface GainBand {
|
|
3
|
+
/** Lower bound, kg. */
|
|
4
|
+
min: number;
|
|
5
|
+
/** Upper bound, kg. */
|
|
6
|
+
max: number;
|
|
7
|
+
}
|
|
8
|
+
export type GainStatus = 'below' | 'within' | 'above';
|
|
9
|
+
/** IOM (2009) total recommended gain for a singleton pregnancy, kg. */
|
|
10
|
+
export declare const TOTAL_GAIN_BANDS: Record<BmiCategory, GainBand>;
|
|
11
|
+
/** IOM (2009) mean rate of gain in the 2nd/3rd trimester, kg per week. */
|
|
12
|
+
export declare const RATE_BANDS: Record<BmiCategory, GainBand>;
|
|
13
|
+
/** First-trimester total gain band, kg (category-independent in IOM). */
|
|
14
|
+
export declare const FIRST_TRIMESTER_GAIN: GainBand;
|
|
15
|
+
/** Completed weeks counted as the first trimester for gain purposes. */
|
|
16
|
+
export declare const FIRST_TRIMESTER_WEEKS = 13;
|
|
17
|
+
export interface WeightGainInput {
|
|
18
|
+
/** Pre-pregnancy BMI (kg/m²) — drives the category. */
|
|
19
|
+
prePregnancyBmi: number;
|
|
20
|
+
/** Pre-pregnancy weight, kg. */
|
|
21
|
+
prePregnancyWeightKg: number;
|
|
22
|
+
/** Current weight, kg. */
|
|
23
|
+
currentWeightKg: number;
|
|
24
|
+
/** Completed gestational weeks. */
|
|
25
|
+
gestationalWeeks: number;
|
|
26
|
+
}
|
|
27
|
+
export interface WeightGainResult {
|
|
28
|
+
category: BmiCategory;
|
|
29
|
+
/** Recommended TOTAL gain across the whole pregnancy. */
|
|
30
|
+
totalRange: GainBand;
|
|
31
|
+
/** Recommended gain accumulated by the current gestational week. */
|
|
32
|
+
recommendedToDate: GainBand;
|
|
33
|
+
/** Actual gain so far (current − pre-pregnancy), kg. */
|
|
34
|
+
actualGainKg: number;
|
|
35
|
+
/** Where the actual gain sits against the to-date recommendation. */
|
|
36
|
+
status: GainStatus;
|
|
37
|
+
}
|
|
38
|
+
/** Recommended cumulative gain by a given gestational week. */
|
|
39
|
+
export declare function recommendedGainToDate(category: BmiCategory, weeks: number): GainBand;
|
|
40
|
+
export declare function assessWeightGain(input: WeightGainInput): WeightGainResult;
|
|
41
|
+
//# sourceMappingURL=weight-gain.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as s, a as A, P as L, S as e, c as S, p as _ } from "../../_chunks/public-footer.agent-
|
|
1
|
+
import { D as s, a as A, P as L, S as e, c as S, p as _ } from "../../_chunks/public-footer.agent-zw1vFin_.js";
|
|
2
2
|
export {
|
|
3
3
|
s as DEFAULT_MARKETING_BASE_URL,
|
|
4
4
|
A as DEFAULT_SOCIAL_URLS,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { QrCode } from './qr-code';
|
|
2
|
+
export type { QrCodeProps } from './qr-code';
|
|
3
|
+
export { qrCodeAgent } from './qr-code.agent';
|
|
4
|
+
export { createQrMatrix, setQrCreate, type ErrorCorrectionLevel, type QrMatrix, type QrCreateFn, } from './qr-encode';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { type ErrorCorrectionLevel } from './qr-encode';
|
|
4
|
+
declare const qrCodeVariants: (props?: ({
|
|
5
|
+
variant?: "plain" | "framed" | "with-caption" | null | undefined;
|
|
6
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
7
|
+
tone?: "default" | "inverted" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
type QrCodeVariantProps = VariantProps<typeof qrCodeVariants>;
|
|
10
|
+
interface QrCodeBase extends Omit<HTMLAttributes<HTMLDivElement>, 'role' | 'aria-label' | 'aria-hidden' | 'children' | 'color'>, QrCodeVariantProps {
|
|
11
|
+
/**
|
|
12
|
+
* The string encoded into the QR — typically an absolute https URL
|
|
13
|
+
* (check-in landing or patient-portal link), but any text is valid. An
|
|
14
|
+
* empty string renders the empty state. Not validated as a URL: the kit
|
|
15
|
+
* is byte-transparent and the consumer passes a fully-formed value.
|
|
16
|
+
*/
|
|
17
|
+
value: string;
|
|
18
|
+
/**
|
|
19
|
+
* Reed-Solomon redundancy. When omitted it defaults to `H` (high, ~30%
|
|
20
|
+
* recovery) whenever a centre logo is shown — the obscured centre still
|
|
21
|
+
* decodes — and to `M` when the logo is disabled (`logo={false}`). Pass an
|
|
22
|
+
* explicit level to override (raising to `Q`/`H` is required if a logo
|
|
23
|
+
* occludes the centre).
|
|
24
|
+
*/
|
|
25
|
+
errorCorrectionLevel?: ErrorCorrectionLevel;
|
|
26
|
+
/**
|
|
27
|
+
* Centre mark over the matrix. The product wants the AlfaDocs mark present
|
|
28
|
+
* on every code, so this defaults to the canonical mark
|
|
29
|
+
* ({@link AlfadocsLogoMark}, decorative). Pass `logo={false}` to disable it,
|
|
30
|
+
* or `logo={<custom/>}` to override with your own node. The mark is clamped
|
|
31
|
+
* to ~22% of the edge and seated on a tone-matched opaque knockout so the
|
|
32
|
+
* modules beneath it are visually cleared; ECC-H reconstructs them on scan.
|
|
33
|
+
*/
|
|
34
|
+
logo?: ReactNode | false;
|
|
35
|
+
/** Caption for `variant="with-caption"`. Defaults to the i18n caption. */
|
|
36
|
+
caption?: string;
|
|
37
|
+
/** Quiet-zone width in MODULES. Clamped up to the spec minimum of 4. */
|
|
38
|
+
quietZone?: number;
|
|
39
|
+
}
|
|
40
|
+
type QrCodeA11y = {
|
|
41
|
+
/**
|
|
42
|
+
* Human-readable destination woven into the accessible name, e.g. a
|
|
43
|
+
* practice name → "QR code to check in at Studio Dentistico Rossi".
|
|
44
|
+
* Not rendered visually.
|
|
45
|
+
*/
|
|
46
|
+
label?: string;
|
|
47
|
+
decorative?: never;
|
|
48
|
+
} | {
|
|
49
|
+
label?: never;
|
|
50
|
+
/**
|
|
51
|
+
* Decorative usage — the code is hidden from assistive tech (rare; the
|
|
52
|
+
* same QR is duplicated purely ornamentally next to a real one).
|
|
53
|
+
*/
|
|
54
|
+
decorative: true;
|
|
55
|
+
};
|
|
56
|
+
export type QrCodeProps = QrCodeBase & QrCodeA11y;
|
|
57
|
+
export declare const QrCode: import("react").ForwardRefExoticComponent<QrCodeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
58
|
+
export {};
|
|
59
|
+
//# sourceMappingURL=qr-code.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type ErrorCorrectionLevel = 'L' | 'M' | 'Q' | 'H';
|
|
2
|
+
export interface QrMatrix {
|
|
3
|
+
/** Edge length in modules (e.g. 21 for version 1). */
|
|
4
|
+
size: number;
|
|
5
|
+
/** Row-major `size * size` booleans — true = dark module. */
|
|
6
|
+
modules: boolean[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Shape of the geometry `qrcode.create()` returns, so a host that has the
|
|
10
|
+
* dependency installed can hand its output straight to the renderer.
|
|
11
|
+
*/
|
|
12
|
+
export interface QrcodeCreateResult {
|
|
13
|
+
modules: {
|
|
14
|
+
size: number;
|
|
15
|
+
data: Uint8Array | number[];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/** Injectable geometry provider — swap in `qrcode.create` once installed. */
|
|
19
|
+
export type QrCreateFn = (value: string, options: {
|
|
20
|
+
errorCorrectionLevel: ErrorCorrectionLevel;
|
|
21
|
+
}) => QrcodeCreateResult;
|
|
22
|
+
/**
|
|
23
|
+
* OPTIONAL override: register the npm `qrcode` package's `create` as the
|
|
24
|
+
* geometry source. Not used by default — the vendored byte-mode encoder is the
|
|
25
|
+
* shipped path. A maintainer who chooses to add the dependency can wire this
|
|
26
|
+
* once at app/bundle init:
|
|
27
|
+
*
|
|
28
|
+
* import QRCode from 'qrcode';
|
|
29
|
+
* import { setQrCreate } from '@alfadocs/ui-kit/qr-code';
|
|
30
|
+
* setQrCreate(QRCode.create);
|
|
31
|
+
*
|
|
32
|
+
* Pass `null` to revert to the vendored encoder. Either path yields scannable
|
|
33
|
+
* geometry — the seam keeps the call-site identical so the swap is a one-liner.
|
|
34
|
+
*/
|
|
35
|
+
export declare function setQrCreate(fn: QrCreateFn | null): void;
|
|
36
|
+
/**
|
|
37
|
+
* Build the QR module matrix for `value`. Uses the vendored byte-mode encoder
|
|
38
|
+
* by default; only delegates to a `qrcode` geometry provider if one has been
|
|
39
|
+
* registered via {@link setQrCreate} (optional, off by default). Returns the
|
|
40
|
+
* raw module geometry — the component renders its own token-styled SVG.
|
|
41
|
+
*
|
|
42
|
+
* Throws when the value exceeds the encodable capacity; callers catch and
|
|
43
|
+
* render the empty state (see QrCode's defensive try/catch).
|
|
44
|
+
*/
|
|
45
|
+
export declare function createQrMatrix(value: string, errorCorrectionLevel: ErrorCorrectionLevel): QrMatrix;
|
|
46
|
+
//# sourceMappingURL=qr-encode.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as t, e as o, r as s, t as i, a as e, w as n } from "../../_chunks/rich-text-editor-
|
|
1
|
+
import { R as t, e as o, r as s, t as i, a as e, w as n } from "../../_chunks/rich-text-editor-DLbg2852.js";
|
|
2
2
|
export {
|
|
3
3
|
t as RichTextEditor,
|
|
4
4
|
o as editorSurfaceVariants,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const countdownVariants: (props?: ({
|
|
4
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5
|
+
tone?: "warning" | "running" | "expired" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
type CountdownVariantProps = Pick<VariantProps<typeof countdownVariants>, 'size'>;
|
|
8
|
+
export interface SessionCountdownProps extends Omit<HTMLAttributes<HTMLDivElement>, 'role'>, CountdownVariantProps {
|
|
9
|
+
/** Controlled remaining milliseconds. Source of truth; no internal tick. */
|
|
10
|
+
remainingMs?: number;
|
|
11
|
+
/** Absolute deadline (ms-epoch, ISO string, or Date). Ticks internally. */
|
|
12
|
+
expiresAt?: number | string | Date;
|
|
13
|
+
/** Full session duration in ms — progress denominator. Default 900000. */
|
|
14
|
+
totalMs?: number;
|
|
15
|
+
/** Remaining threshold (ms) at/below which tone escalates to warning. */
|
|
16
|
+
warnAtMs?: number;
|
|
17
|
+
/** Type / padding scale. Default `md`. */
|
|
18
|
+
size?: 'sm' | 'md' | 'lg';
|
|
19
|
+
/** Determinate Progress bar of elapsed fraction. */
|
|
20
|
+
showProgress?: boolean;
|
|
21
|
+
/** Fired exactly once when remaining crosses to 0. Idempotent. */
|
|
22
|
+
onExpire?: () => void;
|
|
23
|
+
/** Restart CTA handler (expired banner). Omit → no button rendered. */
|
|
24
|
+
onRestart?: () => void;
|
|
25
|
+
/** Restart in flight — disables + spins the Restart button. */
|
|
26
|
+
restarting?: boolean;
|
|
27
|
+
/** Internal tick cadence (ms) for the `expiresAt` path. Default 1000. */
|
|
28
|
+
tickMs?: number;
|
|
29
|
+
/** Locale override for number formatting. Falls back to i18n.language. */
|
|
30
|
+
locale?: string;
|
|
31
|
+
/** Override the accessible name of the timer region. */
|
|
32
|
+
label?: string;
|
|
33
|
+
/** Merged onto the outermost element. CVA-composed, never inline style. */
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare const SessionCountdown: import("react").ForwardRefExoticComponent<SessionCountdownProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=session-countdown.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const skeletonVariants: (props?: ({
|
|
4
|
-
variant?: "text" | "
|
|
4
|
+
variant?: "text" | "rectangular" | "rounded" | "circular" | null | undefined;
|
|
5
5
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface SkeletonProps extends Omit<HTMLAttributes<HTMLDivElement>, 'aria-hidden' | 'style'>, VariantProps<typeof skeletonVariants> {
|