@vaadin/text-field 24.3.0-alpha8 → 24.3.0-beta1

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.3.0-alpha8",
3
+ "version": "24.3.0-beta1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,8 +21,6 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
- "!src/vaadin-lit-text-field.d.ts",
25
- "!src/vaadin-lit-text-field.js",
26
24
  "theme",
27
25
  "vaadin-*.d.ts",
28
26
  "vaadin-*.js",
@@ -38,13 +36,13 @@
38
36
  "dependencies": {
39
37
  "@open-wc/dedupe-mixin": "^1.3.0",
40
38
  "@polymer/polymer": "^3.0.0",
41
- "@vaadin/a11y-base": "24.3.0-alpha8",
42
- "@vaadin/component-base": "24.3.0-alpha8",
43
- "@vaadin/field-base": "24.3.0-alpha8",
44
- "@vaadin/input-container": "24.3.0-alpha8",
45
- "@vaadin/vaadin-lumo-styles": "24.3.0-alpha8",
46
- "@vaadin/vaadin-material-styles": "24.3.0-alpha8",
47
- "@vaadin/vaadin-themable-mixin": "24.3.0-alpha8",
39
+ "@vaadin/a11y-base": "24.3.0-beta1",
40
+ "@vaadin/component-base": "24.3.0-beta1",
41
+ "@vaadin/field-base": "24.3.0-beta1",
42
+ "@vaadin/input-container": "24.3.0-beta1",
43
+ "@vaadin/vaadin-lumo-styles": "24.3.0-beta1",
44
+ "@vaadin/vaadin-material-styles": "24.3.0-beta1",
45
+ "@vaadin/vaadin-themable-mixin": "24.3.0-beta1",
48
46
  "lit": "^3.0.0"
49
47
  },
50
48
  "devDependencies": {
@@ -56,5 +54,5 @@
56
54
  "web-types.json",
57
55
  "web-types.lit.json"
58
56
  ],
59
- "gitHead": "03b2f1c55aadb86b15ad96c7e7dcb059e5fc0604"
57
+ "gitHead": "a197041861e1bbf8d3e966d893648f5dd462b036"
60
58
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ export * from './vaadin-text-field.js';
@@ -0,0 +1,87 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import '@vaadin/input-container/src/vaadin-lit-input-container.js';
7
+ import { css, html, LitElement } from 'lit';
8
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
+ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
10
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
11
+ import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
12
+ import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
13
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
14
+ import { TextFieldMixin } from './vaadin-text-field-mixin.js';
15
+
16
+ /**
17
+ * LitElement based version of `<vaadin-text-field>` web component.
18
+ *
19
+ * ## Disclaimer
20
+ *
21
+ * This component is an experiment not intended for publishing to npm.
22
+ * There is no ETA regarding specific Vaadin version where it'll land.
23
+ * Feel free to try this code in your apps as per Apache 2.0 license.
24
+ */
25
+ export class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
26
+ static get is() {
27
+ return 'vaadin-text-field';
28
+ }
29
+
30
+ static get styles() {
31
+ return [
32
+ inputFieldShared,
33
+ css`
34
+ [part='input-field'] {
35
+ flex-grow: 0;
36
+ }
37
+ `,
38
+ ];
39
+ }
40
+
41
+ /** @protected */
42
+ render() {
43
+ return html`
44
+ <div class="vaadin-field-container">
45
+ <div part="label">
46
+ <slot name="label"></slot>
47
+ <span part="required-indicator" aria-hidden="true" @click="${this.focus}"></span>
48
+ </div>
49
+
50
+ <vaadin-input-container
51
+ part="input-field"
52
+ .readonly="${this.readonly}"
53
+ .disabled="${this.disabled}"
54
+ .invalid="${this.invalid}"
55
+ theme="${this._theme}"
56
+ >
57
+ <slot name="prefix" slot="prefix"></slot>
58
+ <slot name="input"></slot>
59
+ <slot name="suffix" slot="suffix"></slot>
60
+ <div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
61
+ </vaadin-input-container>
62
+
63
+ <div part="helper-text">
64
+ <slot name="helper"></slot>
65
+ </div>
66
+
67
+ <div part="error-message">
68
+ <slot name="error-message"></slot>
69
+ </div>
70
+ </div>
71
+
72
+ <slot name="tooltip"></slot>
73
+ `;
74
+ }
75
+
76
+ /** @protected */
77
+ ready() {
78
+ super.ready();
79
+
80
+ this._tooltipController = new TooltipController(this);
81
+ this._tooltipController.setPosition('top');
82
+ this._tooltipController.setAriaTarget(this.inputElement);
83
+ this.addController(this._tooltipController);
84
+ }
85
+ }
86
+
87
+ defineCustomElement(TextField);
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import './vaadin-text-field-styles.js';
7
+ import '../../src/vaadin-lit-text-field.js';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import './vaadin-text-field-styles.js';
7
+ import '../../src/vaadin-lit-text-field.js';
@@ -0,0 +1 @@
1
+ export * from './src/vaadin-text-field.js';
@@ -0,0 +1,3 @@
1
+ import './theme/lumo/vaadin-lit-text-field.js';
2
+
3
+ export * from './src/vaadin-lit-text-field.js';
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.3.0-alpha8",
4
+ "version": "24.3.0-beta1",
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.3.0-alpha8",
4
+ "version": "24.3.0-beta1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {