@nutui/nutui-react 1.1.0 → 1.1.1-beta.0

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 (77) hide show
  1. package/dist/esm/Address.js +11 -11
  2. package/dist/esm/AnimatingNumbers.js +1 -1
  3. package/dist/esm/Avatar.js +2 -2
  4. package/dist/esm/BackTop.js +7 -7
  5. package/dist/esm/Barrage.js +2 -2
  6. package/dist/esm/Calendar.js +1 -1
  7. package/dist/esm/CalendarItem.js +33 -35
  8. package/dist/esm/Cell.js +4 -4
  9. package/dist/esm/CircleProgress.js +2 -2
  10. package/dist/esm/Col.js +4 -3
  11. package/dist/esm/Collapse.js +3 -3
  12. package/dist/esm/CollapseItem.js +4 -4
  13. package/dist/esm/DatePicker/style/css.js +1 -0
  14. package/dist/esm/DatePicker/style/index.js +1 -0
  15. package/dist/esm/DatePicker.js +322 -0
  16. package/dist/esm/Divider.js +1 -1
  17. package/dist/esm/Drag.js +1 -1
  18. package/dist/esm/Elevator.js +2 -2
  19. package/dist/esm/FixedNav.js +3 -3
  20. package/dist/esm/Infiniteloading.js +5 -5
  21. package/dist/esm/Input.js +1 -1
  22. package/dist/esm/InputNumber.js +1 -1
  23. package/dist/esm/NoticeBar.js +12 -12
  24. package/dist/esm/Notify.js +7 -7
  25. package/dist/esm/Overlay.js +3 -3
  26. package/dist/esm/Pagination.js +10 -10
  27. package/dist/esm/Picker.js +13 -6
  28. package/dist/esm/Popover.js +8 -8
  29. package/dist/esm/Popup.js +7 -5
  30. package/dist/esm/Price.js +3 -3
  31. package/dist/esm/Range.js +3 -3
  32. package/dist/esm/ShortPassword.js +2 -2
  33. package/dist/esm/Skeleton/style/css.js +1 -0
  34. package/dist/esm/Skeleton/style/index.js +1 -0
  35. package/dist/esm/Skeleton.js +102 -0
  36. package/dist/esm/Step.js +1 -1
  37. package/dist/esm/Steps.js +1 -1
  38. package/dist/esm/Swiper.js +2 -2
  39. package/dist/esm/SwiperItem.js +2 -2
  40. package/dist/esm/Switch.js +2 -1
  41. package/dist/esm/TabPane/style/css.js +1 -0
  42. package/dist/esm/TabPane/style/index.js +1 -0
  43. package/dist/esm/TabPane.js +33 -0
  44. package/dist/esm/Tabs/style/css.js +1 -0
  45. package/dist/esm/Tabs/style/index.js +1 -0
  46. package/dist/esm/Tabs.js +187 -0
  47. package/dist/esm/Tag.js +4 -8
  48. package/dist/esm/TextArea.js +1 -1
  49. package/dist/esm/Toast.js +11 -7
  50. package/dist/esm/Uploader.js +3 -3
  51. package/dist/esm/{date-649fe493.js → date-b4847376.js} +2 -2
  52. package/dist/esm/nutui-react.es.js +4 -0
  53. package/dist/esm/{overlay-418bcf84.js → overlay-ed3eb37d.js} +1 -1
  54. package/dist/nutui.react.es.js +1153 -535
  55. package/dist/nutui.react.umd.js +19 -19
  56. package/dist/packages/datepicker/datepicker.scss +2 -0
  57. package/dist/packages/skeleton/skeleton.scss +65 -0
  58. package/dist/packages/tabpane/tabpane.scss +12 -0
  59. package/dist/packages/tabs/tabs.scss +192 -0
  60. package/dist/style.css +1 -1
  61. package/dist/style.es.js +1 -1
  62. package/dist/styles/themes/default.scss +4 -0
  63. package/dist/styles/variables.scss +25 -0
  64. package/dist/types/address/address.d.ts +1 -1
  65. package/dist/types/address/existRender.d.ts +1 -1
  66. package/dist/types/badge/badge.d.ts +1 -1
  67. package/dist/types/datepicker/datepicker.d.ts +16 -0
  68. package/dist/types/datepicker/index.d.ts +2 -0
  69. package/dist/types/nutui.react.d.ts +5 -1
  70. package/dist/types/signature/signature.d.ts +4 -4
  71. package/dist/types/skeleton/index.d.ts +2 -0
  72. package/dist/types/skeleton/skeleton.d.ts +18 -0
  73. package/dist/types/tabpane/index.d.ts +2 -0
  74. package/dist/types/tabpane/tabpane.d.ts +8 -0
  75. package/dist/types/tabs/index.d.ts +2 -0
  76. package/dist/types/tabs/tabs.d.ts +28 -0
  77. package/package.json +6 -1
package/dist/esm/Toast.js CHANGED
@@ -16,9 +16,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
16
16
 
17
17
  import * as React from 'react';
18
18
  import * as ReactDOM from 'react-dom';
19
+ import classNames from 'classnames';
19
20
  import { c as cn } from './bem-893ad28d.js';
20
21
  import Icon from './Icon.js';
21
- import classNames from 'classnames';
22
22
  import '@bem-react/classname';
23
23
 
