@phillips/seldon 1.103.2 → 1.103.3
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.
|
@@ -3,7 +3,7 @@ import { getCommonProps as u, px as t } from "../../utils/index.js";
|
|
|
3
3
|
import f from "../../node_modules/classnames/index.js";
|
|
4
4
|
import p from "./BreadcrumbItem.js";
|
|
5
5
|
import { SSRMediaQuery as c } from "../../providers/SeldonProvider/utils.js";
|
|
6
|
-
import
|
|
6
|
+
import g from "../../assets/arrowPrev.svg.js";
|
|
7
7
|
const v = ({
|
|
8
8
|
className: s,
|
|
9
9
|
items: a = [],
|
|
@@ -11,25 +11,25 @@ const v = ({
|
|
|
11
11
|
linkElement: l = "a",
|
|
12
12
|
...e
|
|
13
13
|
}) => {
|
|
14
|
-
const { className:
|
|
15
|
-
return /* @__PURE__ */ h("nav", { "aria-label": "Breadcrumb", className: f(
|
|
14
|
+
const { className: m, ...i } = u(e, "Breadcrumb"), { id: b } = e;
|
|
15
|
+
return /* @__PURE__ */ h("nav", { "aria-label": "Breadcrumb", className: f(m, s), ...i, ...e, children: [
|
|
16
16
|
/* @__PURE__ */ r(c.Media, { lessThan: "md", children: /* @__PURE__ */ r(
|
|
17
17
|
l,
|
|
18
18
|
{
|
|
19
19
|
href: a[1].href ? a[1].href : "/",
|
|
20
|
-
className: `${t}-icon-button ${t}-icon-button--
|
|
20
|
+
className: `${t}-icon-button ${t}-icon-button--primary ${m}__back-button`,
|
|
21
21
|
"data-testid": `${b}-back-button`,
|
|
22
|
-
children: /* @__PURE__ */ r(
|
|
22
|
+
children: /* @__PURE__ */ r(g, {})
|
|
23
23
|
}
|
|
24
24
|
) }),
|
|
25
|
-
/* @__PURE__ */ r(c.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ r("ol", { children: a.map((o,
|
|
25
|
+
/* @__PURE__ */ r(c.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ r("ol", { children: a.map((o, n) => /* @__PURE__ */ r(
|
|
26
26
|
p,
|
|
27
27
|
{
|
|
28
28
|
href: o.href,
|
|
29
29
|
label: o.label,
|
|
30
30
|
element: l,
|
|
31
|
-
isCurrent: a.length - 1 ===
|
|
32
|
-
isTruncateText: d ===
|
|
31
|
+
isCurrent: a.length - 1 === n,
|
|
32
|
+
isTruncateText: d === n
|
|
33
33
|
},
|
|
34
34
|
o.label
|
|
35
35
|
)) }) })
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { jsxs as O, jsx as
|
|
1
|
+
import { jsxs as O, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import f from "../../node_modules/classnames/index.js";
|
|
3
|
-
import { getCommonProps as w, px as
|
|
3
|
+
import { getCommonProps as w, px as u } from "../../utils/index.js";
|
|
4
4
|
import V from "../Select/Select.js";
|
|
5
5
|
import h from "../../assets/chevronRight.svg.js";
|
|
6
6
|
import x from "../IconButton/IconButton.js";
|
|
7
7
|
import { ButtonVariants as b } from "../Button/types.js";
|
|
8
|
-
import { determineOptionValue as
|
|
8
|
+
import { determineOptionValue as i, findOptionFromSelectString as j } from "./utils.js";
|
|
9
9
|
import { usePendingState as k } from "../../utils/hooks.js";
|
|
10
10
|
const G = ({
|
|
11
11
|
className: P,
|
|
12
12
|
onChange: $,
|
|
13
13
|
variant: S = "inline",
|
|
14
14
|
options: n = [],
|
|
15
|
-
value:
|
|
15
|
+
value: p,
|
|
16
16
|
isDisabled: l,
|
|
17
17
|
previousLabel: v = "Previous",
|
|
18
18
|
nextLabel: C = "Next",
|
|
19
|
-
selectLabel:
|
|
19
|
+
selectLabel: g = "Select",
|
|
20
20
|
...s
|
|
21
21
|
}) => {
|
|
22
|
-
const N = "pagination", { className:
|
|
23
|
-
const a =
|
|
22
|
+
const N = "pagination", { className: o, ...I } = w(s, "Pagination"), { id: c } = s, { pendingState: _, setPendingState: y } = k(i(p)), m = _ || p, d = (t, e) => {
|
|
23
|
+
const a = i(t);
|
|
24
24
|
y(a), $(a, e);
|
|
25
25
|
};
|
|
26
26
|
return /* @__PURE__ */ O(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
29
|
-
className: f(`${
|
|
29
|
+
className: f(`${u}-${N}`, { [`${o}__wrapper`]: o }, P),
|
|
30
30
|
...I,
|
|
31
31
|
...s,
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ r(
|
|
34
34
|
x,
|
|
35
35
|
{
|
|
36
|
-
className: f(`${
|
|
36
|
+
className: f(`${o}__button`, `${u}-left-arrow`),
|
|
37
37
|
onClick: () => {
|
|
38
|
-
const t = n.findIndex((a) =>
|
|
38
|
+
const t = n.findIndex((a) => i(a) === m) - 1, e = n.at(t) || "";
|
|
39
39
|
d(e);
|
|
40
40
|
},
|
|
41
41
|
"data-testid": `${c}-previous-button`,
|
|
42
42
|
isDisabled: l,
|
|
43
43
|
"aria-label": v,
|
|
44
|
-
variant: b.
|
|
45
|
-
children: /* @__PURE__ */
|
|
44
|
+
variant: b.primary,
|
|
45
|
+
children: /* @__PURE__ */ r(h, {})
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ r(
|
|
49
49
|
V,
|
|
50
50
|
{
|
|
51
|
-
className: S === "inline" ? `${
|
|
52
|
-
"aria-label":
|
|
51
|
+
className: S === "inline" ? `${u}--inline-pagination` : void 0,
|
|
52
|
+
"aria-label": g,
|
|
53
53
|
value: m,
|
|
54
54
|
onChange: (t) => {
|
|
55
55
|
const e = j(n, t == null ? void 0 : t.currentTarget.value);
|
|
@@ -57,28 +57,28 @@ const G = ({
|
|
|
57
57
|
},
|
|
58
58
|
"data-testid": `${c}-select-button`,
|
|
59
59
|
hideLabel: !0,
|
|
60
|
-
labelText:
|
|
60
|
+
labelText: g,
|
|
61
61
|
disabled: l,
|
|
62
62
|
showIcon: !1,
|
|
63
63
|
children: n.map((t) => {
|
|
64
|
-
const e =
|
|
65
|
-
return /* @__PURE__ */
|
|
64
|
+
const e = i(t);
|
|
65
|
+
return /* @__PURE__ */ r("option", { value: e, children: typeof t == "string" || typeof t == "number" ? t : t.label }, e);
|
|
66
66
|
})
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ r(
|
|
70
70
|
x,
|
|
71
71
|
{
|
|
72
|
-
className: `${
|
|
72
|
+
className: `${o}__button`,
|
|
73
73
|
onClick: () => {
|
|
74
|
-
const t = (n.findIndex((a) =>
|
|
74
|
+
const t = (n.findIndex((a) => i(a) === m) + 1) % n.length, e = n[t];
|
|
75
75
|
d(e);
|
|
76
76
|
},
|
|
77
77
|
"data-testid": `${c}-next-button`,
|
|
78
78
|
isDisabled: l,
|
|
79
79
|
"aria-label": C,
|
|
80
|
-
variant: b.
|
|
81
|
-
children: /* @__PURE__ */
|
|
80
|
+
variant: b.primary,
|
|
81
|
+
children: /* @__PURE__ */ r(h, {})
|
|
82
82
|
}
|
|
83
83
|
)
|
|
84
84
|
]
|
|
@@ -4,68 +4,66 @@
|
|
|
4
4
|
align-items: center;
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: row;
|
|
7
|
-
gap: $spacing-
|
|
8
|
-
}
|
|
7
|
+
gap: $spacing-xsm;
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
&-icon-button {
|
|
9
|
+
&__button {
|
|
12
10
|
&:disabled {
|
|
13
11
|
border: unset;
|
|
14
12
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
|
|
14
|
+
&:hover:not(:disabled) {
|
|
15
|
+
background-color: inherit;
|
|
16
|
+
|
|
17
|
+
svg path {
|
|
18
|
+
fill: $pure-black;
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
}
|
|
22
|
+
}
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
appearance: none;
|
|
30
|
-
border: none;
|
|
31
|
-
font-variation-settings: 'wght' 600;
|
|
32
|
-
line-height: 1.75rem;
|
|
33
|
-
margin-bottom: 0;
|
|
34
|
-
outline: none;
|
|
35
|
-
padding: 0 $spacing-xsm;
|
|
36
|
-
text-align: center;
|
|
37
|
-
text-align-last: center;
|
|
38
|
-
text-decoration: underline;
|
|
39
|
-
text-underline-offset: 6px;
|
|
24
|
+
.#{$px}--inline-pagination__wrapper {
|
|
25
|
+
select {
|
|
26
|
+
@include pText($body-size2);
|
|
40
27
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
28
|
+
appearance: none;
|
|
29
|
+
border: none;
|
|
30
|
+
font-variation-settings: 'wght' 600;
|
|
31
|
+
line-height: 1.75rem;
|
|
32
|
+
margin-bottom: 0;
|
|
33
|
+
outline: none;
|
|
34
|
+
padding: 0 $spacing-xsm;
|
|
35
|
+
text-align: center;
|
|
36
|
+
text-align-last: center;
|
|
37
|
+
text-decoration: underline;
|
|
38
|
+
text-underline-offset: 6px;
|
|
45
39
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
max-width: 5rem;
|
|
51
|
-
padding: 0.5rem;
|
|
52
|
-
text-decoration: none;
|
|
53
|
-
}
|
|
40
|
+
@include isHeaderDesktop {
|
|
41
|
+
line-height: 2.5rem;
|
|
42
|
+
text-underline-offset: 10px;
|
|
43
|
+
}
|
|
54
44
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
45
|
+
&:disabled {
|
|
46
|
+
border: 1px solid $medium-gray;
|
|
47
|
+
margin: auto;
|
|
48
|
+
max-height: 3.5rem;
|
|
49
|
+
max-width: 5rem;
|
|
50
|
+
padding: 0.5rem;
|
|
51
|
+
text-decoration: none;
|
|
52
|
+
}
|
|
58
53
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
54
|
+
&:hover {
|
|
55
|
+
cursor: pointer;
|
|
62
56
|
}
|
|
63
57
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
display: none;
|
|
58
|
+
&:focus-visible {
|
|
59
|
+
outline: 1px solid $medium-gray;
|
|
67
60
|
}
|
|
68
61
|
}
|
|
62
|
+
|
|
63
|
+
select::-ms-expand {
|
|
64
|
+
border: none;
|
|
65
|
+
display: none;
|
|
66
|
+
}
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
.#{$px}-left-arrow {
|