@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.
Files changed (39) hide show
  1. package/dist/_virtual/index12.js +2 -2
  2. package/dist/_virtual/index13.js +2 -2
  3. package/dist/components/Toast/ToastContextProvider.cjs +1 -1
  4. package/dist/components/Toast/ToastContextProvider.js +1 -1
  5. package/dist/node_modules/ics/dist/schema/index.cjs +1 -1
  6. package/dist/node_modules/ics/dist/schema/index.js +1 -1
  7. package/dist/node_modules/ics/dist/utils/index.cjs +1 -1
  8. package/dist/node_modules/ics/dist/utils/index.js +1 -1
  9. package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.cjs +3 -2
  10. package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.js +85 -78
  11. package/dist/node_modules/uuid/dist/rng.cjs +1 -0
  12. package/dist/node_modules/uuid/dist/rng.js +7 -0
  13. package/dist/node_modules/uuid/dist/v4.cjs +1 -0
  14. package/dist/node_modules/uuid/dist/v4.js +15 -0
  15. package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.cjs +1 -1
  16. package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.js +45 -53
  17. package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.cjs +1 -1
  18. package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.js +49 -68
  19. package/dist/patterns/FiltersInline/FiltersInline.cjs +1 -1
  20. package/dist/patterns/FiltersInline/FiltersInline.js +59 -55
  21. package/dist/patterns/FiltersInline/FiltersInline.stories.d.ts +1 -0
  22. package/dist/patterns/FiltersInline/MainFilterDropdown.cjs +1 -1
  23. package/dist/patterns/FiltersInline/MainFilterDropdown.js +39 -40
  24. package/dist/patterns/FiltersInline/types.d.ts +2 -2
  25. package/dist/patterns/FiltersInline/utils.d.ts +2 -2
  26. package/dist/scss/_vars.scss +6 -5
  27. package/dist/scss/_vars.scss.cjs +6 -5
  28. package/dist/scss/_vars.scss.js +6 -5
  29. package/dist/scss/patterns/FiltersInline/_filterDropdownMenu.scss +21 -20
  30. package/dist/scss/patterns/FiltersInline/_filtersInline.scss +3 -1
  31. package/package.json +6 -7
  32. package/dist/node_modules/uuid/dist/esm-browser/native.cjs +0 -1
  33. package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -4
  34. package/dist/node_modules/uuid/dist/esm-browser/rng.cjs +0 -1
  35. package/dist/node_modules/uuid/dist/esm-browser/rng.js +0 -13
  36. package/dist/node_modules/uuid/dist/esm-browser/v4.cjs +0 -1
  37. package/dist/node_modules/uuid/dist/esm-browser/v4.js +0 -15
  38. /package/dist/node_modules/uuid/dist/{esm-browser/stringify.cjs → stringify.cjs} +0 -0
  39. /package/dist/node_modules/uuid/dist/{esm-browser/stringify.js → stringify.js} +0 -0
