@alfadocs/ui-kit 0.41.1 → 0.42.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 (147) hide show
  1. package/dist/_chunks/address-autocomplete-CSjMrBvu.js +358 -0
  2. package/dist/_chunks/{alia-sidebar-DXsYPinm.js → alia-sidebar-BpX4z_af.js} +2 -2
  3. package/dist/_chunks/{bmi-calculator-DnEr513I.js → bmi-calculator-D4juUcyF.js} +57 -51
  4. package/dist/_chunks/{breadcrumb-CLlhx7qo.js → breadcrumb-OTbaY70e.js} +4 -4
  5. package/dist/_chunks/cycle-calculator-DsZbyzX6.js +191 -0
  6. package/dist/_chunks/{document-scanner-CqS_klIr.js → document-scanner-BqLsGs4Y.js} +7 -7
  7. package/dist/_chunks/{dropdown-menu-BC5ZdOMo.js → dropdown-menu-CUEXqKis.js} +2 -2
  8. package/dist/_chunks/{due-date-calculator-CUspKSTw.js → due-date-calculator-s_CBgaFs.js} +53 -40
  9. package/dist/_chunks/{editable-currency-cell-renderer-DgkCIIcO.js → editable-currency-cell-renderer-BhUkRiPZ.js} +2 -2
  10. package/dist/_chunks/{freemium-paywall-BAk3a6er.js → freemium-paywall-BLXESpH4.js} +2 -2
  11. package/dist/_chunks/{gestational-age-calculator-CsQ05qDy.js → gestational-age-calculator-CWOG3bkI.js} +56 -43
  12. package/dist/_chunks/{header-settings-CBLwUK6t.js → header-settings-Bx0Biimh.js} +2 -2
  13. package/dist/_chunks/index.modern-D2LGACWg.js +1529 -0
  14. package/dist/_chunks/insert-result-DtQQeSSf.js +227 -0
  15. package/dist/_chunks/{kbd-Cglkd7CY.js → kbd-D855ZXIW.js} +2 -2
  16. package/dist/_chunks/map-view-Tb5VfK9Y.js +333 -0
  17. package/dist/_chunks/marketplace-app-shell-kVAVycz_.js +391 -0
  18. package/dist/_chunks/{patient-search-CBq62kmL.js → patient-search-DPe2ZYEL.js} +2 -2
  19. package/dist/_chunks/{patient-shell-DF81lALv.js → patient-shell-lDX3wwu6.js} +2 -2
  20. package/dist/_chunks/{payment-form-Dy3WIIsC.js → payment-form-BzVsG6Ks.js} +5 -5
  21. package/dist/_chunks/{pdf-viewer-Cy6Ul3hZ.js → pdf-viewer-B6MC6VTx.js} +139 -126
  22. package/dist/_chunks/{practice-results-C0d4IL5E.js → practice-results-CrLpEiiW.js} +4 -4
  23. package/dist/_chunks/pregnancy-weight-gain-B7kBK-ZR.js +223 -0
  24. package/dist/_chunks/{public-header.agent-B2dDg2_d.js → public-header.agent-BY6FH71R.js} +2 -2
  25. package/dist/_chunks/radio-group-CLjK-SlK.js +167 -0
  26. package/dist/_chunks/{rich-text-editor-DLbg2852.js → rich-text-editor-DhGIBd4a.js} +10 -10
  27. package/dist/_chunks/{sheet-BV-yuLE2.js → sheet-xbzu4YiY.js} +7 -7
  28. package/dist/_chunks/{sign-document-CpLDZ6Db.js → sign-document-QHfcNKFj.js} +5 -5
  29. package/dist/_chunks/{signature-capture-DoiBd6i3.js → signature-capture-CpMBhqQ9.js} +6 -6
  30. package/dist/_chunks/tab-bar-C4II-7ej.js +86 -0
  31. package/dist/_chunks/{theme-toggle-DpC28kt5.js → theme-toggle-ClATnY4Q.js} +2 -2
  32. package/dist/_chunks/{toast.agent-WHHfw5VX.js → toast.agent-B0MCsvdZ.js} +2 -2
  33. package/dist/_chunks/{unit-converter-EUwO6QYq.js → unit-converter-D1UrEUxa.js} +46 -40
  34. package/dist/_chunks/{workflow-map-C3gB0FvB.js → workflow-map-BFNpzTiw.js} +2 -2
  35. package/dist/agent-catalog.json +1 -1
  36. package/dist/brand/product-lockup/product-lockup.d.ts +16 -0
  37. package/dist/components/_shared/insert-result.d.ts +21 -4
  38. package/dist/components/address-autocomplete/address-autocomplete.d.ts +77 -0
  39. package/dist/components/address-autocomplete/index.d.ts +4 -0
  40. package/dist/components/address-autocomplete/index.js +6 -0
  41. package/dist/components/address-autocomplete/parse-address.d.ts +52 -0
  42. package/dist/components/bmi-calculator/bmi-calculator.d.ts +11 -1
  43. package/dist/components/bmi-calculator/index.js +1 -1
  44. package/dist/components/breadcrumb/index.js +1 -1
  45. package/dist/components/cycle-calculator/cycle-calculator.d.ts +12 -2
  46. package/dist/components/cycle-calculator/index.js +1 -1
  47. package/dist/components/data-table/index.js +1 -1
  48. package/dist/components/document-scanner/index.js +1 -1
  49. package/dist/components/dropdown-menu/index.js +1 -1
  50. package/dist/components/due-date-calculator/due-date-calculator.d.ts +11 -1
  51. package/dist/components/due-date-calculator/index.js +1 -1
  52. package/dist/components/freemium-paywall/index.js +1 -1
  53. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +12 -2
  54. package/dist/components/gestational-age-calculator/index.js +1 -1
  55. package/dist/components/header-settings/index.js +1 -1
  56. package/dist/components/index.d.ts +3 -1
  57. package/dist/components/kbd/index.js +1 -1
  58. package/dist/components/map-view/index.js +1 -1
  59. package/dist/components/matrix-rain/matrix-rain.d.ts +1 -1
  60. package/dist/components/patient-search/index.js +1 -1
  61. package/dist/components/payment-form/index.js +1 -1
  62. package/dist/components/pdf-viewer/index.js +1 -1
  63. package/dist/components/practice-results/index.js +1 -1
  64. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  65. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +12 -2
  66. package/dist/components/public-header/index.js +1 -1
  67. package/dist/components/radio-group/index.js +1 -1
  68. package/dist/components/rich-text-editor/index.js +1 -1
  69. package/dist/components/sheet/index.js +1 -1
  70. package/dist/components/sign-document/index.js +1 -1
  71. package/dist/components/signature-capture/index.js +1 -1
  72. package/dist/components/tab-bar/index.d.ts +3 -0
  73. package/dist/components/tab-bar/index.js +5 -0
  74. package/dist/components/tab-bar/tab-bar.d.ts +61 -0
  75. package/dist/components/theme-toggle/index.js +1 -1
  76. package/dist/components/toast/index.js +1 -1
  77. package/dist/components/unit-converter/index.js +1 -1
  78. package/dist/components/unit-converter/unit-converter.d.ts +11 -1
  79. package/dist/components/workflow/index.js +1 -1
  80. package/dist/i18n/config.js +39 -24
  81. package/dist/i18n/locales/ar.d.ts +17 -0
  82. package/dist/i18n/locales/ar.js +18 -1
  83. package/dist/i18n/locales/de.d.ts +17 -0
  84. package/dist/i18n/locales/de.js +18 -1
  85. package/dist/i18n/locales/el.d.ts +17 -0
  86. package/dist/i18n/locales/el.js +18 -1
  87. package/dist/i18n/locales/en.d.ts +17 -0
  88. package/dist/i18n/locales/en.js +18 -1
  89. package/dist/i18n/locales/es.d.ts +17 -0
  90. package/dist/i18n/locales/es.js +18 -1
  91. package/dist/i18n/locales/fr.d.ts +17 -0
  92. package/dist/i18n/locales/fr.js +18 -1
  93. package/dist/i18n/locales/hi.d.ts +17 -0
  94. package/dist/i18n/locales/hi.js +18 -1
  95. package/dist/i18n/locales/it.d.ts +17 -0
  96. package/dist/i18n/locales/it.js +18 -1
  97. package/dist/i18n/locales/ja.d.ts +17 -0
  98. package/dist/i18n/locales/ja.js +18 -1
  99. package/dist/i18n/locales/nl.d.ts +17 -0
  100. package/dist/i18n/locales/nl.js +18 -1
  101. package/dist/i18n/locales/pl.d.ts +17 -0
  102. package/dist/i18n/locales/pl.js +18 -1
  103. package/dist/i18n/locales/pt.d.ts +17 -0
  104. package/dist/i18n/locales/pt.js +18 -1
  105. package/dist/i18n/locales/ro.d.ts +17 -0
  106. package/dist/i18n/locales/ro.js +18 -1
  107. package/dist/i18n/locales/ru.d.ts +17 -0
  108. package/dist/i18n/locales/ru.js +18 -1
  109. package/dist/i18n/locales/sq.d.ts +17 -0
  110. package/dist/i18n/locales/sq.js +18 -1
  111. package/dist/i18n/locales/sv.d.ts +17 -0
  112. package/dist/i18n/locales/sv.js +18 -1
  113. package/dist/i18n/locales/tr.d.ts +17 -0
  114. package/dist/i18n/locales/tr.js +18 -1
  115. package/dist/i18n/locales/zh.d.ts +17 -0
  116. package/dist/i18n/locales/zh.js +18 -1
  117. package/dist/index.js +604 -599
  118. package/dist/locales/ar.json +18 -1
  119. package/dist/locales/de.json +18 -1
  120. package/dist/locales/el.json +18 -1
  121. package/dist/locales/en.json +18 -1
  122. package/dist/locales/es.json +18 -1
  123. package/dist/locales/fr.json +18 -1
  124. package/dist/locales/hi.json +18 -1
  125. package/dist/locales/it.json +18 -1
  126. package/dist/locales/ja.json +18 -1
  127. package/dist/locales/nl.json +18 -1
  128. package/dist/locales/pl.json +18 -1
  129. package/dist/locales/pt.json +18 -1
  130. package/dist/locales/ro.json +18 -1
  131. package/dist/locales/ru.json +18 -1
  132. package/dist/locales/sq.json +18 -1
  133. package/dist/locales/sv.json +18 -1
  134. package/dist/locales/tr.json +18 -1
  135. package/dist/locales/zh.json +18 -1
  136. package/dist/patterns/alia-assistant/index.js +1 -1
  137. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  138. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +30 -3
  139. package/dist/patterns/patient-shell/index.js +1 -1
  140. package/dist/tokens.css +1 -1
  141. package/package.json +16 -1
  142. package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +0 -185
  143. package/dist/_chunks/insert-result-yJ0QavoN.js +0 -133
  144. package/dist/_chunks/map-view-qJLybrmN.js +0 -1850
  145. package/dist/_chunks/marketplace-app-shell-BlxVizU4.js +0 -296
  146. package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +0 -209
  147. package/dist/_chunks/radio-group-BcF92GEF.js +0 -152
