@fusion.dev/helix-headless 0.105.0 → 0.107.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 (162) hide show
  1. package/custom-elements.json +7324 -3890
  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 +52 -56
  30. package/dist/color-picker/root/color-picker-root.d.ts +49 -49
  31. package/dist/combobox/root/combobox-root.d.ts +52 -53
  32. package/dist/command/root/command-root.d.ts +35 -40
  33. package/dist/copy-button/root/copy-button-root.d.ts +24 -26
  34. package/dist/data-table/root/data-table-root.d.ts +106 -107
  35. package/dist/date-input/root/date-input-root.d.ts +54 -53
  36. package/dist/date-picker/root/date-picker-root.d.ts +25 -21
  37. package/dist/description-list/item/description-list-item.d.ts +7 -7
  38. package/dist/description-list/root/description-list-root.d.ts +10 -15
  39. package/dist/dialog/root/dialog-root.d.ts +22 -19
  40. package/dist/divider/root/divider-root.d.ts +12 -13
  41. package/dist/donut-chart/root/donut-chart-root.d.ts +19 -20
  42. package/dist/drawer/root/drawer-root.d.ts +19 -18
  43. package/dist/drilldown/item/drilldown-item.d.ts +28 -28
  44. package/dist/drilldown/root/drilldown-root.d.ts +22 -28
  45. package/dist/element-events.generated.js +7 -0
  46. package/dist/empty/root/empty-root.d.ts +16 -19
  47. package/dist/file-input/root/file-input-root.d.ts +32 -32
  48. package/dist/filter-input/chip/filter-chip.d.ts +36 -39
  49. package/dist/filter-input/field/filter-field.d.ts +25 -31
  50. package/dist/filter-input/menu/filter-menu.d.ts +50 -47
  51. package/dist/filter-input/operator/filter-operator.d.ts +15 -20
  52. package/dist/filter-input/root/filter-input-root.d.ts +80 -98
  53. package/dist/format-date/root/format-date-root.d.ts +19 -27
  54. package/dist/heatmap/root/heatmap-root.d.ts +40 -41
  55. package/dist/icon/root/icon-root.d.ts +21 -23
  56. package/dist/icon-button/root/icon-button-root.d.ts +12 -14
  57. package/dist/image/root/image-root.d.ts +30 -30
  58. package/dist/input/root/input-root.d.ts +36 -35
  59. package/dist/kbd/root/kbd-root.d.ts +13 -15
  60. package/dist/legend/root/legend-root.d.ts +18 -16
  61. package/dist/lightbox/item/lightbox-item.d.ts +13 -15
  62. package/dist/lightbox/root/lightbox-root.d.ts +40 -41
  63. package/dist/line-chart/root/line-chart-root.d.ts +20 -29
  64. package/dist/list/item/list-item.d.ts +17 -22
  65. package/dist/list/root/list-root.d.ts +6 -7
  66. package/dist/listbox/root/listbox-root.d.ts +42 -41
  67. package/dist/loader/root/loader-root.d.ts +16 -20
  68. package/dist/map/area/map-area.d.ts +6 -0
  69. package/dist/map/area/map-area.js +3 -0
  70. package/dist/map/buildings/map-buildings.d.ts +45 -0
  71. package/dist/map/buildings/map-buildings.js +37 -0
  72. package/dist/map/contours/map-contours.d.ts +61 -0
  73. package/dist/map/contours/map-contours.js +54 -0
  74. package/dist/map/index.d.ts +7 -0
  75. package/dist/map/index.js +5 -0
  76. package/dist/map/landcover/map-landcover.d.ts +47 -0
  77. package/dist/map/landcover/map-landcover.js +37 -0
  78. package/dist/map/marker/map-marker.d.ts +11 -4
  79. package/dist/map/marker/map-marker.js +13 -1
  80. package/dist/map/points/map-points.d.ts +7 -1
  81. package/dist/map/points/map-points.js +3 -0
  82. package/dist/map/raster/map-raster.d.ts +84 -0
  83. package/dist/map/raster/map-raster.js +96 -0
  84. package/dist/map/root/map-root.d.ts +169 -7
  85. package/dist/map/root/map-root.js +352 -4
  86. package/dist/map/route/map-route.d.ts +6 -0
  87. package/dist/map/route/map-route.js +3 -0
  88. package/dist/map/terrain/map-terrain.d.ts +68 -0
  89. package/dist/map/terrain/map-terrain.js +58 -0
  90. package/dist/megamenu/root/megamenu-root.d.ts +27 -25
  91. package/dist/menu/item/menu-item.d.ts +30 -31
  92. package/dist/menu/root/menu-root.d.ts +25 -29
  93. package/dist/meter/root/meter-root.d.ts +22 -21
  94. package/dist/navigation/root/navigation-root.d.ts +13 -16
  95. package/dist/notifications/group/notification-group.d.ts +27 -28
  96. package/dist/notifications/notification/notification.d.ts +35 -42
  97. package/dist/notifications/root/notifications-root.d.ts +22 -24
  98. package/dist/number-input/root/number-input-root.d.ts +46 -50
  99. package/dist/object-inspector/root/object-inspector-root.d.ts +46 -58
  100. package/dist/option/group/option-group.d.ts +11 -11
  101. package/dist/option/root/option-root.d.ts +28 -33
  102. package/dist/outline/root/outline-root.d.ts +18 -17
  103. package/dist/pagination/root/pagination-root.d.ts +37 -39
  104. package/dist/pagination/size/pagination-size.d.ts +37 -43
  105. package/dist/pagination/summary/pagination-summary.d.ts +12 -14
  106. package/dist/pin-input/root/pin-input-root.d.ts +32 -38
  107. package/dist/popover/root/popover-root.d.ts +16 -21
  108. package/dist/progress/root/progress-root.d.ts +16 -14
  109. package/dist/qr-code/root/qr-code-root.d.ts +22 -25
  110. package/dist/quote/root/quote-root.d.ts +5 -6
  111. package/dist/radio/group/radio-group.d.ts +26 -28
  112. package/dist/radio/root/radio-root.d.ts +24 -28
  113. package/dist/rating/root/rating-root.d.ts +27 -30
  114. package/dist/scatter-chart/root/scatter-chart-root.d.ts +43 -55
  115. package/dist/scroll-area/root/scroll-area-root.d.ts +15 -21
  116. package/dist/select/root/select-root.d.ts +41 -44
  117. package/dist/skeleton/root/skeleton-root.d.ts +7 -8
  118. package/dist/skip-link/root/skip-link-root.d.ts +21 -28
  119. package/dist/slider/root/slider-root.d.ts +36 -39
  120. package/dist/sparkline/root/sparkline-root.d.ts +22 -28
  121. package/dist/speed-dial/item/speed-dial-item.d.ts +21 -21
  122. package/dist/speed-dial/root/speed-dial-root.d.ts +25 -27
  123. package/dist/splitter/root/splitter-root.d.ts +37 -41
  124. package/dist/stat/group/stat-group.d.ts +4 -4
  125. package/dist/stat/root/stat-root.d.ts +8 -9
  126. package/dist/steps/root/steps-root.d.ts +11 -14
  127. package/dist/steps/step/step.d.ts +22 -29
  128. package/dist/switch/root/switch-root.d.ts +20 -24
  129. package/dist/table/cell/table-cell.d.ts +18 -8
  130. package/dist/table/cell/table-cell.js +5 -1
  131. package/dist/table/column/table-column.d.ts +62 -55
  132. package/dist/table/root/table-root.d.ts +16 -17
  133. package/dist/table/row/table-row.d.ts +3 -3
  134. package/dist/tabs/panel/tab-panel.d.ts +3 -3
  135. package/dist/tabs/root/tabs-root.d.ts +19 -17
  136. package/dist/tabs/tab/tab.d.ts +6 -6
  137. package/dist/tag/root/tag-root.d.ts +11 -12
  138. package/dist/textarea/root/textarea-root.d.ts +29 -32
  139. package/dist/time-input/root/time-input-root.d.ts +70 -69
  140. package/dist/time-picker/root/time-picker-root.d.ts +58 -66
  141. package/dist/timeline/item/timeline-item.d.ts +18 -24
  142. package/dist/timeline/root/timeline-root.d.ts +13 -21
  143. package/dist/toast/item/toast-item.d.ts +21 -22
  144. package/dist/toast/root/toast-root.d.ts +18 -23
  145. package/dist/toggle/group/toggle-group.d.ts +23 -25
  146. package/dist/toggle/root/toggle-root.d.ts +8 -8
  147. package/dist/toolbar/root/toolbar-root.d.ts +7 -10
  148. package/dist/tooltip/root/tooltip-root.d.ts +41 -47
  149. package/dist/tour/root/tour-root.d.ts +24 -26
  150. package/dist/tour/stop/tour-stop.d.ts +39 -48
  151. package/dist/tree/item/tree-item.d.ts +23 -25
  152. package/dist/tree/root/tree-root.d.ts +13 -12
  153. package/dist/trend/root/trend-root.d.ts +18 -19
  154. package/dist/video/root/video-root.d.ts +108 -101
  155. package/dist/video-playlist/item/video-playlist-item.d.ts +23 -28
  156. package/dist/video-playlist/menu/video-playlist-menu.d.ts +17 -21
  157. package/dist/video-playlist/root/video-playlist-root.d.ts +21 -25
  158. package/dist/virtual-list/root/virtual-list-root.d.ts +27 -26
  159. package/package.json +5 -5
  160. package/types/jsx.d.ts +10363 -9520
  161. package/types/svelte.d.ts +5 -0
  162. package/types/vue.d.ts +1440 -1032
