@vaadin/login 24.8.5 → 24.9.0-alpha2
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/package.json +13 -13
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
- package/src/vaadin-lit-login-form-wrapper.js +0 -86
- package/src/vaadin-lit-login-form.js +0 -112
- package/src/vaadin-lit-login-overlay-wrapper.js +0 -52
- package/src/vaadin-lit-login-overlay.js +0 -83
- package/theme/lumo/vaadin-lit-login-form.d.ts +0 -5
- package/theme/lumo/vaadin-lit-login-form.js +0 -5
- package/theme/lumo/vaadin-lit-login-overlay.d.ts +0 -3
- package/theme/lumo/vaadin-lit-login-overlay.js +0 -3
- package/theme/material/vaadin-lit-login-form.d.ts +0 -5
- package/theme/material/vaadin-lit-login-form.js +0 -5
- package/theme/material/vaadin-lit-login-overlay.d.ts +0 -3
- package/theme/material/vaadin-lit-login-overlay.js +0 -3
- package/vaadin-lit-login-form.d.ts +0 -1
- package/vaadin-lit-login-form.js +0 -3
- package/vaadin-lit-login-overlay.d.ts +0 -1
- package/vaadin-lit-login-overlay.js +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/login",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.9.0-alpha2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,20 +37,20 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
39
39
|
"@polymer/polymer": "^3.0.0",
|
|
40
|
-
"@vaadin/button": "
|
|
41
|
-
"@vaadin/component-base": "
|
|
42
|
-
"@vaadin/overlay": "
|
|
43
|
-
"@vaadin/password-field": "
|
|
44
|
-
"@vaadin/text-field": "
|
|
45
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
46
|
-
"@vaadin/vaadin-material-styles": "
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
40
|
+
"@vaadin/button": "24.9.0-alpha2",
|
|
41
|
+
"@vaadin/component-base": "24.9.0-alpha2",
|
|
42
|
+
"@vaadin/overlay": "24.9.0-alpha2",
|
|
43
|
+
"@vaadin/password-field": "24.9.0-alpha2",
|
|
44
|
+
"@vaadin/text-field": "24.9.0-alpha2",
|
|
45
|
+
"@vaadin/vaadin-lumo-styles": "24.9.0-alpha2",
|
|
46
|
+
"@vaadin/vaadin-material-styles": "24.9.0-alpha2",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "24.9.0-alpha2",
|
|
48
48
|
"lit": "^3.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@vaadin/chai-plugins": "
|
|
52
|
-
"@vaadin/checkbox": "
|
|
53
|
-
"@vaadin/test-runner-commands": "
|
|
51
|
+
"@vaadin/chai-plugins": "24.9.0-alpha2",
|
|
52
|
+
"@vaadin/checkbox": "24.9.0-alpha2",
|
|
53
|
+
"@vaadin/test-runner-commands": "24.9.0-alpha2",
|
|
54
54
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
55
55
|
"sinon": "^18.0.0"
|
|
56
56
|
},
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"web-types.json",
|
|
59
59
|
"web-types.lit.json"
|
|
60
60
|
],
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "dd99dece1b54942ab0e421892b089e506822c5f5"
|
|
62
62
|
}
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/login",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.9.0-alpha2",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
172
|
"name": "vaadin-login-overlay",
|
|
173
|
-
"description": "`<vaadin-login-overlay>` is a wrapper of the `<vaadin-login-form>` which opens a login form in an overlay and\nhaving an additional `brand` part for application title and description. Using `<vaadin-login-overlay>` allows\npassword managers to work with login form.\n\n```\n<vaadin-login-overlay opened></vaadin-login-overlay>\n```\n\n### Styling\n\nThe component doesn't have a shadowRoot, so the `<form>` and input fields can be styled from a global scope.\nUse `<vaadin-login-overlay-wrapper>` and `<vaadin-login-form-wrapper>` to apply styles.\n\nThe following shadow DOM parts of the `<vaadin-login-overlay-wrapper>` are available for styling:\n\nPart name | Description\n----------------|---------------------------------------------------------|\n`card` | Container for the entire component's content\n`brand` | Container for application title and description\n`form` | Container for the `<vaadin-login-form>` component\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\nSee [`<vaadin-login-form>`](https://cdn.vaadin.com/vaadin-web-components/24.
|
|
173
|
+
"description": "`<vaadin-login-overlay>` is a wrapper of the `<vaadin-login-form>` which opens a login form in an overlay and\nhaving an additional `brand` part for application title and description. Using `<vaadin-login-overlay>` allows\npassword managers to work with login form.\n\n```\n<vaadin-login-overlay opened></vaadin-login-overlay>\n```\n\n### Styling\n\nThe component doesn't have a shadowRoot, so the `<form>` and input fields can be styled from a global scope.\nUse `<vaadin-login-overlay-wrapper>` and `<vaadin-login-form-wrapper>` to apply styles.\n\nThe following shadow DOM parts of the `<vaadin-login-overlay-wrapper>` are available for styling:\n\nPart name | Description\n----------------|---------------------------------------------------------|\n`card` | Container for the entire component's content\n`brand` | Container for application title and description\n`form` | Container for the `<vaadin-login-form>` component\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\nSee [`<vaadin-login-form>`](https://cdn.vaadin.com/vaadin-web-components/24.9.0-alpha2/#/elements/vaadin-login-form)\ndocumentation for `<vaadin-login-form-wrapper>` stylable parts.",
|
|
174
174
|
"attributes": [
|
|
175
175
|
{
|
|
176
176
|
"name": "action",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/login",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.9.0-alpha2",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
"name": "vaadin-login-overlay",
|
|
103
|
-
"description": "`<vaadin-login-overlay>` is a wrapper of the `<vaadin-login-form>` which opens a login form in an overlay and\nhaving an additional `brand` part for application title and description. Using `<vaadin-login-overlay>` allows\npassword managers to work with login form.\n\n```\n<vaadin-login-overlay opened></vaadin-login-overlay>\n```\n\n### Styling\n\nThe component doesn't have a shadowRoot, so the `<form>` and input fields can be styled from a global scope.\nUse `<vaadin-login-overlay-wrapper>` and `<vaadin-login-form-wrapper>` to apply styles.\n\nThe following shadow DOM parts of the `<vaadin-login-overlay-wrapper>` are available for styling:\n\nPart name | Description\n----------------|---------------------------------------------------------|\n`card` | Container for the entire component's content\n`brand` | Container for application title and description\n`form` | Container for the `<vaadin-login-form>` component\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\nSee [`<vaadin-login-form>`](https://cdn.vaadin.com/vaadin-web-components/24.
|
|
103
|
+
"description": "`<vaadin-login-overlay>` is a wrapper of the `<vaadin-login-form>` which opens a login form in an overlay and\nhaving an additional `brand` part for application title and description. Using `<vaadin-login-overlay>` allows\npassword managers to work with login form.\n\n```\n<vaadin-login-overlay opened></vaadin-login-overlay>\n```\n\n### Styling\n\nThe component doesn't have a shadowRoot, so the `<form>` and input fields can be styled from a global scope.\nUse `<vaadin-login-overlay-wrapper>` and `<vaadin-login-form-wrapper>` to apply styles.\n\nThe following shadow DOM parts of the `<vaadin-login-overlay-wrapper>` are available for styling:\n\nPart name | Description\n----------------|---------------------------------------------------------|\n`card` | Container for the entire component's content\n`brand` | Container for application title and description\n`form` | Container for the `<vaadin-login-form>` component\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\nSee [`<vaadin-login-form>`](https://cdn.vaadin.com/vaadin-web-components/24.9.0-alpha2/#/elements/vaadin-login-form)\ndocumentation for `<vaadin-login-form-wrapper>` stylable parts.",
|
|
104
104
|
"extension": true,
|
|
105
105
|
"attributes": [
|
|
106
106
|
{
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2018 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { html, LitElement } from 'lit';
|
|
7
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
9
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
10
|
-
import { loginFormWrapperStyles } from './vaadin-login-form-wrapper-styles.js';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* An element used internally by `<vaadin-login-form>`. Not intended to be used separately.
|
|
14
|
-
*
|
|
15
|
-
* @extends HTMLElement
|
|
16
|
-
* @mixes ThemableMixin
|
|
17
|
-
* @private
|
|
18
|
-
*/
|
|
19
|
-
class LoginFormWrapper extends ThemableMixin(PolylitMixin(LitElement)) {
|
|
20
|
-
static get is() {
|
|
21
|
-
return 'vaadin-login-form-wrapper';
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
static get styles() {
|
|
25
|
-
return loginFormWrapperStyles;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
static get properties() {
|
|
29
|
-
return {
|
|
30
|
-
/**
|
|
31
|
-
* If set, the error message is shown. The message is hidden by default.
|
|
32
|
-
* When set, it changes the disabled state of the submit button.
|
|
33
|
-
* @type {boolean}
|
|
34
|
-
*/
|
|
35
|
-
error: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
value: false,
|
|
38
|
-
reflectToAttribute: true,
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The object used to localize this component.
|
|
43
|
-
*/
|
|
44
|
-
i18n: {
|
|
45
|
-
type: Object,
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Used to customize the `aria-level` attribute on the heading element.
|
|
50
|
-
*/
|
|
51
|
-
headingLevel: {
|
|
52
|
-
type: Number,
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** @protected */
|
|
58
|
-
render() {
|
|
59
|
-
return html`
|
|
60
|
-
<section part="form">
|
|
61
|
-
<div part="form-title" role="heading" aria-level="${this.headingLevel}">${this.i18n.form.title}</div>
|
|
62
|
-
<div part="error-message" ?hidden="${!this.error}">
|
|
63
|
-
<strong part="error-message-title">${this.i18n.errorMessage.title}</strong>
|
|
64
|
-
<p part="error-message-description">${this.i18n.errorMessage.message}</p>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<slot name="form"></slot>
|
|
68
|
-
|
|
69
|
-
<slot name="custom-form-area"></slot>
|
|
70
|
-
|
|
71
|
-
<slot name="submit"></slot>
|
|
72
|
-
|
|
73
|
-
<slot name="forgot-password"></slot>
|
|
74
|
-
|
|
75
|
-
<div part="footer">
|
|
76
|
-
<slot name="footer"></slot>
|
|
77
|
-
<p>${this.i18n.additionalInformation}</p>
|
|
78
|
-
</div>
|
|
79
|
-
</section>
|
|
80
|
-
`;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
defineCustomElement(LoginFormWrapper);
|
|
85
|
-
|
|
86
|
-
export { LoginFormWrapper };
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2018 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import '@vaadin/button/src/vaadin-lit-button.js';
|
|
7
|
-
import '@vaadin/text-field/src/vaadin-lit-text-field.js';
|
|
8
|
-
import '@vaadin/password-field/src/vaadin-lit-password-field.js';
|
|
9
|
-
import './vaadin-lit-login-form-wrapper.js';
|
|
10
|
-
import { html, LitElement } from 'lit';
|
|
11
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
12
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
13
|
-
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
14
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
15
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
16
|
-
import { LoginFormMixin } from './vaadin-login-form-mixin.js';
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* LitElement based version of `<vaadin-login-form>` web component.
|
|
20
|
-
*
|
|
21
|
-
* ## Disclaimer
|
|
22
|
-
*
|
|
23
|
-
* This component is an experiment and not yet a part of Vaadin platform.
|
|
24
|
-
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
25
|
-
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
26
|
-
*/
|
|
27
|
-
class LoginForm extends LoginFormMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
28
|
-
static get is() {
|
|
29
|
-
return 'vaadin-login-form';
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @protected
|
|
34
|
-
* @override
|
|
35
|
-
*/
|
|
36
|
-
createRenderRoot() {
|
|
37
|
-
return this;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/** @protected */
|
|
41
|
-
render() {
|
|
42
|
-
return html`
|
|
43
|
-
<style>
|
|
44
|
-
vaadin-login-form-wrapper > form > * {
|
|
45
|
-
width: 100%;
|
|
46
|
-
}
|
|
47
|
-
</style>
|
|
48
|
-
<vaadin-login-form-wrapper
|
|
49
|
-
id="vaadinLoginFormWrapper"
|
|
50
|
-
theme="${ifDefined(this._theme)}"
|
|
51
|
-
.error="${this.error}"
|
|
52
|
-
.i18n="${this.__effectiveI18n}"
|
|
53
|
-
.headingLevel="${this.headingLevel}"
|
|
54
|
-
>
|
|
55
|
-
<form method="POST" action="${ifDefined(this.action)}" @formdata="${this._onFormData}" slot="form">
|
|
56
|
-
<input id="csrf" type="hidden" />
|
|
57
|
-
<vaadin-text-field
|
|
58
|
-
name="username"
|
|
59
|
-
.label="${this.__effectiveI18n.form.username}"
|
|
60
|
-
.errorMessage="${this.__effectiveI18n.errorMessage.username}"
|
|
61
|
-
id="vaadinLoginUsername"
|
|
62
|
-
required
|
|
63
|
-
@keydown="${this._handleInputKeydown}"
|
|
64
|
-
autocapitalize="none"
|
|
65
|
-
autocorrect="off"
|
|
66
|
-
spellcheck="false"
|
|
67
|
-
autocomplete="username"
|
|
68
|
-
manual-validation
|
|
69
|
-
>
|
|
70
|
-
<input type="text" slot="input" @keyup="${this._handleInputKeyup}" />
|
|
71
|
-
</vaadin-text-field>
|
|
72
|
-
|
|
73
|
-
<vaadin-password-field
|
|
74
|
-
name="password"
|
|
75
|
-
.label="${this.__effectiveI18n.form.password}"
|
|
76
|
-
.errorMessage="${this.__effectiveI18n.errorMessage.password}"
|
|
77
|
-
id="vaadinLoginPassword"
|
|
78
|
-
required
|
|
79
|
-
@keydown="${this._handleInputKeydown}"
|
|
80
|
-
spellcheck="false"
|
|
81
|
-
autocomplete="current-password"
|
|
82
|
-
manual-validation
|
|
83
|
-
>
|
|
84
|
-
<input type="password" slot="input" @keyup="${this._handleInputKeyup}" />
|
|
85
|
-
</vaadin-password-field>
|
|
86
|
-
</form>
|
|
87
|
-
|
|
88
|
-
<vaadin-button
|
|
89
|
-
slot="submit"
|
|
90
|
-
theme="primary contained submit"
|
|
91
|
-
@click="${this.submit}"
|
|
92
|
-
.disabled="${this.disabled}"
|
|
93
|
-
>
|
|
94
|
-
${this.__effectiveI18n.form.submit}
|
|
95
|
-
</vaadin-button>
|
|
96
|
-
|
|
97
|
-
<vaadin-button
|
|
98
|
-
slot="forgot-password"
|
|
99
|
-
theme="tertiary small"
|
|
100
|
-
@click="${this._onForgotPasswordClick}"
|
|
101
|
-
?hidden="${this.noForgotPassword}"
|
|
102
|
-
>
|
|
103
|
-
${this.__effectiveI18n.form.forgotPassword}
|
|
104
|
-
</vaadin-button>
|
|
105
|
-
</vaadin-login-form-wrapper>
|
|
106
|
-
`;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
defineCustomElement(LoginForm);
|
|
111
|
-
|
|
112
|
-
export { LoginForm };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2018 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { html, LitElement } from 'lit';
|
|
7
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
9
|
-
import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
|
|
10
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
11
|
-
import { LoginOverlayWrapperMixin } from './vaadin-login-overlay-wrapper-mixin.js';
|
|
12
|
-
import { loginOverlayWrapperStyles } from './vaadin-login-overlay-wrapper-styles.js';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* An element used internally by `<vaadin-login-overlay>`. Not intended to be used separately.
|
|
16
|
-
*
|
|
17
|
-
* @extends HTMLElement
|
|
18
|
-
* @private
|
|
19
|
-
*/
|
|
20
|
-
class LoginOverlayWrapper extends LoginOverlayWrapperMixin(ThemableMixin(PolylitMixin(LitElement))) {
|
|
21
|
-
static get is() {
|
|
22
|
-
return 'vaadin-login-overlay-wrapper';
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
static get styles() {
|
|
26
|
-
return [overlayStyles, loginOverlayWrapperStyles];
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/** @protected */
|
|
30
|
-
render() {
|
|
31
|
-
return html`
|
|
32
|
-
<div id="backdrop" part="backdrop" ?hidden="${!this.withBackdrop}"></div>
|
|
33
|
-
<div part="overlay" id="overlay" tabindex="0">
|
|
34
|
-
<div part="content" id="content">
|
|
35
|
-
<section part="card">
|
|
36
|
-
<div part="brand">
|
|
37
|
-
<slot name="title">
|
|
38
|
-
<div part="title" role="heading" aria-level="${this.headingLevel}">${this.title}</div>
|
|
39
|
-
</slot>
|
|
40
|
-
<p part="description">${this.description}</p>
|
|
41
|
-
</div>
|
|
42
|
-
<div part="form">
|
|
43
|
-
<slot></slot>
|
|
44
|
-
</div>
|
|
45
|
-
</section>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
defineCustomElement(LoginOverlayWrapper);
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2018 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import './vaadin-lit-login-form.js';
|
|
7
|
-
import './vaadin-lit-login-overlay-wrapper.js';
|
|
8
|
-
import { html, LitElement } from 'lit';
|
|
9
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
10
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
11
|
-
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
12
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
13
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
14
|
-
import { LoginOverlayMixin } from './vaadin-login-overlay-mixin.js';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* LitElement based version of `<vaadin-login-overlay>` web component.
|
|
18
|
-
*
|
|
19
|
-
* ## Disclaimer
|
|
20
|
-
*
|
|
21
|
-
* This component is an experiment and not yet a part of Vaadin platform.
|
|
22
|
-
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
23
|
-
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
24
|
-
*/
|
|
25
|
-
class LoginOverlay extends LoginOverlayMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
26
|
-
static get is() {
|
|
27
|
-
return 'vaadin-login-overlay';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/** @protected */
|
|
31
|
-
render() {
|
|
32
|
-
return html`
|
|
33
|
-
<vaadin-login-overlay-wrapper
|
|
34
|
-
id="vaadinLoginOverlayWrapper"
|
|
35
|
-
.opened="${this.opened}"
|
|
36
|
-
.title="${this.title}"
|
|
37
|
-
.description="${this.description}"
|
|
38
|
-
.headingLevel="${this.headingLevel}"
|
|
39
|
-
role="dialog"
|
|
40
|
-
focus-trap
|
|
41
|
-
with-backdrop
|
|
42
|
-
theme="${ifDefined(this._theme)}"
|
|
43
|
-
@vaadin-overlay-escape-press="${this._preventClosingLogin}"
|
|
44
|
-
@vaadin-overlay-outside-click="${this._preventClosingLogin}"
|
|
45
|
-
@opened-changed="${this._onOpenedChanged}"
|
|
46
|
-
>
|
|
47
|
-
<vaadin-login-form
|
|
48
|
-
theme="with-overlay"
|
|
49
|
-
id="vaadinLoginForm"
|
|
50
|
-
.action="${this.action}"
|
|
51
|
-
.disabled="${this.disabled}"
|
|
52
|
-
.error="${this.error}"
|
|
53
|
-
.noAutofocus="${this.noAutofocus}"
|
|
54
|
-
.noForgotPassword="${this.noForgotPassword}"
|
|
55
|
-
.headingLevel="${this.__computeHeadingLevel(this.headingLevel)}"
|
|
56
|
-
.i18n="${this.__effectiveI18n}"
|
|
57
|
-
@login="${this._retargetEvent}"
|
|
58
|
-
@forgot-password="${this._retargetEvent}"
|
|
59
|
-
@disabled-changed="${this._onDisabledChanged}"
|
|
60
|
-
></vaadin-login-form>
|
|
61
|
-
</vaadin-login-overlay-wrapper>
|
|
62
|
-
|
|
63
|
-
<div hidden>
|
|
64
|
-
<slot name="custom-form-area"></slot>
|
|
65
|
-
<slot name="footer"></slot>
|
|
66
|
-
</div>
|
|
67
|
-
`;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/** @private */
|
|
71
|
-
_onOpenedChanged(event) {
|
|
72
|
-
this.opened = event.detail.value;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/** @private */
|
|
76
|
-
_onDisabledChanged(event) {
|
|
77
|
-
this.disabled = event.detail.value;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
defineCustomElement(LoginOverlay);
|
|
82
|
-
|
|
83
|
-
export { LoginOverlay };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import '@vaadin/button/theme/lumo/vaadin-button-styles.js';
|
|
2
|
-
import '@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js';
|
|
3
|
-
import '@vaadin/password-field/theme/lumo/vaadin-password-field-styles.js';
|
|
4
|
-
import './vaadin-login-form-wrapper-styles.js';
|
|
5
|
-
import '../../src/vaadin-lit-login-form.js';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import '@vaadin/button/theme/lumo/vaadin-button-styles.js';
|
|
2
|
-
import '@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js';
|
|
3
|
-
import '@vaadin/password-field/theme/lumo/vaadin-password-field-styles.js';
|
|
4
|
-
import './vaadin-login-form-wrapper-styles.js';
|
|
5
|
-
import '../../src/vaadin-lit-login-form.js';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import '@vaadin/button/theme/material/vaadin-button-styles.js';
|
|
2
|
-
import '@vaadin/text-field/theme/material/vaadin-text-field-styles.js';
|
|
3
|
-
import '@vaadin/password-field/theme/material/vaadin-password-field-styles.js';
|
|
4
|
-
import './vaadin-login-form-wrapper-styles.js';
|
|
5
|
-
import '../../src/vaadin-lit-login-form.js';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import '@vaadin/button/theme/material/vaadin-button-styles.js';
|
|
2
|
-
import '@vaadin/text-field/theme/material/vaadin-text-field-styles.js';
|
|
3
|
-
import '@vaadin/password-field/theme/material/vaadin-password-field-styles.js';
|
|
4
|
-
import './vaadin-login-form-wrapper-styles.js';
|
|
5
|
-
import '../../src/vaadin-lit-login-form.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/vaadin-lit-login-form.js';
|
package/vaadin-lit-login-form.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/vaadin-lit-login-overlay.js';
|