@nutui/nutui-react 2.0.0-alpha.0 → 2.0.0-alpha.10

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.
Files changed (126) hide show
  1. package/CHANGELOG.md +137 -638
  2. package/dist/esm/Address.js +1 -1
  3. package/dist/esm/Animate.js +6 -7
  4. package/dist/esm/Audio.js +28 -27
  5. package/dist/esm/Avatar.js +30 -25
  6. package/dist/esm/AvatarGroup.js +10 -15
  7. package/dist/esm/Badge.js +4 -73
  8. package/dist/esm/CalendarItem.js +2 -12
  9. package/dist/esm/Cascader.js +67 -69
  10. package/dist/esm/Checkbox.js +1 -2
  11. package/dist/esm/CheckboxGroup.js +18 -20
  12. package/dist/esm/CircleProgress.js +20 -25
  13. package/dist/esm/Col.js +4 -3
  14. package/dist/esm/DatePicker.js +10 -10
  15. package/dist/esm/Dialog.js +162 -171
  16. package/dist/esm/Divider.js +4 -3
  17. package/dist/esm/Drag.js +7 -9
  18. package/dist/esm/Elevator.js +39 -41
  19. package/dist/esm/Ellipsis.js +13 -12
  20. package/dist/esm/Empty.js +18 -26
  21. package/dist/esm/Image.js +5 -10
  22. package/dist/esm/ImagePreview.js +67 -58
  23. package/dist/esm/Indicator.js +4 -4
  24. package/dist/esm/Input.js +87 -193
  25. package/dist/esm/Menu.js +75 -73
  26. package/dist/esm/MenuItem.js +29 -27
  27. package/dist/esm/NavBar.js +17 -48
  28. package/dist/esm/NoticeBar.js +50 -87
  29. package/dist/esm/Notify.js +35 -46
  30. package/dist/esm/NumberKeyboard.js +137 -195
  31. package/dist/esm/Picker.js +175 -160
  32. package/dist/esm/Popup.js +24 -33
  33. package/dist/esm/Price.js +22 -23
  34. package/dist/esm/Progress.js +74 -67
  35. package/dist/esm/PullToRefresh.js +8 -8
  36. package/dist/esm/Radio.js +2 -0
  37. package/dist/esm/RadioGroup.js +31 -51
  38. package/dist/esm/Range/style/index.js +1 -1
  39. package/dist/esm/Range.js +119 -174
  40. package/dist/esm/Row.js +6 -5
  41. package/dist/esm/SideNavBar.js +0 -2
  42. package/dist/esm/Skeleton.js +1 -1
  43. package/dist/esm/Step.js +23 -28
  44. package/dist/esm/Steps/style/index.js +1 -1
  45. package/dist/esm/Steps.js +10 -11
  46. package/dist/esm/Swipe.js +4 -10
  47. package/dist/esm/Swiper.js +86 -91
  48. package/dist/esm/SwiperItem.js +1 -1
  49. package/dist/esm/Switch.js +16 -30
  50. package/dist/esm/TabPane.js +39 -5
  51. package/dist/esm/Tabbar/style/index.js +1 -1
  52. package/dist/esm/Tabbar.js +29 -33
  53. package/dist/esm/TabbarItem.js +5 -75
  54. package/dist/esm/Table.js +20 -34
  55. package/dist/esm/Tabs.js +2 -2
  56. package/dist/esm/TextArea.js +53 -81
  57. package/dist/esm/Uploader.js +49 -52
  58. package/dist/esm/badge2.js +69 -0
  59. package/dist/esm/cellgroup2.js +5 -4
  60. package/dist/esm/checkbox2.js +34 -47
  61. package/dist/esm/nutui-react.es.js +170 -170
  62. package/dist/esm/overlay2.js +12 -14
  63. package/dist/esm/radio2.js +52 -54
  64. package/dist/esm/raf.js +16 -0
  65. package/dist/esm/tabbaritem2.js +61 -0
  66. package/dist/esm/tabs2.js +126 -95
  67. package/dist/locales/base.js +1 -1
  68. package/dist/locales/en-US.js +1 -1
  69. package/dist/locales/id-ID.js +1 -1
  70. package/dist/locales/zh-CN.js +1 -1
  71. package/dist/locales/zh-TW.js +1 -1
  72. package/dist/locales/zh-UG.js +1 -1
  73. package/dist/nutui.react.mjs +23562 -24489
  74. package/dist/nutui.react.umd.js +23560 -24487
  75. package/dist/packages/audio/audio.scss +2 -15
  76. package/dist/packages/badge/badge.scss +8 -18
  77. package/dist/packages/calendar/calendar.scss +0 -30
  78. package/dist/packages/cascader/cascader.scss +0 -26
  79. package/dist/packages/cellgroup/cellgroup.scss +20 -16
  80. package/dist/packages/checkbox/checkbox.scss +8 -11
  81. package/dist/packages/circleprogress/circleprogress.scss +0 -9
  82. package/dist/packages/dialog/dialog.scss +36 -65
  83. package/dist/packages/elevator/elevator.scss +2 -28
  84. package/dist/packages/empty/empty.scss +0 -9
  85. package/dist/packages/imagepreview/imagepreview.scss +52 -16
  86. package/dist/packages/input/input.scss +13 -180
  87. package/dist/packages/menu/menu.scss +44 -55
  88. package/dist/packages/menuitem/menuitem.scss +16 -26
  89. package/dist/packages/navbar/navbar.scss +16 -115
  90. package/dist/packages/noticebar/noticebar.scss +18 -19
  91. package/dist/packages/notify/notify.scss +1 -1
  92. package/dist/packages/numberkeyboard/numberkeyboard.scss +29 -77
  93. package/dist/packages/overlay/overlay.scss +11 -4
  94. package/dist/packages/picker/picker.scss +66 -137
  95. package/dist/packages/popup/popup.scss +0 -16
  96. package/dist/packages/price/price.scss +8 -0
  97. package/dist/packages/progress/progress.scss +19 -58
  98. package/dist/packages/pulltorefresh/pulltorefresh.scss +0 -8
  99. package/dist/packages/radio/radio.scss +13 -32
  100. package/dist/packages/radiogroup/radiogroup.scss +17 -51
  101. package/dist/packages/range/range.scss +24 -49
  102. package/dist/packages/row/row.scss +13 -31
  103. package/dist/packages/sidenavbar/sidenavbar.scss +0 -19
  104. package/dist/packages/step/step.scss +9 -62
  105. package/dist/packages/steps/steps.scss +2 -0
  106. package/dist/packages/swiper/swiper.scss +3 -18
  107. package/dist/packages/switch/switch.scss +13 -31
  108. package/dist/packages/tabbar/tabbar.scss +16 -22
  109. package/dist/packages/tabbaritem/tabbaritem.scss +9 -70
  110. package/dist/packages/table/table.scss +0 -56
  111. package/dist/packages/tabs/tabs.scss +196 -225
  112. package/dist/packages/textarea/textarea.scss +5 -12
  113. package/dist/packages/uploader/uploader.scss +2 -28
  114. package/dist/style.css +1 -1
  115. package/dist/style.mjs +1 -1
  116. package/dist/styles/themes/default.scss +17 -18
  117. package/dist/styles/variables-jmapp.scss +120 -240
  118. package/dist/styles/variables.scss +139 -252
  119. package/dist/types/index.d.ts +565 -708
  120. package/package.json +2 -2
  121. package/dist/esm/Icon.js +0 -83
  122. package/dist/esm/tabpane2.js +0 -44
  123. package/dist/packages/icon/icon.scss +0 -0
  124. /package/dist/esm/{AvatarContext.js → context.js} +0 -0
  125. /package/dist/esm/{UserContext2.js → context2.js} +0 -0
  126. /package/dist/esm/{UserContext3.js → context3.js} +0 -0
