@phillips/seldon 1.271.0 → 1.272.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index10.cjs +1 -1
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index9.cjs +1 -1
- package/dist/_virtual/index9.js +2 -2
- package/dist/node_modules/ics/dist/index.cjs +1 -1
- package/dist/node_modules/ics/dist/index.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/prop-types/node_modules/react-is/index.cjs +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/patterns/FiltersInline/FilterButton.cjs +1 -1
- package/dist/patterns/FiltersInline/FilterButton.js +14 -13
- package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.cjs +1 -1
- package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.js +47 -53
- package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.cjs +1 -1
- package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.js +51 -65
- package/dist/patterns/FiltersInline/MainFilterDropdown.cjs +1 -1
- package/dist/patterns/FiltersInline/MainFilterDropdown.js +56 -55
- package/dist/patterns/FiltersInline/SubFilterDropdown.cjs +1 -1
- package/dist/patterns/FiltersInline/SubFilterDropdown.js +76 -76
- package/dist/patterns/FiltersInline/utils.cjs +1 -1
- package/dist/patterns/FiltersInline/utils.d.ts +4 -0
- package/dist/patterns/FiltersInline/utils.js +25 -20
- package/dist/scss/patterns/FiltersInline/_filterDropdownMenu.scss +86 -27
- package/dist/scss/patterns/FiltersInline/_filtersInline.scss +22 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
package/dist/_virtual/index10.js
CHANGED
package/dist/_virtual/index12.js
CHANGED
package/dist/_virtual/index13.js
CHANGED
package/dist/_virtual/index9.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
package/dist/_virtual/index9.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../_virtual/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../_virtual/index9.cjs"),q=require("./pipeline/index.cjs");var h;function U(){if(h)return o.__exports;h=1,Object.defineProperty(o.__exports,"__esModule",{value:!0}),o.__exports.convertTimestampToArray=T,o.__exports.createEvent=E,o.__exports.createEvents=d,o.__exports.isValidURL=j;var u=q.__require();function a(e){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},a(e)}function s(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),n.push.apply(n,t)}return n}function i(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?s(Object(n),!0).forEach(function(t){O(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function O(e,r,n){return r=P(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function P(e){var r=S(e,"string");return a(r)==="symbol"?r:String(r)}function S(e,r){if(a(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var t=n.call(e,r);if(a(t)!=="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function w(e){return(0,u.validateHeader)((0,u.buildHeader)(e))}function v(e){return(0,u.validateHeaderAndEvent)(i(i({},(0,u.buildHeader)(e)),(0,u.buildEvent)(e)))}function T(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"local",n=[],t=new Date(e);return n.push(r==="local"?t.getFullYear():t.getUTCFullYear()),n.push((r==="local"?t.getMonth():t.getUTCMonth())+1),n.push(r==="local"?t.getDate():t.getUTCDate()),n.push(r==="local"?t.getHours():t.getUTCHours()),n.push(r==="local"?t.getMinutes():t.getUTCMinutes()),n}function E(e,r){return d([e],r)}function d(e,r,n){var t=a(r)==="object"?r:{},c=arguments.length===3?n:typeof r=="function"?r:null,x=function(){if(!e)return{error:new Error("one argument is required"),value:null};var g=e.length===0?w(t):v(i(i({},e[0]),t)),m=g.error,D=g.value;if(m)return{error:m,value:null};var f="";f+=(0,u.formatHeader)(D);for(var p=0;p<e.length;p++){var b=v(e[p]),_=b.error,H=b.value;if(_)return{error:_,value:null};f+=(0,u.formatEvent)(H)}return f+=(0,u.formatFooter)(),{error:null,value:f}},l;try{l=x()}catch(y){l={error:y,value:null}}return c?c(l.error,l.value):l}function j(e){return u.urlRegex.test(e)}return o.__exports}exports.__require=U;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../../../_virtual/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../../../_virtual/index13.cjs"),R=require("../../../../_virtual/index.esm.cjs");var b;function D(){if(b)return u.__exports;b=1,Object.defineProperty(u.__exports,"__esModule",{value:!0}),u.__exports.urlRegex=void 0,u.__exports.validateHeader=T,u.__exports.validateHeaderAndEvent=j;var e=v(R.default);function f(r){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(f=function(c){return c?n:t})(r)}function v(r,t){if(r&&r.__esModule)return r;if(r===null||o(r)!=="object"&&typeof r!="function")return{default:r};var n=f(t);if(n&&n.has(r))return n.get(r);var a={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in r)if(i!=="default"&&Object.prototype.hasOwnProperty.call(r,i)){var d=c?Object.getOwnPropertyDescriptor(r,i):null;d&&(d.get||d.set)?Object.defineProperty(a,i,d):a[i]=r[i]}return a.default=r,n&&n.set(r,a),a}function o(r){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(r)}function l(r,t){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);t&&(a=a.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),n.push.apply(n,a)}return n}function m(r){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(a){O(r,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(n,a))})}return r}function O(r,t,n){return t=S(t),t in r?Object.defineProperty(r,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[t]=n,r}function S(r){var t=x(r,"string");return o(t)==="symbol"?t:String(t)}function x(r,t){if(o(r)!=="object"||r===null)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var a=n.call(r,t);if(o(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}var p=u.__exports.urlRegex=/^(?:([a-z0-9+.-]+):\/\/)(?:\S+(?::\S*)?@)?(?:(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*\.?)(?::\d{2,5})?(?:[/?#]\S*)?$/,s=function(t){var n=t.required;return e.lazy(function(a){return typeof a=="number"?e.number().integer().min(0):typeof a=="string"?e.string().required():!n&&typeof a>"u"?e.mixed().oneOf([void 0]):e.array().required().min(3).max(7).of(e.lazy(function(c,i){var d=i.parent.indexOf(i.value);return[e.number().integer(),e.number().integer().min(1).max(12),e.number().integer().min(1).max(31),e.number().integer().min(0).max(23),e.number().integer().min(0).max(60),e.number().integer().min(0).max(60)][d]}))})},g=e.object().shape({before:e.boolean(),weeks:e.number(),days:e.number(),hours:e.number(),minutes:e.number(),seconds:e.number()}).noUnknown(),y=e.object().shape({name:e.string(),email:e.string().email(),rsvp:e.boolean(),dir:e.string().matches(p),partstat:e.string(),role:e.string(),cutype:e.string(),xNumGuests:e.number()}).noUnknown(),_=e.object().shape({name:e.string(),email:e.string().email(),dir:e.string(),sentBy:e.string()}).noUnknown(),P=e.object().shape({action:e.string().matches(/^(audio|display|email)$/).required(),trigger:e.mixed().required(),description:e.string(),duration:g,repeat:e.number(),attach:e.string(),attachType:e.string(),summary:e.string(),attendee:y,"x-prop":e.mixed(),"iana-prop":e.mixed()}).noUnknown(),h={productId:e.string(),method:e.string(),calName:e.string()},w=e.object().shape(h).noUnknown(),q={summary:e.string(),timestamp:s({required:!1}),title:e.string(),uid:e.string(),sequence:e.number().integer().max(2147483647),start:s({required:!0}),duration:g,startType:e.string().matches(/^(utc|local)$/),startInputType:e.string().matches(/^(utc|local)$/),startOutputType:e.string().matches(/^(utc|local)$/),end:s({required:!1}),endInputType:e.string().matches(/^(utc|local)$/),endOutputType:e.string().matches(/^(utc|local)$/),description:e.string(),url:e.string().matches(p),geo:e.object().shape({lat:e.number(),lon:e.number()}),location:e.string(),status:e.string().matches(/^(TENTATIVE|CANCELLED|CONFIRMED)$/i),categories:e.array().of(e.string()),organizer:_,attendees:e.array().of(y),alarms:e.array().of(P),recurrenceRule:e.string(),busyStatus:e.string().matches(/^(TENTATIVE|FREE|BUSY|OOF)$/i),transp:e.string().matches(/^(TRANSPARENT|OPAQUE)$/i),classification:e.string(),created:s({required:!1}),lastModified:s({required:!1}),exclusionDates:e.array().of(s({required:!0})),htmlContent:e.string()},E=e.object().shape(m(m({},h),q)).test("xor","object should have end or duration (but not both)",function(r){var t=!!r.end,n=!!r.duration;return t&&!n||!t&&n||!t&&!n}).noUnknown();function T(r){try{var t=w.validateSync(r,{abortEarly:!1,strict:!0});return{error:null,value:t}}catch(n){return{error:Object.assign({},n),value:void 0}}}function j(r){try{var t=E.validateSync(r,{abortEarly:!1,strict:!0});return{error:null,value:t}}catch(n){return{error:Object.assign({},n),value:void 0}}}return u.__exports}exports.__require=D;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../../../_virtual/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../../../_virtual/index12.cjs"),q=require("./format-date.cjs"),b=require("./set-geolocation.cjs"),y=require("./set-contact.cjs"),O=require("./set-organizer.cjs"),P=require("./set-alarm.cjs"),v=require("./set-description.cjs"),j=require("./set-summary.cjs"),D=require("./format-duration.cjs"),p=require("./fold-line.cjs"),L=require("./set-location.cjs"),S=require("./encode-param-value.cjs");var n;function z(){return n||(n=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeParamValue",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(r,"foldLine",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,"formatDate",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,"formatDuration",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(r,"setAlarm",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(r,"setContact",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(r,"setDescription",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(r,"setGeolocation",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(r,"setLocation",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(r,"setOrganizer",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(r,"setSummary",{enumerable:!0,get:function(){return l.default}});var i=t(q.__require()),a=t(b.__require()),o=t(y.__require()),c=t(O.__require()),f=t(P.__require()),_=t(v.__require()),l=t(j.__require()),d=t(D.__require()),s=t(p.__require()),m=t(L.__require()),g=t(S.__require());function t(e){return e&&e.__esModule?e:{default:e}}})(u.__exports)),u.__exports}exports.__require=z;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as u } from "../../../../_virtual/
|
|
1
|
+
import { __exports as u } from "../../../../_virtual/index12.js";
|
|
2
2
|
import { __require as g } from "./format-date.js";
|
|
3
3
|
import { __require as b } from "./set-geolocation.js";
|
|
4
4
|
import { __require as p } from "./set-contact.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/index10.cjs"),t=require("./cjs/react-is.production.min.cjs"),o=require("./cjs/react-is.development.cjs");var r;function u(){return r||(r=1,process.env.NODE_ENV==="production"?e.__module.exports=t.__require():e.__module.exports=o.__require()),e.__module.exports}exports.__require=u;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../_virtual/
|
|
1
|
+
import { __module as e } from "../../../../_virtual/index10.js";
|
|
2
2
|
import { __require as o } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as t } from "./cjs/react-is.development.js";
|
|
4
4
|
var r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),q=require("../../_virtual/index.cjs"),p=require("react"),h=require("../../components/Button/Button.cjs"),n=require("../../components/Button/types.cjs"),j=require("../../components/Icon/Icon.cjs"),s=require("../../components/Text/types.cjs"),o=require("../../components/Text/Text.cjs"),t=require("../../utils/index.cjs"),v=require("./utils.cjs"),u=p.forwardRef(({className:c,label:d,onClick:f,isSelected:l,type:e="ChevronDown",count:x,id:i,ariaLabel:b,isMobile:m,totalCount:a},$)=>r.jsxs(h.default,{ref:$,className:q.default(`${t.px}-filter-button`,c,{[`${t.px}-filter-button--selected`]:l||x>0||e==="Filter"&&a>0,[`${t.px}-filter-button--filter`]:e==="Filter"}),"aria-label":b,variant:n.ButtonVariants.secondary,size:n.ButtonSizes.small,"data-testid":`${i}-filter-button`,"data-viewport":m?"mobile":"desktop",onClick:f,children:[r.jsx(o.default,{className:`${t.px}-filter-button__label`,variant:s.TextVariants.labelSmall,"data-testid":`${i}-filter-label`,children:d}),r.jsx(j.default,{icon:v.getIcon(e,l),height:8,width:8,className:`${t.px}__icon`}),a>0&&e==="Filter"&&r.jsx(o.default,{variant:s.TextVariants.labelSmall,className:`${t.px}-filter-button--count`,"data-testid":`${i}-filter-count`,children:a})]}));u.displayName="FilterButton";exports.FilterButton=u;
|
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
import { jsxs as u, jsx as
|
|
1
|
+
import { jsxs as u, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import $ from "../../_virtual/index.js";
|
|
3
3
|
import h from "react";
|
|
4
4
|
import x from "../../components/Button/Button.js";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
5
|
+
import { ButtonSizes as _, ButtonVariants as v } from "../../components/Button/types.js";
|
|
6
|
+
import B from "../../components/Icon/Icon.js";
|
|
7
7
|
import { TextVariants as l } from "../../components/Text/types.js";
|
|
8
8
|
import m from "../../components/Text/Text.js";
|
|
9
9
|
import { px as t } from "../../utils/index.js";
|
|
10
10
|
import { getIcon as F } from "./utils.js";
|
|
11
11
|
const N = h.forwardRef(
|
|
12
|
-
({ className: n, label: s, onClick: f, isSelected:
|
|
12
|
+
({ className: n, label: s, onClick: f, isSelected: o, type: r = "ChevronDown", count: c, id: e, ariaLabel: d, isMobile: b, totalCount: a }, p) => /* @__PURE__ */ u(
|
|
13
13
|
x,
|
|
14
14
|
{
|
|
15
15
|
ref: p,
|
|
16
16
|
className: $(`${t}-filter-button`, n, {
|
|
17
|
-
[`${t}-filter-button--selected`]:
|
|
17
|
+
[`${t}-filter-button--selected`]: o || c > 0 || r === "Filter" && a > 0,
|
|
18
18
|
[`${t}-filter-button--filter`]: r === "Filter"
|
|
19
19
|
}),
|
|
20
20
|
"aria-label": d,
|
|
21
|
-
variant:
|
|
22
|
-
|
|
21
|
+
variant: v.secondary,
|
|
22
|
+
size: _.small,
|
|
23
|
+
"data-testid": `${e}-filter-button`,
|
|
23
24
|
"data-viewport": b ? "mobile" : "desktop",
|
|
24
25
|
onClick: f,
|
|
25
26
|
children: [
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ i(
|
|
27
28
|
m,
|
|
28
29
|
{
|
|
29
30
|
className: `${t}-filter-button__label`,
|
|
30
31
|
variant: l.labelSmall,
|
|
31
|
-
"data-testid": `${
|
|
32
|
+
"data-testid": `${e}-filter-label`,
|
|
32
33
|
children: s
|
|
33
34
|
}
|
|
34
35
|
),
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
36
|
+
/* @__PURE__ */ i(B, { icon: F(r, o), height: 8, width: 8, className: `${t}__icon` }),
|
|
37
|
+
a > 0 && r === "Filter" && /* @__PURE__ */ i(
|
|
37
38
|
m,
|
|
38
39
|
{
|
|
39
40
|
variant: l.labelSmall,
|
|
40
41
|
className: `${t}-filter-button--count`,
|
|
41
|
-
"data-testid": `${
|
|
42
|
-
children:
|
|
42
|
+
"data-testid": `${e}-filter-count`,
|
|
43
|
+
children: a
|
|
43
44
|
}
|
|
44
45
|
)
|
|
45
46
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("../../_virtual/index.cjs"),w=require("react"),o=require("../../components/Button/Button.cjs"),i=require("../../components/Button/types.cjs"),q=require("../../components/Filter/FilterInput.cjs"),B=require("../../utils/index.cjs"),c=require("./utils.cjs"),h=w.forwardRef(({className:f,buttonType:a,filters:d,filterIndex:u,onSelectFilter:p,onClickClear:x,onApplyFilter:m,resultsCount:b,ariaLabels:j,dropdownMenuTranslation:r},_)=>{const l=a==="Sort",t=`${B.px}-filter-dropdown-menu`,k=c.getFilterDimensions(d,u),D=c.hasActiveDimensions(d,a,u);return e.jsxs("div",{className:n.default(t,f),ref:_,"data-testid":"filter-dropdown-desktop","aria-label":j||`${a} dropdown desktop`,children:[e.jsx("div",{className:n.default(`${t}__filters`),children:k.map(s=>e.jsx(q.default,{id:s.label,labelText:s.label,name:s.label,type:l?"radio":"checkbox",checked:s.active,disabled:s?.disabled,onChange:$=>c.handleInputChange($,a??"",p)},s.label))}),e.jsx("div",{className:n.default(l?`${t}__button-wrap`:`${t}__buttons-wrap`),children:l?e.jsx(o.default,{className:n.default(`${t}__button`),variant:i.ButtonVariants.primary,size:i.ButtonSizes.small,onClick:()=>m?.(!1),children:e.jsx("span",{className:`${t}__button-text`,children:r?.confirm||"Confirm"})}):e.jsxs(e.Fragment,{children:[e.jsx(o.default,{variant:i.ButtonVariants.secondary,size:i.ButtonSizes.small,isDisabled:!D,onClick:()=>x?.(a??""),children:r?.clearAll||"Clear all"}),e.jsx(o.default,{variant:i.ButtonVariants.primary,size:i.ButtonSizes.small,onClick:()=>m?.(!1),children:e.jsx("span",{className:`${t}__button-text`,children:r?.showAuctions||`Show ${b} Auctions`})})]})})]})});h.displayName="FilterDropdownMenuDesktop";exports.FilterDropdownMenuDesktop=h;
|
|
@@ -1,80 +1,74 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as h, jsx as e, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import t from "../../_virtual/index.js";
|
|
3
|
+
import x from "react";
|
|
4
4
|
import l from "../../components/Button/Button.js";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { px as
|
|
8
|
-
import { getFilterDimensions as
|
|
9
|
-
const
|
|
5
|
+
import { ButtonSizes as n, ButtonVariants as m } from "../../components/Button/types.js";
|
|
6
|
+
import F from "../../components/Filter/FilterInput.js";
|
|
7
|
+
import { px as g } from "../../utils/index.js";
|
|
8
|
+
import { getFilterDimensions as v, hasActiveDimensions as z, handleInputChange as A } from "./utils.js";
|
|
9
|
+
const B = x.forwardRef(
|
|
10
10
|
({
|
|
11
|
-
className:
|
|
12
|
-
buttonType:
|
|
13
|
-
filters:
|
|
14
|
-
filterIndex:
|
|
11
|
+
className: f,
|
|
12
|
+
buttonType: a,
|
|
13
|
+
filters: c,
|
|
14
|
+
filterIndex: d,
|
|
15
15
|
onSelectFilter: _,
|
|
16
|
-
onClickClear:
|
|
17
|
-
onApplyFilter:
|
|
18
|
-
resultsCount:
|
|
16
|
+
onClickClear: b,
|
|
17
|
+
onApplyFilter: p,
|
|
18
|
+
resultsCount: k,
|
|
19
19
|
ariaLabels: $,
|
|
20
|
-
dropdownMenuTranslation:
|
|
21
|
-
},
|
|
22
|
-
const
|
|
23
|
-
return /* @__PURE__ */
|
|
20
|
+
dropdownMenuTranslation: r
|
|
21
|
+
}, w) => {
|
|
22
|
+
const o = a === "Sort", s = `${g}-filter-dropdown-menu`, C = v(c, d), D = z(c, a, d);
|
|
23
|
+
return /* @__PURE__ */ h(
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
|
-
className:
|
|
27
|
-
ref:
|
|
26
|
+
className: t(s, f),
|
|
27
|
+
ref: w,
|
|
28
28
|
"data-testid": "filter-dropdown-desktop",
|
|
29
|
-
"aria-label": $ || `${
|
|
29
|
+
"aria-label": $ || `${a} dropdown desktop`,
|
|
30
30
|
children: [
|
|
31
|
-
/* @__PURE__ */ e("div", { className:
|
|
32
|
-
|
|
31
|
+
/* @__PURE__ */ e("div", { className: t(`${s}__filters`), children: C.map((i) => /* @__PURE__ */ e(
|
|
32
|
+
F,
|
|
33
33
|
{
|
|
34
|
-
id:
|
|
35
|
-
labelText:
|
|
36
|
-
name:
|
|
37
|
-
type:
|
|
38
|
-
checked:
|
|
39
|
-
disabled:
|
|
40
|
-
onChange: (
|
|
34
|
+
id: i.label,
|
|
35
|
+
labelText: i.label,
|
|
36
|
+
name: i.label,
|
|
37
|
+
type: o ? "radio" : "checkbox",
|
|
38
|
+
checked: i.active,
|
|
39
|
+
disabled: i?.disabled,
|
|
40
|
+
onChange: (N) => A(N, a ?? "", _)
|
|
41
41
|
},
|
|
42
|
-
|
|
42
|
+
i.label
|
|
43
43
|
)) }),
|
|
44
|
-
/* @__PURE__ */ e("div", { className:
|
|
44
|
+
/* @__PURE__ */ e("div", { className: t(o ? `${s}__button-wrap` : `${s}__buttons-wrap`), children: o ? /* @__PURE__ */ e(
|
|
45
45
|
l,
|
|
46
46
|
{
|
|
47
|
-
className:
|
|
48
|
-
variant:
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
className: t(`${s}__button`),
|
|
48
|
+
variant: m.primary,
|
|
49
|
+
size: n.small,
|
|
50
|
+
onClick: () => p?.(!1),
|
|
51
|
+
children: /* @__PURE__ */ e("span", { className: `${s}__button-text`, children: r?.confirm || "Confirm" })
|
|
51
52
|
}
|
|
52
|
-
) : /* @__PURE__ */
|
|
53
|
+
) : /* @__PURE__ */ h(u, { children: [
|
|
53
54
|
/* @__PURE__ */ e(
|
|
54
55
|
l,
|
|
55
56
|
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
variant: m.secondary,
|
|
58
|
+
size: n.small,
|
|
59
|
+
isDisabled: !D,
|
|
60
|
+
onClick: () => b?.(a ?? ""),
|
|
61
|
+
children: r?.clearAll || "Clear all"
|
|
60
62
|
}
|
|
61
63
|
),
|
|
62
|
-
/* @__PURE__ */ e(
|
|
63
|
-
l,
|
|
64
|
-
{
|
|
65
|
-
className: r(`${t}__buttons`),
|
|
66
|
-
variant: n.primary,
|
|
67
|
-
onClick: () => m?.(!1),
|
|
68
|
-
children: /* @__PURE__ */ e("span", { className: `${t}__button-text`, children: s?.showAuctions || `Show ${b} Auctions` })
|
|
69
|
-
}
|
|
70
|
-
)
|
|
64
|
+
/* @__PURE__ */ e(l, { variant: m.primary, size: n.small, onClick: () => p?.(!1), children: /* @__PURE__ */ e("span", { className: `${s}__button-text`, children: r?.showAuctions || `Show ${k} Auctions` }) })
|
|
71
65
|
] }) })
|
|
72
66
|
]
|
|
73
67
|
}
|
|
74
68
|
);
|
|
75
69
|
}
|
|
76
70
|
);
|
|
77
|
-
|
|
71
|
+
B.displayName = "FilterDropdownMenuDesktop";
|
|
78
72
|
export {
|
|
79
|
-
|
|
73
|
+
B as FilterDropdownMenuDesktop
|
|
80
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../../_virtual/index.cjs"),B=require("react"),o=require("../../components/Button/Button.cjs"),a=require("../../components/Button/types.cjs"),C=require("../../components/Filter/FilterInput.cjs"),d=require("../../components/Text/Text.cjs"),c=require("../../components/Text/types.cjs"),N=require("../../utils/index.cjs"),u=require("./utils.cjs"),f=B.forwardRef(({className:h,buttonType:s,filters:m,filterIndex:b,onApplyFilter:x,onClickClear:_,onSelectFilter:$,resultsCount:j,ariaLabels:p,dropdownMenuTranslation:r},q)=>{const n=s==="Sort",t=`${N.px}-filter-dropdown-menu`,w=u.getFilterDimensions(m,b),S=u.hasActiveDimensions(m,s,b);return e.jsxs("div",{className:l.default(`${t}`,h,`${t}--mobile`),ref:q,"data-testid":"filter-dropdown-mobile","aria-label":p||`${s} dropdown mobile`,children:[e.jsx("div",{className:l.default(`${t}__filters`,`${t}__filters--mobile`),children:w.map(i=>e.jsx(C.default,{id:i.label,labelText:i.label,name:i.label,type:n?"radio":"checkbox",checked:i.active,disabled:i?.disabled,onChange:v=>u.handleInputChange(v,s??"",$)},i.label))}),e.jsx("div",{className:l.default(n?`${t}__button-wrap`:`${t}__buttons-wrap`,`${t}__mobile-wrap`),children:n?e.jsx(o.default,{className:l.default(`${t}__button`,`${t}__button--mobile`),variant:a.ButtonVariants.primary,size:a.ButtonSizes.small,onClick:()=>x?.(!1),children:e.jsx(d.default,{variant:c.TextVariants.headingMedium,className:`${t}__button-text`,children:r?.confirm||"Confirm"})}):e.jsxs(e.Fragment,{children:[e.jsx(o.default,{variant:a.ButtonVariants.secondary,size:a.ButtonSizes.small,isDisabled:!S,onClick:()=>_?.(s??""),children:e.jsx(d.default,{variant:c.TextVariants.bodySmall,children:r?.clearAll||"Clear all"})}),e.jsx(o.default,{variant:a.ButtonVariants.primary,size:a.ButtonSizes.small,onClick:()=>x?.(!1),children:e.jsx(d.default,{variant:c.TextVariants.bodySmall,className:`${t}__button-text`,children:r?.showAuctions||`Show ${j} Auctions`})})]})})]})});f.displayName="FilterDropdownMenuMobile";exports.FilterDropdownMenuMobile=f;
|
|
@@ -1,90 +1,76 @@
|
|
|
1
|
-
import { jsxs as _, jsx as e, Fragment as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as _, jsx as e, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import t from "../../_virtual/index.js";
|
|
3
3
|
import g from "react";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import s from "../../components/Button/Button.js";
|
|
5
|
+
import { ButtonSizes as m, ButtonVariants as n } from "../../components/Button/types.js";
|
|
6
6
|
import k from "../../components/Filter/FilterInput.js";
|
|
7
|
-
import
|
|
8
|
-
import { TextVariants as
|
|
9
|
-
import { px as
|
|
10
|
-
import { getFilterDimensions as
|
|
11
|
-
const
|
|
7
|
+
import c from "../../components/Text/Text.js";
|
|
8
|
+
import { TextVariants as d } from "../../components/Text/types.js";
|
|
9
|
+
import { px as F } from "../../utils/index.js";
|
|
10
|
+
import { getFilterDimensions as z, hasActiveDimensions as A, handleInputChange as B } from "./utils.js";
|
|
11
|
+
const M = g.forwardRef(
|
|
12
12
|
({
|
|
13
|
-
className:
|
|
14
|
-
buttonType:
|
|
15
|
-
filters:
|
|
16
|
-
filterIndex:
|
|
17
|
-
onApplyFilter:
|
|
13
|
+
className: p,
|
|
14
|
+
buttonType: r,
|
|
15
|
+
filters: b,
|
|
16
|
+
filterIndex: f,
|
|
17
|
+
onApplyFilter: h,
|
|
18
18
|
onClickClear: $,
|
|
19
|
-
onSelectFilter:
|
|
20
|
-
resultsCount:
|
|
19
|
+
onSelectFilter: u,
|
|
20
|
+
resultsCount: w,
|
|
21
21
|
ariaLabels: x,
|
|
22
|
-
dropdownMenuTranslation:
|
|
23
|
-
},
|
|
24
|
-
const
|
|
22
|
+
dropdownMenuTranslation: l
|
|
23
|
+
}, C) => {
|
|
24
|
+
const o = r === "Sort", i = `${F}-filter-dropdown-menu`, N = z(b, f), v = A(b, r, f);
|
|
25
25
|
return /* @__PURE__ */ _(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
|
-
className:
|
|
29
|
-
ref:
|
|
28
|
+
className: t(`${i}`, p, `${i}--mobile`),
|
|
29
|
+
ref: C,
|
|
30
30
|
"data-testid": "filter-dropdown-mobile",
|
|
31
|
-
"aria-label": x || `${
|
|
31
|
+
"aria-label": x || `${r} dropdown mobile`,
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */ e("div", { className:
|
|
33
|
+
/* @__PURE__ */ e("div", { className: t(`${i}__filters`, `${i}__filters--mobile`), children: N.map((a) => /* @__PURE__ */ e(
|
|
34
34
|
k,
|
|
35
35
|
{
|
|
36
|
-
id:
|
|
37
|
-
labelText:
|
|
38
|
-
name:
|
|
39
|
-
type:
|
|
40
|
-
checked:
|
|
41
|
-
disabled:
|
|
42
|
-
onChange: (
|
|
36
|
+
id: a.label,
|
|
37
|
+
labelText: a.label,
|
|
38
|
+
name: a.label,
|
|
39
|
+
type: o ? "radio" : "checkbox",
|
|
40
|
+
checked: a.active,
|
|
41
|
+
disabled: a?.disabled,
|
|
42
|
+
onChange: (D) => B(D, r ?? "", u)
|
|
43
43
|
},
|
|
44
|
-
|
|
44
|
+
a.label
|
|
45
45
|
)) }),
|
|
46
46
|
/* @__PURE__ */ e(
|
|
47
47
|
"div",
|
|
48
48
|
{
|
|
49
|
-
className:
|
|
50
|
-
|
|
51
|
-
`${
|
|
49
|
+
className: t(
|
|
50
|
+
o ? `${i}__button-wrap` : `${i}__buttons-wrap`,
|
|
51
|
+
`${i}__mobile-wrap`
|
|
52
52
|
),
|
|
53
|
-
children:
|
|
54
|
-
|
|
53
|
+
children: o ? /* @__PURE__ */ e(
|
|
54
|
+
s,
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
57
|
-
variant:
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
className: t(`${i}__button`, `${i}__button--mobile`),
|
|
57
|
+
variant: n.primary,
|
|
58
|
+
size: m.small,
|
|
59
|
+
onClick: () => h?.(!1),
|
|
60
|
+
children: /* @__PURE__ */ e(c, { variant: d.headingMedium, className: `${i}__button-text`, children: l?.confirm || "Confirm" })
|
|
60
61
|
}
|
|
61
|
-
) : /* @__PURE__ */ _(
|
|
62
|
+
) : /* @__PURE__ */ _(S, { children: [
|
|
62
63
|
/* @__PURE__ */ e(
|
|
63
|
-
|
|
64
|
+
s,
|
|
64
65
|
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
)
|
|
70
|
-
variant: m.secondary,
|
|
71
|
-
onClick: () => $?.(o ?? ""),
|
|
72
|
-
children: /* @__PURE__ */ e(s, { variant: c.bodySmall, children: a?.clearAll || "Clear all" })
|
|
66
|
+
variant: n.secondary,
|
|
67
|
+
size: m.small,
|
|
68
|
+
isDisabled: !v,
|
|
69
|
+
onClick: () => $?.(r ?? ""),
|
|
70
|
+
children: /* @__PURE__ */ e(c, { variant: d.bodySmall, children: l?.clearAll || "Clear all" })
|
|
73
71
|
}
|
|
74
72
|
),
|
|
75
|
-
/* @__PURE__ */ e(
|
|
76
|
-
n,
|
|
77
|
-
{
|
|
78
|
-
className: r(
|
|
79
|
-
`${t}__buttons`,
|
|
80
|
-
`${t}__buttons--mobile`,
|
|
81
|
-
`${t}__buttons--right`
|
|
82
|
-
),
|
|
83
|
-
variant: m.primary,
|
|
84
|
-
onClick: () => d?.(!1),
|
|
85
|
-
children: /* @__PURE__ */ e(s, { variant: c.bodySmall, className: `${t}__button-text`, children: a?.showAuctions || `Show ${u} Auctions` })
|
|
86
|
-
}
|
|
87
|
-
)
|
|
73
|
+
/* @__PURE__ */ e(s, { variant: n.primary, size: m.small, onClick: () => h?.(!1), children: /* @__PURE__ */ e(c, { variant: d.bodySmall, className: `${i}__button-text`, children: l?.showAuctions || `Show ${w} Auctions` }) })
|
|
88
74
|
] })
|
|
89
75
|
}
|
|
90
76
|
)
|
|
@@ -93,7 +79,7 @@ const y = g.forwardRef(
|
|
|
93
79
|
);
|
|
94
80
|
}
|
|
95
81
|
);
|
|
96
|
-
|
|
82
|
+
M.displayName = "FilterDropdownMenuMobile";
|
|
97
83
|
export {
|
|
98
|
-
|
|
84
|
+
M as FilterDropdownMenuMobile
|
|
99
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("../../_virtual/index.cjs"),B=require("react"),m=require("../../components/Button/Button.cjs"),s=require("../../components/Button/types.cjs"),A=require("../../components/Drawer/Drawer.cjs"),D=require("../../components/Filter/Filter.cjs"),S=require("../../components/Filter/FilterHeader.cjs"),M=require("../../components/Filter/FilterInput.cjs"),n=require("../../utils/index.cjs"),k=require("../FilterMenu/FilterMenu.cjs"),z=require("./FilterButton.cjs"),N=require("./types.cjs"),a=require("./utils.cjs"),x=B.forwardRef(({className:w,filterButtonLabel:l,handleClick:o,filtersListState:i,filters:d,onSelectFilter:F,onApplyFilter:q,onClickClear:f,resultsCount:j,dropdownMenuTranslation:c,ariaLabels:u={},id:y},h)=>{const p=i?.[0]??!1,{totalCount:b,filterCount:C}=a.countActiveFilters(d,l);return e.jsxs(e.Fragment,{children:[e.jsx(z.FilterButton,{ref:h,className:w,isSelected:p,count:C,label:l,totalCount:b,id:y,ariaLabel:u.button||`${l} button`,onClick:a.getFilterButtonClickHandler(i,o,0),isMobile:!1,type:N.FilterButtonIconType.Filter}),e.jsxs(A.default,{isOpen:p,drawerOpenSide:"left",onClose:()=>a.resetAllFilters(i,o),className:`${n.px}-filter-drawer`,"aria-label":u.drawer||"Filter drawer",paddingLevel:0,children:[e.jsx(k.default,{className:`${n.px}-filter-drawer-menu`,children:d?.map(t=>e.jsxs(D.default,{name:t.label,children:[e.jsx(S.default,{heading:t.label}),Array.from(t.filterDimensions).map(r=>e.jsx(M.default,{id:r.label,labelText:r.label,onChange:$=>F?.($,t.buttonType),type:t.type,disabled:r?.disabled,name:r.label,checked:r.active},r.label))]},t.id))}),e.jsxs("div",{className:g.default(`${n.px}-filter-dropdown-menu__buttons-wrap`,`${n.px}-filter-dropdown-menu__buttons-wrap--drawer`),children:[e.jsx(m.default,{variant:s.ButtonVariants.secondary,size:s.ButtonSizes.small,isDisabled:b===0,onClick:()=>f?.("all"),children:c?.clearAll||"Clear all"}),e.jsx(m.default,{size:s.ButtonSizes.small,onClick:()=>q?.(!1),children:c?.showAuctions||`Show ${j} Auctions`})]})]})]})});x.displayName="MainFilterDropdown";exports.MainFilterDropdown=x;
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { ButtonVariants as
|
|
1
|
+
import { jsxs as t, Fragment as g, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import x from "../../_virtual/index.js";
|
|
3
|
+
import B from "react";
|
|
4
|
+
import f from "../../components/Button/Button.js";
|
|
5
|
+
import { ButtonSizes as u, ButtonVariants as D } from "../../components/Button/types.js";
|
|
6
6
|
import k from "../../components/Drawer/Drawer.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import N from "../../components/Filter/Filter.js";
|
|
8
|
+
import z from "../../components/Filter/FilterHeader.js";
|
|
9
9
|
import M from "../../components/Filter/FilterInput.js";
|
|
10
|
-
import { px as
|
|
11
|
-
import
|
|
12
|
-
import { FilterButton as
|
|
13
|
-
import { FilterButtonIconType as
|
|
14
|
-
import { countActiveFilters as
|
|
15
|
-
const T =
|
|
10
|
+
import { px as l } from "../../utils/index.js";
|
|
11
|
+
import S from "../FilterMenu/FilterMenu.js";
|
|
12
|
+
import { FilterButton as j } from "./FilterButton.js";
|
|
13
|
+
import { FilterButtonIconType as H } from "./types.js";
|
|
14
|
+
import { countActiveFilters as I, getFilterButtonClickHandler as O, resetAllFilters as R } from "./utils.js";
|
|
15
|
+
const T = B.forwardRef(
|
|
16
16
|
({
|
|
17
|
-
className:
|
|
18
|
-
filterButtonLabel:
|
|
17
|
+
className: b,
|
|
18
|
+
filterButtonLabel: i,
|
|
19
19
|
handleClick: a,
|
|
20
|
-
filtersListState:
|
|
20
|
+
filtersListState: n,
|
|
21
21
|
filters: m,
|
|
22
|
-
onSelectFilter:
|
|
23
|
-
onApplyFilter:
|
|
24
|
-
onClickClear:
|
|
25
|
-
resultsCount:
|
|
26
|
-
dropdownMenuTranslation:
|
|
27
|
-
ariaLabels:
|
|
28
|
-
id:
|
|
29
|
-
},
|
|
30
|
-
const
|
|
31
|
-
return /* @__PURE__ */
|
|
22
|
+
onSelectFilter: w,
|
|
23
|
+
onApplyFilter: F,
|
|
24
|
+
onClickClear: h,
|
|
25
|
+
resultsCount: y,
|
|
26
|
+
dropdownMenuTranslation: s,
|
|
27
|
+
ariaLabels: d = {},
|
|
28
|
+
id: C
|
|
29
|
+
}, A) => {
|
|
30
|
+
const p = n?.[0] ?? !1, { totalCount: c, filterCount: _ } = I(m, i);
|
|
31
|
+
return /* @__PURE__ */ t(g, { children: [
|
|
32
32
|
/* @__PURE__ */ o(
|
|
33
|
-
|
|
33
|
+
j,
|
|
34
34
|
{
|
|
35
|
-
ref:
|
|
36
|
-
className:
|
|
37
|
-
isSelected:
|
|
38
|
-
count:
|
|
39
|
-
label:
|
|
40
|
-
totalCount:
|
|
41
|
-
id:
|
|
42
|
-
ariaLabel:
|
|
43
|
-
onClick:
|
|
35
|
+
ref: A,
|
|
36
|
+
className: b,
|
|
37
|
+
isSelected: p,
|
|
38
|
+
count: _,
|
|
39
|
+
label: i,
|
|
40
|
+
totalCount: c,
|
|
41
|
+
id: C,
|
|
42
|
+
ariaLabel: d.button || `${i} button`,
|
|
43
|
+
onClick: O(n, a, 0),
|
|
44
44
|
isMobile: !1,
|
|
45
|
-
type:
|
|
45
|
+
type: H.Filter
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ t(
|
|
49
49
|
k,
|
|
50
50
|
{
|
|
51
|
-
isOpen:
|
|
51
|
+
isOpen: p,
|
|
52
52
|
drawerOpenSide: "left",
|
|
53
|
-
onClose: () =>
|
|
54
|
-
className: `${
|
|
55
|
-
"aria-label":
|
|
53
|
+
onClose: () => R(n, a),
|
|
54
|
+
className: `${l}-filter-drawer`,
|
|
55
|
+
"aria-label": d.drawer || "Filter drawer",
|
|
56
56
|
paddingLevel: 0,
|
|
57
57
|
children: [
|
|
58
|
-
/* @__PURE__ */ o(
|
|
59
|
-
/* @__PURE__ */ o(
|
|
58
|
+
/* @__PURE__ */ o(S, { className: `${l}-filter-drawer-menu`, children: m?.map((e) => /* @__PURE__ */ t(N, { name: e.label, children: [
|
|
59
|
+
/* @__PURE__ */ o(z, { heading: e.label }),
|
|
60
60
|
Array.from(e.filterDimensions).map((r) => /* @__PURE__ */ o(
|
|
61
61
|
M,
|
|
62
62
|
{
|
|
63
63
|
id: r.label,
|
|
64
64
|
labelText: r.label,
|
|
65
|
-
onChange: ($) =>
|
|
65
|
+
onChange: ($) => w?.($, e.buttonType),
|
|
66
66
|
type: e.type,
|
|
67
67
|
disabled: r?.disabled,
|
|
68
68
|
name: r.label,
|
|
@@ -71,24 +71,25 @@ const T = g.forwardRef(
|
|
|
71
71
|
r.label
|
|
72
72
|
))
|
|
73
73
|
] }, e.id)) }),
|
|
74
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ t(
|
|
75
75
|
"div",
|
|
76
76
|
{
|
|
77
|
-
className:
|
|
78
|
-
`${
|
|
79
|
-
`${
|
|
77
|
+
className: x(
|
|
78
|
+
`${l}-filter-dropdown-menu__buttons-wrap`,
|
|
79
|
+
`${l}-filter-dropdown-menu__buttons-wrap--drawer`
|
|
80
80
|
),
|
|
81
81
|
children: [
|
|
82
82
|
/* @__PURE__ */ o(
|
|
83
|
-
|
|
83
|
+
f,
|
|
84
84
|
{
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
variant: D.secondary,
|
|
86
|
+
size: u.small,
|
|
87
|
+
isDisabled: c === 0,
|
|
88
|
+
onClick: () => h?.("all"),
|
|
89
|
+
children: s?.clearAll || "Clear all"
|
|
89
90
|
}
|
|
90
91
|
),
|
|
91
|
-
/* @__PURE__ */ o(
|
|
92
|
+
/* @__PURE__ */ o(f, { size: u.small, onClick: () => F?.(!1), children: s?.showAuctions || `Show ${y} Auctions` })
|
|
92
93
|
]
|
|
93
94
|
}
|
|
94
95
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("../../node_modules/@radix-ui/react-popover/dist/index.cjs"),N=require("react"),y=require("../../components/Drawer/Drawer.cjs"),D=require("../../providers/SeldonProvider/utils.cjs"),$=require("../../utils/index.cjs"),C=require("./FilterButton.cjs"),B=require("./FilterDropdownMenuDesktop.cjs"),H=require("./FilterDropdownMenuMobile.cjs"),O=require("./types.cjs"),t=require("./utils.cjs"),R=require("../../utils/constants.cjs"),k=N.forwardRef(({filterId:n=0,className:p,filterButtonLabel:r,buttonType:o,handleClick:l,filtersListState:s,filters:d,onSelectFilter:g,onApplyFilter:j,onClickClear:q,resultsCount:w,filterButtonLabelTranslated:u,dropdownMenuTranslation:m,ariaLabels:i={},hideDesktopSortButton:v,id:x},M)=>{const a=s?.[n]??!1,{totalCount:S,filterCount:b}=t.countActiveFilters(d,o),F=t.getFilterButtonLabel(r,u||null),h=o===O.FilterButtonType.Sort?`${$.px}-filters-inline__sort`:void 0;return v&&o===O.FilterButtonType.Sort?null:e.jsxs(e.Fragment,{children:[e.jsxs(D.SSRMediaQuery.Media,{lessThan:R.Breakpoints.md,className:h,children:[e.jsx(C.FilterButton,{ref:M,className:p,isSelected:a,count:b,label:F,id:x,totalCount:S,ariaLabel:i.button||`${r} button`,onClick:t.getFilterButtonClickHandler(s,l,n),isMobile:!0,type:o}),e.jsx(y.default,{drawerOpenSide:"bottom",isOpen:a,onClose:()=>t.resetAllFilters(s,l),"aria-label":i.drawer||`${r} drawer`,className:`${$.px}-filter-drawer-mobile`,headerText:F,paddingLevel:0,children:e.jsx(H.FilterDropdownMenuMobile,{buttonType:o,filters:d,filterIndex:n,onSelectFilter:g,onApplyFilter:j,onClickClear:q,resultsCount:w,ariaLabels:i?.ariaLabel,filterButtonLabel:r,filterButtonLabelTranslated:u,dropdownMenuTranslation:m})})]}),e.jsx(D.SSRMediaQuery.Media,{greaterThanOrEqual:R.Breakpoints.md,className:h,children:e.jsxs(c.Root,{open:a,onOpenChange:t.getFilterButtonClickHandler(s,l,n),children:[e.jsx(c.Trigger,{asChild:!0,children:e.jsx(C.FilterButton,{ref:M,className:p,isSelected:a,count:b,label:F,totalCount:S,id:x,ariaLabel:i.ariaLabel||`${r} button`,onClick:t.getFilterButtonClickHandler(s,l,n),isMobile:!1,type:o})}),e.jsx(c.Portal,{children:e.jsx(c.Content,{avoidCollisions:!0,collisionPadding:10,sideOffset:5,align:"start",alignOffset:5,"aria-label":i.ariaLabel||`${r} dropdown`,children:e.jsx(B.FilterDropdownMenuDesktop,{buttonType:o,filters:d,filterIndex:n,onSelectFilter:g,onApplyFilter:j,onClickClear:q,resultsCount:w,ariaLabels:i?.ariaLabel,filterButtonLabel:r,filterButtonLabelTranslated:u,dropdownMenuTranslation:m})})})]},`${x}-${r}-button`)})]})});k.displayName="SubFilterDropdown";exports.SubFilterDropdown=k;
|
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Root as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { SSRMediaQuery as
|
|
6
|
-
import { px as
|
|
7
|
-
import { FilterButton as
|
|
1
|
+
import { jsxs as p, Fragment as _, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Root as j, Trigger as P, Portal as k, Content as q } from "../../node_modules/@radix-ui/react-popover/dist/index.js";
|
|
3
|
+
import A from "react";
|
|
4
|
+
import E from "../../components/Drawer/Drawer.js";
|
|
5
|
+
import { SSRMediaQuery as C } from "../../providers/SeldonProvider/utils.js";
|
|
6
|
+
import { px as D } from "../../utils/index.js";
|
|
7
|
+
import { FilterButton as O } from "./FilterButton.js";
|
|
8
8
|
import { FilterDropdownMenuDesktop as H } from "./FilterDropdownMenuDesktop.js";
|
|
9
|
-
import { FilterDropdownMenuMobile as
|
|
10
|
-
import { FilterButtonType as
|
|
11
|
-
import { countActiveFilters as z, getFilterButtonClickHandler as
|
|
12
|
-
import { Breakpoints as
|
|
13
|
-
const
|
|
9
|
+
import { FilterDropdownMenuMobile as Q } from "./FilterDropdownMenuMobile.js";
|
|
10
|
+
import { FilterButtonType as R } from "./types.js";
|
|
11
|
+
import { countActiveFilters as z, getFilterButtonClickHandler as g, resetAllFilters as G, getFilterButtonLabel as J } from "./utils.js";
|
|
12
|
+
import { Breakpoints as v } from "../../utils/constants.js";
|
|
13
|
+
const K = A.forwardRef(
|
|
14
14
|
({
|
|
15
|
-
filterId:
|
|
16
|
-
className:
|
|
15
|
+
filterId: i = 0,
|
|
16
|
+
className: u,
|
|
17
17
|
filterButtonLabel: r,
|
|
18
|
-
buttonType:
|
|
18
|
+
buttonType: e,
|
|
19
19
|
handleClick: m,
|
|
20
20
|
filtersListState: a,
|
|
21
|
-
filters:
|
|
22
|
-
onSelectFilter:
|
|
23
|
-
onApplyFilter:
|
|
24
|
-
onClickClear:
|
|
25
|
-
resultsCount:
|
|
26
|
-
filterButtonLabelTranslated:
|
|
21
|
+
filters: l,
|
|
22
|
+
onSelectFilter: F,
|
|
23
|
+
onApplyFilter: h,
|
|
24
|
+
onClickClear: w,
|
|
25
|
+
resultsCount: $,
|
|
26
|
+
filterButtonLabelTranslated: d,
|
|
27
27
|
dropdownMenuTranslation: x,
|
|
28
28
|
ariaLabels: n = {},
|
|
29
|
-
hideDesktopSortButton:
|
|
30
|
-
id:
|
|
29
|
+
hideDesktopSortButton: N,
|
|
30
|
+
id: s
|
|
31
31
|
}, M) => {
|
|
32
|
-
const
|
|
33
|
-
return
|
|
34
|
-
/* @__PURE__ */
|
|
32
|
+
const t = a?.[i] ?? !1, { totalCount: S, filterCount: b } = z(l, e), c = J(r, d || null), f = e === R.Sort ? `${D}-filters-inline__sort` : void 0;
|
|
33
|
+
return N && e === R.Sort ? null : /* @__PURE__ */ p(_, { children: [
|
|
34
|
+
/* @__PURE__ */ p(C.Media, { lessThan: v.md, className: f, children: [
|
|
35
35
|
/* @__PURE__ */ o(
|
|
36
|
-
|
|
36
|
+
O,
|
|
37
37
|
{
|
|
38
38
|
ref: M,
|
|
39
|
-
className:
|
|
40
|
-
isSelected:
|
|
41
|
-
count:
|
|
42
|
-
label:
|
|
43
|
-
id:
|
|
44
|
-
totalCount:
|
|
39
|
+
className: u,
|
|
40
|
+
isSelected: t,
|
|
41
|
+
count: b,
|
|
42
|
+
label: c,
|
|
43
|
+
id: s,
|
|
44
|
+
totalCount: S,
|
|
45
45
|
ariaLabel: n.button || `${r} button`,
|
|
46
|
-
onClick:
|
|
46
|
+
onClick: g(a, m, i),
|
|
47
47
|
isMobile: !0,
|
|
48
|
-
type:
|
|
48
|
+
type: e
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
51
|
/* @__PURE__ */ o(
|
|
52
|
-
|
|
52
|
+
E,
|
|
53
53
|
{
|
|
54
54
|
drawerOpenSide: "bottom",
|
|
55
|
-
isOpen:
|
|
56
|
-
onClose:
|
|
55
|
+
isOpen: t,
|
|
56
|
+
onClose: () => G(a, m),
|
|
57
57
|
"aria-label": n.drawer || `${r} drawer`,
|
|
58
|
-
className: `${
|
|
59
|
-
headerText:
|
|
58
|
+
className: `${D}-filter-drawer-mobile`,
|
|
59
|
+
headerText: c,
|
|
60
60
|
paddingLevel: 0,
|
|
61
61
|
children: /* @__PURE__ */ o(
|
|
62
|
-
|
|
62
|
+
Q,
|
|
63
63
|
{
|
|
64
|
-
buttonType:
|
|
65
|
-
filters:
|
|
66
|
-
filterIndex:
|
|
67
|
-
onSelectFilter:
|
|
68
|
-
onApplyFilter:
|
|
69
|
-
onClickClear:
|
|
70
|
-
resultsCount:
|
|
64
|
+
buttonType: e,
|
|
65
|
+
filters: l,
|
|
66
|
+
filterIndex: i,
|
|
67
|
+
onSelectFilter: F,
|
|
68
|
+
onApplyFilter: h,
|
|
69
|
+
onClickClear: w,
|
|
70
|
+
resultsCount: $,
|
|
71
71
|
ariaLabels: n?.ariaLabel,
|
|
72
72
|
filterButtonLabel: r,
|
|
73
|
-
filterButtonLabelTranslated:
|
|
73
|
+
filterButtonLabelTranslated: d,
|
|
74
74
|
dropdownMenuTranslation: x
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
}
|
|
78
78
|
)
|
|
79
79
|
] }),
|
|
80
|
-
/* @__PURE__ */ o(
|
|
81
|
-
|
|
80
|
+
/* @__PURE__ */ o(C.Media, { greaterThanOrEqual: v.md, className: f, children: /* @__PURE__ */ p(
|
|
81
|
+
j,
|
|
82
82
|
{
|
|
83
|
-
open:
|
|
84
|
-
onOpenChange:
|
|
83
|
+
open: t,
|
|
84
|
+
onOpenChange: g(a, m, i),
|
|
85
85
|
children: [
|
|
86
|
-
/* @__PURE__ */ o(
|
|
87
|
-
|
|
86
|
+
/* @__PURE__ */ o(P, { asChild: !0, children: /* @__PURE__ */ o(
|
|
87
|
+
O,
|
|
88
88
|
{
|
|
89
89
|
ref: M,
|
|
90
|
-
className:
|
|
91
|
-
isSelected:
|
|
92
|
-
count:
|
|
93
|
-
label:
|
|
94
|
-
totalCount:
|
|
95
|
-
id:
|
|
90
|
+
className: u,
|
|
91
|
+
isSelected: t,
|
|
92
|
+
count: b,
|
|
93
|
+
label: c,
|
|
94
|
+
totalCount: S,
|
|
95
|
+
id: s,
|
|
96
96
|
ariaLabel: n.ariaLabel || `${r} button`,
|
|
97
|
-
onClick:
|
|
97
|
+
onClick: g(a, m, i),
|
|
98
98
|
isMobile: !1,
|
|
99
|
-
type:
|
|
99
|
+
type: e
|
|
100
100
|
}
|
|
101
101
|
) }),
|
|
102
|
-
/* @__PURE__ */ o(
|
|
103
|
-
|
|
102
|
+
/* @__PURE__ */ o(k, { children: /* @__PURE__ */ o(
|
|
103
|
+
q,
|
|
104
104
|
{
|
|
105
105
|
avoidCollisions: !0,
|
|
106
106
|
collisionPadding: 10,
|
|
@@ -111,16 +111,16 @@ const G = k.forwardRef(
|
|
|
111
111
|
children: /* @__PURE__ */ o(
|
|
112
112
|
H,
|
|
113
113
|
{
|
|
114
|
-
buttonType:
|
|
115
|
-
filters:
|
|
116
|
-
filterIndex:
|
|
117
|
-
onSelectFilter:
|
|
118
|
-
onApplyFilter:
|
|
119
|
-
onClickClear:
|
|
120
|
-
resultsCount:
|
|
114
|
+
buttonType: e,
|
|
115
|
+
filters: l,
|
|
116
|
+
filterIndex: i,
|
|
117
|
+
onSelectFilter: F,
|
|
118
|
+
onApplyFilter: h,
|
|
119
|
+
onClickClear: w,
|
|
120
|
+
resultsCount: $,
|
|
121
121
|
ariaLabels: n?.ariaLabel,
|
|
122
122
|
filterButtonLabel: r,
|
|
123
|
-
filterButtonLabelTranslated:
|
|
123
|
+
filterButtonLabelTranslated: d,
|
|
124
124
|
dropdownMenuTranslation: x
|
|
125
125
|
}
|
|
126
126
|
)
|
|
@@ -128,12 +128,12 @@ const G = k.forwardRef(
|
|
|
128
128
|
) })
|
|
129
129
|
]
|
|
130
130
|
},
|
|
131
|
-
`${
|
|
131
|
+
`${s}-${r}-button`
|
|
132
132
|
) })
|
|
133
133
|
] });
|
|
134
134
|
}
|
|
135
135
|
);
|
|
136
|
-
|
|
136
|
+
K.displayName = "SubFilterDropdown";
|
|
137
137
|
export {
|
|
138
|
-
|
|
138
|
+
K as SubFilterDropdown
|
|
139
139
|
};
|
|
@@ -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("./types.cjs");i.FilterButtonType.Filter,i.FilterButtonType.Sort,i.FilterButtonType.Sale,i.FilterButtonType.Departments,i.FilterButtonType.Location,i.FilterButtonType.Month,i.FilterButtonType.Year;const l=(t,e)=>{if(!t)return{totalCount:0,filterCount:0};const r=t.filter(n=>n.id!=="Sort").reduce((n,s)=>n+Array.from(s.filterDimensions).filter(u=>u.active).length,0),o=e==="Sort"?0:(()=>{const n=t.find(s=>s.id===e)?.filterDimensions;return n?Array.from(n).filter(s=>s.active).length:0})();return{totalCount:r,filterCount:o}},c=(t,e,r)=>{if(!t)return!1;const o=t.find(n=>n.id===e)?.filterDimensions??(typeof r=="number"?t[r-1]?.filterDimensions:void 0);return o?Array.from(o).some(n=>n.active):!1},a=(t,e)=>t&&typeof e=="number"&&t[e-1]&&t[e-1].filterDimensions?Array.from(t[e-1].filterDimensions):[],f=(t,e)=>t==="Filter"?"Filters":e?"ChevronUp":"ChevronDown",m=(t,e,r)=>()=>{t&&e&&e(t.map((o,n)=>n===r?!o:!1))};function F(t,e,r){r&&r(t,e)}function p(t,e){t&&e&&e(t.map(()=>!1))}function y(t,e){return e||`${t}`}exports.countActiveFilters=l;exports.getFilterButtonClickHandler=m;exports.getFilterButtonLabel=y;exports.getFilterDimensions=a;exports.getIcon=f;exports.handleInputChange=F;exports.hasActiveDimensions=c;exports.resetAllFilters=p;
|
|
@@ -48,6 +48,10 @@ export declare const countActiveFilters: (filters?: FilterType[], buttonType?: s
|
|
|
48
48
|
totalCount: number;
|
|
49
49
|
filterCount: number;
|
|
50
50
|
};
|
|
51
|
+
export declare const hasActiveDimensions: (filters: {
|
|
52
|
+
id?: string;
|
|
53
|
+
filterDimensions: Set<FilterDimension>;
|
|
54
|
+
}[] | undefined, buttonType?: string, filterIndex?: number) => boolean;
|
|
51
55
|
export declare const getFilterDimensions: (filters: {
|
|
52
56
|
filterDimensions: Set<FilterDimension>;
|
|
53
57
|
}[] | undefined, filterIndex: number | undefined) => FilterDimension[];
|
|
@@ -1,33 +1,38 @@
|
|
|
1
1
|
import { FilterButtonType as o } from "./types.js";
|
|
2
2
|
o.Filter, o.Sort, o.Sale, o.Departments, o.Location, o.Month, o.Year;
|
|
3
|
-
const
|
|
4
|
-
if (!
|
|
5
|
-
const e =
|
|
6
|
-
(
|
|
3
|
+
const m = (n, t) => {
|
|
4
|
+
if (!n) return { totalCount: 0, filterCount: 0 };
|
|
5
|
+
const e = n.filter((r) => r.id !== "Sort").reduce(
|
|
6
|
+
(r, s) => r + Array.from(s.filterDimensions).filter((u) => u.active).length,
|
|
7
7
|
0
|
|
8
|
-
),
|
|
9
|
-
const
|
|
10
|
-
return
|
|
8
|
+
), i = t === "Sort" ? 0 : (() => {
|
|
9
|
+
const r = n.find((s) => s.id === t)?.filterDimensions;
|
|
10
|
+
return r ? Array.from(r).filter((s) => s.active).length : 0;
|
|
11
11
|
})();
|
|
12
|
-
return { totalCount: e, filterCount:
|
|
13
|
-
},
|
|
14
|
-
|
|
12
|
+
return { totalCount: e, filterCount: i };
|
|
13
|
+
}, c = (n, t, e) => {
|
|
14
|
+
if (!n) return !1;
|
|
15
|
+
const i = n.find((r) => r.id === t)?.filterDimensions ?? (typeof e == "number" ? n[e - 1]?.filterDimensions : void 0);
|
|
16
|
+
return i ? Array.from(i).some((r) => r.active) : !1;
|
|
17
|
+
}, a = (n, t) => n && typeof t == "number" && n[t - 1] && n[t - 1].filterDimensions ? Array.from(n[t - 1].filterDimensions) : [], l = (n, t) => n === "Filter" ? "Filters" : t ? "ChevronUp" : "ChevronDown", D = (n, t, e) => () => {
|
|
18
|
+
n && t && t(n.map((i, r) => r === e ? !i : !1));
|
|
15
19
|
};
|
|
16
|
-
function p(
|
|
17
|
-
e && e(
|
|
20
|
+
function p(n, t, e) {
|
|
21
|
+
e && e(n, t);
|
|
18
22
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
23
|
+
function v(n, t) {
|
|
24
|
+
n && t && t(n.map(() => !1));
|
|
21
25
|
}
|
|
22
|
-
function F(
|
|
23
|
-
return
|
|
26
|
+
function F(n, t) {
|
|
27
|
+
return t || `${n}`;
|
|
24
28
|
}
|
|
25
29
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
m as countActiveFilters,
|
|
31
|
+
D as getFilterButtonClickHandler,
|
|
28
32
|
F as getFilterButtonLabel,
|
|
29
|
-
|
|
33
|
+
a as getFilterDimensions,
|
|
30
34
|
l as getIcon,
|
|
31
35
|
p as handleInputChange,
|
|
32
|
-
|
|
36
|
+
c as hasActiveDimensions,
|
|
37
|
+
v as resetAllFilters
|
|
33
38
|
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
@use '../../allPartials' as *;
|
|
2
2
|
|
|
3
3
|
$dropdown-height: 240px;
|
|
4
|
+
$dropdown-width: 320px;
|
|
4
5
|
|
|
5
6
|
.#{$px}-filter-dropdown-menu {
|
|
6
7
|
background: $white-100;
|
|
7
|
-
border-radius: $radius-
|
|
8
|
+
border-radius: $radius-xs;
|
|
8
9
|
box-shadow: 0 4px 6px $medium-gray;
|
|
9
10
|
display: flex;
|
|
10
11
|
flex-direction: column;
|
|
11
|
-
min-width: 100%;
|
|
12
12
|
padding: $spacing-sm 0;
|
|
13
|
+
width: $dropdown-width;
|
|
13
14
|
|
|
14
15
|
&__filters {
|
|
15
16
|
display: flex;
|
|
@@ -37,6 +38,17 @@ $dropdown-height: 240px;
|
|
|
37
38
|
justify-content: space-between;
|
|
38
39
|
padding: $spacing-sm $spacing-sm 0 $spacing-sm;
|
|
39
40
|
|
|
41
|
+
> .#{$px}-button {
|
|
42
|
+
display: inline-flex;
|
|
43
|
+
flex: 1 1 0;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
margin: 0;
|
|
46
|
+
max-width: none;
|
|
47
|
+
min-width: 0;
|
|
48
|
+
text-align: center;
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
}
|
|
51
|
+
|
|
40
52
|
&--drawer {
|
|
41
53
|
box-shadow: 0 -4px 8px -4px $medium-gray;
|
|
42
54
|
display: flex;
|
|
@@ -50,6 +62,7 @@ $dropdown-height: 240px;
|
|
|
50
62
|
|
|
51
63
|
&__mobile-wrap {
|
|
52
64
|
box-shadow: 0 -4px 8px -4px $medium-gray;
|
|
65
|
+
padding-bottom: calc(#{$spacing-sm} + env(safe-area-inset-bottom));
|
|
53
66
|
}
|
|
54
67
|
|
|
55
68
|
&__header {
|
|
@@ -76,37 +89,14 @@ $dropdown-height: 240px;
|
|
|
76
89
|
}
|
|
77
90
|
}
|
|
78
91
|
|
|
79
|
-
&__buttons {
|
|
80
|
-
align-items: center;
|
|
81
|
-
display: flex;
|
|
82
|
-
flex-direction: row;
|
|
83
|
-
justify-content: space-between;
|
|
84
|
-
|
|
85
|
-
&--left {
|
|
86
|
-
margin-left: auto;
|
|
87
|
-
margin-right: 0;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
&--right {
|
|
91
|
-
margin-left: 0;
|
|
92
|
-
margin-right: auto;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&--mobile {
|
|
96
|
-
display: block;
|
|
97
|
-
margin-bottom: $spacing-md;
|
|
98
|
-
margin-top: $spacing-sm;
|
|
99
|
-
width: 45%;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
92
|
&__button-text {
|
|
104
93
|
color: $white-100;
|
|
105
94
|
}
|
|
106
95
|
|
|
107
96
|
&--mobile {
|
|
108
|
-
border-radius: $radius-
|
|
97
|
+
border-radius: $radius-xs $radius-xs 0 0;
|
|
109
98
|
box-shadow: none;
|
|
99
|
+
height: 100%;
|
|
110
100
|
padding: 0;
|
|
111
101
|
width: 100vw;
|
|
112
102
|
}
|
|
@@ -131,7 +121,37 @@ $dropdown-height: 240px;
|
|
|
131
121
|
}
|
|
132
122
|
.#{$px}-input__input[type='checkbox'] {
|
|
133
123
|
align-self: center;
|
|
124
|
+
appearance: none;
|
|
125
|
+
background: $bg-default;
|
|
126
|
+
border: 1px solid $bg-inverted;
|
|
127
|
+
border-radius: $radius-xs;
|
|
128
|
+
display: grid;
|
|
129
|
+
height: 16px;
|
|
130
|
+
margin-bottom: 0;
|
|
134
131
|
margin-left: auto;
|
|
132
|
+
padding: 0;
|
|
133
|
+
place-content: center;
|
|
134
|
+
width: 16px;
|
|
135
|
+
|
|
136
|
+
&::after {
|
|
137
|
+
background: $text-inverted;
|
|
138
|
+
content: '';
|
|
139
|
+
height: 11px;
|
|
140
|
+
mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='black' stroke-linecap='square' stroke-width='2'/%3E%3C/svg%3E");
|
|
141
|
+
mask-position: center;
|
|
142
|
+
mask-repeat: no-repeat;
|
|
143
|
+
mask-size: 16px 11px;
|
|
144
|
+
opacity: 0;
|
|
145
|
+
width: 16px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&:checked {
|
|
149
|
+
background: $bg-inverted;
|
|
150
|
+
|
|
151
|
+
&::after {
|
|
152
|
+
opacity: 1;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
135
155
|
}
|
|
136
156
|
}
|
|
137
157
|
|
|
@@ -140,5 +160,44 @@ $dropdown-height: 240px;
|
|
|
140
160
|
}
|
|
141
161
|
|
|
142
162
|
.#{$px}-filter-drawer-mobile {
|
|
163
|
+
height: min(70dvh, 640px);
|
|
143
164
|
padding: 0;
|
|
165
|
+
|
|
166
|
+
.#{$px}-drawer__content {
|
|
167
|
+
flex: 1 1 auto;
|
|
168
|
+
height: auto;
|
|
169
|
+
min-height: 0;
|
|
170
|
+
overflow: hidden;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.#{$px}-filter-dropdown-menu--mobile {
|
|
174
|
+
min-height: 0;
|
|
175
|
+
overflow: hidden;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.#{$px}-filter-dropdown-menu__filters--mobile {
|
|
179
|
+
flex: 1 1 auto;
|
|
180
|
+
max-height: none;
|
|
181
|
+
min-height: 0;
|
|
182
|
+
overflow-y: auto;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.#{$px}-filter-dropdown-menu__mobile-wrap {
|
|
186
|
+
flex: 0 0 auto;
|
|
187
|
+
margin-top: 0;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.#{$px}-filter-drawer {
|
|
192
|
+
.#{$px}-filter-drawer-menu {
|
|
193
|
+
flex: 1 1 auto;
|
|
194
|
+
min-height: 0;
|
|
195
|
+
overflow-y: auto;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.#{$px}-filter-dropdown-menu__buttons-wrap--drawer {
|
|
199
|
+
flex: 0 0 auto;
|
|
200
|
+
margin-top: auto;
|
|
201
|
+
overflow: visible;
|
|
202
|
+
}
|
|
144
203
|
}
|
|
@@ -4,6 +4,28 @@
|
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-wrap: wrap;
|
|
6
6
|
gap: $spacing-sm;
|
|
7
|
+
|
|
8
|
+
// Desktop: align the Sort filter (and anything following it) to the right of the filter row.
|
|
9
|
+
@include media($breakpoint-md) {
|
|
10
|
+
> .#{$px}-filters-inline__sort {
|
|
11
|
+
margin-left: auto;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Mobile: filter buttons scroll horizontally and overflow off-screen instead of wrapping.
|
|
16
|
+
@include media($breakpoint-md, 'max') {
|
|
17
|
+
flex-wrap: nowrap;
|
|
18
|
+
overflow-x: auto;
|
|
19
|
+
scrollbar-width: none;
|
|
20
|
+
|
|
21
|
+
&::-webkit-scrollbar {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
> * {
|
|
26
|
+
flex: 0 0 auto;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
7
29
|
}
|
|
8
30
|
|
|
9
31
|
.#{$px}-filter-drawer {
|