@aquera/nile-elements 2.0.5 → 2.0.7
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 +7 -0
- package/demo/nxtgen-classes.css +15 -12
- package/demo/nxtgen-dark.css +24 -24
- package/demo/nxtgen-properties.css +27 -24
- package/demo/nxtgen-utilities.css +39 -36
- package/demo/nxtgen.css +15 -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 +1363 -340
- 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-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-side-bar-footer/nile-side-bar-footer.cjs.js +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.css.esm.js +5 -0
- package/dist/nile-side-bar-footer/nile-side-bar-footer.esm.js +2 -2
- package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js.map +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.cjs.js.map +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.css.esm.js +5 -0
- package/dist/nile-side-bar-header/nile-side-bar-header.esm.js +2 -2
- 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-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/nile-side-bar-footer/nile-side-bar-footer.css.js +5 -0
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js.map +1 -1
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.d.ts +10 -0
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js +17 -1
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.js.map +1 -1
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.test.d.ts +1 -0
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.test.js +42 -0
- package/dist/src/nile-side-bar-footer/nile-side-bar-footer.test.js.map +1 -0
- package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.d.ts +4 -0
- package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.js +68 -0
- package/dist/src/nile-side-bar-header/nile-side-bar-app-shell.test.js.map +1 -0
- package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js +5 -0
- package/dist/src/nile-side-bar-header/nile-side-bar-header.css.js.map +1 -1
- package/dist/src/nile-side-bar-header/nile-side-bar-header.d.ts +9 -0
- package/dist/src/nile-side-bar-header/nile-side-bar-header.js +17 -1
- package/dist/src/nile-side-bar-header/nile-side-bar-header.js.map +1 -1
- package/dist/src/nile-side-bar-header/nile-side-bar-header.test.d.ts +1 -0
- package/dist/src/nile-side-bar-header/nile-side-bar-header.test.js +42 -0
- package/dist/src/nile-side-bar-header/nile-side-bar-header.test.js.map +1 -0
- package/dist/src/version.d.ts +11 -1
- package/dist/src/version.js +51 -8
- 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 +7 -2
- 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-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/nile-side-bar-footer/nile-side-bar-footer.css.ts +5 -0
- package/src/nile-side-bar-footer/nile-side-bar-footer.test.ts +55 -0
- package/src/nile-side-bar-footer/nile-side-bar-footer.ts +12 -1
- package/src/nile-side-bar-header/nile-side-bar-app-shell.test.ts +78 -0
- package/src/nile-side-bar-header/nile-side-bar-header.css.ts +5 -0
- package/src/nile-side-bar-header/nile-side-bar-header.test.ts +55 -0
- package/src/nile-side-bar-header/nile-side-bar-header.ts +10 -0
- package/src/version.ts +55 -7
- package/vscode-html-custom-data.json +246 -9
|
@@ -0,0 +1,54 @@
|
|
|
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 NileElement from '../internal/nile-element';
|
|
9
|
+
/**
|
|
10
|
+
* @summary The shell's left region — the navigation track. Assigns itself to the
|
|
11
|
+
* shell's `side-nav` slot and mirrors the shell's rail state, so nav content can
|
|
12
|
+
* style against it.
|
|
13
|
+
*
|
|
14
|
+
* @status stable
|
|
15
|
+
* @since 2.0
|
|
16
|
+
*
|
|
17
|
+
* @tag nile-app-shell-side-nav
|
|
18
|
+
*
|
|
19
|
+
* @dependency nile-app-shell
|
|
20
|
+
*
|
|
21
|
+
* @slot - The nav body. Scrolls.
|
|
22
|
+
* @slot header - Pinned above the scroll region — a wordmark or product switcher.
|
|
23
|
+
* @slot footer - Pinned below it — an account row or help link.
|
|
24
|
+
*
|
|
25
|
+
* @csspart header - The pinned header.
|
|
26
|
+
* @csspart body - The scrolling nav body.
|
|
27
|
+
* @csspart footer - The pinned footer.
|
|
28
|
+
*
|
|
29
|
+
* @cssproperty [--nile-app-shell-side-nav-padding=12px] - Body inset. 12 + 40 +
|
|
30
|
+
* 12 is what makes a 64px rail.
|
|
31
|
+
* @cssproperty [--nile-app-shell-side-nav-bg=transparent] - Surface behind the
|
|
32
|
+
* nav. Transparent by default: the nav and the page share one.
|
|
33
|
+
*/
|
|
34
|
+
export declare class NileAppShellSideNav extends NileElement {
|
|
35
|
+
static get styles(): CSSResultArray;
|
|
36
|
+
private shellLink;
|
|
37
|
+
/**
|
|
38
|
+
* Mirrors the shell's effective rail state — the user's preference, or a rail
|
|
39
|
+
* forced by the shell's width. Set by the shell; treat it as read-only and
|
|
40
|
+
* style against it (`nile-app-shell-side-nav[collapsed] .label`).
|
|
41
|
+
*/
|
|
42
|
+
collapsed: boolean;
|
|
43
|
+
/** Id of the shell to follow. Defaults to the nearest ancestor. */
|
|
44
|
+
shell?: string;
|
|
45
|
+
connectedCallback(): void;
|
|
46
|
+
protected willUpdate(): void;
|
|
47
|
+
render(): TemplateResult;
|
|
48
|
+
}
|
|
49
|
+
export default NileAppShellSideNav;
|
|
50
|
+
declare global {
|
|
51
|
+
interface HTMLElementTagNameMap {
|
|
52
|
+
'nile-app-shell-side-nav': NileAppShellSideNav;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
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 } from 'lit/decorators.js';
|
|
10
|
+
import { styles } from './nile-app-shell-side-nav.css';
|
|
11
|
+
import { AppShellController } from '../nile-app-shell/shell-controller';
|
|
12
|
+
import NileElement from '../internal/nile-element';
|
|
13
|
+
/**
|
|
14
|
+
* @summary The shell's left region — the navigation track. Assigns itself to the
|
|
15
|
+
* shell's `side-nav` slot and mirrors the shell's rail state, so nav content can
|
|
16
|
+
* style against it.
|
|
17
|
+
*
|
|
18
|
+
* @status stable
|
|
19
|
+
* @since 2.0
|
|
20
|
+
*
|
|
21
|
+
* @tag nile-app-shell-side-nav
|
|
22
|
+
*
|
|
23
|
+
* @dependency nile-app-shell
|
|
24
|
+
*
|
|
25
|
+
* @slot - The nav body. Scrolls.
|
|
26
|
+
* @slot header - Pinned above the scroll region — a wordmark or product switcher.
|
|
27
|
+
* @slot footer - Pinned below it — an account row or help link.
|
|
28
|
+
*
|
|
29
|
+
* @csspart header - The pinned header.
|
|
30
|
+
* @csspart body - The scrolling nav body.
|
|
31
|
+
* @csspart footer - The pinned footer.
|
|
32
|
+
*
|
|
33
|
+
* @cssproperty [--nile-app-shell-side-nav-padding=12px] - Body inset. 12 + 40 +
|
|
34
|
+
* 12 is what makes a 64px rail.
|
|
35
|
+
* @cssproperty [--nile-app-shell-side-nav-bg=transparent] - Surface behind the
|
|
36
|
+
* nav. Transparent by default: the nav and the page share one.
|
|
37
|
+
*/
|
|
38
|
+
let NileAppShellSideNav = class NileAppShellSideNav extends NileElement {
|
|
39
|
+
constructor() {
|
|
40
|
+
super(...arguments);
|
|
41
|
+
this.shellLink = new AppShellController(this);
|
|
42
|
+
/**
|
|
43
|
+
* Mirrors the shell's effective rail state — the user's preference, or a rail
|
|
44
|
+
* forced by the shell's width. Set by the shell; treat it as read-only and
|
|
45
|
+
* style against it (`nile-app-shell-side-nav[collapsed] .label`).
|
|
46
|
+
*/
|
|
47
|
+
this.collapsed = false;
|
|
48
|
+
}
|
|
49
|
+
static get styles() {
|
|
50
|
+
return [styles];
|
|
51
|
+
}
|
|
52
|
+
connectedCallback() {
|
|
53
|
+
super.connectedCallback();
|
|
54
|
+
// Claim the shell's left region unless the author placed it elsewhere.
|
|
55
|
+
if (!this.hasAttribute('slot'))
|
|
56
|
+
this.setAttribute('slot', 'side-nav');
|
|
57
|
+
}
|
|
58
|
+
willUpdate() {
|
|
59
|
+
this.shellLink.shellId = this.shell;
|
|
60
|
+
const shell = this.shellLink.shell;
|
|
61
|
+
if (shell)
|
|
62
|
+
this.collapsed = shell.rail;
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
return html `
|
|
66
|
+
<slot name="header" part="header" class="header"></slot>
|
|
67
|
+
<div class="body" part="body"><slot></slot></div>
|
|
68
|
+
<slot name="footer" part="footer" class="footer"></slot>
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
__decorate([
|
|
73
|
+
property({ type: Boolean, reflect: true })
|
|
74
|
+
], NileAppShellSideNav.prototype, "collapsed", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
property({ type: String })
|
|
77
|
+
], NileAppShellSideNav.prototype, "shell", void 0);
|
|
78
|
+
NileAppShellSideNav = __decorate([
|
|
79
|
+
customElement('nile-app-shell-side-nav')
|
|
80
|
+
], NileAppShellSideNav);
|
|
81
|
+
export { NileAppShellSideNav };
|
|
82
|
+
export default NileAppShellSideNav;
|
|
83
|
+
//# sourceMappingURL=nile-app-shell-side-nav.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-app-shell-side-nav.js","sourceRoot":"","sources":["../../../src/nile-app-shell-side-nav/nile-app-shell-side-nav.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAkC,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,WAAW;IAA7C;;QAKG,cAAS,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAEjD;;;;WAIG;QAEH,cAAS,GAAY,KAAK,CAAC;IAyB7B,CAAC;IArCQ,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAgBM,iBAAiB;QACtB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,uEAAuE;QACvE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;YAAE,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACxE,CAAC;IAES,UAAU;QAClB,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC;QACpC,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACnC,IAAI,KAAK;YAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC;IACzC,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAA;;;;KAIV,CAAC;IACJ,CAAC;CACF,CAAA;AAzBC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sDAChB;AAI3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACZ;AAjBJ,mBAAmB;IAD/B,aAAa,CAAC,yBAAyB,CAAC;GAC5B,mBAAmB,CAsC/B;;AAED,eAAe,mBAAmB,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 { html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-app-shell-side-nav.css';\nimport { AppShellController } from '../nile-app-shell/shell-controller';\nimport NileElement from '../internal/nile-element';\n\n/**\n * @summary The shell's left region — the navigation track. Assigns itself to the\n * shell's `side-nav` slot and mirrors the shell's rail state, so nav content can\n * style against it.\n *\n * @status stable\n * @since 2.0\n *\n * @tag nile-app-shell-side-nav\n *\n * @dependency nile-app-shell\n *\n * @slot - The nav body. Scrolls.\n * @slot header - Pinned above the scroll region — a wordmark or product switcher.\n * @slot footer - Pinned below it — an account row or help link.\n *\n * @csspart header - The pinned header.\n * @csspart body - The scrolling nav body.\n * @csspart footer - The pinned footer.\n *\n * @cssproperty [--nile-app-shell-side-nav-padding=12px] - Body inset. 12 + 40 +\n * 12 is what makes a 64px rail.\n * @cssproperty [--nile-app-shell-side-nav-bg=transparent] - Surface behind the\n * nav. Transparent by default: the nav and the page share one.\n */\n@customElement('nile-app-shell-side-nav')\nexport class NileAppShellSideNav extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private shellLink = new AppShellController(this);\n\n /**\n * Mirrors the shell's effective rail state — the user's preference, or a rail\n * forced by the shell's width. Set by the shell; treat it as read-only and\n * style against it (`nile-app-shell-side-nav[collapsed] .label`).\n */\n @property({ type: Boolean, reflect: true })\n collapsed: boolean = false;\n\n /** Id of the shell to follow. Defaults to the nearest ancestor. */\n @property({ type: String })\n shell?: string;\n\n public connectedCallback(): void {\n super.connectedCallback();\n // Claim the shell's left region unless the author placed it elsewhere.\n if (!this.hasAttribute('slot')) this.setAttribute('slot', 'side-nav');\n }\n\n protected willUpdate(): void {\n this.shellLink.shellId = this.shell;\n const shell = this.shellLink.shell;\n if (shell) this.collapsed = shell.rail;\n }\n\n public render(): TemplateResult {\n return html`\n <slot name=\"header\" part=\"header\" class=\"header\"></slot>\n <div class=\"body\" part=\"body\"><slot></slot></div>\n <slot name=\"footer\" part=\"footer\" class=\"footer\"></slot>\n `;\n }\n}\n\nexport default NileAppShellSideNav;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-app-shell-side-nav': NileAppShellSideNav;\n }\n}\n"]}
|
|
@@ -79,26 +79,24 @@ export const styles = css `
|
|
|
79
79
|
display: none;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
/* Offset arrow by 0.5px so its outline aligns with the panel border and its fill fully covers it. */
|
|
82
83
|
.tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow { bottom: 0; }
|
|
83
|
-
.tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow:after,
|
|
84
84
|
.tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow > svg {
|
|
85
|
-
top:
|
|
85
|
+
top: 15.5px;
|
|
86
86
|
transform: rotate(180deg);
|
|
87
87
|
}
|
|
88
88
|
.tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-svg-arrow { top: 0; }
|
|
89
|
-
.tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-svg-arrow > svg { bottom:
|
|
89
|
+
.tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-svg-arrow > svg { bottom: 15.5px; }
|
|
90
90
|
.tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow { right: 0; }
|
|
91
|
-
.tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow:after,
|
|
92
91
|
.tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow > svg {
|
|
93
92
|
transform: rotate(90deg);
|
|
94
|
-
top: calc(50% -
|
|
93
|
+
top: calc(50% - 3.5px);
|
|
95
94
|
left: 11px;
|
|
96
95
|
}
|
|
97
96
|
.tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow { left: 0; }
|
|
98
|
-
.tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow:after,
|
|
99
97
|
.tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow > svg {
|
|
100
98
|
transform: rotate(-90deg);
|
|
101
|
-
top: calc(50% -
|
|
99
|
+
top: calc(50% - 3.5px);
|
|
102
100
|
right: 11px;
|
|
103
101
|
}
|
|
104
102
|
|
|
@@ -111,6 +109,14 @@ export const styles = css `
|
|
|
111
109
|
|
|
112
110
|
.tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow > svg {
|
|
113
111
|
position: absolute;
|
|
112
|
+
overflow: visible;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow > svg > .nile-floating-panel__arrow-outline {
|
|
116
|
+
fill: none;
|
|
117
|
+
stroke: var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));
|
|
118
|
+
stroke-width: 1;
|
|
119
|
+
vector-effect: non-scaling-stroke;
|
|
114
120
|
}
|
|
115
121
|
|
|
116
122
|
.tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-arrow {
|
|
@@ -121,6 +127,13 @@ export const styles = css `
|
|
|
121
127
|
border-width: 8px 8px 0;
|
|
122
128
|
border-top-color: initial;
|
|
123
129
|
}
|
|
130
|
+
.tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-arrow:after {
|
|
131
|
+
bottom: -8px;
|
|
132
|
+
left: -1px;
|
|
133
|
+
border-width: 9px 9px 0;
|
|
134
|
+
border-top-color: var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));
|
|
135
|
+
clip-path: inset(2px 0 0 0);
|
|
136
|
+
}
|
|
124
137
|
.tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-arrow {
|
|
125
138
|
top: 0;
|
|
126
139
|
}
|
|
@@ -129,6 +142,13 @@ export const styles = css `
|
|
|
129
142
|
border-width: 0 8px 8px;
|
|
130
143
|
border-bottom-color: initial;
|
|
131
144
|
}
|
|
145
|
+
.tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-arrow:after {
|
|
146
|
+
top: -8px;
|
|
147
|
+
left: -1px;
|
|
148
|
+
border-width: 0 9px 9px;
|
|
149
|
+
border-bottom-color: var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));
|
|
150
|
+
clip-path: inset(0 0 2px 0);
|
|
151
|
+
}
|
|
132
152
|
.tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-arrow {
|
|
133
153
|
right: 0;
|
|
134
154
|
}
|
|
@@ -137,6 +157,13 @@ export const styles = css `
|
|
|
137
157
|
border-width: 8px 0 8px 8px;
|
|
138
158
|
border-left-color: initial;
|
|
139
159
|
}
|
|
160
|
+
.tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-arrow:after {
|
|
161
|
+
right: -8px;
|
|
162
|
+
top: -1px;
|
|
163
|
+
border-width: 9px 0 9px 9px;
|
|
164
|
+
border-left-color: var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));
|
|
165
|
+
clip-path: inset(0 0 0 2px);
|
|
166
|
+
}
|
|
140
167
|
.tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-arrow {
|
|
141
168
|
left: 0;
|
|
142
169
|
}
|
|
@@ -145,18 +172,29 @@ export const styles = css `
|
|
|
145
172
|
border-width: 8px 8px 8px 0;
|
|
146
173
|
border-right-color: initial;
|
|
147
174
|
}
|
|
175
|
+
.tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-arrow:after {
|
|
176
|
+
left: -8px;
|
|
177
|
+
top: -1px;
|
|
178
|
+
border-width: 9px 9px 9px 0;
|
|
179
|
+
border-right-color: var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));
|
|
180
|
+
clip-path: inset(0 2px 0 0);
|
|
181
|
+
}
|
|
148
182
|
|
|
149
183
|
.tippy-box[data-theme~='floating-panel'] > .tippy-arrow {
|
|
150
184
|
width: 16px;
|
|
151
185
|
height: 16px;
|
|
152
186
|
color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
|
|
153
187
|
}
|
|
154
|
-
|
|
188
|
+
/* :after is a 1px-larger triangle in the border colour, stacked behind :before, so the border continues around the arrow. */
|
|
189
|
+
.tippy-box[data-theme~='floating-panel'] > .tippy-arrow:before,
|
|
190
|
+
.tippy-box[data-theme~='floating-panel'] > .tippy-arrow:after {
|
|
155
191
|
content: '';
|
|
156
192
|
position: absolute;
|
|
157
193
|
border-color: transparent;
|
|
158
194
|
border-style: solid;
|
|
159
195
|
}
|
|
196
|
+
.tippy-box[data-theme~='floating-panel'] > .tippy-arrow:before { z-index: 1; }
|
|
197
|
+
.tippy-box[data-theme~='floating-panel'] > .tippy-arrow:after { z-index: 0; }
|
|
160
198
|
`;
|
|
161
199
|
export function injectGlobalFloatingPanelStyles() {
|
|
162
200
|
if (typeof document === 'undefined')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-floating-panel.css.js","sourceRoot":"","sources":["../../../src/nile-floating-panel/nile-floating-panel.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"nile-floating-panel.css.js","sourceRoot":"","sources":["../../../src/nile-floating-panel/nile-floating-panel.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8LxB,CAAC;AAEF,MAAM,UAAU,+BAA+B;IAC7C,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO;IAE5C,MAAM,QAAQ,GAAG,4BAA4B,CAAC;IAC9C,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC;QAAE,OAAO;IAE9C,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,EAAE,GAAG,QAAQ,CAAC;IACpB,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAED,+BAA+B,EAAE,CAAC;AAElC,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\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 nile-floating-panel {\n display: inline-block;\n }\n\n .tippy-box[data-theme~='floating-panel'] {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n border: solid 1px var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n box-shadow: var(--nile-box-shadow-2, var(--ng-shadow-lg));\n padding: 0;\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n line-height: 1.4;\n white-space: normal;\n outline: 0;\n transition-property: transform, visibility, opacity;\n }\n\n .tippy-box[data-theme~='floating-panel'][data-animation='fade'][data-state='hidden'] {\n opacity: 0;\n }\n\n .tippy-box[data-theme~='floating-panel'][data-inertia][data-state='visible'] {\n transition-timing-function: cubic-bezier(0.54, 1.5, 0.38, 1.11);\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-content {\n position: relative;\n z-index: 1;\n padding: 0;\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow {\n fill: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-arrow {\n color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n\n .nile-floating-panel__body {\n display: flex;\n flex-direction: column;\n height: auto;\n min-width: var(--nile-width-352px, var(--ng-width-80));\n gap: var(--nile-spacing-xl, var(--ng-spacing-xl));\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n\n .nile-floating-panel__title {\n display: block;\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n font-style: normal;\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));\n letter-spacing: var(--nile-spacing-one-by-five-x, var(--ng-spacing-none));\n }\n\n .nile-floating-panel__title:empty {\n display: none;\n }\n\n .nile-floating-panel__action {\n align-self: end;\n display: inline;\n }\n\n .nile-floating-panel__action:empty {\n display: none;\n }\n\n /* Offset arrow by 0.5px so its outline aligns with the panel border and its fill fully covers it. */\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow { bottom: 0; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow > svg {\n top: 15.5px;\n transform: rotate(180deg);\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-svg-arrow { top: 0; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-svg-arrow > svg { bottom: 15.5px; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow { right: 0; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow > svg {\n transform: rotate(90deg);\n top: calc(50% - 3.5px);\n left: 11px;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow { left: 0; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow > svg {\n transform: rotate(-90deg);\n top: calc(50% - 3.5px);\n right: 11px;\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow {\n width: 16px;\n height: 16px;\n text-align: initial;\n position: absolute;\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow > svg {\n position: absolute;\n overflow: visible;\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow > svg > .nile-floating-panel__arrow-outline {\n fill: none;\n stroke: var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));\n stroke-width: 1;\n vector-effect: non-scaling-stroke;\n }\n\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-arrow {\n bottom: 0;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-arrow:before {\n bottom: -7px;\n border-width: 8px 8px 0;\n border-top-color: initial;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-arrow:after {\n bottom: -8px;\n left: -1px;\n border-width: 9px 9px 0;\n border-top-color: var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));\n clip-path: inset(2px 0 0 0);\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-arrow {\n top: 0;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-arrow:before {\n top: -7px;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-arrow:after {\n top: -8px;\n left: -1px;\n border-width: 0 9px 9px;\n border-bottom-color: var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));\n clip-path: inset(0 0 2px 0);\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-arrow {\n right: 0;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-arrow:before {\n right: -7px;\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-arrow:after {\n right: -8px;\n top: -1px;\n border-width: 9px 0 9px 9px;\n border-left-color: var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));\n clip-path: inset(0 0 0 2px);\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-arrow {\n left: 0;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-arrow:after {\n left: -8px;\n top: -1px;\n border-width: 9px 9px 9px 0;\n border-right-color: var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));\n clip-path: inset(0 2px 0 0);\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-arrow {\n width: 16px;\n height: 16px;\n color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n /* :after is a 1px-larger triangle in the border colour, stacked behind :before, so the border continues around the arrow. */\n .tippy-box[data-theme~='floating-panel'] > .tippy-arrow:before,\n .tippy-box[data-theme~='floating-panel'] > .tippy-arrow:after {\n content: '';\n position: absolute;\n border-color: transparent;\n border-style: solid;\n }\n .tippy-box[data-theme~='floating-panel'] > .tippy-arrow:before { z-index: 1; }\n .tippy-box[data-theme~='floating-panel'] > .tippy-arrow:after { z-index: 0; }\n`;\n\nexport function injectGlobalFloatingPanelStyles(): void {\n if (typeof document === 'undefined') return;\n\n const STYLE_ID = 'nile-floating-panel-styles';\n if (document.getElementById(STYLE_ID)) return;\n\n const style = document.createElement('style');\n style.id = STYLE_ID;\n style.textContent = styles.cssText;\n document.head?.appendChild(style);\n}\n\ninjectGlobalFloatingPanelStyles();\n\nexport default [styles];\n"]}
|
|
@@ -12,6 +12,18 @@ import NileElement from '../internal/nile-element';
|
|
|
12
12
|
import tippy, { roundArrow, followCursor as followCursorPlugin, } from 'tippy.js';
|
|
13
13
|
import { parseFollowCursor, parseDuration, } from '../nile-lite-tooltip/utils';
|
|
14
14
|
import { VisibilityManager } from '../utilities/visibility-manager.js';
|
|
15
|
+
const TIPPY_ROUND_ARROW = /^<svg width="(\d+)" height="(\d+)"[^>]*><path d="(.+?)H0z"/.exec(roundArrow);
|
|
16
|
+
const NILE_ROUND_ARROW = (() => {
|
|
17
|
+
if (!TIPPY_ROUND_ARROW)
|
|
18
|
+
return roundArrow;
|
|
19
|
+
const [, rawWidth, rawHeight, curve] = TIPPY_ROUND_ARROW;
|
|
20
|
+
const width = Number(rawWidth);
|
|
21
|
+
const height = Number(rawHeight) + 1; // + the skirt that covers the border
|
|
22
|
+
return (`<svg width="${width}" height="${height}" viewBox="0 0 ${width} ${height}" aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg">` +
|
|
23
|
+
`<path d="${curve}V${height}H0Z"></path>` +
|
|
24
|
+
`<path class="nile-floating-panel__arrow-outline" d="${curve}"></path>` +
|
|
25
|
+
`</svg>`);
|
|
26
|
+
})();
|
|
15
27
|
/**
|
|
16
28
|
* Nile floating-panel component.
|
|
17
29
|
*
|
|
@@ -363,7 +375,7 @@ let NileFloatingPanel = NileFloatingPanel_1 = class NileFloatingPanel extends Ni
|
|
|
363
375
|
// ─── Tippy management ───
|
|
364
376
|
_resolveArrow() {
|
|
365
377
|
switch (this.arrow) {
|
|
366
|
-
case 'round': return
|
|
378
|
+
case 'round': return NILE_ROUND_ARROW;
|
|
367
379
|
case 'none': return false;
|
|
368
380
|
default: return true;
|
|
369
381
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-floating-panel.js","sourceRoot":"","sources":["../../../src/nile-floating-panel/nile-floating-panel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAGH,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,EAGZ,UAAU,EACV,YAAY,IAAI,kBAAkB,GACnC,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,iBAAiB,EACjB,aAAa,GACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE;;;;;;;;;;;;;;;;;;GAkBG;AAEI,IAAM,iBAAiB,yBAAvB,MAAM,iBAAkB,SAAQ,WAAW;IAA3C;;QAqBL,yBAAyB;QAGzB,cAAS,GAeQ,QAAQ,CAAC;QAEE,YAAO,GAAW,OAAO,CAAC;QAE1B,aAAQ,GAAG,EAAE,CAAC;QAEd,aAAQ,GAAG,CAAC,CAAC;QAGzC,UAAK,GAAiC,OAAO,CAAC;QAEH,cAAS,GAAW,MAAM,CAAC;QAE3B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AAE,OAAO,EAAE,IAAI,EAAE,CAAC;iEAAgC;AAE/B;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yDAAwB;AArHxD,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CAwiB7B;;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\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 { CSSResultArray, PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-floating-panel.css';\nimport NileElement from '../internal/nile-element';\nimport tippy, {\n Instance,\n Props,\n roundArrow,\n followCursor as followCursorPlugin,\n} from 'tippy.js';\nimport {\n parseFollowCursor,\n parseDuration,\n} from '../nile-lite-tooltip/utils';\nimport { VisibilityManager } from '../utilities/visibility-manager.js';\n\n/**\n * Nile floating-panel component.\n *\n * A popover that supports rich content (title, body, actions).\n *\n * **Wrapper mode** (default): first child element is the trigger.\n * **For mode**: set `for=\"elementId\"` to attach to an external element.\n *\n * @tag nile-floating-panel\n *\n * @fires nile-init - Component initialized.\n * @fires nile-destroy - Component destroyed.\n * @fires nile-show - Panel opened.\n * @fires nile-hide - Panel closed.\n * @fires nile-after-show - Panel fully visible after animation.\n * @fires nile-after-hide - Panel fully hidden after animation.\n * @fires nile-toggle - Open/close transition (detail.open).\n * @fires nile-visibility-change - Hidden by scroll/tab change.\n */\n@customElement('nile-floating-panel')\nexport class NileFloatingPanel extends NileElement {\n private static _groups = new Map<string, Set<NileFloatingPanel>>();\n\n private static _reducedMotionQuery: MediaQueryList | null = null;\n\n private static get prefersReducedMotion(): boolean {\n if (!NileFloatingPanel._reducedMotionQuery) {\n NileFloatingPanel._reducedMotionQuery =\n window.matchMedia('(prefers-reduced-motion: reduce)');\n }\n return NileFloatingPanel._reducedMotionQuery.matches;\n }\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected createRenderRoot() {\n return this;\n }\n\n // ─── Tippy.js props ───\n\n @property({ type: String })\n placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'auto'\n | 'auto-start'\n | 'auto-end' = 'bottom';\n\n @property({ type: String }) trigger: string = 'click';\n\n @property({ type: Number }) distance = 12;\n\n @property({ type: Number }) skidding = 0;\n\n @property({ type: String, reflect: true })\n arrow: 'round' | 'default' | 'none' = 'round';\n\n @property({ type: String, reflect: true }) animation: string = 'fade';\n\n @property({ type: String, reflect: true }) duration:\n | string\n | number\n | [number, number] = 200;\n\n @property({ type: String, reflect: true }) delay:\n | number\n | [number, number] = 0;\n\n @property({ type: Boolean, reflect: true }) interactive = true;\n\n @property({ type: Number, reflect: true }) interactiveBorder = 2;\n\n @property({ type: String, reflect: true }) maxWidth: string | number = 'none';\n\n @property({ type: Number, reflect: true }) zIndex = 9999;\n\n @property({ type: String, reflect: true })\n followCursor:\n | boolean\n | 'initial'\n | 'horizontal'\n | 'vertical'\n | 'true'\n | 'false' = false;\n\n @property({ type: Boolean, reflect: true }) hideOnClick:\n | boolean\n | 'toggle' = true;\n\n @property({ type: Boolean, reflect: true }) inertia = false;\n\n @property({ type: Boolean, reflect: true }) allowHTML = false;\n\n @property({ type: Boolean, reflect: true }) flip = true;\n\n // ─── Popover-like props ───\n\n @property({ type: String, attribute: 'for' }) for: string | null = null;\n\n @property({ type: Boolean, reflect: true }) open = false;\n\n @property({ type: Boolean, reflect: true }) preventOverlayClose = false;\n\n @property({ type: String, reflect: true }) title = '';\n\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n @property({ type: String, reflect: true }) width?: string;\n\n @property({ type: String, reflect: true }) height?: string;\n\n /** When set, only one panel in the same group can be open at a time. */\n @property({ type: String, reflect: true }) group: string | null = null;\n\n /** Close the panel when Escape is pressed. */\n @property({ type: Boolean, reflect: true }) closeOnEscape = true;\n\n /** Custom CSS class(es) added to the Tippy popper element, allowing per-instance styling from the host. */\n @property({ type: String, reflect: true, attribute: true}) panelClass: string = '';\n\n // ─── Visibility manager props ───\n\n @property({ type: Boolean, reflect: true }) enableVisibilityEffect = false;\n\n @property({ type: Boolean, reflect: true }) enableTabClose = false;\n\n // ─── Internal state ───\n\n private tippyInstance: Instance | null = null;\n private visibilityManager?: VisibilityManager;\n private panelContainer: HTMLElement | null = null;\n private anchorEl: HTMLElement | null = null;\n private _suppressOpenWatch = false;\n private _panelId = `nile-fp-${Math.random().toString(36).slice(2, 9)}`;\n private _boundEscHandler = this._handleEscapeKey.bind(this);\n private _pendingShowListener: (() => void) | null = null;\n private _pendingHideListener: (() => void) | null = null;\n\n // ─── Lifecycle ───\n\n protected firstUpdated(): void {\n this._buildDOM();\n this._attachTippy();\n this._joinGroup();\n\n this.visibilityManager = new VisibilityManager({\n host: this,\n target: this.anchorEl || null,\n enableVisibilityEffect: this.enableVisibilityEffect,\n enableTabClose: this.enableTabClose,\n isOpen: () => this.open,\n onAnchorOutOfView: () => {\n this._setOpen(false);\n this.tippyInstance?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'anchor-out-of-view',\n });\n },\n onDocumentHidden: () => {\n this._setOpen(false);\n this.tippyInstance?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'document-hidden',\n });\n },\n emit: (event, detail) => this.emit(`nile-${event}`, detail),\n });\n\n this.emit('nile-init');\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this._cleanupPendingShowListener();\n this._cleanupPendingHideListener();\n this.visibilityManager?.cleanup();\n this._leaveGroup();\n this._removeEscListener();\n this._destroyTippy();\n this.emit('nile-destroy');\n }\n\n updated(changed: PropertyValues): void {\n super.updated(changed);\n\n if (!this.panelContainer) return;\n\n if (changed.has('open') && !this._suppressOpenWatch) {\n if (this.open) {\n this.visibilityManager?.setup();\n queueMicrotask(() => this.tippyInstance?.show());\n } else {\n this.visibilityManager?.cleanup();\n this.tippyInstance?.hide();\n }\n }\n\n if (changed.has('group')) {\n this._leaveGroup(changed.get('group') as string | null);\n this._joinGroup();\n }\n\n const rebuildProps: string[] = [\n 'placement', 'trigger', 'distance', 'skidding', 'arrow',\n 'animation', 'duration', 'delay', 'interactive', 'interactiveBorder',\n 'maxWidth', 'zIndex', 'followCursor', 'hideOnClick', 'inertia',\n 'allowHTML', 'flip', 'preventOverlayClose', 'disabled', 'width', 'height',\n 'panelClass'\n ];\n\n if (rebuildProps.some(p => changed.has(p))) {\n this._attachTippy();\n }\n }\n\n // ─── Public API ───\n\n /** Programmatically shows the panel. Returns a promise that resolves after the show animation. */\n public show(): Promise<void> {\n this.open = true;\n return new Promise<void>(resolve => {\n this._cleanupPendingShowListener();\n const handler = () => {\n this._pendingShowListener = null;\n resolve();\n };\n this._pendingShowListener = handler;\n this.addEventListener('nile-after-show', handler, { once: true });\n });\n }\n\n /** Programmatically hides the panel. Returns a promise that resolves after the hide animation. */\n public hide(): Promise<void> {\n this.open = false;\n return new Promise<void>(resolve => {\n this._cleanupPendingHideListener();\n const handler = () => {\n this._pendingHideListener = null;\n resolve();\n };\n this._pendingHideListener = handler;\n this.addEventListener('nile-after-hide', handler, { once: true });\n });\n }\n\n private _cleanupPendingShowListener(): void {\n if (this._pendingShowListener) {\n this.removeEventListener('nile-after-show', this._pendingShowListener);\n this._pendingShowListener = null;\n }\n }\n\n private _cleanupPendingHideListener(): void {\n if (this._pendingHideListener) {\n this.removeEventListener('nile-after-hide', this._pendingHideListener);\n this._pendingHideListener = null;\n }\n }\n\n public toggle(): void {\n this.open = !this.open;\n }\n\n public refresh(): void {\n this._attachTippy();\n }\n\n /** Recomputes the panel position against its anchor (e.g. after the anchor moved). */\n public reposition(): void {\n this.tippyInstance?.popperInstance?.update();\n }\n\n /** Returns the current resolved placement from Tippy/Popper. */\n public getCurrentPlacement(): string {\n const popper = this.tippyInstance?.popper;\n const box = popper?.querySelector('.tippy-box') as HTMLElement | null;\n return box?.dataset.placement ?? this.placement;\n }\n\n /** Returns true if the resolved placement matches the requested placement. */\n public isPositioningOptimal(): boolean {\n return this.getCurrentPlacement() === this.placement;\n }\n\n // ─── Group management ───\n\n private _joinGroup(): void {\n if (!this.group) return;\n let set = NileFloatingPanel._groups.get(this.group);\n if (!set) {\n set = new Set();\n NileFloatingPanel._groups.set(this.group, set);\n }\n set.add(this);\n }\n\n private _leaveGroup(oldGroup?: string | null): void {\n const key = oldGroup ?? this.group;\n if (!key) return;\n const set = NileFloatingPanel._groups.get(key);\n if (set) {\n set.delete(this);\n if (set.size === 0) NileFloatingPanel._groups.delete(key);\n }\n }\n\n private _hideGroupSiblings(): void {\n if (!this.group) return;\n const set = NileFloatingPanel._groups.get(this.group);\n if (!set) return;\n set.forEach(panel => {\n if (panel !== this && panel.open) {\n panel._setOpen(false);\n panel.tippyInstance?.hide();\n }\n });\n }\n\n // ─── Escape key ───\n\n private _addEscListener(): void {\n if (this.closeOnEscape) {\n document.addEventListener('keydown', this._boundEscHandler);\n }\n }\n\n private _removeEscListener(): void {\n document.removeEventListener('keydown', this._boundEscHandler);\n }\n\n private _handleEscapeKey(e: KeyboardEvent): void {\n if (e.key === 'Escape' && this.open) {\n this._setOpen(false);\n this.tippyInstance?.hide();\n }\n }\n\n // ─── ARIA ───\n\n private _applyAria(): void {\n if (!this.anchorEl || !this.panelContainer) return;\n this.panelContainer.setAttribute('role', 'dialog');\n this.panelContainer.id = this._panelId;\n this.anchorEl.setAttribute('aria-haspopup', 'dialog');\n this._syncAriaExpanded();\n }\n\n private _syncAriaExpanded(): void {\n this.anchorEl?.setAttribute('aria-expanded', String(this.open));\n if (this.open) {\n this.anchorEl?.setAttribute('aria-describedby', this._panelId);\n } else {\n this.anchorEl?.removeAttribute('aria-describedby');\n }\n }\n\n // ─── DOM construction ───\n\n private _buildDOM(): void {\n const children = Array.from(this.childNodes);\n\n this.anchorEl = null;\n const titleNodes: Node[] = [];\n const actionNodes: Node[] = [];\n const bodyNodes: Node[] = [];\n let firstElementSeen = false;\n\n for (const child of children) {\n if (child instanceof HTMLElement) {\n const slot = child.getAttribute('slot');\n if (slot === 'title') {\n child.removeAttribute('slot');\n titleNodes.push(child);\n continue;\n }\n if (slot === 'action') {\n child.removeAttribute('slot');\n actionNodes.push(child);\n continue;\n }\n if (!firstElementSeen && !this.for) {\n this.anchorEl = child;\n firstElementSeen = true;\n continue;\n }\n }\n bodyNodes.push(child);\n }\n\n if (this.for) {\n const anchor = document.getElementById(this.for);\n if (anchor) {\n this.anchorEl = anchor;\n }\n }\n\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n\n if (this.anchorEl && !this.for) {\n this.appendChild(this.anchorEl);\n }\n\n this.panelContainer = document.createElement('div');\n this.panelContainer.className = 'nile-floating-panel__content';\n this.panelContainer.style.display = 'none';\n\n const body = document.createElement('div');\n body.className = 'nile-floating-panel__body';\n\n if (titleNodes.length > 0 || this.title) {\n const titleDiv = document.createElement('div');\n titleDiv.className = 'nile-floating-panel__title';\n if (this.title) {\n titleDiv.textContent = this.title;\n } else {\n titleNodes.forEach(n => titleDiv.appendChild(n));\n }\n body.appendChild(titleDiv);\n }\n\n if (bodyNodes.length > 0) {\n const mainDiv = document.createElement('div');\n mainDiv.className = 'nile-floating-panel__main';\n bodyNodes.forEach(n => mainDiv.appendChild(n));\n body.appendChild(mainDiv);\n }\n\n if (actionNodes.length > 0) {\n const actionDiv = document.createElement('div');\n actionDiv.className = 'nile-floating-panel__action';\n actionNodes.forEach(n => actionDiv.appendChild(n));\n body.appendChild(actionDiv);\n }\n\n this.panelContainer.appendChild(body);\n this.appendChild(this.panelContainer);\n\n this._applyAria();\n }\n\n // ─── Tippy management ───\n\n private _resolveArrow() {\n switch (this.arrow) {\n case 'round': return roundArrow;\n case 'none': return false as const;\n default: return true as const;\n }\n }\n\n private _setOpen(value: boolean): void {\n this._suppressOpenWatch = true;\n this.open = value;\n this._syncAriaExpanded();\n this._suppressOpenWatch = false;\n }\n\n private _getEffectiveDuration(): number | [number, number] {\n if (NileFloatingPanel.prefersReducedMotion) return 0;\n return parseDuration(this.duration);\n }\n\n private _getEffectiveAnimation(): string | false {\n if (NileFloatingPanel.prefersReducedMotion) return false;\n return this.animation;\n }\n\n private _attachTippy(): void {\n this._destroyTippy();\n\n if (this.disabled || !this.anchorEl || !this.panelContainer) return;\n\n const resolvedFollowCursor = parseFollowCursor(this.followCursor);\n const effectiveHideOnClick = this.preventOverlayClose ? false : this.hideOnClick;\n\n const options: Partial<Props> = {\n content: this.panelContainer,\n placement: this.placement,\n trigger: this.trigger,\n offset: [this.skidding, this.distance],\n theme: 'floating-panel',\n animation: this._getEffectiveAnimation(),\n interactive: this.interactive,\n arrow: this._resolveArrow(),\n duration: this._getEffectiveDuration(),\n allowHTML: this.allowHTML,\n delay: this.delay as any,\n maxWidth: this.maxWidth,\n zIndex: this.zIndex,\n hideOnClick: effectiveHideOnClick,\n inertia: NileFloatingPanel.prefersReducedMotion ? false : this.inertia,\n interactiveBorder: this.interactiveBorder,\n appendTo: document.body,\n followCursor: resolvedFollowCursor,\n plugins: resolvedFollowCursor ? [followCursorPlugin] : [],\n popperOptions: {\n modifiers: [{ name: 'flip', enabled: this.flip }],\n },\n onMount: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = '';\n if (this.panelClass) {\n this.panelClass.split(/\\s+/).filter(Boolean).forEach(cls => {\n instance.popper.classList.add(cls);\n });\n }\n },\n onShow: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = '';\n const tc = instance.popper.querySelector('.tippy-content') as HTMLElement | null;\n if (tc) {\n if (this.width) tc.style.width = this.width;\n if (this.height) { tc.style.height = this.height; tc.style.overflow = 'auto'; }\n }\n this._hideGroupSiblings();\n this._setOpen(true);\n this._addEscListener();\n this.dispatchEvent(new CustomEvent('nile-show', { detail: { instance, target: instance.reference } }));\n this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: true, instance, target: instance.reference } }));\n return undefined;\n },\n onShown: (instance) => {\n this.dispatchEvent(new CustomEvent('nile-after-show', { detail: { instance, target: instance.reference } }));\n },\n onHide: (instance) => {\n this._setOpen(false);\n this._removeEscListener();\n this.dispatchEvent(new CustomEvent('nile-hide', { detail: { instance, target: instance.reference } }));\n this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: false, instance, target: instance.reference } }));\n return undefined;\n },\n onHidden: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = 'none';\n this.dispatchEvent(new CustomEvent('nile-after-hide', { detail: { instance, target: instance.reference } }));\n },\n };\n\n this.tippyInstance = tippy(this.anchorEl, options);\n\n if (this.open) {\n queueMicrotask(() => this.tippyInstance?.show());\n }\n }\n\n private _destroyTippy(): void {\n if (this.tippyInstance) {\n this.tippyInstance.destroy();\n this.tippyInstance = null;\n }\n if (this.panelContainer) {\n this.panelContainer.style.display = 'none';\n if (this.panelContainer.parentElement !== this) {\n this.appendChild(this.panelContainer);\n }\n }\n }\n}\n\nexport default NileFloatingPanel;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-floating-panel': NileFloatingPanel;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nile-floating-panel.js","sourceRoot":"","sources":["../../../src/nile-floating-panel/nile-floating-panel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAGH,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,EAGZ,UAAU,EACV,YAAY,IAAI,kBAAkB,GACnC,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,iBAAiB,EACjB,aAAa,GACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,MAAM,iBAAiB,GACrB,4DAA4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AI,EAAE,CAAC;+CAAc;AAEb;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8DAA6B;AAE7B;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAY;AAEV;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;mDAAkB;AAElB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAgB;AAEf;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAiB;AAGhB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAA6B;AAG3B;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wDAAsB;AAGN;IAA1D,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC;qDAAyB;AAIvC;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iEAAgC;AAE/B;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yDAAwB;AArHxD,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CAwiB7B;;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\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 { CSSResultArray, PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-floating-panel.css';\nimport NileElement from '../internal/nile-element';\nimport tippy, {\n Instance,\n Props,\n roundArrow,\n followCursor as followCursorPlugin,\n} from 'tippy.js';\nimport {\n parseFollowCursor,\n parseDuration,\n} from '../nile-lite-tooltip/utils';\nimport { VisibilityManager } from '../utilities/visibility-manager.js';\n\nconst TIPPY_ROUND_ARROW =\n /^<svg width=\"(\\d+)\" height=\"(\\d+)\"[^>]*><path d=\"(.+?)H0z\"/.exec(roundArrow);\n\nconst NILE_ROUND_ARROW = ((): string => {\n if (!TIPPY_ROUND_ARROW) return roundArrow;\n\n const [, rawWidth, rawHeight, curve] = TIPPY_ROUND_ARROW;\n const width = Number(rawWidth);\n const height = Number(rawHeight) + 1; // + the skirt that covers the border\n\n return (\n `<svg width=\"${width}\" height=\"${height}\" viewBox=\"0 0 ${width} ${height}\" aria-hidden=\"true\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\">` +\n `<path d=\"${curve}V${height}H0Z\"></path>` +\n `<path class=\"nile-floating-panel__arrow-outline\" d=\"${curve}\"></path>` +\n `</svg>`\n );\n})();\n\n/**\n * Nile floating-panel component.\n *\n * A popover that supports rich content (title, body, actions).\n *\n * **Wrapper mode** (default): first child element is the trigger.\n * **For mode**: set `for=\"elementId\"` to attach to an external element.\n *\n * @tag nile-floating-panel\n *\n * @fires nile-init - Component initialized.\n * @fires nile-destroy - Component destroyed.\n * @fires nile-show - Panel opened.\n * @fires nile-hide - Panel closed.\n * @fires nile-after-show - Panel fully visible after animation.\n * @fires nile-after-hide - Panel fully hidden after animation.\n * @fires nile-toggle - Open/close transition (detail.open).\n * @fires nile-visibility-change - Hidden by scroll/tab change.\n */\n@customElement('nile-floating-panel')\nexport class NileFloatingPanel extends NileElement {\n private static _groups = new Map<string, Set<NileFloatingPanel>>();\n\n private static _reducedMotionQuery: MediaQueryList | null = null;\n\n private static get prefersReducedMotion(): boolean {\n if (!NileFloatingPanel._reducedMotionQuery) {\n NileFloatingPanel._reducedMotionQuery =\n window.matchMedia('(prefers-reduced-motion: reduce)');\n }\n return NileFloatingPanel._reducedMotionQuery.matches;\n }\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected createRenderRoot() {\n return this;\n }\n\n // ─── Tippy.js props ───\n\n @property({ type: String })\n placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'auto'\n | 'auto-start'\n | 'auto-end' = 'bottom';\n\n @property({ type: String }) trigger: string = 'click';\n\n @property({ type: Number }) distance = 12;\n\n @property({ type: Number }) skidding = 0;\n\n @property({ type: String, reflect: true })\n arrow: 'round' | 'default' | 'none' = 'round';\n\n @property({ type: String, reflect: true }) animation: string = 'fade';\n\n @property({ type: String, reflect: true }) duration:\n | string\n | number\n | [number, number] = 200;\n\n @property({ type: String, reflect: true }) delay:\n | number\n | [number, number] = 0;\n\n @property({ type: Boolean, reflect: true }) interactive = true;\n\n @property({ type: Number, reflect: true }) interactiveBorder = 2;\n\n @property({ type: String, reflect: true }) maxWidth: string | number = 'none';\n\n @property({ type: Number, reflect: true }) zIndex = 9999;\n\n @property({ type: String, reflect: true })\n followCursor:\n | boolean\n | 'initial'\n | 'horizontal'\n | 'vertical'\n | 'true'\n | 'false' = false;\n\n @property({ type: Boolean, reflect: true }) hideOnClick:\n | boolean\n | 'toggle' = true;\n\n @property({ type: Boolean, reflect: true }) inertia = false;\n\n @property({ type: Boolean, reflect: true }) allowHTML = false;\n\n @property({ type: Boolean, reflect: true }) flip = true;\n\n // ─── Popover-like props ───\n\n @property({ type: String, attribute: 'for' }) for: string | null = null;\n\n @property({ type: Boolean, reflect: true }) open = false;\n\n @property({ type: Boolean, reflect: true }) preventOverlayClose = false;\n\n @property({ type: String, reflect: true }) title = '';\n\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n @property({ type: String, reflect: true }) width?: string;\n\n @property({ type: String, reflect: true }) height?: string;\n\n /** When set, only one panel in the same group can be open at a time. */\n @property({ type: String, reflect: true }) group: string | null = null;\n\n /** Close the panel when Escape is pressed. */\n @property({ type: Boolean, reflect: true }) closeOnEscape = true;\n\n /** Custom CSS class(es) added to the Tippy popper element, allowing per-instance styling from the host. */\n @property({ type: String, reflect: true, attribute: true}) panelClass: string = '';\n\n // ─── Visibility manager props ───\n\n @property({ type: Boolean, reflect: true }) enableVisibilityEffect = false;\n\n @property({ type: Boolean, reflect: true }) enableTabClose = false;\n\n // ─── Internal state ───\n\n private tippyInstance: Instance | null = null;\n private visibilityManager?: VisibilityManager;\n private panelContainer: HTMLElement | null = null;\n private anchorEl: HTMLElement | null = null;\n private _suppressOpenWatch = false;\n private _panelId = `nile-fp-${Math.random().toString(36).slice(2, 9)}`;\n private _boundEscHandler = this._handleEscapeKey.bind(this);\n private _pendingShowListener: (() => void) | null = null;\n private _pendingHideListener: (() => void) | null = null;\n\n // ─── Lifecycle ───\n\n protected firstUpdated(): void {\n this._buildDOM();\n this._attachTippy();\n this._joinGroup();\n\n this.visibilityManager = new VisibilityManager({\n host: this,\n target: this.anchorEl || null,\n enableVisibilityEffect: this.enableVisibilityEffect,\n enableTabClose: this.enableTabClose,\n isOpen: () => this.open,\n onAnchorOutOfView: () => {\n this._setOpen(false);\n this.tippyInstance?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'anchor-out-of-view',\n });\n },\n onDocumentHidden: () => {\n this._setOpen(false);\n this.tippyInstance?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'document-hidden',\n });\n },\n emit: (event, detail) => this.emit(`nile-${event}`, detail),\n });\n\n this.emit('nile-init');\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this._cleanupPendingShowListener();\n this._cleanupPendingHideListener();\n this.visibilityManager?.cleanup();\n this._leaveGroup();\n this._removeEscListener();\n this._destroyTippy();\n this.emit('nile-destroy');\n }\n\n updated(changed: PropertyValues): void {\n super.updated(changed);\n\n if (!this.panelContainer) return;\n\n if (changed.has('open') && !this._suppressOpenWatch) {\n if (this.open) {\n this.visibilityManager?.setup();\n queueMicrotask(() => this.tippyInstance?.show());\n } else {\n this.visibilityManager?.cleanup();\n this.tippyInstance?.hide();\n }\n }\n\n if (changed.has('group')) {\n this._leaveGroup(changed.get('group') as string | null);\n this._joinGroup();\n }\n\n const rebuildProps: string[] = [\n 'placement', 'trigger', 'distance', 'skidding', 'arrow',\n 'animation', 'duration', 'delay', 'interactive', 'interactiveBorder',\n 'maxWidth', 'zIndex', 'followCursor', 'hideOnClick', 'inertia',\n 'allowHTML', 'flip', 'preventOverlayClose', 'disabled', 'width', 'height',\n 'panelClass'\n ];\n\n if (rebuildProps.some(p => changed.has(p))) {\n this._attachTippy();\n }\n }\n\n // ─── Public API ───\n\n /** Programmatically shows the panel. Returns a promise that resolves after the show animation. */\n public show(): Promise<void> {\n this.open = true;\n return new Promise<void>(resolve => {\n this._cleanupPendingShowListener();\n const handler = () => {\n this._pendingShowListener = null;\n resolve();\n };\n this._pendingShowListener = handler;\n this.addEventListener('nile-after-show', handler, { once: true });\n });\n }\n\n /** Programmatically hides the panel. Returns a promise that resolves after the hide animation. */\n public hide(): Promise<void> {\n this.open = false;\n return new Promise<void>(resolve => {\n this._cleanupPendingHideListener();\n const handler = () => {\n this._pendingHideListener = null;\n resolve();\n };\n this._pendingHideListener = handler;\n this.addEventListener('nile-after-hide', handler, { once: true });\n });\n }\n\n private _cleanupPendingShowListener(): void {\n if (this._pendingShowListener) {\n this.removeEventListener('nile-after-show', this._pendingShowListener);\n this._pendingShowListener = null;\n }\n }\n\n private _cleanupPendingHideListener(): void {\n if (this._pendingHideListener) {\n this.removeEventListener('nile-after-hide', this._pendingHideListener);\n this._pendingHideListener = null;\n }\n }\n\n public toggle(): void {\n this.open = !this.open;\n }\n\n public refresh(): void {\n this._attachTippy();\n }\n\n /** Recomputes the panel position against its anchor (e.g. after the anchor moved). */\n public reposition(): void {\n this.tippyInstance?.popperInstance?.update();\n }\n\n /** Returns the current resolved placement from Tippy/Popper. */\n public getCurrentPlacement(): string {\n const popper = this.tippyInstance?.popper;\n const box = popper?.querySelector('.tippy-box') as HTMLElement | null;\n return box?.dataset.placement ?? this.placement;\n }\n\n /** Returns true if the resolved placement matches the requested placement. */\n public isPositioningOptimal(): boolean {\n return this.getCurrentPlacement() === this.placement;\n }\n\n // ─── Group management ───\n\n private _joinGroup(): void {\n if (!this.group) return;\n let set = NileFloatingPanel._groups.get(this.group);\n if (!set) {\n set = new Set();\n NileFloatingPanel._groups.set(this.group, set);\n }\n set.add(this);\n }\n\n private _leaveGroup(oldGroup?: string | null): void {\n const key = oldGroup ?? this.group;\n if (!key) return;\n const set = NileFloatingPanel._groups.get(key);\n if (set) {\n set.delete(this);\n if (set.size === 0) NileFloatingPanel._groups.delete(key);\n }\n }\n\n private _hideGroupSiblings(): void {\n if (!this.group) return;\n const set = NileFloatingPanel._groups.get(this.group);\n if (!set) return;\n set.forEach(panel => {\n if (panel !== this && panel.open) {\n panel._setOpen(false);\n panel.tippyInstance?.hide();\n }\n });\n }\n\n // ─── Escape key ───\n\n private _addEscListener(): void {\n if (this.closeOnEscape) {\n document.addEventListener('keydown', this._boundEscHandler);\n }\n }\n\n private _removeEscListener(): void {\n document.removeEventListener('keydown', this._boundEscHandler);\n }\n\n private _handleEscapeKey(e: KeyboardEvent): void {\n if (e.key === 'Escape' && this.open) {\n this._setOpen(false);\n this.tippyInstance?.hide();\n }\n }\n\n // ─── ARIA ───\n\n private _applyAria(): void {\n if (!this.anchorEl || !this.panelContainer) return;\n this.panelContainer.setAttribute('role', 'dialog');\n this.panelContainer.id = this._panelId;\n this.anchorEl.setAttribute('aria-haspopup', 'dialog');\n this._syncAriaExpanded();\n }\n\n private _syncAriaExpanded(): void {\n this.anchorEl?.setAttribute('aria-expanded', String(this.open));\n if (this.open) {\n this.anchorEl?.setAttribute('aria-describedby', this._panelId);\n } else {\n this.anchorEl?.removeAttribute('aria-describedby');\n }\n }\n\n // ─── DOM construction ───\n\n private _buildDOM(): void {\n const children = Array.from(this.childNodes);\n\n this.anchorEl = null;\n const titleNodes: Node[] = [];\n const actionNodes: Node[] = [];\n const bodyNodes: Node[] = [];\n let firstElementSeen = false;\n\n for (const child of children) {\n if (child instanceof HTMLElement) {\n const slot = child.getAttribute('slot');\n if (slot === 'title') {\n child.removeAttribute('slot');\n titleNodes.push(child);\n continue;\n }\n if (slot === 'action') {\n child.removeAttribute('slot');\n actionNodes.push(child);\n continue;\n }\n if (!firstElementSeen && !this.for) {\n this.anchorEl = child;\n firstElementSeen = true;\n continue;\n }\n }\n bodyNodes.push(child);\n }\n\n if (this.for) {\n const anchor = document.getElementById(this.for);\n if (anchor) {\n this.anchorEl = anchor;\n }\n }\n\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n\n if (this.anchorEl && !this.for) {\n this.appendChild(this.anchorEl);\n }\n\n this.panelContainer = document.createElement('div');\n this.panelContainer.className = 'nile-floating-panel__content';\n this.panelContainer.style.display = 'none';\n\n const body = document.createElement('div');\n body.className = 'nile-floating-panel__body';\n\n if (titleNodes.length > 0 || this.title) {\n const titleDiv = document.createElement('div');\n titleDiv.className = 'nile-floating-panel__title';\n if (this.title) {\n titleDiv.textContent = this.title;\n } else {\n titleNodes.forEach(n => titleDiv.appendChild(n));\n }\n body.appendChild(titleDiv);\n }\n\n if (bodyNodes.length > 0) {\n const mainDiv = document.createElement('div');\n mainDiv.className = 'nile-floating-panel__main';\n bodyNodes.forEach(n => mainDiv.appendChild(n));\n body.appendChild(mainDiv);\n }\n\n if (actionNodes.length > 0) {\n const actionDiv = document.createElement('div');\n actionDiv.className = 'nile-floating-panel__action';\n actionNodes.forEach(n => actionDiv.appendChild(n));\n body.appendChild(actionDiv);\n }\n\n this.panelContainer.appendChild(body);\n this.appendChild(this.panelContainer);\n\n this._applyAria();\n }\n\n // ─── Tippy management ───\n\n private _resolveArrow() {\n switch (this.arrow) {\n case 'round': return NILE_ROUND_ARROW;\n case 'none': return false as const;\n default: return true as const;\n }\n }\n\n private _setOpen(value: boolean): void {\n this._suppressOpenWatch = true;\n this.open = value;\n this._syncAriaExpanded();\n this._suppressOpenWatch = false;\n }\n\n private _getEffectiveDuration(): number | [number, number] {\n if (NileFloatingPanel.prefersReducedMotion) return 0;\n return parseDuration(this.duration);\n }\n\n private _getEffectiveAnimation(): string | false {\n if (NileFloatingPanel.prefersReducedMotion) return false;\n return this.animation;\n }\n\n private _attachTippy(): void {\n this._destroyTippy();\n\n if (this.disabled || !this.anchorEl || !this.panelContainer) return;\n\n const resolvedFollowCursor = parseFollowCursor(this.followCursor);\n const effectiveHideOnClick = this.preventOverlayClose ? false : this.hideOnClick;\n\n const options: Partial<Props> = {\n content: this.panelContainer,\n placement: this.placement,\n trigger: this.trigger,\n offset: [this.skidding, this.distance],\n theme: 'floating-panel',\n animation: this._getEffectiveAnimation(),\n interactive: this.interactive,\n arrow: this._resolveArrow(),\n duration: this._getEffectiveDuration(),\n allowHTML: this.allowHTML,\n delay: this.delay as any,\n maxWidth: this.maxWidth,\n zIndex: this.zIndex,\n hideOnClick: effectiveHideOnClick,\n inertia: NileFloatingPanel.prefersReducedMotion ? false : this.inertia,\n interactiveBorder: this.interactiveBorder,\n appendTo: document.body,\n followCursor: resolvedFollowCursor,\n plugins: resolvedFollowCursor ? [followCursorPlugin] : [],\n popperOptions: {\n modifiers: [{ name: 'flip', enabled: this.flip }],\n },\n onMount: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = '';\n if (this.panelClass) {\n this.panelClass.split(/\\s+/).filter(Boolean).forEach(cls => {\n instance.popper.classList.add(cls);\n });\n }\n },\n onShow: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = '';\n const tc = instance.popper.querySelector('.tippy-content') as HTMLElement | null;\n if (tc) {\n if (this.width) tc.style.width = this.width;\n if (this.height) { tc.style.height = this.height; tc.style.overflow = 'auto'; }\n }\n this._hideGroupSiblings();\n this._setOpen(true);\n this._addEscListener();\n this.dispatchEvent(new CustomEvent('nile-show', { detail: { instance, target: instance.reference } }));\n this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: true, instance, target: instance.reference } }));\n return undefined;\n },\n onShown: (instance) => {\n this.dispatchEvent(new CustomEvent('nile-after-show', { detail: { instance, target: instance.reference } }));\n },\n onHide: (instance) => {\n this._setOpen(false);\n this._removeEscListener();\n this.dispatchEvent(new CustomEvent('nile-hide', { detail: { instance, target: instance.reference } }));\n this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: false, instance, target: instance.reference } }));\n return undefined;\n },\n onHidden: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = 'none';\n this.dispatchEvent(new CustomEvent('nile-after-hide', { detail: { instance, target: instance.reference } }));\n },\n };\n\n this.tippyInstance = tippy(this.anchorEl, options);\n\n if (this.open) {\n queueMicrotask(() => this.tippyInstance?.show());\n }\n }\n\n private _destroyTippy(): void {\n if (this.tippyInstance) {\n this.tippyInstance.destroy();\n this.tippyInstance = null;\n }\n if (this.panelContainer) {\n this.panelContainer.style.display = 'none';\n if (this.panelContainer.parentElement !== this) {\n this.appendChild(this.panelContainer);\n }\n }\n }\n}\n\nexport default NileFloatingPanel;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-floating-panel': NileFloatingPanel;\n }\n}\n"]}
|
|
@@ -38,10 +38,6 @@ export const styles = css `
|
|
|
38
38
|
background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
|
|
39
39
|
border: solid 1px var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));
|
|
40
40
|
box-shadow: var(--nile-box-shadow-2, var(--ng-shadow-lg));
|
|
41
|
-
--arrow-size: 18px;
|
|
42
|
-
--arrow-size-diagonal: calc(var(--arrow-size) * 0.7071);
|
|
43
|
-
--arrow-padding-offset: calc(var(--arrow-size-diagonal) - var(--arrow-size));
|
|
44
|
-
--arrow-color: var(--nile-colors-white-base, var(--ng-colors-text-white));
|
|
45
41
|
}
|
|
46
42
|
|
|
47
43
|
.popover__action {
|
|
@@ -50,19 +46,38 @@ export const styles = css `
|
|
|
50
46
|
}
|
|
51
47
|
|
|
52
48
|
nile-popup {
|
|
53
|
-
--arrow-size:
|
|
54
|
-
--arrow-color: var(--nile-colors-white-base, var(--ng-colors-
|
|
49
|
+
--arrow-size: 10px;
|
|
50
|
+
--arrow-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
|
|
51
|
+
--arrow-border-color: var(
|
|
52
|
+
--nile-colors-dark-200,
|
|
53
|
+
var(--ng-colors-border-secondary-alt)
|
|
54
|
+
);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
border: solid 1px var(--
|
|
65
|
-
|
|
57
|
+
nile-popup::part(arrow) {
|
|
58
|
+
z-index: 1;
|
|
59
|
+
border: none;
|
|
60
|
+
box-shadow: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
nile-popup[data-current-placement^='bottom']::part(arrow) {
|
|
64
|
+
border-top: solid 1px var(--arrow-border-color);
|
|
65
|
+
border-left: solid 1px var(--arrow-border-color);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
nile-popup[data-current-placement^='top']::part(arrow) {
|
|
69
|
+
border-bottom: solid 1px var(--arrow-border-color);
|
|
70
|
+
border-right: solid 1px var(--arrow-border-color);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
nile-popup[data-current-placement^='left']::part(arrow) {
|
|
74
|
+
border-top: solid 1px var(--arrow-border-color);
|
|
75
|
+
border-right: solid 1px var(--arrow-border-color);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
nile-popup[data-current-placement^='right']::part(arrow) {
|
|
79
|
+
border-bottom: solid 1px var(--arrow-border-color);
|
|
80
|
+
border-left: solid 1px var(--arrow-border-color);
|
|
66
81
|
}
|
|
67
82
|
`;
|
|
68
83
|
export default [styles];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-popover.css.js","sourceRoot":"","sources":["../../../src/nile-popover/nile-popover.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"nile-popover.css.js","sourceRoot":"","sources":["../../../src/nile-popover/nile-popover.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuExB,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 * Popover CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .popover__title {\n display: block;\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n font-style: normal;\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));\n letter-spacing: var(--nile-spacing-one-by-five-x, var(--ng-spacing-none));\n }\n\n .popover__box {\n display: flex;\n flex-direction: column;\n height: auto;\n min-width: var(--nile-width-352px, var(--ng-width-80));\n gap: var(--nile-spacing-xl, var(--ng-spacing-xl));\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));\n box-shadow: var(--nile-box-shadow-2, var(--ng-shadow-lg));\n }\n\n .popover__action {\n align-self: end;\n display: inline;\n }\n\n nile-popup {\n --arrow-size: 10px;\n --arrow-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n --arrow-border-color: var(\n --nile-colors-dark-200,\n var(--ng-colors-border-secondary-alt)\n );\n }\n\n nile-popup::part(arrow) {\n z-index: 1;\n border: none;\n box-shadow: none;\n }\n\n nile-popup[data-current-placement^='bottom']::part(arrow) {\n border-top: solid 1px var(--arrow-border-color);\n border-left: solid 1px var(--arrow-border-color);\n }\n\n nile-popup[data-current-placement^='top']::part(arrow) {\n border-bottom: solid 1px var(--arrow-border-color);\n border-right: solid 1px var(--arrow-border-color);\n }\n\n nile-popup[data-current-placement^='left']::part(arrow) {\n border-top: solid 1px var(--arrow-border-color);\n border-right: solid 1px var(--arrow-border-color);\n }\n\n nile-popup[data-current-placement^='right']::part(arrow) {\n border-bottom: solid 1px var(--arrow-border-color);\n border-left: solid 1px var(--arrow-border-color);\n }\n`;\n\nexport default [styles];\n"]}
|
|
@@ -27,7 +27,7 @@ let NilePopover = class NilePopover extends NileElement {
|
|
|
27
27
|
*/
|
|
28
28
|
this.placement = 'top';
|
|
29
29
|
/** The distance in pixels from which to offset the popover away from its target. */
|
|
30
|
-
this.distance =
|
|
30
|
+
this.distance = 12;
|
|
31
31
|
this.preventOverlayClose = false;
|
|
32
32
|
this.arrow = true;
|
|
33
33
|
/** Gives the title to the popover */
|