@nutui/nutui-react 1.4.10 → 1.4.11-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.
- package/CHANGELOG.md +16 -0
- package/dist/esm/ActionSheet.js +1 -1
- package/dist/esm/Address.js +2 -2
- package/dist/esm/Animate.js +1 -1
- package/dist/esm/AnimatingNumbers.js +1 -1
- package/dist/esm/Audio.js +2 -2
- package/dist/esm/Avatar.js +3 -3
- package/dist/esm/AvatarGroup.js +2 -2
- package/dist/esm/BackTop.js +1 -1
- package/dist/esm/Badge.js +2 -2
- package/dist/esm/Barrage.js +1 -1
- package/dist/esm/Button.js +1 -1
- package/dist/esm/Calendar.js +10 -4
- package/dist/esm/CalendarItem.js +17 -6
- package/dist/esm/Card.js +1 -1
- package/dist/esm/Cascader.js +5 -5
- package/dist/esm/Cell.js +2 -2
- package/dist/esm/CellGroup.js +3 -3
- package/dist/esm/Checkbox.js +4 -4
- package/dist/esm/CheckboxGroup.js +3 -3
- package/dist/esm/CircleProgress.js +2 -2
- package/dist/esm/Col.js +2 -2
- package/dist/esm/Collapse.js +1 -1
- package/dist/esm/CollapseItem.js +2 -2
- package/dist/esm/CountDown.js +1 -1
- package/dist/esm/DatePicker.js +3 -0
- package/dist/esm/Dialog.js +1 -1
- package/dist/esm/Divider.js +1 -1
- package/dist/esm/Drag.js +1 -1
- package/dist/esm/Elevator.js +1 -1
- package/dist/esm/Empty.js +1 -1
- package/dist/esm/FixedNav.js +2 -2
- package/dist/esm/Form.js +4 -4
- package/dist/esm/FormItem.js +3 -3
- package/dist/esm/Grid.js +2 -2
- package/dist/esm/GridItem.js +3 -3
- package/dist/esm/Icon.js +3 -3
- package/dist/esm/Indicator.js +1 -1
- package/dist/esm/Infiniteloading.js +2 -2
- package/dist/esm/Input.js +1 -1
- package/dist/esm/InputNumber.js +2 -2
- package/dist/esm/Menu.js +1 -1
- package/dist/esm/MenuItem.js +3 -3
- package/dist/esm/NavBar.js +2 -2
- package/dist/esm/NoticeBar.js +3 -3
- package/dist/esm/Notify.js +2 -2
- package/dist/esm/NumberKeyboard.js +1 -1
- package/dist/esm/Overlay.js +3 -3
- package/dist/esm/Pagination.js +1 -1
- package/dist/esm/Picker.js +2 -2
- package/dist/esm/Popover.js +2 -2
- package/dist/esm/Popup.js +3 -3
- package/dist/esm/Price.js +1 -1
- package/dist/esm/Progress.js +2 -2
- package/dist/esm/PullToRefresh.js +1 -1
- package/dist/esm/Radio.js +3 -3
- package/dist/esm/RadioGroup.js +3 -3
- package/dist/esm/Range.js +2 -2
- package/dist/esm/Rate.js +2 -2
- package/dist/esm/Row.js +1 -1
- package/dist/esm/SearchBar.js +8 -6
- package/dist/esm/ShortPassword.js +2 -3
- package/dist/esm/SideNavBar.js +1 -1
- package/dist/esm/Signature.js +1 -1
- package/dist/esm/Skeleton.js +1 -1
- package/dist/esm/Step.js +3 -3
- package/dist/esm/Steps.js +2 -2
- package/dist/esm/Sticky.js +3 -3
- package/dist/esm/SubSideNavBar.js +1 -1
- package/dist/esm/Swipe.js +3 -3
- package/dist/esm/Swiper.js +3 -3
- package/dist/esm/SwiperItem.js +2 -2
- package/dist/esm/Switch.js +2 -2
- package/dist/esm/TabPane.js +3 -3
- package/dist/esm/Tabbar.js +1 -1
- package/dist/esm/TabbarItem.js +2 -2
- package/dist/esm/Table.js +7 -5
- package/dist/esm/Tabs.js +4 -4
- package/dist/esm/Tag.js +1 -1
- package/dist/esm/TextArea.js +18 -5
- package/dist/esm/TimeDetail.js +1 -1
- package/dist/esm/TimePannel.js +1 -1
- package/dist/esm/TimeSelect.js +1 -1
- package/dist/esm/Toast.js +2 -2
- package/dist/esm/TrendArrow.js +1 -1
- package/dist/esm/Uploader.js +3 -3
- package/dist/esm/Video.js +1 -1
- package/dist/esm/WaterMark.js +1 -1
- package/dist/esm/{cellgroup-fcc72767.js → cellgroup-3402f96c.js} +1 -1
- package/dist/esm/{checkbox-44e13cd0.js → checkbox-6969a83f.js} +2 -2
- package/dist/esm/{formitem-cf532c97.js → formitem-4b58943b.js} +1 -1
- package/dist/esm/{icon-4ef1581c.js → icon-2242973e.js} +1 -1
- package/dist/esm/{overlay-de6c79d5.js → overlay-85e1180a.js} +1 -1
- package/dist/esm/{radio-9f141e6b.js → radio-e3ac1cef.js} +1 -1
- package/dist/esm/{tabpane-01075e6c.js → tabpane-15f62234.js} +1 -1
- package/dist/esm/{tabs-e1b4e4b1.js → tabs-c13f8ffe.js} +2 -2
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.mjs +48 -18
- package/dist/nutui.react.umd.js +48 -18
- package/dist/packages/radiogroup/radiogroup.scss +1 -0
- package/dist/packages/step/step.scss +2 -1
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables.scss +1 -1
- package/dist/types/index.d.ts +4 -1
- package/package.json +1 -1
- /package/dist/esm/{AvatarContext-15733596.js → AvatarContext-7153ad2b.js} +0 -0
- /package/dist/esm/{UserContext-101ad4a4.js → UserContext-68f62e66.js} +0 -0
- /package/dist/esm/{UserContext-2629d479.js → UserContext-b4181162.js} +0 -0
- /package/dist/esm/{UserContext-b33bcf21.js → UserContext-be8097d2.js} +0 -0
- /package/dist/esm/{bem-3b438e61.js → bem-893ad28d.js} +0 -0
- /package/dist/esm/{date-c7aad4c0.js → date-710f8c7c.js} +0 -0
- /package/dist/esm/{get-scroll-parent-5f85dee8.js → get-scroll-parent-3dcd3f53.js} +0 -0
- /package/dist/esm/{grid.context-2ee27d95.js → grid.context-e2f1ee97.js} +0 -0
- /package/dist/esm/{index-030b7245.js → index-a90733f9.js} +0 -0
- /package/dist/esm/{offsetContext-3ab00d40.js → offsetContext-0e3d04b3.js} +0 -0
- /package/dist/esm/{render-bbebb760.js → render-f8746530.js} +0 -0
- /package/dist/esm/{typings-f27b58f4.js → typings-1c5f2628.js} +0 -0
- /package/dist/esm/{useClientRect-56bb675b.js → useClientRect-839d18c5.js} +0 -0
- /package/dist/esm/{useTouch-cf73a407.js → useTouch-a2ea68c6.js} +0 -0
package/dist/esm/TextArea.js
CHANGED
|
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
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; }
|
|
7
7
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
8
8
|
import { useConfig } from './ConfigProvider.js';
|
|
9
|
-
import { c as cn } from './bem-
|
|
9
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
10
10
|
import '@bem-react/classname';
|
|
11
11
|
var defaultProps = {
|
|
12
12
|
defaultValue: '',
|
|
@@ -43,6 +43,7 @@ var TextArea = function TextArea(props) {
|
|
|
43
43
|
inputValue = _useState2[0],
|
|
44
44
|
SetInputValue = _useState2[1];
|
|
45
45
|
var textareaRef = useRef(null);
|
|
46
|
+
var compositingRef = useRef(false);
|
|
46
47
|
useEffect(function () {
|
|
47
48
|
var initValue = defaultValue;
|
|
48
49
|
if (initValue && maxlength && _toConsumableArray(initValue).length > Number(maxlength)) {
|
|
@@ -84,7 +85,7 @@ var TextArea = function TextArea(props) {
|
|
|
84
85
|
};
|
|
85
86
|
var textChange = function textChange(event) {
|
|
86
87
|
var text = event.target;
|
|
87
|
-
if (maxlength && _toConsumableArray(text.value).length > Number(maxlength)) {
|
|
88
|
+
if (maxlength && _toConsumableArray(text.value).length > Number(maxlength) && !compositingRef.current) {
|
|
88
89
|
text.value = text.value.substring(0, Number(maxlength));
|
|
89
90
|
}
|
|
90
91
|
SetInputValue(text.value);
|
|
@@ -102,6 +103,12 @@ var TextArea = function TextArea(props) {
|
|
|
102
103
|
onChange && onChange(text.value, event);
|
|
103
104
|
onBlur && onBlur(event);
|
|
104
105
|
};
|
|
106
|
+
var startComposing = function startComposing() {
|
|
107
|
+
compositingRef.current = true;
|
|
108
|
+
};
|
|
109
|
+
var endComposing = function endComposing() {
|
|
110
|
+
compositingRef.current = false;
|
|
111
|
+
};
|
|
105
112
|
return React__default.createElement("div", {
|
|
106
113
|
className: "".concat(textareaBem(), " ").concat(disabled ? textareaBem('disabled') : '', " ").concat(className || '')
|
|
107
114
|
}, React__default.createElement("textarea", {
|
|
@@ -113,9 +120,9 @@ var TextArea = function TextArea(props) {
|
|
|
113
120
|
disabled: disabled,
|
|
114
121
|
readOnly: readonly,
|
|
115
122
|
value: inputValue,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
123
|
+
// onInput={(e: any) => {
|
|
124
|
+
// textChange(e)
|
|
125
|
+
// }}
|
|
119
126
|
onChange: function onChange(e) {
|
|
120
127
|
textChange(e);
|
|
121
128
|
},
|
|
@@ -125,6 +132,12 @@ var TextArea = function TextArea(props) {
|
|
|
125
132
|
onFocus: function onFocus(e) {
|
|
126
133
|
textFocus(e);
|
|
127
134
|
},
|
|
135
|
+
onCompositionEnd: function onCompositionEnd(e) {
|
|
136
|
+
return endComposing();
|
|
137
|
+
},
|
|
138
|
+
onCompositionStart: function onCompositionStart(e) {
|
|
139
|
+
return startComposing();
|
|
140
|
+
},
|
|
128
141
|
rows: rows,
|
|
129
142
|
maxLength: maxlength < 0 ? 0 : maxlength,
|
|
130
143
|
placeholder: placeholder || locale.placeholder
|
package/dist/esm/TimeDetail.js
CHANGED
|
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
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; }
|
|
5
5
|
import React__default, { useState, useEffect } from 'react';
|
|
6
|
-
import { c as cn } from './bem-
|
|
6
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
7
7
|
import { useConfig } from './ConfigProvider.js';
|
|
8
8
|
import '@bem-react/classname';
|
|
9
9
|
var defaultProps = {
|
package/dist/esm/TimePannel.js
CHANGED
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
3
|
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; }
|
|
4
4
|
import React__default from 'react';
|
|
5
|
-
import { c as cn } from './bem-
|
|
5
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
6
6
|
import { useConfig } from './ConfigProvider.js';
|
|
7
7
|
import '@bem-react/classname';
|
|
8
8
|
var defaultProps = {
|
package/dist/esm/TimeSelect.js
CHANGED
|
@@ -7,7 +7,7 @@ import React__default, { useState, useEffect } from 'react';
|
|
|
7
7
|
import Popup from './Popup.js';
|
|
8
8
|
import TimePannel from './TimePannel.js';
|
|
9
9
|
import TimeDetail from './TimeDetail.js';
|
|
10
|
-
import { c as cn } from './bem-
|
|
10
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
11
11
|
import { useConfig } from './ConfigProvider.js';
|
|
12
12
|
import '@bem-react/classname';
|
|
13
13
|
var defaultProps = {
|
package/dist/esm/Toast.js
CHANGED
|
@@ -11,9 +11,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import { c as cn } from './bem-
|
|
14
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
15
15
|
import Icon from './Icon.js';
|
|
16
|
-
import { r as render, u as unmount } from './render-
|
|
16
|
+
import { r as render, u as unmount } from './render-f8746530.js';
|
|
17
17
|
import '@bem-react/classname';
|
|
18
18
|
import 'react-dom';
|
|
19
19
|
var Notification = /*#__PURE__*/function (_React$PureComponent) {
|
package/dist/esm/TrendArrow.js
CHANGED
|
@@ -4,7 +4,7 @@ var _excluded = ["rate", "digits", "showSign", "showZero", "arrowLeft", "syncTex
|
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
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; }
|
|
6
6
|
import React__default, { useRef } from 'react';
|
|
7
|
-
import { c as cn } from './bem-
|
|
7
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
8
8
|
import Icon from './Icon.js';
|
|
9
9
|
import '@bem-react/classname';
|
|
10
10
|
var defaultProps = {
|
package/dist/esm/Uploader.js
CHANGED
|
@@ -11,10 +11,10 @@ import React__default, { useState, useEffect, useImperativeHandle } from 'react'
|
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import Icon from './Icon.js';
|
|
13
13
|
import Progress from './Progress.js';
|
|
14
|
-
import { c as cn } from './bem-
|
|
14
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
15
15
|
import { useConfig } from './ConfigProvider.js';
|
|
16
|
-
import { i as isPromise } from './index-
|
|
17
|
-
import { C as ComponentDefaults } from './typings-
|
|
16
|
+
import { i as isPromise } from './index-a90733f9.js';
|
|
17
|
+
import { C as ComponentDefaults } from './typings-1c5f2628.js';
|
|
18
18
|
import '@bem-react/classname';
|
|
19
19
|
var UploadOptions = /*#__PURE__*/_createClass(function UploadOptions() {
|
|
20
20
|
_classCallCheck(this, UploadOptions);
|
package/dist/esm/Video.js
CHANGED
|
@@ -5,7 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5
5
|
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; }
|
|
6
6
|
import React__default, { useRef, useEffect } from 'react';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
|
-
import { c as cn } from './bem-
|
|
8
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
9
9
|
import '@bem-react/classname';
|
|
10
10
|
var defaultProps = {
|
|
11
11
|
source: {
|
package/dist/esm/WaterMark.js
CHANGED
|
@@ -5,7 +5,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
5
5
|
import React__default, { useState, useEffect } from 'react';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import { useConfig } from './ConfigProvider.js';
|
|
8
|
-
import { c as cn } from './bem-
|
|
8
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
9
9
|
import '@bem-react/classname';
|
|
10
10
|
var defaultProps = {
|
|
11
11
|
content: '',
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
3
|
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; }
|
|
4
4
|
import React__default from 'react';
|
|
5
|
-
import { c as cn } from './bem-
|
|
5
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
6
6
|
var defaultProps = {
|
|
7
7
|
title: '',
|
|
8
8
|
desc: '',
|
|
@@ -8,8 +8,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
8
8
|
import React__default, { createContext, useContext, useState, useEffect } from 'react';
|
|
9
9
|
import Icon from './Icon.js';
|
|
10
10
|
import CheckboxGroup from './CheckboxGroup.js';
|
|
11
|
-
import { c as cn } from './bem-
|
|
12
|
-
import { C as ComponentDefaults } from './typings-
|
|
11
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
12
|
+
import { C as ComponentDefaults } from './typings-1c5f2628.js';
|
|
13
13
|
var CheckboxGroupContext = createContext(null);
|
|
14
14
|
var defaultProps = _objectSpread(_objectSpread({}, ComponentDefaults), {}, {
|
|
15
15
|
checked: false,
|
|
@@ -11,7 +11,7 @@ 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
|
import React__default, { createContext } from 'react';
|
|
13
13
|
import Cell from './Cell.js';
|
|
14
|
-
import { C as ComponentDefaults } from './typings-
|
|
14
|
+
import { C as ComponentDefaults } from './typings-1c5f2628.js';
|
|
15
15
|
var FormItemContext = createContext({});
|
|
16
16
|
var defaultProps = _objectSpread(_objectSpread({}, ComponentDefaults), {}, {
|
|
17
17
|
name: '',
|
|
@@ -4,7 +4,7 @@ var _excluded = ["name", "size", "classPrefix", "color", "tag", "children", "cla
|
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
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; }
|
|
6
6
|
import React__default from 'react';
|
|
7
|
-
import { c as cn } from './bem-
|
|
7
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
8
8
|
var defaultProps = {
|
|
9
9
|
name: '',
|
|
10
10
|
size: '',
|
|
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
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; }
|
|
7
7
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
|
-
import { c as cn } from './bem-
|
|
9
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
10
10
|
var defaultOverlayProps = {
|
|
11
11
|
zIndex: 1000,
|
|
12
12
|
duration: 0.3,
|
|
@@ -7,7 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7
7
|
import React__default, { useState, useContext, useEffect } from 'react';
|
|
8
8
|
import Icon from './Icon.js';
|
|
9
9
|
import RadioGroup from './RadioGroup.js';
|
|
10
|
-
import { C as ComponentDefaults } from './typings-
|
|
10
|
+
import { C as ComponentDefaults } from './typings-1c5f2628.js';
|
|
11
11
|
var radioContext = {
|
|
12
12
|
onChange: function onChange(val) {}
|
|
13
13
|
};
|
|
@@ -3,7 +3,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
3
3
|
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; }
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
-
import { c as cn } from './bem-
|
|
6
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
7
7
|
var defaultProps = {
|
|
8
8
|
title: '',
|
|
9
9
|
paneKey: '',
|
|
@@ -8,9 +8,9 @@ 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
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
10
10
|
import classNames from 'classnames';
|
|
11
|
-
import { c as cn } from './bem-
|
|
11
|
+
import { c as cn } from './bem-893ad28d.js';
|
|
12
12
|
import Icon from './Icon.js';
|
|
13
|
-
import { C as ComponentDefaults } from './typings-
|
|
13
|
+
import { C as ComponentDefaults } from './typings-1c5f2628.js';
|
|
14
14
|
import TabPane from './TabPane.js';
|
|
15
15
|
var Title = /*#__PURE__*/_createClass(
|
|
16
16
|
// eslint-disable-next-line no-useless-constructor
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED
package/dist/nutui.react.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
var _a;
|
|
8
8
|
/*!
|
|
9
|
-
* @nutui/nutui-react v1.4.
|
|
9
|
+
* @nutui/nutui-react v1.4.11-beta.0 Wed Mar 15 2023 15:21:55 GMT+0800 (China Standard Time)
|
|
10
10
|
* (c) 2023 @jdf2e.
|
|
11
11
|
* Released under the MIT License.
|
|
12
12
|
*/
|
|
@@ -3150,7 +3150,7 @@ const Col = (props) => {
|
|
|
3150
3150
|
const { gutter } = useContext(DataContext$2);
|
|
3151
3151
|
const classs = () => {
|
|
3152
3152
|
const prefixCls = "nut-col";
|
|
3153
|
-
return `${prefixCls} ${prefixCls}-${span} ${gutter ? `${prefixCls}-gutter` : ""} ${prefixCls}-${offset}`;
|
|
3153
|
+
return `${prefixCls} ${prefixCls}-${span} ${gutter ? `${prefixCls}-gutter` : ""} ${prefixCls}-offset-${offset}`;
|
|
3154
3154
|
};
|
|
3155
3155
|
const getStyle = () => {
|
|
3156
3156
|
const style2 = {};
|
|
@@ -10344,6 +10344,8 @@ const defaultProps$11 = {
|
|
|
10344
10344
|
onUpdate: () => {
|
|
10345
10345
|
},
|
|
10346
10346
|
onSelected: (data) => {
|
|
10347
|
+
},
|
|
10348
|
+
onYearMonthChange: (data) => {
|
|
10347
10349
|
}
|
|
10348
10350
|
};
|
|
10349
10351
|
const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
@@ -10367,7 +10369,8 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
10367
10369
|
onBottomInfo,
|
|
10368
10370
|
onChoose,
|
|
10369
10371
|
onUpdate,
|
|
10370
|
-
onSelected
|
|
10372
|
+
onSelected,
|
|
10373
|
+
onYearMonthChange
|
|
10371
10374
|
} = { ...defaultProps$11, ...props };
|
|
10372
10375
|
const weeks = locale.calendaritem.weekdays;
|
|
10373
10376
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
@@ -10649,6 +10652,14 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
10649
10652
|
}
|
|
10650
10653
|
setMonthsData(state.monthsData);
|
|
10651
10654
|
};
|
|
10655
|
+
const setReachedYearMonthInfo = () => {
|
|
10656
|
+
const currentMonthsData = state.monthsData[state.currentIndex];
|
|
10657
|
+
const [year, month] = currentMonthsData.curData;
|
|
10658
|
+
if (currentMonthsData.title === yearMonthTitle)
|
|
10659
|
+
return;
|
|
10660
|
+
onYearMonthChange && onYearMonthChange([year, month, `${year}-${month}`]);
|
|
10661
|
+
setYearMonthTitle(currentMonthsData.title);
|
|
10662
|
+
};
|
|
10652
10663
|
const setDefaultRange = (monthsNum, current) => {
|
|
10653
10664
|
let start2 = 0;
|
|
10654
10665
|
let end = 0;
|
|
@@ -10704,7 +10715,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
10704
10715
|
state.currentIndex = current;
|
|
10705
10716
|
setDefaultRange(state.monthsNum, current);
|
|
10706
10717
|
}
|
|
10707
|
-
|
|
10718
|
+
setReachedYearMonthInfo();
|
|
10708
10719
|
};
|
|
10709
10720
|
const initData = () => {
|
|
10710
10721
|
const propStartDate = props.startDate ? props.startDate : Utils.getDay(0);
|
|
@@ -10795,7 +10806,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
|
|
|
10795
10806
|
}
|
|
10796
10807
|
setDefaultRange(monthsNum, current);
|
|
10797
10808
|
state.currentIndex = current;
|
|
10798
|
-
|
|
10809
|
+
setReachedYearMonthInfo();
|
|
10799
10810
|
if (state.defaultData.length > 0) {
|
|
10800
10811
|
if (type4 === "range") {
|
|
10801
10812
|
chooseDay(
|
|
@@ -10960,6 +10971,8 @@ const defaultProps$10 = {
|
|
|
10960
10971
|
onChoose: (param) => {
|
|
10961
10972
|
},
|
|
10962
10973
|
onSelected: (data) => {
|
|
10974
|
+
},
|
|
10975
|
+
onYearMonthChange: (param) => {
|
|
10963
10976
|
}
|
|
10964
10977
|
};
|
|
10965
10978
|
const Calendar = React__default.forwardRef((props, ref) => {
|
|
@@ -10986,7 +10999,8 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
10986
10999
|
onBottomInfo,
|
|
10987
11000
|
onClose,
|
|
10988
11001
|
onChoose,
|
|
10989
|
-
onSelected
|
|
11002
|
+
onSelected,
|
|
11003
|
+
onYearMonthChange
|
|
10990
11004
|
} = { ...defaultProps$10, ...props };
|
|
10991
11005
|
const calendarRef = useRef(null);
|
|
10992
11006
|
const close = () => {
|
|
@@ -11006,6 +11020,9 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
11006
11020
|
var _a2;
|
|
11007
11021
|
(_a2 = calendarRef.current) == null ? void 0 : _a2.scrollToDate(date4);
|
|
11008
11022
|
};
|
|
11023
|
+
const yearMonthChange = (param) => {
|
|
11024
|
+
onYearMonthChange && onYearMonthChange(param);
|
|
11025
|
+
};
|
|
11009
11026
|
React__default.useImperativeHandle(ref, () => ({
|
|
11010
11027
|
scrollToDate
|
|
11011
11028
|
}));
|
|
@@ -11033,7 +11050,8 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
11033
11050
|
onTopInfo,
|
|
11034
11051
|
onBottomInfo,
|
|
11035
11052
|
onChoose: choose,
|
|
11036
|
-
onSelected: select
|
|
11053
|
+
onSelected: select,
|
|
11054
|
+
onYearMonthChange: yearMonthChange
|
|
11037
11055
|
}
|
|
11038
11056
|
);
|
|
11039
11057
|
};
|
|
@@ -12430,6 +12448,9 @@ const DatePicker = (props) => {
|
|
|
12430
12448
|
case "year-month":
|
|
12431
12449
|
result = result.slice(0, 2);
|
|
12432
12450
|
break;
|
|
12451
|
+
case "hour-minutes":
|
|
12452
|
+
result = result.slice(3, 5);
|
|
12453
|
+
break;
|
|
12433
12454
|
case "month-day":
|
|
12434
12455
|
result = result.slice(1, 3);
|
|
12435
12456
|
break;
|
|
@@ -15773,6 +15794,10 @@ const SearchBar = (props) => {
|
|
|
15773
15794
|
...props
|
|
15774
15795
|
};
|
|
15775
15796
|
const alignClass = `${align}`;
|
|
15797
|
+
const forceFocus = () => {
|
|
15798
|
+
const searchSelf = searchRef.current;
|
|
15799
|
+
searchSelf && searchSelf.focus();
|
|
15800
|
+
};
|
|
15776
15801
|
const change = (event) => {
|
|
15777
15802
|
const { value: value2 } = event.target;
|
|
15778
15803
|
onChange && (onChange == null ? void 0 : onChange(value2, event));
|
|
@@ -15792,10 +15817,7 @@ const SearchBar = (props) => {
|
|
|
15792
15817
|
setValue(props.value);
|
|
15793
15818
|
}, [props.value]);
|
|
15794
15819
|
useEffect(() => {
|
|
15795
|
-
|
|
15796
|
-
const searchSelf = searchRef.current;
|
|
15797
|
-
searchSelf && searchSelf.focus();
|
|
15798
|
-
}
|
|
15820
|
+
autoFocus && forceFocus();
|
|
15799
15821
|
}, [autoFocus]);
|
|
15800
15822
|
const renderField = () => {
|
|
15801
15823
|
return /* @__PURE__ */ React__default.createElement(
|
|
@@ -15907,6 +15929,7 @@ const SearchBar = (props) => {
|
|
|
15907
15929
|
}
|
|
15908
15930
|
setValue("");
|
|
15909
15931
|
onClear && onClear(event);
|
|
15932
|
+
forceFocus();
|
|
15910
15933
|
};
|
|
15911
15934
|
const renderRightLabel = () => {
|
|
15912
15935
|
if (actionText) {
|
|
@@ -16041,7 +16064,6 @@ const ShortPassword = (props) => {
|
|
|
16041
16064
|
const isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
|
|
16042
16065
|
const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
|
16043
16066
|
let style2 = {};
|
|
16044
|
-
console.log(isIOS, isAndroid);
|
|
16045
16067
|
if (isIOS) {
|
|
16046
16068
|
style2 = {
|
|
16047
16069
|
paddingRight: "1200px"
|
|
@@ -16137,6 +16159,7 @@ const TextArea = (props) => {
|
|
|
16137
16159
|
const textareaBem = cn("textarea");
|
|
16138
16160
|
const [inputValue, SetInputValue] = useState("");
|
|
16139
16161
|
const textareaRef = useRef(null);
|
|
16162
|
+
const compositingRef = useRef(false);
|
|
16140
16163
|
useEffect(() => {
|
|
16141
16164
|
let initValue = defaultValue;
|
|
16142
16165
|
if (initValue && maxlength && [...initValue].length > Number(maxlength)) {
|
|
@@ -16177,7 +16200,7 @@ const TextArea = (props) => {
|
|
|
16177
16200
|
};
|
|
16178
16201
|
const textChange = (event) => {
|
|
16179
16202
|
const text = event.target;
|
|
16180
|
-
if (maxlength && [...text.value].length > Number(maxlength)) {
|
|
16203
|
+
if (maxlength && [...text.value].length > Number(maxlength) && !compositingRef.current) {
|
|
16181
16204
|
text.value = text.value.substring(0, Number(maxlength));
|
|
16182
16205
|
}
|
|
16183
16206
|
SetInputValue(text.value);
|
|
@@ -16199,6 +16222,12 @@ const TextArea = (props) => {
|
|
|
16199
16222
|
onChange && onChange(text.value, event);
|
|
16200
16223
|
onBlur && onBlur(event);
|
|
16201
16224
|
};
|
|
16225
|
+
const startComposing = () => {
|
|
16226
|
+
compositingRef.current = true;
|
|
16227
|
+
};
|
|
16228
|
+
const endComposing = () => {
|
|
16229
|
+
compositingRef.current = false;
|
|
16230
|
+
};
|
|
16202
16231
|
return /* @__PURE__ */ React__default.createElement(
|
|
16203
16232
|
"div",
|
|
16204
16233
|
{
|
|
@@ -16216,9 +16245,6 @@ const TextArea = (props) => {
|
|
|
16216
16245
|
disabled,
|
|
16217
16246
|
readOnly: readonly,
|
|
16218
16247
|
value: inputValue,
|
|
16219
|
-
onInput: (e) => {
|
|
16220
|
-
textChange(e);
|
|
16221
|
-
},
|
|
16222
16248
|
onChange: (e) => {
|
|
16223
16249
|
textChange(e);
|
|
16224
16250
|
},
|
|
@@ -16228,6 +16254,8 @@ const TextArea = (props) => {
|
|
|
16228
16254
|
onFocus: (e) => {
|
|
16229
16255
|
textFocus(e);
|
|
16230
16256
|
},
|
|
16257
|
+
onCompositionEnd: (e) => endComposing(),
|
|
16258
|
+
onCompositionStart: (e) => startComposing(),
|
|
16231
16259
|
rows,
|
|
16232
16260
|
maxLength: maxlength < 0 ? 0 : maxlength,
|
|
16233
16261
|
placeholder: placeholder || locale.placeholder
|
|
@@ -21364,7 +21392,8 @@ const defaultProps$d = {
|
|
|
21364
21392
|
data: [],
|
|
21365
21393
|
bordered: true,
|
|
21366
21394
|
striped: false,
|
|
21367
|
-
noData: "无数据"
|
|
21395
|
+
noData: "无数据",
|
|
21396
|
+
showHeader: true
|
|
21368
21397
|
};
|
|
21369
21398
|
const Table = (props) => {
|
|
21370
21399
|
const { locale } = useConfig();
|
|
@@ -21382,6 +21411,7 @@ const Table = (props) => {
|
|
|
21382
21411
|
onSorter,
|
|
21383
21412
|
iconClassPrefix,
|
|
21384
21413
|
iconFontClassName,
|
|
21414
|
+
showHeader,
|
|
21385
21415
|
...rest
|
|
21386
21416
|
} = {
|
|
21387
21417
|
...defaultProps$d,
|
|
@@ -21472,7 +21502,7 @@ const Table = (props) => {
|
|
|
21472
21502
|
"nut-table__main--striped": striped
|
|
21473
21503
|
})
|
|
21474
21504
|
},
|
|
21475
|
-
/* @__PURE__ */ React__default.createElement("div", { className: "nut-table__main__head" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-table__main__head__tr" }, renderHeadCells())),
|
|
21505
|
+
showHeader && /* @__PURE__ */ React__default.createElement("div", { className: "nut-table__main__head" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-table__main__head__tr" }, renderHeadCells())),
|
|
21476
21506
|
/* @__PURE__ */ React__default.createElement("div", { className: "nut-table__main__body" }, renderBoyTrs())
|
|
21477
21507
|
), summary && /* @__PURE__ */ React__default.createElement("div", { className: "nut-table__summary" }, /* @__PURE__ */ React__default.createElement("span", { className: "nut-table__summary__text" }, summary)), curData.length === 0 && /* @__PURE__ */ React__default.createElement("div", { className: "nut-table__nodata" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-table__nodata" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-table__nodata__text" }, noData))));
|
|
21478
21508
|
};
|