@alfadocs/ui-kit 1.125.0 → 1.125.2

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.
@@ -145,15 +145,15 @@ const Te = me(
145
145
  onEmailClick: te,
146
146
  headerSlot: re,
147
147
  footerSlot: ie,
148
- mapSlot: oe,
148
+ mapSlot: ne,
149
149
  factsAsDefinitionList: N = !1,
150
150
  surface: A = "elevated",
151
- "aria-label": ne,
151
+ "aria-label": oe,
152
152
  id: k,
153
153
  className: le,
154
154
  ...ce
155
155
  }, se) => {
156
- const { t: r, i18n: I } = ve("ui"), R = he(), K = I.language ?? "en", F = i ?? r("contactProfileCard.heading"), de = ne ?? F, T = ge(() => {
156
+ const { t: r, i18n: I } = ve("ui"), R = he(), K = I.language ?? "en", F = i ?? r("contactProfileCard.heading"), de = oe ?? F, T = ge(() => {
157
157
  if (C != null)
158
158
  return Pe(
159
159
  C,
@@ -161,25 +161,28 @@ const Te = me(
161
161
  K,
162
162
  r("common.freeOfCharge")
163
163
  );
164
- }, [C, M, K, r]), n = [];
165
- if (a && n.push({
164
+ }, [C, M, K, r]), o = [];
165
+ if (a && o.push({
166
166
  key: "address",
167
167
  icon: /* @__PURE__ */ e(D, { "aria-hidden": "true" }),
168
168
  label: r("contactProfileCard.label.address"),
169
169
  value: /* @__PURE__ */ m("span", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
170
170
  /* @__PURE__ */ e("span", { lang: l, dir: "auto", children: a.line }),
171
- a.lat != null && a.lng != null ? /* @__PURE__ */ e(
172
- d,
173
- {
174
- href: Re(a),
175
- external: !0,
176
- intent: "default",
177
- onClick: ae,
178
- children: r("contactProfileCard.openInGoogleMaps")
179
- }
171
+ a.lat != null && a.lng != null ? (
172
+ // A secondary action under the address: the small body size.
173
+ /* @__PURE__ */ e("span", { className: "type-body-sm", children: /* @__PURE__ */ e(
174
+ d,
175
+ {
176
+ href: Re(a),
177
+ external: !0,
178
+ intent: "default",
179
+ onClick: ae,
180
+ children: r("contactProfileCard.openInGoogleMaps")
181
+ }
182
+ ) })
180
183
  ) : null
181
184
  ] })
182
- }), s && n.push({
185
+ }), s && o.push({
183
186
  key: "phone",
184
187
  icon: /* @__PURE__ */ e(W, { "aria-hidden": "true" }),
185
188
  label: r("contactProfileCard.label.phone"),
@@ -192,7 +195,7 @@ const Te = me(
192
195
  children: /* @__PURE__ */ e("bdi", { dir: "ltr", children: E(s, { defaultCountry: h }) })
193
196
  }
194
197
  )
195
- }), g && n.push({
198
+ }), g && o.push({
196
199
  key: "whatsapp",
197
200
  icon: /* @__PURE__ */ e(q, { "aria-hidden": "true" }),
198
201
  label: r("contactProfileCard.label.whatsapp"),
@@ -208,7 +211,7 @@ const Te = me(
208
211
  }) })
209
212
  }
210
213
  )
211
- }), y && n.push({
214
+ }), y && o.push({
212
215
  key: "email",
213
216
  icon: /* @__PURE__ */ e(j, { "aria-hidden": "true" }),
214
217
  label: r("contactProfileCard.label.email"),
@@ -222,45 +225,45 @@ const Te = me(
222
225
  }
223
226
  )
224
227
  }), p) {
225
- const o = Ie(p);
226
- n.push({
228
+ const n = Ie(p);
229
+ o.push({
227
230
  key: "website",
228
231
  icon: /* @__PURE__ */ e(B, { "aria-hidden": "true" }),
229
232
  label: r("contactProfileCard.label.website"),
230
- value: o ? /* @__PURE__ */ e(d, { href: o, external: !0, intent: "default", children: /* @__PURE__ */ e("bdi", { dir: "ltr", children: p }) }) : /* @__PURE__ */ e("bdi", { dir: "ltr", children: p })
233
+ value: n ? /* @__PURE__ */ e(d, { href: n, external: !0, intent: "default", children: /* @__PURE__ */ e("bdi", { dir: "ltr", children: p }) }) : /* @__PURE__ */ e("bdi", { dir: "ltr", children: p })
231
234
  });
232
235
  }
233
236
  if (v && v.length > 0) {
234
- const o = (c) => {
237
+ const n = (c) => {
235
238
  if (u != null && u[c]) return u[c];
236
239
  const H = `languages.${c}`;
237
240
  return I.exists(H) ? r(H) : c.toUpperCase();
238
241
  };
239
- n.push({
242
+ o.push({
240
243
  key: "languages",
241
244
  icon: /* @__PURE__ */ e(L, { "aria-hidden": "true" }),
242
245
  label: r("contactProfileCard.label.languages"),
243
- value: /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: v.map((c) => /* @__PURE__ */ e(w, { variant: "neutral", children: o(c) }, c)) })
246
+ value: /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: v.map((c) => /* @__PURE__ */ e(w, { variant: "neutral", children: n(c) }, c)) })
244
247
  });
245
248
  }
246
- b && b.length > 0 && n.push({
249
+ b && b.length > 0 && o.push({
247
250
  key: "insurances",
248
251
  icon: /* @__PURE__ */ e(G, { "aria-hidden": "true" }),
249
252
  label: r("contactProfileCard.label.insurances"),
250
- value: /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: b.map((o) => /* @__PURE__ */ e(w, { variant: "info", children: o }, o)) })
251
- }), T && n.push({
253
+ value: /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: b.map((n) => /* @__PURE__ */ e(w, { variant: "info", children: n }, n)) })
254
+ }), T && o.push({
252
255
  key: "firstVisitPrice",
253
256
  icon: /* @__PURE__ */ e(Y, { "aria-hidden": "true" }),
254
257
  label: r("contactProfileCard.label.firstVisitPrice"),
255
258
  value: /* @__PURE__ */ e(w, { variant: "accentSoft", size: "lg", children: T })
256
- }), Q && n.push({
259
+ }), Q && o.push({
257
260
  key: "expertForAnxiousPatients",
258
261
  icon: /* @__PURE__ */ e(U, { "aria-hidden": "true" }),
259
262
  label: r("contactProfileCard.label.expertForAnxiousPatients"),
260
263
  value: r("contactProfileCard.value.yesShort")
261
264
  });
