@alfadocs/ui-kit 0.30.5 → 0.31.0
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-Cw92aqo3.js → booking-Bhk9IYm3.js} +136 -147
- package/dist/_chunks/calendar-clock-CYkcqdwl.js +19 -0
- package/dist/_chunks/{editable-currency-cell-renderer-CztRy_21.js → editable-currency-cell-renderer-Od3Q-Y8J.js} +178 -189
- package/dist/_chunks/practice-results-CEKjwsgS.js +1441 -0
- package/dist/_chunks/refresh-cw-CC8jSKMr.js +17 -0
- package/dist/_chunks/smile-BSYLAHy6.js +17 -0
- package/dist/_chunks/{transaction-chip-z9ENE50O.js → transaction-chip-B8ujzowA.js} +47 -60
- package/dist/agent-catalog.json +42 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/practice-results/index.d.ts +4 -0
- package/dist/components/practice-results/index.js +6 -0
- package/dist/components/practice-results/practice-results.agent.d.ts +4 -0
- package/dist/components/practice-results/practice-results.d.ts +137 -0
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/i18n/locales/en.d.ts +65 -0
- package/dist/i18n/locales/en.js +65 -0
- package/dist/index.js +100 -97
- package/dist/locales/en.json +65 -0
- package/dist/tokens.css +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { c as e } from "./createLucideIcon-CrFbzy84.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v1.8.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const c = [
|
|
9
|
+
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
10
|
+
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
11
|
+
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
12
|
+
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
13
|
+
], a = e("refresh-cw", c);
|
|
14
|
+
export {
|
|
15
|
+
a as R
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=refresh-cw-CC8jSKMr.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { c as e } from "./createLucideIcon-CrFbzy84.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v1.8.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const y = [
|
|
9
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
10
|
+
["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
|
|
11
|
+
["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
|
|
12
|
+
["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
|
|
13
|
+
], i = e("smile", y);
|
|
14
|
+
export {
|
|
15
|
+
i as S
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=smile-BSYLAHy6.js.map
|
|
@@ -1,68 +1,55 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { C as
|
|
6
|
-
import {
|
|
1
|
+
import { jsxs as N, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as T } from "react";
|
|
3
|
+
import { c } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as C } from "react-i18next";
|
|
5
|
+
import { C as I } from "./check-DPdL_Sm7.js";
|
|
6
|
+
import { C as k } from "./calendar-clock-CYkcqdwl.js";
|
|
7
7
|
import { F as _ } from "./file-text-DSNuv2B8.js";
|
|
8
|
+
import { c as l } from "./createLucideIcon-CrFbzy84.js";
|
|
8
9
|
/**
|
|
9
10
|
* @license lucide-react v1.8.0 - ISC
|
|
10
11
|
*
|
|
11
12
|
* This source code is licensed under the ISC license.
|
|
12
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
13
14
|
*/
|
|
14
|
-
const
|
|
15
|
+
const A = [
|
|
15
16
|
["path", { d: "M17 7 7 17", key: "15tmo1" }],
|
|
16
17
|
["path", { d: "M17 17H7V7", key: "1org7z" }]
|
|
17
|
-
],
|
|
18
|
+
], E = l("arrow-down-left", A);
|
|
18
19
|
/**
|
|
19
20
|
* @license lucide-react v1.8.0 - ISC
|
|
20
21
|
*
|
|
21
22
|
* This source code is licensed under the ISC license.
|
|
22
23
|
* See the LICENSE file in the root directory of this source tree.
|
|
23
24
|
*/
|
|
24
|
-
const
|
|
25
|
+
const L = [
|
|
25
26
|
["path", { d: "M7 7h10v10", key: "1tivn9" }],
|
|
26
27
|
["path", { d: "M7 17 17 7", key: "1vkiza" }]
|
|
27
|
-
],
|
|
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 L = [
|
|
35
|
-
["path", { d: "M16 14v2.2l1.6 1", key: "fo4ql5" }],
|
|
36
|
-
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
37
|
-
["path", { d: "M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5", key: "1osxxc" }],
|
|
38
|
-
["path", { d: "M3 10h5", key: "r794hk" }],
|
|
39
|
-
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
40
|
-
["circle", { cx: "16", cy: "16", r: "6", key: "qoo3c4" }]
|
|
41
|
-
], R = t("calendar-clock", L), S = {
|
|
28
|
+
], R = l("arrow-up-right", L), S = {
|
|
42
29
|
debt: "debt",
|
|
43
30
|
credit: "credit",
|
|
44
31
|
"to-invoice": "toInvoice",
|
|
45
32
|
"to-deliver": "toDeliver",
|
|
46
33
|
settled: "settled"
|
|
47
|
-
}, V = {
|
|
48
|
-
debt: C,
|
|
49
|
-
credit: E,
|
|
50
|
-
"to-invoice": _,
|
|
51
|
-
"to-deliver": R,
|
|
52
|
-
settled: M
|
|
53
34
|
}, F = {
|
|
35
|
+
debt: E,
|
|
36
|
+
credit: R,
|
|
37
|
+
"to-invoice": _,
|
|
38
|
+
"to-deliver": k,
|
|
39
|
+
settled: I
|
|
40
|
+
}, M = {
|
|
54
41
|
debt: "−",
|
|
55
42
|
credit: "+",
|
|
56
43
|
"to-invoice": "",
|
|
57
44
|
"to-deliver": "",
|
|
58
45
|
settled: ""
|
|
59
|
-
},
|
|
46
|
+
}, V = {
|
|
60
47
|
debt: -1,
|
|
61
48
|
credit: 1,
|
|
62
49
|
"to-invoice": 1,
|
|
63
50
|
"to-deliver": 1,
|
|
64
51
|
settled: 1
|
|
65
|
-
},
|
|
52
|
+
}, D = "EUR", U = c(
|
|
66
53
|
[
|
|
67
54
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
68
55
|
"ds:rounded-[var(--radius-full)] ds:border",
|
|
@@ -114,7 +101,7 @@ const L = [
|
|
|
114
101
|
{ state: "settled", class: "ds:font-medium" }
|
|
115
102
|
]
|
|
116
103
|
}
|
|
117
|
-
),
|
|
104
|
+
), j = c(
|
|
118
105
|
"ds:shrink-0 ds:[&>svg]:block ds:rtl:[&>svg]:-scale-x-100",
|
|
119
106
|
{
|
|
120
107
|
variants: {
|
|
@@ -126,54 +113,54 @@ const L = [
|
|
|
126
113
|
},
|
|
127
114
|
defaultVariants: { size: "md" }
|
|
128
115
|
}
|
|
129
|
-
),
|
|
116
|
+
), G = T(
|
|
130
117
|
({
|
|
131
118
|
state: e,
|
|
132
|
-
amount:
|
|
133
|
-
currency:
|
|
134
|
-
locale:
|
|
119
|
+
amount: m,
|
|
120
|
+
currency: t = D,
|
|
121
|
+
locale: v,
|
|
135
122
|
size: r = "md",
|
|
136
|
-
showLabel:
|
|
137
|
-
className:
|
|
123
|
+
showLabel: f = !1,
|
|
124
|
+
className: p,
|
|
138
125
|
"aria-label": u,
|
|
139
126
|
...g
|
|
140
|
-
},
|
|
141
|
-
const { t:
|
|
127
|
+
}, b) => {
|
|
128
|
+
const { t: o, i18n: h } = C(), a = v ?? h.language ?? "en", x = F[e], i = M[e], n = Math.abs(m), y = new Intl.NumberFormat(a, {
|
|
142
129
|
style: "currency",
|
|
143
|
-
currency:
|
|
130
|
+
currency: t,
|
|
144
131
|
signDisplay: "never"
|
|
145
|
-
}).format(
|
|
132
|
+
}).format(n), d = o(`financial.state.${S[e]}`), w = new Intl.NumberFormat(a, {
|
|
146
133
|
style: "currency",
|
|
147
|
-
currency:
|
|
134
|
+
currency: t,
|
|
148
135
|
signDisplay: e === "debt" ? "always" : "auto"
|
|
149
|
-
}).format(
|
|
150
|
-
state:
|
|
151
|
-
amount:
|
|
136
|
+
}).format(n * V[e]), z = u ?? o("financial.aria.label", {
|
|
137
|
+
state: d,
|
|
138
|
+
amount: w
|
|
152
139
|
});
|
|
153
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ N(
|
|
154
141
|
"span",
|
|
155
142
|
{
|
|
156
|
-
ref:
|
|
143
|
+
ref: b,
|
|
157
144
|
role: "img",
|
|
158
|
-
"aria-label":
|
|
145
|
+
"aria-label": z,
|
|
159
146
|
"data-component": "transaction-chip",
|
|
160
147
|
"data-state": e,
|
|
161
|
-
className:
|
|
148
|
+
className: U({
|
|
162
149
|
state: e,
|
|
163
150
|
size: r,
|
|
164
151
|
bold: e !== "settled",
|
|
165
|
-
className:
|
|
152
|
+
className: p
|
|
166
153
|
}),
|
|
167
154
|
...g,
|
|
168
155
|
children: [
|
|
169
|
-
/* @__PURE__ */ s("span", { "aria-hidden": "true", className:
|
|
170
|
-
|
|
171
|
-
|
|
156
|
+
/* @__PURE__ */ s("span", { "aria-hidden": "true", className: j({ size: r }), children: /* @__PURE__ */ s(x, {}) }),
|
|
157
|
+
f && /* @__PURE__ */ s("span", { "aria-hidden": "true", className: "type-eyebrow", children: d }),
|
|
158
|
+
i && /* @__PURE__ */ s(
|
|
172
159
|
"span",
|
|
173
160
|
{
|
|
174
161
|
"aria-hidden": "true",
|
|
175
162
|
className: "ds:[font-variant-numeric:var(--font-feature-tabular)]",
|
|
176
|
-
children:
|
|
163
|
+
children: i
|
|
177
164
|
}
|
|
178
165
|
),
|
|
179
166
|
/* @__PURE__ */ s(
|
|
@@ -181,7 +168,7 @@ const L = [
|
|
|
181
168
|
{
|
|
182
169
|
"aria-hidden": "true",
|
|
183
170
|
className: "ds:[font-variant-numeric:var(--font-feature-tabular)]",
|
|
184
|
-
children:
|
|
171
|
+
children: y
|
|
185
172
|
}
|
|
186
173
|
)
|
|
187
174
|
]
|
|
@@ -189,8 +176,8 @@ const L = [
|
|
|
189
176
|
);
|
|
190
177
|
}
|
|
191
178
|
);
|
|
192
|
-
|
|
179
|
+
G.displayName = "TransactionChip";
|
|
193
180
|
export {
|
|
194
|
-
|
|
181
|
+
G as T
|
|
195
182
|
};
|
|
196
|
-
//# sourceMappingURL=transaction-chip-
|
|
183
|
+
//# sourceMappingURL=transaction-chip-B8ujzowA.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"packageVersion": "0.
|
|
3
|
+
"packageVersion": "0.31.0",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"kind": "component",
|
|
@@ -2637,6 +2637,47 @@
|
|
|
2637
2637
|
}
|
|
2638
2638
|
}
|
|
2639
2639
|
},
|
|
2640
|
+
{
|
|
2641
|
+
"kind": "component",
|
|
2642
|
+
"id": "practice-results",
|
|
2643
|
+
"capabilities": [
|
|
2644
|
+
"navigate",
|
|
2645
|
+
"view_change"
|
|
2646
|
+
],
|
|
2647
|
+
"state": [
|
|
2648
|
+
{
|
|
2649
|
+
"name": "variant",
|
|
2650
|
+
"type": "string",
|
|
2651
|
+
"description": "Active variant — one of `split-list-map`, `map-first`, `rich-cards`."
|
|
2652
|
+
}
|
|
2653
|
+
],
|
|
2654
|
+
"actions": [
|
|
2655
|
+
{
|
|
2656
|
+
"name": "scroll_to_result",
|
|
2657
|
+
"safety": "read",
|
|
2658
|
+
"argsType": "{ id: string }",
|
|
2659
|
+
"description": "Scroll the result card with the given id into the visible viewport."
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
"name": "focus_pin",
|
|
2663
|
+
"safety": "read",
|
|
2664
|
+
"argsType": "{ id: string }",
|
|
2665
|
+
"description": "Highlight the map pin for the given result id (no-op on rich-cards)."
|
|
2666
|
+
}
|
|
2667
|
+
],
|
|
2668
|
+
"domHooks": {
|
|
2669
|
+
"root": {
|
|
2670
|
+
"attr": "data-component",
|
|
2671
|
+
"value": "practice-results",
|
|
2672
|
+
"description": "Marks the PracticeResults root region."
|
|
2673
|
+
},
|
|
2674
|
+
"instanceId": {
|
|
2675
|
+
"attr": "data-component-id",
|
|
2676
|
+
"sourceProp": "id",
|
|
2677
|
+
"description": "Sourced from the id prop."
|
|
2678
|
+
}
|
|
2679
|
+
}
|
|
2680
|
+
},
|
|
2640
2681
|
{
|
|
2641
2682
|
"kind": "component",
|
|
2642
2683
|
"id": "privacy-lock",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as l, B as r, C as t, a as s, D as n, b as d, c as i, d as o, E as C, e as R, I as F, L as g, N as T, f as b, S as u, g as c, h as D, T as m, i as p, j as x, k as f, l as y, m as E, n as S, o as h, U as A, p as L, q as N, u as k } from "../../_chunks/editable-currency-cell-renderer-
|
|
1
|
+
import { A as l, B as r, C as t, a as s, D as n, b as d, c as i, d as o, E as C, e as R, I as F, L as g, N as T, f as b, S as u, g as c, h as D, T as m, i as p, j as x, k as f, l as y, m as E, n as S, o as h, U as A, p as L, q as N, u as k } from "../../_chunks/editable-currency-cell-renderer-Od3Q-Y8J.js";
|
|
2
2
|
export {
|
|
3
3
|
l as ActionsCellRenderer,
|
|
4
4
|
r as BalanceCellRenderer,
|
|
@@ -118,6 +118,7 @@ export * from './typing-indicator';
|
|
|
118
118
|
export * from './booking';
|
|
119
119
|
export * from './calendar';
|
|
120
120
|
export * from './patient-search';
|
|
121
|
+
export * from './practice-results';
|
|
121
122
|
export * from './payment-form';
|
|
122
123
|
export * from './pdf-viewer';
|
|
123
124
|
export * from './reviews-panel';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { PracticeResults } from './practice-results';
|
|
2
|
+
export type { PracticeResultsProps, PracticeResultsHandle, PracticeResultsVariant, PracticeResult, PracticeResultsValue, PracticeResultsBounds, PracticeResultsSort, PracticeResultsSelectSource, } from './practice-results';
|
|
3
|
+
export { practiceResultsAgent } from './practice-results.agent';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
export type PracticeResultsVariant = 'split-list-map' | 'map-first' | 'rich-cards';
|
|
4
|
+
export type PracticeResultsSort = 'distance' | 'rating' | 'next-available' | 'relevance';
|
|
5
|
+
export type PracticeResultsSelectSource = 'card' | 'pin';
|
|
6
|
+
export interface PracticeResultsBounds {
|
|
7
|
+
north: number;
|
|
8
|
+
south: number;
|
|
9
|
+
east: number;
|
|
10
|
+
west: number;
|
|
11
|
+
}
|
|
12
|
+
export interface PracticeResult {
|
|
13
|
+
id: string;
|
|
14
|
+
/** Stable URL for the practice or operator detail page. */
|
|
15
|
+
href: string;
|
|
16
|
+
name: string;
|
|
17
|
+
/** Profession or specialty caption. */
|
|
18
|
+
subtitle?: string;
|
|
19
|
+
/** Avatar / logo URL. */
|
|
20
|
+
imageUrl?: string;
|
|
21
|
+
/** Practice location. Required by the two map variants. */
|
|
22
|
+
location?: {
|
|
23
|
+
lat: number;
|
|
24
|
+
lng: number;
|
|
25
|
+
/** Display string e.g. "Via Brera 14, 20121 Milano". */
|
|
26
|
+
address?: string;
|
|
27
|
+
/** Distance from search centre, in km. Rendered by rich-cards. */
|
|
28
|
+
distanceKm?: number;
|
|
29
|
+
};
|
|
30
|
+
rating?: {
|
|
31
|
+
value: number;
|
|
32
|
+
count: number;
|
|
33
|
+
};
|
|
34
|
+
/** ISO 639-1 codes. Rendered as chips by rich-cards. */
|
|
35
|
+
languages?: string[];
|
|
36
|
+
/** Short brand names. Rendered as chips by rich-cards. */
|
|
37
|
+
insurances?: string[];
|
|
38
|
+
/** Anxious-patient friendly — renders an icon chip on rich-cards. */
|
|
39
|
+
specializedInFearPatients?: boolean;
|
|
40
|
+
/** Next available slot — rendered as inline CTA on rich-cards. */
|
|
41
|
+
nextAvailableSlot?: {
|
|
42
|
+
/** ISO datetime, e.g. "2026-05-23T10:30:00+02:00". */
|
|
43
|
+
dateTime: string;
|
|
44
|
+
/** Direct deep-link to the kit's Booking with this slot pre-selected. */
|
|
45
|
+
bookingHref: string;
|
|
46
|
+
};
|
|
47
|
+
/** Opaque payload echoed back in onResultSelect. */
|
|
48
|
+
__payload?: unknown;
|
|
49
|
+
}
|
|
50
|
+
export interface PracticeResultsValue {
|
|
51
|
+
/** Selected facets — keys match consumer's `facets[].key`. */
|
|
52
|
+
facets?: Record<string, string[]>;
|
|
53
|
+
/** Sort key. Default `'distance'` when searchCentre is set, otherwise `'relevance'`. */
|
|
54
|
+
sort?: PracticeResultsSort;
|
|
55
|
+
}
|
|
56
|
+
/** Shared facet shape — same as PatientSearch. */
|
|
57
|
+
export interface FacetOption {
|
|
58
|
+
value: string;
|
|
59
|
+
label: string;
|
|
60
|
+
}
|
|
61
|
+
export interface FacetGroup {
|
|
62
|
+
key: string;
|
|
63
|
+
label: string;
|
|
64
|
+
/** Empty array = boolean toggle. Non-empty = dropdown. */
|
|
65
|
+
options: FacetOption[];
|
|
66
|
+
multi?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface PracticeResultsHandle {
|
|
69
|
+
getVariant: () => PracticeResultsVariant;
|
|
70
|
+
/** Scroll a specific result into view (useful for deep-link → highlight). */
|
|
71
|
+
scrollToResult: (id: string) => void;
|
|
72
|
+
/** Imperatively focus a pin on the map (no-op on rich-cards). */
|
|
73
|
+
focusPin: (id: string) => void;
|
|
74
|
+
}
|
|
75
|
+
export interface PracticeResultsProps extends Omit<ComponentPropsWithoutRef<'div'>, 'aria-label' | 'onChange' | 'onSelect' | 'results' | 'defaultValue'>, VariantProps<typeof rootVariants> {
|
|
76
|
+
/** Default: 'split-list-map'. Pass to override (PostHog / dev-menu). */
|
|
77
|
+
variant?: PracticeResultsVariant;
|
|
78
|
+
results: PracticeResult[];
|
|
79
|
+
/** Total count for the "{{count}} risultati" header. May differ from results.length. */
|
|
80
|
+
totalCount?: number;
|
|
81
|
+
/** Visible search location — drives map centre + distance calcs. */
|
|
82
|
+
searchCentre?: {
|
|
83
|
+
lat: number;
|
|
84
|
+
lng: number;
|
|
85
|
+
label?: string;
|
|
86
|
+
};
|
|
87
|
+
facets?: FacetGroup[];
|
|
88
|
+
googleMapsApiKey?: string;
|
|
89
|
+
/** Initial map zoom. Default 13. */
|
|
90
|
+
defaultZoom?: number;
|
|
91
|
+
/** Fires when patient pans/zooms (split + map-first only). */
|
|
92
|
+
onBoundsChange?: (bounds: PracticeResultsBounds) => void;
|
|
93
|
+
/**
|
|
94
|
+
* GDPR consent gate, forwarded to the embedded MapView. When `false`
|
|
95
|
+
* (default) the kit renders the same consent placeholder MapView ships
|
|
96
|
+
* by default — third-party scripts never load until the consumer
|
|
97
|
+
* captures opt-in. Also gates the rich-cards static thumbnails (which
|
|
98
|
+
* are still IP-disclosing third-party loads).
|
|
99
|
+
*/
|
|
100
|
+
consentGranted?: boolean;
|
|
101
|
+
/** Fires when the patient clicks the "Load map" CTA in the consent placeholder. */
|
|
102
|
+
onConsentRequest?: () => void;
|
|
103
|
+
/** Fires when the patient scrolls to the bottom of the list. */
|
|
104
|
+
onLoadMore?: () => void;
|
|
105
|
+
/** True while the next page is loading — kit shows a Spinner at the list tail. */
|
|
106
|
+
loadingMore?: boolean;
|
|
107
|
+
value: PracticeResultsValue;
|
|
108
|
+
onChange: (next: PracticeResultsValue) => void;
|
|
109
|
+
onResultSelect: (result: PracticeResult, source: PracticeResultsSelectSource) => void;
|
|
110
|
+
/**
|
|
111
|
+
* Initial loading skeletons. Per SSR-first design, skeletons render
|
|
112
|
+
* only when `results.length === 0 && loading === true` so a server-
|
|
113
|
+
* rendered list isn't flashed away on hydration.
|
|
114
|
+
*/
|
|
115
|
+
loading?: boolean;
|
|
116
|
+
/** Custom empty-state slot. Defaults to the localised EmptyState. */
|
|
117
|
+
emptyResultsSlot?: ReactNode;
|
|
118
|
+
/** Custom error slot. Renders when `error` is truthy. */
|
|
119
|
+
errorSlot?: ReactNode;
|
|
120
|
+
/** Truthy = render the error slot. Pair with `onRetry` for the default slot. */
|
|
121
|
+
error?: boolean;
|
|
122
|
+
/** Retry handler for the default error slot's CTA. */
|
|
123
|
+
onRetry?: () => void;
|
|
124
|
+
/** Heading rendered above the results (e.g. "I migliori Dentisti a Milano"). */
|
|
125
|
+
heading?: string;
|
|
126
|
+
/** Intro text below the heading. */
|
|
127
|
+
intro?: string;
|
|
128
|
+
'aria-label'?: string;
|
|
129
|
+
/** Agent-readiness instance id. */
|
|
130
|
+
id?: string;
|
|
131
|
+
}
|
|
132
|
+
declare const rootVariants: (props?: ({
|
|
133
|
+
variant?: "split-list-map" | "map-first" | "rich-cards" | null | undefined;
|
|
134
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
135
|
+
export declare const PracticeResults: import("react").ForwardRefExoticComponent<PracticeResultsProps & import("react").RefAttributes<PracticeResultsHandle>>;
|
|
136
|
+
export {};
|
|
137
|
+
//# sourceMappingURL=practice-results.d.ts.map
|
|
@@ -1101,6 +1101,71 @@ export declare const enUi: {
|
|
|
1101
1101
|
readonly cta: "Search";
|
|
1102
1102
|
};
|
|
1103
1103
|
};
|
|
1104
|
+
readonly practiceResults: {
|
|
1105
|
+
readonly regionLabel: "Practice search results";
|
|
1106
|
+
readonly loading: "Loading results…";
|
|
1107
|
+
readonly results: {
|
|
1108
|
+
readonly heading_one: "{{count}} result in {{place}}";
|
|
1109
|
+
readonly heading_other: "{{count}} results in {{place}}";
|
|
1110
|
+
readonly summary_one: "{{count}} result";
|
|
1111
|
+
readonly summary_other: "{{count}} results";
|
|
1112
|
+
};
|
|
1113
|
+
readonly list: {
|
|
1114
|
+
readonly label: "Practice results list";
|
|
1115
|
+
};
|
|
1116
|
+
readonly map: {
|
|
1117
|
+
readonly label: "Practice results map";
|
|
1118
|
+
};
|
|
1119
|
+
readonly thumbnail: {
|
|
1120
|
+
readonly alt: "Map preview of the practice location";
|
|
1121
|
+
};
|
|
1122
|
+
readonly filters: {
|
|
1123
|
+
readonly label: "Filters";
|
|
1124
|
+
readonly clear: "Clear filters";
|
|
1125
|
+
readonly empty: "No filters available.";
|
|
1126
|
+
};
|
|
1127
|
+
readonly sort: {
|
|
1128
|
+
readonly label: "Sort";
|
|
1129
|
+
readonly distance: "Distance";
|
|
1130
|
+
readonly rating: "Rating";
|
|
1131
|
+
readonly nextAvailable: "Next available";
|
|
1132
|
+
readonly relevance: "Relevance";
|
|
1133
|
+
};
|
|
1134
|
+
readonly empty: {
|
|
1135
|
+
readonly title: "No results";
|
|
1136
|
+
readonly description: "Try widening the radius or removing a filter.";
|
|
1137
|
+
};
|
|
1138
|
+
readonly error: {
|
|
1139
|
+
readonly title: "We couldn't load the results";
|
|
1140
|
+
readonly description: "Check your connection and try again.";
|
|
1141
|
+
readonly retry: "Try again";
|
|
1142
|
+
};
|
|
1143
|
+
readonly viewMap: "View map";
|
|
1144
|
+
readonly viewList: "View list";
|
|
1145
|
+
readonly nextSlot: {
|
|
1146
|
+
readonly summary: "Next available {{time}}";
|
|
1147
|
+
readonly cta: "Book at {{time}}";
|
|
1148
|
+
};
|
|
1149
|
+
readonly distance: {
|
|
1150
|
+
readonly km: "{{distance}} km";
|
|
1151
|
+
readonly below: "< 1 km";
|
|
1152
|
+
};
|
|
1153
|
+
readonly fearPatient: {
|
|
1154
|
+
readonly label: "Anxious-patient friendly";
|
|
1155
|
+
};
|
|
1156
|
+
readonly sheet: {
|
|
1157
|
+
readonly title_one: "{{count}} practice";
|
|
1158
|
+
readonly title_other: "{{count}} practices";
|
|
1159
|
+
readonly description: "Map of the matching practices with the result list beneath.";
|
|
1160
|
+
readonly descriptionMapFirst: "Practice list, sort controls, and sheet snap-state radio group.";
|
|
1161
|
+
readonly snap: {
|
|
1162
|
+
readonly label: "Sheet size";
|
|
1163
|
+
readonly peek: "Peek";
|
|
1164
|
+
readonly half: "Half";
|
|
1165
|
+
readonly full: "Full";
|
|
1166
|
+
};
|
|
1167
|
+
};
|
|
1168
|
+
};
|
|
1104
1169
|
readonly reviewsPanel: {
|
|
1105
1170
|
readonly regionLabel: "Patient reviews";
|
|
1106
1171
|
readonly title: "Patient reviews";
|
package/dist/i18n/locales/en.js
CHANGED
|
@@ -1080,6 +1080,71 @@ const e = {
|
|
|
1080
1080
|
cta: "Search"
|
|
1081
1081
|
}
|
|
1082
1082
|
},
|
|
1083
|
+
practiceResults: {
|
|
1084
|
+
regionLabel: "Practice search results",
|
|
1085
|
+
loading: "Loading results…",
|
|
1086
|
+
results: {
|
|
1087
|
+
heading_one: "{{count}} result in {{place}}",
|
|
1088
|
+
heading_other: "{{count}} results in {{place}}",
|
|
1089
|
+
summary_one: "{{count}} result",
|
|
1090
|
+
summary_other: "{{count}} results"
|
|
1091
|
+
},
|
|
1092
|
+
list: {
|
|
1093
|
+
label: "Practice results list"
|
|
1094
|
+
},
|
|
1095
|
+
map: {
|
|
1096
|
+
label: "Practice results map"
|
|
1097
|
+
},
|
|
1098
|
+
thumbnail: {
|
|
1099
|
+
alt: "Map preview of the practice location"
|
|
1100
|
+
},
|
|
1101
|
+
filters: {
|
|
1102
|
+
label: "Filters",
|
|
1103
|
+
clear: "Clear filters",
|
|
1104
|
+
empty: "No filters available."
|
|
1105
|
+
},
|
|
1106
|
+
sort: {
|
|
1107
|
+
label: "Sort",
|
|
1108
|
+
distance: "Distance",
|
|
1109
|
+
rating: "Rating",
|
|
1110
|
+
nextAvailable: "Next available",
|
|
1111
|
+
relevance: "Relevance"
|
|
1112
|
+
},
|
|
1113
|
+
empty: {
|
|
1114
|
+
title: "No results",
|
|
1115
|
+
description: "Try widening the radius or removing a filter."
|
|
1116
|
+
},
|
|
1117
|
+
error: {
|
|
1118
|
+
title: "We couldn't load the results",
|
|
1119
|
+
description: "Check your connection and try again.",
|
|
1120
|
+
retry: "Try again"
|
|
1121
|
+
},
|
|
1122
|
+
viewMap: "View map",
|
|
1123
|
+
viewList: "View list",
|
|
1124
|
+
nextSlot: {
|
|
1125
|
+
summary: "Next available {{time}}",
|
|
1126
|
+
cta: "Book at {{time}}"
|
|
1127
|
+
},
|
|
1128
|
+
distance: {
|
|
1129
|
+
km: "{{distance}} km",
|
|
1130
|
+
below: "< 1 km"
|
|
1131
|
+
},
|
|
1132
|
+
fearPatient: {
|
|
1133
|
+
label: "Anxious-patient friendly"
|
|
1134
|
+
},
|
|
1135
|
+
sheet: {
|
|
1136
|
+
title_one: "{{count}} practice",
|
|
1137
|
+
title_other: "{{count}} practices",
|
|
1138
|
+
description: "Map of the matching practices with the result list beneath.",
|
|
1139
|
+
descriptionMapFirst: "Practice list, sort controls, and sheet snap-state radio group.",
|
|
1140
|
+
snap: {
|
|
1141
|
+
label: "Sheet size",
|
|
1142
|
+
peek: "Peek",
|
|
1143
|
+
half: "Half",
|
|
1144
|
+
full: "Full"
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
},
|
|
1083
1148
|
reviewsPanel: {
|
|
1084
1149
|
regionLabel: "Patient reviews",
|
|
1085
1150
|
title: "Patient reviews",
|