@sps-woodland/buttons 8.7.4 → 8.7.5

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.es.js CHANGED
@@ -1,61 +1,61 @@
1
1
  import * as c from "react";
2
- import Ne, { useRef as re, useCallback as Q, useEffect as ee, useState as Oe, useMemo as De, useContext as je } from "react";
3
- import { Metadata as Ye, I18nContext as ze, Spinner as Xe, cl as qe, Icon as Je } from "@sps-woodland/core";
4
- import { useFocusable as Qe, FocusRing as Ze } from "@react-aria/focus";
2
+ import Te, { useRef as Q, useCallback as Y, useEffect as X, useState as Be, useMemo as $e, useContext as Ke } from "react";
3
+ import { Metadata as Ae, I18nContext as Le, Spinner as Me, cl as Fe, Icon as Ue } from "@sps-woodland/core";
4
+ import { useFocusable as He, FocusRing as Re } from "@react-aria/focus";
5
5
  import { code as y } from "@spscommerce/utils";
6
- function Le(e) {
7
- var t, r, o = "";
8
- if (typeof e == "string" || typeof e == "number")
9
- o += e;
10
- else if (typeof e == "object")
11
- if (Array.isArray(e)) {
12
- var i = e.length;
13
- for (t = 0; t < i; t++)
14
- e[t] && (r = Le(e[t])) && (o && (o += " "), o += r);
15
- } else
16
- for (r in e)
17
- e[r] && (o && (o += " "), o += r);
18
- return o;
19
- }
20
- function et() {
21
- for (var e, t, r = 0, o = "", i = arguments.length; r < i; r++)
22
- (e = arguments[r]) && (t = Le(e)) && (o && (o += " "), o += t);
23
- return o;
24
- }
25
- const Ce = typeof document < "u" ? Ne.useLayoutEffect : () => {
6
+ const Pe = typeof document < "u" ? Te.useLayoutEffect : () => {
26
7
  };
27
- function R(e) {
28
- const t = re(null);
29
- return Ce(() => {
8
+ function F(e) {
9
+ const t = Q(null);
10
+ return Pe(() => {
30
11
  t.current = e;
31
12
  }, [
32
13
  e
33
- ]), Q((...r) => {
14
+ ]), Y((...r) => {
34
15
  const o = t.current;
35
16
  return o == null ? void 0 : o(...r);
36
17
  }, []);
37
18
  }
38
- let ye = /* @__PURE__ */ new Map();
39
- function tt(e, t) {
19
+ let de = /* @__PURE__ */ new Map();
20
+ function Ge(e, t) {
40
21
  if (e === t)
41
22
  return e;
42
- let r = ye.get(e);
23
+ let r = de.get(e);
43
24
  if (r)
44
25
  return r(t), t;
45
- let o = ye.get(t);
26
+ let o = de.get(t);
46
27
  return o ? (o(e), e) : t;
47
28
  }
48
- function _e(...e) {
29
+ function we(...e) {
49
30
  return (...t) => {
50
31
  for (let r of e)
51
32
  typeof r == "function" && r(...t);
52
33
  };
53
34
  }
54
- const D = (e) => {
35
+ const _ = (e) => {
55
36
  var t;
56
37
  return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
57
- }, H = (e) => e && "window" in e && e.window === e ? e : D(e).defaultView || window;
58
- function W(...e) {
38
+ }, se = (e) => e && "window" in e && e.window === e ? e : _(e).defaultView || window;
39
+ function xe(e) {
40
+ var t, r, o = "";
41
+ if (typeof e == "string" || typeof e == "number")
42
+ o += e;
43
+ else if (typeof e == "object")
44
+ if (Array.isArray(e)) {
45
+ var i = e.length;
46
+ for (t = 0; t < i; t++)
47
+ e[t] && (r = xe(e[t])) && (o && (o += " "), o += r);
48
+ } else
49
+ for (r in e)
50
+ e[r] && (o && (o += " "), o += r);
51
+ return o;
52
+ }
53
+ function Ve() {
54
+ for (var e, t, r = 0, o = "", i = arguments.length; r < i; r++)
55
+ (e = arguments[r]) && (t = xe(e)) && (o && (o += " "), o += t);
56
+ return o;
57
+ }
58
+ function H(...e) {
59
59
  let t = {
60
60
  ...e[0]
61
61
  };
@@ -63,58 +63,62 @@ function W(...e) {
63
63
  let o = e[r];
64
64
  for (let i in o) {
65
65
  let d = t[i], u = o[i];
66
- typeof d == "function" && typeof u == "function" && i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= 65 && i.charCodeAt(2) <= 90 ? t[i] = _e(d, u) : (i === "className" || i === "UNSAFE_className") && typeof d == "string" && typeof u == "string" ? t[i] = et(d, u) : i === "id" && d && u ? t.id = tt(d, u) : t[i] = u !== void 0 ? u : d;
66
+ typeof d == "function" && typeof u == "function" && // This is a lot faster than a regex.
67
+ i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= /* 'A' */
68
+ 65 && i.charCodeAt(2) <= /* 'Z' */
69
+ 90 ? t[i] = we(d, u) : (i === "className" || i === "UNSAFE_className") && typeof d == "string" && typeof u == "string" ? t[i] = Ve(d, u) : i === "id" && d && u ? t.id = Ge(d, u) : t[i] = u !== void 0 ? u : d;
67
70
  }
68
71
  }
69
72
  return t;
70
73
  }
71
- const nt = /* @__PURE__ */ new Set([
74
+ const We = /* @__PURE__ */ new Set([
72
75
  "id"
73
- ]), rt = /* @__PURE__ */ new Set([
76
+ ]), je = /* @__PURE__ */ new Set([
74
77
  "aria-label",
75
78
  "aria-labelledby",
76
79
  "aria-describedby",
77
80
  "aria-details"
78
- ]), ot = /* @__PURE__ */ new Set([
81
+ ]), Ye = /* @__PURE__ */ new Set([
79
82
  "href",
83
+ "hrefLang",
80
84
  "target",
81
85
  "rel",
82
86
  "download",
83
87
  "ping",
84
88
  "referrerPolicy"
85
- ]), st = /^(data-.*)$/;
86
- function it(e, t = {}) {
89
+ ]), ze = /^(data-.*)$/;
90
+ function Xe(e, t = {}) {
87
91
  let { labelable: r, isLink: o, propNames: i } = t, d = {};
88
92
  for (const u in e)
89
- Object.prototype.hasOwnProperty.call(e, u) && (nt.has(u) || r && rt.has(u) || o && ot.has(u) || (i == null ? void 0 : i.has(u)) || st.test(u)) && (d[u] = e[u]);
93
+ Object.prototype.hasOwnProperty.call(e, u) && (We.has(u) || r && je.has(u) || o && Ye.has(u) || i != null && i.has(u) || ze.test(u)) && (d[u] = e[u]);
90
94
  return d;
91
95
  }
92
- function G(e) {
93
- if (at())
96
+ function U(e) {
97
+ if (qe())
94
98
  e.focus({
95
99
  preventScroll: !0
96
100
  });
97
101
  else {
98
- let t = lt(e);
99
- e.focus(), ut(t);
102
+ let t = Je(e);
103
+ e.focus(), Qe(t);
100
104
  }
101
105
  }
102
- let z = null;
103
- function at() {
104
- if (z == null) {
105
- z = !1;
106
+ let G = null;
107
+ function qe() {
108
+ if (G == null) {
109
+ G = !1;
106
110
  try {
107
111
  document.createElement("div").focus({
108
112
  get preventScroll() {
109
- return z = !0, !0;
113
+ return G = !0, !0;
110
114
  }
111
115
  });
112
116
  } catch {
113
117
  }
114
118
  }
115
- return z;
119
+ return G;
116
120
  }
117
- function lt(e) {
121
+ function Je(e) {
118
122
  let t = e.parentNode, r = [], o = document.scrollingElement || document.documentElement;
119
123
  for (; t instanceof HTMLElement && t !== o; )
120
124
  (t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && r.push({
@@ -128,47 +132,48 @@ function lt(e) {
128
132
  scrollLeft: o.scrollLeft
129
133
  }), r;
130
134
  }
131
- function ut(e) {
135
+ function Qe(e) {
132
136
  for (let { element: t, scrollTop: r, scrollLeft: o } of e)
133
137
  t.scrollTop = r, t.scrollLeft = o;
134
138
  }
135
- function oe(e) {
139
+ function Z(e) {
136
140
  var t;
137
141
  return typeof window > "u" || window.navigator == null ? !1 : ((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands.some((r) => e.test(r.brand))) || e.test(window.navigator.userAgent);
138
142
  }
139
- function be(e) {
143
+ function ue(e) {
140
144
  var t;
141
145
  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;
142
146
  }
143
- function j() {
144
- return be(/^Mac/i);
147
+ function q() {
148
+ return ue(/^Mac/i);
145
149
  }
146
- function ct() {
147
- return be(/^iPhone/i);
150
+ function Ze() {
151
+ return ue(/^iPhone/i);
148
152
  }
149
- function Ke() {
150
- return be(/^iPad/i) || j() && navigator.maxTouchPoints > 1;
153
+ function Se() {
154
+ return ue(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
155
+ q() && navigator.maxTouchPoints > 1;
151
156
  }
152
- function Ie() {
153
- return ct() || Ke();
157
+ function Ne() {
158
+ return Ze() || Se();
154
159
  }
155
- function dt() {
156
- return oe(/AppleWebKit/i) && !pt();
160
+ function et() {
161
+ return Z(/AppleWebKit/i) && !tt();
157
162
  }
158
- function pt() {
159
- return oe(/Chrome/i);
163
+ function tt() {
164
+ return Z(/Chrome/i);
160
165
  }
161
- function Ae() {
162
- return oe(/Android/i);
166
+ function Oe() {
167
+ return Z(/Android/i);
163
168
  }
164
- function ft() {
165
- return oe(/Firefox/i);
169
+ function nt() {
170
+ return Z(/Firefox/i);
166
171
  }
167
- function Y(e, t, r = !0) {
172
+ function R(e, t, r = !0) {
168
173
  var o, i;
169
174
  let { metaKey: d, ctrlKey: u, altKey: p, shiftKey: b } = t;
170
- ft() && ((i = window.event) === null || i === void 0 || (o = i.type) === null || o === void 0 ? void 0 : o.startsWith("key")) && e.target === "_blank" && (j() ? d = !0 : u = !0);
171
- let E = dt() && j() && !Ke() ? new KeyboardEvent("keydown", {
175
+ nt() && (!((i = window.event) === null || i === void 0 || (o = i.type) === null || o === void 0) && o.startsWith("key")) && e.target === "_blank" && (q() ? d = !0 : u = !0);
176
+ let k = et() && q() && !Se() ? new KeyboardEvent("keydown", {
172
177
  keyIdentifier: "Enter",
173
178
  metaKey: d,
174
179
  ctrlKey: u,
@@ -182,11 +187,11 @@ function Y(e, t, r = !0) {
182
187
  bubbles: !0,
183
188
  cancelable: !0
184
189
  });
185
- Y.isOpening = r, G(e), e.dispatchEvent(E), Y.isOpening = !1;
190
+ R.isOpening = r, U(e), e.dispatchEvent(k), R.isOpening = !1;
186
191
  }
187
- Y.isOpening = !1;
188
- let F = /* @__PURE__ */ new Map(), ce = /* @__PURE__ */ new Set();
189
- function he() {
192
+ R.isOpening = !1;
193
+ let L = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Set();
194
+ function pe() {
190
195
  if (typeof window > "u")
191
196
  return;
192
197
  function e(o) {
@@ -195,32 +200,32 @@ function he() {
195
200
  let t = (o) => {
196
201
  if (!e(o) || !o.target)
197
202
  return;
198
- let i = F.get(o.target);
199
- i || (i = /* @__PURE__ */ new Set(), F.set(o.target, i), o.target.addEventListener("transitioncancel", r, {
203
+ let i = L.get(o.target);
204
+ i || (i = /* @__PURE__ */ new Set(), L.set(o.target, i), o.target.addEventListener("transitioncancel", r, {
200
205
  once: !0
201
206
  })), i.add(o.propertyName);
202
207
  }, r = (o) => {
203
208
  if (!e(o) || !o.target)
204
209
  return;
205
- let i = F.get(o.target);
206
- if (!!i && (i.delete(o.propertyName), i.size === 0 && (o.target.removeEventListener("transitioncancel", r), F.delete(o.target)), F.size === 0)) {
207
- for (let d of ce)
210
+ let i = L.get(o.target);
211
+ if (i && (i.delete(o.propertyName), i.size === 0 && (o.target.removeEventListener("transitioncancel", r), L.delete(o.target)), L.size === 0)) {
212
+ for (let d of ie)
208
213
  d();
209
- ce.clear();
214
+ ie.clear();
210
215
  }
211
216
  };
212
217
  document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", r);
213
218
  }
214
- typeof document < "u" && (document.readyState !== "loading" ? he() : document.addEventListener("DOMContentLoaded", he));
215
- function mt(e) {
219
+ typeof document < "u" && (document.readyState !== "loading" ? pe() : document.addEventListener("DOMContentLoaded", pe));
220
+ function rt(e) {
216
221
  requestAnimationFrame(() => {
217
- F.size === 0 ? e() : ce.add(e);
222
+ L.size === 0 ? e() : ie.add(e);
218
223
  });
219
224
  }
220
- function bt() {
221
- let e = re(/* @__PURE__ */ new Map()), t = Q((i, d, u, p) => {
222
- let b = p != null && p.once ? (...E) => {
223
- e.current.delete(u), u(...E);
225
+ function ot() {
226
+ let e = Q(/* @__PURE__ */ new Map()), t = Y((i, d, u, p) => {
227
+ let b = p != null && p.once ? (...k) => {
228
+ e.current.delete(u), u(...k);
224
229
  } : u;
225
230
  e.current.set(u, {
226
231
  type: d,
@@ -228,18 +233,18 @@ function bt() {
228
233
  fn: b,
229
234
  options: p
230
235
  }), i.addEventListener(d, u, p);
231
- }, []), r = Q((i, d, u, p) => {
236
+ }, []), r = Y((i, d, u, p) => {
232
237
  var b;
233
- let E = ((b = e.current.get(u)) === null || b === void 0 ? void 0 : b.fn) || u;
234
- i.removeEventListener(d, E, p), e.current.delete(u);
235
- }, []), o = Q(() => {
238
+ let k = ((b = e.current.get(u)) === null || b === void 0 ? void 0 : b.fn) || u;
239
+ i.removeEventListener(d, k, p), e.current.delete(u);
240
+ }, []), o = Y(() => {
236
241
  e.current.forEach((i, d) => {
237
242
  r(i.eventTarget, i.type, d, i.options);
238
243
  });
239
244
  }, [
240
245
  r
241
246
  ]);
242
- return ee(() => o, [
247
+ return X(() => o, [
243
248
  o
244
249
  ]), {
245
250
  addGlobalListener: t,
@@ -247,40 +252,73 @@ function bt() {
247
252
  removeAllGlobalListeners: o
248
253
  };
249
254
  }
250
- function gt(e, t) {
251
- Ce(() => {
255
+ function st(e, t) {
256
+ Pe(() => {
252
257
  if (e && e.ref && t)
253
258
  return e.ref.current = t.current, () => {
254
259
  e.ref && (e.ref.current = null);
255
260
  };
256
261
  });
257
262
  }
258
- function de(e) {
259
- return e.mozInputSource === 0 && e.isTrusted ? !0 : Ae() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
263
+ function fe(e) {
264
+ return e.mozInputSource === 0 && e.isTrusted ? !0 : Oe() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
265
+ }
266
+ function it(e) {
267
+ return !Oe() && e.width === 0 && e.height === 0 || e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse";
268
+ }
269
+ let M = "default", ae = "", z = /* @__PURE__ */ new WeakMap();
270
+ function me(e) {
271
+ if (Ne()) {
272
+ if (M === "default") {
273
+ const t = _(e);
274
+ ae = t.documentElement.style.webkitUserSelect, t.documentElement.style.webkitUserSelect = "none";
275
+ }
276
+ M = "disabled";
277
+ } else
278
+ (e instanceof HTMLElement || e instanceof SVGElement) && (z.set(e, e.style.userSelect), e.style.userSelect = "none");
260
279
  }
261
- function vt(e) {
262
- return !Ae() && e.width === 0 && e.height === 0 || e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse";
280
+ function V(e) {
281
+ if (Ne()) {
282
+ if (M !== "disabled")
283
+ return;
284
+ M = "restoring", setTimeout(() => {
285
+ rt(() => {
286
+ if (M === "restoring") {
287
+ const t = _(e);
288
+ t.documentElement.style.webkitUserSelect === "none" && (t.documentElement.style.webkitUserSelect = ae || ""), ae = "", M = "default";
289
+ }
290
+ });
291
+ }, 300);
292
+ } else if ((e instanceof HTMLElement || e instanceof SVGElement) && e && z.has(e)) {
293
+ let t = z.get(e);
294
+ e.style.userSelect === "none" && (e.style.userSelect = t), e.getAttribute("style") === "" && e.removeAttribute("style"), z.delete(e);
295
+ }
263
296
  }
264
- function yt(e, t) {
297
+ const De = Te.createContext({
298
+ register: () => {
299
+ }
300
+ });
301
+ De.displayName = "PressResponderContext";
302
+ function at(e, t) {
265
303
  return t.get ? t.get.call(e) : t.value;
266
304
  }
267
- function Me(e, t, r) {
305
+ function Ce(e, t, r) {
268
306
  if (!t.has(e))
269
307
  throw new TypeError("attempted to " + r + " private field on non-instance");
270
308
  return t.get(e);
271
309
  }
272
- function ht(e, t) {
273
- var r = Me(e, t, "get");
274
- return yt(e, r);
310
+ function lt(e, t) {
311
+ var r = Ce(e, t, "get");
312
+ return at(e, r);
275
313
  }
276
- function Et(e, t) {
314
+ function ut(e, t) {
277
315
  if (t.has(e))
278
316
  throw new TypeError("Cannot initialize the same private elements twice on an object");
279
317
  }
280
- function $t(e, t, r) {
281
- Et(e, t), t.set(e, r);
318
+ function ct(e, t, r) {
319
+ ut(e, t), t.set(e, r);
282
320
  }
283
- function kt(e, t, r) {
321
+ function dt(e, t, r) {
284
322
  if (t.set)
285
323
  t.set.call(e, r);
286
324
  else {
@@ -289,68 +327,35 @@ function kt(e, t, r) {
289
327
  t.value = r;
290
328
  }
291
329
  }
292
- function Ee(e, t, r) {
293
- var o = Me(e, t, "set");
294
- return kt(e, o, r), r;
330
+ function be(e, t, r) {
331
+ var o = Ce(e, t, "set");
332
+ return dt(e, o, r), r;
295
333
  }
296
- let U = "default", pe = "", Z = /* @__PURE__ */ new WeakMap();
297
- function $e(e) {
298
- if (Ie()) {
299
- if (U === "default") {
300
- const t = D(e);
301
- pe = t.documentElement.style.webkitUserSelect, t.documentElement.style.webkitUserSelect = "none";
302
- }
303
- U = "disabled";
304
- } else
305
- (e instanceof HTMLElement || e instanceof SVGElement) && (Z.set(e, e.style.userSelect), e.style.userSelect = "none");
306
- }
307
- function X(e) {
308
- if (Ie()) {
309
- if (U !== "disabled")
310
- return;
311
- U = "restoring", setTimeout(() => {
312
- mt(() => {
313
- if (U === "restoring") {
314
- const t = D(e);
315
- t.documentElement.style.webkitUserSelect === "none" && (t.documentElement.style.webkitUserSelect = pe || ""), pe = "", U = "default";
316
- }
317
- });
318
- }, 300);
319
- } else if ((e instanceof HTMLElement || e instanceof SVGElement) && e && Z.has(e)) {
320
- let t = Z.get(e);
321
- e.style.userSelect === "none" && (e.style.userSelect = t), e.getAttribute("style") === "" && e.removeAttribute("style"), Z.delete(e);
322
- }
323
- }
324
- const Fe = Ne.createContext({
325
- register: () => {
326
- }
327
- });
328
- Fe.displayName = "PressResponderContext";
329
- function wt(e) {
330
- let t = je(Fe);
334
+ function pt(e) {
335
+ let t = Ke(De);
331
336
  if (t) {
332
337
  let { register: r, ...o } = t;
333
- e = W(o, e), r();
338
+ e = H(o, e), r();
334
339
  }
335
- return gt(t, e.ref), e;
340
+ return st(t, e.ref), e;
336
341
  }
337
- var q = /* @__PURE__ */ new WeakMap();
338
- class J {
342
+ var W = /* @__PURE__ */ new WeakMap();
343
+ class j {
339
344
  continuePropagation() {
340
- Ee(this, q, !1);
345
+ be(this, W, !1);
341
346
  }
342
347
  get shouldStopPropagation() {
343
- return ht(this, q);
348
+ return lt(this, W);
344
349
  }
345
350
  constructor(t, r, o) {
346
- $t(this, q, {
351
+ ct(this, W, {
347
352
  writable: !0,
348
353
  value: void 0
349
- }), Ee(this, q, !0), this.type = t, this.pointerType = r, this.target = o.currentTarget, this.shiftKey = o.shiftKey, this.metaKey = o.metaKey, this.ctrlKey = o.ctrlKey, this.altKey = o.altKey;
354
+ }), be(this, W, !0), this.type = t, this.pointerType = r, this.target = o.currentTarget, this.shiftKey = o.shiftKey, this.metaKey = o.metaKey, this.ctrlKey = o.ctrlKey, this.altKey = o.altKey;
350
355
  }
351
356
  }
352
- const ke = Symbol("linkClicked");
353
- function Tt(e) {
357
+ const ge = Symbol("linkClicked");
358
+ function ft(e) {
354
359
  let {
355
360
  onPress: t,
356
361
  onPressChange: r,
@@ -360,11 +365,12 @@ function Tt(e) {
360
365
  isDisabled: u,
361
366
  isPressed: p,
362
367
  preventFocusOnPress: b,
363
- shouldCancelOnPointerExit: E,
364
- allowTextSelectionOnPress: v,
365
- ref: C,
368
+ shouldCancelOnPointerExit: k,
369
+ allowTextSelectionOnPress: g,
370
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
371
+ ref: D,
366
372
  ...x
367
- } = wt(e), [m, P] = Oe(!1), k = re({
373
+ } = pt(e), [m, w] = Be(!1), T = Q({
368
374
  isPressed: !1,
369
375
  ignoreEmulatedMouseEvents: !1,
370
376
  ignoreClickAfterPress: !1,
@@ -374,154 +380,154 @@ function Tt(e) {
374
380
  target: null,
375
381
  isOverTarget: !1,
376
382
  pointerType: null
377
- }), { addGlobalListener: T, removeAllGlobalListeners: N } = bt(), B = R((n, f) => {
378
- let w = k.current;
379
- if (u || w.didFirePressStart)
383
+ }), { addGlobalListener: $, removeAllGlobalListeners: S } = ot(), P = F((n, f) => {
384
+ let B = T.current;
385
+ if (u || B.didFirePressStart)
380
386
  return !1;
381
387
  let l = !0;
382
- if (w.isTriggeringEvent = !0, o) {
383
- let g = new J("pressstart", f, n);
384
- o(g), l = g.shouldStopPropagation;
388
+ if (B.isTriggeringEvent = !0, o) {
389
+ let v = new j("pressstart", f, n);
390
+ o(v), l = v.shouldStopPropagation;
385
391
  }
386
- return r && r(!0), w.isTriggeringEvent = !1, w.didFirePressStart = !0, P(!0), l;
387
- }), $ = R((n, f, w = !0) => {
388
- let l = k.current;
392
+ return r && r(!0), B.isTriggeringEvent = !1, B.didFirePressStart = !0, w(!0), l;
393
+ }), E = F((n, f, B = !0) => {
394
+ let l = T.current;
389
395
  if (!l.didFirePressStart)
390
396
  return !1;
391
397
  l.ignoreClickAfterPress = !0, l.didFirePressStart = !1, l.isTriggeringEvent = !0;
392
- let g = !0;
398
+ let v = !0;
393
399
  if (i) {
394
- let s = new J("pressend", f, n);
395
- i(s), g = s.shouldStopPropagation;
400
+ let s = new j("pressend", f, n);
401
+ i(s), v = s.shouldStopPropagation;
396
402
  }
397
- if (r && r(!1), P(!1), t && w && !u) {
398
- let s = new J("press", f, n);
399
- t(s), g && (g = s.shouldStopPropagation);
403
+ if (r && r(!1), w(!1), t && B && !u) {
404
+ let s = new j("press", f, n);
405
+ t(s), v && (v = s.shouldStopPropagation);
400
406
  }
401
- return l.isTriggeringEvent = !1, g;
402
- }), L = R((n, f) => {
403
- let w = k.current;
407
+ return l.isTriggeringEvent = !1, v;
408
+ }), O = F((n, f) => {
409
+ let B = T.current;
404
410
  if (u)
405
411
  return !1;
406
412
  if (d) {
407
- w.isTriggeringEvent = !0;
408
- let l = new J("pressup", f, n);
409
- return d(l), w.isTriggeringEvent = !1, l.shouldStopPropagation;
413
+ B.isTriggeringEvent = !0;
414
+ let l = new j("pressup", f, n);
415
+ return d(l), B.isTriggeringEvent = !1, l.shouldStopPropagation;
410
416
  }
411
417
  return !0;
412
- }), O = R((n) => {
413
- let f = k.current;
414
- f.isPressed && f.target && (f.isOverTarget && f.pointerType != null && $(_(f.target, n), f.pointerType, !1), f.isPressed = !1, f.isOverTarget = !1, f.activePointerId = null, f.pointerType = null, N(), v || X(f.target));
415
- }), I = R((n) => {
416
- E && O(n);
417
- }), ie = De(() => {
418
- let n = k.current, f = {
418
+ }), N = F((n) => {
419
+ let f = T.current;
420
+ f.isPressed && f.target && (f.isOverTarget && f.pointerType != null && E(C(f.target, n), f.pointerType, !1), f.isPressed = !1, f.isOverTarget = !1, f.activePointerId = null, f.pointerType = null, S(), g || V(f.target));
421
+ }), I = F((n) => {
422
+ k && N(n);
423
+ }), te = $e(() => {
424
+ let n = T.current, f = {
419
425
  onKeyDown(l) {
420
- if (ae(l.nativeEvent, l.currentTarget) && l.currentTarget.contains(l.target)) {
421
- var g;
422
- Te(l.target, l.key) && l.preventDefault();
426
+ if (ne(l.nativeEvent, l.currentTarget) && l.currentTarget.contains(l.target)) {
427
+ var v;
428
+ ye(l.target, l.key) && l.preventDefault();
423
429
  let s = !0;
424
430
  if (!n.isPressed && !l.repeat) {
425
- n.target = l.currentTarget, n.isPressed = !0, s = B(l, "keyboard");
426
- let a = l.currentTarget, h = (A) => {
427
- ae(A, a) && !A.repeat && a.contains(A.target) && n.target && L(_(n.target, A), "keyboard");
431
+ n.target = l.currentTarget, n.isPressed = !0, s = P(l, "keyboard");
432
+ let a = l.currentTarget, h = (K) => {
433
+ ne(K, a) && !K.repeat && a.contains(K.target) && n.target && O(C(n.target, K), "keyboard");
428
434
  };
429
- T(D(l.currentTarget), "keyup", _e(h, w), !0);
435
+ $(_(l.currentTarget), "keyup", we(h, B), !0);
430
436
  }
431
- s && l.stopPropagation(), l.metaKey && j() && ((g = n.metaKeyEvents) === null || g === void 0 || g.set(l.key, l.nativeEvent));
437
+ s && l.stopPropagation(), l.metaKey && q() && ((v = n.metaKeyEvents) === null || v === void 0 || v.set(l.key, l.nativeEvent));
432
438
  } else
433
439
  l.key === "Meta" && (n.metaKeyEvents = /* @__PURE__ */ new Map());
434
440
  },
435
441
  onClick(l) {
436
- if (!(l && !l.currentTarget.contains(l.target)) && l && l.button === 0 && !n.isTriggeringEvent && !Y.isOpening) {
437
- let g = !0;
438
- if (u && l.preventDefault(), !n.ignoreClickAfterPress && !n.ignoreEmulatedMouseEvents && !n.isPressed && (n.pointerType === "virtual" || de(l.nativeEvent))) {
439
- !u && !b && G(l.currentTarget);
440
- let s = B(l, "virtual"), a = L(l, "virtual"), h = $(l, "virtual");
441
- g = s && a && h;
442
+ if (!(l && !l.currentTarget.contains(l.target)) && l && l.button === 0 && !n.isTriggeringEvent && !R.isOpening) {
443
+ let v = !0;
444
+ if (u && l.preventDefault(), !n.ignoreClickAfterPress && !n.ignoreEmulatedMouseEvents && !n.isPressed && (n.pointerType === "virtual" || fe(l.nativeEvent))) {
445
+ !u && !b && U(l.currentTarget);
446
+ let s = P(l, "virtual"), a = O(l, "virtual"), h = E(l, "virtual");
447
+ v = s && a && h;
442
448
  }
443
- n.ignoreEmulatedMouseEvents = !1, n.ignoreClickAfterPress = !1, g && l.stopPropagation();
449
+ n.ignoreEmulatedMouseEvents = !1, n.ignoreClickAfterPress = !1, v && l.stopPropagation();
444
450
  }
445
451
  }
446
- }, w = (l) => {
447
- var g;
448
- if (n.isPressed && n.target && ae(l, n.target)) {
452
+ }, B = (l) => {
453
+ var v;
454
+ if (n.isPressed && n.target && ne(l, n.target)) {
449
455
  var s;
450
- Te(l.target, l.key) && l.preventDefault();
456
+ ye(l.target, l.key) && l.preventDefault();
451
457
  let h = l.target;
452
- $(_(n.target, l), "keyboard", n.target.contains(h)), N(), l.key !== "Enter" && ge(n.target) && n.target.contains(h) && !l[ke] && (l[ke] = !0, Y(n.target, l, !1)), n.isPressed = !1, (s = n.metaKeyEvents) === null || s === void 0 || s.delete(l.key);
453
- } else if (l.key === "Meta" && ((g = n.metaKeyEvents) === null || g === void 0 ? void 0 : g.size)) {
458
+ E(C(n.target, l), "keyboard", n.target.contains(h)), S(), l.key !== "Enter" && ce(n.target) && n.target.contains(h) && !l[ge] && (l[ge] = !0, R(n.target, l, !1)), n.isPressed = !1, (s = n.metaKeyEvents) === null || s === void 0 || s.delete(l.key);
459
+ } else if (l.key === "Meta" && (!((v = n.metaKeyEvents) === null || v === void 0) && v.size)) {
454
460
  var a;
455
461
  let h = n.metaKeyEvents;
456
462
  n.metaKeyEvents = void 0;
457
- for (let A of h.values())
458
- (a = n.target) === null || a === void 0 || a.dispatchEvent(new KeyboardEvent("keyup", A));
463
+ for (let K of h.values())
464
+ (a = n.target) === null || a === void 0 || a.dispatchEvent(new KeyboardEvent("keyup", K));
459
465
  }
460
466
  };
461
467
  if (typeof PointerEvent < "u") {
462
468
  f.onPointerDown = (a) => {
463
469
  if (a.button !== 0 || !a.currentTarget.contains(a.target))
464
470
  return;
465
- if (vt(a.nativeEvent)) {
471
+ if (it(a.nativeEvent)) {
466
472
  n.pointerType = "virtual";
467
473
  return;
468
474
  }
469
- le(a.currentTarget) && a.preventDefault(), n.pointerType = a.pointerType;
475
+ re(a.currentTarget) && a.preventDefault(), n.pointerType = a.pointerType;
470
476
  let h = !0;
471
- n.isPressed || (n.isPressed = !0, n.isOverTarget = !0, n.activePointerId = a.pointerId, n.target = a.currentTarget, !u && !b && G(a.currentTarget), v || $e(n.target), h = B(a, n.pointerType), T(D(a.currentTarget), "pointermove", l, !1), T(D(a.currentTarget), "pointerup", g, !1), T(D(a.currentTarget), "pointercancel", s, !1)), h && a.stopPropagation();
477
+ n.isPressed || (n.isPressed = !0, n.isOverTarget = !0, n.activePointerId = a.pointerId, n.target = a.currentTarget, !u && !b && U(a.currentTarget), g || me(n.target), h = P(a, n.pointerType), $(_(a.currentTarget), "pointermove", l, !1), $(_(a.currentTarget), "pointerup", v, !1), $(_(a.currentTarget), "pointercancel", s, !1)), h && a.stopPropagation();
472
478
  }, f.onMouseDown = (a) => {
473
- !a.currentTarget.contains(a.target) || a.button === 0 && (le(a.currentTarget) && a.preventDefault(), a.stopPropagation());
479
+ a.currentTarget.contains(a.target) && a.button === 0 && (re(a.currentTarget) && a.preventDefault(), a.stopPropagation());
474
480
  }, f.onPointerUp = (a) => {
475
- !a.currentTarget.contains(a.target) || n.pointerType === "virtual" || a.button === 0 && M(a, a.currentTarget) && L(a, n.pointerType || a.pointerType);
481
+ !a.currentTarget.contains(a.target) || n.pointerType === "virtual" || a.button === 0 && A(a, a.currentTarget) && O(a, n.pointerType || a.pointerType);
476
482
  };
477
483
  let l = (a) => {
478
- a.pointerId === n.activePointerId && (n.target && M(a, n.target) ? !n.isOverTarget && n.pointerType != null && (n.isOverTarget = !0, B(_(n.target, a), n.pointerType)) : n.target && n.isOverTarget && n.pointerType != null && (n.isOverTarget = !1, $(_(n.target, a), n.pointerType, !1), I(a)));
479
- }, g = (a) => {
480
- a.pointerId === n.activePointerId && n.isPressed && a.button === 0 && n.target && (M(a, n.target) && n.pointerType != null ? $(_(n.target, a), n.pointerType) : n.isOverTarget && n.pointerType != null && $(_(n.target, a), n.pointerType, !1), n.isPressed = !1, n.isOverTarget = !1, n.activePointerId = null, n.pointerType = null, N(), v || X(n.target));
484
+ a.pointerId === n.activePointerId && (n.target && A(a, n.target) ? !n.isOverTarget && n.pointerType != null && (n.isOverTarget = !0, P(C(n.target, a), n.pointerType)) : n.target && n.isOverTarget && n.pointerType != null && (n.isOverTarget = !1, E(C(n.target, a), n.pointerType, !1), I(a)));
485
+ }, v = (a) => {
486
+ a.pointerId === n.activePointerId && n.isPressed && a.button === 0 && n.target && (A(a, n.target) && n.pointerType != null ? E(C(n.target, a), n.pointerType) : n.isOverTarget && n.pointerType != null && E(C(n.target, a), n.pointerType, !1), n.isPressed = !1, n.isOverTarget = !1, n.activePointerId = null, n.pointerType = null, S(), g || V(n.target));
481
487
  }, s = (a) => {
482
- O(a);
488
+ N(a);
483
489
  };
484
490
  f.onDragStart = (a) => {
485
- !a.currentTarget.contains(a.target) || O(a);
491
+ a.currentTarget.contains(a.target) && N(a);
486
492
  };
487
493
  } else {
488
494
  f.onMouseDown = (s) => {
489
495
  if (s.button !== 0 || !s.currentTarget.contains(s.target))
490
496
  return;
491
- if (le(s.currentTarget) && s.preventDefault(), n.ignoreEmulatedMouseEvents) {
497
+ if (re(s.currentTarget) && s.preventDefault(), n.ignoreEmulatedMouseEvents) {
492
498
  s.stopPropagation();
493
499
  return;
494
500
  }
495
- n.isPressed = !0, n.isOverTarget = !0, n.target = s.currentTarget, n.pointerType = de(s.nativeEvent) ? "virtual" : "mouse", !u && !b && G(s.currentTarget), B(s, n.pointerType) && s.stopPropagation(), T(D(s.currentTarget), "mouseup", l, !1);
501
+ n.isPressed = !0, n.isOverTarget = !0, n.target = s.currentTarget, n.pointerType = fe(s.nativeEvent) ? "virtual" : "mouse", !u && !b && U(s.currentTarget), P(s, n.pointerType) && s.stopPropagation(), $(_(s.currentTarget), "mouseup", l, !1);
496
502
  }, f.onMouseEnter = (s) => {
497
503
  if (!s.currentTarget.contains(s.target))
498
504
  return;
499
505
  let a = !0;
500
- n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !0, a = B(s, n.pointerType)), a && s.stopPropagation();
506
+ n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !0, a = P(s, n.pointerType)), a && s.stopPropagation();
501
507
  }, f.onMouseLeave = (s) => {
502
508
  if (!s.currentTarget.contains(s.target))
503
509
  return;
504
510
  let a = !0;
505
- n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !1, a = $(s, n.pointerType, !1), I(s)), a && s.stopPropagation();
511
+ n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !1, a = E(s, n.pointerType, !1), I(s)), a && s.stopPropagation();
506
512
  }, f.onMouseUp = (s) => {
507
- !s.currentTarget.contains(s.target) || !n.ignoreEmulatedMouseEvents && s.button === 0 && L(s, n.pointerType || "mouse");
513
+ s.currentTarget.contains(s.target) && !n.ignoreEmulatedMouseEvents && s.button === 0 && O(s, n.pointerType || "mouse");
508
514
  };
509
515
  let l = (s) => {
510
516
  if (s.button === 0) {
511
- if (n.isPressed = !1, N(), n.ignoreEmulatedMouseEvents) {
517
+ if (n.isPressed = !1, S(), n.ignoreEmulatedMouseEvents) {
512
518
  n.ignoreEmulatedMouseEvents = !1;
513
519
  return;
514
520
  }
515
- n.target && M(s, n.target) && n.pointerType != null ? $(_(n.target, s), n.pointerType) : n.target && n.isOverTarget && n.pointerType != null && $(_(n.target, s), n.pointerType, !1), n.isOverTarget = !1;
521
+ n.target && A(s, n.target) && n.pointerType != null ? E(C(n.target, s), n.pointerType) : n.target && n.isOverTarget && n.pointerType != null && E(C(n.target, s), n.pointerType, !1), n.isOverTarget = !1;
516
522
  }
517
523
  };
518
524
  f.onTouchStart = (s) => {
519
525
  if (!s.currentTarget.contains(s.target))
520
526
  return;
521
- let a = Bt(s.nativeEvent);
527
+ let a = mt(s.nativeEvent);
522
528
  if (!a)
523
529
  return;
524
- n.activePointerId = a.identifier, n.ignoreEmulatedMouseEvents = !0, n.isOverTarget = !0, n.isPressed = !0, n.target = s.currentTarget, n.pointerType = "touch", !u && !b && G(s.currentTarget), v || $e(n.target), B(s, n.pointerType) && s.stopPropagation(), T(H(s.currentTarget), "scroll", g, !0);
530
+ n.activePointerId = a.identifier, n.ignoreEmulatedMouseEvents = !0, n.isOverTarget = !0, n.isPressed = !0, n.target = s.currentTarget, n.pointerType = "touch", !u && !b && U(s.currentTarget), g || me(n.target), P(s, n.pointerType) && s.stopPropagation(), $(se(s.currentTarget), "scroll", v, !0);
525
531
  }, f.onTouchMove = (s) => {
526
532
  if (!s.currentTarget.contains(s.target))
527
533
  return;
@@ -529,8 +535,8 @@ function Tt(e) {
529
535
  s.stopPropagation();
530
536
  return;
531
537
  }
532
- let a = we(s.nativeEvent, n.activePointerId), h = !0;
533
- a && M(a, s.currentTarget) ? !n.isOverTarget && n.pointerType != null && (n.isOverTarget = !0, h = B(s, n.pointerType)) : n.isOverTarget && n.pointerType != null && (n.isOverTarget = !1, h = $(s, n.pointerType, !1), I(s)), h && s.stopPropagation();
538
+ let a = ve(s.nativeEvent, n.activePointerId), h = !0;
539
+ a && A(a, s.currentTarget) ? !n.isOverTarget && n.pointerType != null && (n.isOverTarget = !0, h = P(s, n.pointerType)) : n.isOverTarget && n.pointerType != null && (n.isOverTarget = !1, h = E(s, n.pointerType, !1), I(s)), h && s.stopPropagation();
534
540
  }, f.onTouchEnd = (s) => {
535
541
  if (!s.currentTarget.contains(s.target))
536
542
  return;
@@ -538,13 +544,13 @@ function Tt(e) {
538
544
  s.stopPropagation();
539
545
  return;
540
546
  }
541
- let a = we(s.nativeEvent, n.activePointerId), h = !0;
542
- a && M(a, s.currentTarget) && n.pointerType != null ? (L(s, n.pointerType), h = $(s, n.pointerType)) : n.isOverTarget && n.pointerType != null && (h = $(s, n.pointerType, !1)), h && s.stopPropagation(), n.isPressed = !1, n.activePointerId = null, n.isOverTarget = !1, n.ignoreEmulatedMouseEvents = !0, n.target && !v && X(n.target), N();
547
+ let a = ve(s.nativeEvent, n.activePointerId), h = !0;
548
+ a && A(a, s.currentTarget) && n.pointerType != null ? (O(s, n.pointerType), h = E(s, n.pointerType)) : n.isOverTarget && n.pointerType != null && (h = E(s, n.pointerType, !1)), h && s.stopPropagation(), n.isPressed = !1, n.activePointerId = null, n.isOverTarget = !1, n.ignoreEmulatedMouseEvents = !0, n.target && !g && V(n.target), S();
543
549
  }, f.onTouchCancel = (s) => {
544
- !s.currentTarget.contains(s.target) || (s.stopPropagation(), n.isPressed && O(s));
550
+ s.currentTarget.contains(s.target) && (s.stopPropagation(), n.isPressed && N(s));
545
551
  };
546
- let g = (s) => {
547
- n.isPressed && s.target.contains(n.target) && O({
552
+ let v = (s) => {
553
+ n.isPressed && s.target.contains(n.target) && N({
548
554
  currentTarget: n.target,
549
555
  shiftKey: !1,
550
556
  ctrlKey: !1,
@@ -553,44 +559,45 @@ function Tt(e) {
553
559
  });
554
560
  };
555
561
  f.onDragStart = (s) => {
556
- !s.currentTarget.contains(s.target) || O(s);
562
+ s.currentTarget.contains(s.target) && N(s);
557
563
  };
558
564
  }
559
565
  return f;
560
566
  }, [
561
- T,
567
+ $,
562
568
  u,
563
569
  b,
570
+ S,
571
+ g,
564
572
  N,
565
- v,
566
- O,
567
573
  I,
568
- $,
569
- B,
570
- L
574
+ E,
575
+ P,
576
+ O
571
577
  ]);
572
- return ee(() => () => {
578
+ return X(() => () => {
573
579
  var n;
574
- v || X((n = k.current.target) !== null && n !== void 0 ? n : void 0);
580
+ g || V((n = T.current.target) !== null && n !== void 0 ? n : void 0);
575
581
  }, [
576
- v
582
+ g
577
583
  ]), {
578
584
  isPressed: p || m,
579
- pressProps: W(x, ie)
585
+ pressProps: H(x, te)
580
586
  };
581
587
  }
582
- function ge(e) {
588
+ function ce(e) {
583
589
  return e.tagName === "A" && e.hasAttribute("href");
584
590
  }
585
- function ae(e, t) {
591
+ function ne(e, t) {
586
592
  const { key: r, code: o } = e, i = t, d = i.getAttribute("role");
587
- return (r === "Enter" || r === " " || r === "Spacebar" || o === "Space") && !(i instanceof H(i).HTMLInputElement && !Ue(i, r) || i instanceof H(i).HTMLTextAreaElement || i.isContentEditable) && !((d === "link" || !d && ge(i)) && r !== "Enter");
593
+ return (r === "Enter" || r === " " || r === "Spacebar" || o === "Space") && !(i instanceof se(i).HTMLInputElement && !_e(i, r) || i instanceof se(i).HTMLTextAreaElement || i.isContentEditable) && // Links should only trigger with Enter key
594
+ !((d === "link" || !d && ce(i)) && r !== "Enter");
588
595
  }
589
- function Bt(e) {
596
+ function mt(e) {
590
597
  const { targetTouches: t } = e;
591
598
  return t.length > 0 ? t[0] : null;
592
599
  }
593
- function we(e, t) {
600
+ function ve(e, t) {
594
601
  const r = e.changedTouches;
595
602
  for (let o = 0; o < r.length; o++) {
596
603
  const i = r[o];
@@ -599,7 +606,7 @@ function we(e, t) {
599
606
  }
600
607
  return null;
601
608
  }
602
- function _(e, t) {
609
+ function C(e, t) {
603
610
  return {
604
611
  currentTarget: e,
605
612
  shiftKey: t.shiftKey,
@@ -608,7 +615,7 @@ function _(e, t) {
608
615
  altKey: t.altKey
609
616
  };
610
617
  }
611
- function Pt(e) {
618
+ function bt(e) {
612
619
  let t = 0, r = 0;
613
620
  return e.width !== void 0 ? t = e.width / 2 : e.radiusX !== void 0 && (t = e.radiusX), e.height !== void 0 ? r = e.height / 2 : e.radiusY !== void 0 && (r = e.radiusY), {
614
621
  top: e.clientY - r,
@@ -617,20 +624,20 @@ function Pt(e) {
617
624
  left: e.clientX - t
618
625
  };
619
626
  }
620
- function xt(e, t) {
627
+ function gt(e, t) {
621
628
  return !(e.left > t.right || t.left > e.right || e.top > t.bottom || t.top > e.bottom);
622
629
  }
623
- function M(e, t) {
624
- let r = t.getBoundingClientRect(), o = Pt(e);
625
- return xt(r, o);
630
+ function A(e, t) {
631
+ let r = t.getBoundingClientRect(), o = bt(e);
632
+ return gt(r, o);
626
633
  }
627
- function le(e) {
634
+ function re(e) {
628
635
  return !(e instanceof HTMLElement) || !e.hasAttribute("draggable");
629
636
  }
630
- function Te(e, t) {
631
- return e instanceof HTMLInputElement ? !Ue(e, t) : e instanceof HTMLButtonElement ? e.type !== "submit" && e.type !== "reset" : !ge(e);
637
+ function ye(e, t) {
638
+ return e instanceof HTMLInputElement ? !_e(e, t) : e instanceof HTMLButtonElement ? e.type !== "submit" && e.type !== "reset" : !ce(e);
632
639
  }
633
- const St = /* @__PURE__ */ new Set([
640
+ const vt = /* @__PURE__ */ new Set([
634
641
  "checkbox",
635
642
  "radio",
636
643
  "range",
@@ -641,117 +648,67 @@ const St = /* @__PURE__ */ new Set([
641
648
  "submit",
642
649
  "reset"
643
650
  ]);
644
- function Ue(e, t) {
645
- return e.type === "checkbox" || e.type === "radio" ? t === " " : St.has(e.type);
646
- }
647
- let Nt = /* @__PURE__ */ new Set(), V = /* @__PURE__ */ new Map(), K = !1, fe = !1;
648
- function ve(e, t) {
649
- for (let r of Nt)
650
- r(e, t);
651
- }
652
- function Ot(e) {
653
- return !(e.metaKey || !j() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
654
- }
655
- function te(e) {
656
- K = !0, Ot(e) && ve("keyboard", e);
657
- }
658
- function S(e) {
659
- (e.type === "mousedown" || e.type === "pointerdown") && (K = !0, ve("pointer", e));
660
- }
661
- function He(e) {
662
- de(e) && (K = !0);
663
- }
664
- function Re(e) {
665
- e.target === window || e.target === document || (!K && !fe && ve("virtual", e), K = !1, fe = !1);
666
- }
667
- function Ge() {
668
- K = !1, fe = !0;
669
- }
670
- function Be(e) {
671
- if (typeof window > "u" || V.get(H(e)))
672
- return;
673
- const t = H(e), r = D(e);
674
- let o = t.HTMLElement.prototype.focus;
675
- t.HTMLElement.prototype.focus = function() {
676
- K = !0, o.apply(this, arguments);
677
- }, r.addEventListener("keydown", te, !0), r.addEventListener("keyup", te, !0), r.addEventListener("click", He, !0), t.addEventListener("focus", Re, !0), t.addEventListener("blur", Ge, !1), typeof PointerEvent < "u" ? (r.addEventListener("pointerdown", S, !0), r.addEventListener("pointermove", S, !0), r.addEventListener("pointerup", S, !0)) : (r.addEventListener("mousedown", S, !0), r.addEventListener("mousemove", S, !0), r.addEventListener("mouseup", S, !0)), t.addEventListener("beforeunload", () => {
678
- Ve(e);
679
- }, {
680
- once: !0
681
- }), V.set(t, {
682
- focus: o
683
- });
684
- }
685
- const Ve = (e, t) => {
686
- const r = H(e), o = D(e);
687
- t && o.removeEventListener("DOMContentLoaded", t), V.has(r) && (r.HTMLElement.prototype.focus = V.get(r).focus, o.removeEventListener("keydown", te, !0), o.removeEventListener("keyup", te, !0), o.removeEventListener("click", He, !0), r.removeEventListener("focus", Re, !0), r.removeEventListener("blur", Ge, !1), typeof PointerEvent < "u" ? (o.removeEventListener("pointerdown", S, !0), o.removeEventListener("pointermove", S, !0), o.removeEventListener("pointerup", S, !0)) : (o.removeEventListener("mousedown", S, !0), o.removeEventListener("mousemove", S, !0), o.removeEventListener("mouseup", S, !0)), V.delete(r));
688
- };
689
- function Dt(e) {
690
- const t = D(e);
691
- let r;
692
- return t.readyState !== "loading" ? Be(e) : (r = () => {
693
- Be(e);
694
- }, t.addEventListener("DOMContentLoaded", r)), () => Ve(e, r);
651
+ function _e(e, t) {
652
+ return e.type === "checkbox" || e.type === "radio" ? t === " " : vt.has(e.type);
695
653
  }
696
- typeof document < "u" && Dt();
697
- let ne = !1, ue = 0;
698
- function me() {
699
- ne = !0, setTimeout(() => {
700
- ne = !1;
654
+ let J = !1, oe = 0;
655
+ function le() {
656
+ J = !0, setTimeout(() => {
657
+ J = !1;
701
658
  }, 50);
702
659
  }
703
- function Pe(e) {
704
- e.pointerType === "touch" && me();
660
+ function he(e) {
661
+ e.pointerType === "touch" && le();
705
662
  }
706
- function Lt() {
663
+ function yt() {
707
664
  if (!(typeof document > "u"))
708
- return typeof PointerEvent < "u" ? document.addEventListener("pointerup", Pe) : document.addEventListener("touchend", me), ue++, () => {
709
- ue--, !(ue > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup", Pe) : document.removeEventListener("touchend", me));
665
+ return typeof PointerEvent < "u" ? document.addEventListener("pointerup", he) : document.addEventListener("touchend", le), oe++, () => {
666
+ oe--, !(oe > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup", he) : document.removeEventListener("touchend", le));
710
667
  };
711
668
  }
712
- function Ct(e) {
713
- let { onHoverStart: t, onHoverChange: r, onHoverEnd: o, isDisabled: i } = e, [d, u] = Oe(!1), p = re({
669
+ function ht(e) {
670
+ let { onHoverStart: t, onHoverChange: r, onHoverEnd: o, isDisabled: i } = e, [d, u] = Be(!1), p = Q({
714
671
  isHovered: !1,
715
672
  ignoreEmulatedMouseEvents: !1,
716
673
  pointerType: "",
717
674
  target: null
718
675
  }).current;
719
- ee(Lt, []);
720
- let { hoverProps: b, triggerHoverEnd: E } = De(() => {
721
- let v = (m, P) => {
722
- if (p.pointerType = P, i || P === "touch" || p.isHovered || !m.currentTarget.contains(m.target))
676
+ X(yt, []);
677
+ let { hoverProps: b, triggerHoverEnd: k } = $e(() => {
678
+ let g = (m, w) => {
679
+ if (p.pointerType = w, i || w === "touch" || p.isHovered || !m.currentTarget.contains(m.target))
723
680
  return;
724
681
  p.isHovered = !0;
725
- let k = m.currentTarget;
726
- p.target = k, t && t({
682
+ let T = m.currentTarget;
683
+ p.target = T, t && t({
727
684
  type: "hoverstart",
728
- target: k,
729
- pointerType: P
685
+ target: T,
686
+ pointerType: w
730
687
  }), r && r(!0), u(!0);
731
- }, C = (m, P) => {
732
- if (p.pointerType = "", p.target = null, P === "touch" || !p.isHovered)
688
+ }, D = (m, w) => {
689
+ if (p.pointerType = "", p.target = null, w === "touch" || !p.isHovered)
733
690
  return;
734
691
  p.isHovered = !1;
735
- let k = m.currentTarget;
692
+ let T = m.currentTarget;
736
693
  o && o({
737
694
  type: "hoverend",
738
- target: k,
739
- pointerType: P
695
+ target: T,
696
+ pointerType: w
740
697
  }), r && r(!1), u(!1);
741
698
  }, x = {};
742
699
  return typeof PointerEvent < "u" ? (x.onPointerEnter = (m) => {
743
- ne && m.pointerType === "mouse" || v(m, m.pointerType);
700
+ J && m.pointerType === "mouse" || g(m, m.pointerType);
744
701
  }, x.onPointerLeave = (m) => {
745
- !i && m.currentTarget.contains(m.target) && C(m, m.pointerType);
702
+ !i && m.currentTarget.contains(m.target) && D(m, m.pointerType);
746
703
  }) : (x.onTouchStart = () => {
747
704
  p.ignoreEmulatedMouseEvents = !0;
748
705
  }, x.onMouseEnter = (m) => {
749
- !p.ignoreEmulatedMouseEvents && !ne && v(m, "mouse"), p.ignoreEmulatedMouseEvents = !1;
706
+ !p.ignoreEmulatedMouseEvents && !J && g(m, "mouse"), p.ignoreEmulatedMouseEvents = !1;
750
707
  }, x.onMouseLeave = (m) => {
751
- !i && m.currentTarget.contains(m.target) && C(m, "mouse");
708
+ !i && m.currentTarget.contains(m.target) && D(m, "mouse");
752
709
  }), {
753
710
  hoverProps: x,
754
- triggerHoverEnd: C
711
+ triggerHoverEnd: D
755
712
  };
756
713
  }, [
757
714
  t,
@@ -760,8 +717,8 @@ function Ct(e) {
760
717
  i,
761
718
  p
762
719
  ]);
763
- return ee(() => {
764
- i && E({
720
+ return X(() => {
721
+ i && k({
765
722
  currentTarget: p.target
766
723
  }, p.pointerType);
767
724
  }, [
@@ -771,7 +728,7 @@ function Ct(e) {
771
728
  isHovered: d
772
729
  };
773
730
  }
774
- function _t(e, t) {
731
+ function kt(e, t) {
775
732
  let {
776
733
  elementType: r = "button",
777
734
  isDisabled: o,
@@ -780,55 +737,56 @@ function _t(e, t) {
780
737
  onPressEnd: u,
781
738
  onPressUp: p,
782
739
  onPressChange: b,
783
- preventFocusOnPress: E,
784
- allowFocusWhenDisabled: v,
785
- onClick: C,
740
+ preventFocusOnPress: k,
741
+ allowFocusWhenDisabled: g,
742
+ // @ts-ignore
743
+ onClick: D,
786
744
  href: x,
787
745
  target: m,
788
- rel: P,
789
- type: k = "button"
790
- } = e, T;
791
- r === "button" ? T = {
792
- type: k,
746
+ rel: w,
747
+ type: T = "button"
748
+ } = e, $;
749
+ r === "button" ? $ = {
750
+ type: T,
793
751
  disabled: o
794
- } : T = {
752
+ } : $ = {
795
753
  role: "button",
796
754
  tabIndex: o ? void 0 : 0,
797
755
  href: r === "a" && o ? void 0 : x,
798
756
  target: r === "a" ? m : void 0,
799
- type: r === "input" ? k : void 0,
757
+ type: r === "input" ? T : void 0,
800
758
  disabled: r === "input" ? o : void 0,
801
759
  "aria-disabled": !o || r === "input" ? void 0 : o,
802
- rel: r === "a" ? P : void 0
760
+ rel: r === "a" ? w : void 0
803
761
  };
804
- let { pressProps: N, isPressed: B } = Tt({
762
+ let { pressProps: S, isPressed: P } = ft({
805
763
  onPressStart: d,
806
764
  onPressEnd: u,
807
765
  onPressChange: b,
808
766
  onPress: i,
809
767
  onPressUp: p,
810
768
  isDisabled: o,
811
- preventFocusOnPress: E,
769
+ preventFocusOnPress: k,
812
770
  ref: t
813
- }), { focusableProps: $ } = Qe(e, t);
814
- v && ($.tabIndex = o ? -1 : $.tabIndex);
815
- let L = W($, N, it(e, {
771
+ }), { focusableProps: E } = He(e, t);
772
+ g && (E.tabIndex = o ? -1 : E.tabIndex);
773
+ let O = H(E, S, Xe(e, {
816
774
  labelable: !0
817
775
  }));
818
776
  return {
819
- isPressed: B,
820
- buttonProps: W(T, L, {
777
+ isPressed: P,
778
+ buttonProps: H($, O, {
821
779
  "aria-haspopup": e["aria-haspopup"],
822
780
  "aria-expanded": e["aria-expanded"],
823
781
  "aria-controls": e["aria-controls"],
824
782
  "aria-pressed": e["aria-pressed"],
825
- onClick: (O) => {
826
- C && (C(O), console.warn("onClick is deprecated, please use onPress"));
783
+ onClick: (N) => {
784
+ D && (D(N), console.warn("onClick is deprecated, please use onPress"));
827
785
  }
828
786
  })
829
787
  };
830
788
  }
831
- function Kt(e, t, r) {
789
+ function Et(e, t, r) {
832
790
  return t in e ? Object.defineProperty(e, t, {
833
791
  value: r,
834
792
  enumerable: !0,
@@ -836,7 +794,7 @@ function Kt(e, t, r) {
836
794
  writable: !0
837
795
  }) : e[t] = r, e;
838
796
  }
839
- function xe(e, t) {
797
+ function ke(e, t) {
840
798
  var r = Object.keys(e);
841
799
  if (Object.getOwnPropertySymbols) {
842
800
  var o = Object.getOwnPropertySymbols(e);
@@ -846,40 +804,43 @@ function xe(e, t) {
846
804
  }
847
805
  return r;
848
806
  }
849
- function Se(e) {
807
+ function Ee(e) {
850
808
  for (var t = 1; t < arguments.length; t++) {
851
809
  var r = arguments[t] != null ? arguments[t] : {};
852
- t % 2 ? xe(Object(r), !0).forEach(function(o) {
853
- Kt(e, o, r[o]);
854
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : xe(Object(r)).forEach(function(o) {
810
+ t % 2 ? ke(Object(r), !0).forEach(function(o) {
811
+ Et(e, o, r[o]);
812
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ke(Object(r)).forEach(function(o) {
855
813
  Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(r, o));
856
814
  });
857
815
  }
858
816
  return e;
859
817
  }
860
- var It = (e, t, r) => {
818
+ var Tt = (e, t, r) => {
861
819
  for (var o of Object.keys(e)) {
862
820
  var i;
863
821
  if (e[o] !== ((i = t[o]) !== null && i !== void 0 ? i : r[o]))
864
822
  return !1;
865
823
  }
866
824
  return !0;
867
- }, se = (e) => (t) => {
868
- var r = e.defaultClassName, o = Se(Se({}, e.defaultVariants), t);
825
+ }, ee = (e) => (t) => {
826
+ var r = e.defaultClassName, o = Ee(Ee({}, e.defaultVariants), t);
869
827
  for (var i in o) {
870
828
  var d, u = (d = o[i]) !== null && d !== void 0 ? d : e.defaultVariants[i];
871
829
  if (u != null) {
872
830
  var p = u;
873
831
  typeof p == "boolean" && (p = p === !0 ? "true" : "false");
874
- var b = e.variantClassNames[i][p];
832
+ var b = (
833
+ // @ts-expect-error
834
+ e.variantClassNames[i][p]
835
+ );
875
836
  b && (r += " " + b);
876
837
  }
877
838
  }
878
- for (var [E, v] of e.compoundVariants)
879
- It(E, o, e.defaultVariants) && (r += " " + v);
839
+ for (var [k, g] of e.compoundVariants)
840
+ Tt(k, o, e.defaultVariants) && (r += " " + g);
880
841
  return r;
881
- }, At = se({ defaultClassName: "_125pcxy0", variantClassNames: { disabled: { true: "_125pcxy1", false: "_125pcxy2" }, kind: { default: "_125pcxy3", link: "_125pcxy4", confirm: "_125pcxy5", delete: "_125pcxy6", key: "_125pcxy7", icon: "_125pcxy8" }, spinning: { true: "_125pcxy9", false: "_125pcxya" } }, defaultVariants: { disabled: !1, kind: "default", spinning: !1 }, compoundVariants: [[{ kind: "icon", spinning: !0 }, "_125pcxyb"], [{ kind: "default", spinning: !0 }, "_125pcxyc"], [{ kind: "confirm", spinning: !0 }, "_125pcxyd"], [{ kind: "delete", spinning: !0 }, "_125pcxye"], [{ kind: "key", spinning: !0 }, "_125pcxyf"], [{ disabled: !0, spinning: !1 }, "_125pcxyg"]] }), Mt = se({ defaultClassName: "_125pcxyh", variantClassNames: { disabled: { true: "_125pcxyi", false: "_125pcxyj" }, kind: { icon: "_125pcxyk", default: "_125pcxyl", delete: "_125pcxym", key: "_125pcxyn", confirm: "_125pcxyo", link: "_125pcxyp" }, spinning: { true: "_125pcxyq", false: "_125pcxyr" } }, defaultVariants: { disabled: !1, kind: "default", spinning: !1 }, compoundVariants: [] }), Ft = "_125pcxyv", Ut = se({ defaultClassName: "_125pcxyw", variantClassNames: { spinning: { true: "_125pcxyx", false: "_125pcxyy" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] }), Ht = se({ defaultClassName: "_125pcxys", variantClassNames: { spinning: { true: "_125pcxyt", false: "_125pcxyu" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] });
882
- function Rt({
842
+ }, Bt = ee({ defaultClassName: "_125pcxy0", variantClassNames: { disabled: { true: "_125pcxy1", false: "_125pcxy2" }, kind: { default: "_125pcxy3", link: "_125pcxy4", confirm: "_125pcxy5", delete: "_125pcxy6", key: "_125pcxy7", icon: "_125pcxy8" }, spinning: { true: "_125pcxy9", false: "_125pcxya" } }, defaultVariants: { disabled: !1, kind: "default", spinning: !1 }, compoundVariants: [[{ kind: "icon", spinning: !0 }, "_125pcxyb"], [{ kind: "default", spinning: !0 }, "_125pcxyc"], [{ kind: "confirm", spinning: !0 }, "_125pcxyd"], [{ kind: "delete", spinning: !0 }, "_125pcxye"], [{ kind: "key", spinning: !0 }, "_125pcxyf"], [{ disabled: !0, spinning: !1 }, "_125pcxyg"]] }), $t = ee({ defaultClassName: "_125pcxyh", variantClassNames: { disabled: { true: "_125pcxyi", false: "_125pcxyj" }, kind: { icon: "_125pcxyk", default: "_125pcxyl", delete: "_125pcxym", key: "_125pcxyn", confirm: "_125pcxyo", link: "_125pcxyp" }, spinning: { true: "_125pcxyq", false: "_125pcxyr" } }, defaultVariants: { disabled: !1, kind: "default", spinning: !1 }, compoundVariants: [] }), Pt = "_125pcxyv", wt = ee({ defaultClassName: "_125pcxyw", variantClassNames: { spinning: { true: "_125pcxyx", false: "_125pcxyy" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] }), xt = ee({ defaultClassName: "_125pcxys", variantClassNames: { spinning: { true: "_125pcxyt", false: "_125pcxyu" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] });
843
+ function St({
883
844
  as: e,
884
845
  onClick: t,
885
846
  onPress: r,
@@ -889,60 +850,60 @@ function Rt({
889
850
  disabled: u,
890
851
  href: p,
891
852
  icon: b,
892
- kind: E = "default",
893
- spinning: v,
894
- spinningTitle: C,
853
+ kind: k = "default",
854
+ spinning: g,
855
+ spinningTitle: D,
895
856
  title: x,
896
857
  ...m
897
- }, P) {
898
- var g;
899
- const k = e != null ? e : p ? "a" : "button", T = {
900
- onPress: r != null ? r : t,
901
- isDisabled: (g = u != null ? u : d) != null ? g : v,
858
+ }, w) {
859
+ const T = e ?? (p ? "a" : "button"), $ = {
860
+ onPress: r ?? t,
861
+ // the button element should be disabled if the button is marked as disabled or spinning
862
+ isDisabled: u ?? d ?? g,
902
863
  ...m
903
- }, { "data-testid": N } = m, B = P || c.useRef(null), { buttonProps: $ } = _t(T, B), { hoverProps: L } = Ct({ isDisabled: T.isDisabled }), { type: O, ...I } = $, ie = {
904
- ...W(I, L),
905
- ref: B,
864
+ }, { "data-testid": S } = m, P = w || c.useRef(null), { buttonProps: E } = kt($, P), { hoverProps: O } = ht({ isDisabled: $.isDisabled }), { type: N, ...I } = E, te = {
865
+ ...H(I, O),
866
+ ref: P,
906
867
  title: x,
907
- className: p ? Ht({ spinning: v }) : Mt({ disabled: d || u, kind: E, spinning: v }),
908
- ...p ? { href: p } : { type: O }
909
- }, { t: n } = c.useContext(ze), f = b && /* @__PURE__ */ c.createElement(
910
- Je,
868
+ className: p ? xt({ spinning: g }) : $t({ disabled: d || u, kind: k, spinning: g }),
869
+ ...p ? { href: p } : { type: N }
870
+ }, { t: n } = c.useContext(Le), f = b && /* @__PURE__ */ c.createElement(
871
+ Ue,
911
872
  {
912
- className: Ft,
873
+ className: Pt,
913
874
  icon: b,
914
875
  "aria-hidden": "true",
915
- "data-testid": `${N}__${b}-icon`
876
+ "data-testid": `${S}__${b}-icon`
916
877
  }
917
878
  );
918
- let w;
919
- E === "default" || E === "icon" || E === "link" ? w = "dark" : w = "light";
920
- const l = v && /* @__PURE__ */ c.createElement(
921
- Xe,
879
+ let B;
880
+ k === "default" || k === "icon" || k === "link" ? B = "dark" : B = "light";
881
+ const l = g && /* @__PURE__ */ c.createElement(
882
+ Me,
922
883
  {
923
- color: w,
924
- className: Ut({ spinning: v }),
925
- title: C || n("design-system:button.spinningTitle"),
926
- "data-testid": `${N}__spinner`
884
+ color: B,
885
+ className: wt({ spinning: g }),
886
+ title: D || n("design-system:button.spinningTitle"),
887
+ "data-testid": `${S}__spinner`
927
888
  }
928
889
  );
929
- return /* @__PURE__ */ c.createElement(Ze, null, /* @__PURE__ */ c.createElement(
890
+ return /* @__PURE__ */ c.createElement(Re, null, /* @__PURE__ */ c.createElement(
930
891
  "div",
931
892
  {
932
- className: qe(
933
- At({
893
+ className: Fe(
894
+ Bt({
934
895
  disabled: d || u,
935
- kind: E,
936
- spinning: v
896
+ kind: k,
897
+ spinning: g
937
898
  }),
938
899
  i
939
900
  )
940
901
  },
941
- /* @__PURE__ */ c.createElement(k, { ...ie }, f, o ? /* @__PURE__ */ c.createElement("span", null, o) : "", l)
902
+ /* @__PURE__ */ c.createElement(T, { ...te }, f, o ? /* @__PURE__ */ c.createElement("span", null, o) : "", l)
942
903
  ));
943
904
  }
944
- const We = c.forwardRef(Rt);
945
- Ye.set(We, {
905
+ const Ie = c.forwardRef(St);
906
+ Ae.set(Ie, {
946
907
  name: "Button",
947
908
  props: {
948
909
  disabled: "boolean",
@@ -958,9 +919,9 @@ Ye.set(We, {
958
919
  },
959
920
  panellable: !0
960
921
  });
961
- const Gt = {
962
- components: [We],
963
- description: () => /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.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__ */ c.createElement("br", null), /* @__PURE__ */ c.createElement("h5", null, "Variants"), /* @__PURE__ */ c.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ c.createElement("span", { className: "sps-text-semibold" }, "Default: "), "For tertiary actions or actions of lower importance on a page."), /* @__PURE__ */ c.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ c.createElement("span", { className: "sps-text-semibold" }, "Key: "), "For primary or important actions on a page."), /* @__PURE__ */ c.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ c.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__ */ c.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ c.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__ */ c.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ c.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\u2019s disabled."), /* @__PURE__ */ c.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ c.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.")),
922
+ const Nt = {
923
+ components: [Ie],
924
+ description: () => /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.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__ */ c.createElement("br", null), /* @__PURE__ */ c.createElement("h5", null, "Variants"), /* @__PURE__ */ c.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ c.createElement("span", { className: "sps-text-semibold" }, "Default: "), "For tertiary actions or actions of lower importance on a page."), /* @__PURE__ */ c.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ c.createElement("span", { className: "sps-text-semibold" }, "Key: "), "For primary or important actions on a page."), /* @__PURE__ */ c.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ c.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__ */ c.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ c.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__ */ c.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ c.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__ */ c.createElement("div", { className: "sps-body-14" }, /* @__PURE__ */ c.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.")),
964
925
  examples: {
965
926
  basic: {
966
927
  label: "Basic Buttons",
@@ -1522,10 +1483,10 @@ const Gt = {
1522
1483
  }
1523
1484
  }
1524
1485
  }
1525
- }, zt = {
1526
- Buttons: Gt
1486
+ }, It = {
1487
+ Buttons: Nt
1527
1488
  };
1528
1489
  export {
1529
- We as Button,
1530
- zt as MANIFEST
1490
+ Ie as Button,
1491
+ It as MANIFEST
1531
1492
  };