@@ -1,85 +1,66 @@
1
- import { jsxs as _, jsx as e, Fragment as S } from "react/jsx-runtime";
2
- import t from "../../_virtual/index2.js";
3
- import g from "react";
4
- import s from "../../components/Button/Button.js";
5
- import { ButtonSizes as m, ButtonVariants as n } from "../../components/Button/types.js";
6
- import k from "../../components/Filter/FilterInput.js";
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(
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: p,
11
+ className: b,
14
12
  buttonType: r,
15
- filters: b,
16
- filterIndex: f,
17
- onApplyFilter: h,
18
- onClickClear: $,
19
- onSelectFilter: u,
20
- resultsCount: w,
21
- ariaLabels: x,
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
- 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: t(`${i}`, p, `${i}--mobile`),
29
- ref: C,
26
+ className: s(`${e}`, b, `${e}--mobile`),
27
+ ref: w,
30
28
  "data-testid": "filter-dropdown-mobile",
31
- "aria-label": x || `${r} dropdown mobile`,
29
+ "aria-label": $ || `${r} dropdown mobile`,
32
30
  children: [
33
- /* @__PURE__ */ e("div", { className: t(`${i}__filters`, `${i}__filters--mobile`), children: N.map((a) => /* @__PURE__ */ e(
34
- k,
31
+ /* @__PURE__ */ a("div", { className: s(`${e}__filters`, `${e}__filters--mobile`), children: N.map((i) => /* @__PURE__ */ a(
32
+ u,
35
33
  {
36
- id: a.label,
37
- labelText: a.label,
38
- name: a.label,
34
+ id: i.label,
35
+ labelText: i.label,
36
+ name: i.label,
39
37
  type: o ? "radio" : "checkbox",
40
- checked: a.active,
41
- disabled: a?.disabled,
42
- onChange: (D) => B(D, r ?? "", u)
38
+ checked: i.active,
39
+ disabled: i?.disabled,
40
+ onChange: (C) => {
41
+ F(C, r ?? "", h), o && n?.(!1);
42
+ }
43
43
  },
44
- a.label
44
+ i.label
45
45
  )) }),
46
- /* @__PURE__ */ e(
47
- "div",
48
- {
49
- className: t(
50
- o ? `${i}__button-wrap` : `${i}__buttons-wrap`,
51
- `${i}__mobile-wrap`
52
- ),
53
- children: o ? /* @__PURE__ */ e(
54
- s,
55
- {
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" })
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
- M.displayName = "FilterDropdownMenuMobile";
63
+ g.displayName = "FilterDropdownMenuMobile";
83
64
  export {
84
- M as FilterDropdownMenuMobile
65
+ g as FilterDropdownMenuMobile
85
66
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),B=require("../../_virtual/index2.cjs"),D=require("react"),I=require("../../utils/index.cjs"),N=require("./MainFilterDropdown.cjs"),T=require("./SubFilterDropdown.cjs"),i=D.forwardRef(({id:e,className:m,filtersListState:u,setFiltersLabelListState:a,filters:t,onSelectFilter:l,onApplyFilter:s,onClickClear:b,resultsCount:c,mainFilterLabel:o,dropdownMenuTranslation:d,hideDesktopSortButton:$=!0,...p},q)=>{const{className:x,...j}=I.getCommonProps({id:e,...p},"FiltersInline");return r.jsxs("div",{ref:q,className:B.default(x,m),...j,id:e,children:[r.jsx(N.MainFilterDropdown,{id:`${e}-${o}-button`,filterButtonLabel:o,handleClick:a,filtersListState:u,filters:t,onSelectFilter:l,onApplyFilter:s,onClickClear:b,resultsCount:c,dropdownMenuTranslation:d},`${e}-${o}-button`),t?.map((n,w)=>r.jsx(T.SubFilterDropdown,{id:`${e}-${n.label}-button`,filterButtonLabel:n.label,buttonType:n.buttonType,handleClick:a,filtersListState:u,filterId:w+1,filters:t,onSelectFilter:l,onApplyFilter:s,onClickClear:b,resultsCount:c,filterButtonLabelTranslated:n.filterButtonLabelTranslated,dropdownMenuTranslation:d,hideDesktopSortButton:$},`${e}-${n.label}-button`))]})});i.displayName="FiltersInline";exports.default=i;
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 N, jsx as u } from "react/jsx-runtime";
2
- import h from "../../_virtual/index2.js";
3
- import x from "react";
4
- import { getCommonProps as T } from "../../utils/index.js";
5
- import { MainFilterDropdown as j } from "./MainFilterDropdown.js";
6
- import { SubFilterDropdown as w } from "./SubFilterDropdown.js";
7
- const y = x.forwardRef(
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: c,
11
- filtersListState: n,
12
- setFiltersLabelListState: r,
13
- filters: a,
14
- onSelectFilter: e,
11
+ className: T,
12
+ filtersListState: m,
13
+ setFiltersLabelListState: a,
14
+ filters: r,
15
+ onSelectFilter: s,
15
16
  onApplyFilter: l,
16
- onClickClear: s,
17
- resultsCount: b,
18
- mainFilterLabel: m,
19
- dropdownMenuTranslation: p,
20
- hideDesktopSortButton: d = !0,
21
- ...f
22
- }, $) => {
23
- const { className: i, ...B } = T({ id: o, ...f }, "FiltersInline");
24
- return /* @__PURE__ */ N("div", { ref: $, className: h(i, c), ...B, id: o, children: [
25
- /* @__PURE__ */ u(
26
- j,
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}-${m}-button`,
29
- filterButtonLabel: m,
30
- handleClick: r,
31
- filtersListState: n,
32
- filters: a,
33
- onSelectFilter: e,
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: s,
36
- resultsCount: b,
37
- dropdownMenuTranslation: p
36
+ onClickClear: p,
37
+ resultsCount: u,
38
+ dropdownMenuTranslation: d
38
39
  },
39
- `${o}-${m}-button`
40
+ `${o}-${e}-button`
40
41
  ),
41
- a?.map((t, I) => /* @__PURE__ */ u(
42
- w,
43
- {
44
- id: `${o}-${t.label}-button`,
45
- filterButtonLabel: t.label,
46
- buttonType: t.buttonType,
47
- handleClick: r,
48
- filtersListState: n,
49
- filterId: I + 1,
50
- filters: a,
51
- onSelectFilter: e,
52
- onApplyFilter: l,
53
- onClickClear: s,
54
- resultsCount: b,
55
- filterButtonLabelTranslated: t.filterButtonLabelTranslated,
56
- dropdownMenuTranslation: p,
57
- hideDesktopSortButton: d
58
- },
59
- `${o}-${t.label}-button`
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
- y.displayName = "FiltersInline";
68
+ R.displayName = "FiltersInline";
65
69
  export {
66
- y as default
70
+ R as default
67
71
  };
@@ -12,6 +12,7 @@ export declare const Playground: {
12
12
  args: {
13
13
  id: string;
14
14
  filters: FilterType[];
15
+ hideDesktopSortButton: boolean;
15
16
  };
16
17
  argTypes: {};
17
18
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("../../_virtual/index2.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
+ "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 g, jsx as o } from "react/jsx-runtime";
2
- import x from "../../_virtual/index2.js";
3
- import B from "react";
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 { ButtonSizes as u, ButtonVariants as D } from "../../components/Button/types.js";
5
+ import { ButtonVariants as D } from "../../components/Button/types.js";
6
6
  import k from "../../components/Drawer/Drawer.js";
7
- import N from "../../components/Filter/Filter.js";
8
- import z from "../../components/Filter/FilterHeader.js";
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 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(
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: 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: [
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
- j,
33
+ H,
34
34
  {
35
- ref: A,
35
+ ref: C,
36
36
  className: b,
37
- isSelected: p,
38
- count: _,
37
+ isSelected: s,
38
+ count: A,
39
39
  label: i,
40
40
  totalCount: c,
41
- id: C,
42
- ariaLabel: d.button || `${i} button`,
43
- onClick: O(n, a, 0),
41
+ id: y,
42
+ ariaLabel: p.button || `${i} button`,
43
+ onClick: R(n, a, 0),
44
44
  isMobile: !1,
45
- type: H.Filter
45
+ type: I.Filter
46
46
  }
47
47
  ),
48
48
  /* @__PURE__ */ t(
49
49
  k,
50
50
  {
51
- isOpen: p,
51
+ isOpen: s,
52
52
  drawerOpenSide: "left",
53
- onClose: () => R(n, a),
53
+ onClose: () => S(n, a),
54
54
  className: `${l}-filter-drawer`,
55
- "aria-label": d.drawer || "Filter drawer",
55
+ "aria-label": p.drawer || "Filter drawer",
56
56
  paddingLevel: 0,
57
57
  children: [
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 }),
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: ($) => w?.($, e.buttonType),
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: x(
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: () => h?.("all"),
89
- children: s?.clearAll || "Clear all"
87
+ onClick: () => F?.("all"),
88
+ children: d?.clearAll || "Clear all"
90
89
  }
91
90
  ),
92
- /* @__PURE__ */ o(f, { size: u.small, onClick: () => F?.(!1), children: s?.showAuctions || `Show ${y} Auctions` })
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?: (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>, filterType: string) => void;
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?: (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>, filterType: string) => void): void;
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
  */
@@ -245,11 +245,12 @@ $linkSmall: 'linkSmall';
245
245
  $badgeSmall: 'badgeSmall';
246
246
  $badgeMedium: 'badgeMedium';
247
247
  $stringSmall: 'stringSmall';
248
- $text-tokens: $button, $link, $email, $label, $badge, $blockquote, $heading1, $heading2, $heading3, $heading4, $heading5,
249
- $title1, $title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink,
250
- $snwHeaderLink, $snwHeadingHero1, $snwHeadingHero2, $displayMedium, $displaySmall, $headingLarge, $headingMedium,
251
- $headingSmall, $headingExtraSmall, $bodyLarge, $bodyMedium, $bodySmall, $labelLarge, $labelMedium, $labelSmall,
252
- $linkStylised, $linkLarge, $linkMedium, $linkSmall, $badgeSmall, $badgeMedium, $stringSmall;
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
@@ -245,11 +245,12 @@ $linkSmall: 'linkSmall';
245
245
  $badgeSmall: 'badgeSmall';
246
246
  $badgeMedium: 'badgeMedium';
247
247
  $stringSmall: 'stringSmall';
248
- $text-tokens: $button, $link, $email, $label, $badge, $blockquote, $heading1, $heading2, $heading3, $heading4, $heading5,
249
- $title1, $title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink,
250
- $snwHeaderLink, $snwHeadingHero1, $snwHeadingHero2, $displayMedium, $displaySmall, $headingLarge, $headingMedium,
251
- $headingSmall, $headingExtraSmall, $bodyLarge, $bodyMedium, $bodySmall, $labelLarge, $labelMedium, $labelSmall,
252
- $linkStylised, $linkLarge, $linkMedium, $linkSmall, $badgeSmall, $badgeMedium, $stringSmall;
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
@@ -245,11 +245,12 @@ $linkSmall: 'linkSmall';
245
245
  $badgeSmall: 'badgeSmall';
246
246
  $badgeMedium: 'badgeMedium';
247
247
  $stringSmall: 'stringSmall';
248
- $text-tokens: $button, $link, $email, $label, $badge, $blockquote, $heading1, $heading2, $heading3, $heading4, $heading5,
249
- $title1, $title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink,
250
- $snwHeaderLink, $snwHeadingHero1, $snwHeadingHero2, $displayMedium, $displaySmall, $headingLarge, $headingMedium,
251
- $headingSmall, $headingExtraSmall, $bodyLarge, $bodyMedium, $bodySmall, $labelLarge, $labelMedium, $labelSmall,
252
- $linkStylised, $linkLarge, $linkMedium, $linkSmall, $badgeSmall, $badgeMedium, $stringSmall;
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 (and anything following it) to the right of the filter row.
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;