@nutui/nutui-react-taro 1.4.1 → 1.4.2-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 (43) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +4 -4
  3. package/dist/esm/DatePicker.js +3 -3
  4. package/dist/esm/Input.js +2 -2
  5. package/dist/esm/Picker.js +2 -2
  6. package/dist/esm/SideNavBar.js +3 -3
  7. package/dist/esm/SubSideNavBar.js +3 -3
  8. package/dist/esm/address.taro-c03b8b16.js +23 -21
  9. package/dist/esm/barrage.taro-d86c367a.js +22 -24
  10. package/dist/esm/calendaritem.taro-85a8c4fc.js +16 -18
  11. package/dist/esm/cascader.taro-459f7d45.js +234 -244
  12. package/dist/esm/{datepicker.taro-00a72ca3.js → datepicker.taro-7de67b85.js} +1 -1
  13. package/dist/esm/ellipsis.taro-c0de6ff4.js +76 -84
  14. package/dist/esm/{input.taro-65db24c3.js → input.taro-8b3f8381.js} +12 -24
  15. package/dist/esm/menuitem.taro-2f8e69a4.js +14 -16
  16. package/dist/esm/noticebar.taro-43c18dc9.js +31 -33
  17. package/dist/esm/nutui-react.es.js +6 -6
  18. package/dist/esm/offsetContext-bfb02c25.js +3 -0
  19. package/dist/esm/{picker.taro-e23bc9d1.js → picker.taro-9b7263ca.js} +11 -15
  20. package/dist/esm/popover.taro-7e5dff8c.js +15 -17
  21. package/dist/esm/pulltorefresh.taro-f26a20dd.js +75 -81
  22. package/dist/esm/range.taro-4cbe2469.js +67 -71
  23. package/dist/esm/{sidenavbar.taro-a828250a.js → sidenavbar.taro-3b1f1218.js} +13 -5
  24. package/dist/esm/{subsidenavbar.taro-4c80ad38.js → subsidenavbar.taro-f46b4c73.js} +12 -11
  25. package/dist/esm/swipe.taro-83bc248f.js +35 -37
  26. package/dist/esm/swiper.taro-852f6615.js +26 -28
  27. package/dist/esm/types/src/packages/input/input.d.ts +0 -8
  28. package/dist/esm/types/src/packages/input/input.taro.d.ts +0 -8
  29. package/dist/esm/useClientRect-bf69d7b3.js +10 -12
  30. package/dist/locales/base.js +2 -2
  31. package/dist/locales/en-US.js +2 -2
  32. package/dist/locales/id-ID.js +2 -2
  33. package/dist/locales/zh-CN.js +2 -2
  34. package/dist/locales/zh-TW.js +2 -2
  35. package/dist/locales/zh-UG.js +2 -2
  36. package/dist/nutui.react.es.js +66 -88
  37. package/dist/nutui.react.umd.js +66 -88
  38. package/dist/packages/input/input.scss +12 -12
  39. package/dist/style.css +1 -1
  40. package/dist/style.es.js +2 -2
  41. package/dist/types/index.d.ts +0 -8
  42. package/package.json +1 -1
  43. package/dist/esm/offsetContext-0e3d04b3.js +0 -16
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # v1.4.2
2
+ `2023-01-04`
3
+
4
+ * :sparkles: feat: taro适配 sidenavbar 组件 (#558) @libin0824
5
+ * :bug: fix: input error 状态重置失效问题修改;校验格式 onBlur 失效问题修改 (#567) @vickyYe
6
+ * 🔨 chore: picker 组件删除无用的日志输出 (#566) @oasis-cloud
7
+
1
8
  # v1.4.1
2
9
  `2022-12-28`
3
10
 
package/README.md CHANGED
@@ -42,14 +42,14 @@
42
42
 
43
43
  ## Features
44
44
 
45
- * 🚀 60+ High Quality Components
46
- * 📖 Based on JD APP 10.0 Visual Specifications
45
+ * 🚀 70+ High Quality Components
46
+ * 📖 Based on JD APP 11.0 Visual Specifications
47
47
  * 🍭 Support Tree Shaking
48
48
  * 📖 Extensive Documentation and Demos
49
49
  * 💪 Written in TypeScript
50
50
  * 💪 Support SSR (Experimental)
51
51
  * 🍭 Support Custom Themes
52
- * 🍭 80%+ Unit Test Coverage
52
+ * 🍭 90%+ Unit Test Coverage
53
53
  * 📖 Provide Sketch Design Resources
54
54
 
55
55
 
@@ -148,4 +148,4 @@ NutUI follows [Angular Style Commit Message Conventions](https://gist.github.com
148
148
 
149
149
  ## Open Source License
150
150
 
151
- This project is based on **MIT** protocol
151
+ This project is based on **MIT** protocol
@@ -1,7 +1,7 @@
1
- import { D as DatePicker } from './datepicker.taro-00a72ca3.js';
2
- export { D as default } from './datepicker.taro-00a72ca3.js';
1
+ import { D as DatePicker } from './datepicker.taro-7de67b85.js';
2
+ export { D as default } from './datepicker.taro-7de67b85.js';
3
3
  import 'react';
4
- import './picker.taro-e23bc9d1.js';
4
+ import './picker.taro-9b7263ca.js';
5
5
  import './popup.taro-33d0bbc8.js';
6
6
  import 'react-dom';
7
7
  import 'react-transition-group';
package/dist/esm/Input.js CHANGED
@@ -1,5 +1,5 @@
1
- import { I as Input } from './input.taro-65db24c3.js';
2
- export { I as default } from './input.taro-65db24c3.js';
1
+ import { I as Input } from './input.taro-8b3f8381.js';
2
+ export { I as default } from './input.taro-8b3f8381.js';
3
3
  import 'react';
4
4
  import './icon.taro-1d0d4fb7.js';
5
5
  import './bem-893ad28d.js';
@@ -1,5 +1,5 @@
1
- import { P as Picker } from './picker.taro-e23bc9d1.js';
2
- export { P as default } from './picker.taro-e23bc9d1.js';
1
+ import { P as Picker } from './picker.taro-9b7263ca.js';
2
+ export { P as default } from './picker.taro-9b7263ca.js';
3
3
  import 'react';
4
4
  import './popup.taro-33d0bbc8.js';
5
5
  import 'react-dom';
@@ -1,5 +1,5 @@
1
- import { S as SideNavBar } from './sidenavbar.taro-a828250a.js';
2
- export { S as default } from './sidenavbar.taro-a828250a.js';
1
+ import { S as SideNavBar } from './sidenavbar.taro-3b1f1218.js';
2
+ export { S as default } from './sidenavbar.taro-3b1f1218.js';
3
3
  import 'react';
4
4
  import './configprovider.taro-8bdb3a28.js';
5
5
  import 'lodash';
@@ -13,4 +13,4 @@ import './bem-893ad28d.js';
13
13
  import '@bem-react/classname';
14
14
  import './icon.taro-1d0d4fb7.js';
15
15
  import './typings-1c5f2628.js';
16
- import './offsetContext-0e3d04b3.js';
16
+ import './offsetContext-bfb02c25.js';
@@ -1,4 +1,4 @@
1
- import { S as SubSideNavBar } from './subsidenavbar.taro-4c80ad38.js';
2
- export { S as default } from './subsidenavbar.taro-4c80ad38.js';
1
+ import { S as SubSideNavBar } from './subsidenavbar.taro-f46b4c73.js';
2
+ export { S as default } from './subsidenavbar.taro-f46b4c73.js';
3
3
  import 'react';
4
- import './offsetContext-0e3d04b3.js';
4
+ import './offsetContext-bfb02c25.js';
@@ -275,32 +275,34 @@ var CustomRender = function CustomRender(props) {
275
275
  if (modelValue.length > 0) {
276
276
  var tagIndex = 0;
277
277
  var selectedRegionC = selectedRegion && Object.assign(selectedRegion);
278
- for (var index = 0; index < modelValue.length; index++) {
278
+ var _loop = function _loop() {
279
279
  if (regionList[tabName[index]].length === 0) {
280
280
  tagIndex = index - 1;
281
281
  setTabIndex(index - 1);
282
- break;
282
+ return "break";
283
283
  } else {
284
- (function () {
285
- var val = modelValue[index];
286
- var arr = regionList[tabName[index]];
287
- if (privateType === 'custom') {
288
- selectedRegionC[[tabName[index]]] = arr.filter(function (item) {
289
- return item.id === val;
290
- })[0];
291
- } else if (privateType === 'custom2') {
292
- var sumArr = [];
293
- arr.forEach(function (item) {
294
- sumArr.push.apply(sumArr, _toConsumableArray(item.list));
295
- });
296
- selectedRegionC[[tabName[index]]] = sumArr.filter(function (item) {
297
- return item.id === val;
298
- })[0];
299
- }
300
- tagIndex = index;
301
- setSelectedRegion(selectedRegionC);
302
- })();
284
+ var val = modelValue[index];
285
+ var arr = regionList[tabName[index]];
286
+ if (privateType === 'custom') {
287
+ selectedRegionC[[tabName[index]]] = arr.filter(function (item) {
288
+ return item.id === val;
289
+ })[0];
290
+ } else if (privateType === 'custom2') {
291
+ var sumArr = [];
292
+ arr.forEach(function (item) {
293
+ sumArr.push.apply(sumArr, _toConsumableArray(item.list));
294
+ });
295
+ selectedRegionC[[tabName[index]]] = sumArr.filter(function (item) {
296
+ return item.id === val;
297
+ })[0];
298
+ }
299
+ tagIndex = index;
300
+ setSelectedRegion(selectedRegionC);
303
301
  }
302
+ };
303
+ for (var index = 0; index < modelValue.length; index++) {
304
+ var _ret = _loop();
305
+ if (_ret === "break") break;
304
306
  }
305
307
  setTabIndex(tagIndex);
306
308
  lineAnimation(tagIndex);
@@ -58,30 +58,28 @@ var InternalBarrage = function InternalBarrage(props, ref) {
58
58
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
59
59
  var _index, el;
60
60
  return _regeneratorRuntime.wrap(function _callee$(_context) {
61
- while (1) {
62
- switch (_context.prev = _context.next) {
63
- case 0:
64
- _index = loop ? index.current % barrageList.length : index.current;
65
- el = document.createElement("div");
66
- el.innerHTML = barrageList[_index];
67
- el.classList.add('barrage-item');
68
- barrageContainer.current.appendChild(el);
69
- Taro.createSelectorQuery().select('.barrage-item').boundingClientRect(function (res) {
70
- console.log('res', res);
71
- var height = res === null || res === void 0 ? void 0 : res.height;
72
- el.classList.add('move');
73
- el.style.animationDuration = "".concat(speeds, "ms");
74
- el.style.top = "".concat(_index % rows * (height + top) + 20, "px");
75
- el.dataset.index = "".concat(_index);
76
- el.addEventListener('animationend', function () {
77
- barrageContainer.current.removeChild(el);
78
- });
79
- index.current++;
80
- }).exec();
81
- case 6:
82
- case "end":
83
- return _context.stop();
84
- }
61
+ while (1) switch (_context.prev = _context.next) {
62
+ case 0:
63
+ _index = loop ? index.current % barrageList.length : index.current;
64
+ el = document.createElement("div");
65
+ el.innerHTML = barrageList[_index];
66
+ el.classList.add('barrage-item');
67
+ barrageContainer.current.appendChild(el);
68
+ Taro.createSelectorQuery().select('.barrage-item').boundingClientRect(function (res) {
69
+ console.log('res', res);
70
+ var height = res === null || res === void 0 ? void 0 : res.height;
71
+ el.classList.add('move');
72
+ el.style.animationDuration = "".concat(speeds, "ms");
73
+ el.style.top = "".concat(_index % rows * (height + top) + 20, "px");
74
+ el.dataset.index = "".concat(_index);
75
+ el.addEventListener('animationend', function () {
76
+ barrageContainer.current.removeChild(el);
77
+ });
78
+ index.current++;
79
+ }).exec();
80
+ case 6:
81
+ case "end":
82
+ return _context.stop();
85
83
  }
86
84
  }, _callee);
87
85
  }));
@@ -341,24 +341,22 @@ var CalendarItem = function CalendarItem(props) {
341
341
  requestAniFrame$1( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
342
342
  var weeksPanelRes, monthsDoms, i;
343
343
  return _regeneratorRuntime.wrap(function _callee$(_context) {
344
- while (1) {
345
- switch (_context.prev = _context.next) {
346
- case 0:
347
- if (!(weeksPanel !== null && weeksPanel !== void 0 && weeksPanel.current && monthsPanel !== null && monthsPanel !== void 0 && monthsPanel.current)) {
348
- _context.next = 7;
349
- break;
350
- }
351
- _context.next = 3;
352
- return getRectByTaro(weeksPanel === null || weeksPanel === void 0 ? void 0 : weeksPanel.current);
353
- case 3:
354
- weeksPanelRes = _context.sent;
355
- weeksPanelRes === null || weeksPanelRes === void 0 ? void 0 : weeksPanelRes.bottom;
356
- monthsDoms = monthsPanel.current.getElementsByClassName('calendar-month');
357
- for (i = 0; i < monthsDoms.length; i++) {}
358
- case 7:
359
- case "end":
360
- return _context.stop();
361
- }
344
+ while (1) switch (_context.prev = _context.next) {
345
+ case 0:
346
+ if (!(weeksPanel !== null && weeksPanel !== void 0 && weeksPanel.current && monthsPanel !== null && monthsPanel !== void 0 && monthsPanel.current)) {
347
+ _context.next = 7;
348
+ break;
349
+ }
350
+ _context.next = 3;
351
+ return getRectByTaro(weeksPanel === null || weeksPanel === void 0 ? void 0 : weeksPanel.current);
352
+ case 3:
353
+ weeksPanelRes = _context.sent;
354
+ weeksPanelRes === null || weeksPanelRes === void 0 ? void 0 : weeksPanelRes.bottom;
355
+ monthsDoms = monthsPanel.current.getElementsByClassName('calendar-month');
356
+ for (i = 0; i < monthsDoms.length; i++) {}
357
+ case 7:
358
+ case "end":
359
+ return _context.stop();
362
360
  }
363
361
  }, _callee);
364
362
  })));