@alfadocs/ui-kit 0.42.0 → 0.44.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 (94) hide show
  1. package/dist/_chunks/{ar-Cn_NxqkN.js → ar-DEz65ZJW.js} +2 -2
  2. package/dist/_chunks/bmi-calculator-DFPWL2OJ.js +273 -0
  3. package/dist/_chunks/{booking-4mCw3Mpl.js → booking-CtLwaxkK.js} +4 -4
  4. package/dist/_chunks/{calculator-dialog-B74fqpFZ.js → calculator-dialog-D-nfvteH.js} +2 -2
  5. package/dist/_chunks/{chart-Cbt0_sKv.js → chart-Cg3e9EH9.js} +101 -99
  6. package/dist/_chunks/{cycle-calculator-DsZbyzX6.js → cycle-calculator-ChHBcjet.js} +65 -56
  7. package/dist/_chunks/{date-picker-CvQfs6Xh.js → date-picker-Bq7xhMA-.js} +109 -108
  8. package/dist/_chunks/date-picker-variants-DLi1Va_e.js +3238 -0
  9. package/dist/_chunks/{date-range-picker-U9fn1g9d.js → date-range-picker-DcXuI9y7.js} +20 -19
  10. package/dist/_chunks/{date-time-picker-Cva0ZCWw.js → date-time-picker-RimumeLR.js} +18 -17
  11. package/dist/_chunks/{de-BMM2H7Bs.js → de-bTBGdjPS.js} +2 -2
  12. package/dist/_chunks/dialog-BTpZV6It.js +223 -0
  13. package/dist/_chunks/{due-date-calculator-s_CBgaFs.js → due-date-calculator-CYXKLoof.js} +65 -45
  14. package/dist/_chunks/{editable-currency-cell-renderer-BhUkRiPZ.js → editable-currency-cell-renderer-9jqwDv5x.js} +2 -2
  15. package/dist/_chunks/{el-BYPonAaK.js → el-BWG5RXxa.js} +6 -6
  16. package/dist/_chunks/{es-CMkVCQ4F.js → es-DfO_G435.js} +2 -2
  17. package/dist/_chunks/{fr-BcuWxqft.js → fr-BTn24bs8.js} +2 -2
  18. package/dist/_chunks/{gestation-BXEgDGmP.js → gestation-mWF4AXea.js} +3 -3
  19. package/dist/_chunks/gestational-age-calculator-sRmoqgVr.js +190 -0
  20. package/dist/_chunks/{header-CTZWX-tm.js → header-Ce1Br27u.js} +70 -75
  21. package/dist/_chunks/{hi-wkq_rQAh.js → hi-Dj3oYd84.js} +2 -2
  22. package/dist/_chunks/insert-result-CoC1oo6R.js +334 -0
  23. package/dist/_chunks/{isSameWeek-Bim5ftRd.js → isSameWeek-HfxKk6Lz.js} +2 -2
  24. package/dist/_chunks/{it-GiQrQ9p4.js → it-Y85ofIQQ.js} +7 -7
  25. package/dist/_chunks/{ja-qfYg3Rua.js → ja-CQ7J6YoA.js} +2 -2
  26. package/dist/_chunks/{marketplace-app-shell-kVAVycz_.js → marketplace-app-shell-Dc5cTIt8.js} +186 -149
  27. package/dist/_chunks/{nl-xOogO4sZ.js → nl-D9kHCmp3.js} +2 -2
  28. package/dist/_chunks/{patient-shell-lDX3wwu6.js → patient-shell-CnT4L8gn.js} +2 -2
  29. package/dist/_chunks/{pl-GnOW6eGK.js → pl-B3Smqpkr.js} +3 -3
  30. package/dist/_chunks/{pregnancy-weight-gain-B7kBK-ZR.js → pregnancy-weight-gain-C5YhfYnL.js} +60 -50
  31. package/dist/_chunks/{pt-_bV5b5RW.js → pt-D3J-1c_7.js} +6 -6
  32. package/dist/_chunks/{ro-BEcyh5Nj.js → ro-BKAbbEA3.js} +2 -2
  33. package/dist/_chunks/{ru-Bi86hqMf.js → ru-BeG8f0Ep.js} +3 -3
  34. package/dist/_chunks/{sign-document-QHfcNKFj.js → sign-document-B-3k_0LO.js} +165 -137
  35. package/dist/_chunks/{sq-BujHSAWu.js → sq-_hRPaeUy.js} +6 -6
  36. package/dist/_chunks/subDays-Dv7q9S7u.js +8 -0
  37. package/dist/_chunks/{sv-C8AeDrTA.js → sv-g009fSpe.js} +2 -2
  38. package/dist/_chunks/{tab-bar-C4II-7ej.js → tab-bar-Xetknddo.js} +53 -34
  39. package/dist/_chunks/{tr-CMSs_Vgf.js → tr-OKUOuhMW.js} +2 -2
  40. package/dist/_chunks/{unit-converter-D1UrEUxa.js → unit-converter-Ds9jalbN.js} +78 -67
  41. package/dist/_chunks/{zh-CN-eXB-PFu4.js → zh-CN-De4zwEhx.js} +3 -3
  42. package/dist/agent-catalog.json +1 -1
  43. package/dist/components/_shared/calendar-class-names.d.ts +8 -0
  44. package/dist/components/_shared/index.d.ts +2 -0
  45. package/dist/components/_shared/insert-result.d.ts +149 -4
  46. package/dist/components/badge/badge.d.ts +1 -1
  47. package/dist/components/bmi-calculator/bmi-calculator.d.ts +6 -0
  48. package/dist/components/bmi-calculator/index.js +1 -1
  49. package/dist/components/booking/index.js +1 -1
  50. package/dist/components/calculator-dialog/index.js +1 -1
  51. package/dist/components/card/card.d.ts +1 -1
  52. package/dist/components/chart/chart.d.ts +10 -0
  53. package/dist/components/chart/index.js +1 -1
  54. package/dist/components/cycle-calculator/cycle-calculator.d.ts +6 -0
  55. package/dist/components/cycle-calculator/index.js +1 -1
  56. package/dist/components/data-table/index.js +1 -1
  57. package/dist/components/date-picker/date-picker.d.ts +0 -1
  58. package/dist/components/date-picker/index.js +1 -1
  59. package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
  60. package/dist/components/date-range-picker/index.js +1 -1
  61. package/dist/components/date-time-picker/date-time-picker.d.ts +0 -1
  62. package/dist/components/date-time-picker/index.js +1 -1
  63. package/dist/components/dialog/dialog.d.ts +1 -0
  64. package/dist/components/dialog/index.js +1 -1
  65. package/dist/components/due-date-calculator/due-date-calculator.d.ts +6 -0
  66. package/dist/components/due-date-calculator/index.js +2 -2
  67. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +6 -0
  68. package/dist/components/gestational-age-calculator/index.js +1 -1
  69. package/dist/components/header/header.d.ts +8 -0
  70. package/dist/components/header/index.js +1 -1
  71. package/dist/components/index.d.ts +1 -1
  72. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  73. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +6 -0
  74. package/dist/components/public-header/public-header.d.ts +1 -1
  75. package/dist/components/sign-document/index.js +1 -1
  76. package/dist/components/sign-document/sign-document.d.ts +12 -0
  77. package/dist/components/stat/stat.d.ts +1 -1
  78. package/dist/components/tab-bar/index.d.ts +1 -1
  79. package/dist/components/tab-bar/index.js +1 -1
  80. package/dist/components/tab-bar/tab-bar.d.ts +44 -1
  81. package/dist/components/unit-converter/index.js +1 -1
  82. package/dist/components/unit-converter/unit-converter.d.ts +6 -0
  83. package/dist/index.js +504 -502
  84. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  85. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +57 -1
  86. package/dist/patterns/patient-shell/index.js +1 -1
  87. package/dist/tokens.css +1411 -2
  88. package/package.json +1 -1
  89. package/dist/_chunks/bmi-calculator-D4juUcyF.js +0 -219
  90. package/dist/_chunks/dialog-Cee13rHU.js +0 -215
  91. package/dist/_chunks/gestational-age-calculator-CWOG3bkI.js +0 -178
  92. package/dist/_chunks/insert-result-DtQQeSSf.js +0 -227
  93. package/dist/_chunks/react-day-picker-CdtIiKjx.js +0 -3174
  94. package/dist/_chunks/subDays-_T9YeKPX.js +0 -8
