@vaadin/text-field 25.0.0-alpha2 → 25.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/text-field",
3
- "version": "25.0.0-alpha2",
3
+ "version": "25.0.0-alpha21",
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-alpha2",
39
- "@vaadin/component-base": "25.0.0-alpha2",
40
- "@vaadin/field-base": "25.0.0-alpha2",
41
- "@vaadin/input-container": "25.0.0-alpha2",
42
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha2",
43
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha2",
37
+ "@vaadin/a11y-base": "25.0.0-alpha21",
38
+ "@vaadin/component-base": "25.0.0-alpha21",
39
+ "@vaadin/field-base": "25.0.0-alpha21",
40
+ "@vaadin/input-container": "25.0.0-alpha21",
41
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha21",
44
42
  "lit": "^3.0.0"
45
43
  },
46
44
  "devDependencies": {
47
- "@vaadin/chai-plugins": "25.0.0-alpha2",
48
- "@vaadin/test-runner-commands": "25.0.0-alpha2",
45
+ "@vaadin/chai-plugins": "25.0.0-alpha21",
46
+ "@vaadin/test-runner-commands": "25.0.0-alpha21",
49
47
  "@vaadin/testing-helpers": "^2.0.0",
50
- "sinon": "^18.0.0"
48
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha21",
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": "67ffcd5355cf21ce1b5039c598525109fc4c164b"
55
+ "gitHead": "8fb9e9710c01449edf623a1aaac4655cdc11a933"
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 | Description | Part name
87
- * --------------------|-------------|------------
88
- * `disabled` | Set to a disabled text field | :host
89
- * `has-value` | Set when the element has a value | :host
90
- * `has-label` | Set when the element has a label | :host
91
- * `has-helper` | Set when the element has helper text or slot | :host
92
- * `has-error-message` | Set when the element has an error message | :host
93
- * `invalid` | Set when the element is invalid | :host
94
- * `input-prevented` | Temporarily set when invalid input is prevented | :host
95
- * `focused` | Set when the element is focused | :host
96
- * `focus-ring` | Set when the element is keyboard focused | :host
97
- * `readonly` | Set to a readonly text field | :host
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
  *
@@ -11,6 +11,7 @@ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
11
11
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
12
12
  import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
13
13
  import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
14
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
14
15
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
15
16
  import { TextFieldMixin } from './vaadin-text-field-mixin.js';
16
17
 
@@ -49,6 +50,7 @@ import { TextFieldMixin } from './vaadin-text-field-mixin.js';
49
50
  * ---------------------|----------------
50
51
  * `label` | The label element
51
52
  * `input-field` | The element that wraps prefix, value and suffix
53
+ * `field-button` | Set on the clear button
52
54
  * `clear-button` | The clear button
53
55
  * `error-message` | The error message element
54
56
  * `helper-text` | The helper text element wrapper
@@ -56,18 +58,21 @@ import { TextFieldMixin } from './vaadin-text-field-mixin.js';
56
58
  *
57
59
  * The following state attributes are available for styling:
58
60
  *
59
- * Attribute | Description | Part name
60
- * --------------------|-------------|------------
61
- * `disabled` | Set to a disabled text field | :host
62
- * `has-value` | Set when the element has a value | :host
63
- * `has-label` | Set when the element has a label | :host
64
- * `has-helper` | Set when the element has helper text or slot | :host
65
- * `has-error-message` | Set when the element has an error message | :host
66
- * `invalid` | Set when the element is invalid | :host
67
- * `input-prevented` | Temporarily set when invalid input is prevented | :host
68
- * `focused` | Set when the element is focused | :host
69
- * `focus-ring` | Set when the element is keyboard focused | :host
70
- * `readonly` | Set to a readonly text field | :host
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.
71
76
  *
72
77
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
73
78
  *
@@ -83,7 +88,9 @@ import { TextFieldMixin } from './vaadin-text-field-mixin.js';
83
88
  * @mixes ThemableMixin
84
89
  * @mixes TextFieldMixin
85
90
  */
86
- export class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
91
+ export class TextField extends TextFieldMixin(
92
+ ThemableMixin(ElementMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
93
+ ) {
87
94
  static get is() {
88
95
  return 'vaadin-text-field';
89
96
  }
@@ -139,7 +146,7 @@ export class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(Polylit
139
146
  _renderSuffix() {
140
147
  return html`
141
148
  <slot name="suffix" slot="suffix"></slot>
142
- <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>
143
150
  `;
144
151
  }
145
152
  }
@@ -1,3 +1,3 @@
1
- import './theme/lumo/vaadin-text-field.js';
1
+ import './src/vaadin-text-field.js';
2
2
 
3
3
  export * from './src/vaadin-text-field.js';
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-alpha2",
4
+ "version": "25.0.0-alpha21",
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 | Description | Part name\n--------------------|-------------|------------\n`disabled` | Set to a disabled text field | :host\n`has-value` | Set when the element has a value | :host\n`has-label` | Set when the element has a label | :host\n`has-helper` | Set when the element has helper text or slot | :host\n`has-error-message` | Set when the element has an error message | :host\n`invalid` | Set when the element is invalid | :host\n`input-prevented` | Temporarily set when invalid input is prevented | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set to a readonly text field | :host\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
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",
@@ -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-alpha2",
4
+ "version": "25.0.0-alpha21",
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 | Description | Part name\n--------------------|-------------|------------\n`disabled` | Set to a disabled text field | :host\n`has-value` | Set when the element has a value | :host\n`has-label` | Set when the element has a label | :host\n`has-helper` | Set when the element has helper text or slot | :host\n`has-error-message` | Set when the element has an error message | :host\n`invalid` | Set when the element is invalid | :host\n`input-prevented` | Temporarily set when invalid input is prevented | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set to a readonly text field | :host\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
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,6 +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';
@@ -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
- });
@@ -1,7 +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-text-field-styles.js';
7
- import '../../src/vaadin-text-field.js';
@@ -1,7 +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-text-field-styles.js';
7
- import '../../src/vaadin-text-field.js';