@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
@@ -1,35 +1,28 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary The first stop on a page, which moves the reader past everything
5
- * repeated on every page.
4
+ * @summary A link at the start of a page that moves keyboard focus past the
5
+ * header to the main content.
6
6
  *
7
7
  * @description
8
- * A keyboard reader arriving on a page tabs through the whole header before
9
- * reaching anything the page is about, and does it again on the next page. This
10
- * is the control that skips it: first in the document, and pointed at the
11
- * content.
8
+ * Without a skip link, keyboard users tab through the whole header on every
9
+ * page before they reach the content. The skip link goes first in the document
10
+ * and points at the content.
12
11
  *
13
- * **It moves focus, not only the scroll position.** An in-page link on its own
14
- * scrolls to its target and leaves focus behind, so the next Tab goes to
15
- * whatever followed the link, which is the header it was meant to skip. Pressed,
16
- * this focuses the target. A target that cannot take focus, which is most of
17
- * them, since `<main>` cannot, is given `tabindex="-1"` for as long as it holds
18
- * focus and has it taken off again when focus leaves, so the page ends up as the
19
- * consumer wrote it.
12
+ * Pressing it moves focus as well as the scroll position. An in-page link alone
13
+ * scrolls but leaves focus behind, so the next Tab lands in the header. A
14
+ * target that cannot take focus, such as `<main>`, gets `tabindex="-1"` while
15
+ * it has focus, and the attribute is removed when focus leaves.
20
16
  *
21
- * **The address is left alone.** The press is handled rather than followed, so
22
- * no `#main` lands in the URL and no history entry is added, which matters to a
23
- * router reading the hash. The anchor is still a real anchor with a real
24
- * `href`, so before any script has run the link does what a plain link does:
25
- * it scrolls there and moves the point the next Tab starts from.
17
+ * The press is handled in script, so no `#main` is added to the URL and no
18
+ * history entry is created, and a router that reads the hash is not affected.
19
+ * The anchor has a real `href`, so before any script runs it works as a plain
20
+ * link: it scrolls to the target and moves the point the next Tab starts from.
26
21
  *
27
- * **Hidden until focused is the styled tier's**, being a decision about paint,
28
- * and on this tier the link is simply a link. A headless consumer hides
29
- * `::part(link)` while the host is not `:focus-within` and shows it when it is.
30
- * Hiding with `display: none` or `visibility: hidden` takes it out of the tab
31
- * order as well, and a skip link nobody can reach is the most common way one is
32
- * broken.
22
+ * The styled tier hides the link until it has focus. On this tier the link is
23
+ * always visible. To hide it yourself, hide `::part(link)` while the host is
24
+ * not `:focus-within`. Do not use `display: none` or `visibility: hidden`,
25
+ * because they also remove the link from the tab order.
33
26
  *
34
27
  * @since 0.1.0
35
28
  * @status stable
@@ -37,15 +30,15 @@ import { type TemplateResult } from 'lit';
37
30
  * @aliases Skip navigation, Skip to content
38
31
  * @documentation https://fusion.dev/helix/components/skip-link
39
32
  *
40
- * @slot - The link's words. Falls back to `label`.
33
+ * @slot - The link's text. Defaults to `label`.
41
34
  *
42
- * @csspart link - The anchor, which is what takes focus.
35
+ * @csspart link - The anchor. It takes the focus.
43
36
  */