@@ -0,0 +1,61 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ var _excluded = ["className", "style", "title", "icon", "active", "activeColor", "inactiveColor", "index", "handleClick"];
4
+ function ownKeys(object, enumerableOnly) {
5
+ var keys = Object.keys(object);
6
+ if (Object.getOwnPropertySymbols) {
7
+ var symbols = Object.getOwnPropertySymbols(object);
8
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
9
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
10
+ })), keys.push.apply(keys, symbols);
11
+ }
12
+ return keys;
13
+ }
14
+ function _objectSpread(target) {
15
+ for (var i = 1; i < arguments.length; i++) {
16
+ var source = null != arguments[i] ? arguments[i] : {};
17
+ i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
18
+ _defineProperty(target, key, source[key]);
19
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
20
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
21
+ });
22
+ }
23
+ return target;
24
+ }
25
+ import React__default from "react";
26
+ import classNames from "classnames";
27
+ import { C as ComponentDefaults } from "./typings.js";
28
+ import { B as Badge } from "./badge2.js";
29
+ var defaultProps = _objectSpread(_objectSpread({}, ComponentDefaults), {}, {
30
+ title: "",
31
+ icon: null,
32
+ active: false,
33
+ index: 0,
34
+ handleClick: function handleClick(idx) {
35
+ }
36
+ });
37
+ var TabbarItem = function TabbarItem2(props) {
38
+ var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props), className = _defaultProps$props.className, style = _defaultProps$props.style, title = _defaultProps$props.title, icon = _defaultProps$props.icon, active = _defaultProps$props.active, activeColor = _defaultProps$props.activeColor, inactiveColor = _defaultProps$props.inactiveColor, index = _defaultProps$props.index, handleClick2 = _defaultProps$props.handleClick, rest = _objectWithoutProperties(_defaultProps$props, _excluded);
39
+ var classPrefix = "nut-tabbar-item";
40
+ var tabbarItemClass = classNames(className, classPrefix, _defineProperty({}, "".concat(classPrefix, "-active"), active));
41
+ var boxPrefix = "".concat(classPrefix, "__icon-box");
42
+ var titleClass = classNames(boxPrefix, "".concat(boxPrefix, "-nav"), _defineProperty({}, "".concat(boxPrefix, "-large"), !icon));
43
+ return React__default.createElement("div", {
44
+ className: tabbarItemClass,
45
+ style: _objectSpread({
46
+ color: active ? activeColor : inactiveColor
47
+ }, style),
48
+ onClick: function onClick() {
49
+ return handleClick2(index);
50
+ }
51
+ }, icon ? React__default.createElement(React__default.Fragment, null, React__default.createElement(Badge, _objectSpread({}, rest), React__default.createElement("div", {
52
+ className: boxPrefix
53
+ }, icon)), React__default.createElement("div", {
54
+ className: titleClass
55
+ }, title)) : React__default.createElement(Badge, _objectSpread({}, rest), React__default.createElement("div", {
56
+ className: titleClass
57
+ }, title)));
58
+ };
59
+ export {
60
+ TabbarItem as T
61
+ };
package/dist/esm/tabs2.js CHANGED
@@ -1,9 +1,7 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- import _createClass from "@babel/runtime/helpers/createClass";
4
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
5
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
6
- var _excluded = ["value", "color", "tabStyle", "background", "direction", "type", "titleScroll", "ellipsis", "animatedTime", "titleGutter", "size", "leftAlign", "titleNode", "children", "onClick", "onChange", "className", "autoHeight"];
3
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
+ var _excluded = ["activeColor", "tabStyle", "direction", "activeType", "duration", "align", "title", "children", "onClick", "onChange", "className", "autoHeight"];
7
5
  function ownKeys(object, enumerableOnly) {
8
6
  var keys = Object.keys(object);
9
7
  if (Object.getOwnPropertySymbols) {
@@ -28,138 +26,171 @@ function _objectSpread(target) {
28
26
  import React__default, { useState, useRef, useEffect } from "react";
29
27
  import classNames from "classnames";
30
28
  import { JoySmile } from "@nutui/icons-react";
31
- import { c as cn } from "./bem.js";
32
29
  import { C as ComponentDefaults } from "./typings.js";
33
30
  import TabPane from "./TabPane.js";
34
- var Title = /* @__PURE__ */ _createClass(
35
- // eslint-disable-next-line no-useless-constructor
36
- function Title2() {
37
- _classCallCheck(this, Title2);
38
- _defineProperty(this, "title", "");
39
- _defineProperty(this, "paneKey", "");
40
- _defineProperty(this, "disabled", false);
41
- _defineProperty(this, "index", 0);
42
- }
43
- );
31
+ import { r as requestAniFrame } from "./raf.js";
32
+ import { u as usePropsValue } from "./use-props-value.js";
33
+ function useForceUpdate() {
34
+ var _React__default$useSt = React__default.useState(), _React__default$useSt2 = _slicedToArray(_React__default$useSt, 2), updateState = _React__default$useSt2[1];
35
+ return React__default.useCallback(function() {
36
+ return updateState({});
37
+ }, []);
38
+ }
44
39
  var defaultProps = _objectSpread(_objectSpread({}, ComponentDefaults), {}, {
45
40
  tabStyle: {},
46
- value: 0,
47
- color: "",
48
- background: "",
41
+ activeColor: "",
49
42
  direction: "horizontal",
50
- type: "line",
51
- titleScroll: false,
52
- ellipsis: true,
53
- animatedTime: 300,
54
- titleGutter: 0,
55
- size: "normal",
56
- leftAlign: false,
43
+ activeType: "line",
44
+ duration: 300,
57
45
  autoHeight: false
58
46
  });
59
- var pxCheck = function pxCheck2(value) {
60
- return Number.isNaN(Number(value)) ? String(value) : "".concat(value, "px");
61
- };
47
+ var classPrefix = "nut-tabs";
62
48
  var Tabs = function Tabs2(props) {
63
49
  var _classNames;
64
- var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props), value = _defaultProps$props.value, color = _defaultProps$props.color, tabStyle = _defaultProps$props.tabStyle, background = _defaultProps$props.background, direction = _defaultProps$props.direction, type = _defaultProps$props.type, titleScroll = _defaultProps$props.titleScroll, ellipsis = _defaultProps$props.ellipsis, animatedTime = _defaultProps$props.animatedTime, titleGutter = _defaultProps$props.titleGutter, size = _defaultProps$props.size, leftAlign = _defaultProps$props.leftAlign, titleNode = _defaultProps$props.titleNode, children = _defaultProps$props.children, onClick = _defaultProps$props.onClick, onChange = _defaultProps$props.onChange, className = _defaultProps$props.className, autoHeight = _defaultProps$props.autoHeight, rest = _objectWithoutProperties(_defaultProps$props, _excluded);
65
- var _useState = useState({
66
- index: 0
67
- }), _useState2 = _slicedToArray(_useState, 2), currentItem = _useState2[0], setCurrentItem = _useState2[1];
68
- var titles = useRef([]);
69
- useEffect(function() {
70
- var currentIndex = 0;
71
- titles.current = [];
72
- React__default.Children.forEach(children, function(child, idx) {
73
- if (!React__default.isValidElement(child)) {
74
- return null;
50
+ var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props), activeColor = _defaultProps$props.activeColor, tabStyle = _defaultProps$props.tabStyle, direction = _defaultProps$props.direction, activeType = _defaultProps$props.activeType, duration = _defaultProps$props.duration, align = _defaultProps$props.align, title = _defaultProps$props.title, children = _defaultProps$props.children, onClick = _defaultProps$props.onClick, onChange = _defaultProps$props.onChange, className = _defaultProps$props.className, autoHeight = _defaultProps$props.autoHeight, rest = _objectWithoutProperties(_defaultProps$props, _excluded);
51
+ var _usePropsValue = usePropsValue({
52
+ value: props.value,
53
+ defaultValue: props.defaultValue,
54
+ finalValue: 0,
55
+ onChange
56
+ }), _usePropsValue2 = _slicedToArray(_usePropsValue, 2), value = _usePropsValue2[0], setValue = _usePropsValue2[1];
57
+ var _useState = useState({}), _useState2 = _slicedToArray(_useState, 2), contentStyle = _useState2[0], setContentStyle = _useState2[1];
58
+ var titleItemsRef = useRef([]);
59
+ var navRef = useRef(null);
60
+ var scrollDirection = function scrollDirection2(nav, to, duration2, direction2) {
61
+ var count = 0;
62
+ var from = direction2 === "horizontal" ? nav.scrollLeft : nav.scrollTop;
63
+ var frames = duration2 === 0 ? 1 : Math.round(duration2 * 1e3 / 16);
64
+ function animate() {
65
+ if (direction2 === "horizontal") {
66
+ nav.scrollLeft += (to - from) / frames;
67
+ } else {
68
+ nav.scrollTop += (to - from) / frames;
75
69
  }
76
- var title = new Title();
77
- var childProps = child === null || child === void 0 ? void 0 : child.props;
78
- if (childProps !== null && childProps !== void 0 && childProps.title || childProps !== null && childProps !== void 0 && childProps.paneKey) {
79
- title.title = childProps === null || childProps === void 0 ? void 0 : childProps.title;
80
- title.paneKey = (childProps === null || childProps === void 0 ? void 0 : childProps.paneKey) || idx;
81
- title.disabled = childProps === null || childProps === void 0 ? void 0 : childProps.disabled;
82
- title.index = idx;
83
- if (title.paneKey === value) {
84
- currentIndex = idx;
70
+ if (++count < frames) {
71
+ requestAniFrame(animate);
72
+ }
73
+ }
74
+ animate();
75
+ };
76
+ var scrollIntoView = function scrollIntoView2(index, immediate) {
77
+ var nav = navRef.current;
78
+ var titleItem = titleItemsRef.current;
79
+ if (!nav || !titleItem || !titleItem[index]) {
80
+ return;
81
+ }
82
+ var title2 = titleItem[index];
83
+ var to = 0;
84
+ if (props.direction === "vertical") {
85
+ var runTop = title2.offsetTop - nav.offsetTop + 10;
86
+ to = runTop - (nav.offsetHeight - title2.offsetHeight) / 2;
87
+ } else {
88
+ to = title2.offsetLeft - (nav.offsetWidth - title2.offsetWidth) / 2;
89
+ }
90
+ scrollDirection(nav, to, immediate ? 0 : 0.3, props.direction);
91
+ };
92
+ var getTitles = function getTitles2() {
93
+ var titles2 = [];
94
+ React__default.Children.forEach(children, function(child, idx) {
95
+ if (React__default.isValidElement(child)) {
96
+ var props2 = child === null || child === void 0 ? void 0 : child.props;
97
+ if (props2 !== null && props2 !== void 0 && props2.title || props2 !== null && props2 !== void 0 && props2.value) {
98
+ titles2.push({
99
+ title: props2.title,
100
+ value: props2.value || idx,
101
+ disabled: props2.disabled
102
+ });
85
103
  }
86
104
  }
87
- titles.current.push(title);
88
105
  });
89
- setCurrentItem(titles.current[currentIndex]);
90
- }, [children]);
91
- var b = cn("tabs");
92
- var classes = classNames(direction, b(""), className);
93
- var classesTitle = classNames((_classNames = {}, _defineProperty(_classNames, type, type), _defineProperty(_classNames, "scrollable", titleScroll), _defineProperty(_classNames, size, size), _classNames), "".concat(b(""), "__titles"));
94
- var titleStyle = {
95
- marginLeft: pxCheck(titleGutter),
96
- marginRight: pxCheck(titleGutter)
106
+ return titles2;
97
107
  };
108
+ var titles = useRef(getTitles());
109
+ var forceUpdate = useForceUpdate();
110
+ useEffect(function() {
111
+ titles.current = getTitles();
112
+ var current = "";
113
+ titles.current.forEach(function(title2) {
114
+ if (title2.value == value) {
115
+ current = value;
116
+ }
117
+ });
118
+ if (current !== "" && current !== value) {
119
+ setValue(current);
120
+ } else {
121
+ forceUpdate();
122
+ }
123
+ }, [children]);
124
+ var classes = classNames(classPrefix, "".concat(classPrefix, "--").concat(direction), className);
125
+ var classesTitle = classNames("".concat(classPrefix, "__titles"), (_classNames = {}, _defineProperty(_classNames, "".concat(classPrefix, "__titles--").concat(activeType), activeType), _defineProperty(_classNames, "".concat(classPrefix, "__titles--scrollable"), true), _defineProperty(_classNames, "".concat(classPrefix, "__titles--").concat(align), align), _classNames));
98
126
  var tabsActiveStyle = {
99
- color: type === "smile" ? color : "",
100
- background: type === "line" ? color : ""
127
+ color: activeType === "smile" ? activeColor : "",
128
+ background: activeType === "line" ? activeColor : ""
101
129
  };
102
- var index = titles.current.findIndex(function(t) {
103
- return t.paneKey === value;
104
- });
105
- var contentStyle = {
106
- transform: direction === "horizontal" ? "translate3d(-".concat(index * 100, "%, 0, 0)") : "translate3d( 0,-".concat(index * 100, "%, 0)"),
107
- transitionDuration: "".concat(animatedTime, "ms")
108
- };
109
- var tabChange = function tabChange2(item, index2) {
110
- onClick && onClick(item);
130
+ useEffect(function() {
131
+ var index = titles.current.findIndex(function(t) {
132
+ return t.value == value;
133
+ });
134
+ setContentStyle({
135
+ transform: direction === "horizontal" ? "translate3d(-".concat(index * 100, "%, 0, 0)") : "translate3d( 0,-".concat(index * 100, "%, 0)"),
136
+ transitionDuration: "".concat(duration, "ms")
137
+ });
138
+ setTimeout(function() {
139
+ scrollIntoView(index);
140
+ });
141
+ }, [value]);
142
+ var tabChange = function tabChange2(item) {
143
+ onClick && onClick(item.value);
111
144
  if (item.disabled) {
112
145
  return;
113
146
  }
114
- setCurrentItem(item);
115
- onChange && onChange(item);
147
+ setValue(item.value);
116
148
  };
117
149
  return React__default.createElement("div", _objectSpread({
118
150
  className: classes
119
151
  }, rest), React__default.createElement("div", {
120
152
  className: classesTitle,
121
- style: _objectSpread(_objectSpread({}, tabStyle), {}, {
122
- background
123
- })
124
- }, !!titleNode && typeof titleNode === "function" ? titleNode() : titles.current.map(function(item, index2) {
153
+ style: _objectSpread({}, tabStyle),
154
+ ref: navRef
155
+ }, !!title && typeof title === "function" ? title() : titles.current.map(function(item) {
156
+ var _classNames2;
125
157
  return React__default.createElement("div", {
126
- style: titleStyle,
127
- onClick: function onClick2(e) {
128
- return tabChange(item);
158
+ onClick: function onClick2() {
159
+ tabChange(item);
129
160
  },
130
- className: classNames({
131
- active: !item.disabled && String(item.paneKey) === String(value),
132
- disabled: item.disabled,
133
- "nut-tabs__titles-item-left-align": leftAlign
134
- }, "".concat(b(""), "__titles-item")),
135
- key: item.paneKey
136
- }, type === "line" && React__default.createElement("div", {
137
- className: "".concat(b(""), "__titles-item__line"),
161
+ className: classNames("".concat(classPrefix, "__titles-item"), (_classNames2 = {}, _defineProperty(_classNames2, "nut-tabs__titles-item--active", !item.disabled && String(item.value) === String(value)), _defineProperty(_classNames2, "nut-tabs__titles-item--disabled", item.disabled), _defineProperty(_classNames2, "nut-tabs__titles-item--".concat(align), align), _classNames2)),
162
+ ref: function ref(_ref) {
163
+ return titleItemsRef.current.push(_ref);
164
+ },
165
+ key: item.value
166
+ }, activeType === "line" && React__default.createElement("div", {
167
+ className: "".concat(classPrefix, "__titles-item__line"),
138
168
  style: tabsActiveStyle
139
- }), type === "smile" && React__default.createElement("div", {
140
- className: "".concat(b(""), "__titles-item__smile"),
169
+ }), activeType === "smile" && React__default.createElement("div", {
170
+ className: "".concat(classPrefix, "__titles-item__smile"),
141
171
  style: tabsActiveStyle
142
172
  }, React__default.createElement(JoySmile, {
143
- color
173
+ color: activeColor,
174
+ width: 40,
175
+ height: 20
144
176
  })), React__default.createElement("div", {
145
177
  className: classNames({
146
- ellipsis: ellipsis && !titleScroll && direction === "horizontal"
147
- }, "".concat(b(""), "__titles-item__text"))
178
+ ellipsis: true
179
+ }, "".concat(classPrefix, "__titles-item__text"))
148
180
  }, item.title));
149
181
  })), React__default.createElement("div", {
150
- className: "".concat(b(""), "__content__wrap")
182
+ className: "".concat(classPrefix, "__content__wrap")
151
183
  }, React__default.createElement("div", {
152
- className: "".concat(b(""), "__content"),
184
+ className: "".concat(classPrefix, "__content"),
153
185
  style: contentStyle
154
186
  }, React__default.Children.map(children, function(child, idx) {
155
- var _child$props;
156
187
  if (!React__default.isValidElement(child)) {
157
188
  return null;
158
189
  }
159
190
  var childProps = _objectSpread(_objectSpread({}, child.props), {}, {
160
- activeKey: value
191
+ active: value === child.props.value
161
192
  });
162
- if (String(value) !== String(((_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.paneKey) || idx) && autoHeight) {
193
+ if (String(value) !== String(child.props.value || idx) && autoHeight) {
163
194
  childProps = _objectSpread(_objectSpread({}, childProps), {}, {
164
195
  autoHeightClassName: "inactive"
165
196
  });
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.0-alpha.0 Wed Apr 19 2023 21:30:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.10 Fri May 19 2023 19:00:38 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.0-alpha.0 Wed Apr 19 2023 21:30:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.10 Fri May 19 2023 19:00:38 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.0-alpha.0 Wed Apr 19 2023 21:30:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.10 Fri May 19 2023 19:00:38 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.0-alpha.0 Wed Apr 19 2023 21:30:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.10 Fri May 19 2023 19:00:38 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.0-alpha.0 Wed Apr 19 2023 21:30:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.10 Fri May 19 2023 19:00:38 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.0-alpha.0 Wed Apr 19 2023 21:30:04 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.0-alpha.10 Fri May 19 2023 19:00:38 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */