@salesforce/design-system-react 11.0.0-alpha.7 → 11.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/color-picker/color-picker.cjs +1 -1
- package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
- package/dist/cjs/components/combobox/combobox.cjs +1 -1
- package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
- package/dist/cjs/components/filter/filter.cjs +1 -1
- package/dist/cjs/components/filter/filter.cjs.map +1 -1
- package/dist/cjs/components/modal/check-props.cjs +2 -0
- package/dist/cjs/components/modal/check-props.cjs.map +1 -0
- package/dist/cjs/components/modal/component.cjs +2 -0
- package/dist/cjs/components/modal/component.cjs.map +1 -0
- package/dist/cjs/components/modal/index.cjs +1 -1
- package/dist/cjs/components/modal/index.cjs.map +1 -1
- package/dist/cjs/components/popover/component.cjs +2 -0
- package/dist/cjs/components/popover/component.cjs.map +1 -0
- package/dist/cjs/components/popover/edit-dialog.cjs +1 -1
- package/dist/cjs/components/popover/edit-dialog.cjs.map +1 -1
- package/dist/cjs/components/popover/popover.cjs +1 -1
- package/dist/cjs/components/popover/popover.cjs.map +1 -1
- package/dist/cjs/components/slider/check-props.cjs +1 -1
- package/dist/cjs/components/slider/check-props.cjs.map +1 -1
- package/dist/cjs/components/slider/index.cjs +1 -1
- package/dist/cjs/components/slider/index.cjs.map +1 -1
- package/dist/cjs/components/spinner/check-props.cjs +2 -0
- package/dist/cjs/components/spinner/check-props.cjs.map +1 -0
- package/dist/cjs/components/spinner/component.cjs +2 -0
- package/dist/cjs/components/spinner/component.cjs.map +1 -0
- package/dist/cjs/components/spinner/index.cjs +1 -1
- package/dist/cjs/components/spinner/index.cjs.map +1 -1
- package/dist/cjs/components/tree/check-props.cjs +1 -1
- package/dist/cjs/components/tree/check-props.cjs.map +1 -1
- package/dist/cjs/components/tree/tree.cjs +1 -1
- package/dist/cjs/components/tree/tree.cjs.map +1 -1
- package/dist/cjs/components/vertical-navigation/index.cjs +1 -1
- package/dist/cjs/components/vertical-navigation/index.cjs.map +1 -1
- package/dist/cjs/components/welcome-mat/index.cjs +1 -1
- package/dist/cjs/components/welcome-mat/index.cjs.map +1 -1
- package/dist/es/components/color-picker/color-picker.js +1 -1
- package/dist/es/components/color-picker/color-picker.js.map +1 -1
- package/dist/es/components/combobox/combobox.js +2 -2
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/filter/filter.js +1 -1
- package/dist/es/components/filter/filter.js.map +1 -1
- package/dist/es/components/modal/check-props.js +22 -0
- package/dist/es/components/modal/check-props.js.map +1 -0
- package/dist/es/components/modal/component.js +35 -0
- package/dist/es/components/modal/component.js.map +1 -0
- package/dist/es/components/modal/index.js +118 -104
- package/dist/es/components/modal/index.js.map +1 -1
- package/dist/es/components/popover/component.js +59 -0
- package/dist/es/components/popover/component.js.map +1 -0
- package/dist/es/components/popover/edit-dialog.js +1 -1
- package/dist/es/components/popover/edit-dialog.js.map +1 -1
- package/dist/es/components/popover/popover.js +235 -191
- package/dist/es/components/popover/popover.js.map +1 -1
- package/dist/es/components/slider/check-props.js +1 -1
- package/dist/es/components/slider/check-props.js.map +1 -1
- package/dist/es/components/slider/index.js +63 -60
- package/dist/es/components/slider/index.js.map +1 -1
- package/dist/es/components/spinner/check-props.js +13 -0
- package/dist/es/components/spinner/check-props.js.map +1 -0
- package/dist/es/components/spinner/component.js +17 -0
- package/dist/es/components/spinner/component.js.map +1 -0
- package/dist/es/components/spinner/index.js +43 -29
- package/dist/es/components/spinner/index.js.map +1 -1
- package/dist/es/components/tree/check-props.js +1 -1
- package/dist/es/components/tree/check-props.js.map +1 -1
- package/dist/es/components/tree/tree.js +79 -73
- package/dist/es/components/tree/tree.js.map +1 -1
- package/dist/es/components/vertical-navigation/index.js +17 -16
- package/dist/es/components/vertical-navigation/index.js.map +1 -1
- package/dist/es/components/welcome-mat/index.js +51 -50
- package/dist/es/components/welcome-mat/index.js.map +1 -1
- package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/components/modal/check-props.d.ts +3 -0
- package/dist/types/components/modal/check-props.d.ts.map +1 -0
- package/dist/types/components/modal/index.d.ts +21 -13
- package/dist/types/components/modal/index.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts +24 -14
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/slider/check-props.d.ts.map +1 -1
- package/dist/types/components/slider/index.d.ts +9 -7
- package/dist/types/components/slider/index.d.ts.map +1 -1
- package/dist/types/components/spinner/check-props.d.ts +3 -0
- package/dist/types/components/spinner/check-props.d.ts.map +1 -0
- package/dist/types/components/spinner/index.d.ts +18 -9
- package/dist/types/components/spinner/index.d.ts.map +1 -1
- package/dist/types/components/tree/check-props.d.ts.map +1 -1
- package/dist/types/components/tree/tree.d.ts +8 -4
- package/dist/types/components/tree/tree.d.ts.map +1 -1
- package/dist/types/components/vertical-navigation/index.d.ts +7 -7
- package/dist/types/components/vertical-navigation/index.d.ts.map +1 -1
- package/dist/types/components/welcome-mat/index.d.ts +5 -6
- package/dist/types/components/welcome-mat/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,147 +1,179 @@
|
|
|
1
1
|
import { POPOVER as e } from "../../utilities/constants.js";
|
|
2
2
|
import { IconSettingsContext as t } from "../icon-settings/index.js";
|
|
3
3
|
import n from "../../utilities/key-code.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import r from "../utilities/dialog/index.js";
|
|
5
|
+
import i from "../icon/index.js";
|
|
6
|
+
import ee from "../../utilities/get-component-doc.js";
|
|
6
7
|
import te from "../button/index.js";
|
|
7
|
-
import ne from "
|
|
8
|
-
import re from "
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
8
|
+
import ne from "../../utilities/warning/deprecated-property.js";
|
|
9
|
+
import re from "../media-object/index.js";
|
|
10
|
+
import ie from "../../utilities/keyboard-navigable-dialog.js";
|
|
11
|
+
import ae from "./component.js";
|
|
12
|
+
import a, { forwardRef as o, useCallback as s, useContext as oe, useEffect as c, useId as se, useRef as l, useState as ce } from "react";
|
|
13
|
+
import u from "classnames";
|
|
14
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
15
|
//#region components/popover/popover.tsx
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
+
var p = typeof document < "u", m = p ? document.createElement("span") : { style: {} };
|
|
17
|
+
p && (m.style.top = "0", m.style.left = "0", m.style.width = "100%", m.style.height = "100%", m.style.position = "absolute");
|
|
18
|
+
var h = null, le = [
|
|
16
19
|
"top left",
|
|
17
20
|
"top",
|
|
18
21
|
"top right",
|
|
19
22
|
"bottom left",
|
|
20
23
|
"bottom",
|
|
21
24
|
"bottom right"
|
|
22
|
-
],
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
], ue = { closeButton: "Close dialog" }, g = o(({ align: o = "right", assistiveText: le, ariaLabelledby: g, children: de, body: _, classNameBody: v, classNameFooter: fe, footerClassName: y, className: pe, classNameDialog: me, contentsClassName: he, disabled: ge = !1, footer: b, footerStyle: x, footerWalkthroughActions: S, hasNoCloseButton: _e = !1, hasNoNubbin: ve = !1, hasStaticAlignment: ye = !1, hasNoTriggerStyles: be = !1, heading: C, icon: xe, id: Se, isOpen: Ce, offset: we, onClick: w, onClose: T, onFocus: E, onKeyDown: D, onMouseDown: Te, onMouseEnter: O, onMouseLeave: k, onOpen: A, onRequestClose: j, onRequestTargetElement: M, openOn: N = "click", overlay: P, position: Ee = "absolute", stepText: F, style: De, styleDialog: Oe, styleFooter: ke, triggerClassName: I, variant: L = "base", hoverCloseDelay: R = 300, closeButtonAssistiveText: Ae }, z) => {
|
|
26
|
+
c(() => {
|
|
27
|
+
if (process.env.NODE_ENV !== "production") {
|
|
28
|
+
let t = ee(ae);
|
|
29
|
+
[
|
|
30
|
+
[
|
|
31
|
+
"contentsClassName",
|
|
32
|
+
he,
|
|
33
|
+
"classNameDialog"
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"footerClassName",
|
|
37
|
+
y,
|
|
38
|
+
"classNameFooter"
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
"footerStyle",
|
|
42
|
+
x,
|
|
43
|
+
"styleFooter"
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
"triggerClassName",
|
|
47
|
+
I,
|
|
48
|
+
"className"
|
|
49
|
+
]
|
|
50
|
+
].forEach(([n, r, i]) => {
|
|
51
|
+
ne(e, r, n, i, t(i));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}, []);
|
|
55
|
+
let je = se(), B = Se || je, Me = oe(t), Ne = {
|
|
56
|
+
...ue,
|
|
57
|
+
...le
|
|
58
|
+
}, Pe = Ae || Ne.closeButton, [Fe, V] = ce(!1), [H, Ie] = ce(!1), U = l(null), Le = l(null), W = l(!1), G = l(null), K = l(null), Re = l(!1), q = !ge && (Ce === void 0 ? Fe : Ce), ze = s(() => {
|
|
59
|
+
if (M) {
|
|
60
|
+
let e = M();
|
|
29
61
|
if (e) return e;
|
|
30
62
|
}
|
|
31
|
-
return
|
|
32
|
-
}, [
|
|
63
|
+
return U.current;
|
|
64
|
+
}, [M]), Be = s((e, t) => {
|
|
33
65
|
let n = t?.componentWillUnmount || !1;
|
|
34
|
-
|
|
35
|
-
}, [
|
|
36
|
-
|
|
37
|
-
}, [
|
|
38
|
-
|
|
66
|
+
h?.getId() === B && (h = null), T && T(void 0, { componentWillUnmount: n });
|
|
67
|
+
}, [B, T]), Ve = s((e, t) => {
|
|
68
|
+
A && A(void 0, { portal: t?.portal });
|
|
69
|
+
}, [A]), J = s((e, t) => {
|
|
70
|
+
q && (j && j(e, t), h?.getId() === B && (h = null), V(!1), W.current = !1);
|
|
39
71
|
}, [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
]),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}, [
|
|
47
|
-
let
|
|
48
|
-
|
|
72
|
+
q,
|
|
73
|
+
B,
|
|
74
|
+
j
|
|
75
|
+
]), He = l(J);
|
|
76
|
+
c(() => {
|
|
77
|
+
He.current = J;
|
|
78
|
+
}, [J]);
|
|
79
|
+
let Y = s(() => {
|
|
80
|
+
q || (h && h.getId() !== B && h.handleClose(void 0, {
|
|
49
81
|
trigger: "newPopover",
|
|
50
|
-
id:
|
|
51
|
-
}),
|
|
52
|
-
handleClose: (e, t) =>
|
|
53
|
-
getId: () =>
|
|
54
|
-
},
|
|
55
|
-
}, [
|
|
56
|
-
|
|
57
|
-
}, [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, [
|
|
61
|
-
let
|
|
62
|
-
|
|
82
|
+
id: h.getId()
|
|
83
|
+
}), h = {
|
|
84
|
+
handleClose: (e, t) => He.current(e, t),
|
|
85
|
+
getId: () => B
|
|
86
|
+
}, V(!0));
|
|
87
|
+
}, [q, B]), X = s((e) => {
|
|
88
|
+
J(e, { trigger: "cancel" });
|
|
89
|
+
}, [J]);
|
|
90
|
+
s((e) => {
|
|
91
|
+
J(e, { trigger: "clickOutside" });
|
|
92
|
+
}, [J]);
|
|
93
|
+
let Ue = s((e) => {
|
|
94
|
+
W.current = !0, !q && N === "hover" ? Y() : G.current && clearTimeout(G.current), O && O(e);
|
|
63
95
|
}, [
|
|
64
|
-
W,
|
|
65
|
-
P,
|
|
66
96
|
q,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
97
|
+
N,
|
|
98
|
+
Y,
|
|
99
|
+
O
|
|
100
|
+
]), We = s((e) => {
|
|
101
|
+
q && (G.current = setTimeout(() => {
|
|
102
|
+
J(void 0, { trigger: "mouseLeave" });
|
|
103
|
+
}, R)), k && k(e);
|
|
72
104
|
}, [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
]),
|
|
78
|
-
|
|
105
|
+
q,
|
|
106
|
+
R,
|
|
107
|
+
J,
|
|
108
|
+
k
|
|
109
|
+
]), Z = s((e, t) => {
|
|
110
|
+
q ? J(e, { trigger: "triggerClick" }) : Y(), w && w(e), t && t(e);
|
|
79
111
|
}, [
|
|
80
|
-
W,
|
|
81
112
|
q,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
113
|
+
Y,
|
|
114
|
+
J,
|
|
115
|
+
w
|
|
116
|
+
]), Ge = s((e) => {
|
|
117
|
+
q || Y(), E && E(e);
|
|
86
118
|
}, [
|
|
87
|
-
W,
|
|
88
119
|
q,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
120
|
+
Y,
|
|
121
|
+
E
|
|
122
|
+
]), Ke = s((e) => {
|
|
123
|
+
q ? X(e) : Y();
|
|
92
124
|
}, [
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
]),
|
|
97
|
-
e.keyCode && (e.keyCode !== n.TAB &&
|
|
125
|
+
q,
|
|
126
|
+
X,
|
|
127
|
+
Y
|
|
128
|
+
]), qe = s((e) => {
|
|
129
|
+
e.keyCode && (e.keyCode !== n.TAB && ie({
|
|
98
130
|
event: e,
|
|
99
|
-
isOpen:
|
|
100
|
-
handleClick: (e) =>
|
|
131
|
+
isOpen: q,
|
|
132
|
+
handleClick: (e) => Z(e),
|
|
101
133
|
keyCode: e.keyCode,
|
|
102
134
|
eventTarget: e.target,
|
|
103
|
-
toggleOpen: () =>
|
|
104
|
-
trigger:
|
|
105
|
-
}),
|
|
135
|
+
toggleOpen: () => Ke(e),
|
|
136
|
+
trigger: U.current
|
|
137
|
+
}), D && D(e));
|
|
106
138
|
}, [
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
]),
|
|
112
|
-
typeof
|
|
113
|
-
}, [
|
|
114
|
-
|
|
115
|
-
}, [z]),
|
|
116
|
-
|
|
139
|
+
q,
|
|
140
|
+
Z,
|
|
141
|
+
Ke,
|
|
142
|
+
D
|
|
143
|
+
]), Q = s((e) => {
|
|
144
|
+
typeof P == "function" && p ? P(e, m) : P && e && !K.current && p ? (K.current = m, document.querySelector("body")?.appendChild(m)) : !e && K.current?.parentNode && (K.current.parentNode.removeChild(K.current), K.current = null);
|
|
145
|
+
}, [P]), Je = s((e) => {
|
|
146
|
+
U.current = e, typeof z == "function" ? z(e) : z && (z.current = e), e && !H && Ie(!0);
|
|
147
|
+
}, [H, z]), Ye = s((e) => {
|
|
148
|
+
Le.current = e;
|
|
117
149
|
}, []);
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}, [
|
|
121
|
-
|
|
122
|
-
}, [
|
|
123
|
-
let
|
|
150
|
+
c(() => () => {
|
|
151
|
+
Re.current = !0, h?.getId() === B && (h = null), Q(!1);
|
|
152
|
+
}, [B, Q]), c(() => {
|
|
153
|
+
Q(q);
|
|
154
|
+
}, [q, Q]);
|
|
155
|
+
let Xe = () => {
|
|
124
156
|
let e = L === "error" || L === "warning";
|
|
125
157
|
if (!(C || e) || L === "walkthrough-action" || L === "feature") return null;
|
|
126
158
|
let t = {
|
|
127
|
-
error: /* @__PURE__ */
|
|
159
|
+
error: /* @__PURE__ */ d(i, {
|
|
128
160
|
category: "utility",
|
|
129
161
|
name: "error",
|
|
130
162
|
size: "x-small",
|
|
131
163
|
inverse: !0
|
|
132
164
|
}),
|
|
133
|
-
warning: /* @__PURE__ */
|
|
165
|
+
warning: /* @__PURE__ */ d(i, {
|
|
134
166
|
category: "utility",
|
|
135
167
|
name: "warning",
|
|
136
168
|
size: "x-small",
|
|
137
169
|
inverse: !0
|
|
138
170
|
})
|
|
139
171
|
};
|
|
140
|
-
return e ? /* @__PURE__ */
|
|
172
|
+
return e ? /* @__PURE__ */ d("header", {
|
|
141
173
|
className: "slds-popover__header",
|
|
142
|
-
children: /* @__PURE__ */
|
|
143
|
-
body: /* @__PURE__ */
|
|
144
|
-
id: g || `${
|
|
174
|
+
children: /* @__PURE__ */ d(re, {
|
|
175
|
+
body: /* @__PURE__ */ d("h2", {
|
|
176
|
+
id: g || `${B}-dialog-heading`,
|
|
145
177
|
className: "slds-truncate slds-text-heading_medium",
|
|
146
178
|
title: typeof C == "string" ? C : void 0,
|
|
147
179
|
children: C
|
|
@@ -149,142 +181,154 @@ var m = null, h = [
|
|
|
149
181
|
figure: t[L],
|
|
150
182
|
verticalCenter: !0
|
|
151
183
|
})
|
|
152
|
-
}) : /* @__PURE__ */
|
|
153
|
-
className:
|
|
154
|
-
children: /* @__PURE__ */
|
|
155
|
-
id: g || `${
|
|
156
|
-
className:
|
|
184
|
+
}) : /* @__PURE__ */ d("header", {
|
|
185
|
+
className: u("slds-popover__header", { "slds-p-vertical_medium": L === "walkthrough" }),
|
|
186
|
+
children: /* @__PURE__ */ d("h2", {
|
|
187
|
+
id: g || `${B}-dialog-heading`,
|
|
188
|
+
className: u({
|
|
157
189
|
"slds-text-heading_small": L !== "walkthrough",
|
|
158
190
|
"slds-text-heading_medium": L === "walkthrough"
|
|
159
191
|
}),
|
|
160
192
|
children: C
|
|
161
193
|
})
|
|
162
194
|
});
|
|
163
|
-
},
|
|
164
|
-
id: `${
|
|
165
|
-
className:
|
|
195
|
+
}, Ze = () => L === "error" || L === "warning" ? /* @__PURE__ */ d("div", {
|
|
196
|
+
id: `${B}-dialog-body`,
|
|
197
|
+
className: u("slds-popover__body", v),
|
|
166
198
|
children: _
|
|
167
|
-
}) : L === "walkthrough-action" || L === "feature" ? /* @__PURE__ */
|
|
168
|
-
className:
|
|
169
|
-
id: `${
|
|
170
|
-
children: /* @__PURE__ */
|
|
199
|
+
}) : L === "walkthrough-action" || L === "feature" ? /* @__PURE__ */ d("div", {
|
|
200
|
+
className: u("slds-popover__body", v),
|
|
201
|
+
id: `${B}-dialog-body`,
|
|
202
|
+
children: /* @__PURE__ */ f("div", {
|
|
171
203
|
className: "slds-media",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ d("div", {
|
|
173
205
|
className: "slds-media__figure",
|
|
174
|
-
children: L === "walkthrough-action" ? /* @__PURE__ */
|
|
206
|
+
children: L === "walkthrough-action" ? /* @__PURE__ */ d(i, {
|
|
175
207
|
category: "utility",
|
|
176
208
|
name: "touch_action",
|
|
177
209
|
size: "small",
|
|
178
210
|
inverse: !0
|
|
179
|
-
}) :
|
|
180
|
-
}), /* @__PURE__ */
|
|
211
|
+
}) : xe
|
|
212
|
+
}), /* @__PURE__ */ f("div", {
|
|
181
213
|
className: "slds-media__body",
|
|
182
214
|
children: [
|
|
183
|
-
C && /* @__PURE__ */
|
|
184
|
-
id: g || `${
|
|
215
|
+
C && /* @__PURE__ */ d("h2", {
|
|
216
|
+
id: g || `${B}-dialog-heading`,
|
|
185
217
|
className: "slds-text-heading_small",
|
|
186
218
|
children: C
|
|
187
219
|
}),
|
|
188
220
|
_,
|
|
189
|
-
|
|
221
|
+
F && /* @__PURE__ */ d("p", {
|
|
190
222
|
className: "slds-m-top_medium slds-text-title",
|
|
191
|
-
children:
|
|
223
|
+
children: F
|
|
192
224
|
})
|
|
193
225
|
]
|
|
194
226
|
})]
|
|
195
227
|
})
|
|
196
|
-
}) : /* @__PURE__ */
|
|
197
|
-
id: `${
|
|
198
|
-
className:
|
|
228
|
+
}) : /* @__PURE__ */ d("div", {
|
|
229
|
+
id: `${B}-dialog-body`,
|
|
230
|
+
className: u("slds-popover__body", v),
|
|
199
231
|
children: _
|
|
200
|
-
}),
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
children:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
children:
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
232
|
+
}), Qe = () => {
|
|
233
|
+
let e = u("slds-popover__footer", y, fe), t = x || ke ? {
|
|
234
|
+
...x,
|
|
235
|
+
...ke
|
|
236
|
+
} : void 0;
|
|
237
|
+
return b ? /* @__PURE__ */ d("footer", {
|
|
238
|
+
className: e,
|
|
239
|
+
style: t,
|
|
240
|
+
children: b
|
|
241
|
+
}) : L !== "walkthrough-action" && (S || F) ? /* @__PURE__ */ d("footer", {
|
|
242
|
+
className: e,
|
|
243
|
+
style: t,
|
|
244
|
+
children: /* @__PURE__ */ f("div", {
|
|
245
|
+
className: "slds-grid slds-grid_vertical-align-center",
|
|
246
|
+
children: [F && /* @__PURE__ */ d("span", {
|
|
247
|
+
className: "slds-text-title",
|
|
248
|
+
children: F
|
|
249
|
+
}), S && /* @__PURE__ */ d("div", {
|
|
250
|
+
className: "slds-col_bump-left",
|
|
251
|
+
style: { display: "inline-block" },
|
|
252
|
+
children: S
|
|
253
|
+
})]
|
|
254
|
+
})
|
|
255
|
+
}) : null;
|
|
256
|
+
}, $e = () => {
|
|
257
|
+
if (!q) return null;
|
|
258
|
+
let e = `ignore-click-${B}`;
|
|
259
|
+
return /* @__PURE__ */ f(r, {
|
|
260
|
+
hasNubbin: !ve,
|
|
261
|
+
align: o,
|
|
262
|
+
contentsClassName: u(he, "ignore-react-onclickoutside", "slds-popover", { "slds-popover_error": L === "error" }, { "slds-popover_walkthrough": L === "walkthrough" || L === "walkthrough-action" || L === "feature" }, { "slds-popover_walkthrough-alt": L === "walkthrough-action" }, { "slds-popover_feature": L === "feature" }, { "slds-popover_warning": L === "warning" }, me),
|
|
263
|
+
context: Me,
|
|
264
|
+
hasStaticAlignment: ye,
|
|
265
|
+
offset: we,
|
|
266
|
+
onClose: Be,
|
|
267
|
+
onOpen: Ve,
|
|
268
|
+
onKeyDown: qe,
|
|
269
|
+
onMouseEnter: N === "hover" ? Ue : void 0,
|
|
270
|
+
onMouseLeave: N === "hover" ? We : void 0,
|
|
271
|
+
outsideClickIgnoreClass: e,
|
|
272
|
+
onRequestTargetElement: ze,
|
|
273
|
+
position: Ee,
|
|
274
|
+
style: Oe,
|
|
236
275
|
variant: "popover",
|
|
237
|
-
ref:
|
|
276
|
+
ref: Ye,
|
|
238
277
|
containerProps: {
|
|
239
|
-
id: `${
|
|
240
|
-
"aria-labelledby": g || `${
|
|
241
|
-
"aria-describedby": `${
|
|
278
|
+
id: `${B}-popover`,
|
|
279
|
+
"aria-labelledby": g || `${B}-dialog-heading`,
|
|
280
|
+
"aria-describedby": `${B}-dialog-body`
|
|
242
281
|
},
|
|
243
282
|
children: [
|
|
244
|
-
!
|
|
245
|
-
assistiveText: { icon:
|
|
283
|
+
!_e && /* @__PURE__ */ d(te, {
|
|
284
|
+
assistiveText: { icon: Pe },
|
|
246
285
|
iconCategory: "utility",
|
|
247
286
|
iconName: "close",
|
|
248
|
-
className:
|
|
249
|
-
onClick:
|
|
287
|
+
className: u("slds-button slds-button_icon-small slds-float_right slds-popover__close slds-button_icon", { "slds-button_icon-inverse": L === "walkthrough" || L === "walkthrough-action" || L === "feature" }),
|
|
288
|
+
onClick: X,
|
|
250
289
|
variant: "icon",
|
|
251
290
|
inverse: L === "error" || L === "warning"
|
|
252
291
|
}),
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
292
|
+
Xe(),
|
|
293
|
+
Ze(),
|
|
294
|
+
Qe()
|
|
256
295
|
]
|
|
257
296
|
});
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
if (t === 0 &&
|
|
297
|
+
}, $ = [], et = null;
|
|
298
|
+
a.Children.forEach(de, (e, t) => {
|
|
299
|
+
if (t === 0 && a.isValidElement(e)) {
|
|
261
300
|
let t = e.props, n = {
|
|
262
301
|
"aria-haspopup": "dialog",
|
|
263
|
-
id:
|
|
264
|
-
onClick:
|
|
265
|
-
|
|
302
|
+
id: B,
|
|
303
|
+
onClick: N === "click" || N === "hybrid" ? (e) => {
|
|
304
|
+
Z(e, t.onClick);
|
|
266
305
|
} : t.onClick,
|
|
267
|
-
onFocus:
|
|
268
|
-
onMouseDown:
|
|
269
|
-
onMouseEnter:
|
|
270
|
-
onMouseLeave:
|
|
306
|
+
onFocus: N === "hover" ? Ge : void 0,
|
|
307
|
+
onMouseDown: Te,
|
|
308
|
+
onMouseEnter: N === "hover" || N === "hybrid" ? Ue : void 0,
|
|
309
|
+
onMouseLeave: N === "hover" || N === "hybrid" ? We : void 0,
|
|
271
310
|
tabIndex: t.tabIndex || 0
|
|
272
311
|
};
|
|
273
|
-
|
|
274
|
-
} else e &&
|
|
275
|
-
})
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
312
|
+
et = a.cloneElement(e, n);
|
|
313
|
+
} else e && $.push(e);
|
|
314
|
+
});
|
|
315
|
+
let tt = {
|
|
316
|
+
display: be ? void 0 : "inline-block",
|
|
317
|
+
...De
|
|
318
|
+
};
|
|
319
|
+
return /* @__PURE__ */ f("div", {
|
|
320
|
+
className: u(I, pe) || void 0,
|
|
321
|
+
style: tt,
|
|
322
|
+
ref: Je,
|
|
279
323
|
children: [
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
324
|
+
et,
|
|
325
|
+
$.length > 0 ? $ : null,
|
|
326
|
+
$e()
|
|
283
327
|
]
|
|
284
328
|
});
|
|
285
|
-
};
|
|
329
|
+
});
|
|
286
330
|
g.displayName = e;
|
|
287
331
|
//#endregion
|
|
288
|
-
export {
|
|
332
|
+
export { le as PopoverNubbinPositions, g as default };
|
|
289
333
|
|
|
290
334
|
//# sourceMappingURL=popover.js.map
|