@phillips/seldon 1.274.0 → 1.276.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/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/components/Article/Article.cjs +1 -1
- package/dist/components/Article/Article.js +17 -16
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.js +14 -11
- package/dist/components/ExitGateCard/ExitGateCard.cjs +1 -1
- package/dist/components/ExitGateCard/ExitGateCard.js +18 -17
- package/dist/components/SeldonImage/SeldonImage.cjs +1 -1
- package/dist/components/SeldonImage/SeldonImage.d.ts +1 -1
- package/dist/components/SeldonImage/SeldonImage.js +45 -44
- package/dist/components/SeldonImage/SeldonImage.stories.d.ts +73 -6
- package/dist/components/SeldonImage/index.d.ts +1 -0
- package/dist/components/SeldonImage/types.cjs +1 -0
- package/dist/components/SeldonImage/types.d.ts +6 -0
- package/dist/components/SeldonImage/types.js +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +55 -53
- package/dist/node_modules/ics/dist/schema/index.cjs +1 -1
- package/dist/node_modules/ics/dist/schema/index.js +1 -1
- package/dist/node_modules/ics/dist/utils/index.cjs +1 -1
- package/dist/node_modules/ics/dist/utils/index.js +1 -1
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.cjs +1 -1
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.js +35 -34
- package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.cjs +1 -1
- package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.js +45 -53
- package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.cjs +1 -1
- package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.js +49 -68
- package/dist/patterns/FiltersInline/FiltersInline.cjs +1 -1
- package/dist/patterns/FiltersInline/FiltersInline.js +59 -55
- package/dist/patterns/FiltersInline/FiltersInline.stories.d.ts +1 -0
- package/dist/patterns/FiltersInline/MainFilterDropdown.cjs +1 -1
- package/dist/patterns/FiltersInline/MainFilterDropdown.js +39 -40
- package/dist/patterns/FiltersInline/types.d.ts +2 -2
- package/dist/patterns/FiltersInline/utils.d.ts +2 -2
- package/dist/patterns/ObjectTile/ObjectTile.cjs +1 -1
- package/dist/patterns/ObjectTile/ObjectTile.js +31 -30
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.cjs +1 -1
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.js +32 -31
- package/dist/scss/components/SeldonImage/_seldonImage.scss +21 -0
- package/dist/scss/patterns/FiltersInline/_filterDropdownMenu.scss +21 -20
- package/dist/scss/patterns/FiltersInline/_filtersInline.scss +3 -1
- package/dist/static/test-image-1200x1600.jpg +0 -0
- package/dist/static/test-image-1600x1600.jpg +0 -0
- package/package.json +1 -1
|
@@ -1,74 +1,66 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { px as
|
|
8
|
-
import { getFilterDimensions as
|
|
9
|
-
const
|
|
1
|
+
import { jsxs as c, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import a from "../../_virtual/index2.js";
|
|
3
|
+
import N from "react";
|
|
4
|
+
import m from "../../components/Button/Button.js";
|
|
5
|
+
import { ButtonVariants as p } from "../../components/Button/types.js";
|
|
6
|
+
import $ from "../../components/Filter/FilterInput.js";
|
|
7
|
+
import { px as u } from "../../utils/index.js";
|
|
8
|
+
import { getFilterDimensions as A, hasActiveDimensions as F, handleInputChange as g } from "./utils.js";
|
|
9
|
+
const v = N.forwardRef(
|
|
10
10
|
({
|
|
11
11
|
className: f,
|
|
12
|
-
buttonType:
|
|
13
|
-
filters:
|
|
14
|
-
filterIndex:
|
|
15
|
-
onSelectFilter:
|
|
12
|
+
buttonType: i,
|
|
13
|
+
filters: t,
|
|
14
|
+
filterIndex: l,
|
|
15
|
+
onSelectFilter: h,
|
|
16
16
|
onClickClear: b,
|
|
17
|
-
onApplyFilter:
|
|
17
|
+
onApplyFilter: n,
|
|
18
18
|
resultsCount: k,
|
|
19
|
-
ariaLabels:
|
|
20
|
-
dropdownMenuTranslation:
|
|
21
|
-
},
|
|
22
|
-
const
|
|
23
|
-
return /* @__PURE__ */
|
|
19
|
+
ariaLabels: w,
|
|
20
|
+
dropdownMenuTranslation: d
|
|
21
|
+
}, D) => {
|
|
22
|
+
const r = i === "Sort", o = `${u}-filter-dropdown-menu`, _ = A(t, l), x = F(t, i, l);
|
|
23
|
+
return /* @__PURE__ */ c(
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
|
-
className:
|
|
27
|
-
ref:
|
|
26
|
+
className: a(o, f),
|
|
27
|
+
ref: D,
|
|
28
28
|
"data-testid": "filter-dropdown-desktop",
|
|
29
|
-
"aria-label":
|
|
29
|
+
"aria-label": w || `${i} dropdown desktop`,
|
|
30
30
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
|
|
31
|
+
/* @__PURE__ */ s("div", { className: a(`${o}__filters`), children: _.map((e) => /* @__PURE__ */ s(
|
|
32
|
+
$,
|
|
33
33
|
{
|
|
34
|
-
id:
|
|
35
|
-
labelText:
|
|
36
|
-
name:
|
|
37
|
-
type:
|
|
38
|
-
checked:
|
|
39
|
-
disabled:
|
|
40
|
-
onChange: (
|
|
34
|
+
id: e.label,
|
|
35
|
+
labelText: e.label,
|
|
36
|
+
name: e.label,
|
|
37
|
+
type: r ? "radio" : "checkbox",
|
|
38
|
+
checked: e.active,
|
|
39
|
+
disabled: e?.disabled,
|
|
40
|
+
onChange: (C) => {
|
|
41
|
+
g(C, i ?? "", h), r && n?.(!1);
|
|
42
|
+
}
|
|
41
43
|
},
|
|
42
|
-
|
|
44
|
+
e.label
|
|
43
45
|
)) }),
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
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" })
|
|
52
|
-
}
|
|
53
|
-
) : /* @__PURE__ */ h(u, { children: [
|
|
54
|
-
/* @__PURE__ */ e(
|
|
55
|
-
l,
|
|
46
|
+
!r && /* @__PURE__ */ c("div", { className: a(`${o}__buttons-wrap`), children: [
|
|
47
|
+
/* @__PURE__ */ s(
|
|
48
|
+
m,
|
|
56
49
|
{
|
|
57
|
-
variant:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
children: r?.clearAll || "Clear all"
|
|
50
|
+
variant: p.secondary,
|
|
51
|
+
isDisabled: !x,
|
|
52
|
+
onClick: () => b?.(i ?? ""),
|
|
53
|
+
children: d?.clearAll || "Clear all"
|
|
62
54
|
}
|
|
63
55
|
),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
] })
|
|
56
|
+
/* @__PURE__ */ s(m, { variant: p.primary, onClick: () => n?.(!1), children: /* @__PURE__ */ s("span", { className: `${o}__button-text`, children: d?.showAuctions || `Show ${k} Auctions` }) })
|
|
57
|
+
] })
|
|
66
58
|
]
|
|
67
59
|
}
|
|
68
60
|
);
|
|
69
61
|
}
|
|
70
62
|
);
|
|
71
|
-
|
|
63
|
+
v.displayName = "FilterDropdownMenuDesktop";
|
|
72
64
|
export {
|
|
73
|
-
|
|
65
|
+
v as FilterDropdownMenuDesktop
|
|
74
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),r=require("../../_virtual/index2.cjs"),D=require("react"),u=require("../../components/Button/Button.cjs"),m=require("../../components/Button/types.cjs"),N=require("../../components/Filter/FilterInput.cjs"),C=require("../../utils/index.cjs"),l=require("./utils.cjs"),b=D.forwardRef(({className:f,buttonType:a,filters:n,filterIndex:o,onApplyFilter:d,onClickClear:h,onSelectFilter:x,resultsCount:_,ariaLabels:$,dropdownMenuTranslation:c},p)=>{const t=a==="Sort",e=`${C.px}-filter-dropdown-menu`,j=l.getFilterDimensions(n,o),w=l.hasActiveDimensions(n,a,o);return i.jsxs("div",{className:r.default(`${e}`,f,`${e}--mobile`),ref:p,"data-testid":"filter-dropdown-mobile","aria-label":$||`${a} dropdown mobile`,children:[i.jsx("div",{className:r.default(`${e}__filters`,`${e}__filters--mobile`),children:j.map(s=>i.jsx(N.default,{id:s.label,labelText:s.label,name:s.label,type:t?"radio":"checkbox",checked:s.active,disabled:s?.disabled,onChange:q=>{l.handleInputChange(q,a??"",x),t&&d?.(!1)}},s.label))}),t?i.jsx("div",{className:`${e}__mobile-safe-area`,"aria-hidden":"true"}):i.jsxs("div",{className:r.default(`${e}__buttons-wrap`,`${e}__mobile-wrap`),children:[i.jsx(u.default,{variant:m.ButtonVariants.secondary,isDisabled:!w,onClick:()=>h?.(a??""),children:c?.clearAll||"Clear all"}),i.jsx(u.default,{variant:m.ButtonVariants.primary,onClick:()=>d?.(!1),children:i.jsx("span",{className:`${e}__button-text`,children:c?.showAuctions||`Show ${_} Auctions`})})]})]})});b.displayName="FilterDropdownMenuMobile";exports.FilterDropdownMenuMobile=b;
|
|
@@ -1,85 +1,66 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { getFilterDimensions as z, hasActiveDimensions as A, handleInputChange as B } from "./utils.js";
|
|
11
|
-
const M = g.forwardRef(
|
|
1
|
+
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import s from "../../_virtual/index2.js";
|
|
3
|
+
import D from "react";
|
|
4
|
+
import c from "../../components/Button/Button.js";
|
|
5
|
+
import { ButtonVariants as f } from "../../components/Button/types.js";
|
|
6
|
+
import u from "../../components/Filter/FilterInput.js";
|
|
7
|
+
import { px as k } from "../../utils/index.js";
|
|
8
|
+
import { getFilterDimensions as v, hasActiveDimensions as A, handleInputChange as F } from "./utils.js";
|
|
9
|
+
const g = D.forwardRef(
|
|
12
10
|
({
|
|
13
|
-
className:
|
|
11
|
+
className: b,
|
|
14
12
|
buttonType: r,
|
|
15
|
-
filters:
|
|
16
|
-
filterIndex:
|
|
17
|
-
onApplyFilter:
|
|
18
|
-
onClickClear:
|
|
19
|
-
onSelectFilter:
|
|
20
|
-
resultsCount:
|
|
21
|
-
ariaLabels:
|
|
22
|
-
dropdownMenuTranslation:
|
|
23
|
-
},
|
|
24
|
-
const o = r === "Sort",
|
|
25
|
-
return /* @__PURE__ */
|
|
13
|
+
filters: l,
|
|
14
|
+
filterIndex: t,
|
|
15
|
+
onApplyFilter: n,
|
|
16
|
+
onClickClear: p,
|
|
17
|
+
onSelectFilter: h,
|
|
18
|
+
resultsCount: _,
|
|
19
|
+
ariaLabels: $,
|
|
20
|
+
dropdownMenuTranslation: m
|
|
21
|
+
}, w) => {
|
|
22
|
+
const o = r === "Sort", e = `${k}-filter-dropdown-menu`, N = v(l, t), x = A(l, r, t);
|
|
23
|
+
return /* @__PURE__ */ d(
|
|
26
24
|
"div",
|
|
27
25
|
{
|
|
28
|
-
className:
|
|
29
|
-
ref:
|
|
26
|
+
className: s(`${e}`, b, `${e}--mobile`),
|
|
27
|
+
ref: w,
|
|
30
28
|
"data-testid": "filter-dropdown-mobile",
|
|
31
|
-
"aria-label":
|
|
29
|
+
"aria-label": $ || `${r} dropdown mobile`,
|
|
32
30
|
children: [
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
|
|
31
|
+
/* @__PURE__ */ a("div", { className: s(`${e}__filters`, `${e}__filters--mobile`), children: N.map((i) => /* @__PURE__ */ a(
|
|
32
|
+
u,
|
|
35
33
|
{
|
|
36
|
-
id:
|
|
37
|
-
labelText:
|
|
38
|
-
name:
|
|
34
|
+
id: i.label,
|
|
35
|
+
labelText: i.label,
|
|
36
|
+
name: i.label,
|
|
39
37
|
type: o ? "radio" : "checkbox",
|
|
40
|
-
checked:
|
|
41
|
-
disabled:
|
|
42
|
-
onChange: (
|
|
38
|
+
checked: i.active,
|
|
39
|
+
disabled: i?.disabled,
|
|
40
|
+
onChange: (C) => {
|
|
41
|
+
F(C, r ?? "", h), o && n?.(!1);
|
|
42
|
+
}
|
|
43
43
|
},
|
|
44
|
-
|
|
44
|
+
i.label
|
|
45
45
|
)) }),
|
|
46
|
-
/* @__PURE__ */ e(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
size: m.small,
|
|
59
|
-
onClick: () => h?.(!1),
|
|
60
|
-
children: /* @__PURE__ */ e(c, { variant: d.headingMedium, className: `${i}__button-text`, children: l?.confirm || "Confirm" })
|
|
61
|
-
}
|
|
62
|
-
) : /* @__PURE__ */ _(S, { children: [
|
|
63
|
-
/* @__PURE__ */ e(
|
|
64
|
-
s,
|
|
65
|
-
{
|
|
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" })
|
|
71
|
-
}
|
|
72
|
-
),
|
|
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` }) })
|
|
74
|
-
] })
|
|
75
|
-
}
|
|
76
|
-
)
|
|
46
|
+
o ? /* @__PURE__ */ a("div", { className: `${e}__mobile-safe-area`, "aria-hidden": "true" }) : /* @__PURE__ */ d("div", { className: s(`${e}__buttons-wrap`, `${e}__mobile-wrap`), children: [
|
|
47
|
+
/* @__PURE__ */ a(
|
|
48
|
+
c,
|
|
49
|
+
{
|
|
50
|
+
variant: f.secondary,
|
|
51
|
+
isDisabled: !x,
|
|
52
|
+
onClick: () => p?.(r ?? ""),
|
|
53
|
+
children: m?.clearAll || "Clear all"
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
/* @__PURE__ */ a(c, { variant: f.primary, onClick: () => n?.(!1), children: /* @__PURE__ */ a("span", { className: `${e}__button-text`, children: m?.showAuctions || `Show ${_} Auctions` }) })
|
|
57
|
+
] })
|
|
77
58
|
]
|
|
78
59
|
}
|
|
79
60
|
);
|
|
80
61
|
}
|
|
81
62
|
);
|
|
82
|
-
|
|
63
|
+
g.displayName = "FilterDropdownMenuMobile";
|
|
83
64
|
export {
|
|
84
|
-
|
|
65
|
+
g as FilterDropdownMenuMobile
|
|
85
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),I=require("../../_virtual/index2.cjs"),w=require("react"),D=require("../../utils/index.cjs"),N=require("./MainFilterDropdown.cjs"),g=require("./SubFilterDropdown.cjs"),y=require("./types.cjs"),T=w.forwardRef(({id:t,className:q,filtersListState:u,setFiltersLabelListState:l,filters:n,onSelectFilter:a,onApplyFilter:d,onClickClear:i,resultsCount:c,mainFilterLabel:o,dropdownMenuTranslation:b,hideDesktopSortButton:x=!0,...B},F)=>{const{className:f,...j}=D.getCommonProps({id:t,...B},"FiltersInline");return s.jsxs("div",{ref:F,className:I.default(f,q),...j,id:t,children:[s.jsx(N.MainFilterDropdown,{id:`${t}-${o}-button`,filterButtonLabel:o,handleClick:l,filtersListState:u,filters:n,onSelectFilter:a,onApplyFilter:d,onClickClear:i,resultsCount:c,dropdownMenuTranslation:b},`${t}-${o}-button`),(()=>{const p=n?.map((e,r)=>({filter:e,filterId:r+1}))??[],m=p.find(({filter:e})=>e.buttonType===y.FilterButtonType.Sort),$=p.filter(({filter:e})=>e.buttonType!==y.FilterButtonType.Sort);return(m?[...$,m]:$).map(({filter:e,filterId:r})=>s.jsx(g.SubFilterDropdown,{id:`${t}-${e.label}-button`,filterButtonLabel:e.label,buttonType:e.buttonType,handleClick:l,filtersListState:u,filterId:r,filters:n,onSelectFilter:a,onApplyFilter:d,onClickClear:i,resultsCount:c,filterButtonLabelTranslated:e.filterButtonLabelTranslated,dropdownMenuTranslation:b,hideDesktopSortButton:x},`${t}-${e.label}-button`))})()]})});T.displayName="FiltersInline";exports.default=T;
|
|
@@ -1,67 +1,71 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { getCommonProps as
|
|
5
|
-
import { MainFilterDropdown as
|
|
6
|
-
import { SubFilterDropdown as
|
|
7
|
-
|
|
1
|
+
import { jsxs as h, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import F from "../../_virtual/index2.js";
|
|
3
|
+
import j from "react";
|
|
4
|
+
import { getCommonProps as w } from "../../utils/index.js";
|
|
5
|
+
import { MainFilterDropdown as D } from "./MainFilterDropdown.js";
|
|
6
|
+
import { SubFilterDropdown as P } from "./SubFilterDropdown.js";
|
|
7
|
+
import { FilterButtonType as $ } from "./types.js";
|
|
8
|
+
const R = j.forwardRef(
|
|
8
9
|
({
|
|
9
10
|
id: o,
|
|
10
|
-
className:
|
|
11
|
-
filtersListState:
|
|
12
|
-
setFiltersLabelListState:
|
|
13
|
-
filters:
|
|
14
|
-
onSelectFilter:
|
|
11
|
+
className: T,
|
|
12
|
+
filtersListState: m,
|
|
13
|
+
setFiltersLabelListState: a,
|
|
14
|
+
filters: r,
|
|
15
|
+
onSelectFilter: s,
|
|
15
16
|
onApplyFilter: l,
|
|
16
|
-
onClickClear:
|
|
17
|
-
resultsCount:
|
|
18
|
-
mainFilterLabel:
|
|
19
|
-
dropdownMenuTranslation:
|
|
20
|
-
hideDesktopSortButton:
|
|
21
|
-
...
|
|
22
|
-
},
|
|
23
|
-
const { className:
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
|
|
17
|
+
onClickClear: p,
|
|
18
|
+
resultsCount: u,
|
|
19
|
+
mainFilterLabel: e,
|
|
20
|
+
dropdownMenuTranslation: d,
|
|
21
|
+
hideDesktopSortButton: y = !0,
|
|
22
|
+
...B
|
|
23
|
+
}, I) => {
|
|
24
|
+
const { className: x, ...N } = w({ id: o, ...B }, "FiltersInline");
|
|
25
|
+
return /* @__PURE__ */ h("div", { ref: I, className: F(x, T), ...N, id: o, children: [
|
|
26
|
+
/* @__PURE__ */ i(
|
|
27
|
+
D,
|
|
27
28
|
{
|
|
28
|
-
id: `${o}-${
|
|
29
|
-
filterButtonLabel:
|
|
30
|
-
handleClick:
|
|
31
|
-
filtersListState:
|
|
32
|
-
filters:
|
|
33
|
-
onSelectFilter:
|
|
29
|
+
id: `${o}-${e}-button`,
|
|
30
|
+
filterButtonLabel: e,
|
|
31
|
+
handleClick: a,
|
|
32
|
+
filtersListState: m,
|
|
33
|
+
filters: r,
|
|
34
|
+
onSelectFilter: s,
|
|
34
35
|
onApplyFilter: l,
|
|
35
|
-
onClickClear:
|
|
36
|
-
resultsCount:
|
|
37
|
-
dropdownMenuTranslation:
|
|
36
|
+
onClickClear: p,
|
|
37
|
+
resultsCount: u,
|
|
38
|
+
dropdownMenuTranslation: d
|
|
38
39
|
},
|
|
39
|
-
`${o}-${
|
|
40
|
+
`${o}-${e}-button`
|
|
40
41
|
),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
(() => {
|
|
43
|
+
const b = r?.map((t, n) => ({ filter: t, filterId: n + 1 })) ?? [], c = b.find(({ filter: t }) => t.buttonType === $.Sort), f = b.filter(({ filter: t }) => t.buttonType !== $.Sort);
|
|
44
|
+
return (c ? [...f, c] : f).map(({ filter: t, filterId: n }) => /* @__PURE__ */ i(
|
|
45
|
+
P,
|
|
46
|
+
{
|
|
47
|
+
id: `${o}-${t.label}-button`,
|
|
48
|
+
filterButtonLabel: t.label,
|
|
49
|
+
buttonType: t.buttonType,
|
|
50
|
+
handleClick: a,
|
|
51
|
+
filtersListState: m,
|
|
52
|
+
filterId: n,
|
|
53
|
+
filters: r,
|
|
54
|
+
onSelectFilter: s,
|
|
55
|
+
onApplyFilter: l,
|
|
56
|
+
onClickClear: p,
|
|
57
|
+
resultsCount: u,
|
|
58
|
+
filterButtonLabelTranslated: t.filterButtonLabelTranslated,
|
|
59
|
+
dropdownMenuTranslation: d,
|
|
60
|
+
hideDesktopSortButton: y
|
|
61
|
+
},
|
|
62
|
+
`${o}-${t.label}-button`
|
|
63
|
+
));
|
|
64
|
+
})()
|
|
61
65
|
] });
|
|
62
66
|
}
|
|
63
67
|
);
|
|
64
|
-
|
|
68
|
+
R.displayName = "FiltersInline";
|
|
65
69
|
export {
|
|
66
|
-
|
|
70
|
+
R as default
|
|
67
71
|
};
|
|
@@ -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"),$=require("../../_virtual/index2.cjs"),g=require("react"),b=require("../../components/Button/Button.cjs"),A=require("../../components/Button/types.cjs"),D=require("../../components/Drawer/Drawer.cjs"),B=require("../../components/Filter/Filter.cjs"),M=require("../../components/Filter/FilterHeader.cjs"),k=require("../../components/Filter/FilterInput.cjs"),n=require("../../utils/index.cjs"),N=require("../FilterMenu/FilterMenu.cjs"),S=require("./FilterButton.cjs"),_=require("./types.cjs"),s=require("./utils.cjs"),x=g.forwardRef(({className:m,filterButtonLabel:l,handleClick:a,filtersListState:i,filters:o,onSelectFilter:w,onApplyFilter:F,onClickClear:q,resultsCount:f,dropdownMenuTranslation:d,ariaLabels:c={},id:j},y)=>{const u=i?.[0]??!1,{totalCount:p,filterCount:h}=s.countActiveFilters(o,l);return e.jsxs(e.Fragment,{children:[e.jsx(S.FilterButton,{ref:y,className:m,isSelected:u,count:h,label:l,totalCount:p,id:j,ariaLabel:c.button||`${l} button`,onClick:s.getFilterButtonClickHandler(i,a,0),isMobile:!1,type:_.FilterButtonIconType.Filter}),e.jsxs(D.default,{isOpen:u,drawerOpenSide:"left",onClose:()=>s.resetAllFilters(i,a),className:`${n.px}-filter-drawer`,"aria-label":c.drawer||"Filter drawer",paddingLevel:0,children:[e.jsx(N.default,{className:`${n.px}-filter-drawer-menu`,children:o?.map(r=>e.jsxs(B.default,{name:r.label,children:[e.jsx(M.default,{heading:r.label}),Array.from(r.filterDimensions).map(t=>e.jsx(k.default,{id:t.label,labelText:t.label,onChange:C=>w?.(C,r.buttonType),type:r.type,disabled:t?.disabled,name:t.label,checked:t.active},t.label))]},r.id))}),e.jsxs("div",{className:$.default(`${n.px}-filter-dropdown-menu__buttons-wrap`,`${n.px}-filter-dropdown-menu__buttons-wrap--drawer`),children:[e.jsx(b.default,{variant:A.ButtonVariants.secondary,isDisabled:p===0,onClick:()=>q?.("all"),children:d?.clearAll||"Clear all"}),e.jsx(b.default,{onClick:()=>F?.(!1),children:d?.showAuctions||`Show ${f} Auctions`})]})]})]})});x.displayName="MainFilterDropdown";exports.MainFilterDropdown=x;
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { jsxs as t, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as t, Fragment as $, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import g from "../../_virtual/index2.js";
|
|
3
|
+
import x from "react";
|
|
4
4
|
import f from "../../components/Button/Button.js";
|
|
5
|
-
import {
|
|
5
|
+
import { ButtonVariants as D } from "../../components/Button/types.js";
|
|
6
6
|
import k from "../../components/Drawer/Drawer.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import B from "../../components/Filter/Filter.js";
|
|
8
|
+
import N from "../../components/Filter/FilterHeader.js";
|
|
9
9
|
import M from "../../components/Filter/FilterInput.js";
|
|
10
10
|
import { px as l } from "../../utils/index.js";
|
|
11
|
-
import
|
|
12
|
-
import { FilterButton as
|
|
13
|
-
import { FilterButtonIconType as
|
|
14
|
-
import { countActiveFilters as
|
|
15
|
-
const T =
|
|
11
|
+
import j from "../FilterMenu/FilterMenu.js";
|
|
12
|
+
import { FilterButton as H } from "./FilterButton.js";
|
|
13
|
+
import { FilterButtonIconType as I } from "./types.js";
|
|
14
|
+
import { countActiveFilters as O, getFilterButtonClickHandler as R, resetAllFilters as S } from "./utils.js";
|
|
15
|
+
const T = x.forwardRef(
|
|
16
16
|
({
|
|
17
17
|
className: b,
|
|
18
18
|
filterButtonLabel: i,
|
|
19
19
|
handleClick: a,
|
|
20
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__ */ t(
|
|
22
|
+
onSelectFilter: u,
|
|
23
|
+
onApplyFilter: w,
|
|
24
|
+
onClickClear: F,
|
|
25
|
+
resultsCount: h,
|
|
26
|
+
dropdownMenuTranslation: d,
|
|
27
|
+
ariaLabels: p = {},
|
|
28
|
+
id: y
|
|
29
|
+
}, C) => {
|
|
30
|
+
const s = n?.[0] ?? !1, { totalCount: c, filterCount: A } = O(m, i);
|
|
31
|
+
return /* @__PURE__ */ t($, { children: [
|
|
32
32
|
/* @__PURE__ */ o(
|
|
33
|
-
|
|
33
|
+
H,
|
|
34
34
|
{
|
|
35
|
-
ref:
|
|
35
|
+
ref: C,
|
|
36
36
|
className: b,
|
|
37
|
-
isSelected:
|
|
38
|
-
count:
|
|
37
|
+
isSelected: s,
|
|
38
|
+
count: A,
|
|
39
39
|
label: i,
|
|
40
40
|
totalCount: c,
|
|
41
|
-
id:
|
|
42
|
-
ariaLabel:
|
|
43
|
-
onClick:
|
|
41
|
+
id: y,
|
|
42
|
+
ariaLabel: p.button || `${i} button`,
|
|
43
|
+
onClick: R(n, a, 0),
|
|
44
44
|
isMobile: !1,
|
|
45
|
-
type:
|
|
45
|
+
type: I.Filter
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
48
|
/* @__PURE__ */ t(
|
|
49
49
|
k,
|
|
50
50
|
{
|
|
51
|
-
isOpen:
|
|
51
|
+
isOpen: s,
|
|
52
52
|
drawerOpenSide: "left",
|
|
53
|
-
onClose: () =>
|
|
53
|
+
onClose: () => S(n, a),
|
|
54
54
|
className: `${l}-filter-drawer`,
|
|
55
|
-
"aria-label":
|
|
55
|
+
"aria-label": p.drawer || "Filter drawer",
|
|
56
56
|
paddingLevel: 0,
|
|
57
57
|
children: [
|
|
58
|
-
/* @__PURE__ */ o(
|
|
59
|
-
/* @__PURE__ */ o(
|
|
58
|
+
/* @__PURE__ */ o(j, { className: `${l}-filter-drawer-menu`, children: m?.map((e) => /* @__PURE__ */ t(B, { name: e.label, children: [
|
|
59
|
+
/* @__PURE__ */ o(N, { 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: (_) => u?.(_, e.buttonType),
|
|
66
66
|
type: e.type,
|
|
67
67
|
disabled: r?.disabled,
|
|
68
68
|
name: r.label,
|
|
@@ -74,7 +74,7 @@ const T = B.forwardRef(
|
|
|
74
74
|
/* @__PURE__ */ t(
|
|
75
75
|
"div",
|
|
76
76
|
{
|
|
77
|
-
className:
|
|
77
|
+
className: g(
|
|
78
78
|
`${l}-filter-dropdown-menu__buttons-wrap`,
|
|
79
79
|
`${l}-filter-dropdown-menu__buttons-wrap--drawer`
|
|
80
80
|
),
|
|
@@ -83,13 +83,12 @@ const T = B.forwardRef(
|
|
|
83
83
|
f,
|
|
84
84
|
{
|
|
85
85
|
variant: D.secondary,
|
|
86
|
-
size: u.small,
|
|
87
86
|
isDisabled: c === 0,
|
|
88
|
-
onClick: () =>
|
|
89
|
-
children:
|
|
87
|
+
onClick: () => F?.("all"),
|
|
88
|
+
children: d?.clearAll || "Clear all"
|
|
90
89
|
}
|
|
91
90
|
),
|
|
92
|
-
/* @__PURE__ */ o(f, {
|
|
91
|
+
/* @__PURE__ */ o(f, { onClick: () => w?.(!1), children: d?.showAuctions || `Show ${h} Auctions` })
|
|
93
92
|
]
|
|
94
93
|
}
|
|
95
94
|
)
|
|
@@ -136,11 +136,11 @@ export interface FilterDropdownProps extends BaseFilterProps {
|
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
138
138
|
* Object containing translated strings for dropdown menu actions.
|
|
139
|
-
* - confirm: Label for the confirm/apply button.
|
|
140
139
|
* - clearAll: Label for the "Clear all" button.
|
|
141
140
|
* - showAuctions: Label for the button showing the number of auctions/results.
|
|
142
141
|
*/
|
|
143
142
|
export type DropdownMenuTranslation = {
|
|
143
|
+
/** @deprecated The sort dropdown no longer renders a confirm button; sort applies on selection. */
|
|
144
144
|
confirm?: string | null;
|
|
145
145
|
clearAll?: string | null;
|
|
146
146
|
showAuctions?: string | null;
|
|
@@ -160,7 +160,7 @@ export interface FilterDropdownMenuProps extends React.HTMLAttributes<HTMLDivEle
|
|
|
160
160
|
/** Index of the filter to display (typically corresponds to the selected filter) */
|
|
161
161
|
filterIndex?: number;
|
|
162
162
|
/** Handler for when a filter input is changed */
|
|
163
|
-
onSelectFilter?:
|
|
163
|
+
onSelectFilter?: FilterChangeHandler;
|
|
164
164
|
/** Handler for when the filter is confirmed or updated */
|
|
165
165
|
onApplyFilter?: (returnCountOnly?: boolean) => void;
|
|
166
166
|
/** Handler for clearing the filter (by type) */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FilterButtonIconType, FilterButtonType, FilterDimension, FilterType } from './types';
|
|
1
|
+
import { FilterButtonIconType, FilterButtonType, FilterChangeHandler, FilterDimension, FilterType } from './types';
|
|
2
2
|
export declare const FilterButtons: FilterButtonType[];
|
|
3
3
|
export declare const FiltersInlineFilters: {
|
|
4
4
|
Sort: {
|
|
@@ -57,7 +57,7 @@ export declare const getFilterDimensions: (filters: {
|
|
|
57
57
|
}[] | undefined, filterIndex: number | undefined) => FilterDimension[];
|
|
58
58
|
export declare const getIcon: (type: FilterButtonIconType, isSelected: boolean) => "ChevronDown" | "Filters" | "ChevronUp";
|
|
59
59
|
export declare const getFilterButtonClickHandler: (filtersListState: boolean[] | undefined, handleClick: ((state: boolean[]) => void) | undefined, filterId: number) => () => void;
|
|
60
|
-
export declare function handleInputChange(e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>, buttonType: string, handleFilterSelection?:
|
|
60
|
+
export declare function handleInputChange(e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>, buttonType: string, handleFilterSelection?: FilterChangeHandler): void;
|
|
61
61
|
/**
|
|
62
62
|
* Utility to reset all filter states to false and call the handler.
|
|
63
63
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),x=require("react"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),x=require("react"),D=require("../../_virtual/index2.cjs"),O=require("../../utils/index.cjs"),M=require("../../components/Detail/types.cjs"),k=require("../../components/SeldonImage/SeldonImage.cjs"),z=require("../../components/SeldonImage/types.cjs"),s=require("../../components/Text/Text.cjs"),l=require("../../components/Text/types.cjs"),A=require("../../components/DetailList/DetailList.cjs"),F=require("../../components/Detail/Detail.cjs"),h=x.memo(x.forwardRef(({badgeText:j,className:f,children:$,element:g,estimate:t,estimateLabelText:p="Estimate",estimateOnRequestText:i,badgeElement:r,favoriteElement:c,imageAlt:N="Brought to you by Phillips",imageUrl:b="",imageSrcSet:v,imageSizes:S,imageLoading:q,imageFetchPriority:y,imageBlocked:V,lotNumber:T,makerText:m,modelText:d,referenceNumber:o,titleText:u,withdrawnText:n,..._},E)=>{const{className:a,...P}=O.getCommonProps(_,"ObjectTile"),R=g??"a",C=t||i;return e.jsxs(R,{...P,className:D.default(a,f),..._,ref:E,children:[e.jsx(k.default,{alt:N,aspectRatio:z.AspectRatio.Square,className:`${a}__img`,objectFit:"contain",src:b,srcSet:v,sizes:S,loading:q,fetchPriority:y,imageBlocked:V}),n?null:e.jsx(s.default,{element:"span",className:`${a}__badge`,variant:l.TextVariants.badgeSmall,children:j}),e.jsxs("div",{className:`${a}__lot-number-like`,children:[e.jsx(s.default,{element:"span",className:`${a}__lot-number`,variant:l.TextVariants.headingSmall,children:T}),r&&e.jsx("div",{className:`${a}__lot-badge`,children:e.jsx(r,{})}),c&&e.jsx(c,{})]}),n?e.jsx(s.default,{element:"span",className:`${a}__withdrawn`,variant:l.TextVariants.headingSmall,children:n}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`${a}__meta`,children:[m?e.jsx(s.default,{element:"span",className:`${a}__maker`,variant:l.TextVariants.headingSmall,children:m}):null,u?e.jsx(s.default,{element:"cite",className:`${a}__title`,variant:l.TextVariants.headingExtraSmall,children:u}):null,o?e.jsx(s.default,{className:`${a}__reference-number`,variant:l.TextVariants.headingExtraSmall,element:"span",children:o}):null,d?e.jsx(s.default,{className:`${a}__model`,variant:l.TextVariants.headingExtraSmall,element:"span",children:d}):null]}),C?e.jsx(A.default,{hasSeparators:!0,className:`${a}__estimate ${a}__section`,variant:M.DetailVariants.sm,children:e.jsx(F.default,{className:`${a}__estimate__label`,label:p,value:t||i,hasWrap:!1})}):null,e.jsx("div",{className:`${a}__section`,children:$})]})]})}));h.displayName="ObjectTile";exports.default=h;
|