@phillips/seldon 1.77.0 → 1.77.2
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/components/Accordion/AccordionItem.js +63 -62
- package/dist/components/Pagination/Pagination.js +54 -50
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -8
- package/dist/scss/components/Accordion/_accordion.scss +4 -2
- package/dist/scss/components/Input/_input.scss +5 -1
- package/dist/scss/components/Pagination/_pagination.scss +10 -5
- package/dist/utils/hooks.d.ts +4 -0
- package/dist/utils/hooks.js +10 -0
- package/package.json +1 -1
|
@@ -1,111 +1,112 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { getCommonProps as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { Item as
|
|
1
|
+
import { jsxs as $, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { getCommonProps as f } from "../../utils/index.js";
|
|
3
|
+
import g from "../../assets/plus.svg.js";
|
|
4
|
+
import v from "../../assets/minus.svg.js";
|
|
5
|
+
import I from "../../assets/lock.svg.js";
|
|
6
|
+
import a from "../../node_modules/classnames/index.js";
|
|
7
|
+
import { Item as _, Trigger as x, Content as C } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
8
8
|
import { AccordionItemVariant as h } from "./types.js";
|
|
9
9
|
import { getIconClasses as u } from "./utils.js";
|
|
10
10
|
const A = ({
|
|
11
11
|
children: n,
|
|
12
|
-
className:
|
|
13
|
-
baseClassName:
|
|
14
|
-
disable:
|
|
15
|
-
isLargeVariation:
|
|
16
|
-
id:
|
|
12
|
+
className: e,
|
|
13
|
+
baseClassName: o,
|
|
14
|
+
disable: s,
|
|
15
|
+
isLargeVariation: r,
|
|
16
|
+
id: c
|
|
17
17
|
}) => {
|
|
18
|
-
const i =
|
|
19
|
-
|
|
18
|
+
const i = s, l = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
19
|
+
I,
|
|
20
20
|
{
|
|
21
|
-
className: u(
|
|
22
|
-
"data-testid": `${
|
|
21
|
+
className: u(o, r, "lock"),
|
|
22
|
+
"data-testid": `${c}-lockedIcon`,
|
|
23
23
|
"aria-hidden": !0
|
|
24
24
|
}
|
|
25
|
-
) }), p = /* @__PURE__ */
|
|
26
|
-
|
|
25
|
+
) }), p = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
26
|
+
g,
|
|
27
27
|
{
|
|
28
|
-
className: u(
|
|
29
|
-
"data-testid": `${
|
|
28
|
+
className: u(o, r, "plus"),
|
|
29
|
+
"data-testid": `${c}-plusIcon`,
|
|
30
30
|
"aria-hidden": !0
|
|
31
31
|
}
|
|
32
|
-
) }),
|
|
33
|
-
|
|
32
|
+
) }), d = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
33
|
+
v,
|
|
34
34
|
{
|
|
35
|
-
className: u(
|
|
36
|
-
"data-testid": `${
|
|
35
|
+
className: u(o, r, "minus"),
|
|
36
|
+
"data-testid": `${c}-minusIcon`,
|
|
37
37
|
"aria-hidden": !0
|
|
38
38
|
}
|
|
39
39
|
) });
|
|
40
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ t(
|
|
41
41
|
x,
|
|
42
42
|
{
|
|
43
|
-
"data-disabled":
|
|
43
|
+
"data-disabled": s,
|
|
44
44
|
asChild: !0,
|
|
45
|
-
className:
|
|
46
|
-
children: /* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
45
|
+
className: a(o, { [`${o}--hoverable`]: !s }, e),
|
|
46
|
+
children: /* @__PURE__ */ $("div", { "data-testid": `${c}-trigger`, children: [
|
|
47
|
+
/* @__PURE__ */ t("div", { className: a(`${o}__text`, { [`${o}__text--lg`]: r }), children: n }),
|
|
48
48
|
i && l,
|
|
49
49
|
!i && p,
|
|
50
|
-
!i &&
|
|
50
|
+
!i && d
|
|
51
51
|
] })
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
|
-
},
|
|
54
|
+
}, N = ({
|
|
55
55
|
children: n,
|
|
56
|
-
baseClassName:
|
|
57
|
-
disable:
|
|
58
|
-
hasTransition:
|
|
59
|
-
isLargeVariation:
|
|
60
|
-
className:
|
|
61
|
-
}) =>
|
|
62
|
-
|
|
56
|
+
baseClassName: e,
|
|
57
|
+
disable: o,
|
|
58
|
+
hasTransition: s,
|
|
59
|
+
isLargeVariation: r,
|
|
60
|
+
className: c
|
|
61
|
+
}) => o && n ? /* @__PURE__ */ t("div", { children: n }) : /* @__PURE__ */ t(
|
|
62
|
+
C,
|
|
63
63
|
{
|
|
64
64
|
asChild: !0,
|
|
65
|
-
className:
|
|
66
|
-
|
|
67
|
-
{ [`${
|
|
68
|
-
|
|
65
|
+
className: a(
|
|
66
|
+
`${e}__content`,
|
|
67
|
+
{ [`${e}__content--lg`]: r },
|
|
68
|
+
{ [`${e}--transition`]: s },
|
|
69
|
+
c
|
|
69
70
|
),
|
|
70
71
|
children: n
|
|
71
72
|
}
|
|
72
|
-
)
|
|
73
|
+
), q = ({
|
|
73
74
|
isLocked: n = !1,
|
|
74
|
-
variant:
|
|
75
|
-
id:
|
|
76
|
-
label:
|
|
77
|
-
isLastItem:
|
|
78
|
-
hasTransition:
|
|
75
|
+
variant: e = h.sm,
|
|
76
|
+
id: o,
|
|
77
|
+
label: s,
|
|
78
|
+
isLastItem: r,
|
|
79
|
+
hasTransition: c = !1,
|
|
79
80
|
children: i,
|
|
80
81
|
...l
|
|
81
82
|
}) => {
|
|
82
|
-
const { className: p } =
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
|
|
83
|
+
const { className: p } = f({ id: o }, "Accordion"), d = e === h.lg, m = `${p}-item`;
|
|
84
|
+
return /* @__PURE__ */ $(
|
|
85
|
+
_,
|
|
85
86
|
{
|
|
86
87
|
disabled: n,
|
|
87
|
-
value:
|
|
88
|
-
className:
|
|
88
|
+
value: o,
|
|
89
|
+
className: a(m, { [`${m}__border-bottom`]: !r }),
|
|
89
90
|
...l,
|
|
90
91
|
children: [
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ t(
|
|
92
93
|
A,
|
|
93
94
|
{
|
|
94
95
|
disable: n,
|
|
95
|
-
isLargeVariation:
|
|
96
|
-
id:
|
|
96
|
+
isLargeVariation: d,
|
|
97
|
+
id: o,
|
|
97
98
|
baseClassName: `${m}-label`,
|
|
98
|
-
children:
|
|
99
|
+
children: s
|
|
99
100
|
}
|
|
100
101
|
),
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
|
|
102
|
+
/* @__PURE__ */ t(
|
|
103
|
+
N,
|
|
103
104
|
{
|
|
104
105
|
disable: n,
|
|
105
|
-
hasTransition:
|
|
106
|
-
isLargeVariation:
|
|
106
|
+
hasTransition: c,
|
|
107
|
+
isLargeVariation: d,
|
|
107
108
|
baseClassName: m,
|
|
108
|
-
children: /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ t("div", { className: "radix-accordion-content", children: i })
|
|
109
110
|
}
|
|
110
111
|
)
|
|
111
112
|
]
|
|
@@ -1,78 +1,82 @@
|
|
|
1
|
-
import { jsxs as O, jsx as
|
|
2
|
-
import
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as O, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import p from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { getCommonProps as w, px as r } from "../../utils/index.js";
|
|
4
|
+
import V from "../Select/Select.js";
|
|
5
5
|
import f from "../../assets/chevronRight.svg.js";
|
|
6
|
-
import
|
|
6
|
+
import h from "../IconButton/IconButton.js";
|
|
7
7
|
import { ButtonVariants as x } from "../Button/types.js";
|
|
8
|
-
import { determineOptionValue as
|
|
9
|
-
|
|
8
|
+
import { determineOptionValue as o, findOptionFromSelectString as j } from "./utils.js";
|
|
9
|
+
import { usePendingState as k } from "../../utils/hooks.js";
|
|
10
|
+
const E = ({
|
|
10
11
|
className: b,
|
|
11
|
-
onChange:
|
|
12
|
+
onChange: P,
|
|
12
13
|
variant: $ = "inline",
|
|
13
|
-
options:
|
|
14
|
-
value:
|
|
15
|
-
isDisabled:
|
|
16
|
-
previousLabel:
|
|
17
|
-
nextLabel:
|
|
18
|
-
selectLabel:
|
|
19
|
-
...
|
|
14
|
+
options: n = [],
|
|
15
|
+
value: g,
|
|
16
|
+
isDisabled: l,
|
|
17
|
+
previousLabel: S = "Previous",
|
|
18
|
+
nextLabel: v = "Next",
|
|
19
|
+
selectLabel: C = "Select",
|
|
20
|
+
...s
|
|
20
21
|
}) => {
|
|
21
|
-
const
|
|
22
|
+
const N = "pagination", { className: u, ..._ } = w(s, "Pagination"), { id: c } = s, { pendingState: y, setPendingState: I } = k(o(g)), m = y || g, d = (t, e) => {
|
|
23
|
+
const a = o(t);
|
|
24
|
+
I(a), P(a, e);
|
|
25
|
+
};
|
|
22
26
|
return /* @__PURE__ */ O(
|
|
23
27
|
"div",
|
|
24
28
|
{
|
|
25
|
-
className:
|
|
26
|
-
...
|
|
27
|
-
...
|
|
29
|
+
className: p(`${r}-${N}`, { [`${u}__wrapper`]: u }, b),
|
|
30
|
+
..._,
|
|
31
|
+
...s,
|
|
28
32
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
33
|
+
/* @__PURE__ */ i(
|
|
34
|
+
h,
|
|
31
35
|
{
|
|
32
|
-
className:
|
|
36
|
+
className: p(`${r}__pagination-button`, `${r}-left-arrow`),
|
|
33
37
|
onClick: () => {
|
|
34
|
-
const t =
|
|
35
|
-
|
|
38
|
+
const t = n.findIndex((a) => o(a) === m) - 1, e = n.at(t) || "";
|
|
39
|
+
d(e);
|
|
36
40
|
},
|
|
37
|
-
"data-testid": `${
|
|
38
|
-
isDisabled:
|
|
39
|
-
"aria-label":
|
|
41
|
+
"data-testid": `${c}-previous-button`,
|
|
42
|
+
isDisabled: l,
|
|
43
|
+
"aria-label": S,
|
|
40
44
|
variant: x.tertiary,
|
|
41
|
-
children: /* @__PURE__ */
|
|
45
|
+
children: /* @__PURE__ */ i(f, {})
|
|
42
46
|
}
|
|
43
47
|
),
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
48
|
+
/* @__PURE__ */ i(
|
|
49
|
+
V,
|
|
46
50
|
{
|
|
47
|
-
className: $ === "inline" && `${
|
|
48
|
-
"aria-label":
|
|
49
|
-
value:
|
|
51
|
+
className: $ === "inline" && `${r}--inline-pagination`,
|
|
52
|
+
"aria-label": C,
|
|
53
|
+
value: m,
|
|
50
54
|
onChange: (t) => {
|
|
51
|
-
const
|
|
52
|
-
|
|
55
|
+
const e = j(n, t == null ? void 0 : t.currentTarget.value);
|
|
56
|
+
e && d(e, t);
|
|
53
57
|
},
|
|
54
|
-
"data-testid": `${
|
|
58
|
+
"data-testid": `${c}-select-button`,
|
|
55
59
|
hideLabel: !0,
|
|
56
|
-
disabled:
|
|
57
|
-
children:
|
|
58
|
-
const
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
+
disabled: l,
|
|
61
|
+
children: n.map((t) => {
|
|
62
|
+
const e = o(t);
|
|
63
|
+
return /* @__PURE__ */ i("option", { value: e, children: typeof t == "string" || typeof t == "number" ? t : t.label }, e);
|
|
60
64
|
})
|
|
61
65
|
}
|
|
62
66
|
),
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
|
|
67
|
+
/* @__PURE__ */ i(
|
|
68
|
+
h,
|
|
65
69
|
{
|
|
66
|
-
className: `${
|
|
70
|
+
className: `${r}__pagination-button`,
|
|
67
71
|
onClick: () => {
|
|
68
|
-
const t = (
|
|
69
|
-
|
|
72
|
+
const t = (n.findIndex((a) => o(a) === m) + 1) % n.length, e = n[t];
|
|
73
|
+
d(e);
|
|
70
74
|
},
|
|
71
|
-
"data-testid": `${
|
|
72
|
-
isDisabled:
|
|
73
|
-
"aria-label":
|
|
75
|
+
"data-testid": `${c}-next-button`,
|
|
76
|
+
isDisabled: l,
|
|
77
|
+
"aria-label": v,
|
|
74
78
|
variant: x.tertiary,
|
|
75
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ i(f, {})
|
|
76
80
|
}
|
|
77
81
|
)
|
|
78
82
|
]
|
|
@@ -80,5 +84,5 @@ const R = ({
|
|
|
80
84
|
);
|
|
81
85
|
};
|
|
82
86
|
export {
|
|
83
|
-
|
|
87
|
+
E as default
|
|
84
88
|
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PaddingTokens as f, SpacingTokens as l, defaultYear as s, emailValidation as m, encodeURLSearchParams as p, findChildrenExcludingTypes as d, findChildrenOfType as
|
|
1
|
+
import { PaddingTokens as f, SpacingTokens as l, defaultYear as s, emailValidation as m, encodeURLSearchParams as p, findChildrenExcludingTypes as d, findChildrenOfType as n, generatePaddingClassName as u, getCommonProps as x, noOp as i, px as g, useNormalizedInputProps as c } from "./utils/index.js";
|
|
2
2
|
import { default as C } from "./pages/Page.js";
|
|
3
3
|
import { default as P } from "./components/Button/Button.js";
|
|
4
4
|
import { ButtonVariants as b } from "./components/Button/types.js";
|
|
@@ -23,7 +23,7 @@ import { GridItemAlign as ae } from "./components/GridItem/types.js";
|
|
|
23
23
|
import { default as le } from "./components/Search/Search.js";
|
|
24
24
|
import { default as me } from "./components/Select/Select.js";
|
|
25
25
|
import { default as de } from "./components/SplitPanel/SplitPanel.js";
|
|
26
|
-
import { default as
|
|
26
|
+
import { default as ue } from "./patterns/Subscribe/Subscribe.js";
|
|
27
27
|
import { SubscriptionState as ie } from "./patterns/Subscribe/types.js";
|
|
28
28
|
import { default as ce } from "./patterns/Social/Social.js";
|
|
29
29
|
import { default as Ce } from "./patterns/ViewingsList/ViewingsList.js";
|
|
@@ -52,7 +52,7 @@ import { default as ro } from "./components/ContentPeek/ContentPeek.js";
|
|
|
52
52
|
import { default as fo } from "./components/Collapsible/Collapsible.js";
|
|
53
53
|
import { default as so } from "./components/Collapsible/CollapsibleContent.js";
|
|
54
54
|
import { default as po } from "./components/Collapsible/CollapsibleTrigger.js";
|
|
55
|
-
import { SeldonProvider as
|
|
55
|
+
import { SeldonProvider as uo } from "./providers/SeldonProvider/SeldonProvider.js";
|
|
56
56
|
import { default as io } from "./components/PageContentWrapper/PageContentWrapper.js";
|
|
57
57
|
import { default as co } from "./components/Carousel/Carousel.js";
|
|
58
58
|
import { default as Co } from "./components/Carousel/CarouselContent.js";
|
|
@@ -69,6 +69,7 @@ import { default as Oo } from "./patterns/SaleHeaderBanner/SaleHeaderBanner.js";
|
|
|
69
69
|
import { default as Uo } from "./patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js";
|
|
70
70
|
import { default as Fo } from "./patterns/SaleHeaderBanner/SaleHeaderCountdown.js";
|
|
71
71
|
import { AuctionState as Yo } from "./patterns/SaleHeaderBanner/types.js";
|
|
72
|
+
import { usePendingState as jo } from "./utils/hooks.js";
|
|
72
73
|
export {
|
|
73
74
|
Ee as Accordion,
|
|
74
75
|
Oe as AccordionItem,
|
|
@@ -122,13 +123,13 @@ export {
|
|
|
122
123
|
Fo as SaleHeaderCountdown,
|
|
123
124
|
le as Search,
|
|
124
125
|
Eo as SeldonImage,
|
|
125
|
-
|
|
126
|
+
uo as SeldonProvider,
|
|
126
127
|
me as Select,
|
|
127
128
|
ce as Social,
|
|
128
129
|
l as SpacingTokens,
|
|
129
130
|
de as SplitPanel,
|
|
130
131
|
Be as StatefulViewingsList,
|
|
131
|
-
|
|
132
|
+
ue as Subscribe,
|
|
132
133
|
ie as SubscriptionState,
|
|
133
134
|
qe as SupportedLanguages,
|
|
134
135
|
vo as TabsContainer,
|
|
@@ -144,10 +145,11 @@ export {
|
|
|
144
145
|
m as emailValidation,
|
|
145
146
|
p as encodeURLSearchParams,
|
|
146
147
|
d as findChildrenExcludingTypes,
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
n as findChildrenOfType,
|
|
149
|
+
u as generatePaddingClassName,
|
|
149
150
|
x as getCommonProps,
|
|
150
151
|
i as noOp,
|
|
151
152
|
g as px,
|
|
152
|
-
c as useNormalizedInputProps
|
|
153
|
+
c as useNormalizedInputProps,
|
|
154
|
+
jo as usePendingState
|
|
153
155
|
};
|
|
@@ -61,11 +61,15 @@ $lg: #{$px}-input--lg;
|
|
|
61
61
|
// Disabled
|
|
62
62
|
&--disabled {
|
|
63
63
|
color: $keyline-gray;
|
|
64
|
+
cursor: default;
|
|
64
65
|
|
|
65
66
|
.#{$px}-input__label,
|
|
66
67
|
.#{$px}-input__input {
|
|
67
68
|
color: inherit;
|
|
68
|
-
|
|
69
|
+
}
|
|
70
|
+
.#{$px}-input__label:hover,
|
|
71
|
+
.#{$px}-input__input:hover {
|
|
72
|
+
cursor: default;
|
|
69
73
|
}
|
|
70
74
|
}
|
|
71
75
|
|
|
@@ -8,11 +8,16 @@
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.#{$px} {
|
|
11
|
-
&-icon-button
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
&-icon-button {
|
|
12
|
+
&:disabled {
|
|
13
|
+
border: unset;
|
|
14
|
+
}
|
|
15
|
+
&.#{$px}__pagination-button {
|
|
16
|
+
@include media($breakpoint-md) {
|
|
17
|
+
> svg {
|
|
18
|
+
height: 1.75rem;
|
|
19
|
+
width: 1.75rem;
|
|
20
|
+
}
|
|
16
21
|
}
|
|
17
22
|
}
|
|
18
23
|
}
|