@ds-mo/ui 15.10.2 → 15.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/dist/.package-ready.json +1 -1
  2. package/dist/agent-patterns.json +1 -1
  3. package/dist/agent.json +12 -11
  4. package/dist/angular/ds-shell-app.d.ts +3 -8
  5. package/dist/angular/ds-shell-tools.d.ts +3 -8
  6. package/dist/components/ds-agent-questionnaire.js +1 -1
  7. package/dist/components/ds-agent-response.js +1 -1
  8. package/dist/components/ds-banner.js +1 -1
  9. package/dist/components/ds-bar-nav.js +1 -1
  10. package/dist/components/ds-bar-page-title.js +1 -1
  11. package/dist/components/ds-bar-title.js +1 -1
  12. package/dist/components/ds-bar-workflow.js +1 -1
  13. package/dist/components/ds-button-unfilled.js +1 -1
  14. package/dist/components/ds-calendar.js +1 -1
  15. package/dist/components/ds-card-chart.js +1 -1
  16. package/dist/components/ds-card-overview.js +1 -1
  17. package/dist/components/ds-card-overview.js.map +1 -1
  18. package/dist/components/ds-card-setting.js +1 -1
  19. package/dist/components/ds-chart.js +1 -1
  20. package/dist/components/ds-chart.js.map +1 -1
  21. package/dist/components/ds-code-block.js +1 -1
  22. package/dist/components/ds-data-customize.js +1 -1
  23. package/dist/components/ds-data-filter.js +1 -1
  24. package/dist/components/ds-data-group.js +1 -1
  25. package/dist/components/ds-data-preferences.js +1 -1
  26. package/dist/components/ds-data-saved-views.js +1 -1
  27. package/dist/components/ds-data-search.js +1 -1
  28. package/dist/components/ds-data-sort.js +1 -1
  29. package/dist/components/ds-filter-menu.js +1 -1
  30. package/dist/components/ds-input-date.js +1 -1
  31. package/dist/components/ds-input-time.js +1 -1
  32. package/dist/components/ds-input.js +1 -1
  33. package/dist/components/ds-markdown.js +1 -1
  34. package/dist/components/ds-menu.js +1 -1
  35. package/dist/components/ds-message-actions.js +1 -1
  36. package/dist/components/ds-message-composer.js +1 -1
  37. package/dist/components/ds-message-scroller.js +1 -1
  38. package/dist/components/ds-mobile-bar-nav.js +1 -1
  39. package/dist/components/ds-mobile-header.js +1 -1
  40. package/dist/components/ds-mobile-section-switcher.js +1 -1
  41. package/dist/components/ds-mobile-sheet-nav.js +1 -1
  42. package/dist/components/ds-modal.js +1 -1
  43. package/dist/components/ds-pagination.js +1 -1
  44. package/dist/components/ds-panel-nav.js +1 -1
  45. package/dist/components/ds-panel-tool-header.js +1 -1
  46. package/dist/components/ds-panel-tool-search.js +1 -1
  47. package/dist/components/ds-panel-tools.js +1 -1
  48. package/dist/components/ds-scroll-overlay.js +1 -1
  49. package/dist/components/ds-select.js +1 -1
  50. package/dist/components/ds-shell-app.js +1 -1
  51. package/dist/components/ds-shell-app.js.map +1 -1
  52. package/dist/components/ds-shell-page.js +1 -1
  53. package/dist/components/ds-shell-tools.js +1 -1
  54. package/dist/components/ds-table.js +1 -1
  55. package/dist/components/ds-table.js.map +1 -1
  56. package/dist/components/ds-toast.js +1 -1
  57. package/dist/components/ds-toast.js.map +1 -1
  58. package/dist/components/ds-tooltip.js +1 -1
  59. package/dist/components/{p-PNY7auMh.js → p-B5rN3slq.js} +2 -2
  60. package/dist/components/{p-kQ6wvk-r.js → p-B9Q7fXxW.js} +2 -2
  61. package/dist/components/p-BNnw_O4e.js +2 -0
  62. package/dist/components/p-BNnw_O4e.js.map +1 -0
  63. package/dist/components/{p-BgpzSEWv.js → p-BT6xQogY.js} +2 -2
  64. package/dist/components/{p-YmJYwnhW.js → p-Ba-dSshd.js} +2 -2
  65. package/dist/components/{p-YmJYwnhW.js.map → p-Ba-dSshd.js.map} +1 -1
  66. package/dist/components/{p-DGIVqwT9.js → p-BkajUPiA.js} +2 -2
  67. package/dist/components/{p-lJeAJKa5.js → p-BqIRExej.js} +2 -2
  68. package/dist/components/{p-BtSEQ-FW.js → p-C8D853vs.js} +2 -2
  69. package/dist/components/{p-CHYYRdRJ.js → p-CEB8RFih.js} +2 -2
  70. package/dist/components/{p-DuCCuJKI.js → p-CGKjjJZm.js} +2 -2
  71. package/dist/components/{p-2ZV8JA88.js → p-CMrHRjjH.js} +2 -2
  72. package/dist/components/{p-DwuqJhR5.js → p-CPNA8raE.js} +2 -2
  73. package/dist/components/{p-ioGH5SoA.js → p-CVYjLzYI.js} +2 -2
  74. package/dist/components/p-CVYjLzYI.js.map +1 -0
  75. package/dist/components/p-CW-7vLUB.js +2 -0
  76. package/dist/components/p-CW-7vLUB.js.map +1 -0
  77. package/dist/components/{p-BrB05_X8.js → p-CaNMVLhm.js} +2 -2
  78. package/dist/components/{p-hmvu1lmP.js → p-Cxk1A7Sx.js} +2 -2
  79. package/dist/components/p-Cxk1A7Sx.js.map +1 -0
  80. package/dist/components/{p-BjLGayCj.js → p-D-cZ6cRI.js} +2 -2
  81. package/dist/components/{p-DQeUT9o2.js → p-D4r6oWyQ.js} +2 -2
  82. package/dist/components/{p-DoRgzvup.js → p-DGDF4NMV.js} +2 -2
  83. package/dist/components/{p-DSpKpoSG.js → p-DKG26pp5.js} +2 -2
  84. package/dist/components/p-DfphSI9S.js +2 -0
  85. package/dist/components/p-DfphSI9S.js.map +1 -0
  86. package/dist/components/p-DfwvHxYi.js +2 -0
  87. package/dist/components/p-DfwvHxYi.js.map +1 -0
  88. package/dist/components/{p-BQE2Uj4p.js → p-DfzXyVoM.js} +2 -2
  89. package/dist/components/{p-BQE2Uj4p.js.map → p-DfzXyVoM.js.map} +1 -1
  90. package/dist/components/{p-z_8aZHHo.js → p-DixX2_Bd.js} +2 -2
  91. package/dist/components/{p-CipTqNIr.js → p-Djkk338n.js} +2 -2
  92. package/dist/components/{p-Dx7wJaLv.js → p-DvMCOJwc.js} +2 -2
  93. package/dist/components/{p-ChsBscqZ.js → p-DwFnt0W0.js} +2 -2
  94. package/dist/components/{p-C0xrqZxm.js → p-OFJpWJcN.js} +2 -2
  95. package/dist/components/{p-Bx_72ylJ.js → p-S5QCVAdH.js} +2 -2
  96. package/dist/docs/components.json +13 -13
  97. package/dist/lib/utils/index.js +3 -1
  98. package/dist/lib/utils/index.js.map +2 -2
  99. package/dist/lib/utils/resolve-css-length-px.d.ts +1 -1
  100. package/dist/mcp-data/registry/card-overview.json +1 -1
  101. package/dist/mcp-data/registry/chart.json +3 -3
  102. package/dist/mcp-data/registry/mobile-bar-nav.json +3 -3
  103. package/dist/mcp-data/registry/mobile-header.json +3 -3
  104. package/dist/mcp-data/registry/mobile-section-switcher.json +3 -2
  105. package/dist/mcp-data/registry/mobile-sheet-nav.json +6 -6
  106. package/dist/mcp-data/registry/modal.json +1 -1
  107. package/dist/mcp-data/registry/panel-tools.json +1 -1
  108. package/dist/mcp-data/registry/registry.json +11 -10
  109. package/dist/mcp-data/registry/shell-app.json +3 -3
  110. package/dist/mcp-data/registry/shell-tools.json +4 -4
  111. package/dist/mcp-data/registry/table.json +2 -2
  112. package/dist/mcp-data/registry/toast.json +1 -1
  113. package/dist/react/ds-shell-app.d.ts +2 -5
  114. package/dist/react/ds-shell-tools.d.ts +2 -5
  115. package/dist/styles/responsive.css +293 -0
  116. package/dist/types/components/ShellApp/ShellApp.d.ts +2 -5
  117. package/dist/types/components/ShellTools/ShellTools.d.ts +2 -5
  118. package/dist/types/components.d.ts +4 -10
  119. package/dist/types/utils/resolve-css-length-px.d.ts +1 -1
  120. package/package.json +2 -1
  121. package/dist/components/p-BfdYb8L4.js +0 -2
  122. package/dist/components/p-BfdYb8L4.js.map +0 -1
  123. package/dist/components/p-BuwYiPCW.js +0 -2
  124. package/dist/components/p-BuwYiPCW.js.map +0 -1
  125. package/dist/components/p-cktJHlYv.js +0 -2
  126. package/dist/components/p-cktJHlYv.js.map +0 -1
  127. package/dist/components/p-hmvu1lmP.js.map +0 -1
  128. package/dist/components/p-iEhBF5Oi.js +0 -2
  129. package/dist/components/p-iEhBF5Oi.js.map +0 -1
  130. package/dist/components/p-ioGH5SoA.js.map +0 -1
  131. /package/dist/components/{p-PNY7auMh.js.map → p-B5rN3slq.js.map} +0 -0
  132. /package/dist/components/{p-kQ6wvk-r.js.map → p-B9Q7fXxW.js.map} +0 -0
  133. /package/dist/components/{p-BgpzSEWv.js.map → p-BT6xQogY.js.map} +0 -0
  134. /package/dist/components/{p-DGIVqwT9.js.map → p-BkajUPiA.js.map} +0 -0
  135. /package/dist/components/{p-lJeAJKa5.js.map → p-BqIRExej.js.map} +0 -0
  136. /package/dist/components/{p-BtSEQ-FW.js.map → p-C8D853vs.js.map} +0 -0
  137. /package/dist/components/{p-CHYYRdRJ.js.map → p-CEB8RFih.js.map} +0 -0
  138. /package/dist/components/{p-DuCCuJKI.js.map → p-CGKjjJZm.js.map} +0 -0
  139. /package/dist/components/{p-2ZV8JA88.js.map → p-CMrHRjjH.js.map} +0 -0
  140. /package/dist/components/{p-DwuqJhR5.js.map → p-CPNA8raE.js.map} +0 -0
  141. /package/dist/components/{p-BrB05_X8.js.map → p-CaNMVLhm.js.map} +0 -0
  142. /package/dist/components/{p-BjLGayCj.js.map → p-D-cZ6cRI.js.map} +0 -0
  143. /package/dist/components/{p-DQeUT9o2.js.map → p-D4r6oWyQ.js.map} +0 -0
  144. /package/dist/components/{p-DoRgzvup.js.map → p-DGDF4NMV.js.map} +0 -0
  145. /package/dist/components/{p-DSpKpoSG.js.map → p-DKG26pp5.js.map} +0 -0
  146. /package/dist/components/{p-z_8aZHHo.js.map → p-DixX2_Bd.js.map} +0 -0
  147. /package/dist/components/{p-CipTqNIr.js.map → p-Djkk338n.js.map} +0 -0
  148. /package/dist/components/{p-Dx7wJaLv.js.map → p-DvMCOJwc.js.map} +0 -0
  149. /package/dist/components/{p-ChsBscqZ.js.map → p-DwFnt0W0.js.map} +0 -0
  150. /package/dist/components/{p-C0xrqZxm.js.map → p-OFJpWJcN.js.map} +0 -0
  151. /package/dist/components/{p-Bx_72ylJ.js.map → p-S5QCVAdH.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PANEL_TOOLS_TOOL_IDS","PANEL_TOOLS_PRIMARY_TOOL_ID","PANEL_TOOLS_LABELS","search","messages","stacks","activity","agents","help","PANEL_TOOLS_SHORTCUTS","PANEL_TOOLS_DEFAULT_ITEMS","id","icon","label","railPlacement","order","shortcutKey","mobileDestination","PANEL_TOOLS_REGION_ORDER","header","body","footer","panelToolsItemOrder","item","canonical","findIndex","Number","MAX_SAFE_INTEGER","orderPanelToolsItems","items","firstById","Map","trim","has","set","Array","from","values","sort","left","right","leftRegion","panelToolsRailPlacement","rightRegion","regionDelta","orderPanelToolsRailEntries","accessories","toolEntries","map","type","firstAccessoryById","accessory","accessoryEntries","leftPlacement","rightPlacement","leftOrder","rightOrder","panelToolsRailFocusKeys","entries","flatMap","entry","action","isInactive","keys","primaryAction","secondaryAction","push","reconcilePanelToolsRovingIndex","previousKeys","nextKeys","currentIndex","length","currentKey","preservedIndex","indexOf","index","nextIndex","Math","min","max","panelToolsRailAccessoryActionDetail","accessoryId","actionId","anchor","isPanelToolsToolId","value","reconcilePanelToolsAvailability","open","activeTool","some","removedTool","panelToolsDrawerTransitionMs","style","properties","transitionProperty","split","durations","transitionDuration","parseCssTimeMs","delays","transitionDelay","reduce","property","duration","delay","panelToolsDrawerResting","motion","panelToolsDrawerAtTerminal","width","targetWidth","resolvePanelToolActivation","selected","panelToolsCss","PanelTools","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","presentation","fullscreenHeaderMode","toolsLabel","toolShortcutsLabel","headers","storageKey","drawerSurfaceRetained","readyForMotion","presentationMotionSuppressed","rovingIndex","fullViewToolIds","railBodyScrollable","motionEnableGeneration","presentationMotionGeneration","transitionGeneration","transitionFallbackTimer","ignoreReplacementTerminal","focusBeforeFullscreen","fullViewObserver","handleComposedHeaderAction","event","detail","stopPropagation","dsHeaderAction","emit","tool","handleTransitionEnd","drawer","renderRoot","querySelector","target","propertyName","drawerTransitionAtTerminal","finishDrawerTransition","handleToolChange","next","dsToolChange","handleRailKeyDown","e","activate","orderedRailEntries","key","preventDefault","focusRailAt","railItems","orderedRailItems","railAccessories","disconnectedCallback","el","removeEventListener","clearTransitionCompletion","disconnect","disconnectRailBodyObserver","presentationChanged","previous","getAttribute","setAttribute","presentationGeneration","requestAnimationFrame","document","activeElement","fallbackActionId","activeHeader","actions","async","isConnected","focus","preventScroll","focusRestored","contains","focusHeaderAction","dsPresentationChange","handleFullscreenEscape","deferMotionEnable","generation","connectedCallback","ANCHORED_OVERLAY_BOUNDARY_ATTRIBUTE","addEventListener","componentWillLoad","restoreLastActiveTool","openChanged","isOpen","wasOpen","undefined","startDrawerTransition","activeToolChanged","persistLastActiveTool","storageKeyChanged","componentDidLoad","connectRailBodyObserver","updateRailBodyScrollable","syncFullViewTools","MutationObserver","observe","childList","attributes","attributeFilter","componentDidRender","railBodyEl","ResizeObserver","railBodyObserver","Boolean","scrollHeight","clientHeight","itemsChanged","reconcileActiveTool","accessoriesChanged","focusedKey","closest","dataset","railFocusKey","focusedIndex","restoreFocus","includes","stored","localStorage","getItem","setItem","clearPersistedTool","removeItem","phase","dsChromeTransitionStart","source","fallbackMs","getComputedStyle","window","setTimeout","getBoundingClientRect","surface","completedPhase","wasTransitioning","dsChromeTransitionEnd","clearTimeout","isRailSelected","isDrawerPresent","isViewActive","hasFullView","ids","filter","join","shadowRoot","accessibleLabel","find","candidate","resolvedHeaders","activateTool","closeDrawer","CSS","escape","setFocus","bounded","renderRailAction","focusKey","ariaLabel","h","side","size","boundary","variant","class","isActive","activeFill","hasBorder","background","pressScale","dot","focusTabIndex","pressed","onFocusin","onKeyDown","onDsClick","accessoryPrimaryLabel","actionLabel","status","statusText","emitAccessoryAction","dsRailAccessoryAction","renderAccessoryVisual","visual","src","alt","initial","slice","as","emphasis","color","name","renderRailShortcut","focusIndexes","focusIndex","get","initials","disabled","tabIndex","onFocus","onClick","currentTarget","renderRailAccessory","primaryKey","primaryIndex","primaryLabel","secondary","secondaryKey","secondaryIndex","statusTone","rounded","renderRailEntry","render","headerTitle","title","headerActions","entryPlacement","headerEntries","bodyEntries","footerEntries","showDrawerChrome","drawerResting","activeFullView","toolIds","Host","role","ref","element","inert","heading","showBack","backIcon","backAriaLabel","showMenu","toolHeader","onDsBack","dsHeaderBack","hidden","active"],"sources":["src/wc/components/PanelTools/panel-tools-types.ts","src/wc/components/PanelTools/panel-tools-utils.ts","src/wc/components/PanelTools/PanelTools.css?tag=ds-panel-tools&encapsulation=shadow","src/wc/components/PanelTools/PanelTools.tsx"],"sourcesContent":["/** Application-owned tool id for the shell rail and responsive tool views. */\nexport type PanelToolsToolId = string;\n\n/** Canonical Motive shell recipe used when item metadata is omitted. */\nexport type CanonicalPanelToolsToolId =\n | 'search'\n | 'messages'\n | 'agents'\n | 'stacks'\n | 'activity'\n | 'help';\n\nexport const PANEL_TOOLS_TOOL_IDS: CanonicalPanelToolsToolId[] = [\n 'agents',\n 'messages',\n 'activity',\n 'search',\n 'stacks',\n 'help',\n];\n\n/** Rail header slot — mirrors panel-nav M logo row. */\nexport const PANEL_TOOLS_PRIMARY_TOOL_ID: CanonicalPanelToolsToolId = 'agents';\n\n/** Rail footer slot — flush to the bottom of the tools column. */\nexport const PANEL_TOOLS_FOOTER_TOOL_ID: CanonicalPanelToolsToolId = 'help';\n\nexport const PANEL_TOOLS_LABELS: Record<CanonicalPanelToolsToolId, string> = {\n search: 'Search',\n messages: 'Messages',\n stacks: 'Stacks',\n activity: 'Activity',\n agents: 'Agents',\n help: 'Help & Support',\n};\n\nexport const PANEL_TOOLS_SHORTCUTS: Partial<Record<CanonicalPanelToolsToolId, string>> = {\n search: 'K',\n agents: 'A',\n messages: 'M',\n stacks: 'S',\n activity: 'N',\n help: '/',\n};\n\nexport type PanelToolsRailPlacement = 'header' | 'body' | 'footer';\n\nexport interface PanelToolsItem {\n id: PanelToolsToolId;\n /** Icon name for <ds-icon>. */\n icon: string;\n /** Visible and accessible fallback label for custom tool ids. */\n label?: string;\n /** Explicit rail region; canonical Agents/Help placement is the fallback. */\n railPlacement?: PanelToolsRailPlacement;\n /** Stable ordering within the selected rail region. */\n order?: number;\n /** Optional shortcut label displayed by the tooltip. */\n shortcutKey?: string;\n /** Mobile destination recipe; canonical ids retain their explicit defaults. */\n mobileDestination?: 'search' | 'inbox' | 'activity' | 'messages' | 'agents' | 'help';\n /** Whether this rail button is currently pressed/active. */\n selected?: boolean;\n /** Show a notification dot. */\n dot?: boolean;\n isInactive?: boolean;\n ariaLabel?: string;\n}\n\nexport type PanelToolsRailAccessoryVisual =\n | { type: 'icon'; icon: string }\n | { type: 'initial'; initial: string }\n | { type: 'image'; src: string };\n\nexport interface PanelToolsRailAccessoryAction {\n /** Stable application-owned action id emitted with the accessory id. */\n id: string;\n /** Overrides the accessory label for the primary action. */\n ariaLabel?: string;\n isInactive?: boolean;\n}\n\nexport interface PanelToolsRailAccessorySecondaryAction {\n id: string;\n icon: string;\n ariaLabel: string;\n isInactive?: boolean;\n}\n\nexport type PanelToolsRailTransientTone = 'active' | 'positive';\n\ninterface PanelToolsRailAccessoryBase {\n /** Stable application-owned identity. Duplicate or blank ids are omitted. */\n id: string;\n /** Explicit rail region; accessories never infer placement from their id. */\n railPlacement: PanelToolsRailPlacement;\n /** Stable ordering within the selected rail region. */\n order: number;\n}\n\n/** Decorative boundary between application-owned rail accessory groups. */\nexport interface PanelToolsRailDividerAccessory extends PanelToolsRailAccessoryBase {\n type: 'divider';\n}\n\n/**\n * A compact one-action shortcut that matches standard tool-button geometry.\n * PanelTools owns its initial orb, notification dot, and transient interaction paint.\n */\nexport interface PanelToolsRailShortcutAccessory extends PanelToolsRailAccessoryBase {\n type: 'shortcut';\n /** Accessible shortcut name and action-label fallback. */\n ariaLabel: string;\n /** One or two displayed graphemes. Longer values are truncated visually. */\n initials: string;\n /** Supplemental notification dot. Include its meaning in the accessible label when needed. */\n dot?: boolean;\n action: PanelToolsRailAccessoryAction;\n}\n\n/**\n * A direct application intent that never selects a tool or changes drawer state.\n * PanelTools owns the two-control-height surface and its focus behavior.\n */\nexport interface PanelToolsRailTransientAccessory extends PanelToolsRailAccessoryBase {\n type: 'transient';\n /** Accessible accessory name and primary-action fallback label. */\n ariaLabel: string;\n visual: PanelToolsRailAccessoryVisual;\n /** State announced with the primary action and shown in its tooltip. */\n statusText: string;\n /** Bold surface treatment. Active uses brand; positive uses positive semantic color. */\n statusTone: PanelToolsRailTransientTone;\n primaryAction: PanelToolsRailAccessoryAction;\n secondaryAction?: PanelToolsRailAccessorySecondaryAction;\n}\n\nexport type PanelToolsRailAccessory =\n | PanelToolsRailDividerAccessory\n | PanelToolsRailShortcutAccessory\n | PanelToolsRailTransientAccessory;\n\nexport interface PanelToolsRailAccessoryActionDetail {\n accessoryId: string;\n actionId: string;\n /** Rendered action control, suitable for anchoring an application-owned overlay. */\n anchor: HTMLElement;\n}\n\n/** Canonical shell recipe used by Lab and by managed ShellApp examples. */\nexport const PANEL_TOOLS_DEFAULT_ITEMS: PanelToolsItem[] = [\n {\n id: 'agents',\n icon: 'AIAsterisk',\n label: PANEL_TOOLS_LABELS.agents,\n railPlacement: 'header',\n order: 0,\n shortcutKey: PANEL_TOOLS_SHORTCUTS.agents,\n mobileDestination: 'agents',\n },\n {\n id: 'messages',\n icon: 'MessageBubbleStack',\n label: PANEL_TOOLS_LABELS.messages,\n order: 0,\n shortcutKey: PANEL_TOOLS_SHORTCUTS.messages,\n mobileDestination: 'messages',\n },\n {\n id: 'activity',\n icon: 'Bell',\n label: PANEL_TOOLS_LABELS.activity,\n order: 1,\n shortcutKey: PANEL_TOOLS_SHORTCUTS.activity,\n mobileDestination: 'activity',\n },\n {\n id: 'search',\n icon: 'MagnifyingGlass',\n label: PANEL_TOOLS_LABELS.search,\n order: 2,\n shortcutKey: PANEL_TOOLS_SHORTCUTS.search,\n mobileDestination: 'search',\n },\n {\n id: 'help',\n icon: 'QuestionCircle',\n label: PANEL_TOOLS_LABELS.help,\n railPlacement: 'footer',\n order: 0,\n shortcutKey: PANEL_TOOLS_SHORTCUTS.help,\n mobileDestination: 'help',\n },\n];\n\nexport interface PanelToolsHeaderAction {\n id: string;\n icon: string;\n ariaLabel: string;\n triggerId?: string;\n controls?: string;\n expanded?: boolean;\n /** Associated surface remains visible, including exit motion. */\n surfaceOpen?: boolean;\n haspopup?: 'menu' | 'dialog' | 'listbox' | 'tree' | 'grid';\n pressed?: boolean;\n isInactive?: boolean;\n}\n\nexport interface PanelToolsHeaderActionDetail {\n tool: PanelToolsToolId;\n id: string;\n /** Rendered header action host. Pass this to an external overlay's element anchor prop. */\n anchor?: HTMLElement;\n}\n\nexport interface PanelToolHeaderActionDetail {\n id: string;\n originalEvent: MouseEvent;\n /** Rendered action host, suitable for anchoring an external overlay across a shadow boundary. */\n anchor: HTMLElement;\n}\n\nexport interface PanelToolsHeaderConfig {\n title?: string;\n showBack?: boolean;\n backIcon?: string;\n backAriaLabel?: string;\n actions?: PanelToolsHeaderAction[];\n}\n\n/** Per-tool header state. The application replaces the object when a tool changes depth or actions. */\nexport type PanelToolsHeaders = Partial<Record<PanelToolsToolId, PanelToolsHeaderConfig>>;\n","import { parseCssTimeMs } from '../../utils/resolve-css-time-ms';\nimport {\n PANEL_TOOLS_PRIMARY_TOOL_ID,\n PANEL_TOOLS_TOOL_IDS,\n type PanelToolsItem,\n type PanelToolsRailAccessory,\n type PanelToolsRailAccessoryActionDetail,\n type PanelToolsRailPlacement,\n type PanelToolsToolId,\n} from './panel-tools-types';\n\nconst PANEL_TOOLS_REGION_ORDER: Record<PanelToolsRailPlacement, number> = {\n header: 0,\n body: 1,\n footer: 2,\n};\n\nfunction panelToolsItemOrder(item: PanelToolsItem): number {\n const canonical = PANEL_TOOLS_TOOL_IDS.findIndex(id => id === item.id);\n return item.order ?? (canonical < 0 ? Number.MAX_SAFE_INTEGER : canonical);\n}\n\nexport function orderPanelToolsItems(items: PanelToolsItem[]): PanelToolsItem[] {\n const firstById = new Map<PanelToolsToolId, PanelToolsItem>();\n for (const item of items) {\n if (item.id.trim() && !firstById.has(item.id)) firstById.set(item.id, item);\n }\n return Array.from(firstById.values()).sort((left, right) => {\n const leftRegion = panelToolsRailPlacement(left);\n const rightRegion = panelToolsRailPlacement(right);\n const regionDelta =\n PANEL_TOOLS_REGION_ORDER[leftRegion] - PANEL_TOOLS_REGION_ORDER[rightRegion];\n if (regionDelta !== 0) return regionDelta;\n\n return panelToolsItemOrder(left) - panelToolsItemOrder(right);\n });\n}\n\nexport type PanelToolsRailEntry =\n | { type: 'tool'; id: string; item: PanelToolsItem }\n | { type: 'accessory'; id: string; accessory: PanelToolsRailAccessory };\n\n/** Merge tools and governed accessories into one visual and keyboard order. */\nexport function orderPanelToolsRailEntries(\n items: PanelToolsItem[],\n accessories: PanelToolsRailAccessory[]\n): PanelToolsRailEntry[] {\n const toolEntries: PanelToolsRailEntry[] = orderPanelToolsItems(items).map(item => ({\n type: 'tool',\n id: item.id,\n item,\n }));\n const firstAccessoryById = new Map<string, PanelToolsRailAccessory>();\n for (const accessory of accessories) {\n if (accessory.id.trim() && !firstAccessoryById.has(accessory.id)) {\n firstAccessoryById.set(accessory.id, accessory);\n }\n }\n const accessoryEntries: PanelToolsRailEntry[] = Array.from(firstAccessoryById.values()).map(\n accessory => ({\n type: 'accessory',\n id: accessory.id,\n accessory,\n })\n );\n\n return [...toolEntries, ...accessoryEntries].sort((left, right) => {\n const leftPlacement =\n left.type === 'tool' ? panelToolsRailPlacement(left.item) : left.accessory.railPlacement;\n const rightPlacement =\n right.type === 'tool' ? panelToolsRailPlacement(right.item) : right.accessory.railPlacement;\n const regionDelta =\n PANEL_TOOLS_REGION_ORDER[leftPlacement] - PANEL_TOOLS_REGION_ORDER[rightPlacement];\n if (regionDelta !== 0) return regionDelta;\n\n const leftOrder = left.type === 'tool' ? panelToolsItemOrder(left.item) : left.accessory.order;\n const rightOrder =\n right.type === 'tool' ? panelToolsItemOrder(right.item) : right.accessory.order;\n return leftOrder - rightOrder;\n });\n}\n\n/** Flatten interactive entries while leaving decorative boundaries out of focus order. */\nexport function panelToolsRailFocusKeys(entries: PanelToolsRailEntry[]): string[] {\n return entries.flatMap(entry => {\n if (entry.type === 'tool') return [`tool:${entry.id}`];\n if (entry.accessory.type === 'divider') return [];\n if (entry.accessory.type === 'shortcut') {\n return entry.accessory.action.isInactive\n ? []\n : [`accessory:${entry.id}:${entry.accessory.action.id}`];\n }\n const keys = entry.accessory.primaryAction.isInactive\n ? []\n : [`accessory:${entry.id}:${entry.accessory.primaryAction.id}`];\n if (entry.accessory.secondaryAction && !entry.accessory.secondaryAction.isInactive) {\n keys.push(`accessory:${entry.id}:${entry.accessory.secondaryAction.id}`);\n }\n return keys;\n });\n}\n\n/** Preserve the current target across collection changes, or choose its nearest survivor. */\nexport function reconcilePanelToolsRovingIndex(\n previousKeys: string[],\n nextKeys: string[],\n currentIndex: number\n): number {\n if (!nextKeys.length) return 0;\n const currentKey = previousKeys[currentIndex];\n const preservedIndex = currentKey ? nextKeys.indexOf(currentKey) : -1;\n if (preservedIndex >= 0) return preservedIndex;\n for (let index = currentIndex + 1; index < previousKeys.length; index += 1) {\n const nextIndex = nextKeys.indexOf(previousKeys[index]);\n if (nextIndex >= 0) return nextIndex;\n }\n for (let index = currentIndex - 1; index >= 0; index -= 1) {\n const nextIndex = nextKeys.indexOf(previousKeys[index]);\n if (nextIndex >= 0) return nextIndex;\n }\n return Math.min(Math.max(currentIndex, 0), nextKeys.length - 1);\n}\n\nexport function panelToolsRailAccessoryActionDetail(\n accessoryId: string,\n actionId: string,\n anchor: HTMLElement\n): PanelToolsRailAccessoryActionDetail {\n return { accessoryId, actionId, anchor };\n}\n\nexport function isPanelToolsToolId(value: string | null): value is PanelToolsToolId {\n return typeof value === 'string' && value.trim().length > 0;\n}\n\nexport function panelToolsRailPlacement(item: PanelToolsItem): 'header' | 'body' | 'footer' {\n if (item.railPlacement) return item.railPlacement;\n if (item.id === PANEL_TOOLS_PRIMARY_TOOL_ID) return 'header';\n if (item.id === 'help') return 'footer';\n return 'body';\n}\n\nexport function reconcilePanelToolsAvailability(\n items: PanelToolsItem[],\n open: boolean,\n activeTool: PanelToolsToolId | ''\n): { open: boolean; activeTool: PanelToolsToolId | ''; removedTool: PanelToolsToolId | '' } {\n if (!activeTool || items.some(item => item.id === activeTool)) {\n return { open, activeTool, removedTool: '' };\n }\n return { open: false, activeTool: '', removedTool: activeTool };\n}\n\nexport function shouldResyncPanelToolsItems(\n prev: PanelToolsItem[],\n next: PanelToolsItem[]\n): boolean {\n if (prev.length !== next.length) return true;\n return next.some((item, index) => {\n const prior = prev[index];\n if (!prior) return true;\n return (\n prior.id !== item.id ||\n prior.icon !== item.icon ||\n prior.label !== item.label ||\n prior.railPlacement !== item.railPlacement ||\n prior.order !== item.order ||\n prior.shortcutKey !== item.shortcutKey ||\n prior.mobileDestination !== item.mobileDestination ||\n prior.selected !== item.selected ||\n prior.dot !== item.dot ||\n prior.isInactive !== item.isInactive ||\n prior.ariaLabel !== item.ariaLabel\n );\n });\n}\n\nexport type PanelToolsMotion = 'opening' | 'closing' | 'idle';\n\nexport interface PanelToolsTransitionStyle {\n transitionProperty: string;\n transitionDuration: string;\n transitionDelay: string;\n}\n\n/** Maximum computed time for the drawer's max-width transition, including delay. */\nexport function panelToolsDrawerTransitionMs(style: PanelToolsTransitionStyle): number {\n const properties = style.transitionProperty.split(',').map(item => item.trim());\n const durations = style.transitionDuration.split(',').map(item => parseCssTimeMs(item.trim(), 0));\n const delays = style.transitionDelay.split(',').map(item => parseCssTimeMs(item.trim(), 0));\n\n return properties.reduce((max, property, index) => {\n if (property !== 'all' && property !== 'max-width') return max;\n const duration = durations[index % durations.length] ?? 0;\n const delay = delays[index % delays.length] ?? 0;\n return Math.max(max, duration + delay, 0);\n }, 0);\n}\n\n/** True when the drawer clip is fully closed — safe to skip painting slot content. */\nexport function panelToolsDrawerResting(open: boolean, motion: PanelToolsMotion): boolean {\n return !open && motion === 'idle';\n}\n\n/** True only when the animated clip has reached the terminal width for its motion phase. */\nexport function panelToolsDrawerAtTerminal(\n width: number,\n targetWidth: number,\n motion: PanelToolsMotion\n): boolean {\n if (motion === 'closing') return width <= 0.5;\n if (motion === 'opening') return targetWidth > 0 && width >= targetWidth - 0.5;\n return true;\n}\n\n/** Toggle or switch rail tool selection — repeat activation closes the active tool. */\nexport function resolvePanelToolActivation(\n open: boolean,\n activeTool: PanelToolsToolId | '',\n id: PanelToolsToolId\n): { open: boolean; activeTool: PanelToolsToolId; selected: boolean } {\n if (open && activeTool === id) {\n return { open: false, activeTool: id, selected: false };\n }\n return { open: true, activeTool: id, selected: true };\n}\n","@import '../../utils/radius.css';\n@import '../../utils/control-density.css';\n@import '../../utils/chrome-layout.css';\n@import '../../utils/focus-ring.css';\n@import '../../utils/interaction-fill.css';\n@import '../../utils/scrollbar-hidden.css';\n\n:host {\n display: block;\n flex: 0 0 auto;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n --_panel-tools-rail-width: var(--dimension-size-600);\n --_panel-tools-drawer-width: var(--ds-shell-panel-tools-width, var(--dimension-panel-width-xs));\n --_panel-tools-border: var(--dimension-stroke-width-012, 1px) solid\n var(--_shell-tools-border, var(--color-border-tertiary));\n --_panel-tools-divider-color: var(--_shell-tools-divider, var(--color-divider-divider));\n --_panel-tools-divider: var(--dimension-stroke-width-012, 1px) solid\n var(--_panel-tools-divider-color);\n --_panel-tools-fg-secondary: var(--_shell-tools-fg-secondary, var(--color-foreground-secondary));\n --_panel-tools-shortcut-fg-secondary: var(\n --_shell-tools-fg-secondary,\n var(--color-chrome-foreground-secondary)\n );\n --_panel-tools-shortcut-border: var(\n --_shell-tools-border-secondary,\n var(--color-chrome-border-secondary)\n );\n --_panel-tools-shortcut-dot-ring: var(\n --_shell-tools-background-theme,\n var(--color-chrome-background-theme)\n );\n /* Match panel-nav expand timing (medium-1); easing differs by direction. */\n --_panel-tools-expand-dur: var(--effect-animation-duration-medium-1, 300ms);\n}\n\n.panel-tools__layout {\n display: flex;\n flex-direction: row-reverse;\n align-items: stretch;\n height: 100%;\n min-height: 0;\n box-sizing: border-box;\n}\n\n/* Clip frame — only max-width animates (slide reveal, same as pre-rail :host). */\n.panel-tools__drawer {\n flex: 0 0 auto;\n max-width: 0;\n min-width: 0;\n height: 100%;\n min-height: 0;\n overflow: hidden;\n box-sizing: border-box;\n transition: none;\n}\n\n:host(.panel-tools--ready) .panel-tools__drawer {\n transition: max-width var(--_panel-tools-expand-dur)\n var(--effect-animation-easing-ease-in-out, ease);\n}\n\n:host(.panel-tools--ready.panel-tools--motion-opening) .panel-tools__drawer {\n transition: max-width var(--_panel-tools-expand-dur)\n var(--effect-animation-easing-ease-out, ease-out);\n}\n\n:host(.panel-tools--ready.panel-tools--motion-closing) .panel-tools__drawer {\n transition: max-width var(--_panel-tools-expand-dur)\n var(--effect-animation-easing-ease-in, ease-in);\n}\n\n:host(.panel-tools--open) .panel-tools__drawer {\n max-width: var(--_panel-tools-drawer-width);\n}\n\n.panel-tools__drawer--visible {\n border-left: var(--_panel-tools-border);\n}\n\n/* Fixed-width surface — ShellApp supplies the standard 300px tools width. */\n.panel-tools__drawer-surface {\n display: flex;\n flex-direction: column;\n width: var(--_panel-tools-drawer-width);\n height: 100%;\n min-height: 0;\n box-sizing: border-box;\n background-color: transparent;\n}\n\n.panel-tools__full-views,\n.panel-tools__full-view {\n flex: 1 1 auto;\n min-height: 0;\n overflow: hidden;\n}\n\n.panel-tools__full-view {\n height: 100%;\n}\n\n.panel-tools__full-view {\n display: none;\n}\n.panel-tools__full-view--active {\n display: block;\n}\n\n:host([presentation='fullscreen']) {\n height: 100%;\n inset: 0;\n position: fixed;\n width: 100%;\n z-index: var(--dimension-z-index-modal);\n}\n\n:host([presentation='fullscreen']) .panel-tools__rail {\n display: none;\n}\n:host([presentation='fullscreen']) .panel-tools__drawer {\n max-width: 100%;\n transition: none;\n width: 100%;\n}\n:host([presentation='fullscreen']) .panel-tools__drawer--visible {\n border-left: none;\n}\n:host([presentation='fullscreen']) .panel-tools__drawer-surface {\n background-color: transparent;\n width: 100%;\n}\n\n/*\n * A framework can update the reflected presentation attribute before Stencil\n * commits the matching render class. Conceal that single inconsistent frame so\n * slotted master/detail content never paints against the previous geometry.\n */\n:host([presentation='fullscreen']:not(.panel-tools--fullscreen)) .panel-tools__drawer-surface,\n:host(.panel-tools--fullscreen:not([presentation='fullscreen'])) .panel-tools__drawer-surface {\n visibility: hidden;\n}\n\n:host(.panel-tools--presentation-snap) .panel-tools__drawer {\n transition: none;\n}\n\n.panel-tools__body {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n position: relative;\n}\n\n/* Skip paint while fully closed; cleared during open/close motion for WYSIWYG slide. */\n:host(.panel-tools--drawer-resting) .panel-tools__body {\n content-visibility: auto;\n contain-intrinsic-size: auto calc(var(--dimension-size-base) * 25);\n}\n\n.panel-tools__view {\n display: none;\n height: 100%;\n min-height: 0;\n box-sizing: border-box;\n padding: var(--dimension-space-200);\n color: var(--_panel-tools-fg-secondary);\n font-family: var(--typography-font-family-ui);\n font-size: var(--typography-fontsize-md);\n line-height: var(--typography-lineheight-md);\n font-weight: var(--typography-weight-regular);\n letter-spacing: var(--typography-letterspacing-negative-half);\n}\n\n.panel-tools__view ::slotted(*) {\n margin: 0;\n color: var(--_panel-tools-fg-secondary);\n font-family: var(--typography-font-family-ui);\n font-size: var(--typography-fontsize-md);\n line-height: var(--typography-lineheight-md);\n font-weight: var(--typography-weight-regular);\n letter-spacing: var(--typography-letterspacing-negative-half);\n}\n\n.panel-tools__view--active {\n display: block;\n}\n\n/* Rail — mirrors collapsed panel-nav width, padding, and item rhythm. */\n.panel-tools__rail {\n flex: 0 0 var(--_panel-tools-rail-width);\n width: var(--_panel-tools-rail-width);\n min-width: var(--_panel-tools-rail-width);\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n height: 100%;\n min-height: 0;\n border-left: var(--_panel-tools-border);\n background-color: transparent;\n}\n\n.panel-tools__rail-header {\n justify-content: center;\n height: var(--dimension-size-600);\n flex-shrink: 0;\n border-bottom: var(--_panel-tools-divider);\n}\n\n.panel-tools__rail-header.panel-tools__rail-section--stacked {\n height: auto;\n min-height: var(--dimension-size-600);\n}\n\n.panel-tools__rail-body {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.panel-tools__rail-actions {\n display: flex;\n flex-direction: column;\n gap: var(--dimension-space-050);\n width: 100%;\n}\n\n/* Flush to the bottom of the rail — mirrors Search header pin. */\n.panel-tools__rail-footer {\n justify-content: center;\n flex-shrink: 0;\n margin-top: auto;\n}\n\n.panel-tools__rail-section--stacked {\n align-items: stretch;\n}\n\n.panel-tools__rail-action {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: var(--ds-control-height);\n flex-shrink: 0;\n}\n\n.panel-tools__accessory {\n display: flex;\n flex-direction: column;\n flex: 0 0 calc(var(--dimension-size-400) * 2);\n box-sizing: border-box;\n width: 100%;\n min-height: calc(var(--dimension-size-400) * 2);\n}\n\n.panel-tools__accessory--shortcut {\n flex-basis: var(--dimension-size-400);\n min-width: var(--dimension-size-400);\n min-height: var(--dimension-size-400);\n}\n\n.panel-tools__accessory--shortcut > ds-tooltip {\n display: flex;\n flex: 1 1 auto;\n width: 100%;\n min-height: 0;\n}\n\n.panel-tools__accessory--transient {\n align-items: center;\n gap: var(--dimension-space-100);\n width: var(--dimension-size-400);\n height: calc(var(--dimension-size-400) * 2);\n min-height: calc(var(--dimension-size-400) * 2);\n padding: var(--dimension-space-050);\n border-radius: var(--dimension-radius-half);\n}\n\n.panel-tools__accessory--transient-active {\n background-color: var(--color-background-bold-brand);\n}\n\n.panel-tools__accessory--transient-positive {\n background-color: var(--color-background-bold-positive);\n}\n\n.panel-tools__accessory--transient > ds-tooltip {\n display: flex;\n flex: 0 0 var(--dimension-size-300);\n width: var(--dimension-size-300);\n height: var(--dimension-size-300);\n min-height: var(--dimension-size-300);\n}\n\n.panel-tools__shortcut {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--dimension-radius-half);\n color: var(--_panel-tools-shortcut-fg-secondary);\n background: transparent;\n font: inherit;\n}\n\n.panel-tools__shortcut:disabled {\n color: var(--color-foreground-disabled);\n cursor: not-allowed;\n}\n\n.panel-tools__shortcut-content {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--dimension-size-400);\n height: var(--dimension-size-400);\n}\n\n.panel-tools__shortcut-orb {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: var(--dimension-size-300);\n height: var(--dimension-size-300);\n border: var(--dimension-stroke-width-012) solid var(--_panel-tools-shortcut-border);\n border-radius: var(--dimension-radius-half);\n background: transparent;\n}\n\n.panel-tools__shortcut-dot {\n position: absolute;\n inset-block-start: calc((var(--dimension-size-400) - var(--dimension-iconography-md)) / 2);\n inset-inline-end: calc((var(--dimension-size-400) - var(--dimension-iconography-md)) / 2);\n z-index: 2;\n pointer-events: none;\n}\n\n.panel-tools__accessory-primary {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: var(--dimension-size-300);\n height: var(--dimension-size-300);\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--dimension-radius-half);\n color: var(--color-foreground-on-bold-background-secondary);\n background: transparent;\n font: inherit;\n --ds-interaction-border-width: var(--dimension-stroke-width-012);\n --ds-interaction-border-color: var(--color-border-on-bold-background-secondary);\n}\n\n.panel-tools__accessory-primary:disabled {\n color: var(--color-foreground-on-bold-background-quaternary);\n cursor: not-allowed;\n}\n\n.panel-tools__accessory-primary-content {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.panel-tools__accessory-image,\n.panel-tools__accessory-initial {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n border-radius: var(--dimension-radius-half);\n}\n\n.panel-tools__accessory-image {\n object-fit: cover;\n}\n\n.panel-tools__accessory-initial {\n color: inherit;\n background: transparent;\n}\n\n.panel-tools__accessory-secondary {\n display: inline-flex;\n flex: 0 0 var(--dimension-size-300);\n width: var(--dimension-size-300);\n height: var(--dimension-size-300);\n}\n\n.panel-tools__accessory-divider {\n flex: 0 0 auto;\n box-sizing: border-box;\n width: 100%;\n padding-block: var(--dimension-space-050);\n}\n\n.panel-tools__accessory-divider ds-divider {\n display: block;\n --_divider-color: var(--_panel-tools-divider-color);\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host(.panel-tools--ready.panel-tools--motion-opening) .panel-tools__drawer,\n :host(.panel-tools--ready.panel-tools--motion-closing) .panel-tools__drawer {\n transition: none;\n }\n}\n","import {\n Component,\n Prop,\n Event,\n EventEmitter,\n Element,\n State,\n Watch,\n Method,\n Listen,\n h,\n Host,\n} from '@stencil/core';\nimport type { ChromeTransitionDetail } from '../../shell/chrome-transition';\nimport { ANCHORED_OVERLAY_BOUNDARY_ATTRIBUTE } from '../../utils/anchored-overlay-boundary';\nimport {\n PANEL_TOOLS_LABELS,\n PANEL_TOOLS_SHORTCUTS,\n type PanelToolsHeaderAction,\n type PanelToolsHeaderActionDetail,\n type PanelToolsHeaderConfig,\n type PanelToolsHeaders,\n type PanelToolsItem,\n type PanelToolsRailAccessory,\n type PanelToolsRailAccessoryAction,\n type PanelToolsRailAccessoryActionDetail,\n type PanelToolsRailShortcutAccessory,\n type PanelToolsRailTransientAccessory,\n type PanelToolsToolId,\n} from './panel-tools-types';\nimport {\n isPanelToolsToolId,\n orderPanelToolsRailEntries,\n orderPanelToolsItems,\n panelToolsRailAccessoryActionDetail,\n panelToolsRailFocusKeys,\n panelToolsDrawerAtTerminal,\n panelToolsDrawerResting,\n panelToolsDrawerTransitionMs,\n panelToolsRailPlacement,\n reconcilePanelToolsAvailability,\n reconcilePanelToolsRovingIndex,\n resolvePanelToolActivation,\n type PanelToolsRailEntry,\n} from './panel-tools-utils';\n\n@Component({\n tag: 'ds-panel-tools',\n styleUrl: 'PanelTools.css',\n shadow: true,\n})\nexport class PanelTools {\n @Element() el!: HTMLElement;\n\n /** When false, only the icon rail is shown. */\n @Prop({ mutable: true, reflect: true }) open: boolean = false;\n\n /** Drawer presentation or presentation covering the shell stage for the active tool. */\n @Prop({ mutable: true, reflect: true }) presentation: 'drawer' | 'fullscreen' = 'drawer';\n\n /** Let a fullscreen product supply independent master/detail headers inside its view. */\n @Prop({ attribute: 'fullscreen-header-mode', reflect: true })\n fullscreenHeaderMode: 'shared' | 'split' = 'shared';\n\n /** Active tool view — `search`, `agents`, `messages`, `stacks`, `activity`, or `help`. */\n @Prop({ mutable: true, attribute: 'active-tool', reflect: true })\n activeTool: PanelToolsToolId | '' = '';\n\n /**\n * Rail items rendered in the right column.\n * Set via JS property: `el.items = [...]`. Replace the array reference to update.\n */\n @Prop() items: PanelToolsItem[] = [];\n\n /**\n * Desktop/tablet-only application-owned rail boundaries and direct intents.\n * Set via JS property and replace the array reference to update.\n */\n @Prop() accessories: PanelToolsRailAccessory[] = [];\n\n @Prop() toolsLabel: string = 'Tools';\n @Prop() toolShortcutsLabel: string = 'Tool shortcuts';\n\n /** Active header state per tool. Replace the object when title, depth, or actions change. */\n @Prop() headers: PanelToolsHeaders = {};\n\n /**\n * Optional localStorage key for the last active tool. The drawer always starts\n * closed; only the tool identity is restored for continuity within this browser.\n */\n @Prop({ attribute: 'storage-key' }) storageKey: string = '';\n\n /** Emitted when a rail button is toggled. Detail = { id, selected }. */\n @Event({ bubbles: true, composed: true }) dsToolChange!: EventEmitter<{\n id: PanelToolsToolId;\n selected: boolean;\n }>;\n\n /** Emitted when fullscreen changes, including Escape-initiated exits. */\n @Event({ bubbles: true, composed: true }) dsPresentationChange!: EventEmitter<{\n presentation: 'drawer' | 'fullscreen';\n }>;\n\n /** Requests navigation to the active tool's parent view. */\n @Event({ bubbles: true, composed: true }) dsHeaderBack!: EventEmitter<{\n tool: PanelToolsToolId;\n }>;\n\n /** Requests one application-owned action from the active tool header. */\n @Event({ bubbles: true, composed: true })\n dsHeaderAction!: EventEmitter<PanelToolsHeaderActionDetail>;\n\n /** Direct accessory intent. Emitting this event never changes the active tool or drawer. */\n @Event({ bubbles: true, composed: true })\n dsRailAccessoryAction!: EventEmitter<PanelToolsRailAccessoryActionDetail>;\n\n /** Bubbling lifecycle — `ds-bar-nav` defers overflow checks during drawer motion. */\n @Event({ bubbles: true, composed: true })\n dsChromeTransitionStart!: EventEmitter<ChromeTransitionDetail>;\n\n @Event({ bubbles: true, composed: true })\n dsChromeTransitionEnd!: EventEmitter<ChromeTransitionDetail>;\n\n /** Arms open vs close easing for the in-flight width transition. */\n @State() private motion: 'opening' | 'closing' | 'idle' = 'idle';\n\n /** Keeps header and slotted content painted until the closing clip transition completes. */\n @State() private drawerSurfaceRetained = false;\n\n /** Suppresses width transition until the host has painted its initial open state. */\n @State() private readyForMotion = false;\n\n /** Fullscreen presentation changes snap without borrowing drawer width motion. */\n @State() private presentationMotionSuppressed = false;\n\n @State() private rovingIndex = 0;\n @State() private fullViewToolIds: PanelToolsToolId[] = [];\n @State() private railBodyScrollable = false;\n\n private motionEnableGeneration = 0;\n private presentationMotionGeneration = 0;\n private transitionGeneration = 0;\n private transitionFallbackTimer: number | null = null;\n /** Ignores the old transition's terminal event when reversing direction. */\n private ignoreReplacementTerminal = false;\n private focusBeforeFullscreen: HTMLElement | null = null;\n private fullViewObserver: MutationObserver | null = null;\n private railBodyEl?: HTMLElement;\n private railBodyObserver?: ResizeObserver;\n\n private get railItems(): PanelToolsItem[] {\n return this.items ?? [];\n }\n\n private get orderedRailItems(): PanelToolsItem[] {\n return orderPanelToolsItems(this.railItems);\n }\n\n private get railAccessories(): PanelToolsRailAccessory[] {\n return this.accessories ?? [];\n }\n\n private get orderedRailEntries(): PanelToolsRailEntry[] {\n return orderPanelToolsRailEntries(this.railItems, this.railAccessories);\n }\n\n disconnectedCallback() {\n this.el.removeEventListener('transitionend', this.handleTransitionEnd);\n this.el.removeEventListener('transitioncancel', this.handleTransitionEnd);\n this.el.removeEventListener('dsAction', this.handleComposedHeaderAction);\n this.clearTransitionCompletion();\n this.motionEnableGeneration += 1;\n this.fullViewObserver?.disconnect();\n this.fullViewObserver = null;\n this.disconnectRailBodyObserver();\n }\n\n @Watch('presentation')\n presentationChanged(next: 'drawer' | 'fullscreen', previous?: 'drawer' | 'fullscreen') {\n if (next === previous) return;\n // Framework property bindings can update slotted master/detail content in\n // the same render that requests fullscreen. Reflect the host selector\n // immediately so that content cannot paint once in the drawer geometry\n // while Stencil waits to commit its next render.\n if (this.el.getAttribute('presentation') !== next) {\n this.el.setAttribute('presentation', next);\n }\n const presentationGeneration = ++this.presentationMotionGeneration;\n this.presentationMotionSuppressed = true;\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (presentationGeneration !== this.presentationMotionGeneration) return;\n this.presentationMotionSuppressed = false;\n });\n });\n if (next === 'fullscreen') {\n this.focusBeforeFullscreen =\n document.activeElement instanceof HTMLElement ? document.activeElement : null;\n this.open = true;\n } else if (previous === 'fullscreen') {\n const focusBeforeFullscreen = this.focusBeforeFullscreen;\n const fallbackActionId = this.activeHeader().actions?.[0]?.id;\n requestAnimationFrame(async () => {\n if (focusBeforeFullscreen?.isConnected) {\n focusBeforeFullscreen.focus({ preventScroll: true });\n }\n const focusRestored = focusBeforeFullscreen\n ? document.activeElement === focusBeforeFullscreen ||\n focusBeforeFullscreen.contains(document.activeElement)\n : false;\n if (!focusRestored && fallbackActionId) await this.focusHeaderAction(fallbackActionId);\n this.focusBeforeFullscreen = null;\n });\n }\n this.dsPresentationChange.emit({ presentation: next });\n }\n\n @Listen('keydown', { target: 'window', capture: true })\n handleFullscreenEscape(event: KeyboardEvent) {\n if (this.presentation !== 'fullscreen' || event.key !== 'Escape') return;\n event.preventDefault();\n event.stopPropagation();\n this.presentation = 'drawer';\n }\n\n private deferMotionEnable() {\n if (this.readyForMotion) return;\n const generation = ++this.motionEnableGeneration;\n requestAnimationFrame(() => {\n if (generation !== this.motionEnableGeneration) return;\n requestAnimationFrame(() => {\n if (generation !== this.motionEnableGeneration) return;\n this.readyForMotion = true;\n });\n });\n }\n\n connectedCallback() {\n this.el.setAttribute(ANCHORED_OVERLAY_BOUNDARY_ATTRIBUTE, '');\n this.el.addEventListener('transitionend', this.handleTransitionEnd);\n this.el.addEventListener('transitioncancel', this.handleTransitionEnd);\n this.el.addEventListener('dsAction', this.handleComposedHeaderAction);\n }\n\n private handleComposedHeaderAction = (event: Event) => {\n const detail = (event as CustomEvent<{ id?: string; anchor?: HTMLElement }>).detail;\n if (!this.activeTool || !detail?.id) return;\n event.stopPropagation();\n this.dsHeaderAction.emit({\n tool: this.activeTool,\n id: detail.id,\n anchor: detail.anchor,\n });\n };\n\n componentWillLoad() {\n this.restoreLastActiveTool();\n this.drawerSurfaceRetained = this.open;\n }\n\n @Watch('open')\n openChanged(isOpen: boolean, wasOpen?: boolean) {\n if (isOpen) this.drawerSurfaceRetained = true;\n if (this.readyForMotion && wasOpen !== undefined && wasOpen !== isOpen) {\n this.startDrawerTransition(isOpen ? 'opening' : 'closing');\n } else if (!isOpen) {\n this.drawerSurfaceRetained = false;\n }\n this.deferMotionEnable();\n }\n\n @Watch('activeTool')\n activeToolChanged() {\n this.persistLastActiveTool();\n this.deferMotionEnable();\n }\n\n @Watch('storageKey')\n storageKeyChanged() {\n this.restoreLastActiveTool();\n }\n\n componentDidLoad() {\n this.deferMotionEnable();\n this.connectRailBodyObserver();\n this.updateRailBodyScrollable();\n this.syncFullViewTools();\n this.fullViewObserver = new MutationObserver(() => this.syncFullViewTools());\n this.fullViewObserver.observe(this.el, {\n childList: true,\n attributes: true,\n attributeFilter: ['slot'],\n });\n }\n\n componentDidRender() {\n this.updateRailBodyScrollable();\n }\n\n private connectRailBodyObserver() {\n this.disconnectRailBodyObserver();\n if (!this.railBodyEl || typeof ResizeObserver === 'undefined') return;\n this.railBodyObserver = new ResizeObserver(() => this.updateRailBodyScrollable());\n this.railBodyObserver.observe(this.railBodyEl);\n }\n\n private disconnectRailBodyObserver() {\n this.railBodyObserver?.disconnect();\n this.railBodyObserver = undefined;\n }\n\n private updateRailBodyScrollable() {\n const next = Boolean(\n this.railBodyEl && this.railBodyEl.scrollHeight > this.railBodyEl.clientHeight + 1\n );\n if (next !== this.railBodyScrollable) this.railBodyScrollable = next;\n }\n\n @Watch('items')\n itemsChanged() {\n this.rovingIndex = 0;\n this.reconcileActiveTool();\n this.deferMotionEnable();\n }\n\n @Watch('accessories')\n accessoriesChanged(\n next: PanelToolsRailAccessory[] = [],\n previous: PanelToolsRailAccessory[] = []\n ) {\n const previousKeys = panelToolsRailFocusKeys(\n orderPanelToolsRailEntries(this.railItems, previous)\n );\n const nextKeys = panelToolsRailFocusKeys(orderPanelToolsRailEntries(this.railItems, next));\n const activeElement = (this.renderRoot as ShadowRoot).activeElement as HTMLElement | null;\n const focusedKey =\n activeElement?.closest<HTMLElement>('[data-rail-focus-key]')?.dataset.railFocusKey;\n const focusedIndex = focusedKey ? previousKeys.indexOf(focusedKey) : -1;\n const currentIndex = focusedIndex >= 0 ? focusedIndex : this.rovingIndex;\n const nextIndex = reconcilePanelToolsRovingIndex(previousKeys, nextKeys, currentIndex);\n const restoreFocus = focusedIndex >= 0 && !nextKeys.includes(focusedKey ?? '');\n this.rovingIndex = nextIndex;\n if (restoreFocus && nextKeys.length) {\n requestAnimationFrame(() => this.focusRailAt(nextIndex));\n }\n }\n\n private restoreLastActiveTool() {\n if (!this.storageKey || this.activeTool) return;\n try {\n const stored = localStorage.getItem(this.storageKey);\n if (isPanelToolsToolId(stored)) this.activeTool = stored;\n } catch {\n /* localStorage unavailable */\n }\n }\n\n private persistLastActiveTool() {\n if (!this.storageKey || !this.activeTool) return;\n try {\n localStorage.setItem(this.storageKey, this.activeTool);\n } catch {\n /* unavailable */\n }\n }\n\n private clearPersistedTool() {\n if (!this.storageKey) return;\n try {\n localStorage.removeItem(this.storageKey);\n } catch {\n /* unavailable */\n }\n }\n\n private reconcileActiveTool() {\n const next = reconcilePanelToolsAvailability(this.railItems, this.open, this.activeTool);\n if (!next.removedTool) return;\n this.clearPersistedTool();\n this.open = next.open;\n this.activeTool = next.activeTool;\n this.dsToolChange.emit({ id: next.removedTool, selected: false });\n }\n\n private startDrawerTransition(phase: 'opening' | 'closing') {\n const drawer = this.renderRoot.querySelector('.panel-tools__drawer') as HTMLElement | null;\n if (this.motion !== 'idle') {\n this.finishDrawerTransition();\n this.ignoreReplacementTerminal = true;\n }\n this.motion = phase;\n this.dsChromeTransitionStart.emit({ source: 'panel-tools', phase });\n const generation = ++this.transitionGeneration;\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (generation !== this.transitionGeneration || this.motion !== phase) return;\n if (!drawer) {\n this.finishDrawerTransition();\n return;\n }\n\n if (this.drawerTransitionAtTerminal(drawer, phase)) {\n this.finishDrawerTransition();\n return;\n }\n\n const fallbackMs = panelToolsDrawerTransitionMs(getComputedStyle(drawer));\n if (fallbackMs <= 0) {\n this.finishDrawerTransition();\n return;\n }\n this.transitionFallbackTimer = window.setTimeout(() => {\n this.finishDrawerTransition();\n }, fallbackMs);\n });\n });\n }\n\n private handleTransitionEnd = (event: TransitionEvent) => {\n const drawer = this.renderRoot.querySelector('.panel-tools__drawer') as HTMLElement | null;\n if (event.target !== drawer) return;\n if (event.propertyName !== 'max-width') return;\n if (this.ignoreReplacementTerminal) {\n this.ignoreReplacementTerminal = false;\n return;\n }\n // Changing from the neutral transition recipe to the direction-specific\n // easing can cancel the transition that the reflected `open` class began.\n // The replacement transition and its watchdog still own completion; ending\n // motion here would hide the fixed-width tool surface while it is visible.\n if (event.type === 'transitioncancel') return;\n if (drawer && !this.drawerTransitionAtTerminal(drawer, this.motion)) return;\n this.finishDrawerTransition();\n };\n\n private drawerTransitionAtTerminal(\n drawer: HTMLElement,\n phase: 'opening' | 'closing' | 'idle'\n ): boolean {\n const width = drawer.getBoundingClientRect().width;\n const surface = drawer.querySelector('.panel-tools__drawer-surface') as HTMLElement | null;\n const targetWidth = surface?.getBoundingClientRect().width ?? 0;\n return panelToolsDrawerAtTerminal(width, targetWidth, phase);\n }\n\n private finishDrawerTransition() {\n const completedPhase = this.motion;\n const wasTransitioning = completedPhase !== 'idle';\n this.clearTransitionCompletion();\n if (!wasTransitioning) return;\n this.ignoreReplacementTerminal = false;\n this.motion = 'idle';\n if (completedPhase === 'closing' && !this.open) {\n this.drawerSurfaceRetained = false;\n }\n this.dsChromeTransitionEnd.emit({ source: 'panel-tools' });\n }\n\n private clearTransitionCompletion() {\n this.transitionGeneration += 1;\n if (this.transitionFallbackTimer !== null) {\n window.clearTimeout(this.transitionFallbackTimer);\n this.transitionFallbackTimer = null;\n }\n }\n\n /** Rail selection follows `open` immediately — independent of the slide animation. */\n private isRailSelected(id: PanelToolsToolId): boolean {\n return this.open && this.activeTool === id;\n }\n\n /** Drawer body stays mounted while the clip frame animates closed. */\n private isDrawerPresent(): boolean {\n return this.open || this.drawerSurfaceRetained;\n }\n\n private isViewActive(id: PanelToolsToolId): boolean {\n return this.isDrawerPresent() && this.activeTool === id;\n }\n\n private hasFullView(id: PanelToolsToolId): boolean {\n return this.fullViewToolIds.includes(id);\n }\n\n private syncFullViewTools() {\n const ids = this.orderedRailItems.map(item => item.id);\n const next = ids.filter(id => Boolean(this.el.querySelector(`[slot=\"${id}-view\"]`)));\n if (next.join('|') !== this.fullViewToolIds.join('|')) this.fullViewToolIds = next;\n }\n\n private get renderRoot(): ParentNode {\n return this.el.shadowRoot ?? this.el;\n }\n\n private accessibleLabel(): string {\n if (!this.isDrawerPresent() || !this.activeTool) return '';\n const item = this.railItems.find(candidate => candidate.id === this.activeTool);\n return (\n item?.label ??\n PANEL_TOOLS_LABELS[this.activeTool as keyof typeof PANEL_TOOLS_LABELS] ??\n this.activeTool\n );\n }\n\n private resolvedHeaders(): PanelToolsHeaders {\n return this.headers ?? {};\n }\n\n private activeHeader(): PanelToolsHeaderConfig {\n if (!this.activeTool) return {};\n return this.resolvedHeaders()[this.activeTool] ?? {};\n }\n\n private handleToolChange = (id: PanelToolsToolId) => {\n const next = resolvePanelToolActivation(this.open, this.activeTool, id);\n this.open = next.open;\n this.activeTool = next.activeTool;\n this.dsToolChange.emit({ id, selected: next.selected });\n };\n\n /** Toggle any rail tool open/closed — shell shortcuts K/A/S/M/N call this. */\n @Method()\n async activateTool(id: PanelToolsToolId) {\n const item = this.railItems.find(entry => entry.id === id);\n if (!item || item.isInactive) return;\n this.handleToolChange(id);\n }\n\n /** Close the tools drawer when open — used by shell keyboard shortcuts. */\n @Method()\n async closeDrawer() {\n if (!this.open) return;\n const id = this.activeTool;\n this.open = false;\n if (id) {\n this.dsToolChange.emit({ id, selected: false });\n }\n }\n\n /** Focus an active tool-header action by its application-owned id. */\n @Method()\n async focusHeaderAction(id: string) {\n const action = this.renderRoot.querySelector(`[data-header-action-id=\"${CSS.escape(id)}\"]`) as\n | (HTMLElement & { setFocus?: () => Promise<void> })\n | null;\n await action?.setFocus?.();\n }\n\n private focusRailAt(index: number) {\n const keys = panelToolsRailFocusKeys(this.orderedRailEntries);\n if (!keys.length) return;\n const bounded = Math.max(0, Math.min(index, keys.length - 1));\n this.rovingIndex = bounded;\n const action = this.renderRoot.querySelector(\n `[data-rail-focus-key=\"${CSS.escape(keys[bounded])}\"]`\n ) as (HTMLElement & { setFocus?: () => Promise<void> }) | null;\n if (action?.setFocus) {\n void action.setFocus();\n } else {\n action?.focus({ preventScroll: true });\n }\n }\n\n private handleRailKeyDown = (e: KeyboardEvent, index: number, activate?: () => void) => {\n const keys = panelToolsRailFocusKeys(this.orderedRailEntries);\n if (!keys.length) return;\n\n if ((e.key === 'Enter' || e.key === ' ') && activate) {\n e.preventDefault();\n activate();\n return;\n }\n\n if (e.key === 'ArrowDown') {\n if (index >= keys.length - 1) return;\n e.preventDefault();\n this.focusRailAt(index + 1);\n return;\n }\n\n if (e.key === 'ArrowUp') {\n if (index <= 0) return;\n e.preventDefault();\n this.focusRailAt(index - 1);\n }\n };\n\n private renderRailAction(item: PanelToolsItem, index: number) {\n const focusKey = `tool:${item.id}`;\n const label =\n item.ariaLabel ??\n item.label ??\n PANEL_TOOLS_LABELS[item.id as keyof typeof PANEL_TOOLS_LABELS] ??\n item.id;\n return (\n <ds-tooltip\n key={item.id}\n label={label}\n shortcutKey={\n item.shortcutKey ?? PANEL_TOOLS_SHORTCUTS[item.id as keyof typeof PANEL_TOOLS_SHORTCUTS]\n }\n side=\"left\"\n size=\"sm\"\n boundary=\"viewport\"\n >\n <ds-button-unfilled\n variant=\"icon\"\n class=\"panel-tools__rail-action\"\n icon={item.icon}\n isActive={this.isRailSelected(item.id)}\n activeFill={false}\n hasBorder={false}\n background=\"chrome\"\n pressScale={false}\n dot={item.dot ?? false}\n isInactive={item.isInactive}\n focusTabIndex={index === this.rovingIndex ? 0 : -1}\n data-rail-focus-key={focusKey}\n aria-label={label}\n pressed={this.isRailSelected(item.id)}\n onFocusin={() => {\n this.rovingIndex = index;\n }}\n onKeyDown={(e: KeyboardEvent) =>\n this.handleRailKeyDown(e, index, () => this.handleToolChange(item.id))\n }\n onDsClick={() => this.handleToolChange(item.id)}\n />\n </ds-tooltip>\n );\n }\n\n private accessoryPrimaryLabel(accessory: PanelToolsRailTransientAccessory): string {\n const actionLabel = accessory.primaryAction.ariaLabel?.trim() || accessory.ariaLabel;\n const status = accessory.statusText.trim();\n return status ? `${actionLabel}. ${status}` : actionLabel;\n }\n\n private emitAccessoryAction(\n accessoryId: string,\n action: PanelToolsRailAccessoryAction,\n anchor: HTMLElement\n ) {\n if (action.isInactive) return;\n this.dsRailAccessoryAction.emit(\n panelToolsRailAccessoryActionDetail(accessoryId, action.id, anchor)\n );\n }\n\n private renderAccessoryVisual(accessory: PanelToolsRailTransientAccessory) {\n if (accessory.visual.type === 'image') {\n return (\n <img\n class=\"panel-tools__accessory-image\"\n src={accessory.visual.src}\n alt=\"\"\n aria-hidden=\"true\"\n />\n );\n }\n if (accessory.visual.type === 'initial') {\n const initial = [...accessory.visual.initial.trim()].slice(0, 2).join('');\n return (\n <ds-text\n class=\"panel-tools__accessory-initial\"\n as=\"span\"\n variant=\"text-caption\"\n emphasis\n color=\"inherit\"\n aria-hidden=\"true\"\n >\n {initial}\n </ds-text>\n );\n }\n return <ds-icon name={accessory.visual.icon} size=\"sm\" aria-hidden=\"true\" />;\n }\n\n private renderRailShortcut(\n accessory: PanelToolsRailShortcutAccessory,\n focusIndexes: Map<string, number>\n ) {\n const focusKey = `accessory:${accessory.id}:${accessory.action.id}`;\n const focusIndex = focusIndexes.get(focusKey);\n const label = accessory.action.ariaLabel?.trim() || accessory.ariaLabel;\n const initials = [...accessory.initials.trim()].slice(0, 2).join('');\n\n return (\n <div\n key={`accessory:${accessory.id}`}\n class=\"panel-tools__accessory panel-tools__accessory--shortcut\"\n >\n <ds-tooltip label={label} side=\"left\" size=\"sm\" boundary=\"viewport\">\n <button\n type=\"button\"\n class=\"panel-tools__shortcut ds-focus-ring-inset ds-interaction-fill ds-interaction-fill--on-chrome\"\n disabled={accessory.action.isInactive}\n tabIndex={focusIndex === this.rovingIndex ? 0 : -1}\n data-rail-focus-key={focusKey}\n aria-label={label}\n onFocus={() => {\n if (focusIndex !== undefined) this.rovingIndex = focusIndex;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n focusIndex === undefined ? undefined : this.handleRailKeyDown(event, focusIndex)\n }\n onClick={(event: MouseEvent) =>\n this.emitAccessoryAction(\n accessory.id,\n accessory.action,\n event.currentTarget as HTMLElement\n )\n }\n >\n <span class=\"panel-tools__shortcut-content ds-interaction-fill__content\">\n <ds-text\n class=\"panel-tools__shortcut-orb\"\n as=\"span\"\n variant=\"text-caption\"\n emphasis\n color=\"inherit\"\n >\n {initials}\n </ds-text>\n {accessory.dot ? (\n <ds-badge\n class=\"panel-tools__shortcut-dot\"\n variant=\"dot\"\n background=\"var(--_panel-tools-shortcut-dot-ring)\"\n aria-hidden=\"true\"\n />\n ) : null}\n </span>\n </button>\n </ds-tooltip>\n </div>\n );\n }\n\n private renderRailAccessory(\n accessory: PanelToolsRailAccessory,\n focusIndexes: Map<string, number>\n ) {\n if (accessory.type === 'divider') {\n return (\n <div\n key={`accessory:${accessory.id}`}\n class=\"panel-tools__accessory-divider\"\n aria-hidden=\"true\"\n >\n <ds-divider />\n </div>\n );\n }\n\n if (accessory.type === 'shortcut') {\n return this.renderRailShortcut(accessory, focusIndexes);\n }\n\n const primaryKey = `accessory:${accessory.id}:${accessory.primaryAction.id}`;\n const primaryIndex = focusIndexes.get(primaryKey);\n const primaryLabel = this.accessoryPrimaryLabel(accessory);\n const secondary = accessory.secondaryAction;\n const secondaryKey = secondary ? `accessory:${accessory.id}:${secondary.id}` : '';\n const secondaryIndex = secondary ? focusIndexes.get(secondaryKey) : undefined;\n\n return (\n <div\n key={`accessory:${accessory.id}`}\n class={{\n 'panel-tools__accessory': true,\n 'panel-tools__accessory--transient': true,\n 'panel-tools__accessory--transient-active': accessory.statusTone === 'active',\n 'panel-tools__accessory--transient-positive': accessory.statusTone === 'positive',\n }}\n >\n <ds-tooltip label={primaryLabel} side=\"left\" size=\"sm\" boundary=\"viewport\">\n <button\n type=\"button\"\n class=\"panel-tools__accessory-primary ds-focus-ring-inset ds-interaction-fill ds-interaction-fill--on-bold\"\n disabled={accessory.primaryAction.isInactive}\n tabIndex={primaryIndex === this.rovingIndex ? 0 : -1}\n data-rail-focus-key={primaryKey}\n aria-label={primaryLabel}\n onFocus={() => {\n if (primaryIndex !== undefined) this.rovingIndex = primaryIndex;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n primaryIndex === undefined ? undefined : this.handleRailKeyDown(event, primaryIndex)\n }\n onClick={(event: MouseEvent) =>\n this.emitAccessoryAction(\n accessory.id,\n accessory.primaryAction,\n event.currentTarget as HTMLElement\n )\n }\n >\n <span class=\"panel-tools__accessory-primary-content ds-interaction-fill__content\">\n {this.renderAccessoryVisual(accessory)}\n </span>\n </button>\n </ds-tooltip>\n {secondary ? (\n <ds-tooltip label={secondary.ariaLabel} side=\"left\" size=\"sm\" boundary=\"viewport\">\n <ds-button-unfilled\n class=\"panel-tools__accessory-secondary\"\n variant=\"icon\"\n size=\"sm\"\n rounded\n background=\"bold\"\n hasBorder={false}\n icon={secondary.icon}\n isInactive={secondary.isInactive}\n focusTabIndex={secondaryIndex === this.rovingIndex ? 0 : -1}\n data-rail-focus-key={secondaryKey}\n aria-label={secondary.ariaLabel}\n onFocusin={() => {\n if (secondaryIndex !== undefined) this.rovingIndex = secondaryIndex;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n secondaryIndex === undefined\n ? undefined\n : this.handleRailKeyDown(event, secondaryIndex)\n }\n onDsClick={(event: CustomEvent<MouseEvent>) =>\n this.emitAccessoryAction(\n accessory.id,\n secondary,\n event.currentTarget as HTMLElement\n )\n }\n />\n </ds-tooltip>\n ) : null}\n </div>\n );\n }\n\n private renderRailEntry(entry: PanelToolsRailEntry, focusIndexes: Map<string, number>) {\n if (entry.type === 'tool') {\n return this.renderRailAction(entry.item, focusIndexes.get(`tool:${entry.id}`) ?? 0);\n }\n return this.renderRailAccessory(entry.accessory, focusIndexes);\n }\n\n render() {\n const accessibleLabel = this.accessibleLabel();\n const header = this.activeHeader();\n const headerTitle = header.title?.trim() || accessibleLabel;\n const headerActions = header.actions ?? [];\n const orderedRailItems = this.orderedRailItems;\n const orderedRailEntries = this.orderedRailEntries;\n const entryPlacement = (entry: PanelToolsRailEntry) =>\n entry.type === 'tool' ? panelToolsRailPlacement(entry.item) : entry.accessory.railPlacement;\n const headerEntries = orderedRailEntries.filter(entry => entryPlacement(entry) === 'header');\n const bodyEntries = orderedRailEntries.filter(entry => entryPlacement(entry) === 'body');\n const footerEntries = orderedRailEntries.filter(entry => entryPlacement(entry) === 'footer');\n const focusIndexes = new Map(\n panelToolsRailFocusKeys(orderedRailEntries).map((key, index) => [key, index])\n );\n const showDrawerChrome = this.isDrawerPresent();\n const drawerResting = panelToolsDrawerResting(this.open, this.motion);\n const activeFullView = Boolean(\n showDrawerChrome && this.activeTool && this.hasFullView(this.activeTool)\n );\n const toolIds = orderedRailItems.map(item => item.id);\n\n return (\n <Host\n class={{\n 'panel-tools': true,\n 'panel-tools--open': this.open,\n 'panel-tools--ready': this.readyForMotion,\n 'panel-tools--motion-opening': this.motion === 'opening',\n 'panel-tools--motion-closing': this.motion === 'closing',\n 'panel-tools--drawer-resting': drawerResting,\n 'panel-tools--fullscreen': this.presentation === 'fullscreen',\n 'panel-tools--presentation-snap': this.presentationMotionSuppressed,\n }}\n data-ds-overlay-boundary\n role={this.presentation === 'fullscreen' ? 'dialog' : 'complementary'}\n aria-modal={this.presentation === 'fullscreen' ? 'true' : undefined}\n aria-label={this.toolsLabel}\n >\n <div class=\"panel-tools__layout\">\n <nav class=\"panel-tools__rail\" aria-label={this.toolShortcutsLabel}>\n {headerEntries.length ? (\n <div\n class={{\n 'panel-tools__rail-header': true,\n 'panel-tools__rail-section--stacked': headerEntries.length > 1,\n 'ds-chrome-row': headerEntries.length === 1,\n 'ds-chrome-column': headerEntries.length > 1,\n 'ds-chrome-space--md': true,\n }}\n >\n {headerEntries.map(entry => this.renderRailEntry(entry, focusIndexes))}\n </div>\n ) : null}\n <div\n class={{\n 'panel-tools__rail-body': true,\n 'ds-chrome-column': true,\n 'ds-chrome-space--md': true,\n 'ds-scrollbar-hidden': true,\n 'ds-focus-ring': this.railBodyScrollable,\n }}\n ref={element => {\n const next = (element as HTMLElement) ?? undefined;\n if (next === this.railBodyEl) return;\n this.railBodyEl = next;\n this.connectRailBodyObserver();\n }}\n role={this.railBodyScrollable ? 'region' : undefined}\n aria-label={this.railBodyScrollable ? this.toolShortcutsLabel : undefined}\n tabIndex={this.railBodyScrollable ? 0 : undefined}\n >\n <div class=\"panel-tools__rail-actions\">\n {bodyEntries.map(entry => this.renderRailEntry(entry, focusIndexes))}\n </div>\n </div>\n {footerEntries.length ? (\n <div\n class={{\n 'panel-tools__rail-footer': true,\n 'panel-tools__rail-section--stacked': footerEntries.length > 1,\n 'ds-chrome-row': footerEntries.length === 1,\n 'ds-chrome-column': footerEntries.length > 1,\n 'ds-chrome-space--md': true,\n }}\n >\n {footerEntries.map(entry => this.renderRailEntry(entry, focusIndexes))}\n </div>\n ) : null}\n </nav>\n\n <div\n class={{\n 'panel-tools__drawer': true,\n 'panel-tools__drawer--visible': showDrawerChrome,\n }}\n aria-hidden={showDrawerChrome ? null : 'true'}\n inert={showDrawerChrome ? undefined : true}\n >\n <div class=\"panel-tools__drawer-surface\">\n {this.presentation !== 'fullscreen' || this.fullscreenHeaderMode === 'shared' ? (\n <ds-panel-tool-header\n class=\"panel-tools__header\"\n heading={headerTitle}\n showBack={header.showBack ?? false}\n backIcon={header.backIcon || 'ChevronLeft'}\n backAriaLabel={header.backAriaLabel || 'Back'}\n showMenu={false}\n ref={element => {\n const toolHeader = element as\n | (HTMLDsPanelToolHeaderElement & {\n actions: PanelToolsHeaderAction[];\n })\n | undefined;\n if (toolHeader) toolHeader.actions = headerActions;\n }}\n onDsBack={() => {\n if (this.activeTool) this.dsHeaderBack.emit({ tool: this.activeTool });\n }}\n />\n ) : null}\n <div class=\"panel-tools__body\" hidden={activeFullView}>\n {toolIds.map(id => {\n const active = this.isViewActive(id);\n return (\n <div\n class={{\n 'panel-tools__view': true,\n 'panel-tools__view--active': active,\n }}\n hidden={!active}\n >\n <slot name={id} />\n </div>\n );\n })}\n </div>\n <div class=\"panel-tools__full-views\" hidden={!activeFullView}>\n {toolIds.map(id => (\n <div\n class={{\n 'panel-tools__full-view': true,\n 'panel-tools__full-view--active':\n this.isViewActive(id) && this.hasFullView(id),\n }}\n hidden={!(this.isViewActive(id) && this.hasFullView(id))}\n >\n <slot name={`${id}-view`} />\n </div>\n ))}\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"wYAYO,MAAMA,EAAoD,CAC/D,SACA,WACA,WACA,SACA,SACA,QAIK,MAAMC,EAAyD,SAK/D,MAAMC,EAAgE,CAC3EC,OAAQ,SACRC,SAAU,WACVC,OAAQ,SACRC,SAAU,WACVC,OAAQ,SACRC,KAAM,kBAGD,MAAMC,EAA4E,CACvFN,OAAQ,IACRI,OAAQ,IACRH,SAAU,IACVC,OAAQ,IACRC,SAAU,IACVE,KAAM,KA4G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"./p-CzTJAO2J.js";import{d as n}from"./p-BrB05_X8.js";import{d as c}from"./p-BVsVUnAw.js";import{d as m}from"./p-0XTyQNRG.js";import{d as h}from"./p-z_8aZHHo.js";import{d as l}from"./p-YmJYwnhW.js";import{d as b}from"./p-Ch00yccW.js";import{d as p}from"./p-CAARHqjE.js";import{d as g}from"./p-0EpjqRWc.js";import{d as u}from"./p-M9pOLcyK.js";import{d as f}from"./p-CTAF7SkL.js";import{d as _}from"./p-PNY7auMh.js";const v=()=>`.ds-chrome-space--sm.sc-ds-mobile-header-h,.ds-chrome-space--sm.sc-ds-mobile-header{--ds-chrome-padding:var(--ds-chrome-space-sm-padding, var(--dimension-space-050));--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-mobile-header-h,.ds-chrome-space--md.sc-ds-mobile-header{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-mobile-header-h,.ds-chrome-space--lg.sc-ds-mobile-header{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-mobile-header-h,.ds-chrome-row.sc-ds-mobile-header,.ds-chrome-column.sc-ds-mobile-header-h,.ds-chrome-column.sc-ds-mobile-header,.ds-chrome-grid.sc-ds-mobile-header-h,.ds-chrome-grid.sc-ds-mobile-header{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-mobile-header-h,.ds-chrome-row.sc-ds-mobile-header{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-mobile-header-h,.ds-chrome-column.sc-ds-mobile-header{flex-direction:column}.ds-chrome-grid.sc-ds-mobile-header-h,.ds-chrome-grid.sc-ds-mobile-header{display:grid;align-items:center}.sc-ds-mobile-header-h{display:block;min-width:0;box-sizing:border-box;background:var(--color-background-primary);color:var(--color-foreground-primary)}[tone='brand'].sc-ds-mobile-header-h{background:var(--color-background-bold-brand);color:var(--color-foreground-on-bold)}.mobile-header.sc-ds-mobile-header{position:relative;display:flex;flex-direction:column;width:100%;min-width:0;box-sizing:border-box;background:inherit;color:inherit}.mobile-header__primary.sc-ds-mobile-header{grid-template-columns:minmax(var(--dimension-size-500), 1fr) minmax(0, auto) minmax( var(--dimension-size-500), 1fr );width:100%;height:calc(var(--dimension-size-500) + var(--dimension-space-200));min-width:0;background:inherit;color:inherit}.mobile-header__primary--segmented.sc-ds-mobile-header{grid-template-columns:minmax(var(--dimension-size-500), 1fr) minmax(0, 4fr) minmax(var(--dimension-size-500), 1fr)}.mobile-header__primary--segmented.sc-ds-mobile-header .mobile-header__center.sc-ds-mobile-header,.mobile-header__primary--segmented.sc-ds-mobile-header ds-tab-group.sc-ds-mobile-header{width:100%}.sc-ds-mobile-header-h:not([tone='brand']) .mobile-header.sc-ds-mobile-header::after{content:'';position:absolute;inset-inline:0;inset-block-end:0;height:var(--dimension-stroke-width-012);background:var(--color-border-tertiary);pointer-events:none}.mobile-header__subsections.sc-ds-mobile-header{display:flex;align-items:center;justify-content:center;min-width:0;height:var(--dimension-size-600);padding:var(--dimension-space-100) var(--dimension-space-200);box-sizing:border-box}.mobile-header__subsections.sc-ds-mobile-header ds-mobile-section-switcher.sc-ds-mobile-header{min-width:0;max-width:100%}.mobile-header__lane.sc-ds-mobile-header{display:flex;align-items:center;gap:var(--dimension-space-050);min-width:0}.mobile-header__lane--leading.sc-ds-mobile-header{justify-content:flex-start}.mobile-header__lane--trailing.sc-ds-mobile-header{justify-content:flex-end}.mobile-header__center.sc-ds-mobile-header{position:relative;min-width:0;max-width:100%;justify-self:center}.mobile-header__heading.sc-ds-mobile-header{display:block;min-width:0;max-width:100%;text-align:center}.mobile-header__primary--inline-subsections.sc-ds-mobile-header .mobile-header__center.sc-ds-mobile-header,.mobile-header__primary--combined-subsections.sc-ds-mobile-header .mobile-header__center.sc-ds-mobile-header{display:flex;align-items:center;justify-content:center;gap:var(--dimension-space-100);width:100%}.mobile-header__combined-subsections.sc-ds-mobile-header{min-width:0;max-width:100%}.mobile-header__primary--inline-subsections.sc-ds-mobile-header .mobile-header__heading.sc-ds-mobile-header{flex:0 1 auto;width:auto}.mobile-header__inline-subsections.sc-ds-mobile-header{flex:0 1 auto;min-width:0;max-width:60%}.mobile-header__semantic-heading.sc-ds-mobile-header{position:absolute;width:var(--dimension-stroke-width-012);height:var(--dimension-stroke-width-012);padding:0;margin:calc(var(--dimension-stroke-width-012) * -1);overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.sc-ds-mobile-header-s>[slot='leading'],.sc-ds-mobile-header-s>[slot='trailing']{flex:0 0 auto}`;const w=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.dsSectionChange=i(this,"dsSectionChange",7);this.dsSubsectionChange=i(this,"dsSubsectionChange",7);this.heading="";this.headingLevel="h1";this.sections=[];this.value="";this.sectionsAriaLabel="Change page section";this.sectionsPresentation="switcher";this.sectionsSize="md";this.subsections=[];this.subvalue="";this.subsectionsAriaLabel="Change page subsection";this.subsectionsPlacement="below";this.tone="default";this.handleSectionChange=e=>{e.stopPropagation();this.dsSectionChange.emit(e.detail)};this.handleSubsectionChange=e=>{e.stopPropagation();this.dsSubsectionChange.emit(e.detail)}}get resolvedSections(){return this.sections??[]}get resolvedSubsections(){return this.subsections??[]}get selectedLabel(){const e=r(this.resolvedSections);return e.find((e=>e.id===this.value))?.label??e[0]?.label??this.heading}render(){const e=this.headingLevel;const s=r(this.resolvedSections);const i=s.length>1;const d=r(this.resolvedSubsections).length>1;const t=i&&this.sectionsPresentation==="segmented";const n=d&&!i&&this.subsectionsPlacement==="inline";const c=d&&!i&&this.subsectionsPlacement==="combined";const m=this.tone==="brand"?"on-bold":"primary";return a(o,{key:"8c94039873b754fc2e4eefc63e3cc0cf5f5b31ff"},a("header",{key:"54d62265ec32b5ad822e8ea86252dbb5076fa3b2",class:"mobile-header"},a("div",{key:"57e372cf7ccd408bf68ab90e620f4afa877edc26",class:{"mobile-header__primary":true,"mobile-header__primary--segmented":t,"mobile-header__primary--inline-subsections":n,"mobile-header__primary--combined-subsections":c,"ds-chrome-grid":true,"ds-chrome-space--md":true}},a("div",{key:"ef572b4c88a61c64871cb9a6fb94574c9451f4f1",class:"mobile-header__lane mobile-header__lane--leading"},a("slot",{key:"efa331bb178c360a5c29a8ebc289379e07031cf6",name:"leading"})),a("div",{key:"fdc914841da28f2c8062ea29b0b96c16e9eea0b4",class:"mobile-header__center"},c?[a("span",{class:"mobile-header__semantic-heading",role:"heading","aria-level":this.headingLevel==="h1"?"1":"2"},this.selectedLabel),a("nav",{class:"mobile-header__combined-subsections","aria-label":this.subsectionsAriaLabel},a("ds-mobile-section-switcher",{presentation:"sheet",pageLabel:this.selectedLabel,sections:this.resolvedSubsections,value:this.subvalue,navigationLabel:this.subsectionsAriaLabel,onDsChange:this.handleSubsectionChange}))]:i?[a("span",{class:"mobile-header__semantic-heading",role:"heading","aria-level":this.headingLevel==="h1"?"1":"2"},this.selectedLabel),this.sectionsPresentation==="segmented"?a("ds-tab-group",{tabs:this.resolvedSections,value:this.value,size:this.sectionsSize,width:"fill",ariaLabel:this.sectionsAriaLabel,onDsChange:this.handleSectionChange}):a("ds-mobile-section-switcher",{presentation:d?"menu":"sheet",sections:this.resolvedSections,value:this.value,navigationLabel:this.sectionsAriaLabel,onDsChange:this.handleSectionChange})]:a("ds-text",{class:"mobile-header__heading",as:e,variant:"text-body-large",emphasis:true,color:m,lineTruncation:1},this.selectedLabel),n?this.renderSubsections():null),a("div",{key:"6bf27f8640a30fe3b803a654aa43905b7a00618e",class:"mobile-header__lane mobile-header__lane--trailing"},a("slot",{key:"9e8ed83a41acf176db6c0f8bbeeac3c04f2ac18d",name:"trailing"}))),d&&!n&&!c?a("nav",{class:"mobile-header__subsections","aria-label":this.subsectionsAriaLabel},a("ds-mobile-section-switcher",{sections:this.resolvedSubsections,value:this.subvalue,navigationLabel:this.subsectionsAriaLabel,onDsChange:this.handleSubsectionChange})):null))}renderSubsections(){return a("nav",{class:"mobile-header__inline-subsections","aria-label":this.subsectionsAriaLabel},a("ds-mobile-section-switcher",{sections:this.resolvedSubsections,value:this.subvalue,navigationLabel:this.subsectionsAriaLabel,onDsChange:this.handleSubsectionChange}))}static get style(){return v()}},[262,"ds-mobile-header",{heading:[1],headingLevel:[1,"heading-level"],sections:[16],value:[1],sectionsAriaLabel:[1,"sections-aria-label"],sectionsPresentation:[1,"sections-presentation"],sectionsSize:[1,"sections-size"],subsections:[16],subvalue:[1],subsectionsAriaLabel:[1,"subsections-aria-label"],subsectionsPlacement:[1,"subsections-placement"],tone:[513]}]);function y(){if(typeof customElements==="undefined"){return}const e=["ds-mobile-header","ds-badge","ds-button-unfilled","ds-icon","ds-loader","ds-menu","ds-mobile-section-switcher","ds-swatch-picker","ds-switch","ds-tab-group","ds-tag","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-mobile-header":if(!customElements.get(d(e))){customElements.define(d(e),w)}break;case"ds-badge":if(!customElements.get(d(e))){t()}break;case"ds-button-unfilled":if(!customElements.get(d(e))){n()}break;case"ds-icon":if(!customElements.get(d(e))){c()}break;case"ds-loader":if(!customElements.get(d(e))){m()}break;case"ds-menu":if(!customElements.get(d(e))){h()}break;case"ds-mobile-section-switcher":if(!customElements.get(d(e))){l()}break;case"ds-swatch-picker":if(!customElements.get(d(e))){b()}break;case"ds-switch":if(!customElements.get(d(e))){p()}break;case"ds-tab-group":if(!customElements.get(d(e))){g()}break;case"ds-tag":if(!customElements.get(d(e))){u()}break;case"ds-text":if(!customElements.get(d(e))){f()}break;case"ds-tooltip":if(!customElements.get(d(e))){_()}break}}))}y();export{w as M,y as d};
2
- //# sourceMappingURL=p-BQE2Uj4p.js.map
1
+ import{p as e,H as s,c as i,h as a,a as o,t as d}from"./index.js";import{g as r}from"./p-BQq26pt9.js";import{d as t}from"./p-CzTJAO2J.js";import{d as n}from"./p-CaNMVLhm.js";import{d as c}from"./p-BVsVUnAw.js";import{d as m}from"./p-0XTyQNRG.js";import{d as h}from"./p-DixX2_Bd.js";import{d as l}from"./p-Ba-dSshd.js";import{d as b}from"./p-Ch00yccW.js";import{d as p}from"./p-CAARHqjE.js";import{d as u}from"./p-0EpjqRWc.js";import{d as g}from"./p-M9pOLcyK.js";import{d as f}from"./p-CTAF7SkL.js";import{d as _}from"./p-B5rN3slq.js";const v=()=>`.ds-chrome-space--sm.sc-ds-mobile-header-h,.ds-chrome-space--sm.sc-ds-mobile-header{--ds-chrome-padding:var(--ds-chrome-space-sm-padding, var(--dimension-space-050));--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-mobile-header-h,.ds-chrome-space--md.sc-ds-mobile-header{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-mobile-header-h,.ds-chrome-space--lg.sc-ds-mobile-header{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-mobile-header-h,.ds-chrome-row.sc-ds-mobile-header,.ds-chrome-column.sc-ds-mobile-header-h,.ds-chrome-column.sc-ds-mobile-header,.ds-chrome-grid.sc-ds-mobile-header-h,.ds-chrome-grid.sc-ds-mobile-header{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-mobile-header-h,.ds-chrome-row.sc-ds-mobile-header{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-mobile-header-h,.ds-chrome-column.sc-ds-mobile-header{flex-direction:column}.ds-chrome-grid.sc-ds-mobile-header-h,.ds-chrome-grid.sc-ds-mobile-header{display:grid;align-items:center}.sc-ds-mobile-header-h{display:block;min-width:0;box-sizing:border-box;background:var(--color-background-primary);color:var(--color-foreground-primary)}[tone='brand'].sc-ds-mobile-header-h{background:var(--color-background-bold-brand);color:var(--color-foreground-on-bold)}.mobile-header.sc-ds-mobile-header{position:relative;display:flex;flex-direction:column;width:100%;min-width:0;box-sizing:border-box;background:inherit;color:inherit}.mobile-header__primary.sc-ds-mobile-header{grid-template-columns:minmax(var(--dimension-size-400), 1fr) minmax(0, auto) minmax( var(--dimension-size-400), 1fr );width:100%;height:calc(var(--dimension-size-400) + var(--dimension-space-200));min-width:0;background:inherit;color:inherit}.mobile-header__primary--segmented.sc-ds-mobile-header{grid-template-columns:minmax(var(--dimension-size-400), 1fr) minmax(0, 4fr) minmax(var(--dimension-size-400), 1fr)}.mobile-header__primary--segmented.sc-ds-mobile-header .mobile-header__center.sc-ds-mobile-header,.mobile-header__primary--segmented.sc-ds-mobile-header ds-tab-group.sc-ds-mobile-header{width:100%}.sc-ds-mobile-header-h:not([tone='brand']) .mobile-header.sc-ds-mobile-header::after{content:'';position:absolute;inset-inline:0;inset-block-end:0;height:var(--dimension-stroke-width-012);background:var(--color-border-tertiary);pointer-events:none}.mobile-header__subsections.sc-ds-mobile-header{display:flex;align-items:center;justify-content:center;min-width:0;height:var(--dimension-size-600);padding:var(--dimension-space-100) var(--dimension-space-200);box-sizing:border-box}.mobile-header__subsections.sc-ds-mobile-header ds-mobile-section-switcher.sc-ds-mobile-header{min-width:0;max-width:100%}.mobile-header__lane.sc-ds-mobile-header{display:flex;align-items:center;gap:var(--dimension-space-050);min-width:0}.mobile-header__lane--leading.sc-ds-mobile-header{justify-content:flex-start}.mobile-header__lane--trailing.sc-ds-mobile-header{justify-content:flex-end}.mobile-header__center.sc-ds-mobile-header{position:relative;min-width:0;max-width:100%;justify-self:center}.mobile-header__heading.sc-ds-mobile-header{display:block;min-width:0;max-width:100%;text-align:center}.mobile-header__primary--inline-subsections.sc-ds-mobile-header .mobile-header__center.sc-ds-mobile-header,.mobile-header__primary--combined-subsections.sc-ds-mobile-header .mobile-header__center.sc-ds-mobile-header{display:flex;align-items:center;justify-content:center;gap:var(--dimension-space-100);width:100%}.mobile-header__combined-subsections.sc-ds-mobile-header{min-width:0;max-width:100%}.mobile-header__primary--inline-subsections.sc-ds-mobile-header .mobile-header__heading.sc-ds-mobile-header{flex:0 1 auto;width:auto}.mobile-header__inline-subsections.sc-ds-mobile-header{flex:0 1 auto;min-width:0;max-width:60%}.mobile-header__semantic-heading.sc-ds-mobile-header{position:absolute;width:var(--dimension-stroke-width-012);height:var(--dimension-stroke-width-012);padding:0;margin:calc(var(--dimension-stroke-width-012) * -1);overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.sc-ds-mobile-header-s>[slot='leading'],.sc-ds-mobile-header-s>[slot='trailing']{flex:0 0 auto}`;const w=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.dsSectionChange=i(this,"dsSectionChange",7);this.dsSubsectionChange=i(this,"dsSubsectionChange",7);this.heading="";this.headingLevel="h1";this.sections=[];this.value="";this.sectionsAriaLabel="Change page section";this.sectionsPresentation="switcher";this.sectionsSize="md";this.subsections=[];this.subvalue="";this.subsectionsAriaLabel="Change page subsection";this.subsectionsPlacement="below";this.tone="default";this.handleSectionChange=e=>{e.stopPropagation();this.dsSectionChange.emit(e.detail)};this.handleSubsectionChange=e=>{e.stopPropagation();this.dsSubsectionChange.emit(e.detail)}}get resolvedSections(){return this.sections??[]}get resolvedSubsections(){return this.subsections??[]}get selectedLabel(){const e=r(this.resolvedSections);return e.find((e=>e.id===this.value))?.label??e[0]?.label??this.heading}render(){const e=this.headingLevel;const s=r(this.resolvedSections);const i=s.length>1;const d=r(this.resolvedSubsections).length>1;const t=i&&this.sectionsPresentation==="segmented";const n=d&&!i&&this.subsectionsPlacement==="inline";const c=d&&!i&&this.subsectionsPlacement==="combined";const m=this.tone==="brand"?"on-bold":"primary";return a(o,{key:"8c94039873b754fc2e4eefc63e3cc0cf5f5b31ff"},a("header",{key:"54d62265ec32b5ad822e8ea86252dbb5076fa3b2",class:"mobile-header"},a("div",{key:"57e372cf7ccd408bf68ab90e620f4afa877edc26",class:{"mobile-header__primary":true,"mobile-header__primary--segmented":t,"mobile-header__primary--inline-subsections":n,"mobile-header__primary--combined-subsections":c,"ds-chrome-grid":true,"ds-chrome-space--md":true}},a("div",{key:"ef572b4c88a61c64871cb9a6fb94574c9451f4f1",class:"mobile-header__lane mobile-header__lane--leading"},a("slot",{key:"efa331bb178c360a5c29a8ebc289379e07031cf6",name:"leading"})),a("div",{key:"fdc914841da28f2c8062ea29b0b96c16e9eea0b4",class:"mobile-header__center"},c?[a("span",{class:"mobile-header__semantic-heading",role:"heading","aria-level":this.headingLevel==="h1"?"1":"2"},this.selectedLabel),a("nav",{class:"mobile-header__combined-subsections","aria-label":this.subsectionsAriaLabel},a("ds-mobile-section-switcher",{presentation:"sheet",pageLabel:this.selectedLabel,sections:this.resolvedSubsections,value:this.subvalue,navigationLabel:this.subsectionsAriaLabel,onDsChange:this.handleSubsectionChange}))]:i?[a("span",{class:"mobile-header__semantic-heading",role:"heading","aria-level":this.headingLevel==="h1"?"1":"2"},this.selectedLabel),this.sectionsPresentation==="segmented"?a("ds-tab-group",{tabs:this.resolvedSections,value:this.value,size:this.sectionsSize,width:"fill",ariaLabel:this.sectionsAriaLabel,onDsChange:this.handleSectionChange}):a("ds-mobile-section-switcher",{presentation:d?"menu":"sheet",sections:this.resolvedSections,value:this.value,navigationLabel:this.sectionsAriaLabel,onDsChange:this.handleSectionChange})]:a("ds-text",{class:"mobile-header__heading",as:e,variant:"text-body-medium",emphasis:true,color:m,lineTruncation:1},this.selectedLabel),n?this.renderSubsections():null),a("div",{key:"c55f949b0b7b86be91293af91e24e8dd51b10cf8",class:"mobile-header__lane mobile-header__lane--trailing"},a("slot",{key:"9762a6d1bfd58d2ee7f36870ec68789ac9f71429",name:"trailing"}))),d&&!n&&!c?a("nav",{class:"mobile-header__subsections","aria-label":this.subsectionsAriaLabel},a("ds-mobile-section-switcher",{sections:this.resolvedSubsections,value:this.subvalue,navigationLabel:this.subsectionsAriaLabel,onDsChange:this.handleSubsectionChange})):null))}renderSubsections(){return a("nav",{class:"mobile-header__inline-subsections","aria-label":this.subsectionsAriaLabel},a("ds-mobile-section-switcher",{sections:this.resolvedSubsections,value:this.subvalue,navigationLabel:this.subsectionsAriaLabel,onDsChange:this.handleSubsectionChange}))}static get style(){return v()}},[262,"ds-mobile-header",{heading:[1],headingLevel:[1,"heading-level"],sections:[16],value:[1],sectionsAriaLabel:[1,"sections-aria-label"],sectionsPresentation:[1,"sections-presentation"],sectionsSize:[1,"sections-size"],subsections:[16],subvalue:[1],subsectionsAriaLabel:[1,"subsections-aria-label"],subsectionsPlacement:[1,"subsections-placement"],tone:[513]}]);function y(){if(typeof customElements==="undefined"){return}const e=["ds-mobile-header","ds-badge","ds-button-unfilled","ds-icon","ds-loader","ds-menu","ds-mobile-section-switcher","ds-swatch-picker","ds-switch","ds-tab-group","ds-tag","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-mobile-header":if(!customElements.get(d(e))){customElements.define(d(e),w)}break;case"ds-badge":if(!customElements.get(d(e))){t()}break;case"ds-button-unfilled":if(!customElements.get(d(e))){n()}break;case"ds-icon":if(!customElements.get(d(e))){c()}break;case"ds-loader":if(!customElements.get(d(e))){m()}break;case"ds-menu":if(!customElements.get(d(e))){h()}break;case"ds-mobile-section-switcher":if(!customElements.get(d(e))){l()}break;case"ds-swatch-picker":if(!customElements.get(d(e))){b()}break;case"ds-switch":if(!customElements.get(d(e))){p()}break;case"ds-tab-group":if(!customElements.get(d(e))){u()}break;case"ds-tag":if(!customElements.get(d(e))){g()}break;case"ds-text":if(!customElements.get(d(e))){f()}break;case"ds-tooltip":if(!customElements.get(d(e))){_()}break}}))}y();export{w as M,y as d};
2
+ //# sourceMappingURL=p-DfzXyVoM.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["mobileHeaderCss","MobileHeader","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","heading","headingLevel","sections","value","sectionsAriaLabel","sectionsPresentation","sectionsSize","subsections","subvalue","subsectionsAriaLabel","subsectionsPlacement","tone","handleSectionChange","event","stopPropagation","dsSectionChange","emit","detail","handleSubsectionChange","dsSubsectionChange","resolvedSections","resolvedSubsections","selectedLabel","selectable","getSelectableTabs","find","section","id","label","render","Heading","hasSwitcher","length","hasSubsections","hasSegmentedSections","inlineSubsections","combinedSubsections","foreground","h","Host","key","class","name","role","presentation","pageLabel","navigationLabel","onDsChange","tabs","size","width","ariaLabel","as","variant","emphasis","color","lineTruncation","renderSubsections"],"sources":["src/wc/components/MobileHeader/MobileHeader.css?tag=ds-mobile-header&encapsulation=scoped","src/wc/components/MobileHeader/MobileHeader.tsx"],"sourcesContent":["@import '../../utils/chrome-layout.css';\n\n:host {\n display: block;\n min-width: 0;\n box-sizing: border-box;\n background: var(--color-background-primary);\n color: var(--color-foreground-primary);\n}\n\n:host([tone='brand']) {\n background: var(--color-background-bold-brand);\n color: var(--color-foreground-on-bold);\n}\n\n.mobile-header {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n background: inherit;\n color: inherit;\n}\n\n.mobile-header__primary {\n grid-template-columns: minmax(var(--dimension-size-500), 1fr) minmax(0, auto) minmax(\n var(--dimension-size-500),\n 1fr\n );\n width: 100%;\n height: calc(var(--dimension-size-500) + var(--dimension-space-200));\n min-width: 0;\n background: inherit;\n color: inherit;\n}\n\n.mobile-header__primary--segmented {\n grid-template-columns:\n minmax(var(--dimension-size-500), 1fr)\n minmax(0, 4fr)\n minmax(var(--dimension-size-500), 1fr);\n}\n\n.mobile-header__primary--segmented .mobile-header__center,\n.mobile-header__primary--segmented ds-tab-group {\n width: 100%;\n}\n\n:host(:not([tone='brand'])) .mobile-header::after {\n content: '';\n position: absolute;\n inset-inline: 0;\n inset-block-end: 0;\n height: var(--dimension-stroke-width-012);\n background: var(--color-border-tertiary);\n pointer-events: none;\n}\n\n.mobile-header__subsections {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 0;\n height: var(--dimension-size-600);\n padding: var(--dimension-space-100) var(--dimension-space-200);\n box-sizing: border-box;\n}\n\n.mobile-header__subsections ds-mobile-section-switcher {\n min-width: 0;\n max-width: 100%;\n}\n\n.mobile-header__lane {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-050);\n min-width: 0;\n}\n\n.mobile-header__lane--leading {\n justify-content: flex-start;\n}\n\n.mobile-header__lane--trailing {\n justify-content: flex-end;\n}\n\n.mobile-header__center {\n position: relative;\n min-width: 0;\n max-width: 100%;\n justify-self: center;\n}\n\n.mobile-header__heading {\n display: block;\n min-width: 0;\n max-width: 100%;\n text-align: center;\n}\n\n.mobile-header__primary--inline-subsections .mobile-header__center,\n.mobile-header__primary--combined-subsections .mobile-header__center {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--dimension-space-100);\n width: 100%;\n}\n\n.mobile-header__combined-subsections {\n min-width: 0;\n max-width: 100%;\n}\n\n.mobile-header__primary--inline-subsections .mobile-header__heading {\n flex: 0 1 auto;\n width: auto;\n}\n\n.mobile-header__inline-subsections {\n flex: 0 1 auto;\n min-width: 0;\n max-width: 60%;\n}\n\n.mobile-header__semantic-heading {\n position: absolute;\n width: var(--dimension-stroke-width-012);\n height: var(--dimension-stroke-width-012);\n padding: 0;\n margin: calc(var(--dimension-stroke-width-012) * -1);\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n::slotted([slot='leading']),\n::slotted([slot='trailing']) {\n flex: 0 0 auto;\n}\n","import { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\nimport { getSelectableTabs, type TabGroupItem, type TabItem } from '../TabGroup/tab-item-utils';\nimport type { TabGroupSize } from '../TabGroup/TabGroup';\nimport type {\n MobileHeaderHeadingLevel,\n MobileHeaderSectionsPresentation,\n MobileHeaderTone,\n} from './mobile-header-types';\n\n@Component({\n tag: 'ds-mobile-header',\n styleUrl: 'MobileHeader.css',\n scoped: true,\n})\nexport class MobileHeader {\n /** Static title used when no peer sections are supplied. */\n @Prop() heading: string = '';\n /** Semantic heading level for the active mobile screen. */\n @Prop() headingLevel: MobileHeaderHeadingLevel = 'h1';\n /** Controlled peer sections. Their selected label replaces the static title. */\n @Prop() sections: TabGroupItem[] = [];\n /** Controlled selected section id. */\n @Prop() value: string = '';\n /** Accessible name for the section chooser. */\n @Prop() sectionsAriaLabel: string = 'Change page section';\n /** Popup switcher or an inline segmented TabGroup for peer sections. */\n @Prop() sectionsPresentation: MobileHeaderSectionsPresentation = 'switcher';\n /** Density for the segmented sections presentation. */\n @Prop() sectionsSize: TabGroupSize = 'md';\n /** Controlled child sections within the selected page or detail screen. */\n @Prop() subsections: TabItem[] = [];\n /** Controlled selected child-section id. */\n @Prop() subvalue: string = '';\n /** Accessible name for the child-section chooser. */\n @Prop() subsectionsAriaLabel: string = 'Change page subsection';\n /** Place local sections below, beside, or combined with the page title in one sheet trigger. */\n @Prop() subsectionsPlacement: 'below' | 'inline' | 'combined' = 'below';\n /** Default page chrome or bold-brand workflow chrome. */\n @Prop({ reflect: true }) tone: MobileHeaderTone = 'default';\n\n /** Section selection intent. */\n @Event() dsSectionChange!: EventEmitter<string>;\n /** Child-section selection intent. */\n @Event() dsSubsectionChange!: EventEmitter<string>;\n\n private get resolvedSections(): TabGroupItem[] {\n return this.sections ?? [];\n }\n\n private get resolvedSubsections(): TabItem[] {\n return this.subsections ?? [];\n }\n\n private get selectedLabel(): string {\n const selectable = getSelectableTabs(this.resolvedSections);\n return (\n selectable.find(section => section.id === this.value)?.label ??\n selectable[0]?.label ??\n this.heading\n );\n }\n\n private handleSectionChange = (event: CustomEvent<string>) => {\n event.stopPropagation();\n this.dsSectionChange.emit(event.detail);\n };\n\n private handleSubsectionChange = (event: CustomEvent<string>) => {\n event.stopPropagation();\n this.dsSubsectionChange.emit(event.detail);\n };\n\n render() {\n const Heading = this.headingLevel;\n const selectable = getSelectableTabs(this.resolvedSections);\n const hasSwitcher = selectable.length > 1;\n const hasSubsections = getSelectableTabs(this.resolvedSubsections).length > 1;\n const hasSegmentedSections = hasSwitcher && this.sectionsPresentation === 'segmented';\n const inlineSubsections =\n hasSubsections && !hasSwitcher && this.subsectionsPlacement === 'inline';\n const combinedSubsections =\n hasSubsections && !hasSwitcher && this.subsectionsPlacement === 'combined';\n const foreground = this.tone === 'brand' ? 'on-bold' : 'primary';\n\n return (\n <Host>\n <header class=\"mobile-header\">\n <div\n class={{\n 'mobile-header__primary': true,\n 'mobile-header__primary--segmented': hasSegmentedSections,\n 'mobile-header__primary--inline-subsections': inlineSubsections,\n 'mobile-header__primary--combined-subsections': combinedSubsections,\n 'ds-chrome-grid': true,\n 'ds-chrome-space--md': true,\n }}\n >\n <div class=\"mobile-header__lane mobile-header__lane--leading\">\n <slot name=\"leading\" />\n </div>\n <div class=\"mobile-header__center\">\n {combinedSubsections ? (\n [\n <span\n class=\"mobile-header__semantic-heading\"\n role=\"heading\"\n aria-level={this.headingLevel === 'h1' ? '1' : '2'}\n >\n {this.selectedLabel}\n </span>,\n <nav\n class=\"mobile-header__combined-subsections\"\n aria-label={this.subsectionsAriaLabel}\n >\n <ds-mobile-section-switcher\n presentation=\"sheet\"\n pageLabel={this.selectedLabel}\n sections={this.resolvedSubsections}\n value={this.subvalue}\n navigationLabel={this.subsectionsAriaLabel}\n onDsChange={this.handleSubsectionChange}\n />\n </nav>,\n ]\n ) : hasSwitcher ? (\n [\n <span\n class=\"mobile-header__semantic-heading\"\n role=\"heading\"\n aria-level={this.headingLevel === 'h1' ? '1' : '2'}\n >\n {this.selectedLabel}\n </span>,\n this.sectionsPresentation === 'segmented' ? (\n <ds-tab-group\n tabs={this.resolvedSections}\n value={this.value}\n size={this.sectionsSize}\n width=\"fill\"\n ariaLabel={this.sectionsAriaLabel}\n onDsChange={this.handleSectionChange}\n />\n ) : (\n <ds-mobile-section-switcher\n presentation={hasSubsections ? 'menu' : 'sheet'}\n sections={this.resolvedSections}\n value={this.value}\n navigationLabel={this.sectionsAriaLabel}\n onDsChange={this.handleSectionChange}\n />\n ),\n ]\n ) : (\n <ds-text\n class=\"mobile-header__heading\"\n as={Heading}\n variant=\"text-body-large\"\n emphasis\n color={foreground}\n lineTruncation={1}\n >\n {this.selectedLabel}\n </ds-text>\n )}\n {inlineSubsections ? this.renderSubsections() : null}\n </div>\n <div class=\"mobile-header__lane mobile-header__lane--trailing\">\n <slot name=\"trailing\" />\n </div>\n </div>\n {hasSubsections && !inlineSubsections && !combinedSubsections ? (\n <nav class=\"mobile-header__subsections\" aria-label={this.subsectionsAriaLabel}>\n <ds-mobile-section-switcher\n sections={this.resolvedSubsections}\n value={this.subvalue}\n navigationLabel={this.subsectionsAriaLabel}\n onDsChange={this.handleSubsectionChange}\n />\n </nav>\n ) : null}\n </header>\n </Host>\n );\n }\n\n private renderSubsections() {\n return (\n <nav class=\"mobile-header__inline-subsections\" aria-label={this.subsectionsAriaLabel}>\n <ds-mobile-section-switcher\n sections={this.resolvedSubsections}\n value={this.subvalue}\n navigationLabel={this.subsectionsAriaLabel}\n onDsChange={this.handleSubsectionChange}\n />\n </nav>\n );\n }\n}\n"],"mappings":"shBAAA,MAAMA,EAAkB,IAAM,+1I,MCcjBC,EAAYC,EAAA,MAAAD,UAAAE,EALzB,WAAAC,CAAAC,G,oJAOUC,KAAAC,QAAkB,GAElBD,KAAAE,aAAyC,KAEzCF,KAAAG,SAA2B,GAE3BH,KAAAI,MAAgB,GAEhBJ,KAAAK,kBAA4B,sBAE5BL,KAAAM,qBAAyD,WAEzDN,KAAAO,aAA6B,KAE7BP,KAAAQ,YAAyB,GAEzBR,KAAAS,SAAmB,GAEnBT,KAAAU,qBAA+B,yBAE/BV,KAAAW,qBAAwD,QAEvCX,KAAAY,KAAyB,UAwB1CZ,KAAAa,oBAAuBC,IAC7BA,EAAMC,kBACNf,KAAKgB,gBAAgBC,KAAKH,EAAMI,OAAO,EAGjClB,KAAAmB,uBAA0BL,IAChCA,EAAMC,kBACNf,KAAKoB,mBAAmBH,KAAKH,EAAMI,OAAO,CAgI7C,CAxJC,oBAAYG,GACV,OAAOrB,KAAKG,UAAY,E,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EAAW,CAEXO,EAAA,QACEG,MAAM,kCACNE,KAAK,UAAS,aACF5C,KAAKE,eAAiB,KAAO,IAAM,KAE9CF,KAAKuB,eAERvB,KAAKM,uBAAyB,YAC5BiC,EAAA,gBACEU,KAAMjD,KAAKqB,iBACXjB,MAAOJ,KAAKI,MACZ8C,KAAMlD,KAAKO,aACX4C,MAAM,OACNC,UAAWpD,KAAKK,kBAChB2C,WAAYhD,KAAKa,sBAGnB0B,EAAA,8BACEM,aAAcX,EAAiB,OAAS,QACxC/B,SAAUH,KAAKqB,iBACfjB,MAAOJ,KAAKI,MACZ2C,gBAAiB/C,KAAKK,kBACtB2C,WAAYhD,KAAKa,uBAKvB0B,EAAA,WACEG,MAAM,yBACNW,GAAItB,EACJuB,QAAQ,kBACRC,SAAQ,KACRC,MAAOlB,EACPmB,eAAgB,GAEfzD,KAAKuB,eAGTa,EAAoBpC,KAAK0D,oBAAsB,MAElDnB,EAAA,OAAAE,IAAA,2CAAKC,MAAM,qDACTH,EAAA,QAAAE,IAAA,2CAAME,KAAK,eAGdT,IAAmBE,IAAsBC,EACxCE,EAAA,OAAKG,MAAM,6BAA4B,aAAa1C,KAAKU,sBACvD6B,EAAA,8BACEpC,SAAUH,KAAKsB,oBACflB,MAAOJ,KAAKS,SACZsC,gBAAiB/C,KAAKU,qBACtBsC,WAAYhD,KAAKmB,0BAGnB,M,CAMJ,iBAAAuC,GACN,OACEnB,EAAA,OAAKG,MAAM,oCAAmC,aAAa1C,KAAKU,sBAC9D6B,EAAA,8BACEpC,SAAUH,KAAKsB,oBACflB,MAAOJ,KAAKS,SACZsC,gBAAiB/C,KAAKU,qBACtBsC,WAAYhD,KAAKmB,yB","ignoreList":[]}
1
+ {"version":3,"names":["mobileHeaderCss","MobileHeader","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","heading","headingLevel","sections","value","sectionsAriaLabel","sectionsPresentation","sectionsSize","subsections","subvalue","subsectionsAriaLabel","subsectionsPlacement","tone","handleSectionChange","event","stopPropagation","dsSectionChange","emit","detail","handleSubsectionChange","dsSubsectionChange","resolvedSections","resolvedSubsections","selectedLabel","selectable","getSelectableTabs","find","section","id","label","render","Heading","hasSwitcher","length","hasSubsections","hasSegmentedSections","inlineSubsections","combinedSubsections","foreground","h","Host","key","class","name","role","presentation","pageLabel","navigationLabel","onDsChange","tabs","size","width","ariaLabel","as","variant","emphasis","color","lineTruncation","renderSubsections"],"sources":["src/wc/components/MobileHeader/MobileHeader.css?tag=ds-mobile-header&encapsulation=scoped","src/wc/components/MobileHeader/MobileHeader.tsx"],"sourcesContent":["@import '../../utils/chrome-layout.css';\n\n:host {\n display: block;\n min-width: 0;\n box-sizing: border-box;\n background: var(--color-background-primary);\n color: var(--color-foreground-primary);\n}\n\n:host([tone='brand']) {\n background: var(--color-background-bold-brand);\n color: var(--color-foreground-on-bold);\n}\n\n.mobile-header {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n background: inherit;\n color: inherit;\n}\n\n.mobile-header__primary {\n grid-template-columns: minmax(var(--dimension-size-400), 1fr) minmax(0, auto) minmax(\n var(--dimension-size-400),\n 1fr\n );\n width: 100%;\n height: calc(var(--dimension-size-400) + var(--dimension-space-200));\n min-width: 0;\n background: inherit;\n color: inherit;\n}\n\n.mobile-header__primary--segmented {\n grid-template-columns:\n minmax(var(--dimension-size-400), 1fr)\n minmax(0, 4fr)\n minmax(var(--dimension-size-400), 1fr);\n}\n\n.mobile-header__primary--segmented .mobile-header__center,\n.mobile-header__primary--segmented ds-tab-group {\n width: 100%;\n}\n\n:host(:not([tone='brand'])) .mobile-header::after {\n content: '';\n position: absolute;\n inset-inline: 0;\n inset-block-end: 0;\n height: var(--dimension-stroke-width-012);\n background: var(--color-border-tertiary);\n pointer-events: none;\n}\n\n.mobile-header__subsections {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 0;\n height: var(--dimension-size-600);\n padding: var(--dimension-space-100) var(--dimension-space-200);\n box-sizing: border-box;\n}\n\n.mobile-header__subsections ds-mobile-section-switcher {\n min-width: 0;\n max-width: 100%;\n}\n\n.mobile-header__lane {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-050);\n min-width: 0;\n}\n\n.mobile-header__lane--leading {\n justify-content: flex-start;\n}\n\n.mobile-header__lane--trailing {\n justify-content: flex-end;\n}\n\n.mobile-header__center {\n position: relative;\n min-width: 0;\n max-width: 100%;\n justify-self: center;\n}\n\n.mobile-header__heading {\n display: block;\n min-width: 0;\n max-width: 100%;\n text-align: center;\n}\n\n.mobile-header__primary--inline-subsections .mobile-header__center,\n.mobile-header__primary--combined-subsections .mobile-header__center {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--dimension-space-100);\n width: 100%;\n}\n\n.mobile-header__combined-subsections {\n min-width: 0;\n max-width: 100%;\n}\n\n.mobile-header__primary--inline-subsections .mobile-header__heading {\n flex: 0 1 auto;\n width: auto;\n}\n\n.mobile-header__inline-subsections {\n flex: 0 1 auto;\n min-width: 0;\n max-width: 60%;\n}\n\n.mobile-header__semantic-heading {\n position: absolute;\n width: var(--dimension-stroke-width-012);\n height: var(--dimension-stroke-width-012);\n padding: 0;\n margin: calc(var(--dimension-stroke-width-012) * -1);\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n::slotted([slot='leading']),\n::slotted([slot='trailing']) {\n flex: 0 0 auto;\n}\n","import { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';\nimport { getSelectableTabs, type TabGroupItem, type TabItem } from '../TabGroup/tab-item-utils';\nimport type { TabGroupSize } from '../TabGroup/TabGroup';\nimport type {\n MobileHeaderHeadingLevel,\n MobileHeaderSectionsPresentation,\n MobileHeaderTone,\n} from './mobile-header-types';\n\n@Component({\n tag: 'ds-mobile-header',\n styleUrl: 'MobileHeader.css',\n scoped: true,\n})\nexport class MobileHeader {\n /** Static title used when no peer sections are supplied. */\n @Prop() heading: string = '';\n /** Semantic heading level for the active mobile screen. */\n @Prop() headingLevel: MobileHeaderHeadingLevel = 'h1';\n /** Controlled peer sections. Their selected label replaces the static title. */\n @Prop() sections: TabGroupItem[] = [];\n /** Controlled selected section id. */\n @Prop() value: string = '';\n /** Accessible name for the section chooser. */\n @Prop() sectionsAriaLabel: string = 'Change page section';\n /** Popup switcher or an inline segmented TabGroup for peer sections. */\n @Prop() sectionsPresentation: MobileHeaderSectionsPresentation = 'switcher';\n /** Density for the segmented sections presentation. */\n @Prop() sectionsSize: TabGroupSize = 'md';\n /** Controlled child sections within the selected page or detail screen. */\n @Prop() subsections: TabItem[] = [];\n /** Controlled selected child-section id. */\n @Prop() subvalue: string = '';\n /** Accessible name for the child-section chooser. */\n @Prop() subsectionsAriaLabel: string = 'Change page subsection';\n /** Place local sections below, beside, or combined with the page title in one sheet trigger. */\n @Prop() subsectionsPlacement: 'below' | 'inline' | 'combined' = 'below';\n /** Default page chrome or bold-brand workflow chrome. */\n @Prop({ reflect: true }) tone: MobileHeaderTone = 'default';\n\n /** Section selection intent. */\n @Event() dsSectionChange!: EventEmitter<string>;\n /** Child-section selection intent. */\n @Event() dsSubsectionChange!: EventEmitter<string>;\n\n private get resolvedSections(): TabGroupItem[] {\n return this.sections ?? [];\n }\n\n private get resolvedSubsections(): TabItem[] {\n return this.subsections ?? [];\n }\n\n private get selectedLabel(): string {\n const selectable = getSelectableTabs(this.resolvedSections);\n return (\n selectable.find(section => section.id === this.value)?.label ??\n selectable[0]?.label ??\n this.heading\n );\n }\n\n private handleSectionChange = (event: CustomEvent<string>) => {\n event.stopPropagation();\n this.dsSectionChange.emit(event.detail);\n };\n\n private handleSubsectionChange = (event: CustomEvent<string>) => {\n event.stopPropagation();\n this.dsSubsectionChange.emit(event.detail);\n };\n\n render() {\n const Heading = this.headingLevel;\n const selectable = getSelectableTabs(this.resolvedSections);\n const hasSwitcher = selectable.length > 1;\n const hasSubsections = getSelectableTabs(this.resolvedSubsections).length > 1;\n const hasSegmentedSections = hasSwitcher && this.sectionsPresentation === 'segmented';\n const inlineSubsections =\n hasSubsections && !hasSwitcher && this.subsectionsPlacement === 'inline';\n const combinedSubsections =\n hasSubsections && !hasSwitcher && this.subsectionsPlacement === 'combined';\n const foreground = this.tone === 'brand' ? 'on-bold' : 'primary';\n\n return (\n <Host>\n <header class=\"mobile-header\">\n <div\n class={{\n 'mobile-header__primary': true,\n 'mobile-header__primary--segmented': hasSegmentedSections,\n 'mobile-header__primary--inline-subsections': inlineSubsections,\n 'mobile-header__primary--combined-subsections': combinedSubsections,\n 'ds-chrome-grid': true,\n 'ds-chrome-space--md': true,\n }}\n >\n <div class=\"mobile-header__lane mobile-header__lane--leading\">\n <slot name=\"leading\" />\n </div>\n <div class=\"mobile-header__center\">\n {combinedSubsections ? (\n [\n <span\n class=\"mobile-header__semantic-heading\"\n role=\"heading\"\n aria-level={this.headingLevel === 'h1' ? '1' : '2'}\n >\n {this.selectedLabel}\n </span>,\n <nav\n class=\"mobile-header__combined-subsections\"\n aria-label={this.subsectionsAriaLabel}\n >\n <ds-mobile-section-switcher\n presentation=\"sheet\"\n pageLabel={this.selectedLabel}\n sections={this.resolvedSubsections}\n value={this.subvalue}\n navigationLabel={this.subsectionsAriaLabel}\n onDsChange={this.handleSubsectionChange}\n />\n </nav>,\n ]\n ) : hasSwitcher ? (\n [\n <span\n class=\"mobile-header__semantic-heading\"\n role=\"heading\"\n aria-level={this.headingLevel === 'h1' ? '1' : '2'}\n >\n {this.selectedLabel}\n </span>,\n this.sectionsPresentation === 'segmented' ? (\n <ds-tab-group\n tabs={this.resolvedSections}\n value={this.value}\n size={this.sectionsSize}\n width=\"fill\"\n ariaLabel={this.sectionsAriaLabel}\n onDsChange={this.handleSectionChange}\n />\n ) : (\n <ds-mobile-section-switcher\n presentation={hasSubsections ? 'menu' : 'sheet'}\n sections={this.resolvedSections}\n value={this.value}\n navigationLabel={this.sectionsAriaLabel}\n onDsChange={this.handleSectionChange}\n />\n ),\n ]\n ) : (\n <ds-text\n class=\"mobile-header__heading\"\n as={Heading}\n variant=\"text-body-medium\"\n emphasis\n color={foreground}\n lineTruncation={1}\n >\n {this.selectedLabel}\n </ds-text>\n )}\n {inlineSubsections ? this.renderSubsections() : null}\n </div>\n <div class=\"mobile-header__lane mobile-header__lane--trailing\">\n <slot name=\"trailing\" />\n </div>\n </div>\n {hasSubsections && !inlineSubsections && !combinedSubsections ? (\n <nav class=\"mobile-header__subsections\" aria-label={this.subsectionsAriaLabel}>\n <ds-mobile-section-switcher\n sections={this.resolvedSubsections}\n value={this.subvalue}\n navigationLabel={this.subsectionsAriaLabel}\n onDsChange={this.handleSubsectionChange}\n />\n </nav>\n ) : null}\n </header>\n </Host>\n );\n }\n\n private renderSubsections() {\n return (\n <nav class=\"mobile-header__inline-subsections\" aria-label={this.subsectionsAriaLabel}>\n <ds-mobile-section-switcher\n sections={this.resolvedSubsections}\n value={this.subvalue}\n navigationLabel={this.subsectionsAriaLabel}\n onDsChange={this.handleSubsectionChange}\n />\n </nav>\n );\n }\n}\n"],"mappings":"shBAAA,MAAMA,EAAkB,IAAM,+1I,MCcjBC,EAAYC,EAAA,MAAAD,UAAAE,EALzB,WAAAC,CAAAC,G,oJAOUC,KAAAC,QAAkB,GAElBD,KAAAE,aAAyC,KAEzCF,KAAAG,SAA2B,GAE3BH,KAAAI,MAAgB,GAEhBJ,KAAAK,kBAA4B,sBAE5BL,KAAAM,qBAAyD,WAEzDN,KAAAO,aAA6B,KAE7BP,KAAAQ,YAAyB,GAEzBR,KAAAS,SAAmB,GAEnBT,KAAAU,qBAA+B,yBAE/BV,KAAAW,qBAAwD,QAEvCX,KAAAY,KAAyB,UAwB1CZ,KAAAa,oBAAuBC,IAC7BA,EAAMC,kBACNf,KAAKgB,gBAAgBC,KAAKH,EAAMI,OAAO,EAGjClB,KAAAmB,uBAA0BL,IAChCA,EAAMC,kBACNf,KAAKoB,mBAAmBH,KAAKH,EAAMI,OAAO,CAgI7C,CAxJC,oBAAYG,GACV,OAAOrB,KAAKG,UAAY,E,CA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