@vaadin/text-field 24.4.0-alpha2 → 24.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/text-field",
3
- "version": "24.4.0-alpha2",
3
+ "version": "24.4.0-alpha4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,13 +36,13 @@
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/a11y-base": "24.4.0-alpha2",
40
- "@vaadin/component-base": "24.4.0-alpha2",
41
- "@vaadin/field-base": "24.4.0-alpha2",
42
- "@vaadin/input-container": "24.4.0-alpha2",
43
- "@vaadin/vaadin-lumo-styles": "24.4.0-alpha2",
44
- "@vaadin/vaadin-material-styles": "24.4.0-alpha2",
45
- "@vaadin/vaadin-themable-mixin": "24.4.0-alpha2",
39
+ "@vaadin/a11y-base": "24.4.0-alpha4",
40
+ "@vaadin/component-base": "24.4.0-alpha4",
41
+ "@vaadin/field-base": "24.4.0-alpha4",
42
+ "@vaadin/input-container": "24.4.0-alpha4",
43
+ "@vaadin/vaadin-lumo-styles": "24.4.0-alpha4",
44
+ "@vaadin/vaadin-material-styles": "24.4.0-alpha4",
45
+ "@vaadin/vaadin-themable-mixin": "24.4.0-alpha4",
46
46
  "lit": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
@@ -54,5 +54,5 @@
54
54
  "web-types.json",
55
55
  "web-types.lit.json"
56
56
  ],
57
- "gitHead": "f303ead58d27e15d81a55db0559611fb77c0e421"
57
+ "gitHead": "3f23b333c5e4dd06f3c6a6b2505a0efcd0814b05"
58
58
  }
@@ -4,7 +4,7 @@
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';
7
- import { css, html, LitElement } from 'lit';
7
+ import { html, LitElement } from 'lit';
8
8
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
9
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
10
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
@@ -18,7 +18,7 @@ import { TextFieldMixin } from './vaadin-text-field-mixin.js';
18
18
  *
19
19
  * ## Disclaimer
20
20
  *
21
- * This component is an experiment not intended for publishing to npm.
21
+ * This component is an experiment and not yet a part of Vaadin platform.
22
22
  * There is no ETA regarding specific Vaadin version where it'll land.
23
23
  * Feel free to try this code in your apps as per Apache 2.0 license.
24
24
  */
@@ -28,14 +28,7 @@ export class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(Polylit
28
28
  }
29
29
 
30
30
  static get styles() {
31
- return [
32
- inputFieldShared,
33
- css`
34
- [part='input-field'] {
35
- flex-grow: 0;
36
- }
37
- `,
38
- ];
31
+ return [inputFieldShared];
39
32
  }
40
33
 
41
34
  /** @protected */
@@ -56,8 +49,7 @@ export class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(Polylit
56
49
  >
57
50
  <slot name="prefix" slot="prefix"></slot>
58
51
  <slot name="input"></slot>
59
- <slot name="suffix" slot="suffix"></slot>
60
- <div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
52
+ ${this._renderSuffix()}
61
53
  </vaadin-input-container>
62
54
 
63
55
  <div part="helper-text">
@@ -82,6 +74,14 @@ export class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(Polylit
82
74
  this._tooltipController.setAriaTarget(this.inputElement);
83
75
  this.addController(this._tooltipController);
84
76
  }
77
+
78
+ /** @protected */
79
+ _renderSuffix() {
80
+ return html`
81
+ <slot name="suffix" slot="suffix"></slot>
82
+ <div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
83
+ `;
84
+ }
85
85
  }
86
86
 
87
87
  defineCustomElement(TextField);
@@ -90,12 +90,6 @@ export class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(Polymer
90
90
 
91
91
  static get template() {
92
92
  return html`
93
- <style>
94
- [part='input-field'] {
95
- flex-grow: 0;
96
- }
97
- </style>
98
-
99
93
  <div class="vaadin-field-container">
100
94
  <div part="label">
101
95
  <slot name="label"></slot>
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/text-field",
4
- "version": "24.4.0-alpha2",
4
+ "version": "24.4.0-alpha4",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/text-field",
4
- "version": "24.4.0-alpha2",
4
+ "version": "24.4.0-alpha4",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {