@alfadocs/ui-kit-debug 1.39.0 → 1.41.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/{ai-consent-banner-DvtaM3yg.js → ai-consent-banner-D7I2U-cz.js} +37 -36
- package/dist/_chunks/ai-consent-banner-D7I2U-cz.js.map +1 -0
- package/dist/_chunks/arrow-left-BfaGqVam.js +15 -0
- package/dist/_chunks/arrow-left-BfaGqVam.js.map +1 -0
- package/dist/_chunks/{booking-Dn3jvv3K.js → booking-D43ASl8y.js} +1109 -1103
- package/dist/_chunks/booking-D43ASl8y.js.map +1 -0
- package/dist/_chunks/{calendar-workspace-B-fUbm62.js → calendar-workspace-UllCER2k.js} +2170 -2163
- package/dist/_chunks/calendar-workspace-UllCER2k.js.map +1 -0
- package/dist/_chunks/{contact-profile-card-Zt6WNg1u.js → contact-profile-card-C0WpwpVV.js} +38 -33
- package/dist/_chunks/contact-profile-card-C0WpwpVV.js.map +1 -0
- package/dist/_chunks/editor-overlay-DwNKaI22.js +93 -0
- package/dist/_chunks/editor-overlay-DwNKaI22.js.map +1 -0
- package/dist/_chunks/format-price-DAbh61Lz.js +51 -0
- package/dist/_chunks/format-price-DAbh61Lz.js.map +1 -0
- package/dist/_chunks/help-me-write-templates-GB70jnV9.js +764 -0
- package/dist/_chunks/help-me-write-templates-GB70jnV9.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-d2EtcUbe.js → marketplace-app-shell-D_g9BaDI.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-d2EtcUbe.js.map → marketplace-app-shell-D_g9BaDI.js.map} +1 -1
- package/dist/_chunks/{money-BY-HmKhZ.js → money-BXLBIRVO.js} +2 -2
- package/dist/_chunks/{money-BY-HmKhZ.js.map → money-BXLBIRVO.js.map} +1 -1
- package/dist/_chunks/{notes-panel-CAD1Ytcj.js → notes-panel-_diLt8Cj.js} +76 -73
- package/dist/_chunks/notes-panel-_diLt8Cj.js.map +1 -0
- package/dist/_chunks/{panel-subview-Cc2Wtt7D.js → panel-subview-PMBRPFOa.js} +49 -59
- package/dist/_chunks/panel-subview-PMBRPFOa.js.map +1 -0
- package/dist/_chunks/{practice-results-D_jjzwgf.js → practice-results-D11Zpt27.js} +50 -45
- package/dist/_chunks/practice-results-D11Zpt27.js.map +1 -0
- package/dist/_chunks/rich-text-editor-D7AKKAQ2.js +3119 -0
- package/dist/_chunks/rich-text-editor-D7AKKAQ2.js.map +1 -0
- package/dist/_chunks/{sidebar-C-Gr2LL-.js → sidebar-ClTY9lLI.js} +160 -169
- package/dist/_chunks/sidebar-ClTY9lLI.js.map +1 -0
- package/dist/_chunks/{treatment-receipt-dUm99mdn.js → treatment-receipt-DU0OewqH.js} +2 -2
- package/dist/_chunks/{treatment-receipt-dUm99mdn.js.map → treatment-receipt-DU0OewqH.js.map} +1 -1
- package/dist/_chunks/trending-up-C_luYBzS.js +15 -0
- package/dist/_chunks/trending-up-C_luYBzS.js.map +1 -0
- package/dist/_chunks/wand-sparkles-DAjKyhz7.js +27 -0
- package/dist/_chunks/wand-sparkles-DAjKyhz7.js.map +1 -0
- package/dist/agent-catalog.json +87 -1
- package/dist/agent-i18n/en.json +7 -0
- package/dist/components/_shared/format-price.d.ts +6 -0
- package/dist/components/_shared/format-price.d.ts.map +1 -1
- package/dist/components/_shared/index.d.ts +1 -1
- package/dist/components/_shared/index.d.ts.map +1 -1
- package/dist/components/ai-consent-banner/ai-consent-banner.d.ts +9 -0
- package/dist/components/ai-consent-banner/ai-consent-banner.d.ts.map +1 -1
- package/dist/components/ai-consent-banner/index.d.ts +1 -1
- package/dist/components/ai-consent-banner/index.d.ts.map +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/booking/booking-types.d.ts +6 -0
- package/dist/components/booking/booking-types.d.ts.map +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/cascade.d.ts +6 -0
- package/dist/components/booking/cascade.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/contact-profile-card/contact-profile-card.d.ts +2 -2
- package/dist/components/contact-profile-card/contact-profile-card.d.ts.map +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/editor-overlay/editor-overlay.d.ts.map +1 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/money/index.js +1 -1
- package/dist/components/notes-panel/index.d.ts +1 -0
- package/dist/components/notes-panel/index.d.ts.map +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +8 -1
- package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
- package/dist/components/panel-subview/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +2 -1
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +6 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.d.ts +1 -1
- package/dist/components/rich-text-editor/index.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +122 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/treatment-receipt/index.js +1 -1
- package/dist/host-compat.css +13 -1
- package/dist/i18n/locales/ar.d.ts +92 -11
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +94 -13
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +92 -11
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +94 -13
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +92 -11
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +94 -13
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +81 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +83 -2
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +92 -11
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +94 -13
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +92 -11
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +94 -13
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +92 -11
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +94 -13
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +92 -11
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +94 -13
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +92 -11
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +94 -13
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +92 -11
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +94 -13
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +92 -11
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +94 -13
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +92 -11
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +94 -13
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +92 -11
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +94 -13
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +92 -11
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +94 -13
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +92 -11
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +94 -13
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +92 -11
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +94 -13
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +92 -11
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +94 -13
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +92 -11
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +94 -13
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +143 -136
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +94 -13
- package/dist/locales/de.json +94 -13
- package/dist/locales/el.json +94 -13
- package/dist/locales/en.json +83 -2
- package/dist/locales/es.json +94 -13
- package/dist/locales/fr.json +94 -13
- package/dist/locales/hi.json +94 -13
- package/dist/locales/it.json +94 -13
- package/dist/locales/ja.json +94 -13
- package/dist/locales/nl.json +94 -13
- package/dist/locales/pl.json +94 -13
- package/dist/locales/pt.json +94 -13
- package/dist/locales/ro.json +94 -13
- package/dist/locales/ru.json +94 -13
- package/dist/locales/sq.json +94 -13
- package/dist/locales/sv.json +94 -13
- package/dist/locales/tr.json +94 -13
- package/dist/locales/zh.json +94 -13
- package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.journey.d.ts +9 -1
- package/dist/patterns/calendar/calendar.journey.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.sheets.d.ts +6 -1
- package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +164 -0
- package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts.map +1 -0
- package/dist/patterns/help-me-write-templates/index.d.ts +3 -0
- package/dist/patterns/help-me-write-templates/index.d.ts.map +1 -0
- package/dist/patterns/help-me-write-templates/index.js +10 -0
- package/dist/patterns/help-me-write-templates/index.js.map +1 -0
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +51 -42
- package/package.json +5 -1
- package/dist/_chunks/ai-consent-banner-DvtaM3yg.js.map +0 -1
- package/dist/_chunks/booking-Dn3jvv3K.js.map +0 -1
- package/dist/_chunks/calendar-workspace-B-fUbm62.js.map +0 -1
- package/dist/_chunks/contact-profile-card-Zt6WNg1u.js.map +0 -1
- package/dist/_chunks/editor-overlay-9tcPXNWt.js +0 -89
- package/dist/_chunks/editor-overlay-9tcPXNWt.js.map +0 -1
- package/dist/_chunks/format-price-BkMEbeW3.js +0 -47
- package/dist/_chunks/format-price-BkMEbeW3.js.map +0 -1
- package/dist/_chunks/notes-panel-CAD1Ytcj.js.map +0 -1
- package/dist/_chunks/panel-subview-Cc2Wtt7D.js.map +0 -1
- package/dist/_chunks/practice-results-D_jjzwgf.js.map +0 -1
- package/dist/_chunks/rich-text-editor-C6fE-uP4.js +0 -2627
- package/dist/_chunks/rich-text-editor-C6fE-uP4.js.map +0 -1
- package/dist/_chunks/sidebar-C-Gr2LL-.js.map +0 -1
|
@@ -1,24 +1,15 @@
|
|
|
1
|
-
import { jsxs as P, jsx as o, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as P, jsx as o, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as j, useId as z, useRef as m, useCallback as B, useEffect as E } from "react";
|
|
3
3
|
import { c as b } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { I as
|
|
5
|
-
import { P as
|
|
6
|
-
import { S as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
* @license lucide-react v1.22.0 - ISC
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the ISC license.
|
|
14
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/
|
|
16
|
-
const U = [
|
|
17
|
-
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
18
|
-
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
19
|
-
], G = K("arrow-left", U), J = b(
|
|
4
|
+
import { I as D } from "./icon-button-CehAeZoP.js";
|
|
5
|
+
import { P as M } from "./panel-header-D_mTdhUp.js";
|
|
6
|
+
import { S as q } from "./scroll-area-BZOvUhwQ.js";
|
|
7
|
+
import { u as S } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
8
|
+
import { u as K } from "./use-presence-transition-cDwWUXV-.js";
|
|
9
|
+
import { A as U } from "./arrow-left-BfaGqVam.js";
|
|
10
|
+
const _ = b(
|
|
20
11
|
"ds:relative ds:flex ds:h-full ds:min-h-0 ds:flex-col ds:overflow-hidden"
|
|
21
|
-
),
|
|
12
|
+
), G = b(
|
|
22
13
|
[
|
|
23
14
|
"ds:absolute ds:inset-0 ds:z-[2] ds:flex ds:min-h-0 ds:flex-col",
|
|
24
15
|
"ds:bg-[var(--background)] ds:focus-visible:outline-none",
|
|
@@ -31,50 +22,50 @@ const U = [
|
|
|
31
22
|
"ds:rtl:data-[presence=entering]:-translate-x-full ds:rtl:data-[presence=leaving]:-translate-x-full",
|
|
32
23
|
"ds:data-[presence=leaving]:pointer-events-none"
|
|
33
24
|
].join(" ")
|
|
34
|
-
),
|
|
25
|
+
), J = '[role="combobox"][aria-expanded="true"], [aria-haspopup][aria-expanded="true"]', Q = b(
|
|
35
26
|
[
|
|
36
27
|
"ds:flex ds:shrink-0 ds:items-center ds:justify-end",
|
|
37
28
|
"ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]",
|
|
38
29
|
"ds:border-t ds:border-[color:var(--border)]"
|
|
39
30
|
].join(" ")
|
|
40
|
-
),
|
|
41
|
-
({ className: t, children: i, ...p },
|
|
31
|
+
), A = j(
|
|
32
|
+
({ className: t, children: i, ...p }, c) => /* @__PURE__ */ o(
|
|
42
33
|
"div",
|
|
43
34
|
{
|
|
44
|
-
ref:
|
|
35
|
+
ref: c,
|
|
45
36
|
"data-component": "panel-subview-host",
|
|
46
|
-
className: [
|
|
37
|
+
className: [_(), t].filter(Boolean).join(" "),
|
|
47
38
|
...p,
|
|
48
39
|
children: i
|
|
49
40
|
}
|
|
50
41
|
)
|
|
51
42
|
);
|
|
52
|
-
|
|
53
|
-
const
|
|
43
|
+
A.displayName = "PanelSubview.Host";
|
|
44
|
+
const I = j(
|
|
54
45
|
({
|
|
55
46
|
open: t,
|
|
56
47
|
onBack: i,
|
|
57
48
|
title: p,
|
|
58
|
-
backLabel:
|
|
59
|
-
icon:
|
|
60
|
-
headingLevel:
|
|
49
|
+
backLabel: c,
|
|
50
|
+
icon: N,
|
|
51
|
+
headingLevel: k,
|
|
61
52
|
headerActions: H,
|
|
62
53
|
footer: h,
|
|
63
54
|
onExited: L,
|
|
64
55
|
initialFocusRef: l,
|
|
65
56
|
className: O,
|
|
66
57
|
children: R,
|
|
67
|
-
...
|
|
68
|
-
},
|
|
69
|
-
const g =
|
|
70
|
-
|
|
71
|
-
const { ref:
|
|
58
|
+
...C
|
|
59
|
+
}, d) => {
|
|
60
|
+
const g = z(), s = K(t, { onExited: L }), u = m(null), v = m(null), w = m(i);
|
|
61
|
+
w.current = i;
|
|
62
|
+
const { ref: x } = s, T = B(
|
|
72
63
|
(e) => {
|
|
73
|
-
u.current = e,
|
|
64
|
+
u.current = e, x(e), typeof d == "function" ? d(e) : d && (d.current = e);
|
|
74
65
|
},
|
|
75
|
-
[
|
|
76
|
-
),
|
|
77
|
-
t && !
|
|
66
|
+
[x, d]
|
|
67
|
+
), y = m(t);
|
|
68
|
+
t && !y.current && typeof document < "u" && (v.current = document.activeElement instanceof HTMLElement ? document.activeElement : null), y.current = t, S(() => {
|
|
78
69
|
const e = u.current, n = e == null ? void 0 : e.parentElement;
|
|
79
70
|
if (!t || !e || !n) return;
|
|
80
71
|
const r = Array.from(n.children).filter(
|
|
@@ -85,7 +76,7 @@ const S = I(
|
|
|
85
76
|
};
|
|
86
77
|
}, [t, s.mounted, l]);
|
|
87
78
|
const f = !t;
|
|
88
|
-
return
|
|
79
|
+
return S(() => {
|
|
89
80
|
const e = u.current;
|
|
90
81
|
if (!e) return;
|
|
91
82
|
const n = document.activeElement;
|
|
@@ -100,40 +91,40 @@ const S = I(
|
|
|
100
91
|
const e = u.current;
|
|
101
92
|
if (!t || !e) return;
|
|
102
93
|
const n = (r) => {
|
|
103
|
-
r.key === "Escape" && (r.stopPropagation(), !(r.defaultPrevented && e.querySelector(
|
|
94
|
+
r.key === "Escape" && (r.stopPropagation(), !(r.defaultPrevented && e.querySelector(J)) && (r.preventDefault(), w.current()));
|
|
104
95
|
};
|
|
105
96
|
return e.addEventListener("keydown", n), () => e.removeEventListener("keydown", n);
|
|
106
97
|
}, [t, s.mounted]), s.mounted ? /* @__PURE__ */ P(
|
|
107
98
|
"section",
|
|
108
99
|
{
|
|
109
|
-
...
|
|
110
|
-
ref:
|
|
100
|
+
...C,
|
|
101
|
+
ref: T,
|
|
111
102
|
tabIndex: -1,
|
|
112
103
|
"aria-labelledby": g,
|
|
113
104
|
"aria-hidden": f || void 0,
|
|
114
105
|
"data-component": "panel-subview",
|
|
115
106
|
"data-presence": s.phase,
|
|
116
|
-
className: [
|
|
107
|
+
className: [G(), O].filter(Boolean).join(" "),
|
|
117
108
|
children: [
|
|
118
109
|
/* @__PURE__ */ o(
|
|
119
|
-
|
|
110
|
+
M,
|
|
120
111
|
{
|
|
121
|
-
icon:
|
|
112
|
+
icon: N,
|
|
122
113
|
title: p,
|
|
123
114
|
headingId: g,
|
|
124
|
-
headingLevel:
|
|
115
|
+
headingLevel: k,
|
|
125
116
|
sticky: !0,
|
|
126
117
|
divider: !0,
|
|
127
|
-
actions: /* @__PURE__ */ P(
|
|
118
|
+
actions: /* @__PURE__ */ P(V, { children: [
|
|
128
119
|
/* @__PURE__ */ o(
|
|
129
|
-
|
|
120
|
+
D,
|
|
130
121
|
{
|
|
131
|
-
icon: /* @__PURE__ */ o(
|
|
122
|
+
icon: /* @__PURE__ */ o(U, { "aria-hidden": "true" }),
|
|
132
123
|
intent: "ghost",
|
|
133
124
|
size: "sm",
|
|
134
125
|
flipIconInRtl: !0,
|
|
135
|
-
"aria-label":
|
|
136
|
-
tooltip:
|
|
126
|
+
"aria-label": c,
|
|
127
|
+
tooltip: c,
|
|
137
128
|
"data-panel-subview-back": "",
|
|
138
129
|
onClick: i
|
|
139
130
|
}
|
|
@@ -142,19 +133,18 @@ const S = I(
|
|
|
142
133
|
] })
|
|
143
134
|
}
|
|
144
135
|
),
|
|
145
|
-
/* @__PURE__ */ o(
|
|
146
|
-
h ? /* @__PURE__ */ o("div", { "data-panel-subview-footer": "", className:
|
|
136
|
+
/* @__PURE__ */ o(q, { orientation: "vertical", className: "ds:min-h-0 ds:flex-1", children: R }),
|
|
137
|
+
h ? /* @__PURE__ */ o("div", { "data-panel-subview-footer": "", className: Q(), children: h }) : null
|
|
147
138
|
]
|
|
148
139
|
}
|
|
149
140
|
) : null;
|
|
150
141
|
}
|
|
151
142
|
);
|
|
152
|
-
|
|
153
|
-
const
|
|
154
|
-
Host:
|
|
143
|
+
I.displayName = "PanelSubview";
|
|
144
|
+
const re = Object.assign(I, {
|
|
145
|
+
Host: A
|
|
155
146
|
});
|
|
156
147
|
export {
|
|
157
|
-
|
|
158
|
-
ae as P
|
|
148
|
+
re as P
|
|
159
149
|
};
|
|
160
|
-
//# sourceMappingURL=panel-subview-
|
|
150
|
+
//# sourceMappingURL=panel-subview-PMBRPFOa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-subview-PMBRPFOa.js","sources":["../../src/components/panel-subview/panel-subview.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useRef,\n type HTMLAttributes,\n type ReactNode,\n type RefObject,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { ArrowLeft } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\nimport { PanelHeader } from '../panel-header/panel-header';\nimport { ScrollArea } from '../scroll-area/scroll-area';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { usePresenceTransition } from '../../hooks/use-presence-transition';\n\n/* -------------------------------------------------------------------- */\n/* PanelSubview */\n/* */\n/* A panel inside a panel: a second view that slides over a rail panel's */\n/* own body and hands it back. An edit form, a history, a detail drilled */\n/* into from a list. The panel underneath stays mounted, so its scroll */\n/* position and state are there when the reader comes back. */\n/* */\n/* Use it instead of a Dialog when the task belongs to the panel. A modal */\n/* blanks out the calendar the rail sits beside, and the list the item */\n/* came from; a subview covers only the panel. */\n/* */\n/* It exists because the shape was being hand-built per tool: a view */\n/* flag, a PanelHeader with a back arrow, a scroll body, a pinned footer, */\n/* and focus moved by hand. Hand-built, none of them animated and each */\n/* forgot a different part of the focus contract. */\n/* */\n/* The host must be a positioned, clipped box. Wrap the panel in */\n/* `PanelSubview.Host` and render the subview as its LAST child. */\n/* -------------------------------------------------------------------- */\n\nconst hostVariants = cva(\n 'ds:relative ds:flex ds:h-full ds:min-h-0 ds:flex-col ds:overflow-hidden',\n);\n\nconst subviewVariants = cva(\n [\n 'ds:absolute ds:inset-0 ds:z-[2] ds:flex ds:min-h-0 ds:flex-col',\n 'ds:bg-[var(--background)] ds:focus-visible:outline-none',\n // Slides in from the inline end, and back out the same way. Declared at\n // rest so both directions have a value to move from.\n 'ds:transition-[opacity,translate] ds:duration-[var(--animation-duration)]',\n 'ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none',\n 'ds:data-[presence=entering]:opacity-0 ds:data-[presence=leaving]:opacity-0',\n 'ds:data-[presence=entering]:translate-x-full ds:data-[presence=leaving]:translate-x-full',\n 'ds:rtl:data-[presence=entering]:-translate-x-full ds:rtl:data-[presence=leaving]:-translate-x-full',\n 'ds:data-[presence=leaving]:pointer-events-none',\n ].join(' '),\n);\n\n/* A control inside the subview whose popup is showing right now. */\nconst OPEN_POPUP =\n '[role=\"combobox\"][aria-expanded=\"true\"], [aria-haspopup][aria-expanded=\"true\"]';\n\nconst footerVariants = cva(\n [\n 'ds:flex ds:shrink-0 ds:items-center ds:justify-end',\n 'ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]',\n 'ds:border-t ds:border-[color:var(--border)]',\n ].join(' '),\n);\n\n/* -------------------------------------------------------------------- */\n/* Host */\n/* -------------------------------------------------------------------- */\n\nexport type PanelSubviewHostProps = HTMLAttributes<HTMLDivElement>;\n\n/** The positioned, clipped box a subview slides inside. Fills its parent. */\nconst PanelSubviewHost = forwardRef<HTMLDivElement, PanelSubviewHostProps>(\n ({ className, children, ...rest }, ref) => (\n <div\n ref={ref}\n data-component=\"panel-subview-host\"\n className={[hostVariants(), className].filter(Boolean).join(' ')}\n {...rest}\n >\n {children}\n </div>\n ),\n);\nPanelSubviewHost.displayName = 'PanelSubview.Host';\n\n/* -------------------------------------------------------------------- */\n/* Subview */\n/* -------------------------------------------------------------------- */\n\nexport interface PanelSubviewProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'title'\n> {\n /** Whether the subview is showing. It animates in and out around this. */\n open: boolean;\n /** Fires from the back button and from Escape. Set `open` false in reply. */\n onBack: () => void;\n /** The subview's heading. Already translated upstream. */\n title: ReactNode;\n /** Accessible name and tooltip of the back button. Already translated. */\n backLabel: string;\n /** Optional leading glyph for the heading. */\n icon?: ReactNode;\n /** Heading level. Default `2`; pass `3` to read as subordinate to the host. */\n headingLevel?: 2 | 3;\n /** Extra header actions, rendered after the back button. */\n headerActions?: ReactNode;\n /** Pinned below the scroll body: the form's cancel and save, typically. */\n footer?: ReactNode;\n /** Fires once the exit has played and the subview has unmounted. */\n onExited?: () => void;\n /**\n * Focus this on open instead of the subview itself: a form's first field,\n * say. The subview is still announced through its heading.\n */\n initialFocusRef?: RefObject<HTMLElement | null>;\n children: ReactNode;\n}\n\nconst PanelSubviewRoot = forwardRef<HTMLElement, PanelSubviewProps>(\n (\n {\n open,\n onBack,\n title,\n backLabel,\n icon,\n headingLevel,\n headerActions,\n footer,\n onExited,\n initialFocusRef,\n className,\n children,\n ...rest\n },\n ref,\n ) => {\n const headingId = useId();\n const presence = usePresenceTransition<HTMLElement>(open, { onExited });\n const nodeRef = useRef<HTMLElement | null>(null);\n const returnFocusRef = useRef<HTMLElement | null>(null);\n const onBackRef = useRef(onBack);\n onBackRef.current = onBack;\n\n const { ref: presenceRef } = presence;\n const setNode = useCallback(\n (node: HTMLElement | null) => {\n nodeRef.current = node;\n presenceRef(node);\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n },\n [presenceRef, ref],\n );\n\n // Remember where focus was BEFORE the subview takes it, during render of\n // the opening pass, so the trigger is still the active element.\n const wasOpenRef = useRef(open);\n if (open && !wasOpenRef.current && typeof document !== 'undefined') {\n returnFocusRef.current =\n document.activeElement instanceof HTMLElement\n ? document.activeElement\n : null;\n }\n wasOpenRef.current = open;\n\n /* The panel underneath is covered, so it leaves the tab order and the\n accessibility tree for as long as the subview is open. */\n useIsomorphicLayoutEffect(() => {\n const node = nodeRef.current;\n const parent = node?.parentElement;\n if (!open || !node || !parent) return undefined;\n const covered = Array.from(parent.children).filter(\n (child) => child !== node && !child.hasAttribute('inert'),\n );\n covered.forEach((child) => child.setAttribute('inert', ''));\n // `preventScroll`: the subview is still off to the side at this point,\n // and a clipped Host would otherwise scroll sideways to reveal it.\n (initialFocusRef?.current ?? node).focus({ preventScroll: true });\n return () => {\n covered.forEach((child) => child.removeAttribute('inert'));\n };\n }, [open, presence.mounted, initialFocusRef]);\n\n /* A leaving subview is already closed to the user: `aria-hidden` alone\n would leave its controls focusable, so it goes `inert` while it fades.\n Set on the node, not as a prop: React 18 has no boolean for it. */\n const leaving = !open;\n useIsomorphicLayoutEffect(() => {\n const node = nodeRef.current;\n if (!node) return;\n // Blur first: nothing focused may sit inside a hidden subtree, even for\n // the moment before the passive effect below hands focus back.\n const active = document.activeElement;\n if (leaving && active instanceof HTMLElement && node.contains(active)) {\n active.blur();\n }\n node.toggleAttribute('inert', leaving);\n }, [leaving, presence.mounted]);\n\n /* Hand focus back to whatever opened the subview. A PASSIVE effect: React\n restores the pre-commit focus at the end of a commit, so a return made\n from a layout cleanup is overwritten by the closing subview itself. */\n useEffect(() => {\n if (!open) return undefined;\n return () => {\n const target = returnFocusRef.current;\n returnFocusRef.current = null;\n if (target?.isConnected) target.focus();\n };\n }, [open]);\n\n /* Escape goes back one level. A NATIVE listener: the rail collapses on\n Escape through its own native listener further up, and only a native\n stopPropagation here keeps one key press from doing both. */\n useEffect(() => {\n const node = nodeRef.current;\n if (!open || !node) return undefined;\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') return;\n // Spent here either way: a key pressed inside never collapses the rail.\n event.stopPropagation();\n /* An OPEN popup inside took the key to close itself. A closed,\n force-mounted one (Combobox) prevents default too, so ask the DOM. */\n if (event.defaultPrevented && node.querySelector(OPEN_POPUP)) return;\n event.preventDefault();\n onBackRef.current();\n };\n node.addEventListener('keydown', onKeyDown);\n return () => node.removeEventListener('keydown', onKeyDown);\n }, [open, presence.mounted]);\n\n if (!presence.mounted) return null;\n\n return (\n <section\n {...rest}\n ref={setNode}\n tabIndex={-1}\n aria-labelledby={headingId}\n aria-hidden={leaving || undefined}\n data-component=\"panel-subview\"\n data-presence={presence.phase}\n className={[subviewVariants(), className].filter(Boolean).join(' ')}\n >\n <PanelHeader\n icon={icon}\n title={title}\n headingId={headingId}\n headingLevel={headingLevel}\n sticky\n divider\n actions={\n <>\n <IconButton\n icon={<ArrowLeft aria-hidden=\"true\" />}\n intent=\"ghost\"\n size=\"sm\"\n flipIconInRtl\n aria-label={backLabel}\n tooltip={backLabel}\n data-panel-subview-back=\"\"\n onClick={onBack}\n />\n {headerActions}\n </>\n }\n />\n <ScrollArea orientation=\"vertical\" className=\"ds:min-h-0 ds:flex-1\">\n {children}\n </ScrollArea>\n {footer ? (\n <div data-panel-subview-footer=\"\" className={footerVariants()}>\n {footer}\n </div>\n ) : null}\n </section>\n );\n },\n);\nPanelSubviewRoot.displayName = 'PanelSubview';\n\nexport const PanelSubview = Object.assign(PanelSubviewRoot, {\n Host: PanelSubviewHost,\n});\n"],"names":["hostVariants","cva","subviewVariants","OPEN_POPUP","footerVariants","PanelSubviewHost","forwardRef","className","children","rest","ref","jsx","PanelSubviewRoot","open","onBack","title","backLabel","icon","headingLevel","headerActions","footer","onExited","initialFocusRef","headingId","useId","presence","usePresenceTransition","nodeRef","useRef","returnFocusRef","onBackRef","presenceRef","setNode","useCallback","node","wasOpenRef","useIsomorphicLayoutEffect","parent","covered","child","leaving","active","useEffect","target","onKeyDown","event","jsxs","PanelHeader","Fragment","IconButton","ArrowLeft","ScrollArea","PanelSubview"],"mappings":";;;;;;;;;AAuCA,MAAMA,IAAeC;AAAA,EACnB;AACF,GAEMC,IAAkBD;AAAA,EACtB;AAAA,IACE;AAAA,IACA;AAAA;AAAA;AAAA,IAGA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,EACA,KAAK,GAAG;AACZ,GAGME,IACJ,kFAEIC,IAAiBH;AAAA,EACrB;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,EAAA,EACA,KAAK,GAAG;AACZ,GASMI,IAAmBC;AAAA,EACvB,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAAQC,MACjC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,kBAAe;AAAA,MACf,WAAW,CAACV,EAAA,GAAgBO,CAA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} from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as nt, useState as me, useRef as M, useMemo as B, useImperativeHandle as at, useCallback as
|
|
2
|
+
import { forwardRef as nt, useState as me, useRef as M, useMemo as B, useImperativeHandle as at, useCallback as O, useEffect as W } from "react";
|
|
3
3
|
import { c as j } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as C } from "react-i18next";
|
|
5
5
|
import { A as Y } from "./alert-CiQ5Pa3Q.js";
|
|
6
6
|
import { A as Re } from "./avatar-CkDeQOSI.js";
|
|
7
7
|
import { B as ee } from "./button-CaUe1uyd.js";
|
|
8
|
-
import { D
|
|
8
|
+
import { D } from "./dropdown-menu-DU-Hrf33.js";
|
|
9
9
|
import { E as st } from "./empty-state-BUN_UAWf.js";
|
|
10
10
|
import { M as it } from "./map-view-CHw4RL6w.js";
|
|
11
11
|
import { R as Ne } from "./rating-BYbUowdK.js";
|
|
12
12
|
import { S as I } from "./sheet-C8WIDFS8.js";
|
|
13
13
|
import { S as rt } from "./skeleton-B1KTdJ4N.js";
|
|
14
14
|
import { S as ot } from "./spinner-hbwuKwMf.js";
|
|
15
|
-
import { B as
|
|
15
|
+
import { B as $ } from "./badge-BudgzTe_.js";
|
|
16
16
|
import { u as ct } from "./use-media-query-CcAx5SMM.js";
|
|
17
|
-
import {
|
|
17
|
+
import { b as lt } from "./format-price-DAbh61Lz.js";
|
|
18
18
|
import { u as dt } from "./registry-DvAUVLHh.js";
|
|
19
19
|
import { c as ut } from "./createLucideIcon-DhHxpK9K.js";
|
|
20
20
|
import { R as pt } from "./refresh-cw-DnI0cLFC.js";
|
|
@@ -353,8 +353,8 @@ function Te({
|
|
|
353
353
|
o.key
|
|
354
354
|
);
|
|
355
355
|
const b = x ? ` (${f.length})` : "";
|
|
356
|
-
return /* @__PURE__ */ p(
|
|
357
|
-
/* @__PURE__ */ t(
|
|
356
|
+
return /* @__PURE__ */ p(D.Root, { children: [
|
|
357
|
+
/* @__PURE__ */ t(D.Trigger, { asChild: !0, children: /* @__PURE__ */ p(
|
|
358
358
|
"button",
|
|
359
359
|
{
|
|
360
360
|
type: "button",
|
|
@@ -377,8 +377,8 @@ function Te({
|
|
|
377
377
|
]
|
|
378
378
|
}
|
|
379
379
|
) }),
|
|
380
|
-
/* @__PURE__ */ t(
|
|
381
|
-
|
|
380
|
+
/* @__PURE__ */ t(D.Content, { sideOffset: 8, align: "start", children: o.options.map((y) => /* @__PURE__ */ t(
|
|
381
|
+
D.CheckboxItem,
|
|
382
382
|
{
|
|
383
383
|
checked: f.includes(y.value),
|
|
384
384
|
onSelect: (h) => {
|
|
@@ -419,8 +419,8 @@ function ue({ value: e, onChange: n }) {
|
|
|
419
419
|
return s("practiceResults.sort.relevance");
|
|
420
420
|
}
|
|
421
421
|
};
|
|
422
|
-
return /* @__PURE__ */ p(
|
|
423
|
-
/* @__PURE__ */ t(
|
|
422
|
+
return /* @__PURE__ */ p(D.Root, { children: [
|
|
423
|
+
/* @__PURE__ */ t(D.Trigger, { asChild: !0, children: /* @__PURE__ */ p(
|
|
424
424
|
"button",
|
|
425
425
|
{
|
|
426
426
|
type: "button",
|
|
@@ -436,15 +436,15 @@ function ue({ value: e, onChange: n }) {
|
|
|
436
436
|
]
|
|
437
437
|
}
|
|
438
438
|
) }),
|
|
439
|
-
/* @__PURE__ */ t(
|
|
440
|
-
|
|
439
|
+
/* @__PURE__ */ t(D.Content, { sideOffset: 8, align: "end", children: /* @__PURE__ */ t(
|
|
440
|
+
D.RadioGroup,
|
|
441
441
|
{
|
|
442
442
|
value: e,
|
|
443
443
|
onValueChange: (i) => {
|
|
444
444
|
const a = i;
|
|
445
445
|
a !== e && (n(a), L("serp_sort_changed", { sort: a }));
|
|
446
446
|
},
|
|
447
|
-
children: xt.map((i) => /* @__PURE__ */ t(
|
|
447
|
+
children: xt.map((i) => /* @__PURE__ */ t(D.RadioItem, { value: i, children: r(i) }, i))
|
|
448
448
|
}
|
|
449
449
|
) })
|
|
450
450
|
] });
|
|
@@ -457,7 +457,7 @@ function ze({ distanceKm: e }) {
|
|
|
457
457
|
}).format(e);
|
|
458
458
|
return n("practiceResults.distance.km", { distance: i });
|
|
459
459
|
}, [e, n, s.language]);
|
|
460
|
-
return /* @__PURE__ */ t(
|
|
460
|
+
return /* @__PURE__ */ t($, { variant: "neutral", leading: /* @__PURE__ */ t(ne, { "aria-hidden": "true" }), children: r });
|
|
461
461
|
}
|
|
462
462
|
const we = j(
|
|
463
463
|
[
|
|
@@ -556,8 +556,13 @@ function Be({
|
|
|
556
556
|
currencyCode: n = "EUR"
|
|
557
557
|
}) {
|
|
558
558
|
const { t: s, i18n: r } = C(), i = B(
|
|
559
|
-
() => e == null ? void 0 : lt(
|
|
560
|
-
|
|
559
|
+
() => e == null ? void 0 : lt(
|
|
560
|
+
e,
|
|
561
|
+
n,
|
|
562
|
+
r.language ?? "en",
|
|
563
|
+
s("common.freeOfCharge")
|
|
564
|
+
),
|
|
565
|
+
[e, n, r.language, s]
|
|
561
566
|
);
|
|
562
567
|
return i === void 0 ? null : /* @__PURE__ */ p(
|
|
563
568
|
"span",
|
|
@@ -592,7 +597,7 @@ function He({ time: e }) {
|
|
|
592
597
|
n("practiceResults.nextSlot.summary", { time: e })
|
|
593
598
|
] });
|
|
594
599
|
}
|
|
595
|
-
function
|
|
600
|
+
function Oe({
|
|
596
601
|
result: e,
|
|
597
602
|
openLabel: n,
|
|
598
603
|
bookLabel: s,
|
|
@@ -645,7 +650,7 @@ function De({
|
|
|
645
650
|
)
|
|
646
651
|
] });
|
|
647
652
|
}
|
|
648
|
-
const
|
|
653
|
+
const De = j(
|
|
649
654
|
[
|
|
650
655
|
"ds:relative ds:flex ds:w-full ds:cursor-pointer",
|
|
651
656
|
"ds:rounded-[var(--radius-lg)]",
|
|
@@ -704,7 +709,7 @@ function _t({
|
|
|
704
709
|
onClick: s,
|
|
705
710
|
onMouseEnter: i,
|
|
706
711
|
onFocus: i,
|
|
707
|
-
className:
|
|
712
|
+
className: De({ density: a }),
|
|
708
713
|
children: [
|
|
709
714
|
/* @__PURE__ */ t(Re, { src: e.imageUrl, name: e.name, size: "lg" }),
|
|
710
715
|
/* @__PURE__ */ p("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
@@ -737,7 +742,7 @@ function _t({
|
|
|
737
742
|
) : null,
|
|
738
743
|
N ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
739
744
|
w.map((k) => /* @__PURE__ */ t(
|
|
740
|
-
|
|
745
|
+
$,
|
|
741
746
|
{
|
|
742
747
|
variant: "neutral",
|
|
743
748
|
leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" }),
|
|
@@ -745,9 +750,9 @@ function _t({
|
|
|
745
750
|
},
|
|
746
751
|
`lang-${k}`
|
|
747
752
|
)),
|
|
748
|
-
_ > 0 ? /* @__PURE__ */ t(
|
|
753
|
+
_ > 0 ? /* @__PURE__ */ t($, { variant: "neutral", children: `+${_}` }) : null,
|
|
749
754
|
T.map((k) => /* @__PURE__ */ t(
|
|
750
|
-
|
|
755
|
+
$,
|
|
751
756
|
{
|
|
752
757
|
variant: "info",
|
|
753
758
|
leading: /* @__PURE__ */ t(Ae, { "aria-hidden": "true" }),
|
|
@@ -755,8 +760,8 @@ function _t({
|
|
|
755
760
|
},
|
|
756
761
|
`ins-${k}`
|
|
757
762
|
)),
|
|
758
|
-
A > 0 ? /* @__PURE__ */ t(
|
|
759
|
-
P ? /* @__PURE__ */ t(
|
|
763
|
+
A > 0 ? /* @__PURE__ */ t($, { variant: "neutral", children: `+${A}` }) : null,
|
|
764
|
+
P ? /* @__PURE__ */ t($, { variant: "info", leading: /* @__PURE__ */ t(Me, { "aria-hidden": "true" }), children: x("practiceResults.fearPatient.label") }) : null
|
|
760
765
|
] }) : null,
|
|
761
766
|
/* @__PURE__ */ t(Le, { description: e.description, density: "compact" }),
|
|
762
767
|
/* @__PURE__ */ t(
|
|
@@ -769,7 +774,7 @@ function _t({
|
|
|
769
774
|
e.nextAvailableSlot && u ? /* @__PURE__ */ t(He, { time: u }) : null,
|
|
770
775
|
f,
|
|
771
776
|
/* @__PURE__ */ t(
|
|
772
|
-
|
|
777
|
+
Oe,
|
|
773
778
|
{
|
|
774
779
|
result: e,
|
|
775
780
|
openLabel: l,
|
|
@@ -823,7 +828,7 @@ function Tt({
|
|
|
823
828
|
onClick: r,
|
|
824
829
|
onMouseEnter: l,
|
|
825
830
|
onFocus: l,
|
|
826
|
-
className:
|
|
831
|
+
className: De({ density: "rich" }),
|
|
827
832
|
children: [
|
|
828
833
|
e.location ? /* @__PURE__ */ t(
|
|
829
834
|
Mt,
|
|
@@ -875,7 +880,7 @@ function Tt({
|
|
|
875
880
|
] }),
|
|
876
881
|
y ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
877
882
|
f ? (e.languages ?? []).map((w) => /* @__PURE__ */ t(
|
|
878
|
-
|
|
883
|
+
$,
|
|
879
884
|
{
|
|
880
885
|
variant: "neutral",
|
|
881
886
|
leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" }),
|
|
@@ -884,7 +889,7 @@ function Tt({
|
|
|
884
889
|
`lang-${w}`
|
|
885
890
|
)) : null,
|
|
886
891
|
x ? (e.insurances ?? []).map((w) => /* @__PURE__ */ t(
|
|
887
|
-
|
|
892
|
+
$,
|
|
888
893
|
{
|
|
889
894
|
variant: "info",
|
|
890
895
|
leading: /* @__PURE__ */ t(Ae, { "aria-hidden": "true" }),
|
|
@@ -892,7 +897,7 @@ function Tt({
|
|
|
892
897
|
},
|
|
893
898
|
`ins-${w}`
|
|
894
899
|
)) : null,
|
|
895
|
-
b ? /* @__PURE__ */ t(
|
|
900
|
+
b ? /* @__PURE__ */ t($, { variant: "info", leading: /* @__PURE__ */ t(Me, { "aria-hidden": "true" }), children: u("practiceResults.fearPatient.label") }) : null
|
|
896
901
|
] }) : null,
|
|
897
902
|
/* @__PURE__ */ t(Le, { description: e.description, density: "rich" }),
|
|
898
903
|
/* @__PURE__ */ t(
|
|
@@ -904,7 +909,7 @@ function Tt({
|
|
|
904
909
|
),
|
|
905
910
|
e.nextAvailableSlot && m ? /* @__PURE__ */ t(He, { time: m }) : null,
|
|
906
911
|
/* @__PURE__ */ t(
|
|
907
|
-
|
|
912
|
+
Oe,
|
|
908
913
|
{
|
|
909
914
|
result: e,
|
|
910
915
|
openLabel: d,
|
|
@@ -1270,10 +1275,10 @@ const Ft = {
|
|
|
1270
1275
|
function Lt({ value: e, onChange: n }) {
|
|
1271
1276
|
const { t: s, i18n: r } = C(), i = r.dir() === "rtl", a = M(
|
|
1272
1277
|
/* @__PURE__ */ new Map()
|
|
1273
|
-
), l =
|
|
1278
|
+
), l = O((c) => {
|
|
1274
1279
|
var u;
|
|
1275
1280
|
(u = a.current.get(c)) == null || u.focus();
|
|
1276
|
-
}, []), d =
|
|
1281
|
+
}, []), d = O(
|
|
1277
1282
|
(c, u) => {
|
|
1278
1283
|
const o = E.indexOf(u), m = E.length, f = i ? "ArrowLeft" : "ArrowRight", x = i ? "ArrowRight" : "ArrowLeft";
|
|
1279
1284
|
let b = null;
|
|
@@ -1523,7 +1528,7 @@ function Ht(e) {
|
|
|
1523
1528
|
x
|
|
1524
1529
|
] });
|
|
1525
1530
|
}
|
|
1526
|
-
const
|
|
1531
|
+
const Ot = nt(function({
|
|
1527
1532
|
variant: n = "split-list-map",
|
|
1528
1533
|
results: s,
|
|
1529
1534
|
totalCount: r,
|
|
@@ -1555,7 +1560,7 @@ const Dt = nt(function({
|
|
|
1555
1560
|
id: H,
|
|
1556
1561
|
className: Z,
|
|
1557
1562
|
...k
|
|
1558
|
-
},
|
|
1563
|
+
}, $e) {
|
|
1559
1564
|
const { t: ae, i18n: be } = C(), [Ve, J] = me(null), X = M(/* @__PURE__ */ new Set()), se = M(/* @__PURE__ */ new Set()), Ke = M(null), ie = M(null), re = B(
|
|
1560
1565
|
() => ({
|
|
1561
1566
|
getVariant: () => n,
|
|
@@ -1573,8 +1578,8 @@ const Dt = nt(function({
|
|
|
1573
1578
|
}),
|
|
1574
1579
|
[n]
|
|
1575
1580
|
);
|
|
1576
|
-
at(
|
|
1577
|
-
const Ee = G ? q ?? ae("practiceResults.card.open") : void 0, je = U ?? ae("practiceResults.card.book"), qe =
|
|
1581
|
+
at($e, () => re, [re]), dt(bt, re, H);
|
|
1582
|
+
const Ee = G ? q ?? ae("practiceResults.card.open") : void 0, je = U ?? ae("practiceResults.card.book"), qe = O(
|
|
1578
1583
|
(v) => {
|
|
1579
1584
|
if (v.nextAvailableSlot)
|
|
1580
1585
|
try {
|
|
@@ -1615,11 +1620,11 @@ const Dt = nt(function({
|
|
|
1615
1620
|
},
|
|
1616
1621
|
[]
|
|
1617
1622
|
);
|
|
1618
|
-
const Ue =
|
|
1623
|
+
const Ue = O((v) => {
|
|
1619
1624
|
J(v), !X.current.has(v) && (xe.current === v && K.current || (K.current && clearTimeout(K.current), xe.current = v, K.current = setTimeout(() => {
|
|
1620
1625
|
X.current.has(v) || (X.current.add(v), L("serp_result_hovered_card", { resultId: v })), K.current = null;
|
|
1621
1626
|
}, 500)));
|
|
1622
|
-
}, []), Ge =
|
|
1627
|
+
}, []), Ge = O((v) => {
|
|
1623
1628
|
J(v);
|
|
1624
1629
|
const F = ie.current;
|
|
1625
1630
|
if (!F) return;
|
|
@@ -1627,9 +1632,9 @@ const Dt = nt(function({
|
|
|
1627
1632
|
`[data-component="practice-result-card"][data-result-id="${CSS.escape(v)}"]`
|
|
1628
1633
|
);
|
|
1629
1634
|
S == null || S.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
1630
|
-
}, []), Ze =
|
|
1635
|
+
}, []), Ze = O((v) => {
|
|
1631
1636
|
se.current.has(v) || (se.current.add(v), L("serp_result_hovered_pin", { resultId: v }));
|
|
1632
|
-
}, []), ke = M(null), Qe =
|
|
1637
|
+
}, []), ke = M(null), Qe = O(
|
|
1633
1638
|
(v) => {
|
|
1634
1639
|
J(v);
|
|
1635
1640
|
const F = z.find((S) => S.id === v);
|
|
@@ -1645,7 +1650,7 @@ const Dt = nt(function({
|
|
|
1645
1650
|
}
|
|
1646
1651
|
},
|
|
1647
1652
|
[z, g]
|
|
1648
|
-
), Je =
|
|
1653
|
+
), Je = O(
|
|
1649
1654
|
(v) => {
|
|
1650
1655
|
Q(
|
|
1651
1656
|
z,
|
|
@@ -1655,7 +1660,7 @@ const Dt = nt(function({
|
|
|
1655
1660
|
);
|
|
1656
1661
|
},
|
|
1657
1662
|
[z, g]
|
|
1658
|
-
), We =
|
|
1663
|
+
), We = O(
|
|
1659
1664
|
(v) => {
|
|
1660
1665
|
Q(
|
|
1661
1666
|
z,
|
|
@@ -1732,9 +1737,9 @@ const Dt = nt(function({
|
|
|
1732
1737
|
}
|
|
1733
1738
|
);
|
|
1734
1739
|
});
|
|
1735
|
-
|
|
1740
|
+
Ot.displayName = "PracticeResults";
|
|
1736
1741
|
export {
|
|
1737
|
-
|
|
1742
|
+
Ot as P,
|
|
1738
1743
|
bt as p
|
|
1739
1744
|
};
|
|
1740
|
-
//# sourceMappingURL=practice-results-
|
|
1745
|
+
//# sourceMappingURL=practice-results-D11Zpt27.js.map
|