@vaadin/text-area
Advanced tools
Comparing version 24.7.0-alpha1 to 24.7.0-alpha10
{ | ||
"name": "@vaadin/text-area", | ||
"version": "24.7.0-alpha1", | ||
"version": "24.7.0-alpha10", | ||
"publishConfig": { | ||
@@ -39,14 +39,15 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/a11y-base": "24.7.0-alpha1", | ||
"@vaadin/component-base": "24.7.0-alpha1", | ||
"@vaadin/field-base": "24.7.0-alpha1", | ||
"@vaadin/input-container": "24.7.0-alpha1", | ||
"@vaadin/vaadin-lumo-styles": "24.7.0-alpha1", | ||
"@vaadin/vaadin-material-styles": "24.7.0-alpha1", | ||
"@vaadin/vaadin-themable-mixin": "24.7.0-alpha1", | ||
"@vaadin/a11y-base": "24.7.0-alpha10", | ||
"@vaadin/component-base": "24.7.0-alpha10", | ||
"@vaadin/field-base": "24.7.0-alpha10", | ||
"@vaadin/input-container": "24.7.0-alpha10", | ||
"@vaadin/vaadin-lumo-styles": "24.7.0-alpha10", | ||
"@vaadin/vaadin-material-styles": "24.7.0-alpha10", | ||
"@vaadin/vaadin-themable-mixin": "24.7.0-alpha10", | ||
"lit": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@vaadin/chai-plugins": "24.7.0-alpha1", | ||
"@vaadin/testing-helpers": "^1.0.0", | ||
"@vaadin/chai-plugins": "24.7.0-alpha10", | ||
"@vaadin/test-runner-commands": "24.7.0-alpha10", | ||
"@vaadin/testing-helpers": "^1.1.0", | ||
"sinon": "^18.0.0" | ||
@@ -58,3 +59,3 @@ }, | ||
], | ||
"gitHead": "04be941c9a7b659871c97f31b9cc3ffd7528087b" | ||
"gitHead": "c0f8933df2a6a40648d3fb9cfbae6bbf86a8aa90" | ||
} |
/** | ||
* @license | ||
* Copyright (c) 2021 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2021 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
export * from './vaadin-text-area.js'; |
/** | ||
* @license | ||
* Copyright (c) 2021 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2021 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -42,3 +42,3 @@ */ | ||
<slot name="label"></slot> | ||
<span part="required-indicator" aria-hidden="true"></span> | ||
<span part="required-indicator" aria-hidden="true" @click="${this.focus}"></span> | ||
</div> | ||
@@ -45,0 +45,0 @@ |
/** | ||
* @license | ||
* Copyright (c) 2021 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2021 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -66,3 +66,3 @@ */ | ||
/** | ||
* Minimum number of rows to show. Default is two rows, which is also the minimum value. | ||
* Minimum number of rows to show. Default is two rows. | ||
* | ||
@@ -69,0 +69,0 @@ * When using a custom slotted textarea, the minimum number of rows are not applied for backwards compatibility. |
/** | ||
* @license | ||
* Copyright (c) 2021 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2021 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -45,3 +45,3 @@ */ | ||
/** | ||
* Minimum number of rows to show. Default is two rows, which is also the minimum value. | ||
* Minimum number of rows to show. Default is two rows. | ||
* | ||
@@ -117,4 +117,2 @@ * When using a custom slotted textarea, the minimum number of rows are not applied for backwards compatibility. | ||
this.addEventListener('animationend', this._onAnimationEnd); | ||
this._inputField = this.shadowRoot.querySelector('[part=input-field]'); | ||
@@ -145,9 +143,2 @@ | ||
/** @private */ | ||
_onAnimationEnd(e) { | ||
if (e.animationName.indexOf('vaadin-text-area-appear') === 0) { | ||
this._updateHeight(); | ||
} | ||
} | ||
/** | ||
@@ -225,3 +216,3 @@ * @param {unknown} newVal | ||
if (this.inputElement === this.__textAreaController.defaultNode) { | ||
this.inputElement.rows = Math.max(minRows, 2); | ||
this.inputElement.rows = Math.max(minRows, 1); | ||
} | ||
@@ -264,4 +255,4 @@ } | ||
__minRowsChanged(minRows) { | ||
if (minRows < 2) { | ||
console.warn('<vaadin-text-area> minRows must be at least 2.'); | ||
if (minRows < 1) { | ||
console.warn('<vaadin-text-area> minRows must be at least 1.'); | ||
} | ||
@@ -268,0 +259,0 @@ } |
/** | ||
* @license | ||
* Copyright (c) 2021 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2021 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -5,0 +5,0 @@ */ |
/** | ||
* @license | ||
* Copyright (c) 2021 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2021 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -9,6 +9,2 @@ */ | ||
export const textAreaStyles = css` | ||
:host { | ||
animation: 1ms vaadin-text-area-appear; | ||
} | ||
.vaadin-text-area-container { | ||
@@ -69,8 +65,2 @@ flex: auto; | ||
} | ||
@keyframes vaadin-text-area-appear { | ||
to { | ||
opacity: 1; | ||
} | ||
} | ||
`; |
/** | ||
* @license | ||
* Copyright (c) 2021 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2021 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -5,0 +5,0 @@ */ |
/** | ||
* @license | ||
* Copyright (c) 2021 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2021 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -74,3 +74,3 @@ */ | ||
<slot name="label"></slot> | ||
<span part="required-indicator" aria-hidden="true"></span> | ||
<span part="required-indicator" aria-hidden="true" on-click="focus"></span> | ||
</div> | ||
@@ -77,0 +77,0 @@ |
/** | ||
* @license | ||
* Copyright (c) 2017 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2017 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -5,0 +5,0 @@ */ |
/** | ||
* @license | ||
* Copyright (c) 2017 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2017 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -18,2 +18,3 @@ */ | ||
box-sizing: border-box; | ||
min-height: 0; | ||
} | ||
@@ -68,7 +69,9 @@ | ||
/* Vertically align icon prefix/suffix/clear button with the first line of text */ | ||
[part='input-field'] ::slotted(vaadin-icon[slot$='fix']), | ||
[part='clear-button'] { | ||
/* Vertically align icon prefix/suffix/clear button with the first line of text */ | ||
top: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2); | ||
margin-top: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2); | ||
/* Reduce effective height to match line height of native textarea, so icons don't increase component size when using single row */ | ||
margin-bottom: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2); | ||
} | ||
@@ -75,0 +78,0 @@ `; |
/** | ||
* @license | ||
* Copyright (c) 2017 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2017 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -5,0 +5,0 @@ */ |
/** | ||
* @license | ||
* Copyright (c) 2017 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2017 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -5,0 +5,0 @@ */ |
/** | ||
* @license | ||
* Copyright (c) 2017 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2017 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
import '@vaadin/input-container/theme/material/vaadin-input-container-styles.js'; |
/** | ||
* @license | ||
* Copyright (c) 2017 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2017 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -18,2 +18,3 @@ */ | ||
padding-top: 0; | ||
padding-bottom: 4px; | ||
margin-top: 4px; | ||
@@ -20,0 +21,0 @@ } |
/** | ||
* @license | ||
* Copyright (c) 2017 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2017 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -5,0 +5,0 @@ */ |
/** | ||
* @license | ||
* Copyright (c) 2017 - 2024 Vaadin Ltd. | ||
* Copyright (c) 2017 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
@@ -5,0 +5,0 @@ */ |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/text-area", | ||
"version": "24.7.0-alpha1", | ||
"version": "24.7.0-alpha10", | ||
"description-markup": "markdown", | ||
@@ -11,3 +11,3 @@ "contributions": { | ||
"name": "vaadin-text-area", | ||
"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-alpha1/#/elements/vaadin-text-field) for the styling documentation.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.", | ||
"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.", | ||
"attributes": [ | ||
@@ -280,3 +280,3 @@ { | ||
"name": "min-rows", | ||
"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.", | ||
"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.", | ||
"value": { | ||
@@ -581,3 +581,3 @@ "type": [ | ||
"name": "minRows", | ||
"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.", | ||
"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.", | ||
"value": { | ||
@@ -584,0 +584,0 @@ "type": [ |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/text-area", | ||
"version": "24.7.0-alpha1", | ||
"version": "24.7.0-alpha10", | ||
"description-markup": "markdown", | ||
@@ -19,3 +19,3 @@ "framework": "lit", | ||
"name": "vaadin-text-area", | ||
"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-alpha1/#/elements/vaadin-text-field) for the styling documentation.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.", | ||
"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.", | ||
"extension": true, | ||
@@ -193,3 +193,3 @@ "attributes": [ | ||
"name": ".minRows", | ||
"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.", | ||
"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.", | ||
"value": { | ||
@@ -196,0 +196,0 @@ "kind": "expression" |
81541
4
1726
+ Added@vaadin/a11y-base@24.7.0-alpha10(transitive)
+ Added@vaadin/component-base@24.7.0-alpha10(transitive)
+ Added@vaadin/field-base@24.7.0-alpha10(transitive)
+ Added@vaadin/icon@24.7.0-alpha10(transitive)
+ Added@vaadin/input-container@24.7.0-alpha10(transitive)
+ Added@vaadin/vaadin-lumo-styles@24.7.0-alpha10(transitive)
+ Added@vaadin/vaadin-material-styles@24.7.0-alpha10(transitive)
+ Added@vaadin/vaadin-themable-mixin@24.7.0-alpha10(transitive)
- Removed@vaadin/a11y-base@24.7.0-alpha1(transitive)
- Removed@vaadin/component-base@24.7.0-alpha1(transitive)
- Removed@vaadin/field-base@24.7.0-alpha1(transitive)
- Removed@vaadin/icon@24.7.0-alpha1(transitive)
- Removed@vaadin/input-container@24.7.0-alpha1(transitive)
- Removed@vaadin/vaadin-lumo-styles@24.7.0-alpha1(transitive)
- Removed@vaadin/vaadin-material-styles@24.7.0-alpha1(transitive)
- Removed@vaadin/vaadin-themable-mixin@24.7.0-alpha1(transitive)