@vaadin/login
Advanced tools
Comparing version
{ | ||
"name": "@vaadin/login", | ||
"version": "22.0.0-beta1", | ||
"version": "22.0.0-beta2", | ||
"publishConfig": { | ||
@@ -35,11 +35,12 @@ "access": "public" | ||
"dependencies": { | ||
"@open-wc/dedupe-mixin": "^1.3.0", | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/button": "22.0.0-beta1", | ||
"@vaadin/component-base": "22.0.0-beta1", | ||
"@vaadin/password-field": "22.0.0-beta1", | ||
"@vaadin/text-field": "22.0.0-beta1", | ||
"@vaadin/vaadin-lumo-styles": "22.0.0-beta1", | ||
"@vaadin/vaadin-material-styles": "22.0.0-beta1", | ||
"@vaadin/vaadin-overlay": "22.0.0-beta1", | ||
"@vaadin/vaadin-themable-mixin": "22.0.0-beta1" | ||
"@vaadin/button": "22.0.0-beta2", | ||
"@vaadin/component-base": "22.0.0-beta2", | ||
"@vaadin/password-field": "22.0.0-beta2", | ||
"@vaadin/text-field": "22.0.0-beta2", | ||
"@vaadin/vaadin-lumo-styles": "22.0.0-beta2", | ||
"@vaadin/vaadin-material-styles": "22.0.0-beta2", | ||
"@vaadin/vaadin-overlay": "22.0.0-beta2", | ||
"@vaadin/vaadin-themable-mixin": "22.0.0-beta2" | ||
}, | ||
@@ -51,3 +52,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "4cf8a9d0504994200c610e44b3676114fef49c1e" | ||
"gitHead": "f13833683e6667f6ca6678452db14aa6b7eac4a4" | ||
} |
@@ -1,13 +0,8 @@ | ||
# <vaadin-login> | ||
# @vaadin/login | ||
[Live Demo ↗](https://vaadin.com/components/vaadin-login/html-examples) | ||
| | ||
[API documentation ↗](https://vaadin.com/components/vaadin-login/html-api) | ||
A web component for displaying a login form, either inline, or as an overlay. | ||
[Vaadin Login](https://vaadin.com/components/vaadin-login) consists of two components: | ||
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/ds/components/login) | ||
<vaadin-login-overlay> is a Web Component providing a painless login experience, part of the [Vaadin components](https://vaadin.com/components). Component shows the <vaadin-login-form> inside of an overlay. | ||
[](https://www.npmjs.com/package/@vaadin/login) | ||
[](https://vaadin.com/directory/component/vaadinvaadin-login) | ||
[](https://discord.gg/PHmkCKC) | ||
@@ -19,47 +14,44 @@ | ||
[<img src="https://raw.githubusercontent.com/vaadin/vaadin-login/master/screenshot.png" width="700" alt="Screenshot of vaadin-login-overlay">](https://vaadin.com/components/vaadin-login) | ||
[<img src="https://raw.githubusercontent.com/vaadin/web-components/master/packages/login/screenshot.png" width="456" alt="Screenshot of vaadin-login-overlay">](https://vaadin.com/docs/latest/ds/components/login) | ||
<vaadin-login-form> is a Web Component providing a form to require users to log in into an application. | ||
```html | ||
<vaadin-login-form></vaadin-login-form> | ||
``` | ||
## Installation | ||
Install `vaadin-login`: | ||
Install the component: | ||
```sh | ||
npm i @vaadin/login --save | ||
npm i @vaadin/login | ||
``` | ||
Once installed, import it in your application: | ||
Once installed, import the component in your application: | ||
```js | ||
import '@vaadin/login/vaadin-login-overlay.js'; | ||
import '@vaadin/login'; | ||
``` | ||
## Getting started | ||
## Themes | ||
Vaadin components use the Lumo theme by default. | ||
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/ds/customization/using-themes), Lumo and Material. | ||
The [main entrypoint](https://github.com/vaadin/web-components/blob/master/packages/list-box/vaadin-list-box.js) of the package uses Lumo theme. | ||
To use the Material theme, import the correspondent file from the `theme/material` folder. | ||
To use the Material theme, import the components from the `theme/material` folder: | ||
## Entry points | ||
```js | ||
import '@vaadin/login/theme/material/vaadin-login-overlay.js'; | ||
import '@vaadin/login/theme/material/vaadin-login-form.js'; | ||
``` | ||
- The component with the Lumo theme: | ||
You can also import the Lumo version of the components explicitly: | ||
`theme/lumo/vaadin-login-overlay.js` | ||
`theme/lumo/vaadin-login-form.js` | ||
```js | ||
import '@vaadin/login/theme/lumo/vaadin-login-overlay.js'; | ||
import '@vaadin/login/theme/lumo/vaadin-login-form.js'; | ||
``` | ||
- The component with the Material theme: | ||
Finally, you can import the un-themed components from the `src` folder to get a minimal starting point: | ||
`theme/material/vaadin-login-overlay.js` | ||
`theme/material/vaadin-login-form.js` | ||
```js | ||
import '@vaadin/login/src/vaadin-login-overlay.js'; | ||
import '@vaadin/login/src/vaadin-login-form.js'; | ||
``` | ||
- Aliases for lumo themed components: | ||
`vaadin-login-overlay.js` | ||
`vaadin-login-form.js` | ||
## Contributing | ||
@@ -73,2 +65,3 @@ | ||
Vaadin collects development time usage statistics to improve this product. For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics. | ||
Vaadin collects usage statistics at development time to improve this product. | ||
For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics. |
@@ -7,6 +7,6 @@ /** | ||
*/ | ||
import { PolymerElement, html } from '@polymer/polymer/polymer-element.js'; | ||
import '@vaadin/button/src/vaadin-button.js'; | ||
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js'; | ||
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js'; | ||
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
import '@vaadin/button/src/vaadin-button.js'; | ||
import { LoginMixin } from './vaadin-login-mixin.js'; | ||
@@ -13,0 +13,0 @@ |
@@ -7,8 +7,8 @@ /** | ||
*/ | ||
import { PolymerElement, html } from '@polymer/polymer/polymer-element.js'; | ||
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js'; | ||
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
import '@vaadin/text-field/src/vaadin-text-field.js'; | ||
import '@vaadin/password-field/src/vaadin-password-field.js'; | ||
import './vaadin-login-form-wrapper.js'; | ||
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js'; | ||
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js'; | ||
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
import { LoginMixin } from './vaadin-login-mixin.js'; | ||
@@ -15,0 +15,0 @@ |
@@ -6,2 +6,3 @@ /** | ||
*/ | ||
import { Constructor } from '@open-wc/dedupe-mixin'; | ||
@@ -27,9 +28,5 @@ export interface LoginI18n { | ||
declare function LoginMixin<T extends new (...args: any[]) => {}>(base: T): T & LoginMixinConstructor; | ||
export declare function LoginMixin<T extends Constructor<HTMLElement>>(base: T): T & Constructor<LoginMixinClass>; | ||
interface LoginMixinConstructor { | ||
new (...args: any[]): LoginMixin; | ||
} | ||
interface LoginMixin { | ||
export declare class LoginMixinClass { | ||
/** | ||
@@ -96,5 +93,3 @@ * If set, a synchronous POST call will be fired to the path defined. | ||
_retargetEvent(e: Event): void; | ||
protected _retargetEvent(e: Event): void; | ||
} | ||
export { LoginMixin, LoginMixinConstructor }; |
@@ -7,8 +7,8 @@ /** | ||
*/ | ||
import { PolymerElement, html } from '@polymer/polymer/polymer-element.js'; | ||
import './vaadin-login-form.js'; | ||
import './vaadin-login-overlay-wrapper.js'; | ||
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js'; | ||
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js'; | ||
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
import { LoginMixin } from './vaadin-login-mixin.js'; | ||
import './vaadin-login-form.js'; | ||
import './vaadin-login-overlay-wrapper.js'; | ||
@@ -15,0 +15,0 @@ /** |
@@ -1,3 +0,3 @@ | ||
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js'; | ||
import '@vaadin/vaadin-lumo-styles/spacing.js'; | ||
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
@@ -4,0 +4,0 @@ registerStyles( |
@@ -1,5 +0,5 @@ | ||
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js'; | ||
import '@vaadin/vaadin-lumo-styles/spacing.js'; | ||
import { color } from '@vaadin/vaadin-lumo-styles/color.js'; | ||
import '@vaadin/vaadin-lumo-styles/spacing.js'; | ||
import { typography } from '@vaadin/vaadin-lumo-styles/typography.js'; | ||
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
@@ -6,0 +6,0 @@ const loginFormWrapper = css` |
@@ -1,6 +0,6 @@ | ||
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js'; | ||
import '@vaadin/vaadin-lumo-styles/spacing.js'; | ||
import './vaadin-login-form-wrapper-styles.js'; | ||
import { color } from '@vaadin/vaadin-lumo-styles/color.js'; | ||
import '@vaadin/vaadin-lumo-styles/spacing.js'; | ||
import { typography } from '@vaadin/vaadin-lumo-styles/typography.js'; | ||
import './vaadin-login-form-wrapper-styles.js'; | ||
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
@@ -7,0 +7,0 @@ const loginOverlayWrapper = css` |
@@ -1,2 +0,2 @@ | ||
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js'; | ||
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
@@ -3,0 +3,0 @@ registerStyles( |
@@ -1,4 +0,4 @@ | ||
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js'; | ||
import '@vaadin/vaadin-material-styles/color.js'; | ||
import { typography } from '@vaadin/vaadin-material-styles/typography.js'; | ||
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
@@ -5,0 +5,0 @@ const loginFormWrapper = css` |
@@ -1,6 +0,6 @@ | ||
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js'; | ||
import { typography } from '@vaadin/vaadin-material-styles/typography.js'; | ||
import { overlay } from '@vaadin/vaadin-material-styles/mixins/overlay.js'; | ||
import '@vaadin/vaadin-material-styles/color.js'; | ||
import './vaadin-login-form-styles.js'; | ||
import { overlay } from '@vaadin/vaadin-material-styles/mixins/overlay.js'; | ||
import { typography } from '@vaadin/vaadin-material-styles/typography.js'; | ||
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
@@ -7,0 +7,0 @@ const loginOverlayWrapper = css` |
66008
-0.26%10
11.11%1596
-0.19%66
-9.59%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated