@vaadin/custom-field 24.6.0-alpha4 → 24.6.0-alpha6

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/custom-field",
3
- "version": "24.6.0-alpha4",
3
+ "version": "24.6.0-alpha6",
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-custom-field.d.ts",
25
- "!src/vaadin-lit-custom-field.js",
26
24
  "theme",
27
25
  "vaadin-*.d.ts",
28
26
  "vaadin-*.js",
@@ -38,32 +36,32 @@
38
36
  "dependencies": {
39
37
  "@open-wc/dedupe-mixin": "^1.3.0",
40
38
  "@polymer/polymer": "^3.0.0",
41
- "@vaadin/a11y-base": "24.6.0-alpha4",
42
- "@vaadin/component-base": "24.6.0-alpha4",
43
- "@vaadin/field-base": "24.6.0-alpha4",
44
- "@vaadin/vaadin-lumo-styles": "24.6.0-alpha4",
45
- "@vaadin/vaadin-material-styles": "24.6.0-alpha4",
46
- "@vaadin/vaadin-themable-mixin": "24.6.0-alpha4",
39
+ "@vaadin/a11y-base": "24.6.0-alpha6",
40
+ "@vaadin/component-base": "24.6.0-alpha6",
41
+ "@vaadin/field-base": "24.6.0-alpha6",
42
+ "@vaadin/vaadin-lumo-styles": "24.6.0-alpha6",
43
+ "@vaadin/vaadin-material-styles": "24.6.0-alpha6",
44
+ "@vaadin/vaadin-themable-mixin": "24.6.0-alpha6",
47
45
  "lit": "^3.0.0"
48
46
  },
49
47
  "devDependencies": {
50
- "@vaadin/chai-plugins": "24.6.0-alpha4",
51
- "@vaadin/combo-box": "24.6.0-alpha4",
52
- "@vaadin/date-picker": "24.6.0-alpha4",
53
- "@vaadin/email-field": "24.6.0-alpha4",
54
- "@vaadin/form-layout": "24.6.0-alpha4",
55
- "@vaadin/number-field": "24.6.0-alpha4",
56
- "@vaadin/password-field": "24.6.0-alpha4",
57
- "@vaadin/select": "24.6.0-alpha4",
48
+ "@vaadin/chai-plugins": "24.6.0-alpha6",
49
+ "@vaadin/combo-box": "24.6.0-alpha6",
50
+ "@vaadin/date-picker": "24.6.0-alpha6",
51
+ "@vaadin/email-field": "24.6.0-alpha6",
52
+ "@vaadin/form-layout": "24.6.0-alpha6",
53
+ "@vaadin/number-field": "24.6.0-alpha6",
54
+ "@vaadin/password-field": "24.6.0-alpha6",
55
+ "@vaadin/select": "24.6.0-alpha6",
58
56
  "@vaadin/testing-helpers": "^1.0.0",
59
- "@vaadin/text-area": "24.6.0-alpha4",
60
- "@vaadin/text-field": "24.6.0-alpha4",
61
- "@vaadin/time-picker": "24.6.0-alpha4",
57
+ "@vaadin/text-area": "24.6.0-alpha6",
58
+ "@vaadin/text-field": "24.6.0-alpha6",
59
+ "@vaadin/time-picker": "24.6.0-alpha6",
62
60
  "sinon": "^18.0.0"
63
61
  },
64
62
  "web-types": [
65
63
  "web-types.json",
66
64
  "web-types.lit.json"
67
65
  ],
