@vaadin/checkbox 25.3.0-alpha1 → 25.3.0-alpha11
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/custom-elements.json +108 -98
- package/package.json +10 -10
- package/src/styles/vaadin-checkbox-base-styles.js +0 -7
- package/src/vaadin-checkbox-mixin.d.ts +3 -12
- package/src/vaadin-checkbox-mixin.js +35 -71
- package/src/vaadin-checkbox.d.ts +9 -0
- package/src/vaadin-checkbox.js +43 -1
- package/web-types.json +31 -33
- package/web-types.lit.json +14 -14
package/custom-elements.json
CHANGED
|
@@ -26,6 +26,20 @@
|
|
|
26
26
|
"description": "A mixin providing common checkbox functionality.",
|
|
27
27
|
"name": "CheckboxMixin",
|
|
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
|
|
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": "
|
|
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",
|
|
@@ -147,16 +161,6 @@
|
|
|
147
161
|
"package": "@vaadin/field-base/src/field-mixin.js"
|
|
148
162
|
}
|
|
149
163
|
},
|
|
150
|
-
{
|
|
151
|
-
"kind": "field",
|
|
152
|
-
"name": "indeterminate",
|
|
153
|
-
"privacy": "public",
|
|
154
|
-
"type": {
|
|
155
|
-
"text": "boolean"
|
|
156
|
-
},
|
|
157
|
-
"description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Indeterminate_state_checkboxes",
|
|
158
|
-
"attribute": "indeterminate"
|
|
159
|
-
},
|
|
160
164
|
{
|
|
161
165
|
"kind": "field",
|
|
162
166
|
"name": "invalid",
|
|
@@ -206,7 +210,7 @@
|
|
|
206
210
|
"type": {
|
|
207
211
|
"text": "string"
|
|
208
212
|
},
|
|
209
|
-
"description": "The name of the
|
|
213
|
+
"description": "The name of the control, which is submitted with the form data.",
|
|
210
214
|
"attribute": "name"
|
|
211
215
|
},
|
|
212
216
|
{
|
|
@@ -216,7 +220,7 @@
|
|
|
216
220
|
"type": {
|
|
217
221
|
"text": "boolean"
|
|
218
222
|
},
|
|
219
|
-
"description": "When true, the user cannot modify the value of the
|
|
223
|
+
"description": "When true, the user cannot modify the value of the control.\nThe difference between `disabled` and `readonly` is that the\nread-only element remains focusable, is announced by screen\nreaders and its value can be submitted as part of the form.",
|
|
220
224
|
"attribute": "readonly"
|
|
221
225
|
},
|
|
222
226
|
{
|
|
@@ -256,7 +260,6 @@
|
|
|
256
260
|
},
|
|
257
261
|
"description": "The value of the field.",
|
|
258
262
|
"attribute": "value",
|
|
259
|
-
"default": "'on'",
|
|
260
263
|
"inheritedFrom": {
|
|
261
264
|
"name": "InputMixin",
|
|
262
265
|
"package": "@vaadin/field-base/src/input-mixin.js"
|
|
@@ -264,12 +267,24 @@
|
|
|
264
267
|
}
|
|
265
268
|
],
|
|
266
269
|
"attributes": [
|
|
270
|
+
{
|
|
271
|
+
"name": "accessible-description-ref",
|
|
272
|
+
"type": {
|
|
273
|
+
"text": "string"
|
|
274
|
+
},
|
|
275
|
+
"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.",
|
|
276
|
+
"fieldName": "accessibleDescriptionRef",
|
|
277
|
+
"inheritedFrom": {
|
|
278
|
+
"name": "FieldMixin",
|
|
279
|
+
"package": "@vaadin/field-base/src/field-mixin.js"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
267
282
|
{
|
|
268
283
|
"name": "accessible-name",
|
|
269
284
|
"type": {
|
|
270
285
|
"text": "string"
|
|
271
286
|
},
|
|
272
|
-
"description": "String used to label the component
|
|
287
|
+
"description": "String used to label the component for screen reader users.",
|
|
273
288
|
"fieldName": "accessibleName",
|
|
274
289
|
"inheritedFrom": {
|
|
275
290
|
"name": "FieldMixin",
|
|
@@ -281,7 +296,7 @@
|
|
|
281
296
|
"type": {
|
|
282
297
|
"text": "string"
|
|
283
298
|
},
|
|
284
|
-
"description": "
|
|
299
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
285
300
|
"fieldName": "accessibleNameRef",
|
|
286
301
|
"inheritedFrom": {
|
|
287
302
|
"name": "FieldMixin",
|
|
@@ -348,14 +363,6 @@
|
|
|
348
363
|
"package": "@vaadin/field-base/src/field-mixin.js"
|
|
349
364
|
}
|
|
350
365
|
},
|
|
351
|
-
{
|
|
352
|
-
"name": "indeterminate",
|
|
353
|
-
"type": {
|
|
354
|
-
"text": "boolean"
|
|
355
|
-
},
|
|
356
|
-
"description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Indeterminate_state_checkboxes",
|
|
357
|
-
"fieldName": "indeterminate"
|
|
358
|
-
},
|
|
359
366
|
{
|
|
360
367
|
"name": "invalid",
|
|
361
368
|
"type": {
|
|
@@ -397,7 +404,7 @@
|
|
|
397
404
|
"type": {
|
|
398
405
|
"text": "string"
|
|
399
406
|
},
|
|
400
|
-
"description": "The name of the
|
|
407
|
+
"description": "The name of the control, which is submitted with the form data.",
|
|
401
408
|
"fieldName": "name"
|
|
402
409
|
},
|
|
403
410
|
{
|
|
@@ -405,7 +412,7 @@
|
|
|
405
412
|
"type": {
|
|
406
413
|
"text": "boolean"
|
|
407
414
|
},
|
|
408
|
-
"description": "When true, the user cannot modify the value of the
|
|
415
|
+
"description": "When true, the user cannot modify the value of the control.\nThe difference between `disabled` and `readonly` is that the\nread-only element remains focusable, is announced by screen\nreaders and its value can be submitted as part of the form.",
|
|
409
416
|
"fieldName": "readonly"
|
|
410
417
|
},
|
|
411
418
|
{
|
|
@@ -494,6 +501,20 @@
|
|
|
494
501
|
"description": "`<vaadin-checkbox>` is an input field representing a binary choice.\n\n```html\n<vaadin-checkbox label=\"I accept the terms and conditions\"></vaadin-checkbox>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|-------------\n`checkbox` | The element representing a stylable custom checkbox\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\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|-------------\n`active` | Set when the checkbox is activated with mouse, touch or the keyboard.\n`checked` | Set when the checkbox is checked.\n`disabled` | Set when the checkbox is disabled.\n`readonly` | Set when the checkbox is readonly.\n`focus-ring` | Set when the checkbox is focused using the keyboard.\n`focused` | Set when the checkbox is focused.\n`indeterminate` | Set when the checkbox is in the indeterminate state.\n`invalid` | Set when the checkbox is invalid.\n`has-label` | Set when the checkbox has a label.\n`has-helper` | Set when the checkbox has helper text.\n`has-error-message` | Set when the checkbox has an error message.\n`has-tooltip` | Set when the checkbox has a slotted tooltip.\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-checkbox-background` |\n| `--vaadin-checkbox-border-color` |\n| `--vaadin-checkbox-border-radius` |\n| `--vaadin-checkbox-border-width` |\n| `--vaadin-checkbox-gap` |\n| `--vaadin-checkbox-label-color` |\n| `--vaadin-checkbox-label-font-size` |\n| `--vaadin-checkbox-label-font-weight` |\n| `--vaadin-checkbox-label-line-height` |\n| `--vaadin-checkbox-marker-color` |\n| `--vaadin-checkbox-marker-size` |\n| `--vaadin-checkbox-size` |\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-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` |\n| `--vaadin-input-field-required-indicator-color` |\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
495
502
|
"name": "Checkbox",
|
|
496
503
|
"members": [
|
|
504
|
+
{
|
|
505
|
+
"kind": "field",
|
|
506
|
+
"name": "accessibleDescriptionRef",
|
|
507
|
+
"privacy": "public",
|
|
508
|
+
"type": {
|
|
509
|
+
"text": "string"
|
|
510
|
+
},
|
|
511
|
+
"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.",
|
|
512
|
+
"attribute": "accessible-description-ref",
|
|
513
|
+
"inheritedFrom": {
|
|
514
|
+
"name": "FieldMixin",
|
|
515
|
+
"package": "@vaadin/field-base/src/field-mixin.js"
|
|
516
|
+
}
|
|
517
|
+
},
|
|
497
518
|
{
|
|
498
519
|
"kind": "field",
|
|
499
520
|
"name": "accessibleName",
|
|
@@ -501,7 +522,7 @@
|
|
|
501
522
|
"type": {
|
|
502
523
|
"text": "string"
|
|
503
524
|
},
|
|
504
|
-
"description": "String used to label the component
|
|
525
|
+
"description": "String used to label the component for screen reader users.",
|
|
505
526
|
"attribute": "accessible-name",
|
|
506
527
|
"inheritedFrom": {
|
|
507
528
|
"name": "FieldMixin",
|
|
@@ -515,7 +536,7 @@
|
|
|
515
536
|
"type": {
|
|
516
537
|
"text": "string"
|
|
517
538
|
},
|
|
518
|
-
"description": "
|
|
539
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
519
540
|
"attribute": "accessible-name-ref",
|
|
520
541
|
"inheritedFrom": {
|
|
521
542
|
"name": "FieldMixin",
|
|
@@ -621,12 +642,8 @@
|
|
|
621
642
|
"type": {
|
|
622
643
|
"text": "boolean"
|
|
623
644
|
},
|
|
624
|
-
"description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/
|
|
625
|
-
"attribute": "indeterminate"
|
|
626
|
-
"inheritedFrom": {
|
|
627
|
-
"name": "CheckboxMixin",
|
|
628
|
-
"module": "src/vaadin-checkbox-mixin.js"
|
|
629
|
-
}
|
|
645
|
+
"description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/checkbox#indeterminate_state_checkboxes",
|
|
646
|
+
"attribute": "indeterminate"
|
|
630
647
|
},
|
|
631
648
|
{
|
|
632
649
|
"kind": "field",
|
|
@@ -677,7 +694,7 @@
|
|
|
677
694
|
"type": {
|
|
678
695
|
"text": "string"
|
|
679
696
|
},
|
|
680
|
-
"description": "The name of the
|
|
697
|
+
"description": "The name of the control, which is submitted with the form data.",
|
|
681
698
|
"attribute": "name",
|
|
682
699
|
"inheritedFrom": {
|
|
683
700
|
"name": "CheckboxMixin",
|
|
@@ -691,7 +708,7 @@
|
|
|
691
708
|
"type": {
|
|
692
709
|
"text": "boolean"
|
|
693
710
|
},
|
|
694
|
-
"description": "When true, the user cannot modify the value of the
|
|
711
|
+
"description": "When true, the user cannot modify the value of the control.\nThe difference between `disabled` and `readonly` is that the\nread-only element remains focusable, is announced by screen\nreaders and its value can be submitted as part of the form.",
|
|
695
712
|
"attribute": "readonly",
|
|
696
713
|
"inheritedFrom": {
|
|
697
714
|
"name": "CheckboxMixin",
|
|
@@ -712,18 +729,6 @@
|
|
|
712
729
|
"package": "@vaadin/field-base/src/validate-mixin.js"
|
|
713
730
|
}
|
|
714
731
|
},
|
|
715
|
-
{
|
|
716
|
-
"kind": "field",
|
|
717
|
-
"name": "tabindex",
|
|
718
|
-
"type": {
|
|
719
|
-
"text": "number"
|
|
720
|
-
},
|
|
721
|
-
"default": "0",
|
|
722
|
-
"inheritedFrom": {
|
|
723
|
-
"name": "CheckboxMixin",
|
|
724
|
-
"module": "src/vaadin-checkbox-mixin.js"
|
|
725
|
-
}
|
|
726
|
-
},
|
|
727
732
|
{
|
|
728
733
|
"kind": "method",
|
|
729
734
|
"name": "validate",
|
|
@@ -741,13 +746,15 @@
|
|
|
741
746
|
{
|
|
742
747
|
"kind": "field",
|
|
743
748
|
"name": "value",
|
|
749
|
+
"privacy": "public",
|
|
744
750
|
"type": {
|
|
745
751
|
"text": "string"
|
|
746
752
|
},
|
|
747
|
-
"
|
|
753
|
+
"description": "The value of the field.",
|
|
754
|
+
"attribute": "value",
|
|
748
755
|
"inheritedFrom": {
|
|
749
|
-
"name": "
|
|
750
|
-
"
|
|
756
|
+
"name": "InputMixin",
|
|
757
|
+
"package": "@vaadin/field-base/src/input-mixin.js"
|
|
751
758
|
}
|
|
752
759
|
}
|
|
753
760
|
],
|
|
@@ -788,41 +795,25 @@
|
|
|
788
795
|
"name": "validated"
|
|
789
796
|
}
|
|
790
797
|
],
|
|
791
|
-
"
|
|
792
|
-
{
|
|
793
|
-
"name": "CheckboxMixin",
|
|
794
|
-
"module": "src/vaadin-checkbox-mixin.js"
|
|
795
|
-
},
|
|
796
|
-
{
|
|
797
|
-
"name": "ElementMixin",
|
|
798
|
-
"package": "@vaadin/component-base/src/element-mixin.js"
|
|
799
|
-
},
|
|
800
|
-
{
|
|
801
|
-
"name": "ThemableMixin",
|
|
802
|
-
"package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
|
|
803
|
-
},
|
|
798
|
+
"attributes": [
|
|
804
799
|
{
|
|
805
|
-
"name": "
|
|
806
|
-
"
|
|
800
|
+
"name": "accessible-description-ref",
|
|
801
|
+
"type": {
|
|
802
|
+
"text": "string"
|
|
803
|
+
},
|
|
804
|
+
"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.",
|
|
805
|
+
"fieldName": "accessibleDescriptionRef",
|
|
806
|
+
"inheritedFrom": {
|
|
807
|
+
"name": "FieldMixin",
|
|
808
|
+
"package": "@vaadin/field-base/src/field-mixin.js"
|
|
809
|
+
}
|
|
807
810
|
},
|
|
808
|
-
{
|
|
809
|
-
"name": "LumoInjectionMixin",
|
|
810
|
-
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
811
|
-
}
|
|
812
|
-
],
|
|
813
|
-
"superclass": {
|
|
814
|
-
"name": "LitElement",
|
|
815
|
-
"package": "lit"
|
|
816
|
-
},
|
|
817
|
-
"tagName": "vaadin-checkbox",
|
|
818
|
-
"customElement": true,
|
|
819
|
-
"attributes": [
|
|
820
811
|
{
|
|
821
812
|
"name": "accessible-name",
|
|
822
813
|
"type": {
|
|
823
814
|
"text": "string"
|
|
824
815
|
},
|
|
825
|
-
"description": "String used to label the component
|
|
816
|
+
"description": "String used to label the component for screen reader users.",
|
|
826
817
|
"fieldName": "accessibleName",
|
|
827
818
|
"inheritedFrom": {
|
|
828
819
|
"name": "FieldMixin",
|
|
@@ -834,7 +825,7 @@
|
|
|
834
825
|
"type": {
|
|
835
826
|
"text": "string"
|
|
836
827
|
},
|
|
837
|
-
"description": "
|
|
828
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
838
829
|
"fieldName": "accessibleNameRef",
|
|
839
830
|
"inheritedFrom": {
|
|
840
831
|
"name": "FieldMixin",
|
|
@@ -906,12 +897,8 @@
|
|
|
906
897
|
"type": {
|
|
907
898
|
"text": "boolean"
|
|
908
899
|
},
|
|
909
|
-
"description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/
|
|
910
|
-
"fieldName": "indeterminate"
|
|
911
|
-
"inheritedFrom": {
|
|
912
|
-
"name": "CheckboxMixin",
|
|
913
|
-
"module": "src/vaadin-checkbox-mixin.js"
|
|
914
|
-
}
|
|
900
|
+
"description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/checkbox#indeterminate_state_checkboxes",
|
|
901
|
+
"fieldName": "indeterminate"
|
|
915
902
|
},
|
|
916
903
|
{
|
|
917
904
|
"name": "invalid",
|
|
@@ -954,7 +941,7 @@
|
|
|
954
941
|
"type": {
|
|
955
942
|
"text": "string"
|
|
956
943
|
},
|
|
957
|
-
"description": "The name of the
|
|
944
|
+
"description": "The name of the control, which is submitted with the form data.",
|
|
958
945
|
"fieldName": "name",
|
|
959
946
|
"inheritedFrom": {
|
|
960
947
|
"name": "CheckboxMixin",
|
|
@@ -966,7 +953,7 @@
|
|
|
966
953
|
"type": {
|
|
967
954
|
"text": "boolean"
|
|
968
955
|
},
|
|
969
|
-
"description": "When true, the user cannot modify the value of the
|
|
956
|
+
"description": "When true, the user cannot modify the value of the control.\nThe difference between `disabled` and `readonly` is that the\nread-only element remains focusable, is announced by screen\nreaders and its value can be submitted as part of the form.",
|
|
970
957
|
"fieldName": "readonly",
|
|
971
958
|
"inheritedFrom": {
|
|
972
959
|
"name": "CheckboxMixin",
|
|
@@ -986,16 +973,11 @@
|
|
|
986
973
|
}
|
|
987
974
|
},
|
|
988
975
|
{
|
|
989
|
-
"name": "tabindex",
|
|
990
976
|
"type": {
|
|
991
|
-
"text": "
|
|
977
|
+
"text": "string"
|
|
992
978
|
},
|
|
993
|
-
"description": "
|
|
994
|
-
"
|
|
995
|
-
"inheritedFrom": {
|
|
996
|
-
"name": "TabindexMixin",
|
|
997
|
-
"package": "@vaadin/a11y-base/src/tabindex-mixin.js"
|
|
998
|
-
}
|
|
979
|
+
"description": "The theme variants to apply to the component.",
|
|
980
|
+
"name": "theme"
|
|
999
981
|
},
|
|
1000
982
|
{
|
|
1001
983
|
"name": "value",
|
|
@@ -1009,7 +991,35 @@
|
|
|
1009
991
|
"package": "@vaadin/field-base/src/input-mixin.js"
|
|
1010
992
|
}
|
|
1011
993
|
}
|
|
1012
|
-
]
|
|
994
|
+
],
|
|
995
|
+
"mixins": [
|
|
996
|
+
{
|
|
997
|
+
"name": "CheckboxMixin",
|
|
998
|
+
"module": "src/vaadin-checkbox-mixin.js"
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
"name": "ElementMixin",
|
|
1002
|
+
"package": "@vaadin/component-base/src/element-mixin.js"
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"name": "ThemableMixin",
|
|
1006
|
+
"package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
"name": "PolylitMixin",
|
|
1010
|
+
"package": "@vaadin/component-base/src/polylit-mixin.js"
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
"name": "LumoInjectionMixin",
|
|
1014
|
+
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
1015
|
+
}
|
|
1016
|
+
],
|
|
1017
|
+
"superclass": {
|
|
1018
|
+
"name": "LitElement",
|
|
1019
|
+
"package": "lit"
|
|
1020
|
+
},
|
|
1021
|
+
"tagName": "vaadin-checkbox",
|
|
1022
|
+
"customElement": true
|
|
1013
1023
|
}
|
|
1014
1024
|
],
|
|
1015
1025
|
"exports": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/checkbox",
|
|
3
|
-
"version": "25.3.0-
|
|
3
|
+
"version": "25.3.0-alpha11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.3.0-
|
|
39
|
-
"@vaadin/component-base": "25.3.0-
|
|
40
|
-
"@vaadin/field-base": "25.3.0-
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "25.3.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.3.0-alpha11",
|
|
39
|
+
"@vaadin/component-base": "25.3.0-alpha11",
|
|
40
|
+
"@vaadin/field-base": "25.3.0-alpha11",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "25.3.0-alpha11",
|
|
42
42
|
"lit": "^3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@vaadin/aura": "25.3.0-
|
|
46
|
-
"@vaadin/chai-plugins": "25.3.0-
|
|
47
|
-
"@vaadin/test-runner-commands": "25.3.0-
|
|
45
|
+
"@vaadin/aura": "25.3.0-alpha11",
|
|
46
|
+
"@vaadin/chai-plugins": "25.3.0-alpha11",
|
|
47
|
+
"@vaadin/test-runner-commands": "25.3.0-alpha11",
|
|
48
48
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
49
|
-
"@vaadin/vaadin-lumo-styles": "25.3.0-
|
|
49
|
+
"@vaadin/vaadin-lumo-styles": "25.3.0-alpha11",
|
|
50
50
|
"sinon": "^22.0.0"
|
|
51
51
|
},
|
|
52
52
|
"customElements": "custom-elements.json",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"web-types.json",
|
|
55
55
|
"web-types.lit.json"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "7e0c61a37e68d8971def9cdf28ad0548a0f530a9"
|
|
58
58
|
}
|
|
@@ -20,13 +20,6 @@ const checkbox = css`
|
|
|
20
20
|
filter: var(--vaadin-checkbox-checkmark-color, var(--_filter));
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
:host([readonly]) {
|
|
24
|
-
--vaadin-checkbox-background: transparent;
|
|
25
|
-
--vaadin-checkbox-border-color: var(--vaadin-border-color);
|
|
26
|
-
--vaadin-checkbox-marker-color: var(--vaadin-text-color);
|
|
27
|
-
--_border-style: dashed;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
23
|
:host([indeterminate]) [part='checkbox']::after {
|
|
31
24
|
mask-image: var(--_vaadin-icon-minus);
|
|
32
25
|
}
|
|
@@ -39,23 +39,14 @@ export declare function CheckboxMixin<T extends Constructor<HTMLElement>>(
|
|
|
39
39
|
|
|
40
40
|
export declare class CheckboxMixinClass {
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
* it is not possible to say whether it is checked or unchecked.
|
|
44
|
-
* The state is reset once the user switches the checkbox by hand.
|
|
45
|
-
*
|
|
46
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Indeterminate_state_checkboxes
|
|
47
|
-
*/
|
|
48
|
-
indeterminate: boolean;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* The name of the checkbox.
|
|
42
|
+
* The name of the control, which is submitted with the form data.
|
|
52
43
|
*/
|
|
53
44
|
name: string;
|
|
54
45
|
|
|
55
46
|
/**
|
|
56
|
-
* When true, the user cannot modify the value of the
|
|
47
|
+
* When true, the user cannot modify the value of the control.
|
|
57
48
|
* The difference between `disabled` and `readonly` is that the
|
|
58
|
-
* read-only
|
|
49
|
+
* read-only element remains focusable, is announced by screen
|
|
59
50
|
* readers and its value can be submitted as part of the form.
|
|
60
51
|
*/
|
|
61
52
|
readonly: boolean;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';
|
|
7
7
|
import { DelegateFocusMixin } from '@vaadin/a11y-base/src/delegate-focus-mixin.js';
|
|
8
|
+
import { setOrRemoveAttribute } from '@vaadin/component-base/src/dom-utils.js';
|
|
8
9
|
import { SlotStylesMixin } from '@vaadin/component-base/src/slot-styles-mixin.js';
|
|
9
10
|
import { CheckedMixin } from '@vaadin/field-base/src/checked-mixin.js';
|
|
10
11
|
import { FieldMixin } from '@vaadin/field-base/src/field-mixin.js';
|
|
@@ -21,21 +22,7 @@ export const CheckboxMixin = (superclass) =>
|
|
|
21
22
|
static get properties() {
|
|
22
23
|
return {
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
-
* it is not possible to say whether it is checked or unchecked.
|
|
26
|
-
* The state is reset once the user switches the checkbox by hand.
|
|
27
|
-
*
|
|
28
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Indeterminate_state_checkboxes
|
|
29
|
-
*/
|
|
30
|
-
indeterminate: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
notify: true,
|
|
33
|
-
value: false,
|
|
34
|
-
reflectToAttribute: true,
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* The name of the checkbox.
|
|
25
|
+
* The name of the control, which is submitted with the form data.
|
|
39
26
|
*/
|
|
40
27
|
name: {
|
|
41
28
|
type: String,
|
|
@@ -43,9 +30,9 @@ export const CheckboxMixin = (superclass) =>
|
|
|
43
30
|
},
|
|
44
31
|
|
|
45
32
|
/**
|
|
46
|
-
* When true, the user cannot modify the value of the
|
|
33
|
+
* When true, the user cannot modify the value of the control.
|
|
47
34
|
* The difference between `disabled` and `readonly` is that the
|
|
48
|
-
* read-only
|
|
35
|
+
* read-only element remains focusable, is announced by screen
|
|
49
36
|
* readers and its value can be submitted as part of the form.
|
|
50
37
|
*/
|
|
51
38
|
readonly: {
|
|
@@ -60,11 +47,6 @@ export const CheckboxMixin = (superclass) =>
|
|
|
60
47
|
return ['__readonlyChanged(readonly, inputElement)'];
|
|
61
48
|
}
|
|
62
49
|
|
|
63
|
-
/** @override */
|
|
64
|
-
static get delegateProps() {
|
|
65
|
-
return [...super.delegateProps, 'indeterminate'];
|
|
66
|
-
}
|
|
67
|
-
|
|
68
50
|
/** @override */
|
|
69
51
|
static get delegateAttrs() {
|
|
70
52
|
return [...super.delegateAttrs, 'name', 'invalid', 'required'];
|
|
@@ -77,12 +59,18 @@ export const CheckboxMixin = (superclass) =>
|
|
|
77
59
|
|
|
78
60
|
this._boundOnInputClick = this._onInputClick.bind(this);
|
|
79
61
|
|
|
80
|
-
|
|
81
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Set the string "on" as the default value for the checkbox following the HTML specification:
|
|
64
|
+
* https://html.spec.whatwg.org/multipage/input.html#dom-input-value-default-on
|
|
65
|
+
* @internal to not document it in CEM
|
|
66
|
+
*/
|
|
82
67
|
this.value = 'on';
|
|
83
68
|
|
|
84
|
-
|
|
85
|
-
|
|
69
|
+
/**
|
|
70
|
+
* Set tabindex to 0 by default to not lose focus on click in Safari
|
|
71
|
+
* See https://github.com/vaadin/web-components/pull/6780
|
|
72
|
+
* @internal to not document it in CEM
|
|
73
|
+
*/
|
|
86
74
|
this.tabindex = 0;
|
|
87
75
|
}
|
|
88
76
|
|
|
@@ -118,10 +106,19 @@ export const CheckboxMixin = (superclass) =>
|
|
|
118
106
|
this._createPropertyObserver('checked', '_checkedChanged');
|
|
119
107
|
}
|
|
120
108
|
|
|
109
|
+
/** @protected */
|
|
110
|
+
updated(props) {
|
|
111
|
+
super.updated(props);
|
|
112
|
+
|
|
113
|
+
// Validate when the required constraint is removed.
|
|
114
|
+
if (props.has('required') && this.required === false) {
|
|
115
|
+
this._requestValidation();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
121
119
|
/**
|
|
122
|
-
* Override method inherited from `ActiveMixin` to
|
|
123
|
-
* attribute
|
|
124
|
-
* or when clicking slotted helper or error message element.
|
|
120
|
+
* Override method inherited from `ActiveMixin` to only set the `active`
|
|
121
|
+
* attribute for clicks that actually toggle the checked state.
|
|
125
122
|
*
|
|
126
123
|
* @param {Event} event
|
|
127
124
|
* @return {boolean}
|
|
@@ -129,12 +126,14 @@ export const CheckboxMixin = (superclass) =>
|
|
|
129
126
|
* @override
|
|
130
127
|
*/
|
|
131
128
|
_shouldSetActive(event) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
129
|
+
const [target] = event.composedPath();
|
|
130
|
+
|
|
131
|
+
const togglesChecked =
|
|
132
|
+
target === this.inputElement ||
|
|
133
|
+
target.part.contains('required-indicator') ||
|
|
134
|
+
(this._labelNode.contains(target) && !target.closest('a'));
|
|
135
|
+
|
|
136
|
+
if (this.readonly || !togglesChecked) {
|
|
138
137
|
return false;
|
|
139
138
|
}
|
|
140
139
|
|
|
@@ -180,27 +179,7 @@ export const CheckboxMixin = (superclass) =>
|
|
|
180
179
|
}
|
|
181
180
|
|
|
182
181
|
// Use aria-readonly since native checkbox doesn't support readonly
|
|
183
|
-
|
|
184
|
-
inputElement.setAttribute('aria-readonly', 'true');
|
|
185
|
-
} else {
|
|
186
|
-
inputElement.removeAttribute('aria-readonly');
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Override method inherited from `CheckedMixin` to reset
|
|
192
|
-
* `indeterminate` state checkbox is toggled by the user.
|
|
193
|
-
*
|
|
194
|
-
* @param {boolean} checked
|
|
195
|
-
* @protected
|
|
196
|
-
* @override
|
|
197
|
-
*/
|
|
198
|
-
_toggleChecked(checked) {
|
|
199
|
-
if (this.indeterminate) {
|
|
200
|
-
this.indeterminate = false;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
super._toggleChecked(checked);
|
|
182
|
+
setOrRemoveAttribute(inputElement, 'aria-readonly', readonly);
|
|
204
183
|
}
|
|
205
184
|
|
|
206
185
|
/**
|
|
@@ -233,21 +212,6 @@ export const CheckboxMixin = (superclass) =>
|
|
|
233
212
|
}
|
|
234
213
|
}
|
|
235
214
|
|
|
236
|
-
/**
|
|
237
|
-
* Override an observer from `FieldMixin`
|
|
238
|
-
* to validate when required is removed.
|
|
239
|
-
*
|
|
240
|
-
* @protected
|
|
241
|
-
* @override
|
|
242
|
-
*/
|
|
243
|
-
_requiredChanged(required) {
|
|
244
|
-
super._requiredChanged(required);
|
|
245
|
-
|
|
246
|
-
if (required === false) {
|
|
247
|
-
this._requestValidation();
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
215
|
/** @private */
|
|
252
216
|
_onRequiredIndicatorClick() {
|
|
253
217
|
this._labelNode.click();
|
package/src/vaadin-checkbox.d.ts
CHANGED
|
@@ -120,6 +120,15 @@ export interface CheckboxEventMap extends HTMLElementEventMap, CheckboxCustomEve
|
|
|
120
120
|
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
121
121
|
*/
|
|
122
122
|
declare class Checkbox extends CheckboxMixin(ElementMixin(ThemableMixin(HTMLElement))) {
|
|
123
|
+
/**
|
|
124
|
+
* True if the checkbox is in the indeterminate state which means
|
|
125
|
+
* it is not possible to say whether it is checked or unchecked.
|
|
126
|
+
* The state is reset once the user switches the checkbox by hand.
|
|
127
|
+
*
|
|
128
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/checkbox#indeterminate_state_checkboxes
|
|
129
|
+
*/
|
|
130
|
+
indeterminate: boolean;
|
|
131
|
+
|
|
123
132
|
addEventListener<K extends keyof CheckboxEventMap>(
|
|
124
133
|
type: K,
|
|
125
134
|
listener: (this: Checkbox, ev: CheckboxEventMap[K]) => void,
|
package/src/vaadin-checkbox.js
CHANGED
|
@@ -84,10 +84,11 @@ import { CheckboxMixin } from './vaadin-checkbox-mixin.js';
|
|
|
84
84
|
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
|
|
85
85
|
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
86
86
|
*
|
|
87
|
+
* @attr {string} theme - The theme variants to apply to the component.
|
|
87
88
|
* @customElement vaadin-checkbox
|
|
88
89
|
* @extends HTMLElement
|
|
89
90
|
*/
|
|
90
|
-
|
|
91
|
+
class Checkbox extends CheckboxMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
|
|
91
92
|
static get is() {
|
|
92
93
|
return 'vaadin-checkbox';
|
|
93
94
|
}
|
|
@@ -96,6 +97,29 @@ export class Checkbox extends CheckboxMixin(ElementMixin(ThemableMixin(PolylitMi
|
|
|
96
97
|
return checkboxStyles;
|
|
97
98
|
}
|
|
98
99
|
|
|
100
|
+
static get properties() {
|
|
101
|
+
return {
|
|
102
|
+
/**
|
|
103
|
+
* True if the checkbox is in the indeterminate state which means
|
|
104
|
+
* it is not possible to say whether it is checked or unchecked.
|
|
105
|
+
* The state is reset once the user switches the checkbox by hand.
|
|
106
|
+
*
|
|
107
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/checkbox#indeterminate_state_checkboxes
|
|
108
|
+
*/
|
|
109
|
+
indeterminate: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
notify: true,
|
|
112
|
+
value: false,
|
|
113
|
+
reflectToAttribute: true,
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** @override */
|
|
119
|
+
static get delegateProps() {
|
|
120
|
+
return [...super.delegateProps, 'indeterminate'];
|
|
121
|
+
}
|
|
122
|
+
|
|
99
123
|
/** @protected */
|
|
100
124
|
render() {
|
|
101
125
|
return html`
|
|
@@ -125,6 +149,24 @@ export class Checkbox extends CheckboxMixin(ElementMixin(ThemableMixin(PolylitMi
|
|
|
125
149
|
this._tooltipController.setAriaTarget(this.inputElement);
|
|
126
150
|
this.addController(this._tooltipController);
|
|
127
151
|
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Override method inherited from `CheckedMixin` to reset
|
|
155
|
+
* `indeterminate` when the checkbox is toggled by the user.
|
|
156
|
+
*
|
|
157
|
+
* @param {boolean} checked
|
|
158
|
+
* @protected
|
|
159
|
+
* @override
|
|
160
|
+
*/
|
|
161
|
+
_toggleChecked(checked) {
|
|
162
|
+
if (this.indeterminate) {
|
|
163
|
+
this.indeterminate = false;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
super._toggleChecked(checked);
|
|
167
|
+
}
|
|
128
168
|
}
|
|
129
169
|
|
|
130
170
|
defineCustomElement(Checkbox);
|
|
171
|
+
|
|
172
|
+
export { Checkbox };
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/checkbox",
|
|
4
|
-
"version": "25.3.0-
|
|
4
|
+
"version": "25.3.0-alpha11",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -10,9 +10,18 @@
|
|
|
10
10
|
"name": "vaadin-checkbox",
|
|
11
11
|
"description": "`<vaadin-checkbox>` is an input field representing a binary choice.\n\n```html\n<vaadin-checkbox label=\"I accept the terms and conditions\"></vaadin-checkbox>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|-------------\n`checkbox` | The element representing a stylable custom checkbox\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\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|-------------\n`active` | Set when the checkbox is activated with mouse, touch or the keyboard.\n`checked` | Set when the checkbox is checked.\n`disabled` | Set when the checkbox is disabled.\n`readonly` | Set when the checkbox is readonly.\n`focus-ring` | Set when the checkbox is focused using the keyboard.\n`focused` | Set when the checkbox is focused.\n`indeterminate` | Set when the checkbox is in the indeterminate state.\n`invalid` | Set when the checkbox is invalid.\n`has-label` | Set when the checkbox has a label.\n`has-helper` | Set when the checkbox has helper text.\n`has-error-message` | Set when the checkbox has an error message.\n`has-tooltip` | Set when the checkbox has a slotted tooltip.\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-checkbox-background` |\n| `--vaadin-checkbox-border-color` |\n| `--vaadin-checkbox-border-radius` |\n| `--vaadin-checkbox-border-width` |\n| `--vaadin-checkbox-gap` |\n| `--vaadin-checkbox-label-color` |\n| `--vaadin-checkbox-label-font-size` |\n| `--vaadin-checkbox-label-font-weight` |\n| `--vaadin-checkbox-label-line-height` |\n| `--vaadin-checkbox-marker-color` |\n| `--vaadin-checkbox-marker-size` |\n| `--vaadin-checkbox-size` |\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-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` |\n| `--vaadin-input-field-required-indicator-color` |\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
|
|
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": "
|
|
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"
|
|
@@ -75,7 +84,7 @@
|
|
|
75
84
|
},
|
|
76
85
|
{
|
|
77
86
|
"name": "indeterminate",
|
|
78
|
-
"description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/
|
|
87
|
+
"description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/checkbox#indeterminate_state_checkboxes",
|
|
79
88
|
"value": {
|
|
80
89
|
"type": [
|
|
81
90
|
"boolean"
|
|
@@ -111,7 +120,7 @@
|
|
|
111
120
|
},
|
|
112
121
|
{
|
|
113
122
|
"name": "name",
|
|
114
|
-
"description": "The name of the
|
|
123
|
+
"description": "The name of the control, which is submitted with the form data.",
|
|
115
124
|
"value": {
|
|
116
125
|
"type": [
|
|
117
126
|
"string"
|
|
@@ -120,7 +129,7 @@
|
|
|
120
129
|
},
|
|
121
130
|
{
|
|
122
131
|
"name": "readonly",
|
|
123
|
-
"description": "When true, the user cannot modify the value of the
|
|
132
|
+
"description": "When true, the user cannot modify the value of the control.\nThe difference between `disabled` and `readonly` is that the\nread-only element remains focusable, is announced by screen\nreaders and its value can be submitted as part of the form.",
|
|
124
133
|
"value": {
|
|
125
134
|
"type": [
|
|
126
135
|
"boolean"
|
|
@@ -136,23 +145,12 @@
|
|
|
136
145
|
]
|
|
137
146
|
}
|
|
138
147
|
},
|
|
139
|
-
{
|
|
140
|
-
"name": "tabindex",
|
|
141
|
-
"description": "Indicates whether the element can be focused and where it participates in sequential keyboard navigation.",
|
|
142
|
-
"value": {
|
|
143
|
-
"type": [
|
|
144
|
-
"number"
|
|
145
|
-
]
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
148
|
{
|
|
149
149
|
"name": "theme",
|
|
150
150
|
"description": "The theme variants to apply to the component.",
|
|
151
151
|
"value": {
|
|
152
152
|
"type": [
|
|
153
|
-
"string"
|
|
154
|
-
"null",
|
|
155
|
-
"undefined"
|
|
153
|
+
"string"
|
|
156
154
|
]
|
|
157
155
|
}
|
|
158
156
|
},
|
|
@@ -168,9 +166,18 @@
|
|
|
168
166
|
],
|
|
169
167
|
"js": {
|
|
170
168
|
"properties": [
|
|
169
|
+
{
|
|
170
|
+
"name": "accessibleDescriptionRef",
|
|
171
|
+
"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.",
|
|
172
|
+
"value": {
|
|
173
|
+
"type": [
|
|
174
|
+
"string"
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
},
|
|
171
178
|
{
|
|
172
179
|
"name": "accessibleName",
|
|
173
|
-
"description": "String used to label the component
|
|
180
|
+
"description": "String used to label the component for screen reader users.",
|
|
174
181
|
"value": {
|
|
175
182
|
"type": [
|
|
176
183
|
"string"
|
|
@@ -179,7 +186,7 @@
|
|
|
179
186
|
},
|
|
180
187
|
{
|
|
181
188
|
"name": "accessibleNameRef",
|
|
182
|
-
"description": "
|
|
189
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
183
190
|
"value": {
|
|
184
191
|
"type": [
|
|
185
192
|
"string"
|
|
@@ -233,7 +240,7 @@
|
|
|
233
240
|
},
|
|
234
241
|
{
|
|
235
242
|
"name": "indeterminate",
|
|
236
|
-
"description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/
|
|
243
|
+
"description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/checkbox#indeterminate_state_checkboxes",
|
|
237
244
|
"value": {
|
|
238
245
|
"type": [
|
|
239
246
|
"boolean"
|
|
@@ -269,7 +276,7 @@
|
|
|
269
276
|
},
|
|
270
277
|
{
|
|
271
278
|
"name": "name",
|
|
272
|
-
"description": "The name of the
|
|
279
|
+
"description": "The name of the control, which is submitted with the form data.",
|
|
273
280
|
"value": {
|
|
274
281
|
"type": [
|
|
275
282
|
"string"
|
|
@@ -278,7 +285,7 @@
|
|
|
278
285
|
},
|
|
279
286
|
{
|
|
280
287
|
"name": "readonly",
|
|
281
|
-
"description": "When true, the user cannot modify the value of the
|
|
288
|
+
"description": "When true, the user cannot modify the value of the control.\nThe difference between `disabled` and `readonly` is that the\nread-only element remains focusable, is announced by screen\nreaders and its value can be submitted as part of the form.",
|
|
282
289
|
"value": {
|
|
283
290
|
"type": [
|
|
284
291
|
"boolean"
|
|
@@ -294,18 +301,9 @@
|
|
|
294
301
|
]
|
|
295
302
|
}
|
|
296
303
|
},
|
|
297
|
-
{
|
|
298
|
-
"name": "tabindex",
|
|
299
|
-
"description": "",
|
|
300
|
-
"value": {
|
|
301
|
-
"type": [
|
|
302
|
-
"number"
|
|
303
|
-
]
|
|
304
|
-
}
|
|
305
|
-
},
|
|
306
304
|
{
|
|
307
305
|
"name": "value",
|
|
308
|
-
"description": "",
|
|
306
|
+
"description": "The value of the field.",
|
|
309
307
|
"value": {
|
|
310
308
|
"type": [
|
|
311
309
|
"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/checkbox",
|
|
4
|
-
"version": "25.3.0-
|
|
4
|
+
"version": "25.3.0-alpha11",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -19,16 +19,23 @@
|
|
|
19
19
|
"description": "`<vaadin-checkbox>` is an input field representing a binary choice.\n\n```html\n<vaadin-checkbox label=\"I accept the terms and conditions\"></vaadin-checkbox>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|-------------\n`checkbox` | The element representing a stylable custom checkbox\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\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|-------------\n`active` | Set when the checkbox is activated with mouse, touch or the keyboard.\n`checked` | Set when the checkbox is checked.\n`disabled` | Set when the checkbox is disabled.\n`readonly` | Set when the checkbox is readonly.\n`focus-ring` | Set when the checkbox is focused using the keyboard.\n`focused` | Set when the checkbox is focused.\n`indeterminate` | Set when the checkbox is in the indeterminate state.\n`invalid` | Set when the checkbox is invalid.\n`has-label` | Set when the checkbox has a label.\n`has-helper` | Set when the checkbox has helper text.\n`has-error-message` | Set when the checkbox has an error message.\n`has-tooltip` | Set when the checkbox has a slotted tooltip.\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-checkbox-background` |\n| `--vaadin-checkbox-border-color` |\n| `--vaadin-checkbox-border-radius` |\n| `--vaadin-checkbox-border-width` |\n| `--vaadin-checkbox-gap` |\n| `--vaadin-checkbox-label-color` |\n| `--vaadin-checkbox-label-font-size` |\n| `--vaadin-checkbox-label-font-weight` |\n| `--vaadin-checkbox-label-line-height` |\n| `--vaadin-checkbox-marker-color` |\n| `--vaadin-checkbox-marker-size` |\n| `--vaadin-checkbox-size` |\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-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` |\n| `--vaadin-input-field-required-indicator-color` |\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
|
|
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": "
|
|
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
|
}
|
|
@@ -70,7 +77,7 @@
|
|
|
70
77
|
},
|
|
71
78
|
{
|
|
72
79
|
"name": "?indeterminate",
|
|
73
|
-
"description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/
|
|
80
|
+
"description": "True if the checkbox is in the indeterminate state which means\nit is not possible to say whether it is checked or unchecked.\nThe state is reset once the user switches the checkbox by hand.\n\nhttps://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/checkbox#indeterminate_state_checkboxes",
|
|
74
81
|
"value": {
|
|
75
82
|
"kind": "expression"
|
|
76
83
|
}
|
|
@@ -98,14 +105,14 @@
|
|
|
98
105
|
},
|
|
99
106
|
{
|
|
100
107
|
"name": ".name",
|
|
101
|
-
"description": "The name of the
|
|
108
|
+
"description": "The name of the control, which is submitted with the form data.",
|
|
102
109
|
"value": {
|
|
103
110
|
"kind": "expression"
|
|
104
111
|
}
|
|
105
112
|
},
|
|
106
113
|
{
|
|
107
114
|
"name": "?readonly",
|
|
108
|
-
"description": "When true, the user cannot modify the value of the
|
|
115
|
+
"description": "When true, the user cannot modify the value of the control.\nThe difference between `disabled` and `readonly` is that the\nread-only element remains focusable, is announced by screen\nreaders and its value can be submitted as part of the form.",
|
|
109
116
|
"value": {
|
|
110
117
|
"kind": "expression"
|
|
111
118
|
}
|
|
@@ -117,16 +124,9 @@
|
|
|
117
124
|
"kind": "expression"
|
|
118
125
|
}
|
|
119
126
|
},
|
|
120
|
-
{
|
|
121
|
-
"name": ".tabindex",
|
|
122
|
-
"description": "",
|
|
123
|
-
"value": {
|
|
124
|
-
"kind": "expression"
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
127
|
{
|
|
128
128
|
"name": ".value",
|
|
129
|
-
"description": "",
|
|
129
|
+
"description": "The value of the field.",
|
|
130
130
|
"value": {
|
|
131
131
|
"kind": "expression"
|
|
132
132
|
}
|