@duskmoon-dev/core 1.19.6 → 1.19.7
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.
- package/README.md +8 -6
- package/dist/components/bottom-navigation.css +127 -24
- package/dist/components/breadcrumbs.css +252 -0
- package/dist/components/index.css +691 -195
- package/dist/components/link.css +43 -0
- package/dist/components/megamenu.css +298 -0
- package/dist/components/menu.css +175 -0
- package/dist/components/navbar.css +283 -0
- package/dist/components/navigation.css +513 -149
- package/dist/components/nested-menu.css +19 -4
- package/dist/components/pagination.css +216 -0
- package/dist/components/stepper.css +33 -19
- package/dist/components/tabs.css +101 -0
- package/dist/esm/components/bottom-navigation.js +127 -24
- package/dist/esm/components/breadcrumbs.d.ts +5 -0
- package/dist/esm/components/breadcrumbs.js +261 -0
- package/dist/esm/components/link.d.ts +5 -0
- package/dist/esm/components/link.js +52 -0
- package/dist/esm/components/megamenu.d.ts +5 -0
- package/dist/esm/components/megamenu.js +307 -0
- package/dist/esm/components/menu.d.ts +5 -0
- package/dist/esm/components/menu.js +184 -0
- package/dist/esm/components/navbar.d.ts +5 -0
- package/dist/esm/components/navbar.js +292 -0
- package/dist/esm/components/navigation.js +513 -149
- package/dist/esm/components/nested-menu.js +19 -4
- package/dist/esm/components/pagination.d.ts +5 -0
- package/dist/esm/components/pagination.js +225 -0
- package/dist/esm/components/stepper.js +33 -19
- package/dist/esm/components/tabs.d.ts +5 -0
- package/dist/esm/components/tabs.js +110 -0
- package/dist/index.css +691 -195
- package/dist/index.min.css +1 -1
- package/dist/standalone/duskmoonui-themes.css +1 -1
- package/dist/standalone/duskmoonui.css +693 -197
- package/dist/standalone/duskmoonui.js +9 -6
- package/dist/standalone/duskmoonui.mjs +9 -6
- package/package.json +43 -1
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
// Auto-generated from megamenu.css
|
|
2
|
+
export const css = `/**
|
|
3
|
+
* Megamenu is a CSS composition layer over native popovers, Menu, and Link.
|
|
4
|
+
* Give each trigger/panel pair a unique --megamenu-anchor custom identifier.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Menu Component Styles
|
|
8
|
+
* DuskMoonUI - Material Design 3 inspired dropdown menu
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
@layer components {
|
|
12
|
+
.menu {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-wrap: wrap;
|
|
15
|
+
list-style: none;
|
|
16
|
+
margin: 0;
|
|
17
|
+
padding: 0.5rem;
|
|
18
|
+
gap: 0.25rem;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Native floating menu. Keep closed popovers hidden despite the base flex layout. */
|
|
22
|
+
.menu[popover] {
|
|
23
|
+
display: none;
|
|
24
|
+
position: absolute;
|
|
25
|
+
inset: auto;
|
|
26
|
+
margin: 0.5rem;
|
|
27
|
+
min-width: 12rem;
|
|
28
|
+
max-width: calc(100vw - 1rem);
|
|
29
|
+
max-height: calc(100dvh - 1rem);
|
|
30
|
+
overflow: auto;
|
|
31
|
+
color: var(--color-on-surface);
|
|
32
|
+
background-color: var(--color-surface-container);
|
|
33
|
+
border: 1px solid var(--color-outline-variant);
|
|
34
|
+
border-radius: var(--radius-md);
|
|
35
|
+
box-shadow: var(--shadow-lg);
|
|
36
|
+
position-area: bottom;
|
|
37
|
+
position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
|
|
38
|
+
opacity: 0;
|
|
39
|
+
transform: scale(0.95);
|
|
40
|
+
transition:
|
|
41
|
+
opacity 150ms ease-out,
|
|
42
|
+
transform 150ms ease-out,
|
|
43
|
+
overlay 150ms ease-out allow-discrete,
|
|
44
|
+
display 150ms ease-out allow-discrete;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.menu[popover]:popover-open {
|
|
48
|
+
display: flex;
|
|
49
|
+
opacity: 1;
|
|
50
|
+
transform: scale(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@starting-style {
|
|
54
|
+
.menu[popover]:popover-open {
|
|
55
|
+
opacity: 0;
|
|
56
|
+
transform: scale(0.95);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.menu[popover]::backdrop {
|
|
61
|
+
background-color: transparent;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.menu-top[popover] {
|
|
65
|
+
position-area: top;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.menu-bottom[popover] {
|
|
69
|
+
position-area: bottom;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.menu-left[popover] {
|
|
73
|
+
position-area: left;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.menu-right[popover] {
|
|
77
|
+
position-area: right;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.menu > li {
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.menu > li > a,
|
|
86
|
+
.menu > li > button,
|
|
87
|
+
.menu-item {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
gap: 0.5rem;
|
|
91
|
+
padding: 0.5rem 1rem;
|
|
92
|
+
font-size: 0.875rem;
|
|
93
|
+
color: var(--color-on-surface);
|
|
94
|
+
text-decoration: none;
|
|
95
|
+
border-radius: var(--radius-sm);
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
transition: background-color 150ms ease-in-out, color 150ms ease-in-out;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.menu > li > a:hover,
|
|
102
|
+
.menu > li > button:hover,
|
|
103
|
+
.menu-item:hover {
|
|
104
|
+
background-color: var(--color-surface-container);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.menu > li > a:focus-visible,
|
|
108
|
+
.menu > li > button:focus-visible,
|
|
109
|
+
.menu-item:focus-visible {
|
|
110
|
+
outline: none;
|
|
111
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.menu > li > a.active,
|
|
115
|
+
.menu > li > button.active,
|
|
116
|
+
.menu-item.active,
|
|
117
|
+
.menu > li > a[aria-current="page"],
|
|
118
|
+
.menu > li > button[aria-current="page"] {
|
|
119
|
+
background-color: var(--color-primary-container);
|
|
120
|
+
color: var(--color-on-primary-container);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.menu-item[aria-current="page"] {
|
|
124
|
+
background-color: var(--color-primary-container);
|
|
125
|
+
color: var(--color-on-primary-container);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.menu > li.disabled > a,
|
|
129
|
+
.menu > li.disabled > button,
|
|
130
|
+
.menu-item:disabled,
|
|
131
|
+
.menu > li > button:disabled,
|
|
132
|
+
.menu-item[aria-disabled="true"] {
|
|
133
|
+
opacity: 0.5;
|
|
134
|
+
cursor: not-allowed;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.menu-horizontal {
|
|
138
|
+
flex-direction: row;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.menu-vertical {
|
|
142
|
+
flex-direction: column;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.menu-vertical li {
|
|
146
|
+
width: 100%;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.menu-vertical li > a,
|
|
150
|
+
.menu-vertical li > button,
|
|
151
|
+
.menu-vertical .menu-item {
|
|
152
|
+
width: 100%;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.menu-compact li > a,
|
|
156
|
+
.menu-compact li > button,
|
|
157
|
+
.menu-compact .menu-item {
|
|
158
|
+
padding: 0.375rem 0.75rem;
|
|
159
|
+
font-size: 0.8125rem;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.menu-title {
|
|
163
|
+
padding: 0.5rem 1rem;
|
|
164
|
+
font-size: 0.75rem;
|
|
165
|
+
font-weight: 600;
|
|
166
|
+
text-transform: uppercase;
|
|
167
|
+
letter-spacing: 0.05em;
|
|
168
|
+
color: var(--color-on-surface-variant);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Reduce Motion */
|
|
172
|
+
@media (prefers-reduced-motion: reduce) {
|
|
173
|
+
.menu > li > a,
|
|
174
|
+
.menu > li > button,
|
|
175
|
+
.menu-item,
|
|
176
|
+
.menu[popover] {
|
|
177
|
+
transition: none;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** DuskMoonUI text-link primitive. */
|
|
183
|
+
@layer components {
|
|
184
|
+
.link {
|
|
185
|
+
color: var(--color-primary);
|
|
186
|
+
text-decoration-line: underline;
|
|
187
|
+
text-decoration-thickness: 0.08em;
|
|
188
|
+
text-underline-offset: 0.18em;
|
|
189
|
+
overflow-wrap: anywhere;
|
|
190
|
+
cursor: pointer;
|
|
191
|
+
transition: color 150ms ease-in-out, text-decoration-color 150ms ease-in-out,
|
|
192
|
+
background-color 150ms ease-in-out;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.link:hover {
|
|
196
|
+
color: color-mix(in oklch, var(--color-primary), var(--color-on-surface) 18%);
|
|
197
|
+
text-decoration-thickness: 0.12em;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.link:active {
|
|
201
|
+
color: color-mix(in oklch, var(--color-primary), var(--color-on-surface) 30%);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.link:focus-visible {
|
|
205
|
+
outline: 2px solid currentColor;
|
|
206
|
+
outline-offset: 3px;
|
|
207
|
+
border-radius: var(--radius-xs);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.link-hover { text-decoration-color: transparent; }
|
|
211
|
+
.link-hover:hover,
|
|
212
|
+
.link-hover:focus-visible { text-decoration-color: currentColor; }
|
|
213
|
+
.link-primary { color: var(--color-primary); }
|
|
214
|
+
.link-secondary { color: var(--color-secondary); }
|
|
215
|
+
.link-tertiary { color: var(--color-tertiary); }
|
|
216
|
+
.link-neutral,
|
|
217
|
+
.link-inherit { color: inherit; }
|
|
218
|
+
.link-neutral:hover,
|
|
219
|
+
.link-inherit:hover { color: color-mix(in oklch, currentColor, var(--color-on-surface) 18%); }
|
|
220
|
+
|
|
221
|
+
@media (prefers-reduced-motion: reduce) {
|
|
222
|
+
.link { transition: none; }
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
@layer components {
|
|
228
|
+
.megamenu { position: relative; display: flex; align-items: center; max-width: 100%; }
|
|
229
|
+
.megamenu-bar {
|
|
230
|
+
display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem;
|
|
231
|
+
margin: 0; padding: 0; list-style: none;
|
|
232
|
+
}
|
|
233
|
+
.megamenu-trigger {
|
|
234
|
+
anchor-name: var(--megamenu-anchor);
|
|
235
|
+
display: inline-flex; align-items: center; gap: 0.375rem;
|
|
236
|
+
padding: 0.625rem 0.875rem; color: var(--color-on-surface);
|
|
237
|
+
background: transparent; border: 0; border-radius: var(--radius-sm);
|
|
238
|
+
font: inherit; cursor: pointer;
|
|
239
|
+
}
|
|
240
|
+
.megamenu-trigger:hover,
|
|
241
|
+
.megamenu-trigger[aria-expanded="true"],
|
|
242
|
+
.megamenu:has(.megamenu-panel:popover-open) .megamenu-trigger {
|
|
243
|
+
color: var(--color-on-primary-container);
|
|
244
|
+
background-color: var(--color-primary-container);
|
|
245
|
+
}
|
|
246
|
+
.megamenu-trigger:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
|
|
247
|
+
.megamenu-panel[popover] {
|
|
248
|
+
position-anchor: var(--megamenu-anchor);
|
|
249
|
+
position-area: block-end span-inline-end;
|
|
250
|
+
position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
|
|
251
|
+
display: none; box-sizing: border-box;
|
|
252
|
+
width: min(48rem, calc(100vw - 2rem)); max-width: calc(100vw - 2rem);
|
|
253
|
+
max-height: min(36rem, calc(100dvh - 2rem)); margin: 0.5rem; padding: 1rem;
|
|
254
|
+
overflow: auto; color: var(--color-on-surface);
|
|
255
|
+
background-color: var(--color-surface-container);
|
|
256
|
+
border: 1px solid var(--color-outline-variant); border-radius: var(--radius-lg);
|
|
257
|
+
box-shadow: var(--shadow-lg); opacity: 0;
|
|
258
|
+
transform: translateY(-0.25rem) scale(0.98);
|
|
259
|
+
transition: opacity 150ms ease-out, transform 150ms ease-out,
|
|
260
|
+
overlay 150ms ease-out allow-discrete, display 150ms ease-out allow-discrete;
|
|
261
|
+
}
|
|
262
|
+
.megamenu-panel[popover]:popover-open { display: block; opacity: 1; transform: translateY(0) scale(1); }
|
|
263
|
+
.megamenu-panel-full[popover] { width: calc(100vw - 2rem); }
|
|
264
|
+
.megamenu-grid {
|
|
265
|
+
display: grid;
|
|
266
|
+
grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
|
|
267
|
+
gap: 1.25rem;
|
|
268
|
+
}
|
|
269
|
+
.megamenu-group { min-width: 0; }
|
|
270
|
+
.megamenu-heading {
|
|
271
|
+
margin: 0 0 0.5rem; color: var(--color-on-surface); font-size: 0.75rem;
|
|
272
|
+
font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
|
|
273
|
+
}
|
|
274
|
+
.megamenu-panel .menu { flex-direction: column; padding: 0; }
|
|
275
|
+
.megamenu-panel .menu > li,
|
|
276
|
+
.megamenu-panel .menu > li > .link { width: 100%; }
|
|
277
|
+
.megamenu-supporting { color: var(--color-on-surface-variant); font-size: 0.875rem; }
|
|
278
|
+
|
|
279
|
+
@starting-style {
|
|
280
|
+
.megamenu-panel[popover]:popover-open { opacity: 0; transform: translateY(-0.25rem) scale(0.98); }
|
|
281
|
+
}
|
|
282
|
+
@supports not (position-area: bottom) {
|
|
283
|
+
.megamenu-panel[popover] { position: fixed; inset: 4.5rem 1rem auto; margin-inline: auto; }
|
|
284
|
+
}
|
|
285
|
+
/* Baseline fallback: without Popover API support, links remain visible and reachable. */
|
|
286
|
+
@supports not selector(:popover-open) {
|
|
287
|
+
.megamenu { display: block; }
|
|
288
|
+
.megamenu-panel[popover] {
|
|
289
|
+
position: static; display: block; width: 100%; max-width: 100%; max-height: none;
|
|
290
|
+
margin: 0.5rem 0 0; opacity: 1; transform: none;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
@media (max-width: 47.999rem) {
|
|
294
|
+
.megamenu-desktop { display: none; }
|
|
295
|
+
.megamenu-mobile { display: block; }
|
|
296
|
+
}
|
|
297
|
+
@media (min-width: 48rem) { .megamenu-mobile { display: none; } }
|
|
298
|
+
@media (prefers-reduced-motion: reduce) { .megamenu-panel[popover] { transition: none; } }
|
|
299
|
+
}
|
|
300
|
+
`;
|
|
301
|
+
|
|
302
|
+
const sheet = typeof CSSStyleSheet !== 'undefined' ? new CSSStyleSheet() : null;
|
|
303
|
+
if (sheet) {
|
|
304
|
+
sheet.replaceSync(css);
|
|
305
|
+
}
|
|
306
|
+
export const styles = sheet;
|
|
307
|
+
export default sheet;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
// Auto-generated from menu.css
|
|
2
|
+
export const css = `/**
|
|
3
|
+
* Menu Component Styles
|
|
4
|
+
* DuskMoonUI - Material Design 3 inspired dropdown menu
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@layer components {
|
|
8
|
+
.menu {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
list-style: none;
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 0.5rem;
|
|
14
|
+
gap: 0.25rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Native floating menu. Keep closed popovers hidden despite the base flex layout. */
|
|
18
|
+
.menu[popover] {
|
|
19
|
+
display: none;
|
|
20
|
+
position: absolute;
|
|
21
|
+
inset: auto;
|
|
22
|
+
margin: 0.5rem;
|
|
23
|
+
min-width: 12rem;
|
|
24
|
+
max-width: calc(100vw - 1rem);
|
|
25
|
+
max-height: calc(100dvh - 1rem);
|
|
26
|
+
overflow: auto;
|
|
27
|
+
color: var(--color-on-surface);
|
|
28
|
+
background-color: var(--color-surface-container);
|
|
29
|
+
border: 1px solid var(--color-outline-variant);
|
|
30
|
+
border-radius: var(--radius-md);
|
|
31
|
+
box-shadow: var(--shadow-lg);
|
|
32
|
+
position-area: bottom;
|
|
33
|
+
position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
|
|
34
|
+
opacity: 0;
|
|
35
|
+
transform: scale(0.95);
|
|
36
|
+
transition:
|
|
37
|
+
opacity 150ms ease-out,
|
|
38
|
+
transform 150ms ease-out,
|
|
39
|
+
overlay 150ms ease-out allow-discrete,
|
|
40
|
+
display 150ms ease-out allow-discrete;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.menu[popover]:popover-open {
|
|
44
|
+
display: flex;
|
|
45
|
+
opacity: 1;
|
|
46
|
+
transform: scale(1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@starting-style {
|
|
50
|
+
.menu[popover]:popover-open {
|
|
51
|
+
opacity: 0;
|
|
52
|
+
transform: scale(0.95);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.menu[popover]::backdrop {
|
|
57
|
+
background-color: transparent;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.menu-top[popover] {
|
|
61
|
+
position-area: top;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.menu-bottom[popover] {
|
|
65
|
+
position-area: bottom;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.menu-left[popover] {
|
|
69
|
+
position-area: left;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.menu-right[popover] {
|
|
73
|
+
position-area: right;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.menu > li {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-shrink: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.menu > li > a,
|
|
82
|
+
.menu > li > button,
|
|
83
|
+
.menu-item {
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
gap: 0.5rem;
|
|
87
|
+
padding: 0.5rem 1rem;
|
|
88
|
+
font-size: 0.875rem;
|
|
89
|
+
color: var(--color-on-surface);
|
|
90
|
+
text-decoration: none;
|
|
91
|
+
border-radius: var(--radius-sm);
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
transition: background-color 150ms ease-in-out, color 150ms ease-in-out;
|
|
94
|
+
white-space: nowrap;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.menu > li > a:hover,
|
|
98
|
+
.menu > li > button:hover,
|
|
99
|
+
.menu-item:hover {
|
|
100
|
+
background-color: var(--color-surface-container);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.menu > li > a:focus-visible,
|
|
104
|
+
.menu > li > button:focus-visible,
|
|
105
|
+
.menu-item:focus-visible {
|
|
106
|
+
outline: none;
|
|
107
|
+
box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.menu > li > a.active,
|
|
111
|
+
.menu > li > button.active,
|
|
112
|
+
.menu-item.active,
|
|
113
|
+
.menu > li > a[aria-current="page"],
|
|
114
|
+
.menu > li > button[aria-current="page"] {
|
|
115
|
+
background-color: var(--color-primary-container);
|
|
116
|
+
color: var(--color-on-primary-container);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.menu-item[aria-current="page"] {
|
|
120
|
+
background-color: var(--color-primary-container);
|
|
121
|
+
color: var(--color-on-primary-container);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.menu > li.disabled > a,
|
|
125
|
+
.menu > li.disabled > button,
|
|
126
|
+
.menu-item:disabled,
|
|
127
|
+
.menu > li > button:disabled,
|
|
128
|
+
.menu-item[aria-disabled="true"] {
|
|
129
|
+
opacity: 0.5;
|
|
130
|
+
cursor: not-allowed;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.menu-horizontal {
|
|
134
|
+
flex-direction: row;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.menu-vertical {
|
|
138
|
+
flex-direction: column;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.menu-vertical li {
|
|
142
|
+
width: 100%;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.menu-vertical li > a,
|
|
146
|
+
.menu-vertical li > button,
|
|
147
|
+
.menu-vertical .menu-item {
|
|
148
|
+
width: 100%;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.menu-compact li > a,
|
|
152
|
+
.menu-compact li > button,
|
|
153
|
+
.menu-compact .menu-item {
|
|
154
|
+
padding: 0.375rem 0.75rem;
|
|
155
|
+
font-size: 0.8125rem;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.menu-title {
|
|
159
|
+
padding: 0.5rem 1rem;
|
|
160
|
+
font-size: 0.75rem;
|
|
161
|
+
font-weight: 600;
|
|
162
|
+
text-transform: uppercase;
|
|
163
|
+
letter-spacing: 0.05em;
|
|
164
|
+
color: var(--color-on-surface-variant);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Reduce Motion */
|
|
168
|
+
@media (prefers-reduced-motion: reduce) {
|
|
169
|
+
.menu > li > a,
|
|
170
|
+
.menu > li > button,
|
|
171
|
+
.menu-item,
|
|
172
|
+
.menu[popover] {
|
|
173
|
+
transition: none;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
`;
|
|
178
|
+
|
|
179
|
+
const sheet = typeof CSSStyleSheet !== 'undefined' ? new CSSStyleSheet() : null;
|
|
180
|
+
if (sheet) {
|
|
181
|
+
sheet.replaceSync(css);
|
|
182
|
+
}
|
|
183
|
+
export const styles = sheet;
|
|
184
|
+
export default sheet;
|