@sheinx/base 3.6.3-beta.2 → 3.6.3-beta.4

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.
@@ -15,7 +15,7 @@ var FormFlow = function FormFlow(props) {
15
15
  return datum === null || datum === void 0 ? void 0 : datum.get(name);
16
16
  });
17
17
  var memoizedResult = (0, _react.useMemo)(function () {
18
- if (!props.strict) return;
18
+ if (!props.strict) return null;
19
19
  if (_hooks.util.isFunc(props.children)) {
20
20
  return props.children(datum);
21
21
  }
@@ -117,6 +117,9 @@ declare const config: {
117
117
  Next: import("react/jsx-runtime").JSX.Element;
118
118
  CollapseArrow: import("react/jsx-runtime").JSX.Element;
119
119
  };
120
+ tag: {
121
+ Close: import("react/jsx-runtime").JSX.Element;
122
+ };
120
123
  textarea: {
121
124
  Close: import("react/jsx-runtime").JSX.Element;
122
125
  };
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["config.tsx"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsJX,CAAC;AAEF,KAAK,WAAW,CAAC,CAAC,IAAI;KACnB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/B,CAAC;AACF,KAAK,cAAc,GAAG,WAAW,CAAC,OAAO,MAAM,CAAC,CAAC;AAGjD,eAAO,MAAM,QAAQ,cAAe,cAAc,SAYjD,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["config.tsx"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyJX,CAAC;AAEF,KAAK,WAAW,CAAC,CAAC,IAAI;KACnB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/B,CAAC;AACF,KAAK,cAAc,GAAG,WAAW,CAAC,OAAO,MAAM,CAAC,CAAC;AAGjD,eAAO,MAAM,QAAQ,cAAe,cAAc,SAYjD,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -131,6 +131,9 @@ var config = {
131
131
  Next: _icons.default.ArrowRight,
132
132
  CollapseArrow: _icons.default.ArrowLeft
133
133
  },
134
+ tag: {
135
+ Close: _icons.default.Close
136
+ },
134
137
  textarea: {
135
138
  Close: _icons.default.CloseFill
136
139
  },
@@ -92,7 +92,11 @@ var arrowRight = [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
92
92
  clipRule: "evenodd",
93
93
  d: "M10.0625 17.9999C9.67198 18.3904 9.03881 18.3904 8.64829 17.9999C8.25776 17.6094 8.25776 16.9762 8.64829 16.5857L13.2341 11.9999L8.64829 7.41414C8.25776 7.02361 8.25776 6.39045 8.64829 5.99992C9.03881 5.6094 9.67198 5.6094 10.0625 5.99992L15.3554 11.2928C15.7459 11.6833 15.7459 12.3165 15.3554 12.707L10.0625 17.9999Z"
94
94
  }, '1')];
95
- var caretFill = ['M18.2213 9.72149L12.6348 15.2953C12.2444 15.6847 11.6125 15.6847 11.2222 15.2952L5.69827 9.78345C5.30731 9.39335 5.30662 8.76019 5.69671 8.36924C5.88295 8.18259 6.13536 8.07705 6.39902 8.07558L17.5094 8.0136C18.0617 8.01052 18.5119 8.45573 18.515 9.008C18.5165 9.27554 18.4107 9.53253 18.2213 9.72149Z'];
95
+ var caretFill = /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
96
+ fillRule: "evenodd",
97
+ clipRule: "evenodd",
98
+ d: "M18.262 9.92099L12.6754 15.4948C12.2851 15.8842 11.6531 15.8842 11.2628 15.4947L5.73891 9.98295C5.34796 9.59286 5.34727 8.95969 5.73736 8.56874C5.9236 8.3821 6.17601 8.27656 6.43967 8.27508L17.5501 8.2131C18.1024 8.21002 18.5526 8.65523 18.5556 9.2075C18.5571 9.47504 18.4514 9.73203 18.262 9.92099Z"
99
+ });
96
100
  var imageCount = [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
97
101
  fillRule: "evenodd",
98
102
  clipRule: "evenodd",
@@ -1 +1 @@
1
- {"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["modal-content.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAoB9D,QAAA,MAAM,KAAK,UAAW,iBAAiB,mDAgVtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["modal-content.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAoB9D,QAAA,MAAM,KAAK,UAAW,iBAAiB,mDAkVtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -176,6 +176,7 @@ var Modal = function Modal(props) {
176
176
  doc.style.paddingRight = "".concat(window.innerWidth - _hooks.util.docSize.width, "px");
177
177
  }
178
178
  } else {
179
+ if (!context.isMask) return;
179
180
  doc.style.paddingRight = '';
180
181
  doc.style.overflow = '';
181
182
  }
@@ -200,6 +201,7 @@ var Modal = function Modal(props) {
200
201
  hasMask = false;
201
202
  }
202
203
  {
204
+ if (!context.isMask) return;
203
205
  var doc = document.body.parentNode;
204
206
  doc.style.paddingRight = '';
205
207
  doc.style.overflow = '';
@@ -38,9 +38,10 @@ var _default = exports.default = function _default(props) {
38
38
  return col.type === 'expand' || col.type === 'row-expand';
39
39
  });
40
40
  var renderRow = function renderRow(item, index) {
41
+ var _props$rowEvents;
41
42
  var rowIndex = index + currentIndex;
42
43
  var originKey = _hooks.util.getKey(props.keygen, item, rowIndex);
43
- var trRenderKey = props.loader ? originKey : "".concat(originKey, "-").concat(rowIndex);
44
+ var trRenderKey = props.loader || (_props$rowEvents = props.rowEvents) !== null && _props$rowEvents !== void 0 && _props$rowEvents.draggable ? originKey : "".concat(originKey, "-").concat(rowIndex);
44
45
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tr.default, {
45
46
  originKey: originKey,
46
47
  row: rowData[index],
@@ -1 +1 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["tag.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,QAAQ,EAAE,MAAM,YAAY,CAAC;AASlD,QAAA,MAAM,GAAG;YAAW,QAAQ;;CAqI3B,CAAC;AAIF,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["tag.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,QAAQ,EAAE,MAAM,YAAY,CAAC;AAUlD,QAAA,MAAM,GAAG;YAAW,QAAQ;;CAmI3B,CAAC;AAIF,eAAe,GAAG,CAAC"}
package/cjs/tag/tag.js CHANGED
@@ -9,6 +9,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
9
9
  var _useTag2 = _interopRequireDefault(require("./use-tag"));
10
10
  var _hooks = require("@sheinx/hooks");
11
11
  var _tagInput = _interopRequireDefault(require("./tag-input"));
12
+ var _icons = _interopRequireDefault(require("../icons"));
12
13
  var _jsxRuntime = require("react/jsx-runtime");
13
14
  var _excluded = ["jssStyle", "className", "type", "color", "size", "disabled", "mode", "shape", "children", "onClick", "onClose", "style", "backgroundColor", "inlineStyle", "onKeyUp", "onCompleted", "onEnterPress", "closable"];
14
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -117,15 +118,7 @@ var Tag = function Tag(props) {
117
118
  onClick: handleClose,
118
119
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
119
120
  className: tagStyle.closeIconWrapper,
120
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
121
- width: "10",
122
- height: "10",
123
- viewBox: "0 0 10 10",
124
- xmlns: "http://www.w3.org/2000/svg",
125
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
126
- d: "M1.92204 1.33738L1.96129 1.37204L5 4.41042L8.03871 1.37204C8.20142 1.20932 8.46524 1.20932 8.62796 1.37204C8.77816 1.52224 8.78972 1.75859 8.66262 1.92204L8.62796 1.96129L5.58958 5L8.62796 8.03871C8.79068 8.20142 8.79068 8.46524 8.62796 8.62796C8.47776 8.77816 8.24141 8.78972 8.07796 8.66262L8.03871 8.62796L5 5.58958L1.96129 8.62796C1.79858 8.79068 1.53476 8.79068 1.37204 8.62796C1.22184 8.47776 1.21028 8.24141 1.33738 8.07796L1.37204 8.03871L4.41042 5L1.37204 1.96129C1.20932 1.79858 1.20932 1.53476 1.37204 1.37204C1.52224 1.22184 1.75859 1.21028 1.92204 1.33738Z"
127
- })
128
- })
121
+ children: _icons.default.tag.Close
129
122
  })
