@fusion.dev/helix-headless 0.0.0-dev → 0.0.2

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 (210) hide show
  1. package/custom-elements.json +4513 -4483
  2. package/dist/accordion/item/accordion-item.d.ts +13 -15
  3. package/dist/accordion/item/accordion-item.js +15 -17
  4. package/dist/announcement/root/announcement-root.d.ts +7 -25
  5. package/dist/announcement/root/announcement-root.js +7 -20
  6. package/dist/app-header/root/app-header-root.d.ts +10 -17
  7. package/dist/app-header/root/app-header-root.js +9 -18
  8. package/dist/avatar/group/avatar-group.d.ts +10 -19
  9. package/dist/avatar/group/avatar-group.js +12 -17
  10. package/dist/avatar/root/avatar-root.d.ts +8 -8
  11. package/dist/avatar/root/avatar-root.js +19 -20
  12. package/dist/badge/root/badge-root.d.ts +6 -6
  13. package/dist/badge/root/badge-root.js +13 -13
  14. package/dist/bar-chart/root/bar-chart-root.d.ts +21 -29
  15. package/dist/bar-chart/root/bar-chart-root.js +42 -57
  16. package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +12 -18
  17. package/dist/breadcrumbs/breadcrumb/breadcrumb.js +13 -16
  18. package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +9 -28
  19. package/dist/breadcrumbs/root/breadcrumbs-root.js +9 -28
  20. package/dist/button/root/button-root.d.ts +84 -94
  21. package/dist/button/root/button-root.js +82 -92
  22. package/dist/callout/root/callout-root.d.ts +4 -5
  23. package/dist/carousel/root/carousel-root.d.ts +59 -71
  24. package/dist/carousel/root/carousel-root.js +73 -101
  25. package/dist/chat/composer/chat-composer.d.ts +29 -33
  26. package/dist/chat/composer/chat-composer.js +40 -44
  27. package/dist/chat/message/chat-message.d.ts +25 -25
  28. package/dist/chat/message/chat-message.js +26 -26
  29. package/dist/chat/root/chat-root.d.ts +28 -41
  30. package/dist/chat/root/chat-root.js +27 -40
  31. package/dist/checkbox/root/checkbox-root.d.ts +10 -12
  32. package/dist/checkbox/root/checkbox-root.js +29 -35
  33. package/dist/checkbox-group/root/checkbox-group-root.d.ts +32 -45
  34. package/dist/checkbox-group/root/checkbox-group-root.js +53 -79
  35. package/dist/code-block/root/code-block-root.d.ts +3 -4
  36. package/dist/code-block/root/code-block-root.js +8 -12
  37. package/dist/color-input/root/color-input-root.d.ts +36 -37
  38. package/dist/color-input/root/color-input-root.js +29 -34
  39. package/dist/color-picker/color.d.ts +7 -8
  40. package/dist/color-picker/color.js +7 -8
  41. package/dist/color-picker/root/color-picker-root.d.ts +55 -57
  42. package/dist/color-picker/root/color-picker-root.js +60 -64
  43. package/dist/combobox/root/combobox-root.d.ts +53 -58
  44. package/dist/combobox/root/combobox-root.js +85 -94
  45. package/dist/command/root/command-root.d.ts +8 -8
  46. package/dist/command/root/command-root.js +29 -33
  47. package/dist/copy-button/root/copy-button-root.d.ts +21 -24
  48. package/dist/copy-button/root/copy-button-root.js +25 -35
  49. package/dist/data-table/root/data-table-root.d.ts +77 -76
  50. package/dist/data-table/root/data-table-root.js +95 -84
  51. package/dist/data-table/root/order.d.ts +2 -2
  52. package/dist/data-table/root/order.js +1 -3
  53. package/dist/date-input/root/date-input-root.d.ts +88 -93
  54. package/dist/date-input/root/date-input-root.js +147 -158
  55. package/dist/date-picker/root/date-picker-root.d.ts +75 -83
  56. package/dist/date-picker/root/date-picker-root.js +120 -143
  57. package/dist/dialog/root/dialog-root.d.ts +41 -24
  58. package/dist/dialog/root/dialog-root.js +47 -24
  59. package/dist/divider/root/divider-root.d.ts +5 -6
  60. package/dist/divider/root/divider-root.js +4 -5
  61. package/dist/donut-chart/root/donut-chart-root.d.ts +22 -25
  62. package/dist/donut-chart/root/donut-chart-root.js +37 -51
  63. package/dist/drawer/root/drawer-root.d.ts +24 -29
  64. package/dist/drawer/root/drawer-root.js +15 -22
  65. package/dist/drilldown/item/drilldown-item.d.ts +14 -14
  66. package/dist/drilldown/item/drilldown-item.js +24 -26
  67. package/dist/drilldown/root/drilldown-root.d.ts +8 -10
  68. package/dist/drilldown/root/drilldown-root.js +6 -7
  69. package/dist/element-events.generated.js +1 -1
  70. package/dist/file-input/root/file-input-root.d.ts +20 -24
  71. package/dist/file-input/root/file-input-root.js +42 -57
  72. package/dist/format-date/root/format-date-root.js +1 -1
  73. package/dist/heatmap/root/buckets.d.ts +8 -8
  74. package/dist/heatmap/root/buckets.js +8 -8
  75. package/dist/heatmap/root/heatmap-root.d.ts +57 -63
  76. package/dist/heatmap/root/heatmap-root.js +72 -83
  77. package/dist/icon/root/icon-root.d.ts +4 -4
  78. package/dist/icon/root/icon-root.js +9 -9
  79. package/dist/icon-button/root/icon-button-root.d.ts +4 -6
  80. package/dist/icon-button/root/icon-button-root.js +4 -6
  81. package/dist/image/root/image-root.d.ts +49 -59
  82. package/dist/image/root/image-root.js +55 -65
  83. package/dist/index.d.ts +5 -5
  84. package/dist/index.js +5 -5
  85. package/dist/input/root/input-root.d.ts +61 -85
  86. package/dist/input/root/input-root.js +79 -106
  87. package/dist/kbd/root/kbd-root.d.ts +8 -7
  88. package/dist/kbd/root/kbd-root.js +71 -11
  89. package/dist/legend/root/legend-root.d.ts +1 -1
  90. package/dist/legend/root/legend-root.js +4 -5
  91. package/dist/line-chart/root/line-chart-root.d.ts +26 -30
  92. package/dist/line-chart/root/line-chart-root.js +10 -10
  93. package/dist/list/item/list-item.d.ts +14 -18
  94. package/dist/list/item/list-item.js +18 -22
  95. package/dist/list/root/list-root.d.ts +4 -4
  96. package/dist/list/root/list-root.js +3 -3
  97. package/dist/listbox/root/listbox-root.d.ts +31 -58
  98. package/dist/listbox/root/listbox-root.js +66 -109
  99. package/dist/megamenu/root/megamenu-root.d.ts +34 -35
  100. package/dist/megamenu/root/megamenu-root.js +53 -58
  101. package/dist/menu/item/menu-item.d.ts +39 -53
  102. package/dist/menu/item/menu-item.js +50 -64
  103. package/dist/menu/root/menu-root.d.ts +30 -40
  104. package/dist/menu/root/menu-root.js +49 -82
  105. package/dist/meter/root/meter-root.d.ts +49 -53
  106. package/dist/meter/root/meter-root.js +22 -27
  107. package/dist/navigation/root/navigation-root.js +11 -19
  108. package/dist/notifications/notification/notification.d.ts +16 -22
  109. package/dist/notifications/notification/notification.js +21 -27
  110. package/dist/notifications/root/notifications-root.d.ts +31 -39
  111. package/dist/notifications/root/notifications-root.js +41 -52
  112. package/dist/number-input/root/number-input-root.d.ts +31 -33
  113. package/dist/number-input/root/number-input-root.js +37 -39
  114. package/dist/option/root/option-root.d.ts +73 -74
  115. package/dist/option/root/option-root.js +62 -64
  116. package/dist/outline/root/outline-root.d.ts +38 -44
  117. package/dist/outline/root/outline-root.js +66 -82
  118. package/dist/pagination/root/pagination-root.d.ts +87 -92
  119. package/dist/pagination/root/pagination-root.js +116 -123
  120. package/dist/pagination/size/pagination-size.d.ts +31 -50
  121. package/dist/pagination/size/pagination-size.js +35 -55
  122. package/dist/pagination/summary/pagination-summary.d.ts +12 -12
  123. package/dist/pagination/summary/pagination-summary.js +18 -18
  124. package/dist/pin-input/root/pin-input-root.d.ts +53 -70
  125. package/dist/pin-input/root/pin-input-root.js +74 -94
  126. package/dist/popover/root/popover-root.d.ts +15 -20
  127. package/dist/popover/root/popover-root.js +19 -36
  128. package/dist/progress/root/progress-root.d.ts +12 -14
  129. package/dist/progress/root/progress-root.js +22 -25
  130. package/dist/qr-code/root/qr-code-root.d.ts +11 -11
  131. package/dist/qr-code/root/qr-code-root.js +12 -14
  132. package/dist/radio/group/radio-group.js +19 -26
  133. package/dist/radio/root/radio-root.d.ts +12 -13
  134. package/dist/radio/root/radio-root.js +12 -13
  135. package/dist/rating/root/rating-root.d.ts +25 -30
  136. package/dist/rating/root/rating-root.js +43 -50
  137. package/dist/scroll-area/root/scroll-area-root.d.ts +11 -14
  138. package/dist/scroll-area/root/scroll-area-root.js +39 -33
  139. package/dist/select/root/select-root.d.ts +7 -12
  140. package/dist/select/root/select-root.js +40 -55
  141. package/dist/slider/root/slider-root.d.ts +53 -60
  142. package/dist/slider/root/slider-root.js +74 -85
  143. package/dist/sparkline/root/sparkline-root.d.ts +43 -47
  144. package/dist/sparkline/root/sparkline-root.js +23 -32
  145. package/dist/speed-dial/item/speed-dial-item.d.ts +6 -6
  146. package/dist/speed-dial/item/speed-dial-item.js +9 -9
  147. package/dist/speed-dial/root/speed-dial-root.d.ts +21 -25
  148. package/dist/speed-dial/root/speed-dial-root.js +32 -40
  149. package/dist/splitter/root/splitter-root.d.ts +98 -111
  150. package/dist/splitter/root/splitter-root.js +96 -123
  151. package/dist/stat/root/stat-root.d.ts +2 -7
  152. package/dist/stat/root/stat-root.js +0 -5
  153. package/dist/steps/step/step.d.ts +19 -24
  154. package/dist/steps/step/step.js +27 -32
  155. package/dist/switch/root/switch-root.js +2 -2
  156. package/dist/table/column/table-column.d.ts +54 -60
  157. package/dist/table/column/table-column.js +95 -68
  158. package/dist/table/root/table-root.d.ts +5 -6
  159. package/dist/table/root/table-root.js +7 -10
  160. package/dist/tabs/panel/tab-panel.d.ts +21 -25
  161. package/dist/tabs/panel/tab-panel.js +25 -29
  162. package/dist/tabs/root/tabs-root.d.ts +25 -34
  163. package/dist/tabs/root/tabs-root.js +22 -28
  164. package/dist/tabs/tab/tab.d.ts +12 -12
  165. package/dist/tabs/tab/tab.js +19 -20
  166. package/dist/textarea/root/textarea-root.d.ts +36 -36
  167. package/dist/textarea/root/textarea-root.js +43 -47
  168. package/dist/time-input/root/time-input-root.d.ts +58 -68
  169. package/dist/time-input/root/time-input-root.js +62 -77
  170. package/dist/time-picker/root/time-picker-root.d.ts +73 -79
  171. package/dist/time-picker/root/time-picker-root.js +72 -84
  172. package/dist/timeline/item/timeline-item.d.ts +8 -11
  173. package/dist/timeline/item/timeline-item.js +8 -11
  174. package/dist/timeline/root/timeline-root.d.ts +5 -7
  175. package/dist/timeline/root/timeline-root.js +5 -7
  176. package/dist/toast/item/toast-item.d.ts +9 -27
  177. package/dist/toast/item/toast-item.js +19 -41
  178. package/dist/toast/root/toast-root.d.ts +10 -14
  179. package/dist/toast/root/toast-root.js +4 -5
  180. package/dist/toggle/group/toggle-group.d.ts +6 -15
  181. package/dist/toggle/group/toggle-group.js +21 -36
  182. package/dist/toggle/root/toggle-root.d.ts +26 -27
  183. package/dist/toggle/root/toggle-root.js +30 -31
  184. package/dist/toolbar/root/toolbar-root.d.ts +7 -10
  185. package/dist/toolbar/root/toolbar-root.js +10 -14
  186. package/dist/tooltip/root/tooltip-root.d.ts +52 -59
  187. package/dist/tooltip/root/tooltip-root.js +98 -93
  188. package/dist/tour/root/tour-root.d.ts +19 -23
  189. package/dist/tour/root/tour-root.js +31 -41
  190. package/dist/tour/stop/tour-stop.d.ts +14 -15
  191. package/dist/tour/stop/tour-stop.js +31 -34
  192. package/dist/tree/item/tree-item.d.ts +30 -35
  193. package/dist/tree/item/tree-item.js +43 -55
  194. package/dist/tree/root/tree-root.d.ts +7 -10
  195. package/dist/tree/root/tree-root.js +33 -42
  196. package/dist/trend/root/trend-root.d.ts +3 -5
  197. package/dist/trend/root/trend-root.js +5 -9
  198. package/dist/video/root/video-root.d.ts +100 -124
  199. package/dist/video/root/video-root.js +142 -176
  200. package/dist/video-playlist/item/video-playlist-item.d.ts +16 -16
  201. package/dist/video-playlist/item/video-playlist-item.js +24 -24
  202. package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -8
  203. package/dist/video-playlist/menu/video-playlist-menu.js +20 -29
  204. package/dist/video-playlist/root/video-playlist-root.d.ts +16 -11
  205. package/dist/video-playlist/root/video-playlist-root.js +21 -25
  206. package/dist/virtual-list/root/virtual-list-root.d.ts +8 -12
  207. package/dist/virtual-list/root/virtual-list-root.js +11 -16
  208. package/jsx.d.ts +9797 -12561
  209. package/package.json +6 -6
  210. package/vue.d.ts +2684 -3228