24
24
  var Notification = /*#__PURE__*/function (_React$PureComponent) {
@@ -98,8 +98,7 @@ var Notification = /*#__PURE__*/function (_React$PureComponent) {
98
98
  }, {
99
99
  key: "render",
100
100
  value: function render() {
101
- var _classNames,
102
- _this3 = this;
101
+ var _this3 = this;
103
102
 
104
103
  var _this$props = this.props,
105
104
  style = _this$props.style,
@@ -116,11 +115,17 @@ var Notification = /*#__PURE__*/function (_React$PureComponent) {
116
115
  type = _this$props.type;
117
116
  this.state;
118
117
  var toastBem = cn('toast');
119
- var classes = classNames((_classNames = {}, _defineProperty(_classNames, 'nut-toast-center', center), _defineProperty(_classNames, 'nut-toast-has-icon', icon), _defineProperty(_classNames, 'nut-toast-cover', cover), _defineProperty(_classNames, 'nut-toast-loading', type === 'loading'), _defineProperty(_classNames, "customClass", customClass), _defineProperty(_classNames, 'nut-toast-' + size, true), _classNames));
118
+ var classes = classNames(_defineProperty({
119
+ 'nut-toast-center': center,
120
+ 'nut-toast-has-icon': icon,
121
+ 'nut-toast-cover': cover,
122
+ 'nut-toast-loading': type === 'loading',
123
+ customClass: customClass
124
+ }, "nut-toast-".concat(size), true));
120
125
  return React.createElement(React.Fragment, null, React.createElement("div", {
121
126
  className: "".concat(toastBem(), " ").concat(classes),
122
127
  style: {
123
- bottom: center ? 'auto' : bottom + 'px',
128
+ bottom: center ? 'auto' : "".concat(bottom, "px"),
124
129
  backgroundColor: cover ? coverColor : ''
125
130
  },
126
131
  onClick: function onClick() {
@@ -135,7 +140,7 @@ var Notification = /*#__PURE__*/function (_React$PureComponent) {
135
140
  }, icon ? React.createElement("p", {
136
141
  className: toastBem('icon-wrapper')
137
142
  }, React.createElement(Icon, {
138
- name: icon ? icon : '',
143
+ name: icon || '',
139
144
  size: "20"
140
145
  })) : null, React.createElement("span", {
141
146
  className: toastBem('text')
@@ -229,7 +234,6 @@ function notice(opts) {
229
234
  var errorMsg = function errorMsg(msg) {
230
235
  if (!msg) {
231
236
  console.warn('[NutUI Toast]: msg不能为空');
232
- return;
233
237
  }
234
238
  };
235
239
 
@@ -11,8 +11,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
11
11
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
12
12
 
13
13
  import React__default, { useState, useImperativeHandle } from 'react';
14
- import Icon from './Icon.js';
15
14
  import classNames from 'classnames';
15
+ import Icon from './Icon.js';
16
16
  import { c as cn } from './bem-893ad28d.js';
17
17
  import '@bem-react/classname';
18
18
 
@@ -347,9 +347,9 @@ var InternalUploader = function InternalUploader(props, ref) {
347
347
  if (file.size > maximize) {
348
348
  oversizes.push(file);
349
349
  return false;
350
- } else {
351
- return true;
352
350
  }
351
+
352
+ return true;
353
353
  });
354
354
 
355
355
  if (oversizes.length) {
@@ -12,7 +12,7 @@ var Utils = {
12
12
  * @return {String}
13
13
  */
14
14
  getWhatDay: function getWhatDay(year, month, day) {
15
- var date = new Date(year + '/' + month + '/' + day);
15
+ var date = new Date("".concat(year, "/").concat(month, "/").concat(day));
16
16
  var index = date.getDay();
17
17
  var dayNames = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
18
18
  return dayNames[index];
@@ -23,7 +23,7 @@ var Utils = {
23
23
  * @return {Number}
24
24
  */
25
25
  getMonthPreDay: function getMonthPreDay(year, month) {
26
- var date = new Date(year + '/' + month + '/01');
26
+ var date = new Date("".concat(year, "/").concat(month, "/01"));
27
27
  var day = date.getDay();
28
28
 
29
29
  if (day == 0) {
@@ -34,6 +34,8 @@ export { default as Step } from './Step.js';
34
34
  export { default as Swiper } from './Swiper.js';
35
35
  export { default as SwiperItem } from './SwiperItem.js';
36
36
  export { default as BackTop } from './BackTop.js';
37
+ export { default as Tabs } from './Tabs.js';
38
+ export { default as TabPane } from './TabPane.js';
37
39
  export { default as Rate } from './Rate.js';
38
40
  export { default as Input } from './Input.js';
39
41
  export { default as TextArea } from './TextArea.js';
@@ -48,6 +50,8 @@ export { default as Badge } from './Badge.js';
48
50
  export { default as Uploader } from './Uploader.js';
49
51
  export { default as Calendar } from './Calendar.js';
50
52
  export { default as CalendarItem } from './CalendarItem.js';
53
+ export { default as DatePicker } from './DatePicker.js';
54
+ export { default as Skeleton } from './Skeleton.js';
51
55
  export { default as Address } from './Address.js';
52
56
  export { default as Barrage } from './Barrage.js';
53
57
  export { default as Signature } from './Signature.js';
@@ -8,8 +8,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
8
8
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9
9
 
10
10
  import React__default, { useState, useRef, useEffect } from 'react';
11
- import { c as cn } from './bem-893ad28d.js';
12
11
  import classNames from 'classnames';
12
+ import { c as cn } from './bem-893ad28d.js';
13
13
  var defaultOverlayProps = {
14
14
  zIndex: 2000,
15
15
  duration: 0.3,