beercss 3.13.1 → 3.13.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.
- package/LICENSE +21 -21
- package/README.md +328 -322
- package/custom-element/index.d.ts +18 -18
- package/custom-element/index.js +7 -7
- package/dist/cdn/arch.svg +3 -3
- package/dist/cdn/arrow.svg +3 -3
- package/dist/cdn/beer.css +4792 -4789
- package/dist/cdn/beer.custom-element.js +38 -38
- package/dist/cdn/beer.custom-element.min.js +1 -1
- package/dist/cdn/beer.js +635 -635
- package/dist/cdn/beer.min.css +1 -1
- package/dist/cdn/beer.min.js +1 -1
- package/dist/cdn/beer.scoped.css +4793 -4790
- package/dist/cdn/beer.scoped.min.css +1 -1
- package/dist/cdn/boom.svg +3 -3
- package/dist/cdn/bun.svg +3 -3
- package/dist/cdn/burst.svg +3 -3
- package/dist/cdn/circle.svg +3 -3
- package/dist/cdn/clamshell.svg +3 -3
- package/dist/cdn/diamond.svg +3 -3
- package/dist/cdn/fan.svg +3 -3
- package/dist/cdn/flower.svg +3 -3
- package/dist/cdn/gem.svg +3 -3
- package/dist/cdn/ghost-ish.svg +3 -3
- package/dist/cdn/heart.svg +3 -3
- package/dist/cdn/leaf-clover4.svg +3 -3
- package/dist/cdn/leaf-clover8.svg +3 -3
- package/dist/cdn/loading-indicator.svg +18 -18
- package/dist/cdn/oval.svg +3 -3
- package/dist/cdn/pentagon.svg +3 -3
- package/dist/cdn/pill.svg +3 -3
- package/dist/cdn/pixel-circle.svg +3 -3
- package/dist/cdn/pixel-triangle.svg +3 -3
- package/dist/cdn/puffy-diamond.svg +3 -3
- package/dist/cdn/puffy.svg +3 -3
- package/dist/cdn/semicircle.svg +3 -3
- package/dist/cdn/sided-cookie12.svg +3 -3
- package/dist/cdn/sided-cookie4.svg +3 -3
- package/dist/cdn/sided-cookie6.svg +3 -3
- package/dist/cdn/sided-cookie7.svg +3 -3
- package/dist/cdn/sided-cookie9.svg +3 -3
- package/dist/cdn/slanted.svg +3 -3
- package/dist/cdn/soft-boom.svg +3 -3
- package/dist/cdn/soft-burst.svg +3 -3
- package/dist/cdn/square.svg +3 -3
- package/dist/cdn/sunny.svg +3 -3
- package/dist/cdn/triangle.svg +3 -3
- package/dist/cdn/very-sunny.svg +3 -3
- package/dist/cdn/wavy-circle.svg +3 -3
- package/dist/cdn/wavy.svg +4 -4
- package/index.d.ts +18 -18
- package/index.js +6 -6
- package/package.json +76 -76
- package/scoped/index.d.ts +18 -18
- package/scoped/index.js +6 -6
- package/src/cdn/beer.css +52 -52
- package/src/cdn/beer.ts +120 -120
- package/src/cdn/customElement.js +38 -38
- package/src/cdn/elements/badges.css +74 -74
- package/src/cdn/elements/bars.css +91 -91
- package/src/cdn/elements/buttons.css +106 -106
- package/src/cdn/elements/cards.css +26 -26
- package/src/cdn/elements/chips.css +38 -38
- package/src/cdn/elements/dialogs.css +151 -151
- package/src/cdn/elements/dialogs.ts +69 -69
- package/src/cdn/elements/dividers.css +48 -48
- package/src/cdn/elements/expansions.css +10 -10
- package/src/cdn/elements/fields.css +439 -439
- package/src/cdn/elements/fields.ts +165 -164
- package/src/cdn/elements/grids.css +171 -171
- package/src/cdn/elements/icons.css +77 -77
- package/src/cdn/elements/layouts.css +35 -35
- package/src/cdn/elements/lists.css +71 -71
- package/src/cdn/elements/mainLayouts.css +57 -57
- package/src/cdn/elements/media.css +112 -112
- package/src/cdn/elements/menus.css +294 -294
- package/src/cdn/elements/menus.ts +40 -40
- package/src/cdn/elements/navigations.css +462 -460
- package/src/cdn/elements/overlays.css +31 -31
- package/src/cdn/elements/pages.css +41 -41
- package/src/cdn/elements/pages.ts +6 -6
- package/src/cdn/elements/progress.css +207 -207
- package/src/cdn/elements/progress.ts +34 -34
- package/src/cdn/elements/selections.css +256 -256
- package/src/cdn/elements/shapes.css +258 -258
- package/src/cdn/elements/sliders.css +357 -357
- package/src/cdn/elements/sliders.ts +74 -74
- package/src/cdn/elements/snackbars.css +47 -47
- package/src/cdn/elements/snackbars.ts +26 -26
- package/src/cdn/elements/tables.css +65 -65
- package/src/cdn/elements/tabs.css +52 -52
- package/src/cdn/elements/tooltips.css +131 -131
- package/src/cdn/helpers/alignments.css +29 -29
- package/src/cdn/helpers/blurs.css +21 -21
- package/src/cdn/helpers/colors.css +930 -930
- package/src/cdn/helpers/directions.css +28 -28
- package/src/cdn/helpers/elevates.css +16 -16
- package/src/cdn/helpers/forms.css +75 -75
- package/src/cdn/helpers/margins.css +49 -49
- package/src/cdn/helpers/opacities.css +19 -19
- package/src/cdn/helpers/paddings.css +45 -45
- package/src/cdn/helpers/positions.css +45 -45
- package/src/cdn/helpers/reset.css +94 -93
- package/src/cdn/helpers/responsive.css +22 -22
- package/src/cdn/helpers/ripples.css +33 -33
- package/src/cdn/helpers/ripples.ts +30 -30
- package/src/cdn/helpers/scrolls.css +8 -8
- package/src/cdn/helpers/shadows.css +23 -23
- package/src/cdn/helpers/sizes.css +45 -45
- package/src/cdn/helpers/spaces.css +19 -19
- package/src/cdn/helpers/theme.css +186 -186
- package/src/cdn/helpers/theme.ts +83 -83
- package/src/cdn/helpers/typography.css +225 -225
- package/src/cdn/helpers/waves.css +43 -43
- package/src/cdn/helpers/zoom.css +19 -19
- package/src/cdn/interfaces.ts +3 -3
- package/src/cdn/settings/dark.css +38 -38
- package/src/cdn/settings/fonts.css +35 -35
- package/src/cdn/settings/globals.css +18 -18
- package/src/cdn/settings/light.css +39 -39
- package/src/cdn/shapes/arch.svg +3 -3
- package/src/cdn/shapes/arrow.svg +3 -3
- package/src/cdn/shapes/boom.svg +3 -3
- package/src/cdn/shapes/bun.svg +3 -3
- package/src/cdn/shapes/burst.svg +3 -3
- package/src/cdn/shapes/circle.svg +3 -3
- package/src/cdn/shapes/clamshell.svg +3 -3
- package/src/cdn/shapes/diamond.svg +3 -3
- package/src/cdn/shapes/fan.svg +3 -3
- package/src/cdn/shapes/flower.svg +3 -3
- package/src/cdn/shapes/gem.svg +3 -3
- package/src/cdn/shapes/ghost-ish.svg +3 -3
- package/src/cdn/shapes/heart.svg +3 -3
- package/src/cdn/shapes/leaf-clover4.svg +3 -3
- package/src/cdn/shapes/leaf-clover8.svg +3 -3
- package/src/cdn/shapes/loading-indicator.svg +18 -18
- package/src/cdn/shapes/oval.svg +3 -3
- package/src/cdn/shapes/pentagon.svg +3 -3
- package/src/cdn/shapes/pill.svg +3 -3
- package/src/cdn/shapes/pixel-circle.svg +3 -3
- package/src/cdn/shapes/pixel-triangle.svg +3 -3
- package/src/cdn/shapes/puffy-diamond.svg +3 -3
- package/src/cdn/shapes/puffy.svg +3 -3
- package/src/cdn/shapes/semicircle.svg +3 -3
- package/src/cdn/shapes/sided-cookie12.svg +3 -3
- package/src/cdn/shapes/sided-cookie4.svg +3 -3
- package/src/cdn/shapes/sided-cookie6.svg +3 -3
- package/src/cdn/shapes/sided-cookie7.svg +3 -3
- package/src/cdn/shapes/sided-cookie9.svg +3 -3
- package/src/cdn/shapes/slanted.svg +3 -3
- package/src/cdn/shapes/soft-boom.svg +3 -3
- package/src/cdn/shapes/soft-burst.svg +3 -3
- package/src/cdn/shapes/square.svg +3 -3
- package/src/cdn/shapes/sunny.svg +3 -3
- package/src/cdn/shapes/triangle.svg +3 -3
- package/src/cdn/shapes/very-sunny.svg +3 -3
- package/src/cdn/shapes/wavy-circle.svg +3 -3
- package/src/cdn/shapes/wavy.svg +4 -4
- package/src/cdn/utils.ts +154 -154
|
@@ -1,295 +1,295 @@
|
|
|
1
|
-
menu {
|
|
2
|
-
opacity: 0;
|
|
3
|
-
visibility: hidden;
|
|
4
|
-
position: absolute;
|
|
5
|
-
box-shadow: var(--elevate2);
|
|
6
|
-
background-color: var(--surface-container);
|
|
7
|
-
z-index: 11;
|
|
8
|
-
inset: auto auto 0 0;
|
|
9
|
-
inline-size: 100%;
|
|
10
|
-
max-block-size: 50vh;
|
|
11
|
-
max-inline-size: none !important;
|
|
12
|
-
overflow-x: hidden;
|
|
13
|
-
overflow-y: auto;
|
|
14
|
-
font-size: 0.875rem;
|
|
15
|
-
font-weight: normal;
|
|
16
|
-
text-transform: none;
|
|
17
|
-
color: var(--on-surface);
|
|
18
|
-
line-height: normal;
|
|
19
|
-
text-align: start;
|
|
20
|
-
border-radius: 0.25rem;
|
|
21
|
-
transform: scale(0.8) translateY(120%);
|
|
22
|
-
transition: all var(--speed2), 0s background-color;
|
|
23
|
-
justify-content: flex-start;
|
|
24
|
-
padding: 0.5rem 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
[dir=rtl] menu {
|
|
28
|
-
inset: auto 0 0 auto;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
menu.no-wrap {
|
|
32
|
-
inline-size: max-content;
|
|
33
|
-
white-space: nowrap !important;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
menu.active,
|
|
37
|
-
:not(menu, [data-ui]):focus-within > menu,
|
|
38
|
-
menu > li:hover > menu,
|
|
39
|
-
menu > li > menu:hover {
|
|
40
|
-
opacity: 1;
|
|
41
|
-
visibility: visible;
|
|
42
|
-
transform: scale(1) translateY(100%);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
menu.active.top,
|
|
46
|
-
:not(menu, [data-ui]):focus-within > menu.top,
|
|
47
|
-
menu > li:hover > menu.top,
|
|
48
|
-
menu > li > menu.top:hover {
|
|
49
|
-
transform: scale(1) translateY(-100%);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
menu * {
|
|
53
|
-
white-space: inherit !important;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
menu > li,
|
|
57
|
-
menu > li > a:only-child {
|
|
58
|
-
all: unset;
|
|
59
|
-
box-sizing: border-box;
|
|
60
|
-
position: relative;
|
|
61
|
-
display: flex;
|
|
62
|
-
align-items: center;
|
|
63
|
-
align-self: normal;
|
|
64
|
-
text-align: start;
|
|
65
|
-
justify-content: inherit;
|
|
66
|
-
white-space: nowrap;
|
|
67
|
-
gap: 1rem;
|
|
68
|
-
padding: 0.5rem 1rem;
|
|
69
|
-
min-block-size: 3rem;
|
|
70
|
-
flex: 1;
|
|
71
|
-
margin: 0 !important;
|
|
72
|
-
cursor: pointer;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
menu > li:is(:hover, :focus, .active) {
|
|
76
|
-
background-color: var(--active);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
menu > li > :is(.max, .field),
|
|
80
|
-
menu > li > a:only-child > .max,
|
|
81
|
-
menu > li:has(.field, a:only-child) {
|
|
82
|
-
flex: 1;
|
|
83
|
-
padding: 0;
|
|
84
|
-
margin: 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
menu.min {
|
|
88
|
-
inset: 0 0 auto 0;
|
|
89
|
-
transform: none !important;
|
|
90
|
-
background-color: var(--surface-variant) !important;
|
|
91
|
-
color: var(--on-surface-variant) !important;
|
|
92
|
-
padding: 0;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
[dir=rtl] menu.min.right,
|
|
96
|
-
menu.min.left,
|
|
97
|
-
menu.top.left {
|
|
98
|
-
inset: 0 0 auto auto;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
[dir=rtl] menu.min.left,
|
|
102
|
-
menu.min.right,
|
|
103
|
-
menu.top,
|
|
104
|
-
menu.top.right {
|
|
105
|
-
inset: 0 auto auto 0;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
menu.max {
|
|
109
|
-
position: fixed;
|
|
110
|
-
inset: 0;
|
|
111
|
-
block-size: 100%;
|
|
112
|
-
max-block-size: none;
|
|
113
|
-
min-block-size: auto;
|
|
114
|
-
z-index: 100;
|
|
115
|
-
transform: none !important;
|
|
116
|
-
background-color: var(--surface-variant) !important;
|
|
117
|
-
color: var(--on-surface-variant) !important;
|
|
118
|
-
border-radius: 0;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
menu.no-wrap:is(.min, .max) {
|
|
122
|
-
min-inline-size: 16rem;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
[dir=rtl] menu.right,
|
|
126
|
-
[dir=rtl] menu.top.min.right,
|
|
127
|
-
menu.left,
|
|
128
|
-
menu.top.min.left {
|
|
129
|
-
inset: auto 0 0 auto;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
[dir=rtl] menu.left,
|
|
133
|
-
[dir=rtl] menu.top.min.left,
|
|
134
|
-
menu.right,
|
|
135
|
-
menu.top.min {
|
|
136
|
-
inset: auto auto 0 0;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
menu.top {
|
|
140
|
-
transform: scale(0.8) translateY(-120%);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
menu:has(menu) {
|
|
144
|
-
--_child: 1;
|
|
145
|
-
--_type: 0;
|
|
146
|
-
overflow: unset;
|
|
147
|
-
white-space: nowrap;
|
|
148
|
-
inline-size: auto;
|
|
149
|
-
min-inline-size: 12rem;
|
|
150
|
-
max-block-size: none;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
menu > li > :is(menu, menu.right),
|
|
154
|
-
[dir=rtl] menu > li > menu.left {
|
|
155
|
-
inset: auto auto calc(3rem * (var(--_child) - var(--_type))) 100%;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
[dir=rtl] menu > li > :is(menu, menu.right),
|
|
159
|
-
menu > li > menu.left {
|
|
160
|
-
inset: auto 100% calc(3rem * (var(--_child) - var(--_type))) auto;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
menu > li > :is(menu.top, menu.top.right),
|
|
164
|
-
[dir=rtl] menu > li > menu.top.left {
|
|
165
|
-
inset: calc(3rem * (var(--_child) - var(--_type))) auto auto 100%;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
[dir=rtl] menu > li > :is(menu.top, menu.top.right),
|
|
169
|
-
menu > li > menu.top.left {
|
|
170
|
-
inset: calc(3rem * (var(--_child) - var(--_type))) 100% auto auto;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
menu.no-space > li {
|
|
174
|
-
min-block-size: 2.5rem;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
menu.medium-space > li {
|
|
178
|
-
min-block-size: 3.5rem;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
menu.large-space > li {
|
|
182
|
-
min-block-size: 4rem;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
menu.border > li:not(:last-child)::before {
|
|
186
|
-
content: '';
|
|
187
|
-
position: absolute;
|
|
188
|
-
background-color: var(--outline-variant);
|
|
189
|
-
inset: auto 0 0 0;
|
|
190
|
-
block-size: 0.0625rem;
|
|
191
|
-
inline-size: auto;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
menu.transparent {
|
|
195
|
-
margin: 0 -1rem !important;
|
|
196
|
-
padding: 0.5rem;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
menu.transparent > li {
|
|
200
|
-
background-color: inherit;
|
|
201
|
-
box-shadow: none;
|
|
202
|
-
padding: 0;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
menu > li:nth-last-child(2) {
|
|
206
|
-
--_child: 2;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
menu > li:nth-last-child(3) {
|
|
210
|
-
--_child: 3;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
menu > li:nth-last-child(4) {
|
|
214
|
-
--_child: 4;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
menu > li:nth-last-child(5) {
|
|
218
|
-
--_child: 5;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
menu > li:nth-last-child(6) {
|
|
222
|
-
--_child: 6;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
menu > li:nth-last-child(7) {
|
|
226
|
-
--_child: 7;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
menu > li:nth-last-child(8) {
|
|
230
|
-
--_child: 8;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
menu > li:nth-last-child(9) {
|
|
234
|
-
--_child: 9;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
menu > li:nth-last-child(10) {
|
|
238
|
-
--_child: 10;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
menu > li:nth-last-child(11) {
|
|
242
|
-
--_child: 11;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
menu > li:nth-last-of-type(2) {
|
|
246
|
-
--_type: 1;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
menu > li:nth-last-of-type(3) {
|
|
250
|
-
--_type: 2;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
menu > li:nth-last-of-type(4) {
|
|
254
|
-
--_type: 3;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
menu > li:nth-last-of-type(5) {
|
|
258
|
-
--_type: 4;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
menu > li:nth-last-of-type(6) {
|
|
262
|
-
--_type: 5;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
menu > li:nth-last-of-type(7) {
|
|
266
|
-
--_type: 6;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
menu > li:nth-last-of-type(8) {
|
|
270
|
-
--_type: 7;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
menu > li:nth-last-of-type(9) {
|
|
274
|
-
--_type: 8;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
menu > li:nth-last-of-type(10) {
|
|
278
|
-
--_type: 9;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
menu > li:nth-last-of-type(11) {
|
|
282
|
-
--_type: 10;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
@media (pointer: coarse) {
|
|
286
|
-
:not(menu, [data-ui]):hover > menu {
|
|
287
|
-
opacity: 1;
|
|
288
|
-
visibility: visible;
|
|
289
|
-
transform: scale(1) translateY(100%);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
:not(menu, [data-ui]):hover > menu.top {
|
|
293
|
-
transform: scale(1) translateY(-100%);
|
|
294
|
-
}
|
|
1
|
+
menu {
|
|
2
|
+
opacity: 0;
|
|
3
|
+
visibility: hidden;
|
|
4
|
+
position: absolute;
|
|
5
|
+
box-shadow: var(--elevate2);
|
|
6
|
+
background-color: var(--surface-container);
|
|
7
|
+
z-index: 11;
|
|
8
|
+
inset: auto auto 0 0;
|
|
9
|
+
inline-size: 100%;
|
|
10
|
+
max-block-size: 50vh;
|
|
11
|
+
max-inline-size: none !important;
|
|
12
|
+
overflow-x: hidden;
|
|
13
|
+
overflow-y: auto;
|
|
14
|
+
font-size: 0.875rem;
|
|
15
|
+
font-weight: normal;
|
|
16
|
+
text-transform: none;
|
|
17
|
+
color: var(--on-surface);
|
|
18
|
+
line-height: normal;
|
|
19
|
+
text-align: start;
|
|
20
|
+
border-radius: 0.25rem;
|
|
21
|
+
transform: scale(0.8) translateY(120%);
|
|
22
|
+
transition: all var(--speed2), 0s background-color;
|
|
23
|
+
justify-content: flex-start;
|
|
24
|
+
padding: 0.5rem 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
[dir=rtl] menu {
|
|
28
|
+
inset: auto 0 0 auto;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
menu.no-wrap {
|
|
32
|
+
inline-size: max-content;
|
|
33
|
+
white-space: nowrap !important;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
menu.active,
|
|
37
|
+
:not(menu, [data-ui]):focus-within > menu,
|
|
38
|
+
menu > li:hover > menu,
|
|
39
|
+
menu > li > menu:hover {
|
|
40
|
+
opacity: 1;
|
|
41
|
+
visibility: visible;
|
|
42
|
+
transform: scale(1) translateY(100%);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
menu.active.top,
|
|
46
|
+
:not(menu, [data-ui]):focus-within > menu.top,
|
|
47
|
+
menu > li:hover > menu.top,
|
|
48
|
+
menu > li > menu.top:hover {
|
|
49
|
+
transform: scale(1) translateY(-100%);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
menu * {
|
|
53
|
+
white-space: inherit !important;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
menu > li,
|
|
57
|
+
menu > li > a:only-child {
|
|
58
|
+
all: unset;
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
position: relative;
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
align-self: normal;
|
|
64
|
+
text-align: start;
|
|
65
|
+
justify-content: inherit;
|
|
66
|
+
white-space: nowrap;
|
|
67
|
+
gap: 1rem;
|
|
68
|
+
padding: 0.5rem 1rem;
|
|
69
|
+
min-block-size: 3rem;
|
|
70
|
+
flex: 1;
|
|
71
|
+
margin: 0 !important;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
menu > li:is(:hover, :focus, .active) {
|
|
76
|
+
background-color: var(--active);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
menu > li > :is(.max, .field),
|
|
80
|
+
menu > li > a:only-child > .max,
|
|
81
|
+
menu > li:has(.field, a:only-child) {
|
|
82
|
+
flex: 1;
|
|
83
|
+
padding: 0;
|
|
84
|
+
margin: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
menu.min {
|
|
88
|
+
inset: 0 0 auto 0;
|
|
89
|
+
transform: none !important;
|
|
90
|
+
background-color: var(--surface-variant) !important;
|
|
91
|
+
color: var(--on-surface-variant) !important;
|
|
92
|
+
padding: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
[dir=rtl] menu.min.right,
|
|
96
|
+
menu.min.left,
|
|
97
|
+
menu.top.left {
|
|
98
|
+
inset: 0 0 auto auto;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
[dir=rtl] menu.min.left,
|
|
102
|
+
menu.min.right,
|
|
103
|
+
menu.top,
|
|
104
|
+
menu.top.right {
|
|
105
|
+
inset: 0 auto auto 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
menu.max {
|
|
109
|
+
position: fixed;
|
|
110
|
+
inset: 0;
|
|
111
|
+
block-size: 100%;
|
|
112
|
+
max-block-size: none;
|
|
113
|
+
min-block-size: auto;
|
|
114
|
+
z-index: 100;
|
|
115
|
+
transform: none !important;
|
|
116
|
+
background-color: var(--surface-variant) !important;
|
|
117
|
+
color: var(--on-surface-variant) !important;
|
|
118
|
+
border-radius: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
menu.no-wrap:is(.min, .max) {
|
|
122
|
+
min-inline-size: 16rem;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[dir=rtl] menu.right,
|
|
126
|
+
[dir=rtl] menu.top.min.right,
|
|
127
|
+
menu.left,
|
|
128
|
+
menu.top.min.left {
|
|
129
|
+
inset: auto 0 0 auto;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
[dir=rtl] menu.left,
|
|
133
|
+
[dir=rtl] menu.top.min.left,
|
|
134
|
+
menu.right,
|
|
135
|
+
menu.top.min {
|
|
136
|
+
inset: auto auto 0 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
menu.top {
|
|
140
|
+
transform: scale(0.8) translateY(-120%);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
menu:has(menu) {
|
|
144
|
+
--_child: 1;
|
|
145
|
+
--_type: 0;
|
|
146
|
+
overflow: unset;
|
|
147
|
+
white-space: nowrap;
|
|
148
|
+
inline-size: auto;
|
|
149
|
+
min-inline-size: 12rem;
|
|
150
|
+
max-block-size: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
menu > li > :is(menu, menu.right),
|
|
154
|
+
[dir=rtl] menu > li > menu.left {
|
|
155
|
+
inset: auto auto calc(3rem * (var(--_child) - var(--_type))) 100%;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
[dir=rtl] menu > li > :is(menu, menu.right),
|
|
159
|
+
menu > li > menu.left {
|
|
160
|
+
inset: auto 100% calc(3rem * (var(--_child) - var(--_type))) auto;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
menu > li > :is(menu.top, menu.top.right),
|
|
164
|
+
[dir=rtl] menu > li > menu.top.left {
|
|
165
|
+
inset: calc(3rem * (var(--_child) - var(--_type))) auto auto 100%;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
[dir=rtl] menu > li > :is(menu.top, menu.top.right),
|
|
169
|
+
menu > li > menu.top.left {
|
|
170
|
+
inset: calc(3rem * (var(--_child) - var(--_type))) 100% auto auto;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
menu.no-space > li {
|
|
174
|
+
min-block-size: 2.5rem;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
menu.medium-space > li {
|
|
178
|
+
min-block-size: 3.5rem;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
menu.large-space > li {
|
|
182
|
+
min-block-size: 4rem;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
menu.border > li:not(:last-child)::before {
|
|
186
|
+
content: '';
|
|
187
|
+
position: absolute;
|
|
188
|
+
background-color: var(--outline-variant);
|
|
189
|
+
inset: auto 0 0 0;
|
|
190
|
+
block-size: 0.0625rem;
|
|
191
|
+
inline-size: auto;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
menu.transparent {
|
|
195
|
+
margin: 0 -1rem !important;
|
|
196
|
+
padding: 0.5rem;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
menu.transparent > li {
|
|
200
|
+
background-color: inherit;
|
|
201
|
+
box-shadow: none;
|
|
202
|
+
padding: 0;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
menu > li:nth-last-child(2) {
|
|
206
|
+
--_child: 2;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
menu > li:nth-last-child(3) {
|
|
210
|
+
--_child: 3;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
menu > li:nth-last-child(4) {
|
|
214
|
+
--_child: 4;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
menu > li:nth-last-child(5) {
|
|
218
|
+
--_child: 5;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
menu > li:nth-last-child(6) {
|
|
222
|
+
--_child: 6;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
menu > li:nth-last-child(7) {
|
|
226
|
+
--_child: 7;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
menu > li:nth-last-child(8) {
|
|
230
|
+
--_child: 8;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
menu > li:nth-last-child(9) {
|
|
234
|
+
--_child: 9;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
menu > li:nth-last-child(10) {
|
|
238
|
+
--_child: 10;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
menu > li:nth-last-child(11) {
|
|
242
|
+
--_child: 11;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
menu > li:nth-last-of-type(2) {
|
|
246
|
+
--_type: 1;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
menu > li:nth-last-of-type(3) {
|
|
250
|
+
--_type: 2;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
menu > li:nth-last-of-type(4) {
|
|
254
|
+
--_type: 3;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
menu > li:nth-last-of-type(5) {
|
|
258
|
+
--_type: 4;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
menu > li:nth-last-of-type(6) {
|
|
262
|
+
--_type: 5;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
menu > li:nth-last-of-type(7) {
|
|
266
|
+
--_type: 6;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
menu > li:nth-last-of-type(8) {
|
|
270
|
+
--_type: 7;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
menu > li:nth-last-of-type(9) {
|
|
274
|
+
--_type: 8;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
menu > li:nth-last-of-type(10) {
|
|
278
|
+
--_type: 9;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
menu > li:nth-last-of-type(11) {
|
|
282
|
+
--_type: 10;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@media (pointer: coarse) {
|
|
286
|
+
:not(menu, [data-ui]):hover > menu {
|
|
287
|
+
opacity: 1;
|
|
288
|
+
visibility: visible;
|
|
289
|
+
transform: scale(1) translateY(100%);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
:not(menu, [data-ui]):hover > menu.top {
|
|
293
|
+
transform: scale(1) translateY(-100%);
|
|
294
|
+
}
|
|
295
295
|
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { query, queryAll, addClass, on, off, hasTag, hasClass, removeClass, blurActiveElement } from "../utils";
|
|
2
|
-
|
|
3
|
-
let _timeoutMenu: ReturnType<typeof setTimeout>;
|
|
4
|
-
|
|
5
|
-
function onClickDocument(e: Event) {
|
|
6
|
-
off(document.body, "click", onClickDocument);
|
|
7
|
-
const body = e.target as Element;
|
|
8
|
-
const menus = queryAll("menu.active") as NodeListOf<HTMLMenuElement>;
|
|
9
|
-
for (let i=0; i<menus.length; i++) updateMenu(body, menus[i], e);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function focusOnMenuOrInput(menu: HTMLMenuElement) {
|
|
13
|
-
setTimeout(() => {
|
|
14
|
-
const input = query(".field > input", menu) as HTMLInputElement;
|
|
15
|
-
if (input) input.focus();
|
|
16
|
-
else menu.focus();
|
|
17
|
-
}, 90);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function updateMenu(from: Element, menu: HTMLMenuElement, e?: Event) {
|
|
21
|
-
if (_timeoutMenu) clearTimeout(_timeoutMenu);
|
|
22
|
-
|
|
23
|
-
_timeoutMenu = setTimeout(() => {
|
|
24
|
-
on(document.body, "click", onClickDocument);
|
|
25
|
-
if (!hasTag(document.activeElement, "input")) blurActiveElement();
|
|
26
|
-
|
|
27
|
-
const isActive = hasClass(menu, "active");
|
|
28
|
-
const isEvent = (e?.target === from);
|
|
29
|
-
const isChild = !!from.closest("menu");
|
|
30
|
-
|
|
31
|
-
if ((!isActive && isChild) || (isActive && isEvent)) {
|
|
32
|
-
removeClass(menu, "active");
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
removeClass(queryAll("menu.active"), "active");
|
|
37
|
-
addClass(menu, "active");
|
|
38
|
-
focusOnMenuOrInput(menu);
|
|
39
|
-
}, 90);
|
|
40
|
-
}
|
|
1
|
+
import { query, queryAll, addClass, on, off, hasTag, hasClass, removeClass, blurActiveElement } from "../utils";
|
|
2
|
+
|
|
3
|
+
let _timeoutMenu: ReturnType<typeof setTimeout>;
|
|
4
|
+
|
|
5
|
+
function onClickDocument(e: Event) {
|
|
6
|
+
off(document.body, "click", onClickDocument);
|
|
7
|
+
const body = e.target as Element;
|
|
8
|
+
const menus = queryAll("menu.active") as NodeListOf<HTMLMenuElement>;
|
|
9
|
+
for (let i=0; i<menus.length; i++) updateMenu(body, menus[i], e);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function focusOnMenuOrInput(menu: HTMLMenuElement) {
|
|
13
|
+
setTimeout(() => {
|
|
14
|
+
const input = query(".field > input", menu) as HTMLInputElement;
|
|
15
|
+
if (input) input.focus();
|
|
16
|
+
else menu.focus();
|
|
17
|
+
}, 90);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function updateMenu(from: Element, menu: HTMLMenuElement, e?: Event) {
|
|
21
|
+
if (_timeoutMenu) clearTimeout(_timeoutMenu);
|
|
22
|
+
|
|
23
|
+
_timeoutMenu = setTimeout(() => {
|
|
24
|
+
on(document.body, "click", onClickDocument);
|
|
25
|
+
if (!hasTag(document.activeElement, "input")) blurActiveElement();
|
|
26
|
+
|
|
27
|
+
const isActive = hasClass(menu, "active");
|
|
28
|
+
const isEvent = (e?.target === from);
|
|
29
|
+
const isChild = !!from.closest("menu");
|
|
30
|
+
|
|
31
|
+
if ((!isActive && isChild) || (isActive && isEvent)) {
|
|
32
|
+
removeClass(menu, "active");
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
removeClass(queryAll("menu.active"), "active");
|
|
37
|
+
addClass(menu, "active");
|
|
38
|
+
focusOnMenuOrInput(menu);
|
|
39
|
+
}, 90);
|
|
40
|
+
}
|