@alfadocs/ui-kit 0.42.0 → 0.43.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 (84) hide show
  1. package/dist/_chunks/{ar-Cn_NxqkN.js → ar-DEz65ZJW.js} +2 -2
  2. package/dist/_chunks/bmi-calculator-DuVSFDuw.js +259 -0
  3. package/dist/_chunks/{booking-4mCw3Mpl.js → booking-CtLwaxkK.js} +4 -4
  4. package/dist/_chunks/{calculator-dialog-B74fqpFZ.js → calculator-dialog-DdexHrTP.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-Dln-y1k_.js} +43 -42
  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-Cee13rHU.js → dialog-DOYgd75U.js} +46 -37
  13. package/dist/_chunks/{due-date-calculator-s_CBgaFs.js → due-date-calculator-Cc4dRqTI.js} +46 -38
  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-CWOG3bkI.js → gestational-age-calculator-ZMSrzkRW.js} +42 -41
  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-DtQQeSSf.js → insert-result-DisOY2G-.js} +91 -75
  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-zZL5Ir2-.js} +49 -48
  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-CuXCXJhK.js} +2 -2
  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 +57 -2
  46. package/dist/components/badge/badge.d.ts +1 -1
  47. package/dist/components/bmi-calculator/index.js +1 -1
  48. package/dist/components/booking/index.js +1 -1
  49. package/dist/components/calculator-dialog/index.js +1 -1
  50. package/dist/components/card/card.d.ts +1 -1
  51. package/dist/components/chart/chart.d.ts +10 -0
  52. package/dist/components/chart/index.js +1 -1
  53. package/dist/components/cycle-calculator/index.js +1 -1
  54. package/dist/components/data-table/index.js +1 -1
  55. package/dist/components/date-picker/date-picker.d.ts +0 -1
  56. package/dist/components/date-picker/index.js +1 -1
  57. package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
  58. package/dist/components/date-range-picker/index.js +1 -1
  59. package/dist/components/date-time-picker/date-time-picker.d.ts +0 -1
  60. package/dist/components/date-time-picker/index.js +1 -1
  61. package/dist/components/dialog/index.js +1 -1
  62. package/dist/components/due-date-calculator/index.js +2 -2
  63. package/dist/components/gestational-age-calculator/index.js +1 -1
  64. package/dist/components/header/header.d.ts +8 -0
  65. package/dist/components/header/index.js +1 -1
  66. package/dist/components/index.d.ts +1 -1
  67. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  68. package/dist/components/public-header/public-header.d.ts +1 -1
  69. package/dist/components/sign-document/index.js +1 -1
  70. package/dist/components/sign-document/sign-document.d.ts +12 -0
  71. package/dist/components/stat/stat.d.ts +1 -1
  72. package/dist/components/tab-bar/index.d.ts +1 -1
  73. package/dist/components/tab-bar/index.js +1 -1
  74. package/dist/components/tab-bar/tab-bar.d.ts +44 -1
  75. package/dist/components/unit-converter/index.js +1 -1
  76. package/dist/index.js +495 -494
  77. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  78. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +57 -1
  79. package/dist/patterns/patient-shell/index.js +1 -1
  80. package/dist/tokens.css +1411 -2
  81. package/package.json +1 -1
  82. package/dist/_chunks/bmi-calculator-D4juUcyF.js +0 -219
  83. package/dist/_chunks/react-day-picker-CdtIiKjx.js +0 -3174
  84. package/dist/_chunks/subDays-_T9YeKPX.js +0 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",
