@sps-woodland/buttons 8.17.1 → 8.18.0

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,76 +1,76 @@
1
1
  import * as c from "react";
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
- import { code as y } from "@spscommerce/utils";
6
- const Pe = typeof document < "u" ? Te.useLayoutEffect : () => {
2
+ import Be, { useRef as ee, useCallback as z, useEffect as J, useState as $e, useMemo as Ee, useContext as Le } from "react";
3
+ import { Metadata as Me, I18nContext as Fe, Spinner as Ue, cl as He, Icon as Re } from "@sps-woodland/core";
4
+ import { useFocusable as Ge, FocusRing as Ve } from "@react-aria/focus";
5
+ import { code as h } from "@spscommerce/utils";
6
+ const Pe = typeof document < "u" ? Be.useLayoutEffect : () => {
7
7
  };
8
- function F(e) {
9
- const t = Q(null);
8
+ function H(e) {
9
+ const t = ee(null);
10
10
  return Pe(() => {
11
11
  t.current = e;
12
12
  }, [
13
13
  e
14
- ]), Y((...r) => {
14
+ ]), z((...r) => {
15
15
  const o = t.current;
16
16
  return o == null ? void 0 : o(...r);
17
17
  }, []);
18
18
  }
19
- let pe = /* @__PURE__ */ new Map();
20
- function Ge(e, t) {
19
+ let fe = /* @__PURE__ */ new Map();
20
+ function We(e, t) {
21
21
  if (e === t) return e;
22
- let r = pe.get(e);
22
+ let r = fe.get(e);
23
23
  if (r)
24
24
  return r(t), t;
25
- let o = pe.get(t);
25
+ let o = fe.get(t);
26
26
  return o ? (o(e), e) : t;
27
27
  }
28
- function we(...e) {
28
+ function xe(...e) {
29
29
  return (...t) => {
30
30
  for (let r of e) typeof r == "function" && r(...t);
31
31
  };
32
32
  }
33
- const _ = (e) => {
33
+ const K = (e) => {
34
34
  var t;
35
35
  return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
36
- }, se = (e) => e && "window" in e && e.window === e ? e : _(e).defaultView || window;
37
- function xe(e) {
36
+ }, ie = (e) => e && "window" in e && e.window === e ? e : K(e).defaultView || window;
37
+ function Se(e) {
38
38
  var t, r, o = "";
39
39
  if (typeof e == "string" || typeof e == "number") o += e;
40
40
  else if (typeof e == "object") if (Array.isArray(e)) {
41
- var i = e.length;
42
- for (t = 0; t < i; t++) e[t] && (r = xe(e[t])) && (o && (o += " "), o += r);
41
+ var a = e.length;
42
+ for (t = 0; t < a; t++) e[t] && (r = Se(e[t])) && (o && (o += " "), o += r);
43
43
  } else for (r in e) e[r] && (o && (o += " "), o += r);
44
44
  return o;
45
45
  }
46
- function Ve() {
47
- for (var e, t, r = 0, o = "", i = arguments.length; r < i; r++) (e = arguments[r]) && (t = xe(e)) && (o && (o += " "), o += t);
46
+ function Ye() {
47
+ for (var e, t, r = 0, o = "", a = arguments.length; r < a; r++) (e = arguments[r]) && (t = Se(e)) && (o && (o += " "), o += t);
48
48
  return o;
49
49
  }
50
- function H(...e) {
50
+ function G(...e) {
51
51
  let t = {
52
52
  ...e[0]
53
53
  };
54
54
  for (let r = 1; r < e.length; r++) {
55
55
  let o = e[r];
56
- for (let i in o) {
57
- let p = t[i], u = o[i];
58
- typeof p == "function" && typeof u == "function" && // This is a lot faster than a regex.
59
- i[0] === "o" && i[1] === "n" && i.charCodeAt(2) >= /* 'A' */
60
- 65 && i.charCodeAt(2) <= /* 'Z' */
61
- 90 ? t[i] = we(p, u) : (i === "className" || i === "UNSAFE_className") && typeof p == "string" && typeof u == "string" ? t[i] = Ve(p, u) : i === "id" && p && u ? t.id = Ge(p, u) : t[i] = u !== void 0 ? u : p;
56
+ for (let a in o) {
57
+ let d = t[a], u = o[a];
58
+ typeof d == "function" && typeof u == "function" && // This is a lot faster than a regex.
59
+ a[0] === "o" && a[1] === "n" && a.charCodeAt(2) >= /* 'A' */
60
+ 65 && a.charCodeAt(2) <= /* 'Z' */
61
+ 90 ? t[a] = xe(d, u) : (a === "className" || a === "UNSAFE_className") && typeof d == "string" && typeof u == "string" ? t[a] = Ye(d, u) : a === "id" && d && u ? t.id = We(d, u) : t[a] = u !== void 0 ? u : d;
62
62
  }
63
63
  }
64
64
  return t;
65
65
  }
66
- const We = /* @__PURE__ */ new Set([
66
+ const je = /* @__PURE__ */ new Set([
67
67
  "id"
68
- ]), je = /* @__PURE__ */ new Set([
68
+ ]), Xe = /* @__PURE__ */ new Set([
69
69
  "aria-label",
70
70
  "aria-labelledby",
71
71
  "aria-describedby",
72
72
  "aria-details"
73
- ]), Ye = /* @__PURE__ */ new Set([
73
+ ]), ze = /* @__PURE__ */ new Set([
74
74
  "href",
75
75
  "hrefLang",
76
76
  "target",
@@ -78,37 +78,37 @@ const We = /* @__PURE__ */ new Set([
78
78
  "download",
79
79
  "ping",
80
80
  "referrerPolicy"
81
- ]), ze = /^(data-.*)$/;
82
- function Xe(e, t = {}) {
83
- let { labelable: r, isLink: o, propNames: i } = t, p = {};
84
- for (const u in e) 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)) && (p[u] = e[u]);
85
- return p;
81
+ ]), qe = /^(data-.*)$/;
82
+ function Je(e, t = {}) {
83
+ let { labelable: r, isLink: o, propNames: a } = t, d = {};
84
+ for (const u in e) Object.prototype.hasOwnProperty.call(e, u) && (je.has(u) || r && Xe.has(u) || o && ze.has(u) || a != null && a.has(u) || qe.test(u)) && (d[u] = e[u]);
85
+ return d;
86
86
  }
87
- function U(e) {
88
- if (qe()) e.focus({
87
+ function R(e) {
88
+ if (Qe()) e.focus({
89
89
  preventScroll: !0
90
90
  });
91
91
  else {
92
- let t = Je(e);
93
- e.focus(), Qe(t);
92
+ let t = Ze(e);
93
+ e.focus(), et(t);
94
94
  }
95
95
  }
96
- let G = null;
97
- function qe() {
98
- if (G == null) {
99
- G = !1;
96
+ let W = null;
97
+ function Qe() {
98
+ if (W == null) {
99
+ W = !1;
100
100
  try {
101
101
  document.createElement("div").focus({
102
102
  get preventScroll() {
103
- return G = !0, !0;
103
+ return W = !0, !0;
104
104
  }
105
105
  });
106
106
  } catch {
107
107
  }
108
108
  }
109
- return G;
109
+ return W;
110
110
  }
111
- function Je(e) {
111
+ function Ze(e) {
112
112
  let t = e.parentNode, r = [], o = document.scrollingElement || document.documentElement;
113
113
  for (; t instanceof HTMLElement && t !== o; )
114
114
  (t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && r.push({
@@ -122,115 +122,112 @@ function Je(e) {
122
122
  scrollLeft: o.scrollLeft
123
123
  }), r;
124
124
  }
125
- function Qe(e) {
125
+ function et(e) {
126
126
  for (let { element: t, scrollTop: r, scrollLeft: o } of e)
127
127
  t.scrollTop = r, t.scrollLeft = o;
128
128
  }
129
- function Z(e) {
129
+ function te(e) {
130
130
  var t;
131
131
  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);
132
132
  }
133
- function ue(e) {
133
+ function de(e) {
134
134
  var t;
135
135
  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;
136
136
  }
137
- function q() {
138
- return ue(/^Mac/i);
137
+ function I(e) {
138
+ let t = null;
139
+ return () => (t == null && (t = e()), t);
139
140
  }
140
- function Ze() {
141
- return ue(/^iPhone/i);
142
- }
143
- function Se() {
144
- return ue(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
145
- q() && navigator.maxTouchPoints > 1;
146
- }
147
- function Ne() {
148
- return Ze() || Se();
149
- }
150
- function et() {
151
- return Z(/AppleWebKit/i) && !tt();
152
- }
153
- function tt() {
154
- return Z(/Chrome/i);
155
- }
156
- function Oe() {
157
- return Z(/Android/i);
158
- }
159
- function nt() {
160
- return Z(/Firefox/i);
161
- }
162
- function R(e, t, r = !0) {
163
- var o, i;
164
- let { metaKey: p, ctrlKey: u, altKey: d, shiftKey: b } = t;
165
- nt() && (!((i = window.event) === null || i === void 0 || (o = i.type) === null || o === void 0) && o.startsWith("key")) && e.target === "_blank" && (q() ? p = !0 : u = !0);
166
- let h = et() && q() && !Se() ? new KeyboardEvent("keydown", {
141
+ const Q = I(function() {
142
+ return de(/^Mac/i);
143
+ }), tt = I(function() {
144
+ return de(/^iPhone/i);
145
+ }), Ne = I(function() {
146
+ return de(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
147
+ Q() && navigator.maxTouchPoints > 1;
148
+ }), Oe = I(function() {
149
+ return tt() || Ne();
150
+ }), nt = I(function() {
151
+ return te(/AppleWebKit/i) && !ot();
152
+ }), ot = I(function() {
153
+ return te(/Chrome/i);
154
+ }), De = I(function() {
155
+ return te(/Android/i);
156
+ }), rt = I(function() {
157
+ return te(/Firefox/i);
158
+ });
159
+ function V(e, t, r = !0) {
160
+ var o, a;
161
+ let { metaKey: d, ctrlKey: u, altKey: p, shiftKey: m } = t;
162
+ rt() && (!((a = window.event) === null || a === void 0 || (o = a.type) === null || o === void 0) && o.startsWith("key")) && e.target === "_blank" && (Q() ? d = !0 : u = !0);
163
+ let g = nt() && Q() && !Ne() ? new KeyboardEvent("keydown", {
167
164
  keyIdentifier: "Enter",
168
- metaKey: p,
165
+ metaKey: d,
169
166
  ctrlKey: u,
170
- altKey: d,
171
- shiftKey: b
167
+ altKey: p,
168
+ shiftKey: m
172
169
  }) : new MouseEvent("click", {
173
- metaKey: p,
170
+ metaKey: d,
174
171
  ctrlKey: u,
175
- altKey: d,
176
- shiftKey: b,
172
+ altKey: p,
173
+ shiftKey: m,
177
174
  bubbles: !0,
178
175
  cancelable: !0
179
176
  });
180
- R.isOpening = r, U(e), e.dispatchEvent(h), R.isOpening = !1;
177
+ V.isOpening = r, R(e), e.dispatchEvent(g), V.isOpening = !1;
181
178
  }
182
- R.isOpening = !1;
183
- let L = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Set();
184
- function de() {
179
+ V.isOpening = !1;
180
+ let F = /* @__PURE__ */ new Map(), le = /* @__PURE__ */ new Set();
181
+ function me() {
185
182
  if (typeof window > "u") return;
186
183
  function e(o) {
187
184
  return "propertyName" in o;
188
185
  }
189
186
  let t = (o) => {
190
187
  if (!e(o) || !o.target) return;
191
- let i = L.get(o.target);
192
- i || (i = /* @__PURE__ */ new Set(), L.set(o.target, i), o.target.addEventListener("transitioncancel", r, {
188
+ let a = F.get(o.target);
189
+ a || (a = /* @__PURE__ */ new Set(), F.set(o.target, a), o.target.addEventListener("transitioncancel", r, {
193
190
  once: !0
194
- })), i.add(o.propertyName);
191
+ })), a.add(o.propertyName);
195
192
  }, r = (o) => {
196
193
  if (!e(o) || !o.target) return;
197
- let i = L.get(o.target);
198
- if (i && (i.delete(o.propertyName), i.size === 0 && (o.target.removeEventListener("transitioncancel", r), L.delete(o.target)), L.size === 0)) {
199
- for (let p of ie) p();
200
- ie.clear();
194
+ let a = F.get(o.target);
195
+ if (a && (a.delete(o.propertyName), a.size === 0 && (o.target.removeEventListener("transitioncancel", r), F.delete(o.target)), F.size === 0)) {
196
+ for (let d of le) d();
197
+ le.clear();
201
198
  }
202
199
  };
203
200
  document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", r);
204
201
  }
205
- typeof document < "u" && (document.readyState !== "loading" ? de() : document.addEventListener("DOMContentLoaded", de));
206
- function rt(e) {
202
+ typeof document < "u" && (document.readyState !== "loading" ? me() : document.addEventListener("DOMContentLoaded", me));
203
+ function st(e) {
207
204
  requestAnimationFrame(() => {
208
- L.size === 0 ? e() : ie.add(e);
205
+ F.size === 0 ? e() : le.add(e);
209
206
  });
210
207
  }
211
- function ot() {
212
- let e = Q(/* @__PURE__ */ new Map()), t = Y((i, p, u, d) => {
213
- let b = d != null && d.once ? (...h) => {
214
- e.current.delete(u), u(...h);
208
+ function at() {
209
+ let e = ee(/* @__PURE__ */ new Map()), t = z((a, d, u, p) => {
210
+ let m = p != null && p.once ? (...g) => {
211
+ e.current.delete(u), u(...g);
215
212
  } : u;
216
213
  e.current.set(u, {
217
- type: p,
218
- eventTarget: i,
219
- fn: b,
220
- options: d
221
- }), i.addEventListener(p, u, d);
222
- }, []), r = Y((i, p, u, d) => {
223
- var b;
224
- let h = ((b = e.current.get(u)) === null || b === void 0 ? void 0 : b.fn) || u;
225
- i.removeEventListener(p, h, d), e.current.delete(u);
226
- }, []), o = Y(() => {
227
- e.current.forEach((i, p) => {
228
- r(i.eventTarget, i.type, p, i.options);
214
+ type: d,
215
+ eventTarget: a,
216
+ fn: m,
217
+ options: p
218
+ }), a.addEventListener(d, u, p);
219
+ }, []), r = z((a, d, u, p) => {
220
+ var m;
221
+ let g = ((m = e.current.get(u)) === null || m === void 0 ? void 0 : m.fn) || u;
222
+ a.removeEventListener(d, g, p), e.current.delete(u);
223
+ }, []), o = z(() => {
224
+ e.current.forEach((a, d) => {
225
+ r(a.eventTarget, a.type, d, a.options);
229
226
  });
230
227
  }, [
231
228
  r
232
229
  ]);
233
- return X(() => o, [
230
+ return J(() => o, [
234
231
  o
235
232
  ]), {
236
233
  addGlobalListener: t,
@@ -238,7 +235,7 @@ function ot() {
238
235
  removeAllGlobalListeners: o
239
236
  };
240
237
  }
241
- function st(e, t) {
238
+ function it(e, t) {
242
239
  Pe(() => {
243
240
  if (e && e.ref && t)
244
241
  return e.ref.current = t.current, () => {
@@ -246,62 +243,62 @@ function st(e, t) {
246
243
  };
247
244
  });
248
245
  }
249
- function fe(e) {
250
- return e.mozInputSource === 0 && e.isTrusted ? !0 : Oe() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
246
+ function _e(e) {
247
+ return e.mozInputSource === 0 && e.isTrusted ? !0 : De() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
251
248
  }
252
- function it(e) {
253
- return !Oe() && e.width === 0 && e.height === 0 || e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse";
249
+ function lt(e) {
250
+ return !De() && e.width === 0 && e.height === 0 || e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse";
254
251
  }
255
- let M = "default", ae = "", z = /* @__PURE__ */ new WeakMap();
256
- function me(e) {
257
- if (Ne()) {
258
- if (M === "default") {
259
- const t = _(e);
260
- ae = t.documentElement.style.webkitUserSelect, t.documentElement.style.webkitUserSelect = "none";
252
+ let U = "default", ue = "", q = /* @__PURE__ */ new WeakMap();
253
+ function be(e) {
254
+ if (Oe()) {
255
+ if (U === "default") {
256
+ const t = K(e);
257
+ ue = t.documentElement.style.webkitUserSelect, t.documentElement.style.webkitUserSelect = "none";
261
258
  }
262
- M = "disabled";
263
- } else (e instanceof HTMLElement || e instanceof SVGElement) && (z.set(e, e.style.userSelect), e.style.userSelect = "none");
259
+ U = "disabled";
260
+ } else (e instanceof HTMLElement || e instanceof SVGElement) && (q.set(e, e.style.userSelect), e.style.userSelect = "none");
264
261
  }
265
- function V(e) {
266
- if (Ne()) {
267
- if (M !== "disabled") return;
268
- M = "restoring", setTimeout(() => {
269
- rt(() => {
270
- if (M === "restoring") {
271
- const t = _(e);
272
- t.documentElement.style.webkitUserSelect === "none" && (t.documentElement.style.webkitUserSelect = ae || ""), ae = "", M = "default";
262
+ function Y(e) {
263
+ if (Oe()) {
264
+ if (U !== "disabled") return;
265
+ U = "restoring", setTimeout(() => {
266
+ st(() => {
267
+ if (U === "restoring") {
268
+ const t = K(e);
269
+ t.documentElement.style.webkitUserSelect === "none" && (t.documentElement.style.webkitUserSelect = ue || ""), ue = "", U = "default";
273
270
  }
274
271
  });
275
272
  }, 300);
276
- } else if ((e instanceof HTMLElement || e instanceof SVGElement) && e && z.has(e)) {
277
- let t = z.get(e);
278
- e.style.userSelect === "none" && (e.style.userSelect = t), e.getAttribute("style") === "" && e.removeAttribute("style"), z.delete(e);
273
+ } else if ((e instanceof HTMLElement || e instanceof SVGElement) && e && q.has(e)) {
274
+ let t = q.get(e);
275
+ e.style.userSelect === "none" && (e.style.userSelect = t), e.getAttribute("style") === "" && e.removeAttribute("style"), q.delete(e);
279
276
  }
280
277
  }
281
- const De = Te.createContext({
278
+ const Ce = Be.createContext({
282
279
  register: () => {
283
280
  }
284
281
  });
285
- De.displayName = "PressResponderContext";
286
- function at(e, t) {
282
+ Ce.displayName = "PressResponderContext";
283
+ function ut(e, t) {
287
284
  return t.get ? t.get.call(e) : t.value;
288
285
  }
289
- function Ce(e, t, r) {
286
+ function Ke(e, t, r) {
290
287
  if (!t.has(e)) throw new TypeError("attempted to " + r + " private field on non-instance");
291
288
  return t.get(e);
292
289
  }
293
- function lt(e, t) {
294
- var r = Ce(e, t, "get");
295
- return at(e, r);
290
+ function ct(e, t) {
291
+ var r = Ke(e, t, "get");
292
+ return ut(e, r);
296
293
  }
297
- function ut(e, t) {
294
+ function dt(e, t) {
298
295
  if (t.has(e))
299
296
  throw new TypeError("Cannot initialize the same private elements twice on an object");
300
297
  }
301
- function ct(e, t, r) {
302
- ut(e, t), t.set(e, r);
303
- }
304
298
  function pt(e, t, r) {
299
+ dt(e, t), t.set(e, r);
300
+ }
301
+ function ft(e, t, r) {
305
302
  if (t.set) t.set.call(e, r);
306
303
  else {
307
304
  if (!t.writable)
@@ -309,50 +306,55 @@ function pt(e, t, r) {
309
306
  t.value = r;
310
307
  }
311
308
  }
312
- function be(e, t, r) {
313
- var o = Ce(e, t, "set");
314
- return pt(e, o, r), r;
309
+ function ge(e, t, r) {
310
+ var o = Ke(e, t, "set");
311
+ return ft(e, o, r), r;
315
312
  }
316
- function dt(e) {
317
- let t = Ke(De);
313
+ function mt(e) {
314
+ let t = Le(Ce);
318
315
  if (t) {
319
316
  let { register: r, ...o } = t;
320
- e = H(o, e), r();
317
+ e = G(o, e), r();
321
318
  }
322
- return st(t, e.ref), e;
319
+ return it(t, e.ref), e;
323
320
  }
324
- var W = /* @__PURE__ */ new WeakMap();
325
- class j {
321
+ var j = /* @__PURE__ */ new WeakMap();
322
+ class X {
326
323
  continuePropagation() {
327
- be(this, W, !1);
324
+ ge(this, j, !1);
328
325
  }
329
326
  get shouldStopPropagation() {
330
- return lt(this, W);
327
+ return ct(this, j);
331
328
  }
332
- constructor(t, r, o) {
333
- ct(this, W, {
329
+ constructor(t, r, o, a) {
330
+ pt(this, j, {
334
331
  writable: !0,
335
332
  value: void 0
336
- }), 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;
333
+ }), ge(this, j, !0);
334
+ var d;
335
+ let u = (d = a == null ? void 0 : a.target) !== null && d !== void 0 ? d : o.currentTarget;
336
+ const p = u == null ? void 0 : u.getBoundingClientRect();
337
+ let m, g = 0, b, E = null;
338
+ o.clientX != null && o.clientY != null && (b = o.clientX, E = o.clientY), p && (b != null && E != null ? (m = b - p.left, g = E - p.top) : (m = p.width / 2, g = p.height / 2)), 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, this.x = m, this.y = g;
337
339
  }
338
340
  }
339
- const ge = Symbol("linkClicked");
340
- function ft(e) {
341
+ const ve = Symbol("linkClicked");
342
+ function _t(e) {
341
343
  let {
342
344
  onPress: t,
343
345
  onPressChange: r,
344
346
  onPressStart: o,
345
- onPressEnd: i,
346
- onPressUp: p,
347
+ onPressEnd: a,
348
+ onPressUp: d,
347
349
  isDisabled: u,
348
- isPressed: d,
349
- preventFocusOnPress: b,
350
- shouldCancelOnPointerExit: h,
351
- allowTextSelectionOnPress: g,
350
+ isPressed: p,
351
+ preventFocusOnPress: m,
352
+ shouldCancelOnPointerExit: g,
353
+ allowTextSelectionOnPress: b,
352
354
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
353
- ref: D,
355
+ ref: E,
354
356
  ...x
355
- } = dt(e), [m, w] = Be(!1), T = Q({
357
+ } = mt(e), [_, P] = $e(!1), w = ee({
356
358
  isPressed: !1,
357
359
  ignoreEmulatedMouseEvents: !1,
358
360
  ignoreClickAfterPress: !1,
@@ -362,126 +364,126 @@ function ft(e) {
362
364
  target: null,
363
365
  isOverTarget: !1,
364
366
  pointerType: null
365
- }), { addGlobalListener: $, removeAllGlobalListeners: S } = ot(), P = F((n, f) => {
366
- let B = T.current;
367
- if (u || B.didFirePressStart) return !1;
367
+ }), { addGlobalListener: B, removeAllGlobalListeners: S } = at(), $ = H((n, f) => {
368
+ let T = w.current;
369
+ if (u || T.didFirePressStart) return !1;
368
370
  let l = !0;
369
- if (B.isTriggeringEvent = !0, o) {
370
- let v = new j("pressstart", f, n);
371
+ if (T.isTriggeringEvent = !0, o) {
372
+ let v = new X("pressstart", f, n);
371
373
  o(v), l = v.shouldStopPropagation;
372
374
  }
373
- return r && r(!0), B.isTriggeringEvent = !1, B.didFirePressStart = !0, w(!0), l;
374
- }), E = F((n, f, B = !0) => {
375
- let l = T.current;
375
+ return r && r(!0), T.isTriggeringEvent = !1, T.didFirePressStart = !0, P(!0), l;
376
+ }), k = H((n, f, T = !0) => {
377
+ let l = w.current;
376
378
  if (!l.didFirePressStart) return !1;
377
379
  l.ignoreClickAfterPress = !0, l.didFirePressStart = !1, l.isTriggeringEvent = !0;
378
380
  let v = !0;
379
- if (i) {
380
- let s = new j("pressend", f, n);
381
- i(s), v = s.shouldStopPropagation;
381
+ if (a) {
382
+ let s = new X("pressend", f, n);
383
+ a(s), v = s.shouldStopPropagation;
382
384
  }
383
- if (r && r(!1), w(!1), t && B && !u) {
384
- let s = new j("press", f, n);
385
+ if (r && r(!1), P(!1), t && T && !u) {
386
+ let s = new X("press", f, n);
385
387
  t(s), v && (v = s.shouldStopPropagation);
386
388
  }
387
389
  return l.isTriggeringEvent = !1, v;
388
- }), O = F((n, f) => {
389
- let B = T.current;
390
+ }), O = H((n, f) => {
391
+ let T = w.current;
390
392
  if (u) return !1;
391
- if (p) {
392
- B.isTriggeringEvent = !0;
393
- let l = new j("pressup", f, n);
394
- return p(l), B.isTriggeringEvent = !1, l.shouldStopPropagation;
393
+ if (d) {
394
+ T.isTriggeringEvent = !0;
395
+ let l = new X("pressup", f, n);
396
+ return d(l), T.isTriggeringEvent = !1, l.shouldStopPropagation;
395
397
  }
396
398
  return !0;
397
- }), N = F((n) => {
398
- let f = T.current;
399
- 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));
400
- }), I = F((n) => {
401
- h && N(n);
402
- }), te = $e(() => {
403
- let n = T.current, f = {
399
+ }), N = H((n) => {
400
+ let f = w.current;
401
+ f.isPressed && f.target && (f.isOverTarget && f.pointerType != null && k(D(f.target, n), f.pointerType, !1), f.isPressed = !1, f.isOverTarget = !1, f.activePointerId = null, f.pointerType = null, S(), b || Y(f.target));
402
+ }), A = H((n) => {
403
+ g && N(n);
404
+ }), oe = Ee(() => {
405
+ let n = w.current, f = {
404
406
  onKeyDown(l) {
405
- if (ne(l.nativeEvent, l.currentTarget) && l.currentTarget.contains(l.target)) {
407
+ if (re(l.nativeEvent, l.currentTarget) && l.currentTarget.contains(l.target)) {
406
408
  var v;
407
409
  ye(l.target, l.key) && l.preventDefault();
408
410
  let s = !0;
409
411
  if (!n.isPressed && !l.repeat) {
410
- n.target = l.currentTarget, n.isPressed = !0, s = P(l, "keyboard");
411
- let a = l.currentTarget, k = (K) => {
412
- ne(K, a) && !K.repeat && a.contains(K.target) && n.target && O(C(n.target, K), "keyboard");
412
+ n.target = l.currentTarget, n.isPressed = !0, s = $(l, "keyboard");
413
+ let i = l.currentTarget, y = (L) => {
414
+ re(L, i) && !L.repeat && i.contains(L.target) && n.target && O(D(n.target, L), "keyboard");
413
415
  };
414
- $(_(l.currentTarget), "keyup", we(k, B), !0);
416
+ B(K(l.currentTarget), "keyup", xe(y, T), !0);
415
417
  }
416
- s && l.stopPropagation(), l.metaKey && q() && ((v = n.metaKeyEvents) === null || v === void 0 || v.set(l.key, l.nativeEvent));
418
+ s && l.stopPropagation(), l.metaKey && Q() && ((v = n.metaKeyEvents) === null || v === void 0 || v.set(l.key, l.nativeEvent));
417
419
  } else l.key === "Meta" && (n.metaKeyEvents = /* @__PURE__ */ new Map());
418
420
  },
419
421
  onClick(l) {
420
- if (!(l && !l.currentTarget.contains(l.target)) && l && l.button === 0 && !n.isTriggeringEvent && !R.isOpening) {
422
+ if (!(l && !l.currentTarget.contains(l.target)) && l && l.button === 0 && !n.isTriggeringEvent && !V.isOpening) {
421
423
  let v = !0;
422
- if (u && l.preventDefault(), !n.ignoreClickAfterPress && !n.ignoreEmulatedMouseEvents && !n.isPressed && (n.pointerType === "virtual" || fe(l.nativeEvent))) {
423
- !u && !b && U(l.currentTarget);
424
- let s = P(l, "virtual"), a = O(l, "virtual"), k = E(l, "virtual");
425
- v = s && a && k;
424
+ if (u && l.preventDefault(), !n.ignoreClickAfterPress && !n.ignoreEmulatedMouseEvents && !n.isPressed && (n.pointerType === "virtual" || _e(l.nativeEvent))) {
425
+ !u && !m && R(l.currentTarget);
426
+ let s = $(l, "virtual"), i = O(l, "virtual"), y = k(l, "virtual");
427
+ v = s && i && y;
426
428
  }
427
429
  n.ignoreEmulatedMouseEvents = !1, n.ignoreClickAfterPress = !1, v && l.stopPropagation();
428
430
  }
429
431
  }
430
- }, B = (l) => {
432
+ }, T = (l) => {
431
433
  var v;
432
- if (n.isPressed && n.target && ne(l, n.target)) {
434
+ if (n.isPressed && n.target && re(l, n.target)) {
433
435
  var s;
434
436
  ye(l.target, l.key) && l.preventDefault();
435
- let k = l.target;
436
- E(C(n.target, l), "keyboard", n.target.contains(k)), S(), l.key !== "Enter" && ce(n.target) && n.target.contains(k) && !l[ge] && (l[ge] = !0, R(n.target, l, !1)), n.isPressed = !1, (s = n.metaKeyEvents) === null || s === void 0 || s.delete(l.key);
437
+ let y = l.target;
438
+ k(D(n.target, l), "keyboard", n.target.contains(y)), S(), l.key !== "Enter" && pe(n.target) && n.target.contains(y) && !l[ve] && (l[ve] = !0, V(n.target, l, !1)), n.isPressed = !1, (s = n.metaKeyEvents) === null || s === void 0 || s.delete(l.key);
437
439
  } else if (l.key === "Meta" && (!((v = n.metaKeyEvents) === null || v === void 0) && v.size)) {
438
- var a;
439
- let k = n.metaKeyEvents;
440
+ var i;
441
+ let y = n.metaKeyEvents;
440
442
  n.metaKeyEvents = void 0;
441
- for (let K of k.values()) (a = n.target) === null || a === void 0 || a.dispatchEvent(new KeyboardEvent("keyup", K));
443
+ for (let L of y.values()) (i = n.target) === null || i === void 0 || i.dispatchEvent(new KeyboardEvent("keyup", L));
442
444
  }
443
445
  };
444
446
  if (typeof PointerEvent < "u") {
445
- f.onPointerDown = (a) => {
446
- if (a.button !== 0 || !a.currentTarget.contains(a.target)) return;
447
- if (it(a.nativeEvent)) {
447
+ f.onPointerDown = (i) => {
448
+ if (i.button !== 0 || !i.currentTarget.contains(i.target)) return;
449
+ if (lt(i.nativeEvent)) {
448
450
  n.pointerType = "virtual";
449
451
  return;
450
452
  }
451
- re(a.currentTarget) && a.preventDefault(), n.pointerType = a.pointerType;
452
- let k = !0;
453
- 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), k = P(a, n.pointerType), $(_(a.currentTarget), "pointermove", l, !1), $(_(a.currentTarget), "pointerup", v, !1), $(_(a.currentTarget), "pointercancel", s, !1)), k && a.stopPropagation();
454
- }, f.onMouseDown = (a) => {
455
- a.currentTarget.contains(a.target) && a.button === 0 && (re(a.currentTarget) && a.preventDefault(), a.stopPropagation());
456
- }, f.onPointerUp = (a) => {
457
- !a.currentTarget.contains(a.target) || n.pointerType === "virtual" || a.button === 0 && A(a, a.currentTarget) && O(a, n.pointerType || a.pointerType);
453
+ se(i.currentTarget) && i.preventDefault(), n.pointerType = i.pointerType;
454
+ let y = !0;
455
+ n.isPressed || (n.isPressed = !0, n.isOverTarget = !0, n.activePointerId = i.pointerId, n.target = i.currentTarget, !u && !m && R(i.currentTarget), b || be(n.target), y = $(i, n.pointerType), B(K(i.currentTarget), "pointermove", l, !1), B(K(i.currentTarget), "pointerup", v, !1), B(K(i.currentTarget), "pointercancel", s, !1)), y && i.stopPropagation();
456
+ }, f.onMouseDown = (i) => {
457
+ i.currentTarget.contains(i.target) && i.button === 0 && (se(i.currentTarget) && i.preventDefault(), i.stopPropagation());
458
+ }, f.onPointerUp = (i) => {
459
+ !i.currentTarget.contains(i.target) || n.pointerType === "virtual" || i.button === 0 && M(i, i.currentTarget) && O(i, n.pointerType || i.pointerType);
458
460
  };
459
- let l = (a) => {
460
- 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)));
461
- }, v = (a) => {
462
- 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));
463
- }, s = (a) => {
464
- N(a);
461
+ let l = (i) => {
462
+ i.pointerId === n.activePointerId && (n.target && M(i, n.target) ? !n.isOverTarget && n.pointerType != null && (n.isOverTarget = !0, $(D(n.target, i), n.pointerType)) : n.target && n.isOverTarget && n.pointerType != null && (n.isOverTarget = !1, k(D(n.target, i), n.pointerType, !1), A(i)));
463
+ }, v = (i) => {
464
+ i.pointerId === n.activePointerId && n.isPressed && i.button === 0 && n.target && (M(i, n.target) && n.pointerType != null ? k(D(n.target, i), n.pointerType) : n.isOverTarget && n.pointerType != null && k(D(n.target, i), n.pointerType, !1), n.isPressed = !1, n.isOverTarget = !1, n.activePointerId = null, n.pointerType = null, S(), b || Y(n.target));
465
+ }, s = (i) => {
466
+ N(i);
465
467
  };
466
- f.onDragStart = (a) => {
467
- a.currentTarget.contains(a.target) && N(a);
468
+ f.onDragStart = (i) => {
469
+ i.currentTarget.contains(i.target) && N(i);
468
470
  };
469
471
  } else {
470
472
  f.onMouseDown = (s) => {
471
473
  if (s.button !== 0 || !s.currentTarget.contains(s.target)) return;
472
- if (re(s.currentTarget) && s.preventDefault(), n.ignoreEmulatedMouseEvents) {
474
+ if (se(s.currentTarget) && s.preventDefault(), n.ignoreEmulatedMouseEvents) {
473
475
  s.stopPropagation();
474
476
  return;
475
477
  }
476
- 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);
478
+ n.isPressed = !0, n.isOverTarget = !0, n.target = s.currentTarget, n.pointerType = _e(s.nativeEvent) ? "virtual" : "mouse", !u && !m && R(s.currentTarget), $(s, n.pointerType) && s.stopPropagation(), B(K(s.currentTarget), "mouseup", l, !1);
477
479
  }, f.onMouseEnter = (s) => {
478
480
  if (!s.currentTarget.contains(s.target)) return;
479
- let a = !0;
480
- n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !0, a = P(s, n.pointerType)), a && s.stopPropagation();
481
+ let i = !0;
482
+ n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !0, i = $(s, n.pointerType)), i && s.stopPropagation();
481
483
  }, f.onMouseLeave = (s) => {
482
484
  if (!s.currentTarget.contains(s.target)) return;
483
- let a = !0;
484
- n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !1, a = E(s, n.pointerType, !1), I(s)), a && s.stopPropagation();
485
+ let i = !0;
486
+ n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !1, i = k(s, n.pointerType, !1), A(s)), i && s.stopPropagation();
485
487
  }, f.onMouseUp = (s) => {
486
488
  s.currentTarget.contains(s.target) && !n.ignoreEmulatedMouseEvents && s.button === 0 && O(s, n.pointerType || "mouse");
487
489
  };
@@ -491,32 +493,32 @@ function ft(e) {
491
493
  n.ignoreEmulatedMouseEvents = !1;
492
494
  return;
493
495
  }
494
- 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;
496
+ n.target && M(s, n.target) && n.pointerType != null ? k(D(n.target, s), n.pointerType) : n.target && n.isOverTarget && n.pointerType != null && k(D(n.target, s), n.pointerType, !1), n.isOverTarget = !1;
495
497
  }
496
498
  };
497
499
  f.onTouchStart = (s) => {
498
500
  if (!s.currentTarget.contains(s.target)) return;
499
- let a = mt(s.nativeEvent);
500
- if (!a) return;
501
- 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);
501
+ let i = bt(s.nativeEvent);
502
+ if (!i) return;
503
+ n.activePointerId = i.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), $(C(n.target, s), n.pointerType) && s.stopPropagation(), B(ie(s.currentTarget), "scroll", v, !0);
502
504
  }, f.onTouchMove = (s) => {
503
505
  if (!s.currentTarget.contains(s.target)) return;
504
506
  if (!n.isPressed) {
505
507
  s.stopPropagation();
506
508
  return;
507
509
  }
508
- let a = ve(s.nativeEvent, n.activePointerId), k = !0;
509
- a && A(a, s.currentTarget) ? !n.isOverTarget && n.pointerType != null && (n.isOverTarget = !0, k = P(s, n.pointerType)) : n.isOverTarget && n.pointerType != null && (n.isOverTarget = !1, k = E(s, n.pointerType, !1), I(s)), k && s.stopPropagation();
510
+ let i = he(s.nativeEvent, n.activePointerId), y = !0;
511
+ i && M(i, s.currentTarget) ? !n.isOverTarget && n.pointerType != null && (n.isOverTarget = !0, y = $(C(n.target, s), n.pointerType)) : n.isOverTarget && n.pointerType != null && (n.isOverTarget = !1, y = k(C(n.target, s), n.pointerType, !1), A(C(n.target, s))), y && s.stopPropagation();
510
512
  }, f.onTouchEnd = (s) => {
511
513
  if (!s.currentTarget.contains(s.target)) return;
512
514
  if (!n.isPressed) {
513
515
  s.stopPropagation();
514
516
  return;
515
517
  }
516
- let a = ve(s.nativeEvent, n.activePointerId), k = !0;
517
- a && A(a, s.currentTarget) && n.pointerType != null ? (O(s, n.pointerType), k = E(s, n.pointerType)) : n.isOverTarget && n.pointerType != null && (k = E(s, n.pointerType, !1)), k && s.stopPropagation(), n.isPressed = !1, n.activePointerId = null, n.isOverTarget = !1, n.ignoreEmulatedMouseEvents = !0, n.target && !g && V(n.target), S();
518
+ let i = he(s.nativeEvent, n.activePointerId), y = !0;
519
+ i && M(i, s.currentTarget) && n.pointerType != null ? (O(C(n.target, s), n.pointerType), y = k(C(n.target, s), n.pointerType)) : n.isOverTarget && n.pointerType != null && (y = k(C(n.target, s), n.pointerType, !1)), y && s.stopPropagation(), n.isPressed = !1, n.activePointerId = null, n.isOverTarget = !1, n.ignoreEmulatedMouseEvents = !0, n.target && !b && Y(n.target), S();
518
520
  }, f.onTouchCancel = (s) => {
519
- s.currentTarget.contains(s.target) && (s.stopPropagation(), n.isPressed && N(s));
521
+ s.currentTarget.contains(s.target) && (s.stopPropagation(), n.isPressed && N(C(n.target, s)));
520
522
  };
521
523
  let v = (s) => {
522
524
  n.isPressed && s.target.contains(n.target) && N({
@@ -533,57 +535,72 @@ function ft(e) {
533
535
  }
534
536
  return f;
535
537
  }, [
536
- $,
538
+ B,
537
539
  u,
538
- b,
540
+ m,
539
541
  S,
540
- g,
542
+ b,
541
543
  N,
542
- I,
543
- E,
544
- P,
544
+ A,
545
+ k,
546
+ $,
545
547
  O
546
548
  ]);
547
- return X(() => () => {
549
+ return J(() => () => {
548
550
  var n;
549
- g || V((n = T.current.target) !== null && n !== void 0 ? n : void 0);
551
+ b || Y((n = w.current.target) !== null && n !== void 0 ? n : void 0);
550
552
  }, [
551
- g
553
+ b
552
554
  ]), {
553
- isPressed: d || m,
554
- pressProps: H(x, te)
555
+ isPressed: p || _,
556
+ pressProps: G(x, oe)
555
557
  };
556
558
  }
557
- function ce(e) {
559
+ function pe(e) {
558
560
  return e.tagName === "A" && e.hasAttribute("href");
559
561
  }
560
- function ne(e, t) {
561
- const { key: r, code: o } = e, i = t, p = i.getAttribute("role");
562
- 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
563
- !((p === "link" || !p && ce(i)) && r !== "Enter");
562
+ function re(e, t) {
563
+ const { key: r, code: o } = e, a = t, d = a.getAttribute("role");
564
+ return (r === "Enter" || r === " " || r === "Spacebar" || o === "Space") && !(a instanceof ie(a).HTMLInputElement && !Ie(a, r) || a instanceof ie(a).HTMLTextAreaElement || a.isContentEditable) && // Links should only trigger with Enter key
565
+ !((d === "link" || !d && pe(a)) && r !== "Enter");
564
566
  }
565
- function mt(e) {
567
+ function bt(e) {
566
568
  const { targetTouches: t } = e;
567
569
  return t.length > 0 ? t[0] : null;
568
570
  }
569
- function ve(e, t) {
571
+ function he(e, t) {
570
572
  const r = e.changedTouches;
571
573
  for (let o = 0; o < r.length; o++) {
572
- const i = r[o];
573
- if (i.identifier === t) return i;
574
+ const a = r[o];
575
+ if (a.identifier === t) return a;
574
576
  }
575
577
  return null;
576
578
  }
577
579
  function C(e, t) {
580
+ let r = 0, o = 0;
581
+ return t.targetTouches && t.targetTouches.length === 1 && (r = t.targetTouches[0].clientX, o = t.targetTouches[0].clientY), {
582
+ currentTarget: e,
583
+ shiftKey: t.shiftKey,
584
+ ctrlKey: t.ctrlKey,
585
+ metaKey: t.metaKey,
586
+ altKey: t.altKey,
587
+ clientX: r,
588
+ clientY: o
589
+ };
590
+ }
591
+ function D(e, t) {
592
+ let r = t.clientX, o = t.clientY;
578
593
  return {
579
594
  currentTarget: e,
580
595
  shiftKey: t.shiftKey,
581
596
  ctrlKey: t.ctrlKey,
582
597
  metaKey: t.metaKey,
583
- altKey: t.altKey
598
+ altKey: t.altKey,
599
+ clientX: r,
600
+ clientY: o
584
601
  };
585
602
  }
586
- function bt(e) {
603
+ function gt(e) {
587
604
  let t = 0, r = 0;
588
605
  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), {
589
606
  top: e.clientY - r,
@@ -592,20 +609,20 @@ function bt(e) {
592
609
  left: e.clientX - t
593
610
  };
594
611
  }
595
- function gt(e, t) {
612
+ function vt(e, t) {
596
613
  return !(e.left > t.right || t.left > e.right || e.top > t.bottom || t.top > e.bottom);
597
614
  }
598
- function A(e, t) {
599
- let r = t.getBoundingClientRect(), o = bt(e);
600
- return gt(r, o);
615
+ function M(e, t) {
616
+ let r = t.getBoundingClientRect(), o = gt(e);
617
+ return vt(r, o);
601
618
  }
602
- function re(e) {
619
+ function se(e) {
603
620
  return !(e instanceof HTMLElement) || !e.hasAttribute("draggable");
604
621
  }
605
622
  function ye(e, t) {
606
- return e instanceof HTMLInputElement ? !_e(e, t) : e instanceof HTMLButtonElement ? e.type !== "submit" && e.type !== "reset" : !ce(e);
623
+ return e instanceof HTMLInputElement ? !Ie(e, t) : e instanceof HTMLButtonElement ? e.type !== "submit" && e.type !== "reset" : !pe(e);
607
624
  }
608
- const vt = /* @__PURE__ */ new Set([
625
+ const ht = /* @__PURE__ */ new Set([
609
626
  "checkbox",
610
627
  "radio",
611
628
  "range",
@@ -616,143 +633,143 @@ const vt = /* @__PURE__ */ new Set([
616
633
  "submit",
617
634
  "reset"
618
635
  ]);
619
- function _e(e, t) {
620
- return e.type === "checkbox" || e.type === "radio" ? t === " " : vt.has(e.type);
636
+ function Ie(e, t) {
637
+ return e.type === "checkbox" || e.type === "radio" ? t === " " : ht.has(e.type);
621
638
  }
622
- let J = !1, oe = 0;
623
- function le() {
624
- J = !0, setTimeout(() => {
625
- J = !1;
639
+ let Z = !1, ae = 0;
640
+ function ce() {
641
+ Z = !0, setTimeout(() => {
642
+ Z = !1;
626
643
  }, 50);
627
644
  }
628
- function he(e) {
629
- e.pointerType === "touch" && le();
645
+ function ke(e) {
646
+ e.pointerType === "touch" && ce();
630
647
  }
631
648
  function yt() {
632
649
  if (!(typeof document > "u"))
633
- return typeof PointerEvent < "u" ? document.addEventListener("pointerup", he) : document.addEventListener("touchend", le), oe++, () => {
634
- oe--, !(oe > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup", he) : document.removeEventListener("touchend", le));
650
+ return typeof PointerEvent < "u" ? document.addEventListener("pointerup", ke) : document.addEventListener("touchend", ce), ae++, () => {
651
+ ae--, !(ae > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup", ke) : document.removeEventListener("touchend", ce));
635
652
  };
636
653
  }
637
- function ht(e) {
638
- let { onHoverStart: t, onHoverChange: r, onHoverEnd: o, isDisabled: i } = e, [p, u] = Be(!1), d = Q({
654
+ function kt(e) {
655
+ let { onHoverStart: t, onHoverChange: r, onHoverEnd: o, isDisabled: a } = e, [d, u] = $e(!1), p = ee({
639
656
  isHovered: !1,
640
657
  ignoreEmulatedMouseEvents: !1,
641
658
  pointerType: "",
642
659
  target: null
643
660
  }).current;
644
- X(yt, []);
645
- let { hoverProps: b, triggerHoverEnd: h } = $e(() => {
646
- let g = (m, w) => {
647
- if (d.pointerType = w, i || w === "touch" || d.isHovered || !m.currentTarget.contains(m.target)) return;
648
- d.isHovered = !0;
649
- let T = m.currentTarget;
650
- d.target = T, t && t({
661
+ J(yt, []);
662
+ let { hoverProps: m, triggerHoverEnd: g } = Ee(() => {
663
+ let b = (_, P) => {
664
+ if (p.pointerType = P, a || P === "touch" || p.isHovered || !_.currentTarget.contains(_.target)) return;
665
+ p.isHovered = !0;
666
+ let w = _.currentTarget;
667
+ p.target = w, t && t({
651
668
  type: "hoverstart",
652
- target: T,
653
- pointerType: w
669
+ target: w,
670
+ pointerType: P
654
671
  }), r && r(!0), u(!0);
655
- }, D = (m, w) => {
656
- if (d.pointerType = "", d.target = null, w === "touch" || !d.isHovered) return;
657
- d.isHovered = !1;
658
- let T = m.currentTarget;
672
+ }, E = (_, P) => {
673
+ if (p.pointerType = "", p.target = null, P === "touch" || !p.isHovered) return;
674
+ p.isHovered = !1;
675
+ let w = _.currentTarget;
659
676
  o && o({
660
677
  type: "hoverend",
661
- target: T,
662
- pointerType: w
678
+ target: w,
679
+ pointerType: P
663
680
  }), r && r(!1), u(!1);
664
681
  }, x = {};
665
- return typeof PointerEvent < "u" ? (x.onPointerEnter = (m) => {
666
- J && m.pointerType === "mouse" || g(m, m.pointerType);
667
- }, x.onPointerLeave = (m) => {
668
- !i && m.currentTarget.contains(m.target) && D(m, m.pointerType);
682
+ return typeof PointerEvent < "u" ? (x.onPointerEnter = (_) => {
683
+ Z && _.pointerType === "mouse" || b(_, _.pointerType);
684
+ }, x.onPointerLeave = (_) => {
685
+ !a && _.currentTarget.contains(_.target) && E(_, _.pointerType);
669
686
  }) : (x.onTouchStart = () => {
670
- d.ignoreEmulatedMouseEvents = !0;
671
- }, x.onMouseEnter = (m) => {
672
- !d.ignoreEmulatedMouseEvents && !J && g(m, "mouse"), d.ignoreEmulatedMouseEvents = !1;
673
- }, x.onMouseLeave = (m) => {
674
- !i && m.currentTarget.contains(m.target) && D(m, "mouse");
687
+ p.ignoreEmulatedMouseEvents = !0;
688
+ }, x.onMouseEnter = (_) => {
689
+ !p.ignoreEmulatedMouseEvents && !Z && b(_, "mouse"), p.ignoreEmulatedMouseEvents = !1;
690
+ }, x.onMouseLeave = (_) => {
691
+ !a && _.currentTarget.contains(_.target) && E(_, "mouse");
675
692
  }), {
676
693
  hoverProps: x,
677
- triggerHoverEnd: D
694
+ triggerHoverEnd: E
678
695
  };
679
696
  }, [
680
697
  t,
681
698
  r,
682
699
  o,
683
- i,
684
- d
700
+ a,
701
+ p
685
702
  ]);
686
- return X(() => {
687
- i && h({
688
- currentTarget: d.target
689
- }, d.pointerType);
703
+ return J(() => {
704
+ a && g({
705
+ currentTarget: p.target
706
+ }, p.pointerType);
690
707
  }, [
691
- i
708
+ a
692
709
  ]), {
693
- hoverProps: b,
694
- isHovered: p
710
+ hoverProps: m,
711
+ isHovered: d
695
712
  };
696
713
  }
697
- function kt(e, t) {
714
+ function wt(e, t) {
698
715
  let {
699
716
  elementType: r = "button",
700
717
  isDisabled: o,
701
- onPress: i,
702
- onPressStart: p,
718
+ onPress: a,
719
+ onPressStart: d,
703
720
  onPressEnd: u,
704
- onPressUp: d,
705
- onPressChange: b,
706
- preventFocusOnPress: h,
707
- allowFocusWhenDisabled: g,
721
+ onPressUp: p,
722
+ onPressChange: m,
723
+ preventFocusOnPress: g,
724
+ allowFocusWhenDisabled: b,
708
725
  // @ts-ignore
709
- onClick: D,
726
+ onClick: E,
710
727
  href: x,
711
- target: m,
712
- rel: w,
713
- type: T = "button"
714
- } = e, $;
715
- r === "button" ? $ = {
716
- type: T,
728
+ target: _,
729
+ rel: P,
730
+ type: w = "button"
731
+ } = e, B;
732
+ r === "button" ? B = {
733
+ type: w,
717
734
  disabled: o
718
- } : $ = {
735
+ } : B = {
719
736
  role: "button",
720
737
  tabIndex: o ? void 0 : 0,
721
738
  href: r === "a" && o ? void 0 : x,
722
- target: r === "a" ? m : void 0,
723
- type: r === "input" ? T : void 0,
739
+ target: r === "a" ? _ : void 0,
740
+ type: r === "input" ? w : void 0,
724
741
  disabled: r === "input" ? o : void 0,
725
742
  "aria-disabled": !o || r === "input" ? void 0 : o,
726
- rel: r === "a" ? w : void 0
743
+ rel: r === "a" ? P : void 0
727
744
  };
728
- let { pressProps: S, isPressed: P } = ft({
729
- onPressStart: p,
745
+ let { pressProps: S, isPressed: $ } = _t({
746
+ onPressStart: d,
730
747
  onPressEnd: u,
731
- onPressChange: b,
732
- onPress: i,
733
- onPressUp: d,
748
+ onPressChange: m,
749
+ onPress: a,
750
+ onPressUp: p,
734
751
  isDisabled: o,
735
- preventFocusOnPress: h,
752
+ preventFocusOnPress: g,
736
753
  ref: t
737
- }), { focusableProps: E } = He(e, t);
738
- g && (E.tabIndex = o ? -1 : E.tabIndex);
739
- let O = H(E, S, Xe(e, {
754
+ }), { focusableProps: k } = Ge(e, t);
755
+ b && (k.tabIndex = o ? -1 : k.tabIndex);
756
+ let O = G(k, S, Je(e, {
740
757
  labelable: !0
741
758
  }));
742
759
  return {
743
- isPressed: P,
744
- buttonProps: H($, O, {
760
+ isPressed: $,
761
+ buttonProps: G(B, O, {
745
762
  "aria-haspopup": e["aria-haspopup"],
746
763
  "aria-expanded": e["aria-expanded"],
747
764
  "aria-controls": e["aria-controls"],
748
765
  "aria-pressed": e["aria-pressed"],
749
766
  onClick: (N) => {
750
- D && (D(N), console.warn("onClick is deprecated, please use onPress"));
767
+ E && (E(N), console.warn("onClick is deprecated, please use onPress"));
751
768
  }
752
769
  })
753
770
  };
754
771
  }
755
- function Et(e, t, r) {
772
+ function Tt(e, t, r) {
756
773
  return t in e ? Object.defineProperty(e, t, {
757
774
  value: r,
758
775
  enumerable: !0,
@@ -760,117 +777,117 @@ function Et(e, t, r) {
760
777
  writable: !0
761
778
  }) : e[t] = r, e;
762
779
  }
763
- function ke(e, t) {
780
+ function we(e, t) {
764
781
  var r = Object.keys(e);
765
782
  if (Object.getOwnPropertySymbols) {
766
783
  var o = Object.getOwnPropertySymbols(e);
767
- t && (o = o.filter(function(i) {
768
- return Object.getOwnPropertyDescriptor(e, i).enumerable;
784
+ t && (o = o.filter(function(a) {
785
+ return Object.getOwnPropertyDescriptor(e, a).enumerable;
769
786
  })), r.push.apply(r, o);
770
787
  }
771
788
  return r;
772
789
  }
773
- function Ee(e) {
790
+ function Te(e) {
774
791
  for (var t = 1; t < arguments.length; t++) {
775
792
  var r = arguments[t] != null ? arguments[t] : {};
776
- t % 2 ? ke(Object(r), !0).forEach(function(o) {
777
- Et(e, o, r[o]);
778
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ke(Object(r)).forEach(function(o) {
793
+ t % 2 ? we(Object(r), !0).forEach(function(o) {
794
+ Tt(e, o, r[o]);
795
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : we(Object(r)).forEach(function(o) {
779
796
  Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(r, o));
780
797
  });
781
798
  }
782
799
  return e;
783
800
  }
784
- var Tt = (e, t, r) => {
801
+ var Bt = (e, t, r) => {
785
802
  for (var o of Object.keys(e)) {
786
- var i;
787
- if (e[o] !== ((i = t[o]) !== null && i !== void 0 ? i : r[o]))
803
+ var a;
804
+ if (e[o] !== ((a = t[o]) !== null && a !== void 0 ? a : r[o]))
788
805
  return !1;
789
806
  }
790
807
  return !0;
791
- }, ee = (e) => (t) => {
792
- var r = e.defaultClassName, o = Ee(Ee({}, e.defaultVariants), t);
793
- for (var i in o) {
794
- var p, u = (p = o[i]) !== null && p !== void 0 ? p : e.defaultVariants[i];
808
+ }, ne = (e) => (t) => {
809
+ var r = e.defaultClassName, o = Te(Te({}, e.defaultVariants), t);
810
+ for (var a in o) {
811
+ var d, u = (d = o[a]) !== null && d !== void 0 ? d : e.defaultVariants[a];
795
812
  if (u != null) {
796
- var d = u;
797
- typeof d == "boolean" && (d = d === !0 ? "true" : "false");
798
- var b = (
813
+ var p = u;
814
+ typeof p == "boolean" && (p = p === !0 ? "true" : "false");
815
+ var m = (
799
816
  // @ts-expect-error
800
- e.variantClassNames[i][d]
817
+ e.variantClassNames[a][p]
801
818
  );
802
- b && (r += " " + b);
819
+ m && (r += " " + m);
803
820
  }
804
821
  }
805
- for (var [h, g] of e.compoundVariants)
806
- Tt(h, o, e.defaultVariants) && (r += " " + g);
822
+ for (var [g, b] of e.compoundVariants)
823
+ Bt(g, o, e.defaultVariants) && (r += " " + b);
807
824
  return r;
808
- }, 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 = "_125pcxy11", wt = ee({ defaultClassName: "_125pcxy12", variantClassNames: { spinning: { true: "_125pcxy13", false: "_125pcxy14" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] }), xt = ee({ defaultClassName: "_125pcxys", variantClassNames: { spinning: { true: "_125pcxyt", false: "_125pcxyu" }, kind: { icon: "_125pcxyv", default: "_125pcxyw", delete: "_125pcxyx", key: "_125pcxyy", confirm: "_125pcxyz", link: "_125pcxy10" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] });
809
- function St({
825
+ }, $t = ne({ defaultClassName: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy0", variantClassNames: { disabled: { true: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy1", false: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy2" }, kind: { default: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy3", link: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy4", confirm: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy5", delete: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy6", key: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy7", icon: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy8" }, spinning: { true: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy9", false: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxya" } }, defaultVariants: { disabled: !1, kind: "default", spinning: !1 }, compoundVariants: [[{ kind: "icon", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyb"], [{ kind: "default", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyc"], [{ kind: "confirm", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyd"], [{ kind: "delete", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxye"], [{ kind: "key", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyf"], [{ disabled: !0, spinning: !1 }, "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyg"]] }), Et = ne({ defaultClassName: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyh", variantClassNames: { disabled: { true: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyi", false: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyj" }, kind: { icon: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyk", default: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyl", delete: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxym", key: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyn", confirm: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyo", link: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyp" }, spinning: { true: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyq", false: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyr" } }, defaultVariants: { disabled: !1, kind: "default", spinning: !1 }, compoundVariants: [] }), Pt = "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy11", xt = ne({ defaultClassName: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy12", variantClassNames: { spinning: { true: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy13", false: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy14" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] }), St = ne({ defaultClassName: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxys", variantClassNames: { spinning: { true: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyt", false: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyu" }, kind: { icon: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyv", default: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyw", delete: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyx", key: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyy", confirm: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxyz", link: "pkg_sps-woodland_buttons__version_8_18_0__hash_125pcxy10" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] });
826
+ function Nt({
810
827
  as: e,
811
828
  onClick: t,
812
829
  onPress: r,
813
830
  children: o,
814
- className: i,
815
- isDisabled: p,
831
+ className: a,
832
+ isDisabled: d,
816
833
  disabled: u,
817
- href: d,
818
- icon: b,
819
- kind: h = "default",
820
- spinning: g,
821
- spinningTitle: D,
834
+ href: p,
835
+ icon: m,
836
+ kind: g = "default",
837
+ spinning: b,
838
+ spinningTitle: E,
822
839
  title: x,
823
- ...m
824
- }, w) {
825
- const T = e ?? (d ? "a" : "button"), $ = {
840
+ ..._
841
+ }, P) {
842
+ const w = e ?? (p ? "a" : "button"), B = {
826
843
  onPress: r ?? t,
827
844
  // the button element should be disabled if the button is marked as disabled or spinning
828
- isDisabled: u ?? p ?? g,
829
- ...m
830
- }, { "data-testid": S } = m, P = w || c.useRef(null), { buttonProps: E } = kt($, P), { hoverProps: O } = ht({ isDisabled: $.isDisabled }), { type: N, ...I } = E, te = {
831
- ...H(I, O),
832
- ref: P,
845
+ isDisabled: u ?? d ?? b,
846
+ ..._
847
+ }, { "data-testid": S } = _, $ = P || c.useRef(null), { buttonProps: k } = wt(B, $), { hoverProps: O } = kt({ isDisabled: B.isDisabled }), { type: N, ...A } = k, oe = {
848
+ ...G(A, O),
849
+ ref: $,
833
850
  title: x,
834
- className: d ? xt({ spinning: g, kind: h }) : $t({ disabled: p || u, kind: h, spinning: g }),
835
- ...d ? { href: d } : { type: N },
836
- ...m
837
- }, { t: n } = c.useContext(Le), f = b && /* @__PURE__ */ c.createElement(
838
- Ue,
851
+ className: p ? St({ spinning: b, kind: g }) : Et({ disabled: d || u, kind: g, spinning: b }),
852
+ ...p ? { href: p } : { type: N },
853
+ ..._
854
+ }, { t: n } = c.useContext(Fe), f = m && /* @__PURE__ */ c.createElement(
855
+ Re,
839
856
  {
840
857
  className: Pt,
841
- icon: b,
858
+ icon: m,
842
859
  "aria-hidden": "true",
843
- "data-testid": `${S}__${b}-icon`
860
+ "data-testid": `${S}__${m}-icon`
844
861
  }
845
862
  );
846
- let B;
847
- h === "default" || h === "icon" || h === "link" ? B = "dark" : B = "light";
848
- const l = g && /* @__PURE__ */ c.createElement(
849
- Me,
863
+ let T;
864
+ g === "default" || g === "icon" || g === "link" ? T = "dark" : T = "light";
865
+ const l = b && /* @__PURE__ */ c.createElement(
866
+ Ue,
850
867
  {
851
- color: B,
852
- className: wt({ spinning: g }),
853
- title: D || n("design-system:button.spinningTitle"),
868
+ color: T,
869
+ className: xt({ spinning: b }),
870
+ title: E || n("design-system:button.spinningTitle"),
854
871
  "data-testid": `${S}__spinner`
855
872
  }
856
873
  );
857
- return /* @__PURE__ */ c.createElement(Re, null, /* @__PURE__ */ c.createElement(
874
+ return /* @__PURE__ */ c.createElement(Ve, null, /* @__PURE__ */ c.createElement(
858
875
  "div",
859
876
  {
860
- className: Fe(
861
- Bt({
862
- disabled: p || u,
863
- kind: h,
864
- spinning: g
877
+ className: He(
878
+ $t({
879
+ disabled: d || u,
880
+ kind: g,
881
+ spinning: b
865
882
  }),
866
- i
883
+ a
867
884
  )
868
885
  },
869
- /* @__PURE__ */ c.createElement(T, { ...te }, f, o ? /* @__PURE__ */ c.createElement("span", null, o) : "", l)
886
+ /* @__PURE__ */ c.createElement(w, { ...oe }, f, o ? /* @__PURE__ */ c.createElement("span", null, o) : "", l)
870
887
  ));
871
888
  }
872
- const Ie = c.forwardRef(St);
873
- Ae.set(Ie, {
889
+ const Ae = c.forwardRef(Nt);
890
+ Me.set(Ae, {
874
891
  name: "Button",
875
892
  props: {
876
893
  disabled: "boolean",
@@ -886,8 +903,8 @@ Ae.set(Ie, {
886
903
  },
887
904
  panellable: !0
888
905
  });
889
- const Nt = {
890
- components: [Ie],
906
+ const Ot = {
907
+ components: [Ae],
891
908
  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.")),
892
909
  examples: {
893
910
  basic: {
@@ -896,7 +913,7 @@ const Nt = {
896
913
  examples: {
897
914
  withoutIcons: {
898
915
  description: "Without Icons",
899
- react: y`
916
+ react: h`
900
917
  import { Button } from "@sps-woodland/buttons";
901
918
  import { sprinkles } from "@sps-woodland/tokens";
902
919
 
@@ -915,7 +932,7 @@ const Nt = {
915
932
  },
916
933
  withIcons: {
917
934
  description: "With Icons",
918
- react: y`
935
+ react: h`
919
936
  import { Button } from "@sps-woodland/buttons";
920
937
  import { sprinkles } from "@sps-woodland/tokens";
921
938
 
@@ -934,7 +951,7 @@ const Nt = {
934
951
  },
935
952
  spinning: {
936
953
  description: "Spinning",
937
- react: y`
954
+ react: h`
938
955
  import { Button } from "@sps-woodland/buttons";
939
956
  import { sprinkles } from "@sps-woodland/tokens";
940
957
 
@@ -958,7 +975,7 @@ const Nt = {
958
975
  examples: {
959
976
  withoutIcons: {
960
977
  description: "Without Icons",
961
- react: y`
978
+ react: h`
962
979
  import { SpsDropdown } from "@spscommerce/ds-react";
963
980
 
964
981
  function Component() {
@@ -1000,7 +1017,7 @@ const Nt = {
1000
1017
  },
1001
1018
  withIcons: {
1002
1019
  description: "With Icons",
1003
- react: y`
1020
+ react: h`
1004
1021
  import { SpsDropdown } from "@spscommerce/ds-react";
1005
1022
 
1006
1023
  function Component() {
@@ -1047,7 +1064,7 @@ const Nt = {
1047
1064
  },
1048
1065
  spinning: {
1049
1066
  description: "Spinning",
1050
- react: y`
1067
+ react: h`
1051
1068
  import { SpsDropdown } from "@spscommerce/ds-react";
1052
1069
 
1053
1070
  function Component() {
@@ -1093,7 +1110,7 @@ const Nt = {
1093
1110
  examples: {
1094
1111
  withoutIcons: {
1095
1112
  description: "Without Icons",
1096
- react: y`
1113
+ react: h`
1097
1114
  import { SpsSplitButton } from "@spscommerce/ds-react";
1098
1115
 
1099
1116
  function Component() {
@@ -1123,7 +1140,7 @@ const Nt = {
1123
1140
  },
1124
1141
  withIcons: {
1125
1142
  description: "With Icons",
1126
- react: y`
1143
+ react: h`
1127
1144
  import { SpsSplitButton } from "@spscommerce/ds-react";
1128
1145
 
1129
1146
  function Component() {
@@ -1171,7 +1188,7 @@ const Nt = {
1171
1188
  examples: {
1172
1189
  standard: {
1173
1190
  description: "Standard Icon Buttons",
1174
- react: y`
1191
+ react: h`
1175
1192
  import { Button } from "@sps-woodland/buttons";
1176
1193
  import { sprinkles } from "@sps-woodland/tokens";
1177
1194
 
@@ -1194,7 +1211,7 @@ const Nt = {
1194
1211
  },
1195
1212
  dropdown: {
1196
1213
  description: ({ NavigateTo: e }) => /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement("h5", null, "Dropdown Icon Buttons"), /* @__PURE__ */ c.createElement("p", null, "Use these when there are several options available for action. Example: Dropdown Icon Button in a ", /* @__PURE__ */ c.createElement(e, { to: "content-rows" }, "Content Row"), ".")),
1197
- react: y`
1214
+ react: h`
1198
1215
  import { SpsDropdown } from "@spscommerce/ds-react";
1199
1216
 
1200
1217
  function Component() {
@@ -1212,7 +1229,7 @@ const Nt = {
1212
1229
  },
1213
1230
  spinner: {
1214
1231
  description: "Spinner",
1215
- react: y`
1232
+ react: h`
1216
1233
  import { Button } from "@sps-woodland/buttons";
1217
1234
 
1218
1235
  function Component() {
@@ -1232,7 +1249,7 @@ const Nt = {
1232
1249
  examples: {
1233
1250
  withoutIcons: {
1234
1251
  description: "Without Icons",
1235
- react: y`
1252
+ react: h`
1236
1253
  import { Button } from "@sps-woodland/buttons";
1237
1254
  import { sprinkles } from "@sps-woodland/tokens";
1238
1255
 
@@ -1249,7 +1266,7 @@ const Nt = {
1249
1266
  },
1250
1267
  withIcons: {
1251
1268
  description: "With Icons",
1252
- react: y`
1269
+ react: h`
1253
1270
  import { Button } from "@sps-woodland/buttons";
1254
1271
  import { sprinkles } from "@sps-woodland/tokens";
1255
1272
 
@@ -1266,7 +1283,7 @@ const Nt = {
1266
1283
  },
1267
1284
  spinner: {
1268
1285
  description: "Spinner",
1269
- react: y`
1286
+ react: h`
1270
1287
  import { Button } from "@sps-woodland/buttons";
1271
1288
 
1272
1289
  function Component() {
@@ -1285,7 +1302,7 @@ const Nt = {
1285
1302
  description: ({ NavigateTo: e }) => /* @__PURE__ */ c.createElement("p", null, "Use to submit a form. There can be a number of visual variations, for example a", " ", /* @__PURE__ */ c.createElement(e, { to: "modals" }, "Modal"), " uses Basic Button (Key) as its Submit Button."),
1286
1303
  examples: {
1287
1304
  basic: {
1288
- react: y`
1305
+ react: h`
1289
1306
  import { Button } from "@sps-woodland/buttons";
1290
1307
  import { sprinkles } from "@sps-woodland/tokens";
1291
1308
 
@@ -1313,7 +1330,7 @@ const Nt = {
1313
1330
  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.",
1314
1331
  examples: {
1315
1332
  basic: {
1316
- react: y`
1333
+ react: h`
1317
1334
  import { Button } from "@sps-woodland/buttons";
1318
1335
 
1319
1336
  function Component() {
@@ -1335,7 +1352,7 @@ const Nt = {
1335
1352
  examples: {
1336
1353
  basic: {
1337
1354
  description: "Basic Button Groups",
1338
- react: y`
1355
+ react: h`
1339
1356
  import { Button } from "@sps-woodland/buttons";
1340
1357
  import { sprinkles } from "@sps-woodland/tokens";
1341
1358
 
@@ -1351,7 +1368,7 @@ const Nt = {
1351
1368
  },
1352
1369
  icon: {
1353
1370
  description: "Icon Button Groups",
1354
- react: y`
1371
+ react: h`
1355
1372
  import { Button } from "@sps-woodland/buttons";
1356
1373
 
1357
1374
  function Component() {
@@ -1366,7 +1383,7 @@ const Nt = {
1366
1383
  },
1367
1384
  textAndIcons: {
1368
1385
  description: "Text Buttons + Icon Buttons Group",
1369
- react: y`
1386
+ react: h`
1370
1387
  import { Button } from "@sps-woodland/buttons";
1371
1388
  import { sprinkles } from "@sps-woodland/tokens";
1372
1389
  import { VericalRule } from "@sps-woodland/core";
@@ -1385,7 +1402,7 @@ const Nt = {
1385
1402
  },
1386
1403
  textAndBasic: {
1387
1404
  description: "Text Buttons + Basic Buttons Group",
1388
- react: y`
1405
+ react: h`
1389
1406
  import { Button } from "@sps-woodland/buttons";
1390
1407
  import { sprinkles } from "@sps-woodland/tokens";
1391
1408
  import { VericalRule } from "@sps-woodland/core";
@@ -1405,7 +1422,7 @@ const Nt = {
1405
1422
  },
1406
1423
  iconsAndBasic: {
1407
1424
  description: "Icon Buttons + Basic Buttons Group",
1408
- react: y`
1425
+ react: h`
1409
1426
  import { Button } from "@sps-woodland/buttons";
1410
1427
  import { sprinkles } from "@sps-woodland/tokens";
1411
1428
  import { VericalRule } from "@sps-woodland/core";
@@ -1426,7 +1443,7 @@ const Nt = {
1426
1443
  },
1427
1444
  textIconsAndBasic: {
1428
1445
  description: "Text Buttons + Icon Buttons + Basic Buttons Group",
1429
- react: y`
1446
+ react: h`
1430
1447
  import { Button } from "@sps-woodland/buttons";
1431
1448
  import { sprinkles } from "@sps-woodland/tokens";
1432
1449
  import { VericalRule } from "@sps-woodland/core";
@@ -1450,10 +1467,10 @@ const Nt = {
1450
1467
  }
1451
1468
  }
1452
1469
  }
1453
- }, It = {
1454
- Buttons: Nt
1470
+ }, At = {
1471
+ Buttons: Ot
1455
1472
  };
1456
1473
  export {
1457
- Ie as Button,
1458
- It as MANIFEST
1474
+ Ae as Button,
1475
+ At as MANIFEST
1459
1476
  };