@vaadin/text-area 24.7.0-alpha2 → 24.7.0-alpha4
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 -11
- package/src/vaadin-lit-text-area.d.ts +1 -1
- package/src/vaadin-lit-text-area.js +1 -1
- package/src/vaadin-text-area-mixin.d.ts +2 -2
- package/src/vaadin-text-area-mixin.js +5 -5
- package/src/vaadin-text-area-styles.d.ts +1 -1
- package/src/vaadin-text-area-styles.js +1 -1
- package/src/vaadin-text-area.d.ts +1 -1
- package/src/vaadin-text-area.js +1 -1
- package/theme/lumo/vaadin-text-area-styles.d.ts +1 -1
- package/theme/lumo/vaadin-text-area-styles.js +5 -2
- package/theme/lumo/vaadin-text-area.d.ts +1 -1
- package/theme/lumo/vaadin-text-area.js +1 -1
- package/theme/material/vaadin-text-area-styles.d.ts +1 -1
- package/theme/material/vaadin-text-area-styles.js +2 -1
- package/theme/material/vaadin-text-area.d.ts +1 -1
- package/theme/material/vaadin-text-area.js +1 -1
- package/web-types.json +4 -4
- package/web-types.lit.json +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/text-area",
|
|
3
|
-
"version": "24.7.0-
|
|
3
|
+
"version": "24.7.0-alpha4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/a11y-base": "24.7.0-
|
|
40
|
-
"@vaadin/component-base": "24.7.0-
|
|
41
|
-
"@vaadin/field-base": "24.7.0-
|
|
42
|
-
"@vaadin/input-container": "24.7.0-
|
|
43
|
-
"@vaadin/vaadin-lumo-styles": "24.7.0-
|
|
44
|
-
"@vaadin/vaadin-material-styles": "24.7.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "24.7.0-
|
|
39
|
+
"@vaadin/a11y-base": "24.7.0-alpha4",
|
|
40
|
+
"@vaadin/component-base": "24.7.0-alpha4",
|
|
41
|
+
"@vaadin/field-base": "24.7.0-alpha4",
|
|
42
|
+
"@vaadin/input-container": "24.7.0-alpha4",
|
|
43
|
+
"@vaadin/vaadin-lumo-styles": "24.7.0-alpha4",
|
|
44
|
+
"@vaadin/vaadin-material-styles": "24.7.0-alpha4",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "24.7.0-alpha4",
|
|
46
46
|
"lit": "^3.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@vaadin/chai-plugins": "24.7.0-
|
|
50
|
-
"@vaadin/testing-helpers": "^1.
|
|
49
|
+
"@vaadin/chai-plugins": "24.7.0-alpha4",
|
|
50
|
+
"@vaadin/testing-helpers": "^1.1.0",
|
|
51
51
|
"sinon": "^18.0.0"
|
|
52
52
|
},
|
|
53
53
|
"web-types": [
|
|
54
54
|
"web-types.json",
|
|
55
55
|
"web-types.lit.json"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "d7165cebf9dcf6a7e9e22f6353662d33404b4856"
|
|
58
58
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
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';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
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
|
|
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 -
|
|
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
|
|
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
|
*
|
|
@@ -219,7 +219,7 @@ export const TextAreaMixin = (superClass) =>
|
|
|
219
219
|
// Do not override this on custom slotted textarea as number of rows may
|
|
220
220
|
// have been configured there.
|
|
221
221
|
if (this.inputElement === this.__textAreaController.defaultNode) {
|
|
222
|
-
this.inputElement.rows = Math.max(minRows,
|
|
222
|
+
this.inputElement.rows = Math.max(minRows, 1);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
|
|
@@ -257,8 +257,8 @@ export const TextAreaMixin = (superClass) =>
|
|
|
257
257
|
* @private
|
|
258
258
|
*/
|
|
259
259
|
__minRowsChanged(minRows) {
|
|
260
|
-
if (minRows <
|
|
261
|
-
console.warn('<vaadin-text-area> minRows must be at least
|
|
260
|
+
if (minRows < 1) {
|
|
261
|
+
console.warn('<vaadin-text-area> minRows must be at least 1.');
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
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';
|
package/src/vaadin-text-area.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
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';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
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 -
|
|
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 -
|
|
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 -
|
|
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
|
|
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.7.0-
|
|
4
|
+
"version": "24.7.0-alpha4",
|
|
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.7.0-
|
|
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-alpha4/#/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
|
|
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
|
|
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",
|
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-area",
|
|
4
|
-
"version": "24.7.0-
|
|
4
|
+
"version": "24.7.0-alpha4",
|
|
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.7.0-
|
|
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-alpha4/#/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
|
|
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
|
}
|