@phillips/seldon 1.57.0 → 1.57.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.
@@ -36,6 +36,10 @@ export interface PaginationProps extends Omit<ComponentProps<'div'>, 'onChange'>
36
36
  * Option next label
37
37
  */
38
38
  nextLabel?: string;
39
+ /**
40
+ * Option select aria-label
41
+ */
42
+ selectLabel?: string;
39
43
  }
40
44
  /**
41
45
  * ## Overview
@@ -46,5 +50,5 @@ export interface PaginationProps extends Omit<ComponentProps<'div'>, 'onChange'>
46
50
  *
47
51
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-pagination--overview)
48
52
  */
49
- declare const Pagination: ({ className, onChange, variant, options, value, isDisabled, previousLabel, nextLabel, ...props }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
53
+ declare const Pagination: ({ className, onChange, variant, options, value, isDisabled, previousLabel, nextLabel, selectLabel, ...props }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
50
54
  export default Pagination;
@@ -1,60 +1,62 @@
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 = ({
1
+ import { jsxs as N, jsx as e } from "react/jsx-runtime";
2
+ import s from "../../node_modules/classnames/index.js";
3
+ import { getCommonProps as _, px as i } from "../../utils/index.js";
4
+ import P from "../Select/Select.js";
5
+ import d from "../../assets/chevronRight.svg.js";
6
+ import u from "../IconButton/IconButton.js";
7
+ const y = ({
8
8
  className: f,
9
- onChange: e,
9
+ onChange: n,
10
10
  variant: g = "inline",
11
11
  options: t = [],
12
12
  value: r,
13
13
  isDisabled: l,
14
14
  previousLabel: $ = "Previous",
15
- nextLabel: p = "Next",
15
+ nextLabel: b = "Next",
16
+ selectLabel: p = "Select",
16
17
  ...o
17
18
  }) => {
18
- const b = "pagination", { className: s, ...h } = N(o, "Pagination"), { id: m } = o;
19
- return /* @__PURE__ */ x(
19
+ const h = "pagination", { className: c, ...x } = _(o, "Pagination"), { id: m } = o;
20
+ return /* @__PURE__ */ N(
20
21
  "div",
21
22
  {
22
- className: c(`${n}-${b}`, { [`${s}__wrapper`]: s }, f),
23
- ...h,
23
+ className: s(`${i}-${h}`, { [`${c}__wrapper`]: c }, f),
24
+ ...x,
24
25
  ...o,
25
26
  children: [
26
- /* @__PURE__ */ i(
27
- d,
27
+ /* @__PURE__ */ e(
28
+ u,
28
29
  {
29
- className: c(`${n}__pagination-button`, `${n}-left-arrow`),
30
- onClick: () => e(t.at(t.findIndex((a) => a === r) - 1) || ""),
30
+ className: s(`${i}__pagination-button`, `${i}-left-arrow`),
31
+ onClick: () => n(t.at(t.findIndex((a) => a === r) - 1) || ""),
31
32
  "data-testid": `${m}-previous-button`,
32
33
  isDisabled: l,
33
34
  "aria-label": $,
34
- children: /* @__PURE__ */ i(u, {})
35
+ children: /* @__PURE__ */ e(d, {})
35
36
  }
36
37
  ),
37
- /* @__PURE__ */ i(
38
- _,
38
+ /* @__PURE__ */ e(
39
+ P,
39
40
  {
40
- className: g === "inline" && `${n}--inline-pagination`,
41
+ className: g === "inline" && `${i}--inline-pagination`,
42
+ "aria-label": p,
41
43
  value: r,
42
- onChange: (a) => e(a == null ? void 0 : a.currentTarget.value, a),
44
+ onChange: (a) => n(a == null ? void 0 : a.currentTarget.value, a),
43
45
  "data-testid": `${m}-select-button`,
44
46
  hideLabel: !0,
45
47
  disabled: l,
46
- children: t.map((a) => /* @__PURE__ */ i("option", { value: a, children: a }, a))
48
+ children: t.map((a) => /* @__PURE__ */ e("option", { value: a, children: a }, a))
47
49
  }
48
50
  ),
49
- /* @__PURE__ */ i(
50
- d,
51
+ /* @__PURE__ */ e(
52
+ u,
51
53
  {
52
- className: `${n}__pagination-button`,
53
- onClick: () => e(t[(t.findIndex((a) => a === r) + 1) % t.length] || ""),
54
+ className: `${i}__pagination-button`,
55
+ onClick: () => n(t[(t.findIndex((a) => a === r) + 1) % t.length] || ""),
54
56
  "data-testid": `${m}-next-button`,
55
57
  isDisabled: l,
56
- "aria-label": p,
57
- children: /* @__PURE__ */ i(u, {})
58
+ "aria-label": b,
59
+ children: /* @__PURE__ */ e(d, {})
58
60
  }
59
61
  )
60
62
  ]
@@ -62,5 +64,5 @@ const S = ({
62
64
  );
63
65
  };
64
66
  export {
65
- S as default
67
+ y as default
66
68
  };
@@ -1,6 +1,7 @@
1
1
  @use '../../allPartials' as *;
2
2
 
3
3
  .#{$px}-pagination {
4
+ align-items: center;
4
5
  display: flex;
5
6
  flex-direction: row;
6
7
  gap: $spacing-md;
@@ -47,10 +48,6 @@
47
48
  }
48
49
 
49
50
  .#{$px}__pagination-button {
50
- background: none;
51
- flex-direction: row;
52
- padding: 0;
53
-
54
51
  svg {
55
52
  width: 2rem;
56
53
 
@@ -58,15 +55,6 @@
58
55
  width: 1rem;
59
56
  }
60
57
  }
61
-
62
- &:hover,
63
- &:focus {
64
- background: none;
65
- }
66
-
67
- &:disabled {
68
- border: none;
69
- }
70
58
  }
71
59
 
72
60
  .#{$px}-left-arrow {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.57.0",
3
+ "version": "1.57.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"