@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,4 +1,4 @@
1
- import { o as s, q as r, r as i, v as d } from "./react-day-picker-CdtIiKjx.js";
1
+ import { q as s, r, v as i, w as d } from "./date-picker-variants-DLi1Va_e.js";
2
2
  const h = {
3
3
  lessThanXSeconds: {
4
4
  one: "أقل من ثانية",
@@ -396,4 +396,4 @@ const h = {
396
396
  export {
397
397
  z as ar
398
398
  };
399
- //# sourceMappingURL=ar-Cn_NxqkN.js.map
399
+ //# sourceMappingURL=ar-DEz65ZJW.js.map
@@ -0,0 +1,273 @@
1
+ import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as ee, useId as te, useState as c, useMemo as ae, useEffect as A } from "react";
3
+ import { c as M } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as le } from "react-i18next";
5
+ import { R as G } from "./radio-TWf9Q-mp.js";
6
+ import { R as ie } from "./radio-group-CLjK-SlK.js";
7
+ import { F as k } from "./form-field-BOm9hK35.js";
8
+ import { N as C } from "./number-input-Dj5L3pXK.js";
9
+ import { C as oe } from "./chart-Cg3e9EH9.js";
10
+ import { C as L } from "./card-DPmk26CL.js";
11
+ import { B as re } from "./badge-zsf5i5bH.js";
12
+ import { I as ne } from "./insert-result-CoC1oo6R.js";
13
+ import { a as S, b as se, e as ce, c as me, f as H, l as V, k as ue } from "./bmi-BxD-tFzU.js";
14
+ const de = M("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
15
+ variants: {
16
+ width: {
17
+ full: "ds:w-full",
18
+ auto: "ds:inline-flex"
19
+ }
20
+ },
21
+ defaultVariants: { width: "full" }
22
+ }), ge = {
23
+ underweight: "info",
24
+ normal: "success",
25
+ overweight: "warning",
26
+ obese: "error"
27
+ }, O = M("", {
28
+ variants: {
29
+ category: {
30
+ underweight: "--info",
31
+ normal: "--success",
32
+ overweight: "--warning",
33
+ obese: "--destructive"
34
+ }
35
+ }
36
+ }), W = "--color-orange-600";
37
+ function be(i) {
38
+ if (typeof document > "u") return;
39
+ const o = document.documentElement, r = getComputedStyle(o), n = i === "overweight" && o.classList.contains("theme-light") && !o.classList.contains("theme-accessible") ? W : O({ category: i });
40
+ return r.getPropertyValue(n).trim() || void 0;
41
+ }
42
+ function K(i) {
43
+ return typeof document < "u" && i === "overweight" && document.documentElement.classList.contains("theme-light") && !document.documentElement.classList.contains("theme-accessible") ? W : O({ category: i });
44
+ }
45
+ function he(i) {
46
+ const [o, r] = c(void 0);
47
+ return A(() => {
48
+ if (i === null) {
49
+ r(void 0);
50
+ return;
51
+ }
52
+ const n = () => r(be(i));
53
+ if (n(), typeof document > "u") return;
54
+ const f = new MutationObserver(n);
55
+ return f.observe(document.documentElement, {
56
+ attributes: !0,
57
+ attributeFilter: ["class"]
58
+ }), () => f.disconnect();
59
+ }, [i]), o;
60
+ }
61
+ const y = (i) => Math.round(i * 10) / 10, fe = ee(
62
+ ({
63
+ defaultUnitSystem: i = "metric",
64
+ onResultChange: o,
65
+ onInsert: r,
66
+ insertVariant: n = "insert",
67
+ onCopy: f,
68
+ onError: D,
69
+ insertBrand: _,
70
+ id: j,
71
+ width: z,
72
+ className: P
73
+ }, R) => {
74
+ const { t: e, i18n: w } = le(), N = te(), [m, U] = c(i), [p, T] = c(null), [v, F] = c(null), [u, $] = c(null), [d, I] = c(null), [g, B] = c(null), Y = (Q) => {
75
+ const x = Q;
76
+ if (x !== m) {
77
+ if (x === "imperial") {
78
+ if (p !== null) {
79
+ const { ft: X, in: Z } = me(p);
80
+ $(X), I(y(Z));
81
+ }
82
+ v !== null && B(y(ue(v)));
83
+ } else
84
+ (u !== null || d !== null) && T(y(H(u ?? 0, d ?? 0))), g !== null && F(y(V(g)));
85
+ U(x);
86
+ }
87
+ }, q = m === "metric" ? p : u !== null || d !== null ? H(u ?? 0, d ?? 0) : null, J = m === "metric" ? v : g !== null ? V(g) : null, l = ce(J, q), a = l !== null ? se(l) : null, E = he(a), b = ae(
88
+ () => new Intl.NumberFormat(w.language, {
89
+ minimumFractionDigits: 1,
90
+ maximumFractionDigits: 1
91
+ }),
92
+ [w.language]
93
+ );
94
+ A(() => {
95
+ o == null || o(
96
+ l !== null && a !== null ? { bmi: l, category: a } : null
97
+ );
98
+ }, [l, a, o]);
99
+ const h = m === "metric";
100
+ return /* @__PURE__ */ s(
101
+ "div",
102
+ {
103
+ ref: R,
104
+ "data-component": "bmi-calculator",
105
+ "data-component-id": j,
106
+ className: de({ width: z, className: P }),
107
+ children: [
108
+ /* @__PURE__ */ s(
109
+ ie,
110
+ {
111
+ label: e("bmiCalculator.unitSystem.label"),
112
+ variant: "horizontal",
113
+ value: m,
114
+ onValueChange: Y,
115
+ children: [
116
+ /* @__PURE__ */ t(G, { label: e("bmiCalculator.unitSystem.metric"), value: "metric" }),
117
+ /* @__PURE__ */ t(
118
+ G,
119
+ {
120
+ label: e("bmiCalculator.unitSystem.imperial"),
121
+ value: "imperial"
122
+ }
123
+ )
124
+ ]
125
+ }
126
+ ),
127
+ /* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
128
+ h ? /* @__PURE__ */ t(
129
+ k,
130
+ {
131
+ label: `${e("bmiCalculator.height")} (${e("bmiCalculator.units.cm")})`,
132
+ children: /* @__PURE__ */ t(
133
+ C,
134
+ {
135
+ mode: "decimal",
136
+ min: 0,
137
+ step: 0.5,
138
+ value: p,
139
+ onChange: T
140
+ }
141
+ )
142
+ }
143
+ ) : /* @__PURE__ */ s("div", { role: "group", "aria-labelledby": N, children: [
144
+ /* @__PURE__ */ t(
145
+ "span",
146
+ {
147
+ id: N,
148
+ className: "type-label ds:mb-[var(--spacing-xs)] ds:block ds:text-foreground",
149
+ children: e("bmiCalculator.height")
150
+ }
151
+ ),
152
+ /* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
153
+ /* @__PURE__ */ t(
154
+ C,
155
+ {
156
+ mode: "integer",
157
+ min: 0,
158
+ value: u,
159
+ onChange: $,
160
+ "aria-label": e("bmiCalculator.feet")
161
+ }
162
+ ),
163
+ /* @__PURE__ */ t("span", { className: "type-label ds:text-muted-foreground", children: e("bmiCalculator.units.ft") }),
164
+ /* @__PURE__ */ t(
165
+ C,
166
+ {
167
+ mode: "decimal",
168
+ min: 0,
169
+ max: 11.9,
170
+ step: 0.5,
171
+ value: d,
172
+ onChange: I,
173
+ "aria-label": e("bmiCalculator.inches")
174
+ }
175
+ ),
176
+ /* @__PURE__ */ t("span", { className: "type-label ds:text-muted-foreground", children: e("bmiCalculator.units.in") })
177
+ ] })
178
+ ] }),
179
+ /* @__PURE__ */ t(
180
+ k,
181
+ {
182
+ label: `${e("bmiCalculator.weight")} (${e(
183
+ h ? "bmiCalculator.units.kg" : "bmiCalculator.units.lb"
184
+ )})`,
185
+ children: /* @__PURE__ */ t(
186
+ C,
187
+ {
188
+ mode: "decimal",
189
+ min: 0,
190
+ step: h ? 0.1 : 0.5,
191
+ value: h ? v : g,
192
+ onChange: h ? F : B
193
+ }
194
+ )
195
+ }
196
+ )
197
+ ] }),
198
+ /* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: l !== null && a !== null ? e("bmiCalculator.gaugeAria", {
199
+ bmi: b.format(l),
200
+ category: e(`bmiCalculator.category.${a}`)
201
+ }) : "" }),
202
+ l !== null && a !== null ? /* @__PURE__ */ t(L, { variant: "elevated", children: /* @__PURE__ */ s(L.Body, { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-md)]", children: [
203
+ /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
204
+ /* @__PURE__ */ t("span", { className: "type-label ds:text-muted-foreground", children: e("bmiCalculator.category.label") }),
205
+ /* @__PURE__ */ t(re, { variant: ge[a], size: "lg", children: e(`bmiCalculator.category.${a}`) }),
206
+ /* @__PURE__ */ t("p", { className: "type-body ds:text-muted-foreground", children: e(`bmiCalculator.range.${a}`) })
207
+ ] }),
208
+ /* @__PURE__ */ t(
209
+ "div",
210
+ {
211
+ "data-bmi-category": a,
212
+ className: "ds:w-[240px] ds:max-w-full",
213
+ children: /* @__PURE__ */ t(
214
+ oe,
215
+ {
216
+ type: "radialBar",
217
+ title: e("bmiCalculator.gaugeAria", {
218
+ bmi: b.format(l),
219
+ category: e(`bmiCalculator.category.${a}`)
220
+ }),
221
+ series: [S(l)],
222
+ labels: [e(`bmiCalculator.category.${a}`)],
223
+ colors: E ? [E] : void 0,
224
+ radialValueFormatter: () => b.format(l),
225
+ height: 240
226
+ }
227
+ )
228
+ }
229
+ ),
230
+ n === "copy" || r ? /* @__PURE__ */ t(
231
+ ne,
232
+ {
233
+ onInsert: r,
234
+ variant: n,
235
+ onCopy: f,
236
+ onError: D,
237
+ card: {
238
+ title: e("insert.title.bmi"),
239
+ highlight: e(`bmiCalculator.category.${a}`),
240
+ // Chip + gauge arc share the WHO-category semantic token so
241
+ // the inserted PNG matches the on-screen gauge.
242
+ highlightToken: K(a),
243
+ brand: _,
244
+ gauge: {
245
+ value: b.format(l),
246
+ fraction: S(l) / 100,
247
+ colorToken: K(a),
248
+ label: e(`bmiCalculator.category.${a}`)
249
+ },
250
+ fields: [
251
+ {
252
+ label: e("insert.title.bmi"),
253
+ value: b.format(l)
254
+ },
255
+ {
256
+ label: e("bmiCalculator.category.label"),
257
+ value: e(`bmiCalculator.category.${a}`)
258
+ }
259
+ ]
260
+ }
261
+ }
262
+ ) : null
263
+ ] }) }) : /* @__PURE__ */ t("p", { className: "type-body ds:text-muted-foreground", children: e("bmiCalculator.empty") })
264
+ ]
265
+ }
266
+ );
267
+ }
268
+ );
269
+ fe.displayName = "BmiCalculator";
270
+ export {
271
+ fe as B
272
+ };
273
+ //# sourceMappingURL=bmi-calculator-DFPWL2OJ.js.map
@@ -7,7 +7,7 @@ import { A as z } from "./alert-ywPR59NE.js";
7
7
  import { B as ie } from "./button-DD_0Xdmr.js";
