@aquera/nile-visualization 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/nile-executive-summary/nile-executive-summary-config.d.ts +2 -0
- package/dist/src/nile-executive-summary/nile-executive-summary.css.js +1 -2
- package/dist/src/nile-executive-summary/nile-executive-summary.d.ts +3 -0
- package/dist/src/nile-executive-summary/nile-executive-summary.js +29 -7
- package/package.json +1 -1
|
@@ -78,6 +78,8 @@ export declare class NileExecutiveSummary extends NileElement {
|
|
|
78
78
|
* typewriter animation begins if the drawer is already open.
|
|
79
79
|
*/
|
|
80
80
|
loading: boolean;
|
|
81
|
+
zIndex: number | null;
|
|
82
|
+
hideOverlay: boolean;
|
|
81
83
|
/** @internal Characters revealed so far during typing. */
|
|
82
84
|
private displayedText;
|
|
83
85
|
/** @internal Whether typing is still in progress (drives cursor visibility). */
|
|
@@ -91,6 +93,7 @@ export declare class NileExecutiveSummary extends NileElement {
|
|
|
91
93
|
private lockScroll;
|
|
92
94
|
private unlockScroll;
|
|
93
95
|
private animatePanel;
|
|
96
|
+
private get overlayHidden();
|
|
94
97
|
private animateOverlay;
|
|
95
98
|
private requestClose;
|
|
96
99
|
private startTyping;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { __decorate } from "tslib";
|
|
8
8
|
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
9
9
|
import { classMap } from 'lit/directives/class-map.js';
|
|
10
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
10
11
|
import { html } from 'lit';
|
|
11
12
|
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
12
13
|
import NileElement from '../internal/nile-element.js';
|
|
@@ -79,6 +80,8 @@ let NileExecutiveSummary = class NileExecutiveSummary extends NileElement {
|
|
|
79
80
|
* typewriter animation begins if the drawer is already open.
|
|
80
81
|
*/
|
|
81
82
|
this.loading = false;
|
|
83
|
+
this.zIndex = null;
|
|
84
|
+
this.hideOverlay = false;
|
|
82
85
|
/** @internal Characters revealed so far during typing. */
|
|
83
86
|
this.displayedText = '';
|
|
84
87
|
/** @internal Whether typing is still in progress (drives cursor visibility). */
|
|
@@ -133,7 +136,12 @@ let NileExecutiveSummary = class NileExecutiveSummary extends NileElement {
|
|
|
133
136
|
const to = show ? { opacity: '1', translate: '0' } : { opacity: '0', translate: '100%' };
|
|
134
137
|
await this.panel.animate([from, to], { duration: 250, easing: 'ease', fill: 'forwards' }).finished;
|
|
135
138
|
}
|
|
139
|
+
get overlayHidden() {
|
|
140
|
+
return this.hideOverlay || (this.config?.hideOverlay ?? false);
|
|
141
|
+
}
|
|
136
142
|
async animateOverlay(show) {
|
|
143
|
+
if (!this.overlay)
|
|
144
|
+
return;
|
|
137
145
|
const from = show ? { opacity: '0' } : { opacity: '1' };
|
|
138
146
|
const to = show ? { opacity: '1' } : { opacity: '0' };
|
|
139
147
|
await this.overlay.animate([from, to], { duration: 250, fill: 'forwards' }).finished;
|
|
@@ -226,6 +234,10 @@ let NileExecutiveSummary = class NileExecutiveSummary extends NileElement {
|
|
|
226
234
|
const buttonLabel = this.config?.buttonLabel ?? 'Executive Summary';
|
|
227
235
|
const buttonVariant = this.config?.buttonVariant ?? 'primary';
|
|
228
236
|
const drawerLabel = this.config?.drawerLabel ?? 'Executive Summary';
|
|
237
|
+
const resolvedZ = this.zIndex ?? this.config?.zIndex;
|
|
238
|
+
const backdropStyles = resolvedZ != null
|
|
239
|
+
? { '--executive-summary-z-index': String(resolvedZ), zIndex: String(resolvedZ) }
|
|
240
|
+
: {};
|
|
229
241
|
return html `
|
|
230
242
|
<div part="base">
|
|
231
243
|
|
|
@@ -240,14 +252,18 @@ let NileExecutiveSummary = class NileExecutiveSummary extends NileElement {
|
|
|
240
252
|
>${buttonLabel}</nile-button>
|
|
241
253
|
|
|
242
254
|
<!-- Fixed backdrop: overlay + panel -->
|
|
243
|
-
<div class="es-backdrop">
|
|
255
|
+
<div class="es-backdrop" style=${styleMap(backdropStyles)}>
|
|
244
256
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
257
|
+
${this.overlayHidden
|
|
258
|
+
? ''
|
|
259
|
+
: html `
|
|
260
|
+
<div
|
|
261
|
+
part="overlay"
|
|
262
|
+
class="es-overlay"
|
|
263
|
+
@click=${() => this.requestClose('overlay')}
|
|
264
|
+
tabindex="-1"
|
|
265
|
+
></div>
|
|
266
|
+
`}
|
|
251
267
|
|
|
252
268
|
<div
|
|
253
269
|
part="panel"
|
|
@@ -323,6 +339,12 @@ __decorate([
|
|
|
323
339
|
__decorate([
|
|
324
340
|
property({ type: Boolean, reflect: true })
|
|
325
341
|
], NileExecutiveSummary.prototype, "loading", void 0);
|
|
342
|
+
__decorate([
|
|
343
|
+
property({ type: Number, reflect: true, attribute: 'z-index' })
|
|
344
|
+
], NileExecutiveSummary.prototype, "zIndex", void 0);
|
|
345
|
+
__decorate([
|
|
346
|
+
property({ type: Boolean, reflect: true, attribute: 'hide-overlay' })
|
|
347
|
+
], NileExecutiveSummary.prototype, "hideOverlay", void 0);
|
|
326
348
|
__decorate([
|
|
327
349
|
state()
|
|
328
350
|
], NileExecutiveSummary.prototype, "displayedText", void 0);
|