@sps-woodland/buttons 8.20.8 → 8.20.9

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,8 +1,8 @@
1
1
  import * as c from "react";
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";
2
+ import Be, { useRef as ee, useCallback as z, useEffect as J, useState as Ee, useMemo as $e, useContext as Me } from "react";
3
+ import { Metadata as Fe, I18nContext as Ue, Spinner as He, cl as Re, Icon as Ge } from "@sps-woodland/core";
4
+ import { useFocusable as Ve, FocusRing as We } from "@react-aria/focus";
5
+ import { code as y } from "@spscommerce/utils";
6
6
  const Pe = typeof document < "u" ? Be.useLayoutEffect : () => {
7
7
  };
8
8
  function H(e) {
@@ -17,23 +17,23 @@ function H(e) {
17
17
  }, []);
18
18
  }
19
19
  let fe = /* @__PURE__ */ new Map();
20
- function We(e, t) {
20
+ function Ye(e, t) {
21
21
  if (e === t) return e;
22
22
  let r = fe.get(e);
23
23
  if (r)
24
- return r(t), t;
24
+ return r.forEach((a) => a(t)), t;
25
25
  let o = fe.get(t);
26
- return o ? (o(e), e) : t;
26
+ return o ? (o.forEach((a) => a(e)), e) : t;
27
27
  }
28
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 K = (e) => {
33
+ const I = (e) => {
34
34
  var t;
35
35
  return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
36
- }, ie = (e) => e && "window" in e && e.window === e ? e : K(e).defaultView || window;
36
+ }, ie = (e) => e && "window" in e && e.window === e ? e : I(e).defaultView || window;
37
37
  function Se(e) {
38
38
  var t, r, o = "";
39
39
  if (typeof e == "string" || typeof e == "number") o += e;
@@ -43,7 +43,7 @@ function Se(e) {
43
43
  } else for (r in e) e[r] && (o && (o += " "), o += r);
44
44
  return o;
45
45
  }
46
- function Ye() {
46
+ function je() {
47
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
  }
@@ -58,19 +58,19 @@ function G(...e) {
58
58
  typeof d == "function" && typeof u == "function" && // This is a lot faster than a regex.
59
59
  a[0] === "o" && a[1] === "n" && a.charCodeAt(2) >= /* 'A' */
60
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;
61
+ 90 ? t[a] = xe(d, u) : (a === "className" || a === "UNSAFE_className") && typeof d == "string" && typeof u == "string" ? t[a] = je(d, u) : a === "id" && d && u ? t.id = Ye(d, u) : t[a] = u !== void 0 ? u : d;
62
62
  }
63
63
  }
64
64
  return t;
65
65
  }
