@aquera/nile-elements 2.0.10 → 2.0.11
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/README.md +3 -0
- package/demo/app-shell.html +852 -0
- package/demo/nxtgen-classes.css +2 -2
- package/demo/nxtgen-properties.css +2 -2
- package/demo/nxtgen-utilities.css +2 -2
- package/demo/nxtgen.css +2 -2
- package/demo/utilities.css +2 -2
- package/demo/variables.css +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +579 -296
- package/dist/internal/app-shell-utility-control-styles.cjs.js +2 -0
- package/dist/internal/app-shell-utility-control-styles.cjs.js.map +1 -0
- package/dist/internal/app-shell-utility-control-styles.esm.js +16 -0
- package/dist/nile-app-shell/index.cjs.js +1 -1
- package/dist/nile-app-shell/index.esm.js +1 -1
- package/dist/nile-app-shell/nile-app-shell.cjs.js +1 -1
- package/dist/nile-app-shell/nile-app-shell.cjs.js.map +1 -1
- package/dist/nile-app-shell/nile-app-shell.css.cjs.js +1 -1
- package/dist/nile-app-shell/nile-app-shell.css.cjs.js.map +1 -1
- package/dist/nile-app-shell/nile-app-shell.css.esm.js +270 -92
- package/dist/nile-app-shell/nile-app-shell.esm.js +61 -10
- package/dist/nile-app-shell/shell-controller.cjs.js.map +1 -1
- package/dist/nile-app-shell-main/nile-app-shell-main.cjs.js.map +1 -1
- package/dist/nile-app-shell-nav-toggle/index.cjs.js +1 -1
- package/dist/nile-app-shell-nav-toggle/index.esm.js +1 -1
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js +1 -1
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js.map +1 -1
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.cjs.js +1 -1
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.cjs.js.map +1 -1
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.esm.js +7 -3
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.esm.js +3 -3
- package/dist/nile-app-shell-panel/index.cjs.js +1 -1
- package/dist/nile-app-shell-panel/index.esm.js +1 -1
- package/dist/nile-app-shell-panel/nile-app-shell-panel.cjs.js +1 -1
- package/dist/nile-app-shell-panel/nile-app-shell-panel.cjs.js.map +1 -1
- package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js +1 -1
- package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js.map +1 -1
- package/dist/nile-app-shell-panel/nile-app-shell-panel.css.esm.js +29 -7
- package/dist/nile-app-shell-panel/nile-app-shell-panel.esm.js +18 -5
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.cjs.js.map +1 -1
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.cjs.js.map +1 -1
- package/dist/src/internal/app-shell-utility-control-styles.d.ts +12 -0
- package/dist/src/internal/app-shell-utility-control-styles.js +29 -0
- package/dist/src/internal/app-shell-utility-control-styles.js.map +1 -0
- package/dist/src/nile-app-shell/nile-app-shell-regions.test.d.ts +3 -0
- package/dist/src/nile-app-shell/nile-app-shell-regions.test.js +206 -0
- package/dist/src/nile-app-shell/nile-app-shell-regions.test.js.map +1 -1
- package/dist/src/nile-app-shell/nile-app-shell.css.d.ts +1 -9
- package/dist/src/nile-app-shell/nile-app-shell.css.js +270 -99
- package/dist/src/nile-app-shell/nile-app-shell.css.js.map +1 -1
- package/dist/src/nile-app-shell/nile-app-shell.d.ts +90 -122
- package/dist/src/nile-app-shell/nile-app-shell.js +224 -143
- package/dist/src/nile-app-shell/nile-app-shell.js.map +1 -1
- package/dist/src/nile-app-shell/nile-app-shell.test.d.ts +3 -0
- package/dist/src/nile-app-shell/nile-app-shell.test.js +898 -29
- package/dist/src/nile-app-shell/nile-app-shell.test.js.map +1 -1
- package/dist/src/nile-app-shell/shell-controller.d.ts +1 -8
- package/dist/src/nile-app-shell/shell-controller.js +2 -14
- package/dist/src/nile-app-shell/shell-controller.js.map +1 -1
- package/dist/src/nile-app-shell-main/nile-app-shell-main.d.ts +2 -6
- package/dist/src/nile-app-shell-main/nile-app-shell-main.js +2 -6
- package/dist/src/nile-app-shell-main/nile-app-shell-main.js.map +1 -1
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.d.ts +1 -4
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.js +7 -5
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.js.map +1 -1
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.d.ts +4 -8
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js +5 -6
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js.map +1 -1
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js +28 -5
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js.map +1 -1
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.d.ts +18 -13
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.js +45 -16
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.js.map +1 -1
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.d.ts +1 -4
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js +1 -4
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js.map +1 -1
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.d.ts +4 -12
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js +4 -12
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/version.cjs.js +1 -1
- package/dist/version.cjs.js.map +1 -1
- package/dist/version.esm.js +1 -1
- package/package.json +1 -1
- package/plop-templates/lit/lit.test.ts.hbs +22 -0
- package/plop-templates/lit/lit.ts.hbs +10 -5
- package/plopfile.js +12 -0
- package/src/internal/app-shell-utility-control-styles.ts +30 -0
- package/src/nile-app-shell/nile-app-shell-regions.test.ts +248 -0
- package/src/nile-app-shell/nile-app-shell.css.ts +270 -99
- package/src/nile-app-shell/nile-app-shell.test.ts +1120 -29
- package/src/nile-app-shell/nile-app-shell.ts +241 -148
- package/src/nile-app-shell/shell-controller.ts +2 -14
- package/src/nile-app-shell-main/nile-app-shell-main.ts +2 -6
- package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.ts +7 -5
- package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.ts +7 -11
- package/src/nile-app-shell-panel/nile-app-shell-panel.css.ts +28 -5
- package/src/nile-app-shell-panel/nile-app-shell-panel.ts +44 -16
- package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.ts +1 -4
- package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.ts +4 -12
- package/vscode-html-custom-data.json +114 -37
|
@@ -6,11 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { css } from 'lit';
|
|
9
|
+
import { utilityControlStyles } from '../internal/app-shell-utility-control-styles';
|
|
9
10
|
|
|
10
|
-
/**
|
|
11
|
-
* AppShellNavToggle CSS. The button itself is the shared utility recipe; this
|
|
12
|
-
* file only handles the host box and the rule.
|
|
13
|
-
*/
|
|
11
|
+
/** AppShellNavToggle CSS: the host box, the rule, and the utility-control recipe, since this element also mounts outside a shell. */
|
|
14
12
|
export const styles = css`
|
|
15
13
|
:host {
|
|
16
14
|
display: inline-flex;
|
|
@@ -22,10 +20,14 @@ export const styles = css`
|
|
|
22
20
|
display: none;
|
|
23
21
|
}
|
|
24
22
|
|
|
23
|
+
/* Lands the 20px glyph box, not the 32px utility circle, on the 24px origin: (32 - 20) / 2 = 6. */
|
|
25
24
|
.toggle {
|
|
26
|
-
margin-inline-start: var(--nile-app-shell-nav-toggle-offset, -
|
|
25
|
+
margin-inline-start: var(--nile-app-shell-nav-toggle-offset, -6px);
|
|
27
26
|
}
|
|
28
27
|
|
|
28
|
+
/* The toggle itself: the shared utility-control recipe. */
|
|
29
|
+
${utilityControlStyles}
|
|
30
|
+
|
|
29
31
|
.rule {
|
|
30
32
|
flex: 0 0 auto;
|
|
31
33
|
width: var(--nile-border-width-1, var(--ng-border-width-1));
|
|
@@ -14,9 +14,7 @@ import NileElement from '../internal/nile-element';
|
|
|
14
14
|
import type { NileAppShell } from '../nile-app-shell/nile-app-shell';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* @summary The side-nav toggle
|
|
18
|
-
* renders one in its own top bar; mount this in a header you build yourself, or
|
|
19
|
-
* a route has no way to expand the rail.
|
|
17
|
+
* @summary The side-nav toggle as a standalone control, for a header you build yourself.
|
|
20
18
|
*
|
|
21
19
|
* @status stable
|
|
22
20
|
* @since 2.0
|
|
@@ -29,7 +27,8 @@ import type { NileAppShell } from '../nile-app-shell/nile-app-shell';
|
|
|
29
27
|
* @csspart button - The toggle button.
|
|
30
28
|
* @csspart rule - The trailing vertical rule.
|
|
31
29
|
*
|
|
32
|
-
* @cssproperty [--nile-app-shell-nav-toggle-offset=-
|
|
30
|
+
* @cssproperty [--nile-app-shell-nav-toggle-offset=-6px] - Optical start offset, so the glyph lands on the bar's text origin.
|
|
31
|
+
* @cssproperty [--nile-app-shell-utility-size=32px] - Box the toggle sits in; the hit area and hover surface, not a visible chip.
|
|
33
32
|
*/
|
|
34
33
|
@customElement('nile-app-shell-nav-toggle')
|
|
35
34
|
export class NileAppShellNavToggle extends NileElement {
|
|
@@ -41,10 +40,7 @@ export class NileAppShellNavToggle extends NileElement {
|
|
|
41
40
|
@property({ type: Boolean, reflect: true, attribute: 'with-rule' })
|
|
42
41
|
withRule: boolean = false;
|
|
43
42
|
|
|
44
|
-
/**
|
|
45
|
-
* The shell to drive. Defaults to the nearest `nile-app-shell` ancestor, or
|
|
46
|
-
* the element with this id.
|
|
47
|
-
*/
|
|
43
|
+
/** The shell to drive. Defaults to the nearest `nile-app-shell` ancestor, or the element with this id. */
|
|
48
44
|
@property({ type: String })
|
|
49
45
|
shell?: string;
|
|
50
46
|
|
|
@@ -98,7 +94,7 @@ export class NileAppShellNavToggle extends NileElement {
|
|
|
98
94
|
const expanded = !this._rail;
|
|
99
95
|
return html`
|
|
100
96
|
<nile-button
|
|
101
|
-
class="toggle"
|
|
97
|
+
class="toggle utility-control"
|
|
102
98
|
part="button"
|
|
103
99
|
variant="ghost"
|
|
104
100
|
circle
|
|
@@ -113,8 +109,8 @@ export class NileAppShellNavToggle extends NileElement {
|
|
|
113
109
|
@click=${this._onClick}
|
|
114
110
|
>
|
|
115
111
|
${renderGlyph(
|
|
116
|
-
expanded ? 'ng-panel-left
|
|
117
|
-
|
|
112
|
+
expanded ? 'ng-panel-left' : 'ng-panel-right',
|
|
113
|
+
20,
|
|
118
114
|
'currentColor'
|
|
119
115
|
)}
|
|
120
116
|
</nile-button>
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { css } from 'lit';
|
|
9
|
+
import { utilityControlStyles } from '../internal/app-shell-utility-control-styles';
|
|
9
10
|
|
|
10
11
|
export const styles = css`
|
|
11
12
|
:host {
|
|
@@ -23,14 +24,15 @@ export const styles = css`
|
|
|
23
24
|
display: none;
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
/* The panel header keeps its own height, never the page header's; the literal is the floor for a panel mounted outside a shell. */
|
|
26
28
|
.header {
|
|
27
29
|
box-sizing: border-box;
|
|
28
30
|
flex: 0 0 auto;
|
|
29
31
|
display: flex;
|
|
30
32
|
align-items: center;
|
|
31
|
-
gap: var(--nile-spacing-
|
|
32
|
-
height: var(--nile-app-shell-
|
|
33
|
-
padding-inline: var(--nile-spacing-
|
|
33
|
+
gap: var(--nile-spacing-md, var(--ng-spacing-md));
|
|
34
|
+
height: var(--nile-app-shell-panel-header-height, 56px);
|
|
35
|
+
padding-inline: var(--nile-spacing-3xl, var(--ng-spacing-3xl));
|
|
34
36
|
border-bottom: var(--nile-border-width-1, var(--ng-border-width-1)) solid
|
|
35
37
|
var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
36
38
|
}
|
|
@@ -39,6 +41,21 @@ export const styles = css`
|
|
|
39
41
|
display: none;
|
|
40
42
|
}
|
|
41
43
|
|
|
44
|
+
/* The back control for a sub-view; stands where the brand mark does in the root view. */
|
|
45
|
+
.back {
|
|
46
|
+
flex: 0 0 auto;
|
|
47
|
+
margin-inline-start: -6px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Mirrors the back control's offset on the end edge: the 20px glyph, not the 32px circle, lands on the padding line. */
|
|
51
|
+
.close {
|
|
52
|
+
margin-inline-end: -6px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host([back]) .mark {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
42
59
|
.heading {
|
|
43
60
|
display: flex;
|
|
44
61
|
align-items: center;
|
|
@@ -85,6 +102,11 @@ export const styles = css`
|
|
|
85
102
|
display: none;
|
|
86
103
|
}
|
|
87
104
|
|
|
105
|
+
/* ------------------------------------------------------- utility controls */
|
|
106
|
+
|
|
107
|
+
/* The header's own icon controls (back and close): the shared utility-control recipe. */
|
|
108
|
+
${utilityControlStyles}
|
|
109
|
+
|
|
88
110
|
.body {
|
|
89
111
|
flex: 1 1 auto;
|
|
90
112
|
min-height: 0;
|
|
@@ -92,7 +114,8 @@ export const styles = css`
|
|
|
92
114
|
display: flex;
|
|
93
115
|
flex-direction: column;
|
|
94
116
|
gap: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
95
|
-
|
|
117
|
+
/* 16 under the header, 24 on the sides and bottom. */
|
|
118
|
+
padding: var(--nile-spacing-xl, var(--ng-spacing-xl)) var(--nile-spacing-3xl, var(--ng-spacing-3xl)) var(--nile-spacing-3xl, var(--ng-spacing-3xl));
|
|
96
119
|
}
|
|
97
120
|
|
|
98
121
|
:host([no-padding]) .body {
|
|
@@ -101,7 +124,7 @@ export const styles = css`
|
|
|
101
124
|
|
|
102
125
|
.footer {
|
|
103
126
|
flex: 0 0 auto;
|
|
104
|
-
padding: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
127
|
+
padding: var(--nile-spacing-xl, var(--ng-spacing-xl)) var(--nile-spacing-3xl, var(--ng-spacing-3xl)) var(--nile-spacing-3xl, var(--ng-spacing-3xl));
|
|
105
128
|
border-top: var(--nile-border-width-1, var(--ng-border-width-1)) solid
|
|
106
129
|
var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
107
130
|
}
|
|
@@ -15,10 +15,7 @@ import NileElement from '../internal/nile-element';
|
|
|
15
15
|
import type { NileAppShellPanelMode } from '../nile-app-shell/nile-app-shell';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @summary The shell's right region — the AI assistant panel
|
|
19
|
-
* the shell's `panel` slot and takes over the panel chrome: heading, actions,
|
|
20
|
-
* close button, scroll region and composer footer. The shell keeps the geometry
|
|
21
|
-
* — 480px docked, an overlay drawer when narrow — and the open/closed state.
|
|
18
|
+
* @summary The shell's right region — the AI assistant panel; takes over the panel chrome while the shell keeps the geometry and open state.
|
|
22
19
|
*
|
|
23
20
|
* @status stable
|
|
24
21
|
* @since 2.0
|
|
@@ -29,20 +26,25 @@ import type { NileAppShellPanelMode } from '../nile-app-shell/nile-app-shell';
|
|
|
29
26
|
* @dependency nile-glyph
|
|
30
27
|
*
|
|
31
28
|
* @slot - The panel body. Scrolls.
|
|
32
|
-
* @slot header - Replaces the default heading (mark plus label).
|
|
33
|
-
* @slot actions - Controls added before the close button.
|
|
29
|
+
* @slot header - Replaces the default heading (mark plus label); the back control renders before it.
|
|
30
|
+
* @slot actions - Controls added before the close button; size and clear their `base` part from page CSS to match the header's bare glyphs.
|
|
34
31
|
* @slot footer - A composer, docked below the scroll region.
|
|
35
32
|
*
|
|
36
|
-
* @event nile-close - Emitted when the close button is pressed, after the shell
|
|
37
|
-
*
|
|
38
|
-
*
|
|
33
|
+
* @event nile-close - Emitted when the close button is pressed, after the shell has been told to close.
|
|
34
|
+
* @event nile-back - Emitted when the back control is pressed; the page swaps its own content back.
|
|
35
|
+
* @event nile-panel-back - Emitted right after `nile-back` for the same press, matching the shell's built-in panel chrome, so a page listening on the shell keeps working when it slots this component. Listen for one of the two, not both, or one press is handled twice.
|
|
39
36
|
*
|
|
40
37
|
* @csspart header - The header bar.
|
|
38
|
+
* @csspart back - The back control, shown by `back`.
|
|
41
39
|
* @csspart title - The default heading text.
|
|
42
40
|
* @csspart actions - The header action group.
|
|
43
41
|
* @csspart close - The close button.
|
|
44
42
|
* @csspart body - The scrolling body.
|
|
45
43
|
* @csspart footer - The footer.
|
|
44
|
+
*
|
|
45
|
+
* @cssproperty [--nile-app-shell-utility-size=32px] - Box the header's back and close controls sit in.
|
|
46
|
+
*
|
|
47
|
+
* @method goBack() - Emit `nile-back` then `nile-panel-back`, as the back control does.
|
|
46
48
|
*/
|
|
47
49
|
@customElement('nile-app-shell-panel')
|
|
48
50
|
export class NileAppShellPanel extends NileElement {
|
|
@@ -60,6 +62,14 @@ export class NileAppShellPanel extends NileElement {
|
|
|
60
62
|
@property({ type: Boolean, reflect: true, attribute: 'no-header' })
|
|
61
63
|
noHeader: boolean = false;
|
|
62
64
|
|
|
65
|
+
/** Shows a back control at the start of the header for a sub-view; the panel keeps no view stack and only emits `nile-back`. */
|
|
66
|
+
@property({ type: Boolean, reflect: true })
|
|
67
|
+
back: boolean = false;
|
|
68
|
+
|
|
69
|
+
/** Accessible name of the back control. */
|
|
70
|
+
@property({ type: String })
|
|
71
|
+
backLabel: string = 'Back';
|
|
72
|
+
|
|
63
73
|
/** Drops the close button — for a panel the page closes its own way. */
|
|
64
74
|
@property({ type: Boolean, reflect: true, attribute: 'no-close' })
|
|
65
75
|
noClose: boolean = false;
|
|
@@ -72,10 +82,7 @@ export class NileAppShellPanel extends NileElement {
|
|
|
72
82
|
@property({ type: String })
|
|
73
83
|
shell?: string;
|
|
74
84
|
|
|
75
|
-
/**
|
|
76
|
-
* Mirrors the shell's panel mode. Set by the shell; treat it as read-only and
|
|
77
|
-
* style against it (`nile-app-shell-panel[mode='overlay']`).
|
|
78
|
-
*/
|
|
85
|
+
/** Mirrors the shell's panel mode. Set by the shell; treat it as read-only and style against it (`nile-app-shell-panel[mode='overlay']`). */
|
|
79
86
|
@property({ type: String, reflect: true })
|
|
80
87
|
mode: NileAppShellPanelMode = 'docked';
|
|
81
88
|
|
|
@@ -99,6 +106,12 @@ export class NileAppShellPanel extends NileElement {
|
|
|
99
106
|
this.setAttribute('aria-label', this.label);
|
|
100
107
|
}
|
|
101
108
|
|
|
109
|
+
/** Announce that the back control was pressed, as the page owns which view it goes back to: `nile-back`, then `nile-panel-back` for pages written against the shell's built-in panel chrome. */
|
|
110
|
+
public goBack(): void {
|
|
111
|
+
this.emit('nile-back');
|
|
112
|
+
this.emit('nile-panel-back');
|
|
113
|
+
}
|
|
114
|
+
|
|
102
115
|
/** Close the panel through the shell. */
|
|
103
116
|
public close(): void {
|
|
104
117
|
this.shellLink.shell?.closePanel();
|
|
@@ -118,16 +131,31 @@ export class NileAppShellPanel extends NileElement {
|
|
|
118
131
|
public render(): TemplateResult {
|
|
119
132
|
return html`
|
|
120
133
|
<header class="header" part="header">
|
|
134
|
+
${this.back
|
|
135
|
+
? html`<nile-button
|
|
136
|
+
class="back utility-control"
|
|
137
|
+
part="back"
|
|
138
|
+
variant="ghost"
|
|
139
|
+
circle
|
|
140
|
+
title=${this.backLabel}
|
|
141
|
+
aria-label=${this.backLabel}
|
|
142
|
+
@click=${() => this.goBack()}
|
|
143
|
+
>
|
|
144
|
+
${renderGlyph('ng-arrow-left', 20, 'currentColor')}
|
|
145
|
+
</nile-button>`
|
|
146
|
+
: ''}
|
|
121
147
|
<slot name="header">
|
|
122
148
|
<span class="heading">
|
|
123
|
-
<span class="mark"
|
|
149
|
+
<span class="mark"
|
|
150
|
+
>${renderGlyph('ng-sparkles', 20, 'currentColor')}</span
|
|
151
|
+
>
|
|
124
152
|
<h2 class="title" part="title">${this.label}</h2>
|
|
125
153
|
</span>
|
|
126
154
|
</slot>
|
|
127
155
|
<div class="actions" part="actions">
|
|
128
156
|
<slot name="actions"></slot>
|
|
129
157
|
<nile-button
|
|
130
|
-
class="close"
|
|
158
|
+
class="close utility-control"
|
|
131
159
|
part="close"
|
|
132
160
|
variant="ghost"
|
|
133
161
|
circle
|
|
@@ -135,7 +163,7 @@ export class NileAppShellPanel extends NileElement {
|
|
|
135
163
|
aria-label="Close ${this.label}"
|
|
136
164
|
@click=${() => this.close()}
|
|
137
165
|
>
|
|
138
|
-
${renderGlyph('ng-x-close',
|
|
166
|
+
${renderGlyph('ng-x-close', 20, 'currentColor')}
|
|
139
167
|
</nile-button>
|
|
140
168
|
</div>
|
|
141
169
|
</header>
|
|
@@ -7,10 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { css } from 'lit';
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* AppShellSideNav CSS. The shell owns the track width; this owns what happens
|
|
12
|
-
* inside it — a pinned header, a scrolling body, a pinned footer.
|
|
13
|
-
*/
|
|
10
|
+
/** AppShellSideNav CSS: the shell owns the track width, this owns what happens inside it — a pinned header, a scrolling body, a pinned footer. */
|
|
14
11
|
export const styles = css`
|
|
15
12
|
:host {
|
|
16
13
|
box-sizing: border-box;
|
|
@@ -12,9 +12,7 @@ import { AppShellController } from '../nile-app-shell/shell-controller';
|
|
|
12
12
|
import NileElement from '../internal/nile-element';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @summary The shell's left region — the navigation track
|
|
16
|
-
* shell's `side-nav` slot and mirrors the shell's rail state, so nav content can
|
|
17
|
-
* style against it.
|
|
15
|
+
* @summary The shell's left region — the navigation track; mirrors the shell's rail state so nav content can style against it.
|
|
18
16
|
*
|
|
19
17
|
* @status stable
|
|
20
18
|
* @since 2.0
|
|
@@ -31,10 +29,8 @@ import NileElement from '../internal/nile-element';
|
|
|
31
29
|
* @csspart body - The scrolling nav body.
|
|
32
30
|
* @csspart footer - The pinned footer.
|
|
33
31
|
*
|
|
34
|
-
* @cssproperty [--nile-app-shell-side-nav-padding=12px] - Body inset.
|
|
35
|
-
*
|
|
36
|
-
* @cssproperty [--nile-app-shell-side-nav-bg=transparent] - Surface behind the
|
|
37
|
-
* nav. Transparent by default: the nav and the page share one.
|
|
32
|
+
* @cssproperty [--nile-app-shell-side-nav-padding=12px] - Body inset.
|
|
33
|
+
* @cssproperty [--nile-app-shell-side-nav-bg=transparent] - Surface behind the nav; transparent so the nav and page share one.
|
|
38
34
|
*/
|
|
39
35
|
@customElement('nile-app-shell-side-nav')
|
|
40
36
|
export class NileAppShellSideNav extends NileElement {
|
|
@@ -44,11 +40,7 @@ export class NileAppShellSideNav extends NileElement {
|
|
|
44
40
|
|
|
45
41
|
private shellLink = new AppShellController(this);
|
|
46
42
|
|
|
47
|
-
/**
|
|
48
|
-
* Mirrors the shell's effective rail state — the user's preference, or a rail
|
|
49
|
-
* forced by the shell's width. Set by the shell; treat it as read-only and
|
|
50
|
-
* style against it (`nile-app-shell-side-nav[collapsed] .label`).
|
|
51
|
-
*/
|
|
43
|
+
/** Mirrors the shell's effective rail state. Set by the shell; treat it as read-only and style against it (`nile-app-shell-side-nav[collapsed] .label`). */
|
|
52
44
|
@property({ type: Boolean, reflect: true })
|
|
53
45
|
collapsed: boolean = false;
|
|
54
46
|
|