262
265
  const f = P && P.length > 0 ? P : void 0;
263
- x && !f && n.push({
266
+ x && !f && o.push({
264
267
  key: "profession",
265
268
  icon: /* @__PURE__ */ e(S, { "aria-hidden": "true" }),
266
269
  label: r("contactProfileCard.label.profession"),
@@ -269,7 +272,7 @@ const Te = me(
269
272
  Me,
270
273
  {
271
274
  getProfession: () => x,
272
- getSpecialtyKeys: () => (f ?? []).map((o) => o.key)
275
+ getSpecialtyKeys: () => (f ?? []).map((n) => n.key)
273
276
  },
274
277
  k
275
278
  );
@@ -284,7 +287,7 @@ const Te = me(
284
287
  defaultValue: "Map showing {{address}}"
285
288
  })
286
289
  }
287
- ) : null, ue = oe ?? pe, fe = /* @__PURE__ */ m(O, { children: [
290
+ ) : null, ue = ne ?? pe, fe = /* @__PURE__ */ m(O, { children: [
288
291
  t ? /* @__PURE__ */ e(
289
292
  "p",
290
293
  {
@@ -294,17 +297,17 @@ const Te = me(
294
297
  children: t
295
298
  }
296
299
  ) : null,
297
- n.length > 0 ? /* @__PURE__ */ e(be, { rowGap: "md", semantic: N, children: n.map((o) => /* @__PURE__ */ e(
300
+ o.length > 0 ? /* @__PURE__ */ e(be, { rowGap: "md", semantic: N, children: o.map((n) => /* @__PURE__ */ e(
298
301
  z,
299
302
  {
300
- icon: o.icon,
301
- label: o.label,
302
- value: o.value
303
+ icon: n.icon,
304
+ label: n.label,
305
+ value: n.value
303
306
  },
304
- o.key
307
+ n.key
305
308
  )) }) : null,
306
309
  f ? (() => {
307
- const o = /* @__PURE__ */ e(
310
+ const n = /* @__PURE__ */ e(
308
311
  z,
309
312
  {
310
313
  layout: "vertical",
@@ -314,7 +317,7 @@ const Te = me(
314
317
  value: /* @__PURE__ */ e(xe, { items: f })
315
318
  }
316
319
  );
317
- return N ? /* @__PURE__ */ e(Ce, { children: o }) : o;
320
+ return N ? /* @__PURE__ */ e(Ce, { children: n }) : n;
318
321
  })() : null,
319
322
  ue,
320
323
  ie
@@ -361,7 +364,7 @@ const ia = [
361
364
  "firstVisitPrice",
362
365
  "expertForAnxiousPatients",
363
366
  "profession"
364
- ], oa = {
367
+ ], na = {
365
368
  address: D,
366
369
  phone: W,
367
370
  whatsapp: q,
@@ -374,9 +377,9 @@ const ia = [
374
377
  profession: S
375
378
  };
376
379
  export {
377
- oa as C,
380
+ na as C,
378
381
  ia as a,
379
382
  Te as b,
380
383
  Me as c
381
384
  };
382
- //# sourceMappingURL=contact-profile-card-Jz2aSh7T.js.map
385
+ //# sourceMappingURL=contact-profile-card-CCgf0Ntt.js.map
@@ -1,6 +1,6 @@
1
1
  import { jsx as m, jsxs as N, Fragment as ht } from "react/jsx-runtime";
2
- import { forwardRef as gt, useRef as k, useMemo as R, useId as Oe, useState as C, useEffect as $, useCallback as D, useImperativeHandle as vt, useContext as Ge, useLayoutEffect as ce, createContext as bt } from "react";
3
- import { createPortal as je } from "react-dom";
2
+ import { forwardRef as gt, useRef as k, useMemo as R, useId as Oe, useState as C, useEffect as $, useCallback as D, useImperativeHandle as vt, useContext as je, useLayoutEffect as ce, createContext as bt } from "react";
3
+ import { createPortal as Ge } from "react-dom";
4
4
  import { c as Y } from "./index-D2ZczOXr.js";
5
5
  import { useTranslation as B } from "react-i18next";
6
6
  import { M as wt, A as yt, a as kt, b as Mt, u as De, c as W, d as Ze, e as Fe } from "./maps-core-gate-DKx96CC_.js";
@@ -341,8 +341,8 @@ function Ne(e) {
341
341
  return !0;
342
342
  }
343
343
  }
344
- const Gt = 0.08;
345
- function jt(e, t) {
344
+ const jt = 0.08;
345
+ function Gt(e, t) {
346
346
  let n = 0;
347
347
  for (let r = 1; r < e.length; r += 1)
348
348
  Math.abs(e[r] - t) < Math.abs(e[n] - t) && (n = r);
@@ -366,8 +366,8 @@ function Dt(e, t) {
366
366
  d && r(null);
367
367
  return;
368
368
  }
369
- const p = Math.log(a / l), g = jt(i, p);
370
- r((c) => c === null || c >= i.length || Math.abs(i[c] - p) - Math.abs(i[g] - p) > Gt ? g : c);
369
+ const p = Math.log(a / l), g = Gt(i, p);
370
+ r((c) => c === null || c >= i.length || Math.abs(i[c] - p) - Math.abs(i[g] - p) > jt ? g : c);
371
371
  };
372
372
  if (u(!0), typeof ResizeObserver > "u") return;
373
373
  const f = new ResizeObserver(() => u(!1));
@@ -501,11 +501,11 @@ function Kt({
501
501
  }, a = () => {
502
502
  t.current.pendingInput && !t.current.programmatic && (t.current.moved = !0);
503
503
  }, l = () => {
504
- var A, G;
505
- const c = (A = n.getBounds()) == null ? void 0 : A.toJSON(), h = (G = n.getCenter()) == null ? void 0 : G.toJSON(), w = n.getZoom(), b = t.current.moved;
504
+ var A, j;
505
+ const c = (A = n.getBounds()) == null ? void 0 : A.toJSON(), h = (j = n.getCenter()) == null ? void 0 : j.toJSON(), w = n.getZoom(), b = t.current.moved;
506
506
  if (i(), clearTimeout(u), !c || !h || w == null) return;
507
507
  const M = !s || Object.keys(c).some(
508
- (j) => c[j] !== s.bounds[j]
508
+ (G) => c[G] !== s.bounds[G]
509
509
  ), L = s != null && (w !== s.zoom || h.lat !== s.center.lat || h.lng !== s.center.lng);
510
510
  s = { bounds: c, center: h, zoom: w }, M && r.current(c, { userInteraction: b && L });
511
511
  }, p = [
@@ -572,7 +572,7 @@ function qt({
572
572
  children: r
573
573
  }) {
574
574
  const o = Ht(e.id, e.position);
575
- return !o || !t ? null : je(
575
+ return !o || !t ? null : Ge(
576
576
  /* @__PURE__ */ m(Yt, { anchor: o, direction: n, children: r }),
577
577
  t
578
578
  );
@@ -896,7 +896,7 @@ function mn({
896
896
  onSelect: o,
897
897
  onHover: s
898
898
  }) {
899
- const i = Ge(ve), u = R(
899
+ const i = je(ve), u = R(
900
900
  () => i ? un(i, r) : void 0,
901
901
  [i, r]
902
902
  );
@@ -972,7 +972,7 @@ function gn({
972
972
  onCameraMove: d,
973
973
  onClusterClick: a
974
974
  }) {
975
- const l = W(), { t: p } = B("ui"), g = sn(t), c = Ge(ve), h = R(
975
+ const l = W(), { t: p } = B("ui"), g = sn(t), c = je(ve), h = R(
976
976
  () => Ot(e, g),
977
977
  [e, g]
978
978
  ), { singles: w, clusters: b } = R(() => {
@@ -982,9 +982,9 @@ function gn({
982
982
  E.push(...z.members.filter(y)), P.length > 1 ? V.push({ ...z, members: P }) : E.push(...P);
983
983
  }
984
984
  return { singles: E, clusters: V };
985
- }, [h, n, r]), [M, L] = C(""), A = k(null), G = k(void 0);
986
- $(() => () => clearTimeout(G.current), []);
987
- const j = (y) => {
985
+ }, [h, n, r]), [M, L] = C(""), A = k(null), j = k(void 0);
986
+ $(() => () => clearTimeout(j.current), []);
987
+ const G = (y) => {
988
988
  var _;
989
989
  const E = (_ = l == null ? void 0 : l.getDiv) == null ? void 0 : _.call(l);
990
990
  if (!l || !(E instanceof Element)) return;
@@ -1005,7 +1005,7 @@ function gn({
1005
1005
  A.current = {
1006
1006
  ids: new Set(y.members.map((S) => S.id)),
1007
1007
  centre: y.position
1008
- }, L(""), clearTimeout(G.current), G.current = setTimeout(
1008
+ }, L(""), clearTimeout(j.current), j.current = setTimeout(
1009
1009
  () => L(p("mapView.clusterZoomed", { label: f(T) })),
1010
1010
  fn
1011
1011
  ), d(), a == null || a({
@@ -1053,11 +1053,11 @@ function gn({
1053
1053
  mapId: s,
1054
1054
  iconTheme: c,
1055
1055
  elements: u,
1056
- onActivate: j
1056
+ onActivate: G
1057
1057
  },
1058
1058
  `${Math.floor(g)}:${y.id}`
1059
1059
  )),
1060
- i ? je(
1060
+ i ? Ge(
1061
1061
  /* @__PURE__ */ m("div", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: M }),
1062
1062
  i
1063
1063
  ) : null
@@ -1174,17 +1174,17 @@ function wn({
1174
1174
  "div",
1175
1175
  {
1176
1176
  "data-testid": "map-view-preview-plate",
1177
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:bg-[color-mix(in_srgb,var(--popover)_calc(100%-(100%-var(--glass-surface-alpha,85%))*0.27),transparent)] ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)] ds:backdrop-blur-md ds:contrast-more:bg-[var(--popover)] ds:[@media(prefers-reduced-transparency:reduce)]:bg-[var(--popover)] ds:forced-colors:bg-[Canvas] ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--border)] ds:shadow-[var(--shadow-sm)] ds:@[640px]/mapbar:flex-row ds:@[640px]/mapbar:items-center ds:@[640px]/mapbar:gap-[var(--spacing-md)]",
1177
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:bg-[color-mix(in_srgb,var(--popover)_calc(100%-(100%-var(--glass-surface-alpha,85%))*0.27),transparent)] ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)] ds:backdrop-blur-md ds:contrast-more:bg-[var(--popover)] ds:[@media(prefers-reduced-transparency:reduce)]:bg-[var(--popover)] ds:forced-colors:bg-[Canvas] ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--border)] ds:shadow-[var(--shadow-sm)] ds:items-center ds:text-center ds:@[640px]/mapbar:flex-row ds:@[640px]/mapbar:justify-center ds:@[640px]/mapbar:gap-[var(--spacing-md)]",
1178
1178
  children: [
1179
1179
  /* @__PURE__ */ m(
1180
1180
  "p",
1181
1181
  {
1182
1182
  id: f,
1183
- className: "type-meta ds:m-0 ds:min-w-0 ds:flex-1 ds:text-[var(--foreground)]",
1183
+ className: "type-meta ds:m-0 ds:min-w-0 ds:text-[var(--foreground)] ds:@[640px]/mapbar:text-start",
1184
1184
  children: o
1185
1185
  }
1186
1186
  ),
1187
- /* @__PURE__ */ N("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-2xs)]", children: [
1187
+ /* @__PURE__ */ N("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-center ds:gap-x-[var(--spacing-sm)] ds:gap-y-[var(--spacing-2xs)]", children: [
1188
1188
  n ?? /* @__PURE__ */ m(
1189
1189
  Ue,
1190
1190
  {
@@ -1204,7 +1204,7 @@ function wn({
1204
1204
  href: s,
1205
1205
  target: "_blank",
1206
1206
  rel: "noopener noreferrer",
1207
- className: "ds:ms-auto ds:inline-flex ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)] ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)] ds:rounded-[var(--radius-sm)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2 ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1207
+ className: "ds:inline-flex ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)] ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)] ds:rounded-[var(--radius-sm)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2 ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1208
1208
  children: [
1209
1209
  /* @__PURE__ */ m("span", { className: "ds:sr-only ds:@[640px]/mapbar:not-sr-only", children: u("mapView.openInGoogleMaps") }),
1210
1210
  /* @__PURE__ */ m(Be, { "aria-hidden": "true", className: "ds:size-4" })
@@ -1314,8 +1314,8 @@ const yn = gt(
1314
1314
  mapId: M,
1315
1315
  size: L,
1316
1316
  surface: A,
1317
- ariaLabel: G,
1318
- fitToPoints: j,
1317
+ ariaLabel: j,
1318
+ fitToPoints: G,
1319
1319
  fitKey: y,
1320
1320
  fitMaxZoom: E = 15,
1321
1321
  clusterMarkers: V = "auto",
@@ -1324,7 +1324,7 @@ const yn = gt(
1324
1324
  className: I,
1325
1325
  ...T
1326
1326
  }, _) => {
1327
- const { t: S, i18n: Q } = B("ui"), be = k(/* @__PURE__ */ new Map()), ee = R(() => j ?? [], [j]), st = R(
1327
+ const { t: S, i18n: Q } = B("ui"), be = k(/* @__PURE__ */ new Map()), ee = R(() => G ?? [], [G]), st = R(
1328
1328
  () => y ?? ee.map((v) => `${et(v)}@${v.lat},${v.lng}`).sort().join("|"),
1329
1329
  [y, ee]
1330
1330
  ), Z = ee.length > 0, we = k(Z), ye = Oe(), rt = R(
@@ -1467,7 +1467,7 @@ const yn = gt(
1467
1467
  "data-component": "map-view",
1468
1468
  "data-component-id": e ?? rt,
1469
1469
  role: "region",
1470
- "aria-label": G ?? S("mapView.label"),
1470
+ "aria-label": j ?? S("mapView.label"),
1471
1471
  tabIndex: -1,
1472
1472
  ...T,
1473
1473
  children: /* @__PURE__ */ m(
@@ -1548,7 +1548,7 @@ const yn = gt(
1548
1548
  userInteraction: Me
1549
1549
  }
1550
1550
  ) : null,
1551
- j ? /* @__PURE__ */ m(
1551
+ G ? /* @__PURE__ */ m(
1552
1552
  on,
1553
1553
  {
1554
1554
  points: ee,
@@ -1627,4 +1627,4 @@ export {
1627
1627
  yn as M,
1628
1628
  Ne as i
1629
1629
  };
1630
- //# sourceMappingURL=map-view-DRd_GRQf.js.map
1630
+ //# sourceMappingURL=map-view-CO4F0hMV.js.map
@@ -7,7 +7,7 @@ import { A as We } from "./avatar-Dp5apm1d.js";
7
7
  import { B as ve } from "./button-DohK_Ak_.js";
8
8
  import { D as ce } from "./dropdown-menu-Dw6sgQwJ.js";
9
9
  import { E as cn } from "./empty-state-DwJ5YNzz.js";
10
- import { M as ln, i as Ze } from "./map-view-DRd_GRQf.js";
10
+ import { M as ln, i as Ze } from "./map-view-CO4F0hMV.js";
11
11
  import { R as Xe } from "./rating-CGYpg5dj.js";
12
12
  import { S as ae } from "./sheet-uZZXaO_S.js";
13
13
  import { S as dn } from "./skeleton-tTWJpvAq.js";
@@ -2680,4 +2680,4 @@ export {
2680
2680
  ia as P,
2681
2681
  kn as p
2682
2682
  };
2683
- //# sourceMappingURL=practice-results-CbxBCDaU.js.map
2683
+ //# sourceMappingURL=practice-results-LdLuDvQg.js.map