@sheinx/base 3.5.0-beta.10 → 3.5.0-beta.11

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.
@@ -1 +1 @@
1
- {"version":3,"file":"thead.d.ts","sourceRoot":"","sources":["thead.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;gCAUnB,UAAU;AAAjC,wBA+QE"}
1
+ {"version":3,"file":"thead.d.ts","sourceRoot":"","sources":["thead.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;gCAUnB,UAAU;AAAjC,wBAyRE"}
@@ -83,6 +83,7 @@ var _default = exports.default = function _default(props) {
83
83
  };
84
84
  var isCustomRender = props.renderSorter && typeof props.renderSorter === 'function';
85
85
  var renderedSortDirections = (_ref = (_column$sortDirection = column.sortDirections) !== null && _column$sortDirection !== void 0 ? _column$sortDirection : props.sortDirections) !== null && _ref !== void 0 ? _ref : ['asc', 'desc'];
86
+ var onlyOneDirection = renderedSortDirections.length === 1;
86
87
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
87
88
  className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.sorterContainer,
88
89
  dir: config.direction,
@@ -100,12 +101,18 @@ var _default = exports.default = function _default(props) {
100
101
  onClick: function onClick() {
101
102
  handleChange(currentOrder === 'asc' ? null : 'asc');
102
103
  },
104
+ style: onlyOneDirection ? {
105
+ marginBottom: 0
106
+ } : {},
103
107
  children: _icons.default.table.SortUp
104
108
  }), renderedSortDirections.includes('desc') && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
105
109
  className: (0, _classnames.default)(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.sorterDesc, currentOrder === 'desc' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.sorterActive)),
106
110
  onClick: function onClick() {
107
111
  handleChange(currentOrder === 'desc' ? null : 'desc');
108
112
  },
113
+ style: onlyOneDirection ? {
114
+ marginTop: 0
115
+ } : {},
109
116
  children: _icons.default.table.SortDown
110
117
  })]
111
118
  })
package/cjs/table/tr.js CHANGED
@@ -111,7 +111,7 @@ var Tr = function Tr(props) {
111
111
  return _regeneratorRuntime().wrap(function _callee$(_context) {
112
112
  while (1) switch (_context.prev = _context.next) {
113
113
  case 0:
114
- if (!(showLoader && props.loader)) {
114
+ if (!(showLoader && props.loader && typeof props.loader === 'function')) {
115
115
  _context.next = 11;
116
116
  break;
117
117
  }
@@ -167,7 +167,9 @@ var Tr = function Tr(props) {
167
167
  if (isExpandLoading) {
168
168
  $expandIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_spin.default, {
169
169
  size: 12,
170
- jssStyle: props.jssStyle
170
+ jssStyle: props.jssStyle,
171
+ name: "ring",
172
+ ignoreConfig: true
171
173
  });
172
174
  }
173
175
  var $expandIconWrapper;
@@ -1 +1 @@
1
- {"version":3,"file":"thead.d.ts","sourceRoot":"","sources":["thead.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;gCAUnB,UAAU;AAAjC,wBA+QE"}
1
+ {"version":3,"file":"thead.d.ts","sourceRoot":"","sources":["thead.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;gCAUnB,UAAU;AAAjC,wBAyRE"}
@@ -76,6 +76,7 @@ export default (function (props) {
76
76
  };
77
77
  var isCustomRender = props.renderSorter && typeof props.renderSorter === 'function';
78
78
  var renderedSortDirections = (_ref = (_column$sortDirection = column.sortDirections) !== null && _column$sortDirection !== void 0 ? _column$sortDirection : props.sortDirections) !== null && _ref !== void 0 ? _ref : ['asc', 'desc'];
79
+ var onlyOneDirection = renderedSortDirections.length === 1;
79
80
  return /*#__PURE__*/_jsx("div", {
80
81
  className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.sorterContainer,
81
82
  dir: config.direction,
@@ -93,12 +94,18 @@ export default (function (props) {
93
94
  onClick: function onClick() {
94
95
  handleChange(currentOrder === 'asc' ? null : 'asc');
95
96
  },
97
+ style: onlyOneDirection ? {
98
+ marginBottom: 0
99
+ } : {},
96
100
  children: Icons.table.SortUp
97
101
  }), renderedSortDirections.includes('desc') && /*#__PURE__*/_jsx("div", {
98
102
  className: classNames(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.sorterDesc, currentOrder === 'desc' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.sorterActive)),
99
103
  onClick: function onClick() {
100
104
  handleChange(currentOrder === 'desc' ? null : 'desc');
101
105
  },
106
+ style: onlyOneDirection ? {
107
+ marginTop: 0
108
+ } : {},
102
109
  children: Icons.table.SortDown
103
110
  })]
104
111
  })
package/esm/table/tr.js CHANGED
@@ -105,7 +105,7 @@ var Tr = function Tr(props) {
105
105
  return _regeneratorRuntime().wrap(function _callee$(_context) {
106
106
  while (1) switch (_context.prev = _context.next) {
107
107
  case 0:
108
- if (!(showLoader && props.loader)) {
108
+ if (!(showLoader && props.loader && typeof props.loader === 'function')) {
109
109
  _context.next = 11;
110
110
  break;
111
111
  }
@@ -161,7 +161,9 @@ var Tr = function Tr(props) {
161
161
  if (isExpandLoading) {
162
162
  $expandIcon = /*#__PURE__*/_jsx(Spin, {
163
163
  size: 12,
164
- jssStyle: props.jssStyle
164
+ jssStyle: props.jssStyle,
165
+ name: "ring",
166
+ ignoreConfig: true
165
167
  });
166
168
  }
167
169
  var $expandIconWrapper;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.5.0-beta.10",
3
+ "version": "3.5.0-beta.11",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.5.0-beta.10",
13
+ "@sheinx/hooks": "3.5.0-beta.11",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"