@@ -21,10 +21,8 @@ const isFinder = (x, y, size) => {
21
21
  * tree walks, and every one of them is a one-unit square.
22
22
  *
23
23
  * **`square` joins runs and the other styles cannot.** A row of eight square
24
- * modules is one `h8`, which is what keeps the node count down; a row of eight
25
- * *rounded* ones is eight shapes, because the corners are what is being drawn
26
- * and a joined run has no corners in the middle of it. So the cost of the other
27
- * styles is real and is paid only by the codes that ask for them.
24
+ * modules is one `h8`; a row of eight *rounded* ones is eight shapes, because
25
+ * the corners are what is being drawn and a joined run has none in the middle.
28
26
  *
29
27
  * `only` splits the drawing in two without walking the matrix twice: the finder
30
28
  * squares are structural, at three known corners, so a caller can ask for them
@@ -59,7 +57,7 @@ const pathFor = (matrix, style, only = 'all') => {
59
57
  return parts.join('');
60
58
  }
61
59
  /* A circle for `dots` and a squircle for `rounded`, both drawn as arcs on a
62
- one-unit square. The radius is a little under half so neighbouring dots do
60
+ one-unit square. The radius is a little under half so neighboring dots do
63
61
  not touch, which is what makes a dotted code read as dots rather than as a
64
62
  square one with soft edges. */
65
63
  const r = style === 'dots' ? 0.45 : 0.28;
@@ -123,10 +121,6 @@ const pathFor = (matrix, style, only = 'all') => {
123
121
  let HelixHeadlessQrCode = class HelixHeadlessQrCode extends HelixElement {
124
122
  constructor() {
125
123
  super(...arguments);
126
- /**
127
- * What the code encodes, which is usually a URL.
128
- */
129
- this.value = '';
130
124
  /**
131
125
  * What the image is called.
132
126
  *
@@ -144,10 +138,14 @@ let HelixHeadlessQrCode = class HelixHeadlessQrCode extends HelixElement {
144
138
  * middle. That cost is paid only by a code that asks for them.
145
139
  *
146
140
  * A scanner reads contrast between cells, not their shape, so all three
147
- * scan. `dots` sits a little under half a module so neighbours do not touch,
141
+ * scan. `dots` sits a little under half a module so neighbors do not touch,
148
142
  * which is what makes it read as dots rather than as a softened square code.
149
143
  */
150
144
  this.shape = 'square';
145
+ /**
146
+ * What the code encodes, which is usually a URL.
147
+ */
148
+ this.value = '';
151
149
  /** Whether anything is slotted into the middle. */
152
150
  this.logo = false;
153
151
  }
@@ -216,8 +214,8 @@ let HelixHeadlessQrCode = class HelixHeadlessQrCode extends HelixElement {
216
214
  }
217
215
  };
218
216
  __decorate([
219
- property()
220
- ], HelixHeadlessQrCode.prototype, "value", void 0);
217
+ property({ attribute: 'correction' })
218
+ ], HelixHeadlessQrCode.prototype, "correction", void 0);
221
219
  __decorate([
222
220
  property()
223
221
  ], HelixHeadlessQrCode.prototype, "label", void 0);
