@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.
- package/dist/_virtual/_commonjsHelpers.js +1 -1
- package/dist/components/Accordion/Accordion.js +18 -18
- package/dist/components/Accordion/AccordionItem.js +67 -68
- package/dist/components/Carousel/Carousel.js +49 -51
- package/dist/components/Carousel/CarouselDots.js +46 -47
- package/dist/components/ContentPeek/ContentPeek.js +47 -47
- package/dist/components/ErrorBoundary/ErrorBoundary.js +11 -12
- package/dist/components/Filter/Filter.js +40 -41
- package/dist/components/Filter/FilterHeader.js +24 -24
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +21 -20
- package/dist/components/Input/Input.stories.d.ts +7 -0
- package/dist/components/Link/utils.js +2 -2
- package/dist/components/LinkBlock/LinkBlock.js +12 -13
- package/dist/components/LinkList/LinkList.js +8 -11
- package/dist/components/Navigation/Navigation.js +21 -22
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +48 -50
- package/dist/components/Navigation/NavigationList/NavigationList.js +33 -35
- package/dist/components/Pagination/Pagination.js +7 -7
- package/dist/components/Pagination/utils.js +1 -1
- package/dist/components/PinchZoom/PinchZoom.js +40 -43
- package/dist/components/Search/Search.js +94 -98
- package/dist/components/Search/SearchButton.js +19 -19
- package/dist/components/SeldonImage/SeldonImage.js +1 -1
- package/dist/components/Select/Select.js +22 -14
- package/dist/components/Select/Select.stories.d.ts +15 -0
- package/dist/components/Tabs/TabTrigger.js +13 -13
- package/dist/node_modules/@artsy/fresnel/dist/Breakpoints.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/DynamicResponsive.js +1 -1
- package/dist/node_modules/@artsy/fresnel/dist/Interactions.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/Media.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/MediaQueries.js +1 -1
- package/dist/node_modules/@artsy/fresnel/dist/Utils.js +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +2 -2
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +2 -2
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +63 -67
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +35 -35
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +79 -83
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js +43 -45
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +10 -10
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +113 -115
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +33 -37
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +422 -439
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js +39 -41
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +7 -10
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +1 -1
- package/dist/node_modules/change-case/dist/index.js +41 -44
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
- package/dist/node_modules/date-fns/differenceInDays.js +9 -9
- package/dist/node_modules/date-fns/differenceInHours.js +11 -11
- package/dist/node_modules/date-fns/differenceInMinutes.js +8 -8
- package/dist/node_modules/date-fns/differenceInSeconds.js +7 -7
- package/dist/node_modules/date-fns/formatDuration.js +11 -12
- package/dist/node_modules/date-fns/isSameWeek.js +8 -8
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +5 -5
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/localize.js +10 -10
- package/dist/node_modules/date-fns/startOfDay.js +6 -6
- package/dist/node_modules/date-fns/startOfWeek.js +7 -8
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1 -1
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +1 -1
- package/dist/node_modules/exenv/index.js +2 -2
- package/dist/node_modules/get-nonce/dist/es2015/index.js +1 -1
- package/dist/node_modules/prop-types/checkPropTypes.js +2 -2
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +3 -3
- package/dist/node_modules/react-intersection-observer/dist/index.js +2 -2
- package/dist/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js +1 -1
- package/dist/node_modules/react-modal/lib/components/ModalPortal.js +1 -1
- package/dist/node_modules/react-modal/lib/helpers/scopeTab.js +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +1 -1
- package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
- package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.js +14 -14
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -1
- package/dist/node_modules/usehooks-ts/dist/index.js +1 -1
- package/dist/node_modules/warning/warning.js +1 -1
- package/dist/node_modules/wheel-gestures/dist/wheel-gestures.esm.js +1 -1
- package/dist/patterns/BidSnapshot/BidSnapshot.js +58 -58
- package/dist/patterns/DetailList/DetailList.js +22 -22
- package/dist/patterns/FilterMenu/FilterMenu.js +15 -15
- package/dist/patterns/LanguageSelector/LanguageSelector.js +23 -23
- package/dist/patterns/LanguageSelector/utils.js +2 -5
- package/dist/patterns/ObjectTile/ObjectTile.d.ts +4 -0
- package/dist/patterns/ObjectTile/ObjectTile.js +50 -48
- package/dist/patterns/ObjectTile/ObjectTile.stories.d.ts +2 -0
- package/dist/patterns/ViewingsList/StatefulViewingsList.js +16 -16
- package/dist/patterns/ViewingsList/ViewingsList.js +42 -42
- package/dist/patterns/ViewingsList/ViewingsListCard.js +122 -123
- package/dist/patterns/ViewingsList/ViewingsListCardForm.js +170 -170
- package/dist/scss/patterns/ObjectTile/_objectTile.scss +17 -1
- package/dist/site-furniture/Header/Header.js +32 -32
- package/package.json +2 -1
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
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:
|
|
7
|
-
setIsSearchExpanded:
|
|
8
|
-
searchButtonText:
|
|
5
|
+
state: c,
|
|
6
|
+
isSearchExpanded: i,
|
|
7
|
+
setIsSearchExpanded: u,
|
|
8
|
+
searchButtonText: e,
|
|
9
9
|
className: t,
|
|
10
10
|
testId: o,
|
|
11
|
-
onCancel:
|
|
12
|
-
...
|
|
13
|
-
}) =>
|
|
11
|
+
onCancel: _,
|
|
12
|
+
...a
|
|
13
|
+
}) => i ? i ? /* @__PURE__ */ n(
|
|
14
14
|
"button",
|
|
15
15
|
{
|
|
16
|
-
...
|
|
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: (
|
|
22
|
-
|
|
21
|
+
onClick: (r) => {
|
|
22
|
+
_?.(), u(!1), r.stopPropagation();
|
|
23
23
|
},
|
|
24
|
-
children: /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ n(l, { "data-testid": `${o}-form-icon`, className: `${t}__button__icon` })
|
|
25
25
|
}
|
|
26
|
-
) : null : /* @__PURE__ */
|
|
26
|
+
) : null : /* @__PURE__ */ n(
|
|
27
27
|
"button",
|
|
28
28
|
{
|
|
29
|
-
...
|
|
29
|
+
...a,
|
|
30
30
|
type: "button",
|
|
31
31
|
"data-testid": `${o}-button`,
|
|
32
|
-
"aria-label":
|
|
32
|
+
"aria-label": e,
|
|
33
33
|
className: `${t}__button ${t}__button--search`,
|
|
34
|
-
onClick: (
|
|
35
|
-
|
|
34
|
+
onClick: (r) => {
|
|
35
|
+
u(!0), r.stopPropagation();
|
|
36
36
|
},
|
|
37
|
-
children: /* @__PURE__ */
|
|
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
|
|
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
|
|
2
|
-
import * as
|
|
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
|
|
5
|
+
import { SelectVariants as c } from "./types.js";
|
|
6
6
|
import D from "../../assets/chevronDown.svg.js";
|
|
7
|
-
const F =
|
|
7
|
+
const F = d.forwardRef(
|
|
8
8
|
({
|
|
9
9
|
children: m,
|
|
10
|
-
className:
|
|
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 =
|
|
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 =
|
|
30
|
+
const o = "select", I = d.useId(), n = z({
|
|
31
31
|
disabled: $,
|
|
32
|
-
id: t
|
|
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
|
-
[`${
|
|
46
|
-
}), R = a(
|
|
47
|
-
[`${e}-input__select--tertiary`]: f ===
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { getCommonProps as
|
|
5
|
-
const
|
|
6
|
-
const { className:
|
|
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
|
-
|
|
8
|
+
i,
|
|
9
9
|
{
|
|
10
|
-
value:
|
|
11
|
-
className: `${
|
|
12
|
-
onClick: () => r
|
|
13
|
-
ref:
|
|
14
|
-
children:
|
|
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
|
-
|
|
18
|
+
n.displayName = "TabTrigger";
|
|
19
19
|
export {
|
|
20
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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);
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
2
|
-
return function(
|
|
3
|
-
if (
|
|
4
|
-
return
|
|
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
|
-
|
|
8
|
+
f as composeEventHandlers
|
|
9
9
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import s from "react";
|
|
2
|
-
import { createContextScope as
|
|
3
|
-
import { createCollection as
|
|
4
|
-
import { useComposedRefs as
|
|
5
|
-
import { composeEventHandlers as
|
|
6
|
-
import { useControllableState as
|
|
7
|
-
import { Primitive as
|
|
8
|
-
import { createCollapsibleScope as
|
|
9
|
-
import { useId as
|
|
10
|
-
import { useDirection as
|
|
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",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
]), E =
|
|
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(
|
|
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
|
-
|
|
22
|
-
var [
|
|
21
|
+
V.displayName = f;
|
|
22
|
+
var [H, io] = b(f), [K, ao] = b(
|
|
23
23
|
f,
|
|
24
24
|
{ collapsible: !1 }
|
|
25
|
-
),
|
|
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] =
|
|
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
|
-
|
|
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(
|
|
46
|
+
children: /* @__PURE__ */ n(K, { scope: e.__scopeAccordion, collapsible: r, children: /* @__PURE__ */ n(L, { ...a, ref: c }) })
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
),
|
|
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] =
|
|
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
|
-
|
|
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(
|
|
75
|
+
children: /* @__PURE__ */ n(K, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ n(L, { ...r, ref: c }) })
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
|
-
}), [
|
|
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 =
|
|
81
|
-
|
|
82
|
-
|
|
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
|
|
116
|
-
|
|
111
|
+
const F = p % D;
|
|
112
|
+
x[F].ref.current?.focus();
|
|
117
113
|
});
|
|
118
114
|
return /* @__PURE__ */ n(
|
|
119
|
-
|
|
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
|
-
|
|
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", [
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
144
|
+
Z,
|
|
149
145
|
{
|
|
150
146
|
"data-orientation": r.orientation,
|
|
151
|
-
"data-state":
|
|
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
|
-
|
|
167
|
-
var
|
|
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(
|
|
165
|
+
const { __scopeAccordion: o, ...t } = e, i = I(f, o), r = k(G, o);
|
|
170
166
|
return /* @__PURE__ */ n(
|
|
171
|
-
|
|
167
|
+
T.h3,
|
|
172
168
|
{
|
|
173
169
|
"data-orientation": i.orientation,
|
|
174
|
-
"data-state":
|
|
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
|
-
|
|
183
|
-
var S = "AccordionTrigger",
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
200
|
-
var
|
|
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(
|
|
198
|
+
const { __scopeAccordion: o, ...t } = e, i = I(f, o), r = k(j, o), a = E(o);
|
|
203
199
|
return /* @__PURE__ */ n(
|
|
204
|
-
|
|
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
|
-
|
|
222
|
-
function
|
|
217
|
+
Y.displayName = j;
|
|
218
|
+
function q(e) {
|
|
223
219
|
return e ? "open" : "closed";
|
|
224
220
|
}
|
|
225
|
-
var
|
|
221
|
+
var Po = V, No = z, So = U, yo = Y;
|
|
226
222
|
export {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
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
|
};
|