@nutui/nutui-react 1.4.2 → 1.4.3
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 +12 -0
- package/dist/esm/Address.js +21 -23
- package/dist/esm/BackTop.js +3 -0
- package/dist/esm/Badge.js +1 -1
- package/dist/esm/Barrage.js +1 -1
- package/dist/esm/Cascader.js +244 -234
- package/dist/esm/MenuItem.js +1 -1
- package/dist/esm/NoticeBar.js +2 -2
- package/dist/esm/Overlay.js +2 -2
- package/dist/esm/Popup.js +1 -1
- package/dist/esm/PullToRefresh.js +81 -75
- package/dist/esm/{overlay-41da5070.js → overlay-85e1180a.js} +1 -1
- package/dist/esm/render-f8746530.js +12 -10
- 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.es.js +12 -6
- package/dist/nutui.react.umd.js +12 -6
- package/dist/packages/drag/drag.scss +1 -0
- package/dist/packages/inputnumber/inputnumber.scss +4 -1
- package/dist/packages/signature/signature.scss +10 -3
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/variables.scss +1 -1
- package/package.json +1 -1
package/dist/esm/Popup.js
CHANGED
|
@@ -6,7 +6,7 @@ import React__default, { useState, useEffect } from 'react';
|
|
|
6
6
|
import { createPortal } from 'react-dom';
|
|
7
7
|
import { CSSTransition } from 'react-transition-group';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
|
-
import { d as defaultOverlayProps } from './overlay-
|
|
9
|
+
import { d as defaultOverlayProps } from './overlay-85e1180a.js';
|
|
10
10
|
import Icon from './Icon.js';
|
|
11
11
|
import Overlay from './Overlay.js';
|
|
12
12
|
import { c as cn } from './bem-893ad28d.js';
|
|
@@ -102,82 +102,88 @@ var PullToRefresh = function PullToRefresh(p) {
|
|
|
102
102
|
function _doRefresh() {
|
|
103
103
|
_doRefresh = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
104
104
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
105
|
-
while (1)
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
case 8:
|
|
119
|
-
_context3.prev = 8;
|
|
120
|
-
_context3.t0 = _context3["catch"](2);
|
|
121
|
-
api.start({
|
|
122
|
-
to: function () {
|
|
123
|
-
var _to = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(next) {
|
|
124
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
125
|
-
while (1) switch (_context.prev = _context.next) {
|
|
126
|
-
case 0:
|
|
127
|
-
_context.next = 2;
|
|
128
|
-
return next({
|
|
129
|
-
height: 0
|
|
130
|
-
});
|
|
131
|
-
case 2:
|
|
132
|
-
setStatus('pulling');
|
|
133
|
-
case 3:
|
|
134
|
-
case "end":
|
|
135
|
-
return _context.stop();
|
|
136
|
-
}
|
|
137
|
-
}, _callee);
|
|
138
|
-
}));
|
|
139
|
-
function to(_x) {
|
|
140
|
-
return _to.apply(this, arguments);
|
|
141
|
-
}
|
|
142
|
-
return to;
|
|
143
|
-
}()
|
|
144
|
-
});
|
|
145
|
-
throw _context3.t0;
|
|
146
|
-
case 12:
|
|
147
|
-
if (!(props.completeDelay > 0)) {
|
|
148
|
-
_context3.next = 15;
|
|
105
|
+
while (1) {
|
|
106
|
+
switch (_context3.prev = _context3.next) {
|
|
107
|
+
case 0:
|
|
108
|
+
api.start({
|
|
109
|
+
height: headHeight
|
|
110
|
+
});
|
|
111
|
+
setStatus('refreshing');
|
|
112
|
+
_context3.prev = 2;
|
|
113
|
+
_context3.next = 5;
|
|
114
|
+
return props.onRefresh();
|
|
115
|
+
case 5:
|
|
116
|
+
setStatus('complete');
|
|
117
|
+
_context3.next = 12;
|
|
149
118
|
break;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
119
|
+
case 8:
|
|
120
|
+
_context3.prev = 8;
|
|
121
|
+
_context3.t0 = _context3["catch"](2);
|
|
122
|
+
api.start({
|
|
123
|
+
to: function () {
|
|
124
|
+
var _to = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(next) {
|
|
125
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
126
|
+
while (1) {
|
|
127
|
+
switch (_context.prev = _context.next) {
|
|
128
|
+
case 0:
|
|
129
|
+
_context.next = 2;
|
|
130
|
+
return next({
|
|
131
|
+
height: 0
|
|
132
|
+
});
|
|
133
|
+
case 2:
|
|
134
|
+
setStatus('pulling');
|
|
135
|
+
case 3:
|
|
136
|
+
case "end":
|
|
137
|
+
return _context.stop();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}, _callee);
|
|
141
|
+
}));
|
|
142
|
+
function to(_x) {
|
|
143
|
+
return _to.apply(this, arguments);
|
|
144
|
+
}
|
|
145
|
+
return to;
|
|
146
|
+
}()
|
|
147
|
+
});
|
|
148
|
+
throw _context3.t0;
|
|
149
|
+
case 12:
|
|
150
|
+
if (!(props.completeDelay > 0)) {
|
|
151
|
+
_context3.next = 15;
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
_context3.next = 15;
|
|
155
|
+
return sleep(props.completeDelay);
|
|
156
|
+
case 15:
|
|
157
|
+
api.start({
|
|
158
|
+
to: function () {
|
|
159
|
+
var _to2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(next) {
|
|
160
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
161
|
+
while (1) {
|
|
162
|
+
switch (_context2.prev = _context2.next) {
|
|
163
|
+
case 0:
|
|
164
|
+
_context2.next = 2;
|
|
165
|
+
return next({
|
|
166
|
+
height: 0
|
|
167
|
+
});
|
|
168
|
+
case 2:
|
|
169
|
+
setStatus('pulling');
|
|
170
|
+
case 3:
|
|
171
|
+
case "end":
|
|
172
|
+
return _context2.stop();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}, _callee2);
|
|
176
|
+
}));
|
|
177
|
+
function to(_x2) {
|
|
178
|
+
return _to2.apply(this, arguments);
|
|
179
|
+
}
|
|
180
|
+
return to;
|
|
181
|
+
}()
|
|
182
|
+
});
|
|
183
|
+
case 16:
|
|
184
|
+
case "end":
|
|
185
|
+
return _context3.stop();
|
|
186
|
+
}
|
|
181
187
|
}
|
|
182
188
|
}, _callee3, null, [[2, 8]]);
|
|
183
189
|
}));
|
|
@@ -65,7 +65,7 @@ var Overlay = function Overlay(props) {
|
|
|
65
65
|
if (closeOnClickOverlay) {
|
|
66
66
|
props.onClick && props.onClick(e);
|
|
67
67
|
renderRef.current = false;
|
|
68
|
-
var id = setTimeout(function () {
|
|
68
|
+
var id = window.setTimeout(function () {
|
|
69
69
|
setShow(!visible);
|
|
70
70
|
}, duration * 1000 * 0.8);
|
|
71
71
|
intervalRef.current = id;
|
|
@@ -55,16 +55,18 @@ function concurrentUnmount(_x) {
|
|
|
55
55
|
function _concurrentUnmount() {
|
|
56
56
|
_concurrentUnmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(container) {
|
|
57
57
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
58
|
-
while (1)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
while (1) {
|
|
59
|
+
switch (_context.prev = _context.next) {
|
|
60
|
+
case 0:
|
|
61
|
+
return _context.abrupt("return", Promise.resolve().then(function () {
|
|
62
|
+
var _container$MARK;
|
|
63
|
+
(_container$MARK = container[MARK]) === null || _container$MARK === void 0 ? void 0 : _container$MARK.unmount();
|
|
64
|
+
delete container[MARK];
|
|
65
|
+
}));
|
|
66
|
+
case 1:
|
|
67
|
+
case "end":
|
|
68
|
+
return _context.stop();
|
|
69
|
+
}
|
|
68
70
|
}
|
|
69
71
|
}, _callee);
|
|
70
72
|
}));
|
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.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react v1.4.
|
|
2
|
+
* @nutui/nutui-react v1.4.3-beta.0 Wed Jan 11 2023 14:44:37 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -461,7 +461,7 @@ const Overlay = (props) => {
|
|
|
461
461
|
if (closeOnClickOverlay) {
|
|
462
462
|
props.onClick && props.onClick(e2);
|
|
463
463
|
renderRef.current = false;
|
|
464
|
-
const id = setTimeout(() => {
|
|
464
|
+
const id = window.setTimeout(() => {
|
|
465
465
|
setShow(!visible);
|
|
466
466
|
}, duration * 1e3 * 0.8);
|
|
467
467
|
intervalRef.current = id;
|
|
@@ -20361,6 +20361,8 @@ const BackTop = (props) => {
|
|
|
20361
20361
|
const init = () => {
|
|
20362
20362
|
if (elId && document.getElementById(elId)) {
|
|
20363
20363
|
scrollEl.current = document.getElementById(elId);
|
|
20364
|
+
} else {
|
|
20365
|
+
scrollEl.current = window;
|
|
20364
20366
|
}
|
|
20365
20367
|
addEventListener();
|
|
20366
20368
|
initCancelAniFrame();
|
|
@@ -20382,6 +20384,7 @@ const BackTop = (props) => {
|
|
|
20382
20384
|
window.scrollTo(0, y);
|
|
20383
20385
|
} else {
|
|
20384
20386
|
scrollEl.current.scrollTop = y;
|
|
20387
|
+
window.scrollTo(0, y);
|
|
20385
20388
|
}
|
|
20386
20389
|
};
|
|
20387
20390
|
const scrollAnimation = () => {
|
|
@@ -21876,7 +21879,10 @@ const NoticeBar = (props) => {
|
|
|
21876
21879
|
const startRollEasy = () => {
|
|
21877
21880
|
showhorseLamp();
|
|
21878
21881
|
const time = height / speed / 4 < 1 ? Number((height / speed / 4).toFixed(1)) * 1e3 : ~~(height / speed / 4) * 1e3;
|
|
21879
|
-
const timerCurr = setInterval(
|
|
21882
|
+
const timerCurr = window.setInterval(
|
|
21883
|
+
showhorseLamp,
|
|
21884
|
+
time + Number(standTime)
|
|
21885
|
+
);
|
|
21880
21886
|
SetTimer(timerCurr);
|
|
21881
21887
|
};
|
|
21882
21888
|
const showhorseLamp = () => {
|
|
@@ -21889,7 +21895,7 @@ const NoticeBar = (props) => {
|
|
|
21889
21895
|
}, time);
|
|
21890
21896
|
};
|
|
21891
21897
|
const startRoll = () => {
|
|
21892
|
-
const timerCurr = setInterval(() => {
|
|
21898
|
+
const timerCurr = window.setInterval(() => {
|
|
21893
21899
|
const chunk = 100;
|
|
21894
21900
|
for (let i = 0; i < chunk; i++) {
|
|
21895
21901
|
scroll(i, !(i < chunk - 1));
|
|
@@ -22887,7 +22893,7 @@ const Badge = (props) => {
|
|
|
22887
22893
|
style2.top = `${Number(top) || parseFloat(top) || 0}px`;
|
|
22888
22894
|
style2.right = `${Number(right) || parseFloat(right) || 0}px`;
|
|
22889
22895
|
style2.zIndex = zIndex;
|
|
22890
|
-
style2.
|
|
22896
|
+
style2.background = color;
|
|
22891
22897
|
return style2;
|
|
22892
22898
|
};
|
|
22893
22899
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -25828,7 +25834,7 @@ const InternalBarrage = (props, ref) => {
|
|
|
25828
25834
|
}, [barrageList]);
|
|
25829
25835
|
const run = () => {
|
|
25830
25836
|
clearInterval(timer.current);
|
|
25831
|
-
timer.current = setInterval(() => {
|
|
25837
|
+
timer.current = window.setInterval(() => {
|
|
25832
25838
|
play();
|
|
25833
25839
|
run();
|
|
25834
25840
|
}, frequency);
|
package/dist/nutui.react.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react v1.4.
|
|
2
|
+
* @nutui/nutui-react v1.4.3-beta.0 Wed Jan 11 2023 14:44:37 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -488,7 +488,7 @@
|
|
|
488
488
|
if (closeOnClickOverlay) {
|
|
489
489
|
props.onClick && props.onClick(e2);
|
|
490
490
|
renderRef.current = false;
|
|
491
|
-
const id = setTimeout(() => {
|
|
491
|
+
const id = window.setTimeout(() => {
|
|
492
492
|
setShow(!visible);
|
|
493
493
|
}, duration * 1e3 * 0.8);
|
|
494
494
|
intervalRef.current = id;
|
|
@@ -20388,6 +20388,8 @@
|
|
|
20388
20388
|
const init = () => {
|
|
20389
20389
|
if (elId && document.getElementById(elId)) {
|
|
20390
20390
|
scrollEl.current = document.getElementById(elId);
|
|
20391
|
+
} else {
|
|
20392
|
+
scrollEl.current = window;
|
|
20391
20393
|
}
|
|
20392
20394
|
addEventListener();
|
|
20393
20395
|
initCancelAniFrame();
|
|
@@ -20409,6 +20411,7 @@
|
|
|
20409
20411
|
window.scrollTo(0, y);
|
|
20410
20412
|
} else {
|
|
20411
20413
|
scrollEl.current.scrollTop = y;
|
|
20414
|
+
window.scrollTo(0, y);
|
|
20412
20415
|
}
|
|
20413
20416
|
};
|
|
20414
20417
|
const scrollAnimation = () => {
|
|
@@ -21903,7 +21906,10 @@
|
|
|
21903
21906
|
const startRollEasy = () => {
|
|
21904
21907
|
showhorseLamp();
|
|
21905
21908
|
const time = height / speed / 4 < 1 ? Number((height / speed / 4).toFixed(1)) * 1e3 : ~~(height / speed / 4) * 1e3;
|
|
21906
|
-
const timerCurr = setInterval(
|
|
21909
|
+
const timerCurr = window.setInterval(
|
|
21910
|
+
showhorseLamp,
|
|
21911
|
+
time + Number(standTime)
|
|
21912
|
+
);
|
|
21907
21913
|
SetTimer(timerCurr);
|
|
21908
21914
|
};
|
|
21909
21915
|
const showhorseLamp = () => {
|
|
@@ -21916,7 +21922,7 @@
|
|
|
21916
21922
|
}, time);
|
|
21917
21923
|
};
|
|
21918
21924
|
const startRoll = () => {
|
|
21919
|
-
const timerCurr = setInterval(() => {
|
|
21925
|
+
const timerCurr = window.setInterval(() => {
|
|
21920
21926
|
const chunk = 100;
|
|
21921
21927
|
for (let i = 0; i < chunk; i++) {
|
|
21922
21928
|
scroll(i, !(i < chunk - 1));
|
|
@@ -22914,7 +22920,7 @@
|
|
|
22914
22920
|
style2.top = `${Number(top) || parseFloat(top) || 0}px`;
|
|
22915
22921
|
style2.right = `${Number(right) || parseFloat(right) || 0}px`;
|
|
22916
22922
|
style2.zIndex = zIndex;
|
|
22917
|
-
style2.
|
|
22923
|
+
style2.background = color;
|
|
22918
22924
|
return style2;
|
|
22919
22925
|
};
|
|
22920
22926
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -25855,7 +25861,7 @@
|
|
|
25855
25861
|
}, [barrageList]);
|
|
25856
25862
|
const run = () => {
|
|
25857
25863
|
clearInterval(timer.current);
|
|
25858
|
-
timer.current = setInterval(() => {
|
|
25864
|
+
timer.current = window.setInterval(() => {
|
|
25859
25865
|
play();
|
|
25860
25866
|
run();
|
|
25861
25867
|
}, frequency);
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
input,
|
|
44
|
+
.nut-number-input,
|
|
44
45
|
&__text--readonly {
|
|
45
46
|
width: $inputnumber-input-width;
|
|
46
47
|
height: 100%;
|
|
@@ -53,7 +54,9 @@
|
|
|
53
54
|
border-radius: $inputnumber-input-border-radius;
|
|
54
55
|
}
|
|
55
56
|
input::-webkit-outer-spin-button,
|
|
56
|
-
input::-webkit-inner-spin-button
|
|
57
|
+
input::-webkit-inner-spin-button,
|
|
58
|
+
.nut-number-input::-webkit-outer-spin-button,
|
|
59
|
+
.nut-number-input::-webkit-inner-spin-button {
|
|
57
60
|
appearance: none;
|
|
58
61
|
}
|
|
59
62
|
}
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
.nut-theme-dark {
|
|
2
2
|
.nut-signature {
|
|
3
3
|
&__inner {
|
|
4
|
-
|
|
4
|
+
Canvas {
|
|
5
5
|
background-color: $dark3;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
.demo-tips {
|
|
10
|
-
background-color: $dark3;
|
|
11
10
|
color: $dark1;
|
|
12
11
|
}
|
|
13
12
|
}
|
|
14
13
|
.nut-signature {
|
|
14
|
+
.spcanvas_WEAPP {
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
Canvas {
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
15
21
|
&__inner {
|
|
16
|
-
|
|
22
|
+
Canvas {
|
|
17
23
|
background-color: #fff;
|
|
18
24
|
}
|
|
25
|
+
|
|
19
26
|
height: $signature-height;
|
|
20
27
|
margin-bottom: $signature-margin-bottom;
|
|
21
28
|
border: $signature-border-width solid $signature-border-color;
|