@vaadin/login 24.0.0-alpha9 → 24.0.0-beta1

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": "24.0.0-alpha9",
3
+ "version": "24.0.0-beta1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,23 +37,23 @@
37
37
  "dependencies": {
38
38
  "@open-wc/dedupe-mixin": "^1.3.0",
39
39
  "@polymer/polymer": "^3.0.0",
40
- "@vaadin/button": "24.0.0-alpha9",
41
- "@vaadin/component-base": "24.0.0-alpha9",
42
- "@vaadin/overlay": "24.0.0-alpha9",
43
- "@vaadin/password-field": "24.0.0-alpha9",
44
- "@vaadin/text-field": "24.0.0-alpha9",
45
- "@vaadin/vaadin-lumo-styles": "24.0.0-alpha9",
46
- "@vaadin/vaadin-material-styles": "24.0.0-alpha9",
47
- "@vaadin/vaadin-themable-mixin": "24.0.0-alpha9"
40
+ "@vaadin/button": "24.0.0-beta1",
41
+ "@vaadin/component-base": "24.0.0-beta1",
42
+ "@vaadin/overlay": "24.0.0-beta1",
43
+ "@vaadin/password-field": "24.0.0-beta1",
44
+ "@vaadin/text-field": "24.0.0-beta1",
45
+ "@vaadin/vaadin-lumo-styles": "24.0.0-beta1",
46
+ "@vaadin/vaadin-material-styles": "24.0.0-beta1",
47
+ "@vaadin/vaadin-themable-mixin": "24.0.0-beta1"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@esm-bundle/chai": "^4.3.4",
51
- "@vaadin/testing-helpers": "^0.3.2",
51
+ "@vaadin/testing-helpers": "^0.4.0",
52
52
  "sinon": "^13.0.2"
53
53
  },
54
54
  "web-types": [
55
55
  "web-types.json",
56
56
  "web-types.lit.json"
57
57
  ],
58
- "gitHead": "cc3f747164041566b300bde4b105d2475649e93f"
58
+ "gitHead": "c5b48921a62482746df8e46994b37e1490fec27e"
59
59
  }
@@ -109,6 +109,10 @@ class LoginForm extends LoginMixin(ElementMixin(ThemableMixin(PolymerElement)))
109
109
  return 'vaadin-login-form';
110
110
  }
111
111
 
112
+ static get observers() {
113
+ return ['_errorChanged(error)'];
114
+ }
115
+
112
116
  /** @protected */
113
117
  connectedCallback() {
114
118
  super.connectedCallback();
@@ -127,10 +131,6 @@ class LoginForm extends LoginMixin(ElementMixin(ThemableMixin(PolymerElement)))
127
131
  this.appendChild(dom);
128
132
  }
129
133
 
130
- static get observers() {
131
- return ['_errorChanged(error)'];
132
- }
133
-
134
134
  /** @private */
