@alfadocs/ui-kit 0.41.1 → 0.42.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 (147) hide show
  1. package/dist/_chunks/address-autocomplete-CSjMrBvu.js +358 -0
  2. package/dist/_chunks/{alia-sidebar-DXsYPinm.js → alia-sidebar-BpX4z_af.js} +2 -2
  3. package/dist/_chunks/{bmi-calculator-DnEr513I.js → bmi-calculator-D4juUcyF.js} +57 -51
  4. package/dist/_chunks/{breadcrumb-CLlhx7qo.js → breadcrumb-OTbaY70e.js} +4 -4
  5. package/dist/_chunks/cycle-calculator-DsZbyzX6.js +191 -0
  6. package/dist/_chunks/{document-scanner-CqS_klIr.js → document-scanner-BqLsGs4Y.js} +7 -7
  7. package/dist/_chunks/{dropdown-menu-BC5ZdOMo.js → dropdown-menu-CUEXqKis.js} +2 -2
  8. package/dist/_chunks/{due-date-calculator-CUspKSTw.js → due-date-calculator-s_CBgaFs.js} +53 -40
  9. package/dist/_chunks/{editable-currency-cell-renderer-DgkCIIcO.js → editable-currency-cell-renderer-BhUkRiPZ.js} +2 -2
  10. package/dist/_chunks/{freemium-paywall-BAk3a6er.js → freemium-paywall-BLXESpH4.js} +2 -2
  11. package/dist/_chunks/{gestational-age-calculator-CsQ05qDy.js → gestational-age-calculator-CWOG3bkI.js} +56 -43
  12. package/dist/_chunks/{header-settings-CBLwUK6t.js → header-settings-Bx0Biimh.js} +2 -2
  13. package/dist/_chunks/index.modern-D2LGACWg.js +1529 -0
  14. package/dist/_chunks/insert-result-DtQQeSSf.js +227 -0
  15. package/dist/_chunks/{kbd-Cglkd7CY.js → kbd-D855ZXIW.js} +2 -2
  16. package/dist/_chunks/map-view-Tb5VfK9Y.js +333 -0
  17. package/dist/_chunks/marketplace-app-shell-kVAVycz_.js +391 -0
  18. package/dist/_chunks/{patient-search-CBq62kmL.js → patient-search-DPe2ZYEL.js} +2 -2
  19. package/dist/_chunks/{patient-shell-DF81lALv.js → patient-shell-lDX3wwu6.js} +2 -2
  20. package/dist/_chunks/{payment-form-Dy3WIIsC.js → payment-form-BzVsG6Ks.js} +5 -5
  21. package/dist/_chunks/{pdf-viewer-Cy6Ul3hZ.js → pdf-viewer-B6MC6VTx.js} +139 -126
  22. package/dist/_chunks/{practice-results-C0d4IL5E.js → practice-results-CrLpEiiW.js} +4 -4
  23. package/dist/_chunks/pregnancy-weight-gain-B7kBK-ZR.js +223 -0
  24. package/dist/_chunks/{public-header.agent-B2dDg2_d.js → public-header.agent-BY6FH71R.js} +2 -2
  25. package/dist/_chunks/radio-group-CLjK-SlK.js +167 -0
  26. package/dist/_chunks/{rich-text-editor-DLbg2852.js → rich-text-editor-DhGIBd4a.js} +10 -10
  27. package/dist/_chunks/{sheet-BV-yuLE2.js → sheet-xbzu4YiY.js} +7 -7
  28. package/dist/_chunks/{sign-document-CpLDZ6Db.js → sign-document-QHfcNKFj.js} +5 -5
  29. package/dist/_chunks/{signature-capture-DoiBd6i3.js → signature-capture-CpMBhqQ9.js} +6 -6
  30. package/dist/_chunks/tab-bar-C4II-7ej.js +86 -0
  31. package/dist/_chunks/{theme-toggle-DpC28kt5.js → theme-toggle-ClATnY4Q.js} +2 -2
  32. package/dist/_chunks/{toast.agent-WHHfw5VX.js → toast.agent-B0MCsvdZ.js} +2 -2
  33. package/dist/_chunks/{unit-converter-EUwO6QYq.js → unit-converter-D1UrEUxa.js} +46 -40
  34. package/dist/_chunks/{workflow-map-C3gB0FvB.js → workflow-map-BFNpzTiw.js} +2 -2
  35. package/dist/agent-catalog.json +1 -1
  36. package/dist/brand/product-lockup/product-lockup.d.ts +16 -0
  37. package/dist/components/_shared/insert-result.d.ts +21 -4
  38. package/dist/components/address-autocomplete/address-autocomplete.d.ts +77 -0
  39. package/dist/components/address-autocomplete/index.d.ts +4 -0
  40. package/dist/components/address-autocomplete/index.js +6 -0
  41. package/dist/components/address-autocomplete/parse-address.d.ts +52 -0
  42. package/dist/components/bmi-calculator/bmi-calculator.d.ts +11 -1
  43. package/dist/components/bmi-calculator/index.js +1 -1
  44. package/dist/components/breadcrumb/index.js +1 -1
  45. package/dist/components/cycle-calculator/cycle-calculator.d.ts +12 -2
  46. package/dist/components/cycle-calculator/index.js +1 -1
  47. package/dist/components/data-table/index.js +1 -1
  48. package/dist/components/document-scanner/index.js +1 -1
  49. package/dist/components/dropdown-menu/index.js +1 -1
  50. package/dist/components/due-date-calculator/due-date-calculator.d.ts +11 -1
  51. package/dist/components/due-date-calculator/index.js +1 -1
  52. package/dist/components/freemium-paywall/index.js +1 -1
  53. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +12 -2
  54. package/dist/components/gestational-age-calculator/index.js +1 -1
  55. package/dist/components/header-settings/index.js +1 -1
  56. package/dist/components/index.d.ts +3 -1
  57. package/dist/components/kbd/index.js +1 -1
  58. package/dist/components/map-view/index.js +1 -1
  59. package/dist/components/matrix-rain/matrix-rain.d.ts +1 -1
  60. package/dist/components/patient-search/index.js +1 -1
  61. package/dist/components/payment-form/index.js +1 -1
  62. package/dist/components/pdf-viewer/index.js +1 -1
  63. package/dist/components/practice-results/index.js +1 -1
  64. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  65. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +12 -2
  66. package/dist/components/public-header/index.js +1 -1
  67. package/dist/components/radio-group/index.js +1 -1
  68. package/dist/components/rich-text-editor/index.js +1 -1
  69. package/dist/components/sheet/index.js +1 -1
  70. package/dist/components/sign-document/index.js +1 -1
  71. package/dist/components/signature-capture/index.js +1 -1
  72. package/dist/components/tab-bar/index.d.ts +3 -0
  73. package/dist/components/tab-bar/index.js +5 -0
  74. package/dist/components/tab-bar/tab-bar.d.ts +61 -0
  75. package/dist/components/theme-toggle/index.js +1 -1
  76. package/dist/components/toast/index.js +1 -1
  77. package/dist/components/unit-converter/index.js +1 -1
  78. package/dist/components/unit-converter/unit-converter.d.ts +11 -1
  79. package/dist/components/workflow/index.js +1 -1
  80. package/dist/i18n/config.js +39 -24
  81. package/dist/i18n/locales/ar.d.ts +17 -0
  82. package/dist/i18n/locales/ar.js +18 -1
  83. package/dist/i18n/locales/de.d.ts +17 -0
  84. package/dist/i18n/locales/de.js +18 -1
  85. package/dist/i18n/locales/el.d.ts +17 -0
  86. package/dist/i18n/locales/el.js +18 -1
  87. package/dist/i18n/locales/en.d.ts +17 -0
  88. package/dist/i18n/locales/en.js +18 -1
  89. package/dist/i18n/locales/es.d.ts +17 -0
  90. package/dist/i18n/locales/es.js +18 -1
  91. package/dist/i18n/locales/fr.d.ts +17 -0
  92. package/dist/i18n/locales/fr.js +18 -1
  93. package/dist/i18n/locales/hi.d.ts +17 -0
  94. package/dist/i18n/locales/hi.js +18 -1
  95. package/dist/i18n/locales/it.d.ts +17 -0
  96. package/dist/i18n/locales/it.js +18 -1
  97. package/dist/i18n/locales/ja.d.ts +17 -0
  98. package/dist/i18n/locales/ja.js +18 -1
  99. package/dist/i18n/locales/nl.d.ts +17 -0
  100. package/dist/i18n/locales/nl.js +18 -1
  101. package/dist/i18n/locales/pl.d.ts +17 -0
  102. package/dist/i18n/locales/pl.js +18 -1
  103. package/dist/i18n/locales/pt.d.ts +17 -0
  104. package/dist/i18n/locales/pt.js +18 -1
  105. package/dist/i18n/locales/ro.d.ts +17 -0
  106. package/dist/i18n/locales/ro.js +18 -1
  107. package/dist/i18n/locales/ru.d.ts +17 -0
  108. package/dist/i18n/locales/ru.js +18 -1
  109. package/dist/i18n/locales/sq.d.ts +17 -0
  110. package/dist/i18n/locales/sq.js +18 -1
  111. package/dist/i18n/locales/sv.d.ts +17 -0
  112. package/dist/i18n/locales/sv.js +18 -1
  113. package/dist/i18n/locales/tr.d.ts +17 -0
  114. package/dist/i18n/locales/tr.js +18 -1
  115. package/dist/i18n/locales/zh.d.ts +17 -0
  116. package/dist/i18n/locales/zh.js +18 -1
  117. package/dist/index.js +604 -599
  118. package/dist/locales/ar.json +18 -1
  119. package/dist/locales/de.json +18 -1
  120. package/dist/locales/el.json +18 -1
  121. package/dist/locales/en.json +18 -1
  122. package/dist/locales/es.json +18 -1
  123. package/dist/locales/fr.json +18 -1
  124. package/dist/locales/hi.json +18 -1
  125. package/dist/locales/it.json +18 -1
  126. package/dist/locales/ja.json +18 -1
  127. package/dist/locales/nl.json +18 -1
  128. package/dist/locales/pl.json +18 -1
  129. package/dist/locales/pt.json +18 -1
  130. package/dist/locales/ro.json +18 -1
  131. package/dist/locales/ru.json +18 -1
  132. package/dist/locales/sq.json +18 -1
  133. package/dist/locales/sv.json +18 -1
  134. package/dist/locales/tr.json +18 -1
  135. package/dist/locales/zh.json +18 -1
  136. package/dist/patterns/alia-assistant/index.js +1 -1
  137. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  138. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +30 -3
  139. package/dist/patterns/patient-shell/index.js +1 -1
  140. package/dist/tokens.css +1 -1
  141. package/package.json +16 -1
  142. package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +0 -185
  143. package/dist/_chunks/insert-result-yJ0QavoN.js +0 -133
  144. package/dist/_chunks/map-view-qJLybrmN.js +0 -1850
  145. package/dist/_chunks/marketplace-app-shell-BlxVizU4.js +0 -296
  146. package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +0 -209
  147. package/dist/_chunks/radio-group-BcF92GEF.js +0 -152
