@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.
Files changed (167) hide show
  1. package/custom-elements.json +10386 -3813
  2. package/dist/accordion/item/accordion-item.d.ts +17 -16
  3. package/dist/accordion/root/accordion-root.d.ts +13 -17
  4. package/dist/announcement/root/announcement-root.d.ts +24 -31
  5. package/dist/app-header/root/app-header-root.d.ts +14 -14
  6. package/dist/area-chart/root/area-chart-root.d.ts +29 -48
  7. package/dist/avatar/group/avatar-group.d.ts +6 -8
  8. package/dist/avatar/root/avatar-root.d.ts +11 -11
  9. package/dist/badge/root/badge-root.d.ts +14 -15
  10. package/dist/bar-chart/root/bar-chart-root.d.ts +40 -44
  11. package/dist/blockquote/root/blockquote-root.d.ts +5 -7
  12. package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +25 -33
  13. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +12 -11
  14. package/dist/button/root/button-root.d.ts +16 -17
  15. package/dist/button-group/root/button-group-root.d.ts +9 -10
  16. package/dist/callout/root/callout-root.d.ts +10 -15
  17. package/dist/canvas/edge/canvas-edge.d.ts +21 -21
  18. package/dist/canvas/node/canvas-node.d.ts +43 -45
  19. package/dist/canvas/root/canvas-root.d.ts +100 -99
  20. package/dist/card/root/card-root.d.ts +10 -12
  21. package/dist/carousel/root/carousel-root.d.ts +32 -33
  22. package/dist/chat/composer/chat-composer.d.ts +24 -26
  23. package/dist/chat/message/chat-message.d.ts +30 -33
  24. package/dist/chat/root/chat-root.d.ts +63 -80
  25. package/dist/checkbox/root/checkbox-root.d.ts +30 -32
  26. package/dist/checkbox-group/root/checkbox-group-root.d.ts +25 -25
  27. package/dist/code/root/code-root.d.ts +6 -10
  28. package/dist/code-block/root/code-block-root.d.ts +35 -48
  29. package/dist/color-input/root/color-input-root.d.ts +62 -56
  30. package/dist/color-input/root/color-input-root.js +3 -0
  31. package/dist/color-picker/root/color-picker-root.d.ts +61 -49
  32. package/dist/color-picker/root/color-picker-root.js +4 -0
  33. package/dist/combobox/root/combobox-root.d.ts +52 -53
  34. package/dist/command/root/command-root.d.ts +40 -40
  35. package/dist/command/root/command-root.js +1 -0
  36. package/dist/copy-button/root/copy-button-root.d.ts +24 -26
  37. package/dist/data-table/root/data-table-root.d.ts +106 -107
  38. package/dist/date-input/root/date-input-root.d.ts +54 -53
  39. package/dist/date-picker/root/date-picker-root.d.ts +25 -21
  40. package/dist/description-list/item/description-list-item.d.ts +7 -7
  41. package/dist/description-list/root/description-list-root.d.ts +10 -15
  42. package/dist/dialog/root/dialog-root.d.ts +22 -19
  43. package/dist/divider/root/divider-root.d.ts +12 -13
  44. package/dist/donut-chart/root/donut-chart-root.d.ts +19 -20
  45. package/dist/drawer/root/drawer-root.d.ts +19 -18
  46. package/dist/drilldown/item/drilldown-item.d.ts +28 -28
  47. package/dist/drilldown/root/drilldown-root.d.ts +22 -28
  48. package/dist/element-events.generated.js +19 -1
  49. package/dist/empty/root/empty-root.d.ts +16 -19
  50. package/dist/file-input/root/file-input-root.d.ts +32 -32
  51. package/dist/filter-input/chip/filter-chip.d.ts +36 -39
  52. package/dist/filter-input/field/filter-field.d.ts +25 -31
  53. package/dist/filter-input/menu/filter-menu.d.ts +50 -47
  54. package/dist/filter-input/operator/filter-operator.d.ts +15 -20
  55. package/dist/filter-input/root/filter-input-root.d.ts +80 -98
  56. package/dist/format-date/root/format-date-root.d.ts +19 -27
  57. package/dist/heatmap/root/heatmap-root.d.ts +40 -41
  58. package/dist/icon/root/icon-root.d.ts +21 -23
  59. package/dist/icon-button/root/icon-button-root.d.ts +12 -14
  60. package/dist/image/root/image-root.d.ts +30 -30
  61. package/dist/input/root/input-root.d.ts +36 -35
  62. package/dist/kbd/root/kbd-root.d.ts +13 -15
  63. package/dist/legend/root/legend-root.d.ts +18 -16
  64. package/dist/lightbox/item/lightbox-item.d.ts +13 -15
  65. package/dist/lightbox/root/lightbox-root.d.ts +40 -41
  66. package/dist/line-chart/root/line-chart-root.d.ts +20 -29
  67. package/dist/list/item/list-item.d.ts +17 -22
  68. package/dist/list/root/list-root.d.ts +6 -7
  69. package/dist/listbox/root/listbox-root.d.ts +42 -41
  70. package/dist/loader/root/loader-root.d.ts +16 -20
  71. package/dist/map/area/map-area.d.ts +48 -0
  72. package/dist/map/area/map-area.js +40 -0
  73. package/dist/map/buildings/map-buildings.d.ts +45 -0
  74. package/dist/map/buildings/map-buildings.js +37 -0
  75. package/dist/map/contours/map-contours.d.ts +61 -0
  76. package/dist/map/contours/map-contours.js +54 -0
  77. package/dist/map/index.d.ts +14 -0
  78. package/dist/map/index.js +10 -0
  79. package/dist/map/landcover/map-landcover.d.ts +47 -0
  80. package/dist/map/landcover/map-landcover.js +37 -0
  81. package/dist/map/marker/map-marker.d.ts +120 -0
  82. package/dist/map/marker/map-marker.js +109 -0
  83. package/dist/map/points/map-points.d.ts +139 -0
  84. package/dist/map/points/map-points.js +161 -0
  85. package/dist/map/position/map-position.d.ts +70 -0
  86. package/dist/map/position/map-position.js +89 -0
  87. package/dist/map/raster/map-raster.d.ts +84 -0
  88. package/dist/map/raster/map-raster.js +96 -0
  89. package/dist/map/root/map-root.d.ts +269 -52
  90. package/dist/map/root/map-root.js +473 -5
  91. package/dist/map/route/map-route.d.ts +73 -0
  92. package/dist/map/route/map-route.js +52 -0
  93. package/dist/map/terrain/map-terrain.d.ts +68 -0
  94. package/dist/map/terrain/map-terrain.js +58 -0
  95. package/dist/megamenu/root/megamenu-root.d.ts +27 -25
  96. package/dist/menu/item/menu-item.d.ts +30 -31
  97. package/dist/menu/root/menu-root.d.ts +25 -29
  98. package/dist/meter/root/meter-root.d.ts +22 -21
  99. package/dist/navigation/root/navigation-root.d.ts +13 -16
  100. package/dist/notifications/group/notification-group.d.ts +27 -28
  101. package/dist/notifications/notification/notification.d.ts +35 -42
  102. package/dist/notifications/root/notifications-root.d.ts +22 -24
  103. package/dist/number-input/root/number-input-root.d.ts +46 -50
  104. package/dist/object-inspector/root/object-inspector-root.d.ts +46 -58
  105. package/dist/option/group/option-group.d.ts +11 -11
  106. package/dist/option/root/option-root.d.ts +28 -33
  107. package/dist/outline/root/outline-root.d.ts +18 -17
  108. package/dist/pagination/root/pagination-root.d.ts +37 -39
  109. package/dist/pagination/size/pagination-size.d.ts +37 -43
  110. package/dist/pagination/summary/pagination-summary.d.ts +12 -14
  111. package/dist/pin-input/root/pin-input-root.d.ts +32 -38
  112. package/dist/popover/root/popover-root.d.ts +16 -21
  113. package/dist/progress/root/progress-root.d.ts +16 -14
  114. package/dist/qr-code/root/qr-code-root.d.ts +22 -25
  115. package/dist/quote/root/quote-root.d.ts +5 -6
  116. package/dist/radio/group/radio-group.d.ts +26 -28
  117. package/dist/radio/root/radio-root.d.ts +24 -28
  118. package/dist/rating/root/rating-root.d.ts +27 -30
  119. package/dist/scatter-chart/root/scatter-chart-root.d.ts +43 -55
  120. package/dist/scroll-area/root/scroll-area-root.d.ts +15 -21
  121. package/dist/select/root/select-root.d.ts +41 -44
  122. package/dist/skeleton/root/skeleton-root.d.ts +7 -8
  123. package/dist/skip-link/root/skip-link-root.d.ts +21 -28
  124. package/dist/slider/root/slider-root.d.ts +36 -39
  125. package/dist/sparkline/root/sparkline-root.d.ts +22 -28
  126. package/dist/speed-dial/item/speed-dial-item.d.ts +21 -21
  127. package/dist/speed-dial/root/speed-dial-root.d.ts +25 -27
  128. package/dist/splitter/root/splitter-root.d.ts +37 -41
  129. package/dist/stat/group/stat-group.d.ts +4 -4
  130. package/dist/stat/root/stat-root.d.ts +8 -9
  131. package/dist/steps/root/steps-root.d.ts +11 -14
  132. package/dist/steps/step/step.d.ts +22 -29
  133. package/dist/switch/root/switch-root.d.ts +20 -24
  134. package/dist/table/cell/table-cell.d.ts +18 -8
  135. package/dist/table/cell/table-cell.js +5 -1
  136. package/dist/table/column/table-column.d.ts +62 -55
  137. package/dist/table/root/table-root.d.ts +16 -17
  138. package/dist/table/row/table-row.d.ts +3 -3
  139. package/dist/tabs/panel/tab-panel.d.ts +3 -3
  140. package/dist/tabs/root/tabs-root.d.ts +19 -17
  141. package/dist/tabs/tab/tab.d.ts +6 -6
  142. package/dist/tag/root/tag-root.d.ts +11 -12
  143. package/dist/textarea/root/textarea-root.d.ts +29 -32
  144. package/dist/time-input/root/time-input-root.d.ts +70 -69
  145. package/dist/time-picker/root/time-picker-root.d.ts +58 -66
  146. package/dist/timeline/item/timeline-item.d.ts +18 -24
  147. package/dist/timeline/root/timeline-root.d.ts +13 -21
  148. package/dist/toast/item/toast-item.d.ts +21 -22
  149. package/dist/toast/root/toast-root.d.ts +18 -23
  150. package/dist/toggle/group/toggle-group.d.ts +23 -25
  151. package/dist/toggle/root/toggle-root.d.ts +8 -8
  152. package/dist/toolbar/root/toolbar-root.d.ts +7 -10
  153. package/dist/tooltip/root/tooltip-root.d.ts +41 -47
  154. package/dist/tour/root/tour-root.d.ts +24 -26
  155. package/dist/tour/stop/tour-stop.d.ts +39 -48
  156. package/dist/tree/item/tree-item.d.ts +23 -25
  157. package/dist/tree/root/tree-root.d.ts +13 -12
  158. package/dist/trend/root/trend-root.d.ts +18 -19
  159. package/dist/video/root/video-root.d.ts +108 -101
  160. package/dist/video-playlist/item/video-playlist-item.d.ts +23 -28
  161. package/dist/video-playlist/menu/video-playlist-menu.d.ts +17 -21
  162. package/dist/video-playlist/root/video-playlist-root.d.ts +21 -25
  163. package/dist/virtual-list/root/virtual-list-root.d.ts +27 -26
  164. package/package.json +5 -5
  165. package/types/jsx.d.ts +14011 -11983
  166. package/types/svelte.d.ts +10 -0
  167. 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 destinations.
