@vaadin/context-menu 25.1.0-beta1 → 25.1.0-beta3

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.
@@ -17,253 +17,6 @@
17
17
  }
18
18
  ]
19
19
  },
20
- {
21
- "kind": "javascript-module",
22
- "path": "src/vaadin-context-menu-item.js",
23
- "declarations": [
24
- {
25
- "kind": "class",
26
- "description": "An element used internally by `<vaadin-context-menu>`. Not intended to be used separately.",
27
- "name": "ContextMenuItem",
28
- "members": [
29
- {
30
- "kind": "field",
31
- "name": "selected",
32
- "privacy": "public",
33
- "type": {
34
- "text": "boolean"
35
- },
36
- "description": "If true, the item is in selected state.",
37
- "attribute": "selected",
38
- "inheritedFrom": {
39
- "name": "ItemMixin",
40
- "package": "@vaadin/item/src/vaadin-item-mixin.js"
41
- }
42
- },
43
- {
44
- "kind": "field",
45
- "name": "value",
46
- "return": {
47
- "type": {
48
- "text": "string"
49
- }
50
- },
51
- "parameters": [
52
- {
53
- "name": "value",
54
- "type": {
55
- "text": "string"
56
- }
57
- }
58
- ],
59
- "inheritedFrom": {
60
- "name": "ItemMixin",
61
- "package": "@vaadin/item/src/vaadin-item-mixin.js"
62
- }
63
- }
64
- ],
65
- "mixins": [
66
- {
67
- "name": "ItemMixin",
68
- "package": "@vaadin/item/src/vaadin-item-mixin.js"
69
- },
70
- {
71
- "name": "ThemableMixin",
72
- "package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
73
- },
74
- {
75
- "name": "DirMixin",
76
- "package": "@vaadin/component-base/src/dir-mixin.js"
77
- },
78
- {
79
- "name": "PolylitMixin",
80
- "package": "@vaadin/component-base/src/polylit-mixin.js"
81
- },
82
- {
83
- "name": "LumoInjectionMixin",
84
- "package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
85
- }
86
- ],
87
- "superclass": {
88
- "name": "LitElement",
89
- "package": "lit"
90
- },
91
- "tagName": "vaadin-context-menu-item",
92
- "customElement": true,
93
- "attributes": [
94
- {
95
- "name": "selected",
96
- "type": {
97
- "text": "boolean"
98
- },
99
- "description": "If true, the item is in selected state.",
100
- "fieldName": "selected",
101
- "inheritedFrom": {
102
- "name": "ItemMixin",
103
- "package": "@vaadin/item/src/vaadin-item-mixin.js"
104
- }
105
- }
106
- ],
107
- "events": []
108
- }
109
- ],
110
- "exports": [
111
- {
112
- "kind": "js",
113
- "name": "ContextMenuItem",
114
- "declaration": {
115
- "name": "ContextMenuItem",
116
- "module": "src/vaadin-context-menu-item.js"
117
- }
118
- }
119
- ]
120
- },
121
- {
122
- "kind": "javascript-module",
123
- "path": "src/vaadin-context-menu-list-box.js",
124
- "declarations": [
125
- {
126
- "kind": "class",
127
- "description": "An element used internally by `<vaadin-context-menu>`. Not intended to be used separately.",
128
- "name": "ContextMenuListBox",
129
- "members": [
130
- {
131
- "kind": "field",
132
- "name": "disabled",
133
- "privacy": "public",
134
- "type": {
135
- "text": "boolean"
136
- },
137
- "description": "If true, the user cannot interact with this element.\nWhen the element is disabled, the selected item is\nnot updated when `selected` property is changed.",
138
- "attribute": "disabled",
139
- "inheritedFrom": {
140
- "name": "ListMixin",
141
- "package": "@vaadin/a11y-base/src/list-mixin.js"
142
- }
143
- },
144
- {
145
- "kind": "field",
146
- "name": "items",
147
- "privacy": "public",
148
- "type": {
149
- "text": "!Array<!Element> | undefined"
150
- },
151
- "description": "A read-only list of items from which a selection can be made.\nIt is populated from the elements passed to the light DOM,\nand updated dynamically when adding or removing items.",
152
- "attribute": "items",
153
- "inheritedFrom": {
154
- "name": "ListMixin",
155
- "package": "@vaadin/a11y-base/src/list-mixin.js"
156
- }
157
- },
158
- {
159
- "kind": "field",
160
- "name": "orientation",
161
- "privacy": "public",
162
- "type": {
163
- "text": "!ListOrientation"
164
- },
165
- "description": "Define how items are disposed in the dom.\nPossible values are: `horizontal|vertical`.\nIt also changes navigation keys from left/right to up/down.",
166
- "attribute": "orientation",
167
- "inheritedFrom": {
168
- "name": "ListMixin",
169
- "package": "@vaadin/a11y-base/src/list-mixin.js"
170
- }
171
- },
172
- {
173
- "kind": "field",
174
- "name": "selected",
175
- "privacy": "public",
176
- "type": {
177
- "text": "number"
178
- },
179
- "description": "The index of the item selected in the items array.\nNote: Not updated when used in `multiple` selection mode.",
180
- "attribute": "selected",
181
- "inheritedFrom": {
182
- "name": "ListMixin",
183
- "package": "@vaadin/a11y-base/src/list-mixin.js"
184
- }
185
- }
186
- ],
187
- "attributes": [
188
- {
189
- "name": "disabled",
190
- "type": {
191
- "text": "boolean"
192
- },
193
- "description": "If true, the user cannot interact with this element.\nWhen the element is disabled, the selected item is\nnot updated when `selected` property is changed.",
194
- "fieldName": "disabled",
195
- "inheritedFrom": {
196
- "name": "ListMixin",
197
- "package": "@vaadin/a11y-base/src/list-mixin.js"
198
- }
199
- },
200
- {
201
- "name": "orientation",
202
- "type": {
203
- "text": "!ListOrientation"
204
- },
205
- "description": "Define how items are disposed in the dom.\nPossible values are: `horizontal|vertical`.\nIt also changes navigation keys from left/right to up/down.",
206
- "fieldName": "orientation",
207
- "inheritedFrom": {
208
- "name": "ListMixin",
209
- "package": "@vaadin/a11y-base/src/list-mixin.js"
210
- }
211
- },
212
- {
213
- "name": "selected",
214
- "type": {
215
- "text": "number"
216
- },
217
- "description": "The index of the item selected in the items array.\nNote: Not updated when used in `multiple` selection mode.",
218
- "fieldName": "selected",
219
- "inheritedFrom": {
220
- "name": "ListMixin",
221
- "package": "@vaadin/a11y-base/src/list-mixin.js"
222
- }
223
- }
224
- ],
225
- "mixins": [
226
- {
227
- "name": "ListMixin",
228
- "package": "@vaadin/a11y-base/src/list-mixin.js"
229
- },
230
- {
231
- "name": "ThemableMixin",
232
- "package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
233
- },
234
- {
235
- "name": "DirMixin",
236
- "package": "@vaadin/component-base/src/dir-mixin.js"
237
- },
238
- {
239
- "name": "PolylitMixin",
240
- "package": "@vaadin/component-base/src/polylit-mixin.js"
241
- },
242
- {
243
- "name": "LumoInjectionMixin",
244
- "package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
245
- }
246
- ],
247
- "superclass": {
248
- "name": "LitElement",
249
- "package": "lit"
250
- },
251
- "tagName": "vaadin-context-menu-list-box",
252
- "customElement": true,
253
- "events": []
254
- }
255
- ],
256
- "exports": [
257
- {
258
- "kind": "js",
259
- "name": "ContextMenuListBox",
260
- "declaration": {
261
- "name": "ContextMenuListBox",
262
- "module": "src/vaadin-context-menu-list-box.js"
263
- }
264
- }
265
- ]
266
- },
267
20
  {
268
21
  "kind": "javascript-module",
269
22
  "path": "src/vaadin-context-menu-mixin.js",
@@ -285,743 +38,183 @@
285
38
  "type": {
286
39
  "text": "string"
287
40
  },
288
- "description": "Event name to listen for closing the context menu.",
289
- "attribute": "close-on"
290
- },
291
- {
292
- "kind": "field",
293
- "name": "items",
294
- "privacy": "public",
295
- "type": {
296
- "text": "!Array<!ContextMenuItem> | undefined"
297
- },
298
- "description": "Defines a (hierarchical) menu structure for the component.\nIf a menu item has a non-empty `children` set, a sub-menu with the child items is opened\nnext to the parent menu on mouseover, tap or a right arrow keypress.\n\nThe items API can't be used together with a renderer!\n\n#### Example\n\n```javascript\ncontextMenu.items = [\n { text: 'Menu Item 1', theme: 'primary', className: 'first', children:\n [\n { text: 'Menu Item 1-1', checked: true, keepOpen: true },\n { text: 'Menu Item 1-2' }\n ]\n },\n { component: 'hr' },\n { text: 'Menu Item 2', children:\n [\n { text: 'Menu Item 2-1' },\n { text: 'Menu Item 2-2', disabled: true }\n ]\n },\n { text: 'Menu Item 3', disabled: true, className: 'last' }\n];\n```",
299
- "attribute": "items",
300
- "inheritedFrom": {
301
- "name": "ItemsMixin",
302
- "module": "src/vaadin-contextmenu-items-mixin.js"
303
- }
304
- },
305
- {
306
- "kind": "field",
307
- "name": "listenOn",
308
- "privacy": "public",
309
- "type": {
310
- "text": "!HTMLElement"
311
- },
312
- "description": "The target element that's listened to for context menu opening events.\nBy default the vaadin-context-menu listens to the target's `vaadin-contextmenu`\nevents.",
313
- "default": "self",
314
- "attribute": "listen-on"
315
- },
316
- {
317
- "kind": "method",
318
- "name": "open",
319
- "parameters": [
320
- {
321
- "name": "e",
322
- "description": "used as the context for the menu. Overlay coordinates are taken from this event.",
323
- "type": {
324
- "text": "!Event | undefined"
325
- }
326
- }
327
- ],
328
- "description": "Opens the overlay."
329
- },
330
- {
331
- "kind": "field",
332
- "name": "opened",
333
- "privacy": "public",
334
- "type": {
335
- "text": "boolean"
336
- },
337
- "description": "True if the overlay is currently displayed.",
338
- "attribute": "opened"
339
- },
340
- {
341
- "kind": "field",
342
- "name": "openOn",
343
- "privacy": "public",
344
- "type": {
345
- "text": "string"
346
- },
347
- "description": "Event name to listen for opening the context menu.",
348
- "attribute": "open-on"
349
- },
350
- {
351
- "kind": "field",
352
- "name": "renderer",
353
- "privacy": "public",
354
- "type": {
355
- "text": "ContextMenuRenderer | undefined"
356
- },
357
- "description": "Custom function for rendering the content of the menu overlay.\nReceives three arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `contextMenu` The reference to the `<vaadin-context-menu>` element.\n- `context` The object with the menu context, contains:\n - `context.target` the target of the menu opening event,\n - `context.detail` the menu opening event detail.",
358
- "attribute": "renderer"
359
- },
360
- {
361
- "kind": "method",
362
- "name": "requestContentUpdate",
363
- "description": "Requests an update for the content of the menu 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."
364
- },
365
- {
366
- "kind": "field",
367
- "name": "selector",
368
- "privacy": "public",
369
- "type": {
370
- "text": "string"
371
- },
372
- "description": "CSS selector that can be used to target any child element\nof the context menu to listen for `openOn` events.",
373
- "attribute": "selector"
374
- }
375
- ],
376
- "events": [
377
- {
378
- "name": "close-all-menus",
379
- "type": {
380
- "text": "CustomEvent"
381
- },
382
- "inheritedFrom": {
383
- "name": "ItemsMixin",
384
- "module": "src/vaadin-contextmenu-items-mixin.js"
385
- }
386
- },
387
- {
388
- "name": "closed",
389
- "type": {
390
- "text": "CustomEvent"
391
- }
392
- },
393
- {
394
- "name": "item-selected",
395
- "type": {
396
- "text": "CustomEvent"
397
- },
398
- "inheritedFrom": {
399
- "name": "ItemsMixin",
400
- "module": "src/vaadin-contextmenu-items-mixin.js"
401
- }
402
- }
403
- ],
404
- "attributes": [
405
- {
406
- "name": "close-on",
407
- "type": {
408
- "text": "string"
409
- },
410
- "description": "Event name to listen for closing the context menu.",
411
- "fieldName": "closeOn"
412
- },
413
- {
414
- "name": "listen-on",
415
- "type": {
416
- "text": "!HTMLElement"
417
- },
418
- "description": "The target element that's listened to for context menu opening events.\nBy default the vaadin-context-menu listens to the target's `vaadin-contextmenu`\nevents.",
419
- "default": "self",
420
- "fieldName": "listenOn"
421
- },
422
- {
423
- "name": "open-on",
424
- "type": {
425
- "text": "string"
426
- },
427
- "description": "Event name to listen for opening the context menu.",
428
- "fieldName": "openOn"
429
- },
430
- {
431
- "name": "opened",
432
- "type": {
433
- "text": "boolean"
434
- },
435
- "description": "True if the overlay is currently displayed.",
436
- "fieldName": "opened"
437
- },
438
- {
439
- "name": "renderer",
440
- "type": {
441
- "text": "ContextMenuRenderer | undefined"
442
- },
443
- "description": "Custom function for rendering the content of the menu overlay.\nReceives three arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `contextMenu` The reference to the `<vaadin-context-menu>` element.\n- `context` The object with the menu context, contains:\n - `context.target` the target of the menu opening event,\n - `context.detail` the menu opening event detail.",
444
- "fieldName": "renderer"
445
- },
446
- {
447
- "name": "selector",
448
- "type": {
449
- "text": "string"
450
- },
451
- "description": "CSS selector that can be used to target any child element\nof the context menu to listen for `openOn` events.",
452
- "fieldName": "selector"
453
- }
454
- ],
455
- "mixins": [
456
- {
457
- "name": "ItemsMixin",
458
- "module": "src/vaadin-contextmenu-items-mixin.js"
459
- }
460
- ],
461
- "parameters": [
462
- {
463
- "name": "superClass"
464
- }
465
- ]
466
- }
467
- ],
468
- "exports": [
469
- {
470
- "kind": "js",
471
- "name": "ContextMenuMixin",
472
- "declaration": {
473
- "name": "ContextMenuMixin",
474
- "module": "src/vaadin-context-menu-mixin.js"
475
- }
476
- }
477
- ]
478
- },
479
- {
480
- "kind": "javascript-module",
481
- "path": "src/vaadin-context-menu-overlay.js",
482
- "declarations": [
483
- {
484
- "kind": "class",
485
- "description": "An element used internally by `<vaadin-context-menu>`. Not intended to be used separately.",
486
- "name": "ContextMenuOverlay",
487
- "members": [
488
- {
489
- "kind": "method",
490
- "name": "bringToFront",
491
- "description": "Brings the overlay as visually the frontmost one.",
492
- "inheritedFrom": {
493
- "name": "OverlayStackMixin",
494
- "package": "@vaadin/overlay/src/vaadin-overlay-stack-mixin.js"
495
- }
496
- },
497
- {
498
- "kind": "method",
499
- "name": "close",
500
- "parameters": [
501
- {
502
- "name": "sourceEvent",
503
- "type": {
504
- "text": "Event="
505
- }
506
- }
507
- ],
508
- "inheritedFrom": {
509
- "name": "OverlayMixin",
510
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
511
- }
512
- },
513
- {
514
- "kind": "field",
515
- "name": "focusTrap",
516
- "privacy": "public",
517
- "type": {
518
- "text": "boolean"
519
- },
520
- "description": "When true, opening the overlay moves focus to the first focusable child,\nor to the overlay part with tabindex if there are no focusable children.",
521
- "attribute": "focus-trap",
522
- "inheritedFrom": {
523
- "name": "OverlayFocusMixin",
524
- "package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
525
- }
526
- },
527
- {
528
- "kind": "method",
529
- "name": "getBoundaries",
530
- "description": "Returns the adjusted boundaries of the overlay.",
531
- "return": {
532
- "type": {
533
- "text": "object"
534
- }
535
- },
536
- "inheritedFrom": {
537
- "name": "MenuOverlayMixin",
538
- "module": "src/vaadin-menu-overlay-mixin.js"
539
- }
540
- },
541
- {
542
- "kind": "field",
543
- "name": "hidden",
544
- "privacy": "public",
545
- "type": {
546
- "text": "boolean"
547
- },
548
- "description": "When set to true, the overlay is hidden. This also closes the overlay\nimmediately in case there is a closing animation in progress.",
549
- "attribute": "hidden",
550
- "inheritedFrom": {
551
- "name": "OverlayMixin",
552
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
553
- }
554
- },
555
- {
556
- "kind": "field",
557
- "name": "horizontalAlign",
558
- "privacy": "public",
559
- "type": {
560
- "text": "string"
561
- },
562
- "description": "When `positionTarget` is set, this property defines whether to align the overlay's\nleft or right side to the target element by default.\nPossible values are `start` and `end`.\nRTL is taken into account when interpreting the value.\nThe overlay is automatically flipped to the opposite side when it doesn't fit into\nthe default side defined by this property.",
563
- "attribute": "horizontal-align",
564
- "inheritedFrom": {
565
- "name": "PositionMixin",
566
- "package": "@vaadin/overlay/src/vaadin-overlay-position-mixin.js"
567
- }
568
- },
569
- {
570
- "kind": "field",
571
- "name": "model",
572
- "privacy": "public",
573
- "type": {
574
- "text": "object"
575
- },
576
- "description": "Object with properties that is passed to `renderer` function",
577
- "attribute": "model",
578
- "inheritedFrom": {
579
- "name": "OverlayMixin",
580
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
581
- }
582
- },
583
- {
584
- "kind": "field",
585
- "name": "modeless",
586
- "privacy": "public",
587
- "type": {
588
- "text": "boolean"
589
- },
590
- "description": "When true the overlay won't disable the main content, showing\nit doesn't change the functionality of the user interface.",
591
- "attribute": "modeless",
592
- "inheritedFrom": {
593
- "name": "OverlayMixin",
594
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
595
- }
596
- },
597
- {
598
- "kind": "field",
599
- "name": "noHorizontalOverlap",
600
- "privacy": "public",
601
- "type": {
602
- "text": "boolean"
603
- },
604
- "description": "When `positionTarget` is set, this property defines whether the overlay should overlap\nthe target element in the x-axis, or be positioned right next to it.",
605
- "attribute": "no-horizontal-overlap",
606
- "inheritedFrom": {
607
- "name": "PositionMixin",
608
- "package": "@vaadin/overlay/src/vaadin-overlay-position-mixin.js"
609
- }
610
- },
611
- {
612
- "kind": "field",
613
- "name": "noVerticalOverlap",
614
- "privacy": "public",
615
- "type": {
616
- "text": "boolean"
617
- },
618
- "description": "When `positionTarget` is set, this property defines whether the overlay should overlap\nthe target element in the y-axis, or be positioned right above/below it.",
619
- "attribute": "no-vertical-overlap",
620
- "inheritedFrom": {
621
- "name": "PositionMixin",
622
- "package": "@vaadin/overlay/src/vaadin-overlay-position-mixin.js"
623
- }
624
- },
625
- {
626
- "kind": "field",
627
- "name": "opened",
628
- "privacy": "public",
629
- "type": {
630
- "text": "boolean"
631
- },
632
- "description": "When true, the overlay is visible and attached to body.",
633
- "attribute": "opened",
634
- "inheritedFrom": {
635
- "name": "OverlayMixin",
636
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
637
- }
638
- },
639
- {
640
- "kind": "field",
641
- "name": "owner",
642
- "privacy": "public",
643
- "type": {
644
- "text": "HTMLElement"
645
- },
646
- "description": "Owner element passed with renderer function",
647
- "attribute": "owner",
648
- "inheritedFrom": {
649
- "name": "OverlayMixin",
650
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
651
- }
652
- },
653
- {
654
- "kind": "field",
655
- "name": "position",
656
- "privacy": "public",
657
- "type": {
658
- "text": "string"
659
- },
660
- "description": "Position of the overlay with respect to the target.\nSupported values: null, `top-start`, `top`, `top-end`,\n`bottom-start`, `bottom`, `bottom-end`, `start-top`,\n`start`, `start-bottom`, `end-top`, `end`, `end-bottom`.",
661
- "attribute": "position"
662
- },
663
- {
664
- "kind": "field",
665
- "name": "positionTarget",
666
- "privacy": "public",
667
- "type": {
668
- "text": "object"
669
- },
670
- "description": "The element next to which this overlay should be aligned.\nThe position of the overlay relative to the positionTarget can be adjusted\nwith properties `horizontalAlign`, `verticalAlign`, `noHorizontalOverlap`\nand `noVerticalOverlap`.",
671
- "attribute": "position-target",
672
- "inheritedFrom": {
673
- "name": "PositionMixin",
674
- "package": "@vaadin/overlay/src/vaadin-overlay-position-mixin.js"
675
- }
676
- },
677
- {
678
- "kind": "field",
679
- "name": "renderer",
680
- "privacy": "public",
681
- "type": {
682
- "text": "OverlayRenderer | null | undefined"
683
- },
684
- "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.",
685
- "attribute": "renderer",
686
- "inheritedFrom": {
687
- "name": "OverlayMixin",
688
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
689
- }
690
- },
691
- {
692
- "kind": "method",
693
- "name": "requestContentUpdate",
694
- "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.",
695
- "inheritedFrom": {
696
- "name": "OverlayMixin",
697
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
698
- }
699
- },
700
- {
701
- "kind": "field",
702
- "name": "requiredVerticalSpace",
703
- "privacy": "public",
704
- "type": {
705
- "text": "number"
706
- },
707
- "description": "If the overlay content has no intrinsic height, this property can be used to set\nthe minimum vertical space (in pixels) required by the overlay. Setting a value to\nthe property effectively disables the content measurement in favor of using this\nfixed value for determining the open direction.",
708
- "attribute": "required-vertical-space",
709
- "inheritedFrom": {
710
- "name": "PositionMixin",
711
- "package": "@vaadin/overlay/src/vaadin-overlay-position-mixin.js"
712
- }
41
+ "description": "Event name to listen for closing the context menu.",
42
+ "attribute": "close-on"
713
43
  },
714
44
  {
715
45
  "kind": "field",
716
- "name": "restoreFocusNode",
46
+ "name": "items",
717
47
  "privacy": "public",
718
48
  "type": {
719
- "text": "HTMLElement"
49
+ "text": "!Array<!ContextMenuItem> | undefined"
720
50
  },
721
- "description": "Set to specify the element which should be focused on overlay close,\nif `restoreFocusOnClose` is set to true.",
722
- "attribute": "restore-focus-node",
51
+ "description": "Defines a (hierarchical) menu structure for the component.\nIf a menu item has a non-empty `children` set, a sub-menu with the child items is opened\nnext to the parent menu on mouseover, tap or a right arrow keypress.\n\nThe items API can't be used together with a renderer!\n\n#### Example\n\n```javascript\ncontextMenu.items = [\n { text: 'Menu Item 1', theme: 'primary', className: 'first', children:\n [\n { text: 'Menu Item 1-1', checked: true, keepOpen: true },\n { text: 'Menu Item 1-2' }\n ]\n },\n { component: 'hr' },\n { text: 'Menu Item 2', children:\n [\n { text: 'Menu Item 2-1' },\n { text: 'Menu Item 2-2', disabled: true }\n ]\n },\n { text: 'Menu Item 3', disabled: true, className: 'last' }\n];\n```",
52
+ "attribute": "items",
723
53
  "inheritedFrom": {
724
- "name": "OverlayFocusMixin",
725
- "package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
54
+ "name": "ItemsMixin",
55
+ "module": "src/vaadin-contextmenu-items-mixin.js"
726
56
  }
727
57
  },
728
58
  {
729
59
  "kind": "field",
730
- "name": "restoreFocusOnClose",
60
+ "name": "listenOn",
731
61
  "privacy": "public",
732
62
  "type": {
733
- "text": "boolean"
63
+ "text": "!HTMLElement"
734
64
  },
735
- "description": "Set to true to enable restoring of focus when overlay is closed.",
736
- "attribute": "restore-focus-on-close",
737
- "inheritedFrom": {
738
- "name": "OverlayFocusMixin",
739
- "package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
740
- }
65
+ "description": "The target element that's listened to for context menu opening events.\nBy default the vaadin-context-menu listens to the target's `vaadin-contextmenu`\nevents.",
66
+ "default": "self",
67
+ "attribute": "listen-on"
741
68
  },
742
69
  {
743
70
  "kind": "method",
744
- "name": "setBounds",
71
+ "name": "open",
745
72
  "parameters": [
746
73
  {
747
- "name": "bounds",
748
- "type": {
749
- "text": "!OverlayBoundsParam"
750
- }
751
- },
752
- {
753
- "name": "absolute",
754
- "default": "true",
74
+ "name": "e",
75
+ "description": "used as the context for the menu. Overlay coordinates are taken from this event.",
755
76
  "type": {
756
- "text": "boolean"
77
+ "text": "!Event | undefined"
757
78
  }
758
79
  }
759
80
  ],
760
- "description": "Updates the coordinates of the overlay.",
761
- "inheritedFrom": {
762
- "name": "OverlayMixin",
763
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
764
- }
81
+ "description": "Opens the overlay."
765
82
  },
766
83
  {
767
84
  "kind": "field",
768
- "name": "verticalAlign",
85
+ "name": "opened",
769
86
  "privacy": "public",
770
87
  "type": {
771
- "text": "string"
88
+ "text": "boolean"
772
89
  },
773
- "description": "When `positionTarget` is set, this property defines whether to align the overlay's\ntop or bottom side to the target element by default.\nPossible values are `top` and `bottom`.\nThe overlay is automatically flipped to the opposite side when it doesn't fit into\nthe default side defined by this property.",
774
- "attribute": "vertical-align",
775
- "inheritedFrom": {
776
- "name": "PositionMixin",
777
- "package": "@vaadin/overlay/src/vaadin-overlay-position-mixin.js"
778
- }
90
+ "description": "True if the overlay is currently displayed.",
91
+ "attribute": "opened",
92
+ "readonly": true
779
93
  },
780
94
  {
781
95
  "kind": "field",
782
- "name": "withBackdrop",
96
+ "name": "openOn",
783
97
  "privacy": "public",
784
98
  "type": {
785
- "text": "boolean"
786
- },
787
- "description": "When true the overlay has backdrop on top of content when opened.",
788
- "attribute": "with-backdrop",
789
- "inheritedFrom": {
790
- "name": "OverlayMixin",
791
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
792
- }
793
- }
794
- ],
795
- "attributes": [
796
- {
797
- "name": "focus-trap",
798
- "type": {
799
- "text": "boolean"
800
- },
801
- "description": "When true, opening the overlay moves focus to the first focusable child,\nor to the overlay part with tabindex if there are no focusable children.",
802
- "fieldName": "focusTrap",
803
- "inheritedFrom": {
804
- "name": "OverlayFocusMixin",
805
- "package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
806
- }
807
- },
808
- {
809
- "name": "hidden",
810
- "type": {
811
- "text": "boolean"
99
+ "text": "string"
812
100
  },
813
- "description": "When set to true, the overlay is hidden. This also closes the overlay\nimmediately in case there is a closing animation in progress.",
814
- "fieldName": "hidden",
815
- "inheritedFrom": {
816
- "name": "OverlayMixin",
817
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
818
- }
101
+ "description": "Event name to listen for opening the context menu.",
102
+ "attribute": "open-on"
819
103
  },
820
104
  {
821
- "name": "horizontal-align",
105
+ "kind": "field",
106
+ "name": "renderer",
107
+ "privacy": "public",
822
108
  "type": {
823
- "text": "string"
109
+ "text": "ContextMenuRenderer | undefined"
824
110
  },
825
- "description": "When `positionTarget` is set, this property defines whether to align the overlay's\nleft or right side to the target element by default.\nPossible values are `start` and `end`.\nRTL is taken into account when interpreting the value.\nThe overlay is automatically flipped to the opposite side when it doesn't fit into\nthe default side defined by this property.",
826
- "fieldName": "horizontalAlign",
827
- "inheritedFrom": {
828
- "name": "PositionMixin",
829
- "package": "@vaadin/overlay/src/vaadin-overlay-position-mixin.js"
830
- }
111
+ "description": "Custom function for rendering the content of the menu overlay.\nReceives three arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `contextMenu` The reference to the `<vaadin-context-menu>` element.\n- `context` The object with the menu context, contains:\n - `context.target` the target of the menu opening event,\n - `context.detail` the menu opening event detail.",
112
+ "attribute": "renderer"
831
113
  },
832
114
  {
833
- "name": "modeless",
834
- "type": {
835
- "text": "boolean"
836
- },
837
- "description": "When true the overlay won't disable the main content, showing\nit doesn't change the functionality of the user interface.",
838
- "fieldName": "modeless",
839
- "inheritedFrom": {
840
- "name": "OverlayMixin",
841
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
842
- }
115
+ "kind": "method",
116
+ "name": "requestContentUpdate",
117
+ "description": "Requests an update for the content of the menu 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."
843
118
  },
844
119
  {
845
- "name": "no-horizontal-overlap",
120
+ "kind": "field",
121
+ "name": "selector",
122
+ "privacy": "public",
846
123
  "type": {
847
- "text": "boolean"
124
+ "text": "string"
848
125
  },
849
- "description": "When `positionTarget` is set, this property defines whether the overlay should overlap\nthe target element in the x-axis, or be positioned right next to it.",
850
- "fieldName": "noHorizontalOverlap",
851
- "inheritedFrom": {
852
- "name": "PositionMixin",
853
- "package": "@vaadin/overlay/src/vaadin-overlay-position-mixin.js"
854
- }
855
- },
126
+ "description": "CSS selector that can be used to target any child element\nof the context menu to listen for `openOn` events.",
127
+ "attribute": "selector"
128
+ }
129
+ ],
130
+ "events": [
856
131
  {
857
- "name": "no-vertical-overlap",
132
+ "name": "close-all-menus",
858
133
  "type": {
859
- "text": "boolean"
134
+ "text": "CustomEvent"
860
135
  },
861
- "description": "When `positionTarget` is set, this property defines whether the overlay should overlap\nthe target element in the y-axis, or be positioned right above/below it.",
862
- "fieldName": "noVerticalOverlap",
863
136
  "inheritedFrom": {
864
- "name": "PositionMixin",
865
- "package": "@vaadin/overlay/src/vaadin-overlay-position-mixin.js"
137
+ "name": "ItemsMixin",
138
+ "module": "src/vaadin-contextmenu-items-mixin.js"
866
139
  }
867
140
  },
868
141
  {
869
- "name": "opened",
142
+ "name": "closed",
870
143
  "type": {
871
- "text": "boolean"
872
- },
873
- "description": "When true, the overlay is visible and attached to body.",
874
- "fieldName": "opened",
875
- "inheritedFrom": {
876
- "name": "OverlayMixin",
877
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
144
+ "text": "CustomEvent"
878
145
  }
879
146
  },
880
147
  {
881
- "name": "owner",
148
+ "name": "item-selected",
882
149
  "type": {
883
- "text": "HTMLElement"
150
+ "text": "CustomEvent"
884
151
  },
885
- "description": "Owner element passed with renderer function",
886
- "fieldName": "owner",
887
152
  "inheritedFrom": {
888
- "name": "OverlayMixin",
889
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
153
+ "name": "ItemsMixin",
154
+ "module": "src/vaadin-contextmenu-items-mixin.js"
890
155
  }
891
- },
156
+ }
157
+ ],
158
+ "attributes": [
892
159
  {
893
- "name": "position",
160
+ "name": "close-on",
894
161
  "type": {
895
162
  "text": "string"
896
163
  },
897
- "description": "Position of the overlay with respect to the target.\nSupported values: null, `top-start`, `top`, `top-end`,\n`bottom-start`, `bottom`, `bottom-end`, `start-top`,\n`start`, `start-bottom`, `end-top`, `end`, `end-bottom`.",
898
- "fieldName": "position"
899
- },
900
- {
901
- "name": "renderer",
902
- "type": {
903
- "text": "OverlayRenderer | null | undefined"
904
- },
905
- "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.",
906
- "fieldName": "renderer",
907
- "inheritedFrom": {
908
- "name": "OverlayMixin",
909
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
910
- }
164
+ "description": "Event name to listen for closing the context menu.",
165
+ "fieldName": "closeOn"
911
166
  },
912
167
  {
913
- "name": "required-vertical-space",
168
+ "name": "listen-on",
914
169
  "type": {
915
- "text": "number"
170
+ "text": "!HTMLElement"
916
171
  },
917
- "description": "If the overlay content has no intrinsic height, this property can be used to set\nthe minimum vertical space (in pixels) required by the overlay. Setting a value to\nthe property effectively disables the content measurement in favor of using this\nfixed value for determining the open direction.",
918
- "fieldName": "requiredVerticalSpace",
919
- "inheritedFrom": {
920
- "name": "PositionMixin",
921
- "package": "@vaadin/overlay/src/vaadin-overlay-position-mixin.js"
922
- }
172
+ "description": "The target element that's listened to for context menu opening events.\nBy default the vaadin-context-menu listens to the target's `vaadin-contextmenu`\nevents.",
173
+ "default": "self",
174
+ "fieldName": "listenOn"
923
175
  },
924
176
  {
925
- "name": "restore-focus-node",
177
+ "name": "open-on",
926
178
  "type": {
927
- "text": "HTMLElement"
179
+ "text": "string"
928
180
  },
929
- "description": "Set to specify the element which should be focused on overlay close,\nif `restoreFocusOnClose` is set to true.",
930
- "fieldName": "restoreFocusNode",
931
- "inheritedFrom": {
932
- "name": "OverlayFocusMixin",
933
- "package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
934
- }
181
+ "description": "Event name to listen for opening the context menu.",
182
+ "fieldName": "openOn"
935
183
  },
936
184
  {
937
- "name": "restore-focus-on-close",
185
+ "name": "opened",
938
186
  "type": {
939
187
  "text": "boolean"
940
188
  },
941
- "description": "Set to true to enable restoring of focus when overlay is closed.",
942
- "fieldName": "restoreFocusOnClose",
943
- "inheritedFrom": {
944
- "name": "OverlayFocusMixin",
945
- "package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
946
- }
189
+ "description": "True if the overlay is currently displayed.",
190
+ "fieldName": "opened"
947
191
  },
948
192
  {
949
- "name": "vertical-align",
193
+ "name": "renderer",
950
194
  "type": {
951
- "text": "string"
195
+ "text": "ContextMenuRenderer | undefined"
952
196
  },
953
- "description": "When `positionTarget` is set, this property defines whether to align the overlay's\ntop or bottom side to the target element by default.\nPossible values are `top` and `bottom`.\nThe overlay is automatically flipped to the opposite side when it doesn't fit into\nthe default side defined by this property.",
954
- "fieldName": "verticalAlign",
955
- "inheritedFrom": {
956
- "name": "PositionMixin",
957
- "package": "@vaadin/overlay/src/vaadin-overlay-position-mixin.js"
958
- }
197
+ "description": "Custom function for rendering the content of the menu overlay.\nReceives three arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `contextMenu` The reference to the `<vaadin-context-menu>` element.\n- `context` The object with the menu context, contains:\n - `context.target` the target of the menu opening event,\n - `context.detail` the menu opening event detail.",
198
+ "fieldName": "renderer"
959
199
  },
960
200
  {
961
- "name": "with-backdrop",
201
+ "name": "selector",
962
202
  "type": {
963
- "text": "boolean"
203
+ "text": "string"
964
204
  },
965
- "description": "When true the overlay has backdrop on top of content when opened.",
966
- "fieldName": "withBackdrop",
967
- "inheritedFrom": {
968
- "name": "OverlayMixin",
969
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
970
- }
205
+ "description": "CSS selector that can be used to target any child element\nof the context menu to listen for `openOn` events.",
206
+ "fieldName": "selector"
971
207
  }
972
208
  ],
973
209
  "mixins": [
974
210
  {
975
- "name": "MenuOverlayMixin",
976
- "module": "src/vaadin-menu-overlay-mixin.js"
977
- },
978
- {
979
- "name": "OverlayMixin",
980
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
981
- },
982
- {
983
- "name": "DirMixin",
984
- "package": "@vaadin/component-base/src/dir-mixin.js"
985
- },
986
- {
987
- "name": "ThemableMixin",
988
- "package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
989
- },
990
- {
991
- "name": "PolylitMixin",
992
- "package": "@vaadin/component-base/src/polylit-mixin.js"
993
- },
994
- {
995
- "name": "LumoInjectionMixin",
996
- "package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
211
+ "name": "ItemsMixin",
212
+ "module": "src/vaadin-contextmenu-items-mixin.js"
997
213
  }
998
214
  ],
999
- "superclass": {
1000
- "name": "LitElement",
1001
- "package": "lit"
1002
- },
1003
- "tagName": "vaadin-context-menu-overlay",
1004
- "customElement": true,
1005
- "events": [
1006
- {
1007
- "name": "vaadin-overlay-closed",
1008
- "type": {
1009
- "text": "CustomEvent"
1010
- },
1011
- "inheritedFrom": {
1012
- "name": "OverlayMixin",
1013
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
1014
- }
1015
- },
215
+ "parameters": [
1016
216
  {
1017
- "name": "vaadin-overlay-closing",
1018
- "type": {
1019
- "text": "CustomEvent"
1020
- },
1021
- "inheritedFrom": {
1022
- "name": "OverlayMixin",
1023
- "package": "@vaadin/overlay/src/vaadin-overlay-mixin.js"
1024
- }
217
+ "name": "superClass"
1025
218
  }
1026
219
  ]
1027
220
  }
@@ -1029,10 +222,10 @@
1029
222
  "exports": [
1030
223
  {
1031
224
  "kind": "js",
1032
- "name": "ContextMenuOverlay",
225
+ "name": "ContextMenuMixin",
1033
226
  "declaration": {
1034
- "name": "ContextMenuOverlay",
1035
- "module": "src/vaadin-context-menu-overlay.js"
227
+ "name": "ContextMenuMixin",
228
+ "module": "src/vaadin-context-menu-mixin.js"
1036
229
  }
1037
230
  }
1038
231
  ]
@@ -1125,6 +318,7 @@
1125
318
  },
