@vaadin/text-area 24.6.5 → 24.7.0-alpha10

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-area",
3
- "version": "24.6.5",
3
+ "version": "24.7.0-alpha10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,18 +36,18 @@
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/a11y-base": "~24.6.5",
40
- "@vaadin/component-base": "~24.6.5",
41
- "@vaadin/field-base": "~24.6.5",
42
- "@vaadin/input-container": "~24.6.5",
43
- "@vaadin/vaadin-lumo-styles": "~24.6.5",
44
- "@vaadin/vaadin-material-styles": "~24.6.5",
45
- "@vaadin/vaadin-themable-mixin": "~24.6.5",
39
+ "@vaadin/a11y-base": "24.7.0-alpha10",
40
+ "@vaadin/component-base": "24.7.0-alpha10",
41
+ "@vaadin/field-base": "24.7.0-alpha10",
42
+ "@vaadin/input-container": "24.7.0-alpha10",
43
+ "@vaadin/vaadin-lumo-styles": "24.7.0-alpha10",
44
+ "@vaadin/vaadin-material-styles": "24.7.0-alpha10",
45
+ "@vaadin/vaadin-themable-mixin": "24.7.0-alpha10",
46
46
  "lit": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@vaadin/chai-plugins": "~24.6.5",
50
- "@vaadin/test-runner-commands": "~24.6.5",
49
+ "@vaadin/chai-plugins": "24.7.0-alpha10",
50
+ "@vaadin/test-runner-commands": "24.7.0-alpha10",
51
51
  "@vaadin/testing-helpers": "^1.1.0",
52
52
  "sinon": "^18.0.0"
53
53
  },
@@ -55,5 +55,5 @@
55
55
  "web-types.json",
56
56
  "web-types.lit.json"
57
57
  ],
58
- "gitHead": "fc109a4234a1f60e89717ab1c0dc8fb4451aa418"
58
+ "gitHead": "c0f8933df2a6a40648d3fb9cfbae6bbf86a8aa90"
59
59
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  export * from './vaadin-text-area.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
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';
@@ -39,7 +39,7 @@ export class TextArea extends TextAreaMixin(ThemableMixin(ElementMixin(PolylitMi
39
39
  <div class="vaadin-text-area-container">
40
40
  <div part="label">
41
41
  <slot name="label"></slot>
42
- <span part="required-indicator" aria-hidden="true"></span>
42
+ <span part="required-indicator" aria-hidden="true" @click="${this.focus}"></span>
43
43
  </div>
44
44
 
45
45
  <vaadin-input-container
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
@@ -63,7 +63,7 @@ export declare class TextAreaMixinClass {
63
63
  pattern: string;
64
64
 
65
65
  /**
66
- * Minimum number of rows to show. Default is two rows, which is also the minimum value.
66
+ * Minimum number of rows to show. Default is two rows.
67
67
  *
68
68
  * When using a custom slotted textarea, the minimum number of rows are not applied for backwards compatibility.
69
69
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
@@ -42,7 +42,7 @@ export const TextAreaMixin = (superClass) =>
42
42
  },
43
43
 
44
44
  /**
45
- * Minimum number of rows to show. Default is two rows, which is also the minimum value.
45
+ * Minimum number of rows to show. Default is two rows.
46
46
  *
47
47
  * When using a custom slotted textarea, the minimum number of rows are not applied for backwards compatibility.
48
48
  *
@@ -113,8 +113,6 @@ export const TextAreaMixin = (superClass) =>
113
113
  this.addController(this.__textAreaController);
114
114
  this.addController(new LabelledInputController(this.inputElement, this._labelController));
115
115
 
116
- this.addEventListener('animationend', this._onAnimationEnd);
117
-
118
116
  this._inputField = this.shadowRoot.querySelector('[part=input-field]');
119
117
 
120
118
  // Wheel scrolling results in async scroll events. Preventing the wheel
@@ -140,13 +138,6 @@ export const TextAreaMixin = (superClass) =>
140
138
  this._inputField.style.setProperty('--_text-area-vertical-scroll-position', `${this._inputField.scrollTop}px`);
141
139
  }
142
140
 
143
- /** @private */
144
- _onAnimationEnd(e) {
145
- if (e.animationName.indexOf('vaadin-text-area-appear') === 0) {
146
- this._updateHeight();
147
- }
148
- }
149
-
150
141
  /**
151
142
  * @param {unknown} newVal
152
143
  * @param {unknown} oldVal
@@ -219,7 +210,7 @@ export const TextAreaMixin = (superClass) =>
219
210
  // Do not override this on custom slotted textarea as number of rows may
220
211
  // have been configured there.
221
212
  if (this.inputElement === this.__textAreaController.defaultNode) {
222
- this.inputElement.rows = Math.max(minRows, 2);
213
+ this.inputElement.rows = Math.max(minRows, 1);
223
214
  }
224
215
  }
225
216
 
@@ -257,8 +248,8 @@ export const TextAreaMixin = (superClass) =>
257
248
  * @private
258
249
  */
259
250
  __minRowsChanged(minRows) {
260
- if (minRows < 2) {
261
- console.warn('<vaadin-text-area> minRows must be at least 2.');
251
+ if (minRows < 1) {
252
+ console.warn('<vaadin-text-area> minRows must be at least 1.');
262
253
  }
263
254
  }
264
255
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { CSSResult } from 'lit';
@@ -1,15 +1,11 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { css } from 'lit';
7
7
 
8
8
  export const textAreaStyles = css`
9
- :host {
10
- animation: 1ms vaadin-text-area-appear;
11
- }
12
-
13
9
  .vaadin-text-area-container {
14
10
  flex: auto;
15
11
  }
@@ -65,10 +61,4 @@ export const textAreaStyles = css`
65
61
  :host([disabled]) ::slotted(textarea) {
66
62
  user-select: none;
67
63
  }
68
-
69
- @keyframes vaadin-text-area-appear {
70
- to {
71
- opacity: 1;
72
- }
73
- }
74
64
  `;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
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-input-container.js';
@@ -71,7 +71,7 @@ export class TextArea extends TextAreaMixin(ThemableMixin(ElementMixin(PolymerEl
71
71
  <div class="vaadin-text-area-container">
72
72
  <div part="label">
73
73
  <slot name="label"></slot>
74
- <span part="required-indicator" aria-hidden="true"></span>
74
+ <span part="required-indicator" aria-hidden="true" on-click="focus"></span>
75
75
  </div>
76
76
 
77
77
  <vaadin-input-container
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2025 Vaadin Ltd.
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/theme/lumo/vaadin-input-container-styles.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2025 Vaadin Ltd.
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/theme/lumo/vaadin-input-container-styles.js';
@@ -15,6 +15,7 @@ const textArea = css`
15
15
  [part='input-field'] ::slotted(textarea) {
16
16
  height: auto;
17
17
  box-sizing: border-box;
18
+ min-height: 0;
18
19
  }
19
20
 
20
21
  [part='input-field'] {
@@ -64,11 +65,13 @@ const textArea = css`
64
65
  align-self: flex-start;
65
66
  }
66
67
 
67
- /* Vertically align icon prefix/suffix/clear button with the first line of text */
68
68
  [part='input-field'] ::slotted(vaadin-icon[slot$='fix']),
69
69
  [part='clear-button'] {
70
+ /* Vertically align icon prefix/suffix/clear button with the first line of text */
70
71
  top: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2);
71
72
  margin-top: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2);
73
+ /* Reduce effective height to match line height of native textarea, so icons don't increase component size when using single row */
74
+ margin-bottom: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2);
72
75
  }
73
76
  `;
74
77
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-text-area-styles.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-text-area-styles.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2025 Vaadin Ltd.
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/theme/material/vaadin-input-container-styles.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2025 Vaadin Ltd.
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/theme/material/vaadin-input-container-styles.js';
@@ -15,6 +15,7 @@ const textArea = css`
15
15
 
16
16
  [part='input-field'] ::slotted(textarea) {
17
17
  padding-top: 0;
18
+ padding-bottom: 4px;
18
19
  margin-top: 4px;
19
20
  }
20
21
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-text-area-styles.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-text-area-styles.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-area",
4
- "version": "24.6.5",
4
+ "version": "24.7.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-text-area",
11
- "description": "`<vaadin-text-area>` is a web component for multi-line text input.\n\n```html\n<vaadin-text-area label=\"Comment\"></vaadin-text-area>\n```\n\n### Prefixes and suffixes\n\nThese are child elements of a `<vaadin-text-area>` 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-area label=\"Description\">\n <div slot=\"prefix\">Details:</div>\n <div slot=\"suffix\">The end!</div>\n</vaadin-text-area>\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\n`<vaadin-text-area>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.6.5/#/elements/vaadin-text-field) for the styling documentation.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
11
+ "description": "`<vaadin-text-area>` is a web component for multi-line text input.\n\n```html\n<vaadin-text-area label=\"Comment\"></vaadin-text-area>\n```\n\n### Prefixes and suffixes\n\nThese are child elements of a `<vaadin-text-area>` 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-area label=\"Description\">\n <div slot=\"prefix\">Details:</div>\n <div slot=\"suffix\">The end!</div>\n</vaadin-text-area>\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\n`<vaadin-text-area>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/elements/vaadin-text-field) for the styling documentation.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "disabled",
@@ -276,7 +276,7 @@
276
276
  },
277
277
  {
278
278
  "name": "min-rows",
279
- "description": "Minimum number of rows to show. Default is two rows, which is also the minimum value.\n\nWhen using a custom slotted textarea, the minimum number of rows are not applied for backwards compatibility.",
279
+ "description": "Minimum number of rows to show. Default is two rows.\n\nWhen using a custom slotted textarea, the minimum number of rows are not applied for backwards compatibility.",
280
280
  "value": {
281
281
  "type": [
282
282
  "number",
@@ -576,7 +576,7 @@
576
576
  },
577
577
  {
578
578
  "name": "minRows",
579
- "description": "Minimum number of rows to show. Default is two rows, which is also the minimum value.\n\nWhen using a custom slotted textarea, the minimum number of rows are not applied for backwards compatibility.",
579
+ "description": "Minimum number of rows to show. Default is two rows.\n\nWhen using a custom slotted textarea, the minimum number of rows are not applied for backwards compatibility.",
580
580
  "value": {
581
581
  "type": [
582
582
  "number",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/text-area",
4
- "version": "24.6.5",
4
+ "version": "24.7.0-alpha10",
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-area",
19
- "description": "`<vaadin-text-area>` is a web component for multi-line text input.\n\n```html\n<vaadin-text-area label=\"Comment\"></vaadin-text-area>\n```\n\n### Prefixes and suffixes\n\nThese are child elements of a `<vaadin-text-area>` 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-area label=\"Description\">\n <div slot=\"prefix\">Details:</div>\n <div slot=\"suffix\">The end!</div>\n</vaadin-text-area>\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\n`<vaadin-text-area>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.6.5/#/elements/vaadin-text-field) for the styling documentation.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
19
+ "description": "`<vaadin-text-area>` is a web component for multi-line text input.\n\n```html\n<vaadin-text-area label=\"Comment\"></vaadin-text-area>\n```\n\n### Prefixes and suffixes\n\nThese are child elements of a `<vaadin-text-area>` 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-area label=\"Description\">\n <div slot=\"prefix\">Details:</div>\n <div slot=\"suffix\">The end!</div>\n</vaadin-text-area>\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\n`<vaadin-text-area>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/elements/vaadin-text-field) for the styling documentation.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
@@ -189,7 +189,7 @@
189
189
  },
190
190
  {
191
191
  "name": ".minRows",
192
- "description": "Minimum number of rows to show. Default is two rows, which is also the minimum value.\n\nWhen using a custom slotted textarea, the minimum number of rows are not applied for backwards compatibility.",
192
+ "description": "Minimum number of rows to show. Default is two rows.\n\nWhen using a custom slotted textarea, the minimum number of rows are not applied for backwards compatibility.",
193
193
  "value": {
194
194
  "kind": "expression"
195
195
  }