@vaadin/text-field 24.4.0-alpha2 → 24.4.0-alpha21
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/README.md +0 -1
- package/package.json +9 -9
- package/src/vaadin-lit-text-field.js +12 -12
- package/src/vaadin-text-field.js +0 -6
- package/theme/lumo/vaadin-lit-text-field.d.ts +7 -0
- package/theme/lumo/vaadin-text-field-styles.d.ts +6 -0
- package/theme/lumo/vaadin-text-field.d.ts +7 -0
- package/theme/material/vaadin-lit-text-field.d.ts +7 -0
- package/theme/material/vaadin-text-field-styles.d.ts +6 -0
- package/theme/material/vaadin-text-field.d.ts +7 -0
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,6 @@ A web component that allows the user to input and edit text.
|
|
|
5
5
|
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/text-field)
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@vaadin/text-field)
|
|
8
|
-
[](https://discord.gg/PHmkCKC)
|
|
9
8
|
|
|
10
9
|
```html
|
|
11
10
|
<vaadin-text-field label="Street Address"></vaadin-text-field>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/text-field",
|
|
3
|
-
"version": "24.4.0-
|
|
3
|
+
"version": "24.4.0-alpha21",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/a11y-base": "24.4.0-
|
|
40
|
-
"@vaadin/component-base": "24.4.0-
|
|
41
|
-
"@vaadin/field-base": "24.4.0-
|
|
42
|
-
"@vaadin/input-container": "24.4.0-
|
|
43
|
-
"@vaadin/vaadin-lumo-styles": "24.4.0-
|
|
44
|
-
"@vaadin/vaadin-material-styles": "24.4.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "24.4.0-
|
|
39
|
+
"@vaadin/a11y-base": "24.4.0-alpha21",
|
|
40
|
+
"@vaadin/component-base": "24.4.0-alpha21",
|
|
41
|
+
"@vaadin/field-base": "24.4.0-alpha21",
|
|
42
|
+
"@vaadin/input-container": "24.4.0-alpha21",
|
|
43
|
+
"@vaadin/vaadin-lumo-styles": "24.4.0-alpha21",
|
|
44
|
+
"@vaadin/vaadin-material-styles": "24.4.0-alpha21",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "24.4.0-alpha21",
|
|
46
46
|
"lit": "^3.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"web-types.json",
|
|
55
55
|
"web-types.lit.json"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "2efeeebbeabddfde14c845ee4098f9e62e352ffe"
|
|
58
58
|
}
|
|
@@ -4,7 +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 '@vaadin/input-container/src/vaadin-lit-input-container.js';
|
|
7
|
-
import {
|
|
7
|
+
import { html, LitElement } from 'lit';
|
|
8
8
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
9
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
10
10
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
@@ -18,7 +18,7 @@ import { TextFieldMixin } from './vaadin-text-field-mixin.js';
|
|
|
18
18
|
*
|
|
19
19
|
* ## Disclaimer
|
|
20
20
|
*
|
|
21
|
-
* This component is an experiment not
|
|
21
|
+
* This component is an experiment and not yet a part of Vaadin platform.
|
|
22
22
|
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
23
23
|
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
24
24
|
*/
|
|
@@ -28,14 +28,7 @@ export class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(Polylit
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
static get styles() {
|
|
31
|
-
return [
|
|
32
|
-
inputFieldShared,
|
|
33
|
-
css`
|
|
34
|
-
[part='input-field'] {
|
|
35
|
-
flex-grow: 0;
|
|
36
|
-
}
|
|
37
|
-
`,
|
|
38
|
-
];
|
|
31
|
+
return [inputFieldShared];
|
|
39
32
|
}
|
|
40
33
|
|
|
41
34
|
/** @protected */
|
|
@@ -56,8 +49,7 @@ export class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(Polylit
|
|
|
56
49
|
>
|
|
57
50
|
<slot name="prefix" slot="prefix"></slot>
|
|
58
51
|
<slot name="input"></slot>
|
|
59
|
-
|
|
60
|
-
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
52
|
+
${this._renderSuffix()}
|
|
61
53
|
</vaadin-input-container>
|
|
62
54
|
|
|
63
55
|
<div part="helper-text">
|
|
@@ -82,6 +74,14 @@ export class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(Polylit
|
|
|
82
74
|
this._tooltipController.setAriaTarget(this.inputElement);
|
|
83
75
|
this.addController(this._tooltipController);
|
|
84
76
|
}
|
|
77
|
+
|
|
78
|
+
/** @protected */
|
|
79
|
+
_renderSuffix() {
|
|
80
|
+
return html`
|
|
81
|
+
<slot name="suffix" slot="suffix"></slot>
|
|
82
|
+
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
83
|
+
`;
|
|
84
|
+
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
defineCustomElement(TextField);
|
package/src/vaadin-text-field.js
CHANGED
|
@@ -90,12 +90,6 @@ export class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(Polymer
|
|
|
90
90
|
|
|
91
91
|
static get template() {
|
|
92
92
|
return html`
|
|
93
|
-
<style>
|
|
94
|
-
[part='input-field'] {
|
|
95
|
-
flex-grow: 0;
|
|
96
|
-
}
|
|
97
|
-
</style>
|
|
98
|
-
|
|
99
93
|
<div class="vaadin-field-container">
|
|
100
94
|
<div part="label">
|
|
101
95
|
<slot name="label"></slot>
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED