@webtides/element-library 0.3.1 → 0.4.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 (195) hide show
  1. package/CHANGELOG.md +193 -0
  2. package/README.md +72 -56
  3. package/all.js +16 -0
  4. package/catalog.js +17 -1
  5. package/custom-elements.json +14723 -10220
  6. package/package.json +1 -1
  7. package/src/components/accordion/accordion.changelog.md +11 -0
  8. package/src/components/accordion/accordion.js +15 -3
  9. package/src/components/accordion/accordion.readme.md +27 -1
  10. package/src/components/accordion/accordion.style.js +19 -0
  11. package/src/components/app-bar/app-bar.changelog.md +24 -0
  12. package/src/components/app-bar/app-bar.define.js +3 -0
  13. package/src/components/app-bar/app-bar.js +91 -0
  14. package/src/components/app-bar/app-bar.readme.md +130 -0
  15. package/src/components/app-bar/app-bar.style.js +103 -0
  16. package/src/components/app-frame/app-frame.changelog.md +45 -0
  17. package/src/components/app-frame/app-frame.define.js +3 -0
  18. package/src/components/app-frame/app-frame.events.js +6 -0
  19. package/src/components/app-frame/app-frame.js +1073 -0
  20. package/src/components/app-frame/app-frame.readme.md +416 -0
  21. package/src/components/app-frame/app-frame.style.js +527 -0
  22. package/src/components/button/button.changelog.md +15 -0
  23. package/src/components/button/button.events.js +3 -0
  24. package/src/components/button/button.js +145 -3
  25. package/src/components/button/button.readme.md +72 -4
  26. package/src/components/button/button.style.js +161 -7
  27. package/src/components/description-list/description-list.changelog.md +25 -0
  28. package/src/components/description-list/description-list.define.js +3 -0
  29. package/src/components/description-list/description-list.js +44 -0
  30. package/src/components/description-list/description-list.readme.md +135 -0
  31. package/src/components/description-list/description-list.style.js +140 -0
  32. package/src/components/dialog/dialog.changelog.md +7 -0
  33. package/src/components/dialog/dialog.readme.md +5 -0
  34. package/src/components/dialog/dialog.style.js +17 -2
  35. package/src/components/drawer/drawer.changelog.md +7 -0
  36. package/src/components/drawer/drawer.readme.md +7 -6
  37. package/src/components/drawer/drawer.style.js +35 -2
  38. package/src/components/dropdown/dropdown.readme.md +6 -1
  39. package/src/components/list/list.changelog.md +24 -0
  40. package/src/components/list/list.define.js +3 -0
  41. package/src/components/list/list.js +66 -0
  42. package/src/components/list/list.readme.md +122 -0
  43. package/src/components/list/list.style.js +56 -0
  44. package/src/components/list-item/list-item.changelog.md +24 -0
  45. package/src/components/list-item/list-item.define.js +3 -0
  46. package/src/components/list-item/list-item.js +128 -0
  47. package/src/components/list-item/list-item.readme.md +126 -0
  48. package/src/components/list-item/list-item.style.js +234 -0
  49. package/src/components/menu/menu.changelog.md +27 -0
  50. package/src/components/menu/menu.define.js +3 -0
  51. package/src/components/menu/menu.events.js +5 -0
  52. package/src/components/menu/menu.js +570 -0
  53. package/src/components/menu/menu.readme.md +272 -0
  54. package/src/components/menu/menu.style.js +55 -0
  55. package/src/components/menu-group/menu-group.changelog.md +20 -0
  56. package/src/components/menu-group/menu-group.define.js +3 -0
  57. package/src/components/menu-group/menu-group.js +44 -0
  58. package/src/components/menu-group/menu-group.readme.md +74 -0
  59. package/src/components/menu-group/menu-group.style.js +38 -0
  60. package/src/components/menu-item/menu-item.changelog.md +24 -0
  61. package/src/components/menu-item/menu-item.define.js +3 -0
  62. package/src/components/menu-item/menu-item.js +130 -0
  63. package/src/components/menu-item/menu-item.readme.md +94 -0
  64. package/src/components/menu-item/menu-item.style.js +87 -0
  65. package/src/components/nav/nav.changelog.md +35 -0
  66. package/src/components/nav/nav.define.js +3 -0
  67. package/src/components/nav/nav.js +212 -0
  68. package/src/components/nav/nav.readme.md +248 -0
  69. package/src/components/nav/nav.style.js +269 -0
  70. package/src/components/nav-item/nav-item.changelog.md +25 -0
  71. package/src/components/nav-item/nav-item.define.js +3 -0
  72. package/src/components/nav-item/nav-item.js +75 -0
  73. package/src/components/nav-item/nav-item.readme.md +111 -0
  74. package/src/components/nav-item/nav-item.style.js +159 -0
  75. package/src/components/pagination/pagination.changelog.md +8 -0
  76. package/src/components/pagination/pagination.js +123 -49
  77. package/src/components/pagination/pagination.readme.md +24 -6
  78. package/src/components/pagination/pagination.style.js +11 -1
  79. package/src/components/scroll-to-top/scroll-to-top.changelog.md +7 -5
  80. package/src/components/scroll-to-top/scroll-to-top.js +16 -12
  81. package/src/components/scroll-to-top/scroll-to-top.readme.md +2 -0
  82. package/src/components/segmented-field/segmented-field.changelog.md +27 -0
  83. package/src/components/segmented-field/segmented-field.define.js +3 -0
  84. package/src/components/segmented-field/segmented-field.js +175 -0
  85. package/src/components/segmented-field/segmented-field.readme.md +140 -0
  86. package/src/components/segmented-field/segmented-field.style.js +193 -0
  87. package/src/components/splitter/splitter.changelog.md +24 -0
  88. package/src/components/splitter/splitter.define.js +3 -0
  89. package/src/components/splitter/splitter.events.js +4 -0
  90. package/src/components/splitter/splitter.js +237 -0
  91. package/src/components/splitter/splitter.readme.md +164 -0
  92. package/src/components/splitter/splitter.style.js +100 -0
  93. package/src/components/status-bar/status-bar.changelog.md +25 -0
  94. package/src/components/status-bar/status-bar.define.js +3 -0
  95. package/src/components/status-bar/status-bar.js +74 -0
  96. package/src/components/status-bar/status-bar.readme.md +139 -0
  97. package/src/components/status-bar/status-bar.style.js +122 -0
  98. package/src/components/tab-group/tab-group.changelog.md +7 -0
  99. package/src/components/tab-group/tab-group.js +30 -9
  100. package/src/components/tab-group/tab-group.readme.md +14 -0
  101. package/src/components/toast/toast.changelog.md +6 -0
  102. package/src/components/toast/toast.readme.md +5 -3
  103. package/src/components/toast/toast.style.js +22 -6
  104. package/src/components/toolbar/toolbar.changelog.md +24 -0
  105. package/src/components/toolbar/toolbar.define.js +3 -0
  106. package/src/components/toolbar/toolbar.js +233 -0
  107. package/src/components/toolbar/toolbar.readme.md +156 -0
  108. package/src/components/toolbar/toolbar.style.js +49 -0
  109. package/src/components/tooltip/tooltip.changelog.md +11 -0
  110. package/src/components/tooltip/tooltip.js +51 -4
  111. package/src/components/tooltip/tooltip.readme.md +26 -1
  112. package/src/components/tree/tree.changelog.md +23 -0
  113. package/src/components/tree/tree.define.js +3 -0
  114. package/src/components/tree/tree.js +138 -0
  115. package/src/components/tree/tree.readme.md +119 -0
  116. package/src/components/tree/tree.style.js +16 -0
  117. package/src/components/tree-item/tree-item.changelog.md +23 -0
  118. package/src/components/tree-item/tree-item.define.js +3 -0
  119. package/src/components/tree-item/tree-item.events.js +3 -0
  120. package/src/components/tree-item/tree-item.js +246 -0
  121. package/src/components/tree-item/tree-item.readme.md +128 -0
  122. package/src/components/tree-item/tree-item.style.js +226 -0
  123. package/src/styles/appearance.style.js +47 -0
  124. package/src/styles/choice-group.style.js +1 -1
  125. package/src/styles/modal.style.js +14 -1
  126. package/src/styles/size.style.js +41 -0
  127. package/src/utils/focus.js +69 -0
  128. package/src/utils/scroll.js +24 -0
  129. package/types/all.d.ts +16 -0
  130. package/types/src/components/accordion/accordion.d.ts +3 -1
  131. package/types/src/components/app-bar/app-bar.d.ts +43 -0
  132. package/types/src/components/app-bar/app-bar.define.d.ts +1 -0
  133. package/types/src/components/app-bar/app-bar.style.d.ts +2 -0
  134. package/types/src/components/app-frame/app-frame.d.ts +491 -0
  135. package/types/src/components/app-frame/app-frame.define.d.ts +1 -0
  136. package/types/src/components/app-frame/app-frame.events.d.ts +7 -0
  137. package/types/src/components/app-frame/app-frame.style.d.ts +8 -0
  138. package/types/src/components/button/button.d.ts +61 -0
  139. package/types/src/components/button/button.events.d.ts +4 -0
  140. package/types/src/components/description-list/description-list.d.ts +29 -0
  141. package/types/src/components/description-list/description-list.define.d.ts +1 -0
  142. package/types/src/components/description-list/description-list.style.d.ts +2 -0
  143. package/types/src/components/list/list.d.ts +39 -0
  144. package/types/src/components/list/list.define.d.ts +1 -0
  145. package/types/src/components/list/list.style.d.ts +2 -0
  146. package/types/src/components/list-item/list-item.d.ts +62 -0
  147. package/types/src/components/list-item/list-item.define.d.ts +1 -0
  148. package/types/src/components/list-item/list-item.style.d.ts +2 -0
  149. package/types/src/components/menu/menu.d.ts +266 -0
  150. package/types/src/components/menu/menu.define.d.ts +1 -0
  151. package/types/src/components/menu/menu.events.d.ts +6 -0
  152. package/types/src/components/menu/menu.style.d.ts +2 -0
  153. package/types/src/components/menu-group/menu-group.d.ts +24 -0
  154. package/types/src/components/menu-group/menu-group.define.d.ts +1 -0
  155. package/types/src/components/menu-group/menu-group.style.d.ts +2 -0
  156. package/types/src/components/menu-item/menu-item.d.ts +59 -0
  157. package/types/src/components/menu-item/menu-item.define.d.ts +1 -0
  158. package/types/src/components/menu-item/menu-item.style.d.ts +2 -0
  159. package/types/src/components/nav/nav.d.ts +103 -0
  160. package/types/src/components/nav/nav.define.d.ts +1 -0
  161. package/types/src/components/nav/nav.style.d.ts +2 -0
  162. package/types/src/components/nav-item/nav-item.d.ts +39 -0
  163. package/types/src/components/nav-item/nav-item.define.d.ts +1 -0
  164. package/types/src/components/nav-item/nav-item.style.d.ts +2 -0
  165. package/types/src/components/pagination/pagination.d.ts +31 -2
  166. package/types/src/components/scroll-to-top/scroll-to-top.d.ts +6 -5
  167. package/types/src/components/segmented-field/segmented-field.d.ts +85 -0
  168. package/types/src/components/segmented-field/segmented-field.define.d.ts +1 -0
  169. package/types/src/components/segmented-field/segmented-field.style.d.ts +2 -0
  170. package/types/src/components/splitter/splitter.d.ts +127 -0
  171. package/types/src/components/splitter/splitter.define.d.ts +1 -0
  172. package/types/src/components/splitter/splitter.events.d.ts +5 -0
  173. package/types/src/components/splitter/splitter.style.d.ts +2 -0
  174. package/types/src/components/status-bar/status-bar.d.ts +44 -0
  175. package/types/src/components/status-bar/status-bar.define.d.ts +1 -0
  176. package/types/src/components/status-bar/status-bar.style.d.ts +2 -0
  177. package/types/src/components/tab-group/tab-group.d.ts +17 -0
  178. package/types/src/components/toolbar/toolbar.d.ts +96 -0
  179. package/types/src/components/toolbar/toolbar.define.d.ts +1 -0
  180. package/types/src/components/toolbar/toolbar.style.d.ts +2 -0
  181. package/types/src/components/tooltip/tooltip.d.ts +26 -0
  182. package/types/src/components/tree/tree.d.ts +62 -0
  183. package/types/src/components/tree/tree.define.d.ts +1 -0
  184. package/types/src/components/tree/tree.style.d.ts +2 -0
  185. package/types/src/components/tree-item/tree-item.d.ts +106 -0
  186. package/types/src/components/tree-item/tree-item.define.d.ts +1 -0
  187. package/types/src/components/tree-item/tree-item.events.d.ts +4 -0
  188. package/types/src/components/tree-item/tree-item.style.d.ts +2 -0
  189. package/types/src/styles/appearance.style.d.ts +31 -0
  190. package/types/src/styles/choice-group.style.d.ts +1 -1
  191. package/types/src/styles/modal.style.d.ts +5 -0
  192. package/types/src/styles/size.style.d.ts +24 -0
  193. package/types/src/utils/focus.d.ts +25 -0
  194. package/types/src/utils/scroll.d.ts +11 -0
  195. package/web-types.json +2530 -393
