@nutui/nutui-react-taro 2.0.0-alpha.14 → 2.0.0-alpha.16

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 (194) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/esm/Address.js +2 -2
  3. package/dist/esm/Audio.js +2 -2
  4. package/dist/esm/Avatar.js +3 -3
  5. package/dist/esm/Calendar.js +3 -3
  6. package/dist/esm/CalendarItem.js +2 -2
  7. package/dist/esm/Card/style/style.css +1 -1
  8. package/dist/esm/Card.js +2 -4
  9. package/dist/esm/ConfigProvider.js +2 -2
  10. package/dist/esm/CountDown.js +2 -2
  11. package/dist/esm/DatePicker.js +3 -3
  12. package/dist/esm/Dialog/style/index.js +1 -0
  13. package/dist/esm/Dialog/style/style.css +1 -1
  14. package/dist/esm/Dialog.js +2 -2
  15. package/dist/esm/Empty.js +2 -2
  16. package/dist/esm/FixedNav.js +2 -2
  17. package/dist/esm/Grid.js +3 -3
  18. package/dist/esm/GridItem.js +2 -2
  19. package/dist/esm/Image.js +2 -2
  20. package/dist/esm/ImagePreview.js +1 -1
  21. package/dist/esm/InfiniteLoading/style/style.css +1 -0
  22. package/dist/esm/InfiniteLoading.js +10 -0
  23. package/dist/esm/Input.js +2 -2
  24. package/dist/esm/Menu/style/style.css +1 -1
  25. package/dist/esm/MenuItem/style/style.css +1 -1
  26. package/dist/esm/MenuItem.js +1 -1
  27. package/dist/esm/NoticeBar.js +1 -1
  28. package/dist/esm/NumberKeyboard.js +2 -2
  29. package/dist/esm/Pagination.js +2 -2
  30. package/dist/esm/Picker.js +2 -2
  31. package/dist/esm/PullToRefresh.js +2 -2
  32. package/dist/esm/SearchBar.js +2 -2
  33. package/dist/esm/ShortPassword.js +2 -2
  34. package/dist/esm/Signature/style/index.js +1 -1
  35. package/dist/esm/Signature/style/style.css +1 -1
  36. package/dist/esm/Signature.js +1 -7
  37. package/dist/esm/Skeleton.js +4 -4
  38. package/dist/esm/Table.js +2 -2
  39. package/dist/esm/Tag/style/style.css +1 -1
  40. package/dist/esm/Tag.js +1 -1
  41. package/dist/esm/TextArea.js +2 -2
  42. package/dist/esm/TimeDetail/style/style.css +1 -1
  43. package/dist/esm/TimeDetail.js +3 -4
  44. package/dist/esm/TimeSelect/style/index.js +0 -1
  45. package/dist/esm/TimeSelect/style/style.css +1 -1
  46. package/dist/esm/TimeSelect.js +4 -7
  47. package/dist/esm/Uploader.js +2 -2
  48. package/dist/esm/WaterMark.js +2 -2
  49. package/dist/esm/{address.taro-1a8ab3f1.js → address.taro-cc879a1d.js} +1 -1
  50. package/dist/esm/{audio.taro-73011657.js → audio.taro-64b15071.js} +1 -1
  51. package/dist/esm/{avatar.taro-01536aff.js → avatar.taro-8a26cd6c.js} +1 -1
  52. package/dist/esm/{calendar.taro-10a6cb11.js → calendar.taro-02195ddb.js} +2 -2
  53. package/dist/esm/{calendaritem.taro-3e5f114e.js → calendaritem.taro-4230e5c4.js} +1 -1
  54. package/dist/esm/card.taro-92fe9733.js +64 -0
  55. package/dist/esm/{configprovider.taro-25758d9f.js → configprovider.taro-372b1525.js} +1 -1
  56. package/dist/esm/{countdown.taro-c399cc08.js → countdown.taro-8f19d21b.js} +1 -1
  57. package/dist/esm/{datepicker.taro-6304d59d.js → datepicker.taro-b480d072.js} +44 -46
  58. package/dist/esm/{dialog.taro-290eb9a6.js → dialog.taro-e5c2cb03.js} +1 -1
  59. package/dist/esm/{empty.taro-ca792f57.js → empty.taro-8345ac72.js} +1 -1
  60. package/dist/esm/{fixednav.taro-b9ecf0d5.js → fixednav.taro-6c69ad79.js} +1 -1
  61. package/dist/esm/{grid.taro-fbbd8618.js → grid.taro-9b63aca5.js} +1 -1
  62. package/dist/esm/{griditem.taro-b0c37077.js → griditem.taro-48971911.js} +1 -1
  63. package/dist/esm/{image.taro-767aa000.js → image.taro-fde6e649.js} +1 -1
  64. package/dist/esm/{imagepreview.taro-daa5a84f.js → imagepreview.taro-cfe0a4cc.js} +3 -2
  65. package/dist/esm/{infiniteloading.taro-f8f23ac6.js → infiniteloading.taro-53eeb1ec.js} +17 -33
  66. package/dist/esm/{input.taro-27d686c9.js → input.taro-69c08268.js} +1 -1
  67. package/dist/esm/{menuitem.taro-6aa35a00.js → menuitem.taro-7f8c12cf.js} +11 -8
  68. package/dist/esm/{noticebar.taro-8d496dd6.js → noticebar.taro-dc895cc5.js} +1 -1
  69. package/dist/esm/{numberkeyboard.taro-ad8afaf9.js → numberkeyboard.taro-18879f04.js} +1 -1
  70. package/dist/esm/nutui-react.es.js +39 -41
  71. package/dist/esm/{pagination.taro-63607c3b.js → pagination.taro-592bca05.js} +1 -1
  72. package/dist/esm/{picker.taro-8ba4624c.js → picker.taro-3781a455.js} +2 -2
  73. package/dist/esm/{pulltorefresh.taro-5b36a881.js → pulltorefresh.taro-3719fdfb.js} +1 -1
  74. package/dist/esm/{searchbar.taro-09468fff.js → searchbar.taro-39351331.js} +1 -1
  75. package/dist/esm/{shortpassword.taro-eabbde1b.js → shortpassword.taro-cff61e4e.js} +1 -1
  76. package/dist/esm/{signature.taro-6e75a1ac.js → signature.taro-4f68516a.js} +19 -20
  77. package/dist/esm/{skeleton.taro-0552c2ec.js → skeleton.taro-ce714b06.js} +1 -1
  78. package/dist/esm/{table.taro-15a55c5d.js → table.taro-a20f15f2.js} +1 -1
  79. package/dist/esm/tag.taro-614758eb.js +76 -0
  80. package/dist/esm/{textarea.taro-c110565e.js → textarea.taro-593cd471.js} +1 -1
  81. package/dist/esm/timedetail.taro-d7aa4c1b.js +48 -0
  82. package/dist/esm/timeselect.taro-9e37e648.js +114 -0
  83. package/dist/esm/types/src/locales/base.d.ts +1 -1
  84. package/dist/esm/types/src/packages/card/card.d.ts +8 -9
  85. package/dist/esm/types/src/packages/card/card.taro.d.ts +8 -9
  86. package/dist/esm/types/src/packages/card/index.d.ts +1 -0
  87. package/dist/esm/types/src/packages/card/index.taro.d.ts +1 -0
  88. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
  89. package/dist/esm/types/src/packages/datepicker/datepicker.d.ts +11 -17
  90. package/dist/esm/types/src/packages/datepicker/datepicker.taro.d.ts +11 -17
  91. package/dist/esm/types/src/packages/datepicker/index.d.ts +1 -0
  92. package/dist/esm/types/src/packages/datepicker/index.taro.d.ts +1 -0
  93. package/dist/esm/types/src/packages/imagepreview/imagepreview.taro.d.ts +1 -0
  94. package/dist/esm/types/src/packages/infiniteloading/demo.taro.d.ts +2 -2
  95. package/dist/esm/types/src/packages/infiniteloading/index.d.ts +3 -2
  96. package/dist/esm/types/src/packages/infiniteloading/index.taro.d.ts +3 -2
  97. package/dist/esm/types/src/packages/infiniteloading/infiniteloading.d.ts +9 -14
  98. package/dist/esm/types/src/packages/infiniteloading/infiniteloading.taro.d.ts +8 -12
  99. package/dist/esm/types/src/packages/nutui.react.build.d.ts +2 -3
  100. package/dist/esm/types/src/packages/nutui.react.d.ts +2 -4
  101. package/dist/esm/types/src/packages/nutui.react.scss.d.ts +0 -1
  102. package/dist/esm/types/src/packages/nutui.react.taro.d.ts +2 -4
  103. package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +0 -1
  104. package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +2 -3
  105. package/dist/esm/types/src/packages/signature/index.d.ts +1 -0
  106. package/dist/esm/types/src/packages/signature/index.taro.d.ts +1 -0
  107. package/dist/esm/types/src/packages/signature/signature.d.ts +10 -8
  108. package/dist/esm/types/src/packages/signature/signature.taro.d.ts +7 -12
  109. package/dist/esm/types/src/packages/tag/index.d.ts +1 -0
  110. package/dist/esm/types/src/packages/tag/index.taro.d.ts +1 -0
  111. package/dist/esm/types/src/packages/tag/tag.d.ts +4 -6
  112. package/dist/esm/types/src/packages/tag/tag.taro.d.ts +4 -6
  113. package/dist/esm/types/src/packages/timedetail/index.d.ts +1 -2
  114. package/dist/esm/types/src/packages/timedetail/timedetail.d.ts +9 -11
  115. package/dist/esm/types/src/packages/timedetail/timedetail.taro.d.ts +9 -11
  116. package/dist/esm/types/src/packages/timeselect/demo.taro.d.ts +0 -4
  117. package/dist/esm/types/src/packages/timeselect/index.d.ts +1 -0
  118. package/dist/esm/types/src/packages/timeselect/index.taro.d.ts +1 -0
  119. package/dist/esm/types/src/packages/timeselect/timeselect.d.ts +25 -20
  120. package/dist/esm/types/src/packages/timeselect/timeselect.taro.d.ts +25 -20
  121. package/dist/esm/types/src/packages/toast/Notification.d.ts +4 -1
  122. package/dist/esm/{uploader.taro-fbd05e20.js → uploader.taro-5ad88f83.js} +1 -1
  123. package/dist/esm/{watermark.taro-e2245bb1.js → watermark.taro-b6b1ae18.js} +1 -1
  124. package/dist/locales/base.d.ts +1 -1
  125. package/dist/locales/base.js +1 -1
  126. package/dist/locales/en-US.js +2 -2
  127. package/dist/locales/id-ID.js +2 -2
  128. package/dist/locales/tr-TR.js +2 -2
  129. package/dist/locales/zh-CN.js +2 -2
  130. package/dist/locales/zh-TW.js +2 -2
  131. package/dist/locales/zh-UG.js +2 -2
  132. package/dist/nutui.react.es.js +693 -730
  133. package/dist/nutui.react.umd.js +692 -729
  134. package/dist/packages/card/card.scss +8 -14
  135. package/dist/packages/infiniteloading/infiniteloading.scss +2 -25
  136. package/dist/packages/menuitem/menuitem.scss +1 -1
  137. package/dist/packages/noticebar/noticebar.scss +0 -3
  138. package/dist/packages/signature/signature.scss +1 -18
  139. package/dist/packages/tag/tag.scss +10 -17
  140. package/dist/packages/timedetail/timedetail.scss +12 -37
  141. package/dist/packages/timeselect/timeselect.scss +15 -44
  142. package/dist/style.css +1 -1
  143. package/dist/style.mjs +1 -1
  144. package/dist/styles/themes/default.scss +0 -1
  145. package/dist/styles/variables-jmapp.scss +50 -97
  146. package/dist/styles/variables.scss +51 -98
  147. package/dist/types/index.d.ts +2 -3
  148. package/dist/types/locales/base.d.ts +1 -1
  149. package/dist/types/packages/card/card.taro.d.ts +57 -14
  150. package/dist/types/packages/card/index.taro.d.ts +1 -0
  151. package/dist/types/packages/configprovider/types.d.ts +1 -1
  152. package/dist/types/packages/datepicker/datepicker.taro.d.ts +11 -17
  153. package/dist/types/packages/datepicker/index.taro.d.ts +1 -0
  154. package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +5 -0
  155. package/dist/types/packages/infiniteloading/index.taro.d.ts +3 -2
  156. package/dist/types/packages/infiniteloading/infiniteloading.taro.d.ts +52 -16
  157. package/dist/types/packages/picker/index.d.ts +4 -0
  158. package/dist/types/packages/picker/picker.d.ts +18 -0
  159. package/dist/types/packages/picker/pickerpanel.d.ts +15 -0
  160. package/dist/types/packages/popup/index.d.ts +3 -0
  161. package/dist/types/packages/popup/popup.d.ts +22 -0
  162. package/dist/types/packages/signature/index.taro.d.ts +1 -0
  163. package/dist/types/packages/signature/signature.taro.d.ts +32 -17
  164. package/dist/types/packages/tag/index.taro.d.ts +1 -0
  165. package/dist/types/packages/tag/tag.taro.d.ts +52 -14
  166. package/dist/types/packages/timedetail/timedetail.taro.d.ts +9 -11
  167. package/dist/types/packages/timeselect/index.taro.d.ts +1 -0
  168. package/dist/types/packages/timeselect/timeselect.taro.d.ts +62 -21
  169. package/dist/types/packages/toast/toast.taro.d.ts +60 -12
  170. package/package.json +1 -1
  171. package/dist/esm/Infiniteloading/style/style.css +0 -1
  172. package/dist/esm/Infiniteloading.js +0 -12
  173. package/dist/esm/TimePannel/style/css.js +0 -1
  174. package/dist/esm/TimePannel/style/index.js +0 -2
  175. package/dist/esm/TimePannel/style/style.css +0 -1
  176. package/dist/esm/TimePannel.js +0 -8
  177. package/dist/esm/card.taro-2080f4d2.js +0 -51
  178. package/dist/esm/tag.taro-1b4134a5.js +0 -92
  179. package/dist/esm/timedetail.taro-8d2acbbf.js +0 -41
  180. package/dist/esm/timepannel.taro-ee4c5dfa.js +0 -22
  181. package/dist/esm/timeselect.taro-069deedd.js +0 -133
  182. package/dist/esm/types/src/packages/timedetail/demo.d.ts +0 -3
  183. package/dist/esm/types/src/packages/timedetail/demo.taro.d.ts +0 -3
  184. package/dist/esm/types/src/packages/timepannel/demo.d.ts +0 -3
  185. package/dist/esm/types/src/packages/timepannel/demo.taro.d.ts +0 -3
  186. package/dist/esm/types/src/packages/timepannel/index.d.ts +0 -2
  187. package/dist/esm/types/src/packages/timepannel/index.taro.d.ts +0 -2
  188. package/dist/esm/types/src/packages/timepannel/timepannel.d.ts +0 -8
  189. package/dist/esm/types/src/packages/timepannel/timepannel.taro.d.ts +0 -8
  190. package/dist/packages/timepannel/timepannel.scss +0 -17
  191. package/dist/types/packages/timepannel/index.taro.d.ts +0 -2
  192. package/dist/types/packages/timepannel/timepannel.taro.d.ts +0 -8
  193. /package/dist/esm/{Infiniteloading → InfiniteLoading}/style/css.js +0 -0
  194. /package/dist/esm/{Infiniteloading → InfiniteLoading}/style/index.js +0 -0
