@fusion.dev/helix-headless 0.146.0 → 0.148.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 +9287 -1084
- package/dist/accordion/item/accordion-item.d.ts +43 -21
- package/dist/accordion/item/accordion-item.js +37 -11
- package/dist/accordion/root/accordion-root.d.ts +8 -2
- package/dist/accordion/root/accordion-root.js +6 -8
- package/dist/announcement/root/announcement-root.d.ts +66 -6
- package/dist/announcement/root/announcement-root.js +144 -13
- package/dist/area-chart/root/area-chart-root.d.ts +18 -1
- package/dist/area-chart/root/area-chart-root.js +14 -7
- package/dist/avatar/root/avatar-root.d.ts +31 -1
- package/dist/avatar/root/avatar-root.js +11 -1
- package/dist/badge/count.d.ts +14 -0
- package/dist/badge/count.js +20 -0
- package/dist/badge/root/badge-root.d.ts +57 -6
- package/dist/badge/root/badge-root.js +77 -8
- package/dist/bar-chart/root/bar-chart-root.js +11 -20
- package/dist/bar-chart/stack.d.ts +10 -0
- package/dist/bar-chart/stack.js +8 -0
- package/dist/blockquote/root/blockquote-root.d.ts +66 -8
- package/dist/blockquote/root/blockquote-root.js +85 -8
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +14 -0
- package/dist/breadcrumbs/breadcrumb/breadcrumb.js +12 -2
- package/dist/breadcrumbs/root/breadcrumbs-root.js +2 -2
- package/dist/button/root/button-root.d.ts +24 -38
- package/dist/button/root/button-root.js +6 -37
- package/dist/button/submitter.d.ts +27 -0
- package/dist/button/submitter.js +25 -0
- package/dist/button-group/arrows.d.ts +14 -0
- package/dist/button-group/arrows.js +10 -0
- package/dist/button-group/root/button-group-root.d.ts +141 -3
- package/dist/button-group/root/button-group-root.js +142 -2
- package/dist/canvas/edge-pan.d.ts +61 -0
- package/dist/canvas/edge-pan.js +63 -0
- package/dist/canvas/node/canvas-node.d.ts +12 -2
- package/dist/canvas/node/canvas-node.js +6 -2
- package/dist/canvas/root/canvas-document.d.ts +10 -0
- package/dist/canvas/root/canvas-document.js +1 -0
- package/dist/canvas/root/canvas-root.d.ts +107 -5
- package/dist/canvas/root/canvas-root.js +140 -36
- package/dist/canvas/snap.d.ts +42 -0
- package/dist/canvas/snap.js +32 -0
- package/dist/card/root/card-root.d.ts +12 -1
- package/dist/card/root/card-root.js +11 -4
- package/dist/carousel/root/carousel-root.d.ts +4 -3
- package/dist/carousel/root/carousel-root.js +2 -6
- package/dist/chat/root/chat-root.d.ts +28 -4
- package/dist/chat/root/chat-root.js +12 -7
- package/dist/checkbox/root/checkbox-root.js +5 -7
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +13 -0
- package/dist/checkbox-group/root/checkbox-group-root.js +16 -7
- package/dist/checkbox-group/select-all.d.ts +9 -4
- package/dist/checkbox-group/select-all.js +1 -1
- package/dist/code-block/root/code-block-root.d.ts +41 -18
- package/dist/code-block/root/code-block-root.js +21 -6
- package/dist/color-input/root/color-input-root.d.ts +11 -0
- package/dist/color-input/root/color-input-root.js +12 -5
- package/dist/color-picker/channels.js +1 -2
- package/dist/color-picker/root/color-picker-root.d.ts +32 -24
- package/dist/color-picker/root/color-picker-root.js +99 -55
- package/dist/color-picker/wheel.d.ts +28 -0
- package/dist/color-picker/wheel.js +15 -0
- package/dist/combobox/root/combobox-root.d.ts +83 -11
- package/dist/combobox/root/combobox-root.js +81 -18
- package/dist/command/root/command-root.d.ts +7 -4
- package/dist/command/root/command-root.js +2 -19
- package/dist/copy-button/root/copy-button-root.d.ts +16 -1
- package/dist/copy-button/root/copy-button-root.js +7 -2
- package/dist/data-table/keys.d.ts +0 -18
- package/dist/data-table/keys.js +1 -11
- package/dist/data-table/root/data-table-root.js +29 -50
- package/dist/date-input/root/date-input-root.d.ts +8 -1
- package/dist/date-input/root/date-input-root.js +8 -5
- package/dist/date-picker/root/date-picker-root.d.ts +14 -9
- package/dist/date-picker/root/date-picker-root.js +21 -16
- package/dist/description-list/item/description-list-item.d.ts +22 -4
- package/dist/description-list/item/description-list-item.js +14 -4
- package/dist/divider/root/divider-root.d.ts +45 -16
- package/dist/divider/root/divider-root.js +28 -4
- package/dist/donut-chart/root/donut-chart-root.js +13 -6
- package/dist/donut-chart/slice-label.d.ts +35 -0
- package/dist/donut-chart/slice-label.js +11 -0
- package/dist/drawer/root/drawer-root.d.ts +4 -2
- package/dist/drawer/root/drawer-root.js +15 -3
- package/dist/drilldown/item/drilldown-item.d.ts +21 -1
- package/dist/drilldown/item/drilldown-item.js +38 -4
- package/dist/drilldown/root/drilldown-root.js +3 -2
- package/dist/element-events.generated.js +5 -1
- package/dist/empty/root/empty-root.d.ts +46 -2
- package/dist/empty/root/empty-root.js +50 -5
- package/dist/file-input/root/file-input-root.d.ts +34 -6
- package/dist/file-input/root/file-input-root.js +55 -21
- package/dist/file-input/status.d.ts +24 -0
- package/dist/file-input/status.js +11 -0
- package/dist/filter-input/chip/filter-chip.d.ts +23 -0
- package/dist/filter-input/chip/filter-chip.js +10 -2
- package/dist/filter-input/root/filter-input-root.d.ts +8 -0
- package/dist/filter-input/root/filter-input-root.js +17 -27
- package/dist/format-date/fields.d.ts +20 -0
- package/dist/format-date/fields.js +14 -0
- package/dist/format-date/options.d.ts +5 -5
- package/dist/format-date/options.js +10 -39
- package/dist/format-date/root/format-date-root.d.ts +53 -4
- package/dist/format-date/root/format-date-root.js +38 -50
- package/dist/graph/root/graph-root.d.ts +23 -5
- package/dist/graph/root/graph-root.js +17 -20
- package/dist/heatmap/root/buckets.d.ts +21 -0
- package/dist/heatmap/root/buckets.js +34 -0
- package/dist/heatmap/root/heatmap-root.d.ts +76 -3
- package/dist/heatmap/root/heatmap-root.js +105 -20
- package/dist/icon/index.d.ts +1 -1
- package/dist/icon/index.js +1 -1
- package/dist/icon/registry.d.ts +26 -1
- package/dist/icon/registry.js +12 -1
- package/dist/icon/root/icon-root.d.ts +13 -0
- package/dist/icon/root/icon-root.js +23 -2
- package/dist/icon/root/index.d.ts +1 -1
- package/dist/icon/root/index.js +1 -1
- package/dist/image/root/image-root.d.ts +20 -0
- package/dist/image/root/image-root.js +6 -1
- package/dist/input/root/input-root.d.ts +23 -2
- package/dist/input/root/input-root.js +12 -8
- package/dist/kbd/root/kbd-root.d.ts +20 -3
- package/dist/kbd/root/kbd-root.js +23 -50
- package/dist/legend/hidden-series.d.ts +10 -2
- package/dist/legend/hidden-series.js +5 -2
- package/dist/legend/root/legend-root.d.ts +25 -7
- package/dist/legend/root/legend-root.js +25 -26
- package/dist/lightbox/root/lightbox-root.d.ts +50 -5
- package/dist/lightbox/root/lightbox-root.js +76 -8
- package/dist/lightbox/zoom.d.ts +2 -0
- package/dist/lightbox/zoom.js +5 -3
- package/dist/line-chart/root/line-chart-root.d.ts +16 -0
- package/dist/line-chart/root/line-chart-root.js +10 -2
- package/dist/list/root/list-root.d.ts +10 -2
- package/dist/list/root/list-root.js +31 -24
- package/dist/list/selection.d.ts +17 -0
- package/dist/list/selection.js +16 -0
- package/dist/listbox/root/listbox-root.d.ts +125 -26
- package/dist/listbox/root/listbox-root.js +156 -166
- package/dist/map/marker/map-marker.d.ts +2 -1
- package/dist/map/root/map-root.d.ts +40 -2
- package/dist/map/root/map-root.js +64 -23
- package/dist/megamenu/hand-over.d.ts +75 -0
- package/dist/megamenu/hand-over.js +67 -0
- package/dist/megamenu/root/megamenu-root.d.ts +38 -14
- package/dist/megamenu/root/megamenu-root.js +29 -50
- package/dist/menu/item/menu-item.js +4 -4
- package/dist/menu/root/menu-root.d.ts +5 -2
- package/dist/meter/root/meter-root.d.ts +42 -0
- package/dist/meter/root/meter-root.js +33 -7
- package/dist/navigation/root/navigation-root.js +5 -8
- package/dist/notifications/group/notification-group.d.ts +8 -1
- package/dist/notifications/group/notification-group.js +12 -6
- package/dist/notifications/notification/notification.d.ts +12 -1
- package/dist/notifications/notification/notification.js +3 -1
- package/dist/notifications/root/notifications-root.d.ts +48 -3
- package/dist/notifications/root/notifications-root.js +36 -6
- package/dist/number-input/grain.d.ts +28 -0
- package/dist/number-input/grain.js +14 -0
- package/dist/number-input/root/number-input-root.d.ts +17 -1
- package/dist/number-input/root/number-input-root.js +29 -18
- package/dist/object-inspector/root/object-inspector-root.d.ts +17 -6
- package/dist/object-inspector/root/object-inspector-root.js +31 -20
- package/dist/option/index.d.ts +1 -0
- package/dist/option/index.js +1 -0
- package/dist/option/separator/option-separator.d.ts +30 -0
- package/dist/option/separator/option-separator.js +21 -0
- package/dist/outline/root/outline-root.d.ts +12 -0
- package/dist/outline/root/outline-root.js +5 -19
- package/dist/pagination/size/pagination-size.d.ts +6 -0
- package/dist/pagination/size/pagination-size.js +5 -3
- package/dist/pin-input/code.d.ts +51 -1
- package/dist/pin-input/code.js +37 -0
- package/dist/pin-input/root/pin-input-root.d.ts +98 -121
- package/dist/pin-input/root/pin-input-root.js +151 -156
- package/dist/popover/hide-outside.js +2 -9
- package/dist/popover/root/popover-root.d.ts +7 -1
- package/dist/popover/root/popover-root.js +9 -1
- package/dist/progress/root/progress-root.d.ts +27 -0
- package/dist/progress/root/progress-root.js +25 -7
- package/dist/qr-code/export.d.ts +19 -0
- package/dist/qr-code/export.js +14 -0
- package/dist/qr-code/name.d.ts +11 -0
- package/dist/qr-code/name.js +7 -0
- package/dist/qr-code/root/qr-code-root.d.ts +31 -9
- package/dist/qr-code/root/qr-code-root.js +29 -17
- package/dist/radio/group/radio-group.d.ts +15 -0
- package/dist/radio/root/radio-root.js +2 -2
- package/dist/rating/root/rating-root.d.ts +22 -9
- package/dist/rating/root/rating-root.js +15 -39
- package/dist/scatter-chart/measures.d.ts +22 -0
- package/dist/scatter-chart/measures.js +11 -0
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +26 -0
- package/dist/scatter-chart/root/scatter-chart-root.js +21 -7
- package/dist/scroll-area/scrollbar.d.ts +0 -8
- package/dist/scroll-area/scrollbar.js +1 -1
- package/dist/select/align.d.ts +47 -0
- package/dist/select/align.js +7 -0
- package/dist/select/root/select-root.d.ts +115 -11
- package/dist/select/root/select-root.js +104 -20
- package/dist/slider/root/slider-root.d.ts +18 -1
- package/dist/slider/root/slider-root.js +22 -0
- package/dist/sparkline/readings.d.ts +30 -12
- package/dist/sparkline/readings.js +32 -15
- package/dist/sparkline/root/sparkline-root.d.ts +46 -3
- package/dist/sparkline/root/sparkline-root.js +60 -21
- package/dist/speed-dial/group/speed-dial-group.d.ts +48 -0
- package/dist/speed-dial/group/speed-dial-group.js +43 -0
- package/dist/speed-dial/index.d.ts +1 -0
- package/dist/speed-dial/index.js +1 -0
- package/dist/speed-dial/item/speed-dial-item.d.ts +27 -2
- package/dist/speed-dial/item/speed-dial-item.js +43 -5
- package/dist/speed-dial/long-press.d.ts +50 -0
- package/dist/speed-dial/long-press.js +48 -0
- package/dist/speed-dial/root/speed-dial-root.d.ts +86 -1
- package/dist/speed-dial/root/speed-dial-root.js +123 -6
- package/dist/splitter/root/splitter-root.d.ts +9 -2
- package/dist/splitter/root/splitter-root.js +18 -3
- package/dist/steps/root/steps-root.d.ts +8 -1
- package/dist/steps/root/steps-root.js +6 -1
- package/dist/steps/step/step.d.ts +1 -0
- package/dist/steps/step/step.js +1 -1
- package/dist/table/cell/table-cell.d.ts +8 -1
- package/dist/table/cell/table-cell.js +6 -2
- package/dist/table/column/table-column.d.ts +6 -0
- package/dist/table/column/table-column.js +5 -1
- package/dist/table/grid-controller.d.ts +117 -0
- package/dist/table/grid-controller.js +293 -0
- package/dist/table/root/table-root.d.ts +47 -3
- package/dist/table/root/table-root.js +93 -29
- package/dist/table/row/table-row.d.ts +36 -0
- package/dist/table/row/table-row.js +52 -2
- package/dist/tabs/root/tabs-root.d.ts +5 -3
- package/dist/tag/group/tag-group.d.ts +16 -4
- package/dist/tag/group/tag-group.js +23 -20
- package/dist/textarea/root/textarea-root.d.ts +14 -2
- package/dist/textarea/root/textarea-root.js +6 -7
- package/dist/time-input/root/time-input-root.d.ts +5 -1
- package/dist/time-input/root/time-input-root.js +10 -7
- package/dist/time-picker/root/time-picker-root.d.ts +12 -14
- package/dist/time-picker/root/time-picker-root.js +18 -23
- package/dist/toast/item/toast-item.d.ts +9 -6
- package/dist/toast/item/toast-item.js +1 -1
- package/dist/toast/root/toast-root.d.ts +40 -4
- package/dist/toast/root/toast-root.js +68 -16
- package/dist/toast/words.d.ts +12 -0
- package/dist/toast/words.js +25 -0
- package/dist/toggle/group/toggle-group.d.ts +29 -5
- package/dist/toggle/group/toggle-group.js +26 -43
- package/dist/toggle/root/toggle-root.js +2 -4
- package/dist/toolbar/root/toolbar-root.d.ts +52 -5
- package/dist/toolbar/root/toolbar-root.js +88 -13
- package/dist/tooltip/root/tooltip-root.d.ts +7 -1
- package/dist/tooltip/root/tooltip-root.js +10 -2
- package/dist/tour/root/tour-root.d.ts +15 -0
- package/dist/tour/root/tour-root.js +20 -1
- package/dist/tour/stop/tour-stop.d.ts +3 -0
- package/dist/tour/stop/tour-stop.js +3 -3
- package/dist/tree/root/tree-root.js +2 -2
- package/dist/trend/figure.d.ts +16 -0
- package/dist/trend/figure.js +8 -0
- package/dist/trend/root/trend-root.d.ts +41 -2
- package/dist/trend/root/trend-root.js +29 -3
- package/dist/video/root/extra-controls.d.ts +12 -0
- package/dist/video/root/extra-controls.js +6 -2
- package/dist/video/root/video-root.d.ts +16 -1
- package/dist/video/root/video-root.js +15 -1
- package/dist/video-playlist/root/video-playlist-root.d.ts +11 -1
- package/dist/video-playlist/root/video-playlist-root.js +3 -0
- package/dist/virtual-list/fill.d.ts +11 -0
- package/dist/virtual-list/fill.js +9 -0
- package/dist/virtual-list/keys.d.ts +16 -7
- package/dist/virtual-list/keys.js +17 -6
- package/dist/virtual-list/plan.d.ts +17 -1
- package/dist/virtual-list/plan.js +13 -2
- package/dist/virtual-list/root/virtual-list-root.d.ts +25 -3
- package/dist/virtual-list/root/virtual-list-root.js +53 -41
- package/lint.json +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +4934 -954
- package/types/svelte.d.ts +2 -0
- package/types/vue.d.ts +946 -253
- package/dist/color-picker/swatches.d.ts +0 -12
- package/dist/color-picker/swatches.js +0 -26
- package/dist/rating/steps.d.ts +0 -7
- package/dist/rating/steps.js +0 -9
- package/dist/tooltip/focus-target.d.ts +0 -6
- package/dist/tooltip/focus-target.js +0 -9
|
@@ -67,8 +67,20 @@ declare const HelixHeadlessMap_base: (new (...args: any[]) => import("@fusion.de
|
|
|
67
67
|
*
|
|
68
68
|
* @slot - The element your renderer draws the map in, and the map's markers, routes, areas, positions, and points layers.
|
|
69
69
|
* @slot attribution - The map credit, which most tile licenses require.
|
|
70
|
+
* @slot face-north-icon - Replaces the compass needle. It inherits `--map-needle-turn`, so `rotate: var(--map-needle-turn)` keeps it pointing north.
|
|
70
71
|
* @slot footer - Content below the map, such as a legend or a scale.
|
|
72
|
+
* @slot fullscreen-icon - Replaces the glyph inside the fullscreen button.
|
|
71
73
|
* @slot header - Content above the map, such as a title or a search field.
|
|
74
|
+
* @slot layers-icon - Replaces the glyph inside the layers button.
|
|
75
|
+
* @slot pan-down-icon - Replaces the glyph inside the pan down button.
|
|
76
|
+
* @slot pan-end-icon - Replaces the glyph inside the button that pans toward the end of a line of text.
|
|
77
|
+
* @slot pan-start-icon - Replaces the glyph inside the button that pans toward the start of a line of text.
|
|
78
|
+
* @slot pan-up-icon - Replaces the glyph inside the pan up button.
|
|
79
|
+
* @slot rotate-left-icon - Replaces the glyph inside the rotate left button.
|
|
80
|
+
* @slot rotate-right-icon - Replaces the glyph inside the rotate right button.
|
|
81
|
+
* @slot tilt-icon - Replaces the "3D" inside the 3D button.
|
|
82
|
+
* @slot zoom-in-icon - Replaces the glyph inside the zoom-in button.
|
|
83
|
+
* @slot zoom-out-icon - Replaces the glyph inside the zoom-out button.
|
|
72
84
|
*
|
|
73
85
|
* @event {Event} change - The layers menu changed the map type, which `map-type` now holds.
|
|
74
86
|
* @event {HelixActivateEvent} helix-activate - A marker was pressed. The value is the marker's `name`, or its `label` if it has no name. A cluster sends `helix-map-cluster` instead.
|
|
@@ -122,8 +134,11 @@ declare const HelixHeadlessMap_base: (new (...args: any[]) => import("@fusion.de
|
|
|
122
134
|
*
|
|
123
135
|
* @cssstate fullscreen - The map fills the screen.
|
|
124
136
|
* @cssstate idle - The user has been still long enough for the header and footer to fade.
|
|
137
|
+
* @cssstate layers-open - The layers menu is open.
|
|
125
138
|
* @cssstate ready - The map has been drawn whole, after `helix-map-ready`.
|
|
139
|
+
* @cssstate rotated - The map is turned away from north, by `bearing`.
|
|
126
140
|
* @cssstate sharing - The page keeps the plain wheel and one finger, with `gestures="cooperative"` or while a map with `gestures="activate"` waits to be pressed.
|
|
141
|
+
* @cssstate tilted - The map is tilted by `pitch`, so it no longer looks straight down.
|
|
127
142
|
* @cssstate using - A map with `gestures="activate"` has been pressed and has the gestures.
|
|
128
143
|
*/
|
|
129
144
|
export declare class HelixHeadlessMap extends HelixHeadlessMap_base {
|
|
@@ -323,8 +338,31 @@ export declare class HelixHeadlessMap extends HelixHeadlessMap_base {
|
|
|
323
338
|
protected readonly keys: KeyboardNavigationController;
|
|
324
339
|
/** The marker a press or a click came from, where it came from one. */
|
|
325
340
|
private markerOf;
|
|
341
|
+
/**
|
|
342
|
+
* The marker focus is on, while it is.
|
|
343
|
+
*
|
|
344
|
+
* **Kept so a marker the page takes away hands focus on.** A delivery done
|
|
345
|
+
* or a filter changed removes a marker, and the one a reader was on went
|
|
346
|
+
* with focus still in it: the browser dropped focus to the page, and the
|
|
347
|
+
* reader was put back at its top with nothing said.
|
|
348
|
+
*/
|
|
349
|
+
private focused;
|
|
326
350
|
/** Moves the tab stop to the marker focus arrived at. */
|
|
327
351
|
private readonly handleFocusIn;
|
|
352
|
+
/**
|
|
353
|
+
* Forgets the marker focus left, unless the page took it away.
|
|
354
|
+
*
|
|
355
|
+
* Focus leaving for nothing is a press on the page or the marker removed,
|
|
356
|
+
* and which one is known once the removal has finished: a marker still in
|
|
357
|
+
* the page was left, and one gone is owed a place for focus to land.
|
|
358
|
+
*/
|
|
359
|
+
private readonly handleFocusOut;
|
|
360
|
+
/**
|
|
361
|
+
* Gives focus to the marker that took the stop of one the page took away
|
|
362
|
+
* with focus on it: the next, the last where it was the last, its cluster
|
|
363
|
+
* where it is gathered, and the region where none is left.
|
|
364
|
+
*/
|
|
365
|
+
private refocus;
|
|
328
366
|
/**
|
|
329
367
|
* Says a marker was pressed, by click, Enter or Space: a place by its name,
|
|
330
368
|
* and a cluster as a cluster, from the marker it is drawn as.
|
|
@@ -376,7 +414,7 @@ export declare class HelixHeadlessMap extends HelixHeadlessMap_base {
|
|
|
376
414
|
* order they are written, with its picture and name, pressed while it is
|
|
377
415
|
* shown. A group's tile is pressed while any of its layers is shown.
|
|
378
416
|
*/
|
|
379
|
-
|
|
417
|
+
protected renderLayersMenu(): TemplateResult | typeof nothing;
|
|
380
418
|
/**
|
|
381
419
|
* The map types, as cards with a picture of the map in each: Standard,
|
|
382
420
|
* Hybrid, and Satellite. One is chosen, so they are radio buttons, and the
|
|
@@ -392,7 +430,7 @@ export declare class HelixHeadlessMap extends HelixHeadlessMap_base {
|
|
|
392
430
|
* arrows around it are the way to move and turn the map without dragging,
|
|
393
431
|
* which a pointer otherwise needs.
|
|
394
432
|
*/
|
|
395
|
-
|
|
433
|
+
protected renderCompass(pan: boolean, rotate: boolean): TemplateResult;
|
|
396
434
|
/**
|
|
397
435
|
* The controls, in one column in the order they are read: fullscreen, the
|
|
398
436
|
* layers, 3D, zoom, and the compass with the arrows round it, last, where
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, fillTemplate, formatNumbers, HelixActivateEvent, HelixBeforeChangeEvent, HelixBeforeToggleEvent, HelixElement, HelixMapClusterEvent, HelixMapPanEvent, HelixMapPartChangeEvent, HelixMapReadyEvent, HelixMapRotateEvent, HelixMapTiltEvent, HelixMapZoomEvent, HelixToggleEvent, hostAria, KeyboardNavigationController, MixinViewport, requestChange, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { customElement, fillTemplate, focusItemOf, formatNumbers, HelixActivateEvent, HelixBeforeChangeEvent, HelixBeforeToggleEvent, HelixElement, HelixMapClusterEvent, HelixMapPanEvent, HelixMapPartChangeEvent, HelixMapReadyEvent, HelixMapRotateEvent, HelixMapTiltEvent, HelixMapZoomEvent, HelixToggleEvent, hostAria, KeyboardNavigationController, MixinViewport, requestChange, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { buildings, cloudRain, dotsNine, leaf, mountains, path, polygon, stack, target, } from '@fusion.dev/helix-icons';
|
|
9
9
|
import { html, nothing } from 'lit';
|
|
10
10
|
import { property, state } from 'lit/decorators.js';
|
|
@@ -89,15 +89,13 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
89
89
|
};
|
|
90
90
|
this.stop = 0;
|
|
91
91
|
this.keys = new KeyboardNavigationController(this, {
|
|
92
|
-
items: () => this.markers.map((marker, at) => ({
|
|
93
|
-
contains: (node) => node !== null && (marker.contains(node) || marker.shadowRoot?.contains(node) === true),
|
|
92
|
+
items: () => this.markers.map((marker, at) => focusItemOf(marker, {
|
|
94
93
|
disabled: marker.gatheredBy !== undefined || !placed(marker),
|
|
95
|
-
|
|
94
|
+
focus: () => {
|
|
96
95
|
this.stop = at;
|
|
97
96
|
marker.focus();
|
|
98
97
|
},
|
|
99
|
-
|
|
100
|
-
selected: false,
|
|
98
|
+
owns: (node) => node !== null && (marker.contains(node) || marker.shadowRoot?.contains(node) === true),
|
|
101
99
|
})),
|
|
102
100
|
origin: 'focus',
|
|
103
101
|
selects: () => false,
|
|
@@ -105,10 +103,26 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
105
103
|
this.handleFocusIn = (event) => {
|
|
106
104
|
const marker = this.markerOf(event);
|
|
107
105
|
const at = marker ? this.markers.indexOf(marker) : -1;
|
|
106
|
+
this.focused = at === -1 ? undefined : marker;
|
|
108
107
|
if (at !== -1) {
|
|
109
108
|
this.stop = at;
|
|
110
109
|
}
|
|
111
110
|
};
|
|
111
|
+
this.handleFocusOut = (event) => {
|
|
112
|
+
const marker = this.markerOf(event);
|
|
113
|
+
if (!marker || marker !== this.focused) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (event.relatedTarget) {
|
|
117
|
+
this.focused = undefined;
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
queueMicrotask(() => {
|
|
121
|
+
if (marker.isConnected && this.focused === marker) {
|
|
122
|
+
this.focused = undefined;
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
};
|
|
112
126
|
this.handleClick = (event) => {
|
|
113
127
|
const marker = this.markerOf(event);
|
|
114
128
|
if (marker) {
|
|
@@ -267,6 +281,23 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
267
281
|
.composedPath()
|
|
268
282
|
.find((one) => one.isMapMarker === true);
|
|
269
283
|
}
|
|
284
|
+
refocus(stop) {
|
|
285
|
+
const gone = this.focused;
|
|
286
|
+
if (!gone || this.markers.includes(gone)) {
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
this.focused = undefined;
|
|
290
|
+
const active = document.activeElement;
|
|
291
|
+
if (active !== null && active !== document.body) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
if (stop) {
|
|
295
|
+
stop.focus();
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
this.partNamed('region')?.focus();
|
|
299
|
+
}
|
|
300
|
+
}
|
|
270
301
|
activate(marker) {
|
|
271
302
|
if (marker.gathered.length > 1) {
|
|
272
303
|
marker.dispatchEvent(new HelixMapClusterEvent({ labels: [...marker.gathered] }));
|
|
@@ -290,6 +321,7 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
290
321
|
this.addEventListener(HelixMapPartChangeEvent.eventName, this.handlePartChange);
|
|
291
322
|
this.addEventListener('click', this.handleClick);
|
|
292
323
|
this.addEventListener('focusin', this.handleFocusIn);
|
|
324
|
+
this.addEventListener('focusout', this.handleFocusOut);
|
|
293
325
|
this.addEventListener('keydown', this.handleMarkerKeydown);
|
|
294
326
|
this.addEventListener('keyup', this.handleMarkerKeyup);
|
|
295
327
|
this.hiding = new MutationObserver(() => this.requestUpdate());
|
|
@@ -304,6 +336,7 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
304
336
|
this.removeEventListener(HelixMapPartChangeEvent.eventName, this.handlePartChange);
|
|
305
337
|
this.removeEventListener('click', this.handleClick);
|
|
306
338
|
this.removeEventListener('focusin', this.handleFocusIn);
|
|
339
|
+
this.removeEventListener('focusout', this.handleFocusOut);
|
|
307
340
|
this.removeEventListener('keydown', this.handleMarkerKeydown);
|
|
308
341
|
this.removeEventListener('keyup', this.handleMarkerKeyup);
|
|
309
342
|
}
|
|
@@ -331,6 +364,7 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
331
364
|
for (const marker of markers) {
|
|
332
365
|
marker.current = marker === stop;
|
|
333
366
|
}
|
|
367
|
+
this.refocus(stop);
|
|
334
368
|
if (changed.has('cluster')) {
|
|
335
369
|
this.dispatchEvent(new HelixMapPartChangeEvent({ kind: 'place' }));
|
|
336
370
|
}
|
|
@@ -371,9 +405,11 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
371
405
|
}}
|
|
372
406
|
@keydown=${this.handleMenuKeydown}
|
|
373
407
|
>
|
|
374
|
-
<
|
|
375
|
-
|
|
376
|
-
|
|
408
|
+
<slot name="layers-icon">
|
|
409
|
+
<svg aria-hidden="true" fill="currentColor" height="16" viewBox=${stack.viewBox} width="16">
|
|
410
|
+
${unsafeSVG(stack.content)}
|
|
411
|
+
</svg>
|
|
412
|
+
</slot>
|
|
377
413
|
</button>
|
|
378
414
|
<div
|
|
379
415
|
part="layers-menu"
|
|
@@ -431,38 +467,40 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
431
467
|
return html `<div part="compass">
|
|
432
468
|
${rotate
|
|
433
469
|
? html `<button part="rotate-left" aria-label=${this.rotateLeftLabel} type="button" @click=${() => this.rotate(-ROTATE_STEP)}>
|
|
434
|
-
|
|
470
|
+
<slot name="rotate-left-icon">↺</slot>
|
|
435
471
|
</button>`
|
|
436
472
|
: nothing}
|
|
437
473
|
${pan
|
|
438
474
|
? html `<button part="pan-up" aria-label=${this.panLabel('up')} type="button" @click=${() => this.pan('up')}>
|
|
439
|
-
|
|
475
|
+
<slot name="pan-up-icon">${this.panGlyph('up')}</slot>
|
|
440
476
|
</button>`
|
|
441
477
|
: nothing}
|
|
442
478
|
${rotate
|
|
443
479
|
? html `<button part="rotate-right" aria-label=${this.rotateRightLabel} type="button" @click=${() => this.rotate(ROTATE_STEP)}>
|
|
444
|
-
|
|
480
|
+
<slot name="rotate-right-icon">↻</slot>
|
|
445
481
|
</button>`
|
|
446
482
|
: nothing}
|
|
447
483
|
${pan
|
|
448
484
|
? html `<button part="pan-start" aria-label=${this.panLabel('start')} type="button" @click=${() => this.pan('start')}>
|
|
449
|
-
|
|
485
|
+
<slot name="pan-start-icon">${this.panGlyph('start')}</slot>
|
|
450
486
|
</button>`
|
|
451
487
|
: nothing}
|
|
452
488
|
<button part="face-north" aria-label=${this.faceNorthLabel} type="button" style=${`--map-needle-turn: ${-this.bearing}deg`} @click=${() => this.faceNorth()}>
|
|
453
|
-
<
|
|
454
|
-
<
|
|
455
|
-
|
|
456
|
-
|
|
489
|
+
<slot name="face-north-icon">
|
|
490
|
+
<svg part="needle" aria-hidden="true" viewBox="0 0 16 16">
|
|
491
|
+
<path data-end="north" d="M8 1.5 10.5 8h-5Z" />
|
|
492
|
+
<path data-end="south" d="M8 14.5 5.5 8h5Z" />
|
|
493
|
+
</svg>
|
|
494
|
+
</slot>
|
|
457
495
|
</button>
|
|
458
496
|
${pan
|
|
459
497
|
? html `<button part="pan-end" aria-label=${this.panLabel('end')} type="button" @click=${() => this.pan('end')}>
|
|
460
|
-
|
|
498
|
+
<slot name="pan-end-icon">${this.panGlyph('end')}</slot>
|
|
461
499
|
</button>`
|
|
462
500
|
: nothing}
|
|
463
501
|
${pan
|
|
464
502
|
? html `<button part="pan-down" aria-label=${this.panLabel('down')} type="button" @click=${() => this.pan('down')}>
|
|
465
|
-
|
|
503
|
+
<slot name="pan-down-icon">${this.panGlyph('down')}</slot>
|
|
466
504
|
</button>`
|
|
467
505
|
: nothing}
|
|
468
506
|
</div>`;
|
|
@@ -486,7 +524,7 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
486
524
|
type="button"
|
|
487
525
|
@click=${this.toggleFullscreen}
|
|
488
526
|
>
|
|
489
|
-
|
|
527
|
+
<slot name="fullscreen-icon">⤢</slot>
|
|
490
528
|
</button>`
|
|
491
529
|
: nothing}
|
|
492
530
|
${menu}
|
|
@@ -498,15 +536,15 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
498
536
|
type="button"
|
|
499
537
|
@click=${() => this.tiltTo(this.pitch > 0 ? 0 : TILTED)}
|
|
500
538
|
>
|
|
501
|
-
3D
|
|
539
|
+
<slot name="tilt-icon">3D</slot>
|
|
502
540
|
</button>`
|
|
503
541
|
: nothing}
|
|
504
542
|
${zoom
|
|
505
543
|
? html `<button part="zoom-in" aria-label=${this.zoomInLabel} type="button" @click=${() => this.zoom(1)}>
|
|
506
|
-
|
|
544
|
+
<slot name="zoom-in-icon">+</slot>
|
|
507
545
|
</button>
|
|
508
546
|
<button part="zoom-out" aria-label=${this.zoomOutLabel} type="button" @click=${() => this.zoom(-1)}>
|
|
509
|
-
|
|
547
|
+
<slot name="zoom-out-icon">−</slot>
|
|
510
548
|
</button>`
|
|
511
549
|
: nothing}
|
|
512
550
|
${this.drawsCompass ? this.renderCompass(pan, rotate) : nothing}
|
|
@@ -558,6 +596,9 @@ let HelixHeadlessMap = class HelixHeadlessMap extends MixinViewport(HelixElement
|
|
|
558
596
|
hostAria(this.internals, { label: this.label });
|
|
559
597
|
this.toggleState('fullscreen', this.filled);
|
|
560
598
|
this.toggleState('idle', this.resting);
|
|
599
|
+
this.toggleState('layers-open', this.layersOpen);
|
|
600
|
+
this.toggleState('rotated', Math.round(this.bearing) % 360 !== 0);
|
|
601
|
+
this.toggleState('tilted', Math.round(this.pitch) !== 0);
|
|
561
602
|
}
|
|
562
603
|
renderLayers() {
|
|
563
604
|
const layers = this.layers.filter((layer) => this.shown(layer));
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/** Which way a panel moved when another took its place along the bar. */
|
|
2
|
+
export type Motion = 'from-end' | 'from-start' | 'to-end' | 'to-start';
|
|
3
|
+
/** What a hand-over asks of a megamenu. */
|
|
4
|
+
export interface Handed extends Node {
|
|
5
|
+
/** Asks the panel to open or close, and returns whether it did. */
|
|
6
|
+
requestOpen(open: boolean): boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The bar's one open panel, handed from one megamenu to the next.
|
|
10
|
+
*
|
|
11
|
+
* A page has one panel open at a time: a nav bar whose Products panel is still
|
|
12
|
+
* down while Solutions opens is a nav bar with two panels over the page. Module
|
|
13
|
+
* scope rather than a coordinating parent, because there is nothing to
|
|
14
|
+
* coordinate through: megamenus sit in whatever container the consumer used,
|
|
15
|
+
* which is usually `Navigation` and is not required to be. `Video` holds the
|
|
16
|
+
* media session the same way and for the same reason.
|
|
17
|
+
*
|
|
18
|
+
* When one panel opens in place of another, each is told which way the reader
|
|
19
|
+
* moved, as Radix's `data-motion` does: toward the end of the bar where the
|
|
20
|
+
* one opening comes after the one closing in the document. The one opening
|
|
21
|
+
* enters from the side the reader moved toward, and the one closing leaves
|
|
22
|
+
* toward the side they came from. Only the latest move is ever described.
|
|
23
|
+
*/
|
|
24
|
+
export declare class HandOver<T extends Handed> {
|
|
25
|
+
private readonly motion;
|
|
26
|
+
/**
|
|
27
|
+
* Every megamenu on the page, so a press on another one's trigger counts as
|
|
28
|
+
* moving along the bar. Closing on that press would close this panel before
|
|
29
|
+
* the other opens, and the hand-over would have no direction.
|
|
30
|
+
*/
|
|
31
|
+
readonly connected: Set<T>;
|
|
32
|
+
/** The panel showing now, so opening one closes the last. */
|
|
33
|
+
showing: T | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The megamenu a pointer is pressing, from the press until the click that
|
|
36
|
+
* ends it. A press moves focus before the click opens anything, and the open
|
|
37
|
+
* panel must not close on that focus move, or the hand-over has no direction.
|
|
38
|
+
*/
|
|
39
|
+
pressed: T | undefined;
|
|
40
|
+
/** The panels closing because another opened in their place. */
|
|
41
|
+
private readonly handed;
|
|
42
|
+
/** @param motion Writes a megamenu's direction, and clears it for `undefined`. */
|
|
43
|
+
constructor(motion: (megamenu: T, to: Motion | undefined) => void);
|
|
44
|
+
/** Counts a megamenu as part of the bar. */
|
|
45
|
+
add(megamenu: T): void;
|
|
46
|
+
/** Stops counting a megamenu that left the page. */
|
|
47
|
+
remove(megamenu: T): void;
|
|
48
|
+
/**
|
|
49
|
+
* Forgets the press a task after it ends, so the click it makes still finds
|
|
50
|
+
* it. One function for every press, so a listener added again is the same
|
|
51
|
+
* listener and never a second one.
|
|
52
|
+
*/
|
|
53
|
+
private readonly release;
|
|
54
|
+
/**
|
|
55
|
+
* The megamenus that share this one's parent, in document order: the bar it
|
|
56
|
+
* is one trigger of.
|
|
57
|
+
*/
|
|
58
|
+
alongside(megamenu: T): T[];
|
|
59
|
+
/** Notes a press on a megamenu, until the press ends. */
|
|
60
|
+
press(megamenu: T): void;
|
|
61
|
+
/**
|
|
62
|
+
* Opens one panel in place of the one showing, and returns that one, if
|
|
63
|
+
* there was one. The other closes through `requestOpen`, so a consumer
|
|
64
|
+
* holding it open is asked rather than overruled, and a refusal clears its
|
|
65
|
+
* direction again.
|
|
66
|
+
*/
|
|
67
|
+
open(opening: T): T | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Notes a panel closing. One that closed on its own moved nowhere, and
|
|
70
|
+
* neither did any other, so every direction clears.
|
|
71
|
+
*/
|
|
72
|
+
close(closing: T): void;
|
|
73
|
+
/** Clears the direction of every megamenu but the ones moving. */
|
|
74
|
+
private settle;
|
|
75
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export class HandOver {
|
|
2
|
+
constructor(motion) {
|
|
3
|
+
this.motion = motion;
|
|
4
|
+
this.connected = new Set();
|
|
5
|
+
this.handed = new Set();
|
|
6
|
+
this.release = () => {
|
|
7
|
+
setTimeout(() => {
|
|
8
|
+
this.pressed = undefined;
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
add(megamenu) {
|
|
13
|
+
this.connected.add(megamenu);
|
|
14
|
+
}
|
|
15
|
+
remove(megamenu) {
|
|
16
|
+
this.connected.delete(megamenu);
|
|
17
|
+
this.handed.delete(megamenu);
|
|
18
|
+
if (this.showing === megamenu) {
|
|
19
|
+
this.showing = undefined;
|
|
20
|
+
}
|
|
21
|
+
if (this.pressed === megamenu) {
|
|
22
|
+
this.pressed = undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
alongside(megamenu) {
|
|
26
|
+
return [...this.connected]
|
|
27
|
+
.filter((other) => other.parentNode === megamenu.parentNode)
|
|
28
|
+
.sort((a, b) => (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1));
|
|
29
|
+
}
|
|
30
|
+
press(megamenu) {
|
|
31
|
+
this.pressed = megamenu;
|
|
32
|
+
window.addEventListener('pointerup', this.release, { capture: true, once: true });
|
|
33
|
+
window.addEventListener('pointercancel', this.release, { capture: true, once: true });
|
|
34
|
+
}
|
|
35
|
+
open(opening) {
|
|
36
|
+
const previous = this.showing !== opening ? this.showing : undefined;
|
|
37
|
+
const forward = previous !== undefined &&
|
|
38
|
+
(previous.compareDocumentPosition(opening) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0;
|
|
39
|
+
this.motion(opening, previous ? (forward ? 'from-end' : 'from-start') : undefined);
|
|
40
|
+
this.settle(opening, previous);
|
|
41
|
+
if (previous) {
|
|
42
|
+
this.motion(previous, forward ? 'to-start' : 'to-end');
|
|
43
|
+
this.handed.add(previous);
|
|
44
|
+
if (!previous.requestOpen(false)) {
|
|
45
|
+
this.handed.delete(previous);
|
|
46
|
+
this.motion(previous, undefined);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
this.showing = opening;
|
|
50
|
+
return previous;
|
|
51
|
+
}
|
|
52
|
+
close(closing) {
|
|
53
|
+
if (this.showing === closing) {
|
|
54
|
+
this.showing = undefined;
|
|
55
|
+
}
|
|
56
|
+
if (!this.handed.delete(closing)) {
|
|
57
|
+
this.settle();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
settle(...moving) {
|
|
61
|
+
for (const megamenu of this.connected) {
|
|
62
|
+
if (!moving.includes(megamenu)) {
|
|
63
|
+
this.motion(megamenu, undefined);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HelixElement, PopoverController } from '@fusion.dev/helix-core';
|
|
2
|
-
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
1
|
+
import { HelixElement, KeyboardNavigationController, PopoverController } from '@fusion.dev/helix-core';
|
|
2
|
+
import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
declare const HelixHeadlessMegamenu_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerOpenInterface) & typeof HelixElement;
|
|
4
4
|
/**
|
|
5
5
|
* @summary A section of a navigation with a trigger that opens a panel of links.
|
|
@@ -36,8 +36,17 @@ declare const HelixHeadlessMegamenu_base: (new (...args: any[]) => import("@fusi
|
|
|
36
36
|
* navigation menu publishes the same pair from its shared viewport, so a
|
|
37
37
|
* stylesheet can grow or shrink one panel into the next.
|
|
38
38
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
39
|
+
* The panel's default slot is the `columns` part and draws no box, so a sheet
|
|
40
|
+
* can give the columns one of their own. While a panel is open, an
|
|
41
|
+
* `indicator` slot is rendered beside its trigger, as Radix's indicator
|
|
42
|
+
* marks the open one: slot a mark of your own, such as a bar or an arrow
|
|
43
|
+
* pointing at the panel, and it shows only while the panel is open. The styled
|
|
44
|
+
* tier rests it on the trigger's bottom edge.
|
|
45
|
+
*
|
|
46
|
+
* Left and Right Arrow move between the triggers of the megamenus beside this
|
|
47
|
+
* one, and Home and End go to the first and the last, as Radix's navigation
|
|
48
|
+
* menu does. In a `Navigation`, which holds them in a slot, the arrows are the
|
|
49
|
+
* navigation's, and move between its destinations under its `arrows`. Down Arrow on the trigger of an open panel moves
|
|
41
50
|
* focus to the panel's first link, Escape closes the panel and returns focus
|
|
42
51
|
* to its trigger, and Tab moves through the panel's links and closes it on the
|
|
43
52
|
* way out. The trigger says `aria-expanded`, and the panel is a group named by
|
|
@@ -50,12 +59,15 @@ declare const HelixHeadlessMegamenu_base: (new (...args: any[]) => import("@fusi
|
|
|
50
59
|
* @documentation https://fusion.dev/helix/components/megamenu
|
|
51
60
|
*
|
|
52
61
|
* @slot - The panel's contents, such as your own lists of links and their headings.
|
|
62
|
+
* @slot indicator - A mark for the open trigger, shown while the panel is open, such as a bar or an arrow pointing at the panel.
|
|
53
63
|
* @slot trigger - The control that opens the panel. When it is empty, a button named by `label` is shown.
|
|
54
64
|
*
|
|
55
65
|
* @event {HelixBeforeCloseEvent} helix-before-close - The panel is about to close. Cancelable.
|
|
56
66
|
* @event {HelixBeforeOpenEvent} helix-before-open - The panel is about to open. Cancelable.
|
|
57
67
|
* @event {ToggleEvent} toggle - The panel opened or closed. Carries `newState` and `oldState`.
|
|
58
68
|
*
|
|
69
|
+
* @csspart columns - The panel's default slot. It draws no box until a sheet gives it a `display`.
|
|
70
|
+
* @csspart indicator - The `indicator` slot, rendered while the panel is open.
|
|
59
71
|
* @csspart surface - The floating panel that opens.
|
|
60
72
|
* @csspart trigger - The default trigger button, shown when the `trigger` slot is empty.
|
|
61
73
|
*
|
|
@@ -73,6 +85,8 @@ declare const HelixHeadlessMegamenu_base: (new (...args: any[]) => import("@fusi
|
|
|
73
85
|
* @cssstate to-start - The panel closed because one later in the bar opened, so it can leave toward the start.
|
|
74
86
|
*/
|
|
75
87
|
export declare class HelixHeadlessMegamenu extends HelixHeadlessMegamenu_base {
|
|
88
|
+
/** The bar's one open panel, shared by every megamenu on the page. */
|
|
89
|
+
private static readonly bar;
|
|
76
90
|
/**
|
|
77
91
|
* The page width, in pixels, below which a card panel is shown as a band. At
|
|
78
92
|
* zero, it never is.
|
|
@@ -155,6 +169,17 @@ export declare class HelixHeadlessMegamenu extends HelixHeadlessMegamenu_base {
|
|
|
155
169
|
* the consumer slotted, or the button drawn in its place.
|
|
156
170
|
*/
|
|
157
171
|
get navigationControl(): HTMLElement;
|
|
172
|
+
/**
|
|
173
|
+
* The arrows along a bar of megamenus that no component holds in a slot.
|
|
174
|
+
*
|
|
175
|
+
* Each megamenu's trigger is one stop, and a press counts only from a
|
|
176
|
+
* trigger, so an arrow among an open panel's links stays with the panel.
|
|
177
|
+
* Down and Up are reserved: Down enters an open panel. A megamenu whose
|
|
178
|
+
* parent is a component, and so holds it in a slot, passes no stops, so a
|
|
179
|
+
* `Navigation` around it decides the arrows, on or off, for every
|
|
180
|
+
* destination at once.
|
|
181
|
+
*/
|
|
182
|
+
protected readonly keys: KeyboardNavigationController;
|
|
158
183
|
/**
|
|
159
184
|
* Down Arrow on the trigger of an open panel moves focus to the panel's first
|
|
160
185
|
* link or control, as Radix's navigation menu does.
|
|
@@ -277,18 +302,10 @@ export declare class HelixHeadlessMegamenu extends HelixHeadlessMegamenu_base {
|
|
|
277
302
|
*
|
|
278
303
|
* Before the render rather than after it, because the popover controller
|
|
279
304
|
* raises the panel from its own `hostUpdated`, which runs before `updated`:
|
|
280
|
-
* settled there, the two would be up together for a frame. The
|
|
281
|
-
*
|
|
282
|
-
* overruled.
|
|
305
|
+
* settled there, the two would be up together for a frame. The bookkeeping
|
|
306
|
+
* is `HandOver`'s.
|
|
283
307
|
*/
|
|
284
308
|
protected willUpdate(changed: PropertyValues): void;
|
|
285
|
-
/**
|
|
286
|
-
* Clears the direction of every panel but the two in a hand-over, so only
|
|
287
|
-
* the latest move is ever described.
|
|
288
|
-
*/
|
|
289
|
-
private static settle;
|
|
290
|
-
/** Whether the panel is closing because another one opened in its place. */
|
|
291
|
-
private handedOver;
|
|
292
309
|
/** The panel's size the last time it was open, in pixels. */
|
|
293
310
|
private size;
|
|
294
311
|
/** The size of the panel this one took over from, if it took over. */
|
|
@@ -312,6 +329,13 @@ export declare class HelixHeadlessMegamenu extends HelixHeadlessMegamenu_base {
|
|
|
312
329
|
* has one reaches this without reimplementing the panel below it.
|
|
313
330
|
*/
|
|
314
331
|
protected renderTrigger(): TemplateResult;
|
|
332
|
+
/**
|
|
333
|
+
* The mark under the trigger, while the panel is open. Rendered only then,
|
|
334
|
+
* so a mark of your own needs no rule to hide it while the panel is closed,
|
|
335
|
+
* and hidden from the accessibility tree: the trigger's `aria-expanded`
|
|
336
|
+
* already says the panel is open.
|
|
337
|
+
*/
|
|
338
|
+
protected renderIndicator(): TemplateResult | typeof nothing;
|
|
315
339
|
protected render(): TemplateResult;
|
|
316
340
|
}
|
|
317
341
|
declare global {
|