@material/web 2.5.1-nightly.cbd34a8.0 → 2.5.1-nightly.de5470f.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/custom-elements.json +8248 -1222
- package/labs/aria/buttons/keyboard_click_handler.d.ts +25 -0
- package/labs/aria/buttons/keyboard_click_handler.js +74 -0
- package/labs/aria/buttons/keyboard_click_handler.js.map +1 -0
- package/labs/aria/buttons/md-aria-toggle.d.ts +29 -0
- package/labs/aria/buttons/md-aria-toggle.js +67 -0
- package/labs/aria/buttons/md-aria-toggle.js.map +1 -0
- package/labs/aria/buttons/toggle.d.ts +40 -0
- package/labs/aria/buttons/toggle.js +100 -0
- package/labs/aria/buttons/toggle.js.map +1 -0
- package/labs/aria/menu/md-aria-menubar.d.ts +11 -0
- package/labs/aria/menu/md-aria-menubar.js +8 -0
- package/labs/aria/menu/md-aria-menubar.js.map +1 -0
- package/labs/aria/menu/menubar.d.ts +15 -0
- package/labs/aria/menu/menubar.js +45 -0
- package/labs/aria/menu/menubar.js.map +1 -0
- package/labs/aria/menu/menulist.d.ts +2 -2
- package/labs/aria/menu/menulist.js +6 -4
- package/labs/aria/menu/menulist.js.map +1 -1
- package/labs/aria/pseudo-classes.d.ts +19 -0
- package/labs/aria/pseudo-classes.js +22 -0
- package/labs/aria/pseudo-classes.js.map +1 -0
- package/labs/gb/components/all.d.ts +72 -0
- package/labs/gb/components/all.js +81 -0
- package/labs/gb/components/all.js.map +1 -0
- package/labs/gb/components/button/button-element.d.ts +1 -9
- package/labs/gb/components/button/button-element.js +6 -65
- package/labs/gb/components/button/button-element.js.map +1 -1
- package/labs/gb/components/button/button.css +1 -1
- package/labs/gb/components/button/button.css.map +1 -1
- package/labs/gb/components/button/button.cssresult.js +1 -1
- package/labs/gb/components/button/button.cssresult.js.map +1 -1
- package/labs/gb/components/button/button.scss +10 -3
- package/labs/gb/components/buttongroup/_button-group-tokens.scss +123 -0
- package/labs/gb/components/buttongroup/button-group-element.d.ts +65 -0
- package/labs/gb/components/buttongroup/button-group-element.js +277 -0
- package/labs/gb/components/buttongroup/button-group-element.js.map +1 -0
- package/labs/gb/components/buttongroup/button-group.css +5 -0
- package/labs/gb/components/buttongroup/button-group.css.map +1 -0
- package/labs/gb/components/buttongroup/button-group.cssresult.d.ts +3 -0
- package/labs/gb/components/buttongroup/button-group.cssresult.js +15 -0
- package/labs/gb/components/buttongroup/button-group.cssresult.js.map +1 -0
- package/labs/gb/components/buttongroup/button-group.d.ts +96 -0
- package/labs/gb/components/buttongroup/button-group.js +105 -0
- package/labs/gb/components/buttongroup/button-group.js.map +1 -0
- package/labs/gb/components/buttongroup/button-group.scss +282 -0
- package/labs/gb/components/buttongroup/md-gb-button-group.d.ts +12 -0
- package/labs/gb/components/buttongroup/md-gb-button-group.js +8 -0
- package/labs/gb/components/buttongroup/md-gb-button-group.js.map +1 -0
- package/labs/gb/components/card/card-element.d.ts +1 -9
- package/labs/gb/components/card/card-element.js +4 -59
- package/labs/gb/components/card/card-element.js.map +1 -1
- package/labs/gb/components/card/card.css +1 -1
- package/labs/gb/components/card/card.css.map +1 -1
- package/labs/gb/components/card/card.cssresult.js +1 -1
- package/labs/gb/components/card/card.cssresult.js.map +1 -1
- package/labs/gb/components/card/card.scss +18 -5
- package/labs/gb/components/checkbox/checkbox.css +1 -1
- package/labs/gb/components/checkbox/checkbox.css.map +1 -1
- package/labs/gb/components/checkbox/checkbox.cssresult.js +1 -1
- package/labs/gb/components/checkbox/checkbox.cssresult.js.map +1 -1
- package/labs/gb/components/checkbox/checkbox.scss +1 -0
- package/labs/gb/components/chip/chip.css +1 -1
- package/labs/gb/components/chip/chip.css.map +1 -1
- package/labs/gb/components/chip/chip.cssresult.js +1 -1
- package/labs/gb/components/chip/chip.cssresult.js.map +1 -1
- package/labs/gb/components/chip/chip.scss +1 -0
- package/labs/gb/components/iconbutton/icon-button-element.js +1 -1
- package/labs/gb/components/iconbutton/icon-button-element.js.map +1 -1
- package/labs/gb/components/iconbutton/icon-button.css +1 -1
- package/labs/gb/components/iconbutton/icon-button.css.map +1 -1
- package/labs/gb/components/iconbutton/icon-button.cssresult.js +1 -1
- package/labs/gb/components/iconbutton/icon-button.cssresult.js.map +1 -1
- package/labs/gb/components/iconbutton/icon-button.scss +6 -3
- package/labs/gb/components/list/list.css +1 -1
- package/labs/gb/components/list/list.css.map +1 -1
- package/labs/gb/components/list/list.cssresult.js +1 -1
- package/labs/gb/components/list/list.cssresult.js.map +1 -1
- package/labs/gb/components/list/list.scss +1 -0
- package/labs/gb/components/menu/menu.css +1 -1
- package/labs/gb/components/menu/menu.css.map +1 -1
- package/labs/gb/components/menu/menu.cssresult.js +1 -1
- package/labs/gb/components/menu/menu.cssresult.js.map +1 -1
- package/labs/gb/components/menu/menu.scss +1 -0
- package/labs/gb/components/navbar/_nav-bar-tokens.scss +53 -0
- package/labs/gb/components/navbar/md-gb-nav-bar-item.d.ts +12 -0
- package/labs/gb/components/navbar/md-gb-nav-bar-item.js +10 -0
- package/labs/gb/components/navbar/md-gb-nav-bar-item.js.map +1 -0
- package/labs/gb/components/navbar/md-gb-nav-bar.d.ts +12 -0
- package/labs/gb/components/navbar/md-gb-nav-bar.js +10 -0
- package/labs/gb/components/navbar/md-gb-nav-bar.js.map +1 -0
- package/labs/gb/components/navbar/nav-bar-element.d.ts +58 -0
- package/labs/gb/components/navbar/nav-bar-element.js +116 -0
- package/labs/gb/components/navbar/nav-bar-element.js.map +1 -0
- package/labs/gb/components/navbar/nav-bar-item-element.d.ts +41 -0
- package/labs/gb/components/navbar/nav-bar-item-element.js +146 -0
- package/labs/gb/components/navbar/nav-bar-item-element.js.map +1 -0
- package/labs/gb/components/navbar/nav-bar.css +4 -0
- package/labs/gb/components/navbar/nav-bar.css.map +1 -0
- package/labs/gb/components/navbar/nav-bar.cssresult.d.ts +3 -0
- package/labs/gb/components/navbar/nav-bar.cssresult.js +14 -0
- package/labs/gb/components/navbar/nav-bar.cssresult.js.map +1 -0
- package/labs/gb/components/navbar/nav-bar.d.ts +86 -0
- package/labs/gb/components/navbar/nav-bar.js +92 -0
- package/labs/gb/components/navbar/nav-bar.js.map +1 -0
- package/labs/gb/components/navbar/nav-bar.scss +296 -0
- package/labs/gb/components/navrail/_nav-rail-tokens.scss +123 -0
- package/labs/gb/components/navrail/md-gb-nav-rail-item.d.ts +12 -0
- package/labs/gb/components/navrail/md-gb-nav-rail-item.js +10 -0
- package/labs/gb/components/navrail/md-gb-nav-rail-item.js.map +1 -0
- package/labs/gb/components/navrail/md-gb-nav-rail.d.ts +12 -0
- package/labs/gb/components/navrail/md-gb-nav-rail.js +10 -0
- package/labs/gb/components/navrail/md-gb-nav-rail.js.map +1 -0
- package/labs/gb/components/navrail/nav-rail-element.d.ts +120 -0
- package/labs/gb/components/navrail/nav-rail-element.js +366 -0
- package/labs/gb/components/navrail/nav-rail-element.js.map +1 -0
- package/labs/gb/components/navrail/nav-rail-item-element.d.ts +44 -0
- package/labs/gb/components/navrail/nav-rail-item-element.js +178 -0
- package/labs/gb/components/navrail/nav-rail-item-element.js.map +1 -0
- package/labs/gb/components/navrail/nav-rail.css +4 -0
- package/labs/gb/components/navrail/nav-rail.css.map +1 -0
- package/labs/gb/components/navrail/nav-rail.cssresult.d.ts +3 -0
- package/labs/gb/components/navrail/nav-rail.cssresult.js +14 -0
- package/labs/gb/components/navrail/nav-rail.cssresult.js.map +1 -0
- package/labs/gb/components/navrail/nav-rail.d.ts +108 -0
- package/labs/gb/components/navrail/nav-rail.js +115 -0
- package/labs/gb/components/navrail/nav-rail.js.map +1 -0
- package/labs/gb/components/navrail/nav-rail.scss +419 -0
- package/labs/gb/components/radio/radio.css +1 -1
- package/labs/gb/components/radio/radio.css.map +1 -1
- package/labs/gb/components/radio/radio.cssresult.js +1 -1
- package/labs/gb/components/radio/radio.cssresult.js.map +1 -1
- package/labs/gb/components/radio/radio.scss +1 -0
- package/labs/gb/components/shared/fx.d.ts +63 -0
- package/labs/gb/components/shared/fx.js +102 -0
- package/labs/gb/components/shared/fx.js.map +1 -0
- package/labs/gb/components/shared/pseudo-classes.d.ts +1 -7
- package/labs/gb/components/shared/pseudo-classes.js +1 -9
- package/labs/gb/components/shared/pseudo-classes.js.map +1 -1
- package/labs/gb/components/slider/_slider-tokens.scss +86 -0
- package/labs/gb/components/slider/md-gb-slider.d.ts +12 -0
- package/labs/gb/components/slider/md-gb-slider.js +8 -0
- package/labs/gb/components/slider/md-gb-slider.js.map +1 -0
- package/labs/gb/components/slider/slider-element.d.ts +147 -0
- package/labs/gb/components/slider/slider-element.js +978 -0
- package/labs/gb/components/slider/slider-element.js.map +1 -0
- package/labs/gb/components/slider/slider.css +1 -0
- package/labs/gb/components/slider/slider.css.map +1 -0
- package/labs/gb/components/slider/slider.cssresult.d.ts +3 -0
- package/labs/gb/components/slider/slider.cssresult.js +11 -0
- package/labs/gb/components/slider/slider.cssresult.js.map +1 -0
- package/labs/gb/components/slider/slider.d.ts +173 -0
- package/labs/gb/components/slider/slider.js +502 -0
- package/labs/gb/components/slider/slider.js.map +1 -0
- package/labs/gb/components/slider/slider.scss +689 -0
- package/labs/gb/components/snackbar/_snackbar-tokens.scss +86 -0
- package/labs/gb/components/snackbar/harness.d.ts +32 -0
- package/labs/gb/components/snackbar/harness.js +64 -0
- package/labs/gb/components/snackbar/harness.js.map +1 -0
- package/labs/gb/components/snackbar/md-gb-snackbar.d.ts +12 -0
- package/labs/gb/components/snackbar/md-gb-snackbar.js +8 -0
- package/labs/gb/components/snackbar/md-gb-snackbar.js.map +1 -0
- package/labs/gb/components/snackbar/snackbar-element.d.ts +123 -0
- package/labs/gb/components/snackbar/snackbar-element.js +448 -0
- package/labs/gb/components/snackbar/snackbar-element.js.map +1 -0
- package/labs/gb/components/snackbar/snackbar.css +5 -0
- package/labs/gb/components/snackbar/snackbar.css.map +1 -0
- package/labs/gb/components/snackbar/snackbar.cssresult.d.ts +3 -0
- package/labs/gb/components/snackbar/snackbar.cssresult.js +15 -0
- package/labs/gb/components/snackbar/snackbar.cssresult.js.map +1 -0
- package/labs/gb/components/snackbar/snackbar.d.ts +54 -0
- package/labs/gb/components/snackbar/snackbar.js +72 -0
- package/labs/gb/components/snackbar/snackbar.js.map +1 -0
- package/labs/gb/components/snackbar/snackbar.scss +384 -0
- package/labs/gb/components/switch/switch.css +1 -1
- package/labs/gb/components/switch/switch.css.map +1 -1
- package/labs/gb/components/switch/switch.cssresult.js +1 -1
- package/labs/gb/components/switch/switch.cssresult.js.map +1 -1
- package/labs/gb/components/switch/switch.scss +4 -2
- package/package.json +1 -1
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2026 Google LLC
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// go/keep-sorted start by_regex='(.+) prefix_order=sass:
|
|
7
|
+
@use 'nav-bar-tokens';
|
|
8
|
+
// go/keep-sorted end
|
|
9
|
+
|
|
10
|
+
@layer md.sys, md.comp.ripple, md.comp.focus-ring;
|
|
11
|
+
|
|
12
|
+
@layer md.comp.nav-bar {
|
|
13
|
+
:host(md-gb-nav-bar) {
|
|
14
|
+
@include nav-bar-tokens.root;
|
|
15
|
+
|
|
16
|
+
--nav-bar: true;
|
|
17
|
+
display: flex;
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host(md-gb-nav-bar[item-layout='horizontal']) {
|
|
22
|
+
@include nav-bar-tokens.item-horizontal;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host(md-gb-nav-bar[item-layout='vertical']) {
|
|
26
|
+
@include nav-bar-tokens.item-vertical;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host(md-gb-nav-bar-item) {
|
|
30
|
+
@include nav-bar-tokens.root;
|
|
31
|
+
|
|
32
|
+
display: flex;
|
|
33
|
+
flex: 1 1 0;
|
|
34
|
+
min-width: 48px;
|
|
35
|
+
outline: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host(md-gb-nav-bar-item[item-layout='horizontal']) {
|
|
39
|
+
@include nav-bar-tokens.item-horizontal;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host(md-gb-nav-bar-item[item-layout='vertical']) {
|
|
43
|
+
@include nav-bar-tokens.item-vertical;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
md-gb-nav-bar {
|
|
47
|
+
@include nav-bar-tokens.root;
|
|
48
|
+
|
|
49
|
+
--nav-bar: true;
|
|
50
|
+
display: flex;
|
|
51
|
+
width: 100%;
|
|
52
|
+
|
|
53
|
+
&[item-layout='horizontal'] {
|
|
54
|
+
@include nav-bar-tokens.item-horizontal;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&[item-layout='vertical'] {
|
|
58
|
+
@include nav-bar-tokens.item-vertical;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.nav-bar {
|
|
63
|
+
@include nav-bar-tokens.root;
|
|
64
|
+
|
|
65
|
+
--md-elevation-shadow-color: var(--container-shadow-color);
|
|
66
|
+
--nav-bar: true;
|
|
67
|
+
align-items: stretch;
|
|
68
|
+
background-color: var(--container-color);
|
|
69
|
+
border: none;
|
|
70
|
+
border-radius: var(--container-shape);
|
|
71
|
+
box-shadow: var(--container-elevation);
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: row;
|
|
75
|
+
gap: var(--item-between-space);
|
|
76
|
+
height: var(--container-height);
|
|
77
|
+
isolation: isolate;
|
|
78
|
+
justify-content: space-around;
|
|
79
|
+
margin: 0;
|
|
80
|
+
padding: 0;
|
|
81
|
+
position: relative;
|
|
82
|
+
transition: all var(--motion-duration) var(--motion-easing);
|
|
83
|
+
user-select: none;
|
|
84
|
+
width: 100%;
|
|
85
|
+
|
|
86
|
+
> :focus-within,
|
|
87
|
+
::slotted(:focus-within) {
|
|
88
|
+
z-index: 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&.nav-bar-horizontal {
|
|
92
|
+
@include nav-bar-tokens.item-horizontal;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&.nav-bar-vertical {
|
|
96
|
+
@include nav-bar-tokens.item-vertical;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.nav-bar-item {
|
|
101
|
+
@include nav-bar-tokens.root;
|
|
102
|
+
|
|
103
|
+
--md-icon-color: var(--item-inactive-icon-color);
|
|
104
|
+
--md-icon-fill: 0;
|
|
105
|
+
--md-icon-size: var(--item-icon-size);
|
|
106
|
+
--ripple-color: var(--item-inactive-state-layer-color);
|
|
107
|
+
align-items: center;
|
|
108
|
+
appearance: none;
|
|
109
|
+
background: transparent;
|
|
110
|
+
background-image: none;
|
|
111
|
+
border: none;
|
|
112
|
+
border-radius: var(--md-sys-space-100);
|
|
113
|
+
box-sizing: border-box;
|
|
114
|
+
color: var(--item-inactive-label-text-color);
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
display: flex;
|
|
117
|
+
flex: 1 1 0;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
font: var(--item-label-text);
|
|
120
|
+
font-variation-settings: var(--item-label-text-axes);
|
|
121
|
+
height: 100%;
|
|
122
|
+
justify-content: center;
|
|
123
|
+
letter-spacing: var(--item-label-text-tracking);
|
|
124
|
+
margin: 0;
|
|
125
|
+
min-width: 48px;
|
|
126
|
+
padding: 0;
|
|
127
|
+
position: relative;
|
|
128
|
+
text-decoration: none;
|
|
129
|
+
transition: all var(--motion-duration) var(--motion-easing);
|
|
130
|
+
user-select: none;
|
|
131
|
+
width: 100%;
|
|
132
|
+
-webkit-tap-highlight-color: transparent;
|
|
133
|
+
|
|
134
|
+
&:disabled,
|
|
135
|
+
&[disabled],
|
|
136
|
+
&.disabled {
|
|
137
|
+
cursor: default;
|
|
138
|
+
opacity: 0.38;
|
|
139
|
+
pointer-events: none;
|
|
140
|
+
--disabled: true;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.nav-bar-item-content {
|
|
145
|
+
align-items: center;
|
|
146
|
+
border-radius: var(--item-active-indicator-shape);
|
|
147
|
+
box-sizing: border-box;
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-direction: column;
|
|
150
|
+
gap: var(--item-active-indicator-icon-label-space);
|
|
151
|
+
justify-content: center;
|
|
152
|
+
padding-block: var(--item-container-between-space);
|
|
153
|
+
position: relative;
|
|
154
|
+
transition: all var(--motion-duration) var(--motion-easing);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.nav-bar-item-icon-container {
|
|
158
|
+
align-items: center;
|
|
159
|
+
background-color: transparent;
|
|
160
|
+
border-radius: var(--item-active-indicator-shape);
|
|
161
|
+
color: var(--item-inactive-icon-color);
|
|
162
|
+
display: flex;
|
|
163
|
+
height: var(--item-active-indicator-height);
|
|
164
|
+
isolation: isolate;
|
|
165
|
+
justify-content: center;
|
|
166
|
+
position: relative;
|
|
167
|
+
transition: all var(--motion-duration) var(--motion-easing);
|
|
168
|
+
width: var(--item-active-indicator-width);
|
|
169
|
+
|
|
170
|
+
&::before {
|
|
171
|
+
background-color: var(--item-active-indicator-color);
|
|
172
|
+
border-radius: var(--item-active-indicator-shape);
|
|
173
|
+
content: '';
|
|
174
|
+
inset: 0;
|
|
175
|
+
opacity: 0;
|
|
176
|
+
position: absolute;
|
|
177
|
+
transform: scaleX(0.5);
|
|
178
|
+
transition: all var(--motion-duration) var(--motion-easing);
|
|
179
|
+
z-index: -2;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.nav-bar-item-icon {
|
|
184
|
+
align-items: center;
|
|
185
|
+
display: inline-flex;
|
|
186
|
+
height: var(--item-icon-size);
|
|
187
|
+
justify-content: center;
|
|
188
|
+
position: relative;
|
|
189
|
+
transition: all var(--motion-duration) var(--motion-easing);
|
|
190
|
+
width: var(--item-icon-size);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.nav-bar-item-label {
|
|
194
|
+
color: var(--item-inactive-label-text-color);
|
|
195
|
+
font: var(--item-label-text);
|
|
196
|
+
font-variation-settings: var(--item-label-text-axes);
|
|
197
|
+
letter-spacing: var(--item-label-text-tracking);
|
|
198
|
+
overflow: hidden;
|
|
199
|
+
text-align: center;
|
|
200
|
+
text-overflow: ellipsis;
|
|
201
|
+
transition: all var(--motion-duration) var(--motion-easing);
|
|
202
|
+
white-space: nowrap;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.nav-bar-item-badge {
|
|
206
|
+
align-items: center;
|
|
207
|
+
background-color: var(--md-sys-color-error);
|
|
208
|
+
border-radius: var(--md-sys-shape-corner-full);
|
|
209
|
+
box-sizing: border-box;
|
|
210
|
+
color: var(--md-sys-color-on-error);
|
|
211
|
+
display: inline-flex;
|
|
212
|
+
font: var(--md-sys-typescale-label-sm);
|
|
213
|
+
height: 16px;
|
|
214
|
+
inset-block-start: -4px;
|
|
215
|
+
inset-inline-start: calc(50% + 2px);
|
|
216
|
+
justify-content: center;
|
|
217
|
+
min-width: 16px;
|
|
218
|
+
padding-inline: 4px;
|
|
219
|
+
pointer-events: none;
|
|
220
|
+
position: absolute;
|
|
221
|
+
transition: all var(--motion-duration) var(--motion-easing);
|
|
222
|
+
z-index: 2;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.nav-bar-item-badge-dot {
|
|
226
|
+
height: 6px;
|
|
227
|
+
inset-block-start: 0;
|
|
228
|
+
inset-inline-start: calc(50% + 6px);
|
|
229
|
+
min-width: 6px;
|
|
230
|
+
padding-inline: 0;
|
|
231
|
+
width: 6px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.nav-bar-item:is(.nav-bar-item-active, [aria-selected='true']) {
|
|
235
|
+
--md-icon-color: var(--item-active-icon-color);
|
|
236
|
+
--md-icon-fill: 1;
|
|
237
|
+
--ripple-color: var(--item-active-state-layer-color);
|
|
238
|
+
color: var(--item-active-label-text-color);
|
|
239
|
+
|
|
240
|
+
.nav-bar-item-icon-container {
|
|
241
|
+
color: var(--item-active-icon-color);
|
|
242
|
+
|
|
243
|
+
&::before {
|
|
244
|
+
opacity: 1;
|
|
245
|
+
transform: scaleX(1);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.nav-bar-item-label {
|
|
250
|
+
color: var(--item-active-label-text-color);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.nav-bar-item-horizontal {
|
|
255
|
+
@include nav-bar-tokens.item-horizontal;
|
|
256
|
+
|
|
257
|
+
.nav-bar-item-content {
|
|
258
|
+
display: inline-flex;
|
|
259
|
+
flex-direction: row;
|
|
260
|
+
gap: var(--item-active-indicator-icon-label-space);
|
|
261
|
+
height: var(--item-active-indicator-height);
|
|
262
|
+
isolation: isolate;
|
|
263
|
+
padding-block: 0;
|
|
264
|
+
padding-inline: var(--item-active-indicator-leading-space)
|
|
265
|
+
var(--item-active-indicator-trailing-space);
|
|
266
|
+
|
|
267
|
+
&::before {
|
|
268
|
+
background-color: var(--item-active-indicator-color);
|
|
269
|
+
border-radius: var(--item-active-indicator-shape);
|
|
270
|
+
content: '';
|
|
271
|
+
inset: 0;
|
|
272
|
+
opacity: 0;
|
|
273
|
+
position: absolute;
|
|
274
|
+
transform: scaleX(0.6);
|
|
275
|
+
transition: all var(--motion-duration) var(--motion-easing);
|
|
276
|
+
z-index: -2;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.nav-bar-item-icon-container {
|
|
281
|
+
height: var(--item-icon-size);
|
|
282
|
+
width: var(--item-icon-size);
|
|
283
|
+
|
|
284
|
+
&::before {
|
|
285
|
+
display: none;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
&:is(.nav-bar-item-active, [aria-selected='true']) {
|
|
290
|
+
.nav-bar-item-content::before {
|
|
291
|
+
opacity: 1;
|
|
292
|
+
transform: scaleX(1);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 Google LLC
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
@mixin root {
|
|
7
|
+
// LINT.IfChange
|
|
8
|
+
--container-color: var(--md-sys-color-surface);
|
|
9
|
+
--container-elevation: var(--md-sys-elevation-shadow-0);
|
|
10
|
+
--container-shape: var(--md-sys-shape-corner-none);
|
|
11
|
+
--container-vertical-padding: var(--md-sys-space-500);
|
|
12
|
+
--container-width: 96px;
|
|
13
|
+
--expanded-container-color: var(--md-sys-color-surface);
|
|
14
|
+
--expanded-container-width-maximum: 360px;
|
|
15
|
+
--expanded-container-width-minimum: 220px;
|
|
16
|
+
--expanded-modal-container-color: var(--md-sys-color-surface-container);
|
|
17
|
+
--header-space-minimum: 40px;
|
|
18
|
+
--item-active-focused-icon-color: var(--md-sys-color-on-secondary-container);
|
|
19
|
+
--item-active-focused-label-text-color: var(--md-sys-color-secondary);
|
|
20
|
+
--item-active-hovered-icon-color: var(--md-sys-color-on-secondary-container);
|
|
21
|
+
--item-active-hovered-label-text-color: var(--md-sys-color-secondary);
|
|
22
|
+
--item-active-icon-color: var(--md-sys-color-on-secondary-container);
|
|
23
|
+
--item-active-indicator-color: var(--md-sys-color-secondary-container);
|
|
24
|
+
--item-active-indicator-height: 32px;
|
|
25
|
+
--item-active-indicator-shape: var(--md-sys-shape-corner-full);
|
|
26
|
+
--item-active-indicator-width: 56px;
|
|
27
|
+
--item-active-label-text-color: var(--md-sys-color-secondary);
|
|
28
|
+
--item-active-pressed-icon-color: var(--md-sys-color-on-secondary-container);
|
|
29
|
+
--item-active-pressed-label-text-color: var(--md-sys-color-secondary);
|
|
30
|
+
--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);
|
|
31
|
+
--item-container-height: 64px;
|
|
32
|
+
--item-container-vertical-space: 4px;
|
|
33
|
+
--item-full-width-leading-space: 20px;
|
|
34
|
+
--item-full-width-trailing-space: 20px;
|
|
35
|
+
--item-horizontal-active-indicator-height: 56px;
|
|
36
|
+
--item-horizontal-icon-label-space: 8px;
|
|
37
|
+
--item-icon-size: 24px;
|
|
38
|
+
--item-inactive-focused-icon-color: var(--md-sys-color-on-surface);
|
|
39
|
+
--item-inactive-focused-label-text-color: var(--md-sys-color-on-surface);
|
|
40
|
+
--item-inactive-hovered-icon-color: var(--md-sys-color-on-surface);
|
|
41
|
+
--item-inactive-hovered-label-text-color: var(--md-sys-color-on-surface);
|
|
42
|
+
--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);
|
|
43
|
+
--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);
|
|
44
|
+
--item-inactive-pressed-icon-color: var(--md-sys-color-on-surface);
|
|
45
|
+
--item-inactive-pressed-label-text-color: var(--md-sys-color-on-surface);
|
|
46
|
+
--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);
|
|
47
|
+
--item-label-text: var(--md-sys-typescale-label-md);
|
|
48
|
+
--item-label-text-axes: var(--md-sys-typescale-label-md-axes);
|
|
49
|
+
--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);
|
|
50
|
+
--item-vertical-icon-label-space: 4px;
|
|
51
|
+
--item-vertical-leading-space: 16px;
|
|
52
|
+
--item-vertical-trailing-space: 16px;
|
|
53
|
+
--modal-container-elevation: var(--md-sys-elevation-shadow-2);
|
|
54
|
+
--modal-container-shape: var(--md-sys-shape-corner-lg);
|
|
55
|
+
--motion-duration: var(--md-sys-motion-duration-short4);
|
|
56
|
+
--motion-easing: var(--md-sys-motion-easing-emphasized);
|
|
57
|
+
// LINT.ThenChange(nav-rail-element.ts) keep in sync with `@cssprop` jsdoc tags
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@mixin expanded {
|
|
61
|
+
--container-color: var(--expanded-container-color);
|
|
62
|
+
--item-active-focused-label-text-color: var(
|
|
63
|
+
--md-sys-color-on-secondary-container
|
|
64
|
+
);
|
|
65
|
+
--item-active-hovered-label-text-color: var(
|
|
66
|
+
--md-sys-color-on-secondary-container
|
|
67
|
+
);
|
|
68
|
+
--item-active-indicator-height: var(
|
|
69
|
+
--item-horizontal-active-indicator-height
|
|
70
|
+
);
|
|
71
|
+
--item-active-indicator-width: auto;
|
|
72
|
+
--item-active-label-text-color: var(--md-sys-color-on-secondary-container);
|
|
73
|
+
--item-active-pressed-label-text-color: var(
|
|
74
|
+
--md-sys-color-on-secondary-container
|
|
75
|
+
);
|
|
76
|
+
--item-container-height: var(--item-horizontal-active-indicator-height);
|
|
77
|
+
--item-container-vertical-space: 0px;
|
|
78
|
+
--item-label-text: var(--md-sys-typescale-label-lg);
|
|
79
|
+
--item-label-text-axes: var(--md-sys-typescale-label-lg-axes);
|
|
80
|
+
--item-label-text-tracking: var(--md-sys-typescale-label-lg-tracking);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@mixin modal {
|
|
84
|
+
--container-color: var(--expanded-modal-container-color);
|
|
85
|
+
--container-elevation: var(--modal-container-elevation);
|
|
86
|
+
--container-shape: var(--modal-container-shape);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@mixin vertical-item {
|
|
90
|
+
--item-active-focused-label-text-color: var(--md-sys-color-secondary);
|
|
91
|
+
--item-active-hovered-label-text-color: var(--md-sys-color-secondary);
|
|
92
|
+
--item-active-indicator-height: 32px;
|
|
93
|
+
--item-active-indicator-width: 56px;
|
|
94
|
+
--item-active-label-text-color: var(--md-sys-color-secondary);
|
|
95
|
+
--item-active-pressed-label-text-color: var(--md-sys-color-secondary);
|
|
96
|
+
--item-container-height: 64px;
|
|
97
|
+
--item-container-vertical-space: 4px;
|
|
98
|
+
--item-label-text: var(--md-sys-typescale-label-md);
|
|
99
|
+
--item-label-text-axes: var(--md-sys-typescale-label-md-axes);
|
|
100
|
+
--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@mixin horizontal-item {
|
|
104
|
+
--item-active-focused-label-text-color: var(
|
|
105
|
+
--md-sys-color-on-secondary-container
|
|
106
|
+
);
|
|
107
|
+
--item-active-hovered-label-text-color: var(
|
|
108
|
+
--md-sys-color-on-secondary-container
|
|
109
|
+
);
|
|
110
|
+
--item-active-indicator-height: var(
|
|
111
|
+
--item-horizontal-active-indicator-height
|
|
112
|
+
);
|
|
113
|
+
--item-active-indicator-width: auto;
|
|
114
|
+
--item-active-label-text-color: var(--md-sys-color-on-secondary-container);
|
|
115
|
+
--item-active-pressed-label-text-color: var(
|
|
116
|
+
--md-sys-color-on-secondary-container
|
|
117
|
+
);
|
|
118
|
+
--item-container-height: var(--item-horizontal-active-indicator-height);
|
|
119
|
+
--item-container-vertical-space: 0px;
|
|
120
|
+
--item-label-text: var(--md-sys-typescale-label-lg);
|
|
121
|
+
--item-label-text-axes: var(--md-sys-typescale-label-lg-axes);
|
|
122
|
+
--item-label-text-tracking: var(--md-sys-typescale-label-lg-tracking);
|
|
123
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { NavRailItemElement } from './nav-rail-item-element.js';
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
/** A Material Design navigation rail item custom element. */
|
|
10
|
+
'md-gb-nav-rail-item': NavRailItemElement;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { NavRailItemElement } from './nav-rail-item-element.js';
|
|
7
|
+
if (!customElements.get('md-gb-nav-rail-item')) {
|
|
8
|
+
customElements.define('md-gb-nav-rail-item', NavRailItemElement);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=md-gb-nav-rail-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md-gb-nav-rail-item.js","sourceRoot":"","sources":["md-gb-nav-rail-item.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AAS9D,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,qBAAqB,CAAC,EAAE,CAAC;IAC/C,cAAc,CAAC,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAC;AACnE,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {NavRailItemElement} from './nav-rail-item-element.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n /** A Material Design navigation rail item custom element. */\n 'md-gb-nav-rail-item': NavRailItemElement;\n }\n}\n\nif (!customElements.get('md-gb-nav-rail-item')) {\n customElements.define('md-gb-nav-rail-item', NavRailItemElement);\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { NavRailElement } from './nav-rail-element.js';
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
/** A Material Design navigation rail custom element. */
|
|
10
|
+
'md-gb-nav-rail': NavRailElement;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { NavRailElement } from './nav-rail-element.js';
|
|
7
|
+
if (!customElements.get('md-gb-nav-rail')) {
|
|
8
|
+
customElements.define('md-gb-nav-rail', NavRailElement);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=md-gb-nav-rail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md-gb-nav-rail.js","sourceRoot":"","sources":["md-gb-nav-rail.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AASrD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;IAC1C,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAC1D,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {NavRailElement} from './nav-rail-element.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n /** A Material Design navigation rail custom element. */\n 'md-gb-nav-rail': NavRailElement;\n }\n}\n\nif (!customElements.get('md-gb-nav-rail')) {\n customElements.define('md-gb-nav-rail', NavRailElement);\n}\n"]}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { CSSResultOrNative, type PropertyValues } from 'lit';
|
|
7
|
+
import { AriaTablistElement } from '../../../aria/tabs/tablist.js';
|
|
8
|
+
import { type NavRailAlignment, type NavRailItemLayout } from './nav-rail.js';
|
|
9
|
+
/**
|
|
10
|
+
* A Material Design navigation rail component.
|
|
11
|
+
*
|
|
12
|
+
* @slot - Used to display navigation rail items (`md-gb-nav-rail-item`).
|
|
13
|
+
* @slot header - Used to display optional header controls (menu button, FAB).
|
|
14
|
+
* @csspart nav-rail - The navigation rail's root container.
|
|
15
|
+
* @csspart header - The navigation rail's header container.
|
|
16
|
+
* @csspart menu-button - The built-in expand/collapse menu button when `collapsible`.
|
|
17
|
+
* @csspart items - The navigation rail's items container.
|
|
18
|
+
* @fires {Event} change - Fired when the selected item changes. --bubbles
|
|
19
|
+
* @fires {Event} toggle - Fired when the expanded state is toggled. --bubbles
|
|
20
|
+
* @cssprop --container-color
|
|
21
|
+
* @cssprop --container-elevation
|
|
22
|
+
* @cssprop --container-shape
|
|
23
|
+
* @cssprop --container-vertical-padding
|
|
24
|
+
* @cssprop --container-width
|
|
25
|
+
* @cssprop --expanded-container-color
|
|
26
|
+
* @cssprop --expanded-container-width-maximum
|
|
27
|
+
* @cssprop --expanded-container-width-minimum
|
|
28
|
+
* @cssprop --expanded-modal-container-color
|
|
29
|
+
* @cssprop --header-space-minimum
|
|
30
|
+
* @cssprop --item-active-focused-icon-color
|
|
31
|
+
* @cssprop --item-active-focused-label-text-color
|
|
32
|
+
* @cssprop --item-active-hovered-icon-color
|
|
33
|
+
* @cssprop --item-active-hovered-label-text-color
|
|
34
|
+
* @cssprop --item-active-icon-color
|
|
35
|
+
* @cssprop --item-active-indicator-color
|
|
36
|
+
* @cssprop --item-active-indicator-height
|
|
37
|
+
* @cssprop --item-active-indicator-shape
|
|
38
|
+
* @cssprop --item-active-indicator-width
|
|
39
|
+
* @cssprop --item-active-label-text-color
|
|
40
|
+
* @cssprop --item-active-pressed-icon-color
|
|
41
|
+
* @cssprop --item-active-pressed-label-text-color
|
|
42
|
+
* @cssprop --item-active-state-layer-color
|
|
43
|
+
* @cssprop --item-container-height
|
|
44
|
+
* @cssprop --item-container-vertical-space
|
|
45
|
+
* @cssprop --item-full-width-leading-space
|
|
46
|
+
* @cssprop --item-full-width-trailing-space
|
|
47
|
+
* @cssprop --item-horizontal-active-indicator-height
|
|
48
|
+
* @cssprop --item-horizontal-icon-label-space
|
|
49
|
+
* @cssprop --item-icon-size
|
|
50
|
+
* @cssprop --item-inactive-focused-icon-color
|
|
51
|
+
* @cssprop --item-inactive-focused-label-text-color
|
|
52
|
+
* @cssprop --item-inactive-hovered-icon-color
|
|
53
|
+
* @cssprop --item-inactive-hovered-label-text-color
|
|
54
|
+
* @cssprop --item-inactive-icon-color
|
|
55
|
+
* @cssprop --item-inactive-label-text-color
|
|
56
|
+
* @cssprop --item-inactive-pressed-icon-color
|
|
57
|
+
* @cssprop --item-inactive-pressed-label-text-color
|
|
58
|
+
* @cssprop --item-inactive-state-layer-color
|
|
59
|
+
* @cssprop --item-label-text
|
|
60
|
+
* @cssprop --item-label-text-axes
|
|
61
|
+
* @cssprop --item-label-text-tracking
|
|
62
|
+
* @cssprop --item-vertical-icon-label-space
|
|
63
|
+
* @cssprop --item-vertical-leading-space
|
|
64
|
+
* @cssprop --item-vertical-trailing-space
|
|
65
|
+
* @cssprop --modal-container-elevation
|
|
66
|
+
* @cssprop --modal-container-shape
|
|
67
|
+
* @cssprop --motion-duration
|
|
68
|
+
* @cssprop --motion-easing
|
|
69
|
+
*/
|
|
70
|
+
export declare class NavRailElement extends AriaTablistElement {
|
|
71
|
+
/** @nocollapse */
|
|
72
|
+
static styles: CSSResultOrNative[];
|
|
73
|
+
orientation: 'horizontal' | 'vertical';
|
|
74
|
+
/** Whether the navigation rail is expanded to show horizontal items. */
|
|
75
|
+
expanded: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Whether the navigation rail renders a built-in expand/collapse menu button
|
|
78
|
+
* in the header when no toggle button is slotted into `slot="header"`.
|
|
79
|
+
*/
|
|
80
|
+
collapsible: boolean;
|
|
81
|
+
/** Whether the navigation rail uses modal elevation and shape. */
|
|
82
|
+
modal: boolean;
|
|
83
|
+
/** Vertical alignment of items ('top', 'center', or 'bottom'). */
|
|
84
|
+
alignment: NavRailAlignment;
|
|
85
|
+
/** The layout orientation of items ('vertical' or 'horizontal'). */
|
|
86
|
+
itemLayout: NavRailItemLayout;
|
|
87
|
+
private hasHeader;
|
|
88
|
+
private hasSlottedToggle;
|
|
89
|
+
private readonly headerSlot;
|
|
90
|
+
private readonly menuButtonElement;
|
|
91
|
+
private menuButtonAbortController;
|
|
92
|
+
/**
|
|
93
|
+
* The 0-based index of the currently active navigation rail item.
|
|
94
|
+
* Alias for `selectedTabIndex`.
|
|
95
|
+
*/
|
|
96
|
+
get selectedIndex(): number;
|
|
97
|
+
set selectedIndex(index: number);
|
|
98
|
+
/**
|
|
99
|
+
* Toggles the expanded state of the navigation rail.
|
|
100
|
+
*
|
|
101
|
+
* @param force Optional boolean to force expanded (`true`) or collapsed (`false`).
|
|
102
|
+
* @return The new `expanded` state.
|
|
103
|
+
*/
|
|
104
|
+
toggle(force?: boolean): boolean;
|
|
105
|
+
/** Expands the navigation rail. */
|
|
106
|
+
expand(): void;
|
|
107
|
+
/** Collapses the navigation rail. */
|
|
108
|
+
collapse(): void;
|
|
109
|
+
connectedCallback(): void;
|
|
110
|
+
disconnectedCallback(): void;
|
|
111
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
112
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
113
|
+
private setupBuiltInMenuButton;
|
|
114
|
+
private handleMenuButtonClick;
|
|
115
|
+
private handleHeaderClick;
|
|
116
|
+
private handleHeaderSlotChange;
|
|
117
|
+
private syncHeaderState;
|
|
118
|
+
protected handleSlotChange(): void;
|
|
119
|
+
private syncItemsLayout;
|
|
120
|
+
}
|