@phillips/seldon 1.275.0 → 1.277.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/Toast/ToastContextProvider.cjs +1 -1
- package/dist/components/Toast/ToastContextProvider.js +1 -1
- 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/node_modules/react-zoom-pan-pinch/dist/index.esm.cjs +3 -2
- package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.js +85 -78
- package/dist/node_modules/uuid/dist/rng.cjs +1 -0
- package/dist/node_modules/uuid/dist/rng.js +7 -0
- package/dist/node_modules/uuid/dist/v4.cjs +1 -0
- package/dist/node_modules/uuid/dist/v4.js +15 -0
- 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/scss/_vars.scss +6 -5
- package/dist/scss/_vars.scss.cjs +6 -5
- package/dist/scss/_vars.scss.js +6 -5
- package/dist/scss/patterns/FiltersInline/_filterDropdownMenu.scss +21 -20
- package/dist/scss/patterns/FiltersInline/_filtersInline.scss +3 -1
- package/package.json +6 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.cjs +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -4
- package/dist/node_modules/uuid/dist/esm-browser/rng.cjs +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +0 -13
- package/dist/node_modules/uuid/dist/esm-browser/v4.cjs +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +0 -15
- /package/dist/node_modules/uuid/dist/{esm-browser/stringify.cjs → stringify.cjs} +0 -0
- /package/dist/node_modules/uuid/dist/{esm-browser/stringify.js → stringify.js} +0 -0
|
@@ -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
|
*/
|
package/dist/scss/_vars.scss
CHANGED
|
@@ -245,11 +245,12 @@ $linkSmall: 'linkSmall';
|
|
|
245
245
|
$badgeSmall: 'badgeSmall';
|
|
246
246
|
$badgeMedium: 'badgeMedium';
|
|
247
247
|
$stringSmall: 'stringSmall';
|
|
248
|
-
$text-tokens:
|
|
249
|
-
$
|
|
250
|
-
$
|
|
251
|
-
$
|
|
252
|
-
$
|
|
248
|
+
$text-tokens:
|
|
249
|
+
$button, $link, $email, $label, $badge, $blockquote, $heading1, $heading2, $heading3, $heading4, $heading5, $title1,
|
|
250
|
+
$title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink, $snwHeaderLink,
|
|
251
|
+
$snwHeadingHero1, $snwHeadingHero2, $displayMedium, $displaySmall, $headingLarge, $headingMedium, $headingSmall,
|
|
252
|
+
$headingExtraSmall, $bodyLarge, $bodyMedium, $bodySmall, $labelLarge, $labelMedium, $labelSmall, $linkStylised,
|
|
253
|
+
$linkLarge, $linkMedium, $linkSmall, $badgeSmall, $badgeMedium, $stringSmall;
|
|
253
254
|
|
|
254
255
|
////////////////////////
|
|
255
256
|
/// Breakpoint TOKENS to be used for min-width comparisons, make sure they match BREAKPOINTS in constants.ts
|
package/dist/scss/_vars.scss.cjs
CHANGED
|
@@ -245,11 +245,12 @@ $linkSmall: 'linkSmall';
|
|
|
245
245
|
$badgeSmall: 'badgeSmall';
|
|
246
246
|
$badgeMedium: 'badgeMedium';
|
|
247
247
|
$stringSmall: 'stringSmall';
|
|
248
|
-
$text-tokens:
|
|
249
|
-
$
|
|
250
|
-
$
|
|
251
|
-
$
|
|
252
|
-
$
|
|
248
|
+
$text-tokens:
|
|
249
|
+
$button, $link, $email, $label, $badge, $blockquote, $heading1, $heading2, $heading3, $heading4, $heading5, $title1,
|
|
250
|
+
$title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink, $snwHeaderLink,
|
|
251
|
+
$snwHeadingHero1, $snwHeadingHero2, $displayMedium, $displaySmall, $headingLarge, $headingMedium, $headingSmall,
|
|
252
|
+
$headingExtraSmall, $bodyLarge, $bodyMedium, $bodySmall, $labelLarge, $labelMedium, $labelSmall, $linkStylised,
|
|
253
|
+
$linkLarge, $linkMedium, $linkSmall, $badgeSmall, $badgeMedium, $stringSmall;
|
|
253
254
|
|
|
254
255
|
////////////////////////
|
|
255
256
|
/// Breakpoint TOKENS to be used for min-width comparisons, make sure they match BREAKPOINTS in constants.ts
|
package/dist/scss/_vars.scss.js
CHANGED
|
@@ -245,11 +245,12 @@ $linkSmall: 'linkSmall';
|
|
|
245
245
|
$badgeSmall: 'badgeSmall';
|
|
246
246
|
$badgeMedium: 'badgeMedium';
|
|
247
247
|
$stringSmall: 'stringSmall';
|
|
248
|
-
$text-tokens:
|
|
249
|
-
$
|
|
250
|
-
$
|
|
251
|
-
$
|
|
252
|
-
$
|
|
248
|
+
$text-tokens:
|
|
249
|
+
$button, $link, $email, $label, $badge, $blockquote, $heading1, $heading2, $heading3, $heading4, $heading5, $title1,
|
|
250
|
+
$title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink, $snwHeaderLink,
|
|
251
|
+
$snwHeadingHero1, $snwHeadingHero2, $displayMedium, $displaySmall, $headingLarge, $headingMedium, $headingSmall,
|
|
252
|
+
$headingExtraSmall, $bodyLarge, $bodyMedium, $bodySmall, $labelLarge, $labelMedium, $labelSmall, $linkStylised,
|
|
253
|
+
$linkLarge, $linkMedium, $linkSmall, $badgeSmall, $badgeMedium, $stringSmall;
|
|
253
254
|
|
|
254
255
|
////////////////////////
|
|
255
256
|
/// Breakpoint TOKENS to be used for min-width comparisons, make sure they match BREAKPOINTS in constants.ts
|
|
@@ -26,11 +26,6 @@ $dropdown-width: 320px;
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
&__button-wrap {
|
|
30
|
-
display: flex;
|
|
31
|
-
justify-content: flex-end;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
29
|
&__buttons-wrap {
|
|
35
30
|
border-top: 1px solid $bg-border;
|
|
36
31
|
display: flex;
|
|
@@ -65,6 +60,12 @@ $dropdown-width: 320px;
|
|
|
65
60
|
padding-bottom: calc(#{$spacing-sm} + env(safe-area-inset-bottom));
|
|
66
61
|
}
|
|
67
62
|
|
|
63
|
+
// Sort dropdown has no footer buttons; this spacer preserves the safe-area
|
|
64
|
+
// inset so the last option stays clear of the iOS home indicator.
|
|
65
|
+
&__mobile-safe-area {
|
|
66
|
+
padding-bottom: calc(#{$spacing-sm} + env(safe-area-inset-bottom));
|
|
67
|
+
}
|
|
68
|
+
|
|
68
69
|
&__header {
|
|
69
70
|
margin-bottom: $spacing-sm;
|
|
70
71
|
margin-top: 0;
|
|
@@ -74,21 +75,6 @@ $dropdown-width: 320px;
|
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
&__button {
|
|
78
|
-
align-self: flex-end;
|
|
79
|
-
padding: $spacing-sm $spacing-md;
|
|
80
|
-
|
|
81
|
-
&--text {
|
|
82
|
-
text-wrap: nowrap;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&--mobile {
|
|
86
|
-
display: block;
|
|
87
|
-
margin: $spacing-sm auto $spacing-md auto;
|
|
88
|
-
width: 80%;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
78
|
&__button-text {
|
|
93
79
|
color: $white-100;
|
|
94
80
|
}
|
|
@@ -119,6 +105,9 @@ $dropdown-width: 320px;
|
|
|
119
105
|
align-self: center;
|
|
120
106
|
margin-left: auto;
|
|
121
107
|
}
|
|
108
|
+
.#{$px}-input__input[type='checkbox']:disabled {
|
|
109
|
+
border-color: $keyline-gray;
|
|
110
|
+
}
|
|
122
111
|
.#{$px}-input__input[type='checkbox'] {
|
|
123
112
|
align-self: center;
|
|
124
113
|
appearance: none;
|
|
@@ -159,6 +148,14 @@ $dropdown-width: 320px;
|
|
|
159
148
|
max-height: 2rem;
|
|
160
149
|
}
|
|
161
150
|
|
|
151
|
+
// Filter option labels use the labels/label-small-bold type token.
|
|
152
|
+
.#{$px}-filter-dropdown-menu,
|
|
153
|
+
.#{$px}-filter-drawer-menu {
|
|
154
|
+
.#{$px}-input__label.#{$px}-text {
|
|
155
|
+
@include label-styles($font-size: $font-size-label-small, $font-weight: 600);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
162
159
|
.#{$px}-filter-drawer-mobile {
|
|
163
160
|
height: min(70dvh, 640px);
|
|
164
161
|
padding: 0;
|
|
@@ -186,6 +183,10 @@ $dropdown-width: 320px;
|
|
|
186
183
|
flex: 0 0 auto;
|
|
187
184
|
margin-top: 0;
|
|
188
185
|
}
|
|
186
|
+
|
|
187
|
+
.#{$px}-filter-dropdown-menu__mobile-safe-area {
|
|
188
|
+
flex: 0 0 auto;
|
|
189
|
+
}
|
|
189
190
|
}
|
|
190
191
|
|
|
191
192
|
.#{$px}-filter-drawer {
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
flex-wrap: wrap;
|
|
6
6
|
gap: $spacing-sm;
|
|
7
7
|
|
|
8
|
-
// Desktop: align the Sort filter
|
|
8
|
+
// Desktop: align the Sort filter to the right of the filter row. The Sort
|
|
9
|
+
// pill is already rendered last in the DOM (see FiltersInline.tsx) so visual
|
|
10
|
+
// and tab order match; this just pushes it to the right edge.
|
|
9
11
|
@include media($breakpoint-md) {
|
|
10
12
|
> .#{$px}-filters-inline__sort {
|
|
11
13
|
margin-left: auto;
|