5
+ * @summary A section of a navigation with a trigger that opens a panel of links.
6
6
  *
7
7
  * @description
8
- * **A disclosure, not a menu, and that is the whole design.** `role="menu"` and
9
- * `menuitem` are for an application's commands: they take over the arrow keys,
10
- * announce "menu" to a reader who asked for navigation, and put every link
11
- * inside a role that is not a link. This is a button that shows and hides a
12
- * region of the consumer's own anchors, which leaves a middle click, a modified
13
- * click and the status bar working. `Menu` remains right for a row of commands.
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
- * **It renders no links.** A router renders its own anchor and cannot render
16
- * one inside this shadow root, so the panel is a slot and what goes in it is
17
- * the lists and headings the consumer wrote.
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
- * **It opens on hover, and a press is always the fallback.** `open-on` says
20
- * which, and hover is the resting value because a nav bar is where a reader
21
- * expects to sweep along a row and see each section.
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: the consumer's own lists and headings.
30
- * @slot trigger - The control that opens it. Falls back to a button named by `label`.
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 - Fired before it closes, and cancelable.
33
- * @event {HelixBeforeOpenEvent} helix-before-open - Fired before it opens, and cancelable.
34
- * @event {Event} toggle - Says the state moved, carrying `newState` and `oldState`.
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, which is what opens.
37
- * @csspart trigger - The default trigger, where none was slotted.
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 - While the page is under `band-below`, so the panel is a band whether or not one was asked for.
42
- * @cssstate open - While the panel is open, which is when the trigger reads as current.
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, under which a card becomes a band. Zero never does.
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, which names the default trigger and the panel.
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 does.
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
- * Three shapes, one element, because a reader moving down a menu with the
8
- * arrow keys does not care which kind each row is and neither should the
9
- * markup. What it is follows from what it was given: something slotted into
10
- * `submenu` makes it a way in, `checked` makes it a choice, and neither makes
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
- * **The role follows the shape.** A row that can be ticked is
14
- * `menuitemcheckbox` and carries `aria-checked`, because a reader is told "one
15
- * of these is on" rather than "here is a button"; `exclusive` makes it
16
- * `menuitemradio`, for a set where only one can be. A row that opens a page
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
- * Whether it is on the page showing is set by the menu as a property, never as
20
- * an attribute: an attribute written onto a consumer's element after it
21
- * upgrades is a hydration mismatch waiting to happen.
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 - Before the label. A mark about the row.
30
- * @slot submenu - Rows this one opens, which makes it a way in.
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 - Fired when the row is chosen. Cancelable: refusing it takes the decision and nothing moves.
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 tick when checked, a caret when it opens
36
- * a page. One column, because a row is never both.
37
- * @csspart start - The leading column, which is a slot and is always there.
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 ticked.
51
+ * Whether the row is checked.
54
52
  */
