@vaadin/text-area 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 -14
- package/src/styles/vaadin-text-area-base-styles.js +2 -2
- package/src/vaadin-text-area.d.ts +27 -2
- package/src/vaadin-text-area.js +31 -4
- package/vaadin-text-area.js +1 -1
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
- package/src/styles/vaadin-text-area-core-styles.d.ts +0 -8
- package/src/styles/vaadin-text-area-core-styles.js +0 -62
- package/theme/lumo/vaadin-text-area-styles.d.ts +0 -9
- package/theme/lumo/vaadin-text-area-styles.js +0 -80
- package/theme/lumo/vaadin-text-area.d.ts +0 -7
- package/theme/lumo/vaadin-text-area.js +0 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/text-area",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-beta1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,9 +21,6 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"files": [
|
|
23
23
|
"src",
|
|
24
|
-
"!src/styles/*-base-styles.d.ts",
|
|
25
|
-
"!src/styles/*-base-styles.js",
|
|
26
|
-
"theme",
|
|
27
24
|
"vaadin-*.d.ts",
|
|
28
25
|
"vaadin-*.js",
|
|
29
26
|
"web-types.json",
|
|
@@ -37,23 +34,23 @@
|
|
|
37
34
|
],
|
|
38
35
|
"dependencies": {
|
|
39
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
41
|
-
"@vaadin/component-base": "25.0.0-
|
|
42
|
-
"@vaadin/field-base": "25.0.0-
|
|
43
|
-
"@vaadin/input-container": "25.0.0-
|
|
44
|
-
"@vaadin/vaadin-
|
|
45
|
-
"@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",
|
|
46
42
|
"lit": "^3.0.0"
|
|
47
43
|
},
|
|
48
44
|
"devDependencies": {
|
|
49
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
50
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
45
|
+
"@vaadin/chai-plugins": "25.0.0-beta1",
|
|
46
|
+
"@vaadin/test-runner-commands": "25.0.0-beta1",
|
|
51
47
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
52
|
-
"
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-beta1",
|
|
49
|
+
"sinon": "^21.0.0"
|
|
53
50
|
},
|
|
54
51
|
"web-types": [
|
|
55
52
|
"web-types.json",
|
|
56
53
|
"web-types.lit.json"
|
|
57
54
|
],
|
|
58
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "1d20cf54e582d1f2e209126d4586f8b4c01c50e0"
|
|
59
56
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
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
|
-
import '@vaadin/component-base/src/style-props.js';
|
|
6
|
+
import '@vaadin/component-base/src/styles/style-props.js';
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
|
|
9
9
|
export const textAreaStyles = css`
|
|
@@ -18,7 +18,7 @@ export const textAreaStyles = css`
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
[part='input-field'] ::slotted(:not(textarea)),
|
|
21
|
-
[part
|
|
21
|
+
[part~='clear-button'] {
|
|
22
22
|
align-self: flex-start;
|
|
23
23
|
position: sticky;
|
|
24
24
|
top: 0;
|
|
@@ -72,8 +72,33 @@ export interface TextAreaEventMap extends HTMLElementEventMap, TextAreaCustomEve
|
|
|
72
72
|
*
|
|
73
73
|
* The following shadow DOM parts are available for styling:
|
|
74
74
|
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
75
|
+
* Part name | Description
|
|
76
|
+
* ---------------------|----------------
|
|
77
|
+
* `label` | The label element
|
|
78
|
+
* `input-field` | The element that wraps prefix, value and suffix
|
|
79
|
+
* `field-button` | Set on the clear button
|
|
80
|
+
* `clear-button` | The clear button
|
|
81
|
+
* `error-message` | The error message element
|
|
82
|
+
* `helper-text` | The helper text element wrapper
|
|
83
|
+
* `required-indicator` | The `required` state indicator element
|
|
84
|
+
*
|
|
85
|
+
* The following state attributes are available for styling:
|
|
86
|
+
*
|
|
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.
|
|
77
102
|
*
|
|
78
103
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
79
104
|
*
|
package/src/vaadin-text-area.js
CHANGED
|
@@ -13,7 +13,7 @@ import { TooltipController } from '@vaadin/component-base/src/tooltip-controller
|
|
|
13
13
|
import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
|
|
14
14
|
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
15
15
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
16
|
-
import { textAreaStyles } from './styles/vaadin-text-area-
|
|
16
|
+
import { textAreaStyles } from './styles/vaadin-text-area-base-styles.js';
|
|
17
17
|
import { TextAreaMixin } from './vaadin-text-area-mixin.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -45,8 +45,35 @@ import { TextAreaMixin } from './vaadin-text-area-mixin.js';
|
|
|
45
45
|
* -------------------------------|----------------------------|---------
|
|
46
46
|
* `--vaadin-field-default-width` | Default width of the field | `12em`
|
|
47
47
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
48
|
+
* The following shadow DOM parts are available for styling:
|
|
49
|
+
*
|
|
50
|
+
* Part name | Description
|
|
51
|
+
* ---------------------|----------------
|
|
52
|
+
* `label` | The label element
|
|
53
|
+
* `input-field` | The element that wraps prefix, value and suffix
|
|
54
|
+
* `field-button` | Set on the clear button
|
|
55
|
+
* `clear-button` | The clear button
|
|
56
|
+
* `error-message` | The error message element
|
|
57
|
+
* `helper-text` | The helper text element wrapper
|
|
58
|
+
* `required-indicator` | The `required` state indicator element
|
|
59
|
+
*
|
|
60
|
+
* The following state attributes are available for styling:
|
|
61
|
+
*
|
|
62
|
+
* Attribute | Description
|
|
63
|
+
* ---------------------|---------------------------------
|
|
64
|
+
* `disabled` | Set when the element is disabled
|
|
65
|
+
* `has-value` | Set when the element has a value
|
|
66
|
+
* `has-label` | Set when the element has a label
|
|
67
|
+
* `has-helper` | Set when the element has helper text or slot
|
|
68
|
+
* `has-error-message` | Set when the element has an error message
|
|
69
|
+
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
70
|
+
* `invalid` | Set when the element is invalid
|
|
71
|
+
* `input-prevented` | Temporarily set when invalid input is prevented
|
|
72
|
+
* `focused` | Set when the element is focused
|
|
73
|
+
* `focus-ring` | Set when the element is keyboard focused
|
|
74
|
+
* `readonly` | Set when the element is readonly
|
|
75
|
+
*
|
|
76
|
+
* Note, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.
|
|
50
77
|
*
|
|
51
78
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
52
79
|
*
|
|
@@ -91,7 +118,7 @@ export class TextArea extends TextAreaMixin(ThemableMixin(ElementMixin(PolylitMi
|
|
|
91
118
|
<slot name="prefix" slot="prefix"></slot>
|
|
92
119
|
<slot name="textarea"></slot>
|
|
93
120
|
<slot name="suffix" slot="suffix"></slot>
|
|
94
|
-
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
121
|
+
<div id="clearButton" part="field-button clear-button" slot="suffix" aria-hidden="true"></div>
|
|
95
122
|
</vaadin-input-container>
|
|
96
123
|
|
|
97
124
|
<div part="helper-text">
|
package/vaadin-text-area.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-area",
|
|
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-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
|
|
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\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-area",
|
|
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-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
|
|
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\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,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { css } from 'lit';
|
|
7
|
-
|
|
8
|
-
export const textAreaStyles = css`
|
|
9
|
-
.vaadin-text-area-container {
|
|
10
|
-
flex: auto;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/* The label, helper text and the error message should neither grow nor shrink. */
|
|
14
|
-
[part='label'],
|
|
15
|
-
[part='helper-text'],
|
|
16
|
-
[part='error-message'] {
|
|
17
|
-
flex: none;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
[part='input-field'] {
|
|
21
|
-
flex: auto;
|
|
22
|
-
overflow: auto;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
::slotted(textarea) {
|
|
26
|
-
appearance: none;
|
|
27
|
-
flex: auto;
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
width: 100%;
|
|
30
|
-
height: 100%;
|
|
31
|
-
outline: none;
|
|
32
|
-
resize: none;
|
|
33
|
-
margin: 0;
|
|
34
|
-
padding: 0 0.25em;
|
|
35
|
-
border: 0;
|
|
36
|
-
border-radius: 0;
|
|
37
|
-
min-width: 0;
|
|
38
|
-
font: inherit;
|
|
39
|
-
font-size: 1em;
|
|
40
|
-
line-height: normal;
|
|
41
|
-
color: inherit;
|
|
42
|
-
background-color: transparent;
|
|
43
|
-
/* Disable default invalid style in Firefox */
|
|
44
|
-
box-shadow: none;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* Override styles from <vaadin-input-container> */
|
|
48
|
-
[part='input-field'] ::slotted(textarea) {
|
|
49
|
-
align-self: stretch;
|
|
50
|
-
white-space: pre-wrap;
|
|
51
|
-
box-sizing: border-box;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
[part='input-field'] ::slotted(:not(textarea)) {
|
|
55
|
-
align-self: flex-start;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* Workaround https://bugzilla.mozilla.org/show_bug.cgi?id=1739079 */
|
|
59
|
-
:host([disabled]) ::slotted(textarea) {
|
|
60
|
-
user-select: none;
|
|
61
|
-
}
|
|
62
|
-
`;
|
|
@@ -1,9 +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 '@vaadin/vaadin-lumo-styles/color.js';
|
|
8
|
-
import '@vaadin/vaadin-lumo-styles/sizing.js';
|
|
9
|
-
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
@@ -1,80 +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 '@vaadin/vaadin-lumo-styles/color.js';
|
|
8
|
-
import '@vaadin/vaadin-lumo-styles/sizing.js';
|
|
9
|
-
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
10
|
-
import { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';
|
|
11
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
12
|
-
|
|
13
|
-
const textArea = css`
|
|
14
|
-
[part='input-field'],
|
|
15
|
-
[part='input-field'] ::slotted(textarea) {
|
|
16
|
-
height: auto;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
min-height: 0;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
[part='input-field'] {
|
|
22
|
-
/* Equal to the implicit padding in vaadin-text-field */
|
|
23
|
-
padding-top: calc((var(--lumo-text-field-size) - 1em * var(--lumo-line-height-s)) / 2);
|
|
24
|
-
padding-bottom: calc((var(--lumo-text-field-size) - 1em * var(--lumo-line-height-s)) / 2);
|
|
25
|
-
transition: background-color 0.1s;
|
|
26
|
-
line-height: var(--lumo-line-height-s);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
:host(:not([readonly])) [part='input-field']::after {
|
|
30
|
-
display: none;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
:host([readonly]) [part='input-field'] {
|
|
34
|
-
border: var(--vaadin-input-field-readonly-border, 1px dashed var(--lumo-contrast-30pct));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
:host([readonly]) [part='input-field']::after {
|
|
38
|
-
border: none;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:host(:hover:not([readonly]):not([focused]):not([invalid])) [part='input-field'] {
|
|
42
|
-
background-color: var(--lumo-contrast-20pct);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@media (pointer: coarse) {
|
|
46
|
-
:host(:hover:not([readonly]):not([focused]):not([invalid])) [part='input-field'] {
|
|
47
|
-
background-color: var(--lumo-contrast-10pct);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
:host(:active:not([readonly]):not([focused])) [part='input-field'] {
|
|
51
|
-
background-color: var(--lumo-contrast-20pct);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
[part='input-field'] ::slotted(textarea) {
|
|
56
|
-
line-height: inherit;
|
|
57
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* Use sticky positioning to keep prefix/suffix/clear button visible when scrolling textarea container */
|
|
61
|
-
[part='input-field'] ::slotted([slot$='fix']),
|
|
62
|
-
[part='clear-button'] {
|
|
63
|
-
position: sticky;
|
|
64
|
-
top: 0;
|
|
65
|
-
align-self: flex-start;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
[part='input-field'] ::slotted(vaadin-icon[slot$='fix']),
|
|
69
|
-
[part='clear-button'] {
|
|
70
|
-
/* Vertically align icon prefix/suffix/clear button with the first line of text */
|
|
71
|
-
top: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2);
|
|
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);
|
|
75
|
-
}
|
|
76
|
-
`;
|
|
77
|
-
|
|
78
|
-
registerStyles('vaadin-text-area', [inputFieldShared, textArea], {
|
|
79
|
-
moduleId: 'lumo-text-area',
|
|
80
|
-
});
|