@vaadin/login 25.0.0-alpha7 → 25.0.0-alpha8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/login",
3
- "version": "25.0.0-alpha7",
3
+ "version": "25.0.0-alpha8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,6 +21,8 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
+ "!src/styles/*-base-styles.d.ts",
25
+ "!src/styles/*-base-styles.js",
24
26
  "theme",
25
27
  "vaadin-*.d.ts",
26
28
  "vaadin-*.js",
@@ -35,19 +37,19 @@
35
37
  ],
36
38
  "dependencies": {
37
39
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/button": "25.0.0-alpha7",
39
- "@vaadin/component-base": "25.0.0-alpha7",
40
- "@vaadin/overlay": "25.0.0-alpha7",
41
- "@vaadin/password-field": "25.0.0-alpha7",
42
- "@vaadin/text-field": "25.0.0-alpha7",
43
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha7",
44
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha7",
40
+ "@vaadin/button": "25.0.0-alpha8",
41
+ "@vaadin/component-base": "25.0.0-alpha8",
42
+ "@vaadin/overlay": "25.0.0-alpha8",
43
+ "@vaadin/password-field": "25.0.0-alpha8",
44
+ "@vaadin/text-field": "25.0.0-alpha8",
45
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha8",
46
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha8",
45
47
  "lit": "^3.0.0"
46
48
  },
47
49
  "devDependencies": {
48
- "@vaadin/chai-plugins": "25.0.0-alpha7",
49
- "@vaadin/checkbox": "25.0.0-alpha7",
50
- "@vaadin/test-runner-commands": "25.0.0-alpha7",
50
+ "@vaadin/chai-plugins": "25.0.0-alpha8",
51
+ "@vaadin/checkbox": "25.0.0-alpha8",
52
+ "@vaadin/test-runner-commands": "25.0.0-alpha8",
51
53
  "@vaadin/testing-helpers": "^2.0.0",
52
54
  "sinon": "^18.0.0"
53
55
  },
@@ -55,5 +57,5 @@
55
57
  "web-types.json",
56
58
  "web-types.lit.json"
57
59
  ],
58
- "gitHead": "87f72707ce6866892f8be5782fa0da008e87dcbc"
60
+ "gitHead": "ebf53673d5f639d2b1b6f2b31f640f530643ee2f"
59
61
  }
@@ -0,0 +1,8 @@
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 type { CSSResult } from 'lit';
7
+
8
+ export const loginFormWrapperStyles: CSSResult;
@@ -0,0 +1,70 @@
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/component-base/src/style-props.js';
7
+ import { css } from 'lit';
8
+
9
+ export const loginFormWrapperStyles = css`
10
+ :host {
11
+ background: var(--vaadin-login-form-background, transparent);
12
+ border-radius: var(--vaadin-login-form-border-radius, 0);
13
+ display: block;
14
+ max-width: 100%;
15
+ width: var(--vaadin-login-form-width, 360px);
16
+ }
17
+
18
+ :host([hidden]) {
19
+ display: none !important;
20
+ }
21
+
22
+ [part='form'] {
23
+ box-sizing: border-box;
24
+ display: flex;
25
+ flex: 1;
26
+ flex-direction: column;
27
+ gap: var(--vaadin-login-form-gap, var(--vaadin-gap-container-block));
28
+ padding: var(--vaadin-login-form-padding, var(--vaadin-padding));
29
+ }
30
+
31
+ [part='form'] ::slotted(form) {
32
+ display: flex;
33
+ flex-direction: column;
34
+ gap: var(--vaadin-login-form-gap, var(--vaadin-gap-container-block));
35
+ }
36
+
37
+ [part='form-title'] {
38
+ color: var(--vaadin-login-form-title-color, var(--vaadin-color));
39
+ font-size: var(--vaadin-login-form-title-font-size, 1.25rem);
40
+ font-weight: var(--vaadin-login-form-title-font-weight, 600);
41
+ line-height: var(--vaadin-login-form-title-line-height, inherit);
42
+ }
43
+
44
+ :host([error]) [part='error-message'] {
45
+ display: grid;
46
+ }
47
+
48
+ [part='error-message'] {
49
+ color: var(--vaadin-login-form-error-color, var(--vaadin-color));
50
+ font-size: var(--vaadin-login-form-error-font-size, inherit);
51
+ font-weight: var(--vaadin-login-form-error-font-weight, 400);
52
+ gap: var(--vaadin-login-form-error-gap, 0 var(--vaadin-gap-container-inline));
53
+ grid-template-columns: auto 1fr;
54
+ line-height: var(--vaadin-login-form-error-line-height, inherit);
55
+ }
56
+
57
+ [part='error-message']::before {
58
+ background: currentColor;
59
+ content: '';
60
+ display: inline-block;
61
+ flex: none;
62
+ height: var(--vaadin-icon-size, 1lh);
63
+ mask-image: var(--_vaadin-icon-warn);
64
+ width: var(--vaadin-icon-size, 1lh);
65
+ }
66
+
67
+ [part='error-message-description'] {
68
+ grid-column: 2;
69
+ }
70
+ `;
@@ -0,0 +1,8 @@
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 type { CSSResult } from 'lit';
7
+
8
+ export const loginOverlayWrapperStyles: CSSResult;
@@ -0,0 +1,59 @@
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/component-base/src/style-props.js';
7
+ import { css } from 'lit';
8
+ import { overlayStyles } from '@vaadin/overlay/src/styles/vaadin-overlay-base-styles.js';
9
+
10
+ const loginOverlayWrapper = css`
11
+ [part='overlay'] {
12
+ background: var(
13
+ --vaadin-login-overlay-background,
14
+ var(--vaadin-overlay-background, var(--vaadin-background-color))
15
+ );
16
+ border: var(--vaadin-login-overlay-border-width, var(--vaadin-overlay-border-width, 1px)) solid
17
+ var(--vaadin-login-overlay-border-color, var(--vaadin-overlay-border-color, var(--vaadin-border-color)));
18
+ border-radius: var(--vaadin-login-overlay-border-radius, var(--vaadin-radius-l));
19
+ box-shadow: var(
20
+ --vaadin-login-overlay-box-shadow,
21
+ var(--vaadin-overlay-box-shadow, 0 8px 24px -4px rgba(0, 0, 0, 0.3))
22
+ );
23
+ }
24
+
25
+ [part='card'] {
26
+ box-sizing: border-box;
27
+ display: flex;
28
+ flex-direction: column;
29
+ max-width: 100%;
30
+ overflow: hidden;
31
+ }
32
+
33
+ [part='brand'] {
34
+ background: var(--vaadin-login-overlay-brand-background, var(--vaadin-background-container));
35
+ display: flex;
36
+ flex-direction: column;
37
+ padding: var(--vaadin-login-overlay-brand-padding, var(--vaadin-padding));
38
+ }
39
+
40
+ [part='title'] {
41
+ color: var(--vaadin-login-overlay-title-color, var(--vaadin-color));
42
+ font-size: var(--vaadin-login-overlay-title-font-size, inherit);
43
+ font-weight: var(--vaadin-login-overlay-title-font-weight, 600);
44
+ line-height: var(--vaadin-login-overlay-title-line-height, inherit);
45
+ }
46
+
47
+ [part='description'] {
48
+ color: var(--vaadin-login-overlay-description-color, var(--vaadin-color-subtle));
49
+ font-size: var(--vaadin-login-overlay-description-font-size, inherit);
50
+ font-weight: var(--vaadin-login-overlay-description-font-weight, inherit);
51
+ line-height: var(--vaadin-login-overlay-description-line-height, inherit);
52
+ }
53
+
54
+ [part='form'] ::slotted(vaadin-login-form) {
55
+ display: flex;
56
+ }
57
+ `;
58
+
59
+ export const loginOverlayWrapperStyles = [overlayStyles, loginOverlayWrapper];
@@ -17,7 +17,7 @@ import { loginFormWrapperStyles } from './styles/vaadin-login-form-wrapper-core-
17
17
  * @mixes ThemableMixin
18
18
  * @private
19
19
  */
