@sheinx/shineout-style 3.7.0-beta.8 → 3.7.0

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 (105) hide show
  1. package/cjs/alert/alert.d.ts.map +1 -1
  2. package/cjs/alert/alert.js +5 -0
  3. package/cjs/button/button.d.ts.map +1 -1
  4. package/cjs/button/button.js +3 -1
  5. package/cjs/carousel/carousel.d.ts.map +1 -1
  6. package/cjs/carousel/carousel.js +2 -83
  7. package/cjs/cascader/cascader.d.ts.map +1 -1
  8. package/cjs/cascader/cascader.js +6 -3
  9. package/cjs/common/common.d.ts +98 -0
  10. package/cjs/common/common.d.ts.map +1 -0
  11. package/cjs/common/common.js +106 -0
  12. package/cjs/common/index.d.ts +5 -0
  13. package/cjs/common/index.d.ts.map +1 -0
  14. package/cjs/common/index.js +26 -0
  15. package/cjs/date-picker/date-picker.d.ts.map +1 -1
  16. package/cjs/date-picker/date-picker.js +8 -15
  17. package/cjs/grid/grid.d.ts +5 -0
  18. package/cjs/grid/grid.d.ts.map +1 -0
  19. package/cjs/grid/grid.js +23 -0
  20. package/cjs/grid/index.d.ts +5 -0
  21. package/cjs/grid/index.d.ts.map +1 -0
  22. package/cjs/grid/index.js +19 -0
  23. package/cjs/image/image.d.ts.map +1 -1
  24. package/cjs/image/image.js +8 -3
  25. package/cjs/index.d.ts +3 -0
  26. package/cjs/index.d.ts.map +1 -1
  27. package/cjs/index.js +36 -0
  28. package/cjs/list/list.d.ts.map +1 -1
  29. package/cjs/list/list.js +3 -0
  30. package/cjs/modal/modal.d.ts.map +1 -1
  31. package/cjs/modal/modal.js +0 -3
  32. package/cjs/radio/radio.d.ts.map +1 -1
  33. package/cjs/radio/radio.js +8 -1
  34. package/cjs/select/select.d.ts.map +1 -1
  35. package/cjs/select/select.js +5 -0
  36. package/cjs/skeleton/index.d.ts +5 -0
  37. package/cjs/skeleton/index.d.ts.map +1 -0
  38. package/cjs/skeleton/index.js +19 -0
  39. package/cjs/skeleton/skeleton.d.ts +6 -0
  40. package/cjs/skeleton/skeleton.d.ts.map +1 -0
  41. package/cjs/skeleton/skeleton.js +110 -0
  42. package/cjs/switch/switch.d.ts.map +1 -1
  43. package/cjs/switch/switch.js +4 -1
  44. package/cjs/table/table.d.ts.map +1 -1
  45. package/cjs/table/table.js +20 -1
  46. package/cjs/tree/tree.d.ts.map +1 -1
  47. package/cjs/tree/tree.js +197 -64
  48. package/cjs/tree-select/tree-select.d.ts.map +1 -1
  49. package/cjs/tree-select/tree-select.js +6 -1
  50. package/cjs/version.d.ts +1 -1
  51. package/cjs/version.d.ts.map +1 -1
  52. package/cjs/version.js +1 -1
  53. package/esm/alert/alert.d.ts.map +1 -1
  54. package/esm/alert/alert.js +5 -0
  55. package/esm/button/button.d.ts.map +1 -1
  56. package/esm/button/button.js +3 -1
  57. package/esm/carousel/carousel.d.ts.map +1 -1
  58. package/esm/carousel/carousel.js +1 -82
  59. package/esm/cascader/cascader.d.ts.map +1 -1
  60. package/esm/cascader/cascader.js +6 -3
  61. package/esm/common/common.d.ts +98 -0
  62. package/esm/common/common.d.ts.map +1 -0
  63. package/esm/common/common.js +99 -0
  64. package/esm/common/index.d.ts +5 -0
  65. package/esm/common/index.d.ts.map +1 -0
  66. package/esm/common/index.js +6 -0
  67. package/esm/date-picker/date-picker.d.ts.map +1 -1
  68. package/esm/date-picker/date-picker.js +8 -15
  69. package/esm/grid/grid.d.ts +5 -0
  70. package/esm/grid/grid.d.ts.map +1 -0
  71. package/esm/grid/grid.js +17 -0
  72. package/esm/grid/index.d.ts +5 -0
  73. package/esm/grid/index.d.ts.map +1 -0
  74. package/esm/grid/index.js +6 -0
  75. package/esm/image/image.d.ts.map +1 -1
  76. package/esm/image/image.js +8 -3
  77. package/esm/index.d.ts +3 -0
  78. package/esm/index.d.ts.map +1 -1
  79. package/esm/index.js +3 -0
  80. package/esm/list/list.d.ts.map +1 -1
  81. package/esm/list/list.js +3 -0
  82. package/esm/modal/modal.d.ts.map +1 -1
  83. package/esm/modal/modal.js +0 -3
  84. package/esm/radio/radio.d.ts.map +1 -1
  85. package/esm/radio/radio.js +8 -1
  86. package/esm/select/select.d.ts.map +1 -1
  87. package/esm/select/select.js +5 -0
  88. package/esm/skeleton/index.d.ts +5 -0
  89. package/esm/skeleton/index.d.ts.map +1 -0
  90. package/esm/skeleton/index.js +6 -0
  91. package/esm/skeleton/skeleton.d.ts +6 -0
  92. package/esm/skeleton/skeleton.d.ts.map +1 -0
  93. package/esm/skeleton/skeleton.js +105 -0
  94. package/esm/switch/switch.d.ts.map +1 -1
  95. package/esm/switch/switch.js +4 -1
  96. package/esm/table/table.d.ts.map +1 -1
  97. package/esm/table/table.js +20 -1
  98. package/esm/tree/tree.d.ts.map +1 -1
  99. package/esm/tree/tree.js +197 -64
  100. package/esm/tree-select/tree-select.d.ts.map +1 -1
  101. package/esm/tree-select/tree-select.js +6 -1
  102. package/esm/version.d.ts +1 -1
  103. package/esm/version.d.ts.map +1 -1
  104. package/esm/version.js +1 -1
  105. package/package.json +3 -3
