@alfadocs/ui-kit 0.44.0 → 0.46.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 (121) hide show
  1. package/dist/_chunks/{alia-sidebar-BpX4z_af.js → alia-sidebar-Be8FhKYd.js} +332 -237
  2. package/dist/_chunks/{autocomplete-DIgdhCGJ.js → autocomplete-CDqxB68B.js} +2 -2
  3. package/dist/_chunks/bmi-calculator-CQqXTVNL.js +258 -0
  4. package/dist/_chunks/{booking-CtLwaxkK.js → booking-DlDVuWMd.js} +2 -2
  5. package/dist/_chunks/{cycle-calculator-ChHBcjet.js → cycle-calculator-KxA8dqDf.js} +31 -20
  6. package/dist/_chunks/{due-date-calculator-CYXKLoof.js → due-date-calculator-mFxpHLml.js} +51 -39
  7. package/dist/_chunks/{editable-currency-cell-renderer-9jqwDv5x.js → editable-currency-cell-renderer-BEBUQl9P.js} +2 -2
  8. package/dist/_chunks/{freemium-paywall-BLXESpH4.js → freemium-paywall-DzpD63WY.js} +2 -2
  9. package/dist/_chunks/{gestational-age-calculator-sRmoqgVr.js → gestational-age-calculator-gWI_uRA1.js} +52 -39
  10. package/dist/_chunks/insert-result-C5ABnzDl.js +711 -0
  11. package/dist/_chunks/{marketplace-app-shell-Dc5cTIt8.js → marketplace-app-shell-Gfsf78ge.js} +2 -2
  12. package/dist/_chunks/{patient-search-DPe2ZYEL.js → patient-search-CocVcGJ3.js} +2 -2
  13. package/dist/_chunks/payment-form-BNTx4876.js +671 -0
  14. package/dist/_chunks/{pdf-viewer-B6MC6VTx.js → pdf-viewer-CWEXTlwq.js} +2 -2
  15. package/dist/_chunks/{practice-results-CrLpEiiW.js → practice-results-DDi-kvaD.js} +2 -2
  16. package/dist/_chunks/{pregnancy-weight-gain-C5YhfYnL.js → pregnancy-weight-gain-BtEHaSqy.js} +26 -13
  17. package/dist/_chunks/{search-bar-CP6wUJFY.js → search-bar-CvN_S0jW.js} +2 -2
  18. package/dist/_chunks/{search-input-C1C3jQpD.js → search-input-D3aMvi4l.js} +2 -2
  19. package/dist/_chunks/{sign-document-B-3k_0LO.js → sign-document-BCyLpFHJ.js} +2 -2
  20. package/dist/_chunks/{sign-in-with-alfadocs-button-DeHBFRNS.js → sign-in-with-alfadocs-button-CuYn_kKP.js} +2 -2
  21. package/dist/_chunks/{social-sign-in-button-X54ySJr1.js → social-sign-in-button-uJYLM366.js} +2 -2
  22. package/dist/_chunks/{spinner-CCByyvcb.js → spinner-OjQNn8oN.js} +7 -3
  23. package/dist/_chunks/{transcript-panel-CR7VY1uw.js → transcript-panel-B4HiC7ed.js} +2 -2
  24. package/dist/_chunks/{unit-converter-Ds9jalbN.js → unit-converter-u3CwNDpP.js} +63 -52
  25. package/dist/_chunks/{wallet-pay-button-DK4ESYge.js → wallet-pay-button-DuDPBlCO.js} +2 -2
  26. package/dist/agent-catalog.json +1 -1
  27. package/dist/components/_shared/banded-gauge.d.ts +193 -0
  28. package/dist/components/_shared/insert-result.d.ts +81 -8
  29. package/dist/components/autocomplete/index.js +1 -1
  30. package/dist/components/bmi-calculator/bmi-calculator.d.ts +2 -2
  31. package/dist/components/bmi-calculator/index.js +1 -1
  32. package/dist/components/booking/index.js +1 -1
  33. package/dist/components/cycle-calculator/cycle-calculator.d.ts +2 -2
  34. package/dist/components/cycle-calculator/index.js +1 -1
  35. package/dist/components/data-table/index.js +1 -1
  36. package/dist/components/due-date-calculator/due-date-calculator.d.ts +2 -2
  37. package/dist/components/due-date-calculator/index.js +1 -1
  38. package/dist/components/freemium-paywall/index.js +1 -1
  39. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +2 -2
  40. package/dist/components/gestational-age-calculator/index.js +1 -1
  41. package/dist/components/patient-search/index.js +1 -1
  42. package/dist/components/payment-form/index.js +1 -1
  43. package/dist/components/payment-form/payment-form.d.ts +30 -2
  44. package/dist/components/pdf-viewer/index.js +1 -1
  45. package/dist/components/practice-results/index.js +1 -1
  46. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  47. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +2 -2
  48. package/dist/components/search-bar/index.js +1 -1
  49. package/dist/components/search-input/index.js +1 -1
  50. package/dist/components/sign-document/index.js +1 -1
  51. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  52. package/dist/components/social-sign-in-button/index.js +1 -1
  53. package/dist/components/spinner/index.js +1 -1
  54. package/dist/components/spinner/spinner.d.ts +2 -2
  55. package/dist/components/transcript-panel/index.js +1 -1
  56. package/dist/components/unit-converter/index.js +1 -1
  57. package/dist/components/unit-converter/unit-converter.d.ts +2 -2
  58. package/dist/components/wallet-pay-button/index.js +1 -1
  59. package/dist/i18n/locales/ar.d.ts +1 -1
  60. package/dist/i18n/locales/ar.js +1 -1
  61. package/dist/i18n/locales/de.d.ts +1 -1
  62. package/dist/i18n/locales/de.js +1 -1
  63. package/dist/i18n/locales/el.d.ts +1 -1
  64. package/dist/i18n/locales/el.js +1 -1
  65. package/dist/i18n/locales/en.d.ts +1 -1
  66. package/dist/i18n/locales/en.js +1 -1
  67. package/dist/i18n/locales/es.d.ts +1 -1
  68. package/dist/i18n/locales/es.js +1 -1
  69. package/dist/i18n/locales/fr.d.ts +1 -1
  70. package/dist/i18n/locales/fr.js +1 -1
  71. package/dist/i18n/locales/hi.d.ts +1 -1
  72. package/dist/i18n/locales/hi.js +1 -1
  73. package/dist/i18n/locales/it.d.ts +1 -1
  74. package/dist/i18n/locales/it.js +1 -1
  75. package/dist/i18n/locales/ja.d.ts +1 -1
  76. package/dist/i18n/locales/ja.js +1 -1
  77. package/dist/i18n/locales/nl.d.ts +1 -1
  78. package/dist/i18n/locales/nl.js +1 -1
  79. package/dist/i18n/locales/pl.d.ts +1 -1
  80. package/dist/i18n/locales/pl.js +1 -1
  81. package/dist/i18n/locales/pt.d.ts +1 -1
  82. package/dist/i18n/locales/pt.js +1 -1
  83. package/dist/i18n/locales/ro.d.ts +1 -1
  84. package/dist/i18n/locales/ro.js +1 -1
  85. package/dist/i18n/locales/ru.d.ts +1 -1
  86. package/dist/i18n/locales/ru.js +1 -1
  87. package/dist/i18n/locales/sq.d.ts +1 -1
  88. package/dist/i18n/locales/sq.js +1 -1
  89. package/dist/i18n/locales/sv.d.ts +1 -1
  90. package/dist/i18n/locales/sv.js +1 -1
  91. package/dist/i18n/locales/tr.d.ts +1 -1
  92. package/dist/i18n/locales/tr.js +1 -1
  93. package/dist/i18n/locales/zh.d.ts +1 -1
  94. package/dist/i18n/locales/zh.js +1 -1
  95. package/dist/index.js +25 -25
  96. package/dist/locales/ar.json +1 -1
  97. package/dist/locales/de.json +1 -1
  98. package/dist/locales/el.json +1 -1
  99. package/dist/locales/en.json +1 -1
  100. package/dist/locales/es.json +1 -1
  101. package/dist/locales/fr.json +1 -1
  102. package/dist/locales/hi.json +1 -1
  103. package/dist/locales/it.json +1 -1
  104. package/dist/locales/ja.json +1 -1
  105. package/dist/locales/nl.json +1 -1
  106. package/dist/locales/pl.json +1 -1
  107. package/dist/locales/pt.json +1 -1
  108. package/dist/locales/ro.json +1 -1
  109. package/dist/locales/ru.json +1 -1
  110. package/dist/locales/sq.json +1 -1
  111. package/dist/locales/sv.json +1 -1
  112. package/dist/locales/tr.json +1 -1
  113. package/dist/locales/zh.json +1 -1
  114. package/dist/patterns/alia-assistant/alia-types.d.ts +20 -0
  115. package/dist/patterns/alia-assistant/index.js +1 -1
  116. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  117. package/dist/tokens.css +1 -1
  118. package/package.json +1 -1
  119. package/dist/_chunks/bmi-calculator-DFPWL2OJ.js +0 -273
  120. package/dist/_chunks/insert-result-CoC1oo6R.js +0 -334
  121. package/dist/_chunks/payment-form-BzVsG6Ks.js +0 -590