@@ -1,219 +0,0 @@
1
- import { jsxs as i, jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as P, useId as R, useState as r, useMemo as Y, useEffect as _ } from "react";
3
- import { c as q } from "./index-D2ZczOXr.js";
4
- import { useTranslation as J } from "react-i18next";
5
- import { R as T } from "./radio-TWf9Q-mp.js";
6
- import { R as Q } from "./radio-group-CLjK-SlK.js";
7
- import { F as S } from "./form-field-BOm9hK35.js";
8
- import { N as h } from "./number-input-Dj5L3pXK.js";
9
- import { C as X } from "./chart-Cbt0_sKv.js";
10
- import { B as Z } from "./badge-zsf5i5bH.js";
11
- import { I as aa } from "./insert-result-DtQQeSSf.js";
12
- import { a as la, b as ea, e as ta, c as ia, f as G, l as k, k as ra } from "./bmi-BxD-tFzU.js";
13
- const sa = q("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
14
- variants: {
15
- width: {
16
- full: "ds:w-full",
17
- auto: "ds:inline-flex"
18
- }
19
- },
20
- defaultVariants: { width: "full" }
21
- }), oa = {
22
- underweight: "info",
23
- normal: "success",
24
- overweight: "warning",
25
- obese: "error"
26
- }, p = (f) => Math.round(f * 10) / 10, na = P(
27
- ({
28
- defaultUnitSystem: f = "metric",
29
- onResultChange: u,
30
- onInsert: y,
31
- insertVariant: v = "insert",
32
- onCopy: A,
33
- onError: H,
34
- id: K,
35
- width: D,
36
- className: E
37
- }, L) => {
38
- const { t: a, i18n: x } = J(), N = R(), [s, M] = r(f), [d, w] = r(null), [g, F] = r(null), [o, $] = r(null), [n, B] = r(null), [m, I] = r(null), V = (z) => {
39
- const C = z;
40
- if (C !== s) {
41
- if (C === "imperial") {
42
- if (d !== null) {
43
- const { ft: U, in: O } = ia(d);
44
- $(U), B(p(O));
45
- }
46
- g !== null && I(p(ra(g)));
47
- } else
48
- (o !== null || n !== null) && w(p(G(o ?? 0, n ?? 0))), m !== null && F(p(k(m)));
49
- M(C);
50
- }
51
- }, W = s === "metric" ? d : o !== null || n !== null ? G(o ?? 0, n ?? 0) : null, j = s === "metric" ? g : m !== null ? k(m) : null, t = ta(j, W), e = t !== null ? ea(t) : null, b = Y(
52
- () => new Intl.NumberFormat(x.language, {
53
- minimumFractionDigits: 1,
54
- maximumFractionDigits: 1
55
- }),
56
- [x.language]
57
- );
58
- _(() => {
59
- u == null || u(
60
- t !== null && e !== null ? { bmi: t, category: e } : null
61
- );
62
- }, [t, e, u]);
63
- const c = s === "metric";
64
- return /* @__PURE__ */ i(
65
- "div",
66
- {
67
- ref: L,
68
- "data-component": "bmi-calculator",
69
- "data-component-id": K,
70
- className: sa({ width: D, className: E }),
71
- children: [
72
- /* @__PURE__ */ i(
73
- Q,
74
- {
75
- label: a("bmiCalculator.unitSystem.label"),
76
- variant: "horizontal",
77
- value: s,
78
- onValueChange: V,
79
- children: [
80
- /* @__PURE__ */ l(T, { label: a("bmiCalculator.unitSystem.metric"), value: "metric" }),
81
- /* @__PURE__ */ l(
82
- T,
83
- {
84
- label: a("bmiCalculator.unitSystem.imperial"),
85
- value: "imperial"
86
- }
87
- )
88
- ]
89
- }
90
- ),
91
- /* @__PURE__ */ i("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
92
- c ? /* @__PURE__ */ l(
93
- S,
94
- {
95
- label: `${a("bmiCalculator.height")} (${a("bmiCalculator.units.cm")})`,
96
- children: /* @__PURE__ */ l(
97
- h,
98
- {
99
- mode: "decimal",
100
- min: 0,
101
- step: 0.5,
102
- value: d,
103
- onChange: w
104
- }
105
- )
106
- }
107
- ) : /* @__PURE__ */ i("div", { role: "group", "aria-labelledby": N, children: [
108
- /* @__PURE__ */ l(
109
- "span",
110
- {
111
- id: N,
112
- className: "type-label ds:mb-[var(--spacing-xs)] ds:block ds:text-foreground",
113
- children: a("bmiCalculator.height")
114
- }
115
- ),
116
- /* @__PURE__ */ i("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
117
- /* @__PURE__ */ l(
118
- h,
119
- {
120
- mode: "integer",
121
- min: 0,
122
- value: o,
123
- onChange: $,
124
- "aria-label": a("bmiCalculator.feet")
125
- }
126
- ),
127
- /* @__PURE__ */ l("span", { className: "type-label ds:text-muted-foreground", children: a("bmiCalculator.units.ft") }),
128
- /* @__PURE__ */ l(
129
- h,
130
- {
131
- mode: "decimal",
132
- min: 0,
133
- max: 11.9,
134
- step: 0.5,
135
- value: n,
136
- onChange: B,
137
- "aria-label": a("bmiCalculator.inches")
138
- }
139
- ),
140
- /* @__PURE__ */ l("span", { className: "type-label ds:text-muted-foreground", children: a("bmiCalculator.units.in") })
141
- ] })
142
- ] }),
143
- /* @__PURE__ */ l(
144
- S,
145
- {
146
- label: `${a("bmiCalculator.weight")} (${a(
147
- c ? "bmiCalculator.units.kg" : "bmiCalculator.units.lb"
148
- )})`,
149
- children: /* @__PURE__ */ l(
150
- h,
151
- {
152
- mode: "decimal",
153
- min: 0,
154
- step: c ? 0.1 : 0.5,
155
- value: c ? g : m,
156
- onChange: c ? F : I
157
- }
158
- )
159
- }
160
- )
161
- ] }),
162
- /* @__PURE__ */ l("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: t !== null && e !== null ? a("bmiCalculator.gaugeAria", {
163
- bmi: b.format(t),
164
- category: a(`bmiCalculator.category.${e}`)
165
- }) : "" }),
166
- t !== null && e !== null ? /* @__PURE__ */ i("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-md)]", children: [
167
- /* @__PURE__ */ i("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
168
- /* @__PURE__ */ l("span", { className: "type-label ds:text-muted-foreground", children: a("bmiCalculator.category.label") }),
169
- /* @__PURE__ */ l(Z, { variant: oa[e], size: "lg", children: a(`bmiCalculator.category.${e}`) }),
170
- /* @__PURE__ */ l("p", { className: "type-body ds:text-muted-foreground", children: a(`bmiCalculator.range.${e}`) })
171
- ] }),
172
- /* @__PURE__ */ l("div", { className: "ds:w-[240px] ds:max-w-full", children: /* @__PURE__ */ l(
173
- X,
174
- {
175
- type: "radialBar",
176
- title: a("bmiCalculator.gaugeAria", {
177
- bmi: b.format(t),
178
- category: a(`bmiCalculator.category.${e}`)
179
- }),
180
- series: [la(t)],
181
- labels: [a(`bmiCalculator.category.${e}`)],
182
- radialValueFormatter: () => b.format(t),
183
- height: 240
184
- }
185
- ) }),
186
- v === "copy" || y ? /* @__PURE__ */ l(
187
- aa,
188
- {
189
- onInsert: y,
190
- variant: v,
191
- onCopy: A,
192
- onError: H,
193
- card: {
194
- title: a("insert.title.bmi"),
195
- highlight: a(`bmiCalculator.category.${e}`),
196
- fields: [
197
- {
198
- label: a("insert.title.bmi"),
199
- value: b.format(t)
200
- },
201
- {
202
- label: a("bmiCalculator.category.label"),
203
- value: a(`bmiCalculator.category.${e}`)
204
- }
205
- ]
206
- }
207
- }
208
- ) : null
209
- ] }) : /* @__PURE__ */ l("p", { className: "type-body ds:text-muted-foreground", children: a("bmiCalculator.empty") })
210
- ]
211
- }
212
- );
213
- }
214
- );
215
- na.displayName = "BmiCalculator";
216
- export {
217
- na as B
218
- };
219
- //# sourceMappingURL=bmi-calculator-D4juUcyF.js.map