@vaadin/text-field 24.4.0-dev.223e39f050 → 24.4.0-dev.4b20a0c55.3

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/README.md CHANGED
@@ -5,7 +5,6 @@ A web component that allows the user to input and edit text.
5
5
  [Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/text-field)
6
6
 
7
7
  [![npm version](https://badgen.net/npm/v/@vaadin/text-field)](https://www.npmjs.com/package/@vaadin/text-field)
8
- [![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)
9
8
 
10
9
  ```html
11
10
  <vaadin-text-field label="Street Address"></vaadin-text-field>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/text-field",
3
- "version": "24.4.0-dev.223e39f050",
3
+ "version": "24.4.0-dev.4b20a0c55.3",
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-dev.223e39f050",
40
- "@vaadin/component-base": "24.4.0-dev.223e39f050",
41
- "@vaadin/field-base": "24.4.0-dev.223e39f050",
42
- "@vaadin/input-container": "24.4.0-dev.223e39f050",
43
- "@vaadin/vaadin-lumo-styles": "24.4.0-dev.223e39f050",
44
- "@vaadin/vaadin-material-styles": "24.4.0-dev.223e39f050",
45
- "@vaadin/vaadin-themable-mixin": "24.4.0-dev.223e39f050",
39
+ "@vaadin/a11y-base": "24.4.0-dev.4b20a0c55.3",
40
+ "@vaadin/component-base": "24.4.0-dev.4b20a0c55.3",
41
+ "@vaadin/field-base": "24.4.0-dev.4b20a0c55.3",
42
+ "@vaadin/input-container": "24.4.0-dev.4b20a0c55.3",
43
+ "@vaadin/vaadin-lumo-styles": "24.4.0-dev.4b20a0c55.3",
44
+ "@vaadin/vaadin-material-styles": "24.4.0-dev.4b20a0c55.3",
45
+ "@vaadin/vaadin-themable-mixin": "24.4.0-dev.4b20a0c55.3",
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": "5e2e3bfc811c95aed9354235fab93fdbf43eb354"
57
+ "gitHead": "41cf17453d7506fb635c088a0425e20b6e82b89b"
58
58
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  export * from './vaadin-text-field.js';
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
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);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { InputController } from '@vaadin/field-base/src/input-controller.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
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-input-container.js';
@@ -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>
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-text-field-styles.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
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/theme/lumo/vaadin-input-container-styles.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-text-field-styles.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-text-field-styles.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
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/theme/material/vaadin-input-container-styles.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-text-field-styles.js';