@sheinx/shineout-style 3.2.0-beta.1 → 3.2.0-beta.3

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.
Files changed (45) hide show
  1. package/cjs/form/form-item.d.ts.map +1 -1
  2. package/cjs/form/form-item.js +9 -3
  3. package/cjs/image/image.js +5 -5
  4. package/cjs/menu/index.d.ts +3 -0
  5. package/cjs/menu/index.d.ts.map +1 -1
  6. package/cjs/menu/index.js +10 -2
  7. package/cjs/menu/menu.d.ts.map +1 -1
  8. package/cjs/menu/menu.js +181 -234
  9. package/cjs/menu/search.d.ts +6 -0
  10. package/cjs/menu/search.d.ts.map +1 -0
  11. package/cjs/menu/search.js +81 -0
  12. package/cjs/popover/popover.d.ts.map +1 -1
  13. package/cjs/popover/popover.js +32 -15
  14. package/cjs/progress/progress.d.ts.map +1 -1
  15. package/cjs/progress/progress.js +43 -6
  16. package/cjs/slider/slider.js +1 -1
  17. package/cjs/tag/tag.d.ts.map +1 -1
  18. package/cjs/tag/tag.js +5 -2
  19. package/cjs/tooltip/tooltip.d.ts.map +1 -1
  20. package/cjs/tooltip/tooltip.js +1 -0
  21. package/cjs/version.d.ts +1 -1
  22. package/cjs/version.js +1 -1
  23. package/esm/form/form-item.d.ts.map +1 -1
  24. package/esm/form/form-item.js +9 -3
  25. package/esm/image/image.js +5 -5
  26. package/esm/menu/index.d.ts +3 -0
  27. package/esm/menu/index.d.ts.map +1 -1
  28. package/esm/menu/index.js +4 -1
  29. package/esm/menu/menu.d.ts.map +1 -1
  30. package/esm/menu/menu.js +181 -234
  31. package/esm/menu/search.d.ts +6 -0
  32. package/esm/menu/search.d.ts.map +1 -0
  33. package/esm/menu/search.js +73 -0
  34. package/esm/popover/popover.d.ts.map +1 -1
  35. package/esm/popover/popover.js +32 -15
  36. package/esm/progress/progress.d.ts.map +1 -1
  37. package/esm/progress/progress.js +43 -6
  38. package/esm/slider/slider.js +1 -1
  39. package/esm/tag/tag.d.ts.map +1 -1
  40. package/esm/tag/tag.js +5 -2
  41. package/esm/tooltip/tooltip.d.ts.map +1 -1
  42. package/esm/tooltip/tooltip.js +1 -0
  43. package/esm/version.d.ts +1 -1
  44. package/esm/version.js +1 -1
  45. package/package.json +3 -3
package/esm/menu/menu.js CHANGED
@@ -1,35 +1,87 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
1
  import token from '@sheinx/theme';