44
37
  export declare class HelixHeadlessSkipLink extends HelixElement {
45
38
  /** Focus goes to the anchor inside, so the host is never the focus target. */
46
39
  static shadowRootOptions: ShadowRootInit;
47
40
  /**
48
- * Where the reader is sent, as an in-page fragment.
41
+ * The in-page fragment the link moves focus to, such as `#main`.
49
42
  *
50
43
  * `#main` by default, because that is the id the content region almost always
51
44
  * has; a page whose content is somewhere else says so. Anything that is not a
@@ -54,7 +47,7 @@ export declare class HelixHeadlessSkipLink extends HelixElement {
54
47
  */
55
48
  href: string;
56
49
  /**
57
- * The link's words, for the common case of plain text.
50
+ * The link's text, when it is plain text.
58
51
  *
59
52
  * The fallback of the default slot, so slotted content replaces it rather than
60
53
  * appearing beside it.
@@ -5,30 +5,27 @@ declare const HelixHeadlessSlider_base: (new (...args: any[]) => import("@fusion
5
5
  * @summary A value chosen from a range by dragging.
6
6
  *
7
7
  * @description
8
- * A real `<input type="range">`, so the drag, the arrow keys, Home and End, the
9
- * page keys and the touch target are the platform's. The last is the one nobody
10
- * notices: a native range has a hit area larger than its thumb, sized by the
11
- * platform for a finger.
8
+ * Renders a native `<input type="range">`, so the drag, the arrow keys, Home,
9
+ * End, the page keys, and the touch target come from the platform. A native
10
+ * range has a hit area larger than its thumb, sized for a finger.
12
11
  *
13
- * **The value is a string, like every other form control's.** A range submits
14
- * text and `MixinControllerValue` holds text, so the number is a reading of the
15
- * value. `valueAsNumber` is there for arithmetic.
12
+ * The value is a string, like every other form control's, and
13
+ * `MixinControllerValue` holds text. Use `valueAsNumber` for arithmetic.
16
14
  *
17
- * **Marks are drawn rather than left to `<datalist>`**, whose ticks cannot be
18
- * styled and which Firefox does not render for a range at all. A mark is
19
- * decoration; what a reader can land on is `step`, which the input enforces
20
- * whether or not anything is drawn. `markers` is a count rather than a flag, so
21
- * a slider from zero to a hundred cannot silently ask for a hundred and one.
15
+ * Marks are drawn by the component. The ticks of a `<datalist>` cannot be
16
+ * styled, and Firefox does not render them for a range. Marks are decoration.
17
+ * `step` sets where the value can land, and the input enforces it whether or
18
+ * not marks are drawn. `markers` is a count, so a slider from zero to a hundred
19
+ * does not draw a hundred and one marks by accident.
22
20
  *
23
- * **A range is two of them.** There is no native two-thumb range, so two are
24
- * stacked on one track and each thumb keeps its own.
21
+ * A range with two thumbs is two inputs stacked on one track, because there is
22
+ * no native two-thumb range. Each thumb keeps its own value.
25
23
  *
26
- * **`required` arrives with the field mixin and cannot fail here**, which is
27
- * worth saying rather than leaving a reader to find. A range is never empty:
28
- * the platform shows its own midpoint whatever is set, and `willUpdate` seeds
29
- * that midpoint into `defaultValue` so the value agrees with the handle from the
30
- * first render. HTML does not apply `required` to a range either, so it stays
31
- * off the control and the marker beside the label is all it does.
24
+ * `required` comes with the field mixin and cannot fail. A range is never
25
+ * empty: the platform shows its midpoint when no value is set, and `willUpdate`
26
+ * seeds that midpoint into `defaultValue`, so the value matches the handle from
27
+ * the first render. HTML does not apply `required` to a range either, so it is
28
+ * not set on the input. It only adds the marker beside the label.
32
29
  *
33
30
  * @since 0.1.0
34
31
  * @status stable
@@ -36,33 +33,33 @@ declare const HelixHeadlessSlider_base: (new (...args: any[]) => import("@fusion
36
33
  * @aliases Range, Range input
37
34
  * @documentation https://fusion.dev/helix/components/slider
38
35
  *
39
- * @event {Event} change - Relayed once the reader has let go.
40
- * @event {HelixBeforeChangeEvent} helix-before-change - Fired as the value changes, and cancelable.
41
- * @event {Event} input - Announced once the value has moved.
36
+ * @event {Event} change - Fired when the user releases the thumb.
37
+ * @event {HelixBeforeChangeEvent} helix-before-change - Fired as the value changes. Cancelable: call `preventDefault()` to keep the current value.
38
+ * @event {Event} input - Fired after the value changes.
42
39
  *
43
40
  * @csspart control - The range input.
44
- * @csspart feedback - What is wrong with it.
45
- * @csspart field - The row: the control and its readout.
46
- * @csspart hint - Help under the track, while nothing is wrong.
47
- * @csspart label - The question, over the track.
48
- * @csspart marker - One mark.
41
+ * @csspart feedback - The error message under the track.
42
+ * @csspart field - The row that holds the control and its readout.
43
+ * @csspart hint - The help text under the track, shown while there is no error.
44
+ * @csspart label - The label above the track.
45
+ * @csspart marker - One mark on the track.
49
46
  * @csspart marker-label - The value a mark stands at, when `marker-labels` is set.
50
47
  * @csspart markers - The row of marks along the track.
51
- * @csspart output - The current value, shown beside it.
48
+ * @csspart output - The current value, shown beside the track.
52
49
  *
53
50
  * @cssproperty --slider-fraction - The value as a fraction of the range, 0 to 1.
54
51
  * @cssproperty --slider-from - Where a range's filled span starts, as a fraction of the track, 0 to 1.
55
52
  * @cssproperty --slider-marker-at - Where one marker sits, as a percentage of the track.
56
53
  * @cssproperty --slider-to - Where a range's filled span ends, as a fraction of the track, 0 to 1.
57
54
  *
58
- * @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
55
+ * @cssstate invalid - The slider has an error to show, from the browser's validation or from your `feedback`.
59
56
  */
60
57
  export declare class HelixHeadlessSlider extends HelixHeadlessSlider_base {
61
58
  protected readonly aria: AriaForwardController;
62
59
  /** Typed or dragged, so every edit is announced. See `announcesInput`. */
63
60
  protected readonly announcesInput = true;
64
61
  /**
65
- * Whether each mark says which value it stands at.
62
+ * Shows the value at each mark.
66
63
  */
67
64
  markerLabels: boolean;
68
65
  /**
@@ -82,11 +79,11 @@ export declare class HelixHeadlessSlider extends HelixHeadlessSlider_base {
82
79
  */
83
80
  markers: number;
84
81
  /**
85
- * The largest value the reader can choose.
82
+ * The largest value that can be chosen.
86
83
  */
87
84
  max: number;
88
85
  /**
89
- * What the upper thumb of a range is called, after the slider's own label.
86
+ * The name of a range's upper thumb, read after the slider's label.
90
87
  *
91
88
  * **Named with the label rather than instead of it.** Each thumb was
92
89
  * `aria-label="${label} maximum"`, which overrode the `<label>` and read the
@@ -96,13 +93,13 @@ export declare class HelixHeadlessSlider extends HelixHeadlessSlider_base {
96
93
  */
97
94
  maximumLabel: string;
98
95
  /**
99
- * The smallest value the reader can choose.
96
+ * The smallest value that can be chosen.
100
97
  */
101
98
  min: number;
102
- /** What the lower thumb of a range is called, after the slider's own label. */
99
+ /** The name of a range's lower thumb, read after the slider's label. */
103
100
  minimumLabel: string;
104
101
  /**
105
- * Which way the track runs, `vertical` standing it on end.
102
+ * The direction the track runs. `vertical` stands it on end.
106
103
  *
107
104
  * For a level rather than a quantity: a fader, a channel, anything a reader
108
105
  * pictures as high and low rather than as less and more. Absent is
@@ -115,7 +112,7 @@ export declare class HelixHeadlessSlider extends HelixHeadlessSlider_base {
115
112
  */
116
113
  orientation?: 'horizontal' | 'vertical';
117
114
  /**
118
- * Whether there are two thumbs and the value is a pair.
115
+ * Adds a second thumb, so the value is a pair.
119
116
  *
120
117
  * The pair is one string, `"10,50"`, which is what a form submits and what
121
118
  * `MixinControllerValue` already holds. `valueAsNumber` reads the lower of
@@ -123,7 +120,7 @@ export declare class HelixHeadlessSlider extends HelixHeadlessSlider_base {
123
120
  */
124
121
  range: boolean;
125
122
  /**
126
- * Whether the chosen value is shown beside the track.
123
+ * Shows the chosen value beside the track.
127
124
  */
128
125
  showValue: boolean;
129
126
  /**
@@ -214,7 +211,7 @@ export declare class HelixHeadlessSlider extends HelixHeadlessSlider_base {
214
211
  private snapped;
215
212
  protected willUpdate(changed: PropertyValues): void;
216
213
  protected updated(changed: PropertyValues): void;
217
- /** How far one press of an arrow key moves it. */
214
+ /** How far one press of an arrow key moves the thumb. */
218
215
  step: number;
219
216
  protected render(): TemplateResult;
220
217
  }
@@ -1,35 +1,29 @@
1
1
  import { type Curve, HelixElement, SourceController } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary A line with no axes, for the shape of a series beside the number it belongs to.
4
+ * @summary A small chart with no axes that shows the shape of a series beside its number.
5
5
  *
6
6
  * @description
7
- * The one chart here that takes its numbers from an attribute, and the reversal
8
- * is deliberate. Every other chart reads a table because a reader might want to
9
- * interrogate it; nobody interrogates the squiggle next to a figure. A
10
- * fourteen-row table behind a bare trend line is fourteen dates read aloud in
11
- * place of the one sentence that carries the meaning, so `values` is the list
12
- * and `label` is the sentence.
7
+ * Takes its numbers from the `values` attribute. The other charts read a table,
8
+ * but a table behind a small trend line would be read aloud row by row. Set
9
+ * `values` to the data and `label` to the one sentence a screen reader
10
+ * announces.
13
11
  *
14
- * That is the library's own rule rather than a second data channel: a content
15
- * property is its slot's fallback, which is why `Tooltip` takes `content` and
16
- * `Avatar` takes `name`. `for` stays for the sparkline that genuinely has a
17
- * table behind it, and it wins where both are given.
12
+ * This follows the library's rule that a content property is the fallback for
13
+ * its slot, as with `Tooltip`'s `content` and `Avatar`'s `name`. Use `for` when
14
+ * a sparkline has a real table behind it. `for` wins when both are set.
18
15
  *
19
- * **No label means decorative, and that is a choice rather than an oversight.**
20
- * A sparkline beside a stat that already says "Sessions, 1,102" has nothing of
21
- * its own to announce, and an unnamed `role="img"` announces "graphic" and
22
- * stops. So an unlabeled sparkline is `aria-hidden`, and a labeled one is an
23
- * image named by its sentence.
16
+ * Without a `label` the sparkline is decorative and `aria-hidden`, for example
17
+ * beside a stat that already says "Sessions, 1,102". With a `label` it is an
18
+ * image named by that sentence.
24
19
  *
25
- * It goes *beside* a `Stat` rather than inside one: a change beside a figure is
26
- * a second fact, which is what `Stat`'s own spec says. `Trend` composes the same
27
- * way.
20
+ * Place it beside a `Stat`, because a change beside a figure is a second fact,
21
+ * as `Stat`'s own spec says. `Trend` is composed the same way.
28
22
  *
29
- * The properties below are written by this component and read by whoever draws
30
- * it. A consumer sets none of them: they carry a number this element computed
31
- * and CSS cannot, which is what lets a stylesheet on this tier draw the thing
32
- * without measuring anything itself.
23
+ * The component writes the properties listed below, and the stylesheet that
24
+ * draws the sparkline reads them. Do not set them yourself. They carry numbers
25
+ * the component computes and CSS cannot, so a stylesheet can draw the sparkline
26
+ * without measuring anything.
33
27
  *
34
28
  * @since 0.1.0
35
29
  * @status stable
@@ -38,8 +32,8 @@ import { type PropertyValues, type TemplateResult } from 'lit';
38
32
  * @documentation https://fusion.dev/helix/components/sparkline
39
33
  *
40
34
  * @csspart area - The region between the line and the bottom of its range.
41
- * @csspart bar - One column, under `plot="bar"`.
42
- * @csspart line - The path itself.
35
+ * @csspart bar - One column, drawn when `plot="bar"`.
36
+ * @csspart line - The line's path.
43
37
  * @csspart svg - The drawing.
44
38
  * @csspart terminus - The mark on the last value.
45
39
  * @csspart wash-end - The far stop of the area's gradient.
@@ -50,7 +44,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
50
44
  */
51
45
  export declare class HelixHeadlessSparkline extends HelixElement {
52
46
  /**
53
- * How the line gets from one reading to the next.
47
+ * How the line is drawn from one reading to the next.
54
48
  *
55
49
  * **`smooth` is the resting curve.** A straight segment asserts nothing about
56
50
  * the values between two readings and a curve invents them, which is why
@@ -79,7 +73,7 @@ export declare class HelixHeadlessSparkline extends HelixElement {
79
73
  */
80
74
  curve?: Curve;
81
75
  /**
82
- * The id of a table to read instead, when there is one behind the line.
76
+ * The id of a table to read the readings from, when a table holds the data.
83
77
  *
84
78
  * The first column of numbers is the series drawn. This wins over `values`,
85
79
  * because a table is the readable representation and a list of numbers in an
@@ -90,7 +84,7 @@ export declare class HelixHeadlessSparkline extends HelixElement {
90
84
  */
91
85
  for: string;
92
86
  /**
93
- * What the line says, in a sentence.
87
+ * A sentence that describes what the line shows.
94
88
  *
95
89
  * "Sessions rose from 1,240 to 1,318 and fell to 1,102 over fourteen days" is
96
90
  * the accessible representation of a sparkline, and a list of the fourteen
@@ -1,19 +1,16 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary One action in a speed dial: a mark, and a name beside it.
4
+ * @summary One action in a speed dial: an icon and a name beside it.
5
5
  *
6
6
  * @description
7
- * **A command, which is why this is a `menuitem` and a megamenu's rows are not.**
8
- * The distinction is what the thing does, not what it looks like: a megamenu
9
- * holds destinations, so it is a disclosure of links, and this holds actions a
10
- * screen can take, which is exactly what `role="menu"` was written for. The
11
- * roles follow the contents.
7
+ * Each item is a command, so it has the `menuitem` role. A megamenu holds
8
+ * destinations, so it is a disclosure of links. A speed dial holds actions,
9
+ * which is what `role="menu"` is for.
12
10
  *
13
- * **The name is text, not a title.** A dial's actions are icons, and an icon
14
- * with a `title` is an action whose name only exists for whoever hovers it long
15
- * enough. The label is rendered beside the mark and is the accessible name by
16
- * being there, so it is read, searched and translated like anything else.
11
+ * The name is text rendered beside the icon, and it is the accessible name. A
12
+ * `title` on an icon shows only on hover. Visible text is read, searched, and
13
+ * translated like other text.
17
14
  *
18
15
  * @since 0.1.0
19
16
  * @status stable
@@ -22,21 +19,21 @@ import { type TemplateResult } from 'lit';
22
19
  * @documentation https://fusion.dev/helix/components/speed-dial
23
20
  *
24
21
  * @slot - The action's name.
25
- * @slot icon - The mark, which is what a dial is read by.
22
+ * @slot icon - The action's icon, the main way the action is recognized.
26
23
  *
27
- * @event {HelixSelectEvent} helix-select - Fired when the action is chosen. Cancelable: refusing it takes the decision and nothing moves.
24
+ * @event {HelixSelectEvent} helix-select - The action was chosen. Cancelable: cancel it to keep the dial open.
28
25
  *
29
- * @csspart icon - The mark's box.
30
- * @csspart item - The control.
31
- * @csspart label - The name beside it.
26
+ * @csspart icon - The box that holds the icon.
27
+ * @csspart item - The control for the action.
28
+ * @csspart label - The action's name, beside the icon.
32
29
  */
33
30
  export declare class HelixHeadlessSpeedDialItem extends HelixElement {
34
31
  /**
35
- * Whether the action can be chosen.
32
+ * Whether the action is disabled, so it cannot be chosen.
36
33
  */
37
34
  disabled: boolean;
38
35
  /**
39
- * What this action stands for, carried in the event when it is chosen.
36
+ * The action's value, sent in `helix-select` when the action is chosen.
40
37
  */
41
38
  value: string;
42
39
  /**
@@ -45,14 +42,17 @@ export declare class HelixHeadlessSpeedDialItem extends HelixElement {
45
42
  * protected. Not a consumer's to read or set.
46
43
  */
47
44
  readonly isSpeedDialItem = true;
48
- /** Puts focus on the control inside, which is what a reader can reach. */
45
+ /** Puts focus on the control inside the item. */
49
46
  focus(): void;
50
- /** `NavigableItem`, so the arrow keys are the shared controller's business. */
47
+ /**
48
+ * Moves focus to the action. Part of `NavigableItem`, which the shared
49
+ * keyboard controller uses for the arrow keys.
50
+ */
51
51
  focusItem(): void;
52
- /** Chooses the action, which is the same act as pressing it. */
52
+ /** Chooses the action, the same as pressing it. */
53
53
  select(): void;
54
54
  /**
55
- * Whether this is the row the set is on, which here is where focus is.
55
+ * Whether the action has focus, which is what selected means in a speed dial.
56
56
  *
57
57
  * Asked of the document rather than of the shadow root: focus lands on the
58
58
  * control inside this element and the platform retargets it, so from outside
@@ -2,29 +2,26 @@ import { HelixElement, KeyboardNavigationController, type Placement, PopoverCont
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  declare const HelixHeadlessSpeedDial_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerOpenInterface) & typeof HelixElement;
4
4
  /**
5
- * @summary A button that fans out the few actions a screen is for.
5
+ * @summary A floating button that opens a short list of the main actions on a screen.
6
6
  *
7
7
  * @description
8
- * **A menu, and deliberately not a new one.** Its rows are commands, which is
9
- * what `role="menu"` and `menuitem` exist for, so this takes them and takes the
10
- * behavior with them: the arrow keys are `KeyboardNavigationController`, the
11
- * panel is `PopoverController`, and open and closed is `MixinControllerOpen`.
12
- * `Menu` is built from the same pieces. What is not shared is what actually
13
- * differs: a dial has no submenus, no headers, no checkable rows and no long
14
- * list to type ahead through, and shipping it as an appearance of `Menu` would
15
- * mean defining what a dial with a submenu in it does.
8
+ * A speed dial is a menu. Its items are commands, so it uses `role="menu"` and
9
+ * `menuitem`, and it is built from the same pieces as `Menu`:
10
+ * - `KeyboardNavigationController` for the arrow keys
11
+ * - `PopoverController` for the panel
12
+ * - `MixinControllerOpen` for open and closed
16
13
  *
17
- * **The trigger is a control the consumer slots**, and the floating action
18
- * button is the usual one: `IconButton` with `shape="circle"` and `raised`.
19
- * There is no `helix-fab`, because it would re-declare `emphasis`, `tone`,
20
- * `label` and a size around a control that already has all four. A round raised
21
- * button is a shape, and where it sits is `data-dock` in the base layer.
14
+ * It is a separate component because a speed dial has no submenus, headers,
15
+ * checkable items, or type-ahead.
22
16
  *
23
- * **Nothing is reserved from the keyboard.** A menu that drills has to keep the
24
- * horizontal pair for going in and coming back; a dial goes nowhere, so all four
25
- * arrows move through the actions and a reader who guesses either axis is
26
- * answered. That is the controller's own house position, and this is a component
27
- * with no reason to argue with it.
17
+ * You slot the trigger. The usual floating action button is `IconButton` with
18
+ * `shape="circle"` and `raised`. There is no `helix-fab`, because `IconButton`
19
+ * already has `emphasis`, `tone`, `label`, and a size. Position the button with
20
+ * `data-dock` in the base layer.
21
+ *
22
+ * All four arrow keys move through the actions, because a speed dial has no
23
+ * nested levels to reserve the horizontal pair for. This is the default
24
+ * behavior of the keyboard controller.
28
25
  *
29
26
  * @since 0.1.0
30
27
  * @status stable
@@ -33,21 +30,21 @@ declare const HelixHeadlessSpeedDial_base: (new (...args: any[]) => import("@fus
33
30
  * @documentation https://fusion.dev/helix/components/speed-dial
34
31
  *
35
32
  * @slot - The actions.
36
- * @slot trigger - The control that opens it. Falls back to a button named by `label`.
33
+ * @slot trigger - The control that opens the actions. Without one, a button named by `label` is drawn.
37
34
  *
38
- * @event {HelixBeforeCloseEvent} helix-before-close - Fired before it closes, and cancelable.
39
- * @event {HelixBeforeOpenEvent} helix-before-open - Fired before it opens, and cancelable.
40
- * @event {HelixSelectEvent} helix-select - Fired when an action is chosen. Dispatched by the action and listened for here, and the dial closes behind it once it has been heard. Cancelable: refusing it takes the decision and the dial stays open.
41
- * @event {Event} toggle - Says the state moved, carrying `newState` and `oldState`.
35
+ * @event {HelixBeforeCloseEvent} helix-before-close - The actions are about to close. Cancelable: cancel it to keep them open.
36
+ * @event {HelixBeforeOpenEvent} helix-before-open - The actions are about to open. Cancelable: cancel it to keep them closed.
37
+ * @event {HelixSelectEvent} helix-select - An action was chosen. The action sends the event, and the dial closes after it. Cancelable: cancel it to keep the dial open.
38
+ * @event {Event} toggle - The dial opened or closed. The event carries `newState` and `oldState`.
42
39
  *
43
40
  * @csspart actions - The region the actions are drawn in.
44
- * @csspart trigger - The default trigger, where none was slotted.
41
+ * @csspart trigger - The default trigger, drawn when none is slotted.
45
42
  *
46
43
  * @cssstate open - While the actions are out.
47
44
  */
48
45
  export declare class HelixHeadlessSpeedDial extends HelixHeadlessSpeedDial_base {
49
46
  /**
50
- * Names the trigger and the set of actions it opens.
47
+ * Accessible name for the trigger and the set of actions it opens.
51
48
  */
52
49
  label: string;
53
50
  /**
@@ -55,7 +52,8 @@ export declare class HelixHeadlessSpeedDial extends HelixHeadlessSpeedDial_base
55
52
  */
56
53
  offset: number;
57
54
  /**
58
- * Which way the actions fan out. They move if that side does not fit.
55
+ * The direction the actions open in. They move to another side if that side
56
+ * does not fit.
59
57
  *
60
58
  * Up by default, because the control this hangs off is usually docked to the
61
59
  * bottom of the window and there is nothing below it to fan into.