@vaadin/text-field 25.0.0-alpha9 → 25.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 +11 -12
- package/src/vaadin-text-field.d.ts +16 -12
- package/src/vaadin-text-field.js +17 -13
- package/vaadin-text-field.js +1 -1
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
- package/theme/lumo/vaadin-text-field-styles.d.ts +0 -6
- package/theme/lumo/vaadin-text-field-styles.js +0 -12
- package/theme/lumo/vaadin-text-field.d.ts +0 -7
- package/theme/lumo/vaadin-text-field.js +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/text-field",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-beta1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"files": [
|
|
23
23
|
"src",
|
|
24
|
-
"theme",
|
|
25
24
|
"vaadin-*.d.ts",
|
|
26
25
|
"vaadin-*.js",
|
|
27
26
|
"web-types.json",
|
|
@@ -35,23 +34,23 @@
|
|
|
35
34
|
],
|
|
36
35
|
"dependencies": {
|
|
37
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
39
|
-
"@vaadin/component-base": "25.0.0-
|
|
40
|
-
"@vaadin/field-base": "25.0.0-
|
|
41
|
-
"@vaadin/input-container": "25.0.0-
|
|
42
|
-
"@vaadin/vaadin-
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha9",
|
|
37
|
+
"@vaadin/a11y-base": "25.0.0-beta1",
|
|
38
|
+
"@vaadin/component-base": "25.0.0-beta1",
|
|
39
|
+
"@vaadin/field-base": "25.0.0-beta1",
|
|
40
|
+
"@vaadin/input-container": "25.0.0-beta1",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-beta1",
|
|
44
42
|
"lit": "^3.0.0"
|
|
45
43
|
},
|
|
46
44
|
"devDependencies": {
|
|
47
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
48
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
45
|
+
"@vaadin/chai-plugins": "25.0.0-beta1",
|
|
46
|
+
"@vaadin/test-runner-commands": "25.0.0-beta1",
|
|
49
47
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
50
|
-
"
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-beta1",
|
|
49
|
+
"sinon": "^21.0.0"
|
|
51
50
|
},
|
|
52
51
|
"web-types": [
|
|
53
52
|
"web-types.json",
|
|
54
53
|
"web-types.lit.json"
|
|
55
54
|
],
|
|
56
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "1d20cf54e582d1f2e209126d4586f8b4c01c50e0"
|
|
57
56
|
}
|
|
@@ -76,6 +76,7 @@ export interface TextFieldEventMap extends HTMLElementEventMap, TextFieldCustomE
|
|
|
76
76
|
* ---------------------|----------------
|
|
77
77
|
* `label` | The label element
|
|
78
78
|
* `input-field` | The element that wraps prefix, value and suffix
|
|
79
|
+
* `field-button` | Set on the clear button
|
|
79
80
|
* `clear-button` | The clear button
|
|
80
81
|
* `error-message` | The error message element
|
|
81
82
|
* `helper-text` | The helper text element wrapper
|
|
@@ -83,18 +84,21 @@ export interface TextFieldEventMap extends HTMLElementEventMap, TextFieldCustomE
|
|
|
83
84
|
*
|
|
84
85
|
* The following state attributes are available for styling:
|
|
85
86
|
*
|
|
86
|
-
* Attribute
|
|
87
|
-
*
|
|
88
|
-
* `disabled`
|
|
89
|
-
* `has-value`
|
|
90
|
-
* `has-label`
|
|
91
|
-
* `has-helper`
|
|
92
|
-
* `has-error-message`
|
|
93
|
-
* `
|
|
94
|
-
* `
|
|
95
|
-
* `
|
|
96
|
-
* `
|
|
97
|
-
* `
|
|
87
|
+
* Attribute | Description
|
|
88
|
+
* ---------------------|---------------------------------
|
|
89
|
+
* `disabled` | Set when the element is disabled
|
|
90
|
+
* `has-value` | Set when the element has a value
|
|
91
|
+
* `has-label` | Set when the element has a label
|
|
92
|
+
* `has-helper` | Set when the element has helper text or slot
|
|
93
|
+
* `has-error-message` | Set when the element has an error message
|
|
94
|
+
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
95
|
+
* `invalid` | Set when the element is invalid
|
|
96
|
+
* `input-prevented` | Temporarily set when invalid input is prevented
|
|
97
|
+
* `focused` | Set when the element is focused
|
|
98
|
+
* `focus-ring` | Set when the element is keyboard focused
|
|
99
|
+
* `readonly` | Set when the element is readonly
|
|
100
|
+
*
|
|
101
|
+
* Note, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.
|
|
98
102
|
*
|
|
99
103
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
100
104
|
*
|
package/src/vaadin-text-field.js
CHANGED
|
@@ -50,6 +50,7 @@ import { TextFieldMixin } from './vaadin-text-field-mixin.js';
|
|
|
50
50
|
* ---------------------|----------------
|
|
51
51
|
* `label` | The label element
|
|
52
52
|
* `input-field` | The element that wraps prefix, value and suffix
|
|
53
|
+
* `field-button` | Set on the clear button
|
|
53
54
|
* `clear-button` | The clear button
|
|
54
55
|
* `error-message` | The error message element
|
|
55
56
|
* `helper-text` | The helper text element wrapper
|
|
@@ -57,18 +58,21 @@ import { TextFieldMixin } from './vaadin-text-field-mixin.js';
|
|
|
57
58
|
*
|
|
58
59
|
* The following state attributes are available for styling:
|
|
59
60
|
*
|
|
60
|
-
* Attribute
|
|
61
|
-
*
|
|
62
|
-
* `disabled`
|
|
63
|
-
* `has-value`
|
|
64
|
-
* `has-label`
|
|
65
|
-
* `has-helper`
|
|
66
|
-
* `has-error-message`
|
|
67
|
-
* `
|
|
68
|
-
* `
|
|
69
|
-
* `
|
|
70
|
-
* `
|
|
71
|
-
* `
|
|
61
|
+
* Attribute | Description
|
|
62
|
+
* ---------------------|---------------------------------
|
|
63
|
+
* `disabled` | Set when the element is disabled
|
|
64
|
+
* `has-value` | Set when the element has a value
|
|
65
|
+
* `has-label` | Set when the element has a label
|
|
66
|
+
* `has-helper` | Set when the element has helper text or slot
|
|
67
|
+
* `has-error-message` | Set when the element has an error message
|
|
68
|
+
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
69
|
+
* `invalid` | Set when the element is invalid
|
|
70
|
+
* `input-prevented` | Temporarily set when invalid input is prevented
|
|
71
|
+
* `focused` | Set when the element is focused
|
|
72
|
+
* `focus-ring` | Set when the element is keyboard focused
|
|
73
|
+
* `readonly` | Set when the element is readonly
|
|
74
|
+
*
|
|
75
|
+
* Note, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.
|
|
72
76
|
*
|
|
73
77
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
74
78
|
*
|
|
@@ -142,7 +146,7 @@ export class TextField extends TextFieldMixin(
|
|
|
142
146
|
_renderSuffix() {
|
|
143
147
|
return html`
|
|
144
148
|
<slot name="suffix" slot="suffix"></slot>
|
|
145
|
-
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
149
|
+
<div id="clearButton" part="field-button clear-button" slot="suffix" aria-hidden="true"></div>
|
|
146
150
|
`;
|
|
147
151
|
}
|
|
148
152
|
}
|
package/vaadin-text-field.js
CHANGED
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/text-field",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-beta1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-text-field",
|
|
11
|
-
"description": "`<vaadin-text-field>` is a web component that allows the user to input and edit text.\n\n```html\n<vaadin-text-field label=\"First Name\"></vaadin-text-field>\n```\n\n### Prefixes and suffixes\n\nThese are child elements of a `<vaadin-text-field>` that are displayed\ninline with the input, before or after.\nIn order for an element to be considered as a prefix, it must have the slot\nattribute set to `prefix` (and similarly for `suffix`).\n\n```html\n<vaadin-text-field label=\"Email address\">\n <div slot=\"prefix\">Sent to:</div>\n <div slot=\"suffix\">@vaadin.com</div>\n</vaadin-text-field>\n```\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute
|
|
11
|
+
"description": "`<vaadin-text-field>` is a web component that allows the user to input and edit text.\n\n```html\n<vaadin-text-field label=\"First Name\"></vaadin-text-field>\n```\n\n### Prefixes and suffixes\n\nThese are child elements of a `<vaadin-text-field>` that are displayed\ninline with the input, before or after.\nIn order for an element to be considered as a prefix, it must have the slot\nattribute set to `prefix` (and similarly for `suffix`).\n\n```html\n<vaadin-text-field label=\"Email address\">\n <div slot=\"prefix\">Sent to:</div>\n <div slot=\"suffix\">@vaadin.com</div>\n</vaadin-text-field>\n```\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\n`field-button` | Set on the clear button\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`input-prevented` | Temporarily set when invalid input is prevented\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n\nNote, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "disabled",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/text-field",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-beta1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-text-field",
|
|
19
|
-
"description": "`<vaadin-text-field>` is a web component that allows the user to input and edit text.\n\n```html\n<vaadin-text-field label=\"First Name\"></vaadin-text-field>\n```\n\n### Prefixes and suffixes\n\nThese are child elements of a `<vaadin-text-field>` that are displayed\ninline with the input, before or after.\nIn order for an element to be considered as a prefix, it must have the slot\nattribute set to `prefix` (and similarly for `suffix`).\n\n```html\n<vaadin-text-field label=\"Email address\">\n <div slot=\"prefix\">Sent to:</div>\n <div slot=\"suffix\">@vaadin.com</div>\n</vaadin-text-field>\n```\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute
|
|
19
|
+
"description": "`<vaadin-text-field>` is a web component that allows the user to input and edit text.\n\n```html\n<vaadin-text-field label=\"First Name\"></vaadin-text-field>\n```\n\n### Prefixes and suffixes\n\nThese are child elements of a `<vaadin-text-field>` that are displayed\ninline with the input, before or after.\nIn order for an element to be considered as a prefix, it must have the slot\nattribute set to `prefix` (and similarly for `suffix`).\n\n```html\n<vaadin-text-field label=\"Email address\">\n <div slot=\"prefix\">Sent to:</div>\n <div slot=\"suffix\">@vaadin.com</div>\n</vaadin-text-field>\n```\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\n`field-button` | Set on the clear button\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`input-prevented` | Temporarily set when invalid input is prevented\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n\nNote, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';
|
|
7
|
-
import { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';
|
|
8
|
-
import { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
9
|
-
|
|
10
|
-
registerStyles('vaadin-text-field', inputFieldShared, {
|
|
11
|
-
moduleId: 'lumo-text-field-styles',
|
|
12
|
-
});
|