@fusion.dev/helix-headless 0.104.1 → 0.106.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 +10386 -3813
- package/dist/accordion/item/accordion-item.d.ts +17 -16
- package/dist/accordion/root/accordion-root.d.ts +13 -17
- package/dist/announcement/root/announcement-root.d.ts +24 -31
- package/dist/app-header/root/app-header-root.d.ts +14 -14
- package/dist/area-chart/root/area-chart-root.d.ts +29 -48
- package/dist/avatar/group/avatar-group.d.ts +6 -8
- package/dist/avatar/root/avatar-root.d.ts +11 -11
- package/dist/badge/root/badge-root.d.ts +14 -15
- package/dist/bar-chart/root/bar-chart-root.d.ts +40 -44
- package/dist/blockquote/root/blockquote-root.d.ts +5 -7
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +25 -33
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +12 -11
- package/dist/button/root/button-root.d.ts +16 -17
- package/dist/button-group/root/button-group-root.d.ts +9 -10
- package/dist/callout/root/callout-root.d.ts +10 -15
- package/dist/canvas/edge/canvas-edge.d.ts +21 -21
- package/dist/canvas/node/canvas-node.d.ts +43 -45
- package/dist/canvas/root/canvas-root.d.ts +100 -99
- package/dist/card/root/card-root.d.ts +10 -12
- package/dist/carousel/root/carousel-root.d.ts +32 -33
- package/dist/chat/composer/chat-composer.d.ts +24 -26
- package/dist/chat/message/chat-message.d.ts +30 -33
- package/dist/chat/root/chat-root.d.ts +63 -80
- package/dist/checkbox/root/checkbox-root.d.ts +30 -32
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +25 -25
- package/dist/code/root/code-root.d.ts +6 -10
- package/dist/code-block/root/code-block-root.d.ts +35 -48
- package/dist/color-input/root/color-input-root.d.ts +62 -56
- package/dist/color-input/root/color-input-root.js +3 -0
- package/dist/color-picker/root/color-picker-root.d.ts +61 -49
- package/dist/color-picker/root/color-picker-root.js +4 -0
- package/dist/combobox/root/combobox-root.d.ts +52 -53
- package/dist/command/root/command-root.d.ts +40 -40
- package/dist/command/root/command-root.js +1 -0
- package/dist/copy-button/root/copy-button-root.d.ts +24 -26
- package/dist/data-table/root/data-table-root.d.ts +106 -107
- package/dist/date-input/root/date-input-root.d.ts +54 -53
- package/dist/date-picker/root/date-picker-root.d.ts +25 -21
- package/dist/description-list/item/description-list-item.d.ts +7 -7
- package/dist/description-list/root/description-list-root.d.ts +10 -15
- package/dist/dialog/root/dialog-root.d.ts +22 -19
- package/dist/divider/root/divider-root.d.ts +12 -13
- package/dist/donut-chart/root/donut-chart-root.d.ts +19 -20
- package/dist/drawer/root/drawer-root.d.ts +19 -18
- package/dist/drilldown/item/drilldown-item.d.ts +28 -28
- package/dist/drilldown/root/drilldown-root.d.ts +22 -28
- package/dist/element-events.generated.js +19 -1
- package/dist/empty/root/empty-root.d.ts +16 -19
- package/dist/file-input/root/file-input-root.d.ts +32 -32
- package/dist/filter-input/chip/filter-chip.d.ts +36 -39
- package/dist/filter-input/field/filter-field.d.ts +25 -31
- package/dist/filter-input/menu/filter-menu.d.ts +50 -47
- package/dist/filter-input/operator/filter-operator.d.ts +15 -20
- package/dist/filter-input/root/filter-input-root.d.ts +80 -98
- package/dist/format-date/root/format-date-root.d.ts +19 -27
- package/dist/heatmap/root/heatmap-root.d.ts +40 -41
- package/dist/icon/root/icon-root.d.ts +21 -23
- package/dist/icon-button/root/icon-button-root.d.ts +12 -14
- package/dist/image/root/image-root.d.ts +30 -30
- package/dist/input/root/input-root.d.ts +36 -35
- package/dist/kbd/root/kbd-root.d.ts +13 -15
- package/dist/legend/root/legend-root.d.ts +18 -16
- package/dist/lightbox/item/lightbox-item.d.ts +13 -15
- package/dist/lightbox/root/lightbox-root.d.ts +40 -41
- package/dist/line-chart/root/line-chart-root.d.ts +20 -29
- package/dist/list/item/list-item.d.ts +17 -22
- package/dist/list/root/list-root.d.ts +6 -7
- package/dist/listbox/root/listbox-root.d.ts +42 -41
- package/dist/loader/root/loader-root.d.ts +16 -20
- package/dist/map/area/map-area.d.ts +48 -0
- package/dist/map/area/map-area.js +40 -0
- package/dist/map/buildings/map-buildings.d.ts +45 -0
- package/dist/map/buildings/map-buildings.js +37 -0
- package/dist/map/contours/map-contours.d.ts +61 -0
- package/dist/map/contours/map-contours.js +54 -0
- package/dist/map/index.d.ts +14 -0
- package/dist/map/index.js +10 -0
- package/dist/map/landcover/map-landcover.d.ts +47 -0
- package/dist/map/landcover/map-landcover.js +37 -0
- package/dist/map/marker/map-marker.d.ts +120 -0
- package/dist/map/marker/map-marker.js +109 -0
- package/dist/map/points/map-points.d.ts +139 -0
- package/dist/map/points/map-points.js +161 -0
- package/dist/map/position/map-position.d.ts +70 -0
- package/dist/map/position/map-position.js +89 -0
- package/dist/map/raster/map-raster.d.ts +84 -0
- package/dist/map/raster/map-raster.js +96 -0
- package/dist/map/root/map-root.d.ts +269 -52
- package/dist/map/root/map-root.js +473 -5
- package/dist/map/route/map-route.d.ts +73 -0
- package/dist/map/route/map-route.js +52 -0
- package/dist/map/terrain/map-terrain.d.ts +68 -0
- package/dist/map/terrain/map-terrain.js +58 -0
- package/dist/megamenu/root/megamenu-root.d.ts +27 -25
- package/dist/menu/item/menu-item.d.ts +30 -31
- package/dist/menu/root/menu-root.d.ts +25 -29
- package/dist/meter/root/meter-root.d.ts +22 -21
- package/dist/navigation/root/navigation-root.d.ts +13 -16
- package/dist/notifications/group/notification-group.d.ts +27 -28
- package/dist/notifications/notification/notification.d.ts +35 -42
- package/dist/notifications/root/notifications-root.d.ts +22 -24
- package/dist/number-input/root/number-input-root.d.ts +46 -50
- package/dist/object-inspector/root/object-inspector-root.d.ts +46 -58
- package/dist/option/group/option-group.d.ts +11 -11
- package/dist/option/root/option-root.d.ts +28 -33
- package/dist/outline/root/outline-root.d.ts +18 -17
- package/dist/pagination/root/pagination-root.d.ts +37 -39
- package/dist/pagination/size/pagination-size.d.ts +37 -43
- package/dist/pagination/summary/pagination-summary.d.ts +12 -14
- package/dist/pin-input/root/pin-input-root.d.ts +32 -38
- package/dist/popover/root/popover-root.d.ts +16 -21
- package/dist/progress/root/progress-root.d.ts +16 -14
- package/dist/qr-code/root/qr-code-root.d.ts +22 -25
- package/dist/quote/root/quote-root.d.ts +5 -6
- package/dist/radio/group/radio-group.d.ts +26 -28
- package/dist/radio/root/radio-root.d.ts +24 -28
- package/dist/rating/root/rating-root.d.ts +27 -30
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +43 -55
- package/dist/scroll-area/root/scroll-area-root.d.ts +15 -21
- package/dist/select/root/select-root.d.ts +41 -44
- package/dist/skeleton/root/skeleton-root.d.ts +7 -8
- package/dist/skip-link/root/skip-link-root.d.ts +21 -28
- package/dist/slider/root/slider-root.d.ts +36 -39
- package/dist/sparkline/root/sparkline-root.d.ts +22 -28
- package/dist/speed-dial/item/speed-dial-item.d.ts +21 -21
- package/dist/speed-dial/root/speed-dial-root.d.ts +25 -27
- package/dist/splitter/root/splitter-root.d.ts +37 -41
- package/dist/stat/group/stat-group.d.ts +4 -4
- package/dist/stat/root/stat-root.d.ts +8 -9
- package/dist/steps/root/steps-root.d.ts +11 -14
- package/dist/steps/step/step.d.ts +22 -29
- package/dist/switch/root/switch-root.d.ts +20 -24
- package/dist/table/cell/table-cell.d.ts +18 -8
- package/dist/table/cell/table-cell.js +5 -1
- package/dist/table/column/table-column.d.ts +62 -55
- package/dist/table/root/table-root.d.ts +16 -17
- package/dist/table/row/table-row.d.ts +3 -3
- package/dist/tabs/panel/tab-panel.d.ts +3 -3
- package/dist/tabs/root/tabs-root.d.ts +19 -17
- package/dist/tabs/tab/tab.d.ts +6 -6
- package/dist/tag/root/tag-root.d.ts +11 -12
- package/dist/textarea/root/textarea-root.d.ts +29 -32
- package/dist/time-input/root/time-input-root.d.ts +70 -69
- package/dist/time-picker/root/time-picker-root.d.ts +58 -66
- package/dist/timeline/item/timeline-item.d.ts +18 -24
- package/dist/timeline/root/timeline-root.d.ts +13 -21
- package/dist/toast/item/toast-item.d.ts +21 -22
- package/dist/toast/root/toast-root.d.ts +18 -23
- package/dist/toggle/group/toggle-group.d.ts +23 -25
- package/dist/toggle/root/toggle-root.d.ts +8 -8
- package/dist/toolbar/root/toolbar-root.d.ts +7 -10
- package/dist/tooltip/root/tooltip-root.d.ts +41 -47
- package/dist/tour/root/tour-root.d.ts +24 -26
- package/dist/tour/stop/tour-stop.d.ts +39 -48
- package/dist/tree/item/tree-item.d.ts +23 -25
- package/dist/tree/root/tree-root.d.ts +13 -12
- package/dist/trend/root/trend-root.d.ts +18 -19
- package/dist/video/root/video-root.d.ts +108 -101
- package/dist/video-playlist/item/video-playlist-item.d.ts +23 -28
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +17 -21
- package/dist/video-playlist/root/video-playlist-root.d.ts +21 -25
- package/dist/virtual-list/root/virtual-list-root.d.ts +27 -26
- package/package.json +5 -5
- package/types/jsx.d.ts +14011 -11983
- package/types/svelte.d.ts +10 -0
- package/types/vue.d.ts +2143 -1497
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
+
import { nothing, type PropertyValues } from 'lit';
|
|
3
|
+
/** How an elevation tile stores its heights in its colors. */
|
|
4
|
+
export type MapTerrainEncoding = 'mapbox' | 'terrarium';
|
|
5
|
+
/**
|
|
6
|
+
* @summary Hills and mountains on a map, shaded and raised in 3D.
|
|
7
|
+
*
|
|
8
|
+
* @description
|
|
9
|
+
* `connectMap` shades the land by its slopes, from elevation tiles, so hills
|
|
10
|
+
* and valleys show on a flat map. Set `raised` to raise the ground to its real
|
|
11
|
+
* height as well, and tilt the map to see it. Routes, areas, and buildings lie
|
|
12
|
+
* on the raised ground.
|
|
13
|
+
*
|
|
14
|
+
* Set `src` to an elevation tile URL with `{z}`, `{x}`, and `{y}` in it, and
|
|
15
|
+
* `encoding` to how its tiles store heights: `terrarium`, the default, or
|
|
16
|
+
* `mapbox`. Set `max-zoom` to the deepest zoom the provider has tiles for.
|
|
17
|
+
* Put the provider's credit in `attribution`.
|
|
18
|
+
*
|
|
19
|
+
* MapLibre draws the terrain. Leaflet draws maps flat, so a Leaflet map shows
|
|
20
|
+
* none. The frame lists the layer by its `label` for screen readers.
|
|
21
|
+
*
|
|
22
|
+
* @since 0.105.0
|
|
23
|
+
* @status experimental
|
|
24
|
+
* @category media
|
|
25
|
+
* @aliases Terrain, Hillshade, Elevation, Relief
|
|
26
|
+
* @documentation https://fusion.dev/helix/components/map
|
|
27
|
+
*
|
|
28
|
+
* @event {HelixMapPartChangeEvent} helix-map-part-change - The tiles, how the ground is raised, or the layer's name or colors changed. Used by `connectMap`; pages do not need to listen for it.
|
|
29
|
+
*/
|
|
30
|
+
export declare class HelixHeadlessMapTerrain extends HelixElement {
|
|
31
|
+
/** The elevation provider's credit, shown in the frame's footer. Links in it stay links. */
|
|
32
|
+
attribution?: string;
|
|
33
|
+
/** More about the terrain. Read after the label in the frame's list. */
|
|
34
|
+
description?: string;
|
|
35
|
+
/** How the tiles store heights in their colors: `terrarium` or `mapbox`. */
|
|
36
|
+
encoding: MapTerrainEncoding;
|
|
37
|
+
/** How many times its real height the ground is raised, where `raised` is set. */
|
|
38
|
+
exaggeration: number;
|
|
39
|
+
/**
|
|
40
|
+
* A name this layer shares with other layers, such as a route and its
|
|
41
|
+
* dotted legs. The layers menu shows layers in the same group as one entry,
|
|
42
|
+
* named by the first of them, and its checkbox shows or hides them all.
|
|
43
|
+
*/
|
|
44
|
+
group?: string;
|
|
45
|
+
/** Marks this as a layer for the frame and the connector, whatever its tag. */
|
|
46
|
+
readonly isMapLayer = true;
|
|
47
|
+
/** @internal Which kind of layer, which is how the connector draws it. */
|
|
48
|
+
readonly layerKind: 'terrain';
|
|
49
|
+
/** The layer's name in the frame's list. */
|
|
50
|
+
label: string;
|
|
51
|
+
/**
|
|
52
|
+
* The deepest zoom the provider has tiles for. The map enlarges those tiles
|
|
53
|
+
* at deeper zooms, where it would otherwise ask for tiles that do not exist.
|
|
54
|
+
*/
|
|
55
|
+
maxZoom?: number;
|
|
56
|
+
/** Raises the ground to its real height in 3D. Tilt the map to see it. */
|
|
57
|
+
raised: boolean;
|
|
58
|
+
/** One elevation tile URL with `{z}`, `{x}`, and `{y}` in it. */
|
|
59
|
+
src?: string;
|
|
60
|
+
/** Tells the frame and the connector the layer changed. */
|
|
61
|
+
protected updated(changed: PropertyValues): void;
|
|
62
|
+
protected render(): typeof nothing;
|
|
63
|
+
}
|
|
64
|
+
declare global {
|
|
65
|
+
interface HTMLElementTagNameMap {
|
|
66
|
+
'helix-headless-map-terrain': HelixHeadlessMapTerrain;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement, HelixElement, HelixMapPartChangeEvent } from '@fusion.dev/helix-core';
|
|
8
|
+
import { nothing } from 'lit';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
let HelixHeadlessMapTerrain = class HelixHeadlessMapTerrain extends HelixElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.encoding = 'terrarium';
|
|
14
|
+
this.exaggeration = 1;
|
|
15
|
+
this.isMapLayer = true;
|
|
16
|
+
this.layerKind = 'terrain';
|
|
17
|
+
this.label = 'Terrain';
|
|
18
|
+
this.raised = false;
|
|
19
|
+
}
|
|
20
|
+
updated(changed) {
|
|
21
|
+
super.updated(changed);
|
|
22
|
+
this.dispatchEvent(new HelixMapPartChangeEvent({ kind: 'layer' }));
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
return nothing;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
__decorate([
|
|
29
|
+
property()
|
|
30
|
+
], HelixHeadlessMapTerrain.prototype, "attribution", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
property()
|
|
33
|
+
], HelixHeadlessMapTerrain.prototype, "description", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
property()
|
|
36
|
+
], HelixHeadlessMapTerrain.prototype, "encoding", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
property({ type: Number })
|
|
39
|
+
], HelixHeadlessMapTerrain.prototype, "exaggeration", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
property()
|
|
42
|
+
], HelixHeadlessMapTerrain.prototype, "group", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
property()
|
|
45
|
+
], HelixHeadlessMapTerrain.prototype, "label", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
property({ attribute: 'max-zoom', type: Number })
|
|
48
|
+
], HelixHeadlessMapTerrain.prototype, "maxZoom", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
property({ type: Boolean })
|
|
51
|
+
], HelixHeadlessMapTerrain.prototype, "raised", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
property()
|
|
54
|
+
], HelixHeadlessMapTerrain.prototype, "src", void 0);
|
|
55
|
+
HelixHeadlessMapTerrain = __decorate([
|
|
56
|
+
customElement('helix-headless-map-terrain')
|
|
57
|
+
], HelixHeadlessMapTerrain);
|
|
58
|
+
export { HelixHeadlessMapTerrain };
|
|
@@ -2,23 +2,23 @@ import { HelixElement, PopoverController } from '@fusion.dev/helix-core';
|
|
|
2
2
|
import { 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
|
-
* @summary A section of a navigation that opens a panel of
|
|
5
|
+
* @summary A section of a navigation with a trigger that opens a panel of links.
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
|
-
*
|
|
9
|
-
* `
|
|
10
|
-
*
|
|
11
|
-
* inside a role that is not a link.
|
|
12
|
-
*
|
|
13
|
-
*
|
|
8
|
+
* A disclosure: a button that shows and hides a region of your own links. It
|
|
9
|
+
* does not use `role="menu"` or `menuitem`, which are for application commands.
|
|
10
|
+
* Those roles take over the arrow keys, announce "menu" to someone looking for
|
|
11
|
+
* navigation, and put every link inside a role that is not a link. As a
|
|
12
|
+
* disclosure, middle clicks, modified clicks, and the status bar keep working.
|
|
13
|
+
* Use `Menu` for a row of commands.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* It renders no links. A router renders its own anchors and cannot render them
|
|
16
|
+
* inside this shadow root, so the panel is a slot for the lists and headings
|
|
17
|
+
* you write.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
* which
|
|
21
|
-
*
|
|
19
|
+
* It opens on hover by default, and a press always opens it too. `open-on` sets
|
|
20
|
+
* which. Hover is the default because in a navigation bar people expect to move
|
|
21
|
+
* along the row and see each section.
|
|
22
22
|
*
|
|
23
23
|
* @since 0.1.0
|
|
24
24
|
* @status stable
|
|
@@ -26,24 +26,25 @@ declare const HelixHeadlessMegamenu_base: (new (...args: any[]) => import("@fusi
|
|
|
26
26
|
* @aliases Mega menu, Flyout, Nav panel
|
|
27
27
|
* @documentation https://fusion.dev/helix/components/megamenu
|
|
28
28
|
*
|
|
29
|
-
* @slot - The panel's contents
|
|
30
|
-
* @slot trigger - The control that opens
|
|
29
|
+
* @slot - The panel's contents, such as your own lists of links and their headings.
|
|
30
|
+
* @slot trigger - The control that opens the panel. When it is empty, a button named by `label` is shown.
|
|
31
31
|
*
|
|
32
|
-
* @event {HelixBeforeCloseEvent} helix-before-close -
|
|
33
|
-
* @event {HelixBeforeOpenEvent} helix-before-open -
|
|
34
|
-
* @event {Event} toggle -
|
|
32
|
+
* @event {HelixBeforeCloseEvent} helix-before-close - The panel is about to close. Cancelable.
|
|
33
|
+
* @event {HelixBeforeOpenEvent} helix-before-open - The panel is about to open. Cancelable.
|
|
34
|
+
* @event {Event} toggle - The panel opened or closed. Carries `newState` and `oldState`.
|
|
35
35
|
*
|
|
36
|
-
* @csspart surface - The floating panel
|
|
37
|
-
* @csspart trigger - The default trigger,
|
|
36
|
+
* @csspart surface - The floating panel that opens.
|
|
37
|
+
* @csspart trigger - The default trigger button, shown when the `trigger` slot is empty.
|
|
38
38
|
*
|
|
39
39
|
* @cssproperty --megamenu-top - Where the panel starts, measured from the bar above it.
|
|
40
40
|
*
|
|
41
|
-
* @cssstate narrow -
|
|
42
|
-
* @cssstate open -
|
|
41
|
+
* @cssstate narrow - The page is narrower than `band-below`, so the panel is shown as a band whatever its variant.
|
|
42
|
+
* @cssstate open - The panel is open, and the trigger is shown as current.
|
|
43
43
|
*/
|
|
44
44
|
export declare class HelixHeadlessMegamenu extends HelixHeadlessMegamenu_base {
|
|
45
45
|
/**
|
|
46
|
-
* The width, in pixels,
|
|
46
|
+
* The page width, in pixels, below which a card panel is shown as a band. At
|
|
47
|
+
* zero, it never is.
|
|
47
48
|
*
|
|
48
49
|
* A card is a panel hung off one word, and there is no room to hang anything
|
|
49
50
|
* off a word on a phone: the columns do not shrink past
|
|
@@ -69,11 +70,12 @@ export declare class HelixHeadlessMegamenu extends HelixHeadlessMegamenu_base {
|
|
|
69
70
|
*/
|
|
70
71
|
bandBelow: number;
|
|
71
72
|
/**
|
|
72
|
-
* The section's name,
|
|
73
|
+
* The section's name, used for the default trigger and the panel.
|
|
73
74
|
*/
|
|
74
75
|
label: string;
|
|
75
76
|
/**
|
|
76
|
-
* Whether hovering the trigger opens the panel, or only a press
|
|
77
|
+
* Whether hovering over the trigger opens the panel (`hover`), or only a press
|
|
78
|
+
* does (`click`).
|
|
77
79
|
*
|
|
78
80
|
* A press always works. This says whether a mouse also opens it by resting on
|
|
79
81
|
* the trigger, and it is the default because that is what a navigation bar
|
|
@@ -4,21 +4,19 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
|
4
4
|
* @summary One row in a menu: a command, a choice, or a way into a submenu.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* it a command.
|
|
7
|
+
* One element covers three kinds of row, and what you give it decides which:
|
|
8
|
+
* - Content in the `submenu` slot makes the row open a submenu page.
|
|
9
|
+
* - `checked` makes the row a choice.
|
|
10
|
+
* - With neither, the row is a command.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
* `
|
|
15
|
-
*
|
|
16
|
-
* `
|
|
17
|
-
* keeps `menuitem` and says `aria-haspopup`, since the page it opens is a menu.
|
|
12
|
+
* The role follows the kind. A row with `checked` is `menuitemcheckbox` with
|
|
13
|
+
* `aria-checked`, and `exclusive` makes it `menuitemradio`, for a set where
|
|
14
|
+
* only one can be on. A row that opens a page keeps `menuitem` and sets
|
|
15
|
+
* `aria-haspopup`.
|
|
18
16
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
17
|
+
* The menu sets whether the row's page is showing as a property, never as an
|
|
18
|
+
* attribute. An attribute written onto your element after it upgrades causes a
|
|
19
|
+
* hydration mismatch.
|
|
22
20
|
*
|
|
23
21
|
* @since 0.1.0
|
|
24
22
|
* @status stable
|
|
@@ -26,15 +24,15 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
|
26
24
|
* @documentation https://fusion.dev/helix/components/menu
|
|
27
25
|
*
|
|
28
26
|
* @slot - The label.
|
|
29
|
-
* @slot start -
|
|
30
|
-
* @slot submenu -
|
|
27
|
+
* @slot start - Content before the label, such as an icon.
|
|
28
|
+
* @slot submenu - The rows of a submenu that this row opens.
|
|
31
29
|
*
|
|
32
|
-
* @event {HelixSelectEvent} helix-select -
|
|
30
|
+
* @event {HelixSelectEvent} helix-select - The row was chosen. Cancelable: cancel it to keep the menu open.
|
|
33
31
|
*
|
|
34
32
|
* @csspart item - The row, which is an `<a>` where `href` is set.
|
|
35
|
-
* @csspart mark - The trailing mark: a
|
|
36
|
-
* a
|
|
37
|
-
* @csspart start - The leading column
|
|
33
|
+
* @csspart mark - The trailing mark: a check mark when the row is checked, or a caret
|
|
34
|
+
* when it opens a submenu. A row never shows both, so they share one column.
|
|
35
|
+
* @csspart start - The leading column that holds the `start` slot. It is always rendered.
|
|
38
36
|
*/
|
|
39
37
|
export declare class HelixHeadlessMenuItem extends HelixElement {
|
|
40
38
|
/**
|
|
@@ -50,15 +48,15 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
|
|
|
50
48
|
*/
|
|
51
49
|
checkable: boolean;
|
|
52
50
|
/**
|
|
53
|
-
* Whether the row is
|
|
51
|
+
* Whether the row is checked.
|
|
54
52
|
*/
|
|
55
53
|
checked: boolean;
|
|
56
54
|
/**
|
|
57
|
-
* Whether the row
|
|
55
|
+
* Whether the row is disabled, so it cannot be chosen.
|
|
58
56
|
*/
|
|
59
57
|
disabled: boolean;
|
|
60
58
|
/**
|
|
61
|
-
* Whether the link
|
|
59
|
+
* Whether the link downloads the file when the row is chosen.
|
|
62
60
|
*
|
|
63
61
|
* Only meaningful beside an `href`, and only for a file served from this
|
|
64
62
|
* origin: the attribute is ignored cross-origin, which is the browser's rule
|
|
@@ -66,7 +64,7 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
|
|
|
66
64
|
*/
|
|
67
65
|
download: boolean;
|
|
68
66
|
/**
|
|
69
|
-
* Whether only one row
|
|
67
|
+
* Whether only one row in its set can be checked at a time.
|
|
70
68
|
*
|
|
71
69
|
* Announcement and nothing else, the way `checkable` is: this element applies
|
|
72
70
|
* no choice and polices no group, so what it does is tell a reader which kind
|
|
@@ -79,7 +77,7 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
|
|
|
79
77
|
*/
|
|
80
78
|
exclusive: boolean;
|
|
81
79
|
/**
|
|
82
|
-
*
|
|
80
|
+
* The URL the row links to. Setting it renders the row as a link.
|
|
83
81
|
*
|
|
84
82
|
* **The row itself becomes an `<a>`, and the role goes with it.** A
|
|
85
83
|
* `menuitem` cannot contain a link: measured in Chromium, an anchor inside
|
|
@@ -100,7 +98,7 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
|
|
|
100
98
|
*/
|
|
101
99
|
href: string;
|
|
102
100
|
/**
|
|
103
|
-
* Whether
|
|
101
|
+
* Whether the row is on the menu page that is showing.
|
|
104
102
|
*
|
|
105
103
|
* Set by the menu, and a property rather than an attribute for that reason.
|
|
106
104
|
* Public because the menu has to reach it, and not something a consumer
|
|
@@ -108,7 +106,7 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
|
|
|
108
106
|
*/
|
|
109
107
|
onPage: boolean;
|
|
110
108
|
/**
|
|
111
|
-
* The
|
|
109
|
+
* The link's `rel`. Set it whenever you set `target="_blank"`.
|
|
112
110
|
*/
|
|
113
111
|
rel: string;
|
|
114
112
|
/**
|
|
@@ -123,11 +121,11 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
|
|
|
123
121
|
*/
|
|
124
122
|
showingSubmenu: boolean;
|
|
125
123
|
/**
|
|
126
|
-
* Where the link opens, for
|
|
124
|
+
* Where the link opens, for rows that should open outside the current page.
|
|
127
125
|
*/
|
|
128
126
|
target: string;
|
|
129
127
|
/**
|
|
130
|
-
*
|
|
128
|
+
* The row's value, sent in `helix-select` when the row is chosen.
|
|
131
129
|
*/
|
|
132
130
|
value: string;
|
|
133
131
|
/**
|
|
@@ -217,16 +215,17 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
|
|
|
217
215
|
*/
|
|
218
216
|
focus(): void;
|
|
219
217
|
/**
|
|
220
|
-
*
|
|
218
|
+
* Moves focus to the row. Part of `NavigableItem`, which the shared keyboard
|
|
219
|
+
* controller uses for the arrow keys.
|
|
221
220
|
*
|
|
222
221
|
* `focus()` above already puts focus on the control inside the row rather than
|
|
223
222
|
* on the row, which is the whole of what moving here means.
|
|
224
223
|
*/
|
|
225
224
|
focusItem(): void;
|
|
226
|
-
/** Chooses the row,
|
|
225
|
+
/** Chooses the row, the same as pressing it. */
|
|
227
226
|
select(): void;
|
|
228
227
|
/**
|
|
229
|
-
* Whether
|
|
228
|
+
* Whether the row has focus, which is what selected means in a menu.
|
|
230
229
|
*
|
|
231
230
|
* A radio group's selection is an answer it holds; a menu has no answer, only
|
|
232
231
|
* a row the reader has walked to, so focus is the whole of what "the current
|
|
@@ -2,25 +2,21 @@ import { HelixElement, KeyboardNavigationController, type Placement } from '@fus
|
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
declare const HelixHeadlessMenu_base: (new (...args: any[]) => import("@fusion.dev/helix-core").CollectionElement) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerOpenInterface) & typeof HelixElement;
|
|
4
4
|
/**
|
|
5
|
-
* @summary A menu of commands
|
|
5
|
+
* @summary A menu of commands that opens from a trigger.
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
|
-
* The trigger is slotted and stays
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* `z-index` anywhere.
|
|
8
|
+
* The trigger is slotted and stays your own element, as with the tooltip. The
|
|
9
|
+
* menu renders its surface in the top layer with the popover API, so an
|
|
10
|
+
* ancestor with `overflow: hidden` does not clip it and it needs no `z-index`.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* screen there is no hover to open them with at all. One panel that changes
|
|
18
|
-
* what it holds has none of those problems and reads the same on a phone.
|
|
12
|
+
* Submenus drill down. A submenu replaces the panel's content, and a back row
|
|
13
|
+
* returns to the previous page. One panel avoids the diagonal pointer path that
|
|
14
|
+
* side-by-side panels need, stays inside a narrow window, and works on touch
|
|
15
|
+
* screens, which have no hover.
|
|
19
16
|
*
|
|
20
|
-
* The
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* upgrades is a hydration mismatch waiting to happen.
|
|
17
|
+
* The root holds which page is open, because only one page shows at a time. It
|
|
18
|
+
* sets this on items as a property, never as an attribute. An attribute written
|
|
19
|
+
* onto your element after it upgrades causes a hydration mismatch.
|
|
24
20
|
*
|
|
25
21
|
* @since 0.1.0
|
|
26
22
|
* @status stable
|
|
@@ -29,30 +25,30 @@ declare const HelixHeadlessMenu_base: (new (...args: any[]) => import("@fusion.d
|
|
|
29
25
|
* @documentation https://fusion.dev/helix/components/menu
|
|
30
26
|
*
|
|
31
27
|
* @slot - The items.
|
|
32
|
-
* @slot trigger -
|
|
28
|
+
* @slot trigger - The control that opens the menu.
|
|
33
29
|
*
|
|
34
|
-
* @event {HelixBeforeCloseEvent} helix-before-close -
|
|
35
|
-
* @event {HelixBeforeOpenEvent} helix-before-open -
|
|
36
|
-
* @event {HelixSelectEvent} helix-select -
|
|
37
|
-
* @event {Event} toggle -
|
|
30
|
+
* @event {HelixBeforeCloseEvent} helix-before-close - The menu is about to close. Cancelable: cancel it to keep it open.
|
|
31
|
+
* @event {HelixBeforeOpenEvent} helix-before-open - The menu is about to open. Cancelable: cancel it to keep it closed.
|
|
32
|
+
* @event {HelixSelectEvent} helix-select - An item was chosen. Cancelable: cancel it to keep the menu open.
|
|
33
|
+
* @event {Event} toggle - The menu opened or closed. The event carries `newState` and `oldState`.
|
|
38
34
|
*
|
|
39
35
|
* @csspart back - The control that returns from a submenu.
|
|
40
36
|
* @csspart back-mark - The glyph on the back control of a submenu.
|
|
41
|
-
* @csspart empty -
|
|
37
|
+
* @csspart empty - The text shown when the menu has no items.
|
|
42
38
|
* @csspart header - The bar above a submenu, holding the way back and its name.
|
|
43
|
-
* @csspart live -
|
|
44
|
-
* @csspart loading -
|
|
39
|
+
* @csspart live - A live region that repeats the empty and loading text, so screen readers announce it when it changes. Visually hidden in the styled tier.
|
|
40
|
+
* @csspart loading - The text shown while the items are loading.
|
|
45
41
|
* @csspart surface - The floating panel the menu is drawn on.
|
|
46
42
|
* @csspart title - The name of the submenu that is showing.
|
|
47
43
|
*
|
|
48
|
-
* @cssstate drilled -
|
|
49
|
-
* @cssstate mark -
|
|
44
|
+
* @cssstate drilled - A submenu's page is showing, so content that is not a row can hide with the top page.
|
|
45
|
+
* @cssstate mark - A row on the current page has a checkbox or a link, so every row keeps the trailing column.
|
|
50
46
|
* @cssstate open - While the menu is open.
|
|
51
|
-
* @cssstate start -
|
|
47
|
+
* @cssstate start - A row on the current page has content in its leading column, so every row keeps that column.
|
|
52
48
|
*/
|
|
53
49
|
export declare class HelixHeadlessMenu extends HelixHeadlessMenu_base {
|
|
54
50
|
/**
|
|
55
|
-
*
|
|
51
|
+
* The text of the row that returns from a submenu.
|
|
56
52
|
*/
|
|
57
53
|
backLabel: string;
|
|
58
54
|
/**
|
|
@@ -64,7 +60,7 @@ export declare class HelixHeadlessMenu extends HelixHeadlessMenu_base {
|
|
|
64
60
|
*/
|
|
65
61
|
offset: number;
|
|
66
62
|
/**
|
|
67
|
-
*
|
|
63
|
+
* The side the menu opens on, when there is room.
|
|
68
64
|
*
|
|
69
65
|
* It moves if that side does not fit.
|
|
70
66
|
*/
|
|
@@ -112,7 +108,7 @@ export declare class HelixHeadlessMenu extends HelixHeadlessMenu_base {
|
|
|
112
108
|
private get items();
|
|
113
109
|
/** Opens the menu. */
|
|
114
110
|
show(): void;
|
|
115
|
-
/** Closes the menu
|
|
111
|
+
/** Closes the menu and returns it to its first page. */
|
|
116
112
|
hide(): void;
|
|
117
113
|
/** Shows an item's submenu in place of the current page. */
|
|
118
114
|
private enter;
|
|
@@ -3,19 +3,18 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
3
3
|
/** Which band a value falls in, once `optimum` has said which end is good. */
|
|
4
4
|
export type MeterBand = 'fair' | 'good' | 'poor';
|
|
5
5
|
/**
|
|
6
|
-
* @summary A measurement in a known range,
|
|
6
|
+
* @summary A measurement in a known range, with optional bands that mark it good, fair, or poor.
|
|
7
7
|
*
|
|
8
8
|
* @description
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* is no `indeterminate`: a measurement whose value is unknown is not one.
|
|
9
|
+
* A meter shows a level within a range. Use `Progress` to show how far along a
|
|
10
|
+
* task is. A progress bar starts empty and ends full, and full is always the
|
|
11
|
+
* good end. For a meter, which end is good depends on what is measured. There
|
|
12
|
+
* is no `indeterminate`, because a meter always has a value.
|
|
14
13
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
14
|
+
* **Set `low`, `high`, and `optimum`**, as defined in the HTML specification.
|
|
15
|
+
* `low` and `high` divide the range into a low band, a middle band, and a high
|
|
16
|
+
* band. `optimum` sets the preferred band. The band next to it is fair, and the
|
|
17
|
+
* band two away is poor.
|
|
19
18
|
*
|
|
20
19
|
* @since 0.1.0
|
|
21
20
|
* @status stable
|
|
@@ -24,15 +23,15 @@ export type MeterBand = 'fair' | 'good' | 'poor';
|
|
|
24
23
|
* @documentation https://fusion.dev/helix/components/meter
|
|
25
24
|
*
|
|
26
25
|
* @csspart groove - The unfilled circle, in `ring` and `arc`.
|
|
27
|
-
* @csspart indicator - The part of
|
|
28
|
-
* @csspart indicator-fair - The fill while the reading is in a band
|
|
29
|
-
* @csspart indicator-good - The fill while the reading is in the good band
|
|
30
|
-
* @csspart indicator-over - The fill while the value is
|
|
31
|
-
* @csspart indicator-poor - The fill while the reading is two bands from the good
|
|
32
|
-
* @csspart indicator-under - The fill while the value is below
|
|
26
|
+
* @csspart indicator - The part of the track the value fills.
|
|
27
|
+
* @csspart indicator-fair - The fill while the reading is in a band next to the good band. Set alongside `indicator`.
|
|
28
|
+
* @csspart indicator-good - The fill while the reading is in the good band. Set alongside `indicator`.
|
|
29
|
+
* @csspart indicator-over - The fill while the value is above `max`. Set alongside `indicator`.
|
|
30
|
+
* @csspart indicator-poor - The fill while the reading is two bands from the good band. Set alongside `indicator`.
|
|
31
|
+
* @csspart indicator-under - The fill while the value is below `min`. Set alongside `indicator`.
|
|
33
32
|
* @csspart tick - A mark at `low` or at `high`.
|
|
34
33
|
* @csspart track - The whole range, or the drawing in `ring` and `arc`.
|
|
35
|
-
* @csspart value - The reading,
|
|
34
|
+
* @csspart value - The reading as text, shown when `show-value` is set.
|
|
36
35
|
*
|
|
37
36
|
* @cssproperty --meter-along - Where a bound sits on the arc, as a length along it.
|
|
38
37
|
* @cssproperty --meter-at - Where a bound sits on a linear track, as a percentage.
|
|
@@ -41,7 +40,8 @@ export type MeterBand = 'fair' | 'good' | 'poor';
|
|
|
41
40
|
*/
|
|
42
41
|
export declare class HelixHeadlessMeter extends HelixElement {
|
|
43
42
|
/**
|
|
44
|
-
*
|
|
43
|
+
* Sets the band directly, for a rule that `low`, `high`, and `optimum` cannot
|
|
44
|
+
* express.
|
|
45
45
|
*
|
|
46
46
|
* **The specification's model has a shape, and it is worth knowing before
|
|
47
47
|
* reaching for this.** Three bands and a point mean it can express a
|
|
@@ -99,7 +99,7 @@ export declare class HelixHeadlessMeter extends HelixElement {
|
|
|
99
99
|
*/
|
|
100
100
|
min: number;
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
102
|
+
* The point in the range where the reading is best.
|
|
103
103
|
*
|
|
104
104
|
* Defaults to the middle of whatever bands are declared, which is the
|
|
105
105
|
* platform's own default and the right one for a score. A meter where low is
|
|
@@ -108,7 +108,7 @@ export declare class HelixHeadlessMeter extends HelixElement {
|
|
|
108
108
|
*/
|
|
109
109
|
optimum?: number;
|
|
110
110
|
/**
|
|
111
|
-
* Whether the reading is drawn as a bar, a ring or an arc.
|
|
111
|
+
* Whether the reading is drawn as a bar, a ring, or an arc.
|
|
112
112
|
*
|
|
113
113
|
* A gauge and a meter are the same thing measured: a value in a range, with
|
|
114
114
|
* bands saying which part of it is the good part. What differs between the two
|
|
@@ -137,7 +137,8 @@ export declare class HelixHeadlessMeter extends HelixElement {
|
|
|
137
137
|
*/
|
|
138
138
|
value: number;
|
|
139
139
|
/**
|
|
140
|
-
*
|
|
140
|
+
* Text that screen readers announce and the meter shows for the reading, in
|
|
141
|
+
* place of the percentage.
|
|
141
142
|
*
|
|
142
143
|
* `value-text="18 GB of 32 GB"` is announced and shown instead of `56%`. The
|
|
143
144
|
* same property `Progress` carries, for the same reason: a percentage is a
|
|
@@ -4,21 +4,18 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
4
4
|
* @summary A set of destinations, with a marker on the current one.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
* Renders a real `<nav>`,
|
|
8
|
-
*
|
|
9
|
-
* a header
|
|
10
|
-
* header: a footer and a sidebar hold the same thing.
|
|
7
|
+
* Renders a real `<nav>`, the landmark that screen reader users jump to.
|
|
8
|
+
* Navigation is its own component, separate from `AppHeader`, so you can use it
|
|
9
|
+
* in a header, a footer, or a sidebar.
|
|
11
10
|
*
|
|
12
|
-
* **It renders no links.**
|
|
13
|
-
* `aria-current="page"
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* **It renders no links.** Bring your own, mark the current one with
|
|
12
|
+
* `aria-current="page"`, and style them with the `data-navigation-item` recipe.
|
|
13
|
+
* A router renders its own anchors and cannot render them inside the
|
|
14
|
+
* component's shadow root.
|
|
16
15
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* thing that makes the page announce correctly is the same thing that puts the
|
|
21
|
-
* marker in the right place.
|
|
16
|
+
* The component moves a marker to the current item. It finds the current item
|
|
17
|
+
* by reading `aria-current`, so the attribute that screen readers announce also
|
|
18
|
+
* places the marker.
|
|
22
19
|
*
|
|
23
20
|
* @since 0.1.0
|
|
24
21
|
* @status stable
|
|
@@ -26,15 +23,15 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
26
23
|
* @aliases Nav, NavList, Tabs
|
|
27
24
|
* @documentation https://fusion.dev/helix/components/navigation
|
|
28
25
|
*
|
|
29
|
-
* @slot - The destinations, as
|
|
26
|
+
* @slot - The destinations, as your own links.
|
|
30
27
|
*
|
|
31
|
-
* @csspart indicator - The marker that
|
|
28
|
+
* @csspart indicator - The marker that moves to the current destination.
|
|
32
29
|
* @csspart nav - The navigation landmark.
|
|
33
30
|
*/
|
|
34
31
|
export declare class HelixHeadlessNavigation extends HelixElement {
|
|
35
32
|
private readonly indicator;
|
|
36
33
|
/**
|
|
37
|
-
*
|
|
34
|
+
* The landmark's name, read by screen readers.
|
|
38
35
|
*/
|
|
39
36
|
label: string;
|
|
40
37
|
private current;
|