@rescui/menu 0.11.0 → 0.12.1-RUI-257-collapse-prop-types-warning-dbcf0473.17
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.js +1 -0
- package/lib/menu.p.module.css.js +27 -27
- package/lib/parts/divider.js +1 -0
- package/lib/parts/group-header.js +1 -0
- package/lib/parts/menu-context.d.ts +2 -2
- package/lib/parts/menu-context.js +14 -2
- package/lib/parts/menu-item.js +1 -0
- package/lib/parts/use-menu-keyboard-navigation.js +1 -0
- package/package.json +9 -9
package/lib/index.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
.
|
|
1
|
+
._themeLight_wvcqbr_8{
|
|
2
2
|
--rs-theme-dark:0;
|
|
3
3
|
}
|
|
4
|
-
.
|
|
4
|
+
._themeDark_wvcqbr_11{
|
|
5
5
|
--rs-theme-dark:1;
|
|
6
6
|
}
|
|
7
|
-
.
|
|
7
|
+
._sizeS_wvcqbr_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;
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
43
43
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
44
44
|
}
|
|
45
|
-
.
|
|
45
|
+
._sizeM_wvcqbr_18{
|
|
46
46
|
--_rs-menu-mi-icon-offset:8px;
|
|
47
47
|
--_rs-menu-mi-icon-size:24px;
|
|
48
48
|
--_rs-menu-mi-vertical-padding:8px;
|
|
@@ -84,11 +84,11 @@
|
|
|
84
84
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
85
85
|
}
|
|
86
86
|
@media screen and (max-width: 640px){
|
|
87
|
-
.
|
|
87
|
+
._sizeM_wvcqbr_18{
|
|
88
88
|
--_rs-typography-text-2-sm-list-li-margin-top-from-text:12px;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
.
|
|
91
|
+
._sizeL_wvcqbr_21{
|
|
92
92
|
--_rs-menu-mi-icon-offset:16px;
|
|
93
93
|
--_rs-menu-mi-icon-size:28px;
|
|
94
94
|
--_rs-menu-mi-vertical-padding:12px;
|
|
@@ -130,11 +130,11 @@
|
|
|
130
130
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
131
131
|
}
|
|
132
132
|
@media screen and (max-width: 640px){
|
|
133
|
-
.
|
|
133
|
+
._sizeL_wvcqbr_21{
|
|
134
134
|
--_rs-typography-text-1-sm-list-li-margin-top-from-text:16px;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
.
|
|
137
|
+
._modeClassic_wvcqbr_25{
|
|
138
138
|
--_rs-menu-mi-horizontal-padding-with-mode:var(
|
|
139
139
|
--_rs-menu-mi-horizontal-padding
|
|
140
140
|
);
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
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)
|
|
149
149
|
);
|
|
150
150
|
}
|
|
151
|
-
.
|
|
151
|
+
._modeRock_wvcqbr_28{
|
|
152
152
|
--_rs-menu-mi-horizontal-padding-with-mode:var(
|
|
153
153
|
--_rs-menu-mi-horizontal-padding
|
|
154
154
|
);
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
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)
|
|
163
163
|
);
|
|
164
164
|
}
|
|
165
|
-
.
|
|
165
|
+
._modeClear_wvcqbr_31{
|
|
166
166
|
--_rs-menu-mi-horizontal-padding-with-mode:0;
|
|
167
167
|
--_rs-menu-mi-active-background:none;
|
|
168
168
|
--_rs-menu-mi-selected-color:var(--_rs-color-primary);
|
|
@@ -175,15 +175,15 @@
|
|
|
175
175
|
0.1
|
|
176
176
|
);
|
|
177
177
|
}
|
|
178
|
-
.
|
|
178
|
+
._iconPlacementLeft_wvcqbr_35{
|
|
179
179
|
--_rs-menu-mi-flex-direction:row;
|
|
180
180
|
--_rs-menu-mi-justify-content:initial;
|
|
181
181
|
}
|
|
182
|
-
.
|
|
182
|
+
._iconPlacementRight_wvcqbr_39{
|
|
183
183
|
--_rs-menu-mi-flex-direction:row-reverse;
|
|
184
184
|
--_rs-menu-mi-justify-content:space-between;
|
|
185
185
|
}
|
|
186
|
-
.
|
|
186
|
+
._wrapper_wvcqbr_43{
|
|
187
187
|
--_rs-theme-dark:var(
|
|
188
188
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
189
189
|
var(--rs-theme-dark, 0)
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
194
194
|
}
|
|
195
195
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
196
|
-
.
|
|
196
|
+
._wrapper_wvcqbr_43{
|
|
197
197
|
--_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)));
|
|
198
198
|
--_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)));
|
|
199
199
|
--_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)));
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
205
|
-
.
|
|
205
|
+
._wrapper_wvcqbr_43{
|
|
206
206
|
--_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);
|
|
207
207
|
--_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));
|
|
208
208
|
--_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));
|
|
@@ -210,11 +210,11 @@
|
|
|
210
210
|
--_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));
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
.
|
|
213
|
+
._wrapper_wvcqbr_43 {
|
|
214
214
|
|
|
215
215
|
display:flex;
|
|
216
216
|
}
|
|
217
|
-
.
|
|
217
|
+
._menuItem_wvcqbr_50{
|
|
218
218
|
letter-spacing:var(
|
|
219
219
|
--rs-text-base-letter-spacing,
|
|
220
220
|
var(--_rs-typography-letter-spacing)
|
|
@@ -255,52 +255,52 @@
|
|
|
255
255
|
-webkit-font-smoothing:inherit;
|
|
256
256
|
-moz-osx-font-smoothing:inherit;
|
|
257
257
|
}
|
|
258
|
-
.
|
|
258
|
+
._menuItem_wvcqbr_50:focus{
|
|
259
259
|
outline:none;
|
|
260
260
|
}
|
|
261
|
-
.
|
|
261
|
+
._keyboardNavigationDisabled_wvcqbr_85 ._menuItem_wvcqbr_50:focus[data-focus-method='key']{
|
|
262
262
|
box-shadow:0 0 0 2px var(--_rs-color-primary-dim), inset 0 0 0 2px var(--_rs-color-primary-dim);
|
|
263
263
|
}
|
|
264
|
-
.
|
|
264
|
+
._menuItem_wvcqbr_50:active{
|
|
265
265
|
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));
|
|
266
266
|
background:var(--_rs-menu-mi-active-background);
|
|
267
267
|
}
|
|
268
|
-
.
|
|
268
|
+
._menuItem_wvcqbr_50._selected_wvcqbr_99{
|
|
269
269
|
color:var(--_rs-menu-mi-selected-color);
|
|
270
270
|
background:var(--_rs-menu-mi-selected-background);
|
|
271
271
|
}
|
|
272
|
-
.
|
|
273
|
-
.
|
|
272
|
+
._menuItem_wvcqbr_50._highlighted_wvcqbr_106,
|
|
273
|
+
._menuItem_wvcqbr_50:not(._disableCursor_wvcqbr_107):hover{
|
|
274
274
|
color:var(--_rs-menu-mi-hover-color);
|
|
275
275
|
background:var(--_rs-menu-mi-hover-background);
|
|
276
276
|
}
|
|
277
|
-
.
|
|
278
|
-
.
|
|
277
|
+
._menuItem_wvcqbr_50._highlighted_wvcqbr_106._selected_wvcqbr_99,
|
|
278
|
+
._menuItem_wvcqbr_50._selected_wvcqbr_99:not(._disableCursor_wvcqbr_107):hover{
|
|
279
279
|
color:var(--_rs-menu-mi-selected-hover-color);
|
|
280
280
|
background-color:var(--_rs-menu-mi-selected-hover-background);
|
|
281
281
|
}
|
|
282
|
-
.
|
|
282
|
+
._menuItem_wvcqbr_50._disabled_wvcqbr_120{
|
|
283
283
|
pointer-events:none;
|
|
284
284
|
|
|
285
285
|
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);
|
|
286
286
|
}
|
|
287
|
-
.
|
|
287
|
+
._disableCursor_wvcqbr_107{
|
|
288
288
|
pointer-events:none;
|
|
289
289
|
}
|
|
290
|
-
.
|
|
290
|
+
._content_wvcqbr_131{
|
|
291
291
|
flex-grow:1;
|
|
292
292
|
|
|
293
293
|
font-size:inherit;
|
|
294
294
|
}
|
|
295
|
-
.
|
|
295
|
+
._icon_wvcqbr_35{
|
|
296
296
|
flex:0 0;
|
|
297
297
|
flex-basis:auto;
|
|
298
298
|
}
|
|
299
|
-
.
|
|
299
|
+
._icon_wvcqbr_35._resizedIcon_wvcqbr_141{
|
|
300
300
|
width:auto;
|
|
301
301
|
height:var(--_rs-menu-mi-icon-size);
|
|
302
302
|
}
|
|
303
|
-
.
|
|
303
|
+
._divider_wvcqbr_149{
|
|
304
304
|
flex-shrink:0;
|
|
305
305
|
|
|
306
306
|
width:100%;
|
|
@@ -311,13 +311,13 @@
|
|
|
311
311
|
|
|
312
312
|
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);
|
|
313
313
|
}
|
|
314
|
-
.
|
|
314
|
+
._groupHeaderThemeLight_wvcqbr_163{
|
|
315
315
|
--rs-theme-dark:0;
|
|
316
316
|
}
|
|
317
|
-
.
|
|
317
|
+
._groupHeaderThemeDark_wvcqbr_166{
|
|
318
318
|
--rs-theme-dark:1;
|
|
319
319
|
}
|
|
320
|
-
.
|
|
320
|
+
._groupHeaderSizeL_wvcqbr_170{
|
|
321
321
|
--_rs-menu-gh-vertical-padding:12px;
|
|
322
322
|
--_rs-menu-gh-horizontal-padding:16px;
|
|
323
323
|
--_rs-typography-letter-spacing:var(--rs-h3-letter-spacing, normal);
|
|
@@ -350,7 +350,7 @@
|
|
|
350
350
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
351
351
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
352
352
|
}
|
|
353
|
-
.
|
|
353
|
+
._groupHeaderSizeM_wvcqbr_173{
|
|
354
354
|
--_rs-menu-gh-vertical-padding:8px;
|
|
355
355
|
--_rs-menu-gh-horizontal-padding:16px;
|
|
356
356
|
--_rs-typography-letter-spacing:var(--rs-h4-letter-spacing, normal);
|
|
@@ -383,7 +383,7 @@
|
|
|
383
383
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
384
384
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
385
385
|
}
|
|
386
|
-
.
|
|
386
|
+
._groupHeaderSizeS_wvcqbr_176{
|
|
387
387
|
--_rs-menu-gh-vertical-padding:6px;
|
|
388
388
|
--_rs-menu-gh-horizontal-padding:8px;
|
|
389
389
|
--_rs-typography-letter-spacing:var(--rs-h5-letter-spacing, normal);
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
417
417
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
418
418
|
}
|
|
419
|
-
.
|
|
419
|
+
._groupHeader_wvcqbr_163{
|
|
420
420
|
--_rs-theme-dark:var(
|
|
421
421
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
422
422
|
var(--rs-theme-dark, 0)
|
|
@@ -426,7 +426,7 @@
|
|
|
426
426
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
427
427
|
}
|
|
428
428
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
429
|
-
.
|
|
429
|
+
._groupHeader_wvcqbr_163{
|
|
430
430
|
--_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)));
|
|
431
431
|
--_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)));
|
|
432
432
|
--_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)));
|
|
@@ -435,7 +435,7 @@
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
438
|
-
.
|
|
438
|
+
._groupHeader_wvcqbr_163{
|
|
439
439
|
--_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);
|
|
440
440
|
--_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));
|
|
441
441
|
--_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));
|
|
@@ -443,7 +443,7 @@
|
|
|
443
443
|
--_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));
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
-
.
|
|
446
|
+
._groupHeader_wvcqbr_163 {
|
|
447
447
|
letter-spacing:var(
|
|
448
448
|
--rs-text-base-letter-spacing,
|
|
449
449
|
var(--_rs-typography-letter-spacing)
|
package/lib/menu.js
CHANGED
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_wvcqbr_8",
|
|
3
|
+
"themeDark": "_themeDark_wvcqbr_11",
|
|
4
|
+
"sizeS": "_sizeS_wvcqbr_15",
|
|
5
|
+
"sizeM": "_sizeM_wvcqbr_18",
|
|
6
|
+
"sizeL": "_sizeL_wvcqbr_21",
|
|
7
|
+
"modeClassic": "_modeClassic_wvcqbr_25",
|
|
8
|
+
"modeRock": "_modeRock_wvcqbr_28",
|
|
9
|
+
"modeClear": "_modeClear_wvcqbr_31",
|
|
10
|
+
"iconPlacementLeft": "_iconPlacementLeft_wvcqbr_35",
|
|
11
|
+
"iconPlacementRight": "_iconPlacementRight_wvcqbr_39",
|
|
12
|
+
"wrapper": "_wrapper_wvcqbr_43",
|
|
13
|
+
"menuItem": "_menuItem_wvcqbr_50",
|
|
14
|
+
"keyboardNavigationDisabled": "_keyboardNavigationDisabled_wvcqbr_85",
|
|
15
|
+
"selected": "_selected_wvcqbr_99",
|
|
16
|
+
"highlighted": "_highlighted_wvcqbr_106",
|
|
17
|
+
"disableCursor": "_disableCursor_wvcqbr_107",
|
|
18
|
+
"disabled": "_disabled_wvcqbr_120",
|
|
19
|
+
"content": "_content_wvcqbr_131",
|
|
20
|
+
"icon": "_icon_wvcqbr_35",
|
|
21
|
+
"resizedIcon": "_resizedIcon_wvcqbr_141",
|
|
22
|
+
"divider": "_divider_wvcqbr_149",
|
|
23
|
+
"groupHeaderThemeLight": "_groupHeaderThemeLight_wvcqbr_163",
|
|
24
|
+
"groupHeaderThemeDark": "_groupHeaderThemeDark_wvcqbr_166",
|
|
25
|
+
"groupHeaderSizeL": "_groupHeaderSizeL_wvcqbr_170",
|
|
26
|
+
"groupHeaderSizeM": "_groupHeaderSizeM_wvcqbr_173",
|
|
27
|
+
"groupHeaderSizeS": "_groupHeaderSizeS_wvcqbr_176",
|
|
28
|
+
"groupHeader": "_groupHeader_wvcqbr_163"
|
|
29
29
|
};
|
|
30
30
|
export { styles as default };
|
package/lib/parts/divider.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { Theme } from '@rescui/ui-contexts';
|
|
3
3
|
export declare type MenuItemSize = 's' | 'm' | 'l';
|
|
4
4
|
export declare type MenuItemIconPlacement = 'left' | 'right';
|
|
@@ -21,4 +21,4 @@ export interface MenuContextValue {
|
|
|
21
21
|
export declare const DEFAULT_MENU_CONTEXT: MenuContextValue;
|
|
22
22
|
export declare const MenuContext: React.Context<MenuContextValue>;
|
|
23
23
|
export declare const useMenuContext: () => MenuContextValue;
|
|
24
|
-
export declare const MenuProvider: React.FC<MenuContextValue
|
|
24
|
+
export declare const MenuProvider: React.FC<PropsWithChildren<MenuContextValue>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import React, { useContext } from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
const DEFAULT_MENU_CONTEXT = {
|
|
@@ -16,14 +17,25 @@ const useMenuContext = () => useContext(MenuContext);
|
|
|
16
17
|
const MenuProvider = _ref => {
|
|
17
18
|
let {
|
|
18
19
|
children,
|
|
20
|
+
disabled = DEFAULT_MENU_CONTEXT.disabled,
|
|
21
|
+
isKeyboardNavigating = DEFAULT_MENU_CONTEXT.isKeyboardNavigating,
|
|
22
|
+
wrapWithLi = DEFAULT_MENU_CONTEXT.wrapWithLi,
|
|
23
|
+
registerItem = DEFAULT_MENU_CONTEXT.registerItem,
|
|
24
|
+
unregisterItem = DEFAULT_MENU_CONTEXT.unregisterItem,
|
|
19
25
|
...restProps
|
|
20
26
|
} = _ref;
|
|
21
27
|
return /*#__PURE__*/React.createElement(MenuContext.Provider, {
|
|
22
|
-
value:
|
|
28
|
+
value: {
|
|
29
|
+
disabled,
|
|
30
|
+
isKeyboardNavigating,
|
|
31
|
+
wrapWithLi,
|
|
32
|
+
registerItem,
|
|
33
|
+
unregisterItem,
|
|
34
|
+
...restProps
|
|
35
|
+
}
|
|
23
36
|
}, children);
|
|
24
37
|
};
|
|
25
38
|
|
|
26
|
-
MenuProvider.defaultProps = DEFAULT_MENU_CONTEXT;
|
|
27
39
|
MenuProvider.propTypes = {
|
|
28
40
|
size: PropTypes.oneOf(['l', 'm', 's']),
|
|
29
41
|
mode: PropTypes.oneOf(['clear', 'classic', 'rock']),
|
package/lib/parts/menu-item.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/menu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1-RUI-257-collapse-prop-types-warning-dbcf0473.17+dbcf0473",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@rescui/ui-contexts": "^0.5.0",
|
|
24
|
-
"prop-types": "^15
|
|
25
|
-
"react": ">=16.8.0 <
|
|
24
|
+
"prop-types": "^15",
|
|
25
|
+
"react": ">=16.8.0 <20"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@rescui/colors": "
|
|
29
|
-
"@rescui/postcss-preset-library": "
|
|
30
|
-
"@rescui/scripts": "
|
|
31
|
-
"@rescui/typography": "
|
|
32
|
-
"@rescui/visual-regression": "
|
|
28
|
+
"@rescui/colors": "0.2.11-RUI-257-collapse-prop-types-warning-dbcf0473.17+dbcf0473",
|
|
29
|
+
"@rescui/postcss-preset-library": "0.2.2",
|
|
30
|
+
"@rescui/scripts": "0.5.1",
|
|
31
|
+
"@rescui/typography": "0.24.1-RUI-257-collapse-prop-types-warning-dbcf0473.17+dbcf0473",
|
|
32
|
+
"@rescui/visual-regression": "0.1.2",
|
|
33
33
|
"postcss": "^8.3.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
|
|
38
38
|
},
|
|
39
39
|
"nx": {},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "dbcf0473f3506a6ebd653c43d4f43a16f5aac59d"
|
|
41
41
|
}
|