@rescui/menu 0.13.7 → 0.13.8-RUI-297-Add-react-compiler-to-the-packages-build-dbbefd7b8.14
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/lib/index.css +40 -40
- package/lib/menu.p.module.css.js +27 -27
- package/llm/components/menu.md +68 -92
- package/package.json +8 -8
package/lib/index.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
.
|
|
1
|
+
._themeLight_1be69r7_8{
|
|
2
2
|
--rs-theme-dark:0;
|
|
3
3
|
}
|
|
4
|
-
.
|
|
4
|
+
._themeDark_1be69r7_11{
|
|
5
5
|
--rs-theme-dark:1;
|
|
6
6
|
}
|
|
7
|
-
.
|
|
7
|
+
._sizeS_1be69r7_15{
|
|
8
8
|
--_rs-menu-mi-icon-offset:8px;
|
|
9
9
|
--_rs-menu-mi-icon-size:20px;
|
|
10
10
|
--_rs-menu-mi-vertical-padding:6px;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
44
44
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
45
45
|
}
|
|
46
|
-
.
|
|
46
|
+
._sizeM_1be69r7_18{
|
|
47
47
|
--_rs-menu-mi-icon-offset:8px;
|
|
48
48
|
--_rs-menu-mi-icon-size:24px;
|
|
49
49
|
--_rs-menu-mi-vertical-padding:8px;
|
|
@@ -86,11 +86,11 @@
|
|
|
86
86
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
87
87
|
}
|
|
88
88
|
@media screen and (max-width: 640px){
|
|
89
|
-
.
|
|
89
|
+
._sizeM_1be69r7_18{
|
|
90
90
|
--_rs-typography-text-2-sm-list-li-margin-top-from-text:12px;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
.
|
|
93
|
+
._sizeL_1be69r7_21{
|
|
94
94
|
--_rs-menu-mi-icon-offset:16px;
|
|
95
95
|
--_rs-menu-mi-icon-size:28px;
|
|
96
96
|
--_rs-menu-mi-vertical-padding:12px;
|
|
@@ -133,11 +133,11 @@
|
|
|
133
133
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
134
134
|
}
|
|
135
135
|
@media screen and (max-width: 640px){
|
|
136
|
-
.
|
|
136
|
+
._sizeL_1be69r7_21{
|
|
137
137
|
--_rs-typography-text-1-sm-list-li-margin-top-from-text:16px;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
.
|
|
140
|
+
._modeClassic_1be69r7_25{
|
|
141
141
|
--_rs-menu-mi-horizontal-padding-with-mode:var(
|
|
142
142
|
--_rs-menu-mi-horizontal-padding
|
|
143
143
|
);
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
calc(48 + var(--_rs-theme-dark-coefficient, 0)*184), calc(48 + var(--_rs-theme-dark-coefficient, 0)*184), calc(51 + var(--_rs-theme-dark-coefficient, 0)*181)
|
|
152
152
|
);
|
|
153
153
|
}
|
|
154
|
-
.
|
|
154
|
+
._modeRock_1be69r7_28{
|
|
155
155
|
--_rs-menu-mi-horizontal-padding-with-mode:var(
|
|
156
156
|
--_rs-menu-mi-horizontal-padding
|
|
157
157
|
);
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
calc(48 + var(--_rs-theme-dark-coefficient, 0)*184), calc(48 + var(--_rs-theme-dark-coefficient, 0)*184), calc(51 + var(--_rs-theme-dark-coefficient, 0)*181)
|
|
166
166
|
);
|
|
167
167
|
}
|
|
168
|
-
.
|
|
168
|
+
._modeClear_1be69r7_31{
|
|
169
169
|
--_rs-menu-mi-horizontal-padding-with-mode:0;
|
|
170
170
|
--_rs-menu-mi-active-background:none;
|
|
171
171
|
--_rs-menu-mi-selected-color:var(--_rs-color-primary);
|
|
@@ -178,15 +178,15 @@
|
|
|
178
178
|
0.1
|
|
179
179
|
);
|
|
180
180
|
}
|
|
181
|
-
.
|
|
181
|
+
._iconPlacementLeft_1be69r7_35{
|
|
182
182
|
--_rs-menu-mi-flex-direction:row;
|
|
183
183
|
--_rs-menu-mi-justify-content:initial;
|
|
184
184
|
}
|
|
185
|
-
.
|
|
185
|
+
._iconPlacementRight_1be69r7_39{
|
|
186
186
|
--_rs-menu-mi-flex-direction:row-reverse;
|
|
187
187
|
--_rs-menu-mi-justify-content:space-between;
|
|
188
188
|
}
|
|
189
|
-
.
|
|
189
|
+
._wrapper_1be69r7_43{
|
|
190
190
|
--_rs-theme-dark:var(
|
|
191
191
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
192
192
|
var(--rs-theme-dark, 0)
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
197
197
|
}
|
|
198
198
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
199
|
-
.
|
|
199
|
+
._wrapper_1be69r7_43{
|
|
200
200
|
--_rs-color-primary:color-mix(in srgb, var(--rs-color-primary-light-theme, #6B57FF) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dark-theme, #8473FF) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
201
201
|
--_rs-color-primary-dim:color-mix(in srgb, var(--rs-color-primary-dim-light-theme, #8979ff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dim-dark-theme, #6f61d2) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
202
202
|
--_rs-color-primary-fog:color-mix(in srgb, var(--rs-color-primary-fog-light-theme, #e1ddff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-fog-dark-theme, #2e2b49) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
208
|
-
.
|
|
208
|
+
._wrapper_1be69r7_43{
|
|
209
209
|
--_rs-color-primary:rgb(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255);
|
|
210
210
|
--_rs-color-primary-dim:rgb(calc(var(--_rs-theme-light-coefficient, 1)*137 + var(--_rs-theme-dark-coefficient, 0)*111), calc(var(--_rs-theme-light-coefficient, 1)*121 + var(--_rs-theme-dark-coefficient, 0)*97), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*210));
|
|
211
211
|
--_rs-color-primary-fog:rgb(calc(var(--_rs-theme-light-coefficient, 1)*225 + var(--_rs-theme-dark-coefficient, 0)*46), calc(var(--_rs-theme-light-coefficient, 1)*221 + var(--_rs-theme-dark-coefficient, 0)*43), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*73));
|
|
@@ -213,11 +213,11 @@
|
|
|
213
213
|
--_rs-color-primary-t-fog:rgba(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255, calc(var(--_rs-theme-light-coefficient, 1)*0.2 + var(--_rs-theme-dark-coefficient, 0)*0.3));
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
.
|
|
216
|
+
._wrapper_1be69r7_43 {
|
|
217
217
|
|
|
218
218
|
display:flex;
|
|
219
219
|
}
|
|
220
|
-
.
|
|
220
|
+
._menuItem_1be69r7_50{
|
|
221
221
|
letter-spacing:var(
|
|
222
222
|
--rs-text-base-letter-spacing,
|
|
223
223
|
var(--_rs-typography-letter-spacing)
|
|
@@ -258,52 +258,52 @@
|
|
|
258
258
|
-webkit-font-smoothing:inherit;
|
|
259
259
|
-moz-osx-font-smoothing:inherit;
|
|
260
260
|
}
|
|
261
|
-
.
|
|
261
|
+
._menuItem_1be69r7_50:focus{
|
|
262
262
|
outline:none;
|
|
263
263
|
}
|
|
264
|
-
.
|
|
264
|
+
._keyboardNavigationDisabled_1be69r7_85 ._menuItem_1be69r7_50:focus[data-focus-method='key']{
|
|
265
265
|
box-shadow:0 0 0 2px var(--_rs-color-primary-dim), inset 0 0 0 2px var(--_rs-color-primary-dim);
|
|
266
266
|
}
|
|
267
|
-
.
|
|
267
|
+
._menuItem_1be69r7_50:active{
|
|
268
268
|
color:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
269
269
|
background:var(--_rs-menu-mi-active-background);
|
|
270
270
|
}
|
|
271
|
-
.
|
|
271
|
+
._menuItem_1be69r7_50._selected_1be69r7_99{
|
|
272
272
|
color:var(--_rs-menu-mi-selected-color);
|
|
273
273
|
background:var(--_rs-menu-mi-selected-background);
|
|
274
274
|
}
|
|
275
|
-
.
|
|
276
|
-
.
|
|
275
|
+
._menuItem_1be69r7_50._highlighted_1be69r7_106,
|
|
276
|
+
._menuItem_1be69r7_50:not(._disableCursor_1be69r7_107):hover{
|
|
277
277
|
color:var(--_rs-menu-mi-hover-color);
|
|
278
278
|
background:var(--_rs-menu-mi-hover-background);
|
|
279
279
|
}
|
|
280
|
-
.
|
|
281
|
-
.
|
|
280
|
+
._menuItem_1be69r7_50._highlighted_1be69r7_106._selected_1be69r7_99,
|
|
281
|
+
._menuItem_1be69r7_50._selected_1be69r7_99:not(._disableCursor_1be69r7_107):hover{
|
|
282
282
|
color:var(--_rs-menu-mi-selected-hover-color);
|
|
283
283
|
background-color:var(--_rs-menu-mi-selected-hover-background);
|
|
284
284
|
}
|
|
285
|
-
.
|
|
285
|
+
._menuItem_1be69r7_50._disabled_1be69r7_120{
|
|
286
286
|
pointer-events:none;
|
|
287
287
|
|
|
288
288
|
color:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 0.5);
|
|
289
289
|
}
|
|
290
|
-
.
|
|
290
|
+
._disableCursor_1be69r7_107{
|
|
291
291
|
pointer-events:none;
|
|
292
292
|
}
|
|
293
|
-
.
|
|
293
|
+
._content_1be69r7_131{
|
|
294
294
|
flex-grow:1;
|
|
295
295
|
|
|
296
296
|
font-size:inherit;
|
|
297
297
|
}
|
|
298
|
-
.
|
|
298
|
+
._icon_1be69r7_35{
|
|
299
299
|
flex:0 0;
|
|
300
300
|
flex-basis:auto;
|
|
301
301
|
}
|
|
302
|
-
.
|
|
302
|
+
._icon_1be69r7_35._resizedIcon_1be69r7_141{
|
|
303
303
|
width:auto;
|
|
304
304
|
height:var(--_rs-menu-mi-icon-size);
|
|
305
305
|
}
|
|
306
|
-
.
|
|
306
|
+
._divider_1be69r7_149{
|
|
307
307
|
flex-shrink:0;
|
|
308
308
|
|
|
309
309
|
width:100%;
|
|
@@ -314,13 +314,13 @@
|
|
|
314
314
|
|
|
315
315
|
background-color:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 0.2);
|
|
316
316
|
}
|
|
317
|
-
.
|
|
317
|
+
._groupHeaderThemeLight_1be69r7_163{
|
|
318
318
|
--rs-theme-dark:0;
|
|
319
319
|
}
|
|
320
|
-
.
|
|
320
|
+
._groupHeaderThemeDark_1be69r7_166{
|
|
321
321
|
--rs-theme-dark:1;
|
|
322
322
|
}
|
|
323
|
-
.
|
|
323
|
+
._groupHeaderSizeL_1be69r7_170{
|
|
324
324
|
--_rs-menu-gh-vertical-padding:12px;
|
|
325
325
|
--_rs-menu-gh-horizontal-padding:16px;
|
|
326
326
|
--_rs-typography-letter-spacing:var(--rs-h3-letter-spacing, normal);
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
355
355
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
356
356
|
}
|
|
357
|
-
.
|
|
357
|
+
._groupHeaderSizeM_1be69r7_173{
|
|
358
358
|
--_rs-menu-gh-vertical-padding:8px;
|
|
359
359
|
--_rs-menu-gh-horizontal-padding:16px;
|
|
360
360
|
--_rs-typography-letter-spacing:var(--rs-h4-letter-spacing, normal);
|
|
@@ -388,7 +388,7 @@
|
|
|
388
388
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
389
389
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
390
390
|
}
|
|
391
|
-
.
|
|
391
|
+
._groupHeaderSizeS_1be69r7_176{
|
|
392
392
|
--_rs-menu-gh-vertical-padding:6px;
|
|
393
393
|
--_rs-menu-gh-horizontal-padding:8px;
|
|
394
394
|
--_rs-typography-letter-spacing:var(--rs-h5-letter-spacing, normal);
|
|
@@ -422,7 +422,7 @@
|
|
|
422
422
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
423
423
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
424
424
|
}
|
|
425
|
-
.
|
|
425
|
+
._groupHeader_1be69r7_163{
|
|
426
426
|
--_rs-theme-dark:var(
|
|
427
427
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
428
428
|
var(--rs-theme-dark, 0)
|
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
433
433
|
}
|
|
434
434
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
435
|
-
.
|
|
435
|
+
._groupHeader_1be69r7_163{
|
|
436
436
|
--_rs-color-primary:color-mix(in srgb, var(--rs-color-primary-light-theme, #6B57FF) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dark-theme, #8473FF) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
437
437
|
--_rs-color-primary-dim:color-mix(in srgb, var(--rs-color-primary-dim-light-theme, #8979ff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dim-dark-theme, #6f61d2) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
438
438
|
--_rs-color-primary-fog:color-mix(in srgb, var(--rs-color-primary-fog-light-theme, #e1ddff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-fog-dark-theme, #2e2b49) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
444
|
-
.
|
|
444
|
+
._groupHeader_1be69r7_163{
|
|
445
445
|
--_rs-color-primary:rgb(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255);
|
|
446
446
|
--_rs-color-primary-dim:rgb(calc(var(--_rs-theme-light-coefficient, 1)*137 + var(--_rs-theme-dark-coefficient, 0)*111), calc(var(--_rs-theme-light-coefficient, 1)*121 + var(--_rs-theme-dark-coefficient, 0)*97), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*210));
|
|
447
447
|
--_rs-color-primary-fog:rgb(calc(var(--_rs-theme-light-coefficient, 1)*225 + var(--_rs-theme-dark-coefficient, 0)*46), calc(var(--_rs-theme-light-coefficient, 1)*221 + var(--_rs-theme-dark-coefficient, 0)*43), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*73));
|
|
@@ -449,7 +449,7 @@
|
|
|
449
449
|
--_rs-color-primary-t-fog:rgba(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255, calc(var(--_rs-theme-light-coefficient, 1)*0.2 + var(--_rs-theme-dark-coefficient, 0)*0.3));
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
-
.
|
|
452
|
+
._groupHeader_1be69r7_163 {
|
|
453
453
|
letter-spacing:var(
|
|
454
454
|
--rs-text-base-letter-spacing,
|
|
455
455
|
var(--_rs-typography-letter-spacing)
|
package/lib/menu.p.module.css.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"themeLight": "
|
|
3
|
-
"themeDark": "
|
|
4
|
-
"sizeS": "
|
|
5
|
-
"sizeM": "
|
|
6
|
-
"sizeL": "
|
|
7
|
-
"modeClassic": "
|
|
8
|
-
"modeRock": "
|
|
9
|
-
"modeClear": "
|
|
10
|
-
"iconPlacementLeft": "
|
|
11
|
-
"iconPlacementRight": "
|
|
12
|
-
"wrapper": "
|
|
13
|
-
"menuItem": "
|
|
14
|
-
"keyboardNavigationDisabled": "
|
|
15
|
-
"selected": "
|
|
16
|
-
"highlighted": "
|
|
17
|
-
"disableCursor": "
|
|
18
|
-
"disabled": "
|
|
19
|
-
"content": "
|
|
20
|
-
"icon": "
|
|
21
|
-
"resizedIcon": "
|
|
22
|
-
"divider": "
|
|
23
|
-
"groupHeaderThemeLight": "
|
|
24
|
-
"groupHeaderThemeDark": "
|
|
25
|
-
"groupHeaderSizeL": "
|
|
26
|
-
"groupHeaderSizeM": "
|
|
27
|
-
"groupHeaderSizeS": "
|
|
28
|
-
"groupHeader": "
|
|
2
|
+
"themeLight": "_themeLight_1be69r7_8",
|
|
3
|
+
"themeDark": "_themeDark_1be69r7_11",
|
|
4
|
+
"sizeS": "_sizeS_1be69r7_15",
|
|
5
|
+
"sizeM": "_sizeM_1be69r7_18",
|
|
6
|
+
"sizeL": "_sizeL_1be69r7_21",
|
|
7
|
+
"modeClassic": "_modeClassic_1be69r7_25",
|
|
8
|
+
"modeRock": "_modeRock_1be69r7_28",
|
|
9
|
+
"modeClear": "_modeClear_1be69r7_31",
|
|
10
|
+
"iconPlacementLeft": "_iconPlacementLeft_1be69r7_35",
|
|
11
|
+
"iconPlacementRight": "_iconPlacementRight_1be69r7_39",
|
|
12
|
+
"wrapper": "_wrapper_1be69r7_43",
|
|
13
|
+
"menuItem": "_menuItem_1be69r7_50",
|
|
14
|
+
"keyboardNavigationDisabled": "_keyboardNavigationDisabled_1be69r7_85",
|
|
15
|
+
"selected": "_selected_1be69r7_99",
|
|
16
|
+
"highlighted": "_highlighted_1be69r7_106",
|
|
17
|
+
"disableCursor": "_disableCursor_1be69r7_107",
|
|
18
|
+
"disabled": "_disabled_1be69r7_120",
|
|
19
|
+
"content": "_content_1be69r7_131",
|
|
20
|
+
"icon": "_icon_1be69r7_35",
|
|
21
|
+
"resizedIcon": "_resizedIcon_1be69r7_141",
|
|
22
|
+
"divider": "_divider_1be69r7_149",
|
|
23
|
+
"groupHeaderThemeLight": "_groupHeaderThemeLight_1be69r7_163",
|
|
24
|
+
"groupHeaderThemeDark": "_groupHeaderThemeDark_1be69r7_166",
|
|
25
|
+
"groupHeaderSizeL": "_groupHeaderSizeL_1be69r7_170",
|
|
26
|
+
"groupHeaderSizeM": "_groupHeaderSizeM_1be69r7_173",
|
|
27
|
+
"groupHeaderSizeS": "_groupHeaderSizeS_1be69r7_176",
|
|
28
|
+
"groupHeader": "_groupHeader_1be69r7_163"
|
|
29
29
|
};
|
|
30
30
|
export { styles as default };
|
package/llm/components/menu.md
CHANGED
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
|
|
106
106
|
##### Demo
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
Use the controls to see the effect at different viewport widths.
|
|
109
109
|
|
|
110
110
|
```tsx
|
|
111
111
|
import { Menu, MenuItem } from '@rescui/menu';
|
|
@@ -117,68 +117,59 @@ import {
|
|
|
117
117
|
SuccessOutlineIcon
|
|
118
118
|
} from '@rescui/icons';
|
|
119
119
|
|
|
120
|
-
const MyMenu = (
|
|
120
|
+
const MyMenu = () => {
|
|
121
121
|
return (
|
|
122
|
-
<
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
>
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
122
|
+
<Menu
|
|
123
|
+
mode="rock"
|
|
124
|
+
size="l"
|
|
125
|
+
iconPlacement={'left'}
|
|
126
|
+
style={{ maxWidth: 300 }}
|
|
127
|
+
className="my-menu"
|
|
128
|
+
>
|
|
129
|
+
<MenuItem icon={<CartOutlineIcon size="l" className="icon" />}>
|
|
130
|
+
Cart
|
|
131
|
+
</MenuItem>
|
|
132
|
+
<MenuItem icon={<BugOutlineIcon size="l" className="icon" />}>
|
|
133
|
+
Bug
|
|
134
|
+
</MenuItem>
|
|
135
|
+
<MenuItem icon={<PersonOutlineIcon size="l" className="icon" />}>
|
|
136
|
+
Person
|
|
137
|
+
</MenuItem>
|
|
138
|
+
<MenuItem icon={<TeamOutlineIcon size="l" className="icon" />}>
|
|
139
|
+
Team
|
|
140
|
+
</MenuItem>
|
|
141
|
+
<MenuItem icon={<SuccessOutlineIcon size="l" className="icon" />}>
|
|
142
|
+
Success
|
|
143
|
+
</MenuItem>
|
|
144
|
+
</Menu>
|
|
141
145
|
);
|
|
142
146
|
};
|
|
143
147
|
|
|
144
|
-
render(
|
|
145
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: 24 }}>
|
|
146
|
-
<div>
|
|
147
|
-
<p>Default:</p>
|
|
148
|
-
<MyMenu />
|
|
149
|
-
</div>
|
|
150
|
-
<div>
|
|
151
|
-
<p>Var1:</p>
|
|
152
|
-
<MyMenu className={`my-menu-var-1`} />
|
|
153
|
-
</div>
|
|
154
|
-
<div>
|
|
155
|
-
<p>Var1 & Var2 combined:</p>
|
|
156
|
-
<MyMenu className={`my-menu-var-1 my-menu-var-2`} />
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
);
|
|
148
|
+
render(<MyMenu />);
|
|
160
149
|
```
|
|
161
150
|
|
|
162
151
|
```postcss attached
|
|
163
152
|
@import '@rescui/menu/lib/public-api.p.css';
|
|
164
153
|
@import '@rescui/icons/lib/public-api.p.css';
|
|
165
154
|
|
|
166
|
-
.my-menu
|
|
167
|
-
@
|
|
168
|
-
|
|
169
|
-
|
|
155
|
+
.my-menu {
|
|
156
|
+
@media (max-width: 640px) {
|
|
157
|
+
@mixin rs-menu-size-s;
|
|
158
|
+
@mixin rs-menu-mode-classic;
|
|
159
|
+
@mixin rs-menu-icon-placement-right;
|
|
170
160
|
|
|
171
|
-
|
|
172
|
-
|
|
161
|
+
.icon {
|
|
162
|
+
@mixin rs-icon-size-s;
|
|
163
|
+
}
|
|
173
164
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
165
|
+
@media (max-width: 500px) {
|
|
166
|
+
@mixin rs-menu-size-m;
|
|
167
|
+
@mixin rs-menu-mode-clear;
|
|
168
|
+
@mixin rs-menu-icon-placement-left;
|
|
169
|
+
|
|
170
|
+
.icon {
|
|
171
|
+
@mixin rs-icon-size-m;
|
|
172
|
+
}
|
|
182
173
|
}
|
|
183
174
|
}
|
|
184
175
|
```
|
|
@@ -198,64 +189,49 @@ render(
|
|
|
198
189
|
|
|
199
190
|
##### Demo
|
|
200
191
|
|
|
201
|
-
|
|
192
|
+
Use the controls to see the effect at different viewport widths.
|
|
202
193
|
|
|
203
194
|
```tsx
|
|
204
195
|
import { MenuItem } from '@rescui/menu';
|
|
205
196
|
import { PersonOutlineIcon } from '@rescui/icons';
|
|
206
197
|
|
|
207
|
-
const MyMenuItem = (
|
|
198
|
+
const MyMenuItem = () => {
|
|
208
199
|
return (
|
|
209
|
-
<
|
|
210
|
-
<
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
</MenuItem>
|
|
217
|
-
</div>
|
|
200
|
+
<MenuItem
|
|
201
|
+
icon={<PersonOutlineIcon size="l" className="icon" />}
|
|
202
|
+
className="my-menu-item"
|
|
203
|
+
style={{ maxWidth: 300 }}
|
|
204
|
+
>
|
|
205
|
+
Item
|
|
206
|
+
</MenuItem>
|
|
218
207
|
);
|
|
219
208
|
};
|
|
220
209
|
|
|
221
|
-
render(
|
|
222
|
-
<div style={{ display: 'flex', flexDirection: 'column', gap: 24 }}>
|
|
223
|
-
<div>
|
|
224
|
-
<p>Default:</p>
|
|
225
|
-
<MyMenuItem />
|
|
226
|
-
</div>
|
|
227
|
-
<div>
|
|
228
|
-
<p>Var1:</p>
|
|
229
|
-
<MyMenuItem className={`my-menu-item-var-1`} />
|
|
230
|
-
</div>
|
|
231
|
-
<div>
|
|
232
|
-
<p>Var1 & Var2 combined:</p>
|
|
233
|
-
<MyMenuItem className={`my-menu-item-var-1 my-menu-item-var-2`} />
|
|
234
|
-
</div>
|
|
235
|
-
</div>
|
|
236
|
-
);
|
|
210
|
+
render(<MyMenuItem />);
|
|
237
211
|
```
|
|
238
212
|
|
|
239
213
|
```postcss
|
|
240
214
|
@import '@rescui/menu/lib/public-api.p.css';
|
|
241
215
|
@import '@rescui/icons/lib/public-api.p.css';
|
|
242
216
|
|
|
243
|
-
.my-menu-item
|
|
244
|
-
@
|
|
245
|
-
|
|
246
|
-
|
|
217
|
+
.my-menu-item {
|
|
218
|
+
@media (max-width: 640px) {
|
|
219
|
+
@mixin rs-menu-item-size-s;
|
|
220
|
+
@mixin rs-menu-item-mode-classic;
|
|
221
|
+
@mixin rs-menu-item-icon-placement-right;
|
|
247
222
|
|
|
248
|
-
|
|
249
|
-
|
|
223
|
+
.icon {
|
|
224
|
+
@mixin rs-icon-size-s;
|
|
225
|
+
}
|
|
250
226
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
227
|
+
@media (max-width: 500px) {
|
|
228
|
+
@mixin rs-menu-item-size-m;
|
|
229
|
+
@mixin rs-menu-item-mode-clear;
|
|
230
|
+
@mixin rs-menu-item-icon-placement-left;
|
|
231
|
+
|
|
232
|
+
.icon {
|
|
233
|
+
@mixin rs-icon-size-m;
|
|
234
|
+
}
|
|
259
235
|
}
|
|
260
236
|
}
|
|
261
237
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/menu",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.8-RUI-297-Add-react-compiler-to-the-packages-build-dbbefd7b8.14+dbbefd7b8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@rescui/ui-contexts": "^0.6.0",
|
|
25
25
|
"prop-types": "^15",
|
|
26
|
-
"react": ">=
|
|
26
|
+
"react": ">=17.0.0 <20"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@rescui/colors": "
|
|
30
|
-
"@rescui/postcss-preset-library": "
|
|
31
|
-
"@rescui/scripts": "
|
|
32
|
-
"@rescui/typography": "
|
|
33
|
-
"@rescui/visual-regression": "
|
|
29
|
+
"@rescui/colors": "0.3.3-RUI-297-Add-react-compiler-to-the-packages-build-dbbefd7b8.14+dbbefd7b8",
|
|
30
|
+
"@rescui/postcss-preset-library": "0.2.2",
|
|
31
|
+
"@rescui/scripts": "0.5.2",
|
|
32
|
+
"@rescui/typography": "0.27.3-RUI-297-Add-react-compiler-to-the-packages-build-dbbefd7b8.14+dbbefd7b8",
|
|
33
|
+
"@rescui/visual-regression": "0.1.4",
|
|
34
34
|
"postcss": "^8.3.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
|
|
39
39
|
},
|
|
40
40
|
"nx": {},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "dbbefd7b8e24da18262edf3baffa35039ae01af3"
|
|
42
42
|
}
|