@@ -0,0 +1,358 @@
1
+ import { jsx as i, jsxs as S } from "react/jsx-runtime";
2
+ import { forwardRef as we, useRef as B, useMemo as _e, useId as Ce, useState as z, useCallback as H, useEffect as Ie } from "react";
3
+ import { c as O } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as de } from "react-i18next";
5
+ import { A as Re, u as Ne } from "./index.modern-D2LGACWg.js";
6
+ import { u as Pe } from "./form-field-context-B3APVHKx.js";
7
+ import { c as Ee } from "./compose-refs-C0k0tdqF.js";
8
+ import { u as ke } from "./use-controllable-state-BiY4xTzM.js";
9
+ import { I as De, a as J, b as W, c as Fe } from "./input-surface-xyERuLU_.js";
10
+ import { u as Be } from "./use-debounced-callback-BisrB-Fq.js";
11
+ import { M as Ue } from "./map-pin-B8STOPMJ.js";
12
+ function U(s) {
13
+ return s.longText ?? s.long_name ?? "";
14
+ }
15
+ function ne(s) {
16
+ return s.shortText ?? s.short_name ?? U(s);
17
+ }
18
+ function y(s, u) {
19
+ return s.find((p) => p.types.includes(u));
20
+ }
21
+ function oe(s, u = "") {
22
+ const p = y(s, "route"), f = y(s, "street_number"), t = y(s, "locality"), a = y(s, "postal_town"), m = y(s, "administrative_area_level_3"), I = y(s, "postal_code"), R = y(s, "administrative_area_level_2"), d = y(s, "country"), h = p ? U(p) : "", v = f ? U(f) : "", x = [h, v].filter(Boolean).join(" ").trim(), r = t ?? a ?? m, o = r ? U(r) : "", c = I ? U(I) : "", N = R ? ne(R).toUpperCase() : "", g = d ? ne(d).toLowerCase() : "";
23
+ return {
24
+ street: x,
25
+ city: o,
26
+ postcode: c,
27
+ province: N,
28
+ country: g,
29
+ formatted: u
30
+ };
31
+ }
32
+ const $e = O(
33
+ ["ds:flex ds:w-full ds:items-center", Fe].join(" "),
34
+ {
35
+ variants: {
36
+ size: {
37
+ sm: `${J.sm} ${W.sm}`,
38
+ md: `${J.md} ${W.md}`,
39
+ lg: `${J.lg} ${W.lg}`
40
+ },
41
+ tone: De
42
+ },
43
+ defaultVariants: { size: "md", tone: "default" }
44
+ }
45
+ ), Me = O(
46
+ [
47
+ "ds:flex-1 ds:min-w-0 ds:ps-3 ds:pe-3 ds:bg-transparent ds:text-foreground",
48
+ "ds:placeholder:text-muted-foreground",
49
+ "ds:outline-none ds:focus:outline-none ds:focus-visible:outline-none",
50
+ "ds:disabled:cursor-not-allowed ds:read-only:cursor-default"
51
+ ].join(" ")
52
+ ), Ve = "ds:inline-flex ds:items-center ds:shrink-0 ds:ps-3 ds:text-muted-foreground ds:[&_svg]:size-4", je = O(
53
+ [
54
+ "ds:absolute ds:z-[var(--z-dropdown)] ds:mt-[var(--spacing-2xs)] ds:w-full",
55
+ "ds:overflow-auto ds:max-h-[18rem]",
56
+ "ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-background",
57
+ "ds:shadow-[var(--shadow-md)] ds:p-[var(--spacing-xs)]"
58
+ ].join(" ")
59
+ ), Le = O(
60
+ [
61
+ "ds:flex ds:flex-col ds:gap-[var(--spacing-3xs)]",
62
+ "ds:ps-3 ds:pe-3 ds:py-2 ds:rounded-[var(--radius-sm)]",
63
+ "ds:cursor-pointer ds:select-none ds:text-foreground",
64
+ "ds:text-start",
65
+ "ds:data-[active=true]:bg-primary ds:data-[active=true]:text-primary-foreground",
66
+ "ds:hover:bg-muted ds:data-[active=true]:hover:bg-primary"
67
+ ].join(" ")
68
+ ), ae = "ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground";
69
+ function Se({
70
+ forwardedRef: s,
71
+ regionCodes: u,
72
+ onSelect: p,
73
+ ...f
74
+ }) {
75
+ const t = Ne("places"), a = B(null), m = !!(t && "AutocompleteSuggestion" in t && "Place" in t && "AutocompleteSessionToken" in t), I = H(
76
+ async (d) => {
77
+ if (!t || d.trim().length === 0) return [];
78
+ if (m) {
79
+ a.current || (a.current = new t.AutocompleteSessionToken());
80
+ const { suggestions: r } = await t.AutocompleteSuggestion.fetchAutocompleteSuggestions({
81
+ input: d,
82
+ sessionToken: a.current,
83
+ includedRegionCodes: u
84
+ });
85
+ return r.map((o) => {
86
+ var N, g;
87
+ const c = o.placePrediction;
88
+ return c ? {
89
+ placeId: c.placeId,
90
+ primaryText: ((N = c.mainText) == null ? void 0 : N.text) ?? c.text.text,
91
+ secondaryText: (g = c.secondaryText) == null ? void 0 : g.text
92
+ } : null;
93
+ }).filter((o) => o !== null);
94
+ }
95
+ const h = t.AutocompleteService;
96
+ return h ? (await new h().getPlacePredictions({ input: d })).predictions.map((r) => {
97
+ var o, c;
98
+ return {
99
+ placeId: r.place_id,
100
+ primaryText: ((o = r.structured_formatting) == null ? void 0 : o.main_text) ?? r.description,
101
+ secondaryText: (c = r.structured_formatting) == null ? void 0 : c.secondary_text
102
+ };
103
+ }) : [];
104
+ },
105
+ [t, m, u]
106
+ ), R = H(
107
+ async (d) => {
108
+ if (d.address) return d.address;
109
+ if (!t) return null;
110
+ if (m) {
111
+ const x = new t.Place({ id: d.placeId }), { place: r } = await x.fetchFields({
112
+ fields: ["addressComponents", "formattedAddress"]
113
+ });
114
+ a.current = null;
115
+ const o = r.addressComponents ?? [];
116
+ return oe(
117
+ o,
118
+ r.formattedAddress ?? ""
119
+ );
120
+ }
121
+ const h = t.PlacesService;
122
+ if (!h) return null;
123
+ const v = new h(document.createElement("div"));
124
+ return new Promise((x) => {
125
+ v.getDetails(
126
+ {
127
+ placeId: d.placeId,
128
+ fields: ["address_components", "formatted_address"]
129
+ },
130
+ (r) => {
131
+ if (!r) {
132
+ x(null);
133
+ return;
134
+ }
135
+ const o = r.address_components ?? [];
136
+ x(
137
+ oe(
138
+ o,
139
+ r.formatted_address ?? ""
140
+ )
141
+ );
142
+ }
143
+ );
144
+ });
145
+ },
146
+ [t, m]
147
+ );
148
+ return /* @__PURE__ */ i(
149
+ Y,
150
+ {
151
+ ...f,
152
+ forwardedRef: s,
153
+ getSuggestions: I,
154
+ resolveSelection: R,
155
+ onSelect: p
156
+ }
157
+ );
158
+ }
159
+ function Y({
160
+ forwardedRef: s,
161
+ value: u,
162
+ defaultValue: p,
163
+ onValueChange: f,
164
+ onSelect: t,
165
+ getSuggestions: a,
166
+ resolveSelection: m,
167
+ placeholder: I,
168
+ debounceMs: R = 250,
169
+ disabled: d,
170
+ required: h,
171
+ readOnly: v,
172
+ name: x,
173
+ id: r,
174
+ size: o = "md",
175
+ tone: c = "default",
176
+ className: N,
177
+ "aria-label": g
178
+ }) {
179
+ const { t: T } = de(), D = Pe(), G = B(null), ie = _e(
180
+ () => Ee(s, G),
181
+ [s]
182
+ ), ce = Ce(), $ = r ?? D.id ?? ce, Z = `${$}-listbox`, le = `${$}-live`, q = (e) => `${$}-opt-${e}`, P = !!(D.disabled || d), ue = !!(D.required || h), ee = D.invalid, pe = ee ? "error" : c, fe = D.describedBy || void 0, [me, K] = ke({
183
+ value: u,
184
+ defaultValue: p ?? "",
185
+ onChange: f
186
+ }), A = me ?? "", [w, E] = z(!1), [l, Q] = z([]), [F, X] = z(!1), [b, _] = z(-1), M = B(!1), V = B(""), ve = I ?? T("inputs.addressAutocomplete.placeholder"), he = H(
187
+ (e) => {
188
+ !a || P || v || M.current || (V.current = e, X(!0), Promise.resolve(a(e)).then((n) => {
189
+ V.current === e && (Q(n), _(-1), X(!1));
190
+ }).catch(() => {
191
+ V.current === e && (Q([]), X(!1));
192
+ }));
193
+ },
194
+ [a, P, v]
195
+ ), k = Be(he, R);
196
+ Ie(() => () => k.cancel(), [k]);
197
+ const xe = (e) => {
198
+ K(e), !(P || v) && (w || E(!0), !M.current && k(e));
199
+ }, te = H(
200
+ (e) => {
201
+ var n;
202
+ K(e.primaryText), E(!1), _(-1), Q([]), V.current = e.primaryText, m ? Promise.resolve(m(e)).then((C) => {
203
+ C && (t == null || t(C));
204
+ }).catch(() => {
205
+ }) : e.address && (t == null || t(e.address)), (n = G.current) == null || n.focus();
206
+ },
207
+ [K, m, t, G]
208
+ ), se = w && !F && A.trim().length > 0 && l.length === 0 && !!a, j = l.length > 0, L = w && (j || se || F), be = (e) => {
209
+ if (!e.nativeEvent.isComposing) {
210
+ if (e.key === "ArrowDown") {
211
+ if (e.preventDefault(), !w) {
212
+ E(!0), A && k(A);
213
+ return;
214
+ }
215
+ if (l.length === 0) return;
216
+ _((n) => (n + 1) % l.length);
217
+ return;
218
+ }
219
+ if (e.key === "ArrowUp") {
220
+ if (e.preventDefault(), l.length === 0) return;
221
+ _(
222
+ (n) => n <= 0 ? l.length - 1 : n - 1
223
+ );
224
+ return;
225
+ }
226
+ if (e.key === "Enter") {
227
+ L && (e.preventDefault(), b >= 0 && l[b] && te(l[b]));
228
+ return;
229
+ }
230
+ e.key === "Escape" && w && (e.preventDefault(), E(!1), _(-1));
231
+ }
232
+ }, ye = () => {
233
+ P || v || A && (E(!0), k(A));
234
+ }, ge = (e) => {
235
+ var C;
236
+ const n = e.relatedTarget;
237
+ n && ((C = re.current) != null && C.contains(n)) || (E(!1), _(-1));
238
+ }, re = B(null), Te = w && b >= 0 && l[b] ? q(l[b].placeId) : void 0, Ae = F ? T("inputs.addressAutocomplete.loading") : w && A.trim().length > 0 ? T("inputs.addressAutocomplete.results", { count: l.length }) : "";
239
+ return /* @__PURE__ */ S(
240
+ "div",
241
+ {
242
+ className: "ds:relative ds:w-full",
243
+ "data-component": "address-autocomplete",
244
+ "data-component-id": r,
245
+ children: [
246
+ /* @__PURE__ */ S(
247
+ "div",
248
+ {
249
+ className: $e({ size: o, tone: pe, className: N }),
250
+ "data-disabled": P || void 0,
251
+ children: [
252
+ /* @__PURE__ */ i("span", { "aria-hidden": "true", className: Ve, children: /* @__PURE__ */ i(Ue, {}) }),
253
+ /* @__PURE__ */ i(
254
+ "input",
255
+ {
256
+ ref: ie,
257
+ id: $,
258
+ name: x,
259
+ type: "text",
260
+ autoComplete: "off",
261
+ role: "combobox",
262
+ "aria-autocomplete": "list",
263
+ "aria-expanded": L,
264
+ "aria-controls": L ? Z : void 0,
265
+ "aria-activedescendant": Te,
266
+ "aria-describedby": fe,
267
+ "aria-invalid": ee || void 0,
268
+ "aria-label": g ?? T("inputs.addressAutocomplete.ariaLabel"),
269
+ placeholder: ve,
270
+ value: A,
271
+ disabled: P,
272
+ required: ue,
273
+ readOnly: v,
274
+ onChange: (e) => xe(e.target.value),
275
+ onKeyDown: be,
276
+ onFocus: ye,
277
+ onBlur: ge,
278
+ onCompositionStart: () => {
279
+ M.current = !0;
280
+ },
281
+ onCompositionEnd: (e) => {
282
+ M.current = !1, k(e.currentTarget.value);
283
+ },
284
+ className: Me()
285
+ }
286
+ )
287
+ ]
288
+ }
289
+ ),
290
+ L ? /* @__PURE__ */ S(
291
+ "ul",
292
+ {
293
+ ref: re,
294
+ id: Z,
295
+ role: "listbox",
296
+ "aria-label": g ?? T("inputs.addressAutocomplete.listLabel"),
297
+ className: je(),
298
+ children: [
299
+ j ? l.map((e, n) => /* @__PURE__ */ S(
300
+ "li",
301
+ {
302
+ id: q(e.placeId),
303
+ role: "option",
304
+ "aria-selected": n === b,
305
+ "data-active": n === b || void 0,
306
+ onMouseDown: (C) => {
307
+ C.preventDefault(), te(e);
308
+ },
309
+ onMouseEnter: () => _(n),
310
+ className: Le(),
311
+ children: [
312
+ /* @__PURE__ */ i("span", { className: "ds:truncate", children: e.primaryText }),
313
+ e.secondaryText ? /* @__PURE__ */ i("span", { className: "type-meta ds:text-muted-foreground ds:data-[active=true]:text-primary-foreground ds:truncate", children: e.secondaryText }) : null
314
+ ]
315
+ },
316
+ e.placeId
317
+ )) : null,
318
+ !j && F ? /* @__PURE__ */ i("li", { role: "presentation", className: ae, children: T("inputs.addressAutocomplete.loading") }) : null,
319
+ !j && !F && se ? /* @__PURE__ */ i("li", { role: "presentation", className: ae, children: T("inputs.addressAutocomplete.noResults") }) : null
320
+ ]
321
+ }
322
+ ) : null,
323
+ /* @__PURE__ */ i(
324
+ "span",
325
+ {
326
+ id: le,
327
+ role: "status",
328
+ "aria-live": "polite",
329
+ "aria-atomic": "true",
330
+ className: "ds:sr-only",
331
+ children: Ae
332
+ }
333
+ )
334
+ ]
335
+ }
336
+ );
337
+ }
338
+ const ze = we(function({ apiKey: u, getSuggestions: p, ...f }, t) {
339
+ const { i18n: a } = de();
340
+ return p ? /* @__PURE__ */ i(
341
+ Y,
342
+ {
343
+ ...f,
344
+ forwardedRef: t,
345
+ getSuggestions: p,
346
+ resolveSelection: He
347
+ }
348
+ ) : u ? /* @__PURE__ */ i(Re, { apiKey: u, language: a.language, children: /* @__PURE__ */ i(Se, { ...f, forwardedRef: t }) }) : /* @__PURE__ */ i(Y, { ...f, forwardedRef: t });
349
+ });
350
+ ze.displayName = "AddressAutocomplete";
351
+ async function He(s) {
352
+ return s.address ?? null;
353
+ }
354
+ export {
355
+ ze as A,
356
+ oe as p
357
+ };
358
+ //# sourceMappingURL=address-autocomplete-CSjMrBvu.js.map
@@ -4,7 +4,7 @@ import * as ee from "@radix-ui/react-dialog";
4
4
  import { useTranslation as z } from "react-i18next";
