@rescui/menu 0.3.0 → 0.5.1
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 +120 -102
- package/lib/index.module.pcss.js +23 -22
- package/lib/menu.js +5 -1
- package/lib/parts/menu-context.d.ts +1 -0
- package/lib/parts/menu-context.js +1 -0
- package/lib/parts/menu-item.d.ts +1 -0
- package/lib/parts/menu-item.js +6 -3
- package/package.json +6 -6
package/lib/index.css
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
.
|
|
1
|
+
._menuItem_fhql85_9{
|
|
2
2
|
display:-webkit-box;
|
|
3
3
|
display:-ms-flexbox;
|
|
4
4
|
display:flex;
|
|
5
5
|
outline:none;
|
|
6
6
|
cursor:pointer;
|
|
7
7
|
}
|
|
8
|
-
.
|
|
8
|
+
._content_fhql85_15{
|
|
9
9
|
-webkit-box-flex:1;
|
|
10
10
|
-ms-flex-positive:1;
|
|
11
11
|
flex-grow:1;
|
|
12
12
|
font-size:inherit;
|
|
13
13
|
}
|
|
14
|
-
.
|
|
14
|
+
._placementRight_fhql85_20{
|
|
15
15
|
-webkit-box-pack:justify;
|
|
16
16
|
-ms-flex-pack:justify;
|
|
17
17
|
justify-content:space-between;
|
|
18
18
|
}
|
|
19
|
-
.
|
|
19
|
+
._sizeS_fhql85_25{
|
|
20
20
|
padding: 6px 8px;
|
|
21
21
|
}
|
|
22
|
-
.
|
|
22
|
+
._sizeM_fhql85_29{
|
|
23
23
|
padding: 8px 16px;
|
|
24
24
|
}
|
|
25
|
-
.
|
|
25
|
+
._sizeL_fhql85_33{
|
|
26
26
|
padding: 12px 16px;
|
|
27
27
|
}
|
|
28
|
-
.
|
|
29
|
-
.
|
|
30
|
-
.
|
|
28
|
+
._modeClear_fhql85_37._sizeS_fhql85_25,
|
|
29
|
+
._modeClear_fhql85_37._sizeM_fhql85_29,
|
|
30
|
+
._modeClear_fhql85_37._sizeL_fhql85_33{
|
|
31
31
|
padding-left:0;
|
|
32
32
|
padding-right:0;
|
|
33
33
|
}
|
|
34
|
-
.
|
|
34
|
+
._themeLight_fhql85_45:focus[data-focus-method='key']{
|
|
35
35
|
-webkit-box-shadow:#8979ff 0 0 0 4px;
|
|
36
36
|
-webkit-box-shadow:var(--rs-color-primary-dim-light-theme, #8979ff) 0 0 0 4px;
|
|
37
37
|
box-shadow:#8979ff 0 0 0 4px;
|
|
38
38
|
box-shadow:var(--rs-color-primary-dim-light-theme, #8979ff) 0 0 0 4px;
|
|
39
39
|
}
|
|
40
|
-
.
|
|
40
|
+
._themeDark_fhql85_51:focus[data-focus-method='key']{
|
|
41
41
|
-webkit-box-shadow:#6f61d2 0 0 0 4px;
|
|
42
42
|
-webkit-box-shadow:var(--rs-color-primary-dim-dark-theme, #6f61d2) 0 0 0 4px;
|
|
43
43
|
box-shadow:#6f61d2 0 0 0 4px;
|
|
44
44
|
box-shadow:var(--rs-color-primary-dim-dark-theme, #6f61d2) 0 0 0 4px;
|
|
45
45
|
}
|
|
46
|
-
.
|
|
46
|
+
._sizeS_fhql85_25{
|
|
47
47
|
letter-spacing:0.0045em;
|
|
48
48
|
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
49
49
|
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
line-height:20px;
|
|
53
53
|
line-height:var(--rs-text-3-line-height, 20px);
|
|
54
54
|
}
|
|
55
|
-
._rs-reset-letter-
|
|
55
|
+
._rs-reset-letter-spacing_fhql85_1 ._sizeS_fhql85_25{
|
|
56
56
|
letter-spacing:normal;
|
|
57
57
|
}
|
|
58
|
-
.
|
|
58
|
+
._sizeM_fhql85_29{
|
|
59
59
|
letter-spacing:0.0015em;
|
|
60
60
|
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
61
61
|
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
line-height:24px;
|
|
66
66
|
line-height:var(--rs-text-2-line-height, 24px);
|
|
67
67
|
}
|
|
68
|
-
._rs-reset-letter-
|
|
68
|
+
._rs-reset-letter-spacing_fhql85_1 ._sizeM_fhql85_29{
|
|
69
69
|
letter-spacing:normal;
|
|
70
70
|
}
|
|
71
|
-
.
|
|
71
|
+
._sizeL_fhql85_33{
|
|
72
72
|
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
73
73
|
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
74
74
|
font-size:19px;
|
|
@@ -77,107 +77,136 @@
|
|
|
77
77
|
line-height:28px;
|
|
78
78
|
line-height:var(--rs-text-1-line-height, 28px);
|
|
79
79
|
}
|
|
80
|
-
.
|
|
80
|
+
._themeLight_fhql85_45{
|
|
81
|
+
color:rgba(25,25,28,0.7);
|
|
82
|
+
color:var(--rs-typography-color-average, rgba(25,25,28,0.7));
|
|
83
|
+
}
|
|
84
|
+
._themeDark_fhql85_51{
|
|
85
|
+
color:rgba(255,255,255,0.7);
|
|
86
|
+
color:var(--rs-typography-color-average, rgba(255,255,255,0.7));
|
|
87
|
+
}
|
|
88
|
+
._modeClassic_fhql85_79._themeLight_fhql85_45:active{
|
|
81
89
|
color:#19191C;
|
|
90
|
+
color:var(--rs-typography-color-hard, #19191C);
|
|
82
91
|
background-color:rgba(107, 87, 255,0.2);
|
|
83
92
|
background-color:var(--rs-color-primary-t-fog-light-theme, rgba(107, 87, 255,0.2));
|
|
84
93
|
}
|
|
85
|
-
.
|
|
94
|
+
._modeClassic_fhql85_79._themeDark_fhql85_51:active{
|
|
86
95
|
color:#FFFFFF;
|
|
96
|
+
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
87
97
|
background-color:rgba(132, 115, 255,0.3);
|
|
88
98
|
background-color:var(--rs-color-primary-t-fog-dark-theme, rgba(132, 115, 255,0.3));
|
|
89
99
|
}
|
|
90
|
-
.
|
|
100
|
+
._modeClassic_fhql85_79._themeLight_fhql85_45._selected_fhql85_91{
|
|
91
101
|
color:#FFFFFF;
|
|
102
|
+
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
92
103
|
background-color:#19191C;
|
|
93
104
|
}
|
|
94
|
-
.
|
|
105
|
+
._modeClassic_fhql85_79._themeDark_fhql85_51._selected_fhql85_91{
|
|
95
106
|
color:#19191C;
|
|
107
|
+
color:var(--rs-typography-color-hard, #19191C);
|
|
96
108
|
background-color:#FFFFFF;
|
|
97
109
|
}
|
|
98
|
-
.
|
|
110
|
+
._modeRock_fhql85_101._themeLight_fhql85_45._selected_fhql85_91{
|
|
99
111
|
color:#FFFFFF;
|
|
112
|
+
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
100
113
|
background-color:#19191C;
|
|
101
114
|
}
|
|
102
|
-
.
|
|
115
|
+
._modeRock_fhql85_101._themeDark_fhql85_51._selected_fhql85_91{
|
|
103
116
|
color:#19191C;
|
|
117
|
+
color:var(--rs-typography-color-hard, #19191C);
|
|
104
118
|
background-color:#FFFFFF;
|
|
105
119
|
}
|
|
106
|
-
.
|
|
120
|
+
._modeClear_fhql85_37._themeLight_fhql85_45._selected_fhql85_91{
|
|
107
121
|
color:#6B57FF;
|
|
108
122
|
color:var(--rs-color-primary-light-theme, #6B57FF);
|
|
109
123
|
}
|
|
110
|
-
.
|
|
124
|
+
._modeClear_fhql85_37._themeDark_fhql85_51._selected_fhql85_91{
|
|
111
125
|
color:#8473FF;
|
|
112
126
|
color:var(--rs-color-primary-dark-theme, #8473FF);
|
|
113
127
|
}
|
|
114
|
-
.
|
|
115
|
-
|
|
128
|
+
._disableCursor_fhql85_121{
|
|
129
|
+
pointer-events:none;
|
|
130
|
+
}
|
|
131
|
+
._modeClassic_fhql85_79._themeLight_fhql85_45._highlighted_fhql85_125,
|
|
132
|
+
._modeClassic_fhql85_79._themeLight_fhql85_45:not(._disableCursor_fhql85_121):hover{
|
|
116
133
|
color:#19191C;
|
|
134
|
+
color:var(--rs-typography-color-hard, #19191C);
|
|
117
135
|
background-color:rgba(25,25,28,0.1);
|
|
118
136
|
}
|
|
119
|
-
.
|
|
120
|
-
.
|
|
137
|
+
._modeRock_fhql85_101._themeLight_fhql85_45._highlighted_fhql85_125,
|
|
138
|
+
._modeRock_fhql85_101._themeLight_fhql85_45:not(._disableCursor_fhql85_121):hover{
|
|
121
139
|
color:#FFFFFF;
|
|
140
|
+
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
122
141
|
background-color:#6B57FF;
|
|
123
142
|
background-color:var(--rs-color-primary-light-theme, #6B57FF);
|
|
124
143
|
}
|
|
125
|
-
.
|
|
126
|
-
.
|
|
144
|
+
._modeClassic_fhql85_79._themeDark_fhql85_51._highlighted_fhql85_125,
|
|
145
|
+
._modeClassic_fhql85_79._themeDark_fhql85_51:not(._disableCursor_fhql85_121):hover{
|
|
127
146
|
color:#FFFFFF;
|
|
147
|
+
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
128
148
|
background-color:rgba(255,255,255,0.1);
|
|
129
149
|
}
|
|
130
|
-
.
|
|
131
|
-
.
|
|
150
|
+
._modeRock_fhql85_101._themeDark_fhql85_51._highlighted_fhql85_125,
|
|
151
|
+
._modeRock_fhql85_101._themeDark_fhql85_51:not(._disableCursor_fhql85_121):hover{
|
|
132
152
|
color:#FFFFFF;
|
|
153
|
+
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
133
154
|
background-color:#8473FF;
|
|
134
155
|
background-color:var(--rs-color-primary-dark-theme, #8473FF);
|
|
135
156
|
}
|
|
136
|
-
.
|
|
137
|
-
.
|
|
157
|
+
._modeClear_fhql85_37._themeLight_fhql85_45._highlighted_fhql85_125,
|
|
158
|
+
._modeClear_fhql85_37._themeLight_fhql85_45:not(._disableCursor_fhql85_121):hover{
|
|
138
159
|
color:#19191C;
|
|
160
|
+
color:var(--rs-typography-color-hard, #19191C);
|
|
139
161
|
}
|
|
140
|
-
.
|
|
141
|
-
.
|
|
162
|
+
._modeClear_fhql85_37._themeDark_fhql85_51._highlighted_fhql85_125,
|
|
163
|
+
._modeClear_fhql85_37._themeDark_fhql85_51:not(._disableCursor_fhql85_121):hover{
|
|
142
164
|
color:#FFFFFF;
|
|
165
|
+
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
143
166
|
}
|
|
144
|
-
.
|
|
145
|
-
.
|
|
167
|
+
._modeClassic_fhql85_79._themeLight_fhql85_45._highlighted_fhql85_125._selected_fhql85_91,
|
|
168
|
+
._modeClassic_fhql85_79._themeLight_fhql85_45._selected_fhql85_91:not(._disableCursor_fhql85_121):hover{
|
|
146
169
|
background-color:#303033;
|
|
147
170
|
color:#FFFFFF;
|
|
171
|
+
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
148
172
|
}
|
|
149
|
-
.
|
|
150
|
-
.
|
|
173
|
+
._modeRock_fhql85_101._themeLight_fhql85_45._highlighted_fhql85_125._selected_fhql85_91,
|
|
174
|
+
._modeRock_fhql85_101._themeLight_fhql85_45._selected_fhql85_91:not(._disableCursor_fhql85_121):hover{
|
|
151
175
|
background-color:#303033;
|
|
152
176
|
color:#FFFFFF;
|
|
177
|
+
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
153
178
|
}
|
|
154
|
-
.
|
|
155
|
-
.
|
|
179
|
+
._modeClassic_fhql85_79._themeDark_fhql85_51._highlighted_fhql85_125._selected_fhql85_91,
|
|
180
|
+
._modeClassic_fhql85_79._themeDark_fhql85_51._selected_fhql85_91:not(._disableCursor_fhql85_121):hover{
|
|
156
181
|
background-color:#E8E8E8;
|
|
157
182
|
color:#19191C;
|
|
183
|
+
color:var(--rs-typography-color-hard, #19191C);
|
|
158
184
|
}
|
|
159
|
-
.
|
|
160
|
-
.
|
|
185
|
+
._modeRock_fhql85_101._themeDark_fhql85_51._highlighted_fhql85_125._selected_fhql85_91,
|
|
186
|
+
._modeRock_fhql85_101._themeDark_fhql85_51._selected_fhql85_91:not(._disableCursor_fhql85_121):hover{
|
|
161
187
|
background-color:#E8E8E8;
|
|
162
188
|
color:#19191C;
|
|
189
|
+
color:var(--rs-typography-color-hard, #19191C);
|
|
163
190
|
}
|
|
164
|
-
.
|
|
165
|
-
.
|
|
191
|
+
._modeClear_fhql85_37._themeLight_fhql85_45._highlighted_fhql85_125._selected_fhql85_91,
|
|
192
|
+
._modeClear_fhql85_37._themeLight_fhql85_45._selected_fhql85_91:not(._disableCursor_fhql85_121):hover{
|
|
166
193
|
background-color:rgba(25,25,28,0.1);
|
|
167
194
|
}
|
|
168
|
-
.
|
|
169
|
-
.
|
|
195
|
+
._modeClear_fhql85_37._themeDark_fhql85_51._highlighted_fhql85_125._selected_fhql85_91,
|
|
196
|
+
._modeClear_fhql85_37._themeDark_fhql85_51._selected_fhql85_91:not(._disableCursor_fhql85_121):hover{
|
|
170
197
|
background-color:rgba(255,255,255,0.1);
|
|
171
198
|
}
|
|
172
|
-
.
|
|
199
|
+
._menuItem_fhql85_9._themeLight_fhql85_45._disabled_fhql85_197{
|
|
173
200
|
pointer-events:none;
|
|
174
|
-
color:rgba(25,25,28,0.
|
|
201
|
+
color:rgba(25,25,28,0.5);
|
|
202
|
+
color:var(--rs-typography-color-pale, rgba(25,25,28,0.5));
|
|
175
203
|
}
|
|
176
|
-
.
|
|
204
|
+
._menuItem_fhql85_9._themeDark_fhql85_51._disabled_fhql85_197{
|
|
177
205
|
pointer-events:none;
|
|
178
|
-
color:rgba(255,255,255,0.
|
|
206
|
+
color:rgba(255,255,255,0.5);
|
|
207
|
+
color:var(--rs-typography-color-pale, rgba(255,255,255,0.5));
|
|
179
208
|
}
|
|
180
|
-
.
|
|
209
|
+
._icon_fhql85_208{
|
|
181
210
|
-webkit-box-flex:0;
|
|
182
211
|
-ms-flex:0 0;
|
|
183
212
|
flex:0 0;
|
|
@@ -185,25 +214,25 @@
|
|
|
185
214
|
flex-basis:auto;
|
|
186
215
|
|
|
187
216
|
}
|
|
188
|
-
.
|
|
217
|
+
._sizeS_fhql85_25._placementLeft_fhql85_212 ._icon_fhql85_208{
|
|
189
218
|
margin-right:8px;
|
|
190
219
|
}
|
|
191
|
-
.
|
|
220
|
+
._sizeS_fhql85_25._placementRight_fhql85_20 ._icon_fhql85_208{
|
|
192
221
|
margin-left:8px;
|
|
193
222
|
}
|
|
194
|
-
.
|
|
223
|
+
._sizeM_fhql85_29._placementLeft_fhql85_212 ._icon_fhql85_208{
|
|
195
224
|
margin-right:8px;
|
|
196
225
|
}
|
|
197
|
-
.
|
|
226
|
+
._sizeM_fhql85_29._placementRight_fhql85_20 ._icon_fhql85_208{
|
|
198
227
|
margin-left:8px;
|
|
199
228
|
}
|
|
200
|
-
.
|
|
229
|
+
._sizeL_fhql85_33._placementLeft_fhql85_212 ._icon_fhql85_208{
|
|
201
230
|
margin-right:16px;
|
|
202
231
|
}
|
|
203
|
-
.
|
|
232
|
+
._sizeL_fhql85_33._placementRight_fhql85_20 ._icon_fhql85_208{
|
|
204
233
|
margin-left:16px;
|
|
205
234
|
}
|
|
206
|
-
.
|
|
235
|
+
._divider_fhql85_238{
|
|
207
236
|
width:100%;
|
|
208
237
|
border:none;
|
|
209
238
|
height:1px;
|
|
@@ -211,66 +240,55 @@
|
|
|
211
240
|
-ms-flex-negative:0;
|
|
212
241
|
flex-shrink:0;
|
|
213
242
|
}
|
|
214
|
-
.
|
|
243
|
+
._divider_fhql85_238._themeLight_fhql85_45{
|
|
215
244
|
background-color:rgba(25,25,28,0.2);
|
|
216
245
|
}
|
|
217
|
-
.
|
|
246
|
+
._divider_fhql85_238._themeDark_fhql85_51{
|
|
218
247
|
background-color:rgba(255,255,255,0.2);
|
|
219
248
|
}
|
|
220
|
-
.
|
|
249
|
+
._groupHeader_fhql85_254{
|
|
221
250
|
border:none;
|
|
222
|
-
text-transform:uppercase;
|
|
223
|
-
}
|
|
224
|
-
._groupHeaderSizeS_88vtnu_256{
|
|
225
|
-
padding: 6px 8px;
|
|
226
|
-
padding-top:8px;
|
|
227
|
-
padding-bottom:4px;
|
|
228
251
|
}
|
|
229
|
-
.
|
|
230
|
-
padding:
|
|
231
|
-
|
|
232
|
-
padding-bottom:6px;
|
|
233
|
-
}
|
|
234
|
-
._groupHeaderSizeL_88vtnu_269{
|
|
252
|
+
._groupHeaderSizeL_fhql85_258{
|
|
253
|
+
padding: 12px 16px;
|
|
254
|
+
letter-spacing:normal;
|
|
235
255
|
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
236
256
|
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
237
|
-
font-size:
|
|
238
|
-
font-size:var(--rs-
|
|
239
|
-
font-weight:
|
|
257
|
+
font-size:20px;
|
|
258
|
+
font-size:var(--rs-h3-font-size, 20px);
|
|
259
|
+
font-weight:530;
|
|
260
|
+
font-weight:var(--rs-font-weight-semi-bold, 530);
|
|
240
261
|
line-height:28px;
|
|
241
|
-
line-height:var(--rs-
|
|
262
|
+
line-height:var(--rs-h3-line-height, 28px);
|
|
242
263
|
}
|
|
243
|
-
.
|
|
244
|
-
|
|
264
|
+
._groupHeaderSizeM_fhql85_263{
|
|
265
|
+
padding: 8px 16px;
|
|
245
266
|
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
246
267
|
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
247
|
-
font-size:
|
|
248
|
-
font-size:var(--rs-
|
|
249
|
-
font-weight:
|
|
268
|
+
font-size:17px;
|
|
269
|
+
font-size:var(--rs-h4-font-size, 17px);
|
|
270
|
+
font-weight:530;
|
|
271
|
+
font-weight:var(--rs-font-weight-semi-bold, 530);
|
|
250
272
|
line-height:24px;
|
|
251
|
-
line-height:var(--rs-
|
|
273
|
+
line-height:var(--rs-h4-line-height, 24px);
|
|
252
274
|
}
|
|
253
|
-
.
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
._groupHeaderSizeS_88vtnu_256{
|
|
257
|
-
letter-spacing:0.0045em;
|
|
275
|
+
._groupHeaderSizeS_fhql85_268{
|
|
276
|
+
padding: 6px 8px;
|
|
258
277
|
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
259
278
|
font-family:var(--rs-font-family-ui, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
260
|
-
font-size:
|
|
261
|
-
font-size:var(--rs-
|
|
279
|
+
font-size:14px;
|
|
280
|
+
font-size:var(--rs-h5-font-size, 14px);
|
|
281
|
+
font-weight:530;
|
|
282
|
+
font-weight:var(--rs-font-weight-semi-bold, 530);
|
|
262
283
|
line-height:20px;
|
|
263
|
-
line-height:var(--rs-
|
|
284
|
+
line-height:var(--rs-h5-line-height, 20px);
|
|
264
285
|
}
|
|
265
|
-
.
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
._themeLight_88vtnu_45{
|
|
269
|
-
color:rgba(25,25,28,0.7);
|
|
270
|
-
color:var(--rs-typography-color-average, rgba(25,25,28,0.7));
|
|
286
|
+
._themeLight_fhql85_45{
|
|
287
|
+
color:#19191C;
|
|
288
|
+
color:var(--rs-typography-color-hard, #19191C);
|
|
271
289
|
}
|
|
272
|
-
.
|
|
273
|
-
color
|
|
274
|
-
color:var(--rs-typography-color-
|
|
290
|
+
._themeDark_fhql85_51{
|
|
291
|
+
color:#FFFFFF;
|
|
292
|
+
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
275
293
|
}
|
|
276
294
|
|
package/lib/index.module.pcss.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"menuItem": "
|
|
3
|
-
"content": "
|
|
4
|
-
"placementRight": "
|
|
5
|
-
"sizeS": "
|
|
6
|
-
"sizeM": "
|
|
7
|
-
"sizeL": "
|
|
8
|
-
"modeClear": "
|
|
9
|
-
"themeLight": "
|
|
10
|
-
"themeDark": "
|
|
11
|
-
"rs-reset-letter-spacing": "_rs-reset-letter-
|
|
12
|
-
"modeClassic": "
|
|
13
|
-
"selected": "
|
|
14
|
-
"modeRock": "
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
2
|
+
"menuItem": "_menuItem_fhql85_9",
|
|
3
|
+
"content": "_content_fhql85_15",
|
|
4
|
+
"placementRight": "_placementRight_fhql85_20",
|
|
5
|
+
"sizeS": "_sizeS_fhql85_25",
|
|
6
|
+
"sizeM": "_sizeM_fhql85_29",
|
|
7
|
+
"sizeL": "_sizeL_fhql85_33",
|
|
8
|
+
"modeClear": "_modeClear_fhql85_37",
|
|
9
|
+
"themeLight": "_themeLight_fhql85_45",
|
|
10
|
+
"themeDark": "_themeDark_fhql85_51",
|
|
11
|
+
"rs-reset-letter-spacing": "_rs-reset-letter-spacing_fhql85_1",
|
|
12
|
+
"modeClassic": "_modeClassic_fhql85_79",
|
|
13
|
+
"selected": "_selected_fhql85_91",
|
|
14
|
+
"modeRock": "_modeRock_fhql85_101",
|
|
15
|
+
"disableCursor": "_disableCursor_fhql85_121",
|
|
16
|
+
"highlighted": "_highlighted_fhql85_125",
|
|
17
|
+
"disabled": "_disabled_fhql85_197",
|
|
18
|
+
"icon": "_icon_fhql85_208",
|
|
19
|
+
"placementLeft": "_placementLeft_fhql85_212",
|
|
20
|
+
"divider": "_divider_fhql85_238",
|
|
21
|
+
"groupHeader": "_groupHeader_fhql85_254",
|
|
22
|
+
"groupHeaderSizeL": "_groupHeaderSizeL_fhql85_258",
|
|
23
|
+
"groupHeaderSizeM": "_groupHeaderSizeM_fhql85_263",
|
|
24
|
+
"groupHeaderSizeS": "_groupHeaderSizeS_fhql85_268"
|
|
24
25
|
};
|
|
25
26
|
export default styles;
|
package/lib/menu.js
CHANGED
|
@@ -6,7 +6,7 @@ import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-sta
|
|
|
6
6
|
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
7
7
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
8
8
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
|
9
|
-
var _excluded = ["tag", "itemTag", "iconPlacement", "disabled", "size", "mode", "theme"];
|
|
9
|
+
var _excluded = ["tag", "itemTag", "iconPlacement", "disabled", "size", "mode", "disableCursor", "theme"];
|
|
10
10
|
|
|
11
11
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) { symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
12
12
|
|
|
@@ -27,6 +27,8 @@ var Menu = function Menu(_ref) {
|
|
|
27
27
|
_ref$size = _ref.size,
|
|
28
28
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
29
29
|
mode = _ref.mode,
|
|
30
|
+
_ref$disableCursor = _ref.disableCursor,
|
|
31
|
+
disableCursor = _ref$disableCursor === void 0 ? false : _ref$disableCursor,
|
|
30
32
|
theme = _ref.theme,
|
|
31
33
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
32
34
|
|
|
@@ -36,6 +38,7 @@ var Menu = function Menu(_ref) {
|
|
|
36
38
|
iconPlacement: iconPlacement,
|
|
37
39
|
disabled: disabled,
|
|
38
40
|
size: size,
|
|
41
|
+
disableCursor: disableCursor,
|
|
39
42
|
mode: mode,
|
|
40
43
|
theme: theme
|
|
41
44
|
}, /*#__PURE__*/React.createElement(Tag, _objectSpread({}, restProps)));
|
|
@@ -45,6 +48,7 @@ Menu.propTypes = {
|
|
|
45
48
|
size: PropTypes.oneOf(['l', 'm', 's']),
|
|
46
49
|
mode: PropTypes.oneOf(['clear', 'classic', 'rock']),
|
|
47
50
|
theme: PropTypes.oneOf(['light', 'dark']),
|
|
51
|
+
disableCursor: PropTypes.bool,
|
|
48
52
|
disabled: PropTypes.bool,
|
|
49
53
|
iconPlacement: PropTypes.oneOf(['left', 'right']),
|
|
50
54
|
itemTag: PropTypes.elementType,
|
|
@@ -25,6 +25,7 @@ MenuProvider.propTypes = {
|
|
|
25
25
|
size: PropTypes.oneOf(['l', 'm', 's']),
|
|
26
26
|
mode: PropTypes.oneOf(['clear', 'classic', 'rock']),
|
|
27
27
|
theme: PropTypes.oneOf(['light', 'dark']),
|
|
28
|
+
disableCursor: PropTypes.bool,
|
|
28
29
|
disabled: PropTypes.bool,
|
|
29
30
|
iconPlacement: PropTypes.oneOf(['left', 'right']),
|
|
30
31
|
itemTag: PropTypes.elementType
|
package/lib/parts/menu-item.d.ts
CHANGED
package/lib/parts/menu-item.js
CHANGED
|
@@ -6,7 +6,7 @@ import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-sta
|
|
|
6
6
|
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
7
7
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
8
8
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
|
9
|
-
var _excluded = ["className", "tag", "children", "icon", "size", "mode", "theme", "disabled", "selected", "highlighted", "iconPlacement"];
|
|
9
|
+
var _excluded = ["className", "tag", "children", "icon", "size", "mode", "theme", "disabled", "disableCursor", "selected", "highlighted", "iconPlacement"];
|
|
10
10
|
|
|
11
11
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) { symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
12
12
|
|
|
@@ -38,7 +38,7 @@ var THEME_STYLES = {
|
|
|
38
38
|
}; // eslint-disable-next-line complexity
|
|
39
39
|
|
|
40
40
|
var MenuItemInner = function MenuItemInner(_ref, ref) {
|
|
41
|
-
var _menuContext$theme, _menuContext$itemTag, _menuContext$iconPlac, _menuContext$mode, _menuContext$size;
|
|
41
|
+
var _menuContext$theme, _menuContext$itemTag, _menuContext$iconPlac, _menuContext$mode, _menuContext$size, _menuContext$disableC;
|
|
42
42
|
|
|
43
43
|
var className = _ref.className,
|
|
44
44
|
_ref$tag = _ref.tag,
|
|
@@ -51,6 +51,7 @@ var MenuItemInner = function MenuItemInner(_ref, ref) {
|
|
|
51
51
|
mode = _ref$mode === void 0 ? 'classic' : _ref$mode,
|
|
52
52
|
theme = _ref.theme,
|
|
53
53
|
disabled = _ref.disabled,
|
|
54
|
+
disableCursor = _ref.disableCursor,
|
|
54
55
|
selected = _ref.selected,
|
|
55
56
|
highlighted = _ref.highlighted,
|
|
56
57
|
_ref$iconPlacement = _ref.iconPlacement,
|
|
@@ -63,12 +64,13 @@ var MenuItemInner = function MenuItemInner(_ref, ref) {
|
|
|
63
64
|
var actualIconPlacement = (_menuContext$iconPlac = menuContext.iconPlacement) !== null && _menuContext$iconPlac !== void 0 ? _menuContext$iconPlac : iconPlacement;
|
|
64
65
|
var actualMode = (_menuContext$mode = menuContext.mode) !== null && _menuContext$mode !== void 0 ? _menuContext$mode : mode;
|
|
65
66
|
var actualSize = (_menuContext$size = menuContext.size) !== null && _menuContext$size !== void 0 ? _menuContext$size : size;
|
|
67
|
+
var actualDisableCursor = (_menuContext$disableC = menuContext.disableCursor) !== null && _menuContext$disableC !== void 0 ? _menuContext$disableC : disableCursor;
|
|
66
68
|
var iconElement = icon ? /*#__PURE__*/cloneElement(icon, {
|
|
67
69
|
className: cn(icon.props.className, styles.icon)
|
|
68
70
|
}) : null;
|
|
69
71
|
return /*#__PURE__*/React.createElement(Tag, _objectSpread({
|
|
70
72
|
ref: ref,
|
|
71
|
-
className: cn(styles.menuItem, ICON_PLACEMENT_STYLES[actualIconPlacement], MODE_STYLES[actualMode], SIZE_STYLES[actualSize], THEME_STYLES[actualTheme], (menuContext.disabled || disabled) && styles.disabled, selected && styles.selected, highlighted && styles.highlighted, className),
|
|
73
|
+
className: cn(styles.menuItem, ICON_PLACEMENT_STYLES[actualIconPlacement], MODE_STYLES[actualMode], SIZE_STYLES[actualSize], THEME_STYLES[actualTheme], (menuContext.disabled || disabled) && styles.disabled, selected && styles.selected, highlighted && styles.highlighted, actualDisableCursor && styles.disableCursor, className),
|
|
72
74
|
"data-test": 'menu-item',
|
|
73
75
|
tabIndex: 0
|
|
74
76
|
}, restProps), actualIconPlacement === 'left' && iconElement, /*#__PURE__*/React.createElement("span", {
|
|
@@ -83,6 +85,7 @@ MenuItem.propTypes = {
|
|
|
83
85
|
theme: PropTypes.oneOf(['light', 'dark']),
|
|
84
86
|
onClick: PropTypes.func,
|
|
85
87
|
disabled: PropTypes.bool,
|
|
88
|
+
disableCursor: PropTypes.bool,
|
|
86
89
|
selected: PropTypes.bool,
|
|
87
90
|
|
|
88
91
|
/** @ignore */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/menu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"react": ">=16.8.0 <18"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@rescui/colors": "^0.1.
|
|
29
|
-
"@rescui/postcss-preset-library": "^0.0.
|
|
30
|
-
"@rescui/scripts": "^0.1.
|
|
31
|
-
"@rescui/typography": "^0.
|
|
28
|
+
"@rescui/colors": "^0.1.1",
|
|
29
|
+
"@rescui/postcss-preset-library": "^0.0.5",
|
|
30
|
+
"@rescui/scripts": "^0.1.5",
|
|
31
|
+
"@rescui/typography": "^0.7.1",
|
|
32
32
|
"@rescui/visual-regression": "^0.0.1",
|
|
33
33
|
"postcss": "^8.3.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "rescui-scripts build"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "10cf86a6c4c4b678c0b94c03c56c6d33214f03e8"
|
|
39
39
|
}
|