se-design 1.0.84 → 1.0.85-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button/index.d.ts +5 -0
- package/dist/index16.js +27 -27
- package/dist/index16.js.map +1 -1
- package/dist/index19.js +121 -128
- package/dist/index19.js.map +1 -1
- package/dist/index25.js +191 -175
- package/dist/index25.js.map +1 -1
- package/dist/index4.js +66 -57
- package/dist/index4.js.map +1 -1
- package/dist/index67.js +39 -30
- package/dist/index67.js.map +1 -1
- package/package.json +1 -1
package/dist/index19.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import
|
|
1
|
+
import S, { forwardRef as we, useState as F, useRef as te, useEffect as B, useImperativeHandle as ge } from "react";
|
|
2
2
|
import he from "react-dom";
|
|
3
3
|
import { getA11yNameAttributes as be } from "./index81.js";
|
|
4
4
|
import { useDismissOnFocusOut as ye } from "./index80.js";
|
|
5
|
-
import { getFirstFocusableElement as
|
|
5
|
+
import { getFirstFocusableElement as M, getLastFocusableElement as Ee, getFocusableElements as N, FOCUSABLE_WITH_ROLES_SELECTOR as Pe } from "./index71.js";
|
|
6
6
|
import "./index72.js";
|
|
7
|
-
import { useRegisterPortalWithFocusTrap as
|
|
8
|
-
function
|
|
9
|
-
return
|
|
7
|
+
import { useRegisterPortalWithFocusTrap as ke } from "./index208.js";
|
|
8
|
+
function q() {
|
|
9
|
+
return q = Object.assign ? Object.assign.bind() : function(y) {
|
|
10
10
|
for (var E = 1; E < arguments.length; E++) {
|
|
11
11
|
var m = arguments[E];
|
|
12
12
|
for (var h in m) ({}).hasOwnProperty.call(m, h) && (y[h] = m[h]);
|
|
13
13
|
}
|
|
14
14
|
return y;
|
|
15
|
-
},
|
|
15
|
+
}, q.apply(null, arguments);
|
|
16
16
|
}
|
|
17
17
|
const He = /* @__PURE__ */ we(({
|
|
18
18
|
className: y = "",
|
|
19
19
|
automationId: E = "",
|
|
20
20
|
position: m = "bottom-center",
|
|
21
21
|
popoverContentAutomationId: h = "",
|
|
22
|
-
contentWidth:
|
|
22
|
+
contentWidth: D = "max",
|
|
23
23
|
renderPopoverContents: K,
|
|
24
24
|
renderPopoverSrcElement: oe,
|
|
25
|
-
onPopoverToggle:
|
|
26
|
-
isPopoverOpen:
|
|
27
|
-
disabled:
|
|
28
|
-
isWithPortal:
|
|
25
|
+
onPopoverToggle: T,
|
|
26
|
+
isPopoverOpen: z,
|
|
27
|
+
disabled: P = !1,
|
|
28
|
+
isWithPortal: p = !1,
|
|
29
29
|
ariaLabel: ne,
|
|
30
30
|
ariaLabelledBy: re,
|
|
31
|
-
sourceRole:
|
|
31
|
+
sourceRole: C = "button",
|
|
32
32
|
popupType: _ = "true",
|
|
33
33
|
popoverContentStyleProperty: $ = {
|
|
34
34
|
zIndex: 1e3,
|
|
@@ -42,8 +42,8 @@ const He = /* @__PURE__ */ we(({
|
|
|
42
42
|
focusFirstOnOpen: ie = !1,
|
|
43
43
|
...ce
|
|
44
44
|
}, ae) => {
|
|
45
|
-
const [i,
|
|
46
|
-
|
|
45
|
+
const [i, f] = F(!1), [k, U] = F(m), [le, W] = F(!1), l = te(null), a = te(null);
|
|
46
|
+
ke(a, p && i);
|
|
47
47
|
const ue = be({
|
|
48
48
|
ariaLabel: ne,
|
|
49
49
|
ariaLabelledBy: re,
|
|
@@ -52,30 +52,30 @@ const He = /* @__PURE__ */ we(({
|
|
|
52
52
|
}), {
|
|
53
53
|
onBlurCapture: fe
|
|
54
54
|
} = ye({
|
|
55
|
-
disabled: !i || v ||
|
|
56
|
-
onFocusOut: () =>
|
|
55
|
+
disabled: !i || v || p,
|
|
56
|
+
onFocusOut: () => f(!1),
|
|
57
57
|
closeOnEscape: !1
|
|
58
|
-
}), [
|
|
58
|
+
}), [R, A] = F({
|
|
59
59
|
top: 0,
|
|
60
60
|
left: 0,
|
|
61
61
|
srcWidth: 0
|
|
62
|
-
}), [pe,
|
|
63
|
-
g ? (
|
|
62
|
+
}), [pe, V] = F(!1), b = () => {
|
|
63
|
+
g ? (M({
|
|
64
64
|
container: l.current,
|
|
65
65
|
includeRoles: !0
|
|
66
66
|
}) ?? l.current)?.focus() : l.current?.focus();
|
|
67
67
|
}, X = (e) => {
|
|
68
|
-
|
|
68
|
+
f(!1), e?.returnFocus !== !1 && requestAnimationFrame(() => {
|
|
69
69
|
e?.returnFocusTo ? (e.returnFocusTo instanceof HTMLElement ? e.returnFocusTo : e.returnFocusTo.current)?.focus() : b();
|
|
70
70
|
});
|
|
71
|
-
},
|
|
71
|
+
}, L = (e = "bottom-center") => {
|
|
72
72
|
if (!l.current) return {
|
|
73
73
|
top: 0,
|
|
74
74
|
left: 0,
|
|
75
75
|
srcWidth: 0
|
|
76
76
|
};
|
|
77
77
|
let o = e;
|
|
78
|
-
const t = l.current.getBoundingClientRect(), r = window.innerWidth - document.documentElement.clientWidth, u = window.innerWidth - Math.max(r, 16),
|
|
78
|
+
const t = l.current.getBoundingClientRect(), r = window.innerWidth - document.documentElement.clientWidth, u = window.innerWidth - Math.max(r, 16), c = window.innerHeight;
|
|
79
79
|
let n = 0, s = 0;
|
|
80
80
|
switch (o) {
|
|
81
81
|
case "bottom-left":
|
|
@@ -100,100 +100,107 @@ const He = /* @__PURE__ */ we(({
|
|
|
100
100
|
n = t.bottom, s = t.left;
|
|
101
101
|
break;
|
|
102
102
|
}
|
|
103
|
-
const d =
|
|
104
|
-
if ((o === "bottom-center" || o === "top-center") && (s = s - x / 2), s + x > u && (s = Math.max(0, u - x)), s < 0 && (s = 0), n + w >
|
|
105
|
-
const ee = t.top, ve =
|
|
106
|
-
ee >= w || ee > ve ? (n = t.top - w, n < 48 && (n = 48)) : n = Math.max(48,
|
|
103
|
+
const d = a.current?.getBoundingClientRect(), x = (D === "full" ? Math.max(t.width, d?.width || 0) : d?.width) || 0, w = d?.height || 0;
|
|
104
|
+
if ((o === "bottom-center" || o === "top-center") && (s = s - x / 2), s + x > u && (s = Math.max(0, u - x)), s < 0 && (s = 0), n + w > c) {
|
|
105
|
+
const ee = t.top, ve = c - t.bottom;
|
|
106
|
+
ee >= w || ee > ve ? (n = t.top - w, n < 48 && (n = 48)) : n = Math.max(48, c - w);
|
|
107
107
|
}
|
|
108
|
-
return n < 48 && (n = t.bottom, n + w >
|
|
108
|
+
return n < 48 && (n = t.bottom, n + w > c && (n = Math.max(48, c - w))), {
|
|
109
109
|
top: Math.round(n),
|
|
110
110
|
left: Math.round(s),
|
|
111
111
|
srcWidth: t.width
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
|
-
|
|
115
|
-
if (
|
|
114
|
+
B(() => {
|
|
115
|
+
if (T && T(i), i && !p)
|
|
116
116
|
return v || document.body.addEventListener("click", j, !0), de(), () => {
|
|
117
117
|
v || document.body.removeEventListener("click", j, !0);
|
|
118
118
|
};
|
|
119
|
-
if (i &&
|
|
120
|
-
v ? window.addEventListener("scroll", G) : (document.body.addEventListener("click",
|
|
119
|
+
if (i && p) {
|
|
120
|
+
v ? window.addEventListener("scroll", G) : (document.body.addEventListener("click", H, !0), window.addEventListener("scroll", H)), window.addEventListener("resize", Y);
|
|
121
121
|
const e = (r) => {
|
|
122
|
-
r.key === "Escape" &&
|
|
122
|
+
r.key === "Escape" && a.current?.contains(document.activeElement) && (r.preventDefault(), r.stopPropagation(), f(!1), requestAnimationFrame(() => b()));
|
|
123
123
|
};
|
|
124
|
-
window.addEventListener("keydown", e, !0),
|
|
124
|
+
window.addEventListener("keydown", e, !0), I();
|
|
125
125
|
let o, t;
|
|
126
126
|
return o = requestAnimationFrame(() => {
|
|
127
127
|
t = requestAnimationFrame(() => {
|
|
128
|
-
const r =
|
|
129
|
-
r && A(r),
|
|
128
|
+
const r = L(k);
|
|
129
|
+
r && A(r), V(!0);
|
|
130
130
|
});
|
|
131
131
|
}), () => {
|
|
132
|
-
v ? window.removeEventListener("scroll", G) : (document.body.removeEventListener("click",
|
|
132
|
+
v ? window.removeEventListener("scroll", G) : (document.body.removeEventListener("click", H, !0), window.removeEventListener("scroll", H)), window.removeEventListener("resize", Y), window.removeEventListener("keydown", e, !0), cancelAnimationFrame(o), cancelAnimationFrame(t), V(!1);
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
}, [i,
|
|
136
|
-
const
|
|
135
|
+
}, [i, p, v]);
|
|
136
|
+
const I = () => {
|
|
137
137
|
if (!l.current) {
|
|
138
|
-
|
|
138
|
+
W(!1);
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
const e = l.current.getBoundingClientRect(), o = window.innerHeight, t = window.innerWidth, r = e.top < o && e.bottom > 0 && e.left < t && e.right > 0;
|
|
142
|
-
|
|
142
|
+
W(r);
|
|
143
143
|
};
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}, [
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
144
|
+
B(() => {
|
|
145
|
+
f(z ?? !1);
|
|
146
|
+
}, [z]), B(() => {
|
|
147
|
+
if (i) {
|
|
148
|
+
let e, o;
|
|
149
|
+
return e = requestAnimationFrame(() => {
|
|
150
|
+
o = requestAnimationFrame(() => {
|
|
151
|
+
const t = M({
|
|
152
|
+
container: a.current,
|
|
153
|
+
includeRoles: !0
|
|
154
|
+
});
|
|
155
|
+
t && (ie || document.activeElement === l.current) && t.focus();
|
|
156
|
+
});
|
|
157
|
+
}), () => {
|
|
158
|
+
cancelAnimationFrame(e), cancelAnimationFrame(o);
|
|
159
|
+
};
|
|
160
|
+
}
|
|
154
161
|
}, [i]);
|
|
155
162
|
const de = () => {
|
|
156
|
-
if (!
|
|
157
|
-
const e =
|
|
163
|
+
if (!a.current) return;
|
|
164
|
+
const e = a.current.getBoundingClientRect(), o = window.innerHeight;
|
|
158
165
|
e?.bottom > o ? U(m.includes("left") ? "top-left" : m.includes("right") ? "top-right" : "top-center") : e?.top < 0 && U(m.includes("left") ? "bottom-left" : m.includes("right") ? "bottom-right" : "bottom-center");
|
|
159
166
|
}, j = (e) => {
|
|
160
167
|
const o = l.current;
|
|
161
168
|
if (!o) return;
|
|
162
|
-
const t = e.target, r = o.contains(t), u =
|
|
163
|
-
v || (!r && !u || s && !d) &&
|
|
164
|
-
},
|
|
165
|
-
const o = l.current, t =
|
|
169
|
+
const t = e.target, r = o.contains(t), u = a.current?.contains(t), n = t.closest?.(".se-design-popover-wrapper"), s = n && n !== o, d = a.current?.contains(n);
|
|
170
|
+
v || (!r && !u || s && !d) && f(!1);
|
|
171
|
+
}, H = (e) => {
|
|
172
|
+
const o = l.current, t = a.current;
|
|
166
173
|
if (!o) return;
|
|
167
|
-
if (
|
|
168
|
-
const w =
|
|
174
|
+
if (I(), e.type === "scroll" && i) {
|
|
175
|
+
const w = L(k);
|
|
169
176
|
w && A(w);
|
|
170
177
|
}
|
|
171
|
-
const r = e.target, u = o.contains(r),
|
|
172
|
-
v || (!u && !
|
|
178
|
+
const r = e.target, u = o.contains(r), c = t?.contains(r), s = r.closest?.(".se-design-popover-wrapper"), d = s && s !== o, x = a.current?.contains(s);
|
|
179
|
+
v || (!u && !c || d && !x) && f(!1);
|
|
173
180
|
}, Y = () => {
|
|
174
|
-
if (i &&
|
|
175
|
-
|
|
176
|
-
const e =
|
|
181
|
+
if (i && p && l.current) {
|
|
182
|
+
I();
|
|
183
|
+
const e = L(k);
|
|
177
184
|
e && A(e);
|
|
178
185
|
}
|
|
179
186
|
}, G = () => {
|
|
180
|
-
if (i &&
|
|
181
|
-
|
|
182
|
-
const e =
|
|
187
|
+
if (i && p && l.current) {
|
|
188
|
+
I();
|
|
189
|
+
const e = L(k);
|
|
183
190
|
e && A(e);
|
|
184
191
|
}
|
|
185
|
-
},
|
|
192
|
+
}, O = (e = !1) => {
|
|
186
193
|
const o = i;
|
|
187
|
-
|
|
194
|
+
f((t) => !t), !o && e && setTimeout(() => {
|
|
188
195
|
if (e === "last") {
|
|
189
196
|
const t = Ee({
|
|
190
|
-
container:
|
|
197
|
+
container: a.current,
|
|
191
198
|
includeRoles: !0
|
|
192
199
|
});
|
|
193
200
|
t && t.focus();
|
|
194
201
|
} else {
|
|
195
|
-
const t =
|
|
196
|
-
container:
|
|
202
|
+
const t = M({
|
|
203
|
+
container: a.current,
|
|
197
204
|
includeRoles: !0
|
|
198
205
|
});
|
|
199
206
|
t && t.focus();
|
|
@@ -204,36 +211,36 @@ const He = /* @__PURE__ */ we(({
|
|
|
204
211
|
const t = document.activeElement;
|
|
205
212
|
if (t?.tagName === "INPUT" || t?.tagName === "TEXTAREA" || t?.tagName === "SELECT")
|
|
206
213
|
return;
|
|
207
|
-
const r = Array.from(o.querySelectorAll(
|
|
214
|
+
const r = Array.from(o.querySelectorAll(Pe)).filter((n) => {
|
|
208
215
|
const s = window.getComputedStyle(n);
|
|
209
216
|
return !n.hasAttribute("disabled") && n.getAttribute("aria-disabled") !== "true" && s.display !== "none" && s.visibility !== "hidden" && (n.tabIndex >= 0 || n.hasAttribute("role"));
|
|
210
217
|
});
|
|
211
218
|
if (r.length === 0) return;
|
|
212
219
|
const u = r.findIndex((n) => n === document.activeElement);
|
|
213
|
-
let
|
|
214
|
-
e.key === "ArrowDown" ? (e.preventDefault(), e.stopPropagation(),
|
|
220
|
+
let c = -1;
|
|
221
|
+
e.key === "ArrowDown" ? (e.preventDefault(), e.stopPropagation(), c = u < r.length - 1 ? u + 1 : 0) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), c = u > 0 ? u - 1 : r.length - 1) : e.key === "Home" ? (e.preventDefault(), e.stopPropagation(), c = 0) : e.key === "End" && (e.preventDefault(), e.stopPropagation(), c = r.length - 1), c >= 0 && r[c] ? r[c].focus() : u === -1 && r.length > 0 && r[0].focus();
|
|
215
222
|
}, Q = (e) => {
|
|
216
223
|
if (e.key === "Escape")
|
|
217
|
-
e.preventDefault(), e.stopPropagation(),
|
|
224
|
+
e.preventDefault(), e.stopPropagation(), f(!1), requestAnimationFrame(() => b());
|
|
218
225
|
else if (e.key === "Tab") {
|
|
219
226
|
if (_ === "dialog") {
|
|
220
227
|
const o = N({
|
|
221
|
-
container:
|
|
228
|
+
container: a.current,
|
|
222
229
|
filterHidden: !0
|
|
223
230
|
}), t = o.indexOf(e.target), r = t === o.length - 1, u = t === 0 || t === -1;
|
|
224
231
|
if (e.shiftKey && u)
|
|
225
|
-
e.preventDefault(),
|
|
226
|
-
else if (!e.shiftKey && r && (
|
|
232
|
+
e.preventDefault(), f(!1), b();
|
|
233
|
+
else if (!e.shiftKey && r && (f(!1), p)) {
|
|
227
234
|
e.preventDefault();
|
|
228
|
-
const
|
|
235
|
+
const c = l.current, n = N({
|
|
229
236
|
container: document.body,
|
|
230
237
|
filterHidden: !0
|
|
231
|
-
}), s =
|
|
232
|
-
d ? d.focus() :
|
|
238
|
+
}), s = c ? n.indexOf(c) : -1, d = n[s + 1];
|
|
239
|
+
d ? d.focus() : c?.focus();
|
|
233
240
|
}
|
|
234
|
-
} else if (
|
|
241
|
+
} else if (f(!1), e.shiftKey)
|
|
235
242
|
e.preventDefault(), b();
|
|
236
|
-
else if (
|
|
243
|
+
else if (p) {
|
|
237
244
|
e.preventDefault();
|
|
238
245
|
const o = l.current, t = N({
|
|
239
246
|
container: document.body,
|
|
@@ -241,10 +248,10 @@ const He = /* @__PURE__ */ we(({
|
|
|
241
248
|
}), r = o ? t.indexOf(o) : -1, u = t[r + 1];
|
|
242
249
|
u ? u.focus() : o?.focus();
|
|
243
250
|
}
|
|
244
|
-
} else e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Home" || e.key === "End" ? J(e,
|
|
251
|
+
} else e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Home" || e.key === "End" ? J(e, a.current) : (e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
245
252
|
};
|
|
246
253
|
ge(ae, () => ({
|
|
247
|
-
togglePopover:
|
|
254
|
+
togglePopover: O,
|
|
248
255
|
focusTrigger: () => b(),
|
|
249
256
|
element: l.current
|
|
250
257
|
}), []);
|
|
@@ -276,83 +283,69 @@ const He = /* @__PURE__ */ we(({
|
|
|
276
283
|
bottom: "100%"
|
|
277
284
|
}
|
|
278
285
|
}, Z = se ? "" : "shadow-md border rounded-md";
|
|
279
|
-
return /* @__PURE__ */
|
|
280
|
-
className: "se-design-popover-wrapper cursor-pointer relative focus-outline rounded-md" + (y.length > 0 ? ` ${y}` : "") + (i ? " open" : "") + (
|
|
286
|
+
return /* @__PURE__ */ S.createElement("div", q({
|
|
287
|
+
className: "se-design-popover-wrapper cursor-pointer relative focus-outline rounded-md" + (y.length > 0 ? ` ${y}` : "") + (i ? " open" : "") + (P ? " opacity-50 cursor-not-allowed pointer-events-none" : ""),
|
|
281
288
|
ref: l,
|
|
282
289
|
onClick: (e) => {
|
|
283
|
-
|
|
290
|
+
P || g || (e.stopPropagation(), O());
|
|
284
291
|
},
|
|
285
292
|
onKeyDown: (e) => {
|
|
286
|
-
if (!(
|
|
287
|
-
if (e.key === "Enter" || e.key === " ")
|
|
288
|
-
e.preventDefault(), e.stopPropagation();
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
const t = D({
|
|
292
|
-
container: c.current,
|
|
293
|
-
includeRoles: !0
|
|
294
|
-
});
|
|
295
|
-
t && t.focus();
|
|
296
|
-
}, f ? 60 : 0);
|
|
297
|
-
} else if (e.key === "Escape" && i)
|
|
298
|
-
e.preventDefault(), e.stopPropagation(), p(!1);
|
|
293
|
+
if (!(P || g))
|
|
294
|
+
if (e.key === "Enter" || e.key === " ")
|
|
295
|
+
e.preventDefault(), e.stopPropagation(), O();
|
|
296
|
+
else if (e.key === "Escape" && i)
|
|
297
|
+
e.preventDefault(), e.stopPropagation(), f(!1);
|
|
299
298
|
else if ((e.key === "ArrowDown" || e.key === "ArrowUp") && i) {
|
|
300
|
-
const o =
|
|
299
|
+
const o = a.current;
|
|
301
300
|
o && J(e, o);
|
|
302
|
-
} else e.key === "ArrowDown" && !i && (e.preventDefault(), e.stopPropagation(),
|
|
303
|
-
const o = D({
|
|
304
|
-
container: c.current,
|
|
305
|
-
includeRoles: !0
|
|
306
|
-
});
|
|
307
|
-
o && o.focus();
|
|
308
|
-
}, 0));
|
|
301
|
+
} else e.key === "ArrowDown" && !i && (e.preventDefault(), e.stopPropagation(), f(!0));
|
|
309
302
|
},
|
|
310
303
|
onBlurCapture: fe,
|
|
311
304
|
onBlur: (e) => {
|
|
312
|
-
if (!i || v || !
|
|
313
|
-
const o = e.relatedTarget, t = !!(o && l.current?.contains(o)), r = !!(o &&
|
|
314
|
-
!t && !r &&
|
|
305
|
+
if (!i || v || !p) return;
|
|
306
|
+
const o = e.relatedTarget, t = !!(o && l.current?.contains(o)), r = !!(o && a.current?.contains(o));
|
|
307
|
+
!t && !r && f(!1);
|
|
315
308
|
},
|
|
316
|
-
role: g ? "none" :
|
|
309
|
+
role: g ? "none" : C,
|
|
317
310
|
"aria-expanded": g ? void 0 : i ? "true" : "false",
|
|
318
|
-
"aria-haspopup": g ? void 0 :
|
|
319
|
-
tabIndex:
|
|
320
|
-
"aria-disabled": g ? void 0 :
|
|
311
|
+
"aria-haspopup": g ? void 0 : C === "combobox" ? "listbox" : _,
|
|
312
|
+
tabIndex: P || g ? -1 : 0,
|
|
313
|
+
"aria-disabled": g ? void 0 : P ? "true" : void 0
|
|
321
314
|
}, ue, {
|
|
322
315
|
"data-automation-id": E
|
|
323
316
|
}, ce), oe({
|
|
324
317
|
displayPopover: i,
|
|
325
|
-
togglePopover:
|
|
326
|
-
}), i && !
|
|
327
|
-
className: `popover-content absolute ${Z} z-[1000] ${
|
|
318
|
+
togglePopover: O
|
|
319
|
+
}), i && !p && /* @__PURE__ */ S.createElement("div", {
|
|
320
|
+
className: `popover-content absolute ${Z} z-[1000] ${D == "full" ? "w-full" : "w-max"}`,
|
|
328
321
|
style: {
|
|
329
322
|
...$,
|
|
330
|
-
...me[
|
|
323
|
+
...me[k]
|
|
331
324
|
},
|
|
332
325
|
onClick: (e) => e.stopPropagation(),
|
|
333
326
|
onKeyDown: Q,
|
|
334
|
-
ref:
|
|
327
|
+
ref: a,
|
|
335
328
|
"data-automation-id": h
|
|
336
329
|
}, K({
|
|
337
330
|
closePopoverCb: X
|
|
338
|
-
})),
|
|
339
|
-
className: `popover-content-with-portal z-[2002] ${Z} ${
|
|
331
|
+
})), p && i && le && /* @__PURE__ */ he.createPortal(/* @__PURE__ */ S.createElement("div", {
|
|
332
|
+
className: `popover-content-with-portal z-[2002] ${Z} ${D == "full" ? "" : "w-max"}`,
|
|
340
333
|
style: {
|
|
341
334
|
position: "fixed",
|
|
342
|
-
top:
|
|
343
|
-
left:
|
|
335
|
+
top: R.top,
|
|
336
|
+
left: R.left,
|
|
344
337
|
visibility: pe ? "visible" : "hidden",
|
|
345
338
|
maxHeight: "calc(100vh - 96px)",
|
|
346
339
|
overflowY: "hidden",
|
|
347
|
-
...
|
|
348
|
-
width: `${
|
|
340
|
+
...D === "full" && R.srcWidth ? {
|
|
341
|
+
width: `${R.srcWidth}px`
|
|
349
342
|
} : {},
|
|
350
343
|
...$,
|
|
351
344
|
zIndex: 2002
|
|
352
345
|
},
|
|
353
346
|
onClick: (e) => e.stopPropagation(),
|
|
354
347
|
onKeyDown: Q,
|
|
355
|
-
ref:
|
|
348
|
+
ref: a,
|
|
356
349
|
"data-automation-id": h
|
|
357
350
|
}, K({
|
|
358
351
|
closePopoverCb: X
|