@alfadocs/ui-kit 0.31.6 → 0.31.8
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/practice-profile-card-CfAMeTxQ.js +339 -0
- package/dist/_chunks/{practice-results-VqbCUO1b.js → practice-results-CIkAdwRm.js} +516 -512
- package/dist/agent-catalog.json +1 -1
- package/dist/components/practice-profile-card/index.js +1 -1
- package/dist/components/practice-profile-card/practice-profile-card.d.ts +43 -10
- package/dist/components/practice-results/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +23 -0
- package/dist/i18n/locales/ar.js +27 -0
- package/dist/i18n/locales/de.d.ts +23 -0
- package/dist/i18n/locales/de.js +27 -0
- package/dist/i18n/locales/el.d.ts +23 -0
- package/dist/i18n/locales/el.js +27 -0
- package/dist/i18n/locales/en.d.ts +23 -0
- package/dist/i18n/locales/en.js +27 -0
- package/dist/i18n/locales/es.d.ts +23 -0
- package/dist/i18n/locales/es.js +27 -0
- package/dist/i18n/locales/fr.d.ts +23 -0
- package/dist/i18n/locales/fr.js +27 -0
- package/dist/i18n/locales/hi.d.ts +23 -0
- package/dist/i18n/locales/hi.js +27 -0
- package/dist/i18n/locales/it.d.ts +23 -0
- package/dist/i18n/locales/it.js +27 -0
- package/dist/i18n/locales/ja.d.ts +23 -0
- package/dist/i18n/locales/ja.js +27 -0
- package/dist/i18n/locales/nl.d.ts +23 -0
- package/dist/i18n/locales/nl.js +27 -0
- package/dist/i18n/locales/pl.d.ts +23 -0
- package/dist/i18n/locales/pl.js +27 -0
- package/dist/i18n/locales/pt.d.ts +23 -0
- package/dist/i18n/locales/pt.js +27 -0
- package/dist/i18n/locales/ro.d.ts +23 -0
- package/dist/i18n/locales/ro.js +27 -0
- package/dist/i18n/locales/ru.d.ts +23 -0
- package/dist/i18n/locales/ru.js +27 -0
- package/dist/i18n/locales/sq.d.ts +23 -0
- package/dist/i18n/locales/sq.js +27 -0
- package/dist/i18n/locales/sv.d.ts +23 -0
- package/dist/i18n/locales/sv.js +27 -0
- package/dist/i18n/locales/tr.d.ts +23 -0
- package/dist/i18n/locales/tr.js +27 -0
- package/dist/i18n/locales/zh.d.ts +23 -0
- package/dist/i18n/locales/zh.js +27 -0
- package/dist/index.js +2 -2
- package/dist/locales/ar.json +23 -0
- package/dist/locales/de.json +23 -0
- package/dist/locales/el.json +23 -0
- package/dist/locales/en.json +23 -0
- package/dist/locales/es.json +23 -0
- package/dist/locales/fr.json +23 -0
- package/dist/locales/hi.json +23 -0
- package/dist/locales/it.json +23 -0
- package/dist/locales/ja.json +23 -0
- package/dist/locales/nl.json +23 -0
- package/dist/locales/pl.json +23 -0
- package/dist/locales/pt.json +23 -0
- package/dist/locales/ro.json +23 -0
- package/dist/locales/ru.json +23 -0
- package/dist/locales/sq.json +23 -0
- package/dist/locales/sv.json +23 -0
- package/dist/locales/tr.json +23 -0
- package/dist/locales/zh.json +23 -0
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/practice-profile-card-C2_2ZH_G.js +0 -297
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { jsxs as u, jsx as e, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as oe, 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";
|
|
5
|
+
import { B as S } from "./badge-B9Cr6iEB.js";
|
|
6
|
+
import { C as F } from "./card-CNri9ssR.js";
|
|
7
|
+
import { K as pe, a as ue } from "./key-value-pair-CYE7NSpM.js";
|
|
8
|
+
import { L as d } from "./link-DrD_cRUg.js";
|
|
9
|
+
import { u as fe } from "./registry-nPAVE19X.js";
|
|
10
|
+
import { S as H } from "./stethoscope-DT5qCW8Y.js";
|
|
11
|
+
import { H as T, S as V, L as z } from "./shield-check-BhHyReu8.js";
|
|
12
|
+
import { c as E } from "./createLucideIcon-CrFbzy84.js";
|
|
13
|
+
import { G as K } from "./globe-BkEFMNSg.js";
|
|
14
|
+
import { M as L } from "./mail-C8irm52s.js";
|
|
15
|
+
import { M as O } from "./message-circle-C23eicgb.js";
|
|
16
|
+
import { M as U } from "./map-pin-B8STOPMJ.js";
|
|
17
|
+
/**
|
|
18
|
+
* @license lucide-react v1.8.0 - ISC
|
|
19
|
+
*
|
|
20
|
+
* This source code is licensed under the ISC license.
|
|
21
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
+
*/
|
|
23
|
+
const me = [
|
|
24
|
+
["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2", key: "9lu3g6" }],
|
|
25
|
+
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }],
|
|
26
|
+
["path", { d: "M6 12h.01M18 12h.01", key: "113zkx" }]
|
|
27
|
+
], j = E("banknote", me);
|
|
28
|
+
/**
|
|
29
|
+
* @license lucide-react v1.8.0 - ISC
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the ISC license.
|
|
32
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/
|
|
34
|
+
const he = [
|
|
35
|
+
[
|
|
36
|
+
"path",
|
|
37
|
+
{
|
|
38
|
+
d: "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",
|
|
39
|
+
key: "9njp5v"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
], B = E("phone", he), ge = {
|
|
43
|
+
id: "practice-profile-card",
|
|
44
|
+
capabilities: ["view_change"],
|
|
45
|
+
state: {
|
|
46
|
+
profession: {
|
|
47
|
+
type: "string",
|
|
48
|
+
descriptionKey: "ui.agent.practiceProfileCard.state.profession",
|
|
49
|
+
description: "Profession string the card is currently rendering — undefined when the consumer omitted it.",
|
|
50
|
+
read: (r) => r.getProfession()
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
actions: {},
|
|
54
|
+
domHooks: {
|
|
55
|
+
root: {
|
|
56
|
+
attr: "data-component",
|
|
57
|
+
value: "practice-profile-card",
|
|
58
|
+
description: "Marks the PracticeProfileCard root region."
|
|
59
|
+
},
|
|
60
|
+
instanceId: {
|
|
61
|
+
attr: "data-component-id",
|
|
62
|
+
sourceProp: "id",
|
|
63
|
+
description: "Sourced from the id prop."
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}, ve = se("ds:w-full ds:text-[color:var(--foreground)]", {
|
|
67
|
+
variants: {
|
|
68
|
+
// Matches the kit's other `surface` props (Booking, ReviewsPanel).
|
|
69
|
+
// The card itself renders `<Card variant="elevated">` so the
|
|
70
|
+
// `surface="flat"` opt-out is rare — most consumers want the
|
|
71
|
+
// boundary.
|
|
72
|
+
surface: {
|
|
73
|
+
flat: "",
|
|
74
|
+
elevated: ""
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
defaultVariants: { surface: "elevated" }
|
|
78
|
+
});
|
|
79
|
+
function xe(r) {
|
|
80
|
+
return r.replace(/[^\d+]/g, "");
|
|
81
|
+
}
|
|
82
|
+
function Pe(r, t) {
|
|
83
|
+
const a = `https://wa.me/${r}`;
|
|
84
|
+
return t ? `${a}?text=${encodeURIComponent(t)}` : a;
|
|
85
|
+
}
|
|
86
|
+
function be(r) {
|
|
87
|
+
return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(r.line)}`;
|
|
88
|
+
}
|
|
89
|
+
function ye(r, t, a) {
|
|
90
|
+
try {
|
|
91
|
+
return new Intl.NumberFormat(a, {
|
|
92
|
+
style: "currency",
|
|
93
|
+
currency: t
|
|
94
|
+
}).format(r / 100);
|
|
95
|
+
} catch {
|
|
96
|
+
return (r / 100).toFixed(2);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function Ce() {
|
|
100
|
+
if (typeof document > "u") return "4945a3";
|
|
101
|
+
const r = getComputedStyle(document.documentElement).getPropertyValue("--map-marker-color").trim(), t = /^#?([0-9a-fA-F]{6})$/.exec(r);
|
|
102
|
+
return t ? t[1] : "4945a3";
|
|
103
|
+
}
|
|
104
|
+
function ke({ apiKey: r, center: t, zoom: a, altText: c }) {
|
|
105
|
+
const s = Ce(), f = `https://maps.googleapis.com/maps/api/staticmap?center=${t.lat},${t.lng}&zoom=${a}&size=640x192&scale=2&markers=color:0x${s}%7C${t.lat},${t.lng}&key=${encodeURIComponent(r)}`;
|
|
106
|
+
return /* @__PURE__ */ e(
|
|
107
|
+
"img",
|
|
108
|
+
{
|
|
109
|
+
src: f,
|
|
110
|
+
alt: c,
|
|
111
|
+
loading: "lazy",
|
|
112
|
+
decoding: "async",
|
|
113
|
+
width: 640,
|
|
114
|
+
height: 192,
|
|
115
|
+
className: "ds:block ds:inline-size-full ds:block-size-[12rem] ds:[object-fit:cover] ds:rounded-[var(--radius-md)]"
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
const we = oe(
|
|
120
|
+
({
|
|
121
|
+
heading: r,
|
|
122
|
+
description: t,
|
|
123
|
+
address: a,
|
|
124
|
+
phone: c,
|
|
125
|
+
whatsappNumber: s,
|
|
126
|
+
whatsappMessage: f,
|
|
127
|
+
email: m,
|
|
128
|
+
website: h,
|
|
129
|
+
languages: g,
|
|
130
|
+
languageLabels: p,
|
|
131
|
+
insurances: v,
|
|
132
|
+
firstVisitPriceCents: x,
|
|
133
|
+
currencyCode: y = "EUR",
|
|
134
|
+
profession: P,
|
|
135
|
+
specializedInFearPatients: G,
|
|
136
|
+
googleMapsApiKey: C,
|
|
137
|
+
mapZoom: q = 14,
|
|
138
|
+
onPhoneClick: W,
|
|
139
|
+
onWhatsAppClick: D,
|
|
140
|
+
onMapClick: Y,
|
|
141
|
+
onEmailClick: J,
|
|
142
|
+
headerSlot: Q,
|
|
143
|
+
footerSlot: X,
|
|
144
|
+
surface: k = "elevated",
|
|
145
|
+
"aria-label": Z,
|
|
146
|
+
id: b,
|
|
147
|
+
className: ee,
|
|
148
|
+
...ae
|
|
149
|
+
}, re) => {
|
|
150
|
+
const { t: i, i18n: w } = de(), M = le(), $ = w.language ?? "en", A = r ?? i("practiceProfileCard.heading"), te = Z ?? A, I = ce(() => {
|
|
151
|
+
if (x != null)
|
|
152
|
+
return ye(x, y, $);
|
|
153
|
+
}, [x, y, $]), n = [];
|
|
154
|
+
if (a && n.push({
|
|
155
|
+
key: "address",
|
|
156
|
+
icon: /* @__PURE__ */ e(U, { "aria-hidden": "true" }),
|
|
157
|
+
label: i("practiceProfileCard.label.address"),
|
|
158
|
+
value: /* @__PURE__ */ u("span", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
159
|
+
/* @__PURE__ */ e("span", { children: a.line }),
|
|
160
|
+
a.lat != null && a.lng != null ? /* @__PURE__ */ e(
|
|
161
|
+
d,
|
|
162
|
+
{
|
|
163
|
+
href: be(a),
|
|
164
|
+
external: !0,
|
|
165
|
+
intent: "default",
|
|
166
|
+
onClick: Y,
|
|
167
|
+
children: i("practiceProfileCard.openInGoogleMaps")
|
|
168
|
+
}
|
|
169
|
+
) : null
|
|
170
|
+
] })
|
|
171
|
+
}), c && n.push({
|
|
172
|
+
key: "phone",
|
|
173
|
+
icon: /* @__PURE__ */ e(B, { "aria-hidden": "true" }),
|
|
174
|
+
label: i("practiceProfileCard.label.phone"),
|
|
175
|
+
value: /* @__PURE__ */ e(
|
|
176
|
+
d,
|
|
177
|
+
{
|
|
178
|
+
href: `tel:${xe(c)}`,
|
|
179
|
+
intent: "default",
|
|
180
|
+
onClick: W,
|
|
181
|
+
children: c
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
}), s && n.push({
|
|
185
|
+
key: "whatsapp",
|
|
186
|
+
icon: /* @__PURE__ */ e(O, { "aria-hidden": "true" }),
|
|
187
|
+
label: i("practiceProfileCard.label.whatsapp"),
|
|
188
|
+
value: /* @__PURE__ */ e(
|
|
189
|
+
d,
|
|
190
|
+
{
|
|
191
|
+
href: Pe(s, f),
|
|
192
|
+
external: !0,
|
|
193
|
+
intent: "default",
|
|
194
|
+
onClick: D,
|
|
195
|
+
children: s
|
|
196
|
+
}
|
|
197
|
+
)
|
|
198
|
+
}), m && n.push({
|
|
199
|
+
key: "email",
|
|
200
|
+
icon: /* @__PURE__ */ e(L, { "aria-hidden": "true" }),
|
|
201
|
+
label: i("practiceProfileCard.label.email"),
|
|
202
|
+
value: /* @__PURE__ */ e(
|
|
203
|
+
d,
|
|
204
|
+
{
|
|
205
|
+
href: `mailto:${m}`,
|
|
206
|
+
intent: "default",
|
|
207
|
+
onClick: J,
|
|
208
|
+
children: m
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
}), h && n.push({
|
|
212
|
+
key: "website",
|
|
213
|
+
icon: /* @__PURE__ */ e(K, { "aria-hidden": "true" }),
|
|
214
|
+
label: i("practiceProfileCard.label.website"),
|
|
215
|
+
value: /* @__PURE__ */ e(d, { href: h, external: !0, intent: "default", children: h })
|
|
216
|
+
}), g && g.length > 0) {
|
|
217
|
+
const o = (l) => {
|
|
218
|
+
if (p != null && p[l]) return p[l];
|
|
219
|
+
const N = `languages.${l}`;
|
|
220
|
+
return w.exists(N) ? i(N) : l.toUpperCase();
|
|
221
|
+
};
|
|
222
|
+
n.push({
|
|
223
|
+
key: "languages",
|
|
224
|
+
icon: /* @__PURE__ */ e(z, { "aria-hidden": "true" }),
|
|
225
|
+
label: i("practiceProfileCard.label.languages"),
|
|
226
|
+
value: /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: g.map((l) => /* @__PURE__ */ e(S, { variant: "neutral", children: o(l) }, l)) })
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
v && v.length > 0 && n.push({
|
|
230
|
+
key: "insurances",
|
|
231
|
+
icon: /* @__PURE__ */ e(V, { "aria-hidden": "true" }),
|
|
232
|
+
label: i("practiceProfileCard.label.insurances"),
|
|
233
|
+
value: /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: v.map((o) => /* @__PURE__ */ e(S, { variant: "info", children: o }, o)) })
|
|
234
|
+
}), I && n.push({
|
|
235
|
+
key: "firstVisitPrice",
|
|
236
|
+
icon: /* @__PURE__ */ e(j, { "aria-hidden": "true" }),
|
|
237
|
+
label: i("practiceProfileCard.label.firstVisitPrice"),
|
|
238
|
+
value: I
|
|
239
|
+
}), G && n.push({
|
|
240
|
+
key: "expertForAnxiousPatients",
|
|
241
|
+
icon: /* @__PURE__ */ e(T, { "aria-hidden": "true" }),
|
|
242
|
+
label: i("practiceProfileCard.label.expertForAnxiousPatients"),
|
|
243
|
+
value: i("practiceProfileCard.value.yesShort")
|
|
244
|
+
}), P && n.push({
|
|
245
|
+
key: "profession",
|
|
246
|
+
icon: /* @__PURE__ */ e(H, { "aria-hidden": "true" }),
|
|
247
|
+
label: i("practiceProfileCard.label.profession"),
|
|
248
|
+
value: P
|
|
249
|
+
}), fe(
|
|
250
|
+
ge,
|
|
251
|
+
{ getProfession: () => P },
|
|
252
|
+
b
|
|
253
|
+
);
|
|
254
|
+
const ie = /* @__PURE__ */ u(_, { children: [
|
|
255
|
+
t ? /* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:whitespace-pre-line", children: t }) : null,
|
|
256
|
+
n.length > 0 ? /* @__PURE__ */ e(pe, { rowGap: "md", children: n.map((o) => /* @__PURE__ */ e(
|
|
257
|
+
ue,
|
|
258
|
+
{
|
|
259
|
+
icon: o.icon,
|
|
260
|
+
label: o.label,
|
|
261
|
+
value: o.value
|
|
262
|
+
},
|
|
263
|
+
o.key
|
|
264
|
+
)) }) : null,
|
|
265
|
+
X
|
|
266
|
+
] }), ne = !!C && (a == null ? void 0 : a.lat) !== void 0 && (a == null ? void 0 : a.lng) !== void 0 ? /* @__PURE__ */ e(
|
|
267
|
+
ke,
|
|
268
|
+
{
|
|
269
|
+
apiKey: C,
|
|
270
|
+
center: { lat: a.lat, lng: a.lng },
|
|
271
|
+
zoom: q,
|
|
272
|
+
altText: i("practiceProfileCard.map.alt", {
|
|
273
|
+
address: a.line,
|
|
274
|
+
defaultValue: "Map showing {{address}}"
|
|
275
|
+
})
|
|
276
|
+
}
|
|
277
|
+
) : null, R = /* @__PURE__ */ u(_, { children: [
|
|
278
|
+
ne,
|
|
279
|
+
/* @__PURE__ */ u("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
280
|
+
Q,
|
|
281
|
+
/* @__PURE__ */ e(
|
|
282
|
+
"h2",
|
|
283
|
+
{
|
|
284
|
+
id: M,
|
|
285
|
+
className: "type-title-card ds:m-0 ds:text-[color:var(--foreground)]",
|
|
286
|
+
children: A
|
|
287
|
+
}
|
|
288
|
+
)
|
|
289
|
+
] }),
|
|
290
|
+
ie
|
|
291
|
+
] });
|
|
292
|
+
return /* @__PURE__ */ e(
|
|
293
|
+
"div",
|
|
294
|
+
{
|
|
295
|
+
ref: re,
|
|
296
|
+
role: "region",
|
|
297
|
+
"aria-label": te,
|
|
298
|
+
"aria-labelledby": M,
|
|
299
|
+
"data-component": "practice-profile-card",
|
|
300
|
+
"data-component-id": b,
|
|
301
|
+
id: b,
|
|
302
|
+
className: ve({ surface: k, className: ee }),
|
|
303
|
+
...ae,
|
|
304
|
+
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: R }) }) : /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: R })
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
we.displayName = "PracticeProfileCard";
|
|
310
|
+
const Ue = [
|
|
311
|
+
"address",
|
|
312
|
+
"phone",
|
|
313
|
+
"whatsapp",
|
|
314
|
+
"email",
|
|
315
|
+
"website",
|
|
316
|
+
"languages",
|
|
317
|
+
"insurances",
|
|
318
|
+
"firstVisitPrice",
|
|
319
|
+
"expertForAnxiousPatients",
|
|
320
|
+
"profession"
|
|
321
|
+
], je = {
|
|
322
|
+
address: U,
|
|
323
|
+
phone: B,
|
|
324
|
+
whatsapp: O,
|
|
325
|
+
email: L,
|
|
326
|
+
website: K,
|
|
327
|
+
languages: z,
|
|
328
|
+
insurances: V,
|
|
329
|
+
firstVisitPrice: j,
|
|
330
|
+
expertForAnxiousPatients: T,
|
|
331
|
+
profession: H
|
|
332
|
+
};
|
|
333
|
+
export {
|
|
334
|
+
je as P,
|
|
335
|
+
Ue as a,
|
|
336
|
+
we as b,
|
|
337
|
+
ge as p
|
|
338
|
+
};
|
|
339
|
+
//# sourceMappingURL=practice-profile-card-CfAMeTxQ.js.map
|