@@ -1,18 +1,18 @@
1
1
  import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as L, useState as f, useMemo as m, useEffect as I } from "react";
3
- import { c as S } from "./index-D2ZczOXr.js";
4
- import { useTranslation as k } from "react-i18next";
5
- import { R as h } from "./radio-TWf9Q-mp.js";
2
+ import { forwardRef as E, useState as h, useMemo as g, useEffect as L } from "react";
3
+ import { c as I } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as S } from "react-i18next";
5
+ import { R as x } from "./radio-TWf9Q-mp.js";
6
6
  import { R as B } from "./radio-group-CLjK-SlK.js";
7
7
  import { F } from "./form-field-BOm9hK35.js";
8
8
  import { D as M } from "./date-picker-Bq7xhMA-.js";
9
- import { C as x } from "./card-DPmk26CL.js";
10
- import { B as A } from "./badge-zsf5i5bH.js";
11
- import { I as R } from "./insert-result-CoC1oo6R.js";
12
- import { c as _, g as j, G as H } from "./gestation-mWF4AXea.js";
9
+ import { C as A } from "./card-DPmk26CL.js";
10
+ import { B as v } from "./badge-zsf5i5bH.js";
11
+ import { I as R } from "./insert-result-C5ABnzDl.js";
12
+ import { c as H, g as _, G as j } from "./gestation-mWF4AXea.js";
13
13
  import { s as z } from "./subDays-Dv7q9S7u.js";
