@alfadocs/ui-kit 0.33.3 → 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.
- package/dist/_chunks/{contact-profile-card-Ce-LIDU8.js → contact-profile-card-C2mTxAlN.js} +53 -52
- package/dist/agent-catalog.json +1 -1
- package/dist/components/contact-profile-card/contact-profile-card.d.ts +21 -0
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as u, jsx as e, Fragment as R } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
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
|
|
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
|
|
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
|
|
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",
|
|
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
|
|
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",
|
|
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
|
-
},
|
|
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
|
|
82
|
+
function ye(t) {
|
|
83
83
|
return t.replace(/[^\d+]/g, "");
|
|
84
84
|
}
|
|
85
|
-
function
|
|
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
|
|
89
|
+
function be(t) {
|
|
90
90
|
return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(t.line)}`;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
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
|
|
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
|
|
108
|
-
const s =
|
|
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
|
|
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":
|
|
149
|
+
"aria-label": ee,
|
|
149
150
|
id: C,
|
|
150
|
-
className:
|
|
151
|
-
...
|
|
152
|
-
},
|
|
153
|
-
const { t: n, i18n: w } =
|
|
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
|
|
156
|
-
}, [x, b,
|
|
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:
|
|
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:${
|
|
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:
|
|
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
|
-
}),
|
|
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:
|
|
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
|
-
}),
|
|
253
|
-
|
|
253
|
+
}), me(
|
|
254
|
+
ve,
|
|
254
255
|
{ getProfession: () => y },
|
|
255
256
|
C
|
|
256
257
|
);
|
|
257
|
-
const
|
|
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(
|
|
260
|
-
|
|
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
|
-
] }),
|
|
270
|
-
|
|
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
|
-
|
|
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:
|
|
290
|
+
children: $
|
|
290
291
|
}
|
|
291
292
|
)
|
|
292
293
|
] }),
|
|
293
|
-
|
|
294
|
+
oe
|
|
294
295
|
] });
|
|
295
296
|
return /* @__PURE__ */ e(
|
|
296
297
|
"div",
|
|
297
298
|
{
|
|
298
|
-
ref:
|
|
299
|
+
ref: re,
|
|
299
300
|
role: "region",
|
|
300
|
-
"aria-label":
|
|
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:
|
|
306
|
-
...
|
|
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
|
-
|
|
313
|
-
const
|
|
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
|
-
],
|
|
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
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
338
|
+
Ge as C,
|
|
339
|
+
Be as a,
|
|
340
|
+
Me as b,
|
|
341
|
+
ve as c
|
|
341
342
|
};
|
|
342
|
-
//# sourceMappingURL=contact-profile-card-
|
|
343
|
+
//# sourceMappingURL=contact-profile-card-C2mTxAlN.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -121,6 +121,27 @@ export interface ContactProfileCardProps extends Omit<ComponentPropsWithoutRef<'
|
|
|
121
121
|
* variant, or a coloured chip strip. Optional.
|
|
122
122
|
*/
|
|
123
123
|
headerSlot?: ReactNode;
|
|
124
|
+
/**
|
|
125
|
+
* Render an arbitrary map widget at the top of the card chrome —
|
|
126
|
+
* replaces the built-in static `<img>` thumbnail that
|
|
127
|
+
* `googleMapsApiKey` would otherwise produce. Use this when you
|
|
128
|
+
* want an interactive map inside the card boundary instead of a
|
|
129
|
+
* fixed image:
|
|
130
|
+
*
|
|
131
|
+
* <ContactProfileCard
|
|
132
|
+
* mapSlot={
|
|
133
|
+
* <PracticeMap practice={practice} googleMapsApiKey={key} />
|
|
134
|
+
* }
|
|
135
|
+
* …
|
|
136
|
+
* />
|
|
137
|
+
*
|
|
138
|
+
* When both `mapSlot` and `googleMapsApiKey` are provided, the slot
|
|
139
|
+
* wins (explicit > implicit). When neither is provided, no map area
|
|
140
|
+
* renders. The slot is unstyled — pass through any container chrome
|
|
141
|
+
* the consumer wants (e.g. a fixed height wrapper). The kit
|
|
142
|
+
* positions it where the static thumbnail would have lived.
|
|
143
|
+
*/
|
|
144
|
+
mapSlot?: ReactNode;
|
|
124
145
|
/**
|
|
125
146
|
* Rendered at the end of the card body, below the rows. Use for
|
|
126
147
|
* a "Book now" `<Button>` or a "View full profile" link.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as _, a as O, b as o, c as r } from "../../_chunks/contact-profile-card-
|
|
1
|
+
import { C as _, a as O, b as o, c as r } from "../../_chunks/contact-profile-card-C2mTxAlN.js";
|
|
2
2
|
export {
|
|
3
3
|
_ as CONTACT_PROFILE_CARD_ROW_ICONS,
|
|
4
4
|
O as CONTACT_PROFILE_CARD_ROW_KEYS,
|
package/dist/index.js
CHANGED
|
@@ -130,7 +130,7 @@ import { B as kn, C as On, O as _n, b as yn } from "./_chunks/booking-h_kBZM6M.j
|
|
|
130
130
|
import { C as Mn, c as Dn, r as wn } from "./_chunks/calendar-YHFknAGv.js";
|
|
131
131
|
import { O as vn, o as Hn } from "./_chunks/operator-hero-7LiiP7zi.js";
|
|
132
132
|
import { P as Gn, p as Un } from "./_chunks/patient-search-CBq62kmL.js";
|
|
133
|
-
import { C as Yn, a as jn, b as zn, c as qn } from "./_chunks/contact-profile-card-
|
|
133
|
+
import { C as Yn, a as jn, b as zn, c as qn } from "./_chunks/contact-profile-card-C2mTxAlN.js";
|
|
134
134
|
import { P as Jn, p as Xn } from "./_chunks/practice-results-YD4dvqje.js";
|
|
135
135
|
import { P as $n, f as ap, p as ep, a as rp, s as op, b as tp, c as sp } from "./_chunks/payment-form-D5rgnZu7.js";
|
|
136
136
|
import { P as np, p as pp } from "./_chunks/pdf-viewer-DvtEHcEP.js";
|
package/package.json
CHANGED