@vaadin/text-area 24.6.0-beta1 → 24.7.0-alpha1

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.0-beta1",
3
+ "version": "24.7.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,17 +36,17 @@
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.0-beta1",
40
- "@vaadin/component-base": "24.6.0-beta1",
41
- "@vaadin/field-base": "24.6.0-beta1",
42
- "@vaadin/input-container": "24.6.0-beta1",
43
- "@vaadin/vaadin-lumo-styles": "24.6.0-beta1",
44
- "@vaadin/vaadin-material-styles": "24.6.0-beta1",
45
- "@vaadin/vaadin-themable-mixin": "24.6.0-beta1",
39
+ "@vaadin/a11y-base": "24.7.0-alpha1",
40
+ "@vaadin/component-base": "24.7.0-alpha1",
41
+ "@vaadin/field-base": "24.7.0-alpha1",
42
+ "@vaadin/input-container": "24.7.0-alpha1",
43
+ "@vaadin/vaadin-lumo-styles": "24.7.0-alpha1",
44
+ "@vaadin/vaadin-material-styles": "24.7.0-alpha1",
45
+ "@vaadin/vaadin-themable-mixin": "24.7.0-alpha1",
46
46
  "lit": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@vaadin/chai-plugins": "24.6.0-beta1",
49
+ "@vaadin/chai-plugins": "24.7.0-alpha1",
50
50
  "@vaadin/testing-helpers": "^1.0.0",
51
51
  "sinon": "^18.0.0"
52
52
  },
@@ -54,5 +54,5 @@
54
54
  "web-types.json",
55
55
  "web-types.lit.json"
56
56
  ],
57
- "gitHead": "ab28efb0dcf2cd1ef72100e2e8f32232fa49aacc"
57
+ "gitHead": "04be941c9a7b659871c97f31b9cc3ffd7528087b"
58
58
  }
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import '@vaadin/input-container/src/vaadin-lit-input-container.js';
7
7
  import { html, LitElement } from 'lit';
8
+ import { ifDefined } from 'lit/directives/if-defined.js';
8
9
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
10
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
11
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
@@ -46,7 +47,7 @@ export class TextArea extends TextAreaMixin(ThemableMixin(ElementMixin(PolylitMi
46
47
  .readonly="${this.readonly}"
47
48
  .disabled="${this.disabled}"
48
49
  .invalid="${this.invalid}"
49
- theme="${this._theme}"
50
+ theme="${ifDefined(this._theme)}"
50
51
  @scroll="${this._onScroll}"
51
52
  >
52
53
  <slot name="prefix" slot="prefix"></slot>
@@ -181,13 +181,13 @@ export const TextAreaMixin = (superClass) =>
181
181
  // position while resetting the textareas height. If the textarea had a large height, then removing its height
182
182
  // will reset its height to the default of two rows. That might reduce the height of the page, and the
183
183
  // browser might adjust the scroll position before we can restore the measured height of the textarea.
184
- inputField.style.display = 'block';
185
184
  inputField.style.height = inputFieldHeight;
186
185
 
187
186
  // Fix the input element width so its scroll height isn't affected by host's disappearing scrollbars
188
187
  input.style.maxWidth = inputWidth;
189
188
 
190
189
  // Clear the height of the textarea to allow measuring a reduced scroll height
190
+ input.style.alignSelf = 'flex-start';
191
191
  input.style.height = 'auto';
192
192
  }
193
193
  this._oldValueLength = valueLength;
@@ -199,7 +199,7 @@ export const TextAreaMixin = (superClass) =>
199
199
 
200
200
  // Restore
201
201
  input.style.removeProperty('max-width');
202
- inputField.style.removeProperty('display');
202
+ input.style.removeProperty('align-self');
203
203
  inputField.style.removeProperty('height');
204
204
  inputField.scrollTop = scrollTop;
205
205
 
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.0-beta1",
4
+ "version": "24.7.0-alpha1",
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.0-beta1/#/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-alpha1/#/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",
@@ -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.0-beta1",
4
+ "version": "24.7.0-alpha1",
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.0-beta1/#/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-alpha1/#/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
  {