@spectrum-web-components/menu 1.12.0-snapshot.20260422090428 → 1.12.0
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 +887 -88
- package/package.json +10 -10
- package/src/Menu.d.ts +157 -0
- package/src/Menu.dev.js +496 -5
- package/src/Menu.dev.js.map +3 -3
- package/src/Menu.js +29 -2
- package/src/Menu.js.map +3 -3
- package/src/MenuItem.d.ts +33 -2
- package/src/MenuItem.dev.js +66 -5
- package/src/MenuItem.dev.js.map +2 -2
- package/src/MenuItem.js +8 -3
- package/src/MenuItem.js.map +3 -3
- package/src/menu-item.css.dev.js +1 -1
- package/src/menu-item.css.dev.js.map +1 -1
- package/src/menu-item.css.js +1 -1
- package/src/menu-item.css.js.map +1 -1
- package/src/menu.css.dev.js +1 -1
- package/src/menu.css.dev.js.map +1 -1
- package/src/menu.css.js +1 -1
- package/src/menu.css.js.map +1 -1
package/custom-elements.json
CHANGED
|
@@ -95,6 +95,33 @@
|
|
|
95
95
|
"privacy": "private",
|
|
96
96
|
"readonly": true
|
|
97
97
|
},
|
|
98
|
+
{
|
|
99
|
+
"kind": "method",
|
|
100
|
+
"name": "asMenu",
|
|
101
|
+
"privacy": "private",
|
|
102
|
+
"return": {
|
|
103
|
+
"type": {
|
|
104
|
+
"text": "Menu"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"parameters": [
|
|
108
|
+
{
|
|
109
|
+
"name": "element",
|
|
110
|
+
"type": {
|
|
111
|
+
"text": "HTMLElement"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"kind": "field",
|
|
118
|
+
"name": "_mobileViewRoot",
|
|
119
|
+
"type": {
|
|
120
|
+
"text": "Menu | null"
|
|
121
|
+
},
|
|
122
|
+
"privacy": "private",
|
|
123
|
+
"readonly": true
|
|
124
|
+
},
|
|
98
125
|
{
|
|
99
126
|
"kind": "field",
|
|
100
127
|
"name": "rovingTabindexController",
|
|
@@ -160,6 +187,266 @@
|
|
|
160
187
|
"privacy": "public",
|
|
161
188
|
"description": "Public getter for scrolling state\nReturns true if the component is currently in a scrolling state"
|
|
162
189
|
},
|
|
190
|
+
{
|
|
191
|
+
"kind": "field",
|
|
192
|
+
"name": "currentMobileSubmenu",
|
|
193
|
+
"type": {
|
|
194
|
+
"text": "MenuItem | undefined"
|
|
195
|
+
},
|
|
196
|
+
"privacy": "public",
|
|
197
|
+
"description": "Returns the MenuItem whose submenu is currently displayed at the\ntop of the mobile drill-down stack, or `undefined` when no submenu\nis open.",
|
|
198
|
+
"readonly": true
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"kind": "method",
|
|
202
|
+
"name": "openMobileSubmenu",
|
|
203
|
+
"privacy": "public",
|
|
204
|
+
"return": {
|
|
205
|
+
"type": {
|
|
206
|
+
"text": "void"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"parameters": [
|
|
210
|
+
{
|
|
211
|
+
"name": "item",
|
|
212
|
+
"type": {
|
|
213
|
+
"text": "MenuItem"
|
|
214
|
+
},
|
|
215
|
+
"description": "The MenuItem whose submenu should be opened."
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
"description": "Opens a mobile submenu by projecting its content into this menu's\nlight DOM, pushing it onto the submenu stack, triggering the\nslide-in animation, and focusing the back button."
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"kind": "method",
|
|
222
|
+
"name": "closeMobileSubmenu",
|
|
223
|
+
"privacy": "public",
|
|
224
|
+
"return": {
|
|
225
|
+
"type": {
|
|
226
|
+
"text": "void"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"description": "Closes the topmost mobile submenu by restoring it to its original\nparent MenuItem, popping it from the stack, and either re-focusing\nthe previous submenu's back button or returning focus to the\ntriggering MenuItem when no deeper level remains."
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"kind": "method",
|
|
233
|
+
"name": "_focusProjectedSubmenu",
|
|
234
|
+
"privacy": "private",
|
|
235
|
+
"return": {
|
|
236
|
+
"type": {
|
|
237
|
+
"text": "Promise<void>"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"parameters": [
|
|
241
|
+
{
|
|
242
|
+
"name": "item",
|
|
243
|
+
"type": {
|
|
244
|
+
"text": "MenuItem"
|
|
245
|
+
},
|
|
246
|
+
"description": "The MenuItem whose projected submenu should receive focus."
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"description": "Focuses the mobile back button inside the given item's projected\nsubmenu. Explicitly resets `tabIndex` and `focused` on every other\nchild of the submenu so only the back row is in the tab order\nafter the drill-down opens. We avoid delegating to the projected\nsubmenu's `RovingTabindexController` here because the back button\nis appended dynamically via `render()` and may not yet be in the\ncontroller's element cache when this runs, which would cause\nfocus to fall back to the first nested item instead."
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"kind": "method",
|
|
253
|
+
"name": "_focusMobileBackRow",
|
|
254
|
+
"privacy": "private",
|
|
255
|
+
"return": {
|
|
256
|
+
"type": {
|
|
257
|
+
"text": "void"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"description": "Focuses the mobile back button of the currently visible projected\nsubmenu. Used when the user presses ArrowUp from the first nested\nitem so focus moves to the back row instead of wrapping. Manages\n`tabIndex`/`focused` explicitly to keep the back row as the only\ntabbable element in the projected submenu."
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"kind": "method",
|
|
264
|
+
"name": "_focusFirstItemInCurrentNestedSubmenu",
|
|
265
|
+
"privacy": "private",
|
|
266
|
+
"return": {
|
|
267
|
+
"type": {
|
|
268
|
+
"text": "void"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"description": "Focuses the first focusable item inside the currently visible\nprojected submenu, skipping the back row. Used when the user\npresses ArrowDown from the back row. Manages `tabIndex`/`focused`\nexplicitly so only the focused item is in the tab order."
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"kind": "field",
|
|
275
|
+
"name": "handleMobileDrilldownKeydownCapture",
|
|
276
|
+
"privacy": "private",
|
|
277
|
+
"description": "Capture-phase keydown handler that overrides the default\n`RovingTabindexController` wrap behavior at the mobile drill-down\nboundary:\n - ArrowUp on the first nested item moves focus to the back row.\n - ArrowDown on the back row moves focus to the first nested item.\n\nRuns in the capture phase so it preempts the projected submenu's\ncontroller, which handles arrow keys in the bubble phase."
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"kind": "method",
|
|
281
|
+
"name": "_triggerMobileTransition",
|
|
282
|
+
"privacy": "private",
|
|
283
|
+
"return": {
|
|
284
|
+
"type": {
|
|
285
|
+
"text": "void"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"parameters": [
|
|
289
|
+
{
|
|
290
|
+
"name": "direction",
|
|
291
|
+
"type": {
|
|
292
|
+
"text": "'forward' | 'back'"
|
|
293
|
+
},
|
|
294
|
+
"description": "`'forward'` slides content in from the right,\n`'back'` slides content in from the left."
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
"description": "Triggers a CSS slide animation on the mobile submenu wrapper.\nWaits for the current Lit update cycle, then sets the\n`mobile-transition` attribute so the keyframe animation plays."
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"kind": "field",
|
|
301
|
+
"name": "_handleAnimationEnd",
|
|
302
|
+
"privacy": "private",
|
|
303
|
+
"description": "Cleans up the `mobile-transition` attribute once the CSS slide\nanimation finishes, preventing the animation from replaying on\nsubsequent layout changes. Bound declaratively via `@animationend`\non the wrapper, so it only fires for that element."
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"kind": "method",
|
|
307
|
+
"name": "resetMobileSubmenus",
|
|
308
|
+
"privacy": "public",
|
|
309
|
+
"return": {
|
|
310
|
+
"type": {
|
|
311
|
+
"text": "void"
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"description": "Restores every projected submenu back to its original parent and\nclears the submenu stack. Called during `disconnectedCallback` or\nwhen the menu overlay closes to ensure a clean state."
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"kind": "method",
|
|
318
|
+
"name": "_projectMobileSubmenu",
|
|
319
|
+
"privacy": "private",
|
|
320
|
+
"return": {
|
|
321
|
+
"type": {
|
|
322
|
+
"text": "void"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"parameters": [
|
|
326
|
+
{
|
|
327
|
+
"name": "item",
|
|
328
|
+
"type": {
|
|
329
|
+
"text": "MenuItem"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
"description": "Moves the submenu element from its MenuItem parent into this Menu's\nlight DOM with a `mobile-submenu` slot, so it projects through the\nnamed slot in the shadow DOM. Any previously visible projected submenu\nis moved to a non-rendered slot to avoid both showing at once."
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"kind": "method",
|
|
337
|
+
"name": "_restoreMobileSubmenu",
|
|
338
|
+
"privacy": "private",
|
|
339
|
+
"return": {
|
|
340
|
+
"type": {
|
|
341
|
+
"text": "void"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
"parameters": [
|
|
345
|
+
{
|
|
346
|
+
"name": "item",
|
|
347
|
+
"type": {
|
|
348
|
+
"text": "MenuItem"
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
"description": "Restores the submenu element back to its original MenuItem parent\nand resets the slot attribute."
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"kind": "field",
|
|
356
|
+
"name": "handleMobileBackClick",
|
|
357
|
+
"privacy": "private",
|
|
358
|
+
"description": "Handles click on the mobile back button. Stops the event from\nreaching parent menus and closes the current mobile submenu."
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"kind": "field",
|
|
362
|
+
"name": "_mobileBackContainers",
|
|
363
|
+
"privacy": "private",
|
|
364
|
+
"default": "new Map<HTMLElement, HTMLElement>()",
|
|
365
|
+
"description": "Maps each projected submenu element to its Lit render container so\nthat back button elements can be individually cleaned up when a\nsubmenu is restored, without affecting other levels in the stack."
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"kind": "method",
|
|
369
|
+
"name": "_renderMobileBackElements",
|
|
370
|
+
"privacy": "private",
|
|
371
|
+
"return": {
|
|
372
|
+
"type": {
|
|
373
|
+
"text": "void"
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"parameters": [
|
|
377
|
+
{
|
|
378
|
+
"name": "submenuEl",
|
|
379
|
+
"type": {
|
|
380
|
+
"text": "HTMLElement"
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
],
|
|
384
|
+
"description": "Declaratively renders the mobile back button and divider into the\nprojected submenu element using Lit's `render()`, so the back button\nlives inside the same `<sp-menu>` and participates in its\n`RovingTabindexController` for keyboard navigation. Re-renders\nwhenever `dir` or `mobileBackLabel` change so the icon orientation\nand label stay in sync."
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"kind": "method",
|
|
388
|
+
"name": "_refreshMobileBackElements",
|
|
389
|
+
"privacy": "private",
|
|
390
|
+
"return": {
|
|
391
|
+
"type": {
|
|
392
|
+
"text": "void"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"description": "Re-render any open mobile back containers so changes to\n`mobileBackLabel` (and other reactive values consumed by the\nback-button template) propagate without needing to close\nand re-open the drill-down."
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"kind": "method",
|
|
399
|
+
"name": "_removeMobileBackElements",
|
|
400
|
+
"privacy": "private",
|
|
401
|
+
"return": {
|
|
402
|
+
"type": {
|
|
403
|
+
"text": "void"
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"parameters": [
|
|
407
|
+
{
|
|
408
|
+
"name": "submenuEl",
|
|
409
|
+
"type": {
|
|
410
|
+
"text": "HTMLElement"
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
],
|
|
414
|
+
"description": "Removes the mobile back button render container from the given\nprojected submenu element."
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"kind": "method",
|
|
418
|
+
"name": "_restoreSubmenuChildState",
|
|
419
|
+
"privacy": "private",
|
|
420
|
+
"return": {
|
|
421
|
+
"type": {
|
|
422
|
+
"text": "void"
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
"parameters": [
|
|
426
|
+
{
|
|
427
|
+
"name": "submenu",
|
|
428
|
+
"type": {
|
|
429
|
+
"text": "Menu"
|
|
430
|
+
},
|
|
431
|
+
"description": "The submenu whose child state needs restoring."
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"name": "savedChildItems",
|
|
435
|
+
"type": {
|
|
436
|
+
"text": "Set<MenuItem>"
|
|
437
|
+
},
|
|
438
|
+
"description": "The set of MenuItem children captured\nbefore the DOM move."
|
|
439
|
+
}
|
|
440
|
+
],
|
|
441
|
+
"description": "Re-adds saved child items to the submenu's `childItemSet` and\ninvalidates cached references after DOM re-parenting, so the\n`RovingTabindexController` picks up the correct set of focusable\nchildren."
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"kind": "field",
|
|
445
|
+
"name": "_mobileSubmenuOriginalParents",
|
|
446
|
+
"privacy": "private",
|
|
447
|
+
"default": "new Map<HTMLElement, HTMLElement>()",
|
|
448
|
+
"description": "Maps each projected submenu element to its original parent so the\nelement can be moved back when the submenu is closed."
|
|
449
|
+
},
|
|
163
450
|
{
|
|
164
451
|
"kind": "field",
|
|
165
452
|
"name": "label",
|
|
@@ -184,6 +471,38 @@
|
|
|
184
471
|
"attribute": "ignore",
|
|
185
472
|
"reflects": true
|
|
186
473
|
},
|
|
474
|
+
{
|
|
475
|
+
"kind": "field",
|
|
476
|
+
"name": "mobileView",
|
|
477
|
+
"type": {
|
|
478
|
+
"text": "boolean"
|
|
479
|
+
},
|
|
480
|
+
"privacy": "public",
|
|
481
|
+
"default": "false",
|
|
482
|
+
"description": "Enables mobile submenu navigation where tapping a submenu item replaces\nthe current menu content with the submenu's children (drill-down) instead\nof opening a flyout overlay.",
|
|
483
|
+
"attribute": "mobile-view",
|
|
484
|
+
"reflects": true
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"kind": "field",
|
|
488
|
+
"name": "mobileBackLabel",
|
|
489
|
+
"type": {
|
|
490
|
+
"text": "string"
|
|
491
|
+
},
|
|
492
|
+
"privacy": "public",
|
|
493
|
+
"default": "'Back'",
|
|
494
|
+
"description": "Label for the mobile back button, used for localization.",
|
|
495
|
+
"attribute": "mobile-back-label"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"kind": "field",
|
|
499
|
+
"name": "_mobileSubmenuStack",
|
|
500
|
+
"type": {
|
|
501
|
+
"text": "MenuItem[]"
|
|
502
|
+
},
|
|
503
|
+
"privacy": "private",
|
|
504
|
+
"default": "[]"
|
|
505
|
+
},
|
|
187
506
|
{
|
|
188
507
|
"kind": "field",
|
|
189
508
|
"name": "selects",
|
|
@@ -952,9 +1271,27 @@
|
|
|
952
1271
|
"fieldName": "ignore"
|
|
953
1272
|
},
|
|
954
1273
|
{
|
|
955
|
-
"name": "
|
|
1274
|
+
"name": "mobile-view",
|
|
956
1275
|
"type": {
|
|
957
|
-
"text": "
|
|
1276
|
+
"text": "boolean"
|
|
1277
|
+
},
|
|
1278
|
+
"default": "false",
|
|
1279
|
+
"description": "Enables mobile submenu navigation where tapping a submenu item replaces\nthe current menu content with the submenu's children (drill-down) instead\nof opening a flyout overlay.",
|
|
1280
|
+
"fieldName": "mobileView"
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"name": "mobile-back-label",
|
|
1284
|
+
"type": {
|
|
1285
|
+
"text": "string"
|
|
1286
|
+
},
|
|
1287
|
+
"default": "'Back'",
|
|
1288
|
+
"description": "Label for the mobile back button, used for localization.",
|
|
1289
|
+
"fieldName": "mobileBackLabel"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"name": "value",
|
|
1293
|
+
"type": {
|
|
1294
|
+
"text": "string"
|
|
958
1295
|
},
|
|
959
1296
|
"default": "''",
|
|
960
1297
|
"description": "value of the selected item(s)",
|
|
@@ -1069,36 +1406,366 @@
|
|
|
1069
1406
|
"privacy": "private"
|
|
1070
1407
|
},
|
|
1071
1408
|
{
|
|
1072
|
-
"kind": "field",
|
|
1073
|
-
"name": "headerElement",
|
|
1074
|
-
"type": {
|
|
1075
|
-
"text": "HTMLElement | undefined"
|
|
1409
|
+
"kind": "field",
|
|
1410
|
+
"name": "headerElement",
|
|
1411
|
+
"type": {
|
|
1412
|
+
"text": "HTMLElement | undefined"
|
|
1413
|
+
},
|
|
1414
|
+
"privacy": "private"
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
"kind": "field",
|
|
1418
|
+
"name": "ownRole",
|
|
1419
|
+
"type": {
|
|
1420
|
+
"text": "string"
|
|
1421
|
+
},
|
|
1422
|
+
"privacy": "protected",
|
|
1423
|
+
"readonly": true,
|
|
1424
|
+
"description": "a menu group must have the role `group`\nand should never function as a menu",
|
|
1425
|
+
"inheritedFrom": {
|
|
1426
|
+
"name": "Menu",
|
|
1427
|
+
"module": "src/Menu.js"
|
|
1428
|
+
}
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
"kind": "field",
|
|
1432
|
+
"name": "controlsRovingTabindex",
|
|
1433
|
+
"type": {
|
|
1434
|
+
"text": "boolean"
|
|
1435
|
+
},
|
|
1436
|
+
"privacy": "protected",
|
|
1437
|
+
"readonly": true,
|
|
1438
|
+
"description": "only a menu controls roving tabindex;\ngroups should defer navigation to parent menu",
|
|
1439
|
+
"inheritedFrom": {
|
|
1440
|
+
"name": "Menu",
|
|
1441
|
+
"module": "src/Menu.js"
|
|
1442
|
+
}
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
"kind": "method",
|
|
1446
|
+
"name": "updateLabel",
|
|
1447
|
+
"privacy": "protected",
|
|
1448
|
+
"return": {
|
|
1449
|
+
"type": {
|
|
1450
|
+
"text": "void"
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
"kind": "field",
|
|
1456
|
+
"name": "shadowRootOptions",
|
|
1457
|
+
"type": {
|
|
1458
|
+
"text": "object"
|
|
1459
|
+
},
|
|
1460
|
+
"static": true,
|
|
1461
|
+
"default": "{ ...SpectrumElement.shadowRootOptions, delegatesFocus: true, }",
|
|
1462
|
+
"inheritedFrom": {
|
|
1463
|
+
"name": "Menu",
|
|
1464
|
+
"module": "src/Menu.js"
|
|
1465
|
+
}
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
"kind": "field",
|
|
1469
|
+
"name": "isSubmenu",
|
|
1470
|
+
"type": {
|
|
1471
|
+
"text": "boolean"
|
|
1472
|
+
},
|
|
1473
|
+
"privacy": "private",
|
|
1474
|
+
"readonly": true,
|
|
1475
|
+
"inheritedFrom": {
|
|
1476
|
+
"name": "Menu",
|
|
1477
|
+
"module": "src/Menu.js"
|
|
1478
|
+
}
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
"kind": "method",
|
|
1482
|
+
"name": "asMenu",
|
|
1483
|
+
"privacy": "private",
|
|
1484
|
+
"return": {
|
|
1485
|
+
"type": {
|
|
1486
|
+
"text": "Menu"
|
|
1487
|
+
}
|
|
1488
|
+
},
|
|
1489
|
+
"parameters": [
|
|
1490
|
+
{
|
|
1491
|
+
"name": "element",
|
|
1492
|
+
"type": {
|
|
1493
|
+
"text": "HTMLElement"
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
],
|
|
1497
|
+
"inheritedFrom": {
|
|
1498
|
+
"name": "Menu",
|
|
1499
|
+
"module": "src/Menu.js"
|
|
1500
|
+
}
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
"kind": "field",
|
|
1504
|
+
"name": "_mobileViewRoot",
|
|
1505
|
+
"type": {
|
|
1506
|
+
"text": "Menu | null"
|
|
1507
|
+
},
|
|
1508
|
+
"privacy": "private",
|
|
1509
|
+
"readonly": true,
|
|
1510
|
+
"inheritedFrom": {
|
|
1511
|
+
"name": "Menu",
|
|
1512
|
+
"module": "src/Menu.js"
|
|
1513
|
+
}
|
|
1514
|
+
},
|
|
1515
|
+
{
|
|
1516
|
+
"kind": "field",
|
|
1517
|
+
"name": "rovingTabindexController",
|
|
1518
|
+
"type": {
|
|
1519
|
+
"text": "RovingTabindexController<MenuItem> | undefined"
|
|
1520
|
+
},
|
|
1521
|
+
"privacy": "protected",
|
|
1522
|
+
"inheritedFrom": {
|
|
1523
|
+
"name": "Menu",
|
|
1524
|
+
"module": "src/Menu.js"
|
|
1525
|
+
}
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
"kind": "field",
|
|
1529
|
+
"name": "touchStartY",
|
|
1530
|
+
"type": {
|
|
1531
|
+
"text": "number | undefined"
|
|
1532
|
+
},
|
|
1533
|
+
"privacy": "private",
|
|
1534
|
+
"default": "undefined",
|
|
1535
|
+
"description": "iPad scroll detection properties\n\nThis feature prevents menu item selection during iPad scrolling to avoid\naccidental selections when users are trying to scroll through a long menu.\n\nHow it works:\n1. On touchstart: Record initial Y position and timestamp\n2. On touchmove: Calculate vertical movement and time elapsed\n3. If movement > threshold AND time < threshold: Mark as scrolling\n4. On touchend: Reset scrolling state after a delay\n5. During selection: Prevent selection if scrolling is detected\n\nThis prevents the common iPad issue where users accidentally select menu\nitems while trying to scroll through the menu content.\n\nThreshold Values:\n- Movement threshold: 10px (consistent with Card component click vs. drag detection)\n- Time threshold: 300ms (consistent with longpress duration across the design system)\n- Reset delay: 100ms (allows final touch events to be processed)\n\nThese values are carefully chosen to balance preventing accidental triggers\nwhile allowing intentional scroll gestures. They represent a common UX pattern\nin mobile interfaces and are consistent with other components in the design system.",
|
|
1536
|
+
"inheritedFrom": {
|
|
1537
|
+
"name": "Menu",
|
|
1538
|
+
"module": "src/Menu.js"
|
|
1539
|
+
}
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
"kind": "field",
|
|
1543
|
+
"name": "touchStartTime",
|
|
1544
|
+
"type": {
|
|
1545
|
+
"text": "number | undefined"
|
|
1546
|
+
},
|
|
1547
|
+
"privacy": "private",
|
|
1548
|
+
"default": "undefined",
|
|
1549
|
+
"inheritedFrom": {
|
|
1550
|
+
"name": "Menu",
|
|
1551
|
+
"module": "src/Menu.js"
|
|
1552
|
+
}
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
"kind": "field",
|
|
1556
|
+
"name": "isCurrentlyScrolling",
|
|
1557
|
+
"type": {
|
|
1558
|
+
"text": "boolean"
|
|
1559
|
+
},
|
|
1560
|
+
"privacy": "private",
|
|
1561
|
+
"default": "false",
|
|
1562
|
+
"inheritedFrom": {
|
|
1563
|
+
"name": "Menu",
|
|
1564
|
+
"module": "src/Menu.js"
|
|
1565
|
+
}
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
"kind": "field",
|
|
1569
|
+
"name": "scrollThreshold",
|
|
1570
|
+
"type": {
|
|
1571
|
+
"text": "number"
|
|
1572
|
+
},
|
|
1573
|
+
"privacy": "private",
|
|
1574
|
+
"default": "10",
|
|
1575
|
+
"description": "Minimum vertical movement (in pixels) required to trigger scrolling detection.\n\nThis threshold is consistent with other components in the design system:\n- Card component uses 10px for click vs. drag detection\n- Menu component uses 10px for scroll vs. selection detection\n\nThe 10px threshold is carefully chosen to:\n- Allow for natural finger tremor and accidental touches\n- Distinguish between intentional scroll gestures and taps\n- Provide consistent behavior across the platform",
|
|
1576
|
+
"inheritedFrom": {
|
|
1577
|
+
"name": "Menu",
|
|
1578
|
+
"module": "src/Menu.js"
|
|
1579
|
+
}
|
|
1580
|
+
},
|
|
1581
|
+
{
|
|
1582
|
+
"kind": "field",
|
|
1583
|
+
"name": "scrollTimeThreshold",
|
|
1584
|
+
"type": {
|
|
1585
|
+
"text": "number"
|
|
1586
|
+
},
|
|
1587
|
+
"privacy": "private",
|
|
1588
|
+
"default": "300",
|
|
1589
|
+
"description": "Maximum time (in milliseconds) for a movement to be considered scrolling.\n\nThis threshold is consistent with other timing values in the design system:\n- Longpress duration: 300ms (ActionButton, LongpressController)\n- Scroll detection: 300ms (Menu component)\n\nQuick movements within this timeframe are likely intentional scrolls,\nwhile slower movements are more likely taps or selections.",
|
|
1590
|
+
"inheritedFrom": {
|
|
1591
|
+
"name": "Menu",
|
|
1592
|
+
"module": "src/Menu.js"
|
|
1593
|
+
}
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
"kind": "field",
|
|
1597
|
+
"name": "isScrolling",
|
|
1598
|
+
"type": {
|
|
1599
|
+
"text": "boolean"
|
|
1600
|
+
},
|
|
1601
|
+
"privacy": "public",
|
|
1602
|
+
"description": "Public getter for scrolling state\nReturns true if the component is currently in a scrolling state",
|
|
1603
|
+
"inheritedFrom": {
|
|
1604
|
+
"name": "Menu",
|
|
1605
|
+
"module": "src/Menu.js"
|
|
1606
|
+
}
|
|
1607
|
+
},
|
|
1608
|
+
{
|
|
1609
|
+
"kind": "field",
|
|
1610
|
+
"name": "currentMobileSubmenu",
|
|
1611
|
+
"type": {
|
|
1612
|
+
"text": "MenuItem | undefined"
|
|
1613
|
+
},
|
|
1614
|
+
"privacy": "public",
|
|
1615
|
+
"description": "Returns the MenuItem whose submenu is currently displayed at the\ntop of the mobile drill-down stack, or `undefined` when no submenu\nis open.",
|
|
1616
|
+
"readonly": true,
|
|
1617
|
+
"inheritedFrom": {
|
|
1618
|
+
"name": "Menu",
|
|
1619
|
+
"module": "src/Menu.js"
|
|
1620
|
+
}
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
"kind": "method",
|
|
1624
|
+
"name": "openMobileSubmenu",
|
|
1625
|
+
"privacy": "public",
|
|
1626
|
+
"return": {
|
|
1627
|
+
"type": {
|
|
1628
|
+
"text": "void"
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
"parameters": [
|
|
1632
|
+
{
|
|
1633
|
+
"name": "item",
|
|
1634
|
+
"type": {
|
|
1635
|
+
"text": "MenuItem"
|
|
1636
|
+
},
|
|
1637
|
+
"description": "The MenuItem whose submenu should be opened."
|
|
1638
|
+
}
|
|
1639
|
+
],
|
|
1640
|
+
"description": "Opens a mobile submenu by projecting its content into this menu's\nlight DOM, pushing it onto the submenu stack, triggering the\nslide-in animation, and focusing the back button.",
|
|
1641
|
+
"inheritedFrom": {
|
|
1642
|
+
"name": "Menu",
|
|
1643
|
+
"module": "src/Menu.js"
|
|
1644
|
+
}
|
|
1645
|
+
},
|
|
1646
|
+
{
|
|
1647
|
+
"kind": "method",
|
|
1648
|
+
"name": "closeMobileSubmenu",
|
|
1649
|
+
"privacy": "public",
|
|
1650
|
+
"return": {
|
|
1651
|
+
"type": {
|
|
1652
|
+
"text": "void"
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
"description": "Closes the topmost mobile submenu by restoring it to its original\nparent MenuItem, popping it from the stack, and either re-focusing\nthe previous submenu's back button or returning focus to the\ntriggering MenuItem when no deeper level remains.",
|
|
1656
|
+
"inheritedFrom": {
|
|
1657
|
+
"name": "Menu",
|
|
1658
|
+
"module": "src/Menu.js"
|
|
1659
|
+
}
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
"kind": "method",
|
|
1663
|
+
"name": "_focusProjectedSubmenu",
|
|
1664
|
+
"privacy": "private",
|
|
1665
|
+
"return": {
|
|
1666
|
+
"type": {
|
|
1667
|
+
"text": "Promise<void>"
|
|
1668
|
+
}
|
|
1669
|
+
},
|
|
1670
|
+
"parameters": [
|
|
1671
|
+
{
|
|
1672
|
+
"name": "item",
|
|
1673
|
+
"type": {
|
|
1674
|
+
"text": "MenuItem"
|
|
1675
|
+
},
|
|
1676
|
+
"description": "The MenuItem whose projected submenu should receive focus."
|
|
1677
|
+
}
|
|
1678
|
+
],
|
|
1679
|
+
"description": "Focuses the mobile back button inside the given item's projected\nsubmenu. Explicitly resets `tabIndex` and `focused` on every other\nchild of the submenu so only the back row is in the tab order\nafter the drill-down opens. We avoid delegating to the projected\nsubmenu's `RovingTabindexController` here because the back button\nis appended dynamically via `render()` and may not yet be in the\ncontroller's element cache when this runs, which would cause\nfocus to fall back to the first nested item instead.",
|
|
1680
|
+
"inheritedFrom": {
|
|
1681
|
+
"name": "Menu",
|
|
1682
|
+
"module": "src/Menu.js"
|
|
1683
|
+
}
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
"kind": "method",
|
|
1687
|
+
"name": "_focusMobileBackRow",
|
|
1688
|
+
"privacy": "private",
|
|
1689
|
+
"return": {
|
|
1690
|
+
"type": {
|
|
1691
|
+
"text": "void"
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1694
|
+
"description": "Focuses the mobile back button of the currently visible projected\nsubmenu. Used when the user presses ArrowUp from the first nested\nitem so focus moves to the back row instead of wrapping. Manages\n`tabIndex`/`focused` explicitly to keep the back row as the only\ntabbable element in the projected submenu.",
|
|
1695
|
+
"inheritedFrom": {
|
|
1696
|
+
"name": "Menu",
|
|
1697
|
+
"module": "src/Menu.js"
|
|
1698
|
+
}
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
"kind": "method",
|
|
1702
|
+
"name": "_focusFirstItemInCurrentNestedSubmenu",
|
|
1703
|
+
"privacy": "private",
|
|
1704
|
+
"return": {
|
|
1705
|
+
"type": {
|
|
1706
|
+
"text": "void"
|
|
1707
|
+
}
|
|
1708
|
+
},
|
|
1709
|
+
"description": "Focuses the first focusable item inside the currently visible\nprojected submenu, skipping the back row. Used when the user\npresses ArrowDown from the back row. Manages `tabIndex`/`focused`\nexplicitly so only the focused item is in the tab order.",
|
|
1710
|
+
"inheritedFrom": {
|
|
1711
|
+
"name": "Menu",
|
|
1712
|
+
"module": "src/Menu.js"
|
|
1713
|
+
}
|
|
1714
|
+
},
|
|
1715
|
+
{
|
|
1716
|
+
"kind": "field",
|
|
1717
|
+
"name": "handleMobileDrilldownKeydownCapture",
|
|
1718
|
+
"privacy": "private",
|
|
1719
|
+
"description": "Capture-phase keydown handler that overrides the default\n`RovingTabindexController` wrap behavior at the mobile drill-down\nboundary:\n - ArrowUp on the first nested item moves focus to the back row.\n - ArrowDown on the back row moves focus to the first nested item.\n\nRuns in the capture phase so it preempts the projected submenu's\ncontroller, which handles arrow keys in the bubble phase.",
|
|
1720
|
+
"inheritedFrom": {
|
|
1721
|
+
"name": "Menu",
|
|
1722
|
+
"module": "src/Menu.js"
|
|
1723
|
+
}
|
|
1724
|
+
},
|
|
1725
|
+
{
|
|
1726
|
+
"kind": "method",
|
|
1727
|
+
"name": "_triggerMobileTransition",
|
|
1728
|
+
"privacy": "private",
|
|
1729
|
+
"return": {
|
|
1730
|
+
"type": {
|
|
1731
|
+
"text": "void"
|
|
1732
|
+
}
|
|
1076
1733
|
},
|
|
1077
|
-
"
|
|
1734
|
+
"parameters": [
|
|
1735
|
+
{
|
|
1736
|
+
"name": "direction",
|
|
1737
|
+
"type": {
|
|
1738
|
+
"text": "'forward' | 'back'"
|
|
1739
|
+
},
|
|
1740
|
+
"description": "`'forward'` slides content in from the right,\n`'back'` slides content in from the left."
|
|
1741
|
+
}
|
|
1742
|
+
],
|
|
1743
|
+
"description": "Triggers a CSS slide animation on the mobile submenu wrapper.\nWaits for the current Lit update cycle, then sets the\n`mobile-transition` attribute so the keyframe animation plays.",
|
|
1744
|
+
"inheritedFrom": {
|
|
1745
|
+
"name": "Menu",
|
|
1746
|
+
"module": "src/Menu.js"
|
|
1747
|
+
}
|
|
1078
1748
|
},
|
|
1079
1749
|
{
|
|
1080
1750
|
"kind": "field",
|
|
1081
|
-
"name": "
|
|
1082
|
-
"
|
|
1083
|
-
|
|
1084
|
-
},
|
|
1085
|
-
"privacy": "protected",
|
|
1086
|
-
"readonly": true,
|
|
1087
|
-
"description": "a menu group must have the role `group`\nand should never function as a menu",
|
|
1751
|
+
"name": "_handleAnimationEnd",
|
|
1752
|
+
"privacy": "private",
|
|
1753
|
+
"description": "Cleans up the `mobile-transition` attribute once the CSS slide\nanimation finishes, preventing the animation from replaying on\nsubsequent layout changes. Bound declaratively via `@animationend`\non the wrapper, so it only fires for that element.",
|
|
1088
1754
|
"inheritedFrom": {
|
|
1089
1755
|
"name": "Menu",
|
|
1090
1756
|
"module": "src/Menu.js"
|
|
1091
1757
|
}
|
|
1092
1758
|
},
|
|
1093
1759
|
{
|
|
1094
|
-
"kind": "
|
|
1095
|
-
"name": "
|
|
1096
|
-
"
|
|
1097
|
-
|
|
1760
|
+
"kind": "method",
|
|
1761
|
+
"name": "resetMobileSubmenus",
|
|
1762
|
+
"privacy": "public",
|
|
1763
|
+
"return": {
|
|
1764
|
+
"type": {
|
|
1765
|
+
"text": "void"
|
|
1766
|
+
}
|
|
1098
1767
|
},
|
|
1099
|
-
"
|
|
1100
|
-
"readonly": true,
|
|
1101
|
-
"description": "only a menu controls roving tabindex;\ngroups should defer navigation to parent menu",
|
|
1768
|
+
"description": "Restores every projected submenu back to its original parent and\nclears the submenu stack. Called during `disconnectedCallback` or\nwhen the menu overlay closes to ensure a clean state.",
|
|
1102
1769
|
"inheritedFrom": {
|
|
1103
1770
|
"name": "Menu",
|
|
1104
1771
|
"module": "src/Menu.js"
|
|
@@ -1106,22 +1773,45 @@
|
|
|
1106
1773
|
},
|
|
1107
1774
|
{
|
|
1108
1775
|
"kind": "method",
|
|
1109
|
-
"name": "
|
|
1110
|
-
"privacy": "
|
|
1776
|
+
"name": "_projectMobileSubmenu",
|
|
1777
|
+
"privacy": "private",
|
|
1111
1778
|
"return": {
|
|
1112
1779
|
"type": {
|
|
1113
1780
|
"text": "void"
|
|
1114
1781
|
}
|
|
1782
|
+
},
|
|
1783
|
+
"parameters": [
|
|
1784
|
+
{
|
|
1785
|
+
"name": "item",
|
|
1786
|
+
"type": {
|
|
1787
|
+
"text": "MenuItem"
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
],
|
|
1791
|
+
"description": "Moves the submenu element from its MenuItem parent into this Menu's\nlight DOM with a `mobile-submenu` slot, so it projects through the\nnamed slot in the shadow DOM. Any previously visible projected submenu\nis moved to a non-rendered slot to avoid both showing at once.",
|
|
1792
|
+
"inheritedFrom": {
|
|
1793
|
+
"name": "Menu",
|
|
1794
|
+
"module": "src/Menu.js"
|
|
1115
1795
|
}
|
|
1116
1796
|
},
|
|
1117
1797
|
{
|
|
1118
|
-
"kind": "
|
|
1119
|
-
"name": "
|
|
1120
|
-
"
|
|
1121
|
-
|
|
1798
|
+
"kind": "method",
|
|
1799
|
+
"name": "_restoreMobileSubmenu",
|
|
1800
|
+
"privacy": "private",
|
|
1801
|
+
"return": {
|
|
1802
|
+
"type": {
|
|
1803
|
+
"text": "void"
|
|
1804
|
+
}
|
|
1122
1805
|
},
|
|
1123
|
-
"
|
|
1124
|
-
|
|
1806
|
+
"parameters": [
|
|
1807
|
+
{
|
|
1808
|
+
"name": "item",
|
|
1809
|
+
"type": {
|
|
1810
|
+
"text": "MenuItem"
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
],
|
|
1814
|
+
"description": "Restores the submenu element back to its original MenuItem parent\nand resets the slot attribute.",
|
|
1125
1815
|
"inheritedFrom": {
|
|
1126
1816
|
"name": "Menu",
|
|
1127
1817
|
"module": "src/Menu.js"
|
|
@@ -1129,12 +1819,9 @@
|
|
|
1129
1819
|
},
|
|
1130
1820
|
{
|
|
1131
1821
|
"kind": "field",
|
|
1132
|
-
"name": "
|
|
1133
|
-
"type": {
|
|
1134
|
-
"text": "boolean"
|
|
1135
|
-
},
|
|
1822
|
+
"name": "handleMobileBackClick",
|
|
1136
1823
|
"privacy": "private",
|
|
1137
|
-
"
|
|
1824
|
+
"description": "Handles click on the mobile back button. Stops the event from\nreaching parent menus and closes the current mobile submenu.",
|
|
1138
1825
|
"inheritedFrom": {
|
|
1139
1826
|
"name": "Menu",
|
|
1140
1827
|
"module": "src/Menu.js"
|
|
@@ -1142,38 +1829,102 @@
|
|
|
1142
1829
|
},
|
|
1143
1830
|
{
|
|
1144
1831
|
"kind": "field",
|
|
1145
|
-
"name": "
|
|
1146
|
-
"
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
"privacy": "protected",
|
|
1832
|
+
"name": "_mobileBackContainers",
|
|
1833
|
+
"privacy": "private",
|
|
1834
|
+
"default": "new Map<HTMLElement, HTMLElement>()",
|
|
1835
|
+
"description": "Maps each projected submenu element to its Lit render container so\nthat back button elements can be individually cleaned up when a\nsubmenu is restored, without affecting other levels in the stack.",
|
|
1150
1836
|
"inheritedFrom": {
|
|
1151
1837
|
"name": "Menu",
|
|
1152
1838
|
"module": "src/Menu.js"
|
|
1153
1839
|
}
|
|
1154
1840
|
},
|
|
1155
1841
|
{
|
|
1156
|
-
"kind": "
|
|
1157
|
-
"name": "
|
|
1158
|
-
"
|
|
1159
|
-
|
|
1842
|
+
"kind": "method",
|
|
1843
|
+
"name": "_renderMobileBackElements",
|
|
1844
|
+
"privacy": "private",
|
|
1845
|
+
"return": {
|
|
1846
|
+
"type": {
|
|
1847
|
+
"text": "void"
|
|
1848
|
+
}
|
|
1160
1849
|
},
|
|
1850
|
+
"parameters": [
|
|
1851
|
+
{
|
|
1852
|
+
"name": "submenuEl",
|
|
1853
|
+
"type": {
|
|
1854
|
+
"text": "HTMLElement"
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
],
|
|
1858
|
+
"description": "Declaratively renders the mobile back button and divider into the\nprojected submenu element using Lit's `render()`, so the back button\nlives inside the same `<sp-menu>` and participates in its\n`RovingTabindexController` for keyboard navigation. Re-renders\nwhenever `dir` or `mobileBackLabel` change so the icon orientation\nand label stay in sync.",
|
|
1859
|
+
"inheritedFrom": {
|
|
1860
|
+
"name": "Menu",
|
|
1861
|
+
"module": "src/Menu.js"
|
|
1862
|
+
}
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
"kind": "method",
|
|
1866
|
+
"name": "_refreshMobileBackElements",
|
|
1161
1867
|
"privacy": "private",
|
|
1162
|
-
"
|
|
1163
|
-
|
|
1868
|
+
"return": {
|
|
1869
|
+
"type": {
|
|
1870
|
+
"text": "void"
|
|
1871
|
+
}
|
|
1872
|
+
},
|
|
1873
|
+
"description": "Re-render any open mobile back containers so changes to\n`mobileBackLabel` (and other reactive values consumed by the\nback-button template) propagate without needing to close\nand re-open the drill-down.",
|
|
1164
1874
|
"inheritedFrom": {
|
|
1165
1875
|
"name": "Menu",
|
|
1166
1876
|
"module": "src/Menu.js"
|
|
1167
1877
|
}
|
|
1168
1878
|
},
|
|
1169
1879
|
{
|
|
1170
|
-
"kind": "
|
|
1171
|
-
"name": "
|
|
1172
|
-
"
|
|
1173
|
-
|
|
1880
|
+
"kind": "method",
|
|
1881
|
+
"name": "_removeMobileBackElements",
|
|
1882
|
+
"privacy": "private",
|
|
1883
|
+
"return": {
|
|
1884
|
+
"type": {
|
|
1885
|
+
"text": "void"
|
|
1886
|
+
}
|
|
1174
1887
|
},
|
|
1888
|
+
"parameters": [
|
|
1889
|
+
{
|
|
1890
|
+
"name": "submenuEl",
|
|
1891
|
+
"type": {
|
|
1892
|
+
"text": "HTMLElement"
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
],
|
|
1896
|
+
"description": "Removes the mobile back button render container from the given\nprojected submenu element.",
|
|
1897
|
+
"inheritedFrom": {
|
|
1898
|
+
"name": "Menu",
|
|
1899
|
+
"module": "src/Menu.js"
|
|
1900
|
+
}
|
|
1901
|
+
},
|
|
1902
|
+
{
|
|
1903
|
+
"kind": "method",
|
|
1904
|
+
"name": "_restoreSubmenuChildState",
|
|
1175
1905
|
"privacy": "private",
|
|
1176
|
-
"
|
|
1906
|
+
"return": {
|
|
1907
|
+
"type": {
|
|
1908
|
+
"text": "void"
|
|
1909
|
+
}
|
|
1910
|
+
},
|
|
1911
|
+
"parameters": [
|
|
1912
|
+
{
|
|
1913
|
+
"name": "submenu",
|
|
1914
|
+
"type": {
|
|
1915
|
+
"text": "Menu"
|
|
1916
|
+
},
|
|
1917
|
+
"description": "The submenu whose child state needs restoring."
|
|
1918
|
+
},
|
|
1919
|
+
{
|
|
1920
|
+
"name": "savedChildItems",
|
|
1921
|
+
"type": {
|
|
1922
|
+
"text": "Set<MenuItem>"
|
|
1923
|
+
},
|
|
1924
|
+
"description": "The set of MenuItem children captured\nbefore the DOM move."
|
|
1925
|
+
}
|
|
1926
|
+
],
|
|
1927
|
+
"description": "Re-adds saved child items to the submenu's `childItemSet` and\ninvalidates cached references after DOM re-parenting, so the\n`RovingTabindexController` picks up the correct set of focusable\nchildren.",
|
|
1177
1928
|
"inheritedFrom": {
|
|
1178
1929
|
"name": "Menu",
|
|
1179
1930
|
"module": "src/Menu.js"
|
|
@@ -1181,12 +1932,10 @@
|
|
|
1181
1932
|
},
|
|
1182
1933
|
{
|
|
1183
1934
|
"kind": "field",
|
|
1184
|
-
"name": "
|
|
1185
|
-
"type": {
|
|
1186
|
-
"text": "boolean"
|
|
1187
|
-
},
|
|
1935
|
+
"name": "_mobileSubmenuOriginalParents",
|
|
1188
1936
|
"privacy": "private",
|
|
1189
|
-
"default": "
|
|
1937
|
+
"default": "new Map<HTMLElement, HTMLElement>()",
|
|
1938
|
+
"description": "Maps each projected submenu element to its original parent so the\nelement can be moved back when the submenu is closed.",
|
|
1190
1939
|
"inheritedFrom": {
|
|
1191
1940
|
"name": "Menu",
|
|
1192
1941
|
"module": "src/Menu.js"
|
|
@@ -1194,13 +1943,15 @@
|
|
|
1194
1943
|
},
|
|
1195
1944
|
{
|
|
1196
1945
|
"kind": "field",
|
|
1197
|
-
"name": "
|
|
1946
|
+
"name": "label",
|
|
1198
1947
|
"type": {
|
|
1199
|
-
"text": "
|
|
1948
|
+
"text": "string"
|
|
1200
1949
|
},
|
|
1201
|
-
"privacy": "
|
|
1202
|
-
"default": "
|
|
1203
|
-
"description": "
|
|
1950
|
+
"privacy": "public",
|
|
1951
|
+
"default": "''",
|
|
1952
|
+
"description": "label of the menu",
|
|
1953
|
+
"attribute": "label",
|
|
1954
|
+
"reflects": true,
|
|
1204
1955
|
"inheritedFrom": {
|
|
1205
1956
|
"name": "Menu",
|
|
1206
1957
|
"module": "src/Menu.js"
|
|
@@ -1208,13 +1959,15 @@
|
|
|
1208
1959
|
},
|
|
1209
1960
|
{
|
|
1210
1961
|
"kind": "field",
|
|
1211
|
-
"name": "
|
|
1962
|
+
"name": "ignore",
|
|
1212
1963
|
"type": {
|
|
1213
|
-
"text": "
|
|
1964
|
+
"text": "boolean"
|
|
1214
1965
|
},
|
|
1215
|
-
"privacy": "
|
|
1216
|
-
"default": "
|
|
1217
|
-
"description": "
|
|
1966
|
+
"privacy": "public",
|
|
1967
|
+
"default": "false",
|
|
1968
|
+
"description": "whether menu should be ignored by roving tabindex controller",
|
|
1969
|
+
"attribute": "ignore",
|
|
1970
|
+
"reflects": true,
|
|
1218
1971
|
"inheritedFrom": {
|
|
1219
1972
|
"name": "Menu",
|
|
1220
1973
|
"module": "src/Menu.js"
|
|
@@ -1222,12 +1975,15 @@
|
|
|
1222
1975
|
},
|
|
1223
1976
|
{
|
|
1224
1977
|
"kind": "field",
|
|
1225
|
-
"name": "
|
|
1978
|
+
"name": "mobileView",
|
|
1226
1979
|
"type": {
|
|
1227
1980
|
"text": "boolean"
|
|
1228
1981
|
},
|
|
1229
1982
|
"privacy": "public",
|
|
1230
|
-
"
|
|
1983
|
+
"default": "false",
|
|
1984
|
+
"description": "Enables mobile submenu navigation where tapping a submenu item replaces\nthe current menu content with the submenu's children (drill-down) instead\nof opening a flyout overlay.",
|
|
1985
|
+
"attribute": "mobile-view",
|
|
1986
|
+
"reflects": true,
|
|
1231
1987
|
"inheritedFrom": {
|
|
1232
1988
|
"name": "Menu",
|
|
1233
1989
|
"module": "src/Menu.js"
|
|
@@ -1235,15 +1991,14 @@
|
|
|
1235
1991
|
},
|
|
1236
1992
|
{
|
|
1237
1993
|
"kind": "field",
|
|
1238
|
-
"name": "
|
|
1994
|
+
"name": "mobileBackLabel",
|
|
1239
1995
|
"type": {
|
|
1240
1996
|
"text": "string"
|
|
1241
1997
|
},
|
|
1242
1998
|
"privacy": "public",
|
|
1243
|
-
"default": "''",
|
|
1244
|
-
"description": "
|
|
1245
|
-
"attribute": "label",
|
|
1246
|
-
"reflects": true,
|
|
1999
|
+
"default": "'Back'",
|
|
2000
|
+
"description": "Label for the mobile back button, used for localization.",
|
|
2001
|
+
"attribute": "mobile-back-label",
|
|
1247
2002
|
"inheritedFrom": {
|
|
1248
2003
|
"name": "Menu",
|
|
1249
2004
|
"module": "src/Menu.js"
|
|
@@ -1251,15 +2006,12 @@
|
|
|
1251
2006
|
},
|
|
1252
2007
|
{
|
|
1253
2008
|
"kind": "field",
|
|
1254
|
-
"name": "
|
|
2009
|
+
"name": "_mobileSubmenuStack",
|
|
1255
2010
|
"type": {
|
|
1256
|
-
"text": "
|
|
2011
|
+
"text": "MenuItem[]"
|
|
1257
2012
|
},
|
|
1258
|
-
"privacy": "
|
|
1259
|
-
"default": "
|
|
1260
|
-
"description": "whether menu should be ignored by roving tabindex controller",
|
|
1261
|
-
"attribute": "ignore",
|
|
1262
|
-
"reflects": true,
|
|
2013
|
+
"privacy": "private",
|
|
2014
|
+
"default": "[]",
|
|
1263
2015
|
"inheritedFrom": {
|
|
1264
2016
|
"name": "Menu",
|
|
1265
2017
|
"module": "src/Menu.js"
|
|
@@ -2253,6 +3005,32 @@
|
|
|
2253
3005
|
"module": "src/Menu.ts"
|
|
2254
3006
|
}
|
|
2255
3007
|
},
|
|
3008
|
+
{
|
|
3009
|
+
"name": "mobile-view",
|
|
3010
|
+
"type": {
|
|
3011
|
+
"text": "boolean"
|
|
3012
|
+
},
|
|
3013
|
+
"default": "false",
|
|
3014
|
+
"description": "Enables mobile submenu navigation where tapping a submenu item replaces\nthe current menu content with the submenu's children (drill-down) instead\nof opening a flyout overlay.",
|
|
3015
|
+
"fieldName": "mobileView",
|
|
3016
|
+
"inheritedFrom": {
|
|
3017
|
+
"name": "Menu",
|
|
3018
|
+
"module": "src/Menu.ts"
|
|
3019
|
+
}
|
|
3020
|
+
},
|
|
3021
|
+
{
|
|
3022
|
+
"name": "mobile-back-label",
|
|
3023
|
+
"type": {
|
|
3024
|
+
"text": "string"
|
|
3025
|
+
},
|
|
3026
|
+
"default": "'Back'",
|
|
3027
|
+
"description": "Label for the mobile back button, used for localization.",
|
|
3028
|
+
"fieldName": "mobileBackLabel",
|
|
3029
|
+
"inheritedFrom": {
|
|
3030
|
+
"name": "Menu",
|
|
3031
|
+
"module": "src/Menu.ts"
|
|
3032
|
+
}
|
|
3033
|
+
},
|
|
2256
3034
|
{
|
|
2257
3035
|
"name": "value",
|
|
2258
3036
|
"type": {
|
|
@@ -2477,6 +3255,16 @@
|
|
|
2477
3255
|
},
|
|
2478
3256
|
"privacy": "public",
|
|
2479
3257
|
"readonly": true
|
|
3258
|
+
},
|
|
3259
|
+
{
|
|
3260
|
+
"kind": "field",
|
|
3261
|
+
"name": "nativeEvent",
|
|
3262
|
+
"type": {
|
|
3263
|
+
"text": "KeyboardEvent | undefined"
|
|
3264
|
+
},
|
|
3265
|
+
"privacy": "public",
|
|
3266
|
+
"description": "Original `KeyboardEvent` that triggered this forwarded event,\nexposed so listeners on the parent menu can call\n`preventDefault()`/`stopPropagation()` on the underlying event.",
|
|
3267
|
+
"readonly": true
|
|
2480
3268
|
}
|
|
2481
3269
|
],
|
|
2482
3270
|
"superclass": {
|
|
@@ -2642,14 +3430,6 @@
|
|
|
2642
3430
|
},
|
|
2643
3431
|
"privacy": "public"
|
|
2644
3432
|
},
|
|
2645
|
-
{
|
|
2646
|
-
"kind": "field",
|
|
2647
|
-
"name": "submenuElement",
|
|
2648
|
-
"type": {
|
|
2649
|
-
"text": "HTMLElement | undefined"
|
|
2650
|
-
},
|
|
2651
|
-
"privacy": "private"
|
|
2652
|
-
},
|
|
2653
3433
|
{
|
|
2654
3434
|
"kind": "field",
|
|
2655
3435
|
"name": "focusElement",
|
|
@@ -2792,6 +3572,25 @@
|
|
|
2792
3572
|
}
|
|
2793
3573
|
}
|
|
2794
3574
|
},
|
|
3575
|
+
{
|
|
3576
|
+
"kind": "field",
|
|
3577
|
+
"name": "isMobileView",
|
|
3578
|
+
"type": {
|
|
3579
|
+
"text": "boolean"
|
|
3580
|
+
},
|
|
3581
|
+
"privacy": "private",
|
|
3582
|
+
"readonly": true
|
|
3583
|
+
},
|
|
3584
|
+
{
|
|
3585
|
+
"kind": "field",
|
|
3586
|
+
"name": "_mobileRootMenu",
|
|
3587
|
+
"type": {
|
|
3588
|
+
"text": "Menu | null"
|
|
3589
|
+
},
|
|
3590
|
+
"privacy": "private",
|
|
3591
|
+
"description": "Returns the root sp-menu with mobile-view, traversing up from\neither the focusRoot or the DOM tree.",
|
|
3592
|
+
"readonly": true
|
|
3593
|
+
},
|
|
2795
3594
|
{
|
|
2796
3595
|
"kind": "method",
|
|
2797
3596
|
"name": "renderSubmenu",
|
|
@@ -2819,7 +3618,7 @@
|
|
|
2819
3618
|
}
|
|
2820
3619
|
}
|
|
2821
3620
|
],
|
|
2822
|
-
"description": "
|
|
3621
|
+
"description": "Determines if item has a submenu and updates the `aria-haspopup` attribute.\nSkips clearing state when the submenu is temporarily projected to the\nparent Menu's mobile-submenu slot."
|
|
2823
3622
|
},
|
|
2824
3623
|
{
|
|
2825
3624
|
"kind": "method",
|