@sheinx/base 3.1.24 → 3.1.26

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.
@@ -190,10 +190,9 @@ var Modal = function Modal(props) {
190
190
  return function () {
191
191
  var _props$shouldDestroy2;
192
192
  (_props$shouldDestroy2 = props.shouldDestroy) === null || _props$shouldDestroy2 === void 0 || _props$shouldDestroy2.call(props, true);
193
- if (props.autoShow) {
194
- var _props$onClose2;
195
- (_props$onClose2 = props.onClose) === null || _props$onClose2 === void 0 || _props$onClose2.call(props);
196
- }
193
+ // if (props.autoShow) {
194
+ // props.onClose?.();
195
+ // }
197
196
  if (context.isMask) {
198
197
  context.isMask = false;
199
198
  hasMask = false;
@@ -3,7 +3,7 @@ import type { ModalOptions } from './modal-func.type';
3
3
  export declare const closeAll: () => void;
4
4
  type MethodType = 'info' | 'warning' | 'error' | 'confirm' | 'show' | 'success';
5
5
  declare const _default: {
6
- type: (type: MethodType, jssStyle: ModalJssStyle) => (options: Omit<ModalOptions, "jssStyle">) => void;
6
+ type: (type: MethodType, jssStyle: ModalJssStyle) => (options: Omit<ModalOptions, "jssStyle">) => (() => void) | undefined;
7
7
  closeAll: () => void;
8
8
  };
9
9
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"modal-func.d.ts","sourceRoot":"","sources":["modal-func.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAYtD,eAAO,MAAM,QAAQ,YAIpB,CAAC;AA8CF,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;;;;;AA4DhF,wBAGE"}
1
+ {"version":3,"file":"modal-func.d.ts","sourceRoot":"","sources":["modal-func.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAYtD,eAAO,MAAM,QAAQ,YAIpB,CAAC;AA8CF,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;;;;;AAoEhF,wBAGE"}
@@ -124,6 +124,7 @@ var method = function method(type, jssStyle) {
124
124
  children: options.content || options.children
125
125
  }));
126
126
  _hooks.util.ReactRender(Content, root);
127
+ return destroyModal;
127
128
  };
128
129
  };
129
130
  var _default = exports.default = {
@@ -1 +1 @@
1
- {"version":3,"file":"result-more.d.ts","sourceRoot":"","sources":["result-more.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKpD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,WAAW,EACtB,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,UA6D9B;;AA8ED,wBAAyC"}
1
+ {"version":3,"file":"result-more.d.ts","sourceRoot":"","sources":["result-more.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKpD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,WAAW,EACtB,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,UA6D9B;;AAkED,wBAAyC"}
@@ -14,11 +14,6 @@ var _jsxRuntime = require("react/jsx-runtime");
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  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); }
16
16
  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; }
17
- 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; }
18
- 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; }
19
- 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; }
20
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
21
- 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); }
22
17
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
23
18
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
24
19
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -114,15 +109,6 @@ var More = function More(props) {
114
109
  });
115
110
  itemsLength = after.length;
116
111
  }
117
- if (after && after.length > 0) {
118
- after = _react.Children.map(after, function (item) {
119
- return /*#__PURE__*/_react.default.cloneElement(item, _objectSpread(_objectSpread({}, item.props), {}, {
120
- style: {
121
- opcacity: 1
122
- }
123
- }));
124
- }) || after;
125
- }
126
112
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.default.Fragment, {
127
113
  children: [shouldShowMore ? data : before, /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
128
114
  style: {
@@ -184,10 +184,9 @@ var Modal = function Modal(props) {
184
184
  return function () {
185
185
  var _props$shouldDestroy2;
186
186
  (_props$shouldDestroy2 = props.shouldDestroy) === null || _props$shouldDestroy2 === void 0 || _props$shouldDestroy2.call(props, true);
187
- if (props.autoShow) {
188
- var _props$onClose2;
189
- (_props$onClose2 = props.onClose) === null || _props$onClose2 === void 0 || _props$onClose2.call(props);
190
- }
187
+ // if (props.autoShow) {
188
+ // props.onClose?.();
189
+ // }
191
190
  if (context.isMask) {
192
191
  context.isMask = false;
193
192
  hasMask = false;
@@ -3,7 +3,7 @@ import type { ModalOptions } from './modal-func.type';
3
3
  export declare const closeAll: () => void;
4
4
  type MethodType = 'info' | 'warning' | 'error' | 'confirm' | 'show' | 'success';
5
5
  declare const _default: {
6
- type: (type: MethodType, jssStyle: ModalJssStyle) => (options: Omit<ModalOptions, "jssStyle">) => void;
6
+ type: (type: MethodType, jssStyle: ModalJssStyle) => (options: Omit<ModalOptions, "jssStyle">) => (() => void) | undefined;
7
7
  closeAll: () => void;
8
8
  };
9
9
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"modal-func.d.ts","sourceRoot":"","sources":["modal-func.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAYtD,eAAO,MAAM,QAAQ,YAIpB,CAAC;AA8CF,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;;;;;AA4DhF,wBAGE"}
1
+ {"version":3,"file":"modal-func.d.ts","sourceRoot":"","sources":["modal-func.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAYtD,eAAO,MAAM,QAAQ,YAIpB,CAAC;AA8CF,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;;;;;AAoEhF,wBAGE"}
@@ -118,6 +118,7 @@ var method = function method(type, jssStyle) {
118
118
  children: options.content || options.children
119
119
  }));
120
120
  util.ReactRender(Content, root);
121
+ return destroyModal;
121
122
  };
122
123
  };
123
124
  export default {
@@ -1 +1 @@
1
- {"version":3,"file":"result-more.d.ts","sourceRoot":"","sources":["result-more.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKpD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,WAAW,EACtB,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,UA6D9B;;AA8ED,wBAAyC"}
1
+ {"version":3,"file":"result-more.d.ts","sourceRoot":"","sources":["result-more.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKpD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,WAAW,EACtB,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,UA6D9B;;AAkED,wBAAyC"}
@@ -1,16 +1,10 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
2
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
5
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useState, Children, memo } from 'react';
7
+ import React, { useState, memo } from 'react';
14
8
  import { parsePxToNumber } from '@sheinx/hooks';
15
9
  import Tag from "../tag";
16
10
  import Popover from "../popover";
@@ -105,15 +99,6 @@ var More = function More(props) {
105
99
  });
106
100
  itemsLength = after.length;
107
101
  }
108
- if (after && after.length > 0) {
109
- after = Children.map(after, function (item) {
110
- return /*#__PURE__*/React.cloneElement(item, _objectSpread(_objectSpread({}, item.props), {}, {
111
- style: {
112
- opcacity: 1
113
- }
114
- }));
115
- }) || after;
116
- }
117
102
  return /*#__PURE__*/_jsxs(React.Fragment, {
118
103
  children: [shouldShowMore ? data : before, /*#__PURE__*/_jsxs("span", {
119
104
  style: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.1.24",
3
+ "version": "3.1.26",
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.1.24",
13
+ "@sheinx/hooks": "3.1.26",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"