@nutui/nutui-react-taro 2.0.0-alpha.7 → 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 (76) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/esm/Address.js +2 -2
  3. package/dist/esm/Audio.js +7 -6
  4. package/dist/esm/Card.js +5 -5
  5. package/dist/esm/Cascader.js +2 -2
  6. package/dist/esm/DatePicker.js +2 -3
  7. package/dist/esm/Elevator.js +1 -1
  8. package/dist/esm/ImagePreview.js +4 -7
  9. package/dist/esm/Indicator.js +1 -1
  10. package/dist/esm/InputNumber.js +1 -1
  11. package/dist/esm/Notify.js +2 -3
  12. package/dist/esm/NumberKeyboard.js +3 -5
  13. package/dist/esm/Picker.js +1 -2
  14. package/dist/esm/Price.js +2 -3
  15. package/dist/esm/PullToRefresh.js +4 -6
  16. package/dist/esm/Radio.js +3 -3
  17. package/dist/esm/RadioGroup.js +3 -3
  18. package/dist/esm/Range/style/index.js +1 -1
  19. package/dist/esm/Range.js +5 -7
  20. package/dist/esm/Sticky.js +1 -2
  21. package/dist/esm/Swiper.js +3 -5
  22. package/dist/esm/SwiperItem.js +1 -5
  23. package/dist/esm/Tabs.js +1 -1
  24. package/dist/esm/{address.taro-1c534feb.js → address.taro-1a8ab3f1.js} +1 -1
  25. package/dist/esm/{audio.taro-ec96ef80.js → audio.taro-bbd39f93.js} +2 -2
  26. package/dist/esm/{card.taro-a46fdf25.js → card.taro-2080f4d2.js} +1 -1
  27. package/dist/esm/{cascader.taro-0a2694ed.js → cascader.taro-fb7a0230.js} +21 -13
  28. package/dist/esm/{datepicker.taro-3f718964.js → datepicker.taro-65dbeceb.js} +1 -1
  29. package/dist/esm/{elevator.taro-bc162e4f.js → elevator.taro-df8fde9d.js} +20 -15
  30. package/dist/esm/{imagepreview.taro-8832dc01.js → imagepreview.taro-2508d412.js} +8 -5
  31. package/dist/esm/{indicator.taro-f2bd212f.js → indicator.taro-edbc71df.js} +3 -3
  32. package/dist/esm/{inputnumber.taro-877dc947.js → inputnumber.taro-6657d2c1.js} +1 -1
  33. package/dist/esm/{notify.taro-6b6eb6bf.js → notify.taro-5768403d.js} +11 -18
  34. package/dist/esm/numberkeyboard.taro-ad8afaf9.js +136 -0
  35. package/dist/esm/nutui-react.es.js +20 -25
  36. package/dist/esm/{picker.taro-a5603921.js → picker.taro-0570ec32.js} +14 -1
  37. package/dist/esm/{price.taro-c4f45310.js → price.taro-479f1b82.js} +17 -17
  38. package/dist/esm/pulltorefresh.taro-6afe4805.js +138 -0
  39. package/dist/esm/radio.taro-5d6ca4ad.js +153 -0
  40. package/dist/esm/range.taro-615e193a.js +259 -0
  41. package/dist/esm/{sticky.taro-3c03eb0a.js → sticky.taro-f8ae8d5e.js} +21 -1
  42. package/dist/esm/swiper.taro-53a36427.js +83 -0
  43. package/dist/esm/swiperitem.taro-ef7342e8.js +14 -0
  44. package/dist/esm/{tabs.taro-b75f20ff.js → tabs.taro-66164782.js} +8 -1
  45. package/dist/locales/base.js +1 -1
  46. package/dist/locales/en-US.js +1 -1
  47. package/dist/locales/id-ID.js +1 -1
  48. package/dist/locales/zh-CN.js +1 -1
  49. package/dist/locales/zh-TW.js +1 -1
  50. package/dist/locales/zh-UG.js +1 -1
  51. package/dist/nutui.react.mjs +1634 -6666
  52. package/dist/nutui.react.umd.js +2047 -7095
  53. package/dist/packages/imagepreview/imagepreview.scss +5 -0
  54. package/dist/packages/notify/notify.scss +1 -1
  55. package/dist/packages/numberkeyboard/numberkeyboard.scss +29 -77
  56. package/dist/packages/price/price.scss +8 -0
  57. package/dist/packages/pulltorefresh/pulltorefresh.scss +0 -8
  58. package/dist/packages/radio/radio.scss +13 -32
  59. package/dist/packages/radiogroup/radiogroup.scss +17 -51
  60. package/dist/packages/range/range.scss +24 -49
  61. package/dist/packages/swiper/swiper.scss +0 -15
  62. package/dist/style.css +1 -1
  63. package/dist/style.mjs +1 -1
  64. package/dist/styles/variables-jmapp.scss +61 -61
  65. package/dist/styles/variables.scss +61 -60
  66. package/dist/types/index.d.ts +83 -118
  67. package/package.json +1 -1
  68. package/dist/esm/UserContext-735db09f.js +0 -5
  69. package/dist/esm/get-scroll-parent-8da04f2e.js +0 -24
  70. package/dist/esm/numberkeyboard.taro-0a0e866a.js +0 -183
  71. package/dist/esm/pulltorefresh.taro-c611fd92.js +0 -179
  72. package/dist/esm/radio.taro-3a54f4c8.js +0 -152
  73. package/dist/esm/range.taro-52cda918.js +0 -325
  74. package/dist/esm/supports-passive-aaaf0eff.js +0 -17
  75. package/dist/esm/swiper.taro-74cf9306.js +0 -430
  76. package/dist/esm/swiperitem-80df464a.js +0 -29
