@ds-mo/ui 14.31.3 → 14.32.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 +15 -5
- package/dist/agent.json +228 -23
- package/dist/angular/ds-bar-page-title.d.ts +28 -0
- package/dist/angular/ds-bar-page-title.js +48 -0
- package/dist/angular/ds-card-settings-scope.d.ts +1 -1
- package/dist/angular/ds-card-settings-scope.js +3 -3
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +1 -0
- package/dist/angular/proxies.d.ts +1 -0
- package/dist/angular/proxies.js +1 -0
- package/dist/components/ds-agent-questionnaire.js +1 -1
- package/dist/components/ds-agent-response.js +1 -1
- package/dist/components/ds-avatar.js +1 -1
- package/dist/components/ds-avatar.js.map +1 -1
- package/dist/components/ds-banner.js +1 -1
- package/dist/components/ds-banner.js.map +1 -1
- package/dist/components/ds-bar-action.js +1 -1
- package/dist/components/ds-bar-action.js.map +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-page-title.d.ts +11 -0
- package/dist/components/ds-bar-page-title.js +2 -0
- package/dist/components/ds-bar-page-title.js.map +1 -0
- 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-filled.js +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-chart.js.map +1 -1
- package/dist/components/ds-card-navigation.js +1 -1
- package/dist/components/ds-card-navigation.js.map +1 -1
- package/dist/components/ds-card-overview.js +1 -1
- package/dist/components/ds-card-overview.js.map +1 -1
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-card-setting.js.map +1 -1
- package/dist/components/ds-card-settings-scope.js +1 -1
- package/dist/components/ds-card-settings-scope.js.map +1 -1
- package/dist/components/ds-chart-legend.js +1 -1
- package/dist/components/ds-chart-legend.js.map +1 -1
- package/dist/components/ds-chart.js +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-chip.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-conversation-list-section.js +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-filter-menu.js +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-message.js +1 -1
- package/dist/components/ds-mobile-bar-nav.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-sub-nav.js +1 -1
- package/dist/components/ds-panel-sub-nav.js.map +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-tool-search.js.map +1 -1
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-paper-texture.js +1 -1
- package/dist/components/ds-radio.js +1 -1
- package/dist/components/ds-score.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-app.js.map +1 -1
- package/dist/components/ds-shell-page.js +1 -1
- package/dist/components/ds-shell-tools.js +1 -1
- package/dist/components/ds-skeleton.js +1 -1
- package/dist/components/ds-swatch-picker.js +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-table-filter.js +1 -1
- package/dist/components/ds-table-group.js +1 -1
- package/dist/components/ds-table-group.js.map +1 -1
- package/dist/components/ds-table-saved-views.js +1 -1
- package/dist/components/ds-table-search.js +1 -1
- package/dist/components/ds-table-search.js.map +1 -1
- package/dist/components/ds-table-sort.js +1 -1
- package/dist/components/ds-table-toolbar.js +1 -1
- package/dist/components/ds-table.js +1 -1
- package/dist/components/ds-table.js.map +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-textarea.js +1 -1
- package/dist/components/ds-textarea.js.map +1 -1
- package/dist/components/ds-toast.js +1 -1
- package/dist/components/ds-toast.js.map +1 -1
- package/dist/components/ds-tooltip-chart.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/ds-typing-indicator.js +1 -1
- package/dist/components/p--VKxPUoV.js +2 -0
- package/dist/components/p--VKxPUoV.js.map +1 -0
- package/dist/components/p-14sMoeTr.js +2 -0
- package/dist/components/p-14sMoeTr.js.map +1 -0
- package/dist/components/p-9rzbZP-F.js +2 -0
- package/dist/components/p-9rzbZP-F.js.map +1 -0
- package/dist/components/p-B5W_r4vV.js +2 -0
- package/dist/components/p-B5W_r4vV.js.map +1 -0
- package/dist/components/{p-DjF2m7bf.js → p-B8ZonS3S.js} +2 -2
- package/dist/components/{p-BrW77sNB.js → p-B9WwU5vu.js} +2 -2
- package/dist/components/p-BCRPg1Xs.js +2 -0
- package/dist/components/p-BCRPg1Xs.js.map +1 -0
- package/dist/components/{p-KV3_5Cgo.js → p-BFd18avA.js} +2 -2
- package/dist/components/{p-DLDFPn9F.js → p-BGGIEmQj.js} +2 -2
- package/dist/components/p-BG_n-zQT.js +2 -0
- package/dist/components/p-BG_n-zQT.js.map +1 -0
- package/dist/components/p-BINlT3xz.js +2 -0
- package/dist/components/p-BINlT3xz.js.map +1 -0
- package/dist/components/p-BPTqn5zL.js +2 -0
- package/dist/components/p-BPTqn5zL.js.map +1 -0
- package/dist/components/p-BnWxbhFP.js +2 -0
- package/dist/components/p-BnWxbhFP.js.map +1 -0
- package/dist/components/{p-DhibZEq-.js → p-BonnrRtE.js} +2 -2
- package/dist/components/p-BxduVc5g.js +2 -0
- package/dist/components/p-BxduVc5g.js.map +1 -0
- package/dist/components/p-CD9AbaHQ.js +2 -0
- package/dist/components/p-CD9AbaHQ.js.map +1 -0
- package/dist/components/p-CN3roaMg.js +2 -0
- package/dist/components/p-CN3roaMg.js.map +1 -0
- package/dist/components/p-CR7G2BI6.js +2 -0
- package/dist/components/p-CR7G2BI6.js.map +1 -0
- package/dist/components/p-CakRq92x.js +2 -0
- package/dist/components/p-CakRq92x.js.map +1 -0
- package/dist/components/p-CumGY3uN.js +2 -0
- package/dist/components/p-CumGY3uN.js.map +1 -0
- package/dist/components/p-D59xX7JN.js +2 -0
- package/dist/components/p-D59xX7JN.js.map +1 -0
- package/dist/components/p-DFWJmuaR.js +2 -0
- package/dist/components/p-DFWJmuaR.js.map +1 -0
- package/dist/components/p-DGQUm3WL.js +2 -0
- package/dist/components/p-DGQUm3WL.js.map +1 -0
- package/dist/components/{p-DmTnBu5r.js → p-DJHshyyC.js} +2 -2
- package/dist/components/{p-BtUYEMwA.js → p-DPPM5T7q.js} +2 -2
- package/dist/components/p-DVRL3oem.js +2 -0
- package/dist/components/p-DVRL3oem.js.map +1 -0
- package/dist/components/p-DceM6xWR.js +2 -0
- package/dist/components/p-DceM6xWR.js.map +1 -0
- package/dist/components/p-Dhw_W8nk.js +2 -0
- package/dist/components/p-Dhw_W8nk.js.map +1 -0
- package/dist/components/{p-pkGqqLm-.js → p-DwxKwC5i.js} +2 -2
- package/dist/components/{p-DnhDgPJv.js → p-DzHXk0IG.js} +2 -2
- package/dist/components/p-OHT7lQVt.js +2 -0
- package/dist/components/p-OHT7lQVt.js.map +1 -0
- package/dist/components/{p-ln3dJxQT.js → p-P60MGUqZ.js} +2 -2
- package/dist/components/{p-Bu-gu0mN.js → p-UxIgD24y.js} +2 -2
- package/dist/components/{p-BiIDQ5RW.js → p-YFrD62Ml.js} +2 -2
- package/dist/components/p-gR6G5azA.js +2 -0
- package/dist/components/p-gR6G5azA.js.map +1 -0
- package/dist/components/{p-ehZFKett.js → p-oFbI_M5B.js} +2 -2
- package/dist/components/p-r5td84fg.js +2 -0
- package/dist/components/p-r5td84fg.js.map +1 -0
- package/dist/components/p-skVhQk9d.js +2 -0
- package/dist/components/p-skVhQk9d.js.map +1 -0
- package/dist/components/p-z7Zj26BA.js +2 -0
- package/dist/components/p-z7Zj26BA.js.map +1 -0
- package/dist/components/{p-YDUM8xDg.js → p-zunBF381.js} +2 -2
- package/dist/docs/components.json +584 -38
- package/dist/mcp-data/registry/avatar.json +1 -1
- package/dist/mcp-data/registry/banner.json +1 -1
- package/dist/mcp-data/registry/bar-action.json +5 -5
- package/dist/mcp-data/registry/bar-nav.json +1 -1
- package/dist/mcp-data/registry/bar-page-title.json +433 -0
- package/dist/mcp-data/registry/bar-title.json +21 -5
- package/dist/mcp-data/registry/bar-workflow.json +1 -1
- package/dist/mcp-data/registry/button-filled.json +1 -1
- package/dist/mcp-data/registry/button-unfilled.json +1 -1
- package/dist/mcp-data/registry/card-chart.json +1 -1
- package/dist/mcp-data/registry/card-navigation.json +1 -1
- package/dist/mcp-data/registry/card-overview.json +1 -1
- package/dist/mcp-data/registry/card-setting.json +1 -1
- package/dist/mcp-data/registry/card-settings-scope.json +23 -5
- package/dist/mcp-data/registry/chart-legend.json +1 -1
- package/dist/mcp-data/registry/checkbox.json +1 -1
- package/dist/mcp-data/registry/chip.json +3 -2
- package/dist/mcp-data/registry/conversation-list-item.json +1 -1
- package/dist/mcp-data/registry/filter-menu.json +1 -1
- package/dist/mcp-data/registry/input.json +1 -1
- package/dist/mcp-data/registry/menu.json +1 -1
- package/dist/mcp-data/registry/mobile-section-switcher.json +1 -1
- package/dist/mcp-data/registry/mobile-sheet-nav.json +1 -1
- package/dist/mcp-data/registry/modal.json +1 -1
- package/dist/mcp-data/registry/pagination.json +10 -10
- package/dist/mcp-data/registry/panel-nav.json +1 -1
- package/dist/mcp-data/registry/panel-sub-nav.json +1 -1
- package/dist/mcp-data/registry/panel-tool-header.json +1 -1
- package/dist/mcp-data/registry/panel-tool-search.json +1 -1
- package/dist/mcp-data/registry/panel-tools.json +4 -2
- package/dist/mcp-data/registry/radio.json +1 -1
- package/dist/mcp-data/registry/registry.json +230 -22
- package/dist/mcp-data/registry/select.json +1 -1
- package/dist/mcp-data/registry/shell-app.json +9 -7
- package/dist/mcp-data/registry/skeleton.json +1 -1
- package/dist/mcp-data/registry/tab-group.json +1 -1
- package/dist/mcp-data/registry/table-group.json +1 -1
- package/dist/mcp-data/registry/table-search.json +1 -1
- package/dist/mcp-data/registry/table.json +2 -2
- package/dist/mcp-data/registry/tag.json +1 -1
- package/dist/mcp-data/registry/textarea.json +1 -1
- package/dist/mcp-data/registry/toast.json +1 -1
- package/dist/mcp-data/registry/tooltip-chart.json +1 -1
- package/dist/mcp-data/registry/tooltip.json +1 -1
- package/dist/react/components.d.ts +1 -0
- package/dist/react/components.js +1 -0
- package/dist/react/ds-bar-page-title.d.ts +14 -0
- package/dist/react/ds-bar-page-title.js +16 -0
- package/dist/styles/table.css +1 -1
- package/dist/types/components/BarPageTitle/BarPageTitle.d.ts +124 -0
- package/dist/types/components/BarPageTitle/index.d.ts +2 -0
- package/dist/types/components/BarTitle/BarTitle.d.ts +1 -7
- package/dist/types/components/BarTitle/bar-title-action-chrome.d.ts +76 -0
- package/dist/types/components/BarTitle/bar-title-actions.d.ts +1 -0
- package/dist/types/components/BarTitle/bar-title-sections.d.ts +11 -0
- package/dist/types/components/CardSettingsScope/CardSettingsScope.d.ts +3 -1
- package/dist/types/components/ShellApp/ShellApp.d.ts +1 -0
- package/dist/types/components.d.ts +181 -4
- package/dist/vue/components.d.ts +1 -0
- package/dist/vue/components.js +1 -0
- package/dist/vue/ds-bar-page-title.d.ts +3 -0
- package/dist/vue/ds-bar-page-title.js +26 -0
- package/dist/vue/ds-card-settings-scope.js +1 -0
- package/package.json +1 -1
- package/dist/components/p-B4ZrhWSH.js +0 -2
- package/dist/components/p-B4ZrhWSH.js.map +0 -1
- package/dist/components/p-BTsFFzfR.js +0 -2
- package/dist/components/p-BTsFFzfR.js.map +0 -1
- package/dist/components/p-BpSPAlOx.js +0 -2
- package/dist/components/p-BpSPAlOx.js.map +0 -1
- package/dist/components/p-C-MaZPyA.js +0 -2
- package/dist/components/p-C-MaZPyA.js.map +0 -1
- package/dist/components/p-CB5-uIY2.js +0 -2
- package/dist/components/p-CB5-uIY2.js.map +0 -1
- package/dist/components/p-CG4Fp3SY.js +0 -2
- package/dist/components/p-CG4Fp3SY.js.map +0 -1
- package/dist/components/p-CHCsDvJK.js +0 -2
- package/dist/components/p-CHCsDvJK.js.map +0 -1
- package/dist/components/p-CImwNex7.js +0 -2
- package/dist/components/p-CImwNex7.js.map +0 -1
- package/dist/components/p-CNZwk176.js +0 -2
- package/dist/components/p-CNZwk176.js.map +0 -1
- package/dist/components/p-CSZlbQ8_.js +0 -2
- package/dist/components/p-CSZlbQ8_.js.map +0 -1
- package/dist/components/p-CVNYRTEH.js +0 -2
- package/dist/components/p-CVNYRTEH.js.map +0 -1
- package/dist/components/p-D3sJXjcg.js +0 -2
- package/dist/components/p-D3sJXjcg.js.map +0 -1
- package/dist/components/p-DFOhxUQP.js +0 -2
- package/dist/components/p-DFOhxUQP.js.map +0 -1
- package/dist/components/p-DI7qbahC.js +0 -2
- package/dist/components/p-DI7qbahC.js.map +0 -1
- package/dist/components/p-DP75OhfU.js +0 -2
- package/dist/components/p-DP75OhfU.js.map +0 -1
- package/dist/components/p-DR1jV6Q5.js +0 -2
- package/dist/components/p-DR1jV6Q5.js.map +0 -1
- package/dist/components/p-DuJuqbcg.js +0 -2
- package/dist/components/p-DuJuqbcg.js.map +0 -1
- package/dist/components/p-E3RCUE7a.js +0 -2
- package/dist/components/p-E3RCUE7a.js.map +0 -1
- package/dist/components/p-JuKGR7Ay.js +0 -2
- package/dist/components/p-JuKGR7Ay.js.map +0 -1
- package/dist/components/p-MuZ6B9gu.js +0 -2
- package/dist/components/p-MuZ6B9gu.js.map +0 -1
- package/dist/components/p-Ui0Ir5li.js +0 -2
- package/dist/components/p-Ui0Ir5li.js.map +0 -1
- package/dist/components/p-eAX_M_QY.js +0 -2
- package/dist/components/p-eAX_M_QY.js.map +0 -1
- package/dist/components/p-eaCtnww1.js +0 -2
- package/dist/components/p-eaCtnww1.js.map +0 -1
- /package/dist/components/{p-DjF2m7bf.js.map → p-B8ZonS3S.js.map} +0 -0
- /package/dist/components/{p-BrW77sNB.js.map → p-B9WwU5vu.js.map} +0 -0
- /package/dist/components/{p-KV3_5Cgo.js.map → p-BFd18avA.js.map} +0 -0
- /package/dist/components/{p-DLDFPn9F.js.map → p-BGGIEmQj.js.map} +0 -0
- /package/dist/components/{p-DhibZEq-.js.map → p-BonnrRtE.js.map} +0 -0
- /package/dist/components/{p-DmTnBu5r.js.map → p-DJHshyyC.js.map} +0 -0
- /package/dist/components/{p-BtUYEMwA.js.map → p-DPPM5T7q.js.map} +0 -0
- /package/dist/components/{p-pkGqqLm-.js.map → p-DwxKwC5i.js.map} +0 -0
- /package/dist/components/{p-DnhDgPJv.js.map → p-DzHXk0IG.js.map} +0 -0
- /package/dist/components/{p-ln3dJxQT.js.map → p-P60MGUqZ.js.map} +0 -0
- /package/dist/components/{p-Bu-gu0mN.js.map → p-UxIgD24y.js.map} +0 -0
- /package/dist/components/{p-BiIDQ5RW.js.map → p-YFrD62Ml.js.map} +0 -0
- /package/dist/components/{p-ehZFKett.js.map → p-oFbI_M5B.js.map} +0 -0
- /package/dist/components/{p-YDUM8xDg.js.map → p-zunBF381.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["DATE_FILTER_RELATIVE_PRESETS","label","value","days","offset","ISO_DATE_PATTERN","isIsoCalendarDate","test","year","month","day","split","map","Number","date","Date","UTC","getUTCFullYear","getUTCMonth","getUTCDate","shiftIsoCalendarDate","toISOString","slice","dateFilterRelativeValue","preset","dateFilterRangeValue","start","end","ordered","parseDateFilterValue","startsWith","length","some","candidate","kind","rest","FILTER_MENU_WEEKDAYS","MONTH_FORMATTER","Intl","DateTimeFormat","timeZone","DATE_FORMATTER","weekday","filterMenuToday","today","getFullYear","String","getMonth","padStart","getDate","filterMenuCalendarMonth","shiftFilterMenuCalendarMonth","filterMenuCalendarMonthLabel","format","filterMenuCalendarDays","firstOfMonth","firstWeekday","getUTCDay","gridStart","Array","from","_","index","dateValue","inMonth","filterMenuCss","filterMenuId","ICON_SIZE","lg","md","sm","xs","DATE_MODE_TABS","id","RELATIVE_DATE_OPTIONS","FilterMenu","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","open","triggerLabel","showSelectedCount","icon","size","width","hasBorder","activeFill","collapseLabel","ariaLabel","filters","values","matchModes","side","align","sideOffset","TOKEN_CSS_LENGTHS","space050","alignOffset","menuWidth","menuWidthLg","menuLabel","categoriesLabel","clearLabel","searchPlaceholder","noResultsText","footerLayout","initialFocusVisible","shouldRender","closing","positionReady","pos","x","y","focusRingVisible","activeOptionIndex","captionCompact","dateModeByFilter","calendarMonthByFilter","pendingRangeStartByFilter","previewRangeEndByFilter","optionQueryByFilter","generatedId","triggerElement","pendingInitialFocusVisible","closeTimer","hasLoaded","closingSnapshot","position","AnchoredPositionController","getAnchor","resolvedAnchor","getPopup","el","querySelector","getOwnerDocument","ownerDocument","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","collisionRect","resolveAnchoredOverlayBoundaryRect","boundary","apply","onReady","liveUpdate","observeResize","topLayer","interaction","AnchoredOverlayInteractionController","onOutsideActivation","close","componentDidLoad","syncCaptionCompactObserver","onOpenChange","connectedCallback","disconnectedCallback","disconnectCaptionCompactObserver","unobserve","teardownListeners","onCollapseLabelChange","isOpen","setupListeners","schedule","focusInitialCategory","cancel","captureClosingSnapshot","duration","resolveMotionTimeMs","motionShort2","animationDurationShort3","finishClose","setTimeout","onPositionInputChange","handleKeyDown","event","key","preventDefault","tabLeavesPopup","moveFocusAfterTab","shiftKey","anchorId","document","getElementById","usesInternalTrigger","menuFallbackHeight","connect","observe","disconnect","clearTimeout","restoreFocus","focusAnchor","dsOpenChange","emit","dsClose","toggleFromTrigger","detail","handleTriggerKeyDown","matches","hidePopover","dsAfterClose","filter","options","option","Object","fromEntries","entries","isArray","activeFilterId","requestAnimationFrame","focus","selectedFilter","find","selectedCount","totalSelected","reduce","total","activeFilterCount","selectCategory","filterId","dsActiveFilterChange","handleCategoryKeyDown","currentIndex","findIndex","nextIndex","handlePanelKeyDown","handleOptionKeyDown","visibleOptions","selectOption","includes","enabled","optionIndex","isInactive","current","indexOf","next","direction","optionMatchesQuery","query","normalized","trim","toLocaleLowerCase","description","booleanOption","fieldLabel","setOptionQuery","firstEnabled","content","scrollTop","handleOptionSearchKeyDown","toggleMultiple","checked","selected","Set","add","delete","has","dsChange","dateMode","setDateMode","mode","parsed","initialDate","clearCalendarRangePreview","calendarMonth","moveCalendarMonth","selectCalendarDate","pendingStart","previewCalendarRange","focusCalendarDate","targetMonth","handleCalendarDayKeyDown","target","renderRelativeDateOptions","relativeFilter","h","class","role","ChoiceOptionRow","active","usesSubtext","tabIndex","onFocus","onKeyDown","onHover","onSelect","renderDateCalendar","range","previewEnd","previewStart","sort","previewFinish","preferredFocus","focusDate","variant","onDsClick","as","emphasis","color","onMouseLeave","selectedInRange","Boolean","previewInRange","inRange","rangeEdge","textColor","type","onMouseEnter","onClick","renderDateFilter","hasContainer","tabs","onDsChange","stopPropagation","renderOptionSearch","ChoiceSearch","hasFocusBoundary","hasInteractionFill","placeholder","controls","inputRef","undefined","onValueChange","renderNoOptionResults","body","renderOptions","allOptions","choiceListUsesSubtext","subtext","isSelected","leading","presentation","captionIconOnly","captionCompactDisconnect","observeTableCaptionCompact","compact","renderCaptionTooltip","trigger","renderFooter","categoriesClear","dsClear","renderMatchModeFooter","nextMode","dsMatchModeChange","render","state","activeFilter","hasActiveFilters","categoriesClearFooter","textVariant","CONTROL_TEXT_VARIANT","iconSize","popupId","popupStyle","left","top","transform","Math","round","zIndex","visibility","Host","controlWidthClass","ref","element","inputId","name","lineTruncation","popover","style","count","divider","onMouseDown","hasRing","intent","contrast","isInset","rounded"],"sources":["src/wc/utils/date-filter-value.ts","src/wc/components/FilterMenu/filter-menu-calendar.ts","src/wc/components/FilterMenu/FilterMenu.css?tag=ds-filter-menu&encapsulation=scoped","src/wc/components/FilterMenu/FilterMenu.tsx"],"sourcesContent":["export const DATE_FILTER_RELATIVE_PRESETS = [\n { label: 'Today', value: 'today', days: 1, offset: 0 },\n { label: 'Yesterday', value: 'yesterday', days: 1, offset: -1 },\n { label: 'Last 7 days', value: 'last-7-days', days: 7, offset: 0 },\n { label: 'Last 14 days', value: 'last-14-days', days: 14, offset: 0 },\n { label: 'Last 30 days', value: 'last-30-days', days: 30, offset: 0 },\n { label: 'Last 60 days', value: 'last-60-days', days: 60, offset: 0 },\n { label: 'Last 90 days', value: 'last-90-days', days: 90, offset: 0 },\n] as const;\n\nexport type DateFilterRelativePreset = (typeof DATE_FILTER_RELATIVE_PRESETS)[number]['value'];\nexport type DateFilterRelativeValue = `relative:${DateFilterRelativePreset}`;\nexport type DateFilterRangeValue = `range:${string}/${string}`;\nexport type DateFilterValue = DateFilterRelativeValue | DateFilterRangeValue;\n\nexport interface DateFilterRange {\n start: string;\n end: string;\n}\n\nexport type ParsedDateFilterValue =\n | { kind: 'relative'; preset: DateFilterRelativePreset }\n | ({ kind: 'range' } & DateFilterRange);\n\nconst ISO_DATE_PATTERN = /^\\d{4}-\\d{2}-\\d{2}$/;\n\nexport function isIsoCalendarDate(value: string): boolean {\n if (!ISO_DATE_PATTERN.test(value)) return false;\n const [year, month, day] = value.split('-').map(Number);\n const date = new Date(Date.UTC(year, month - 1, day));\n return (\n date.getUTCFullYear() === year && date.getUTCMonth() === month - 1 && date.getUTCDate() === day\n );\n}\n\nexport function shiftIsoCalendarDate(value: string, days: number): string {\n if (!isIsoCalendarDate(value)) return '';\n const [year, month, day] = value.split('-').map(Number);\n const date = new Date(Date.UTC(year, month - 1, day + days));\n return date.toISOString().slice(0, 10);\n}\n\nexport function dateFilterRelativeValue(preset: DateFilterRelativePreset): DateFilterRelativeValue {\n return `relative:${preset}`;\n}\n\nexport function dateFilterRangeValue(start: string, end: string = start): DateFilterRangeValue {\n const ordered = start <= end ? [start, end] : [end, start];\n return `range:${ordered[0]}/${ordered[1]}`;\n}\n\nexport function parseDateFilterValue(value: unknown): ParsedDateFilterValue | null {\n if (typeof value !== 'string' || !value) return null;\n\n if (value.startsWith('relative:')) {\n const preset = value.slice('relative:'.length) as DateFilterRelativePreset;\n return DATE_FILTER_RELATIVE_PRESETS.some(candidate => candidate.value === preset)\n ? { kind: 'relative', preset }\n : null;\n }\n\n if (value.startsWith('range:')) {\n const [start, end, ...rest] = value.slice('range:'.length).split('/');\n if (rest.length || !isIsoCalendarDate(start) || !isIsoCalendarDate(end)) return null;\n return start <= end ? { kind: 'range', start, end } : { kind: 'range', start: end, end: start };\n }\n\n // Preserve the previous single-date contract as a one-day range.\n return isIsoCalendarDate(value) ? { kind: 'range', start: value, end: value } : null;\n}\n\nexport function normalizeDateFilterValue(value: unknown): DateFilterValue | '' {\n const parsed = parseDateFilterValue(value);\n if (!parsed) return '';\n return parsed.kind === 'relative'\n ? dateFilterRelativeValue(parsed.preset)\n : dateFilterRangeValue(parsed.start, parsed.end);\n}\n\nexport function resolveDateFilterRange(\n value: unknown,\n referenceDate: string\n): DateFilterRange | null {\n if (!isIsoCalendarDate(referenceDate)) return null;\n const parsed = parseDateFilterValue(value);\n if (!parsed) return null;\n if (parsed.kind === 'range') return { start: parsed.start, end: parsed.end };\n\n const preset = DATE_FILTER_RELATIVE_PRESETS.find(candidate => candidate.value === parsed.preset);\n if (!preset) return null;\n const end = shiftIsoCalendarDate(referenceDate, preset.offset);\n return { start: shiftIsoCalendarDate(end, -(preset.days - 1)), end };\n}\n","import { isIsoCalendarDate, shiftIsoCalendarDate } from '../../utils';\n\nexport interface FilterMenuCalendarDay {\n value: string;\n day: number;\n inMonth: boolean;\n label: string;\n}\n\nexport const FILTER_MENU_WEEKDAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n\nconst MONTH_FORMATTER = new Intl.DateTimeFormat('en-US', {\n month: 'long',\n year: 'numeric',\n timeZone: 'UTC',\n});\nconst DATE_FORMATTER = new Intl.DateTimeFormat('en-US', {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n timeZone: 'UTC',\n});\n\nexport function filterMenuToday(): string {\n const today = new Date();\n const year = today.getFullYear();\n const month = String(today.getMonth() + 1).padStart(2, '0');\n const day = String(today.getDate()).padStart(2, '0');\n return `${year}-${month}-${day}`;\n}\n\nexport function filterMenuCalendarMonth(value: string): string {\n return isIsoCalendarDate(value) ? value.slice(0, 7) : filterMenuToday().slice(0, 7);\n}\n\nexport function shiftFilterMenuCalendarMonth(value: string, offset: number): string {\n const [year, month] = value.split('-').map(Number);\n const date = new Date(Date.UTC(year, month - 1 + offset, 1));\n return `${date.getUTCFullYear()}-${String(date.getUTCMonth() + 1).padStart(2, '0')}`;\n}\n\nexport function filterMenuCalendarMonthLabel(value: string): string {\n const [year, month] = value.split('-').map(Number);\n return MONTH_FORMATTER.format(new Date(Date.UTC(year, month - 1, 1)));\n}\n\nexport function filterMenuCalendarDays(value: string): FilterMenuCalendarDay[] {\n const [year, month] = value.split('-').map(Number);\n const firstOfMonth = `${year}-${String(month).padStart(2, '0')}-01`;\n const firstWeekday = new Date(`${firstOfMonth}T00:00:00Z`).getUTCDay();\n const gridStart = shiftIsoCalendarDate(firstOfMonth, -firstWeekday);\n return Array.from({ length: 42 }, (_, index) => {\n const dateValue = shiftIsoCalendarDate(gridStart, index);\n const date = new Date(`${dateValue}T00:00:00Z`);\n return {\n value: dateValue,\n day: date.getUTCDate(),\n inMonth: dateValue.startsWith(`${value}-`),\n label: DATE_FORMATTER.format(date),\n };\n });\n}\n","@import '../../utils/choice-list.css';\n@import '../../utils/chrome-header.css';\n@import '../../utils/control-parts.css';\n@import '../../utils/control-width.css';\n@import '../../utils/select-trigger.css';\n@import '../../utils/search-control.css';\n@import '../../utils/table-caption-control.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-secondary);\n}\n\n.filter-menu__body {\n display: grid;\n grid-template-columns: var(--dimension-menu-width-xs) var(--dimension-menu-width-sm);\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__category-pane {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n border-inline-end: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n}\n\n.filter-menu__categories {\n flex: 1 1 auto;\n min-width: 0;\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__category-dot-box {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--ds-control-icon, var(--dimension-iconography-md));\n height: var(--ds-control-icon, var(--dimension-iconography-md));\n pointer-events: none;\n}\n\n.filter-menu__options {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n overflow: hidden;\n}\n\n.filter-menu__options-content {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex: 1 1 auto;\n flex-direction: column;\n overflow: auto;\n}\n\n.filter-menu__option-search {\n position: relative;\n flex: 0 0 var(--dimension-size-500);\n min-width: 0;\n min-height: var(--dimension-size-500);\n background: transparent;\n}\n\n.filter-menu__option-search::after {\n content: '';\n position: absolute;\n inset: auto 0 0;\n height: var(--dimension-stroke-width-012);\n background-color: var(--color-border-tertiary);\n pointer-events: none;\n}\n\n.filter-menu__option-search .select-search {\n height: 100%;\n background: transparent;\n}\n\n.filter-menu__options--date,\n.filter-menu__option-list--date,\n.filter-menu__date {\n display: flex;\n min-width: 0;\n min-height: 0;\n flex-direction: column;\n}\n\n.filter-menu__option-list--date,\n.filter-menu__date {\n flex: 1 1 auto;\n}\n\n.filter-menu__date-header {\n flex: 0 0 var(--dimension-size-500);\n justify-content: center;\n min-block-size: var(--dimension-size-500);\n padding: var(--dimension-space-050);\n background: var(--color-background-secondary);\n}\n\n.filter-menu__date-body {\n display: flex;\n flex: 1 1 auto;\n min-height: 0;\n flex-direction: column;\n}\n\n.filter-menu__date-relative {\n flex: 1 1 auto;\n}\n\n.filter-menu__calendar {\n display: flex;\n min-height: 0;\n flex-direction: column;\n padding: var(--dimension-space-100);\n}\n\n.filter-menu__calendar-heading {\n display: grid;\n grid-template-columns: var(--dimension-size-400) minmax(0, 1fr) var(--dimension-size-400);\n align-items: center;\n text-align: center;\n}\n\n.filter-menu__calendar-nav--previous {\n justify-self: start;\n}\n\n.filter-menu__calendar-nav--next {\n justify-self: end;\n}\n\n.filter-menu__calendar-weekdays,\n.filter-menu__calendar-grid {\n display: grid;\n grid-template-columns: repeat(7, minmax(0, 1fr));\n column-gap: var(--dimension-space-050);\n}\n\n.filter-menu__calendar-grid {\n row-gap: var(--dimension-space-050);\n}\n\n.filter-menu__calendar-weekdays {\n align-items: center;\n min-height: var(--dimension-size-400);\n margin-block-start: var(--dimension-space-050);\n color: var(--color-foreground-secondary);\n text-align: center;\n}\n\n.filter-menu__calendar-day {\n appearance: none;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 0;\n width: 100%;\n height: var(--dimension-size-400);\n padding: 0;\n border: 0;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n color: var(--color-foreground-primary);\n cursor: default;\n}\n\n.filter-menu__calendar-day--outside {\n color: var(--color-foreground-tertiary);\n}\n\n.filter-menu__calendar-day--in-range {\n background: var(--color-background-faint-brand);\n color: var(--color-foreground-primary);\n}\n\n/* Pending range preview stays faint while the already-selected start keeps its bold edge. */\n.filter-menu__calendar-day--range-preview {\n background: var(--color-background-faint-brand);\n}\n\n.filter-menu__calendar-day--today {\n color: var(--color-foreground-primary);\n}\n\n.filter-menu__calendar-day--range-edge {\n background: var(--color-background-bold-brand);\n color: var(--color-foreground-on-bold-background-primary);\n}\n\n.filter-menu__footer {\n flex: 0 0 auto;\n}\n\n.filter-menu__footer--categories-clear .ds-choice-footer__content {\n justify-content: flex-start;\n}\n\n.filter-menu__footer--categories-clear[aria-hidden='true']::before {\n visibility: hidden;\n}\n\n.filter-menu__clear {\n color: var(--color-foreground-bold-brand);\n}\n\n.filter-menu__match-mode-footer {\n flex: 0 0 auto;\n}\n\n.filter-menu__match-mode-content {\n justify-content: flex-start;\n padding-inline: calc(\n var(--dimension-space-050) + var(--ds-control-padding-inline, var(--dimension-space-075)) +\n var(--ds-control-label-inset, var(--dimension-space-025))\n );\n}\n\n.filter-menu__match-mode-toggle {\n appearance: none;\n display: inline-flex;\n align-items: center;\n padding: 0;\n border: 0;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n cursor: default;\n}\n\n@media (forced-colors: active) {\n .filter-menu__category-pane {\n border-inline-end-color: var(--ds-forced-color-content);\n }\n\n .filter-menu__calendar-day--range-edge {\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 type VNode,\n Watch,\n} from '@stencil/core';\nimport {\n CONTROL_TEXT_VARIANT,\n DATE_FILTER_RELATIVE_PRESETS,\n controlWidthClass,\n dateFilterRangeValue,\n dateFilterRelativeValue,\n parseDateFilterValue,\n resolveChoicePopupAlignOffset,\n resolveCssLengthPx,\n resolveMotionTimeMs,\n shiftIsoCalendarDate,\n TOKEN_CSS_LENGTHS,\n TOKEN_DEFAULTS,\n type ControlWidth,\n} from '../../utils';\nimport { observeTableCaptionCompact } from '../../utils/table-caption-compact';\nimport type { AnchoredAlign, AnchoredSide } from '../../utils/anchored-position';\nimport { AnchoredPositionController } from '../../utils/anchored-position-controller';\nimport { AnchoredOverlayInteractionController } from '../../utils/anchored-overlay-interaction-controller';\nimport { resolveAnchoredOverlayBoundaryRect } from '../../utils/anchored-overlay-boundary';\nimport { ChoiceOptionRow, ChoiceSearch } from '../../utils/choice-list-parts';\nimport { choiceListUsesSubtext } from '../../utils/choice-list';\nimport {\n FILTER_MENU_WEEKDAYS,\n filterMenuCalendarDays,\n filterMenuCalendarMonth,\n filterMenuCalendarMonthLabel,\n filterMenuToday,\n shiftFilterMenuCalendarMonth,\n} from './filter-menu-calendar';\n\nexport type FilterMenuFilterKind = 'single' | 'multiple' | 'boolean' | 'date';\nexport type FilterMenuSize = 'lg' | 'md' | 'sm' | 'xs';\nexport type FilterMenuWidth = ControlWidth;\nexport type FilterMenuFooterLayout = 'summary' | 'categories-clear';\nexport type FilterMenuMatchMode = 'any' | 'all';\ntype FilterMenuDateMode = 'range' | 'relative';\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>;\nexport type FilterMenuMatchModes = Record<string, FilterMenuMatchMode | undefined>;\n\nexport interface FilterMenuChangeDetail {\n filterId: string;\n value: FilterMenuValue;\n}\n\nexport interface FilterMenuMatchModeChangeDetail {\n filterId: string;\n mode: FilterMenuMatchMode;\n}\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\nconst DATE_MODE_TABS = [\n { id: 'relative', label: 'Relative' },\n { id: 'range', label: 'Range' },\n];\n\nconst RELATIVE_DATE_OPTIONS: FilterMenuOption[] = DATE_FILTER_RELATIVE_PRESETS.map(preset => ({\n label: preset.label,\n value: dateFilterRelativeValue(preset.value),\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. */\n @Prop() triggerLabel: string = 'Filters';\n /** Append the active-filter count to the visible trigger label. */\n @Prop() showSelectedCount: boolean = true;\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 /**\n * Opt into table-caption icon-only chrome below 900px. The trigger omits its\n * visible label and chevron; keep an accessible name via aria-label.\n */\n @Prop({ reflect: true }) collapseLabel: 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 any/all match mode keyed by multiple-choice filter id. Defaults to any. */\n @Prop() matchModes: FilterMenuMatchModes = {};\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 /** Explicit collision owner; otherwise the nearest data-ds-overlay-boundary ancestor is used. */\n @Prop() boundary: HTMLElement | 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 its collision boundary 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 /** Placeholder shown in each non-date option search header. */\n @Prop() searchPlaceholder: string = 'Search';\n /** Empty-state text shown when an option search has no matches. */\n @Prop() noResultsText: string = 'No results';\n /** Footer recipe: full-width selected summary or reserved category-pane Clear action. */\n @Prop() footerLayout: FilterMenuFooterLayout = 'summary';\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 @State() private captionCompact = false;\n @State() private dateModeByFilter: Record<string, FilterMenuDateMode> = {};\n @State() private calendarMonthByFilter: Record<string, string> = {};\n @State() private pendingRangeStartByFilter: Record<string, string> = {};\n @State() private previewRangeEndByFilter: Record<string, string> = {};\n @State() private optionQueryByFilter: Record<string, string> = {};\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 any/all mode replacement for a multiple-choice filter. */\n @Event() dsMatchModeChange!: EventEmitter<FilterMenuMatchModeChangeDetail>;\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 triggerElement: HTMLButtonElement | null = null;\n private pendingInitialFocusVisible = false;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private captionCompactDisconnect: (() => void) | undefined;\n private hasLoaded = false;\n private closingSnapshot: {\n filters: FilterMenuFilter[];\n values: FilterMenuValues;\n matchModes: FilterMenuMatchModes;\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 getOwnerDocument: () => this.el.ownerDocument,\n measure: (anchor, popup) => {\n if (!this.open) return null;\n const anchorRect = anchor.getBoundingClientRect();\n const sectionInsetPx = resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\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 collisionRect: resolveAnchoredOverlayBoundaryRect(anchor, this.boundary),\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 private readonly interaction = new AnchoredOverlayInteractionController({\n getAnchor: () => this.resolvedAnchor,\n getPopup: () => this.el.querySelector<HTMLElement>('.filter-menu-popup'),\n getOwnerDocument: () => this.el.ownerDocument,\n onOutsideActivation: () => this.close(),\n });\n\n componentDidLoad() {\n this.hasLoaded = true;\n this.syncCaptionCompactObserver();\n if (this.open) this.onOpenChange(true);\n }\n\n connectedCallback() {\n if (!this.hasLoaded) return;\n this.syncCaptionCompactObserver();\n if (this.open) this.onOpenChange(true);\n }\n\n disconnectedCallback() {\n this.disconnectCaptionCompactObserver();\n this.position.unobserve();\n this.teardownListeners();\n }\n\n @Watch('collapseLabel')\n onCollapseLabelChange() {\n this.syncCaptionCompactObserver();\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('boundary')\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.interaction.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 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.interaction.connect();\n this.position.observe();\n }\n\n private teardownListeners() {\n this.position.unobserve();\n this.interaction.disconnect();\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.interaction.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.dateModeByFilter = {};\n this.calendarMonthByFilter = {};\n this.pendingRangeStartByFilter = {};\n this.previewRangeEndByFilter = {};\n this.optionQueryByFilter = {};\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 matchModes: { ...this.matchModes },\n activeFilterId: this.activeFilterId,\n };\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 return this.interaction.tabLeavesPopup(event);\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 [data-date-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 visibleOptions: FilterMenuOption[] = filter.options ?? []\n ) {\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 = visibleOptions\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\n .querySelector<HTMLElement>(`#${this.generatedId}-${filter.id}-option-${next}`)\n ?.focus();\n });\n }\n\n private optionMatchesQuery(option: FilterMenuOption, query: string): boolean {\n const normalized = query.trim().toLocaleLowerCase();\n if (!normalized) return true;\n return `${option.label} ${option.description ?? ''}`.toLocaleLowerCase().includes(normalized);\n }\n\n private visibleOptions(\n filter: FilterMenuFilter,\n query = this.optionQueryByFilter[filter.id] ?? ''\n ) {\n if (filter.kind === 'boolean') {\n const option = this.booleanOption(filter);\n return this.optionMatchesQuery(option, query) ? [option] : [];\n }\n return (filter.options ?? []).filter(option => this.optionMatchesQuery(option, query));\n }\n\n private booleanOption(filter: FilterMenuFilter): FilterMenuOption {\n return {\n label: filter.fieldLabel ?? filter.label,\n value: 'true',\n description: filter.description,\n };\n }\n\n private setOptionQuery(filter: FilterMenuFilter, value: string) {\n const visibleOptions = this.visibleOptions(filter, value);\n const firstEnabled = visibleOptions.findIndex(option => !option.isInactive);\n this.activeOptionIndex = firstEnabled;\n this.focusRingVisible = false;\n this.optionQueryByFilter = { ...this.optionQueryByFilter, [filter.id]: value };\n requestAnimationFrame(() => {\n const content = this.el.querySelector<HTMLElement>('.filter-menu__options-content');\n if (content) content.scrollTop = 0;\n this.position.schedule();\n });\n }\n\n private handleOptionSearchKeyDown(event: KeyboardEvent, filter: FilterMenuFilter) {\n if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp') return;\n const visibleOptions = this.visibleOptions(filter);\n const enabled = visibleOptions\n .map((option, index) => ({ option, index }))\n .filter(({ option }) => !option.isInactive)\n .map(({ index }) => index);\n if (!enabled.length) return;\n event.preventDefault();\n const next = event.key === 'ArrowDown' ? enabled[0] : enabled[enabled.length - 1];\n this.activeOptionIndex = next;\n this.focusRingVisible = true;\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(`#${this.generatedId}-${filter.id}-option-${next}`)\n ?.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 dateMode(filterId: string, value: FilterMenuValue | undefined): FilterMenuDateMode {\n return this.dateModeByFilter[filterId] ?? parseDateFilterValue(value)?.kind ?? 'relative';\n }\n\n private setDateMode(filter: FilterMenuFilter, value: FilterMenuValue | undefined, mode: string) {\n if (mode !== 'range' && mode !== 'relative') return;\n this.dateModeByFilter = { ...this.dateModeByFilter, [filter.id]: mode };\n this.activeOptionIndex = 0;\n if (mode === 'range' && !this.calendarMonthByFilter[filter.id]) {\n const parsed = parseDateFilterValue(value);\n const initialDate = parsed?.kind === 'range' ? parsed.start : filterMenuToday();\n this.calendarMonthByFilter = {\n ...this.calendarMonthByFilter,\n [filter.id]: filterMenuCalendarMonth(initialDate),\n };\n }\n if (mode === 'relative' && this.pendingRangeStartByFilter[filter.id]) {\n const next = { ...this.pendingRangeStartByFilter };\n delete next[filter.id];\n this.pendingRangeStartByFilter = next;\n }\n if (mode === 'relative') this.clearCalendarRangePreview(filter.id);\n }\n\n private calendarMonth(filterId: string, value: FilterMenuValue | undefined): string {\n const parsed = parseDateFilterValue(value);\n const initialDate = parsed?.kind === 'range' ? parsed.start : filterMenuToday();\n return this.calendarMonthByFilter[filterId] ?? filterMenuCalendarMonth(initialDate);\n }\n\n private moveCalendarMonth(filterId: string, month: string, offset: number) {\n this.clearCalendarRangePreview(filterId);\n this.calendarMonthByFilter = {\n ...this.calendarMonthByFilter,\n [filterId]: shiftFilterMenuCalendarMonth(month, offset),\n };\n }\n\n private selectCalendarDate(filterId: string, value: string) {\n this.clearCalendarRangePreview(filterId);\n const pendingStart = this.pendingRangeStartByFilter[filterId];\n const next = { ...this.pendingRangeStartByFilter };\n if (pendingStart) delete next[filterId];\n else next[filterId] = value;\n this.pendingRangeStartByFilter = next;\n this.dsChange.emit({\n filterId,\n value: dateFilterRangeValue(pendingStart ?? value, value),\n });\n }\n\n private previewCalendarRange(filterId: string, value: string) {\n if (!this.pendingRangeStartByFilter[filterId]) return;\n if (this.previewRangeEndByFilter[filterId] === value) return;\n this.previewRangeEndByFilter = { ...this.previewRangeEndByFilter, [filterId]: value };\n }\n\n private clearCalendarRangePreview(filterId: string) {\n if (!this.previewRangeEndByFilter[filterId]) return;\n const next = { ...this.previewRangeEndByFilter };\n delete next[filterId];\n this.previewRangeEndByFilter = next;\n }\n\n private focusCalendarDate(filterId: string, value: string) {\n this.previewCalendarRange(filterId, value);\n const targetMonth = filterMenuCalendarMonth(value);\n if (this.calendarMonthByFilter[filterId] !== targetMonth) {\n this.calendarMonthByFilter = { ...this.calendarMonthByFilter, [filterId]: targetMonth };\n }\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>(`[data-date-option=\"${value}\"]`)?.focus();\n });\n }\n\n private handleCalendarDayKeyDown(event: KeyboardEvent, filterId: string, value: string) {\n let offset: number | null = null;\n if (event.key === 'ArrowLeft') offset = -1;\n else if (event.key === 'ArrowRight') offset = 1;\n else if (event.key === 'ArrowUp') offset = -7;\n else if (event.key === 'ArrowDown') offset = 7;\n else if (event.key === 'Home') {\n offset = -new Date(`${value}T00:00:00Z`).getUTCDay();\n } else if (event.key === 'End') {\n offset = 6 - new Date(`${value}T00:00:00Z`).getUTCDay();\n } else if (event.key === 'PageUp') {\n const month = shiftFilterMenuCalendarMonth(filterMenuCalendarMonth(value), -1);\n const day = value.slice(8, 10);\n const candidate = `${month}-${day}`;\n const target = parseDateFilterValue(candidate) ? candidate : `${month}-01`;\n event.preventDefault();\n this.focusCalendarDate(filterId, target);\n return;\n } else if (event.key === 'PageDown') {\n const month = shiftFilterMenuCalendarMonth(filterMenuCalendarMonth(value), 1);\n const day = value.slice(8, 10);\n const candidate = `${month}-${day}`;\n const target = parseDateFilterValue(candidate) ? candidate : `${month}-01`;\n event.preventDefault();\n this.focusCalendarDate(filterId, target);\n return;\n }\n if (offset === null) return;\n event.preventDefault();\n this.focusCalendarDate(filterId, shiftIsoCalendarDate(value, offset));\n }\n\n private renderRelativeDateOptions(filter: FilterMenuFilter, value: FilterMenuValue | undefined) {\n const relativeFilter: FilterMenuFilter = {\n ...filter,\n kind: 'single',\n options: RELATIVE_DATE_OPTIONS,\n };\n return (\n <div\n class=\"filter-menu__date-relative ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"listbox\"\n aria-label=\"Relative date\"\n >\n {RELATIVE_DATE_OPTIONS.map((option, index) => (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-relative-${index}`}\n option={option}\n selected={value === option.value}\n active={index === this.activeOptionIndex}\n focusRingVisible={this.focusRingVisible}\n usesSubtext={false}\n tabIndex={index === this.activeOptionIndex ? 0 : -1}\n onFocus={() => {\n this.activeOptionIndex = index;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleOptionKeyDown(event, relativeFilter, option, index, {\n [filter.id]: value,\n })\n }\n onHover={() => {\n this.focusRingVisible = false;\n this.activeOptionIndex = index;\n }}\n onSelect={() => this.dsChange.emit({ filterId: filter.id, value: option.value })}\n />\n ))}\n </div>\n );\n }\n\n private renderDateCalendar(filter: FilterMenuFilter, value: FilterMenuValue | undefined) {\n const parsed = parseDateFilterValue(value);\n const range = parsed?.kind === 'range' ? parsed : null;\n const month = this.calendarMonth(filter.id, value);\n const days = filterMenuCalendarDays(month);\n const today = filterMenuToday();\n const pendingStart = this.pendingRangeStartByFilter[filter.id];\n const previewEnd = this.previewRangeEndByFilter[filter.id];\n const previewStart = pendingStart && previewEnd ? [pendingStart, previewEnd].sort()[0] : null;\n const previewFinish = pendingStart && previewEnd ? [pendingStart, previewEnd].sort()[1] : null;\n const preferredFocus =\n this.pendingRangeStartByFilter[filter.id] ??\n range?.end ??\n (month === today.slice(0, 7) ? today : '');\n const focusDate = days.some(day => day.value === preferredFocus)\n ? preferredFocus\n : (days.find(day => day.inMonth)?.value ?? days[0]?.value);\n\n return (\n <div class=\"filter-menu__calendar\">\n <div class=\"filter-menu__calendar-heading ds-control--md\">\n <ds-button-unfilled\n class=\"filter-menu__calendar-nav filter-menu__calendar-nav--previous\"\n variant=\"icon\"\n icon=\"ChevronLeft\"\n size=\"md\"\n hasBorder={false}\n ariaLabel=\"Previous month\"\n onDsClick={() => this.moveCalendarMonth(filter.id, month, -1)}\n />\n <ds-text as=\"span\" variant=\"text-body-medium\" emphasis color=\"primary\">\n {filterMenuCalendarMonthLabel(month)}\n </ds-text>\n <ds-button-unfilled\n class=\"filter-menu__calendar-nav filter-menu__calendar-nav--next\"\n variant=\"icon\"\n icon=\"ChevronRight\"\n size=\"md\"\n hasBorder={false}\n ariaLabel=\"Next month\"\n onDsClick={() => this.moveCalendarMonth(filter.id, month, 1)}\n />\n </div>\n <div class=\"filter-menu__calendar-weekdays\" aria-hidden=\"true\">\n {FILTER_MENU_WEEKDAYS.map(day => (\n <ds-text as=\"span\" variant=\"text-body-small\" color=\"secondary\">\n {day}\n </ds-text>\n ))}\n </div>\n <div\n class=\"filter-menu__calendar-grid\"\n role=\"grid\"\n aria-label={filterMenuCalendarMonthLabel(month)}\n onMouseLeave={() => this.clearCalendarRangePreview(filter.id)}\n >\n {days.map(day => {\n const selectedInRange = Boolean(\n range && day.value >= range.start && day.value <= range.end\n );\n const previewInRange = Boolean(\n previewStart &&\n previewFinish &&\n day.value >= previewStart &&\n day.value <= previewFinish\n );\n const inRange = previewInRange || selectedInRange;\n const rangeEdge = Boolean(\n previewStart\n ? day.value === pendingStart\n : range && (day.value === range.start || day.value === range.end)\n );\n const textColor = rangeEdge\n ? 'on-bold'\n : inRange || day.value === today\n ? 'primary'\n : day.inMonth\n ? 'secondary'\n : 'tertiary';\n return (\n <button\n type=\"button\"\n role=\"gridcell\"\n data-date-option={day.value}\n class={{\n 'filter-menu__calendar-day': true,\n 'filter-menu__calendar-day--outside': !day.inMonth,\n 'filter-menu__calendar-day--today': day.value === today,\n 'filter-menu__calendar-day--in-range': inRange,\n 'filter-menu__calendar-day--range-preview': previewInRange,\n 'filter-menu__calendar-day--range-edge': rangeEdge,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n }}\n aria-label={day.label}\n aria-selected={selectedInRange ? 'true' : 'false'}\n tabIndex={day.value === focusDate ? 0 : -1}\n onMouseEnter={() => this.previewCalendarRange(filter.id, day.value)}\n onFocus={() => this.previewCalendarRange(filter.id, day.value)}\n onClick={() => this.selectCalendarDate(filter.id, day.value)}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleCalendarDayKeyDown(event, filter.id, day.value)\n }\n >\n <ds-text\n class=\"ds-interaction-fill__content\"\n as=\"span\"\n variant=\"text-body-medium\"\n color={textColor}\n emphasis={day.value === today}\n >\n {day.day}\n </ds-text>\n </button>\n );\n })}\n </div>\n </div>\n );\n }\n\n private renderDateFilter(filter: FilterMenuFilter, value: FilterMenuValue | undefined) {\n const mode = this.dateMode(filter.id, value);\n return (\n <div class=\"filter-menu__date\">\n <header class=\"filter-menu__date-header ds-chrome-header ds-chrome-header--bounded\">\n <ds-tab-group\n ariaLabel=\"Date filter mode\"\n size=\"md\"\n width=\"fill\"\n hasContainer={false}\n value={mode}\n tabs={DATE_MODE_TABS}\n onDsChange={(event: CustomEvent<string>) => {\n event.stopPropagation();\n this.setDateMode(filter, value, event.detail);\n }}\n />\n </header>\n <div class=\"filter-menu__date-body\">\n {mode === 'relative'\n ? this.renderRelativeDateOptions(filter, value)\n : this.renderDateCalendar(filter, value)}\n </div>\n </div>\n );\n }\n\n private renderOptionSearch(filter: FilterMenuFilter) {\n return (\n <div class=\"filter-menu__option-search\">\n <ChoiceSearch\n size=\"md\"\n hasFocusBoundary={false}\n hasInteractionFill={false}\n value={this.optionQueryByFilter[filter.id] ?? ''}\n placeholder={this.searchPlaceholder}\n ariaLabel={`Search ${filter.label} options`}\n controls={`${this.generatedId}-${filter.id}-options`}\n inputRef={() => undefined}\n clearLabel={`Clear ${filter.label} search`}\n onValueChange={value => this.setOptionQuery(filter, value)}\n onKeyDown={(event: KeyboardEvent) => this.handleOptionSearchKeyDown(event, filter)}\n />\n </div>\n );\n }\n\n private renderNoOptionResults() {\n return (\n <div\n class=\"ds-choice-empty ds-empty-region\"\n role=\"option\"\n aria-selected=\"false\"\n aria-disabled=\"true\"\n aria-label={this.noResultsText}\n aria-live=\"polite\"\n >\n <ds-empty-state body={this.noResultsText} />\n </div>\n );\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 allOptions = filter.options ?? [];\n const options = this.visibleOptions(filter);\n const usesSubtext = choiceListUsesSubtext(\n allOptions.map(option => ({\n label: option.label,\n value: option.value,\n subtext: option.description,\n }))\n );\n if (!options.length) return this.renderNoOptionResults();\n return options.map((option, index) => {\n const isSelected =\n filter.kind === 'multiple' ? selected.includes(option.value) : 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, options)\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] = this.visibleOptions(filter);\n if (!option) return this.renderNoOptionResults();\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 return this.renderDateFilter(filter, value);\n }\n\n private get captionIconOnly(): boolean {\n return (\n this.collapseLabel && this.captionCompact && this.usesInternalTrigger && Boolean(this.icon)\n );\n }\n\n private syncCaptionCompactObserver(): void {\n this.disconnectCaptionCompactObserver();\n if (!this.collapseLabel) {\n if (this.captionCompact) this.captionCompact = false;\n return;\n }\n this.captionCompactDisconnect = observeTableCaptionCompact(this.el, compact => {\n if (this.captionCompact !== compact) this.captionCompact = compact;\n });\n }\n\n private disconnectCaptionCompactObserver(): void {\n this.captionCompactDisconnect?.();\n this.captionCompactDisconnect = undefined;\n }\n\n private renderCaptionTooltip(trigger: VNode, label: string): VNode {\n if (!this.collapseLabel) return trigger;\n return (\n <ds-tooltip label={label} side=\"top\" size=\"sm\">\n {trigger}\n </ds-tooltip>\n );\n }\n\n private renderFooter(totalSelected: number, categoriesClear: boolean) {\n return (\n <div\n class={{\n 'filter-menu__footer': true,\n 'filter-menu__footer--categories-clear': categoriesClear,\n 'ds-choice-footer': true,\n }}\n aria-hidden={categoriesClear && totalSelected === 0 ? 'true' : undefined}\n >\n <div class=\"ds-choice-footer__content ds-control--md\">\n {!categoriesClear ? (\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 ) : null}\n {totalSelected > 0 ? (\n <button\n class=\"filter-menu__clear ds-choice-footer__clear ds-text-action\"\n type=\"button\"\n onClick={() => {\n this.pendingRangeStartByFilter = {};\n this.dsClear.emit();\n }}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n {this.clearLabel}\n </ds-text>\n </button>\n ) : null}\n </div>\n </div>\n );\n }\n\n private renderMatchModeFooter(filter: FilterMenuFilter, matchModes: FilterMenuMatchModes) {\n const mode: FilterMenuMatchMode = matchModes[filter.id] === 'all' ? 'all' : 'any';\n const nextMode: FilterMenuMatchMode = mode === 'any' ? 'all' : 'any';\n return (\n <div class=\"filter-menu__match-mode-footer ds-choice-footer\">\n <div class=\"filter-menu__match-mode-content ds-choice-footer__content ds-control--md\">\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"secondary\">\n Limit results to\n </ds-text>\n <button\n class=\"filter-menu__match-mode-toggle ds-text-action ds-focus-ring\"\n type=\"button\"\n aria-label={`Limit ${filter.label} results to ${nextMode} selected`}\n onClick={() => this.dsMatchModeChange.emit({ filterId: filter.id, mode: nextMode })}\n onKeyDown={(event: KeyboardEvent) => this.handlePanelKeyDown(event, filter.id)}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n {mode}\n </ds-text>\n </button>\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"secondary\">\n selected\n </ds-text>\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 matchModes: this.matchModes,\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 categoriesClearFooter = this.footerLayout === 'categories-clear';\n const label = `${this.triggerLabel}${\n this.showSelectedCount && hasActiveFilters ? ` · ${activeFilterCount}` : ''\n }`;\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 'ds-table-caption-control': this.collapseLabel,\n 'ds-table-caption-control--compact': this.captionIconOnly,\n ...controlWidthClass(this.width),\n }}\n >\n {this.usesInternalTrigger\n ? this.renderCaptionTooltip(\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 'ds-interaction-fill--surface-open': 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 {this.captionIconOnly ? 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 )}\n {this.captionIconOnly ? null : (\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 )}\n </button>,\n this.captionIconOnly ? label : ''\n )\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 class=\"filter-menu__category-pane\">\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 && filter.kind === 'date' ? (\n <span\n class=\"filter-menu__category-dot-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-badge variant=\"dot\" hasRing={false} label=\"\" />\n </span>\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 {categoriesClearFooter ? this.renderFooter(totalSelected, true) : null}\n </div>\n\n <div\n id={`${this.generatedId}-panel`}\n class={{\n 'filter-menu__options': true,\n 'filter-menu__options--date': activeFilter.kind === 'date',\n }}\n role=\"tabpanel\"\n aria-labelledby={`${this.generatedId}-${activeFilter.id}-tab`}\n >\n {activeFilter.kind === 'date' ? null : this.renderOptionSearch(activeFilter)}\n <div class=\"filter-menu__options-content\">\n {activeFilter.kind === 'date' ? (\n <div key={activeFilter.id} class=\"filter-menu__option-list--date\">\n {this.renderOptions(activeFilter, state.values)}\n </div>\n ) : (\n <div\n id={`${this.generatedId}-${activeFilter.id}-options`}\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 )}\n </div>\n {activeFilter.kind === 'multiple'\n ? this.renderMatchModeFooter(activeFilter, state.matchModes)\n : null}\n </div>\n </div>\n\n {!categoriesClearFooter && totalSelected > 0\n ? this.renderFooter(totalSelected, false)\n : null}\n </div>\n ) : null}\n </div>\n ) : null}\n </Host>\n );\n }\n}\n"],"mappings":"8wBAAO,MAAMA,EAA+B,CAC1C,CAAEC,MAAO,QAASC,MAAO,QAASC,KAAM,EAAGC,OAAQ,GACnD,CAAEH,MAAO,YAAaC,MAAO,YAAaC,KAAM,EAAGC,QAAQ,GAC3D,CAAEH,MAAO,cAAeC,MAAO,cAAeC,KAAM,EAAGC,OAAQ,GAC/D,CAAEH,MAAO,eAAgBC,MAAO,eAAgBC,KAAM,GAAIC,OAAQ,GAClE,CAAEH,MAAO,eAAgBC,MAAO,eAAgBC,KAAM,GAAIC,OAAQ,GAClE,CAAEH,MAAO,eAAgBC,MAAO,eAAgBC,KAAM,GAAIC,OAAQ,GAClE,CAAEH,MAAO,eAAgBC,MAAO,eAAgBC,KAAM,GAAIC,OAAQ,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T,WAG7CvQ,KAAK2Q,cAAcqB,EAAcD,EAAMnR,UAI7CoR,EAAa9U,OAAS,WACnB8C,KAAK2R,sBAAsBK,EAAcD,EAAMlR,YAC/C,QAINqR,GAAyBtI,EAAgB,EACvC5J,KAAKwR,aAAa5H,EAAe,OACjC,MAEJ,MAEJ,K","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as e,H as t,c as i,h as o,a as s,t as n}from"./index.js";import{p as r}from"./p-CUL5_8JM.js";import{d as a}from"./p-DQpw21HO.js";import{d as l}from"./p-CG4Fp3SY.js";import{d}from"./p-uqsR98po.js";import{d as c}from"./p-Cea7rROU.js";import{d as h}from"./p-0XTyQNRG.js";import{d as f}from"./p-DI7qbahC.js";import{d as u}from"./p-B9oadFSC.js";import{d as p}from"./p-JuKGR7Ay.js";const v=["agents","messages","activity","search","stacks","help"];const g="agents";const m={search:"Search",messages:"Messages",stacks:"Stacks",activity:"Activity",agents:"Agents",help:"Help & Support"};const b={search:"K",agents:"A",messages:"M",stacks:"S",activity:"N",help:"/"};const y=[{id:"agents",icon:"AI",label:m.agents,railPlacement:"header",order:0,shortcutKey:b.agents,mobileDestination:"agents"},{id:"messages",icon:"MessageBubbleStack",label:m.messages,order:0,shortcutKey:b.messages,mobileDestination:"messages"},{id:"activity",icon:"Bell",label:m.activity,order:1,shortcutKey:b.activity,mobileDestination:"activity"},{id:"search",icon:"MagnifyingGlass",label:m.search,order:2,shortcutKey:b.search,mobileDestination:"search"},{id:"help",icon:"CircleQuestion",label:m.help,railPlacement:"footer",order:0,shortcutKey:b.help,mobileDestination:"help"}];const _={header:0,body:1,footer:2};function w(e){const t=v.findIndex((t=>t===e.id));return e.order??(t<0?Number.MAX_SAFE_INTEGER:t)}function x(e){const t=new Map;for(const i of e){if(i.id.trim()&&!t.has(i.id))t.set(i.id,i)}return Array.from(t.values()).sort(((e,t)=>{const i=S(e);const o=S(t);const s=_[i]-_[o];if(s!==0)return s;return w(e)-w(t)}))}function k(e,t){const i=x(e).map((e=>({type:"tool",id:e.id,item:e})));const o=new Map;for(const e of t){if(e.id.trim()&&!o.has(e.id)){o.set(e.id,e)}}const s=Array.from(o.values()).map((e=>({type:"accessory",id:e.id,accessory:e})));return[...i,...s].sort(((e,t)=>{const i=e.type==="tool"?S(e.item):e.accessory.railPlacement;const o=t.type==="tool"?S(t.item):t.accessory.railPlacement;const s=_[i]-_[o];if(s!==0)return s;const n=e.type==="tool"?w(e.item):e.accessory.order;const r=t.type==="tool"?w(t.item):t.accessory.order;return n-r}))}function z(e){return e.flatMap((e=>{if(e.type==="tool")return[`tool:${e.id}`];if(e.accessory.type==="divider")return[];if(e.accessory.type==="shortcut"){return e.accessory.action.isInactive?[]:[`accessory:${e.id}:${e.accessory.action.id}`]}const t=e.accessory.primaryAction.isInactive?[]:[`accessory:${e.id}:${e.accessory.primaryAction.id}`];if(e.accessory.secondaryAction&&!e.accessory.secondaryAction.isInactive){t.push(`accessory:${e.id}:${e.accessory.secondaryAction.id}`)}return t}))}function C(e,t,i){if(!t.length)return 0;const o=e[i];const s=o?t.indexOf(o):-1;if(s>=0)return s;for(let o=i+1;o<e.length;o+=1){const i=t.indexOf(e[o]);if(i>=0)return i}for(let o=i-1;o>=0;o-=1){const i=t.indexOf(e[o]);if(i>=0)return i}return Math.min(Math.max(i,0),t.length-1)}function T(e,t,i){return{accessoryId:e,actionId:t,anchor:i}}function A(e){return typeof e==="string"&&e.trim().length>0}function S(e){if(e.railPlacement)return e.railPlacement;if(e.id===g)return"header";if(e.id==="help")return"footer";return"body"}function $(e,t,i){if(!i||e.some((e=>e.id===i))){return{open:t,activeTool:i,removedTool:""}}return{open:false,activeTool:"",removedTool:i}}function D(e){const t=e.transitionProperty.split(",").map((e=>e.trim()));const i=e.transitionDuration.split(",").map((e=>r(e.trim(),0)));const o=e.transitionDelay.split(",").map((e=>r(e.trim(),0)));return t.reduce(((e,t,s)=>{if(t!=="all"&&t!=="max-width")return e;const n=i[s%i.length]??0;const r=o[s%o.length]??0;return Math.max(e,n+r,0)}),0)}function F(e,t){return!e&&t==="idle"}function R(e,t,i){if(i==="closing")return e<=.5;if(i==="opening")return t>0&&e>=t-.5;return true}function j(e,t,i){if(e&&t===i){return{open:false,activeTool:i,selected:false}}return{open:true,activeTool:i,selected:true}}const E=()=>`.ds-control--lg,:host(.ds-control--lg),:host(.ds-control--md),.ds-control--md,:host(.ds-control--sm),.ds-control--sm,:host(.ds-control--xs),.ds-control--xs{--ds-control-radius:var(--dimension-radius-025)}:host(.ds-control--lg),.ds-control--lg{--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)}:host(.ds-control--md),.ds-control--md{--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)}:host(.ds-control--sm),.ds-control--sm{--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)}:host(.ds-control--xs),.ds-control--xs{--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}:host(.ds-chrome-space--sm),.ds-chrome-space--sm{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}:host(.ds-chrome-space--md),.ds-chrome-space--md{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}:host(.ds-chrome-space--lg),.ds-chrome-space--lg{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}:host(.ds-chrome-row),.ds-chrome-row,:host(.ds-chrome-column),.ds-chrome-column,:host(.ds-chrome-grid),.ds-chrome-grid{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}:host(.ds-chrome-row),.ds-chrome-row{flex-direction:row;align-items:center}:host(.ds-chrome-column),.ds-chrome-column{flex-direction:column}:host(.ds-chrome-grid),.ds-chrome-grid{display:grid;align-items:center}@media (forced-colors: active){:root,:host,.ds-forced-colors-scope{--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}}:host{--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)}:host(.ds-focus-ring),.ds-focus-ring,:host(.ds-focus-ring-inset),.ds-focus-ring-inset{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}:host(.ds-focus-ring:focus-visible),.ds-focus-ring:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}:host(.ds-focus-ring.ds-focus-ring--visible),.ds-focus-ring.ds-focus-ring--visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}:host(.ds-focus-ring-inset:focus-visible),.ds-focus-ring-inset:focus-visible{outline:none}:host(.ds-focus-ring-inset:focus-visible)::after,.ds-focus-ring-inset:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}:host(.ds-focus-ring-inset.ds-focus-ring--visible),.ds-focus-ring-inset.ds-focus-ring--visible{outline:none}:host(.ds-focus-ring-inset.ds-focus-ring--visible)::after,.ds-focus-ring-inset.ds-focus-ring--visible::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){:host{--ds-focus-ring-color:var(--ds-forced-color-selected)}}@media (forced-colors: active){:root,:host,.ds-forced-colors-scope{--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}}:host(.ds-interaction-fill),.ds-interaction-fill{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}:host(.ds-interaction-fill)::before,.ds-interaction-fill::before,:host(.ds-interaction-fill)::after,.ds-interaction-fill::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}:host(.ds-interaction-fill)::before,.ds-interaction-fill::before{z-index:1}:host(.ds-interaction-fill)::after,.ds-interaction-fill::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)}:host(.ds-interaction-fill--bordered),.ds-interaction-fill--bordered{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}:host(.ds-interaction-fill--selected)::before,.ds-interaction-fill--selected::before{background:var(--ds-interaction-active)}:host(.ds-interaction-fill--selected),.ds-interaction-fill--selected{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){:host(.ds-interaction-fill:hover:not(:disabled))::after,.ds-interaction-fill:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}:host(.ds-interaction-fill:active:not(:disabled))::after,.ds-interaction-fill:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}:host(.ds-interaction-fill--grouped)::after,.ds-interaction-fill--grouped::after,:host(.ds-interaction-fill--grouped:active:not(:disabled))::after,.ds-interaction-fill--grouped:active:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}@media (hover: hover) and (pointer: fine){:host(.ds-interaction-fill--grouped:hover:not(:disabled))::after,.ds-interaction-fill--grouped:hover:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}}:host(.ds-interaction-fill--grouped),.ds-interaction-fill--grouped{--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 )}:host(.ds-interaction-fill)>.ds-interaction-fill__content,.ds-interaction-fill>.ds-interaction-fill__content,.ds-interaction-fill__content{position:relative;z-index:2;cursor:inherit}:host(.ds-interaction-fill--on-faint),.ds-interaction-fill--on-faint{--ds-interaction-active:var(--color-interaction-active)}:host(.ds-interaction-fill--on-medium),.ds-interaction-fill--on-medium{--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)}:host(.ds-interaction-fill--on-bold),.ds-interaction-fill--on-bold{--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)}:host(.ds-interaction-fill--on-strong),.ds-interaction-fill--on-strong{--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)}:host(.ds-interaction-fill--on-translucent),.ds-interaction-fill--on-translucent{--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)}:host(.ds-interaction-fill--on-inverted),.ds-interaction-fill--on-inverted{--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)}:host(.ds-interaction-fill--on-media),.ds-interaction-fill--on-media{--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)}:host(.ds-interaction-fill--on-always-dark),.ds-interaction-fill--on-always-dark{--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)}:host(.ds-interaction-fill--on-navigation),.ds-interaction-fill--on-navigation{--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)}:host(.ds-interaction-fill.ds-interaction-fill--surface-open:not(:disabled))::after,.ds-interaction-fill.ds-interaction-fill--surface-open:not(:disabled)::after{background:var(--ds-interaction-pressed)}@media (forced-colors: active){:host(.ds-interaction-fill)::after,.ds-interaction-fill::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))}:host(.ds-interaction-fill--surface-open:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible))::after,.ds-interaction-fill--surface-open:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline:var(--dimension-stroke-width-025) dashed var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}:host(.ds-interaction-fill--selected)::before,.ds-interaction-fill--selected::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){:host(.ds-interaction-fill:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible))::after,.ds-interaction-fill: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)}}:host(.ds-scrollbar-hidden),.ds-scrollbar-hidden{scrollbar-width:none}:host(.ds-scrollbar-hidden)::-webkit-scrollbar,.ds-scrollbar-hidden::-webkit-scrollbar{display:none}:host{display:block;flex:0 0 auto;box-sizing:border-box;height:100%;min-height:0;overflow:hidden;--_panel-tools-rail-width:var(--dimension-size-600);--_panel-tools-drawer-width:var(--ds-shell-panel-tools-width, var(--dimension-panel-width-xs));--_panel-tools-border:var(--dimension-stroke-width-012, 1px) solid var(--color-border-tertiary);--_panel-tools-expand-dur:var(--effect-animation-duration-medium-1, 300ms)}.panel-tools__layout{display:flex;flex-direction:row-reverse;align-items:stretch;height:100%;min-height:0;box-sizing:border-box}.panel-tools__drawer{flex:0 0 auto;max-width:0;min-width:0;height:100%;min-height:0;overflow:hidden;box-sizing:border-box;transition:none}:host(.panel-tools--ready) .panel-tools__drawer{transition:max-width var(--_panel-tools-expand-dur) var(--effect-animation-easing-ease-in-out, ease)}:host(.panel-tools--ready.panel-tools--motion-opening) .panel-tools__drawer{transition:max-width var(--_panel-tools-expand-dur) var(--effect-animation-easing-ease-out, ease-out)}:host(.panel-tools--ready.panel-tools--motion-closing) .panel-tools__drawer{transition:max-width var(--_panel-tools-expand-dur) var(--effect-animation-easing-ease-in, ease-in)}:host(.panel-tools--open) .panel-tools__drawer{max-width:var(--_panel-tools-drawer-width)}.panel-tools__drawer--visible{border-left:var(--_panel-tools-border)}.panel-tools__drawer-surface{display:flex;flex-direction:column;width:var(--_panel-tools-drawer-width);height:100%;min-height:0;box-sizing:border-box;background-color:transparent}.panel-tools__full-views,.panel-tools__full-view{flex:1 1 auto;min-height:0;overflow:hidden}.panel-tools__full-view{height:100%}.panel-tools__full-view{display:none}.panel-tools__full-view--active{display:block}:host([presentation='fullscreen']){height:100vh;inset:0;position:fixed;width:100vw;z-index:var(--dimension-z-index-modal)}:host([presentation='fullscreen']) .panel-tools__rail{display:none}:host([presentation='fullscreen']) .panel-tools__drawer{max-width:100vw;transition:none;width:100vw}:host([presentation='fullscreen']) .panel-tools__drawer--visible{border-left:none}:host([presentation='fullscreen']) .panel-tools__drawer-surface{background-color:transparent;width:100vw}:host([presentation='fullscreen']:not(.panel-tools--fullscreen)) .panel-tools__drawer-surface,:host(.panel-tools--fullscreen:not([presentation='fullscreen'])) .panel-tools__drawer-surface{visibility:hidden}:host(.panel-tools--presentation-snap) .panel-tools__drawer{transition:none}.panel-tools__body{flex:1 1 auto;min-height:0;overflow:auto;position:relative}:host(.panel-tools--drawer-resting) .panel-tools__body{content-visibility:auto;contain-intrinsic-size:auto 200px}.panel-tools__view{display:none;height:100%;min-height:0;box-sizing:border-box;padding:var(--dimension-space-200);color:var(--color-foreground-secondary);font-family:var(--typography-font-family-ui);font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md);font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-negative-half)}.panel-tools__view ::slotted(*){margin:0;color:var(--color-foreground-secondary);font-family:var(--typography-font-family-ui);font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md);font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-negative-half)}.panel-tools__view--active{display:block}.panel-tools__rail{flex:0 0 var(--_panel-tools-rail-width);width:var(--_panel-tools-rail-width);min-width:var(--_panel-tools-rail-width);display:flex;flex-direction:column;box-sizing:border-box;height:100%;min-height:0;border-left:var(--_panel-tools-border);background-color:transparent}.panel-tools__rail-header{justify-content:center;height:var(--dimension-size-600);flex-shrink:0;border-bottom:var(--_panel-tools-border)}.panel-tools__rail-header.panel-tools__rail-section--stacked{height:auto;min-height:var(--dimension-size-600)}.panel-tools__rail-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden}.panel-tools__rail-actions{display:flex;flex-direction:column;gap:var(--dimension-space-050);width:100%}.panel-tools__rail-footer{justify-content:center;flex-shrink:0;margin-top:auto}.panel-tools__rail-section--stacked{align-items:stretch}.panel-tools__rail-action{display:flex;align-items:center;justify-content:center;width:100%;height:var(--ds-control-height);flex-shrink:0}.panel-tools__accessory{display:flex;flex-direction:column;flex:0 0 calc(var(--dimension-size-400) * 2);box-sizing:border-box;width:100%;min-height:calc(var(--dimension-size-400) * 2)}.panel-tools__accessory--shortcut{flex-basis:var(--dimension-size-400);min-width:var(--dimension-size-400);min-height:var(--dimension-size-400)}.panel-tools__accessory--shortcut>ds-tooltip{display:flex;flex:1 1 auto;width:100%;min-height:0}.panel-tools__accessory--transient{align-items:center;gap:var(--dimension-space-100);width:var(--dimension-size-400);height:calc(var(--dimension-size-400) * 2);min-height:calc(var(--dimension-size-400) * 2);padding:var(--dimension-space-050);border-radius:var(--dimension-radius-half)}.panel-tools__accessory--transient-active{background-color:var(--color-background-bold-brand)}.panel-tools__accessory--transient-positive{background-color:var(--color-background-bold-positive)}.panel-tools__accessory--transient>ds-tooltip{display:flex;flex:0 0 var(--dimension-size-300);width:var(--dimension-size-300);height:var(--dimension-size-300);min-height:var(--dimension-size-300)}.panel-tools__shortcut{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:var(--dimension-radius-half);color:var(--color-foreground-secondary);background:transparent;font:inherit}.panel-tools__shortcut:disabled{color:var(--color-foreground-disabled);cursor:not-allowed}.panel-tools__shortcut-content{display:flex;align-items:center;justify-content:center;width:var(--dimension-size-400);height:var(--dimension-size-400)}.panel-tools__shortcut-orb{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--dimension-size-300);height:var(--dimension-size-300);border:var(--dimension-stroke-width-012) solid var(--color-border-secondary);border-radius:var(--dimension-radius-half);background:transparent}.panel-tools__shortcut-dot{position:absolute;inset-block-start:calc((var(--dimension-size-400) - var(--dimension-iconography-md)) / 2);inset-inline-end:calc((var(--dimension-size-400) - var(--dimension-iconography-md)) / 2);z-index:2;pointer-events:none}.panel-tools__accessory-primary{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--dimension-size-300);height:var(--dimension-size-300);margin:0;padding:0;border:0;border-radius:var(--dimension-radius-half);color:var(--color-foreground-on-bold-background-secondary);background:transparent;font:inherit;--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-on-bold-background-secondary)}.panel-tools__accessory-primary:disabled{color:var(--color-foreground-on-bold-background-quaternary);cursor:not-allowed}.panel-tools__accessory-primary-content{display:flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%}.panel-tools__accessory-image,.panel-tools__accessory-initial{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%;border-radius:var(--dimension-radius-half)}.panel-tools__accessory-image{object-fit:cover}.panel-tools__accessory-initial{color:inherit;background:transparent}.panel-tools__accessory-secondary{display:inline-flex;flex:0 0 var(--dimension-size-300);width:var(--dimension-size-300);height:var(--dimension-size-300)}.panel-tools__accessory-divider{flex:0 0 auto;box-sizing:border-box;width:100%;padding-block:var(--dimension-space-050)}.panel-tools__accessory-divider ds-divider{display:block}@media (prefers-reduced-motion: reduce){:host(.panel-tools--ready.panel-tools--motion-opening) .panel-tools__drawer,:host(.panel-tools--ready.panel-tools--motion-closing) .panel-tools__drawer{transition:none}}`;const M=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.dsToolChange=i(this,"dsToolChange",7);this.dsPresentationChange=i(this,"dsPresentationChange",7);this.dsHeaderBack=i(this,"dsHeaderBack",7);this.dsHeaderAction=i(this,"dsHeaderAction",7);this.dsRailAccessoryAction=i(this,"dsRailAccessoryAction",7);this.dsChromeTransitionStart=i(this,"dsChromeTransitionStart",7);this.dsChromeTransitionEnd=i(this,"dsChromeTransitionEnd",7);this.open=false;this.presentation="drawer";this.fullscreenHeaderMode="shared";this.activeTool="";this.items=[];this.accessories=[];this.toolsLabel="Tools";this.toolShortcutsLabel="Tool shortcuts";this.headers={};this.storageKey="";this.motion="idle";this.drawerSurfaceRetained=false;this.readyForMotion=false;this.presentationMotionSuppressed=false;this.rovingIndex=0;this.fullViewToolIds=[];this.railBodyScrollable=false;this.motionEnableGeneration=0;this.presentationMotionGeneration=0;this.transitionGeneration=0;this.transitionFallbackTimer=null;this.ignoreReplacementTerminal=false;this.focusBeforeFullscreen=null;this.fullViewObserver=null;this.handleComposedHeaderAction=e=>{const t=e.detail;if(!this.activeTool||!t?.id)return;e.stopPropagation();this.dsHeaderAction.emit({tool:this.activeTool,id:t.id,anchor:t.anchor})};this.handleTransitionEnd=e=>{const t=this.renderRoot.querySelector(".panel-tools__drawer");if(e.target!==t)return;if(e.propertyName!=="max-width")return;if(this.ignoreReplacementTerminal){this.ignoreReplacementTerminal=false;return}if(e.type==="transitioncancel")return;if(t&&!this.drawerTransitionAtTerminal(t,this.motion))return;this.finishDrawerTransition()};this.handleToolChange=e=>{const t=j(this.open,this.activeTool,e);this.open=t.open;this.activeTool=t.activeTool;this.dsToolChange.emit({id:e,selected:t.selected})};this.handleRailKeyDown=(e,t,i)=>{const o=z(this.orderedRailEntries);if(!o.length)return;if((e.key==="Enter"||e.key===" ")&&i){e.preventDefault();i();return}if(e.key==="ArrowDown"){if(t>=o.length-1)return;e.preventDefault();this.focusRailAt(t+1);return}if(e.key==="ArrowUp"){if(t<=0)return;e.preventDefault();this.focusRailAt(t-1)}}}get railItems(){return this.items??[]}get orderedRailItems(){return x(this.railItems)}get railAccessories(){return this.accessories??[]}get orderedRailEntries(){return k(this.railItems,this.railAccessories)}disconnectedCallback(){this.el.removeEventListener("transitionend",this.handleTransitionEnd);this.el.removeEventListener("transitioncancel",this.handleTransitionEnd);this.el.removeEventListener("dsAction",this.handleComposedHeaderAction);this.clearTransitionCompletion();this.motionEnableGeneration+=1;this.fullViewObserver?.disconnect();this.fullViewObserver=null;this.disconnectRailBodyObserver()}presentationChanged(e,i){if(e===i)return;if(this.el.getAttribute("presentation")!==e){this.el.setAttribute("presentation",e)}const o=++this.presentationMotionGeneration;this.presentationMotionSuppressed=true;requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(o!==this.presentationMotionGeneration)return;this.presentationMotionSuppressed=false}))}));if(e==="fullscreen"){this.focusBeforeFullscreen=document.activeElement instanceof t?document.activeElement:null;this.open=true}else if(i==="fullscreen"){const e=this.focusBeforeFullscreen;const t=this.activeHeader().actions?.[0]?.id;requestAnimationFrame((async()=>{if(e?.isConnected){e.focus({preventScroll:true})}const i=e?document.activeElement===e||e.contains(document.activeElement):false;if(!i&&t)await this.focusHeaderAction(t);this.focusBeforeFullscreen=null}))}this.dsPresentationChange.emit({presentation:e})}handleFullscreenEscape(e){if(this.presentation!=="fullscreen"||e.key!=="Escape")return;e.preventDefault();e.stopPropagation();this.presentation="drawer"}deferMotionEnable(){if(this.readyForMotion)return;const e=++this.motionEnableGeneration;requestAnimationFrame((()=>{if(e!==this.motionEnableGeneration)return;requestAnimationFrame((()=>{if(e!==this.motionEnableGeneration)return;this.readyForMotion=true}))}))}connectedCallback(){this.el.addEventListener("transitionend",this.handleTransitionEnd);this.el.addEventListener("transitioncancel",this.handleTransitionEnd);this.el.addEventListener("dsAction",this.handleComposedHeaderAction)}componentWillLoad(){this.restoreLastActiveTool();this.drawerSurfaceRetained=this.open}openChanged(e,t){if(e)this.drawerSurfaceRetained=true;if(this.readyForMotion&&t!==undefined&&t!==e){this.startDrawerTransition(e?"opening":"closing")}else if(!e){this.drawerSurfaceRetained=false}this.deferMotionEnable()}activeToolChanged(){this.persistLastActiveTool();this.deferMotionEnable()}storageKeyChanged(){this.restoreLastActiveTool()}componentDidLoad(){this.deferMotionEnable();this.connectRailBodyObserver();this.updateRailBodyScrollable();this.syncFullViewTools();this.fullViewObserver=new MutationObserver((()=>this.syncFullViewTools()));this.fullViewObserver.observe(this.el,{childList:true,attributes:true,attributeFilter:["slot"]})}componentDidRender(){this.updateRailBodyScrollable()}connectRailBodyObserver(){this.disconnectRailBodyObserver();if(!this.railBodyEl||typeof ResizeObserver==="undefined")return;this.railBodyObserver=new ResizeObserver((()=>this.updateRailBodyScrollable()));this.railBodyObserver.observe(this.railBodyEl)}disconnectRailBodyObserver(){this.railBodyObserver?.disconnect();this.railBodyObserver=undefined}updateRailBodyScrollable(){const e=Boolean(this.railBodyEl&&this.railBodyEl.scrollHeight>this.railBodyEl.clientHeight+1);if(e!==this.railBodyScrollable)this.railBodyScrollable=e}itemsChanged(){this.rovingIndex=0;this.reconcileActiveTool();this.deferMotionEnable()}accessoriesChanged(e=[],t=[]){const i=z(k(this.railItems,t));const o=z(k(this.railItems,e));const s=this.renderRoot.activeElement;const n=s?.closest("[data-rail-focus-key]")?.dataset.railFocusKey;const r=n?i.indexOf(n):-1;const a=r>=0?r:this.rovingIndex;const l=C(i,o,a);const d=r>=0&&!o.includes(n??"");this.rovingIndex=l;if(d&&o.length){requestAnimationFrame((()=>this.focusRailAt(l)))}}restoreLastActiveTool(){if(!this.storageKey||this.activeTool)return;try{const e=localStorage.getItem(this.storageKey);if(A(e))this.activeTool=e}catch{}}persistLastActiveTool(){if(!this.storageKey||!this.activeTool)return;try{localStorage.setItem(this.storageKey,this.activeTool)}catch{}}clearPersistedTool(){if(!this.storageKey)return;try{localStorage.removeItem(this.storageKey)}catch{}}reconcileActiveTool(){const e=$(this.railItems,this.open,this.activeTool);if(!e.removedTool)return;this.clearPersistedTool();this.open=e.open;this.activeTool=e.activeTool;this.dsToolChange.emit({id:e.removedTool,selected:false})}startDrawerTransition(e){const t=this.renderRoot.querySelector(".panel-tools__drawer");if(this.motion!=="idle"){this.finishDrawerTransition();this.ignoreReplacementTerminal=true}this.motion=e;this.dsChromeTransitionStart.emit({source:"panel-tools",phase:e});const i=++this.transitionGeneration;requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(i!==this.transitionGeneration||this.motion!==e)return;if(!t){this.finishDrawerTransition();return}if(this.drawerTransitionAtTerminal(t,e)){this.finishDrawerTransition();return}const o=D(getComputedStyle(t));if(o<=0){this.finishDrawerTransition();return}this.transitionFallbackTimer=window.setTimeout((()=>{this.finishDrawerTransition()}),o)}))}))}drawerTransitionAtTerminal(e,t){const i=e.getBoundingClientRect().width;const o=e.querySelector(".panel-tools__drawer-surface");const s=o?.getBoundingClientRect().width??0;return R(i,s,t)}finishDrawerTransition(){const e=this.motion;const t=e!=="idle";this.clearTransitionCompletion();if(!t)return;this.ignoreReplacementTerminal=false;this.motion="idle";if(e==="closing"&&!this.open){this.drawerSurfaceRetained=false}this.dsChromeTransitionEnd.emit({source:"panel-tools"})}clearTransitionCompletion(){this.transitionGeneration+=1;if(this.transitionFallbackTimer!==null){window.clearTimeout(this.transitionFallbackTimer);this.transitionFallbackTimer=null}}isRailSelected(e){return this.open&&this.activeTool===e}isDrawerPresent(){return this.open||this.drawerSurfaceRetained}isViewActive(e){return this.isDrawerPresent()&&this.activeTool===e}hasFullView(e){return this.fullViewToolIds.includes(e)}syncFullViewTools(){const e=this.orderedRailItems.map((e=>e.id));const t=e.filter((e=>Boolean(this.el.querySelector(`[slot="${e}-view"]`))));if(t.join("|")!==this.fullViewToolIds.join("|"))this.fullViewToolIds=t}get renderRoot(){return this.el.shadowRoot??this.el}headerLabel(){if(!this.isDrawerPresent()||!this.activeTool)return"";const e=this.railItems.find((e=>e.id===this.activeTool));return e?.label??m[this.activeTool]??this.activeTool}resolvedHeaders(){return this.headers??{}}activeHeader(){if(!this.activeTool)return{};return this.resolvedHeaders()[this.activeTool]??{}}async activateTool(e){const t=this.railItems.find((t=>t.id===e));if(!t||t.isInactive)return;this.handleToolChange(e)}async closeDrawer(){if(!this.open)return;const e=this.activeTool;this.open=false;if(e){this.dsToolChange.emit({id:e,selected:false})}}async focusHeaderAction(e){const t=this.renderRoot.querySelector(`[data-header-action-id="${CSS.escape(e)}"]`);await(t?.setFocus?.())}focusRailAt(e){const t=z(this.orderedRailEntries);if(!t.length)return;const i=Math.max(0,Math.min(e,t.length-1));this.rovingIndex=i;const o=this.renderRoot.querySelector(`[data-rail-focus-key="${CSS.escape(t[i])}"]`);if(o?.setFocus){void o.setFocus()}else{o?.focus({preventScroll:true})}}renderRailAction(e,t){const i=`tool:${e.id}`;const s=e.ariaLabel??e.label??m[e.id]??e.id;return o("ds-tooltip",{key:e.id,label:s,shortcutKey:e.shortcutKey??b[e.id],side:"left",size:"sm",boundary:"viewport"},o("ds-button-unfilled",{variant:"icon",class:"panel-tools__rail-action",icon:e.icon,isActive:this.isRailSelected(e.id),activeFill:false,hasBorder:false,pressScale:false,dot:e.dot??false,isInactive:e.isInactive,focusTabIndex:t===this.rovingIndex?0:-1,"data-rail-focus-key":i,"aria-label":s,pressed:this.isRailSelected(e.id),onFocusin:()=>{this.rovingIndex=t},onKeyDown:i=>this.handleRailKeyDown(i,t,(()=>this.handleToolChange(e.id))),onDsClick:()=>this.handleToolChange(e.id)}))}accessoryPrimaryLabel(e){const t=e.primaryAction.ariaLabel?.trim()||e.ariaLabel;const i=e.statusText.trim();return i?`${t}. ${i}`:t}emitAccessoryAction(e,t,i){if(t.isInactive)return;this.dsRailAccessoryAction.emit(T(e,t.id,i))}renderAccessoryVisual(e){if(e.visual.type==="image"){return o("img",{class:"panel-tools__accessory-image",src:e.visual.src,alt:"","aria-hidden":"true"})}if(e.visual.type==="initial"){const t=[...e.visual.initial.trim()].slice(0,2).join("");return o("ds-text",{class:"panel-tools__accessory-initial",as:"span",variant:"text-caption",emphasis:true,color:"inherit","aria-hidden":"true"},t)}return o("ds-icon",{name:e.visual.icon,size:"sm","aria-hidden":"true"})}renderRailShortcut(e,t){const i=`accessory:${e.id}:${e.action.id}`;const s=t.get(i);const n=e.action.ariaLabel?.trim()||e.ariaLabel;const r=[...e.initials.trim()].slice(0,2).join("");return o("div",{key:`accessory:${e.id}`,class:"panel-tools__accessory panel-tools__accessory--shortcut"},o("ds-tooltip",{label:n,side:"left",size:"sm",boundary:"viewport"},o("button",{type:"button",class:"panel-tools__shortcut ds-focus-ring-inset ds-interaction-fill",disabled:e.action.isInactive,tabIndex:s===this.rovingIndex?0:-1,"data-rail-focus-key":i,"aria-label":n,onFocus:()=>{if(s!==undefined)this.rovingIndex=s},onKeyDown:e=>s===undefined?undefined:this.handleRailKeyDown(e,s),onClick:t=>this.emitAccessoryAction(e.id,e.action,t.currentTarget)},o("span",{class:"panel-tools__shortcut-content ds-interaction-fill__content"},o("ds-text",{class:"panel-tools__shortcut-orb",as:"span",variant:"text-caption",emphasis:true,color:"inherit"},r),e.dot?o("ds-badge",{class:"panel-tools__shortcut-dot",variant:"dot",background:"var(--color-background-secondary)","aria-hidden":"true"}):null))))}renderRailAccessory(e,t){if(e.type==="divider"){return o("div",{key:`accessory:${e.id}`,class:"panel-tools__accessory-divider","aria-hidden":"true"},o("ds-divider",null))}if(e.type==="shortcut"){return this.renderRailShortcut(e,t)}const i=`accessory:${e.id}:${e.primaryAction.id}`;const s=t.get(i);const n=this.accessoryPrimaryLabel(e);const r=e.secondaryAction;const a=r?`accessory:${e.id}:${r.id}`:"";const l=r?t.get(a):undefined;return o("div",{key:`accessory:${e.id}`,class:{"panel-tools__accessory":true,"panel-tools__accessory--transient":true,"panel-tools__accessory--transient-active":e.statusTone==="active","panel-tools__accessory--transient-positive":e.statusTone==="positive"}},o("ds-tooltip",{label:n,side:"left",size:"sm",boundary:"viewport"},o("button",{type:"button",class:"panel-tools__accessory-primary ds-focus-ring-inset ds-interaction-fill ds-interaction-fill--on-bold",disabled:e.primaryAction.isInactive,tabIndex:s===this.rovingIndex?0:-1,"data-rail-focus-key":i,"aria-label":n,onFocus:()=>{if(s!==undefined)this.rovingIndex=s},onKeyDown:e=>s===undefined?undefined:this.handleRailKeyDown(e,s),onClick:t=>this.emitAccessoryAction(e.id,e.primaryAction,t.currentTarget)},o("span",{class:"panel-tools__accessory-primary-content ds-interaction-fill__content"},this.renderAccessoryVisual(e)))),r?o("ds-tooltip",{label:r.ariaLabel,side:"left",size:"sm",boundary:"viewport"},o("ds-button-unfilled",{class:"panel-tools__accessory-secondary",variant:"icon",size:"sm",rounded:true,background:"bold",hasBorder:false,icon:r.icon,isInactive:r.isInactive,focusTabIndex:l===this.rovingIndex?0:-1,"data-rail-focus-key":a,"aria-label":r.ariaLabel,onFocusin:()=>{if(l!==undefined)this.rovingIndex=l},onKeyDown:e=>l===undefined?undefined:this.handleRailKeyDown(e,l),onDsClick:t=>this.emitAccessoryAction(e.id,r,t.currentTarget)})):null)}renderRailEntry(e,t){if(e.type==="tool"){return this.renderRailAction(e.item,t.get(`tool:${e.id}`)??0)}return this.renderRailAccessory(e.accessory,t)}render(){const e=this.headerLabel();const t=this.activeHeader();const i=t.title?.trim()||e;const n=t.actions??[];const r=this.orderedRailItems;const a=this.orderedRailEntries;const l=e=>e.type==="tool"?S(e.item):e.accessory.railPlacement;const d=a.filter((e=>l(e)==="header"));const c=a.filter((e=>l(e)==="body"));const h=a.filter((e=>l(e)==="footer"));const f=new Map(z(a).map(((e,t)=>[e,t])));const u=this.isDrawerPresent();const p=F(this.open,this.motion);const v=Boolean(u&&this.activeTool&&this.hasFullView(this.activeTool));const g=r.map((e=>e.id));return o(s,{key:"3d4019f1410156313c1d5a88a78de2345d91230a",class:{"panel-tools":true,"panel-tools--open":this.open,"panel-tools--ready":this.readyForMotion,"panel-tools--motion-opening":this.motion==="opening","panel-tools--motion-closing":this.motion==="closing","panel-tools--drawer-resting":p,"panel-tools--fullscreen":this.presentation==="fullscreen","panel-tools--presentation-snap":this.presentationMotionSuppressed},role:this.presentation==="fullscreen"?"dialog":"complementary","aria-modal":this.presentation==="fullscreen"?"true":undefined,"aria-label":this.toolsLabel},o("div",{key:"dfc3a62ca2ca3a19fc1408c5bde4b9bbeac9bc76",class:"panel-tools__layout"},o("nav",{key:"97584bc58ed49c01ffdcf5485c15ac636bf07844",class:"panel-tools__rail","aria-label":this.toolShortcutsLabel},d.length?o("div",{class:{"panel-tools__rail-header":true,"panel-tools__rail-section--stacked":d.length>1,"ds-chrome-row":d.length===1,"ds-chrome-column":d.length>1,"ds-chrome-space--md":true}},d.map((e=>this.renderRailEntry(e,f)))):null,o("div",{key:"0d6fee485643203a84739b65e3c3a9f32e615cb2",class:{"panel-tools__rail-body":true,"ds-chrome-column":true,"ds-chrome-space--md":true,"ds-scrollbar-hidden":true,"ds-focus-ring":this.railBodyScrollable},ref:e=>{const t=e??undefined;if(t===this.railBodyEl)return;this.railBodyEl=t;this.connectRailBodyObserver()},role:this.railBodyScrollable?"region":undefined,"aria-label":this.railBodyScrollable?this.toolShortcutsLabel:undefined,tabIndex:this.railBodyScrollable?0:undefined},o("div",{key:"4321d8cb033781e6c7792e89a173749eec6b0347",class:"panel-tools__rail-actions"},c.map((e=>this.renderRailEntry(e,f))))),h.length?o("div",{class:{"panel-tools__rail-footer":true,"panel-tools__rail-section--stacked":h.length>1,"ds-chrome-row":h.length===1,"ds-chrome-column":h.length>1,"ds-chrome-space--md":true}},h.map((e=>this.renderRailEntry(e,f)))):null),o("div",{key:"3da3368dcbd88b42ba5ec458d9b9343a61b44fbb",class:{"panel-tools__drawer":true,"panel-tools__drawer--visible":u},"aria-hidden":u?null:"true",inert:u?undefined:true},o("div",{key:"c777094f938891ef1985e5194d3806e816cafd4c",class:"panel-tools__drawer-surface"},this.presentation!=="fullscreen"||this.fullscreenHeaderMode==="shared"?o("ds-panel-tool-header",{class:"panel-tools__header",heading:i,showBack:t.showBack??false,backIcon:t.backIcon||"ChevronLeft",backAriaLabel:t.backAriaLabel||"Back",showMenu:false,ref:e=>{const t=e;if(t)t.actions=n},onDsBack:()=>{if(this.activeTool)this.dsHeaderBack.emit({tool:this.activeTool})}}):null,o("div",{key:"e29a9d0431e8cb23e1f13d13b16a2aefe28b2751",class:"panel-tools__body",hidden:v},g.map((e=>{const t=this.isViewActive(e);return o("div",{class:{"panel-tools__view":true,"panel-tools__view--active":t},hidden:!t},o("slot",{name:e}))}))),o("div",{key:"4bc3627fc697f096fac684766713d30dc2553b94",class:"panel-tools__full-views",hidden:!v},g.map((e=>o("div",{class:{"panel-tools__full-view":true,"panel-tools__full-view--active":this.isViewActive(e)&&this.hasFullView(e)},hidden:!(this.isViewActive(e)&&this.hasFullView(e))},o("slot",{name:`${e}-view`})))))))))}get el(){return this}static get watchers(){return{presentation:[{presentationChanged:0}],open:[{openChanged:0}],activeTool:[{activeToolChanged:0}],storageKey:[{storageKeyChanged:0}],items:[{itemsChanged:0}],accessories:[{accessoriesChanged:0}]}}static get style(){return E()}},[257,"ds-panel-tools",{open:[1540],presentation:[1537],fullscreenHeaderMode:[513,"fullscreen-header-mode"],activeTool:[1537,"active-tool"],items:[16],accessories:[16],toolsLabel:[1,"tools-label"],toolShortcutsLabel:[1,"tool-shortcuts-label"],headers:[16],storageKey:[1,"storage-key"],motion:[32],drawerSurfaceRetained:[32],readyForMotion:[32],presentationMotionSuppressed:[32],rovingIndex:[32],fullViewToolIds:[32],railBodyScrollable:[32],activateTool:[64],closeDrawer:[64],focusHeaderAction:[64]},[[10,"keydown","handleFullscreenEscape"]],{presentation:[{presentationChanged:0}],open:[{openChanged:0}],activeTool:[{activeToolChanged:0}],storageKey:[{storageKeyChanged:0}],items:[{itemsChanged:0}],accessories:[{accessoriesChanged:0}]}]);function B(){if(typeof customElements==="undefined"){return}const e=["ds-panel-tools","ds-badge","ds-button-unfilled","ds-divider","ds-icon","ds-loader","ds-panel-tool-header","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-panel-tools":if(!customElements.get(n(e))){customElements.define(n(e),M)}break;case"ds-badge":if(!customElements.get(n(e))){a()}break;case"ds-button-unfilled":if(!customElements.get(n(e))){l()}break;case"ds-divider":if(!customElements.get(n(e))){d()}break;case"ds-icon":if(!customElements.get(n(e))){c()}break;case"ds-loader":if(!customElements.get(n(e))){h()}break;case"ds-panel-tool-header":if(!customElements.get(n(e))){f()}break;case"ds-text":if(!customElements.get(n(e))){u()}break;case"ds-tooltip":if(!customElements.get(n(e))){p()}break}}))}B();export{M as P,m as a,j as b,y as c,B as d,x as o,$ as r};
|
|
2
|
-
//# sourceMappingURL=p-CVNYRTEH.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["PANEL_TOOLS_TOOL_IDS","PANEL_TOOLS_PRIMARY_TOOL_ID","PANEL_TOOLS_LABELS","search","messages","stacks","activity","agents","help","PANEL_TOOLS_SHORTCUTS","PANEL_TOOLS_DEFAULT_ITEMS","id","icon","label","railPlacement","order","shortcutKey","mobileDestination","PANEL_TOOLS_REGION_ORDER","header","body","footer","panelToolsItemOrder","item","canonical","findIndex","Number","MAX_SAFE_INTEGER","orderPanelToolsItems","items","firstById","Map","trim","has","set","Array","from","values","sort","left","right","leftRegion","panelToolsRailPlacement","rightRegion","regionDelta","orderPanelToolsRailEntries","accessories","toolEntries","map","type","firstAccessoryById","accessory","accessoryEntries","leftPlacement","rightPlacement","leftOrder","rightOrder","panelToolsRailFocusKeys","entries","flatMap","entry","action","isInactive","keys","primaryAction","secondaryAction","push","reconcilePanelToolsRovingIndex","previousKeys","nextKeys","currentIndex","length","currentKey","preservedIndex","indexOf","index","nextIndex","Math","min","max","panelToolsRailAccessoryActionDetail","accessoryId","actionId","anchor","isPanelToolsToolId","value","reconcilePanelToolsAvailability","open","activeTool","some","removedTool","panelToolsDrawerTransitionMs","style","properties","transitionProperty","split","durations","transitionDuration","parseCssTimeMs","delays","transitionDelay","reduce","property","duration","delay","panelToolsDrawerResting","motion","panelToolsDrawerAtTerminal","width","targetWidth","resolvePanelToolActivation","selected","panelToolsCss","PanelTools","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","presentation","fullscreenHeaderMode","toolsLabel","toolShortcutsLabel","headers","storageKey","drawerSurfaceRetained","readyForMotion","presentationMotionSuppressed","rovingIndex","fullViewToolIds","railBodyScrollable","motionEnableGeneration","presentationMotionGeneration","transitionGeneration","transitionFallbackTimer","ignoreReplacementTerminal","focusBeforeFullscreen","fullViewObserver","handleComposedHeaderAction","event","detail","stopPropagation","dsHeaderAction","emit","tool","handleTransitionEnd","drawer","renderRoot","querySelector","target","propertyName","drawerTransitionAtTerminal","finishDrawerTransition","handleToolChange","next","dsToolChange","handleRailKeyDown","e","activate","orderedRailEntries","key","preventDefault","focusRailAt","railItems","orderedRailItems","railAccessories","disconnectedCallback","el","removeEventListener","clearTransitionCompletion","disconnect","disconnectRailBodyObserver","presentationChanged","previous","getAttribute","setAttribute","presentationGeneration","requestAnimationFrame","document","activeElement","fallbackActionId","activeHeader","actions","async","isConnected","focus","preventScroll","focusRestored","contains","focusHeaderAction","dsPresentationChange","handleFullscreenEscape","deferMotionEnable","generation","connectedCallback","addEventListener","componentWillLoad","restoreLastActiveTool","openChanged","isOpen","wasOpen","undefined","startDrawerTransition","activeToolChanged","persistLastActiveTool","storageKeyChanged","componentDidLoad","connectRailBodyObserver","updateRailBodyScrollable","syncFullViewTools","MutationObserver","observe","childList","attributes","attributeFilter","componentDidRender","railBodyEl","ResizeObserver","railBodyObserver","Boolean","scrollHeight","clientHeight","itemsChanged","reconcileActiveTool","accessoriesChanged","focusedKey","closest","dataset","railFocusKey","focusedIndex","restoreFocus","includes","stored","localStorage","getItem","setItem","clearPersistedTool","removeItem","phase","dsChromeTransitionStart","source","fallbackMs","getComputedStyle","window","setTimeout","getBoundingClientRect","surface","completedPhase","wasTransitioning","dsChromeTransitionEnd","clearTimeout","isRailSelected","isDrawerPresent","isViewActive","hasFullView","ids","filter","join","shadowRoot","headerLabel","find","candidate","resolvedHeaders","activateTool","closeDrawer","CSS","escape","setFocus","bounded","renderRailAction","focusKey","ariaLabel","h","side","size","boundary","variant","class","isActive","activeFill","hasBorder","pressScale","dot","focusTabIndex","pressed","onFocusin","onKeyDown","onDsClick","accessoryPrimaryLabel","actionLabel","status","statusText","emitAccessoryAction","dsRailAccessoryAction","renderAccessoryVisual","visual","src","alt","initial","slice","as","emphasis","color","name","renderRailShortcut","focusIndexes","focusIndex","get","initials","disabled","tabIndex","onFocus","onClick","currentTarget","background","renderRailAccessory","primaryKey","primaryIndex","primaryLabel","secondary","secondaryKey","secondaryIndex","statusTone","rounded","renderRailEntry","render","headerTitle","title","headerActions","entryPlacement","headerEntries","bodyEntries","footerEntries","showDrawerChrome","drawerResting","activeFullView","toolIds","Host","role","ref","element","inert","heading","showBack","backIcon","backAriaLabel","showMenu","toolHeader","onDsBack","dsHeaderBack","hidden","active"],"sources":["src/wc/components/PanelTools/panel-tools-types.ts","src/wc/components/PanelTools/panel-tools-utils.ts","src/wc/components/PanelTools/PanelTools.css?tag=ds-panel-tools&encapsulation=shadow","src/wc/components/PanelTools/PanelTools.tsx"],"sourcesContent":["/** Application-owned tool id for the shell rail and responsive tool views. */\nexport type PanelToolsToolId = string;\n\n/** Canonical Motive shell recipe used when item metadata is omitted. */\nexport type CanonicalPanelToolsToolId =\n | 'search'\n | 'messages'\n | 'agents'\n | 'stacks'\n | 'activity'\n | 'help';\n\nexport const PANEL_TOOLS_TOOL_IDS: CanonicalPanelToolsToolId[] = [\n 'agents',\n 'messages',\n 'activity',\n 'search',\n 'stacks',\n 'help',\n];\n\n/** Rail header slot — mirrors panel-nav M logo row. */\nexport const PANEL_TOOLS_PRIMARY_TOOL_ID: CanonicalPanelToolsToolId = 'agents';\n\n/** Rail footer slot — flush to the bottom of the tools column. */\nexport const PANEL_TOOLS_FOOTER_TOOL_ID: CanonicalPanelToolsToolId = 'help';\n\nexport const PANEL_TOOLS_LABELS: Record<CanonicalPanelToolsToolId, string> = {\n search: 'Search',\n messages: 'Messages',\n stacks: 'Stacks',\n activity: 'Activity',\n agents: 'Agents',\n help: 'Help & Support',\n};\n\nexport const PANEL_TOOLS_SHORTCUTS: Partial<Record<CanonicalPanelToolsToolId, string>> = {\n search: 'K',\n agents: 'A',\n messages: 'M',\n stacks: 'S',\n activity: 'N',\n help: '/',\n};\n\nexport type PanelToolsRailPlacement = 'header' | 'body' | 'footer';\n\nexport interface PanelToolsItem {\n id: PanelToolsToolId;\n /** Icon name for <ds-icon>. */\n icon: string;\n /** Visible and accessible fallback label for custom tool ids. */\n label?: string;\n /** Explicit rail region; canonical Agents/Help placement is the fallback. */\n railPlacement?: PanelToolsRailPlacement;\n /** Stable ordering within the selected rail region. */\n order?: number;\n /** Optional shortcut label displayed by the tooltip. */\n shortcutKey?: string;\n /** Mobile destination recipe; canonical ids retain their explicit defaults. */\n mobileDestination?: 'search' | 'inbox' | 'activity' | 'messages' | 'agents' | 'help';\n /** Whether this rail button is currently pressed/active. */\n selected?: boolean;\n /** Show a notification dot. */\n dot?: boolean;\n isInactive?: boolean;\n ariaLabel?: string;\n}\n\nexport type PanelToolsRailAccessoryVisual =\n | { type: 'icon'; icon: string }\n | { type: 'initial'; initial: string }\n | { type: 'image'; src: string };\n\nexport interface PanelToolsRailAccessoryAction {\n /** Stable application-owned action id emitted with the accessory id. */\n id: string;\n /** Overrides the accessory label for the primary action. */\n ariaLabel?: string;\n isInactive?: boolean;\n}\n\nexport interface PanelToolsRailAccessorySecondaryAction {\n id: string;\n icon: string;\n ariaLabel: string;\n isInactive?: boolean;\n}\n\nexport type PanelToolsRailTransientTone = 'active' | 'positive';\n\ninterface PanelToolsRailAccessoryBase {\n /** Stable application-owned identity. Duplicate or blank ids are omitted. */\n id: string;\n /** Explicit rail region; accessories never infer placement from their id. */\n railPlacement: PanelToolsRailPlacement;\n /** Stable ordering within the selected rail region. */\n order: number;\n}\n\n/** Decorative boundary between application-owned rail accessory groups. */\nexport interface PanelToolsRailDividerAccessory extends PanelToolsRailAccessoryBase {\n type: 'divider';\n}\n\n/**\n * A compact one-action shortcut that matches standard tool-button geometry.\n * PanelTools owns its initial orb, notification dot, and transient interaction paint.\n */\nexport interface PanelToolsRailShortcutAccessory extends PanelToolsRailAccessoryBase {\n type: 'shortcut';\n /** Accessible shortcut name and action-label fallback. */\n ariaLabel: string;\n /** One or two displayed graphemes. Longer values are truncated visually. */\n initials: string;\n /** Supplemental notification dot. Include its meaning in the accessible label when needed. */\n dot?: boolean;\n action: PanelToolsRailAccessoryAction;\n}\n\n/**\n * A direct application intent that never selects a tool or changes drawer state.\n * PanelTools owns the two-control-height surface and its focus behavior.\n */\nexport interface PanelToolsRailTransientAccessory extends PanelToolsRailAccessoryBase {\n type: 'transient';\n /** Accessible accessory name and primary-action fallback label. */\n ariaLabel: string;\n visual: PanelToolsRailAccessoryVisual;\n /** State announced with the primary action and shown in its tooltip. */\n statusText: string;\n /** Bold surface treatment. Active uses brand; positive uses positive semantic color. */\n statusTone: PanelToolsRailTransientTone;\n primaryAction: PanelToolsRailAccessoryAction;\n secondaryAction?: PanelToolsRailAccessorySecondaryAction;\n}\n\nexport type PanelToolsRailAccessory =\n | PanelToolsRailDividerAccessory\n | PanelToolsRailShortcutAccessory\n | PanelToolsRailTransientAccessory;\n\nexport interface PanelToolsRailAccessoryActionDetail {\n accessoryId: string;\n actionId: string;\n /** Rendered action control, suitable for anchoring an application-owned overlay. */\n anchor: HTMLElement;\n}\n\n/** Canonical shell recipe used by Lab and by managed ShellApp examples. */\nexport const PANEL_TOOLS_DEFAULT_ITEMS: PanelToolsItem[] = [\n {\n id: 'agents',\n icon: 'AI',\n label: PANEL_TOOLS_LABELS.agents,\n railPlacement: 'header',\n order: 0,\n shortcutKey: PANEL_TOOLS_SHORTCUTS.agents,\n mobileDestination: 'agents',\n },\n {\n id: 'messages',\n icon: 'MessageBubbleStack',\n label: PANEL_TOOLS_LABELS.messages,\n order: 0,\n shortcutKey: PANEL_TOOLS_SHORTCUTS.messages,\n mobileDestination: 'messages',\n },\n {\n id: 'activity',\n icon: 'Bell',\n label: PANEL_TOOLS_LABELS.activity,\n order: 1,\n shortcutKey: PANEL_TOOLS_SHORTCUTS.activity,\n mobileDestination: 'activity',\n },\n {\n id: 'search',\n icon: 'MagnifyingGlass',\n label: PANEL_TOOLS_LABELS.search,\n order: 2,\n shortcutKey: PANEL_TOOLS_SHORTCUTS.search,\n mobileDestination: 'search',\n },\n {\n id: 'help',\n icon: 'CircleQuestion',\n label: PANEL_TOOLS_LABELS.help,\n railPlacement: 'footer',\n order: 0,\n shortcutKey: PANEL_TOOLS_SHORTCUTS.help,\n mobileDestination: 'help',\n },\n];\n\nexport interface PanelToolsHeaderAction {\n id: string;\n icon: string;\n ariaLabel: string;\n triggerId?: string;\n controls?: string;\n expanded?: boolean;\n /** Associated surface remains visible, including exit motion. */\n surfaceOpen?: boolean;\n haspopup?: 'menu' | 'dialog' | 'listbox' | 'tree' | 'grid';\n pressed?: boolean;\n isInactive?: boolean;\n}\n\nexport interface PanelToolsHeaderActionDetail {\n tool: PanelToolsToolId;\n id: string;\n /** Rendered header action host. Pass this to an external overlay's element anchor prop. */\n anchor?: HTMLElement;\n}\n\nexport interface PanelToolHeaderActionDetail {\n id: string;\n originalEvent: MouseEvent;\n /** Rendered action host, suitable for anchoring an external overlay across a shadow boundary. */\n anchor: HTMLElement;\n}\n\nexport interface PanelToolsHeaderConfig {\n title?: string;\n showBack?: boolean;\n backIcon?: string;\n backAriaLabel?: string;\n actions?: PanelToolsHeaderAction[];\n}\n\n/** Per-tool header state. The application replaces the object when a tool changes depth or actions. */\nexport type PanelToolsHeaders = Partial<Record<PanelToolsToolId, PanelToolsHeaderConfig>>;\n","import { parseCssTimeMs } from '../../utils/resolve-css-time-ms';\nimport {\n PANEL_TOOLS_PRIMARY_TOOL_ID,\n PANEL_TOOLS_TOOL_IDS,\n type PanelToolsItem,\n type PanelToolsRailAccessory,\n type PanelToolsRailAccessoryActionDetail,\n type PanelToolsRailPlacement,\n type PanelToolsToolId,\n} from './panel-tools-types';\n\nconst PANEL_TOOLS_REGION_ORDER: Record<PanelToolsRailPlacement, number> = {\n header: 0,\n body: 1,\n footer: 2,\n};\n\nfunction panelToolsItemOrder(item: PanelToolsItem): number {\n const canonical = PANEL_TOOLS_TOOL_IDS.findIndex(id => id === item.id);\n return item.order ?? (canonical < 0 ? Number.MAX_SAFE_INTEGER : canonical);\n}\n\nexport function orderPanelToolsItems(items: PanelToolsItem[]): PanelToolsItem[] {\n const firstById = new Map<PanelToolsToolId, PanelToolsItem>();\n for (const item of items) {\n if (item.id.trim() && !firstById.has(item.id)) firstById.set(item.id, item);\n }\n return Array.from(firstById.values()).sort((left, right) => {\n const leftRegion = panelToolsRailPlacement(left);\n const rightRegion = panelToolsRailPlacement(right);\n const regionDelta =\n PANEL_TOOLS_REGION_ORDER[leftRegion] - PANEL_TOOLS_REGION_ORDER[rightRegion];\n if (regionDelta !== 0) return regionDelta;\n\n return panelToolsItemOrder(left) - panelToolsItemOrder(right);\n });\n}\n\nexport type PanelToolsRailEntry =\n | { type: 'tool'; id: string; item: PanelToolsItem }\n | { type: 'accessory'; id: string; accessory: PanelToolsRailAccessory };\n\n/** Merge tools and governed accessories into one visual and keyboard order. */\nexport function orderPanelToolsRailEntries(\n items: PanelToolsItem[],\n accessories: PanelToolsRailAccessory[]\n): PanelToolsRailEntry[] {\n const toolEntries: PanelToolsRailEntry[] = orderPanelToolsItems(items).map(item => ({\n type: 'tool',\n id: item.id,\n item,\n }));\n const firstAccessoryById = new Map<string, PanelToolsRailAccessory>();\n for (const accessory of accessories) {\n if (accessory.id.trim() && !firstAccessoryById.has(accessory.id)) {\n firstAccessoryById.set(accessory.id, accessory);\n }\n }\n const accessoryEntries: PanelToolsRailEntry[] = Array.from(firstAccessoryById.values()).map(\n accessory => ({\n type: 'accessory',\n id: accessory.id,\n accessory,\n })\n );\n\n return [...toolEntries, ...accessoryEntries].sort((left, right) => {\n const leftPlacement =\n left.type === 'tool' ? panelToolsRailPlacement(left.item) : left.accessory.railPlacement;\n const rightPlacement =\n right.type === 'tool' ? panelToolsRailPlacement(right.item) : right.accessory.railPlacement;\n const regionDelta =\n PANEL_TOOLS_REGION_ORDER[leftPlacement] - PANEL_TOOLS_REGION_ORDER[rightPlacement];\n if (regionDelta !== 0) return regionDelta;\n\n const leftOrder = left.type === 'tool' ? panelToolsItemOrder(left.item) : left.accessory.order;\n const rightOrder =\n right.type === 'tool' ? panelToolsItemOrder(right.item) : right.accessory.order;\n return leftOrder - rightOrder;\n });\n}\n\n/** Flatten interactive entries while leaving decorative boundaries out of focus order. */\nexport function panelToolsRailFocusKeys(entries: PanelToolsRailEntry[]): string[] {\n return entries.flatMap(entry => {\n if (entry.type === 'tool') return [`tool:${entry.id}`];\n if (entry.accessory.type === 'divider') return [];\n if (entry.accessory.type === 'shortcut') {\n return entry.accessory.action.isInactive\n ? []\n : [`accessory:${entry.id}:${entry.accessory.action.id}`];\n }\n const keys = entry.accessory.primaryAction.isInactive\n ? []\n : [`accessory:${entry.id}:${entry.accessory.primaryAction.id}`];\n if (entry.accessory.secondaryAction && !entry.accessory.secondaryAction.isInactive) {\n keys.push(`accessory:${entry.id}:${entry.accessory.secondaryAction.id}`);\n }\n return keys;\n });\n}\n\n/** Preserve the current target across collection changes, or choose its nearest survivor. */\nexport function reconcilePanelToolsRovingIndex(\n previousKeys: string[],\n nextKeys: string[],\n currentIndex: number\n): number {\n if (!nextKeys.length) return 0;\n const currentKey = previousKeys[currentIndex];\n const preservedIndex = currentKey ? nextKeys.indexOf(currentKey) : -1;\n if (preservedIndex >= 0) return preservedIndex;\n for (let index = currentIndex + 1; index < previousKeys.length; index += 1) {\n const nextIndex = nextKeys.indexOf(previousKeys[index]);\n if (nextIndex >= 0) return nextIndex;\n }\n for (let index = currentIndex - 1; index >= 0; index -= 1) {\n const nextIndex = nextKeys.indexOf(previousKeys[index]);\n if (nextIndex >= 0) return nextIndex;\n }\n return Math.min(Math.max(currentIndex, 0), nextKeys.length - 1);\n}\n\nexport function panelToolsRailAccessoryActionDetail(\n accessoryId: string,\n actionId: string,\n anchor: HTMLElement\n): PanelToolsRailAccessoryActionDetail {\n return { accessoryId, actionId, anchor };\n}\n\nexport function isPanelToolsToolId(value: string | null): value is PanelToolsToolId {\n return typeof value === 'string' && value.trim().length > 0;\n}\n\nexport function panelToolsRailPlacement(item: PanelToolsItem): 'header' | 'body' | 'footer' {\n if (item.railPlacement) return item.railPlacement;\n if (item.id === PANEL_TOOLS_PRIMARY_TOOL_ID) return 'header';\n if (item.id === 'help') return 'footer';\n return 'body';\n}\n\nexport function reconcilePanelToolsAvailability(\n items: PanelToolsItem[],\n open: boolean,\n activeTool: PanelToolsToolId | ''\n): { open: boolean; activeTool: PanelToolsToolId | ''; removedTool: PanelToolsToolId | '' } {\n if (!activeTool || items.some(item => item.id === activeTool)) {\n return { open, activeTool, removedTool: '' };\n }\n return { open: false, activeTool: '', removedTool: activeTool };\n}\n\nexport function shouldResyncPanelToolsItems(\n prev: PanelToolsItem[],\n next: PanelToolsItem[]\n): boolean {\n if (prev.length !== next.length) return true;\n return next.some((item, index) => {\n const prior = prev[index];\n if (!prior) return true;\n return (\n prior.id !== item.id ||\n prior.icon !== item.icon ||\n prior.label !== item.label ||\n prior.railPlacement !== item.railPlacement ||\n prior.order !== item.order ||\n prior.shortcutKey !== item.shortcutKey ||\n prior.mobileDestination !== item.mobileDestination ||\n prior.selected !== item.selected ||\n prior.dot !== item.dot ||\n prior.isInactive !== item.isInactive ||\n prior.ariaLabel !== item.ariaLabel\n );\n });\n}\n\nexport type PanelToolsMotion = 'opening' | 'closing' | 'idle';\n\nexport interface PanelToolsTransitionStyle {\n transitionProperty: string;\n transitionDuration: string;\n transitionDelay: string;\n}\n\n/** Maximum computed time for the drawer's max-width transition, including delay. */\nexport function panelToolsDrawerTransitionMs(style: PanelToolsTransitionStyle): number {\n const properties = style.transitionProperty.split(',').map(item => item.trim());\n const durations = style.transitionDuration.split(',').map(item => parseCssTimeMs(item.trim(), 0));\n const delays = style.transitionDelay.split(',').map(item => parseCssTimeMs(item.trim(), 0));\n\n return properties.reduce((max, property, index) => {\n if (property !== 'all' && property !== 'max-width') return max;\n const duration = durations[index % durations.length] ?? 0;\n const delay = delays[index % delays.length] ?? 0;\n return Math.max(max, duration + delay, 0);\n }, 0);\n}\n\n/** True when the drawer clip is fully closed — safe to skip painting slot content. */\nexport function panelToolsDrawerResting(open: boolean, motion: PanelToolsMotion): boolean {\n return !open && motion === 'idle';\n}\n\n/** True only when the animated clip has reached the terminal width for its motion phase. */\nexport function panelToolsDrawerAtTerminal(\n width: number,\n targetWidth: number,\n motion: PanelToolsMotion\n): boolean {\n if (motion === 'closing') return width <= 0.5;\n if (motion === 'opening') return targetWidth > 0 && width >= targetWidth - 0.5;\n return true;\n}\n\n/** Toggle or switch rail tool selection — repeat activation closes the active tool. */\nexport function resolvePanelToolActivation(\n open: boolean,\n activeTool: PanelToolsToolId | '',\n id: PanelToolsToolId\n): { open: boolean; activeTool: PanelToolsToolId; selected: boolean } {\n if (open && activeTool === id) {\n return { open: false, activeTool: id, selected: false };\n }\n return { open: true, activeTool: id, selected: true };\n}\n","@import '../../utils/control-density.css';\n@import '../../utils/chrome-layout.css';\n@import '../../utils/focus-ring.css';\n@import '../../utils/interaction-fill.css';\n@import '../../utils/scrollbar-hidden.css';\n\n:host {\n display: block;\n flex: 0 0 auto;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n --_panel-tools-rail-width: var(--dimension-size-600);\n --_panel-tools-drawer-width: var(--ds-shell-panel-tools-width, var(--dimension-panel-width-xs));\n --_panel-tools-border: var(--dimension-stroke-width-012, 1px) solid var(--color-border-tertiary);\n /* Match panel-nav expand timing (medium-1); easing differs by direction. */\n --_panel-tools-expand-dur: var(--effect-animation-duration-medium-1, 300ms);\n}\n\n.panel-tools__layout {\n display: flex;\n flex-direction: row-reverse;\n align-items: stretch;\n height: 100%;\n min-height: 0;\n box-sizing: border-box;\n}\n\n/* Clip frame — only max-width animates (slide reveal, same as pre-rail :host). */\n.panel-tools__drawer {\n flex: 0 0 auto;\n max-width: 0;\n min-width: 0;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n box-sizing: border-box;\n transition: none;\n}\n\n:host(.panel-tools--ready) .panel-tools__drawer {\n transition: max-width var(--_panel-tools-expand-dur)\n var(--effect-animation-easing-ease-in-out, ease);\n}\n\n:host(.panel-tools--ready.panel-tools--motion-opening) .panel-tools__drawer {\n transition: max-width var(--_panel-tools-expand-dur)\n var(--effect-animation-easing-ease-out, ease-out);\n}\n\n:host(.panel-tools--ready.panel-tools--motion-closing) .panel-tools__drawer {\n transition: max-width var(--_panel-tools-expand-dur)\n var(--effect-animation-easing-ease-in, ease-in);\n}\n\n:host(.panel-tools--open) .panel-tools__drawer {\n max-width: var(--_panel-tools-drawer-width);\n}\n\n.panel-tools__drawer--visible {\n border-left: var(--_panel-tools-border);\n}\n\n/* Fixed-width surface — ShellApp supplies the standard 300px tools width. */\n.panel-tools__drawer-surface {\n display: flex;\n flex-direction: column;\n width: var(--_panel-tools-drawer-width);\n height: 100%;\n min-height: 0;\n box-sizing: border-box;\n background-color: transparent;\n}\n\n.panel-tools__full-views,\n.panel-tools__full-view {\n flex: 1 1 auto;\n min-height: 0;\n overflow: hidden;\n}\n\n.panel-tools__full-view {\n height: 100%;\n}\n\n.panel-tools__full-view {\n display: none;\n}\n.panel-tools__full-view--active {\n display: block;\n}\n\n:host([presentation='fullscreen']) {\n height: 100vh;\n inset: 0;\n position: fixed;\n width: 100vw;\n z-index: var(--dimension-z-index-modal);\n}\n\n:host([presentation='fullscreen']) .panel-tools__rail {\n display: none;\n}\n:host([presentation='fullscreen']) .panel-tools__drawer {\n max-width: 100vw;\n transition: none;\n width: 100vw;\n}\n:host([presentation='fullscreen']) .panel-tools__drawer--visible {\n border-left: none;\n}\n:host([presentation='fullscreen']) .panel-tools__drawer-surface {\n background-color: transparent;\n width: 100vw;\n}\n\n/*\n * A framework can update the reflected presentation attribute before Stencil\n * commits the matching render class. Conceal that single inconsistent frame so\n * slotted master/detail content never paints against the previous geometry.\n */\n:host([presentation='fullscreen']:not(.panel-tools--fullscreen)) .panel-tools__drawer-surface,\n:host(.panel-tools--fullscreen:not([presentation='fullscreen'])) .panel-tools__drawer-surface {\n visibility: hidden;\n}\n\n:host(.panel-tools--presentation-snap) .panel-tools__drawer {\n transition: none;\n}\n\n.panel-tools__body {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n position: relative;\n}\n\n/* Skip paint while fully closed; cleared during open/close motion for WYSIWYG slide. */\n:host(.panel-tools--drawer-resting) .panel-tools__body {\n content-visibility: auto;\n contain-intrinsic-size: auto 200px;\n}\n\n.panel-tools__view {\n display: none;\n height: 100%;\n min-height: 0;\n box-sizing: border-box;\n padding: var(--dimension-space-200);\n color: var(--color-foreground-secondary);\n font-family: var(--typography-font-family-ui);\n font-size: var(--typography-fontsize-md);\n line-height: var(--typography-lineheight-md);\n font-weight: var(--typography-weight-regular);\n letter-spacing: var(--typography-letterspacing-negative-half);\n}\n\n.panel-tools__view ::slotted(*) {\n margin: 0;\n color: var(--color-foreground-secondary);\n font-family: var(--typography-font-family-ui);\n font-size: var(--typography-fontsize-md);\n line-height: var(--typography-lineheight-md);\n font-weight: var(--typography-weight-regular);\n letter-spacing: var(--typography-letterspacing-negative-half);\n}\n\n.panel-tools__view--active {\n display: block;\n}\n\n/* Rail — mirrors collapsed panel-nav width, padding, and item rhythm. */\n.panel-tools__rail {\n flex: 0 0 var(--_panel-tools-rail-width);\n width: var(--_panel-tools-rail-width);\n min-width: var(--_panel-tools-rail-width);\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n border-left: var(--_panel-tools-border);\n background-color: transparent;\n}\n\n.panel-tools__rail-header {\n justify-content: center;\n height: var(--dimension-size-600);\n flex-shrink: 0;\n border-bottom: var(--_panel-tools-border);\n}\n\n.panel-tools__rail-header.panel-tools__rail-section--stacked {\n height: auto;\n min-height: var(--dimension-size-600);\n}\n\n.panel-tools__rail-body {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.panel-tools__rail-actions {\n display: flex;\n flex-direction: column;\n gap: var(--dimension-space-050);\n width: 100%;\n}\n\n/* Flush to the bottom of the rail — mirrors Search header pin. */\n.panel-tools__rail-footer {\n justify-content: center;\n flex-shrink: 0;\n margin-top: auto;\n}\n\n.panel-tools__rail-section--stacked {\n align-items: stretch;\n}\n\n.panel-tools__rail-action {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: var(--ds-control-height);\n flex-shrink: 0;\n}\n\n.panel-tools__accessory {\n display: flex;\n flex-direction: column;\n flex: 0 0 calc(var(--dimension-size-400) * 2);\n box-sizing: border-box;\n width: 100%;\n min-height: calc(var(--dimension-size-400) * 2);\n}\n\n.panel-tools__accessory--shortcut {\n flex-basis: var(--dimension-size-400);\n min-width: var(--dimension-size-400);\n min-height: var(--dimension-size-400);\n}\n\n.panel-tools__accessory--shortcut > ds-tooltip {\n display: flex;\n flex: 1 1 auto;\n width: 100%;\n min-height: 0;\n}\n\n.panel-tools__accessory--transient {\n align-items: center;\n gap: var(--dimension-space-100);\n width: var(--dimension-size-400);\n height: calc(var(--dimension-size-400) * 2);\n min-height: calc(var(--dimension-size-400) * 2);\n padding: var(--dimension-space-050);\n border-radius: var(--dimension-radius-half);\n}\n\n.panel-tools__accessory--transient-active {\n background-color: var(--color-background-bold-brand);\n}\n\n.panel-tools__accessory--transient-positive {\n background-color: var(--color-background-bold-positive);\n}\n\n.panel-tools__accessory--transient > ds-tooltip {\n display: flex;\n flex: 0 0 var(--dimension-size-300);\n width: var(--dimension-size-300);\n height: var(--dimension-size-300);\n min-height: var(--dimension-size-300);\n}\n\n.panel-tools__shortcut {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--dimension-radius-half);\n color: var(--color-foreground-secondary);\n background: transparent;\n font: inherit;\n}\n\n.panel-tools__shortcut:disabled {\n color: var(--color-foreground-disabled);\n cursor: not-allowed;\n}\n\n.panel-tools__shortcut-content {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--dimension-size-400);\n height: var(--dimension-size-400);\n}\n\n.panel-tools__shortcut-orb {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: var(--dimension-size-300);\n height: var(--dimension-size-300);\n border: var(--dimension-stroke-width-012) solid var(--color-border-secondary);\n border-radius: var(--dimension-radius-half);\n background: transparent;\n}\n\n.panel-tools__shortcut-dot {\n position: absolute;\n inset-block-start: calc((var(--dimension-size-400) - var(--dimension-iconography-md)) / 2);\n inset-inline-end: calc((var(--dimension-size-400) - var(--dimension-iconography-md)) / 2);\n z-index: 2;\n pointer-events: none;\n}\n\n.panel-tools__accessory-primary {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: var(--dimension-size-300);\n height: var(--dimension-size-300);\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--dimension-radius-half);\n color: var(--color-foreground-on-bold-background-secondary);\n background: transparent;\n font: inherit;\n --ds-interaction-border-width: var(--dimension-stroke-width-012);\n --ds-interaction-border-color: var(--color-border-on-bold-background-secondary);\n}\n\n.panel-tools__accessory-primary:disabled {\n color: var(--color-foreground-on-bold-background-quaternary);\n cursor: not-allowed;\n}\n\n.panel-tools__accessory-primary-content {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.panel-tools__accessory-image,\n.panel-tools__accessory-initial {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n border-radius: var(--dimension-radius-half);\n}\n\n.panel-tools__accessory-image {\n object-fit: cover;\n}\n\n.panel-tools__accessory-initial {\n color: inherit;\n background: transparent;\n}\n\n.panel-tools__accessory-secondary {\n display: inline-flex;\n flex: 0 0 var(--dimension-size-300);\n width: var(--dimension-size-300);\n height: var(--dimension-size-300);\n}\n\n.panel-tools__accessory-divider {\n flex: 0 0 auto;\n box-sizing: border-box;\n width: 100%;\n padding-block: var(--dimension-space-050);\n}\n\n.panel-tools__accessory-divider ds-divider {\n display: block;\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host(.panel-tools--ready.panel-tools--motion-opening) .panel-tools__drawer,\n :host(.panel-tools--ready.panel-tools--motion-closing) .panel-tools__drawer {\n transition: none;\n }\n}\n","import {\n Component,\n Prop,\n Event,\n EventEmitter,\n Element,\n State,\n Watch,\n Method,\n Listen,\n h,\n Host,\n} from '@stencil/core';\nimport type { ChromeTransitionDetail } from '../../shell/chrome-transition';\nimport {\n PANEL_TOOLS_LABELS,\n PANEL_TOOLS_SHORTCUTS,\n type PanelToolsHeaderAction,\n type PanelToolsHeaderActionDetail,\n type PanelToolsHeaderConfig,\n type PanelToolsHeaders,\n type PanelToolsItem,\n type PanelToolsRailAccessory,\n type PanelToolsRailAccessoryAction,\n type PanelToolsRailAccessoryActionDetail,\n type PanelToolsRailShortcutAccessory,\n type PanelToolsRailTransientAccessory,\n type PanelToolsToolId,\n} from './panel-tools-types';\nimport {\n isPanelToolsToolId,\n orderPanelToolsRailEntries,\n orderPanelToolsItems,\n panelToolsRailAccessoryActionDetail,\n panelToolsRailFocusKeys,\n panelToolsDrawerAtTerminal,\n panelToolsDrawerResting,\n panelToolsDrawerTransitionMs,\n panelToolsRailPlacement,\n reconcilePanelToolsAvailability,\n reconcilePanelToolsRovingIndex,\n resolvePanelToolActivation,\n type PanelToolsRailEntry,\n} from './panel-tools-utils';\n\n@Component({\n tag: 'ds-panel-tools',\n styleUrl: 'PanelTools.css',\n shadow: true,\n})\nexport class PanelTools {\n @Element() el!: HTMLElement;\n\n /** When false, only the icon rail is shown. */\n @Prop({ mutable: true, reflect: true }) open: boolean = false;\n\n /** Drawer presentation or viewport-covering presentation for the active tool. */\n @Prop({ mutable: true, reflect: true }) presentation: 'drawer' | 'fullscreen' = 'drawer';\n\n /** Let a fullscreen product supply independent master/detail headers inside its view. */\n @Prop({ attribute: 'fullscreen-header-mode', reflect: true })\n fullscreenHeaderMode: 'shared' | 'split' = 'shared';\n\n /** Active tool view — `search`, `agents`, `messages`, `stacks`, `activity`, or `help`. */\n @Prop({ mutable: true, attribute: 'active-tool', reflect: true })\n activeTool: PanelToolsToolId | '' = '';\n\n /**\n * Rail items rendered in the right column.\n * Set via JS property: `el.items = [...]`. Replace the array reference to update.\n */\n @Prop() items: PanelToolsItem[] = [];\n\n /**\n * Desktop/tablet-only application-owned rail boundaries and direct intents.\n * Set via JS property and replace the array reference to update.\n */\n @Prop() accessories: PanelToolsRailAccessory[] = [];\n\n @Prop() toolsLabel: string = 'Tools';\n @Prop() toolShortcutsLabel: string = 'Tool shortcuts';\n\n /** Active header state per tool. Replace the object when title, depth, or actions change. */\n @Prop() headers: PanelToolsHeaders = {};\n\n /**\n * Optional localStorage key for the last active tool. The drawer always starts\n * closed; only the tool identity is restored for continuity within this browser.\n */\n @Prop({ attribute: 'storage-key' }) storageKey: string = '';\n\n /** Emitted when a rail button is toggled. Detail = { id, selected }. */\n @Event({ bubbles: true, composed: true }) dsToolChange!: EventEmitter<{\n id: PanelToolsToolId;\n selected: boolean;\n }>;\n\n /** Emitted when fullscreen changes, including Escape-initiated exits. */\n @Event({ bubbles: true, composed: true }) dsPresentationChange!: EventEmitter<{\n presentation: 'drawer' | 'fullscreen';\n }>;\n\n /** Requests navigation to the active tool's parent view. */\n @Event({ bubbles: true, composed: true }) dsHeaderBack!: EventEmitter<{\n tool: PanelToolsToolId;\n }>;\n\n /** Requests one application-owned action from the active tool header. */\n @Event({ bubbles: true, composed: true })\n dsHeaderAction!: EventEmitter<PanelToolsHeaderActionDetail>;\n\n /** Direct accessory intent. Emitting this event never changes the active tool or drawer. */\n @Event({ bubbles: true, composed: true })\n dsRailAccessoryAction!: EventEmitter<PanelToolsRailAccessoryActionDetail>;\n\n /** Bubbling lifecycle — `ds-bar-nav` defers overflow checks during drawer motion. */\n @Event({ bubbles: true, composed: true })\n dsChromeTransitionStart!: EventEmitter<ChromeTransitionDetail>;\n\n @Event({ bubbles: true, composed: true })\n dsChromeTransitionEnd!: EventEmitter<ChromeTransitionDetail>;\n\n /** Arms open vs close easing for the in-flight width transition. */\n @State() private motion: 'opening' | 'closing' | 'idle' = 'idle';\n\n /** Keeps header and slotted content painted until the closing clip transition completes. */\n @State() private drawerSurfaceRetained = false;\n\n /** Suppresses width transition until the host has painted its initial open state. */\n @State() private readyForMotion = false;\n\n /** Fullscreen presentation changes snap without borrowing drawer width motion. */\n @State() private presentationMotionSuppressed = false;\n\n @State() private rovingIndex = 0;\n @State() private fullViewToolIds: PanelToolsToolId[] = [];\n @State() private railBodyScrollable = false;\n\n private motionEnableGeneration = 0;\n private presentationMotionGeneration = 0;\n private transitionGeneration = 0;\n private transitionFallbackTimer: number | null = null;\n /** Ignores the old transition's terminal event when reversing direction. */\n private ignoreReplacementTerminal = false;\n private focusBeforeFullscreen: HTMLElement | null = null;\n private fullViewObserver: MutationObserver | null = null;\n private railBodyEl?: HTMLElement;\n private railBodyObserver?: ResizeObserver;\n\n private get railItems(): PanelToolsItem[] {\n return this.items ?? [];\n }\n\n private get orderedRailItems(): PanelToolsItem[] {\n return orderPanelToolsItems(this.railItems);\n }\n\n private get railAccessories(): PanelToolsRailAccessory[] {\n return this.accessories ?? [];\n }\n\n private get orderedRailEntries(): PanelToolsRailEntry[] {\n return orderPanelToolsRailEntries(this.railItems, this.railAccessories);\n }\n\n disconnectedCallback() {\n this.el.removeEventListener('transitionend', this.handleTransitionEnd);\n this.el.removeEventListener('transitioncancel', this.handleTransitionEnd);\n this.el.removeEventListener('dsAction', this.handleComposedHeaderAction);\n this.clearTransitionCompletion();\n this.motionEnableGeneration += 1;\n this.fullViewObserver?.disconnect();\n this.fullViewObserver = null;\n this.disconnectRailBodyObserver();\n }\n\n @Watch('presentation')\n presentationChanged(next: 'drawer' | 'fullscreen', previous?: 'drawer' | 'fullscreen') {\n if (next === previous) return;\n // Framework property bindings can update slotted master/detail content in\n // the same render that requests fullscreen. Reflect the host selector\n // immediately so that content cannot paint once in the drawer geometry\n // while Stencil waits to commit its next render.\n if (this.el.getAttribute('presentation') !== next) {\n this.el.setAttribute('presentation', next);\n }\n const presentationGeneration = ++this.presentationMotionGeneration;\n this.presentationMotionSuppressed = true;\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (presentationGeneration !== this.presentationMotionGeneration) return;\n this.presentationMotionSuppressed = false;\n });\n });\n if (next === 'fullscreen') {\n this.focusBeforeFullscreen =\n document.activeElement instanceof HTMLElement ? document.activeElement : null;\n this.open = true;\n } else if (previous === 'fullscreen') {\n const focusBeforeFullscreen = this.focusBeforeFullscreen;\n const fallbackActionId = this.activeHeader().actions?.[0]?.id;\n requestAnimationFrame(async () => {\n if (focusBeforeFullscreen?.isConnected) {\n focusBeforeFullscreen.focus({ preventScroll: true });\n }\n const focusRestored = focusBeforeFullscreen\n ? document.activeElement === focusBeforeFullscreen ||\n focusBeforeFullscreen.contains(document.activeElement)\n : false;\n if (!focusRestored && fallbackActionId) await this.focusHeaderAction(fallbackActionId);\n this.focusBeforeFullscreen = null;\n });\n }\n this.dsPresentationChange.emit({ presentation: next });\n }\n\n @Listen('keydown', { target: 'window', capture: true })\n handleFullscreenEscape(event: KeyboardEvent) {\n if (this.presentation !== 'fullscreen' || event.key !== 'Escape') return;\n event.preventDefault();\n event.stopPropagation();\n this.presentation = 'drawer';\n }\n\n private deferMotionEnable() {\n if (this.readyForMotion) return;\n const generation = ++this.motionEnableGeneration;\n requestAnimationFrame(() => {\n if (generation !== this.motionEnableGeneration) return;\n requestAnimationFrame(() => {\n if (generation !== this.motionEnableGeneration) return;\n this.readyForMotion = true;\n });\n });\n }\n\n connectedCallback() {\n this.el.addEventListener('transitionend', this.handleTransitionEnd);\n this.el.addEventListener('transitioncancel', this.handleTransitionEnd);\n this.el.addEventListener('dsAction', this.handleComposedHeaderAction);\n }\n\n private handleComposedHeaderAction = (event: Event) => {\n const detail = (event as CustomEvent<{ id?: string; anchor?: HTMLElement }>).detail;\n if (!this.activeTool || !detail?.id) return;\n event.stopPropagation();\n this.dsHeaderAction.emit({\n tool: this.activeTool,\n id: detail.id,\n anchor: detail.anchor,\n });\n };\n\n componentWillLoad() {\n this.restoreLastActiveTool();\n this.drawerSurfaceRetained = this.open;\n }\n\n @Watch('open')\n openChanged(isOpen: boolean, wasOpen?: boolean) {\n if (isOpen) this.drawerSurfaceRetained = true;\n if (this.readyForMotion && wasOpen !== undefined && wasOpen !== isOpen) {\n this.startDrawerTransition(isOpen ? 'opening' : 'closing');\n } else if (!isOpen) {\n this.drawerSurfaceRetained = false;\n }\n this.deferMotionEnable();\n }\n\n @Watch('activeTool')\n activeToolChanged() {\n this.persistLastActiveTool();\n this.deferMotionEnable();\n }\n\n @Watch('storageKey')\n storageKeyChanged() {\n this.restoreLastActiveTool();\n }\n\n componentDidLoad() {\n this.deferMotionEnable();\n this.connectRailBodyObserver();\n this.updateRailBodyScrollable();\n this.syncFullViewTools();\n this.fullViewObserver = new MutationObserver(() => this.syncFullViewTools());\n this.fullViewObserver.observe(this.el, {\n childList: true,\n attributes: true,\n attributeFilter: ['slot'],\n });\n }\n\n componentDidRender() {\n this.updateRailBodyScrollable();\n }\n\n private connectRailBodyObserver() {\n this.disconnectRailBodyObserver();\n if (!this.railBodyEl || typeof ResizeObserver === 'undefined') return;\n this.railBodyObserver = new ResizeObserver(() => this.updateRailBodyScrollable());\n this.railBodyObserver.observe(this.railBodyEl);\n }\n\n private disconnectRailBodyObserver() {\n this.railBodyObserver?.disconnect();\n this.railBodyObserver = undefined;\n }\n\n private updateRailBodyScrollable() {\n const next = Boolean(\n this.railBodyEl && this.railBodyEl.scrollHeight > this.railBodyEl.clientHeight + 1\n );\n if (next !== this.railBodyScrollable) this.railBodyScrollable = next;\n }\n\n @Watch('items')\n itemsChanged() {\n this.rovingIndex = 0;\n this.reconcileActiveTool();\n this.deferMotionEnable();\n }\n\n @Watch('accessories')\n accessoriesChanged(\n next: PanelToolsRailAccessory[] = [],\n previous: PanelToolsRailAccessory[] = []\n ) {\n const previousKeys = panelToolsRailFocusKeys(\n orderPanelToolsRailEntries(this.railItems, previous)\n );\n const nextKeys = panelToolsRailFocusKeys(orderPanelToolsRailEntries(this.railItems, next));\n const activeElement = (this.renderRoot as ShadowRoot).activeElement as HTMLElement | null;\n const focusedKey =\n activeElement?.closest<HTMLElement>('[data-rail-focus-key]')?.dataset.railFocusKey;\n const focusedIndex = focusedKey ? previousKeys.indexOf(focusedKey) : -1;\n const currentIndex = focusedIndex >= 0 ? focusedIndex : this.rovingIndex;\n const nextIndex = reconcilePanelToolsRovingIndex(previousKeys, nextKeys, currentIndex);\n const restoreFocus = focusedIndex >= 0 && !nextKeys.includes(focusedKey ?? '');\n this.rovingIndex = nextIndex;\n if (restoreFocus && nextKeys.length) {\n requestAnimationFrame(() => this.focusRailAt(nextIndex));\n }\n }\n\n private restoreLastActiveTool() {\n if (!this.storageKey || this.activeTool) return;\n try {\n const stored = localStorage.getItem(this.storageKey);\n if (isPanelToolsToolId(stored)) this.activeTool = stored;\n } catch {\n /* localStorage unavailable */\n }\n }\n\n private persistLastActiveTool() {\n if (!this.storageKey || !this.activeTool) return;\n try {\n localStorage.setItem(this.storageKey, this.activeTool);\n } catch {\n /* unavailable */\n }\n }\n\n private clearPersistedTool() {\n if (!this.storageKey) return;\n try {\n localStorage.removeItem(this.storageKey);\n } catch {\n /* unavailable */\n }\n }\n\n private reconcileActiveTool() {\n const next = reconcilePanelToolsAvailability(this.railItems, this.open, this.activeTool);\n if (!next.removedTool) return;\n this.clearPersistedTool();\n this.open = next.open;\n this.activeTool = next.activeTool;\n this.dsToolChange.emit({ id: next.removedTool, selected: false });\n }\n\n private startDrawerTransition(phase: 'opening' | 'closing') {\n const drawer = this.renderRoot.querySelector('.panel-tools__drawer') as HTMLElement | null;\n if (this.motion !== 'idle') {\n this.finishDrawerTransition();\n this.ignoreReplacementTerminal = true;\n }\n this.motion = phase;\n this.dsChromeTransitionStart.emit({ source: 'panel-tools', phase });\n const generation = ++this.transitionGeneration;\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (generation !== this.transitionGeneration || this.motion !== phase) return;\n if (!drawer) {\n this.finishDrawerTransition();\n return;\n }\n\n if (this.drawerTransitionAtTerminal(drawer, phase)) {\n this.finishDrawerTransition();\n return;\n }\n\n const fallbackMs = panelToolsDrawerTransitionMs(getComputedStyle(drawer));\n if (fallbackMs <= 0) {\n this.finishDrawerTransition();\n return;\n }\n this.transitionFallbackTimer = window.setTimeout(() => {\n this.finishDrawerTransition();\n }, fallbackMs);\n });\n });\n }\n\n private handleTransitionEnd = (event: TransitionEvent) => {\n const drawer = this.renderRoot.querySelector('.panel-tools__drawer') as HTMLElement | null;\n if (event.target !== drawer) return;\n if (event.propertyName !== 'max-width') return;\n if (this.ignoreReplacementTerminal) {\n this.ignoreReplacementTerminal = false;\n return;\n }\n // Changing from the neutral transition recipe to the direction-specific\n // easing can cancel the transition that the reflected `open` class began.\n // The replacement transition and its watchdog still own completion; ending\n // motion here would hide the fixed-width tool surface while it is visible.\n if (event.type === 'transitioncancel') return;\n if (drawer && !this.drawerTransitionAtTerminal(drawer, this.motion)) return;\n this.finishDrawerTransition();\n };\n\n private drawerTransitionAtTerminal(\n drawer: HTMLElement,\n phase: 'opening' | 'closing' | 'idle'\n ): boolean {\n const width = drawer.getBoundingClientRect().width;\n const surface = drawer.querySelector('.panel-tools__drawer-surface') as HTMLElement | null;\n const targetWidth = surface?.getBoundingClientRect().width ?? 0;\n return panelToolsDrawerAtTerminal(width, targetWidth, phase);\n }\n\n private finishDrawerTransition() {\n const completedPhase = this.motion;\n const wasTransitioning = completedPhase !== 'idle';\n this.clearTransitionCompletion();\n if (!wasTransitioning) return;\n this.ignoreReplacementTerminal = false;\n this.motion = 'idle';\n if (completedPhase === 'closing' && !this.open) {\n this.drawerSurfaceRetained = false;\n }\n this.dsChromeTransitionEnd.emit({ source: 'panel-tools' });\n }\n\n private clearTransitionCompletion() {\n this.transitionGeneration += 1;\n if (this.transitionFallbackTimer !== null) {\n window.clearTimeout(this.transitionFallbackTimer);\n this.transitionFallbackTimer = null;\n }\n }\n\n /** Rail selection follows `open` immediately — independent of the slide animation. */\n private isRailSelected(id: PanelToolsToolId): boolean {\n return this.open && this.activeTool === id;\n }\n\n /** Drawer body stays mounted while the clip frame animates closed. */\n private isDrawerPresent(): boolean {\n return this.open || this.drawerSurfaceRetained;\n }\n\n private isViewActive(id: PanelToolsToolId): boolean {\n return this.isDrawerPresent() && this.activeTool === id;\n }\n\n private hasFullView(id: PanelToolsToolId): boolean {\n return this.fullViewToolIds.includes(id);\n }\n\n private syncFullViewTools() {\n const ids = this.orderedRailItems.map(item => item.id);\n const next = ids.filter(id => Boolean(this.el.querySelector(`[slot=\"${id}-view\"]`)));\n if (next.join('|') !== this.fullViewToolIds.join('|')) this.fullViewToolIds = next;\n }\n\n private get renderRoot(): ParentNode {\n return this.el.shadowRoot ?? this.el;\n }\n\n private headerLabel(): string {\n if (!this.isDrawerPresent() || !this.activeTool) return '';\n const item = this.railItems.find(candidate => candidate.id === this.activeTool);\n return (\n item?.label ??\n PANEL_TOOLS_LABELS[this.activeTool as keyof typeof PANEL_TOOLS_LABELS] ??\n this.activeTool\n );\n }\n\n private resolvedHeaders(): PanelToolsHeaders {\n return this.headers ?? {};\n }\n\n private activeHeader(): PanelToolsHeaderConfig {\n if (!this.activeTool) return {};\n return this.resolvedHeaders()[this.activeTool] ?? {};\n }\n\n private handleToolChange = (id: PanelToolsToolId) => {\n const next = resolvePanelToolActivation(this.open, this.activeTool, id);\n this.open = next.open;\n this.activeTool = next.activeTool;\n this.dsToolChange.emit({ id, selected: next.selected });\n };\n\n /** Toggle any rail tool open/closed — shell shortcuts K/A/S/M/N call this. */\n @Method()\n async activateTool(id: PanelToolsToolId) {\n const item = this.railItems.find(entry => entry.id === id);\n if (!item || item.isInactive) return;\n this.handleToolChange(id);\n }\n\n /** Close the tools drawer when open — used by shell keyboard shortcuts. */\n @Method()\n async closeDrawer() {\n if (!this.open) return;\n const id = this.activeTool;\n this.open = false;\n if (id) {\n this.dsToolChange.emit({ id, selected: false });\n }\n }\n\n /** Focus an active tool-header action by its application-owned id. */\n @Method()\n async focusHeaderAction(id: string) {\n const action = this.renderRoot.querySelector(`[data-header-action-id=\"${CSS.escape(id)}\"]`) as\n | (HTMLElement & { setFocus?: () => Promise<void> })\n | null;\n await action?.setFocus?.();\n }\n\n private focusRailAt(index: number) {\n const keys = panelToolsRailFocusKeys(this.orderedRailEntries);\n if (!keys.length) return;\n const bounded = Math.max(0, Math.min(index, keys.length - 1));\n this.rovingIndex = bounded;\n const action = this.renderRoot.querySelector(\n `[data-rail-focus-key=\"${CSS.escape(keys[bounded])}\"]`\n ) as (HTMLElement & { setFocus?: () => Promise<void> }) | null;\n if (action?.setFocus) {\n void action.setFocus();\n } else {\n action?.focus({ preventScroll: true });\n }\n }\n\n private handleRailKeyDown = (e: KeyboardEvent, index: number, activate?: () => void) => {\n const keys = panelToolsRailFocusKeys(this.orderedRailEntries);\n if (!keys.length) return;\n\n if ((e.key === 'Enter' || e.key === ' ') && activate) {\n e.preventDefault();\n activate();\n return;\n }\n\n if (e.key === 'ArrowDown') {\n if (index >= keys.length - 1) return;\n e.preventDefault();\n this.focusRailAt(index + 1);\n return;\n }\n\n if (e.key === 'ArrowUp') {\n if (index <= 0) return;\n e.preventDefault();\n this.focusRailAt(index - 1);\n }\n };\n\n private renderRailAction(item: PanelToolsItem, index: number) {\n const focusKey = `tool:${item.id}`;\n const label =\n item.ariaLabel ??\n item.label ??\n PANEL_TOOLS_LABELS[item.id as keyof typeof PANEL_TOOLS_LABELS] ??\n item.id;\n return (\n <ds-tooltip\n key={item.id}\n label={label}\n shortcutKey={\n item.shortcutKey ?? PANEL_TOOLS_SHORTCUTS[item.id as keyof typeof PANEL_TOOLS_SHORTCUTS]\n }\n side=\"left\"\n size=\"sm\"\n boundary=\"viewport\"\n >\n <ds-button-unfilled\n variant=\"icon\"\n class=\"panel-tools__rail-action\"\n icon={item.icon}\n isActive={this.isRailSelected(item.id)}\n activeFill={false}\n hasBorder={false}\n pressScale={false}\n dot={item.dot ?? false}\n isInactive={item.isInactive}\n focusTabIndex={index === this.rovingIndex ? 0 : -1}\n data-rail-focus-key={focusKey}\n aria-label={label}\n pressed={this.isRailSelected(item.id)}\n onFocusin={() => {\n this.rovingIndex = index;\n }}\n onKeyDown={(e: KeyboardEvent) =>\n this.handleRailKeyDown(e, index, () => this.handleToolChange(item.id))\n }\n onDsClick={() => this.handleToolChange(item.id)}\n />\n </ds-tooltip>\n );\n }\n\n private accessoryPrimaryLabel(accessory: PanelToolsRailTransientAccessory): string {\n const actionLabel = accessory.primaryAction.ariaLabel?.trim() || accessory.ariaLabel;\n const status = accessory.statusText.trim();\n return status ? `${actionLabel}. ${status}` : actionLabel;\n }\n\n private emitAccessoryAction(\n accessoryId: string,\n action: PanelToolsRailAccessoryAction,\n anchor: HTMLElement\n ) {\n if (action.isInactive) return;\n this.dsRailAccessoryAction.emit(\n panelToolsRailAccessoryActionDetail(accessoryId, action.id, anchor)\n );\n }\n\n private renderAccessoryVisual(accessory: PanelToolsRailTransientAccessory) {\n if (accessory.visual.type === 'image') {\n return (\n <img\n class=\"panel-tools__accessory-image\"\n src={accessory.visual.src}\n alt=\"\"\n aria-hidden=\"true\"\n />\n );\n }\n if (accessory.visual.type === 'initial') {\n const initial = [...accessory.visual.initial.trim()].slice(0, 2).join('');\n return (\n <ds-text\n class=\"panel-tools__accessory-initial\"\n as=\"span\"\n variant=\"text-caption\"\n emphasis\n color=\"inherit\"\n aria-hidden=\"true\"\n >\n {initial}\n </ds-text>\n );\n }\n return <ds-icon name={accessory.visual.icon} size=\"sm\" aria-hidden=\"true\" />;\n }\n\n private renderRailShortcut(\n accessory: PanelToolsRailShortcutAccessory,\n focusIndexes: Map<string, number>\n ) {\n const focusKey = `accessory:${accessory.id}:${accessory.action.id}`;\n const focusIndex = focusIndexes.get(focusKey);\n const label = accessory.action.ariaLabel?.trim() || accessory.ariaLabel;\n const initials = [...accessory.initials.trim()].slice(0, 2).join('');\n\n return (\n <div\n key={`accessory:${accessory.id}`}\n class=\"panel-tools__accessory panel-tools__accessory--shortcut\"\n >\n <ds-tooltip label={label} side=\"left\" size=\"sm\" boundary=\"viewport\">\n <button\n type=\"button\"\n class=\"panel-tools__shortcut ds-focus-ring-inset ds-interaction-fill\"\n disabled={accessory.action.isInactive}\n tabIndex={focusIndex === this.rovingIndex ? 0 : -1}\n data-rail-focus-key={focusKey}\n aria-label={label}\n onFocus={() => {\n if (focusIndex !== undefined) this.rovingIndex = focusIndex;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n focusIndex === undefined ? undefined : this.handleRailKeyDown(event, focusIndex)\n }\n onClick={(event: MouseEvent) =>\n this.emitAccessoryAction(\n accessory.id,\n accessory.action,\n event.currentTarget as HTMLElement\n )\n }\n >\n <span class=\"panel-tools__shortcut-content ds-interaction-fill__content\">\n <ds-text\n class=\"panel-tools__shortcut-orb\"\n as=\"span\"\n variant=\"text-caption\"\n emphasis\n color=\"inherit\"\n >\n {initials}\n </ds-text>\n {accessory.dot ? (\n <ds-badge\n class=\"panel-tools__shortcut-dot\"\n variant=\"dot\"\n background=\"var(--color-background-secondary)\"\n aria-hidden=\"true\"\n />\n ) : null}\n </span>\n </button>\n </ds-tooltip>\n </div>\n );\n }\n\n private renderRailAccessory(\n accessory: PanelToolsRailAccessory,\n focusIndexes: Map<string, number>\n ) {\n if (accessory.type === 'divider') {\n return (\n <div\n key={`accessory:${accessory.id}`}\n class=\"panel-tools__accessory-divider\"\n aria-hidden=\"true\"\n >\n <ds-divider />\n </div>\n );\n }\n\n if (accessory.type === 'shortcut') {\n return this.renderRailShortcut(accessory, focusIndexes);\n }\n\n const primaryKey = `accessory:${accessory.id}:${accessory.primaryAction.id}`;\n const primaryIndex = focusIndexes.get(primaryKey);\n const primaryLabel = this.accessoryPrimaryLabel(accessory);\n const secondary = accessory.secondaryAction;\n const secondaryKey = secondary ? `accessory:${accessory.id}:${secondary.id}` : '';\n const secondaryIndex = secondary ? focusIndexes.get(secondaryKey) : undefined;\n\n return (\n <div\n key={`accessory:${accessory.id}`}\n class={{\n 'panel-tools__accessory': true,\n 'panel-tools__accessory--transient': true,\n 'panel-tools__accessory--transient-active': accessory.statusTone === 'active',\n 'panel-tools__accessory--transient-positive': accessory.statusTone === 'positive',\n }}\n >\n <ds-tooltip label={primaryLabel} side=\"left\" size=\"sm\" boundary=\"viewport\">\n <button\n type=\"button\"\n class=\"panel-tools__accessory-primary ds-focus-ring-inset ds-interaction-fill ds-interaction-fill--on-bold\"\n disabled={accessory.primaryAction.isInactive}\n tabIndex={primaryIndex === this.rovingIndex ? 0 : -1}\n data-rail-focus-key={primaryKey}\n aria-label={primaryLabel}\n onFocus={() => {\n if (primaryIndex !== undefined) this.rovingIndex = primaryIndex;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n primaryIndex === undefined ? undefined : this.handleRailKeyDown(event, primaryIndex)\n }\n onClick={(event: MouseEvent) =>\n this.emitAccessoryAction(\n accessory.id,\n accessory.primaryAction,\n event.currentTarget as HTMLElement\n )\n }\n >\n <span class=\"panel-tools__accessory-primary-content ds-interaction-fill__content\">\n {this.renderAccessoryVisual(accessory)}\n </span>\n </button>\n </ds-tooltip>\n {secondary ? (\n <ds-tooltip label={secondary.ariaLabel} side=\"left\" size=\"sm\" boundary=\"viewport\">\n <ds-button-unfilled\n class=\"panel-tools__accessory-secondary\"\n variant=\"icon\"\n size=\"sm\"\n rounded\n background=\"bold\"\n hasBorder={false}\n icon={secondary.icon}\n isInactive={secondary.isInactive}\n focusTabIndex={secondaryIndex === this.rovingIndex ? 0 : -1}\n data-rail-focus-key={secondaryKey}\n aria-label={secondary.ariaLabel}\n onFocusin={() => {\n if (secondaryIndex !== undefined) this.rovingIndex = secondaryIndex;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n secondaryIndex === undefined\n ? undefined\n : this.handleRailKeyDown(event, secondaryIndex)\n }\n onDsClick={(event: CustomEvent<MouseEvent>) =>\n this.emitAccessoryAction(\n accessory.id,\n secondary,\n event.currentTarget as HTMLElement\n )\n }\n />\n </ds-tooltip>\n ) : null}\n </div>\n );\n }\n\n private renderRailEntry(entry: PanelToolsRailEntry, focusIndexes: Map<string, number>) {\n if (entry.type === 'tool') {\n return this.renderRailAction(entry.item, focusIndexes.get(`tool:${entry.id}`) ?? 0);\n }\n return this.renderRailAccessory(entry.accessory, focusIndexes);\n }\n\n render() {\n const headerLabel = this.headerLabel();\n const header = this.activeHeader();\n const headerTitle = header.title?.trim() || headerLabel;\n const headerActions = header.actions ?? [];\n const orderedRailItems = this.orderedRailItems;\n const orderedRailEntries = this.orderedRailEntries;\n const entryPlacement = (entry: PanelToolsRailEntry) =>\n entry.type === 'tool' ? panelToolsRailPlacement(entry.item) : entry.accessory.railPlacement;\n const headerEntries = orderedRailEntries.filter(entry => entryPlacement(entry) === 'header');\n const bodyEntries = orderedRailEntries.filter(entry => entryPlacement(entry) === 'body');\n const footerEntries = orderedRailEntries.filter(entry => entryPlacement(entry) === 'footer');\n const focusIndexes = new Map(\n panelToolsRailFocusKeys(orderedRailEntries).map((key, index) => [key, index])\n );\n const showDrawerChrome = this.isDrawerPresent();\n const drawerResting = panelToolsDrawerResting(this.open, this.motion);\n const activeFullView = Boolean(\n showDrawerChrome && this.activeTool && this.hasFullView(this.activeTool)\n );\n const toolIds = orderedRailItems.map(item => item.id);\n\n return (\n <Host\n class={{\n 'panel-tools': true,\n 'panel-tools--open': this.open,\n 'panel-tools--ready': this.readyForMotion,\n 'panel-tools--motion-opening': this.motion === 'opening',\n 'panel-tools--motion-closing': this.motion === 'closing',\n 'panel-tools--drawer-resting': drawerResting,\n 'panel-tools--fullscreen': this.presentation === 'fullscreen',\n 'panel-tools--presentation-snap': this.presentationMotionSuppressed,\n }}\n role={this.presentation === 'fullscreen' ? 'dialog' : 'complementary'}\n aria-modal={this.presentation === 'fullscreen' ? 'true' : undefined}\n aria-label={this.toolsLabel}\n >\n <div class=\"panel-tools__layout\">\n <nav class=\"panel-tools__rail\" aria-label={this.toolShortcutsLabel}>\n {headerEntries.length ? (\n <div\n class={{\n 'panel-tools__rail-header': true,\n 'panel-tools__rail-section--stacked': headerEntries.length > 1,\n 'ds-chrome-row': headerEntries.length === 1,\n 'ds-chrome-column': headerEntries.length > 1,\n 'ds-chrome-space--md': true,\n }}\n >\n {headerEntries.map(entry => this.renderRailEntry(entry, focusIndexes))}\n </div>\n ) : null}\n <div\n class={{\n 'panel-tools__rail-body': true,\n 'ds-chrome-column': true,\n 'ds-chrome-space--md': true,\n 'ds-scrollbar-hidden': true,\n 'ds-focus-ring': this.railBodyScrollable,\n }}\n ref={element => {\n const next = (element as HTMLElement) ?? undefined;\n if (next === this.railBodyEl) return;\n this.railBodyEl = next;\n this.connectRailBodyObserver();\n }}\n role={this.railBodyScrollable ? 'region' : undefined}\n aria-label={this.railBodyScrollable ? this.toolShortcutsLabel : undefined}\n tabIndex={this.railBodyScrollable ? 0 : undefined}\n >\n <div class=\"panel-tools__rail-actions\">\n {bodyEntries.map(entry => this.renderRailEntry(entry, focusIndexes))}\n </div>\n </div>\n {footerEntries.length ? (\n <div\n class={{\n 'panel-tools__rail-footer': true,\n 'panel-tools__rail-section--stacked': footerEntries.length > 1,\n 'ds-chrome-row': footerEntries.length === 1,\n 'ds-chrome-column': footerEntries.length > 1,\n 'ds-chrome-space--md': true,\n }}\n >\n {footerEntries.map(entry => this.renderRailEntry(entry, focusIndexes))}\n </div>\n ) : null}\n </nav>\n\n <div\n class={{\n 'panel-tools__drawer': true,\n 'panel-tools__drawer--visible': showDrawerChrome,\n }}\n aria-hidden={showDrawerChrome ? null : 'true'}\n inert={showDrawerChrome ? undefined : true}\n >\n <div class=\"panel-tools__drawer-surface\">\n {this.presentation !== 'fullscreen' || this.fullscreenHeaderMode === 'shared' ? (\n <ds-panel-tool-header\n class=\"panel-tools__header\"\n heading={headerTitle}\n showBack={header.showBack ?? false}\n backIcon={header.backIcon || 'ChevronLeft'}\n backAriaLabel={header.backAriaLabel || 'Back'}\n showMenu={false}\n ref={element => {\n const toolHeader = element as\n | (HTMLDsPanelToolHeaderElement & {\n actions: PanelToolsHeaderAction[];\n })\n | undefined;\n if (toolHeader) toolHeader.actions = headerActions;\n }}\n onDsBack={() => {\n if (this.activeTool) this.dsHeaderBack.emit({ tool: this.activeTool });\n }}\n />\n ) : null}\n <div class=\"panel-tools__body\" hidden={activeFullView}>\n {toolIds.map(id => {\n const active = this.isViewActive(id);\n return (\n <div\n class={{\n 'panel-tools__view': true,\n 'panel-tools__view--active': active,\n }}\n hidden={!active}\n >\n <slot name={id} />\n </div>\n );\n })}\n </div>\n <div class=\"panel-tools__full-views\" hidden={!activeFullView}>\n {toolIds.map(id => (\n <div\n class={{\n 'panel-tools__full-view': true,\n 'panel-tools__full-view--active':\n this.isViewActive(id) && this.hasFullView(id),\n }}\n hidden={!(this.isViewActive(id) && this.hasFullView(id))}\n >\n <slot name={`${id}-view`} />\n </div>\n ))}\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"iYAYO,MAAMA,EAAoD,CAC/D,SACA,WACA,WACA,SACA,SACA,QAIK,MAAMC,EAAyD,SAK/D,MAAMC,EAAgE,CAC3EC,OAAQ,SACRC,SAAU,WACVC,OAAQ,SACRC,SAAU,WACVC,OAAQ,SACRC,KAAM,kBAGD,MAA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