5
5
  import { F as se } from "./floating-action-button-pojvb9gG.js";
6
6
  import { I as B } from "./icon-button-CKEOrN37.js";
7
- import { S as E } from "./sheet-BV-yuLE2.js";
7
+ import { S as E } from "./sheet-xbzu4YiY.js";
8
8
  import { X as ae } from "./x-CCcI3eJp.js";
9
9
  import { S as P } from "./sparkles-CuYXqQLg.js";
10
10
  import { A as k } from "./avatar-BNQNhoyL.js";
@@ -739,4 +739,4 @@ export {
739
739
  ze as b,
740
740
  Ce as c
741
741
  };
742
- //# sourceMappingURL=alia-sidebar-DXsYPinm.js.map
742
+ //# sourceMappingURL=alia-sidebar-BpX4z_af.js.map
@@ -1,16 +1,16 @@
1
1
  import { jsxs as i, jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as z, useId as U, useState as r, useMemo as O, useEffect as P } from "react";
3
- import { c as R } from "./index-D2ZczOXr.js";
4
- import { useTranslation as Y } from "react-i18next";
5
- import { R as I } from "./radio-TWf9Q-mp.js";
6
- import { R as _ } from "./radio-group-BcF92GEF.js";
7
- import { F as T } from "./form-field-BOm9hK35.js";
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
8
  import { N as h } from "./number-input-Dj5L3pXK.js";
