@ds-mo/ui 14.31.3 → 14.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.package-ready.json +1 -1
- package/dist/agent-patterns.json +15 -5
- package/dist/agent.json +228 -23
- package/dist/angular/ds-bar-page-title.d.ts +28 -0
- package/dist/angular/ds-bar-page-title.js +48 -0
- package/dist/angular/ds-card-settings-scope.d.ts +1 -1
- package/dist/angular/ds-card-settings-scope.js +3 -3
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +1 -0
- package/dist/angular/proxies.d.ts +1 -0
- package/dist/angular/proxies.js +1 -0
- package/dist/components/ds-agent-questionnaire.js +1 -1
- package/dist/components/ds-agent-response.js +1 -1
- package/dist/components/ds-avatar.js +1 -1
- package/dist/components/ds-avatar.js.map +1 -1
- package/dist/components/ds-banner.js +1 -1
- package/dist/components/ds-banner.js.map +1 -1
- package/dist/components/ds-bar-action.js +1 -1
- package/dist/components/ds-bar-action.js.map +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-page-title.d.ts +11 -0
- package/dist/components/ds-bar-page-title.js +2 -0
- package/dist/components/ds-bar-page-title.js.map +1 -0
- package/dist/components/ds-bar-title.js +1 -1
- package/dist/components/ds-bar-workflow.js +1 -1
- package/dist/components/ds-bar-workflow.js.map +1 -1
- package/dist/components/ds-button-filled.js +1 -1
- package/dist/components/ds-button-unfilled.js +1 -1
- package/dist/components/ds-card-chart.js +1 -1
- package/dist/components/ds-card-chart.js.map +1 -1
- package/dist/components/ds-card-navigation.js +1 -1
- package/dist/components/ds-card-navigation.js.map +1 -1
- package/dist/components/ds-card-overview.js +1 -1
- package/dist/components/ds-card-overview.js.map +1 -1
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-card-setting.js.map +1 -1
- package/dist/components/ds-card-settings-scope.js +1 -1
- package/dist/components/ds-card-settings-scope.js.map +1 -1
- package/dist/components/ds-chart-legend.js +1 -1
- package/dist/components/ds-chart-legend.js.map +1 -1
- package/dist/components/ds-chart.js +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-code-block.js +1 -1
- package/dist/components/ds-conversation-list-item.js +1 -1
- package/dist/components/ds-conversation-list-item.js.map +1 -1
- package/dist/components/ds-conversation-list-section.js +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-filter-menu.js +1 -1
- package/dist/components/ds-input.js +1 -1
- package/dist/components/ds-markdown.js +1 -1
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-message-actions.js +1 -1
- package/dist/components/ds-message-composer.js +1 -1
- package/dist/components/ds-message-scroller.js +1 -1
- package/dist/components/ds-message.js +1 -1
- package/dist/components/ds-mobile-bar-nav.js +1 -1
- package/dist/components/ds-mobile-header.js +1 -1
- package/dist/components/ds-mobile-section-switcher.js +1 -1
- package/dist/components/ds-mobile-sheet-nav.js +1 -1
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-pagination.js +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-sub-nav.js +1 -1
- package/dist/components/ds-panel-sub-nav.js.map +1 -1
- package/dist/components/ds-panel-tool-header.js +1 -1
- package/dist/components/ds-panel-tool-search.js +1 -1
- package/dist/components/ds-panel-tool-search.js.map +1 -1
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-paper-texture.js +1 -1
- package/dist/components/ds-radio.js +1 -1
- package/dist/components/ds-score.js +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-shell-app.js +1 -1
- package/dist/components/ds-shell-app.js.map +1 -1
- package/dist/components/ds-shell-page.js +1 -1
- package/dist/components/ds-shell-tools.js +1 -1
- package/dist/components/ds-skeleton.js +1 -1
- package/dist/components/ds-swatch-picker.js +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-table-filter.js +1 -1
- package/dist/components/ds-table-group.js +1 -1
- package/dist/components/ds-table-group.js.map +1 -1
- package/dist/components/ds-table-saved-views.js +1 -1
- package/dist/components/ds-table-search.js +1 -1
- package/dist/components/ds-table-search.js.map +1 -1
- package/dist/components/ds-table-sort.js +1 -1
- package/dist/components/ds-table-toolbar.js +1 -1
- package/dist/components/ds-table.js +1 -1
- package/dist/components/ds-table.js.map +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-textarea.js +1 -1
- package/dist/components/ds-textarea.js.map +1 -1
- package/dist/components/ds-toast.js +1 -1
- package/dist/components/ds-toast.js.map +1 -1
- package/dist/components/ds-tooltip-chart.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/ds-typing-indicator.js +1 -1
- package/dist/components/p--VKxPUoV.js +2 -0
- package/dist/components/p--VKxPUoV.js.map +1 -0
- package/dist/components/p-14sMoeTr.js +2 -0
- package/dist/components/p-14sMoeTr.js.map +1 -0
- package/dist/components/p-9rzbZP-F.js +2 -0
- package/dist/components/p-9rzbZP-F.js.map +1 -0
- package/dist/components/p-B5W_r4vV.js +2 -0
- package/dist/components/p-B5W_r4vV.js.map +1 -0
- package/dist/components/{p-DjF2m7bf.js → p-B8ZonS3S.js} +2 -2
- package/dist/components/{p-BrW77sNB.js → p-B9WwU5vu.js} +2 -2
- package/dist/components/p-BCRPg1Xs.js +2 -0
- package/dist/components/p-BCRPg1Xs.js.map +1 -0
- package/dist/components/{p-KV3_5Cgo.js → p-BFd18avA.js} +2 -2
- package/dist/components/{p-DLDFPn9F.js → p-BGGIEmQj.js} +2 -2
- package/dist/components/p-BG_n-zQT.js +2 -0
- package/dist/components/p-BG_n-zQT.js.map +1 -0
- package/dist/components/p-BINlT3xz.js +2 -0
- package/dist/components/p-BINlT3xz.js.map +1 -0
- package/dist/components/p-BPTqn5zL.js +2 -0
- package/dist/components/p-BPTqn5zL.js.map +1 -0
- package/dist/components/p-BnWxbhFP.js +2 -0
- package/dist/components/p-BnWxbhFP.js.map +1 -0
- package/dist/components/{p-DhibZEq-.js → p-BonnrRtE.js} +2 -2
- package/dist/components/p-BxduVc5g.js +2 -0
- package/dist/components/p-BxduVc5g.js.map +1 -0
- package/dist/components/p-CD9AbaHQ.js +2 -0
- package/dist/components/p-CD9AbaHQ.js.map +1 -0
- package/dist/components/p-CN3roaMg.js +2 -0
- package/dist/components/p-CN3roaMg.js.map +1 -0
- package/dist/components/p-CR7G2BI6.js +2 -0
- package/dist/components/p-CR7G2BI6.js.map +1 -0
- package/dist/components/p-CakRq92x.js +2 -0
- package/dist/components/p-CakRq92x.js.map +1 -0
- package/dist/components/p-CumGY3uN.js +2 -0
- package/dist/components/p-CumGY3uN.js.map +1 -0
- package/dist/components/p-D59xX7JN.js +2 -0
- package/dist/components/p-D59xX7JN.js.map +1 -0
- package/dist/components/p-DFWJmuaR.js +2 -0
- package/dist/components/p-DFWJmuaR.js.map +1 -0
- package/dist/components/p-DGQUm3WL.js +2 -0
- package/dist/components/p-DGQUm3WL.js.map +1 -0
- package/dist/components/{p-DmTnBu5r.js → p-DJHshyyC.js} +2 -2
- package/dist/components/{p-BtUYEMwA.js → p-DPPM5T7q.js} +2 -2
- package/dist/components/p-DVRL3oem.js +2 -0
- package/dist/components/p-DVRL3oem.js.map +1 -0
- package/dist/components/p-DceM6xWR.js +2 -0
- package/dist/components/p-DceM6xWR.js.map +1 -0
- package/dist/components/p-Dhw_W8nk.js +2 -0
- package/dist/components/p-Dhw_W8nk.js.map +1 -0
- package/dist/components/{p-pkGqqLm-.js → p-DwxKwC5i.js} +2 -2
- package/dist/components/{p-DnhDgPJv.js → p-DzHXk0IG.js} +2 -2
- package/dist/components/p-OHT7lQVt.js +2 -0
- package/dist/components/p-OHT7lQVt.js.map +1 -0
- package/dist/components/{p-ln3dJxQT.js → p-P60MGUqZ.js} +2 -2
- package/dist/components/{p-Bu-gu0mN.js → p-UxIgD24y.js} +2 -2
- package/dist/components/{p-BiIDQ5RW.js → p-YFrD62Ml.js} +2 -2
- package/dist/components/p-gR6G5azA.js +2 -0
- package/dist/components/p-gR6G5azA.js.map +1 -0
- package/dist/components/{p-ehZFKett.js → p-oFbI_M5B.js} +2 -2
- package/dist/components/p-r5td84fg.js +2 -0
- package/dist/components/p-r5td84fg.js.map +1 -0
- package/dist/components/p-skVhQk9d.js +2 -0
- package/dist/components/p-skVhQk9d.js.map +1 -0
- package/dist/components/p-z7Zj26BA.js +2 -0
- package/dist/components/p-z7Zj26BA.js.map +1 -0
- package/dist/components/{p-YDUM8xDg.js → p-zunBF381.js} +2 -2
- package/dist/docs/components.json +584 -38
- package/dist/mcp-data/registry/avatar.json +1 -1
- package/dist/mcp-data/registry/banner.json +1 -1
- package/dist/mcp-data/registry/bar-action.json +5 -5
- package/dist/mcp-data/registry/bar-nav.json +1 -1
- package/dist/mcp-data/registry/bar-page-title.json +433 -0
- package/dist/mcp-data/registry/bar-title.json +21 -5
- package/dist/mcp-data/registry/bar-workflow.json +1 -1
- package/dist/mcp-data/registry/button-filled.json +1 -1
- package/dist/mcp-data/registry/button-unfilled.json +1 -1
- package/dist/mcp-data/registry/card-chart.json +1 -1
- package/dist/mcp-data/registry/card-navigation.json +1 -1
- package/dist/mcp-data/registry/card-overview.json +1 -1
- package/dist/mcp-data/registry/card-setting.json +1 -1
- package/dist/mcp-data/registry/card-settings-scope.json +23 -5
- package/dist/mcp-data/registry/chart-legend.json +1 -1
- package/dist/mcp-data/registry/checkbox.json +1 -1
- package/dist/mcp-data/registry/chip.json +3 -2
- package/dist/mcp-data/registry/conversation-list-item.json +1 -1
- package/dist/mcp-data/registry/filter-menu.json +1 -1
- package/dist/mcp-data/registry/input.json +1 -1
- package/dist/mcp-data/registry/menu.json +1 -1
- package/dist/mcp-data/registry/mobile-section-switcher.json +1 -1
- package/dist/mcp-data/registry/mobile-sheet-nav.json +1 -1
- package/dist/mcp-data/registry/modal.json +1 -1
- package/dist/mcp-data/registry/pagination.json +10 -10
- package/dist/mcp-data/registry/panel-nav.json +1 -1
- package/dist/mcp-data/registry/panel-sub-nav.json +1 -1
- package/dist/mcp-data/registry/panel-tool-header.json +1 -1
- package/dist/mcp-data/registry/panel-tool-search.json +1 -1
- package/dist/mcp-data/registry/panel-tools.json +4 -2
- package/dist/mcp-data/registry/radio.json +1 -1
- package/dist/mcp-data/registry/registry.json +230 -22
- package/dist/mcp-data/registry/select.json +1 -1
- package/dist/mcp-data/registry/shell-app.json +9 -7
- package/dist/mcp-data/registry/skeleton.json +1 -1
- package/dist/mcp-data/registry/tab-group.json +1 -1
- package/dist/mcp-data/registry/table-group.json +1 -1
- package/dist/mcp-data/registry/table-search.json +1 -1
- package/dist/mcp-data/registry/table.json +2 -2
- package/dist/mcp-data/registry/tag.json +1 -1
- package/dist/mcp-data/registry/textarea.json +1 -1
- package/dist/mcp-data/registry/toast.json +1 -1
- package/dist/mcp-data/registry/tooltip-chart.json +1 -1
- package/dist/mcp-data/registry/tooltip.json +1 -1
- package/dist/react/components.d.ts +1 -0
- package/dist/react/components.js +1 -0
- package/dist/react/ds-bar-page-title.d.ts +14 -0
- package/dist/react/ds-bar-page-title.js +16 -0
- package/dist/styles/table.css +1 -1
- package/dist/types/components/BarPageTitle/BarPageTitle.d.ts +124 -0
- package/dist/types/components/BarPageTitle/index.d.ts +2 -0
- package/dist/types/components/BarTitle/BarTitle.d.ts +1 -7
- package/dist/types/components/BarTitle/bar-title-action-chrome.d.ts +76 -0
- package/dist/types/components/BarTitle/bar-title-actions.d.ts +1 -0
- package/dist/types/components/BarTitle/bar-title-sections.d.ts +11 -0
- package/dist/types/components/CardSettingsScope/CardSettingsScope.d.ts +3 -1
- package/dist/types/components/ShellApp/ShellApp.d.ts +1 -0
- package/dist/types/components.d.ts +181 -4
- package/dist/vue/components.d.ts +1 -0
- package/dist/vue/components.js +1 -0
- package/dist/vue/ds-bar-page-title.d.ts +3 -0
- package/dist/vue/ds-bar-page-title.js +26 -0
- package/dist/vue/ds-card-settings-scope.js +1 -0
- package/package.json +1 -1
- package/dist/components/p-B4ZrhWSH.js +0 -2
- package/dist/components/p-B4ZrhWSH.js.map +0 -1
- package/dist/components/p-BTsFFzfR.js +0 -2
- package/dist/components/p-BTsFFzfR.js.map +0 -1
- package/dist/components/p-BpSPAlOx.js +0 -2
- package/dist/components/p-BpSPAlOx.js.map +0 -1
- package/dist/components/p-C-MaZPyA.js +0 -2
- package/dist/components/p-C-MaZPyA.js.map +0 -1
- package/dist/components/p-CB5-uIY2.js +0 -2
- package/dist/components/p-CB5-uIY2.js.map +0 -1
- package/dist/components/p-CG4Fp3SY.js +0 -2
- package/dist/components/p-CG4Fp3SY.js.map +0 -1
- package/dist/components/p-CHCsDvJK.js +0 -2
- package/dist/components/p-CHCsDvJK.js.map +0 -1
- package/dist/components/p-CImwNex7.js +0 -2
- package/dist/components/p-CImwNex7.js.map +0 -1
- package/dist/components/p-CNZwk176.js +0 -2
- package/dist/components/p-CNZwk176.js.map +0 -1
- package/dist/components/p-CSZlbQ8_.js +0 -2
- package/dist/components/p-CSZlbQ8_.js.map +0 -1
- package/dist/components/p-CVNYRTEH.js +0 -2
- package/dist/components/p-CVNYRTEH.js.map +0 -1
- package/dist/components/p-D3sJXjcg.js +0 -2
- package/dist/components/p-D3sJXjcg.js.map +0 -1
- package/dist/components/p-DFOhxUQP.js +0 -2
- package/dist/components/p-DFOhxUQP.js.map +0 -1
- package/dist/components/p-DI7qbahC.js +0 -2
- package/dist/components/p-DI7qbahC.js.map +0 -1
- package/dist/components/p-DP75OhfU.js +0 -2
- package/dist/components/p-DP75OhfU.js.map +0 -1
- package/dist/components/p-DR1jV6Q5.js +0 -2
- package/dist/components/p-DR1jV6Q5.js.map +0 -1
- package/dist/components/p-DuJuqbcg.js +0 -2
- package/dist/components/p-DuJuqbcg.js.map +0 -1
- package/dist/components/p-E3RCUE7a.js +0 -2
- package/dist/components/p-E3RCUE7a.js.map +0 -1
- package/dist/components/p-JuKGR7Ay.js +0 -2
- package/dist/components/p-JuKGR7Ay.js.map +0 -1
- package/dist/components/p-MuZ6B9gu.js +0 -2
- package/dist/components/p-MuZ6B9gu.js.map +0 -1
- package/dist/components/p-Ui0Ir5li.js +0 -2
- package/dist/components/p-Ui0Ir5li.js.map +0 -1
- package/dist/components/p-eAX_M_QY.js +0 -2
- package/dist/components/p-eAX_M_QY.js.map +0 -1
- package/dist/components/p-eaCtnww1.js +0 -2
- package/dist/components/p-eaCtnww1.js.map +0 -1
- /package/dist/components/{p-DjF2m7bf.js.map → p-B8ZonS3S.js.map} +0 -0
- /package/dist/components/{p-BrW77sNB.js.map → p-B9WwU5vu.js.map} +0 -0
- /package/dist/components/{p-KV3_5Cgo.js.map → p-BFd18avA.js.map} +0 -0
- /package/dist/components/{p-DLDFPn9F.js.map → p-BGGIEmQj.js.map} +0 -0
- /package/dist/components/{p-DhibZEq-.js.map → p-BonnrRtE.js.map} +0 -0
- /package/dist/components/{p-DmTnBu5r.js.map → p-DJHshyyC.js.map} +0 -0
- /package/dist/components/{p-BtUYEMwA.js.map → p-DPPM5T7q.js.map} +0 -0
- /package/dist/components/{p-pkGqqLm-.js.map → p-DwxKwC5i.js.map} +0 -0
- /package/dist/components/{p-DnhDgPJv.js.map → p-DzHXk0IG.js.map} +0 -0
- /package/dist/components/{p-ln3dJxQT.js.map → p-P60MGUqZ.js.map} +0 -0
- /package/dist/components/{p-Bu-gu0mN.js.map → p-UxIgD24y.js.map} +0 -0
- /package/dist/components/{p-BiIDQ5RW.js.map → p-YFrD62Ml.js.map} +0 -0
- /package/dist/components/{p-ehZFKett.js.map → p-oFbI_M5B.js.map} +0 -0
- /package/dist/components/{p-YDUM8xDg.js.map → p-zunBF381.js.map} +0 -0
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "bar-page-title",
|
|
4
|
+
"title": "BarPageTitle",
|
|
5
|
+
"description": "Compact shell-bar page chrome that shows every page-level section as a tab row after the title divider, and replaces that row with the compact section button when the complete set cannot fit.",
|
|
6
|
+
"type": "registry:ui",
|
|
7
|
+
"meta": {
|
|
8
|
+
"library": "@ds-mo/ui",
|
|
9
|
+
"distribution": "npm",
|
|
10
|
+
"storybook": "https://zainadeel.github.io/compomo/?path=/story/bar-page-title",
|
|
11
|
+
"source": "src/wc/components/BarPageTitle/BarPageTitle.tsx",
|
|
12
|
+
"intentStatus": "complete",
|
|
13
|
+
"intent": {
|
|
14
|
+
"audience": "specialized",
|
|
15
|
+
"status": "experimental",
|
|
16
|
+
"summary": "Compact shell-bar page chrome that shows every page-level section as a tab row after the title divider, and replaces that row with the compact section button when the complete set cannot fit.",
|
|
17
|
+
"useWhen": [
|
|
18
|
+
"Managed ShellApp is in panel section navigation and the routed page has page-level subsections such as People or driver detail.",
|
|
19
|
+
"The shell bar must keep page identity, Back, and page actions while presenting every page section together or not at all."
|
|
20
|
+
],
|
|
21
|
+
"avoidWhen": [
|
|
22
|
+
"The chrome is a page-placed header; use BarTitle through ShellPage instead.",
|
|
23
|
+
"The choices are peer area routes in bar-mode ShellApp; use BarNav instead.",
|
|
24
|
+
"The choices are nested PanelNav child routes; keep those on PanelNav.",
|
|
25
|
+
"Local in-page views should remain selectable as tabs inside content; use TabGroup instead."
|
|
26
|
+
],
|
|
27
|
+
"alternatives": [
|
|
28
|
+
{
|
|
29
|
+
"when": "The header sits in page content rather than the shell bar.",
|
|
30
|
+
"component": "component:ds-bar-title",
|
|
31
|
+
"reason": "BarTitle owns expanded, compact, and constrained page headers, including the compact section button without a tab row."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"when": "The choices are peer routes of the active PanelNav destination.",
|
|
35
|
+
"component": "component:ds-bar-nav",
|
|
36
|
+
"reason": "BarNav owns area-level route sections and partial overflow rather than page subsections."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"when": "The choices switch local content without changing page sections.",
|
|
40
|
+
"component": "component:ds-tab-group",
|
|
41
|
+
"reason": "TabGroup is the local content-view control rather than shell-bar page chrome."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"commonlyComposedWith": [
|
|
45
|
+
"component:ds-shell-app",
|
|
46
|
+
"component:ds-bar-title",
|
|
47
|
+
"component:ds-panel-nav",
|
|
48
|
+
"component:ds-menu",
|
|
49
|
+
"component:ds-text"
|
|
50
|
+
],
|
|
51
|
+
"patterns": [
|
|
52
|
+
"pattern:application-shell",
|
|
53
|
+
"pattern:shell-page"
|
|
54
|
+
],
|
|
55
|
+
"accessibility": [
|
|
56
|
+
"Provide one concise heading; BarPageTitle renders exactly one h1.",
|
|
57
|
+
"Give compact Back a destination-specific accessible name and handle dsBack in the route owner.",
|
|
58
|
+
"Keep value synchronized with the current page section; dsSectionChange returns the selected section id.",
|
|
59
|
+
"The tab row is a tablist with horizontal roving tabindex. The collapsed control exposes the current section, menu relationship, and expanded state, then restores focus after selection or dismissal.",
|
|
60
|
+
"Use one filled primary action in the page decision area and keep every top-level action and nested menu-choice id non-empty and unique."
|
|
61
|
+
],
|
|
62
|
+
"states": [
|
|
63
|
+
"Fewer than two selectable sections render title chrome only: no divider, tabs, or section button.",
|
|
64
|
+
"Two or more selectable sections default to every tab after the compact title divider.",
|
|
65
|
+
"When the unconstrained title, divider, and complete tab row cannot sit beside trailing actions, every tab is replaced by the compact section button and menu. BarPageTitle never keeps some tabs visible while overflowing the rest.",
|
|
66
|
+
"Dividers in sections or actions create separate Menu groups without becoming selectable rows.",
|
|
67
|
+
"Ordered actions preserve authored order with the same compact visible-action and overflow rules as compact BarTitle.",
|
|
68
|
+
"showDivider=false removes the bottom seam; showCompactDivider can independently restore or remove that boundary.",
|
|
69
|
+
"Section, action, split-menu, and overflow triggers retain the shared surface-open wash through exit."
|
|
70
|
+
],
|
|
71
|
+
"responsiveBehavior": [
|
|
72
|
+
"BarPageTitle is compact-only shell-bar chrome. It does not offer expanded or constrained variants.",
|
|
73
|
+
"ShellApp owns the managed panel-mode path and feeds pageChrome.subsections through the same section contract as BarTitle.",
|
|
74
|
+
"Measurement uses a hidden unconstrained probe of Back, heading, divider, and every tab, compared with the width left after trailing actions, plus hysteresis so the control does not flicker at the boundary.",
|
|
75
|
+
"Mobile continues to use MobileHeader; BarPageTitle is desktop and tablet shell-bar chrome.",
|
|
76
|
+
"Long headings truncate while Back, tabs or the section button, and action controls retain complete hit targets and accessible names."
|
|
77
|
+
],
|
|
78
|
+
"frameworkCaveats": {
|
|
79
|
+
"customElements": [
|
|
80
|
+
"Assign sections, actionItems, primaryAction, and actions as JavaScript properties and replace array or object identities when controlled state changes.",
|
|
81
|
+
"Handle dsBack, update value after dsSectionChange, and execute product commands from dsAction."
|
|
82
|
+
],
|
|
83
|
+
"react": [
|
|
84
|
+
"Pass section and ordered action arrays directly to DsBarPageTitle and keep value controlled from route state."
|
|
85
|
+
],
|
|
86
|
+
"angular": [
|
|
87
|
+
"Bind complex values on the standalone DsBarPageTitle adapter and handle Back, section, and action intent events in the route shell."
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"references": [
|
|
91
|
+
{
|
|
92
|
+
"label": "Storybook",
|
|
93
|
+
"path": "src/wc/components/BarPageTitle/BarPageTitle.stories.ts"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"label": "Managed panel-mode shell bar",
|
|
97
|
+
"path": "src/wc/components/ShellApp/ShellApp.mdx"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"label": "All-or-nothing resize coverage",
|
|
101
|
+
"path": "tests/e2e/bar-page-title.spec.ts"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"label": "Surface ownership and trigger state",
|
|
105
|
+
"path": "src/docs/SurfaceOwnership.mdx"
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"api": {
|
|
110
|
+
"props": {
|
|
111
|
+
"actionItems": {
|
|
112
|
+
"type": "BarTitleActionConfigItem[]",
|
|
113
|
+
"resolvedType": "BarTitleActionConfigItem[] | undefined",
|
|
114
|
+
"required": false,
|
|
115
|
+
"mutable": false,
|
|
116
|
+
"description": "Ordered page-header actions. When supplied, this replaces the legacy\nprimaryAction/actions presentation while preserving the same dsAction event."
|
|
117
|
+
},
|
|
118
|
+
"actions": {
|
|
119
|
+
"type": "BarTitleActionItem[]",
|
|
120
|
+
"resolvedType": "BarTitleActionItem[]",
|
|
121
|
+
"default": "[]",
|
|
122
|
+
"required": false,
|
|
123
|
+
"mutable": false,
|
|
124
|
+
"description": "Secondary page actions shown in the overflow menu. Dividers create groups."
|
|
125
|
+
},
|
|
126
|
+
"actionsAriaLabel": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"resolvedType": "string",
|
|
129
|
+
"attribute": "actions-aria-label",
|
|
130
|
+
"default": "'More page actions'",
|
|
131
|
+
"required": false,
|
|
132
|
+
"mutable": false,
|
|
133
|
+
"description": "Accessible name for the page-actions menu."
|
|
134
|
+
},
|
|
135
|
+
"backAriaLabel": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"resolvedType": "string",
|
|
138
|
+
"attribute": "back-aria-label",
|
|
139
|
+
"default": "'Back'",
|
|
140
|
+
"required": false,
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"description": "Accessible name for the leading Back action."
|
|
143
|
+
},
|
|
144
|
+
"heading": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"resolvedType": "string",
|
|
147
|
+
"attribute": "heading",
|
|
148
|
+
"required": true,
|
|
149
|
+
"mutable": false,
|
|
150
|
+
"description": "The page's single visible h1."
|
|
151
|
+
},
|
|
152
|
+
"primaryAction": {
|
|
153
|
+
"type": "BarTitlePrimaryAction | null",
|
|
154
|
+
"resolvedType": "BarTitlePrimaryAction | null",
|
|
155
|
+
"default": "null",
|
|
156
|
+
"required": false,
|
|
157
|
+
"mutable": false,
|
|
158
|
+
"description": "The one highest-emphasis page action."
|
|
159
|
+
},
|
|
160
|
+
"sections": {
|
|
161
|
+
"type": "BarTitleSectionItem[]",
|
|
162
|
+
"resolvedType": "BarTitleSectionItem[]",
|
|
163
|
+
"default": "[]",
|
|
164
|
+
"required": false,
|
|
165
|
+
"mutable": false,
|
|
166
|
+
"description": "Optional page sections shown as an all-or-nothing tab row, or the compact section button."
|
|
167
|
+
},
|
|
168
|
+
"sectionsAriaLabel": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"resolvedType": "string",
|
|
171
|
+
"attribute": "sections-aria-label",
|
|
172
|
+
"default": "'Change page section'",
|
|
173
|
+
"required": false,
|
|
174
|
+
"mutable": false,
|
|
175
|
+
"description": "Accessible name for the page-section tablist and menu."
|
|
176
|
+
},
|
|
177
|
+
"showBack": {
|
|
178
|
+
"type": "boolean",
|
|
179
|
+
"resolvedType": "boolean",
|
|
180
|
+
"attribute": "show-back",
|
|
181
|
+
"default": "false",
|
|
182
|
+
"required": false,
|
|
183
|
+
"mutable": false,
|
|
184
|
+
"description": "Show the leading page-level Back action."
|
|
185
|
+
},
|
|
186
|
+
"showCompactDivider": {
|
|
187
|
+
"type": "boolean",
|
|
188
|
+
"resolvedType": "boolean | undefined",
|
|
189
|
+
"attribute": "show-compact-divider",
|
|
190
|
+
"required": false,
|
|
191
|
+
"mutable": false,
|
|
192
|
+
"description": "Override divider visibility for the compact shell-bar presentation."
|
|
193
|
+
},
|
|
194
|
+
"showDivider": {
|
|
195
|
+
"type": "boolean",
|
|
196
|
+
"resolvedType": "boolean",
|
|
197
|
+
"attribute": "show-divider",
|
|
198
|
+
"default": "true",
|
|
199
|
+
"required": false,
|
|
200
|
+
"mutable": false,
|
|
201
|
+
"description": "Draw the compact bottom divider beneath the header."
|
|
202
|
+
},
|
|
203
|
+
"value": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"resolvedType": "string",
|
|
206
|
+
"attribute": "value",
|
|
207
|
+
"default": "''",
|
|
208
|
+
"required": false,
|
|
209
|
+
"mutable": false,
|
|
210
|
+
"description": "Id of the active page section."
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"events": [
|
|
214
|
+
{
|
|
215
|
+
"name": "dsAction",
|
|
216
|
+
"detail": "string",
|
|
217
|
+
"bubbles": true,
|
|
218
|
+
"cancelable": true,
|
|
219
|
+
"composed": true,
|
|
220
|
+
"description": "Emitted with the activated primary or overflow action id."
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "dsBack",
|
|
224
|
+
"detail": "MouseEvent",
|
|
225
|
+
"bubbles": true,
|
|
226
|
+
"cancelable": true,
|
|
227
|
+
"composed": true,
|
|
228
|
+
"description": "Emitted when the leading Back action is activated."
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"name": "dsSectionChange",
|
|
232
|
+
"detail": "string",
|
|
233
|
+
"bubbles": true,
|
|
234
|
+
"cancelable": true,
|
|
235
|
+
"composed": true,
|
|
236
|
+
"description": "Emitted with the newly selected page-section id."
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"methods": [],
|
|
240
|
+
"slots": []
|
|
241
|
+
},
|
|
242
|
+
"props": {
|
|
243
|
+
"actionItems": {
|
|
244
|
+
"type": "BarTitleActionConfigItem[]",
|
|
245
|
+
"resolvedType": "BarTitleActionConfigItem[] | undefined",
|
|
246
|
+
"required": false,
|
|
247
|
+
"mutable": false,
|
|
248
|
+
"description": "Ordered page-header actions. When supplied, this replaces the legacy\nprimaryAction/actions presentation while preserving the same dsAction event."
|
|
249
|
+
},
|
|
250
|
+
"actions": {
|
|
251
|
+
"type": "BarTitleActionItem[]",
|
|
252
|
+
"resolvedType": "BarTitleActionItem[]",
|
|
253
|
+
"default": "[]",
|
|
254
|
+
"required": false,
|
|
255
|
+
"mutable": false,
|
|
256
|
+
"description": "Secondary page actions shown in the overflow menu. Dividers create groups."
|
|
257
|
+
},
|
|
258
|
+
"actionsAriaLabel": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"resolvedType": "string",
|
|
261
|
+
"attribute": "actions-aria-label",
|
|
262
|
+
"default": "'More page actions'",
|
|
263
|
+
"required": false,
|
|
264
|
+
"mutable": false,
|
|
265
|
+
"description": "Accessible name for the page-actions menu."
|
|
266
|
+
},
|
|
267
|
+
"backAriaLabel": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"resolvedType": "string",
|
|
270
|
+
"attribute": "back-aria-label",
|
|
271
|
+
"default": "'Back'",
|
|
272
|
+
"required": false,
|
|
273
|
+
"mutable": false,
|
|
274
|
+
"description": "Accessible name for the leading Back action."
|
|
275
|
+
},
|
|
276
|
+
"heading": {
|
|
277
|
+
"type": "string",
|
|
278
|
+
"resolvedType": "string",
|
|
279
|
+
"attribute": "heading",
|
|
280
|
+
"required": true,
|
|
281
|
+
"mutable": false,
|
|
282
|
+
"description": "The page's single visible h1."
|
|
283
|
+
},
|
|
284
|
+
"primaryAction": {
|
|
285
|
+
"type": "BarTitlePrimaryAction | null",
|
|
286
|
+
"resolvedType": "BarTitlePrimaryAction | null",
|
|
287
|
+
"default": "null",
|
|
288
|
+
"required": false,
|
|
289
|
+
"mutable": false,
|
|
290
|
+
"description": "The one highest-emphasis page action."
|
|
291
|
+
},
|
|
292
|
+
"sections": {
|
|
293
|
+
"type": "BarTitleSectionItem[]",
|
|
294
|
+
"resolvedType": "BarTitleSectionItem[]",
|
|
295
|
+
"default": "[]",
|
|
296
|
+
"required": false,
|
|
297
|
+
"mutable": false,
|
|
298
|
+
"description": "Optional page sections shown as an all-or-nothing tab row, or the compact section button."
|
|
299
|
+
},
|
|
300
|
+
"sectionsAriaLabel": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"resolvedType": "string",
|
|
303
|
+
"attribute": "sections-aria-label",
|
|
304
|
+
"default": "'Change page section'",
|
|
305
|
+
"required": false,
|
|
306
|
+
"mutable": false,
|
|
307
|
+
"description": "Accessible name for the page-section tablist and menu."
|
|
308
|
+
},
|
|
309
|
+
"showBack": {
|
|
310
|
+
"type": "boolean",
|
|
311
|
+
"resolvedType": "boolean",
|
|
312
|
+
"attribute": "show-back",
|
|
313
|
+
"default": "false",
|
|
314
|
+
"required": false,
|
|
315
|
+
"mutable": false,
|
|
316
|
+
"description": "Show the leading page-level Back action."
|
|
317
|
+
},
|
|
318
|
+
"showCompactDivider": {
|
|
319
|
+
"type": "boolean",
|
|
320
|
+
"resolvedType": "boolean | undefined",
|
|
321
|
+
"attribute": "show-compact-divider",
|
|
322
|
+
"required": false,
|
|
323
|
+
"mutable": false,
|
|
324
|
+
"description": "Override divider visibility for the compact shell-bar presentation."
|
|
325
|
+
},
|
|
326
|
+
"showDivider": {
|
|
327
|
+
"type": "boolean",
|
|
328
|
+
"resolvedType": "boolean",
|
|
329
|
+
"attribute": "show-divider",
|
|
330
|
+
"default": "true",
|
|
331
|
+
"required": false,
|
|
332
|
+
"mutable": false,
|
|
333
|
+
"description": "Draw the compact bottom divider beneath the header."
|
|
334
|
+
},
|
|
335
|
+
"value": {
|
|
336
|
+
"type": "string",
|
|
337
|
+
"resolvedType": "string",
|
|
338
|
+
"attribute": "value",
|
|
339
|
+
"default": "''",
|
|
340
|
+
"required": false,
|
|
341
|
+
"mutable": false,
|
|
342
|
+
"description": "Id of the active page section."
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"events": [
|
|
346
|
+
{
|
|
347
|
+
"name": "dsAction",
|
|
348
|
+
"detail": "string",
|
|
349
|
+
"bubbles": true,
|
|
350
|
+
"cancelable": true,
|
|
351
|
+
"composed": true,
|
|
352
|
+
"description": "Emitted with the activated primary or overflow action id."
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "dsBack",
|
|
356
|
+
"detail": "MouseEvent",
|
|
357
|
+
"bubbles": true,
|
|
358
|
+
"cancelable": true,
|
|
359
|
+
"composed": true,
|
|
360
|
+
"description": "Emitted when the leading Back action is activated."
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "dsSectionChange",
|
|
364
|
+
"detail": "string",
|
|
365
|
+
"bubbles": true,
|
|
366
|
+
"cancelable": true,
|
|
367
|
+
"composed": true,
|
|
368
|
+
"description": "Emitted with the newly selected page-section id."
|
|
369
|
+
}
|
|
370
|
+
],
|
|
371
|
+
"methods": [],
|
|
372
|
+
"slots": [],
|
|
373
|
+
"exports": {
|
|
374
|
+
"customElement": "ds-bar-page-title",
|
|
375
|
+
"react": "DsBarPageTitle",
|
|
376
|
+
"vue": "DsBarPageTitle",
|
|
377
|
+
"angular": "DsBarPageTitle"
|
|
378
|
+
},
|
|
379
|
+
"consumption": {
|
|
380
|
+
"install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
|
|
381
|
+
"cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
|
|
382
|
+
"customElements": {
|
|
383
|
+
"import": "import '@ds-mo/ui/dist/components/ds-bar-page-title.js';",
|
|
384
|
+
"example": "<ds-bar-page-title></ds-bar-page-title>"
|
|
385
|
+
},
|
|
386
|
+
"react": {
|
|
387
|
+
"import": "import { DsBarPageTitle } from '@ds-mo/ui/react';",
|
|
388
|
+
"example": "<DsBarPageTitle />"
|
|
389
|
+
},
|
|
390
|
+
"vue": {
|
|
391
|
+
"import": "import { DsBarPageTitle } from '@ds-mo/ui/vue';",
|
|
392
|
+
"example": "<DsBarPageTitle />"
|
|
393
|
+
},
|
|
394
|
+
"angular": {
|
|
395
|
+
"import": "import { DsBarPageTitle } from '@ds-mo/ui/angular/ds-bar-page-title';",
|
|
396
|
+
"example": "<ds-bar-page-title></ds-bar-page-title>"
|
|
397
|
+
},
|
|
398
|
+
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: actionItems, actions, primaryAction, sections.",
|
|
399
|
+
"peerDependencies": {
|
|
400
|
+
"required": [
|
|
401
|
+
"@ds-mo/tokens ^6.5.1",
|
|
402
|
+
"@ds-mo/icons ^7.0.0"
|
|
403
|
+
],
|
|
404
|
+
"frameworks": "Custom Elements; React 18/19 wrappers; Vue 3 wrappers; Angular 19-22 standalone adapters."
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
"dependencies": [
|
|
409
|
+
"@ds-mo/ui",
|
|
410
|
+
"@ds-mo/tokens",
|
|
411
|
+
"@ds-mo/icons"
|
|
412
|
+
],
|
|
413
|
+
"registryDependencies": [
|
|
414
|
+
"button-filled",
|
|
415
|
+
"button-unfilled",
|
|
416
|
+
"icon",
|
|
417
|
+
"menu",
|
|
418
|
+
"text",
|
|
419
|
+
"tooltip"
|
|
420
|
+
],
|
|
421
|
+
"files": [
|
|
422
|
+
{
|
|
423
|
+
"path": "src/wc/components/BarPageTitle/BarPageTitle.css",
|
|
424
|
+
"content": "@import '../../utils/radius.css';\n@import '../../utils/control-density.css';\n@import '../../utils/control-parts.css';\n@import '../../utils/chrome-header.css';\n@import '../../utils/focus-ring.css';\n@import '../../utils/interaction-fill.css';\n@import '../../utils/control-inactive.css';\n\n:host {\n display: block;\n min-width: 0;\n box-sizing: border-box;\n background: var(--color-background-secondary);\n --_bar-page-title-fg-primary: var(--color-foreground-primary);\n --_bar-page-title-fg-secondary: var(--color-foreground-secondary);\n --_bar-page-title-hover: var(--color-interaction-hover);\n --_bar-page-title-pressed: var(--color-interaction-pressed);\n --_bar-page-title-focus: var(--color-interaction-focus);\n --_bar-page-title-border: var(--color-border-tertiary);\n --ds-focus-ring-color: var(--_bar-page-title-focus);\n}\n\n:host-context(ds-shell-app:not([gradient-preset='none'])),\n:host-context(ds-shell-app:not([gradient-preset='none'])) .bar-page-title,\n:host-context(ds-shell-app.shell-app--paper-texture),\n:host-context(ds-shell-app.shell-app--paper-texture) .bar-page-title {\n background: transparent;\n}\n\n.bar-page-title {\n position: relative;\n height: var(--dimension-size-600);\n min-width: 0;\n box-sizing: border-box;\n background: var(--color-background-secondary);\n}\n\n.bar-page-title::after {\n content: '';\n position: absolute;\n inset: auto 0 0;\n height: var(--dimension-stroke-width-012);\n background: var(--color-border-tertiary);\n pointer-events: none;\n}\n\n.bar-page-title--divider-hidden::after {\n display: none;\n}\n\n.bar-page-title__inner {\n position: relative;\n z-index: 1;\n flex: 1 1 auto;\n height: 100%;\n min-width: 0;\n padding: 0;\n gap: 0;\n}\n\n.bar-page-title__row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--dimension-space-100);\n height: 100%;\n min-width: 0;\n}\n\n.bar-page-title__title-row {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-100);\n min-width: 0;\n min-height: var(--dimension-size-400);\n flex: 1 1 auto;\n}\n\n.bar-page-title__identity {\n display: flex;\n flex: 0 1 auto;\n align-items: center;\n gap: var(--dimension-space-050);\n min-width: 0;\n height: var(--dimension-size-400);\n}\n\n.bar-page-title__back,\n.bar-page-title__section-chevron {\n flex: 0 0 auto;\n}\n\n.bar-page-title__heading {\n display: inline-flex;\n flex: 1 1 auto;\n align-items: center;\n width: auto;\n min-width: 0;\n height: var(--dimension-size-400);\n padding-inline: calc(var(--ds-control-padding-inline) + var(--ds-control-label-inset));\n box-sizing: border-box;\n user-select: none;\n}\n\n.bar-page-title__divider {\n width: var(--dimension-stroke-width-012);\n height: var(--dimension-size-250);\n flex: 0 0 var(--dimension-stroke-width-012);\n background: var(--color-border-tertiary);\n}\n\n.bar-page-title__section-selector {\n display: flex;\n flex: 0 1 auto;\n min-width: 0;\n max-width: var(--dimension-panel-width-sm);\n}\n\n.bar-page-title__section-trigger {\n --ds-control-radius: var(--dimension-radius-half);\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--ds-control-gap);\n height: var(--ds-control-height);\n min-width: 0;\n max-width: 100%;\n padding-inline: var(--ds-control-padding-inline);\n border: none;\n border-radius: var(--ds-control-radius);\n box-sizing: border-box;\n background: transparent;\n color: var(--color-foreground-secondary);\n cursor: default;\n font-family: inherit;\n user-select: none;\n}\n\n.bar-page-title__section-label {\n min-width: 0;\n padding-inline: var(--ds-control-label-inset);\n}\n\n.bar-page-title__actions {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-100);\n flex: 0 0 auto;\n}\n\n.bar-page-title__probe {\n position: absolute;\n left: 0;\n top: 0;\n visibility: hidden;\n pointer-events: none;\n overflow: visible;\n width: max-content;\n max-width: none;\n z-index: -1;\n}\n\n.bar-page-title__probe-row {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-100);\n width: max-content;\n max-width: none;\n}\n\n.bar-page-title__probe .bar-page-title__identity,\n.bar-page-title__probe .bar-page-title__heading {\n flex: 0 0 auto;\n width: max-content;\n min-width: 0;\n max-width: none;\n}\n\n.bar-page-title__tabs-pending {\n flex: 0 0 auto;\n width: var(--dimension-size-400);\n height: var(--ds-control-height);\n visibility: hidden;\n pointer-events: none;\n}\n\n.bar-page-title__tab-list {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-050);\n position: relative;\n width: max-content;\n flex: 0 0 auto;\n min-width: 0;\n}\n\n.bar-page-title__tab {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--ds-control-gap);\n height: var(--ds-control-height);\n min-width: var(--ds-control-height);\n padding: 0 var(--ds-control-padding-inline);\n box-sizing: border-box;\n border: none;\n border-radius: var(--ds-control-radius);\n background-color: transparent;\n color: var(--_bar-page-title-fg-secondary);\n cursor: default;\n position: relative;\n flex-shrink: 0;\n -webkit-user-select: none;\n user-select: none;\n transition: color var(--effect-motion-short-2);\n}\n\n.bar-page-title__tab::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: var(--ds-control-radius);\n background: transparent;\n pointer-events: none;\n cursor: inherit;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .bar-page-title__tab:hover::after {\n background: var(--_bar-page-title-hover);\n }\n}\n\n.bar-page-title__tab:active::after {\n background: var(--_bar-page-title-pressed);\n}\n\n.bar-page-title__tab--selected {\n color: var(--_bar-page-title-fg-primary);\n}\n\n.bar-page-title__tab-label {\n display: inline-flex;\n align-items: center;\n white-space: nowrap;\n}\n\n.bar-page-title__tab-divider {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: var(--dimension-space-100);\n height: var(--ds-control-height);\n padding-block: var(--ds-control-padding-inline);\n flex-shrink: 0;\n pointer-events: none;\n}\n\n.bar-page-title__tab-divider-line {\n width: var(--dimension-stroke-width-012);\n align-self: stretch;\n background-color: var(--_bar-page-title-border);\n}\n",
|
|
425
|
+
"type": "registry:ui"
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"path": "src/wc/components/BarPageTitle/BarPageTitle.tsx",
|
|
429
|
+
"content": "import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport {\n CHROME_TRANSITION_END,\n CHROME_TRANSITION_START,\n ChromeTransitionGate,\n createRafCoalescer,\n readChromeTransitionPhase,\n readChromeTransitionSource,\n} from '../../shell/chrome-transition';\nimport type { MenuItemData } from '../Menu/menu-types';\nimport { tabsOverflowContainer } from '../BarNav/bar-nav-tabs-menu-utils';\nimport { getSelectableTabs, isTabDivider, type TabItemTab } from '../TabGroup/tab-item-utils';\nimport {\n availableBarTitleActionMenuIds,\n barTitleActionIdIssues,\n findBarTitleAction,\n overflowBarTitleActionSections,\n resolveBarTitleActionItems,\n visibleBarTitleActions,\n} from '../BarTitle/bar-title-actions';\nimport {\n type FocusableBarTitleButton,\n barTitleActionMenuDomId,\n renderBarTitleActionMenus,\n renderBarTitleActions,\n renderBarTitleBack,\n renderBarTitleOverflowMenu,\n renderBarTitleSectionTrigger,\n restoreBarTitleActionFocus,\n} from '../BarTitle/bar-title-action-chrome';\nimport {\n barTitleSectionMenuSections,\n barTitleSectionTriggerAriaLabel,\n barTitleSectionsDigest,\n barTitleSectionsToTabs,\n effectiveBarTitleSectionValue,\n selectableBarTitleSections,\n selectedBarTitleSectionLabel,\n} from '../BarTitle/bar-title-sections';\nimport type {\n BarTitleActionConfigItem,\n BarTitleActionItem,\n BarTitlePrimaryAction,\n BarTitleSectionItem,\n} from '../BarTitle/bar-title-types';\n\nlet nextBarPageTitleId = 0;\n\n@Component({\n tag: 'ds-bar-page-title',\n styleUrl: 'BarPageTitle.css',\n scoped: true,\n})\nexport class BarPageTitle {\n private static readonly INTRINSIC_WIDTH_RETRY_MAX = 3;\n private static readonly TAB_LAYOUT_COMMIT_MAX_FRAMES = 16;\n private static readonly OVERFLOW_HYSTERESIS_PX = 8;\n\n @Element() el!: HTMLElement;\n\n /** The page's single visible h1. */\n @Prop() heading!: string;\n\n /** Show the leading page-level Back action. */\n @Prop({ attribute: 'show-back' }) showBack: boolean = false;\n\n /** Accessible name for the leading Back action. */\n @Prop() backAriaLabel: string = 'Back';\n\n /** Optional page sections shown as an all-or-nothing tab row, or the compact section button. */\n @Prop() sections: BarTitleSectionItem[] = [];\n\n /** Id of the active page section. */\n @Prop() value: string = '';\n\n /** Accessible name for the page-section tablist and menu. */\n @Prop() sectionsAriaLabel: string = 'Change page section';\n\n /** The one highest-emphasis page action. */\n @Prop() primaryAction: BarTitlePrimaryAction | null = null;\n\n /** Secondary page actions shown in the overflow menu. Dividers create groups. */\n @Prop() actions: BarTitleActionItem[] = [];\n\n /**\n * Ordered page-header actions. When supplied, this replaces the legacy\n * primaryAction/actions presentation while preserving the same dsAction event.\n */\n @Prop() actionItems?: BarTitleActionConfigItem[];\n\n /** Accessible name for the page-actions menu. */\n @Prop() actionsAriaLabel: string = 'More page actions';\n\n /** Draw the compact bottom divider beneath the header. */\n @Prop() showDivider: boolean = true;\n\n /** Override divider visibility for the compact shell-bar presentation. */\n @Prop() showCompactDivider?: boolean;\n\n /** Emitted when the leading Back action is activated. */\n @Event() dsBack!: EventEmitter<MouseEvent>;\n\n /** Emitted with the newly selected page-section id. */\n @Event() dsSectionChange!: EventEmitter<string>;\n\n /** Emitted with the activated primary or overflow action id. */\n @Event() dsAction!: EventEmitter<string>;\n\n @State() private sectionMenuOpen = false;\n @State() private openActionMenuId = '';\n @State() private surfaceActionMenuId = '';\n @State() private sectionSurfaceOpen = false;\n @State() private sectionMenuInitialFocusVisible = false;\n @State() private actionMenuInitialFocusVisible = false;\n @State() private sectionsCollapsed = false;\n @State() private layoutCommitted = false;\n @State() private focusedTabId = '';\n\n private readonly instanceId = nextBarPageTitleId++;\n private readonly sectionMenuTriggerId = `bar-page-title-section-trigger-${this.instanceId}`;\n private readonly sectionMenuId = `bar-page-title-section-menu-${this.instanceId}`;\n private readonly actionMenuTriggerId = `bar-page-title-action-trigger-${this.instanceId}`;\n private readonly actionMenuId = `bar-page-title-action-menu-${this.instanceId}`;\n private sectionTriggerEl: HTMLButtonElement | null = null;\n private actionTriggerEl: FocusableBarTitleButton | null = null;\n private actionTriggerEls = new Map<string, FocusableBarTitleButton>();\n private chromeEl: HTMLElement | null = null;\n private rowEl: HTMLElement | null = null;\n private probeRowEl: HTMLElement | null = null;\n private visibleTabListEl: HTMLElement | null = null;\n private resizeObserver: ResizeObserver | null = null;\n private intrinsicWidthRetryCount = 0;\n private tabLayoutPendingFrames = 0;\n private readonly panelNavTransition = new ChromeTransitionGate();\n private readonly panelToolsTransition = new ChromeTransitionGate();\n private readonly overflowCoalescer = createRafCoalescer(() => {\n this.updateSectionsCollapsed();\n });\n private chromeTransitionShell: HTMLElement | null = null;\n\n componentWillLoad() {\n this.reportActionIdIssues();\n this.syncFocusedTabId(this.effectiveValue, this.selectableTabs);\n }\n\n componentDidLoad() {\n this.setupOverflowObserver();\n this.bindChromeTransitionListeners();\n this.scheduleOverflowCheck();\n }\n\n componentDidRender() {\n if (this.chromeOverflowPaused()) return;\n this.scheduleOverflowCheck();\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.resizeObserver = null;\n this.overflowCoalescer.cancel();\n this.unbindChromeTransitionListeners();\n }\n\n @Watch('sections')\n handleSectionsChange(next: BarTitleSectionItem[], prev: BarTitleSectionItem[]) {\n if (!this.hasSectionSelector) {\n this.closeSectionMenu();\n this.sectionSurfaceOpen = false;\n this.sectionsCollapsed = false;\n this.layoutCommitted = true;\n this.intrinsicWidthRetryCount = 0;\n this.tabLayoutPendingFrames = 0;\n return;\n }\n if (barTitleSectionsDigest(next) === barTitleSectionsDigest(prev)) {\n this.syncFocusedTabId(this.effectiveValue, this.selectableTabs);\n return;\n }\n this.resetSectionLayout();\n this.syncFocusedTabId(this.effectiveValue, this.selectableTabs);\n this.scheduleOverflowCheck();\n }\n\n @Watch('value')\n handleValueChange() {\n this.syncFocusedTabId(this.effectiveValue, this.selectableTabs);\n this.scheduleOverflowCheck();\n }\n\n @Watch('heading')\n @Watch('showBack')\n @Watch('primaryAction')\n @Watch('actions')\n @Watch('actionItems')\n handleLayoutInputsChange() {\n this.reportActionIdIssues();\n if (!this.availableActionMenuIds.has(this.openActionMenuId)) this.closeActionMenu();\n if (!this.availableActionMenuIds.has(this.surfaceActionMenuId)) this.surfaceActionMenuId = '';\n this.scheduleOverflowCheck();\n }\n\n private reportActionIdIssues() {\n for (const issue of barTitleActionIdIssues(this.resolvedActionItems)) {\n console.warn(`[ds-bar-page-title] ${issue}`);\n }\n }\n\n private get dividerVisible(): boolean {\n return this.showCompactDivider ?? this.showDivider;\n }\n\n private get selectableSections() {\n return selectableBarTitleSections(this.sections);\n }\n\n private get hasSectionSelector(): boolean {\n return this.selectableSections.length > 1;\n }\n\n private get sectionTabs() {\n return barTitleSectionsToTabs(this.sections);\n }\n\n private get selectableTabs(): TabItemTab[] {\n return getSelectableTabs(this.sectionTabs);\n }\n\n private get effectiveValue(): string {\n return effectiveBarTitleSectionValue(this.sections, this.value);\n }\n\n private get selectedSectionLabel(): string {\n return selectedBarTitleSectionLabel(this.sections, this.value);\n }\n\n private get sectionTriggerAriaLabel(): string {\n return barTitleSectionTriggerAriaLabel(this.sectionsAriaLabel, this.selectedSectionLabel);\n }\n\n private get sectionMenuSections() {\n return barTitleSectionMenuSections(this.sections, this.effectiveValue);\n }\n\n private get resolvedActionItems(): BarTitleActionConfigItem[] {\n return resolveBarTitleActionItems(this.actionItems, this.primaryAction, this.actions);\n }\n\n private get visibleActions(): BarTitleActionConfigItem[] {\n return visibleBarTitleActions(this.resolvedActionItems, 'compact');\n }\n\n private get actionMenuSections() {\n return overflowBarTitleActionSections(this.resolvedActionItems, 'compact');\n }\n\n private get showActionMenuTrigger(): boolean {\n return this.actionMenuSections.length > 0;\n }\n\n private get availableActionMenuIds(): Set<string> {\n return availableBarTitleActionMenuIds(this.visibleActions, this.showActionMenuTrigger);\n }\n\n private get showSectionTabs(): boolean {\n return this.hasSectionSelector && this.layoutCommitted && !this.sectionsCollapsed;\n }\n\n private get showSectionButton(): boolean {\n return this.hasSectionSelector && this.layoutCommitted && this.sectionsCollapsed;\n }\n\n private resetSectionLayout() {\n this.layoutCommitted = false;\n this.sectionsCollapsed = false;\n this.sectionMenuOpen = false;\n this.sectionMenuInitialFocusVisible = false;\n this.intrinsicWidthRetryCount = 0;\n this.tabLayoutPendingFrames = 0;\n }\n\n private bindChromeTransitionListeners() {\n const shell = this.el.closest<HTMLElement>('ds-shell-app');\n if (!shell) return;\n this.chromeTransitionShell = shell;\n shell.addEventListener(CHROME_TRANSITION_START, this.onChromeTransitionStart);\n shell.addEventListener(CHROME_TRANSITION_END, this.onChromeTransitionEnd);\n }\n\n private unbindChromeTransitionListeners() {\n if (!this.chromeTransitionShell) return;\n this.chromeTransitionShell.removeEventListener(\n CHROME_TRANSITION_START,\n this.onChromeTransitionStart\n );\n this.chromeTransitionShell.removeEventListener(\n CHROME_TRANSITION_END,\n this.onChromeTransitionEnd\n );\n this.chromeTransitionShell = null;\n }\n\n private onChromeTransitionStart = (event: Event) => {\n const source = readChromeTransitionSource(event);\n if (source === 'panel-nav') {\n this.panelNavTransition.enter();\n return;\n }\n if (source === 'panel-tools') {\n const phase = readChromeTransitionPhase(event) ?? 'opening';\n if (phase === 'closing') {\n this.panelToolsTransition.enter();\n }\n }\n };\n\n private chromeOverflowPaused(): boolean {\n return this.panelNavTransition.isActive || this.panelToolsTransition.isActive;\n }\n\n private onChromeTransitionEnd = (event: Event) => {\n const source = readChromeTransitionSource(event);\n if (source === 'panel-nav') {\n this.panelNavTransition.exit();\n if (!this.panelNavTransition.isActive) {\n this.scheduleOverflowCheck();\n }\n return;\n }\n if (source === 'panel-tools') {\n this.panelToolsTransition.exit();\n this.scheduleOverflowCheck();\n }\n };\n\n private setupOverflowObserver() {\n if (typeof ResizeObserver === 'undefined' || !this.chromeEl) return;\n this.resizeObserver?.disconnect();\n this.resizeObserver = new ResizeObserver(() => {\n if (this.chromeOverflowPaused()) return;\n this.scheduleOverflowCheck();\n });\n this.resizeObserver.observe(this.chromeEl);\n }\n\n private scheduleOverflowCheck() {\n if (this.chromeOverflowPaused()) return;\n this.overflowCoalescer.schedule();\n }\n\n private scheduleIntrinsicWidthRetry() {\n if (this.intrinsicWidthRetryCount >= BarPageTitle.INTRINSIC_WIDTH_RETRY_MAX) return;\n this.intrinsicWidthRetryCount++;\n requestAnimationFrame(() => this.scheduleOverflowCheck());\n }\n\n private forceTabLayoutCommit(collapsed: boolean) {\n this.intrinsicWidthRetryCount = 0;\n this.tabLayoutPendingFrames = 0;\n const collapsedChanged = this.sectionsCollapsed !== collapsed;\n if (collapsedChanged) this.sectionsCollapsed = collapsed;\n if (!collapsed && collapsedChanged) {\n this.closeSectionMenu();\n this.sectionSurfaceOpen = false;\n }\n this.layoutCommitted = true;\n }\n\n private getAvailableWidth(): number {\n if (!this.rowEl) return 0;\n const rowWidth = this.rowEl.clientWidth;\n const actions = this.rowEl.querySelector<HTMLElement>('.bar-page-title__actions');\n const actionsWidth = actions?.getBoundingClientRect().width ?? 0;\n const style = getComputedStyle(this.rowEl);\n const gap = parseFloat(style.columnGap || style.gap) || 0;\n return Math.max(0, rowWidth - actionsWidth - (actionsWidth > 0 ? gap : 0));\n }\n\n private updateSectionsCollapsed() {\n if (!this.hasSectionSelector) {\n if (this.sectionsCollapsed) this.sectionsCollapsed = false;\n this.intrinsicWidthRetryCount = 0;\n this.tabLayoutPendingFrames = 0;\n this.layoutCommitted = true;\n return;\n }\n\n const probeWidth = this.probeRowEl?.scrollWidth ?? 0;\n const available = this.getAvailableWidth();\n if (!this.probeRowEl || !this.rowEl || probeWidth === 0) {\n if (this.layoutCommitted) {\n this.scheduleIntrinsicWidthRetry();\n return;\n }\n this.tabLayoutPendingFrames += 1;\n if (\n this.intrinsicWidthRetryCount >= BarPageTitle.INTRINSIC_WIDTH_RETRY_MAX ||\n this.tabLayoutPendingFrames >= BarPageTitle.TAB_LAYOUT_COMMIT_MAX_FRAMES\n ) {\n this.forceTabLayoutCommit(false);\n } else {\n this.scheduleIntrinsicWidthRetry();\n }\n return;\n }\n\n this.intrinsicWidthRetryCount = 0;\n this.tabLayoutPendingFrames = 0;\n const shouldCollapse = tabsOverflowContainer(\n probeWidth,\n available,\n this.sectionsCollapsed,\n BarPageTitle.OVERFLOW_HYSTERESIS_PX\n );\n this.forceTabLayoutCommit(shouldCollapse);\n }\n\n private syncFocusedTabId(preferred: string, tabs: TabItemTab[]) {\n if (tabs.some(tab => tab.id === preferred && !tab.isInactive)) {\n this.focusedTabId = preferred;\n return;\n }\n const first = tabs.find(tab => !tab.isInactive);\n this.focusedTabId = first?.id ?? '';\n }\n\n private selectSection(id: string) {\n const selected = this.selectableSections.find(section => section.id === id);\n if (!selected || selected.isInactive) return;\n this.dsSectionChange.emit(id);\n }\n\n private toggleSectionMenu = (event: MouseEvent) => {\n this.sectionMenuInitialFocusVisible = event.detail === 0;\n this.openActionMenuId = '';\n this.sectionMenuOpen = !this.sectionMenuOpen;\n if (this.sectionMenuOpen) this.sectionSurfaceOpen = true;\n };\n\n private closeSectionMenu = () => {\n this.sectionMenuOpen = false;\n };\n\n private handleSectionSelect = (event: CustomEvent<MenuItemData>) => {\n const id = String(event.detail?.value ?? '');\n this.closeSectionMenu();\n this.selectSection(id);\n requestAnimationFrame(() => this.sectionTriggerEl?.focus());\n };\n\n private toggleActionMenu = (id: string, event: MouseEvent) => {\n this.actionMenuInitialFocusVisible = event.detail === 0;\n this.sectionMenuOpen = false;\n this.openActionMenuId = this.openActionMenuId === id ? '' : id;\n if (this.openActionMenuId) this.surfaceActionMenuId = this.openActionMenuId;\n };\n\n private finishActionMenuClose = (event: CustomEvent<void>) => {\n const id = this.surfaceActionMenuId;\n const domId =\n id === '__overflow'\n ? this.actionMenuId\n : barTitleActionMenuDomId('bar-page-title', this.instanceId, this.resolvedActionItems, id);\n if (this.openActionMenuId !== id && (event.target as HTMLElement).id === domId) {\n this.surfaceActionMenuId = '';\n }\n };\n\n private closeActionMenu = () => {\n this.openActionMenuId = '';\n };\n\n private handleActionSelect = (event: CustomEvent<MenuItemData>) => {\n const id = String(event.detail?.value ?? '');\n const action = findBarTitleAction(this.resolvedActionItems, id);\n if (!action || action.isInactive || ('isLoading' in action && action.isLoading)) return;\n const menuId = this.openActionMenuId;\n this.closeActionMenu();\n this.dsAction.emit(id);\n requestAnimationFrame(() => {\n void restoreBarTitleActionFocus({\n menuId,\n overflowTrigger: this.actionTriggerEl,\n actionTriggers: this.actionTriggerEls,\n resolvedActionItems: this.resolvedActionItems,\n });\n });\n };\n\n private focusVisibleTab(id: string) {\n this.focusedTabId = id;\n const tab = this.visibleTabListEl?.querySelector(`[data-tab-id=\"${id}\"]`) as HTMLElement | null;\n tab?.focus({ preventScroll: true });\n }\n\n private findEnabledTab(from: number, step: 1 | -1): number | null {\n const tabs = this.selectableTabs;\n for (let index = from + step; index >= 0 && index < tabs.length; index += step) {\n if (!tabs[index]?.isInactive) return index;\n }\n return null;\n }\n\n private handleTabKeyDown(event: KeyboardEvent) {\n const tabs = this.selectableTabs;\n if (!tabs.length) return;\n const targetId = (event.target as HTMLElement | null)?.getAttribute('data-tab-id');\n const focusedId = targetId ?? this.focusedTabId;\n\n if (event.key === 'Enter' || event.key === ' ') {\n const focused = tabs.find(tab => tab.id === focusedId);\n if (!focused || focused.isInactive) return;\n event.preventDefault();\n this.selectSection(focused.id);\n return;\n }\n\n const currentIndex = tabs.findIndex(tab => tab.id === focusedId);\n if (currentIndex < 0) return;\n\n let nextIndex: number | null;\n if (event.key === 'ArrowRight') {\n nextIndex = this.findEnabledTab(currentIndex, 1);\n } else if (event.key === 'ArrowLeft') {\n nextIndex = this.findEnabledTab(currentIndex, -1);\n } else if (event.key === 'Home') {\n nextIndex = tabs.findIndex(tab => !tab.isInactive);\n } else if (event.key === 'End') {\n const reversedIndex = [...tabs].reverse().findIndex(tab => !tab.isInactive);\n nextIndex = reversedIndex < 0 ? null : tabs.length - 1 - reversedIndex;\n } else {\n return;\n }\n\n if (nextIndex === null || nextIndex < 0 || nextIndex === currentIndex) return;\n event.preventDefault();\n this.focusVisibleTab(tabs[nextIndex].id);\n }\n\n private chromeActionOptions() {\n return {\n classPrefix: 'bar-page-title',\n compact: true,\n visibleActions: this.visibleActions,\n showOverflowTrigger: this.showActionMenuTrigger,\n actionItems: this.actionItems,\n primaryAction: this.primaryAction,\n resolvedActionItems: this.resolvedActionItems,\n instanceId: this.instanceId,\n openActionMenuId: this.openActionMenuId,\n surfaceActionMenuId: this.surfaceActionMenuId,\n actionsAriaLabel: this.actionsAriaLabel,\n actionMenuTriggerId: this.actionMenuTriggerId,\n actionMenuId: this.actionMenuId,\n actionTriggers: this.actionTriggerEls,\n setOverflowTriggerEl: (el: FocusableBarTitleButton | null) => {\n this.actionTriggerEl = el;\n },\n toggleActionMenu: this.toggleActionMenu,\n emitAction: (id: string) => this.dsAction.emit(id),\n };\n }\n\n private renderHeading(probe: boolean) {\n return (\n <ds-text\n class=\"bar-page-title__heading ds-control--md\"\n variant=\"text-title-small\"\n emphasis\n color=\"primary\"\n as={probe ? 'span' : 'h1'}\n wrap={probe ? 'nowrap' : undefined}\n lineTruncation={probe ? 'none' : 1}\n >\n {this.heading}\n </ds-text>\n );\n }\n\n private renderTabList(probe: boolean) {\n return (\n <div\n role={probe ? undefined : 'tablist'}\n class=\"bar-page-title__tab-list\"\n aria-label={probe ? undefined : this.sectionsAriaLabel}\n ref={el => {\n if (!probe) this.visibleTabListEl = (el as HTMLElement) ?? null;\n }}\n onKeyDown={probe ? undefined : (event: KeyboardEvent) => this.handleTabKeyDown(event)}\n >\n {this.sectionTabs.map((tab, index) => {\n if (isTabDivider(tab)) {\n return (\n <div class=\"bar-page-title__tab-divider\" key={`divider-${index}`} aria-hidden=\"true\">\n <div class=\"bar-page-title__tab-divider-line\" />\n </div>\n );\n }\n\n const isSelected = tab.id === this.effectiveValue;\n return (\n <button\n key={tab.id}\n type=\"button\"\n role={probe ? undefined : 'tab'}\n data-tab-id={tab.id}\n class={{\n 'bar-page-title__tab': true,\n 'bar-page-title__tab--selected': isSelected,\n 'ds-control--md': true,\n 'ds-focus-ring-inset': true,\n 'ds-control-inactive': !!tab.isInactive,\n }}\n aria-selected={isSelected ? 'true' : 'false'}\n aria-disabled={tab.isInactive ? 'true' : undefined}\n disabled={tab.isInactive}\n tabIndex={!probe && tab.id === this.focusedTabId ? 0 : -1}\n onClick={() => !probe && this.selectSection(tab.id)}\n onFocus={() => {\n if (!probe) this.focusedTabId = tab.id;\n }}\n >\n <ds-text\n class=\"bar-page-title__tab-label ds-control-label-box\"\n as=\"span\"\n variant=\"text-body-medium\"\n emphasis={isSelected}\n color=\"inherit\"\n >\n {tab.label}\n </ds-text>\n </button>\n );\n })}\n </div>\n );\n }\n\n private renderIdentity(probe: boolean) {\n return (\n <div class=\"bar-page-title__identity\">\n {renderBarTitleBack({\n classPrefix: 'bar-page-title',\n showBack: this.showBack,\n backAriaLabel: this.backAriaLabel,\n onBack: event => this.dsBack.emit(event),\n })}\n {this.renderHeading(probe)}\n </div>\n );\n }\n\n private renderSectionRegion() {\n if (!this.hasSectionSelector) return null;\n if (!this.layoutCommitted) {\n return [\n <div class=\"bar-page-title__divider\" aria-hidden=\"true\" />,\n <div class=\"bar-page-title__tabs-pending\" aria-hidden=\"true\" />,\n ];\n }\n if (this.showSectionTabs) {\n return [\n <div class=\"bar-page-title__divider\" aria-hidden=\"true\" />,\n this.renderTabList(false),\n ];\n }\n return [\n <div class=\"bar-page-title__divider\" aria-hidden=\"true\" />,\n renderBarTitleSectionTrigger({\n classPrefix: 'bar-page-title',\n triggerId: this.sectionMenuTriggerId,\n menuId: this.sectionMenuId,\n open: this.sectionMenuOpen,\n surfaceOpen: this.sectionSurfaceOpen,\n ariaLabel: this.sectionTriggerAriaLabel,\n selectedLabel: this.selectedSectionLabel,\n setTriggerEl: el => {\n this.sectionTriggerEl = el;\n },\n onToggle: this.toggleSectionMenu,\n }),\n ];\n }\n\n render() {\n return (\n <Host>\n <div\n class={{\n 'bar-page-title': true,\n 'bar-page-title--divider-hidden': !this.dividerVisible,\n 'ds-chrome-header': true,\n }}\n ref={el => {\n this.chromeEl = (el as HTMLElement) ?? null;\n if (el && !this.resizeObserver) this.setupOverflowObserver();\n }}\n >\n {this.hasSectionSelector ? (\n <div class=\"bar-page-title__probe\" aria-hidden=\"true\" inert>\n <div\n class=\"bar-page-title__probe-row\"\n ref={el => {\n const next = (el as HTMLElement) ?? null;\n if (next === this.probeRowEl) return;\n this.probeRowEl = next;\n if (next) {\n this.intrinsicWidthRetryCount = 0;\n this.tabLayoutPendingFrames = 0;\n this.scheduleOverflowCheck();\n }\n }}\n >\n {this.renderIdentity(true)}\n <div class=\"bar-page-title__divider\" />\n {this.renderTabList(true)}\n </div>\n </div>\n ) : null}\n\n <div class=\"bar-page-title__inner\">\n <div\n class=\"bar-page-title__row\"\n ref={el => {\n this.rowEl = (el as HTMLElement) ?? null;\n }}\n >\n <div class=\"bar-page-title__title-row\">\n {this.renderIdentity(false)}\n {this.renderSectionRegion()}\n </div>\n {renderBarTitleActions(this.chromeActionOptions())}\n </div>\n </div>\n </div>\n\n {this.showSectionButton ? (\n <ds-menu\n id={this.sectionMenuId}\n class=\"bar-page-title__section-menu\"\n anchorId={this.sectionMenuTriggerId}\n menuLabel={this.sectionsAriaLabel}\n open={this.sectionMenuOpen}\n initialFocusVisible={this.sectionMenuInitialFocusVisible}\n sections={this.sectionMenuSections}\n onDsClose={this.closeSectionMenu}\n onDsAfterClose={() => {\n if (!this.sectionMenuOpen) this.sectionSurfaceOpen = false;\n }}\n onDsSelect={this.handleSectionSelect}\n />\n ) : null}\n\n {renderBarTitleActionMenus({\n classPrefix: 'bar-page-title',\n visibleActions: this.visibleActions,\n instanceId: this.instanceId,\n resolvedActionItems: this.resolvedActionItems,\n openActionMenuId: this.openActionMenuId,\n actionMenuInitialFocusVisible: this.actionMenuInitialFocusVisible,\n overflowTrigger: this.actionTriggerEl,\n actionTriggers: this.actionTriggerEls,\n closeActionMenu: this.closeActionMenu,\n finishActionMenuClose: this.finishActionMenuClose,\n handleActionSelect: this.handleActionSelect,\n })}\n\n {renderBarTitleOverflowMenu({\n classPrefix: 'bar-page-title',\n showOverflowTrigger: this.showActionMenuTrigger,\n actionMenuId: this.actionMenuId,\n actionMenuTriggerId: this.actionMenuTriggerId,\n actionsAriaLabel: this.actionsAriaLabel,\n open: this.openActionMenuId === '__overflow',\n actionMenuInitialFocusVisible: this.actionMenuInitialFocusVisible,\n actionMenuSections: this.actionMenuSections,\n closeActionMenu: this.closeActionMenu,\n finishActionMenuClose: this.finishActionMenuClose,\n handleActionSelect: this.handleActionSelect,\n })}\n </Host>\n );\n }\n}\n",
|
|
430
|
+
"type": "registry:ui"
|
|
431
|
+
}
|
|
432
|
+
]
|
|
433
|
+
}
|