@ds-mo/ui 14.4.0 → 14.4.1
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 +1 -1
- package/dist/agent.json +6 -5
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-title.js +1 -1
- package/dist/components/ds-bar-workflow.js +1 -1
- package/dist/components/ds-menu.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-pagination.js +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-tool-header.js +1 -1
- package/dist/components/ds-panel-tool-search.js +1 -1
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-shell-app.js +1 -1
- package/dist/components/ds-shell-page.js +1 -1
- package/dist/components/ds-shell-tools.js +1 -1
- package/dist/components/ds-swatch-picker.js +1 -1
- package/dist/components/ds-table.js +1 -1
- package/dist/components/ds-table.js.map +1 -1
- package/dist/components/ds-toast.js +1 -1
- package/dist/components/ds-typing-indicator.js +1 -1
- package/dist/components/{p-DhDWmMxD.js → p-B2hqUkg-.js} +2 -2
- package/dist/components/{p-CbqdWBAC.js → p-BGGm1NB1.js} +2 -2
- package/dist/components/{p-b-Dlg3y_.js → p-BXNLaPbw.js} +2 -2
- package/dist/components/{p-CW7ML-3h.js → p-Ba1l3Yot.js} +2 -2
- package/dist/components/{p-DF52Grw1.js → p-BiIdszv1.js} +2 -2
- package/dist/components/{p-RLiackRN.js → p-CXqVVdW2.js} +2 -2
- package/dist/components/{p-CKfdvOZ2.js → p-Ccq1RmOb.js} +2 -2
- package/dist/components/p-CvpsV-jC.js +2 -0
- package/dist/components/p-CvpsV-jC.js.map +1 -0
- package/dist/components/{p-CDF_nP74.js → p-DgWGfscR.js} +2 -2
- package/dist/components/{p-O3OuOaj3.js → p-DjqZWBnM.js} +2 -2
- package/dist/components/{p-ChWnbdFS.js → p-o1v7Choa.js} +2 -2
- package/dist/components/{p-BDXMXH_i.js → p-w64TmQd-.js} +2 -2
- package/dist/docs/components.json +8 -1
- package/dist/mcp-data/registry/pagination.json +5 -4
- package/dist/mcp-data/registry/registry.json +5 -4
- package/dist/mcp-data/registry/table.json +4 -4
- package/dist/types/components/Table/Table.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/p-Cc5xgR17.js +0 -2
- package/dist/components/p-Cc5xgR17.js.map +0 -1
- /package/dist/components/{p-DhDWmMxD.js.map → p-B2hqUkg-.js.map} +0 -0
- /package/dist/components/{p-CbqdWBAC.js.map → p-BGGm1NB1.js.map} +0 -0
- /package/dist/components/{p-b-Dlg3y_.js.map → p-BXNLaPbw.js.map} +0 -0
- /package/dist/components/{p-CW7ML-3h.js.map → p-Ba1l3Yot.js.map} +0 -0
- /package/dist/components/{p-DF52Grw1.js.map → p-BiIdszv1.js.map} +0 -0
- /package/dist/components/{p-RLiackRN.js.map → p-CXqVVdW2.js.map} +0 -0
- /package/dist/components/{p-CKfdvOZ2.js.map → p-Ccq1RmOb.js.map} +0 -0
- /package/dist/components/{p-CDF_nP74.js.map → p-DgWGfscR.js.map} +0 -0
- /package/dist/components/{p-O3OuOaj3.js.map → p-DjqZWBnM.js.map} +0 -0
- /package/dist/components/{p-ChWnbdFS.js.map → p-o1v7Choa.js.map} +0 -0
- /package/dist/components/{p-BDXMXH_i.js.map → p-w64TmQd-.js.map} +0 -0
package/dist/.package-ready.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":1,"package":"@ds-mo/ui","version":"14.4.
|
|
1
|
+
{"schemaVersion":1,"package":"@ds-mo/ui","version":"14.4.1","components":70,"digest":"b283ff73819c71c3cf07c4ff492b37c868a332d40334b7526dc378871e4dab12","completedAt":"2026-08-19T04:44:25.564Z"}
|
package/dist/agent-patterns.json
CHANGED
package/dist/agent.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"package": "@ds-mo/ui",
|
|
4
|
-
"packageVersion": "14.4.
|
|
4
|
+
"packageVersion": "14.4.1",
|
|
5
5
|
"kind": "components",
|
|
6
6
|
"entries": [
|
|
7
7
|
{
|
|
@@ -5803,7 +5803,7 @@
|
|
|
5803
5803
|
],
|
|
5804
5804
|
"accessibility": [
|
|
5805
5805
|
"The component renders a named navigation region, gives its compact page-size noun a complete accessible label, and gives every icon-only boundary control an explicit page action name.",
|
|
5806
|
-
"The visible
|
|
5806
|
+
"The visible page-size cluster states the localized noun, selected size, and total, for example Rows: 25 of 500. The page position uses compact ‘of’ phrasing, for example 1 of 20. A polite atomic status update retains the complete current range and ‘Page’ phrasing with the localized item noun.",
|
|
5807
5807
|
"Left and Right Arrow request the adjacent page while focus is within pagination navigation controls. The page-size combobox retains its own arrow-key behavior.",
|
|
5808
5808
|
"Inactive boundary controls and every control during loading remain non-interactive while retaining their accessible names."
|
|
5809
5809
|
],
|
|
@@ -5815,7 +5815,7 @@
|
|
|
5815
5815
|
"fitToPage appends a Fit to page choice. fitPageSize supplies its effective whole-item capacity; the closed trigger says Fit while the range continues to expose the resulting count. Pagination does not measure layouts itself."
|
|
5816
5816
|
],
|
|
5817
5817
|
"responsiveBehavior": [
|
|
5818
|
-
"The compact controls remain on one line with noun,
|
|
5818
|
+
"The compact controls remain on one line with noun, selected size, total, a vertical divider, and page position. When inline space is still insufficient, the pagination surface scrolls horizontally rather than wrapping labels away from their controls."
|
|
5819
5819
|
],
|
|
5820
5820
|
"frameworkCaveats": {
|
|
5821
5821
|
"customElements": [
|
|
@@ -5913,6 +5913,7 @@
|
|
|
5913
5913
|
],
|
|
5914
5914
|
"componentDependencies": [
|
|
5915
5915
|
"button-unfilled",
|
|
5916
|
+
"divider",
|
|
5916
5917
|
"select",
|
|
5917
5918
|
"text"
|
|
5918
5919
|
]
|
|
@@ -8647,14 +8648,14 @@
|
|
|
8647
8648
|
"Interactive rows are focusable as native rows, activate with Enter or Space, and do not steal activation from their nested selection or action controls.",
|
|
8648
8649
|
"Scrollable table regions become keyboard focusable and named only when overflow exists.",
|
|
8649
8650
|
"Incremental loading, newly appended row counts, failures, and end-of-results transitions are announced through a polite status region without replacing visible state. In grouped tables, announcements name the independently loading group.",
|
|
8650
|
-
"Static and infinite tables may show an optional result summary footer when displayedCount and totalCount are finite. Pagination mode instead renders a named Pagination control with compact
|
|
8651
|
+
"Static and infinite tables may show an optional result summary footer when displayedCount and totalCount are finite. Pagination mode instead renders a named Pagination control with a compact selected-size total, vertical divider, and page position; range changes are announced independently with complete phrasing. While focus is anywhere inside a paginated table, unmodified Left and Right Arrow request the adjacent page; editable fields, choice controls, sliders, and modified key combinations retain their own keyboard behavior. The footer slot can replace summary copy, while footer-leading and footer-trailing remain available in the same compact-bar anatomy."
|
|
8651
8652
|
],
|
|
8652
8653
|
"states": [
|
|
8653
8654
|
"Columns, rows, groups, grouping, sorting, selected row IDs, collapsed group IDs, dataMode, pagination, displayedCount, totalCount, and incremental-loading state are controlled inputs. Events communicate intent and never mutate those inputs. The optional header is one full-width composable table-local surface: the component owns its 48px chrome, 8px inset on every side, and sticky placement while the application owns all internal layout, controls, labels, filtering behavior, and action handling. The footer retains its compact-bar composition: application-owned leading status sits left while a controlled result summary or Pagination aligns right, before any trailing action. Content-sized tables remain natural for sparse or fixed-count results. height bounds the complete header, frame, and footer composition. fitViewport reserves the compact-state composition height in the nearest vertical scrollport while growing the visible table into that reservation as surrounding page chrome collapses.",
|
|
8654
8655
|
"Grouping supports one level. The application supplies groups in a fixed product-defined order and supplies ordered member rows independently. Group section headers show an emphasized text-body-medium label followed by a middle dot and plain secondary loaded progress, for example Critical · 50 of 166. The loaded value comes from the supplied member rows and the total comes from totalCount. A localized countLabel total phrase remains available for the complete assistive progress announcement. Groups may declare an optional intent (brand, neutral, negative, warning, caution, positive) that paints an LTR gradient from the faint intent surface at the label edge into faint neutral at the trailing edge, plus a bold intent title color. Neutral groups remain solid faint neutral. Section separators are painted inside that viewport-width surface so translucent border tokens composite with each intent background. Internal sections keep their separators; a collapsed or empty section header yields its separator only when it is the table's final rendered item. A trailing visually neutral icon-only ButtonUnfilled uses the 24px md double-inset action recipe and toggles controlled collapsedGroupIds, showing ChevronUp while expanded and ChevronDown while collapsed. While any group is expanded, a ChevronDownUp action uses the xs sort-control recipe widened to a table-owned 24px lane and collapses every group. It appears at the inline-end edge of the trailing column declared with kind action when one exists; otherwise a button-hugging 24px by 16px medium-elevation surface floats at the visible scrollport's header edge so the action remains reachable while member columns scroll beneath it. With stickyHeader enabled, each contained section uses its one real section row as a native sticky header inside its real row-group boundary. The browser therefore owns pinning, push-off, scrolling, and resize layout in one pass without a duplicated lane, active-section state, transforms, or scroll-time geometry. Shared grid tracks retain exact header and member-cell alignment. The section surface also stays pinned to the visible horizontal scrollport and spans the smaller of the visible viewport or table width.",
|
|
8655
8656
|
"An active member sort toggles only between ascending and descending; activating a different sortable label moves the one sorting state to that key. Applications may still clear the controlled sort state explicitly. Grouping does not introduce another interactive direction.",
|
|
8656
8657
|
"Compound headers can expose multiple related labels with independent sort keys. Each label owns only its content-width interaction target while the active direction remains in the column's alignment-aware sort lane.",
|
|
8657
|
-
"Initial loading defaults to ten row-shaped skeletons and preserves row dividers, column dividers, selection lanes, and sticky boundaries. Each column may declare representative text, multiline text, image, Tag, icon, action, or intentionally blank loading geometry; the table applies the matching resolved-cell padding and track anatomy so the placeholder row has the same height and rhythm as its data row. Columns without a declaration use one text line, while action columns infer an icon action placeholder. Empty, initial error, load-more, retry, loading-more, and terminal bands remain fixed to the visible table width while data columns scroll horizontally beneath them. Incremental loading retains existing rows and supports automatic sentinel, manual load-more, retry, and terminal states. When grouping is active, each expanded group owns its load band at the end of its member rows; internal group load bands keep their bottom divider, while a terminal group load band yields it to the table edge or footer. The global bottom-of-table loader is not rendered.",
|
|
8658
|
+
"Initial loading defaults to ten row-shaped skeletons and preserves row dividers, column dividers, selection lanes, and sticky boundaries. A selectable table renders a checkbox-sized control skeleton in its selection lane so loading geometry matches the real checkbox instead of a generic icon. Each column may declare representative text, multiline text, image, Tag, icon, action, or intentionally blank loading geometry; the table applies the matching resolved-cell padding and track anatomy so the placeholder row has the same height and rhythm as its data row. Columns without a declaration use one text line, while action columns infer an icon action placeholder. Empty, initial error, load-more, retry, loading-more, and terminal bands remain fixed to the visible table width while data columns scroll horizontally beneath them. Incremental loading retains existing rows and supports automatic sentinel, manual load-more, retry, and terminal states. When grouping is active, each expanded group owns its load band at the end of its member rows; internal group load bands keep their bottom divider, while a terminal group load band yields it to the table edge or footer. The global bottom-of-table loader is not rendered.",
|
|
8658
8659
|
"dataMode selects the top-level window: infinite appends ungrouped rows through dsLoadMore when hasMore is true, and pagination renders the controlled page supplied by the application and emits dsPaginationChange. Infinite mode also covers fixed result sets by leaving hasMore false. In a grouped paginated table, pagination counts and windows only parent groups; each expanded parent can still append its own members through dsGroupLoadMore. The application owns requests, cancellation, cursors, deduplication, slicing, and query identity.",
|
|
8659
8660
|
"When pagination enables Fit to page on a bounded table, the table proposes the number of complete top-level rows that fit below its column header. Grouped tables count group headers only; member rows never affect capacity. Selecting Fit captures that numeric snapshot. A changed fitIdentity requests one fresh snapshot for a new query shape, while viewport resizing alone does not change the active controlled page size.",
|
|
8660
8661
|
"Rows opt into complete-row activation with interactive and emit dsRowActivate without owning navigation. Selection paints through the shared selected ::before layer; interactive hover and press paint through the shared ::after layer.",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{B as o,d as s}from"./p-
|
|
1
|
+
import{B as o,d as s}from"./p-o1v7Choa.js";const t=o;const a=s;export{t as DsBarNav,a as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-bar-nav.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{B as
|
|
1
|
+
import{B as s,d as o}from"./p-BiIdszv1.js";const t=s;const p=o;export{t as DsBarTitle,p as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-bar-title.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as s,H as o,c as i,h as e,a as t,t as r}from"./index.js";import{d as a}from"./p-D8nnhQNJ.js";import{d as n}from"./p-DvJkkdIO.js";import{d}from"./p-CTTDiW33.js";import{d as l}from"./p-BFfLvMZd.js";import{d as c}from"./p-Ca-I2UnB.js";import{d as m}from"./p-CKfdvOZ2.js";import{d as b}from"./p-RLiackRN.js";import{d as h}from"./p-CW7ML-3h.js";import{d as w}from"./p-CDF_nP74.js";import{d as f}from"./p-Btxwp4lJ.js";import{d as p}from"./p-CbfmzgdW.js";import{d as k}from"./p-jMCRaxQW.js";import{d as u}from"./p-DZFilC--.js";import{d as g}from"./p-CtOK5oZ1.js";const v=()=>`.ds-control--lg.sc-ds-bar-workflow,.ds-control--lg.sc-ds-bar-workflow-h,.ds-control--md.sc-ds-bar-workflow-h,.ds-control--md.sc-ds-bar-workflow,.ds-control--sm.sc-ds-bar-workflow-h,.ds-control--sm.sc-ds-bar-workflow,.ds-control--xs.sc-ds-bar-workflow-h,.ds-control--xs.sc-ds-bar-workflow{--ds-control-radius:var(--dimension-radius-025)}.ds-control--lg.sc-ds-bar-workflow-h,.ds-control--lg.sc-ds-bar-workflow{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-bar-workflow-h,.ds-control--md.sc-ds-bar-workflow{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-bar-workflow-h,.ds-control--sm.sc-ds-bar-workflow{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-bar-workflow-h,.ds-control--xs.sc-ds-bar-workflow{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-chrome-space--sm.sc-ds-bar-workflow-h,.ds-chrome-space--sm.sc-ds-bar-workflow{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-bar-workflow-h,.ds-chrome-space--md.sc-ds-bar-workflow{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-bar-workflow-h,.ds-chrome-space--lg.sc-ds-bar-workflow{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-bar-workflow-h,.ds-chrome-row.sc-ds-bar-workflow,.ds-chrome-column.sc-ds-bar-workflow-h,.ds-chrome-column.sc-ds-bar-workflow,.ds-chrome-grid.sc-ds-bar-workflow-h,.ds-chrome-grid.sc-ds-bar-workflow{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-bar-workflow-h,.ds-chrome-row.sc-ds-bar-workflow{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-bar-workflow-h,.ds-chrome-column.sc-ds-bar-workflow{flex-direction:column}.ds-chrome-grid.sc-ds-bar-workflow-h,.ds-chrome-grid.sc-ds-bar-workflow{display:grid;align-items:center}.sc-ds-bar-workflow-h{display:block;min-width:0;box-sizing:border-box;background:var(--color-background-bold-brand)}.bar-workflow.sc-ds-bar-workflow{justify-content:space-between;height:var(--dimension-size-600);min-width:0;background:var(--color-background-bold-brand)}.bar-workflow__identity.sc-ds-bar-workflow{display:flex;flex:1 1 auto;align-items:center;gap:var(--dimension-space-050);height:var(--dimension-size-400);min-width:0}.bar-workflow__heading.sc-ds-bar-workflow{display:inline-flex;flex:1 1 auto;align-items:center;width:auto;min-width:0;height:var(--dimension-size-400);padding-inline:calc(var(--ds-control-padding-inline) + var(--ds-control-label-inset));box-sizing:border-box;user-select:none}.bar-workflow__actions.sc-ds-bar-workflow{display:flex;flex:0 0 auto;align-items:center;gap:var(--dimension-space-100)}`;const x=s(class s extends o{constructor(s){super();if(s!==false){this.__registerHost()}this.dsExit=i(this,"dsExit");this.dsStepChange=i(this,"dsStepChange");this.dsSubmit=i(this,"dsSubmit");this.steps=[];this.value="";this.exitLabel="Exit";this.exitAriaLabel="Exit workflow";this.previousLabel="Previous step";this.nextLabel="Next step";this.submitAction={label:"Save",type:"submit"};this.isNextInactive=false;this.responsiveMode="desktop";this.handlePrevious=()=>{if(this.previousStep&&!this.previousStep.isInactive){this.dsStepChange.emit(this.previousStep.id)}};this.handleNext=()=>{if(this.nextStep&&!this.isNextInactive&&!this.nextStep.isInactive){this.dsStepChange.emit(this.nextStep.id)}}}get currentIndex(){const s=this.steps.findIndex((s=>s.id===this.value));return s>=0?s:0}get previousStep(){return this.steps[this.currentIndex-1]??null}get nextStep(){return this.steps[this.currentIndex+1]??null}get isLastStep(){return this.steps.length<=1||this.currentIndex===this.steps.length-1}get resolvedHeading(){if(this.steps.length<=1)return this.heading;return`${this.heading} · ${this.currentIndex+1}/${this.steps.length}`}renderSubmit(s){const o=this.submitAction;return e("ds-tooltip",{slot:s,label:o.label,side:"bottom",size:"sm"},e("ds-button-filled",{class:"bar-workflow__submit",variant:"icon",icon:"Check",label:o.label,"aria-label":o.label,intent:"brand",contrast:"faint",background:"bold",size:"md",type:o.type??"submit",isInactive:o.isInactive,isLoading:o.isLoading,onDsClick:s=>this.dsSubmit.emit(s.detail)}))}renderMobile(){return e("ds-mobile-header",{class:"bar-workflow__mobile",heading:this.resolvedHeading,tone:"brand"},e("ds-tooltip",{slot:"leading",label:this.exitLabel,side:"bottom",size:"sm"},e("ds-button-unfilled",{class:"bar-workflow__exit",variant:"icon",icon:"Cross","aria-label":this.exitAriaLabel,size:"md",background:"bold",activeFill:false,hasBorder:false,onDsClick:s=>this.dsExit.emit(s.detail)})),this.previousStep?e("ds-tooltip",{slot:"trailing",label:this.previousLabel,side:"bottom",size:"sm"},e("ds-button-unfilled",{class:"bar-workflow__previous",variant:"icon",icon:"ChevronLeft","aria-label":this.previousLabel,size:"md",background:"bold",activeFill:false,hasBorder:false,isInactive:this.previousStep.isInactive,onDsClick:this.handlePrevious})):null,this.isLastStep?this.renderSubmit("trailing"):e("ds-tooltip",{slot:"trailing",label:this.nextLabel,side:"bottom",size:"sm"},e("ds-button-filled",{class:"bar-workflow__next",variant:"icon",icon:"ChevronRight",label:this.nextLabel,"aria-label":this.nextLabel,intent:"brand",contrast:"faint",background:"bold",size:"md",type:"button",isInactive:this.isNextInactive||this.nextStep?.isInactive,onDsClick:this.handleNext})))}renderDesktop(){return e("div",{class:"bar-workflow ds-chrome-row ds-chrome-space--md"},e("div",{class:"bar-workflow__identity"},e("ds-tooltip",{label:this.exitLabel,side:"bottom",size:"sm"},e("ds-button-unfilled",{class:"bar-workflow__exit",variant:"icon",icon:"Cross","aria-label":this.exitAriaLabel,size:"md",background:"bold",activeFill:false,hasBorder:false,onDsClick:s=>this.dsExit.emit(s.detail)})),e("ds-text",{class:"bar-workflow__heading ds-control--md",variant:"text-title-small",emphasis:true,color:"on-bold",as:"h1",lineTruncation:1},this.resolvedHeading)),e("div",{class:"bar-workflow__actions"},this.previousStep?e("ds-tooltip",{label:this.previousLabel,side:"bottom",size:"sm"},e("ds-button-unfilled",{class:"bar-workflow__previous",variant:"icon",icon:"ChevronLeft","aria-label":this.previousLabel,size:"md",background:"bold",activeFill:false,hasBorder:false,isInactive:this.previousStep.isInactive,onDsClick:this.handlePrevious})):null,this.isLastStep?this.renderSubmit():e("ds-tooltip",{label:this.nextLabel,side:"bottom",size:"sm"},e("ds-button-filled",{class:"bar-workflow__next",variant:"icon",icon:"ChevronRight",label:this.nextLabel,"aria-label":this.nextLabel,intent:"brand",contrast:"faint",background:"bold",size:"md",type:"button",isInactive:this.isNextInactive||this.nextStep?.isInactive,onDsClick:this.handleNext}))))}render(){return e(t,{key:"a4c9683c0a7d97c6422b88f57322ab9e7225812a"},this.responsiveMode==="mobile"?this.renderMobile():this.renderDesktop())}static get style(){return v()}},[2,"ds-bar-workflow",{heading:[1],steps:[16],value:[1],exitLabel:[1,"exit-label"],exitAriaLabel:[1,"exit-aria-label"],previousLabel:[1,"previous-label"],nextLabel:[1,"next-label"],submitAction:[16],isNextInactive:[4,"is-next-inactive"],responsiveMode:[513,"responsive-mode"]}]);function _(){if(typeof customElements==="undefined"){return}const s=["ds-bar-workflow","ds-badge","ds-button-filled","ds-button-unfilled","ds-icon","ds-loader","ds-menu","ds-mobile-header","ds-mobile-section-switcher","ds-swatch-picker","ds-switch","ds-tab-group","ds-tag","ds-text","ds-tooltip"];s.forEach((s=>{switch(s){case"ds-bar-workflow":if(!customElements.get(r(s))){customElements.define(r(s),x)}break;case"ds-badge":if(!customElements.get(r(s))){a()}break;case"ds-button-filled":if(!customElements.get(r(s))){n()}break;case"ds-button-unfilled":if(!customElements.get(r(s))){d()}break;case"ds-icon":if(!customElements.get(r(s))){l()}break;case"ds-loader":if(!customElements.get(r(s))){c()}break;case"ds-menu":if(!customElements.get(r(s))){m()}break;case"ds-mobile-header":if(!customElements.get(r(s))){b()}break;case"ds-mobile-section-switcher":if(!customElements.get(r(s))){h()}break;case"ds-swatch-picker":if(!customElements.get(r(s))){w()}break;case"ds-switch":if(!customElements.get(r(s))){f()}break;case"ds-tab-group":if(!customElements.get(r(s))){p()}break;case"ds-tag":if(!customElements.get(r(s))){k()}break;case"ds-text":if(!customElements.get(r(s))){u()}break;case"ds-tooltip":if(!customElements.get(r(s))){g()}break}}))}_();const z=x;const C=_;export{z as DsBarWorkflow,C as defineCustomElement};
|
|
1
|
+
import{p as s,H as o,c as i,h as e,a as t,t as r}from"./index.js";import{d as a}from"./p-D8nnhQNJ.js";import{d as n}from"./p-DvJkkdIO.js";import{d}from"./p-CTTDiW33.js";import{d as l}from"./p-BFfLvMZd.js";import{d as c}from"./p-Ca-I2UnB.js";import{d as m}from"./p-Ccq1RmOb.js";import{d as b}from"./p-CXqVVdW2.js";import{d as h}from"./p-Ba1l3Yot.js";import{d as w}from"./p-DgWGfscR.js";import{d as f}from"./p-Btxwp4lJ.js";import{d as p}from"./p-CbfmzgdW.js";import{d as k}from"./p-jMCRaxQW.js";import{d as u}from"./p-DZFilC--.js";import{d as g}from"./p-CtOK5oZ1.js";const v=()=>`.ds-control--lg.sc-ds-bar-workflow,.ds-control--lg.sc-ds-bar-workflow-h,.ds-control--md.sc-ds-bar-workflow-h,.ds-control--md.sc-ds-bar-workflow,.ds-control--sm.sc-ds-bar-workflow-h,.ds-control--sm.sc-ds-bar-workflow,.ds-control--xs.sc-ds-bar-workflow-h,.ds-control--xs.sc-ds-bar-workflow{--ds-control-radius:var(--dimension-radius-025)}.ds-control--lg.sc-ds-bar-workflow-h,.ds-control--lg.sc-ds-bar-workflow{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-bar-workflow-h,.ds-control--md.sc-ds-bar-workflow{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-bar-workflow-h,.ds-control--sm.sc-ds-bar-workflow{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-bar-workflow-h,.ds-control--xs.sc-ds-bar-workflow{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-chrome-space--sm.sc-ds-bar-workflow-h,.ds-chrome-space--sm.sc-ds-bar-workflow{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-bar-workflow-h,.ds-chrome-space--md.sc-ds-bar-workflow{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-bar-workflow-h,.ds-chrome-space--lg.sc-ds-bar-workflow{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-bar-workflow-h,.ds-chrome-row.sc-ds-bar-workflow,.ds-chrome-column.sc-ds-bar-workflow-h,.ds-chrome-column.sc-ds-bar-workflow,.ds-chrome-grid.sc-ds-bar-workflow-h,.ds-chrome-grid.sc-ds-bar-workflow{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-bar-workflow-h,.ds-chrome-row.sc-ds-bar-workflow{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-bar-workflow-h,.ds-chrome-column.sc-ds-bar-workflow{flex-direction:column}.ds-chrome-grid.sc-ds-bar-workflow-h,.ds-chrome-grid.sc-ds-bar-workflow{display:grid;align-items:center}.sc-ds-bar-workflow-h{display:block;min-width:0;box-sizing:border-box;background:var(--color-background-bold-brand)}.bar-workflow.sc-ds-bar-workflow{justify-content:space-between;height:var(--dimension-size-600);min-width:0;background:var(--color-background-bold-brand)}.bar-workflow__identity.sc-ds-bar-workflow{display:flex;flex:1 1 auto;align-items:center;gap:var(--dimension-space-050);height:var(--dimension-size-400);min-width:0}.bar-workflow__heading.sc-ds-bar-workflow{display:inline-flex;flex:1 1 auto;align-items:center;width:auto;min-width:0;height:var(--dimension-size-400);padding-inline:calc(var(--ds-control-padding-inline) + var(--ds-control-label-inset));box-sizing:border-box;user-select:none}.bar-workflow__actions.sc-ds-bar-workflow{display:flex;flex:0 0 auto;align-items:center;gap:var(--dimension-space-100)}`;const x=s(class s extends o{constructor(s){super();if(s!==false){this.__registerHost()}this.dsExit=i(this,"dsExit");this.dsStepChange=i(this,"dsStepChange");this.dsSubmit=i(this,"dsSubmit");this.steps=[];this.value="";this.exitLabel="Exit";this.exitAriaLabel="Exit workflow";this.previousLabel="Previous step";this.nextLabel="Next step";this.submitAction={label:"Save",type:"submit"};this.isNextInactive=false;this.responsiveMode="desktop";this.handlePrevious=()=>{if(this.previousStep&&!this.previousStep.isInactive){this.dsStepChange.emit(this.previousStep.id)}};this.handleNext=()=>{if(this.nextStep&&!this.isNextInactive&&!this.nextStep.isInactive){this.dsStepChange.emit(this.nextStep.id)}}}get currentIndex(){const s=this.steps.findIndex((s=>s.id===this.value));return s>=0?s:0}get previousStep(){return this.steps[this.currentIndex-1]??null}get nextStep(){return this.steps[this.currentIndex+1]??null}get isLastStep(){return this.steps.length<=1||this.currentIndex===this.steps.length-1}get resolvedHeading(){if(this.steps.length<=1)return this.heading;return`${this.heading} · ${this.currentIndex+1}/${this.steps.length}`}renderSubmit(s){const o=this.submitAction;return e("ds-tooltip",{slot:s,label:o.label,side:"bottom",size:"sm"},e("ds-button-filled",{class:"bar-workflow__submit",variant:"icon",icon:"Check",label:o.label,"aria-label":o.label,intent:"brand",contrast:"faint",background:"bold",size:"md",type:o.type??"submit",isInactive:o.isInactive,isLoading:o.isLoading,onDsClick:s=>this.dsSubmit.emit(s.detail)}))}renderMobile(){return e("ds-mobile-header",{class:"bar-workflow__mobile",heading:this.resolvedHeading,tone:"brand"},e("ds-tooltip",{slot:"leading",label:this.exitLabel,side:"bottom",size:"sm"},e("ds-button-unfilled",{class:"bar-workflow__exit",variant:"icon",icon:"Cross","aria-label":this.exitAriaLabel,size:"md",background:"bold",activeFill:false,hasBorder:false,onDsClick:s=>this.dsExit.emit(s.detail)})),this.previousStep?e("ds-tooltip",{slot:"trailing",label:this.previousLabel,side:"bottom",size:"sm"},e("ds-button-unfilled",{class:"bar-workflow__previous",variant:"icon",icon:"ChevronLeft","aria-label":this.previousLabel,size:"md",background:"bold",activeFill:false,hasBorder:false,isInactive:this.previousStep.isInactive,onDsClick:this.handlePrevious})):null,this.isLastStep?this.renderSubmit("trailing"):e("ds-tooltip",{slot:"trailing",label:this.nextLabel,side:"bottom",size:"sm"},e("ds-button-filled",{class:"bar-workflow__next",variant:"icon",icon:"ChevronRight",label:this.nextLabel,"aria-label":this.nextLabel,intent:"brand",contrast:"faint",background:"bold",size:"md",type:"button",isInactive:this.isNextInactive||this.nextStep?.isInactive,onDsClick:this.handleNext})))}renderDesktop(){return e("div",{class:"bar-workflow ds-chrome-row ds-chrome-space--md"},e("div",{class:"bar-workflow__identity"},e("ds-tooltip",{label:this.exitLabel,side:"bottom",size:"sm"},e("ds-button-unfilled",{class:"bar-workflow__exit",variant:"icon",icon:"Cross","aria-label":this.exitAriaLabel,size:"md",background:"bold",activeFill:false,hasBorder:false,onDsClick:s=>this.dsExit.emit(s.detail)})),e("ds-text",{class:"bar-workflow__heading ds-control--md",variant:"text-title-small",emphasis:true,color:"on-bold",as:"h1",lineTruncation:1},this.resolvedHeading)),e("div",{class:"bar-workflow__actions"},this.previousStep?e("ds-tooltip",{label:this.previousLabel,side:"bottom",size:"sm"},e("ds-button-unfilled",{class:"bar-workflow__previous",variant:"icon",icon:"ChevronLeft","aria-label":this.previousLabel,size:"md",background:"bold",activeFill:false,hasBorder:false,isInactive:this.previousStep.isInactive,onDsClick:this.handlePrevious})):null,this.isLastStep?this.renderSubmit():e("ds-tooltip",{label:this.nextLabel,side:"bottom",size:"sm"},e("ds-button-filled",{class:"bar-workflow__next",variant:"icon",icon:"ChevronRight",label:this.nextLabel,"aria-label":this.nextLabel,intent:"brand",contrast:"faint",background:"bold",size:"md",type:"button",isInactive:this.isNextInactive||this.nextStep?.isInactive,onDsClick:this.handleNext}))))}render(){return e(t,{key:"a4c9683c0a7d97c6422b88f57322ab9e7225812a"},this.responsiveMode==="mobile"?this.renderMobile():this.renderDesktop())}static get style(){return v()}},[2,"ds-bar-workflow",{heading:[1],steps:[16],value:[1],exitLabel:[1,"exit-label"],exitAriaLabel:[1,"exit-aria-label"],previousLabel:[1,"previous-label"],nextLabel:[1,"next-label"],submitAction:[16],isNextInactive:[4,"is-next-inactive"],responsiveMode:[513,"responsive-mode"]}]);function _(){if(typeof customElements==="undefined"){return}const s=["ds-bar-workflow","ds-badge","ds-button-filled","ds-button-unfilled","ds-icon","ds-loader","ds-menu","ds-mobile-header","ds-mobile-section-switcher","ds-swatch-picker","ds-switch","ds-tab-group","ds-tag","ds-text","ds-tooltip"];s.forEach((s=>{switch(s){case"ds-bar-workflow":if(!customElements.get(r(s))){customElements.define(r(s),x)}break;case"ds-badge":if(!customElements.get(r(s))){a()}break;case"ds-button-filled":if(!customElements.get(r(s))){n()}break;case"ds-button-unfilled":if(!customElements.get(r(s))){d()}break;case"ds-icon":if(!customElements.get(r(s))){l()}break;case"ds-loader":if(!customElements.get(r(s))){c()}break;case"ds-menu":if(!customElements.get(r(s))){m()}break;case"ds-mobile-header":if(!customElements.get(r(s))){b()}break;case"ds-mobile-section-switcher":if(!customElements.get(r(s))){h()}break;case"ds-swatch-picker":if(!customElements.get(r(s))){w()}break;case"ds-switch":if(!customElements.get(r(s))){f()}break;case"ds-tab-group":if(!customElements.get(r(s))){p()}break;case"ds-tag":if(!customElements.get(r(s))){k()}break;case"ds-text":if(!customElements.get(r(s))){u()}break;case"ds-tooltip":if(!customElements.get(r(s))){g()}break}}))}_();const z=x;const C=_;export{z as DsBarWorkflow,C as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-bar-workflow.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M as o,d as s}from"./p-
|
|
1
|
+
import{M as o,d as s}from"./p-Ccq1RmOb.js";const t=o;const c=s;export{t as DsMenu,c as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-menu.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M as o,d as s}from"./p-
|
|
1
|
+
import{M as o,d as s}from"./p-CXqVVdW2.js";const t=o;const p=s;export{t as DsMobileHeader,p as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-mobile-header.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M as o,d as s}from"./p-
|
|
1
|
+
import{M as o,d as s}from"./p-Ba1l3Yot.js";const t=o;const a=s;export{t as DsMobileSectionSwitcher,a as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-mobile-section-switcher.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{P as
|
|
1
|
+
import{P as s,d as o}from"./p-CvpsV-jC.js";const p=s;const t=o;export{p as DsPagination,t as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-pagination.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{P as o,d as s}from"./p-
|
|
1
|
+
import{P as o,d as s}from"./p-B2hqUkg-.js";const t=o;const p=s;export{t as DsPanelNav,p as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-panel-nav.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{P as o,d as s}from"./p-
|
|
1
|
+
import{P as o,d as s}from"./p-BXNLaPbw.js";const t=o;const a=s;export{t as DsPanelToolHeader,a as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-panel-tool-header.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,c as t,h as a,a as o,t as r}from"./index.js";import{a as l}from"./p-tR8INOIN.js";import{d as i}from"./p-D8nnhQNJ.js";import{d}from"./p-CTTDiW33.js";import{d as n}from"./p-BNkU9dcc.js";import{d as c}from"./p-BFfLvMZd.js";import{d as h}from"./p-Ca-I2UnB.js";import{d as p}from"./p-DZFilC--.js";import{d as g}from"./p-CtOK5oZ1.js";const m=()=>`.ds-control--lg.sc-ds-panel-tool-search,.ds-control--lg.sc-ds-panel-tool-search-h,.ds-control--md.sc-ds-panel-tool-search-h,.ds-control--md.sc-ds-panel-tool-search,.ds-control--sm.sc-ds-panel-tool-search-h,.ds-control--sm.sc-ds-panel-tool-search,.ds-control--xs.sc-ds-panel-tool-search-h,.ds-control--xs.sc-ds-panel-tool-search{--ds-control-radius:var(--dimension-radius-025)}.ds-control--lg.sc-ds-panel-tool-search-h,.ds-control--lg.sc-ds-panel-tool-search{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-panel-tool-search-h,.ds-control--md.sc-ds-panel-tool-search{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-panel-tool-search-h,.ds-control--sm.sc-ds-panel-tool-search{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-panel-tool-search-h,.ds-control--xs.sc-ds-panel-tool-search{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-chrome-space--sm.sc-ds-panel-tool-search-h,.ds-chrome-space--sm.sc-ds-panel-tool-search{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-panel-tool-search-h,.ds-chrome-space--md.sc-ds-panel-tool-search{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-panel-tool-search-h,.ds-chrome-space--lg.sc-ds-panel-tool-search{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-panel-tool-search-h,.ds-chrome-row.sc-ds-panel-tool-search,.ds-chrome-column.sc-ds-panel-tool-search-h,.ds-chrome-column.sc-ds-panel-tool-search,.ds-chrome-grid.sc-ds-panel-tool-search-h,.ds-chrome-grid.sc-ds-panel-tool-search{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-panel-tool-search-h,.ds-chrome-row.sc-ds-panel-tool-search{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-panel-tool-search-h,.ds-chrome-column.sc-ds-panel-tool-search{flex-direction:column}.ds-chrome-grid.sc-ds-panel-tool-search-h,.ds-chrome-grid.sc-ds-panel-tool-search{display:grid;align-items:center}.select-search.sc-ds-panel-tool-search{position:relative;box-sizing:border-box;padding:var(--dimension-space-050);background:transparent}.select-search.sc-ds-panel-tool-search::after{content:'';position:absolute;inset:auto 0 0;height:var(--dimension-stroke-width-012);background-color:var(--color-border-tertiary);pointer-events:none}.select-search.sc-ds-panel-tool-search:focus-within::after{height:var(--dimension-stroke-width-018);background-color:var(--color-border-bold-brand)}.select-search__control.sc-ds-panel-tool-search{display:flex;align-items:center;box-sizing:border-box;gap:var(--ds-control-gap, var(--dimension-space-050));height:var(--ds-control-height, var(--dimension-size-400));padding:0 var(--ds-control-padding-inline, var(--dimension-space-075));border:0;border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.select-search__control.sc-ds-panel-tool-search:has(.select-search__clear){padding-right:0}.select-search__control.sc-ds-panel-tool-search>ds-icon.sc-ds-panel-tool-search{flex-shrink:0;color:var(--color-foreground-secondary)}.select-search.sc-ds-panel-tool-search .select-search__control.sc-ds-panel-tool-search .select-search__clear.sc-ds-panel-tool-search{align-self:center;flex-shrink:0;margin-right:var(--dimension-space-050)}.select-search__control.sc-ds-panel-tool-search input.sc-ds-panel-tool-search{flex:1;min-width:0;height:100%;padding:0 var(--ds-control-label-inset, var(--dimension-space-025));border:0;outline:none;background:transparent;color:var(--color-foreground-primary);font-family:inherit}.select-search__control.sc-ds-panel-tool-search input.sc-ds-panel-tool-search::placeholder{color:var(--color-foreground-secondary)}.select-search__control.sc-ds-panel-tool-search input.sc-ds-panel-tool-search:focus::placeholder{color:var(--color-foreground-quaternary)}.select-search__control.sc-ds-panel-tool-search input[type='search'].sc-ds-panel-tool-search::-webkit-search-cancel-button,.select-search__control.sc-ds-panel-tool-search input[type='search'].sc-ds-panel-tool-search::-webkit-search-decoration{display:none}.ds-text--display-medium.sc-ds-panel-tool-search-h,.ds-text--display-medium.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-3xl);line-height:var(--typography-lineheight-3xl)}.ds-text--display-small.sc-ds-panel-tool-search-h,.ds-text--display-small.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-2xl);line-height:var(--typography-lineheight-2xl)}.ds-text--title-large.sc-ds-panel-tool-search-h,.ds-text--title-large.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-xl);line-height:var(--typography-lineheight-xl)}.ds-text--title-medium.sc-ds-panel-tool-search-h,.ds-text--title-medium.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--title-small.sc-ds-panel-tool-search-h,.ds-text--title-small.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-large.sc-ds-panel-tool-search-h,.ds-text--body-large.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--body-medium.sc-ds-panel-tool-search-h,.ds-text--body-medium.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-small.sc-ds-panel-tool-search-h,.ds-text--body-small.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-sm);line-height:var(--typography-lineheight-sm)}.ds-text--caption.sc-ds-panel-tool-search-h,.ds-text--caption.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-xs);line-height:var(--typography-lineheight-xs);text-transform:uppercase}.ds-text--display-medium.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--display-small.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--display-medium.ds-text--emphasis.sc-ds-panel-tool-search,.ds-text--display-small.ds-text--emphasis.sc-ds-panel-tool-search{font-weight:var(--typography-weight-bold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--display-medium.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--display-small.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--display-medium.ds-text--regular.sc-ds-panel-tool-search,.ds-text--display-small.ds-text--regular.sc-ds-panel-tool-search{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-large.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--title-large.ds-text--emphasis.sc-ds-panel-tool-search{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--title-large.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--title-large.ds-text--regular.sc-ds-panel-tool-search{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--title-small.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--title-medium.ds-text--emphasis.sc-ds-panel-tool-search,.ds-text--title-small.ds-text--emphasis.sc-ds-panel-tool-search{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--title-small.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--title-medium.ds-text--regular.sc-ds-panel-tool-search,.ds-text--title-small.ds-text--regular.sc-ds-panel-tool-search{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-large.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--body-medium.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--body-large.ds-text--emphasis.sc-ds-panel-tool-search,.ds-text--body-medium.ds-text--emphasis.sc-ds-panel-tool-search{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--body-large.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--body-medium.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--body-large.ds-text--regular.sc-ds-panel-tool-search,.ds-text--body-medium.ds-text--regular.sc-ds-panel-tool-search{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--body-small.ds-text--emphasis.sc-ds-panel-tool-search{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--body-small.ds-text--regular.sc-ds-panel-tool-search{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-none)}.ds-text--caption.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--caption.ds-text--emphasis.sc-ds-panel-tool-search{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-positive)}.ds-text--caption.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--caption.ds-text--regular.sc-ds-panel-tool-search{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-positive)}.sc-ds-panel-tool-search-h{display:block;flex:0 0 var(--dimension-size-600);width:100%;min-width:0;height:var(--dimension-size-600);box-sizing:border-box;background:transparent}.panel-tool-search.sc-ds-panel-tool-search{position:relative;width:100%;height:100%;background:transparent}.panel-tool-search.sc-ds-panel-tool-search::after{content:'';position:absolute;inset:auto 0 0;height:var(--dimension-stroke-width-012);background-color:var(--color-border-tertiary);pointer-events:none}.select-search.sc-ds-panel-tool-search{flex:1 1 auto;width:auto;min-width:0;height:var(--dimension-size-400);padding:0}.select-search.sc-ds-panel-tool-search::after{display:none}.panel-tool-search__filter-group.sc-ds-panel-tool-search{display:flex;flex:0 0 auto;align-items:center;gap:var(--dimension-space-100)}.panel-tool-search__divider.sc-ds-panel-tool-search,.panel-tool-search__filter.sc-ds-panel-tool-search{flex:0 0 auto}`;const y=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.dsChange=t(this,"dsChange");this.dsClear=t(this,"dsClear");this.dsFilterToggle=t(this,"dsFilterToggle");this.value="";this.placeholder="Search";this.ariaLabel="Search";this.isInactive=false;this.showFilter=false;this.filterAriaLabel="Filter";this.filterTriggerId="";this.filterExpanded=false;this.filterActive=false;this.handleChange=e=>{this.value=e;this.dsChange.emit(e)}}componentDidRender(){const e=this.el.querySelector("input");if(e&&e.value!==this.value)e.value=this.value}async setFocus(){this.el.querySelector("input")?.focus()}async focusFilterTrigger(){const e=this.el.querySelector("ds-button-unfilled.panel-tool-search__filter");await(e?.setFocus?.())}render(){return a(o,{key:"df81c5c8024b2d8b14f7185b8ff5d906a39d5eba"},a("div",{key:"d33bee3c26edde7516d39963b61bb8a3a96d873c",class:"panel-tool-search ds-chrome-row ds-chrome-space--md"},a(l,{key:"2550c1ddcbbe2ef14867fcba41a98f8bf2c57172",value:this.value,placeholder:this.placeholder,ariaLabel:this.ariaLabel,controls:this.controls,disabled:this.isInactive,inputRef:()=>undefined,clearLabel:"Clear",onValueChange:this.handleChange,onClear:()=>this.dsClear.emit(),onKeyDown:()=>undefined}),this.showFilter?a("div",{class:"panel-tool-search__filter-group"},a("ds-divider",{class:"panel-tool-search__divider",orientation:"vertical",length:"var(--dimension-size-200)"}),a("ds-tooltip",{label:this.filterAriaLabel,side:"bottom",size:"sm"},a("ds-button-unfilled",{id:this.filterTriggerId||undefined,class:"panel-tool-search__filter",variant:"icon",icon:"Filters",size:"md","aria-label":this.filterAriaLabel,haspopup:"menu",controls:this.filterControls,expanded:this.filterExpanded,isActive:this.filterActive,isInactive:this.isInactive,activeFill:false,hasBorder:false,onDsChange:e=>{e.stopPropagation()},onDsClick:e=>{e.stopPropagation();this.dsFilterToggle.emit(e.detail)}}))):null))}get el(){return this}static get style(){return m()}},[2,"ds-panel-tool-search",{value:[1025],placeholder:[1],ariaLabel:[1,"aria-label"],controls:[1],isInactive:[4,"is-inactive"],showFilter:[4,"show-filter"],filterAriaLabel:[1,"filter-aria-label"],filterTriggerId:[1,"filter-trigger-id"],filterControls:[1,"filter-controls"],filterExpanded:[4,"filter-expanded"],filterActive:[4,"filter-active"],setFocus:[64],focusFilterTrigger:[64]}]);function v(){if(typeof customElements==="undefined"){return}const e=["ds-panel-tool-search","ds-badge","ds-button-unfilled","ds-divider","ds-icon","ds-loader","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-panel-tool-search":if(!customElements.get(r(e))){customElements.define(r(e),y)}break;case"ds-badge":if(!customElements.get(r(e))){i()}break;case"ds-button-unfilled":if(!customElements.get(r(e))){d()}break;case"ds-divider":if(!customElements.get(r(e))){n()}break;case"ds-icon":if(!customElements.get(r(e))){c()}break;case"ds-loader":if(!customElements.get(r(e))){h()}break;case"ds-text":if(!customElements.get(r(e))){p()}break;case"ds-tooltip":if(!customElements.get(r(e))){g()}break}}))}v();const x=y;const u=v;export{x as DsPanelToolSearch,u as defineCustomElement};
|
|
1
|
+
import{p as e,H as s,c as t,h as a,a as o,t as r}from"./index.js";import{a as l}from"./p-tR8INOIN.js";import{d as i}from"./p-D8nnhQNJ.js";import{d}from"./p-CTTDiW33.js";import{d as n}from"./p-BNkU9dcc.js";import{d as c}from"./p-BFfLvMZd.js";import{d as h}from"./p-Ca-I2UnB.js";import{d as p}from"./p-DZFilC--.js";import{d as g}from"./p-CtOK5oZ1.js";const m=()=>`.ds-control--lg.sc-ds-panel-tool-search,.ds-control--lg.sc-ds-panel-tool-search-h,.ds-control--md.sc-ds-panel-tool-search-h,.ds-control--md.sc-ds-panel-tool-search,.ds-control--sm.sc-ds-panel-tool-search-h,.ds-control--sm.sc-ds-panel-tool-search,.ds-control--xs.sc-ds-panel-tool-search-h,.ds-control--xs.sc-ds-panel-tool-search{--ds-control-radius:var(--dimension-radius-025)}.ds-control--lg.sc-ds-panel-tool-search-h,.ds-control--lg.sc-ds-panel-tool-search{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-panel-tool-search-h,.ds-control--md.sc-ds-panel-tool-search{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-panel-tool-search-h,.ds-control--sm.sc-ds-panel-tool-search{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-panel-tool-search-h,.ds-control--xs.sc-ds-panel-tool-search{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-chrome-space--sm.sc-ds-panel-tool-search-h,.ds-chrome-space--sm.sc-ds-panel-tool-search{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-panel-tool-search-h,.ds-chrome-space--md.sc-ds-panel-tool-search{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-panel-tool-search-h,.ds-chrome-space--lg.sc-ds-panel-tool-search{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-panel-tool-search-h,.ds-chrome-row.sc-ds-panel-tool-search,.ds-chrome-column.sc-ds-panel-tool-search-h,.ds-chrome-column.sc-ds-panel-tool-search,.ds-chrome-grid.sc-ds-panel-tool-search-h,.ds-chrome-grid.sc-ds-panel-tool-search{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-panel-tool-search-h,.ds-chrome-row.sc-ds-panel-tool-search{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-panel-tool-search-h,.ds-chrome-column.sc-ds-panel-tool-search{flex-direction:column}.ds-chrome-grid.sc-ds-panel-tool-search-h,.ds-chrome-grid.sc-ds-panel-tool-search{display:grid;align-items:center}.select-search.sc-ds-panel-tool-search{position:relative;box-sizing:border-box;padding:var(--dimension-space-050);background:transparent}.select-search.sc-ds-panel-tool-search::after{content:'';position:absolute;inset:auto 0 0;height:var(--dimension-stroke-width-012);background-color:var(--color-border-tertiary);pointer-events:none}.select-search.sc-ds-panel-tool-search:focus-within::after{height:var(--dimension-stroke-width-018);background-color:var(--color-border-bold-brand)}.select-search__control.sc-ds-panel-tool-search{display:flex;align-items:center;box-sizing:border-box;gap:var(--ds-control-gap, var(--dimension-space-050));height:var(--ds-control-height, var(--dimension-size-400));padding:0 var(--ds-control-padding-inline, var(--dimension-space-075));border:0;border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.select-search__control.sc-ds-panel-tool-search:has(.select-search__clear){padding-right:0}.select-search__control.sc-ds-panel-tool-search>ds-icon.sc-ds-panel-tool-search{flex-shrink:0;color:var(--color-foreground-secondary)}.select-search.sc-ds-panel-tool-search .select-search__control.sc-ds-panel-tool-search .select-search__clear.sc-ds-panel-tool-search{align-self:center;flex-shrink:0;margin-right:var(--dimension-space-050)}.select-search__control.sc-ds-panel-tool-search input.sc-ds-panel-tool-search{flex:1;min-width:0;height:100%;padding:0 var(--ds-control-label-inset, var(--dimension-space-025));border:0;outline:none;background:transparent;color:var(--color-foreground-primary);font-family:inherit}.select-search__control.sc-ds-panel-tool-search input.sc-ds-panel-tool-search::placeholder{color:var(--color-foreground-secondary)}.select-search__control.sc-ds-panel-tool-search input.sc-ds-panel-tool-search:focus::placeholder{color:var(--color-foreground-quaternary)}.select-search__control.sc-ds-panel-tool-search input[type='search'].sc-ds-panel-tool-search::-webkit-search-cancel-button,.select-search__control.sc-ds-panel-tool-search input[type='search'].sc-ds-panel-tool-search::-webkit-search-decoration{display:none}.ds-text--display-medium.sc-ds-panel-tool-search-h,.ds-text--display-medium.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-3xl);line-height:var(--typography-lineheight-3xl)}.ds-text--display-small.sc-ds-panel-tool-search-h,.ds-text--display-small.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-2xl);line-height:var(--typography-lineheight-2xl)}.ds-text--title-large.sc-ds-panel-tool-search-h,.ds-text--title-large.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-xl);line-height:var(--typography-lineheight-xl)}.ds-text--title-medium.sc-ds-panel-tool-search-h,.ds-text--title-medium.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--title-small.sc-ds-panel-tool-search-h,.ds-text--title-small.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-large.sc-ds-panel-tool-search-h,.ds-text--body-large.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--body-medium.sc-ds-panel-tool-search-h,.ds-text--body-medium.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-small.sc-ds-panel-tool-search-h,.ds-text--body-small.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-sm);line-height:var(--typography-lineheight-sm)}.ds-text--caption.sc-ds-panel-tool-search-h,.ds-text--caption.sc-ds-panel-tool-search{font-size:var(--typography-fontsize-xs);line-height:var(--typography-lineheight-xs);text-transform:uppercase}.ds-text--display-medium.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--display-small.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--display-medium.ds-text--emphasis.sc-ds-panel-tool-search,.ds-text--display-small.ds-text--emphasis.sc-ds-panel-tool-search{font-weight:var(--typography-weight-bold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--display-medium.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--display-small.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--display-medium.ds-text--regular.sc-ds-panel-tool-search,.ds-text--display-small.ds-text--regular.sc-ds-panel-tool-search{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-large.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--title-large.ds-text--emphasis.sc-ds-panel-tool-search{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--title-large.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--title-large.ds-text--regular.sc-ds-panel-tool-search{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--title-small.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--title-medium.ds-text--emphasis.sc-ds-panel-tool-search,.ds-text--title-small.ds-text--emphasis.sc-ds-panel-tool-search{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--title-small.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--title-medium.ds-text--regular.sc-ds-panel-tool-search,.ds-text--title-small.ds-text--regular.sc-ds-panel-tool-search{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-large.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--body-medium.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--body-large.ds-text--emphasis.sc-ds-panel-tool-search,.ds-text--body-medium.ds-text--emphasis.sc-ds-panel-tool-search{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--body-large.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--body-medium.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--body-large.ds-text--regular.sc-ds-panel-tool-search,.ds-text--body-medium.ds-text--regular.sc-ds-panel-tool-search{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--body-small.ds-text--emphasis.sc-ds-panel-tool-search{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--body-small.ds-text--regular.sc-ds-panel-tool-search{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-none)}.ds-text--caption.ds-text--emphasis.sc-ds-panel-tool-search-h,.ds-text--caption.ds-text--emphasis.sc-ds-panel-tool-search{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-positive)}.ds-text--caption.ds-text--regular.sc-ds-panel-tool-search-h,.ds-text--caption.ds-text--regular.sc-ds-panel-tool-search{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-positive)}.sc-ds-panel-tool-search-h{display:block;flex:0 0 var(--dimension-size-600);width:100%;min-width:0;height:var(--dimension-size-600);box-sizing:border-box;background:transparent}.panel-tool-search.sc-ds-panel-tool-search{position:relative;width:100%;height:100%;background:transparent}.panel-tool-search.sc-ds-panel-tool-search::after{content:'';position:absolute;inset:auto 0 0;height:var(--dimension-stroke-width-012);background-color:var(--color-border-tertiary);pointer-events:none}.select-search.sc-ds-panel-tool-search{flex:1 1 auto;width:auto;min-width:0;height:var(--dimension-size-400);padding:0}.select-search.sc-ds-panel-tool-search::after{display:none}.panel-tool-search__filter-group.sc-ds-panel-tool-search{display:flex;flex:0 0 auto;align-items:center;gap:var(--dimension-space-100)}.panel-tool-search__divider.sc-ds-panel-tool-search,.panel-tool-search__filter.sc-ds-panel-tool-search{flex:0 0 auto}`;const y=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.dsChange=t(this,"dsChange");this.dsClear=t(this,"dsClear");this.dsFilterToggle=t(this,"dsFilterToggle");this.value="";this.placeholder="Search";this.ariaLabel="Search";this.isInactive=false;this.showFilter=false;this.filterAriaLabel="Filter";this.filterTriggerId="";this.filterExpanded=false;this.filterActive=false;this.handleChange=e=>{this.value=e;this.dsChange.emit(e)}}componentDidRender(){const e=this.el.querySelector("input");if(e&&e.value!==this.value)e.value=this.value}async setFocus(){this.el.querySelector("input")?.focus()}async focusFilterTrigger(){const e=this.el.querySelector("ds-button-unfilled.panel-tool-search__filter");await(e?.setFocus?.())}render(){return a(o,{key:"efc0fe16791bce8c4f9872a78ad832356613ab1f"},a("div",{key:"6ff7a40ab752f18bffbe9bff818f371a03aad62d",class:"panel-tool-search ds-chrome-row ds-chrome-space--md"},a(l,{key:"5bface48dcd6ad0c7aa60a552e6ce382a2e846c2",value:this.value,placeholder:this.placeholder,ariaLabel:this.ariaLabel,controls:this.controls,disabled:this.isInactive,inputRef:()=>undefined,clearLabel:"Clear",onValueChange:this.handleChange,onClear:()=>this.dsClear.emit(),onKeyDown:()=>undefined}),this.showFilter?a("div",{class:"panel-tool-search__filter-group"},a("ds-divider",{class:"panel-tool-search__divider",orientation:"vertical",length:"var(--dimension-size-200)"}),a("ds-tooltip",{label:this.filterAriaLabel,side:"bottom",size:"sm"},a("ds-button-unfilled",{id:this.filterTriggerId||undefined,class:"panel-tool-search__filter",variant:"icon",icon:"Filters",size:"md","aria-label":this.filterAriaLabel,haspopup:"menu",controls:this.filterControls,expanded:this.filterExpanded,isActive:this.filterActive,isInactive:this.isInactive,activeFill:false,hasBorder:false,onDsChange:e=>{e.stopPropagation()},onDsClick:e=>{e.stopPropagation();this.dsFilterToggle.emit(e.detail)}}))):null))}get el(){return this}static get style(){return m()}},[2,"ds-panel-tool-search",{value:[1025],placeholder:[1],ariaLabel:[1,"aria-label"],controls:[1],isInactive:[4,"is-inactive"],showFilter:[4,"show-filter"],filterAriaLabel:[1,"filter-aria-label"],filterTriggerId:[1,"filter-trigger-id"],filterControls:[1,"filter-controls"],filterExpanded:[4,"filter-expanded"],filterActive:[4,"filter-active"],setFocus:[64],focusFilterTrigger:[64]}]);function v(){if(typeof customElements==="undefined"){return}const e=["ds-panel-tool-search","ds-badge","ds-button-unfilled","ds-divider","ds-icon","ds-loader","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-panel-tool-search":if(!customElements.get(r(e))){customElements.define(r(e),y)}break;case"ds-badge":if(!customElements.get(r(e))){i()}break;case"ds-button-unfilled":if(!customElements.get(r(e))){d()}break;case"ds-divider":if(!customElements.get(r(e))){n()}break;case"ds-icon":if(!customElements.get(r(e))){c()}break;case"ds-loader":if(!customElements.get(r(e))){h()}break;case"ds-text":if(!customElements.get(r(e))){p()}break;case"ds-tooltip":if(!customElements.get(r(e))){g()}break}}))}v();const x=y;const f=v;export{x as DsPanelToolSearch,f as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-panel-tool-search.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{P as o,d as s}from"./p-
|
|
1
|
+
import{P as o,d as s}from"./p-BGGm1NB1.js";const t=o;const m=s;export{t as DsPanelTools,m as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-panel-tools.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as s,H as e,c as t,h as i,a as n,t as o}from"./index.js";import{c as a,d as l}from"./p-CbqdWBAC.js";import{C as h,c as r,r as d,a as c,b as p,e as u,d as f}from"./p-ChWnbdFS.js";import{i as b,a as m,b as g,r as v,S as _,c as w}from"./p-DNpE0RBz.js";import{d as y}from"./p-Dcnd5ZX5.js";import{d as k}from"./p-D8nnhQNJ.js";import{d as x}from"./p-DF52Grw1.js";import{d as C}from"./p-PzI11fs8.js";import{d as S}from"./p-DvJkkdIO.js";import{d as D}from"./p-CTTDiW33.js";import{d as M}from"./p-BFfLvMZd.js";import{d as L}from"./p-Ca-I2UnB.js";import{d as T}from"./p-CKfdvOZ2.js";import{d as P}from"./p-1tOy4H51.js";import{d as A}from"./p-RLiackRN.js";import{d as B}from"./p-CW7ML-3h.js";import{d as E}from"./p-ohWEVGHg.js";import{d as j}from"./p-DhDWmMxD.js";import{d as z}from"./p-b-Dlg3y_.js";import{d as N}from"./p-O3OuOaj3.js";import{d as I}from"./p-BDXMXH_i.js";import{d as O}from"./p-CDF_nP74.js";import{d as F}from"./p-Btxwp4lJ.js";import{d as $}from"./p-CbfmzgdW.js";import{d as W}from"./p-jMCRaxQW.js";import{d as H}from"./p-DZFilC--.js";import{d as G}from"./p-CtOK5oZ1.js";const R=["none","cool","neutral","warm","fresh"];const V="neutral";const K={cool:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-blue-strong-background)",position:100}]},neutral:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-grey-strong-background)",position:100}]},warm:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-yellow-strong-background)",position:100}]},fresh:{opacity:.4,stops:[{color:"var(--color-color-intent-cyan-faint-background)",position:0},{color:"var(--color-background-transparent)",position:47},{color:"var(--color-background-transparent)",position:58},{color:"var(--color-color-intent-red-faint-background)",position:83},{color:"var(--color-color-intent-pink-faint-background)",position:100}]}};const U="100% 100% at 0% 0%";function Z(s){const e=X(s);return e==="none"?null:K[e]}function q(s){return String(Z(s)?.opacity??0)}function J(s){return R.includes(s)}function X(s){return s!=null&&J(s)?s:V}function Q(s){const e=X(s);if(e==="none")return"none";return Y(K[e].stops)}function Y(s){const e=s.map((s=>`${s.color} ${s.position}%`)).join(", ");return`radial-gradient(${U}, ${e})`}const ss="--ds-shell-gradient-image";const es="--ds-shell-gradient-size";const ts="--ds-shell-gradient-position-panel";const is="--ds-shell-gradient-position-bar";const ns="--ds-shell-gradient-opacity";function os(s=V){return Q(s)}function as(s){const e=typeof globalThis.window!=="undefined"?globalThis.window:undefined;if(!e)return{width:0,height:0};const t=e.visualViewport;return{width:Math.round(t?.width??e.innerWidth),height:Math.round(t?.height??e.innerHeight)}}function ls(s){return`${Math.round(s.width)}px ${Math.round(s.height)}px`}function hs(){return"0 0"}function rs(s){return`${-Math.round(s)}px 0`}const ds={k:"search",a:"agents",s:"stacks",m:"messages",n:"activity","/":"help"};function cs(s){return!s.metaKey&&!s.ctrlKey&&!s.altKey&&!s.shiftKey}function ps(s){if(!s||typeof s!=="object")return false;if(!("closest"in s)||typeof s.closest!=="function")return false;const e=s;const t=e.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]');if(t)return true;const i=e.getAttribute("role");if(i==="textbox"||i==="combobox"||i==="searchbox")return true;return Boolean(e.isContentEditable)}function us(s){if(s.key==="["||s.code==="BracketLeft")return"[";if(s.key==="]"||s.code==="BracketRight")return"]";return s.key.length===1?s.key.toLowerCase():s.key.toLowerCase()}function fs(s){if(!cs(s))return null;const e=us(s);if(e==="[")return"toggle-panel-nav";if(e==="]")return"close-panel-tools";const t=ds[e];if(t)return`open-tool:${t}`;return null}function bs(s,e){if(typeof document==="undefined")return 0;const t=document.createElement("div");t.style.cssText="position:absolute;visibility:hidden;pointer-events:none;height:0;width:var("+e+");";s.appendChild(t);const i=t.getBoundingClientRect().width;s.removeChild(t);return i}function ms(s){return{expandedPx:bs(s,"--_nav-width"),collapsedPx:bs(s,"--_nav-width-collapsed")}}function gs(s,e){if(e?.classList.contains("panel-nav--collapsed"))return true;const t=s?.collapsed;return t===true}function vs(s,e){return e?s.collapsedPx:s.expandedPx}const _s=()=>`@media (forced-colors: active){.sc-ds-shell-app:root,.sc-ds-shell-app-h,.ds-forced-colors-scope.sc-ds-shell-app{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.sc-ds-shell-app-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-shell-app-h,.ds-focus-ring.sc-ds-shell-app,.ds-focus-ring-inset.sc-ds-shell-app-h,.ds-focus-ring-inset.sc-ds-shell-app{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-shell-app-h:focus-visible,.ds-focus-ring.sc-ds-shell-app:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-shell-app-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-shell-app{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-shell-app-h:focus-visible,.ds-focus-ring-inset.sc-ds-shell-app:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-shell-app-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-shell-app:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){.sc-ds-shell-app-h{--ds-focus-ring-color:var(--ds-forced-color-selected)}}.sc-ds-shell-app-h{display:flex;flex-direction:column;height:100%;min-height:0;box-sizing:border-box;overflow:hidden;overscroll-behavior:none;font-family:var(--typography-font-family-ui, system-ui);--ds-shell-panel-tools-width:var(--dimension-panel-width-xs)}.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-secondary)}.shell-app__row.sc-ds-shell-app{display:flex;flex:1 1 0;min-height:0;position:relative}.shell-app__banner.sc-ds-shell-app{flex:0 0 auto;min-width:0;position:relative;z-index:5}.shell-app__banner.sc-ds-shell-app-s>ds-banner,.shell-app__banner .sc-ds-shell-app-s>ds-banner{display:grid;width:100%}.shell-app__chrome.sc-ds-shell-app{position:absolute;inset:0;pointer-events:none;z-index:0;background-color:var(--_shell-chrome-bg)}.shell-app--gradient.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app::before{content:'';position:absolute;inset:0;pointer-events:none;background-position:0 0;background-attachment:fixed;z-index:1;opacity:var(--ds-shell-gradient-opacity, 1);background-image:var(--ds-shell-gradient-image, none);background-size:var(--ds-shell-gradient-size, auto);background-repeat:no-repeat}.shell-app__panel.sc-ds-shell-app{flex:0 0 auto;min-height:0;height:100%;position:relative;z-index:2}.shell-app__panel.sc-ds-shell-app-s>ds-panel-nav,.shell-app__panel .sc-ds-shell-app-s>ds-panel-nav{display:block;height:100%}.shell-app__panel.sc-ds-shell-app>ds-panel-nav.sc-ds-shell-app{display:block;height:100%}.shell-app__main.sc-ds-shell-app{flex:1 1 auto;min-width:0;min-height:0;display:grid;grid-template-columns:minmax(0, 1fr) auto;grid-template-rows:auto minmax(0, 1fr);grid-template-areas:'bar tools' 'content tools';position:relative;z-index:1}.shell-app__mobile-sheet-nav.sc-ds-shell-app,.shell-app__mobile-bar-nav.sc-ds-shell-app{display:none}.shell-app__bar.sc-ds-shell-app{grid-area:bar;flex:0 0 auto;min-width:0}.shell-app__bar.sc-ds-shell-app-s>ds-bar-nav,.shell-app__bar .sc-ds-shell-app-s>ds-bar-nav{display:block}.shell-app__bar.sc-ds-shell-app>ds-bar-nav.sc-ds-shell-app{display:block}.shell-app__content.sc-ds-shell-app{grid-area:content;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:none;contain:layout}.shell-app__content.sc-ds-shell-app{position:relative;z-index:1;background-color:var(--color-background-primary)}.shell-app__tools.sc-ds-shell-app{grid-area:tools;flex:0 0 auto;min-width:0;min-height:0;height:100%;display:flex;position:relative;z-index:0;overflow:hidden}.shell-app__tools.sc-ds-shell-app-s>ds-panel-tools,.shell-app__tools .sc-ds-shell-app-s>ds-panel-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app-s>ds-shell-tools,.shell-app__tools .sc-ds-shell-app-s>ds-shell-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app>ds-shell-tools.sc-ds-shell-app{display:block;height:100%;min-height:0}.shell-app__content.sc-ds-shell-app>ds-shell-page.sc-ds-shell-app{display:block;min-height:100%}.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{visibility:hidden}.shell-app--mobile.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-primary);padding-block-start:env(safe-area-inset-top)}.shell-app--mobile.shell-app--foreground-refresh.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{transform:translateZ(0)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app{display:none}.shell-app--mobile.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{width:100%;box-sizing:border-box;grid-template-columns:minmax(0, 1fr);grid-template-rows:minmax(0, 1fr) auto;grid-template-areas:'stage' 'mobile-bar-nav';background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{grid-area:stage;min-width:0;min-height:0;height:100%;position:relative}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{z-index:1;overflow:auto}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{z-index:2;width:100%;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{display:block;z-index:3;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav.sc-ds-shell-app{grid-area:mobile-bar-nav;display:block;min-width:0;position:relative;z-index:4}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav[hidden].sc-ds-shell-app{display:none}.shell-app--mobile-tool-active.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{visibility:hidden}`;const ws=s(class s extends e{constructor(s){super();if(s!==false){this.__registerHost()}this.dsResponsiveModeChange=t(this,"dsResponsiveModeChange");this.dsNavSelect=t(this,"dsNavSelect");this.dsTabChange=t(this,"dsTabChange");this.dsSubsectionChange=t(this,"dsSubsectionChange");this.dsPageBack=t(this,"dsPageBack");this.dsBreadcrumbSelect=t(this,"dsBreadcrumbSelect");this.dsPageAction=t(this,"dsPageAction");this.dsToolChange=t(this,"dsToolChange");this.dsHeaderBack=t(this,"dsHeaderBack");this.dsHeaderAction=t(this,"dsHeaderAction");this.dsPresentationChange=t(this,"dsPresentationChange");this.dsBrowseContextChange=t(this,"dsBrowseContextChange");this.dsNavFooterAction=t(this,"dsNavFooterAction");this.dsNavUserAction=t(this,"dsNavUserAction");this.composition="managed";this.navigation={};this.pageChrome={};this.tools={};this.navStyle="dashboard";this.gradientPreset=V;this.shortcutsEnabled=true;this.mobileDestination="area";this.mobileSheetNavOpen=false;this.toolsFullscreen=false;this.resolvedMode="desktop";this.managedToolsOpen=false;this.managedToolsClosing=false;this.managedActiveTool="";this.managedToolPresentation="drawer";this.managedMobileDestination="area";this.managedMobileSheetNavOpen=false;this.managedInboxTool="";this.managedBrowseContext="dashboard";this.resizeObserver=null;this.hasLoaded=false;this.foregroundRefreshTimer=null;this.panelNavTransition=new h;this.chromeSyncCoalescer=r((()=>this.syncChrome()));this.panelWidthTokens={expandedPx:0,collapsedPx:0};this.cachedViewportWidth=0;this.cachedViewportHeight=0;this.onWindowResize=()=>{this.updateResponsiveMode();if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onVisualViewportChange=()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onChromeTransitionStart=s=>{const e=u(s);if(e==="panel-tools"){if(d(s)==="closing"){this.managedToolsClosing=true}return}if(e!=="panel-nav")return;this.panelNavTransition.enter();const t=as();this.cachedViewportWidth=t.width;this.cachedViewportHeight=t.height;this.syncChrome()};this.onChromeTransitionEnd=s=>{const e=u(s);if(e==="panel-tools"){this.managedToolsClosing=false;return}if(e!=="panel-nav")return;this.panelNavTransition.exit();if(!this.panelNavTransition.isActive){this.scheduleChromeSync()}};this.onDocumentVisibilityChange=()=>{if(!document.hidden)this.refreshAfterForegroundRestore()};this.onPageShow=s=>{if(s.persisted)this.refreshAfterForegroundRestore()};this.handleManagedNavSelect=s=>{s.stopPropagation();this.dsNavSelect.emit(s.detail)};this.handleManagedTabChange=s=>{s.stopPropagation();this.dsTabChange.emit(s.detail)};this.handleManagedPageBack=s=>{s.stopPropagation();this.dsPageBack.emit(s.detail)};this.handleManagedBreadcrumbSelect=s=>{s.stopPropagation();const e=this.dsBreadcrumbSelect.emit(s.detail);if(e.defaultPrevented)s.preventDefault()};this.handleManagedSubsectionChange=s=>{s.stopPropagation();this.dsSubsectionChange.emit(s.detail)};this.handleManagedPageAction=s=>{s.stopPropagation();this.dsPageAction.emit(s.detail)};this.handleManagedToolChange=s=>{s.stopPropagation();const{id:e,selected:t}=s.detail;this.managedActiveTool=e;this.managedToolsOpen=t;const i=this.resolvedToolItems.find((s=>s.id===e));if(i?.mobileDestination==="inbox"||b(e)){this.managedInboxTool=e}this.managedMobileDestination=t?i?.mobileDestination??m(true,e):"area";this.managedMobileSheetNavOpen=false;this.dsToolChange.emit(s.detail)};this.handleManagedPresentationChange=s=>{s.stopPropagation();this.managedToolPresentation=s.detail.presentation;this.toolsFullscreen=s.detail.presentation==="fullscreen";this.dsPresentationChange.emit(s.detail)};this.handleManagedHeaderBack=s=>{s.stopPropagation();this.dsHeaderBack.emit(s.detail)};this.handleManagedHeaderAction=s=>{s.stopPropagation();this.dsHeaderAction.emit(s.detail)};this.handleManagedSheetToggle=s=>{s.stopPropagation();this.managedMobileSheetNavOpen=s.detail};this.handleManagedMobileDestination=s=>{s.stopPropagation();const e=s.detail.destination;this.managedMobileSheetNavOpen=false;this.managedMobileDestination=e;if(e==="area"){this.managedToolsOpen=false;return}this.activateManagedMobileTool(e)};this.handleManagedAreaSelect=s=>{s.stopPropagation();if(s.detail==="help"){this.managedMobileSheetNavOpen=false;this.managedMobileDestination="help";if(this.activateManagedMobileTool("help"))return}this.managedMobileSheetNavOpen=false;this.managedMobileDestination="area";this.managedToolsOpen=false;this.dsNavSelect.emit(s.detail)};this.handleManagedBrowseContext=s=>{s.stopPropagation();this.managedBrowseContext=s.detail;this.dsBrowseContextChange.emit(s.detail)};this.handleManagedSheetClose=s=>{s.stopPropagation();this.managedMobileSheetNavOpen=false};this.handleManagedNavFooterAction=s=>{s.stopPropagation();this.dsNavFooterAction.emit()};this.handleManagedNavUserAction=s=>{s.stopPropagation();this.dsNavUserAction.emit(s.detail)}}get managed(){return this.composition==="managed"}get effectiveMobileDestination(){return this.managed?this.managedMobileDestination:this.mobileDestination}get effectiveMobileSheetNavOpen(){return this.managed?this.managedMobileSheetNavOpen:this.mobileSheetNavOpen}get resolvedNavigationGroups(){if(this.navigation.groups?.length)return this.navigation.groups;return this.managedBrowseContext==="settings"?this.navigation.settingsGroups??[]:this.navigation.dashboardGroups??[]}get resolvedToolItems(){return this.tools.items??a}get availableInboxTools(){return this.resolvedToolItems.filter((s=>!s.isInactive&&(s.mobileDestination==="inbox"||b(s.id)))).map((s=>s.id))}componentWillLoad(){if(typeof window!=="undefined"){this.resolvedMode=g(window.innerWidth)}this.managedBrowseContext=this.navigation.browseContext??this.navStyle;this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen;this.managedInboxTool=v("",this.availableInboxTools)}componentDidLoad(){this.hasLoaded=true;this.syncSlottedNavStyle();this.syncSlottedMobileState();this.connectMetricsObserver();this.connectViewportListeners();this.connectPageLifecycleListeners();this.el.addEventListener(c,this.onChromeTransitionStart);this.el.addEventListener(p,this.onChromeTransitionEnd);requestAnimationFrame((()=>{this.cachePanelWidthTokens();this.scheduleChromeSync()}));const s=this.el.querySelector("ds-shell-tools, ds-panel-tools");this.toolsFullscreen=s?.getAttribute("presentation")==="fullscreen"}handleToolsPresentation(s){this.toolsFullscreen=s.detail?.presentation==="fullscreen"}disconnectedCallback(){this.resizeObserver?.disconnect();this.resizeObserver=null;this.disconnectViewportListeners();this.disconnectPageLifecycleListeners();this.cancelForegroundRefresh();this.chromeSyncCoalescer.cancel();this.el.removeEventListener(c,this.onChromeTransitionStart);this.el.removeEventListener(p,this.onChromeTransitionEnd)}onShellPropsChange(){this.syncSlottedNavStyle();this.scheduleChromeSync()}handleNavigationChange(){this.managedBrowseContext=this.navigation.browseContext??this.navStyle}handleToolsChange(){if(this.managedActiveTool&&!this.resolvedToolItems.some((s=>s.id===this.managedActiveTool))){this.managedToolsOpen=false;this.managedActiveTool="";this.managedMobileDestination="area"}this.managedInboxTool=v(this.managedInboxTool,this.availableInboxTools)}onMobileStateChange(s,t){if(this.managed){this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen}this.syncSlottedMobileState();if(t===true&&!this.effectiveMobileSheetNavOpen&&this.resolvedMode==="mobile"){requestAnimationFrame((()=>{const s=this.el.querySelector("ds-mobile-bar-nav");const t=document.activeElement;if(t instanceof e&&s?.contains(t))return;void s?.focusDestination?.("sheet-nav")}))}}updateResponsiveMode(){if(typeof window==="undefined")return;const s=g(window.innerWidth);if(s===this.resolvedMode)return;this.resolvedMode=s;this.syncSlottedMobileState();this.scheduleChromeSync();if(this.hasLoaded)this.dsResponsiveModeChange.emit({mode:s})}scheduleChromeSync(){this.chromeSyncCoalescer.schedule()}syncSlottedNavStyle(){const s=this.el.querySelector("ds-panel-nav");const e=this.el.querySelector("ds-bar-nav");if(s){s.setAttribute("nav-style",this.navStyle);s.navStyle=this.navStyle}if(e){e.setAttribute("nav-style",this.navStyle);e.navStyle=this.navStyle}}syncSlottedMobileState(){const s=this.el.querySelector("ds-shell-tools");const e=this.el.querySelector("ds-mobile-bar-nav");const t=this.el.querySelector("ds-mobile-sheet-nav");if(s){s.setAttribute("responsive-mode",this.resolvedMode);s.responsiveMode=this.resolvedMode}if(e){e.activeDestination=this.effectiveMobileDestination;e.sheetNavExpanded=this.effectiveMobileSheetNavOpen}if(t){t.open=this.effectiveMobileSheetNavOpen}}connectMetricsObserver(){this.resizeObserver=new ResizeObserver((()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()}));this.resizeObserver.observe(this.el);const s=this.el.querySelector(".shell-app__panel");if(s)this.resizeObserver.observe(s)}connectViewportListeners(){if(typeof window==="undefined")return;window.addEventListener("resize",this.onWindowResize,{passive:true});const s=window.visualViewport;if(s){s.addEventListener("resize",this.onVisualViewportChange,{passive:true});s.addEventListener("scroll",this.onVisualViewportChange,{passive:true})}}disconnectViewportListeners(){if(typeof window==="undefined")return;window.removeEventListener("resize",this.onWindowResize);const s=window.visualViewport;if(s){s.removeEventListener("resize",this.onVisualViewportChange);s.removeEventListener("scroll",this.onVisualViewportChange)}}connectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.addEventListener("visibilitychange",this.onDocumentVisibilityChange);window.addEventListener("pageshow",this.onPageShow)}disconnectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.removeEventListener("visibilitychange",this.onDocumentVisibilityChange);window.removeEventListener("pageshow",this.onPageShow)}cancelForegroundRefresh(){if(this.foregroundRefreshTimer!==null){window.clearTimeout(this.foregroundRefreshTimer);this.foregroundRefreshTimer=null}this.el.classList.remove("shell-app--foreground-refresh")}refreshAfterForegroundRestore(){this.updateResponsiveMode();this.syncSlottedMobileState();this.scheduleChromeSync();if(this.resolvedMode!=="mobile")return;this.cancelForegroundRefresh();this.el.classList.add("shell-app--foreground-refresh");this.foregroundRefreshTimer=window.setTimeout((()=>{this.foregroundRefreshTimer=null;this.el.classList.remove("shell-app--foreground-refresh");void this.el.querySelector(".shell-app__main")?.offsetHeight}),s.FOREGROUND_REFRESH_MS)}cachePanelWidthTokens(){const s=this.el.querySelector("ds-panel-nav .panel-nav");if(!s)return;this.panelWidthTokens=ms(s)}applyGradientVars(s,e){const t=s.style;for(const[s,i]of Object.entries(e)){if(i===null)t.removeProperty(s);else t.setProperty(s,i)}}clearGradientPaintVars(s){const e=[ss,es,ns];for(const t of s){for(const s of e)t.style.removeProperty(s)}}syncChromeLayoutVars(s,e,t,i){if(s){s.style.setProperty(ts,t)}if(e){e.style.setProperty(is,i)}}resolvePanelWidthPx(s){const e=s?.querySelector(".panel-nav");if(this.panelNavTransition.isActive&&this.panelWidthTokens.expandedPx>0){const t=gs(s,e);return vs(this.panelWidthTokens,t)}const t=this.el.querySelector(".shell-app__panel");const i=t?.getBoundingClientRect().width??0;if(i>0)return i;if(this.panelWidthTokens.expandedPx>0){const t=gs(s,e);return vs(this.panelWidthTokens,t)}return 0}resolveViewportDimensions(){if(this.panelNavTransition.isActive&&this.cachedViewportWidth>0){return{width:this.cachedViewportWidth,height:this.cachedViewportHeight}}return as()}chromeLayerActive(){return this.resolvedMode!=="mobile"&&X(this.gradientPreset)!=="none"}handleWindowKeyDown(s){if(!this.shortcutsEnabled)return;if(ps(s.target))return;const e=fs(s);if(!e)return;s.preventDefault();const t=this.el.querySelector("ds-panel-nav");const i=this.el.querySelector("ds-shell-tools, ds-panel-tools");if(e==="toggle-panel-nav"){void t?.toggleCollapsed();return}if(e==="close-panel-tools"){void i?.closeDrawer?.();return}if(e.startsWith("open-tool:")&&i){const s=e.slice("open-tool:".length);void i.activateTool?.(s)}}async activateTool(s){const e=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(e?.activateTool?.(s))}async closeGlobalSurface(){if(this.managedMobileSheetNavOpen){this.managedMobileSheetNavOpen=false;return}const s=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(s?.closeDrawer?.())}async setToolPresentation(s){this.managedToolPresentation=s;this.toolsFullscreen=s==="fullscreen"}activateManagedMobileTool(s){const e=s==="inbox"?v(this.managedInboxTool,this.availableInboxTools):s;if(!e)return false;const t=this.resolvedToolItems.find((t=>t.id===e||s!=="inbox"&&t.mobileDestination===s));if(!t||t.isInactive)return false;const i=t.id;this.managedActiveTool=i;this.managedToolsOpen=true;if(b(i))this.managedInboxTool=i;this.dsToolChange.emit({id:i,selected:true});return true}get currentArea(){const s=[...this.navigation.dashboardGroups??[],...this.navigation.settingsGroups??[],...this.resolvedNavigationGroups];const e=s.flatMap((s=>s.items));const t=this.navigation.activeId||y(this.navigation.currentUrl??this.pageChrome.currentUrl??"",e);return e.find((s=>s.id===t))??e[0]??{id:"area",icon:"MapPage",label:this.pageChrome.heading||"Area"}}toolDot(s){return this.resolvedToolItems.find((e=>e.id===s))?.dot??false}syncChrome(){const s=this.el.querySelector("ds-panel-nav");const e=this.el.querySelector("ds-bar-nav");const t=[this.el,s,e].filter((s=>s!==null));const i=()=>{if(s)s.style.removeProperty(ts);if(e)e.style.removeProperty(is)};const n=X(this.gradientPreset);if(n==="none"||this.resolvedMode==="mobile"){this.clearGradientPaintVars(t);i();return}const o=this.resolveViewportDimensions();const a=this.resolvePanelWidthPx(s);const l=hs();const h=rs(a);this.syncChromeLayoutVars(s,e,l,h);const r=os(n);const d=ls({width:o.width,height:o.height});const c=q(n);for(const s of t){if(s===this.el){this.applyGradientVars(s,{[ss]:r,[es]:d,[ts]:l,[is]:h,[ns]:c});continue}const e=s.tagName.toLowerCase()==="ds-bar-nav";this.applyGradientVars(s,{[ss]:r,[es]:d,[ns]:c,[ts]:e?null:l,[is]:e?h:null})}}renderManagedPanelNav(){const s=this.navigation;return i("ds-panel-nav",{navStyle:this.navStyle,groups:this.resolvedNavigationGroups,breakpoint:_,routerMode:s.routerMode??"event",activeId:s.activeId??"",currentUrl:s.currentUrl??this.pageChrome.currentUrl??"",storageKey:s.storageKey??"",userName:s.userName??"",userInitial:s.userInitial??"",accountMenuExpanded:s.accountMenuExpanded??false,dashboardLabel:s.dashboardLabel??"Dashboard",settingsLabel:s.settingsLabel??"Settings",accountLabel:s.accountLabel??"Account",dashboardNavigationLabel:s.dashboardNavigationLabel??"Dashboard navigation",settingsNavigationLabel:s.settingsNavigationLabel??"Settings navigation",navigationItemsLabel:s.navigationLabel??"Navigation items",onDsNavSelect:this.handleManagedNavSelect,onDsNavFooterAction:this.handleManagedNavFooterAction,onDsNavUserAction:this.handleManagedNavUserAction})}renderManagedBarNav(){return i("ds-bar-nav",{navStyle:this.navStyle,tabs:this.pageChrome.tabs??[],value:this.pageChrome.value??"",heading:this.pageChrome.routeHeading??this.pageChrome.heading,basePath:this.pageChrome.basePath??"",currentUrl:this.pageChrome.currentUrl??this.navigation.currentUrl??"",onDsTabChange:this.handleManagedTabChange})}renderManagedToolSlots(){const s=[...new Set(this.resolvedToolItems.map((s=>s.id)))].sort();return s.flatMap((s=>[i("slot",{key:`tool:${s}`,name:s,slot:s}),i("slot",{key:`tool-view:${s}`,name:`${s}-view`,slot:`${s}-view`})]))}renderManagedTools(){const s=this.tools;return i("ds-shell-tools",{responsiveMode:this.resolvedMode,open:this.managedToolsOpen,activeTool:this.managedActiveTool,presentation:this.managedToolPresentation,fullscreenHeaderMode:s.fullscreenHeaderMode??"shared",items:this.resolvedToolItems,headers:s.headers??{},storageKey:s.storageKey??"",toolsLabel:s.toolsLabel??"Tools",toolShortcutsLabel:s.toolShortcutsLabel??"Tool shortcuts",inboxLabel:s.inboxLabel??"Inbox",inboxNavigationLabel:s.inboxNavigationLabel??"Inbox sections",onDsToolChange:this.handleManagedToolChange,onDsPresentationChange:this.handleManagedPresentationChange,onDsHeaderBack:this.handleManagedHeaderBack,onDsHeaderAction:this.handleManagedHeaderAction},this.renderManagedToolSlots())}renderManagedMobileSheetNav(){const s=this.navigation;return i("ds-mobile-sheet-nav",{open:this.managedMobileSheetNavOpen,browseContext:this.managedBrowseContext,dashboardGroups:s.dashboardGroups??s.groups??[],settingsGroups:s.settingsGroups??[],currentUrl:s.currentUrl??this.pageChrome.currentUrl??"",routeSelectionActive:this.managedMobileDestination==="area",navigationLabel:s.navigationLabel??"Application navigation",dashboardLabel:s.dashboardLabel??"Dashboard",settingsLabel:s.settingsLabel??"Settings",accountLabel:s.accountLabel??"Account",showAccount:s.showMobileAccount??true,onDsAreaSelect:this.handleManagedAreaSelect,onDsBrowseContextChange:this.handleManagedBrowseContext,onDsClose:this.handleManagedSheetClose})}renderManagedMobileBarNav(){return i("ds-mobile-bar-nav",{hidden:this.tools.mobileBarHidden??false,activeDestination:this.managedMobileDestination,currentArea:this.currentArea,sheetNavExpanded:this.managedMobileSheetNavOpen,searchLabel:this.tools.items?.find((s=>s.id==="search"))?.ariaLabel??"Search",inboxLabel:this.tools.inboxLabel??"Inbox",messagesLabel:this.tools.items?.find((s=>s.id==="messages"))?.ariaLabel??"Messages",agentsLabel:this.tools.items?.find((s=>s.id==="agents"))?.ariaLabel??"Agents",helpLabel:this.tools.items?.find((s=>s.id==="help"))?.ariaLabel??"Help & Support",searchDot:this.toolDot("search"),inboxDot:this.toolDot("stacks")||this.toolDot("activity"),messagesDot:this.toolDot("messages"),agentsDot:this.toolDot("agents"),onDsSheetNavToggle:this.handleManagedSheetToggle,onDsDestinationChange:this.handleManagedMobileDestination})}renderManagedMobileLeading(){if(!this.pageChrome.showBack){return i("slot",{name:"page-header-leading",slot:"leading"})}return[i("ds-tooltip",{slot:"leading",label:this.pageChrome.backAriaLabel??"Back",side:"bottom",size:"sm"},i("ds-button-unfilled",{variant:"icon",icon:this.pageChrome.backIcon??"ChevronLeft",size:"md","aria-label":this.pageChrome.backAriaLabel??"Back",activeFill:false,hasBorder:false,onDsClick:s=>this.dsPageBack.emit(s.detail)})),i("slot",{name:"page-header-leading",slot:"leading"})]}renderManagedMobileActions(){const s=this.pageChrome.mobileActions??[];return[...s.map((s=>i("ds-tooltip",{slot:"trailing",key:s.id,label:s.ariaLabel,side:"bottom",size:"sm"},i("ds-button-unfilled",{id:s.triggerId||undefined,variant:"icon",icon:s.icon,size:"md","aria-label":s.ariaLabel,haspopup:s.haspopup,controls:s.controls,expanded:s.expanded,pressed:s.pressed,isInactive:s.isInactive,activeFill:false,hasBorder:false,onDsClick:()=>this.dsPageAction.emit(s.id)})))),i("slot",{name:"page-header-trailing",slot:"trailing"})]}renderManagedPage(){const s=this.pageChrome;const e=s.showBack?[]:s.tabs??[];const t=(s.subsections??[]).map((s=>"type"in s?{type:"divider"}:{id:s.id,label:s.label,isInactive:s.isInactive}));return i("ds-shell-page",{responsiveMode:this.resolvedMode,headerCapacity:w(this.resolvedMode,this.managedToolsOpen||this.managedToolsClosing),contentInset:s.contentInset??"default",contentInsetBlockStart:s.contentInsetBlockStart??"default",contentInsetBlockStartSize:s.contentInsetBlockStartSize,compactContentInsetBlockStartSize:s.compactContentInsetBlockStartSize,scrollCompaction:s.scrollCompaction??true,contentSurface:s.contentSurface??"primary"},i("ds-bar-title",{slot:"header",heading:s.heading??"",description:s.description??"",showBack:s.showBack??false,backAriaLabel:s.backAriaLabel??"Back",backLabel:s.backLabel??"Back",breadcrumbs:s.breadcrumbs??[],breadcrumbAriaLabel:s.breadcrumbAriaLabel??"Breadcrumb",sections:t,value:s.subvalue??"",sectionsAriaLabel:s.subsectionsAriaLabel??"Change page subsection",primaryAction:s.primaryAction??null,actions:s.actions??[],actionsAriaLabel:s.actionsAriaLabel??"More page actions",showDivider:s.showHeaderDivider??true,showCompactDivider:s.showCompactHeaderDivider,onDsBack:this.handleManagedPageBack,onDsBreadcrumbSelect:this.handleManagedBreadcrumbSelect,onDsSectionChange:this.handleManagedSubsectionChange,onDsAction:this.handleManagedPageAction}),i("ds-mobile-header",{slot:"mobile-header",heading:s.heading??"",headingLevel:s.headingLevel??"h1",sections:e,value:s.showBack?"":s.value??"",sectionsAriaLabel:s.sectionsAriaLabel??"Change page section",subsections:s.subsections??[],subvalue:s.subvalue??"",subsectionsAriaLabel:s.subsectionsAriaLabel??"Change page subsection",tone:s.tone??"default",onDsSectionChange:this.handleManagedTabChange,onDsSubsectionChange:this.handleManagedSubsectionChange},this.renderManagedMobileLeading(),this.renderManagedMobileActions()),i("slot",null))}renderSlottedShell(s,e,t,o,a){return i(n,{class:s,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"}),i("div",{class:"shell-app__panel","aria-hidden":a?"true":undefined,inert:a?true:undefined},i("slot",{name:"panel"})),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":a?"true":undefined,inert:a?true:undefined},i("slot",{name:"bar"})),i("div",{class:"shell-app__tools","aria-hidden":e&&(!t||this.mobileSheetNavOpen)?"true":undefined,inert:e&&(!t||this.mobileSheetNavOpen)?true:undefined,hidden:e&&!t},i("slot",{name:"tools"})),i("div",{class:"shell-app__content ds-focus-ring","aria-hidden":a||o?"true":undefined,inert:a||o?true:undefined,tabIndex:0},i("slot",null)),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!e||!this.mobileSheetNavOpen,"aria-hidden":e&&this.mobileSheetNavOpen?undefined:"true",inert:e&&this.mobileSheetNavOpen?undefined:true},i("slot",{name:"mobile-sheet-nav"})),i("div",{class:"shell-app__mobile-bar-nav",hidden:!e},i("slot",{name:"mobile-bar-nav"})))))}render(){const s=this.chromeLayerActive();const e=this.resolvedMode==="mobile";const t=e&&this.effectiveMobileDestination!=="area";const o=e&&(t||this.effectiveMobileSheetNavOpen);const a=!e&&this.toolsFullscreen;const l={"shell-app":true,"shell-app--gradient":s,[`shell-app--${this.navStyle}`]:true,[`shell-app--${this.resolvedMode}`]:true,"shell-app--tools-fullscreen":a,"shell-app--mobile-tool-active":t,"shell-app--mobile-sheet-nav-open":e&&this.effectiveMobileSheetNavOpen,"shell-app--managed":this.managed,"shell-app--slotted":!this.managed};if(!this.managed){return this.renderSlottedShell(l,e,t,o,a)}return i(n,{class:l,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"}),i("div",{class:"shell-app__panel","aria-hidden":a?"true":undefined,inert:a?true:undefined},this.renderManagedPanelNav()),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":a?"true":undefined,inert:a?true:undefined},this.renderManagedBarNav()),i("div",{class:"shell-app__tools","aria-hidden":e&&(!t||this.effectiveMobileSheetNavOpen)?"true":undefined,inert:e&&(!t||this.effectiveMobileSheetNavOpen)?true:undefined,hidden:e&&!t},this.renderManagedTools()),i("div",{class:"shell-app__content ds-focus-ring","aria-hidden":a||o?"true":undefined,inert:a||o?true:undefined,tabIndex:0},this.renderManagedPage()),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!e||!this.effectiveMobileSheetNavOpen,"aria-hidden":e&&this.effectiveMobileSheetNavOpen?undefined:"true",inert:e&&this.effectiveMobileSheetNavOpen?undefined:true},this.renderManagedMobileSheetNav()),i("div",{class:"shell-app__mobile-bar-nav",hidden:!e},this.renderManagedMobileBarNav()))))}get el(){return this}static get watchers(){return{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}}static get style(){return _s()}},[262,"ds-shell-app",{composition:[513],navigation:[16],pageChrome:[16],tools:[16],navStyle:[513,"nav-style"],gradientPreset:[513,"gradient-preset"],shortcutsEnabled:[4,"shortcuts-enabled"],mobileDestination:[1,"mobile-destination"],mobileSheetNavOpen:[4,"mobile-sheet-nav-open"],toolsFullscreen:[32],resolvedMode:[32],managedToolsOpen:[32],managedToolsClosing:[32],managedActiveTool:[32],managedToolPresentation:[32],managedMobileDestination:[32],managedMobileSheetNavOpen:[32],managedInboxTool:[32],managedBrowseContext:[32],activateTool:[64],closeGlobalSurface:[64],setToolPresentation:[64]},[[0,"dsPresentationChange","handleToolsPresentation"],[10,"keydown","handleWindowKeyDown"]],{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}]);ws.FOREGROUND_REFRESH_MS=50;function ys(){if(typeof customElements==="undefined"){return}const s=["ds-shell-app","ds-badge","ds-bar-nav","ds-bar-title","ds-breadcrumb","ds-button-filled","ds-button-unfilled","ds-icon","ds-loader","ds-menu","ds-mobile-bar-nav","ds-mobile-header","ds-mobile-section-switcher","ds-mobile-sheet-nav","ds-panel-nav","ds-panel-tool-header","ds-panel-tools","ds-shell-page","ds-shell-tools","ds-swatch-picker","ds-switch","ds-tab-group","ds-tag","ds-text","ds-tooltip"];s.forEach((s=>{switch(s){case"ds-shell-app":if(!customElements.get(o(s))){customElements.define(o(s),ws)}break;case"ds-badge":if(!customElements.get(o(s))){k()}break;case"ds-bar-nav":if(!customElements.get(o(s))){f()}break;case"ds-bar-title":if(!customElements.get(o(s))){x()}break;case"ds-breadcrumb":if(!customElements.get(o(s))){C()}break;case"ds-button-filled":if(!customElements.get(o(s))){S()}break;case"ds-button-unfilled":if(!customElements.get(o(s))){D()}break;case"ds-icon":if(!customElements.get(o(s))){M()}break;case"ds-loader":if(!customElements.get(o(s))){L()}break;case"ds-menu":if(!customElements.get(o(s))){T()}break;case"ds-mobile-bar-nav":if(!customElements.get(o(s))){P()}break;case"ds-mobile-header":if(!customElements.get(o(s))){A()}break;case"ds-mobile-section-switcher":if(!customElements.get(o(s))){B()}break;case"ds-mobile-sheet-nav":if(!customElements.get(o(s))){E()}break;case"ds-panel-nav":if(!customElements.get(o(s))){j()}break;case"ds-panel-tool-header":if(!customElements.get(o(s))){z()}break;case"ds-panel-tools":if(!customElements.get(o(s))){l()}break;case"ds-shell-page":if(!customElements.get(o(s))){N()}break;case"ds-shell-tools":if(!customElements.get(o(s))){I()}break;case"ds-swatch-picker":if(!customElements.get(o(s))){O()}break;case"ds-switch":if(!customElements.get(o(s))){F()}break;case"ds-tab-group":if(!customElements.get(o(s))){$()}break;case"ds-tag":if(!customElements.get(o(s))){W()}break;case"ds-text":if(!customElements.get(o(s))){H()}break;case"ds-tooltip":if(!customElements.get(o(s))){G()}break}}))}ys();const ks=ws;const xs=ys;export{ks as DsShellApp,xs as defineCustomElement};
|
|
1
|
+
import{p as s,H as e,c as t,h as i,a as n,t as o}from"./index.js";import{c as a,d as l}from"./p-BGGm1NB1.js";import{C as h,c as r,r as d,a as c,b as p,e as u,d as f}from"./p-o1v7Choa.js";import{i as b,a as m,b as g,r as v,S as _,c as w}from"./p-DNpE0RBz.js";import{d as k}from"./p-Dcnd5ZX5.js";import{d as y}from"./p-D8nnhQNJ.js";import{d as x}from"./p-BiIdszv1.js";import{d as C}from"./p-PzI11fs8.js";import{d as S}from"./p-DvJkkdIO.js";import{d as D}from"./p-CTTDiW33.js";import{d as M}from"./p-BFfLvMZd.js";import{d as L}from"./p-Ca-I2UnB.js";import{d as B}from"./p-Ccq1RmOb.js";import{d as T}from"./p-1tOy4H51.js";import{d as P}from"./p-CXqVVdW2.js";import{d as E}from"./p-Ba1l3Yot.js";import{d as j}from"./p-ohWEVGHg.js";import{d as z}from"./p-B2hqUkg-.js";import{d as A}from"./p-BXNLaPbw.js";import{d as N}from"./p-DjqZWBnM.js";import{d as I}from"./p-w64TmQd-.js";import{d as $}from"./p-DgWGfscR.js";import{d as O}from"./p-Btxwp4lJ.js";import{d as G}from"./p-CbfmzgdW.js";import{d as W}from"./p-jMCRaxQW.js";import{d as F}from"./p-DZFilC--.js";import{d as H}from"./p-CtOK5oZ1.js";const R=["none","cool","neutral","warm","fresh"];const V="neutral";const U={cool:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-blue-strong-background)",position:100}]},neutral:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-grey-strong-background)",position:100}]},warm:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-yellow-strong-background)",position:100}]},fresh:{opacity:.4,stops:[{color:"var(--color-color-intent-cyan-faint-background)",position:0},{color:"var(--color-background-transparent)",position:47},{color:"var(--color-background-transparent)",position:58},{color:"var(--color-color-intent-red-faint-background)",position:83},{color:"var(--color-color-intent-pink-faint-background)",position:100}]}};const q="100% 100% at 0% 0%";function Z(s){const e=Q(s);return e==="none"?null:U[e]}function K(s){return String(Z(s)?.opacity??0)}function J(s){return R.includes(s)}function Q(s){return s!=null&&J(s)?s:V}function X(s){const e=Q(s);if(e==="none")return"none";return Y(U[e].stops)}function Y(s){const e=s.map((s=>`${s.color} ${s.position}%`)).join(", ");return`radial-gradient(${q}, ${e})`}const ss="--ds-shell-gradient-image";const es="--ds-shell-gradient-size";const ts="--ds-shell-gradient-position-panel";const is="--ds-shell-gradient-position-bar";const ns="--ds-shell-gradient-opacity";function os(s=V){return X(s)}function as(s){const e=typeof globalThis.window!=="undefined"?globalThis.window:undefined;if(!e)return{width:0,height:0};const t=e.visualViewport;return{width:Math.round(t?.width??e.innerWidth),height:Math.round(t?.height??e.innerHeight)}}function ls(s){return`${Math.round(s.width)}px ${Math.round(s.height)}px`}function hs(){return"0 0"}function rs(s){return`${-Math.round(s)}px 0`}const ds={k:"search",a:"agents",s:"stacks",m:"messages",n:"activity","/":"help"};function cs(s){return!s.metaKey&&!s.ctrlKey&&!s.altKey&&!s.shiftKey}function ps(s){if(!s||typeof s!=="object")return false;if(!("closest"in s)||typeof s.closest!=="function")return false;const e=s;const t=e.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]');if(t)return true;const i=e.getAttribute("role");if(i==="textbox"||i==="combobox"||i==="searchbox")return true;return Boolean(e.isContentEditable)}function us(s){if(s.key==="["||s.code==="BracketLeft")return"[";if(s.key==="]"||s.code==="BracketRight")return"]";return s.key.length===1?s.key.toLowerCase():s.key.toLowerCase()}function fs(s){if(!cs(s))return null;const e=us(s);if(e==="[")return"toggle-panel-nav";if(e==="]")return"close-panel-tools";const t=ds[e];if(t)return`open-tool:${t}`;return null}function bs(s,e){if(typeof document==="undefined")return 0;const t=document.createElement("div");t.style.cssText="position:absolute;visibility:hidden;pointer-events:none;height:0;width:var("+e+");";s.appendChild(t);const i=t.getBoundingClientRect().width;s.removeChild(t);return i}function ms(s){return{expandedPx:bs(s,"--_nav-width"),collapsedPx:bs(s,"--_nav-width-collapsed")}}function gs(s,e){if(e?.classList.contains("panel-nav--collapsed"))return true;const t=s?.collapsed;return t===true}function vs(s,e){return e?s.collapsedPx:s.expandedPx}const _s=()=>`@media (forced-colors: active){.sc-ds-shell-app:root,.sc-ds-shell-app-h,.ds-forced-colors-scope.sc-ds-shell-app{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.sc-ds-shell-app-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-shell-app-h,.ds-focus-ring.sc-ds-shell-app,.ds-focus-ring-inset.sc-ds-shell-app-h,.ds-focus-ring-inset.sc-ds-shell-app{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-shell-app-h:focus-visible,.ds-focus-ring.sc-ds-shell-app:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-shell-app-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-shell-app{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-shell-app-h:focus-visible,.ds-focus-ring-inset.sc-ds-shell-app:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-shell-app-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-shell-app:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){.sc-ds-shell-app-h{--ds-focus-ring-color:var(--ds-forced-color-selected)}}.sc-ds-shell-app-h{display:flex;flex-direction:column;height:100%;min-height:0;box-sizing:border-box;overflow:hidden;overscroll-behavior:none;font-family:var(--typography-font-family-ui, system-ui);--ds-shell-panel-tools-width:var(--dimension-panel-width-xs)}.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-secondary)}.shell-app__row.sc-ds-shell-app{display:flex;flex:1 1 0;min-height:0;position:relative}.shell-app__banner.sc-ds-shell-app{flex:0 0 auto;min-width:0;position:relative;z-index:5}.shell-app__banner.sc-ds-shell-app-s>ds-banner,.shell-app__banner .sc-ds-shell-app-s>ds-banner{display:grid;width:100%}.shell-app__chrome.sc-ds-shell-app{position:absolute;inset:0;pointer-events:none;z-index:0;background-color:var(--_shell-chrome-bg)}.shell-app--gradient.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app::before{content:'';position:absolute;inset:0;pointer-events:none;background-position:0 0;background-attachment:fixed;z-index:1;opacity:var(--ds-shell-gradient-opacity, 1);background-image:var(--ds-shell-gradient-image, none);background-size:var(--ds-shell-gradient-size, auto);background-repeat:no-repeat}.shell-app__panel.sc-ds-shell-app{flex:0 0 auto;min-height:0;height:100%;position:relative;z-index:2}.shell-app__panel.sc-ds-shell-app-s>ds-panel-nav,.shell-app__panel .sc-ds-shell-app-s>ds-panel-nav{display:block;height:100%}.shell-app__panel.sc-ds-shell-app>ds-panel-nav.sc-ds-shell-app{display:block;height:100%}.shell-app__main.sc-ds-shell-app{flex:1 1 auto;min-width:0;min-height:0;display:grid;grid-template-columns:minmax(0, 1fr) auto;grid-template-rows:auto minmax(0, 1fr);grid-template-areas:'bar tools' 'content tools';position:relative;z-index:1}.shell-app__mobile-sheet-nav.sc-ds-shell-app,.shell-app__mobile-bar-nav.sc-ds-shell-app{display:none}.shell-app__bar.sc-ds-shell-app{grid-area:bar;flex:0 0 auto;min-width:0}.shell-app__bar.sc-ds-shell-app-s>ds-bar-nav,.shell-app__bar .sc-ds-shell-app-s>ds-bar-nav{display:block}.shell-app__bar.sc-ds-shell-app>ds-bar-nav.sc-ds-shell-app{display:block}.shell-app__content.sc-ds-shell-app{grid-area:content;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:none;contain:layout}.shell-app__content.sc-ds-shell-app{position:relative;z-index:1;background-color:var(--color-background-primary)}.shell-app__tools.sc-ds-shell-app{grid-area:tools;flex:0 0 auto;min-width:0;min-height:0;height:100%;display:flex;position:relative;z-index:0;overflow:hidden}.shell-app__tools.sc-ds-shell-app-s>ds-panel-tools,.shell-app__tools .sc-ds-shell-app-s>ds-panel-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app-s>ds-shell-tools,.shell-app__tools .sc-ds-shell-app-s>ds-shell-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app>ds-shell-tools.sc-ds-shell-app{display:block;height:100%;min-height:0}.shell-app__content.sc-ds-shell-app>ds-shell-page.sc-ds-shell-app{display:block;min-height:100%}.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{visibility:hidden}.shell-app--mobile.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-primary);padding-block-start:env(safe-area-inset-top)}.shell-app--mobile.shell-app--foreground-refresh.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{transform:translateZ(0)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app{display:none}.shell-app--mobile.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{width:100%;box-sizing:border-box;grid-template-columns:minmax(0, 1fr);grid-template-rows:minmax(0, 1fr) auto;grid-template-areas:'stage' 'mobile-bar-nav';background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{grid-area:stage;min-width:0;min-height:0;height:100%;position:relative}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{z-index:1;overflow:auto}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{z-index:2;width:100%;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{display:block;z-index:3;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav.sc-ds-shell-app{grid-area:mobile-bar-nav;display:block;min-width:0;position:relative;z-index:4}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav[hidden].sc-ds-shell-app{display:none}.shell-app--mobile-tool-active.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{visibility:hidden}`;const ws=s(class s extends e{constructor(s){super();if(s!==false){this.__registerHost()}this.dsResponsiveModeChange=t(this,"dsResponsiveModeChange");this.dsNavSelect=t(this,"dsNavSelect");this.dsTabChange=t(this,"dsTabChange");this.dsSubsectionChange=t(this,"dsSubsectionChange");this.dsPageBack=t(this,"dsPageBack");this.dsBreadcrumbSelect=t(this,"dsBreadcrumbSelect");this.dsPageAction=t(this,"dsPageAction");this.dsToolChange=t(this,"dsToolChange");this.dsHeaderBack=t(this,"dsHeaderBack");this.dsHeaderAction=t(this,"dsHeaderAction");this.dsPresentationChange=t(this,"dsPresentationChange");this.dsBrowseContextChange=t(this,"dsBrowseContextChange");this.dsNavFooterAction=t(this,"dsNavFooterAction");this.dsNavUserAction=t(this,"dsNavUserAction");this.composition="managed";this.navigation={};this.pageChrome={};this.tools={};this.navStyle="dashboard";this.gradientPreset=V;this.shortcutsEnabled=true;this.mobileDestination="area";this.mobileSheetNavOpen=false;this.toolsFullscreen=false;this.resolvedMode="desktop";this.managedToolsOpen=false;this.managedToolsClosing=false;this.managedActiveTool="";this.managedToolPresentation="drawer";this.managedMobileDestination="area";this.managedMobileSheetNavOpen=false;this.managedInboxTool="";this.managedBrowseContext="dashboard";this.resizeObserver=null;this.hasLoaded=false;this.foregroundRefreshTimer=null;this.panelNavTransition=new h;this.chromeSyncCoalescer=r((()=>this.syncChrome()));this.panelWidthTokens={expandedPx:0,collapsedPx:0};this.cachedViewportWidth=0;this.cachedViewportHeight=0;this.onWindowResize=()=>{this.updateResponsiveMode();if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onVisualViewportChange=()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onChromeTransitionStart=s=>{const e=u(s);if(e==="panel-tools"){if(d(s)==="closing"){this.managedToolsClosing=true}return}if(e!=="panel-nav")return;this.panelNavTransition.enter();const t=as();this.cachedViewportWidth=t.width;this.cachedViewportHeight=t.height;this.syncChrome()};this.onChromeTransitionEnd=s=>{const e=u(s);if(e==="panel-tools"){this.managedToolsClosing=false;return}if(e!=="panel-nav")return;this.panelNavTransition.exit();if(!this.panelNavTransition.isActive){this.scheduleChromeSync()}};this.onDocumentVisibilityChange=()=>{if(!document.hidden)this.refreshAfterForegroundRestore()};this.onPageShow=s=>{if(s.persisted)this.refreshAfterForegroundRestore()};this.handleManagedNavSelect=s=>{s.stopPropagation();this.dsNavSelect.emit(s.detail)};this.handleManagedTabChange=s=>{s.stopPropagation();this.dsTabChange.emit(s.detail)};this.handleManagedPageBack=s=>{s.stopPropagation();this.dsPageBack.emit(s.detail)};this.handleManagedBreadcrumbSelect=s=>{s.stopPropagation();const e=this.dsBreadcrumbSelect.emit(s.detail);if(e.defaultPrevented)s.preventDefault()};this.handleManagedSubsectionChange=s=>{s.stopPropagation();this.dsSubsectionChange.emit(s.detail)};this.handleManagedPageAction=s=>{s.stopPropagation();this.dsPageAction.emit(s.detail)};this.handleManagedToolChange=s=>{s.stopPropagation();const{id:e,selected:t}=s.detail;this.managedActiveTool=e;this.managedToolsOpen=t;const i=this.resolvedToolItems.find((s=>s.id===e));if(i?.mobileDestination==="inbox"||b(e)){this.managedInboxTool=e}this.managedMobileDestination=t?i?.mobileDestination??m(true,e):"area";this.managedMobileSheetNavOpen=false;this.dsToolChange.emit(s.detail)};this.handleManagedPresentationChange=s=>{s.stopPropagation();this.managedToolPresentation=s.detail.presentation;this.toolsFullscreen=s.detail.presentation==="fullscreen";this.dsPresentationChange.emit(s.detail)};this.handleManagedHeaderBack=s=>{s.stopPropagation();this.dsHeaderBack.emit(s.detail)};this.handleManagedHeaderAction=s=>{s.stopPropagation();this.dsHeaderAction.emit(s.detail)};this.handleManagedSheetToggle=s=>{s.stopPropagation();this.managedMobileSheetNavOpen=s.detail};this.handleManagedMobileDestination=s=>{s.stopPropagation();const e=s.detail.destination;this.managedMobileSheetNavOpen=false;this.managedMobileDestination=e;if(e==="area"){this.managedToolsOpen=false;return}this.activateManagedMobileTool(e)};this.handleManagedAreaSelect=s=>{s.stopPropagation();if(s.detail==="help"){this.managedMobileSheetNavOpen=false;this.managedMobileDestination="help";if(this.activateManagedMobileTool("help"))return}this.managedMobileSheetNavOpen=false;this.managedMobileDestination="area";this.managedToolsOpen=false;this.dsNavSelect.emit(s.detail)};this.handleManagedBrowseContext=s=>{s.stopPropagation();this.managedBrowseContext=s.detail;this.dsBrowseContextChange.emit(s.detail)};this.handleManagedSheetClose=s=>{s.stopPropagation();this.managedMobileSheetNavOpen=false};this.handleManagedNavFooterAction=s=>{s.stopPropagation();this.dsNavFooterAction.emit()};this.handleManagedNavUserAction=s=>{s.stopPropagation();this.dsNavUserAction.emit(s.detail)}}get managed(){return this.composition==="managed"}get effectiveMobileDestination(){return this.managed?this.managedMobileDestination:this.mobileDestination}get effectiveMobileSheetNavOpen(){return this.managed?this.managedMobileSheetNavOpen:this.mobileSheetNavOpen}get resolvedNavigationGroups(){if(this.navigation.groups?.length)return this.navigation.groups;return this.managedBrowseContext==="settings"?this.navigation.settingsGroups??[]:this.navigation.dashboardGroups??[]}get resolvedToolItems(){return this.tools.items??a}get availableInboxTools(){return this.resolvedToolItems.filter((s=>!s.isInactive&&(s.mobileDestination==="inbox"||b(s.id)))).map((s=>s.id))}componentWillLoad(){if(typeof window!=="undefined"){this.resolvedMode=g(window.innerWidth)}this.managedBrowseContext=this.navigation.browseContext??this.navStyle;this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen;this.managedInboxTool=v("",this.availableInboxTools)}componentDidLoad(){this.hasLoaded=true;this.syncSlottedNavStyle();this.syncSlottedMobileState();this.connectMetricsObserver();this.connectViewportListeners();this.connectPageLifecycleListeners();this.el.addEventListener(c,this.onChromeTransitionStart);this.el.addEventListener(p,this.onChromeTransitionEnd);requestAnimationFrame((()=>{this.cachePanelWidthTokens();this.scheduleChromeSync()}));const s=this.el.querySelector("ds-shell-tools, ds-panel-tools");this.toolsFullscreen=s?.getAttribute("presentation")==="fullscreen"}handleToolsPresentation(s){this.toolsFullscreen=s.detail?.presentation==="fullscreen"}disconnectedCallback(){this.resizeObserver?.disconnect();this.resizeObserver=null;this.disconnectViewportListeners();this.disconnectPageLifecycleListeners();this.cancelForegroundRefresh();this.chromeSyncCoalescer.cancel();this.el.removeEventListener(c,this.onChromeTransitionStart);this.el.removeEventListener(p,this.onChromeTransitionEnd)}onShellPropsChange(){this.syncSlottedNavStyle();this.scheduleChromeSync()}handleNavigationChange(){this.managedBrowseContext=this.navigation.browseContext??this.navStyle}handleToolsChange(){if(this.managedActiveTool&&!this.resolvedToolItems.some((s=>s.id===this.managedActiveTool))){this.managedToolsOpen=false;this.managedActiveTool="";this.managedMobileDestination="area"}this.managedInboxTool=v(this.managedInboxTool,this.availableInboxTools)}onMobileStateChange(s,t){if(this.managed){this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen}this.syncSlottedMobileState();if(t===true&&!this.effectiveMobileSheetNavOpen&&this.resolvedMode==="mobile"){requestAnimationFrame((()=>{const s=this.el.querySelector("ds-mobile-bar-nav");const t=document.activeElement;if(t instanceof e&&s?.contains(t))return;void s?.focusDestination?.("sheet-nav")}))}}updateResponsiveMode(){if(typeof window==="undefined")return;const s=g(window.innerWidth);if(s===this.resolvedMode)return;this.resolvedMode=s;this.syncSlottedMobileState();this.scheduleChromeSync();if(this.hasLoaded)this.dsResponsiveModeChange.emit({mode:s})}scheduleChromeSync(){this.chromeSyncCoalescer.schedule()}syncSlottedNavStyle(){const s=this.el.querySelector("ds-panel-nav");const e=this.el.querySelector("ds-bar-nav");if(s){s.setAttribute("nav-style",this.navStyle);s.navStyle=this.navStyle}if(e){e.setAttribute("nav-style",this.navStyle);e.navStyle=this.navStyle}}syncSlottedMobileState(){const s=this.el.querySelector("ds-shell-tools");const e=this.el.querySelector("ds-mobile-bar-nav");const t=this.el.querySelector("ds-mobile-sheet-nav");if(s){s.setAttribute("responsive-mode",this.resolvedMode);s.responsiveMode=this.resolvedMode}if(e){e.activeDestination=this.effectiveMobileDestination;e.sheetNavExpanded=this.effectiveMobileSheetNavOpen}if(t){t.open=this.effectiveMobileSheetNavOpen}}connectMetricsObserver(){this.resizeObserver=new ResizeObserver((()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()}));this.resizeObserver.observe(this.el);const s=this.el.querySelector(".shell-app__panel");if(s)this.resizeObserver.observe(s)}connectViewportListeners(){if(typeof window==="undefined")return;window.addEventListener("resize",this.onWindowResize,{passive:true});const s=window.visualViewport;if(s){s.addEventListener("resize",this.onVisualViewportChange,{passive:true});s.addEventListener("scroll",this.onVisualViewportChange,{passive:true})}}disconnectViewportListeners(){if(typeof window==="undefined")return;window.removeEventListener("resize",this.onWindowResize);const s=window.visualViewport;if(s){s.removeEventListener("resize",this.onVisualViewportChange);s.removeEventListener("scroll",this.onVisualViewportChange)}}connectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.addEventListener("visibilitychange",this.onDocumentVisibilityChange);window.addEventListener("pageshow",this.onPageShow)}disconnectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.removeEventListener("visibilitychange",this.onDocumentVisibilityChange);window.removeEventListener("pageshow",this.onPageShow)}cancelForegroundRefresh(){if(this.foregroundRefreshTimer!==null){window.clearTimeout(this.foregroundRefreshTimer);this.foregroundRefreshTimer=null}this.el.classList.remove("shell-app--foreground-refresh")}refreshAfterForegroundRestore(){this.updateResponsiveMode();this.syncSlottedMobileState();this.scheduleChromeSync();if(this.resolvedMode!=="mobile")return;this.cancelForegroundRefresh();this.el.classList.add("shell-app--foreground-refresh");this.foregroundRefreshTimer=window.setTimeout((()=>{this.foregroundRefreshTimer=null;this.el.classList.remove("shell-app--foreground-refresh");void this.el.querySelector(".shell-app__main")?.offsetHeight}),s.FOREGROUND_REFRESH_MS)}cachePanelWidthTokens(){const s=this.el.querySelector("ds-panel-nav .panel-nav");if(!s)return;this.panelWidthTokens=ms(s)}applyGradientVars(s,e){const t=s.style;for(const[s,i]of Object.entries(e)){if(i===null)t.removeProperty(s);else t.setProperty(s,i)}}clearGradientPaintVars(s){const e=[ss,es,ns];for(const t of s){for(const s of e)t.style.removeProperty(s)}}syncChromeLayoutVars(s,e,t,i){if(s){s.style.setProperty(ts,t)}if(e){e.style.setProperty(is,i)}}resolvePanelWidthPx(s){const e=s?.querySelector(".panel-nav");if(this.panelNavTransition.isActive&&this.panelWidthTokens.expandedPx>0){const t=gs(s,e);return vs(this.panelWidthTokens,t)}const t=this.el.querySelector(".shell-app__panel");const i=t?.getBoundingClientRect().width??0;if(i>0)return i;if(this.panelWidthTokens.expandedPx>0){const t=gs(s,e);return vs(this.panelWidthTokens,t)}return 0}resolveViewportDimensions(){if(this.panelNavTransition.isActive&&this.cachedViewportWidth>0){return{width:this.cachedViewportWidth,height:this.cachedViewportHeight}}return as()}chromeLayerActive(){return this.resolvedMode!=="mobile"&&Q(this.gradientPreset)!=="none"}handleWindowKeyDown(s){if(!this.shortcutsEnabled)return;if(ps(s.target))return;const e=fs(s);if(!e)return;s.preventDefault();const t=this.el.querySelector("ds-panel-nav");const i=this.el.querySelector("ds-shell-tools, ds-panel-tools");if(e==="toggle-panel-nav"){void t?.toggleCollapsed();return}if(e==="close-panel-tools"){void i?.closeDrawer?.();return}if(e.startsWith("open-tool:")&&i){const s=e.slice("open-tool:".length);void i.activateTool?.(s)}}async activateTool(s){const e=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(e?.activateTool?.(s))}async closeGlobalSurface(){if(this.managedMobileSheetNavOpen){this.managedMobileSheetNavOpen=false;return}const s=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(s?.closeDrawer?.())}async setToolPresentation(s){this.managedToolPresentation=s;this.toolsFullscreen=s==="fullscreen"}activateManagedMobileTool(s){const e=s==="inbox"?v(this.managedInboxTool,this.availableInboxTools):s;if(!e)return false;const t=this.resolvedToolItems.find((t=>t.id===e||s!=="inbox"&&t.mobileDestination===s));if(!t||t.isInactive)return false;const i=t.id;this.managedActiveTool=i;this.managedToolsOpen=true;if(b(i))this.managedInboxTool=i;this.dsToolChange.emit({id:i,selected:true});return true}get currentArea(){const s=[...this.navigation.dashboardGroups??[],...this.navigation.settingsGroups??[],...this.resolvedNavigationGroups];const e=s.flatMap((s=>s.items));const t=this.navigation.activeId||k(this.navigation.currentUrl??this.pageChrome.currentUrl??"",e);return e.find((s=>s.id===t))??e[0]??{id:"area",icon:"MapPage",label:this.pageChrome.heading||"Area"}}toolDot(s){return this.resolvedToolItems.find((e=>e.id===s))?.dot??false}syncChrome(){const s=this.el.querySelector("ds-panel-nav");const e=this.el.querySelector("ds-bar-nav");const t=[this.el,s,e].filter((s=>s!==null));const i=()=>{if(s)s.style.removeProperty(ts);if(e)e.style.removeProperty(is)};const n=Q(this.gradientPreset);if(n==="none"||this.resolvedMode==="mobile"){this.clearGradientPaintVars(t);i();return}const o=this.resolveViewportDimensions();const a=this.resolvePanelWidthPx(s);const l=hs();const h=rs(a);this.syncChromeLayoutVars(s,e,l,h);const r=os(n);const d=ls({width:o.width,height:o.height});const c=K(n);for(const s of t){if(s===this.el){this.applyGradientVars(s,{[ss]:r,[es]:d,[ts]:l,[is]:h,[ns]:c});continue}const e=s.tagName.toLowerCase()==="ds-bar-nav";this.applyGradientVars(s,{[ss]:r,[es]:d,[ns]:c,[ts]:e?null:l,[is]:e?h:null})}}renderManagedPanelNav(){const s=this.navigation;return i("ds-panel-nav",{navStyle:this.navStyle,groups:this.resolvedNavigationGroups,breakpoint:_,routerMode:s.routerMode??"event",activeId:s.activeId??"",currentUrl:s.currentUrl??this.pageChrome.currentUrl??"",storageKey:s.storageKey??"",userName:s.userName??"",userInitial:s.userInitial??"",accountMenuExpanded:s.accountMenuExpanded??false,dashboardLabel:s.dashboardLabel??"Dashboard",settingsLabel:s.settingsLabel??"Settings",accountLabel:s.accountLabel??"Account",dashboardNavigationLabel:s.dashboardNavigationLabel??"Dashboard navigation",settingsNavigationLabel:s.settingsNavigationLabel??"Settings navigation",navigationItemsLabel:s.navigationLabel??"Navigation items",onDsNavSelect:this.handleManagedNavSelect,onDsNavFooterAction:this.handleManagedNavFooterAction,onDsNavUserAction:this.handleManagedNavUserAction})}renderManagedBarNav(){return i("ds-bar-nav",{navStyle:this.navStyle,tabs:this.pageChrome.tabs??[],value:this.pageChrome.value??"",heading:this.pageChrome.routeHeading??this.pageChrome.heading,basePath:this.pageChrome.basePath??"",currentUrl:this.pageChrome.currentUrl??this.navigation.currentUrl??"",onDsTabChange:this.handleManagedTabChange})}renderManagedToolSlots(){const s=[...new Set(this.resolvedToolItems.map((s=>s.id)))].sort();return s.flatMap((s=>[i("slot",{key:`tool:${s}`,name:s,slot:s}),i("slot",{key:`tool-view:${s}`,name:`${s}-view`,slot:`${s}-view`})]))}renderManagedTools(){const s=this.tools;return i("ds-shell-tools",{responsiveMode:this.resolvedMode,open:this.managedToolsOpen,activeTool:this.managedActiveTool,presentation:this.managedToolPresentation,fullscreenHeaderMode:s.fullscreenHeaderMode??"shared",items:this.resolvedToolItems,headers:s.headers??{},storageKey:s.storageKey??"",toolsLabel:s.toolsLabel??"Tools",toolShortcutsLabel:s.toolShortcutsLabel??"Tool shortcuts",inboxLabel:s.inboxLabel??"Inbox",inboxNavigationLabel:s.inboxNavigationLabel??"Inbox sections",onDsToolChange:this.handleManagedToolChange,onDsPresentationChange:this.handleManagedPresentationChange,onDsHeaderBack:this.handleManagedHeaderBack,onDsHeaderAction:this.handleManagedHeaderAction},this.renderManagedToolSlots())}renderManagedMobileSheetNav(){const s=this.navigation;return i("ds-mobile-sheet-nav",{open:this.managedMobileSheetNavOpen,browseContext:this.managedBrowseContext,dashboardGroups:s.dashboardGroups??s.groups??[],settingsGroups:s.settingsGroups??[],currentUrl:s.currentUrl??this.pageChrome.currentUrl??"",routeSelectionActive:this.managedMobileDestination==="area",navigationLabel:s.navigationLabel??"Application navigation",dashboardLabel:s.dashboardLabel??"Dashboard",settingsLabel:s.settingsLabel??"Settings",accountLabel:s.accountLabel??"Account",showAccount:s.showMobileAccount??true,onDsAreaSelect:this.handleManagedAreaSelect,onDsBrowseContextChange:this.handleManagedBrowseContext,onDsClose:this.handleManagedSheetClose})}renderManagedMobileBarNav(){return i("ds-mobile-bar-nav",{hidden:this.tools.mobileBarHidden??false,activeDestination:this.managedMobileDestination,currentArea:this.currentArea,sheetNavExpanded:this.managedMobileSheetNavOpen,searchLabel:this.tools.items?.find((s=>s.id==="search"))?.ariaLabel??"Search",inboxLabel:this.tools.inboxLabel??"Inbox",messagesLabel:this.tools.items?.find((s=>s.id==="messages"))?.ariaLabel??"Messages",agentsLabel:this.tools.items?.find((s=>s.id==="agents"))?.ariaLabel??"Agents",helpLabel:this.tools.items?.find((s=>s.id==="help"))?.ariaLabel??"Help & Support",searchDot:this.toolDot("search"),inboxDot:this.toolDot("stacks")||this.toolDot("activity"),messagesDot:this.toolDot("messages"),agentsDot:this.toolDot("agents"),onDsSheetNavToggle:this.handleManagedSheetToggle,onDsDestinationChange:this.handleManagedMobileDestination})}renderManagedMobileLeading(){if(!this.pageChrome.showBack){return i("slot",{name:"page-header-leading",slot:"leading"})}return[i("ds-tooltip",{slot:"leading",label:this.pageChrome.backAriaLabel??"Back",side:"bottom",size:"sm"},i("ds-button-unfilled",{variant:"icon",icon:this.pageChrome.backIcon??"ChevronLeft",size:"md","aria-label":this.pageChrome.backAriaLabel??"Back",activeFill:false,hasBorder:false,onDsClick:s=>this.dsPageBack.emit(s.detail)})),i("slot",{name:"page-header-leading",slot:"leading"})]}renderManagedMobileActions(){const s=this.pageChrome.mobileActions??[];return[...s.map((s=>i("ds-tooltip",{slot:"trailing",key:s.id,label:s.ariaLabel,side:"bottom",size:"sm"},i("ds-button-unfilled",{id:s.triggerId||undefined,variant:"icon",icon:s.icon,size:"md","aria-label":s.ariaLabel,haspopup:s.haspopup,controls:s.controls,expanded:s.expanded,pressed:s.pressed,isInactive:s.isInactive,activeFill:false,hasBorder:false,onDsClick:()=>this.dsPageAction.emit(s.id)})))),i("slot",{name:"page-header-trailing",slot:"trailing"})]}renderManagedPage(){const s=this.pageChrome;const e=s.showBack?[]:s.tabs??[];const t=(s.subsections??[]).map((s=>"type"in s?{type:"divider"}:{id:s.id,label:s.label,isInactive:s.isInactive}));return i("ds-shell-page",{responsiveMode:this.resolvedMode,headerCapacity:w(this.resolvedMode,this.managedToolsOpen||this.managedToolsClosing),contentInset:s.contentInset??"default",contentInsetBlockStart:s.contentInsetBlockStart??"default",contentInsetBlockStartSize:s.contentInsetBlockStartSize,compactContentInsetBlockStartSize:s.compactContentInsetBlockStartSize,scrollCompaction:s.scrollCompaction??true,contentSurface:s.contentSurface??"primary"},i("ds-bar-title",{slot:"header",heading:s.heading??"",description:s.description??"",showBack:s.showBack??false,backAriaLabel:s.backAriaLabel??"Back",backLabel:s.backLabel??"Back",breadcrumbs:s.breadcrumbs??[],breadcrumbAriaLabel:s.breadcrumbAriaLabel??"Breadcrumb",sections:t,value:s.subvalue??"",sectionsAriaLabel:s.subsectionsAriaLabel??"Change page subsection",primaryAction:s.primaryAction??null,actions:s.actions??[],actionsAriaLabel:s.actionsAriaLabel??"More page actions",showDivider:s.showHeaderDivider??true,showCompactDivider:s.showCompactHeaderDivider,onDsBack:this.handleManagedPageBack,onDsBreadcrumbSelect:this.handleManagedBreadcrumbSelect,onDsSectionChange:this.handleManagedSubsectionChange,onDsAction:this.handleManagedPageAction}),i("ds-mobile-header",{slot:"mobile-header",heading:s.heading??"",headingLevel:s.headingLevel??"h1",sections:e,value:s.showBack?"":s.value??"",sectionsAriaLabel:s.sectionsAriaLabel??"Change page section",subsections:s.subsections??[],subvalue:s.subvalue??"",subsectionsAriaLabel:s.subsectionsAriaLabel??"Change page subsection",tone:s.tone??"default",onDsSectionChange:this.handleManagedTabChange,onDsSubsectionChange:this.handleManagedSubsectionChange},this.renderManagedMobileLeading(),this.renderManagedMobileActions()),i("slot",null))}renderSlottedShell(s,e,t,o,a){return i(n,{class:s,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"}),i("div",{class:"shell-app__panel","aria-hidden":a?"true":undefined,inert:a?true:undefined},i("slot",{name:"panel"})),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":a?"true":undefined,inert:a?true:undefined},i("slot",{name:"bar"})),i("div",{class:"shell-app__tools","aria-hidden":e&&(!t||this.mobileSheetNavOpen)?"true":undefined,inert:e&&(!t||this.mobileSheetNavOpen)?true:undefined,hidden:e&&!t},i("slot",{name:"tools"})),i("div",{class:"shell-app__content ds-focus-ring","aria-hidden":a||o?"true":undefined,inert:a||o?true:undefined,tabIndex:0},i("slot",null)),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!e||!this.mobileSheetNavOpen,"aria-hidden":e&&this.mobileSheetNavOpen?undefined:"true",inert:e&&this.mobileSheetNavOpen?undefined:true},i("slot",{name:"mobile-sheet-nav"})),i("div",{class:"shell-app__mobile-bar-nav",hidden:!e},i("slot",{name:"mobile-bar-nav"})))))}render(){const s=this.chromeLayerActive();const e=this.resolvedMode==="mobile";const t=e&&this.effectiveMobileDestination!=="area";const o=e&&(t||this.effectiveMobileSheetNavOpen);const a=!e&&this.toolsFullscreen;const l={"shell-app":true,"shell-app--gradient":s,[`shell-app--${this.navStyle}`]:true,[`shell-app--${this.resolvedMode}`]:true,"shell-app--tools-fullscreen":a,"shell-app--mobile-tool-active":t,"shell-app--mobile-sheet-nav-open":e&&this.effectiveMobileSheetNavOpen,"shell-app--managed":this.managed,"shell-app--slotted":!this.managed};if(!this.managed){return this.renderSlottedShell(l,e,t,o,a)}return i(n,{class:l,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"}),i("div",{class:"shell-app__panel","aria-hidden":a?"true":undefined,inert:a?true:undefined},this.renderManagedPanelNav()),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":a?"true":undefined,inert:a?true:undefined},this.renderManagedBarNav()),i("div",{class:"shell-app__tools","aria-hidden":e&&(!t||this.effectiveMobileSheetNavOpen)?"true":undefined,inert:e&&(!t||this.effectiveMobileSheetNavOpen)?true:undefined,hidden:e&&!t},this.renderManagedTools()),i("div",{class:"shell-app__content ds-focus-ring","aria-hidden":a||o?"true":undefined,inert:a||o?true:undefined,tabIndex:0},this.renderManagedPage()),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!e||!this.effectiveMobileSheetNavOpen,"aria-hidden":e&&this.effectiveMobileSheetNavOpen?undefined:"true",inert:e&&this.effectiveMobileSheetNavOpen?undefined:true},this.renderManagedMobileSheetNav()),i("div",{class:"shell-app__mobile-bar-nav",hidden:!e},this.renderManagedMobileBarNav()))))}get el(){return this}static get watchers(){return{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}}static get style(){return _s()}},[262,"ds-shell-app",{composition:[513],navigation:[16],pageChrome:[16],tools:[16],navStyle:[513,"nav-style"],gradientPreset:[513,"gradient-preset"],shortcutsEnabled:[4,"shortcuts-enabled"],mobileDestination:[1,"mobile-destination"],mobileSheetNavOpen:[4,"mobile-sheet-nav-open"],toolsFullscreen:[32],resolvedMode:[32],managedToolsOpen:[32],managedToolsClosing:[32],managedActiveTool:[32],managedToolPresentation:[32],managedMobileDestination:[32],managedMobileSheetNavOpen:[32],managedInboxTool:[32],managedBrowseContext:[32],activateTool:[64],closeGlobalSurface:[64],setToolPresentation:[64]},[[0,"dsPresentationChange","handleToolsPresentation"],[10,"keydown","handleWindowKeyDown"]],{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}]);ws.FOREGROUND_REFRESH_MS=50;function ks(){if(typeof customElements==="undefined"){return}const s=["ds-shell-app","ds-badge","ds-bar-nav","ds-bar-title","ds-breadcrumb","ds-button-filled","ds-button-unfilled","ds-icon","ds-loader","ds-menu","ds-mobile-bar-nav","ds-mobile-header","ds-mobile-section-switcher","ds-mobile-sheet-nav","ds-panel-nav","ds-panel-tool-header","ds-panel-tools","ds-shell-page","ds-shell-tools","ds-swatch-picker","ds-switch","ds-tab-group","ds-tag","ds-text","ds-tooltip"];s.forEach((s=>{switch(s){case"ds-shell-app":if(!customElements.get(o(s))){customElements.define(o(s),ws)}break;case"ds-badge":if(!customElements.get(o(s))){y()}break;case"ds-bar-nav":if(!customElements.get(o(s))){f()}break;case"ds-bar-title":if(!customElements.get(o(s))){x()}break;case"ds-breadcrumb":if(!customElements.get(o(s))){C()}break;case"ds-button-filled":if(!customElements.get(o(s))){S()}break;case"ds-button-unfilled":if(!customElements.get(o(s))){D()}break;case"ds-icon":if(!customElements.get(o(s))){M()}break;case"ds-loader":if(!customElements.get(o(s))){L()}break;case"ds-menu":if(!customElements.get(o(s))){B()}break;case"ds-mobile-bar-nav":if(!customElements.get(o(s))){T()}break;case"ds-mobile-header":if(!customElements.get(o(s))){P()}break;case"ds-mobile-section-switcher":if(!customElements.get(o(s))){E()}break;case"ds-mobile-sheet-nav":if(!customElements.get(o(s))){j()}break;case"ds-panel-nav":if(!customElements.get(o(s))){z()}break;case"ds-panel-tool-header":if(!customElements.get(o(s))){A()}break;case"ds-panel-tools":if(!customElements.get(o(s))){l()}break;case"ds-shell-page":if(!customElements.get(o(s))){N()}break;case"ds-shell-tools":if(!customElements.get(o(s))){I()}break;case"ds-swatch-picker":if(!customElements.get(o(s))){$()}break;case"ds-switch":if(!customElements.get(o(s))){O()}break;case"ds-tab-group":if(!customElements.get(o(s))){G()}break;case"ds-tag":if(!customElements.get(o(s))){W()}break;case"ds-text":if(!customElements.get(o(s))){F()}break;case"ds-tooltip":if(!customElements.get(o(s))){H()}break}}))}ks();const ys=ws;const xs=ks;export{ys as DsShellApp,xs as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-shell-app.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-DjqZWBnM.js";const t=o;const n=s;export{t as DsShellPage,n as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-shell-page.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S as o,d as s}from"./p-
|
|
1
|
+
import{S as o,d as s}from"./p-w64TmQd-.js";const t=o;const m=s;export{t as DsShellTools,m as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-shell-tools.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S as
|
|
1
|
+
import{S as s,d as o}from"./p-DgWGfscR.js";const t=s;const c=o;export{t as DsSwatchPicker,c as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ds-swatch-picker.js.map
|