diff --git a/web/src/admin/AdminInterface/index.entrypoint.css b/web/src/admin/AdminInterface/index.entrypoint.css index 1a1bf8ed4a84..8cf89f789b9c 100644 --- a/web/src/admin/AdminInterface/index.entrypoint.css +++ b/web/src/admin/AdminInterface/index.entrypoint.css @@ -14,13 +14,6 @@ } } -.pf-c-page__main, -.pf-c-drawer__content, -.pf-c-page__drawer { - z-index: auto !important; - background-color: transparent; -} - .display-none { display: none; } diff --git a/web/src/admin/endpoints/DeviceAccessGroupsListPage.ts b/web/src/admin/endpoints/DeviceAccessGroupsListPage.ts index e1f503764e05..bc28585e2b76 100644 --- a/web/src/admin/endpoints/DeviceAccessGroupsListPage.ts +++ b/web/src/admin/endpoints/DeviceAccessGroupsListPage.ts @@ -40,17 +40,20 @@ export class DeviceAccessGroupsListPage extends TablePage { row(item: DeviceAccessGroup): SlottedTemplateResult[] { return [ html`${item.name}`, - html` - ${msg("Update")} - ${msg("Update Group")} - - - - `, + html`
+ + ${msg("Update")} + ${msg("Update Group")} + + + + +
+
`, ]; } diff --git a/web/src/admin/endpoints/connectors/ConnectorsListPage.ts b/web/src/admin/endpoints/connectors/ConnectorsListPage.ts index 52b81580d12b..b4d751e69885 100644 --- a/web/src/admin/endpoints/connectors/ConnectorsListPage.ts +++ b/web/src/admin/endpoints/connectors/ConnectorsListPage.ts @@ -44,23 +44,25 @@ export class ConnectorsListPage extends TablePage { return [ html`${item.name}`, html`${item.verboseName}`, - html` - ${msg("Update")} - ${msg("Update Connector")} - - - - `, + html`
+ + ${msg("Update")} + ${msg("Update Connector")} + + + + +
`, ]; } diff --git a/web/src/admin/flows/FlowListPage.ts b/web/src/admin/flows/FlowListPage.ts index c6c0ecef22e2..5ce60ad7dbfe 100644 --- a/web/src/admin/flows/FlowListPage.ts +++ b/web/src/admin/flows/FlowListPage.ts @@ -85,7 +85,8 @@ export class FlowListPage extends TablePage { html`${item.name}`, html`${Array.from(item.stages || []).length}`, html`${Array.from(item.policies || []).length}`, - html` + html`
+ ${msg("Update")} ${msg("Update Flow")} @@ -121,7 +122,8 @@ export class FlowListPage extends TablePage { - `, + +
`, ]; } diff --git a/web/src/elements/ak-progress-bar.ts b/web/src/elements/ak-progress-bar.ts index bfefa3583824..1fdcfce9fde8 100644 --- a/web/src/elements/ak-progress-bar.ts +++ b/web/src/elements/ak-progress-bar.ts @@ -1,11 +1,11 @@ import { PFSize } from "#common/enums"; import { AKElement } from "#elements/Base"; - -import { spread } from "@open-wc/lit-helpers"; +import { ifPresent } from "#elements/utils/attributes"; import { css, html, nothing } from "lit"; import { customElement, property } from "lit/decorators.js"; +import { styleMap } from "lit/directives/style-map.js"; import PFProgress from "@patternfly/patternfly/components/Progress/progress.css"; @@ -21,6 +21,7 @@ export class ProgressBar extends AKElement { .pf-c-progress { overflow: hidden; } + .pf-c-progress.pf-m-indeterminate { --pf-c-progress__bar--Height: 2px; --pf-c-progress--GridGap: 0; @@ -28,12 +29,27 @@ export class ProgressBar extends AKElement { z-index: 1; position: relative; } - .pf-c-progress.pf-m-indeterminate .pf-c-progress__bar .pf-c-progress__indicator { - width: 100%; - height: 100%; - animation: indeterminateAnimation 1s infinite linear; - transform-origin: 0% 50%; + + .pf-c-progress.pf-m-indeterminate { + transition: opacity 0.2s linear; + transition-delay: 0.2s; + + .pf-c-progress__bar .pf-c-progress__indicator { + width: 100%; + height: 100%; + animation: indeterminateAnimation 1s infinite linear; + transform-origin: 0% 50%; + } + } + + :host([inert]) .pf-c-progress.pf-m-indeterminate { + opacity: 0; + + .pf-c-progress__bar .pf-c-progress__indicator { + animation-iteration-count: 1; + } } + @keyframes indeterminateAnimation { 0% { transform: translateX(0) scaleX(0); @@ -49,31 +65,28 @@ export class ProgressBar extends AKElement { ]; @property({ type: Number }) - min = 0; + public min = 0; + @property({ type: Number }) - max = 100; + public max = 100; + @property({ type: Number }) - value = 0; + public value = 0; @property({ type: Boolean }) - indeterminate = false; - - @property() - size: PFSize = PFSize.Medium; - - render() { - const barAttrs: { [key: string]: unknown } = {}; - const indicatorAttrs: { [key: string]: unknown } = {}; - if (!this.indeterminate) { - barAttrs["aria-valuemin"] = this.min; - barAttrs["aria-valuemax"] = this.max; - barAttrs["aria-valuenow"] = this.value; - indicatorAttrs.style = `"width:${Math.min(this.value, 100)}%;";`; - } + public indeterminate = false; + + @property({ type: String }) + public size: PFSize = PFSize.Medium; + + @property({ type: String }) + public label = ""; + + protected render() { return html`
${this.hasSlotted("description") ? html` @@ -91,8 +104,21 @@ export class ProgressBar extends AKElement {
` : nothing} -
-
+
+
`; } diff --git a/web/src/elements/table/Table.ts b/web/src/elements/table/Table.ts index 789356f2ffe7..366b6dca07c6 100644 --- a/web/src/elements/table/Table.ts +++ b/web/src/elements/table/Table.ts @@ -868,8 +868,18 @@ export abstract class Table } protected renderLoadingBar() { - if (!this.loading) return nothing; - return html``; + return guard( + [this.loading, this.label], + () => + html``, + ); } protected renderTable(): TemplateResult { @@ -889,6 +899,8 @@ export abstract class Table ${this.renderToolbarContainer()}
`; } - return html``; + return html``; } } diff --git a/web/src/user/index.entrypoint.css b/web/src/user/index.entrypoint.css index a7c5c0ef0b77..733b0765db26 100644 --- a/web/src/user/index.entrypoint.css +++ b/web/src/user/index.entrypoint.css @@ -1,19 +1,12 @@ -.pf-c-drawer__panel { - z-index: var(--pf-global--ZIndex--md); -} - -.pf-c-page__main, -.pf-c-drawer__content, -.pf-c-page__drawer { - z-index: auto !important; - background-color: transparent !important; +.pf-c-page { + --pf-c-page__header--BackgroundColor: transparent; + --pf-c-page--BackgroundColor: transparent !important; + --pf-c-page__main-section--BackgroundColor: transparent !important; + --ak-user-interface--slant-m-light: var(--pf-global--BackgroundColor--100); + --ak-user-interface--slant-m-dark: var(--pf-global--BackgroundColor--200); } .pf-c-page__header { - background-color: transparent !important; - box-shadow: none !important; - color: black !important; - .pf-c-button { --pf-c-button--m-secondary--Color: var(--pf-global--primary-color--100); --pf-c-button--m-secondary--hover--Color: var(--pf-global--primary-color--100); @@ -22,12 +15,6 @@ } } -.pf-c-page { - background-color: transparent !important; - --ak-user-interface--slant-m-light: var(--pf-global--BackgroundColor--100); - --ak-user-interface--slant-m-dark: var(--pf-global--BackgroundColor--200); -} - .display-none { display: none; } @@ -46,7 +33,7 @@ color: #2b9af3; } -.background-wrapper { +[part="background-wrapper"] { height: 100dvh; width: 100%; position: fixed; @@ -56,7 +43,7 @@ background-color: var(--ak-user-interface--slant-m-dark); } -.background-default-slant { +[part="background-default-slant"] { background-color: var(--ak-user-interface--slant-m-light); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 5vw)); height: 50dvh; @@ -67,6 +54,12 @@ --ak-user-interface--slant-m-dark: var(--pf-global--BackgroundColor--100); } +.pf-c-drawer { + /* TODO: Revisit this after native modals are implemented. */ + --pf-c-drawer__panel--ZIndex: auto; + --pf-c-drawer__content--ZIndex: auto; +} + .pf-c-drawer__main { min-height: calc(100vh - 76px); max-height: calc(100vh - 76px); diff --git a/web/src/user/index.entrypoint.ts b/web/src/user/index.entrypoint.ts index 2dc498076514..15e473c555a3 100644 --- a/web/src/user/index.entrypoint.ts +++ b/web/src/user/index.entrypoint.ts @@ -123,14 +123,14 @@ class UserInterfacePresentation extends WithBrandConfig(WithSession(AKElement)) const backgroundStyles = this.uiConfig.theme.background; return html` -
-
+
+
${!backgroundStyles - ? html`
` + ? html`
` : nothing}
-
-
+
+
${renderImage(this.brandingLogo, this.brandingTitle, "pf-c-brand")} @@ -275,6 +275,7 @@ export class UserInterface extends WithBrandConfig(WithSession(AuthenticatedInte } return html`