@nutui/nutui-react-taro 2.0.0-alpha.8 → 2.0.0-alpha.9

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 (69) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/esm/Address.js +2 -2
  3. package/dist/esm/Card.js +5 -5
  4. package/dist/esm/DatePicker.js +2 -3
  5. package/dist/esm/Elevator.js +1 -1
  6. package/dist/esm/ImagePreview.js +4 -7
  7. package/dist/esm/Indicator.js +1 -1
  8. package/dist/esm/InputNumber.js +1 -1
  9. package/dist/esm/Notify.js +2 -3
  10. package/dist/esm/NumberKeyboard.js +3 -5
  11. package/dist/esm/Picker.js +1 -2
  12. package/dist/esm/Price.js +2 -3
  13. package/dist/esm/PullToRefresh.js +4 -6
  14. package/dist/esm/Radio.js +3 -3
  15. package/dist/esm/RadioGroup.js +3 -3
  16. package/dist/esm/Step.js +1 -1
  17. package/dist/esm/Steps.js +1 -1
  18. package/dist/esm/Sticky.js +1 -2
  19. package/dist/esm/Swiper.js +3 -5
  20. package/dist/esm/SwiperItem.js +1 -5
  21. package/dist/esm/{address.taro-1c534feb.js → address.taro-1a8ab3f1.js} +1 -1
  22. package/dist/esm/{card.taro-a46fdf25.js → card.taro-2080f4d2.js} +1 -1
  23. package/dist/esm/{datepicker.taro-3f718964.js → datepicker.taro-65dbeceb.js} +1 -1
  24. package/dist/esm/{elevator.taro-bc162e4f.js → elevator.taro-df8fde9d.js} +20 -15
  25. package/dist/esm/{imagepreview.taro-8832dc01.js → imagepreview.taro-2508d412.js} +8 -5
  26. package/dist/esm/{indicator.taro-f2bd212f.js → indicator.taro-edbc71df.js} +3 -3
  27. package/dist/esm/{inputnumber.taro-877dc947.js → inputnumber.taro-6657d2c1.js} +1 -1
  28. package/dist/esm/{notify.taro-6b6eb6bf.js → notify.taro-5768403d.js} +11 -18
  29. package/dist/esm/numberkeyboard.taro-ad8afaf9.js +136 -0
  30. package/dist/esm/nutui-react.es.js +16 -21
  31. package/dist/esm/{picker.taro-a5603921.js → picker.taro-0570ec32.js} +14 -1
  32. package/dist/esm/{price.taro-c4f45310.js → price.taro-479f1b82.js} +17 -17
  33. package/dist/esm/pulltorefresh.taro-6afe4805.js +138 -0
  34. package/dist/esm/radio.taro-5d6ca4ad.js +153 -0
  35. package/dist/esm/step.taro-3bc01c0c.js +1 -1
  36. package/dist/esm/steps.taro-77e301ab.js +1 -1
  37. package/dist/esm/{sticky.taro-3c03eb0a.js → sticky.taro-f8ae8d5e.js} +21 -1
  38. package/dist/esm/swiper.taro-53a36427.js +83 -0
  39. package/dist/esm/swiperitem.taro-ef7342e8.js +14 -0
  40. package/dist/locales/base.js +1 -1
  41. package/dist/locales/en-US.js +1 -1
  42. package/dist/locales/id-ID.js +1 -1
  43. package/dist/locales/zh-CN.js +1 -1
  44. package/dist/locales/zh-TW.js +1 -1
  45. package/dist/locales/zh-UG.js +1 -1
  46. package/dist/nutui.react.mjs +1162 -6119
  47. package/dist/nutui.react.umd.js +1546 -6519
  48. package/dist/packages/imagepreview/imagepreview.scss +5 -0
  49. package/dist/packages/notify/notify.scss +1 -1
  50. package/dist/packages/numberkeyboard/numberkeyboard.scss +29 -77
  51. package/dist/packages/price/price.scss +8 -0
  52. package/dist/packages/pulltorefresh/pulltorefresh.scss +0 -8
  53. package/dist/packages/radio/radio.scss +13 -32
  54. package/dist/packages/radiogroup/radiogroup.scss +17 -51
  55. package/dist/packages/swiper/swiper.scss +0 -15
  56. package/dist/style.css +1 -1
  57. package/dist/style.mjs +1 -1
  58. package/dist/styles/variables-jmapp.scss +50 -44
  59. package/dist/styles/variables.scss +50 -46
  60. package/dist/types/index.d.ts +63 -92
  61. package/package.json +1 -1
  62. package/dist/esm/UserContext-735db09f.js +0 -5
  63. package/dist/esm/get-scroll-parent-8da04f2e.js +0 -24
  64. package/dist/esm/numberkeyboard.taro-0a0e866a.js +0 -183
  65. package/dist/esm/pulltorefresh.taro-c611fd92.js +0 -179
  66. package/dist/esm/radio.taro-3a54f4c8.js +0 -152
  67. package/dist/esm/supports-passive-aaaf0eff.js +0 -17
  68. package/dist/esm/swiper.taro-74cf9306.js +0 -430
  69. package/dist/esm/swiperitem-80df464a.js +0 -29
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ # v2.0.0-alpha.9
2
+ `2023-05-17`
3
+
4
+ * :sparkles: feat: add createProperties.js (#1001) @Eiinu
5
+ * :sparkles: feat: cascader支持受控 (#1000) @xiaoyatong
6
+ * :sparkles: feat: elevator 支持右侧索引是否展示 (#1006) @拧巴的猫
7
+ * :bug: fix(image): lazy 优化观察对象数量 (#1015) @Eiinu
8
+ * :bug: fix: tabs children 变更后需要展示新的 title (#999) @oasis-cloud
9
+ * :bug: fix: 格式化,删掉某些无用代码 (#1014) @xiaoyatong
10
+ * 🛠 refactor: notify (#983) @拧巴的猫
11
+ * 🛠 refactor: NumberKeyboard (#1012) @Eiinu
12
+ * 🛠 refactor: price (#989) @拧巴的猫
13
+ * 🛠 refactor: pulltorefresh (#1011) @oasis-cloud
14
+ * 🛠 refactor: radio (#1009) @oasis-cloud
15
+ * 🛠 refactor: Range (#991) @Eiinu
16
+ * 🛠 refactor: swiper 重构;indcator 的索引计算改为从 0 开始 (#1008) @oasis-cloud
17
+ * 🔨 chore: autoplay -> autoPlay (#1007) @Eiinu
18
+ * 📖 docs(tabbar): update description (#1004) @Eiinu
19
+
20
+
1
21
  # v2.0.0-alpha.8
2
22
  `2023-05-12`
3
23
  * :sparkles:feat: cascader支持受控 (#1000) @xiaoyatong
@@ -1,4 +1,4 @@
1
- import { A as Address } from "./address.taro-1c534feb.js";
1
+ import { A as Address } from "./address.taro-1a8ab3f1.js";
2
2
  import "react";
3
3
  import "@nutui/icons-react-taro";
4
4
  import "./popup.taro-e756f3fc.js";
@@ -12,7 +12,7 @@ import "./bem-cdccae08.js";
12
12
  import "@bem-react/classname";
13
13
  import "./ConfigProvider.js";
14
14
  import "@tarojs/taro";
15
- import "./elevator.taro-bc162e4f.js";
15
+ import "./elevator.taro-df8fde9d.js";
16
16
  import "./configprovider.taro-25758d9f.js";
17
17
  export {
18
18
  Address as default
package/dist/esm/Card.js CHANGED
@@ -1,12 +1,12 @@
1
- import { C as Card } from "./card.taro-a46fdf25.js";
1
+ import { C as Card } from "./card.taro-2080f4d2.js";
2
2
  import "react";
3
3
  import "classnames";
4
- import "./price.taro-c4f45310.js";
5
- import "./bem-cdccae08.js";
6
- import "@bem-react/classname";
4
+ import "./price.taro-479f1b82.js";
5
+ import "./typings-11d83a22.js";
7
6
  import "./tag.taro-1b4134a5.js";
8
7
  import "@nutui/icons-react-taro";
9
- import "./typings-11d83a22.js";
8
+ import "./bem-cdccae08.js";
9
+ import "@bem-react/classname";
10
10
  export {
11
11
  Card as default
12
12
  };
@@ -1,7 +1,7 @@
1
- import { D as DatePicker } from "./datepicker.taro-3f718964.js";
1
+ import { D as DatePicker } from "./datepicker.taro-65dbeceb.js";
2
2
  import "react";
3
3
  import "@tarojs/components";
4
- import "./picker.taro-a5603921.js";
4
+ import "./picker.taro-0570ec32.js";
5
5
  import "classnames";
6
6
  import "@tarojs/taro";
7
7
  import "./popup.taro-e756f3fc.js";
@@ -12,7 +12,6 @@ import "./overlay.taro-75012bd3.js";
12
12
  import "./typings-11d83a22.js";
13
13
  import "./use-touch-ff43512c.js";
14
14
  import "./use-client-rect-f317804e.js";
15
- import "./supports-passive-aaaf0eff.js";
16
15
  import "./can-use-dom-0e539bd3.js";
17
16
  import "./configprovider.taro-25758d9f.js";
18
17
  import "./use-props-value-7ac1b1b5.js";
@@ -1,4 +1,4 @@
1
- import { E as Elevator } from "./elevator.taro-bc162e4f.js";
1
+ import { E as Elevator } from "./elevator.taro-df8fde9d.js";
2
2
  import "react";
3
3
  import "@tarojs/taro";
4
4
  import "@tarojs/components";
@@ -1,4 +1,4 @@
1
- import { I as ImagePreview } from "./imagepreview.taro-8832dc01.js";
1
+ import { I as ImagePreview } from "./imagepreview.taro-2508d412.js";
2
2
  import "react";
3
3
  import "./popup.taro-e756f3fc.js";
4
4
  import "react-dom";
@@ -8,12 +8,9 @@ import "@nutui/icons-react-taro";
8
8
  import "@tarojs/components";
9
9
  import "./overlay.taro-75012bd3.js";
10
10
  import "./typings-11d83a22.js";
11
- import "./swiper.taro-74cf9306.js";
12
- import "@tarojs/taro";
13
- import "./UserContext-fde5badc.js";
14
- import "./bem-cdccae08.js";
15
- import "@bem-react/classname";
16
- import "./swiperitem-80df464a.js";
11
+ import "./swiper.taro-53a36427.js";
12
+ import "./indicator.taro-edbc71df.js";
13
+ import "./swiperitem.taro-ef7342e8.js";
17
14
  export {
18
15
  ImagePreview as default
19
16
  };
@@ -1,4 +1,4 @@
1
- import { I as Indicator } from "./indicator.taro-f2bd212f.js";
1
+ import { I as Indicator } from "./indicator.taro-edbc71df.js";
2
2
  import "react";
3
3
  import "classnames";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import { I as InputNumber } from "./inputnumber.taro-877dc947.js";
1
+ import { I as InputNumber } from "./inputnumber.taro-6657d2c1.js";
2
2
  import "react";
3
3
  import "@nutui/icons-react-taro";
4
4
  import "classnames";
@@ -1,9 +1,8 @@
1
- import { N as Notify } from "./notify.taro-6b6eb6bf.js";
1
+ import { N as Notify } from "./notify.taro-5768403d.js";
2
2
  import "react";
3
3
  import "classnames";
4
4
  import "react-transition-group";
5
- import "./bem-cdccae08.js";
6
- import "@bem-react/classname";
5
+ import "./typings-11d83a22.js";
7
6
  export {
8
7
  Notify as default
9
8
  };
@@ -1,13 +1,11 @@
1
- import { N as NumberKeyboard } from "./numberkeyboard.taro-0a0e866a.js";
1
+ import { N as NumberKeyboard } from "./numberkeyboard.taro-ad8afaf9.js";
2
2
  import "react";
3
3
  import "classnames";
4
- import "./bem-cdccae08.js";
5
- import "@bem-react/classname";
4
+ import "@nutui/icons-react-taro";
5
+ import "@tarojs/components";
6
6
  import "./popup.taro-e756f3fc.js";
7
7
  import "react-dom";
8
8
  import "react-transition-group";
9
- import "@nutui/icons-react-taro";
10
- import "@tarojs/components";
11
9
  import "./overlay.taro-75012bd3.js";
12
10
  import "./typings-11d83a22.js";
13
11
  import "./configprovider.taro-25758d9f.js";
@@ -1,4 +1,4 @@
1
- import { P as Picker } from "./picker.taro-a5603921.js";
1
+ import { P as Picker } from "./picker.taro-0570ec32.js";
2
2
  import "react";
3
3
  import "classnames";
4
4
  import "@tarojs/taro";
@@ -11,7 +11,6 @@ import "./overlay.taro-75012bd3.js";
11
11
  import "./typings-11d83a22.js";
12
12
  import "./use-touch-ff43512c.js";
13
13
  import "./use-client-rect-f317804e.js";
14
- import "./supports-passive-aaaf0eff.js";
15
14
  import "./can-use-dom-0e539bd3.js";
16
15
  import "./configprovider.taro-25758d9f.js";
17
16
  import "./use-props-value-7ac1b1b5.js";
package/dist/esm/Price.js CHANGED
@@ -1,7 +1,6 @@
1
- import { P as Price } from "./price.taro-c4f45310.js";
1
+ import { P as Price } from "./price.taro-479f1b82.js";
2
2
  import "react";
3
- import "./bem-cdccae08.js";
4
- import "@bem-react/classname";
3
+ import "./typings-11d83a22.js";
5
4
  export {
6
5
  Price as default
7
6
  };
@@ -1,11 +1,9 @@
1
- import { P as PullToRefresh } from "./pulltorefresh.taro-c611fd92.js";
1
+ import { P as PullToRefresh } from "./pulltorefresh.taro-6afe4805.js";
2
2
  import "react";
3
- import "@use-gesture/react";
4
- import "@react-spring/web";
3
+ import "@tarojs/components";
5
4
  import "./configprovider.taro-25758d9f.js";
6
- import "./get-scroll-parent-8da04f2e.js";
7
- import "./can-use-dom-0e539bd3.js";
8
- import "./supports-passive-aaaf0eff.js";
5
+ import "./use-touch-ff43512c.js";
6
+ import "./typings-11d83a22.js";
9
7
  export {
10
8
  PullToRefresh as default
11
9
  };
package/dist/esm/Radio.js CHANGED
@@ -1,9 +1,9 @@
1
- import { R as Radio } from "./radio.taro-3a54f4c8.js";
1
+ import { R as Radio } from "./radio.taro-5d6ca4ad.js";
2
2
  import "react";
3
3
  import "@nutui/icons-react-taro";
4
+ import "classnames";
4
5
  import "./typings-11d83a22.js";
5
- import "./bem-cdccae08.js";
6
- import "@bem-react/classname";
6
+ import "./use-props-value-7ac1b1b5.js";
7
7
  export {
8
8
  Radio as default
9
9
  };
@@ -1,9 +1,9 @@
1
- import { a as RadioGroup } from "./radio.taro-3a54f4c8.js";
1
+ import { a as RadioGroup } from "./radio.taro-5d6ca4ad.js";
2
2
  import "react";
3
3
  import "@nutui/icons-react-taro";
4
+ import "classnames";
4
5
  import "./typings-11d83a22.js";
5
- import "./bem-cdccae08.js";
6
- import "@bem-react/classname";
6
+ import "./use-props-value-7ac1b1b5.js";
7
7
  export {
8
8
  RadioGroup as default
9
9
  };
package/dist/esm/Step.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { S as Step } from "./step.taro-3bc01c0c.js";
2
2
  import "react";
3
3
  import "classnames";
4
- import "./UserContext-735db09f.js";
4
+ import "./UserContext-fde5badc.js";
5
5
  import "./bem-cdccae08.js";
6
6
  import "@bem-react/classname";
7
7
  import "./typings-11d83a22.js";
package/dist/esm/Steps.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { S as Steps } from "./steps.taro-77e301ab.js";
2
2
  import "react";
3
3
  import "classnames";
4
- import "./UserContext-735db09f.js";
4
+ import "./UserContext-fde5badc.js";
5
5
  import "./bem-cdccae08.js";
6
6
  import "@bem-react/classname";
7
7
  export {
@@ -1,10 +1,9 @@
1
- import { S as Sticky } from "./sticky.taro-3c03eb0a.js";
1
+ import { S as Sticky } from "./sticky.taro-f8ae8d5e.js";
2
2
  import "react";
3
3
  import "classnames";
4
4
  import "@tarojs/taro";
5
5
  import "./typings-11d83a22.js";
6
6
  import "./use-client-rect-f317804e.js";
7
- import "./get-scroll-parent-8da04f2e.js";
8
7
  import "./can-use-dom-0e539bd3.js";
9
8
  export {
10
9
  Sticky as default
@@ -1,10 +1,8 @@
1
- import { S as Swiper } from "./swiper.taro-74cf9306.js";
1
+ import { S as Swiper } from "./swiper.taro-53a36427.js";
2
2
  import "react";
3
+ import "@tarojs/components";
3
4
  import "classnames";
4
- import "@tarojs/taro";
5
- import "./UserContext-fde5badc.js";
6
- import "./bem-cdccae08.js";
7
- import "@bem-react/classname";
5
+ import "./indicator.taro-edbc71df.js";
8
6
  export {
9
7
  Swiper as default
10
8
  };
@@ -1,9 +1,5 @@
1
- import { S as SwiperItem } from "./swiperitem-80df464a.js";
1
+ import { S as SwiperItem } from "./swiperitem.taro-ef7342e8.js";
2
2
  import "react";
3
- import "classnames";
4
- import "./UserContext-fde5badc.js";
5
- import "./bem-cdccae08.js";
6
- import "@bem-react/classname";
7
3
  export {
8
4
  SwiperItem as default
9
5
  };
@@ -4,7 +4,7 @@ import { P as Popup } from "./popup.taro-e756f3fc.js";
4
4
  import { c as cn } from "./bem-cdccae08.js";
5
5
  import { useConfig } from "./ConfigProvider.js";
6
6
  import { createSelectorQuery } from "@tarojs/taro";
7
- import { E as Elevator } from "./elevator.taro-bc162e4f.js";
7
+ import { E as Elevator } from "./elevator.taro-df8fde9d.js";
8
8
  import { u as useConfig$1 } from "./configprovider.taro-25758d9f.js";
9
9
  import { C as ComponentDefaults } from "./typings-11d83a22.js";
10
10
  const defaultProps$2 = {
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import classNames from "classnames";
3
- import { P as Price } from "./price.taro-c4f45310.js";
3
+ import { P as Price } from "./price.taro-479f1b82.js";
4
4
  import { T as Tag } from "./tag.taro-1b4134a5.js";
5
5
  import { c as cn } from "./bem-cdccae08.js";
6
6
  const defaultProps = {};
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useRef, useEffect } from "react";
2
2
  import { View } from "@tarojs/components";
3
- import { P as Picker } from "./picker.taro-a5603921.js";
3
+ import { P as Picker } from "./picker.taro-0570ec32.js";
4
4
  import { u as useConfig } from "./configprovider.taro-25758d9f.js";
5
5
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
6
6
  const defaultProps = {
@@ -12,10 +12,11 @@ const defaultProps = {
12
12
  sticky: false,
13
13
  spaceHeight: 23,
14
14
  titleHeight: 35,
15
+ showKeys: true,
15
16
  className: "weapp-elevator"
16
17
  };
17
18
  const Elevator = (props) => {
18
- const { height, floorKey, list, sticky, spaceHeight, titleHeight, className, style, onClickItem, onClickIndex, children, ...rest } = {
19
+ const { height, floorKey, list, sticky, spaceHeight, titleHeight, showKeys, className, style, onClickItem, onClickIndex, children, ...rest } = {
19
20
  ...defaultProps,
20
21
  ...props
21
22
  };
@@ -172,20 +173,24 @@ const Elevator = (props) => {
172
173
  );
173
174
  }))
174
175
  ),
175
- list.length && scrollStart ? React.createElement("div", { className: classNames({
176
- [`${classPrefix}__code--current`]: true,
177
- [`${classPrefix}__code--current--current`]: true
178
- }) }, list[codeIndex][floorKey]) : null,
179
- React.createElement(
180
- "div",
181
- { className: `${classPrefix}__bars` },
182
- React.createElement("div", { className: `${classPrefix}__bars__inner`, onTouchStart: (event) => touchStart(event), onTouchMove: (event) => touchMove(event), onTouchEnd: touchEnd, style: { touchAction: "pan-y" } }, list.map((item, index) => {
183
- return React.createElement("div", { className: classNames({
184
- [`${classPrefix}__bars__inner__item`]: true,
185
- [`${classPrefix}__bars__inner__item--active`]: item[floorKey] === list[currentIndex][floorKey]
186
- }), "data-index": index, key: index, onClick: () => handleClickIndex(item[floorKey]) }, item[floorKey]);
187
- }))
188
- ),
176
+ showKeys ? React.createElement(
177
+ React.Fragment,
178
+ null,
179
+ list.length && scrollStart ? React.createElement("div", { className: classNames({
180
+ [`${classPrefix}__code--current`]: true,
181
+ [`${classPrefix}__code--current--current`]: true
182
+ }) }, list[codeIndex][floorKey]) : null,
183
+ React.createElement(
184
+ "div",
185
+ { className: `${classPrefix}__bars` },
186
+ React.createElement("div", { className: `${classPrefix}__bars__inner`, onTouchStart: (event) => touchStart(event), onTouchMove: (event) => touchMove(event), onTouchEnd: touchEnd, style: { touchAction: "pan-y" } }, list.map((item, index) => {
187
+ return React.createElement("div", { className: classNames({
188
+ [`${classPrefix}__bars__inner__item`]: true,
189
+ [`${classPrefix}__bars__inner__item--active`]: item[floorKey] === list[currentIndex][floorKey]
190
+ }), "data-index": index, key: index, onClick: () => handleClickIndex(item[floorKey]) }, item[floorKey]);
191
+ }))
192
+ )
193
+ ) : null,
189
194
  sticky && scrollY > 0 ? React.createElement(
190
195
  "div",
191
196
  { className: `${classPrefix}__list__fixed` },
@@ -1,12 +1,12 @@
1
1
  import React, { useRef, useState, useEffect } from "react";
2
2
  import { P as Popup } from "./popup.taro-e756f3fc.js";
3
- import { S as Swiper } from "./swiper.taro-74cf9306.js";
4
- import { S as SwiperItem } from "./swiperitem-80df464a.js";
3
+ import { S as Swiper } from "./swiper.taro-53a36427.js";
4
+ import { S as SwiperItem } from "./swiperitem.taro-ef7342e8.js";
5
5
  const defaultProps = {
6
6
  images: [],
7
7
  videos: [],
8
8
  show: false,
9
- autoplay: 3e3,
9
+ autoPlay: false,
10
10
  initNo: 1,
11
11
  contentClose: false,
12
12
  paginationVisible: false,
@@ -15,7 +15,7 @@ const defaultProps = {
15
15
  }
16
16
  };
17
17
  const ImagePreview = (props) => {
18
- const { images, videos, show, initNo, paginationColor, paginationVisible, autoplay, contentClose, onClose } = props;
18
+ const { images, videos, show, initNo, paginationColor, paginationVisible, autoPlay, contentClose, onClose } = props;
19
19
  const nutImagePreview = useRef(null);
20
20
  const [showPop, setShowPop] = useState(false);
21
21
  const [active, setActive] = useState(1);
@@ -139,7 +139,10 @@ const ImagePreview = (props) => {
139
139
  React.createElement(
140
140
  "div",
141
141
  { className: "nut-imagepreview", ref: nutImagePreview, onClick: closeOnImg, onTouchStart },
142
- React.createElement(Swiper, { autoPlay: autoplay, className: "nut-imagepreview-swiper", loop: true, isPreventDefault: false, style: { display: showPop ? "block" : "none" }, direction: "horizontal", onChange: slideChangeEnd, initPage: initNo && (initNo > maxNo ? maxNo - 1 : initNo - 1), paginationColor, paginationVisible }, images && images.length > 0 ? images.map((item, index) => {
142
+ React.createElement(Swiper, { autoPlay, className: "nut-imagepreview-swiper", loop: true, style: {
143
+ display: showPop ? "block" : "none",
144
+ "--nutui-indicator-color": paginationColor
145
+ }, direction: "horizontal", onChange: (e) => slideChangeEnd(e.detail.current), defaultValue: initNo && (initNo > maxNo ? maxNo - 1 : initNo - 1), indicator: paginationVisible }, images && images.length > 0 ? images.map((item, index) => {
143
146
  return React.createElement(
144
147
  SwiperItem,
145
148
  { key: index },
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import classNames from "classnames";
3
3
  const defaultProps = {
4
4
  total: 3,
5
- current: 1,
5
+ current: 0,
6
6
  direction: "horizontal"
7
7
  };
8
8
  const classPrefix = `nut-indicator`;
@@ -16,8 +16,8 @@ const Indicator = (props) => {
16
16
  });
17
17
  const renderElement = () => {
18
18
  const childs = [];
19
- for (let item = 1; item <= total; item++) {
20
- childs.push(item === current ? React.createElement(React.Fragment, null, children || React.createElement("div", { key: item, className: `${classPrefix}__dot ${classPrefix}__active` })) : React.createElement("div", { key: item, className: `${classPrefix}__dot` }));
19
+ for (let item = 0; item < total; item++) {
20
+ childs.push(item === current ? children || React.createElement("div", { key: item, className: `${classPrefix}__dot ${classPrefix}__active` }) : React.createElement("div", { key: item, className: `${classPrefix}__dot` }));
21
21
  }
22
22
  return childs;
23
23
  };
@@ -22,7 +22,7 @@ const InputNumber = (props) => {
22
22
  ...props
23
23
  };
24
24
  const inputRef = useRef("");
25
- let [_checked, setChecked] = usePropsValue({
25
+ const [_checked, setChecked] = usePropsValue({
26
26
  value,
27
27
  defaultValue
28
28
  });
@@ -1,25 +1,22 @@
1
1
  import React, { useState, useEffect } from "react";
2
2
  import classNames from "classnames";
3
3
  import { CSSTransition } from "react-transition-group";
4
- import { c as cn } from "./bem-cdccae08.js";
4
+ import { C as ComponentDefaults } from "./typings-11d83a22.js";
5
5
  const defaultProps = {
6
+ ...ComponentDefaults,
6
7
  id: "",
7
- msg: "",
8
- color: "",
9
8
  duration: 3e3,
10
9
  type: "danger",
11
- className: "",
12
- background: "",
13
10
  position: "top",
14
- isWrapTeleport: true,
15
11
  visible: false,
16
- onClosed: () => {
12
+ onClose: () => {
17
13
  },
18
14
  onClick: () => {
19
15
  }
20
16
  };
17
+ const classPrefix = "nut-notify";
21
18
  const Notify = (props) => {
22
- const { id, children, style, msg, color, background, type, className, position, isWrapTeleport, visible, duration, onClosed, onClick, ...rest } = { ...defaultProps, ...props };
19
+ const { id, children, style, type, className, position, visible, duration, onClose, onClick, ...rest } = { ...defaultProps, ...props };
23
20
  let timer;
24
21
  const [showNotify, SetShow] = useState(false);
25
22
  useEffect(() => {
@@ -53,14 +50,13 @@ const Notify = (props) => {
53
50
  const element = document.getElementById(id);
54
51
  element && element.parentNode && element.parentNode.removeChild(element);
55
52
  }
56
- onClosed();
53
+ onClose();
57
54
  };
58
- cn("notify");
59
55
  const classes = classNames({
60
- "nut-notify--popup-top": position === "top",
61
- "nut-notify--popup-bottom": position === "bottom",
62
- "nut-notify": true,
63
- [`nut-notify--${type}`]: true
56
+ [`${classPrefix}--popup-top`]: position === "top",
57
+ [`${classPrefix}--popup-bottom`]: position === "bottom",
58
+ [`${classPrefix}`]: true,
59
+ [`${classPrefix}--${type}`]: true
64
60
  });
65
61
  return React.createElement(
66
62
  React.Fragment,
@@ -68,10 +64,7 @@ const Notify = (props) => {
68
64
  React.createElement(
69
65
  CSSTransition,
70
66
  { in: showNotify, timeout: 300, classNames: "fade", unmountOnExit: true, appear: true, position, id },
71
- React.createElement("div", { className: `${classes} ${className}`, style: {
72
- color: `${color || ""}`,
73
- background: `${background || ""}`
74
- }, onClick: clickHandle }, children || msg)
67
+ React.createElement("div", { className: `${classes} ${className}`, style, onClick: clickHandle }, children)
75
68
  )
76
69
  );
77
70
  };
@@ -0,0 +1,136 @@
1
+ import React, { useMemo, useState } from "react";
2
+ import classNames from "classnames";
3
+ import { RectDown } from "@nutui/icons-react-taro";
4
+ import { View } from "@tarojs/components";
5
+ import { P as Popup } from "./popup.taro-e756f3fc.js";
6
+ import { u as useConfig } from "./configprovider.taro-25758d9f.js";
7
+ import { C as ComponentDefaults } from "./typings-11d83a22.js";
8
+ const defaultProps = {
9
+ ...ComponentDefaults,
10
+ visible: false,
11
+ type: "default",
12
+ custom: [],
13
+ random: false,
14
+ onClose: () => {
15
+ }
16
+ };
17
+ const NumberKeyboard = (props) => {
18
+ const { locale } = useConfig();
19
+ const { title, confirmText, visible, type, custom, random, style, className, onChange, onDelete, onClose, onConfirm, ...rest } = props;
20
+ const classPrefix = "nut-numberkeyboard";
21
+ const getBasicKeys = () => {
22
+ const keys = new Array(9).fill(0).map((_, index) => {
23
+ return {
24
+ id: String(index + 1),
25
+ type: "num"
26
+ };
27
+ });
28
+ return random ? keys.sort(() => Math.random() > 0.5 ? 1 : -1) : keys;
29
+ };
30
+ const getCustomKeys = () => {
31
+ const customKeys = [
32
+ { id: "close", type: "close" },
33
+ { id: "0", type: "num" },
34
+ { id: "delete", type: "delete" }
35
+ ];
36
+ if (!custom)
37
+ return customKeys;
38
+ if (custom.length > 0) {
39
+ customKeys[0] = { id: custom[0], type: "custom" };
40
+ }
41
+ if (custom.length > 1) {
42
+ customKeys[2] = { id: custom[1], type: "custom" };
43
+ }
44
+ return customKeys;
45
+ };
46
+ const keysList = useMemo(() => {
47
+ return [...getBasicKeys(), ...getCustomKeys()];
48
+ }, [type, random, custom]);
49
+ const DeleteIcon = () => {
50
+ const style2 = {
51
+ background: `url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAnCAYAAABJ0cukAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjA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2RK4jnuPvTToXgR0LW9Htpap71iAzPVNsUIMH0XMdXkfLrfD9BdanifksiKW/5w3Emj3mcHBgb6kpKTn6KYzfBCehzg10H6lHPzMdIWq9U8znEpsXE6N4rTO9TjSGgPanG/pfwjwABn1PZcM5XI0AAAAABJRU5ErkJggg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTkwMjA5MzIyMjIxMzkzMzc2NzAwNjg0MC0tDQo=') no-repeat center`,
52
+ backgroundSize: "100% 100%",
53
+ width: "30px",
54
+ height: "24px"
55
+ };
56
+ return React.createElement(View, { style: style2 });
57
+ };
58
+ const NumberKeyboardKey = (props2) => {
59
+ const { item } = props2;
60
+ const [active, setActive] = useState(false);
61
+ const onTouchStart = () => {
62
+ setActive(true);
63
+ };
64
+ const onTouchEnd = (item2) => {
65
+ setActive(false);
66
+ if (item2.type === "num" || item2.type === "custom") {
67
+ onChange && onChange(item2.id);
68
+ }
69
+ if (item2.type === "close") {
70
+ onClose && onClose();
71
+ }
72
+ if (item2.type === "delete") {
73
+ onDelete && onDelete();
74
+ }
75
+ if (item2.type === "confirm") {
76
+ onConfirm && onConfirm();
77
+ }
78
+ };
79
+ return React.createElement(
80
+ "div",
81
+ { key: item.id, className: `${classPrefix}__body__wrapper` },
82
+ React.createElement(
83
+ "div",
84
+ { className: classNames({
85
+ key: true,
86
+ active,
87
+ close: item.type === "close",
88
+ delete: item.type === "delete",
89
+ confirm: item.type === "confirm"
90
+ }), onTouchStart: () => onTouchStart(), onTouchEnd: () => onTouchEnd(item), onTouchCancel: () => onTouchEnd(item) },
91
+ (item.type === "num" || item.type === "custom") && React.createElement("div", null, item.id),
92
+ item.type === "delete" && React.createElement(DeleteIcon, null),
93
+ item.type === "close" && React.createElement(RectDown, { size: 25 }),
94
+ item.type === "confirm" && React.createElement(React.Fragment, null, confirmText || locale.done)
95
+ )
96
+ );
97
+ };
98
+ return React.createElement(
99
+ Popup,
100
+ { visible, position: "bottom", onClickOverlay: onClose, onClickCloseIcon: onClose, overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }, ...rest },
101
+ React.createElement(
102
+ "div",
103
+ { className: classNames(classPrefix, className), style },
104
+ title && React.createElement(
105
+ "div",
106
+ { className: `${classPrefix}__header` },
107
+ React.createElement("h3", { className: `${classPrefix}__header__title` }, title),
108
+ type === "default" && React.createElement("span", { className: `${classPrefix}__header__close`, onClick: onClose }, locale.done)
109
+ ),
110
+ React.createElement(
111
+ "div",
112
+ { className: `${classPrefix}__body` },
113
+ React.createElement("div", { className: `${classPrefix}__body__keys` }, keysList == null ? void 0 : keysList.map((item) => {
114
+ return React.createElement(NumberKeyboardKey, { key: item.id, item });
115
+ })),
116
+ type === "rightColumn" && React.createElement(
117
+ "div",
118
+ { className: `${classPrefix}__sidebar` },
119
+ React.createElement(NumberKeyboardKey, { key: "delete", item: {
120
+ id: "delete",
121
+ type: "delete"
122
+ } }),
123
+ React.createElement(NumberKeyboardKey, { key: "confirm", item: {
124
+ id: "confirm",
125
+ type: "confirm"
126
+ } })
127
+ )
128
+ )
129
+ )
130
+ );
131
+ };
132
+ NumberKeyboard.defaultProps = defaultProps;
133
+ NumberKeyboard.displayName = "NutNumberKeyboard";
134
+ export {
135
+ NumberKeyboard as N
136
+ };