@phillips/seldon 1.77.1 → 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/Pagination/Pagination.js +54 -50
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -8
- package/dist/node_modules/exenv/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- 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,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
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../_virtual/
|
|
1
|
+
import { __module as e } from "../../../../_virtual/index6.js";
|
|
2
2
|
import { __require as o } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as t } from "./cjs/react-is.development.js";
|
|
4
4
|
var r;
|
|
@@ -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
|
}
|