8
8
  import { C as Ke } from "./checkbox-DRcOdmXv.js";
9
9
  import { C as Bt } from "./checkbox-group-CpUwlHug.js";
10
- import { D as Et } from "./date-picker-CvQfs6Xh.js";
10
+ import { D as Et } from "./date-picker-Bq7xhMA-.js";
11
11
  import { E as Vt } from "./email-input-lQivsFrw.js";
12
12
  import { F as Z } from "./form-field-BOm9hK35.js";
13
13
  import { P as Lt } from "./phone-input-DfZbPPvh.js";
@@ -24,8 +24,8 @@ import { S as $t } from "./stepper-accordion-Dki6r9ZE.js";
24
24
  import { S as zt } from "./stepper-progress-DDjq5nei.js";
25
25
  import { p as F, S as Kt } from "./slot-grid-BlHHP9Qy.js";
26
26
  import { s as le, i as at } from "./isSameDay-DUEiAT0G.js";
27
- import { w as lt, i as ce, a as je, n as jt, h as ye, f as qt, j as _e, x as Me } from "./react-day-picker-CdtIiKjx.js";
28
- import { s as Ht } from "./subDays-_T9YeKPX.js";
27
+ import { x as lt, i as ce, a as je, o as jt, h as ye, f as qt, j as _e, y as Me } from "./date-picker-variants-DLi1Va_e.js";
28
+ import { s as Ht } from "./subDays-Dv7q9S7u.js";
29
29
  import { C as Gt } from "./chevron-left-CX1jqD2M.js";
30
30
  import { C as Ut } from "./chevron-right-BrpYejk0.js";
31
31
  import { c as V } from "./createLucideIcon-CrFbzy84.js";
@@ -2697,4 +2697,4 @@ export {
2697
2697
  X as O,
2698
2698
  Da as b
2699
2699
  };
2700
- //# sourceMappingURL=booking-4mCw3Mpl.js.map
2700
+ //# sourceMappingURL=booking-CtLwaxkK.js.map
@@ -1,6 +1,6 @@
1
1
  import { jsxs as a, jsx as l } from "react/jsx-runtime";
2
2
  import { forwardRef as p } from "react";
3
- import { D as r } from "./dialog-Cee13rHU.js";
3
+ import { D as r } from "./dialog-BTpZV6It.js";
4
4
  const u = p(
5
5
  ({
6
6
  trigger: i,
@@ -37,4 +37,4 @@ u.displayName = "CalculatorDialog";
37
37
  export {
38
38
  u as C
39
39
  };
40
- //# sourceMappingURL=calculator-dialog-B74fqpFZ.js.map
40
+ //# sourceMappingURL=calculator-dialog-D-nfvteH.js.map