66
- const je = /* @__PURE__ */ new Set([
66
+ const Xe = /* @__PURE__ */ new Set([
67
67
  "id"
68
- ]), Xe = /* @__PURE__ */ new Set([
68
+ ]), ze = /* @__PURE__ */ new Set([
69
69
  "aria-label",
70
70
  "aria-labelledby",
71
71
  "aria-describedby",
72
72
  "aria-details"
73
- ]), ze = /* @__PURE__ */ new Set([
73
+ ]), qe = /* @__PURE__ */ new Set([
74
74
  "href",
75
75
  "hrefLang",
76
76
  "target",
@@ -78,23 +78,23 @@ const je = /* @__PURE__ */ new Set([
78
78
  "download",
79
79
  "ping",
80
80
  "referrerPolicy"
81
- ]), qe = /^(data-.*)$/;
82
- function Je(e, t = {}) {
81
+ ]), Je = /^(data-.*)$/;
82
+ function Qe(e, t = {}) {
83
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]);
84
+ for (const u in e) Object.prototype.hasOwnProperty.call(e, u) && (Xe.has(u) || r && ze.has(u) || o && qe.has(u) || a != null && a.has(u) || Je.test(u)) && (d[u] = e[u]);
85
85
  return d;
86
86
  }
87
87
  function R(e) {
88
- if (Qe()) e.focus({
88
+ if (Ze()) e.focus({
89
89
  preventScroll: !0
90
90
  });
91
91
  else {
92
- let t = Ze(e);
93
- e.focus(), et(t);
92
+ let t = et(e);
93
+ e.focus(), tt(t);
94
94
  }
95
95
  }
96
96
  let W = null;
97
- function Qe() {
97
+ function Ze() {
98
98
  if (W == null) {
99
99
  W = !1;
100
100
  try {
@@ -108,7 +108,7 @@ function Qe() {
108
108
  }
109
109
  return W;
110
110
  }
111
- function Ze(e) {
111
+ function et(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,7 +122,7 @@ function Ze(e) {
122
122
  scrollLeft: o.scrollLeft
123
123
  }), r;
124
124
  }
125
- function et(e) {
125
+ function tt(e) {
126
126
  for (let { element: t, scrollTop: r, scrollLeft: o } of e)
127
127
  t.scrollTop = r, t.scrollLeft = o;
128
128
  }
@@ -134,33 +134,33 @@ 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 I(e) {
137
+ function L(e) {
138
138
  let t = null;
139
139
  return () => (t == null && (t = e()), t);
140
140
  }
141
- const Q = I(function() {
141
+ const Q = L(function() {
142
142
  return de(/^Mac/i);
143
- }), tt = I(function() {
143
+ }), nt = L(function() {
144
144
  return de(/^iPhone/i);
145
- }), Ne = I(function() {
145
+ }), Ne = L(function() {
146
146
  return de(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
147
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() {
148
+ }), De = L(function() {
149
+ return nt() || Ne();
150
+ }), ot = L(function() {
151
+ return te(/AppleWebKit/i) && !rt();
152
+ }), rt = L(function() {
153
153
  return te(/Chrome/i);
154
- }), De = I(function() {
154
+ }), Oe = L(function() {
155
155
  return te(/Android/i);
156
- }), rt = I(function() {
156
+ }), st = L(function() {
157
157
  return te(/Firefox/i);
158
158
  });
159
159
  function V(e, t, r = !0) {
160
160
  var o, a;
161
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", {
162
+ st() && (!((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 v = ot() && Q() && !Ne() ? new KeyboardEvent("keydown", {
164
164
  keyIdentifier: "Enter",
165
165
  metaKey: d,
166
166
  ctrlKey: u,
@@ -174,7 +174,7 @@ function V(e, t, r = !0) {
174
174
  bubbles: !0,
175
175
  cancelable: !0
176
176
  });
177
- V.isOpening = r, R(e), e.dispatchEvent(g), V.isOpening = !1;
177
+ V.isOpening = r, R(e), e.dispatchEvent(v), V.isOpening = !1;
178
178
  }
179
179
  V.isOpening = !1;
180
180
  let F = /* @__PURE__ */ new Map(), le = /* @__PURE__ */ new Set();
@@ -200,15 +200,15 @@ function me() {
200
200
  document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", r);
201
201
  }
202
202
  typeof document < "u" && (document.readyState !== "loading" ? me() : document.addEventListener("DOMContentLoaded", me));
203
- function st(e) {
203
+ function at(e) {
204
204
  requestAnimationFrame(() => {
205
205
  F.size === 0 ? e() : le.add(e);
206
206
  });
207
207
  }
208
- function at() {
208
+ function it() {
209
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);
210
+ let m = p != null && p.once ? (...v) => {
211
+ e.current.delete(u), u(...v);
212
212
  } : u;
213
213
  e.current.set(u, {
214
214
  type: d,
@@ -218,8 +218,8 @@ function at() {
218
218
  }), a.addEventListener(d, u, p);
219
219
  }, []), r = z((a, d, u, p) => {
220
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);
221
+ let v = ((m = e.current.get(u)) === null || m === void 0 ? void 0 : m.fn) || u;
222
+ a.removeEventListener(d, v, p), e.current.delete(u);
223
223
  }, []), o = z(() => {
224
224
  e.current.forEach((a, d) => {
225
225
  r(a.eventTarget, a.type, d, a.options);
@@ -235,7 +235,7 @@ function at() {
235
235
  removeAllGlobalListeners: o
236
236
  };
237
237
  }
238
- function it(e, t) {
238
+ function lt(e, t) {
239
239
  Pe(() => {
240
240
  if (e && e.ref && t)
241
241
  return e.ref.current = t.current, () => {
@@ -244,28 +244,28 @@ function it(e, t) {
244
244
  });
245
245
  }
246
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;
247
+ return e.mozInputSource === 0 && e.isTrusted ? !0 : Oe() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
248
248
  }
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";
249
+ function ut(e) {
250
+ return !Oe() && e.width === 0 && e.height === 0 || e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse";
251
251
  }
252
252
  let U = "default", ue = "", q = /* @__PURE__ */ new WeakMap();
253
- function be(e) {
254
- if (Oe()) {
253
+ function ge(e) {
254
+ if (De()) {
255
255
  if (U === "default") {
256
- const t = K(e);
256
+ const t = I(e);
257
257
  ue = t.documentElement.style.webkitUserSelect, t.documentElement.style.webkitUserSelect = "none";
258
258
  }
259
259
  U = "disabled";
260
260
  } else (e instanceof HTMLElement || e instanceof SVGElement) && (q.set(e, e.style.userSelect), e.style.userSelect = "none");
261
261
  }
262
262
  function Y(e) {
263
- if (Oe()) {
263
+ if (De()) {
264
264
  if (U !== "disabled") return;
265
265
  U = "restoring", setTimeout(() => {
266
- st(() => {
266
+ at(() => {
267
267
  if (U === "restoring") {
268
- const t = K(e);
268
+ const t = I(e);
269
269
  t.documentElement.style.webkitUserSelect === "none" && (t.documentElement.style.webkitUserSelect = ue || ""), ue = "", U = "default";
270
270
  }
271
271
  });
@@ -280,25 +280,25 @@ const Ce = Be.createContext({
280
280
  }
281
281
  });
282
282
  Ce.displayName = "PressResponderContext";
283
- function ut(e, t) {
283
+ function ct(e, t) {
284
284
  return t.get ? t.get.call(e) : t.value;
285
285
  }
286
286
  function Ke(e, t, r) {
287
287
  if (!t.has(e)) throw new TypeError("attempted to " + r + " private field on non-instance");
288
288
  return t.get(e);
289
289
  }
290
- function ct(e, t) {
290
+ function dt(e, t) {
291
291
  var r = Ke(e, t, "get");
292
- return ut(e, r);
292
+ return ct(e, r);
293
293
  }
294
- function dt(e, t) {
294
+ function pt(e, t) {
295
295
  if (t.has(e))
296
296
  throw new TypeError("Cannot initialize the same private elements twice on an object");
297
297
  }
298
- function pt(e, t, r) {
299
- dt(e, t), t.set(e, r);
300
- }
301
298
  function ft(e, t, r) {
299
+ pt(e, t), t.set(e, r);
300
+ }
301
+ function mt(e, t, r) {
302
302
  if (t.set) t.set.call(e, r);
303
303
  else {
304
304
  if (!t.writable)
@@ -306,40 +306,40 @@ function ft(e, t, r) {
306
306
  t.value = r;
307
307
  }
308
308
  }
309
- function ge(e, t, r) {
309
+ function be(e, t, r) {
310
310
  var o = Ke(e, t, "set");
311
- return ft(e, o, r), r;
311
+ return mt(e, o, r), r;
312
312
  }
313
- function mt(e) {
314
- let t = Le(Ce);
313
+ function _t(e) {
314
+ let t = Me(Ce);
315
315
  if (t) {
316
316
  let { register: r, ...o } = t;
317
317
  e = G(o, e), r();
318
318
  }
319
- return it(t, e.ref), e;
319
+ return lt(t, e.ref), e;
320
320
  }
321
321
  var j = /* @__PURE__ */ new WeakMap();
322
322
  class X {
323
323
  continuePropagation() {
324
- ge(this, j, !1);
324
+ be(this, j, !1);
325
325
  }
326
326
  get shouldStopPropagation() {
327
- return ct(this, j);
327
+ return dt(this, j);
328
328
  }
329
329
  constructor(t, r, o, a) {
330
- pt(this, j, {
330
+ ft(this, j, {
331
331
  writable: !0,
332
332
  value: void 0
333
- }), ge(this, j, !0);
333
+ }), be(this, j, !0);
334
334
  var d;
335
335
  let u = (d = a == null ? void 0 : a.target) !== null && d !== void 0 ? d : o.currentTarget;
336
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
+ let m, v = 0, g, $ = null;
338
+ o.clientX != null && o.clientY != null && (g = o.clientX, $ = o.clientY), p && (g != null && $ != null ? (m = g - p.left, v = $ - p.top) : (m = p.width / 2, v = 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 = v;
339
339
  }
340
340
  }
341
341
  const ve = Symbol("linkClicked");
342
- function _t(e) {
342
+ function gt(e) {
343
343
  let {
344
344
  onPress: t,
345
345
  onPressChange: r,
@@ -349,12 +349,12 @@ function _t(e) {
349
349
  isDisabled: u,
350
350
  isPressed: p,
351
351
  preventFocusOnPress: m,
352
- shouldCancelOnPointerExit: g,
353
- allowTextSelectionOnPress: b,
352
+ shouldCancelOnPointerExit: v,
353
+ allowTextSelectionOnPress: g,
354
354
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
355
- ref: E,
355
+ ref: $,
356
356
  ...x
357
- } = mt(e), [_, P] = $e(!1), w = ee({
357
+ } = _t(e), [_, P] = Ee(!1), w = ee({
358
358
  isPressed: !1,
359
359
  ignoreEmulatedMouseEvents: !1,
360
360
  ignoreClickAfterPress: !1,
@@ -364,105 +364,109 @@ function _t(e) {
364
364
  target: null,
365
365
  isOverTarget: !1,
366
366
  pointerType: null
367
- }), { addGlobalListener: B, removeAllGlobalListeners: S } = at(), $ = H((n, f) => {
368
- let T = w.current;
369
- if (u || T.didFirePressStart) return !1;
367
+ }), { addGlobalListener: T, removeAllGlobalListeners: S } = it(), E = H((n, f) => {
368
+ let B = w.current;
369
+ if (u || B.didFirePressStart) return !1;
370
370
  let l = !0;
371
- if (T.isTriggeringEvent = !0, o) {
372
- let v = new X("pressstart", f, n);
373
- o(v), l = v.shouldStopPropagation;
371
+ if (B.isTriggeringEvent = !0, o) {
372
+ let h = new X("pressstart", f, n);
373
+ o(h), l = h.shouldStopPropagation;
374
374
  }
375
- return r && r(!0), T.isTriggeringEvent = !1, T.didFirePressStart = !0, P(!0), l;
376
- }), k = H((n, f, T = !0) => {
375
+ return r && r(!0), B.isTriggeringEvent = !1, B.didFirePressStart = !0, P(!0), l;
376
+ }), k = H((n, f, B = !0) => {
377
377
  let l = w.current;
378
378
  if (!l.didFirePressStart) return !1;
379
379
  l.ignoreClickAfterPress = !0, l.didFirePressStart = !1, l.isTriggeringEvent = !0;
380
- let v = !0;
380
+ let h = !0;
381
381
  if (a) {
382
382
  let s = new X("pressend", f, n);
383
- a(s), v = s.shouldStopPropagation;
383
+ a(s), h = s.shouldStopPropagation;
384
384
  }
385
- if (r && r(!1), P(!1), t && T && !u) {
385
+ if (r && r(!1), P(!1), t && B && !u) {
386
386
  let s = new X("press", f, n);
387
- t(s), v && (v = s.shouldStopPropagation);
387
+ t(s), h && (h = s.shouldStopPropagation);
388
388
  }
389
- return l.isTriggeringEvent = !1, v;
390
- }), O = H((n, f) => {
391
- let T = w.current;
389
+ return l.isTriggeringEvent = !1, h;
390
+ }), D = H((n, f) => {
391
+ let B = w.current;
392
392
  if (u) return !1;
393
393
  if (d) {
394
- T.isTriggeringEvent = !0;
394
+ B.isTriggeringEvent = !0;
395
395
  let l = new X("pressup", f, n);
396
- return d(l), T.isTriggeringEvent = !1, l.shouldStopPropagation;
396
+ return d(l), B.isTriggeringEvent = !1, l.shouldStopPropagation;
397
397
  }
398
398
  return !0;
399
399
  }), N = H((n) => {
400
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));
401
+ f.isPressed && f.target && (f.isOverTarget && f.pointerType != null && k(C(f.target, n), f.pointerType, !1), f.isPressed = !1, f.isOverTarget = !1, f.activePointerId = null, f.pointerType = null, S(), g || Y(f.target));
402
402
  }), A = H((n) => {
403
- g && N(n);
404
- }), oe = Ee(() => {
403
+ v && N(n);
404
+ }), oe = $e(() => {
405
405
  let n = w.current, f = {
406
406
  onKeyDown(l) {
407
407
  if (re(l.nativeEvent, l.currentTarget) && l.currentTarget.contains(l.target)) {
408
- var v;
408
+ var h;
409
409
  ye(l.target, l.key) && l.preventDefault();
410
410
  let s = !0;
411
411
  if (!n.isPressed && !l.repeat) {
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");
412
+ n.target = l.currentTarget, n.isPressed = !0, s = E(l, "keyboard");
413
+ let b = l.currentTarget, i = (O) => {
414
+ re(O, b) && !O.repeat && b.contains(O.target) && n.target && D(C(n.target, O), "keyboard");
415
415
  };
416
- B(K(l.currentTarget), "keyup", xe(y, T), !0);
416
+ T(I(l.currentTarget), "keyup", xe(i, B), !0);
417
417
  }
418
- 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() && ((h = n.metaKeyEvents) === null || h === void 0 || h.set(l.key, l.nativeEvent));
419
419
  } else l.key === "Meta" && (n.metaKeyEvents = /* @__PURE__ */ new Map());
420
420
  },
421
421
  onClick(l) {
422
422
  if (!(l && !l.currentTarget.contains(l.target)) && l && l.button === 0 && !n.isTriggeringEvent && !V.isOpening) {
423
- let v = !0;
423
+ let h = !0;
424
424
  if (u && l.preventDefault(), !n.ignoreClickAfterPress && !n.ignoreEmulatedMouseEvents && !n.isPressed && (n.pointerType === "virtual" || _e(l.nativeEvent))) {
425
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
+ let s = E(l, "virtual"), b = D(l, "virtual"), i = k(l, "virtual");
427
+ h = s && b && i;
428
428
  }
429
- n.ignoreEmulatedMouseEvents = !1, n.ignoreClickAfterPress = !1, v && l.stopPropagation();
429
+ n.ignoreEmulatedMouseEvents = !1, n.ignoreClickAfterPress = !1, h && l.stopPropagation();
430
430
  }
431
431
  }
432
- }, T = (l) => {
433
- var v;
432
+ }, B = (l) => {
433
+ var h;
434
434
  if (n.isPressed && n.target && re(l, n.target)) {
435
435
  var s;
436
436
  ye(l.target, l.key) && l.preventDefault();
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);
439
- } else if (l.key === "Meta" && (!((v = n.metaKeyEvents) === null || v === void 0) && v.size)) {
440
- var i;
441
- let y = n.metaKeyEvents;
437
+ let i = l.target;
438
+ k(C(n.target, l), "keyboard", n.target.contains(i)), S(), l.key !== "Enter" && pe(n.target) && n.target.contains(i) && !l[ve] && (l[ve] = !0, V(n.target, l, !1)), n.isPressed = !1, (s = n.metaKeyEvents) === null || s === void 0 || s.delete(l.key);
439
+ } else if (l.key === "Meta" && (!((h = n.metaKeyEvents) === null || h === void 0) && h.size)) {
440
+ var b;
441
+ let i = n.metaKeyEvents;
442
442
  n.metaKeyEvents = void 0;
443
- for (let L of y.values()) (i = n.target) === null || i === void 0 || i.dispatchEvent(new KeyboardEvent("keyup", L));
443
+ for (let O of i.values()) (b = n.target) === null || b === void 0 || b.dispatchEvent(new KeyboardEvent("keyup", O));
444
444
  }
445
445
  };
446
446
  if (typeof PointerEvent < "u") {
447
447
  f.onPointerDown = (i) => {
448
448
  if (i.button !== 0 || !i.currentTarget.contains(i.target)) return;
449
- if (lt(i.nativeEvent)) {
449
+ if (ut(i.nativeEvent)) {
450
450
  n.pointerType = "virtual";
451
451
  return;
452
452
  }
453
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();
454
+ let O = !0;
455
+ n.isPressed || (n.isPressed = !0, n.isOverTarget = !0, n.activePointerId = i.pointerId, n.target = i.currentTarget, !u && !m && R(i.currentTarget), g || ge(n.target), O = E(i, n.pointerType), T(I(i.currentTarget), "pointermove", l, !1), T(I(i.currentTarget), "pointerup", h, !1), T(I(i.currentTarget), "pointercancel", b, !1)), O && i.stopPropagation();
456
456
  }, f.onMouseDown = (i) => {
457
457
  i.currentTarget.contains(i.target) && i.button === 0 && (se(i.currentTarget) && i.preventDefault(), i.stopPropagation());
458
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);
459
+ !i.currentTarget.contains(i.target) || n.pointerType === "virtual" || i.button === 0 && M(i, i.currentTarget) && D(i, n.pointerType || i.pointerType);
460
460
  };
461
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));
462
+ i.pointerId === n.activePointerId && (n.target && M(i, n.target) ? !n.isOverTarget && n.pointerType != null && (n.isOverTarget = !0, E(C(n.target, i), n.pointerType)) : n.target && n.isOverTarget && n.pointerType != null && (n.isOverTarget = !1, k(C(n.target, i), n.pointerType, !1), A(i)));
463
+ }, h = (i) => {
464
+ i.pointerId === n.activePointerId && n.isPressed && i.button === 0 && n.target && (M(i, n.target) && n.pointerType != null ? k(C(n.target, i), n.pointerType) : n.isOverTarget && n.pointerType != null && k(C(n.target, i), n.pointerType, !1), n.isPressed = !1, n.isOverTarget = !1, n.activePointerId = null, n.pointerType = null, S(), g || Y(n.target), "ontouchend" in n.target && i.pointerType !== "mouse" && T(n.target, "touchend", s, {
465
+ once: !0
466
+ }));
465
467
  }, s = (i) => {
468
+ Ie(i.target) && i.preventDefault();
469
+ }, b = (i) => {
466
470
  N(i);
467
471
  };
468
472
  f.onDragStart = (i) => {
@@ -475,17 +479,17 @@ function _t(e) {
475
479
  s.stopPropagation();
476
480
  return;
477
481
  }
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);
482
+ n.isPressed = !0, n.isOverTarget = !0, n.target = s.currentTarget, n.pointerType = _e(s.nativeEvent) ? "virtual" : "mouse", !u && !m && R(s.currentTarget), E(s, n.pointerType) && s.stopPropagation(), T(I(s.currentTarget), "mouseup", l, !1);
479
483
  }, f.onMouseEnter = (s) => {
480
484
  if (!s.currentTarget.contains(s.target)) return;
481
- let i = !0;
482
- n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !0, i = $(s, n.pointerType)), i && s.stopPropagation();
485
+ let b = !0;
486
+ n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !0, b = E(s, n.pointerType)), b && s.stopPropagation();
483
487
  }, f.onMouseLeave = (s) => {
484
488
  if (!s.currentTarget.contains(s.target)) return;
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();
489
+ let b = !0;
490
+ n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !1, b = k(s, n.pointerType, !1), A(s)), b && s.stopPropagation();
487
491
  }, f.onMouseUp = (s) => {
488
- s.currentTarget.contains(s.target) && !n.ignoreEmulatedMouseEvents && s.button === 0 && O(s, n.pointerType || "mouse");
492
+ s.currentTarget.contains(s.target) && !n.ignoreEmulatedMouseEvents && s.button === 0 && D(s, n.pointerType || "mouse");
489
493
  };
490
494
  let l = (s) => {
491
495
  if (s.button === 0) {
@@ -493,34 +497,34 @@ function _t(e) {
493
497
  n.ignoreEmulatedMouseEvents = !1;
494
498
  return;
495
499
  }
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;
500
+ n.target && M(s, n.target) && n.pointerType != null ? k(C(n.target, s), n.pointerType) : n.target && n.isOverTarget && n.pointerType != null && k(C(n.target, s), n.pointerType, !1), n.isOverTarget = !1;
497
501
  }
498
502
  };
499
503
  f.onTouchStart = (s) => {
500
504
  if (!s.currentTarget.contains(s.target)) return;
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);
505
+ let b = bt(s.nativeEvent);
506
+ if (!b) return;
507
+ n.activePointerId = b.identifier, n.ignoreEmulatedMouseEvents = !0, n.isOverTarget = !0, n.isPressed = !0, n.target = s.currentTarget, n.pointerType = "touch", !u && !m && R(s.currentTarget), g || ge(n.target), E(K(n.target, s), n.pointerType) && s.stopPropagation(), T(ie(s.currentTarget), "scroll", h, !0);
504
508
  }, f.onTouchMove = (s) => {
505
509
  if (!s.currentTarget.contains(s.target)) return;
506
510
  if (!n.isPressed) {
507
511
  s.stopPropagation();
508
512
  return;
509
513
  }
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();
514
+ let b = he(s.nativeEvent, n.activePointerId), i = !0;
515
+ b && M(b, s.currentTarget) ? !n.isOverTarget && n.pointerType != null && (n.isOverTarget = !0, i = E(K(n.target, s), n.pointerType)) : n.isOverTarget && n.pointerType != null && (n.isOverTarget = !1, i = k(K(n.target, s), n.pointerType, !1), A(K(n.target, s))), i && s.stopPropagation();
512
516
  }, f.onTouchEnd = (s) => {
513
517
  if (!s.currentTarget.contains(s.target)) return;
514
518
  if (!n.isPressed) {
515
519
  s.stopPropagation();
516
520
  return;
517
521
  }
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();
522
+ let b = he(s.nativeEvent, n.activePointerId), i = !0;
523
+ b && M(b, s.currentTarget) && n.pointerType != null ? (D(K(n.target, s), n.pointerType), i = k(K(n.target, s), n.pointerType)) : n.isOverTarget && n.pointerType != null && (i = k(K(n.target, s), n.pointerType, !1)), i && s.stopPropagation(), n.isPressed = !1, n.activePointerId = null, n.isOverTarget = !1, n.ignoreEmulatedMouseEvents = !0, n.target && !g && Y(n.target), S();
520
524
  }, f.onTouchCancel = (s) => {
521
- s.currentTarget.contains(s.target) && (s.stopPropagation(), n.isPressed && N(C(n.target, s)));
525
+ s.currentTarget.contains(s.target) && (s.stopPropagation(), n.isPressed && N(K(n.target, s)));
522
526
  };
523
- let v = (s) => {
527
+ let h = (s) => {
524
528
  n.isPressed && s.target.contains(n.target) && N({
525
529
  currentTarget: n.target,
526
530
  shiftKey: !1,
@@ -535,22 +539,22 @@ function _t(e) {
535
539
  }
536
540
  return f;
537
541
  }, [
538
- B,
542
+ T,
539
543
  u,
540
544
  m,
541
545
  S,
542
- b,
546
+ g,
543
547
  N,
544
548
  A,
545
549
  k,
546
- $,
547
- O
550
+ E,
551
+ D
548
552
  ]);
549
553
  return J(() => () => {
550
554
  var n;
551
- b || Y((n = w.current.target) !== null && n !== void 0 ? n : void 0);
555
+ g || Y((n = w.current.target) !== null && n !== void 0 ? n : void 0);
552
556
  }, [
553
- b
557
+ g
554
558
  ]), {
555
559
  isPressed: p || _,
556
560
  pressProps: G(x, oe)
@@ -561,7 +565,7 @@ function pe(e) {
561
565
  }
562
566
  function re(e, t) {
563
567
  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
568
+ return (r === "Enter" || r === " " || r === "Spacebar" || o === "Space") && !(a instanceof ie(a).HTMLInputElement && !Le(a, r) || a instanceof ie(a).HTMLTextAreaElement || a.isContentEditable) && // Links should only trigger with Enter key
565
569
  !((d === "link" || !d && pe(a)) && r !== "Enter");
566
570
  }
567
571
  function bt(e) {
@@ -576,7 +580,7 @@ function he(e, t) {
576
580
  }
577
581
  return null;
578
582
  }
579
- function C(e, t) {
583
+ function K(e, t) {
580
584
  let r = 0, o = 0;
581
585
  return t.targetTouches && t.targetTouches.length === 1 && (r = t.targetTouches[0].clientX, o = t.targetTouches[0].clientY), {
582
586
  currentTarget: e,
@@ -588,7 +592,7 @@ function C(e, t) {
588
592
  clientY: o
589
593
  };
590
594
  }
591
- function D(e, t) {
595
+ function C(e, t) {
592
596
  let r = t.clientX, o = t.clientY;
593
597
  return {
594
598
  currentTarget: e,
@@ -600,7 +604,7 @@ function D(e, t) {
600
604
  clientY: o
601
605
  };
602
606
  }
603
- function gt(e) {
607
+ function vt(e) {
604
608
  let t = 0, r = 0;
605
609
  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), {
606
610
  top: e.clientY - r,
@@ -609,20 +613,23 @@ function gt(e) {
609
613
  left: e.clientX - t
610
614
  };
611
615
  }
612
- function vt(e, t) {
616
+ function ht(e, t) {
613
617
  return !(e.left > t.right || t.left > e.right || e.top > t.bottom || t.top > e.bottom);
614
618
  }
615
619
  function M(e, t) {
616
- let r = t.getBoundingClientRect(), o = gt(e);
617
- return vt(r, o);
620
+ let r = t.getBoundingClientRect(), o = vt(e);
621
+ return ht(r, o);
618
622
  }
619
623
  function se(e) {
620
624
  return !(e instanceof HTMLElement) || !e.hasAttribute("draggable");
621
625
  }
626
+ function Ie(e) {
627
+ return e instanceof HTMLInputElement ? !1 : e instanceof HTMLButtonElement ? e.type !== "submit" && e.type !== "reset" : !pe(e);
628
+ }
622
629
  function ye(e, t) {
623
- return e instanceof HTMLInputElement ? !Ie(e, t) : e instanceof HTMLButtonElement ? e.type !== "submit" && e.type !== "reset" : !pe(e);
630
+ return e instanceof HTMLInputElement ? !Le(e, t) : Ie(e);
624
631
  }
625
- const ht = /* @__PURE__ */ new Set([
632
+ const yt = /* @__PURE__ */ new Set([
626
633
  "checkbox",
627
634
  "radio",
628
635
  "range",
@@ -633,8 +640,8 @@ const ht = /* @__PURE__ */ new Set([
633
640
  "submit",
634
641
  "reset"
635
642
  ]);
636
- function Ie(e, t) {
637
- return e.type === "checkbox" || e.type === "radio" ? t === " " : ht.has(e.type);
643
+ function Le(e, t) {
644
+ return e.type === "checkbox" || e.type === "radio" ? t === " " : yt.has(e.type);
638
645
  }
639
646
  let Z = !1, ae = 0;
640
647
  function ce() {
@@ -645,22 +652,22 @@ function ce() {
645
652
  function ke(e) {
646
653
  e.pointerType === "touch" && ce();
647
654
  }
648
- function yt() {
655
+ function kt() {
649
656
  if (!(typeof document > "u"))
650
657
  return typeof PointerEvent < "u" ? document.addEventListener("pointerup", ke) : document.addEventListener("touchend", ce), ae++, () => {
651
658
  ae--, !(ae > 0) && (typeof PointerEvent < "u" ? document.removeEventListener("pointerup", ke) : document.removeEventListener("touchend", ce));
652
659
  };
653
660
  }
654
- function kt(e) {
655
- let { onHoverStart: t, onHoverChange: r, onHoverEnd: o, isDisabled: a } = e, [d, u] = $e(!1), p = ee({
661
+ function wt(e) {
662
+ let { onHoverStart: t, onHoverChange: r, onHoverEnd: o, isDisabled: a } = e, [d, u] = Ee(!1), p = ee({
656
663
  isHovered: !1,
657
664
  ignoreEmulatedMouseEvents: !1,
658
665
  pointerType: "",
659
666
  target: null
660
667
  }).current;
661
- J(yt, []);
662
- let { hoverProps: m, triggerHoverEnd: g } = Ee(() => {
663
- let b = (_, P) => {
668
+ J(kt, []);
669
+ let { hoverProps: m, triggerHoverEnd: v } = $e(() => {
670
+ let g = (_, P) => {
664
671
  if (p.pointerType = P, a || P === "touch" || p.isHovered || !_.currentTarget.contains(_.target)) return;
665
672
  p.isHovered = !0;
666
673
  let w = _.currentTarget;
@@ -669,7 +676,7 @@ function kt(e) {
669
676
  target: w,
670
677
  pointerType: P
671
678
  }), r && r(!0), u(!0);
672
- }, E = (_, P) => {
679
+ }, $ = (_, P) => {
673
680
  if (p.pointerType = "", p.target = null, P === "touch" || !p.isHovered) return;
674
681
  p.isHovered = !1;
675
682
  let w = _.currentTarget;
@@ -680,18 +687,18 @@ function kt(e) {
680
687
  }), r && r(!1), u(!1);
681
688
  }, x = {};
682
689
  return typeof PointerEvent < "u" ? (x.onPointerEnter = (_) => {
683
- Z && _.pointerType === "mouse" || b(_, _.pointerType);
690
+ Z && _.pointerType === "mouse" || g(_, _.pointerType);
684
691
  }, x.onPointerLeave = (_) => {
685
- !a && _.currentTarget.contains(_.target) && E(_, _.pointerType);
692
+ !a && _.currentTarget.contains(_.target) && $(_, _.pointerType);
686
693
  }) : (x.onTouchStart = () => {
687
694
  p.ignoreEmulatedMouseEvents = !0;
688
695
  }, x.onMouseEnter = (_) => {
689
- !p.ignoreEmulatedMouseEvents && !Z && b(_, "mouse"), p.ignoreEmulatedMouseEvents = !1;
696
+ !p.ignoreEmulatedMouseEvents && !Z && g(_, "mouse"), p.ignoreEmulatedMouseEvents = !1;
690
697
  }, x.onMouseLeave = (_) => {
691
- !a && _.currentTarget.contains(_.target) && E(_, "mouse");
698
+ !a && _.currentTarget.contains(_.target) && $(_, "mouse");
692
699
  }), {
693
700
  hoverProps: x,
694
- triggerHoverEnd: E
701
+ triggerHoverEnd: $
695
702
  };
696
703
  }, [
697
704
  t,
@@ -701,7 +708,7 @@ function kt(e) {
701
708
  p
702
709
  ]);
703
710
  return J(() => {
704
- a && g({
711
+ a && v({
705
712
  currentTarget: p.target
706
713
  }, p.pointerType);
707
714
  }, [
@@ -711,7 +718,7 @@ function kt(e) {
711
718
  isHovered: d
712
719
  };
713
720
  }
714
- function wt(e, t) {
721
+ function Tt(e, t) {
715
722
  let {
716
723
  elementType: r = "button",
717
724
  isDisabled: o,
@@ -720,19 +727,19 @@ function wt(e, t) {
720
727
  onPressEnd: u,
721
728
  onPressUp: p,
722
729
  onPressChange: m,
723
- preventFocusOnPress: g,
724
- allowFocusWhenDisabled: b,
730
+ preventFocusOnPress: v,
731
+ allowFocusWhenDisabled: g,
725
732
  // @ts-ignore
726
- onClick: E,
733
+ onClick: $,
727
734
  href: x,
728
735
  target: _,
729
736
  rel: P,
730
737
  type: w = "button"
731
- } = e, B;
732
- r === "button" ? B = {
738
+ } = e, T;
739
+ r === "button" ? T = {
733
740
  type: w,
734
741
  disabled: o
735
- } : B = {
742
+ } : T = {
736
743
  role: "button",
737
744
  tabIndex: o ? void 0 : 0,
738
745
  href: r === "a" && o ? void 0 : x,
@@ -742,34 +749,34 @@ function wt(e, t) {
742
749
  "aria-disabled": !o || r === "input" ? void 0 : o,
743
750
  rel: r === "a" ? P : void 0
744
751
  };
745
- let { pressProps: S, isPressed: $ } = _t({
752
+ let { pressProps: S, isPressed: E } = gt({
746
753
  onPressStart: d,
747
754
  onPressEnd: u,
748
755
  onPressChange: m,
749
756
  onPress: a,
750
757
  onPressUp: p,
751
758
  isDisabled: o,
752
- preventFocusOnPress: g,
759
+ preventFocusOnPress: v,
753
760
  ref: t
754
- }), { focusableProps: k } = Ge(e, t);
755
- b && (k.tabIndex = o ? -1 : k.tabIndex);
756
- let O = G(k, S, Je(e, {
761
+ }), { focusableProps: k } = Ve(e, t);
762
+ g && (k.tabIndex = o ? -1 : k.tabIndex);
763
+ let D = G(k, S, Qe(e, {
757
764
  labelable: !0
758
765
  }));
759
766
  return {
760
- isPressed: $,
761
- buttonProps: G(B, O, {
767
+ isPressed: E,
768
+ buttonProps: G(T, D, {
762
769
  "aria-haspopup": e["aria-haspopup"],
763
770
  "aria-expanded": e["aria-expanded"],
764
771
  "aria-controls": e["aria-controls"],
765
772
  "aria-pressed": e["aria-pressed"],
766
773
  onClick: (N) => {
767
- E && (E(N), console.warn("onClick is deprecated, please use onPress"));
774
+ $ && ($(N), console.warn("onClick is deprecated, please use onPress"));
768
775
  }
769
776
  })
770
777
  };
771
778
  }
772
- function Tt(e, t, r) {
779
+ function Bt(e, t, r) {
773
780
  return t in e ? Object.defineProperty(e, t, {
774
781
  value: r,
775
782
  enumerable: !0,
@@ -791,14 +798,14 @@ function Te(e) {
791
798
  for (var t = 1; t < arguments.length; t++) {
792
799
  var r = arguments[t] != null ? arguments[t] : {};
793
800
  t % 2 ? we(Object(r), !0).forEach(function(o) {
794
- Tt(e, o, r[o]);
801
+ Bt(e, o, r[o]);
795
802
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : we(Object(r)).forEach(function(o) {
796
803
  Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(r, o));
797
804
  });
798
805
  }
799
806
  return e;
800
807
  }
801
- var Bt = (e, t, r) => {
808
+ var Et = (e, t, r) => {
802
809
  for (var o of Object.keys(e)) {
803
810
  var a;
804
811
  if (e[o] !== ((a = t[o]) !== null && a !== void 0 ? a : r[o]))
@@ -819,11 +826,11 @@ var Bt = (e, t, r) => {
819
826
  m && (r += " " + m);
820
827
  }
821
828
  }
822
- for (var [g, b] of e.compoundVariants)
823
- Bt(g, o, e.defaultVariants) && (r += " " + b);
829
+ for (var [v, g] of e.compoundVariants)
830
+ Et(v, o, e.defaultVariants) && (r += " " + g);
824
831
  return r;
825
- }, $t = ne({ defaultClassName: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy0", variantClassNames: { disabled: { true: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy1", false: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy2" }, kind: { default: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy3", link: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy4", confirm: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy5", delete: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy6", key: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy7", icon: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy8" }, spinning: { true: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy9", false: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxya" } }, defaultVariants: { disabled: !1, kind: "default", spinning: !1 }, compoundVariants: [[{ kind: "icon", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyb"], [{ kind: "default", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyc"], [{ kind: "confirm", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyd"], [{ kind: "delete", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxye"], [{ kind: "key", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyf"], [{ disabled: !0, spinning: !1 }, "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyg"]] }), Et = ne({ defaultClassName: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyh", variantClassNames: { disabled: { true: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyi", false: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyj" }, kind: { icon: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyk", default: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyl", delete: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxym", key: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyn", confirm: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyo", link: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyp" }, spinning: { true: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyq", false: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyr" } }, defaultVariants: { disabled: !1, kind: "default", spinning: !1 }, compoundVariants: [] }), Pt = "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy11", xt = ne({ defaultClassName: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy12", variantClassNames: { spinning: { true: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy13", false: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy14" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] }), St = ne({ defaultClassName: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxys", variantClassNames: { spinning: { true: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyt", false: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyu" }, kind: { icon: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyv", default: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyw", delete: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyx", key: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyy", confirm: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxyz", link: "pkg_sps-woodland_buttons__version_8_20_8__hash_125pcxy10" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] });
826
- function Nt({
832
+ }, $t = ne({ defaultClassName: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy0", variantClassNames: { disabled: { true: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy1", false: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy2" }, kind: { default: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy3", link: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy4", confirm: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy5", delete: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy6", key: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy7", icon: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy8" }, spinning: { true: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy9", false: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxya" } }, defaultVariants: { disabled: !1, kind: "default", spinning: !1 }, compoundVariants: [[{ kind: "icon", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyb"], [{ kind: "default", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyc"], [{ kind: "confirm", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyd"], [{ kind: "delete", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxye"], [{ kind: "key", spinning: !0 }, "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyf"], [{ disabled: !0, spinning: !1 }, "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyg"]] }), Pt = ne({ defaultClassName: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyh", variantClassNames: { disabled: { true: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyi", false: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyj" }, kind: { icon: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyk", default: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyl", delete: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxym", key: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyn", confirm: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyo", link: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyp" }, spinning: { true: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyq", false: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyr" } }, defaultVariants: { disabled: !1, kind: "default", spinning: !1 }, compoundVariants: [] }), xt = "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy11", St = ne({ defaultClassName: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy12", variantClassNames: { spinning: { true: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy13", false: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy14" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] }), Nt = ne({ defaultClassName: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxys", variantClassNames: { spinning: { true: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyt", false: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyu" }, kind: { icon: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyv", default: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyw", delete: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyx", key: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyy", confirm: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxyz", link: "pkg_sps-woodland_buttons__version_8_20_9__hash_125pcxy10" } }, defaultVariants: { spinning: !1 }, compoundVariants: [] });
833
+ function Dt({
827
834
  as: e,
828
835
  onClick: t,
829
836
  onPress: r,
@@ -833,52 +840,52 @@ function Nt({
833
840
  disabled: u,
834
841
  href: p,
835
842
  icon: m,
836
- kind: g = "default",
837
- spinning: b,
838
- spinningTitle: E,
843
+ kind: v = "default",
844
+ spinning: g,
845
+ spinningTitle: $,
839
846
  title: x,
840
847
  ..._
841
848
  }, P) {
842
- const w = e ?? (p ? "a" : "button"), B = {
849
+ const w = e ?? (p ? "a" : "button"), T = {
843
850
  onPress: r ?? t,
844
851
  // the button element should be disabled if the button is marked as disabled or spinning
845
- isDisabled: u ?? d ?? b,
852
+ isDisabled: u ?? d ?? g,
846
853
  ..._
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: $,
854
+ }, { "data-testid": S } = _, E = P || c.useRef(null), { buttonProps: k } = Tt(T, E), { hoverProps: D } = wt({ isDisabled: T.isDisabled }), { type: N, ...A } = k, oe = {
855
+ ...G(A, D),
856
+ ref: E,
850
857
  title: x,
851
- className: p ? St({ spinning: b, kind: g }) : Et({ disabled: d || u, kind: g, spinning: b }),
858
+ className: p ? Nt({ spinning: g, kind: v }) : Pt({ disabled: d || u, kind: v, spinning: g }),
852
859
  ...p ? { href: p } : { type: N },
853
860
  ..._
854
- }, { t: n } = c.useContext(Fe), f = m && /* @__PURE__ */ c.createElement(
855
- Re,
861
+ }, { t: n } = c.useContext(Ue), f = m && /* @__PURE__ */ c.createElement(
862
+ Ge,
856
863
  {
857
- className: Pt,
864
+ className: xt,
858
865
  icon: m,
859
866
  "aria-hidden": "true",
860
867
  "data-testid": `${S}__${m}-icon`
861
868
  }
862
869
  );
863
- let T;
864
- g === "default" || g === "icon" || g === "link" ? T = "dark" : T = "light";
865
- const l = b && /* @__PURE__ */ c.createElement(
866
- Ue,
870
+ let B;
871
+ v === "default" || v === "icon" || v === "link" ? B = "dark" : B = "light";
872
+ const l = g && /* @__PURE__ */ c.createElement(
873
+ He,
867
874
  {
868
- color: T,
869
- className: xt({ spinning: b }),
870
- title: E || n("design-system:button.spinningTitle"),
875
+ color: B,
876
+ className: St({ spinning: g }),
877
+ title: $ || n("design-system:button.spinningTitle"),
871
878
  "data-testid": `${S}__spinner`
872
879
  }
873
880
  );
874
- return /* @__PURE__ */ c.createElement(Ve, null, /* @__PURE__ */ c.createElement(
881
+ return /* @__PURE__ */ c.createElement(We, null, /* @__PURE__ */ c.createElement(
875
882
  "div",
876
883
  {
877
- className: He(
884
+ className: Re(
878
885
  $t({
879
886
  disabled: d || u,
880
- kind: g,
881
- spinning: b
887
+ kind: v,
888
+ spinning: g
882
889
  }),
883
890
  a
884
891
  )
@@ -886,8 +893,8 @@ function Nt({
886
893
  /* @__PURE__ */ c.createElement(w, { ...oe }, f, o ? /* @__PURE__ */ c.createElement("span", null, o) : "", l)
887
894
  ));
888
895
  }
889
- const Ae = c.forwardRef(Nt);
890
- Me.set(Ae, {
896
+ const Ae = c.forwardRef(Dt);
897
+ Fe.set(Ae, {
891
898
  name: "Button",
892
899
  props: {
893
900
  disabled: "boolean",
@@ -913,7 +920,7 @@ const Ot = {
913
920
  examples: {
914
921
  withoutIcons: {
915
922
  description: "Without Icons",
916
- react: h`
923
+ react: y`
917
924
  import { Button } from "@sps-woodland/buttons";
918
925
  import { sprinkles } from "@sps-woodland/tokens";
919
926
 
@@ -932,7 +939,7 @@ const Ot = {
932
939
  },
933
940
  withIcons: {
934
941
  description: "With Icons",
935
- react: h`
942
+ react: y`
936
943
  import { Button } from "@sps-woodland/buttons";
937
944
  import { sprinkles } from "@sps-woodland/tokens";
938
945
 
@@ -951,7 +958,7 @@ const Ot = {
951
958
  },
952
959
  spinning: {
953
960
  description: "Spinning",
954
- react: h`
961
+ react: y`
955
962
  import { Button } from "@sps-woodland/buttons";
956
963
  import { sprinkles } from "@sps-woodland/tokens";
957
964
 
@@ -975,7 +982,7 @@ const Ot = {
975
982
  examples: {
976
983
  withoutIcons: {
977
984
  description: "Without Icons",
978
- react: h`
985
+ react: y`
979
986
  import { SpsDropdown } from "@spscommerce/ds-react";
980
987
 
981
988
  function Component() {
@@ -1017,7 +1024,7 @@ const Ot = {
1017
1024
  },
1018
1025
  withIcons: {
1019
1026
  description: "With Icons",
1020
- react: h`
1027
+ react: y`
1021
1028
  import { SpsDropdown } from "@spscommerce/ds-react";
1022
1029
 
1023
1030
  function Component() {
@@ -1064,7 +1071,7 @@ const Ot = {
1064
1071
  },
1065
1072
  spinning: {
1066
1073
  description: "Spinning",
1067
- react: h`
1074
+ react: y`
1068
1075
  import { SpsDropdown } from "@spscommerce/ds-react";
1069
1076
 
1070
1077
  function Component() {
@@ -1110,7 +1117,7 @@ const Ot = {
1110
1117
  examples: {
1111
1118
  withoutIcons: {
1112
1119
  description: "Without Icons",
1113
- react: h`
1120
+ react: y`
1114
1121
  import { SpsSplitButton } from "@spscommerce/ds-react";
1115
1122
 
1116
1123
  function Component() {
@@ -1140,7 +1147,7 @@ const Ot = {
1140
1147
  },
1141
1148
  withIcons: {
1142
1149
  description: "With Icons",
1143
- react: h`
1150
+ react: y`
1144
1151
  import { SpsSplitButton } from "@spscommerce/ds-react";
1145
1152
 
1146
1153
  function Component() {
@@ -1188,7 +1195,7 @@ const Ot = {
1188
1195
  examples: {
1189
1196
  standard: {
1190
1197
  description: "Standard Icon Buttons",
1191
- react: h`
1198
+ react: y`
1192
1199
  import { Button } from "@sps-woodland/buttons";
1193
1200
  import { sprinkles } from "@sps-woodland/tokens";
1194
1201
 
@@ -1211,7 +1218,7 @@ const Ot = {
1211
1218
  },
1212
1219
  dropdown: {
1213
1220
  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"), ".")),
1214
- react: h`
1221
+ react: y`
1215
1222
  import { SpsDropdown } from "@spscommerce/ds-react";
1216
1223
 
1217
1224
  function Component() {
@@ -1229,7 +1236,7 @@ const Ot = {
1229
1236
  },
1230
1237
  spinner: {
1231
1238
  description: "Spinner",
1232
- react: h`
1239
+ react: y`
1233
1240
  import { Button } from "@sps-woodland/buttons";
1234
1241
 
1235
1242
  function Component() {
@@ -1249,7 +1256,7 @@ const Ot = {
1249
1256
  examples: {
1250
1257
  withoutIcons: {
1251
1258
  description: "Without Icons",
1252
- react: h`
1259
+ react: y`
1253
1260
  import { Button } from "@sps-woodland/buttons";
1254
1261
  import { sprinkles } from "@sps-woodland/tokens";
1255
1262
 
@@ -1266,7 +1273,7 @@ const Ot = {
1266
1273
  },
1267
1274
  withIcons: {
1268
1275
  description: "With Icons",
1269
- react: h`
1276
+ react: y`
1270
1277
  import { Button } from "@sps-woodland/buttons";
1271
1278
  import { sprinkles } from "@sps-woodland/tokens";
1272
1279
 
@@ -1283,7 +1290,7 @@ const Ot = {
1283
1290
  },
1284
1291
  spinner: {
1285
1292
  description: "Spinner",
1286
- react: h`
1293
+ react: y`
1287
1294
  import { Button } from "@sps-woodland/buttons";
1288
1295
 
1289
1296
  function Component() {
@@ -1302,7 +1309,7 @@ const Ot = {
1302
1309
  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."),
1303
1310
  examples: {
1304
1311
  basic: {
1305
- react: h`
1312
+ react: y`
1306
1313
  import { Button } from "@sps-woodland/buttons";
1307
1314
  import { sprinkles } from "@sps-woodland/tokens";
1308
1315
 
@@ -1330,7 +1337,7 @@ const Ot = {
1330
1337
  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.",
1331
1338
  examples: {
1332
1339
  basic: {
1333
- react: h`
1340
+ react: y`
1334
1341
  import { Button } from "@sps-woodland/buttons";
1335
1342
 
1336
1343
  function Component() {
@@ -1352,7 +1359,7 @@ const Ot = {
1352
1359
  examples: {
1353
1360
  basic: {
1354
1361
  description: "Basic Button Groups",
1355
- react: h`
1362
+ react: y`
1356
1363
  import { Button } from "@sps-woodland/buttons";
1357
1364
  import { sprinkles } from "@sps-woodland/tokens";
1358
1365
 
@@ -1368,7 +1375,7 @@ const Ot = {
1368
1375
  },
1369
1376
  icon: {
1370
1377
  description: "Icon Button Groups",
1371
- react: h`
1378
+ react: y`
1372
1379
  import { Button } from "@sps-woodland/buttons";
1373
1380
 
1374
1381
  function Component() {
@@ -1383,7 +1390,7 @@ const Ot = {
1383
1390
  },
1384
1391
  textAndIcons: {
1385
1392
  description: "Text Buttons + Icon Buttons Group",
1386
- react: h`
1393
+ react: y`
1387
1394
  import { Button } from "@sps-woodland/buttons";
1388
1395
  import { sprinkles } from "@sps-woodland/tokens";
1389
1396
  import { VericalRule } from "@sps-woodland/core";
@@ -1402,7 +1409,7 @@ const Ot = {
1402
1409
  },
1403
1410
  textAndBasic: {
1404
1411
  description: "Text Buttons + Basic Buttons Group",
1405
- react: h`
1412
+ react: y`
1406
1413
  import { Button } from "@sps-woodland/buttons";
1407
1414
  import { sprinkles } from "@sps-woodland/tokens";
1408
1415
  import { VericalRule } from "@sps-woodland/core";
@@ -1422,7 +1429,7 @@ const Ot = {
1422
1429
  },
1423
1430
  iconsAndBasic: {
1424
1431
  description: "Icon Buttons + Basic Buttons Group",
1425
- react: h`
1432
+ react: y`
1426
1433
  import { Button } from "@sps-woodland/buttons";
1427
1434
  import { sprinkles } from "@sps-woodland/tokens";
1428
1435
  import { VericalRule } from "@sps-woodland/core";
@@ -1443,7 +1450,7 @@ const Ot = {
1443
1450
  },
1444
1451
  textIconsAndBasic: {
1445
1452
  description: "Text Buttons + Icon Buttons + Basic Buttons Group",
1446
- react: h`
1453
+ react: y`
1447
1454
  import { Button } from "@sps-woodland/buttons";
1448
1455
  import { sprinkles } from "@sps-woodland/tokens";
1449
1456
  import { VericalRule } from "@sps-woodland/core";