@phillips/seldon 1.119.0 → 1.121.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 (116) 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 +48 -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 +94 -98
  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 +79 -83
  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 +422 -439
  60. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
  61. package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +1 -1
  62. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
  63. package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js +39 -41
  64. package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
  65. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +7 -10
  66. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +1 -1
  67. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
  68. package/dist/node_modules/aria-hidden/dist/es2015/index.js +1 -1
  69. package/dist/node_modules/change-case/dist/index.js +41 -44
  70. package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
  71. package/dist/node_modules/date-fns/differenceInDays.js +9 -9
  72. package/dist/node_modules/date-fns/differenceInHours.js +11 -11
  73. package/dist/node_modules/date-fns/differenceInMinutes.js +8 -8
  74. package/dist/node_modules/date-fns/differenceInSeconds.js +7 -7
  75. package/dist/node_modules/date-fns/formatDuration.js +11 -12
  76. package/dist/node_modules/date-fns/isSameWeek.js +8 -8
  77. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
  78. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
  79. package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +5 -5
  80. package/dist/node_modules/date-fns/locale/zh-CN/_lib/localize.js +10 -10
  81. package/dist/node_modules/date-fns/startOfDay.js +6 -6
  82. package/dist/node_modules/date-fns/startOfWeek.js +7 -8
  83. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1 -1
  84. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +1 -1
  85. package/dist/node_modules/exenv/index.js +2 -2
  86. package/dist/node_modules/get-nonce/dist/es2015/index.js +1 -1
  87. package/dist/node_modules/prop-types/checkPropTypes.js +2 -2
  88. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +3 -3
  89. package/dist/node_modules/react-intersection-observer/dist/index.js +2 -2
  90. package/dist/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js +1 -1
  91. package/dist/node_modules/react-modal/lib/components/ModalPortal.js +1 -1
  92. package/dist/node_modules/react-modal/lib/helpers/scopeTab.js +1 -1
  93. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
  94. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +1 -1
  95. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +1 -1
  96. package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
  97. package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.js +14 -14
  98. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -1
  99. package/dist/node_modules/usehooks-ts/dist/index.js +1 -1
  100. package/dist/node_modules/warning/warning.js +1 -1
  101. package/dist/node_modules/wheel-gestures/dist/wheel-gestures.esm.js +1 -1
  102. package/dist/patterns/BidSnapshot/BidSnapshot.js +58 -58
  103. package/dist/patterns/DetailList/DetailList.js +22 -22
  104. package/dist/patterns/FilterMenu/FilterMenu.js +15 -15
  105. package/dist/patterns/LanguageSelector/LanguageSelector.js +23 -23
  106. package/dist/patterns/LanguageSelector/utils.js +2 -5
  107. package/dist/patterns/ObjectTile/ObjectTile.d.ts +4 -0
  108. package/dist/patterns/ObjectTile/ObjectTile.js +50 -48
  109. package/dist/patterns/ObjectTile/ObjectTile.stories.d.ts +2 -0
  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/patterns/ObjectTile/_objectTile.scss +17 -1
  115. package/dist/site-furniture/Header/Header.js +32 -32
  116. package/package.json +2 -1
