2022-09-14 22:05:21 +00:00
|
|
|
import { AKElement } from "@goauthentik/elements/Base";
|
|
|
|
import { PFSize } from "@goauthentik/elements/Spinner";
|
2022-06-25 15:44:17 +00:00
|
|
|
|
2022-09-14 22:05:21 +00:00
|
|
|
import { CSSResult, TemplateResult, css, html } from "lit";
|
2021-11-04 21:34:48 +00:00
|
|
|
import { customElement, property } from "lit/decorators.js";
|
2021-09-21 09:31:37 +00:00
|
|
|
|
2021-08-10 22:00:07 +00:00
|
|
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
2021-09-21 09:31:37 +00:00
|
|
|
|
2021-08-10 22:00:07 +00:00
|
|
|
@customElement("ak-loading-overlay")
|
2022-09-14 22:05:21 +00:00
|
|
|
export class LoadingOverlay extends AKElement {
|
2021-08-21 17:26:06 +00:00
|
|
|
@property({ type: Boolean })
|
|
|
|
topMost = false;
|
|
|
|
|
2021-08-10 22:00:07 +00:00
|
|
|
static get styles(): CSSResult[] {
|
|
|
|
return [
|
|
|
|
PFBase,
|
|
|
|
css`
|
|
|
|
:host {
|
|
|
|
display: flex;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
position: absolute;
|
2022-10-18 20:01:42 +00:00
|
|
|
background-color: var(--pf-global--BackgroundColor--dark-transparent-200);
|
2021-08-10 22:00:07 +00:00
|
|
|
z-index: 1;
|
|
|
|
}
|
2021-08-21 17:26:06 +00:00
|
|
|
:host([topMost]) {
|
|
|
|
z-index: 999;
|
|
|
|
}
|
2021-08-10 22:00:07 +00:00
|
|
|
`,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
render(): TemplateResult {
|
|
|
|
return html`<ak-spinner size=${PFSize.XLarge}></ak-spinner>`;
|
|
|
|
}
|
|
|
|
}
|