@phillips/seldon 1.204.0 → 1.204.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.
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
import { jsxs as p, jsx as r, Fragment as
|
|
1
|
+
import { jsxs as p, jsx as r, Fragment as w } from "react/jsx-runtime";
|
|
2
2
|
import e from "../../node_modules/classnames/index.js";
|
|
3
|
-
import
|
|
3
|
+
import C from "react";
|
|
4
4
|
import n from "../../components/Button/Button.js";
|
|
5
|
-
import { ButtonVariants as
|
|
6
|
-
import
|
|
7
|
-
import D from "../../components/Filter/FilterInput.js";
|
|
5
|
+
import { ButtonVariants as l } from "../../components/Button/types.js";
|
|
6
|
+
import g from "../../components/Filter/FilterInput.js";
|
|
8
7
|
import m from "../../components/Text/Text.js";
|
|
9
8
|
import { TextVariants as c } from "../../components/Text/types.js";
|
|
10
|
-
import { px as
|
|
11
|
-
import {
|
|
12
|
-
const
|
|
9
|
+
import { px as v } from "../../utils/index.js";
|
|
10
|
+
import { getFilterDimensions as D, handleInputChange as F } from "./utils.js";
|
|
11
|
+
const B = C.forwardRef(
|
|
13
12
|
({
|
|
14
13
|
className: f,
|
|
15
14
|
buttonType: i,
|
|
16
15
|
filters: _,
|
|
17
16
|
filterIndex: h,
|
|
18
17
|
onSelectFilter: b,
|
|
19
|
-
onClickClear:
|
|
18
|
+
onClickClear: $,
|
|
20
19
|
onApplyFilter: d,
|
|
21
|
-
resultsCount:
|
|
20
|
+
resultsCount: x,
|
|
22
21
|
ariaLabels: N,
|
|
23
|
-
filterButtonLabel: x,
|
|
24
|
-
filterButtonLabelTranslated: g,
|
|
25
22
|
dropdownMenuTranslation: o
|
|
26
23
|
}, k) => {
|
|
27
|
-
const
|
|
24
|
+
const s = i === "Sort", t = `${v}-filter-dropdown-menu`;
|
|
28
25
|
return /* @__PURE__ */ p(
|
|
29
26
|
"div",
|
|
30
27
|
{
|
|
@@ -33,41 +30,34 @@ const I = F.forwardRef(
|
|
|
33
30
|
"data-testid": "filter-dropdown-desktop",
|
|
34
31
|
"aria-label": N || `${i} dropdown desktop`,
|
|
35
32
|
children: [
|
|
36
|
-
/* @__PURE__ */ r(
|
|
37
|
-
|
|
38
|
-
{
|
|
39
|
-
heading: S(x, null, g || null),
|
|
40
|
-
className: e(`${t}__header`)
|
|
41
|
-
}
|
|
42
|
-
),
|
|
43
|
-
/* @__PURE__ */ r("div", { className: e(`${t}__filters`), children: j(_, h).map((a) => /* @__PURE__ */ r(
|
|
44
|
-
D,
|
|
33
|
+
/* @__PURE__ */ r("div", { className: e(`${t}__filters`), children: D(_, h).map((a) => /* @__PURE__ */ r(
|
|
34
|
+
g,
|
|
45
35
|
{
|
|
46
36
|
id: a.label,
|
|
47
37
|
labelText: a.label,
|
|
48
38
|
name: a.label,
|
|
49
|
-
type:
|
|
39
|
+
type: s ? "radio" : "checkbox",
|
|
50
40
|
checked: a.active,
|
|
51
41
|
disabled: a?.disabled,
|
|
52
|
-
onChange: (
|
|
42
|
+
onChange: (u) => F(u, i ?? "", b)
|
|
53
43
|
},
|
|
54
44
|
a.label
|
|
55
45
|
)) }),
|
|
56
|
-
/* @__PURE__ */ r("div", { className: e(
|
|
46
|
+
/* @__PURE__ */ r("div", { className: e(s ? `${t}__button-wrap` : `${t}__buttons-wrap`), children: s ? /* @__PURE__ */ r(
|
|
57
47
|
n,
|
|
58
48
|
{
|
|
59
49
|
className: e(`${t}__button`),
|
|
60
|
-
variant:
|
|
50
|
+
variant: l.primary,
|
|
61
51
|
onClick: () => d?.(!1),
|
|
62
52
|
children: /* @__PURE__ */ r(m, { variant: c.string2, className: `${t}__button-text`, children: o?.confirm || "Confirm" })
|
|
63
53
|
}
|
|
64
|
-
) : /* @__PURE__ */ p(
|
|
54
|
+
) : /* @__PURE__ */ p(w, { children: [
|
|
65
55
|
/* @__PURE__ */ r(
|
|
66
56
|
n,
|
|
67
57
|
{
|
|
68
58
|
className: e(`${t}__buttons`),
|
|
69
|
-
variant:
|
|
70
|
-
onClick: () =>
|
|
59
|
+
variant: l.secondary,
|
|
60
|
+
onClick: () => $?.(i ?? ""),
|
|
71
61
|
children: /* @__PURE__ */ r(m, { variant: c.string2, children: o?.clearAll || "Clear all" })
|
|
72
62
|
}
|
|
73
63
|
),
|
|
@@ -75,9 +65,9 @@ const I = F.forwardRef(
|
|
|
75
65
|
n,
|
|
76
66
|
{
|
|
77
67
|
className: e(`${t}__buttons`),
|
|
78
|
-
variant:
|
|
68
|
+
variant: l.primary,
|
|
79
69
|
onClick: () => d?.(!1),
|
|
80
|
-
children: /* @__PURE__ */ r(m, { variant: c.string2, className: `${t}__button-text`, children: o?.showAuctions || `Show ${
|
|
70
|
+
children: /* @__PURE__ */ r(m, { variant: c.string2, className: `${t}__button-text`, children: o?.showAuctions || `Show ${x} Auctions` })
|
|
81
71
|
}
|
|
82
72
|
)
|
|
83
73
|
] }) })
|
|
@@ -86,7 +76,7 @@ const I = F.forwardRef(
|
|
|
86
76
|
);
|
|
87
77
|
}
|
|
88
78
|
);
|
|
89
|
-
|
|
79
|
+
B.displayName = "FilterDropdownMenuDesktop";
|
|
90
80
|
export {
|
|
91
|
-
|
|
81
|
+
B as FilterDropdownMenuDesktop
|
|
92
82
|
};
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
gap: $spacing-xsm;
|
|
16
|
-
|
|
16
|
+
max-height: 25vh;
|
|
17
|
+
overflow-y: auto;
|
|
17
18
|
|
|
18
19
|
&--mobile {
|
|
19
20
|
padding: 0 $spacing-md $spacing-md;
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
display: flex;
|
|
30
31
|
gap: $spacing-sm;
|
|
31
32
|
justify-content: space-between;
|
|
33
|
+
margin-top: $spacing-sm;
|
|
32
34
|
|
|
33
35
|
&--drawer {
|
|
34
36
|
box-shadow: 0 -4px 8px -4px $medium-gray;
|