@vaadin/dialog 25.4.0-alpha2 → 25.4.0-alpha4
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 +66 -146
- package/package.json +11 -11
- package/src/styles/vaadin-dialog-overlay-base-styles.js +6 -2
- package/src/vaadin-dialog-overlay-mixin.d.ts +5 -0
- package/src/vaadin-dialog-overlay-mixin.js +13 -0
- package/src/vaadin-dialog-renderer-mixin.d.ts +9 -0
- package/src/vaadin-dialog-renderer-mixin.js +11 -0
- package/src/vaadin-dialog.js +1 -0
- package/web-types.json +33 -8
- package/web-types.lit.json +18 -6
package/custom-elements.json
CHANGED
|
@@ -416,8 +416,7 @@
|
|
|
416
416
|
"type": {
|
|
417
417
|
"text": "object"
|
|
418
418
|
},
|
|
419
|
-
"description": "Custom function for rendering the dialog footer."
|
|
420
|
-
"attribute": "footer-renderer"
|
|
419
|
+
"description": "Custom function for rendering the dialog footer."
|
|
421
420
|
},
|
|
422
421
|
{
|
|
423
422
|
"kind": "method",
|
|
@@ -436,8 +435,7 @@
|
|
|
436
435
|
"type": {
|
|
437
436
|
"text": "object"
|
|
438
437
|
},
|
|
439
|
-
"description": "Custom function for rendering the dialog header."
|
|
440
|
-
"attribute": "header-renderer"
|
|
438
|
+
"description": "Custom function for rendering the dialog header."
|
|
441
439
|
},
|
|
442
440
|
{
|
|
443
441
|
"kind": "field",
|
|
@@ -449,6 +447,16 @@
|
|
|
449
447
|
"description": "String used for rendering a dialog title.",
|
|
450
448
|
"attribute": "header-title"
|
|
451
449
|
},
|
|
450
|
+
{
|
|
451
|
+
"kind": "field",
|
|
452
|
+
"name": "headingLevel",
|
|
453
|
+
"privacy": "public",
|
|
454
|
+
"type": {
|
|
455
|
+
"text": "number"
|
|
456
|
+
},
|
|
457
|
+
"description": "The ARIA heading level of the title.",
|
|
458
|
+
"attribute": "heading-level"
|
|
459
|
+
},
|
|
452
460
|
{
|
|
453
461
|
"kind": "field",
|
|
454
462
|
"name": "hidden",
|
|
@@ -481,7 +489,6 @@
|
|
|
481
489
|
"text": "object"
|
|
482
490
|
},
|
|
483
491
|
"description": "Object with properties that is passed to `renderer` function",
|
|
484
|
-
"attribute": "model",
|
|
485
492
|
"inheritedFrom": {
|
|
486
493
|
"name": "OverlayMixin",
|
|
487
494
|
"package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
|
|
@@ -523,7 +530,6 @@
|
|
|
523
530
|
"text": "HTMLElement"
|
|
524
531
|
},
|
|
525
532
|
"description": "Owner element passed with renderer function",
|
|
526
|
-
"attribute": "owner",
|
|
527
533
|
"inheritedFrom": {
|
|
528
534
|
"name": "OverlayMixin",
|
|
529
535
|
"package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
|
|
@@ -537,7 +543,6 @@
|
|
|
537
543
|
"text": "OverlayRenderer | null | undefined"
|
|
538
544
|
},
|
|
539
545
|
"description": "Custom function for rendering the content of the overlay.\nReceives three arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `owner` The host element of the renderer function.\n- `model` The object with the properties related with rendering.",
|
|
540
|
-
"attribute": "renderer",
|
|
541
546
|
"inheritedFrom": {
|
|
542
547
|
"name": "OverlayMixin",
|
|
543
548
|
"package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
|
|
@@ -546,11 +551,7 @@
|
|
|
546
551
|
{
|
|
547
552
|
"kind": "method",
|
|
548
553
|
"name": "requestContentUpdate",
|
|
549
|
-
"description": "Requests an update for the content of the overlay.\nWhile performing the update, it invokes the renderer passed in the `renderer` property.\n\nIt is not guaranteed that the update happens immediately (synchronously) after it is requested."
|
|
550
|
-
"inheritedFrom": {
|
|
551
|
-
"name": "OverlayMixin",
|
|
552
|
-
"package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
|
|
553
|
-
}
|
|
554
|
+
"description": "Requests an update for the content of the overlay.\nWhile performing the update, it invokes the renderer passed in the `renderer` property.\n\nIt is not guaranteed that the update happens immediately (synchronously) after it is requested."
|
|
554
555
|
},
|
|
555
556
|
{
|
|
556
557
|
"kind": "field",
|
|
@@ -560,7 +561,6 @@
|
|
|
560
561
|
"text": "HTMLElement"
|
|
561
562
|
},
|
|
562
563
|
"description": "Set to specify the element which should be focused on overlay close,\nif `restoreFocusOnClose` is set to true.",
|
|
563
|
-
"attribute": "restore-focus-node",
|
|
564
564
|
"inheritedFrom": {
|
|
565
565
|
"name": "OverlayFocusMixin",
|
|
566
566
|
"package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
|
|
@@ -592,11 +592,7 @@
|
|
|
592
592
|
"default": "true"
|
|
593
593
|
}
|
|
594
594
|
],
|
|
595
|
-
"description": "Override method from OverlayMixin to adjust the position of the overlay if `keepInViewport` is true."
|
|
596
|
-
"inheritedFrom": {
|
|
597
|
-
"name": "OverlayMixin",
|
|
598
|
-
"package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
|
|
599
|
-
}
|
|
595
|
+
"description": "Override method from OverlayMixin to adjust the position of the overlay if `keepInViewport` is true."
|
|
600
596
|
},
|
|
601
597
|
{
|
|
602
598
|
"kind": "field",
|
|
@@ -646,6 +642,14 @@
|
|
|
646
642
|
"description": "String used for rendering a dialog title.",
|
|
647
643
|
"fieldName": "headerTitle"
|
|
648
644
|
},
|
|
645
|
+
{
|
|
646
|
+
"name": "heading-level",
|
|
647
|
+
"type": {
|
|
648
|
+
"text": "number"
|
|
649
|
+
},
|
|
650
|
+
"description": "The ARIA heading level of the title.",
|
|
651
|
+
"fieldName": "headingLevel"
|
|
652
|
+
},
|
|
649
653
|
{
|
|
650
654
|
"name": "hidden",
|
|
651
655
|
"type": {
|
|
@@ -690,42 +694,6 @@
|
|
|
690
694
|
"package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
|
|
691
695
|
}
|
|
692
696
|
},
|
|
693
|
-
{
|
|
694
|
-
"name": "owner",
|
|
695
|
-
"type": {
|
|
696
|
-
"text": "HTMLElement"
|
|
697
|
-
},
|
|
698
|
-
"description": "Owner element passed with renderer function",
|
|
699
|
-
"fieldName": "owner",
|
|
700
|
-
"inheritedFrom": {
|
|
701
|
-
"name": "OverlayMixin",
|
|
702
|
-
"package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
|
|
703
|
-
}
|
|
704
|
-
},
|
|
705
|
-
{
|
|
706
|
-
"name": "renderer",
|
|
707
|
-
"type": {
|
|
708
|
-
"text": "OverlayRenderer | null | undefined"
|
|
709
|
-
},
|
|
710
|
-
"description": "Custom function for rendering the content of the overlay.\nReceives three arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `owner` The host element of the renderer function.\n- `model` The object with the properties related with rendering.",
|
|
711
|
-
"fieldName": "renderer",
|
|
712
|
-
"inheritedFrom": {
|
|
713
|
-
"name": "OverlayMixin",
|
|
714
|
-
"package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
|
|
715
|
-
}
|
|
716
|
-
},
|
|
717
|
-
{
|
|
718
|
-
"name": "restore-focus-node",
|
|
719
|
-
"type": {
|
|
720
|
-
"text": "HTMLElement"
|
|
721
|
-
},
|
|
722
|
-
"description": "Set to specify the element which should be focused on overlay close,\nif `restoreFocusOnClose` is set to true.",
|
|
723
|
-
"fieldName": "restoreFocusNode",
|
|
724
|
-
"inheritedFrom": {
|
|
725
|
-
"name": "OverlayFocusMixin",
|
|
726
|
-
"package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
|
|
727
|
-
}
|
|
728
|
-
},
|
|
729
697
|
{
|
|
730
698
|
"name": "restore-focus-on-close",
|
|
731
699
|
"type": {
|
|
@@ -814,8 +782,7 @@
|
|
|
814
782
|
"text": "DialogRenderer | undefined"
|
|
815
783
|
},
|
|
816
784
|
"description": "Custom function for rendering the dialog footer.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.\n\nWhen `footerRenderer` is set, the attribute `has-footer` is set on the dialog.",
|
|
817
|
-
"deprecated": "Add footer content as children of the dialog using `slot=\"footer\"` instead"
|
|
818
|
-
"attribute": "footer-renderer"
|
|
785
|
+
"deprecated": "Add footer content as children of the dialog using `slot=\"footer\"` instead"
|
|
819
786
|
},
|
|
820
787
|
{
|
|
821
788
|
"kind": "field",
|
|
@@ -825,8 +792,7 @@
|
|
|
825
792
|
"text": "DialogRenderer | undefined"
|
|
826
793
|
},
|
|
827
794
|
"description": "Custom function for rendering the dialog header.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.\n\nIf both `headerTitle` and `headerRenderer` are defined, the title\nand the elements created by the renderer will be placed next to\neach other, with the title coming first.\n\nWhen `headerRenderer` is set, the attribute `has-header` is set on the dialog.",
|
|
828
|
-
"deprecated": "Add header content as children of the dialog using `slot=\"header-content\"` instead"
|
|
829
|
-
"attribute": "header-renderer"
|
|
795
|
+
"deprecated": "Add header content as children of the dialog using `slot=\"header-content\"` instead"
|
|
830
796
|
},
|
|
831
797
|
{
|
|
832
798
|
"kind": "field",
|
|
@@ -838,6 +804,16 @@
|
|
|
838
804
|
"description": "String used for rendering a dialog title.\n\nIf both `headerTitle` and `headerRenderer` are defined, the title\nand the elements created by the renderer will be placed next to\neach other, with the title coming first.\n\nWhen `headerTitle` is set, the attribute `has-title` is set on the dialog.",
|
|
839
805
|
"attribute": "header-title"
|
|
840
806
|
},
|
|
807
|
+
{
|
|
808
|
+
"kind": "field",
|
|
809
|
+
"name": "headingLevel",
|
|
810
|
+
"privacy": "public",
|
|
811
|
+
"type": {
|
|
812
|
+
"text": "number"
|
|
813
|
+
},
|
|
814
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the title element. When not set, defaults to `1` for modal\ndialogs and `2` for modeless dialogs.",
|
|
815
|
+
"attribute": "heading-level"
|
|
816
|
+
},
|
|
841
817
|
{
|
|
842
818
|
"kind": "field",
|
|
843
819
|
"name": "renderer",
|
|
@@ -846,8 +822,7 @@
|
|
|
846
822
|
"text": "DialogRenderer | undefined"
|
|
847
823
|
},
|
|
848
824
|
"description": "Custom function for rendering the content of the dialog.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.",
|
|
849
|
-
"deprecated": "Add content elements as children of the dialog instead"
|
|
850
|
-
"attribute": "renderer"
|
|
825
|
+
"deprecated": "Add content elements as children of the dialog instead"
|
|
851
826
|
},
|
|
852
827
|
{
|
|
853
828
|
"kind": "method",
|
|
@@ -857,24 +832,6 @@
|
|
|
857
832
|
}
|
|
858
833
|
],
|
|
859
834
|
"attributes": [
|
|
860
|
-
{
|
|
861
|
-
"name": "footer-renderer",
|
|
862
|
-
"type": {
|
|
863
|
-
"text": "DialogRenderer | undefined"
|
|
864
|
-
},
|
|
865
|
-
"description": "Custom function for rendering the dialog footer.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.\n\nWhen `footerRenderer` is set, the attribute `has-footer` is set on the dialog.",
|
|
866
|
-
"deprecated": "Add footer content as children of the dialog using `slot=\"footer\"` instead",
|
|
867
|
-
"fieldName": "footerRenderer"
|
|
868
|
-
},
|
|
869
|
-
{
|
|
870
|
-
"name": "header-renderer",
|
|
871
|
-
"type": {
|
|
872
|
-
"text": "DialogRenderer | undefined"
|
|
873
|
-
},
|
|
874
|
-
"description": "Custom function for rendering the dialog header.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.\n\nIf both `headerTitle` and `headerRenderer` are defined, the title\nand the elements created by the renderer will be placed next to\neach other, with the title coming first.\n\nWhen `headerRenderer` is set, the attribute `has-header` is set on the dialog.",
|
|
875
|
-
"deprecated": "Add header content as children of the dialog using `slot=\"header-content\"` instead",
|
|
876
|
-
"fieldName": "headerRenderer"
|
|
877
|
-
},
|
|
878
835
|
{
|
|
879
836
|
"name": "header-title",
|
|
880
837
|
"type": {
|
|
@@ -884,13 +841,12 @@
|
|
|
884
841
|
"fieldName": "headerTitle"
|
|
885
842
|
},
|
|
886
843
|
{
|
|
887
|
-
"name": "
|
|
844
|
+
"name": "heading-level",
|
|
888
845
|
"type": {
|
|
889
|
-
"text": "
|
|
846
|
+
"text": "number"
|
|
890
847
|
},
|
|
891
|
-
"description": "
|
|
892
|
-
"
|
|
893
|
-
"fieldName": "renderer"
|
|
848
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the title element. When not set, defaults to `1` for modal\ndialogs and `2` for modeless dialogs.",
|
|
849
|
+
"fieldName": "headingLevel"
|
|
894
850
|
}
|
|
895
851
|
],
|
|
896
852
|
"parameters": [
|
|
@@ -1125,7 +1081,6 @@
|
|
|
1125
1081
|
},
|
|
1126
1082
|
"description": "Custom function for rendering the dialog footer.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.\n\nWhen `footerRenderer` is set, the attribute `has-footer` is set on the dialog.",
|
|
1127
1083
|
"deprecated": "Add footer content as children of the dialog using `slot=\"footer\"` instead",
|
|
1128
|
-
"attribute": "footer-renderer",
|
|
1129
1084
|
"inheritedFrom": {
|
|
1130
1085
|
"name": "DialogRendererMixin",
|
|
1131
1086
|
"module": "src/vaadin-dialog-renderer-mixin.js"
|
|
@@ -1140,7 +1095,6 @@
|
|
|
1140
1095
|
},
|
|
1141
1096
|
"description": "Custom function for rendering the dialog header.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.\n\nIf both `headerTitle` and `headerRenderer` are defined, the title\nand the elements created by the renderer will be placed next to\neach other, with the title coming first.\n\nWhen `headerRenderer` is set, the attribute `has-header` is set on the dialog.",
|
|
1142
1097
|
"deprecated": "Add header content as children of the dialog using `slot=\"header-content\"` instead",
|
|
1143
|
-
"attribute": "header-renderer",
|
|
1144
1098
|
"inheritedFrom": {
|
|
1145
1099
|
"name": "DialogRendererMixin",
|
|
1146
1100
|
"module": "src/vaadin-dialog-renderer-mixin.js"
|
|
@@ -1160,6 +1114,20 @@
|
|
|
1160
1114
|
"module": "src/vaadin-dialog-renderer-mixin.js"
|
|
1161
1115
|
}
|
|
1162
1116
|
},
|
|
1117
|
+
{
|
|
1118
|
+
"kind": "field",
|
|
1119
|
+
"name": "headingLevel",
|
|
1120
|
+
"privacy": "public",
|
|
1121
|
+
"type": {
|
|
1122
|
+
"text": "number"
|
|
1123
|
+
},
|
|
1124
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the title element. When not set, defaults to `1` for modal\ndialogs and `2` for modeless dialogs.",
|
|
1125
|
+
"attribute": "heading-level",
|
|
1126
|
+
"inheritedFrom": {
|
|
1127
|
+
"name": "DialogRendererMixin",
|
|
1128
|
+
"module": "src/vaadin-dialog-renderer-mixin.js"
|
|
1129
|
+
}
|
|
1130
|
+
},
|
|
1163
1131
|
{
|
|
1164
1132
|
"kind": "field",
|
|
1165
1133
|
"name": "height",
|
|
@@ -1311,7 +1279,6 @@
|
|
|
1311
1279
|
},
|
|
1312
1280
|
"description": "Custom function for rendering the content of the dialog.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.",
|
|
1313
1281
|
"deprecated": "Add content elements as children of the dialog instead",
|
|
1314
|
-
"attribute": "renderer",
|
|
1315
1282
|
"inheritedFrom": {
|
|
1316
1283
|
"name": "DialogRendererMixin",
|
|
1317
1284
|
"module": "src/vaadin-dialog-renderer-mixin.js"
|
|
@@ -1372,37 +1339,25 @@
|
|
|
1372
1339
|
],
|
|
1373
1340
|
"events": [
|
|
1374
1341
|
{
|
|
1375
|
-
"name": "closed",
|
|
1376
1342
|
"type": {
|
|
1377
1343
|
"text": "CustomEvent"
|
|
1378
1344
|
},
|
|
1379
1345
|
"description": "Fired when the dialog is closed.",
|
|
1380
|
-
"
|
|
1381
|
-
"name": "DialogBaseMixin",
|
|
1382
|
-
"module": "src/vaadin-dialog-base-mixin.js"
|
|
1383
|
-
}
|
|
1346
|
+
"name": "closed"
|
|
1384
1347
|
},
|
|
1385
1348
|
{
|
|
1386
|
-
"name": "drag-start",
|
|
1387
1349
|
"type": {
|
|
1388
1350
|
"text": "CustomEvent"
|
|
1389
1351
|
},
|
|
1390
1352
|
"description": "Fired when the dialog drag is started.",
|
|
1391
|
-
"
|
|
1392
|
-
"name": "DialogDraggableMixin",
|
|
1393
|
-
"module": "src/vaadin-dialog-draggable-mixin.js"
|
|
1394
|
-
}
|
|
1353
|
+
"name": "drag-start"
|
|
1395
1354
|
},
|
|
1396
1355
|
{
|
|
1397
|
-
"name": "dragged",
|
|
1398
1356
|
"type": {
|
|
1399
1357
|
"text": "CustomEvent"
|
|
1400
1358
|
},
|
|
1401
1359
|
"description": "Fired when the dialog drag is finished.",
|
|
1402
|
-
"
|
|
1403
|
-
"name": "DialogDraggableMixin",
|
|
1404
|
-
"module": "src/vaadin-dialog-draggable-mixin.js"
|
|
1405
|
-
}
|
|
1360
|
+
"name": "dragged"
|
|
1406
1361
|
},
|
|
1407
1362
|
{
|
|
1408
1363
|
"type": {
|
|
@@ -1412,26 +1367,18 @@
|
|
|
1412
1367
|
"name": "opened-changed"
|
|
1413
1368
|
},
|
|
1414
1369
|
{
|
|
1415
|
-
"name": "resize",
|
|
1416
1370
|
"type": {
|
|
1417
1371
|
"text": "CustomEvent"
|
|
1418
1372
|
},
|
|
1419
1373
|
"description": "Fired when the dialog resize is finished.",
|
|
1420
|
-
"
|
|
1421
|
-
"name": "DialogResizableMixin",
|
|
1422
|
-
"module": "src/vaadin-dialog-resizable-mixin.js"
|
|
1423
|
-
}
|
|
1374
|
+
"name": "resize"
|
|
1424
1375
|
},
|
|
1425
1376
|
{
|
|
1426
|
-
"name": "resize-start",
|
|
1427
1377
|
"type": {
|
|
1428
1378
|
"text": "CustomEvent"
|
|
1429
1379
|
},
|
|
1430
1380
|
"description": "Fired when the dialog resize is started.",
|
|
1431
|
-
"
|
|
1432
|
-
"name": "DialogResizableMixin",
|
|
1433
|
-
"module": "src/vaadin-dialog-resizable-mixin.js"
|
|
1434
|
-
}
|
|
1381
|
+
"name": "resize-start"
|
|
1435
1382
|
}
|
|
1436
1383
|
],
|
|
1437
1384
|
"attributes": [
|
|
@@ -1448,38 +1395,24 @@
|
|
|
1448
1395
|
}
|
|
1449
1396
|
},
|
|
1450
1397
|
{
|
|
1451
|
-
"name": "
|
|
1452
|
-
"type": {
|
|
1453
|
-
"text": "DialogRenderer | undefined"
|
|
1454
|
-
},
|
|
1455
|
-
"description": "Custom function for rendering the dialog footer.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.\n\nWhen `footerRenderer` is set, the attribute `has-footer` is set on the dialog.",
|
|
1456
|
-
"deprecated": "Add footer content as children of the dialog using `slot=\"footer\"` instead",
|
|
1457
|
-
"fieldName": "footerRenderer",
|
|
1458
|
-
"inheritedFrom": {
|
|
1459
|
-
"name": "DialogRendererMixin",
|
|
1460
|
-
"module": "src/vaadin-dialog-renderer-mixin.js"
|
|
1461
|
-
}
|
|
1462
|
-
},
|
|
1463
|
-
{
|
|
1464
|
-
"name": "header-renderer",
|
|
1398
|
+
"name": "header-title",
|
|
1465
1399
|
"type": {
|
|
1466
|
-
"text": "
|
|
1400
|
+
"text": "string"
|
|
1467
1401
|
},
|
|
1468
|
-
"description": "
|
|
1469
|
-
"
|
|
1470
|
-
"fieldName": "headerRenderer",
|
|
1402
|
+
"description": "String used for rendering a dialog title.\n\nIf both `headerTitle` and `headerRenderer` are defined, the title\nand the elements created by the renderer will be placed next to\neach other, with the title coming first.\n\nWhen `headerTitle` is set, the attribute `has-title` is set on the dialog.",
|
|
1403
|
+
"fieldName": "headerTitle",
|
|
1471
1404
|
"inheritedFrom": {
|
|
1472
1405
|
"name": "DialogRendererMixin",
|
|
1473
1406
|
"module": "src/vaadin-dialog-renderer-mixin.js"
|
|
1474
1407
|
}
|
|
1475
1408
|
},
|
|
1476
1409
|
{
|
|
1477
|
-
"name": "
|
|
1410
|
+
"name": "heading-level",
|
|
1478
1411
|
"type": {
|
|
1479
|
-
"text": "
|
|
1412
|
+
"text": "number"
|
|
1480
1413
|
},
|
|
1481
|
-
"description": "
|
|
1482
|
-
"fieldName": "
|
|
1414
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the title element. When not set, defaults to `1` for modal\ndialogs and `2` for modeless dialogs.",
|
|
1415
|
+
"fieldName": "headingLevel",
|
|
1483
1416
|
"inheritedFrom": {
|
|
1484
1417
|
"name": "DialogRendererMixin",
|
|
1485
1418
|
"module": "src/vaadin-dialog-renderer-mixin.js"
|
|
@@ -1607,19 +1540,6 @@
|
|
|
1607
1540
|
"module": "src/vaadin-dialog-base-mixin.js"
|
|
1608
1541
|
}
|
|
1609
1542
|
},
|
|
1610
|
-
{
|
|
1611
|
-
"name": "renderer",
|
|
1612
|
-
"type": {
|
|
1613
|
-
"text": "DialogRenderer | undefined"
|
|
1614
|
-
},
|
|
1615
|
-
"description": "Custom function for rendering the content of the dialog.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.",
|
|
1616
|
-
"deprecated": "Add content elements as children of the dialog instead",
|
|
1617
|
-
"fieldName": "renderer",
|
|
1618
|
-
"inheritedFrom": {
|
|
1619
|
-
"name": "DialogRendererMixin",
|
|
1620
|
-
"module": "src/vaadin-dialog-renderer-mixin.js"
|
|
1621
|
-
}
|
|
1622
|
-
},
|
|
1623
1543
|
{
|
|
1624
1544
|
"name": "resizable",
|
|
1625
1545
|
"type": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/dialog",
|
|
3
|
-
"version": "25.4.0-
|
|
3
|
+
"version": "25.4.0-alpha4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/a11y-base": "25.4.0-
|
|
41
|
-
"@vaadin/component-base": "25.4.0-
|
|
42
|
-
"@vaadin/lit-renderer": "25.4.0-
|
|
43
|
-
"@vaadin/overlay": "25.4.0-
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "25.4.0-
|
|
40
|
+
"@vaadin/a11y-base": "25.4.0-alpha4",
|
|
41
|
+
"@vaadin/component-base": "25.4.0-alpha4",
|
|
42
|
+
"@vaadin/lit-renderer": "25.4.0-alpha4",
|
|
43
|
+
"@vaadin/overlay": "25.4.0-alpha4",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "25.4.0-alpha4",
|
|
45
45
|
"lit": "^3.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@vaadin/aura": "25.4.0-
|
|
49
|
-
"@vaadin/chai-plugins": "25.4.0-
|
|
50
|
-
"@vaadin/test-runner-commands": "25.4.0-
|
|
48
|
+
"@vaadin/aura": "25.4.0-alpha4",
|
|
49
|
+
"@vaadin/chai-plugins": "25.4.0-alpha4",
|
|
50
|
+
"@vaadin/test-runner-commands": "25.4.0-alpha4",
|
|
51
51
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
52
|
-
"@vaadin/vaadin-lumo-styles": "25.4.0-
|
|
52
|
+
"@vaadin/vaadin-lumo-styles": "25.4.0-alpha4",
|
|
53
53
|
"sinon": "^22.0.0"
|
|
54
54
|
},
|
|
55
55
|
"customElements": "custom-elements.json",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"web-types.json",
|
|
58
58
|
"web-types.lit.json"
|
|
59
59
|
],
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "7809e4c099538333a6dbd11d8da18a0c6ec30dad"
|
|
61
61
|
}
|
|
@@ -68,14 +68,18 @@ export const dialogOverlayBase = css`
|
|
|
68
68
|
|
|
69
69
|
:host([theme~='no-padding']) [part='content'] {
|
|
70
70
|
padding: 0 !important;
|
|
71
|
+
margin: 0 !important;
|
|
71
72
|
}
|
|
72
73
|
|
|
74
|
+
/* Keep focus outlines inside the scrollable content's clipping area. */
|
|
73
75
|
:host(:is([has-header], [has-title])) [part='content'] {
|
|
74
|
-
padding-top:
|
|
76
|
+
padding-top: calc(var(--vaadin-focus-ring-width, 2px) + 2px);
|
|
77
|
+
margin-top: calc(var(--vaadin-focus-ring-width, 2px) * -1 - 2px);
|
|
75
78
|
}
|
|
76
79
|
|
|
77
80
|
:host([has-footer]) [part='content'] {
|
|
78
|
-
padding-bottom:
|
|
81
|
+
padding-bottom: calc(var(--vaadin-focus-ring-width, 2px) + 2px);
|
|
82
|
+
margin-bottom: calc(var(--vaadin-focus-ring-width, 2px) * -1 - 2px);
|
|
79
83
|
}
|
|
80
84
|
|
|
81
85
|
[part='header'] {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { getDeepActiveElement } from '@vaadin/a11y-base/src/focus-utils.js';
|
|
7
|
+
import { setOrRemoveAttribute } from '@vaadin/component-base/src/dom-utils.js';
|
|
7
8
|
import { SlotObserver } from '@vaadin/component-base/src/slot-observer.js';
|
|
8
9
|
import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
|
|
9
10
|
import { setOverlayStateAttribute } from '@vaadin/overlay/src/vaadin-overlay-utils.js';
|
|
@@ -20,6 +21,13 @@ export const DialogOverlayMixin = (superClass) =>
|
|
|
20
21
|
type: String,
|
|
21
22
|
},
|
|
22
23
|
|
|
24
|
+
/**
|
|
25
|
+
* The ARIA heading level of the title.
|
|
26
|
+
*/
|
|
27
|
+
headingLevel: {
|
|
28
|
+
type: Number,
|
|
29
|
+
},
|
|
30
|
+
|
|
23
31
|
/**
|
|
24
32
|
* Custom function for rendering the dialog header.
|
|
25
33
|
*/
|
|
@@ -127,6 +135,10 @@ export const DialogOverlayMixin = (superClass) =>
|
|
|
127
135
|
window.removeEventListener('resize', this.__handleWindowResize);
|
|
128
136
|
}
|
|
129
137
|
}
|
|
138
|
+
|
|
139
|
+
if (props.has('headingLevel') && this.headerTitleElement) {
|
|
140
|
+
setOrRemoveAttribute(this.headerTitleElement, 'aria-level', this.headingLevel);
|
|
141
|
+
}
|
|
130
142
|
}
|
|
131
143
|
|
|
132
144
|
/** @private */
|
|
@@ -217,6 +229,7 @@ export const DialogOverlayMixin = (superClass) =>
|
|
|
217
229
|
}
|
|
218
230
|
this.owner.appendChild(this.headerTitleElement);
|
|
219
231
|
this.headerTitleElement.textContent = this.headerTitle;
|
|
232
|
+
setOrRemoveAttribute(this.headerTitleElement, 'aria-level', this.headingLevel);
|
|
220
233
|
} else if (this.headerTitleElement) {
|
|
221
234
|
this.headerTitleElement.remove();
|
|
222
235
|
this.headerTitleElement = null;
|
|
@@ -34,6 +34,15 @@ export declare class DialogRendererMixinClass {
|
|
|
34
34
|
*/
|
|
35
35
|
headerTitle: string | null | undefined;
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* The ARIA heading level, used to set the `aria-level` attribute
|
|
39
|
+
* on the title element. When not set, defaults to `1` for modal
|
|
40
|
+
* dialogs and `2` for modeless dialogs.
|
|
41
|
+
*
|
|
42
|
+
* @attr {number} heading-level
|
|
43
|
+
*/
|
|
44
|
+
headingLevel: number | null | undefined;
|
|
45
|
+
|
|
37
46
|
/**
|
|
38
47
|
* Custom function for rendering the dialog header.
|
|
39
48
|
* Receives two arguments:
|
|
@@ -35,6 +35,17 @@ export const DialogRendererMixin = (superClass) =>
|
|
|
35
35
|
type: String,
|
|
36
36
|
},
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* The ARIA heading level, used to set the `aria-level` attribute
|
|
40
|
+
* on the title element. When not set, defaults to `1` for modal
|
|
41
|
+
* dialogs and `2` for modeless dialogs.
|
|
42
|
+
*
|
|
43
|
+
* @attr {number} heading-level
|
|
44
|
+
*/
|
|
45
|
+
headingLevel: {
|
|
46
|
+
type: Number,
|
|
47
|
+
},
|
|
48
|
+
|
|
38
49
|
/**
|
|
39
50
|
* Custom function for rendering the dialog header.
|
|
40
51
|
* Receives two arguments:
|
package/src/vaadin-dialog.js
CHANGED
|
@@ -161,6 +161,7 @@ class Dialog extends DialogSizeMixin(
|
|
|
161
161
|
.owner="${this}"
|
|
162
162
|
.opened="${this.opened}"
|
|
163
163
|
.headerTitle="${this.headerTitle}"
|
|
164
|
+
.headingLevel="${this.headingLevel ?? (this.modeless ? 2 : 1)}"
|
|
164
165
|
.renderer="${this.renderer}"
|
|
165
166
|
.headerRenderer="${this.headerRenderer}"
|
|
166
167
|
.footerRenderer="${this.footerRenderer}"
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/dialog",
|
|
4
|
-
"version": "25.4.0-
|
|
4
|
+
"version": "25.4.0-alpha4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -28,6 +28,15 @@
|
|
|
28
28
|
]
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
|
+
{
|
|
32
|
+
"name": "heading-level",
|
|
33
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the title element. When not set, defaults to `1` for modal\ndialogs and `2` for modeless dialogs.",
|
|
34
|
+
"value": {
|
|
35
|
+
"type": [
|
|
36
|
+
"number"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
31
40
|
{
|
|
32
41
|
"name": "height",
|
|
33
42
|
"description": "Set the height of the dialog.\nIf a unitless number is provided, pixels are assumed.",
|
|
@@ -98,7 +107,8 @@
|
|
|
98
107
|
"type": [
|
|
99
108
|
"boolean"
|
|
100
109
|
]
|
|
101
|
-
}
|
|
110
|
+
},
|
|
111
|
+
"deprecated": "This property is deprecated and will be removed in Vaadin 26."
|
|
102
112
|
},
|
|
103
113
|
{
|
|
104
114
|
"name": "opened",
|
|
@@ -116,7 +126,8 @@
|
|
|
116
126
|
"type": [
|
|
117
127
|
"string"
|
|
118
128
|
]
|
|
119
|
-
}
|
|
129
|
+
},
|
|
130
|
+
"deprecated": "Use standard `role` attribute on the dialog instead"
|
|
120
131
|
},
|
|
121
132
|
{
|
|
122
133
|
"name": "resizable",
|
|
@@ -174,7 +185,8 @@
|
|
|
174
185
|
"DialogRenderer",
|
|
175
186
|
"undefined"
|
|
176
187
|
]
|
|
177
|
-
}
|
|
188
|
+
},
|
|
189
|
+
"deprecated": "Add footer content as children of the dialog using `slot=\"footer\"` instead"
|
|
178
190
|
},
|
|
179
191
|
{
|
|
180
192
|
"name": "headerRenderer",
|
|
@@ -184,7 +196,8 @@
|
|
|
184
196
|
"DialogRenderer",
|
|
185
197
|
"undefined"
|
|
186
198
|
]
|
|
187
|
-
}
|
|
199
|
+
},
|
|
200
|
+
"deprecated": "Add header content as children of the dialog using `slot=\"header-content\"` instead"
|
|
188
201
|
},
|
|
189
202
|
{
|
|
190
203
|
"name": "headerTitle",
|
|
@@ -195,6 +208,15 @@
|
|
|
195
208
|
]
|
|
196
209
|
}
|
|
197
210
|
},
|
|
211
|
+
{
|
|
212
|
+
"name": "headingLevel",
|
|
213
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the title element. When not set, defaults to `1` for modal\ndialogs and `2` for modeless dialogs.",
|
|
214
|
+
"value": {
|
|
215
|
+
"type": [
|
|
216
|
+
"number"
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
},
|
|
198
220
|
{
|
|
199
221
|
"name": "height",
|
|
200
222
|
"description": "Set the height of the dialog.\nIf a unitless number is provided, pixels are assumed.",
|
|
@@ -265,7 +287,8 @@
|
|
|
265
287
|
"type": [
|
|
266
288
|
"boolean"
|
|
267
289
|
]
|
|
268
|
-
}
|
|
290
|
+
},
|
|
291
|
+
"deprecated": "This property is deprecated and will be removed in Vaadin 26."
|
|
269
292
|
},
|
|
270
293
|
{
|
|
271
294
|
"name": "opened",
|
|
@@ -283,7 +306,8 @@
|
|
|
283
306
|
"type": [
|
|
284
307
|
"string"
|
|
285
308
|
]
|
|
286
|
-
}
|
|
309
|
+
},
|
|
310
|
+
"deprecated": "Use standard `role` attribute on the dialog instead"
|
|
287
311
|
},
|
|
288
312
|
{
|
|
289
313
|
"name": "renderer",
|
|
@@ -293,7 +317,8 @@
|
|
|
293
317
|
"DialogRenderer",
|
|
294
318
|
"undefined"
|
|
295
319
|
]
|
|
296
|
-
}
|
|
320
|
+
},
|
|
321
|
+
"deprecated": "Add content elements as children of the dialog instead"
|
|
297
322
|
},
|
|
298
323
|
{
|
|
299
324
|
"name": "resizable",
|
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/dialog",
|
|
4
|
-
"version": "25.4.0-
|
|
4
|
+
"version": "25.4.0-alpha4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -31,14 +31,16 @@
|
|
|
31
31
|
"description": "Custom function for rendering the dialog footer.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.\n\nWhen `footerRenderer` is set, the attribute `has-footer` is set on the dialog.",
|
|
32
32
|
"value": {
|
|
33
33
|
"kind": "expression"
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
|
+
"deprecated": "Add footer content as children of the dialog using `slot=\"footer\"` instead"
|
|
35
36
|
},
|
|
36
37
|
{
|
|
37
38
|
"name": ".headerRenderer",
|
|
38
39
|
"description": "Custom function for rendering the dialog header.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.\n\nIf both `headerTitle` and `headerRenderer` are defined, the title\nand the elements created by the renderer will be placed next to\neach other, with the title coming first.\n\nWhen `headerRenderer` is set, the attribute `has-header` is set on the dialog.",
|
|
39
40
|
"value": {
|
|
40
41
|
"kind": "expression"
|
|
41
|
-
}
|
|
42
|
+
},
|
|
43
|
+
"deprecated": "Add header content as children of the dialog using `slot=\"header-content\"` instead"
|
|
42
44
|
},
|
|
43
45
|
{
|
|
44
46
|
"name": ".headerTitle",
|
|
@@ -47,6 +49,13 @@
|
|
|
47
49
|
"kind": "expression"
|
|
48
50
|
}
|
|
49
51
|
},
|
|
52
|
+
{
|
|
53
|
+
"name": ".headingLevel",
|
|
54
|
+
"description": "The ARIA heading level, used to set the `aria-level` attribute\non the title element. When not set, defaults to `1` for modal\ndialogs and `2` for modeless dialogs.",
|
|
55
|
+
"value": {
|
|
56
|
+
"kind": "expression"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
50
59
|
{
|
|
51
60
|
"name": ".height",
|
|
52
61
|
"description": "Set the height of the dialog.\nIf a unitless number is provided, pixels are assumed.",
|
|
@@ -101,7 +110,8 @@
|
|
|
101
110
|
"description": "Set to true to prevent the dialog from receiving focus\non open and trapping it inside.\n\nA field with `autofocus` inside the dialog still receives\nfocus on open.",
|
|
102
111
|
"value": {
|
|
103
112
|
"kind": "expression"
|
|
104
|
-
}
|
|
113
|
+
},
|
|
114
|
+
"deprecated": "This property is deprecated and will be removed in Vaadin 26."
|
|
105
115
|
},
|
|
106
116
|
{
|
|
107
117
|
"name": "?opened",
|
|
@@ -115,14 +125,16 @@
|
|
|
115
125
|
"description": "The `role` attribute value to be set on the dialog. Defaults to \"dialog\".",
|
|
116
126
|
"value": {
|
|
117
127
|
"kind": "expression"
|
|
118
|
-
}
|
|
128
|
+
},
|
|
129
|
+
"deprecated": "Use standard `role` attribute on the dialog instead"
|
|
119
130
|
},
|
|
120
131
|
{
|
|
121
132
|
"name": ".renderer",
|
|
122
133
|
"description": "Custom function for rendering the content of the dialog.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `dialog` The reference to the `<vaadin-dialog>` element.",
|
|
123
134
|
"value": {
|
|
124
135
|
"kind": "expression"
|
|
125
|
-
}
|
|
136
|
+
},
|
|
137
|
+
"deprecated": "Add content elements as children of the dialog instead"
|
|
126
138
|
},
|
|
127
139
|
{
|
|
128
140
|
"name": "?resizable",
|