@alfadocs/ui-kit 1.54.0 → 1.54.1
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/{booking-CPUjwxj0.js → booking-BN7TXe27.js} +1542 -1532
- package/dist/_chunks/{contact-profile-card-h0QX4_5B.js → contact-profile-card-B-HzocbB.js} +45 -47
- package/dist/agent-catalog.json +1 -1
- package/dist/components/booking/booking-types.d.ts +14 -2
- package/dist/components/booking/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as f, jsx as e, Fragment as
|
|
1
|
+
import { jsxs as f, jsx as e, Fragment as T } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as le, useId as se, useMemo as ce } from "react";
|
|
3
3
|
import { c as de } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as pe } from "react-i18next";
|
|
5
5
|
import { B as P } from "./badge-hnBt8o7n.js";
|
|
6
|
-
import { C as
|
|
6
|
+
import { C as F } from "./card-DPmk26CL.js";
|
|
7
7
|
import { K as fe, a as ue } from "./key-value-pair-BkXjt88Z.js";
|
|
8
8
|
import { L as d } from "./link-2HokYuIi.js";
|
|
9
9
|
import { b as me } from "./format-price-DAbh61Lz.js";
|
|
10
10
|
import { u as he } from "./registry-DvAUVLHh.js";
|
|
11
|
-
import { S as
|
|
12
|
-
import { H
|
|
13
|
-
import { B as
|
|
11
|
+
import { S as O } from "./stethoscope-sZXGC43m.js";
|
|
12
|
+
import { H } from "./heart--qCA4ffe.js";
|
|
13
|
+
import { B as V, L as _ } from "./languages-CZqBaPwI.js";
|
|
14
14
|
import { S as z } from "./shield-check-DCJALLVh.js";
|
|
15
15
|
import { G as B } from "./globe-sHBW1JN5.js";
|
|
16
16
|
import { M as E } from "./mail-BqXVF2zH.js";
|
|
@@ -27,7 +27,7 @@ const ge = {
|
|
|
27
27
|
type: "string",
|
|
28
28
|
descriptionKey: "ui.agent.contactProfileCard.state.profession",
|
|
29
29
|
description: "Profession string the card is currently rendering — undefined when the consumer omitted it.",
|
|
30
|
-
read: (
|
|
30
|
+
read: (o) => o.getProfession()
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
actions: {},
|
|
@@ -59,23 +59,23 @@ const ge = {
|
|
|
59
59
|
defaultVariants: { surface: "elevated" }
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
|
-
function Ce(
|
|
63
|
-
return
|
|
62
|
+
function Ce(o) {
|
|
63
|
+
return o.replace(/[^\d+]/g, "");
|
|
64
64
|
}
|
|
65
|
-
function be(
|
|
66
|
-
const a = `https://wa.me/${
|
|
65
|
+
function be(o, r) {
|
|
66
|
+
const a = `https://wa.me/${o}`;
|
|
67
67
|
return r ? `${a}?text=${encodeURIComponent(r)}` : a;
|
|
68
68
|
}
|
|
69
|
-
function xe(
|
|
70
|
-
return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(
|
|
69
|
+
function xe(o) {
|
|
70
|
+
return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(o.line)}`;
|
|
71
71
|
}
|
|
72
72
|
function Pe() {
|
|
73
73
|
if (typeof document > "u") return "4945a3";
|
|
74
|
-
const
|
|
74
|
+
const o = getComputedStyle(document.documentElement).getPropertyValue("--map-marker-color").trim(), r = /^#?([0-9a-fA-F]{6})$/.exec(o);
|
|
75
75
|
return r ? r[1] : "4945a3";
|
|
76
76
|
}
|
|
77
|
-
function ye({ apiKey:
|
|
78
|
-
const c = Pe(), u = `https://maps.googleapis.com/maps/api/staticmap?center=${r.lat},${r.lng}&zoom=${a}&size=640x192&scale=2&markers=color:0x${c}%7C${r.lat},${r.lng}&key=${encodeURIComponent(
|
|
77
|
+
function ye({ apiKey: o, center: r, zoom: a, altText: s }) {
|
|
78
|
+
const c = Pe(), u = `https://maps.googleapis.com/maps/api/staticmap?center=${r.lat},${r.lng}&zoom=${a}&size=640x192&scale=2&markers=color:0x${c}%7C${r.lat},${r.lng}&key=${encodeURIComponent(o)}`;
|
|
79
79
|
return /* @__PURE__ */ e(
|
|
80
80
|
"img",
|
|
81
81
|
{
|
|
@@ -91,7 +91,7 @@ function ye({ apiKey: n, center: r, zoom: a, altText: s }) {
|
|
|
91
91
|
}
|
|
92
92
|
const ke = le(
|
|
93
93
|
({
|
|
94
|
-
heading:
|
|
94
|
+
heading: o,
|
|
95
95
|
description: r,
|
|
96
96
|
address: a,
|
|
97
97
|
phone: s,
|
|
@@ -121,7 +121,7 @@ const ke = le(
|
|
|
121
121
|
className: ee,
|
|
122
122
|
...ae
|
|
123
123
|
}, te) => {
|
|
124
|
-
const { t, i18n: M } = pe("ui"), $ = se(), A = M.language ?? "en", N =
|
|
124
|
+
const { t, i18n: M } = pe("ui"), $ = se(), A = M.language ?? "en", N = o ?? t("contactProfileCard.heading"), re = Z ?? N, R = ce(() => {
|
|
125
125
|
if (C != null)
|
|
126
126
|
return me(
|
|
127
127
|
C,
|
|
@@ -129,8 +129,8 @@ const ke = le(
|
|
|
129
129
|
A,
|
|
130
130
|
t("common.freeOfCharge")
|
|
131
131
|
);
|
|
132
|
-
}, [C, y, A, t]),
|
|
133
|
-
if (a &&
|
|
132
|
+
}, [C, y, A, t]), n = [];
|
|
133
|
+
if (a && n.push({
|
|
134
134
|
key: "address",
|
|
135
135
|
icon: /* @__PURE__ */ e(G, { "aria-hidden": "true" }),
|
|
136
136
|
label: t("contactProfileCard.label.address"),
|
|
@@ -147,7 +147,7 @@ const ke = le(
|
|
|
147
147
|
}
|
|
148
148
|
) : null
|
|
149
149
|
] })
|
|
150
|
-
}), s &&
|
|
150
|
+
}), s && n.push({
|
|
151
151
|
key: "phone",
|
|
152
152
|
icon: /* @__PURE__ */ e(U, { "aria-hidden": "true" }),
|
|
153
153
|
label: t("contactProfileCard.label.phone"),
|
|
@@ -160,7 +160,7 @@ const ke = le(
|
|
|
160
160
|
children: s
|
|
161
161
|
}
|
|
162
162
|
)
|
|
163
|
-
}), c &&
|
|
163
|
+
}), c && n.push({
|
|
164
164
|
key: "whatsapp",
|
|
165
165
|
icon: /* @__PURE__ */ e(K, { "aria-hidden": "true" }),
|
|
166
166
|
label: t("contactProfileCard.label.whatsapp"),
|
|
@@ -174,7 +174,7 @@ const ke = le(
|
|
|
174
174
|
children: c
|
|
175
175
|
}
|
|
176
176
|
)
|
|
177
|
-
}), m &&
|
|
177
|
+
}), m && n.push({
|
|
178
178
|
key: "email",
|
|
179
179
|
icon: /* @__PURE__ */ e(E, { "aria-hidden": "true" }),
|
|
180
180
|
label: t("contactProfileCard.label.email"),
|
|
@@ -187,7 +187,7 @@ const ke = le(
|
|
|
187
187
|
children: m
|
|
188
188
|
}
|
|
189
189
|
)
|
|
190
|
-
}), h &&
|
|
190
|
+
}), h && n.push({
|
|
191
191
|
key: "website",
|
|
192
192
|
icon: /* @__PURE__ */ e(B, { "aria-hidden": "true" }),
|
|
193
193
|
label: t("contactProfileCard.label.website"),
|
|
@@ -195,35 +195,34 @@ const ke = le(
|
|
|
195
195
|
}), g && g.length > 0) {
|
|
196
196
|
const i = (l) => {
|
|
197
197
|
if (p != null && p[l]) return p[l];
|
|
198
|
-
const
|
|
199
|
-
return M.exists(
|
|
198
|
+
const I = `languages.${l}`;
|
|
199
|
+
return M.exists(I) ? t(I) : l.toUpperCase();
|
|
200
200
|
};
|
|
201
|
-
|
|
201
|
+
n.push({
|
|
202
202
|
key: "languages",
|
|
203
203
|
icon: /* @__PURE__ */ e(_, { "aria-hidden": "true" }),
|
|
204
204
|
label: t("contactProfileCard.label.languages"),
|
|
205
205
|
value: /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: g.map((l) => /* @__PURE__ */ e(P, { variant: "neutral", children: i(l) }, l)) })
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
v && v.length > 0 &&
|
|
208
|
+
v && v.length > 0 && n.push({
|
|
209
209
|
key: "insurances",
|
|
210
210
|
icon: /* @__PURE__ */ e(z, { "aria-hidden": "true" }),
|
|
211
211
|
label: t("contactProfileCard.label.insurances"),
|
|
212
212
|
value: /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: v.map((i) => /* @__PURE__ */ e(P, { variant: "info", children: i }, i)) })
|
|
213
|
-
}), R &&
|
|
213
|
+
}), R && n.push({
|
|
214
214
|
key: "firstVisitPrice",
|
|
215
|
-
icon: /* @__PURE__ */ e(
|
|
215
|
+
icon: /* @__PURE__ */ e(V, { "aria-hidden": "true" }),
|
|
216
216
|
label: t("contactProfileCard.label.firstVisitPrice"),
|
|
217
|
-
value: /* @__PURE__ */ e(P, { variant: "accentSoft", size: "lg", children: R })
|
|
218
|
-
|
|
219
|
-
}), L && o.push({
|
|
217
|
+
value: /* @__PURE__ */ e(P, { variant: "accentSoft", size: "lg", children: R })
|
|
218
|
+
}), L && n.push({
|
|
220
219
|
key: "expertForAnxiousPatients",
|
|
221
|
-
icon: /* @__PURE__ */ e(
|
|
220
|
+
icon: /* @__PURE__ */ e(H, { "aria-hidden": "true" }),
|
|
222
221
|
label: t("contactProfileCard.label.expertForAnxiousPatients"),
|
|
223
222
|
value: t("contactProfileCard.value.yesShort")
|
|
224
|
-
}), b &&
|
|
223
|
+
}), b && n.push({
|
|
225
224
|
key: "profession",
|
|
226
|
-
icon: /* @__PURE__ */ e(
|
|
225
|
+
icon: /* @__PURE__ */ e(O, { "aria-hidden": "true" }),
|
|
227
226
|
label: t("contactProfileCard.label.profession"),
|
|
228
227
|
value: b
|
|
229
228
|
}), he(
|
|
@@ -231,7 +230,7 @@ const ke = le(
|
|
|
231
230
|
{ getProfession: () => b },
|
|
232
231
|
x
|
|
233
232
|
);
|
|
234
|
-
const
|
|
233
|
+
const oe = !!k && (a == null ? void 0 : a.lat) !== void 0 && (a == null ? void 0 : a.lng) !== void 0 ? /* @__PURE__ */ e(
|
|
235
234
|
ye,
|
|
236
235
|
{
|
|
237
236
|
apiKey: k,
|
|
@@ -242,21 +241,20 @@ const ke = le(
|
|
|
242
241
|
defaultValue: "Map showing {{address}}"
|
|
243
242
|
})
|
|
244
243
|
}
|
|
245
|
-
) : null,
|
|
244
|
+
) : null, ne = X ?? oe, ie = /* @__PURE__ */ f(T, { children: [
|
|
246
245
|
r ? /* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:whitespace-pre-line", children: r }) : null,
|
|
247
|
-
|
|
246
|
+
n.length > 0 ? /* @__PURE__ */ e(fe, { rowGap: "md", children: n.map((i) => /* @__PURE__ */ e(
|
|
248
247
|
ue,
|
|
249
248
|
{
|
|
250
249
|
icon: i.icon,
|
|
251
250
|
label: i.label,
|
|
252
|
-
value: i.value
|
|
253
|
-
alignValue: i.alignValue
|
|
251
|
+
value: i.value
|
|
254
252
|
},
|
|
255
253
|
i.key
|
|
256
254
|
)) }) : null,
|
|
257
|
-
|
|
255
|
+
ne,
|
|
258
256
|
Q
|
|
259
|
-
] }), S = /* @__PURE__ */ f(
|
|
257
|
+
] }), S = /* @__PURE__ */ f(T, { children: [
|
|
260
258
|
/* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
261
259
|
J,
|
|
262
260
|
/* @__PURE__ */ e(
|
|
@@ -282,7 +280,7 @@ const ke = le(
|
|
|
282
280
|
id: x,
|
|
283
281
|
className: ve({ surface: w, className: ee }),
|
|
284
282
|
...ae,
|
|
285
|
-
children: w === "elevated" ? /* @__PURE__ */ e(
|
|
283
|
+
children: w === "elevated" ? /* @__PURE__ */ e(F, { variant: "elevated", children: /* @__PURE__ */ e(F.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: S }) }) : /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: S })
|
|
286
284
|
}
|
|
287
285
|
);
|
|
288
286
|
}
|
|
@@ -307,9 +305,9 @@ const Le = [
|
|
|
307
305
|
website: B,
|
|
308
306
|
languages: _,
|
|
309
307
|
insurances: z,
|
|
310
|
-
firstVisitPrice:
|
|
311
|
-
expertForAnxiousPatients:
|
|
312
|
-
profession:
|
|
308
|
+
firstVisitPrice: V,
|
|
309
|
+
expertForAnxiousPatients: H,
|
|
310
|
+
profession: O
|
|
313
311
|
};
|
|
314
312
|
export {
|
|
315
313
|
je as C,
|
|
@@ -317,4 +315,4 @@ export {
|
|
|
317
315
|
ke as b,
|
|
318
316
|
ge as c
|
|
319
317
|
};
|
|
320
|
-
//# sourceMappingURL=contact-profile-card-
|
|
318
|
+
//# sourceMappingURL=contact-profile-card-B-HzocbB.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -71,7 +71,9 @@ export interface BookingService {
|
|
|
71
71
|
* Pre-formatted price label (e.g. "€ 80", "da € 60"). When present, the
|
|
72
72
|
* service picker shows the price INSTEAD of the duration — durations vary
|
|
73
73
|
* case by case and set the wrong expectation, while price is what patients
|
|
74
|
-
* compare.
|
|
74
|
+
* compare. With no price the picker falls back to the duration, unless
|
|
75
|
+
* Booking's `showServiceDuration` is false. `durationMin` keeps driving
|
|
76
|
+
* slot fetching either way. Currency
|
|
75
77
|
* and number formatting are the consumer's domain — the kit renders the
|
|
76
78
|
* string verbatim. Added in 1.6.0.
|
|
77
79
|
*/
|
|
@@ -429,7 +431,7 @@ export interface BookingProps extends Omit<ComponentPropsWithoutRef<'div'>, 'ari
|
|
|
429
431
|
*
|
|
430
432
|
* - `'cards'`: visual card grid (the long-standing `ServiceCardGroup`
|
|
431
433
|
* used by inline-list). Card layout, one row per service with icon,
|
|
432
|
-
* label, and duration.
|
|
434
|
+
* label, and price or duration.
|
|
433
435
|
* - `'select'`: compact `<Select>` dropdown (default for the chrome-
|
|
434
436
|
* denser variants — calendar / flexible / accordion / progress).
|
|
435
437
|
* - `'combobox'`: single-select `<Combobox>` with type-ahead search.
|
|
@@ -438,6 +440,16 @@ export interface BookingProps extends Omit<ComponentPropsWithoutRef<'div'>, 'ari
|
|
|
438
440
|
* filtered by ANY of the selected services. Added in 0.34.0.
|
|
439
441
|
*/
|
|
440
442
|
servicePickerStyle?: 'select' | 'combobox' | 'multi-select' | 'cards';
|
|
443
|
+
/**
|
|
444
|
+
* @default true
|
|
445
|
+
* Whether the service picker shows a service's duration. A service with
|
|
446
|
+
* no price shows its minutes in place of one; set this to false and it
|
|
447
|
+
* shows its name only, in every `servicePickerStyle`, and its accessible
|
|
448
|
+
* name does not mention minutes either. Priced services are unchanged:
|
|
449
|
+
* they never show a duration. `durationMin` stays required and keeps
|
|
450
|
+
* driving slot fetching. Added in 1.54.1.
|
|
451
|
+
*/
|
|
452
|
+
showServiceDuration?: boolean;
|
|
441
453
|
/**
|
|
442
454
|
* @default 'select'
|
|
443
455
|
* UI rendered for the Operator step. Independent of layout `variant`.
|
|
@@ -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-B-HzocbB.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
|
@@ -209,7 +209,7 @@ import { T as bA } from "./_chunks/typing-indicator-BmwMQSxw.js";
|
|
|
209
209
|
import { A as DA } from "./_chunks/anamnesis-card-BT1tMt5O.js";
|
|
210
210
|
import { D as FA, F as hA, a as LA, M as MA, b as yA, e as kA, f as BA, g as vA, c as GA, m as HA, r as wA, v as WA } from "./_chunks/muscle-scheme-DfYQ0Z3v.js";
|
|
211
211
|
import { A as VA, a as KA, b as YA, c as XA, d as qA, e as zA, C as jA, f as QA, g as ZA, D as JA, h as $A, E as af, L as ef, O as sf, P as rf, i as of, j as tf, k as nf, l as pf, R as mf, S as lf, m as df, n as Af, o as ff, p as cf, q as Sf, r as gf, s as Cf, t as Tf, u as xf, v as uf, w as Pf, x as If, y as Ef, z as Rf, B as _f, F as bf } from "./_chunks/optical-prescription-DBvebioV.js";
|
|
212
|
-
import { B as Df, C as Of, O as Ff, b as hf } from "./_chunks/booking-
|
|
212
|
+
import { B as Df, C as Of, O as Ff, b as hf } from "./_chunks/booking-BN7TXe27.js";
|
|
213
213
|
import { C as Mf, c as yf, r as kf } from "./_chunks/calendar-BwF5nQuW.js";
|
|
214
214
|
import { C as vf } from "./_chunks/calendar-event-card-DXAYWH6k.js";
|
|
215
215
|
import { R as Hf, a as wf } from "./_chunks/resource-chip-DQeCJzJf.js";
|
|
@@ -227,7 +227,7 @@ import { B as _c, M as bc, P as Nc, a as Dc, b as Oc, c as Fc, d as hc, S as Lc,
|
|
|
227
227
|
import { P as Yc, a as Xc, p as qc } from "./_chunks/periodontal-chart-card-Djr3en8Q.js";
|
|
228
228
|
import { D as jc, P as Qc, a as Zc, b as Jc, c as $c, S as aS, e as eS, i as sS, p as rS } from "./_chunks/periodontal-diagnosis-DmVIqXtC.js";
|
|
229
229
|
import { P as tS, a as nS, c as iS, p as pS, r as mS } from "./_chunks/periodontal-risk-chart-C1Y5f-md.js";
|
|
230
|
-
import { C as dS, a as AS, b as fS, c as cS } from "./_chunks/contact-profile-card-
|
|
230
|
+
import { C as dS, a as AS, b as fS, c as cS } from "./_chunks/contact-profile-card-B-HzocbB.js";
|
|
231
231
|
import { P as gS, p as CS } from "./_chunks/practice-results-D3liWOz1.js";
|
|
232
232
|
import { P as xS, a as uS, p as PS, b as IS } from "./_chunks/payment-request-card-CR7SjsRs.js";
|
|
233
233
|
import { P as RS, f as _S, p as bS, a as NS, s as DS, b as OS, c as FS } from "./_chunks/payment-form-B08gHZIY.js";
|
package/package.json
CHANGED