135
135
  _errorChanged() {
136
136
  if (this.error && !this._preventAutoEnable) {
@@ -4,6 +4,7 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
7
+ import { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js';
7
8
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
9
  import { LoginMixin } from './vaadin-login-mixin.js';
9
10
  export { LoginI18n } from './vaadin-login-mixin.js';
@@ -75,7 +76,7 @@ export interface LoginOverlayEventMap extends HTMLElementEventMap, LoginOverlayC
75
76
  * @fires {CustomEvent} forgot-password - Fired when user clicks on the "Forgot password" button.
76
77
  * @fires {CustomEvent} login - Fired when a user submits the login.
77
78
  */
78
- declare class LoginOverlay extends ElementMixin(ThemableMixin(LoginMixin(HTMLElement))) {
79
+ declare class LoginOverlay extends LoginMixin(OverlayClassMixin(ElementMixin(ThemableMixin(HTMLElement)))) {
79
80
  /**
80
81
  * Defines the application description
81
82
  */
@@ -7,6 +7,7 @@ import './vaadin-login-form.js';
7
7
  import './vaadin-login-overlay-wrapper.js';
8
8
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
9
9
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
+ import { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js';
10
11
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
12
  import { LoginMixin } from './vaadin-login-mixin.js';
12
13
 
@@ -47,8 +48,9 @@ import { LoginMixin } from './vaadin-login-mixin.js';
47
48
  * @mixes ElementMixin
48
49
  * @mixes ThemableMixin
49
50
  * @mixes LoginMixin
51
+ * @mixes OverlayClassMixin
50
52
  */
51
- class LoginOverlay extends LoginMixin(ElementMixin(ThemableMixin(PolymerElement))) {
53
+ class LoginOverlay extends LoginMixin(OverlayClassMixin(ElementMixin(ThemableMixin(PolymerElement)))) {
52
54
  static get template() {
53
55
  return html`
54
56
  <vaadin-login-overlay-wrapper
@@ -59,6 +61,8 @@ class LoginOverlay extends LoginMixin(ElementMixin(ThemableMixin(PolymerElement)
59
61
  title="[[title]]"
60
62
  description="[[description]]"
61
63
  theme$="[[_theme]]"
64
+ on-vaadin-overlay-escape-press="_preventClosingLogin"
65
+ on-vaadin-overlay-outside-click="_preventClosingLogin"
62
66
  >
63
67
  <vaadin-login-form
64
68
  theme="with-overlay"
@@ -121,19 +125,16 @@ class LoginOverlay extends LoginMixin(ElementMixin(ThemableMixin(PolymerElement)
121
125
  ready() {
122
126
  super.ready();
123
127
 
124
- this._preventClosingLogin = this._preventClosingLogin.bind(this);
128
+ this._overlayElement = this.$.vaadinLoginOverlayWrapper;
125
129
  }
126
130
 
127
131
  /** @protected */
128
132
  connectedCallback() {
129
133
  super.connectedCallback();
130
134
 
131
- this.$.vaadinLoginOverlayWrapper.addEventListener('vaadin-overlay-outside-click', this._preventClosingLogin);
132
- this.$.vaadinLoginOverlayWrapper.addEventListener('vaadin-overlay-escape-press', this._preventClosingLogin);
133
-
134
135
  // Restore opened state if overlay was open when disconnecting
135
136
  if (this.__restoreOpened) {
136
- this.$.vaadinLoginOverlayWrapper.opened = true;
137
+ this.opened = true;
137
138
  }
138
139
  }
139
140
 
@@ -141,12 +142,9 @@ class LoginOverlay extends LoginMixin(ElementMixin(ThemableMixin(PolymerElement)
141
142
  disconnectedCallback() {
142
143
  super.disconnectedCallback();
143
144
 
144
- this.$.vaadinLoginOverlayWrapper.removeEventListener('vaadin-overlay-outside-click', this._preventClosingLogin);
145
- this.$.vaadinLoginOverlayWrapper.removeEventListener('vaadin-overlay-escape-press', this._preventClosingLogin);
146
-
147
145
  // Close overlay and memorize opened state
148
- this.__restoreOpened = this.$.vaadinLoginOverlayWrapper.opened;
149
- this.$.vaadinLoginOverlayWrapper.opened = false;
146
+ this.__restoreOpened = this.opened;
147
+ this.opened = false;
150
148
  }
151
149
 
152
150
  /** @private */
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.0.0-alpha9",
4
+ "version": "24.0.0-alpha12",
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/custom-theme/styling-components) documentation.\n\nSee [`<vaadin-login-form>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha9/#/elements/vaadin-login-form)\ndocumentation for `<vaadin-login-form-wrapper>` stylable parts.",
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/custom-theme/styling-components) documentation.\n\nSee [`<vaadin-login-form>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-login-form)\ndocumentation for `<vaadin-login-form-wrapper>` stylable parts.",
152
152
  "attributes": [
153
153
  {
154
154
  "name": "action",
@@ -196,6 +196,17 @@
196
196
  ]
197
197
  }
198
198
  },
199
+ {
200
+ "name": "overlay-class",
201
+ "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.",
202
+ "value": {
203
+ "type": [
204
+ "string",
205
+ "null",
206
+ "undefined"
207
+ ]
208
+ }
209
+ },
199
210
  {
200
211
  "name": "description",
201
212
  "description": "Defines the application description",
@@ -292,6 +303,17 @@
292
303
  ]
293
304
  }
294
305
  },
306
+ {
307
+ "name": "overlayClass",
308
+ "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.",
309
+ "value": {
310
+ "type": [
311
+ "string",
312
+ "null",
313
+ "undefined"
314
+ ]
315
+ }
316
+ },
295
317
  {
296
318
  "name": "description",
297
319
  "description": "Defines the application description",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/login",
4
- "version": "24.0.0-alpha9",
4
+ "version": "24.0.0-alpha12",
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/custom-theme/styling-components) documentation.\n\nSee [`<vaadin-login-form>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha9/#/elements/vaadin-login-form)\ndocumentation for `<vaadin-login-form-wrapper>` stylable parts.",
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/custom-theme/styling-components) documentation.\n\nSee [`<vaadin-login-form>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-login-form)\ndocumentation for `<vaadin-login-form-wrapper>` stylable parts.",
97
97
  "extension": true,
98
98
  "attributes": [
99
99
  {
@@ -145,6 +145,13 @@
145
145
  "kind": "expression"
146
146
  }
147
147
  },
148
+ {
149
+ "name": ".overlayClass",
150
+ "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.",
151
+ "value": {
152
+ "kind": "expression"
153
+ }
154
+ },
148
155
  {
149
156
  "name": ".description",
150
157
  "description": "Defines the application description",