package/cjs/list/list.js CHANGED
@@ -47,6 +47,9 @@ var listStyle = {
47
47
  alignItems: 'center',
48
48
  justifyContent: 'center'
49
49
  },
50
+ loadingBottom: {
51
+ padding: 16
52
+ },
50
53
  empty: {
51
54
  display: 'flex',
52
55
  justifyContent: 'center',
@@ -1 +1 @@
1
- {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["modal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKxC,MAAM,MAAM,cAAc,GAAG,MAAM,YAAY,CAAC;AAqJhD,QAAA,MAAM,UAAU,EAAE,QAAQ,CAAC,cAAc,CA6SxC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["modal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAKxC,MAAM,MAAM,cAAc,GAAG,MAAM,YAAY,CAAC;AAqJhD,QAAA,MAAM,UAAU,EAAE,QAAQ,CAAC,cAAc,CA0SxC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -191,9 +191,6 @@ var modalStyle = _objectSpread(_objectSpread({
191
191
  height: '100vh',
192
192
  width: '100vw',
193
193
  overflow: 'auto'
194
- },
195
- '& $body': {
196
- minHeight: 'auto'
197
194
  }
198
195
  },
199
196
  wrapperZoom: {
@@ -1 +1 @@
1
- {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["radio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,QAAA,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,YAAY,CAiK5C,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["radio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,QAAA,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,YAAY,CAwK5C,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -30,7 +30,11 @@ var radioStyle = {
30
30
  marginRight: 0
31
31
  }
32
32
  },
33
- wrapperSmall: {},
33
+ wrapperSmall: {
34
+ '[data-soui-role="form-control"] > $group > &': {
35
+ marginTop: 1
36
+ }
37
+ },
34
38
  wrapperLarge: {},
35
39
  wrapperChecked: {},
36
40
  wrapperDisabled: {
@@ -41,13 +45,16 @@ var radioStyle = {
41
45
  position: 'relative',
42
46
  boxSizing: 'border-box',
43
47
  width: _theme.default.radioIconWidth,
48
+ minWidth: _theme.default.radioIconWidth,
44
49
  height: _theme.default.radioIconWidth,
45
50
  '$wrapperSmall &': {
46
51
  width: _theme.default.radioSmallIconWidth,
52
+ minWidth: _theme.default.radioSmallIconWidth,
47
53
  height: _theme.default.radioSmallIconWidth
48
54
  },
49
55
  '$wrapperLarge &': {
50
56
  width: _theme.default.radioLargeIconWidth,
57
+ minWidth: _theme.default.radioLargeIconWidth,
51
58
  height: _theme.default.radioLargeIconWidth
52
59
  },
53
60
  marginRight: _theme.default.radioIconGap,
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["select.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,MAAM,MAAM,eAAe,GAAG,MAAM,aAAa,CAAC;AAuDlD,QAAA,MAAM,WAAW,EAAE,QAAQ,CAAC,eAAe,CAshB1C,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["select.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,MAAM,MAAM,eAAe,GAAG,MAAM,aAAa,CAAC;AAuDlD,QAAA,MAAM,WAAW,EAAE,QAAQ,CAAC,eAAe,CA2hB1C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -163,6 +163,7 @@ var selectStyle = _objectSpread(_objectSpread({
163
163
  result: {
164
164
  display: 'flex',
165
165
  flex: '1',
166
+ height: '100%',
166
167
  minWidth: 0,
167
168
  alignItems: 'center',
168
169
  lineHeight: _theme.default.lineHeightDynamic
@@ -442,10 +443,14 @@ var selectStyle = _objectSpread(_objectSpread({
442
443
  visibility: 'hidden'
443
444
  },
444
445
  moreWrapper: {
446
+ width: 'max-content',
445
447
  maxWidth: 400,
446
448
  maxHeight: 160,
447
449
  overflow: 'auto',
448
450
  padding: "".concat(_theme.default.selectMorePaddingY, " ").concat(_theme.default.selectMorePaddingX),
451
+ '& $tag': {
452
+ maxWidth: 'none'
453
+ },
449
454
  '&:hover': {
450
455
  '& $clearIcon': {
451
456
  display: 'inline-block'
@@ -0,0 +1,5 @@
1
+ import skeletonStyle from './skeleton';
2
+ declare const useSkeletonStyle: () => import("jss").Classes<keyof import("@sheinx/base").SkeletonClasses>;
3
+ export { skeletonStyle, useSkeletonStyle };
4
+ export default useSkeletonStyle;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,YAAY,CAAC;AAEvC,QAAA,MAAM,gBAAgB,2EAAoC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC;AAC3C,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ "use client";
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ Object.defineProperty(exports, "skeletonStyle", {
9
+ enumerable: true,
10
+ get: function get() {
11
+ return _skeleton.default;
12
+ }
13
+ });
14
+ exports.useSkeletonStyle = void 0;
15
+ var _jssStyle = require("../jss-style");
16
+ var _skeleton = _interopRequireDefault(require("./skeleton"));
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+ var useSkeletonStyle = exports.useSkeletonStyle = (0, _jssStyle.styled)(_skeleton.default, 'skeleton');
19
+ var _default = exports.default = useSkeletonStyle;
@@ -0,0 +1,6 @@
1
+ import { JsStyles } from '../jss-style';
2
+ import { SkeletonClasses } from '@sheinx/base';
3
+ export type SkeletonClassType = keyof SkeletonClasses;
4
+ declare const skeletonStyle: JsStyles<SkeletonClassType>;
5
+ export default skeletonStyle;
6
+ //# sourceMappingURL=skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["skeleton.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAU9C,MAAM,MAAM,iBAAiB,GAAG,MAAM,eAAe,CAAC;AAEtD,QAAA,MAAM,aAAa,EAAE,QAAQ,CAAC,iBAAiB,CA0F9C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _theme = _interopRequireDefault(require("@sheinx/theme"));
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); } // import token from '@sheinx/theme';
15
+ var animation = {
16
+ '@keyframes skeleton-animation': {
17
+ '0%': {
18
+ backgroundPosition: '100% 50%'
19
+ },
20
+ '100%': {
21
+ backgroundPosition: '0 50%'
22
+ }
23
+ }
24
+ };
25
+ var skeletonStyle = _objectSpread(_objectSpread({}, animation), {}, {
26
+ rootClass: {},
27
+ wrapper: {
28
+ display: 'flex'
29
+ },
30
+ animation: {
31
+ '& $textItem, & $image, & $buttonItem': {
32
+ background: "linear-gradient(90deg, ".concat(_theme.default.skeletonAnimationFromColor, " 25%, ").concat(_theme.default.skeletonAnimationToColor, " 37%, ").concat(_theme.default.skeletonAnimationFromColor, " 63%)"),
33
+ backgroundSize: '400% 100%',
34
+ animation: '$skeleton-animation 1.4s ease infinite'
35
+ }
36
+ },
37
+ content: {
38
+ flex: 1,
39
+ minWidth: 0
40
+ },
41
+ text: {
42
+ margin: 0,
43
+ padding: 0,
44
+ listStyle: 'none'
45
+ },
46
+ textItem: {
47
+ height: _theme.default.skeletonHeight,
48
+ marginBottom: _theme.default.skeletonMargin,
49
+ backgroundColor: _theme.default.skeletonBackgroundColor,
50
+ borderRadius: _theme.default.skeletonBackgroundRadius,
51
+ '&:last-child': {
52
+ marginBottom: 0
53
+ }
54
+ },
55
+ image: {
56
+ width: 48,
57
+ height: 48,
58
+ backgroundColor: _theme.default.skeletonBackgroundColor
59
+ },
60
+ imageLeft: {
61
+ marginRight: _theme.default.skeletonMargin
62
+ },
63
+ imageRight: {
64
+ marginLeft: _theme.default.skeletonMargin
65
+ },
66
+ imageCircle: {
67
+ borderRadius: '50%'
68
+ },
69
+ imageSquare: {
70
+ borderRadius: _theme.default.skeletonBackgroundRadius
71
+ },
72
+ imageSmall: {
73
+ width: 32,
74
+ height: 32
75
+ },
76
+ imageLarge: {
77
+ width: 64,
78
+ height: 64
79
+ },
80
+ button: {
81
+ display: 'flex',
82
+ '$text + &': {
83
+ marginTop: _theme.default.skeletonMargin
84
+ }
85
+ },
86
+ buttonItem: {
87
+ width: 80,
88
+ height: 32,
89
+ backgroundColor: _theme.default.skeletonBackgroundColor,
90
+ borderRadius: _theme.default.skeletonBackgroundRadius,
91
+ '& + &': {
92
+ marginLeft: _theme.default.skeletonMargin
93
+ }
94
+ },
95
+ buttonLeft: {
96
+ justifyContent: 'flex-start'
97
+ },
98
+ buttonRight: {
99
+ justifyContent: 'flex-end'
100
+ },
101
+ buttonSmall: {
102
+ width: 64,
103
+ height: 24
104
+ },
105
+ buttonLarge: {
106
+ width: 96,
107
+ height: 40
108
+ }
109
+ });
110
+ var _default = exports.default = skeletonStyle;
@@ -1 +1 @@
1
- {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["switch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAaxC,QAAA,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,aAAa,CAwL9C,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["switch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAaxC,QAAA,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,aAAa,CA2L9C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -62,7 +62,10 @@ var switchStyle = _objectSpread(_objectSpread({
62
62
  padding: "".concat(_theme.default.switchSmallPaddingY, " ").concat(_theme.default.switchSmallPaddingX),
63
63
  minWidth: _theme.default.switchSmallWidth,
64
64
  borderRadius: "calc( ".concat(_theme.default.switchSmallCircleSize, " / 2 + ").concat(_theme.default.switchSmallPaddingY, " )"),
65
- fontSize: _theme.default.switchSmallFontSize
65
+ fontSize: _theme.default.switchSmallFontSize,
66
+ '[data-soui-role="form-control"] > &': {
67
+ marginTop: 8
68
+ }
66
69
  },
67
70
  '$wrapperLarge&': {
68
71
  height: "calc( ".concat(_theme.default.switchLargeCircleSize, " + ").concat(_theme.default.switchLargePaddingY, " * 2 )"),
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["table.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAUxC,MAAM,MAAM,cAAc,GAAG,MAAM,YAAY,CAAC;AAUhD,QAAA,MAAM,UAAU,EAAE,QAAQ,CAAC,cAAc,CA+jBxC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["table.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAWxC,MAAM,MAAM,cAAc,GAAG,MAAM,YAAY,CAAC;AAUhD,QAAA,MAAM,UAAU,EAAE,QAAQ,CAAC,cAAc,CAglBxC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _theme = _interopRequireDefault(require("@sheinx/theme"));
8
+ var _mixin = require("../mixin");
8
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
10
  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
11
  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; }
@@ -213,7 +214,7 @@ var tableStyle = _objectSpread(_objectSpread({
213
214
  '$wrapper & table > tfoot': {
214
215
  position: 'sticky',
215
216
  bottom: 0,
216
- zIndex: fixedIndex
217
+ zIndex: fixedFixedIndex + 1
217
218
  }
218
219
  },
219
220
  footWrapper: {
@@ -226,6 +227,23 @@ var tableStyle = _objectSpread(_objectSpread({
226
227
  zIndex: fixedIndex + 1
227
228
  }
228
229
  },
230
+ scrollY: {
231
+ '&$headWrapper, &$footWrapper': _objectSpread({
232
+ overflow: 'hidden scroll'
233
+ }, (0, _mixin.customScrollBar)({
234
+ background: 'transparent'
235
+ }))
236
+ },
237
+ scrollX: {
238
+ '&$headWrapper, &$footWrapper': {
239
+ overflowX: 'hidden'
240
+ }
241
+ },
242
+ emptyHeader: {
243
+ position: 'sticky',
244
+ top: 0,
245
+ zIndex: 1
246
+ },
229
247
  emptyWrapper: {
230
248
  minHeight: '170px',
231
249
  width: '100%',
@@ -234,6 +252,7 @@ var tableStyle = _objectSpread(_objectSpread({
234
252
  left: 0,
235
253
  top: 0,
236
254
  justifyContent: 'center',
255
+ textAlign: 'center',
237
256
  display: 'flex',
238
257
  alignItems: 'center',
239
258
  borderBottom: "1px solid ".concat(_theme.default.tableCellBorderColor)
@@ -1 +1 @@
1
- {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["tree.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,CAoQtC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["tree.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;AAI9C,QAAA,MAAM,SAAS,EAAE,QAAQ,CAAC,aAAa,CAwYtC,CAAC;AAEF,eAAe,SAAS,CAAC"}
package/cjs/tree/tree.js CHANGED
@@ -6,10 +6,26 @@ 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
+ var childNodeMarginLeft = 12;
9
10
  var treeStyle = {
10
11
  rootClass: {},
11
12
  tree: {},
12
13
  virtual: {},
14
+ sizeSmall: {
15
+ '&$line $node': {
16
+ '&:last-child': {
17
+ '&::before': {
18
+ top: 0,
19
+ height: 14
20
+ }
21
+ },
22
+ '&::before': {
23
+ top: -2,
24
+ height: 'calc(100% + 2px)'
25
+ }
26
+ }
27
+ },
28
+ sizeLarge: {},
13
29
  notTree: {
14
30
  '&$root > $node$leaf': {
15
31
  paddingLeft: 0
@@ -19,6 +35,19 @@ var treeStyle = {
19
35
  }
20
36
  },
21
37
  line: {
38
+ '&$virtual $node': {
39
+ '&::before, &::after': {
40
+ display: 'none'
41
+ }
42
+ },
43
+ '&$virtual $leaf $contentWrapper': {
44
+ marginLeft: 12
45
+ },
46
+ '&$virtual $leaf $contentWrapper, &$virtual $childnode$contentWrapper': {
47
+ '&::after': {
48
+ display: 'none'
49
+ }
50
+ },
22
51
  '& $node': {
23
52
  '&[dir=ltr]::before': {
24
53
  left: 0
@@ -33,26 +62,6 @@ var treeStyle = {
33
62
  height: 'calc(100% + 6px)',
34
63
  width: 1,
35
64
  background: _theme.default.treeLineBackgroundColor
36
- },
37
- '&[dir=ltr]::after': {
38
- left: 0
39
- },
40
- '&[dir=rtl]::after': {
41
- right: 0
42
- },
43
- '&::after': {
44
- content: '""',
45
- position: 'absolute',
46
- top: 18,
47
- height: 1,
48
- width: 16,
49
- background: _theme.default.treeLineBackgroundColor
50
- }
51
- },
52
- '& $node:first-child': {},
53
- '& $node:first-child:last-child': {
54
- '&::before,&::after': {
55
- display: 'none'
56
65
  }
57
66
  },
58
67
  '& $node:last-child': {
@@ -63,19 +72,123 @@ var treeStyle = {
63
72
  },
64
73
  '& $contentWrapper': {},
65
74
  '& $iconWrapper': {
75
+ width: 24,
66
76
  '&[dir=ltr]': {
67
- left: 16
77
+ left: -24
68
78
  },
69
79
  '&[dir=rtl]': {
70
- right: 16
71
- },
72
- width: 24,
73
- '& $icon': {
74
- // width: 16,
80
+ right: -24
75
81
  }
76
82
  },
77
83
  '& $childnode': {
78
- marginLeft: 12
84
+ marginLeft: childNodeMarginLeft,
85
+ '&$contentWrapper': {
86
+ position: 'relative',
87
+ '&::after': {
88
+ content: '""',
89
+ position: 'absolute',
90
+ top: 18,
91
+ left: 0,
92
+ marginLeft: -24,
93
+ transform: 'translate(-100%, 0)',
94
+ height: 1,
95
+ width: 16,
96
+ background: _theme.default.treeLineBackgroundColor
97
+ }
98
+ }
99
+ },
100
+ '& $leaf': {
101
+ '& $contentWrapper': {
102
+ position: 'relative',
103
+ '&::after': {
104
+ content: '""',
105
+ position: 'absolute',
106
+ top: 18,
107
+ left: 0,
108
+ marginLeft: -24,
109
+ transform: 'translate(-100%, 0)',
110
+ height: 1,
111
+ width: 16,
112
+ background: _theme.default.treeLineBackgroundColor
113
+ }
114
+ }
115
+ },
116
+ '& $childnode[dir=rtl]': {
117
+ '&$contentWrapper': {
118
+ '&::after': {
119
+ top: '50%',
120
+ right: 0,
121
+ transform: 'translate(100%, -50%)'
122
+ }
123
+ }
124
+ },
125
+ '&$sizeSmall': {
126
+ '& $contentWrapper::after': {
127
+ display: 'none'
128
+ }
129
+ },
130
+ '&$sizeLarge': {
131
+ '& $node:last-child::before': {
132
+ height: 21
133
+ },
134
+ '& $iconWrapper': {
135
+ '&[dir=ltr]': {
136
+ left: -32
137
+ },
138
+ '&[dir=rtl]': {
139
+ right: -32
140
+ }
141
+ },
142
+ '&:not($virtual) $childnode, &:not($virtual) $leaf': {
143
+ marginLeft: 20
144
+ },
145
+ '': {
146
+ marginLeft: 20
147
+ },
148
+ '& $node': {
149
+ paddingLeft: 32,
150
+ '&[dir=ltr]::before': {
151
+ left: 4
152
+ },
153
+ '&[dir=rtl]::before': {
154
+ right: 4
155
+ },
156
+ '&::before': {
157
+ top: -4,
158
+ height: 'calc(100% + 4px)'
159
+ }
160
+ },
161
+ '& $node$leaf': {
162
+ '&[dir=ltr]::before': {
163
+ left: -16
164
+ },
165
+ '&[dir=rtl]::before': {
166
+ right: -16
167
+ },
168
+ '&::after': {
169
+ left: -14
170
+ }
171
+ },
172
+ '& > $root > $node': {
173
+ paddingLeft: 12
174
+ },
175
+ '& $leaf $contentWrapper::after': {
176
+ left: -24,
177
+ top: 21,
178
+ transform: 'translate(0, -50%)'
179
+ },
180
+ '& $contentWrapper$childnode::after': {
181
+ top: 21,
182
+ marginLeft: -32
183
+ }
184
+ },
185
+ '& > $root > $node': {
186
+ paddingLeft: 12,
187
+ '& > $contentWrapper': {
188
+ '&::after': {
189
+ display: 'none'
190
+ }
191
+ }
79
192
  }
80
193
  },
81
194
  noline: {
@@ -109,30 +222,29 @@ var treeStyle = {
109
222
  '& > $node': {
110
223
  paddingLeft: 24
111
224
  }
225
+ },
226
+ '&$sizeLarge': {
227
+ '& > $root > $node, & $node$leaf': {
228
+ paddingLeft: 32
229
+ }
230
+ }
231
+ },
232
+ lineIndent: {
233
+ position: 'absolute',
234
+ top: 0,
235
+ width: 1,
236
+ height: '100%',
237
+ background: _theme.default.treeLineBackgroundColor,
238
+ '$sizeLarge &': {
239
+ transform: 'translateX(-4px)'
112
240
  }
113
241
  },
114
242
  root: {
115
- // '& > :first-child$node': {
116
- // '&::before': {
117
- // top: 18,
118
- // },
119
- // },
120
- // '& > :last-child$node': {
121
- // '&::before': {},
122
- // },
123
243
  '& > $node': {
124
244
  paddingLeft: 12,
125
245
  '&$leaf': {
126
246
  paddingLeft: 24
127
247
  },
128
- '& > $contentWrapper > $iconWrapper': {
129
- '&[dir=ltr]': {
130
- left: 0
131
- },
132
- '&[dir=rtl]': {
133
- right: 0
134
- }
135
- },
136
248
  '&::before': {
137
249
  display: 'none'
138
250
  },
@@ -146,7 +258,13 @@ var treeStyle = {
146
258
  contentWrapper: {
147
259
  display: 'flex',
148
260
  alignItems: 'flex-start',
149
- padding: '5px 0'
261
+ padding: '5px 0',
262
+ '$sizeSmall &': {
263
+ padding: '1px 0'
264
+ },
265
+ '$sizeLarge & $text': {
266
+ lineHeight: '28px'
267
+ }
150
268
  },
151
269
  inlineContent: {
152
270
  display: 'inline-flex'
@@ -167,15 +285,6 @@ var treeStyle = {
167
285
  display: 'flex',
168
286
  alignItems: 'center',
169
287
  marginLeft: 4,
170
- // 'label&': {
171
- // cursor: 'pointer',
172
- // userSelect: 'none',
173
- // },
174
-
175
- // '$iconWrapper + &': {
176
- // marginLeft: 4,
177
- // },
178
-
179
288
  '$contentDisabled &': {
180
289
  '& $text': {
181
290
  color: _theme.default.treeContentDisabledFontColor
@@ -192,7 +301,11 @@ var treeStyle = {
192
301
  checkbox: {
193
302
  '&[class*="checkbox-wrapper"]': {
194
303
  height: 26,
304
+ alignSelf: 'flex-start',
195
305
  marginRight: _theme.default.treeCheckboxMarginX
306
+ },
307
+ '$sizeLarge &': {
308
+ marginTop: 4
196
309
  }
197
310
  },
198
311
  text: {
@@ -211,19 +324,30 @@ var treeStyle = {
211
324
  background: _theme.default.treeContentHoverBackgroundColor
212
325
  }
213
326
  },
214
- // textDisabled: {
215
- // color: Token.treeItemDisabledFontColor,
216
- // },
217
327
  list: {},
218
328
  node: {
219
329
  position: 'relative',
220
330
  paddingLeft: 28,
221
- '&$leaf': {
222
- paddingLeft: 40,
223
- '&::after': {
224
- width: 12
331
+ '$sizeSmall$line &': {
332
+ paddingLeft: 12,
333
+ '&$leaf': {
334
+ paddingLeft: 24
335
+ },
336
+ "&::after": {
337
+ position: 'absolute',
338
+ content: '""',
339
+ top: 28,
340
+ width: 1,
341
+ height: 'calc(100% - 28px)',
342
+ background: _theme.default.treeLineBackgroundColor
225
343
  }
226
344
  },
345
+ '$sizeLarge &': {
346
+ paddingLeft: 32
347
+ },
348
+ '&$leaf': {
349
+ paddingLeft: 40
350
+ },
227
351
  '&[draggable="true"]': {
228
352
  cursor: 'pointer'
229
353
  }
@@ -239,7 +363,8 @@ var treeStyle = {
239
363
  },
240
364
  position: 'absolute',
241
365
  width: 24,
242
- height: 26,
366
+ height: 24,
367
+ margin: '1px 0',
243
368
  display: 'inline-flex',
244
369
  alignItems: 'center',
245
370
  justifyContent: 'center',
@@ -247,11 +372,16 @@ var treeStyle = {
247
372
  '& $icon': {
248
373
  transform: 'rotate(0deg)'
249
374
  }
375
+ },
376
+ '$sizeLarge &': {
377
+ width: 32,
378
+ height: 32,
379
+ top: 5
250
380
  }
251
381
  },
252
382
  icon: {
253
- width: 24,
254
- height: 24,
383
+ width: '100%',
384
+ height: '100%',
255
385
  display: 'inline-flex',
256
386
  alignItems: 'center',
257
387
  justifyContent: 'center',
@@ -267,7 +397,10 @@ var treeStyle = {
267
397
  background: _theme.default.treeItemActiveBackgroundColor
268
398
  },
269
399
  '& svg': {
270
- width: 14
400
+ width: 14,
401
+ '$sizeLarge &': {
402
+ width: 16
403
+ }
271
404
  }
272
405
  },
273
406
  children: {},