@vaadin/login 25.4.0-alpha5 → 25.4.0-alpha7
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 +14 -14
- package/src/vaadin-login-form-mixin.js +59 -63
- package/src/vaadin-login-form.js +4 -3
- package/src/vaadin-login-overlay.js +4 -3
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/login",
|
|
3
|
-
"version": "25.4.0-
|
|
3
|
+
"version": "25.4.0-alpha7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,22 +35,22 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/button": "25.4.0-
|
|
39
|
-
"@vaadin/component-base": "25.4.0-
|
|
40
|
-
"@vaadin/overlay": "25.4.0-
|
|
41
|
-
"@vaadin/password-field": "25.4.0-
|
|
42
|
-
"@vaadin/text-field": "25.4.0-
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "25.4.0-
|
|
38
|
+
"@vaadin/button": "25.4.0-alpha7",
|
|
39
|
+
"@vaadin/component-base": "25.4.0-alpha7",
|
|
40
|
+
"@vaadin/overlay": "25.4.0-alpha7",
|
|
41
|
+
"@vaadin/password-field": "25.4.0-alpha7",
|
|
42
|
+
"@vaadin/text-field": "25.4.0-alpha7",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "25.4.0-alpha7",
|
|
44
44
|
"lit": "^3.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@vaadin/a11y-base": "25.4.0-
|
|
48
|
-
"@vaadin/aura": "25.4.0-
|
|
49
|
-
"@vaadin/chai-plugins": "25.4.0-
|
|
50
|
-
"@vaadin/checkbox": "25.4.0-
|
|
51
|
-
"@vaadin/test-runner-commands": "25.4.0-
|
|
47
|
+
"@vaadin/a11y-base": "25.4.0-alpha7",
|
|
48
|
+
"@vaadin/aura": "25.4.0-alpha7",
|
|
49
|
+
"@vaadin/chai-plugins": "25.4.0-alpha7",
|
|
50
|
+
"@vaadin/checkbox": "25.4.0-alpha7",
|
|
51
|
+
"@vaadin/test-runner-commands": "25.4.0-alpha7",
|
|
52
52
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
53
|
-
"@vaadin/vaadin-lumo-styles": "25.4.0-
|
|
53
|
+
"@vaadin/vaadin-lumo-styles": "25.4.0-alpha7",
|
|
54
54
|
"sinon": "^22.0.0"
|
|
55
55
|
},
|
|
56
56
|
"customElements": "custom-elements.json",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"web-types.json",
|
|
59
59
|
"web-types.lit.json"
|
|
60
60
|
],
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "368fb0f0df09ec6f51766d9c44047c8d7620d6bd"
|
|
62
62
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2018 - 2026 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { html
|
|
6
|
+
import { html } from 'lit';
|
|
7
7
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
8
8
|
import { LoginMixin } from './vaadin-login-mixin.js';
|
|
9
9
|
|
|
@@ -30,17 +30,6 @@ export const LoginFormMixin = (superClass) =>
|
|
|
30
30
|
return this.querySelector('#vaadinLoginPassword');
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* Override update to render slotted form and buttons
|
|
35
|
-
* into light DOM after rendering shadow DOM.
|
|
36
|
-
* @protected
|
|
37
|
-
*/
|
|
38
|
-
update(props) {
|
|
39
|
-
super.update(props);
|
|
40
|
-
|
|
41
|
-
this.__renderSlottedForm();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
33
|
/** @protected */
|
|
45
34
|
updated(props) {
|
|
46
35
|
super.updated(props);
|
|
@@ -61,58 +50,65 @@ export const LoginFormMixin = (superClass) =>
|
|
|
61
50
|
}
|
|
62
51
|
}
|
|
63
52
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
>
|
|
96
|
-
<input type="password" slot="input" @keyup="${this._handleInputKeyup}" />
|
|
97
|
-
</vaadin-password-field>
|
|
98
|
-
</form>
|
|
99
|
-
|
|
100
|
-
<vaadin-button slot="submit" theme="primary submit" @click="${this.submit}" .disabled="${this.disabled}">
|
|
101
|
-
${this.__effectiveI18n.form.submit}
|
|
102
|
-
</vaadin-button>
|
|
103
|
-
|
|
104
|
-
<vaadin-button
|
|
105
|
-
slot="forgot-password"
|
|
106
|
-
theme="tertiary small"
|
|
107
|
-
@click="${this._onForgotPasswordClick}"
|
|
108
|
-
?hidden="${this.noForgotPassword}"
|
|
53
|
+
/** @protected */
|
|
54
|
+
_renderForm() {
|
|
55
|
+
return html`
|
|
56
|
+
<form method="POST" action="${ifDefined(this.action)}" @formdata="${this._onFormData}" slot="form">
|
|
57
|
+
<input id="csrf" type="hidden" />
|
|
58
|
+
<vaadin-text-field
|
|
59
|
+
name="username"
|
|
60
|
+
.label="${this.__effectiveI18n.form.username}"
|
|
61
|
+
.errorMessage="${this.__effectiveI18n.errorMessage.username}"
|
|
62
|
+
id="vaadinLoginUsername"
|
|
63
|
+
required
|
|
64
|
+
@keydown="${this._handleInputKeydown}"
|
|
65
|
+
autocapitalize="none"
|
|
66
|
+
autocorrect="off"
|
|
67
|
+
spellcheck="false"
|
|
68
|
+
autocomplete="username"
|
|
69
|
+
manual-validation
|
|
70
|
+
>
|
|
71
|
+
<input type="text" slot="input" @keyup="${this._handleInputKeyup}" />
|
|
72
|
+
</vaadin-text-field>
|
|
73
|
+
|
|
74
|
+
<vaadin-password-field
|
|
75
|
+
name="password"
|
|
76
|
+
.label="${this.__effectiveI18n.form.password}"
|
|
77
|
+
.errorMessage="${this.__effectiveI18n.errorMessage.password}"
|
|
78
|
+
id="vaadinLoginPassword"
|
|
79
|
+
required
|
|
80
|
+
@keydown="${this._handleInputKeydown}"
|
|
81
|
+
spellcheck="false"
|
|
82
|
+
autocomplete="current-password"
|
|
83
|
+
manual-validation
|
|
109
84
|
>
|
|
110
|
-
${this.
|
|
111
|
-
</vaadin-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
85
|
+
<input type="password" slot="input" @keyup="${this._handleInputKeyup}" />
|
|
86
|
+
</vaadin-password-field>
|
|
87
|
+
</form>
|
|
88
|
+
`;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** @protected */
|
|
92
|
+
_renderSubmitButton() {
|
|
93
|
+
return html`
|
|
94
|
+
<vaadin-button slot="submit" theme="primary submit" @click="${this.submit}" .disabled="${this.disabled}">
|
|
95
|
+
${this.__effectiveI18n.form.submit}
|
|
96
|
+
</vaadin-button>
|
|
97
|
+
`;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** @protected */
|
|
101
|
+
_renderForgotPasswordButton() {
|
|
102
|
+
return html`
|
|
103
|
+
<vaadin-button
|
|
104
|
+
slot="forgot-password"
|
|
105
|
+
theme="tertiary small"
|
|
106
|
+
@click="${this._onForgotPasswordClick}"
|
|
107
|
+
?hidden="${this.noForgotPassword}"
|
|
108
|
+
>
|
|
109
|
+
${this.__effectiveI18n.form.forgotPassword}
|
|
110
|
+
</vaadin-button>
|
|
111
|
+
`;
|
|
116
112
|
}
|
|
117
113
|
|
|
118
114
|
/**
|
package/src/vaadin-login-form.js
CHANGED
|
@@ -10,6 +10,7 @@ import './vaadin-login-form-wrapper.js';
|
|
|
10
10
|
import { css, html, LitElement } from 'lit';
|
|
11
11
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
12
12
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
13
|
+
import { slotContent } from '@vaadin/component-base/src/directives/slot-content.js';
|
|
13
14
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
14
15
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
15
16
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
@@ -103,10 +104,10 @@ class LoginForm extends LoginFormMixin(ElementMixin(ThemableMixin(PolylitMixin(L
|
|
|
103
104
|
<div id="title" slot="form-title" part="form-title" role="heading" aria-level="${this.headingLevel}">
|
|
104
105
|
${this.__effectiveI18n.form.title}
|
|
105
106
|
</div>
|
|
106
|
-
<slot name="form" slot="form"></slot>
|
|
107
|
+
<slot name="form" slot="form" ${slotContent(this._renderForm())}></slot>
|
|
107
108
|
<slot name="custom-form-area" slot="custom-form-area"></slot>
|
|
108
|
-
<slot name="submit" slot="submit"></slot>
|
|
109
|
-
<slot name="forgot-password" slot="forgot-password"></slot>
|
|
109
|
+
<slot name="submit" slot="submit" ${slotContent(this._renderSubmitButton())}></slot>
|
|
110
|
+
<slot name="forgot-password" slot="forgot-password" ${slotContent(this._renderForgotPasswordButton())}></slot>
|
|
110
111
|
<slot name="footer" slot="footer"></slot>
|
|
111
112
|
</vaadin-login-form-wrapper>
|
|
112
113
|
`;
|
|
@@ -11,6 +11,7 @@ import './vaadin-login-overlay-wrapper.js';
|
|
|
11
11
|
import { css, html, LitElement } from 'lit';
|
|
12
12
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
13
13
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
14
|
+
import { slotContent } from '@vaadin/component-base/src/directives/slot-content.js';
|
|
14
15
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
15
16
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
16
17
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
@@ -135,10 +136,10 @@ class LoginOverlay extends LoginFormMixin(LoginOverlayMixin(ElementMixin(Themabl
|
|
|
135
136
|
<div id="title" slot="form-title" part="form-title" role="heading" aria-level="${this.headingLevel + 1}">
|
|
136
137
|
${this.__effectiveI18n.form.title}
|
|
137
138
|
</div>
|
|
138
|
-
<slot name="form" slot="form"></slot>
|
|
139
|
+
<slot name="form" slot="form" ${slotContent(this._renderForm())}></slot>
|
|
139
140
|
<slot name="custom-form-area" slot="custom-form-area"></slot>
|
|
140
|
-
<slot name="submit" slot="submit"></slot>
|
|
141
|
-
<slot name="forgot-password" slot="forgot-password"></slot>
|
|
141
|
+
<slot name="submit" slot="submit" ${slotContent(this._renderSubmitButton())}></slot>
|
|
142
|
+
<slot name="forgot-password" slot="forgot-password" ${slotContent(this._renderForgotPasswordButton())}></slot>
|
|
142
143
|
<slot name="footer" slot="footer"></slot>
|
|
143
144
|
</vaadin-login-form-wrapper>
|
|
144
145
|
</vaadin-login-overlay-wrapper>
|
package/web-types.json
CHANGED