@@ -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() {
@@ -14,7 +14,7 @@ var p = function(r) {
14
14
  }, R = function(r, e) {
15
15
  var o = e.ownerDocument, t = e;
16
16
  do {
17
- typeof ShadowRoot != "undefined" && t instanceof ShadowRoot && (t = t.host);
17
+ typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
18
18
  var a = g(r, t);
19
19
  if (a) {
20
20
  var n = b(r, t), i = n[1], l = n[2];
@@ -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
  };
@@ -1,16 +1,16 @@
1
- import { getTimezoneOffsetInMilliseconds as a } from "./_lib/getTimezoneOffsetInMilliseconds.js";
1
+ import { getTimezoneOffsetInMilliseconds as r } from "./_lib/getTimezoneOffsetInMilliseconds.js";
2
2
  import { normalizeDates as c } from "./_lib/normalizeDates.js";
3
3
  import { millisecondsInDay as D } from "./constants.js";
4
- import { startOfDay as m } from "./startOfDay.js";
5
- function p(n, i, e) {
6
- const [f, l] = c(
7
- e == null ? void 0 : e.in,
8
- n,
9
- i
10
- ), r = m(f), t = m(l), o = +r - a(r), s = +t - a(t);
11
- return Math.round((o - s) / D);
4
+ import { startOfDay as a } from "./startOfDay.js";
5
+ function O(o, n, i) {
6
+ const [s, m] = c(
7
+ i?.in,
8
+ o,
9
+ n
10
+ ), t = a(s), e = a(m), f = +t - r(t), l = +e - r(e);
11
+ return Math.round((f - l) / D);
12
12
  }
13
13
  export {
14
- p as default,
15
- p as differenceInCalendarDays
14
+ O as default,
15
+ O as differenceInCalendarDays
16
16
  };
@@ -1,20 +1,20 @@
1
1
  import { normalizeDates as d } from "./_lib/normalizeDates.js";
2
2
  import { differenceInCalendarDays as r } from "./differenceInCalendarDays.js";
3
- function l(n, t, e) {
4
- const [s, c] = d(
5
- e == null ? void 0 : e.in,
3
+ function l(n, t, s) {
4
+ const [o, e] = d(
5
+ s?.in,
6
6
  n,
7
7
  t
8
- ), o = f(s, c), g = Math.abs(
9
- r(s, c)
8
+ ), c = f(o, e), g = Math.abs(
9
+ r(o, e)
10
10
  );
11
- s.setDate(s.getDate() - o * g);
12
- const i = +(f(s, c) === -o), u = o * (g - i);
11
+ o.setDate(o.getDate() - c * g);
12
+ const i = +(f(o, e) === -c), u = c * (g - i);
13
13
  return u === 0 ? 0 : u;
14
14
  }
15
15
  function f(n, t) {
16
- const e = n.getFullYear() - t.getFullYear() || n.getMonth() - t.getMonth() || n.getDate() - t.getDate() || n.getHours() - t.getHours() || n.getMinutes() - t.getMinutes() || n.getSeconds() - t.getSeconds() || n.getMilliseconds() - t.getMilliseconds();
17
- return e < 0 ? -1 : e > 0 ? 1 : e;
16
+ const s = n.getFullYear() - t.getFullYear() || n.getMonth() - t.getMonth() || n.getDate() - t.getDate() || n.getHours() - t.getHours() || n.getMinutes() - t.getMinutes() || n.getSeconds() - t.getSeconds() || n.getMilliseconds() - t.getMilliseconds();
17
+ return s < 0 ? -1 : s > 0 ? 1 : s;
18
18
  }
19
19
  export {
20
20
  l as default,
@@ -1,15 +1,15 @@
1
- import { getRoundingMethod as t } from "./_lib/getRoundingMethod.js";
2
- import { normalizeDates as u } from "./_lib/normalizeDates.js";
3
- import { millisecondsInHour as l } from "./constants.js";
4
- function g(r, f, e) {
5
- const [a, d] = u(
6
- e == null ? void 0 : e.in,
1
+ import { getRoundingMethod as f } from "./_lib/getRoundingMethod.js";
2
+ import { normalizeDates as a } from "./_lib/normalizeDates.js";
3
+ import { millisecondsInHour as d } from "./constants.js";
4
+ function s(r, o, e) {
5
+ const [t, n] = a(
6
+ e?.in,
7
7
  r,
8
- f
9
- ), m = (+a - +d) / l;
10
- return t(e == null ? void 0 : e.roundingMethod)(m);
8
+ o
9
+ ), i = (+t - +n) / d;
10
+ return f(e?.roundingMethod)(i);
11
11
  }
12
12
  export {
13
- g as default,
14
- g as differenceInHours
13
+ s as default,
14
+ s as differenceInHours
15
15
  };
@@ -1,11 +1,11 @@
1
- import { getRoundingMethod as i } from "./_lib/getRoundingMethod.js";
2
- import { millisecondsInMinute as d } from "./constants.js";
3
- import { differenceInMilliseconds as t } from "./differenceInMilliseconds.js";
4
- function c(n, r, e) {
5
- const f = t(n, r) / d;
6
- return i(e == null ? void 0 : e.roundingMethod)(f);
1
+ import { getRoundingMethod as t } from "./_lib/getRoundingMethod.js";
2
+ import { millisecondsInMinute as r } from "./constants.js";
3
+ import { differenceInMilliseconds as f } from "./differenceInMilliseconds.js";
4
+ function u(n, e, i) {
5
+ const o = f(n, e) / r;
6
+ return t(i?.roundingMethod)(o);
7
7
  }
8
8
  export {
9
- c as default,
10
- c as differenceInMinutes
9
+ u as default,
10
+ u as differenceInMinutes
11
11
  };
@@ -1,10 +1,10 @@
1
- import { getRoundingMethod as r } from "./_lib/getRoundingMethod.js";
2
- import { differenceInMilliseconds as c } from "./differenceInMilliseconds.js";
3
- function o(d, f, e) {
4
- const n = c(d, f) / 1e3;
5
- return r(e == null ? void 0 : e.roundingMethod)(n);
1
+ import { getRoundingMethod as f } from "./_lib/getRoundingMethod.js";
2
+ import { differenceInMilliseconds as i } from "./differenceInMilliseconds.js";
3
+ function c(e, n, o) {
4
+ const d = i(e, n) / 1e3;
5
+ return f(o?.roundingMethod)(d);
6
6
  }
7
7
  export {
8
- o as default,
9
- o as differenceInSeconds
8
+ c as default,
9
+ c as differenceInSeconds
10
10
  };
@@ -1,6 +1,6 @@
1
- import { getDefaultOptions as z } from "./_lib/defaultOptions.js";
2
- import { enUS as O } from "./locale/en-US.js";
3
- const U = [
1
+ import { getDefaultOptions as i } from "./_lib/defaultOptions.js";
2
+ import { enUS as d } from "./locale/en-US.js";
3
+ const p = [
4
4
  "years",
5
5
  "months",
6
6
  "weeks",
@@ -9,15 +9,14 @@ const U = [
9
9
  "minutes",
10
10
  "seconds"
11
11
  ];
12
- function w(a, e) {
13
- var c, l, f, m, u;
14
- const s = z(), t = (l = (c = e == null ? void 0 : e.locale) != null ? c : s.locale) != null ? l : O, D = (f = e == null ? void 0 : e.format) != null ? f : U, h = (m = e == null ? void 0 : e.zero) != null ? m : !1, k = (u = e == null ? void 0 : e.delimiter) != null ? u : " ";
15
- return t.formatDistance ? D.reduce((d, r) => {
16
- const x = `x${r.replace(/(^.)/, (y) => y.toUpperCase())}`, n = a[r];
17
- return n !== void 0 && (h || a[r]) ? d.concat(t.formatDistance(x, n)) : d;
18
- }, []).join(k) : "";
12
+ function x(r, e) {
13
+ const a = i(), o = e?.locale ?? a.locale ?? d, c = e?.format ?? p, l = e?.zero ?? !1, f = e?.delimiter ?? " ";
14
+ return o.formatDistance ? c.reduce((n, t) => {
15
+ const m = `x${t.replace(/(^.)/, (u) => u.toUpperCase())}`, s = r[t];
16
+ return s !== void 0 && (l || r[t]) ? n.concat(o.formatDistance(m, s)) : n;
17
+ }, []).join(f) : "";
19
18
  }
20
19
  export {
21
- w as default,
22
- w as formatDuration
20
+ x as default,
21
+ x as formatDuration
23
22
  };
@@ -1,14 +1,14 @@
1
- import { normalizeDates as l } from "./_lib/normalizeDates.js";
1
+ import { normalizeDates as i } from "./_lib/normalizeDates.js";
2
2
  import { startOfWeek as r } from "./startOfWeek.js";
3
- function c(a, t, e) {
4
- const [m, f] = l(
5
- e == null ? void 0 : e.in,
6
- a,
7
- t
3
+ function o(t, a, e) {
4
+ const [m, f] = i(
5
+ e?.in,
6
+ t,
7
+ a
8
8
  );
9
9
  return +r(m, e) == +r(f, e);
10
10
  }
11
11
  export {
12
- c as default,
13
- c as isSameWeek
12
+ o as default,
13
+ o as isSameWeek
14
14
  };