@sheinx/base 3.9.6 → 3.9.7-beta.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.
@@ -1 +1 @@
1
- {"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["tab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;;AAqItC,wBAAqC"}
1
+ {"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["tab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;;AAsItC,wBAAqC"}
package/cjs/tabs/tab.js CHANGED
@@ -91,9 +91,9 @@ var Tab = function Tab(props, _ref) {
91
91
  if (shape === 'card') {
92
92
  style.color = color;
93
93
  }
94
- var containerProps = _objectSpread(_objectSpread({
94
+ var containerProps = _objectSpread(_objectSpread(_objectSpread({
95
95
  className: tabClass
96
- }, getStateProps()), {}, {
96
+ }, getStateProps()), _hooks.util.extractProps(props, "data-attr")), {}, {
97
97
  style: style,
98
98
  onClick: handleClick,
99
99
  ref: _ref,
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-panel.d.ts","sourceRoot":"","sources":["tabs-panel.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,QAAA,MAAM,SAAS,UAAW,cAAc,mDAmEvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"tabs-panel.d.ts","sourceRoot":"","sources":["tabs-panel.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,QAAA,MAAM,SAAS,UAAW,cAAc,mDAoEvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -41,14 +41,14 @@ var TabsPanel = function TabsPanel(props) {
41
41
  var isActive = active === id;
42
42
  var keekAlive = (0, _react.useRef)(false);
43
43
  (0, _react.useLayoutEffect)(function () {
44
- var tabData = {
44
+ var tabData = _objectSpread({
45
45
  id: id,
46
46
  tab: tab,
47
47
  disabled: props.disabled,
48
48
  jssStyle: jssStyle,
49
49
  background: shape !== 'button' && shape !== 'fill' ? background : undefined,
50
50
  color: props.color || (active === id ? color : undefined)
51
- };
51
+ }, _hooks.util.extractProps(props, 'data-attr'));
52
52
  setTabs(function (prev) {
53
53
  var oldTab = prev.find(function (item) {
54
54
  return item.id === id;
@@ -1 +1 @@
1
- {"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["tab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;;AAqItC,wBAAqC"}
1
+ {"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["tab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;;AAsItC,wBAAqC"}
package/esm/tabs/tab.js CHANGED
@@ -86,9 +86,9 @@ var Tab = function Tab(props, _ref) {
86
86
  if (shape === 'card') {
87
87
  style.color = color;
88
88
  }
89
- var containerProps = _objectSpread(_objectSpread({
89
+ var containerProps = _objectSpread(_objectSpread(_objectSpread({
90
90
  className: tabClass
91
- }, getStateProps()), {}, {
91
+ }, getStateProps()), util.extractProps(props, "data-attr")), {}, {
92
92
  style: style,
93
93
  onClick: handleClick,
94
94
  ref: _ref,
@@ -1 +1 @@
1
- {"version":3,"file":"tabs-panel.d.ts","sourceRoot":"","sources":["tabs-panel.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,QAAA,MAAM,SAAS,UAAW,cAAc,mDAmEvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"tabs-panel.d.ts","sourceRoot":"","sources":["tabs-panel.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,QAAA,MAAM,SAAS,UAAW,cAAc,mDAoEvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -12,7 +12,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
12
12
  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); }
13
13
  import classNames from 'classnames';
14
14
  import { useLayoutEffect, useRef } from 'react';
15
- import { useTabsContext } from '@sheinx/hooks';
15
+ import { useTabsContext, util } from '@sheinx/hooks';
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
17
  var TabsPanel = function TabsPanel(props) {
18
18
  var _jssStyle$tabs;
@@ -34,14 +34,14 @@ var TabsPanel = function TabsPanel(props) {
34
34
  var isActive = active === id;
35
35
  var keekAlive = useRef(false);
36
36
  useLayoutEffect(function () {
37
- var tabData = {
37
+ var tabData = _objectSpread({
38
38
  id: id,
39
39
  tab: tab,
40
40
  disabled: props.disabled,
41
41
  jssStyle: jssStyle,
42
42
  background: shape !== 'button' && shape !== 'fill' ? background : undefined,
43
43
  color: props.color || (active === id ? color : undefined)
44
- };
44
+ }, util.extractProps(props, 'data-attr'));
45
45
  setTabs(function (prev) {
46
46
  var oldTab = prev.find(function (item) {
47
47
  return item.id === id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.9.6",
3
+ "version": "3.9.7-beta.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.9.6",
13
+ "@sheinx/hooks": "3.9.7-beta.1",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.3.3"