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

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
@@ -31,15 +31,11 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
31
31
  * @event {HelixSelectEvent} helix-select - Fired when the row is chosen. Cancelable: refusing it takes the decision and nothing moves.
32
32
  *
33
33
  * @csspart item - The row, which is an `<a>` where `href` is set.
34
- * @csspart mark - The trailing mark: a tick when checked, a caret when it opens.
34
+ * @csspart mark - The trailing mark: a tick when checked, a caret when it opens
35
35
  * a page. One column, because a row is never both.
36
36
  * @csspart start - The leading column, which is a slot and is always there.
37
37
  */
38
38
  export declare class HelixHeadlessMenuItem extends HelixElement {
39
- /**
40
- * What this row stands for, carried in the event when it is chosen.
41
- */
42
- value: string;
43
39
  /**
44
40
  * Whether the row is one of a set of choices.
45
41
  *
@@ -60,6 +56,14 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
60
56
  * Whether the row can be chosen.
61
57
  */
62
58
  disabled: boolean;
59
+ /**
60
+ * Whether the link saves the file rather than opening it.
61
+ *
62
+ * Only meaningful beside an `href`, and only for a file served from this
63
+ * origin: the attribute is ignored cross-origin, which is the browser's rule
64
+ * about who may name a file on somebody's disk rather than a gap here.
65
+ */
66
+ download: boolean;
63
67
  /**
64
68
  * Where the row goes, which makes it a real link.
65
69
  *
@@ -67,7 +71,7 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
67
71
  * `menuitem` cannot contain a link: measured in Chromium, an anchor inside
68
72
  * one is exposed as a child and the row loses its accessible name entirely.
69
73
  * So the anchor *is* the row, carrying `menuitem` and the `tabindex` the menu
70
- * roves, which is the same manoeuvre `Tree.Item` makes and the reason `href`
74
+ * roves, which is the same maneuver `Tree.Item` makes and the reason `href`
71
75
  * changes the markup rather than only adding an attribute.
72
76
  *
73
77
  * **`Option` cannot have this and the reason is worth knowing**, since a
@@ -81,22 +85,6 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
81
85
  * focus really moves to the row.
82
86
  */
83
87
  href: string;
84
- /**
85
- * Where the link opens, for the rows that should leave the page.
86
- */
87
- target: string;
88
- /**
89
- * The relationship, which `target="_blank"` should always set.
90
- */
91
- rel: string;
92
- /**
93
- * Whether the link saves the file rather than opening it.
94
- *
95
- * Only meaningful beside an `href`, and only for a file served from this
96
- * origin: the attribute is ignored cross-origin, which is the browser's rule
97
- * about who may name a file on somebody's disk rather than a gap here.
98
- */
99
- download: boolean;
100
88
  /**
101
89
  * Whether this row is on the page currently showing.
102
90
  *
@@ -105,6 +93,10 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
105
93
  * writes: which page is open is the menu's business.
106
94
  */
107
95
  onPage: boolean;
96
+ /**
97
+ * The relationship, which `target="_blank"` should always set.
98
+ */
99
+ rel: string;
108
100
  /**
109
101
  * Whether this row's submenu is the page showing.
110
102
  *
@@ -115,6 +107,14 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
115
107
  * page has to keep the slot even when it shows no row of its own.
116
108
  */
117
109
  showingSubmenu: boolean;
110
+ /**
111
+ * Where the link opens, for the rows that should leave the page.
112
+ */
113
+ target: string;
114
+ /**
115
+ * What this row stands for, carried in the event when it is chosen.
116
+ */
117
+ value: string;
118
118
  /**
119
119
  * @internal Read by a parent to identify its children across the light DOM,
120
120
  * which is cheaper than `instanceof` and is why this is public rather than
@@ -124,15 +124,8 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
124
124
  /**
125
125
  * Whether anything was slotted into `submenu`.
126
126
  *
127
- * Client only, and the `?? []` is what makes that true rather than merely
128
- * documented. Lit's element shim carries attributes but not a tree, so
129
- * `children` is undefined on the server, and this getter is read during
130
- * `render`: spreading it threw, and a menu row could not be served at all.
131
- * Found by writing this component's SSR spec, which is the only place it
132
- * could have been found, because every other path runs in a browser.
133
- *
134
- * False on the server is also the right answer rather than a safe one: the
135
- * server cannot know whether a submenu was slotted, and a row that served a
127
+ * False on the server, which is the right answer rather than a safe one: the
128
+ * server cannot know whether a submenu was slotted, and a row that served an
136
129
  * `aria-haspopup` it might not have would be a promise made to a screen
137
130
  * reader on the strength of a guess.
138
131
  */
@@ -140,36 +133,29 @@ export declare class HelixHeadlessMenuItem extends HelixElement {
140
133
  /**
141
134
  * Whether anything is slotted into `submenu`. Read after first render.
142
135
  *
143
- * State rather than a getter over `children`, which is what it was: read
144
- * during `render()` with nothing to re-read it, a submenu arriving after the
145
- * row's first render produced no caret and no `aria-haspopup` while selecting
146
- * the row still drilled in. A framework filling a submenu on demand hit that
147
- * every time. `Tree.Item` backs `branch` the same way for the same reason.
136
+ * State rather than a getter over `children`. A getter is read during
137
+ * `render()` with nothing to re-read it, so a submenu arriving after the
138
+ * row's first render produces no caret and no `aria-haspopup` while selecting
139
+ * the row still drills in, which is what a framework filling a submenu on
140
+ * demand hits every time. `Tree.Item` backs `branch` the same way for the
141
+ * same reason.
148
142
  *
149
143
  * Kept in step by `readSubmenu`, which is bound in the template rather than
150
- * once at first render. See the note there: bound once, a single drill-in left
151
- * it false for good.
152
- *
153
- * False on the server is the right answer rather than a safe one: the server
154
- * cannot know whether a submenu was slotted, and a row that served an
155
- * `aria-haspopup` it might not have would be a promise made to a screen
156
- * reader on the strength of a guess.
144
+ * once at first render. See the note there.
157
145
  */
158
146
  private submenu;
159
147
  protected firstUpdated(changed: PropertyValues): void;
160
148
  /**
161
149
  * Re-reads whether anything is in the submenu, from whichever slot is current.
162
150
  *
163
- * **Bound in the template, and it has to be.** It was `addEventListener` on
164
- * the slot found at `firstUpdated`, which is a different element from the one
165
- * showing a moment later: this row renders a `slot[name="submenu"]` in two
166
- * template branches, one for the row and one for the page it opens, and moving
167
- * between them makes Lit build a new slot and throw the old one away. The
168
- * listener stayed on the discarded slot, and the discarded slot fired
169
- * `slotchange` on its way out with nothing assigned to it any more. So one
170
- * drill-in set `submenu` false and nothing was left listening to set it back:
171
- * every caret in the menu vanished and every row stopped opening. Reported
172
- * from a recording of the sandbox's Environment menu.
151
+ * **Bound in the template, and it has to be.** This row renders a
152
+ * `slot[name="submenu"]` in two template branches, one for the row and one
153
+ * for the page it opens, and moving between them makes Lit build a new slot
154
+ * and throw the old one away. A listener added at `firstUpdated` stays on the
155
+ * discarded slot, which fires `slotchange` on its way out with nothing
156
+ * assigned to it any more: one drill-in sets `submenu` false and nothing is
157
+ * left listening to set it back, so every caret in the menu vanishes and
158
+ * every row stops opening.
173
159
  *
174
160
  * The live slot is asked rather than `event.target`, so it does not matter
175
161
  * which of the two fired or in what order.
@@ -40,17 +40,13 @@ import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
40
40
  * @event {HelixSelectEvent} helix-select - Fired when the row is chosen. Cancelable: refusing it takes the decision and nothing moves.
41
41
  *
42
42
  * @csspart item - The row, which is an `<a>` where `href` is set.
43
- * @csspart mark - The trailing mark: a tick when checked, a caret when it opens.
43
+ * @csspart mark - The trailing mark: a tick when checked, a caret when it opens
44
44
  * a page. One column, because a row is never both.
45
45
  * @csspart start - The leading column, which is a slot and is always there.
46
46
  */
47
47
  let HelixHeadlessMenuItem = class HelixHeadlessMenuItem extends HelixElement {
48
48
  constructor() {
49
49
  super(...arguments);
50
- /**
51
- * What this row stands for, carried in the event when it is chosen.
52
- */
53
- this.value = '';
54
50
  /**
55
51
  * Whether the row is one of a set of choices.
56
52
  *
@@ -71,6 +67,14 @@ let HelixHeadlessMenuItem = class HelixHeadlessMenuItem extends HelixElement {
71
67
  * Whether the row can be chosen.
72
68
  */
73
69
  this.disabled = false;
70
+ /**
71
+ * Whether the link saves the file rather than opening it.
72
+ *
73
+ * Only meaningful beside an `href`, and only for a file served from this
74
+ * origin: the attribute is ignored cross-origin, which is the browser's rule
75
+ * about who may name a file on somebody's disk rather than a gap here.
76
+ */
77
+ this.download = false;
74
78
  /**
75
79
  * Where the row goes, which makes it a real link.
76
80
  *
@@ -78,7 +82,7 @@ let HelixHeadlessMenuItem = class HelixHeadlessMenuItem extends HelixElement {
78
82
  * `menuitem` cannot contain a link: measured in Chromium, an anchor inside
79
83
  * one is exposed as a child and the row loses its accessible name entirely.
80
84
  * So the anchor *is* the row, carrying `menuitem` and the `tabindex` the menu
81
- * roves, which is the same manoeuvre `Tree.Item` makes and the reason `href`
85
+ * roves, which is the same maneuver `Tree.Item` makes and the reason `href`
82
86
  * changes the markup rather than only adding an attribute.
83
87
  *
84
88
  * **`Option` cannot have this and the reason is worth knowing**, since a
@@ -92,22 +96,6 @@ let HelixHeadlessMenuItem = class HelixHeadlessMenuItem extends HelixElement {
92
96
  * focus really moves to the row.
93
97
  */
94
98
  this.href = '';
95
- /**
96
- * Where the link opens, for the rows that should leave the page.
97
- */
98
- this.target = '';
99
- /**
100
- * The relationship, which `target="_blank"` should always set.
101
- */
102
- this.rel = '';
103
- /**
104
- * Whether the link saves the file rather than opening it.
105
- *
106
- * Only meaningful beside an `href`, and only for a file served from this
107
- * origin: the attribute is ignored cross-origin, which is the browser's rule
108
- * about who may name a file on somebody's disk rather than a gap here.
109
- */
110
- this.download = false;
111
99
  /**
112
100
  * Whether this row is on the page currently showing.
113
101
  *
@@ -116,6 +104,10 @@ let HelixHeadlessMenuItem = class HelixHeadlessMenuItem extends HelixElement {
116
104
  * writes: which page is open is the menu's business.
117
105
  */
118
106
  this.onPage = true;
107
+ /**
108
+ * The relationship, which `target="_blank"` should always set.
109
+ */
110
+ this.rel = '';
119
111
  /**
120
112
  * Whether this row's submenu is the page showing.
121
113
  *
@@ -126,6 +118,14 @@ let HelixHeadlessMenuItem = class HelixHeadlessMenuItem extends HelixElement {
126
118
  * page has to keep the slot even when it shows no row of its own.
127
119
  */
128
120
  this.showingSubmenu = false;
121
+ /**
122
+ * Where the link opens, for the rows that should leave the page.
123
+ */
124
+ this.target = '';
125
+ /**
126
+ * What this row stands for, carried in the event when it is chosen.
127
+ */
128
+ this.value = '';
129
129
  /**
130
130
  * @internal Read by a parent to identify its children across the light DOM,
131
131
  * which is cheaper than `instanceof` and is why this is public rather than
@@ -135,35 +135,28 @@ let HelixHeadlessMenuItem = class HelixHeadlessMenuItem extends HelixElement {
135
135
  /**
136
136
  * Whether anything is slotted into `submenu`. Read after first render.
137
137
  *
138
- * State rather than a getter over `children`, which is what it was: read
139
- * during `render()` with nothing to re-read it, a submenu arriving after the
140
- * row's first render produced no caret and no `aria-haspopup` while selecting
141
- * the row still drilled in. A framework filling a submenu on demand hit that
142
- * every time. `Tree.Item` backs `branch` the same way for the same reason.
138
+ * State rather than a getter over `children`. A getter is read during
139
+ * `render()` with nothing to re-read it, so a submenu arriving after the
140
+ * row's first render produces no caret and no `aria-haspopup` while selecting
141
+ * the row still drills in, which is what a framework filling a submenu on
142
+ * demand hits every time. `Tree.Item` backs `branch` the same way for the
143
+ * same reason.
143
144
  *
144
145
  * Kept in step by `readSubmenu`, which is bound in the template rather than
145
- * once at first render. See the note there: bound once, a single drill-in left
146
- * it false for good.
147
- *
148
- * False on the server is the right answer rather than a safe one: the server
149
- * cannot know whether a submenu was slotted, and a row that served an
150
- * `aria-haspopup` it might not have would be a promise made to a screen
151
- * reader on the strength of a guess.
146
+ * once at first render. See the note there.
152
147
  */
153
148
  this.submenu = false;
154
149
  /**
155
150
  * Re-reads whether anything is in the submenu, from whichever slot is current.
156
151
  *
157
- * **Bound in the template, and it has to be.** It was `addEventListener` on
158
- * the slot found at `firstUpdated`, which is a different element from the one
159
- * showing a moment later: this row renders a `slot[name="submenu"]` in two
160
- * template branches, one for the row and one for the page it opens, and moving
161
- * between them makes Lit build a new slot and throw the old one away. The
162
- * listener stayed on the discarded slot, and the discarded slot fired
163
- * `slotchange` on its way out with nothing assigned to it any more. So one
164
- * drill-in set `submenu` false and nothing was left listening to set it back:
165
- * every caret in the menu vanished and every row stopped opening. Reported
166
- * from a recording of the sandbox's Environment menu.
152
+ * **Bound in the template, and it has to be.** This row renders a
153
+ * `slot[name="submenu"]` in two template branches, one for the row and one
154
+ * for the page it opens, and moving between them makes Lit build a new slot
155
+ * and throw the old one away. A listener added at `firstUpdated` stays on the
156
+ * discarded slot, which fires `slotchange` on its way out with nothing
157
+ * assigned to it any more: one drill-in sets `submenu` false and nothing is
158
+ * left listening to set it back, so every caret in the menu vanishes and
159
+ * every row stops opening.
167
160
  *
168
161
  * The live slot is asked rather than `event.target`, so it does not matter
169
162
  * which of the two fired or in what order.
@@ -211,15 +204,8 @@ let HelixHeadlessMenuItem = class HelixHeadlessMenuItem extends HelixElement {
211
204
  /**
212
205
  * Whether anything was slotted into `submenu`.
213
206
  *
214
- * Client only, and the `?? []` is what makes that true rather than merely
215
- * documented. Lit's element shim carries attributes but not a tree, so
216
- * `children` is undefined on the server, and this getter is read during
217
- * `render`: spreading it threw, and a menu row could not be served at all.
218
- * Found by writing this component's SSR spec, which is the only place it
219
- * could have been found, because every other path runs in a browser.
220
- *
221
- * False on the server is also the right answer rather than a safe one: the
222
- * server cannot know whether a submenu was slotted, and a row that served a
207
+ * False on the server, which is the right answer rather than a safe one: the
208
+ * server cannot know whether a submenu was slotted, and a row that served an
223
209
  * `aria-haspopup` it might not have would be a promise made to a screen
224
210
  * reader on the strength of a guess.
225
211
  */
@@ -366,9 +352,6 @@ let HelixHeadlessMenuItem = class HelixHeadlessMenuItem extends HelixElement {
366
352
  <slot name="submenu" @slotchange=${this.readSubmenu}></slot>`;
367
353
  }
368
354
  };
369
- __decorate([
370
- property()
371
- ], HelixHeadlessMenuItem.prototype, "value", void 0);
372
355
  __decorate([
373
356
  property({ reflect: true, type: Boolean })
374
357
  ], HelixHeadlessMenuItem.prototype, "checkable", void 0);
@@ -378,24 +361,27 @@ __decorate([
378
361
  __decorate([
379
362
  property({ reflect: true, type: Boolean })
380
363
  ], HelixHeadlessMenuItem.prototype, "disabled", void 0);
364
+ __decorate([
365
+ property({ type: Boolean })
366
+ ], HelixHeadlessMenuItem.prototype, "download", void 0);
381
367
  __decorate([
382
368
  property()
383
369
  ], HelixHeadlessMenuItem.prototype, "href", void 0);
384
370
  __decorate([
385
- property()
386
- ], HelixHeadlessMenuItem.prototype, "target", void 0);
371
+ property({ attribute: false })
372
+ ], HelixHeadlessMenuItem.prototype, "onPage", void 0);
387
373
  __decorate([
388
374
  property()
389
375
  ], HelixHeadlessMenuItem.prototype, "rel", void 0);
390
- __decorate([
391
- property({ type: Boolean })
392
- ], HelixHeadlessMenuItem.prototype, "download", void 0);
393
- __decorate([
394
- property({ attribute: false })
395
- ], HelixHeadlessMenuItem.prototype, "onPage", void 0);
396
376
  __decorate([
397
377
  property({ attribute: false })
398
378
  ], HelixHeadlessMenuItem.prototype, "showingSubmenu", void 0);
379
+ __decorate([
380
+ property()
381
+ ], HelixHeadlessMenuItem.prototype, "target", void 0);
382
+ __decorate([
383
+ property()
384
+ ], HelixHeadlessMenuItem.prototype, "value", void 0);
399
385
  __decorate([
400
386
  state()
401
387
  ], HelixHeadlessMenuItem.prototype, "submenu", void 0);
@@ -46,32 +46,29 @@ declare const HelixHeadlessMenu_base: (new (...args: any[]) => import("@fusion.d
46
46
  */
47
47
  export declare class HelixHeadlessMenu extends HelixHeadlessMenu_base {
48
48
  /**
49
- * Preferred side.
50
- *
51
- * It moves if that side does not fit.
52
- */
53
- placement: Placement;
54
- /**
55
- * Space between the trigger and the surface, in pixels.
49
+ * What the row returning from a submenu reads.
56
50
  */
57
- offset: number;
51
+ backLabel: string;
58
52
  /**
59
53
  * Accessible name for the surface.
60
54
  */
61
55
  label: string;
62
56
  /**
63
- * What the row returning from a submenu reads.
57
+ * Space between the trigger and the surface, in pixels.
64
58
  */
65
- backLabel: string;
59
+ offset: number;
60
+ /**
61
+ * Preferred side.
62
+ *
63
+ * It moves if that side does not fit.
64
+ */
65
+ placement: Placement;
66
66
  /**
67
67
  * Which page is showing, and what is on it.
68
68
  *
69
- * This was a `page` field, a title getter and an items getter written here.
70
- * None of them were about menus: a settings panel or a navigation tree wants
71
- * the same thing, and could not have it without being a menu. The controller
72
- * holds the same shape, so the port is a rename rather than a rewrite, and it
73
- * adds a real stack: `back()` returns one level instead of to the root, which
74
- * this could not do because it only ever went two deep.
69
+ * A controller rather than fields here, because none of this is about menus:
70
+ * a settings panel or a navigation tree wants the same shape. It holds a real
71
+ * stack, so `back()` returns one level rather than to the root.
75
72
  */
76
73
  private readonly drilldown;
77
74
  /**
@@ -81,14 +78,12 @@ export declare class HelixHeadlessMenu extends HelixHeadlessMenu_base {
81
78
  * choosing are one act in a radio group and two acts here, which is the
82
79
  * distinction the controller was already drawing for `Tabs`.
83
80
  *
84
- * The origin is the selection, which took a wrong turn first and is worth
85
- * recording. `focus` looks like the right reading, since a menu's current row
86
- * is the focused one, but that origin also carries a rule a menu must not
87
- * follow: a press that did not come from the set moves nothing. That rule is
88
- * there for a tab panel, which is a tab stop beside the tabs; a menu's panel
89
- * holds the rows and nothing else, and Down on a menu that has just opened is
90
- * how a reader gets to the first row at all. It moved nothing, and the specs
91
- * written alongside this are what said so.
81
+ * The origin is the selection, and `focus` is the wrong reading however right
82
+ * it looks: that origin also carries a rule a menu must not follow, that a
83
+ * press which did not come from the set moves nothing. That rule is there for
84
+ * a tab panel, which is a tab stop beside the tabs; a menu's panel holds the
85
+ * rows and nothing else, and Down on a menu that has just opened is how a
86
+ * reader gets to the first row at all.
92
87
  *
93
88
  * The horizontal pair is reserved rather than released. Right opens a
94
89
  * submenu and left comes back, which are the platform's own bindings for a
@@ -99,11 +94,10 @@ export declare class HelixHeadlessMenu extends HelixHeadlessMenu_base {
99
94
  /**
100
95
  * Tells a slotted trigger the disclosure state, by property.
101
96
  *
102
- * This menu wrote nothing onto its trigger, which was the right call and cost
103
- * a reader the one thing they needed: a control that opens a menu and never
104
- * says so. The class note above already gives the mechanism for the way out,
105
- * that items are "told by property, not by attribute", and `tellDisclosure`
106
- * is that argument applied one level up. See #322.
97
+ * A control that opens a menu has to say so. By property rather than by
98
+ * attribute, which is the class note's rule about items applied one level up:
99
+ * an attribute written onto a consumer's element after it upgrades is a
100
+ * hydration mismatch waiting to happen.
107
101
  */
108
102
  private tellTrigger;
109
103
  /** The element the surface opens against. */
@@ -122,12 +116,9 @@ export declare class HelixHeadlessMenu extends HelixHeadlessMenu_base {
122
116
  /**
123
117
  * Keeps whatever has focus in sight, however it got there.
124
118
  *
125
- * This was done in the arrow branches, which meant it was true of the arrow
126
- * keys and of nothing else: a row reached by Tab, or focused by the drilldown
127
- * on the way into a page, could sit below the fold of a scrolled panel. On
128
- * `focusin` it is one rule about focus rather than a line repeated in every
129
- * branch that moves it, and it survived the arrow keys moving out to a shared
130
- * controller that knows nothing about this panel.
119
+ * On `focusin` rather than in the branches that move focus: a row reached by
120
+ * Tab, or focused by the drilldown on the way into a page, can otherwise sit
121
+ * below the fold of a scrolled panel.
131
122
  */
132
123
  private readonly handleFocusIn;
133
124
  private readonly handleKeydown;
@@ -138,11 +129,10 @@ export declare class HelixHeadlessMenu extends HelixHeadlessMenu_base {
138
129
  /**
139
130
  * Walks the tree marking which rows are on the page showing.
140
131
  *
141
- * Two levels were marked by hand and nothing wrote `showingSubmenu` on a
142
- * nested row, so drilling into a third-level submenu rendered the header over
143
- * an empty panel: the page existed, its rows were still marked as belonging
144
- * to the level above, and none of them rendered. `Drilldown.mark()` is the
145
- * same walk and was already recursive.
132
+ * Recursive rather than two levels by hand: without `showingSubmenu` on a
133
+ * nested row, drilling into a third-level submenu renders the header over an
134
+ * empty panel, the page existing while its rows are still marked as belonging
135
+ * to the level above. `Drilldown.mark()` is the same walk.
146
136
  *
147
137
  * `slot === 'submenu'` rather than every child, because a row's other
148
138
  * children are its label and its icons.