@phillips/seldon 1.54.2 → 1.55.1
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/assets/chevronRight.svg.js +5 -0
- package/dist/components/Pagination/Pagination.d.ts +50 -0
- package/dist/components/Pagination/Pagination.js +66 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +40 -38
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/Input/_input.scss +5 -20
- package/dist/scss/components/Pagination/_pagination.scss +74 -0
- package/package.json +3 -2
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const l = (t) => /* @__PURE__ */ e.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M20.2524 16.1313L11.9644 24.4194C11.6715 24.7123 11.6191 25.4883 12.0654 25.9346C12.5117 26.3809 13.2877 26.3285 13.5806 26.0356L22.773 16.8432C22.9215 16.6948 23.0081 16.4222 22.9994 16.1313C23.0081 15.8404 22.9215 15.5678 22.773 15.4194L13.5806 6.227C13.2877 5.9341 12.5117 5.8817 12.0654 6.32801C11.6191 6.77432 11.6715 7.55035 11.9644 7.84324L20.2524 16.1313Z", fill: "black" }));
|
|
3
|
+
export {
|
|
4
|
+
l as default
|
|
5
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
|
2
|
+
export interface PaginationProps extends Omit<ComponentProps<'div'>, 'onChange'> {
|
|
3
|
+
/**
|
|
4
|
+
* Unique id for component testing
|
|
5
|
+
*/
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* Base class for Pagination component.
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Options Array of string
|
|
13
|
+
*/
|
|
14
|
+
options?: string[];
|
|
15
|
+
/**
|
|
16
|
+
* Boolean to specify whether the `<Pagination>` should be disabled
|
|
17
|
+
*/
|
|
18
|
+
isDisabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Current value of the `<Pagination>` component
|
|
21
|
+
*/
|
|
22
|
+
value: string | number;
|
|
23
|
+
/**
|
|
24
|
+
* `onChange` handler that is called whenever the `<Pagination>` value is changed
|
|
25
|
+
*/
|
|
26
|
+
onChange: (selectedValue: string, event?: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Specify the variant style of the `<Pagination>`
|
|
29
|
+
*/
|
|
30
|
+
variant?: 'inline';
|
|
31
|
+
/**
|
|
32
|
+
* Option previous label
|
|
33
|
+
*/
|
|
34
|
+
previousLabel?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Option next label
|
|
37
|
+
*/
|
|
38
|
+
nextLabel?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* ## Overview
|
|
42
|
+
*
|
|
43
|
+
* A controlled component that supports selecting a new page and moving next and previous through pages. It expects consumers to keep track of the current value and update it by listening to the `onChange` event.
|
|
44
|
+
*
|
|
45
|
+
* [Figma Link](https://www.figma.com/design/hxqgsE26wM7hII0WaUaDfF/RW---TIMED-Lot-Details-(PDP)?node-id=1-2&node-type=CANVAS&m=dev)
|
|
46
|
+
*
|
|
47
|
+
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-pagination--overview)
|
|
48
|
+
*/
|
|
49
|
+
declare const Pagination: ({ className, onChange, variant, options, value, isDisabled, previousLabel, nextLabel, ...props }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export default Pagination;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsxs as x, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import c from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { getCommonProps as N, px as n } from "../../utils/index.js";
|
|
4
|
+
import _ from "../Select/Select.js";
|
|
5
|
+
import d from "../Button/Button.js";
|
|
6
|
+
import u from "../../assets/chevronRight.svg.js";
|
|
7
|
+
const S = ({
|
|
8
|
+
className: f,
|
|
9
|
+
onChange: e,
|
|
10
|
+
variant: g = "inline",
|
|
11
|
+
options: t = [],
|
|
12
|
+
value: r,
|
|
13
|
+
isDisabled: l,
|
|
14
|
+
previousLabel: $ = "Previous",
|
|
15
|
+
nextLabel: p = "Next",
|
|
16
|
+
...o
|
|
17
|
+
}) => {
|
|
18
|
+
const b = "pagination", { className: s, ...h } = N(o, "Pagination"), { id: m } = o;
|
|
19
|
+
return /* @__PURE__ */ x(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: c(`${n}-${b}`, { [`${s}__wrapper`]: s }, f),
|
|
23
|
+
...h,
|
|
24
|
+
...o,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ i(
|
|
27
|
+
d,
|
|
28
|
+
{
|
|
29
|
+
className: c(`${n}__pagination-button`, `${n}-left-arrow`),
|
|
30
|
+
onClick: () => e(t.at(t.findIndex((a) => a === r) - 1) || ""),
|
|
31
|
+
"data-testid": `${m}-previous-button`,
|
|
32
|
+
isDisabled: l,
|
|
33
|
+
"aria-label": $,
|
|
34
|
+
children: /* @__PURE__ */ i(u, {})
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ i(
|
|
38
|
+
_,
|
|
39
|
+
{
|
|
40
|
+
className: g === "inline" && `${n}--inline-pagination`,
|
|
41
|
+
value: r,
|
|
42
|
+
onChange: (a) => e(a == null ? void 0 : a.currentTarget.value, a),
|
|
43
|
+
"data-testid": `${m}-select-button`,
|
|
44
|
+
hideLabel: !0,
|
|
45
|
+
disabled: l,
|
|
46
|
+
children: t.map((a) => /* @__PURE__ */ i("option", { value: a, children: a }, a))
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ i(
|
|
50
|
+
d,
|
|
51
|
+
{
|
|
52
|
+
className: `${n}__pagination-button`,
|
|
53
|
+
onClick: () => e(t[(t.findIndex((a) => a === r) + 1) % t.length] || ""),
|
|
54
|
+
"data-testid": `${m}-next-button`,
|
|
55
|
+
isDisabled: l,
|
|
56
|
+
"aria-label": p,
|
|
57
|
+
children: /* @__PURE__ */ i(u, {})
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
S as default
|
|
66
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export { default as Social, type SocialProps } from './patterns/Social/Social';
|
|
|
29
29
|
export { default as ViewingsList, type ViewingsListProps } from './patterns/ViewingsList/ViewingsList';
|
|
30
30
|
export { default as Modal, type ModalProps } from './components/Modal/Modal';
|
|
31
31
|
export { default as Drawer } from './components/Drawer/Drawer';
|
|
32
|
+
export { default as Pagination, type PaginationProps } from './components/Pagination/Pagination';
|
|
32
33
|
export { default as StatefulViewingsList, type StatefulViewingsListProps, } from './patterns/ViewingsList/StatefulViewingsList';
|
|
33
34
|
export * from './components/Text';
|
|
34
35
|
export * from './components/Accordion';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PaddingTokens as a, SpacingTokens as f, defaultYear as p, emailValidation as d, encodeURLSearchParams as l, findChildrenExcludingTypes as m, findChildrenOfType as s, generatePaddingClassName as i, getCommonProps as u, noOp as n, px as x, useNormalizedInputProps as g } from "./utils/index.js";
|
|
2
2
|
import { default as S } from "./pages/Page.js";
|
|
3
|
-
import { default as
|
|
3
|
+
import { default as P } from "./components/Button/Button.js";
|
|
4
4
|
import { ButtonVariants as k } from "./components/Button/types.js";
|
|
5
5
|
import { default as T } from "./components/IconButton/IconButton.js";
|
|
6
6
|
import { default as B } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
@@ -27,40 +27,41 @@ import { default as ie } from "./patterns/Subscribe/Subscribe.js";
|
|
|
27
27
|
import { SubscriptionState as ne } from "./patterns/Subscribe/types.js";
|
|
28
28
|
import { default as ge } from "./patterns/Social/Social.js";
|
|
29
29
|
import { default as Se } from "./patterns/ViewingsList/ViewingsList.js";
|
|
30
|
-
import { default as
|
|
30
|
+
import { default as Pe } from "./components/Modal/Modal.js";
|
|
31
31
|
import { default as ke } from "./components/Drawer/Drawer.js";
|
|
32
|
-
import { default as Te } from "./
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import { default as ve } from "./components/
|
|
36
|
-
import { default as Ae } from "./components/Accordion/
|
|
37
|
-
import { default as Ge } from "./
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
32
|
+
import { default as Te } from "./components/Pagination/Pagination.js";
|
|
33
|
+
import { default as Be } from "./patterns/ViewingsList/StatefulViewingsList.js";
|
|
34
|
+
import { TextVariants as Ne } from "./components/Text/types.js";
|
|
35
|
+
import { default as ve } from "./components/Text/Text.js";
|
|
36
|
+
import { default as Ae } from "./components/Accordion/Accordion.js";
|
|
37
|
+
import { default as Ge } from "./components/Accordion/AccordionItem.js";
|
|
38
|
+
import { default as Ee } from "./patterns/UserManagement/UserManagement.js";
|
|
39
|
+
import { AuthState as Me } from "./patterns/UserManagement/types.js";
|
|
40
|
+
import { SupportedLanguages as Re } from "./types/commonTypes.js";
|
|
41
|
+
import { default as ze } from "./components/Breadcrumb/Breadcrumb.js";
|
|
41
42
|
import "react/jsx-runtime";
|
|
42
43
|
import "./node_modules/classnames/index.js";
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { SeldonProvider as
|
|
44
|
+
import { default as Ye } from "./components/Dropdown/Dropdown.js";
|
|
45
|
+
import { default as qe } from "./components/Video/Video.js";
|
|
46
|
+
import { default as Ke } from "./patterns/LanguageSelector/LanguageSelector.js";
|
|
47
|
+
import { default as We } from "./components/ContentPeek/ContentPeek.js";
|
|
48
|
+
import { default as Ze } from "./components/Collapsible/Collapsible.js";
|
|
49
|
+
import { default as $e } from "./components/Collapsible/CollapsibleContent.js";
|
|
50
|
+
import { default as oo } from "./components/Collapsible/CollapsibleTrigger.js";
|
|
51
|
+
import { SeldonProvider as to } from "./providers/SeldonProvider.js";
|
|
51
52
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
Ae as Accordion,
|
|
54
|
+
Ge as AccordionItem,
|
|
55
|
+
Me as AuthState,
|
|
56
|
+
ze as Breadcrumb,
|
|
57
|
+
P as Button,
|
|
57
58
|
k as ButtonVariants,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
Ze as Collapsible,
|
|
60
|
+
$e as CollapsibleContent,
|
|
61
|
+
oo as CollapsibleTrigger,
|
|
62
|
+
We as ContentPeek,
|
|
62
63
|
ke as Drawer,
|
|
63
|
-
|
|
64
|
+
Ye as Dropdown,
|
|
64
65
|
B as ErrorBoundary,
|
|
65
66
|
N as Footer,
|
|
66
67
|
v as Grid,
|
|
@@ -70,33 +71,34 @@ export {
|
|
|
70
71
|
z as HeroBanner,
|
|
71
72
|
T as IconButton,
|
|
72
73
|
Y as Input,
|
|
73
|
-
|
|
74
|
+
Ke as LanguageSelector,
|
|
74
75
|
q as Link,
|
|
75
76
|
W as LinkBlock,
|
|
76
77
|
Z as LinkList,
|
|
77
78
|
K as LinkVariants,
|
|
78
|
-
|
|
79
|
+
Pe as Modal,
|
|
79
80
|
G as Navigation,
|
|
80
81
|
E as NavigationItem,
|
|
81
82
|
M as NavigationItemTrigger,
|
|
82
83
|
R as NavigationList,
|
|
83
84
|
a as PaddingTokens,
|
|
84
85
|
S as Page,
|
|
86
|
+
Te as Pagination,
|
|
85
87
|
$ as Row,
|
|
86
88
|
fe as Search,
|
|
87
|
-
|
|
89
|
+
to as SeldonProvider,
|
|
88
90
|
de as Select,
|
|
89
91
|
ge as Social,
|
|
90
92
|
f as SpacingTokens,
|
|
91
93
|
me as SplitPanel,
|
|
92
|
-
|
|
94
|
+
Be as StatefulViewingsList,
|
|
93
95
|
ie as Subscribe,
|
|
94
96
|
ne as SubscriptionState,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
Re as SupportedLanguages,
|
|
98
|
+
ve as Text,
|
|
99
|
+
Ne as TextVariants,
|
|
100
|
+
Ee as UserManagement,
|
|
101
|
+
qe as Video,
|
|
100
102
|
Se as ViewingsList,
|
|
101
103
|
p as defaultYear,
|
|
102
104
|
d as emailValidation,
|
|
@@ -31,7 +31,7 @@ $lg: #{$px}-input--lg;
|
|
|
31
31
|
border-radius: 0.1875rem;
|
|
32
32
|
font-size: 0.8125rem;
|
|
33
33
|
margin-bottom: 0.25rem;
|
|
34
|
-
padding:
|
|
34
|
+
padding: $padding-xsm;
|
|
35
35
|
|
|
36
36
|
// width: 100%;
|
|
37
37
|
}
|
|
@@ -44,20 +44,6 @@ $lg: #{$px}-input--lg;
|
|
|
44
44
|
overflow: hidden;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
// Small input size
|
|
48
|
-
&--sm {
|
|
49
|
-
.#{$px}-input__input {
|
|
50
|
-
padding: 0.25rem 0.5rem;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// Large input size
|
|
55
|
-
&--lg {
|
|
56
|
-
.#{$px}-input__input {
|
|
57
|
-
padding: 0.75rem 0.5rem;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
47
|
// Inline
|
|
62
48
|
&--inline {
|
|
63
49
|
align-items: center;
|
|
@@ -68,10 +54,6 @@ $lg: #{$px}-input--lg;
|
|
|
68
54
|
align-self: center;
|
|
69
55
|
width: unset;
|
|
70
56
|
}
|
|
71
|
-
|
|
72
|
-
.#{$px}-input__label {
|
|
73
|
-
// max-width: 8.75rem;
|
|
74
|
-
}
|
|
75
57
|
}
|
|
76
58
|
|
|
77
59
|
// Disabled
|
|
@@ -174,8 +156,11 @@ $lg: #{$px}-input--lg;
|
|
|
174
156
|
}
|
|
175
157
|
}
|
|
176
158
|
|
|
159
|
+
.#{$px}-select-input.#{$px}-input {
|
|
160
|
+
width: fit-content;
|
|
161
|
+
}
|
|
177
162
|
.#{$px}-select-input .#{$px}-input__input {
|
|
178
|
-
|
|
163
|
+
width: fit-content;
|
|
179
164
|
}
|
|
180
165
|
|
|
181
166
|
@keyframes reveal {
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@use '../../allPartials' as *;
|
|
2
|
+
|
|
3
|
+
.#{$px}-pagination {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
gap: $spacing-md;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.#{$px} {
|
|
10
|
+
&--inline-pagination__wrapper {
|
|
11
|
+
select {
|
|
12
|
+
@include pText($body-size2);
|
|
13
|
+
|
|
14
|
+
appearance: none;
|
|
15
|
+
border: none;
|
|
16
|
+
font-weight: 600;
|
|
17
|
+
line-height: 2.5rem;
|
|
18
|
+
margin-bottom: 0;
|
|
19
|
+
outline: none;
|
|
20
|
+
text-align: center;
|
|
21
|
+
text-decoration: underline;
|
|
22
|
+
text-underline-offset: 10px;
|
|
23
|
+
|
|
24
|
+
&:disabled {
|
|
25
|
+
border: 1px solid $medium-gray;
|
|
26
|
+
margin: auto;
|
|
27
|
+
max-height: 3.5rem;
|
|
28
|
+
max-width: 5rem;
|
|
29
|
+
padding: 0.5rem;
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:hover {
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:focus {
|
|
38
|
+
outline: 1px solid $medium-gray;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
select::-ms-expand {
|
|
43
|
+
border: none;
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.#{$px}__pagination-button {
|
|
50
|
+
background: none;
|
|
51
|
+
flex-direction: row;
|
|
52
|
+
padding: 0;
|
|
53
|
+
|
|
54
|
+
svg {
|
|
55
|
+
width: 2rem;
|
|
56
|
+
|
|
57
|
+
@include media($size-md, $type: 'max') {
|
|
58
|
+
width: 1rem;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:hover,
|
|
63
|
+
&:focus {
|
|
64
|
+
background: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:disabled {
|
|
68
|
+
border: none;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.#{$px}-left-arrow {
|
|
73
|
+
transform: scaleX(-1);
|
|
74
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.55.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/PhillipsAuctionHouse/seldon"
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"classnames": "^2.5.1",
|
|
51
51
|
"dompurify": "^3.1.6",
|
|
52
52
|
"flatpickr": "^4.6.13",
|
|
53
|
+
"fresnel": "^1.1.1",
|
|
53
54
|
"html-react-parser": "^5.1.12",
|
|
54
55
|
"react-modal": "^3.16.1",
|
|
55
56
|
"react-transition-group": "^4.4.5",
|
|
@@ -111,7 +112,7 @@
|
|
|
111
112
|
"stylelint-scss": "^6.4.1",
|
|
112
113
|
"ts-node": "^10.9.2",
|
|
113
114
|
"typescript": "^5.5.4",
|
|
114
|
-
"vite": "^5.
|
|
115
|
+
"vite": "^5.4.6",
|
|
115
116
|
"vite-plugin-dts": "^2.3.0",
|
|
116
117
|
"vite-plugin-svgr": "^4.2.0",
|
|
117
118
|
"vite-tsconfig-paths": "^4.3.2",
|