@@ -225,8 +223,8 @@ __decorate([
225
223
  property()
226
224
  ], HelixHeadlessQrCode.prototype, "shape", void 0);
227
225
  __decorate([
228
- property({ attribute: 'correction' })
229
- ], HelixHeadlessQrCode.prototype, "correction", void 0);
226
+ property()
227
+ ], HelixHeadlessQrCode.prototype, "value", void 0);
230
228
  HelixHeadlessQrCode = __decorate([
231
229
  customElement('helix-headless-qr-code')
232
230
  ], HelixHeadlessQrCode);
@@ -55,15 +55,14 @@ let HelixHeadlessRadioGroup = class HelixHeadlessRadioGroup extends MixinControl
55
55
  /* Moving and choosing are one act, which is the radio group pattern and is
56
56
  what this controller exists to stop being written per component. */
57
57
  /* Registered rather than held. A controller adds itself to the host, so there
58
- is no reference to keep: nothing here talks to it after construction, which
59
- is why it is `protected` and not `private`. A private field nothing reads
60
- is an unused one, and the honest reading is that the subclass tier is where
61
- a consumer would reach for it. */
58
+ is no reference to keep, and nothing here talks to it after construction.
59
+ `protected` rather than `private` because a private field nothing reads is
60
+ an unused one, and the subclass tier is where a consumer would reach for
61
+ it. */
62
62
  this.keys = new KeyboardNavigationController(this, { items: () => this.items });
