impact-nova 2.5.6 → 2.5.7
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/components/data-display/calendar/calendar-apply-validation.js +45 -33
- package/dist/components/data-display/calendar/calendar-day-picker-components.js +62 -54
- package/dist/components/data-display/calendar/calendar-day-picker-view.d.ts +1 -1
- package/dist/components/data-display/calendar/calendar-day-picker-view.js +88 -85
- package/dist/components/data-display/calendar/calendar-week-utils.js +23 -22
- package/dist/components/data-display/calendar/use-calendar-state.d.ts +1 -1
- package/dist/components/data-display/calendar/use-calendar-state.js +47 -47
- package/dist/components/flows/guidance/guidance-error-boundary.js +22 -14
- package/dist/components/flows/guidance/guidance-layer.js +34 -32
- package/dist/components/flows/guidance/help-center/assets/whats-new-guide-icon.svg.js +4 -0
- package/dist/components/flows/guidance/help-center/filter-help-center-guides.js +10 -7
- package/dist/components/flows/guidance/help-center/guide-catalog-section.d.ts +7 -0
- package/dist/components/flows/guidance/help-center/guide-catalog-section.js +24 -0
- package/dist/components/flows/guidance/help-center/guide-catalog-utils.d.ts +3 -0
- package/dist/components/flows/guidance/help-center/guide-catalog-utils.js +19 -0
- package/dist/components/flows/guidance/help-center/guide-catalog.d.ts +1 -1
- package/dist/components/flows/guidance/help-center/guide-catalog.js +89 -79
- package/dist/components/flows/guidance/help-center/help-center-guide-labels.d.ts +6 -0
- package/dist/components/flows/guidance/help-center/help-center-guide-labels.js +33 -0
- package/dist/components/flows/guidance/help-center/help-center-guide-row.d.ts +12 -0
- package/dist/components/flows/guidance/help-center/help-center-guide-row.js +57 -0
- package/dist/components/flows/guidance/help-center/help-center-guide-type-icons.d.ts +9 -0
- package/dist/components/flows/guidance/help-center/help-center-guide-type-icons.js +114 -0
- package/dist/components/flows/guidance/help-center/help-center-header.d.ts +1 -1
- package/dist/components/flows/guidance/help-center/help-center-header.js +20 -16
- package/dist/components/flows/guidance/help-center/help-center.constants.d.ts +1 -1
- package/dist/components/flows/guidance/help-center/help-center.constants.js +1 -1
- package/dist/components/flows/guidance/help-center/help-center.d.ts +3 -1
- package/dist/components/flows/guidance/help-center/help-center.js +74 -51
- package/dist/components/flows/guidance/help-center/help-center.types.d.ts +9 -1
- package/dist/components/flows/guidance/help-center/renderHelpCenterGuideTypeIcon.d.ts +4 -0
- package/dist/components/flows/guidance/help-center/renderHelpCenterGuideTypeIcon.js +18 -0
- package/dist/components/flows/guidance/help-center.d.ts +4 -2
- package/dist/components/flows/guidance/help-center.js +23 -14
- package/dist/components/flows/guidance/hooks/useGuidanceOverlayGeometry.js +19 -17
- package/dist/components/flows/guidance/index.d.ts +1 -1
- package/dist/components/flows/guidance/renderers/announcement-renderer.d.ts +1 -1
- package/dist/components/flows/guidance/renderers/announcement-renderer.js +20 -12
- package/dist/components/flows/guidance/renderers/guidance-card-shared.d.ts +9 -11
- package/dist/components/flows/guidance/renderers/guidance-card-shared.js +124 -177
- package/dist/components/flows/guidance/renderers/guidance-renderer-shared.d.ts +1 -1
- package/dist/components/flows/guidance/renderers/guidance-renderer-shared.js +57 -72
- package/dist/components/flows/guidance/renderers/guidance-tour-overlay.js +23 -23
- package/dist/components/flows/wizard/wizard.js +41 -38
- package/dist/components/layout/horizontal-scroller/horizontal-scroller.js +35 -53
- package/dist/form-react/registry/defaultFieldRegistrations.js +36 -28
- package/dist/form-react/types/fields.types.d.ts +3 -3
- package/dist/form-react/utils/date.utils.d.ts +3 -1
- package/dist/form-react/utils/date.utils.js +84 -55
- package/dist/i18n/defaultMessages.d.ts +10 -0
- package/dist/i18n/defaultMessages.js +17 -7
- package/dist/i18n/locales/de.js +13 -3
- package/dist/i18n/locales/es.js +13 -3
- package/dist/i18n/locales/hi.js +13 -3
- package/dist/i18n/locales/kn.js +13 -3
- package/dist/impact-nova.css +1 -1
- package/dist/lib/guidance/engine/guidance-engine.d.ts +7 -5
- package/dist/lib/guidance/engine/guidance-engine.js +115 -47
- package/dist/lib/guidance/triggers/trigger-registry.js +6 -6
- package/dist/lib/guidance/types/guidance.types.d.ts +11 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -1,213 +1,160 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as e, Fragment as N } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Button as m } from "../../../primitives/button/button.js";
|
|
4
|
+
import { Progress as b } from "../../../primitives/progress/progress.js";
|
|
5
5
|
import { cn as h } from "../../../../lib/utils.js";
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
markerId: `leading-${r}`
|
|
25
|
-
});
|
|
26
|
-
for (let r = t; r <= a; r += 1)
|
|
27
|
-
i.push({ kind: "step", stepIndex: r });
|
|
28
|
-
if (a < e - 1)
|
|
29
|
-
for (let r = 0; r < f; r += 1)
|
|
30
|
-
i.push({
|
|
31
|
-
kind: "ellipsis",
|
|
32
|
-
markerId: `trailing-${r}`
|
|
33
|
-
});
|
|
34
|
-
return i;
|
|
6
|
+
const v = "End Tour";
|
|
7
|
+
function G({
|
|
8
|
+
activeStepIndex: t,
|
|
9
|
+
totalSteps: n,
|
|
10
|
+
className: a
|
|
11
|
+
}) {
|
|
12
|
+
if (n <= 1)
|
|
13
|
+
return null;
|
|
14
|
+
const r = (t + 1) / n * 100;
|
|
15
|
+
return /* @__PURE__ */ e(
|
|
16
|
+
b,
|
|
17
|
+
{
|
|
18
|
+
value: r,
|
|
19
|
+
label: !1,
|
|
20
|
+
className: h("bg-brand-subtle", a),
|
|
21
|
+
"aria-label": `Step ${t + 1} of ${n}`
|
|
22
|
+
}
|
|
23
|
+
);
|
|
35
24
|
}
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
closeAriaLabel: e,
|
|
39
|
-
className: t
|
|
25
|
+
function $({
|
|
26
|
+
hint: t
|
|
40
27
|
}) {
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
|
|
28
|
+
return /* @__PURE__ */ e(
|
|
29
|
+
"div",
|
|
43
30
|
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"shrink-0 text-content-tertiary hover:text-content-secondary",
|
|
48
|
-
t
|
|
49
|
-
),
|
|
50
|
-
"aria-label": e,
|
|
51
|
-
onClick: s,
|
|
52
|
-
children: /* @__PURE__ */ n(v, { className: "size-3.5" })
|
|
31
|
+
"data-component": "guidance-tour-interaction-footer",
|
|
32
|
+
className: "border-t border-stroke-hairline bg-canvas-subtle px-4 py-2.5 text-center text-sm leading-snug text-content-secondary",
|
|
33
|
+
children: t
|
|
53
34
|
}
|
|
54
35
|
);
|
|
55
36
|
}
|
|
56
|
-
function
|
|
57
|
-
activeStepIndex:
|
|
58
|
-
totalSteps:
|
|
37
|
+
function y({
|
|
38
|
+
activeStepIndex: t,
|
|
39
|
+
totalSteps: n
|
|
59
40
|
}) {
|
|
60
|
-
return
|
|
61
|
-
|
|
41
|
+
return /* @__PURE__ */ c(
|
|
42
|
+
"span",
|
|
62
43
|
{
|
|
63
|
-
|
|
64
|
-
|
|
44
|
+
className: "text-sm leading-none",
|
|
45
|
+
"aria-label": `Step ${t + 1} of ${n}`,
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ e("span", { className: "font-bold text-content", children: t + 1 }),
|
|
48
|
+
/* @__PURE__ */ e("span", { className: "font-normal text-content-tertiary", children: ` / ${n}` })
|
|
49
|
+
]
|
|
65
50
|
}
|
|
66
51
|
);
|
|
67
52
|
}
|
|
68
|
-
function
|
|
69
|
-
activeStepIndex:
|
|
70
|
-
totalSteps:
|
|
53
|
+
function x({
|
|
54
|
+
activeStepIndex: t,
|
|
55
|
+
totalSteps: n,
|
|
56
|
+
skippable: a,
|
|
57
|
+
primaryActionLabel: r,
|
|
58
|
+
onSkip: l,
|
|
59
|
+
onPrimaryAction: i,
|
|
60
|
+
showPrimaryAction: s = !0
|
|
71
61
|
}) {
|
|
72
|
-
|
|
73
|
-
return /* @__PURE__ */ n(
|
|
62
|
+
return /* @__PURE__ */ c(
|
|
74
63
|
"div",
|
|
75
64
|
{
|
|
76
|
-
className:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (a.kind === "ellipsis")
|
|
84
|
-
return /* @__PURE__ */ n(
|
|
85
|
-
"span",
|
|
86
|
-
{
|
|
87
|
-
className: "size-1 rounded-full bg-stroke",
|
|
88
|
-
"aria-hidden": "true"
|
|
89
|
-
},
|
|
90
|
-
a.markerId
|
|
91
|
-
);
|
|
92
|
-
const i = a.stepIndex;
|
|
93
|
-
return /* @__PURE__ */ n(
|
|
94
|
-
"span",
|
|
65
|
+
className: h(
|
|
66
|
+
"flex items-center justify-between gap-3 px-4",
|
|
67
|
+
s ? "pb-4 pt-2" : "pb-2 pt-2"
|
|
68
|
+
),
|
|
69
|
+
children: [
|
|
70
|
+
n > 1 ? /* @__PURE__ */ e(
|
|
71
|
+
y,
|
|
95
72
|
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
73
|
+
activeStepIndex: t,
|
|
74
|
+
totalSteps: n
|
|
75
|
+
}
|
|
76
|
+
) : /* @__PURE__ */ e("span", { "aria-hidden": "true" }),
|
|
77
|
+
/* @__PURE__ */ c("div", { className: "ms-auto flex shrink-0 items-center gap-2", children: [
|
|
78
|
+
a ? /* @__PURE__ */ e(m, { variant: "secondary", size: "md", onClick: l, children: v }) : null,
|
|
79
|
+
s ? /* @__PURE__ */ e(m, { size: "md", onClick: i, children: r }) : null
|
|
80
|
+
] })
|
|
81
|
+
]
|
|
104
82
|
}
|
|
105
83
|
);
|
|
106
84
|
}
|
|
107
|
-
function
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
{
|
|
122
|
-
activeStepIndex: s,
|
|
123
|
-
totalSteps: e
|
|
124
|
-
}
|
|
125
|
-
) }) : null,
|
|
126
|
-
/* @__PURE__ */ o("div", { className: "flex items-center justify-between gap-3", children: [
|
|
127
|
-
/* @__PURE__ */ n("div", { className: "shrink-0", children: t ? /* @__PURE__ */ n(
|
|
128
|
-
"button",
|
|
129
|
-
{
|
|
130
|
-
type: "button",
|
|
131
|
-
className: "flex h-6 items-center text-sm leading-4 text-content-tertiary transition-colors hover:text-content-secondary",
|
|
132
|
-
onClick: i,
|
|
133
|
-
children: "Skip"
|
|
134
|
-
}
|
|
135
|
-
) : null }),
|
|
136
|
-
/* @__PURE__ */ n("div", { className: "min-w-0 text-right", children: l ? /* @__PURE__ */ n(
|
|
137
|
-
x,
|
|
138
|
-
{
|
|
139
|
-
size: "sm",
|
|
140
|
-
className: "rounded-full px-4",
|
|
141
|
-
onClick: r,
|
|
142
|
-
children: a
|
|
143
|
-
}
|
|
144
|
-
) : c ? /* @__PURE__ */ n("span", { className: "text-xs font-medium leading-snug text-content-tertiary", children: c }) : null })
|
|
145
|
-
] })
|
|
146
|
-
] });
|
|
147
|
-
}
|
|
148
|
-
function z({
|
|
149
|
-
title: s,
|
|
150
|
-
body: e,
|
|
151
|
-
optionalFooter: t,
|
|
152
|
-
stepIndex: a,
|
|
153
|
-
totalSteps: i,
|
|
154
|
-
skippable: r,
|
|
155
|
-
primaryActionLabel: l,
|
|
156
|
-
onSkip: c,
|
|
157
|
-
onDismiss: d,
|
|
158
|
-
onPrimaryAction: p,
|
|
159
|
-
showPrimaryAction: N,
|
|
160
|
-
footerHint: m,
|
|
161
|
-
titleId: g,
|
|
162
|
-
bodyId: k
|
|
85
|
+
function E({
|
|
86
|
+
title: t,
|
|
87
|
+
body: n,
|
|
88
|
+
optionalFooter: a,
|
|
89
|
+
stepIndex: r,
|
|
90
|
+
totalSteps: l,
|
|
91
|
+
skippable: i,
|
|
92
|
+
primaryActionLabel: s,
|
|
93
|
+
onSkip: d,
|
|
94
|
+
onPrimaryAction: u,
|
|
95
|
+
showPrimaryAction: f,
|
|
96
|
+
footerHint: o,
|
|
97
|
+
titleId: p,
|
|
98
|
+
bodyId: g
|
|
163
99
|
}) {
|
|
164
|
-
return /* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ c("div", { className: "flex flex-col", children: [
|
|
101
|
+
/* @__PURE__ */ c("div", { className: "px-4 pt-4", children: [
|
|
102
|
+
/* @__PURE__ */ e(
|
|
167
103
|
"h3",
|
|
168
104
|
{
|
|
169
|
-
id:
|
|
170
|
-
className: "
|
|
171
|
-
children:
|
|
105
|
+
id: p,
|
|
106
|
+
className: "text-base font-bold leading-5 text-content",
|
|
107
|
+
children: t
|
|
172
108
|
}
|
|
173
109
|
),
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
|
|
110
|
+
n ? /* @__PURE__ */ e(
|
|
111
|
+
"p",
|
|
176
112
|
{
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
113
|
+
id: g,
|
|
114
|
+
className: "mt-2 text-sm leading-snug text-content-secondary",
|
|
115
|
+
children: n
|
|
180
116
|
}
|
|
181
|
-
)
|
|
117
|
+
) : null,
|
|
118
|
+
a && !o ? /* @__PURE__ */ e("p", { className: "mt-1.5 text-xs text-content-tertiary", children: a }) : null
|
|
182
119
|
] }),
|
|
183
|
-
e
|
|
184
|
-
|
|
120
|
+
/* @__PURE__ */ e("div", { className: "px-4 pt-3", children: /* @__PURE__ */ e(
|
|
121
|
+
G,
|
|
185
122
|
{
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
children: e
|
|
123
|
+
activeStepIndex: r,
|
|
124
|
+
totalSteps: l
|
|
189
125
|
}
|
|
190
|
-
)
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
126
|
+
) }),
|
|
127
|
+
!!o ? /* @__PURE__ */ c(N, { children: [
|
|
128
|
+
i ? /* @__PURE__ */ e(
|
|
129
|
+
x,
|
|
130
|
+
{
|
|
131
|
+
activeStepIndex: r,
|
|
132
|
+
totalSteps: l,
|
|
133
|
+
skippable: i,
|
|
134
|
+
primaryActionLabel: s,
|
|
135
|
+
onSkip: d,
|
|
136
|
+
onPrimaryAction: u,
|
|
137
|
+
showPrimaryAction: !1
|
|
138
|
+
}
|
|
139
|
+
) : null,
|
|
140
|
+
/* @__PURE__ */ e($, { hint: o })
|
|
141
|
+
] }) : f ? /* @__PURE__ */ e(
|
|
142
|
+
x,
|
|
194
143
|
{
|
|
195
|
-
activeStepIndex:
|
|
196
|
-
totalSteps:
|
|
197
|
-
skippable:
|
|
198
|
-
primaryActionLabel:
|
|
199
|
-
onSkip:
|
|
200
|
-
onPrimaryAction:
|
|
201
|
-
showPrimaryAction: N,
|
|
202
|
-
footerHint: m
|
|
144
|
+
activeStepIndex: r,
|
|
145
|
+
totalSteps: l,
|
|
146
|
+
skippable: i,
|
|
147
|
+
primaryActionLabel: s,
|
|
148
|
+
onSkip: d,
|
|
149
|
+
onPrimaryAction: u
|
|
203
150
|
}
|
|
204
|
-
)
|
|
151
|
+
) : null
|
|
205
152
|
] });
|
|
206
153
|
}
|
|
207
154
|
export {
|
|
208
|
-
y as
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
155
|
+
y as GuidanceStepCounter,
|
|
156
|
+
E as GuidanceStepPanel,
|
|
157
|
+
G as GuidanceStepProgressBar,
|
|
158
|
+
$ as GuidanceTourInteractionFooter,
|
|
159
|
+
x as GuidanceTourNavFooter
|
|
213
160
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RenderInstruction } from '../../../../lib/guidance';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
export declare const GUIDANCE_SPOTLIGHT_PADDING =
|
|
3
|
+
export declare const GUIDANCE_SPOTLIGHT_PADDING = 16;
|
|
4
4
|
export declare const GUIDANCE_POPOVER_GAP = 12;
|
|
5
5
|
export declare const GUIDANCE_VIEWPORT_PADDING = 16;
|
|
6
6
|
export declare const GUIDANCE_TARGET_ANIMATION_POLL_MS = 32;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as A from "react";
|
|
2
|
-
const T =
|
|
3
|
-
function
|
|
2
|
+
const T = 16, b = 12, S = 16, v = 32;
|
|
3
|
+
function H(e) {
|
|
4
4
|
const t = window.getComputedStyle(e);
|
|
5
5
|
return t.overflow === "hidden" || t.overflow === "auto" || t.overflow === "scroll" || t.overflow === "clip" || t.overflowY === "hidden" || t.overflowY === "auto" || t.overflowY === "scroll" || t.overflowY === "clip" || t.overflowX === "hidden" || t.overflowX === "auto" || t.overflowX === "scroll" || t.overflowX === "clip";
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function R(e) {
|
|
8
8
|
const t = [];
|
|
9
9
|
let n = e.parentElement;
|
|
10
10
|
for (; n; )
|
|
11
|
-
|
|
11
|
+
H(n) && t.push(n), n = n.parentElement;
|
|
12
12
|
return t;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function w(e, t) {
|
|
15
15
|
const n = Math.max(e.x, t.x), o = Math.max(e.y, t.y), i = Math.min(
|
|
16
16
|
e.x + e.width,
|
|
17
17
|
t.x + t.width
|
|
@@ -26,7 +26,7 @@ function h(e, t) {
|
|
|
26
26
|
height: r - o
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function m(e) {
|
|
30
30
|
return {
|
|
31
31
|
x: e.left,
|
|
32
32
|
y: e.top,
|
|
@@ -35,13 +35,13 @@ function f(e) {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
function M(e) {
|
|
38
|
-
let t =
|
|
38
|
+
let t = m(
|
|
39
39
|
e.getBoundingClientRect()
|
|
40
40
|
);
|
|
41
|
-
for (const i of
|
|
42
|
-
const r =
|
|
41
|
+
for (const i of R(e)) {
|
|
42
|
+
const r = w(
|
|
43
43
|
t,
|
|
44
|
-
|
|
44
|
+
m(i.getBoundingClientRect())
|
|
45
45
|
);
|
|
46
46
|
if (!r)
|
|
47
47
|
break;
|
|
@@ -53,28 +53,12 @@ function M(e) {
|
|
|
53
53
|
width: window.innerWidth,
|
|
54
54
|
height: window.innerHeight
|
|
55
55
|
};
|
|
56
|
-
return
|
|
56
|
+
return w(
|
|
57
57
|
t,
|
|
58
58
|
n
|
|
59
59
|
) ?? t;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
let t = {
|
|
63
|
-
x: 0,
|
|
64
|
-
y: 0,
|
|
65
|
-
width: window.innerWidth,
|
|
66
|
-
height: window.innerHeight
|
|
67
|
-
};
|
|
68
|
-
for (const n of C(e)) {
|
|
69
|
-
const o = h(
|
|
70
|
-
t,
|
|
71
|
-
f(n.getBoundingClientRect())
|
|
72
|
-
);
|
|
73
|
-
o && (t = o);
|
|
74
|
-
}
|
|
75
|
-
return t;
|
|
76
|
-
}
|
|
77
|
-
function x(e) {
|
|
61
|
+
function C(e) {
|
|
78
62
|
const t = [];
|
|
79
63
|
let n = e.parentElement;
|
|
80
64
|
for (; n; ) {
|
|
@@ -83,29 +67,29 @@ function x(e) {
|
|
|
83
67
|
}
|
|
84
68
|
return t;
|
|
85
69
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
70
|
+
function E(e) {
|
|
71
|
+
return C(e).map((t) => ({
|
|
88
72
|
element: t,
|
|
89
73
|
scrollTop: t.scrollTop,
|
|
90
74
|
scrollLeft: t.scrollLeft
|
|
91
75
|
}));
|
|
92
76
|
}
|
|
93
|
-
function
|
|
77
|
+
function I(e) {
|
|
94
78
|
for (const t of e)
|
|
95
79
|
t.element.isConnected && (t.element.scrollTop = t.scrollTop, t.element.scrollLeft = t.scrollLeft);
|
|
96
80
|
}
|
|
97
81
|
let s = null;
|
|
98
82
|
function _(e) {
|
|
99
|
-
s === null && (s =
|
|
83
|
+
s === null && (s = E(e));
|
|
100
84
|
}
|
|
101
|
-
function
|
|
102
|
-
s !== null && (
|
|
85
|
+
function k() {
|
|
86
|
+
s !== null && (I(s), s = null);
|
|
103
87
|
}
|
|
104
|
-
function
|
|
88
|
+
function L(e, t = v) {
|
|
105
89
|
const n = e.getBoundingClientRect(), o = window.innerHeight;
|
|
106
90
|
return n.top < t || n.bottom > o - t;
|
|
107
91
|
}
|
|
108
|
-
function
|
|
92
|
+
function D(e) {
|
|
109
93
|
const { targetElement: t, scrollContainer: n, viewportPadding: o } = e, i = n.getBoundingClientRect(), r = t.getBoundingClientRect(), c = n.clientHeight - o * 2;
|
|
110
94
|
if (r.height >= c) {
|
|
111
95
|
const l = r.top - i.top - o;
|
|
@@ -118,12 +102,12 @@ function B(e) {
|
|
|
118
102
|
}
|
|
119
103
|
r.bottom > i.bottom - o && (n.scrollTop += r.bottom - (i.bottom - o));
|
|
120
104
|
}
|
|
121
|
-
function
|
|
122
|
-
if (!
|
|
105
|
+
function V(e, t = v) {
|
|
106
|
+
if (!L(e, t))
|
|
123
107
|
return;
|
|
124
|
-
const o =
|
|
108
|
+
const o = C(e)[0];
|
|
125
109
|
if (o) {
|
|
126
|
-
|
|
110
|
+
D({
|
|
127
111
|
targetElement: e,
|
|
128
112
|
scrollContainer: o,
|
|
129
113
|
viewportPadding: t
|
|
@@ -136,7 +120,7 @@ function O(e, t = v) {
|
|
|
136
120
|
inline: "nearest"
|
|
137
121
|
});
|
|
138
122
|
}
|
|
139
|
-
function
|
|
123
|
+
function O(e, t) {
|
|
140
124
|
const n = e.advanceOn === "click-target";
|
|
141
125
|
return A.useEffect(() => {
|
|
142
126
|
if (!n)
|
|
@@ -145,8 +129,10 @@ function N(e, t) {
|
|
|
145
129
|
if (!o)
|
|
146
130
|
return;
|
|
147
131
|
const i = () => {
|
|
148
|
-
|
|
149
|
-
|
|
132
|
+
requestAnimationFrame(() => {
|
|
133
|
+
requestAnimationFrame(() => {
|
|
134
|
+
t();
|
|
135
|
+
});
|
|
150
136
|
});
|
|
151
137
|
};
|
|
152
138
|
return o.addEventListener("click", i, { once: !0 }), () => {
|
|
@@ -160,26 +146,25 @@ function N(e, t) {
|
|
|
160
146
|
]), n;
|
|
161
147
|
}
|
|
162
148
|
function G(e, t = T, n) {
|
|
163
|
-
|
|
149
|
+
return {
|
|
164
150
|
x: e.x - t,
|
|
165
151
|
y: e.y - t,
|
|
166
152
|
width: e.width + t * 2,
|
|
167
153
|
height: e.height + t * 2
|
|
168
154
|
};
|
|
169
|
-
return n ? h(o, n) ?? o : o;
|
|
170
155
|
}
|
|
171
|
-
function
|
|
172
|
-
const n = M(e)
|
|
173
|
-
return G(n, t
|
|
156
|
+
function N(e, t = T) {
|
|
157
|
+
const n = M(e);
|
|
158
|
+
return G(n, t);
|
|
174
159
|
}
|
|
175
|
-
function
|
|
160
|
+
function F(e) {
|
|
176
161
|
const {
|
|
177
162
|
targetRect: t,
|
|
178
163
|
popoverWidth: n,
|
|
179
164
|
popoverHeight: o,
|
|
180
|
-
gap: i =
|
|
181
|
-
viewportPadding: r =
|
|
182
|
-
} = e, c = t.x + t.width,
|
|
165
|
+
gap: i = b,
|
|
166
|
+
viewportPadding: r = S
|
|
167
|
+
} = e, c = t.x + t.width, h = t.y + t.height, l = t.x, x = window.innerWidth - c;
|
|
183
168
|
if (t.width <= 280 && t.x >= window.innerWidth * 0.35 && l >= n + i)
|
|
184
169
|
return {
|
|
185
170
|
placement: "left",
|
|
@@ -205,50 +190,50 @@ function U(e) {
|
|
|
205
190
|
)
|
|
206
191
|
};
|
|
207
192
|
if (t.height > t.width * 2.5) {
|
|
208
|
-
const
|
|
193
|
+
const f = Math.max(
|
|
209
194
|
r,
|
|
210
195
|
Math.min(
|
|
211
196
|
t.y,
|
|
212
197
|
window.innerHeight - o - r
|
|
213
198
|
)
|
|
214
199
|
);
|
|
215
|
-
if (
|
|
200
|
+
if (x >= n + i)
|
|
216
201
|
return {
|
|
217
202
|
placement: "right",
|
|
218
203
|
left: c + i,
|
|
219
|
-
top:
|
|
204
|
+
top: f
|
|
220
205
|
};
|
|
221
206
|
if (l >= n + i)
|
|
222
207
|
return {
|
|
223
208
|
placement: "left",
|
|
224
209
|
left: t.x - n - i,
|
|
225
|
-
top:
|
|
210
|
+
top: f
|
|
226
211
|
};
|
|
227
212
|
}
|
|
228
|
-
const
|
|
213
|
+
const g = window.innerHeight - h, d = t.y, y = t.y + t.height / 2 > window.innerHeight * 0.55;
|
|
229
214
|
let a;
|
|
230
|
-
|
|
231
|
-
let
|
|
232
|
-
return
|
|
215
|
+
y && d >= o + i && g < o + i * 2 ? a = "top" : a = g >= o + i || g >= d ? "bottom" : "top";
|
|
216
|
+
let p = a === "bottom" ? h + i : t.y - o - i, u = t.x + t.width / 2 - n / 2;
|
|
217
|
+
return u = Math.max(
|
|
233
218
|
r,
|
|
234
|
-
Math.min(
|
|
235
|
-
),
|
|
219
|
+
Math.min(u, window.innerWidth - n - r)
|
|
220
|
+
), p = Math.max(
|
|
236
221
|
r,
|
|
237
|
-
Math.min(
|
|
238
|
-
), { top:
|
|
222
|
+
Math.min(p, window.innerHeight - o - r)
|
|
223
|
+
), { top: p, left: u, placement: a };
|
|
239
224
|
}
|
|
240
225
|
export {
|
|
241
|
-
|
|
226
|
+
b as GUIDANCE_POPOVER_GAP,
|
|
242
227
|
T as GUIDANCE_SPOTLIGHT_PADDING,
|
|
243
228
|
v as GUIDANCE_TARGET_SCROLL_PADDING,
|
|
244
|
-
|
|
229
|
+
S as GUIDANCE_VIEWPORT_PADDING,
|
|
245
230
|
_ as beginTourScrollSnapshot,
|
|
246
231
|
G as buildHighlightRect,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
232
|
+
N as buildHighlightRectForTarget,
|
|
233
|
+
F as computePopoverPosition,
|
|
234
|
+
k as endTourScrollSnapshot,
|
|
250
235
|
M as getVisibleTargetRect,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
236
|
+
L as needsGuidanceTargetScroll,
|
|
237
|
+
V as scrollGuidanceTargetIntoView,
|
|
238
|
+
O as useAdvanceOnTargetClick
|
|
254
239
|
};
|