@ds-mo/ui 14.6.0 → 14.7.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/.package-ready.json +1 -1
- package/dist/agent-patterns.json +6 -6
- package/dist/agent.json +49 -19
- package/dist/angular/ds-menu.d.ts +7 -1
- package/dist/angular/ds-menu.js +5 -2
- package/dist/angular/ds-table.d.ts +4 -1
- package/dist/angular/ds-table.js +7 -4
- package/dist/components/ds-agent-questionnaire.js +1 -1
- package/dist/components/ds-agent-response.js +1 -1
- package/dist/components/ds-banner.js +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-title.js +1 -1
- package/dist/components/ds-bar-workflow.js +1 -1
- package/dist/components/ds-bar-workflow.js.map +1 -1
- package/dist/components/ds-button-unfilled.js +1 -1
- package/dist/components/ds-card-chart.js +1 -1
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-code-block.js +1 -1
- package/dist/components/ds-conversation-list-item.js +1 -1
- package/dist/components/ds-conversation-list-item.js.map +1 -1
- package/dist/components/ds-filter-menu.js +1 -1
- package/dist/components/ds-filter-menu.js.map +1 -1
- package/dist/components/ds-input.js +1 -1
- package/dist/components/ds-markdown.js +1 -1
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-message-actions.js +1 -1
- package/dist/components/ds-message-composer.js +1 -1
- package/dist/components/ds-message-scroller.js +1 -1
- package/dist/components/ds-mobile-header.js +1 -1
- package/dist/components/ds-mobile-section-switcher.js +1 -1
- package/dist/components/ds-mobile-sheet-nav.js +1 -1
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-pagination.js +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-tool-header.js +1 -1
- package/dist/components/ds-panel-tool-search.js +1 -1
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-shell-app.js +1 -1
- package/dist/components/ds-shell-tools.js +1 -1
- package/dist/components/ds-table.js +1 -1
- package/dist/components/ds-table.js.map +1 -1
- package/dist/components/ds-toast.js +1 -1
- package/dist/components/{p-BGQUiJuJ.js → p--VFa9x3k.js} +2 -2
- package/dist/components/{p-C7-ylLcB.js → p-B5um-ps9.js} +2 -2
- package/dist/components/{p-K_vg9Eng.js → p-BAebDW3a.js} +2 -2
- package/dist/components/p-BKWgofxz.js +2 -0
- package/dist/components/p-BKWgofxz.js.map +1 -0
- package/dist/components/{p-DL12lNtv.js → p-BmqfTAXM.js} +2 -2
- package/dist/components/{p-CDEME0Uc.js → p-C-L4InQ0.js} +2 -2
- package/dist/components/{p-BykcjUd6.js → p-C1jsgfeh.js} +2 -2
- package/dist/components/{p-BFDKKBYh.js → p-CoQSB3tl.js} +2 -2
- package/dist/components/{p-DJ-n-gyr.js → p-CvwtYbmh.js} +2 -2
- package/dist/components/{p-os90t2-f.js → p-D5VglrfF.js} +2 -2
- package/dist/components/{p-BX-R5EhL.js → p-D5bPuNiF.js} +2 -2
- package/dist/components/{p-CCpJcSTE.js → p-DOC4RaAy.js} +2 -2
- package/dist/components/{p-C5230yJY.js → p-DQUxg6Si.js} +2 -2
- package/dist/components/{p-DTf90AyI.js → p-bQm3gfr1.js} +2 -2
- package/dist/components/{p-CTTDiW33.js → p-c_5SXjwx.js} +2 -2
- package/dist/components/p-c_5SXjwx.js.map +1 -0
- package/dist/components/p-mLRtp5A4.js +2 -0
- package/dist/components/{p-3r4TfcZX.js.map → p-mLRtp5A4.js.map} +1 -1
- package/dist/docs/components.json +154 -3
- package/dist/mcp-data/registry/button-unfilled.json +6 -6
- package/dist/mcp-data/registry/menu.json +40 -12
- package/dist/mcp-data/registry/registry.json +48 -18
- package/dist/mcp-data/registry/table.json +81 -9
- package/dist/react/ds-menu.d.ts +2 -1
- package/dist/react/ds-menu.js +2 -1
- package/dist/react/ds-table.d.ts +2 -1
- package/dist/react/ds-table.js +2 -1
- package/dist/styles/table.css +22 -1
- package/dist/types/components/ButtonUnfilled/ButtonUnfilled.d.ts +4 -2
- package/dist/types/components/Menu/Menu.d.ts +18 -1
- package/dist/types/components/Menu/menu-reorder.d.ts +21 -0
- package/dist/types/components/Menu/menu-types.d.ts +12 -0
- package/dist/types/components/Table/Table.d.ts +28 -1
- package/dist/types/components/Table/index.d.ts +1 -1
- package/dist/types/components/Table/table-column-customizer.d.ts +33 -0
- package/dist/types/components/Table/table-types.d.ts +5 -0
- package/dist/types/components.d.ts +44 -6
- package/package.json +1 -1
- package/dist/components/p-3r4TfcZX.js +0 -2
- package/dist/components/p-CRi7P5gQ.js +0 -2
- package/dist/components/p-CRi7P5gQ.js.map +0 -1
- package/dist/components/p-CTTDiW33.js.map +0 -1
- /package/dist/components/{p-BGQUiJuJ.js.map → p--VFa9x3k.js.map} +0 -0
- /package/dist/components/{p-C7-ylLcB.js.map → p-B5um-ps9.js.map} +0 -0
- /package/dist/components/{p-K_vg9Eng.js.map → p-BAebDW3a.js.map} +0 -0
- /package/dist/components/{p-DL12lNtv.js.map → p-BmqfTAXM.js.map} +0 -0
- /package/dist/components/{p-CDEME0Uc.js.map → p-C-L4InQ0.js.map} +0 -0
- /package/dist/components/{p-BykcjUd6.js.map → p-C1jsgfeh.js.map} +0 -0
- /package/dist/components/{p-BFDKKBYh.js.map → p-CoQSB3tl.js.map} +0 -0
- /package/dist/components/{p-DJ-n-gyr.js.map → p-CvwtYbmh.js.map} +0 -0
- /package/dist/components/{p-os90t2-f.js.map → p-D5VglrfF.js.map} +0 -0
- /package/dist/components/{p-BX-R5EhL.js.map → p-D5bPuNiF.js.map} +0 -0
- /package/dist/components/{p-CCpJcSTE.js.map → p-DOC4RaAy.js.map} +0 -0
- /package/dist/components/{p-C5230yJY.js.map → p-DQUxg6Si.js.map} +0 -0
- /package/dist/components/{p-DTf90AyI.js.map → p-bQm3gfr1.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as i,c as t,h as r,a as o,t as n}from"./index.js";import{A as s}from"./p-BBxcMVqk.js";import{C as d}from"./p-tR8INOIN.js";import{c}from"./p-BAgjMUt3.js";import{d as a}from"./p-D8nnhQNJ.js";import{d as l}from"./p-CTTDiW33.js";import{d as f}from"./p-C5TrNd31.js";import{d as u}from"./p-BFfLvMZd.js";import{d as h}from"./p-Ca-I2UnB.js";import{d as m}from"./p-jMCRaxQW.js";import{d as g}from"./p-DZFilC--.js";import{d as v}from"./p-BXPQmp7q.js";import{b as p,a as b,T as x}from"./p-NdahPypA.js";import{r as y}from"./p-BMc0DE59.js";import{r as w}from"./p-DhKvqh5G.js";import{C as _}from"./p-CuwopElg.js";import{c as k}from"./p-DuFm-ieS.js";const C=()=>`@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.sc-ds-filter-menu-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-filter-menu-h,.ds-focus-ring.sc-ds-filter-menu,.ds-focus-ring-inset.sc-ds-filter-menu-h,.ds-focus-ring-inset.sc-ds-filter-menu{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-filter-menu-h:focus-visible,.ds-focus-ring.sc-ds-filter-menu:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-filter-menu-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-filter-menu{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-filter-menu-h:focus-visible,.ds-focus-ring-inset.sc-ds-filter-menu:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-filter-menu-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-filter-menu:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){.sc-ds-filter-menu-h{--ds-focus-ring-color:var(--ds-forced-color-selected)}}@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-interaction-fill.sc-ds-filter-menu-h,.ds-interaction-fill.sc-ds-filter-menu{position:var(--ds-interaction-position, relative);z-index:var(--ds-interaction-z-index, 0);cursor:default;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active-brand);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent;--ds-interaction-divider-width:0px;--ds-interaction-divider-color:transparent;--ds-interaction-divider-inline-start-width:0px;--ds-interaction-divider-inline-start-color:transparent;--ds-interaction-divider-inline-end-width:0px;--ds-interaction-divider-inline-end-color:transparent}.ds-interaction-fill.sc-ds-filter-menu-h::before,.ds-interaction-fill.sc-ds-filter-menu::before,.ds-interaction-fill.sc-ds-filter-menu-h::after,.ds-interaction-fill.sc-ds-filter-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}.ds-interaction-fill.sc-ds-filter-menu-h::before,.ds-interaction-fill.sc-ds-filter-menu::before{z-index:1}.ds-interaction-fill.sc-ds-filter-menu-h::after,.ds-interaction-fill.sc-ds-filter-menu::after{z-index:3;box-shadow:inset 0 calc(-1 * var(--ds-interaction-divider-width)) 0 var(--ds-interaction-divider-color), inset var(--ds-interaction-divider-inline-start-width) 0 0 var(--ds-interaction-divider-inline-start-color), inset calc(-1 * var(--ds-interaction-divider-inline-end-width)) 0 0 var(--ds-interaction-divider-inline-end-color), inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.ds-interaction-fill--bordered.sc-ds-filter-menu-h,.ds-interaction-fill--bordered.sc-ds-filter-menu{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}.ds-interaction-fill--selected.sc-ds-filter-menu-h::before,.ds-interaction-fill--selected.sc-ds-filter-menu::before{background:var(--ds-interaction-active)}.ds-interaction-fill--selected.sc-ds-filter-menu-h,.ds-interaction-fill--selected.sc-ds-filter-menu{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-filter-menu-h:hover:not(:disabled)::after,.ds-interaction-fill.sc-ds-filter-menu:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}.ds-interaction-fill.sc-ds-filter-menu-h:active:not(:disabled)::after,.ds-interaction-fill.sc-ds-filter-menu:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}.ds-interaction-fill--grouped.sc-ds-filter-menu-h::after,.ds-interaction-fill--grouped.sc-ds-filter-menu::after,.ds-interaction-fill--grouped.sc-ds-filter-menu-h:active:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-filter-menu:active:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill--grouped.sc-ds-filter-menu-h:hover:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-filter-menu:hover:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}}.ds-interaction-fill--grouped.sc-ds-filter-menu-h,.ds-interaction-fill--grouped.sc-ds-filter-menu{--ds-interaction-divider-width:var(--ds-interaction-group-divider-width, 0px);--ds-interaction-divider-color:var(--ds-interaction-group-divider-color, transparent);--ds-interaction-divider-inline-start-width:var( --ds-interaction-group-divider-inline-start-width, 0px );--ds-interaction-divider-inline-start-color:var( --ds-interaction-group-divider-inline-start-color, transparent );--ds-interaction-divider-inline-end-width:var( --ds-interaction-group-divider-inline-end-width, 0px );--ds-interaction-divider-inline-end-color:var( --ds-interaction-group-divider-inline-end-color, transparent )}.ds-interaction-fill.sc-ds-filter-menu-h>.ds-interaction-fill__content.sc-ds-filter-menu,.ds-interaction-fill.sc-ds-filter-menu>.ds-interaction-fill__content.sc-ds-filter-menu,.ds-interaction-fill__content.sc-ds-filter-menu{position:relative;z-index:2;cursor:inherit}.ds-interaction-fill--on-faint.sc-ds-filter-menu-h,.ds-interaction-fill--on-faint.sc-ds-filter-menu{--ds-interaction-active:var(--color-interaction-active)}.ds-interaction-fill--on-medium.sc-ds-filter-menu-h,.ds-interaction-fill--on-medium.sc-ds-filter-menu{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}.ds-interaction-fill--on-bold.sc-ds-filter-menu-h,.ds-interaction-fill--on-bold.sc-ds-filter-menu{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}.ds-interaction-fill--on-strong.sc-ds-filter-menu-h,.ds-interaction-fill--on-strong.sc-ds-filter-menu{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}.ds-interaction-fill--on-translucent.sc-ds-filter-menu-h,.ds-interaction-fill--on-translucent.sc-ds-filter-menu{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active-brand);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}.ds-interaction-fill--on-inverted.sc-ds-filter-menu-h,.ds-interaction-fill--on-inverted.sc-ds-filter-menu{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active-brand);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}.ds-interaction-fill--on-media.sc-ds-filter-menu-h,.ds-interaction-fill--on-media.sc-ds-filter-menu{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}.ds-interaction-fill--on-always-dark.sc-ds-filter-menu-h,.ds-interaction-fill--on-always-dark.sc-ds-filter-menu{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active-brand);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}.ds-interaction-fill--on-navigation.sc-ds-filter-menu-h,.ds-interaction-fill--on-navigation.sc-ds-filter-menu{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}@media (forced-colors: active){.ds-interaction-fill.sc-ds-filter-menu-h::after,.ds-interaction-fill.sc-ds-filter-menu::after{box-shadow:none;outline:var(--ds-interaction-border-width) solid var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--ds-interaction-border-width))}.ds-interaction-fill--selected.sc-ds-filter-menu-h::before,.ds-interaction-fill--selected.sc-ds-filter-menu::before{background:transparent;outline:var(--dimension-stroke-width-025) solid var(--ds-forced-color-selected);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}}@media (forced-colors: active) and (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-filter-menu-h:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after,.ds-interaction-fill.sc-ds-filter-menu:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline-color:var(--ds-forced-color-selected);outline-width:var(--dimension-stroke-width-012)}}@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-control-inactive.sc-ds-filter-menu-h,.ds-control-inactive.sc-ds-filter-menu{opacity:var(--effect-opacity-medium);pointer-events:none;cursor:not-allowed}@media (forced-colors: active){.ds-control-inactive.sc-ds-filter-menu-h,.ds-control-inactive.sc-ds-filter-menu{color:var(--ds-forced-color-disabled);opacity:1}}.ds-control--lg.sc-ds-filter-menu,.ds-control--lg.sc-ds-filter-menu-h,.ds-control--md.sc-ds-filter-menu-h,.ds-control--md.sc-ds-filter-menu,.ds-control--sm.sc-ds-filter-menu-h,.ds-control--sm.sc-ds-filter-menu,.ds-control--xs.sc-ds-filter-menu-h,.ds-control--xs.sc-ds-filter-menu{--ds-control-radius:var(--dimension-radius-025)}.ds-control--lg.sc-ds-filter-menu-h,.ds-control--lg.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-filter-menu-h,.ds-control--md.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-filter-menu-h,.ds-control--sm.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-filter-menu-h,.ds-control--xs.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-chrome-space--sm.sc-ds-filter-menu-h,.ds-chrome-space--sm.sc-ds-filter-menu{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-filter-menu-h,.ds-chrome-space--md.sc-ds-filter-menu{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-filter-menu-h,.ds-chrome-space--lg.sc-ds-filter-menu{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-filter-menu-h,.ds-chrome-row.sc-ds-filter-menu,.ds-chrome-column.sc-ds-filter-menu-h,.ds-chrome-column.sc-ds-filter-menu,.ds-chrome-grid.sc-ds-filter-menu-h,.ds-chrome-grid.sc-ds-filter-menu{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-filter-menu-h,.ds-chrome-row.sc-ds-filter-menu{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-filter-menu-h,.ds-chrome-column.sc-ds-filter-menu{flex-direction:column}.ds-chrome-grid.sc-ds-filter-menu-h,.ds-chrome-grid.sc-ds-filter-menu{display:grid;align-items:center}.ds-control-frame.sc-ds-filter-menu{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-filter-menu{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-filter-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-filter-menu{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-control-label-dot.sc-ds-filter-menu{position:relative;padding-inline-end:calc( var(--ds-control-label-inset, var(--dimension-space-025)) + var(--ds-control-gap, var(--dimension-space-050)) )}.ds-control-label-dot__badge.sc-ds-filter-menu{position:absolute;inset-block-start:0;inset-inline-end:0;pointer-events:none}.ds-empty-region.sc-ds-filter-menu{display:flex;flex:1 1 auto;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:0}.ds-empty-region--padded.sc-ds-filter-menu{padding:var(--dimension-space-200)}.sc-ds-filter-menu:where(.ds-text-decoration,.ds-text-action).sc-ds-filter-menu{text-decoration-color:var(--ds-text-decoration-color, var(--color-foreground-tertiary));text-decoration-thickness:var(--ds-text-decoration-thickness, var(--dimension-stroke-width-012));text-underline-offset:var(--ds-text-decoration-offset, var(--dimension-space-025))}.ds-text-action.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-bold-brand);--ds-text-decoration-color:var(--ds-text-action-foreground);color:var(--ds-text-action-foreground);text-decoration-line:none}.ds-text-action--on-medium.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-on-medium-background-primary);--ds-text-decoration-color:var(--color-foreground-on-medium-background-secondary);text-decoration-line:underline}.ds-text-action--on-strong.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-on-strong-background-primary);--ds-text-decoration-color:var(--color-foreground-on-strong-background-secondary);text-decoration-line:underline}.ds-text-action--on-bold.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-on-bold-background-primary);--ds-text-decoration-color:var(--color-foreground-on-bold-background-secondary);text-decoration-line:underline}@media (hover: hover) and (pointer: fine){.ds-text-action.sc-ds-filter-menu:hover{text-decoration-line:underline}}@media (forced-colors: active){.ds-text-action.sc-ds-filter-menu{text-decoration-line:underline;text-decoration-color:currentcolor}}.ds-choice-popup.sc-ds-filter-menu{box-sizing:border-box;display:flex;flex-direction:column;min-width:var(--dimension-menu-width-xs);max-width:min( var(--dimension-panel-width-lg), calc(100vw - var(--dimension-space-200)) );max-height:calc(100vh - var(--dimension-space-200));overflow:hidden;inset:auto;margin:0;padding:0;border:0;background-color:var(--color-background-primary);border-radius:var(--dimension-radius-075);box-shadow:var(--effect-shadow-elevated-floating);animation:dsChoiceFadeIn var(--effect-motion-short-2) forwards;backface-visibility:hidden;will-change:transform;text-align:start}.ds-choice-popup.sc-ds-filter-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:var(--effect-highlight-elevated-floating)}.ds-choice-popup--closing.sc-ds-filter-menu{animation:dsChoiceFadeOut var(--effect-motion-short-2) forwards}@keyframes dsChoiceFadeIn{from{opacity:0;transform:inherit scale(0.97)}to{opacity:1}}@keyframes dsChoiceFadeOut{from{opacity:1}to{opacity:0}}@media (prefers-reduced-motion: reduce){.ds-choice-popup.sc-ds-filter-menu{animation:none;opacity:1}.ds-choice-popup--closing.sc-ds-filter-menu{opacity:0}}.ds-choice-list.sc-ds-filter-menu{display:flex;flex-direction:column;min-height:0;overflow-y:auto;overscroll-behavior:contain}.ds-choice-section--divided.sc-ds-filter-menu{border-bottom:var(--dimension-stroke-width-015) solid var(--color-border-tertiary)}ds-text.ds-choice-section__header.sc-ds-filter-menu{text-align:start;-webkit-user-select:none;user-select:none}.ds-choice-section--headed-after-first.sc-ds-filter-menu{margin-block-start:var(--dimension-space-050)}.ds-choice-item.sc-ds-filter-menu{width:100%;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));background:transparent;cursor:default;-webkit-user-select:none;user-select:none;text-align:left;color:inherit}.ds-choice-item.sc-ds-filter-menu:has(.ds-choice-item__subtext){height:auto;min-height:var(--ds-control-height, var(--dimension-size-400));padding-block:var(--ds-control-padding-inline, var(--dimension-space-075));align-items:flex-start}.ds-choice-item__content.sc-ds-filter-menu{display:flex;flex:1;flex-direction:column;gap:var(--dimension-space-025);min-width:0}ds-text.ds-choice-item__label.sc-ds-filter-menu{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ds-text.ds-choice-item__subtext.sc-ds-filter-menu{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ds-choice-item__icon.sc-ds-filter-menu,.ds-choice-item__suffix.sc-ds-filter-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md));pointer-events:none}.ds-choice-item__tag.sc-ds-filter-menu{flex-shrink:0;pointer-events:none}.ds-choice-empty.sc-ds-filter-menu,.ds-choice-loading.sc-ds-filter-menu{min-height:var(--dimension-size-600);padding:var(--dimension-space-100)}.ds-choice-footer.sc-ds-filter-menu{position:relative;box-sizing:border-box;padding-block:var(--dimension-space-050)}.ds-choice-footer.sc-ds-filter-menu::before{content:'';position:absolute;inset:0 0 auto;height:var(--dimension-stroke-width-012);background-color:var(--color-border-tertiary);pointer-events:none}.ds-choice-footer__content.sc-ds-filter-menu{display:flex;align-items:center;justify-content:space-between;column-gap:var(--dimension-space-050);box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400))}.ds-choice-footer__summary.sc-ds-filter-menu,.ds-choice-footer__summary-measure.sc-ds-filter-menu,.ds-choice-footer__clear.sc-ds-filter-menu ds-text.sc-ds-filter-menu,.ds-choice-footer__action.sc-ds-filter-menu ds-text.sc-ds-filter-menu{padding-inline:calc( var(--dimension-space-050) + var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-choice-footer__summary.sc-ds-filter-menu,.ds-choice-footer__summary-measure.sc-ds-filter-menu,.ds-choice-footer__clear.sc-ds-filter-menu,.ds-choice-footer__action.sc-ds-filter-menu{white-space:nowrap}.ds-choice-footer__summary-measure.sc-ds-filter-menu{position:absolute;visibility:hidden;pointer-events:none}.ds-choice-footer__clear.sc-ds-filter-menu,.ds-choice-footer__action.sc-ds-filter-menu{appearance:none;display:inline-flex;align-items:center;padding:0;border:0;border-radius:var(--dimension-radius-025);background:transparent;cursor:default}@media (forced-colors: active){.ds-choice-popup.sc-ds-filter-menu{outline:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);outline-offset:calc(-1 * var(--dimension-stroke-width-012))}.ds-choice-popup.sc-ds-filter-menu::after{box-shadow:none}.ds-choice-section--divided.sc-ds-filter-menu{border-bottom-color:var(--ds-forced-color-content)}.ds-choice-footer.sc-ds-filter-menu::before{background-color:var(--ds-forced-color-content)}}.ds-control-frame.sc-ds-filter-menu{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-filter-menu{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-filter-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-filter-menu{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-control-label-dot.sc-ds-filter-menu{position:relative;padding-inline-end:calc( var(--ds-control-label-inset, var(--dimension-space-025)) + var(--ds-control-gap, var(--dimension-space-050)) )}.ds-control-label-dot__badge.sc-ds-filter-menu{position:absolute;inset-block-start:0;inset-inline-end:0;pointer-events:none}.ds-control-width--hug.sc-ds-filter-menu-h,.ds-control-width--hug.sc-ds-filter-menu{width:fit-content;max-width:100%;flex:0 0 auto;align-self:flex-start}.ds-control-width--fill.sc-ds-filter-menu-h,.ds-control-width--fill.sc-ds-filter-menu{width:100%;min-width:0;flex:1 1 auto;align-self:stretch}.ds-select-trigger-host.sc-ds-filter-menu-h{display:inline-flex;position:relative;outline:none;--ds-select-fg:var(--color-foreground-secondary);--ds-select-fg-active:var(--color-foreground-primary);--ds-select-prefix-fg:var(--ds-select-fg);--ds-select-chevron-fg:var(--ds-select-fg);--ds-select-border:var(--color-border-secondary)}.ds-control-width--fill.sc-ds-filter-menu-h .trigger.sc-ds-filter-menu{width:100%}.trigger.sc-ds-filter-menu{justify-content:flex-start;background:transparent;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));color:var(--ds-select-fg);cursor:default;font-family:inherit;-webkit-user-select:none;user-select:none;overflow:hidden;transition:color var(--effect-motion-short-2)}.trigger--bordered.sc-ds-filter-menu{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--ds-select-border)}.trigger--expanded.sc-ds-filter-menu{--ds-interaction-hover:var(--ds-interaction-pressed)}.trigger--expanded.sc-ds-filter-menu::after{background:var(--ds-interaction-pressed)}.trigger--has-value.sc-ds-filter-menu .trigger__label-box.sc-ds-filter-menu{color:var(--ds-select-fg-active)}.trigger--label-placeholder.sc-ds-filter-menu .trigger__label-box.sc-ds-filter-menu{color:var(--ds-select-fg)}.trigger__prefix.sc-ds-filter-menu,.trigger__chevron.sc-ds-filter-menu{position:relative;z-index:2}.trigger__prefix.sc-ds-filter-menu{color:var(--ds-select-prefix-fg)}.trigger__chevron.sc-ds-filter-menu{color:var(--ds-select-chevron-fg)}.trigger__label-box.sc-ds-filter-menu{position:relative;z-index:2;display:flex;align-items:center;flex:1 1 auto;overflow:hidden;text-align:left;color:inherit;transition:color var(--effect-motion-short-2)}.trigger__label-content.sc-ds-filter-menu{display:inline-flex;align-items:center;max-width:100%;min-width:0}.trigger__label.sc-ds-filter-menu{min-width:0}.ds-select-trigger-host--background-medium.sc-ds-filter-menu-h{--ds-select-fg:var(--color-foreground-on-medium-background-secondary);--ds-select-fg-active:var(--color-foreground-on-medium-background-primary);--ds-select-border:var(--color-border-on-medium-background-secondary)}.ds-select-trigger-host--background-bold.sc-ds-filter-menu-h{--ds-select-fg:var(--color-foreground-on-bold-background-secondary);--ds-select-fg-active:var(--color-foreground-on-bold-background-primary);--ds-select-border:var(--color-border-on-bold-background-secondary)}.ds-select-trigger-host--background-strong.sc-ds-filter-menu-h{--ds-select-fg:var(--color-foreground-on-strong-background-secondary);--ds-select-fg-active:var(--color-foreground-on-strong-background-primary);--ds-select-border:var(--color-border-on-strong-background-secondary)}.ds-select-trigger-host--background-translucent.sc-ds-filter-menu-h{--ds-select-fg:var(--color-translucent-foreground-secondary);--ds-select-fg-active:var(--color-translucent-foreground-primary);--ds-select-border:var(--color-translucent-border-secondary)}.ds-select-trigger-host--background-inverted.sc-ds-filter-menu-h{--ds-select-fg:var(--color-inverted-foreground-secondary);--ds-select-fg-active:var(--color-inverted-foreground-primary);--ds-select-border:var(--color-inverted-border-secondary)}.ds-select-trigger-host--background-media.sc-ds-filter-menu-h{--ds-select-fg:var(--color-media-foreground-secondary);--ds-select-fg-active:var(--color-media-foreground-primary);--ds-select-border:var(--color-media-border-secondary)}.ds-select-trigger-host--background-always-dark.sc-ds-filter-menu-h{--ds-select-fg:var(--color-always-dark-foreground-secondary);--ds-select-fg-active:var(--color-always-dark-foreground-primary);--ds-select-border:var(--color-always-dark-border-secondary)}.filter-menu-host--external-trigger.sc-ds-filter-menu-h{display:contents}.filter-menu.sc-ds-filter-menu{display:flex;min-height:0;flex-direction:column;color:var(--color-foreground-primary)}.filter-menu__body.sc-ds-filter-menu{display:grid;grid-template-columns:minmax(calc(var(--dimension-size-base) * 18), 2fr) minmax(0, 3fr);min-height:calc(var(--dimension-size-800) * 4 + var(--dimension-space-150));max-height:calc(100vh - var(--dimension-size-800) - var(--dimension-size-600))}.filter-menu__categories.sc-ds-filter-menu{min-width:0;border-inline-end:var(--dimension-stroke-width-012) solid var(--color-border-tertiary)}.filter-menu__category-section.sc-ds-filter-menu{display:flex;min-width:0;flex-direction:column}.filter-menu__category-section.ds-choice-section--divided.sc-ds-filter-menu{padding-block-end:var(--dimension-space-050)}.filter-menu__category.sc-ds-filter-menu{justify-content:space-between;width:100%;border:0;background:transparent;color:var(--color-foreground-secondary);cursor:default;text-align:start}.filter-menu__category--active.sc-ds-filter-menu{color:var(--color-foreground-primary)}.filter-menu__options.sc-ds-filter-menu{min-width:0;overflow:hidden}.filter-menu__date-field.sc-ds-filter-menu{display:flex;min-width:0;flex-direction:column;align-items:stretch;gap:var(--dimension-space-100)}.filter-menu__date-control.sc-ds-filter-menu{width:100%;border-radius:var(--dimension-radius-025);background:transparent;box-shadow:inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-secondary)}.filter-menu__date-control.sc-ds-filter-menu:focus-within{box-shadow:inset 0 0 0 var(--dimension-stroke-width-018) var(--color-border-bold-brand)}.filter-menu__date-input.sc-ds-filter-menu{flex:1 1 auto;min-width:0;height:100%;padding-inline:var(--dimension-space-100);border:0;outline:0;background:transparent;color:var(--color-foreground-primary);font:inherit}.filter-menu__footer.sc-ds-filter-menu{flex:0 0 auto}.filter-menu__clear.sc-ds-filter-menu{color:var(--color-foreground-bold-brand)}@media (max-width: 520px){.filter-menu__body.sc-ds-filter-menu{grid-template-columns:minmax(calc(var(--dimension-size-base) * 14), 2fr) minmax(0, 3fr)}}@media (forced-colors: active){.filter-menu__categories.sc-ds-filter-menu{border-inline-end-color:var(--ds-forced-color-content)}.filter-menu__date-control.sc-ds-filter-menu{outline:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content)}}`;const I=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");let z=0;const A={lg:"lg",md:"md",sm:"sm",xs:"xs"};const F=e(class e extends i{constructor(e){super();if(e!==false){this.__registerHost()}this.dsChange=t(this,"dsChange");this.dsClear=t(this,"dsClear");this.dsActiveFilterChange=t(this,"dsActiveFilterChange");this.dsClose=t(this,"dsClose");this.dsOpenChange=t(this,"dsOpenChange");this.dsAfterClose=t(this,"dsAfterClose");this.open=false;this.triggerLabel="Filters";this.icon="Filters";this.size="md";this.width="hug";this.hasBorder=true;this.activeFill=false;this.ariaLabel=null;this.filters=[];this.values={};this.side="bottom";this.align="end";this.sideOffset=p.space050;this.alignOffset=0;this.menuWidth=p.menuWidthLg;this.menuLabel="Filters";this.categoriesLabel="Filter categories";this.clearLabel="Clear";this.initialFocusVisible=false;this.shouldRender=false;this.closing=false;this.positionReady=false;this.pos={x:0,y:0};this.focusRingVisible=false;this.activeOptionIndex=0;this.generatedId=`ds-filter-menu-${++z}`;this.outsideHandler=null;this.triggerElement=null;this.pendingInitialFocusVisible=false;this.closeTimer=null;this.closingSnapshot=null;this.position=new s({getAnchor:()=>this.resolvedAnchor,getPopup:()=>this.el.querySelector(".filter-menu-popup"),measure:(e,i)=>{if(!this.open)return null;const t=e.getBoundingClientRect();const r=y(x.space050,x.space050);return{anchorRect:t,popupWidth:i.offsetWidth||this.popupFallbackWidth,popupHeight:i.offsetHeight||this.popupFallbackHeight,side:this.side,align:this.align,sideOffsetPx:y(this.sideOffset,x.space050),alignOffsetPx:w({align:this.align,alignOffsetPx:y(this.alignOffset,0),sectionInsetPx:r}),viewportPadPx:this.viewportPad,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}},apply:({x:e,y:i})=>{this.pos={x:e,y:i}},onReady:()=>{this.positionReady=true},liveUpdate:"double-frame",observeResize:true,topLayer:true})}componentDidLoad(){if(this.open)this.onOpenChange(true)}disconnectedCallback(){this.position.unobserve();this.teardownListeners()}onOpenChange(e){if(e){this.teardownListeners();this.closingSnapshot=null;this.shouldRender=true;this.closing=false;this.positionReady=false;this.focusRingVisible=this.pendingInitialFocusVisible||this.initialFocusVisible;this.setupListeners();this.position.schedule((()=>this.focusInitialCategory()));return}if(!this.shouldRender)return;this.position.cancel();this.captureClosingSnapshot();this.closing=true;this.teardownListeners();const i=b(x.motionShort2,x.animationDurationShort3);if(i<=0){this.finishClose();return}this.closeTimer=setTimeout((()=>this.finishClose()),i)}onPositionInputChange(){if(this.open)this.position.schedule()}handleKeyDown(e){if(!this.shouldRender||this.closing)return;if(e.key==="Escape"){e.preventDefault();this.close();return}if(e.key!=="Tab"||!this.tabLeavesPopup(e))return;e.preventDefault();this.close(false);this.moveFocusAfterTab(e.shiftKey)}get resolvedAnchor(){if(this.anchor)return this.anchor;if(this.anchorId)return document.getElementById(this.anchorId);return this.triggerElement}get usesInternalTrigger(){return!this.anchor&&!this.anchorId}get anchorFocusTarget(){const e=this.resolvedAnchor;if(!e)return null;if(e.matches(I))return e;return e.querySelector(I)??e}get viewportPad(){return y(x.space050,x.space050)}get popupFallbackWidth(){return y(x.menuWidthLg,x.menuWidthLg)}get popupFallbackHeight(){return y(x.menuFallbackHeight,x.menuFallbackHeight)}setupListeners(){this.outsideHandler=e=>{const i=e.target;const t=this.el.querySelector(".filter-menu-popup");if(t?.contains(i)||this.resolvedAnchor?.contains(i))return;this.close()};document.addEventListener("mousedown",this.outsideHandler,true);this.position.observe()}teardownListeners(){this.position.unobserve();if(this.outsideHandler){document.removeEventListener("mousedown",this.outsideHandler,true);this.outsideHandler=null}if(this.closeTimer){clearTimeout(this.closeTimer);this.closeTimer=null}}close(e=true){this.captureClosingSnapshot();if(e)this.focusAnchor();this.dsOpenChange.emit(false);this.dsClose.emit();this.open=false;this.onOpenChange(false)}toggleFromTrigger(e){if(this.open){this.close();return}this.pendingInitialFocusVisible=e.detail===0;this.open=true;this.dsOpenChange.emit(true);this.onOpenChange(true)}handleTriggerKeyDown(e){if(e.key!=="ArrowDown"||this.open)return;e.preventDefault();this.pendingInitialFocusVisible=true;this.open=true;this.dsOpenChange.emit(true);this.onOpenChange(true)}finishClose(){const e=this.el.querySelector(".filter-menu-popup");if(e?.matches(":popover-open"))e.hidePopover();this.shouldRender=false;this.closing=false;this.closingSnapshot=null;this.closeTimer=null;this.dsAfterClose.emit()}captureClosingSnapshot(){if(this.closingSnapshot)return;this.closingSnapshot={filters:this.filters.map((e=>({...e,options:e.options?.map((e=>({...e})))}))),values:Object.fromEntries(Object.entries(this.values).map((([e,i])=>[e,Array.isArray(i)?[...i]:i]))),activeFilterId:this.activeFilterId}}focusAnchor(){const e=this.resolvedAnchor;if(e?.setFocus){void e.setFocus();return}this.anchorFocusTarget?.focus()}focusInitialCategory(){requestAnimationFrame((()=>{this.el.querySelector('.filter-menu__category[tabindex="0"]')?.focus();this.pendingInitialFocusVisible=false}))}tabLeavesPopup(e){const i=this.el.querySelector(".filter-menu-popup");if(!i)return true;const t=Array.from(i.querySelectorAll(I)).filter((e=>e.getClientRects().length>0));const r=t.indexOf(e.target);if(r<0)return true;return e.shiftKey?r===0:r===t.length-1}moveFocusAfterTab(e){const i=this.anchorFocusTarget;if(!i)return;if(e){i.focus();return}const t=Array.from(document.querySelectorAll(I)).filter((e=>!e.closest(".filter-menu-popup")&&!e.closest("[inert]")&&e.getClientRects().length>0));const r=t.indexOf(i);(t[r+1]??i).focus()}selectedFilter(e,i){return e.find((e=>e.id===i))??e[0]}selectedCount(e,i){const t=i[e.id];if(e.kind==="multiple")return Array.isArray(t)?t.length:0;if(e.kind==="boolean")return t===true?1:0;return typeof t==="string"&&t.length>0?1:0}totalSelected(e,i){return e.reduce(((e,t)=>e+this.selectedCount(t,i)),0)}activeFilterCount(e,i){return e.filter((e=>this.selectedCount(e,i)>0)).length}selectCategory(e,i=false){this.activeOptionIndex=0;this.dsActiveFilterChange.emit(e);if(!i)return;requestAnimationFrame((()=>{this.el.querySelector(`[data-filter-category="${e}"]`)?.focus()}))}handleCategoryKeyDown(e,i,t){const r=i.findIndex((e=>e.id===t));let o;if(e.key==="ArrowDown")o=(r+1)%i.length;else if(e.key==="ArrowUp")o=(r-1+i.length)%i.length;else if(e.key==="Home")o=0;else if(e.key==="End")o=i.length-1;else if(e.key==="ArrowRight"){e.preventDefault();requestAnimationFrame((()=>{this.el.querySelector('.filter-menu__options [role="option"], .filter-menu__options input')?.focus()}));return}else return;e.preventDefault();this.focusRingVisible=true;this.selectCategory(i[o].id,true)}handlePanelKeyDown(e,i){if(e.key!=="ArrowLeft")return;e.preventDefault();this.el.querySelector(`[data-filter-category="${i}"]`)?.focus()}handleOptionKeyDown(e,i,t,r,o){const n=i.options??[];if(e.key==="ArrowLeft"){this.handlePanelKeyDown(e,i.id);return}if(e.key==="Enter"||e.key===" "){e.preventDefault();this.selectOption(i,t,o);return}if(!["ArrowDown","ArrowUp","Home","End"].includes(e.key))return;e.preventDefault();const s=n.map(((e,i)=>({candidate:e,optionIndex:i}))).filter((({candidate:e})=>!e.isInactive)).map((({optionIndex:e})=>e));if(!s.length)return;const d=s.indexOf(r);let c;if(e.key==="Home")c=s[0];else if(e.key==="End")c=s[s.length-1];else{const i=e.key==="ArrowDown"?1:-1;const t=d>=0?d:i===1?-1:0;c=s[(t+i+s.length)%s.length]}this.activeOptionIndex=c;this.focusRingVisible=true;requestAnimationFrame((()=>{this.el.querySelector(`#${this.generatedId}-${i.id}-option-${c}`)?.focus()}))}toggleMultiple(e,i,t,r){if(i.isInactive)return;const o=Array.isArray(r[e.id])?r[e.id]:[];const n=new Set(o);if(t)n.add(i.value);else n.delete(i.value);const s=(e.options??[]).map((e=>e.value)).filter((e=>n.has(e)));this.dsChange.emit({filterId:e.id,value:s})}selectOption(e,i,t){if(i.isInactive)return;if(e.kind==="single"){this.dsChange.emit({filterId:e.id,value:i.value});return}const r=Array.isArray(t[e.id])?t[e.id].includes(i.value):false;this.toggleMultiple(e,i,!r,t)}renderOptions(e,i){const t=i[e.id];if(e.kind==="multiple"||e.kind==="single"){const o=Array.isArray(t)?t:[];const n=e.options??[];const s=c(n.map((e=>({label:e.label,value:e.value,subtext:e.description}))));return n.map(((n,c)=>{const a=e.kind==="multiple"?o.includes(n.value):t===n.value;return r(d,{size:"md",id:`${this.generatedId}-${e.id}-option-${c}`,option:{label:n.label,value:n.value,subtext:n.description,isInactive:n.isInactive},selected:a,active:c===this.activeOptionIndex,focusRingVisible:this.focusRingVisible,usesSubtext:s,tabIndex:c===this.activeOptionIndex?0:-1,leading:e.kind==="multiple"?r("span",{class:"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-checkbox",{label:"",size:"md",checked:a,presentation:true})):undefined,onFocus:()=>{this.activeOptionIndex=c},onKeyDown:t=>this.handleOptionKeyDown(t,e,n,c,i),onHover:()=>{this.focusRingVisible=false;this.activeOptionIndex=c},onSelect:()=>this.selectOption(e,n,i)})}))}if(e.kind==="boolean"){const i={label:e.fieldLabel??e.label,value:"true",description:e.description};return r(d,{size:"md",id:`${this.generatedId}-${e.id}-option-0`,option:{label:i.label,value:i.value,subtext:i.description},selected:t===true,active:true,focusRingVisible:this.focusRingVisible,usesSubtext:Boolean(i.description),tabIndex:0,leading:r("span",{class:"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-checkbox",{label:"",size:"md",checked:t===true,presentation:true})),onKeyDown:i=>{if(i.key==="ArrowLeft")this.handlePanelKeyDown(i,e.id);else if(i.key==="Enter"||i.key===" "){i.preventDefault();this.dsChange.emit({filterId:e.id,value:t!==true})}},onHover:()=>{this.focusRingVisible=false},onSelect:()=>this.dsChange.emit({filterId:e.id,value:t!==true})})}const o=typeof t==="string"?t:"";const n=`${this.generatedId}-${e.id}-input`;return r("div",{class:"filter-menu__date-field"},r("label",{htmlFor:n},r("ds-text",{as:"span",variant:"text-body-small",emphasis:true,color:"primary"},e.fieldLabel??"Event date")),r("div",{class:"filter-menu__date-control ds-control-frame ds-control--md"},r("input",{id:n,class:"filter-menu__date-input",type:"date",value:o,onInput:i=>this.dsChange.emit({filterId:e.id,value:i.target.value})}),o?r("ds-button-unfilled",{variant:"icon",icon:"CrossCircle",size:"sm",isInset:true,hasBorder:false,rounded:true,ariaLabel:`${this.clearLabel} ${e.fieldLabel??e.label}`,onDsClick:i=>{i.stopPropagation();this.dsChange.emit({filterId:e.id,value:""})}}):null))}render(){const e=this.closing&&this.closingSnapshot?this.closingSnapshot:{filters:this.filters,values:this.values,activeFilterId:this.activeFilterId};const i=this.selectedFilter(e.filters,e.activeFilterId);const t=this.totalSelected(e.filters,e.values);const n=this.activeFilterCount(e.filters,e.values);const s=n>0;const d=`${this.triggerLabel}${s?` · ${n}`:""}`;const c=_[this.size];const a=A[this.size];const l=`${this.generatedId}-popup`;const f={position:"fixed",left:"0",top:"0",width:this.menuWidth,transform:`translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,zIndex:"9998",visibility:this.positionReady?"visible":"hidden"};return r(o,{key:"6140d3d0d92bd179fd8786edd0eecade7f4c077b",class:{"filter-menu-host":true,"filter-menu-host--external-trigger":!this.usesInternalTrigger,"ds-select-trigger-host":this.usesInternalTrigger,[`ds-control--${this.size}`]:true,...k(this.width)}},this.usesInternalTrigger?r("button",{ref:e=>{this.triggerElement=e??null},id:this.inputId??`${this.generatedId}-trigger`,type:"button",class:{trigger:true,"ds-control-frame":true,"ds-focus-ring-inset":true,"ds-interaction-fill":true,"ds-interaction-fill--selected":this.activeFill&&s,"trigger--expanded":this.open||this.closing,"trigger--bordered":this.hasBorder,"trigger--has-value":s,[`ds-control--${this.size}`]:true},role:"combobox","aria-haspopup":"dialog","aria-expanded":String(this.open),"aria-controls":this.open?l:undefined,"aria-label":this.ariaLabel??this.menuLabel,onClick:e=>this.toggleFromTrigger(e),onKeyDown:e=>this.handleTriggerKeyDown(e)},this.icon?r("span",{class:"trigger__prefix ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-icon",{name:this.icon,size:a,color:"inherit"})):null,r("ds-text",{class:"trigger__label-box trigger__label trigger__label-content ds-control-label-box ds-interaction-fill__content",as:"span",variant:c,color:"inherit",lineTruncation:1},d),r("span",{class:"trigger__chevron ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-icon",{name:"ChevronDown",size:a,color:"inherit"}))):null,this.shouldRender?r("div",{id:l,popover:"manual",class:{"filter-menu-popup":true,"ds-choice-popup":true,"ds-choice-popup--closing":this.closing},style:f,role:"dialog","aria-label":this.menuLabel},i?r("div",{class:"filter-menu"},r("div",{class:"filter-menu__body"},r("div",{class:"filter-menu__categories ds-choice-list ds-chrome-column ds-chrome-space--sm",role:"tablist","aria-label":this.categoriesLabel,"aria-orientation":"vertical"},e.filters.map((t=>{const o=t.id===i.id;const n=this.selectedCount(t,e.values);return r("div",{key:t.id,class:{"filter-menu__category-section":true,"ds-choice-section--divided":Boolean(t.divider)}},r("button",{id:`${this.generatedId}-${t.id}-tab`,type:"button",role:"tab","data-filter-category":t.id,class:{"filter-menu__category":true,"filter-menu__category--active":o,"ds-choice-item":true,"ds-control-frame":true,"ds-control--md":true,"ds-focus-ring-inset":true,"ds-focus-ring--visible":o&&this.focusRingVisible,"ds-interaction-fill":true,"ds-interaction-fill--selected":o},"aria-selected":String(o),"aria-controls":`${this.generatedId}-panel`,tabIndex:o?0:-1,onMouseDown:()=>{this.focusRingVisible=false},onClick:()=>this.selectCategory(t.id),onKeyDown:i=>this.handleCategoryKeyDown(i,e.filters,t.id)},r("ds-text",{class:"ds-choice-item__content ds-choice-item__label ds-control-label-box ds-interaction-fill__content",as:"span",variant:"text-body-medium",color:o?"primary":"secondary"},t.label),n>0?r("ds-tag",{class:"ds-choice-item__tag ds-interaction-fill__content",label:String(n),size:"sm",intent:"brand",contrast:"bold",isInset:true,rounded:true}):null))}))),r("div",{id:`${this.generatedId}-panel`,class:"filter-menu__options",role:"tabpanel","aria-labelledby":`${this.generatedId}-${i.id}-tab`},r("div",{key:i.id,class:"filter-menu__option-list ds-choice-list ds-chrome-column ds-chrome-space--sm",role:"listbox","aria-label":i.label,"aria-multiselectable":i.kind==="multiple"?"true":undefined},this.renderOptions(i,e.values)))),t>0?r("div",{class:"filter-menu__footer ds-choice-footer"},r("div",{class:"ds-choice-footer__content ds-control--md"},r("ds-text",{class:"ds-choice-footer__summary",as:"span",variant:"text-body-medium",color:"secondary","aria-live":"polite"},t," selected"),r("button",{class:"filter-menu__clear ds-choice-footer__clear ds-text-action",type:"button",onClick:()=>this.dsClear.emit()},r("ds-text",{as:"span",variant:"text-body-medium",color:"inherit"},this.clearLabel)))):null):null):null)}get el(){return this}static get watchers(){return{open:[{onOpenChange:0}],anchor:[{onPositionInputChange:0}],anchorId:[{onPositionInputChange:0}],side:[{onPositionInputChange:0}],align:[{onPositionInputChange:0}],sideOffset:[{onPositionInputChange:0}],alignOffset:[{onPositionInputChange:0}],menuWidth:[{onPositionInputChange:0}]}}static get style(){return C()}},[2,"ds-filter-menu",{open:[1028],triggerLabel:[1,"trigger-label"],icon:[1],size:[1],width:[1],hasBorder:[4,"has-border"],activeFill:[4,"active-fill"],inputId:[1,"input-id"],ariaLabel:[1,"aria-label"],filters:[16],values:[16],activeFilterId:[1,"active-filter-id"],anchor:[16],anchorId:[1,"anchor-id"],side:[1],align:[1],sideOffset:[8,"side-offset"],alignOffset:[8,"align-offset"],menuWidth:[1,"menu-width"],menuLabel:[1,"menu-label"],categoriesLabel:[1,"categories-label"],clearLabel:[1,"clear-label"],initialFocusVisible:[4,"initial-focus-visible"],shouldRender:[32],closing:[32],positionReady:[32],pos:[32],focusRingVisible:[32],activeOptionIndex:[32]},[[0,"keydown","handleKeyDown"]],{open:[{onOpenChange:0}],anchor:[{onPositionInputChange:0}],anchorId:[{onPositionInputChange:0}],side:[{onPositionInputChange:0}],align:[{onPositionInputChange:0}],sideOffset:[{onPositionInputChange:0}],alignOffset:[{onPositionInputChange:0}],menuWidth:[{onPositionInputChange:0}]}]);function $(){if(typeof customElements==="undefined"){return}const e=["ds-filter-menu","ds-badge","ds-button-unfilled","ds-checkbox","ds-icon","ds-loader","ds-tag","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-filter-menu":if(!customElements.get(n(e))){customElements.define(n(e),F)}break;case"ds-badge":if(!customElements.get(n(e))){a()}break;case"ds-button-unfilled":if(!customElements.get(n(e))){l()}break;case"ds-checkbox":if(!customElements.get(n(e))){f()}break;case"ds-icon":if(!customElements.get(n(e))){u()}break;case"ds-loader":if(!customElements.get(n(e))){h()}break;case"ds-tag":if(!customElements.get(n(e))){m()}break;case"ds-text":if(!customElements.get(n(e))){g()}break;case"ds-tooltip":if(!customElements.get(n(e))){v()}break}}))}$();const T=F;const j=$;export{T as DsFilterMenu,j as defineCustomElement};
|
|
1
|
+
import{p as e,H as i,c as t,h as r,a as o,t as s}from"./index.js";import{A as n}from"./p-BBxcMVqk.js";import{C as d}from"./p-tR8INOIN.js";import{c}from"./p-BAgjMUt3.js";import{d as a}from"./p-D8nnhQNJ.js";import{d as l}from"./p-c_5SXjwx.js";import{d as f}from"./p-C5TrNd31.js";import{d as u}from"./p-BFfLvMZd.js";import{d as h}from"./p-Ca-I2UnB.js";import{d as m}from"./p-jMCRaxQW.js";import{d as g}from"./p-DZFilC--.js";import{d as v}from"./p-BXPQmp7q.js";import{b as p,a as b,T as x}from"./p-NdahPypA.js";import{r as y}from"./p-BMc0DE59.js";import{r as w}from"./p-DhKvqh5G.js";import{C as _}from"./p-CuwopElg.js";import{c as k}from"./p-DuFm-ieS.js";const C=()=>`@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.sc-ds-filter-menu-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-filter-menu-h,.ds-focus-ring.sc-ds-filter-menu,.ds-focus-ring-inset.sc-ds-filter-menu-h,.ds-focus-ring-inset.sc-ds-filter-menu{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-filter-menu-h:focus-visible,.ds-focus-ring.sc-ds-filter-menu:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-filter-menu-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-filter-menu{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-filter-menu-h:focus-visible,.ds-focus-ring-inset.sc-ds-filter-menu:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-filter-menu-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-filter-menu:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){.sc-ds-filter-menu-h{--ds-focus-ring-color:var(--ds-forced-color-selected)}}@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-interaction-fill.sc-ds-filter-menu-h,.ds-interaction-fill.sc-ds-filter-menu{position:var(--ds-interaction-position, relative);z-index:var(--ds-interaction-z-index, 0);cursor:default;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active-brand);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent;--ds-interaction-divider-width:0px;--ds-interaction-divider-color:transparent;--ds-interaction-divider-inline-start-width:0px;--ds-interaction-divider-inline-start-color:transparent;--ds-interaction-divider-inline-end-width:0px;--ds-interaction-divider-inline-end-color:transparent}.ds-interaction-fill.sc-ds-filter-menu-h::before,.ds-interaction-fill.sc-ds-filter-menu::before,.ds-interaction-fill.sc-ds-filter-menu-h::after,.ds-interaction-fill.sc-ds-filter-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}.ds-interaction-fill.sc-ds-filter-menu-h::before,.ds-interaction-fill.sc-ds-filter-menu::before{z-index:1}.ds-interaction-fill.sc-ds-filter-menu-h::after,.ds-interaction-fill.sc-ds-filter-menu::after{z-index:3;box-shadow:inset 0 calc(-1 * var(--ds-interaction-divider-width)) 0 var(--ds-interaction-divider-color), inset var(--ds-interaction-divider-inline-start-width) 0 0 var(--ds-interaction-divider-inline-start-color), inset calc(-1 * var(--ds-interaction-divider-inline-end-width)) 0 0 var(--ds-interaction-divider-inline-end-color), inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.ds-interaction-fill--bordered.sc-ds-filter-menu-h,.ds-interaction-fill--bordered.sc-ds-filter-menu{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}.ds-interaction-fill--selected.sc-ds-filter-menu-h::before,.ds-interaction-fill--selected.sc-ds-filter-menu::before{background:var(--ds-interaction-active)}.ds-interaction-fill--selected.sc-ds-filter-menu-h,.ds-interaction-fill--selected.sc-ds-filter-menu{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-filter-menu-h:hover:not(:disabled)::after,.ds-interaction-fill.sc-ds-filter-menu:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}.ds-interaction-fill.sc-ds-filter-menu-h:active:not(:disabled)::after,.ds-interaction-fill.sc-ds-filter-menu:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}.ds-interaction-fill--grouped.sc-ds-filter-menu-h::after,.ds-interaction-fill--grouped.sc-ds-filter-menu::after,.ds-interaction-fill--grouped.sc-ds-filter-menu-h:active:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-filter-menu:active:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill--grouped.sc-ds-filter-menu-h:hover:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-filter-menu:hover:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}}.ds-interaction-fill--grouped.sc-ds-filter-menu-h,.ds-interaction-fill--grouped.sc-ds-filter-menu{--ds-interaction-divider-width:var(--ds-interaction-group-divider-width, 0px);--ds-interaction-divider-color:var(--ds-interaction-group-divider-color, transparent);--ds-interaction-divider-inline-start-width:var( --ds-interaction-group-divider-inline-start-width, 0px );--ds-interaction-divider-inline-start-color:var( --ds-interaction-group-divider-inline-start-color, transparent );--ds-interaction-divider-inline-end-width:var( --ds-interaction-group-divider-inline-end-width, 0px );--ds-interaction-divider-inline-end-color:var( --ds-interaction-group-divider-inline-end-color, transparent )}.ds-interaction-fill.sc-ds-filter-menu-h>.ds-interaction-fill__content.sc-ds-filter-menu,.ds-interaction-fill.sc-ds-filter-menu>.ds-interaction-fill__content.sc-ds-filter-menu,.ds-interaction-fill__content.sc-ds-filter-menu{position:relative;z-index:2;cursor:inherit}.ds-interaction-fill--on-faint.sc-ds-filter-menu-h,.ds-interaction-fill--on-faint.sc-ds-filter-menu{--ds-interaction-active:var(--color-interaction-active)}.ds-interaction-fill--on-medium.sc-ds-filter-menu-h,.ds-interaction-fill--on-medium.sc-ds-filter-menu{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}.ds-interaction-fill--on-bold.sc-ds-filter-menu-h,.ds-interaction-fill--on-bold.sc-ds-filter-menu{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}.ds-interaction-fill--on-strong.sc-ds-filter-menu-h,.ds-interaction-fill--on-strong.sc-ds-filter-menu{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}.ds-interaction-fill--on-translucent.sc-ds-filter-menu-h,.ds-interaction-fill--on-translucent.sc-ds-filter-menu{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active-brand);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}.ds-interaction-fill--on-inverted.sc-ds-filter-menu-h,.ds-interaction-fill--on-inverted.sc-ds-filter-menu{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active-brand);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}.ds-interaction-fill--on-media.sc-ds-filter-menu-h,.ds-interaction-fill--on-media.sc-ds-filter-menu{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}.ds-interaction-fill--on-always-dark.sc-ds-filter-menu-h,.ds-interaction-fill--on-always-dark.sc-ds-filter-menu{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active-brand);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}.ds-interaction-fill--on-navigation.sc-ds-filter-menu-h,.ds-interaction-fill--on-navigation.sc-ds-filter-menu{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}@media (forced-colors: active){.ds-interaction-fill.sc-ds-filter-menu-h::after,.ds-interaction-fill.sc-ds-filter-menu::after{box-shadow:none;outline:var(--ds-interaction-border-width) solid var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--ds-interaction-border-width))}.ds-interaction-fill--selected.sc-ds-filter-menu-h::before,.ds-interaction-fill--selected.sc-ds-filter-menu::before{background:transparent;outline:var(--dimension-stroke-width-025) solid var(--ds-forced-color-selected);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}}@media (forced-colors: active) and (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-filter-menu-h:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after,.ds-interaction-fill.sc-ds-filter-menu:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline-color:var(--ds-forced-color-selected);outline-width:var(--dimension-stroke-width-012)}}@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-control-inactive.sc-ds-filter-menu-h,.ds-control-inactive.sc-ds-filter-menu{opacity:var(--effect-opacity-medium);pointer-events:none;cursor:not-allowed}@media (forced-colors: active){.ds-control-inactive.sc-ds-filter-menu-h,.ds-control-inactive.sc-ds-filter-menu{color:var(--ds-forced-color-disabled);opacity:1}}.ds-control--lg.sc-ds-filter-menu,.ds-control--lg.sc-ds-filter-menu-h,.ds-control--md.sc-ds-filter-menu-h,.ds-control--md.sc-ds-filter-menu,.ds-control--sm.sc-ds-filter-menu-h,.ds-control--sm.sc-ds-filter-menu,.ds-control--xs.sc-ds-filter-menu-h,.ds-control--xs.sc-ds-filter-menu{--ds-control-radius:var(--dimension-radius-025)}.ds-control--lg.sc-ds-filter-menu-h,.ds-control--lg.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-filter-menu-h,.ds-control--md.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-filter-menu-h,.ds-control--sm.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-filter-menu-h,.ds-control--xs.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-chrome-space--sm.sc-ds-filter-menu-h,.ds-chrome-space--sm.sc-ds-filter-menu{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-filter-menu-h,.ds-chrome-space--md.sc-ds-filter-menu{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-filter-menu-h,.ds-chrome-space--lg.sc-ds-filter-menu{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-filter-menu-h,.ds-chrome-row.sc-ds-filter-menu,.ds-chrome-column.sc-ds-filter-menu-h,.ds-chrome-column.sc-ds-filter-menu,.ds-chrome-grid.sc-ds-filter-menu-h,.ds-chrome-grid.sc-ds-filter-menu{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-filter-menu-h,.ds-chrome-row.sc-ds-filter-menu{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-filter-menu-h,.ds-chrome-column.sc-ds-filter-menu{flex-direction:column}.ds-chrome-grid.sc-ds-filter-menu-h,.ds-chrome-grid.sc-ds-filter-menu{display:grid;align-items:center}.ds-control-frame.sc-ds-filter-menu{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-filter-menu{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-filter-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-filter-menu{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-control-label-dot.sc-ds-filter-menu{position:relative;padding-inline-end:calc( var(--ds-control-label-inset, var(--dimension-space-025)) + var(--ds-control-gap, var(--dimension-space-050)) )}.ds-control-label-dot__badge.sc-ds-filter-menu{position:absolute;inset-block-start:0;inset-inline-end:0;pointer-events:none}.ds-empty-region.sc-ds-filter-menu{display:flex;flex:1 1 auto;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:0}.ds-empty-region--padded.sc-ds-filter-menu{padding:var(--dimension-space-200)}.sc-ds-filter-menu:where(.ds-text-decoration,.ds-text-action).sc-ds-filter-menu{text-decoration-color:var(--ds-text-decoration-color, var(--color-foreground-tertiary));text-decoration-thickness:var(--ds-text-decoration-thickness, var(--dimension-stroke-width-012));text-underline-offset:var(--ds-text-decoration-offset, var(--dimension-space-025))}.ds-text-action.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-bold-brand);--ds-text-decoration-color:var(--ds-text-action-foreground);color:var(--ds-text-action-foreground);text-decoration-line:none}.ds-text-action--on-medium.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-on-medium-background-primary);--ds-text-decoration-color:var(--color-foreground-on-medium-background-secondary);text-decoration-line:underline}.ds-text-action--on-strong.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-on-strong-background-primary);--ds-text-decoration-color:var(--color-foreground-on-strong-background-secondary);text-decoration-line:underline}.ds-text-action--on-bold.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-on-bold-background-primary);--ds-text-decoration-color:var(--color-foreground-on-bold-background-secondary);text-decoration-line:underline}@media (hover: hover) and (pointer: fine){.ds-text-action.sc-ds-filter-menu:hover{text-decoration-line:underline}}@media (forced-colors: active){.ds-text-action.sc-ds-filter-menu{text-decoration-line:underline;text-decoration-color:currentcolor}}.ds-choice-popup.sc-ds-filter-menu{box-sizing:border-box;display:flex;flex-direction:column;min-width:var(--dimension-menu-width-xs);max-width:min( var(--dimension-panel-width-lg), calc(100vw - var(--dimension-space-200)) );max-height:calc(100vh - var(--dimension-space-200));overflow:hidden;inset:auto;margin:0;padding:0;border:0;background-color:var(--color-background-primary);border-radius:var(--dimension-radius-075);box-shadow:var(--effect-shadow-elevated-floating);color:var(--color-foreground-secondary);animation:dsChoiceFadeIn var(--effect-motion-short-2) forwards;backface-visibility:hidden;will-change:transform;text-align:start}.ds-choice-popup.sc-ds-filter-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:var(--effect-highlight-elevated-floating)}.ds-choice-popup--closing.sc-ds-filter-menu{animation:dsChoiceFadeOut var(--effect-motion-short-2) forwards}@keyframes dsChoiceFadeIn{from{opacity:0;transform:inherit scale(0.97)}to{opacity:1}}@keyframes dsChoiceFadeOut{from{opacity:1}to{opacity:0}}@media (prefers-reduced-motion: reduce){.ds-choice-popup.sc-ds-filter-menu{animation:none;opacity:1}.ds-choice-popup--closing.sc-ds-filter-menu{opacity:0}}.ds-choice-list.sc-ds-filter-menu{display:flex;flex-direction:column;min-height:0;overflow-y:auto;overscroll-behavior:contain}.ds-choice-section--divided.sc-ds-filter-menu{border-bottom:var(--dimension-stroke-width-015) solid var(--color-border-tertiary)}ds-text.ds-choice-section__header.sc-ds-filter-menu{text-align:start;-webkit-user-select:none;user-select:none}.ds-choice-section--headed-after-first.sc-ds-filter-menu{margin-block-start:var(--dimension-space-050)}.ds-choice-item.sc-ds-filter-menu{width:100%;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));background:transparent;cursor:default;-webkit-user-select:none;user-select:none;text-align:left;color:inherit}.ds-choice-item.sc-ds-filter-menu:has(.ds-choice-item__subtext){height:auto;min-height:var(--ds-control-height, var(--dimension-size-400));padding-block:var(--ds-control-padding-inline, var(--dimension-space-075));align-items:flex-start}.ds-choice-item__content.sc-ds-filter-menu{display:flex;flex:1;flex-direction:column;gap:var(--dimension-space-025);min-width:0}ds-text.ds-choice-item__label.sc-ds-filter-menu{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ds-text.ds-choice-item__subtext.sc-ds-filter-menu{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ds-choice-item__icon.sc-ds-filter-menu,.ds-choice-item__suffix.sc-ds-filter-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md));pointer-events:none}.ds-choice-item.ds-interaction-fill--selected.sc-ds-filter-menu .ds-choice-item__icon.sc-ds-filter-menu{color:var(--color-foreground-primary)}.ds-choice-item__tag.sc-ds-filter-menu{flex-shrink:0;pointer-events:none}.ds-choice-empty.sc-ds-filter-menu,.ds-choice-loading.sc-ds-filter-menu{min-height:var(--dimension-size-600);padding:var(--dimension-space-100)}.ds-choice-footer.sc-ds-filter-menu{position:relative;box-sizing:border-box;padding-block:var(--dimension-space-050)}.ds-choice-footer.sc-ds-filter-menu::before{content:'';position:absolute;inset:0 0 auto;height:var(--dimension-stroke-width-012);background-color:var(--color-border-tertiary);pointer-events:none}.ds-choice-footer__content.sc-ds-filter-menu{display:flex;align-items:center;justify-content:space-between;column-gap:var(--dimension-space-050);box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400))}.ds-choice-footer__summary.sc-ds-filter-menu,.ds-choice-footer__summary-measure.sc-ds-filter-menu,.ds-choice-footer__clear.sc-ds-filter-menu ds-text.sc-ds-filter-menu,.ds-choice-footer__action.sc-ds-filter-menu ds-text.sc-ds-filter-menu{padding-inline:calc( var(--dimension-space-050) + var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-choice-footer__summary.sc-ds-filter-menu,.ds-choice-footer__summary-measure.sc-ds-filter-menu,.ds-choice-footer__clear.sc-ds-filter-menu,.ds-choice-footer__action.sc-ds-filter-menu{white-space:nowrap}.ds-choice-footer__summary-measure.sc-ds-filter-menu{position:absolute;visibility:hidden;pointer-events:none}.ds-choice-footer__clear.sc-ds-filter-menu,.ds-choice-footer__action.sc-ds-filter-menu{appearance:none;display:inline-flex;align-items:center;padding:0;border:0;border-radius:var(--dimension-radius-025);background:transparent;cursor:default}@media (forced-colors: active){.ds-choice-popup.sc-ds-filter-menu{outline:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);outline-offset:calc(-1 * var(--dimension-stroke-width-012))}.ds-choice-popup.sc-ds-filter-menu::after{box-shadow:none}.ds-choice-section--divided.sc-ds-filter-menu{border-bottom-color:var(--ds-forced-color-content)}.ds-choice-footer.sc-ds-filter-menu::before{background-color:var(--ds-forced-color-content)}}.ds-control-frame.sc-ds-filter-menu{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-filter-menu{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-filter-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-filter-menu{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-control-label-dot.sc-ds-filter-menu{position:relative;padding-inline-end:calc( var(--ds-control-label-inset, var(--dimension-space-025)) + var(--ds-control-gap, var(--dimension-space-050)) )}.ds-control-label-dot__badge.sc-ds-filter-menu{position:absolute;inset-block-start:0;inset-inline-end:0;pointer-events:none}.ds-control-width--hug.sc-ds-filter-menu-h,.ds-control-width--hug.sc-ds-filter-menu{width:fit-content;max-width:100%;flex:0 0 auto;align-self:flex-start}.ds-control-width--fill.sc-ds-filter-menu-h,.ds-control-width--fill.sc-ds-filter-menu{width:100%;min-width:0;flex:1 1 auto;align-self:stretch}.ds-select-trigger-host.sc-ds-filter-menu-h{display:inline-flex;position:relative;outline:none;--ds-select-fg:var(--color-foreground-secondary);--ds-select-fg-active:var(--color-foreground-primary);--ds-select-prefix-fg:var(--ds-select-fg);--ds-select-chevron-fg:var(--ds-select-fg);--ds-select-border:var(--color-border-secondary)}.ds-control-width--fill.sc-ds-filter-menu-h .trigger.sc-ds-filter-menu{width:100%}.trigger.sc-ds-filter-menu{justify-content:flex-start;background:transparent;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));color:var(--ds-select-fg);cursor:default;font-family:inherit;-webkit-user-select:none;user-select:none;overflow:hidden;transition:color var(--effect-motion-short-2)}.trigger--bordered.sc-ds-filter-menu{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--ds-select-border)}.trigger--expanded.sc-ds-filter-menu{--ds-interaction-hover:var(--ds-interaction-pressed)}.trigger--expanded.sc-ds-filter-menu::after{background:var(--ds-interaction-pressed)}.trigger--has-value.sc-ds-filter-menu .trigger__label-box.sc-ds-filter-menu{color:var(--ds-select-fg-active)}.trigger--label-placeholder.sc-ds-filter-menu .trigger__label-box.sc-ds-filter-menu{color:var(--ds-select-fg)}.trigger__prefix.sc-ds-filter-menu,.trigger__chevron.sc-ds-filter-menu{position:relative;z-index:2}.trigger__prefix.sc-ds-filter-menu{color:var(--ds-select-prefix-fg)}.trigger__chevron.sc-ds-filter-menu{color:var(--ds-select-chevron-fg)}.trigger__label-box.sc-ds-filter-menu{position:relative;z-index:2;display:flex;align-items:center;flex:1 1 auto;overflow:hidden;text-align:left;color:inherit;transition:color var(--effect-motion-short-2)}.trigger__label-content.sc-ds-filter-menu{display:inline-flex;align-items:center;max-width:100%;min-width:0}.trigger__label.sc-ds-filter-menu{min-width:0}.ds-select-trigger-host--background-medium.sc-ds-filter-menu-h{--ds-select-fg:var(--color-foreground-on-medium-background-secondary);--ds-select-fg-active:var(--color-foreground-on-medium-background-primary);--ds-select-border:var(--color-border-on-medium-background-secondary)}.ds-select-trigger-host--background-bold.sc-ds-filter-menu-h{--ds-select-fg:var(--color-foreground-on-bold-background-secondary);--ds-select-fg-active:var(--color-foreground-on-bold-background-primary);--ds-select-border:var(--color-border-on-bold-background-secondary)}.ds-select-trigger-host--background-strong.sc-ds-filter-menu-h{--ds-select-fg:var(--color-foreground-on-strong-background-secondary);--ds-select-fg-active:var(--color-foreground-on-strong-background-primary);--ds-select-border:var(--color-border-on-strong-background-secondary)}.ds-select-trigger-host--background-translucent.sc-ds-filter-menu-h{--ds-select-fg:var(--color-translucent-foreground-secondary);--ds-select-fg-active:var(--color-translucent-foreground-primary);--ds-select-border:var(--color-translucent-border-secondary)}.ds-select-trigger-host--background-inverted.sc-ds-filter-menu-h{--ds-select-fg:var(--color-inverted-foreground-secondary);--ds-select-fg-active:var(--color-inverted-foreground-primary);--ds-select-border:var(--color-inverted-border-secondary)}.ds-select-trigger-host--background-media.sc-ds-filter-menu-h{--ds-select-fg:var(--color-media-foreground-secondary);--ds-select-fg-active:var(--color-media-foreground-primary);--ds-select-border:var(--color-media-border-secondary)}.ds-select-trigger-host--background-always-dark.sc-ds-filter-menu-h{--ds-select-fg:var(--color-always-dark-foreground-secondary);--ds-select-fg-active:var(--color-always-dark-foreground-primary);--ds-select-border:var(--color-always-dark-border-secondary)}.filter-menu-host--external-trigger.sc-ds-filter-menu-h{display:contents}.filter-menu.sc-ds-filter-menu{display:flex;min-height:0;flex-direction:column;color:var(--color-foreground-primary)}.filter-menu__body.sc-ds-filter-menu{display:grid;grid-template-columns:minmax(calc(var(--dimension-size-base) * 18), 2fr) minmax(0, 3fr);min-height:calc(var(--dimension-size-800) * 4 + var(--dimension-space-150));max-height:calc(100vh - var(--dimension-size-800) - var(--dimension-size-600))}.filter-menu__categories.sc-ds-filter-menu{min-width:0;border-inline-end:var(--dimension-stroke-width-012) solid var(--color-border-tertiary)}.filter-menu__category-section.sc-ds-filter-menu{display:flex;min-width:0;flex-direction:column}.filter-menu__category-section.ds-choice-section--divided.sc-ds-filter-menu{padding-block-end:var(--dimension-space-050)}.filter-menu__category.sc-ds-filter-menu{justify-content:space-between;width:100%;border:0;background:transparent;color:var(--color-foreground-secondary);cursor:default;text-align:start}.filter-menu__category--active.sc-ds-filter-menu{color:var(--color-foreground-primary)}.filter-menu__options.sc-ds-filter-menu{min-width:0;overflow:hidden}.filter-menu__date-field.sc-ds-filter-menu{display:flex;min-width:0;flex-direction:column;align-items:stretch;gap:var(--dimension-space-100)}.filter-menu__date-control.sc-ds-filter-menu{width:100%;border-radius:var(--dimension-radius-025);background:transparent;box-shadow:inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-secondary)}.filter-menu__date-control.sc-ds-filter-menu:focus-within{box-shadow:inset 0 0 0 var(--dimension-stroke-width-018) var(--color-border-bold-brand)}.filter-menu__date-input.sc-ds-filter-menu{flex:1 1 auto;min-width:0;height:100%;padding-inline:var(--dimension-space-100);border:0;outline:0;background:transparent;color:var(--color-foreground-primary);font:inherit}.filter-menu__footer.sc-ds-filter-menu{flex:0 0 auto}.filter-menu__clear.sc-ds-filter-menu{color:var(--color-foreground-bold-brand)}@media (max-width: 520px){.filter-menu__body.sc-ds-filter-menu{grid-template-columns:minmax(calc(var(--dimension-size-base) * 14), 2fr) minmax(0, 3fr)}}@media (forced-colors: active){.filter-menu__categories.sc-ds-filter-menu{border-inline-end-color:var(--ds-forced-color-content)}.filter-menu__date-control.sc-ds-filter-menu{outline:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content)}}`;const I=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");let z=0;const A={lg:"lg",md:"md",sm:"sm",xs:"xs"};const F=e(class e extends i{constructor(e){super();if(e!==false){this.__registerHost()}this.dsChange=t(this,"dsChange");this.dsClear=t(this,"dsClear");this.dsActiveFilterChange=t(this,"dsActiveFilterChange");this.dsClose=t(this,"dsClose");this.dsOpenChange=t(this,"dsOpenChange");this.dsAfterClose=t(this,"dsAfterClose");this.open=false;this.triggerLabel="Filters";this.icon="Filters";this.size="md";this.width="hug";this.hasBorder=true;this.activeFill=false;this.ariaLabel=null;this.filters=[];this.values={};this.side="bottom";this.align="end";this.sideOffset=p.space050;this.alignOffset=0;this.menuWidth=p.menuWidthLg;this.menuLabel="Filters";this.categoriesLabel="Filter categories";this.clearLabel="Clear";this.initialFocusVisible=false;this.shouldRender=false;this.closing=false;this.positionReady=false;this.pos={x:0,y:0};this.focusRingVisible=false;this.activeOptionIndex=0;this.generatedId=`ds-filter-menu-${++z}`;this.outsideHandler=null;this.triggerElement=null;this.pendingInitialFocusVisible=false;this.closeTimer=null;this.closingSnapshot=null;this.position=new n({getAnchor:()=>this.resolvedAnchor,getPopup:()=>this.el.querySelector(".filter-menu-popup"),measure:(e,i)=>{if(!this.open)return null;const t=e.getBoundingClientRect();const r=y(x.space050,x.space050);return{anchorRect:t,popupWidth:i.offsetWidth||this.popupFallbackWidth,popupHeight:i.offsetHeight||this.popupFallbackHeight,side:this.side,align:this.align,sideOffsetPx:y(this.sideOffset,x.space050),alignOffsetPx:w({align:this.align,alignOffsetPx:y(this.alignOffset,0),sectionInsetPx:r}),viewportPadPx:this.viewportPad,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}},apply:({x:e,y:i})=>{this.pos={x:e,y:i}},onReady:()=>{this.positionReady=true},liveUpdate:"double-frame",observeResize:true,topLayer:true})}componentDidLoad(){if(this.open)this.onOpenChange(true)}disconnectedCallback(){this.position.unobserve();this.teardownListeners()}onOpenChange(e){if(e){this.teardownListeners();this.closingSnapshot=null;this.shouldRender=true;this.closing=false;this.positionReady=false;this.focusRingVisible=this.pendingInitialFocusVisible||this.initialFocusVisible;this.setupListeners();this.position.schedule((()=>this.focusInitialCategory()));return}if(!this.shouldRender)return;this.position.cancel();this.captureClosingSnapshot();this.closing=true;this.teardownListeners();const i=b(x.motionShort2,x.animationDurationShort3);if(i<=0){this.finishClose();return}this.closeTimer=setTimeout((()=>this.finishClose()),i)}onPositionInputChange(){if(this.open)this.position.schedule()}handleKeyDown(e){if(!this.shouldRender||this.closing)return;if(e.key==="Escape"){e.preventDefault();this.close();return}if(e.key!=="Tab"||!this.tabLeavesPopup(e))return;e.preventDefault();this.close(false);this.moveFocusAfterTab(e.shiftKey)}get resolvedAnchor(){if(this.anchor)return this.anchor;if(this.anchorId)return document.getElementById(this.anchorId);return this.triggerElement}get usesInternalTrigger(){return!this.anchor&&!this.anchorId}get anchorFocusTarget(){const e=this.resolvedAnchor;if(!e)return null;if(e.matches(I))return e;return e.querySelector(I)??e}get viewportPad(){return y(x.space050,x.space050)}get popupFallbackWidth(){return y(x.menuWidthLg,x.menuWidthLg)}get popupFallbackHeight(){return y(x.menuFallbackHeight,x.menuFallbackHeight)}setupListeners(){this.outsideHandler=e=>{const i=e.target;const t=this.el.querySelector(".filter-menu-popup");if(t?.contains(i)||this.resolvedAnchor?.contains(i))return;this.close()};document.addEventListener("mousedown",this.outsideHandler,true);this.position.observe()}teardownListeners(){this.position.unobserve();if(this.outsideHandler){document.removeEventListener("mousedown",this.outsideHandler,true);this.outsideHandler=null}if(this.closeTimer){clearTimeout(this.closeTimer);this.closeTimer=null}}close(e=true){this.captureClosingSnapshot();if(e)this.focusAnchor();this.dsOpenChange.emit(false);this.dsClose.emit();this.open=false;this.onOpenChange(false)}toggleFromTrigger(e){if(this.open){this.close();return}this.pendingInitialFocusVisible=e.detail===0;this.open=true;this.dsOpenChange.emit(true);this.onOpenChange(true)}handleTriggerKeyDown(e){if(e.key!=="ArrowDown"||this.open)return;e.preventDefault();this.pendingInitialFocusVisible=true;this.open=true;this.dsOpenChange.emit(true);this.onOpenChange(true)}finishClose(){const e=this.el.querySelector(".filter-menu-popup");if(e?.matches(":popover-open"))e.hidePopover();this.shouldRender=false;this.closing=false;this.closingSnapshot=null;this.closeTimer=null;this.dsAfterClose.emit()}captureClosingSnapshot(){if(this.closingSnapshot)return;this.closingSnapshot={filters:this.filters.map((e=>({...e,options:e.options?.map((e=>({...e})))}))),values:Object.fromEntries(Object.entries(this.values).map((([e,i])=>[e,Array.isArray(i)?[...i]:i]))),activeFilterId:this.activeFilterId}}focusAnchor(){const e=this.resolvedAnchor;if(e?.setFocus){void e.setFocus();return}this.anchorFocusTarget?.focus()}focusInitialCategory(){requestAnimationFrame((()=>{this.el.querySelector('.filter-menu__category[tabindex="0"]')?.focus();this.pendingInitialFocusVisible=false}))}tabLeavesPopup(e){const i=this.el.querySelector(".filter-menu-popup");if(!i)return true;const t=Array.from(i.querySelectorAll(I)).filter((e=>e.getClientRects().length>0));const r=t.indexOf(e.target);if(r<0)return true;return e.shiftKey?r===0:r===t.length-1}moveFocusAfterTab(e){const i=this.anchorFocusTarget;if(!i)return;if(e){i.focus();return}const t=Array.from(document.querySelectorAll(I)).filter((e=>!e.closest(".filter-menu-popup")&&!e.closest("[inert]")&&e.getClientRects().length>0));const r=t.indexOf(i);(t[r+1]??i).focus()}selectedFilter(e,i){return e.find((e=>e.id===i))??e[0]}selectedCount(e,i){const t=i[e.id];if(e.kind==="multiple")return Array.isArray(t)?t.length:0;if(e.kind==="boolean")return t===true?1:0;return typeof t==="string"&&t.length>0?1:0}totalSelected(e,i){return e.reduce(((e,t)=>e+this.selectedCount(t,i)),0)}activeFilterCount(e,i){return e.filter((e=>this.selectedCount(e,i)>0)).length}selectCategory(e,i=false){this.activeOptionIndex=0;this.dsActiveFilterChange.emit(e);if(!i)return;requestAnimationFrame((()=>{this.el.querySelector(`[data-filter-category="${e}"]`)?.focus()}))}handleCategoryKeyDown(e,i,t){const r=i.findIndex((e=>e.id===t));let o;if(e.key==="ArrowDown")o=(r+1)%i.length;else if(e.key==="ArrowUp")o=(r-1+i.length)%i.length;else if(e.key==="Home")o=0;else if(e.key==="End")o=i.length-1;else if(e.key==="ArrowRight"){e.preventDefault();requestAnimationFrame((()=>{this.el.querySelector('.filter-menu__options [role="option"], .filter-menu__options input')?.focus()}));return}else return;e.preventDefault();this.focusRingVisible=true;this.selectCategory(i[o].id,true)}handlePanelKeyDown(e,i){if(e.key!=="ArrowLeft")return;e.preventDefault();this.el.querySelector(`[data-filter-category="${i}"]`)?.focus()}handleOptionKeyDown(e,i,t,r,o){const s=i.options??[];if(e.key==="ArrowLeft"){this.handlePanelKeyDown(e,i.id);return}if(e.key==="Enter"||e.key===" "){e.preventDefault();this.selectOption(i,t,o);return}if(!["ArrowDown","ArrowUp","Home","End"].includes(e.key))return;e.preventDefault();const n=s.map(((e,i)=>({candidate:e,optionIndex:i}))).filter((({candidate:e})=>!e.isInactive)).map((({optionIndex:e})=>e));if(!n.length)return;const d=n.indexOf(r);let c;if(e.key==="Home")c=n[0];else if(e.key==="End")c=n[n.length-1];else{const i=e.key==="ArrowDown"?1:-1;const t=d>=0?d:i===1?-1:0;c=n[(t+i+n.length)%n.length]}this.activeOptionIndex=c;this.focusRingVisible=true;requestAnimationFrame((()=>{this.el.querySelector(`#${this.generatedId}-${i.id}-option-${c}`)?.focus()}))}toggleMultiple(e,i,t,r){if(i.isInactive)return;const o=Array.isArray(r[e.id])?r[e.id]:[];const s=new Set(o);if(t)s.add(i.value);else s.delete(i.value);const n=(e.options??[]).map((e=>e.value)).filter((e=>s.has(e)));this.dsChange.emit({filterId:e.id,value:n})}selectOption(e,i,t){if(i.isInactive)return;if(e.kind==="single"){this.dsChange.emit({filterId:e.id,value:i.value});return}const r=Array.isArray(t[e.id])?t[e.id].includes(i.value):false;this.toggleMultiple(e,i,!r,t)}renderOptions(e,i){const t=i[e.id];if(e.kind==="multiple"||e.kind==="single"){const o=Array.isArray(t)?t:[];const s=e.options??[];const n=c(s.map((e=>({label:e.label,value:e.value,subtext:e.description}))));return s.map(((s,c)=>{const a=e.kind==="multiple"?o.includes(s.value):t===s.value;return r(d,{size:"md",id:`${this.generatedId}-${e.id}-option-${c}`,option:{label:s.label,value:s.value,subtext:s.description,isInactive:s.isInactive},selected:a,active:c===this.activeOptionIndex,focusRingVisible:this.focusRingVisible,usesSubtext:n,tabIndex:c===this.activeOptionIndex?0:-1,leading:e.kind==="multiple"?r("span",{class:"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-checkbox",{label:"",size:"md",checked:a,presentation:true})):undefined,onFocus:()=>{this.activeOptionIndex=c},onKeyDown:t=>this.handleOptionKeyDown(t,e,s,c,i),onHover:()=>{this.focusRingVisible=false;this.activeOptionIndex=c},onSelect:()=>this.selectOption(e,s,i)})}))}if(e.kind==="boolean"){const i={label:e.fieldLabel??e.label,value:"true",description:e.description};return r(d,{size:"md",id:`${this.generatedId}-${e.id}-option-0`,option:{label:i.label,value:i.value,subtext:i.description},selected:t===true,active:true,focusRingVisible:this.focusRingVisible,usesSubtext:Boolean(i.description),tabIndex:0,leading:r("span",{class:"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-checkbox",{label:"",size:"md",checked:t===true,presentation:true})),onKeyDown:i=>{if(i.key==="ArrowLeft")this.handlePanelKeyDown(i,e.id);else if(i.key==="Enter"||i.key===" "){i.preventDefault();this.dsChange.emit({filterId:e.id,value:t!==true})}},onHover:()=>{this.focusRingVisible=false},onSelect:()=>this.dsChange.emit({filterId:e.id,value:t!==true})})}const o=typeof t==="string"?t:"";const s=`${this.generatedId}-${e.id}-input`;return r("div",{class:"filter-menu__date-field"},r("label",{htmlFor:s},r("ds-text",{as:"span",variant:"text-body-small",emphasis:true,color:"primary"},e.fieldLabel??"Event date")),r("div",{class:"filter-menu__date-control ds-control-frame ds-control--md"},r("input",{id:s,class:"filter-menu__date-input",type:"date",value:o,onInput:i=>this.dsChange.emit({filterId:e.id,value:i.target.value})}),o?r("ds-button-unfilled",{variant:"icon",icon:"CrossCircle",size:"sm",isInset:true,hasBorder:false,rounded:true,ariaLabel:`${this.clearLabel} ${e.fieldLabel??e.label}`,onDsClick:i=>{i.stopPropagation();this.dsChange.emit({filterId:e.id,value:""})}}):null))}render(){const e=this.closing&&this.closingSnapshot?this.closingSnapshot:{filters:this.filters,values:this.values,activeFilterId:this.activeFilterId};const i=this.selectedFilter(e.filters,e.activeFilterId);const t=this.totalSelected(e.filters,e.values);const s=this.activeFilterCount(e.filters,e.values);const n=s>0;const d=`${this.triggerLabel}${n?` · ${s}`:""}`;const c=_[this.size];const a=A[this.size];const l=`${this.generatedId}-popup`;const f={position:"fixed",left:"0",top:"0",width:this.menuWidth,transform:`translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,zIndex:"9998",visibility:this.positionReady?"visible":"hidden"};return r(o,{key:"6140d3d0d92bd179fd8786edd0eecade7f4c077b",class:{"filter-menu-host":true,"filter-menu-host--external-trigger":!this.usesInternalTrigger,"ds-select-trigger-host":this.usesInternalTrigger,[`ds-control--${this.size}`]:true,...k(this.width)}},this.usesInternalTrigger?r("button",{ref:e=>{this.triggerElement=e??null},id:this.inputId??`${this.generatedId}-trigger`,type:"button",class:{trigger:true,"ds-control-frame":true,"ds-focus-ring-inset":true,"ds-interaction-fill":true,"ds-interaction-fill--selected":this.activeFill&&n,"trigger--expanded":this.open||this.closing,"trigger--bordered":this.hasBorder,"trigger--has-value":n,[`ds-control--${this.size}`]:true},role:"combobox","aria-haspopup":"dialog","aria-expanded":String(this.open),"aria-controls":this.open?l:undefined,"aria-label":this.ariaLabel??this.menuLabel,onClick:e=>this.toggleFromTrigger(e),onKeyDown:e=>this.handleTriggerKeyDown(e)},this.icon?r("span",{class:"trigger__prefix ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-icon",{name:this.icon,size:a,color:"inherit"})):null,r("ds-text",{class:"trigger__label-box trigger__label trigger__label-content ds-control-label-box ds-interaction-fill__content",as:"span",variant:c,color:"inherit",lineTruncation:1},d),r("span",{class:"trigger__chevron ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-icon",{name:"ChevronDown",size:a,color:"inherit"}))):null,this.shouldRender?r("div",{id:l,popover:"manual",class:{"filter-menu-popup":true,"ds-choice-popup":true,"ds-choice-popup--closing":this.closing},style:f,role:"dialog","aria-label":this.menuLabel},i?r("div",{class:"filter-menu"},r("div",{class:"filter-menu__body"},r("div",{class:"filter-menu__categories ds-choice-list ds-chrome-column ds-chrome-space--sm",role:"tablist","aria-label":this.categoriesLabel,"aria-orientation":"vertical"},e.filters.map((t=>{const o=t.id===i.id;const s=this.selectedCount(t,e.values);return r("div",{key:t.id,class:{"filter-menu__category-section":true,"ds-choice-section--divided":Boolean(t.divider)}},r("button",{id:`${this.generatedId}-${t.id}-tab`,type:"button",role:"tab","data-filter-category":t.id,class:{"filter-menu__category":true,"filter-menu__category--active":o,"ds-choice-item":true,"ds-control-frame":true,"ds-control--md":true,"ds-focus-ring-inset":true,"ds-focus-ring--visible":o&&this.focusRingVisible,"ds-interaction-fill":true,"ds-interaction-fill--selected":o},"aria-selected":String(o),"aria-controls":`${this.generatedId}-panel`,tabIndex:o?0:-1,onMouseDown:()=>{this.focusRingVisible=false},onClick:()=>this.selectCategory(t.id),onKeyDown:i=>this.handleCategoryKeyDown(i,e.filters,t.id)},r("ds-text",{class:"ds-choice-item__content ds-choice-item__label ds-control-label-box ds-interaction-fill__content",as:"span",variant:"text-body-medium",color:o?"primary":"secondary"},t.label),s>0?r("ds-tag",{class:"ds-choice-item__tag ds-interaction-fill__content",label:String(s),size:"sm",intent:"brand",contrast:"bold",isInset:true,rounded:true}):null))}))),r("div",{id:`${this.generatedId}-panel`,class:"filter-menu__options",role:"tabpanel","aria-labelledby":`${this.generatedId}-${i.id}-tab`},r("div",{key:i.id,class:"filter-menu__option-list ds-choice-list ds-chrome-column ds-chrome-space--sm",role:"listbox","aria-label":i.label,"aria-multiselectable":i.kind==="multiple"?"true":undefined},this.renderOptions(i,e.values)))),t>0?r("div",{class:"filter-menu__footer ds-choice-footer"},r("div",{class:"ds-choice-footer__content ds-control--md"},r("ds-text",{class:"ds-choice-footer__summary",as:"span",variant:"text-body-medium",color:"secondary","aria-live":"polite"},t," selected"),r("button",{class:"filter-menu__clear ds-choice-footer__clear ds-text-action",type:"button",onClick:()=>this.dsClear.emit()},r("ds-text",{as:"span",variant:"text-body-medium",color:"inherit"},this.clearLabel)))):null):null):null)}get el(){return this}static get watchers(){return{open:[{onOpenChange:0}],anchor:[{onPositionInputChange:0}],anchorId:[{onPositionInputChange:0}],side:[{onPositionInputChange:0}],align:[{onPositionInputChange:0}],sideOffset:[{onPositionInputChange:0}],alignOffset:[{onPositionInputChange:0}],menuWidth:[{onPositionInputChange:0}]}}static get style(){return C()}},[2,"ds-filter-menu",{open:[1028],triggerLabel:[1,"trigger-label"],icon:[1],size:[1],width:[1],hasBorder:[4,"has-border"],activeFill:[4,"active-fill"],inputId:[1,"input-id"],ariaLabel:[1,"aria-label"],filters:[16],values:[16],activeFilterId:[1,"active-filter-id"],anchor:[16],anchorId:[1,"anchor-id"],side:[1],align:[1],sideOffset:[8,"side-offset"],alignOffset:[8,"align-offset"],menuWidth:[1,"menu-width"],menuLabel:[1,"menu-label"],categoriesLabel:[1,"categories-label"],clearLabel:[1,"clear-label"],initialFocusVisible:[4,"initial-focus-visible"],shouldRender:[32],closing:[32],positionReady:[32],pos:[32],focusRingVisible:[32],activeOptionIndex:[32]},[[0,"keydown","handleKeyDown"]],{open:[{onOpenChange:0}],anchor:[{onPositionInputChange:0}],anchorId:[{onPositionInputChange:0}],side:[{onPositionInputChange:0}],align:[{onPositionInputChange:0}],sideOffset:[{onPositionInputChange:0}],alignOffset:[{onPositionInputChange:0}],menuWidth:[{onPositionInputChange:0}]}]);function $(){if(typeof customElements==="undefined"){return}const e=["ds-filter-menu","ds-badge","ds-button-unfilled","ds-checkbox","ds-icon","ds-loader","ds-tag","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-filter-menu":if(!customElements.get(s(e))){customElements.define(s(e),F)}break;case"ds-badge":if(!customElements.get(s(e))){a()}break;case"ds-button-unfilled":if(!customElements.get(s(e))){l()}break;case"ds-checkbox":if(!customElements.get(s(e))){f()}break;case"ds-icon":if(!customElements.get(s(e))){u()}break;case"ds-loader":if(!customElements.get(s(e))){h()}break;case"ds-tag":if(!customElements.get(s(e))){m()}break;case"ds-text":if(!customElements.get(s(e))){g()}break;case"ds-tooltip":if(!customElements.get(s(e))){v()}break}}))}$();const j=F;const P=$;export{j as DsFilterMenu,P as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-filter-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["filterMenuCss","FILTER_MENU_FOCUSABLE_SELECTOR","join","filterMenuId","ICON_SIZE","lg","md","sm","xs","FilterMenu","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","open","triggerLabel","icon","size","width","hasBorder","activeFill","ariaLabel","filters","values","side","align","sideOffset","TOKEN_CSS_LENGTHS","space050","alignOffset","menuWidth","menuWidthLg","menuLabel","categoriesLabel","clearLabel","initialFocusVisible","shouldRender","closing","positionReady","pos","x","y","focusRingVisible","activeOptionIndex","generatedId","outsideHandler","triggerElement","pendingInitialFocusVisible","closeTimer","closingSnapshot","position","AnchoredPositionController","getAnchor","resolvedAnchor","getPopup","el","querySelector","measure","anchor","popup","anchorRect","getBoundingClientRect","sectionInsetPx","resolveCssLengthPx","TOKEN_DEFAULTS","popupWidth","offsetWidth","popupFallbackWidth","popupHeight","offsetHeight","popupFallbackHeight","sideOffsetPx","alignOffsetPx","resolveChoicePopupAlignOffset","viewportPadPx","viewportPad","viewportWidth","window","innerWidth","viewportHeight","innerHeight","apply","onReady","liveUpdate","observeResize","topLayer","componentDidLoad","onOpenChange","disconnectedCallback","unobserve","teardownListeners","isOpen","setupListeners","schedule","focusInitialCategory","cancel","captureClosingSnapshot","duration","resolveMotionTimeMs","motionShort2","animationDurationShort3","finishClose","setTimeout","onPositionInputChange","handleKeyDown","event","key","preventDefault","close","tabLeavesPopup","moveFocusAfterTab","shiftKey","anchorId","document","getElementById","usesInternalTrigger","anchorFocusTarget","matches","menuFallbackHeight","target","contains","addEventListener","observe","removeEventListener","clearTimeout","restoreFocus","focusAnchor","dsOpenChange","emit","dsClose","toggleFromTrigger","detail","handleTriggerKeyDown","hidePopover","dsAfterClose","map","filter","options","option","Object","fromEntries","entries","value","Array","isArray","activeFilterId","setFocus","focus","requestAnimationFrame","focusables","from","querySelectorAll","element","getClientRects","length","index","indexOf","backwards","candidates","closest","selectedFilter","find","id","selectedCount","kind","totalSelected","reduce","total","activeFilterCount","selectCategory","filterId","dsActiveFilterChange","handleCategoryKeyDown","currentIndex","findIndex","nextIndex","handlePanelKeyDown","handleOptionKeyDown","selectOption","includes","enabled","candidate","optionIndex","isInactive","current","next","direction","start","toggleMultiple","checked","selected","Set","add","delete","ordered","has","dsChange","renderOptions","usesSubtext","choiceListUsesSubtext","label","subtext","description","isSelected","h","ChoiceOptionRow","active","tabIndex","leading","class","presentation","undefined","onFocus","onKeyDown","onHover","onSelect","fieldLabel","Boolean","dateValue","inputId","htmlFor","as","variant","emphasis","color","type","onInput","isInset","rounded","onDsClick","stopPropagation","render","state","activeFilter","hasActiveFilters","textVariant","CONTROL_TEXT_VARIANT","iconSize","popupId","popupStyle","left","top","transform","Math","round","zIndex","visibility","Host","controlWidthClass","ref","trigger","role","String","onClick","name","lineTruncation","popover","style","count","divider","onMouseDown","intent","contrast","dsClear"],"sources":["src/wc/components/FilterMenu/FilterMenu.css?tag=ds-filter-menu&encapsulation=scoped","src/wc/components/FilterMenu/FilterMenu.tsx"],"sourcesContent":["@import '../../utils/choice-list.css';\n@import '../../utils/control-parts.css';\n@import '../../utils/control-width.css';\n@import '../../utils/select-trigger.css';\n\n:host(.filter-menu-host--external-trigger) {\n display: contents;\n}\n\n.filter-menu {\n display: flex;\n min-height: 0;\n flex-direction: column;\n color: var(--color-foreground-primary);\n}\n\n.filter-menu__body {\n display: grid;\n grid-template-columns: minmax(calc(var(--dimension-size-base) * 18), 2fr) minmax(0, 3fr);\n min-height: calc(var(--dimension-size-800) * 4 + var(--dimension-space-150));\n max-height: calc(100vh - var(--dimension-size-800) - var(--dimension-size-600));\n}\n\n.filter-menu__categories {\n min-width: 0;\n border-inline-end: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n}\n\n.filter-menu__category-section {\n display: flex;\n min-width: 0;\n flex-direction: column;\n}\n\n.filter-menu__category-section.ds-choice-section--divided {\n padding-block-end: var(--dimension-space-050);\n}\n\n.filter-menu__category {\n justify-content: space-between;\n width: 100%;\n border: 0;\n background: transparent;\n color: var(--color-foreground-secondary);\n cursor: default;\n text-align: start;\n}\n\n.filter-menu__category--active {\n color: var(--color-foreground-primary);\n}\n\n.filter-menu__options {\n min-width: 0;\n overflow: hidden;\n}\n\n.filter-menu__date-field {\n display: flex;\n min-width: 0;\n flex-direction: column;\n align-items: stretch;\n gap: var(--dimension-space-100);\n}\n\n.filter-menu__date-control {\n width: 100%;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n box-shadow: inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-secondary);\n}\n\n.filter-menu__date-control:focus-within {\n box-shadow: inset 0 0 0 var(--dimension-stroke-width-018) var(--color-border-bold-brand);\n}\n\n.filter-menu__date-input {\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n padding-inline: var(--dimension-space-100);\n border: 0;\n outline: 0;\n background: transparent;\n color: var(--color-foreground-primary);\n font: inherit;\n}\n\n.filter-menu__footer {\n flex: 0 0 auto;\n}\n\n.filter-menu__clear {\n color: var(--color-foreground-bold-brand);\n}\n\n@media (max-width: 520px) {\n .filter-menu__body {\n grid-template-columns: minmax(calc(var(--dimension-size-base) * 14), 2fr) minmax(0, 3fr);\n }\n}\n\n@media (forced-colors: active) {\n .filter-menu__categories {\n border-inline-end-color: var(--ds-forced-color-content);\n }\n\n .filter-menu__date-control {\n outline: var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport {\n CONTROL_TEXT_VARIANT,\n controlWidthClass,\n resolveChoicePopupAlignOffset,\n resolveCssLengthPx,\n resolveMotionTimeMs,\n TOKEN_CSS_LENGTHS,\n TOKEN_DEFAULTS,\n type ControlWidth,\n} from '../../utils';\nimport type { AnchoredAlign, AnchoredSide } from '../../utils/anchored-position';\nimport { AnchoredPositionController } from '../../utils/anchored-position-controller';\nimport { ChoiceOptionRow } from '../../utils/choice-list-parts';\nimport { choiceListUsesSubtext } from '../../utils/choice-list';\n\nexport type FilterMenuFilterKind = 'single' | 'multiple' | 'boolean' | 'date';\nexport type FilterMenuSize = 'lg' | 'md' | 'sm' | 'xs';\nexport type FilterMenuWidth = ControlWidth;\n\nexport interface FilterMenuOption {\n label: string;\n value: string;\n description?: string;\n isInactive?: boolean;\n}\n\nexport interface FilterMenuFilter {\n id: string;\n label: string;\n kind: FilterMenuFilterKind;\n options?: FilterMenuOption[];\n description?: string;\n fieldLabel?: string;\n /** Draw a standard menu-section divider after this category. */\n divider?: boolean;\n}\n\nexport type FilterMenuValue = string[] | boolean | string;\nexport type FilterMenuValues = Record<string, FilterMenuValue | undefined>;\n\nexport interface FilterMenuChangeDetail {\n filterId: string;\n value: FilterMenuValue;\n}\n\nconst FILTER_MENU_FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\nlet filterMenuId = 0;\n\nconst ICON_SIZE: Record<FilterMenuSize, 'lg' | 'md' | 'sm' | 'xs'> = {\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\n@Component({\n tag: 'ds-filter-menu',\n styleUrl: 'FilterMenu.css',\n scoped: true,\n})\nexport class FilterMenu {\n @Element() el!: HTMLElement;\n\n /** Controlled popup visibility. */\n @Prop({ mutable: true }) open: boolean = false;\n /** Select trigger text. The selected count is appended automatically. */\n @Prop() triggerLabel: string = 'Filters';\n /** Optional select trigger prefix icon name. */\n @Prop() icon: string | undefined = 'Filters';\n /** Select trigger density. */\n @Prop() size: FilterMenuSize = 'md';\n /** Select trigger width fit. */\n @Prop() width: FilterMenuWidth = 'hug';\n /** Show the surface-aware inset border around the select trigger. */\n @Prop() hasBorder: boolean = true;\n /** Show selected interaction fill when one or more criteria are active. */\n @Prop() activeFill: boolean = false;\n /** ID applied to the internal select trigger. */\n @Prop() inputId: string | undefined;\n /** Direct accessible name for the internal select trigger. */\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n /** Product-owned filter categories and option definitions. */\n @Prop() filters: FilterMenuFilter[] = [];\n /** Controlled values keyed by filter id. */\n @Prop() values: FilterMenuValues = {};\n /** Controlled category shown in the option pane. */\n @Prop() activeFilterId: string | undefined;\n /** External trigger element to position against. */\n @Prop() anchor: HTMLElement | undefined;\n /** ID of the external trigger element used for positioning and focus return. */\n @Prop() anchorId: string | undefined;\n /** Preferred popup side; collision handling may flip it. */\n @Prop() side: AnchoredSide = 'bottom';\n /** Cross-axis alignment against the trigger. */\n @Prop() align: AnchoredAlign = 'end';\n /** Gap between trigger and popup — number in px or a TokoMo length. */\n @Prop() sideOffset: number | string = TOKEN_CSS_LENGTHS.space050;\n /** Cross-axis offset — number in px or a TokoMo length. */\n @Prop() alignOffset: number | string = 0;\n /** Popup width. It remains clamped to the viewport by the component recipe. */\n @Prop() menuWidth: string = TOKEN_CSS_LENGTHS.menuWidthLg;\n /** Accessible name for the non-modal filter dialog. */\n @Prop() menuLabel: string = 'Filters';\n /** Accessible name for the category tab list. */\n @Prop() categoriesLabel: string = 'Filter categories';\n /** Footer action and date-clear accessible label. */\n @Prop() clearLabel: string = 'Clear';\n /** Show a visible focus ring on initial entry after keyboard activation. */\n @Prop() initialFocusVisible: boolean = false;\n\n @State() private shouldRender = false;\n @State() private closing = false;\n @State() private positionReady = false;\n @State() private pos: { x: number; y: number } = { x: 0, y: 0 };\n @State() private focusRingVisible = false;\n @State() private activeOptionIndex = 0;\n\n /** Requests a controlled value replacement without closing the popup. */\n @Event() dsChange!: EventEmitter<FilterMenuChangeDetail>;\n /** Requests that the consumer clear every filter value. */\n @Event() dsClear!: EventEmitter<void>;\n /** Requests a controlled active-category replacement. */\n @Event() dsActiveFilterChange!: EventEmitter<string>;\n /** Requests that the controlled popup close. */\n @Event() dsClose!: EventEmitter<void>;\n /** Emitted whenever internal select-trigger activation changes popup visibility. */\n @Event() dsOpenChange!: EventEmitter<boolean>;\n /** Emitted after exit motion and rendered popup removal complete. */\n @Event() dsAfterClose!: EventEmitter<void>;\n\n private readonly generatedId = `ds-filter-menu-${++filterMenuId}`;\n private outsideHandler: ((event: MouseEvent) => void) | null = null;\n private triggerElement: HTMLButtonElement | null = null;\n private pendingInitialFocusVisible = false;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private closingSnapshot: {\n filters: FilterMenuFilter[];\n values: FilterMenuValues;\n activeFilterId: string | undefined;\n } | null = null;\n\n private readonly position = new AnchoredPositionController({\n getAnchor: () => this.resolvedAnchor,\n getPopup: () => this.el.querySelector<HTMLElement>('.filter-menu-popup'),\n measure: (anchor, popup) => {\n if (!this.open) return null;\n const anchorRect = anchor.getBoundingClientRect();\n const sectionInsetPx = resolveCssLengthPx(\n TOKEN_DEFAULTS.space050,\n TOKEN_DEFAULTS.space050\n );\n return {\n anchorRect,\n popupWidth: popup.offsetWidth || this.popupFallbackWidth,\n popupHeight: popup.offsetHeight || this.popupFallbackHeight,\n side: this.side,\n align: this.align,\n sideOffsetPx: resolveCssLengthPx(this.sideOffset, TOKEN_DEFAULTS.space050),\n alignOffsetPx: resolveChoicePopupAlignOffset({\n align: this.align,\n alignOffsetPx: resolveCssLengthPx(this.alignOffset, 0),\n sectionInsetPx,\n }),\n viewportPadPx: this.viewportPad,\n viewportWidth: window.innerWidth,\n viewportHeight: window.innerHeight,\n };\n },\n apply: ({ x, y }) => {\n this.pos = { x, y };\n },\n onReady: () => {\n this.positionReady = true;\n },\n liveUpdate: 'double-frame',\n observeResize: true,\n topLayer: true,\n });\n\n componentDidLoad() {\n if (this.open) this.onOpenChange(true);\n }\n\n disconnectedCallback() {\n this.position.unobserve();\n this.teardownListeners();\n }\n\n @Watch('open')\n onOpenChange(isOpen: boolean) {\n if (isOpen) {\n this.teardownListeners();\n this.closingSnapshot = null;\n this.shouldRender = true;\n this.closing = false;\n this.positionReady = false;\n this.focusRingVisible = this.pendingInitialFocusVisible || this.initialFocusVisible;\n this.setupListeners();\n this.position.schedule(() => this.focusInitialCategory());\n return;\n }\n\n if (!this.shouldRender) return;\n this.position.cancel();\n this.captureClosingSnapshot();\n this.closing = true;\n this.teardownListeners();\n const duration = resolveMotionTimeMs(\n TOKEN_DEFAULTS.motionShort2,\n TOKEN_DEFAULTS.animationDurationShort3\n );\n if (duration <= 0) {\n this.finishClose();\n return;\n }\n this.closeTimer = setTimeout(() => this.finishClose(), duration);\n }\n\n @Watch('anchor')\n @Watch('anchorId')\n @Watch('side')\n @Watch('align')\n @Watch('sideOffset')\n @Watch('alignOffset')\n @Watch('menuWidth')\n onPositionInputChange() {\n if (this.open) this.position.schedule();\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (!this.shouldRender || this.closing) return;\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close();\n return;\n }\n if (event.key !== 'Tab' || !this.tabLeavesPopup(event)) return;\n event.preventDefault();\n this.close(false);\n this.moveFocusAfterTab(event.shiftKey);\n }\n\n private get resolvedAnchor(): HTMLElement | null {\n if (this.anchor) return this.anchor;\n if (this.anchorId) return document.getElementById(this.anchorId);\n return this.triggerElement;\n }\n\n private get usesInternalTrigger(): boolean {\n return !this.anchor && !this.anchorId;\n }\n\n private get anchorFocusTarget(): HTMLElement | null {\n const anchor = this.resolvedAnchor;\n if (!anchor) return null;\n if (anchor.matches(FILTER_MENU_FOCUSABLE_SELECTOR)) return anchor;\n return anchor.querySelector<HTMLElement>(FILTER_MENU_FOCUSABLE_SELECTOR) ?? anchor;\n }\n\n private get viewportPad(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n }\n\n private get popupFallbackWidth(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuWidthLg, TOKEN_DEFAULTS.menuWidthLg);\n }\n\n private get popupFallbackHeight(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuFallbackHeight, TOKEN_DEFAULTS.menuFallbackHeight);\n }\n\n private setupListeners() {\n this.outsideHandler = event => {\n const target = event.target as Node;\n const popup = this.el.querySelector('.filter-menu-popup');\n if (popup?.contains(target) || this.resolvedAnchor?.contains(target)) return;\n this.close();\n };\n document.addEventListener('mousedown', this.outsideHandler, true);\n this.position.observe();\n }\n\n private teardownListeners() {\n this.position.unobserve();\n if (this.outsideHandler) {\n document.removeEventListener('mousedown', this.outsideHandler, true);\n this.outsideHandler = null;\n }\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private close(restoreFocus = true) {\n this.captureClosingSnapshot();\n if (restoreFocus) this.focusAnchor();\n this.dsOpenChange.emit(false);\n this.dsClose.emit();\n this.open = false;\n this.onOpenChange(false);\n }\n\n private toggleFromTrigger(event: MouseEvent) {\n if (this.open) {\n this.close();\n return;\n }\n this.pendingInitialFocusVisible = event.detail === 0;\n this.open = true;\n this.dsOpenChange.emit(true);\n this.onOpenChange(true);\n }\n\n private handleTriggerKeyDown(event: KeyboardEvent) {\n if (event.key !== 'ArrowDown' || this.open) return;\n event.preventDefault();\n this.pendingInitialFocusVisible = true;\n this.open = true;\n this.dsOpenChange.emit(true);\n this.onOpenChange(true);\n }\n\n private finishClose() {\n const popup = this.el.querySelector<HTMLElement>('.filter-menu-popup');\n if (popup?.matches(':popover-open')) popup.hidePopover();\n this.shouldRender = false;\n this.closing = false;\n this.closingSnapshot = null;\n this.closeTimer = null;\n this.dsAfterClose.emit();\n }\n\n private captureClosingSnapshot() {\n if (this.closingSnapshot) return;\n this.closingSnapshot = {\n filters: this.filters.map(filter => ({\n ...filter,\n options: filter.options?.map(option => ({ ...option })),\n })),\n values: Object.fromEntries(\n Object.entries(this.values).map(([key, value]) => [\n key,\n Array.isArray(value) ? [...value] : value,\n ])\n ),\n activeFilterId: this.activeFilterId,\n };\n }\n\n private focusAnchor() {\n const anchor = this.resolvedAnchor as\n (HTMLElement & { setFocus?: () => Promise<void> | void }) | null;\n if (anchor?.setFocus) {\n void anchor.setFocus();\n return;\n }\n this.anchorFocusTarget?.focus();\n }\n\n private focusInitialCategory() {\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>('.filter-menu__category[tabindex=\"0\"]')?.focus();\n this.pendingInitialFocusVisible = false;\n });\n }\n\n private tabLeavesPopup(event: KeyboardEvent): boolean {\n const popup = this.el.querySelector<HTMLElement>('.filter-menu-popup');\n if (!popup) return true;\n const focusables = Array.from(\n popup.querySelectorAll<HTMLElement>(FILTER_MENU_FOCUSABLE_SELECTOR)\n ).filter(element => element.getClientRects().length > 0);\n const index = focusables.indexOf(event.target as HTMLElement);\n if (index < 0) return true;\n return event.shiftKey ? index === 0 : index === focusables.length - 1;\n }\n\n private moveFocusAfterTab(backwards: boolean) {\n const anchor = this.anchorFocusTarget;\n if (!anchor) return;\n if (backwards) {\n anchor.focus();\n return;\n }\n const candidates = Array.from(\n document.querySelectorAll<HTMLElement>(FILTER_MENU_FOCUSABLE_SELECTOR)\n ).filter(\n element =>\n !element.closest('.filter-menu-popup') &&\n !element.closest('[inert]') &&\n element.getClientRects().length > 0\n );\n const index = candidates.indexOf(anchor);\n (candidates[index + 1] ?? anchor).focus();\n }\n\n private selectedFilter(filters: FilterMenuFilter[], activeFilterId: string | undefined) {\n return filters.find(filter => filter.id === activeFilterId) ?? filters[0];\n }\n\n private selectedCount(filter: FilterMenuFilter, values: FilterMenuValues): number {\n const value = values[filter.id];\n if (filter.kind === 'multiple') return Array.isArray(value) ? value.length : 0;\n if (filter.kind === 'boolean') return value === true ? 1 : 0;\n return typeof value === 'string' && value.length > 0 ? 1 : 0;\n }\n\n private totalSelected(filters: FilterMenuFilter[], values: FilterMenuValues): number {\n return filters.reduce((total, filter) => total + this.selectedCount(filter, values), 0);\n }\n\n private activeFilterCount(filters: FilterMenuFilter[], values: FilterMenuValues): number {\n return filters.filter(filter => this.selectedCount(filter, values) > 0).length;\n }\n\n private selectCategory(filterId: string, focus = false) {\n this.activeOptionIndex = 0;\n this.dsActiveFilterChange.emit(filterId);\n if (!focus) return;\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>(`[data-filter-category=\"${filterId}\"]`)?.focus();\n });\n }\n\n private handleCategoryKeyDown(\n event: KeyboardEvent,\n filters: FilterMenuFilter[],\n filterId: string\n ) {\n const currentIndex = filters.findIndex(filter => filter.id === filterId);\n let nextIndex: number;\n if (event.key === 'ArrowDown') nextIndex = (currentIndex + 1) % filters.length;\n else if (event.key === 'ArrowUp')\n nextIndex = (currentIndex - 1 + filters.length) % filters.length;\n else if (event.key === 'Home') nextIndex = 0;\n else if (event.key === 'End') nextIndex = filters.length - 1;\n else if (event.key === 'ArrowRight') {\n event.preventDefault();\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(\n '.filter-menu__options [role=\"option\"], .filter-menu__options input'\n )\n ?.focus();\n });\n return;\n } else return;\n\n event.preventDefault();\n this.focusRingVisible = true;\n this.selectCategory(filters[nextIndex].id, true);\n }\n\n private handlePanelKeyDown(event: KeyboardEvent, filterId: string) {\n if (event.key !== 'ArrowLeft') return;\n event.preventDefault();\n this.el.querySelector<HTMLElement>(`[data-filter-category=\"${filterId}\"]`)?.focus();\n }\n\n private handleOptionKeyDown(\n event: KeyboardEvent,\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n index: number,\n values: FilterMenuValues\n ) {\n const options = filter.options ?? [];\n if (event.key === 'ArrowLeft') {\n this.handlePanelKeyDown(event, filter.id);\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.selectOption(filter, option, values);\n return;\n }\n if (!['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) return;\n event.preventDefault();\n const enabled = options\n .map((candidate, optionIndex) => ({ candidate, optionIndex }))\n .filter(({ candidate }) => !candidate.isInactive)\n .map(({ optionIndex }) => optionIndex);\n if (!enabled.length) return;\n const current = enabled.indexOf(index);\n let next: number;\n if (event.key === 'Home') next = enabled[0];\n else if (event.key === 'End') next = enabled[enabled.length - 1];\n else {\n const direction = event.key === 'ArrowDown' ? 1 : -1;\n const start = current >= 0 ? current : direction === 1 ? -1 : 0;\n next = enabled[(start + direction + enabled.length) % enabled.length];\n }\n this.activeOptionIndex = next;\n this.focusRingVisible = true;\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>(`#${this.generatedId}-${filter.id}-option-${next}`)?.focus();\n });\n }\n\n private toggleMultiple(\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n checked: boolean,\n values: FilterMenuValues\n ) {\n if (option.isInactive) return;\n const current = Array.isArray(values[filter.id]) ? (values[filter.id] as string[]) : [];\n const selected = new Set(current);\n if (checked) selected.add(option.value);\n else selected.delete(option.value);\n const ordered = (filter.options ?? [])\n .map(candidate => candidate.value)\n .filter(value => selected.has(value));\n this.dsChange.emit({ filterId: filter.id, value: ordered });\n }\n\n private selectOption(\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n values: FilterMenuValues\n ) {\n if (option.isInactive) return;\n if (filter.kind === 'single') {\n this.dsChange.emit({ filterId: filter.id, value: option.value });\n return;\n }\n const selected = Array.isArray(values[filter.id])\n ? (values[filter.id] as string[]).includes(option.value)\n : false;\n this.toggleMultiple(filter, option, !selected, values);\n }\n\n private renderOptions(filter: FilterMenuFilter, values: FilterMenuValues) {\n const value = values[filter.id];\n if (filter.kind === 'multiple' || filter.kind === 'single') {\n const selected = Array.isArray(value) ? value : [];\n const options = filter.options ?? [];\n const usesSubtext = choiceListUsesSubtext(\n options.map(option => ({\n label: option.label,\n value: option.value,\n subtext: option.description,\n }))\n );\n return options.map((option, index) => {\n const isSelected =\n filter.kind === 'multiple'\n ? selected.includes(option.value)\n : value === option.value;\n return (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-option-${index}`}\n option={{\n label: option.label,\n value: option.value,\n subtext: option.description,\n isInactive: option.isInactive,\n }}\n selected={isSelected}\n active={index === this.activeOptionIndex}\n focusRingVisible={this.focusRingVisible}\n usesSubtext={usesSubtext}\n tabIndex={index === this.activeOptionIndex ? 0 : -1}\n leading={\n filter.kind === 'multiple' ? (\n <span\n class=\"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-checkbox label=\"\" size=\"md\" checked={isSelected} presentation />\n </span>\n ) : undefined\n }\n onFocus={() => {\n this.activeOptionIndex = index;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleOptionKeyDown(event, filter, option, index, values)\n }\n onHover={() => {\n this.focusRingVisible = false;\n this.activeOptionIndex = index;\n }}\n onSelect={() => this.selectOption(filter, option, values)}\n />\n );\n });\n }\n\n if (filter.kind === 'boolean') {\n const option: FilterMenuOption = {\n label: filter.fieldLabel ?? filter.label,\n value: 'true',\n description: filter.description,\n };\n return (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-option-0`}\n option={{\n label: option.label,\n value: option.value,\n subtext: option.description,\n }}\n selected={value === true}\n active\n focusRingVisible={this.focusRingVisible}\n usesSubtext={Boolean(option.description)}\n tabIndex={0}\n leading={\n <span\n class=\"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-checkbox label=\"\" size=\"md\" checked={value === true} presentation />\n </span>\n }\n onKeyDown={(event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') this.handlePanelKeyDown(event, filter.id);\n else if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.dsChange.emit({ filterId: filter.id, value: value !== true });\n }\n }}\n onHover={() => {\n this.focusRingVisible = false;\n }}\n onSelect={() => this.dsChange.emit({ filterId: filter.id, value: value !== true })}\n />\n );\n }\n\n const dateValue = typeof value === 'string' ? value : '';\n const inputId = `${this.generatedId}-${filter.id}-input`;\n return (\n <div class=\"filter-menu__date-field\">\n <label htmlFor={inputId}>\n <ds-text as=\"span\" variant=\"text-body-small\" emphasis color=\"primary\">\n {filter.fieldLabel ?? 'Event date'}\n </ds-text>\n </label>\n <div class=\"filter-menu__date-control ds-control-frame ds-control--md\">\n <input\n id={inputId}\n class=\"filter-menu__date-input\"\n type=\"date\"\n value={dateValue}\n onInput={(event: Event) =>\n this.dsChange.emit({\n filterId: filter.id,\n value: (event.target as HTMLInputElement).value,\n })\n }\n />\n {dateValue ? (\n <ds-button-unfilled\n variant=\"icon\"\n icon=\"CrossCircle\"\n size=\"sm\"\n isInset\n hasBorder={false}\n rounded\n ariaLabel={`${this.clearLabel} ${filter.fieldLabel ?? filter.label}`}\n onDsClick={(event: CustomEvent<MouseEvent>) => {\n event.stopPropagation();\n this.dsChange.emit({ filterId: filter.id, value: '' });\n }}\n />\n ) : null}\n </div>\n </div>\n );\n }\n\n render() {\n const state =\n this.closing && this.closingSnapshot\n ? this.closingSnapshot\n : {\n filters: this.filters,\n values: this.values,\n activeFilterId: this.activeFilterId,\n };\n const activeFilter = this.selectedFilter(state.filters, state.activeFilterId);\n const totalSelected = this.totalSelected(state.filters, state.values);\n const activeFilterCount = this.activeFilterCount(state.filters, state.values);\n const hasActiveFilters = activeFilterCount > 0;\n const label = `${this.triggerLabel}${hasActiveFilters ? ` · ${activeFilterCount}` : ''}`;\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n const popupId = `${this.generatedId}-popup`;\n const popupStyle: Record<string, string> = {\n position: 'fixed',\n left: '0',\n top: '0',\n width: this.menuWidth,\n transform: `translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,\n zIndex: '9998',\n visibility: this.positionReady ? 'visible' : 'hidden',\n };\n\n return (\n <Host\n class={{\n 'filter-menu-host': true,\n 'filter-menu-host--external-trigger': !this.usesInternalTrigger,\n 'ds-select-trigger-host': this.usesInternalTrigger,\n [`ds-control--${this.size}`]: true,\n ...controlWidthClass(this.width),\n }}\n >\n {this.usesInternalTrigger ? (\n <button\n ref={element => {\n this.triggerElement = (element as HTMLButtonElement) ?? null;\n }}\n id={this.inputId ?? `${this.generatedId}-trigger`}\n type=\"button\"\n class={{\n trigger: true,\n 'ds-control-frame': true,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': this.activeFill && hasActiveFilters,\n 'trigger--expanded': this.open || this.closing,\n 'trigger--bordered': this.hasBorder,\n 'trigger--has-value': hasActiveFilters,\n [`ds-control--${this.size}`]: true,\n }}\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={String(this.open)}\n aria-controls={this.open ? popupId : undefined}\n aria-label={this.ariaLabel ?? this.menuLabel}\n onClick={(event: MouseEvent) => this.toggleFromTrigger(event)}\n onKeyDown={(event: KeyboardEvent) => this.handleTriggerKeyDown(event)}\n >\n {this.icon ? (\n <span\n class=\"trigger__prefix ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name={this.icon} size={iconSize} color=\"inherit\" />\n </span>\n ) : null}\n <ds-text\n class=\"trigger__label-box trigger__label trigger__label-content ds-control-label-box ds-interaction-fill__content\"\n as=\"span\"\n variant={textVariant}\n color=\"inherit\"\n lineTruncation={1}\n >\n {label}\n </ds-text>\n <span\n class=\"trigger__chevron ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name=\"ChevronDown\" size={iconSize} color=\"inherit\" />\n </span>\n </button>\n ) : null}\n\n {this.shouldRender ? (\n <div\n id={popupId}\n popover=\"manual\"\n class={{\n 'filter-menu-popup': true,\n 'ds-choice-popup': true,\n 'ds-choice-popup--closing': this.closing,\n }}\n style={popupStyle}\n role=\"dialog\"\n aria-label={this.menuLabel}\n >\n {activeFilter ? (\n <div class=\"filter-menu\">\n <div class=\"filter-menu__body\">\n <div\n class=\"filter-menu__categories ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"tablist\"\n aria-label={this.categoriesLabel}\n aria-orientation=\"vertical\"\n >\n {state.filters.map(filter => {\n const active = filter.id === activeFilter.id;\n const count = this.selectedCount(filter, state.values);\n return (\n <div\n key={filter.id}\n class={{\n 'filter-menu__category-section': true,\n 'ds-choice-section--divided': Boolean(filter.divider),\n }}\n >\n <button\n id={`${this.generatedId}-${filter.id}-tab`}\n type=\"button\"\n role=\"tab\"\n data-filter-category={filter.id}\n class={{\n 'filter-menu__category': true,\n 'filter-menu__category--active': active,\n 'ds-choice-item': true,\n 'ds-control-frame': true,\n 'ds-control--md': true,\n 'ds-focus-ring-inset': true,\n 'ds-focus-ring--visible': active && this.focusRingVisible,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': active,\n }}\n aria-selected={String(active)}\n aria-controls={`${this.generatedId}-panel`}\n tabIndex={active ? 0 : -1}\n onMouseDown={() => {\n this.focusRingVisible = false;\n }}\n onClick={() => this.selectCategory(filter.id)}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleCategoryKeyDown(event, state.filters, filter.id)\n }\n >\n <ds-text\n class=\"ds-choice-item__content ds-choice-item__label ds-control-label-box ds-interaction-fill__content\"\n as=\"span\"\n variant=\"text-body-medium\"\n color={active ? 'primary' : 'secondary'}\n >\n {filter.label}\n </ds-text>\n {count > 0 ? (\n <ds-tag\n class=\"ds-choice-item__tag ds-interaction-fill__content\"\n label={String(count)}\n size=\"sm\"\n intent=\"brand\"\n contrast=\"bold\"\n isInset\n rounded\n />\n ) : null}\n </button>\n </div>\n );\n })}\n </div>\n\n <div\n id={`${this.generatedId}-panel`}\n class=\"filter-menu__options\"\n role=\"tabpanel\"\n aria-labelledby={`${this.generatedId}-${activeFilter.id}-tab`}\n >\n <div\n key={activeFilter.id}\n class=\"filter-menu__option-list ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"listbox\"\n aria-label={activeFilter.label}\n aria-multiselectable={\n activeFilter.kind === 'multiple' ? 'true' : undefined\n }\n >\n {this.renderOptions(activeFilter, state.values)}\n </div>\n </div>\n </div>\n\n {totalSelected > 0 ? (\n <div class=\"filter-menu__footer ds-choice-footer\">\n <div class=\"ds-choice-footer__content ds-control--md\">\n <ds-text\n class=\"ds-choice-footer__summary\"\n as=\"span\"\n variant=\"text-body-medium\"\n color=\"secondary\"\n aria-live=\"polite\"\n >\n {totalSelected} selected\n </ds-text>\n <button\n class=\"filter-menu__clear ds-choice-footer__clear ds-text-action\"\n type=\"button\"\n onClick={() => this.dsClear.emit()}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n {this.clearLabel}\n </ds-text>\n </button>\n </div>\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n ) : null}\n </Host>\n );\n }\n}\n"],"mappings":"2oBAAA,MAAMA,EAAgB,IAAM,w17BCyD5B,MAAMC,EAAiC,CACrC,UACA,yBACA,6CACA,yBACA,2BACA,mCACAC,KAAK,KAEP,IAAIC,EAAe,EAEnB,MAAMC,EAA+D,CACnEC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,M,MAQOC,EAAUC,EAAA,MAAAD,UAAAE,EALvB,WAAAC,CAAAC,G,sRAS2BC,KAAAC,KAAgB,MAEjCD,KAAAE,aAAuB,UAEvBF,KAAAG,KAA2B,UAE3BH,KAAAI,KAAuB,KAEvBJ,KAAAK,MAAyB,MAEzBL,KAAAM,UAAqB,KAErBN,KAAAO,WAAsB,MAIKP,KAAAQ,UAA2B,KAEtDR,KAAAS,QAA8B,GAE9BT,KAAAU,OAA2B,GAQ3BV,KAAAW,KAAqB,SAErBX,KAAAY,MAAuB,MAEvBZ,KAAAa,WAA8BC,EAAkBC,SAEhDf,KAAAgB,YAA+B,EAE/BhB,KAAAiB,UAAoBH,EAAkBI,YAEtClB,KAAAmB,UAAoB,UAEpBnB,KAAAoB,gBAA0B,oBAE1BpB,KAAAqB,WAAqB,QAErBrB,KAAAsB,oBAA+B,MAEtBtB,KAAAuB,aAAe,MACfvB,KAAAwB,QAAU,MACVxB,KAAAyB,cAAgB,MAChBzB,KAAA0B,IAAgC,CAAEC,EAAG,EAAGC,EAAG,GAC3C5B,KAAA6B,iBAAmB,MACnB7B,KAAA8B,kBAAoB,EAepB9B,KAAA+B,YAAc,oBAAoB1C,IAC3CW,K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KAAKwL,cAAcoC,EAAcD,EAAMjN,WAK7C8I,EAAgB,EACfuC,EAAA,OAAKK,MAAM,wCACTL,EAAA,OAAKK,MAAM,4CACTL,EAAA,WACEK,MAAM,4BACNY,GAAG,OACHC,QAAQ,mBACRE,MAAM,YAAW,YACP,UAET3D,EACO,aACVuC,EAAA,UACEK,MAAM,4DACNgB,KAAK,SACL4B,QAAS,IAAMhP,KAAK0P,QAAQvI,QAE5B4E,EAAA,WAASiB,GAAG,OAAOC,QAAQ,mBAAmBE,MAAM,WACjDnN,KAAKqB,eAKZ,MAEJ,MAEF,K","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["filterMenuCss","FILTER_MENU_FOCUSABLE_SELECTOR","join","filterMenuId","ICON_SIZE","lg","md","sm","xs","FilterMenu","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","open","triggerLabel","icon","size","width","hasBorder","activeFill","ariaLabel","filters","values","side","align","sideOffset","TOKEN_CSS_LENGTHS","space050","alignOffset","menuWidth","menuWidthLg","menuLabel","categoriesLabel","clearLabel","initialFocusVisible","shouldRender","closing","positionReady","pos","x","y","focusRingVisible","activeOptionIndex","generatedId","outsideHandler","triggerElement","pendingInitialFocusVisible","closeTimer","closingSnapshot","position","AnchoredPositionController","getAnchor","resolvedAnchor","getPopup","el","querySelector","measure","anchor","popup","anchorRect","getBoundingClientRect","sectionInsetPx","resolveCssLengthPx","TOKEN_DEFAULTS","popupWidth","offsetWidth","popupFallbackWidth","popupHeight","offsetHeight","popupFallbackHeight","sideOffsetPx","alignOffsetPx","resolveChoicePopupAlignOffset","viewportPadPx","viewportPad","viewportWidth","window","innerWidth","viewportHeight","innerHeight","apply","onReady","liveUpdate","observeResize","topLayer","componentDidLoad","onOpenChange","disconnectedCallback","unobserve","teardownListeners","isOpen","setupListeners","schedule","focusInitialCategory","cancel","captureClosingSnapshot","duration","resolveMotionTimeMs","motionShort2","animationDurationShort3","finishClose","setTimeout","onPositionInputChange","handleKeyDown","event","key","preventDefault","close","tabLeavesPopup","moveFocusAfterTab","shiftKey","anchorId","document","getElementById","usesInternalTrigger","anchorFocusTarget","matches","menuFallbackHeight","target","contains","addEventListener","observe","removeEventListener","clearTimeout","restoreFocus","focusAnchor","dsOpenChange","emit","dsClose","toggleFromTrigger","detail","handleTriggerKeyDown","hidePopover","dsAfterClose","map","filter","options","option","Object","fromEntries","entries","value","Array","isArray","activeFilterId","setFocus","focus","requestAnimationFrame","focusables","from","querySelectorAll","element","getClientRects","length","index","indexOf","backwards","candidates","closest","selectedFilter","find","id","selectedCount","kind","totalSelected","reduce","total","activeFilterCount","selectCategory","filterId","dsActiveFilterChange","handleCategoryKeyDown","currentIndex","findIndex","nextIndex","handlePanelKeyDown","handleOptionKeyDown","selectOption","includes","enabled","candidate","optionIndex","isInactive","current","next","direction","start","toggleMultiple","checked","selected","Set","add","delete","ordered","has","dsChange","renderOptions","usesSubtext","choiceListUsesSubtext","label","subtext","description","isSelected","h","ChoiceOptionRow","active","tabIndex","leading","class","presentation","undefined","onFocus","onKeyDown","onHover","onSelect","fieldLabel","Boolean","dateValue","inputId","htmlFor","as","variant","emphasis","color","type","onInput","isInset","rounded","onDsClick","stopPropagation","render","state","activeFilter","hasActiveFilters","textVariant","CONTROL_TEXT_VARIANT","iconSize","popupId","popupStyle","left","top","transform","Math","round","zIndex","visibility","Host","controlWidthClass","ref","trigger","role","String","onClick","name","lineTruncation","popover","style","count","divider","onMouseDown","intent","contrast","dsClear"],"sources":["src/wc/components/FilterMenu/FilterMenu.css?tag=ds-filter-menu&encapsulation=scoped","src/wc/components/FilterMenu/FilterMenu.tsx"],"sourcesContent":["@import '../../utils/choice-list.css';\n@import '../../utils/control-parts.css';\n@import '../../utils/control-width.css';\n@import '../../utils/select-trigger.css';\n\n:host(.filter-menu-host--external-trigger) {\n display: contents;\n}\n\n.filter-menu {\n display: flex;\n min-height: 0;\n flex-direction: column;\n color: var(--color-foreground-primary);\n}\n\n.filter-menu__body {\n display: grid;\n grid-template-columns: minmax(calc(var(--dimension-size-base) * 18), 2fr) minmax(0, 3fr);\n min-height: calc(var(--dimension-size-800) * 4 + var(--dimension-space-150));\n max-height: calc(100vh - var(--dimension-size-800) - var(--dimension-size-600));\n}\n\n.filter-menu__categories {\n min-width: 0;\n border-inline-end: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n}\n\n.filter-menu__category-section {\n display: flex;\n min-width: 0;\n flex-direction: column;\n}\n\n.filter-menu__category-section.ds-choice-section--divided {\n padding-block-end: var(--dimension-space-050);\n}\n\n.filter-menu__category {\n justify-content: space-between;\n width: 100%;\n border: 0;\n background: transparent;\n color: var(--color-foreground-secondary);\n cursor: default;\n text-align: start;\n}\n\n.filter-menu__category--active {\n color: var(--color-foreground-primary);\n}\n\n.filter-menu__options {\n min-width: 0;\n overflow: hidden;\n}\n\n.filter-menu__date-field {\n display: flex;\n min-width: 0;\n flex-direction: column;\n align-items: stretch;\n gap: var(--dimension-space-100);\n}\n\n.filter-menu__date-control {\n width: 100%;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n box-shadow: inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-secondary);\n}\n\n.filter-menu__date-control:focus-within {\n box-shadow: inset 0 0 0 var(--dimension-stroke-width-018) var(--color-border-bold-brand);\n}\n\n.filter-menu__date-input {\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n padding-inline: var(--dimension-space-100);\n border: 0;\n outline: 0;\n background: transparent;\n color: var(--color-foreground-primary);\n font: inherit;\n}\n\n.filter-menu__footer {\n flex: 0 0 auto;\n}\n\n.filter-menu__clear {\n color: var(--color-foreground-bold-brand);\n}\n\n@media (max-width: 520px) {\n .filter-menu__body {\n grid-template-columns: minmax(calc(var(--dimension-size-base) * 14), 2fr) minmax(0, 3fr);\n }\n}\n\n@media (forced-colors: active) {\n .filter-menu__categories {\n border-inline-end-color: var(--ds-forced-color-content);\n }\n\n .filter-menu__date-control {\n outline: var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport {\n CONTROL_TEXT_VARIANT,\n controlWidthClass,\n resolveChoicePopupAlignOffset,\n resolveCssLengthPx,\n resolveMotionTimeMs,\n TOKEN_CSS_LENGTHS,\n TOKEN_DEFAULTS,\n type ControlWidth,\n} from '../../utils';\nimport type { AnchoredAlign, AnchoredSide } from '../../utils/anchored-position';\nimport { AnchoredPositionController } from '../../utils/anchored-position-controller';\nimport { ChoiceOptionRow } from '../../utils/choice-list-parts';\nimport { choiceListUsesSubtext } from '../../utils/choice-list';\n\nexport type FilterMenuFilterKind = 'single' | 'multiple' | 'boolean' | 'date';\nexport type FilterMenuSize = 'lg' | 'md' | 'sm' | 'xs';\nexport type FilterMenuWidth = ControlWidth;\n\nexport interface FilterMenuOption {\n label: string;\n value: string;\n description?: string;\n isInactive?: boolean;\n}\n\nexport interface FilterMenuFilter {\n id: string;\n label: string;\n kind: FilterMenuFilterKind;\n options?: FilterMenuOption[];\n description?: string;\n fieldLabel?: string;\n /** Draw a standard menu-section divider after this category. */\n divider?: boolean;\n}\n\nexport type FilterMenuValue = string[] | boolean | string;\nexport type FilterMenuValues = Record<string, FilterMenuValue | undefined>;\n\nexport interface FilterMenuChangeDetail {\n filterId: string;\n value: FilterMenuValue;\n}\n\nconst FILTER_MENU_FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\nlet filterMenuId = 0;\n\nconst ICON_SIZE: Record<FilterMenuSize, 'lg' | 'md' | 'sm' | 'xs'> = {\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\n@Component({\n tag: 'ds-filter-menu',\n styleUrl: 'FilterMenu.css',\n scoped: true,\n})\nexport class FilterMenu {\n @Element() el!: HTMLElement;\n\n /** Controlled popup visibility. */\n @Prop({ mutable: true }) open: boolean = false;\n /** Select trigger text. The selected count is appended automatically. */\n @Prop() triggerLabel: string = 'Filters';\n /** Optional select trigger prefix icon name. */\n @Prop() icon: string | undefined = 'Filters';\n /** Select trigger density. */\n @Prop() size: FilterMenuSize = 'md';\n /** Select trigger width fit. */\n @Prop() width: FilterMenuWidth = 'hug';\n /** Show the surface-aware inset border around the select trigger. */\n @Prop() hasBorder: boolean = true;\n /** Show selected interaction fill when one or more criteria are active. */\n @Prop() activeFill: boolean = false;\n /** ID applied to the internal select trigger. */\n @Prop() inputId: string | undefined;\n /** Direct accessible name for the internal select trigger. */\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n /** Product-owned filter categories and option definitions. */\n @Prop() filters: FilterMenuFilter[] = [];\n /** Controlled values keyed by filter id. */\n @Prop() values: FilterMenuValues = {};\n /** Controlled category shown in the option pane. */\n @Prop() activeFilterId: string | undefined;\n /** External trigger element to position against. */\n @Prop() anchor: HTMLElement | undefined;\n /** ID of the external trigger element used for positioning and focus return. */\n @Prop() anchorId: string | undefined;\n /** Preferred popup side; collision handling may flip it. */\n @Prop() side: AnchoredSide = 'bottom';\n /** Cross-axis alignment against the trigger. */\n @Prop() align: AnchoredAlign = 'end';\n /** Gap between trigger and popup — number in px or a TokoMo length. */\n @Prop() sideOffset: number | string = TOKEN_CSS_LENGTHS.space050;\n /** Cross-axis offset — number in px or a TokoMo length. */\n @Prop() alignOffset: number | string = 0;\n /** Popup width. It remains clamped to the viewport by the component recipe. */\n @Prop() menuWidth: string = TOKEN_CSS_LENGTHS.menuWidthLg;\n /** Accessible name for the non-modal filter dialog. */\n @Prop() menuLabel: string = 'Filters';\n /** Accessible name for the category tab list. */\n @Prop() categoriesLabel: string = 'Filter categories';\n /** Footer action and date-clear accessible label. */\n @Prop() clearLabel: string = 'Clear';\n /** Show a visible focus ring on initial entry after keyboard activation. */\n @Prop() initialFocusVisible: boolean = false;\n\n @State() private shouldRender = false;\n @State() private closing = false;\n @State() private positionReady = false;\n @State() private pos: { x: number; y: number } = { x: 0, y: 0 };\n @State() private focusRingVisible = false;\n @State() private activeOptionIndex = 0;\n\n /** Requests a controlled value replacement without closing the popup. */\n @Event() dsChange!: EventEmitter<FilterMenuChangeDetail>;\n /** Requests that the consumer clear every filter value. */\n @Event() dsClear!: EventEmitter<void>;\n /** Requests a controlled active-category replacement. */\n @Event() dsActiveFilterChange!: EventEmitter<string>;\n /** Requests that the controlled popup close. */\n @Event() dsClose!: EventEmitter<void>;\n /** Emitted whenever internal select-trigger activation changes popup visibility. */\n @Event() dsOpenChange!: EventEmitter<boolean>;\n /** Emitted after exit motion and rendered popup removal complete. */\n @Event() dsAfterClose!: EventEmitter<void>;\n\n private readonly generatedId = `ds-filter-menu-${++filterMenuId}`;\n private outsideHandler: ((event: MouseEvent) => void) | null = null;\n private triggerElement: HTMLButtonElement | null = null;\n private pendingInitialFocusVisible = false;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private closingSnapshot: {\n filters: FilterMenuFilter[];\n values: FilterMenuValues;\n activeFilterId: string | undefined;\n } | null = null;\n\n private readonly position = new AnchoredPositionController({\n getAnchor: () => this.resolvedAnchor,\n getPopup: () => this.el.querySelector<HTMLElement>('.filter-menu-popup'),\n measure: (anchor, popup) => {\n if (!this.open) return null;\n const anchorRect = anchor.getBoundingClientRect();\n const sectionInsetPx = resolveCssLengthPx(\n TOKEN_DEFAULTS.space050,\n TOKEN_DEFAULTS.space050\n );\n return {\n anchorRect,\n popupWidth: popup.offsetWidth || this.popupFallbackWidth,\n popupHeight: popup.offsetHeight || this.popupFallbackHeight,\n side: this.side,\n align: this.align,\n sideOffsetPx: resolveCssLengthPx(this.sideOffset, TOKEN_DEFAULTS.space050),\n alignOffsetPx: resolveChoicePopupAlignOffset({\n align: this.align,\n alignOffsetPx: resolveCssLengthPx(this.alignOffset, 0),\n sectionInsetPx,\n }),\n viewportPadPx: this.viewportPad,\n viewportWidth: window.innerWidth,\n viewportHeight: window.innerHeight,\n };\n },\n apply: ({ x, y }) => {\n this.pos = { x, y };\n },\n onReady: () => {\n this.positionReady = true;\n },\n liveUpdate: 'double-frame',\n observeResize: true,\n topLayer: true,\n });\n\n componentDidLoad() {\n if (this.open) this.onOpenChange(true);\n }\n\n disconnectedCallback() {\n this.position.unobserve();\n this.teardownListeners();\n }\n\n @Watch('open')\n onOpenChange(isOpen: boolean) {\n if (isOpen) {\n this.teardownListeners();\n this.closingSnapshot = null;\n this.shouldRender = true;\n this.closing = false;\n this.positionReady = false;\n this.focusRingVisible = this.pendingInitialFocusVisible || this.initialFocusVisible;\n this.setupListeners();\n this.position.schedule(() => this.focusInitialCategory());\n return;\n }\n\n if (!this.shouldRender) return;\n this.position.cancel();\n this.captureClosingSnapshot();\n this.closing = true;\n this.teardownListeners();\n const duration = resolveMotionTimeMs(\n TOKEN_DEFAULTS.motionShort2,\n TOKEN_DEFAULTS.animationDurationShort3\n );\n if (duration <= 0) {\n this.finishClose();\n return;\n }\n this.closeTimer = setTimeout(() => this.finishClose(), duration);\n }\n\n @Watch('anchor')\n @Watch('anchorId')\n @Watch('side')\n @Watch('align')\n @Watch('sideOffset')\n @Watch('alignOffset')\n @Watch('menuWidth')\n onPositionInputChange() {\n if (this.open) this.position.schedule();\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (!this.shouldRender || this.closing) return;\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close();\n return;\n }\n if (event.key !== 'Tab' || !this.tabLeavesPopup(event)) return;\n event.preventDefault();\n this.close(false);\n this.moveFocusAfterTab(event.shiftKey);\n }\n\n private get resolvedAnchor(): HTMLElement | null {\n if (this.anchor) return this.anchor;\n if (this.anchorId) return document.getElementById(this.anchorId);\n return this.triggerElement;\n }\n\n private get usesInternalTrigger(): boolean {\n return !this.anchor && !this.anchorId;\n }\n\n private get anchorFocusTarget(): HTMLElement | null {\n const anchor = this.resolvedAnchor;\n if (!anchor) return null;\n if (anchor.matches(FILTER_MENU_FOCUSABLE_SELECTOR)) return anchor;\n return anchor.querySelector<HTMLElement>(FILTER_MENU_FOCUSABLE_SELECTOR) ?? anchor;\n }\n\n private get viewportPad(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n }\n\n private get popupFallbackWidth(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuWidthLg, TOKEN_DEFAULTS.menuWidthLg);\n }\n\n private get popupFallbackHeight(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuFallbackHeight, TOKEN_DEFAULTS.menuFallbackHeight);\n }\n\n private setupListeners() {\n this.outsideHandler = event => {\n const target = event.target as Node;\n const popup = this.el.querySelector('.filter-menu-popup');\n if (popup?.contains(target) || this.resolvedAnchor?.contains(target)) return;\n this.close();\n };\n document.addEventListener('mousedown', this.outsideHandler, true);\n this.position.observe();\n }\n\n private teardownListeners() {\n this.position.unobserve();\n if (this.outsideHandler) {\n document.removeEventListener('mousedown', this.outsideHandler, true);\n this.outsideHandler = null;\n }\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private close(restoreFocus = true) {\n this.captureClosingSnapshot();\n if (restoreFocus) this.focusAnchor();\n this.dsOpenChange.emit(false);\n this.dsClose.emit();\n this.open = false;\n this.onOpenChange(false);\n }\n\n private toggleFromTrigger(event: MouseEvent) {\n if (this.open) {\n this.close();\n return;\n }\n this.pendingInitialFocusVisible = event.detail === 0;\n this.open = true;\n this.dsOpenChange.emit(true);\n this.onOpenChange(true);\n }\n\n private handleTriggerKeyDown(event: KeyboardEvent) {\n if (event.key !== 'ArrowDown' || this.open) return;\n event.preventDefault();\n this.pendingInitialFocusVisible = true;\n this.open = true;\n this.dsOpenChange.emit(true);\n this.onOpenChange(true);\n }\n\n private finishClose() {\n const popup = this.el.querySelector<HTMLElement>('.filter-menu-popup');\n if (popup?.matches(':popover-open')) popup.hidePopover();\n this.shouldRender = false;\n this.closing = false;\n this.closingSnapshot = null;\n this.closeTimer = null;\n this.dsAfterClose.emit();\n }\n\n private captureClosingSnapshot() {\n if (this.closingSnapshot) return;\n this.closingSnapshot = {\n filters: this.filters.map(filter => ({\n ...filter,\n options: filter.options?.map(option => ({ ...option })),\n })),\n values: Object.fromEntries(\n Object.entries(this.values).map(([key, value]) => [\n key,\n Array.isArray(value) ? [...value] : value,\n ])\n ),\n activeFilterId: this.activeFilterId,\n };\n }\n\n private focusAnchor() {\n const anchor = this.resolvedAnchor as\n (HTMLElement & { setFocus?: () => Promise<void> | void }) | null;\n if (anchor?.setFocus) {\n void anchor.setFocus();\n return;\n }\n this.anchorFocusTarget?.focus();\n }\n\n private focusInitialCategory() {\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>('.filter-menu__category[tabindex=\"0\"]')?.focus();\n this.pendingInitialFocusVisible = false;\n });\n }\n\n private tabLeavesPopup(event: KeyboardEvent): boolean {\n const popup = this.el.querySelector<HTMLElement>('.filter-menu-popup');\n if (!popup) return true;\n const focusables = Array.from(\n popup.querySelectorAll<HTMLElement>(FILTER_MENU_FOCUSABLE_SELECTOR)\n ).filter(element => element.getClientRects().length > 0);\n const index = focusables.indexOf(event.target as HTMLElement);\n if (index < 0) return true;\n return event.shiftKey ? index === 0 : index === focusables.length - 1;\n }\n\n private moveFocusAfterTab(backwards: boolean) {\n const anchor = this.anchorFocusTarget;\n if (!anchor) return;\n if (backwards) {\n anchor.focus();\n return;\n }\n const candidates = Array.from(\n document.querySelectorAll<HTMLElement>(FILTER_MENU_FOCUSABLE_SELECTOR)\n ).filter(\n element =>\n !element.closest('.filter-menu-popup') &&\n !element.closest('[inert]') &&\n element.getClientRects().length > 0\n );\n const index = candidates.indexOf(anchor);\n (candidates[index + 1] ?? anchor).focus();\n }\n\n private selectedFilter(filters: FilterMenuFilter[], activeFilterId: string | undefined) {\n return filters.find(filter => filter.id === activeFilterId) ?? filters[0];\n }\n\n private selectedCount(filter: FilterMenuFilter, values: FilterMenuValues): number {\n const value = values[filter.id];\n if (filter.kind === 'multiple') return Array.isArray(value) ? value.length : 0;\n if (filter.kind === 'boolean') return value === true ? 1 : 0;\n return typeof value === 'string' && value.length > 0 ? 1 : 0;\n }\n\n private totalSelected(filters: FilterMenuFilter[], values: FilterMenuValues): number {\n return filters.reduce((total, filter) => total + this.selectedCount(filter, values), 0);\n }\n\n private activeFilterCount(filters: FilterMenuFilter[], values: FilterMenuValues): number {\n return filters.filter(filter => this.selectedCount(filter, values) > 0).length;\n }\n\n private selectCategory(filterId: string, focus = false) {\n this.activeOptionIndex = 0;\n this.dsActiveFilterChange.emit(filterId);\n if (!focus) return;\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>(`[data-filter-category=\"${filterId}\"]`)?.focus();\n });\n }\n\n private handleCategoryKeyDown(\n event: KeyboardEvent,\n filters: FilterMenuFilter[],\n filterId: string\n ) {\n const currentIndex = filters.findIndex(filter => filter.id === filterId);\n let nextIndex: number;\n if (event.key === 'ArrowDown') nextIndex = (currentIndex + 1) % filters.length;\n else if (event.key === 'ArrowUp')\n nextIndex = (currentIndex - 1 + filters.length) % filters.length;\n else if (event.key === 'Home') nextIndex = 0;\n else if (event.key === 'End') nextIndex = filters.length - 1;\n else if (event.key === 'ArrowRight') {\n event.preventDefault();\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(\n '.filter-menu__options [role=\"option\"], .filter-menu__options input'\n )\n ?.focus();\n });\n return;\n } else return;\n\n event.preventDefault();\n this.focusRingVisible = true;\n this.selectCategory(filters[nextIndex].id, true);\n }\n\n private handlePanelKeyDown(event: KeyboardEvent, filterId: string) {\n if (event.key !== 'ArrowLeft') return;\n event.preventDefault();\n this.el.querySelector<HTMLElement>(`[data-filter-category=\"${filterId}\"]`)?.focus();\n }\n\n private handleOptionKeyDown(\n event: KeyboardEvent,\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n index: number,\n values: FilterMenuValues\n ) {\n const options = filter.options ?? [];\n if (event.key === 'ArrowLeft') {\n this.handlePanelKeyDown(event, filter.id);\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.selectOption(filter, option, values);\n return;\n }\n if (!['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) return;\n event.preventDefault();\n const enabled = options\n .map((candidate, optionIndex) => ({ candidate, optionIndex }))\n .filter(({ candidate }) => !candidate.isInactive)\n .map(({ optionIndex }) => optionIndex);\n if (!enabled.length) return;\n const current = enabled.indexOf(index);\n let next: number;\n if (event.key === 'Home') next = enabled[0];\n else if (event.key === 'End') next = enabled[enabled.length - 1];\n else {\n const direction = event.key === 'ArrowDown' ? 1 : -1;\n const start = current >= 0 ? current : direction === 1 ? -1 : 0;\n next = enabled[(start + direction + enabled.length) % enabled.length];\n }\n this.activeOptionIndex = next;\n this.focusRingVisible = true;\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>(`#${this.generatedId}-${filter.id}-option-${next}`)?.focus();\n });\n }\n\n private toggleMultiple(\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n checked: boolean,\n values: FilterMenuValues\n ) {\n if (option.isInactive) return;\n const current = Array.isArray(values[filter.id]) ? (values[filter.id] as string[]) : [];\n const selected = new Set(current);\n if (checked) selected.add(option.value);\n else selected.delete(option.value);\n const ordered = (filter.options ?? [])\n .map(candidate => candidate.value)\n .filter(value => selected.has(value));\n this.dsChange.emit({ filterId: filter.id, value: ordered });\n }\n\n private selectOption(\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n values: FilterMenuValues\n ) {\n if (option.isInactive) return;\n if (filter.kind === 'single') {\n this.dsChange.emit({ filterId: filter.id, value: option.value });\n return;\n }\n const selected = Array.isArray(values[filter.id])\n ? (values[filter.id] as string[]).includes(option.value)\n : false;\n this.toggleMultiple(filter, option, !selected, values);\n }\n\n private renderOptions(filter: FilterMenuFilter, values: FilterMenuValues) {\n const value = values[filter.id];\n if (filter.kind === 'multiple' || filter.kind === 'single') {\n const selected = Array.isArray(value) ? value : [];\n const options = filter.options ?? [];\n const usesSubtext = choiceListUsesSubtext(\n options.map(option => ({\n label: option.label,\n value: option.value,\n subtext: option.description,\n }))\n );\n return options.map((option, index) => {\n const isSelected =\n filter.kind === 'multiple'\n ? selected.includes(option.value)\n : value === option.value;\n return (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-option-${index}`}\n option={{\n label: option.label,\n value: option.value,\n subtext: option.description,\n isInactive: option.isInactive,\n }}\n selected={isSelected}\n active={index === this.activeOptionIndex}\n focusRingVisible={this.focusRingVisible}\n usesSubtext={usesSubtext}\n tabIndex={index === this.activeOptionIndex ? 0 : -1}\n leading={\n filter.kind === 'multiple' ? (\n <span\n class=\"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-checkbox label=\"\" size=\"md\" checked={isSelected} presentation />\n </span>\n ) : undefined\n }\n onFocus={() => {\n this.activeOptionIndex = index;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleOptionKeyDown(event, filter, option, index, values)\n }\n onHover={() => {\n this.focusRingVisible = false;\n this.activeOptionIndex = index;\n }}\n onSelect={() => this.selectOption(filter, option, values)}\n />\n );\n });\n }\n\n if (filter.kind === 'boolean') {\n const option: FilterMenuOption = {\n label: filter.fieldLabel ?? filter.label,\n value: 'true',\n description: filter.description,\n };\n return (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-option-0`}\n option={{\n label: option.label,\n value: option.value,\n subtext: option.description,\n }}\n selected={value === true}\n active\n focusRingVisible={this.focusRingVisible}\n usesSubtext={Boolean(option.description)}\n tabIndex={0}\n leading={\n <span\n class=\"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-checkbox label=\"\" size=\"md\" checked={value === true} presentation />\n </span>\n }\n onKeyDown={(event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') this.handlePanelKeyDown(event, filter.id);\n else if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.dsChange.emit({ filterId: filter.id, value: value !== true });\n }\n }}\n onHover={() => {\n this.focusRingVisible = false;\n }}\n onSelect={() => this.dsChange.emit({ filterId: filter.id, value: value !== true })}\n />\n );\n }\n\n const dateValue = typeof value === 'string' ? value : '';\n const inputId = `${this.generatedId}-${filter.id}-input`;\n return (\n <div class=\"filter-menu__date-field\">\n <label htmlFor={inputId}>\n <ds-text as=\"span\" variant=\"text-body-small\" emphasis color=\"primary\">\n {filter.fieldLabel ?? 'Event date'}\n </ds-text>\n </label>\n <div class=\"filter-menu__date-control ds-control-frame ds-control--md\">\n <input\n id={inputId}\n class=\"filter-menu__date-input\"\n type=\"date\"\n value={dateValue}\n onInput={(event: Event) =>\n this.dsChange.emit({\n filterId: filter.id,\n value: (event.target as HTMLInputElement).value,\n })\n }\n />\n {dateValue ? (\n <ds-button-unfilled\n variant=\"icon\"\n icon=\"CrossCircle\"\n size=\"sm\"\n isInset\n hasBorder={false}\n rounded\n ariaLabel={`${this.clearLabel} ${filter.fieldLabel ?? filter.label}`}\n onDsClick={(event: CustomEvent<MouseEvent>) => {\n event.stopPropagation();\n this.dsChange.emit({ filterId: filter.id, value: '' });\n }}\n />\n ) : null}\n </div>\n </div>\n );\n }\n\n render() {\n const state =\n this.closing && this.closingSnapshot\n ? this.closingSnapshot\n : {\n filters: this.filters,\n values: this.values,\n activeFilterId: this.activeFilterId,\n };\n const activeFilter = this.selectedFilter(state.filters, state.activeFilterId);\n const totalSelected = this.totalSelected(state.filters, state.values);\n const activeFilterCount = this.activeFilterCount(state.filters, state.values);\n const hasActiveFilters = activeFilterCount > 0;\n const label = `${this.triggerLabel}${hasActiveFilters ? ` · ${activeFilterCount}` : ''}`;\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n const popupId = `${this.generatedId}-popup`;\n const popupStyle: Record<string, string> = {\n position: 'fixed',\n left: '0',\n top: '0',\n width: this.menuWidth,\n transform: `translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,\n zIndex: '9998',\n visibility: this.positionReady ? 'visible' : 'hidden',\n };\n\n return (\n <Host\n class={{\n 'filter-menu-host': true,\n 'filter-menu-host--external-trigger': !this.usesInternalTrigger,\n 'ds-select-trigger-host': this.usesInternalTrigger,\n [`ds-control--${this.size}`]: true,\n ...controlWidthClass(this.width),\n }}\n >\n {this.usesInternalTrigger ? (\n <button\n ref={element => {\n this.triggerElement = (element as HTMLButtonElement) ?? null;\n }}\n id={this.inputId ?? `${this.generatedId}-trigger`}\n type=\"button\"\n class={{\n trigger: true,\n 'ds-control-frame': true,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': this.activeFill && hasActiveFilters,\n 'trigger--expanded': this.open || this.closing,\n 'trigger--bordered': this.hasBorder,\n 'trigger--has-value': hasActiveFilters,\n [`ds-control--${this.size}`]: true,\n }}\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={String(this.open)}\n aria-controls={this.open ? popupId : undefined}\n aria-label={this.ariaLabel ?? this.menuLabel}\n onClick={(event: MouseEvent) => this.toggleFromTrigger(event)}\n onKeyDown={(event: KeyboardEvent) => this.handleTriggerKeyDown(event)}\n >\n {this.icon ? (\n <span\n class=\"trigger__prefix ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name={this.icon} size={iconSize} color=\"inherit\" />\n </span>\n ) : null}\n <ds-text\n class=\"trigger__label-box trigger__label trigger__label-content ds-control-label-box ds-interaction-fill__content\"\n as=\"span\"\n variant={textVariant}\n color=\"inherit\"\n lineTruncation={1}\n >\n {label}\n </ds-text>\n <span\n class=\"trigger__chevron ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name=\"ChevronDown\" size={iconSize} color=\"inherit\" />\n </span>\n </button>\n ) : null}\n\n {this.shouldRender ? (\n <div\n id={popupId}\n popover=\"manual\"\n class={{\n 'filter-menu-popup': true,\n 'ds-choice-popup': true,\n 'ds-choice-popup--closing': this.closing,\n }}\n style={popupStyle}\n role=\"dialog\"\n aria-label={this.menuLabel}\n >\n {activeFilter ? (\n <div class=\"filter-menu\">\n <div class=\"filter-menu__body\">\n <div\n class=\"filter-menu__categories ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"tablist\"\n aria-label={this.categoriesLabel}\n aria-orientation=\"vertical\"\n >\n {state.filters.map(filter => {\n const active = filter.id === activeFilter.id;\n const count = this.selectedCount(filter, state.values);\n return (\n <div\n key={filter.id}\n class={{\n 'filter-menu__category-section': true,\n 'ds-choice-section--divided': Boolean(filter.divider),\n }}\n >\n <button\n id={`${this.generatedId}-${filter.id}-tab`}\n type=\"button\"\n role=\"tab\"\n data-filter-category={filter.id}\n class={{\n 'filter-menu__category': true,\n 'filter-menu__category--active': active,\n 'ds-choice-item': true,\n 'ds-control-frame': true,\n 'ds-control--md': true,\n 'ds-focus-ring-inset': true,\n 'ds-focus-ring--visible': active && this.focusRingVisible,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': active,\n }}\n aria-selected={String(active)}\n aria-controls={`${this.generatedId}-panel`}\n tabIndex={active ? 0 : -1}\n onMouseDown={() => {\n this.focusRingVisible = false;\n }}\n onClick={() => this.selectCategory(filter.id)}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleCategoryKeyDown(event, state.filters, filter.id)\n }\n >\n <ds-text\n class=\"ds-choice-item__content ds-choice-item__label ds-control-label-box ds-interaction-fill__content\"\n as=\"span\"\n variant=\"text-body-medium\"\n color={active ? 'primary' : 'secondary'}\n >\n {filter.label}\n </ds-text>\n {count > 0 ? (\n <ds-tag\n class=\"ds-choice-item__tag ds-interaction-fill__content\"\n label={String(count)}\n size=\"sm\"\n intent=\"brand\"\n contrast=\"bold\"\n isInset\n rounded\n />\n ) : null}\n </button>\n </div>\n );\n })}\n </div>\n\n <div\n id={`${this.generatedId}-panel`}\n class=\"filter-menu__options\"\n role=\"tabpanel\"\n aria-labelledby={`${this.generatedId}-${activeFilter.id}-tab`}\n >\n <div\n key={activeFilter.id}\n class=\"filter-menu__option-list ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"listbox\"\n aria-label={activeFilter.label}\n aria-multiselectable={\n activeFilter.kind === 'multiple' ? 'true' : undefined\n }\n >\n {this.renderOptions(activeFilter, state.values)}\n </div>\n </div>\n </div>\n\n {totalSelected > 0 ? (\n <div class=\"filter-menu__footer ds-choice-footer\">\n <div class=\"ds-choice-footer__content ds-control--md\">\n <ds-text\n class=\"ds-choice-footer__summary\"\n as=\"span\"\n variant=\"text-body-medium\"\n color=\"secondary\"\n aria-live=\"polite\"\n >\n {totalSelected} selected\n </ds-text>\n <button\n class=\"filter-menu__clear ds-choice-footer__clear ds-text-action\"\n type=\"button\"\n onClick={() => this.dsClear.emit()}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n {this.clearLabel}\n </ds-text>\n </button>\n </div>\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n ) : null}\n </Host>\n );\n }\n}\n"],"mappings":"2oBAAA,MAAMA,EAAgB,IAAM,8g8BCyD5B,MAAMC,EAAiC,CACrC,UACA,yBACA,6CACA,yBACA,2BACA,mCACAC,KAAK,KAEP,IAAIC,EAAe,EAEnB,MAAMC,EAA+D,CACnEC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,M,MAQOC,EAAUC,EAAA,MAAAD,UAAAE,EALvB,WAAAC,CAAAC,G,sRAS2BC,KAAAC,KAAgB,MAEjCD,KAAAE,aAAuB,UAEvBF,KAAAG,KAA2B,UAE3BH,KAAAI,KAAuB,KAEvBJ,KAAAK,MAAyB,MAEzBL,KAAAM,UAAqB,KAErBN,KAAAO,WAAsB,MAIKP,KAAAQ,UAA2B,KAEtDR,KAAAS,QAA8B,GAE9BT,KAAAU,OAA2B,GAQ3BV,KAAAW,KAAqB,SAErBX,K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