@@ -1,11 +1,11 @@
1
1
  import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as k, useState as g, useMemo as _, useEffect as O } from "react";
3
- import { c as z } from "./index-D2ZczOXr.js";
4
- import { useTranslation as j } from "react-i18next";
2
+ import { forwardRef as j, useState as g, useMemo as _, useEffect as A } from "react";
3
+ import { c as B } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as G } from "react-i18next";
5
5
  import { F as v } from "./form-field-BOm9hK35.js";
6
- import { N as A } from "./number-input-Dj5L3pXK.js";
6
+ import { N as Y } from "./number-input-Dj5L3pXK.js";
7
7
  import { S as y } from "./select-hsCaJSX3.js";
8
- import { I as B } from "./insert-result-yJ0QavoN.js";
8
+ import { I as D } from "./insert-result-DtQQeSSf.js";
9
9
  const F = {
10
10
  // weight → base kg
11
11
  kg: { id: "kg", category: "weight", factor: 1, offset: 0 },
@@ -28,53 +28,56 @@ const F = {
28
28
  length: ["cm", "m", "in", "ft"],
29
29
  temperature: ["c", "f"],
30
30
  glucose: ["mmol_l", "mg_dl"]
31
- }, G = [
31
+ }, L = [
32
32
  "weight",
33
33
  "length",
34
34
  "temperature",
35
35
  "glucose"
36
36
  ];
37
- function Y(c, o, f) {
38
- const r = F[o], n = F[f];
39
- if (!r || !n) throw new Error(`Unknown unit: ${o} → ${f}`);
40
- if (r.category !== n.category)
37
+ function M(c, r, f) {
38
+ const o = F[r], n = F[f];
39
+ if (!o || !n) throw new Error(`Unknown unit: ${r} → ${f}`);
40
+ if (o.category !== n.category)
41
41
  throw new Error(
42
- `Cannot convert across categories: ${r.category} → ${n.category}`
42
+ `Cannot convert across categories: ${o.category} → ${n.category}`
43
43
  );
44
- return (c * r.factor + r.offset - n.offset) / n.factor;
44
+ return (c * o.factor + o.offset - n.offset) / n.factor;
45
45
  }
46
- const D = z("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
46
+ const q = B("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
47
47
  variants: {
48
48
  width: { full: "ds:w-full", auto: "ds:inline-flex" }
49
49
  },
50
50
  defaultVariants: { width: "full" }
51
- }), L = k(
51
+ }), H = j(
52
52
  ({
53
53
  defaultCategory: c = "weight",
54
- onResultChange: o,
54
+ onResultChange: r,
55
55
  onInsert: f,
56
- id: r,
57
- width: n,
58
- className: C
59
- }, U) => {
60
- const { t, i18n: b } = j(), [$, E] = g(c), [i, S] = g(null), [m, w] = g(
56
+ insertVariant: o = "insert",
57
+ onCopy: n,
58
+ onError: C,
59
+ id: U,
60
+ width: E,
61
+ className: S
62
+ }, T) => {
63
+ const { t, i18n: b } = G(), [$, V] = g(c), [i, k] = g(null), [m, w] = g(
61
64
  p[c][0]
62
65
  ), [l, x] = g(
63
66
  p[c][1]
64
- ), T = (s) => {
67
+ ), O = (s) => {
65
68
  const I = s, h = p[I];
66
- E(I), w(h[0]), x(h[1] ?? h[0]);
69
+ V(I), w(h[0]), x(h[1] ?? h[0]);
67
70
  }, a = _(
68
- () => i === null ? null : Y(i, m, l),
71
+ () => i === null ? null : M(i, m, l),
69
72
  [i, m, l]
70
73
  ), u = _(
71
74
  () => new Intl.NumberFormat(b.language, { maximumFractionDigits: 3 }),
72
75
  [b.language]
73
76
  );
74
- O(() => {
75
- o == null || o(a);
76
- }, [a, o]);
77
- const V = G.map((s) => ({
77
+ A(() => {
78
+ r == null || r(a);
79
+ }, [a, r]);
80
+ const z = L.map((s) => ({
78
81
  value: s,
79
82
  label: t(`unitConverter.category.${s}`)
80
83
  })), N = p[$].map((s) => ({
@@ -84,21 +87,21 @@ const D = z("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
84
87
  return /* @__PURE__ */ d(
85
88
  "div",
86
89
  {
87
- ref: U,
90
+ ref: T,
88
91
  "data-component": "unit-converter",
89
- "data-component-id": r,
90
- className: D({ width: n, className: C }),
92
+ "data-component-id": U,
93
+ className: q({ width: E, className: S }),
91
94
  children: [
92
95
  /* @__PURE__ */ e(v, { label: t("unitConverter.categoryLabel"), children: /* @__PURE__ */ e(
93
96
  y,
94
97
  {
95
- options: V,
98
+ options: z,
96
99
  value: $,
97
- onValueChange: T
100
+ onValueChange: O
98
101
  }
99
102
  ) }),
100
103
  /* @__PURE__ */ d("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
101
- /* @__PURE__ */ e(v, { label: t("unitConverter.value"), children: /* @__PURE__ */ e(A, { mode: "decimal", value: i, onChange: S }) }),
104
+ /* @__PURE__ */ e(v, { label: t("unitConverter.value"), children: /* @__PURE__ */ e(Y, { mode: "decimal", value: i, onChange: k }) }),
102
105
  /* @__PURE__ */ e(v, { label: t("unitConverter.from"), children: /* @__PURE__ */ e(
103
106
  y,
104
107
  {
@@ -128,10 +131,13 @@ const D = z("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
128
131
  " ",
129
132
  t(`unitConverter.units.${l}`)
130
133
  ] }),
131
- f ? /* @__PURE__ */ e(
132
- B,
134
+ o === "copy" || f ? /* @__PURE__ */ e(
135
+ D,
133
136
  {
137
+ variant: o,
134
138
  onInsert: f,
139
+ onCopy: n,
140
+ onError: C,
135
141
  card: {
136
142
  title: t("insert.title.unitConverter"),
137
143
  fields: [
@@ -157,12 +163,12 @@ const D = z("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
157
163
  );
158
164
  }
159
165
  );
160
- L.displayName = "UnitConverter";
166
+ H.displayName = "UnitConverter";
161
167
  export {
162
- G as C,
168
+ L as C,
163
169
  F as U,
164
170
  p as a,
165
- L as b,
166
- Y as c
171
+ H as b,
172
+ M as c
167
173
  };
168
- //# sourceMappingURL=unit-converter-EUwO6QYq.js.map
174
+ //# sourceMappingURL=unit-converter-D1UrEUxa.js.map
@@ -12,7 +12,7 @@ import { C as Ne } from "./circle-BkqTgYmt.js";
12
12
  import { u as Ce } from "./registry-nPAVE19X.js";
13
13
  import { A as V } from "./alert-ywPR59NE.js";
14
14
  import { B as _e } from "./button-DD_0Xdmr.js";
15
- import { D as N } from "./dropdown-menu-BC5ZdOMo.js";
15
+ import { D as N } from "./dropdown-menu-CUEXqKis.js";
16
16
  import { E } from "./empty-state-BLy7tigq.js";
17
17
  import { P as ae } from "./plus-CYKNmfuA.js";
18
18
  import { G as ne } from "./globe-BkEFMNSg.js";
@@ -1399,4 +1399,4 @@ export {
1399
1399
  ee as r,
1400
1400
  D as w
1401
1401
  };
1402
- //# sourceMappingURL=workflow-map-C3gB0FvB.js.map
1402
+ //# sourceMappingURL=workflow-map-BFNpzTiw.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.41.1",
3
+ "packageVersion": "0.42.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -19,6 +19,14 @@ export type ProductLockupProps = {
19
19
  * gradient/serif treatment is inappropriate.
20
20
  */
21
21
  monochrome?: boolean;
22
+ /**
23
+ * Ink resolution. `'auto'` (default) uses the lockup's intended ink
24
+ * (`--foreground` for monochrome). `'inherit'` makes the whole lockup ride
25
+ * `currentColor` — use it with `monochrome` on a coloured brand surface (a
26
+ * tinted header or split-login panel) so the wordmark + name both take the
27
+ * surface's text colour rather than clashing with a fixed `--foreground`.
28
+ */
29
+ tone?: 'auto' | 'inherit';
22
30
  /** Lockup size. Drives both the wordmark and the name's cap height. */
23
31
  size?: LockupSize;
24
32
  className?: string;
@@ -46,6 +54,14 @@ export declare const ProductLockup: import("react").ForwardRefExoticComponent<{
46
54
  * gradient/serif treatment is inappropriate.
47
55
  */
48
56
  monochrome?: boolean;
57
+ /**
58
+ * Ink resolution. `'auto'` (default) uses the lockup's intended ink
59
+ * (`--foreground` for monochrome). `'inherit'` makes the whole lockup ride
60
+ * `currentColor` — use it with `monochrome` on a coloured brand surface (a
61
+ * tinted header or split-login panel) so the wordmark + name both take the
62
+ * surface's text colour rather than clashing with a fixed `--foreground`.
63
+ */
64
+ tone?: "auto" | "inherit";
49
65
  /** Lockup size. Drives both the wordmark and the name's cap height. */
50
66
  size?: LockupSize;
51
67
  className?: string;
@@ -1,4 +1,5 @@
1
1
  export type InsertMode = 'text' | 'image' | 'text-image';
2
+ export type InsertVariant = 'insert' | 'copy';
2
3
  export interface InsertCardField {
3
4
  label: string;
4
5
  value: string;
@@ -12,7 +13,7 @@ export interface InsertCardData {
12
13
  highlight?: string;
13
14
  }
14
15
  export interface InsertPayload {
15
- /** Which menu item the user chose. */
16
+ /** Which button the user chose. */
16
17
  mode: InsertMode;
17
18
  /** Plain-text summary. Always present. */
18
19
  text: string;
@@ -26,8 +27,24 @@ export interface InsertPayload {
26
27
  export interface InsertButtonProps {
27
28
  /** Structured result used to build every payload representation. */
28
29
  card: InsertCardData;
29
- /** Receives the built payload when a menu item is chosen. */
30
- onInsert: (payload: InsertPayload) => void;
30
+ /**
31
+ * Verb the buttons perform. Defaults to `'insert'`.
32
+ *
33
+ * - `'insert'` — fires `onInsert(payload)` (editor-extension context).
34
+ * - `'copy'` — writes the chosen representation(s) to the clipboard as a
35
+ * multi-format `ClipboardItem` (app-shell context).
36
+ */
37
+ variant?: InsertVariant;
38
+ /**
39
+ * Receives the built payload when a button is pressed.
40
+ *
41
+ * Required for the `insert` variant; optional (and ignored) for `copy`.
42
+ */
43
+ onInsert?: (payload: InsertPayload) => void;
44
+ /** `copy` variant only — fired after a successful clipboard write. */
45
+ onCopy?: (mode: InsertMode) => void;
46
+ /** `copy` variant only — fired if the clipboard write can't proceed. */
47
+ onError?: (error: unknown) => void;
31
48
  /** Trigger size. Defaults to `'sm'`. */
32
49
  size?: 'sm' | 'md' | 'lg';
33
50
  }
@@ -42,6 +59,6 @@ interface ThemeColours {
42
59
  export declare function buildResultText(card: InsertCardData): string;
43
60
  export declare function buildResultHtml(card: InsertCardData): string;
44
61
  export declare function buildResultCardSvg(card: InsertCardData, c: ThemeColours): string;
45
- export declare function InsertButton({ card, onInsert, size, }: InsertButtonProps): React.ReactElement;
62
+ export declare const InsertButton: import("react").ForwardRefExoticComponent<InsertButtonProps & import("react").RefAttributes<HTMLDivElement>>;
46
63
  export {};
47
64
  //# sourceMappingURL=insert-result.d.ts.map
@@ -0,0 +1,77 @@
1
+ import { type StructuredAddress, type RawAddressComponent } from './parse-address';
2
+ export type { StructuredAddress, RawAddressComponent };
3
+ /**
4
+ * A single address suggestion surfaced in the listbox.
5
+ *
6
+ * `placeId` keys the row and (in real Google mode) is used to fetch full
7
+ * details on selection. In MOCK mode the suggestion carries a pre-parsed
8
+ * `address` so selection resolves without any network call.
9
+ */
10
+ export interface AddressSuggestion {
11
+ /** Stable id — the Google place id, or any unique string in mock mode. */
12
+ placeId: string;
13
+ /** Primary line shown in the row (e.g. "Via Roma 12"). */
14
+ primaryText: string;
15
+ /** Secondary line shown muted under the primary (e.g. "Milan, Italy"). */
16
+ secondaryText?: string;
17
+ /**
18
+ * Pre-parsed structured address. Required in MOCK mode (so selection can
19
+ * resolve without Google). In real Google mode this is omitted and the
20
+ * details are fetched on selection.
21
+ */
22
+ address?: StructuredAddress;
23
+ }
24
+ /**
25
+ * Test/story injector. Given the current query it returns the suggestions
26
+ * to show. Each returned suggestion MUST carry a pre-parsed `address` so
27
+ * selection resolves without a real Google call.
28
+ */
29
+ export type GetSuggestions = (query: string) => AddressSuggestion[] | Promise<AddressSuggestion[]>;
30
+ export interface AddressAutocompleteProps {
31
+ /**
32
+ * Google Maps JS API key. Consumer-owned; never cached by the kit. When
33
+ * absent (and no `getSuggestions` injector is given) the field degrades
34
+ * to a plain free-text input with no suggestions.
35
+ */
36
+ apiKey?: string;
37
+ /** Controlled text value of the input. */
38
+ value?: string;
39
+ /** Fires on every keystroke with the new input text. */
40
+ onValueChange?: (value: string) => void;
41
+ /** Uncontrolled initial text. Ignored once `value` is set. */
42
+ defaultValue?: string;
43
+ /**
44
+ * Fires when the user picks a suggestion, with the parsed structured
45
+ * address. In real Google mode the details are fetched first, so this
46
+ * is async relative to the click.
47
+ */
48
+ onSelect?: (address: StructuredAddress) => void;
49
+ /**
50
+ * Test-only / mock injector. When provided, the listbox is driven from
51
+ * its return value instead of a real Google call — even when `apiKey` is
52
+ * also set (the injector wins, so stories/tests are deterministic).
53
+ */
54
+ getSuggestions?: GetSuggestions;
55
+ /**
56
+ * Restrict predictions to these CLDR region codes (e.g. `['it']`).
57
+ * Real-Google mode only.
58
+ */
59
+ regionCodes?: string[];
60
+ /** Visible label is owned by a wrapping FormField; this is a fallback name. */
61
+ 'aria-label'?: string;
62
+ /** Placeholder text. Falls back to the translated default. */
63
+ placeholder?: string;
64
+ /** Debounce before firing a suggestion fetch. Default 250ms. */
65
+ debounceMs?: number;
66
+ disabled?: boolean;
67
+ required?: boolean;
68
+ readOnly?: boolean;
69
+ name?: string;
70
+ /** Field id. Falls back to FormField context id. */
71
+ id?: string;
72
+ size?: 'sm' | 'md' | 'lg';
73
+ tone?: 'default' | 'error';
74
+ className?: string;
75
+ }
76
+ export declare const AddressAutocomplete: import("react").ForwardRefExoticComponent<AddressAutocompleteProps & import("react").RefAttributes<HTMLInputElement>>;
77
+ //# sourceMappingURL=address-autocomplete.d.ts.map
@@ -0,0 +1,4 @@
1
+ export { AddressAutocomplete } from './address-autocomplete';
2
+ export type { AddressAutocompleteProps, AddressSuggestion, GetSuggestions, } from './address-autocomplete';
3
+ export { parseAddressComponents, type StructuredAddress, type RawAddressComponent, } from './parse-address';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { A as o, p } from "../../_chunks/address-autocomplete-CSjMrBvu.js";
2
+ export {
3
+ o as AddressAutocomplete,
4
+ p as parseAddressComponents
5
+ };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Structured, app-friendly address. Field semantics match the AlfaDocs
3
+ * Italian patient-address model: `province` is the 2-letter IT province
4
+ * code (UPPERCASED) and `country` is the ISO 3166-1 alpha-2 code
5
+ * (lowercased), matching how the platform stores them.
6
+ */
7
+ export interface StructuredAddress {
8
+ /** Street line — route, with the street number joined when present. */
9
+ street: string;
10
+ /** Town / city (locality, falling back to postal_town / admin level 3). */
11
+ city: string;
12
+ /** Postal / ZIP code. */
13
+ postcode: string;
14
+ /** Province — admin level 2 short code, UPPERCASED (e.g. "MI", "RM"). */
15
+ province: string;
16
+ /** Country — ISO alpha-2, lowercased (e.g. "it", "gb"). */
17
+ country: string;
18
+ /** Google's human-readable formatted address (whole line). */
19
+ formatted: string;
20
+ }
21
+ /**
22
+ * Loosened address-component shape accepted by {@link parseAddressComponents}.
23
+ * Mirrors both Places-API (`longText`/`shortText`) and classic Geocoder
24
+ * (`long_name`/`short_name`) field names so either source parses without a
25
+ * pre-pass. `types` is required; the text fields are individually optional.
26
+ */
27
+ export interface RawAddressComponent {
28
+ types: string[];
29
+ longText?: string | null;
30
+ shortText?: string | null;
31
+ long_name?: string | null;
32
+ short_name?: string | null;
33
+ }
34
+ /**
35
+ * Maps an array of Google address components to a {@link StructuredAddress}.
36
+ *
37
+ * Pure: no SDK calls, no DOM, no I/O. `formatted` is passed through from the
38
+ * caller (Google's `formattedAddress` / `formatted_address`) because it is
39
+ * not derivable from the component list.
40
+ *
41
+ * Mapping rules:
42
+ * - `street` = `route`, prefixed with `street_number` when present
43
+ * (e.g. "Via Roma 12"). Either part alone is used if the
44
+ * other is missing.
45
+ * - `city` = `locality`, falling back to `postal_town`, then
46
+ * `administrative_area_level_3`.
47
+ * - `postcode` = `postal_code`.
48
+ * - `province` = `administrative_area_level_2` SHORT text, UPPERCASED.
49
+ * - `country` = `country` SHORT text (ISO alpha-2), lowercased.
50
+ */
51
+ export declare function parseAddressComponents(components: readonly RawAddressComponent[], formatted?: string): StructuredAddress;
52
+ //# sourceMappingURL=parse-address.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
- import { type InsertPayload } from '../_shared/insert-result';
2
+ import { type InsertPayload, type InsertVariant, type InsertMode } from '../_shared/insert-result';
3
3
  import { type UnitSystem, type BmiCategory } from './bmi';
4
4
  export interface BmiResult {
5
5
  /** BMI in kg/m². */
@@ -17,6 +17,16 @@ export interface BmiCalculatorProps extends VariantProps<typeof rootVariants> {
17
17
  onResultChange?: (result: BmiResult | null) => void;
18
18
  /** When provided, shows an "Insert" button that emits the result for an editor. */
19
19
  onInsert?: (payload: InsertPayload) => void;
20
+ /**
21
+ * Which verb the result button performs. Defaults to `'insert'`.
22
+ * Use `'copy'` in an app-shell surface (no editor to insert into) — the
23
+ * button writes the result to the clipboard as a multi-format `ClipboardItem`.
24
+ */
25
+ insertVariant?: InsertVariant;
26
+ /** `copy` variant only — fired after a successful clipboard write. */
27
+ onCopy?: (mode: InsertMode) => void;
28
+ /** `copy` variant only — fired if the clipboard write can't proceed. */
29
+ onError?: (error: unknown) => void;
20
30
  /** Opaque instance id, emitted as `data-component-id`. */
21
31
  id?: string;
22
32
  /** Extra class names on the wrapper. */
@@ -1,4 +1,4 @@
1
- import { B as m } from "../../_chunks/bmi-calculator-DnEr513I.js";
1
+ import { B as m } from "../../_chunks/bmi-calculator-D4juUcyF.js";
2
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";
3
3
  export {
4
4
  m as BmiCalculator,
@@ -1,4 +1,4 @@
1
- import { B as e, a as s, b, c as m, d as c, e as d, f as u } from "../../_chunks/breadcrumb-CLlhx7qo.js";
1
+ import { B as e, a as s, b, c as m, d as c, e as d, f as u } from "../../_chunks/breadcrumb-OTbaY70e.js";
2
2
  export {
3
3
  e as Breadcrumb,
4
4
  s as BreadcrumbEllipsis,
@@ -1,5 +1,5 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
- import { type InsertPayload } from '../_shared/insert-result';
2
+ import { type InsertPayload, type InsertVariant, type InsertMode } from '../_shared/insert-result';
3
3
  import { type CyclePrediction } from './cycle';
4
4
  declare const rootVariants: (props?: ({
5
5
  width?: "auto" | "full" | null | undefined;
@@ -9,8 +9,18 @@ export interface CycleCalculatorProps extends VariantProps<typeof rootVariants>
9
9
  defaultCycleLength?: number;
10
10
  /** Fires whenever a prediction can be computed (and `null` when it can't). */
11
11
  onResultChange?: (result: CyclePrediction | null) => void;
12
- /** When provided, shows an "Insert" button that emits the result for an editor. */
12
+ /** When provided, shows the result-action buttons that emit / copy the result. */
13
13
  onInsert?: (payload: InsertPayload) => void;
14
+ /**
15
+ * Which verb the result button performs. Defaults to `'insert'`.
16
+ * Use `'copy'` in an app-shell surface (no editor to insert into) — the
17
+ * button writes the result to the clipboard as a multi-format `ClipboardItem`.
18
+ */
19
+ insertVariant?: InsertVariant;
20
+ /** `copy` variant only — fired after a successful clipboard write. */
21
+ onCopy?: (mode: InsertMode) => void;
22
+ /** `copy` variant only — fired if the clipboard write can't proceed. */
23
+ onError?: (error: unknown) => void;
14
24
  /** Opaque instance id, emitted as `data-component-id`. */
15
25
  id?: string;
16
26
  /** Extra class names on the wrapper. */
@@ -1,4 +1,4 @@
1
- import { C as e, L as l, p as r } from "../../_chunks/cycle-calculator-B5Uj9QeT.js";
1
+ import { C as e, L as l, p as r } from "../../_chunks/cycle-calculator-DsZbyzX6.js";
2
2
  export {
3
3
  e as CycleCalculator,
4
4
  l as LUTEAL_PHASE_DAYS,
@@ -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-DgkCIIcO.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-BhUkRiPZ.js";
2
2
  export {
3
3
  l as ActionsCellRenderer,
4
4
  r as BalanceCellRenderer,
@@ -1,4 +1,4 @@
1
- import { D as a, d as c } from "../../_chunks/document-scanner-CqS_klIr.js";
1
+ import { D as a, d as c } from "../../_chunks/document-scanner-BqLsGs4Y.js";
2
2
  export {
3
3
  a as DocumentScanner,
4
4
  c as documentScannerAgent
@@ -1,4 +1,4 @@
1
- import { D as d, d as e } from "../../_chunks/dropdown-menu-BC5ZdOMo.js";
1
+ import { D as d, d as e } from "../../_chunks/dropdown-menu-CUEXqKis.js";
2
2
  export {
3
3
  d as DropdownMenu,
4
4
  e as dropdownMenuAgent
@@ -1,5 +1,5 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
- import { type InsertPayload } from '../_shared/insert-result';
2
+ import { type InsertPayload, type InsertVariant, type InsertMode } from '../_shared/insert-result';
3
3
  import { type DueDateMethod, type DueDateResult } from './gestation';
4
4
  declare const rootVariants: (props?: ({
5
5
  width?: "auto" | "full" | null | undefined;
@@ -11,6 +11,16 @@ export interface DueDateCalculatorProps extends VariantProps<typeof rootVariants
11
11
  onResultChange?: (result: DueDateResult | null) => void;
12
12
  /** When provided, shows an "Insert" button that emits the result for an editor. */
13
13
  onInsert?: (payload: InsertPayload) => void;
14
+ /**
15
+ * Which verb the result button performs. Defaults to `'insert'`.
16
+ * Use `'copy'` in an app-shell surface (no editor to insert into) — the
17
+ * button writes the result to the clipboard as a multi-format `ClipboardItem`.
18
+ */
19
+ insertVariant?: InsertVariant;
20
+ /** `copy` variant only — fired after a successful clipboard write. */
21
+ onCopy?: (mode: InsertMode) => void;
22
+ /** `copy` variant only — fired if the clipboard write can't proceed. */
23
+ onError?: (error: unknown) => void;
14
24
  /** Opaque instance id, emitted as `data-component-id`. */
15
25
  id?: string;
16
26
  /** Extra class names on the wrapper. */
@@ -1,4 +1,4 @@
1
- import { D as s } from "../../_chunks/due-date-calculator-CUspKSTw.js";
1
+ import { D as s } from "../../_chunks/due-date-calculator-s_CBgaFs.js";
2
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
3
  export {
4
4
  E as DEFAULT_CYCLE_LENGTH,
@@ -1,4 +1,4 @@
1
- import { F as m, f as l } from "../../_chunks/freemium-paywall-BAk3a6er.js";
1
+ import { F as m, f as l } from "../../_chunks/freemium-paywall-BLXESpH4.js";
2
2
  export {
3
3
  m as FreemiumPaywall,
4
4
  l as freemiumPaywallAgent
@@ -1,5 +1,5 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
- import { type InsertPayload } from '../_shared/insert-result';
2
+ import { type InsertPayload, type InsertVariant, type InsertMode } from '../_shared/insert-result';
3
3
  import { type Trimester, type GestationalAge } from '../due-date-calculator';
4
4
  declare const rootVariants: (props?: ({
5
5
  width?: "auto" | "full" | null | undefined;
@@ -15,8 +15,18 @@ export interface GestationalAgeCalculatorProps extends VariantProps<typeof rootV
15
15
  defaultMethod?: DateMethod;
16
16
  /** Fires whenever a result can be computed (and `null` when it can't). */
17
17
  onResultChange?: (result: GestationalAgeResult | null) => void;
18
- /** When provided, shows an "Insert" button that emits the result for an editor. */
18
+ /** When provided, shows the result-action buttons that emit / copy the result. */
19
19
  onInsert?: (payload: InsertPayload) => void;
20
+ /**
21
+ * Which verb the result button performs. Defaults to `'insert'`.
22
+ * Use `'copy'` in an app-shell surface (no editor to insert into) — the
23
+ * button writes the result to the clipboard as a multi-format `ClipboardItem`.
24
+ */
25
+ insertVariant?: InsertVariant;
26
+ /** `copy` variant only — fired after a successful clipboard write. */
27
+ onCopy?: (mode: InsertMode) => void;
28
+ /** `copy` variant only — fired if the clipboard write can't proceed. */
29
+ onError?: (error: unknown) => void;
20
30
  /** Opaque instance id, emitted as `data-component-id`. */
21
31
  id?: string;
22
32
  /** Extra class names on the wrapper. */
@@ -1,4 +1,4 @@
1
- import { G as t } from "../../_chunks/gestational-age-calculator-CsQ05qDy.js";
1
+ import { G as t } from "../../_chunks/gestational-age-calculator-CWOG3bkI.js";
2
2
  export {
3
3
  t as GestationalAgeCalculator
4
4
  };
@@ -1,4 +1,4 @@
1
- import { H as t } from "../../_chunks/header-settings-CBLwUK6t.js";
1
+ import { H as t } from "../../_chunks/header-settings-Bx0Biimh.js";
2
2
  export {
3
3
  t as HeaderSettings
4
4
  };
@@ -9,6 +9,7 @@ export * from './sign-in-with-alfadocs-button';
9
9
  export { SafeHtml, sanitiseHtml } from './_shared/safe-html';
10
10
  export type { SafeHtmlProps, SafeHtmlProfile } from './_shared/safe-html';
11
11
  export type { OptionShape } from './_shared/option';
12
+ export * from './address-autocomplete';
12
13
  export * from './autocomplete';
13
14
  export * from './checkbox';
14
15
  export * from './checkbox-group';
@@ -38,7 +39,7 @@ export * from './switch';
38
39
  export * from './text-area';
39
40
  export * from './text-input';
40
41
  export * from './time-picker';
41
- export { InsertButton, type InsertButtonProps, type InsertPayload, type InsertMode, type InsertCardData, type InsertCardField, } from './_shared/insert-result';
42
+ export { InsertButton, type InsertButtonProps, type InsertVariant, type InsertPayload, type InsertMode, type InsertCardData, type InsertCardField, } from './_shared/insert-result';
42
43
  export * from './accordion';
43
44
  export * from './avatar';
44
45
  export * from './badge';
@@ -79,6 +80,7 @@ export * from './sidebar';
79
80
  export * from './skip-link';
80
81
  export * from './stepper-accordion';
81
82
  export * from './stepper-progress';
83
+ export * from './tab-bar';
82
84
  export * from './tabs';
83
85
  export * from './theme-toggle';
84
86
  export * from './agenda-card';
@@ -1,4 +1,4 @@
1
- import { K as b, k as d } from "../../_chunks/kbd-Cglkd7CY.js";
1
+ import { K as b, k as d } from "../../_chunks/kbd-D855ZXIW.js";
2
2
  export {
3
3
  b as Kbd,
4
4
  d as kbdGlyphs
@@ -1,4 +1,4 @@
1
- import { M as o } from "../../_chunks/map-view-qJLybrmN.js";
1
+ import { M as o } from "../../_chunks/map-view-Tb5VfK9Y.js";
2
2
  export {
3
3
  o as MapView
4
4
  };
@@ -7,7 +7,7 @@ declare const GLYPH_PRESETS: {
7
7
  };
8
8
  type GlyphPreset = keyof typeof GLYPH_PRESETS;
9
9
  declare const wrapperVariants: (props?: ({
10
- background?: "solid" | "transparent" | null | undefined;
10
+ background?: "transparent" | "solid" | null | undefined;
11
11
  vibe?: "ghost" | "terminal" | "clean" | "hologram" | "synthwave" | "oscilloscope" | null | undefined;
12
12
  mask?: "center" | "none" | null | undefined;
13
13
  maskRadius?: "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
@@ -1,4 +1,4 @@
1
- import { P as t, p as r } from "../../_chunks/patient-search-CBq62kmL.js";
1
+ import { P as t, p as r } from "../../_chunks/patient-search-DPe2ZYEL.js";
2
2
  export {
3
3
  t as PatientSearch,
4
4
  r as patientSearchAgent