63
- /* Stated once, and the group never thinks about it again. See the
64
- controller: the cascade was four hand calls from four different
65
- methods, so which paths reached it differed by component and a fifth
66
- group would have got none at all. */
63
+ /* Stated once, and the group never thinks about it again. Hand calls from
64
+ each method that could disable an item reach different paths per
65
+ component; the controller is what stops that being written per group. */
67
66
  this.cascade = new DisabledCascadeController(this, {
68
67
  items: () => this.items,
69
68
  });
@@ -93,17 +92,14 @@ let HelixHeadlessRadioGroup = class HelixHeadlessRadioGroup extends MixinControl
93
92
  item.selected = item.value === this.value;
94
93
  }
95
94
  /* Nothing chosen yet, so the first item is the tab stop. A group where
96
- every item is `tabindex="-1"` is a group the keyboard cannot enter.
97
- *
98
- * Taken back the moment there is an answer, which it was not: the attribute
99
- * was written on the first item and never removed, so an answered group
100
- * carried two tab stops, the entry one and the selected item's own. Tabbing
101
- * through a form stopped twice on one question, and the first stop was on an
102
- * item that is not the answer.
103
- *
104
- * `entered` rather than a bare toggle, because this also runs when the
105
- * group is answered and the attribute has to go whether or not this call is
106
- * the one that put it there. */
95
+ every item is `tabindex="-1"` is a group the keyboard cannot enter, and
96
+ an answered group that keeps the entry stop carries two, so tabbing
97
+ through a form stops twice on one question and the first stop is on an
98
+ item that is not the answer.
99
+
100
+ `entered` rather than a bare toggle, because this also runs when the
101
+ group is answered and the attribute has to go whether or not this call is
102
+ the one that put it there. */
107
103
  const entered = this.value === '' && items.length > 0 ? items[0] : undefined;