package/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
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
+
21
+ # v2.0.0-alpha.8
22
+ `2023-05-12`
23
+ * :sparkles:feat: cascader支持受控 (#1000) @xiaoyatong
24
+ * :bug: fix: tabs children 变更后需要展示新的 title (#999) @oasis-cloud
25
+ * 🛠 refactor: Range (#991) @Eiinu
26
+
1
27
  # v2.0.0-alpha.7
2
28
  `2023-05-12`
3
29
  * :bug: fix: tabs children 变化需要更新选中状态 @oasis-cloud
@@ -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/Audio.js CHANGED
@@ -1,17 +1,18 @@
1
- import { A as Audio } from "./audio.taro-ec96ef80.js";
1
+ import { A as Audio } from "./audio.taro-bbd39f93.js";
2
2
  import "react";
3
3
  import "@tarojs/taro";
4
4
  import "@nutui/icons-react-taro";
5
- import "./range.taro-52cda918.js";
5
+ import "./range.taro-615e193a.js";
6
+ import "classnames";
7
+ import "@tarojs/components";
6
8
  import "./use-touch-ff43512c.js";
7
9
  import "./use-client-rect-f317804e.js";
8
- import "./toast.taro-92c10e1d.js";
9
- import "classnames";
10
+ import "./typings-11d83a22.js";
11
+ import "./use-props-value-7ac1b1b5.js";
12
+ import "./button.taro-01eae688.js";
10
13
  import "./bem-cdccae08.js";
11
14
  import "@bem-react/classname";
12
15
  import "./configprovider.taro-25758d9f.js";
13
- import "./button.taro-01eae688.js";
14
- import "./typings-11d83a22.js";
15
16
  export {
16
17
  Audio as default
17
18
  };
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,4 +1,4 @@
1
- import { C as Cascader } from "./cascader.taro-0a2694ed.js";
1
+ import { C as Cascader } from "./cascader.taro-fb7a0230.js";
2
2
  import "react";
3
3
  import "classnames";
4
4
  import "./popup.taro-e756f3fc.js";
@@ -8,7 +8,7 @@ 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 "./tabs.taro-b75f20ff.js";
11
+ import "./tabs.taro-66164782.js";
12
12
  import "./tabpane.taro-f8d92ece.js";
13
13
  import "./use-props-value-7ac1b1b5.js";
14
14
  export {
@@ -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-735db09f.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
  };
@@ -1,2 +1,2 @@
1
- import '../../Toast/style'
1
+
2
2
  import '../../../packages/range/range.scss'
package/dist/esm/Range.js CHANGED
@@ -1,13 +1,11 @@
1
- import { R as Range } from "./range.taro-52cda918.js";
1
+ import { R as Range } from "./range.taro-615e193a.js";
2
2
  import "react";
3
+ import "classnames";
4
+ import "@tarojs/components";
3
5
  import "./use-touch-ff43512c.js";
4
6
  import "./use-client-rect-f317804e.js";
5
- import "./toast.taro-92c10e1d.js";
6
- import "classnames";
7
- import "@nutui/icons-react-taro";
8
- import "./bem-cdccae08.js";
9
- import "@bem-react/classname";
10
- import "./configprovider.taro-25758d9f.js";
7
+ import "./typings-11d83a22.js";
8
+ import "./use-props-value-7ac1b1b5.js";
11
9
  export {
12
10
  Range as default
13
11
  };
@@ -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-735db09f.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-735db09f.js";
5
- import "./bem-cdccae08.js";
6
- import "@bem-react/classname";
7
3
  export {
8
4
  SwiperItem as default
9
5
  };
package/dist/esm/Tabs.js CHANGED
@@ -1,4 +1,4 @@
1
- import { T as Tabs } from "./tabs.taro-b75f20ff.js";
1
+ import { T as Tabs } from "./tabs.taro-66164782.js";
2
2
  import "react";
3
3
  import "@tarojs/components";
4
4
  import "classnames";
@@ -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,7 +1,7 @@
1
1
  import React, { useState, useRef } from "react";
2
2
  import { createInnerAudioContext } from "@tarojs/taro";
3
3
  import { Service } from "@nutui/icons-react-taro";
4
- import { R as Range } from "./range.taro-52cda918.js";
4
+ import { R as Range } from "./range.taro-615e193a.js";
5
5
  import { B as Button } from "./button.taro-01eae688.js";
6
6
  import { c as cn } from "./bem-cdccae08.js";
7
7
  import { u as useConfig } from "./configprovider.taro-25758d9f.js";
@@ -148,7 +148,7 @@ const Audio = (props) => {
148
148
  React.createElement(
149
149
  "div",
150
150
  { className: b("progress-bar-wrapper") },
151
- React.createElement(Range, { modelValue: percent, hiddenTag: true, hiddenRange: true, "inactive-color": "#cccccc", "active-color": "#fa2c19" })
151
+ React.createElement(Range, { value: percent, onChange: (val) => setPercent(val), currentDescription: null, maxDescription: null, minDescription: null, "inactive-color": "#cccccc", "active-color": "#fa2c19" })
152
152
  ),
153
153
  React.createElement("div", { className: "time" }, formatSeconds(`${totalSeconds}`) || "00:00:00")
154
154
  ),
@@ -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 = {};
@@ -7,9 +7,10 @@ var __publicField = (obj, key, value) => {
7
7
  import React, { isValidElement, useState, useEffect } from "react";
8
8
  import classNames from "classnames";
9
9
  import { P as Popup } from "./popup.taro-e756f3fc.js";
10
- import { T as Tabs } from "./tabs.taro-b75f20ff.js";
10
+ import { T as Tabs } from "./tabs.taro-66164782.js";
11
11
  import { Loading, Checklist } from "@nutui/icons-react-taro";
12
12
  import { C as ComponentDefaults } from "./typings-11d83a22.js";
13
+ import { u as usePropsValue } from "./use-props-value-7ac1b1b5.js";
13
14
  const defaultProps$1 = {
14
15
  data: {
15
16
  text: "",
@@ -191,7 +192,6 @@ const defaultProps = {
191
192
  popup: true,
192
193
  visible: false,
193
194
  options: [],
194
- value: [],
195
195
  title: "",
196
196
  optionKey: { textKey: "text", valueKey: "value", childrenKey: "children" },
197
197
  format: {},
@@ -206,14 +206,22 @@ const defaultProps = {
206
206
  onChange: () => {
207
207
  },
208
208
  onPathChange: () => {
209
- },
210
- ...Popup.defaultProps
209
+ }
211
210
  };
212
211
  const InternalCascader = (props, ref) => {
213
- const { className, style, popup, visible, options, value, title, optionKey, format, closeable, closeIconPosition, closeIcon, lazy, onLoad, onClose, onChange, onPathChange } = { ...defaultProps, ...props };
212
+ const { className, style, popup, visible, options, value, defaultValue, title, optionKey, format, closeable, closeIconPosition, closeIcon, lazy, onLoad, onClose, onChange, onPathChange } = { ...defaultProps, ...props };
214
213
  const [tabvalue, setTabvalue] = useState("c1");
215
214
  const [optionsData, setOptionsData] = useState([]);
216
215
  const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
216
+ const [innerValue, setInnerValue] = usePropsValue({
217
+ value,
218
+ defaultValue,
219
+ finalValue: defaultValue,
220
+ onChange: (val) => {
221
+ var _a;
222
+ (_a = props.onChange) == null ? void 0 : _a.call(props, val);
223
+ }
224
+ });
217
225
  const [state] = useState({
218
226
  optionsData: [],
219
227
  panes: [
@@ -223,7 +231,6 @@ const InternalCascader = (props, ref) => {
223
231
  paneKey: ""
224
232
  }
225
233
  ],
226
- innerValue: value,
227
234
  tree: new Tree$1([], {}),
228
235
  tabsCursor: 0,
229
236
  initLoading: false,
@@ -242,12 +249,12 @@ const InternalCascader = (props, ref) => {
242
249
  });
243
250
  useEffect(() => {
244
251
  initData();
245
- }, [options]);
252
+ }, [options, format]);
246
253
  useEffect(() => {
247
- if (value !== state.innerValue) {
248
- state.innerValue = value;
254
+ if (defaultValue && defaultValue !== innerValue) {
255
+ setInnerValue(defaultValue);
249
256
  }
250
- }, [value]);
257
+ }, [defaultValue]);
251
258
  const initData = async () => {
252
259
  state.lazyLoadMap.clear();
253
260
  if (format && Object.keys(format).length > 0) {
@@ -279,8 +286,8 @@ const InternalCascader = (props, ref) => {
279
286
  setOptionsData(state.panes);
280
287
  };
281
288
  const syncValue = async () => {
282
- const currentValue = state.innerValue;
283
- if (currentValue === void 0 || !state.tree.nodes.length) {
289
+ const currentValue = innerValue;
290
+ if (currentValue === void 0 || currentValue !== defaultValue || !state.tree.nodes.length) {
284
291
  return;
285
292
  }
286
293
  if (currentValue.length === 0) {
@@ -308,7 +315,7 @@ const InternalCascader = (props, ref) => {
308
315
  state.initLoading = false;
309
316
  }
310
317
  }
311
- if (needToSync.length && currentValue === value) {
318
+ if (needToSync.length && currentValue === defaultValue) {
312
319
  const pathNodes = state.tree.getPathNodesByValue(needToSync);
313
320
  pathNodes.forEach((node, index) => {
314
321
  state.tabsCursor = index;
@@ -365,6 +372,7 @@ const InternalCascader = (props, ref) => {
365
372
  const optionParams = pathNodes.map((item) => item.value);
366
373
  onChange(optionParams, pathNodes);
367
374
  onPathChange(optionParams, pathNodes);
375
+ setInnerValue(optionParams);
368
376
  }
369
377
  setOptionsData(state.panes);
370
378
  close();
@@ -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
  });