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

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