@alfadocs/ui-kit 0.33.2 → 0.33.4

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.
@@ -1,12 +1,12 @@
1
1
  import { jsxs as u, jsx as e, Fragment as R } from "react/jsx-runtime";
2
- import { forwardRef as ie, useId as le, useMemo as ce } from "react";
3
- import { c as se } from "./index-D2ZczOXr.js";
4
- import { useTranslation as de } from "react-i18next";
2
+ import { forwardRef as le, useId as ce, useMemo as se } from "react";
3
+ import { c as de } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as pe } from "react-i18next";
5
5
  import { B as S } from "./badge-zsf5i5bH.js";
6
6
  import { C as F } from "./card-DPmk26CL.js";
7
- import { K as pe, a as ue } from "./key-value-pair-CkQIb9EG.js";
7
+ import { K as ue, a as fe } from "./key-value-pair-CkQIb9EG.js";
8
8
  import { L as d } from "./link-DrD_cRUg.js";
9
- import { u as fe } from "./registry-nPAVE19X.js";
9
+ import { u as me } from "./registry-nPAVE19X.js";
10
10
  import { S as T } from "./stethoscope-DT5qCW8Y.js";
11
11
  import { H, S as V, L as z } from "./shield-check-BhHyReu8.js";
12
12
  import { c as O } from "./createLucideIcon-CrFbzy84.js";
@@ -20,18 +20,18 @@ import { M as U } from "./map-pin-B8STOPMJ.js";
20
20
  * This source code is licensed under the ISC license.
21
21
  * See the LICENSE file in the root directory of this source tree.
22
22
  */
