@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,40 +1,40 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import e from "../../assets/search.svg.js";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import b from "../../assets/search.svg.js";
3
3
  import l from "../../assets/close.svg.js";
4
4
  const p = ({
5
- state: $,
6
- isSearchExpanded: u,
7
- setIsSearchExpanded: _,
8
- searchButtonText: a,
5
+ state: c,
6
+ isSearchExpanded: i,
7
+ setIsSearchExpanded: u,
8
+ searchButtonText: e,
9
9
  className: t,
10
10
  testId: o,
11
- onCancel: i,
12
- ...b
13
- }) => u ? u ? /* @__PURE__ */ r(
11
+ onCancel: _,
12
+ ...a
13
+ }) => i ? i ? /* @__PURE__ */ n(
14
14
  "button",
15
15
  {
16
- ...b,
16
+ ...a,
17
17
  type: "button",
18
18
  "data-testid": `${o}-close-button`,
19
19
  "aria-label": "Close Search",
20
20
  className: `${t}__button ${t}__button--close`,
21
- onClick: (n) => {
22
- i == null || i(), _(!1), n.stopPropagation();
21
+ onClick: (r) => {
22
+ _?.(), u(!1), r.stopPropagation();
23
23
  },
24
- children: /* @__PURE__ */ r(l, { "data-testid": `${o}-form-icon`, className: `${t}__button__icon` })
24
+ children: /* @__PURE__ */ n(l, { "data-testid": `${o}-form-icon`, className: `${t}__button__icon` })
25
25
  }
26
- ) : null : /* @__PURE__ */ r(
26
+ ) : null : /* @__PURE__ */ n(
27
27
  "button",
28
28
  {
29
- ...b,
29
+ ...a,
30
30
  type: "button",
31
31
  "data-testid": `${o}-button`,
32
- "aria-label": a,
32
+ "aria-label": e,
33
33
  className: `${t}__button ${t}__button--search`,
34
- onClick: (n) => {
35
- _(!0), n.stopPropagation();
34
+ onClick: (r) => {
35
+ u(!0), r.stopPropagation();
36
36
  },
37
- children: /* @__PURE__ */ r(e, { "data-testid": `${o}-button-icon`, className: `${t}__button__icon` })
37
+ children: /* @__PURE__ */ n(b, { "data-testid": `${o}-button-icon`, className: `${t}__button__icon` })
38
38
  }
39
39
  );
40
40
  export {
@@ -14,7 +14,7 @@ function B({
14
14
  e || (e = document.createElement("img")), e.onerror = () => n(!1), e.onload = () => n(!0), a && (e.srcset = a), m && (e.sizes = m), e.src = t, e.complete && n(!0);
15
15
  });
16
16
  }
17
- const H = typeof window == "undefined", M = P(
17
+ const H = typeof window > "u", M = P(
18
18
  x(
19
19
  ({
20
20
  className: c,
@@ -1,19 +1,19 @@
1
- import { jsxs as p, jsx as i } from "react/jsx-runtime";
2
- import * as c from "react";
1
+ import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
+ import * as d from "react";
3
3
  import a from "../../node_modules/classnames/index.js";
4
4
  import { px as e, useNormalizedInputProps as z } from "../../utils/index.js";
5
- import { SelectVariants as d } from "./types.js";
5
+ import { SelectVariants as c } from "./types.js";
6
6
  import D from "../../assets/chevronDown.svg.js";
7
- const F = c.forwardRef(
7
+ const F = d.forwardRef(
8
8
  ({
9
9
  children: m,
10
- className: s,
10
+ className: i,
11
11
  defaultValue: u,
12
12
  disabled: $,
13
13
  hideLabel: _,
14
14
  id: t,
15
15
  showIcon: l = !0,
16
- variant: f = d.default,
16
+ variant: f = c.default,
17
17
  inline: b,
18
18
  invalid: v,
19
19
  invalidText: h,
@@ -27,9 +27,9 @@ const F = c.forwardRef(
27
27
  warnText: S,
28
28
  ...g
29
29
  }, j) => {
30
- const o = "select", I = c.useId(), n = z({
30
+ const o = "select", I = d.useId(), n = z({
31
31
  disabled: $,
32
- id: t != null ? t : I,
32
+ id: t ?? I,
33
33
  invalid: v,
34
34
  invalidText: h,
35
35
  readOnly: r,
@@ -42,16 +42,24 @@ const F = c.forwardRef(
42
42
  [`${e}-input--disabled`]: n.disabled,
43
43
  [`${e}-input--invalid`]: n.invalid,
44
44
  [`${e}-input--warn`]: n.warn,
45
- [`${s}__wrapper`]: s
46
- }), R = a(s, `${e}-input__input`, {
47
- [`${e}-input__select--tertiary`]: f === d.tertiary
45
+ [`${i}__wrapper`]: i
46
+ }), R = a(i, `${e}-input__input`, {
47
+ [`${e}-input__select--tertiary`]: f === c.tertiary
48
48
  }), k = a(`${e}-select-container`, {
49
49
  [`${e}-select-container--show__icon`]: l
50
50
  });
51
51
  return /* @__PURE__ */ p("div", { className: P, children: [
52
- /* @__PURE__ */ i("label", { htmlFor: t, className: a(`${e}-input__label`, { [`${e}-input__label--hidden`]: _ }), children: w }),
52
+ /* @__PURE__ */ s(
53
+ "label",
54
+ {
55
+ "data-testid": `${t}-label`,
56
+ htmlFor: t,
57
+ className: a(`${e}-input__label`, { [`${e}-input__label--hidden`]: _ }),
58
+ children: w
59
+ }
60
+ ),
53
61
  /* @__PURE__ */ p("div", { className: k, children: [
54
- /* @__PURE__ */ i(
62
+ /* @__PURE__ */ s(
55
63
  "select",
56
64
  {
57
65
  className: R,
@@ -66,7 +74,7 @@ const F = c.forwardRef(
66
74
  children: m
67
75
  }
68
76
  ),
69
- l ? /* @__PURE__ */ i(D, {}) : null
77
+ l ? /* @__PURE__ */ s(D, {}) : null
70
78
  ] }),
71
79
  n.validation
72
80
  ] });
@@ -120,3 +120,18 @@ export declare const Tertiary: {
120
120
  };
121
121
  };
122
122
  };
123
+ export declare const CustomLabel: {
124
+ ({ playgroundWidth, ...args }: StoryProps): import("react/jsx-runtime").JSX.Element;
125
+ args: {
126
+ showIcon: boolean;
127
+ };
128
+ argTypes: {
129
+ variant: {
130
+ options: SelectVariants[];
131
+ control: {
132
+ type: string;
133
+ };
134
+ defaultValue: SelectVariants;
135
+ };
136
+ };
137
+ };
@@ -1,21 +1,21 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { Trigger as g } from "../../node_modules/@radix-ui/react-tabs/dist/index.js";
3
- import { forwardRef as f } from "react";
4
- import { getCommonProps as i } from "../../utils/index.js";
5
- const p = f(({ value: a, onClick: r, children: s, ...e }, m) => {
6
- const { className: o } = i(e, "TabsContainer");
2
+ import { Trigger as i } from "../../node_modules/@radix-ui/react-tabs/dist/index.js";
3
+ import { forwardRef as g } from "react";
4
+ import { getCommonProps as f } from "../../utils/index.js";
5
+ const n = g(({ value: r, onClick: o, children: a, ...s }, e) => {
6
+ const { className: m } = f(s, "TabsContainer");
7
7
  return /* @__PURE__ */ t(
8
- g,
8
+ i,
9
9
  {
10
- value: a,
11
- className: `${o}__tabs-trigger`,
12
- onClick: () => r == null ? void 0 : r(a),
13
- ref: m,
14
- children: s
10
+ value: r,
11
+ className: `${m}__tabs-trigger`,
12
+ onClick: () => o?.(r),
13
+ ref: e,
14
+ children: a
15
15
  }
16
16
  );
17
17
  });
18
- p.displayName = "TabTrigger";
18
+ n.displayName = "TabTrigger";
19
19
  export {
20
- p as default
20
+ n as default
21
21
  };
@@ -25,7 +25,7 @@ function E() {
25
25
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
26
26
  }
27
27
  function A(t) {
28
- if (typeof Symbol != "undefined" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t);
28
+ if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t);
29
29
  }
30
30
  function Q(t) {
31
31
  if (Array.isArray(t)) return k(t);
@@ -52,7 +52,7 @@ function k(t, r) {
52
52
  return n;
53
53
  }
54
54
  function M(t, r) {
55
- var e = t == null ? null : typeof Symbol != "undefined" && t[Symbol.iterator] || t["@@iterator"];
55
+ var e = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
56
56
  if (e != null) {
57
57
  var n = [], s = !0, a = !1, i, u;
58
58
  try {
@@ -86,7 +86,7 @@ function C() {
86
86
  function r(o) {
87
87
  var i;
88
88
  O(this, r), i = g(this, p(r).call(this, o)), f(c(c(i)), "isSupportedEnvironment", function() {
89
- return typeof window != "undefined" && typeof window.matchMedia != "undefined";
89
+ return typeof window < "u" && typeof window.matchMedia < "u";
90
90
  }), f(c(c(i)), "setupMatchers", function(a) {
91
91
  return Object.keys(a).reduce(function(s, l) {
92
92
  return m({}, s, f({}, l, window.matchMedia(a[l])));
@@ -25,7 +25,7 @@ function I() {
25
25
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
26
26
  }
27
27
  function O(e) {
28
- if (typeof Symbol != "undefined" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
28
+ if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
29
29
  }
30
30
  function A(e) {
31
31
  if (Array.isArray(e)) return c(e);
@@ -52,7 +52,7 @@ function c(e, r) {
52
52
  return n;
53
53
  }
54
54
  function j(e, r) {
55
- var t = e == null ? null : typeof Symbol != "undefined" && e[Symbol.iterator] || e["@@iterator"];
55
+ var t = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
56
56
  if (t != null) {
57
57
  var n = [], a = !0, i = !1, o, s;
58
58
  try {
@@ -30,7 +30,7 @@ function L(e, r) {
30
30
  }
31
31
  }
32
32
  function $(e) {
33
- if (typeof Symbol != "undefined" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
33
+ if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
34
34
  }
35
35
  function G(e) {
36
36
  if (Array.isArray(e)) return g(e);
@@ -112,7 +112,7 @@ function Z(e) {
112
112
  breakpointProps: P
113
113
  };
114
114
  });
115
- }, []), m = o.default.useContext(s), b = p(l), h = o.default.useContext(n), C = h.onlyMatch, B = o.default.useId(), Q = typeof window != "undefined", R = (0, u.useIsFirstRender)(), c;
115
+ }, []), m = o.default.useContext(s), b = p(l), h = o.default.useContext(n), C = h.onlyMatch, B = o.default.useId(), Q = typeof window < "u", R = (0, u.useIsFirstRender)(), c;
116
116
  if (i.interaction)
117
117
  c = (0, u.createClassName)("interaction", i.interaction);
118
118
  else {
@@ -54,7 +54,7 @@ function j(e, t) {
54
54
  }
55
55
  }
56
56
  function M(e) {
57
- if (typeof Symbol != "undefined" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
57
+ if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
58
58
  }
59
59
  function S(e) {
60
60
  if (Array.isArray(e)) return u(e);
@@ -41,7 +41,7 @@ function y(r, e) {
41
41
  }
42
42
  }
43
43
  function d(r) {
44
- if (typeof Symbol != "undefined" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
44
+ if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
45
45
  }
46
46
  function b(r) {
47
47
  if (Array.isArray(r)) return c(r);
@@ -85,7 +85,7 @@ const ce = async (t, e, d) => {
85
85
  floating: e
86
86
  }
87
87
  });
88
- u = v != null ? v : u, l = p != null ? p : l, i = {
88
+ u = v ?? u, l = p ?? l, i = {
89
89
  ...i,
90
90
  [x]: {
91
91
  ...i[x],
@@ -342,7 +342,7 @@ function Wt(t, e, n, i) {
342
342
  var d;
343
343
  u.forEach((m) => {
344
344
  o && m.removeEventListener("scroll", n), c && m.removeEventListener("resize", n);
345
- }), h == null || h(), (d = g) == null || d.disconnect(), g = null, l && cancelAnimationFrame(v);
345
+ }), h?.(), (d = g) == null || d.disconnect(), g = null, l && cancelAnimationFrame(v);
346
346
  };
347
347
  }
348
348
  const Bt = et, zt = it, At = nt, Dt = ot, Nt = st, Ht = ct, It = lt, Vt = (t, e, n) => {
@@ -3,7 +3,7 @@ import { autoUpdate as de, platform as me } from "../../dom/dist/floating-ui.dom
3
3
  import * as f from "react";
4
4
  import { useLayoutEffect as X, useEffect as Y } from "react";
5
5
  import * as Z from "react-dom";
6
- var w = typeof document != "undefined" ? X : Y;
6
+ var w = typeof document < "u" ? X : Y;
7
7
  function R(e, t) {
8
8
  if (e === t)
9
9
  return !0;
@@ -35,7 +35,7 @@ function R(e, t) {
35
35
  return e !== e && t !== t;
36
36
  }
37
37
  function v(e) {
38
- return typeof window == "undefined" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
38
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
39
39
  }
40
40
  function z(e, t) {
41
41
  const n = v(e);
@@ -19,7 +19,7 @@ function m(n) {
19
19
  return n instanceof HTMLElement || n instanceof c(n).HTMLElement;
20
20
  }
21
21
  function f(n) {
22
- return typeof ShadowRoot == "undefined" ? !1 : n instanceof ShadowRoot || n instanceof c(n).ShadowRoot;
22
+ return typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof c(n).ShadowRoot;
23
23
  }
24
24
  function w(n) {
25
25
  const {
@@ -58,7 +58,7 @@ function D(n) {
58
58
  return null;
59
59
  }
60
60
  function T() {
61
- return typeof CSS == "undefined" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
61
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
62
62
  }
63
63
  function y(n) {
64
64
  return ["html", "body", "#document"].includes(l(n));
@@ -1,9 +1,9 @@
1
- function h(f, c, { checkForDefaultPrevented: p = !0 } = {}) {
2
- return function(s) {
3
- if (f == null || f(s), p === !1 || !s.defaultPrevented)
4
- return c == null ? void 0 : c(s);
1
+ function f(n, r, { checkForDefaultPrevented: t = !0 } = {}) {
2
+ return function(e) {
3
+ if (n?.(e), t === !1 || !e.defaultPrevented)
4
+ return r?.(e);
5
5
  };
6
6
  }
7
7
  export {
8
- h as composeEventHandlers
8
+ f as composeEventHandlers
9
9
  };
@@ -1,28 +1,28 @@
1
1
  import s from "react";
2
- import { createContextScope as W } from "../../react-context/dist/index.js";
3
- import { createCollection as X } from "../../react-collection/dist/index.js";
4
- import { useComposedRefs as Z } from "../../react-compose-refs/dist/index.js";
5
- import { composeEventHandlers as $ } from "../../primitive/dist/index.js";
6
- import { useControllableState as M } from "../../react-use-controllable-state/dist/index.js";
7
- import { Primitive as V } from "../../react-primitive/dist/index.js";
8
- import { createCollapsibleScope as H, Root as oo, Trigger as eo, Content as ro } from "../../react-collapsible/dist/index.js";
9
- import { useId as to } from "../../react-id/dist/index.js";
10
- import { useDirection as no } from "../../react-direction/dist/index.js";
2
+ import { createContextScope as J } from "../../react-context/dist/index.js";
3
+ import { createCollection as Q } from "../../react-collection/dist/index.js";
4
+ import { useComposedRefs as W } from "../../react-compose-refs/dist/index.js";
5
+ import { composeEventHandlers as X } from "../../primitive/dist/index.js";
6
+ import { useControllableState as O } from "../../react-use-controllable-state/dist/index.js";
7
+ import { Primitive as T } from "../../react-primitive/dist/index.js";
8
+ import { createCollapsibleScope as M, Root as Z, Trigger as $, Content as oo } from "../../react-collapsible/dist/index.js";
9
+ import { useId as eo } from "../../react-id/dist/index.js";
10
+ import { useDirection as ro } from "../../react-direction/dist/index.js";
11
11
  import { jsx as n } from "react/jsx-runtime";
12
- var f = "Accordion", co = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [y, io, ao] = X(f), [b, No] = W(f, [
13
- ao,
14
- H
15
- ]), E = H(), K = s.forwardRef(
12
+ var f = "Accordion", to = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [y, no, co] = Q(f), [b, Ro] = J(f, [
13
+ co,
14
+ M
15
+ ]), E = M(), V = s.forwardRef(
16
16
  (e, c) => {
17
17
  const { type: o, ...t } = e, i = t, r = t;
18
- return /* @__PURE__ */ n(y.Provider, { scope: e.__scopeAccordion, children: o === "multiple" ? /* @__PURE__ */ n(fo, { ...r, ref: c }) : /* @__PURE__ */ n(po, { ...i, ref: c }) });
18
+ return /* @__PURE__ */ n(y.Provider, { scope: e.__scopeAccordion, children: o === "multiple" ? /* @__PURE__ */ n(so, { ...r, ref: c }) : /* @__PURE__ */ n(lo, { ...i, ref: c }) });
19
19
  }
20
20
  );
21
- K.displayName = f;
22
- var [L, lo] = b(f), [z, so] = b(
21
+ V.displayName = f;
22
+ var [H, io] = b(f), [K, ao] = b(
23
23
  f,
24
24
  { collapsible: !1 }
25
- ), po = s.forwardRef(
25
+ ), lo = s.forwardRef(
26
26
  (e, c) => {
27
27
  const {
28
28
  value: o,
@@ -31,30 +31,30 @@ var [L, lo] = b(f), [z, so] = b(
31
31
  },
32
32
  collapsible: r = !1,
33
33
  ...a
34
- } = e, [l, d] = M({
34
+ } = e, [l, d] = O({
35
35
  prop: o,
36
36
  defaultProp: t,
37
37
  onChange: i
38
38
  });
39
39
  return /* @__PURE__ */ n(
40
- L,
40
+ H,
41
41
  {
42
42
  scope: e.__scopeAccordion,
43
43
  value: l ? [l] : [],
44
44
  onItemOpen: d,
45
45
  onItemClose: s.useCallback(() => r && d(""), [r, d]),
46
- children: /* @__PURE__ */ n(z, { scope: e.__scopeAccordion, collapsible: r, children: /* @__PURE__ */ n(G, { ...a, ref: c }) })
46
+ children: /* @__PURE__ */ n(K, { scope: e.__scopeAccordion, collapsible: r, children: /* @__PURE__ */ n(L, { ...a, ref: c }) })
47
47
  }
48
48
  );
49
49
  }
50
- ), fo = s.forwardRef((e, c) => {
50
+ ), so = s.forwardRef((e, c) => {
51
51
  const {
52
52
  value: o,
53
53
  defaultValue: t,
54
54
  onValueChange: i = () => {
55
55
  },
56
56
  ...r
57
- } = e, [a = [], l] = M({
57
+ } = e, [a = [], l] = O({
58
58
  prop: o,
59
59
  defaultProp: t,
60
60
  onChange: i
@@ -66,24 +66,20 @@ var [L, lo] = b(f), [z, so] = b(
66
66
  [l]
67
67
  );
68
68
  return /* @__PURE__ */ n(
69
- L,
69
+ H,
70
70
  {
71
71
  scope: e.__scopeAccordion,
72
72
  value: a,
73
73
  onItemOpen: d,
74
74
  onItemClose: m,
75
- children: /* @__PURE__ */ n(z, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ n(G, { ...r, ref: c }) })
75
+ children: /* @__PURE__ */ n(K, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ n(L, { ...r, ref: c }) })
76
76
  }
77
77
  );
78
- }), [uo, I] = b(f), G = s.forwardRef(
78
+ }), [po, I] = b(f), L = s.forwardRef(
79
79
  (e, c) => {
80
- const { __scopeAccordion: o, disabled: t, dir: i, orientation: r = "vertical", ...a } = e, l = s.useRef(null), d = Z(l, c), m = io(o), u = no(i) === "ltr", h = $(e.onKeyDown, (A) => {
81
- var O;
82
- if (!co.includes(A.key)) return;
83
- const J = A.target, x = m().filter((N) => {
84
- var T;
85
- return !((T = N.ref.current) != null && T.disabled);
86
- }), C = x.findIndex((N) => N.ref.current === J), D = x.length;
80
+ const { __scopeAccordion: o, disabled: t, dir: i, orientation: r = "vertical", ...a } = e, l = s.useRef(null), d = W(l, c), m = no(o), u = ro(i) === "ltr", h = X(e.onKeyDown, (A) => {
81
+ if (!to.includes(A.key)) return;
82
+ const B = A.target, x = m().filter((N) => !N.ref.current?.disabled), C = x.findIndex((N) => N.ref.current === B), D = x.length;
87
83
  if (C === -1) return;
88
84
  A.preventDefault();
89
85
  let p = C;
@@ -112,18 +108,18 @@ var [L, lo] = b(f), [z, so] = b(
112
108
  r === "vertical" && P();
113
109
  break;
114
110
  }
115
- const Q = p % D;
116
- (O = x[Q].ref.current) == null || O.focus();
111
+ const F = p % D;
112
+ x[F].ref.current?.focus();
117
113
  });
118
114
  return /* @__PURE__ */ n(
119
- uo,
115
+ po,
120
116
  {
121
117
  scope: o,
122
118
  disabled: t,
123
119
  direction: i,
124
120
  orientation: r,
125
121
  children: /* @__PURE__ */ n(y.Slot, { scope: o, children: /* @__PURE__ */ n(
126
- V.div,
122
+ T.div,
127
123
  {
128
124
  ...a,
129
125
  "data-orientation": r,
@@ -134,21 +130,21 @@ var [L, lo] = b(f), [z, so] = b(
134
130
  }
135
131
  );
136
132
  }
137
- ), g = "AccordionItem", [mo, k] = b(g), U = s.forwardRef(
133
+ ), g = "AccordionItem", [fo, k] = b(g), z = s.forwardRef(
138
134
  (e, c) => {
139
- const { __scopeAccordion: o, value: t, ...i } = e, r = I(g, o), a = lo(g, o), l = E(o), d = to(), m = t && a.value.includes(t) || !1, v = r.disabled || e.disabled;
135
+ const { __scopeAccordion: o, value: t, ...i } = e, r = I(g, o), a = io(g, o), l = E(o), d = eo(), m = t && a.value.includes(t) || !1, v = r.disabled || e.disabled;
140
136
  return /* @__PURE__ */ n(
141
- mo,
137
+ fo,
142
138
  {
143
139
  scope: o,
144
140
  open: m,
145
141
  disabled: v,
146
142
  triggerId: d,
147
143
  children: /* @__PURE__ */ n(
148
- oo,
144
+ Z,
149
145
  {
150
146
  "data-orientation": r.orientation,
151
- "data-state": F(m),
147
+ "data-state": q(m),
152
148
  ...l,
153
149
  ...i,
154
150
  ref: c,
@@ -163,15 +159,15 @@ var [L, lo] = b(f), [z, so] = b(
163
159
  );
164
160
  }
165
161
  );
166
- U.displayName = g;
167
- var j = "AccordionHeader", vo = s.forwardRef(
162
+ z.displayName = g;
163
+ var G = "AccordionHeader", uo = s.forwardRef(
168
164
  (e, c) => {
169
- const { __scopeAccordion: o, ...t } = e, i = I(f, o), r = k(j, o);
165
+ const { __scopeAccordion: o, ...t } = e, i = I(f, o), r = k(G, o);
170
166
  return /* @__PURE__ */ n(
171
- V.h3,
167
+ T.h3,
172
168
  {
173
169
  "data-orientation": i.orientation,
174
- "data-state": F(r.open),
170
+ "data-state": q(r.open),
175
171
  "data-disabled": r.disabled ? "" : void 0,
176
172
  ...t,
177
173
  ref: c
@@ -179,12 +175,12 @@ var j = "AccordionHeader", vo = s.forwardRef(
179
175
  );
180
176
  }
181
177
  );
182
- vo.displayName = j;
183
- var S = "AccordionTrigger", Y = s.forwardRef(
178
+ uo.displayName = G;
179
+ var S = "AccordionTrigger", U = s.forwardRef(
184
180
  (e, c) => {
185
- const { __scopeAccordion: o, ...t } = e, i = I(f, o), r = k(S, o), a = so(S, o), l = E(o);
181
+ const { __scopeAccordion: o, ...t } = e, i = I(f, o), r = k(S, o), a = ao(S, o), l = E(o);
186
182
  return /* @__PURE__ */ n(y.ItemSlot, { scope: o, children: /* @__PURE__ */ n(
187
- eo,
183
+ $,
188
184
  {
189
185
  "aria-disabled": r.open && !a.collapsible || void 0,
190
186
  "data-orientation": i.orientation,
@@ -196,12 +192,12 @@ var S = "AccordionTrigger", Y = s.forwardRef(
196
192
  ) });
197
193
  }
198
194
  );
199
- Y.displayName = S;
200
- var q = "AccordionContent", B = s.forwardRef(
195
+ U.displayName = S;
196
+ var j = "AccordionContent", Y = s.forwardRef(
201
197
  (e, c) => {
202
- const { __scopeAccordion: o, ...t } = e, i = I(f, o), r = k(q, o), a = E(o);
198
+ const { __scopeAccordion: o, ...t } = e, i = I(f, o), r = k(j, o), a = E(o);
203
199
  return /* @__PURE__ */ n(
204
- ro,
200
+ oo,
205
201
  {
206
202
  role: "region",
207
203
  "aria-labelledby": r.triggerId,
@@ -218,20 +214,20 @@ var q = "AccordionContent", B = s.forwardRef(
218
214
  );
219
215
  }
220
216
  );
221
- B.displayName = q;
222
- function F(e) {
217
+ Y.displayName = j;
218
+ function q(e) {
223
219
  return e ? "open" : "closed";
224
220
  }
225
- var So = K, yo = U, Eo = Y, ko = B;
221
+ var Po = V, No = z, So = U, yo = Y;
226
222
  export {
227
- K as Accordion,
228
- B as AccordionContent,
229
- vo as AccordionHeader,
230
- U as AccordionItem,
231
- Y as AccordionTrigger,
232
- ko as Content,
233
- yo as Item,
234
- So as Root,
235
- Eo as Trigger,
236
- No as createAccordionScope
223
+ V as Accordion,
224
+ Y as AccordionContent,
225
+ uo as AccordionHeader,
226
+ z as AccordionItem,
227
+ U as AccordionTrigger,
228
+ yo as Content,
229
+ No as Item,
230
+ Po as Root,
231
+ So as Trigger,
232
+ Ro as createAccordionScope
237
233
  };