108
104
  for (const item of items) {
109
105
  if (item === entered) {
@@ -135,13 +131,10 @@ let HelixHeadlessRadioGroup = class HelixHeadlessRadioGroup extends MixinControl
135
131
  element references on the client, and those win where a consumer slotted
136
132
  a label richer than a string. */
137
133
  hostAria(this.internals, { label: this.label, role: 'radiogroup' });
138
- /* Announced as required, which it never was.
139
- *
140
- * `required` reflects, sets validity and paints the asterisk the field sheet
141
- * draws, and told the accessibility tree nothing: a reader met a group with
142
- * a mark beside its label they could not see and no announcement of why the
143
- * form would refuse it. The stylesheet drawing that asterisk depends on the
144
- * control saying so. */
134
+ /* `required` reflects, sets validity and paints the asterisk the field
135
+ sheet draws, and tells the accessibility tree nothing on its own. Without
136
+ this a reader meets a mark beside the label they cannot see, and no
137
+ announcement of why the form would refuse the group. */
145
138
  this.internals.ariaRequired = this.required ? 'true' : null;
146
139
  }
147
140
  updated(changed) {
@@ -53,11 +53,10 @@ export declare class HelixHeadlessRadio extends HelixElement {
53
53
  * the markup said at upgrade, before anything could overwrite it: read the
54
54
  * attribute later and the listbox's own writes answer instead.
55
55
  *
56
- * **The deeper half is 302 and is not this.** State reflecting under the
57
- * declaration's name is the fault `TreeItem` already avoids by mirroring to
58
- * `data-selected`, and four families here still write `selected` back into a
59
- * consumer's markup. Splitting them means moving what every stylesheet selects
60
- * on, which is a change of its own rather than a property being added.
56
+ * **The deeper half is not this.** State reflecting under the declaration's
57
+ * name is the fault `TreeItem` avoids by mirroring to `data-selected`.
58
+ * Splitting them means moving what every stylesheet selects on, which is a
59
+ * change of its own rather than a property being added.
61
60
  */
62
61
  get defaultSelected(): boolean;
63
62
  set defaultSelected(next: boolean);
@@ -80,17 +79,17 @@ export declare class HelixHeadlessRadio extends HelixElement {
80
79
  /**
81
80
  * Mirrors the chosen state where a stylesheet can select on it.
82
81
  *
83
- * **A custom state and not the `selected` attribute it used to reflect.** The
84
- * parent writes this: a listbox choosing a row, a tab strip moving the tab, a
85
- * radio group answering for its set. Reflected, that put the element's own
86
- * bookkeeping onto markup a consumer wrote and a consumer's server never sent,
87
- * which React reconciles and reports as a mismatch, and which a serialized
88
- * element pasted back declares as a choice nobody made. `ElementInternals`
89
- * holds it instead, where it is not in the DOM at all.
82
+ * **A custom state rather than the `selected` attribute.** The parent writes
83
+ * this: a listbox choosing a row, a tab strip moving the tab, a radio group
84
+ * answering for its set. Reflected, that puts the element's own bookkeeping
85
+ * onto markup a consumer wrote and a consumer's server never sent, which
86
+ * React reconciles and reports as a mismatch, and which a serialized element
87
+ * pasted back declares as a choice nobody made. `ElementInternals` holds it
88
+ * instead, where it is not in the DOM at all.
90
89
  *
91
90
  * Reading `selected` is unaffected and so is writing it: the attribute still
92
91
  * seeds the property, which is what `<helix-radio selected>` in a consumer's
93
- * markup means. What stops is the write back. See 302 and 304.
92
+ * markup means. There is no write back.
94
93
  */
95
94
  protected willUpdate(changed: PropertyValues): void;
96
95
  protected render(): TemplateResult;
@@ -75,11 +75,10 @@ let HelixHeadlessRadio = class HelixHeadlessRadio extends HelixElement {
75
75
  * the markup said at upgrade, before anything could overwrite it: read the
76
76
  * attribute later and the listbox's own writes answer instead.
77
77
  *
78
- * **The deeper half is 302 and is not this.** State reflecting under the
79
- * declaration's name is the fault `TreeItem` already avoids by mirroring to
80
- * `data-selected`, and four families here still write `selected` back into a
81
- * consumer's markup. Splitting them means moving what every stylesheet selects
82
- * on, which is a change of its own rather than a property being added.
78
+ * **The deeper half is not this.** State reflecting under the declaration's
79
+ * name is the fault `TreeItem` avoids by mirroring to `data-selected`.
80
+ * Splitting them means moving what every stylesheet selects on, which is a
81
+ * change of its own rather than a property being added.
83
82
  */
84
83
  get defaultSelected() {
85
84
  return this.seeded;
@@ -101,17 +100,17 @@ let HelixHeadlessRadio = class HelixHeadlessRadio extends HelixElement {
101
100
  /**
102
101
  * Mirrors the chosen state where a stylesheet can select on it.
103
102
  *
104
- * **A custom state and not the `selected` attribute it used to reflect.** The
105
- * parent writes this: a listbox choosing a row, a tab strip moving the tab, a
106
- * radio group answering for its set. Reflected, that put the element's own
107
- * bookkeeping onto markup a consumer wrote and a consumer's server never sent,
108
- * which React reconciles and reports as a mismatch, and which a serialized
109
- * element pasted back declares as a choice nobody made. `ElementInternals`
110
- * holds it instead, where it is not in the DOM at all.
103
+ * **A custom state rather than the `selected` attribute.** The parent writes
104
+ * this: a listbox choosing a row, a tab strip moving the tab, a radio group
105
+ * answering for its set. Reflected, that puts the element's own bookkeeping
106
+ * onto markup a consumer wrote and a consumer's server never sent, which
107
+ * React reconciles and reports as a mismatch, and which a serialized element
108
+ * pasted back declares as a choice nobody made. `ElementInternals` holds it
109
+ * instead, where it is not in the DOM at all.
111
110
  *
112
111
  * Reading `selected` is unaffected and so is writing it: the attribute still
113
112
  * seeds the property, which is what `<helix-radio selected>` in a consumer's
114
- * markup means. What stops is the write back. See 302 and 304.
113
+ * markup means. There is no write back.
115
114
  */
116
115
  willUpdate(changed) {
117
116
  super.willUpdate(changed);
@@ -5,12 +5,10 @@ declare const HelixHeadlessRating_base: (new (...args: any[]) => import("@fusion
5
5
  * @summary A score out of a few marks, given or shown.
6
6
  *
7
7
  * @description
8
- * **Half marks decide the shape, so they are decided first.** Supporting them
9
- * means the value is not an integer and the targets are not the marks: five
10
- * stars at a half step is ten places to press, and a mark that is filled to the
11
- * middle. Everything else follows from that, which is why `step` is here rather
12
- * than added later, when the pointer handling would have to be rewritten around
13
- * it.
8
+ * **Half marks decide the shape.** Supporting them means the value is not an
9
+ * integer and the targets are not the marks: five stars at a half step is ten
10
+ * places to press, and a mark that is filled to the middle. The pointer handling
11
+ * and `step` are both built around that rather than added over it.
14
12
  *
15
13
  * **A partial mark is the whole mark, clipped.** Not a second glyph filled to
16
14
  * the middle: that needs a matching pair drawn for every mark anybody uses, and
@@ -18,7 +16,7 @@ declare const HelixHeadlessRating_base: (new (...args: any[]) => import("@fusion
18
16
  * fill is the same marks over the same marks, cut off partway, so any mark works
19
17
  * and any fraction does.
20
18
  *
21
- * **Read-only is not this control greyed out, it is a different thing.** The
19
+ * **Read-only is not this control grayed out, it is a different thing.** The
22
20
  * commoner use is showing a score nobody is being asked for, a product's
23
21
  * average, and that is not a control at all: it takes no focus, answers no keys,
24
22
  * has no options to choose between, and reads as one thing rather than as five.
@@ -83,13 +81,6 @@ export declare class HelixHeadlessRating extends HelixHeadlessRating_base {
83
81
  * `required`, not by making one unreachable.
84
82
  */
85
83
  min: number;
86
- /**
87
- * The smallest part of a mark that can be chosen.
88
- *
89
- * `0.5` is the half star, and it is the reason the value is a number rather
90
- * than an index: with halves, five marks are ten answers.
91
- */
92
- step: number;
93
84
  /**
94
85
  * Whether this shows a score rather than asks for one.
95
86
  *
@@ -97,15 +88,6 @@ export declare class HelixHeadlessRating extends HelixHeadlessRating_base {
97
88
  * answers no keys, and reads as one thing: see the note on the class.
98
89
  */
99
90
  readOnly: boolean;
100
- /**
101
- * How the score is read out, where "3.5 out of 5" is not what it should say.
102
- *
103
- * A rating out of five is one of the few places a screen reader gets a worse
104
- * answer from the value than from a sentence: "3.5" alone is a number without
105
- * a subject. This names the readout, where a control is named by its `label`
106
- * and each of its options by the score that option is.
107
- */
108
- valueText: string;
109
91
  /**
110
92
  * Whether the score is written out beside the marks.
111
93
  *
@@ -119,6 +101,22 @@ export declare class HelixHeadlessRating extends HelixHeadlessRating_base {
119
101
  * reader's own cursor would be worse than no label.
120
102
  */
121
103
  showValue: boolean;
104
+ /**
105
+ * The smallest part of a mark that can be chosen.
106
+ *
107
+ * `0.5` is the half star, and it is the reason the value is a number rather
108
+ * than an index: with halves, five marks are ten answers.
109
+ */
110
+ step: number;
111
+ /**
112
+ * How the score is read out, where "3.5 out of 5" is not what it should say.
113
+ *
114
+ * A rating out of five is one of the few places a screen reader gets a worse
115
+ * answer from the value than from a sentence: "3.5" alone is a number without
116
+ * a subject. This names the readout, where a control is named by its `label`
117
+ * and each of its options by the score that option is.
118
+ */
119
+ valueText: string;
122
120
  /**
123
121
  * The shape a consumer slotted, if they slotted one.
124
122
  *
@@ -198,13 +196,10 @@ export declare class HelixHeadlessRating extends HelixHeadlessRating_base {
198
196
  /**
199
197
  * Reports the value, and whether the form may go without one.
200
198
  *
201
- * **`required` was on the API page and did nothing.** The mixin brings it,
202
- * so it printed on the reference page and read as supported, and nothing here
203
- * ever called `setValidity`: a form holding an unrated required rating
204
- * submitted, measured, with `:valid` true and the entry present but empty.
205
- * This is the case `min` argues for in its own note, that "no rating" and
206
- * "the worst rating" are different answers and a survey that requires one
207
- * says so with `required`.
199
+ * **`required` arrives from the mixin, so it prints on the reference page
200
+ * whether or not anything here enforces it.** Without a `setValidity` call a
201
+ * form holding an unrated required rating submits, `:valid` true and the
202
+ * entry present but empty. `reportRequired` is what makes the property real.
208
203
  *
209
204
  * **Empty is `value === ''` rather than a score of zero**, because zero is a
210
205
  * rating a reader can deliberately give when `min` allows it, and refusing to
@@ -11,12 +11,10 @@ import { property, state } from 'lit/decorators.js';
11
11
  * @summary A score out of a few marks, given or shown.
12
12
  *
13
13
  * @description
14
- * **Half marks decide the shape, so they are decided first.** Supporting them
15
- * means the value is not an integer and the targets are not the marks: five
16
- * stars at a half step is ten places to press, and a mark that is filled to the
17
- * middle. Everything else follows from that, which is why `step` is here rather
18
- * than added later, when the pointer handling would have to be rewritten around
19
- * it.
14
+ * **Half marks decide the shape.** Supporting them means the value is not an
15
+ * integer and the targets are not the marks: five stars at a half step is ten
16
+ * places to press, and a mark that is filled to the middle. The pointer handling
17
+ * and `step` are both built around that rather than added over it.
20
18
  *
21
19
  * **A partial mark is the whole mark, clipped.** Not a second glyph filled to
22
20
  * the middle: that needs a matching pair drawn for every mark anybody uses, and
@@ -24,7 +22,7 @@ import { property, state } from 'lit/decorators.js';
24
22
  * fill is the same marks over the same marks, cut off partway, so any mark works
25
23
  * and any fraction does.
26
24
  *
27
- * **Read-only is not this control greyed out, it is a different thing.** The
25
+ * **Read-only is not this control grayed out, it is a different thing.** The
28
26
  * commoner use is showing a score nobody is being asked for, a product's
29
27
  * average, and that is not a control at all: it takes no focus, answers no keys,
30
28
  * has no options to choose between, and reads as one thing rather than as five.
@@ -78,15 +76,13 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
78
76
  constructor() {
79
77
  super(...arguments);
80
78
  /*
81
- * Discrete, which is the default and is said here only because it was wrong.
82
- *
83
- * `Input`, `Slider`, `NumberInput`, `Textarea` and `PinInput` all announce
84
- * input, and every one of them is edited continuously: a value passes through
85
- * every keystroke or pixel on its way to the one meant. A rating does not. A
86
- * press picks a score, an arrow picks the next one, and the drag deliberately
87
- * asks for nothing until it is let go, so there is exactly one value and it
88
- * is the chosen one. That is `helix-before-change`, the same as the radio group this
89
- * announces itself as.
79
+ * Discrete. `Input`, `Slider`, `NumberInput`, `Textarea` and `PinInput` all
80
+ * announce input, and every one of them is edited continuously: a value passes
81
+ * through every keystroke or pixel on its way to the one meant. A rating does
82
+ * not. A press picks a score, an arrow picks the next one, and the drag
83
+ * deliberately asks for nothing until it is let go, so there is exactly one
84
+ * value and it is the chosen one. That is `helix-before-change`, the same as
85
+ * the radio group this announces itself as.
90
86
  */
91
87
  this.announcesInput = false;
92
88
  /**
@@ -102,13 +98,6 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
102
98
  * `required`, not by making one unreachable.
103
99
  */
104
100
  this.min = 0;
105
- /**
106
- * The smallest part of a mark that can be chosen.
107
- *
108
- * `0.5` is the half star, and it is the reason the value is a number rather
109
- * than an index: with halves, five marks are ten answers.
110
- */
111
- this.step = 1;
112
101
  /**
113
102
  * Whether this shows a score rather than asks for one.
114
103
  *
@@ -116,15 +105,6 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
116
105
  * answers no keys, and reads as one thing: see the note on the class.
117
106
  */
118
107
  this.readOnly = false;
119
- /**
120
- * How the score is read out, where "3.5 out of 5" is not what it should say.
121
- *
122
- * A rating out of five is one of the few places a screen reader gets a worse
123
- * answer from the value than from a sentence: "3.5" alone is a number without
124
- * a subject. This names the readout, where a control is named by its `label`
125
- * and each of its options by the score that option is.
126
- */
127
- this.valueText = '';
128
108
  /**
129
109
  * Whether the score is written out beside the marks.
130
110
  *
@@ -138,6 +118,22 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
138
118
  * reader's own cursor would be worse than no label.
139
119
  */
140
120
  this.showValue = false;
121
+ /**
122
+ * The smallest part of a mark that can be chosen.
123
+ *
124
+ * `0.5` is the half star, and it is the reason the value is a number rather
125
+ * than an index: with halves, five marks are ten answers.
126
+ */
127
+ this.step = 1;
128
+ /**
129
+ * How the score is read out, where "3.5 out of 5" is not what it should say.
130
+ *
131
+ * A rating out of five is one of the few places a screen reader gets a worse
132
+ * answer from the value than from a sentence: "3.5" alone is a number without
133
+ * a subject. This names the readout, where a control is named by its `label`
134
+ * and each of its options by the score that option is.
135
+ */
136
+ this.valueText = '';
141
137
  /**
142
138
  * The shape a consumer slotted, if they slotted one.
143
139
  *
@@ -206,7 +202,7 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
206
202
  event.currentTarget.setPointerCapture(event.pointerId);
207
203
  }
208
204
  catch {
209
- /* A synthesised pointer has no capture to take, and the drag works
205
+ /* A synthesized pointer has no capture to take, and the drag works
210
206
  without it right up until the pointer leaves the row. Worth having the
211
207
  gesture testable rather than making the specs drive a real device. */
212
208
  }
@@ -335,13 +331,10 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
335
331
  /**
336
332
  * Reports the value, and whether the form may go without one.
337
333
  *
338
- * **`required` was on the API page and did nothing.** The mixin brings it,
339
- * so it printed on the reference page and read as supported, and nothing here
340
- * ever called `setValidity`: a form holding an unrated required rating
341
- * submitted, measured, with `:valid` true and the entry present but empty.
342
- * This is the case `min` argues for in its own note, that "no rating" and
343
- * "the worst rating" are different answers and a survey that requires one
344
- * says so with `required`.
334
+ * **`required` arrives from the mixin, so it prints on the reference page
335
+ * whether or not anything here enforces it.** Without a `setValidity` call a
336
+ * form holding an unrated required rating submits, `:valid` true and the
337
+ * entry present but empty. `reportRequired` is what makes the property real.
345
338
  *
346
339
  * **Empty is `value === ''` rather than a score of zero**, because zero is a
347
340
  * rating a reader can deliberately give when `min` allows it, and refusing to
@@ -367,7 +360,7 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
367
360
  updated(changed) {
368
361
  super.updated?.(changed);
369
362
  // Every update, not only the ones that name `value`: see the note on
370
- // `ColorInput.updated`, and the fifteen controls that already did this.
363
+ // `ColorInput.updated`.
371
364
  this.sync();
372
365
  }
373
366
  firstUpdated(changed) {
@@ -384,9 +377,9 @@ let HelixHeadlessRating = class HelixHeadlessRating extends MixinControllerValue
384
377
  rather than a count of the filled ones.
385
378
 
386
379
  Written out twice rather than through one helper taking the part name:
387
- `check:selectors` reads the literals to know what this renders, and a
388
- `part=${name}` binding is invisible to it. It called the stylesheet's
389
- `[part="track"]` and `[part="fill"]` dead. */
380
+ a part is read from the source as a literal, and a `part=${name}`
381
+ binding is invisible. The stylesheet's `[part="track"]` and
382
+ `[part="fill"]` read as dead. */
390
383
  const marksIn = (layer) => Array.from({ length: count }, (_, index) => mark(layer, index));
391
384
  return html `<div
392
385
  part="marks"
@@ -460,18 +453,18 @@ __decorate([
460
453
  __decorate([
461
454
  property({ type: Number })
462
455
  ], HelixHeadlessRating.prototype, "min", void 0);
463
- __decorate([
464
- property({ type: Number })
465
- ], HelixHeadlessRating.prototype, "step", void 0);
466
456
  __decorate([
467
457
  property({ attribute: 'readonly', reflect: true, type: Boolean })
468
458
  ], HelixHeadlessRating.prototype, "readOnly", void 0);
469
- __decorate([
470
- property({ attribute: 'value-text' })
471
- ], HelixHeadlessRating.prototype, "valueText", void 0);
472
459
  __decorate([
473
460
  property({ attribute: 'show-value', reflect: true, type: Boolean })
474
461
  ], HelixHeadlessRating.prototype, "showValue", void 0);
462
+ __decorate([
463
+ property({ type: Number })
464
+ ], HelixHeadlessRating.prototype, "step", void 0);
465
+ __decorate([
466
+ property({ attribute: 'value-text' })
467
+ ], HelixHeadlessRating.prototype, "valueText", void 0);
475
468
  __decorate([
476
469
  state()
477
470
  ], HelixHeadlessRating.prototype, "markSource", void 0);
@@ -9,12 +9,12 @@ declare const EDGES: readonly ['block-start', 'block-end', 'inline-start', 'inli
9
9
  * **The whole component is one fact a stylesheet cannot work out for itself:
10
10
  * which edges have content past them.** A fade at the bottom of a list is easy
11
11
  * to draw and impossible to decide, because CSS has no reading of scroll
12
- * position. So this measures and says, in `data-more`, and the styled tier
13
- * draws whatever it likes on the edges named.
12
+ * position. So this measures and says, in a custom state per edge, and the
13
+ * styled tier draws whatever it likes on the edges named.
14
14
  *
15
- * **Tokens rather than four attributes**, so a stylesheet asks
16
- * `[data-more~="block-end"]` the way it would ask about a class. Four booleans
17
- * say the same thing in four selectors and read worse at every use.
15
+ * **States rather than attributes**, so an element that upgrades after a
16
+ * framework rendered its markup does not hand that framework markup it did not
17
+ * write. A stylesheet asks `:host(:state(more-block-end))`.
18
18
  *
19
19
  * **A scrolling region takes the keyboard when it scrolls, and not before.**
20
20
  * A box a reader can only reach with a pointer is a box some readers cannot
@@ -56,17 +56,14 @@ export declare class HelixHeadlessScrollArea extends HelixElement {
56
56
  /**
57
57
  * The box that actually scrolls, for anything that needs to move it.
58
58
  *
59
- * **Public because the alternative is silence.** Bringing a row into view
60
- * means telling a scroll utility which box to scroll, and the scrolling box
61
- * here is inside a shadow root: a consumer holding a reference to this
62
- * element holds the host, which does not scroll, and `scrollBy` on it is a
63
- * no-op that reports nothing. That is exactly how `scrollItemIntoView`'s
64
- * `offsetParent` default fails, and the sandbox sidebar spent an afternoon
65
- * scrolled to zero because of it.
59
+ * **Public because the alternative is silence.** The scrolling box is inside
60
+ * this shadow root: a consumer holding a reference to this element holds the
61
+ * host, which does not scroll, and `scrollBy` on it is a no-op that reports
62
+ * nothing. That is how `scrollItemIntoView`'s `offsetParent` default fails
63
+ * here.
66
64
  *
67
65
  * The element rather than a method of our own, because the utilities that
68
- * want it already take one, and `Tree`, `Combobox` and anything windowing a
69
- * long list all want the same thing from it.
66
+ * want it already take one.
70
67
  */
71
68
  get scroller(): HTMLElement | null;
72
69
  /**