55
53
  checked: boolean;
56
54
  /**
57
- * Whether the row can be chosen.
55
+ * Whether the row is disabled, so it cannot be chosen.
58
56
  */
59
57
  disabled: boolean;
60
58
  /**
61
- * Whether the link saves the file rather than opening it.
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 of the set it belongs to can be on.
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
- * Where the row goes, which makes it a real link.
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 this row is on the page currently showing.
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 relationship, which `target="_blank"` should always set.
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 the rows that should leave the page.
124
+ * Where the link opens, for rows that should open outside the current page.
127
125
  */
128
126
  target: string;
129
127
  /**
130
- * What this row stands for, carried in the event when it is chosen.
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
- * `NavigableItem`, so the arrow keys can be the shared controller's business.
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, which is the same act as pressing it. */
225
+ /** Chooses the row, the same as pressing it. */
227
226
  select(): void;
228
227
  /**
229
- * Whether this is the row the set is on, which in a menu is where focus is.
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, opened from a trigger.
5
+ * @summary A menu of commands that opens from a trigger.
6
6
  *
7
7
  * @description
8
- * The trigger is slotted and stays the consumer's own element, the same way the
9
- * tooltip takes one. The surface is rendered here, in the top layer through the
10
- * popover API, so it clears any ancestor with `overflow: hidden` without a
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
- * **It drills down rather than flying out.** A submenu replaces what is on
14
- * screen and a back row returns, instead of opening a second panel beside the
15
- * first. Panels beside panels need a diagonal path a pointer has to travel
16
- * without straying, they run off the edge of a narrow window, and on a touch
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 open page is held here rather than in each item, because only one page
21
- * shows at a time and something has to know which. Items are told by property,
22
- * not by attribute: an attribute written onto a consumer's element after it
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 - What opens it.
28
+ * @slot trigger - The control that opens the menu.
33
29
  *
34
- * @event {HelixBeforeCloseEvent} helix-before-close - Fired before it closes, and cancelable.
35
- * @event {HelixBeforeOpenEvent} helix-before-open - Fired before it opens, and cancelable.
36
- * @event {HelixSelectEvent} helix-select - Fired when an item is chosen. Cancelable: refusing it takes the decision and nothing moves.
37
- * @event {Event} toggle - Says the state moved, carrying `newState` and `oldState`.
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 - Shown when there are no items to show.
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 - The empty and loading lines again, in a region a screen reader hears when they change. Visually hidden in the styled tier.
44
- * @csspart loading - Shown while the items are still on their way.
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 - While a submenu's page is showing rather than the menu's own, so what is not a row can leave with the page it was on.
49
- * @cssstate mark - While a row on the page showing can be ticked or leads to a page, so the trailing column is held open for every row.
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 - While a row on the page showing has something in its leading column, so that column is held open for every row.
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
- * What the row returning from a submenu reads.
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
- * Preferred side.
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, and forgets which page was showing. */
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, and whether it is where you want it.
6
+ * @summary A measurement in a known range, with optional bands that mark it good, fair, or poor.
7
7
  *
8
8
  * @description
9
- * **Not `Progress`, and the difference is the whole component.** A progress bar
10
- * reports how far along a task is: it starts empty, ends full, and full is
11
- * always the good end. A meter reports a level in a range that is not going
12
- * anywhere, and which end is good is a fact about the thing measured. So there
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
- * **`low`, `high` and `optimum` are the reason it exists**, following the HTML
16
- * specification's own rule. The three cut the range into a low band, a middle
17
- * and a high band, and `optimum` says which is the one to be in; the band next
18
- * to it is fair and the one two away is poor.
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 it the value fills.
28
- * @csspart indicator-fair - The fill while the reading is in a band beside the good one, beside `indicator`.
29
- * @csspart indicator-good - The fill while the reading is in the good band, beside `indicator`.
30
- * @csspart indicator-over - The fill while the value is past the top, beside `indicator`.
31
- * @csspart indicator-poor - The fill while the reading is two bands from the good one, beside `indicator`.
32
- * @csspart indicator-under - The fill while the value is below the floor, beside `indicator`.
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, under `show-value`.
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
- * The band, said outright, where the three thresholds cannot say it.
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
- * Where in the range it is best to be.
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
- * What the reading says, where a number is not the whole story.
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>`, which is the landmark a screen-reader user jumps to.
8
- * It exists as its own component rather than as a region of `AppHeader` because
9
- * a header is not inherently navigation, and navigation is not only ever in a
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.** The consumer brings them, marked with
13
- * `aria-current="page"` and styled by the `data-navigation-item` recipe, for the same
14
- * reason nothing else here renders an anchor: a router renders its own, and
15
- * cannot render it inside this shadow root.
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
- * What this owns is the marker that travels between them, and that is the whole
18
- * reason it is a component. A marker that moves needs something that knows
19
- * where every item is, and reading `aria-current` is how it knows which: the
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 the consumer's own links.
26
+ * @slot - The destinations, as your own links.
30
27
  *
31
- * @csspart indicator - The marker that travels to the current destination.
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
- * Accessible name for the landmark.
34
+ * The landmark's name, read by screen readers.
38
35
  */
39
36
  label: string;
40
37
  private current;