9
- import { C as q } from "./chart-Cbt0_sKv.js";
10
- import { B as J } from "./badge-zsf5i5bH.js";
11
- import { I as Q } from "./insert-result-yJ0QavoN.js";
12
- import { a as X, b as Z, e as aa, c as la, f as S, l as G, k as ea } from "./bmi-BxD-tFzU.js";
13
- const ta = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
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
14
  variants: {
15
15
  width: {
16
16
  full: "ds:w-full",
@@ -18,41 +18,44 @@ const ta = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
18
18
  }
19
19
  },
20
20
  defaultVariants: { width: "full" }
21
- }), ia = {
21
+ }), oa = {
22
22
  underweight: "info",
23
23
  normal: "success",
24
24
  overweight: "warning",
25
25
  obese: "error"
26
- }, p = (f) => Math.round(f * 10) / 10, ra = z(
26
+ }, p = (f) => Math.round(f * 10) / 10, na = P(
27
27
  ({
28
28
  defaultUnitSystem: f = "metric",
29
29
  onResultChange: u,
30
30
  onInsert: y,
31
- id: k,
32
- width: A,
33
- className: H
34
- }, K) => {
35
- const { t: a, i18n: v } = Y(), x = U(), [s, V] = r(f), [d, N] = r(null), [g, w] = r(null), [o, F] = r(null), [n, $] = r(null), [m, B] = r(null), D = (M) => {
36
- const C = M;
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;
37
40
  if (C !== s) {
38
41
  if (C === "imperial") {
39
42
  if (d !== null) {
40
- const { ft: W, in: j } = la(d);
41
- F(W), $(p(j));
43
+ const { ft: U, in: O } = ia(d);
44
+ $(U), B(p(O));
42
45
  }
43
- g !== null && B(p(ea(g)));
46
+ g !== null && I(p(ra(g)));
44
47
  } else
45
- (o !== null || n !== null) && N(p(S(o ?? 0, n ?? 0))), m !== null && w(p(G(m)));
46
- V(C);
48
+ (o !== null || n !== null) && w(p(G(o ?? 0, n ?? 0))), m !== null && F(p(k(m)));
49
+ M(C);
47
50
  }
48
- }, E = s === "metric" ? d : o !== null || n !== null ? S(o ?? 0, n ?? 0) : null, L = s === "metric" ? g : m !== null ? G(m) : null, t = aa(L, E), e = t !== null ? Z(t) : null, b = O(
49
- () => new Intl.NumberFormat(v.language, {
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, {
50
53
  minimumFractionDigits: 1,
51
54
  maximumFractionDigits: 1
52
55
  }),
53
- [v.language]
56
+ [x.language]
54
57
  );
55
- P(() => {
58
+ _(() => {
56
59
  u == null || u(
57
60
  t !== null && e !== null ? { bmi: t, category: e } : null
58
61
  );
@@ -61,22 +64,22 @@ const ta = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
61
64
  return /* @__PURE__ */ i(
62
65
  "div",
63
66
  {
64
- ref: K,
67
+ ref: L,
65
68
  "data-component": "bmi-calculator",
66
- "data-component-id": k,
67
- className: ta({ width: A, className: H }),
69
+ "data-component-id": K,
70
+ className: sa({ width: D, className: E }),
68
71
  children: [
69
72
  /* @__PURE__ */ i(
70
- _,
73
+ Q,
71
74
  {
72
75
  label: a("bmiCalculator.unitSystem.label"),
73
76
  variant: "horizontal",
74
77
  value: s,
75
- onValueChange: D,
78
+ onValueChange: V,
76
79
  children: [
77
- /* @__PURE__ */ l(I, { label: a("bmiCalculator.unitSystem.metric"), value: "metric" }),
80
+ /* @__PURE__ */ l(T, { label: a("bmiCalculator.unitSystem.metric"), value: "metric" }),
78
81
  /* @__PURE__ */ l(
79
- I,
82
+ T,
80
83
  {
81
84
  label: a("bmiCalculator.unitSystem.imperial"),
82
85
  value: "imperial"
@@ -87,7 +90,7 @@ const ta = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
87
90
  ),
88
91
  /* @__PURE__ */ i("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
89
92
  c ? /* @__PURE__ */ l(
90
- T,
93
+ S,
91
94
  {
92
95
  label: `${a("bmiCalculator.height")} (${a("bmiCalculator.units.cm")})`,
93
96
  children: /* @__PURE__ */ l(
@@ -97,15 +100,15 @@ const ta = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
97
100
  min: 0,
98
101
  step: 0.5,
99
102
  value: d,
100
- onChange: N
103
+ onChange: w
101
104
  }
102
105
  )
103
106
  }
104
- ) : /* @__PURE__ */ i("div", { role: "group", "aria-labelledby": x, children: [
107
+ ) : /* @__PURE__ */ i("div", { role: "group", "aria-labelledby": N, children: [
105
108
  /* @__PURE__ */ l(
106
109
  "span",
107
110
  {
108
- id: x,
111
+ id: N,
109
112
  className: "type-label ds:mb-[var(--spacing-xs)] ds:block ds:text-foreground",
110
113
  children: a("bmiCalculator.height")
111
114
  }
@@ -117,7 +120,7 @@ const ta = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
117
120
  mode: "integer",
118
121
  min: 0,
119
122
  value: o,
120
- onChange: F,
123
+ onChange: $,
121
124
  "aria-label": a("bmiCalculator.feet")
122
125
  }
123
126
  ),
@@ -130,7 +133,7 @@ const ta = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
130
133
  max: 11.9,
131
134
  step: 0.5,
132
135
  value: n,
133
- onChange: $,
136
+ onChange: B,
134
137
  "aria-label": a("bmiCalculator.inches")
135
138
  }
136
139
  ),
@@ -138,7 +141,7 @@ const ta = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
138
141
  ] })
139
142
  ] }),
140
143
  /* @__PURE__ */ l(
141
- T,
144
+ S,
142
145
  {
143
146
  label: `${a("bmiCalculator.weight")} (${a(
144
147
  c ? "bmiCalculator.units.kg" : "bmiCalculator.units.lb"
@@ -150,7 +153,7 @@ const ta = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
150
153
  min: 0,
151
154
  step: c ? 0.1 : 0.5,
152
155
  value: c ? g : m,
153
- onChange: c ? w : B
156
+ onChange: c ? F : I
154
157
  }
155
158
  )
156
159
  }
@@ -163,27 +166,30 @@ const ta = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
163
166
  t !== null && e !== null ? /* @__PURE__ */ i("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-md)]", children: [
164
167
  /* @__PURE__ */ i("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
165
168
  /* @__PURE__ */ l("span", { className: "type-label ds:text-muted-foreground", children: a("bmiCalculator.category.label") }),
166
- /* @__PURE__ */ l(J, { variant: ia[e], size: "lg", children: a(`bmiCalculator.category.${e}`) }),
169
+ /* @__PURE__ */ l(Z, { variant: oa[e], size: "lg", children: a(`bmiCalculator.category.${e}`) }),
167
170
  /* @__PURE__ */ l("p", { className: "type-body ds:text-muted-foreground", children: a(`bmiCalculator.range.${e}`) })
168
171
  ] }),
169
172
  /* @__PURE__ */ l("div", { className: "ds:w-[240px] ds:max-w-full", children: /* @__PURE__ */ l(
170
- q,
173
+ X,
171
174
  {
172
175
  type: "radialBar",
173
176
  title: a("bmiCalculator.gaugeAria", {
174
177
  bmi: b.format(t),
175
178
  category: a(`bmiCalculator.category.${e}`)
176
179
  }),
177
- series: [X(t)],
180
+ series: [la(t)],
178
181
  labels: [a(`bmiCalculator.category.${e}`)],
179
182
  radialValueFormatter: () => b.format(t),
180
183
  height: 240
181
184
  }
182
185
  ) }),
183
- y ? /* @__PURE__ */ l(
184
- Q,
186
+ v === "copy" || y ? /* @__PURE__ */ l(
187
+ aa,
185
188
  {
186
189
  onInsert: y,
190
+ variant: v,
191
+ onCopy: A,
192
+ onError: H,
187
193
  card: {
188
194
  title: a("insert.title.bmi"),
189
195
  highlight: a(`bmiCalculator.category.${e}`),
@@ -206,8 +212,8 @@ const ta = R("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
206
212
  );
207
213
  }
208
214
  );
209
- ra.displayName = "BmiCalculator";
215
+ na.displayName = "BmiCalculator";
210
216
  export {
211
- ra as B
217
+ na as B
212
218
  };
213
- //# sourceMappingURL=bmi-calculator-DnEr513I.js.map
219
+ //# sourceMappingURL=bmi-calculator-D4juUcyF.js.map
@@ -165,7 +165,7 @@ const Q = [
165
165
  S.displayName = "BreadcrumbList";
166
166
  const U = [
167
167
  "ds:inline-flex ds:items-center",
168
- "ds:max-inline-size-[16rem]",
168
+ "ds:[max-inline-size:16rem]",
169
169
  "ds:min-h-[var(--min-target-size)]",
170
170
  "ds:py-[var(--spacing-xs)]"
171
171
  ].join(" "), N = y(
@@ -199,7 +199,7 @@ const U = [
199
199
  N.displayName = "BreadcrumbItem";
200
200
  const P = [
201
201
  "ds:inline-flex ds:items-center",
202
- "ds:max-inline-size-[16rem]",
202
+ "ds:[max-inline-size:16rem]",
203
203
  "ds:overflow-hidden ds:text-ellipsis ds:whitespace-nowrap",
204
204
  "ds:break-normal",
205
205
  "ds:text-[var(--muted-foreground)] ds:no-underline",
@@ -211,7 +211,7 @@ const P = [
211
211
  "ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]"
212
212
  ].join(" "), W = [
213
213
  "ds:inline-flex ds:items-center",
214
- "ds:max-inline-size-[16rem]",
214
+ "ds:[max-inline-size:16rem]",
215
215
  "ds:overflow-hidden ds:text-ellipsis ds:whitespace-nowrap",
216
216
  "ds:break-normal",
217
217
  "ds:text-[var(--foreground)] ds:font-[var(--font-weight-semibold)]",
@@ -376,4 +376,4 @@ export {
376
376
  T as e,
377
377
  G as f
378
378
  };
379
- //# sourceMappingURL=breadcrumb-CLlhx7qo.js.map
379
+ //# sourceMappingURL=breadcrumb-OTbaY70e.js.map