14
14
  import { i as O } from "./date-picker-variants-DLi1Va_e.js";
15
- const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
15
+ const V = I("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
16
16
  variants: {
17
17
  width: { full: "ds:w-full", auto: "ds:inline-flex" }
18
18
  },
@@ -27,14 +27,18 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
27
27
  preconception: "--muted",
28
28
  first: "--info",
29
29
  second: "--success",
30
- third: "--warning",
30
+ third: "--warning-readable",
31
31
  postterm: "--destructive"
32
- }, Y = L(
32
+ };
33
+ function Y(c) {
34
+ return P[c];
35
+ }
36
+ const q = E(
33
37
  ({
34
- defaultMethod: v = "lmp",
38
+ defaultMethod: c = "lmp",
35
39
  onResultChange: d,
36
- onInsert: g,
37
- insertVariant: u = "insert",
40
+ onInsert: u,
41
+ insertVariant: p = "insert",
38
42
  onCopy: b,
39
43
  onError: y,
40
44
  insertBrand: C,
@@ -42,25 +46,25 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
42
46
  width: D,
43
47
  className: T
44
48
  }, w) => {
45
- const { t: e, i18n: p } = k(), [o, G] = f(v), [i, $] = f(void 0), n = m(() => /* @__PURE__ */ new Date(), []), a = m(() => {
49
+ const { t: e, i18n: f } = S(), [o, G] = h(c), [i, $] = h(void 0), n = g(() => /* @__PURE__ */ new Date(), []), a = g(() => {
46
50
  if (!i) return null;
47
- const s = o === "lmp" ? i : z(i, H), r = _({ method: "lmp", date: s }, n);
51
+ const s = o === "lmp" ? i : z(i, j), r = H({ method: "lmp", date: s }, n);
48
52
  return {
49
53
  result: {
50
54
  gestationalAge: r.gestationalAge,
51
55
  trimester: r.trimester,
52
56
  dueDate: r.dueDate
53
57
  },
54
- milestones: j(r.gestationalStart)
58
+ milestones: _(r.gestationalStart)
55
59
  };
56
- }, [o, i, n]), E = m(
57
- () => new Intl.DateTimeFormat(p.language, { dateStyle: "medium" }),
58
- [p.language]
60
+ }, [o, i, n]), k = g(
61
+ () => new Intl.DateTimeFormat(f.language, { dateStyle: "medium" }),
62
+ [f.language]
59
63
  );
60
- I(() => {
64
+ L(() => {
61
65
  d == null || d((a == null ? void 0 : a.result) ?? null);
62
66
  }, [a, d]);
63
- const c = (s) => s ? e("gestationalAgeCalculator.gestation", {
67
+ const m = (s) => s ? e("gestationalAgeCalculator.gestation", {
64
68
  weeks: s.weeks,
65
69
  days: s.days
66
70
  }) : "—";
@@ -80,8 +84,8 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
80
84
  value: o,
81
85
  onValueChange: (s) => G(s),
82
86
  children: [
83
- /* @__PURE__ */ t(h, { label: e("gestationalAgeCalculator.method.lmp"), value: "lmp" }),
84
- /* @__PURE__ */ t(h, { label: e("gestationalAgeCalculator.method.edd"), value: "edd" })
87
+ /* @__PURE__ */ t(x, { label: e("gestationalAgeCalculator.method.lmp"), value: "lmp" }),
88
+ /* @__PURE__ */ t(x, { label: e("gestationalAgeCalculator.method.edd"), value: "edd" })
85
89
  ]
86
90
  }
87
91
  ),
@@ -101,17 +105,17 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
101
105
  )
102
106
  }
103
107
  ),
104
- /* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: a ? `${e("gestationalAgeCalculator.gestationLabel")}: ${c(
108
+ /* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: a ? `${e("gestationalAgeCalculator.gestationLabel")}: ${m(
105
109
  a.result.gestationalAge
106
110
  )}. ${e("gestationalAgeCalculator.trimesterLabel")}: ${e(
107
111
  `gestationalAgeCalculator.trimester.${a.result.trimester}`
108
112
  )}.` : "" }),
109
- a ? /* @__PURE__ */ t(x, { variant: "elevated", children: /* @__PURE__ */ l(x.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
113
+ a ? /* @__PURE__ */ t(A, { variant: "elevated", children: /* @__PURE__ */ l(A.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
110
114
  /* @__PURE__ */ l("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
111
115
  /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]", children: [
112
116
  /* @__PURE__ */ t("dt", { className: "type-label ds:text-muted-foreground", children: e("gestationalAgeCalculator.trimesterLabel") }),
113
117
  /* @__PURE__ */ t("dd", { children: /* @__PURE__ */ t(
114
- A,
118
+ v,
115
119
  {
116
120
  variant: K[a.result.trimester],
117
121
  size: "lg",
@@ -123,7 +127,7 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
123
127
  ] }),
124
128
  /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-xs)] ds:text-end", children: [
125
129
  /* @__PURE__ */ t("dt", { className: "type-label ds:text-muted-foreground", children: e("gestationalAgeCalculator.gestationLabel") }),
126
- /* @__PURE__ */ t("dd", { className: "type-metric ds:text-foreground", children: c(a.result.gestationalAge) })
130
+ /* @__PURE__ */ t("dd", { className: "type-metric ds:text-foreground", children: m(a.result.gestationalAge) })
127
131
  ] })
128
132
  ] }),
129
133
  /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
@@ -137,8 +141,8 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
137
141
  children: [
138
142
  /* @__PURE__ */ t("span", { className: "type-body ds:text-foreground", children: e(`gestationalAgeCalculator.milestone.${s.key}`) }),
139
143
  /* @__PURE__ */ l("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
140
- /* @__PURE__ */ t("span", { className: "type-body ds:text-muted-foreground", children: E.format(s.date) }),
141
- r ? /* @__PURE__ */ t(A, { variant: "success", children: e("gestationalAgeCalculator.reached") }) : null
144
+ /* @__PURE__ */ t("span", { className: "type-body ds:text-muted-foreground", children: k.format(s.date) }),
145
+ r ? /* @__PURE__ */ t(v, { variant: "success", children: e("gestationalAgeCalculator.reached") }) : null
142
146
  ] })
