@phillips/seldon 1.118.2 → 1.120.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.
Files changed (122) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +1 -1
  2. package/dist/components/Accordion/Accordion.js +18 -18
  3. package/dist/components/Accordion/AccordionItem.js +67 -68
  4. package/dist/components/Carousel/Carousel.js +49 -51
  5. package/dist/components/Carousel/CarouselDots.js +46 -47
  6. package/dist/components/ContentPeek/ContentPeek.js +47 -47
  7. package/dist/components/ErrorBoundary/ErrorBoundary.js +11 -12
  8. package/dist/components/Filter/Filter.js +40 -41
  9. package/dist/components/Filter/FilterHeader.js +24 -24
  10. package/dist/components/Input/Input.d.ts +1 -1
  11. package/dist/components/Input/Input.js +21 -20
  12. package/dist/components/Input/Input.stories.d.ts +7 -0
  13. package/dist/components/Link/utils.js +2 -2
  14. package/dist/components/LinkBlock/LinkBlock.js +12 -13
  15. package/dist/components/LinkList/LinkList.js +8 -11
  16. package/dist/components/Navigation/Navigation.js +21 -22
  17. package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +49 -50
  18. package/dist/components/Navigation/NavigationList/NavigationList.js +33 -35
  19. package/dist/components/Pagination/Pagination.js +7 -7
  20. package/dist/components/Pagination/utils.js +1 -1
  21. package/dist/components/PinchZoom/PinchZoom.js +40 -43
  22. package/dist/components/Search/Search.js +93 -96
  23. package/dist/components/Search/SearchButton.js +19 -19
  24. package/dist/components/SeldonImage/SeldonImage.js +1 -1
  25. package/dist/components/Select/Select.js +22 -14
  26. package/dist/components/Select/Select.stories.d.ts +15 -0
  27. package/dist/components/Tabs/TabTrigger.js +13 -13
  28. package/dist/node_modules/@artsy/fresnel/dist/Breakpoints.js +2 -2
  29. package/dist/node_modules/@artsy/fresnel/dist/DynamicResponsive.js +1 -1
  30. package/dist/node_modules/@artsy/fresnel/dist/Interactions.js +2 -2
  31. package/dist/node_modules/@artsy/fresnel/dist/Media.js +2 -2
  32. package/dist/node_modules/@artsy/fresnel/dist/MediaQueries.js +1 -1
  33. package/dist/node_modules/@artsy/fresnel/dist/Utils.js +1 -1
  34. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
  35. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
  36. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +2 -2
  37. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +2 -2
  38. package/dist/node_modules/@radix-ui/primitive/dist/index.js +5 -5
  39. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +63 -67
  40. package/dist/node_modules/@radix-ui/react-context/dist/index.js +35 -35
  41. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +80 -84
  42. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js +5 -5
  43. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js +43 -45
  44. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
  45. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
  46. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
  47. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
  48. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
  49. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
  50. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
  51. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
  52. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
  53. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
  54. package/dist/node_modules/@radix-ui/react-id/dist/index.js +10 -10
  55. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +113 -115
  56. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
  57. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +33 -37
  58. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
  59. package/dist/node_modules/@radix-ui/react-select/dist/index.js +423 -440
  60. package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +28 -28
  61. package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
  62. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +62 -0
  63. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
  64. package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js +39 -41
  65. package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
  66. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +7 -10
  67. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +1 -1
  68. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
  69. package/dist/node_modules/aria-hidden/dist/es2015/index.js +1 -1
  70. package/dist/node_modules/change-case/dist/index.js +41 -44
  71. package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
  72. package/dist/node_modules/date-fns/differenceInDays.js +9 -9
  73. package/dist/node_modules/date-fns/differenceInHours.js +11 -11
  74. package/dist/node_modules/date-fns/differenceInMinutes.js +8 -8
  75. package/dist/node_modules/date-fns/differenceInSeconds.js +7 -7
  76. package/dist/node_modules/date-fns/formatDuration.js +11 -12
  77. package/dist/node_modules/date-fns/isSameWeek.js +8 -8
  78. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
  79. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
  80. package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +5 -5
  81. package/dist/node_modules/date-fns/locale/zh-CN/_lib/localize.js +10 -10
  82. package/dist/node_modules/date-fns/startOfDay.js +6 -6
  83. package/dist/node_modules/date-fns/startOfWeek.js +7 -8
  84. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1 -1
  85. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +1 -1
  86. package/dist/node_modules/exenv/index.js +2 -2
  87. package/dist/node_modules/get-nonce/dist/es2015/index.js +1 -1
  88. package/dist/node_modules/prop-types/checkPropTypes.js +2 -2
  89. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +3 -3
  90. package/dist/node_modules/react-intersection-observer/dist/index.js +2 -2
  91. package/dist/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js +1 -1
  92. package/dist/node_modules/react-modal/lib/components/ModalPortal.js +1 -1
  93. package/dist/node_modules/react-modal/lib/helpers/scopeTab.js +1 -1
  94. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +28 -28
  95. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
  96. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +34 -32
  97. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +1 -1
  98. package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
  99. package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.js +14 -14
  100. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -1
  101. package/dist/node_modules/usehooks-ts/dist/index.js +1 -1
  102. package/dist/node_modules/warning/warning.js +1 -1
  103. package/dist/node_modules/wheel-gestures/dist/wheel-gestures.esm.js +1 -1
  104. package/dist/patterns/BidSnapshot/BidSnapshot.js +58 -58
  105. package/dist/patterns/DetailList/DetailList.js +22 -22
  106. package/dist/patterns/FilterMenu/FilterMenu.js +15 -15
  107. package/dist/patterns/LanguageSelector/LanguageSelector.js +23 -23
  108. package/dist/patterns/LanguageSelector/utils.js +2 -5
  109. package/dist/patterns/ObjectTile/ObjectTile.js +46 -46
  110. package/dist/patterns/ViewingsList/StatefulViewingsList.js +16 -16
  111. package/dist/patterns/ViewingsList/ViewingsList.js +42 -42
  112. package/dist/patterns/ViewingsList/ViewingsListCard.js +122 -123
  113. package/dist/patterns/ViewingsList/ViewingsListCardForm.js +170 -170
  114. package/dist/scss/components/Search/SearchResults/_searchResults.scss +8 -0
  115. package/dist/site-furniture/Header/Header.js +32 -32
  116. package/package.json +3 -1
  117. package/dist/node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -64
  118. /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -0
  119. /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -0
  120. /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -0
  121. /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -0
  122. /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/tslib/tslib.es6.js +0 -0
