@phillips/seldon 1.270.0 → 1.272.0
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/_virtual/index10.cjs +1 -1
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index7.cjs +1 -1
- package/dist/_virtual/index7.js +3 -2
- package/dist/_virtual/index8.cjs +1 -1
- package/dist/_virtual/index8.js +2 -3
- package/dist/_virtual/index9.cjs +1 -1
- package/dist/_virtual/index9.js +2 -2
- package/dist/assets/formatted/Card.cjs +1 -0
- package/dist/assets/formatted/Card.d.ts +9 -0
- package/dist/assets/formatted/Card.js +50 -0
- package/dist/assets/formatted/index.cjs +1 -1
- package/dist/assets/formatted/index.d.ts +1 -0
- package/dist/assets/formatted/index.js +124 -122
- package/dist/components/AddToCalendar/calendarLinks.cjs +1 -1
- package/dist/components/AddToCalendar/calendarLinks.js +1 -1
- package/dist/components/ComboBox/ComboBox.cjs +1 -1
- package/dist/components/ComboBox/ComboBox.js +1 -0
- package/dist/node_modules/ics/dist/index.cjs +1 -1
- package/dist/node_modules/ics/dist/index.js +1 -1
- package/dist/node_modules/prop-types/index.cjs +1 -1
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.cjs +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/patterns/FiltersInline/FilterButton.cjs +1 -1
- package/dist/patterns/FiltersInline/FilterButton.js +14 -13
- package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.cjs +1 -1
- package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.js +47 -53
- package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.cjs +1 -1
- package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.js +51 -65
- package/dist/patterns/FiltersInline/MainFilterDropdown.cjs +1 -1
- package/dist/patterns/FiltersInline/MainFilterDropdown.js +56 -55
- package/dist/patterns/FiltersInline/SubFilterDropdown.cjs +1 -1
- package/dist/patterns/FiltersInline/SubFilterDropdown.js +76 -76
- package/dist/patterns/FiltersInline/utils.cjs +1 -1
- package/dist/patterns/FiltersInline/utils.d.ts +4 -0
- package/dist/patterns/FiltersInline/utils.js +25 -20
- package/dist/scss/patterns/FiltersInline/_filterDropdownMenu.scss +86 -27
- package/dist/scss/patterns/FiltersInline/_filtersInline.scss +22 -0
- package/package.json +1 -1
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
import { jsxs as u, jsx as
|
|
1
|
+
import { jsxs as u, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import $ from "../../_virtual/index.js";
|
|
3
3
|
import h from "react";
|
|
4
4
|
import x from "../../components/Button/Button.js";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
5
|
+
import { ButtonSizes as _, ButtonVariants as v } from "../../components/Button/types.js";
|
|
6
|
+
import B from "../../components/Icon/Icon.js";
|
|
7
7
|
import { TextVariants as l } from "../../components/Text/types.js";
|
|
8
8
|
import m from "../../components/Text/Text.js";
|
|
9
9
|
import { px as t } from "../../utils/index.js";
|
|
10
10
|
import { getIcon as F } from "./utils.js";
|
|
11
11
|
const N = h.forwardRef(
|
|
12
|
-
({ className: n, label: s, onClick: f, isSelected:
|
|
12
|
+
({ className: n, label: s, onClick: f, isSelected: o, type: r = "ChevronDown", count: c, id: e, ariaLabel: d, isMobile: b, totalCount: a }, p) => /* @__PURE__ */ u(
|
|
13
13
|
x,
|
|
14
14
|
{
|
|
15
15
|
ref: p,
|
|
16
16
|
className: $(`${t}-filter-button`, n, {
|
|
17
|
-
[`${t}-filter-button--selected`]:
|
|
17
|
+
[`${t}-filter-button--selected`]: o || c > 0 || r === "Filter" && a > 0,
|
|
18
18
|
[`${t}-filter-button--filter`]: r === "Filter"
|
|
19
19
|
}),
|
|
20
20
|
"aria-label": d,
|
|
21
|
-
variant:
|
|
22
|
-
|
|
21
|
+
variant: v.secondary,
|
|
22
|
+
size: _.small,
|
|
23
|
+
"data-testid": `${e}-filter-button`,
|
|
23
24
|
"data-viewport": b ? "mobile" : "desktop",
|
|
24
25
|
onClick: f,
|
|
25
26
|
children: [
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ i(
|
|
27
28
|
m,
|
|
28
29
|
{
|
|
29
30
|
className: `${t}-filter-button__label`,
|
|
30
31
|
variant: l.labelSmall,
|
|
31
|
-
"data-testid": `${
|
|
32
|
+
"data-testid": `${e}-filter-label`,
|
|
32
33
|
children: s
|
|
33
34
|
}
|
|
34
35
|
),
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
36
|
+
/* @__PURE__ */ i(B, { icon: F(r, o), height: 8, width: 8, className: `${t}__icon` }),
|
|
37
|
+
a > 0 && r === "Filter" && /* @__PURE__ */ i(
|
|
37
38
|
m,
|
|
38
39
|
{
|
|
39
40
|
variant: l.labelSmall,
|
|
40
41
|
className: `${t}-filter-button--count`,
|
|
41
|
-
"data-testid": `${
|
|
42
|
-
children:
|
|
42
|
+
"data-testid": `${e}-filter-count`,
|
|
43
|
+
children: a
|
|
43
44
|
}
|
|
44
45
|
)
|
|
45
46
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("../../_virtual/index.cjs"),w=require("react"),o=require("../../components/Button/Button.cjs"),i=require("../../components/Button/types.cjs"),q=require("../../components/Filter/FilterInput.cjs"),B=require("../../utils/index.cjs"),c=require("./utils.cjs"),h=w.forwardRef(({className:f,buttonType:a,filters:d,filterIndex:u,onSelectFilter:p,onClickClear:x,onApplyFilter:m,resultsCount:b,ariaLabels:j,dropdownMenuTranslation:r},_)=>{const l=a==="Sort",t=`${B.px}-filter-dropdown-menu`,k=c.getFilterDimensions(d,u),D=c.hasActiveDimensions(d,a,u);return e.jsxs("div",{className:n.default(t,f),ref:_,"data-testid":"filter-dropdown-desktop","aria-label":j||`${a} dropdown desktop`,children:[e.jsx("div",{className:n.default(`${t}__filters`),children:k.map(s=>e.jsx(q.default,{id:s.label,labelText:s.label,name:s.label,type:l?"radio":"checkbox",checked:s.active,disabled:s?.disabled,onChange:$=>c.handleInputChange($,a??"",p)},s.label))}),e.jsx("div",{className:n.default(l?`${t}__button-wrap`:`${t}__buttons-wrap`),children:l?e.jsx(o.default,{className:n.default(`${t}__button`),variant:i.ButtonVariants.primary,size:i.ButtonSizes.small,onClick:()=>m?.(!1),children:e.jsx("span",{className:`${t}__button-text`,children:r?.confirm||"Confirm"})}):e.jsxs(e.Fragment,{children:[e.jsx(o.default,{variant:i.ButtonVariants.secondary,size:i.ButtonSizes.small,isDisabled:!D,onClick:()=>x?.(a??""),children:r?.clearAll||"Clear all"}),e.jsx(o.default,{variant:i.ButtonVariants.primary,size:i.ButtonSizes.small,onClick:()=>m?.(!1),children:e.jsx("span",{className:`${t}__button-text`,children:r?.showAuctions||`Show ${b} Auctions`})})]})})]})});h.displayName="FilterDropdownMenuDesktop";exports.FilterDropdownMenuDesktop=h;
|
|
@@ -1,80 +1,74 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as h, jsx as e, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import t from "../../_virtual/index.js";
|
|
3
|
+
import x from "react";
|
|
4
4
|
import l from "../../components/Button/Button.js";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { px as
|
|
8
|
-
import { getFilterDimensions as
|
|
9
|
-
const
|
|
5
|
+
import { ButtonSizes as n, ButtonVariants as m } from "../../components/Button/types.js";
|
|
6
|
+
import F from "../../components/Filter/FilterInput.js";
|
|
7
|
+
import { px as g } from "../../utils/index.js";
|
|
8
|
+
import { getFilterDimensions as v, hasActiveDimensions as z, handleInputChange as A } from "./utils.js";
|
|
9
|
+
const B = x.forwardRef(
|
|
10
10
|
({
|
|
11
|
-
className:
|
|
12
|
-
buttonType:
|
|
13
|
-
filters:
|
|
14
|
-
filterIndex:
|
|
11
|
+
className: f,
|
|
12
|
+
buttonType: a,
|
|
13
|
+
filters: c,
|
|
14
|
+
filterIndex: d,
|
|
15
15
|
onSelectFilter: _,
|
|
16
|
-
onClickClear:
|
|
17
|
-
onApplyFilter:
|
|
18
|
-
resultsCount:
|
|
16
|
+
onClickClear: b,
|
|
17
|
+
onApplyFilter: p,
|
|
18
|
+
resultsCount: k,
|
|
19
19
|
ariaLabels: $,
|
|
20
|
-
dropdownMenuTranslation:
|
|
21
|
-
},
|
|
22
|
-
const
|
|
23
|
-
return /* @__PURE__ */
|
|
20
|
+
dropdownMenuTranslation: r
|
|
21
|
+
}, w) => {
|
|
22
|
+
const o = a === "Sort", s = `${g}-filter-dropdown-menu`, C = v(c, d), D = z(c, a, d);
|
|
23
|
+
return /* @__PURE__ */ h(
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
|
-
className:
|
|
27
|
-
ref:
|
|
26
|
+
className: t(s, f),
|
|
27
|
+
ref: w,
|
|
28
28
|
"data-testid": "filter-dropdown-desktop",
|
|
29
|
-
"aria-label": $ || `${
|
|
29
|
+
"aria-label": $ || `${a} dropdown desktop`,
|
|
30
30
|
children: [
|
|
31
|
-
/* @__PURE__ */ e("div", { className:
|
|
32
|
-
|
|
31
|
+
/* @__PURE__ */ e("div", { className: t(`${s}__filters`), children: C.map((i) => /* @__PURE__ */ e(
|
|
32
|
+
F,
|
|
33
33
|
{
|
|
34
|
-
id:
|
|
35
|
-
labelText:
|
|
36
|
-
name:
|
|
37
|
-
type:
|
|
38
|
-
checked:
|
|
39
|
-
disabled:
|
|
40
|
-
onChange: (
|
|
34
|
+
id: i.label,
|
|
35
|
+
labelText: i.label,
|
|
36
|
+
name: i.label,
|
|
37
|
+
type: o ? "radio" : "checkbox",
|
|
38
|
+
checked: i.active,
|
|
39
|
+
disabled: i?.disabled,
|
|
40
|
+
onChange: (N) => A(N, a ?? "", _)
|
|
41
41
|
},
|
|
42
|
-
|
|
42
|
+
i.label
|
|
43
43
|
)) }),
|
|
44
|
-
/* @__PURE__ */ e("div", { className:
|
|
44
|
+
/* @__PURE__ */ e("div", { className: t(o ? `${s}__button-wrap` : `${s}__buttons-wrap`), children: o ? /* @__PURE__ */ e(
|
|
45
45
|
l,
|
|
46
46
|
{
|
|
47
|
-
className:
|
|
48
|
-
variant:
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
className: t(`${s}__button`),
|
|
48
|
+
variant: m.primary,
|
|
49
|
+
size: n.small,
|
|
50
|
+
onClick: () => p?.(!1),
|
|
51
|
+
children: /* @__PURE__ */ e("span", { className: `${s}__button-text`, children: r?.confirm || "Confirm" })
|
|
51
52
|
}
|
|
52
|
-
) : /* @__PURE__ */
|
|
53
|
+
) : /* @__PURE__ */ h(u, { children: [
|
|
53
54
|
/* @__PURE__ */ e(
|
|
54
55
|
l,
|
|
55
56
|
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
variant: m.secondary,
|
|
58
|
+
size: n.small,
|
|
59
|
+
isDisabled: !D,
|
|
60
|
+
onClick: () => b?.(a ?? ""),
|
|
61
|
+
children: r?.clearAll || "Clear all"
|
|
60
62
|
}
|
|
61
63
|
),
|
|
62
|
-
/* @__PURE__ */ e(
|
|
63
|
-
l,
|
|
64
|
-
{
|
|
65
|
-
className: r(`${t}__buttons`),
|
|
66
|
-
variant: n.primary,
|
|
67
|
-
onClick: () => m?.(!1),
|
|
68
|
-
children: /* @__PURE__ */ e("span", { className: `${t}__button-text`, children: s?.showAuctions || `Show ${b} Auctions` })
|
|
69
|
-
}
|
|
70
|
-
)
|
|
64
|
+
/* @__PURE__ */ e(l, { variant: m.primary, size: n.small, onClick: () => p?.(!1), children: /* @__PURE__ */ e("span", { className: `${s}__button-text`, children: r?.showAuctions || `Show ${k} Auctions` }) })
|
|
71
65
|
] }) })
|
|
72
66
|
]
|
|
73
67
|
}
|
|
74
68
|
);
|
|
75
69
|
}
|
|
76
70
|
);
|
|
77
|
-
|
|
71
|
+
B.displayName = "FilterDropdownMenuDesktop";
|
|
78
72
|
export {
|
|
79
|
-
|
|
73
|
+
B as FilterDropdownMenuDesktop
|
|
80
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../../_virtual/index.cjs"),B=require("react"),o=require("../../components/Button/Button.cjs"),a=require("../../components/Button/types.cjs"),C=require("../../components/Filter/FilterInput.cjs"),d=require("../../components/Text/Text.cjs"),c=require("../../components/Text/types.cjs"),N=require("../../utils/index.cjs"),u=require("./utils.cjs"),f=B.forwardRef(({className:h,buttonType:s,filters:m,filterIndex:b,onApplyFilter:x,onClickClear:_,onSelectFilter:$,resultsCount:j,ariaLabels:p,dropdownMenuTranslation:r},q)=>{const n=s==="Sort",t=`${N.px}-filter-dropdown-menu`,w=u.getFilterDimensions(m,b),S=u.hasActiveDimensions(m,s,b);return e.jsxs("div",{className:l.default(`${t}`,h,`${t}--mobile`),ref:q,"data-testid":"filter-dropdown-mobile","aria-label":p||`${s} dropdown mobile`,children:[e.jsx("div",{className:l.default(`${t}__filters`,`${t}__filters--mobile`),children:w.map(i=>e.jsx(C.default,{id:i.label,labelText:i.label,name:i.label,type:n?"radio":"checkbox",checked:i.active,disabled:i?.disabled,onChange:v=>u.handleInputChange(v,s??"",$)},i.label))}),e.jsx("div",{className:l.default(n?`${t}__button-wrap`:`${t}__buttons-wrap`,`${t}__mobile-wrap`),children:n?e.jsx(o.default,{className:l.default(`${t}__button`,`${t}__button--mobile`),variant:a.ButtonVariants.primary,size:a.ButtonSizes.small,onClick:()=>x?.(!1),children:e.jsx(d.default,{variant:c.TextVariants.headingMedium,className:`${t}__button-text`,children:r?.confirm||"Confirm"})}):e.jsxs(e.Fragment,{children:[e.jsx(o.default,{variant:a.ButtonVariants.secondary,size:a.ButtonSizes.small,isDisabled:!S,onClick:()=>_?.(s??""),children:e.jsx(d.default,{variant:c.TextVariants.bodySmall,children:r?.clearAll||"Clear all"})}),e.jsx(o.default,{variant:a.ButtonVariants.primary,size:a.ButtonSizes.small,onClick:()=>x?.(!1),children:e.jsx(d.default,{variant:c.TextVariants.bodySmall,className:`${t}__button-text`,children:r?.showAuctions||`Show ${j} Auctions`})})]})})]})});f.displayName="FilterDropdownMenuMobile";exports.FilterDropdownMenuMobile=f;
|
|
@@ -1,90 +1,76 @@
|
|
|
1
|
-
import { jsxs as _, jsx as e, Fragment as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as _, jsx as e, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import t from "../../_virtual/index.js";
|
|
3
3
|
import g from "react";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import s from "../../components/Button/Button.js";
|
|
5
|
+
import { ButtonSizes as m, ButtonVariants as n } from "../../components/Button/types.js";
|
|
6
6
|
import k from "../../components/Filter/FilterInput.js";
|
|
7
|
-
import
|
|
8
|
-
import { TextVariants as
|
|
9
|
-
import { px as
|
|
10
|
-
import { getFilterDimensions as
|
|
11
|
-
const
|
|
7
|
+
import c from "../../components/Text/Text.js";
|
|
8
|
+
import { TextVariants as d } from "../../components/Text/types.js";
|
|
9
|
+
import { px as F } from "../../utils/index.js";
|
|
10
|
+
import { getFilterDimensions as z, hasActiveDimensions as A, handleInputChange as B } from "./utils.js";
|
|
11
|
+
const M = g.forwardRef(
|
|
12
12
|
({
|
|
13
|
-
className:
|
|
14
|
-
buttonType:
|
|
15
|
-
filters:
|
|
16
|
-
filterIndex:
|
|
17
|
-
onApplyFilter:
|
|
13
|
+
className: p,
|
|
14
|
+
buttonType: r,
|
|
15
|
+
filters: b,
|
|
16
|
+
filterIndex: f,
|
|
17
|
+
onApplyFilter: h,
|
|
18
18
|
onClickClear: $,
|
|
19
|
-
onSelectFilter:
|
|
20
|
-
resultsCount:
|
|
19
|
+
onSelectFilter: u,
|
|
20
|
+
resultsCount: w,
|
|
21
21
|
ariaLabels: x,
|
|
22
|
-
dropdownMenuTranslation:
|
|
23
|
-
},
|
|
24
|
-
const
|
|
22
|
+
dropdownMenuTranslation: l
|
|
23
|
+
}, C) => {
|
|
24
|
+
const o = r === "Sort", i = `${F}-filter-dropdown-menu`, N = z(b, f), v = A(b, r, f);
|
|
25
25
|
return /* @__PURE__ */ _(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
|
-
className:
|
|
29
|
-
ref:
|
|
28
|
+
className: t(`${i}`, p, `${i}--mobile`),
|
|
29
|
+
ref: C,
|
|
30
30
|
"data-testid": "filter-dropdown-mobile",
|
|
31
|
-
"aria-label": x || `${
|
|
31
|
+
"aria-label": x || `${r} dropdown mobile`,
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */ e("div", { className:
|
|
33
|
+
/* @__PURE__ */ e("div", { className: t(`${i}__filters`, `${i}__filters--mobile`), children: N.map((a) => /* @__PURE__ */ e(
|
|
34
34
|
k,
|
|
35
35
|
{
|
|
36
|
-
id:
|
|
37
|
-
labelText:
|
|
38
|
-
name:
|
|
39
|
-
type:
|
|
40
|
-
checked:
|
|
41
|
-
disabled:
|
|
42
|
-
onChange: (
|
|
36
|
+
id: a.label,
|
|
37
|
+
labelText: a.label,
|
|
38
|
+
name: a.label,
|
|
39
|
+
type: o ? "radio" : "checkbox",
|
|
40
|
+
checked: a.active,
|
|
41
|
+
disabled: a?.disabled,
|
|
42
|
+
onChange: (D) => B(D, r ?? "", u)
|
|
43
43
|
},
|
|
44
|
-
|
|
44
|
+
a.label
|
|
45
45
|
)) }),
|
|
46
46
|
/* @__PURE__ */ e(
|
|
47
47
|
"div",
|
|
48
48
|
{
|
|
49
|
-
className:
|
|
50
|
-
|
|
51
|
-
`${
|
|
49
|
+
className: t(
|
|
50
|
+
o ? `${i}__button-wrap` : `${i}__buttons-wrap`,
|
|
51
|
+
`${i}__mobile-wrap`
|
|
52
52
|
),
|
|
53
|
-
children:
|
|
54
|
-
|
|
53
|
+
children: o ? /* @__PURE__ */ e(
|
|
54
|
+
s,
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
57
|
-
variant:
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
className: t(`${i}__button`, `${i}__button--mobile`),
|
|
57
|
+
variant: n.primary,
|
|
58
|
+
size: m.small,
|
|
59
|
+
onClick: () => h?.(!1),
|
|
60
|
+
children: /* @__PURE__ */ e(c, { variant: d.headingMedium, className: `${i}__button-text`, children: l?.confirm || "Confirm" })
|
|
60
61
|
}
|
|
61
|
-
) : /* @__PURE__ */ _(
|
|
62
|
+
) : /* @__PURE__ */ _(S, { children: [
|
|
62
63
|
/* @__PURE__ */ e(
|
|
63
|
-
|
|
64
|
+
s,
|
|
64
65
|
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
)
|
|
70
|
-
variant: m.secondary,
|
|
71
|
-
onClick: () => $?.(o ?? ""),
|
|
72
|
-
children: /* @__PURE__ */ e(s, { variant: c.bodySmall, children: a?.clearAll || "Clear all" })
|
|
66
|
+
variant: n.secondary,
|
|
67
|
+
size: m.small,
|
|
68
|
+
isDisabled: !v,
|
|
69
|
+
onClick: () => $?.(r ?? ""),
|
|
70
|
+
children: /* @__PURE__ */ e(c, { variant: d.bodySmall, children: l?.clearAll || "Clear all" })
|
|
73
71
|
}
|
|
74
72
|
),
|
|
75
|
-
/* @__PURE__ */ e(
|
|
76
|
-
n,
|
|
77
|
-
{
|
|
78
|
-
className: r(
|
|
79
|
-
`${t}__buttons`,
|
|
80
|
-
`${t}__buttons--mobile`,
|
|
81
|
-
`${t}__buttons--right`
|
|
82
|
-
),
|
|
83
|
-
variant: m.primary,
|
|
84
|
-
onClick: () => d?.(!1),
|
|
85
|
-
children: /* @__PURE__ */ e(s, { variant: c.bodySmall, className: `${t}__button-text`, children: a?.showAuctions || `Show ${u} Auctions` })
|
|
86
|
-
}
|
|
87
|
-
)
|
|
73
|
+
/* @__PURE__ */ e(s, { variant: n.primary, size: m.small, onClick: () => h?.(!1), children: /* @__PURE__ */ e(c, { variant: d.bodySmall, className: `${i}__button-text`, children: l?.showAuctions || `Show ${w} Auctions` }) })
|
|
88
74
|
] })
|
|
89
75
|
}
|
|
90
76
|
)
|
|
@@ -93,7 +79,7 @@ const y = g.forwardRef(
|
|
|
93
79
|
);
|
|
94
80
|
}
|
|
95
81
|
);
|
|
96
|
-
|
|
82
|
+
M.displayName = "FilterDropdownMenuMobile";
|
|
97
83
|
export {
|
|
98
|
-
|
|
84
|
+
M as FilterDropdownMenuMobile
|
|
99
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("../../_virtual/index.cjs"),B=require("react"),m=require("../../components/Button/Button.cjs"),s=require("../../components/Button/types.cjs"),A=require("../../components/Drawer/Drawer.cjs"),D=require("../../components/Filter/Filter.cjs"),S=require("../../components/Filter/FilterHeader.cjs"),M=require("../../components/Filter/FilterInput.cjs"),n=require("../../utils/index.cjs"),k=require("../FilterMenu/FilterMenu.cjs"),z=require("./FilterButton.cjs"),N=require("./types.cjs"),a=require("./utils.cjs"),x=B.forwardRef(({className:w,filterButtonLabel:l,handleClick:o,filtersListState:i,filters:d,onSelectFilter:F,onApplyFilter:q,onClickClear:f,resultsCount:j,dropdownMenuTranslation:c,ariaLabels:u={},id:y},h)=>{const p=i?.[0]??!1,{totalCount:b,filterCount:C}=a.countActiveFilters(d,l);return e.jsxs(e.Fragment,{children:[e.jsx(z.FilterButton,{ref:h,className:w,isSelected:p,count:C,label:l,totalCount:b,id:y,ariaLabel:u.button||`${l} button`,onClick:a.getFilterButtonClickHandler(i,o,0),isMobile:!1,type:N.FilterButtonIconType.Filter}),e.jsxs(A.default,{isOpen:p,drawerOpenSide:"left",onClose:()=>a.resetAllFilters(i,o),className:`${n.px}-filter-drawer`,"aria-label":u.drawer||"Filter drawer",paddingLevel:0,children:[e.jsx(k.default,{className:`${n.px}-filter-drawer-menu`,children:d?.map(t=>e.jsxs(D.default,{name:t.label,children:[e.jsx(S.default,{heading:t.label}),Array.from(t.filterDimensions).map(r=>e.jsx(M.default,{id:r.label,labelText:r.label,onChange:$=>F?.($,t.buttonType),type:t.type,disabled:r?.disabled,name:r.label,checked:r.active},r.label))]},t.id))}),e.jsxs("div",{className:g.default(`${n.px}-filter-dropdown-menu__buttons-wrap`,`${n.px}-filter-dropdown-menu__buttons-wrap--drawer`),children:[e.jsx(m.default,{variant:s.ButtonVariants.secondary,size:s.ButtonSizes.small,isDisabled:b===0,onClick:()=>f?.("all"),children:c?.clearAll||"Clear all"}),e.jsx(m.default,{size:s.ButtonSizes.small,onClick:()=>q?.(!1),children:c?.showAuctions||`Show ${j} Auctions`})]})]})]})});x.displayName="MainFilterDropdown";exports.MainFilterDropdown=x;
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { ButtonVariants as
|
|
1
|
+
import { jsxs as t, Fragment as g, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import x from "../../_virtual/index.js";
|
|
3
|
+
import B from "react";
|
|
4
|
+
import f from "../../components/Button/Button.js";
|
|
5
|
+
import { ButtonSizes as u, ButtonVariants as D } from "../../components/Button/types.js";
|
|
6
6
|
import k from "../../components/Drawer/Drawer.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import N from "../../components/Filter/Filter.js";
|
|
8
|
+
import z from "../../components/Filter/FilterHeader.js";
|
|
9
9
|
import M from "../../components/Filter/FilterInput.js";
|
|
10
|
-
import { px as
|
|
11
|
-
import
|
|
12
|
-
import { FilterButton as
|
|
13
|
-
import { FilterButtonIconType as
|
|
14
|
-
import { countActiveFilters as
|
|
15
|
-
const T =
|
|
10
|
+
import { px as l } from "../../utils/index.js";
|
|
11
|
+
import S from "../FilterMenu/FilterMenu.js";
|
|
12
|
+
import { FilterButton as j } from "./FilterButton.js";
|
|
13
|
+
import { FilterButtonIconType as H } from "./types.js";
|
|
14
|
+
import { countActiveFilters as I, getFilterButtonClickHandler as O, resetAllFilters as R } from "./utils.js";
|
|
15
|
+
const T = B.forwardRef(
|
|
16
16
|
({
|
|
17
|
-
className:
|
|
18
|
-
filterButtonLabel:
|
|
17
|
+
className: b,
|
|
18
|
+
filterButtonLabel: i,
|
|
19
19
|
handleClick: a,
|
|
20
|
-
filtersListState:
|
|
20
|
+
filtersListState: n,
|
|
21
21
|
filters: m,
|
|
22
|
-
onSelectFilter:
|
|
23
|
-
onApplyFilter:
|
|
24
|
-
onClickClear:
|
|
25
|
-
resultsCount:
|
|
26
|
-
dropdownMenuTranslation:
|
|
27
|
-
ariaLabels:
|
|
28
|
-
id:
|
|
29
|
-
},
|
|
30
|
-
const
|
|
31
|
-
return /* @__PURE__ */
|
|
22
|
+
onSelectFilter: w,
|
|
23
|
+
onApplyFilter: F,
|
|
24
|
+
onClickClear: h,
|
|
25
|
+
resultsCount: y,
|
|
26
|
+
dropdownMenuTranslation: s,
|
|
27
|
+
ariaLabels: d = {},
|
|
28
|
+
id: C
|
|
29
|
+
}, A) => {
|
|
30
|
+
const p = n?.[0] ?? !1, { totalCount: c, filterCount: _ } = I(m, i);
|
|
31
|
+
return /* @__PURE__ */ t(g, { children: [
|
|
32
32
|
/* @__PURE__ */ o(
|
|
33
|
-
|
|
33
|
+
j,
|
|
34
34
|
{
|
|
35
|
-
ref:
|
|
36
|
-
className:
|
|
37
|
-
isSelected:
|
|
38
|
-
count:
|
|
39
|
-
label:
|
|
40
|
-
totalCount:
|
|
41
|
-
id:
|
|
42
|
-
ariaLabel:
|
|
43
|
-
onClick:
|
|
35
|
+
ref: A,
|
|
36
|
+
className: b,
|
|
37
|
+
isSelected: p,
|
|
38
|
+
count: _,
|
|
39
|
+
label: i,
|
|
40
|
+
totalCount: c,
|
|
41
|
+
id: C,
|
|
42
|
+
ariaLabel: d.button || `${i} button`,
|
|
43
|
+
onClick: O(n, a, 0),
|
|
44
44
|
isMobile: !1,
|
|
45
|
-
type:
|
|
45
|
+
type: H.Filter
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ t(
|
|
49
49
|
k,
|
|
50
50
|
{
|
|
51
|
-
isOpen:
|
|
51
|
+
isOpen: p,
|
|
52
52
|
drawerOpenSide: "left",
|
|
53
|
-
onClose: () =>
|
|
54
|
-
className: `${
|
|
55
|
-
"aria-label":
|
|
53
|
+
onClose: () => R(n, a),
|
|
54
|
+
className: `${l}-filter-drawer`,
|
|
55
|
+
"aria-label": d.drawer || "Filter drawer",
|
|
56
56
|
paddingLevel: 0,
|
|
57
57
|
children: [
|
|
58
|
-
/* @__PURE__ */ o(
|
|
59
|
-
/* @__PURE__ */ o(
|
|
58
|
+
/* @__PURE__ */ o(S, { className: `${l}-filter-drawer-menu`, children: m?.map((e) => /* @__PURE__ */ t(N, { name: e.label, children: [
|
|
59
|
+
/* @__PURE__ */ o(z, { heading: e.label }),
|
|
60
60
|
Array.from(e.filterDimensions).map((r) => /* @__PURE__ */ o(
|
|
61
61
|
M,
|
|
62
62
|
{
|
|
63
63
|
id: r.label,
|
|
64
64
|
labelText: r.label,
|
|
65
|
-
onChange: ($) =>
|
|
65
|
+
onChange: ($) => w?.($, e.buttonType),
|
|
66
66
|
type: e.type,
|
|
67
67
|
disabled: r?.disabled,
|
|
68
68
|
name: r.label,
|
|
@@ -71,24 +71,25 @@ const T = g.forwardRef(
|
|
|
71
71
|
r.label
|
|
72
72
|
))
|
|
73
73
|
] }, e.id)) }),
|
|
74
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ t(
|
|
75
75
|
"div",
|
|
76
76
|
{
|
|
77
|
-
className:
|
|
78
|
-
`${
|
|
79
|
-
`${
|
|
77
|
+
className: x(
|
|
78
|
+
`${l}-filter-dropdown-menu__buttons-wrap`,
|
|
79
|
+
`${l}-filter-dropdown-menu__buttons-wrap--drawer`
|
|
80
80
|
),
|
|
81
81
|
children: [
|
|
82
82
|
/* @__PURE__ */ o(
|
|
83
|
-
|
|
83
|
+
f,
|
|
84
84
|
{
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
variant: D.secondary,
|
|
86
|
+
size: u.small,
|
|
87
|
+
isDisabled: c === 0,
|
|
88
|
+
onClick: () => h?.("all"),
|
|
89
|
+
children: s?.clearAll || "Clear all"
|
|
89
90
|
}
|
|
90
91
|
),
|
|
91
|
-
/* @__PURE__ */ o(
|
|
92
|
+
/* @__PURE__ */ o(f, { size: u.small, onClick: () => F?.(!1), children: s?.showAuctions || `Show ${y} Auctions` })
|
|
92
93
|
]
|
|
93
94
|
}
|
|
94
95
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("../../node_modules/@radix-ui/react-popover/dist/index.cjs"),N=require("react"),y=require("../../components/Drawer/Drawer.cjs"),D=require("../../providers/SeldonProvider/utils.cjs"),$=require("../../utils/index.cjs"),C=require("./FilterButton.cjs"),B=require("./FilterDropdownMenuDesktop.cjs"),H=require("./FilterDropdownMenuMobile.cjs"),O=require("./types.cjs"),t=require("./utils.cjs"),R=require("../../utils/constants.cjs"),k=N.forwardRef(({filterId:n=0,className:p,filterButtonLabel:r,buttonType:o,handleClick:l,filtersListState:s,filters:d,onSelectFilter:g,onApplyFilter:j,onClickClear:q,resultsCount:w,filterButtonLabelTranslated:u,dropdownMenuTranslation:m,ariaLabels:i={},hideDesktopSortButton:v,id:x},M)=>{const a=s?.[n]??!1,{totalCount:S,filterCount:b}=t.countActiveFilters(d,o),F=t.getFilterButtonLabel(r,u||null),h=o===O.FilterButtonType.Sort?`${$.px}-filters-inline__sort`:void 0;return v&&o===O.FilterButtonType.Sort?null:e.jsxs(e.Fragment,{children:[e.jsxs(D.SSRMediaQuery.Media,{lessThan:R.Breakpoints.md,className:h,children:[e.jsx(C.FilterButton,{ref:M,className:p,isSelected:a,count:b,label:F,id:x,totalCount:S,ariaLabel:i.button||`${r} button`,onClick:t.getFilterButtonClickHandler(s,l,n),isMobile:!0,type:o}),e.jsx(y.default,{drawerOpenSide:"bottom",isOpen:a,onClose:()=>t.resetAllFilters(s,l),"aria-label":i.drawer||`${r} drawer`,className:`${$.px}-filter-drawer-mobile`,headerText:F,paddingLevel:0,children:e.jsx(H.FilterDropdownMenuMobile,{buttonType:o,filters:d,filterIndex:n,onSelectFilter:g,onApplyFilter:j,onClickClear:q,resultsCount:w,ariaLabels:i?.ariaLabel,filterButtonLabel:r,filterButtonLabelTranslated:u,dropdownMenuTranslation:m})})]}),e.jsx(D.SSRMediaQuery.Media,{greaterThanOrEqual:R.Breakpoints.md,className:h,children:e.jsxs(c.Root,{open:a,onOpenChange:t.getFilterButtonClickHandler(s,l,n),children:[e.jsx(c.Trigger,{asChild:!0,children:e.jsx(C.FilterButton,{ref:M,className:p,isSelected:a,count:b,label:F,totalCount:S,id:x,ariaLabel:i.ariaLabel||`${r} button`,onClick:t.getFilterButtonClickHandler(s,l,n),isMobile:!1,type:o})}),e.jsx(c.Portal,{children:e.jsx(c.Content,{avoidCollisions:!0,collisionPadding:10,sideOffset:5,align:"start",alignOffset:5,"aria-label":i.ariaLabel||`${r} dropdown`,children:e.jsx(B.FilterDropdownMenuDesktop,{buttonType:o,filters:d,filterIndex:n,onSelectFilter:g,onApplyFilter:j,onClickClear:q,resultsCount:w,ariaLabels:i?.ariaLabel,filterButtonLabel:r,filterButtonLabelTranslated:u,dropdownMenuTranslation:m})})})]},`${x}-${r}-button`)})]})});k.displayName="SubFilterDropdown";exports.SubFilterDropdown=k;
|