143
147
  ]
144
148
  },
@@ -146,28 +150,37 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
146
150
  );
147
151
  }) })
148
152
  ] }),
149
- u === "copy" || g ? /* @__PURE__ */ t(
153
+ p === "copy" || u ? /* @__PURE__ */ t(
150
154
  R,
151
155
  {
152
- onInsert: g,
153
- variant: u,
156
+ onInsert: u,
157
+ variant: p,
154
158
  onCopy: b,
155
159
  onError: y,
156
160
  card: {
157
161
  title: e("insert.title.gestationalAge"),
162
+ icon: "baby",
158
163
  highlight: e(
159
164
  `gestationalAgeCalculator.trimester.${a.result.trimester}`
160
165
  ),
161
166
  // Chip shares the trimester's semantic token so the
162
- // inserted PNG chip matches the on-screen trimester badge.
163
- highlightToken: P[a.result.trimester],
167
+ // inserted PNG chip matches the on-screen trimester badge
168
+ // with the contrast-safe orange override for the
169
+ // `--warning` third trimester.
170
+ highlightToken: Y(
171
+ a.result.trimester
172
+ ),
164
173
  brand: C,
165
174
  fields: [
166
175
  {
176
+ // Gestational age is an elapsed duration → clock glyph.
177
+ icon: "clock",
167
178
  label: e("gestationalAgeCalculator.gestationLabel"),
168
- value: c(a.result.gestationalAge)
179
+ value: m(a.result.gestationalAge)
169
180
  },
170
181
  {
182
+ // Trimester is a clinical-stage classification → tag.
183
+ icon: "tag",
171
184
  label: e("gestationalAgeCalculator.trimesterLabel"),
172
185
  value: e(
173
186
  `gestationalAgeCalculator.trimester.${a.result.trimester}`
@@ -183,8 +196,8 @@ const V = S("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
183
196
  );
184
197
  }
185
198
  );
186
- Y.displayName = "GestationalAgeCalculator";
199
+ q.displayName = "GestationalAgeCalculator";
187
200
  export {
188
- Y as G
201
+ q as G
189
202
  };
190
- //# sourceMappingURL=gestational-age-calculator-sRmoqgVr.js.map
203
+ //# sourceMappingURL=gestational-age-calculator-gWI_uRA1.js.map