@@ -1,31 +1,31 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary A named run of options inside a listbox.
4
+ * @summary A labeled group of options inside a listbox.
5
5
  *
6
6
  * @description
7
- * A heading over a set, and nothing else: it holds no selection and no value,
8
- * because grouping is presentation over a list whose owner is the listbox. Its
9
- * options are still the listbox's options, which is what keeps the keyboard
10
- * moving through a grouped list exactly as it moves through a flat one.
7
+ * A heading over a set of options. The group holds no selection and no value,
8
+ * because the listbox owns those. Its options are still the listbox's options,
9
+ * so the keyboard moves through a grouped list the same way as a flat one.
11
10
  *
12
- * `role="group"` named by the heading, so a screen reader announces which run
13
- * an option is in without the heading becoming something to land on.
11
+ * The group has `role="group"` and takes its name from the heading, so a screen
12
+ * reader announces which group an option is in, and the heading is not a stop
13
+ * of its own.
14
14
  *
15
15
  * @since 0.1.0
16
16
  * @status stable
17
17
  * @aliases OptGroup, Section
18
18
  * @documentation https://fusion.dev/helix/components/option
19
19
  *
20
- * @slot - The options in this run.
21
- * @slot label - Richer than a string.
20
+ * @slot - The options in the group.
21
+ * @slot label - The group's heading, for a heading that needs more than plain text.
22
22
  *
