-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: move text-field to new base class (#2620)
- Loading branch information
1 parent
ca5a236
commit 2e2ff00
Showing
106 changed files
with
395 additions
and
3,456 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,54 @@ | ||
# @vaadin/text-field | ||
|
||
> ⚠️ Work in progress, please do not use this component yet. | ||
A web component that allows the user to input and edit text. | ||
|
||
The new version of `vaadin-text-field` component using slotted `<input>`. | ||
[Live Demo ↗](https://vaadin.com/docs/latest/ds/components/text-field) | ||
|
||
```html | ||
<vaadin-text-field label="Street Address"></vaadin-text-field> | ||
``` | ||
|
||
## Installation | ||
|
||
Install the component: | ||
|
||
```sh | ||
npm i @vaadin/text-field --save | ||
``` | ||
|
||
Once installed, import the component in your application: | ||
|
||
```js | ||
import '@vaadin/text-field'; | ||
``` | ||
|
||
## Themes | ||
|
||
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/text-field/vaadin-text-field.js) | ||
of the package uses Lumo theme. | ||
|
||
To use the Material theme, import the component from the `theme/material` folder: | ||
|
||
```js | ||
import '@vaadin/text-field/theme/material/vaadin-text-field.js'; | ||
``` | ||
|
||
You can also import the Lumo version of the component explicitly: | ||
|
||
```js | ||
import '@vaadin/text-field/theme/lumo/vaadin-text-field.js'; | ||
``` | ||
|
||
Finally, you can import the un-themed component from the `src` folder to get a minimal starting point: | ||
|
||
```js | ||
import '@vaadin/text-field/src/vaadin-text-field.js'; | ||
``` | ||
|
||
## License | ||
|
||
Apache License 2.0 | ||
|
||
Vaadin collects development time usage statistics to improve this product. | ||
For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js'; | ||
|
||
/* hide caret */ | ||
registerStyles( | ||
'vaadin-text-field', | ||
css` | ||
:host([focus-ring]) ::slotted(input) { | ||
caret-color: transparent; | ||
} | ||
` | ||
); |
Binary file added
BIN
+690 Bytes
...ages/text-field/test/visual/lumo/screenshots/text-field/baseline/focus-ring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.