@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
@@ -5,7 +5,7 @@ import { c as J } from "./index-D2ZczOXr.js";
5
5
  import { useTranslation as pe } from "react-i18next";
6
6
  import * as ee from "@radix-ui/react-popover";
7
7
  import Ce from "pdfjs-dist/build/pdf.worker.min.mjs?url";
8
- import { S as Ze } from "./spinner-CCByyvcb.js";
8
+ import { S as Ze } from "./spinner-OjQNn8oN.js";
9
9
  import { A as we } from "./alert-ywPR59NE.js";
10
10
  import { u as Ke } from "./registry-nPAVE19X.js";
11
11
  import { X as Be } from "./x-CCcI3eJp.js";
@@ -957,4 +957,4 @@ export {
957
957
  at as P,
958
958
  Ge as p
959
959
  };
960
- //# sourceMappingURL=pdf-viewer-B6MC6VTx.js.map
960
+ //# sourceMappingURL=pdf-viewer-CWEXTlwq.js.map
@@ -11,7 +11,7 @@ import { M as We } from "./map-view-Tb5VfK9Y.js";
11
11
  import { R as Ce } from "./rating-BRD7O74e.js";
12
12
  import { S as z } from "./sheet-xbzu4YiY.js";
13
13
  import { S as Xe } from "./skeleton-CZbwyJAA.js";
14
- import { S as Ye } from "./spinner-CCByyvcb.js";
14
+ import { S as Ye } from "./spinner-OjQNn8oN.js";
15
15
  import { B as L } from "./badge-zsf5i5bH.js";
16
16
  import { u as et } from "./use-media-query-CcAx5SMM.js";
17
17
  import { u as tt } from "./registry-nPAVE19X.js";
@@ -1569,4 +1569,4 @@ export {
1569
1569
  Ct as P,
1570
1570
  rt as p
1571
1571
  };
1572
- //# sourceMappingURL=practice-results-CrLpEiiW.js.map
1572
+ //# sourceMappingURL=practice-results-DDi-kvaD.js.map
@@ -1,12 +1,12 @@
1
1
  import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
2
  import { forwardRef as A, useState as f, useMemo as w, useEffect as F } from "react";
3
- import { c as R } from "./index-D2ZczOXr.js";
4
- import { useTranslation as k } from "react-i18next";
3
+ import { c as k } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as R } from "react-i18next";
5
5
  import { F as y } from "./form-field-BOm9hK35.js";
6
6
  import { N as x } from "./number-input-Dj5L3pXK.js";
7
7
  import { C as $ } from "./card-DPmk26CL.js";
8
8
  import { B as C } from "./badge-zsf5i5bH.js";
9
- import { I as H } from "./insert-result-CoC1oo6R.js";
9
+ import { I as H } from "./insert-result-C5ABnzDl.js";
10
10
  import { b as M, e as j } from "./bmi-BxD-tFzU.js";
11
11
  const L = {
12
12
  underweight: { min: 12.5, max: 18 },
@@ -41,7 +41,7 @@ function z(t) {
41
41
  ), c = t.currentWeightKg - t.prePregnancyWeightKg, W = c < r.min ? "below" : c > r.max ? "above" : "within";
42
42
  return { category: i, totalRange: l, recommendedToDate: r, actualGainKg: c, status: W };
43
43
  }
44
- const V = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
44
+ const V = k("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
45
45
  variants: {
46
46
  width: { full: "ds:w-full", auto: "ds:inline-flex" }
47
47
  },
@@ -51,10 +51,14 @@ const V = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
51
51
  within: "success",
52
52
  above: "warning"
53
53
  }, J = {
54
- below: "--warning",
54
+ below: "--warning-readable",
55
55
  within: "--success",
56
- above: "--warning"
57
- }, Q = A(
56
+ above: "--warning-readable"
57
+ };
58
+ function Q(t) {
59
+ return J[t];
60
+ }
61
+ const X = A(
58
62
  ({
59
63
  onResultChange: t,
60
64
  onInsert: i,
@@ -66,7 +70,7 @@ const V = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
66
70
  width: P,
67
71
  className: S
68
72
  }, B) => {
69
- const { t: e, i18n: b } = k(), [N, D] = f(null), [m, I] = f(null), [g, E] = f(null), [u, _] = f(null), p = j(m, N), n = w(() => p === null || m === null || g === null || u === null ? null : z({
73
+ const { t: e, i18n: b } = R(), [N, D] = f(null), [m, I] = f(null), [g, E] = f(null), [u, _] = f(null), p = j(m, N), n = w(() => p === null || m === null || g === null || u === null ? null : z({
70
74
  prePregnancyBmi: p,
71
75
  prePregnancyWeightKg: m,
72
76
  currentWeightKg: g,
@@ -194,21 +198,30 @@ const V = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
194
198
  onError: c,
195
199
  card: {
196
200
  title: e("insert.title.weightGain"),
201
+ icon: "baby",
197
202
  highlight: e(`pregnancyWeightGain.status.${n.status}`),
198
203
  // Chip shares the gain-status semantic token so the
199
- // inserted PNG chip matches the on-screen status badge.
200
- highlightToken: J[n.status],
204
+ // inserted PNG chip matches the on-screen status badge
205
+ // with the contrast-safe orange override for the
206
+ // `--warning` below/above statuses.
207
+ highlightToken: Q(n.status),
201
208
  brand: W,
202
209
  fields: [
203
210
  {
211
+ // Actual gain is the headline trend → trending-up glyph.
212
+ icon: "trending-up",
204
213
  label: e("pregnancyWeightGain.actualGain"),
205
214
  value: `${d.format(n.actualGainKg)} ${o}`
206
215
  },
207
216
  {
217
+ // Recommended weight band → scale glyph.
218
+ icon: "scale",
208
219
  label: e("pregnancyWeightGain.recommendedToDate"),
209
220
  value: h(n.recommendedToDate)
210
221
  },
211
222
  {
223
+ // Recommended total weight band → scale glyph.
224
+ icon: "scale",
212
225
  label: e("pregnancyWeightGain.recommendedTotal"),
213
226
  value: h(n.totalRange)
214
227
  }
@@ -222,12 +235,12 @@ const V = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
222
235
  );
223
236
  }
224
237
  );
225
- Q.displayName = "PregnancyWeightGain";
238
+ X.displayName = "PregnancyWeightGain";
226
239
  export {
227
- Q as P,
240
+ X as P,
228
241
  O as R,
229
242
  L as T,
230
243
  z as a,
231
244
  U as r
232
245
  };
233
- //# sourceMappingURL=pregnancy-weight-gain-C5YhfYnL.js.map
246
+ //# sourceMappingURL=pregnancy-weight-gain-BtEHaSqy.js.map
@@ -3,7 +3,7 @@ import { forwardRef as te, useState as _, useEffect as F, useRef as j, useMemo a
3
3
  import { c as A } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as U } from "react-i18next";
5
5
  import * as q from "@radix-ui/react-popover";
6
- import { S as oe } from "./search-input-C1C3jQpD.js";
6
+ import { S as oe } from "./search-input-D3aMvi4l.js";
7
7
  import { u as W } from "./registry-nPAVE19X.js";
8
8
  import { n as O } from "./normalize-diacritics-BNGbFNlJ.js";
9
9
  import { S as ie } from "./search-BonnQsHv.js";
@@ -582,4 +582,4 @@ export {
582
582
  Ie as f,
583
583
  J as s
584
584
  };
585
- //# sourceMappingURL=search-bar-CP6wUJFY.js.map
585
+ //# sourceMappingURL=search-bar-CvN_S0jW.js.map
@@ -3,7 +3,7 @@ import { forwardRef as ie, useState as F, useRef as K, useCallback as V, useImpe
3
3
  import { c as x } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as le } from "react-i18next";
5
5
  import { T as ce } from "./text-input-BaClJL8Y.js";
6
- import { S as ue } from "./spinner-CCByyvcb.js";
6
+ import { S as ue } from "./spinner-OjQNn8oN.js";
7
7
  import { u as fe } from "./form-field-context-B3APVHKx.js";
8
8
  import { u as me } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
9
9
  import { u as be } from "./use-debounced-callback-BisrB-Fq.js";
@@ -234,4 +234,4 @@ Ee.displayName = "SearchInput";
234
234
  export {
235
235
  Ee as S
236
236
  };
237
- //# sourceMappingURL=search-input-C1C3jQpD.js.map
237
+ //# sourceMappingURL=search-input-D3aMvi4l.js.map
@@ -2,7 +2,7 @@ import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as ce, useId as le, useMemo as G, useRef as L, useState as x, useEffect as _, useCallback as l, useImperativeHandle as ue } from "react";
3
3
  import { c as i } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as me } from "react-i18next";
5
- import { P as ge } from "./pdf-viewer-B6MC6VTx.js";
5
+ import { P as ge } from "./pdf-viewer-CWEXTlwq.js";
6
6
  import { S as pe } from "./signature-capture-CpMBhqQ9.js";
7
7
  import { u as fe } from "./registry-nPAVE19X.js";
8
8
  import { C as J } from "./circle-check-9AeSgJD_.js";
@@ -341,4 +341,4 @@ export {
341
341
  je as S,
342
342
  ve as s
343
343
  };
344
- //# sourceMappingURL=sign-document-B-3k_0LO.js.map
344
+ //# sourceMappingURL=sign-document-BCyLpFHJ.js.map
@@ -3,7 +3,7 @@ import { forwardRef as L, useRef as c, useEffect as b } from "react";
3
3
  import { useTranslation as y } from "react-i18next";
4
4
  import { B as E } from "./button-DD_0Xdmr.js";
5
5
  import { L as I } from "./logo-yituK7sE.js";
6
- import { S as g } from "./spinner-CCByyvcb.js";
6
+ import { S as g } from "./spinner-OjQNn8oN.js";
7
7
  const A = /* @__PURE__ */ new Set([
8
8
  "primary",
9
9
  "secondary",
@@ -46,4 +46,4 @@ B.displayName = "SignInWithAlfadocsButton";
46
46
  export {
47
47
  B as S
48
48
  };
49
- //# sourceMappingURL=sign-in-with-alfadocs-button-DeHBFRNS.js.map
49
+ //# sourceMappingURL=sign-in-with-alfadocs-button-CuYn_kKP.js.map
@@ -2,7 +2,7 @@ import { jsx as s, jsxs as m } from "react/jsx-runtime";
2
2
  import { forwardRef as y, useRef as p, useEffect as N } from "react";
3
3
  import { c as n } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as j } from "react-i18next";
5
- import { S as V } from "./spinner-CCByyvcb.js";
5
+ import { S as V } from "./spinner-OjQNn8oN.js";
6
6
  function A({ className: e }) {
7
7
  return /* @__PURE__ */ s(
8
8
  "svg",
@@ -240,4 +240,4 @@ I.displayName = "SocialSignInButton";
240
240
  export {
241
241
  I as S
242
242
  };
243
- //# sourceMappingURL=social-sign-in-button-X54ySJr1.js.map
243
+ //# sourceMappingURL=social-sign-in-button-uJYLM366.js.map
@@ -12,7 +12,8 @@ const f = i("ds:inline-block ds:shrink-0 ds:text-current", {
12
12
  variant: {
13
13
  pulse: "",
14
14
  chase: "",
15
- prism: ""
15
+ prism: "",
16
+ static: ""
16
17
  },
17
18
  speed: {
18
19
  slower: "",
@@ -105,7 +106,10 @@ const f = i("ds:inline-block ds:shrink-0 ds:text-current", {
105
106
  variant: {
106
107
  pulse: "ds:animate-[spinner-pulse_var(--spinner-duration)_ease-in-out_infinite]",
107
108
  chase: "ds:animate-[spinner-chase_var(--spinner-duration)_ease-out_infinite]",
108
- prism: "ds:animate-[spinner-prism_var(--spinner-duration)_linear_infinite] ds:motion-reduce:fill-[var(--primary)]"
109
+ prism: "ds:animate-[spinner-prism_var(--spinner-duration)_linear_infinite] ds:motion-reduce:fill-[var(--primary)]",
110
+ // No animation — the brand mark at rest (a static logo glyph). Inherits
111
+ // currentColor via the base `fill-current`.
112
+ static: ""
109
113
  },
110
114
  position: {
111
115
  top: "ds:[--spinner-position:0]",
@@ -213,4 +217,4 @@ v.displayName = "Spinner";
213
217
  export {
214
218
  v as S
215
219
  };
216
- //# sourceMappingURL=spinner-CCByyvcb.js.map
220
+ //# sourceMappingURL=spinner-OjQNn8oN.js.map
@@ -4,7 +4,7 @@ import { c as V } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as D } from "react-i18next";
5
5
  import { u as F } from "./registry-nPAVE19X.js";
6
6
  import { u as H } from "./index-CJE9uQmb.js";
7
- import { S as q } from "./search-input-C1C3jQpD.js";
7
+ import { S as q } from "./search-input-D3aMvi4l.js";
8
8
  import { u as B } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
9
9
  const U = {
10
10
  id: "transcript-panel",
@@ -345,4 +345,4 @@ export {
345
345
  te as T,
346
346
  U as t
347
347
  };
348
- //# sourceMappingURL=transcript-panel-CR7VY1uw.js.map
348
+ //# sourceMappingURL=transcript-panel-B4HiC7ed.js.map
@@ -1,11 +1,11 @@
1
1
  import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as A, useState as v, useMemo as T, useEffect as H } from "react";
2
+ import { forwardRef as z, useState as p, useMemo as I, useEffect as A } from "react";
3
3
  import { c as Y } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as j } from "react-i18next";
5
- import { F as p } from "./form-field-BOm9hK35.js";
5
+ import { F as v } from "./form-field-BOm9hK35.js";
6
6
  import { N as B } from "./number-input-Dj5L3pXK.js";
7
7
  import { S as C } from "./select-hsCaJSX3.js";
8
- import { I as L } from "./insert-result-CoC1oo6R.js";
8
+ import { I as L } from "./insert-result-C5ABnzDl.js";
9
9
  const _ = {
10
10
  // weight → base kg
11
11
  kg: { id: "kg", category: "weight", factor: 1, offset: 0 },
@@ -34,14 +34,14 @@ const _ = {
34
34
  "temperature",
35
35
  "glucose"
36
36
  ];
37
- function K(c, r, f) {
38
- const o = _[r], n = _[f];
39
- if (!o || !n) throw new Error(`Unknown unit: ${r} → ${f}`);
40
- if (o.category !== n.category)
37
+ function K(r, n, f) {
38
+ const o = _[n], a = _[f];
39
+ if (!o || !a) throw new Error(`Unknown unit: ${n} → ${f}`);
40
+ if (o.category !== a.category)
41
41
  throw new Error(
42
- `Cannot convert across categories: ${o.category} → ${n.category}`
42
+ `Cannot convert across categories: ${o.category} → ${a.category}`
43
43
  );
44
- return (c * o.factor + o.offset - n.offset) / n.factor;
44
+ return (r * o.factor + o.offset - a.offset) / a.factor;
45
45
  }
46
46
  const M = Y("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
47
47
  variants: {
@@ -51,64 +51,68 @@ const M = Y("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
51
51
  }), q = {
52
52
  weight: "--info",
53
53
  length: "--success",
54
- temperature: "--warning",
54
+ temperature: "--warning-readable",
55
55
  glucose: "--accent"
56
- }, J = A(
56
+ };
57
+ function J(r) {
58
+ return q[r];
59
+ }
60
+ const P = z(
57
61
  ({
58
- defaultCategory: c = "weight",
59
- onResultChange: r,
62
+ defaultCategory: r = "weight",
63
+ onResultChange: n,
60
64
  onInsert: f,
61
65
  insertVariant: o = "insert",
62
- onCopy: n,
66
+ onCopy: a,
63
67
  onError: b,
64
68
  insertBrand: E,
65
69
  id: F,
66
70
  width: U,
67
- className: O
68
- }, S) => {
69
- const { t, i18n: $ } = j(), [g, k] = v(c), [i, G] = v(null), [u, w] = v(
70
- h[c][0]
71
- ), [l, N] = v(
72
- h[c][1]
71
+ className: k
72
+ }, O) => {
73
+ const { t, i18n: $ } = j(), [m, S] = p(r), [c, G] = p(null), [u, w] = p(
74
+ h[r][0]
75
+ ), [l, N] = p(
76
+ h[r][1]
73
77
  ), V = (s) => {
74
- const I = s, y = h[I];
75
- k(I), w(y[0]), N(y[1] ?? y[0]);
76
- }, a = T(
77
- () => i === null ? null : K(i, u, l),
78
- [i, u, l]
79
- ), m = T(
78
+ const T = s, y = h[T];
79
+ S(T), w(y[0]), N(y[1] ?? y[0]);
80
+ }, i = I(
81
+ () => c === null ? null : K(c, u, l),
82
+ [c, u, l]
83
+ ), g = I(
80
84
  () => new Intl.NumberFormat($.language, { maximumFractionDigits: 3 }),
81
85
  [$.language]
82
86
  );
83
- H(() => {
84
- r == null || r(a);
85
- }, [a, r]);
86
- const z = D.map((s) => ({
87
+ A(() => {
88
+ n == null || n(i);
89
+ }, [i, n]);
90
+ const H = D.map((s) => ({
87
91
  value: s,
88
92
  label: t(`unitConverter.category.${s}`)
89
- })), x = h[g].map((s) => ({
93
+ })), x = h[m].map((s) => ({
90
94
  value: s,
91
95
  label: t(`unitConverter.units.${s}`)
92
96
  }));
93
97
  return /* @__PURE__ */ d(
94
98
  "div",
95
99
  {
96
- ref: S,
100
+ ref: O,
97
101
  "data-component": "unit-converter",
98
102
  "data-component-id": F,
99
- className: M({ width: U, className: O }),
103
+ className: M({ width: U, className: k }),
100
104
  children: [
101
- /* @__PURE__ */ e(p, { label: t("unitConverter.categoryLabel"), children: /* @__PURE__ */ e(
105
+ /* @__PURE__ */ e(v, { label: t("unitConverter.categoryLabel"), children: /* @__PURE__ */ e(
102
106
  C,
103
107
  {
104
- options: z,
105
- value: g,
108
+ options: H,
109
+ value: m,
106
110
  onValueChange: V
107
111
  }
108
112
  ) }),
109
113
  /* @__PURE__ */ d("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
110
- /* @__PURE__ */ e(p, { label: t("unitConverter.value"), children: /* @__PURE__ */ e(B, { mode: "decimal", value: i, onChange: G }) }),
111
- /* @__PURE__ */ e(p, { label: t("unitConverter.from"), children: /* @__PURE__ */ e(
114
+ /* @__PURE__ */ e(v, { label: t("unitConverter.value"), children: /* @__PURE__ */ e(B, { mode: "decimal", value: c, onChange: G }) }),
115
+ /* @__PURE__ */ e(v, { label: t("unitConverter.from"), children: /* @__PURE__ */ e(
112
116
  C,
113
117
  {
114
118
  options: x,
@@ -116,7 +120,7 @@ const M = Y("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
116
120
  onValueChange: w
117
121
  }
118
122
  ) }),
119
- /* @__PURE__ */ e(p, { label: t("unitConverter.to"), children: /* @__PURE__ */ e(
123
+ /* @__PURE__ */ e(v, { label: t("unitConverter.to"), children: /* @__PURE__ */ e(
120
124
  C,
121
125
  {
122
126
  options: x,
@@ -125,15 +129,15 @@ const M = Y("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
125
129
  }
126
130
  ) })
127
131
  ] }),
128
- /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: a !== null ? `${m.format(i ?? 0)} ${t(
132
+ /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: i !== null ? `${g.format(c ?? 0)} ${t(
129
133
  `unitConverter.units.${u}`
130
- )} = ${m.format(a)} ${t(
134
+ )} = ${g.format(i)} ${t(
131
135
  `unitConverter.units.${l}`
132
136
  )}` : "" }),
133
- a !== null ? /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
137
+ i !== null ? /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
134
138
  /* @__PURE__ */ e("span", { className: "type-label ds:text-muted-foreground", children: t("unitConverter.result") }),
135
139
  /* @__PURE__ */ d("span", { className: "type-metric ds:text-foreground", children: [
136
- m.format(a),
140
+ g.format(i),
137
141
  " ",
138
142
  t(`unitConverter.units.${l}`)
139
143
  ] }),
@@ -142,25 +146,32 @@ const M = Y("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
142
146
  {
143
147
  variant: o,
144
148
  onInsert: f,
145
- onCopy: n,
149
+ onCopy: a,
146
150
  onError: b,
147
151
  card: {
148
152
  title: t("insert.title.unitConverter"),
149
- highlight: t(`unitConverter.category.${g}`),
153
+ icon: "ruler",
154
+ highlight: t(`unitConverter.category.${m}`),
150
155
  // Chip tints by measurement family so the inserted card
151
- // signals the category at a glance.
152
- highlightToken: q[g],
156
+ // signals the category at a glance — with the contrast-safe
157
+ // orange override for the `--warning` temperature family.
158
+ highlightToken: J(m),
153
159
  brand: E,
154
160
  fields: [
155
161
  {
162
+ // Source measurement → ruler glyph (matches the header).
163
+ icon: "ruler",
156
164
  label: t("unitConverter.from"),
157
- value: `${m.format(i ?? 0)} ${t(
165
+ value: `${g.format(c ?? 0)} ${t(
158
166
  `unitConverter.units.${u}`
159
167
  )}`
160
168
  },
161
169
  {
170
+ // Converted result → trending-up (arrow) glyph signals the
171
+ // conversion direction to the output value.
172
+ icon: "trending-up",
162
173
  label: t("unitConverter.to"),
163
- value: `${m.format(a)} ${t(
174
+ value: `${g.format(i)} ${t(
164
175
  `unitConverter.units.${l}`
165
176
  )}`
166
177
  }
@@ -174,12 +185,12 @@ const M = Y("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
174
185
  );
175
186
  }
176
187
  );
177
- J.displayName = "UnitConverter";
188
+ P.displayName = "UnitConverter";
178
189
  export {
179
190
  D as C,
180
191
  _ as U,
181
192
  h as a,
182
- J as b,
193
+ P as b,
183
194
  K as c
184
195
  };
185
- //# sourceMappingURL=unit-converter-Ds9jalbN.js.map
196
+ //# sourceMappingURL=unit-converter-u3CwNDpP.js.map
@@ -2,7 +2,7 @@ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
2
  import { forwardRef as B } from "react";
3
3
  import { c as S } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as H } from "react-i18next";
5
- import { S as P } from "./spinner-CCByyvcb.js";
5
+ import { S as P } from "./spinner-OjQNn8oN.js";
6
6
  function V({ className: a }) {
7
7
  return /* @__PURE__ */ s(
8
8
  "svg",
@@ -247,4 +247,4 @@ R.displayName = "WalletPayButton";
247
247
  export {
248
248
  R as W
249
249
  };
250
- //# sourceMappingURL=wallet-pay-button-DK4ESYge.js.map
250
+ //# sourceMappingURL=wallet-pay-button-DuDPBlCO.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.44.0",
3
+ "packageVersion": "0.46.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",