@sps-woodland/buttons 8.42.1 → 8.42.2
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/lib/index.js +1107 -637
- package/lib/index.umd.cjs +29 -23
- package/lib/style.css +1 -1
- package/package.json +13 -14
package/lib/index.js
CHANGED
|
@@ -1,77 +1,123 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { Spinner as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import _e, { useRef as Z, useCallback as x, useEffect as z, useState as fe, useMemo as at, useContext as lt } from "react";
|
|
3
|
+
import { Spinner as Bt, cl as St, Metadata as Lt, Icon as Re } from "@sps-woodland/core";
|
|
4
|
+
import { flushSync as Nt } from "react-dom";
|
|
5
|
+
import { FocusRing as Dt } from "@react-aria/focus";
|
|
6
|
+
import { useWoodlandLanguage as Ct } from "@spscommerce/i18n";
|
|
7
|
+
import { code as E } from "@spscommerce/utils";
|
|
8
|
+
const oe = typeof document < "u" ? _e.useLayoutEffect : () => {
|
|
8
9
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
e
|
|
15
|
-
]), z((...r) => {
|
|
16
|
-
const o = t.current;
|
|
17
|
-
return o?.(...r);
|
|
18
|
-
}, []);
|
|
19
|
-
}
|
|
20
|
-
let me = /* @__PURE__ */ new Map();
|
|
21
|
-
function je(e, t) {
|
|
10
|
+
let Be = /* @__PURE__ */ new Map();
|
|
11
|
+
typeof FinalizationRegistry < "u" && new FinalizationRegistry((e) => {
|
|
12
|
+
Be.delete(e);
|
|
13
|
+
});
|
|
14
|
+
function At(e, t) {
|
|
22
15
|
if (e === t) return e;
|
|
23
|
-
let
|
|
24
|
-
if (
|
|
25
|
-
return
|
|
26
|
-
let
|
|
27
|
-
return
|
|
16
|
+
let n = Be.get(e);
|
|
17
|
+
if (n)
|
|
18
|
+
return n.forEach((i) => i.current = t), t;
|
|
19
|
+
let r = Be.get(t);
|
|
20
|
+
return r ? (r.forEach((i) => i.current = e), e) : t;
|
|
28
21
|
}
|
|
29
|
-
function
|
|
22
|
+
function ut(...e) {
|
|
30
23
|
return (...t) => {
|
|
31
|
-
for (let
|
|
24
|
+
for (let n of e) typeof n == "function" && n(...t);
|
|
32
25
|
};
|
|
33
26
|
}
|
|
34
|
-
const
|
|
27
|
+
const P = (e) => {
|
|
35
28
|
var t;
|
|
36
29
|
return (t = e?.ownerDocument) !== null && t !== void 0 ? t : document;
|
|
37
|
-
},
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
}, M = (e) => e && "window" in e && e.window === e ? e : P(e).defaultView || window;
|
|
31
|
+
function It(e) {
|
|
32
|
+
return e !== null && typeof e == "object" && "nodeType" in e && typeof e.nodeType == "number";
|
|
33
|
+
}
|
|
34
|
+
function Mt(e) {
|
|
35
|
+
return It(e) && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in e;
|
|
36
|
+
}
|
|
37
|
+
let Kt = !1;
|
|
38
|
+
function Ae() {
|
|
39
|
+
return Kt;
|
|
40
|
+
}
|
|
41
|
+
function y(e, t) {
|
|
42
|
+
if (!Ae()) return t && e ? e.contains(t) : !1;
|
|
43
|
+
if (!e || !t) return !1;
|
|
44
|
+
let n = t;
|
|
45
|
+
for (; n !== null; ) {
|
|
46
|
+
if (n === e) return !0;
|
|
47
|
+
n.tagName === "SLOT" && n.assignedSlot ? n = n.assignedSlot.parentNode : Mt(n) ? n = n.host : n = n.parentNode;
|
|
48
|
+
}
|
|
49
|
+
return !1;
|
|
50
|
+
}
|
|
51
|
+
const q = (e = document) => {
|
|
52
|
+
var t;
|
|
53
|
+
if (!Ae()) return e.activeElement;
|
|
54
|
+
let n = e.activeElement;
|
|
55
|
+
for (; n && "shadowRoot" in n && (!((t = n.shadowRoot) === null || t === void 0) && t.activeElement); ) n = n.shadowRoot.activeElement;
|
|
56
|
+
return n;
|
|
57
|
+
};
|
|
58
|
+
function b(e) {
|
|
59
|
+
if (Ae() && e.target instanceof Element && e.target.shadowRoot) {
|
|
60
|
+
var t, n;
|
|
61
|
+
if ("composedPath" in e) return (t = e.composedPath()[0]) !== null && t !== void 0 ? t : null;
|
|
62
|
+
if ("composedPath" in e.nativeEvent) return (n = e.nativeEvent.composedPath()[0]) !== null && n !== void 0 ? n : null;
|
|
63
|
+
}
|
|
64
|
+
return e.target;
|
|
65
|
+
}
|
|
66
|
+
function Ft(...e) {
|
|
67
|
+
return e.length === 1 && e[0] ? e[0] : (t) => {
|
|
68
|
+
let n = !1;
|
|
69
|
+
const r = e.map((i) => {
|
|
70
|
+
const l = He(i, t);
|
|
71
|
+
return n || (n = typeof l == "function"), l;
|
|
72
|
+
});
|
|
73
|
+
if (n) return () => {
|
|
74
|
+
r.forEach((i, l) => {
|
|
75
|
+
typeof i == "function" ? i() : He(e[l], null);
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function He(e, t) {
|
|
81
|
+
if (typeof e == "function") return e(t);
|
|
82
|
+
e != null && (e.current = t);
|
|
83
|
+
}
|
|
84
|
+
function ct(e) {
|
|
85
|
+
var t, n, r = "";
|
|
86
|
+
if (typeof e == "string" || typeof e == "number") r += e;
|
|
41
87
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
42
88
|
var i = e.length;
|
|
43
|
-
for (t = 0; t < i; t++) e[t] && (
|
|
44
|
-
} else for (
|
|
45
|
-
return
|
|
89
|
+
for (t = 0; t < i; t++) e[t] && (n = ct(e[t])) && (r && (r += " "), r += n);
|
|
90
|
+
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
91
|
+
return r;
|
|
46
92
|
}
|
|
47
|
-
function
|
|
48
|
-
for (var e, t,
|
|
49
|
-
return
|
|
93
|
+
function Vt() {
|
|
94
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = ct(e)) && (r && (r += " "), r += t);
|
|
95
|
+
return r;
|
|
50
96
|
}
|
|
51
|
-
function
|
|
97
|
+
function j(...e) {
|
|
52
98
|
let t = {
|
|
53
99
|
...e[0]
|
|
54
100
|
};
|
|
55
|
-
for (let
|
|
56
|
-
let
|
|
57
|
-
for (let i in
|
|
58
|
-
let
|
|
59
|
-
typeof
|
|
101
|
+
for (let n = 1; n < e.length; n++) {
|
|
102
|
+
let r = e[n];
|
|
103
|
+
for (let i in r) {
|
|
104
|
+
let l = t[i], u = r[i];
|
|
105
|
+
typeof l == "function" && typeof u == "function" && // This is a lot faster than a regex.
|
|
60
106
|
i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= /* 'A' */
|
|
61
107
|
65 && i.charCodeAt(2) <= /* 'Z' */
|
|
62
|
-
90 ? t[i] =
|
|
108
|
+
90 ? t[i] = ut(l, u) : (i === "className" || i === "UNSAFE_className") && typeof l == "string" && typeof u == "string" ? t[i] = Vt(l, u) : i === "id" && l && u ? t.id = At(l, u) : i === "ref" && l && u ? t.ref = Ft(l, u) : t[i] = u !== void 0 ? u : l;
|
|
63
109
|
}
|
|
64
110
|
}
|
|
65
111
|
return t;
|
|
66
112
|
}
|
|
67
|
-
const
|
|
113
|
+
const Ut = /* @__PURE__ */ new Set([
|
|
68
114
|
"id"
|
|
69
|
-
]),
|
|
115
|
+
]), Rt = /* @__PURE__ */ new Set([
|
|
70
116
|
"aria-label",
|
|
71
117
|
"aria-labelledby",
|
|
72
118
|
"aria-describedby",
|
|
73
119
|
"aria-details"
|
|
74
|
-
]),
|
|
120
|
+
]), Ht = /* @__PURE__ */ new Set([
|
|
75
121
|
"href",
|
|
76
122
|
"hrefLang",
|
|
77
123
|
"target",
|
|
@@ -79,558 +125,844 @@ const ze = /* @__PURE__ */ new Set([
|
|
|
79
125
|
"download",
|
|
80
126
|
"ping",
|
|
81
127
|
"referrerPolicy"
|
|
82
|
-
]),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
128
|
+
]), Gt = /* @__PURE__ */ new Set([
|
|
129
|
+
"dir",
|
|
130
|
+
"lang",
|
|
131
|
+
"hidden",
|
|
132
|
+
"inert",
|
|
133
|
+
"translate"
|
|
134
|
+
]), Ge = /* @__PURE__ */ new Set([
|
|
135
|
+
"onClick",
|
|
136
|
+
"onAuxClick",
|
|
137
|
+
"onContextMenu",
|
|
138
|
+
"onDoubleClick",
|
|
139
|
+
"onMouseDown",
|
|
140
|
+
"onMouseEnter",
|
|
141
|
+
"onMouseLeave",
|
|
142
|
+
"onMouseMove",
|
|
143
|
+
"onMouseOut",
|
|
144
|
+
"onMouseOver",
|
|
145
|
+
"onMouseUp",
|
|
146
|
+
"onTouchCancel",
|
|
147
|
+
"onTouchEnd",
|
|
148
|
+
"onTouchMove",
|
|
149
|
+
"onTouchStart",
|
|
150
|
+
"onPointerDown",
|
|
151
|
+
"onPointerMove",
|
|
152
|
+
"onPointerUp",
|
|
153
|
+
"onPointerCancel",
|
|
154
|
+
"onPointerEnter",
|
|
155
|
+
"onPointerLeave",
|
|
156
|
+
"onPointerOver",
|
|
157
|
+
"onPointerOut",
|
|
158
|
+
"onGotPointerCapture",
|
|
159
|
+
"onLostPointerCapture",
|
|
160
|
+
"onScroll",
|
|
161
|
+
"onWheel",
|
|
162
|
+
"onAnimationStart",
|
|
163
|
+
"onAnimationEnd",
|
|
164
|
+
"onAnimationIteration",
|
|
165
|
+
"onTransitionCancel",
|
|
166
|
+
"onTransitionEnd",
|
|
167
|
+
"onTransitionRun",
|
|
168
|
+
"onTransitionStart"
|
|
169
|
+
]), jt = /^(data-.*)$/;
|
|
170
|
+
function Wt(e, t = {}) {
|
|
171
|
+
let { labelable: n, isLink: r, global: i, events: l = i, propNames: u } = t, a = {};
|
|
172
|
+
for (const c in e) Object.prototype.hasOwnProperty.call(e, c) && (Ut.has(c) || n && Rt.has(c) || r && Ht.has(c) || i && Gt.has(c) || l && (Ge.has(c) || c.endsWith("Capture") && Ge.has(c.slice(0, -7))) || u?.has(c) || jt.test(c)) && (a[c] = e[c]);
|
|
173
|
+
return a;
|
|
174
|
+
}
|
|
175
|
+
function J(e) {
|
|
176
|
+
if (Yt()) e.focus({
|
|
90
177
|
preventScroll: !0
|
|
91
178
|
});
|
|
92
179
|
else {
|
|
93
|
-
let t =
|
|
94
|
-
e.focus(),
|
|
180
|
+
let t = Xt(e);
|
|
181
|
+
e.focus(), zt(t);
|
|
95
182
|
}
|
|
96
183
|
}
|
|
97
|
-
let
|
|
98
|
-
function
|
|
99
|
-
if (
|
|
100
|
-
|
|
184
|
+
let le = null;
|
|
185
|
+
function Yt() {
|
|
186
|
+
if (le == null) {
|
|
187
|
+
le = !1;
|
|
101
188
|
try {
|
|
102
189
|
document.createElement("div").focus({
|
|
103
190
|
get preventScroll() {
|
|
104
|
-
return
|
|
191
|
+
return le = !0, !0;
|
|
105
192
|
}
|
|
106
193
|
});
|
|
107
194
|
} catch {
|
|
108
195
|
}
|
|
109
196
|
}
|
|
110
|
-
return
|
|
197
|
+
return le;
|
|
111
198
|
}
|
|
112
|
-
function
|
|
113
|
-
let t = e.parentNode,
|
|
114
|
-
for (; t instanceof HTMLElement && t !==
|
|
115
|
-
(t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) &&
|
|
199
|
+
function Xt(e) {
|
|
200
|
+
let t = e.parentNode, n = [], r = document.scrollingElement || document.documentElement;
|
|
201
|
+
for (; t instanceof HTMLElement && t !== r; )
|
|
202
|
+
(t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && n.push({
|
|
116
203
|
element: t,
|
|
117
204
|
scrollTop: t.scrollTop,
|
|
118
205
|
scrollLeft: t.scrollLeft
|
|
119
206
|
}), t = t.parentNode;
|
|
120
|
-
return
|
|
121
|
-
element:
|
|
122
|
-
scrollTop:
|
|
123
|
-
scrollLeft:
|
|
124
|
-
}),
|
|
207
|
+
return r instanceof HTMLElement && n.push({
|
|
208
|
+
element: r,
|
|
209
|
+
scrollTop: r.scrollTop,
|
|
210
|
+
scrollLeft: r.scrollLeft
|
|
211
|
+
}), n;
|
|
125
212
|
}
|
|
126
|
-
function
|
|
127
|
-
for (let { element: t, scrollTop:
|
|
128
|
-
t.scrollTop =
|
|
213
|
+
function zt(e) {
|
|
214
|
+
for (let { element: t, scrollTop: n, scrollLeft: r } of e)
|
|
215
|
+
t.scrollTop = n, t.scrollLeft = r;
|
|
129
216
|
}
|
|
130
|
-
function
|
|
217
|
+
function he(e) {
|
|
131
218
|
var t;
|
|
132
|
-
|
|
219
|
+
if (typeof window > "u" || window.navigator == null) return !1;
|
|
220
|
+
let n = (t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands;
|
|
221
|
+
return Array.isArray(n) && n.some((r) => e.test(r.brand)) || e.test(window.navigator.userAgent);
|
|
133
222
|
}
|
|
134
|
-
function
|
|
223
|
+
function Ie(e) {
|
|
135
224
|
var t;
|
|
136
225
|
return typeof window < "u" && window.navigator != null ? e.test(((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.platform) || window.navigator.platform) : !1;
|
|
137
226
|
}
|
|
138
227
|
function K(e) {
|
|
228
|
+
if (process.env.NODE_ENV === "test") return e;
|
|
139
229
|
let t = null;
|
|
140
230
|
return () => (t == null && (t = e()), t);
|
|
141
231
|
}
|
|
142
232
|
const Q = K(function() {
|
|
143
|
-
return
|
|
144
|
-
}),
|
|
145
|
-
return
|
|
146
|
-
}),
|
|
147
|
-
return
|
|
233
|
+
return Ie(/^Mac/i);
|
|
234
|
+
}), qt = K(function() {
|
|
235
|
+
return Ie(/^iPhone/i);
|
|
236
|
+
}), dt = K(function() {
|
|
237
|
+
return Ie(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
148
238
|
Q() && navigator.maxTouchPoints > 1;
|
|
149
|
-
}),
|
|
150
|
-
return
|
|
151
|
-
}), rt = K(function() {
|
|
152
|
-
return te(/AppleWebKit/i) && !st();
|
|
153
|
-
}), st = K(function() {
|
|
154
|
-
return te(/Chrome/i);
|
|
155
|
-
}), Le = K(function() {
|
|
156
|
-
return te(/Android/i);
|
|
157
|
-
}), it = K(function() {
|
|
158
|
-
return te(/Firefox/i);
|
|
239
|
+
}), Me = K(function() {
|
|
240
|
+
return qt() || dt();
|
|
159
241
|
});
|
|
160
|
-
function
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
242
|
+
K(function() {
|
|
243
|
+
return Q() || Me();
|
|
244
|
+
});
|
|
245
|
+
const Jt = K(function() {
|
|
246
|
+
return he(/AppleWebKit/i) && !Qt();
|
|
247
|
+
}), Qt = K(function() {
|
|
248
|
+
return he(/Chrome/i);
|
|
249
|
+
}), pt = K(function() {
|
|
250
|
+
return he(/Android/i);
|
|
251
|
+
}), Zt = K(function() {
|
|
252
|
+
return he(/Firefox/i);
|
|
253
|
+
});
|
|
254
|
+
function W(e, t, n = !0) {
|
|
255
|
+
var r, i;
|
|
256
|
+
let { metaKey: l, ctrlKey: u, altKey: a, shiftKey: c } = t;
|
|
257
|
+
Zt() && (!((i = window.event) === null || i === void 0 || (r = i.type) === null || r === void 0) && r.startsWith("key")) && e.target === "_blank" && (Q() ? l = !0 : u = !0);
|
|
258
|
+
let v = Jt() && Q() && !dt() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
|
|
165
259
|
keyIdentifier: "Enter",
|
|
166
|
-
metaKey:
|
|
260
|
+
metaKey: l,
|
|
167
261
|
ctrlKey: u,
|
|
168
|
-
altKey:
|
|
169
|
-
shiftKey:
|
|
262
|
+
altKey: a,
|
|
263
|
+
shiftKey: c
|
|
170
264
|
}) : new MouseEvent("click", {
|
|
171
|
-
metaKey:
|
|
265
|
+
metaKey: l,
|
|
172
266
|
ctrlKey: u,
|
|
173
|
-
altKey:
|
|
174
|
-
shiftKey:
|
|
267
|
+
altKey: a,
|
|
268
|
+
shiftKey: c,
|
|
269
|
+
detail: 1,
|
|
175
270
|
bubbles: !0,
|
|
176
271
|
cancelable: !0
|
|
177
272
|
});
|
|
178
|
-
|
|
273
|
+
W.isOpening = n, J(e), e.dispatchEvent(v), W.isOpening = !1;
|
|
179
274
|
}
|
|
180
|
-
|
|
181
|
-
let
|
|
182
|
-
function
|
|
275
|
+
W.isOpening = !1;
|
|
276
|
+
let U = /* @__PURE__ */ new Map(), Se = /* @__PURE__ */ new Set();
|
|
277
|
+
function je() {
|
|
183
278
|
if (typeof window > "u") return;
|
|
184
|
-
function e(
|
|
185
|
-
return "propertyName" in
|
|
279
|
+
function e(r) {
|
|
280
|
+
return "propertyName" in r;
|
|
186
281
|
}
|
|
187
|
-
let t = (
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
282
|
+
let t = (r) => {
|
|
283
|
+
let i = b(r);
|
|
284
|
+
if (!e(r) || !i) return;
|
|
285
|
+
let l = U.get(i);
|
|
286
|
+
l || (l = /* @__PURE__ */ new Set(), U.set(i, l), i.addEventListener("transitioncancel", n, {
|
|
191
287
|
once: !0
|
|
192
|
-
})),
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
288
|
+
})), l.add(r.propertyName);
|
|
289
|
+
}, n = (r) => {
|
|
290
|
+
let i = b(r);
|
|
291
|
+
if (!e(r) || !i) return;
|
|
292
|
+
let l = U.get(i);
|
|
293
|
+
if (l && (l.delete(r.propertyName), l.size === 0 && (i.removeEventListener("transitioncancel", n), U.delete(i)), U.size === 0)) {
|
|
294
|
+
for (let u of Se) u();
|
|
295
|
+
Se.clear();
|
|
199
296
|
}
|
|
200
297
|
};
|
|
201
|
-
document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend",
|
|
298
|
+
document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", n);
|
|
299
|
+
}
|
|
300
|
+
typeof document < "u" && (document.readyState !== "loading" ? je() : document.addEventListener("DOMContentLoaded", je));
|
|
301
|
+
function en() {
|
|
302
|
+
for (const [e] of U)
|
|
303
|
+
"isConnected" in e && !e.isConnected && U.delete(e);
|
|
202
304
|
}
|
|
203
|
-
|
|
204
|
-
function at(e) {
|
|
305
|
+
function ft(e) {
|
|
205
306
|
requestAnimationFrame(() => {
|
|
206
|
-
|
|
307
|
+
en(), U.size === 0 ? e() : Se.add(e);
|
|
207
308
|
});
|
|
208
309
|
}
|
|
209
|
-
function
|
|
210
|
-
let e =
|
|
211
|
-
let
|
|
212
|
-
e.current.delete(u), u(...
|
|
310
|
+
function mt() {
|
|
311
|
+
let e = Z(/* @__PURE__ */ new Map()), t = x((i, l, u, a) => {
|
|
312
|
+
let c = a?.once ? (...v) => {
|
|
313
|
+
e.current.delete(u), u(...v);
|
|
213
314
|
} : u;
|
|
214
315
|
e.current.set(u, {
|
|
215
|
-
type:
|
|
316
|
+
type: l,
|
|
216
317
|
eventTarget: i,
|
|
217
|
-
fn:
|
|
218
|
-
options:
|
|
219
|
-
}), i.addEventListener(
|
|
220
|
-
}, []),
|
|
221
|
-
var
|
|
222
|
-
let
|
|
223
|
-
i.removeEventListener(
|
|
224
|
-
}, []),
|
|
225
|
-
e.current.forEach((i,
|
|
226
|
-
|
|
318
|
+
fn: c,
|
|
319
|
+
options: a
|
|
320
|
+
}), i.addEventListener(l, c, a);
|
|
321
|
+
}, []), n = x((i, l, u, a) => {
|
|
322
|
+
var c;
|
|
323
|
+
let v = ((c = e.current.get(u)) === null || c === void 0 ? void 0 : c.fn) || u;
|
|
324
|
+
i.removeEventListener(l, v, a), e.current.delete(u);
|
|
325
|
+
}, []), r = x(() => {
|
|
326
|
+
e.current.forEach((i, l) => {
|
|
327
|
+
n(i.eventTarget, i.type, l, i.options);
|
|
227
328
|
});
|
|
228
329
|
}, [
|
|
229
|
-
|
|
330
|
+
n
|
|
230
331
|
]);
|
|
231
|
-
return
|
|
232
|
-
|
|
332
|
+
return z(() => r, [
|
|
333
|
+
r
|
|
233
334
|
]), {
|
|
234
335
|
addGlobalListener: t,
|
|
235
|
-
removeGlobalListener:
|
|
236
|
-
removeAllGlobalListeners:
|
|
336
|
+
removeGlobalListener: n,
|
|
337
|
+
removeAllGlobalListeners: r
|
|
237
338
|
};
|
|
238
339
|
}
|
|
239
|
-
|
|
240
|
-
|
|
340
|
+
var Te;
|
|
341
|
+
const tn = (Te = _e.useInsertionEffect) !== null && Te !== void 0 ? Te : oe;
|
|
342
|
+
function ue(e) {
|
|
343
|
+
const t = Z(null);
|
|
344
|
+
return tn(() => {
|
|
345
|
+
t.current = e;
|
|
346
|
+
}, [
|
|
347
|
+
e
|
|
348
|
+
]), x((...n) => {
|
|
349
|
+
const r = t.current;
|
|
350
|
+
return r?.(...n);
|
|
351
|
+
}, []);
|
|
352
|
+
}
|
|
353
|
+
function bt(e, t) {
|
|
354
|
+
oe(() => {
|
|
241
355
|
if (e && e.ref && t)
|
|
242
356
|
return e.ref.current = t.current, () => {
|
|
243
357
|
e.ref && (e.ref.current = null);
|
|
244
358
|
};
|
|
245
359
|
});
|
|
246
360
|
}
|
|
247
|
-
function
|
|
248
|
-
return e.
|
|
361
|
+
function Le(e) {
|
|
362
|
+
return e.pointerType === "" && e.isTrusted ? !0 : pt() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
249
363
|
}
|
|
250
|
-
function
|
|
251
|
-
return !
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
function
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
364
|
+
function nn(e) {
|
|
365
|
+
return !pt() && e.width === 0 && e.height === 0 || e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse";
|
|
366
|
+
}
|
|
367
|
+
const on = typeof Element < "u" && "checkVisibility" in Element.prototype;
|
|
368
|
+
function rn(e) {
|
|
369
|
+
const t = M(e);
|
|
370
|
+
if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement)) return !1;
|
|
371
|
+
let { display: n, visibility: r } = e.style, i = n !== "none" && r !== "hidden" && r !== "collapse";
|
|
372
|
+
if (i) {
|
|
373
|
+
const { getComputedStyle: l } = e.ownerDocument.defaultView;
|
|
374
|
+
let { display: u, visibility: a } = l(e);
|
|
375
|
+
i = u !== "none" && a !== "hidden" && a !== "collapse";
|
|
376
|
+
}
|
|
377
|
+
return i;
|
|
378
|
+
}
|
|
379
|
+
function sn(e, t) {
|
|
380
|
+
return !e.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
|
|
381
|
+
!e.hasAttribute("data-react-aria-prevent-focus") && (e.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0);
|
|
382
|
+
}
|
|
383
|
+
function vt(e, t) {
|
|
384
|
+
return on ? e.checkVisibility({
|
|
385
|
+
visibilityProperty: !0
|
|
386
|
+
}) && !e.closest("[data-react-aria-prevent-focus]") : e.nodeName !== "#comment" && rn(e) && sn(e, t) && (!e.parentElement || vt(e.parentElement, e));
|
|
387
|
+
}
|
|
388
|
+
const gt = [
|
|
389
|
+
"input:not([disabled]):not([type=hidden])",
|
|
390
|
+
"select:not([disabled])",
|
|
391
|
+
"textarea:not([disabled])",
|
|
392
|
+
"button:not([disabled])",
|
|
393
|
+
"a[href]",
|
|
394
|
+
"area[href]",
|
|
395
|
+
"summary",
|
|
396
|
+
"iframe",
|
|
397
|
+
"object",
|
|
398
|
+
"embed",
|
|
399
|
+
"audio[controls]",
|
|
400
|
+
"video[controls]",
|
|
401
|
+
'[contenteditable]:not([contenteditable^="false"])',
|
|
402
|
+
"permission"
|
|
403
|
+
], an = gt.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
|
404
|
+
gt.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
|
405
|
+
function ln(e) {
|
|
406
|
+
return e.matches(an) && vt(e) && !un(e);
|
|
407
|
+
}
|
|
408
|
+
function un(e) {
|
|
409
|
+
let t = e;
|
|
410
|
+
for (; t != null; ) {
|
|
411
|
+
if (t instanceof t.ownerDocument.defaultView.HTMLElement && t.inert) return !0;
|
|
412
|
+
t = t.parentElement;
|
|
413
|
+
}
|
|
414
|
+
return !1;
|
|
415
|
+
}
|
|
416
|
+
function _t(e) {
|
|
417
|
+
let t = e;
|
|
418
|
+
return t.nativeEvent = e, t.isDefaultPrevented = () => t.defaultPrevented, t.isPropagationStopped = () => t.cancelBubble, t.persist = () => {
|
|
419
|
+
}, t;
|
|
420
|
+
}
|
|
421
|
+
function cn(e, t) {
|
|
422
|
+
Object.defineProperty(e, "target", {
|
|
423
|
+
value: t
|
|
424
|
+
}), Object.defineProperty(e, "currentTarget", {
|
|
425
|
+
value: t
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
function dn(e) {
|
|
429
|
+
let t = Z({
|
|
430
|
+
isFocused: !1,
|
|
431
|
+
observer: null
|
|
432
|
+
});
|
|
433
|
+
return oe(() => {
|
|
434
|
+
const n = t.current;
|
|
435
|
+
return () => {
|
|
436
|
+
n.observer && (n.observer.disconnect(), n.observer = null);
|
|
437
|
+
};
|
|
438
|
+
}, []), x((n) => {
|
|
439
|
+
let r = b(n);
|
|
440
|
+
if (r instanceof HTMLButtonElement || r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement) {
|
|
441
|
+
t.current.isFocused = !0;
|
|
442
|
+
let i = r, l = (u) => {
|
|
443
|
+
if (t.current.isFocused = !1, i.disabled) {
|
|
444
|
+
let a = _t(u);
|
|
445
|
+
e?.(a);
|
|
446
|
+
}
|
|
447
|
+
t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
|
|
448
|
+
};
|
|
449
|
+
i.addEventListener("focusout", l, {
|
|
450
|
+
once: !0
|
|
451
|
+
}), t.current.observer = new MutationObserver(() => {
|
|
452
|
+
if (t.current.isFocused && i.disabled) {
|
|
453
|
+
var u;
|
|
454
|
+
(u = t.current.observer) === null || u === void 0 || u.disconnect();
|
|
455
|
+
let a = i === q() ? null : q();
|
|
456
|
+
i.dispatchEvent(new FocusEvent("blur", {
|
|
457
|
+
relatedTarget: a
|
|
458
|
+
})), i.dispatchEvent(new FocusEvent("focusout", {
|
|
459
|
+
bubbles: !0,
|
|
460
|
+
relatedTarget: a
|
|
461
|
+
}));
|
|
462
|
+
}
|
|
463
|
+
}), t.current.observer.observe(i, {
|
|
464
|
+
attributes: !0,
|
|
465
|
+
attributeFilter: [
|
|
466
|
+
"disabled"
|
|
467
|
+
]
|
|
468
|
+
});
|
|
259
469
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
470
|
+
}, [
|
|
471
|
+
e
|
|
472
|
+
]);
|
|
473
|
+
}
|
|
474
|
+
let be = !1;
|
|
475
|
+
function We(e) {
|
|
476
|
+
for (; e && !ln(e); ) e = e.parentElement;
|
|
477
|
+
let t = M(e), n = t.document.activeElement;
|
|
478
|
+
if (!n || n === e) return;
|
|
479
|
+
be = !0;
|
|
480
|
+
let r = !1, i = (g) => {
|
|
481
|
+
(b(g) === n || r) && g.stopImmediatePropagation();
|
|
482
|
+
}, l = (g) => {
|
|
483
|
+
(b(g) === n || r) && (g.stopImmediatePropagation(), !e && !r && (r = !0, J(n), c()));
|
|
484
|
+
}, u = (g) => {
|
|
485
|
+
(b(g) === e || r) && g.stopImmediatePropagation();
|
|
486
|
+
}, a = (g) => {
|
|
487
|
+
(b(g) === e || r) && (g.stopImmediatePropagation(), r || (r = !0, J(n), c()));
|
|
488
|
+
};
|
|
489
|
+
t.addEventListener("blur", i, !0), t.addEventListener("focusout", l, !0), t.addEventListener("focusin", a, !0), t.addEventListener("focus", u, !0);
|
|
490
|
+
let c = () => {
|
|
491
|
+
cancelAnimationFrame(v), t.removeEventListener("blur", i, !0), t.removeEventListener("focusout", l, !0), t.removeEventListener("focusin", a, !0), t.removeEventListener("focus", u, !0), be = !1, r = !1;
|
|
492
|
+
}, v = requestAnimationFrame(c);
|
|
493
|
+
return c;
|
|
494
|
+
}
|
|
495
|
+
let X = "default", Ne = "", me = /* @__PURE__ */ new WeakMap();
|
|
496
|
+
function Ye(e) {
|
|
497
|
+
if (Me()) {
|
|
498
|
+
if (X === "default") {
|
|
499
|
+
const t = P(e);
|
|
500
|
+
Ne = t.documentElement.style.webkitUserSelect, t.documentElement.style.webkitUserSelect = "none";
|
|
501
|
+
}
|
|
502
|
+
X = "disabled";
|
|
503
|
+
} else if (e instanceof HTMLElement || e instanceof SVGElement) {
|
|
504
|
+
let t = "userSelect" in e.style ? "userSelect" : "webkitUserSelect";
|
|
505
|
+
me.set(e, e.style[t]), e.style[t] = "none";
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
function Oe(e) {
|
|
509
|
+
if (Me()) {
|
|
510
|
+
if (X !== "disabled") return;
|
|
511
|
+
X = "restoring", setTimeout(() => {
|
|
512
|
+
ft(() => {
|
|
513
|
+
if (X === "restoring") {
|
|
514
|
+
const t = P(e);
|
|
515
|
+
t.documentElement.style.webkitUserSelect === "none" && (t.documentElement.style.webkitUserSelect = Ne || ""), Ne = "", X = "default";
|
|
271
516
|
}
|
|
272
517
|
});
|
|
273
518
|
}, 300);
|
|
274
|
-
} else if ((e instanceof HTMLElement || e instanceof SVGElement) && e &&
|
|
275
|
-
let t =
|
|
276
|
-
e.style
|
|
519
|
+
} else if ((e instanceof HTMLElement || e instanceof SVGElement) && e && me.has(e)) {
|
|
520
|
+
let t = me.get(e), n = "userSelect" in e.style ? "userSelect" : "webkitUserSelect";
|
|
521
|
+
e.style[n] === "none" && (e.style[n] = t), e.getAttribute("style") === "" && e.removeAttribute("style"), me.delete(e);
|
|
277
522
|
}
|
|
278
523
|
}
|
|
279
|
-
const
|
|
524
|
+
const ht = _e.createContext({
|
|
280
525
|
register: () => {
|
|
281
526
|
}
|
|
282
527
|
});
|
|
283
|
-
|
|
284
|
-
function
|
|
528
|
+
ht.displayName = "PressResponderContext";
|
|
529
|
+
function pn(e, t) {
|
|
285
530
|
return t.get ? t.get.call(e) : t.value;
|
|
286
531
|
}
|
|
287
|
-
function
|
|
288
|
-
if (!t.has(e)) throw new TypeError("attempted to " +
|
|
532
|
+
function yt(e, t, n) {
|
|
533
|
+
if (!t.has(e)) throw new TypeError("attempted to " + n + " private field on non-instance");
|
|
289
534
|
return t.get(e);
|
|
290
535
|
}
|
|
291
|
-
function
|
|
292
|
-
var
|
|
293
|
-
return
|
|
536
|
+
function fn(e, t) {
|
|
537
|
+
var n = yt(e, t, "get");
|
|
538
|
+
return pn(e, n);
|
|
294
539
|
}
|
|
295
|
-
function
|
|
540
|
+
function mn(e, t) {
|
|
296
541
|
if (t.has(e))
|
|
297
542
|
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
298
543
|
}
|
|
299
|
-
function
|
|
300
|
-
|
|
544
|
+
function bn(e, t, n) {
|
|
545
|
+
mn(e, t), t.set(e, n);
|
|
301
546
|
}
|
|
302
|
-
function
|
|
303
|
-
if (t.set) t.set.call(e,
|
|
547
|
+
function vn(e, t, n) {
|
|
548
|
+
if (t.set) t.set.call(e, n);
|
|
304
549
|
else {
|
|
305
550
|
if (!t.writable)
|
|
306
551
|
throw new TypeError("attempted to set read only private field");
|
|
307
|
-
t.value =
|
|
552
|
+
t.value = n;
|
|
308
553
|
}
|
|
309
554
|
}
|
|
310
|
-
function
|
|
311
|
-
var
|
|
312
|
-
return
|
|
555
|
+
function Xe(e, t, n) {
|
|
556
|
+
var r = yt(e, t, "set");
|
|
557
|
+
return vn(e, r, n), n;
|
|
313
558
|
}
|
|
314
|
-
function
|
|
315
|
-
let t =
|
|
559
|
+
function gn(e) {
|
|
560
|
+
let t = lt(ht);
|
|
316
561
|
if (t) {
|
|
317
|
-
let { register: r, ...
|
|
318
|
-
e =
|
|
562
|
+
let { register: n, ref: r, ...i } = t;
|
|
563
|
+
e = j(i, e), n();
|
|
319
564
|
}
|
|
320
|
-
return
|
|
565
|
+
return bt(t, e.ref), e;
|
|
321
566
|
}
|
|
322
|
-
var
|
|
323
|
-
class
|
|
567
|
+
var ce = /* @__PURE__ */ new WeakMap();
|
|
568
|
+
class de {
|
|
324
569
|
continuePropagation() {
|
|
325
|
-
|
|
570
|
+
Xe(this, ce, !1);
|
|
326
571
|
}
|
|
327
572
|
get shouldStopPropagation() {
|
|
328
|
-
return
|
|
573
|
+
return fn(this, ce);
|
|
329
574
|
}
|
|
330
|
-
constructor(t,
|
|
331
|
-
|
|
575
|
+
constructor(t, n, r, i) {
|
|
576
|
+
bn(this, ce, {
|
|
332
577
|
writable: !0,
|
|
333
578
|
value: void 0
|
|
334
|
-
}),
|
|
335
|
-
var
|
|
336
|
-
let u = (
|
|
337
|
-
const
|
|
338
|
-
let
|
|
339
|
-
|
|
579
|
+
}), Xe(this, ce, !0);
|
|
580
|
+
var l;
|
|
581
|
+
let u = (l = i?.target) !== null && l !== void 0 ? l : r.currentTarget;
|
|
582
|
+
const a = u?.getBoundingClientRect();
|
|
583
|
+
let c, v = 0, g, k = null;
|
|
584
|
+
r.clientX != null && r.clientY != null && (g = r.clientX, k = r.clientY), a && (g != null && k != null ? (c = g - a.left, v = k - a.top) : (c = a.width / 2, v = a.height / 2)), this.type = t, this.pointerType = n, this.target = r.currentTarget, this.shiftKey = r.shiftKey, this.metaKey = r.metaKey, this.ctrlKey = r.ctrlKey, this.altKey = r.altKey, this.x = c, this.y = v, this.key = r.key;
|
|
340
585
|
}
|
|
341
586
|
}
|
|
342
|
-
const
|
|
343
|
-
function
|
|
344
|
-
let {
|
|
345
|
-
onPress: t,
|
|
346
|
-
onPressChange: r,
|
|
347
|
-
onPressStart: o,
|
|
348
|
-
onPressEnd: i,
|
|
349
|
-
onPressUp: p,
|
|
350
|
-
isDisabled: u,
|
|
351
|
-
isPressed: d,
|
|
352
|
-
preventFocusOnPress: m,
|
|
353
|
-
shouldCancelOnPointerExit: g,
|
|
354
|
-
allowTextSelectionOnPress: b,
|
|
355
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
356
|
-
ref: $,
|
|
357
|
-
...O
|
|
358
|
-
} = gt(e), [_, P] = Ee(!1), w = ee({
|
|
587
|
+
const ze = Symbol("linkClicked"), qe = "react-aria-pressable-style", Je = "data-react-aria-pressable";
|
|
588
|
+
function _n(e) {
|
|
589
|
+
let { onPress: t, onPressChange: n, onPressStart: r, onPressEnd: i, onPressUp: l, onClick: u, isDisabled: a, isPressed: c, preventFocusOnPress: v, shouldCancelOnPointerExit: g, allowTextSelectionOnPress: k, ref: C, ...L } = gn(e), [N, h] = fe(!1), $ = Z({
|
|
359
590
|
isPressed: !1,
|
|
360
591
|
ignoreEmulatedMouseEvents: !1,
|
|
361
|
-
ignoreClickAfterPress: !1,
|
|
362
592
|
didFirePressStart: !1,
|
|
363
593
|
isTriggeringEvent: !1,
|
|
364
594
|
activePointerId: null,
|
|
365
595
|
target: null,
|
|
366
596
|
isOverTarget: !1,
|
|
367
|
-
pointerType: null
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
597
|
+
pointerType: null,
|
|
598
|
+
disposables: []
|
|
599
|
+
}), { addGlobalListener: w, removeAllGlobalListeners: T, removeGlobalListener: O } = mt(), B = x((o, d) => {
|
|
600
|
+
let s = $.current;
|
|
601
|
+
if (a || s.didFirePressStart) return !1;
|
|
602
|
+
let p = !0;
|
|
603
|
+
if (s.isTriggeringEvent = !0, r) {
|
|
604
|
+
let m = new de("pressstart", d, o);
|
|
605
|
+
r(m), p = m.shouldStopPropagation;
|
|
375
606
|
}
|
|
376
|
-
return
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
607
|
+
return n && n(!0), s.isTriggeringEvent = !1, s.didFirePressStart = !0, h(!0), p;
|
|
608
|
+
}, [
|
|
609
|
+
a,
|
|
610
|
+
r,
|
|
611
|
+
n
|
|
612
|
+
]), S = x((o, d, s = !0) => {
|
|
613
|
+
let p = $.current;
|
|
614
|
+
if (!p.didFirePressStart) return !1;
|
|
615
|
+
p.didFirePressStart = !1, p.isTriggeringEvent = !0;
|
|
616
|
+
let m = !0;
|
|
382
617
|
if (i) {
|
|
383
|
-
let
|
|
384
|
-
i(
|
|
618
|
+
let _ = new de("pressend", d, o);
|
|
619
|
+
i(_), m = _.shouldStopPropagation;
|
|
385
620
|
}
|
|
386
|
-
if (
|
|
387
|
-
let
|
|
388
|
-
t(
|
|
621
|
+
if (n && n(!1), h(!1), t && s && !a) {
|
|
622
|
+
let _ = new de("press", d, o);
|
|
623
|
+
t(_), m && (m = _.shouldStopPropagation);
|
|
389
624
|
}
|
|
390
|
-
return
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
625
|
+
return p.isTriggeringEvent = !1, m;
|
|
626
|
+
}, [
|
|
627
|
+
a,
|
|
628
|
+
i,
|
|
629
|
+
n,
|
|
630
|
+
t
|
|
631
|
+
]), $e = ue(S), I = x((o, d) => {
|
|
632
|
+
let s = $.current;
|
|
633
|
+
if (a) return !1;
|
|
634
|
+
if (l) {
|
|
635
|
+
s.isTriggeringEvent = !0;
|
|
636
|
+
let p = new de("pressup", d, o);
|
|
637
|
+
return l(p), s.isTriggeringEvent = !1, p.shouldStopPropagation;
|
|
398
638
|
}
|
|
399
639
|
return !0;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
f.onPointerDown = (a) => {
|
|
449
|
-
if (a.button !== 0 || !a.currentTarget.contains(a.target)) return;
|
|
450
|
-
if (ct(a.nativeEvent)) {
|
|
451
|
-
n.pointerType = "virtual";
|
|
452
|
-
return;
|
|
640
|
+
}, [
|
|
641
|
+
a,
|
|
642
|
+
l
|
|
643
|
+
]), Ee = ue(I), A = x((o) => {
|
|
644
|
+
let d = $.current;
|
|
645
|
+
if (d.isPressed && d.target) {
|
|
646
|
+
d.didFirePressStart && d.pointerType != null && S(G(d.target, o), d.pointerType, !1), d.isPressed = !1, te(null), d.isOverTarget = !1, d.activePointerId = null, d.pointerType = null, T(), k || Oe(d.target);
|
|
647
|
+
for (let s of d.disposables) s();
|
|
648
|
+
d.disposables = [];
|
|
649
|
+
}
|
|
650
|
+
}, [
|
|
651
|
+
k,
|
|
652
|
+
T,
|
|
653
|
+
S
|
|
654
|
+
]), R = ue(A), F = x((o) => {
|
|
655
|
+
g && A(o);
|
|
656
|
+
}, [
|
|
657
|
+
g,
|
|
658
|
+
A
|
|
659
|
+
]), ee = x((o) => {
|
|
660
|
+
a || u?.(o);
|
|
661
|
+
}, [
|
|
662
|
+
a,
|
|
663
|
+
u
|
|
664
|
+
]), ke = x((o, d) => {
|
|
665
|
+
if (!a && u) {
|
|
666
|
+
let s = new MouseEvent("click", o);
|
|
667
|
+
cn(s, d), u(_t(s));
|
|
668
|
+
}
|
|
669
|
+
}, [
|
|
670
|
+
a,
|
|
671
|
+
u
|
|
672
|
+
]), Ot = ue(ke), [Ve, Ue] = fe(!1);
|
|
673
|
+
oe(() => {
|
|
674
|
+
let o = $.current;
|
|
675
|
+
if (Ve) {
|
|
676
|
+
let d = (_) => {
|
|
677
|
+
var H;
|
|
678
|
+
if (o.isPressed && o.target && xe(_, o.target)) {
|
|
679
|
+
var we;
|
|
680
|
+
et(b(_), _.key) && _.preventDefault();
|
|
681
|
+
let ie = b(_), ae = y(o.target, ie);
|
|
682
|
+
$e(G(o.target, _), "keyboard", ae), ae && Ot(_, o.target), T(), _.key !== "Enter" && Ke(o.target) && y(o.target, ie) && !_[ze] && (_[ze] = !0, W(o.target, _, !1)), o.isPressed = !1, Ue(!1), (we = o.metaKeyEvents) === null || we === void 0 || we.delete(_.key);
|
|
683
|
+
} else if (_.key === "Meta" && (!((H = o.metaKeyEvents) === null || H === void 0) && H.size)) {
|
|
684
|
+
var Pe;
|
|
685
|
+
let ie = o.metaKeyEvents;
|
|
686
|
+
o.metaKeyEvents = void 0;
|
|
687
|
+
for (let ae of ie.values()) (Pe = o.target) === null || Pe === void 0 || Pe.dispatchEvent(new KeyboardEvent("keyup", ae));
|
|
453
688
|
}
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
}, f.onPointerUp = (a) => {
|
|
460
|
-
!a.currentTarget.contains(a.target) || n.pointerType === "virtual" || a.button === 0 && M(a, a.currentTarget) && N(a, n.pointerType || a.pointerType);
|
|
461
|
-
};
|
|
462
|
-
let l = (a) => {
|
|
463
|
-
a.pointerId === n.activePointerId && (n.target && M(a, n.target) ? !n.isOverTarget && n.pointerType != null && (n.isOverTarget = !0, B(C(n.target, a), n.pointerType)) : n.target && n.isOverTarget && n.pointerType != null && (n.isOverTarget = !1, k(C(n.target, a), n.pointerType, !1), I(a)));
|
|
464
|
-
}, h = (a) => {
|
|
465
|
-
a.pointerId === n.activePointerId && n.isPressed && a.button === 0 && n.target && (M(a, n.target) && n.pointerType != null ? k(C(n.target, a), n.pointerType) : n.isOverTarget && n.pointerType != null && k(C(n.target, a), n.pointerType, !1), n.isPressed = !1, n.isOverTarget = !1, n.activePointerId = null, n.pointerType = null, x(), b || Y(n.target), "ontouchend" in n.target && a.pointerType !== "mouse" && T(n.target, "touchend", s, {
|
|
466
|
-
once: !0
|
|
467
|
-
}));
|
|
468
|
-
}, s = (a) => {
|
|
469
|
-
Ie(a.target) && a.preventDefault();
|
|
470
|
-
}, v = (a) => {
|
|
471
|
-
S(a);
|
|
472
|
-
};
|
|
473
|
-
f.onDragStart = (a) => {
|
|
474
|
-
a.currentTarget.contains(a.target) && S(a);
|
|
689
|
+
}, s = o.target, m = ut((_) => {
|
|
690
|
+
s && xe(_, s) && !_.repeat && y(s, b(_)) && o.target && Ee(G(o.target, _), "keyboard");
|
|
691
|
+
}, d);
|
|
692
|
+
return w(P(o.target), "keyup", m, !0), () => {
|
|
693
|
+
O(P(o.target), "keyup", m, !0);
|
|
475
694
|
};
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
695
|
+
}
|
|
696
|
+
}, [
|
|
697
|
+
Ve,
|
|
698
|
+
w,
|
|
699
|
+
T,
|
|
700
|
+
O
|
|
701
|
+
]);
|
|
702
|
+
let [se, te] = fe(null);
|
|
703
|
+
oe(() => {
|
|
704
|
+
let o = $.current;
|
|
705
|
+
if (se === "pointer") {
|
|
706
|
+
let d = (p) => {
|
|
707
|
+
if (p.pointerId === o.activePointerId && o.isPressed && p.button === 0 && o.target) {
|
|
708
|
+
if (y(o.target, b(p)) && o.pointerType != null) {
|
|
709
|
+
let m = !1, _ = setTimeout(() => {
|
|
710
|
+
o.isPressed && o.target instanceof HTMLElement && (m ? R(p) : (J(o.target), o.target.click()));
|
|
711
|
+
}, 80);
|
|
712
|
+
p.currentTarget && w(p.currentTarget, "click", () => m = !0, !0), o.disposables.push(() => clearTimeout(_));
|
|
713
|
+
} else R(p);
|
|
714
|
+
o.isOverTarget = !1;
|
|
482
715
|
}
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
}, f.onMouseLeave = (s) => {
|
|
489
|
-
if (!s.currentTarget.contains(s.target)) return;
|
|
490
|
-
let v = !0;
|
|
491
|
-
n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !1, v = k(s, n.pointerType, !1), I(s)), v && s.stopPropagation();
|
|
492
|
-
}, f.onMouseUp = (s) => {
|
|
493
|
-
s.currentTarget.contains(s.target) && !n.ignoreEmulatedMouseEvents && s.button === 0 && N(s, n.pointerType || "mouse");
|
|
716
|
+
}, s = (p) => {
|
|
717
|
+
R(p);
|
|
718
|
+
};
|
|
719
|
+
return w(P(o.target), "pointerup", d, !1), w(P(o.target), "pointercancel", s, !1), () => {
|
|
720
|
+
O(P(o.target), "pointerup", d, !1), O(P(o.target), "pointercancel", s, !1);
|
|
494
721
|
};
|
|
495
|
-
|
|
722
|
+
} else if (se === "mouse" && process.env.NODE_ENV === "test") {
|
|
723
|
+
let d = (s) => {
|
|
496
724
|
if (s.button === 0) {
|
|
497
|
-
if (
|
|
498
|
-
|
|
725
|
+
if (o.ignoreEmulatedMouseEvents) {
|
|
726
|
+
o.ignoreEmulatedMouseEvents = !1;
|
|
499
727
|
return;
|
|
500
728
|
}
|
|
501
|
-
|
|
729
|
+
o.target && y(o.target, s.target) && o.pointerType != null || R(s), o.isOverTarget = !1;
|
|
502
730
|
}
|
|
503
731
|
};
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
let v = vt(s.nativeEvent);
|
|
507
|
-
if (!v) return;
|
|
508
|
-
n.activePointerId = v.identifier, n.ignoreEmulatedMouseEvents = !0, n.isOverTarget = !0, n.isPressed = !0, n.target = s.currentTarget, n.pointerType = "touch", !u && !m && R(s.currentTarget), b || be(n.target), B(L(n.target, s), n.pointerType) && s.stopPropagation(), T(ae(s.currentTarget), "scroll", h, !0);
|
|
509
|
-
}, f.onTouchMove = (s) => {
|
|
510
|
-
if (!s.currentTarget.contains(s.target)) return;
|
|
511
|
-
if (!n.isPressed) {
|
|
512
|
-
s.stopPropagation();
|
|
513
|
-
return;
|
|
514
|
-
}
|
|
515
|
-
let v = ye(s.nativeEvent, n.activePointerId), a = !0;
|
|
516
|
-
v && M(v, s.currentTarget) ? !n.isOverTarget && n.pointerType != null && (n.isOverTarget = !0, a = B(L(n.target, s), n.pointerType)) : n.isOverTarget && n.pointerType != null && (n.isOverTarget = !1, a = k(L(n.target, s), n.pointerType, !1), I(L(n.target, s))), a && s.stopPropagation();
|
|
517
|
-
}, f.onTouchEnd = (s) => {
|
|
518
|
-
if (!s.currentTarget.contains(s.target)) return;
|
|
519
|
-
if (!n.isPressed) {
|
|
520
|
-
s.stopPropagation();
|
|
521
|
-
return;
|
|
522
|
-
}
|
|
523
|
-
let v = ye(s.nativeEvent, n.activePointerId), a = !0;
|
|
524
|
-
v && M(v, s.currentTarget) && n.pointerType != null ? (N(L(n.target, s), n.pointerType), a = k(L(n.target, s), n.pointerType)) : n.isOverTarget && n.pointerType != null && (a = k(L(n.target, s), n.pointerType, !1)), a && s.stopPropagation(), n.isPressed = !1, n.activePointerId = null, n.isOverTarget = !1, n.ignoreEmulatedMouseEvents = !0, n.target && !b && Y(n.target), x();
|
|
525
|
-
}, f.onTouchCancel = (s) => {
|
|
526
|
-
s.currentTarget.contains(s.target) && (s.stopPropagation(), n.isPressed && S(L(n.target, s)));
|
|
732
|
+
return w(P(o.target), "mouseup", d, !1), () => {
|
|
733
|
+
O(P(o.target), "mouseup", d, !1);
|
|
527
734
|
};
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
735
|
+
} else if (se === "touch" && process.env.NODE_ENV === "test") {
|
|
736
|
+
let d = (s) => {
|
|
737
|
+
o.isPressed && y(b(s), o.target) && R({
|
|
738
|
+
currentTarget: o.target,
|
|
531
739
|
shiftKey: !1,
|
|
532
740
|
ctrlKey: !1,
|
|
533
741
|
metaKey: !1,
|
|
534
742
|
altKey: !1
|
|
535
743
|
});
|
|
536
744
|
};
|
|
537
|
-
|
|
538
|
-
|
|
745
|
+
return w(M(o.target), "scroll", d, !0), () => {
|
|
746
|
+
O(M(o.target), "scroll", d, !0);
|
|
539
747
|
};
|
|
540
748
|
}
|
|
541
|
-
return f;
|
|
542
749
|
}, [
|
|
750
|
+
se,
|
|
751
|
+
w,
|
|
752
|
+
O
|
|
753
|
+
]);
|
|
754
|
+
let xt = at(() => {
|
|
755
|
+
let o = $.current, d = {
|
|
756
|
+
onKeyDown(s) {
|
|
757
|
+
if (xe(s.nativeEvent, s.currentTarget) && y(s.currentTarget, b(s))) {
|
|
758
|
+
var p;
|
|
759
|
+
et(b(s), s.key) && s.preventDefault();
|
|
760
|
+
let m = !0;
|
|
761
|
+
!o.isPressed && !s.repeat && (o.target = s.currentTarget, o.isPressed = !0, Ue(!0), o.pointerType = "keyboard", m = B(s, "keyboard")), m && s.stopPropagation(), s.metaKey && Q() && ((p = o.metaKeyEvents) === null || p === void 0 || p.set(s.key, s.nativeEvent));
|
|
762
|
+
} else s.key === "Meta" && (o.metaKeyEvents = /* @__PURE__ */ new Map());
|
|
763
|
+
},
|
|
764
|
+
onClick(s) {
|
|
765
|
+
if (!(s && !y(s.currentTarget, b(s))) && s && s.button === 0 && !o.isTriggeringEvent && !W.isOpening) {
|
|
766
|
+
let p = !0;
|
|
767
|
+
if (a && s.preventDefault(), !o.ignoreEmulatedMouseEvents && !o.isPressed && (o.pointerType === "virtual" || Le(s.nativeEvent))) {
|
|
768
|
+
let m = B(s, "virtual"), _ = I(s, "virtual"), H = S(s, "virtual");
|
|
769
|
+
ee(s), p = m && _ && H;
|
|
770
|
+
} else if (o.isPressed && o.pointerType !== "keyboard") {
|
|
771
|
+
let m = o.pointerType || s.nativeEvent.pointerType || "virtual", _ = I(G(s.currentTarget, s), m), H = S(G(s.currentTarget, s), m, !0);
|
|
772
|
+
p = _ && H, o.isOverTarget = !1, ee(s), A(s);
|
|
773
|
+
}
|
|
774
|
+
o.ignoreEmulatedMouseEvents = !1, p && s.stopPropagation();
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
};
|
|
778
|
+
return typeof PointerEvent < "u" ? (d.onPointerDown = (s) => {
|
|
779
|
+
if (s.button !== 0 || !y(s.currentTarget, b(s))) return;
|
|
780
|
+
if (nn(s.nativeEvent)) {
|
|
781
|
+
o.pointerType = "virtual";
|
|
782
|
+
return;
|
|
783
|
+
}
|
|
784
|
+
o.pointerType = s.pointerType;
|
|
785
|
+
let p = !0;
|
|
786
|
+
if (!o.isPressed) {
|
|
787
|
+
o.isPressed = !0, te("pointer"), o.isOverTarget = !0, o.activePointerId = s.pointerId, o.target = s.currentTarget, k || Ye(o.target), p = B(s, o.pointerType);
|
|
788
|
+
let m = b(s);
|
|
789
|
+
"releasePointerCapture" in m && ("hasPointerCapture" in m ? m.hasPointerCapture(s.pointerId) && m.releasePointerCapture(s.pointerId) : m.releasePointerCapture(s.pointerId));
|
|
790
|
+
}
|
|
791
|
+
p && s.stopPropagation();
|
|
792
|
+
}, d.onMouseDown = (s) => {
|
|
793
|
+
if (y(s.currentTarget, b(s)) && s.button === 0) {
|
|
794
|
+
if (v) {
|
|
795
|
+
let p = We(s.target);
|
|
796
|
+
p && o.disposables.push(p);
|
|
797
|
+
}
|
|
798
|
+
s.stopPropagation();
|
|
799
|
+
}
|
|
800
|
+
}, d.onPointerUp = (s) => {
|
|
801
|
+
!y(s.currentTarget, b(s)) || o.pointerType === "virtual" || s.button === 0 && !o.isPressed && I(s, o.pointerType || s.pointerType);
|
|
802
|
+
}, d.onPointerEnter = (s) => {
|
|
803
|
+
s.pointerId === o.activePointerId && o.target && !o.isOverTarget && o.pointerType != null && (o.isOverTarget = !0, B(G(o.target, s), o.pointerType));
|
|
804
|
+
}, d.onPointerLeave = (s) => {
|
|
805
|
+
s.pointerId === o.activePointerId && o.target && o.isOverTarget && o.pointerType != null && (o.isOverTarget = !1, S(G(o.target, s), o.pointerType, !1), F(s));
|
|
806
|
+
}, d.onDragStart = (s) => {
|
|
807
|
+
y(s.currentTarget, b(s)) && A(s);
|
|
808
|
+
}) : process.env.NODE_ENV === "test" && (d.onMouseDown = (s) => {
|
|
809
|
+
if (s.button !== 0 || !y(s.currentTarget, b(s))) return;
|
|
810
|
+
if (o.ignoreEmulatedMouseEvents) {
|
|
811
|
+
s.stopPropagation();
|
|
812
|
+
return;
|
|
813
|
+
}
|
|
814
|
+
if (o.isPressed = !0, te("mouse"), o.isOverTarget = !0, o.target = s.currentTarget, o.pointerType = Le(s.nativeEvent) ? "virtual" : "mouse", Nt(() => B(s, o.pointerType)) && s.stopPropagation(), v) {
|
|
815
|
+
let m = We(s.target);
|
|
816
|
+
m && o.disposables.push(m);
|
|
817
|
+
}
|
|
818
|
+
}, d.onMouseEnter = (s) => {
|
|
819
|
+
if (!y(s.currentTarget, b(s))) return;
|
|
820
|
+
let p = !0;
|
|
821
|
+
o.isPressed && !o.ignoreEmulatedMouseEvents && o.pointerType != null && (o.isOverTarget = !0, p = B(s, o.pointerType)), p && s.stopPropagation();
|
|
822
|
+
}, d.onMouseLeave = (s) => {
|
|
823
|
+
if (!y(s.currentTarget, b(s))) return;
|
|
824
|
+
let p = !0;
|
|
825
|
+
o.isPressed && !o.ignoreEmulatedMouseEvents && o.pointerType != null && (o.isOverTarget = !1, p = S(s, o.pointerType, !1), F(s)), p && s.stopPropagation();
|
|
826
|
+
}, d.onMouseUp = (s) => {
|
|
827
|
+
y(s.currentTarget, b(s)) && !o.ignoreEmulatedMouseEvents && s.button === 0 && !o.isPressed && I(s, o.pointerType || "mouse");
|
|
828
|
+
}, d.onTouchStart = (s) => {
|
|
829
|
+
if (!y(s.currentTarget, b(s))) return;
|
|
830
|
+
let p = hn(s.nativeEvent);
|
|
831
|
+
if (!p) return;
|
|
832
|
+
o.activePointerId = p.identifier, o.ignoreEmulatedMouseEvents = !0, o.isOverTarget = !0, o.isPressed = !0, te("touch"), o.target = s.currentTarget, o.pointerType = "touch", k || Ye(o.target), B(V(o.target, s), o.pointerType) && s.stopPropagation();
|
|
833
|
+
}, d.onTouchMove = (s) => {
|
|
834
|
+
if (!y(s.currentTarget, b(s))) return;
|
|
835
|
+
if (!o.isPressed) {
|
|
836
|
+
s.stopPropagation();
|
|
837
|
+
return;
|
|
838
|
+
}
|
|
839
|
+
let p = Qe(s.nativeEvent, o.activePointerId), m = !0;
|
|
840
|
+
p && Ze(p, s.currentTarget) ? !o.isOverTarget && o.pointerType != null && (o.isOverTarget = !0, m = B(V(o.target, s), o.pointerType)) : o.isOverTarget && o.pointerType != null && (o.isOverTarget = !1, m = S(V(o.target, s), o.pointerType, !1), F(V(o.target, s))), m && s.stopPropagation();
|
|
841
|
+
}, d.onTouchEnd = (s) => {
|
|
842
|
+
if (!y(s.currentTarget, b(s))) return;
|
|
843
|
+
if (!o.isPressed) {
|
|
844
|
+
s.stopPropagation();
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
847
|
+
let p = Qe(s.nativeEvent, o.activePointerId), m = !0;
|
|
848
|
+
p && Ze(p, s.currentTarget) && o.pointerType != null ? (I(V(o.target, s), o.pointerType), m = S(V(o.target, s), o.pointerType), ke(s.nativeEvent, o.target)) : o.isOverTarget && o.pointerType != null && (m = S(V(o.target, s), o.pointerType, !1)), m && s.stopPropagation(), o.isPressed = !1, te(null), o.activePointerId = null, o.isOverTarget = !1, o.ignoreEmulatedMouseEvents = !0, o.target && !k && Oe(o.target), T();
|
|
849
|
+
}, d.onTouchCancel = (s) => {
|
|
850
|
+
y(s.currentTarget, b(s)) && (s.stopPropagation(), o.isPressed && A(V(o.target, s)));
|
|
851
|
+
}, d.onDragStart = (s) => {
|
|
852
|
+
y(s.currentTarget, b(s)) && A(s);
|
|
853
|
+
}), d;
|
|
854
|
+
}, [
|
|
855
|
+
a,
|
|
856
|
+
v,
|
|
543
857
|
T,
|
|
544
|
-
u,
|
|
545
|
-
m,
|
|
546
|
-
x,
|
|
547
|
-
b,
|
|
548
|
-
S,
|
|
549
|
-
I,
|
|
550
858
|
k,
|
|
859
|
+
A,
|
|
860
|
+
F,
|
|
861
|
+
S,
|
|
551
862
|
B,
|
|
552
|
-
|
|
863
|
+
I,
|
|
864
|
+
ee,
|
|
865
|
+
ke
|
|
553
866
|
]);
|
|
554
|
-
return
|
|
555
|
-
|
|
556
|
-
|
|
867
|
+
return z(() => {
|
|
868
|
+
if (!C || process.env.NODE_ENV === "test") return;
|
|
869
|
+
const o = P(C.current);
|
|
870
|
+
if (!o || !o.head || o.getElementById(qe)) return;
|
|
871
|
+
const d = o.createElement("style");
|
|
872
|
+
d.id = qe, d.textContent = `
|
|
873
|
+
@layer {
|
|
874
|
+
[${Je}] {
|
|
875
|
+
touch-action: pan-x pan-y pinch-zoom;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
`.trim(), o.head.prepend(d);
|
|
557
879
|
}, [
|
|
558
|
-
|
|
880
|
+
C
|
|
881
|
+
]), z(() => {
|
|
882
|
+
let o = $.current;
|
|
883
|
+
return () => {
|
|
884
|
+
var d;
|
|
885
|
+
k || Oe((d = o.target) !== null && d !== void 0 ? d : void 0);
|
|
886
|
+
for (let s of o.disposables) s();
|
|
887
|
+
o.disposables = [];
|
|
888
|
+
};
|
|
889
|
+
}, [
|
|
890
|
+
k
|
|
559
891
|
]), {
|
|
560
|
-
isPressed:
|
|
561
|
-
pressProps:
|
|
892
|
+
isPressed: c || N,
|
|
893
|
+
pressProps: j(L, xt, {
|
|
894
|
+
[Je]: !0
|
|
895
|
+
})
|
|
562
896
|
};
|
|
563
897
|
}
|
|
564
|
-
function
|
|
898
|
+
function Ke(e) {
|
|
565
899
|
return e.tagName === "A" && e.hasAttribute("href");
|
|
566
900
|
}
|
|
567
|
-
function
|
|
568
|
-
const { key:
|
|
569
|
-
return (
|
|
570
|
-
!((
|
|
901
|
+
function xe(e, t) {
|
|
902
|
+
const { key: n, code: r } = e, i = t, l = i.getAttribute("role");
|
|
903
|
+
return (n === "Enter" || n === " " || n === "Spacebar" || r === "Space") && !(i instanceof M(i).HTMLInputElement && !$t(i, n) || i instanceof M(i).HTMLTextAreaElement || i.isContentEditable) && // Links should only trigger with Enter key
|
|
904
|
+
!((l === "link" || !l && Ke(i)) && n !== "Enter");
|
|
571
905
|
}
|
|
572
|
-
function
|
|
906
|
+
function hn(e) {
|
|
573
907
|
const { targetTouches: t } = e;
|
|
574
908
|
return t.length > 0 ? t[0] : null;
|
|
575
909
|
}
|
|
576
|
-
function
|
|
577
|
-
const
|
|
578
|
-
for (let
|
|
579
|
-
const i = r
|
|
910
|
+
function Qe(e, t) {
|
|
911
|
+
const n = e.changedTouches;
|
|
912
|
+
for (let r = 0; r < n.length; r++) {
|
|
913
|
+
const i = n[r];
|
|
580
914
|
if (i.identifier === t) return i;
|
|
581
915
|
}
|
|
582
916
|
return null;
|
|
583
917
|
}
|
|
584
|
-
function
|
|
585
|
-
let
|
|
586
|
-
return t.targetTouches && t.targetTouches.length === 1 && (
|
|
918
|
+
function V(e, t) {
|
|
919
|
+
let n = 0, r = 0;
|
|
920
|
+
return t.targetTouches && t.targetTouches.length === 1 && (n = t.targetTouches[0].clientX, r = t.targetTouches[0].clientY), {
|
|
587
921
|
currentTarget: e,
|
|
588
922
|
shiftKey: t.shiftKey,
|
|
589
923
|
ctrlKey: t.ctrlKey,
|
|
590
924
|
metaKey: t.metaKey,
|
|
591
925
|
altKey: t.altKey,
|
|
592
|
-
clientX:
|
|
593
|
-
clientY:
|
|
926
|
+
clientX: n,
|
|
927
|
+
clientY: r
|
|
594
928
|
};
|
|
595
929
|
}
|
|
596
|
-
function
|
|
597
|
-
let
|
|
930
|
+
function G(e, t) {
|
|
931
|
+
let n = t.clientX, r = t.clientY;
|
|
598
932
|
return {
|
|
599
933
|
currentTarget: e,
|
|
600
934
|
shiftKey: t.shiftKey,
|
|
601
935
|
ctrlKey: t.ctrlKey,
|
|
602
936
|
metaKey: t.metaKey,
|
|
603
937
|
altKey: t.altKey,
|
|
604
|
-
clientX:
|
|
605
|
-
clientY:
|
|
938
|
+
clientX: n,
|
|
939
|
+
clientY: r,
|
|
940
|
+
key: t.key
|
|
606
941
|
};
|
|
607
942
|
}
|
|
608
|
-
function
|
|
609
|
-
let t = 0,
|
|
610
|
-
return e.width !== void 0 ? t = e.width / 2 : e.radiusX !== void 0 && (t = e.radiusX), e.height !== void 0 ?
|
|
611
|
-
top: e.clientY -
|
|
943
|
+
function yn(e) {
|
|
944
|
+
let t = 0, n = 0;
|
|
945
|
+
return e.width !== void 0 ? t = e.width / 2 : e.radiusX !== void 0 && (t = e.radiusX), e.height !== void 0 ? n = e.height / 2 : e.radiusY !== void 0 && (n = e.radiusY), {
|
|
946
|
+
top: e.clientY - n,
|
|
612
947
|
right: e.clientX + t,
|
|
613
|
-
bottom: e.clientY +
|
|
948
|
+
bottom: e.clientY + n,
|
|
614
949
|
left: e.clientX - t
|
|
615
950
|
};
|
|
616
951
|
}
|
|
617
|
-
function
|
|
952
|
+
function $n(e, t) {
|
|
618
953
|
return !(e.left > t.right || t.left > e.right || e.top > t.bottom || t.top > e.bottom);
|
|
619
954
|
}
|
|
620
|
-
function
|
|
621
|
-
let
|
|
622
|
-
return
|
|
955
|
+
function Ze(e, t) {
|
|
956
|
+
let n = t.getBoundingClientRect(), r = yn(e);
|
|
957
|
+
return $n(n, r);
|
|
623
958
|
}
|
|
624
|
-
function
|
|
625
|
-
return
|
|
626
|
-
}
|
|
627
|
-
function Ie(e) {
|
|
628
|
-
return e instanceof HTMLInputElement ? !1 : e instanceof HTMLButtonElement ? e.type !== "submit" && e.type !== "reset" : !de(e);
|
|
959
|
+
function En(e) {
|
|
960
|
+
return e instanceof HTMLInputElement ? !1 : e instanceof HTMLButtonElement ? e.type !== "submit" && e.type !== "reset" : !Ke(e);
|
|
629
961
|
}
|
|
630
|
-
function
|
|
631
|
-
return e instanceof HTMLInputElement ?
|
|
962
|
+
function et(e, t) {
|
|
963
|
+
return e instanceof HTMLInputElement ? !$t(e, t) : En(e);
|
|
632
964
|
}
|
|
633
|
-
const
|
|
965
|
+
const kn = /* @__PURE__ */ new Set([
|
|
634
966
|
"checkbox",
|
|
635
967
|
"radio",
|
|
636
968
|
"range",
|
|
@@ -641,277 +973,415 @@ const kt = /* @__PURE__ */ new Set([
|
|
|
641
973
|
"submit",
|
|
642
974
|
"reset"
|
|
643
975
|
]);
|
|
644
|
-
function
|
|
645
|
-
return e.type === "checkbox" || e.type === "radio" ? t === " " :
|
|
976
|
+
function $t(e, t) {
|
|
977
|
+
return e.type === "checkbox" || e.type === "radio" ? t === " " : kn.has(e.type);
|
|
646
978
|
}
|
|
647
|
-
let
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
979
|
+
let re = null;
|
|
980
|
+
const wn = /* @__PURE__ */ new Set();
|
|
981
|
+
let ne = /* @__PURE__ */ new Map(), Y = !1, De = !1;
|
|
982
|
+
function Fe(e, t) {
|
|
983
|
+
for (let n of wn) n(e, t);
|
|
984
|
+
}
|
|
985
|
+
function Pn(e) {
|
|
986
|
+
return !(e.metaKey || !Q() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
987
|
+
}
|
|
988
|
+
function ve(e) {
|
|
989
|
+
Y = !0, !W.isOpening && Pn(e) && (re = "keyboard", Fe("keyboard", e));
|
|
990
|
+
}
|
|
991
|
+
function D(e) {
|
|
992
|
+
re = "pointer", "pointerType" in e && e.pointerType, (e.type === "mousedown" || e.type === "pointerdown") && (Y = !0, Fe("pointer", e));
|
|
652
993
|
}
|
|
653
|
-
function
|
|
654
|
-
|
|
994
|
+
function Et(e) {
|
|
995
|
+
!W.isOpening && Le(e) && (Y = !0, re = "virtual");
|
|
996
|
+
}
|
|
997
|
+
function kt(e) {
|
|
998
|
+
b(e) === window || b(e) === document || be || !e.isTrusted || (!Y && !De && (re = "virtual", Fe("virtual", e)), Y = !1, De = !1);
|
|
655
999
|
}
|
|
656
1000
|
function wt() {
|
|
1001
|
+
be || (Y = !1, De = !0);
|
|
1002
|
+
}
|
|
1003
|
+
function tt(e) {
|
|
1004
|
+
if (typeof window > "u" || typeof document > "u" || ne.get(M(e))) return;
|
|
1005
|
+
const t = M(e), n = P(e);
|
|
1006
|
+
let r = t.HTMLElement.prototype.focus;
|
|
1007
|
+
t.HTMLElement.prototype.focus = function() {
|
|
1008
|
+
Y = !0, r.apply(this, arguments);
|
|
1009
|
+
}, n.addEventListener("keydown", ve, !0), n.addEventListener("keyup", ve, !0), n.addEventListener("click", Et, !0), t.addEventListener("focus", kt, !0), t.addEventListener("blur", wt, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", D, !0), n.addEventListener("pointermove", D, !0), n.addEventListener("pointerup", D, !0)) : process.env.NODE_ENV === "test" && (n.addEventListener("mousedown", D, !0), n.addEventListener("mousemove", D, !0), n.addEventListener("mouseup", D, !0)), t.addEventListener("beforeunload", () => {
|
|
1010
|
+
Pt(e);
|
|
1011
|
+
}, {
|
|
1012
|
+
once: !0
|
|
1013
|
+
}), ne.set(t, {
|
|
1014
|
+
focus: r
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
const Pt = (e, t) => {
|
|
1018
|
+
const n = M(e), r = P(e);
|
|
1019
|
+
t && r.removeEventListener("DOMContentLoaded", t), ne.has(n) && (n.HTMLElement.prototype.focus = ne.get(n).focus, r.removeEventListener("keydown", ve, !0), r.removeEventListener("keyup", ve, !0), r.removeEventListener("click", Et, !0), n.removeEventListener("focus", kt, !0), n.removeEventListener("blur", wt, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", D, !0), r.removeEventListener("pointermove", D, !0), r.removeEventListener("pointerup", D, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", D, !0), r.removeEventListener("mousemove", D, !0), r.removeEventListener("mouseup", D, !0)), ne.delete(n));
|
|
1020
|
+
};
|
|
1021
|
+
function Tn(e) {
|
|
1022
|
+
const t = P(e);
|
|
1023
|
+
let n;
|
|
1024
|
+
return t.readyState !== "loading" ? tt(e) : (n = () => {
|
|
1025
|
+
tt(e);
|
|
1026
|
+
}, t.addEventListener("DOMContentLoaded", n)), () => Pt(e, n);
|
|
1027
|
+
}
|
|
1028
|
+
typeof document < "u" && Tn();
|
|
1029
|
+
function On() {
|
|
1030
|
+
return re;
|
|
1031
|
+
}
|
|
1032
|
+
function xn(e) {
|
|
1033
|
+
if (!e.isConnected) return;
|
|
1034
|
+
const t = P(e);
|
|
1035
|
+
if (On() === "virtual") {
|
|
1036
|
+
let n = q(t);
|
|
1037
|
+
ft(() => {
|
|
1038
|
+
const r = q(t);
|
|
1039
|
+
(r === n || r === t.body) && e.isConnected && J(e);
|
|
1040
|
+
});
|
|
1041
|
+
} else J(e);
|
|
1042
|
+
}
|
|
1043
|
+
function Bn(e) {
|
|
1044
|
+
let { isDisabled: t, onFocus: n, onBlur: r, onFocusChange: i } = e;
|
|
1045
|
+
const l = x((c) => {
|
|
1046
|
+
if (b(c) === c.currentTarget)
|
|
1047
|
+
return r && r(c), i && i(!1), !0;
|
|
1048
|
+
}, [
|
|
1049
|
+
r,
|
|
1050
|
+
i
|
|
1051
|
+
]), u = dn(l), a = x((c) => {
|
|
1052
|
+
let v = b(c);
|
|
1053
|
+
const g = P(v), k = g ? q(g) : q();
|
|
1054
|
+
v === c.currentTarget && v === k && (n && n(c), i && i(!0), u(c));
|
|
1055
|
+
}, [
|
|
1056
|
+
i,
|
|
1057
|
+
n,
|
|
1058
|
+
u
|
|
1059
|
+
]);
|
|
1060
|
+
return {
|
|
1061
|
+
focusProps: {
|
|
1062
|
+
onFocus: !t && (n || i || r) ? a : void 0,
|
|
1063
|
+
onBlur: !t && (r || i) ? l : void 0
|
|
1064
|
+
}
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
function nt(e) {
|
|
1068
|
+
if (!e) return;
|
|
1069
|
+
let t = !0;
|
|
1070
|
+
return (n) => {
|
|
1071
|
+
let r = {
|
|
1072
|
+
...n,
|
|
1073
|
+
preventDefault() {
|
|
1074
|
+
n.preventDefault();
|
|
1075
|
+
},
|
|
1076
|
+
isDefaultPrevented() {
|
|
1077
|
+
return n.isDefaultPrevented();
|
|
1078
|
+
},
|
|
1079
|
+
stopPropagation() {
|
|
1080
|
+
t && process.env.NODE_ENV !== "production" ? console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.") : t = !0;
|
|
1081
|
+
},
|
|
1082
|
+
continuePropagation() {
|
|
1083
|
+
t = !1;
|
|
1084
|
+
},
|
|
1085
|
+
isPropagationStopped() {
|
|
1086
|
+
return t;
|
|
1087
|
+
}
|
|
1088
|
+
};
|
|
1089
|
+
e(r), t && n.stopPropagation();
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
function Sn(e) {
|
|
1093
|
+
return {
|
|
1094
|
+
keyboardProps: e.isDisabled ? {} : {
|
|
1095
|
+
onKeyDown: nt(e.onKeyDown),
|
|
1096
|
+
onKeyUp: nt(e.onKeyUp)
|
|
1097
|
+
}
|
|
1098
|
+
};
|
|
1099
|
+
}
|
|
1100
|
+
let Ln = /* @__PURE__ */ _e.createContext(null);
|
|
1101
|
+
function Nn(e) {
|
|
1102
|
+
let t = lt(Ln) || {};
|
|
1103
|
+
bt(t, e);
|
|
1104
|
+
let { ref: n, ...r } = t;
|
|
1105
|
+
return r;
|
|
1106
|
+
}
|
|
1107
|
+
function Dn(e, t) {
|
|
1108
|
+
let { focusProps: n } = Bn(e), { keyboardProps: r } = Sn(e), i = j(n, r), l = Nn(t), u = e.isDisabled ? {} : l, a = Z(e.autoFocus);
|
|
1109
|
+
z(() => {
|
|
1110
|
+
a.current && t.current && xn(t.current), a.current = !1;
|
|
1111
|
+
}, [
|
|
1112
|
+
t
|
|
1113
|
+
]);
|
|
1114
|
+
let c = e.excludeFromTabOrder ? -1 : 0;
|
|
1115
|
+
return e.isDisabled && (c = void 0), {
|
|
1116
|
+
focusableProps: j({
|
|
1117
|
+
...i,
|
|
1118
|
+
tabIndex: c
|
|
1119
|
+
}, u)
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
let ge = !1, pe = 0;
|
|
1123
|
+
function Ce() {
|
|
1124
|
+
ge = !0, setTimeout(() => {
|
|
1125
|
+
ge = !1;
|
|
1126
|
+
}, 50);
|
|
1127
|
+
}
|
|
1128
|
+
function ot(e) {
|
|
1129
|
+
e.pointerType === "touch" && Ce();
|
|
1130
|
+
}
|
|
1131
|
+
function Cn() {
|
|
657
1132
|
if (!(typeof document > "u"))
|
|
658
|
-
return typeof PointerEvent < "u" ? document.addEventListener("pointerup",
|
|
659
|
-
|
|
1133
|
+
return pe === 0 && (typeof PointerEvent < "u" ? document.addEventListener("pointerup", ot) : process.env.NODE_ENV === "test" && document.addEventListener("touchend", Ce)), pe++, () => {
|
|
1134
|
+
pe--, !(pe > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup", ot) : process.env.NODE_ENV === "test" && document.removeEventListener("touchend", Ce));
|
|
660
1135
|
};
|
|
661
1136
|
}
|
|
662
|
-
function
|
|
663
|
-
let { onHoverStart: t, onHoverChange:
|
|
1137
|
+
function An(e) {
|
|
1138
|
+
let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, isDisabled: i } = e, [l, u] = fe(!1), a = Z({
|
|
664
1139
|
isHovered: !1,
|
|
665
1140
|
ignoreEmulatedMouseEvents: !1,
|
|
666
1141
|
pointerType: "",
|
|
667
1142
|
target: null
|
|
668
1143
|
}).current;
|
|
669
|
-
|
|
670
|
-
let { hoverProps:
|
|
671
|
-
let
|
|
672
|
-
if (
|
|
673
|
-
|
|
674
|
-
let w =
|
|
675
|
-
|
|
1144
|
+
z(Cn, []);
|
|
1145
|
+
let { addGlobalListener: c, removeAllGlobalListeners: v } = mt(), { hoverProps: g, triggerHoverEnd: k } = at(() => {
|
|
1146
|
+
let C = (h, $) => {
|
|
1147
|
+
if (a.pointerType = $, i || $ === "touch" || a.isHovered || !y(h.currentTarget, b(h))) return;
|
|
1148
|
+
a.isHovered = !0;
|
|
1149
|
+
let w = h.currentTarget;
|
|
1150
|
+
a.target = w, c(P(b(h)), "pointerover", (T) => {
|
|
1151
|
+
a.isHovered && a.target && !y(a.target, b(T)) && L(T, T.pointerType);
|
|
1152
|
+
}, {
|
|
1153
|
+
capture: !0
|
|
1154
|
+
}), t && t({
|
|
676
1155
|
type: "hoverstart",
|
|
677
1156
|
target: w,
|
|
678
|
-
pointerType:
|
|
679
|
-
}),
|
|
680
|
-
},
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
let w = _.currentTarget;
|
|
684
|
-
o && o({
|
|
1157
|
+
pointerType: $
|
|
1158
|
+
}), n && n(!0), u(!0);
|
|
1159
|
+
}, L = (h, $) => {
|
|
1160
|
+
let w = a.target;
|
|
1161
|
+
a.pointerType = "", a.target = null, !($ === "touch" || !a.isHovered || !w) && (a.isHovered = !1, v(), r && r({
|
|
685
1162
|
type: "hoverend",
|
|
686
1163
|
target: w,
|
|
687
|
-
pointerType:
|
|
688
|
-
}),
|
|
689
|
-
},
|
|
690
|
-
return typeof PointerEvent < "u" ? (
|
|
691
|
-
|
|
692
|
-
},
|
|
693
|
-
!i &&
|
|
694
|
-
}) : (
|
|
695
|
-
|
|
696
|
-
},
|
|
697
|
-
!
|
|
698
|
-
},
|
|
699
|
-
!i &&
|
|
1164
|
+
pointerType: $
|
|
1165
|
+
}), n && n(!1), u(!1));
|
|
1166
|
+
}, N = {};
|
|
1167
|
+
return typeof PointerEvent < "u" ? (N.onPointerEnter = (h) => {
|
|
1168
|
+
ge && h.pointerType === "mouse" || C(h, h.pointerType);
|
|
1169
|
+
}, N.onPointerLeave = (h) => {
|
|
1170
|
+
!i && y(h.currentTarget, b(h)) && L(h, h.pointerType);
|
|
1171
|
+
}) : process.env.NODE_ENV === "test" && (N.onTouchStart = () => {
|
|
1172
|
+
a.ignoreEmulatedMouseEvents = !0;
|
|
1173
|
+
}, N.onMouseEnter = (h) => {
|
|
1174
|
+
!a.ignoreEmulatedMouseEvents && !ge && C(h, "mouse"), a.ignoreEmulatedMouseEvents = !1;
|
|
1175
|
+
}, N.onMouseLeave = (h) => {
|
|
1176
|
+
!i && y(h.currentTarget, b(h)) && L(h, "mouse");
|
|
700
1177
|
}), {
|
|
701
|
-
hoverProps:
|
|
702
|
-
triggerHoverEnd:
|
|
1178
|
+
hoverProps: N,
|
|
1179
|
+
triggerHoverEnd: L
|
|
703
1180
|
};
|
|
704
1181
|
}, [
|
|
705
1182
|
t,
|
|
1183
|
+
n,
|
|
706
1184
|
r,
|
|
707
|
-
o,
|
|
708
1185
|
i,
|
|
709
|
-
|
|
1186
|
+
a,
|
|
1187
|
+
c,
|
|
1188
|
+
v
|
|
710
1189
|
]);
|
|
711
|
-
return
|
|
712
|
-
i &&
|
|
713
|
-
currentTarget:
|
|
714
|
-
},
|
|
1190
|
+
return z(() => {
|
|
1191
|
+
i && k({
|
|
1192
|
+
currentTarget: a.target
|
|
1193
|
+
}, a.pointerType);
|
|
715
1194
|
}, [
|
|
716
1195
|
i
|
|
717
1196
|
]), {
|
|
718
|
-
hoverProps:
|
|
719
|
-
isHovered:
|
|
1197
|
+
hoverProps: g,
|
|
1198
|
+
isHovered: l
|
|
720
1199
|
};
|
|
721
1200
|
}
|
|
722
|
-
function
|
|
723
|
-
let {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
target: _,
|
|
737
|
-
rel: P,
|
|
738
|
-
type: w = "button"
|
|
739
|
-
} = e, T;
|
|
740
|
-
r === "button" ? T = {
|
|
741
|
-
type: w,
|
|
742
|
-
disabled: o
|
|
743
|
-
} : T = {
|
|
1201
|
+
function In(e, t) {
|
|
1202
|
+
let { elementType: n = "button", isDisabled: r, onPress: i, onPressStart: l, onPressEnd: u, onPressUp: a, onPressChange: c, preventFocusOnPress: v, allowFocusWhenDisabled: g, onClick: k, href: C, target: L, rel: N, type: h = "button" } = e, $;
|
|
1203
|
+
n === "button" ? $ = {
|
|
1204
|
+
type: h,
|
|
1205
|
+
disabled: r,
|
|
1206
|
+
form: e.form,
|
|
1207
|
+
formAction: e.formAction,
|
|
1208
|
+
formEncType: e.formEncType,
|
|
1209
|
+
formMethod: e.formMethod,
|
|
1210
|
+
formNoValidate: e.formNoValidate,
|
|
1211
|
+
formTarget: e.formTarget,
|
|
1212
|
+
name: e.name,
|
|
1213
|
+
value: e.value
|
|
1214
|
+
} : $ = {
|
|
744
1215
|
role: "button",
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
disabled: r === "input" ?
|
|
750
|
-
|
|
751
|
-
rel: r === "a" ? P : void 0
|
|
1216
|
+
href: n === "a" && !r ? C : void 0,
|
|
1217
|
+
target: n === "a" ? L : void 0,
|
|
1218
|
+
type: n === "input" ? h : void 0,
|
|
1219
|
+
disabled: n === "input" ? r : void 0,
|
|
1220
|
+
"aria-disabled": !r || n === "input" ? void 0 : r,
|
|
1221
|
+
rel: n === "a" ? N : void 0
|
|
752
1222
|
};
|
|
753
|
-
let { pressProps:
|
|
754
|
-
onPressStart:
|
|
1223
|
+
let { pressProps: w, isPressed: T } = _n({
|
|
1224
|
+
onPressStart: l,
|
|
755
1225
|
onPressEnd: u,
|
|
756
|
-
onPressChange:
|
|
1226
|
+
onPressChange: c,
|
|
757
1227
|
onPress: i,
|
|
758
|
-
onPressUp:
|
|
759
|
-
|
|
760
|
-
|
|
1228
|
+
onPressUp: a,
|
|
1229
|
+
onClick: k,
|
|
1230
|
+
isDisabled: r,
|
|
1231
|
+
preventFocusOnPress: v,
|
|
761
1232
|
ref: t
|
|
762
|
-
}), { focusableProps:
|
|
763
|
-
|
|
764
|
-
let
|
|
1233
|
+
}), { focusableProps: O } = Dn(e, t);
|
|
1234
|
+
g && (O.tabIndex = r ? -1 : O.tabIndex);
|
|
1235
|
+
let B = j(O, w, Wt(e, {
|
|
765
1236
|
labelable: !0
|
|
766
1237
|
}));
|
|
767
1238
|
return {
|
|
768
|
-
isPressed:
|
|
769
|
-
buttonProps:
|
|
1239
|
+
isPressed: T,
|
|
1240
|
+
buttonProps: j($, B, {
|
|
770
1241
|
"aria-haspopup": e["aria-haspopup"],
|
|
771
1242
|
"aria-expanded": e["aria-expanded"],
|
|
772
1243
|
"aria-controls": e["aria-controls"],
|
|
773
1244
|
"aria-pressed": e["aria-pressed"],
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
}
|
|
1245
|
+
"aria-current": e["aria-current"],
|
|
1246
|
+
"aria-disabled": e["aria-disabled"]
|
|
777
1247
|
})
|
|
778
1248
|
};
|
|
779
1249
|
}
|
|
780
|
-
function
|
|
1250
|
+
function Mn(e, t, n) {
|
|
781
1251
|
return t in e ? Object.defineProperty(e, t, {
|
|
782
|
-
value:
|
|
1252
|
+
value: n,
|
|
783
1253
|
enumerable: !0,
|
|
784
1254
|
configurable: !0,
|
|
785
1255
|
writable: !0
|
|
786
|
-
}) : e[t] =
|
|
1256
|
+
}) : e[t] = n, e;
|
|
787
1257
|
}
|
|
788
|
-
function
|
|
789
|
-
var
|
|
1258
|
+
function rt(e, t) {
|
|
1259
|
+
var n = Object.keys(e);
|
|
790
1260
|
if (Object.getOwnPropertySymbols) {
|
|
791
|
-
var
|
|
792
|
-
t && (
|
|
1261
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
1262
|
+
t && (r = r.filter(function(i) {
|
|
793
1263
|
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
794
|
-
})),
|
|
1264
|
+
})), n.push.apply(n, r);
|
|
795
1265
|
}
|
|
796
|
-
return
|
|
1266
|
+
return n;
|
|
797
1267
|
}
|
|
798
|
-
function
|
|
1268
|
+
function st(e) {
|
|
799
1269
|
for (var t = 1; t < arguments.length; t++) {
|
|
800
|
-
var
|
|
801
|
-
t % 2 ?
|
|
802
|
-
|
|
803
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(
|
|
804
|
-
Object.defineProperty(e,
|
|
1270
|
+
var n = arguments[t] != null ? arguments[t] : {};
|
|
1271
|
+
t % 2 ? rt(Object(n), !0).forEach(function(r) {
|
|
1272
|
+
Mn(e, r, n[r]);
|
|
1273
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : rt(Object(n)).forEach(function(r) {
|
|
1274
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
|
|
805
1275
|
});
|
|
806
1276
|
}
|
|
807
1277
|
return e;
|
|
808
1278
|
}
|
|
809
|
-
var
|
|
810
|
-
for (var
|
|
1279
|
+
var Kn = (e, t, n) => {
|
|
1280
|
+
for (var r of Object.keys(e)) {
|
|
811
1281
|
var i;
|
|
812
|
-
if (e[
|
|
1282
|
+
if (e[r] !== ((i = t[r]) !== null && i !== void 0 ? i : n[r]))
|
|
813
1283
|
return !1;
|
|
814
1284
|
}
|
|
815
1285
|
return !0;
|
|
816
|
-
},
|
|
817
|
-
var
|
|
818
|
-
for (var i in
|
|
819
|
-
var
|
|
1286
|
+
}, ye = (e) => (t) => {
|
|
1287
|
+
var n = e.defaultClassName, r = st(st({}, e.defaultVariants), t);
|
|
1288
|
+
for (var i in r) {
|
|
1289
|
+
var l, u = (l = r[i]) !== null && l !== void 0 ? l : e.defaultVariants[i];
|
|
820
1290
|
if (u != null) {
|
|
821
|
-
var
|
|
822
|
-
typeof
|
|
823
|
-
var
|
|
1291
|
+
var a = u;
|
|
1292
|
+
typeof a == "boolean" && (a = a === !0 ? "true" : "false");
|
|
1293
|
+
var c = (
|
|
824
1294
|
// @ts-expect-error
|
|
825
|
-
e.variantClassNames[i][
|
|
1295
|
+
e.variantClassNames[i][a]
|
|
826
1296
|
);
|
|
827
|
-
|
|
1297
|
+
c && (n += " " + c);
|
|
828
1298
|
}
|
|
829
1299
|
}
|
|
830
|
-
for (var [
|
|
831
|
-
|
|
832
|
-
return
|
|
833
|
-
},
|
|
834
|
-
const
|
|
1300
|
+
for (var [v, g] of e.compoundVariants)
|
|
1301
|
+
Kn(v, r, e.defaultVariants) && (n += " " + g);
|
|
1302
|
+
return n;
|
|
1303
|
+
}, Fn = ye({ defaultClassName: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy0", variantClassNames: { disabled: { true: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy1", false: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy2" }, kind: { default: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy3", link: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy4", confirm: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy5", delete: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy6", key: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy7", icon: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy8" }, spinning: { true: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy9", false: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxya" } }, defaultVariants: { disabled: !1, kind: "default", spinning: !1 }, compoundVariants: [[{ kind: "icon", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyb"], [{ kind: "default", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyc"], [{ kind: "confirm", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyd"], [{ kind: "delete", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxye"], [{ kind: "key", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyf"], [{ disabled: !0, spinning: !1 }, "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyg"], [{ kind: "link", disabled: !0 }, "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyh"]] }), Vn = ye({ defaultClassName: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyi", variantClassNames: { disabled: { true: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyj", false: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyk" }, kind: { icon: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyl", default: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxym", delete: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyn", key: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyo", confirm: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyp", link: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyq" }, spinning: { true: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyr", false: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxys" } }, defaultVariants: { disabled: !1, kind: "default", spinning: !1 }, compoundVariants: [] }), Un = ye({ defaultClassName: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyt", variantClassNames: { spinning: { true: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyu", false: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyv" }, kind: { icon: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyw", default: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyx", delete: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyy", key: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxyz", confirm: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy10", link: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy11" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] }), it = "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy12", Rn = ye({ defaultClassName: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy13", variantClassNames: { spinning: { true: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy14", false: "pkg_sps-woodland_buttons__version_8_42_2__hash_125pcxy15" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] });
|
|
1304
|
+
const Tt = f.forwardRef(
|
|
835
1305
|
({
|
|
836
1306
|
as: e,
|
|
837
1307
|
onClick: t,
|
|
838
|
-
onPress:
|
|
839
|
-
children:
|
|
1308
|
+
onPress: n,
|
|
1309
|
+
children: r,
|
|
840
1310
|
className: i,
|
|
841
|
-
isDisabled:
|
|
1311
|
+
isDisabled: l,
|
|
842
1312
|
disabled: u,
|
|
843
|
-
href:
|
|
844
|
-
icon:
|
|
845
|
-
kind:
|
|
846
|
-
spinning:
|
|
847
|
-
spinningTitle:
|
|
848
|
-
title:
|
|
849
|
-
...
|
|
850
|
-
},
|
|
851
|
-
const
|
|
852
|
-
onPress:
|
|
1313
|
+
href: a,
|
|
1314
|
+
icon: c,
|
|
1315
|
+
kind: v = "default",
|
|
1316
|
+
spinning: g,
|
|
1317
|
+
spinningTitle: k,
|
|
1318
|
+
title: C,
|
|
1319
|
+
...L
|
|
1320
|
+
}, N) => {
|
|
1321
|
+
const h = e ?? (a ? "a" : "button"), $ = {
|
|
1322
|
+
onPress: n ?? t,
|
|
853
1323
|
// the button element should be disabled if the button is marked as disabled or spinning
|
|
854
|
-
isDisabled: u ??
|
|
855
|
-
...
|
|
856
|
-
}, { "data-testid":
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
), { hoverProps: S } =
|
|
860
|
-
...
|
|
861
|
-
ref:
|
|
862
|
-
title:
|
|
863
|
-
className:
|
|
864
|
-
...
|
|
865
|
-
...
|
|
866
|
-
}, { t:
|
|
1324
|
+
isDisabled: u ?? l ?? g,
|
|
1325
|
+
...L
|
|
1326
|
+
}, { "data-testid": w } = L, T = f.useRef(null), O = N || T, { buttonProps: B } = In(
|
|
1327
|
+
$,
|
|
1328
|
+
O
|
|
1329
|
+
), { hoverProps: S } = An({ isDisabled: $.isDisabled }), { type: $e, ...I } = B, Ee = {
|
|
1330
|
+
...j(I, S),
|
|
1331
|
+
ref: O,
|
|
1332
|
+
title: C,
|
|
1333
|
+
className: a ? Un({ spinning: g, kind: v }) : Vn({ disabled: l || u, kind: v, spinning: g }),
|
|
1334
|
+
...a ? { href: a } : { type: $e },
|
|
1335
|
+
...L
|
|
1336
|
+
}, { t: A } = Ct(), R = c && (c === "ai-color" ? (
|
|
867
1337
|
// ai-color can only be used on default or link buttons for contrast/accessibility reasons
|
|
868
1338
|
// if the user tries to use ai-color on a non-approved button swap it out for the regular ai icon
|
|
869
|
-
/* @__PURE__ */
|
|
870
|
-
|
|
1339
|
+
/* @__PURE__ */ f.createElement(
|
|
1340
|
+
Re,
|
|
871
1341
|
{
|
|
872
|
-
className:
|
|
873
|
-
icon:
|
|
1342
|
+
className: it,
|
|
1343
|
+
icon: v === "default" || v === "link" ? "ai-color" : "ai",
|
|
874
1344
|
"aria-hidden": "true",
|
|
875
|
-
"data-testid": `${
|
|
1345
|
+
"data-testid": `${w}__${c}-icon`
|
|
876
1346
|
}
|
|
877
1347
|
)
|
|
878
|
-
) : /* @__PURE__ */
|
|
879
|
-
|
|
1348
|
+
) : /* @__PURE__ */ f.createElement(
|
|
1349
|
+
Re,
|
|
880
1350
|
{
|
|
881
|
-
className:
|
|
882
|
-
icon:
|
|
1351
|
+
className: it,
|
|
1352
|
+
icon: c,
|
|
883
1353
|
"aria-hidden": "true",
|
|
884
|
-
"data-testid": `${
|
|
1354
|
+
"data-testid": `${w}__${c}-icon`
|
|
885
1355
|
}
|
|
886
1356
|
));
|
|
887
|
-
let
|
|
888
|
-
|
|
889
|
-
const
|
|
890
|
-
|
|
1357
|
+
let F;
|
|
1358
|
+
v === "default" || v === "icon" || v === "link" ? F = "dark" : F = "light";
|
|
1359
|
+
const ee = g && /* @__PURE__ */ f.createElement(
|
|
1360
|
+
Bt,
|
|
891
1361
|
{
|
|
892
|
-
color:
|
|
893
|
-
className:
|
|
894
|
-
title:
|
|
895
|
-
"data-testid": `${
|
|
1362
|
+
color: F,
|
|
1363
|
+
className: Rn({ spinning: g }),
|
|
1364
|
+
title: k || A("button.spinningTitle", { defaultValue: "Loading..." }),
|
|
1365
|
+
"data-testid": `${w}__spinner`
|
|
896
1366
|
}
|
|
897
1367
|
);
|
|
898
|
-
return /* @__PURE__ */
|
|
1368
|
+
return /* @__PURE__ */ f.createElement(Dt, null, /* @__PURE__ */ f.createElement(
|
|
899
1369
|
"div",
|
|
900
1370
|
{
|
|
901
|
-
className:
|
|
902
|
-
|
|
903
|
-
disabled:
|
|
904
|
-
kind:
|
|
905
|
-
spinning:
|
|
1371
|
+
className: St(
|
|
1372
|
+
Fn({
|
|
1373
|
+
disabled: l || u,
|
|
1374
|
+
kind: v,
|
|
1375
|
+
spinning: g
|
|
906
1376
|
}),
|
|
907
1377
|
i
|
|
908
1378
|
)
|
|
909
1379
|
},
|
|
910
|
-
/* @__PURE__ */
|
|
1380
|
+
/* @__PURE__ */ f.createElement(h, { ...Ee }, R, r ? /* @__PURE__ */ f.createElement("span", null, r) : "", ee)
|
|
911
1381
|
));
|
|
912
1382
|
}
|
|
913
1383
|
);
|
|
914
|
-
|
|
1384
|
+
Lt.set(Tt, {
|
|
915
1385
|
name: "Button",
|
|
916
1386
|
props: {
|
|
917
1387
|
disabled: "boolean",
|
|
@@ -934,17 +1404,17 @@ Ve.set(Fe, {
|
|
|
934
1404
|
},
|
|
935
1405
|
panellable: !0
|
|
936
1406
|
});
|
|
937
|
-
const
|
|
938
|
-
components: [
|
|
939
|
-
description: () => /* @__PURE__ */
|
|
1407
|
+
const Hn = {
|
|
1408
|
+
components: [Tt],
|
|
1409
|
+
description: () => /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("div", { className: "sps-body-14" }, "Buttons are used to initiate events or actions. The labels and/or icons describe what the button will do."), /* @__PURE__ */ f.createElement("br", null), /* @__PURE__ */ f.createElement("h5", null, "Variants"), /* @__PURE__ */ f.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ f.createElement("span", { className: "sps-text-semibold" }, "Default: "), "For tertiary actions or actions of lower importance on a page."), /* @__PURE__ */ f.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ f.createElement("span", { className: "sps-text-semibold" }, "Key: "), "For primary or important actions on a page."), /* @__PURE__ */ f.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ f.createElement("span", { className: "sps-text-semibold" }, "Confirm: "), "For the main call to action on a page. There should only be one Confirm button per screen."), /* @__PURE__ */ f.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ f.createElement("span", { className: "sps-text-semibold" }, "Delete: "), "For deleting information or another destructive action. These should always be paired with a Delete Confirmation Modal."), /* @__PURE__ */ f.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ f.createElement("span", { className: "sps-text-semibold" }, "Disabled: "), "For actions that are not permitted in a particular state. These can be accompanied by a Tooltip on hover describing why it’s disabled."), /* @__PURE__ */ f.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ f.createElement("span", { className: "sps-text-semibold" }, "With an Icon: "), "For further illustrating the action. Example: Pencil icon in an Edit button. There can also be Icon Buttons without text.")),
|
|
940
1410
|
examples: {
|
|
941
1411
|
basic: {
|
|
942
1412
|
label: "Basic Buttons",
|
|
943
|
-
description: ({ NavigateTo: e }) => /* @__PURE__ */
|
|
1413
|
+
description: ({ NavigateTo: e }) => /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("p", null, "The most common type of button that can be used in most cases. Example: Basic Buttons in a ", /* @__PURE__ */ f.createElement(e, { to: "modals" }, "Modal"), ".")),
|
|
944
1414
|
examples: {
|
|
945
1415
|
withoutIcons: {
|
|
946
1416
|
description: "Without Icons",
|
|
947
|
-
react:
|
|
1417
|
+
react: E`
|
|
948
1418
|
import { Button } from "@sps-woodland/buttons";
|
|
949
1419
|
import { sprinkles } from "@sps-woodland/tokens";
|
|
950
1420
|
|
|
@@ -963,7 +1433,7 @@ const Nt = {
|
|
|
963
1433
|
},
|
|
964
1434
|
withIcons: {
|
|
965
1435
|
description: "With Icons",
|
|
966
|
-
react:
|
|
1436
|
+
react: E`
|
|
967
1437
|
import { Button } from "@sps-woodland/buttons";
|
|
968
1438
|
import { sprinkles } from "@sps-woodland/tokens";
|
|
969
1439
|
|
|
@@ -982,7 +1452,7 @@ const Nt = {
|
|
|
982
1452
|
},
|
|
983
1453
|
spinning: {
|
|
984
1454
|
description: "Spinning",
|
|
985
|
-
react:
|
|
1455
|
+
react: E`
|
|
986
1456
|
import { Button } from "@sps-woodland/buttons";
|
|
987
1457
|
import { sprinkles } from "@sps-woodland/tokens";
|
|
988
1458
|
|
|
@@ -1006,7 +1476,7 @@ const Nt = {
|
|
|
1006
1476
|
examples: {
|
|
1007
1477
|
withoutIcons: {
|
|
1008
1478
|
description: "Without Icons",
|
|
1009
|
-
react:
|
|
1479
|
+
react: E`
|
|
1010
1480
|
import { Dropdown, OptionList, Option } from "@sps-woodland/dropdowns";
|
|
1011
1481
|
|
|
1012
1482
|
function Component() {
|
|
@@ -1044,7 +1514,7 @@ const Nt = {
|
|
|
1044
1514
|
},
|
|
1045
1515
|
withIcons: {
|
|
1046
1516
|
description: "With Icons",
|
|
1047
|
-
react:
|
|
1517
|
+
react: E`
|
|
1048
1518
|
import { Dropdown, OptionList, Option } from "@sps-woodland/dropdowns";
|
|
1049
1519
|
|
|
1050
1520
|
function Component() {
|
|
@@ -1082,7 +1552,7 @@ const Nt = {
|
|
|
1082
1552
|
},
|
|
1083
1553
|
spinning: {
|
|
1084
1554
|
description: "Spinning",
|
|
1085
|
-
react:
|
|
1555
|
+
react: E`
|
|
1086
1556
|
import { Dropdown, OptionList, Option } from "@sps-woodland/dropdowns";
|
|
1087
1557
|
|
|
1088
1558
|
function Component() {
|
|
@@ -1121,7 +1591,7 @@ const Nt = {
|
|
|
1121
1591
|
examples: {
|
|
1122
1592
|
withoutIcons: {
|
|
1123
1593
|
description: "Without Icons",
|
|
1124
|
-
react:
|
|
1594
|
+
react: E`
|
|
1125
1595
|
import { SpsSplitButton } from "@spscommerce/ds-react";
|
|
1126
1596
|
|
|
1127
1597
|
function Component() {
|
|
@@ -1154,7 +1624,7 @@ const Nt = {
|
|
|
1154
1624
|
},
|
|
1155
1625
|
withIcons: {
|
|
1156
1626
|
description: "With Icons",
|
|
1157
|
-
react:
|
|
1627
|
+
react: E`
|
|
1158
1628
|
import { SpsSplitButton } from "@spscommerce/ds-react";
|
|
1159
1629
|
|
|
1160
1630
|
function Component() {
|
|
@@ -1203,11 +1673,11 @@ const Nt = {
|
|
|
1203
1673
|
},
|
|
1204
1674
|
iconButtons: {
|
|
1205
1675
|
label: "Icon Buttons",
|
|
1206
|
-
description: ({ NavigateTo: e, Link: t }) => /* @__PURE__ */
|
|
1676
|
+
description: ({ NavigateTo: e, Link: t }) => /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("p", null, "Use these for quick actions that can clearly be articulated by the use of an icon. Example: A Print button in the", " ", /* @__PURE__ */ f.createElement(e, { to: "list-action-bar" }, "List Action Bar"), ". Do not use an icon that doesn't have a universally understood meaning; instead use a Basic Button or a Basic Button with an icon. ", /* @__PURE__ */ f.createElement(t, { to: "/style-and-layout/icons/" }, "View All Icons"))),
|
|
1207
1677
|
examples: {
|
|
1208
1678
|
standard: {
|
|
1209
1679
|
description: "Standard Icon Buttons",
|
|
1210
|
-
react:
|
|
1680
|
+
react: E`
|
|
1211
1681
|
import { Button } from "@sps-woodland/buttons";
|
|
1212
1682
|
import { sprinkles } from "@sps-woodland/tokens";
|
|
1213
1683
|
|
|
@@ -1229,8 +1699,8 @@ const Nt = {
|
|
|
1229
1699
|
`
|
|
1230
1700
|
},
|
|
1231
1701
|
dropdown: {
|
|
1232
|
-
description: ({ NavigateTo: e }) => /* @__PURE__ */
|
|
1233
|
-
react:
|
|
1702
|
+
description: ({ NavigateTo: e }) => /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("h5", null, "Dropdown Icon Buttons"), /* @__PURE__ */ f.createElement("p", null, "Use these when there are several options available for action. Example: Dropdown Icon Button in a ", /* @__PURE__ */ f.createElement(e, { to: "content-rows" }, "Content Row"), ".")),
|
|
1703
|
+
react: E`
|
|
1234
1704
|
import { SpsDropdown } from "@spscommerce/ds-react";
|
|
1235
1705
|
|
|
1236
1706
|
function Component() {
|
|
@@ -1248,7 +1718,7 @@ const Nt = {
|
|
|
1248
1718
|
},
|
|
1249
1719
|
spinner: {
|
|
1250
1720
|
description: "Spinner",
|
|
1251
|
-
react:
|
|
1721
|
+
react: E`
|
|
1252
1722
|
import { Button } from "@sps-woodland/buttons";
|
|
1253
1723
|
|
|
1254
1724
|
function Component() {
|
|
@@ -1264,11 +1734,11 @@ const Nt = {
|
|
|
1264
1734
|
},
|
|
1265
1735
|
textButtons: {
|
|
1266
1736
|
label: "Text Buttons",
|
|
1267
|
-
description: ({ NavigateTo: e }) => /* @__PURE__ */
|
|
1737
|
+
description: ({ NavigateTo: e }) => /* @__PURE__ */ f.createElement("p", null, "Use for less important actions, or ones that aren't taken as frequently. They should not appear inline with other copy. Example: Advanced Search button in the", " ", /* @__PURE__ */ f.createElement(e, { to: "list-toolbar" }, "List Toolbar")),
|
|
1268
1738
|
examples: {
|
|
1269
1739
|
withoutIcons: {
|
|
1270
1740
|
description: "Without Icons",
|
|
1271
|
-
react:
|
|
1741
|
+
react: E`
|
|
1272
1742
|
import { Button } from "@sps-woodland/buttons";
|
|
1273
1743
|
import { sprinkles } from "@sps-woodland/tokens";
|
|
1274
1744
|
|
|
@@ -1285,7 +1755,7 @@ const Nt = {
|
|
|
1285
1755
|
},
|
|
1286
1756
|
withIcons: {
|
|
1287
1757
|
description: "With Icons",
|
|
1288
|
-
react:
|
|
1758
|
+
react: E`
|
|
1289
1759
|
import { Button } from "@sps-woodland/buttons";
|
|
1290
1760
|
import { sprinkles } from "@sps-woodland/tokens";
|
|
1291
1761
|
|
|
@@ -1302,7 +1772,7 @@ const Nt = {
|
|
|
1302
1772
|
},
|
|
1303
1773
|
spinner: {
|
|
1304
1774
|
description: "Spinner",
|
|
1305
|
-
react:
|
|
1775
|
+
react: E`
|
|
1306
1776
|
import { Button } from "@sps-woodland/buttons";
|
|
1307
1777
|
|
|
1308
1778
|
function Component() {
|
|
@@ -1318,10 +1788,10 @@ const Nt = {
|
|
|
1318
1788
|
},
|
|
1319
1789
|
submitButtons: {
|
|
1320
1790
|
label: "Submit Buttons",
|
|
1321
|
-
description: ({ NavigateTo: e }) => /* @__PURE__ */
|
|
1791
|
+
description: ({ NavigateTo: e }) => /* @__PURE__ */ f.createElement("p", null, "Use to submit a form. There can be a number of visual variations, for example a", " ", /* @__PURE__ */ f.createElement(e, { to: "modals" }, "Modal"), " uses Basic Button (Key) as its Submit Button."),
|
|
1322
1792
|
examples: {
|
|
1323
1793
|
basic: {
|
|
1324
|
-
react:
|
|
1794
|
+
react: E`
|
|
1325
1795
|
import { Button } from "@sps-woodland/buttons";
|
|
1326
1796
|
import { sprinkles } from "@sps-woodland/tokens";
|
|
1327
1797
|
|
|
@@ -1349,7 +1819,7 @@ const Nt = {
|
|
|
1349
1819
|
description: "Used to link to another page, such as an external website. They may open in the same window or in a new one. It should only be used when a Text Button doesn't provide enough visual emphasis.",
|
|
1350
1820
|
examples: {
|
|
1351
1821
|
basic: {
|
|
1352
|
-
react:
|
|
1822
|
+
react: E`
|
|
1353
1823
|
import { Button } from "@sps-woodland/buttons";
|
|
1354
1824
|
|
|
1355
1825
|
function Component() {
|
|
@@ -1367,11 +1837,11 @@ const Nt = {
|
|
|
1367
1837
|
},
|
|
1368
1838
|
buttonGroups: {
|
|
1369
1839
|
label: "Button Groups",
|
|
1370
|
-
description: ({ NavigateTo: e }) => /* @__PURE__ */
|
|
1840
|
+
description: ({ NavigateTo: e }) => /* @__PURE__ */ f.createElement("p", null, "Use button groups when there are a number of actions that can be taken in a view. When there are multiple button types in a group, they are separated using dividers. Example: Button groups in ", /* @__PURE__ */ f.createElement(e, { to: "List Action Bar" }, "List Action Bar"), "."),
|
|
1371
1841
|
examples: {
|
|
1372
1842
|
basic: {
|
|
1373
1843
|
description: "Basic Button Groups",
|
|
1374
|
-
react:
|
|
1844
|
+
react: E`
|
|
1375
1845
|
import { Button } from "@sps-woodland/buttons";
|
|
1376
1846
|
import { sprinkles } from "@sps-woodland/tokens";
|
|
1377
1847
|
|
|
@@ -1387,7 +1857,7 @@ const Nt = {
|
|
|
1387
1857
|
},
|
|
1388
1858
|
icon: {
|
|
1389
1859
|
description: "Icon Button Groups",
|
|
1390
|
-
react:
|
|
1860
|
+
react: E`
|
|
1391
1861
|
import { Button } from "@sps-woodland/buttons";
|
|
1392
1862
|
|
|
1393
1863
|
function Component() {
|
|
@@ -1402,7 +1872,7 @@ const Nt = {
|
|
|
1402
1872
|
},
|
|
1403
1873
|
textAndIcons: {
|
|
1404
1874
|
description: "Text Buttons + Icon Buttons Group",
|
|
1405
|
-
react:
|
|
1875
|
+
react: E`
|
|
1406
1876
|
import { Button } from "@sps-woodland/buttons";
|
|
1407
1877
|
import { sprinkles } from "@sps-woodland/tokens";
|
|
1408
1878
|
import { VericalRule } from "@sps-woodland/core";
|
|
@@ -1421,7 +1891,7 @@ const Nt = {
|
|
|
1421
1891
|
},
|
|
1422
1892
|
textAndBasic: {
|
|
1423
1893
|
description: "Text Buttons + Basic Buttons Group",
|
|
1424
|
-
react:
|
|
1894
|
+
react: E`
|
|
1425
1895
|
import { Button } from "@sps-woodland/buttons";
|
|
1426
1896
|
import { sprinkles } from "@sps-woodland/tokens";
|
|
1427
1897
|
import { VericalRule } from "@sps-woodland/core";
|
|
@@ -1441,7 +1911,7 @@ const Nt = {
|
|
|
1441
1911
|
},
|
|
1442
1912
|
iconsAndBasic: {
|
|
1443
1913
|
description: "Icon Buttons + Basic Buttons Group",
|
|
1444
|
-
react:
|
|
1914
|
+
react: E`
|
|
1445
1915
|
import { Button } from "@sps-woodland/buttons";
|
|
1446
1916
|
import { sprinkles } from "@sps-woodland/tokens";
|
|
1447
1917
|
import { VericalRule } from "@sps-woodland/core";
|
|
@@ -1462,7 +1932,7 @@ const Nt = {
|
|
|
1462
1932
|
},
|
|
1463
1933
|
textIconsAndBasic: {
|
|
1464
1934
|
description: "Text Buttons + Icon Buttons + Basic Buttons Group",
|
|
1465
|
-
react:
|
|
1935
|
+
react: E`
|
|
1466
1936
|
import { Button } from "@sps-woodland/buttons";
|
|
1467
1937
|
import { sprinkles } from "@sps-woodland/tokens";
|
|
1468
1938
|
import { VericalRule } from "@sps-woodland/core";
|
|
@@ -1486,10 +1956,10 @@ const Nt = {
|
|
|
1486
1956
|
}
|
|
1487
1957
|
}
|
|
1488
1958
|
}
|
|
1489
|
-
},
|
|
1490
|
-
Buttons:
|
|
1959
|
+
}, qn = {
|
|
1960
|
+
Buttons: Hn
|
|
1491
1961
|
};
|
|
1492
1962
|
export {
|
|
1493
|
-
|
|
1494
|
-
|
|
1963
|
+
Tt as Button,
|
|
1964
|
+
qn as MANIFEST
|
|
1495
1965
|
};
|