@alfadocs/ui-kit 0.37.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.
Files changed (196) hide show
  1. package/dist/_chunks/Alfadocs_Logo_Mark-7o3L3WBI.js +56 -0
  2. package/dist/_chunks/{alia-sidebar-BEoMl6UL.js → alia-sidebar-DXsYPinm.js} +2 -2
  3. package/dist/_chunks/{ar-D1RwVZFj.js → ar-Cn_NxqkN.js} +2 -2
  4. package/dist/_chunks/bmi-BxD-tFzU.js +32 -0
  5. package/dist/_chunks/bmi-calculator-BRUru9QX.js +213 -0
  6. package/dist/_chunks/{booking-DqXsd1Mv.js → booking-DK_BPHnQ.js} +4 -4
  7. package/dist/_chunks/calculator-dialog-B74fqpFZ.js +40 -0
  8. package/dist/_chunks/{chat-message-D53_fH2w.js → chat-message-ASgGtj-L.js} +30 -39
  9. package/dist/_chunks/{contact-profile-card-BA6fgS45.js → contact-profile-card-DHyuAPXM.js} +14 -13
  10. package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +185 -0
  11. package/dist/_chunks/{date-picker-CXFpu-qY.js → date-picker-CvQfs6Xh.js} +2 -2
  12. package/dist/_chunks/{date-range-picker-I-q5rifj.js → date-range-picker-U9fn1g9d.js} +3 -3
  13. package/dist/_chunks/{date-time-picker-CqpGPlcH.js → date-time-picker-Cva0ZCWw.js} +2 -2
  14. package/dist/_chunks/{de-HTQ4b4-J.js → de-BMM2H7Bs.js} +2 -2
  15. package/dist/_chunks/dependent-selector-CRWgieHm.js +324 -0
  16. package/dist/_chunks/document-scanner-CdHQ6lTN.js +702 -0
  17. package/dist/_chunks/due-date-calculator-CUspKSTw.js +171 -0
  18. package/dist/_chunks/{editable-currency-cell-renderer-DnjwZNZP.js → editable-currency-cell-renderer-DGKuRNVG.js} +2 -2
  19. package/dist/_chunks/{el-Dr1pjuDq.js → el-BYPonAaK.js} +2 -2
  20. package/dist/_chunks/{es-CvyTjLS0.js → es-CMkVCQ4F.js} +2 -2
  21. package/dist/_chunks/{file-upload-CdozCPct.js → file-upload-CnzRcErt.js} +2 -1
  22. package/dist/_chunks/fiscal-code-input-BZ0FxwUl.js +540 -0
  23. package/dist/_chunks/{fr-CS7aqaFR.js → fr-BcuWxqft.js} +2 -2
  24. package/dist/_chunks/gestation-BXEgDGmP.js +50 -0
  25. package/dist/_chunks/gestational-age-calculator-CsQ05qDy.js +165 -0
  26. package/dist/_chunks/heart-C0faivFf.js +20 -0
  27. package/dist/_chunks/{hi-3uy8KpsH.js → hi-wkq_rQAh.js} +2 -2
  28. package/dist/_chunks/image-C6RM5hfF.js +16 -0
  29. package/dist/_chunks/insert-result-yJ0QavoN.js +133 -0
  30. package/dist/_chunks/{isSameWeek-DRpMibi9.js → isSameWeek-Bim5ftRd.js} +2 -2
  31. package/dist/_chunks/{it-B_RF5VSw.js → it-GiQrQ9p4.js} +3 -3
  32. package/dist/_chunks/{ja-C1mEYy35.js → ja-qfYg3Rua.js} +2 -2
  33. package/dist/_chunks/{logo-_Z-jLq80.js → logo-yituK7sE.js} +42 -91
  34. package/dist/_chunks/{marketplace-app-shell-DXHxy9dj.js → marketplace-app-shell-BnClrL2B.js} +2 -2
  35. package/dist/_chunks/{nl-Dl7lO2t3.js → nl-xOogO4sZ.js} +2 -2
  36. package/dist/_chunks/{patient-shell-CDvMw_Nk.js → patient-shell-Bz3CdO84.js} +2 -2
  37. package/dist/_chunks/{pl-Dgsogljx.js → pl-GnOW6eGK.js} +3 -3
  38. package/dist/_chunks/{practice-results-BFM_lyUs.js → practice-results-C8ciLQap.js} +3 -2
  39. package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +209 -0
  40. package/dist/_chunks/{privacy-lock-DD-wHxBg.js → privacy-lock-BmX_gkvt.js} +2 -2
  41. package/dist/_chunks/{pt-Dm2JF4bc.js → pt-_bV5b5RW.js} +2 -2
  42. package/dist/_chunks/{public-footer.agent-Cjfe5jus.js → public-footer.agent-zw1vFin_.js} +2 -2
  43. package/dist/_chunks/qr-code-DNXhi6se.js +568 -0
  44. package/dist/_chunks/{react-day-picker-DYDdR8Vv.js → react-day-picker-CdtIiKjx.js} +24 -24
  45. package/dist/_chunks/{rich-text-editor-CHmr9Bz8.js → rich-text-editor-DLbg2852.js} +114 -124
  46. package/dist/_chunks/{ro-BXFZ_xIX.js → ro-BEcyh5Nj.js} +2 -2
  47. package/dist/_chunks/rotate-ccw-BWANpitO.js +15 -0
  48. package/dist/_chunks/{ru-BPQkNRRV.js → ru-Bi86hqMf.js} +3 -3
  49. package/dist/_chunks/session-countdown-LPnhTHjn.js +214 -0
  50. package/dist/_chunks/{shield-check-BhHyReu8.js → shield-check-C73ma9Cs.js} +8 -24
  51. package/dist/_chunks/{sign-in-with-alfadocs-button-BI0fVonM.js → sign-in-with-alfadocs-button-DeHBFRNS.js} +2 -2
  52. package/dist/_chunks/social-sign-in-button-X54ySJr1.js +243 -0
  53. package/dist/_chunks/{sq-ChTlGFcJ.js → sq-BujHSAWu.js} +2 -2
  54. package/dist/_chunks/subDays-_T9YeKPX.js +8 -0
  55. package/dist/_chunks/{sv-Do_gs6ir.js → sv-C8AeDrTA.js} +2 -2
  56. package/dist/_chunks/{tr-da_UnkYH.js → tr-CMSs_Vgf.js} +2 -2
  57. package/dist/_chunks/unit-converter-EUwO6QYq.js +168 -0
  58. package/dist/_chunks/wallet-pay-button-DK4ESYge.js +250 -0
  59. package/dist/_chunks/{zh-CN-C9qi5oak.js → zh-CN-eXB-PFu4.js} +3 -3
  60. package/dist/agent-catalog.json +203 -1
  61. package/dist/brand/provider-marks/apple-pay.d.ts +12 -0
  62. package/dist/brand/provider-marks/apple.d.ts +12 -0
  63. package/dist/brand/provider-marks/google-pay.d.ts +12 -0
  64. package/dist/brand/provider-marks/google.d.ts +13 -0
  65. package/dist/components/_shared/insert-result.d.ts +47 -0
  66. package/dist/components/bmi-calculator/bmi-calculator.d.ts +3 -0
  67. package/dist/components/bmi-calculator/index.js +6 -5
  68. package/dist/components/booking/index.js +1 -1
  69. package/dist/components/calculator-dialog/calculator-dialog.d.ts +26 -0
  70. package/dist/components/calculator-dialog/index.d.ts +3 -0
  71. package/dist/components/calculator-dialog/index.js +5 -0
  72. package/dist/components/chat-message/index.js +1 -1
  73. package/dist/components/contact-profile-card/index.js +1 -1
  74. package/dist/components/cycle-calculator/cycle-calculator.d.ts +21 -0
  75. package/dist/components/cycle-calculator/cycle.d.ts +37 -0
  76. package/dist/components/cycle-calculator/index.d.ts +4 -0
  77. package/dist/components/cycle-calculator/index.js +7 -0
  78. package/dist/components/data-table/index.js +1 -1
  79. package/dist/components/date-picker/index.js +1 -1
  80. package/dist/components/date-range-picker/index.js +1 -1
  81. package/dist/components/date-time-picker/index.js +1 -1
  82. package/dist/components/dependent-selector/dependent-selector.agent.d.ts +4 -0
  83. package/dist/components/dependent-selector/dependent-selector.d.ts +72 -0
  84. package/dist/components/dependent-selector/index.d.ts +4 -0
  85. package/dist/components/dependent-selector/index.js +6 -0
  86. package/dist/components/document-scanner/document-scanner.agent.d.ts +4 -0
  87. package/dist/components/document-scanner/document-scanner.d.ts +93 -0
  88. package/dist/components/document-scanner/index.d.ts +4 -0
  89. package/dist/components/document-scanner/index.js +6 -0
  90. package/dist/components/due-date-calculator/due-date-calculator.d.ts +3 -0
  91. package/dist/components/due-date-calculator/gestation.d.ts +16 -0
  92. package/dist/components/due-date-calculator/index.d.ts +1 -1
  93. package/dist/components/due-date-calculator/index.js +10 -7
  94. package/dist/components/file-upload/index.js +1 -1
  95. package/dist/components/fiscal-code-input/calculate-codice-fiscale.d.ts +24 -0
  96. package/dist/components/fiscal-code-input/fiscal-code-input.agent.d.ts +4 -0
  97. package/dist/components/fiscal-code-input/fiscal-code-input.d.ts +61 -0
  98. package/dist/components/fiscal-code-input/index.d.ts +6 -0
  99. package/dist/components/fiscal-code-input/index.js +11 -0
  100. package/dist/components/fiscal-code-input/is-valid-codice-fiscale.d.ts +21 -0
  101. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +27 -0
  102. package/dist/components/gestational-age-calculator/index.d.ts +3 -0
  103. package/dist/components/gestational-age-calculator/index.js +5 -0
  104. package/dist/components/index.d.ts +13 -0
  105. package/dist/components/logo/index.js +1 -1
  106. package/dist/components/practice-results/index.js +1 -1
  107. package/dist/components/pregnancy-weight-gain/index.d.ts +4 -0
  108. package/dist/components/pregnancy-weight-gain/index.js +9 -0
  109. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +19 -0
  110. package/dist/components/pregnancy-weight-gain/weight-gain.d.ts +41 -0
  111. package/dist/components/privacy-lock/index.js +1 -1
  112. package/dist/components/public-footer/index.js +1 -1
  113. package/dist/components/qr-code/index.d.ts +5 -0
  114. package/dist/components/qr-code/index.js +8 -0
  115. package/dist/components/qr-code/qr-code.agent.d.ts +3 -0
  116. package/dist/components/qr-code/qr-code.d.ts +59 -0
  117. package/dist/components/qr-code/qr-encode.d.ts +46 -0
  118. package/dist/components/rich-text-editor/index.js +1 -1
  119. package/dist/components/session-countdown/index.d.ts +4 -0
  120. package/dist/components/session-countdown/index.js +6 -0
  121. package/dist/components/session-countdown/session-countdown.agent.d.ts +3 -0
  122. package/dist/components/session-countdown/session-countdown.d.ts +38 -0
  123. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  124. package/dist/components/social-sign-in-button/index.d.ts +3 -0
  125. package/dist/components/social-sign-in-button/index.js +5 -0
  126. package/dist/components/social-sign-in-button/social-sign-in-button.d.ts +56 -0
  127. package/dist/components/unit-converter/index.d.ts +4 -0
  128. package/dist/components/unit-converter/index.js +9 -0
  129. package/dist/components/unit-converter/unit-converter.d.ts +21 -0
  130. package/dist/components/unit-converter/units.d.ts +18 -0
  131. package/dist/components/wallet-pay-button/index.d.ts +3 -0
  132. package/dist/components/wallet-pay-button/index.js +5 -0
  133. package/dist/components/wallet-pay-button/wallet-pay-button.d.ts +63 -0
  134. package/dist/i18n/locales/ar.d.ts +252 -0
  135. package/dist/i18n/locales/ar.js +249 -0
  136. package/dist/i18n/locales/de.d.ts +252 -0
  137. package/dist/i18n/locales/de.js +249 -0
  138. package/dist/i18n/locales/el.d.ts +252 -0
  139. package/dist/i18n/locales/el.js +249 -0
  140. package/dist/i18n/locales/en.d.ts +252 -0
  141. package/dist/i18n/locales/en.js +252 -0
  142. package/dist/i18n/locales/es.d.ts +252 -0
  143. package/dist/i18n/locales/es.js +249 -0
  144. package/dist/i18n/locales/fr.d.ts +252 -0
  145. package/dist/i18n/locales/fr.js +249 -0
  146. package/dist/i18n/locales/hi.d.ts +252 -0
  147. package/dist/i18n/locales/hi.js +249 -0
  148. package/dist/i18n/locales/it.d.ts +252 -0
  149. package/dist/i18n/locales/it.js +249 -0
  150. package/dist/i18n/locales/ja.d.ts +252 -0
  151. package/dist/i18n/locales/ja.js +245 -0
  152. package/dist/i18n/locales/nl.d.ts +252 -0
  153. package/dist/i18n/locales/nl.js +249 -0
  154. package/dist/i18n/locales/pl.d.ts +252 -0
  155. package/dist/i18n/locales/pl.js +249 -0
  156. package/dist/i18n/locales/pt.d.ts +252 -0
  157. package/dist/i18n/locales/pt.js +252 -0
  158. package/dist/i18n/locales/ro.d.ts +252 -0
  159. package/dist/i18n/locales/ro.js +249 -0
  160. package/dist/i18n/locales/ru.d.ts +252 -0
  161. package/dist/i18n/locales/ru.js +249 -0
  162. package/dist/i18n/locales/sq.d.ts +252 -0
  163. package/dist/i18n/locales/sq.js +249 -0
  164. package/dist/i18n/locales/sv.d.ts +252 -0
  165. package/dist/i18n/locales/sv.js +249 -0
  166. package/dist/i18n/locales/tr.d.ts +252 -0
  167. package/dist/i18n/locales/tr.js +249 -0
  168. package/dist/i18n/locales/zh.d.ts +252 -0
  169. package/dist/i18n/locales/zh.js +245 -0
  170. package/dist/index.js +587 -535
  171. package/dist/locales/ar.json +252 -0
  172. package/dist/locales/de.json +252 -0
  173. package/dist/locales/el.json +252 -0
  174. package/dist/locales/en.json +252 -0
  175. package/dist/locales/es.json +252 -0
  176. package/dist/locales/fr.json +252 -0
  177. package/dist/locales/hi.json +252 -0
  178. package/dist/locales/it.json +252 -0
  179. package/dist/locales/ja.json +252 -0
  180. package/dist/locales/nl.json +252 -0
  181. package/dist/locales/pl.json +252 -0
  182. package/dist/locales/pt.json +252 -0
  183. package/dist/locales/ro.json +252 -0
  184. package/dist/locales/ru.json +252 -0
  185. package/dist/locales/sq.json +252 -0
  186. package/dist/locales/sv.json +252 -0
  187. package/dist/locales/tr.json +252 -0
  188. package/dist/locales/zh.json +252 -0
  189. package/dist/patterns/alia-assistant/index.js +1 -1
  190. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  191. package/dist/patterns/patient-shell/index.js +1 -1
  192. package/dist/tokens.css +1 -1
  193. package/package.json +49 -1
  194. package/dist/_chunks/bmi-calculator-DQD5_nE-.js +0 -214
  195. package/dist/_chunks/due-date-calculator-kf9U_g7O.js +0 -173
  196. package/dist/_chunks/subDays-D-WYRpdW.js +0 -8
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface BrandMarkProps {
3
+ /** Extra classes from the consuming button's CVA size axis. */
4
+ className?: string;
5
+ }
6
+ /**
7
+ * Apple Pay lockup (Apple logo + "Pay"). Decorative — the parent button
8
+ * carries `aria-hidden` semantics by wrapping it next to the visible /
9
+ * sr-only accessible name, so this SVG is marked `aria-hidden="true"`.
10
+ */
11
+ export declare function ApplePayMark({ className }: BrandMarkProps): ReactNode;
12
+ //# sourceMappingURL=apple-pay.d.ts.map
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface ProviderMarkProps {
3
+ /** Forwarded to the root `<svg>` for size / colour utility classes. */
4
+ className?: string;
5
+ }
6
+ /**
7
+ * The Apple logo glyph. Single path, `currentColor` fill so it follows
8
+ * the button foreground across light / dark appearances and all four kit
9
+ * themes. Decorative — `aria-hidden`.
10
+ */
11
+ export declare function AppleMark({ className }: ProviderMarkProps): ReactNode;
12
+ //# sourceMappingURL=apple.d.ts.map
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { BrandMarkProps } from './apple-pay';
3
+ /**
4
+ * Google Pay lockup (four-colour Google "G" + "Pay" wordmark). The "G"
5
+ * keeps Google's mandated four brand hues at all times; the "Pay"
6
+ * wordmark inherits `currentColor` so it reads against either the black
7
+ * or the white surface (brand foreground token). Decorative —
8
+ * `aria-hidden="true"`; the accessible name comes from the parent
9
+ * button.
10
+ */
11
+ export declare function GooglePayMark({ className }: BrandMarkProps): ReactNode;
12
+ //# sourceMappingURL=google-pay.d.ts.map
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface ProviderMarkProps {
3
+ /** Forwarded to the root `<svg>` for size utility classes. */
4
+ className?: string;
5
+ }
6
+ /**
7
+ * The Google "G" glyph — the canonical Google Identity Services asset.
8
+ * Four hardcoded brand hues (blue / red / yellow / green) that brand
9
+ * guidelines forbid altering; this is why the file lives under
10
+ * src/brand/** and not src/components/**. Decorative — `aria-hidden`.
11
+ */
12
+ export declare function GoogleMark({ className }: ProviderMarkProps): ReactNode;
13
+ //# sourceMappingURL=google.d.ts.map
@@ -0,0 +1,47 @@
1
+ export type InsertMode = 'text' | 'image' | 'text-image';
2
+ export interface InsertCardField {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ export interface InsertCardData {
7
+ /** Card heading. */
8
+ title: string;
9
+ /** Key/value rows. */
10
+ fields: InsertCardField[];
11
+ /** Optional highlighted line (e.g. category / status). */
12
+ highlight?: string;
13
+ }
14
+ export interface InsertPayload {
15
+ /** Which menu item the user chose. */
16
+ mode: InsertMode;
17
+ /** Plain-text summary. Always present. */
18
+ text: string;
19
+ /** Rich HTML summary (heading + list). Always present. */
20
+ html: string;
21
+ /** Branded SVG result-card markup. Empty for mode `'text'`. */
22
+ svg: string;
23
+ /** SVG as an `image/svg+xml` data URI for `<img src>`. Empty for `'text'`. */
24
+ imageDataUri: string;
25
+ }
26
+ export interface InsertButtonProps {
27
+ /** Structured result used to build every payload representation. */
28
+ card: InsertCardData;
29
+ /** Receives the built payload when a menu item is chosen. */
30
+ onInsert: (payload: InsertPayload) => void;
31
+ /** Trigger size. Defaults to `'sm'`. */
32
+ size?: 'sm' | 'md' | 'lg';
33
+ }
34
+ interface ThemeColours {
35
+ fg: string;
36
+ muted: string;
37
+ accent: string;
38
+ border: string;
39
+ bg: string;
40
+ font: string;
41
+ }
42
+ export declare function buildResultText(card: InsertCardData): string;
43
+ export declare function buildResultHtml(card: InsertCardData): string;
44
+ export declare function buildResultCardSvg(card: InsertCardData, c: ThemeColours): string;
45
+ export declare function InsertButton({ card, onInsert, size, }: InsertButtonProps): React.ReactElement;
46
+ export {};
47
+ //# sourceMappingURL=insert-result.d.ts.map
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
+ import { type InsertPayload } from '../_shared/insert-result';
2
3
  import { type UnitSystem, type BmiCategory } from './bmi';
3
4
  export interface BmiResult {
4
5
  /** BMI in kg/m². */
@@ -14,6 +15,8 @@ export interface BmiCalculatorProps extends VariantProps<typeof rootVariants> {
14
15
  defaultUnitSystem?: UnitSystem;
15
16
  /** Fires whenever a valid BMI can be computed (and with `null` when it can't). */
16
17
  onResultChange?: (result: BmiResult | null) => void;
18
+ /** When provided, shows an "Insert" button that emits the result for an editor. */
19
+ onInsert?: (payload: InsertPayload) => void;
17
20
  /** Opaque instance id, emitted as `data-component-id`. */
18
21
  id?: string;
19
22
  /** Extra class names on the wrapper. */
@@ -1,14 +1,15 @@
1
- import { B as m, b as s, a as e, c as t, d as T, e as c, f as i, i as b, k as n, l as r } from "../../_chunks/bmi-calculator-DQD5_nE-.js";
1
+ import { B as m } from "../../_chunks/bmi-calculator-BRUru9QX.js";
2
+ import { b as e, a as t, c as r, d as T, e as c, f as i, i as b, k as n, l as f } from "../../_chunks/bmi-BxD-tFzU.js";
2
3
  export {
3
4
  m as BmiCalculator,
4
- s as bmiCategory,
5
- e as bmiToGaugePercent,
6
- t as cmToFtIn,
5
+ e as bmiCategory,
6
+ t as bmiToGaugePercent,
7
+ r as cmToFtIn,
7
8
  T as cmToIn,
8
9
  c as computeBmi,
9
10
  i as ftInToCm,
10
11
  b as inToCm,
11
12
  n as kgToLb,
12
- r as lbToKg
13
+ f as lbToKg
13
14
  };
14
15
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { B as A, C as R, O as a, b as s } from "../../_chunks/booking-DqXsd1Mv.js";
1
+ import { B as A, C as R, O as a, b as s } from "../../_chunks/booking-DK_BPHnQ.js";
2
2
  export {
3
3
  A as Booking,
4
4
  R as CONFIRMATION_CHANNEL_ORDER,
@@ -0,0 +1,26 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type DialogContentProps } from '../dialog';
3
+ export interface CalculatorDialogProps {
4
+ /** The element that opens the modal (rendered via `Dialog.Trigger asChild`). */
5
+ trigger: ReactNode;
6
+ /** Modal heading — also names the dialog for assistive tech. */
7
+ title: string;
8
+ /** Optional supporting line under the title. */
9
+ description?: string;
10
+ /** The calculator (or any content) shown inside the modal. */
11
+ children: ReactNode;
12
+ /** Dialog size. Calculators default to `lg` to fit inputs + result. */
13
+ size?: DialogContentProps['size'];
14
+ /** Controlled open state. */
15
+ open?: boolean;
16
+ /** Uncontrolled initial open state. */
17
+ defaultOpen?: boolean;
18
+ /** Open-state change handler. */
19
+ onOpenChange?: (open: boolean) => void;
20
+ /** Opaque instance id, forwarded to the dialog content. */
21
+ id?: string;
22
+ /** Extra class names on the modal body wrapper. */
23
+ className?: string;
24
+ }
25
+ export declare const CalculatorDialog: import("react").ForwardRefExoticComponent<CalculatorDialogProps & import("react").RefAttributes<HTMLDivElement>>;
26
+ //# sourceMappingURL=calculator-dialog.d.ts.map
@@ -0,0 +1,3 @@
1
+ export { CalculatorDialog } from './calculator-dialog';
2
+ export type { CalculatorDialogProps } from './calculator-dialog';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { C as l } from "../../_chunks/calculator-dialog-B74fqpFZ.js";
2
+ export {
3
+ l as CalculatorDialog
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { C as s } from "../../_chunks/chat-message-D53_fH2w.js";
1
+ import { C as s } from "../../_chunks/chat-message-ASgGtj-L.js";
2
2
  export {
3
3
  s as ChatMessage
4
4
  };
@@ -1,4 +1,4 @@
1
- import { C as _, a as O, b as o, c as r } from "../../_chunks/contact-profile-card-BA6fgS45.js";
1
+ import { C as _, a as O, b as o, c as r } from "../../_chunks/contact-profile-card-DHyuAPXM.js";
2
2
  export {
3
3
  _ as CONTACT_PROFILE_CARD_ROW_ICONS,
4
4
  O as CONTACT_PROFILE_CARD_ROW_KEYS,
@@ -0,0 +1,21 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import { type InsertPayload } from '../_shared/insert-result';
3
+ import { type CyclePrediction } from './cycle';
4
+ declare const rootVariants: (props?: ({
5
+ width?: "auto" | "full" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export interface CycleCalculatorProps extends VariantProps<typeof rootVariants> {
8
+ /** Initial cycle length in days. Defaults to 28. */
9
+ defaultCycleLength?: number;
10
+ /** Fires whenever a prediction can be computed (and `null` when it can't). */
11
+ onResultChange?: (result: CyclePrediction | null) => void;
12
+ /** When provided, shows an "Insert" button that emits the result for an editor. */
13
+ onInsert?: (payload: InsertPayload) => void;
14
+ /** Opaque instance id, emitted as `data-component-id`. */
15
+ id?: string;
16
+ /** Extra class names on the wrapper. */
17
+ className?: string;
18
+ }
19
+ export declare const CycleCalculator: import("react").ForwardRefExoticComponent<CycleCalculatorProps & import("react").RefAttributes<HTMLDivElement>>;
20
+ export {};
21
+ //# sourceMappingURL=cycle-calculator.d.ts.map
@@ -0,0 +1,37 @@
1
+ /** Standard menstrual-cycle length. */
2
+ export declare const DEFAULT_CYCLE_LENGTH = 28;
3
+ /** Luteal phase is biologically near-constant at ~14 days. */
4
+ export declare const LUTEAL_PHASE_DAYS = 14;
5
+ /** Sperm survive up to ~5 days before ovulation. */
6
+ export declare const FERTILE_DAYS_BEFORE = 5;
7
+ /** The oocyte is viable ~1 day after ovulation. */
8
+ export declare const FERTILE_DAYS_AFTER = 1;
9
+ export interface CycleInput {
10
+ /** First day of the most recent period. */
11
+ lastPeriodStart: Date;
12
+ /** Average cycle length in days. Defaults to 28. */
13
+ cycleLength?: number;
14
+ /** Period (bleed) length in days. Optional — used for the period range. */
15
+ periodLength?: number;
16
+ }
17
+ export interface DateRange {
18
+ start: Date;
19
+ end: Date;
20
+ }
21
+ export interface CyclePrediction {
22
+ /** Start date of the next period. */
23
+ nextPeriod: Date;
24
+ /** Estimated ovulation date. */
25
+ ovulation: Date;
26
+ /** Fertile window (5 days before ovulation → 1 day after). */
27
+ fertileWindow: DateRange;
28
+ /** Start dates of the next few periods (length = `occurrences`). */
29
+ upcomingPeriods: Date[];
30
+ }
31
+ /**
32
+ * Predict ovulation, the fertile window and upcoming periods from the last
33
+ * period's start date. `occurrences` controls how many future periods to
34
+ * list (default 3).
35
+ */
36
+ export declare function predictCycle(input: CycleInput, occurrences?: number): CyclePrediction;
37
+ //# sourceMappingURL=cycle.d.ts.map
@@ -0,0 +1,4 @@
1
+ export { CycleCalculator } from './cycle-calculator';
2
+ export type { CycleCalculatorProps } from './cycle-calculator';
3
+ export { predictCycle, LUTEAL_PHASE_DAYS, type CycleInput, type CyclePrediction, type DateRange, } from './cycle';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { C as e, L as l, p as r } from "../../_chunks/cycle-calculator-B5Uj9QeT.js";
2
+ export {
3
+ e as CycleCalculator,
4
+ l as LUTEAL_PHASE_DAYS,
5
+ r as predictCycle
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { A as l, B as r, C as t, a as s, D as n, b as d, c as i, d as o, E as C, e as R, I as F, L as g, N as T, f as b, S as u, g as c, h as D, T as m, i as p, j as x, k as f, l as y, m as E, n as S, o as h, U as A, p as L, q as N, u as k } from "../../_chunks/editable-currency-cell-renderer-DnjwZNZP.js";
1
+ import { A as l, B as r, C as t, a as s, D as n, b as d, c as i, d as o, E as C, e as R, I as F, L as g, N as T, f as b, S as u, g as c, h as D, T as m, i as p, j as x, k as f, l as y, m as E, n as S, o as h, U as A, p as L, q as N, u as k } from "../../_chunks/editable-currency-cell-renderer-DGKuRNVG.js";
2
2
  export {
3
3
  l as ActionsCellRenderer,
4
4
  r as BalanceCellRenderer,
@@ -1,4 +1,4 @@
1
- import { D as r, d as t } from "../../_chunks/date-picker-CXFpu-qY.js";
1
+ import { D as r, d as t } from "../../_chunks/date-picker-CvQfs6Xh.js";
2
2
  export {
3
3
  r as DatePicker,
4
4
  t as datePickerAgent
@@ -1,4 +1,4 @@
1
- import { D as r, d as t } from "../../_chunks/date-range-picker-I-q5rifj.js";
1
+ import { D as r, d as t } from "../../_chunks/date-range-picker-U9fn1g9d.js";
2
2
  export {
3
3
  r as DateRangePicker,
4
4
  t as dateRangePickerAgent
@@ -1,4 +1,4 @@
1
- import { D as i, d as r } from "../../_chunks/date-time-picker-CqpGPlcH.js";
1
+ import { D as i, d as r } from "../../_chunks/date-time-picker-Cva0ZCWw.js";
2
2
  export {
3
3
  i as DateTimePicker,
4
4
  r as dateTimePickerAgent
@@ -0,0 +1,4 @@
1
+ import type { AgentAdapter } from '../../agent/types';
2
+ import type { DependentSelectorHandle } from './dependent-selector';
3
+ export declare const dependentSelectorAgent: AgentAdapter<DependentSelectorHandle>;
4
+ //# sourceMappingURL=dependent-selector.agent.d.ts.map
@@ -0,0 +1,72 @@
1
+ import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
+ import * as RadixRadioGroup from '@radix-ui/react-radio-group';
3
+ import { type VariantProps } from 'class-variance-authority';
4
+ /**
5
+ * Closed relationship vocabulary. The kit owns the localised label for
6
+ * each key (`dependentSelector.relationship.<key>`). `'other'` is the
7
+ * escape hatch for relationships the enum doesn't model.
8
+ */
9
+ export type DependentRelationship = 'self' | 'son' | 'daughter' | 'child' | 'spouse' | 'parent' | 'sibling' | 'ward' | 'other';
10
+ export interface DependentSelectorPerson {
11
+ /** Stable id — becomes the radio value + `data-option-id`. */
12
+ id: string;
13
+ /** Display-formatted name (already formatted by the consumer). */
14
+ name: string;
15
+ /** Closed relationship key — the kit owns the localised label. */
16
+ relationshipKey: DependentRelationship;
17
+ /**
18
+ * Explicit "minor" flag — drives the localised "Minor" badge.
19
+ * Consumer-supplied, NOT derived from `age < 18` (legal age of
20
+ * majority varies by market).
21
+ */
22
+ isMinor?: boolean;
23
+ /** Avatar image source — falls back to initials, then icon. */
24
+ avatarSrc?: string;
25
+ /** Whole years, pre-computed by the consumer. Display-only. */
26
+ age?: number;
27
+ /**
28
+ * ISO 8601 date of birth. Used ONLY for the row title/tooltip — never
29
+ * parsed for display math (timezone/locale birthday math is the
30
+ * consumer's job).
31
+ */
32
+ dob?: string;
33
+ /** Disables this row; skipped by arrow navigation. */
34
+ disabled?: boolean;
35
+ /** Shown in a Tooltip on the disabled row (like Radio.disabledReason). */
36
+ disabledReason?: string;
37
+ }
38
+ /** Agent-readiness curated handle for DependentSelector. */
39
+ export interface DependentSelectorHandle {
40
+ getValue: () => string;
41
+ setValue: (value: string) => void;
42
+ }
43
+ declare const rootVariants: (props?: ({
44
+ size?: "sm" | "md" | "lg" | null | undefined;
45
+ tone?: "default" | "checkin" | null | undefined;
46
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
47
+ type RadixRootProps = ComponentPropsWithoutRef<typeof RadixRadioGroup.Root>;
48
+ export interface DependentSelectorProps extends Omit<RadixRootProps, 'children' | 'orientation' | 'value' | 'defaultValue' | 'onValueChange'>, VariantProps<typeof rootVariants> {
49
+ /** Ordered roster to render as options. */
50
+ people: DependentSelectorPerson[];
51
+ /** Controlled selected person id. */
52
+ value?: string;
53
+ /** Uncontrolled initial selection. Ignored when `value` is set. */
54
+ defaultValue?: string;
55
+ /** Fires with the newly selected person id on user selection. */
56
+ onValueChange?: (personId: string) => void;
57
+ /** Accessible group name, rendered as the `<legend>`. */
58
+ label?: string;
59
+ /** Optional helper paragraph under the legend (wired via aria-describedby). */
60
+ description?: string;
61
+ /** Shows N skeleton rows while the roster resolves; sets aria-busy. */
62
+ loading?: boolean;
63
+ /** Validation/empty-confirmation message — role=alert + aria-invalid. */
64
+ error?: string;
65
+ /** Slot shown when no selectable dependents exist (only self / empty). */
66
+ emptyState?: ReactNode;
67
+ /** Forwarded to the radiogroup root as id + data-component-id. */
68
+ id?: string;
69
+ }
70
+ export declare const DependentSelector: import("react").ForwardRefExoticComponent<DependentSelectorProps & import("react").RefAttributes<HTMLDivElement>>;
71
+ export {};
72
+ //# sourceMappingURL=dependent-selector.d.ts.map
@@ -0,0 +1,4 @@
1
+ export { DependentSelector } from './dependent-selector';
2
+ export type { DependentSelectorProps, DependentSelectorPerson, DependentSelectorHandle, DependentRelationship, } from './dependent-selector';
3
+ export { dependentSelectorAgent } from './dependent-selector.agent';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { D as n, d } from "../../_chunks/dependent-selector-CRWgieHm.js";
2
+ export {
3
+ n as DependentSelector,
4
+ d as dependentSelectorAgent
5
+ };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,4 @@
1
+ import type { AgentAdapter } from '../../agent/types';
2
+ import type { DocumentScannerHandle } from './document-scanner';
3
+ export declare const documentScannerAgent: AgentAdapter<DocumentScannerHandle>;
4
+ //# sourceMappingURL=document-scanner.agent.d.ts.map
@@ -0,0 +1,93 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ export type DocumentScannerSource = 'camera' | 'upload';
3
+ export interface DocumentCapture {
4
+ /** Data URL of the captured / uploaded image (encoded to `mimeType`). */
5
+ dataUrl: string;
6
+ /** Encoded bytes as a Blob — the consumer persists this. */
7
+ blob: Blob;
8
+ /** Where the image came from. */
9
+ source: DocumentScannerSource;
10
+ /** Intrinsic pixel width of the encoded image. */
11
+ width: number;
12
+ /** Intrinsic pixel height of the encoded image. */
13
+ height: number;
14
+ /** MIME of the encoded image. */
15
+ mimeType: string;
16
+ /** Encoded byte size. */
17
+ byteSize: number;
18
+ /** ISO-8601 UTC timestamp for when the capture was confirmed. */
19
+ capturedAt: string;
20
+ /** Hex-encoded SHA-256 digest of the encoded bytes. */
21
+ sha256: string;
22
+ }
23
+ export type DocumentScannerErrorKind = 'permission-denied' | 'no-camera' | 'not-readable' | 'insecure-context' | 'capture-failed' | 'file-invalid-type' | 'file-too-large';
24
+ export interface DocumentScannerError {
25
+ kind: DocumentScannerErrorKind;
26
+ }
27
+ export type DocumentType = 'tessera-sanitaria' | 'cie' | 'id-card' | 'generic';
28
+ export type DocumentScannerPhase = 'idle' | 'requesting' | 'streaming' | 'captured' | 'error';
29
+ /** Curated imperative handle for agent / external automation. */
30
+ export interface DocumentScannerHandle {
31
+ /** True when a captured or uploaded image is held. */
32
+ hasCapture: () => boolean;
33
+ /** Current lifecycle phase. */
34
+ getPhase: () => DocumentScannerPhase;
35
+ /** Request the camera and begin the viewfinder. */
36
+ startCamera: () => Promise<void> | void;
37
+ /** Freeze the current viewfinder frame. */
38
+ capture: () => Promise<void> | void;
39
+ /** Confirm the current capture, firing `onConfirm`. */
40
+ confirm: () => void;
41
+ /** Discard the current capture and return to the capture path. */
42
+ retake: () => void;
43
+ }
44
+ export interface DocumentScannerProps {
45
+ /** Opaque instance id — emitted as `data-component-id` for the agent registry. */
46
+ id?: string;
47
+ /** Controlled captured-image value. When defined the component is controlled. */
48
+ value?: DocumentCapture | null;
49
+ /** Initial captured image for uncontrolled use; seeds the `captured` preview. */
50
+ defaultValue?: DocumentCapture | null;
51
+ /** Fired when the user confirms a captured or uploaded image. */
52
+ onConfirm?: (capture: DocumentCapture) => void;
53
+ /** Fired when the user discards the current capture to retake / re-upload. */
54
+ onRetake?: () => void;
55
+ /** Fired on a permission / hardware / decode failure (telemetry). */
56
+ onError?: (error: DocumentScannerError) => void;
57
+ /** Drives the overlay frame aspect ratio + the translated hint copy. */
58
+ documentType?: DocumentType;
59
+ /** Camera-vs-upload strategy. `auto` falls back to upload on camera failure. */
60
+ captureMode?: 'auto' | 'camera-only' | 'upload-only';
61
+ /** react-dropzone accept map for the upload fallback. */
62
+ accept?: Record<string, string[]>;
63
+ /** Max upload byte size. Defaults to 10MB. */
64
+ maxSize?: number;
65
+ /** Camera to request. Defaults to the rear (`environment`) camera. */
66
+ facingMode?: 'environment' | 'user';
67
+ /** MIME of the encoded capture. */
68
+ outputType?: 'image/jpeg' | 'image/webp' | 'image/png';
69
+ /** 0..1 quality for lossy `outputType`. Ignored for image/png. */
70
+ outputQuality?: number;
71
+ /** Crop the confirmed image to the overlay frame rect. */
72
+ cropToFrame?: boolean;
73
+ /** Disable all controls and skip the camera request. */
74
+ disabled?: boolean;
75
+ /** Accessible label for the component's group region. */
76
+ ariaLabel?: string;
77
+ /** Extra classes merged onto the outermost wrapper. */
78
+ className?: string;
79
+ }
80
+ declare const rootVariants: (props?: ({
81
+ size?: "sm" | "md" | "lg" | null | undefined;
82
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
83
+ declare const viewportVariants: (props?: ({
84
+ frame?: "generic" | "tessera-sanitaria" | "cie" | "id-card" | null | undefined;
85
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
86
+ type SizeVariant = NonNullable<VariantProps<typeof rootVariants>['size']>;
87
+ interface DocumentScannerInternalProps extends DocumentScannerProps {
88
+ /** Visual size variant (exposed via Controls). */
89
+ size?: SizeVariant;
90
+ }
91
+ export declare const DocumentScanner: import("react").ForwardRefExoticComponent<DocumentScannerInternalProps & import("react").RefAttributes<DocumentScannerHandle>>;
92
+ export { rootVariants as documentScannerRootVariants, viewportVariants as documentScannerViewportVariants, };
93
+ //# sourceMappingURL=document-scanner.d.ts.map
@@ -0,0 +1,4 @@
1
+ export { DocumentScanner } from './document-scanner';
2
+ export type { DocumentScannerProps, DocumentScannerHandle, DocumentCapture, DocumentScannerSource, DocumentScannerError, DocumentScannerErrorKind, DocumentScannerPhase, DocumentType, } from './document-scanner';
3
+ export { documentScannerAgent } from './document-scanner.agent';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { D as a, d as c } from "../../_chunks/document-scanner-CdHQ6lTN.js";
2
+ export {
3
+ a as DocumentScanner,
4
+ c as documentScannerAgent
5
+ };
6
+ //# sourceMappingURL=index.js.map
@@ -1,4 +1,5 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
+ import { type InsertPayload } from '../_shared/insert-result';
2
3
  import { type DueDateMethod, type DueDateResult } from './gestation';
3
4
  declare const rootVariants: (props?: ({
4
5
  width?: "auto" | "full" | null | undefined;
@@ -8,6 +9,8 @@ export interface DueDateCalculatorProps extends VariantProps<typeof rootVariants
8
9
  defaultMethod?: DueDateMethod;
9
10
  /** Fires whenever a due date can be computed (and with `null` when it can't). */
10
11
  onResultChange?: (result: DueDateResult | null) => void;
12
+ /** When provided, shows an "Insert" button that emits the result for an editor. */
13
+ onInsert?: (payload: InsertPayload) => void;
11
14
  /** Opaque instance id, emitted as `data-component-id`. */
12
15
  id?: string;
13
16
  /** Extra class names on the wrapper. */
@@ -41,4 +41,20 @@ export declare function trimesterForWeeks(totalDays: number): Trimester;
41
41
  * date while GA stays counted from the LMP — the standard convention.
42
42
  */
43
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[];
44
60
  //# sourceMappingURL=gestation.d.ts.map
@@ -1,4 +1,4 @@
1
1
  export { DueDateCalculator } from './due-date-calculator';
2
2
  export type { DueDateCalculatorProps } from './due-date-calculator';
3
- export { computeDueDate, trimesterForWeeks, GESTATION_DAYS, TERM_FROM_CONCEPTION_DAYS, DEFAULT_CYCLE_LENGTH, type DueDateMethod, type EmbryoAge, type Trimester, type DueDateInput, type DueDateResult, type GestationalAge, } from './gestation';
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
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,10 +1,13 @@
1
- import { D as s, a as t, G as D, T, c as r, t as E } from "../../_chunks/due-date-calculator-kf9U_g7O.js";
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";
2
3
  export {
3
- s as DEFAULT_CYCLE_LENGTH,
4
- t as DueDateCalculator,
5
- D as GESTATION_DAYS,
6
- T as TERM_FROM_CONCEPTION_DAYS,
7
- r as computeDueDate,
8
- E as trimesterForWeeks
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
9
12
  };
10
13
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { F as l, f as o } from "../../_chunks/file-upload-CdozCPct.js";
1
+ import { F as l, f as o } from "../../_chunks/file-upload-CnzRcErt.js";
2
2
  export {
3
3
  l as FileUpload,
4
4
  o as fileUploadAgent
@@ -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,4 @@
1
+ import type { AgentAdapter } from '../../agent/types';
2
+ import type { FiscalCodeInputHandle } from './fiscal-code-input';
3
+ export declare const fiscalCodeInputAgent: AgentAdapter<FiscalCodeInputHandle>;
4
+ //# sourceMappingURL=fiscal-code-input.agent.d.ts.map