web: move form element

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-03-17 12:00:22 +01:00
parent 49f140e9bc
commit 6eb0583eeb
8 changed files with 17 additions and 18 deletions

View File

@ -1,22 +1,21 @@
import { customElement, LitElement, CSSResult, property, css } from "lit-element"; import { customElement, LitElement, CSSResult, property, css } from "lit-element";
import { TemplateResult, html } from "lit-html"; import { TemplateResult, html } from "lit-html";
import { Error } from "../../api/Flows"; import { Error } from "../../api/Flows";
import { COMMON_STYLES } from "../../common/styles"; import PFForm from "@patternfly/patternfly/components/Form/form.css";
import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css";
@customElement("ak-form-element") @customElement("ak-form-element")
export class FormElement extends LitElement { export class FormElement extends LitElement {
static get styles(): CSSResult[] { static get styles(): CSSResult[] {
return COMMON_STYLES.concat( return [PFForm, PFFormControl, css`
css` slot {
slot { display: flex;
display: flex; flex-direction: row;
flex-direction: row; align-items: center;
align-items: center; justify-content: space-around;
justify-content: space-around; }
} `];
`
);
} }
@property() @property()

View File

@ -3,7 +3,7 @@ import { css, CSSResult, customElement, html, property, TemplateResult } from "l
import { WithUserInfoChallenge } from "../../../api/Flows"; import { WithUserInfoChallenge } from "../../../api/Flows";
import { COMMON_STYLES } from "../../../common/styles"; import { COMMON_STYLES } from "../../../common/styles";
import { BaseStage } from "../base"; import { BaseStage } from "../base";
import "../form"; import "../../../elements/forms/FormElement";
import "../../../elements/utils/LoadingState"; import "../../../elements/utils/LoadingState";
export interface AuthenticatorStaticChallenge extends WithUserInfoChallenge { export interface AuthenticatorStaticChallenge extends WithUserInfoChallenge {

View File

@ -4,7 +4,7 @@ import { WithUserInfoChallenge } from "../../../api/Flows";
import { COMMON_STYLES } from "../../../common/styles"; import { COMMON_STYLES } from "../../../common/styles";
import { BaseStage } from "../base"; import { BaseStage } from "../base";
import "webcomponent-qr-code"; import "webcomponent-qr-code";
import "../form"; import "../../../elements/forms/FormElement";
import { showMessage } from "../../../elements/messages/MessageContainer"; import { showMessage } from "../../../elements/messages/MessageContainer";
import "../../../elements/utils/LoadingState"; import "../../../elements/utils/LoadingState";

View File

@ -3,7 +3,7 @@ import { CSSResult, customElement, html, property, TemplateResult } from "lit-el
import { COMMON_STYLES } from "../../../common/styles"; import { COMMON_STYLES } from "../../../common/styles";
import { BaseStage } from "../base"; import { BaseStage } from "../base";
import { AuthenticatorValidateStage, AuthenticatorValidateStageChallenge, DeviceChallenge } from "./AuthenticatorValidateStage"; import { AuthenticatorValidateStage, AuthenticatorValidateStageChallenge, DeviceChallenge } from "./AuthenticatorValidateStage";
import "../form"; import "../../../elements/forms/FormElement";
import "../../../elements/utils/LoadingState"; import "../../../elements/utils/LoadingState";
import { PasswordManagerPrefill } from "../identification/IdentificationStage"; import { PasswordManagerPrefill } from "../identification/IdentificationStage";

View File

@ -4,7 +4,7 @@ import { WithUserInfoChallenge } from "../../../api/Flows";
import { COMMON_STYLES } from "../../../common/styles"; import { COMMON_STYLES } from "../../../common/styles";
import { SpinnerSize } from "../../../elements/Spinner"; import { SpinnerSize } from "../../../elements/Spinner";
import { BaseStage } from "../base"; import { BaseStage } from "../base";
import "../form"; import "../../../elements/forms/FormElement";
import "../../../elements/utils/LoadingState"; import "../../../elements/utils/LoadingState";
export interface CaptchaChallenge extends WithUserInfoChallenge { export interface CaptchaChallenge extends WithUserInfoChallenge {

View File

@ -2,7 +2,7 @@ import { gettext } from "django";
import { css, CSSResult, customElement, html, property, TemplateResult } from "lit-element"; import { css, CSSResult, customElement, html, property, TemplateResult } from "lit-element";
import { COMMON_STYLES } from "../../../common/styles"; import { COMMON_STYLES } from "../../../common/styles";
import { BaseStage } from "../base"; import { BaseStage } from "../base";
import "../form"; import "../../../elements/forms/FormElement";
import "../../../elements/utils/LoadingState"; import "../../../elements/utils/LoadingState";
import { Challenge } from "../../../api/Flows"; import { Challenge } from "../../../api/Flows";

View File

@ -3,7 +3,7 @@ import { CSSResult, customElement, html, property, TemplateResult } from "lit-el
import { WithUserInfoChallenge } from "../../../api/Flows"; import { WithUserInfoChallenge } from "../../../api/Flows";
import { COMMON_STYLES } from "../../../common/styles"; import { COMMON_STYLES } from "../../../common/styles";
import { BaseStage } from "../base"; import { BaseStage } from "../base";
import "../form"; import "../../../elements/forms/FormElement";
import "../../../elements/utils/LoadingState"; import "../../../elements/utils/LoadingState";
import { PasswordManagerPrefill } from "../identification/IdentificationStage"; import { PasswordManagerPrefill } from "../identification/IdentificationStage";

View File

@ -3,7 +3,7 @@ import { CSSResult, customElement, html, property, TemplateResult } from "lit-el
import { unsafeHTML } from "lit-html/directives/unsafe-html"; import { unsafeHTML } from "lit-html/directives/unsafe-html";
import { COMMON_STYLES } from "../../../common/styles"; import { COMMON_STYLES } from "../../../common/styles";
import { BaseStage } from "../base"; import { BaseStage } from "../base";
import "../form"; import "../../../elements/forms/FormElement";
import "../../../elements/utils/LoadingState"; import "../../../elements/utils/LoadingState";
import { Challenge } from "../../../api/Flows"; import { Challenge } from "../../../api/Flows";