@oicl/openbridge-webcomponents 2.0.0-next.59 → 2.0.0-next.60
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/bundle/openbridge-webcomponents.bundle.js +5557 -4305
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +1204 -25
- package/dist/components/navigation-item/navigation-item.css.js +5 -0
- package/dist/components/navigation-item/navigation-item.css.js.map +1 -1
- package/dist/components/navigation-item/navigation-item.d.ts +18 -0
- package/dist/components/navigation-item/navigation-item.d.ts.map +1 -1
- package/dist/components/navigation-item/navigation-item.js +49 -1
- package/dist/components/navigation-item/navigation-item.js.map +1 -1
- package/dist/components/navigation-item-group/navigation-item-group.css.js +8 -0
- package/dist/components/navigation-item-group/navigation-item-group.css.js.map +1 -1
- package/dist/components/navigation-item-group/navigation-item-group.d.ts +22 -0
- package/dist/components/navigation-item-group/navigation-item-group.d.ts.map +1 -1
- package/dist/components/navigation-item-group/navigation-item-group.js +63 -1
- package/dist/components/navigation-item-group/navigation-item-group.js.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts +29 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.js +105 -0
- package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/tree-navigation/tree-navigation.css.js +18 -0
- package/dist/components/tree-navigation/tree-navigation.css.js.map +1 -0
- package/dist/components/tree-navigation/tree-navigation.d.ts +74 -0
- package/dist/components/tree-navigation/tree-navigation.d.ts.map +1 -0
- package/dist/components/tree-navigation/tree-navigation.js +120 -0
- package/dist/components/tree-navigation/tree-navigation.js.map +1 -0
- package/dist/components/tree-navigation-group/tree-navigation-group.css.js +22 -0
- package/dist/components/tree-navigation-group/tree-navigation-group.css.js.map +1 -0
- package/dist/components/tree-navigation-group/tree-navigation-group.d.ts +94 -0
- package/dist/components/tree-navigation-group/tree-navigation-group.d.ts.map +1 -0
- package/dist/components/tree-navigation-group/tree-navigation-group.js +116 -0
- package/dist/components/tree-navigation-group/tree-navigation-group.js.map +1 -0
- package/dist/components/tree-navigation-item/tree-navigation-item.css.js +429 -0
- package/dist/components/tree-navigation-item/tree-navigation-item.css.js.map +1 -0
- package/dist/components/tree-navigation-item/tree-navigation-item.d.ts +160 -0
- package/dist/components/tree-navigation-item/tree-navigation-item.d.ts.map +1 -0
- package/dist/components/tree-navigation-item/tree-navigation-item.js +208 -0
- package/dist/components/tree-navigation-item/tree-navigation-item.js.map +1 -0
- package/dist/internal/tree-roving-navigator.d.ts +71 -0
- package/dist/internal/tree-roving-navigator.d.ts.map +1 -0
- package/dist/internal/tree-roving-navigator.js +172 -0
- package/dist/internal/tree-roving-navigator.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { unsafeCSS, LitElement, nothing, html } from "lit";
|
|
2
|
+
import { property, query } from "lit/decorators.js";
|
|
3
|
+
import componentStyle from "./tree-navigation-group.css.js";
|
|
4
|
+
import { customElement } from "../../decorator.js";
|
|
5
|
+
import { TreeTerminalType } from "../tree-navigation-item/tree-navigation-item.js";
|
|
6
|
+
import { BadgeType } from "../badge/badge.js";
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12
|
+
if (decorator = decorators[i])
|
|
13
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
14
|
+
if (kind && result) __defProp(target, key, result);
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
let ObcTreeNavigationGroup = class extends LitElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.label = "Group";
|
|
21
|
+
this.branches = [];
|
|
22
|
+
this.expanded = false;
|
|
23
|
+
this.checked = false;
|
|
24
|
+
this.disabled = false;
|
|
25
|
+
this.hasIcon = true;
|
|
26
|
+
this.terminalType = TreeTerminalType.regular;
|
|
27
|
+
this.hasAlertBadge = false;
|
|
28
|
+
this.alertCount = 0;
|
|
29
|
+
this.alertType = BadgeType.alarm;
|
|
30
|
+
}
|
|
31
|
+
onHeaderToggle(event) {
|
|
32
|
+
this.expanded = event.detail;
|
|
33
|
+
this.dispatchEvent(
|
|
34
|
+
new CustomEvent("expand-toggle", { detail: this.expanded })
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
/** Closes the group (and, recursively, any nested groups inside it). */
|
|
38
|
+
close() {
|
|
39
|
+
this.expanded = false;
|
|
40
|
+
this.querySelectorAll("obc-tree-navigation-group").forEach(
|
|
41
|
+
(group) => group.close()
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
focus(options) {
|
|
45
|
+
this.headerItem?.focus(options);
|
|
46
|
+
}
|
|
47
|
+
render() {
|
|
48
|
+
return html`
|
|
49
|
+
<obc-tree-navigation-item
|
|
50
|
+
part="header"
|
|
51
|
+
.label=${this.label}
|
|
52
|
+
.branches=${this.branches}
|
|
53
|
+
expandable
|
|
54
|
+
?expanded=${this.expanded}
|
|
55
|
+
?checked=${this.checked}
|
|
56
|
+
?disabled=${this.disabled}
|
|
57
|
+
.hasLeadingIcon=${this.hasIcon}
|
|
58
|
+
.terminalType=${this.terminalType}
|
|
59
|
+
?hasAlertBadge=${this.hasAlertBadge}
|
|
60
|
+
.alertCount=${this.alertCount}
|
|
61
|
+
.alertType=${this.alertType}
|
|
62
|
+
.href=${this.href}
|
|
63
|
+
@expand-toggle=${this.onHeaderToggle}
|
|
64
|
+
>
|
|
65
|
+
${this.hasIcon ? html`<slot name="icon" slot="icon"></slot>` : nothing}
|
|
66
|
+
</obc-tree-navigation-item>
|
|
67
|
+
<div part="children" role="group" ?hidden=${!this.expanded}>
|
|
68
|
+
<slot></slot>
|
|
69
|
+
</div>
|
|
70
|
+
`;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
ObcTreeNavigationGroup.styles = unsafeCSS(componentStyle);
|
|
74
|
+
__decorateClass([
|
|
75
|
+
property({ type: String })
|
|
76
|
+
], ObcTreeNavigationGroup.prototype, "label", 2);
|
|
77
|
+
__decorateClass([
|
|
78
|
+
property({ type: Array })
|
|
79
|
+
], ObcTreeNavigationGroup.prototype, "branches", 2);
|
|
80
|
+
__decorateClass([
|
|
81
|
+
property({ type: Boolean, reflect: true })
|
|
82
|
+
], ObcTreeNavigationGroup.prototype, "expanded", 2);
|
|
83
|
+
__decorateClass([
|
|
84
|
+
property({ type: Boolean, reflect: true })
|
|
85
|
+
], ObcTreeNavigationGroup.prototype, "checked", 2);
|
|
86
|
+
__decorateClass([
|
|
87
|
+
property({ type: Boolean, reflect: true })
|
|
88
|
+
], ObcTreeNavigationGroup.prototype, "disabled", 2);
|
|
89
|
+
__decorateClass([
|
|
90
|
+
property({ type: Boolean, attribute: false })
|
|
91
|
+
], ObcTreeNavigationGroup.prototype, "hasIcon", 2);
|
|
92
|
+
__decorateClass([
|
|
93
|
+
property({ type: String })
|
|
94
|
+
], ObcTreeNavigationGroup.prototype, "terminalType", 2);
|
|
95
|
+
__decorateClass([
|
|
96
|
+
property({ type: Boolean })
|
|
97
|
+
], ObcTreeNavigationGroup.prototype, "hasAlertBadge", 2);
|
|
98
|
+
__decorateClass([
|
|
99
|
+
property({ type: Number })
|
|
100
|
+
], ObcTreeNavigationGroup.prototype, "alertCount", 2);
|
|
101
|
+
__decorateClass([
|
|
102
|
+
property({ type: String })
|
|
103
|
+
], ObcTreeNavigationGroup.prototype, "alertType", 2);
|
|
104
|
+
__decorateClass([
|
|
105
|
+
property({ type: String })
|
|
106
|
+
], ObcTreeNavigationGroup.prototype, "href", 2);
|
|
107
|
+
__decorateClass([
|
|
108
|
+
query("obc-tree-navigation-item")
|
|
109
|
+
], ObcTreeNavigationGroup.prototype, "headerItem", 2);
|
|
110
|
+
ObcTreeNavigationGroup = __decorateClass([
|
|
111
|
+
customElement("obc-tree-navigation-group")
|
|
112
|
+
], ObcTreeNavigationGroup);
|
|
113
|
+
export {
|
|
114
|
+
ObcTreeNavigationGroup
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=tree-navigation-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-navigation-group.js","sources":["../../../src/components/tree-navigation-group/tree-navigation-group.ts"],"sourcesContent":["import {LitElement, html, nothing, unsafeCSS} from 'lit';\nimport {property, query} from 'lit/decorators.js';\nimport componentStyle from './tree-navigation-group.css?inline';\nimport {customElement} from '../../decorator.js';\nimport {\n ObcTreeNavigationItem,\n TreeBranchType,\n TreeTerminalType,\n} from '../tree-navigation-item/tree-navigation-item.js';\nimport '../tree-navigation-item/tree-navigation-item.js';\nimport {BadgeType} from '../badge/badge.js';\n\n/**\n * `<obc-tree-navigation-group>` – An expandable parent row in a tree-navigation\n * structure: a header row with an expand/collapse chevron, plus a slot for the\n * child rows it discloses.\n *\n * A group renders an `<obc-tree-navigation-item>` header (carrying its own label,\n * icon, terminal type, and alert badge) followed by its slotted children. When\n * placed inside `<obc-tree-navigation>`, the container computes and assigns the\n * `branches` guide lines for every row automatically from each row's position —\n * a group does not need its depth configured by hand.\n *\n * The group manages only its own open/closed state and forwards header presentation\n * to its internal header item. It does not draw guide lines itself; that is the\n * container's responsibility (see `<obc-tree-navigation>`).\n *\n * ## Features\n * - **Disclosure:** A chevron in the header toggles the slotted children. The open\n * state is held in `expanded` and reflected so the container and CSS can react.\n * - **Header presentation:** `label`, the `icon` slot, `terminalType`, and the\n * alert badge (`hasAlertBadge`, `alertCount`, `alertType`) are forwarded to the\n * header row.\n * - **Selection:** `checked` marks the group's header as the current item.\n * - **Automatic guides:** Inside `<obc-tree-navigation>`, the header's `branches`\n * are assigned by the container; nested groups continue the guide columns down.\n *\n * ## Usage Guidelines\n * - Nest `<obc-tree-navigation-item>` (leaves) and further `<obc-tree-navigation-group>`\n * elements as children to build the hierarchy.\n * - Always place groups and items inside an `<obc-tree-navigation>` container so the\n * guide lines are computed; using a group standalone draws a header with no guides.\n * - Provide a header icon via the `icon` slot (forwarded to the header row).\n *\n * ## Slots\n *\n * | Slot Name | Renders When... | Purpose |\n * |-----------|--------------------------|--------------------------------------------------------------|\n * | icon | `hasIcon` is true | Leading icon for the group header row. |\n * | (default) | Always | Child rows (`obc-tree-navigation-item` / `-group`). |\n *\n * @slot icon - Leading icon for the group header (shown when `hasIcon` is true).\n * @slot - Child rows disclosed when the group is expanded.\n * @fires expand-toggle {CustomEvent<boolean>} Fired when the header is activated; detail is the next `expanded` value.\n */\n@customElement('obc-tree-navigation-group')\nexport class ObcTreeNavigationGroup extends LitElement {\n /** The text label displayed for the group header row. */\n @property({type: String}) label = 'Group';\n\n /**\n * Guide line to draw for each ancestor level of the header row. Normally set by\n * the parent `<obc-tree-navigation>` container from the group's position; only\n * set it manually when using a group outside the container.\n */\n @property({type: Array}) branches: TreeBranchType[] = [];\n\n /** Whether the group is expanded, disclosing its children. Rotates the chevron. */\n @property({type: Boolean, reflect: true}) expanded = false;\n\n /** Whether the group header is the current selection. */\n @property({type: Boolean, reflect: true}) checked = false;\n\n /** Disables the group header, removing it from the tab order and dimming it. */\n @property({type: Boolean, reflect: true}) disabled = false;\n\n /** Whether the group header shows a leading icon (provided via the `icon` slot). */\n @property({type: Boolean, attribute: false}) hasIcon = true;\n\n /**\n * Terminal type for the header row, controlling the alert-header marker shown in\n * the terminal. One of `regular` (default), `aggregated-header`, or `group-header`.\n */\n @property({type: String}) terminalType: string = TreeTerminalType.regular;\n\n /** Whether a trailing alert counter badge is shown on the header row. */\n @property({type: Boolean}) hasAlertBadge = false;\n\n /** The number shown in the header's alert badge when `hasAlertBadge` is true. */\n @property({type: Number}) alertCount = 0;\n\n /** The severity/type of the header's alert badge. One of the `obc-badge` types (default `alarm`). */\n @property({type: String}) alertType: string = BadgeType.alarm;\n\n /**\n * The URL to navigate to when the header is activated. If set, the header row\n * renders as a link; otherwise it acts as a button.\n */\n @property({type: String}) href: string | undefined;\n\n @query('obc-tree-navigation-item') private headerItem?: ObcTreeNavigationItem;\n\n private onHeaderToggle(event: CustomEvent<boolean>) {\n this.expanded = event.detail;\n this.dispatchEvent(\n new CustomEvent<boolean>('expand-toggle', {detail: this.expanded})\n );\n }\n\n /** Closes the group (and, recursively, any nested groups inside it). */\n close() {\n this.expanded = false;\n this.querySelectorAll('obc-tree-navigation-group').forEach((group) =>\n group.close()\n );\n }\n\n public override focus(options?: FocusOptions): void {\n this.headerItem?.focus(options);\n }\n\n override render() {\n return html`\n <obc-tree-navigation-item\n part=\"header\"\n .label=${this.label}\n .branches=${this.branches}\n expandable\n ?expanded=${this.expanded}\n ?checked=${this.checked}\n ?disabled=${this.disabled}\n .hasLeadingIcon=${this.hasIcon}\n .terminalType=${this.terminalType}\n ?hasAlertBadge=${this.hasAlertBadge}\n .alertCount=${this.alertCount}\n .alertType=${this.alertType}\n .href=${this.href}\n @expand-toggle=${this.onHeaderToggle}\n >\n ${this.hasIcon ? html`<slot name=\"icon\" slot=\"icon\"></slot>` : nothing}\n </obc-tree-navigation-item>\n <div part=\"children\" role=\"group\" ?hidden=${!this.expanded}>\n <slot></slot>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\nexport type ObcTreeNavigationGroupExpandToggleEvent = CustomEvent<boolean>;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-tree-navigation-group': ObcTreeNavigationGroup;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAwDO,IAAM,yBAAN,cAAqC,WAAW;AAAA,EAAhD,cAAA;AAAA,UAAA,GAAA,SAAA;AAEqB,SAAA,QAAQ;AAOT,SAAA,WAA6B,CAAA;AAGZ,SAAA,WAAW;AAGX,SAAA,UAAU;AAGV,SAAA,WAAW;AAGR,SAAA,UAAU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display: block;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.wrapper {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: var(--menu-navigation-components-tree-navigation-item-touch-target);
|
|
20
|
+
user-select: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.wrapper:focus-visible {
|
|
24
|
+
outline-offset: -2px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.wrapper {
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.wrapper:focus {
|
|
32
|
+
outline: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.wrapper .visible-wrapper {
|
|
36
|
+
border-color: var(--flat-enabled-border-color);
|
|
37
|
+
background-color: var(--flat-enabled-background-color);
|
|
38
|
+
border-width: 1px;
|
|
39
|
+
border-style: solid;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
--base-border-color: var(--flat-enabled-border-color);
|
|
42
|
+
--base-background-color: var(--flat-enabled-background-color);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.wrapper.activated .visible-wrapper {
|
|
46
|
+
border-color: var(--flat-activated-border-color);
|
|
47
|
+
background-color: var(--flat-activated-background-color);
|
|
48
|
+
--base-border-color: var(--flat-activated-border-color);
|
|
49
|
+
--base-background-color: var(--flat-activated-background-color);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@media (hover:hover) {
|
|
53
|
+
|
|
54
|
+
.wrapper:hover .visible-wrapper {
|
|
55
|
+
border-color: color-mix(in srgb, var(--flat-hover-border-color) calc(var(--obc-can-hover) * 100%), var(--base-border-color));
|
|
56
|
+
background-color: color-mix(in srgb, var(--flat-hover-background-color) calc(var(--obc-can-hover) * 100%), var(--base-background-color));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.wrapper:active .visible-wrapper {
|
|
61
|
+
border-color: var(--flat-pressed-border-color);
|
|
62
|
+
background-color: var(--flat-pressed-background-color);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.wrapper:focus-visible .visible-wrapper {
|
|
66
|
+
outline-color: var(--border-focus-color);
|
|
67
|
+
outline-width: var(--global-size-spacing-border-weight-focusframe);
|
|
68
|
+
outline-style: solid;
|
|
69
|
+
border-color: var(--container-global-color);
|
|
70
|
+
z-index: 1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.wrapper:disabled .visible-wrapper {
|
|
74
|
+
border-color: var(--flat-disabled-border-color);
|
|
75
|
+
background-color: var(--flat-disabled-background-color);
|
|
76
|
+
cursor: not-allowed;
|
|
77
|
+
color: var(--on-flat-disabled-color) !important;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.wrapper.disabled .visible-wrapper {
|
|
81
|
+
border-color: var(--flat-disabled-border-color);
|
|
82
|
+
background-color: var(--flat-disabled-background-color);
|
|
83
|
+
cursor: not-allowed;
|
|
84
|
+
color: var(--on-flat-disabled-color) !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.wrapper:disabled {
|
|
88
|
+
cursor: not-allowed;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.wrapper.disabled {
|
|
92
|
+
cursor: not-allowed;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.wrapper {
|
|
96
|
+
font-family: var(--global-typography-font-family);
|
|
97
|
+
font-weight: var(--global-typography-ui-body-font-weight);
|
|
98
|
+
font-size: var(--global-typography-ui-body-font-size);
|
|
99
|
+
line-height: var(--global-typography-ui-body-line-height);
|
|
100
|
+
font-feature-settings:
|
|
101
|
+
"liga" off,
|
|
102
|
+
"clig" off,
|
|
103
|
+
"ss04" on;
|
|
104
|
+
color: var(--on-flat-active-color);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.wrapper .visible-wrapper {
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
width: 100%;
|
|
111
|
+
height: 100%;
|
|
112
|
+
border-radius: var(--global-border-radius-border-radius-base);
|
|
113
|
+
padding: 0
|
|
114
|
+
var(--menu-navigation-components-tree-navigation-item-padding-horizontal);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/*
|
|
118
|
+
* A checked row is not re-selectable, so it stays on the amplified enabled
|
|
119
|
+
* style with no hover/pressed feedback.
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
.wrapper.checked {
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.wrapper.checked:focus {
|
|
127
|
+
outline: none;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.wrapper.checked .visible-wrapper {
|
|
131
|
+
border-color: var(--amplified-enabled-border-color);
|
|
132
|
+
background-color: var(--amplified-enabled-background-color);
|
|
133
|
+
border-width: 1px;
|
|
134
|
+
border-style: solid;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
--base-border-color: var(--amplified-enabled-border-color);
|
|
137
|
+
--base-background-color: var(--amplified-enabled-background-color);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.wrapper.checked.activated .visible-wrapper {
|
|
141
|
+
border-color: var(--amplified-activated-border-color);
|
|
142
|
+
background-color: var(--amplified-activated-background-color);
|
|
143
|
+
--base-border-color: var(--amplified-activated-border-color);
|
|
144
|
+
--base-background-color: var(--amplified-activated-background-color);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@media (hover:hover) {
|
|
148
|
+
|
|
149
|
+
.wrapper.checked:hover .visible-wrapper {
|
|
150
|
+
border-color: color-mix(in srgb, var(--amplified-hover-border-color) calc(var(--obc-can-hover) * 100%), var(--base-border-color));
|
|
151
|
+
background-color: color-mix(in srgb, var(--amplified-hover-background-color) calc(var(--obc-can-hover) * 100%), var(--base-background-color));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.wrapper.checked:active .visible-wrapper {
|
|
156
|
+
border-color: var(--amplified-pressed-border-color);
|
|
157
|
+
background-color: var(--amplified-pressed-background-color);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.wrapper.checked:focus-visible .visible-wrapper {
|
|
161
|
+
outline-color: var(--border-focus-color);
|
|
162
|
+
outline-width: var(--global-size-spacing-border-weight-focusframe);
|
|
163
|
+
outline-style: solid;
|
|
164
|
+
border-color: var(--container-global-color);
|
|
165
|
+
z-index: 1;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.wrapper.checked:disabled .visible-wrapper {
|
|
169
|
+
border-color: var(--amplified-disabled-border-color);
|
|
170
|
+
background-color: var(--amplified-disabled-background-color);
|
|
171
|
+
cursor: not-allowed;
|
|
172
|
+
color: var(--on-amplified-disabled-color) !important;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.wrapper.checked.disabled .visible-wrapper {
|
|
176
|
+
border-color: var(--amplified-disabled-border-color);
|
|
177
|
+
background-color: var(--amplified-disabled-background-color);
|
|
178
|
+
cursor: not-allowed;
|
|
179
|
+
color: var(--on-amplified-disabled-color) !important;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.wrapper.checked:disabled {
|
|
183
|
+
cursor: not-allowed;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.wrapper.checked.disabled {
|
|
187
|
+
cursor: not-allowed;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.wrapper.checked {
|
|
191
|
+
cursor: default;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.wrapper.checked .visible-wrapper,.wrapper.checked:hover .visible-wrapper,.wrapper.checked:active .visible-wrapper {
|
|
195
|
+
background-color: var(--amplified-enabled-background-color);
|
|
196
|
+
border-color: var(--amplified-enabled-border-color);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.wrapper.checked .label {
|
|
200
|
+
font-family: var(--global-typography-font-family);
|
|
201
|
+
font-weight: var(--global-typography-ui-body-active-font-weight);
|
|
202
|
+
font-size: var(--global-typography-ui-body-active-font-size);
|
|
203
|
+
line-height: var(--global-typography-ui-body-active-line-height);
|
|
204
|
+
font-feature-settings:
|
|
205
|
+
"liga" off,
|
|
206
|
+
"clig" off,
|
|
207
|
+
"ss04" on;
|
|
208
|
+
color: var(--on-flat-active-color);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.wrapper.checked .leading-icon {
|
|
212
|
+
color: var(--on-amplified-active-color);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* Guide lines are tree structure, not row state, so they do not dim here. */
|
|
216
|
+
|
|
217
|
+
.wrapper.disabled {
|
|
218
|
+
color: var(--on-flat-disabled-color);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.wrapper.disabled .leading-icon {
|
|
222
|
+
color: var(--on-flat-disabled-color);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.tree-node-row {
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
height: 100%;
|
|
229
|
+
flex-shrink: 0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.branch {
|
|
233
|
+
position: relative;
|
|
234
|
+
height: 100%;
|
|
235
|
+
width: var(--menu-navigation-components-branch-width);
|
|
236
|
+
flex-shrink: 0;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/*
|
|
240
|
+
* Guide lines all run on a rail at 75% of each 32px column and share the faint
|
|
241
|
+
* outline color. Verticals and the dropdown bleed 1px past the row edges so they
|
|
242
|
+
* cross the visible-wrapper's 1px transparent flat border and meet the adjacent
|
|
243
|
+
* row's line with no seam gap.
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
.branch-vertical {
|
|
247
|
+
position: absolute;
|
|
248
|
+
top: -1px;
|
|
249
|
+
bottom: -1px;
|
|
250
|
+
left: 75%;
|
|
251
|
+
width: 1px;
|
|
252
|
+
transform: translateX(-0.5px);
|
|
253
|
+
background: var(--border-outline-color);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.branch-horizontal {
|
|
257
|
+
position: absolute;
|
|
258
|
+
top: 50%;
|
|
259
|
+
transform: translateY(-0.5px);
|
|
260
|
+
left: 75%;
|
|
261
|
+
right: 0;
|
|
262
|
+
height: 1px;
|
|
263
|
+
background: var(--border-outline-color);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/*
|
|
267
|
+
* Corner (└, last child): a single bordered box replaces the straight rects so
|
|
268
|
+
* the bend can be rounded. The box bleeds 1px past the column's right edge so its
|
|
269
|
+
* bottom border overlaps the terminal connector with no break, and translateY
|
|
270
|
+
* drops it 0.5px so that border lands on the connector's pixel row (else the join
|
|
271
|
+
* reads as a \`---___\` step). The radius stays tight — the stub is only 8px, so a
|
|
272
|
+
* larger fillet would consume the whole flat run.
|
|
273
|
+
*/
|
|
274
|
+
|
|
275
|
+
.branch-corner .branch-vertical,
|
|
276
|
+
.branch-corner .branch-horizontal {
|
|
277
|
+
display: none;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.branch-corner .branch-elbow {
|
|
281
|
+
position: absolute;
|
|
282
|
+
top: -1px;
|
|
283
|
+
bottom: 50%;
|
|
284
|
+
left: 75%;
|
|
285
|
+
right: -1px;
|
|
286
|
+
transform: translate(-0.5px, 0.5px);
|
|
287
|
+
border-left: 1px solid var(--border-outline-color);
|
|
288
|
+
border-bottom: 1px solid var(--border-outline-color);
|
|
289
|
+
border-bottom-left-radius: var(
|
|
290
|
+
--menu-navigation-components-branch-corner-radius,
|
|
291
|
+
2px
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.terminal {
|
|
296
|
+
position: relative;
|
|
297
|
+
height: 100%;
|
|
298
|
+
width: var(--global-size-spacing-touch-target-min);
|
|
299
|
+
flex-shrink: 0;
|
|
300
|
+
display: flex;
|
|
301
|
+
align-items: center;
|
|
302
|
+
justify-content: center;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/* Stub entering the terminal, continuing the guide line up to the chevron gap. */
|
|
306
|
+
|
|
307
|
+
.terminal-connector {
|
|
308
|
+
position: absolute;
|
|
309
|
+
top: 50%;
|
|
310
|
+
transform: translateY(-0.5px);
|
|
311
|
+
left: 0;
|
|
312
|
+
width: 25%;
|
|
313
|
+
height: 1px;
|
|
314
|
+
background: var(--border-outline-color);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* On a leaf (no chevron) the stub runs further, stopping ~13px before the icon. */
|
|
318
|
+
|
|
319
|
+
.terminal:not(:has(.chevron)) .terminal-connector {
|
|
320
|
+
width: calc(100% - 13px);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* Descends from below the chevron to connect an expanded node to its children. */
|
|
324
|
+
|
|
325
|
+
.terminal-dropdown {
|
|
326
|
+
position: absolute;
|
|
327
|
+
left: 50%;
|
|
328
|
+
transform: translateX(-0.5px);
|
|
329
|
+
top: 75%;
|
|
330
|
+
bottom: -1px;
|
|
331
|
+
width: 1px;
|
|
332
|
+
background: var(--border-outline-color);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/* Visual expand/collapse indicator only — not a separate control. */
|
|
336
|
+
|
|
337
|
+
.chevron {
|
|
338
|
+
position: relative;
|
|
339
|
+
display: flex;
|
|
340
|
+
align-items: center;
|
|
341
|
+
justify-content: center;
|
|
342
|
+
width: var(--menu-navigation-components-tree-navigation-item-icon-size);
|
|
343
|
+
height: var(--menu-navigation-components-tree-navigation-item-icon-size);
|
|
344
|
+
color: var(--element-neutral-color);
|
|
345
|
+
transition: transform 100ms ease-in-out;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
@media (prefers-reduced-motion: reduce) {
|
|
349
|
+
.chevron {
|
|
350
|
+
transition: none;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.wrapper.disabled .chevron {
|
|
355
|
+
color: var(--on-flat-disabled-color);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
:host([expanded]) .chevron {
|
|
359
|
+
transform: rotate(90deg);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/* Alert-header marker for non-regular terminal types, at the terminal's top-right. */
|
|
363
|
+
|
|
364
|
+
.terminal-header {
|
|
365
|
+
position: absolute;
|
|
366
|
+
inset: 0;
|
|
367
|
+
display: flex;
|
|
368
|
+
justify-content: flex-end;
|
|
369
|
+
align-items: flex-start;
|
|
370
|
+
padding: var(--menu-navigation-components-terminal-padding-aggregated-icon);
|
|
371
|
+
color: var(--element-neutral-color);
|
|
372
|
+
pointer-events: none;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.terminal-header > * {
|
|
376
|
+
width: var(--menu-navigation-components-tree-navigation-item-icon-size);
|
|
377
|
+
height: var(--menu-navigation-components-tree-navigation-item-icon-size);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.wrapper.disabled .terminal-header {
|
|
381
|
+
color: var(--on-flat-disabled-color);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.label-container {
|
|
385
|
+
display: flex;
|
|
386
|
+
flex: 1;
|
|
387
|
+
gap: var(
|
|
388
|
+
--menu-navigation-components-tree-navigation-item-padding-horizontal
|
|
389
|
+
);
|
|
390
|
+
align-items: center;
|
|
391
|
+
min-width: 0;
|
|
392
|
+
padding-right: var(
|
|
393
|
+
--menu-navigation-components-tree-navigation-item-padding-horizontal
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.leading-icon {
|
|
398
|
+
position: relative;
|
|
399
|
+
flex-shrink: 0;
|
|
400
|
+
display: flex;
|
|
401
|
+
align-items: center;
|
|
402
|
+
justify-content: center;
|
|
403
|
+
width: var(--menu-navigation-components-tree-navigation-item-icon-size);
|
|
404
|
+
height: var(--menu-navigation-components-tree-navigation-item-icon-size);
|
|
405
|
+
color: var(--on-flat-neutral-color);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
::slotted([slot="icon"]) {
|
|
409
|
+
display: block;
|
|
410
|
+
width: var(--menu-navigation-components-tree-navigation-item-icon-size);
|
|
411
|
+
height: var(--menu-navigation-components-tree-navigation-item-icon-size);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.label {
|
|
415
|
+
flex: 1;
|
|
416
|
+
overflow: hidden;
|
|
417
|
+
text-overflow: ellipsis;
|
|
418
|
+
white-space: nowrap;
|
|
419
|
+
min-width: 0;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.alert-badge {
|
|
423
|
+
flex-shrink: 0;
|
|
424
|
+
}
|
|
425
|
+
`;
|
|
426
|
+
export {
|
|
427
|
+
componentStyle as default
|
|
428
|
+
};
|
|
429
|
+
//# sourceMappingURL=tree-navigation-item.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-navigation-item.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|