@buffercreations/levelsui 0.1.4 → 0.1.5
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/01. Elements/navigation/items/navigation-item/docs/README.md +4 -0
- package/01. Elements/navigation/items/navigation-item/src/navigation-item.scss +6 -3
- package/02. Layouts/application/app-shell/docs/README.md +4 -0
- package/02. Layouts/application/app-shell/docs/api.json +20 -1
- package/02. Layouts/application/app-shell/src/app-shell.scss +14 -2
- package/03. Components/navigation/bars/bottom-navigation-bar/bottom-navigation-bar.definition.json +35 -0
- package/03. Components/navigation/bars/bottom-navigation-bar/docs/README.md +9 -0
- package/03. Components/navigation/bars/bottom-navigation-bar/docs/api.json +31 -0
- package/03. Components/navigation/bars/bottom-navigation-bar/examples/index.json +10 -0
- package/03. Components/navigation/bars/bottom-navigation-bar/examples/standard/code.html +9 -0
- package/03. Components/navigation/bars/bottom-navigation-bar/examples/standard/preview.html +9 -0
- package/03. Components/navigation/bars/bottom-navigation-bar/src/bottom-navigation-bar.scss +38 -0
- package/03. Components/navigation/drawers/navigation-drawer/docs/README.md +5 -0
- package/03. Components/navigation/drawers/navigation-drawer/docs/api.json +36 -0
- package/03. Components/navigation/drawers/navigation-drawer/examples/index.json +10 -0
- package/03. Components/navigation/drawers/navigation-drawer/examples/standard/code.html +9 -0
- package/03. Components/navigation/drawers/navigation-drawer/examples/standard/preview.html +9 -0
- package/03. Components/navigation/drawers/navigation-drawer/navigation-drawer.definition.json +36 -0
- package/03. Components/navigation/drawers/navigation-drawer/src/navigation-drawer.scss +25 -0
- package/03. Components/navigation/rails/global-navigation-rail/docs/README.md +11 -0
- package/03. Components/navigation/rails/global-navigation-rail/docs/api.json +51 -0
- package/03. Components/navigation/rails/global-navigation-rail/examples/basic/code.html +21 -0
- package/03. Components/navigation/rails/global-navigation-rail/examples/basic/preview.html +21 -0
- package/03. Components/navigation/rails/global-navigation-rail/examples/horizontal/code.html +21 -0
- package/03. Components/navigation/rails/global-navigation-rail/examples/horizontal/preview.html +21 -0
- package/03. Components/navigation/rails/global-navigation-rail/examples/index.json +17 -0
- package/03. Components/navigation/rails/global-navigation-rail/global-navigation-rail.definition.json +37 -0
- package/03. Components/navigation/rails/global-navigation-rail/src/global-navigation-rail.scss +74 -0
- package/03. Components/navigation/sidebars/floating-contextual-navigation/docs/README.md +41 -0
- package/03. Components/navigation/sidebars/floating-contextual-navigation/docs/api.json +71 -0
- package/03. Components/navigation/sidebars/floating-contextual-navigation/examples/closed/code.html +74 -0
- package/03. Components/navigation/sidebars/floating-contextual-navigation/examples/closed/preview.html +74 -0
- package/03. Components/navigation/sidebars/floating-contextual-navigation/examples/index.json +24 -0
- package/03. Components/navigation/sidebars/floating-contextual-navigation/examples/joined/code.html +74 -0
- package/03. Components/navigation/sidebars/floating-contextual-navigation/examples/joined/preview.html +74 -0
- package/03. Components/navigation/sidebars/floating-contextual-navigation/examples/pinned/code.html +74 -0
- package/03. Components/navigation/sidebars/floating-contextual-navigation/examples/pinned/preview.html +74 -0
- package/03. Components/navigation/sidebars/floating-contextual-navigation/floating-contextual-navigation.definition.json +42 -0
- package/03. Components/navigation/sidebars/floating-contextual-navigation/src/floating-contextual-navigation.js +227 -0
- package/03. Components/navigation/sidebars/floating-contextual-navigation/src/floating-contextual-navigation.scss +85 -0
- package/03. Components/navigation/sidebars/floating-sidebar/docs/README.md +4 -0
- package/03. Components/navigation/sidebars/floating-sidebar/src/floating-sidebar.js +14 -9
- package/03. Components/navigation/sidebars/floating-sidebar/src/floating-sidebar.scss +30 -1
- package/03. Components/navigation/sidebars/responsive-navigation/docs/README.md +25 -0
- package/03. Components/navigation/sidebars/responsive-navigation/docs/api.json +51 -0
- package/03. Components/navigation/sidebars/responsive-navigation/examples/drawer-only/code.html +95 -0
- package/03. Components/navigation/sidebars/responsive-navigation/examples/drawer-only/preview.html +95 -0
- package/03. Components/navigation/sidebars/responsive-navigation/examples/index.json +17 -0
- package/03. Components/navigation/sidebars/responsive-navigation/examples/standard/code.html +95 -0
- package/03. Components/navigation/sidebars/responsive-navigation/examples/standard/preview.html +95 -0
- package/03. Components/navigation/sidebars/responsive-navigation/responsive-navigation.definition.json +37 -0
- package/03. Components/navigation/sidebars/responsive-navigation/src/responsive-navigation.js +152 -0
- package/03. Components/navigation/sidebars/responsive-navigation/src/responsive-navigation.scss +82 -0
- package/dist/catalogue.json +88 -0
- package/dist/components/app-shell.css +10 -2
- package/dist/components/bottom-navigation-bar.css +44 -0
- package/dist/components/floating-contextual-navigation.css +84 -0
- package/dist/components/floating-sidebar.css +27 -1
- package/dist/components/global-navigation-rail.css +75 -0
- package/dist/components/navigation-drawer.css +23 -0
- package/dist/components/navigation-item.css +5 -3
- package/dist/components/responsive-navigation.css +92 -0
- package/package.json +1 -1
|
@@ -50,3 +50,7 @@ All values use existing BufferCore Semantic tokens, typography roles, motion, sp
|
|
|
50
50
|
Each example has a live preview and a distinct focused copyable HTML file. The collapsible previews have a working Studio-only toggle. Container width and label motion use the same Core interaction timing in both directions; the icon keeps a stable position. Preview CSS/JS are not shipped with the Element.
|
|
51
51
|
|
|
52
52
|
The **Interactive states** example provides four clickable Studio-only controls: Default, Hover, Pressed and Current page. These select the visual preview state on one link; no state simulation is included in production Asset CSS or JavaScript. For real navigation, browsers provide hover/pressed and the application sets `aria-current="page"`.
|
|
53
|
+
|
|
54
|
+
## Native buttons in composed navigation
|
|
55
|
+
|
|
56
|
+
Navigation Item may be applied to a native `button` (for example, a Global Navigation Rail Hub selector) as well as a link. The Element resets native button border/appearance to maintain the same dimensions and presentation. Use `aria-pressed="true"` for a selected Hub button; it shares the Element’s current-state colours with `aria-current="page"` links. The parent Component continues to own selection and disclosure behaviour.
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
min-block-size: var(--bce-navigation-item-height);
|
|
21
21
|
align-items: center;
|
|
22
22
|
gap: var(--bce-navigation-item-gap);
|
|
23
|
+
// Native buttons must use precisely the same frame as navigation links.
|
|
24
|
+
border: 0;
|
|
25
|
+
appearance: none;
|
|
23
26
|
padding-inline: var(--bce-navigation-item-padding-inline);
|
|
24
27
|
border-radius: var(--bce-navigation-item-radius);
|
|
25
28
|
background: var(--bce-navigation-item-background);
|
|
@@ -39,7 +42,7 @@
|
|
|
39
42
|
.bce-navigation-item:hover {
|
|
40
43
|
background: var(--bce-navigation-item-hover-background);
|
|
41
44
|
}
|
|
42
|
-
.bce-navigation-item[aria-current="page"] {
|
|
45
|
+
.bce-navigation-item:is([aria-current="page"], [aria-pressed="true"]) {
|
|
43
46
|
background: var(--bce-navigation-item-current-background);
|
|
44
47
|
color: var(--bce-navigation-item-current-colour);
|
|
45
48
|
}
|
|
@@ -101,7 +104,7 @@
|
|
|
101
104
|
|
|
102
105
|
// A single highlight resizes with the rail instead of switching decorations.
|
|
103
106
|
.bce-navigation-item--collapsible:hover,
|
|
104
|
-
.bce-navigation-item--collapsible[aria-current="page"] {
|
|
107
|
+
.bce-navigation-item--collapsible:is([aria-current="page"], [aria-pressed="true"]) {
|
|
105
108
|
background: transparent;
|
|
106
109
|
}
|
|
107
110
|
|
|
@@ -121,7 +124,7 @@
|
|
|
121
124
|
background: var(--bce-navigation-item-hover-background);
|
|
122
125
|
}
|
|
123
126
|
|
|
124
|
-
.bce-navigation-item--collapsible[aria-current="page"]::before {
|
|
127
|
+
.bce-navigation-item--collapsible:is([aria-current="page"], [aria-pressed="true"])::before {
|
|
125
128
|
background: var(--bce-navigation-item-current-background);
|
|
126
129
|
}
|
|
127
130
|
|
|
@@ -62,3 +62,7 @@ Compatible Core Foundations are required; hard-coded Semantic fallback values ha
|
|
|
62
62
|
## Why authored CSS is needed
|
|
63
63
|
|
|
64
64
|
Core utilities provide spacing, colour and typography, but App Shell needs structural grid-track allocation, optional regions, container-based reflow and sticky region positioning. Those rules are specific to this Layout; its contents continue to use Core utilities and their own Component styling. Structural regions permit long unbroken text to wrap so their intrinsic minimum does not widen the document.
|
|
65
|
+
|
|
66
|
+
## Optional bottom application region
|
|
67
|
+
|
|
68
|
+
`<div class="bcl-app-shell__bottom">…</div>` can be placed after `.bcl-app-shell__body` and before `.bcl-app-shell__footer`. This is a content-neutral region for controls such as a horizontal Rail. The Layout never automatically renders, pins, hides or transforms navigation. The consuming navigation Component owns small/medium/large presentation, focus and accessible alternatives. No separate App Shell is necessary.
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"sidebar (optional left)",
|
|
8
8
|
"main (required)",
|
|
9
9
|
"aside (optional right)",
|
|
10
|
+
"bottom (optional application region)",
|
|
10
11
|
"footer (optional)"
|
|
11
12
|
],
|
|
12
13
|
"properties": [
|
|
@@ -46,6 +47,16 @@
|
|
|
46
47
|
"type": "optional data attribute",
|
|
47
48
|
"default": "on",
|
|
48
49
|
"description": "Add data-motion=\"off\" to the App Shell root to disable structural grid-track transitions. Otherwise transitions use Core semantic --bc-motion-expand-* tokens and respect prefers-reduced-motion."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "Global rail preset",
|
|
53
|
+
"type": "CSS modifier class",
|
|
54
|
+
"description": "--left-rail sets the outer left region to Core --bc-size-ui-96; it is a layout width preset only, not a new navigation Component."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "Bottom region",
|
|
58
|
+
"type": "HTML region",
|
|
59
|
+
"description": "Optional .bcl-app-shell__bottom after the body, before the footer. Contents and responsive visibility belong to consuming Components."
|
|
49
60
|
}
|
|
50
61
|
],
|
|
51
62
|
"accessibility": [
|
|
@@ -69,7 +80,8 @@
|
|
|
69
80
|
"Sticky is CSS-only; sticky regions require a non-transparent surface and correct offsets from the consumer.",
|
|
70
81
|
"Custom panel widths greater than the 20rem large preset, or a custom main minimum, may require a consumer-specific container threshold; CSS container query thresholds cannot read custom-property values.",
|
|
71
82
|
"The independent left and right size classes are not representable as a single exclusive sizes/variants selection in the current API schema. They remain documented in properties and markup examples; do not mislabel them as a one-choice size control.",
|
|
72
|
-
"Optional navigation, profile and callout content is owned by separately installed Assets; App Shell only arranges its semantic regions."
|
|
83
|
+
"Optional navigation, profile and callout content is owned by separately installed Assets; App Shell only arranges its semantic regions.",
|
|
84
|
+
"Bottom region is a neutral layout slot, not an automatic mobile navigation conversion."
|
|
73
85
|
],
|
|
74
86
|
"anatomyContract": [
|
|
75
87
|
{
|
|
@@ -120,6 +132,13 @@
|
|
|
120
132
|
"required": false,
|
|
121
133
|
"repeatable": false,
|
|
122
134
|
"description": "Optional application footer."
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "bottom",
|
|
138
|
+
"selector": ".bcl-app-shell__bottom",
|
|
139
|
+
"required": false,
|
|
140
|
+
"repeatable": false,
|
|
141
|
+
"description": "Optional neutral region after the body and before the footer; presentation behaviour remains consumer-owned."
|
|
123
142
|
}
|
|
124
143
|
]
|
|
125
144
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
container: bcl-app-shell / inline-size;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
:where(.bcl-app-shell__header, .bcl-app-shell__footer, .bcl-app-shell__body, .bcl-app-shell__sidebar, .bcl-app-shell__aside, .bcl-app-shell__main) {
|
|
18
|
+
:where(.bcl-app-shell__header, .bcl-app-shell__footer, .bcl-app-shell__body, .bcl-app-shell__sidebar, .bcl-app-shell__aside, .bcl-app-shell__main, .bcl-app-shell__bottom) {
|
|
19
19
|
min-inline-size: 0;
|
|
20
20
|
// Long unbroken content must not force a structural region wider than its track.
|
|
21
21
|
overflow-wrap: anywhere;
|
|
@@ -54,6 +54,11 @@
|
|
|
54
54
|
grid-template-columns: minmax(0, var(--bcl-app-shell-left-track)) minmax(var(--bcl-app-shell-main-min), 1fr) minmax(0, var(--bcl-app-shell-right-track));
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
// Compact persistent navigation rail; content and behaviour remain consumer-owned.
|
|
58
|
+
:where(.bcl-app-shell--left-rail) {
|
|
59
|
+
--bcl-app-shell-left-width: var(--bc-size-ui-96);
|
|
60
|
+
}
|
|
61
|
+
|
|
57
62
|
:where(.bcl-app-shell--left-sm) {
|
|
58
63
|
--bcl-app-shell-left-width: var(--bc-size-ui-192);
|
|
59
64
|
}
|
|
@@ -108,7 +113,7 @@
|
|
|
108
113
|
:where(.bcl-app-shell__body) {
|
|
109
114
|
grid-template-columns: minmax(0, 1fr);
|
|
110
115
|
}
|
|
111
|
-
:where(.bcl-app-shell__sidebar, .bcl-app-shell__aside, .bcl-app-shell__main) {
|
|
116
|
+
:where(.bcl-app-shell__sidebar, .bcl-app-shell__aside, .bcl-app-shell__main, .bcl-app-shell__bottom) {
|
|
112
117
|
grid-column: 1;
|
|
113
118
|
}
|
|
114
119
|
:where(.bcl-app-shell--sticky-left > .bcl-app-shell__body > .bcl-app-shell__sidebar, .bcl-app-shell--sticky-right > .bcl-app-shell__body > .bcl-app-shell__aside) {
|
|
@@ -117,3 +122,10 @@
|
|
|
117
122
|
overflow: visible;
|
|
118
123
|
}
|
|
119
124
|
}
|
|
125
|
+
|
|
126
|
+
// Optional application region for consumers that place controls beneath the body.
|
|
127
|
+
// Its contents, visibility, sticky behaviour and responsive mode are independent.
|
|
128
|
+
:where(.bcl-app-shell__bottom) {
|
|
129
|
+
flex: none;
|
|
130
|
+
min-inline-size: 0;
|
|
131
|
+
}
|
package/03. Components/navigation/bars/bottom-navigation-bar/bottom-navigation-bar.definition.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"kind": "authored",
|
|
4
|
+
"id": "bottom-navigation-bar",
|
|
5
|
+
"displayName": "Bottom Navigation Bar",
|
|
6
|
+
"description": "Touch-first primary navigation using Navigation Menu and Navigation Item.",
|
|
7
|
+
"level": "components",
|
|
8
|
+
"category": [
|
|
9
|
+
"navigation",
|
|
10
|
+
"bars"
|
|
11
|
+
],
|
|
12
|
+
"className": "bcc-bottom-navigation-bar",
|
|
13
|
+
"source": {
|
|
14
|
+
"scss": "03. Components/navigation/bars/bottom-navigation-bar/src/bottom-navigation-bar.scss",
|
|
15
|
+
"css": "dist/components/bottom-navigation-bar.css"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"css": [
|
|
19
|
+
"foundations"
|
|
20
|
+
],
|
|
21
|
+
"components": [
|
|
22
|
+
"navigation-menu"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"documentation": {
|
|
26
|
+
"guide": "docs/README.md",
|
|
27
|
+
"api": "docs/api.json",
|
|
28
|
+
"examples": "examples/index.json"
|
|
29
|
+
},
|
|
30
|
+
"customisation": {
|
|
31
|
+
"variables": [
|
|
32
|
+
"--bcc-bottom-navigation-bar-surface"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Bottom Navigation Bar
|
|
2
|
+
|
|
3
|
+
A touch-first primary navigation bar for a small number of destinations, composed from existing Navigation Menu and Navigation Item Assets. It does not manage routing or screen-size changes itself. Use `aria-current="page"` for actual links; when controlling contextual Hubs, use buttons with `aria-pressed`.
|
|
4
|
+
|
|
5
|
+
Use the Responsive Navigation composition to select this presentation automatically, or use the Asset independently. More than five primary destinations should normally use a drawer or another navigation pattern rather than compressing labels.
|
|
6
|
+
|
|
7
|
+
## Ownership
|
|
8
|
+
|
|
9
|
+
This Asset owns bar geometry and touch-safe layout. Navigation Item owns button/link appearance and selected states. BufferCore Semantics supply all design values. No Primitive tokens or custom JavaScript are required.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"variants": [
|
|
3
|
+
{
|
|
4
|
+
"id": "standard",
|
|
5
|
+
"className": "bcc-bottom-navigation-bar",
|
|
6
|
+
"default": true
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"anatomy": [
|
|
10
|
+
"root",
|
|
11
|
+
"Navigation Menu",
|
|
12
|
+
"Navigation Item links or buttons"
|
|
13
|
+
],
|
|
14
|
+
"properties": [
|
|
15
|
+
{
|
|
16
|
+
"name": "Surface",
|
|
17
|
+
"type": "CSS variable",
|
|
18
|
+
"description": "--bcc-bottom-navigation-bar-surface"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"accessibility": [
|
|
22
|
+
"Use a labelled nav landmark.",
|
|
23
|
+
"Keep destinations identifiable with visible labels.",
|
|
24
|
+
"Do not rely on hover; use links or buttons."
|
|
25
|
+
],
|
|
26
|
+
"tags": [
|
|
27
|
+
"navigation",
|
|
28
|
+
"mobile",
|
|
29
|
+
"bottom bar"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<nav class="bcc-bottom-navigation-bar" aria-label="Primary navigation">
|
|
2
|
+
<div class="bcc-navigation-menu">
|
|
3
|
+
<ul class="bcc-navigation-menu__list">
|
|
4
|
+
<li class="bcc-navigation-menu__item"><a class="bce-navigation-item" href="#home" aria-current="page"><span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:home-01"></iconify-icon></span><span class="bce-navigation-item__label">Home</span></a></li>
|
|
5
|
+
<li class="bcc-navigation-menu__item"><a class="bce-navigation-item" href="#projects"><span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:folder-01"></iconify-icon></span><span class="bce-navigation-item__label">Projects</span></a></li>
|
|
6
|
+
<li class="bcc-navigation-menu__item"><a class="bce-navigation-item" href="#settings"><span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:settings-01"></iconify-icon></span><span class="bce-navigation-item__label">Settings</span></a></li>
|
|
7
|
+
</ul>
|
|
8
|
+
</div>
|
|
9
|
+
</nav>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<nav class="bcc-bottom-navigation-bar" aria-label="Primary navigation">
|
|
2
|
+
<div class="bcc-navigation-menu">
|
|
3
|
+
<ul class="bcc-navigation-menu__list">
|
|
4
|
+
<li class="bcc-navigation-menu__item"><a class="bce-navigation-item" href="#home" aria-current="page"><span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:home-01"></iconify-icon></span><span class="bce-navigation-item__label">Home</span></a></li>
|
|
5
|
+
<li class="bcc-navigation-menu__item"><a class="bce-navigation-item" href="#projects"><span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:folder-01"></iconify-icon></span><span class="bce-navigation-item__label">Projects</span></a></li>
|
|
6
|
+
<li class="bcc-navigation-menu__item"><a class="bce-navigation-item" href="#settings"><span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:settings-01"></iconify-icon></span><span class="bce-navigation-item__label">Settings</span></a></li>
|
|
7
|
+
</ul>
|
|
8
|
+
</div>
|
|
9
|
+
</nav>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Bottom Navigation Bar — Level 03 / Components.
|
|
2
|
+
// Navigation Menu and Navigation Item own navigation semantics and controls.
|
|
3
|
+
.bcc-bottom-navigation-bar {
|
|
4
|
+
--bcc-bottom-navigation-bar-surface: var(--bc-color-canvas-secondary);
|
|
5
|
+
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: stretch;
|
|
8
|
+
inline-size: 100%;
|
|
9
|
+
padding-block: var(--bc-fluid-2xs);
|
|
10
|
+
padding-inline: var(--bc-fluid-2xs);
|
|
11
|
+
padding-block-end: max(var(--bc-fluid-2xs), env(safe-area-inset-bottom));
|
|
12
|
+
background: var(--bcc-bottom-navigation-bar-surface);
|
|
13
|
+
border-block-start: var(--bc-border-width-xs) solid var(--bc-color-border-neutral);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.bcc-bottom-navigation-bar > .bcc-navigation-menu { inline-size: 100%; }
|
|
17
|
+
.bcc-bottom-navigation-bar .bcc-navigation-menu__list {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: stretch;
|
|
20
|
+
justify-content: space-around;
|
|
21
|
+
gap: var(--bc-fluid-2xs);
|
|
22
|
+
}
|
|
23
|
+
.bcc-bottom-navigation-bar .bcc-navigation-menu__item { flex: 1 1 0; min-inline-size: 0; }
|
|
24
|
+
.bcc-bottom-navigation-bar .bce-navigation-item {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
inline-size: 100%;
|
|
30
|
+
min-block-size: var(--bc-size-ui-48);
|
|
31
|
+
gap: var(--bc-fluid-3xs);
|
|
32
|
+
}
|
|
33
|
+
.bcc-bottom-navigation-bar .bce-navigation-item__label {
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
text-overflow: ellipsis;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
max-inline-size: 100%;
|
|
38
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Navigation Drawer
|
|
2
|
+
|
|
3
|
+
A reusable navigation surface, not a second navigation-item implementation. Compose it with an external trigger and BufferCore `createDisclosure`, `registerDismissal` and (when modal) focus/scroll Behaviours. The surface itself contains standard Navigation Menu and Navigation Item markup.
|
|
4
|
+
|
|
5
|
+
The Responsive Navigation composition supplies a trigger, coordinates drawer visibility, keyboard focus and open/close state, and switches between desktop and mobile presentation. The Drawer Asset stays presentation-only for use in other contexts.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"variants": [
|
|
3
|
+
{
|
|
4
|
+
"id": "standard",
|
|
5
|
+
"className": "bcc-navigation-drawer",
|
|
6
|
+
"default": true
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"anatomy": [
|
|
10
|
+
"drawer root",
|
|
11
|
+
"header (optional)",
|
|
12
|
+
"Navigation Menu"
|
|
13
|
+
],
|
|
14
|
+
"properties": [
|
|
15
|
+
{
|
|
16
|
+
"name": "Width",
|
|
17
|
+
"type": "CSS variable",
|
|
18
|
+
"description": "--bcc-navigation-drawer-width"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "Surface",
|
|
22
|
+
"type": "CSS variable",
|
|
23
|
+
"description": "--bcc-navigation-drawer-surface"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"accessibility": [
|
|
27
|
+
"The consumer must provide a labelled trigger and appropriate disclosure behaviour.",
|
|
28
|
+
"Use semantic navigation links inside.",
|
|
29
|
+
"Provide a close mechanism for modal or overlay use."
|
|
30
|
+
],
|
|
31
|
+
"tags": [
|
|
32
|
+
"navigation",
|
|
33
|
+
"mobile",
|
|
34
|
+
"drawer"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "standard",
|
|
4
|
+
"title": "Navigation drawer surface",
|
|
5
|
+
"description": "Drawer content; controller and trigger are supplied by the host.",
|
|
6
|
+
"preview": "examples/standard/preview.html",
|
|
7
|
+
"code": "examples/standard/code.html",
|
|
8
|
+
"isBase": true
|
|
9
|
+
}
|
|
10
|
+
]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<aside class="bcc-navigation-drawer" aria-label="Workspace navigation">
|
|
2
|
+
<div class="bcc-navigation-drawer__header"><strong>Workspace</strong></div>
|
|
3
|
+
<nav class="bcc-navigation-menu" aria-label="Workspace pages">
|
|
4
|
+
<ul class="bcc-navigation-menu__list">
|
|
5
|
+
<li class="bcc-navigation-menu__item"><a class="bce-navigation-item" href="#overview"><span class="bce-navigation-item__label">Overview</span></a></li>
|
|
6
|
+
<li class="bcc-navigation-menu__item"><a class="bce-navigation-item" href="#projects"><span class="bce-navigation-item__label">Projects</span></a></li>
|
|
7
|
+
</ul>
|
|
8
|
+
</nav>
|
|
9
|
+
</aside>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<aside class="bcc-navigation-drawer" aria-label="Workspace navigation">
|
|
2
|
+
<div class="bcc-navigation-drawer__header"><strong>Workspace</strong></div>
|
|
3
|
+
<nav class="bcc-navigation-menu" aria-label="Workspace pages">
|
|
4
|
+
<ul class="bcc-navigation-menu__list">
|
|
5
|
+
<li class="bcc-navigation-menu__item"><a class="bce-navigation-item" href="#overview"><span class="bce-navigation-item__label">Overview</span></a></li>
|
|
6
|
+
<li class="bcc-navigation-menu__item"><a class="bce-navigation-item" href="#projects"><span class="bce-navigation-item__label">Projects</span></a></li>
|
|
7
|
+
</ul>
|
|
8
|
+
</nav>
|
|
9
|
+
</aside>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"kind": "authored",
|
|
4
|
+
"id": "navigation-drawer",
|
|
5
|
+
"displayName": "Navigation Drawer",
|
|
6
|
+
"description": "Dismissible navigation surface composed from Navigation Menu and Navigation Item.",
|
|
7
|
+
"level": "components",
|
|
8
|
+
"category": [
|
|
9
|
+
"navigation",
|
|
10
|
+
"drawers"
|
|
11
|
+
],
|
|
12
|
+
"className": "bcc-navigation-drawer",
|
|
13
|
+
"source": {
|
|
14
|
+
"scss": "03. Components/navigation/drawers/navigation-drawer/src/navigation-drawer.scss",
|
|
15
|
+
"css": "dist/components/navigation-drawer.css"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"css": [
|
|
19
|
+
"foundations"
|
|
20
|
+
],
|
|
21
|
+
"components": [
|
|
22
|
+
"navigation-menu"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"documentation": {
|
|
26
|
+
"guide": "docs/README.md",
|
|
27
|
+
"api": "docs/api.json",
|
|
28
|
+
"examples": "examples/index.json"
|
|
29
|
+
},
|
|
30
|
+
"customisation": {
|
|
31
|
+
"variables": [
|
|
32
|
+
"--bcc-navigation-drawer-width",
|
|
33
|
+
"--bcc-navigation-drawer-surface"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Navigation Drawer — Level 03 / Components.
|
|
2
|
+
// Visibility, focus and Escape are owned by the composing disclosure controller.
|
|
3
|
+
.bcc-navigation-drawer {
|
|
4
|
+
--bcc-navigation-drawer-width: var(--bc-size-ui-256);
|
|
5
|
+
--bcc-navigation-drawer-surface: var(--bcc-floating-sidebar-surface, var(--bc-color-canvas-secondary));
|
|
6
|
+
--bcc-navigation-drawer-radius: var(--bcc-floating-sidebar-radius, var(--bc-radius-lg));
|
|
7
|
+
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
inline-size: min(var(--bcc-navigation-drawer-width), 100%);
|
|
10
|
+
max-block-size: 100%;
|
|
11
|
+
overflow-y: auto;
|
|
12
|
+
overscroll-behavior: contain;
|
|
13
|
+
padding: var(--bc-fluid-sm);
|
|
14
|
+
background: var(--bcc-navigation-drawer-surface);
|
|
15
|
+
border: var(--bc-border-width-xs) solid var(--bc-color-border-neutral);
|
|
16
|
+
border-radius: var(--bcc-navigation-drawer-radius);
|
|
17
|
+
box-shadow: var(--bc-shadow-context-floating);
|
|
18
|
+
}
|
|
19
|
+
.bcc-navigation-drawer__header {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
gap: var(--bc-fluid-2xs);
|
|
24
|
+
margin-block-end: var(--bc-fluid-sm);
|
|
25
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Global Navigation Rail
|
|
2
|
+
|
|
3
|
+
Persistent global icon navigation, composed from Navigation Menu and Navigation Item. The rail owns only its geometry and canvas styling; it contains no JavaScript and no duplicate link styling.
|
|
4
|
+
|
|
5
|
+
The rail can be used independently. Use Floating Contextual Navigation when a fully hideable secondary sidebar is also needed. Hub names, routes and application state belong to the consuming application.
|
|
6
|
+
|
|
7
|
+
Use `--bcc-global-navigation-rail-width` for a project-specific size; the default uses BufferCore sizing and semantic canvas tokens.
|
|
8
|
+
|
|
9
|
+
## Orientation
|
|
10
|
+
|
|
11
|
+
The same Global Navigation Rail supports vertical (default) and horizontal (`data-orientation="horizontal"`) presentation. The horizontal orientation preserves Navigation Menu and Navigation Item; do not create a second bottom-rail skin. Position (bottom, header or inline) belongs to the parent Layout or composition. Touch and keyboard controls must remain reachable at every size; hover is never required.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"variants": [
|
|
3
|
+
{
|
|
4
|
+
"id": "standard",
|
|
5
|
+
"className": "bcc-global-navigation-rail",
|
|
6
|
+
"default": true
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"id": "horizontal",
|
|
10
|
+
"className": "bcc-global-navigation-rail",
|
|
11
|
+
"attribute": "data-orientation=\"horizontal\""
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "horizontal",
|
|
15
|
+
"className": "bcc-global-navigation-rail",
|
|
16
|
+
"attribute": "data-orientation=\"horizontal\""
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"anatomy": [
|
|
20
|
+
"root (required)",
|
|
21
|
+
"navigation menu (required)",
|
|
22
|
+
"footer (optional)"
|
|
23
|
+
],
|
|
24
|
+
"properties": [
|
|
25
|
+
{
|
|
26
|
+
"name": "Width",
|
|
27
|
+
"type": "CSS custom property",
|
|
28
|
+
"description": "--bcc-global-navigation-rail-width defaults to a BufferCore sizing token."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "Orientation",
|
|
32
|
+
"type": "data-orientation",
|
|
33
|
+
"description": "vertical (default) or horizontal; position remains composition-owned."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "Orientation",
|
|
37
|
+
"type": "data-orientation",
|
|
38
|
+
"description": "vertical (default) or horizontal; position remains composition-owned."
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"accessibility": [
|
|
42
|
+
"Use a labelled navigation region and accessible labels for icon-only links.",
|
|
43
|
+
"Native links indicate the current page with aria-current=\"page\"."
|
|
44
|
+
],
|
|
45
|
+
"tags": [
|
|
46
|
+
"navigation",
|
|
47
|
+
"rail",
|
|
48
|
+
"hubs",
|
|
49
|
+
"icons"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<aside class="bcc-global-navigation-rail" aria-label="Global application navigation">
|
|
2
|
+
<nav class="bcc-navigation-menu" aria-label="Hubs">
|
|
3
|
+
<ul class="bcc-navigation-menu__list">
|
|
4
|
+
<li class="bcc-navigation-menu__item">
|
|
5
|
+
<a class="bce-navigation-item bce-navigation-item--icon-only" href="#home" aria-label="Home">
|
|
6
|
+
<span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:home-01"></iconify-icon></span>
|
|
7
|
+
</a>
|
|
8
|
+
</li>
|
|
9
|
+
<li class="bcc-navigation-menu__item">
|
|
10
|
+
<a class="bce-navigation-item bce-navigation-item--icon-only" href="#clients" aria-label="Clients" aria-current="page">
|
|
11
|
+
<span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:user-group"></iconify-icon></span>
|
|
12
|
+
</a>
|
|
13
|
+
</li>
|
|
14
|
+
<li class="bcc-navigation-menu__item">
|
|
15
|
+
<a class="bce-navigation-item bce-navigation-item--icon-only" href="#creative" aria-label="Creative">
|
|
16
|
+
<span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:folder-01"></iconify-icon></span>
|
|
17
|
+
</a>
|
|
18
|
+
</li>
|
|
19
|
+
</ul>
|
|
20
|
+
</nav>
|
|
21
|
+
</aside>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<aside class="bcc-global-navigation-rail" aria-label="Global application navigation">
|
|
2
|
+
<nav class="bcc-navigation-menu" aria-label="Hubs">
|
|
3
|
+
<ul class="bcc-navigation-menu__list">
|
|
4
|
+
<li class="bcc-navigation-menu__item">
|
|
5
|
+
<a class="bce-navigation-item bce-navigation-item--icon-only" href="#home" aria-label="Home">
|
|
6
|
+
<span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:home-01"></iconify-icon></span>
|
|
7
|
+
</a>
|
|
8
|
+
</li>
|
|
9
|
+
<li class="bcc-navigation-menu__item">
|
|
10
|
+
<a class="bce-navigation-item bce-navigation-item--icon-only" href="#clients" aria-label="Clients" aria-current="page">
|
|
11
|
+
<span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:user-group"></iconify-icon></span>
|
|
12
|
+
</a>
|
|
13
|
+
</li>
|
|
14
|
+
<li class="bcc-navigation-menu__item">
|
|
15
|
+
<a class="bce-navigation-item bce-navigation-item--icon-only" href="#creative" aria-label="Creative">
|
|
16
|
+
<span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:folder-01"></iconify-icon></span>
|
|
17
|
+
</a>
|
|
18
|
+
</li>
|
|
19
|
+
</ul>
|
|
20
|
+
</nav>
|
|
21
|
+
</aside>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<aside class="bcc-global-navigation-rail" data-orientation="horizontal" aria-label="Global application navigation">
|
|
2
|
+
<nav class="bcc-navigation-menu" aria-label="Hubs">
|
|
3
|
+
<ul class="bcc-navigation-menu__list">
|
|
4
|
+
<li class="bcc-navigation-menu__item">
|
|
5
|
+
<a class="bce-navigation-item bce-navigation-item--icon-only" href="#home" aria-label="Home">
|
|
6
|
+
<span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:home-01"></iconify-icon></span>
|
|
7
|
+
</a>
|
|
8
|
+
</li>
|
|
9
|
+
<li class="bcc-navigation-menu__item">
|
|
10
|
+
<a class="bce-navigation-item bce-navigation-item--icon-only" href="#clients" aria-label="Clients" aria-current="page">
|
|
11
|
+
<span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:user-group"></iconify-icon></span>
|
|
12
|
+
</a>
|
|
13
|
+
</li>
|
|
14
|
+
<li class="bcc-navigation-menu__item">
|
|
15
|
+
<a class="bce-navigation-item bce-navigation-item--icon-only" href="#creative" aria-label="Creative">
|
|
16
|
+
<span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:folder-01"></iconify-icon></span>
|
|
17
|
+
</a>
|
|
18
|
+
</li>
|
|
19
|
+
</ul>
|
|
20
|
+
</nav>
|
|
21
|
+
</aside>
|
package/03. Components/navigation/rails/global-navigation-rail/examples/horizontal/preview.html
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<aside class="bcc-global-navigation-rail" data-orientation="horizontal" aria-label="Global application navigation">
|
|
2
|
+
<nav class="bcc-navigation-menu" aria-label="Hubs">
|
|
3
|
+
<ul class="bcc-navigation-menu__list">
|
|
4
|
+
<li class="bcc-navigation-menu__item">
|
|
5
|
+
<a class="bce-navigation-item bce-navigation-item--icon-only" href="#home" aria-label="Home">
|
|
6
|
+
<span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:home-01"></iconify-icon></span>
|
|
7
|
+
</a>
|
|
8
|
+
</li>
|
|
9
|
+
<li class="bcc-navigation-menu__item">
|
|
10
|
+
<a class="bce-navigation-item bce-navigation-item--icon-only" href="#clients" aria-label="Clients" aria-current="page">
|
|
11
|
+
<span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:user-group"></iconify-icon></span>
|
|
12
|
+
</a>
|
|
13
|
+
</li>
|
|
14
|
+
<li class="bcc-navigation-menu__item">
|
|
15
|
+
<a class="bce-navigation-item bce-navigation-item--icon-only" href="#creative" aria-label="Creative">
|
|
16
|
+
<span class="bce-navigation-item__icon" aria-hidden="true"><iconify-icon icon="hugeicons:folder-01"></iconify-icon></span>
|
|
17
|
+
</a>
|
|
18
|
+
</li>
|
|
19
|
+
</ul>
|
|
20
|
+
</nav>
|
|
21
|
+
</aside>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "basic",
|
|
4
|
+
"title": "Icon-first global rail",
|
|
5
|
+
"description": "A persistent global rail, independently usable without contextual navigation.",
|
|
6
|
+
"preview": "examples/basic/preview.html",
|
|
7
|
+
"code": "examples/basic/code.html",
|
|
8
|
+
"isBase": true
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "horizontal",
|
|
12
|
+
"title": "Horizontal",
|
|
13
|
+
"description": "Horizontal Rail using the existing Navigation Menu and Items.",
|
|
14
|
+
"code": "examples/horizontal/code.html",
|
|
15
|
+
"preview": "examples/horizontal/preview.html"
|
|
16
|
+
}
|
|
17
|
+
]
|