@sheinx/shineout-style 3.1.27 → 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 (123) hide show
  1. package/cjs/alert/alert.js +3 -2
  2. package/cjs/breadcrumb/breadcrumb.d.ts.map +1 -1
  3. package/cjs/breadcrumb/breadcrumb.js +14 -10
  4. package/cjs/card/card.d.ts.map +1 -1
  5. package/cjs/card/card.js +8 -4
  6. package/cjs/cascader/cascader.d.ts.map +1 -1
  7. package/cjs/cascader/cascader.js +33 -21
  8. package/cjs/date-picker/date-picker.d.ts.map +1 -1
  9. package/cjs/date-picker/date-picker.js +30 -21
  10. package/cjs/descriptions/descriptions.d.ts.map +1 -1
  11. package/cjs/descriptions/descriptions.js +26 -8
  12. package/cjs/divider/divider.d.ts.map +1 -1
  13. package/cjs/divider/divider.js +1 -0
  14. package/cjs/dropdown/dropdown.js +1 -1
  15. package/cjs/editable-area/editable-area.d.ts.map +1 -1
  16. package/cjs/editable-area/editable-area.js +33 -23
  17. package/cjs/empty/empty.d.ts.map +1 -1
  18. package/cjs/empty/empty.js +1 -0
  19. package/cjs/form/form-item.d.ts.map +1 -1
  20. package/cjs/form/form-item.js +9 -3
  21. package/cjs/image/image.js +5 -5
  22. package/cjs/inner-title/inner-title.d.ts.map +1 -1
  23. package/cjs/inner-title/inner-title.js +7 -0
  24. package/cjs/input/input-border.d.ts +9 -0
  25. package/cjs/input/input-border.d.ts.map +1 -1
  26. package/cjs/input/input-border.js +14 -5
  27. package/cjs/input/input.d.ts.map +1 -1
  28. package/cjs/input/input.js +14 -2
  29. package/cjs/list/list.d.ts.map +1 -1
  30. package/cjs/list/list.js +6 -3
  31. package/cjs/menu/index.d.ts +3 -0
  32. package/cjs/menu/index.d.ts.map +1 -1
  33. package/cjs/menu/index.js +10 -2
  34. package/cjs/menu/menu.d.ts.map +1 -1
  35. package/cjs/menu/menu.js +183 -132
  36. package/cjs/menu/search.d.ts +6 -0
  37. package/cjs/menu/search.d.ts.map +1 -0
  38. package/cjs/menu/search.js +81 -0
  39. package/cjs/popover/popover.d.ts.map +1 -1
  40. package/cjs/popover/popover.js +34 -16
  41. package/cjs/progress/progress.d.ts.map +1 -1
  42. package/cjs/progress/progress.js +43 -6
  43. package/cjs/rate/rate.d.ts.map +1 -1
  44. package/cjs/rate/rate.js +2 -1
  45. package/cjs/select/select.d.ts.map +1 -1
  46. package/cjs/select/select.js +49 -25
  47. package/cjs/table/table.d.ts.map +1 -1
  48. package/cjs/table/table.js +23 -3
  49. package/cjs/tag/tag.d.ts.map +1 -1
  50. package/cjs/tag/tag.js +5 -2
  51. package/cjs/textarea/textarea.d.ts.map +1 -1
  52. package/cjs/textarea/textarea.js +33 -23
  53. package/cjs/transfer/transfer.d.ts.map +1 -1
  54. package/cjs/transfer/transfer.js +10 -5
  55. package/cjs/tree/tree.d.ts.map +1 -1
  56. package/cjs/tree/tree.js +3 -2
  57. package/cjs/tree-select/tree-select.d.ts.map +1 -1
  58. package/cjs/tree-select/tree-select.js +30 -21
  59. package/cjs/version.d.ts +1 -1
  60. package/cjs/version.d.ts.map +1 -1
  61. package/cjs/version.js +1 -1
  62. package/esm/alert/alert.js +3 -2
  63. package/esm/breadcrumb/breadcrumb.d.ts.map +1 -1
  64. package/esm/breadcrumb/breadcrumb.js +14 -10
  65. package/esm/card/card.d.ts.map +1 -1
  66. package/esm/card/card.js +8 -4
  67. package/esm/cascader/cascader.d.ts.map +1 -1
  68. package/esm/cascader/cascader.js +33 -21
  69. package/esm/date-picker/date-picker.d.ts.map +1 -1
  70. package/esm/date-picker/date-picker.js +30 -21
  71. package/esm/descriptions/descriptions.d.ts.map +1 -1
  72. package/esm/descriptions/descriptions.js +26 -8
  73. package/esm/divider/divider.d.ts.map +1 -1
  74. package/esm/divider/divider.js +1 -0
  75. package/esm/dropdown/dropdown.js +1 -1
  76. package/esm/editable-area/editable-area.d.ts.map +1 -1
  77. package/esm/editable-area/editable-area.js +33 -23
  78. package/esm/empty/empty.d.ts.map +1 -1
  79. package/esm/empty/empty.js +1 -0
  80. package/esm/form/form-item.d.ts.map +1 -1
  81. package/esm/form/form-item.js +9 -3
  82. package/esm/image/image.js +5 -5
  83. package/esm/inner-title/inner-title.d.ts.map +1 -1
  84. package/esm/inner-title/inner-title.js +7 -0
  85. package/esm/input/input-border.d.ts +9 -0
  86. package/esm/input/input-border.d.ts.map +1 -1
  87. package/esm/input/input-border.js +14 -5
  88. package/esm/input/input.d.ts.map +1 -1
  89. package/esm/input/input.js +14 -2
  90. package/esm/list/list.d.ts.map +1 -1
  91. package/esm/list/list.js +6 -3
  92. package/esm/menu/index.d.ts +3 -0
  93. package/esm/menu/index.d.ts.map +1 -1
  94. package/esm/menu/index.js +4 -1
  95. package/esm/menu/menu.d.ts.map +1 -1
  96. package/esm/menu/menu.js +183 -132
  97. package/esm/menu/search.d.ts +6 -0
  98. package/esm/menu/search.d.ts.map +1 -0
  99. package/esm/menu/search.js +73 -0
  100. package/esm/popover/popover.d.ts.map +1 -1
  101. package/esm/popover/popover.js +34 -16
  102. package/esm/progress/progress.d.ts.map +1 -1
  103. package/esm/progress/progress.js +43 -6
  104. package/esm/rate/rate.d.ts.map +1 -1
  105. package/esm/rate/rate.js +2 -1
  106. package/esm/select/select.d.ts.map +1 -1
  107. package/esm/select/select.js +49 -25
  108. package/esm/table/table.d.ts.map +1 -1
  109. package/esm/table/table.js +23 -3
  110. package/esm/tag/tag.d.ts.map +1 -1
  111. package/esm/tag/tag.js +5 -2
  112. package/esm/textarea/textarea.d.ts.map +1 -1
  113. package/esm/textarea/textarea.js +33 -23
  114. package/esm/transfer/transfer.d.ts.map +1 -1
  115. package/esm/transfer/transfer.js +10 -5
  116. package/esm/tree/tree.d.ts.map +1 -1
  117. package/esm/tree/tree.js +3 -2
  118. package/esm/tree-select/tree-select.d.ts.map +1 -1
  119. package/esm/tree-select/tree-select.js +30 -21
  120. package/esm/version.d.ts +1 -1
  121. package/esm/version.d.ts.map +1 -1
  122. package/esm/version.js +1 -1
  123. package/package.json +3 -3
