web: move form element
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
49f140e9bc
commit
6eb0583eeb
|
@ -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()
|
|
@ -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 {
|
||||||
|
|
|
@ -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";
|
||||||
|
|
||||||
|
|
|
@ -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";
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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";
|
||||||
|
|
||||||
|
|
|
@ -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";
|
||||||
|
|
||||||
|
|
|
@ -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";
|
||||||
|
|
||||||
|
|
Reference in New Issue