@vaadin/custom-field 25.3.0-alpha8 → 25.3.0-alpha9

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.
@@ -26,6 +26,20 @@
26
26
  "description": "",
27
27
  "name": "CustomFieldMixin",
28
28
  "members": [
29
+ {
30
+ "kind": "field",
31
+ "name": "accessibleDescriptionRef",
32
+ "privacy": "public",
33
+ "type": {
34
+ "text": "string"
35
+ },
36
+ "description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
37
+ "attribute": "accessible-description-ref",
38
+ "inheritedFrom": {
39
+ "name": "FieldMixin",
40
+ "package": "@vaadin/field-base/src/field-mixin.js"
41
+ }
42
+ },
29
43
  {
30
44
  "kind": "field",
31
45
  "name": "accessibleName",
@@ -33,7 +47,7 @@
33
47
  "type": {
34
48
  "text": "string"
35
49
  },
36
- "description": "String used to label the component to screen reader users.",
50
+ "description": "String used to label the component for screen reader users.",
37
51
  "attribute": "accessible-name",
38
52
  "inheritedFrom": {
39
53
  "name": "FieldMixin",
@@ -47,7 +61,7 @@
47
61
  "type": {
48
62
  "text": "string"
49
63
  },
50
- "description": "Id of the element used as label of the component to screen reader users.",
64
+ "description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
51
65
  "attribute": "accessible-name-ref",
52
66
  "inheritedFrom": {
53
67
  "name": "FieldMixin",
@@ -237,12 +251,24 @@
237
251
  }
238
252
  ],
239
253
  "attributes": [
254
+ {
255
+ "name": "accessible-description-ref",
256
+ "type": {
257
+ "text": "string"
258
+ },
259
+ "description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
260
+ "fieldName": "accessibleDescriptionRef",
261
+ "inheritedFrom": {
262
+ "name": "FieldMixin",
263
+ "package": "@vaadin/field-base/src/field-mixin.js"
264
+ }
265
+ },
240
266
  {
241
267
  "name": "accessible-name",
242
268
  "type": {
243
269
  "text": "string"
244
270
  },
245
- "description": "String used to label the component to screen reader users.",
271
+ "description": "String used to label the component for screen reader users.",
246
272
  "fieldName": "accessibleName",
247
273
  "inheritedFrom": {
248
274
  "name": "FieldMixin",
@@ -254,7 +280,7 @@
254
280
  "type": {
255
281
  "text": "string"
256
282
  },
257
- "description": "Id of the element used as label of the component to screen reader users.",
283
+ "description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
258
284
  "fieldName": "accessibleNameRef",
259
285
  "inheritedFrom": {
260
286
  "name": "FieldMixin",
@@ -407,6 +433,20 @@
407
433
  "description": "`<vaadin-custom-field>` is a web component for wrapping multiple components as a single field.\n\n```html\n<vaadin-custom-field label=\"Appointment time\">\n <vaadin-date-picker></vaadin-date-picker>\n <vaadin-time-picker></vaadin-time-picker>\n</vaadin-custom-field>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n`input-fields` | The slotted input elements wrapper\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n--------------------|--------------------------------\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`has-label` | Set when the element has a label\n`has-value` | Set when the element has a value\n`has-helper` | Set when the element has helper text\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n\nYou may also manually set `disabled` or `readonly` attribute on this component to make the label\npart look visually the same as on a `<vaadin-text-field>` when it is disabled or readonly.\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-required-indicator` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
408
434
  "name": "CustomField",
409
435
  "members": [
436
+ {
437
+ "kind": "field",
438
+ "name": "accessibleDescriptionRef",
439
+ "privacy": "public",
440
+ "type": {
441
+ "text": "string"
442
+ },
443
+ "description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
444
+ "attribute": "accessible-description-ref",
445
+ "inheritedFrom": {
446
+ "name": "FieldMixin",
447
+ "package": "@vaadin/field-base/src/field-mixin.js"
448
+ }
449
+ },
410
450
  {
411
451
  "kind": "field",
412
452
  "name": "accessibleName",
@@ -414,7 +454,7 @@
414
454
  "type": {
415
455
  "text": "string"
416
456
  },
417
- "description": "String used to label the component to screen reader users.",
457
+ "description": "String used to label the component for screen reader users.",
418
458
  "attribute": "accessible-name",
419
459
  "inheritedFrom": {
420
460
  "name": "FieldMixin",
@@ -428,7 +468,7 @@
428
468
  "type": {
429
469
  "text": "string"
430
470
  },
431
- "description": "Id of the element used as label of the component to screen reader users.",
471
+ "description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
432
472
  "attribute": "accessible-name-ref",
433
473
  "inheritedFrom": {
434
474
  "name": "FieldMixin",
@@ -654,12 +694,24 @@
654
694
  }
655
695
  ],
656
696
  "attributes": [
697
+ {
698
+ "name": "accessible-description-ref",
699
+ "type": {
700
+ "text": "string"
701
+ },
702
+ "description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
703
+ "fieldName": "accessibleDescriptionRef",
704
+ "inheritedFrom": {
705
+ "name": "FieldMixin",
706
+ "package": "@vaadin/field-base/src/field-mixin.js"
707
+ }
708
+ },
657
709
  {
658
710
  "name": "accessible-name",
659
711
  "type": {
660
712
  "text": "string"
661
713
  },
662
- "description": "String used to label the component to screen reader users.",
714
+ "description": "String used to label the component for screen reader users.",
663
715
  "fieldName": "accessibleName",
664
716
  "inheritedFrom": {
665
717
  "name": "FieldMixin",
@@ -671,7 +723,7 @@
671
723
  "type": {
672
724
  "text": "string"
673
725
  },
674
- "description": "Id of the element used as label of the component to screen reader users.",
726
+ "description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
675
727
  "fieldName": "accessibleNameRef",
676
728
  "inheritedFrom": {
677
729
  "name": "FieldMixin",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/custom-field",
3
- "version": "25.3.0-alpha8",
3
+ "version": "25.3.0-alpha9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,28 +35,28 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/a11y-base": "25.3.0-alpha8",
39
- "@vaadin/component-base": "25.3.0-alpha8",
40
- "@vaadin/field-base": "25.3.0-alpha8",
41
- "@vaadin/vaadin-themable-mixin": "25.3.0-alpha8",
38
+ "@vaadin/a11y-base": "25.3.0-alpha9",
39
+ "@vaadin/component-base": "25.3.0-alpha9",
40
+ "@vaadin/field-base": "25.3.0-alpha9",
41
+ "@vaadin/vaadin-themable-mixin": "25.3.0-alpha9",
42
42
  "lit": "^3.0.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@vaadin/aura": "25.3.0-alpha8",
46
- "@vaadin/chai-plugins": "25.3.0-alpha8",
47
- "@vaadin/combo-box": "25.3.0-alpha8",
48
- "@vaadin/date-picker": "25.3.0-alpha8",
49
- "@vaadin/email-field": "25.3.0-alpha8",
50
- "@vaadin/form-layout": "25.3.0-alpha8",
51
- "@vaadin/number-field": "25.3.0-alpha8",
52
- "@vaadin/password-field": "25.3.0-alpha8",
53
- "@vaadin/select": "25.3.0-alpha8",
54
- "@vaadin/test-runner-commands": "25.3.0-alpha8",
45
+ "@vaadin/aura": "25.3.0-alpha9",
46
+ "@vaadin/chai-plugins": "25.3.0-alpha9",
47
+ "@vaadin/combo-box": "25.3.0-alpha9",
48
+ "@vaadin/date-picker": "25.3.0-alpha9",
49
+ "@vaadin/email-field": "25.3.0-alpha9",
50
+ "@vaadin/form-layout": "25.3.0-alpha9",
51
+ "@vaadin/number-field": "25.3.0-alpha9",
52
+ "@vaadin/password-field": "25.3.0-alpha9",
53
+ "@vaadin/select": "25.3.0-alpha9",
54
+ "@vaadin/test-runner-commands": "25.3.0-alpha9",
55
55
  "@vaadin/testing-helpers": "^2.0.0",
56
- "@vaadin/text-area": "25.3.0-alpha8",
57
- "@vaadin/text-field": "25.3.0-alpha8",
58
- "@vaadin/time-picker": "25.3.0-alpha8",
59
- "@vaadin/vaadin-lumo-styles": "25.3.0-alpha8",
56
+ "@vaadin/text-area": "25.3.0-alpha9",
57
+ "@vaadin/text-field": "25.3.0-alpha9",
58
+ "@vaadin/time-picker": "25.3.0-alpha9",
59
+ "@vaadin/vaadin-lumo-styles": "25.3.0-alpha9",
60
60
  "sinon": "^22.0.0"
61
61
  },
62
62
  "customElements": "custom-elements.json",
@@ -64,5 +64,5 @@
64
64
  "web-types.json",
65
65
  "web-types.lit.json"
66
66
  ],
67
- "gitHead": "ccbb4aaffb63c745c6da0426b532d4d05e47af29"
67
+ "gitHead": "cb915ebde095ec5b94a87af93dd4530f51984c52"
68
68
  }
@@ -140,6 +140,16 @@ export const CustomFieldMixin = (superClass) =>
140
140
  });
141
141
  }
142
142
 
143
+ /** @protected */
144
+ updated(props) {
145
+ super.updated(props);
146
+
147
+ // Validate when the required constraint is removed.
148
+ if (props.has('required') && this.required === false) {
149
+ this._requestValidation();
150
+ }
151
+ }
152
+
143
153
  /**
144
154
  * @param {FocusOptions=} options
145
155
  * @protected
@@ -193,21 +203,6 @@ export const CustomFieldMixin = (superClass) =>
193
203
  return true;
194
204
  }
195
205
 
196
- /**
197
- * Override an observer from `FieldMixin`
198
- * to validate when required is removed.
199
- *
200
- * @protected
201
- * @override
202
- */
203
- _requiredChanged(required) {
204
- super._requiredChanged(required);
205
-
206
- if (required === false) {
207
- this._requestValidation();
208
- }
209
- }
210
-
211
206
  /**
212
207
  * @param {KeyboardEvent} e
213
208
  * @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": "25.3.0-alpha8",
4
+ "version": "25.3.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -10,9 +10,18 @@
10
10
  "name": "vaadin-custom-field",
11
11
  "description": "`<vaadin-custom-field>` is a web component for wrapping multiple components as a single field.\n\n```html\n<vaadin-custom-field label=\"Appointment time\">\n <vaadin-date-picker></vaadin-date-picker>\n <vaadin-time-picker></vaadin-time-picker>\n</vaadin-custom-field>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n`input-fields` | The slotted input elements wrapper\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n--------------------|--------------------------------\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`has-label` | Set when the element has a label\n`has-value` | Set when the element has a value\n`has-helper` | Set when the element has helper text\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n\nYou may also manually set `disabled` or `readonly` attribute on this component to make the label\npart look visually the same as on a `<vaadin-text-field>` when it is disabled or readonly.\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-required-indicator` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
+ {
14
+ "name": "accessible-description-ref",
15
+ "description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
16
+ "value": {
17
+ "type": [
18
+ "string"
19
+ ]
20
+ }
21
+ },
13
22
  {
14
23
  "name": "accessible-name",
15
- "description": "String used to label the component to screen reader users.",
24
+ "description": "String used to label the component for screen reader users.",
16
25
  "value": {
17
26
  "type": [
18
27
  "string"
@@ -21,7 +30,7 @@
21
30
  },
22
31
  {
23
32
  "name": "accessible-name-ref",
24
- "description": "Id of the element used as label of the component to screen reader users.",
33
+ "description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
25
34
  "value": {
26
35
  "type": [
27
36
  "string"
@@ -102,7 +111,7 @@
102
111
  },
103
112
  {
104
113
  "name": "value",
105
- "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/25.3.0-alpha8/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha8/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
114
+ "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/25.3.0-alpha9/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha9/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
106
115
  "value": {
107
116
  "type": [
108
117
  "string"
@@ -112,9 +121,18 @@
112
121
  ],
113
122
  "js": {
114
123
  "properties": [
124
+ {
125
+ "name": "accessibleDescriptionRef",
126
+ "description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
127
+ "value": {
128
+ "type": [
129
+ "string"
130
+ ]
131
+ }
132
+ },
115
133
  {
116
134
  "name": "accessibleName",
117
- "description": "String used to label the component to screen reader users.",
135
+ "description": "String used to label the component for screen reader users.",
118
136
  "value": {
119
137
  "type": [
120
138
  "string"
@@ -123,7 +141,7 @@
123
141
  },
124
142
  {
125
143
  "name": "accessibleNameRef",
126
- "description": "Id of the element used as label of the component to screen reader users.",
144
+ "description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
127
145
  "value": {
128
146
  "type": [
129
147
  "string"
@@ -215,7 +233,7 @@
215
233
  },
216
234
  {
217
235
  "name": "value",
218
- "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/25.3.0-alpha8/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha8/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
236
+ "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/25.3.0-alpha9/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha9/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
219
237
  "value": {
220
238
  "type": [
221
239
  "string"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/custom-field",
4
- "version": "25.3.0-alpha8",
4
+ "version": "25.3.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -19,16 +19,23 @@
19
19
  "description": "`<vaadin-custom-field>` is a web component for wrapping multiple components as a single field.\n\n```html\n<vaadin-custom-field label=\"Appointment time\">\n <vaadin-date-picker></vaadin-date-picker>\n <vaadin-time-picker></vaadin-time-picker>\n</vaadin-custom-field>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n`input-fields` | The slotted input elements wrapper\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n--------------------|--------------------------------\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`has-label` | Set when the element has a label\n`has-value` | Set when the element has a value\n`has-helper` | Set when the element has helper text\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n\nYou may also manually set `disabled` or `readonly` attribute on this component to make the label\npart look visually the same as on a `<vaadin-text-field>` when it is disabled or readonly.\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-required-indicator` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
+ {
23
+ "name": ".accessibleDescriptionRef",
24
+ "description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
25
+ "value": {
26
+ "kind": "expression"
27
+ }
28
+ },
22
29
  {
23
30
  "name": ".accessibleName",
24
- "description": "String used to label the component to screen reader users.",
31
+ "description": "String used to label the component for screen reader users.",
25
32
  "value": {
26
33
  "kind": "expression"
27
34
  }
28
35
  },
29
36
  {
30
37
  "name": ".accessibleNameRef",
31
- "description": "Id of the element used as label of the component to screen reader users.",
38
+ "description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
32
39
  "value": {
33
40
  "kind": "expression"
34
41
  }
@@ -98,7 +105,7 @@
98
105
  },
99
106
  {
100
107
  "name": ".value",
101
- "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/25.3.0-alpha8/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha8/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
108
+ "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/25.3.0-alpha9/#/elements/vaadin-custom-field#property-formatValue)\nand [`parseValue`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha9/#/elements/vaadin-custom-field#property-parseValue)\nproperties to customize this behavior.",
102
109
  "value": {
103
110
  "kind": "expression"
104
111
  }