@sheinx/base 3.3.4 → 3.3.5

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":"day.d.ts","sourceRoot":"","sources":["day.tsx"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,QAAA,MAAM,GAAG,UAAW,QAAQ,gBA8P3B,CAAC;AAEF,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"day.d.ts","sourceRoot":"","sources":["day.tsx"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,QAAA,MAAM,GAAG,UAAW,QAAQ,gBAkQ3B,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -148,12 +148,16 @@ var Day = function Day(props) {
148
148
  className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterRight,
149
149
  children: [props.showSelNow && props.type === 'date' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
150
150
  size: 'small',
151
+ mode: "text",
152
+ type: "primary",
151
153
  jssStyle: jssStyle,
152
154
  className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterBtn,
153
155
  onClick: selNow,
154
156
  children: (0, _config.getLocale)(locale, 'now')
155
157
  }), props.showSelNow && props.type === 'datetime' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
156
158
  size: 'small',
159
+ mode: "text",
160
+ type: "primary",
157
161
  jssStyle: jssStyle,
158
162
  className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterBtn,
159
163
  onClick: selNow,
@@ -1 +1 @@
1
- {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["time.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA6GxC,QAAA,MAAM,IAAI,UAAW,SAAS,gBA6E7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["time.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA6GxC,QAAA,MAAM,IAAI,UAAW,SAAS,gBA+E7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -133,6 +133,8 @@ var Time = function Time(props) {
133
133
  className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterRight,
134
134
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
135
135
  size: 'small',
136
+ mode: "text",
137
+ type: "primary",
136
138
  jssStyle: props.jssStyle,
137
139
  className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterBtn,
138
140
  onClick: selNow,
@@ -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;;CAuP7B,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;;CA6P7B,CAAC;AAIF,eAAe,IAAI,CAAC"}
package/cjs/tabs/tabs.js CHANGED
@@ -31,7 +31,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
31
31
  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; }
32
32
  var isEmpty = _hooks.util.isEmpty,
33
33
  isObject = _hooks.util.isObject,
34
- isNumber = _hooks.util.isNumber;
34
+ isNumber = _hooks.util.isNumber,
35
+ isNamedComponent = _hooks.util.isNamedComponent;
35
36
  var Tabs = function Tabs(props) {
36
37
  var _jssStyle$tabs;
37
38
  var jssStyle = props.jssStyle,
@@ -162,10 +163,13 @@ var Tabs = function Tabs(props) {
162
163
  style: panelStyle,
163
164
  children: _react.Children.toArray(children).map(function (child, index) {
164
165
  var Chlid = child;
165
- return /*#__PURE__*/(0, _react.cloneElement)(Chlid, {
166
- id: Chlid.props.id !== undefined ? Chlid.props.id : index,
167
- active: active
168
- });
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
170
+ });
171
+ }
172
+ return null;
169
173
  })
170
174
  });
171
175
  };
@@ -174,6 +178,7 @@ var Tabs = function Tabs(props) {
174
178
  var border = getSplitColor();
175
179
  _react.Children.toArray(children).forEach(function (child, index) {
176
180
  var Chlid = child;
181
+ if (!Chlid || !Chlid.type) return;
177
182
  var childBorder = Chlid.props.splitColor || Chlid.props.border;
178
183
  var _Chlid$props$id = Chlid.props.id,
179
184
  id = _Chlid$props$id === void 0 ? index : _Chlid$props$id;
@@ -1 +1 @@
1
- {"version":3,"file":"day.d.ts","sourceRoot":"","sources":["day.tsx"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,QAAA,MAAM,GAAG,UAAW,QAAQ,gBA8P3B,CAAC;AAEF,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"day.d.ts","sourceRoot":"","sources":["day.tsx"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,QAAA,MAAM,GAAG,UAAW,QAAQ,gBAkQ3B,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -143,12 +143,16 @@ var Day = function Day(props) {
143
143
  className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterRight,
144
144
  children: [props.showSelNow && props.type === 'date' && /*#__PURE__*/_jsx(Button, {
145
145
  size: 'small',
146
+ mode: "text",
147
+ type: "primary",
146
148
  jssStyle: jssStyle,
147
149
  className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterBtn,
148
150
  onClick: selNow,
149
151
  children: getLocale(locale, 'now')
150
152
  }), props.showSelNow && props.type === 'datetime' && /*#__PURE__*/_jsx(Button, {
151
153
  size: 'small',
154
+ mode: "text",
155
+ type: "primary",
152
156
  jssStyle: jssStyle,
153
157
  className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterBtn,
154
158
  onClick: selNow,
@@ -1 +1 @@
1
- {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["time.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA6GxC,QAAA,MAAM,IAAI,UAAW,SAAS,gBA6E7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["time.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA6GxC,QAAA,MAAM,IAAI,UAAW,SAAS,gBA+E7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -124,6 +124,8 @@ var Time = function Time(props) {
124
124
  className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterRight,
125
125
  children: /*#__PURE__*/_jsx(Button, {
126
126
  size: 'small',
127
+ mode: "text",
128
+ type: "primary",
127
129
  jssStyle: props.jssStyle,
128
130
  className: styles === null || styles === void 0 ? void 0 : styles.pickerFooterBtn,
129
131
  onClick: selNow,
@@ -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;;CAuP7B,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;;CA6P7B,CAAC;AAIF,eAAe,IAAI,CAAC"}
package/esm/tabs/tabs.js CHANGED
@@ -24,7 +24,8 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
24
24
  import { jsxs as _jsxs } from "react/jsx-runtime";
25
25
  var isEmpty = util.isEmpty,
26
26
  isObject = util.isObject,
27
- isNumber = util.isNumber;
27
+ isNumber = util.isNumber,
28
+ isNamedComponent = util.isNamedComponent;
28
29
  var Tabs = function Tabs(props) {
29
30
  var _jssStyle$tabs;
30
31
  var jssStyle = props.jssStyle,
@@ -155,10 +156,13 @@ var Tabs = function Tabs(props) {
155
156
  style: panelStyle,
156
157
  children: Children.toArray(children).map(function (child, index) {
157
158
  var Chlid = child;
158
- return /*#__PURE__*/cloneElement(Chlid, {
159
- id: Chlid.props.id !== undefined ? Chlid.props.id : index,
160
- active: active
161
- });
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
163
+ });
164
+ }
165
+ return null;
162
166
  })
163
167
  });
164
168
  };
@@ -167,6 +171,7 @@ var Tabs = function Tabs(props) {
167
171
  var border = getSplitColor();
168
172
  Children.toArray(children).forEach(function (child, index) {
169
173
  var Chlid = child;
174
+ if (!Chlid || !Chlid.type) return;
170
175
  var childBorder = Chlid.props.splitColor || Chlid.props.border;
171
176
  var _Chlid$props$id = Chlid.props.id,
172
177
  id = _Chlid$props$id === void 0 ? index : _Chlid$props$id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.3.4",
3
+ "version": "3.3.5",
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.4",
13
+ "@sheinx/hooks": "3.3.5",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"