@@ -15,15 +15,19 @@ var _default = exports.default = function _default(name) {
15
15
  boxSizing: 'border-box',
16
16
  borderRadius: token.borderRadius,
17
17
  background: token.backgroundColor,
18
- border: "1px solid ".concat(token.borderColor),
18
+ border: "".concat(token.borderWidth, " solid ").concat(token.borderColor),
19
19
  color: token.fontColor,
20
20
  lineHeight: token.lineHeight,
21
21
  fontSize: token.fontSize,
22
22
  // verticalAlign: 'top',
23
+ fontWeight: token.fontWeight,
24
+ verticalAlign: 'top',
23
25
  transition: "border-color .15s ease-in-out,box-shadow .15s ease-in-out;",
24
- '&:hover': {
26
+ '&:hover': _defineProperty({
25
27
  borderColor: token.hoverBorderColor
26
- },
28
+ }, "&:not($".concat(name, "Disabled):not($").concat(name, "Error)"), {
29
+ backgroundColor: token.hoverBackgroundColor
30
+ }),
27
31
  '[data-soui-role="input-group"] &': {
28
32
  borderWidth: 0,
29
33
  borderRadius: 0,
@@ -74,16 +78,21 @@ var _default = exports.default = function _default(name) {
74
78
  }), "".concat(name, "Focus"), {
75
79
  borderColor: token.focusBorderColor,
76
80
  boxShadow: "0 0 0 2px ".concat(token.focusShadow),
81
+ background: token.focusBackgroundColor,
77
82
  '&:hover': {
78
83
  borderColor: token.focusBorderColor
79
84
  }
80
85
  }), "".concat(name, "Error"), _defineProperty({
81
86
  borderColor: token.errorBorderColor,
87
+ background: token.errorBackgroundColor,
82
88
  '&:hover': {
83
- borderColor: token.errorBorderColor
89
+ backgroundColor: token.errorHoverBackgroundColor,
90
+ borderColor: token.errorHoverBorderColor
84
91
  }
85
92
  }, "&$".concat(name, "Focus"), {
86
- boxShadow: "0 0 0 2px ".concat(token.errorFocusShadow)
93
+ boxShadow: "0 0 0 2px ".concat(token.errorFocusShadow),
94
+ borderColor: token.errorFocusBorderColor,
95
+ background: token.errorFocusBackgroundColor
87
96
  })), "".concat(name, "Disabled"), {
88
97
  color: token.disabledFontColor,
89
98
  backgroundColor: token.disabledBackgroundColor,
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["input.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AA8F5C,QAAA,MAAM,KAAK,EAAE,QAAQ,CAAC,MAAM,YAAY,CAuMvC,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["input.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAwG5C,QAAA,MAAM,KAAK,EAAE,QAAQ,CAAC,MAAM,YAAY,CAyMvC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -19,6 +19,7 @@ var inputBorderToken = {
19
19
  lineHeight: _theme.default.lineHeightDynamic,
20
20
  borderRadius: _theme.default.inputBorderRadius,
21
21
  fontSize: _theme.default.inputFontSize,
22
+ fontWeight: _theme.default.inputFontWeight,
22
23
  smallFontSize: _theme.default.inputSmallFontSize,
23
24
  largeFontSize: _theme.default.inputLargeFontSize,
24
25
  paddingY: _theme.default.inputPaddingY,
@@ -28,14 +29,22 @@ var inputBorderToken = {
28
29
  smallPaddingX: _theme.default.inputSmallPaddingX,
29
30
  largePaddingX: _theme.default.inputLargePaddingX,
30
31
  borderColor: _theme.default.inputBorderColor,
32
+ borderWidth: _theme.default.inputBorderWidth,
31
33
  focusBorderColor: _theme.default.inputFocusBorderColor,
32
34
  hoverBorderColor: _theme.default.inputHoverBorderColor,
33
35
  disabledBorderColor: _theme.default.inputDisabledBorderColor,
34
36
  errorBorderColor: _theme.default.inputErrorBorderColor,
37
+ errorHoverBorderColor: _theme.default.inputErrorHoverBorderColor,
38
+ errorFocusBorderColor: _theme.default.inputErrorFocusBorderColor,
35
39
  fontColor: _theme.default.inputFontColor,
36
40
  disabledFontColor: _theme.default.inputDisabledFontColor,
37
41
  backgroundColor: _theme.default.inputBackgroundColor,
42
+ hoverBackgroundColor: _theme.default.inputHoverBackgroundColor,
43
+ focusBackgroundColor: _theme.default.inputFocusBackgroundColor,
38
44
  disabledBackgroundColor: _theme.default.inputDisabledBackgroundColor,
45
+ errorBackgroundColor: _theme.default.inputErrorBackgroundColor,
46
+ errorFocusBackgroundColor: _theme.default.inputErrorFocusBackgroundColor,
47
+ errorHoverBackgroundColor: _theme.default.inputErrorHoverBackgroundColor,
39
48
  focusShadow: _theme.default.inputFocusShadow,
40
49
  errorFocusShadow: _theme.default.inputErrorFocusShadow,
41
50
  innerTitlePaddingY: _theme.default.inputInnerPaddingY,
@@ -67,8 +76,9 @@ var groupSpace = function groupSpace(gap) {
67
76
  alignItems: 'center',
68
77
  border: "1px solid ".concat(_theme.default.inputBorderColor),
69
78
  borderWidth: '0 1px',
70
- background: _theme.default.inputDisabledBackgroundColor,
79
+ background: _theme.default.inputGroupFontBackgroundColor,
71
80
  fontWeight: 'normal',
81
+ color: _theme.default.inputGroupFontColor,
72
82
  '&:first-child': {
73
83
  borderLeftColor: 'inherit',
74
84
  marginLeft: '-1px'
@@ -129,7 +139,9 @@ var input = _objectSpread(_objectSpread(_objectSpread({
129
139
  outline: 'none',
130
140
  backgroundColor: 'transparent',
131
141
  boxSizing: 'border-box',
142
+ fontWeight: 'inherit',
132
143
  '&::placeholder': {
144
+ fontWeight: _theme.default.inputPlaceholderFontWeight,
133
145
  color: _theme.default.inputPlaceholderColor,
134
146
  fontSize: 'inherit'
135
147
  }
@@ -209,7 +221,7 @@ var input = _objectSpread(_objectSpread(_objectSpread({
209
221
  color: _theme.default.inputIconColor,
210
222
  '&:hover': {
211
223
  '$wrapper:not($wrapperDisabled) &': {
212
- color: _theme.default.inputHoverBorderColor
224
+ color: _theme.default.inputHoverIconColor
213
225
  }
214
226
  },
215
227
  '&:first-child': {
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC;AAE9C,QAAA,MAAM,SAAS,EAAE,QAAQ,CAAC,aAAa,CAmHtC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC;AAE9C,QAAA,MAAM,SAAS,EAAE,QAAQ,CAAC,aAAa,CAsHtC,CAAC;AAEF,eAAe,SAAS,CAAC"}
package/cjs/list/list.js CHANGED
@@ -56,7 +56,7 @@ var listStyle = {
56
56
  alignItems: 'center',
57
57
  boxSizing: 'border-box',
58
58
  '&:not(:last-child)': {
59
- borderBottom: "1px solid ".concat(_theme.default.listBorderColor)
59
+ borderBottom: "".concat(_theme.default.listBorderWidth, " solid ").concat(_theme.default.listBorderColor)
60
60
  }
61
61
  },
62
62
  item: {
@@ -65,13 +65,16 @@ var listStyle = {
65
65
  color: _theme.default.listFontColor,
66
66
  display: 'flex',
67
67
  flexWrap: 'nowrap',
68
+ background: _theme.default.listItemBackgroundColor,
68
69
  boxSizing: 'border-box',
69
70
  padding: "".concat(_theme.default.listItemPaddingY, " ").concat(_theme.default.listItemPaddingX),
70
71
  '$wrapperSmall &': {
71
- padding: "".concat(_theme.default.listSmallItemPaddingY, " ").concat(_theme.default.listSmallItemPaddingX)
72
+ padding: "".concat(_theme.default.listSmallItemPaddingY, " ").concat(_theme.default.listSmallItemPaddingX),
73
+ fontSize: _theme.default.listSmallFontSize
72
74
  },
73
75
  '$wrapperLarge &': {
74
- padding: "".concat(_theme.default.listLargeItemPaddingY, " ").concat(_theme.default.listLargeItemPaddingY)
76
+ padding: "".concat(_theme.default.listLargeItemPaddingY, " ").concat(_theme.default.listLargeItemPaddingY),
77
+ fontSize: _theme.default.listLargeFontSize
75
78
  }
76
79
  },
77
80
  checkContent: {
@@ -1,5 +1,8 @@
1
1
  import menuStyle from './menu';
2
+ import menuSearchStyle from './search';
2
3
  declare const useMenuStyle: () => import("jss").Classes<keyof import("@sheinx/base").MenuClasses>;
3
4
  export { menuStyle, useMenuStyle };
4
5
  export default useMenuStyle;
6
+ declare const useMenuSearchStyle: () => import("jss").Classes<keyof import("@sheinx/base").MenuSearchClasses>;
7
+ export { menuSearchStyle, useMenuSearchStyle };
5
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,QAAQ,CAAC;AAE/B,QAAA,MAAM,YAAY,uEAA4B,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AACnC,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,QAAQ,CAAC;AAC/B,OAAO,eAAe,MAAM,UAAU,CAAC;AAEvC,QAAA,MAAM,YAAY,uEAA4B,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;AACnC,eAAe,YAAY,CAAC;AAE5B,QAAA,MAAM,kBAAkB,6EAAyC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAC"}
package/cjs/menu/index.js CHANGED
@@ -5,15 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
+ Object.defineProperty(exports, "menuSearchStyle", {
9
+ enumerable: true,
10
+ get: function get() {
11
+ return _search.default;
12
+ }
13
+ });
8
14
  Object.defineProperty(exports, "menuStyle", {
9
15
  enumerable: true,
10
16
  get: function get() {
11
17
  return _menu.default;
12
18
  }
13
19
  });
14
- exports.useMenuStyle = void 0;
20
+ exports.useMenuStyle = exports.useMenuSearchStyle = void 0;
15
21
  var _jssStyle = require("../jss-style");
16
22
  var _menu = _interopRequireDefault(require("./menu"));
23
+ var _search = _interopRequireDefault(require("./search"));
17
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
25
  var useMenuStyle = exports.useMenuStyle = (0, _jssStyle.styled)(_menu.default, 'menu');
19
- var _default = exports.default = useMenuStyle;
26
+ var _default = exports.default = useMenuStyle;
27
+ var useMenuSearchStyle = exports.useMenuSearchStyle = (0, _jssStyle.styled)(_search.default, 'menu-search');
@@ -1 +1 @@
1
- {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["menu.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,MAAM,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC;AAY9C,QAAA,MAAM,SAAS,EAAE,QAAQ,CAAC,aAAa,CA6WtC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["menu.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,MAAM,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC;AAM9C,QAAA,MAAM,SAAS,EAAE,QAAQ,CAAC,aAAa,CA8atC,CAAC;AAEF,eAAe,SAAS,CAAC"}
package/cjs/menu/menu.js CHANGED
@@ -6,31 +6,91 @@ 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
- backgroundColor: _theme.default.menuItemBackgroundColor
15
+ width: '100%',
16
+ backgroundColor: _theme.default.menuItemBackgroundColor,
17
+ transition: "width ".concat(animationDuration, " ").concat(transitionFunc),
18
+ color: _theme.default.menuFontColor
29
19
  },
30
20
  wrapperLight: {},
31
21
  wrapperDark: {
32
22
  backgroundColor: _theme.default.menuDarkItemBackgroundColor
33
23
  },
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)'
92
+ }
93
+ },
34
94
  scrollbox: {
35
95
  '$wrapperVertical &': {
36
96
  overflow: 'hidden',
@@ -38,12 +98,6 @@ var menuStyle = {
38
98
  },
39
99
  '$wrapperHorizontal &': {
40
100
  overflow: 'hidden'
41
- },
42
- '$wrapperHasOpen$wrapperVertical &': {
43
- width: '100vw'
44
- },
45
- '$wrapperHasOpen$wrapperHorizontal &': {
46
- height: '100vh'
47
101
  }
48
102
  },
49
103
  root: {
@@ -59,89 +113,27 @@ var menuStyle = {
59
113
  },
60
114
  wrapperInline: {},
61
115
  wrapperVertical: {
62
- position: 'relative',
63
- zIndex: menuIndex
116
+ position: 'relative'
64
117
  },
65
118
  wrapperHorizontal: {
66
- height: '42px',
67
- position: 'relative',
68
- zIndex: menuIndex
119
+ position: 'relative'
69
120
  },
70
121
  wrapperHasOpen: {},
71
122
  children: {
72
123
  padding: '0',
124
+ margin: '0',
73
125
  display: 'none',
74
126
  minWidth: '100%',
75
127
  whiteSpace: 'nowrap',
76
- '$itemOpen > &': {
128
+ '$itemOpen > &, $childrenShow&': {
77
129
  display: 'block'
78
- },
79
- '$wrapper:not($wrapperInline) &': {
80
- boxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)'
81
- },
82
- '$wrapperHorizontal &': {
83
- position: 'absolute',
84
- bottom: '-2px',
85
- left: 0,
86
- transform: 'translateY(100%)'
87
- },
88
- '$wrapperHorizontal & &': {
89
- position: 'absolute',
90
- left: 'auto',
91
- bottom: 'auto',
92
- top: 0,
93
- right: '-2px',
94
- transform: 'translateX(100%)'
95
- },
96
- '$wrapperVertical &': {
97
- position: 'absolute',
98
- top: 0,
99
- '&[dir=ltr]': {
100
- right: '-6px',
101
- transform: 'translateX(100%)'
102
- },
103
- '&[dir=rtl]': {
104
- left: '-6px',
105
- transform: 'translateX(-100%)'
106
- },
107
- minWidth: 'auto',
108
- borderRadius: '4px',
109
- '& > :first-child > $itemContent': {
110
- borderTopRightRadius: '4px',
111
- borderTopLeftRadius: '4px'
112
- },
113
- '& > :last-child > $itemContent': {
114
- borderBottomRightRadius: '4px',
115
- borderBottomLeftRadius: '4px'
116
- },
117
- '&$childrenUp': {
118
- top: 'auto',
119
- bottom: 0
120
- },
121
- '&$childrenUp::before': _objectSpread(_objectSpread({
122
- top: 'auto',
123
- bottom: '20%'
124
- }, arrow), {}, {
125
- '$wrapperDark&': {
126
- borderRightColor: _theme.default.menuDarkItemBackgroundColor
127
- }
128
- }),
129
- '&::before': _objectSpread(_objectSpread({
130
- top: '20%'
131
- }, arrow), {}, {
132
- '$wrapperDark&': {
133
- borderRightColor: _theme.default.menuDarkItemBackgroundColor
134
- }
135
- })
136
130
  }
137
131
  },
132
+ childrenShow: {},
138
133
  childrenUp: {},
139
134
  item: {
140
135
  listStyle: 'none',
141
- flexShrink: 0,
142
- '$wrapperVertical &, $wrapperHorizontal &': {
143
- position: 'relative'
144
- }
136
+ flexShrink: 0
145
137
  },
146
138
  itemActive: {},
147
139
  itemDisabled: {},
@@ -155,7 +147,7 @@ var menuStyle = {
155
147
  alignItems: 'center',
156
148
  cursor: 'pointer',
157
149
  position: 'relative',
158
- '$wrapperLight &': {
150
+ '[data-soui-theme=light] &': {
159
151
  color: _theme.default.menuItemFontColor,
160
152
  backgroundColor: _theme.default.menuItemBackgroundColor,
161
153
  '&:hover': {
@@ -163,7 +155,7 @@ var menuStyle = {
163
155
  backgroundColor: _theme.default.menuItemHoverBackgroundColor
164
156
  }
165
157
  },
166
- '$wrapperDark &': {
158
+ '[data-soui-theme=dark] &': {
167
159
  color: _theme.default.menuDarkFontColor,
168
160
  backgroundColor: _theme.default.menuDarkItemBackgroundColor,
169
161
  '&:hover': {
@@ -171,7 +163,7 @@ var menuStyle = {
171
163
  backgroundColor: _theme.default.menuDarkItemHoverBackgroundColor
172
164
  }
173
165
  },
174
- '$wrapperDark $itemOpen > &': {
166
+ '[data-soui-theme=dark] $itemOpen > &': {
175
167
  color: _theme.default.menuDarkItemOpenFontColor,
176
168
  backgroundColor: _theme.default.menuDarkItemOpenBackgroundColor,
177
169
  '& $icon': {
@@ -179,13 +171,13 @@ var menuStyle = {
179
171
  }
180
172
  },
181
173
  '$itemInPath > &&': {
182
- '$wrapperLight &': {
174
+ '[data-soui-theme=light] &': {
183
175
  color: _theme.default.menuItemActiveFontColor,
184
176
  '& $icon': {
185
177
  color: _theme.default.menuItemActiveFontColor
186
178
  }
187
179
  },
188
- '$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': {
189
181
  content: '""',
190
182
  position: 'absolute',
191
183
  left: 0,
@@ -193,50 +185,73 @@ var menuStyle = {
193
185
  bottom: 0,
194
186
  width: '3px',
195
187
  backgroundColor: _theme.default.menuDarkItemActiveBackgroundColor
196
- },
197
- '$wrapperLight$wrapperVertical &': {
198
- '&::before': {
199
- display: 'block',
200
- content: '""',
201
- position: 'absolute',
202
- right: 0,
203
- top: 0,
204
- bottom: 0,
205
- width: '4px',
206
- borderTopLeftRadius: '4px',
207
- borderBottomLeftRadius: '4px',
208
- backgroundColor: _theme.default.menuItemActiveFontColor
209
- }
210
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
+ // },
211
203
  },
212
204
  '$itemActive > &&': {
213
- '$wrapperLight &': {
205
+ '[data-soui-theme=light] &': {
214
206
  color: _theme.default.menuItemActiveFontColor,
215
207
  backgroundColor: _theme.default.menuItemActiveBackgroundColor,
216
208
  '& $icon': {
217
209
  color: _theme.default.menuItemActiveFontColor
218
210
  }
219
211
  },
220
- '$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) &': {
221
220
  color: _theme.default.menuDarkItemActiveFontColor,
222
221
  backgroundColor: _theme.default.menuDarkItemActiveBackgroundColor,
223
222
  '& $icon': {
224
223
  color: _theme.default.menuDarkItemActiveFontColor
225
224
  }
226
225
  },
227
- '$wrapperLight$wrapperInline &, $wrapperLight$wrapperHorizontal &': {
226
+ '[data-soui-theme=dark]$wrapperCollpase &': {
228
227
  '&::before': {
229
228
  content: '""',
230
229
  position: 'absolute',
231
- display: 'block',
230
+ left: 0,
232
231
  top: 0,
233
- right: 0,
232
+ bottom: 0,
234
233
  width: '3px',
235
- height: '100%',
236
- backgroundColor: _theme.default.menuItemActiveFontColor
234
+ backgroundColor: _theme.default.menuDarkItemActiveBackgroundColor
237
235
  }
238
236
  },
239
- '$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,
240
255
  width: '100%',
241
256
  height: '2px',
242
257
  top: 'auto',
@@ -245,7 +260,7 @@ var menuStyle = {
245
260
  right: 'auto'
246
261
  }
247
262
  },
248
- '$wrapperLight $itemDisabled > &&': {
263
+ '[data-soui-theme=light] $itemDisabled > &&': {
249
264
  cursor: 'not-allowed',
250
265
  color: _theme.default.menuItemDisabledFontColor,
251
266
  backgroundColor: _theme.default.menuItemDisabledBackgroundColor,
@@ -253,7 +268,7 @@ var menuStyle = {
253
268
  color: _theme.default.menuItemDisabledFontColor
254
269
  }
255
270
  },
256
- '$wrapperDark $itemDisabled > &&': {
271
+ '[data-soui-theme=dark] $itemDisabled > &&': {
257
272
  cursor: 'not-allowed',
258
273
  color: _theme.default.menuDarkItemDisabledFontColor,
259
274
  backgroundColor: _theme.default.menuDarkItemDisabledBackgroundColor,
@@ -264,7 +279,30 @@ var menuStyle = {
264
279
  },
265
280
  itemContentFront: {},
266
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
289
+ },
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
+ }
302
+ }
303
+ },
267
304
  title: {
305
+ cursor: 'inherit',
268
306
  '&:hover': {
269
307
  color: 'inherit'
270
308
  },
@@ -276,13 +314,13 @@ var menuStyle = {
276
314
  minWidth: 0,
277
315
  padding: "".concat(_theme.default.menuTitlePaddingY, " ").concat(_theme.default.menuTitlePaddingX),
278
316
  '$wrapperInline $childrenHasExpand $item:not($itemHasChildren) $itemContentBack > &': {
279
- paddingRight: _theme.default.menuExpandWidth
317
+ paddingRight: "calc(".concat(_theme.default.menuIconMarginX, " + ").concat(_theme.default.menuTitlePaddingX, " + ").concat(_theme.default.menuExpandSize, ")")
280
318
  },
281
319
  '$wrapperInline $itemHasChildren > $itemContentBack > &': {
282
320
  paddingRight: 0
283
321
  },
284
322
  '$childrenHasExpand > $item:not($itemHasChildren) > $itemContentBack > &': {
285
- paddingRight: _theme.default.menuExpandWidth
323
+ paddingRight: "calc(".concat(_theme.default.menuIconMarginX, " + ").concat(_theme.default.menuTitlePaddingX, " + ").concat(_theme.default.menuExpandSize, ")")
286
324
  },
287
325
  '$childrenHasExpand $itemHasChildren > $itemContentBack > &': {
288
326
  paddingRight: 0
@@ -291,12 +329,24 @@ var menuStyle = {
291
329
  paddingLeft: 0
292
330
  }
293
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
+ },
294
344
  expand: {
295
345
  alignSelf: 'stretch',
296
346
  display: 'flex',
297
347
  justifyContent: 'center',
298
348
  alignItems: 'center',
299
- '$wrapperLight &': {
349
+ '[data-soui-theme=light] &': {
300
350
  color: _theme.default.menuIconColor
301
351
  },
302
352
  '& > $icon': {
@@ -306,14 +356,14 @@ var menuStyle = {
306
356
  '$wrapper:not($wrapperVertical) $itemOpen > $itemContent &': {
307
357
  transform: 'rotate(180deg)'
308
358
  }
359
+ }
360
+ },
361
+ expandVertical: {
362
+ '&[dir=ltr] svg': {
363
+ transform: 'rotate(-90deg)'
309
364
  },
310
- '$wrapperVertical &': {
311
- '&[dir=ltr]': {
312
- transform: 'rotate(-90deg)'
313
- },
314
- '&[dir=rtl]': {
315
- transform: 'rotate(90deg)'
316
- }
365
+ '&[dir=rtl] svg': {
366
+ transform: 'rotate(90deg)'
317
367
  }
318
368
  },
319
369
  icon: {},
@@ -329,13 +379,14 @@ var menuStyle = {
329
379
  width: 'auto',
330
380
  visibility: 'hidden',
331
381
  paddingLeft: _theme.default.menuTitlePaddingX,
332
- paddingRight: '8px',
382
+ paddingRight: _theme.default.menuIconMarginX,
333
383
  '$itemHasChildren > $itemContent &': {
334
384
  visibility: 'visible'
335
385
  }
336
386
  },
337
387
  expandBack: {
338
- width: _theme.default.menuExpandWidth
388
+ paddingRight: _theme.default.menuTitlePaddingX,
389
+ paddingLeft: _theme.default.menuIconMarginX
339
390
  },
340
391
  scrollbar: {
341
392
  position: 'absolute',