@rescui/menu 0.13.6 → 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/README.md +3 -1
- package/lib/index.css +40 -40
- package/lib/menu.p.module.css.js +27 -27
- package/llm/components/menu.md +237 -0
- package/llm/index.md +2 -0
- package/package.json +9 -8
package/README.md
CHANGED
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 };
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
# Menu (Deprecated)
|
|
2
|
+
|
|
3
|
+
Deprecated: to get a side menu, use [this component](https://github.com/JetBrains/RescUI/tree/RUI-243-Rework-Menu-component/site/components/menu) instead.
|
|
4
|
+
|
|
5
|
+
A menu is a group of elements consisting of actions and links, represented by combinations of icons and text.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
### Features showcase
|
|
10
|
+
|
|
11
|
+
#### Example
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Menu, MenuItem } from '@rescui/menu';
|
|
15
|
+
import {
|
|
16
|
+
PersonOutlineIcon,
|
|
17
|
+
CartOutlineIcon,
|
|
18
|
+
BugOutlineIcon,
|
|
19
|
+
TeamOutlineIcon,
|
|
20
|
+
SuccessOutlineIcon
|
|
21
|
+
} from '@rescui/icons';
|
|
22
|
+
|
|
23
|
+
<Menu style={{ maxWidth: 200 }}>
|
|
24
|
+
<MenuItem icon={<CartOutlineIcon />}>Cart</MenuItem>
|
|
25
|
+
<MenuItem icon={<BugOutlineIcon />}>Bug</MenuItem>
|
|
26
|
+
<MenuItem icon={<PersonOutlineIcon />}>Person</MenuItem>
|
|
27
|
+
<MenuItem icon={<TeamOutlineIcon />}>Team</MenuItem>
|
|
28
|
+
<MenuItem icon={<SuccessOutlineIcon />}>Success</MenuItem>
|
|
29
|
+
</Menu>;
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
#### With glow hover and mode rock
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
import { Menu, MenuItem } from '@rescui/menu';
|
|
36
|
+
import {
|
|
37
|
+
PersonOutlineIcon,
|
|
38
|
+
CartOutlineIcon,
|
|
39
|
+
BugOutlineIcon,
|
|
40
|
+
TeamOutlineIcon,
|
|
41
|
+
SuccessOutlineIcon
|
|
42
|
+
} from '@rescui/icons';
|
|
43
|
+
import { useGlowHover } from '@rescui/use-glow-hover';
|
|
44
|
+
|
|
45
|
+
const GlowMenuItem = props => {
|
|
46
|
+
const ref = useGlowHover({
|
|
47
|
+
preset: 'bright-pink',
|
|
48
|
+
lightSizeEnterAnimationTime: 0,
|
|
49
|
+
lightSizeLeaveAnimationTime: 0,
|
|
50
|
+
enableBurst: true
|
|
51
|
+
});
|
|
52
|
+
return <MenuItem {...props} ref={ref} />;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const Demo = () => (
|
|
56
|
+
<Menu mode="rock" style={{ maxWidth: 200 }}>
|
|
57
|
+
<GlowMenuItem icon={<CartOutlineIcon />}>Cart</GlowMenuItem>
|
|
58
|
+
<GlowMenuItem icon={<BugOutlineIcon />}>Bug</GlowMenuItem>
|
|
59
|
+
<GlowMenuItem icon={<PersonOutlineIcon />}>Person</GlowMenuItem>
|
|
60
|
+
<GlowMenuItem icon={<TeamOutlineIcon />}>Team</GlowMenuItem>
|
|
61
|
+
<GlowMenuItem icon={<SuccessOutlineIcon />}>Success</GlowMenuItem>
|
|
62
|
+
</Menu>
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
render(<Demo />);
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
#### Change size
|
|
69
|
+
|
|
70
|
+
If you want to change a size of the menu and items content, you should use `resizeIcons` prop.
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
import { Menu, MenuItem } from '@rescui/menu';
|
|
74
|
+
import {
|
|
75
|
+
PersonOutlineIcon,
|
|
76
|
+
CartOutlineIcon,
|
|
77
|
+
BugOutlineIcon,
|
|
78
|
+
TeamOutlineIcon,
|
|
79
|
+
SuccessOutlineIcon
|
|
80
|
+
} from '@rescui/icons';
|
|
81
|
+
|
|
82
|
+
<Menu size="s" resizeIcons style={{ maxWidth: 200 }}>
|
|
83
|
+
<MenuItem icon={<CartOutlineIcon />}>Cart</MenuItem>
|
|
84
|
+
<MenuItem icon={<BugOutlineIcon />}>Bug</MenuItem>
|
|
85
|
+
<MenuItem icon={<PersonOutlineIcon />}>Person</MenuItem>
|
|
86
|
+
<MenuItem icon={<TeamOutlineIcon />}>Team</MenuItem>
|
|
87
|
+
<MenuItem icon={<SuccessOutlineIcon />}>Success</MenuItem>
|
|
88
|
+
</Menu>;
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## CSS Mixins API
|
|
92
|
+
|
|
93
|
+
#### `Menu` mixins
|
|
94
|
+
|
|
95
|
+
| Mixin name | Details |
|
|
96
|
+
| --- | --- |
|
|
97
|
+
| `rs-menu-size-s` | prop: `size`<br><br>value: `"s"` |
|
|
98
|
+
| `rs-menu-size-m` | prop: `size`<br><br>value: `"m"` |
|
|
99
|
+
| `rs-menu-size-l` | prop: `size`<br><br>value: `"l"` |
|
|
100
|
+
| `rs-menu-mode-classic` | prop: `mode`<br><br>value: `"classic"` |
|
|
101
|
+
| `rs-menu-mode-rock` | prop: `mode`<br><br>value: `"rock"` |
|
|
102
|
+
| `rs-menu-mode-clear` | prop: `mode`<br><br>value: `"clear"` |
|
|
103
|
+
| `rs-menu-icon-placement-left` | prop: `iconPlacement`<br><br>value: `"left"` |
|
|
104
|
+
| `rs-menu-icon-placement-right` | prop: `iconPlacement`<br><br>value: `"right"` |
|
|
105
|
+
|
|
106
|
+
##### Demo
|
|
107
|
+
|
|
108
|
+
Use the controls to see the effect at different viewport widths.
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
import { Menu, MenuItem } from '@rescui/menu';
|
|
112
|
+
import {
|
|
113
|
+
PersonOutlineIcon,
|
|
114
|
+
CartOutlineIcon,
|
|
115
|
+
BugOutlineIcon,
|
|
116
|
+
TeamOutlineIcon,
|
|
117
|
+
SuccessOutlineIcon
|
|
118
|
+
} from '@rescui/icons';
|
|
119
|
+
|
|
120
|
+
const MyMenu = () => {
|
|
121
|
+
return (
|
|
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>
|
|
145
|
+
);
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
render(<MyMenu />);
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
```postcss attached
|
|
152
|
+
@import '@rescui/menu/lib/public-api.p.css';
|
|
153
|
+
@import '@rescui/icons/lib/public-api.p.css';
|
|
154
|
+
|
|
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;
|
|
160
|
+
|
|
161
|
+
.icon {
|
|
162
|
+
@mixin rs-icon-size-s;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
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
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
#### `MenuItem` mixins
|
|
178
|
+
|
|
179
|
+
| Mixin name | Details |
|
|
180
|
+
| --- | --- |
|
|
181
|
+
| `rs-menu-item-size-s` | prop: `size`<br><br>value: `"s"` |
|
|
182
|
+
| `rs-menu-item-size-m` | prop: `size`<br><br>value: `"m"` |
|
|
183
|
+
| `rs-menu-item-size-l` | prop: `size`<br><br>value: `"l"` |
|
|
184
|
+
| `rs-menu-item-mode-classic` | prop: `mode`<br><br>value: `"classic"` |
|
|
185
|
+
| `rs-menu-item-mode-rock` | prop: `mode`<br><br>value: `"rock"` |
|
|
186
|
+
| `rs-menu-item-mode-clear` | prop: `mode`<br><br>value: `"clear"` |
|
|
187
|
+
| `rs-menu-item-icon-placement-left` | prop: `iconPlacement`<br><br>value: `"right"` |
|
|
188
|
+
| `rs-menu-item-icon-placement-right` | prop: `iconPlacement`<br><br>value: `"left"` |
|
|
189
|
+
|
|
190
|
+
##### Demo
|
|
191
|
+
|
|
192
|
+
Use the controls to see the effect at different viewport widths.
|
|
193
|
+
|
|
194
|
+
```tsx
|
|
195
|
+
import { MenuItem } from '@rescui/menu';
|
|
196
|
+
import { PersonOutlineIcon } from '@rescui/icons';
|
|
197
|
+
|
|
198
|
+
const MyMenuItem = () => {
|
|
199
|
+
return (
|
|
200
|
+
<MenuItem
|
|
201
|
+
icon={<PersonOutlineIcon size="l" className="icon" />}
|
|
202
|
+
className="my-menu-item"
|
|
203
|
+
style={{ maxWidth: 300 }}
|
|
204
|
+
>
|
|
205
|
+
Item
|
|
206
|
+
</MenuItem>
|
|
207
|
+
);
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
render(<MyMenuItem />);
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
```postcss
|
|
214
|
+
@import '@rescui/menu/lib/public-api.p.css';
|
|
215
|
+
@import '@rescui/icons/lib/public-api.p.css';
|
|
216
|
+
|
|
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;
|
|
222
|
+
|
|
223
|
+
.icon {
|
|
224
|
+
@mixin rs-icon-size-s;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
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
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
```
|
package/llm/index.md
ADDED
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",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"src:main": "src/index.ts",
|
|
10
10
|
"files": [
|
|
11
11
|
"lib",
|
|
12
|
+
"llm",
|
|
12
13
|
"LICENSE.txt"
|
|
13
14
|
],
|
|
14
15
|
"publishConfig": {
|
|
@@ -22,14 +23,14 @@
|
|
|
22
23
|
"peerDependencies": {
|
|
23
24
|
"@rescui/ui-contexts": "^0.6.0",
|
|
24
25
|
"prop-types": "^15",
|
|
25
|
-
"react": ">=
|
|
26
|
+
"react": ">=17.0.0 <20"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
|
-
"@rescui/colors": "
|
|
29
|
-
"@rescui/postcss-preset-library": "
|
|
30
|
-
"@rescui/scripts": "
|
|
31
|
-
"@rescui/typography": "
|
|
32
|
-
"@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",
|
|
33
34
|
"postcss": "^8.3.0"
|
|
34
35
|
},
|
|
35
36
|
"scripts": {
|
|
@@ -37,5 +38,5 @@
|
|
|
37
38
|
"build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
|
|
38
39
|
},
|
|
39
40
|
"nx": {},
|
|
40
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "dbbefd7b8e24da18262edf3baffa35039ae01af3"
|
|
41
42
|
}
|