@aquera/nile-elements 2.0.4 → 2.0.6
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 +9 -0
- package/demo/nxtgen-classes.css +609 -12
- package/demo/nxtgen-dark.css +254 -35
- package/demo/nxtgen-properties.css +27 -24
- package/demo/nxtgen-utilities.css +633 -36
- package/demo/nxtgen.css +70 -12
- package/demo/utilities.css +3 -0
- package/demo/variables.css +3 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1375 -358
- package/dist/internal/glyph.cjs.js +1 -1
- package/dist/internal/glyph.cjs.js.map +1 -1
- package/dist/internal/glyph.esm.js +6 -5
- package/dist/nile-app-shell/index.cjs.js +2 -0
- package/dist/nile-app-shell/index.cjs.js.map +1 -0
- package/dist/nile-app-shell/index.esm.js +1 -0
- package/dist/nile-app-shell/nile-app-shell.cjs.js +2 -0
- package/dist/nile-app-shell/nile-app-shell.cjs.js.map +1 -0
- package/dist/nile-app-shell/nile-app-shell.css.cjs.js +2 -0
- package/dist/nile-app-shell/nile-app-shell.css.cjs.js.map +1 -0
- package/dist/nile-app-shell/nile-app-shell.css.esm.js +554 -0
- package/dist/nile-app-shell/nile-app-shell.esm.js +155 -0
- package/dist/nile-app-shell/shell-controller.cjs.js +2 -0
- package/dist/nile-app-shell/shell-controller.cjs.js.map +1 -0
- package/dist/nile-app-shell/shell-controller.esm.js +1 -0
- package/dist/nile-app-shell-main/index.cjs.js +2 -0
- package/dist/nile-app-shell-main/index.cjs.js.map +1 -0
- package/dist/nile-app-shell-main/index.esm.js +1 -0
- package/dist/nile-app-shell-main/nile-app-shell-main.cjs.js +2 -0
- package/dist/nile-app-shell-main/nile-app-shell-main.cjs.js.map +1 -0
- package/dist/nile-app-shell-main/nile-app-shell-main.css.cjs.js +2 -0
- package/dist/nile-app-shell-main/nile-app-shell-main.css.cjs.js.map +1 -0
- package/dist/nile-app-shell-main/nile-app-shell-main.css.esm.js +18 -0
- package/dist/nile-app-shell-main/nile-app-shell-main.esm.js +1 -0
- package/dist/nile-app-shell-nav-toggle/index.cjs.js +2 -0
- package/dist/nile-app-shell-nav-toggle/index.cjs.js.map +1 -0
- package/dist/nile-app-shell-nav-toggle/index.esm.js +1 -0
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js +2 -0
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.cjs.js.map +1 -0
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.cjs.js +2 -0
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.cjs.js.map +1 -0
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.esm.js +29 -0
- package/dist/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.esm.js +16 -0
- package/dist/nile-app-shell-panel/index.cjs.js +2 -0
- package/dist/nile-app-shell-panel/index.cjs.js.map +1 -0
- package/dist/nile-app-shell-panel/index.esm.js +1 -0
- package/dist/nile-app-shell-panel/nile-app-shell-panel.cjs.js +2 -0
- package/dist/nile-app-shell-panel/nile-app-shell-panel.cjs.js.map +1 -0
- package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js +2 -0
- package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js.map +1 -0
- package/dist/nile-app-shell-panel/nile-app-shell-panel.css.esm.js +103 -0
- package/dist/nile-app-shell-panel/nile-app-shell-panel.esm.js +33 -0
- package/dist/nile-app-shell-side-nav/index.cjs.js +2 -0
- package/dist/nile-app-shell-side-nav/index.cjs.js.map +1 -0
- package/dist/nile-app-shell-side-nav/index.esm.js +1 -0
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.cjs.js +2 -0
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.cjs.js.map +1 -0
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.cjs.js +2 -0
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.cjs.js.map +1 -0
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.css.esm.js +55 -0
- package/dist/nile-app-shell-side-nav/nile-app-shell-side-nav.esm.js +5 -0
- package/dist/nile-combobox/nile-combobox.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.cjs.js.map +1 -1
- package/dist/nile-combobox/nile-combobox.css.cjs.js +1 -1
- package/dist/nile-combobox/nile-combobox.css.cjs.js.map +1 -1
- package/dist/nile-combobox/nile-combobox.css.esm.js +28 -15
- package/dist/nile-combobox/nile-combobox.esm.js +11 -8
- package/dist/nile-combobox/portal-manager.cjs.js +1 -1
- package/dist/nile-combobox/portal-manager.cjs.js.map +1 -1
- package/dist/nile-combobox/portal-manager.esm.js +1 -1
- package/dist/nile-combobox/renderer.cjs.js +1 -1
- package/dist/nile-combobox/renderer.cjs.js.map +1 -1
- package/dist/nile-combobox/renderer.esm.js +31 -43
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js.map +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.css.cjs.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.css.cjs.js.map +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.css.esm.js +46 -8
- package/dist/nile-floating-panel/nile-floating-panel.esm.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.css.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.css.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.css.esm.js +32 -17
- package/dist/nile-popover/nile-popover.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/index.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-editor.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/index.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/nile-wysiwyg-toolbar/nile-wysiwyg-toolbar.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/bubble-menu.esm.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/embed-menu.esm.js +2 -2
- package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/image-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/image-menu.esm.js +4 -4
- package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js +1 -1
- package/dist/nile-wysiwyg-editor/ui/table-menu.cjs.js.map +1 -1
- package/dist/nile-wysiwyg-editor/ui/table-menu.esm.js +1 -1
- package/dist/src/index.d.ts +7 -2
- package/dist/src/index.js +6 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal/glyph.d.ts +6 -1
- package/dist/src/internal/glyph.js +8 -1
- package/dist/src/internal/glyph.js.map +1 -1
- package/dist/src/nile-app-shell/index.d.ts +7 -0
- package/dist/src/nile-app-shell/index.js +8 -0
- package/dist/src/nile-app-shell/index.js.map +1 -0
- package/dist/src/nile-app-shell/nile-app-shell-regions.test.d.ts +4 -0
- package/dist/src/nile-app-shell/nile-app-shell-regions.test.js +177 -0
- package/dist/src/nile-app-shell/nile-app-shell-regions.test.js.map +1 -0
- package/dist/src/nile-app-shell/nile-app-shell.css.d.ts +18 -0
- package/dist/src/nile-app-shell/nile-app-shell.css.js +572 -0
- package/dist/src/nile-app-shell/nile-app-shell.css.js.map +1 -0
- package/dist/src/nile-app-shell/nile-app-shell.d.ts +292 -0
- package/dist/src/nile-app-shell/nile-app-shell.js +796 -0
- package/dist/src/nile-app-shell/nile-app-shell.js.map +1 -0
- 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 +454 -0
- package/dist/src/nile-app-shell/nile-app-shell.test.js.map +1 -0
- package/dist/src/nile-app-shell/shell-controller.d.ts +34 -0
- package/dist/src/nile-app-shell/shell-controller.js +80 -0
- package/dist/src/nile-app-shell/shell-controller.js.map +1 -0
- package/dist/src/nile-app-shell-main/index.d.ts +7 -0
- package/dist/src/nile-app-shell-main/index.js +8 -0
- package/dist/src/nile-app-shell-main/index.js.map +1 -0
- package/dist/src/nile-app-shell-main/nile-app-shell-main.css.d.ts +9 -0
- package/dist/src/nile-app-shell-main/nile-app-shell-main.css.js +27 -0
- package/dist/src/nile-app-shell-main/nile-app-shell-main.css.js.map +1 -0
- package/dist/src/nile-app-shell-main/nile-app-shell-main.d.ts +38 -0
- package/dist/src/nile-app-shell-main/nile-app-shell-main.js +51 -0
- package/dist/src/nile-app-shell-main/nile-app-shell-main.js.map +1 -0
- package/dist/src/nile-app-shell-nav-toggle/index.d.ts +7 -0
- package/dist/src/nile-app-shell-nav-toggle/index.js +8 -0
- package/dist/src/nile-app-shell-nav-toggle/index.js.map +1 -0
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.d.ts +13 -0
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.js +42 -0
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.js.map +1 -0
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.d.ts +56 -0
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js +126 -0
- package/dist/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.js.map +1 -0
- package/dist/src/nile-app-shell-panel/index.d.ts +7 -0
- package/dist/src/nile-app-shell-panel/index.js +8 -0
- package/dist/src/nile-app-shell-panel/index.js.map +1 -0
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.d.ts +9 -0
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js +112 -0
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js.map +1 -0
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.d.ts +73 -0
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.js +158 -0
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.js.map +1 -0
- package/dist/src/nile-app-shell-side-nav/index.d.ts +7 -0
- package/dist/src/nile-app-shell-side-nav/index.js +8 -0
- package/dist/src/nile-app-shell-side-nav/index.js.map +1 -0
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.d.ts +13 -0
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js +68 -0
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.js.map +1 -0
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.d.ts +54 -0
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js +83 -0
- package/dist/src/nile-app-shell-side-nav/nile-app-shell-side-nav.js.map +1 -0
- package/dist/src/nile-combobox/nile-combobox.css.js +28 -15
- package/dist/src/nile-combobox/nile-combobox.css.js.map +1 -1
- package/dist/src/nile-combobox/nile-combobox.js +49 -10
- package/dist/src/nile-combobox/nile-combobox.js.map +1 -1
- package/dist/src/nile-combobox/portal-manager.js +2 -22
- package/dist/src/nile-combobox/portal-manager.js.map +1 -1
- package/dist/src/nile-combobox/renderer.d.ts +2 -3
- package/dist/src/nile-combobox/renderer.js +14 -45
- package/dist/src/nile-combobox/renderer.js.map +1 -1
- package/dist/src/nile-floating-panel/nile-floating-panel.css.js +46 -8
- package/dist/src/nile-floating-panel/nile-floating-panel.css.js.map +1 -1
- package/dist/src/nile-floating-panel/nile-floating-panel.js +13 -1
- package/dist/src/nile-floating-panel/nile-floating-panel.js.map +1 -1
- package/dist/src/nile-popover/nile-popover.css.js +30 -15
- package/dist/src/nile-popover/nile-popover.css.js.map +1 -1
- package/dist/src/nile-popover/nile-popover.js +1 -1
- package/dist/src/nile-popover/nile-popover.js.map +1 -1
- package/dist/src/nile-popover/nile-popover.test.js +1 -1
- package/dist/src/nile-popover/nile-popover.test.js.map +1 -1
- package/dist/src/version.d.ts +11 -1
- package/dist/src/version.js +56 -5
- 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 +8 -2
- package/scripts/replace-version.cjs +12 -10
- package/src/index.ts +16 -4
- package/src/internal/glyph.ts +12 -1
- package/src/nile-app-shell/index.ts +8 -0
- package/src/nile-app-shell/nile-app-shell-regions.test.ts +215 -0
- package/src/nile-app-shell/nile-app-shell.css.ts +574 -0
- package/src/nile-app-shell/nile-app-shell.test.ts +536 -0
- package/src/nile-app-shell/nile-app-shell.ts +838 -0
- package/src/nile-app-shell/shell-controller.ts +100 -0
- package/src/nile-app-shell-main/index.ts +8 -0
- package/src/nile-app-shell-main/nile-app-shell-main.css.ts +29 -0
- package/src/nile-app-shell-main/nile-app-shell-main.ts +52 -0
- package/src/nile-app-shell-nav-toggle/index.ts +8 -0
- package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.css.ts +44 -0
- package/src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.ts +138 -0
- package/src/nile-app-shell-panel/index.ts +8 -0
- package/src/nile-app-shell-panel/nile-app-shell-panel.css.ts +114 -0
- package/src/nile-app-shell-panel/nile-app-shell-panel.ts +161 -0
- package/src/nile-app-shell-side-nav/index.ts +8 -0
- package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.ts +70 -0
- package/src/nile-app-shell-side-nav/nile-app-shell-side-nav.ts +86 -0
- package/src/nile-combobox/nile-combobox.css.ts +28 -15
- package/src/nile-combobox/nile-combobox.ts +61 -12
- package/src/nile-combobox/portal-manager.ts +4 -22
- package/src/nile-combobox/renderer.ts +26 -69
- package/src/nile-floating-panel/nile-floating-panel.css.ts +46 -8
- package/src/nile-floating-panel/nile-floating-panel.ts +19 -1
- package/src/nile-popover/nile-popover.css.ts +30 -15
- package/src/nile-popover/nile-popover.test.ts +1 -1
- package/src/nile-popover/nile-popover.ts +1 -1
- package/src/version.ts +61 -4
- package/vscode-html-custom-data.json +216 -5
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { __decorate } from "tslib";
|
|
8
|
+
import { html } from 'lit';
|
|
9
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
10
|
+
import { styles } from './nile-app-shell-nav-toggle.css';
|
|
11
|
+
import { renderGlyph } from '../internal/glyph';
|
|
12
|
+
import '../nile-button/nile-button';
|
|
13
|
+
import NileElement from '../internal/nile-element';
|
|
14
|
+
/**
|
|
15
|
+
* @summary The side-nav toggle, as a standalone control. `nile-app-shell`
|
|
16
|
+
* renders one in its own top bar; mount this in a header you build yourself, or
|
|
17
|
+
* a route has no way to expand the rail.
|
|
18
|
+
*
|
|
19
|
+
* @status stable
|
|
20
|
+
* @since 2.0
|
|
21
|
+
*
|
|
22
|
+
* @tag nile-app-shell-nav-toggle
|
|
23
|
+
*
|
|
24
|
+
* @dependency nile-app-shell
|
|
25
|
+
* @dependency nile-glyph
|
|
26
|
+
*
|
|
27
|
+
* @csspart button - The toggle button.
|
|
28
|
+
* @csspart rule - The trailing vertical rule.
|
|
29
|
+
*
|
|
30
|
+
* @cssproperty [--nile-app-shell-nav-toggle-offset=-4px] - Optical start offset.
|
|
31
|
+
*/
|
|
32
|
+
let NileAppShellNavToggle = class NileAppShellNavToggle extends NileElement {
|
|
33
|
+
constructor() {
|
|
34
|
+
super(...arguments);
|
|
35
|
+
/** Draws the vertical rule the shell's own bar puts after the toggle. */
|
|
36
|
+
this.withRule = false;
|
|
37
|
+
this._rail = false;
|
|
38
|
+
this._locked = false;
|
|
39
|
+
this._onShellToggle = () => {
|
|
40
|
+
this._sync();
|
|
41
|
+
};
|
|
42
|
+
this._onClick = () => {
|
|
43
|
+
this._attach();
|
|
44
|
+
this._observed?.toggleNav();
|
|
45
|
+
this._sync();
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
static get styles() {
|
|
49
|
+
return [styles];
|
|
50
|
+
}
|
|
51
|
+
connectedCallback() {
|
|
52
|
+
super.connectedCallback();
|
|
53
|
+
// The shell may upgrade after this element does, so read it on a microtask.
|
|
54
|
+
Promise.resolve().then(() => this._attach());
|
|
55
|
+
}
|
|
56
|
+
disconnectedCallback() {
|
|
57
|
+
super.disconnectedCallback();
|
|
58
|
+
this._observed?.removeEventListener('nile-nav-toggle', this._onShellToggle);
|
|
59
|
+
this._observed = undefined;
|
|
60
|
+
}
|
|
61
|
+
/** The shell this toggle drives, if it found one. */
|
|
62
|
+
get appShell() {
|
|
63
|
+
if (this.shell) {
|
|
64
|
+
const root = this.getRootNode();
|
|
65
|
+
return root.querySelector(`#${this.shell}`) ?? null;
|
|
66
|
+
}
|
|
67
|
+
return this.closest('nile-app-shell') ?? null;
|
|
68
|
+
}
|
|
69
|
+
_attach() {
|
|
70
|
+
const shell = this.appShell;
|
|
71
|
+
if (!shell || shell === this._observed)
|
|
72
|
+
return;
|
|
73
|
+
this._observed?.removeEventListener('nile-nav-toggle', this._onShellToggle);
|
|
74
|
+
this._observed = shell;
|
|
75
|
+
shell.addEventListener('nile-nav-toggle', this._onShellToggle);
|
|
76
|
+
this._sync();
|
|
77
|
+
}
|
|
78
|
+
_sync() {
|
|
79
|
+
const shell = this._observed;
|
|
80
|
+
if (!shell)
|
|
81
|
+
return;
|
|
82
|
+
this._rail = shell.rail;
|
|
83
|
+
this._locked = shell.navLocked;
|
|
84
|
+
}
|
|
85
|
+
render() {
|
|
86
|
+
const expanded = !this._rail;
|
|
87
|
+
return html `
|
|
88
|
+
<nile-button
|
|
89
|
+
class="toggle"
|
|
90
|
+
part="button"
|
|
91
|
+
variant="ghost"
|
|
92
|
+
circle
|
|
93
|
+
aria-expanded=${expanded ? 'true' : 'false'}
|
|
94
|
+
?disabled=${this._locked}
|
|
95
|
+
title=${this._locked
|
|
96
|
+
? 'The navigation stays collapsed at this window width'
|
|
97
|
+
: expanded
|
|
98
|
+
? 'Collapse navigation'
|
|
99
|
+
: 'Expand navigation'}
|
|
100
|
+
aria-label=${expanded ? 'Collapse navigation' : 'Expand navigation'}
|
|
101
|
+
@click=${this._onClick}
|
|
102
|
+
>
|
|
103
|
+
${renderGlyph(expanded ? 'ng-panel-left-close' : 'ng-panel-left-open', 24, 'currentColor')}
|
|
104
|
+
</nile-button>
|
|
105
|
+
<span class="rule" part="rule"></span>
|
|
106
|
+
`;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
__decorate([
|
|
110
|
+
property({ type: Boolean, reflect: true, attribute: 'with-rule' })
|
|
111
|
+
], NileAppShellNavToggle.prototype, "withRule", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
property({ type: String })
|
|
114
|
+
], NileAppShellNavToggle.prototype, "shell", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
state()
|
|
117
|
+
], NileAppShellNavToggle.prototype, "_rail", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
state()
|
|
120
|
+
], NileAppShellNavToggle.prototype, "_locked", void 0);
|
|
121
|
+
NileAppShellNavToggle = __decorate([
|
|
122
|
+
customElement('nile-app-shell-nav-toggle')
|
|
123
|
+
], NileAppShellNavToggle);
|
|
124
|
+
export { NileAppShellNavToggle };
|
|
125
|
+
export default NileAppShellNavToggle;
|
|
126
|
+
//# sourceMappingURL=nile-app-shell-nav-toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-app-shell-nav-toggle.js","sourceRoot":"","sources":["../../../src/nile-app-shell-nav-toggle/nile-app-shell-nav-toggle.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { styles } from './nile-app-shell-nav-toggle.css';\nimport { renderGlyph } from '../internal/glyph';\nimport '../nile-button/nile-button';\nimport NileElement from '../internal/nile-element';\nimport type { NileAppShell } from '../nile-app-shell/nile-app-shell';\n\n/**\n * @summary The side-nav toggle, as a standalone control. `nile-app-shell`\n * renders one in its own top bar; mount this in a header you build yourself, or\n * a route has no way to expand the rail.\n *\n * @status stable\n * @since 2.0\n *\n * @tag nile-app-shell-nav-toggle\n *\n * @dependency nile-app-shell\n * @dependency nile-glyph\n *\n * @csspart button - The toggle button.\n * @csspart rule - The trailing vertical rule.\n *\n * @cssproperty [--nile-app-shell-nav-toggle-offset=-4px] - Optical start offset.\n */\n@customElement('nile-app-shell-nav-toggle')\nexport class NileAppShellNavToggle extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /** Draws the vertical rule the shell's own bar puts after the toggle. */\n @property({ type: Boolean, reflect: true, attribute: 'with-rule' })\n withRule: boolean = false;\n\n /**\n * The shell to drive. Defaults to the nearest `nile-app-shell` ancestor, or\n * the element with this id.\n */\n @property({ type: String })\n shell?: string;\n\n @state() private _rail: boolean = false;\n @state() private _locked: boolean = false;\n\n private _observed?: NileAppShell;\n\n public connectedCallback(): void {\n super.connectedCallback();\n // The shell may upgrade after this element does, so read it on a microtask.\n Promise.resolve().then(() => this._attach());\n }\n\n public disconnectedCallback(): void {\n super.disconnectedCallback();\n this._observed?.removeEventListener('nile-nav-toggle', this._onShellToggle);\n this._observed = undefined;\n }\n\n /** The shell this toggle drives, if it found one. */\n public get appShell(): NileAppShell | null {\n if (this.shell) {\n const root = this.getRootNode() as Document | ShadowRoot;\n return (root.querySelector(`#${this.shell}`) as NileAppShell) ?? null;\n }\n return this.closest('nile-app-shell') ?? null;\n }\n\n private _attach(): void {\n const shell = this.appShell;\n if (!shell || shell === this._observed) return;\n this._observed?.removeEventListener('nile-nav-toggle', this._onShellToggle);\n this._observed = shell;\n shell.addEventListener('nile-nav-toggle', this._onShellToggle);\n this._sync();\n }\n\n private _onShellToggle = (): void => {\n this._sync();\n };\n\n private _sync(): void {\n const shell = this._observed;\n if (!shell) return;\n this._rail = shell.rail;\n this._locked = shell.navLocked;\n }\n\n public render(): TemplateResult {\n const expanded = !this._rail;\n return html`\n <nile-button\n class=\"toggle\"\n part=\"button\"\n variant=\"ghost\"\n circle\n aria-expanded=${expanded ? 'true' : 'false'}\n ?disabled=${this._locked}\n title=${this._locked\n ? 'The navigation stays collapsed at this window width'\n : expanded\n ? 'Collapse navigation'\n : 'Expand navigation'}\n aria-label=${expanded ? 'Collapse navigation' : 'Expand navigation'}\n @click=${this._onClick}\n >\n ${renderGlyph(\n expanded ? 'ng-panel-left-close' : 'ng-panel-left-open',\n 24,\n 'currentColor'\n )}\n </nile-button>\n <span class=\"rule\" part=\"rule\"></span>\n `;\n }\n\n private _onClick = (): void => {\n this._attach();\n this._observed?.toggleNav();\n this._sync();\n };\n}\n\nexport default NileAppShellNavToggle;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-app-shell-nav-toggle': NileAppShellNavToggle;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-app-shell-panel/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,wBAAwB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport * from './nile-app-shell-panel';\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
export declare const styles: import("lit").CSSResult;
|
|
8
|
+
declare const _default: import("lit").CSSResult[];
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { css } from 'lit';
|
|
8
|
+
export const styles = css `
|
|
9
|
+
:host {
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
/* A flex item of the shell's panel region, filling it. */
|
|
12
|
+
flex: 1 1 auto;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
min-height: 0;
|
|
16
|
+
height: 100%;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host([hidden]) {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.header {
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
flex: 0 0 auto;
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: var(--nile-spacing-lg, var(--ng-spacing-lg));
|
|
30
|
+
height: var(--nile-app-shell-top-bar-height, 56px);
|
|
31
|
+
padding-inline: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
32
|
+
border-bottom: var(--nile-border-width-1, var(--ng-border-width-1)) solid
|
|
33
|
+
var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([no-header]) .header {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.heading {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: var(--nile-spacing-md, var(--ng-spacing-md));
|
|
44
|
+
min-width: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.mark {
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
color: var(
|
|
50
|
+
--nile-colors-primary-600,
|
|
51
|
+
var(--ng-colors-fg-brand-primary-600)
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.mark nile-glyph {
|
|
56
|
+
--nile-svg-fill: currentColor;
|
|
57
|
+
--nile-svg-stroke-width: var(--ng-svg-stroke-width);
|
|
58
|
+
width: 20px;
|
|
59
|
+
height: 20px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.title {
|
|
63
|
+
margin: 0;
|
|
64
|
+
font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
|
|
65
|
+
font-weight: var(
|
|
66
|
+
--nile-font-weight-semi-bold,
|
|
67
|
+
var(--ng-font-weight-semibold)
|
|
68
|
+
);
|
|
69
|
+
color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
text-overflow: ellipsis;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.actions {
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
gap: var(--nile-spacing-xs, var(--ng-spacing-xs));
|
|
79
|
+
margin-inline-start: auto;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:host([no-close]) .close {
|
|
83
|
+
display: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.body {
|
|
87
|
+
flex: 1 1 auto;
|
|
88
|
+
min-height: 0;
|
|
89
|
+
overflow-y: auto;
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
gap: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
93
|
+
padding: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:host([no-padding]) .body {
|
|
97
|
+
padding: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.footer {
|
|
101
|
+
flex: 0 0 auto;
|
|
102
|
+
padding: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
103
|
+
border-top: var(--nile-border-width-1, var(--ng-border-width-1)) solid
|
|
104
|
+
var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:host(:not([has-footer])) .footer {
|
|
108
|
+
display: none;
|
|
109
|
+
}
|
|
110
|
+
`;
|
|
111
|
+
export default [styles];
|
|
112
|
+
//# sourceMappingURL=nile-app-shell-panel.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-app-shell-panel.css.js","sourceRoot":"","sources":["../../../src/nile-app-shell-panel/nile-app-shell-panel.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsGxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\nexport const styles = css`\n :host {\n box-sizing: border-box;\n /* A flex item of the shell's panel region, filling it. */\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n min-height: 0;\n height: 100%;\n overflow: hidden;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .header {\n box-sizing: border-box;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-lg, var(--ng-spacing-lg));\n height: var(--nile-app-shell-top-bar-height, 56px);\n padding-inline: var(--nile-spacing-xl, var(--ng-spacing-xl));\n border-bottom: var(--nile-border-width-1, var(--ng-border-width-1)) solid\n var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n }\n\n :host([no-header]) .header {\n display: none;\n }\n\n .heading {\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-md, var(--ng-spacing-md));\n min-width: 0;\n }\n\n .mark {\n display: inline-flex;\n color: var(\n --nile-colors-primary-600,\n var(--ng-colors-fg-brand-primary-600)\n );\n }\n\n .mark nile-glyph {\n --nile-svg-fill: currentColor;\n --nile-svg-stroke-width: var(--ng-svg-stroke-width);\n width: 20px;\n height: 20px;\n }\n\n .title {\n margin: 0;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-weight: var(\n --nile-font-weight-semi-bold,\n var(--ng-font-weight-semibold)\n );\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .actions {\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-xs, var(--ng-spacing-xs));\n margin-inline-start: auto;\n }\n\n :host([no-close]) .close {\n display: none;\n }\n\n .body {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: var(--nile-spacing-xl, var(--ng-spacing-xl));\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n\n :host([no-padding]) .body {\n padding: 0;\n }\n\n .footer {\n flex: 0 0 auto;\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n border-top: var(--nile-border-width-1, var(--ng-border-width-1)) solid\n var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n }\n\n :host(:not([has-footer])) .footer {\n display: none;\n }\n`;\n\nexport default [styles];\n"]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { CSSResultArray, TemplateResult } from 'lit';
|
|
8
|
+
import '../nile-button/nile-button';
|
|
9
|
+
import NileElement from '../internal/nile-element';
|
|
10
|
+
import type { NileAppShellPanelMode } from '../nile-app-shell/nile-app-shell';
|
|
11
|
+
/**
|
|
12
|
+
* @summary The shell's right region — the AI assistant panel. Assigns itself to
|
|
13
|
+
* the shell's `panel` slot and takes over the panel chrome: heading, actions,
|
|
14
|
+
* close button, scroll region and composer footer. The shell keeps the geometry
|
|
15
|
+
* — 480px docked, an overlay drawer when narrow — and the open/closed state.
|
|
16
|
+
*
|
|
17
|
+
* @status stable
|
|
18
|
+
* @since 2.0
|
|
19
|
+
*
|
|
20
|
+
* @tag nile-app-shell-panel
|
|
21
|
+
*
|
|
22
|
+
* @dependency nile-app-shell
|
|
23
|
+
* @dependency nile-glyph
|
|
24
|
+
*
|
|
25
|
+
* @slot - The panel body. Scrolls.
|
|
26
|
+
* @slot header - Replaces the default heading (mark plus label).
|
|
27
|
+
* @slot actions - Controls added before the close button.
|
|
28
|
+
* @slot footer - A composer, docked below the scroll region.
|
|
29
|
+
*
|
|
30
|
+
* @event nile-close - Emitted when the close button is pressed, after the shell
|
|
31
|
+
* has been told to close. Cancelable is not honoured; listen to it to react,
|
|
32
|
+
* and use `no-close` to own the control yourself.
|
|
33
|
+
*
|
|
34
|
+
* @csspart header - The header bar.
|
|
35
|
+
* @csspart title - The default heading text.
|
|
36
|
+
* @csspart actions - The header action group.
|
|
37
|
+
* @csspart close - The close button.
|
|
38
|
+
* @csspart body - The scrolling body.
|
|
39
|
+
* @csspart footer - The footer.
|
|
40
|
+
*/
|
|
41
|
+
export declare class NileAppShellPanel extends NileElement {
|
|
42
|
+
static get styles(): CSSResultArray;
|
|
43
|
+
private shellLink;
|
|
44
|
+
/** The heading, and the accessible name of the region. */
|
|
45
|
+
label: string;
|
|
46
|
+
/** Drops the header bar entirely. */
|
|
47
|
+
noHeader: boolean;
|
|
48
|
+
/** Drops the close button — for a panel the page closes its own way. */
|
|
49
|
+
noClose: boolean;
|
|
50
|
+
/** Removes the body's padding, for a full-bleed transcript. */
|
|
51
|
+
noPadding: boolean;
|
|
52
|
+
/** Id of the shell to follow. Defaults to the nearest ancestor. */
|
|
53
|
+
shell?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Mirrors the shell's panel mode. Set by the shell; treat it as read-only and
|
|
56
|
+
* style against it (`nile-app-shell-panel[mode='overlay']`).
|
|
57
|
+
*/
|
|
58
|
+
mode: NileAppShellPanelMode;
|
|
59
|
+
private _hasFooter;
|
|
60
|
+
connectedCallback(): void;
|
|
61
|
+
protected willUpdate(): void;
|
|
62
|
+
protected updated(): void;
|
|
63
|
+
/** Close the panel through the shell. */
|
|
64
|
+
close(): void;
|
|
65
|
+
private handleFooterSlotChange;
|
|
66
|
+
render(): TemplateResult;
|
|
67
|
+
}
|
|
68
|
+
export default NileAppShellPanel;
|
|
69
|
+
declare global {
|
|
70
|
+
interface HTMLElementTagNameMap {
|
|
71
|
+
'nile-app-shell-panel': NileAppShellPanel;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { __decorate } from "tslib";
|
|
8
|
+
import { html } from 'lit';
|
|
9
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
10
|
+
import { styles } from './nile-app-shell-panel.css';
|
|
11
|
+
import { renderGlyph } from '../internal/glyph';
|
|
12
|
+
import { AppShellController } from '../nile-app-shell/shell-controller';
|
|
13
|
+
import '../nile-button/nile-button';
|
|
14
|
+
import NileElement from '../internal/nile-element';
|
|
15
|
+
/**
|
|
16
|
+
* @summary The shell's right region — the AI assistant panel. Assigns itself to
|
|
17
|
+
* the shell's `panel` slot and takes over the panel chrome: heading, actions,
|
|
18
|
+
* close button, scroll region and composer footer. The shell keeps the geometry
|
|
19
|
+
* — 480px docked, an overlay drawer when narrow — and the open/closed state.
|
|
20
|
+
*
|
|
21
|
+
* @status stable
|
|
22
|
+
* @since 2.0
|
|
23
|
+
*
|
|
24
|
+
* @tag nile-app-shell-panel
|
|
25
|
+
*
|
|
26
|
+
* @dependency nile-app-shell
|
|
27
|
+
* @dependency nile-glyph
|
|
28
|
+
*
|
|
29
|
+
* @slot - The panel body. Scrolls.
|
|
30
|
+
* @slot header - Replaces the default heading (mark plus label).
|
|
31
|
+
* @slot actions - Controls added before the close button.
|
|
32
|
+
* @slot footer - A composer, docked below the scroll region.
|
|
33
|
+
*
|
|
34
|
+
* @event nile-close - Emitted when the close button is pressed, after the shell
|
|
35
|
+
* has been told to close. Cancelable is not honoured; listen to it to react,
|
|
36
|
+
* and use `no-close` to own the control yourself.
|
|
37
|
+
*
|
|
38
|
+
* @csspart header - The header bar.
|
|
39
|
+
* @csspart title - The default heading text.
|
|
40
|
+
* @csspart actions - The header action group.
|
|
41
|
+
* @csspart close - The close button.
|
|
42
|
+
* @csspart body - The scrolling body.
|
|
43
|
+
* @csspart footer - The footer.
|
|
44
|
+
*/
|
|
45
|
+
let NileAppShellPanel = class NileAppShellPanel extends NileElement {
|
|
46
|
+
constructor() {
|
|
47
|
+
super(...arguments);
|
|
48
|
+
this.shellLink = new AppShellController(this);
|
|
49
|
+
/** The heading, and the accessible name of the region. */
|
|
50
|
+
this.label = 'Ask Aquera';
|
|
51
|
+
/** Drops the header bar entirely. */
|
|
52
|
+
this.noHeader = false;
|
|
53
|
+
/** Drops the close button — for a panel the page closes its own way. */
|
|
54
|
+
this.noClose = false;
|
|
55
|
+
/** Removes the body's padding, for a full-bleed transcript. */
|
|
56
|
+
this.noPadding = false;
|
|
57
|
+
/**
|
|
58
|
+
* Mirrors the shell's panel mode. Set by the shell; treat it as read-only and
|
|
59
|
+
* style against it (`nile-app-shell-panel[mode='overlay']`).
|
|
60
|
+
*/
|
|
61
|
+
this.mode = 'docked';
|
|
62
|
+
this._hasFooter = false;
|
|
63
|
+
}
|
|
64
|
+
static get styles() {
|
|
65
|
+
return [styles];
|
|
66
|
+
}
|
|
67
|
+
connectedCallback() {
|
|
68
|
+
super.connectedCallback();
|
|
69
|
+
// Claim the shell's right region unless the author placed it elsewhere.
|
|
70
|
+
if (!this.hasAttribute('slot'))
|
|
71
|
+
this.setAttribute('slot', 'panel');
|
|
72
|
+
if (!this.hasAttribute('role'))
|
|
73
|
+
this.setAttribute('role', 'complementary');
|
|
74
|
+
}
|
|
75
|
+
willUpdate() {
|
|
76
|
+
this.shellLink.shellId = this.shell;
|
|
77
|
+
const shell = this.shellLink.shell;
|
|
78
|
+
if (shell)
|
|
79
|
+
this.mode = shell.panelMode;
|
|
80
|
+
}
|
|
81
|
+
updated() {
|
|
82
|
+
this.toggleAttribute('has-footer', this._hasFooter);
|
|
83
|
+
this.setAttribute('aria-label', this.label);
|
|
84
|
+
}
|
|
85
|
+
/** Close the panel through the shell. */
|
|
86
|
+
close() {
|
|
87
|
+
this.shellLink.shell?.closePanel();
|
|
88
|
+
this.emit('nile-close');
|
|
89
|
+
}
|
|
90
|
+
handleFooterSlotChange(event) {
|
|
91
|
+
this._hasFooter = event.target
|
|
92
|
+
.assignedNodes({ flatten: true })
|
|
93
|
+
.some(node => node.nodeType === Node.ELEMENT_NODE ||
|
|
94
|
+
(node.textContent ?? '').trim() !== '');
|
|
95
|
+
}
|
|
96
|
+
render() {
|
|
97
|
+
return html `
|
|
98
|
+
<header class="header" part="header">
|
|
99
|
+
<slot name="header">
|
|
100
|
+
<span class="heading">
|
|
101
|
+
<span class="mark">${renderGlyph('ng-sparkles', 20, 'currentColor')}</span>
|
|
102
|
+
<h2 class="title" part="title">${this.label}</h2>
|
|
103
|
+
</span>
|
|
104
|
+
</slot>
|
|
105
|
+
<div class="actions" part="actions">
|
|
106
|
+
<slot name="actions"></slot>
|
|
107
|
+
<nile-button
|
|
108
|
+
class="close"
|
|
109
|
+
part="close"
|
|
110
|
+
variant="ghost"
|
|
111
|
+
circle
|
|
112
|
+
title="Close ${this.label}"
|
|
113
|
+
aria-label="Close ${this.label}"
|
|
114
|
+
@click=${() => this.close()}
|
|
115
|
+
>
|
|
116
|
+
${renderGlyph('ng-x-close', 24, 'currentColor')}
|
|
117
|
+
</nile-button>
|
|
118
|
+
</div>
|
|
119
|
+
</header>
|
|
120
|
+
|
|
121
|
+
<div class="body" part="body"><slot></slot></div>
|
|
122
|
+
|
|
123
|
+
<div class="footer" part="footer">
|
|
124
|
+
<slot
|
|
125
|
+
name="footer"
|
|
126
|
+
@slotchange=${(e) => this.handleFooterSlotChange(e)}
|
|
127
|
+
></slot>
|
|
128
|
+
</div>
|
|
129
|
+
`;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
__decorate([
|
|
133
|
+
property({ type: String })
|
|
134
|
+
], NileAppShellPanel.prototype, "label", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
property({ type: Boolean, reflect: true, attribute: 'no-header' })
|
|
137
|
+
], NileAppShellPanel.prototype, "noHeader", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
property({ type: Boolean, reflect: true, attribute: 'no-close' })
|
|
140
|
+
], NileAppShellPanel.prototype, "noClose", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
property({ type: Boolean, reflect: true, attribute: 'no-padding' })
|
|
143
|
+
], NileAppShellPanel.prototype, "noPadding", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
property({ type: String })
|
|
146
|
+
], NileAppShellPanel.prototype, "shell", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
property({ type: String, reflect: true })
|
|
149
|
+
], NileAppShellPanel.prototype, "mode", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
state()
|
|
152
|
+
], NileAppShellPanel.prototype, "_hasFooter", void 0);
|
|
153
|
+
NileAppShellPanel = __decorate([
|
|
154
|
+
customElement('nile-app-shell-panel')
|
|
155
|
+
], NileAppShellPanel);
|
|
156
|
+
export { NileAppShellPanel };
|
|
157
|
+
export default NileAppShellPanel;
|
|
158
|
+
//# sourceMappingURL=nile-app-shell-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-app-shell-panel.js","sourceRoot":"","sources":["../../../src/nile-app-shell-panel/nile-app-shell-panel.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { styles } from './nile-app-shell-panel.css';\nimport { renderGlyph } from '../internal/glyph';\nimport { AppShellController } from '../nile-app-shell/shell-controller';\nimport '../nile-button/nile-button';\nimport NileElement from '../internal/nile-element';\nimport type { NileAppShellPanelMode } from '../nile-app-shell/nile-app-shell';\n\n/**\n * @summary The shell's right region — the AI assistant panel. Assigns itself to\n * the shell's `panel` slot and takes over the panel chrome: heading, actions,\n * close button, scroll region and composer footer. The shell keeps the geometry\n * — 480px docked, an overlay drawer when narrow — and the open/closed state.\n *\n * @status stable\n * @since 2.0\n *\n * @tag nile-app-shell-panel\n *\n * @dependency nile-app-shell\n * @dependency nile-glyph\n *\n * @slot - The panel body. Scrolls.\n * @slot header - Replaces the default heading (mark plus label).\n * @slot actions - Controls added before the close button.\n * @slot footer - A composer, docked below the scroll region.\n *\n * @event nile-close - Emitted when the close button is pressed, after the shell\n * has been told to close. Cancelable is not honoured; listen to it to react,\n * and use `no-close` to own the control yourself.\n *\n * @csspart header - The header bar.\n * @csspart title - The default heading text.\n * @csspart actions - The header action group.\n * @csspart close - The close button.\n * @csspart body - The scrolling body.\n * @csspart footer - The footer.\n */\n@customElement('nile-app-shell-panel')\nexport class NileAppShellPanel extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private shellLink = new AppShellController(this);\n\n /** The heading, and the accessible name of the region. */\n @property({ type: String })\n label: string = 'Ask Aquera';\n\n /** Drops the header bar entirely. */\n @property({ type: Boolean, reflect: true, attribute: 'no-header' })\n noHeader: boolean = false;\n\n /** Drops the close button — for a panel the page closes its own way. */\n @property({ type: Boolean, reflect: true, attribute: 'no-close' })\n noClose: boolean = false;\n\n /** Removes the body's padding, for a full-bleed transcript. */\n @property({ type: Boolean, reflect: true, attribute: 'no-padding' })\n noPadding: boolean = false;\n\n /** Id of the shell to follow. Defaults to the nearest ancestor. */\n @property({ type: String })\n shell?: string;\n\n /**\n * Mirrors the shell's panel mode. Set by the shell; treat it as read-only and\n * style against it (`nile-app-shell-panel[mode='overlay']`).\n */\n @property({ type: String, reflect: true })\n mode: NileAppShellPanelMode = 'docked';\n\n @state() private _hasFooter: boolean = false;\n\n public connectedCallback(): void {\n super.connectedCallback();\n // Claim the shell's right region unless the author placed it elsewhere.\n if (!this.hasAttribute('slot')) this.setAttribute('slot', 'panel');\n if (!this.hasAttribute('role')) this.setAttribute('role', 'complementary');\n }\n\n protected willUpdate(): void {\n this.shellLink.shellId = this.shell;\n const shell = this.shellLink.shell;\n if (shell) this.mode = shell.panelMode;\n }\n\n protected updated(): void {\n this.toggleAttribute('has-footer', this._hasFooter);\n this.setAttribute('aria-label', this.label);\n }\n\n /** Close the panel through the shell. */\n public close(): void {\n this.shellLink.shell?.closePanel();\n this.emit('nile-close');\n }\n\n private handleFooterSlotChange(event: Event): void {\n this._hasFooter = (event.target as HTMLSlotElement)\n .assignedNodes({ flatten: true })\n .some(\n node =>\n node.nodeType === Node.ELEMENT_NODE ||\n (node.textContent ?? '').trim() !== ''\n );\n }\n\n public render(): TemplateResult {\n return html`\n <header class=\"header\" part=\"header\">\n <slot name=\"header\">\n <span class=\"heading\">\n <span class=\"mark\">${renderGlyph('ng-sparkles', 20, 'currentColor')}</span>\n <h2 class=\"title\" part=\"title\">${this.label}</h2>\n </span>\n </slot>\n <div class=\"actions\" part=\"actions\">\n <slot name=\"actions\"></slot>\n <nile-button\n class=\"close\"\n part=\"close\"\n variant=\"ghost\"\n circle\n title=\"Close ${this.label}\"\n aria-label=\"Close ${this.label}\"\n @click=${() => this.close()}\n >\n ${renderGlyph('ng-x-close', 24, 'currentColor')}\n </nile-button>\n </div>\n </header>\n\n <div class=\"body\" part=\"body\"><slot></slot></div>\n\n <div class=\"footer\" part=\"footer\">\n <slot\n name=\"footer\"\n @slotchange=${(e: Event) => this.handleFooterSlotChange(e)}\n ></slot>\n </div>\n `;\n }\n}\n\nexport default NileAppShellPanel;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-app-shell-panel': NileAppShellPanel;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-app-shell-side-nav/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,2BAA2B,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport * from './nile-app-shell-side-nav';\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* AppShellSideNav CSS. The shell owns the track width; this owns what happens
|
|
9
|
+
* inside it — a pinned header, a scrolling body, a pinned footer.
|
|
10
|
+
*/
|
|
11
|
+
export declare const styles: import("lit").CSSResult;
|
|
12
|
+
declare const _default: import("lit").CSSResult[];
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { css } from 'lit';
|
|
8
|
+
/**
|
|
9
|
+
* AppShellSideNav CSS. The shell owns the track width; this owns what happens
|
|
10
|
+
* inside it — a pinned header, a scrolling body, a pinned footer.
|
|
11
|
+
*/
|
|
12
|
+
export const styles = css `
|
|
13
|
+
:host {
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
/* The nav and the page share one surface. */
|
|
21
|
+
background: var(--nile-app-shell-side-nav-bg, transparent);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host([hidden]) {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.header,
|
|
29
|
+
.footer {
|
|
30
|
+
flex: 0 0 auto;
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.body {
|
|
35
|
+
flex: 1 1 auto;
|
|
36
|
+
min-height: 0;
|
|
37
|
+
overflow-y: auto;
|
|
38
|
+
overflow-x: hidden;
|
|
39
|
+
padding: var(
|
|
40
|
+
--nile-app-shell-side-nav-padding,
|
|
41
|
+
var(--nile-spacing-lg, var(--ng-spacing-lg))
|
|
42
|
+
);
|
|
43
|
+
scrollbar-width: thin;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.body::-webkit-scrollbar {
|
|
47
|
+
width: 6px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.body::-webkit-scrollbar-track {
|
|
51
|
+
background: transparent;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.body::-webkit-scrollbar-thumb {
|
|
55
|
+
background-color: var(
|
|
56
|
+
--nile-colors-neutral-500,
|
|
57
|
+
var(--ng-colors-border-primary)
|
|
58
|
+
);
|
|
59
|
+
border-radius: 10px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* A rail has no room for a horizontal scrollbar or for wide children. */
|
|
63
|
+
:host([collapsed]) .body {
|
|
64
|
+
overflow-x: hidden;
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
export default [styles];
|
|
68
|
+
//# sourceMappingURL=nile-app-shell-side-nav.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-app-shell-side-nav.css.js","sourceRoot":"","sources":["../../../src/nile-app-shell-side-nav/nile-app-shell-side-nav.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * AppShellSideNav CSS. The shell owns the track width; this owns what happens\n * inside it — a pinned header, a scrolling body, a pinned footer.\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n overflow: hidden;\n /* The nav and the page share one surface. */\n background: var(--nile-app-shell-side-nav-bg, transparent);\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .header,\n .footer {\n flex: 0 0 auto;\n display: block;\n }\n\n .body {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n padding: var(\n --nile-app-shell-side-nav-padding,\n var(--nile-spacing-lg, var(--ng-spacing-lg))\n );\n scrollbar-width: thin;\n }\n\n .body::-webkit-scrollbar {\n width: 6px;\n }\n\n .body::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .body::-webkit-scrollbar-thumb {\n background-color: var(\n --nile-colors-neutral-500,\n var(--ng-colors-border-primary)\n );\n border-radius: 10px;\n }\n\n /* A rail has no room for a horizontal scrollbar or for wide children. */\n :host([collapsed]) .body {\n overflow-x: hidden;\n }\n`;\n\nexport default [styles];\n"]}
|