@@ -69,29 +69,32 @@ const MenuItem = forwardRef((props, ref) => {
69
69
  return { display: "none" };
70
70
  };
71
71
  const getPosition = () => {
72
- return direction === "down" ? { top: `${position.top + position.height}px` } : {
73
- bottom: `${getSystemInfoSync().windowHeight - position.top}px`,
74
- top: "auto"
72
+ return direction === "down" ? { position: "absolute", height: `${window.innerHeight}px` } : {
73
+ position: "absolute",
74
+ bottom: "100%",
75
+ top: "auto",
76
+ height: `${window.innerHeight}px`
75
77
  };
76
78
  };
77
79
  const placeholderStyle = () => {
78
80
  if (direction === "down") {
79
81
  return {
80
82
  height: `${position.top + position.height}px`,
81
- top: 0,
83
+ top: "auto",
84
+ bottom: "-100%",
82
85
  ...isShow()
83
86
  };
84
87
  }
85
88
  return {
86
89
  height: `${getSystemInfoSync().windowHeight - position.top}px`,
87
- bottom: `0px`,
88
- top: "auto",
90
+ bottom: `auto`,
91
+ top: "0",
89
92
  ...isShow()
90
93
  };
91
94
  };
92
95
  return React.createElement(
93
- React.Fragment,
94
- null,
96
+ "div",
97
+ { className: "nut-menu-item-container", style: { position: "absolute", left: 0, right: 0 } },
95
98
  closeOnClickAway ? React.createElement("div", { className: `placeholder-element ${classNames({
96
99
  up: direction === "up"
97
100
  })}`, style: placeholderStyle(), onClick: () => parent.toggleMenuItem(index) }) : null,
@@ -314,7 +314,7 @@ const NoticeBar = (props) => {
314
314
  "nut-noticebar-page": true,
315
315
  withicon: closeable,
316
316
  close: closeable,
317
- wrap
317
+ wrapable: wrap
318
318
  });
319
319
  useEffect(() => {
320
320
  return () => {
@@ -3,7 +3,7 @@ import classNames from "classnames";
3
3
  import { RectDown } from "@nutui/icons-react-taro";
4
4
  import { View } from "@tarojs/components";
5
5
  import { P as Popup } from "./popup.taro-e756f3fc.js";
6
- import { u as useConfig } from "./configprovider.taro-25758d9f.js";
6
+ import { u as useConfig } from "./configprovider.taro-372b1525.js";
7
7
  import { C as ComponentDefaults } from "./typings-11d83a22.js";
8
8
  const defaultProps = {
9
9
  ...ComponentDefaults,
@@ -1,19 +1,19 @@
1
1
  import { B } from "./button.taro-01eae688.js";
2
2
  import { C } from "./cell.taro-4e31d1fa.js";
3
3
  import { C as C2 } from "./cellgroup.taro-a790d91b.js";
4
- import { C as C3 } from "./configprovider.taro-25758d9f.js";
5
- import { I } from "./image.taro-767aa000.js";
4
+ import { C as C3 } from "./configprovider.taro-372b1525.js";
5
+ import { I } from "./image.taro-fde6e649.js";
6
6
  import { O } from "./overlay.taro-75012bd3.js";
7
7
  import { C as C4 } from "./col.taro-d6a46a7d.js";
8
8
  import { D } from "./divider.taro-0cb5f894.js";
9
- import { G } from "./grid.taro-fbbd8618.js";
10
- import { G as G2 } from "./griditem.taro-b0c37077.js";
9
+ import { G } from "./grid.taro-9b63aca5.js";
10
+ import { G as G2 } from "./griditem.taro-48971911.js";
11
11
  import { L } from "./layout.taro-9659a928.js";
12
12
  import { R } from "./row.taro-8b7febd4.js";
13
13
  import { S } from "./sticky.taro-6bc62a96.js";
14
14
  import { B as B2 } from "./backtop.taro-7de36464.js";
15
15
  import { E } from "./elevator.taro-df8fde9d.js";
16
- import { F } from "./fixednav.taro-b9ecf0d5.js";
16
+ import { F } from "./fixednav.taro-6c69ad79.js";
17
17
  import { N } from "./navbar.taro-5e1a0835.js";
18
18
  import { S as S2 } from "./sidenavbar.taro-1aefdd3c.js";
19
19
  import { S as S3 } from "./sidenavbaritem.taro-7d805f92.js";
@@ -22,73 +22,72 @@ import { T } from "./tabbar.taro-18eee41f.js";
22
22
  import { T as T2 } from "./tabbaritem.taro-89646ca1.js";
23
23
  import { T as T3 } from "./tabpane.taro-f8d92ece.js";
24
24
  import { T as T4 } from "./tabs.taro-66164782.js";
25
- import { A } from "./address.taro-1a8ab3f1.js";
26
- import { C as C5 } from "./calendar.taro-10a6cb11.js";
27
- import { C as C6 } from "./calendaritem.taro-3e5f114e.js";
25
+ import { A } from "./address.taro-cc879a1d.js";
26
+ import { C as C5 } from "./calendar.taro-02195ddb.js";
27
+ import { C as C6 } from "./calendaritem.taro-4230e5c4.js";
28
28
  import { C as C7 } from "./cascader.taro-fb7a0230.js";
29
29
  import { C as C8, a } from "./checkbox.taro-303276d7.js";
30
- import { D as D2 } from "./datepicker.taro-6304d59d.js";
30
+ import { D as D2 } from "./datepicker.taro-b480d072.js";
31
31
  import { F as F2 } from "./form.taro-b06754e8.js";
32
32
  import { F as F3 } from "./formitem.taro-b326809d.js";
33
- import { I as I2 } from "./input.taro-27d686c9.js";
33
+ import { I as I2 } from "./input.taro-69c08268.js";
34
34
  import { I as I3 } from "./inputnumber.taro-6657d2c1.js";
35
35
  import { M } from "./menu.taro-40d36e0a.js";
36
- import { M as M2 } from "./menuitem.taro-6aa35a00.js";
37
- import { N as N2 } from "./numberkeyboard.taro-ad8afaf9.js";
38
- import { P } from "./picker.taro-8ba4624c.js";
36
+ import { M as M2 } from "./menuitem.taro-7f8c12cf.js";
37
+ import { N as N2 } from "./numberkeyboard.taro-18879f04.js";
38
+ import { P } from "./picker.taro-3781a455.js";
39
39
  import { R as R2, a as a2 } from "./radio.taro-5d6ca4ad.js";
40
40
  import { R as R3 } from "./range.taro-a1d1ad25.js";
41
41
  import { R as R4 } from "./rate.taro-78c66969.js";
42
- import { S as S5 } from "./searchbar.taro-09468fff.js";
43
- import { S as S6 } from "./shortpassword.taro-eabbde1b.js";
44
- import { S as S7 } from "./signature.taro-6e75a1ac.js";
42
+ import { S as S5 } from "./searchbar.taro-39351331.js";
43
+ import { S as S6 } from "./shortpassword.taro-cff61e4e.js";
44
+ import { S as S7 } from "./signature.taro-4f68516a.js";
45
45
  import { S as S8 } from "./switch.taro-f0da73a3.js";
46
- import { T as T5 } from "./textarea.taro-c110565e.js";
47
- import { U } from "./uploader.taro-fbd05e20.js";
46
+ import { T as T5 } from "./textarea.taro-593cd471.js";
47
+ import { U } from "./uploader.taro-5ad88f83.js";
48
48
  import { A as A2 } from "./actionsheet.taro-697a594b.js";
49
49
  import { B as B3 } from "./badge.taro-872605bf.js";
50
- import { B as B4 } from "./dialog.taro-290eb9a6.js";
50
+ import { B as B4 } from "./dialog.taro-e5c2cb03.js";
51
51
  import { D as D3 } from "./drag.taro-48e1ff38.js";
52
- import { E as E2 } from "./empty.taro-ca792f57.js";
53
- import { I as I4 } from "./infiniteloading.taro-f8f23ac6.js";
54
- import { N as N3 } from "./noticebar.taro-8d496dd6.js";
52
+ import { E as E2 } from "./empty.taro-8345ac72.js";
53
+ import { I as I4 } from "./infiniteloading.taro-53eeb1ec.js";
54
+ import { N as N3 } from "./noticebar.taro-dc895cc5.js";
55
55
  import { N as N4 } from "./notify.taro-5768403d.js";
56
56
  import { P as P2 } from "./popover.taro-ba6c323a.js";
57
- import { P as P3 } from "./pulltorefresh.taro-5b36a881.js";
58
- import { S as S9 } from "./skeleton.taro-0552c2ec.js";
57
+ import { P as P3 } from "./pulltorefresh.taro-3719fdfb.js";
58
+ import { S as S9 } from "./skeleton.taro-ce714b06.js";
59
59
  import { S as S10 } from "./swipe.taro-966af6d3.js";
60
60
  import { P as P4 } from "./popup.taro-e756f3fc.js";
61
61
  import { T as T6 } from "./toast.taro-b2937e7c.js";
62
62
  import { A as A3 } from "./animate.taro-c8b29242.js";
63
63
  import { default as default2 } from "./AnimatingNumbers.js";
64
- import { A as A4 } from "./audio.taro-73011657.js";
65
- import { A as A5 } from "./avatar.taro-01536aff.js";
64
+ import { A as A4 } from "./audio.taro-64b15071.js";
65
+ import { A as A5 } from "./avatar.taro-8a26cd6c.js";
66
66
  import { A as A6 } from "./avatargroup.taro-ad5ffb46.js";
67
67
  import { C as C9 } from "./circleprogress.taro-9064d69c.js";
68
68
  import { C as C10 } from "./collapse.taro-98577a29.js";
69
69
  import { C as C11 } from "./collapseitem.taro-9451f40f.js";
70
- import { C as C12 } from "./countdown.taro-c399cc08.js";
70
+ import { C as C12 } from "./countdown.taro-8f19d21b.js";
71
71
  import { E as E3 } from "./ellipsis.taro-5653d0b2.js";
72
- import { I as I5 } from "./imagepreview.taro-daa5a84f.js";
72
+ import { I as I5 } from "./imagepreview.taro-cfe0a4cc.js";
73
73
  import { I as I6 } from "./indicator.taro-edbc71df.js";
74
74
  import { V } from "./virtuallist.taro-97d3403a.js";
75
- import { P as P5 } from "./pagination.taro-63607c3b.js";
75
+ import { P as P5 } from "./pagination.taro-592bca05.js";
76
76
  import { P as P6 } from "./price.taro-479f1b82.js";
77
77
  import { P as P7 } from "./progress.taro-437b9f6a.js";
78
78
  import { S as S11 } from "./step.taro-2f55e4f2.js";
79
79
  import { S as S12 } from "./steps.taro-196c1f59.js";
80
80
  import { S as S13 } from "./swiper.taro-4aeb8526.js";
81
81
  import { S as S14 } from "./swiperitem.taro-ef7342e8.js";
82
- import { T as T7 } from "./table.taro-15a55c5d.js";
83
- import { T as T8 } from "./tag.taro-1b4134a5.js";
82
+ import { T as T7 } from "./table.taro-a20f15f2.js";
83
+ import { T as T8 } from "./tag.taro-614758eb.js";
84
84
  import { V as V2 } from "./video.taro-2a26d7da.js";
85
85
  import { B as B5 } from "./barrage.taro-e87bc58e.js";
86
- import { C as C13 } from "./card.taro-2080f4d2.js";
87
- import { T as T9 } from "./timedetail.taro-8d2acbbf.js";
88
- import { T as T10 } from "./timepannel.taro-ee4c5dfa.js";
89
- import { T as T11 } from "./timeselect.taro-069deedd.js";
90
- import { T as T12 } from "./trendarrow.taro-253025d2.js";
91
- import { W } from "./watermark.taro-e2245bb1.js";
86
+ import { C as C13 } from "./card.taro-92fe9733.js";
87
+ import { T as T9 } from "./timedetail.taro-d7aa4c1b.js";
88
+ import { T as T10 } from "./timeselect.taro-9e37e648.js";
89
+ import { T as T11 } from "./trendarrow.taro-253025d2.js";
90
+ import { W } from "./watermark.taro-b6b1ae18.js";
92
91
  import "react";
93
92
  import "classnames";
94
93
  import "@nutui/icons-react-taro";
@@ -150,7 +149,7 @@ export {
150
149
  I as Image,
151
150
  I5 as ImagePreview,
152
151
  I6 as Indicator,
153
- I4 as Infiniteloading,
152
+ I4 as InfiniteLoading,
154
153
  I2 as Input,
155
154
  I3 as InputNumber,
156
155
  L as Layout,
@@ -195,10 +194,9 @@ export {
195
194
  T8 as Tag,
196
195
  T5 as TextArea,
197
196
  T9 as TimeDetail,
198
- T10 as TimePannel,
199
- T11 as TimeSelect,
197
+ T10 as TimeSelect,
200
198
  T6 as Toast,
201
- T12 as TrendArrow,
199
+ T11 as TrendArrow,
202
200
  U as Uploader,
203
201
  V2 as Video,
204
202
  V as VirtualList,
@@ -1,6 +1,6 @@
1
1
  import React, { useMemo } from "react";
2
2
  import classNames from "classnames";
3
- import { u as useConfig } from "./configprovider.taro-25758d9f.js";
3
+ import { u as useConfig } from "./configprovider.taro-372b1525.js";
4
4
  import { u as usePropsValue } from "./use-props-value-7ac1b1b5.js";
5
5
  import { C as ComponentDefaults } from "./typings-11d83a22.js";
6
6
  const defaultProps = {
@@ -6,7 +6,7 @@ import { P as Popup } from "./popup.taro-e756f3fc.js";
6
6
  import { u as useTouch } from "./use-touch-ff43512c.js";
7
7
  import { g as getRectByTaro } from "./use-client-rect-2bb6c562.js";
8
8
  import { c as canUseDom } from "./can-use-dom-0e539bd3.js";
9
- import { u as useConfig } from "./configprovider.taro-25758d9f.js";
9
+ import { u as useConfig } from "./configprovider.taro-372b1525.js";
10
10
  import { u as usePropsValue } from "./use-props-value-7ac1b1b5.js";
11
11
  import { C as ComponentDefaults } from "./typings-11d83a22.js";
12
12
  let passiveSupported = false;
@@ -456,7 +456,7 @@ const InternalPicker = (props, ref) => {
456
456
  };
457
457
  return React.createElement(
458
458
  Popup,
459
- { visible, position: "bottom", onClose: () => {
459
+ { visible, position: "bottom", afterClose: () => {
460
460
  closePicker();
461
461
  } },
462
462
  React.createElement(
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useState } from "react";
2
2
  import { View } from "@tarojs/components";
3
- import { u as useConfig } from "./configprovider.taro-25758d9f.js";
3
+ import { u as useConfig } from "./configprovider.taro-372b1525.js";
4
4
  import { u as useTouch } from "./use-touch-ff43512c.js";
5
5
  import { C as ComponentDefaults } from "./typings-11d83a22.js";
6
6
  function bound(position, min, max) {
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useState, useEffect } from "react";
2
2
  import { Search, CircleClose } from "@nutui/icons-react-taro";
3
- import { u as useConfig } from "./configprovider.taro-25758d9f.js";
3
+ import { u as useConfig } from "./configprovider.taro-372b1525.js";
4
4
  import { C as ComponentDefaults } from "./typings-11d83a22.js";
5
5
  const defaultProps = {
6
6
  ...ComponentDefaults,
@@ -2,7 +2,7 @@ import React, { useMemo, useEffect } from "react";
2
2
  import { Tips } from "@nutui/icons-react-taro";
3
3
  import classNames from "classnames";
4
4
  import { P as Popup } from "./popup.taro-e756f3fc.js";
5
- import { u as useConfig } from "./configprovider.taro-25758d9f.js";
5
+ import { u as useConfig } from "./configprovider.taro-372b1525.js";
6
6
  import { C as ComponentDefaults } from "./typings-11d83a22.js";
7
7
  import { u as usePropsValue } from "./use-props-value-7ac1b1b5.js";
8
8
  const defaultProps = {
@@ -1,22 +1,19 @@
1
- import React, { useRef, useState, useEffect } from "react";
1
+ import React, { useRef, useState, useImperativeHandle, useEffect } from "react";
2
2
  import { getEnv, nextTick, createSelectorQuery, canvasToTempFilePath } from "@tarojs/taro";
3
- import { B as Button } from "./button.taro-01eae688.js";
4
- import { c as cn } from "./bem-cdccae08.js";
5
- import { u as useConfig } from "./configprovider.taro-25758d9f.js";
3
+ import { C as ComponentDefaults } from "./typings-11d83a22.js";
6
4
  const defaultProps = {
5
+ ...ComponentDefaults,
7
6
  canvasId: "spcanvas",
8
7
  type: "png",
9
8
  lineWidth: 2,
10
- strokeStyle: "#000",
11
- className: ""
9
+ strokeStyle: "#000"
12
10
  };
13
- const Signature = (props) => {
14
- const { locale } = useConfig();
15
- const { canvasId, type, lineWidth, strokeStyle, unSupportTpl, className, confirm, clear, onConfirm, onClear, ...rest } = {
11
+ const InternalSignature = (props, ref) => {
12
+ const { canvasId, type, lineWidth, strokeStyle, className, style, onConfirm, onClear, ...rest } = {
16
13
  ...defaultProps,
17
14
  ...props
18
15
  };
19
- const b = cn("signature");
16
+ const classPrefix = `nut-signature`;
20
17
  const canvasRef = useRef(null);
21
18
  const wrapRef = useRef(null);
22
19
  const [canvasHeight, setCanvasHeight] = useState(0);
@@ -54,12 +51,8 @@ const Signature = (props) => {
54
51
  ctx.current.clearRect(0, 0, canvasWidth, canvasHeight);
55
52
  ctx.current.closePath();
56
53
  }
57
- clear && clear();
58
54
  onClear && onClear();
59
55
  };
60
- const handleConfirmBtn = () => {
61
- onSave();
62
- };
63
56
  const onSave = () => {
64
57
  createSelectorQuery().select(`#${canvasId}`).fields({
65
58
  node: true,
@@ -71,7 +64,6 @@ const Signature = (props) => {
71
64
  canvasId: `${canvasId}`,
72
65
  success: (res2) => {
73
66
  handleClearBtn();
74
- confirm && confirm(res2.tempFilePath);
75
67
  onConfirm && onConfirm(res2.tempFilePath);
76
68
  },
77
69
  fail: (res2) => {
@@ -95,6 +87,14 @@ const Signature = (props) => {
95
87
  ctx.current.strokeStyle = strokeStyle;
96
88
  }
97
89
  };
90
+ useImperativeHandle(ref, () => ({
91
+ confirm: () => {
92
+ onSave();
93
+ },
94
+ clear: () => {
95
+ handleClearBtn();
96
+ }
97
+ }));
98
98
  const initCanvas = () => {
99
99
  nextTick(() => {
100
100
  setTimeout(() => {
@@ -122,8 +122,8 @@ const Signature = (props) => {
122
122
  }, []);
123
123
  return React.createElement(
124
124
  "div",
125
- { className: `${b()} ${className}`, ...rest },
126
- React.createElement("div", { className: `${b("inner")} spcanvas_WEAPP`, ref: wrapRef }, getEnv() === "WEAPP" || getEnv() === "JD" ? React.createElement("canvas", {
125
+ { className: `${classPrefix} ${className}`, ...rest },
126
+ React.createElement("div", { className: `${classPrefix}__inner spcanvas_WEAPP`, ref: wrapRef }, getEnv() === "WEAPP" || getEnv() === "JD" ? React.createElement("canvas", {
127
127
  id: canvasId,
128
128
  ref: canvasRef,
129
129
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -134,11 +134,10 @@ const Signature = (props) => {
134
134
  onTouchStart: startEventHandler,
135
135
  onTouchMove: moveEventHandler,
136
136
  onTouchEnd: endEventHandler
137
- }) : React.createElement("canvas", { id: canvasId, ref: canvasRef, "canvas-id": canvasId, "disalbe-scroll": disalbeScroll, onTouchStart: startEventHandler, onTouchMove: moveEventHandler, onTouchEnd: endEventHandler, onTouchCancel: endEventHandler })),
138
- React.createElement(Button, { className: `${b("btn")}`, type: "default", onClick: () => handleClearBtn() }, locale.signature.reSign),
139
- React.createElement(Button, { className: `${b("btn")}`, type: "primary", onClick: () => handleConfirmBtn() }, locale.confirm)
137
+ }) : React.createElement("canvas", { id: canvasId, ref: canvasRef, "canvas-id": canvasId, "disalbe-scroll": disalbeScroll, onTouchStart: startEventHandler, onTouchMove: moveEventHandler, onTouchEnd: endEventHandler, onTouchCancel: endEventHandler }))
140
138
  );
141
139
  };
140
+ const Signature = React.forwardRef(InternalSignature);
142
141
  Signature.defaultProps = defaultProps;
143
142
  Signature.displayName = "NutSignature";
144
143
  export {
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import classNames from "classnames";
3
- import { A as Avatar } from "./avatar.taro-01536aff.js";
3
+ import { A as Avatar } from "./avatar.taro-8a26cd6c.js";
4
4
  import { C as ComponentDefaults } from "./typings-11d83a22.js";
5
5
  const defaultProps = {
6
6
  ...ComponentDefaults,
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect } from "react";
2
2
  import classNames from "classnames";
3
3
  import { DownArrow } from "@nutui/icons-react-taro";
4
- import { u as useConfig } from "./configprovider.taro-25758d9f.js";
4
+ import { u as useConfig } from "./configprovider.taro-372b1525.js";
5
5
  import { C as ComponentDefaults } from "./typings-11d83a22.js";
6
6
  const defaultProps = {
7
7
  ...ComponentDefaults,
@@ -0,0 +1,76 @@
1
+ import React, { useState, useEffect } from "react";
2
+ import { Close } from "@nutui/icons-react-taro";
3
+ import classNames from "classnames";
4
+ import { C as ComponentDefaults } from "./typings-11d83a22.js";
5
+ const defaultProps = {
6
+ ...ComponentDefaults,
7
+ type: "default",
8
+ background: "",
9
+ color: "",
10
+ plain: false,
11
+ round: false,
12
+ mark: false,
13
+ closeable: false,
14
+ closeIcon: null,
15
+ onClose: (e) => {
16
+ },
17
+ onClick: (e) => {
18
+ }
19
+ };
20
+ const Tag = (props) => {
21
+ const { className, style, background, plain, type, round, children, mark, closeable, closeIcon, color, onClick, onClose } = {
22
+ ...defaultProps,
23
+ ...props
24
+ };
25
+ const [tagClass, setTagClass] = useState("");
26
+ const [visible, setVisible] = useState(true);
27
+ const classPrefix = "nut-tag";
28
+ const classes = () => {
29
+ return classNames({
30
+ [classPrefix]: true,
31
+ [`${classPrefix}--${type}`]: type,
32
+ [`${classPrefix}--plain`]: plain,
33
+ [`${classPrefix}--round`]: round,
34
+ [`${classPrefix}--mark`]: mark,
35
+ [`${classPrefix}--close`]: closeable,
36
+ [`${className}`]: className
37
+ });
38
+ };
39
+ useEffect(() => {
40
+ setTagClass(classes());
41
+ }, [type, background, color, plain, round, mark, closeable, className]);
42
+ const handleClick = (e) => {
43
+ onClick && onClick(e);
44
+ };
45
+ const getStyle = () => {
46
+ const style2 = {};
47
+ if (color) {
48
+ style2.color = color;
49
+ } else if (background && plain) {
50
+ style2.color = background;
51
+ }
52
+ if (plain) {
53
+ style2.borderColor = background;
54
+ } else if (background) {
55
+ style2.background = background;
56
+ }
57
+ return style2;
58
+ };
59
+ return React.createElement(React.Fragment, null, closeable ? visible && React.createElement(
60
+ "div",
61
+ { className: tagClass, style: { ...style, ...getStyle() }, onClick: (e) => handleClick(e) },
62
+ children && React.createElement("span", { className: `${classPrefix}-text` }, children),
63
+ React.isValidElement(closeIcon) ? React.createElement("i", { className: `${classPrefix}-custom-icon`, onClick: (e) => {
64
+ setVisible(false);
65
+ onClose && onClose(e);
66
+ } }, closeIcon) : React.createElement(Close, { size: 12, onClick: (e) => {
67
+ setVisible(false);
68
+ onClose && onClose(e);
69
+ } })
70
+ ) : React.createElement("div", { className: tagClass, style: { ...style, ...getStyle() }, onClick: (e) => handleClick(e) }, children && React.createElement("span", { className: `${classPrefix}-text` }, children)));
71
+ };
72
+ Tag.defaultProps = defaultProps;
73
+ Tag.displayName = "NutTag";
74
+ export {
75
+ Tag as T
76
+ };
@@ -2,7 +2,7 @@ import React, { useRef } from "react";
2
2
  import classNames from "classnames";
3
3
  import Taro from "@tarojs/taro";
4
4
  import { Textarea } from "@tarojs/components";
5
- import { u as useConfig } from "./configprovider.taro-25758d9f.js";
5
+ import { u as useConfig } from "./configprovider.taro-372b1525.js";
6
6
  import { C as ComponentDefaults } from "./typings-11d83a22.js";
7
7
  import { u as usePropsValue } from "./use-props-value-7ac1b1b5.js";
8
8
  const defaultProps = {
@@ -0,0 +1,48 @@
1
+ import React, { useMemo, useCallback } from "react";
2
+ import classNames from "classnames";
3
+ import { C as ComponentDefaults } from "./typings-11d83a22.js";
4
+ const defaultProps = {
5
+ ...ComponentDefaults,
6
+ activeDate: "",
7
+ activeTime: [],
8
+ options: [],
9
+ optionKey: {
10
+ valueKey: "value",
11
+ textKey: "text",
12
+ childrenKey: "children"
13
+ },
14
+ onSelect: () => {
15
+ }
16
+ };
17
+ const TimeDetail = (props) => {
18
+ const { options, optionKey, className, activeDate, activeTime, onSelect } = {
19
+ ...defaultProps,
20
+ ...props
21
+ };
22
+ const classPrefix = "nut-timedetail";
23
+ const timeList = useMemo(() => {
24
+ return (options == null ? void 0 : options.find((item) => item[optionKey.valueKey] === activeDate)) || {
25
+ [optionKey.childrenKey]: []
26
+ };
27
+ }, [options, optionKey, activeDate]);
28
+ const isActive = useCallback((timeKey) => {
29
+ const date = activeTime.find((item) => {
30
+ return item[optionKey.valueKey] === activeDate;
31
+ });
32
+ if (date == null ? void 0 : date[optionKey.childrenKey]) {
33
+ const time = date == null ? void 0 : date[optionKey.childrenKey].find((time2) => {
34
+ return time2[optionKey.valueKey] === timeKey;
35
+ });
36
+ return time;
37
+ }
38
+ return false;
39
+ }, [activeTime, optionKey, activeDate]);
40
+ return React.createElement("div", { className: classNames(classPrefix, className) }, timeList[optionKey.childrenKey].map((item) => React.createElement("span", { className: classNames(`${classPrefix}__item`, {
41
+ active: isActive(item[optionKey.valueKey])
42
+ }), key: item[optionKey.valueKey], onClick: () => onSelect(item) }, item[optionKey.textKey])));
43
+ };
44
+ TimeDetail.defaultProps = defaultProps;
45
+ TimeDetail.displayName = "NutTimeDetail";
46
+ export {
47
+ TimeDetail as T
48
+ };
@@ -0,0 +1,114 @@
1
+ import React, { useState } from "react";
2
+ import classNames from "classnames";
3
+ import { P as Popup } from "./popup.taro-e756f3fc.js";
4
+ import { T as TimeDetail } from "./timedetail.taro-d7aa4c1b.js";
5
+ import { C as ComponentDefaults } from "./typings-11d83a22.js";
6
+ import { u as useConfig } from "./configprovider.taro-372b1525.js";
7
+ const defaultProps = {
8
+ ...ComponentDefaults,
9
+ visible: false,
10
+ multiple: false,
11
+ defaultValue: [],
12
+ options: [],
13
+ optionKey: {
14
+ valueKey: "value",
15
+ textKey: "text",
16
+ childrenKey: "children"
17
+ }
18
+ };
19
+ const TimeSelect = (props) => {
20
+ const { locale } = useConfig();
21
+ const { visible, className, style, title, defaultValue, options, optionKey, multiple, onSelect, onDateChange, onTimeChange, ...rest } = {
22
+ ...defaultProps,
23
+ ...props
24
+ };
25
+ const [activeDate, setActiveDate] = useState(() => {
26
+ if (defaultValue == null ? void 0 : defaultValue.length) {
27
+ return defaultValue[0][optionKey.valueKey];
28
+ }
29
+ if (options == null ? void 0 : options.length) {
30
+ return options[0][optionKey.valueKey];
31
+ }
32
+ return "";
33
+ });
34
+ const [activeTime, setActiveTime] = useState(() => defaultValue || []);
35
+ const classPrefix = "nut-timeselect";
36
+ const closeFun = () => {
37
+ onSelect && onSelect(activeTime);
38
+ };
39
+ const handleSelectTime = (selectTime) => {
40
+ let newActiveTime = [...activeTime];
41
+ const date = newActiveTime.find((item) => {
42
+ return item[optionKey.valueKey] === activeDate;
43
+ });
44
+ if (date) {
45
+ const timeIndex = date[optionKey.childrenKey].findIndex((time) => {
46
+ return time[optionKey.valueKey] === selectTime[optionKey.valueKey];
47
+ });
48
+ if (timeIndex > -1) {
49
+ if (multiple) {
50
+ date[optionKey.childrenKey].splice(timeIndex, 1);
51
+ } else {
52
+ newActiveTime = [];
53
+ }
54
+ } else if (multiple) {
55
+ date[optionKey.childrenKey].push({ ...selectTime });
56
+ } else {
57
+ newActiveTime = [
58
+ {
59
+ [optionKey.valueKey]: activeDate,
60
+ [optionKey.childrenKey]: [{ ...selectTime }]
61
+ }
62
+ ];
63
+ }
64
+ } else if (multiple) {
65
+ newActiveTime.push({
66
+ [optionKey.valueKey]: activeDate,
67
+ [optionKey.childrenKey]: [{ ...selectTime }]
68
+ });
69
+ } else {
70
+ newActiveTime = [
71
+ {
72
+ [optionKey.valueKey]: activeDate,
73
+ [optionKey.childrenKey]: [{ ...selectTime }]
74
+ }
75
+ ];
76
+ }
77
+ newActiveTime = newActiveTime.filter((item) => {
78
+ var _a;
79
+ return ((_a = item[optionKey.childrenKey]) == null ? void 0 : _a.length) > 0;
80
+ });
81
+ setActiveTime(newActiveTime);
82
+ onTimeChange && onTimeChange(selectTime, newActiveTime);
83
+ };
84
+ const handleChange = (date) => {
85
+ setActiveDate(date[optionKey.valueKey]);
86
+ onDateChange && onDateChange(date, activeTime);
87
+ };
88
+ return React.createElement(
89
+ Popup,
90
+ { closeable: true, round: true, visible, position: "bottom", style: {
91
+ width: "100%",
92
+ height: "20%",
93
+ ...style
94
+ }, onClose: closeFun, ...rest },
95
+ React.createElement(
96
+ "div",
97
+ { className: classNames(classPrefix, className) },
98
+ React.createElement("div", { className: `${classPrefix}__title` }, title || locale.timeselect.pickupTime),
99
+ React.createElement(
100
+ "div",
101
+ { className: `${classPrefix}__content` },
102
+ React.createElement("div", { className: `${classPrefix}__content-left` }, options.map((item) => React.createElement("div", { key: item[optionKey.valueKey], className: classNames("nut-timepannel", {
103
+ active: item[optionKey.valueKey] === activeDate
104
+ }), onClick: () => handleChange(item) }, item[optionKey.textKey]))),
105
+ React.createElement(TimeDetail, { options, optionKey, activeDate, activeTime, onSelect: handleSelectTime })
106
+ )
107
+ )
108
+ );
109
+ };
110
+ TimeSelect.defaultProps = defaultProps;
111
+ TimeSelect.displayName = "NutTimeSelect";
112
+ export {
113
+ TimeSelect as T
114
+ };
@@ -64,7 +64,7 @@ export interface BaseLang {
64
64
  };
65
65
  signature: {
66
66
  reSign: string;
67
- unSupportTpl: string;
67
+ unsupported: string;
68
68
  };
69
69
  ecard: {
70
70
  chooseText: string;