8
- var menuIndex = 1000;
9
- var arrow = {
10
- content: '""',
11
- position: 'absolute',
12
- left: 0,
13
- transform: 'translateY(-50%)',
14
- border: '6px solid transparent',
15
- borderRightColor: token.menuItemBackgroundColor,
16
- marginLeft: '-10px'
17
- };
2
+ var animationDuration = '.25s';
3
+ var collpaseWidth = token.menuCollpaseWidth;
4
+ var transitionFunc = 'ease-out';
18
5
  var menuStyle = {
19
6
  wrapper: {
20
7
  height: '100%',
21
- transition: 'width 0.3s',
22
- backgroundColor: token.menuItemBackgroundColor
8
+ width: '100%',
9
+ backgroundColor: token.menuItemBackgroundColor,
10
+ transition: "width ".concat(animationDuration, " ").concat(transitionFunc),
11
+ color: token.menuFontColor
23
12
  },
24
13
  wrapperLight: {},
25
14
  wrapperDark: {
26
15
  backgroundColor: token.menuDarkItemBackgroundColor
27
16
  },
28
- collapse: {
29
- width: token.menuCollapseWidth,
30
- boxSizing: 'content-box',
31
- '& $root': {
32
- width: token.menuCollapseWidth
17
+ wrapperCollpase: {
18
+ width: "".concat(collpaseWidth, "!important"),
19
+ '& $title': {
20
+ paddingLeft: '0'
21
+ },
22
+ '& $expand': {
23
+ opacity: 0
24
+ },
25
+ '& $titleIcon': {
26
+ width: "".concat(collpaseWidth, "!important"),
27
+ flexShrink: 0,
28
+ justifyContent: 'center'
29
+ },
30
+ '& $titleContent': {
31
+ opacity: 0,
32
+ alignItems: 'center',
33
+ whiteSpace: 'nowrap',
34
+ overflow: 'hidden'
35
+ },
36
+ '&$wrapperLight': {
37
+ '$menuRoot > $itemActive > $itemContent': {
38
+ backgroundColor: token.menuItemBackgroundColor
39
+ }
40
+ }
41
+ },
42
+ wrapperInTransition: {
43
+ '& $titleContent, & $header': {
44
+ whiteSpace: 'nowrap',
45
+ overflow: 'hidden'
46
+ },
47
+ '& $expand': {
48
+ opacity: 0
49
+ }
50
+ },
51
+ popover: {
52
+ '&&': {
53
+ border: 'none',
54
+ boxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)',
55
+ borderRadius: '4px',
56
+ backgroundColor: token.menuItemBackgroundColor
57
+ },
58
+ '&[data-soui-theme=dark]': {
59
+ backgroundColor: token.menuDarkItemBackgroundColor
60
+ },
61
+ '& $children': {
62
+ borderRadius: '4px',
63
+ padding: "".concat(token.menuPopoverPaddingY, " 0")
64
+ // '& > :first-child > $itemContent': {
65
+ // borderTopRightRadius: '4px',
66
+ // borderTopLeftRadius: '4px',
67
+ // },
68
+ // '& > :last-child > $itemContent': {
69
+ // borderBottomRightRadius: '4px',
70
+ // borderBottomLeftRadius: '4px',
71
+ // },
72
+ }
73
+ },
74
+ popArrow: {
75
+ '&&&': {
76
+ boxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)',
77
+ width: '6px',
78
+ height: '6px'
79
+ }
80
+ },
81
+ popArrowDark: {
82
+ '&&&': {
83
+ backgroundColor: token.menuDarkItemBackgroundColor,
84
+ boxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)'
33
85
  }
34
86
  },
35
87
  scrollbox: {
@@ -39,12 +91,6 @@ var menuStyle = {
39
91
  },
40
92
  '$wrapperHorizontal &': {
41
93
  overflow: 'hidden'
42
- },
43
- '$wrapperHasOpen$wrapperVertical &': {
44
- width: '100vw'
45
- },
46
- '$wrapperHasOpen$wrapperHorizontal &': {
47
- height: '100vh'
48
94
  }
49
95
  },