@@ -4,47 +4,47 @@ import { RemoveScrollBar as A } from "../../../../../../react-remove-scroll-bar/
4
4
  import { styleSingleton as I } from "../../../../../../react-style-singleton/dist/es2015/component.js";
5
5
  import { nonPassive as s } from "./aggresiveCapture.js";
6
6
  import { locationCouldBeScrolled as T, handleScroll as W } from "./handleScroll.js";
7
- var b = function(t) {
7
+ var k = function(t) {
8
8
  return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
9
9
  }, Y = function(t) {
10
10
  return [t.deltaX, t.deltaY];
11
11
  }, B = function(t) {
12
12
  return t && "current" in t ? t.current : t;
13
- }, p = function(t, c) {
13
+ }, F = function(t, c) {
14
14
  return t[0] === c[0] && t[1] === c[1];
15
- }, F = function(t) {
15
+ }, O = function(t) {
16
16
  return `
17
17
  .block-interactivity-`.concat(t, ` {pointer-events: none;}
18
18
  .allow-interactivity-`).concat(t, ` {pointer-events: all;}
19
19
  `);
20
- }, K = 0, f = [];
21
- function z(t) {
22
- var c = n.useRef([]), E = n.useRef([0, 0]), d = n.useRef(), h = n.useState(K++)[0], m = n.useState(I)[0], g = n.useRef(t);
20
+ }, Q = 0, f = [];
21
+ function G(t) {
22
+ var c = n.useRef([]), E = n.useRef([0, 0]), d = n.useRef(), v = n.useState(Q++)[0], m = n.useState(I)[0], g = n.useRef(t);
23
23
  n.useEffect(function() {
24
24
  g.current = t;
25
25
  }, [t]), n.useEffect(function() {
26
26
  if (t.inert) {
27
- document.body.classList.add("block-interactivity-".concat(h));
27
+ document.body.classList.add("block-interactivity-".concat(v));
28
28
  var e = x([t.lockRef.current], (t.shards || []).map(B), !0).filter(Boolean);
29
29
  return e.forEach(function(r) {
30
- return r.classList.add("allow-interactivity-".concat(h));
30
+ return r.classList.add("allow-interactivity-".concat(v));
31
31
  }), function() {
32
- document.body.classList.remove("block-interactivity-".concat(h)), e.forEach(function(r) {
33
- return r.classList.remove("allow-interactivity-".concat(h));
32
+ document.body.classList.remove("block-interactivity-".concat(v)), e.forEach(function(r) {
33
+ return r.classList.remove("allow-interactivity-".concat(v));
34
34
  });
35
35
  };
36
36
  }
37
37
  }, [t.inert, t.lockRef.current, t.shards]);
38
- var k = n.useCallback(function(e, r) {
39
- if ("touches" in e && e.touches.length === 2 || e.type === "wheel" && e.ctrlKey)
38
+ var y = n.useCallback(function(e, r) {
39
+ if ("touches" in e && e.touches.length === 2)
40
40
  return !g.current.allowPinchZoom;
41
- var l = b(e), o = E.current, u = "deltaX" in e ? e.deltaX : o[0] - l[0], i = "deltaY" in e ? e.deltaY : o[1] - l[1], a, C = e.target, v = Math.abs(u) > Math.abs(i) ? "h" : "v";
42
- if ("touches" in e && v === "h" && C.type === "range")
41
+ var l = k(e), o = E.current, u = "deltaX" in e ? e.deltaX : o[0] - l[0], i = "deltaY" in e ? e.deltaY : o[1] - l[1], a, C = e.target, h = Math.abs(u) > Math.abs(i) ? "h" : "v";
42
+ if ("touches" in e && h === "h" && C.type === "range")
43
43
  return !1;
44
- var y = T(v, C);
45
- if (!y)
44
+ var b = T(h, C);
45
+ if (!b)
46
46
  return !0;
47
- if (y ? a = v : (a = v === "v" ? "h" : "v", y = T(v, C)), !y)
47
+ if (b ? a = h : (a = h === "v" ? "h" : "v", b = T(h, C)), !b)
48
48
  return !1;
49
49
  if (!d.current && "changedTouches" in e && (u || i) && (d.current = a), !a)
50
50
  return !0;
@@ -53,8 +53,8 @@ function z(t) {
53
53
  }, []), S = n.useCallback(function(e) {
54
54
  var r = e;
55
55
  if (!(!f.length || f[f.length - 1] !== m)) {
56
- var l = "deltaY" in r ? Y(r) : b(r), o = c.current.filter(function(a) {
57
- return a.name === r.type && (a.target === r.target || r.target === a.shadowParent) && p(a.delta, l);
56
+ var l = "deltaY" in r ? Y(r) : k(r), o = c.current.filter(function(a) {
57
+ return a.name === r.type && (a.target === r.target || r.target === a.shadowParent) && F(a.delta, l);
58
58
  })[0];
59
59
  if (o && o.should) {
60
60
  r.cancelable && r.preventDefault();
@@ -63,23 +63,23 @@ function z(t) {
63
63
  if (!o) {
64
64
  var u = (g.current.shards || []).map(B).filter(Boolean).filter(function(a) {
65
65
  return a.contains(r.target);
66
- }), i = u.length > 0 ? k(r, u[0]) : !g.current.noIsolation;
66
+ }), i = u.length > 0 ? y(r, u[0]) : !g.current.noIsolation;
67
67
  i && r.cancelable && r.preventDefault();
68
68
  }
69
69
  }
70
70
  }, []), R = n.useCallback(function(e, r, l, o) {
71
- var u = { name: e, delta: r, target: l, should: o, shadowParent: O(l) };
71
+ var u = { name: e, delta: r, target: l, should: o, shadowParent: Z(l) };
72
72
  c.current.push(u), setTimeout(function() {
73
73
  c.current = c.current.filter(function(i) {
74
74
  return i !== u;
75
75
  });
76
76
  }, 1);
77
77
  }, []), w = n.useCallback(function(e) {
78
- E.current = b(e), d.current = void 0;
78
+ E.current = k(e), d.current = void 0;
79
79
  }, []), L = n.useCallback(function(e) {
80
- R(e.type, Y(e), e.target, k(e, t.lockRef.current));
80
+ R(e.type, Y(e), e.target, y(e, t.lockRef.current));
81
81
  }, []), M = n.useCallback(function(e) {
82
- R(e.type, b(e), e.target, k(e, t.lockRef.current));
82
+ R(e.type, k(e), e.target, y(e, t.lockRef.current));
83
83
  }, []);
84
84
  n.useEffect(function() {
85
85
  return f.push(m), t.setCallbacks({
@@ -96,17 +96,17 @@ function z(t) {
96
96
  return n.createElement(
97
97
  n.Fragment,
98
98
  null,
99
- D ? n.createElement(m, { styles: F(h) }) : null,
99
+ D ? n.createElement(m, { styles: O(v) }) : null,
100
100
  X ? n.createElement(A, { gapMode: t.gapMode }) : null
101
101
  );
102
102
  }
103
- function O(t) {
103
+ function Z(t) {
104
104
  for (var c = null; t !== null; )
105
105
  t instanceof ShadowRoot && (c = t.host, t = t.host), t = t.parentNode;
106
106
  return c;
107
107
  }
108
108
  export {
109
- z as RemoveScrollSideCar,
109
+ G as RemoveScrollSideCar,
110
110
  Y as getDeltaXY,
111
- b as getTouchXY
111
+ k as getTouchXY
112
112
  };
@@ -1,5 +1,5 @@
1
1
  var r = !1;
2
- if (typeof window != "undefined")
2
+ if (typeof window < "u")
3
3
  try {
4
4
  var e = Object.defineProperty({}, "passive", {
5
5
  get: function() {
@@ -0,0 +1,62 @@
1
+ var p = function(r) {
2
+ return r.tagName === "TEXTAREA";
3
+ }, w = function(r, e) {
4
+ var o = window.getComputedStyle(r);
5
+ return (
6
+ // not-not-scrollable
7
+ o[e] !== "hidden" && // contains scroll inside self
8
+ !(o.overflowY === o.overflowX && !p(r) && o[e] === "visible")
9
+ );
10
+ }, y = function(r) {
11
+ return w(r, "overflowY");
12
+ }, H = function(r) {
13
+ return w(r, "overflowX");
14
+ }, R = function(r, e) {
15
+ var o = e.ownerDocument, t = e;
16
+ do {
17
+ typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
18
+ var a = g(r, t);
19
+ if (a) {
20
+ var n = b(r, t), i = n[1], l = n[2];
21
+ if (i > l)
22
+ return !0;
23
+ }
24
+ t = t.parentNode;
25
+ } while (t && t !== o.body);
26
+ return !1;
27
+ }, B = function(r) {
28
+ var e = r.scrollTop, o = r.scrollHeight, t = r.clientHeight;
29
+ return [
30
+ e,
31
+ o,
32
+ t
33
+ ];
34
+ }, V = function(r) {
35
+ var e = r.scrollLeft, o = r.scrollWidth, t = r.clientWidth;
36
+ return [
37
+ e,
38
+ o,
39
+ t
40
+ ];
41
+ }, g = function(r, e) {
42
+ return r === "v" ? y(e) : H(e);
43
+ }, b = function(r, e) {
44
+ return r === "v" ? B(e) : V(e);
45
+ }, D = function(r, e) {
46
+ return r === "h" && e === "rtl" ? -1 : 1;
47
+ }, W = function(r, e, o, t, a) {
48
+ var n = D(r, window.getComputedStyle(e).direction), i = n * t, l = o.target, f = e.contains(l), c = !1, d = i > 0, s = 0, h = 0;
49
+ do {
50
+ var u = b(r, l), v = u[0], m = u[1], C = u[2], S = m - C - n * v;
51
+ (v || S) && g(r, l) && (s += S, h += v), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
52
+ } while (
53
+ // portaled content
54
+ !f && l !== document.body || // self content
55
+ f && (e.contains(l) || e === l)
56
+ );
57
+ return (d && (Math.abs(s) < 1 || !a) || !d && (Math.abs(h) < 1 || !a)) && (c = !0), c;
58
+ };
59
+ export {
60
+ W as handleScroll,
61
+ R as locationCouldBeScrolled
62
+ };
@@ -1,46 +1,45 @@
1
- import * as l from "react";
1
+ import * as o from "react";
2
2
  import { composeRefs as u } from "../../react-compose-refs/dist/index.js";
3
3
  import { jsx as c, Fragment as d } from "react/jsx-runtime";
4
- var m = l.forwardRef((e, n) => {
5
- const { children: r, ...t } = e, o = l.Children.toArray(r), i = o.find(y);
4
+ var m = o.forwardRef((e, n) => {
5
+ const { children: r, ...t } = e, l = o.Children.toArray(r), i = l.find(y);
6
6
  if (i) {
7
- const s = i.props.children, a = o.map((p) => p === i ? l.Children.count(s) > 1 ? l.Children.only(null) : l.isValidElement(s) ? s.props.children : null : p);
8
- return /* @__PURE__ */ c(f, { ...t, ref: n, children: l.isValidElement(s) ? l.cloneElement(s, void 0, a) : null });
7
+ const s = i.props.children, a = l.map((p) => p === i ? o.Children.count(s) > 1 ? o.Children.only(null) : o.isValidElement(s) ? s.props.children : null : p);
8
+ return /* @__PURE__ */ c(f, { ...t, ref: n, children: o.isValidElement(s) ? o.cloneElement(s, void 0, a) : null });
9
9
  }
10
10
  return /* @__PURE__ */ c(f, { ...t, ref: n, children: r });
11
11
  });
12
12
  m.displayName = "Slot";
13
- var f = l.forwardRef((e, n) => {
13
+ var f = o.forwardRef((e, n) => {
14
14
  const { children: r, ...t } = e;
15
- if (l.isValidElement(r)) {
16
- const o = C(r);
17
- return l.cloneElement(r, {
15
+ if (o.isValidElement(r)) {
16
+ const l = C(r);
17
+ return o.cloneElement(r, {
18
18
  ...h(t, r.props),
19
19
  // @ts-ignore
20
- ref: n ? u(n, o) : o
20
+ ref: n ? u(n, l) : l
21
21
  });
22
22
  }
23
- return l.Children.count(r) > 1 ? l.Children.only(null) : null;
23
+ return o.Children.count(r) > 1 ? o.Children.only(null) : null;
24
24
  });
25
25
  f.displayName = "SlotClone";
26
26
  var g = ({ children: e }) => /* @__PURE__ */ c(d, { children: e });
27
27
  function y(e) {
28
- return l.isValidElement(e) && e.type === g;
28
+ return o.isValidElement(e) && e.type === g;
29
29
  }
30
30
  function h(e, n) {
31
31
  const r = { ...n };
32
32
  for (const t in n) {
33
- const o = e[t], i = n[t];
34
- /^on[A-Z]/.test(t) ? o && i ? r[t] = (...a) => {
35
- i(...a), o(...a);
36
- } : o && (r[t] = o) : t === "style" ? r[t] = { ...o, ...i } : t === "className" && (r[t] = [o, i].filter(Boolean).join(" "));
33
+ const l = e[t], i = n[t];
34
+ /^on[A-Z]/.test(t) ? l && i ? r[t] = (...a) => {
35
+ i(...a), l(...a);
36
+ } : l && (r[t] = l) : t === "style" ? r[t] = { ...l, ...i } : t === "className" && (r[t] = [l, i].filter(Boolean).join(" "));
37
37
  }
38
38
  return { ...e, ...r };
39
39
  }
40
40
  function C(e) {
41
- var t, o;
42
- let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, r = n && "isReactWarning" in n && n.isReactWarning;
43
- return r ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
41
+ let n = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning;
42
+ return r ? e.ref : (n = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
44
43
  }
45
44
  export {
46
45
  m as Slot,
@@ -1,55 +1,53 @@
1
- import * as i from "react";
2
- import { jsx as h } from "react/jsx-runtime";
3
- function $(t, x = []) {
4
- let o = [];
5
- function C(u, e) {
6
- const n = i.createContext(e), r = o.length;
7
- o = [...o, e];
8
- const m = (a) => {
9
- var v;
10
- const { scope: c, children: S, ...p } = a, f = ((v = c == null ? void 0 : c[t]) == null ? void 0 : v[r]) || n, _ = i.useMemo(() => p, Object.values(p));
11
- return /* @__PURE__ */ h(f.Provider, { value: _, children: S });
1
+ import * as u from "react";
2
+ import { jsx as _ } from "react/jsx-runtime";
3
+ function P(e, p = []) {
4
+ let n = [];
5
+ function m(s, t) {
6
+ const o = u.createContext(t), c = n.length;
7
+ n = [...n, t];
8
+ const a = (i) => {
9
+ const { scope: f, children: C, ...x } = i, d = f?.[e]?.[c] || o, v = u.useMemo(() => x, Object.values(x));
10
+ return /* @__PURE__ */ _(d.Provider, { value: v, children: C });
12
11
  };
13
- m.displayName = u + "Provider";
14
- function d(a, c) {
15
- var f;
16
- const S = ((f = c == null ? void 0 : c[t]) == null ? void 0 : f[r]) || n, p = i.useContext(S);
17
- if (p) return p;
18
- if (e !== void 0) return e;
19
- throw new Error(`\`${a}\` must be used within \`${u}\``);
12
+ a.displayName = s + "Provider";
13
+ function S(i, f) {
14
+ const C = f?.[e]?.[c] || o, x = u.useContext(C);
15
+ if (x) return x;
16
+ if (t !== void 0) return t;
17
+ throw new Error(`\`${i}\` must be used within \`${s}\``);
20
18
  }
21
- return [m, d];
19
+ return [a, S];
22
20
  }
23
- const s = () => {
24
- const u = o.map((e) => i.createContext(e));
25
- return function(n) {
26
- const r = (n == null ? void 0 : n[t]) || u;
27
- return i.useMemo(
28
- () => ({ [`__scope${t}`]: { ...n, [t]: r } }),
29
- [n, r]
21
+ const r = () => {
22
+ const s = n.map((t) => u.createContext(t));
23
+ return function(o) {
24
+ const c = o?.[e] || s;
25
+ return u.useMemo(
26
+ () => ({ [`__scope${e}`]: { ...o, [e]: c } }),
27
+ [o, c]
30
28
  );
31
29
  };
32
30
  };
33
- return s.scopeName = t, [C, l(s, ...x)];
31
+ return r.scopeName = e, [m, h(r, ...p)];
34
32
  }
35
- function l(...t) {
36
- const x = t[0];
37
- if (t.length === 1) return x;
38
- const o = () => {
39
- const C = t.map((s) => ({
40
- useScope: s(),
41
- scopeName: s.scopeName
33
+ function h(...e) {
34
+ const p = e[0];
35
+ if (e.length === 1) return p;
36
+ const n = () => {
37
+ const m = e.map((r) => ({
38
+ useScope: r(),
39
+ scopeName: r.scopeName
42
40
  }));
43
- return function(u) {
44
- const e = C.reduce((n, { useScope: r, scopeName: m }) => {
45
- const a = r(u)[`__scope${m}`];
46
- return { ...n, ...a };
41
+ return function(s) {
42
+ const t = m.reduce((o, { useScope: c, scopeName: a }) => {
43
+ const i = c(s)[`__scope${a}`];
44
+ return { ...o, ...i };
47
45
  }, {});
48
- return i.useMemo(() => ({ [`__scope${x.scopeName}`]: e }), [e]);
46
+ return u.useMemo(() => ({ [`__scope${p.scopeName}`]: t }), [t]);
49
47
  };
50
48
  };
51
- return o.scopeName = x.scopeName, o;
49
+ return n.scopeName = p.scopeName, n;
52
50
  }
53
51
  export {
54
- $ as createContextScope
52
+ P as createContextScope
55
53
  };
@@ -1,19 +1,16 @@
1
- import * as a from "react";
2
- import { useComposedRefs as E } from "../../../../../react-compose-refs/dist/index.js";
3
- import { useLayoutEffect as M } from "../../../../../react-use-layout-effect/dist/index.js";
4
- function T(n, e) {
5
- return a.useReducer((r, t) => {
6
- const o = e[r][t];
7
- return o != null ? o : r;
8
- }, n);
1
+ import * as i from "react";
2
+ import { useComposedRefs as O } from "../../../../../react-compose-refs/dist/index.js";
3
+ import { useLayoutEffect as A } from "../../../../../react-use-layout-effect/dist/index.js";
4
+ function E(n, e) {
5
+ return i.useReducer((t, r) => e[t][r] ?? t, n);
9
6
  }
10
- var R = (n) => {
11
- const { present: e, children: r } = n, t = v(e), o = typeof r == "function" ? r({ present: t.isPresent }) : a.Children.only(r), c = E(t.ref, P(o));
12
- return typeof r == "function" || t.isPresent ? a.cloneElement(o, { ref: c }) : null;
7
+ var T = (n) => {
8
+ const { present: e, children: t } = n, r = R(e), a = typeof t == "function" ? t({ present: r.isPresent }) : i.Children.only(t), c = O(r.ref, v(a));
9
+ return typeof t == "function" || r.isPresent ? i.cloneElement(a, { ref: c }) : null;
13
10
  };
14
- R.displayName = "Presence";
15
- function v(n) {
16
- const [e, r] = a.useState(), t = a.useRef({}), o = a.useRef(n), c = a.useRef("none"), A = n ? "mounted" : "unmounted", [N, s] = T(A, {
11
+ T.displayName = "Presence";
12
+ function R(n) {
13
+ const [e, t] = i.useState(), r = i.useRef({}), a = i.useRef(n), c = i.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = E(p, {
17
14
  mounted: {
18
15
  UNMOUNT: "unmounted",
19
16
  ANIMATION_OUT: "unmountSuspended"
@@ -26,50 +23,48 @@ function v(n) {
26
23
  MOUNT: "mounted"
27
24
  }
28
25
  });
29
- return a.useEffect(() => {
30
- const i = l(t.current);
31
- c.current = N === "mounted" ? i : "none";
32
- }, [N]), M(() => {
33
- const i = t.current, m = o.current;
26
+ return i.useEffect(() => {
27
+ const o = l(r.current);
28
+ c.current = N === "mounted" ? o : "none";
29
+ }, [N]), A(() => {
30
+ const o = r.current, m = a.current;
34
31
  if (m !== n) {
35
- const u = c.current, d = l(i);
36
- n ? s("MOUNT") : d === "none" || (i == null ? void 0 : i.display) === "none" ? s("UNMOUNT") : s(m && u !== d ? "ANIMATION_OUT" : "UNMOUNT"), o.current = n;
32
+ const f = c.current, u = l(o);
33
+ n ? s("MOUNT") : u === "none" || o?.display === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), a.current = n;
37
34
  }
38
- }, [n, s]), M(() => {
39
- var i;
35
+ }, [n, s]), A(() => {
40
36
  if (e) {
41
- let m;
42
- const p = (i = e.ownerDocument.defaultView) != null ? i : window, u = (f) => {
43
- const g = l(t.current).includes(f.animationName);
44
- if (f.target === e && g && (s("ANIMATION_END"), !o.current)) {
45
- const O = e.style.animationFillMode;
46
- e.style.animationFillMode = "forwards", m = p.setTimeout(() => {
47
- e.style.animationFillMode === "forwards" && (e.style.animationFillMode = O);
37
+ let o;
38
+ const m = e.ownerDocument.defaultView ?? window, d = (u) => {
39
+ const g = l(r.current).includes(u.animationName);
40
+ if (u.target === e && g && (s("ANIMATION_END"), !a.current)) {
41
+ const y = e.style.animationFillMode;
42
+ e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
43
+ e.style.animationFillMode === "forwards" && (e.style.animationFillMode = y);
48
44
  });
49
45
  }
50
- }, d = (f) => {
51
- f.target === e && (c.current = l(t.current));
46
+ }, f = (u) => {
47
+ u.target === e && (c.current = l(r.current));
52
48
  };
53
- return e.addEventListener("animationstart", d), e.addEventListener("animationcancel", u), e.addEventListener("animationend", u), () => {
54
- p.clearTimeout(m), e.removeEventListener("animationstart", d), e.removeEventListener("animationcancel", u), e.removeEventListener("animationend", u);
49
+ return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
50
+ m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
55
51
  };
56
52
  } else
57
53
  s("ANIMATION_END");
58
54
  }, [e, s]), {
59
55
  isPresent: ["mounted", "unmountSuspended"].includes(N),
60
- ref: a.useCallback((i) => {
61
- i && (t.current = getComputedStyle(i)), r(i);
56
+ ref: i.useCallback((o) => {
57
+ o && (r.current = getComputedStyle(o)), t(o);
62
58
  }, [])
63
59
  };
64
60
  }
65
61
  function l(n) {
66
- return (n == null ? void 0 : n.animationName) || "none";
62
+ return n?.animationName || "none";
67
63
  }
68
- function P(n) {
69
- var t, o;
70
- let e = (t = Object.getOwnPropertyDescriptor(n.props, "ref")) == null ? void 0 : t.get, r = e && "isReactWarning" in e && e.isReactWarning;
71
- return r ? n.ref : (e = (o = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : o.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
64
+ function v(n) {
65
+ let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
66
+ return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
72
67
  }
73
68
  export {
74
- R as Presence
69
+ T as Presence
75
70
  };
@@ -1,13 +1,10 @@
1
- import * as r from "react";
2
- function o(t) {
3
- const e = r.useRef(t);
4
- return r.useEffect(() => {
5
- e.current = t;
6
- }), r.useMemo(() => (...n) => {
7
- var u;
8
- return (u = e.current) == null ? void 0 : u.call(e, ...n);
9
- }, []);
1
+ import * as e from "react";
2
+ function c(r) {
3
+ const t = e.useRef(r);
4
+ return e.useEffect(() => {
5
+ t.current = r;
6
+ }), e.useMemo(() => (...u) => t.current?.(...u), []);
10
7
  }
11
8
  export {
12
- o as useCallbackRef
9
+ c as useCallbackRef
13
10
  };
@@ -1,6 +1,6 @@
1
1
  import * as r from "react";
2
2
  import { useCallbackRef as s } from "../../react-use-callback-ref/dist/index.js";
3
- function p(n, e = globalThis == null ? void 0 : globalThis.document) {
3
+ function p(n, e = globalThis?.document) {
4
4
  const t = s(n);
5
5
  r.useEffect(() => {
6
6
  const o = (a) => {
@@ -1,5 +1,5 @@
1
1
  import * as e from "react";
2
- var o = globalThis != null && globalThis.document ? e.useLayoutEffect : () => {
2
+ var o = globalThis?.document ? e.useLayoutEffect : () => {
3
3
  };
4
4
  export {
5
5
  o as useLayoutEffect
@@ -1,5 +1,5 @@
1
1
  var S = function(r) {
2
- if (typeof document == "undefined")
2
+ if (typeof document > "u")
3
3
  return null;
4
4
  var u = Array.isArray(r) ? r[0] : r;
5
5
  return u.ownerDocument.body;
@@ -1,64 +1,61 @@
1
- const x = /([\p{Ll}\d])(\p{Lu})/gu, P = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu, _ = /(\d)\p{Ll}|(\p{L})\d/u, R = /[^\p{L}\d]+/giu, h = "$1\0$2", L = "";
2
- function E(r) {
3
- let e = r.trim();
4
- e = e.replace(x, h).replace(P, h), e = e.replace(R, "\0");
5
- let l = 0, c = e.length;
6
- for (; e.charAt(l) === "\0"; )
7
- l++;
8
- if (l === c)
1
+ const h = /([\p{Ll}\d])(\p{Lu})/gu, L = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu, E = /(\d)\p{Ll}|(\p{L})\d/u, d = /[^\p{L}\d]+/giu, a = "$1\0$2", f = "";
2
+ function o(t) {
3
+ let e = t.trim();
4
+ e = e.replace(h, a).replace(L, a), e = e.replace(d, "\0");
5
+ let r = 0, c = e.length;
6
+ for (; e.charAt(r) === "\0"; )
7
+ r++;
8
+ if (r === c)
9
9
  return [];
10
10
  for (; e.charAt(c - 1) === "\0"; )
11
11
  c--;
12
- return e.slice(l, c).split(/\0/g);
12
+ return e.slice(r, c).split(/\0/g);
13
13
  }
14
- function o(r) {
15
- var l;
16
- const e = E(r);
17
- for (let c = 0; c < e.length; c++) {
18
- const a = e[c], t = _.exec(a);
19
- if (t) {
20
- const s = t.index + ((l = t[1]) != null ? l : t[2]).length;
21
- e.splice(c, 1, a.slice(0, s), a.slice(s));
14
+ function x(t) {
15
+ const e = o(t);
16
+ for (let r = 0; r < e.length; r++) {
17
+ const c = e[r], l = E.exec(c);
18
+ if (l) {
19
+ const s = l.index + (l[1] ?? l[2]).length;
20
+ e.splice(r, 1, c.slice(0, s), c.slice(s));
22
21
  }
23
22
  }
24
23
  return e;
25
24
  }
26
- function A(r, e) {
27
- var t;
28
- const [l, c, a] = w(r, e);
29
- return l + c.map(C(e == null ? void 0 : e.locale)).join((t = e == null ? void 0 : e.delimiter) != null ? t : " ") + a;
25
+ function P(t, e) {
26
+ const [r, c, l] = p(t, e);
27
+ return r + c.map(_(e?.locale)).join(e?.delimiter ?? " ") + l;
30
28
  }
31
- function S(r, e) {
32
- return A(r, { delimiter: "-", ...e });
29
+ function R(t, e) {
30
+ return P(t, { delimiter: "-", ...e });
33
31
  }
34
- function C(r) {
35
- return r === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(r);
32
+ function _(t) {
33
+ return t === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(t);
36
34
  }
37
- function w(r, e = {}) {
38
- var i, f, u;
39
- const l = (i = e.split) != null ? i : e.separateNumbers ? o : E, c = (f = e.prefixCharacters) != null ? f : L, a = (u = e.suffixCharacters) != null ? u : L;
40
- let t = 0, s = r.length;
41
- for (; t < r.length; ) {
42
- const n = r.charAt(t);
43
- if (!c.includes(n))
35
+ function p(t, e = {}) {
36
+ const r = e.split ?? (e.separateNumbers ? x : o), c = e.prefixCharacters ?? f, l = e.suffixCharacters ?? f;
37
+ let s = 0, n = t.length;
38
+ for (; s < t.length; ) {
39
+ const i = t.charAt(s);
40
+ if (!c.includes(i))
44
41
  break;
45
- t++;
42
+ s++;
46
43
  }
47
- for (; s > t; ) {
48
- const n = s - 1, d = r.charAt(n);
49
- if (!a.includes(d))
44
+ for (; n > s; ) {
45
+ const i = n - 1, u = t.charAt(i);
46
+ if (!l.includes(u))
50
47
  break;
51
- s = n;
48
+ n = i;
52
49
  }
53
50
  return [
54
- r.slice(0, t),
55
- l(r.slice(t, s)),
56
- r.slice(s)
51
+ t.slice(0, s),
52
+ r(t.slice(s, n)),
53
+ t.slice(n)
57
54
  ];
58
55
  }
59
56
  export {
60
- S as kebabCase,
61
- A as noCase,
62
- E as split,
63
- o as splitSeparateNumbers
57
+ R as kebabCase,
58
+ P as noCase,
59
+ o as split,
60
+ x as splitSeparateNumbers
64
61
  };