@vaadin/custom-field 23.2.2 → 23.3.0-alpha2
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 +19 -19
- package/src/vaadin-custom-field.js +10 -0
- package/web-types.json +3 -3
- package/web-types.lit.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/custom-field",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.3.0-alpha2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,32 +35,32 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@polymer/polymer": "^3.0.0",
|
|
38
|
-
"@vaadin/component-base": "
|
|
39
|
-
"@vaadin/field-base": "
|
|
40
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
41
|
-
"@vaadin/vaadin-material-styles": "
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
38
|
+
"@vaadin/component-base": "23.3.0-alpha2",
|
|
39
|
+
"@vaadin/field-base": "23.3.0-alpha2",
|
|
40
|
+
"@vaadin/vaadin-lumo-styles": "23.3.0-alpha2",
|
|
41
|
+
"@vaadin/vaadin-material-styles": "23.3.0-alpha2",
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "23.3.0-alpha2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@esm-bundle/chai": "^4.3.4",
|
|
46
|
-
"@vaadin/combo-box": "
|
|
47
|
-
"@vaadin/date-picker": "
|
|
48
|
-
"@vaadin/email-field": "
|
|
49
|
-
"@vaadin/form-layout": "
|
|
50
|
-
"@vaadin/list-box": "
|
|
51
|
-
"@vaadin/number-field": "
|
|
52
|
-
"@vaadin/password-field": "
|
|
53
|
-
"@vaadin/polymer-legacy-adapter": "
|
|
54
|
-
"@vaadin/select": "
|
|
46
|
+
"@vaadin/combo-box": "23.3.0-alpha2",
|
|
47
|
+
"@vaadin/date-picker": "23.3.0-alpha2",
|
|
48
|
+
"@vaadin/email-field": "23.3.0-alpha2",
|
|
49
|
+
"@vaadin/form-layout": "23.3.0-alpha2",
|
|
50
|
+
"@vaadin/list-box": "23.3.0-alpha2",
|
|
51
|
+
"@vaadin/number-field": "23.3.0-alpha2",
|
|
52
|
+
"@vaadin/password-field": "23.3.0-alpha2",
|
|
53
|
+
"@vaadin/polymer-legacy-adapter": "23.3.0-alpha2",
|
|
54
|
+
"@vaadin/select": "23.3.0-alpha2",
|
|
55
55
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
56
|
-
"@vaadin/text-area": "
|
|
57
|
-
"@vaadin/text-field": "
|
|
58
|
-
"@vaadin/time-picker": "
|
|
56
|
+
"@vaadin/text-area": "23.3.0-alpha2",
|
|
57
|
+
"@vaadin/text-field": "23.3.0-alpha2",
|
|
58
|
+
"@vaadin/time-picker": "23.3.0-alpha2",
|
|
59
59
|
"sinon": "^13.0.2"
|
|
60
60
|
},
|
|
61
61
|
"web-types": [
|
|
62
62
|
"web-types.json",
|
|
63
63
|
"web-types.lit.json"
|
|
64
64
|
],
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "ae61027c62ffa7f7d70cfc50e43f333addfc74b6"
|
|
66
66
|
}
|
|
@@ -8,6 +8,7 @@ import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
|
8
8
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
9
9
|
import { FocusMixin } from '@vaadin/component-base/src/focus-mixin.js';
|
|
10
10
|
import { KeyboardMixin } from '@vaadin/component-base/src/keyboard-mixin.js';
|
|
11
|
+
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
11
12
|
import { FieldMixin } from '@vaadin/field-base/src/field-mixin.js';
|
|
12
13
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
14
|
|
|
@@ -114,6 +115,8 @@ class CustomField extends FieldMixin(FocusMixin(KeyboardMixin(ThemableMixin(Elem
|
|
|
114
115
|
<slot name="error-message"></slot>
|
|
115
116
|
</div>
|
|
116
117
|
</div>
|
|
118
|
+
|
|
119
|
+
<slot name="tooltip"></slot>
|
|
117
120
|
`;
|
|
118
121
|
}
|
|
119
122
|
|
|
@@ -224,6 +227,13 @@ class CustomField extends FieldMixin(FocusMixin(KeyboardMixin(ThemableMixin(Elem
|
|
|
224
227
|
this.__observer = new FlattenedNodesObserver(this.$.slot, () => {
|
|
225
228
|
this.__setInputsFromSlot();
|
|
226
229
|
});
|
|
230
|
+
|
|
231
|
+
this._tooltipController = new TooltipController(this);
|
|
232
|
+
this.addController(this._tooltipController);
|
|
233
|
+
this._tooltipController.setShouldShow((target) => {
|
|
234
|
+
const inputs = target.inputs || [];
|
|
235
|
+
return !inputs.some((el) => el.opened);
|
|
236
|
+
});
|
|
227
237
|
}
|
|
228
238
|
|
|
229
239
|
/** @protected */
|
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": "23.
|
|
4
|
+
"version": "23.3.0-alpha2",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"name": "value",
|
|
81
|
-
"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. Use the [`i18n`](https://cdn.vaadin.com/vaadin-web-components/23.
|
|
81
|
+
"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. Use the [`i18n`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha2/#/elements/vaadin-custom-field#property-i18n)\nproperty to customize this behavior.",
|
|
82
82
|
"value": {
|
|
83
83
|
"type": [
|
|
84
84
|
"string",
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
"name": "value",
|
|
172
|
-
"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. Use the [`i18n`](https://cdn.vaadin.com/vaadin-web-components/23.
|
|
172
|
+
"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. Use the [`i18n`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha2/#/elements/vaadin-custom-field#property-i18n)\nproperty to customize this behavior.",
|
|
173
173
|
"value": {
|
|
174
174
|
"type": [
|
|
175
175
|
"string",
|
package/web-types.lit.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": "23.
|
|
4
|
+
"version": "23.3.0-alpha2",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"name": ".value",
|
|
66
|
-
"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. Use the [`i18n`](https://cdn.vaadin.com/vaadin-web-components/23.
|
|
66
|
+
"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. Use the [`i18n`](https://cdn.vaadin.com/vaadin-web-components/23.3.0-alpha2/#/elements/vaadin-custom-field#property-i18n)\nproperty to customize this behavior.",
|
|
67
67
|
"value": {
|
|
68
68
|
"kind": "expression"
|
|
69
69
|
}
|