@@ -1,24 +1,25 @@
1
1
  import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as I, useState as f, useMemo as $, useEffect as A } from "react";
3
- import { c as F } from "./index-D2ZczOXr.js";
4
- import { useTranslation as _ } from "react-i18next";
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";
5
5
  import { F as y } from "./form-field-BOm9hK35.js";
6
6
  import { N as x } from "./number-input-Dj5L3pXK.js";
7
- import { B as R } from "./badge-zsf5i5bH.js";
8
- import { I as k } from "./insert-result-DtQQeSSf.js";
9
- import { b as M, e as C } from "./bmi-BxD-tFzU.js";
10
- const j = {
7
+ import { C as $ } from "./card-DPmk26CL.js";
8
+ import { B as C } from "./badge-zsf5i5bH.js";
9
+ import { I as H } from "./insert-result-CoC1oo6R.js";
10
+ import { b as M, e as j } from "./bmi-BxD-tFzU.js";
11
+ const L = {
11
12
  underweight: { min: 12.5, max: 18 },
12
13
  normal: { min: 11.5, max: 16 },
13
14
  overweight: { min: 7, max: 11.5 },
14
15
  obese: { min: 5, max: 9 }
15
- }, z = {
16
+ }, O = {
16
17
  underweight: { min: 0.44, max: 0.58 },
17
18
  normal: { min: 0.35, max: 0.5 },
18
19
  overweight: { min: 0.23, max: 0.33 },
19
20
  obese: { min: 0.17, max: 0.27 }
20
21
  }, G = { min: 0.5, max: 2 }, v = 13;
21
- function H(t, i) {
22
+ function U(t, i) {
22
23
  if (i <= 0) return { min: 0, max: 0 };
23
24
  if (i <= v) {
24
25
  const c = i / v;
@@ -27,62 +28,67 @@ function H(t, i) {
27
28
  max: G.max * c
28
29
  };
29
30
  }
30
- const l = Math.min(i, 40) - v, r = z[t];
31
+ const l = Math.min(i, 40) - v, r = O[t];
31
32
  return {
32
33
  min: G.min + r.min * l,
33
34
  max: G.max + r.max * l
34
35
  };
35
36
  }
36
- function L(t) {
37
- const i = M(t.prePregnancyBmi), l = j[i], r = H(
37
+ function z(t) {
38
+ const i = M(t.prePregnancyBmi), l = L[i], r = U(
38
39
  i,
39
40
  t.gestationalWeeks
40
41
  ), c = t.currentWeightKg - t.prePregnancyWeightKg, W = c < r.min ? "below" : c > r.max ? "above" : "within";
41
42
  return { category: i, totalRange: l, recommendedToDate: r, actualGainKg: c, status: W };
42
43
  }
43
- const O = F("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
44
+ const V = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
44
45
  variants: {
45
46
  width: { full: "ds:w-full", auto: "ds:inline-flex" }
46
47
  },
47
48
  defaultVariants: { width: "full" }
48
- }), U = {
49
+ }), q = {
49
50
  below: "warning",
50
51
  within: "success",
51
52
  above: "warning"
52
- }, V = I(
53
+ }, J = {
54
+ below: "--warning",
55
+ within: "--success",
56
+ above: "--warning"
57
+ }, Q = A(
53
58
  ({
54
59
  onResultChange: t,
55
60
  onInsert: i,
56
61
  insertVariant: l = "insert",
57
62
  onCopy: r,
58
63
  onError: c,
59
- id: W,
60
- width: w,
61
- className: K
62
- }, P) => {
63
- const { t: e, i18n: N } = _(), [b, D] = f(null), [o, B] = f(null), [g, S] = f(null), [u, E] = f(null), p = C(o, b), n = $(() => p === null || o === null || g === null || u === null ? null : L({
64
+ insertBrand: W,
65
+ id: K,
66
+ width: P,
67
+ className: S
68
+ }, 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({
64
70
  prePregnancyBmi: p,
65
- prePregnancyWeightKg: o,
71
+ prePregnancyWeightKg: m,
66
72
  currentWeightKg: g,
67
73
  gestationalWeeks: u
68
- }), [p, o, g, u]), d = $(
69
- () => new Intl.NumberFormat(N.language, {
74
+ }), [p, m, g, u]), d = w(
75
+ () => new Intl.NumberFormat(b.language, {
70
76
  minimumFractionDigits: 1,
71
77
  maximumFractionDigits: 1
72
78
  }),
73
- [N.language]
79
+ [b.language]
74
80
  );
75
- A(() => {
81
+ F(() => {
76
82
  t == null || t(n);
77
83
  }, [n, t]);
78
- const m = e("pregnancyWeightGain.units.kg"), h = (T) => `${d.format(T.min)} – ${d.format(T.max)} ${m}`;
84
+ const o = e("pregnancyWeightGain.units.kg"), h = (T) => `${d.format(T.min)} – ${d.format(T.max)} ${o}`;
79
85
  return /* @__PURE__ */ s(
80
86
  "div",
81
87
  {
82
- ref: P,
88
+ ref: B,
83
89
  "data-component": "pregnancy-weight-gain",
84
- "data-component-id": W,
85
- className: O({ width: w, className: K }),
90
+ "data-component-id": K,
91
+ className: V({ width: P, className: S }),
86
92
  children: [
87
93
  /* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
88
94
  /* @__PURE__ */ a(
@@ -95,7 +101,7 @@ const O = F("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
95
101
  mode: "decimal",
96
102
  min: 0,
97
103
  step: 0.5,
98
- value: b,
104
+ value: N,
99
105
  onChange: D
100
106
  }
101
107
  )
@@ -104,15 +110,15 @@ const O = F("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
104
110
  /* @__PURE__ */ a(
105
111
  y,
106
112
  {
107
- label: `${e("pregnancyWeightGain.prePregnancyWeight")} (${m})`,
113
+ label: `${e("pregnancyWeightGain.prePregnancyWeight")} (${o})`,
108
114
  children: /* @__PURE__ */ a(
109
115
  x,
110
116
  {
111
117
  mode: "decimal",
112
118
  min: 0,
113
119
  step: 0.1,
114
- value: o,
115
- onChange: B
120
+ value: m,
121
+ onChange: I
116
122
  }
117
123
  )
118
124
  }
@@ -120,7 +126,7 @@ const O = F("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
120
126
  /* @__PURE__ */ a(
121
127
  y,
122
128
  {
123
- label: `${e("pregnancyWeightGain.currentWeight")} (${m})`,
129
+ label: `${e("pregnancyWeightGain.currentWeight")} (${o})`,
124
130
  children: /* @__PURE__ */ a(
125
131
  x,
126
132
  {
@@ -128,7 +134,7 @@ const O = F("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
128
134
  min: 0,
129
135
  step: 0.1,
130
136
  value: g,
131
- onChange: S
137
+ onChange: E
132
138
  }
133
139
  )
134
140
  }
@@ -140,14 +146,14 @@ const O = F("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
140
146
  min: 0,
141
147
  max: 42,
142
148
  value: u,
143
- onChange: E
149
+ onChange: _
144
150
  }
145
151
  ) })
146
152
  ] }),
147
153
  /* @__PURE__ */ a("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: n ? `${e("pregnancyWeightGain.actualGain")}: ${d.format(
148
154
  n.actualGainKg
149
- )} ${m}. ${e(`pregnancyWeightGain.status.${n.status}`)}.` : "" }),
150
- n ? /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
155
+ )} ${o}. ${e(`pregnancyWeightGain.status.${n.status}`)}.` : "" }),
156
+ n ? /* @__PURE__ */ a($, { variant: "elevated", children: /* @__PURE__ */ s($.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
151
157
  /* @__PURE__ */ s("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
152
158
  /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
153
159
  /* @__PURE__ */ a("dt", { className: "type-label ds:text-muted-foreground", children: e("pregnancyWeightGain.prePregnancyBmi") }),
@@ -164,9 +170,9 @@ const O = F("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
164
170
  /* @__PURE__ */ s("span", { className: "type-metric ds:text-foreground", children: [
165
171
  d.format(n.actualGainKg),
166
172
  " ",
167
- m
173
+ o
168
174
  ] }),
169
- /* @__PURE__ */ a(R, { variant: U[n.status], size: "lg", children: e(`pregnancyWeightGain.status.${n.status}`) })
175
+ /* @__PURE__ */ a(C, { variant: q[n.status], size: "lg", children: e(`pregnancyWeightGain.status.${n.status}`) })
170
176
  ] })
171
177
  ] }),
172
178
  /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
@@ -180,7 +186,7 @@ const O = F("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
180
186
  ] }),
181
187
  /* @__PURE__ */ a("p", { className: "type-body-sm ds:text-muted-foreground", children: e("pregnancyWeightGain.disclaimer") }),
182
188
  l === "copy" || i ? /* @__PURE__ */ a(
183
- k,
189
+ H,
184
190
  {
185
191
  onInsert: i,
186
192
  variant: l,
@@ -189,10 +195,14 @@ const O = F("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
189
195
  card: {
190
196
  title: e("insert.title.weightGain"),
191
197
  highlight: e(`pregnancyWeightGain.status.${n.status}`),
198
+ // Chip shares the gain-status semantic token so the
199
+ // inserted PNG chip matches the on-screen status badge.
200
+ highlightToken: J[n.status],
201
+ brand: W,
192
202
  fields: [
193
203
  {
194
204
  label: e("pregnancyWeightGain.actualGain"),
195
- value: `${d.format(n.actualGainKg)} ${m}`
205
+ value: `${d.format(n.actualGainKg)} ${o}`
196
206
  },
197
207
  {
198
208
  label: e("pregnancyWeightGain.recommendedToDate"),
@@ -206,18 +216,18 @@ const O = F("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
206
216
  }
207
217
  }
208
218
  ) : null
209
- ] }) : /* @__PURE__ */ a("p", { className: "type-body ds:text-muted-foreground", children: e("pregnancyWeightGain.empty") })
219
+ ] }) }) : /* @__PURE__ */ a("p", { className: "type-body ds:text-muted-foreground", children: e("pregnancyWeightGain.empty") })
210
220
  ]
211
221
  }
212
222
  );
213
223
  }
214
224
  );
215
- V.displayName = "PregnancyWeightGain";
225
+ Q.displayName = "PregnancyWeightGain";
216
226
  export {
217
- V as P,
218
- z as R,
219
- j as T,
220
- L as a,
221
- H as r
227
+ Q as P,
228
+ O as R,
229
+ L as T,
230
+ z as a,
231
+ U as r
222
232
  };
223
- //# sourceMappingURL=pregnancy-weight-gain-B7kBK-ZR.js.map
233
+ //# sourceMappingURL=pregnancy-weight-gain-C5YhfYnL.js.map
@@ -1,4 +1,4 @@
1
- import { o as s, q as i, r, v as d } from "./react-day-picker-CdtIiKjx.js";
1
+ import { q as s, r as i, v as r, w as d } from "./date-picker-variants-DLi1Va_e.js";
2
2
  const m = {
3
3
  lessThanXSeconds: {
4
4
  one: "menos de um segundo",
@@ -144,7 +144,7 @@ const m = {
144
144
  "novembro",
145
145
  "dezembro"
146
146
  ]
147
- }, v = {
147
+ }, w = {
148
148
  narrow: ["d", "s", "t", "q", "q", "s", "s"],
149
149
  short: ["dom", "seg", "ter", "qua", "qui", "sex", "sáb"],
150
150
  abbreviated: ["dom", "seg", "ter", "qua", "qui", "sex", "sáb"],
@@ -157,7 +157,7 @@ const m = {
157
157
  "sexta-feira",
158
158
  "sábado"
159
159
  ]
160
- }, w = {
160
+ }, v = {
161
161
  narrow: {
162
162
  am: "AM",
163
163
  pm: "PM",
@@ -235,11 +235,11 @@ const m = {
235
235
  defaultWidth: "wide"
236
236
  }),
237
237
  day: i({
238
- values: v,
238
+ values: w,
239
239
  defaultWidth: "wide"
240
240
  }),
241
241
  dayPeriod: i({
242
- values: w,
242
+ values: v,
243
243
  defaultWidth: "wide",
244
244
  formattingValues: y,
245
245
  defaultFormattingWidth: "wide"
@@ -367,4 +367,4 @@ const m = {
367
367
  export {
368
368
  N as pt
369
369
  };
370
- //# sourceMappingURL=pt-_bV5b5RW.js.map
370
+ //# sourceMappingURL=pt-D3J-1c_7.js.map
@@ -1,4 +1,4 @@
1
- import { o as m, q as t, r as n, v as s } from "./react-day-picker-CdtIiKjx.js";
1
+ import { q as m, r as t, v as n, w as s } from "./date-picker-variants-DLi1Va_e.js";
2
2
  const d = {
3
3
  lessThanXSeconds: {
4
4
  one: "mai puțin de o secundă",
@@ -358,4 +358,4 @@ const d = {
358
358
  export {
359
359
  N as ro
360
360
  };
361
- //# sourceMappingURL=ro-BEcyh5Nj.js.map
361
+ //# sourceMappingURL=ro-BKAbbEA3.js.map
@@ -1,5 +1,5 @@
1
- import { o as s, q as u, r as o, v as g } from "./react-day-picker-CdtIiKjx.js";
2
- import { i as d } from "./isSameWeek-Bim5ftRd.js";
1
+ import { q as s, r as u, v as o, w as g } from "./date-picker-variants-DLi1Va_e.js";
2
+ import { i as d } from "./isSameWeek-HfxKk6Lz.js";
3
3
  function l(e, t) {
4
4
  if (e.one !== void 0 && t === 1)
5
5
  return e.one;
@@ -558,4 +558,4 @@ const P = {
558
558
  export {
559
559
  B as ru
560
560
  };
561
- //# sourceMappingURL=ru-Bi86hqMf.js.map
561
+ //# sourceMappingURL=ru-BeG8f0Ep.js.map