@@ -0,0 +1,234 @@
1
+ import hostStyle from '../../styles/host.style.js';
2
+
3
+ const css = String.raw;
4
+
5
+ const style = css`
6
+ /*
7
+ * A row of the grid of its list: it spans the two columns and takes them over, so its start is
8
+ * in the first one and its texts begin where the texts of the other rows do. A row that is in
9
+ * no list has two columns of its own.
10
+ */
11
+ :host {
12
+ display: grid;
13
+ grid-column: 1 / -1;
14
+ grid-template-columns: var(--_el-list-columns, auto minmax(0, 1fr));
15
+ min-width: 0;
16
+ }
17
+
18
+ .item {
19
+ /* What the list tells its rows ends here: a row of another list in the content of this
20
+ one is in no grid of this list. */
21
+ --_el-list-columns: initial;
22
+ --_el-list-item-padding-inline: var(--el-list-padding-inline, var(--el-space-4, 1rem));
23
+ --_el-list-item-gap: var(--el-space-3, 0.75rem);
24
+
25
+ display: grid;
26
+ grid-column: 1 / -1;
27
+ grid-template-columns: subgrid;
28
+ align-items: center;
29
+ /* The link of a row is as large as this box, and the control at its end lies on top of
30
+ the link. Both stay inside of the row. */
31
+ position: relative;
32
+ isolation: isolate;
33
+ min-width: 0;
34
+ padding: var(--_el-list-padding-block, var(--el-space-3, 0.75rem)) var(--_el-list-item-padding-inline);
35
+ color: var(--el-color-fg, inherit);
36
+ font-family: var(--el-font-family, inherit);
37
+ font-size: var(--el-font-size-md, inherit);
38
+ line-height: var(--el-line-height, inherit);
39
+ transition: background var(--el-duration-md, 0s) var(--el-ease, linear);
40
+ /* The line between two rows. Without a theme it has no width. It is drawn inside of the
41
+ shadow root: a reset of the page that takes the border off every element reaches the
42
+ host, and wins there. */
43
+ border-block-start: var(--el-border-width, 0) solid var(--el-color-border, transparent);
44
+ }
45
+
46
+ /* Nothing stands above the first row. */
47
+ :host(:first-of-type) .item {
48
+ border-block-start: none;
49
+ }
50
+
51
+ /* ── Start ────────────────────────────────────────────────────────────── */
52
+
53
+ .start {
54
+ display: flex;
55
+ align-items: center;
56
+ }
57
+
58
+ /* The gap to the texts comes with what is slotted, so a row without a start has none, and a
59
+ list without a start in any row has no first column. A margin of the page wins over it. */
60
+ ::slotted([slot='start']) {
61
+ flex: none;
62
+ margin-inline-end: var(--_el-list-item-gap);
63
+ }
64
+
65
+ /* ── Mark ─────────────────────────────────────────────────────────────── */
66
+
67
+ /* A dot in the middle of the padding at the start of the row. It is out of the flow, so a row
68
+ with a mark has its start and its texts where a row without one has them. A border draws
69
+ it: forced colours take a background away. */
70
+ .mark {
71
+ position: absolute;
72
+ inset-block-start: 50%;
73
+ inset-inline-start: calc(var(--_el-list-item-padding-inline) / 2);
74
+ translate: -50% -50%;
75
+ width: 0;
76
+ height: 0;
77
+ border: 0.25rem solid var(--el-color-accent, currentColor);
78
+ border-radius: 50%;
79
+ pointer-events: none;
80
+ }
81
+
82
+ :host(:dir(rtl)) .mark {
83
+ translate: 50% -50%;
84
+ }
85
+
86
+ /* The text of the mark is for assistive technology alone. */
87
+ .mark-text {
88
+ position: absolute;
89
+ width: 1px;
90
+ height: 1px;
91
+ overflow: hidden;
92
+ clip-path: inset(50%);
93
+ white-space: nowrap;
94
+ }
95
+
96
+ /* ── Texts ────────────────────────────────────────────────────────────── */
97
+
98
+ .body {
99
+ grid-column: 2;
100
+ display: flex;
101
+ align-items: center;
102
+ min-width: 0;
103
+ }
104
+
105
+ /* A text a user typed cannot widen the row: it breaks, inside of a word where it has to. */
106
+ .text {
107
+ display: flex;
108
+ flex: 1 1 auto;
109
+ flex-direction: column;
110
+ min-width: 0;
111
+ overflow-wrap: anywhere;
112
+ }
113
+
114
+ .title {
115
+ display: block;
116
+ min-width: 0;
117
+ color: inherit;
118
+ text-decoration: none;
119
+ }
120
+
121
+ .description {
122
+ display: block;
123
+ min-width: 0;
124
+ color: var(--el-color-fg-muted, inherit);
125
+ font-size: var(--el-font-size-sm, 0.875em);
126
+ }
127
+
128
+ .item--truncate .title,
129
+ .item--truncate .description {
130
+ overflow: hidden;
131
+ text-overflow: ellipsis;
132
+ white-space: nowrap;
133
+ }
134
+
135
+ /* ── End ──────────────────────────────────────────────────────────────── */
136
+
137
+ /* A value, a count, a chevron: it takes the width it has, up to half of the row, and breaks
138
+ after that. */
139
+ .end {
140
+ display: flex;
141
+ flex: 0 1 auto;
142
+ align-items: center;
143
+ min-width: 0;
144
+ max-width: 50%;
145
+ color: var(--el-color-fg-muted, inherit);
146
+ font-size: var(--el-font-size-sm, 0.875em);
147
+ overflow-wrap: anywhere;
148
+ text-align: end;
149
+ }
150
+
151
+ .action {
152
+ display: flex;
153
+ flex: none;
154
+ align-items: center;
155
+ /* On top of the link of the row: a control here is a target of its own. */
156
+ position: relative;
157
+ z-index: 1;
158
+ }
159
+
160
+ ::slotted([slot='end']),
161
+ ::slotted([slot='action']) {
162
+ margin-inline-start: var(--_el-list-item-gap);
163
+ }
164
+
165
+ /* ── A row that is a link ─────────────────────────────────────────────── */
166
+
167
+ /* The link is the title, and its target is the whole row: the box of the row, drawn by the
168
+ link. It lies on the start, the texts and the end, and under the control at the very end. */
169
+ a.title::after {
170
+ content: '';
171
+ position: absolute;
172
+ inset: 0;
173
+ }
174
+
175
+ .item--link {
176
+ cursor: pointer;
177
+ }
178
+
179
+ /* A tint of the text colour, which shows on every background. Hover only where the pointer
180
+ can hover: a touch screen leaves :hover on the row that was tapped last. */
181
+ @media (hover: hover) {
182
+ .item--link:has(a.title:hover) {
183
+ background: color-mix(in srgb, currentColor 8%, transparent);
184
+ }
185
+ }
186
+
187
+ .item--link:has(a.title:active) {
188
+ background: color-mix(in srgb, currentColor 16%, transparent);
189
+ }
190
+
191
+ /* The ring of a theme, and without one a ring in the colour of the text. It is drawn around
192
+ the row and inside of it: a list with round corners clips what is outside. */
193
+ a.title:focus-visible {
194
+ outline: none;
195
+ }
196
+
197
+ a.title:focus-visible::after {
198
+ outline: var(--el-focus-ring-width, 2px) solid var(--el-color-focus-ring, currentColor);
199
+ outline-offset: calc(-1 * var(--el-focus-ring-width, 2px));
200
+ }
201
+
202
+ /* ── The current row ──────────────────────────────────────────────────── */
203
+
204
+ /* A fill, a bar at the start and a heavier title. The bar and the weight tell the row apart
205
+ without a colour; the bar is a border, which forced colours keep. */
206
+ .item--current {
207
+ background: color-mix(in srgb, currentColor 8%, transparent);
208
+ }
209
+
210
+ .item--current::before {
211
+ content: '';
212
+ position: absolute;
213
+ inset-block: 0;
214
+ inset-inline-start: 0;
215
+ border-inline-start: 0.1875rem solid var(--el-color-accent, currentColor);
216
+ pointer-events: none;
217
+ }
218
+
219
+ .item--current .title {
220
+ font-weight: var(--el-font-weight-semibold, 600);
221
+ }
222
+
223
+ /* ── Touch screens ────────────────────────────────────────────────────── */
224
+
225
+ /* On a coarse pointer a row that is a link is at least --el-touch-target high. Without the
226
+ token the sizes stay as they are. */
227
+ @media (any-pointer: coarse) {
228
+ .item--link {
229
+ min-height: var(--el-touch-target, auto);
230
+ }
231
+ }
232
+ `;
233
+
234
+ export default [hostStyle(), style].join('\n');
@@ -0,0 +1,27 @@
1
+ # Change Log
2
+
3
+ All notable changes to this component live here. Versions refer to the parent `@webtides/element-library` release (see root [`CHANGELOG.md`](../../../CHANGELOG.md)); components no longer version independently.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/).
6
+
7
+ <!--
8
+ When your PR touches this component, add an entry under Unreleased and
9
+ mirror it (prefixed with the component name) in root CHANGELOG.md.
10
+ Uncomment headings as needed.
11
+ -->
12
+
13
+ ## Unreleased
14
+
15
+ ## [0.4.0] - 2026-11-27
16
+
17
+ ### Added
18
+
19
+ - Initial `el-menu`: a menu button. A button of the page in the `trigger` slot opens a list of actions, which are `el-menu-item` elements. To assistive technology it is a menu (`role="menu"`) of menu items, and the button says that it opens one and whether it is open (`aria-haspopup="menu"`, `aria-expanded`). ([#167](https://github.com/webtides/element-library/issues/167))
20
+ - A click, `Enter`, `Space` and `ArrowDown` on the button open the menu and put the focus on its first entry, `ArrowUp` on its last. In the menu the arrow keys move through the entries and around the ends, `Home` and `End` go to the first and to the last, and a letter goes to the next entry that starts with it.
21
+ - `Escape` closes the menu and gives the focus back to the button. The Tab key closes it and moves on, and a click beside it closes it.
22
+ - Choosing an entry closes the menu and fires `menu-select`, with the entry in `detail.item` and its `value` in `detail.value`. `menu-show` and `menu-hide` tell of the menu itself, `open` (reflected) and `:state(open)` say whether it is shown, and `show()`, `hide()` and `toggle()` open and close it from a script.
23
+ - The panel is a native popover in the top layer: nothing clips it, and it moves nothing on the page. It is placed at the button with Floating UI, at the side `placement` names (`bottom-start` by default) with a gap of `distance`, on the other side without room there, and never outside of the viewport. A long menu scrolls in what the browser shows. The menu opens and closes that popover itself (`popover="manual"`): a pointer that goes down beside it closes it, `Escape` in the menu closes it and leaves a dialog around it open, and a menu that opens closes the one before it. One the platform closes (`auto`) would be gone when the finger of a long press is lifted.
24
+ - A surface, a border and a shadow from the tokens, with the colours of the system without a theme. `--el-menu-min-width` (`10rem`) and `--el-menu-max-width` (`20rem`) bound its width. An `el-divider` in the menu is a line between two entries.
25
+ - `showAt(place, opener)`: one menu for many things, the rows of a list. It opens the menu at a point of the viewport, for a right click or a long press, with the corner of the menu at the point and the menu inside of the viewport, or at an element of the page, the button of a row, placed as at its own button. ([#186](https://github.com/webtides/element-library/issues/186))
26
+ - What the menu is opened for is its `opener`: the property while the menu is open, `detail.opener` of `menu-select`, and what gets the focus back. An open menu moves when `showAt()` is called again, and tells of both rows (`menu-hide`, `menu-show`).
27
+ - A button of the page that says that it opens a menu (`aria-haspopup="menu"`) is told whether the menu is open for it (`aria-expanded`), and gives the menu its name while it has no `label`.
@@ -0,0 +1,3 @@
1
+ import { define } from './menu.js';
2
+
3
+ define();
@@ -0,0 +1,5 @@
1
+ export default {
2
+ SHOW: 'menu-show',
3
+ HIDE: 'menu-hide',
4
+ SELECT: 'menu-select',
5
+ };