se-design 1.0.77 → 1.0.78-dev1
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/assets/style.css +1 -1
- package/dist/components/CustomModal/index.d.ts +29 -0
- package/dist/index12.js +36 -34
- package/dist/index12.js.map +1 -1
- package/dist/index13.js +11 -11
- package/dist/index13.js.map +1 -1
- package/dist/index19.js +154 -154
- package/dist/index19.js.map +1 -1
- package/dist/index197.js +5 -5
- package/dist/index201.js +1 -1
- package/dist/{index206.js → index208.js} +1 -1
- package/dist/{index206.js.map → index208.js.map} +1 -1
- package/dist/{index207.js → index209.js} +1 -1
- package/dist/{index207.js.map → index209.js.map} +1 -1
- package/dist/{index215.js → index217.js} +1 -1
- package/dist/{index215.js.map → index217.js.map} +1 -1
- package/dist/{index223.js → index225.js} +1 -1
- package/dist/{index223.js.map → index225.js.map} +1 -1
- package/dist/{index226.js → index228.js} +1 -1
- package/dist/{index226.js.map → index228.js.map} +1 -1
- package/dist/{index235.js → index237.js} +1 -1
- package/dist/{index235.js.map → index237.js.map} +1 -1
- package/dist/index238.js +3 -18
- package/dist/index238.js.map +1 -1
- package/dist/index240.js +18 -9
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +9 -4
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +10 -170
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +5 -11
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +170 -6
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +11 -6
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +5 -37
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +6 -2
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +37 -7
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +2 -327
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +7 -49
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +327 -2
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +45 -71
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +2 -93
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +72 -48
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +92 -7
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +51 -4
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +7 -51
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +5 -2
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +52 -2
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +5 -0
- package/dist/index260.js.map +1 -0
- package/dist/index261.js +5 -0
- package/dist/index261.js.map +1 -0
- package/dist/index28.js +2 -2
- package/dist/index40.js +1 -1
- package/dist/index46.js +1 -1
- package/dist/index49.js +16 -14
- package/dist/index49.js.map +1 -1
- package/dist/index51.js +17 -17
- package/dist/index51.js.map +1 -1
- package/dist/index53.js +1 -1
- package/dist/index63.js +1 -1
- package/dist/index76.js +1 -1
- package/package.json +1 -1
- package/dist/index236.js +0 -7
- package/dist/index236.js.map +0 -1
- package/dist/index239.js +0 -13
- package/dist/index239.js.map +0 -1
package/dist/index19.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { getA11yNameAttributes as
|
|
4
|
-
import { useDismissOnFocusOut as
|
|
5
|
-
import { getFirstFocusableElement as
|
|
1
|
+
import H, { forwardRef as ue, useState as D, useRef as J, useEffect as B, useImperativeHandle as pe } from "react";
|
|
2
|
+
import de from "react-dom";
|
|
3
|
+
import { getA11yNameAttributes as me } from "./index78.js";
|
|
4
|
+
import { useDismissOnFocusOut as ve } from "./index77.js";
|
|
5
|
+
import { getFirstFocusableElement as O, getLastFocusableElement as we, getFocusableElements as ge, FOCUSABLE_WITH_ROLES_SELECTOR as he } from "./index71.js";
|
|
6
6
|
import "./index72.js";
|
|
7
7
|
function N() {
|
|
8
|
-
return N = Object.assign ? Object.assign.bind() : function(
|
|
9
|
-
for (var
|
|
10
|
-
var d = arguments[
|
|
11
|
-
for (var
|
|
8
|
+
return N = Object.assign ? Object.assign.bind() : function(b) {
|
|
9
|
+
for (var y = 1; y < arguments.length; y++) {
|
|
10
|
+
var d = arguments[y];
|
|
11
|
+
for (var h in d) ({}).hasOwnProperty.call(d, h) && (b[h] = d[h]);
|
|
12
12
|
}
|
|
13
|
-
return
|
|
13
|
+
return b;
|
|
14
14
|
}, N.apply(null, arguments);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
className:
|
|
18
|
-
automationId:
|
|
16
|
+
const Re = /* @__PURE__ */ ue(({
|
|
17
|
+
className: b = "",
|
|
18
|
+
automationId: y = "",
|
|
19
19
|
position: d = "bottom-center",
|
|
20
|
-
popoverContentAutomationId:
|
|
21
|
-
contentWidth:
|
|
22
|
-
renderPopoverContents:
|
|
23
|
-
renderPopoverSrcElement:
|
|
24
|
-
onPopoverToggle:
|
|
20
|
+
popoverContentAutomationId: h = "",
|
|
21
|
+
contentWidth: R = "max",
|
|
22
|
+
renderPopoverContents: C,
|
|
23
|
+
renderPopoverSrcElement: Q,
|
|
24
|
+
onPopoverToggle: M,
|
|
25
25
|
isPopoverOpen: z,
|
|
26
|
-
disabled:
|
|
26
|
+
disabled: E = !1,
|
|
27
27
|
isWithPortal: f = !1,
|
|
28
|
-
ariaLabel:
|
|
29
|
-
ariaLabelledBy:
|
|
28
|
+
ariaLabel: Y,
|
|
29
|
+
ariaLabelledBy: Z,
|
|
30
30
|
sourceRole: K = "button",
|
|
31
31
|
popoverContentStyleProperty: _ = {
|
|
32
32
|
zIndex: 1e3,
|
|
@@ -35,187 +35,186 @@ const Pt = /* @__PURE__ */ lt(({
|
|
|
35
35
|
backgroundColor: "var(--color-white)"
|
|
36
36
|
},
|
|
37
37
|
disableClickToggle: w = !1,
|
|
38
|
-
noBorder:
|
|
38
|
+
noBorder: ee = !1,
|
|
39
39
|
disableAutoClose: m = !1,
|
|
40
|
-
focusFirstOnOpen:
|
|
41
|
-
...
|
|
42
|
-
},
|
|
43
|
-
const [i, u] =
|
|
44
|
-
ariaLabel:
|
|
45
|
-
ariaLabelledBy:
|
|
40
|
+
focusFirstOnOpen: te = !1,
|
|
41
|
+
...oe
|
|
42
|
+
}, ne) => {
|
|
43
|
+
const [i, u] = D(!1), [k, $] = D(d), [re, T] = D(!1), l = J(null), a = J(null), se = me({
|
|
44
|
+
ariaLabel: Y,
|
|
45
|
+
ariaLabelledBy: Z,
|
|
46
46
|
ariaDescribedBy: void 0
|
|
47
47
|
// Popover doesn't support describedBy yet
|
|
48
48
|
}), {
|
|
49
|
-
onBlurCapture:
|
|
50
|
-
} =
|
|
49
|
+
onBlurCapture: ie
|
|
50
|
+
} = ve({
|
|
51
51
|
disabled: !i || m || f,
|
|
52
52
|
onFocusOut: () => u(!1),
|
|
53
53
|
closeOnEscape: !1
|
|
54
|
-
}), [x,
|
|
54
|
+
}), [x, F] = D({
|
|
55
55
|
top: 0,
|
|
56
56
|
left: 0,
|
|
57
57
|
srcWidth: 0
|
|
58
|
-
}), D = (
|
|
58
|
+
}), [ce, U] = D(!1), L = (e = "bottom-center") => {
|
|
59
59
|
if (!l.current) return {
|
|
60
60
|
top: 0,
|
|
61
61
|
left: 0,
|
|
62
62
|
srcWidth: 0
|
|
63
63
|
};
|
|
64
|
-
let o =
|
|
65
|
-
const
|
|
64
|
+
let o = e;
|
|
65
|
+
const t = l.current.getBoundingClientRect(), s = window.innerWidth, c = window.innerHeight;
|
|
66
66
|
let n = 0, r = 0;
|
|
67
67
|
switch (o) {
|
|
68
68
|
case "bottom-left":
|
|
69
|
-
n =
|
|
69
|
+
n = t.bottom, r = t.left;
|
|
70
70
|
break;
|
|
71
71
|
case "bottom-right":
|
|
72
|
-
n =
|
|
72
|
+
n = t.bottom, r = t.right - t.width * 0.5;
|
|
73
73
|
break;
|
|
74
74
|
case "bottom-center":
|
|
75
|
-
n =
|
|
75
|
+
n = t.bottom, r = t.left + t.width / 2;
|
|
76
76
|
break;
|
|
77
77
|
case "top-left":
|
|
78
|
-
n =
|
|
78
|
+
n = t.top - t.height * 1.9, r = t.left;
|
|
79
79
|
break;
|
|
80
80
|
case "top-right":
|
|
81
|
-
n =
|
|
81
|
+
n = t.top - t.height * 1.9, r = t.right - t.width * 0.5;
|
|
82
82
|
break;
|
|
83
83
|
case "top-center":
|
|
84
|
-
n =
|
|
84
|
+
n = t.top - t.height * 1.9, r = t.left + t.width / 2;
|
|
85
85
|
break;
|
|
86
86
|
default:
|
|
87
|
-
n =
|
|
87
|
+
n = t.bottom, r = t.left;
|
|
88
88
|
break;
|
|
89
89
|
}
|
|
90
|
-
const p = a.current?.getBoundingClientRect(), g = p?.width || 0, v = p?.height || 0;
|
|
90
|
+
const p = a.current?.getBoundingClientRect(), g = (R === "full" ? t.width : p?.width) || 0, v = p?.height || 0;
|
|
91
91
|
if ((o === "bottom-center" || o === "top-center") && (r = r - g / 2), r + g > s && (r = Math.max(0, s - g)), r < 0 && (r = 0), n + v > c) {
|
|
92
|
-
const
|
|
93
|
-
|
|
92
|
+
const P = t.top, fe = c - t.bottom;
|
|
93
|
+
P >= v || P > fe ? (n = t.top - v, n < 48 && (n = 48)) : n = Math.max(48, c - v);
|
|
94
94
|
}
|
|
95
|
-
return n <
|
|
96
|
-
top: n,
|
|
97
|
-
left: r,
|
|
98
|
-
srcWidth:
|
|
95
|
+
return n < 48 && (n = t.bottom, n + v > c && (n = Math.max(48, c - v))), {
|
|
96
|
+
top: Math.round(n),
|
|
97
|
+
left: Math.round(r),
|
|
98
|
+
srcWidth: t.width
|
|
99
99
|
};
|
|
100
100
|
};
|
|
101
|
-
|
|
102
|
-
if (
|
|
103
|
-
return m || document.body.addEventListener("click",
|
|
104
|
-
m || document.body.removeEventListener("click",
|
|
101
|
+
B(() => {
|
|
102
|
+
if (M && M(i), i && !f)
|
|
103
|
+
return m || document.body.addEventListener("click", V, !0), ae(), () => {
|
|
104
|
+
m || document.body.removeEventListener("click", V, !0);
|
|
105
105
|
};
|
|
106
106
|
if (i && f) {
|
|
107
|
-
m ? window.addEventListener("scroll", X) : (document.body.addEventListener("click", S, !0), window.addEventListener("scroll", S)), window.addEventListener("resize",
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
m ? window.removeEventListener("scroll", X) : (document.body.removeEventListener("click", S, !0), window.removeEventListener("scroll", S)), window.removeEventListener("resize", V), clearTimeout(t), clearTimeout(o);
|
|
107
|
+
m ? window.addEventListener("scroll", X) : (document.body.addEventListener("click", S, !0), window.addEventListener("scroll", S)), window.addEventListener("resize", q), A();
|
|
108
|
+
let e, o;
|
|
109
|
+
return e = requestAnimationFrame(() => {
|
|
110
|
+
o = requestAnimationFrame(() => {
|
|
111
|
+
const t = L(k);
|
|
112
|
+
t && F(t), U(!0);
|
|
113
|
+
});
|
|
114
|
+
}), () => {
|
|
115
|
+
m ? window.removeEventListener("scroll", X) : (document.body.removeEventListener("click", S, !0), window.removeEventListener("scroll", S)), window.removeEventListener("resize", q), cancelAnimationFrame(e), cancelAnimationFrame(o), U(!1);
|
|
117
116
|
};
|
|
118
117
|
}
|
|
119
118
|
}, [i, f, m]);
|
|
120
|
-
const
|
|
119
|
+
const A = () => {
|
|
121
120
|
if (!l.current) {
|
|
122
|
-
|
|
121
|
+
T(!1);
|
|
123
122
|
return;
|
|
124
123
|
}
|
|
125
|
-
const
|
|
126
|
-
|
|
124
|
+
const e = l.current.getBoundingClientRect(), o = window.innerHeight, t = window.innerWidth, s = e.top < o && e.bottom > 0 && e.left < t && e.right > 0;
|
|
125
|
+
T(s);
|
|
127
126
|
};
|
|
128
|
-
|
|
127
|
+
B(() => {
|
|
129
128
|
u(z ?? !1);
|
|
130
|
-
}, [z]),
|
|
129
|
+
}, [z]), B(() => {
|
|
131
130
|
i && setTimeout(() => {
|
|
132
|
-
const
|
|
131
|
+
const e = O({
|
|
133
132
|
container: a.current,
|
|
134
133
|
includeRoles: !0
|
|
135
134
|
});
|
|
136
|
-
|
|
135
|
+
e && (te || document.activeElement === l.current) && e.focus();
|
|
137
136
|
}, f ? 60 : 0);
|
|
138
137
|
}, [i]);
|
|
139
|
-
const
|
|
138
|
+
const ae = () => {
|
|
140
139
|
if (!a.current) return;
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
},
|
|
140
|
+
const e = a.current.getBoundingClientRect(), o = window.innerHeight;
|
|
141
|
+
e?.bottom > o ? $(d.includes("left") ? "top-left" : d.includes("right") ? "top-right" : "top-center") : e?.top < 0 && $(d.includes("left") ? "bottom-left" : d.includes("right") ? "bottom-right" : "bottom-center");
|
|
142
|
+
}, V = (e) => {
|
|
144
143
|
const o = l.current;
|
|
145
144
|
if (!o) return;
|
|
146
|
-
const
|
|
145
|
+
const t = e.target, s = o.contains(t), c = a.current?.contains(t), r = t.closest?.(".se-design-popover-wrapper"), p = r && r !== o, g = a.current?.contains(r);
|
|
147
146
|
m || (!s && !c || p && !g) && u(!1);
|
|
148
|
-
}, S = (
|
|
149
|
-
const o = l.current,
|
|
147
|
+
}, S = (e) => {
|
|
148
|
+
const o = l.current, t = a.current;
|
|
150
149
|
if (!o) return;
|
|
151
|
-
if (
|
|
152
|
-
const
|
|
153
|
-
|
|
150
|
+
if (A(), e.type === "scroll" && i) {
|
|
151
|
+
const P = L(k);
|
|
152
|
+
P && F(P);
|
|
154
153
|
}
|
|
155
|
-
const s =
|
|
154
|
+
const s = e.target, c = o.contains(s), n = t?.contains(s), p = s.closest?.(".se-design-popover-wrapper"), g = p && p !== o, v = a.current?.contains(p);
|
|
156
155
|
m || (!c && !n || g && !v) && u(!1);
|
|
157
|
-
},
|
|
156
|
+
}, q = () => {
|
|
158
157
|
if (i && f && l.current) {
|
|
159
|
-
|
|
160
|
-
const
|
|
161
|
-
|
|
158
|
+
A();
|
|
159
|
+
const e = L(k);
|
|
160
|
+
e && F(e);
|
|
162
161
|
}
|
|
163
162
|
}, X = () => {
|
|
164
163
|
if (i && f && l.current) {
|
|
165
|
-
|
|
166
|
-
const
|
|
167
|
-
|
|
164
|
+
A();
|
|
165
|
+
const e = L(k);
|
|
166
|
+
e && F(e);
|
|
168
167
|
}
|
|
169
|
-
},
|
|
168
|
+
}, I = (e = !1) => {
|
|
170
169
|
const o = i;
|
|
171
|
-
u((
|
|
172
|
-
if (
|
|
173
|
-
const
|
|
170
|
+
u((t) => !t), !o && e && setTimeout(() => {
|
|
171
|
+
if (e === "last") {
|
|
172
|
+
const t = we({
|
|
174
173
|
container: a.current,
|
|
175
174
|
includeRoles: !0
|
|
176
175
|
});
|
|
177
|
-
|
|
176
|
+
t && t.focus();
|
|
178
177
|
} else {
|
|
179
|
-
const
|
|
178
|
+
const t = O({
|
|
180
179
|
container: a.current,
|
|
181
180
|
includeRoles: !0
|
|
182
181
|
});
|
|
183
|
-
|
|
182
|
+
t && t.focus();
|
|
184
183
|
}
|
|
185
184
|
}, 50);
|
|
186
|
-
}, j = (
|
|
185
|
+
}, j = (e, o) => {
|
|
187
186
|
if (!o) return;
|
|
188
|
-
const
|
|
189
|
-
if (
|
|
187
|
+
const t = document.activeElement;
|
|
188
|
+
if (t?.tagName === "INPUT" || t?.tagName === "TEXTAREA" || t?.tagName === "SELECT")
|
|
190
189
|
return;
|
|
191
|
-
const s = Array.from(o.querySelectorAll(
|
|
190
|
+
const s = Array.from(o.querySelectorAll(he)).filter((r) => {
|
|
192
191
|
const p = window.getComputedStyle(r);
|
|
193
192
|
return !r.hasAttribute("disabled") && r.getAttribute("aria-disabled") !== "true" && p.display !== "none" && p.visibility !== "hidden" && (r.tabIndex >= 0 || r.hasAttribute("role"));
|
|
194
193
|
});
|
|
195
194
|
if (s.length === 0) return;
|
|
196
195
|
const c = s.findIndex((r) => r === document.activeElement);
|
|
197
196
|
let n = -1;
|
|
198
|
-
|
|
199
|
-
}, W = (
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
else if (
|
|
203
|
-
if (u(!1),
|
|
204
|
-
|
|
197
|
+
e.key === "ArrowDown" ? (e.preventDefault(), e.stopPropagation(), n = c < s.length - 1 ? c + 1 : 0) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), n = c > 0 ? c - 1 : s.length - 1) : e.key === "Home" ? (e.preventDefault(), e.stopPropagation(), n = 0) : e.key === "End" && (e.preventDefault(), e.stopPropagation(), n = s.length - 1), n >= 0 && s[n] ? s[n].focus() : c === -1 && s.length > 0 && s[0].focus();
|
|
198
|
+
}, W = (e) => {
|
|
199
|
+
if (e.key === "Escape")
|
|
200
|
+
e.preventDefault(), e.stopPropagation(), u(!1), l.current?.focus();
|
|
201
|
+
else if (e.key === "Tab") {
|
|
202
|
+
if (u(!1), e.shiftKey)
|
|
203
|
+
e.preventDefault(), l.current?.focus();
|
|
205
204
|
else if (f) {
|
|
206
|
-
|
|
207
|
-
const o = l.current,
|
|
205
|
+
e.preventDefault();
|
|
206
|
+
const o = l.current, t = ge({
|
|
208
207
|
container: document.body,
|
|
209
208
|
filterHidden: !0
|
|
210
|
-
}), s = o ?
|
|
209
|
+
}), s = o ? t.indexOf(o) : -1, c = t[s + 1];
|
|
211
210
|
c ? c.focus() : o?.focus();
|
|
212
211
|
}
|
|
213
|
-
} else
|
|
212
|
+
} else e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "Home" || e.key === "End" ? j(e, a.current) : (e.key === "Enter" || e.key === " ") && e.stopPropagation();
|
|
214
213
|
};
|
|
215
|
-
|
|
216
|
-
togglePopover:
|
|
214
|
+
pe(ne, () => ({
|
|
215
|
+
togglePopover: I
|
|
217
216
|
}), []);
|
|
218
|
-
const
|
|
217
|
+
const le = {
|
|
219
218
|
"bottom-left": {
|
|
220
219
|
left: "0",
|
|
221
220
|
top: "100%"
|
|
@@ -242,86 +241,87 @@ const Pt = /* @__PURE__ */ lt(({
|
|
|
242
241
|
transform: "translateX(-50%)",
|
|
243
242
|
bottom: "100%"
|
|
244
243
|
}
|
|
245
|
-
},
|
|
246
|
-
return /* @__PURE__ */
|
|
247
|
-
className: "se-design-popover-wrapper cursor-pointer relative focus-outline rounded-md" + (
|
|
244
|
+
}, G = ee ? "" : "shadow-md border rounded-md";
|
|
245
|
+
return /* @__PURE__ */ H.createElement("div", N({
|
|
246
|
+
className: "se-design-popover-wrapper cursor-pointer relative focus-outline rounded-md" + (b.length > 0 ? ` ${b}` : "") + (i ? " open" : "") + (E ? " opacity-50 cursor-not-allowed pointer-events-none" : ""),
|
|
248
247
|
ref: l,
|
|
249
|
-
onClick: (
|
|
250
|
-
|
|
248
|
+
onClick: (e) => {
|
|
249
|
+
E || w || (e.stopPropagation(), I());
|
|
251
250
|
},
|
|
252
|
-
onKeyDown: (
|
|
253
|
-
if (!(
|
|
254
|
-
if (
|
|
255
|
-
|
|
251
|
+
onKeyDown: (e) => {
|
|
252
|
+
if (!(E || w))
|
|
253
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
254
|
+
e.preventDefault(), e.stopPropagation();
|
|
256
255
|
const o = i;
|
|
257
|
-
|
|
258
|
-
const
|
|
256
|
+
I(), o || setTimeout(() => {
|
|
257
|
+
const t = O({
|
|
259
258
|
container: a.current,
|
|
260
259
|
includeRoles: !0
|
|
261
260
|
});
|
|
262
|
-
|
|
261
|
+
t && t.focus();
|
|
263
262
|
}, f ? 60 : 0);
|
|
264
|
-
} else if (
|
|
265
|
-
|
|
266
|
-
else if ((
|
|
263
|
+
} else if (e.key === "Escape" && i)
|
|
264
|
+
e.preventDefault(), e.stopPropagation(), u(!1);
|
|
265
|
+
else if ((e.key === "ArrowDown" || e.key === "ArrowUp") && i) {
|
|
267
266
|
const o = a.current;
|
|
268
|
-
o && j(
|
|
269
|
-
} else
|
|
270
|
-
const o =
|
|
267
|
+
o && j(e, o);
|
|
268
|
+
} else e.key === "ArrowDown" && !i && (e.preventDefault(), e.stopPropagation(), u(!0), setTimeout(() => {
|
|
269
|
+
const o = O({
|
|
271
270
|
container: a.current,
|
|
272
271
|
includeRoles: !0
|
|
273
272
|
});
|
|
274
273
|
o && o.focus();
|
|
275
274
|
}, 0));
|
|
276
275
|
},
|
|
277
|
-
onBlurCapture:
|
|
278
|
-
onBlur: (
|
|
276
|
+
onBlurCapture: ie,
|
|
277
|
+
onBlur: (e) => {
|
|
279
278
|
if (!i || m || !f) return;
|
|
280
|
-
const o =
|
|
281
|
-
!
|
|
279
|
+
const o = e.relatedTarget, t = !!(o && l.current?.contains(o)), s = !!(o && a.current?.contains(o));
|
|
280
|
+
!t && !s && u(!1);
|
|
282
281
|
},
|
|
283
282
|
role: w ? "none" : K,
|
|
284
283
|
"aria-expanded": w ? void 0 : i ? "true" : "false",
|
|
285
284
|
"aria-haspopup": w ? void 0 : K === "combobox" ? "listbox" : "true",
|
|
286
|
-
tabIndex:
|
|
287
|
-
"aria-disabled": w ? void 0 :
|
|
288
|
-
},
|
|
289
|
-
"data-automation-id":
|
|
290
|
-
},
|
|
285
|
+
tabIndex: E || w ? -1 : 0,
|
|
286
|
+
"aria-disabled": w ? void 0 : E ? "true" : "false"
|
|
287
|
+
}, se, {
|
|
288
|
+
"data-automation-id": y
|
|
289
|
+
}, oe), Q({
|
|
291
290
|
displayPopover: i,
|
|
292
|
-
togglePopover:
|
|
293
|
-
}), i && !f && /* @__PURE__ */
|
|
294
|
-
className: `popover-content absolute ${
|
|
291
|
+
togglePopover: I
|
|
292
|
+
}), i && !f && /* @__PURE__ */ H.createElement("div", {
|
|
293
|
+
className: `popover-content absolute ${G} z-[1000] ${R == "full" ? "w-full" : "w-max"}`,
|
|
295
294
|
style: {
|
|
296
295
|
..._,
|
|
297
|
-
...
|
|
296
|
+
...le[k]
|
|
298
297
|
},
|
|
299
|
-
onClick: (
|
|
298
|
+
onClick: (e) => e.stopPropagation(),
|
|
300
299
|
onKeyDown: W,
|
|
301
300
|
ref: a,
|
|
302
|
-
"data-automation-id":
|
|
303
|
-
},
|
|
301
|
+
"data-automation-id": h
|
|
302
|
+
}, C({
|
|
304
303
|
closePopoverCb: () => u(!1)
|
|
305
|
-
})), f && i &&
|
|
306
|
-
className: `popover-content-with-portal z-[2002] ${
|
|
304
|
+
})), f && i && re && /* @__PURE__ */ de.createPortal(/* @__PURE__ */ H.createElement("div", {
|
|
305
|
+
className: `popover-content-with-portal z-[2002] ${G} ${R == "full" ? "" : "w-max"}`,
|
|
307
306
|
style: {
|
|
308
307
|
position: "fixed",
|
|
309
308
|
top: x.top,
|
|
310
309
|
left: x.left,
|
|
311
|
-
|
|
310
|
+
visibility: ce ? "visible" : "hidden",
|
|
311
|
+
...R === "full" && x.srcWidth ? {
|
|
312
312
|
width: `${x.srcWidth}px`
|
|
313
313
|
} : {},
|
|
314
314
|
..._
|
|
315
315
|
},
|
|
316
|
-
onClick: (
|
|
316
|
+
onClick: (e) => e.stopPropagation(),
|
|
317
317
|
onKeyDown: W,
|
|
318
318
|
ref: a,
|
|
319
|
-
"data-automation-id":
|
|
320
|
-
},
|
|
319
|
+
"data-automation-id": h
|
|
320
|
+
}, C({
|
|
321
321
|
closePopoverCb: () => u(!1)
|
|
322
322
|
})), document.body));
|
|
323
323
|
});
|
|
324
324
|
export {
|
|
325
|
-
|
|
325
|
+
Re as Popover
|
|
326
326
|
};
|
|
327
327
|
//# sourceMappingURL=index19.js.map
|