130
123
  });
131
124
  };
@@ -9,7 +9,7 @@ var FormFlow = function FormFlow(props) {
9
9
  return datum === null || datum === void 0 ? void 0 : datum.get(name);
10
10
  });
11
11
  var memoizedResult = useMemo(function () {
12
- if (!props.strict) return;
12
+ if (!props.strict) return null;
13
13
  if (util.isFunc(props.children)) {
14
14
  return props.children(datum);
15
15
  }
@@ -117,6 +117,9 @@ declare const config: {
117
117
  Next: import("react/jsx-runtime").JSX.Element;
118
118
  CollapseArrow: import("react/jsx-runtime").JSX.Element;
119
119
  };
120
+ tag: {
121
+ Close: import("react/jsx-runtime").JSX.Element;
122
+ };
120
123
  textarea: {
121
124
  Close: import("react/jsx-runtime").JSX.Element;
122
125
  };
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["config.tsx"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsJX,CAAC;AAEF,KAAK,WAAW,CAAC,CAAC,IAAI;KACnB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/B,CAAC;AACF,KAAK,cAAc,GAAG,WAAW,CAAC,OAAO,MAAM,CAAC,CAAC;AAGjD,eAAO,MAAM,QAAQ,cAAe,cAAc,SAYjD,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["config.tsx"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyJX,CAAC;AAEF,KAAK,WAAW,CAAC,CAAC,IAAI;KACnB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/B,CAAC;AACF,KAAK,cAAc,GAAG,WAAW,CAAC,OAAO,MAAM,CAAC,CAAC;AAGjD,eAAO,MAAM,QAAQ,cAAe,cAAc,SAYjD,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -124,6 +124,9 @@ var config = {
124
124
  Next: icons.ArrowRight,
125
125
  CollapseArrow: icons.ArrowLeft
126
126
  },
127
+ tag: {
128
+ Close: icons.Close
129
+ },
127
130
  textarea: {
128
131
  Close: icons.CloseFill
129
132
  },
@@ -86,7 +86,11 @@ var arrowRight = [/*#__PURE__*/_jsx("path", {
86
86
  clipRule: "evenodd",
87
87
  d: "M10.0625 17.9999C9.67198 18.3904 9.03881 18.3904 8.64829 17.9999C8.25776 17.6094 8.25776 16.9762 8.64829 16.5857L13.2341 11.9999L8.64829 7.41414C8.25776 7.02361 8.25776 6.39045 8.64829 5.99992C9.03881 5.6094 9.67198 5.6094 10.0625 5.99992L15.3554 11.2928C15.7459 11.6833 15.7459 12.3165 15.3554 12.707L10.0625 17.9999Z"
88
88
  }, '1')];
89
- var caretFill = ['M18.2213 9.72149L12.6348 15.2953C12.2444 15.6847 11.6125 15.6847 11.2222 15.2952L5.69827 9.78345C5.30731 9.39335 5.30662 8.76019 5.69671 8.36924C5.88295 8.18259 6.13536 8.07705 6.39902 8.07558L17.5094 8.0136C18.0617 8.01052 18.5119 8.45573 18.515 9.008C18.5165 9.27554 18.4107 9.53253 18.2213 9.72149Z'];
89
+ var caretFill = /*#__PURE__*/_jsx("path", {
90
+ fillRule: "evenodd",
91
+ clipRule: "evenodd",
92
+ d: "M18.262 9.92099L12.6754 15.4948C12.2851 15.8842 11.6531 15.8842 11.2628 15.4947L5.73891 9.98295C5.34796 9.59286 5.34727 8.95969 5.73736 8.56874C5.9236 8.3821 6.17601 8.27656 6.43967 8.27508L17.5501 8.2131C18.1024 8.21002 18.5526 8.65523 18.5556 9.2075C18.5571 9.47504 18.4514 9.73203 18.262 9.92099Z"
93
+ });
90
94
  var imageCount = [/*#__PURE__*/_jsx("path", {
91
95
  fillRule: "evenodd",
92
96
  clipRule: "evenodd",
@@ -1 +1 @@
1
- {"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["modal-content.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAoB9D,QAAA,MAAM,KAAK,UAAW,iBAAiB,mDAgVtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["modal-content.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAoB9D,QAAA,MAAM,KAAK,UAAW,iBAAiB,mDAkVtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -170,6 +170,7 @@ var Modal = function Modal(props) {
170
170
  doc.style.paddingRight = "".concat(window.innerWidth - util.docSize.width, "px");
171
171
  }
172
172
  } else {
173
+ if (!context.isMask) return;
173
174
  doc.style.paddingRight = '';
174
175
  doc.style.overflow = '';
175
176
  }
@@ -194,6 +195,7 @@ var Modal = function Modal(props) {
194
195
  hasMask = false;
195
196
  }
196
197
  {
198
+ if (!context.isMask) return;
197
199
  var doc = document.body.parentNode;
198
200
  doc.style.paddingRight = '';
199
201
  doc.style.overflow = '';
@@ -31,9 +31,10 @@ export default (function (props) {
31
31
  return col.type === 'expand' || col.type === 'row-expand';
32
32
  });
33
33
  var renderRow = function renderRow(item, index) {
34
+ var _props$rowEvents;
34
35
  var rowIndex = index + currentIndex;
35
36
  var originKey = util.getKey(props.keygen, item, rowIndex);
36
- var trRenderKey = props.loader ? originKey : "".concat(originKey, "-").concat(rowIndex);
37
+ var trRenderKey = props.loader || (_props$rowEvents = props.rowEvents) !== null && _props$rowEvents !== void 0 && _props$rowEvents.draggable ? originKey : "".concat(originKey, "-").concat(rowIndex);
37
38
  return /*#__PURE__*/_jsx(Tr, {
38
39
  originKey: originKey,
39
40
  row: rowData[index],
@@ -1 +1 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["tag.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,QAAQ,EAAE,MAAM,YAAY,CAAC;AASlD,QAAA,MAAM,GAAG;YAAW,QAAQ;;CAqI3B,CAAC;AAIF,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["tag.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,QAAQ,EAAE,MAAM,YAAY,CAAC;AAUlD,QAAA,MAAM,GAAG;YAAW,QAAQ;;CAmI3B,CAAC;AAIF,eAAe,GAAG,CAAC"}
package/esm/tag/tag.js CHANGED
@@ -11,6 +11,7 @@ import classNames from 'classnames';
11
11
  import useTag from "./use-tag";
12
12
  import { util } from '@sheinx/hooks';
13
13
  import TagInput from "./tag-input";
14
+ import Icons from "../icons";
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
17
  var devUseWarning = util.devUseWarning;
@@ -111,15 +112,7 @@ var Tag = function Tag(props) {
111
112
  onClick: handleClose,
112
113
  children: /*#__PURE__*/_jsx("span", {
113
114
  className: tagStyle.closeIconWrapper,
114
- children: /*#__PURE__*/_jsx("svg", {
115
- width: "10",
116
- height: "10",
117
- viewBox: "0 0 10 10",
118
- xmlns: "http://www.w3.org/2000/svg",
119
- children: /*#__PURE__*/_jsx("path", {
120
- d: "M1.92204 1.33738L1.96129 1.37204L5 4.41042L8.03871 1.37204C8.20142 1.20932 8.46524 1.20932 8.62796 1.37204C8.77816 1.52224 8.78972 1.75859 8.66262 1.92204L8.62796 1.96129L5.58958 5L8.62796 8.03871C8.79068 8.20142 8.79068 8.46524 8.62796 8.62796C8.47776 8.77816 8.24141 8.78972 8.07796 8.66262L8.03871 8.62796L5 5.58958L1.96129 8.62796C1.79858 8.79068 1.53476 8.79068 1.37204 8.62796C1.22184 8.47776 1.21028 8.24141 1.33738 8.07796L1.37204 8.03871L4.41042 5L1.37204 1.96129C1.20932 1.79858 1.20932 1.53476 1.37204 1.37204C1.52224 1.22184 1.75859 1.21028 1.92204 1.33738Z"
121
- })
122
- })
115
+ children: Icons.tag.Close
123
116
  })
124
117
  });
125
118
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.6.3-beta.2",
3
+ "version": "3.6.3-beta.4",
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.6.3-beta.2",
13
+ "@sheinx/hooks": "3.6.3-beta.4",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"