@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/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-41da5070.js';
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) switch (_context3.prev = _context3.next) {
106
- case 0:
107
- api.start({
108
- height: headHeight
109
- });
110
- setStatus('refreshing');
111
- _context3.prev = 2;
112
- _context3.next = 5;
113
- return props.onRefresh();
114
- case 5:
115
- setStatus('complete');
116
- _context3.next = 12;
117
- break;
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
- _context3.next = 15;
152
- return sleep(props.completeDelay);
153
- case 15:
154
- api.start({
155
- to: function () {
156
- var _to2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(next) {
157
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
158
- while (1) switch (_context2.prev = _context2.next) {
159
- case 0:
160
- _context2.next = 2;
161
- return next({
162
- height: 0
163
- });
164
- case 2:
165
- setStatus('pulling');
166
- case 3:
167
- case "end":
168
- return _context2.stop();
169
- }
170
- }, _callee2);
171
- }));
172
- function to(_x2) {
173
- return _to2.apply(this, arguments);
174
- }
175
- return to;
176
- }()
177
- });
178
- case 16:
179
- case "end":
180
- return _context3.stop();
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) switch (_context.prev = _context.next) {
59
- case 0:
60
- return _context.abrupt("return", Promise.resolve().then(function () {
61
- var _container$MARK;
62
- (_container$MARK = container[MARK]) === null || _container$MARK === void 0 ? void 0 : _container$MARK.unmount();
63
- delete container[MARK];
64
- }));
65
- case 1:
66
- case "end":
67
- return _context.stop();
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
  }));
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.4.2-beta.0 Wed Jan 04 2023 14:55:05 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.4.3-beta.0 Wed Jan 11 2023 14:45:50 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 v1.4.2-beta.0 Wed Jan 04 2023 14:55:05 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.4.3-beta.0 Wed Jan 11 2023 14:45:50 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 v1.4.2-beta.0 Wed Jan 04 2023 14:55:05 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.4.3-beta.0 Wed Jan 11 2023 14:45:50 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 v1.4.2-beta.0 Wed Jan 04 2023 14:55:05 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.4.3-beta.0 Wed Jan 11 2023 14:45:50 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 v1.4.2-beta.0 Wed Jan 04 2023 14:55:05 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.4.3-beta.0 Wed Jan 11 2023 14:45:50 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 v1.4.2-beta.0 Wed Jan 04 2023 14:55:05 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v1.4.3-beta.0 Wed Jan 11 2023 14:45:50 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 v1.4.2-beta.0 Wed Jan 04 2023 14:54:28 GMT+0800 (China Standard Time)
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(showhorseLamp, time + Number(standTime));
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.backgroundColor = color;
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);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v1.4.2-beta.0 Wed Jan 04 2023 14:54:28 GMT+0800 (China Standard Time)
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(showhorseLamp, time + Number(standTime));
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.backgroundColor = color;
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);
@@ -6,4 +6,5 @@
6
6
  height: fit-content;
7
7
  touch-action: none;
8
8
  user-select: none;
9
+ font-size: 0;
9
10
  }
@@ -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
- canvas {
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
- canvas {
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;