@material/web 2.5.1-nightly.56a486b.0 → 2.5.1-nightly.703aed2.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 +29543 -23432
- 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/fieldset.d.ts +36 -0
- package/labs/aria/menu/fieldset.js +103 -0
- package/labs/aria/menu/fieldset.js.map +1 -0
- package/labs/aria/menu/internal.d.ts +15 -0
- package/labs/aria/menu/internal.js +16 -0
- package/labs/aria/menu/internal.js.map +1 -0
- package/labs/aria/menu/md-aria-fieldset.d.ts +11 -0
- package/labs/aria/menu/md-aria-fieldset.js +8 -0
- package/labs/aria/menu/md-aria-fieldset.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/menuitem.d.ts +37 -4
- package/labs/aria/menu/menuitem.js +172 -21
- package/labs/aria/menu/menuitem.js.map +1 -1
- package/labs/aria/menu/menulist.d.ts +2 -6
- package/labs/aria/menu/menulist.js +12 -46
- package/labs/aria/menu/menulist.js.map +1 -1
- package/labs/aria/menu/shared-slotted-content.d.ts +10 -0
- package/labs/aria/menu/shared-slotted-content.js +51 -0
- package/labs/aria/menu/shared-slotted-content.js.map +1 -0
- 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/aria/tabs/tab.js +5 -0
- package/labs/aria/tabs/tab.js.map +1 -1
- package/labs/gb/components/appbar/app-bar.css +1 -1
- package/labs/gb/components/appbar/app-bar.css.map +1 -1
- package/labs/gb/components/appbar/app-bar.cssresult.js +1 -1
- package/labs/gb/components/appbar/app-bar.cssresult.js.map +1 -1
- package/labs/gb/components/appbar/app-bar.scss +1 -0
- package/labs/gb/components/badge/badge.css +1 -1
- package/labs/gb/components/badge/badge.css.map +1 -1
- package/labs/gb/components/badge/badge.cssresult.js +1 -1
- package/labs/gb/components/badge/badge.cssresult.js.map +1 -1
- package/labs/gb/components/badge/badge.scss +1 -0
- package/labs/gb/components/button/button-element.d.ts +2 -0
- package/labs/gb/components/button/button-element.js +15 -2
- 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 +1 -0
- 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/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/fab/fab.css +1 -1
- package/labs/gb/components/fab/fab.css.map +1 -1
- package/labs/gb/components/fab/fab.cssresult.js +1 -1
- package/labs/gb/components/fab/fab.cssresult.js.map +1 -1
- package/labs/gb/components/fab/fab.scss +1 -0
- package/labs/gb/components/iconbutton/icon-button-element.d.ts +2 -0
- package/labs/gb/components/iconbutton/icon-button-element.js +15 -2
- 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 +1 -0
- 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 +295 -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/shared/update-class-list.d.ts +22 -0
- package/labs/gb/components/shared/update-class-list.js +26 -0
- package/labs/gb/components/shared/update-class-list.js.map +1 -0
- package/labs/gb/components/slider/_slider-tokens.scss +82 -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 +145 -0
- package/labs/gb/components/slider/slider-element.js +934 -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 +169 -0
- package/labs/gb/components/slider/slider.js +452 -0
- package/labs/gb/components/slider/slider.js.map +1 -0
- package/labs/gb/components/slider/slider.scss +661 -0
- package/labs/gb/components/tabs/_tabs-tokens.scss +177 -0
- package/labs/gb/components/tabs/md-gb-tab.d.ts +12 -0
- package/labs/gb/components/tabs/md-gb-tab.js +8 -0
- package/labs/gb/components/tabs/md-gb-tab.js.map +1 -0
- package/labs/gb/components/tabs/md-gb-tabs.d.ts +12 -0
- package/labs/gb/components/tabs/md-gb-tabs.js +8 -0
- package/labs/gb/components/tabs/md-gb-tabs.js.map +1 -0
- package/labs/gb/components/tabs/tab-element.d.ts +42 -0
- package/labs/gb/components/tabs/tab-element.js +75 -0
- package/labs/gb/components/tabs/tab-element.js.map +1 -0
- package/labs/gb/components/tabs/tabs-element.d.ts +37 -0
- package/labs/gb/components/tabs/tabs-element.js +67 -0
- package/labs/gb/components/tabs/tabs-element.js.map +1 -0
- package/labs/gb/components/tabs/tabs.css +4 -0
- package/labs/gb/components/tabs/tabs.css.map +1 -0
- package/labs/gb/components/tabs/tabs.cssresult.d.ts +3 -0
- package/labs/gb/components/tabs/tabs.cssresult.js +14 -0
- package/labs/gb/components/tabs/tabs.cssresult.js.map +1 -0
- package/labs/gb/components/tabs/tabs.d.ts +98 -0
- package/labs/gb/components/tabs/tabs.js +112 -0
- package/labs/gb/components/tabs/tabs.js.map +1 -0
- package/labs/gb/components/tabs/tabs.scss +301 -0
- package/labs/gb/components/toolbar/_toolbar-tokens.scss +70 -0
- package/labs/gb/components/toolbar/md-gb-toolbar.d.ts +12 -0
- package/labs/gb/components/toolbar/md-gb-toolbar.js +8 -0
- package/labs/gb/components/toolbar/md-gb-toolbar.js.map +1 -0
- package/labs/gb/components/toolbar/toolbar-element.d.ts +56 -0
- package/labs/gb/components/toolbar/toolbar-element.js +120 -0
- package/labs/gb/components/toolbar/toolbar-element.js.map +1 -0
- package/labs/gb/components/toolbar/toolbar.css +4 -0
- package/labs/gb/components/toolbar/toolbar.css.map +1 -0
- package/labs/gb/components/toolbar/toolbar.cssresult.d.ts +3 -0
- package/labs/gb/components/toolbar/toolbar.cssresult.js +14 -0
- package/labs/gb/components/toolbar/toolbar.cssresult.js.map +1 -0
- package/labs/gb/components/toolbar/toolbar.d.ts +56 -0
- package/labs/gb/components/toolbar/toolbar.js +60 -0
- package/labs/gb/components/toolbar/toolbar.js.map +1 -0
- package/labs/gb/components/toolbar/toolbar.scss +240 -0
- package/labs/gb/styles/tailwind.css +1 -1
- package/labs/gb/styles/tailwind.css.map +1 -1
- package/labs/gb/styles/tailwind.cssresult.js +1 -1
- package/labs/gb/styles/tailwind.cssresult.js.map +1 -1
- package/labs/gb/styles/tailwind.scss +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { NavBarElement } from './nav-bar-element.js';
|
|
7
|
+
if (!customElements.get('md-gb-nav-bar')) {
|
|
8
|
+
customElements.define('md-gb-nav-bar', NavBarElement);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=md-gb-nav-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md-gb-nav-bar.js","sourceRoot":"","sources":["md-gb-nav-bar.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AASnD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC;IACzC,cAAc,CAAC,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AACxD,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {NavBarElement} from './nav-bar-element.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n /** A Material Design gBreeze navigation bar custom element. */\n 'md-gb-nav-bar': NavBarElement;\n }\n}\n\nif (!customElements.get('md-gb-nav-bar')) {\n customElements.define('md-gb-nav-bar', NavBarElement);\n}\n"]}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 NavBarItemLayout } from './nav-bar.js';
|
|
9
|
+
/**
|
|
10
|
+
* A Material Design gBreeze navigation bar component.
|
|
11
|
+
*
|
|
12
|
+
* @slot - Used to display navigation bar items (`md-gb-nav-bar-item`).
|
|
13
|
+
* @csspart nav-bar - The navigation bar's root container.
|
|
14
|
+
* @fires {Event} change - Fired when the selected navigation bar item changes. --bubbles
|
|
15
|
+
* @cssprop --container-color
|
|
16
|
+
* @cssprop --container-elevation
|
|
17
|
+
* @cssprop --container-height
|
|
18
|
+
* @cssprop --container-shadow-color
|
|
19
|
+
* @cssprop --container-shape
|
|
20
|
+
* @cssprop --item-active-icon-color
|
|
21
|
+
* @cssprop --item-active-indicator-color
|
|
22
|
+
* @cssprop --item-active-indicator-height
|
|
23
|
+
* @cssprop --item-active-indicator-icon-label-space
|
|
24
|
+
* @cssprop --item-active-indicator-leading-space
|
|
25
|
+
* @cssprop --item-active-indicator-shape
|
|
26
|
+
* @cssprop --item-active-indicator-trailing-space
|
|
27
|
+
* @cssprop --item-active-indicator-width
|
|
28
|
+
* @cssprop --item-active-label-text-color
|
|
29
|
+
* @cssprop --item-active-state-layer-color
|
|
30
|
+
* @cssprop --item-between-space
|
|
31
|
+
* @cssprop --item-container-between-space
|
|
32
|
+
* @cssprop --item-icon-size
|
|
33
|
+
* @cssprop --item-inactive-icon-color
|
|
34
|
+
* @cssprop --item-inactive-label-text-color
|
|
35
|
+
* @cssprop --item-inactive-state-layer-color
|
|
36
|
+
* @cssprop --item-label-text
|
|
37
|
+
* @cssprop --item-label-text-axes
|
|
38
|
+
* @cssprop --item-label-text-tracking
|
|
39
|
+
* @cssprop --motion-duration
|
|
40
|
+
* @cssprop --motion-easing
|
|
41
|
+
*/
|
|
42
|
+
export declare class NavBarElement extends AriaTablistElement {
|
|
43
|
+
/** @nocollapse */
|
|
44
|
+
static styles: CSSResultOrNative[];
|
|
45
|
+
/** The layout orientation of items ('vertical' or 'horizontal'). */
|
|
46
|
+
itemLayout: NavBarItemLayout;
|
|
47
|
+
/**
|
|
48
|
+
* The 0-based index of the currently active navigation bar item.
|
|
49
|
+
* Alias for `selectedTabIndex`.
|
|
50
|
+
*/
|
|
51
|
+
get selectedIndex(): number;
|
|
52
|
+
set selectedIndex(index: number);
|
|
53
|
+
connectedCallback(): void;
|
|
54
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
55
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
56
|
+
protected handleSlotChange(): void;
|
|
57
|
+
private syncItemsLayout;
|
|
58
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { __decorate } from "tslib";
|
|
7
|
+
import { css, html } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { AriaTablistElement } from '../../../aria/tabs/tablist.js';
|
|
10
|
+
import { adoptStyles } from '../../styles/adopt-styles.js';
|
|
11
|
+
import navBarStyles from './nav-bar.css' with { type: 'css' }; // github-only
|
|
12
|
+
// import {styles as navBarStyles} from './nav-bar.cssresult.js'; // google3-only
|
|
13
|
+
import { navBar } from './nav-bar.js';
|
|
14
|
+
import { NavBarItemElement } from './nav-bar-item-element.js';
|
|
15
|
+
/**
|
|
16
|
+
* A Material Design gBreeze navigation bar component.
|
|
17
|
+
*
|
|
18
|
+
* @slot - Used to display navigation bar items (`md-gb-nav-bar-item`).
|
|
19
|
+
* @csspart nav-bar - The navigation bar's root container.
|
|
20
|
+
* @fires {Event} change - Fired when the selected navigation bar item changes. --bubbles
|
|
21
|
+
* @cssprop --container-color
|
|
22
|
+
* @cssprop --container-elevation
|
|
23
|
+
* @cssprop --container-height
|
|
24
|
+
* @cssprop --container-shadow-color
|
|
25
|
+
* @cssprop --container-shape
|
|
26
|
+
* @cssprop --item-active-icon-color
|
|
27
|
+
* @cssprop --item-active-indicator-color
|
|
28
|
+
* @cssprop --item-active-indicator-height
|
|
29
|
+
* @cssprop --item-active-indicator-icon-label-space
|
|
30
|
+
* @cssprop --item-active-indicator-leading-space
|
|
31
|
+
* @cssprop --item-active-indicator-shape
|
|
32
|
+
* @cssprop --item-active-indicator-trailing-space
|
|
33
|
+
* @cssprop --item-active-indicator-width
|
|
34
|
+
* @cssprop --item-active-label-text-color
|
|
35
|
+
* @cssprop --item-active-state-layer-color
|
|
36
|
+
* @cssprop --item-between-space
|
|
37
|
+
* @cssprop --item-container-between-space
|
|
38
|
+
* @cssprop --item-icon-size
|
|
39
|
+
* @cssprop --item-inactive-icon-color
|
|
40
|
+
* @cssprop --item-inactive-label-text-color
|
|
41
|
+
* @cssprop --item-inactive-state-layer-color
|
|
42
|
+
* @cssprop --item-label-text
|
|
43
|
+
* @cssprop --item-label-text-axes
|
|
44
|
+
* @cssprop --item-label-text-tracking
|
|
45
|
+
* @cssprop --motion-duration
|
|
46
|
+
* @cssprop --motion-easing
|
|
47
|
+
*/
|
|
48
|
+
export class NavBarElement extends AriaTablistElement {
|
|
49
|
+
constructor() {
|
|
50
|
+
super(...arguments);
|
|
51
|
+
/** The layout orientation of items ('vertical' or 'horizontal'). */
|
|
52
|
+
this.itemLayout = 'vertical';
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The 0-based index of the currently active navigation bar item.
|
|
56
|
+
* Alias for `selectedTabIndex`.
|
|
57
|
+
*/
|
|
58
|
+
get selectedIndex() {
|
|
59
|
+
return this.selectedTabIndex;
|
|
60
|
+
}
|
|
61
|
+
set selectedIndex(index) {
|
|
62
|
+
this.selectedTabIndex = index;
|
|
63
|
+
}
|
|
64
|
+
connectedCallback() {
|
|
65
|
+
super.connectedCallback();
|
|
66
|
+
adoptStyles(this, navBarStyles);
|
|
67
|
+
}
|
|
68
|
+
updated(changedProperties) {
|
|
69
|
+
super.updated(changedProperties);
|
|
70
|
+
if (changedProperties.has('itemLayout')) {
|
|
71
|
+
this.syncItemsLayout();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
return html `
|
|
76
|
+
<div
|
|
77
|
+
part="nav-bar"
|
|
78
|
+
class="${navBar({
|
|
79
|
+
itemLayout: this.itemLayout,
|
|
80
|
+
})}">
|
|
81
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
82
|
+
</div>
|
|
83
|
+
`;
|
|
84
|
+
}
|
|
85
|
+
handleSlotChange() {
|
|
86
|
+
super.handleSlotChange();
|
|
87
|
+
this.syncItemsLayout();
|
|
88
|
+
}
|
|
89
|
+
syncItemsLayout() {
|
|
90
|
+
for (const tab of this.tabs) {
|
|
91
|
+
if (tab instanceof NavBarItemElement) {
|
|
92
|
+
tab.itemLayout = this.itemLayout;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
tab.setAttribute('item-layout', this.itemLayout);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/** @nocollapse */
|
|
101
|
+
NavBarElement.styles = [
|
|
102
|
+
navBarStyles,
|
|
103
|
+
css `
|
|
104
|
+
:host {
|
|
105
|
+
display: flex;
|
|
106
|
+
width: 100%;
|
|
107
|
+
}
|
|
108
|
+
`,
|
|
109
|
+
];
|
|
110
|
+
__decorate([
|
|
111
|
+
property({ attribute: 'item-layout', reflect: true })
|
|
112
|
+
], NavBarElement.prototype, "itemLayout", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
property({ type: Number, attribute: 'selected-index', noAccessor: true })
|
|
115
|
+
], NavBarElement.prototype, "selectedIndex", null);
|
|
116
|
+
//# sourceMappingURL=nav-bar-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav-bar-element.js","sourceRoot":"","sources":["nav-bar-element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,GAAG,EAAqB,IAAI,EAAsB,MAAM,KAAK,CAAC;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAEzD,OAAO,YAAY,MAAM,eAAe,CAAC,OAAM,IAAI,EAAE,KAAK,EAAC,CAAC,CAAC,cAAc;AAC3E,iFAAiF;AAEjF,OAAO,EAAC,MAAM,EAAwB,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,OAAO,aAAc,SAAQ,kBAAkB;IAArD;;QAYE,oEAAoE;QAEpE,eAAU,GAAqB,UAAU,CAAC;IAoD5C,CAAC;IAlDC;;;OAGG;IAEH,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IACD,IAAI,aAAa,CAAC,KAAa;QAC7B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAChC,CAAC;IAEQ,iBAAiB;QACxB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,WAAW,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAClC,CAAC;IAEkB,OAAO,CAAC,iBAAuC;QAChE,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACjC,IAAI,iBAAiB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YACxC,IAAI,CAAC,eAAe,EAAE,CAAC;QACzB,CAAC;IACH,CAAC;IAEkB,MAAM;QACvB,OAAO,IAAI,CAAA;;;iBAGE,MAAM,CAAC;YACd,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC;4BACkB,IAAI,CAAC,gBAAgB;;KAE5C,CAAC;IACJ,CAAC;IAEkB,gBAAgB;QACjC,KAAK,CAAC,gBAAgB,EAAE,CAAC;QACzB,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAEO,eAAe;QACrB,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAC5B,IAAI,GAAG,YAAY,iBAAiB,EAAE,CAAC;gBACrC,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;YACnC,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,YAAY,CAAC,aAAa,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;YACnD,CAAC;QACH,CAAC;IACH,CAAC;;AAhED,kBAAkB;AACF,oBAAM,GAAwB;IAC5C,YAAY;IACZ,GAAG,CAAA;;;;;KAKF;CACF,AARqB,CAQpB;AAIF;IADC,QAAQ,CAAC,EAAC,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;iDACV;AAO1C;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC;kDAGvE","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {css, CSSResultOrNative, html, type PropertyValues} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {AriaTablistElement} from '../../../aria/tabs/tablist.js';\nimport {adoptStyles} from '../../styles/adopt-styles.js';\n\nimport navBarStyles from './nav-bar.css' with {type: 'css'}; // github-only\n// import {styles as navBarStyles} from './nav-bar.cssresult.js'; // google3-only\n\nimport {navBar, type NavBarItemLayout} from './nav-bar.js';\nimport {NavBarItemElement} from './nav-bar-item-element.js';\n\n/**\n * A Material Design gBreeze navigation bar component.\n *\n * @slot - Used to display navigation bar items (`md-gb-nav-bar-item`).\n * @csspart nav-bar - The navigation bar's root container.\n * @fires {Event} change - Fired when the selected navigation bar item changes. --bubbles\n * @cssprop --container-color\n * @cssprop --container-elevation\n * @cssprop --container-height\n * @cssprop --container-shadow-color\n * @cssprop --container-shape\n * @cssprop --item-active-icon-color\n * @cssprop --item-active-indicator-color\n * @cssprop --item-active-indicator-height\n * @cssprop --item-active-indicator-icon-label-space\n * @cssprop --item-active-indicator-leading-space\n * @cssprop --item-active-indicator-shape\n * @cssprop --item-active-indicator-trailing-space\n * @cssprop --item-active-indicator-width\n * @cssprop --item-active-label-text-color\n * @cssprop --item-active-state-layer-color\n * @cssprop --item-between-space\n * @cssprop --item-container-between-space\n * @cssprop --item-icon-size\n * @cssprop --item-inactive-icon-color\n * @cssprop --item-inactive-label-text-color\n * @cssprop --item-inactive-state-layer-color\n * @cssprop --item-label-text\n * @cssprop --item-label-text-axes\n * @cssprop --item-label-text-tracking\n * @cssprop --motion-duration\n * @cssprop --motion-easing\n */\nexport class NavBarElement extends AriaTablistElement {\n /** @nocollapse */\n static override styles: CSSResultOrNative[] = [\n navBarStyles,\n css`\n :host {\n display: flex;\n width: 100%;\n }\n `,\n ];\n\n /** The layout orientation of items ('vertical' or 'horizontal'). */\n @property({attribute: 'item-layout', reflect: true})\n itemLayout: NavBarItemLayout = 'vertical';\n\n /**\n * The 0-based index of the currently active navigation bar item.\n * Alias for `selectedTabIndex`.\n */\n @property({type: Number, attribute: 'selected-index', noAccessor: true})\n get selectedIndex(): number {\n return this.selectedTabIndex;\n }\n set selectedIndex(index: number) {\n this.selectedTabIndex = index;\n }\n\n override connectedCallback() {\n super.connectedCallback();\n adoptStyles(this, navBarStyles);\n }\n\n protected override updated(changedProperties: PropertyValues<this>) {\n super.updated(changedProperties);\n if (changedProperties.has('itemLayout')) {\n this.syncItemsLayout();\n }\n }\n\n protected override render() {\n return html`\n <div\n part=\"nav-bar\"\n class=\"${navBar({\n itemLayout: this.itemLayout,\n })}\">\n <slot @slotchange=${this.handleSlotChange}></slot>\n </div>\n `;\n }\n\n protected override handleSlotChange() {\n super.handleSlotChange();\n this.syncItemsLayout();\n }\n\n private syncItemsLayout() {\n for (const tab of this.tabs) {\n if (tab instanceof NavBarItemElement) {\n tab.itemLayout = this.itemLayout;\n } else {\n tab.setAttribute('item-layout', this.itemLayout);\n }\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { AriaTabElement } from '../../../aria/tabs/tab.js';
|
|
8
|
+
import { type NavBarItemLayout } from './nav-bar.js';
|
|
9
|
+
/**
|
|
10
|
+
* A Material Design gBreeze navigation bar item component.
|
|
11
|
+
*
|
|
12
|
+
* @slot - Used to display the item's label text.
|
|
13
|
+
* @slot icon - Used to display the item's icon (`md-gb-icon`).
|
|
14
|
+
* @slot badge - Used to display a custom badge on the item's icon.
|
|
15
|
+
* @csspart nav-bar-item - The navigation bar item's presentational container.
|
|
16
|
+
* @csspart indicator - The active indicator / icon container element.
|
|
17
|
+
* @csspart label - The label text container element.
|
|
18
|
+
* @cssstate selected - Whether the navigation bar item is selected.
|
|
19
|
+
*/
|
|
20
|
+
export declare class NavBarItemElement extends AriaTabElement {
|
|
21
|
+
/** @nocollapse */
|
|
22
|
+
static styles: CSSResultOrNative[];
|
|
23
|
+
constructor();
|
|
24
|
+
get selected(): boolean;
|
|
25
|
+
set selected(value: boolean);
|
|
26
|
+
/** Whether the navigation bar item is active. Alias for `selected`. */
|
|
27
|
+
get active(): boolean;
|
|
28
|
+
set active(value: boolean);
|
|
29
|
+
/** Whether the navigation bar item is disabled. */
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
/** The layout orientation of the item ('vertical' or 'horizontal'). */
|
|
32
|
+
itemLayout: NavBarItemLayout;
|
|
33
|
+
/** Optional label text if not provided via default slot. */
|
|
34
|
+
label: string;
|
|
35
|
+
/** Optional badge text (or 'dot' / 'true' for a small dot badge). */
|
|
36
|
+
badge: string;
|
|
37
|
+
connectedCallback(): void;
|
|
38
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
39
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
40
|
+
private syncSlottedIcons;
|
|
41
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { __decorate } from "tslib";
|
|
7
|
+
import { css, html, nothing } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { AriaTabElement } from '../../../aria/tabs/tab.js';
|
|
10
|
+
import { internals } from '../../../behaviors/element-internals.js';
|
|
11
|
+
import { isFocusable } from '../../../behaviors/focusable.js';
|
|
12
|
+
import { adoptStyles } from '../../styles/adopt-styles.js';
|
|
13
|
+
import focusRingStyles from '../focus/focus-ring.css' with { type: 'css' }; // github-only
|
|
14
|
+
// import {styles as focusRingStyles} from '../focus/focus-ring.cssresult.js'; // google3-only
|
|
15
|
+
import rippleStyles from '../ripple/ripple.css' with { type: 'css' }; // github-only
|
|
16
|
+
// import {styles as rippleStyles} from '../ripple/ripple.cssresult.js'; // google3-only
|
|
17
|
+
import navBarStyles from './nav-bar.css' with { type: 'css' }; // github-only
|
|
18
|
+
// import {styles as navBarStyles} from './nav-bar.cssresult.js'; // google3-only
|
|
19
|
+
import { navBarItem } from './nav-bar.js';
|
|
20
|
+
/**
|
|
21
|
+
* A Material Design gBreeze navigation bar item component.
|
|
22
|
+
*
|
|
23
|
+
* @slot - Used to display the item's label text.
|
|
24
|
+
* @slot icon - Used to display the item's icon (`md-gb-icon`).
|
|
25
|
+
* @slot badge - Used to display a custom badge on the item's icon.
|
|
26
|
+
* @csspart nav-bar-item - The navigation bar item's presentational container.
|
|
27
|
+
* @csspart indicator - The active indicator / icon container element.
|
|
28
|
+
* @csspart label - The label text container element.
|
|
29
|
+
* @cssstate selected - Whether the navigation bar item is selected.
|
|
30
|
+
*/
|
|
31
|
+
export class NavBarItemElement extends AriaTabElement {
|
|
32
|
+
constructor() {
|
|
33
|
+
super();
|
|
34
|
+
/** Whether the navigation bar item is disabled. */
|
|
35
|
+
this.disabled = false;
|
|
36
|
+
/** The layout orientation of the item ('vertical' or 'horizontal'). */
|
|
37
|
+
this.itemLayout = 'vertical';
|
|
38
|
+
/** Optional label text if not provided via default slot. */
|
|
39
|
+
this.label = '';
|
|
40
|
+
/** Optional badge text (or 'dot' / 'true' for a small dot badge). */
|
|
41
|
+
this.badge = '';
|
|
42
|
+
this.addEventListener('click', (event) => {
|
|
43
|
+
if (this.disabled) {
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
event.stopImmediatePropagation();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
get selected() {
|
|
50
|
+
return super.selected;
|
|
51
|
+
}
|
|
52
|
+
set selected(value) {
|
|
53
|
+
const oldValue = this.selected;
|
|
54
|
+
super.selected = value;
|
|
55
|
+
this.requestUpdate('active', oldValue);
|
|
56
|
+
}
|
|
57
|
+
/** Whether the navigation bar item is active. Alias for `selected`. */
|
|
58
|
+
get active() {
|
|
59
|
+
return this.selected;
|
|
60
|
+
}
|
|
61
|
+
set active(value) {
|
|
62
|
+
this.selected = value;
|
|
63
|
+
}
|
|
64
|
+
connectedCallback() {
|
|
65
|
+
super.connectedCallback();
|
|
66
|
+
adoptStyles(this, [focusRingStyles, rippleStyles, navBarStyles]);
|
|
67
|
+
this.syncSlottedIcons();
|
|
68
|
+
}
|
|
69
|
+
updated(changedProperties) {
|
|
70
|
+
super.updated(changedProperties);
|
|
71
|
+
if (changedProperties.has('disabled')) {
|
|
72
|
+
this[internals].ariaDisabled = String(this.disabled);
|
|
73
|
+
this[isFocusable] = !this.disabled;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
render() {
|
|
77
|
+
const isActive = this.selected;
|
|
78
|
+
const isDotBadge = this.badge === 'dot' || this.badge === 'true';
|
|
79
|
+
const hasBadge = Boolean(this.badge);
|
|
80
|
+
return html `
|
|
81
|
+
<div
|
|
82
|
+
part="nav-bar-item"
|
|
83
|
+
class="${navBarItem({
|
|
84
|
+
active: isActive,
|
|
85
|
+
disabled: this.disabled,
|
|
86
|
+
itemLayout: this.itemLayout,
|
|
87
|
+
})} ripple-host focus-ring-host"
|
|
88
|
+
?disabled=${this.disabled}>
|
|
89
|
+
<span class="nav-bar-item-content">
|
|
90
|
+
<span part="indicator" class="nav-bar-item-icon-container">
|
|
91
|
+
<span class="nav-bar-item-icon">
|
|
92
|
+
<slot name="icon" @slotchange=${this.syncSlottedIcons}></slot>
|
|
93
|
+
</span>
|
|
94
|
+
${hasBadge
|
|
95
|
+
? html `<span
|
|
96
|
+
class="nav-bar-item-badge ${isDotBadge
|
|
97
|
+
? 'nav-bar-item-badge-dot'
|
|
98
|
+
: ''}">
|
|
99
|
+
${isDotBadge ? nothing : this.badge}
|
|
100
|
+
</span>`
|
|
101
|
+
: html `<slot name="badge"></slot>`}
|
|
102
|
+
</span>
|
|
103
|
+
<span part="label" class="nav-bar-item-label">
|
|
104
|
+
<slot @slotchange=${this.syncSlottedIcons}>${this.label}</slot>
|
|
105
|
+
</span>
|
|
106
|
+
</span>
|
|
107
|
+
</div>
|
|
108
|
+
`;
|
|
109
|
+
}
|
|
110
|
+
syncSlottedIcons() {
|
|
111
|
+
const icons = this.querySelectorAll('md-gb-icon:not([slot])');
|
|
112
|
+
for (const icon of Array.from(icons)) {
|
|
113
|
+
icon.setAttribute('slot', 'icon');
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/** @nocollapse */
|
|
118
|
+
NavBarItemElement.styles = [
|
|
119
|
+
focusRingStyles,
|
|
120
|
+
rippleStyles,
|
|
121
|
+
navBarStyles,
|
|
122
|
+
css `
|
|
123
|
+
:host {
|
|
124
|
+
display: flex;
|
|
125
|
+
flex: 1 1 0;
|
|
126
|
+
min-width: 48px;
|
|
127
|
+
outline: none;
|
|
128
|
+
}
|
|
129
|
+
`,
|
|
130
|
+
];
|
|
131
|
+
__decorate([
|
|
132
|
+
property({ type: Boolean, reflect: true, noAccessor: true })
|
|
133
|
+
], NavBarItemElement.prototype, "active", null);
|
|
134
|
+
__decorate([
|
|
135
|
+
property({ type: Boolean, reflect: true })
|
|
136
|
+
], NavBarItemElement.prototype, "disabled", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
property({ attribute: 'item-layout', reflect: true })
|
|
139
|
+
], NavBarItemElement.prototype, "itemLayout", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
property()
|
|
142
|
+
], NavBarItemElement.prototype, "label", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
property()
|
|
145
|
+
], NavBarItemElement.prototype, "badge", void 0);
|
|
146
|
+
//# sourceMappingURL=nav-bar-item-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav-bar-item-element.js","sourceRoot":"","sources":["nav-bar-item-element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,GAAG,EAAqB,IAAI,EAAE,OAAO,EAAsB,MAAM,KAAK,CAAC;AAC/E,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAC,WAAW,EAAC,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAEzD,OAAO,eAAe,MAAM,yBAAyB,CAAC,OAAM,IAAI,EAAE,KAAK,EAAC,CAAC,CAAC,cAAc;AACxF,8FAA8F;AAC9F,OAAO,YAAY,MAAM,sBAAsB,CAAC,OAAM,IAAI,EAAE,KAAK,EAAC,CAAC,CAAC,cAAc;AAClF,wFAAwF;AACxF,OAAO,YAAY,MAAM,eAAe,CAAC,OAAM,IAAI,EAAE,KAAK,EAAC,CAAC,CAAC,cAAc;AAC3E,iFAAiF;AAEjF,OAAO,EAAC,UAAU,EAAwB,MAAM,cAAc,CAAC;AAE/D;;;;;;;;;;GAUG;AACH,MAAM,OAAO,iBAAkB,SAAQ,cAAc;IAgBnD;QACE,KAAK,EAAE,CAAC;QA2BV,mDAAmD;QACT,aAAQ,GAAG,KAAK,CAAC;QAE3D,uEAAuE;QAEvE,eAAU,GAAqB,UAAU,CAAC;QAE1C,4DAA4D;QAChD,UAAK,GAAG,EAAE,CAAC;QAEvB,qEAAqE;QACzD,UAAK,GAAG,EAAE,CAAC;QArCrB,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,KAAY,EAAE,EAAE;YAC9C,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,KAAK,CAAC,wBAAwB,EAAE,CAAC;YACnC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAa,QAAQ;QACnB,OAAO,KAAK,CAAC,QAAQ,CAAC;IACxB,CAAC;IACD,IAAa,QAAQ,CAAC,KAAc;QAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACzC,CAAC;IAED,uEAAuE;IAEvE,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IACD,IAAI,MAAM,CAAC,KAAc;QACvB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IAeQ,iBAAiB;QACxB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,WAAW,CAAC,IAAI,EAAE,CAAC,eAAe,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC;QACjE,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;IAEkB,OAAO,CAAC,iBAAuC;QAChE,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACjC,IAAI,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;YACtC,IAAI,CAAC,SAAS,CAAC,CAAC,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACrD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACrC,CAAC;IACH,CAAC;IAEkB,MAAM;QACvB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC;QACjE,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAErC,OAAO,IAAI,CAAA;;;iBAGE,UAAU,CAAC;YAClB,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC;oBACU,IAAI,CAAC,QAAQ;;;;8CAIa,IAAI,CAAC,gBAAgB;;cAErD,QAAQ;YACR,CAAC,CAAC,IAAI,CAAA;8CAC0B,UAAU;gBACpC,CAAC,CAAC,wBAAwB;gBAC1B,CAAC,CAAC,EAAE;oBACJ,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK;wBAC7B;YACV,CAAC,CAAC,IAAI,CAAA,4BAA4B;;;gCAGhB,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,KAAK;;;;KAI9D,CAAC;IACJ,CAAC;IAEO,gBAAgB;QACtB,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;QAC9D,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACrC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;;AA/GD,kBAAkB;AACF,wBAAM,GAAwB;IAC5C,eAAe;IACf,YAAY;IACZ,YAAY;IACZ,GAAG,CAAA;;;;;;;KAOF;CACF,AAZqB,CAYpB;AAuBF;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC;+CAG1D;AAMyC;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;mDAAkB;AAI3D;IADC,QAAQ,CAAC,EAAC,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;qDACV;AAG9B;IAAX,QAAQ,EAAE;gDAAY;AAGX;IAAX,QAAQ,EAAE;gDAAY","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {css, CSSResultOrNative, html, nothing, type PropertyValues} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {AriaTabElement} from '../../../aria/tabs/tab.js';\nimport {internals} from '../../../behaviors/element-internals.js';\nimport {isFocusable} from '../../../behaviors/focusable.js';\nimport {adoptStyles} from '../../styles/adopt-styles.js';\n\nimport focusRingStyles from '../focus/focus-ring.css' with {type: 'css'}; // github-only\n// import {styles as focusRingStyles} from '../focus/focus-ring.cssresult.js'; // google3-only\nimport rippleStyles from '../ripple/ripple.css' with {type: 'css'}; // github-only\n// import {styles as rippleStyles} from '../ripple/ripple.cssresult.js'; // google3-only\nimport navBarStyles from './nav-bar.css' with {type: 'css'}; // github-only\n// import {styles as navBarStyles} from './nav-bar.cssresult.js'; // google3-only\n\nimport {navBarItem, type NavBarItemLayout} from './nav-bar.js';\n\n/**\n * A Material Design gBreeze navigation bar item component.\n *\n * @slot - Used to display the item's label text.\n * @slot icon - Used to display the item's icon (`md-gb-icon`).\n * @slot badge - Used to display a custom badge on the item's icon.\n * @csspart nav-bar-item - The navigation bar item's presentational container.\n * @csspart indicator - The active indicator / icon container element.\n * @csspart label - The label text container element.\n * @cssstate selected - Whether the navigation bar item is selected.\n */\nexport class NavBarItemElement extends AriaTabElement {\n /** @nocollapse */\n static override styles: CSSResultOrNative[] = [\n focusRingStyles,\n rippleStyles,\n navBarStyles,\n css`\n :host {\n display: flex;\n flex: 1 1 0;\n min-width: 48px;\n outline: none;\n }\n `,\n ];\n\n constructor() {\n super();\n this.addEventListener('click', (event: Event) => {\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n });\n }\n\n override get selected(): boolean {\n return super.selected;\n }\n override set selected(value: boolean) {\n const oldValue = this.selected;\n super.selected = value;\n this.requestUpdate('active', oldValue);\n }\n\n /** Whether the navigation bar item is active. Alias for `selected`. */\n @property({type: Boolean, reflect: true, noAccessor: true})\n get active(): boolean {\n return this.selected;\n }\n set active(value: boolean) {\n this.selected = value;\n }\n\n /** Whether the navigation bar item is disabled. */\n @property({type: Boolean, reflect: true}) disabled = false;\n\n /** The layout orientation of the item ('vertical' or 'horizontal'). */\n @property({attribute: 'item-layout', reflect: true})\n itemLayout: NavBarItemLayout = 'vertical';\n\n /** Optional label text if not provided via default slot. */\n @property() label = '';\n\n /** Optional badge text (or 'dot' / 'true' for a small dot badge). */\n @property() badge = '';\n\n override connectedCallback() {\n super.connectedCallback();\n adoptStyles(this, [focusRingStyles, rippleStyles, navBarStyles]);\n this.syncSlottedIcons();\n }\n\n protected override updated(changedProperties: PropertyValues<this>) {\n super.updated(changedProperties);\n if (changedProperties.has('disabled')) {\n this[internals].ariaDisabled = String(this.disabled);\n this[isFocusable] = !this.disabled;\n }\n }\n\n protected override render() {\n const isActive = this.selected;\n const isDotBadge = this.badge === 'dot' || this.badge === 'true';\n const hasBadge = Boolean(this.badge);\n\n return html`\n <div\n part=\"nav-bar-item\"\n class=\"${navBarItem({\n active: isActive,\n disabled: this.disabled,\n itemLayout: this.itemLayout,\n })} ripple-host focus-ring-host\"\n ?disabled=${this.disabled}>\n <span class=\"nav-bar-item-content\">\n <span part=\"indicator\" class=\"nav-bar-item-icon-container\">\n <span class=\"nav-bar-item-icon\">\n <slot name=\"icon\" @slotchange=${this.syncSlottedIcons}></slot>\n </span>\n ${hasBadge\n ? html`<span\n class=\"nav-bar-item-badge ${isDotBadge\n ? 'nav-bar-item-badge-dot'\n : ''}\">\n ${isDotBadge ? nothing : this.badge}\n </span>`\n : html`<slot name=\"badge\"></slot>`}\n </span>\n <span part=\"label\" class=\"nav-bar-item-label\">\n <slot @slotchange=${this.syncSlottedIcons}>${this.label}</slot>\n </span>\n </span>\n </div>\n `;\n }\n\n private syncSlottedIcons() {\n const icons = this.querySelectorAll('md-gb-icon:not([slot])');\n for (const icon of Array.from(icons)) {\n icon.setAttribute('slot', 'icon');\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2026 Google LLC
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/@layer md.sys, md.comp.ripple, md.comp.focus-ring;@layer md.comp.nav-bar{:host(md-gb-nav-bar){--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);--nav-bar: true;display:flex;width:100%}:host(md-gb-nav-bar[item-layout=horizontal]){--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}:host(md-gb-nav-bar[item-layout=vertical]){--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-container-between-space: 6px}:host(md-gb-nav-bar-item){--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);display:flex;flex:1 1 0;min-width:48px;outline:none}:host(md-gb-nav-bar-item[item-layout=horizontal]){--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}:host(md-gb-nav-bar-item[item-layout=vertical]){--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-container-between-space: 6px}md-gb-nav-bar{--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);--nav-bar: true;display:flex;width:100%}md-gb-nav-bar[item-layout=horizontal]{--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}md-gb-nav-bar[item-layout=vertical]{--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-container-between-space: 6px}.nav-bar{--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);--md-elevation-shadow-color: var(--container-shadow-color);--nav-bar: true;align-items:stretch;background-color:var(--container-color);border:none;border-radius:var(--container-shape);box-shadow:var(--container-elevation);box-sizing:border-box;display:flex;flex-direction:row;gap:var(--item-between-space);height:var(--container-height);isolation:isolate;justify-content:space-around;margin:0;padding:0;position:relative;transition:all var(--motion-duration) var(--motion-easing);user-select:none;width:100%}.nav-bar>:focus-within,.nav-bar ::slotted(:focus-within){z-index:1}.nav-bar.nav-bar-horizontal{--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}.nav-bar.nav-bar-vertical{--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-container-between-space: 6px}.nav-bar-item{--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);--md-icon-color: var(--item-inactive-icon-color);--md-icon-fill: 0;--md-icon-size: var(--item-icon-size);--ripple-color: var(--item-inactive-state-layer-color);align-items:center;appearance:none;background:rgba(0,0,0,0);background-image:none;border:none;border-radius:var(--md-sys-space-100);box-sizing:border-box;color:var(--item-inactive-label-text-color);cursor:pointer;display:flex;flex:1 1 0;flex-direction:column;font:var(--item-label-text);font-variation-settings:var(--item-label-text-axes);height:100%;justify-content:center;letter-spacing:var(--item-label-text-tracking);margin:0;min-width:48px;padding:0;position:relative;text-decoration:none;transition:all var(--motion-duration) var(--motion-easing);user-select:none;width:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}.nav-bar-item:disabled,.nav-bar-item[disabled],.nav-bar-item.disabled{cursor:default;opacity:.38;pointer-events:none}.nav-bar-item-content{align-items:center;border-radius:var(--item-active-indicator-shape);box-sizing:border-box;display:flex;flex-direction:column;gap:var(--item-active-indicator-icon-label-space);justify-content:center;padding-block:var(--item-container-between-space);position:relative;transition:all var(--motion-duration) var(--motion-easing)}.nav-bar-item-icon-container{align-items:center;background-color:rgba(0,0,0,0);border-radius:var(--item-active-indicator-shape);color:var(--item-inactive-icon-color);display:flex;height:var(--item-active-indicator-height);isolation:isolate;justify-content:center;position:relative;transition:all var(--motion-duration) var(--motion-easing);width:var(--item-active-indicator-width)}.nav-bar-item-icon-container::before{background-color:var(--item-active-indicator-color);border-radius:var(--item-active-indicator-shape);content:"";inset:0;opacity:0;position:absolute;transform:scaleX(0.5);transition:all var(--motion-duration) var(--motion-easing);z-index:-2}.nav-bar-item-icon{align-items:center;display:inline-flex;height:var(--item-icon-size);justify-content:center;position:relative;transition:all var(--motion-duration) var(--motion-easing);width:var(--item-icon-size)}.nav-bar-item-label{color:var(--item-inactive-label-text-color);font:var(--item-label-text);font-variation-settings:var(--item-label-text-axes);letter-spacing:var(--item-label-text-tracking);overflow:hidden;text-align:center;text-overflow:ellipsis;transition:all var(--motion-duration) var(--motion-easing);white-space:nowrap}.nav-bar-item-badge{align-items:center;background-color:var(--md-sys-color-error);border-radius:var(--md-sys-shape-corner-full);box-sizing:border-box;color:var(--md-sys-color-on-error);display:inline-flex;font:var(--md-sys-typescale-label-sm);height:16px;inset-block-start:-4px;inset-inline-start:calc(50% + 2px);justify-content:center;min-width:16px;padding-inline:4px;pointer-events:none;position:absolute;transition:all var(--motion-duration) var(--motion-easing);z-index:2}.nav-bar-item-badge-dot{height:6px;inset-block-start:0;inset-inline-start:calc(50% + 6px);min-width:6px;padding-inline:0;width:6px}.nav-bar-item:is(.nav-bar-item-active,[aria-selected=true]){--md-icon-color: var(--item-active-icon-color);--md-icon-fill: 1;--ripple-color: var(--item-active-state-layer-color);color:var(--item-active-label-text-color)}.nav-bar-item:is(.nav-bar-item-active,[aria-selected=true]) .nav-bar-item-icon-container{color:var(--item-active-icon-color)}.nav-bar-item:is(.nav-bar-item-active,[aria-selected=true]) .nav-bar-item-icon-container::before{opacity:1;transform:scaleX(1)}.nav-bar-item:is(.nav-bar-item-active,[aria-selected=true]) .nav-bar-item-label{color:var(--item-active-label-text-color)}.nav-bar-item-horizontal{--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}.nav-bar-item-horizontal .nav-bar-item-content{display:inline-flex;flex-direction:row;gap:var(--item-active-indicator-icon-label-space);height:var(--item-active-indicator-height);isolation:isolate;padding-block:0;padding-inline:var(--item-active-indicator-leading-space) var(--item-active-indicator-trailing-space)}.nav-bar-item-horizontal .nav-bar-item-content::before{background-color:var(--item-active-indicator-color);border-radius:var(--item-active-indicator-shape);content:"";inset:0;opacity:0;position:absolute;transform:scaleX(0.6);transition:all var(--motion-duration) var(--motion-easing);z-index:-2}.nav-bar-item-horizontal .nav-bar-item-icon-container{height:var(--item-icon-size);width:var(--item-icon-size)}.nav-bar-item-horizontal .nav-bar-item-icon-container::before{display:none}.nav-bar-item-horizontal:is(.nav-bar-item-active,[aria-selected=true]) .nav-bar-item-content::before{opacity:1;transform:scaleX(1)}}/*# sourceMappingURL=nav-bar.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["nav-bar.scss","_nav-bar-tokens.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAAA,GASA,kDAEA,uBACE,qBCLA,yDACA,wDACA,yBACA,qDACA,mDACA,qEACA,uEACA,qCACA,8CACA,4CACA,+DACA,6CACA,oCACA,8DACA,4EACA,4CACA,oCACA,uBACA,mEACA,yEACA,8EACA,oDACA,8DACA,sEACA,wDACA,wDDjBE,gBACA,aACA,WAGF,6CCyBA,qCACA,8CACA,4CACA,6CACA,oCAEA,2ED3BA,2CCaA,qCACA,8CACA,oCACA,8DACA,oCDbA,0BCrBA,yDACA,wDACA,yBACA,qDACA,mDACA,qEACA,uEACA,qCACA,8CACA,4CACA,+DACA,6CACA,oCACA,8DACA,4EACA,4CACA,oCACA,uBACA,mEACA,yEACA,8EACA,oDACA,8DACA,sEACA,wDACA,wDDDE,aACA,WACA,eACA,aAGF,kDCQA,qCACA,8CACA,4CACA,6CACA,oCAEA,2EDVA,gDCJA,qCACA,8CACA,oCACA,8DACA,oCDIA,cCtCA,yDACA,wDACA,yBACA,qDACA,mDACA,qEACA,uEACA,qCACA,8CACA,4CACA,+DACA,6CACA,oCACA,8DACA,4EACA,4CACA,oCACA,uBACA,mEACA,yEACA,8EACA,oDACA,8DACA,sEACA,wDACA,wDDgBE,gBACA,aACA,WAEA,sCCPF,qCACA,8CACA,4CACA,6CACA,oCAEA,2EDKE,oCCnBF,qCACA,8CACA,oCACA,8DACA,oCDoBA,SCtDA,yDACA,wDACA,yBACA,qDACA,mDACA,qEACA,uEACA,qCACA,8CACA,4CACA,+DACA,6CACA,oCACA,8DACA,4EACA,4CACA,oCACA,uBACA,mEACA,yEACA,8EACA,oDACA,8DACA,sEACA,wDACA,wDDgCE,2DACA,gBACA,oBACA,wCACA,YACA,qCACA,sCACA,sBACA,aACA,mBACA,8BACA,+BACA,kBACA,6BACA,SACA,UACA,kBACA,2DACA,iBACA,WAEA,yDAEE,UAGF,4BC7CF,qCACA,8CACA,4CACA,6CACA,oCAEA,2ED2CE,0BCzDF,qCACA,8CACA,oCACA,8DACA,oCD0DA,cC5FA,yDACA,wDACA,yBACA,qDACA,mDACA,qEACA,uEACA,qCACA,8CACA,4CACA,+DACA,6CACA,oCACA,8DACA,4EACA,4CACA,oCACA,uBACA,mEACA,yEACA,8EACA,oDACA,8DACA,sEACA,wDACA,wDDsEE,iDACA,kBACA,sCACA,uDACA,mBACA,gBACA,yBACA,sBACA,YACA,sCACA,sBACA,4CACA,eACA,aACA,WACA,sBACA,4BACA,oDACA,YACA,uBACA,+CACA,SACA,eACA,UACA,kBACA,qBACA,2DACA,iBACA,WACA,0CAEA,sEAGE,eACA,YACA,oBAIJ,sBACE,mBACA,iDACA,sBACA,aACA,sBACA,kDACA,uBACA,kDACA,kBACA,2DAGF,6BACE,mBACA,+BACA,iDACA,sCACA,aACA,2CACA,kBACA,uBACA,kBACA,2DACA,yCAEA,qCACE,oDACA,iDACA,WACA,QACA,UACA,kBACA,sBACA,2DACA,WAIJ,mBACE,mBACA,oBACA,6BACA,uBACA,kBACA,2DACA,4BAGF,oBACE,4CACA,4BACA,oDACA,+CACA,gBACA,kBACA,uBACA,2DACA,mBAGF,oBACE,mBACA,2CACA,8CACA,sBACA,mCACA,oBACA,sCACA,YACA,uBACA,mCACA,uBACA,eACA,mBACA,oBACA,kBACA,2DACA,UAGF,wBACE,WACA,oBACA,mCACA,cACA,iBACA,UAGF,4DACE,+CACA,kBACA,qDACA,0CAEA,yFACE,oCAEA,iGACE,UACA,oBAIJ,gFACE,0CAIJ,yBC/MA,qCACA,8CACA,4CACA,6CACA,oCAEA,2ED4ME,+CACE,oBACA,mBACA,kDACA,2CACA,kBACA,gBACA,sGAGA,uDACE,oDACA,iDACA,WACA,QACA,UACA,kBACA,sBACA,2DACA,WAIJ,sDACE,6BACA,4BAEA,8DACE,aAKF,qGACE,UACA","file":"nav-bar.css"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
// Generated stylesheet for ./labs/gb/components/navbar/nav-bar.css.
|
|
7
|
+
import { css } from 'lit';
|
|
8
|
+
export const styles = css `/*!
|
|
9
|
+
* Copyright 2026 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
11
|
+
*/@layer md.sys, md.comp.ripple, md.comp.focus-ring;@layer md.comp.nav-bar{:host(md-gb-nav-bar){--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);--nav-bar: true;display:flex;width:100%}:host(md-gb-nav-bar[item-layout=horizontal]){--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}:host(md-gb-nav-bar[item-layout=vertical]){--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-container-between-space: 6px}:host(md-gb-nav-bar-item){--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);display:flex;flex:1 1 0;min-width:48px;outline:none}:host(md-gb-nav-bar-item[item-layout=horizontal]){--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}:host(md-gb-nav-bar-item[item-layout=vertical]){--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-container-between-space: 6px}md-gb-nav-bar{--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);--nav-bar: true;display:flex;width:100%}md-gb-nav-bar[item-layout=horizontal]{--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}md-gb-nav-bar[item-layout=vertical]{--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-container-between-space: 6px}.nav-bar{--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);--md-elevation-shadow-color: var(--container-shadow-color);--nav-bar: true;align-items:stretch;background-color:var(--container-color);border:none;border-radius:var(--container-shape);box-shadow:var(--container-elevation);box-sizing:border-box;display:flex;flex-direction:row;gap:var(--item-between-space);height:var(--container-height);isolation:isolate;justify-content:space-around;margin:0;padding:0;position:relative;transition:all var(--motion-duration) var(--motion-easing);user-select:none;width:100%}.nav-bar>:focus-within,.nav-bar ::slotted(:focus-within){z-index:1}.nav-bar.nav-bar-horizontal{--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}.nav-bar.nav-bar-vertical{--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-container-between-space: 6px}.nav-bar-item{--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);--md-icon-color: var(--item-inactive-icon-color);--md-icon-fill: 0;--md-icon-size: var(--item-icon-size);--ripple-color: var(--item-inactive-state-layer-color);align-items:center;appearance:none;background:rgba(0,0,0,0);background-image:none;border:none;border-radius:var(--md-sys-space-100);box-sizing:border-box;color:var(--item-inactive-label-text-color);cursor:pointer;display:flex;flex:1 1 0;flex-direction:column;font:var(--item-label-text);font-variation-settings:var(--item-label-text-axes);height:100%;justify-content:center;letter-spacing:var(--item-label-text-tracking);margin:0;min-width:48px;padding:0;position:relative;text-decoration:none;transition:all var(--motion-duration) var(--motion-easing);user-select:none;width:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}.nav-bar-item:disabled,.nav-bar-item[disabled],.nav-bar-item.disabled{cursor:default;opacity:.38;pointer-events:none}.nav-bar-item-content{align-items:center;border-radius:var(--item-active-indicator-shape);box-sizing:border-box;display:flex;flex-direction:column;gap:var(--item-active-indicator-icon-label-space);justify-content:center;padding-block:var(--item-container-between-space);position:relative;transition:all var(--motion-duration) var(--motion-easing)}.nav-bar-item-icon-container{align-items:center;background-color:rgba(0,0,0,0);border-radius:var(--item-active-indicator-shape);color:var(--item-inactive-icon-color);display:flex;height:var(--item-active-indicator-height);isolation:isolate;justify-content:center;position:relative;transition:all var(--motion-duration) var(--motion-easing);width:var(--item-active-indicator-width)}.nav-bar-item-icon-container::before{background-color:var(--item-active-indicator-color);border-radius:var(--item-active-indicator-shape);content:"";inset:0;opacity:0;position:absolute;transform:scaleX(0.5);transition:all var(--motion-duration) var(--motion-easing);z-index:-2}.nav-bar-item-icon{align-items:center;display:inline-flex;height:var(--item-icon-size);justify-content:center;position:relative;transition:all var(--motion-duration) var(--motion-easing);width:var(--item-icon-size)}.nav-bar-item-label{color:var(--item-inactive-label-text-color);font:var(--item-label-text);font-variation-settings:var(--item-label-text-axes);letter-spacing:var(--item-label-text-tracking);overflow:hidden;text-align:center;text-overflow:ellipsis;transition:all var(--motion-duration) var(--motion-easing);white-space:nowrap}.nav-bar-item-badge{align-items:center;background-color:var(--md-sys-color-error);border-radius:var(--md-sys-shape-corner-full);box-sizing:border-box;color:var(--md-sys-color-on-error);display:inline-flex;font:var(--md-sys-typescale-label-sm);height:16px;inset-block-start:-4px;inset-inline-start:calc(50% + 2px);justify-content:center;min-width:16px;padding-inline:4px;pointer-events:none;position:absolute;transition:all var(--motion-duration) var(--motion-easing);z-index:2}.nav-bar-item-badge-dot{height:6px;inset-block-start:0;inset-inline-start:calc(50% + 6px);min-width:6px;padding-inline:0;width:6px}.nav-bar-item:is(.nav-bar-item-active,[aria-selected=true]){--md-icon-color: var(--item-active-icon-color);--md-icon-fill: 1;--ripple-color: var(--item-active-state-layer-color);color:var(--item-active-label-text-color)}.nav-bar-item:is(.nav-bar-item-active,[aria-selected=true]) .nav-bar-item-icon-container{color:var(--item-active-icon-color)}.nav-bar-item:is(.nav-bar-item-active,[aria-selected=true]) .nav-bar-item-icon-container::before{opacity:1;transform:scaleX(1)}.nav-bar-item:is(.nav-bar-item-active,[aria-selected=true]) .nav-bar-item-label{color:var(--item-active-label-text-color)}.nav-bar-item-horizontal{--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}.nav-bar-item-horizontal .nav-bar-item-content{display:inline-flex;flex-direction:row;gap:var(--item-active-indicator-icon-label-space);height:var(--item-active-indicator-height);isolation:isolate;padding-block:0;padding-inline:var(--item-active-indicator-leading-space) var(--item-active-indicator-trailing-space)}.nav-bar-item-horizontal .nav-bar-item-content::before{background-color:var(--item-active-indicator-color);border-radius:var(--item-active-indicator-shape);content:"";inset:0;opacity:0;position:absolute;transform:scaleX(0.6);transition:all var(--motion-duration) var(--motion-easing);z-index:-2}.nav-bar-item-horizontal .nav-bar-item-icon-container{height:var(--item-icon-size);width:var(--item-icon-size)}.nav-bar-item-horizontal .nav-bar-item-icon-container::before{display:none}.nav-bar-item-horizontal:is(.nav-bar-item-active,[aria-selected=true]) .nav-bar-item-content::before{opacity:1;transform:scaleX(1)}}
|
|
12
|
+
`;
|
|
13
|
+
export default styles.styleSheet;
|
|
14
|
+
//# sourceMappingURL=nav-bar.cssresult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav-bar.cssresult.js","sourceRoot":"","sources":["nav-bar.cssresult.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,oEAAoE;AACpE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;CAIxB,CAAC;AACF,eAAe,MAAM,CAAC,UAAW,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/gb/components/navbar/nav-bar.css.\nimport {css} from 'lit';\nexport const styles = css`/*!\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */@layer md.sys, md.comp.ripple, md.comp.focus-ring;@layer md.comp.nav-bar{:host(md-gb-nav-bar){--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);--nav-bar: true;display:flex;width:100%}:host(md-gb-nav-bar[item-layout=horizontal]){--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}:host(md-gb-nav-bar[item-layout=vertical]){--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-container-between-space: 6px}:host(md-gb-nav-bar-item){--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);display:flex;flex:1 1 0;min-width:48px;outline:none}:host(md-gb-nav-bar-item[item-layout=horizontal]){--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}:host(md-gb-nav-bar-item[item-layout=vertical]){--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-container-between-space: 6px}md-gb-nav-bar{--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);--nav-bar: true;display:flex;width:100%}md-gb-nav-bar[item-layout=horizontal]{--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}md-gb-nav-bar[item-layout=vertical]{--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-container-between-space: 6px}.nav-bar{--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);--md-elevation-shadow-color: var(--container-shadow-color);--nav-bar: true;align-items:stretch;background-color:var(--container-color);border:none;border-radius:var(--container-shape);box-shadow:var(--container-elevation);box-sizing:border-box;display:flex;flex-direction:row;gap:var(--item-between-space);height:var(--container-height);isolation:isolate;justify-content:space-around;margin:0;padding:0;position:relative;transition:all var(--motion-duration) var(--motion-easing);user-select:none;width:100%}.nav-bar>:focus-within,.nav-bar ::slotted(:focus-within){z-index:1}.nav-bar.nav-bar-horizontal{--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}.nav-bar.nav-bar-vertical{--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-container-between-space: 6px}.nav-bar-item{--container-color: var(--md-sys-color-surface-container);--container-elevation: var(--md-sys-elevation-shadow-2);--container-height: 64px;--container-shadow-color: var(--md-sys-color-shadow);--container-shape: var(--md-sys-shape-corner-none);--item-active-icon-color: var(--md-sys-color-on-secondary-container);--item-active-indicator-color: var(--md-sys-color-secondary-container);--item-active-indicator-height: 32px;--item-active-indicator-icon-label-space: 4px;--item-active-indicator-leading-space: 16px;--item-active-indicator-shape: var(--md-sys-shape-corner-full);--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: 56px;--item-active-label-text-color: var(--md-sys-color-secondary);--item-active-state-layer-color: var(--md-sys-color-on-secondary-container);--item-between-space: var(--md-sys-space-0);--item-container-between-space: 6px;--item-icon-size: 24px;--item-inactive-icon-color: var(--md-sys-color-on-surface-variant);--item-inactive-label-text-color: var(--md-sys-color-on-surface-variant);--item-inactive-state-layer-color: var(--md-sys-color-on-secondary-container);--item-label-text: var(--md-sys-typescale-label-md);--item-label-text-axes: var(--md-sys-typescale-label-md-axes);--item-label-text-tracking: var(--md-sys-typescale-label-md-tracking);--motion-duration: var(--md-sys-motion-duration-short4);--motion-easing: var(--md-sys-motion-easing-emphasized);--md-icon-color: var(--item-inactive-icon-color);--md-icon-fill: 0;--md-icon-size: var(--item-icon-size);--ripple-color: var(--item-inactive-state-layer-color);align-items:center;appearance:none;background:rgba(0,0,0,0);background-image:none;border:none;border-radius:var(--md-sys-space-100);box-sizing:border-box;color:var(--item-inactive-label-text-color);cursor:pointer;display:flex;flex:1 1 0;flex-direction:column;font:var(--item-label-text);font-variation-settings:var(--item-label-text-axes);height:100%;justify-content:center;letter-spacing:var(--item-label-text-tracking);margin:0;min-width:48px;padding:0;position:relative;text-decoration:none;transition:all var(--motion-duration) var(--motion-easing);user-select:none;width:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}.nav-bar-item:disabled,.nav-bar-item[disabled],.nav-bar-item.disabled{cursor:default;opacity:.38;pointer-events:none}.nav-bar-item-content{align-items:center;border-radius:var(--item-active-indicator-shape);box-sizing:border-box;display:flex;flex-direction:column;gap:var(--item-active-indicator-icon-label-space);justify-content:center;padding-block:var(--item-container-between-space);position:relative;transition:all var(--motion-duration) var(--motion-easing)}.nav-bar-item-icon-container{align-items:center;background-color:rgba(0,0,0,0);border-radius:var(--item-active-indicator-shape);color:var(--item-inactive-icon-color);display:flex;height:var(--item-active-indicator-height);isolation:isolate;justify-content:center;position:relative;transition:all var(--motion-duration) var(--motion-easing);width:var(--item-active-indicator-width)}.nav-bar-item-icon-container::before{background-color:var(--item-active-indicator-color);border-radius:var(--item-active-indicator-shape);content:\"\";inset:0;opacity:0;position:absolute;transform:scaleX(0.5);transition:all var(--motion-duration) var(--motion-easing);z-index:-2}.nav-bar-item-icon{align-items:center;display:inline-flex;height:var(--item-icon-size);justify-content:center;position:relative;transition:all var(--motion-duration) var(--motion-easing);width:var(--item-icon-size)}.nav-bar-item-label{color:var(--item-inactive-label-text-color);font:var(--item-label-text);font-variation-settings:var(--item-label-text-axes);letter-spacing:var(--item-label-text-tracking);overflow:hidden;text-align:center;text-overflow:ellipsis;transition:all var(--motion-duration) var(--motion-easing);white-space:nowrap}.nav-bar-item-badge{align-items:center;background-color:var(--md-sys-color-error);border-radius:var(--md-sys-shape-corner-full);box-sizing:border-box;color:var(--md-sys-color-on-error);display:inline-flex;font:var(--md-sys-typescale-label-sm);height:16px;inset-block-start:-4px;inset-inline-start:calc(50% + 2px);justify-content:center;min-width:16px;padding-inline:4px;pointer-events:none;position:absolute;transition:all var(--motion-duration) var(--motion-easing);z-index:2}.nav-bar-item-badge-dot{height:6px;inset-block-start:0;inset-inline-start:calc(50% + 6px);min-width:6px;padding-inline:0;width:6px}.nav-bar-item:is(.nav-bar-item-active,[aria-selected=true]){--md-icon-color: var(--item-active-icon-color);--md-icon-fill: 1;--ripple-color: var(--item-active-state-layer-color);color:var(--item-active-label-text-color)}.nav-bar-item:is(.nav-bar-item-active,[aria-selected=true]) .nav-bar-item-icon-container{color:var(--item-active-icon-color)}.nav-bar-item:is(.nav-bar-item-active,[aria-selected=true]) .nav-bar-item-icon-container::before{opacity:1;transform:scaleX(1)}.nav-bar-item:is(.nav-bar-item-active,[aria-selected=true]) .nav-bar-item-label{color:var(--item-active-label-text-color)}.nav-bar-item-horizontal{--item-active-indicator-height: 40px;--item-active-indicator-icon-label-space: 8px;--item-active-indicator-leading-space: 16px;--item-active-indicator-trailing-space: 16px;--item-active-indicator-width: auto;--item-active-label-text-color: var(--md-sys-color-on-secondary-container)}.nav-bar-item-horizontal .nav-bar-item-content{display:inline-flex;flex-direction:row;gap:var(--item-active-indicator-icon-label-space);height:var(--item-active-indicator-height);isolation:isolate;padding-block:0;padding-inline:var(--item-active-indicator-leading-space) var(--item-active-indicator-trailing-space)}.nav-bar-item-horizontal .nav-bar-item-content::before{background-color:var(--item-active-indicator-color);border-radius:var(--item-active-indicator-shape);content:\"\";inset:0;opacity:0;position:absolute;transform:scaleX(0.6);transition:all var(--motion-duration) var(--motion-easing);z-index:-2}.nav-bar-item-horizontal .nav-bar-item-icon-container{height:var(--item-icon-size);width:var(--item-icon-size)}.nav-bar-item-horizontal .nav-bar-item-icon-container::before{display:none}.nav-bar-item-horizontal:is(.nav-bar-item-active,[aria-selected=true]) .nav-bar-item-content::before{opacity:1;transform:scaleX(1)}}\n`;\nexport default styles.styleSheet!;\n"]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { type ClassInfo } from 'lit/directives/class-map.js';
|
|
7
|
+
/** Navigation bar item layout configuration types. */
|
|
8
|
+
export type NavBarItemLayout = 'vertical' | 'horizontal';
|
|
9
|
+
/** Navigation bar item layout configurations. */
|
|
10
|
+
export declare const NAV_BAR_ITEM_LAYOUTS: {
|
|
11
|
+
readonly vertical: "vertical";
|
|
12
|
+
readonly horizontal: "horizontal";
|
|
13
|
+
};
|
|
14
|
+
/** Navigation bar classes constants. */
|
|
15
|
+
export declare const NAV_BAR_CLASSES: {
|
|
16
|
+
readonly navBar: "nav-bar";
|
|
17
|
+
readonly navBarVertical: "nav-bar-vertical";
|
|
18
|
+
readonly navBarHorizontal: "nav-bar-horizontal";
|
|
19
|
+
};
|
|
20
|
+
/** The state provided to the `navBarClasses()` function. */
|
|
21
|
+
export interface NavBarClassesState {
|
|
22
|
+
/** The layout orientation of items inside the navigation bar. */
|
|
23
|
+
itemLayout?: NavBarItemLayout;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Returns navigation bar classes to apply based on the given state.
|
|
27
|
+
*
|
|
28
|
+
* @param state The state of the navigation bar.
|
|
29
|
+
* @return An object of class names and truthy values if they apply.
|
|
30
|
+
*/
|
|
31
|
+
export declare function navBarClasses({ itemLayout, }?: NavBarClassesState): ClassInfo;
|
|
32
|
+
/**
|
|
33
|
+
* Lit directive for navigation bar element class styling.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* html`<nav class="${navBar({itemLayout: 'vertical'})}">
|
|
38
|
+
* <button class="${navBarItem({active: true})}">Home</button>
|
|
39
|
+
* </nav>`;
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare const navBar: (state?: NavBarClassesState & import("../shared/directives.js").AdditionalClasses) => import("lit-html/directive.js").DirectiveResult;
|
|
43
|
+
/** Navigation bar item classes constants. */
|
|
44
|
+
export declare const NAV_BAR_ITEM_CLASSES: {
|
|
45
|
+
readonly navBarItem: "nav-bar-item";
|
|
46
|
+
readonly navBarItemActive: "nav-bar-item-active";
|
|
47
|
+
readonly navBarItemVertical: "nav-bar-item-vertical";
|
|
48
|
+
readonly navBarItemHorizontal: "nav-bar-item-horizontal";
|
|
49
|
+
readonly navBarItemContent: "nav-bar-item-content";
|
|
50
|
+
readonly navBarItemIconContainer: "nav-bar-item-icon-container";
|
|
51
|
+
readonly navBarItemIcon: "nav-bar-item-icon";
|
|
52
|
+
readonly navBarItemLabel: "nav-bar-item-label";
|
|
53
|
+
readonly navBarItemBadge: "nav-bar-item-badge";
|
|
54
|
+
readonly navBarItemBadgeDot: "nav-bar-item-badge-dot";
|
|
55
|
+
};
|
|
56
|
+
/** The state provided to the `navBarItemClasses()` function. */
|
|
57
|
+
export interface NavBarItemClassesState {
|
|
58
|
+
/** Whether the navigation bar item is active/selected. */
|
|
59
|
+
active?: boolean;
|
|
60
|
+
/** Alias for `active`. */
|
|
61
|
+
selected?: boolean;
|
|
62
|
+
/** Whether the navigation bar item is disabled. */
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
/** The item layout orientation ('vertical' or 'horizontal'). */
|
|
65
|
+
itemLayout?: NavBarItemLayout;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Returns navigation bar item classes to apply based on the given state.
|
|
69
|
+
*
|
|
70
|
+
* @param state The state of the navigation bar item.
|
|
71
|
+
* @return An object of class names and truthy values if they apply.
|
|
72
|
+
*/
|
|
73
|
+
export declare function navBarItemClasses({ active, selected, disabled, itemLayout, }?: NavBarItemClassesState): ClassInfo;
|
|
74
|
+
/**
|
|
75
|
+
* Sets up navigation bar item functionality for the given element.
|
|
76
|
+
*
|
|
77
|
+
* @param item The element on which to set up navigation bar item functionality.
|
|
78
|
+
* @param opts Setup options, supports a cleanup `signal`.
|
|
79
|
+
*/
|
|
80
|
+
export declare function setupNavBarItem(item: HTMLElement, opts?: {
|
|
81
|
+
signal?: AbortSignal;
|
|
82
|
+
}): void;
|
|
83
|
+
/**
|
|
84
|
+
* Lit directive for navigation bar item element class styling.
|
|
85
|
+
*/
|
|
86
|
+
export declare const navBarItem: (state?: NavBarItemClassesState & import("../shared/directives.js").AdditionalClasses) => import("lit-html/directive.js").DirectiveResult;
|