@vaadin/radio-group 24.6.0-alpha7 → 24.6.0-alpha8
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 +9 -9
- package/src/vaadin-radio-group-mixin.d.ts +5 -0
- package/src/vaadin-radio-group-mixin.js +18 -3
- package/web-types.json +45 -1
- package/web-types.lit.json +15 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/radio-group",
|
|
3
|
-
"version": "24.6.0-
|
|
3
|
+
"version": "24.6.0-alpha8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
41
41
|
"@polymer/polymer": "^3.0.0",
|
|
42
|
-
"@vaadin/a11y-base": "24.6.0-
|
|
43
|
-
"@vaadin/component-base": "24.6.0-
|
|
44
|
-
"@vaadin/field-base": "24.6.0-
|
|
45
|
-
"@vaadin/vaadin-lumo-styles": "24.6.0-
|
|
46
|
-
"@vaadin/vaadin-material-styles": "24.6.0-
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "24.6.0-
|
|
42
|
+
"@vaadin/a11y-base": "24.6.0-alpha8",
|
|
43
|
+
"@vaadin/component-base": "24.6.0-alpha8",
|
|
44
|
+
"@vaadin/field-base": "24.6.0-alpha8",
|
|
45
|
+
"@vaadin/vaadin-lumo-styles": "24.6.0-alpha8",
|
|
46
|
+
"@vaadin/vaadin-material-styles": "24.6.0-alpha8",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "24.6.0-alpha8",
|
|
48
48
|
"lit": "^3.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@vaadin/chai-plugins": "24.6.0-
|
|
51
|
+
"@vaadin/chai-plugins": "24.6.0-alpha8",
|
|
52
52
|
"@vaadin/testing-helpers": "^1.0.0",
|
|
53
53
|
"sinon": "^18.0.0"
|
|
54
54
|
},
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"web-types.json",
|
|
57
57
|
"web-types.lit.json"
|
|
58
58
|
],
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "a11e1510c4caa08775b202714f5fc1198c22132a"
|
|
60
60
|
}
|
|
@@ -53,6 +53,11 @@ export declare function RadioGroupMixin<T extends Constructor<HTMLElement>>(
|
|
|
53
53
|
T;
|
|
54
54
|
|
|
55
55
|
export declare class RadioGroupMixinClass {
|
|
56
|
+
/**
|
|
57
|
+
* The name of the control, which is submitted with the form data.
|
|
58
|
+
*/
|
|
59
|
+
name: string | null | undefined;
|
|
60
|
+
|
|
56
61
|
/**
|
|
57
62
|
* The value of the radio group.
|
|
58
63
|
*/
|
|
@@ -24,6 +24,14 @@ export const RadioGroupMixin = (superclass) =>
|
|
|
24
24
|
class RadioGroupMixinClass extends FieldMixin(FocusMixin(DisabledMixin(KeyboardMixin(superclass)))) {
|
|
25
25
|
static get properties() {
|
|
26
26
|
return {
|
|
27
|
+
/**
|
|
28
|
+
* The name of the control, which is submitted with the form data.
|
|
29
|
+
*/
|
|
30
|
+
name: {
|
|
31
|
+
type: String,
|
|
32
|
+
observer: '__nameChanged',
|
|
33
|
+
},
|
|
34
|
+
|
|
27
35
|
/**
|
|
28
36
|
* The value of the radio group.
|
|
29
37
|
*
|
|
@@ -190,6 +198,13 @@ export const RadioGroupMixin = (superclass) =>
|
|
|
190
198
|
}
|
|
191
199
|
}
|
|
192
200
|
|
|
201
|
+
/** @private */
|
|
202
|
+
__nameChanged(name) {
|
|
203
|
+
this.__radioButtons.forEach((radioButton) => {
|
|
204
|
+
radioButton.name = name || this._fieldName;
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
193
208
|
/**
|
|
194
209
|
* @param {number} index
|
|
195
210
|
* @private
|
|
@@ -234,7 +249,7 @@ export const RadioGroupMixin = (superclass) =>
|
|
|
234
249
|
* @private
|
|
235
250
|
*/
|
|
236
251
|
__registerRadioButton(radioButton) {
|
|
237
|
-
radioButton.name = this._fieldName;
|
|
252
|
+
radioButton.name = this.name || this._fieldName;
|
|
238
253
|
radioButton.addEventListener('checked-changed', this.__onRadioButtonCheckedChange);
|
|
239
254
|
|
|
240
255
|
if (this.disabled || this.readonly) {
|
|
@@ -303,7 +318,7 @@ export const RadioGroupMixin = (superclass) =>
|
|
|
303
318
|
}
|
|
304
319
|
|
|
305
320
|
if (oldValue !== undefined) {
|
|
306
|
-
this.
|
|
321
|
+
this._requestValidation();
|
|
307
322
|
}
|
|
308
323
|
}
|
|
309
324
|
|
|
@@ -380,7 +395,7 @@ export const RadioGroupMixin = (superclass) =>
|
|
|
380
395
|
// Do not validate when focusout is caused by document
|
|
381
396
|
// losing focus, which happens on browser tab switch.
|
|
382
397
|
if (!focused && document.hasFocus()) {
|
|
383
|
-
this.
|
|
398
|
+
this._requestValidation();
|
|
384
399
|
}
|
|
385
400
|
}
|
|
386
401
|
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/radio-group",
|
|
4
|
-
"version": "24.6.0-
|
|
4
|
+
"version": "24.6.0-alpha8",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -198,6 +198,17 @@
|
|
|
198
198
|
]
|
|
199
199
|
}
|
|
200
200
|
},
|
|
201
|
+
{
|
|
202
|
+
"name": "manual-validation",
|
|
203
|
+
"description": "Set to true to enable manual validation mode. This mode disables automatic\nconstraint validation, allowing you to control the validation process yourself.\nYou can still trigger constraint validation manually with the `validate()` method\nor use `checkValidity()` to assess the component's validity without affecting\nthe invalid state. In manual validation mode, you can also manipulate\nthe `invalid` property directly through your application logic without conflicts\nwith the component's internal validation.",
|
|
204
|
+
"value": {
|
|
205
|
+
"type": [
|
|
206
|
+
"boolean",
|
|
207
|
+
"null",
|
|
208
|
+
"undefined"
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
},
|
|
201
212
|
{
|
|
202
213
|
"name": "required",
|
|
203
214
|
"description": "Specifies that the user must fill in a value.",
|
|
@@ -253,6 +264,17 @@
|
|
|
253
264
|
]
|
|
254
265
|
}
|
|
255
266
|
},
|
|
267
|
+
{
|
|
268
|
+
"name": "name",
|
|
269
|
+
"description": "The name of the control, which is submitted with the form data.",
|
|
270
|
+
"value": {
|
|
271
|
+
"type": [
|
|
272
|
+
"string",
|
|
273
|
+
"null",
|
|
274
|
+
"undefined"
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
},
|
|
256
278
|
{
|
|
257
279
|
"name": "value",
|
|
258
280
|
"description": "The value of the radio group.",
|
|
@@ -318,6 +340,17 @@
|
|
|
318
340
|
]
|
|
319
341
|
}
|
|
320
342
|
},
|
|
343
|
+
{
|
|
344
|
+
"name": "manualValidation",
|
|
345
|
+
"description": "Set to true to enable manual validation mode. This mode disables automatic\nconstraint validation, allowing you to control the validation process yourself.\nYou can still trigger constraint validation manually with the `validate()` method\nor use `checkValidity()` to assess the component's validity without affecting\nthe invalid state. In manual validation mode, you can also manipulate\nthe `invalid` property directly through your application logic without conflicts\nwith the component's internal validation.",
|
|
346
|
+
"value": {
|
|
347
|
+
"type": [
|
|
348
|
+
"boolean",
|
|
349
|
+
"null",
|
|
350
|
+
"undefined"
|
|
351
|
+
]
|
|
352
|
+
}
|
|
353
|
+
},
|
|
321
354
|
{
|
|
322
355
|
"name": "required",
|
|
323
356
|
"description": "Specifies that the user must fill in a value.",
|
|
@@ -373,6 +406,17 @@
|
|
|
373
406
|
]
|
|
374
407
|
}
|
|
375
408
|
},
|
|
409
|
+
{
|
|
410
|
+
"name": "name",
|
|
411
|
+
"description": "The name of the control, which is submitted with the form data.",
|
|
412
|
+
"value": {
|
|
413
|
+
"type": [
|
|
414
|
+
"string",
|
|
415
|
+
"null",
|
|
416
|
+
"undefined"
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
},
|
|
376
420
|
{
|
|
377
421
|
"name": "value",
|
|
378
422
|
"description": "The value of the radio group.",
|
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/radio-group",
|
|
4
|
-
"version": "24.6.0-
|
|
4
|
+
"version": "24.6.0-alpha8",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -96,6 +96,13 @@
|
|
|
96
96
|
"kind": "expression"
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
+
{
|
|
100
|
+
"name": "?manualValidation",
|
|
101
|
+
"description": "Set to true to enable manual validation mode. This mode disables automatic\nconstraint validation, allowing you to control the validation process yourself.\nYou can still trigger constraint validation manually with the `validate()` method\nor use `checkValidity()` to assess the component's validity without affecting\nthe invalid state. In manual validation mode, you can also manipulate\nthe `invalid` property directly through your application logic without conflicts\nwith the component's internal validation.",
|
|
102
|
+
"value": {
|
|
103
|
+
"kind": "expression"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
99
106
|
{
|
|
100
107
|
"name": "?required",
|
|
101
108
|
"description": "Specifies that the user must fill in a value.",
|
|
@@ -145,6 +152,13 @@
|
|
|
145
152
|
"kind": "expression"
|
|
146
153
|
}
|
|
147
154
|
},
|
|
155
|
+
{
|
|
156
|
+
"name": ".name",
|
|
157
|
+
"description": "The name of the control, which is submitted with the form data.",
|
|
158
|
+
"value": {
|
|
159
|
+
"kind": "expression"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
148
162
|
{
|
|
149
163
|
"name": ".value",
|
|
150
164
|
"description": "The value of the radio group.",
|