23
- * @csspart items - The run itself.
23
+ * @csspart items - The element that holds the group's options.
24
24
  * @csspart label - The heading.
25
25
  */
26
26
  export declare class HelixHeadlessOptionGroup extends HelixElement {
27
27
  /**
28
- * The heading over the run.
28
+ * The heading above the group's options.
29
29
  */
30
30
  label: string;
31
31
  protected willUpdate(changed: PropertyValues): void;
@@ -21,24 +21,18 @@ export declare const optionsAmong: (elements: readonly Element[]) => HelixHeadle
21
21
  * @summary One choice in a listbox.
22
22
  *
23
23
  * @description
24
- * **Its own family rather than a part of Select, and the reason is what it
25
- * belongs to.** `role="option"` requires an owning `role="listbox"`, which is
26
- * the ARIA contract: an option cannot stand alone. But a Select is *a listbox
27
- * with a trigger*, a Combobox is *a listbox with a text input*, and a command
28
- * palette is the same listbox again. The thing an option belongs to is the
29
- * listbox, not any one control that happens to contain one.
24
+ * Options are their own family, separate from Select, because an option belongs
25
+ * to a listbox and several controls contain one. `role="option"` requires an
26
+ * owning `role="listbox"`. A Select is a listbox with a trigger, a Combobox is
27
+ * a listbox with a text input, and a command palette is a listbox in a dialog.
28
+ * `Radio` is a part of its group, because a radio has only one kind of owner.
30
29
  *
31
- * That is the difference from `Radio`, which is a part of its group: a radio
32
- * has exactly one kind of owner, and an option has several.
30
+ * Selection works the way it does for a radio. Choosing an option dispatches an
31
+ * event, the listbox decides whether the choice stands, and the listbox sets
32
+ * `selected`.
33
33
  *
34
- * Selection is announced rather than applied, the way a radio's is. The option
35
- * says it was chosen, the listbox decides whether that stands, and the listbox
36
- * writes `selected` back. An option that selected itself would be a second
37
- * answer to which one is chosen.
38
- *
39
- * **Nothing here knows about filtering.** A hidden option is hidden by whatever
40
- * owns it, through `hidden`, because what counts as a match is the listbox's
41
- * question and differs between a select and a command palette.
34
+ * Filtering belongs to the owner, which hides an option with `hidden`. What
35
+ * counts as a match differs between a select and a command palette.
42
36
  *
43
37
  * @since 0.1.0
44
38
  * @status stable
@@ -46,18 +40,18 @@ export declare const optionsAmong: (elements: readonly Element[]) => HelixHeadle
46
40
  * @aliases Item, Choice
47
41
  * @documentation https://fusion.dev/helix/components/option
48
42
  *
49
- * @slot - The words naming this choice.
50
- * @slot end - After them, for a shortcut or a count.
51
- * @slot start - Before the words, for an icon or an avatar.
43
+ * @slot - The option's label.
44
+ * @slot end - Content after the label, such as a shortcut or a count.
45
+ * @slot start - Content before the label, such as an icon or an avatar.
52
46
  *
53
- * @event {HelixSelectEvent} helix-select - Fired when this choice is made. Cancelable: refusing it takes the decision and nothing moves.
47
+ * @event {HelixSelectEvent} helix-select - The option was chosen. Cancelable: canceling it leaves the selection as it was.
54
48
  *
55
- * @csspart description - The caption under the words, when there is one.
49
+ * @csspart description - The description under the label, when there is one.
56
50
  * @csspart item - The row.
57
- * @csspart item-active - The row the keyboard is on, beside `item`.
58
- * @csspart item-selected - The row of a chosen option, beside `item`.
59
- * @csspart label - The words.
60
- * @csspart text - The words and the caption under them, as one column.
51
+ * @csspart item-active - The row the keyboard is on. Set alongside `item`.
52
+ * @csspart item-selected - The row of a selected option. Set alongside `item`.
53
+ * @csspart label - The option's label.
54
+ * @csspart text - The label and the description under it, as one column.
61
55
  *
62
56
  * @cssstate selected - While the option is chosen.
63
57
  */
@@ -69,7 +63,8 @@ export declare class HelixHeadlessOption extends HelixElement {
69
63
  */
70
64
  active: boolean;
71
65
  /**
72
- * A second destination for this row, taken with the modifier held.
66
+ * A second destination for the row, opened when you choose it with the
67
+ * modifier key held.
73
68
  *
74
69
  * **An attribute rather than a second row, which is the whole point.** A
75
70
  * palette that offered every component a reference page and a sandbox as
@@ -86,7 +81,7 @@ export declare class HelixHeadlessOption extends HelixElement {
86
81
  */
87
82
  alternate: string;
88
83
  /**
89
- * What the second destination is, for a reader who cannot see the footer.
84
+ * The name of the second destination, announced to screen reader users.
90
85
  *
91
86
  * A row with two destinations needs both said, or a screen reader is told
92
87
  * about one of them and the other is a key nobody mentioned. It goes to
@@ -96,7 +91,7 @@ export declare class HelixHeadlessOption extends HelixElement {
96
91
  */
97
92
  alternateLabel: string;
98
93
  /**
99
- * Whether the markup declared this one chosen, which is what a reset returns to.
94
+ * Whether the markup declares this option selected. A form reset returns to it.
100
95
  *
101
96
  * `<option selected>` reflects to `defaultSelected` and `option.selected` is
102
97
  * live state that does not reflect, and those are two different facts. This
@@ -125,7 +120,7 @@ export declare class HelixHeadlessOption extends HelixElement {
125
120
  get defaultSelected(): boolean;
126
121
  set defaultSelected(next: boolean);
127
122
  /**
128
- * A second line under the words, for what the choice actually is.
123
+ * A second line under the label that describes the choice.
129
124
  *
130
125
  * A palette row reads better as a name and a caption than as one sentence
131
126
  * carrying both: "Helix" and "the design system" are two facts, and a comma
@@ -147,7 +142,7 @@ export declare class HelixHeadlessOption extends HelixElement {
147
142
  */
148
143
  description?: string;
149
144
  /**
150
- * Whether this choice can be made.
145
+ * Prevents the option from being chosen.
151
146
  */
152
147
  disabled: boolean;
153
148
  /**
@@ -166,11 +161,11 @@ export declare class HelixHeadlessOption extends HelixElement {
166
161
  */
167
162
  selected: boolean;
168
163
  /**
169
- * Identifies this choice, and is what a form submits.
164
+ * The value that identifies the option, and that a form submits.
170
165
  */
171
166
  value: string;
172
167
  /**
173
- * The words, for a listbox that has to match text against them.
168
+ * The option's text, which a listbox matches typed text against.
174
169
  *
175
170
  * Read from the rendered content rather than required as a property, because
176
171
  * the content is where a consumer naturally puts it and asking for both is
@@ -208,7 +203,7 @@ export declare class HelixHeadlessOption extends HelixElement {
208
203
  * it is in every comparison too.
209
204
  */
210
205
  get text(): string;
211
- /** Makes this choice and announces it. */
206
+ /** Sends `helix-select` for this option. Does nothing when it is disabled. */
212
207
  select(): void;
213
208
  /**
214
209
  * Mirrors the chosen state where a stylesheet can select on it.
@@ -1,20 +1,20 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary Links to the headings on this page, marking the one being read.
4
+ * @summary Links to the headings on the page, with the section in view marked.
5
5
  *
6
6
  * @description
7
- * A table of contents, named for the job. It sits beside `Navigation`, which is
8
- * the same job at the other scale: one navigates a site, the other a document.
7
+ * Outline is a table of contents for a document. `Navigation` does the same job
8
+ * for a site.
9
9
  *
10
- * **The links are the consumer's own anchors.** A router renders its own `<a>`
11
- * and cannot render one inside this shadow root, and the hrefs are fragments
12
- * the page already knows.
10
+ * The links are your own anchors. A router renders its own `<a>` and cannot
11
+ * render one inside the outline's shadow root, and the hrefs are fragments on
12
+ * the same page.
13
13
  *
14
- * **What is current is decided by position, not by intersection.** An
15
- * `IntersectionObserver` with a band near the top fails in both directions:
16
- * with headings far apart nothing is in the band and the marker goes out, and
17
- * with headings close together several are in it at once.
14
+ * The current section is decided by the headings' positions. An
15
+ * `IntersectionObserver` with a band near the top fails both ways: when
16
+ * headings are far apart, none is in the band and no section is marked, and
17
+ * when they are close together, several are in the band at once.
18
18
  *
19
19
  * @since 0.1.0
20
20
  * @status stable
@@ -24,15 +24,15 @@ import { type PropertyValues, type TemplateResult } from 'lit';
24
24
  *
25
25
  * @slot - The links, as anchors with fragment hrefs.
26
26
  *
27
- * @event {HelixActivateEvent} helix-activate - The section being read has changed, carrying its id as the value. An announcement: it is read off where the page is scrolled to, so there is no decision here to take.
27
+ * @event {HelixActivateEvent} helix-activate - Fired when the section in view changes, with its id as the value. It reports the scroll position and cannot be prevented.
28
28
  *
29
- * @csspart indicator - The mark that travels to the section being read.
29
+ * @csspart indicator - The mark that moves to the section in view.
30
30
  * @csspart nav - The navigation landmark.
31
31
  */
32
32
  export declare class HelixHeadlessOutline extends HelixElement {
33
33
  private readonly indicator;
34
34
  /**
35
- * How a click on one of these links travels to its section.
35
+ * How the page scrolls to a section when its link is clicked.
36
36
  *
37
37
  * The platform's own vocabulary, because this is the platform's own option:
38
38
  * `auto` defers to whatever `scroll-behavior` the page has set on its scroll
@@ -54,12 +54,13 @@ export declare class HelixHeadlessOutline extends HelixElement {
54
54
  */
55
55
  behavior: ScrollBehavior;
56
56
  /**
57
- * Accessible name for the navigation.
57
+ * The navigation's name, read by screen readers.
58
58
  */
59
59
  label: string;
60
60
  /**
61
- * How far below the top of what scrolls a heading counts as reached, in
62
- * pixels: the window, or the panel the sections scroll in.
61
+ * How far below the top of the scroll container a heading counts as reached,
62
+ * in pixels. The scroll container is the window or the panel the sections
63
+ * scroll in.
63
64
  *
64
65
  * The reading line. A page with a sticky masthead sets this to its height, or
65
66
  * a little more: without it the current section changes as a heading slides
@@ -67,7 +68,7 @@ export declare class HelixHeadlessOutline extends HelixElement {
67
68
  */
68
69
  offset: number;
69
70
  /**
70
- * The id of the section being read, or empty before anything is measured.
71
+ * The id of the section in view, or empty before anything is measured.
71
72
  *
72
73
  * Read-only, and a getter rather than a property for that reason: it is
73
74
  * derived from where the page is scrolled to, so a consumer setting it would
@@ -1,37 +1,32 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary Moves between pages of a longer result.
4
+ * @summary Controls for moving between the pages of a long set of results.
5
5
  *
6
6
  * @description
7
- * **The component is the truncation.** Given a page and a total it works out
8
- * which numbers to show and where the runs break, so this is data-driven rather
9
- * than composed: `<helix-headless-pagination page="4" pages="12">` rather than
10
- * twelve slotted children a consumer keeps in step with their own query.
7
+ * Set a page and a total, and the component works out which page numbers to
8
+ * show and where the gaps go:
9
+ * `<helix-headless-pagination page="4" pages="12">`. You do not slot a child
10
+ * for each page.
11
11
  *
12
- * **The width does not change as you page.** The run around the current page is
13
- * `siblings` either side, and grows to absorb a gap slot at a boundary, so the
14
- * control holds the same number of slots from the first page to the last.
15
- * Anything that lets the count vary moves the buttons under the pointer between
16
- * one click and the next.
12
+ * The width stays the same as you page. The run around the current page is
13
+ * `siblings` on each side and grows to absorb a gap at either end, so the
14
+ * control shows the same number of slots from the first page to the last, and
15
+ * the buttons do not move under the pointer.
17
16
  *
18
- * **A gap is only drawn where it hides more than one page, and a gap is a
19
- * control.** It goes to the middle of the run it stands over, which is the
20
- * binary-search step: any page in a set of any size is a handful of presses.
17
+ * A gap appears only where it hides more than one page. A gap is a control: it
18
+ * goes to the middle of the pages it hides, so any page is a few presses away.
21
19
  *
22
- * **`href` is what makes these links.** Set it and every page renders an `<a>`
23
- * with `{page}` filled in, so the output is crawlable, a middle click opens a
24
- * tab, and the address bar is the state. Left unset they are buttons, which is
25
- * right for a table paging in place. Either way the click announces
26
- * `helix-navigate` first, and `preventDefault()` stops the navigation as well
27
- * as the change, which is how a router takes over.
20
+ * Set `href` to render every page as an `<a>`, with `{page}` replaced by the
21
+ * page number. The links can be crawled, a middle click opens a tab, and the
22
+ * address bar holds the state. Without `href` the pages are buttons, for a
23
+ * table that pages in place. Either way, a click dispatches `helix-navigate`
24
+ * first. Call `preventDefault()` to stop both the navigation and the page
25
+ * change, for example to hand navigation to a router. There is no
26
+ * `helix-change`, because moving to another page selects nothing.
28
27
  *
29
- * **`helix-navigate` and not `helix-change`.** Moving to page four chooses
30
- * nothing; it moves the view over a result that has not changed.
31
- *
32
- * **The count and the page-size control are their own elements.**
33
- * `Pagination.Summary` and `Pagination.Size` sit beside this one, because a
34
- * slot can only offer one place: at one end of one row, in one order.
28
+ * `Pagination.Summary` and `Pagination.Size` are separate elements that you
29
+ * place beside this one, so you choose where they go and in what order.
35
30
  *
36
31
  * @since 0.1.0
37
32
  * @status stable
@@ -44,22 +39,22 @@ import { type PropertyValues, type TemplateResult } from 'lit';
44
39
  * @slot next-icon - The glyph on the forward-one-page control, usually a caret.
45
40
  * @slot previous-icon - The glyph on the back-one-page control, usually a caret.
46
41
  *
47
- * @event {HelixNavigateEvent} helix-navigate - Fired before the page changes, and cancelable. The only way to refuse one.
42
+ * @event {HelixNavigateEvent} helix-navigate - Fired before the page changes, and cancelable. Canceling it is the only way to stop a page change.
48
43
  *
49
44
  * @csspart first - The control that jumps to the first page, under `ends`.
50
- * @csspart gap - The control standing over pages not shown, which jumps into them.
45
+ * @csspart gap - The control in place of hidden pages, which jumps into them.
51
46
  * @csspart item - One slot in the run, holding a page or a gap.
52
47
  * @csspart last - The control that jumps to the last page, under `ends`.
53
48
  * @csspart list - The run of pages.
54
- * @csspart live - The region that says the page changed. Clipped, not hidden.
55
- * @csspart mark - The glyph on a first, previous, next or last control, where none is slotted.
49
+ * @csspart live - The live region that announces a page change. It is clipped out of view and still read.
50
+ * @csspart mark - The glyph on a first, previous, next, or last control, where none is slotted.
56
51
  * @csspart next - The control that moves forward one page.
57
52
  * @csspart page - The control for one page.
58
53
  * @csspart page-current - The page you are on, beside `page`.
59
54
  * @csspart previous - The control that moves back one page.
60
- * @csspart status - The reading of where you are, in `compact`.
55
+ * @csspart status - The text that says which page you are on, in `compact`.
61
56
  *
62
- * @cssstate empty - While there is one page or none, which is nothing to page through.
57
+ * @cssstate empty - There is one page or none, so there is nothing to page through.
63
58
  */
64
59
  export declare class HelixHeadlessPagination extends HelixElement {
65
60
  /**
@@ -67,7 +62,8 @@ export declare class HelixHeadlessPagination extends HelixElement {
67
62
  */
68
63
  boundaries: number;
69
64
  /**
70
- * Where the numbers are replaced by a reading of the two.
65
+ * Replaces the page numbers with the current page and the page count, as
66
+ * written by `status-label`.
71
67
  *
72
68
  * A different structure rather than a different look, which is why it is
73
69
  * here: the run of pages is gone and a single status line stands in its
@@ -79,11 +75,11 @@ export declare class HelixHeadlessPagination extends HelixElement {
79
75
  */
80
76
  compact: boolean;
81
77
  /**
82
- * Page to open on, where nothing declared one.
78
+ * The page to open on when `page` is not set.
83
79
  */
84
80
  defaultPage: number;
85
81
  /**
86
- * Whether to offer a jump to the first and last pages.
82
+ * Shows controls that jump to the first and last pages.
87
83
  *
88
84
  * Off by default. The gaps already reach any page in a few presses and the
89
85
  * last page is one of the two the run always shows, so on a short set these
@@ -102,11 +98,11 @@ export declare class HelixHeadlessPagination extends HelixElement {
102
98
  */
103
99
  firstLabel: string;
104
100
  /**
105
- * Accessible name for a gap, with `{page}` filled in as where it goes.
101
+ * Accessible name for a gap. `{page}` is replaced with the page it jumps to.
106
102
  */
107
103
  gapLabel: string;
108
104
  /**
109
- * Address for a page, with `{page}` standing in for its number.
105
+ * The URL for each page. `{page}` is replaced with the page number.
110
106
  *
111
107
  * Absent renders buttons. Present renders links, which is what a paged result
112
108
  * with its own URL should be: a crawler follows them, a middle click opens
@@ -140,7 +136,7 @@ export declare class HelixHeadlessPagination extends HelixElement {
140
136
  */
141
137
  nextLabel: string;
142
138
  /**
143
- * The page on show, one-based.
139
+ * The current page, counting from one.
144
140
  *
145
141
  * An accessor pair, the same shape as the calendar's `month`. Reading gives
146
142
  * the page on show; writing sets it, and `default-page` seeds one the element
@@ -158,7 +154,8 @@ export declare class HelixHeadlessPagination extends HelixElement {
158
154
  get page(): number;
159
155
  set page(next: number);
160
156
  /**
161
- * Accessible name for one page, with `{page}` and `{pages}` filled in.
157
+ * Accessible name for one page. `{page}` and `{pages}` are replaced with the
158
+ * page number and the page count.
162
159
  */
163
160
  pageLabel: string;
164
161
  /**
@@ -190,7 +187,8 @@ export declare class HelixHeadlessPagination extends HelixElement {
190
187
  */
191
188
  siblings: number;
192
189
  /**
193
- * The reading shown in `compact`, with `{page}` and `{pages}` filled in.
190
+ * The text shown in `compact`. `{page}` and `{pages}` are replaced with the
191
+ * current page and the page count.
194
192
  *
195
193
  * No noun: the landmark this sits in is already named "Pagination", so
196
194
  * "Page 7 of 24" says it twice to a screen reader and takes a third of the
@@ -3,68 +3,62 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
3
3
  import '../../option/index.js';
4
4
  import '../../select/index.js';
5
5
  /**
6
- * @summary Chooses how many items a page holds.
6
+ * @summary A control for choosing how many items each page shows.
7
7
  *
8
8
  * @description
9
- * Its own element beside `Pagination` rather than a slot inside it, for the
10
- * reason `Pagination.Summary` is: a footer's direction and order are the
11
- * consumer's, and a control that can only sit at one end of one row has taken
12
- * that decision for them.
9
+ * A separate element that you place beside `Pagination`, like
10
+ * `Pagination.Summary`, so you choose the direction and order of your footer.
13
11
  *
14
- * **`Select`, not a native `<select>`.** Two dropdowns identical closed and
15
- * different open meet each other in the same footer as a table's filters. The
16
- * caret is `Select`'s rather than a color literal baked into a data URI,
17
- * because a background image cannot read `currentColor`, and the label is a
18
- * real `<label for>` against the trigger's own id.
12
+ * It uses `Select`, so it matches a table's filter dropdowns in the same
13
+ * footer, both open and closed. The caret is `Select`'s, so it follows
14
+ * `currentColor`, and the label is a real `<label for>` pointing at the
15
+ * trigger's id.
19
16
  *
20
- * **The label sits on the row, not above it.** `Select`'s host is a column, and
21
- * an outer-tree rule beats a `:host` rule, so turning it into a row needs no
22
- * property on `Select` and nothing written into the consumer's markup.
17
+ * The label sits on the same row as the select. `Select`'s host is a column,
18
+ * and an outer-tree rule overrides a `:host` rule, so the row layout needs no
19
+ * property on `Select` and nothing added to your markup.
23
20
  *
24
- * **An empty `sizes` renders nothing**, rather than falling back to the
25
- * built-in list, which would be a component overruling a consumer who said
26
- * "none". Same rule as `Pagination` over a single page, and reported the same
27
- * way, through `ElementInternals.states` rather than an attribute the server
28
- * never wrote.
21
+ * An empty `sizes` renders nothing and does not fall back to the built-in list.
22
+ * `Pagination` does the same with a single page, and both report it through
23
+ * `ElementInternals.states`.
29
24
  *
30
- * `value` is the size the control holds and `default-value` is what the markup
31
- * declared.
32
- * Changing it announces `helix-before-change`; re-querying and moving back to
33
- * page one is the consumer's, because only they know whether the reader's
34
- * position should survive it.
25
+ * `value` is the current size, and `default-value` is the size from the markup.
26
+ * Changing it dispatches `helix-before-change`. Re-querying and returning to
27
+ * page one is up to you, because only you know whether the current position
28
+ * should be kept.
35
29
  *
36
30
  * @since 0.1.0
37
31
  * @status stable
38
32
  * @aliases Page size, Rows per page
39
33
  * @documentation https://fusion.dev/helix/components/pagination
40
34
  *
41
- * @event {HelixBeforeChangeEvent} helix-before-change - Fired before the size changes, and cancelable. The only way to refuse one.
35
+ * @event {HelixBeforeChangeEvent} helix-before-change - Fired before the size changes, and cancelable. Canceling it is the only way to stop a size change.
42
36
  *
43
37
  * @csspart control - The select.
44
- * @csspart control-feedback - What is wrong with it.
38
+ * @csspart control-feedback - The message that says what is wrong with the value.
45
39
  * @csspart control-hint - Help under the trigger.
46
- * @csspart control-indicator - The caret saying the control opens.
47
- * @csspart control-label - The words beside the number.
48
- * @csspart control-listbox - The list inside it.
49
- * @csspart control-listbox-empty - Shown when a filter has hidden everything.
50
- * @csspart control-listbox-feedback - What is wrong with the list.
51
- * @csspart control-listbox-filter-icon - The mark beside the filter field.
52
- * @csspart control-listbox-filter-mark - The glyph beside the filter field, where none is slotted.
40
+ * @csspart control-indicator - The caret that shows the control opens.
41
+ * @csspart control-label - The label beside the number.
42
+ * @csspart control-listbox - The list inside the panel.
43
+ * @csspart control-listbox-empty - The text shown when the filter hides every option.
44
+ * @csspart control-listbox-feedback - The inner list's message that says what is wrong with the value.
45
+ * @csspart control-listbox-filter-icon - The icon beside the filter field.
46
+ * @csspart control-listbox-filter-mark - The default icon beside the filter field, shown when none is slotted.
53
47
  * @csspart control-listbox-hint - Help under the list.
54
- * @csspart control-listbox-items - The list itself.
55
- * @csspart control-listbox-label - The question, over the list.
56
- * @csspart control-listbox-live - The inner listbox's `live`, the region a screen reader hears its empty and loading lines from.
57
- * @csspart control-listbox-loading - Shown while the options are still on their way.
58
- * @csspart control-listbox-search - The region holding the field that narrows the list.
59
- * @csspart control-listbox-search-field - The field itself.
48
+ * @csspart control-listbox-items - The list of options.
49
+ * @csspart control-listbox-label - The label above the list.
50
+ * @csspart control-listbox-live - The inner list's `live` part, the region screen readers announce its empty and loading text from.
51
+ * @csspart control-listbox-loading - The text shown while the options load.
52
+ * @csspart control-listbox-search - The region that holds the filter field.
53
+ * @csspart control-listbox-search-field - The filter field.
60
54
  * @csspart control-surface - The floating panel.
61
- * @csspart control-trigger - The closed control, which says what size is chosen.
55
+ * @csspart control-trigger - The closed control, which shows the chosen size.
62
56
  * @csspart control-value - The chosen size inside the trigger.
63
57
  * @csspart option - One size on offer.
64
58
  * @csspart option-description - The caption under the number, when there is one.
65
59
  * @csspart option-item - The row.
66
60
  * @csspart option-item-active - The row the keyboard is on.
67
- * @csspart option-item-selected - The row of the size chosen.
61
+ * @csspart option-item-selected - The row of the chosen size.
68
62
  * @csspart option-label - The number.
69
63
  * @csspart option-text - The number and the caption, as one column.
70
64
  *
@@ -72,11 +66,11 @@ import '../../select/index.js';
72
66
  */
73
67
  export declare class HelixHeadlessPaginationSize extends HelixElement {
74
68
  /**
75
- * Size to start on, where nothing declared one.
69
+ * The size to start on when `value` is not set.
76
70
  */
77
71
  defaultValue: number;
78
72
  /**
79
- * The words beside the control.
73
+ * The label beside the control.
80
74
  */
81
75
  label: string;
82
76
  /**
@@ -94,7 +88,7 @@ export declare class HelixHeadlessPaginationSize extends HelixElement {
94
88
  */
95
89
  sizes: string;
96
90
  /**
97
- * The size in force.
91
+ * The current page size.
98
92
  *
99
93
  * Reading gives the real one; writing declares it the consumer's, and
100
94
  * `default-value` seeds one this element owns. Same accessor pair as
@@ -1,22 +1,19 @@
1
1
  import { HelixElement } from '@fusion.dev/helix-core';
2
2
  import { type TemplateResult } from 'lit';
3
3
  /**
4
- * @summary Reads out which items of how many are on show.
4
+ * @summary Text that shows which items are on the current page, out of the total.
5
5
  *
6
6
  * @description
7
- * Its own element rather than a part of `Pagination`, so a consumer decides
8
- * where it goes: above, below, in a table's caption, or on the other side of
9
- * the page. Inside the run it could only ever be at one end of one row.
7
+ * A separate element from `Pagination`, so you decide where the count goes:
8
+ * above, below, in a table caption, or elsewhere on the page.
10
9
  *
11
- * **It repeats `page`, `page-size` and `total`, and the cost of that is skew.**
12
- * Those three come from the consumer's own query, so writing them on two
13
- * elements is one variable used twice; what it risks is the two disagreeing.
10
+ * You set `page`, `page-size`, and `total` on both this element and
11
+ * `Pagination`. They come from your own query, so use the same values for both
12
+ * and the two elements agree.
14
13
  *
15
- * **Nothing removes that at this level, and it was measured.** A coordinating
16
- * root can only reach light-DOM children by writing attributes onto them, which
17
- * a framework reports as a hydration error, or through context, which is dead
18
- * on a server: `@lit/context` subscribes from `connectedCallback`, and Lit SSR
19
- * does not call it.
14
+ * A shared parent cannot pass the values down. Writing attributes onto light
15
+ * DOM children causes hydration errors in frameworks, and `@lit/context`
16
+ * subscribes in `connectedCallback`, which Lit SSR does not call.
20
17
  *
21
18
  * @since 0.1.0
22
19
  * @status stable
@@ -25,7 +22,8 @@ import { type TemplateResult } from 'lit';
25
22
  */
26
23
  export declare class HelixHeadlessPaginationSummary extends HelixElement {
27
24
  /**
28
- * The reading, with `{from}`, `{to}` and `{total}` filled in.
25
+ * The text shown. `{from}`, `{to}`, and `{total}` are replaced with the first
26
+ * item, the last item, and the item count.
29
27
  *
30
28
  * A template rather than a prefix and a suffix, because word order is not
31
29
  * universal: `format="{total} 件中 {from}-{to} 件"` is one attribute here and
@@ -47,7 +45,7 @@ export declare class HelixHeadlessPaginationSummary extends HelixElement {
47
45
  */
48
46
  locale: string;
49
47
  /**
50
- * The page on show, one-based.
48
+ * The current page, counting from one.
51
49
  */
52
50
  page: number;
53
51
  /**