23
- const me = [
23
+ const he = [
24
24
  ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2", key: "9lu3g6" }],
25
25
  ["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }],
26
26
  ["path", { d: "M6 12h.01M18 12h.01", key: "113zkx" }]
27
- ], j = O("banknote", me);
27
+ ], j = O("banknote", he);
28
28
  /**
29
29
  * @license lucide-react v1.8.0 - ISC
30
30
  *
31
31
  * This source code is licensed under the ISC license.
32
32
  * See the LICENSE file in the root directory of this source tree.
33
33
  */
34
- const he = [
34
+ const ge = [
35
35
  [
36
36
  "path",
37
37
  {
@@ -39,7 +39,7 @@ const he = [
39
39
  key: "9njp5v"
40
40
  }
41
41
  ]
42
- ], B = O("phone", he), ge = {
42
+ ], B = O("phone", ge), ve = {
43
43
  id: "contact-profile-card",
44
44
  capabilities: ["view_change"],
45
45
  state: {
@@ -63,7 +63,7 @@ const he = [
63
63
  description: "Sourced from the id prop."
64
64
  }
65
65
  }
66
- }, ve = se(
66
+ }, xe = de(
67
67
  "ds:w-full ds:text-[color:var(--foreground)] ds:[--key-value-pair-icon-color:var(--accent)]",
68
68
  {
69
69
  variants: {
@@ -79,17 +79,17 @@ const he = [
79
79
  defaultVariants: { surface: "elevated" }
80
80
  }
81
81
  );
82
- function xe(t) {
82
+ function ye(t) {
83
83
  return t.replace(/[^\d+]/g, "");
84
84
  }
85
- function ye(t, r) {
85
+ function Ce(t, r) {
86
86
  const a = `https://wa.me/${t}`;
87
87
  return r ? `${a}?text=${encodeURIComponent(r)}` : a;
88
88
  }
89
- function Ce(t) {
89
+ function be(t) {
90
90
  return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(t.line)}`;
91
91
  }
92
- function be(t, r, a) {
92
+ function Pe(t, r, a) {
93
93
  try {
94
94
  return new Intl.NumberFormat(a, {
95
95
  style: "currency",
@@ -99,13 +99,13 @@ function be(t, r, a) {
99
99
  return (t / 100).toFixed(2);
100
100
  }
101
101
  }
102
- function Pe() {
102
+ function ke() {
103
103
  if (typeof document > "u") return "4945a3";
104
104
  const t = getComputedStyle(document.documentElement).getPropertyValue("--map-marker-color").trim(), r = /^#?([0-9a-fA-F]{6})$/.exec(t);
105
105
  return r ? r[1] : "4945a3";
106
106
  }
107
- function ke({ apiKey: t, center: r, zoom: a, altText: c }) {
108
- const s = Pe(), f = `https://maps.googleapis.com/maps/api/staticmap?center=${r.lat},${r.lng}&zoom=${a}&size=640x192&scale=2&markers=color:0x${s}%7C${r.lat},${r.lng}&key=${encodeURIComponent(t)}`;
107
+ function we({ apiKey: t, center: r, zoom: a, altText: c }) {
108
+ const s = ke(), f = `https://maps.googleapis.com/maps/api/staticmap?center=${r.lat},${r.lng}&zoom=${a}&size=640x192&scale=2&markers=color:0x${s}%7C${r.lat},${r.lng}&key=${encodeURIComponent(t)}`;
109
109
  return /* @__PURE__ */ e(
110
110
  "img",
111
111
  {
@@ -119,7 +119,7 @@ function ke({ apiKey: t, center: r, zoom: a, altText: c }) {
119
119
  }
120
120
  );
121
121
  }
122
- const we = ie(
122
+ const Me = le(
123
123
  ({
124
124
  heading: t,
125
125
  description: r,
@@ -144,16 +144,17 @@ const we = ie(
144
144
  onEmailClick: J,
145
145
  headerSlot: Q,
146
146
  footerSlot: X,
147
+ mapSlot: Z,
147
148
  surface: k = "elevated",
148
- "aria-label": Z,
149
+ "aria-label": ee,
149
150
  id: C,
150
- className: ee,
151
- ...ae
152
- }, te) => {
153
- const { t: n, i18n: w } = de(), M = le(), $ = w.language ?? "en", N = t ?? n("contactProfileCard.heading"), re = Z ?? N, A = ce(() => {
151
+ className: ae,
152
+ ...te
153
+ }, re) => {
154
+ const { t: n, i18n: w } = pe(), M = ce(), A = w.language ?? "en", $ = t ?? n("contactProfileCard.heading"), ne = ee ?? $, N = se(() => {
154
155
  if (x != null)
155
- return be(x, b, $);
156
- }, [x, b, $]), o = [];
156
+ return Pe(x, b, A);
157
+ }, [x, b, A]), o = [];
157
158
  if (a && o.push({
158
159
  key: "address",
159
160
  icon: /* @__PURE__ */ e(U, { "aria-hidden": "true" }),
@@ -163,7 +164,7 @@ const we = ie(
163
164
  a.lat != null && a.lng != null ? /* @__PURE__ */ e(
164
165
  d,
165
166
  {
166
- href: Ce(a),
167
+ href: be(a),
167
168
  external: !0,
168
169
  intent: "default",
169
170
  onClick: Y,
@@ -178,7 +179,7 @@ const we = ie(
178
179
  value: /* @__PURE__ */ e(
179
180
  d,
180
181
  {
181
- href: `tel:${xe(c)}`,
182
+ href: `tel:${ye(c)}`,
182
183
  intent: "default",
183
184
  onClick: W,
184
185
  children: c
@@ -191,7 +192,7 @@ const we = ie(
191
192
  value: /* @__PURE__ */ e(
192
193
  d,
193
194
  {
194
- href: ye(s, f),
195
+ href: Ce(s, f),
195
196
  external: !0,
196
197
  intent: "default",
197
198
  onClick: D,
@@ -234,11 +235,11 @@ const we = ie(
234
235
  icon: /* @__PURE__ */ e(V, { "aria-hidden": "true" }),
235
236
  label: n("contactProfileCard.label.insurances"),
236
237
  value: /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: v.map((i) => /* @__PURE__ */ e(S, { variant: "info", children: i }, i)) })
237
- }), A && o.push({
238
+ }), N && o.push({
238
239
  key: "firstVisitPrice",
239
240
  icon: /* @__PURE__ */ e(j, { "aria-hidden": "true" }),
240
241
  label: n("contactProfileCard.label.firstVisitPrice"),
241
- value: A
242
+ value: N
242
243
  }), G && o.push({
243
244
  key: "expertForAnxiousPatients",
244
245
  icon: /* @__PURE__ */ e(H, { "aria-hidden": "true" }),
@@ -249,15 +250,15 @@ const we = ie(
249
250
  icon: /* @__PURE__ */ e(T, { "aria-hidden": "true" }),
250
251
  label: n("contactProfileCard.label.profession"),
251
252
  value: y
252
- }), fe(
253
- ge,
253
+ }), me(
254
+ ve,
254
255
  { getProfession: () => y },
255
256
  C
256
257
  );
257
- const ne = /* @__PURE__ */ u(R, { children: [
258
+ const oe = /* @__PURE__ */ u(R, { children: [
258
259
  r ? /* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:whitespace-pre-line", children: r }) : null,
259
- o.length > 0 ? /* @__PURE__ */ e(pe, { rowGap: "md", children: o.map((i) => /* @__PURE__ */ e(
260
- ue,
260
+ o.length > 0 ? /* @__PURE__ */ e(ue, { rowGap: "md", children: o.map((i) => /* @__PURE__ */ e(
261
+ fe,
261
262
  {
262
263
  icon: i.icon,
263
264
  label: i.label,
@@ -266,8 +267,8 @@ const we = ie(
266
267
  i.key
267
268
  )) }) : null,
268
269
  X
269
- ] }), oe = !!P && (a == null ? void 0 : a.lat) !== void 0 && (a == null ? void 0 : a.lng) !== void 0 ? /* @__PURE__ */ e(
270
- ke,
270
+ ] }), ie = !!P && (a == null ? void 0 : a.lat) !== void 0 && (a == null ? void 0 : a.lng) !== void 0 ? /* @__PURE__ */ e(
271
+ we,
271
272
  {
272
273
  apiKey: P,
273
274
  center: { lat: a.lat, lng: a.lng },
@@ -278,7 +279,7 @@ const we = ie(
278
279
  })
279
280
  }
280
281
  ) : null, _ = /* @__PURE__ */ u(R, { children: [
281
- oe,
282
+ Z ?? ie,
282
283
  /* @__PURE__ */ u("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
283
284
  Q,
284
285
  /* @__PURE__ */ e(
@@ -286,31 +287,31 @@ const we = ie(
286
287
  {
287
288
  id: M,
288
289
  className: "type-title-card ds:m-0 ds:text-[color:var(--foreground)]",
289
- children: N
290
+ children: $
290
291
  }
291
292
  )
292
293
  ] }),
293
- ne
294
+ oe
294
295
  ] });
295
296
  return /* @__PURE__ */ e(
296
297
  "div",
297
298
  {
298
- ref: te,
299
+ ref: re,
299
300
  role: "region",
300
- "aria-label": re,
301
+ "aria-label": ne,
301
302
  "aria-labelledby": M,
302
303
  "data-component": "contact-profile-card",
303
304
  "data-component-id": C,
304
305
  id: C,
305
- className: ve({ surface: k, className: ee }),
306
- ...ae,
306
+ className: xe({ surface: k, className: ae }),
307
+ ...te,
307
308
  children: k === "elevated" ? /* @__PURE__ */ e(F, { variant: "elevated", children: /* @__PURE__ */ e(F.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: _ }) }) : /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: _ })
308
309
  }
309
310
  );
310
311
  }
311
312
  );
312
- we.displayName = "ContactProfileCard";
313
- const Ue = [
313
+ Me.displayName = "ContactProfileCard";
314
+ const Be = [
314
315
  "address",
315
316
  "phone",
316
317
  "whatsapp",
@@ -321,7 +322,7 @@ const Ue = [
321
322
  "firstVisitPrice",
322
323
  "expertForAnxiousPatients",
323
324
  "profession"
324
- ], je = {
325
+ ], Ge = {
325
326
  address: U,
326
327
  phone: B,
327
328
  whatsapp: L,
@@ -334,9 +335,9 @@ const Ue = [
334
335
  profession: T
335
336
  };
336
337
  export {
337
- je as C,
338
- Ue as a,
339
- we as b,
340
- ge as c
338
+ Ge as C,
339
+ Be as a,
340
+ Me as b,
341
+ ve as c
341
342
  };
342
- //# sourceMappingURL=contact-profile-card-Ce-LIDU8.js.map
343
+ //# sourceMappingURL=contact-profile-card-C2mTxAlN.js.map