50
96
  root: {
@@ -60,166 +106,27 @@ var menuStyle = {
60
106
  },
61
107
  wrapperInline: {},
62
108
  wrapperVertical: {
63
- position: 'relative',
64
- zIndex: menuIndex
109
+ position: 'relative'
65
110
  },
66
111
  wrapperHorizontal: {
67
- height: '42px',
68
- position: 'relative',
69
- zIndex: menuIndex
112
+ position: 'relative'
70
113
  },
71
114
  wrapperHasOpen: {},
72
115
  children: {
73
116
  padding: '0',
117
+ margin: '0',
74
118
  display: 'none',
75
119
  minWidth: '100%',
76
120
  whiteSpace: 'nowrap',
77
- '$itemOpen > &': {
121
+ '$itemOpen > &, $childrenShow&': {
78
122
  display: 'block'
79
- },
80
- '$wrapper:not($wrapperInline) &': {
81
- boxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)'
82
- },
83
- '$wrapperHorizontal &': {
84
- position: 'absolute',
85
- bottom: '-2px',
86
- left: 0,
87
- transform: 'translateY(100%)'
88
- },
89
- '$wrapperHorizontal & &': {
90
- position: 'absolute',
91
- left: 'auto',
92
- bottom: 'auto',
93
- top: 0,
94
- right: '-2px',
95
- transform: 'translateX(100%)'
96
- },
97
- '$wrapperVertical &': {
98
- position: 'absolute',
99
- top: 0,
100
- '&[dir=ltr]': {
101
- right: '-6px',
102
- transform: 'translateX(100%)'
103
- },
104
- '&[dir=rtl]': {
105
- left: '-6px',
106
- transform: 'translateX(-100%)'
107
- },
108
- minWidth: 'auto',
109
- borderRadius: '4px',
110
- '& > :first-child > $itemContent': {
111
- borderTopRightRadius: '4px',
112
- borderTopLeftRadius: '4px'
113
- },
114
- '& > :last-child > $itemContent': {
115
- borderBottomRightRadius: '4px',
116
- borderBottomLeftRadius: '4px'
117
- },
118
- '&$childrenUp': {
119
- top: 'auto',
120
- bottom: 0
121
- },
122
- '&$childrenUp::before': _objectSpread(_objectSpread({
123
- top: 'auto',
124
- bottom: '20%'
125
- }, arrow), {}, {
126
- '$wrapperDark&': {
127
- borderRightColor: token.menuDarkItemBackgroundColor
128
- }
129
- }),
130
- '&::before': _objectSpread(_objectSpread({
131
- top: '20%'
132
- }, arrow), {}, {
133
- '$wrapperDark&': {
134
- borderRightColor: token.menuDarkItemBackgroundColor
135
- }
136
- })
137
123
  }
138
124
  },
125
+ childrenShow: {},
139
126
  childrenUp: {},
140
127
  item: {
141
128
  listStyle: 'none',
142
- flexShrink: 0,
143
- position: 'relative',
144
- '$wrapperVertical &, $wrapperHorizontal &': {
145
- position: 'relative'
146
- }
147
- },
148
- collapseItem: {
149
- // width: 40,
150
- cursor: 'pointer',
151
- opacity: 1,
152
- height: token.menuCollapseWidth,
153
- transition: 'all ease .3s',
154
- color: 'inherit',
155
- position: 'relative',
156
- '$wrapperLight &': {
157
- background: token.menuItemBackgroundColor,
158
- '&:hover': {
159
- background: token.menuItemHoverBackgroundColor,
160
- color: token.menuItemHoverFontColor
161
- }
162
- },
163
- '$wrapperLight $itemDisabled > &&': {
164
- cursor: 'not-allowed',
165
- color: token.menuCollapseItemDisabledFontColor,
166
- background: token.menuCollapseItemDisabledBackgroundColor
167
- },
168
- '$wrapperDark $itemDisabled > &&': {
169
- cursor: 'not-allowed',
170
- color: token.menuDarkCollapseItemDisabledFontColor,
171
- background: token.menuDarkCollapseItemDisabledBackgroundColor
172
- },
173
- '$wrapperDark &': {
174
- color: token.menuDarkCollapseItemFontColor,
175
- background: token.menuDarkCollapseItemBackgroundColor,
176
- '&:hover': {
177
- background: token.menuDarkCollapseItemHoverBackgroundColor,
178
- color: token.menuDarkCollapseItemHoverFontColor
179
- }
180
- },
181
- '$itemActive > &&': {
182
- '$wrapperLight &': {
183
- color: token.menuCollapseItemActiveFontColor,
184
- background: token.menuCollapseItemActiveBackgroundColor
185
- },
186
- '$wrapperDark &': {
187
- color: token.menuDarkCollapseItemActiveFontColor,
188
- background: token.menuDarkCollapseItemActiveBackgroundColor
189
- }
190
- },
191
- '&$collapseItemInPath': {
192
- // background: token.menuItemBackgroundColor,
193
- '&::after': {
194
- content: '""',
195
- position: 'absolute',
196
- left: 0,
197
- top: 0,
198
- bottom: 0,
199
- width: 3,
200
- transition: 'all ease 0.3s',
201
- backgroundColor: token.menuCollapseItemActiveFontColor
202
- }
203
- }
204
- },
205
- collapseItemInPath: {},
206
- collapseItemHide: {
207
- opacity: 0,
208
- width: 0,
209
- // height: 0,
210
- // zIndex: -1,
211
- position: 'absolute',
212
- top: 0,
213
- color: 'transparent',
214
- background: 'transparent',
215
- '&$collapseItemInPath': {
216
- // background: token.menuItemBackgroundColor,
217
- '&::after': {
218
- top: 20,
219
- bottom: 20,
220
- backgroundColor: 'transparent'
221
- }
222
- }
129
+ flexShrink: 0
223
130
  },
224
131
  itemActive: {},
225
132
  itemDisabled: {},
@@ -233,9 +140,7 @@ var menuStyle = {
233
140
  alignItems: 'center',
234
141
  cursor: 'pointer',
235
142
  position: 'relative',
236
- // opacity: 1,
237
- transition: 'all ease 0.3s',
238
- '$wrapperLight &': {
143
+ '[data-soui-theme=light] &': {
239
144
  color: token.menuItemFontColor,
240
145
  backgroundColor: token.menuItemBackgroundColor,
241
146
  '&:hover': {
@@ -243,7 +148,7 @@ var menuStyle = {
243
148
  backgroundColor: token.menuItemHoverBackgroundColor
244
149
  }
245
150
  },
246
- '$wrapperDark &': {
151
+ '[data-soui-theme=dark] &': {
247
152
  color: token.menuDarkFontColor,
248
153
  backgroundColor: token.menuDarkItemBackgroundColor,
249
154
  '&:hover': {
@@ -251,7 +156,7 @@ var menuStyle = {
251
156
  backgroundColor: token.menuDarkItemHoverBackgroundColor
252
157
  }
253
158
  },
254
- '$wrapperDark $itemOpen > &': {
159
+ '[data-soui-theme=dark] $itemOpen > &': {
255
160
  color: token.menuDarkItemOpenFontColor,
256
161
  backgroundColor: token.menuDarkItemOpenBackgroundColor,
257
162
  '& $icon': {
@@ -259,13 +164,13 @@ var menuStyle = {
259
164
  }
260
165
  },
261
166
  '$itemInPath > &&': {
262
- '$wrapperLight &': {
167
+ '[data-soui-theme=light] &': {
263
168
  color: token.menuItemActiveFontColor,
264
169
  '& $icon': {
265
170
  color: token.menuItemActiveFontColor
266
171
  }
267
172
  },
268
- '$wrapperDark$wrapperInline &::before, $wrapperDark$wrapperVertical &::before': {
173
+ '[data-soui-theme=dark][data-soui-mode=inline] &::before, [data-soui-theme=dark][data-soui-mode=vertical] &::before': {
269
174
  content: '""',
270
175
  position: 'absolute',
271
176
  left: 0,
@@ -273,50 +178,73 @@ var menuStyle = {
273
178
  bottom: 0,
274
179
  width: '3px',
275
180
  backgroundColor: token.menuDarkItemActiveBackgroundColor
276
- },
277
- '$wrapperLight$wrapperVertical &': {
278
- '&::before': {
279
- display: 'block',
280
- content: '""',
281
- position: 'absolute',
282
- right: 0,
283
- top: 0,
284
- bottom: 0,
285
- width: '4px',
286
- borderTopLeftRadius: '4px',
287
- borderBottomLeftRadius: '4px',
288
- backgroundColor: token.menuItemActiveFontColor
289
- }
290
181
  }
182
+ // '[data-soui-theme=light][data-soui-mode=vertical]:not($wrapperCollpase) &': {
183
+ // '&::before': {
184
+ // display: 'block',
185
+ // content: '""',
186
+ // position: 'absolute',
187
+ // right: 0,
188
+ // top: 0,
189
+ // bottom: 0,
190
+ // width: '4px',
191
+ // borderTopLeftRadius: '4px',
192
+ // borderBottomLeftRadius: '4px',
193
+ // backgroundColor: token.menuItemActiveFontColor,
194
+ // },
195
+ // },
291
196
  },
292
197
  '$itemActive > &&': {
293
- '$wrapperLight &': {
198
+ '[data-soui-theme=light] &': {
294
199
  color: token.menuItemActiveFontColor,
295
200
  backgroundColor: token.menuItemActiveBackgroundColor,
296
201
  '& $icon': {
297
202
  color: token.menuItemActiveFontColor
298
203
  }
299
204
  },
300
- '$wrapperDark &': {
205
+ '$wrapperCollpase[data-soui-theme=light] $root > &': {
206
+ color: token.menuItemActiveFontColor,
207
+ backgroundColor: token.menuItemBackgroundColor,
208
+ '& $icon': {
209
+ color: token.menuItemActiveFontColor
210
+ }
211
+ },
212
+ '[data-soui-theme=dark]:not($wrapperCollpase) &': {
301
213
  color: token.menuDarkItemActiveFontColor,
302
214
  backgroundColor: token.menuDarkItemActiveBackgroundColor,
303
215
  '& $icon': {
304
216
  color: token.menuDarkItemActiveFontColor
305
217
  }
306
218
  },
307
- '$wrapperLight$wrapperInline &, $wrapperLight$wrapperHorizontal &': {
219
+ '[data-soui-theme=dark]$wrapperCollpase &': {
308
220
  '&::before': {
309
221
  content: '""',
310
222
  position: 'absolute',
311
- display: 'block',
223
+ left: 0,
312
224
  top: 0,
313
- right: 0,
225
+ bottom: 0,
314
226
  width: '3px',
315
- height: '100%',
316
- backgroundColor: token.menuItemActiveFontColor
227
+ backgroundColor: token.menuDarkItemActiveBackgroundColor
317
228
  }
318
229
  },
319
- '$wrapperLight$wrapperHorizontal $root > &::before': {
230
+ // '[data-soui-theme=light][data-soui-mode=inline] &, [data-soui-theme=light][data-soui-mode=horizontal] &':
231
+ // {
232
+ // '&::before': {
233
+ // content: '""',
234
+ // position: 'absolute',
235
+ // display: 'block!important',
236
+ // top: 0,
237
+ // right: 0,
238
+ // width: '3px',
239
+ // height: '100%',
240
+ // backgroundColor: token.menuItemActiveFontColor,
241
+ // },
242
+ // },
243
+ '[data-soui-theme=light][data-soui-mode=horizontal] $root > &::before': {
244
+ content: '""',
245
+ position: 'absolute',
246
+ display: 'block!important',
247
+ backgroundColor: token.menuItemActiveFontColor,
320
248
  width: '100%',
321
249
  height: '2px',
322
250
  top: 'auto',
@@ -325,7 +253,7 @@ var menuStyle = {
325
253
  right: 'auto'
326
254
  }
327
255
  },
328
- '$wrapperLight $itemDisabled > &&': {
256
+ '[data-soui-theme=light] $itemDisabled > &&': {
329
257
  cursor: 'not-allowed',
330
258
  color: token.menuItemDisabledFontColor,
331
259
  backgroundColor: token.menuItemDisabledBackgroundColor,
@@ -333,7 +261,7 @@ var menuStyle = {
333
261
  color: token.menuItemDisabledFontColor
334
262
  }
335
263
  },
336
- '$wrapperDark $itemDisabled > &&': {
264
+ '[data-soui-theme=dark] $itemDisabled > &&': {
337
265
  cursor: 'not-allowed',
338
266
  color: token.menuDarkItemDisabledFontColor,
339
267
  backgroundColor: token.menuDarkItemDisabledBackgroundColor,
@@ -342,23 +270,32 @@ var menuStyle = {
342
270
  }
343
271
  }
344
272
  },
345
- itemContentHide: {
346
- position: 'absolute',
347
- overflow: 'hidden',
348
- pointerEvents: 'none',
349
- // opacity: 0,
350
- visibility: 'hidden',
351
- '& $title': {
352
- pointerEvents: 'none',
353
- whiteSpace: 'nowrap'
273
+ itemContentFront: {},
274
+ itemContentBack: {},
275
+ header: {
276
+ padding: "".concat(token.menuTitlePaddingY, " ").concat(token.menuTitlePaddingX),
277
+ width: '100%',
278
+ transition: "width ".concat(animationDuration, " ").concat(transitionFunc),
279
+ color: token.menuFontColor,
280
+ '$wrapperDark &': {
281
+ color: token.menuDarkFontColor
354
282
  },
355
- '& $menuIcon': {
356
- opacity: 0
283
+ '$wrapperCollpase &': {
284
+ paddingLeft: '0',
285
+ paddingRight: '0',
286
+ display: 'flex',
287
+ flexDirection: 'column',
288
+ alignItems: 'center'
289
+ },
290
+ '& + div': {
291
+ borderTop: "1px solid ".concat(token.menuHeaderBorderColor),
292
+ '$wrapperDark &': {
293
+ borderTop: "1px solid ".concat(token.menuDarkHeaderBorderColor)
294
+ }
357
295
  }
358
296
  },
359
- itemContentFront: {},
360
- itemContentBack: {},
361
297
  title: {
298
+ cursor: 'inherit',
362
299
  '&:hover': {
363
300
  color: 'inherit'
364
301
  },
@@ -370,13 +307,13 @@ var menuStyle = {
370
307
  minWidth: 0,
371
308
  padding: "".concat(token.menuTitlePaddingY, " ").concat(token.menuTitlePaddingX),
372
309
  '$wrapperInline $childrenHasExpand $item:not($itemHasChildren) $itemContentBack > &': {
373
- paddingRight: token.menuExpandWidth
310
+ paddingRight: "calc(".concat(token.menuIconMarginX, " + ").concat(token.menuTitlePaddingX, " + ").concat(token.menuExpandSize, ")")
374
311
  },
375
312
  '$wrapperInline $itemHasChildren > $itemContentBack > &': {
376
313
  paddingRight: 0
377
314
  },
378
315
  '$childrenHasExpand > $item:not($itemHasChildren) > $itemContentBack > &': {
379
- paddingRight: token.menuExpandWidth
316
+ paddingRight: "calc(".concat(token.menuIconMarginX, " + ").concat(token.menuTitlePaddingX, " + ").concat(token.menuExpandSize, ")")
380
317
  },
381
318
  '$childrenHasExpand $itemHasChildren > $itemContentBack > &': {
382
319
  paddingRight: 0
@@ -385,35 +322,44 @@ var menuStyle = {
385
322
  paddingLeft: 0
386
323
  }
387
324
  },
325
+ titleIcon: {
326
+ '& + $titleContent': {
327
+ paddingLeft: token.menuIconMarginX
328
+ },
329
+ lineHeight: 1,
330
+ display: 'inline-flex'
331
+ },
332
+ titleContent: {
333
+ whiteSpace: 'pre-wrap',
334
+ transition: "opacity ".concat(animationDuration, " ").concat(transitionFunc),
335
+ opacity: 1
336
+ },
388
337
  expand: {
389
338
  alignSelf: 'stretch',
390
339
  display: 'flex',
391
340
  justifyContent: 'center',
392
341
  alignItems: 'center',
393
- '$wrapperLight &': {
342
+ '[data-soui-theme=light] &': {
394
343
  color: token.menuIconColor
395
344
  },
396
345
  '& > $icon': {
397
346
  lineHeight: 1,
398
- opacity: 1,
399
347
  width: token.menuExpandSize,
400
348
  height: token.menuExpandSize,
401
349
  '$wrapper:not($wrapperVertical) $itemOpen > $itemContent &': {
402
350
  transform: 'rotate(180deg)'
403
351
  }
404
- },
405
- '$wrapperVertical &': {
406
- '&[dir=ltr]': {
407
- transform: 'rotate(-90deg)'
408
- },
409
- '&[dir=rtl]': {
410
- transform: 'rotate(90deg)'
411
- }
412
352
  }
413
353
  },
414
- icon: {
415
- transition: 'all ease 0.3s'
354
+ expandVertical: {
355
+ '&[dir=ltr] svg': {
356
+ transform: 'rotate(-90deg)'
357
+ },
358
+ '&[dir=rtl] svg': {
359
+ transform: 'rotate(90deg)'
360
+ }
416
361
  },
362
+ icon: {},
417
363
  expandHover: {
418
364
  '&:hover': {
419
365
  backgroundColor: token.menuExpandHoverBackgroundColor
@@ -426,13 +372,14 @@ var menuStyle = {
426
372
  width: 'auto',
427
373
  visibility: 'hidden',
428
374
  paddingLeft: token.menuTitlePaddingX,
429
- paddingRight: '8px',
375
+ paddingRight: token.menuIconMarginX,
430
376
  '$itemHasChildren > $itemContent &': {
431
377
  visibility: 'visible'
432
378
  }
433
379
  },
434
380
  expandBack: {
435
- width: token.menuExpandWidth
381
+ paddingRight: token.menuTitlePaddingX,
382
+ paddingLeft: token.menuIconMarginX
436
383
  },
437
384
  scrollbar: {
438
385
  position: 'absolute',
@@ -0,0 +1,6 @@
1
+ import { MenuSearchClasses } from '@sheinx/base';
2
+ import { JsStyles } from '../jss-style';
3
+ export type MenuSearchClassType = keyof MenuSearchClasses;
4
+ declare const menuSearchStyle: JsStyles<MenuSearchClassType>;
5
+ export default menuSearchStyle;
6
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,MAAM,MAAM,mBAAmB,GAAG,MAAM,iBAAiB,CAAC;AAE1D,QAAA,MAAM,eAAe,EAAE,QAAQ,CAAC,mBAAmB,CA6FlD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,73 @@
1
+ var _wrapperDark;
2
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
+ import token, { getTokenName } from '@sheinx/theme';
7
+ var menuSearchStyle = {
8
+ wrapper: _defineProperty({}, getTokenName('inputBorderRadius'), token.menuSearchBorderRadius),
9
+ wrapperDark: (_wrapperDark = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_wrapperDark, getTokenName('inputClearColor'), token.menuSearchDarkClearColor), getTokenName('inputHoverClearColor'), token.menuSearchDarkHoverClearColor), getTokenName('inputBorderColor'), token.menuSearchDarkBackgroundColor), getTokenName('inputBackgroundColor'), token.menuSearchDarkBackgroundColor), getTokenName('inputFontColor'), token.menuSearchDarkFontColor), getTokenName('inputPlaceholderFontColor'), token.menuSearchDarkPlaceholderFontColor), getTokenName('inputHoverBorderColor'), token.menuSearchDarkHoverBorderColor), getTokenName('inputHoverBackgroundColor'), token.menuSearchDarkHoverBackgroundColor), getTokenName('inputFocusBorderColor'), token.menuSearchDarkFocusBorderColor), getTokenName('inputFocusBackgroundColor'), token.menuSearchDarkFocusBackgroundColor), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_wrapperDark, getTokenName('inputFocusShadow'), token.menuSearchDarkFocusShadow), getTokenName('inputDisabledBorderColor'), token.menuSearchDarkBackgroundColor), getTokenName('inputDisabledBackgroundColor'), token.menuSearchDarkBackgroundColor), getTokenName('inputDisabledFontColor'), token.menuSearchDarkFontColor), getTokenName('inputDisabledPlaceholderFontColor'), token.menuSearchDarkPlaceholderFontColor)),
10
+ wrapperLight: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, getTokenName('inputBorderColor'), token.menuSearchBackgroundColor), getTokenName('inputBackgroundColor'), token.menuSearchBackgroundColor), getTokenName('inputHoverBorderColor'), token.menuSearchHoverBorderColor), getTokenName('inputHoverBackgroundColor'), token.menuSearchHoverBackgroundColor), getTokenName('inputDisabledBorderColor'), token.menuSearchDisabledBackgroundColor), getTokenName('inputDisabledBackgroundColor'), token.menuSearchDisabledBackgroundColor), getTokenName('inputClearColor'), token.menuSearchClearColor), getTokenName('inputHoverClearColor'), token.menuSearchHoverClearColor),
11
+ wrapperCollapsed: {
12
+ borderRadius: '50%',
13
+ padding: token.menuSearchPaddingX,
14
+ cursor: 'pointer',
15
+ lineHeight: 1,
16
+ '$wrapperLight&': {
17
+ background: token.menuSearchBackgroundColor,
18
+ border: "1px solid ".concat(token.menuSearchBackgroundColor),
19
+ '&:hover': {
20
+ background: token.menuSearchHoverBackgroundColor,
21
+ borderColor: token.menuSearchHoverBorderColor
22
+ },
23
+ '$wrapperDisabled&': {
24
+ background: token.menuSearchDisabledBackgroundColor,
25
+ borderColor: token.menuSearchDisabledBackgroundColor
26
+ }
27
+ },
28
+ '$wrapperDark&': {
29
+ background: token.menuSearchDarkBackgroundColor,
30
+ border: "1px solid ".concat(token.menuSearchDarkBackgroundColor),
31
+ '&:hover': {
32
+ background: token.menuSearchDarkHoverBackgroundColor,
33
+ borderColor: token.menuSearchDarkHoverBorderColor
34
+ },
35
+ '$wrapperDisabled&': {
36
+ background: token.menuSearchDarkBackgroundColor,
37
+ borderColor: token.menuSearchDarkBackgroundColor,
38
+ '&$search': {
39
+ color: token.menuSearchDarkIconColor
40
+ }
41
+ }
42
+ }
43
+ },
44
+ wrapperDisabled: {
45
+ cursor: 'not-allowed',
46
+ '&$wrapperDark': {
47
+ opacity: 0.3
48
+ }
49
+ },
50
+ input: {
51
+ width: '100%'
52
+ },
53
+ search: {
54
+ width: token.menuSearchIconSize,
55
+ height: token.menuSearchIconSize,
56
+ cursor: 'pointer',
57
+ display: 'flex',
58
+ justifyContent: 'center',
59
+ marginRight: token.menuSearchIconMarginX,
60
+ color: token.menuSearchIconColor,
61
+ '$wrapperDisabled &': {
62
+ color: token.inputDisabledFontColor,
63
+ cursor: 'not-allowed'
64
+ },
65
+ '$wrapperDark &': {
66
+ color: token.menuSearchDarkIconColor
67
+ },
68
+ '$wrapperCollapsed &': {
69
+ marginRight: 0
70
+ }
71
+ }
72
+ };
73
+ export default menuSearchStyle;
@@ -1 +1 @@
1
- {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["popover.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG,MAAM,cAAc,CAAC;AAKpD,QAAA,MAAM,YAAY,EAAE,QAAQ,CAAC,gBAAgB,CAkK5C,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["popover.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG,MAAM,cAAc,CAAC;AAMpD,QAAA,MAAM,YAAY,EAAE,QAAQ,CAAC,gBAAgB,CAiL5C,CAAC;AAEF,eAAe,YAAY,CAAC"}