@ds-mo/ui 12.5.0 → 12.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.build-stamp +1 -1
- package/dist/agent-patterns.json +21 -12
- package/dist/agent.json +1540 -1427
- package/dist/angular/ds-bar-workflow.d.ts +1 -1
- package/dist/angular/ds-bar-workflow.js +3 -3
- package/dist/angular/ds-mobile-bar-nav.d.ts +18 -0
- package/dist/angular/{ds-shell-mobile-bar.js → ds-mobile-bar-nav.js} +15 -15
- package/dist/angular/ds-mobile-header.d.ts +23 -0
- package/dist/angular/ds-mobile-header.js +45 -0
- package/dist/angular/ds-mobile-section-switcher.d.ts +18 -0
- package/dist/angular/{ds-shell-mobile-section-nav.js → ds-mobile-section-switcher.js} +15 -15
- package/dist/angular/ds-mobile-sheet-nav.d.ts +20 -0
- package/dist/angular/{ds-shell-mobile-nav.js → ds-mobile-sheet-nav.js} +13 -16
- package/dist/angular/ds-shell-app.d.ts +1 -1
- package/dist/angular/ds-shell-app.js +3 -3
- package/dist/angular/ds-shell-page.d.ts +1 -1
- package/dist/angular/ds-shell-page.js +3 -3
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +4 -3
- package/dist/angular/proxies.d.ts +4 -3
- package/dist/angular/proxies.js +4 -3
- package/dist/components/ds-agent-activity.js +1 -1
- package/dist/components/ds-agent-response.js +1 -1
- package/dist/components/ds-agent-tool-call.js +1 -1
- package/dist/components/ds-avatar.js +1 -1
- package/dist/components/ds-avatar.js.map +1 -1
- package/dist/components/ds-badge.js +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-nav.js.map +1 -1
- package/dist/components/ds-bar-title.js +1 -1
- package/dist/components/ds-bar-title.js.map +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-breadcrumb.js +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-data-viz-bar.js +1 -1
- package/dist/components/ds-card-data-viz-donut.js +1 -1
- package/dist/components/ds-card-data-viz-line.js +1 -1
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-chart-bar.js +1 -1
- package/dist/components/ds-chart-donut.js +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-line.js +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-chip.js.map +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-input.js +1 -1
- package/dist/components/ds-input.js.map +1 -1
- package/dist/components/ds-loader.js +1 -1
- package/dist/components/ds-markdown.js +1 -1
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-message-composer.js +1 -1
- package/dist/components/ds-message-composer.js.map +1 -1
- package/dist/components/ds-message-scroller.js +1 -1
- package/dist/components/ds-message.js +1 -1
- package/dist/components/{ds-shell-mobile-nav.d.ts → ds-mobile-bar-nav.d.ts} +4 -4
- package/dist/components/ds-mobile-bar-nav.js +2 -0
- package/dist/components/ds-mobile-bar-nav.js.map +1 -0
- package/dist/components/ds-mobile-header.d.ts +11 -0
- package/dist/components/ds-mobile-header.js +2 -0
- package/dist/components/ds-mobile-header.js.map +1 -0
- package/dist/components/ds-mobile-section-switcher.d.ts +11 -0
- package/dist/components/ds-mobile-section-switcher.js +2 -0
- package/dist/components/ds-mobile-section-switcher.js.map +1 -0
- package/dist/components/{ds-shell-mobile-bar.d.ts → ds-mobile-sheet-nav.d.ts} +4 -4
- package/dist/components/ds-mobile-sheet-nav.js +2 -0
- package/dist/components/ds-mobile-sheet-nav.js.map +1 -0
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-modal.js.map +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-nav.js.map +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-radio.js +1 -1
- package/dist/components/ds-radio.js.map +1 -1
- package/dist/components/ds-select-multi.js +1 -1
- package/dist/components/ds-select-multi.js.map +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-select.js.map +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-gradient-picker.js +1 -1
- package/dist/components/ds-shell-gradient-picker.js.map +1 -1
- package/dist/components/ds-shell-gradient-swatch.js +1 -1
- package/dist/components/ds-shell-gradient-swatch.js.map +1 -1
- package/dist/components/ds-shell-page.js +1 -1
- package/dist/components/ds-shell-page.js.map +1 -1
- package/dist/components/ds-shell-tools.js +1 -1
- package/dist/components/ds-shell-tools.js.map +1 -1
- package/dist/components/ds-skeleton.js +1 -1
- package/dist/components/ds-skeleton.js.map +1 -1
- package/dist/components/ds-swatch-picker.js +1 -1
- package/dist/components/ds-switch.js +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-tag.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-data-viz.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/ds-typing-indicator.js +1 -1
- package/dist/components/p-4h7vAqyJ.js +2 -0
- package/dist/components/p-4h7vAqyJ.js.map +1 -0
- package/dist/components/p-6WdUnsGC.js +2 -0
- package/dist/components/p-6WdUnsGC.js.map +1 -0
- package/dist/components/{p-9dQQSgwT.js → p-BHYrsGBw.js} +2 -2
- package/dist/components/p-BY0PzkUp.js +2 -0
- package/dist/components/p-BdPaDhDe.js +2 -0
- package/dist/components/p-BdPaDhDe.js.map +1 -0
- package/dist/components/p-BgGP65Nn.js +2 -0
- package/dist/components/p-BgGP65Nn.js.map +1 -0
- package/dist/components/p-BkAMkjIR.js +2 -0
- package/dist/components/{p-Co8hD3P-.js.map → p-BkAMkjIR.js.map} +1 -1
- package/dist/components/p-BqPLwCrR.js +2 -0
- package/dist/components/{p-CtD24EyI.js.map → p-BqPLwCrR.js.map} +1 -1
- package/dist/components/p-BrusnEYP.js.map +1 -1
- package/dist/components/p-C2ym_Ich.js +2 -0
- package/dist/components/p-CKGlB6Ow.js +2 -0
- package/dist/components/p-CKGlB6Ow.js.map +1 -0
- package/dist/components/p-CLzlL3G4.js +2 -0
- package/dist/components/p-CLzlL3G4.js.map +1 -0
- package/dist/components/p-CPK5Tgae.js +2 -0
- package/dist/components/p-CPK5Tgae.js.map +1 -0
- package/dist/components/p-CUWxI1u0.js +2 -0
- package/dist/components/{p-BhxwpOH8.js.map → p-CUWxI1u0.js.map} +1 -1
- package/dist/components/p-Ca-I2UnB.js +2 -0
- package/dist/components/p-Ca-I2UnB.js.map +1 -0
- package/dist/components/p-CaRyxTMz.js +2 -0
- package/dist/components/p-CaRyxTMz.js.map +1 -0
- package/dist/components/p-D65itwnc.js +2 -0
- package/dist/components/p-D65itwnc.js.map +1 -0
- package/dist/components/{p-DjPZxzIG.js → p-DQDpDYyF.js} +2 -2
- package/dist/components/p-DWdRSOBV.js +2 -0
- package/dist/components/{p-BPS9VExm.js.map → p-DWdRSOBV.js.map} +1 -1
- package/dist/components/p-Dg3xLna0.js +2 -0
- package/dist/components/{p-C_0Q8Cnp.js.map → p-Dg3xLna0.js.map} +1 -1
- package/dist/components/p-DikRzG5f.js +2 -0
- package/dist/components/{p-PZ6R_nGI.js.map → p-DikRzG5f.js.map} +1 -1
- package/dist/components/p-Dq1vMuJb.js +2 -0
- package/dist/components/p-Dq1vMuJb.js.map +1 -0
- package/dist/components/{p-g40DTeV8.js → p-DzRBKJ2L.js} +2 -2
- package/dist/components/p-P5BMmQAc.js +2 -0
- package/dist/components/{p-Biz6xo-z.js.map → p-P5BMmQAc.js.map} +1 -1
- package/dist/components/{p-DXnFhmZF.js → p-hLPTSGdo.js} +2 -2
- package/dist/components/p-rsIOpkzV.js +2 -0
- package/dist/components/p-rsIOpkzV.js.map +1 -0
- package/dist/docs/components.json +3587 -3065
- package/dist/lib/shell/index.d.ts +1 -1
- package/dist/lib/shell/index.js +2 -1
- package/dist/lib/shell/index.js.map +2 -2
- package/dist/lib/shell/shell-responsive.d.ts +3 -3
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/index.js +8 -0
- package/dist/lib/utils/index.js.map +3 -3
- package/dist/lib/utils/required-validity.d.ts +14 -0
- package/dist/mcp-data/registry/agent-activity.json +2 -2
- package/dist/mcp-data/registry/badge.json +2 -2
- package/dist/mcp-data/registry/bar-nav.json +2 -2
- package/dist/mcp-data/registry/bar-title.json +2 -2
- package/dist/mcp-data/registry/bar-workflow.json +25 -4
- package/dist/mcp-data/registry/breadcrumb.json +2 -2
- package/dist/mcp-data/registry/button-unfilled.json +3 -3
- package/dist/mcp-data/registry/chart-legend.json +1 -1
- package/dist/mcp-data/registry/checkbox.json +1 -1
- package/dist/mcp-data/registry/conversation-list-item.json +2 -2
- package/dist/mcp-data/registry/input.json +1 -1
- package/dist/mcp-data/registry/loader.json +2 -2
- package/dist/mcp-data/registry/menu.json +7 -7
- package/dist/mcp-data/registry/mobile-bar-nav.json +333 -0
- package/dist/mcp-data/registry/mobile-header.json +351 -0
- package/dist/mcp-data/registry/mobile-section-switcher.json +211 -0
- package/dist/mcp-data/registry/mobile-sheet-nav.json +317 -0
- package/dist/mcp-data/registry/panel-nav.json +2 -2
- package/dist/mcp-data/registry/panel-tools.json +2 -2
- package/dist/mcp-data/registry/radio.json +1 -1
- package/dist/mcp-data/registry/registry.json +1548 -1432
- package/dist/mcp-data/registry/select-multi.json +1 -1
- package/dist/mcp-data/registry/select.json +2 -2
- package/dist/mcp-data/registry/shell-app.json +17 -17
- package/dist/mcp-data/registry/shell-page.json +26 -7
- package/dist/mcp-data/registry/shell-tools.json +10 -7
- package/dist/mcp-data/registry/switch.json +1 -1
- package/dist/mcp-data/registry/toast.json +2 -2
- package/dist/react/components.d.ts +4 -3
- package/dist/react/components.js +4 -3
- package/dist/react/ds-mobile-bar-nav.d.ts +13 -0
- package/dist/react/ds-mobile-bar-nav.js +15 -0
- package/dist/react/ds-mobile-header.d.ts +13 -0
- package/dist/react/ds-mobile-header.js +15 -0
- package/dist/react/ds-mobile-section-switcher.d.ts +12 -0
- package/dist/react/ds-mobile-section-switcher.js +12 -0
- package/dist/react/ds-mobile-sheet-nav.d.ts +14 -0
- package/dist/react/ds-mobile-sheet-nav.js +16 -0
- package/dist/types/components/BarWorkflow/BarWorkflow.d.ts +6 -0
- package/dist/types/components/ButtonUnfilled/ButtonUnfilled.d.ts +1 -1
- package/dist/types/components/Menu/Menu.d.ts +1 -1
- package/dist/types/components/MobileBarNav/MobileBarNav.d.ts +26 -0
- package/dist/types/components/MobileBarNav/index.d.ts +4 -0
- package/dist/types/components/MobileBarNav/mobile-bar-nav-types.d.ts +5 -0
- package/dist/types/components/MobileHeader/MobileHeader.d.ts +39 -0
- package/dist/types/components/MobileHeader/index.d.ts +2 -0
- package/dist/types/components/MobileHeader/mobile-header-types.d.ts +5 -0
- package/dist/types/components/MobileSectionSwitcher/MobileSectionSwitcher.d.ts +35 -0
- package/dist/types/components/MobileSectionSwitcher/index.d.ts +3 -0
- package/dist/types/components/MobileSectionSwitcher/mobile-section-switcher-types.d.ts +4 -0
- package/dist/types/components/MobileSectionSwitcher/mobile-section-switcher-utils.d.ts +10 -0
- package/dist/types/components/{ShellMobileNav/ShellMobileNav.d.ts → MobileSheetNav/MobileSheetNav.d.ts} +5 -7
- package/dist/types/components/MobileSheetNav/index.d.ts +1 -0
- package/dist/types/components/ShellApp/ShellApp.d.ts +4 -4
- package/dist/types/components/ShellPage/ShellPage.d.ts +4 -0
- package/dist/types/components.d.ts +532 -383
- package/dist/types/shell/index.d.ts +1 -1
- package/dist/types/shell/shell-responsive.d.ts +3 -3
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/required-validity.d.ts +15 -0
- package/package.json +1 -1
- package/dist/angular/ds-shell-mobile-bar.d.ts +0 -18
- package/dist/angular/ds-shell-mobile-nav.d.ts +0 -23
- package/dist/angular/ds-shell-mobile-section-nav.d.ts +0 -18
- package/dist/components/ds-shell-mobile-bar.js +0 -2
- package/dist/components/ds-shell-mobile-bar.js.map +0 -1
- package/dist/components/ds-shell-mobile-nav.js +0 -2
- package/dist/components/ds-shell-mobile-nav.js.map +0 -1
- package/dist/components/ds-shell-mobile-section-nav.d.ts +0 -11
- package/dist/components/ds-shell-mobile-section-nav.js +0 -2
- package/dist/components/ds-shell-mobile-section-nav.js.map +0 -1
- package/dist/components/p-B6Vuayt6.js +0 -2
- package/dist/components/p-B6Vuayt6.js.map +0 -1
- package/dist/components/p-BPS9VExm.js +0 -2
- package/dist/components/p-BVV_rlIP.js +0 -2
- package/dist/components/p-BVV_rlIP.js.map +0 -1
- package/dist/components/p-BhxwpOH8.js +0 -2
- package/dist/components/p-Biz6xo-z.js +0 -2
- package/dist/components/p-BtEjlcB9.js +0 -2
- package/dist/components/p-BtEjlcB9.js.map +0 -1
- package/dist/components/p-CH6cNXXF.js +0 -2
- package/dist/components/p-CH6cNXXF.js.map +0 -1
- package/dist/components/p-C_0Q8Cnp.js +0 -2
- package/dist/components/p-Ce52yVXF.js +0 -2
- package/dist/components/p-Ce52yVXF.js.map +0 -1
- package/dist/components/p-CgHTNfC1.js +0 -2
- package/dist/components/p-CgHTNfC1.js.map +0 -1
- package/dist/components/p-Co8hD3P-.js +0 -2
- package/dist/components/p-CoYFJD-w.js +0 -2
- package/dist/components/p-CoYFJD-w.js.map +0 -1
- package/dist/components/p-Cpr3K41-.js +0 -2
- package/dist/components/p-Cpr3K41-.js.map +0 -1
- package/dist/components/p-CtD24EyI.js +0 -2
- package/dist/components/p-DYqReipj.js +0 -2
- package/dist/components/p-DYqReipj.js.map +0 -1
- package/dist/components/p-NUNsefU1.js +0 -2
- package/dist/components/p-NUNsefU1.js.map +0 -1
- package/dist/components/p-PZ6R_nGI.js +0 -2
- package/dist/components/p-jCWtxthA.js +0 -2
- package/dist/components/p-yhj1lIPx.js +0 -2
- package/dist/mcp-data/registry/shell-mobile-bar.json +0 -314
- package/dist/mcp-data/registry/shell-mobile-nav.json +0 -348
- package/dist/mcp-data/registry/shell-mobile-section-nav.json +0 -267
- package/dist/react/ds-shell-mobile-bar.d.ts +0 -13
- package/dist/react/ds-shell-mobile-bar.js +0 -15
- package/dist/react/ds-shell-mobile-nav.d.ts +0 -15
- package/dist/react/ds-shell-mobile-nav.js +0 -17
- package/dist/react/ds-shell-mobile-section-nav.d.ts +0 -12
- package/dist/react/ds-shell-mobile-section-nav.js +0 -12
- package/dist/types/components/ShellMobileBar/ShellMobileBar.d.ts +0 -25
- package/dist/types/components/ShellMobileBar/index.d.ts +0 -4
- package/dist/types/components/ShellMobileBar/shell-mobile-bar-types.d.ts +0 -5
- package/dist/types/components/ShellMobileNav/index.d.ts +0 -2
- package/dist/types/components/ShellMobileNav/shell-mobile-nav-types.d.ts +0 -6
- package/dist/types/components/ShellMobileSectionNav/ShellMobileSectionNav.d.ts +0 -30
- package/dist/types/components/ShellMobileSectionNav/index.d.ts +0 -2
- /package/dist/components/{p-9dQQSgwT.js.map → p-BHYrsGBw.js.map} +0 -0
- /package/dist/components/{p-jCWtxthA.js.map → p-BY0PzkUp.js.map} +0 -0
- /package/dist/components/{p-yhj1lIPx.js.map → p-C2ym_Ich.js.map} +0 -0
- /package/dist/components/{p-DjPZxzIG.js.map → p-DQDpDYyF.js.map} +0 -0
- /package/dist/components/{p-g40DTeV8.js.map → p-DzRBKJ2L.js.map} +0 -0
- /package/dist/components/{p-DXnFhmZF.js.map → p-hLPTSGdo.js.map} +0 -0
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "shell-mobile-nav",
|
|
4
|
-
"title": "ShellMobileNav",
|
|
5
|
-
"description": "Full-height mobile primary navigation pane with local Dashboard and Settings browsing.",
|
|
6
|
-
"type": "registry:ui",
|
|
7
|
-
"meta": {
|
|
8
|
-
"library": "@ds-mo/ui",
|
|
9
|
-
"distribution": "npm",
|
|
10
|
-
"storybook": "https://zainadeel.github.io/compomo/?path=/story/shell-mobile-nav",
|
|
11
|
-
"source": "src/wc/components/ShellMobileNav/ShellMobileNav.tsx",
|
|
12
|
-
"intentStatus": "complete",
|
|
13
|
-
"intent": {
|
|
14
|
-
"audience": "specialized",
|
|
15
|
-
"status": "experimental",
|
|
16
|
-
"summary": "Full-height mobile primary navigation pane with local Dashboard and Settings browsing.",
|
|
17
|
-
"useWhen": [
|
|
18
|
-
"The mobile ShellApp Menu control needs to expose the complete primary navigation collection."
|
|
19
|
-
],
|
|
20
|
-
"avoidWhen": [
|
|
21
|
-
"Rendering desktop PanelNav.",
|
|
22
|
-
"Switching local page content."
|
|
23
|
-
],
|
|
24
|
-
"commonlyComposedWith": [
|
|
25
|
-
"component:ds-shell-app",
|
|
26
|
-
"component:ds-shell-mobile-bar"
|
|
27
|
-
],
|
|
28
|
-
"patterns": [
|
|
29
|
-
"pattern:application-shell"
|
|
30
|
-
],
|
|
31
|
-
"accessibility": [
|
|
32
|
-
"The pane is a named navigation landmark and retains visible labels for every destination.",
|
|
33
|
-
"Escape requests dismissal and opening moves focus to the selected or first available area."
|
|
34
|
-
],
|
|
35
|
-
"states": [
|
|
36
|
-
"Dashboard and Settings change only the collection being browsed.",
|
|
37
|
-
"Area, Help, and Account events express intent while the application owns navigation and product behavior."
|
|
38
|
-
],
|
|
39
|
-
"responsiveBehavior": [
|
|
40
|
-
"The pane fills the mobile content stage while the bottom bar remains available."
|
|
41
|
-
],
|
|
42
|
-
"references": [
|
|
43
|
-
{
|
|
44
|
-
"label": "Storybook",
|
|
45
|
-
"path": "src/wc/components/ShellMobileNav/ShellMobileNav.stories.ts"
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
"api": {
|
|
50
|
-
"props": {
|
|
51
|
-
"accountLabel": {
|
|
52
|
-
"type": "string",
|
|
53
|
-
"resolvedType": "string",
|
|
54
|
-
"attribute": "account-label",
|
|
55
|
-
"default": "'Account'",
|
|
56
|
-
"required": false,
|
|
57
|
-
"mutable": false
|
|
58
|
-
},
|
|
59
|
-
"browseContext": {
|
|
60
|
-
"type": "NavChromeStyle",
|
|
61
|
-
"resolvedType": "\"dashboard\" | \"settings\"",
|
|
62
|
-
"attribute": "browse-context",
|
|
63
|
-
"default": "'dashboard'",
|
|
64
|
-
"required": false,
|
|
65
|
-
"mutable": false
|
|
66
|
-
},
|
|
67
|
-
"currentUrl": {
|
|
68
|
-
"type": "string",
|
|
69
|
-
"resolvedType": "string",
|
|
70
|
-
"attribute": "current-url",
|
|
71
|
-
"default": "''",
|
|
72
|
-
"required": false,
|
|
73
|
-
"mutable": false
|
|
74
|
-
},
|
|
75
|
-
"dashboardGroups": {
|
|
76
|
-
"type": "PanelNavGroup[]",
|
|
77
|
-
"resolvedType": "PanelNavGroup[]",
|
|
78
|
-
"default": "[]",
|
|
79
|
-
"required": false,
|
|
80
|
-
"mutable": false
|
|
81
|
-
},
|
|
82
|
-
"dashboardLabel": {
|
|
83
|
-
"type": "string",
|
|
84
|
-
"resolvedType": "string",
|
|
85
|
-
"attribute": "dashboard-label",
|
|
86
|
-
"default": "'Dashboard'",
|
|
87
|
-
"required": false,
|
|
88
|
-
"mutable": false
|
|
89
|
-
},
|
|
90
|
-
"heading": {
|
|
91
|
-
"type": "string",
|
|
92
|
-
"resolvedType": "string",
|
|
93
|
-
"attribute": "heading",
|
|
94
|
-
"default": "'Navigation'",
|
|
95
|
-
"required": false,
|
|
96
|
-
"mutable": false
|
|
97
|
-
},
|
|
98
|
-
"helpLabel": {
|
|
99
|
-
"type": "string",
|
|
100
|
-
"resolvedType": "string",
|
|
101
|
-
"attribute": "help-label",
|
|
102
|
-
"default": "'Help & Support'",
|
|
103
|
-
"required": false,
|
|
104
|
-
"mutable": false
|
|
105
|
-
},
|
|
106
|
-
"navigationLabel": {
|
|
107
|
-
"type": "string",
|
|
108
|
-
"resolvedType": "string",
|
|
109
|
-
"attribute": "navigation-label",
|
|
110
|
-
"default": "'Application navigation'",
|
|
111
|
-
"required": false,
|
|
112
|
-
"mutable": false
|
|
113
|
-
},
|
|
114
|
-
"open": {
|
|
115
|
-
"type": "boolean",
|
|
116
|
-
"resolvedType": "boolean",
|
|
117
|
-
"attribute": "open",
|
|
118
|
-
"default": "false",
|
|
119
|
-
"required": false,
|
|
120
|
-
"mutable": false
|
|
121
|
-
},
|
|
122
|
-
"settingsGroups": {
|
|
123
|
-
"type": "PanelNavGroup[]",
|
|
124
|
-
"resolvedType": "PanelNavGroup[]",
|
|
125
|
-
"default": "[]",
|
|
126
|
-
"required": false,
|
|
127
|
-
"mutable": false
|
|
128
|
-
},
|
|
129
|
-
"settingsLabel": {
|
|
130
|
-
"type": "string",
|
|
131
|
-
"resolvedType": "string",
|
|
132
|
-
"attribute": "settings-label",
|
|
133
|
-
"default": "'Settings'",
|
|
134
|
-
"required": false,
|
|
135
|
-
"mutable": false
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
"events": [
|
|
139
|
-
{
|
|
140
|
-
"name": "dsAreaSelect",
|
|
141
|
-
"detail": "string",
|
|
142
|
-
"bubbles": true,
|
|
143
|
-
"cancelable": true,
|
|
144
|
-
"composed": true
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"name": "dsAuxiliarySelect",
|
|
148
|
-
"detail": "ShellMobileNavAuxiliaryDetail",
|
|
149
|
-
"bubbles": true,
|
|
150
|
-
"cancelable": true,
|
|
151
|
-
"composed": true
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"name": "dsBrowseContextChange",
|
|
155
|
-
"detail": "NavChromeStyle",
|
|
156
|
-
"bubbles": true,
|
|
157
|
-
"cancelable": true,
|
|
158
|
-
"composed": true
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"name": "dsClose",
|
|
162
|
-
"detail": "void",
|
|
163
|
-
"bubbles": true,
|
|
164
|
-
"cancelable": true,
|
|
165
|
-
"composed": true
|
|
166
|
-
}
|
|
167
|
-
],
|
|
168
|
-
"methods": [],
|
|
169
|
-
"slots": []
|
|
170
|
-
},
|
|
171
|
-
"props": {
|
|
172
|
-
"accountLabel": {
|
|
173
|
-
"type": "string",
|
|
174
|
-
"resolvedType": "string",
|
|
175
|
-
"attribute": "account-label",
|
|
176
|
-
"default": "'Account'",
|
|
177
|
-
"required": false,
|
|
178
|
-
"mutable": false
|
|
179
|
-
},
|
|
180
|
-
"browseContext": {
|
|
181
|
-
"type": "NavChromeStyle",
|
|
182
|
-
"resolvedType": "\"dashboard\" | \"settings\"",
|
|
183
|
-
"attribute": "browse-context",
|
|
184
|
-
"default": "'dashboard'",
|
|
185
|
-
"required": false,
|
|
186
|
-
"mutable": false
|
|
187
|
-
},
|
|
188
|
-
"currentUrl": {
|
|
189
|
-
"type": "string",
|
|
190
|
-
"resolvedType": "string",
|
|
191
|
-
"attribute": "current-url",
|
|
192
|
-
"default": "''",
|
|
193
|
-
"required": false,
|
|
194
|
-
"mutable": false
|
|
195
|
-
},
|
|
196
|
-
"dashboardGroups": {
|
|
197
|
-
"type": "PanelNavGroup[]",
|
|
198
|
-
"resolvedType": "PanelNavGroup[]",
|
|
199
|
-
"default": "[]",
|
|
200
|
-
"required": false,
|
|
201
|
-
"mutable": false
|
|
202
|
-
},
|
|
203
|
-
"dashboardLabel": {
|
|
204
|
-
"type": "string",
|
|
205
|
-
"resolvedType": "string",
|
|
206
|
-
"attribute": "dashboard-label",
|
|
207
|
-
"default": "'Dashboard'",
|
|
208
|
-
"required": false,
|
|
209
|
-
"mutable": false
|
|
210
|
-
},
|
|
211
|
-
"heading": {
|
|
212
|
-
"type": "string",
|
|
213
|
-
"resolvedType": "string",
|
|
214
|
-
"attribute": "heading",
|
|
215
|
-
"default": "'Navigation'",
|
|
216
|
-
"required": false,
|
|
217
|
-
"mutable": false
|
|
218
|
-
},
|
|
219
|
-
"helpLabel": {
|
|
220
|
-
"type": "string",
|
|
221
|
-
"resolvedType": "string",
|
|
222
|
-
"attribute": "help-label",
|
|
223
|
-
"default": "'Help & Support'",
|
|
224
|
-
"required": false,
|
|
225
|
-
"mutable": false
|
|
226
|
-
},
|
|
227
|
-
"navigationLabel": {
|
|
228
|
-
"type": "string",
|
|
229
|
-
"resolvedType": "string",
|
|
230
|
-
"attribute": "navigation-label",
|
|
231
|
-
"default": "'Application navigation'",
|
|
232
|
-
"required": false,
|
|
233
|
-
"mutable": false
|
|
234
|
-
},
|
|
235
|
-
"open": {
|
|
236
|
-
"type": "boolean",
|
|
237
|
-
"resolvedType": "boolean",
|
|
238
|
-
"attribute": "open",
|
|
239
|
-
"default": "false",
|
|
240
|
-
"required": false,
|
|
241
|
-
"mutable": false
|
|
242
|
-
},
|
|
243
|
-
"settingsGroups": {
|
|
244
|
-
"type": "PanelNavGroup[]",
|
|
245
|
-
"resolvedType": "PanelNavGroup[]",
|
|
246
|
-
"default": "[]",
|
|
247
|
-
"required": false,
|
|
248
|
-
"mutable": false
|
|
249
|
-
},
|
|
250
|
-
"settingsLabel": {
|
|
251
|
-
"type": "string",
|
|
252
|
-
"resolvedType": "string",
|
|
253
|
-
"attribute": "settings-label",
|
|
254
|
-
"default": "'Settings'",
|
|
255
|
-
"required": false,
|
|
256
|
-
"mutable": false
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
"events": [
|
|
260
|
-
{
|
|
261
|
-
"name": "dsAreaSelect",
|
|
262
|
-
"detail": "string",
|
|
263
|
-
"bubbles": true,
|
|
264
|
-
"cancelable": true,
|
|
265
|
-
"composed": true
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
"name": "dsAuxiliarySelect",
|
|
269
|
-
"detail": "ShellMobileNavAuxiliaryDetail",
|
|
270
|
-
"bubbles": true,
|
|
271
|
-
"cancelable": true,
|
|
272
|
-
"composed": true
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
"name": "dsBrowseContextChange",
|
|
276
|
-
"detail": "NavChromeStyle",
|
|
277
|
-
"bubbles": true,
|
|
278
|
-
"cancelable": true,
|
|
279
|
-
"composed": true
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
"name": "dsClose",
|
|
283
|
-
"detail": "void",
|
|
284
|
-
"bubbles": true,
|
|
285
|
-
"cancelable": true,
|
|
286
|
-
"composed": true
|
|
287
|
-
}
|
|
288
|
-
],
|
|
289
|
-
"methods": [],
|
|
290
|
-
"slots": [],
|
|
291
|
-
"exports": {
|
|
292
|
-
"customElement": "ds-shell-mobile-nav",
|
|
293
|
-
"react": "DsShellMobileNav",
|
|
294
|
-
"angular": "DsShellMobileNav"
|
|
295
|
-
},
|
|
296
|
-
"consumption": {
|
|
297
|
-
"install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
|
|
298
|
-
"cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
|
|
299
|
-
"customElements": {
|
|
300
|
-
"import": "import '@ds-mo/ui/dist/components/ds-shell-mobile-nav.js';",
|
|
301
|
-
"example": "<ds-shell-mobile-nav></ds-shell-mobile-nav>"
|
|
302
|
-
},
|
|
303
|
-
"react": {
|
|
304
|
-
"import": "import { DsShellMobileNav } from '@ds-mo/ui/react';",
|
|
305
|
-
"example": "<DsShellMobileNav />"
|
|
306
|
-
},
|
|
307
|
-
"angular": {
|
|
308
|
-
"import": "import { DsShellMobileNav } from '@ds-mo/ui/angular/ds-shell-mobile-nav';",
|
|
309
|
-
"example": "<ds-shell-mobile-nav></ds-shell-mobile-nav>"
|
|
310
|
-
},
|
|
311
|
-
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: dashboardGroups, settingsGroups.",
|
|
312
|
-
"peerDependencies": {
|
|
313
|
-
"required": [
|
|
314
|
-
"@ds-mo/tokens ^3.1.1",
|
|
315
|
-
"@ds-mo/icons ^6.4.0"
|
|
316
|
-
],
|
|
317
|
-
"frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
"dependencies": [
|
|
322
|
-
"@ds-mo/ui",
|
|
323
|
-
"@ds-mo/tokens",
|
|
324
|
-
"@ds-mo/icons"
|
|
325
|
-
],
|
|
326
|
-
"registryDependencies": [
|
|
327
|
-
"icon",
|
|
328
|
-
"tab-group",
|
|
329
|
-
"text"
|
|
330
|
-
],
|
|
331
|
-
"files": [
|
|
332
|
-
{
|
|
333
|
-
"path": "src/wc/components/ShellMobileNav/ShellMobileNav.css",
|
|
334
|
-
"content": "@import '../../utils/control-density.css';\n@import '../../utils/focus-ring.css';\n@import '../../utils/interaction-fill.css';\n\n:host {\n display: block;\n min-width: 0;\n min-height: 0;\n height: 100%;\n background: var(--color-background-primary);\n}\n\n:host(:not([open])) {\n display: none;\n}\n\n.shell-mobile-nav {\n display: grid;\n grid-template-rows: auto minmax(0, 1fr) auto;\n height: 100%;\n min-height: 0;\n background: var(--color-background-primary);\n}\n\n.shell-mobile-nav__header {\n display: grid;\n gap: var(--dimension-space-100);\n padding: var(--dimension-space-200);\n border-bottom: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n}\n\n.shell-mobile-nav__body {\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n padding: var(--dimension-space-100);\n}\n\n.shell-mobile-nav__group + .shell-mobile-nav__group {\n margin-block-start: var(--dimension-space-200);\n}\n\n.shell-mobile-nav__group-label {\n display: block;\n padding: 0 var(--dimension-space-100) var(--dimension-space-050);\n}\n\n.shell-mobile-nav__items {\n display: grid;\n gap: var(--dimension-space-025);\n}\n\n.shell-mobile-nav__area,\n.shell-mobile-nav__auxiliary {\n appearance: none;\n width: 100%;\n border: 0;\n background: transparent;\n color: var(--color-foreground-secondary);\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: var(--ds-control-content-gap);\n padding-inline: var(--dimension-space-100);\n cursor: pointer;\n text-align: start;\n}\n\n.shell-mobile-nav__area--selected {\n color: var(--color-foreground-primary);\n}\n\n.shell-mobile-nav__dot {\n width: var(--dimension-size-075);\n height: var(--dimension-size-075);\n margin-inline-start: auto;\n border-radius: var(--dimension-radius-half);\n background: var(--color-background-bold-brand);\n}\n\n.shell-mobile-nav__footer {\n display: grid;\n gap: var(--dimension-space-025);\n padding: var(--dimension-space-100);\n border-top: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n}\n",
|
|
335
|
-
"type": "registry:ui"
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
"path": "src/wc/components/ShellMobileNav/ShellMobileNav.tsx",
|
|
339
|
-
"content": "import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n Watch,\n} from '@stencil/core';\nimport type { NavChromeStyle } from '../../shell/nav-chrome';\nimport { deriveActiveIdFromUrl } from '../PanelNav/panel-nav-utils';\nimport type { PanelNavGroup, PanelNavItem } from '../PanelNav/panel-nav-types';\nimport type {\n ShellMobileNavAuxiliaryDetail,\n ShellMobileNavAuxiliaryId,\n} from './shell-mobile-nav-types';\n\nconst CONTEXT_TABS = [\n { id: 'dashboard', label: 'Dashboard' },\n { id: 'settings', label: 'Settings' },\n];\n\n@Component({\n tag: 'ds-shell-mobile-nav',\n styleUrl: 'ShellMobileNav.css',\n scoped: true,\n})\nexport class ShellMobileNav {\n @Element() el!: HTMLElement;\n\n @Prop({ reflect: true }) open: boolean = false;\n @Prop() browseContext: NavChromeStyle = 'dashboard';\n @Prop() dashboardGroups: PanelNavGroup[] = [];\n @Prop() settingsGroups: PanelNavGroup[] = [];\n @Prop() currentUrl: string = '';\n @Prop() heading: string = 'Navigation';\n @Prop() navigationLabel: string = 'Application navigation';\n @Prop() dashboardLabel: string = 'Dashboard';\n @Prop() settingsLabel: string = 'Settings';\n @Prop() accountLabel: string = 'Account';\n @Prop() helpLabel: string = 'Help & Support';\n\n @Event() dsAreaSelect!: EventEmitter<string>;\n @Event() dsBrowseContextChange!: EventEmitter<NavChromeStyle>;\n @Event() dsAuxiliarySelect!: EventEmitter<ShellMobileNavAuxiliaryDetail>;\n @Event() dsClose!: EventEmitter<void>;\n\n private get groups(): PanelNavGroup[] {\n return this.browseContext === 'settings' ? this.settingsGroups : this.dashboardGroups;\n }\n\n private get items(): PanelNavItem[] {\n return this.groups.flatMap(group => group.items);\n }\n\n private get activeId(): string {\n return deriveActiveIdFromUrl(this.currentUrl, [\n ...this.dashboardGroups.flatMap(group => group.items),\n ...this.settingsGroups.flatMap(group => group.items),\n ]);\n }\n\n @Watch('open')\n handleOpenChange(open: boolean) {\n if (!open) return;\n requestAnimationFrame(() => {\n const selected = this.el.querySelector<HTMLElement>('[aria-current=\"page\"]');\n const first = this.el.querySelector<HTMLElement>('.shell-mobile-nav__area');\n (selected ?? first)?.focus({ preventScroll: true });\n });\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (!this.open || event.key !== 'Escape') return;\n event.preventDefault();\n this.dsClose.emit();\n }\n\n private handleContextChange = (event: CustomEvent<string>) => {\n const next = event.detail === 'settings' ? 'settings' : 'dashboard';\n if (next === this.browseContext) return;\n this.dsBrowseContextChange.emit(next);\n };\n\n private selectAuxiliary(id: ShellMobileNavAuxiliaryId, event: MouseEvent) {\n this.dsAuxiliarySelect.emit({\n id,\n anchor: event.currentTarget as HTMLElement,\n });\n }\n\n private renderGroup(group: PanelNavGroup, index: number) {\n return (\n <section class=\"shell-mobile-nav__group\" aria-labelledby={group.label ? `mobile-nav-group-${group.id ?? index}` : undefined}>\n {group.label && (\n <ds-text\n id={`mobile-nav-group-${group.id ?? index}`}\n class=\"shell-mobile-nav__group-label\"\n as=\"h2\"\n variant=\"text-caption\"\n color=\"secondary\"\n >\n {group.label}\n </ds-text>\n )}\n <div class=\"shell-mobile-nav__items\">\n {group.items.map(item => {\n const selected = item.id === this.activeId;\n return (\n <button\n type=\"button\"\n class={{\n 'shell-mobile-nav__area': true,\n 'shell-mobile-nav__area--selected': selected,\n 'ds-control--md': true,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': selected,\n }}\n aria-current={selected ? 'page' : undefined}\n onClick={() => this.dsAreaSelect.emit(item.id)}\n >\n <ds-icon name={item.icon} size=\"md\" color=\"inherit\" />\n <ds-text as=\"span\" variant=\"text-body-medium\" emphasis color=\"inherit\">\n {item.label}\n </ds-text>\n {item.dot && <span class=\"shell-mobile-nav__dot\" aria-hidden=\"true\" />}\n </button>\n );\n })}\n </div>\n </section>\n );\n }\n\n render() {\n const contextTabs = [\n { ...CONTEXT_TABS[0], label: this.dashboardLabel },\n { ...CONTEXT_TABS[1], label: this.settingsLabel },\n ];\n\n return (\n <Host aria-hidden={this.open ? undefined : 'true'} inert={this.open ? undefined : true}>\n <section\n id=\"ds-shell-mobile-navigation\"\n class=\"shell-mobile-nav\"\n aria-label={this.navigationLabel}\n >\n <header class=\"shell-mobile-nav__header\">\n <ds-text as=\"h1\" variant=\"text-title-medium\" emphasis>\n {this.heading}\n </ds-text>\n <ds-tab-group\n tabs={contextTabs}\n value={this.browseContext}\n aria-label=\"Navigation context\"\n onDsChange={this.handleContextChange}\n />\n </header>\n\n <nav class=\"shell-mobile-nav__body\" aria-label={this.navigationLabel}>\n {this.groups.map((group, index) => this.renderGroup(group, index))}\n </nav>\n\n <footer class=\"shell-mobile-nav__footer\">\n <button\n type=\"button\"\n class=\"shell-mobile-nav__auxiliary ds-control--md ds-focus-ring-inset ds-interaction-fill\"\n onClick={event => this.selectAuxiliary('help', event)}\n >\n <ds-icon name=\"CircleQuestion\" size=\"md\" color=\"inherit\" />\n <ds-text as=\"span\" variant=\"text-body-medium\" emphasis color=\"inherit\">\n {this.helpLabel}\n </ds-text>\n </button>\n <button\n type=\"button\"\n class=\"shell-mobile-nav__auxiliary ds-control--md ds-focus-ring-inset ds-interaction-fill\"\n onClick={event => this.selectAuxiliary('account', event)}\n >\n <ds-icon name=\"Avatar\" size=\"md\" color=\"inherit\" />\n <ds-text as=\"span\" variant=\"text-body-medium\" emphasis color=\"inherit\">\n {this.accountLabel}\n </ds-text>\n </button>\n </footer>\n </section>\n </Host>\n );\n }\n}\n",
|
|
340
|
-
"type": "registry:ui"
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
"path": "src/wc/components/ShellMobileNav/shell-mobile-nav-types.ts",
|
|
344
|
-
"content": "export type ShellMobileNavAuxiliaryId = 'account' | 'help';\n\nexport interface ShellMobileNavAuxiliaryDetail {\n id: ShellMobileNavAuxiliaryId;\n anchor: HTMLElement;\n}\n",
|
|
345
|
-
"type": "registry:ui"
|
|
346
|
-
}
|
|
347
|
-
]
|
|
348
|
-
}
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
-
"name": "shell-mobile-section-nav",
|
|
4
|
-
"title": "ShellMobileSectionNav",
|
|
5
|
-
"description": "Horizontally scrollable mobile route navigation corresponding to the active area's desktop BarNav.",
|
|
6
|
-
"type": "registry:ui",
|
|
7
|
-
"meta": {
|
|
8
|
-
"library": "@ds-mo/ui",
|
|
9
|
-
"distribution": "npm",
|
|
10
|
-
"storybook": "https://zainadeel.github.io/compomo/?path=/story/shell-mobile-section-nav",
|
|
11
|
-
"source": "src/wc/components/ShellMobileSectionNav/ShellMobileSectionNav.tsx",
|
|
12
|
-
"intentStatus": "complete",
|
|
13
|
-
"intent": {
|
|
14
|
-
"audience": "specialized",
|
|
15
|
-
"status": "experimental",
|
|
16
|
-
"summary": "Horizontally scrollable mobile route navigation corresponding to the active area's desktop BarNav.",
|
|
17
|
-
"useWhen": [
|
|
18
|
-
"ShellApp is rendering the below-768px routed workspace and the active area has peer route sections."
|
|
19
|
-
],
|
|
20
|
-
"avoidWhen": [
|
|
21
|
-
"Choices switch local content without navigation; use TabGroup.",
|
|
22
|
-
"Rendering the desktop or tablet secondary navigation; use BarNav."
|
|
23
|
-
],
|
|
24
|
-
"alternatives": [
|
|
25
|
-
{
|
|
26
|
-
"when": "The choices switch local content without changing routes.",
|
|
27
|
-
"component": "component:ds-tab-group",
|
|
28
|
-
"reason": "TabGroup owns local view selection."
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"commonlyComposedWith": [
|
|
32
|
-
"component:ds-shell-app",
|
|
33
|
-
"component:ds-shell-mobile-bar",
|
|
34
|
-
"component:ds-bar-nav"
|
|
35
|
-
],
|
|
36
|
-
"patterns": [
|
|
37
|
-
"pattern:application-shell"
|
|
38
|
-
],
|
|
39
|
-
"accessibility": [
|
|
40
|
-
"The row is a named navigation landmark and the selected section exposes aria-current.",
|
|
41
|
-
"Disabled route sections remain visible but cannot emit navigation intent."
|
|
42
|
-
],
|
|
43
|
-
"states": [
|
|
44
|
-
"The host router owns the current URL and handles dsTabChange.",
|
|
45
|
-
"Detail routes that do not match a section show the active-area heading."
|
|
46
|
-
],
|
|
47
|
-
"responsiveBehavior": [
|
|
48
|
-
"The row scrolls horizontally without wrapping and centers the selected section when selection changes."
|
|
49
|
-
],
|
|
50
|
-
"frameworkCaveats": {
|
|
51
|
-
"customElements": [
|
|
52
|
-
"Assign tabs as a JavaScript property and update currentUrl and basePath with router state."
|
|
53
|
-
],
|
|
54
|
-
"react": [
|
|
55
|
-
"Pass the same BarNavTab array used by the desktop BarNav through the generated React wrapper."
|
|
56
|
-
],
|
|
57
|
-
"angular": [
|
|
58
|
-
"Import the generated standalone adapter and bind tabs as a property."
|
|
59
|
-
]
|
|
60
|
-
},
|
|
61
|
-
"references": [
|
|
62
|
-
{
|
|
63
|
-
"label": "Storybook",
|
|
64
|
-
"path": "src/wc/components/ShellMobileSectionNav/ShellMobileSectionNav.stories.ts"
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
},
|
|
68
|
-
"api": {
|
|
69
|
-
"props": {
|
|
70
|
-
"basePath": {
|
|
71
|
-
"type": "string",
|
|
72
|
-
"resolvedType": "string",
|
|
73
|
-
"attribute": "base-path",
|
|
74
|
-
"default": "''",
|
|
75
|
-
"required": false,
|
|
76
|
-
"mutable": false,
|
|
77
|
-
"description": "Section base path used to derive the selected route tab."
|
|
78
|
-
},
|
|
79
|
-
"currentUrl": {
|
|
80
|
-
"type": "string",
|
|
81
|
-
"resolvedType": "string",
|
|
82
|
-
"attribute": "current-url",
|
|
83
|
-
"default": "''",
|
|
84
|
-
"required": false,
|
|
85
|
-
"mutable": false,
|
|
86
|
-
"description": "Current application route."
|
|
87
|
-
},
|
|
88
|
-
"heading": {
|
|
89
|
-
"type": "string | undefined",
|
|
90
|
-
"resolvedType": "string | undefined",
|
|
91
|
-
"attribute": "heading",
|
|
92
|
-
"required": false,
|
|
93
|
-
"mutable": false,
|
|
94
|
-
"description": "Active primary-area label shown when the route has no section row."
|
|
95
|
-
},
|
|
96
|
-
"navigationLabel": {
|
|
97
|
-
"type": "string",
|
|
98
|
-
"resolvedType": "string",
|
|
99
|
-
"attribute": "navigation-label",
|
|
100
|
-
"default": "'Section navigation'",
|
|
101
|
-
"required": false,
|
|
102
|
-
"mutable": false
|
|
103
|
-
},
|
|
104
|
-
"tabs": {
|
|
105
|
-
"type": "BarNavTab[]",
|
|
106
|
-
"resolvedType": "TabItem[]",
|
|
107
|
-
"default": "[]",
|
|
108
|
-
"required": false,
|
|
109
|
-
"mutable": false,
|
|
110
|
-
"description": "Route sections shared with the corresponding desktop BarNav."
|
|
111
|
-
},
|
|
112
|
-
"tabsJson": {
|
|
113
|
-
"type": "string",
|
|
114
|
-
"resolvedType": "string",
|
|
115
|
-
"attribute": "tabs-json",
|
|
116
|
-
"default": "''",
|
|
117
|
-
"required": false,
|
|
118
|
-
"mutable": false,
|
|
119
|
-
"description": "JSON fallback for `tabs`."
|
|
120
|
-
},
|
|
121
|
-
"value": {
|
|
122
|
-
"type": "string",
|
|
123
|
-
"resolvedType": "string",
|
|
124
|
-
"attribute": "value",
|
|
125
|
-
"default": "''",
|
|
126
|
-
"required": false,
|
|
127
|
-
"mutable": false,
|
|
128
|
-
"description": "Controlled selected tab when URL-derived selection is unavailable."
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
"events": [
|
|
132
|
-
{
|
|
133
|
-
"name": "dsTabChange",
|
|
134
|
-
"detail": "string",
|
|
135
|
-
"bubbles": true,
|
|
136
|
-
"cancelable": true,
|
|
137
|
-
"composed": true,
|
|
138
|
-
"description": "Route intent; the application owns navigation."
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
"methods": [],
|
|
142
|
-
"slots": []
|
|
143
|
-
},
|
|
144
|
-
"props": {
|
|
145
|
-
"basePath": {
|
|
146
|
-
"type": "string",
|
|
147
|
-
"resolvedType": "string",
|
|
148
|
-
"attribute": "base-path",
|
|
149
|
-
"default": "''",
|
|
150
|
-
"required": false,
|
|
151
|
-
"mutable": false,
|
|
152
|
-
"description": "Section base path used to derive the selected route tab."
|
|
153
|
-
},
|
|
154
|
-
"currentUrl": {
|
|
155
|
-
"type": "string",
|
|
156
|
-
"resolvedType": "string",
|
|
157
|
-
"attribute": "current-url",
|
|
158
|
-
"default": "''",
|
|
159
|
-
"required": false,
|
|
160
|
-
"mutable": false,
|
|
161
|
-
"description": "Current application route."
|
|
162
|
-
},
|
|
163
|
-
"heading": {
|
|
164
|
-
"type": "string | undefined",
|
|
165
|
-
"resolvedType": "string | undefined",
|
|
166
|
-
"attribute": "heading",
|
|
167
|
-
"required": false,
|
|
168
|
-
"mutable": false,
|
|
169
|
-
"description": "Active primary-area label shown when the route has no section row."
|
|
170
|
-
},
|
|
171
|
-
"navigationLabel": {
|
|
172
|
-
"type": "string",
|
|
173
|
-
"resolvedType": "string",
|
|
174
|
-
"attribute": "navigation-label",
|
|
175
|
-
"default": "'Section navigation'",
|
|
176
|
-
"required": false,
|
|
177
|
-
"mutable": false
|
|
178
|
-
},
|
|
179
|
-
"tabs": {
|
|
180
|
-
"type": "BarNavTab[]",
|
|
181
|
-
"resolvedType": "TabItem[]",
|
|
182
|
-
"default": "[]",
|
|
183
|
-
"required": false,
|
|
184
|
-
"mutable": false,
|
|
185
|
-
"description": "Route sections shared with the corresponding desktop BarNav."
|
|
186
|
-
},
|
|
187
|
-
"tabsJson": {
|
|
188
|
-
"type": "string",
|
|
189
|
-
"resolvedType": "string",
|
|
190
|
-
"attribute": "tabs-json",
|
|
191
|
-
"default": "''",
|
|
192
|
-
"required": false,
|
|
193
|
-
"mutable": false,
|
|
194
|
-
"description": "JSON fallback for `tabs`."
|
|
195
|
-
},
|
|
196
|
-
"value": {
|
|
197
|
-
"type": "string",
|
|
198
|
-
"resolvedType": "string",
|
|
199
|
-
"attribute": "value",
|
|
200
|
-
"default": "''",
|
|
201
|
-
"required": false,
|
|
202
|
-
"mutable": false,
|
|
203
|
-
"description": "Controlled selected tab when URL-derived selection is unavailable."
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
"events": [
|
|
207
|
-
{
|
|
208
|
-
"name": "dsTabChange",
|
|
209
|
-
"detail": "string",
|
|
210
|
-
"bubbles": true,
|
|
211
|
-
"cancelable": true,
|
|
212
|
-
"composed": true,
|
|
213
|
-
"description": "Route intent; the application owns navigation."
|
|
214
|
-
}
|
|
215
|
-
],
|
|
216
|
-
"methods": [],
|
|
217
|
-
"slots": [],
|
|
218
|
-
"exports": {
|
|
219
|
-
"customElement": "ds-shell-mobile-section-nav",
|
|
220
|
-
"react": "DsShellMobileSectionNav",
|
|
221
|
-
"angular": "DsShellMobileSectionNav"
|
|
222
|
-
},
|
|
223
|
-
"consumption": {
|
|
224
|
-
"install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
|
|
225
|
-
"cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
|
|
226
|
-
"customElements": {
|
|
227
|
-
"import": "import '@ds-mo/ui/dist/components/ds-shell-mobile-section-nav.js';",
|
|
228
|
-
"example": "<ds-shell-mobile-section-nav></ds-shell-mobile-section-nav>"
|
|
229
|
-
},
|
|
230
|
-
"react": {
|
|
231
|
-
"import": "import { DsShellMobileSectionNav } from '@ds-mo/ui/react';",
|
|
232
|
-
"example": "<DsShellMobileSectionNav />"
|
|
233
|
-
},
|
|
234
|
-
"angular": {
|
|
235
|
-
"import": "import { DsShellMobileSectionNav } from '@ds-mo/ui/angular/ds-shell-mobile-section-nav';",
|
|
236
|
-
"example": "<ds-shell-mobile-section-nav></ds-shell-mobile-section-nav>"
|
|
237
|
-
},
|
|
238
|
-
"complexPropertyNote": "Assign these non-primitive values as JavaScript properties: tabs.",
|
|
239
|
-
"peerDependencies": {
|
|
240
|
-
"required": [
|
|
241
|
-
"@ds-mo/tokens ^3.1.1",
|
|
242
|
-
"@ds-mo/icons ^6.4.0"
|
|
243
|
-
],
|
|
244
|
-
"frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
"dependencies": [
|
|
249
|
-
"@ds-mo/ui",
|
|
250
|
-
"@ds-mo/tokens"
|
|
251
|
-
],
|
|
252
|
-
"registryDependencies": [
|
|
253
|
-
"text"
|
|
254
|
-
],
|
|
255
|
-
"files": [
|
|
256
|
-
{
|
|
257
|
-
"path": "src/wc/components/ShellMobileSectionNav/ShellMobileSectionNav.css",
|
|
258
|
-
"content": "@import '../../utils/focus-ring.css';\n@import '../../utils/interaction-fill.css';\n\n:host {\n display: block;\n min-width: 0;\n background: var(--color-background-primary);\n color: var(--color-foreground-secondary);\n}\n\n.shell-mobile-section-nav {\n min-width: 0;\n min-height: var(--dimension-size-600);\n display: flex;\n align-items: center;\n border-bottom: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n background: var(--color-background-primary);\n}\n\n.shell-mobile-section-nav__scroller {\n width: 100%;\n min-width: 0;\n min-height: var(--dimension-size-600);\n display: flex;\n align-items: center;\n gap: var(--dimension-space-050);\n padding-inline: var(--dimension-space-100);\n overflow-x: auto;\n overflow-y: hidden;\n overscroll-behavior-inline: contain;\n scrollbar-width: none;\n box-sizing: border-box;\n}\n\n.shell-mobile-section-nav__scroller::-webkit-scrollbar {\n display: none;\n}\n\n.shell-mobile-section-nav__tab {\n appearance: none;\n flex: 0 0 auto;\n min-height: var(--dimension-size-400);\n padding-inline: var(--dimension-space-100);\n border: 0;\n border-radius: var(--dimension-radius-100);\n background: transparent;\n color: inherit;\n display: inline-flex;\n align-items: center;\n gap: var(--dimension-space-050);\n cursor: pointer;\n}\n\n.shell-mobile-section-nav__tab--selected {\n color: var(--color-foreground-primary);\n}\n\n.shell-mobile-section-nav__tab:disabled {\n color: var(--color-foreground-tertiary);\n cursor: default;\n}\n\n.shell-mobile-section-nav__divider {\n flex: 0 0 auto;\n width: var(--dimension-stroke-width-012);\n height: var(--dimension-size-300);\n background: var(--color-border-tertiary);\n}\n\n.shell-mobile-section-nav__dot {\n width: var(--dimension-size-075);\n height: var(--dimension-size-075);\n border-radius: var(--dimension-radius-half);\n background: var(--color-background-bold-brand);\n}\n\n.shell-mobile-section-nav__heading {\n display: block;\n min-width: 0;\n padding-inline: var(--dimension-space-200);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n",
|
|
259
|
-
"type": "registry:ui"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
"path": "src/wc/components/ShellMobileSectionNav/ShellMobileSectionNav.tsx",
|
|
263
|
-
"content": "import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n} from '@stencil/core';\nimport type { BarNavTab } from '../BarNav/bar-nav-types';\nimport {\n deriveBarNavValueFromUrl,\n parseJsonArrayProp,\n} from '../BarNav/bar-nav-utils';\nimport { getSelectableTabs, isTabDivider } from '../TabGroup/tab-item-utils';\n\n@Component({\n tag: 'ds-shell-mobile-section-nav',\n styleUrl: 'ShellMobileSectionNav.css',\n scoped: true,\n})\nexport class ShellMobileSectionNav {\n @Element() el!: HTMLElement;\n\n /** Route sections shared with the corresponding desktop BarNav. */\n @Prop() tabs: BarNavTab[] = [];\n /** JSON fallback for `tabs`. */\n @Prop({ attribute: 'tabs-json' }) tabsJson: string = '';\n /** Controlled selected tab when URL-derived selection is unavailable. */\n @Prop() value: string = '';\n /** Active primary-area label shown when the route has no section row. */\n @Prop() heading: string | undefined;\n /** Section base path used to derive the selected route tab. */\n @Prop() basePath: string = '';\n /** Current application route. */\n @Prop() currentUrl: string = '';\n @Prop() navigationLabel: string = 'Section navigation';\n\n /** Route intent; the application owns navigation. */\n @Event() dsTabChange!: EventEmitter<string>;\n\n private lastScrolledValue = '';\n\n private get resolvedTabs(): BarNavTab[] {\n return this.tabsJson\n ? parseJsonArrayProp<BarNavTab>(this.tabsJson, [])\n : (this.tabs ?? []);\n }\n\n private get urlState() {\n return deriveBarNavValueFromUrl(this.currentUrl, this.basePath, this.resolvedTabs);\n }\n\n private get effectiveValue(): string {\n if (this.currentUrl && this.basePath) return this.urlState.value;\n return this.value;\n }\n\n componentDidLoad() {\n this.scrollSelectedIntoView();\n }\n\n componentDidRender() {\n this.scrollSelectedIntoView();\n }\n\n private scrollSelectedIntoView() {\n const selectedValue = this.effectiveValue;\n if (!selectedValue || selectedValue === this.lastScrolledValue) return;\n this.lastScrolledValue = selectedValue;\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(`[data-section-id=\"${CSS.escape(selectedValue)}\"]`)\n ?.scrollIntoView({ block: 'nearest', inline: 'center' });\n });\n }\n\n private selectTab(id: string, isInactive: boolean | undefined) {\n if (isInactive || id === this.effectiveValue) return;\n this.dsTabChange.emit(id);\n }\n\n render() {\n const tabs = this.resolvedTabs;\n const selectableTabs = getSelectableTabs(tabs);\n const showTabs = selectableTabs.length > 0 && !this.urlState.hideTabs;\n\n return (\n <Host>\n <nav class=\"shell-mobile-section-nav\" aria-label={this.navigationLabel}>\n {showTabs ? (\n <div class=\"shell-mobile-section-nav__scroller\">\n {tabs.map((tab, index) => {\n if (isTabDivider(tab)) {\n return (\n <span\n class=\"shell-mobile-section-nav__divider\"\n aria-hidden=\"true\"\n key={`divider-${index}`}\n />\n );\n }\n\n const selected = tab.id === this.effectiveValue;\n return (\n <button\n type=\"button\"\n class={{\n 'shell-mobile-section-nav__tab': true,\n 'shell-mobile-section-nav__tab--selected': selected,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n }}\n data-section-id={tab.id}\n disabled={tab.isInactive}\n aria-current={selected ? 'page' : undefined}\n onClick={() => this.selectTab(tab.id, tab.isInactive)}\n >\n <ds-text\n as=\"span\"\n variant=\"text-body-medium\"\n emphasis={selected}\n color=\"inherit\"\n >\n {tab.label}\n </ds-text>\n {tab.dot && (\n <span class=\"shell-mobile-section-nav__dot\" aria-hidden=\"true\" />\n )}\n </button>\n );\n })}\n </div>\n ) : (\n <ds-text\n class=\"shell-mobile-section-nav__heading\"\n as=\"span\"\n variant=\"text-body-medium\"\n emphasis\n >\n {this.heading ?? ''}\n </ds-text>\n )}\n </nav>\n </Host>\n );\n }\n}\n",
|
|
264
|
-
"type": "registry:ui"
|
|
265
|
-
}
|
|
266
|
-
]
|
|
267
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by the Stencil React Output Target.
|
|
3
|
-
* Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
4
|
-
*/
|
|
5
|
-
import type { EventName, StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
6
|
-
import { type DsShellMobileBarCustomEvent, type ShellMobileBarDestinationDetail } from "@ds-mo/ui";
|
|
7
|
-
import type { Components } from "@ds-mo/ui/dist/components";
|
|
8
|
-
import { DsShellMobileBar as DsShellMobileBarElement } from "@ds-mo/ui/dist/components/ds-shell-mobile-bar.js";
|
|
9
|
-
export type DsShellMobileBarEvents = {
|
|
10
|
-
onDsNavigationToggle: EventName<DsShellMobileBarCustomEvent<boolean>>;
|
|
11
|
-
onDsDestinationChange: EventName<DsShellMobileBarCustomEvent<ShellMobileBarDestinationDetail>>;
|
|
12
|
-
};
|
|
13
|
-
export declare const DsShellMobileBar: StencilReactComponent<DsShellMobileBarElement, DsShellMobileBarEvents, Components.DsShellMobileBar>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { createComponent } from '@stencil/react-output-target/runtime';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { DsShellMobileBar as DsShellMobileBarElement, defineCustomElement as defineDsShellMobileBar } from "@ds-mo/ui/dist/components/ds-shell-mobile-bar.js";
|
|
5
|
-
export const DsShellMobileBar = /*@__PURE__*/ createComponent({
|
|
6
|
-
tagName: 'ds-shell-mobile-bar',
|
|
7
|
-
elementClass: DsShellMobileBarElement,
|
|
8
|
-
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
9
|
-
react: React,
|
|
10
|
-
events: {
|
|
11
|
-
onDsNavigationToggle: 'dsNavigationToggle',
|
|
12
|
-
onDsDestinationChange: 'dsDestinationChange'
|
|
13
|
-
},
|
|
14
|
-
defineCustomElement: defineDsShellMobileBar
|
|
15
|
-
});
|