68
- "gitHead": "78967d4f3bb46f58f43c2cc621802554acb2efaf"
66
+ "gitHead": "53f2f0c6cb9324a832ee7c0a052db927e151e167"
69
67
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2019 - 2024 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ export * from './vaadin-custom-field.js';
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2019 - 2024 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import { html, LitElement } from 'lit';
7
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
+ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
9
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
+ import { CustomFieldMixin } from './vaadin-custom-field-mixin.js';
12
+ import { customFieldStyles } from './vaadin-custom-field-styles.js';
13
+
14
+ /**
15
+ * LitElement based version of `<vaadin-custom-field>` web component.
16
+ *
17
+ * ## Disclaimer
18
+ *
19
+ * This component is an experiment and not yet a part of Vaadin platform.
20
+ * There is no ETA regarding specific Vaadin version where it'll land.
21
+ * Feel free to try this code in your apps as per Apache 2.0 license.
22
+ */
23
+ class CustomField extends CustomFieldMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))) {
24
+ static get is() {
25
+ return 'vaadin-custom-field';
26
+ }
27
+
28
+ static get styles() {
29
+ return customFieldStyles;
30
+ }
31
+
32
+ /** @protected */
33
+ render() {
34
+ return html`
35
+ <div class="vaadin-custom-field-container">
36
+ <div part="label" @click="${this.focus}">
37
+ <slot name="label"></slot>
38
+ <span part="required-indicator" aria-hidden="true"></span>
39
+ </div>
40
+
41
+ <div class="inputs-wrapper" @change="${this._onInputChange}">
42
+ <slot id="slot"></slot>
43
+ </div>
44
+
45
+ <div part="helper-text">
46
+ <slot name="helper"></slot>
47
+ </div>
48
+
49
+ <div part="error-message">
50
+ <slot name="error-message"></slot>
51
+ </div>
52
+ </div>
53
+
54
+ <slot name="tooltip"></slot>
55
+ `;
56
+ }
57
+
58
+ /**
59
+ * Fired when the user commits a value change for any of the internal inputs.
60
+ *
61
+ * @event change
62
+ */
63
+ }
64
+
65
+ defineCustomElement(CustomField);
66
+
67
+ export { CustomField };
@@ -0,0 +1,2 @@
1
+ import './vaadin-custom-field-styles.js';
2
+ import '../../src/vaadin-lit-custom-field.js';
@@ -0,0 +1,2 @@
1
+ import './vaadin-custom-field-styles.js';
2
+ import '../../src/vaadin-lit-custom-field.js';
@@ -0,0 +1,2 @@
1
+ import './vaadin-custom-field-styles.js';
2
+ import '../../src/vaadin-lit-custom-field.js';
@@ -0,0 +1,2 @@
1
+ import './vaadin-custom-field-styles.js';
2
+ import '../../src/vaadin-lit-custom-field.js';
@@ -0,0 +1 @@
1
+ export * from './src/vaadin-custom-field.js';
@@ -0,0 +1,3 @@
1
+ import './theme/lumo/vaadin-lit-custom-field.js';
2
+
3
+ export * from './src/vaadin-lit-custom-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/custom-field",
4
- "version": "24.6.0-alpha4",
4
+ "version": "24.6.0-alpha6",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -100,7 +100,7 @@
100
100
  },
101
101
  {
102
102
  "name": "value",
103
- "description": "The value of the field. When wrapping several inputs, it will contain `\\t`\n(Tab character) as a delimiter indicating parts intended to be used as the\ncorresponding inputs values.\nUse the [`formatValue`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha4/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha4/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
103
+ "description": "The value of the field. When wrapping several inputs, it will contain `\\t`\n(Tab character) as a delimiter indicating parts intended to be used as the\ncorresponding inputs values.\nUse the [`formatValue`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha6/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha6/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
104
104
  "value": {
105
105
  "type": [
106
106
  "string",
@@ -213,7 +213,7 @@
213
213
  },
214
214
  {
215
215
  "name": "value",
216
- "description": "The value of the field. When wrapping several inputs, it will contain `\\t`\n(Tab character) as a delimiter indicating parts intended to be used as the\ncorresponding inputs values.\nUse the [`formatValue`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha4/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha4/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
216
+ "description": "The value of the field. When wrapping several inputs, it will contain `\\t`\n(Tab character) as a delimiter indicating parts intended to be used as the\ncorresponding inputs values.\nUse the [`formatValue`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha6/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha6/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
217
217
  "value": {
218
218
  "type": [
219
219
  "string",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/custom-field",
4
- "version": "24.6.0-alpha4",
4
+ "version": "24.6.0-alpha6",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -77,7 +77,7 @@
77
77
  },
78
78
  {
79
79
  "name": ".value",
80
- "description": "The value of the field. When wrapping several inputs, it will contain `\\t`\n(Tab character) as a delimiter indicating parts intended to be used as the\ncorresponding inputs values.\nUse the [`formatValue`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha4/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha4/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
80
+ "description": "The value of the field. When wrapping several inputs, it will contain `\\t`\n(Tab character) as a delimiter indicating parts intended to be used as the\ncorresponding inputs values.\nUse the [`formatValue`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha6/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-alpha6/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
81
81
  "value": {
82
82
  "kind": "expression"
83
83
  }