@vaadin/login 24.8.0-alpha9 → 25.0.0-alpha1

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.
Files changed (37) hide show
  1. package/README.md +0 -26
  2. package/package.json +13 -16
  3. package/src/vaadin-login-form-wrapper.js +34 -32
  4. package/src/vaadin-login-form.js +41 -34
  5. package/src/vaadin-login-overlay-mixin.js +1 -0
  6. package/src/vaadin-login-overlay-wrapper.js +13 -11
  7. package/src/vaadin-login-overlay.js +36 -21
  8. package/theme/lumo/vaadin-login-overlay.d.ts +1 -4
  9. package/theme/lumo/vaadin-login-overlay.js +1 -4
  10. package/web-types.json +2 -2
  11. package/web-types.lit.json +2 -2
  12. package/src/vaadin-lit-login-form-wrapper.js +0 -86
  13. package/src/vaadin-lit-login-form.d.ts +0 -6
  14. package/src/vaadin-lit-login-form.js +0 -112
  15. package/src/vaadin-lit-login-overlay-wrapper.js +0 -52
  16. package/src/vaadin-lit-login-overlay.d.ts +0 -6
  17. package/src/vaadin-lit-login-overlay.js +0 -83
  18. package/theme/lumo/vaadin-lit-login-form.d.ts +0 -5
  19. package/theme/lumo/vaadin-lit-login-form.js +0 -5
  20. package/theme/lumo/vaadin-lit-login-overlay.d.ts +0 -3
  21. package/theme/lumo/vaadin-lit-login-overlay.js +0 -3
  22. package/theme/material/vaadin-lit-login-form.d.ts +0 -5
  23. package/theme/material/vaadin-lit-login-form.js +0 -5
  24. package/theme/material/vaadin-lit-login-overlay.d.ts +0 -3
  25. package/theme/material/vaadin-lit-login-overlay.js +0 -3
  26. package/theme/material/vaadin-login-form-wrapper-styles.d.ts +0 -1
  27. package/theme/material/vaadin-login-form-wrapper-styles.js +0 -109
  28. package/theme/material/vaadin-login-form.d.ts +0 -5
  29. package/theme/material/vaadin-login-form.js +0 -5
  30. package/theme/material/vaadin-login-overlay-styles.d.ts +0 -1
  31. package/theme/material/vaadin-login-overlay-styles.js +0 -352
  32. package/theme/material/vaadin-login-overlay.d.ts +0 -6
  33. package/theme/material/vaadin-login-overlay.js +0 -6
  34. package/vaadin-lit-login-form.d.ts +0 -1
  35. package/vaadin-lit-login-form.js +0 -3
  36. package/vaadin-lit-login-overlay.d.ts +0 -1
  37. package/vaadin-lit-login-overlay.js +0 -3
package/README.md CHANGED
@@ -26,32 +26,6 @@ Once installed, import the component in your application:
26
26
  import '@vaadin/login';
27
27
  ```
28
28
 
29
- ## Themes
30
-
31
- Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
32
- The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/list-box/vaadin-list-box.js) of the package uses Lumo theme.
33
-
34
- To use the Material theme, import the components from the `theme/material` folder:
35
-
36
- ```js
37
- import '@vaadin/login/theme/material/vaadin-login-overlay.js';
38
- import '@vaadin/login/theme/material/vaadin-login-form.js';
39
- ```
40
-
41
- You can also import the Lumo version of the components explicitly:
42
-
43
- ```js
44
- import '@vaadin/login/theme/lumo/vaadin-login-overlay.js';
45
- import '@vaadin/login/theme/lumo/vaadin-login-form.js';
46
- ```
47
-
48
- Finally, you can import the un-themed components from the `src` folder to get a minimal starting point:
49
-
50
- ```js
51
- import '@vaadin/login/src/vaadin-login-overlay.js';
52
- import '@vaadin/login/src/vaadin-login-form.js';
53
- ```
54
-
55
29
  ## Contributing
56
30
 
57
31
  Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/login",
3
- "version": "24.8.0-alpha9",
3
+ "version": "25.0.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -31,26 +31,23 @@
31
31
  "Vaadin",
32
32
  "vaadin-login",
33
33
  "web-components",
34
- "web-component",
35
- "polymer"
34
+ "web-component"
36
35
  ],
37
36
  "dependencies": {
38
37
  "@open-wc/dedupe-mixin": "^1.3.0",
39
- "@polymer/polymer": "^3.0.0",
40
- "@vaadin/button": "24.8.0-alpha9",
41
- "@vaadin/component-base": "24.8.0-alpha9",
42
- "@vaadin/overlay": "24.8.0-alpha9",
43
- "@vaadin/password-field": "24.8.0-alpha9",
44
- "@vaadin/text-field": "24.8.0-alpha9",
45
- "@vaadin/vaadin-lumo-styles": "24.8.0-alpha9",
46
- "@vaadin/vaadin-material-styles": "24.8.0-alpha9",
47
- "@vaadin/vaadin-themable-mixin": "24.8.0-alpha9",
38
+ "@vaadin/button": "25.0.0-alpha1",
39
+ "@vaadin/component-base": "25.0.0-alpha1",
40
+ "@vaadin/overlay": "25.0.0-alpha1",
41
+ "@vaadin/password-field": "25.0.0-alpha1",
42
+ "@vaadin/text-field": "25.0.0-alpha1",
43
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
44
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
48
45
  "lit": "^3.0.0"
49
46
  },
50
47
  "devDependencies": {
51
- "@vaadin/chai-plugins": "24.8.0-alpha9",
52
- "@vaadin/checkbox": "24.8.0-alpha9",
53
- "@vaadin/test-runner-commands": "24.8.0-alpha9",
48
+ "@vaadin/chai-plugins": "25.0.0-alpha1",
49
+ "@vaadin/checkbox": "25.0.0-alpha1",
50
+ "@vaadin/test-runner-commands": "25.0.0-alpha1",
54
51
  "@vaadin/testing-helpers": "^1.1.0",
55
52
  "sinon": "^18.0.0"
56
53
  },
@@ -58,5 +55,5 @@
58
55
  "web-types.json",
59
56
  "web-types.lit.json"
60
57
  ],
61
- "gitHead": "4de3809275ddfd733b0d13fd02af8faf73eb6770"
58
+ "gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
62
59
  }
@@ -3,15 +3,12 @@
3
3
  * Copyright (c) 2018 - 2025 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, PolymerElement } from '@polymer/polymer/polymer-element.js';
6
+ import { html, LitElement } from 'lit';
7
7
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
- import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
9
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
10
  import { loginFormWrapperStyles } from './vaadin-login-form-wrapper-styles.js';
10
11
 
11
- registerStyles('vaadin-login-form-wrapper', loginFormWrapperStyles, {
12
- moduleId: 'vaadin-login-form-wrapper-styles',
13
- });
14
-
15
12
  /**
16
13
  * An element used internally by `<vaadin-login-form>`. Not intended to be used separately.
17
14
  *
@@ -19,36 +16,15 @@ registerStyles('vaadin-login-form-wrapper', loginFormWrapperStyles, {
19
16
  * @mixes ThemableMixin
20
17
  * @private
21
18
  */
22
- class LoginFormWrapper extends ThemableMixin(PolymerElement) {
23
- static get template() {
24
- return html`
25
- <section part="form">
26
- <div part="form-title" part="form-title" role="heading" aria-level$="[[headingLevel]]">[[i18n.form.title]]</div>
27
- <div part="error-message" hidden$="[[!error]]">
28
- <strong part="error-message-title">[[i18n.errorMessage.title]]</strong>
29
- <p part="error-message-description">[[i18n.errorMessage.message]]</p>
30
- </div>
31
-
32
- <slot name="form"></slot>
33
-
34
- <slot name="custom-form-area"></slot>
35
-
36
- <slot name="submit"></slot>
37
-
38
- <slot name="forgot-password"></slot>
39
-
40
- <div part="footer">
41
- <slot name="footer"></slot>
42
- <p>[[i18n.additionalInformation]]</p>
43
- </div>
44
- </section>
45
- `;
46
- }
47
-
19
+ class LoginFormWrapper extends ThemableMixin(PolylitMixin(LitElement)) {
48
20
  static get is() {
49
21
  return 'vaadin-login-form-wrapper';
50
22
  }
51
23
 
24
+ static get styles() {
25
+ return loginFormWrapperStyles;
26
+ }
27
+
52
28
  static get properties() {
53
29
  return {
54
30
  /**
@@ -77,6 +53,32 @@ class LoginFormWrapper extends ThemableMixin(PolymerElement) {
77
53
  },
78
54
  };
79
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
+ }
80
82
  }
81
83
 
82
84
  defineCustomElement(LoginFormWrapper);
@@ -7,9 +7,11 @@ import '@vaadin/button/src/vaadin-button.js';
7
7
  import '@vaadin/text-field/src/vaadin-text-field.js';
8
8
  import '@vaadin/password-field/src/vaadin-password-field.js';
9
9
  import './vaadin-login-form-wrapper.js';
10
- import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
10
+ import { html, LitElement } from 'lit';
11
+ import { ifDefined } from 'lit/directives/if-defined.js';
11
12
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
12
13
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
14
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
13
15
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
14
16
  import { LoginFormMixin } from './vaadin-login-form-mixin.js';
15
17
 
@@ -53,8 +55,21 @@ import { LoginFormMixin } from './vaadin-login-form-mixin.js';
53
55
  * @mixes ThemableMixin
54
56
  * @mixes LoginFormMixin
55
57
  */
56
- class LoginForm extends LoginFormMixin(ElementMixin(ThemableMixin(PolymerElement))) {
57
- static get template() {
58
+ class LoginForm extends LoginFormMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
59
+ static get is() {
60
+ return 'vaadin-login-form';
61
+ }
62
+
63
+ /**
64
+ * @protected
65
+ * @override
66
+ */
67
+ createRenderRoot() {
68
+ return this;
69
+ }
70
+
71
+ /** @protected */
72
+ render() {
58
73
  return html`
