@sheinx/base 3.3.6-beta.6 → 3.3.6-fix.1

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.
@@ -315,8 +315,8 @@ var Cascader = function Cascader(props0) {
315
315
  return;
316
316
  }
317
317
  };
318
- var handleChange = function handleChange(item) {
319
- onChange === null || onChange === void 0 || onChange(item);
318
+ var handleChange = function handleChange(item, selectId) {
319
+ onChange === null || onChange === void 0 || onChange(item, selectId);
320
320
  };
321
321
  var handleClear = function handleClear(e) {
322
322
  e.stopPropagation();
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ReultMoreProps } from './result-more.type';
2
+ import { ResultMoreProps } from './result-more.type';
3
3
  export declare function getResetMore(onFilter: boolean, container: HTMLElement, doms: NodeListOf<HTMLElement>): number;
4
- declare const _default: <DataItem, Value>(props: ReultMoreProps<DataItem, Value>) => JSX.Element;
4
+ declare const _default: <DataItem, Value>(props: ResultMoreProps<DataItem, Value>) => JSX.Element;
5
5
  export default _default;
6
6
  //# sourceMappingURL=result-more.d.ts.map
@@ -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;;AA4FD,wBAAyC"}
1
+ {"version":3,"file":"result-more.d.ts","sourceRoot":"","sources":["result-more.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAKrD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,WAAW,EACtB,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,UA6D9B;;AA4FD,wBAAyC"}
@@ -91,7 +91,7 @@ var More = function More(props) {
91
91
  var before = [];
92
92
  var after = [];
93
93
  var itemsLength = 0;
94
- var tagStlye = shouldShowMore ? {
94
+ var tagStyle = shouldShowMore ? {
95
95
  position: 'absolute',
96
96
  zIndex: -100,
97
97
  userSelect: 'none',
@@ -139,7 +139,7 @@ var More = function More(props) {
139
139
  className: styles.tag,
140
140
  jssStyle: jssStyle,
141
141
  size: size,
142
- style: tagStlye,
142
+ style: tagStyle,
143
143
  mode: visible ? 'fill' : 'bright',
144
144
  color: visible ? 'info' : 'default',
145
145
  children: shouldShowMore ? '+' : "+".concat(itemsLength)
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { SelectProps } from './select.type';
3
- export interface ReultMoreProps<DataItem, Value> extends Pick<SelectProps<DataItem, Value>, 'jssStyle' | 'size' | 'multiple' | 'placeholder' | 'keygen' | 'value' | 'compressed' | 'compressedBound' | 'compressedClassName' | 'disabled' | 'onFilter'> {
3
+ export interface ResultMoreProps<DataItem, Value> extends Pick<SelectProps<DataItem, Value>, 'jssStyle' | 'size' | 'multiple' | 'placeholder' | 'keygen' | 'value' | 'compressed' | 'compressedBound' | 'compressedClassName' | 'disabled' | 'onFilter'> {
4
4
  data: React.ReactNode[];
5
5
  more?: number;
6
6
  showNum?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"result-more.type.d.ts","sourceRoot":"","sources":["result-more.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,cAAc,CAAC,QAAQ,EAAE,KAAK,CAC7C,SAAQ,IAAI,CACV,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,EAC1B,UAAU,GACV,MAAM,GACN,UAAU,GACV,aAAa,GACb,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,iBAAiB,GACjB,qBAAqB,GACrB,UAAU,GACV,UAAU,CACb;IACD,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C"}
1
+ {"version":3,"file":"result-more.type.d.ts","sourceRoot":"","sources":["result-more.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,eAAe,CAAC,QAAQ,EAAE,KAAK,CAC9C,SAAQ,IAAI,CACV,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,EAC1B,UAAU,GACV,MAAM,GACN,UAAU,GACV,aAAa,GACb,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,iBAAiB,GACjB,qBAAqB,GACrB,UAAU,GACV,UAAU,CACb;IACD,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["tabs.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAe,SAAS,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAOnD,QAAA,MAAM,IAAI;YAAW,SAAS;;CA6P7B,CAAC;AAIF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["tabs.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAe,SAAS,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAOnD,QAAA,MAAM,IAAI;YAAW,SAAS;;CA4P7B,CAAC;AAIF,eAAe,IAAI,CAAC"}
package/cjs/tabs/tabs.js CHANGED
@@ -162,11 +162,10 @@ var Tabs = function Tabs(props) {
162
162
  className: tabsStyle.panelWrapper,
163
163
  style: panelStyle,
164
164
  children: _react.Children.toArray(children).map(function (child, index) {
165
- var Chlid = child;
166
- if (isNamedComponent(Chlid.type) && Chlid.type.displayName === 'ShineoutTabsPanel') {
167
- return /*#__PURE__*/(0, _react.cloneElement)(Chlid, {
168
- id: Chlid.props.id !== undefined ? Chlid.props.id : index,
169
- active: active
165
+ var Child = child;
166
+ if (isNamedComponent(Child.type) && Child.type.displayName === 'ShineoutTabsPanel') {
167
+ return /*#__PURE__*/(0, _react.cloneElement)(Child, {
168
+ id: Child.props.id !== undefined ? Child.props.id : index
170
169
  });
171
170
  }
172
171
  return null;
@@ -177,20 +176,20 @@ var Tabs = function Tabs(props) {
177
176
  var tabs = [];
178
177
  var border = getSplitColor();
179
178
  _react.Children.toArray(children).forEach(function (child, index) {
180
- var Chlid = child;
181
- if (!Chlid || !Chlid.type) return;
182
- var childBorder = Chlid.props.splitColor || Chlid.props.border;
183
- var _Chlid$props$id = Chlid.props.id,
184
- id = _Chlid$props$id === void 0 ? index : _Chlid$props$id;
179
+ var Child = child;
180
+ if (!Child || !Child.type) return;
181
+ var childBorder = Child.props.splitColor || Child.props.border;
182
+ var _Child$props$id = Child.props.id,
183
+ id = _Child$props$id === void 0 ? index : _Child$props$id;
185
184
  if (active === id && childBorder) {
186
185
  border = childBorder;
187
186
  }
188
187
  tabs.push({
189
- id: Chlid.props.id !== undefined ? Chlid.props.id : index,
190
- tab: Chlid.props.tab,
191
- disabled: Chlid.props.disabled,
188
+ id: Child.props.id !== undefined ? Child.props.id : index,
189
+ tab: Child.props.tab,
190
+ disabled: Child.props.disabled,
192
191
  jssStyle: jssStyle,
193
- color: Chlid.props.color || (active === id ? color : undefined)
192
+ color: Child.props.color || (active === id ? color : undefined)
194
193
  });
195
194
  });
196
195
  var header = /*#__PURE__*/(0, _jsxRuntime.jsx)(_tabsHeader.default, {
package/cjs/tag/tag.js CHANGED
@@ -20,7 +20,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
20
20
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
21
21
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
22
22
  var Done = 2;
23
- var Pendding = 1;
23
+ var Pending = 1;
24
24
  var Tag = function Tag(props) {
25
25
  var _jssStyle$tag;
26
26
  var jssStyle = props.jssStyle,
@@ -103,7 +103,7 @@ var Tag = function Tag(props) {
103
103
  if (!showClose) {
104
104
  return null;
105
105
  }
106
- if (dismiss === Pendding) {
106
+ if (dismiss === Pending) {
107
107
  // 后面用 Spin 替换
108
108
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {});
109
109
  }
@@ -14,7 +14,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
14
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
15
  var Done = 2;
16
16
  var Finish = 0;
17
- var Pendding = 1;
17
+ var Pending = 1;
18
18
  var isEmpty = _hooks.util.isEmpty,
19
19
  isPromise = _hooks.util.isPromise,
20
20
  isString = _hooks.util.isString,
@@ -65,7 +65,7 @@ var useTag = function useTag(props) {
65
65
  if (typeof onClose === 'function') {
66
66
  callback = onClose(e);
67
67
  if (isPromise(callback)) {
68
- setDismiss(Pendding);
68
+ setDismiss(Pending);
69
69
  callback.then(function () {
70
70
  setDismiss(Done);
71
71
  }).catch(function () {
@@ -308,8 +308,8 @@ var Cascader = function Cascader(props0) {
308
308
  return;
309
309
  }
310
310
  };
311
- var handleChange = function handleChange(item) {
312
- onChange === null || onChange === void 0 || onChange(item);
311
+ var handleChange = function handleChange(item, selectId) {
312
+ onChange === null || onChange === void 0 || onChange(item, selectId);
313
313
  };
314
314
  var handleClear = function handleClear(e) {
315
315
  e.stopPropagation();
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ReultMoreProps } from './result-more.type';
2
+ import { ResultMoreProps } from './result-more.type';
3
3
  export declare function getResetMore(onFilter: boolean, container: HTMLElement, doms: NodeListOf<HTMLElement>): number;
4
- declare const _default: <DataItem, Value>(props: ReultMoreProps<DataItem, Value>) => JSX.Element;
4
+ declare const _default: <DataItem, Value>(props: ResultMoreProps<DataItem, Value>) => JSX.Element;
5
5
  export default _default;
6
6
  //# sourceMappingURL=result-more.d.ts.map
@@ -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;;AA4FD,wBAAyC"}
1
+ {"version":3,"file":"result-more.d.ts","sourceRoot":"","sources":["result-more.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAKrD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,WAAW,EACtB,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,UA6D9B;;AA4FD,wBAAyC"}
@@ -81,7 +81,7 @@ var More = function More(props) {
81
81
  var before = [];
82
82
  var after = [];
83
83
  var itemsLength = 0;
84
- var tagStlye = shouldShowMore ? {
84
+ var tagStyle = shouldShowMore ? {
85
85
  position: 'absolute',
86
86
  zIndex: -100,
87
87
  userSelect: 'none',
@@ -129,7 +129,7 @@ var More = function More(props) {
129
129
  className: styles.tag,
130
130
  jssStyle: jssStyle,
131
131
  size: size,
132
- style: tagStlye,
132
+ style: tagStyle,
133
133
  mode: visible ? 'fill' : 'bright',
134
134
  color: visible ? 'info' : 'default',
135
135
  children: shouldShowMore ? '+' : "+".concat(itemsLength)
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { SelectProps } from './select.type';
3
- export interface ReultMoreProps<DataItem, Value> extends Pick<SelectProps<DataItem, Value>, 'jssStyle' | 'size' | 'multiple' | 'placeholder' | 'keygen' | 'value' | 'compressed' | 'compressedBound' | 'compressedClassName' | 'disabled' | 'onFilter'> {
3
+ export interface ResultMoreProps<DataItem, Value> extends Pick<SelectProps<DataItem, Value>, 'jssStyle' | 'size' | 'multiple' | 'placeholder' | 'keygen' | 'value' | 'compressed' | 'compressedBound' | 'compressedClassName' | 'disabled' | 'onFilter'> {
4
4
  data: React.ReactNode[];
5
5
  more?: number;
6
6
  showNum?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"result-more.type.d.ts","sourceRoot":"","sources":["result-more.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,cAAc,CAAC,QAAQ,EAAE,KAAK,CAC7C,SAAQ,IAAI,CACV,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,EAC1B,UAAU,GACV,MAAM,GACN,UAAU,GACV,aAAa,GACb,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,iBAAiB,GACjB,qBAAqB,GACrB,UAAU,GACV,UAAU,CACb;IACD,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C"}
1
+ {"version":3,"file":"result-more.type.d.ts","sourceRoot":"","sources":["result-more.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,eAAe,CAAC,QAAQ,EAAE,KAAK,CAC9C,SAAQ,IAAI,CACV,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,EAC1B,UAAU,GACV,MAAM,GACN,UAAU,GACV,aAAa,GACb,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,iBAAiB,GACjB,qBAAqB,GACrB,UAAU,GACV,UAAU,CACb;IACD,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["tabs.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAe,SAAS,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAOnD,QAAA,MAAM,IAAI;YAAW,SAAS;;CA6P7B,CAAC;AAIF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["tabs.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAe,SAAS,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAOnD,QAAA,MAAM,IAAI;YAAW,SAAS;;CA4P7B,CAAC;AAIF,eAAe,IAAI,CAAC"}
package/esm/tabs/tabs.js CHANGED
@@ -155,11 +155,10 @@ var Tabs = function Tabs(props) {
155
155
  className: tabsStyle.panelWrapper,
156
156
  style: panelStyle,
157
157
  children: Children.toArray(children).map(function (child, index) {
158
- var Chlid = child;
159
- if (isNamedComponent(Chlid.type) && Chlid.type.displayName === 'ShineoutTabsPanel') {
160
- return /*#__PURE__*/cloneElement(Chlid, {
161
- id: Chlid.props.id !== undefined ? Chlid.props.id : index,
162
- active: active
158
+ var Child = child;
159
+ if (isNamedComponent(Child.type) && Child.type.displayName === 'ShineoutTabsPanel') {
160
+ return /*#__PURE__*/cloneElement(Child, {
161
+ id: Child.props.id !== undefined ? Child.props.id : index
163
162
  });
164
163
  }
165
164
  return null;
@@ -170,20 +169,20 @@ var Tabs = function Tabs(props) {
170
169
  var tabs = [];
171
170
  var border = getSplitColor();
172
171
  Children.toArray(children).forEach(function (child, index) {
173
- var Chlid = child;
174
- if (!Chlid || !Chlid.type) return;
175
- var childBorder = Chlid.props.splitColor || Chlid.props.border;
176
- var _Chlid$props$id = Chlid.props.id,
177
- id = _Chlid$props$id === void 0 ? index : _Chlid$props$id;
172
+ var Child = child;
173
+ if (!Child || !Child.type) return;
174
+ var childBorder = Child.props.splitColor || Child.props.border;
175
+ var _Child$props$id = Child.props.id,
176
+ id = _Child$props$id === void 0 ? index : _Child$props$id;
178
177
  if (active === id && childBorder) {
179
178
  border = childBorder;
180
179
  }
181
180
  tabs.push({
182
- id: Chlid.props.id !== undefined ? Chlid.props.id : index,
183
- tab: Chlid.props.tab,
184
- disabled: Chlid.props.disabled,
181
+ id: Child.props.id !== undefined ? Child.props.id : index,
182
+ tab: Child.props.tab,
183
+ disabled: Child.props.disabled,
185
184
  jssStyle: jssStyle,
186
- color: Chlid.props.color || (active === id ? color : undefined)
185
+ color: Child.props.color || (active === id ? color : undefined)
187
186
  });
188
187
  });
189
188
  var header = /*#__PURE__*/_jsx(TabsHeader, {
package/esm/tag/tag.js CHANGED
@@ -14,7 +14,7 @@ import TagInput from "./tag-input";
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
15
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
16
  var Done = 2;
17
- var Pendding = 1;
17
+ var Pending = 1;
18
18
  var Tag = function Tag(props) {
19
19
  var _jssStyle$tag;
20
20
  var jssStyle = props.jssStyle,
@@ -97,7 +97,7 @@ var Tag = function Tag(props) {
97
97
  if (!showClose) {
98
98
  return null;
99
99
  }
100
- if (dismiss === Pendding) {
100
+ if (dismiss === Pending) {
101
101
  // 后面用 Spin 替换
102
102
  return /*#__PURE__*/_jsx("span", {});
103
103
  }
@@ -8,7 +8,7 @@ import { util } from '@sheinx/hooks';
8
8
  import { useState, useEffect } from 'react';
9
9
  var Done = 2;
10
10
  var Finish = 0;
11
- var Pendding = 1;
11
+ var Pending = 1;
12
12
  var isEmpty = util.isEmpty,
13
13
  isPromise = util.isPromise,
14
14
  isString = util.isString,
@@ -59,7 +59,7 @@ var useTag = function useTag(props) {
59
59
  if (typeof onClose === 'function') {
60
60
  callback = onClose(e);
61
61
  if (isPromise(callback)) {
62
- setDismiss(Pendding);
62
+ setDismiss(Pending);
63
63
  callback.then(function () {
64
64
  setDismiss(Done);
65
65
  }).catch(function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.3.6-beta.6",
3
+ "version": "3.3.6-fix.1",
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.3.6-beta.6",
13
+ "@sheinx/hooks": "3.3.6-fix.1",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"