1126
319
  "description": "True if the overlay is currently displayed.",
1127
320
  "attribute": "opened",
321
+ "readonly": true,
1128
322
  "inheritedFrom": {
1129
323
  "name": "ContextMenuMixin",
1130
324
  "module": "src/vaadin-context-menu-mixin.js"
@@ -1198,6 +392,7 @@
1198
392
  "type": {
1199
393
  "text": "CustomEvent"
1200
394
  },
395
+ "description": "Fired when all menus should close, e.g., after pressing Tab or on submenu close.",
1201
396
  "inheritedFrom": {
1202
397
  "name": "ItemsMixin",
1203
398
  "module": "src/vaadin-contextmenu-items-mixin.js"
@@ -1225,6 +420,13 @@
1225
420
  "module": "src/vaadin-contextmenu-items-mixin.js"
1226
421
  }
1227
422
  },
423
+ {
424
+ "type": {
425
+ "text": "CustomEvent"
426
+ },
427
+ "description": "Fired when a click happens outside any open sub-menus.",
428
+ "name": "items-outside-click"
429
+ },
1228
430
  {
1229
431
  "type": {
1230
432
  "text": "CustomEvent"
@@ -1353,12 +555,6 @@
1353
555
  }
1354
556
  ]
1355
557
  },
1356
- {
1357
- "kind": "javascript-module",
1358
- "path": "src/vaadin-contextmenu-event.js",
1359
- "declarations": [],
1360
- "exports": []
1361
- },
1362
558
  {
1363
559
  "kind": "javascript-module",
1364
560
  "path": "src/vaadin-contextmenu-items-mixin.js",