20
- class LoginFormWrapper extends ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement))) {
20
+ class LoginFormWrapper extends ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))) {
21
21
  static get is() {
22
22
  return 'vaadin-login-form-wrapper';
23
23
  }
@@ -39,7 +39,7 @@ export interface LoginFormEventMap extends HTMLElementEventMap, LoginFormCustomE
39
39
  * `<vaadin-login-form>` is a Web Component providing an easy way to require users
40
40
  * to log in into an application. Note that component has no shadowRoot.
41
41
  *
42
- * ```
42
+ * ```html
43
43
  * <vaadin-login-form></vaadin-login-form>
44
44
  * ```
45
45
  *
@@ -19,7 +19,7 @@ import { LoginFormMixin } from './vaadin-login-form-mixin.js';
19
19
  * `<vaadin-login-form>` is a Web Component providing an easy way to require users
20
20
  * to log in into an application. Note that component has no shadowRoot.
21
21
  *
22
- * ```
22
+ * ```html
23
23
  * <vaadin-login-form></vaadin-login-form>
24
24
  * ```
25
25
  *
@@ -71,11 +71,6 @@ class LoginForm extends LoginFormMixin(ElementMixin(ThemableMixin(PolylitMixin(L
71
71
  /** @protected */
72
72
  render() {
73
73
  return html`
74
- <style>
75
- vaadin-login-form-wrapper > form > * {
76
- width: 100%;
77
- }
78
- </style>
79
74
  <vaadin-login-form-wrapper
80
75
  id="vaadinLoginFormWrapper"
81
76
  theme="${ifDefined(this._theme)}"
@@ -20,7 +20,7 @@ import { LoginOverlayWrapperMixin } from './vaadin-login-overlay-wrapper-mixin.j
20
20
  * @private
21
21
  */
22
22
  class LoginOverlayWrapper extends LoginOverlayWrapperMixin(
23
- ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement))),
23
+ ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))),
24
24
  ) {
25
25
  static get is() {
26
26
  return 'vaadin-login-overlay-wrapper';
@@ -52,7 +52,7 @@ export interface LoginOverlayEventMap extends HTMLElementEventMap, LoginOverlayC
52
52
  * having an additional `brand` part for application title and description. Using `<vaadin-login-overlay>` allows
53
53
  * password managers to work with login form.
54
54
  *
55
- * ```
55
+ * ```html
56
56
  * <vaadin-login-overlay opened></vaadin-login-overlay>
57
57
  * ```
58
58
  *
@@ -18,7 +18,7 @@ import { LoginOverlayMixin } from './vaadin-login-overlay-mixin.js';
18
18
  * having an additional `brand` part for application title and description. Using `<vaadin-login-overlay>` allows
19
19
  * password managers to work with login form.
20
20
  *
21
- * ```
21
+ * ```html
22
22
  * <vaadin-login-overlay opened></vaadin-login-overlay>
23
23
  * ```
24
24
  *
@@ -6,7 +6,8 @@ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themab
6
6
 
7
7
  const loginFormWrapper = css`
8
8
  :host {
9
- max-width: calc(var(--lumo-size-m) * 10);
9
+ width: calc(var(--lumo-size-m) * 10);
10
+ max-width: 100%;
10
11
  background: var(--lumo-base-color) linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
11
12
  }
12
13
 
@@ -14,6 +15,11 @@ const loginFormWrapper = css`
14
15
  padding: var(--lumo-space-l);
15
16
  }
16
17
 
18
+ ::slotted(form) {
19
+ display: flex;
20
+ flex-direction: column;
21
+ }
22
+
17
23
  [part='form-title'] {
18
24
  margin-top: calc(var(--lumo-font-size-xxxl) - var(--lumo-font-size-xxl));
19
25
  color: var(--lumo-header-text-color);
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-alpha7",
4
+ "version": "25.0.0-alpha8",
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```\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 component doesn't have a shadowRoot, so the `<form>` and input fields can be styled from a global scope.\nUse `<vaadin-login-form-wrapper>` themable component to apply styles.\n\nThe following shadow DOM parts of the `<vaadin-login-form-wrapper>` 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.",
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 component doesn't have a shadowRoot, so the `<form>` and input fields can be styled from a global scope.\nUse `<vaadin-login-form-wrapper>` themable component to apply styles.\n\nThe following shadow DOM parts of the `<vaadin-login-form-wrapper>` 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",
@@ -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/25.0.0-alpha7/#/elements/vaadin-login-form)\ndocumentation for `<vaadin-login-form-wrapper>` stylable parts.",
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```html\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/25.0.0-alpha8/#/elements/vaadin-login-form)\ndocumentation for `<vaadin-login-form-wrapper>` stylable parts.",
174
174
  "attributes": [
175
175
  {
176
176
  "name": "action",
@@ -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-alpha7",
4
+ "version": "25.0.0-alpha8",
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```\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 component doesn't have a shadowRoot, so the `<form>` and input fields can be styled from a global scope.\nUse `<vaadin-login-form-wrapper>` themable component to apply styles.\n\nThe following shadow DOM parts of the `<vaadin-login-form-wrapper>` 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.",
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 component doesn't have a shadowRoot, so the `<form>` and input fields can be styled from a global scope.\nUse `<vaadin-login-form-wrapper>` themable component to apply styles.\n\nThe following shadow DOM parts of the `<vaadin-login-form-wrapper>` 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
  {
@@ -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/25.0.0-alpha7/#/elements/vaadin-login-form)\ndocumentation for `<vaadin-login-form-wrapper>` stylable parts.",
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```html\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/25.0.0-alpha8/#/elements/vaadin-login-form)\ndocumentation for `<vaadin-login-form-wrapper>` stylable parts.",
104
104
  "extension": true,
105
105
  "attributes": [
106
106
  {