59
74
  <style>
60
75
  vaadin-login-form-wrapper > form > * {
@@ -63,72 +78,64 @@ class LoginForm extends LoginFormMixin(ElementMixin(ThemableMixin(PolymerElement
63
78
  </style>
64
79
  <vaadin-login-form-wrapper
65
80
  id="vaadinLoginFormWrapper"
66
- theme$="[[_theme]]"
67
- error="[[error]]"
68
- i18n="[[__effectiveI18n]]"
69
- heading-level="[[headingLevel]]"
81
+ theme="${ifDefined(this._theme)}"
82
+ .error="${this.error}"
83
+ .i18n="${this.__effectiveI18n}"
84
+ .headingLevel="${this.headingLevel}"
70
85
  >
71
- <form method="POST" action$="[[action]]" on-formdata="_onFormData" slot="form">
86
+ <form method="POST" action="${ifDefined(this.action)}" @formdata="${this._onFormData}" slot="form">
72
87
  <input id="csrf" type="hidden" />
73
88
  <vaadin-text-field
74
89
  name="username"
75
- label="[[__effectiveI18n.form.username]]"
76
- error-message="[[__effectiveI18n.errorMessage.username]]"
90
+ .label="${this.__effectiveI18n.form.username}"
91
+ .errorMessage="${this.__effectiveI18n.errorMessage.username}"
77
92
  id="vaadinLoginUsername"
78
93
  required
79
- on-keydown="_handleInputKeydown"
94
+ @keydown="${this._handleInputKeydown}"
80
95
  autocapitalize="none"
81
96
  autocorrect="off"
82
97
  spellcheck="false"
83
98
  autocomplete="username"
84
99
  manual-validation
85
100
  >
86
- <input type="text" slot="input" on-keyup="_handleInputKeyup" />
101
+ <input type="text" slot="input" @keyup="${this._handleInputKeyup}" />
87
102
  </vaadin-text-field>
88
103
 
89
104
  <vaadin-password-field
90
105
  name="password"
91
- label="[[__effectiveI18n.form.password]]"
92
- error-message="[[__effectiveI18n.errorMessage.password]]"
106
+ .label="${this.__effectiveI18n.form.password}"
107
+ .errorMessage="${this.__effectiveI18n.errorMessage.password}"
93
108
  id="vaadinLoginPassword"
94
109
  required
95
- on-keydown="_handleInputKeydown"
110
+ @keydown="${this._handleInputKeydown}"
96
111
  spellcheck="false"
97
112
  autocomplete="current-password"
98
113
  manual-validation
99
114
  >
100
- <input type="password" slot="input" on-keyup="_handleInputKeyup" />
115
+ <input type="password" slot="input" @keyup="${this._handleInputKeyup}" />
101
116
  </vaadin-password-field>
102
117
  </form>
103
118
 
104
- <vaadin-button slot="submit" theme="primary contained submit" on-click="submit" disabled$="[[disabled]]">
105
- [[__effectiveI18n.form.submit]]
119
+ <vaadin-button
120
+ slot="submit"
121
+ theme="primary contained submit"
122
+ @click="${this.submit}"
123
+ .disabled="${this.disabled}"
124
+ >
125
+ ${this.__effectiveI18n.form.submit}
106
126
  </vaadin-button>
107
127
 
108
128
  <vaadin-button
109
129
  slot="forgot-password"
110
130
  theme="tertiary small"
111
- on-click="_onForgotPasswordClick"
112
- hidden$="[[noForgotPassword]]"
131
+ @click="${this._onForgotPasswordClick}"
132
+ ?hidden="${this.noForgotPassword}"
113
133
  >
114
- [[__effectiveI18n.form.forgotPassword]]
134
+ ${this.__effectiveI18n.form.forgotPassword}
115
135
  </vaadin-button>
116
136
  </vaadin-login-form-wrapper>
117
137
  `;
118
138
  }
119
-
120
- static get is() {
121
- return 'vaadin-login-form';
122
- }
123
-
124
- /**
125
- * @param {StampedTemplate} dom
126
- * @return {null}
127
- * @protected
128
- */
129
- _attachDom(dom) {
130
- this.appendChild(dom);
131
- }
132
139
  }
133
140
 
134
141
  defineCustomElement(LoginForm);
@@ -32,6 +32,7 @@ export const LoginOverlayMixin = (superClass) =>
32
32
  opened: {
33
33
  type: Boolean,
34
34
  value: false,
35
+ sync: true,
35
36
  observer: '_onOpenedChange',
36
37
  },
37
38
 
@@ -3,17 +3,14 @@
3
3
  * Copyright (c) 2018 - 2025 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, PolymerElement } from '@polymer/polymer/polymer-element.js';
6
+ import { html, LitElement } from 'lit';
7
7
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
8
9
  import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
9
- import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
11
  import { LoginOverlayWrapperMixin } from './vaadin-login-overlay-wrapper-mixin.js';
11
12
  import { loginOverlayWrapperStyles } from './vaadin-login-overlay-wrapper-styles.js';
12
13
 
13
- registerStyles('vaadin-login-overlay-wrapper', [overlayStyles, loginOverlayWrapperStyles], {
14
- moduleId: 'vaadin-login-overlay-wrapper-styles',
15
- });
16
-
17
14
  /**
18
15
  * An element used internally by `<vaadin-login-overlay>`. Not intended to be used separately.
19
16
  *
@@ -22,22 +19,27 @@ registerStyles('vaadin-login-overlay-wrapper', [overlayStyles, loginOverlayWrapp
22
19
  * @mixes ThemableMixin
23
20
  * @private
24
21
  */
25
- class LoginOverlayWrapper extends LoginOverlayWrapperMixin(ThemableMixin(PolymerElement)) {
22
+ class LoginOverlayWrapper extends LoginOverlayWrapperMixin(ThemableMixin(PolylitMixin(LitElement))) {
26
23
  static get is() {
27
24
  return 'vaadin-login-overlay-wrapper';
28
25
  }
29
26
 
30
- static get template() {
27
+ static get styles() {
28
+ return [overlayStyles, loginOverlayWrapperStyles];
29
+ }
30
+
31
+ /** @protected */
32
+ render() {
31
33
  return html`
32
- <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
34
+ <div id="backdrop" part="backdrop" ?hidden="${!this.withBackdrop}"></div>
33
35
  <div part="overlay" id="overlay" tabindex="0">
34
36
  <div part="content" id="content">
35
37
  <section part="card">
36
38
  <div part="brand">
37
39
  <slot name="title">
38
- <div part="title" role="heading" aria-level$="[[headingLevel]]">[[title]]</div>
40
+ <div part="title" role="heading" aria-level="${this.headingLevel}">${this.title}</div>
39
41
  </slot>
40
- <p part="description">[[description]]</p>
42
+ <p part="description">${this.description}</p>
41
43
  </div>
42
44
  <div part="form">
43
45
  <slot></slot>
@@ -5,9 +5,11 @@
5
5
  */
6
6
  import './vaadin-login-form.js';
7
7
  import './vaadin-login-overlay-wrapper.js';
8
- import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
8
+ import { html, LitElement } from 'lit';
9
+ import { ifDefined } from 'lit/directives/if-defined.js';
9
10
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
11
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
12
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
11
13
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
14
  import { LoginOverlayMixin } from './vaadin-login-overlay-mixin.js';
13
15
 
@@ -50,34 +52,41 @@ import { LoginOverlayMixin } from './vaadin-login-overlay-mixin.js';
50
52
  * @mixes ThemableMixin
51
53
  * @mixes LoginOverlayMixin
52
54
  */
53
- class LoginOverlay extends LoginOverlayMixin(ElementMixin(ThemableMixin(PolymerElement))) {
54
- static get template() {
55
+ class LoginOverlay extends LoginOverlayMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
56
+ static get is() {
57
+ return 'vaadin-login-overlay';
58
+ }
59
+
60
+ /** @protected */
61
+ render() {
55
62
  return html`
56
63
  <vaadin-login-overlay-wrapper
57
64
  id="vaadinLoginOverlayWrapper"
58
- opened="{{opened}}"
65
+ .opened="${this.opened}"
66
+ .title="${this.title}"
67
+ .description="${this.description}"
68
+ .headingLevel="${this.headingLevel}"
59
69
  role="dialog"
60
70
  focus-trap
61
71
  with-backdrop
62
- title="[[title]]"
63
- description="[[description]]"
64
- heading-level="[[headingLevel]]"
65
- theme$="[[_theme]]"
66
- on-vaadin-overlay-escape-press="_preventClosingLogin"
67
- on-vaadin-overlay-outside-click="_preventClosingLogin"
72
+ theme="${ifDefined(this._theme)}"
73
+ @vaadin-overlay-escape-press="${this._preventClosingLogin}"
74
+ @vaadin-overlay-outside-click="${this._preventClosingLogin}"
75
+ @opened-changed="${this._onOpenedChanged}"
68
76
  >
69
77
  <vaadin-login-form
70
78
  theme="with-overlay"
71
79
  id="vaadinLoginForm"
72
- action="[[action]]"
73
- disabled="{{disabled}}"
74
- error="{{error}}"
75
- heading-level="[[__computeHeadingLevel(headingLevel)]]"
76
- no-autofocus="[[noAutofocus]]"
77
- no-forgot-password="[[noForgotPassword]]"
78
- i18n="{{__effectiveI18n}}"
79
- on-login="_retargetEvent"
80
- on-forgot-password="_retargetEvent"
80
+ .action="${this.action}"
81
+ .disabled="${this.disabled}"
82
+ .error="${this.error}"
83
+ .noAutofocus="${this.noAutofocus}"
84
+ .noForgotPassword="${this.noForgotPassword}"
85
+ .headingLevel="${this.__computeHeadingLevel(this.headingLevel)}"
86
+ .i18n="${this.__effectiveI18n}"
87
+ @login="${this._retargetEvent}"
88
+ @forgot-password="${this._retargetEvent}"
89
+ @disabled-changed="${this._onDisabledChanged}"
81
90
  ></vaadin-login-form>
82
91
  </vaadin-login-overlay-wrapper>
83
92
 
@@ -88,8 +97,14 @@ class LoginOverlay extends LoginOverlayMixin(ElementMixin(ThemableMixin(PolymerE
88
97
  `;
89
98
  }
90
99
 
91
- static get is() {
92
- return 'vaadin-login-overlay';
100
+ /** @private */
101
+ _onOpenedChanged(event) {
102
+ this.opened = event.detail.value;
103
+ }
104
+
105
+ /** @private */
106
+ _onDisabledChanged(event) {
107
+ this.disabled = event.detail.value;
93
108
  }
94
109
  }
95
110
 
@@ -1,6 +1,3 @@
1
- import '@vaadin/text-field/theme/lumo/vaadin-text-field.js';
2
- import '@vaadin/password-field/theme/lumo/vaadin-password-field.js';
3
- import '@vaadin/button/theme/lumo/vaadin-button.js';
4
- import './vaadin-login-form.js';
5
1
  import './vaadin-login-overlay-styles.js';
2
+ import './vaadin-login-form.js';
6
3
  import '../../src/vaadin-login-overlay.js';
@@ -1,6 +1,3 @@
1
- import '@vaadin/text-field/theme/lumo/vaadin-text-field.js';
2
- import '@vaadin/password-field/theme/lumo/vaadin-password-field.js';
3
- import '@vaadin/button/theme/lumo/vaadin-button.js';
4
- import './vaadin-login-form.js';
5
1
  import './vaadin-login-overlay-styles.js';
2
+ import './vaadin-login-form.js';
6
3
  import '../../src/vaadin-login-overlay.js';
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.8.0-alpha9",
4
+ "version": "25.0.0-alpha1",
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.8.0-alpha9/#/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```\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-alpha1/#/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": "24.8.0-alpha9",
4
+ "version": "25.0.0-alpha1",
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.8.0-alpha9/#/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```\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-alpha1/#/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,6 +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
- export * from './vaadin-login-form.js';