@vaadin/text-area 24.5.0-beta1 → 24.5.0-rc2

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.5.0-beta1",
3
+ "version": "24.5.0-rc2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,17 +38,17 @@
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
40
  "@polymer/polymer": "^3.0.0",
41
- "@vaadin/a11y-base": "24.5.0-beta1",
42
- "@vaadin/component-base": "24.5.0-beta1",
43
- "@vaadin/field-base": "24.5.0-beta1",
44
- "@vaadin/input-container": "24.5.0-beta1",
45
- "@vaadin/vaadin-lumo-styles": "24.5.0-beta1",
46
- "@vaadin/vaadin-material-styles": "24.5.0-beta1",
47
- "@vaadin/vaadin-themable-mixin": "24.5.0-beta1",
41
+ "@vaadin/a11y-base": "24.5.0-rc2",
42
+ "@vaadin/component-base": "24.5.0-rc2",
43
+ "@vaadin/field-base": "24.5.0-rc2",
44
+ "@vaadin/input-container": "24.5.0-rc2",
45
+ "@vaadin/vaadin-lumo-styles": "24.5.0-rc2",
46
+ "@vaadin/vaadin-material-styles": "24.5.0-rc2",
47
+ "@vaadin/vaadin-themable-mixin": "24.5.0-rc2",
48
48
  "lit": "^3.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@vaadin/chai-plugins": "24.5.0-beta1",
51
+ "@vaadin/chai-plugins": "24.5.0-rc2",
52
52
  "@vaadin/testing-helpers": "^1.0.0",
53
53
  "sinon": "^18.0.0"
54
54
  },
@@ -56,5 +56,5 @@
56
56
  "web-types.json",
57
57
  "web-types.lit.json"
58
58
  ],
59
- "gitHead": "da4b57724d7089e3766d59d01068159322adb2b8"
59
+ "gitHead": "be5bf40aec33761c6defdb5b3093c7b6dd5d97fd"
60
60
  }
@@ -56,8 +56,18 @@ const textArea = css`
56
56
  --_lumo-text-field-overflow-mask-image: none;
57
57
  }
58
58
 
59
- /* Vertically align icon prefix/suffix with the first line of text */
60
- [part='input-field'] ::slotted(vaadin-icon) {
59
+ /* Use sticky positioning to keep prefix/suffix/clear button visible when scrolling textarea container */
60
+ [part='input-field'] ::slotted([slot$='fix']),
61
+ [part='clear-button'] {
62
+ position: sticky;
63
+ top: 0;
64
+ align-self: flex-start;
65
+ }
66
+
67
+ /* Vertically align icon prefix/suffix/clear button with the first line of text */
68
+ [part='input-field'] ::slotted(vaadin-icon[slot$='fix']),
69
+ [part='clear-button'] {
70
+ top: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2);
61
71
  margin-top: calc((var(--lumo-icon-size-m) - 1em * var(--lumo-line-height-s)) / -2);
62
72
  }
63
73
  `;
@@ -22,6 +22,14 @@ const textArea = css`
22
22
  [part='input-field']::after {
23
23
  bottom: calc(var(--_text-area-vertical-scroll-position) * -1);
24
24
  }
25
+
26
+ /* Use sticky positioning to keep prefix/suffix/clear button visible when scrolling textarea container */
27
+ [part='input-field'] ::slotted([slot$='fix']),
28
+ [part='clear-button'] {
29
+ position: sticky;
30
+ top: 0;
31
+ align-self: flex-start;
32
+ }
25
33
  `;
26
34
 
27
35
  registerStyles('vaadin-text-area', [inputFieldShared, textArea], { moduleId: 'material-text-area' });
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.5.0-beta1",
4
+ "version": "24.5.0-rc2",
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.5.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.5.0-rc2/#/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.5.0-beta1",
4
+ "version": "24.5.0-rc2",
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.5.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.5.0-rc2/#/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
  {