@vaadin/login 25.0.0-alpha2 → 25.0.0-alpha21
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/styles/vaadin-login-form-wrapper-base-styles.js +65 -0
- package/src/styles/vaadin-login-overlay-wrapper-base-styles.js +52 -0
- package/src/title-controller.d.ts +11 -0
- package/src/title-controller.js +100 -0
- package/src/vaadin-login-form-mixin.js +93 -17
- package/src/vaadin-login-form-wrapper.js +16 -24
- package/src/vaadin-login-form.d.ts +2 -5
- package/src/vaadin-login-form.js +27 -64
- package/src/vaadin-login-mixin.d.ts +1 -1
- package/src/vaadin-login-mixin.js +1 -1
- package/src/vaadin-login-overlay-mixin.d.ts +1 -3
- package/src/vaadin-login-overlay-mixin.js +60 -87
- package/src/vaadin-login-overlay-wrapper.js +32 -12
- package/src/vaadin-login-overlay.d.ts +29 -19
- package/src/vaadin-login-overlay.js +70 -45
- package/vaadin-login-form.js +1 -1
- package/vaadin-login-overlay.js +1 -1
- package/web-types.json +9 -27
- package/web-types.lit.json +12 -12
- package/src/vaadin-login-form-wrapper-styles.js +0 -32
- package/src/vaadin-login-overlay-wrapper-mixin.js +0 -78
- package/src/vaadin-login-overlay-wrapper-styles.js +0 -35
- package/theme/lumo/vaadin-login-form-wrapper-styles.d.ts +0 -1
- package/theme/lumo/vaadin-login-form-wrapper-styles.js +0 -94
- package/theme/lumo/vaadin-login-form.d.ts +0 -5
- package/theme/lumo/vaadin-login-form.js +0 -5
- package/theme/lumo/vaadin-login-overlay-styles.d.ts +0 -1
- package/theme/lumo/vaadin-login-overlay-styles.js +0 -187
- package/theme/lumo/vaadin-login-overlay.d.ts +0 -6
- package/theme/lumo/vaadin-login-overlay.js +0 -6
- /package/src/{vaadin-login-form-wrapper-styles.d.ts → styles/vaadin-login-form-wrapper-base-styles.d.ts} +0 -0
- /package/src/{vaadin-login-overlay-wrapper-styles.d.ts → styles/vaadin-login-overlay-wrapper-base-styles.d.ts} +0 -0
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/login",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha21",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-login-form",
|
|
11
|
-
"description": "`<vaadin-login-form>` is a Web Component providing an easy way to require users\nto log in into an application. Note that component has no shadowRoot.\n\n
|
|
11
|
+
"description": "`<vaadin-login-form>` is a Web Component providing an easy way to require users\nto log in into an application. Note that component has no shadowRoot.\n\n```html\n<vaadin-login-form></vaadin-login-form>\n```\n\nComponent has to be accessible from the `document` layer in order to allow password managers to work properly with form values.\nUsing `<vaadin-login-overlay>` allows to always attach the component to the document body.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------|---------------------------------------------------------|\n`form` | Container for the entire component's content\n`form-title` | Title of the login form\n`error-message`| Container for error message, contains error-message-title and error-message-description parts. Hidden by default.\n`error-message-title` | Container for error message title\n`error-message-description` | Container for error message description\n`footer` | Container additional information text from `i18n` object\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "action",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"properties": [
|
|
84
84
|
{
|
|
85
85
|
"name": "i18n",
|
|
86
|
-
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure (by default it doesn't include `additionalInformation`\nand `header` sections, `header` can be added to override `title` and `description` properties\nin `vaadin-login-overlay`):\n\n
|
|
86
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure (by default it doesn't include `additionalInformation`\nand `header` sections, `header` can be added to override `title` and `description` properties\nin `vaadin-login-overlay`):\n\n```js\n{\n header: {\n title: 'App name',\n description: 'Inspiring application description'\n },\n form: {\n title: 'Log in',\n username: 'Username',\n password: 'Password',\n submit: 'Log in',\n forgotPassword: 'Forgot password'\n },\n errorMessage: {\n title: 'Incorrect username or password',\n message: 'Check that you have entered the correct username and password and try again.',\n username: 'Username is required',\n password: 'Password is required'\n },\n additionalInformation: 'In case you need to provide some additional info for the user.'\n}\n```",
|
|
87
87
|
"value": {
|
|
88
88
|
"type": [
|
|
89
89
|
"LoginI18n"
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
172
|
"name": "vaadin-login-overlay",
|
|
173
|
-
"description": "`<vaadin-login-overlay>` is a
|
|
173
|
+
"description": "`<vaadin-login-overlay>` is a web component which renders a login form in an overlay and\nprovides an additional `brand` part for application title and description.\n\n```html\n<vaadin-login-overlay opened></vaadin-login-overlay>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------------------|--------------------------------\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container element\n`content` | The overlay content element\n`card` | Container for the brand and form wrapper\n`brand` | Container for application title and description\n`description` | The application description\n`form-wrapper` | The login form wrapper element\n`form` | The login form element\n`form-title` | Title of the login form\n`error-message` | Container for error message\n`error-message-title` | Container for error message title\n`error-message-description` | Container for error message description\n`footer` | Container for the footer element\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
174
174
|
"attributes": [
|
|
175
175
|
{
|
|
176
176
|
"name": "action",
|
|
@@ -229,17 +229,6 @@
|
|
|
229
229
|
]
|
|
230
230
|
}
|
|
231
231
|
},
|
|
232
|
-
{
|
|
233
|
-
"name": "overlay-class",
|
|
234
|
-
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
235
|
-
"value": {
|
|
236
|
-
"type": [
|
|
237
|
-
"string",
|
|
238
|
-
"null",
|
|
239
|
-
"undefined"
|
|
240
|
-
]
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
232
|
{
|
|
244
233
|
"name": "description",
|
|
245
234
|
"description": "Defines the application description",
|
|
@@ -283,7 +272,7 @@
|
|
|
283
272
|
"properties": [
|
|
284
273
|
{
|
|
285
274
|
"name": "i18n",
|
|
286
|
-
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure (by default it doesn't include `additionalInformation`\nand `header` sections, `header` can be added to override `title` and `description` properties\nin `vaadin-login-overlay`):\n\n
|
|
275
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure (by default it doesn't include `additionalInformation`\nand `header` sections, `header` can be added to override `title` and `description` properties\nin `vaadin-login-overlay`):\n\n```js\n{\n header: {\n title: 'App name',\n description: 'Inspiring application description'\n },\n form: {\n title: 'Log in',\n username: 'Username',\n password: 'Password',\n submit: 'Log in',\n forgotPassword: 'Forgot password'\n },\n errorMessage: {\n title: 'Incorrect username or password',\n message: 'Check that you have entered the correct username and password and try again.',\n username: 'Username is required',\n password: 'Password is required'\n },\n additionalInformation: 'In case you need to provide some additional info for the user.'\n}\n```",
|
|
287
276
|
"value": {
|
|
288
277
|
"type": [
|
|
289
278
|
"LoginI18n"
|
|
@@ -347,17 +336,6 @@
|
|
|
347
336
|
]
|
|
348
337
|
}
|
|
349
338
|
},
|
|
350
|
-
{
|
|
351
|
-
"name": "overlayClass",
|
|
352
|
-
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
353
|
-
"value": {
|
|
354
|
-
"type": [
|
|
355
|
-
"string",
|
|
356
|
-
"null",
|
|
357
|
-
"undefined"
|
|
358
|
-
]
|
|
359
|
-
}
|
|
360
|
-
},
|
|
361
339
|
{
|
|
362
340
|
"name": "description",
|
|
363
341
|
"description": "Defines the application description",
|
|
@@ -395,6 +373,10 @@
|
|
|
395
373
|
"name": "login",
|
|
396
374
|
"description": "Fired when an user submits the login.\nThe event contains `username` and `password` values in the `detail` property."
|
|
397
375
|
},
|
|
376
|
+
{
|
|
377
|
+
"name": "closed",
|
|
378
|
+
"description": "Fired when the overlay is closed."
|
|
379
|
+
},
|
|
398
380
|
{
|
|
399
381
|
"name": "disabled-changed",
|
|
400
382
|
"description": "Fired when the `disabled` property changes."
|
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": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha21",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-login-form",
|
|
19
|
-
"description": "`<vaadin-login-form>` is a Web Component providing an easy way to require users\nto log in into an application. Note that component has no shadowRoot.\n\n
|
|
19
|
+
"description": "`<vaadin-login-form>` is a Web Component providing an easy way to require users\nto log in into an application. Note that component has no shadowRoot.\n\n```html\n<vaadin-login-form></vaadin-login-form>\n```\n\nComponent has to be accessible from the `document` layer in order to allow password managers to work properly with form values.\nUsing `<vaadin-login-overlay>` allows to always attach the component to the document body.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------|---------------------------------------------------------|\n`form` | Container for the entire component's content\n`form-title` | Title of the login form\n`error-message`| Container for error message, contains error-message-title and error-message-description parts. Hidden by default.\n`error-message-title` | Container for error message title\n`error-message-description` | Container for error message description\n`footer` | Container additional information text from `i18n` object\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"name": ".i18n",
|
|
52
|
-
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure (by default it doesn't include `additionalInformation`\nand `header` sections, `header` can be added to override `title` and `description` properties\nin `vaadin-login-overlay`):\n\n
|
|
52
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure (by default it doesn't include `additionalInformation`\nand `header` sections, `header` can be added to override `title` and `description` properties\nin `vaadin-login-overlay`):\n\n```js\n{\n header: {\n title: 'App name',\n description: 'Inspiring application description'\n },\n form: {\n title: 'Log in',\n username: 'Username',\n password: 'Password',\n submit: 'Log in',\n forgotPassword: 'Forgot password'\n },\n errorMessage: {\n title: 'Incorrect username or password',\n message: 'Check that you have entered the correct username and password and try again.',\n username: 'Username is required',\n password: 'Password is required'\n },\n additionalInformation: 'In case you need to provide some additional info for the user.'\n}\n```",
|
|
53
53
|
"value": {
|
|
54
54
|
"kind": "expression"
|
|
55
55
|
}
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
"name": "vaadin-login-overlay",
|
|
103
|
-
"description": "`<vaadin-login-overlay>` is a
|
|
103
|
+
"description": "`<vaadin-login-overlay>` is a web component which renders a login form in an overlay and\nprovides an additional `brand` part for application title and description.\n\n```html\n<vaadin-login-overlay opened></vaadin-login-overlay>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------------------|--------------------------------\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container element\n`content` | The overlay content element\n`card` | Container for the brand and form wrapper\n`brand` | Container for application title and description\n`description` | The application description\n`form-wrapper` | The login form wrapper element\n`form` | The login form element\n`form-title` | Title of the login form\n`error-message` | Container for error message\n`error-message-title` | Container for error message title\n`error-message-description` | Container for error message description\n`footer` | Container for the footer element\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
104
104
|
"extension": true,
|
|
105
105
|
"attributes": [
|
|
106
106
|
{
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
"name": ".i18n",
|
|
143
|
-
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure (by default it doesn't include `additionalInformation`\nand `header` sections, `header` can be added to override `title` and `description` properties\nin `vaadin-login-overlay`):\n\n
|
|
143
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure (by default it doesn't include `additionalInformation`\nand `header` sections, `header` can be added to override `title` and `description` properties\nin `vaadin-login-overlay`):\n\n```js\n{\n header: {\n title: 'App name',\n description: 'Inspiring application description'\n },\n form: {\n title: 'Log in',\n username: 'Username',\n password: 'Password',\n submit: 'Log in',\n forgotPassword: 'Forgot password'\n },\n errorMessage: {\n title: 'Incorrect username or password',\n message: 'Check that you have entered the correct username and password and try again.',\n username: 'Username is required',\n password: 'Password is required'\n },\n additionalInformation: 'In case you need to provide some additional info for the user.'\n}\n```",
|
|
144
144
|
"value": {
|
|
145
145
|
"kind": "expression"
|
|
146
146
|
}
|
|
@@ -159,13 +159,6 @@
|
|
|
159
159
|
"kind": "expression"
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
|
-
{
|
|
163
|
-
"name": ".overlayClass",
|
|
164
|
-
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
165
|
-
"value": {
|
|
166
|
-
"kind": "expression"
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
162
|
{
|
|
170
163
|
"name": ".description",
|
|
171
164
|
"description": "Defines the application description",
|
|
@@ -194,6 +187,13 @@
|
|
|
194
187
|
"kind": "expression"
|
|
195
188
|
}
|
|
196
189
|
},
|
|
190
|
+
{
|
|
191
|
+
"name": "@closed",
|
|
192
|
+
"description": "Fired when the overlay is closed.",
|
|
193
|
+
"value": {
|
|
194
|
+
"kind": "expression"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
197
|
{
|
|
198
198
|
"name": "@disabled-changed",
|
|
199
199
|
"description": "Fired when the `disabled` property changes.",
|
|
@@ -1,32 +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 { css } from 'lit';
|
|
7
|
-
|
|
8
|
-
export const loginFormWrapperStyles = css`
|
|
9
|
-
:host {
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
display: inline-block;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:host([hidden]) {
|
|
15
|
-
display: none !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
[part='form'] {
|
|
19
|
-
flex: 1;
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
[part='form-title'] {
|
|
26
|
-
margin: 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
[part='error-message'] {
|
|
30
|
-
position: relative;
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
@@ -1,78 +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 { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
7
|
-
import { SlotObserver } from '@vaadin/component-base/src/slot-observer.js';
|
|
8
|
-
import { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';
|
|
9
|
-
import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @polymerMixin
|
|
13
|
-
* @mixes DirMixin
|
|
14
|
-
* @mixes OverlayMixin
|
|
15
|
-
*/
|
|
16
|
-
export const LoginOverlayWrapperMixin = (superClass) =>
|
|
17
|
-
class LoginOverlayWrapperMixin extends OverlayMixin(DirMixin(superClass)) {
|
|
18
|
-
static get properties() {
|
|
19
|
-
return {
|
|
20
|
-
/**
|
|
21
|
-
* Title of the application.
|
|
22
|
-
*/
|
|
23
|
-
title: {
|
|
24
|
-
type: String,
|
|
25
|
-
observer: '_titleChanged',
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Application description. Displayed under the title.
|
|
30
|
-
*/
|
|
31
|
-
description: {
|
|
32
|
-
type: String,
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Used to customize the `aria-level` attribute on the heading element.
|
|
37
|
-
*/
|
|
38
|
-
headingLevel: {
|
|
39
|
-
type: Number,
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/** @protected */
|
|
45
|
-
ready() {
|
|
46
|
-
super.ready();
|
|
47
|
-
|
|
48
|
-
// Use slot observer instead of slot controller since the latter
|
|
49
|
-
// does not work well with teleporting (it removes custom title).
|
|
50
|
-
const slot = this.shadowRoot.querySelector('slot[name="title"]');
|
|
51
|
-
this._titleSlotObserver = new SlotObserver(slot, () => {
|
|
52
|
-
const title = slot.assignedElements({ flatten: true })[0];
|
|
53
|
-
if (!title) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Only set ID on the custom slotted title and link it using
|
|
58
|
-
// aria-labelledby as the default title is in the shadow DOM.
|
|
59
|
-
if (title.getAttribute('part') === 'title') {
|
|
60
|
-
this.setAttribute('aria-label', this.title);
|
|
61
|
-
this.removeAttribute('aria-labelledby');
|
|
62
|
-
} else {
|
|
63
|
-
if (!title.id) {
|
|
64
|
-
title.id = `login-overlay-title-${generateUniqueId()}`;
|
|
65
|
-
}
|
|
66
|
-
this.removeAttribute('aria-label');
|
|
67
|
-
this.setAttribute('aria-labelledby', title.id);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/** @private */
|
|
73
|
-
_titleChanged(title) {
|
|
74
|
-
if (title && this.hasAttribute('aria-label')) {
|
|
75
|
-
this.setAttribute('aria-label', title);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
};
|
|
@@ -1,35 +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 { css } from 'lit';
|
|
7
|
-
|
|
8
|
-
export const loginOverlayWrapperStyles = css`
|
|
9
|
-
[part='overlay'] {
|
|
10
|
-
outline: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
[part='card'] {
|
|
14
|
-
max-width: 100%;
|
|
15
|
-
box-sizing: border-box;
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
[part='brand'] {
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
overflow: hidden;
|
|
24
|
-
flex-grow: 1;
|
|
25
|
-
flex-shrink: 0;
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
justify-content: flex-end;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
[part='title'] {
|
|
32
|
-
color: inherit;
|
|
33
|
-
margin: 0;
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
2
|
-
import { color } from '@vaadin/vaadin-lumo-styles/color.js';
|
|
3
|
-
import { typography } from '@vaadin/vaadin-lumo-styles/typography.js';
|
|
4
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
5
|
-
|
|
6
|
-
const loginFormWrapper = css`
|
|
7
|
-
:host {
|
|
8
|
-
max-width: calc(var(--lumo-size-m) * 10);
|
|
9
|
-
background: var(--lumo-base-color) linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
[part='form'] {
|
|
13
|
-
padding: var(--lumo-space-l);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
[part='form-title'] {
|
|
17
|
-
margin-top: calc(var(--lumo-font-size-xxxl) - var(--lumo-font-size-xxl));
|
|
18
|
-
color: var(--lumo-header-text-color);
|
|
19
|
-
font-size: var(--lumo-font-size-xxl);
|
|
20
|
-
font-weight: 600;
|
|
21
|
-
line-height: var(--lumo-line-height-xs);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
::slotted([slot='submit']) {
|
|
25
|
-
margin-top: var(--lumo-space-l);
|
|
26
|
-
margin-bottom: var(--lumo-space-s);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
::slotted([slot='forgot-password']) {
|
|
30
|
-
margin: var(--lumo-space-s) auto;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
[part='error-message'] {
|
|
34
|
-
background-color: var(--lumo-error-color-10pct);
|
|
35
|
-
padding: var(--lumo-space-m);
|
|
36
|
-
border-radius: var(--lumo-border-radius-m);
|
|
37
|
-
margin-top: var(--lumo-space-m);
|
|
38
|
-
margin-bottom: var(--lumo-space-s);
|
|
39
|
-
color: var(--lumo-error-text-color);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
:host(:not([dir='rtl'])) [part='error-message'] {
|
|
43
|
-
padding-left: var(--lumo-size-m);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:host([dir='rtl']) [part='error-message'] {
|
|
47
|
-
padding-right: var(--lumo-size-m);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
[part='error-message']::before {
|
|
51
|
-
content: var(--lumo-icons-error);
|
|
52
|
-
font-family: lumo-icons;
|
|
53
|
-
font-size: var(--lumo-icon-size-m);
|
|
54
|
-
position: absolute;
|
|
55
|
-
width: var(--lumo-size-m);
|
|
56
|
-
height: 1em;
|
|
57
|
-
line-height: 1;
|
|
58
|
-
text-align: center;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
:host(:not([dir='rtl'])) [part='error-message']::before {
|
|
62
|
-
/* Visual centering */
|
|
63
|
-
margin-left: calc(var(--lumo-size-m) * -0.95);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
:host([dir='rtl']) [part='error-message']::before {
|
|
67
|
-
/* Visual centering */
|
|
68
|
-
margin-right: calc(var(--lumo-size-m) * -0.95);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
[part='error-message-title'] {
|
|
72
|
-
display: block;
|
|
73
|
-
margin: 0 0 0.25em;
|
|
74
|
-
color: inherit;
|
|
75
|
-
line-height: var(--lumo-line-height-xs);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
[part='error-message-description'] {
|
|
79
|
-
font-size: var(--lumo-font-size-s);
|
|
80
|
-
line-height: var(--lumo-line-height-s);
|
|
81
|
-
margin: 0;
|
|
82
|
-
opacity: 0.9;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
[part='footer'] {
|
|
86
|
-
font-size: var(--lumo-font-size-xs);
|
|
87
|
-
line-height: var(--lumo-line-height-s);
|
|
88
|
-
color: var(--lumo-secondary-text-color);
|
|
89
|
-
}
|
|
90
|
-
`;
|
|
91
|
-
|
|
92
|
-
registerStyles('vaadin-login-form-wrapper', [color, typography, loginFormWrapper], {
|
|
93
|
-
moduleId: 'lumo-login-form-wrapper',
|
|
94
|
-
});
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import '@vaadin/button/theme/lumo/vaadin-button.js';
|
|
2
|
-
import '@vaadin/text-field/theme/lumo/vaadin-text-field.js';
|
|
3
|
-
import '@vaadin/password-field/theme/lumo/vaadin-password-field.js';
|
|
4
|
-
import './vaadin-login-form-wrapper-styles.js';
|
|
5
|
-
import '../../src/vaadin-login-form.js';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import '@vaadin/button/theme/lumo/vaadin-button.js';
|
|
2
|
-
import '@vaadin/text-field/theme/lumo/vaadin-text-field.js';
|
|
3
|
-
import '@vaadin/password-field/theme/lumo/vaadin-password-field.js';
|
|
4
|
-
import './vaadin-login-form-wrapper-styles.js';
|
|
5
|
-
import '../../src/vaadin-login-form.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
2
|
-
import { color } from '@vaadin/vaadin-lumo-styles/color.js';
|
|
3
|
-
import { overlay } from '@vaadin/vaadin-lumo-styles/mixins/overlay.js';
|
|
4
|
-
import { typography } from '@vaadin/vaadin-lumo-styles/typography.js';
|
|
5
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
6
|
-
|
|
7
|
-
const loginOverlayWrapper = css`
|
|
8
|
-
:host {
|
|
9
|
-
inset: 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
[part='backdrop'] {
|
|
13
|
-
background: var(--lumo-base-color) linear-gradient(var(--lumo-shade-5pct), var(--lumo-shade-5pct));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
[part='overlay'] {
|
|
17
|
-
background: none;
|
|
18
|
-
border-radius: 0;
|
|
19
|
-
box-shadow: none;
|
|
20
|
-
width: 100%;
|
|
21
|
-
height: 100%;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
[part='brand'] {
|
|
25
|
-
padding: var(--lumo-space-l) var(--lumo-space-xl) var(--lumo-space-l) var(--lumo-space-l);
|
|
26
|
-
background-color: var(--lumo-primary-color);
|
|
27
|
-
color: var(--lumo-primary-contrast-color);
|
|
28
|
-
min-height: calc(var(--lumo-size-m) * 5);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
[part='title'] {
|
|
32
|
-
font-size: var(--lumo-font-size-xxxl);
|
|
33
|
-
font-weight: 600;
|
|
34
|
-
line-height: var(--lumo-line-height-xs);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
[part='description'] {
|
|
38
|
-
line-height: var(--lumo-line-height-s);
|
|
39
|
-
color: var(--lumo-tint-70pct);
|
|
40
|
-
margin-bottom: 0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
[part='content'] {
|
|
44
|
-
height: 100%;
|
|
45
|
-
display: flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
padding: 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
[part='card'] {
|
|
52
|
-
width: calc(var(--lumo-size-m) * 10);
|
|
53
|
-
background: var(--lumo-base-color) linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
|
54
|
-
border-radius: var(--lumo-border-radius-l);
|
|
55
|
-
box-shadow: var(--lumo-box-shadow-s);
|
|
56
|
-
margin: var(--lumo-space-s);
|
|
57
|
-
height: auto;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* Small screen */
|
|
61
|
-
@media only screen and (max-width: 500px) {
|
|
62
|
-
[part='overlay'],
|
|
63
|
-
[part='content'] {
|
|
64
|
-
height: 100%;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
[part='content'] {
|
|
68
|
-
min-height: 100%;
|
|
69
|
-
background: var(--lumo-base-color);
|
|
70
|
-
align-items: flex-start;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
[part='card'],
|
|
74
|
-
[part='overlay'] {
|
|
75
|
-
width: 100%;
|
|
76
|
-
border-radius: 0;
|
|
77
|
-
box-shadow: none;
|
|
78
|
-
margin: 0;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/* RTL styles */
|
|
82
|
-
:host([dir='rtl']) [part='brand'] {
|
|
83
|
-
padding: var(--lumo-space-l) var(--lumo-space-l) var(--lumo-space-l) var(--lumo-space-xl);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/* Landscape small screen */
|
|
88
|
-
@media only screen and (max-height: 600px) and (min-width: 600px) and (orientation: landscape) {
|
|
89
|
-
[part='card'] {
|
|
90
|
-
flex-direction: row;
|
|
91
|
-
align-items: stretch;
|
|
92
|
-
max-width: calc(var(--lumo-size-m) * 16);
|
|
93
|
-
width: 100%;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
[part='brand'],
|
|
97
|
-
[part='form'] {
|
|
98
|
-
flex: auto;
|
|
99
|
-
flex-basis: 0;
|
|
100
|
-
box-sizing: border-box;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
[part='brand'] {
|
|
104
|
-
justify-content: flex-start;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
[part='form'] {
|
|
108
|
-
padding: var(--lumo-space-l);
|
|
109
|
-
overflow: auto;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* Landscape really small screen */
|
|
114
|
-
@media only screen and (max-height: 500px) and (min-width: 600px) and (orientation: landscape),
|
|
115
|
-
only screen and (max-width: 600px) and (min-width: 600px) and (orientation: landscape) {
|
|
116
|
-
[part='content'] {
|
|
117
|
-
height: 100vh;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
[part='card'] {
|
|
121
|
-
margin: 0;
|
|
122
|
-
width: 100%;
|
|
123
|
-
max-width: none;
|
|
124
|
-
height: 100%;
|
|
125
|
-
flex: auto;
|
|
126
|
-
border-radius: 0;
|
|
127
|
-
box-shadow: none;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
[part='form'] {
|
|
131
|
-
height: 100%;
|
|
132
|
-
overflow: auto;
|
|
133
|
-
-webkit-overflow-scrolling: touch;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/* Handle iPhone X notch */
|
|
138
|
-
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
|
|
139
|
-
[part='card'] {
|
|
140
|
-
padding-right: env(safe-area-inset-right);
|
|
141
|
-
padding-left: env(safe-area-inset-left);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
[part='brand'] {
|
|
145
|
-
margin-left: calc(env(safe-area-inset-left) * -1);
|
|
146
|
-
padding-left: calc(var(--lumo-space-l) + env(safe-area-inset-left));
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/* RTL styles */
|
|
150
|
-
:host([dir='rtl']) [part='card'] {
|
|
151
|
-
padding-left: env(safe-area-inset-right);
|
|
152
|
-
padding-right: env(safe-area-inset-left);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
:host([dir='rtl']) [part='brand'] {
|
|
156
|
-
margin-right: calc(env(safe-area-inset-left) * -1);
|
|
157
|
-
padding-right: calc(var(--lumo-space-l) + env(safe-area-inset-left));
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
`;
|
|
161
|
-
|
|
162
|
-
registerStyles('vaadin-login-overlay-wrapper', [color, typography, overlay, loginOverlayWrapper], {
|
|
163
|
-
moduleId: 'lumo-login-overlay-wrapper',
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
const loginFormWrapper = css`
|
|
167
|
-
:host([theme~='with-overlay']) {
|
|
168
|
-
min-height: 100%;
|
|
169
|
-
display: flex;
|
|
170
|
-
justify-content: center;
|
|
171
|
-
max-width: 100%;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/* Landscape small screen */
|
|
175
|
-
@media only screen and (max-height: 600px) and (min-width: 600px) and (orientation: landscape) {
|
|
176
|
-
:host([theme~='with-overlay']) [part='form'] {
|
|
177
|
-
height: 100%;
|
|
178
|
-
-webkit-overflow-scrolling: touch;
|
|
179
|
-
flex: 1;
|
|
180
|
-
padding: 2px;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
`;
|
|
184
|
-
|
|
185
|
-
registerStyles('vaadin-login-form-wrapper', [loginFormWrapper], {
|
|
186
|
-
moduleId: 'lumo-login-overlay',
|
|
187
|
-
});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import '@vaadin/button/theme/lumo/vaadin-button.js';
|
|
2
|
-
import '@vaadin/text-field/theme/lumo/vaadin-text-field.js';
|
|
3
|
-
import '@vaadin/password-field/theme/lumo/vaadin-password-field.js';
|
|
4
|
-
import './vaadin-login-form-wrapper-styles.js';
|
|
5
|
-
import './vaadin-login-overlay-styles.js';
|
|
6
|
-
import '../../src/vaadin-login-overlay.js';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import '@vaadin/button/theme/lumo/vaadin-button.js';
|
|
2
|
-
import '@vaadin/text-field/theme/lumo/vaadin-text-field.js';
|
|
3
|
-
import '@vaadin/password-field/theme/lumo/vaadin-password-field.js';
|
|
4
|
-
import './vaadin-login-form-wrapper-styles.js';
|
|
5
|
-
import './vaadin-login-overlay-styles.js';
|
|
6
|
-
import '../../src/vaadin-login-overlay.js';
|
|
File without changes
|
|
File without changes
|