@vaadin/login 24.2.0-alpha13 → 24.2.0-alpha14
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 +10 -10
- package/src/vaadin-login-form-mixin.js +32 -4
- package/src/vaadin-login-form-wrapper.js +6 -0
- package/src/vaadin-login-form.js +6 -6
- package/src/vaadin-login-overlay-mixin.js +36 -20
- package/src/vaadin-login-overlay.d.ts +5 -1
- package/src/vaadin-login-overlay.js +5 -0
- package/theme/lumo/vaadin-login-form-wrapper-styles.js +5 -0
- package/theme/lumo/vaadin-login-form.js +0 -1
- package/theme/material/vaadin-login-form-wrapper-styles.js +13 -1
- package/theme/material/vaadin-login-form.js +0 -1
- package/theme/material/vaadin-login-overlay-styles.js +1 -4
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
- package/theme/lumo/vaadin-login-form-styles.js +0 -13
- package/theme/material/vaadin-login-form-styles.js +0 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/login",
|
|
3
|
-
"version": "24.2.0-
|
|
3
|
+
"version": "24.2.0-alpha14",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
45
45
|
"@polymer/polymer": "^3.0.0",
|
|
46
|
-
"@vaadin/button": "24.2.0-
|
|
47
|
-
"@vaadin/component-base": "24.2.0-
|
|
48
|
-
"@vaadin/overlay": "24.2.0-
|
|
49
|
-
"@vaadin/password-field": "24.2.0-
|
|
50
|
-
"@vaadin/text-field": "24.2.0-
|
|
51
|
-
"@vaadin/vaadin-lumo-styles": "24.2.0-
|
|
52
|
-
"@vaadin/vaadin-material-styles": "24.2.0-
|
|
53
|
-
"@vaadin/vaadin-themable-mixin": "24.2.0-
|
|
46
|
+
"@vaadin/button": "24.2.0-alpha14",
|
|
47
|
+
"@vaadin/component-base": "24.2.0-alpha14",
|
|
48
|
+
"@vaadin/overlay": "24.2.0-alpha14",
|
|
49
|
+
"@vaadin/password-field": "24.2.0-alpha14",
|
|
50
|
+
"@vaadin/text-field": "24.2.0-alpha14",
|
|
51
|
+
"@vaadin/vaadin-lumo-styles": "24.2.0-alpha14",
|
|
52
|
+
"@vaadin/vaadin-material-styles": "24.2.0-alpha14",
|
|
53
|
+
"@vaadin/vaadin-themable-mixin": "24.2.0-alpha14"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"web-types.json",
|
|
62
62
|
"web-types.lit.json"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "203a2fda8d879db6ee8bccd7cf5b915de3e5008b"
|
|
65
65
|
}
|
|
@@ -15,6 +15,12 @@ export const LoginFormMixin = (superClass) =>
|
|
|
15
15
|
return ['_errorChanged(error)'];
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
get _customFields() {
|
|
19
|
+
return [...this.$.vaadinLoginFormWrapper.children].filter((node) => {
|
|
20
|
+
return node.getAttribute('slot') === 'custom-fields' && node.hasAttribute('name');
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
18
24
|
/** @protected */
|
|
19
25
|
async connectedCallback() {
|
|
20
26
|
super.connectedCallback();
|
|
@@ -47,13 +53,24 @@ export const LoginFormMixin = (superClass) =>
|
|
|
47
53
|
this.error = false;
|
|
48
54
|
this.disabled = true;
|
|
49
55
|
|
|
56
|
+
const detail = {
|
|
57
|
+
username: userName.value,
|
|
58
|
+
password: password.value,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const fields = this._customFields;
|
|
62
|
+
if (fields.length) {
|
|
63
|
+
detail.custom = {};
|
|
64
|
+
|
|
65
|
+
fields.forEach((field) => {
|
|
66
|
+
detail.custom[field.name] = field.value;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
50
70
|
const loginEventDetails = {
|
|
51
71
|
bubbles: true,
|
|
52
72
|
cancelable: true,
|
|
53
|
-
detail
|
|
54
|
-
username: userName.value,
|
|
55
|
-
password: password.value,
|
|
56
|
-
},
|
|
73
|
+
detail,
|
|
57
74
|
};
|
|
58
75
|
|
|
59
76
|
const firedEvent = this.dispatchEvent(new CustomEvent('login', loginEventDetails));
|
|
@@ -68,6 +85,17 @@ export const LoginFormMixin = (superClass) =>
|
|
|
68
85
|
}
|
|
69
86
|
}
|
|
70
87
|
|
|
88
|
+
/** @protected */
|
|
89
|
+
_onFormData(event) {
|
|
90
|
+
const { formData } = event;
|
|
91
|
+
|
|
92
|
+
if (this._customFields.length) {
|
|
93
|
+
this._customFields.forEach((field) => {
|
|
94
|
+
formData.append(field.name, field.value);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
71
99
|
/** @protected */
|
|
72
100
|
_handleInputKeydown(e) {
|
|
73
101
|
if (e.key === 'Enter') {
|
|
@@ -30,8 +30,14 @@ class LoginFormWrapper extends ThemableMixin(PolymerElement) {
|
|
|
30
30
|
|
|
31
31
|
<slot name="form"></slot>
|
|
32
32
|
|
|
33
|
+
<slot name="custom-fields"></slot>
|
|
34
|
+
|
|
35
|
+
<slot name="submit"></slot>
|
|
36
|
+
|
|
33
37
|
<slot name="forgot-password"></slot>
|
|
34
38
|
|
|
39
|
+
<slot name="footer"></slot>
|
|
40
|
+
|
|
35
41
|
<div part="footer">
|
|
36
42
|
<p>[[i18n.additionalInformation]]</p>
|
|
37
43
|
</div>
|
package/src/vaadin-login-form.js
CHANGED
|
@@ -59,8 +59,8 @@ class LoginForm extends LoginFormMixin(ElementMixin(ThemableMixin(PolymerElement
|
|
|
59
59
|
width: 100%;
|
|
60
60
|
}
|
|
61
61
|
</style>
|
|
62
|
-
<vaadin-login-form-wrapper theme$="[[_theme]]" error="[[error]]" i18n="[[i18n]]">
|
|
63
|
-
<form method="POST" action$="[[action]]" slot="form">
|
|
62
|
+
<vaadin-login-form-wrapper id="vaadinLoginFormWrapper" theme$="[[_theme]]" error="[[error]]" i18n="[[i18n]]">
|
|
63
|
+
<form method="POST" action$="[[action]]" on-formdata="_onFormData" slot="form">
|
|
64
64
|
<input id="csrf" type="hidden" />
|
|
65
65
|
<vaadin-text-field
|
|
66
66
|
name="username"
|
|
@@ -89,12 +89,12 @@ class LoginForm extends LoginFormMixin(ElementMixin(ThemableMixin(PolymerElement
|
|
|
89
89
|
>
|
|
90
90
|
<input type="password" slot="input" on-keyup="_handleInputKeyup" />
|
|
91
91
|
</vaadin-password-field>
|
|
92
|
-
|
|
93
|
-
<vaadin-button theme="primary contained submit" on-click="submit" disabled$="[[disabled]]">
|
|
94
|
-
[[i18n.form.submit]]
|
|
95
|
-
</vaadin-button>
|
|
96
92
|
</form>
|
|
97
93
|
|
|
94
|
+
<vaadin-button slot="submit" theme="primary contained submit" on-click="submit" disabled$="[[disabled]]">
|
|
95
|
+
[[i18n.form.submit]]
|
|
96
|
+
</vaadin-button>
|
|
97
|
+
|
|
98
98
|
<vaadin-button
|
|
99
99
|
slot="forgot-password"
|
|
100
100
|
theme="tertiary small"
|
|
@@ -108,21 +108,39 @@ export const LoginOverlayMixin = (superClass) =>
|
|
|
108
108
|
|
|
109
109
|
/** @private */
|
|
110
110
|
async _onOpenedChange() {
|
|
111
|
+
const form = this.$.vaadinLoginForm;
|
|
112
|
+
|
|
113
|
+
// Wait for initial render on overlay initialization
|
|
114
|
+
if (!form.$ && this.updateComplete) {
|
|
115
|
+
await this.updateComplete;
|
|
116
|
+
}
|
|
117
|
+
|
|
111
118
|
if (!this.opened) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
119
|
+
form.$.vaadinLoginUsername.value = '';
|
|
120
|
+
form.$.vaadinLoginPassword.value = '';
|
|
121
|
+
this.disabled = false;
|
|
122
|
+
|
|
123
|
+
if (this._undoTitleTeleport) {
|
|
124
|
+
this._undoTitleTeleport();
|
|
115
125
|
}
|
|
116
126
|
|
|
117
|
-
this
|
|
118
|
-
|
|
119
|
-
|
|
127
|
+
if (this._undoFieldsTeleport) {
|
|
128
|
+
this._undoFieldsTeleport();
|
|
129
|
+
}
|
|
120
130
|
|
|
121
|
-
if (this.
|
|
122
|
-
this.
|
|
131
|
+
if (this._undoFooterTeleport) {
|
|
132
|
+
this._undoFooterTeleport();
|
|
123
133
|
}
|
|
124
134
|
} else {
|
|
125
|
-
this.
|
|
135
|
+
this._undoTitleTeleport = this._teleport('title', this.$.vaadinLoginOverlayWrapper);
|
|
136
|
+
|
|
137
|
+
this._undoFieldsTeleport = this._teleport(
|
|
138
|
+
'custom-fields',
|
|
139
|
+
form.$.vaadinLoginFormWrapper,
|
|
140
|
+
form.querySelector('vaadin-button'),
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
this._undoFooterTeleport = this._teleport('footer', form.$.vaadinLoginFormWrapper);
|
|
126
144
|
|
|
127
145
|
// Overlay sets pointerEvents on body to `none`, which breaks LastPass popup
|
|
128
146
|
// Reverting it back to the previous state
|
|
@@ -132,20 +150,18 @@ export const LoginOverlayMixin = (superClass) =>
|
|
|
132
150
|
}
|
|
133
151
|
|
|
134
152
|
/** @private */
|
|
135
|
-
_teleport(
|
|
136
|
-
const teleported =
|
|
137
|
-
|
|
153
|
+
_teleport(slot, target, refNode) {
|
|
154
|
+
const teleported = [...this.querySelectorAll(`[slot="${slot}"]`)].map((el) => {
|
|
155
|
+
if (refNode) {
|
|
156
|
+
target.insertBefore(el, refNode);
|
|
157
|
+
} else {
|
|
158
|
+
target.appendChild(el);
|
|
159
|
+
}
|
|
160
|
+
return el;
|
|
138
161
|
});
|
|
139
162
|
// Function to undo the teleport
|
|
140
163
|
return () => {
|
|
141
|
-
|
|
142
|
-
this.appendChild(teleported.shift());
|
|
143
|
-
}
|
|
164
|
+
this.append(...teleported);
|
|
144
165
|
};
|
|
145
166
|
}
|
|
146
|
-
|
|
147
|
-
/** @private */
|
|
148
|
-
_getElementsToTeleport() {
|
|
149
|
-
return this.querySelectorAll('[slot=title]');
|
|
150
|
-
}
|
|
151
167
|
};
|
|
@@ -27,7 +27,11 @@ export type LoginOverlayErrorChangedEvent = CustomEvent<{ value: boolean }>;
|
|
|
27
27
|
/**
|
|
28
28
|
* Fired when a user submits the login.
|
|
29
29
|
*/
|
|
30
|
-
export type LoginOverlayLoginEvent = CustomEvent<{
|
|
30
|
+
export type LoginOverlayLoginEvent = CustomEvent<{
|
|
31
|
+
username: string;
|
|
32
|
+
password: string;
|
|
33
|
+
custom?: Record<string, unknown>;
|
|
34
|
+
}>;
|
|
31
35
|
|
|
32
36
|
export interface LoginOverlayCustomEventMap {
|
|
33
37
|
'description-changed': LoginOverlayDescriptionChangedEvent;
|
|
@@ -75,6 +75,11 @@ class LoginOverlay extends LoginOverlayMixin(ElementMixin(ThemableMixin(PolymerE
|
|
|
75
75
|
on-forgot-password="_retargetEvent"
|
|
76
76
|
></vaadin-login-form>
|
|
77
77
|
</vaadin-login-overlay-wrapper>
|
|
78
|
+
|
|
79
|
+
<div hidden>
|
|
80
|
+
<slot name="custom-fields"></slot>
|
|
81
|
+
<slot name="footer"></slot>
|
|
82
|
+
</div>
|
|
78
83
|
`;
|
|
79
84
|
}
|
|
80
85
|
|
|
@@ -17,6 +17,11 @@ const loginFormWrapper = css`
|
|
|
17
17
|
margin-top: calc(var(--lumo-font-size-xxxl) - var(--lumo-font-size-xxl));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
::slotted([slot='submit']) {
|
|
21
|
+
margin-top: var(--lumo-space-l);
|
|
22
|
+
margin-bottom: var(--lumo-space-s);
|
|
23
|
+
}
|
|
24
|
+
|
|
20
25
|
::slotted([slot='forgot-password']) {
|
|
21
26
|
margin: var(--lumo-space-s) auto;
|
|
22
27
|
}
|
|
@@ -2,5 +2,4 @@ import '@vaadin/button/theme/lumo/vaadin-button.js';
|
|
|
2
2
|
import '@vaadin/text-field/theme/lumo/vaadin-text-field.js';
|
|
3
3
|
import '@vaadin/password-field/theme/lumo/vaadin-password-field.js';
|
|
4
4
|
import './vaadin-login-form-wrapper-styles.js';
|
|
5
|
-
import './vaadin-login-form-styles.js';
|
|
6
5
|
import '../../src/vaadin-login-form.js';
|
|
@@ -5,7 +5,6 @@ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themab
|
|
|
5
5
|
const loginFormWrapper = css`
|
|
6
6
|
:host {
|
|
7
7
|
background: var(--material-background-color) linear-gradient(hsla(0, 0%, 100%, 0.3), hsla(0, 0%, 100%, 0.3));
|
|
8
|
-
min-height: 250px;
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
[part='form'] {
|
|
@@ -22,6 +21,19 @@ const loginFormWrapper = css`
|
|
|
22
21
|
font-size: var(--material-h5-font-size);
|
|
23
22
|
}
|
|
24
23
|
|
|
24
|
+
::slotted([slot='submit']) {
|
|
25
|
+
margin-top: 3em;
|
|
26
|
+
margin-bottom: 2em;
|
|
27
|
+
flex-grow: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media only screen and (max-width: 1023px) {
|
|
31
|
+
::slotted([slot='submit']) {
|
|
32
|
+
margin-top: 2.5em;
|
|
33
|
+
margin-bottom: 1em;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
25
37
|
::slotted([slot='forgot-password']) {
|
|
26
38
|
margin: 0.5rem auto;
|
|
27
39
|
padding-bottom: 12px;
|
|
@@ -2,5 +2,4 @@ import '@vaadin/button/theme/material/vaadin-button.js';
|
|
|
2
2
|
import '@vaadin/text-field/theme/material/vaadin-text-field.js';
|
|
3
3
|
import '@vaadin/password-field/theme/material/vaadin-password-field.js';
|
|
4
4
|
import './vaadin-login-form-wrapper-styles.js';
|
|
5
|
-
import './vaadin-login-form-styles.js';
|
|
6
5
|
import '../../src/vaadin-login-form.js';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import '@vaadin/vaadin-material-styles/color.js';
|
|
2
|
-
import './vaadin-login-form-styles.js';
|
|
3
2
|
import { overlay } from '@vaadin/vaadin-material-styles/mixins/overlay.js';
|
|
4
3
|
import { typography } from '@vaadin/vaadin-material-styles/typography.js';
|
|
5
4
|
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
@@ -338,9 +337,7 @@ const loginFormWrapper = css`
|
|
|
338
337
|
}
|
|
339
338
|
|
|
340
339
|
:host([theme~='with-overlay']) [part='form'] ::slotted(form) {
|
|
341
|
-
|
|
342
|
-
margin-top: 20px;
|
|
343
|
-
min-height: 250px;
|
|
340
|
+
margin-top: 15px;
|
|
344
341
|
}
|
|
345
342
|
}
|
|
346
343
|
|
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.2.0-
|
|
4
|
+
"version": "24.2.0-alpha14",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
"name": "vaadin-login-overlay",
|
|
151
|
-
"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.2.0-
|
|
151
|
+
"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.2.0-alpha14/#/elements/vaadin-login-form)\ndocumentation for `<vaadin-login-form-wrapper>` stylable parts.",
|
|
152
152
|
"attributes": [
|
|
153
153
|
{
|
|
154
154
|
"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.2.0-
|
|
4
|
+
"version": "24.2.0-alpha14",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"name": "vaadin-login-overlay",
|
|
96
|
-
"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.2.0-
|
|
96
|
+
"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.2.0-alpha14/#/elements/vaadin-login-form)\ndocumentation for `<vaadin-login-form-wrapper>` stylable parts.",
|
|
97
97
|
"extension": true,
|
|
98
98
|
"attributes": [
|
|
99
99
|
{
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
2
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
3
|
-
|
|
4
|
-
registerStyles(
|
|
5
|
-
'vaadin-login-form',
|
|
6
|
-
css`
|
|
7
|
-
form > vaadin-button[theme~='submit'] {
|
|
8
|
-
margin-top: var(--lumo-space-l);
|
|
9
|
-
margin-bottom: var(--lumo-space-s);
|
|
10
|
-
}
|
|
11
|
-
`,
|
|
12
|
-
{ moduleId: 'lumo-login-form' },
|
|
13
|
-
);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
2
|
-
|
|
3
|
-
registerStyles(
|
|
4
|
-
'vaadin-login-form',
|
|
5
|
-
css`
|
|
6
|
-
form > vaadin-button[theme~='submit'] {
|
|
7
|
-
margin-top: 3em;
|
|
8
|
-
margin-bottom: 2em;
|
|
9
|
-
flex-grow: 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/* Small screen */
|
|
13
|
-
@media only screen and (max-width: 1023px) {
|
|
14
|
-
form > vaadin-button[theme~='submit'] {
|
|
15
|
-
margin-top: 2.5em;
|
|
16
|
-
margin-bottom: 1em;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
`,
|
|
20
|
-
{ moduleId: 'material-login-form' },
|
|
21
|
-
);
|