@trionesdev/antd-mobile-react 0.0.2-beta.2 → 0.0.2-beta.20

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 (262) hide show
  1. package/LICENSE +21 -21
  2. package/dist/ActionSheet/ActionSheet.d.ts +25 -0
  3. package/dist/ActionSheet/ActionSheet.js +77 -0
  4. package/dist/ActionSheet/index.d.ts +1 -1
  5. package/dist/ActionSheet/index.js +1 -1
  6. package/dist/ActionSheet/style.scss +52 -0
  7. package/dist/Avatar/demo/base.js +2 -2
  8. package/dist/Avatar/demo/style.scss +6 -6
  9. package/dist/Badge/demo/base.js +2 -2
  10. package/dist/Badge/demo/base.scss +6 -6
  11. package/dist/Button/button.d.ts +2 -1
  12. package/dist/Button/button.js +1 -1
  13. package/dist/Button/demo/base.js +2 -2
  14. package/dist/Button/style.scss +234 -232
  15. package/dist/Calendar/calendar-grid.d.ts +10 -9
  16. package/dist/Calendar/calendar-grid.js +41 -64
  17. package/dist/Calendar/calendar-header.d.ts +3 -2
  18. package/dist/Calendar/calendar-header.js +6 -6
  19. package/dist/Calendar/calendar-range.d.ts +4 -3
  20. package/dist/Calendar/calendar-range.js +12 -11
  21. package/dist/Calendar/calendar.d.ts +5 -4
  22. package/dist/Calendar/calendar.js +23 -14
  23. package/dist/Calendar/style.scss +85 -85
  24. package/dist/Calendar/touchable-calendar-grid.d.ts +6 -5
  25. package/dist/Calendar/touchable-calendar-grid.js +67 -59
  26. package/dist/CalendarDatetimePicker/CalendarDatetimePicker.d.ts +3 -2
  27. package/dist/CalendarDatetimePicker/CalendarDatetimePicker.js +14 -28
  28. package/dist/CalendarDatetimePicker/DateTimeSwitch.d.ts +3 -2
  29. package/dist/CalendarDatetimePicker/DateTimeSwitch.js +4 -3
  30. package/dist/CalendarDatetimePicker/demo/base.js +1 -1
  31. package/dist/CalendarDatetimePicker/style.scss +54 -54
  32. package/dist/CalendarDatetimePicker/types.d.ts +1 -1
  33. package/dist/CalendarDatetimePicker/types.js +1 -1
  34. package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.d.ts +11 -0
  35. package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.js +61 -0
  36. package/dist/{Mask → CalendarDatetimePickerCell}/demo/base.js +9 -15
  37. package/dist/CalendarDatetimePickerCell/index.d.ts +3 -0
  38. package/dist/CalendarDatetimePickerCell/index.js +2 -0
  39. package/dist/CalendarDatetimePickerCell/style.scss +10 -0
  40. package/dist/CalendarDatetimePickerCell/types.d.ts +1 -0
  41. package/dist/CalendarDatetimePickerCell/types.js +1 -0
  42. package/dist/CalendarPicker/calendar-picker.js +2 -2
  43. package/dist/CalendarPicker/calendar-range-picker.d.ts +4 -4
  44. package/dist/CalendarPicker/calendar-range-picker.js +11 -9
  45. package/dist/CalendarPicker/demo/base.js +6 -6
  46. package/dist/CalendarPicker/index.d.ts +2 -2
  47. package/dist/CalendarPicker/index.js +3 -3
  48. package/dist/CalendarPicker/style.scss +31 -31
  49. package/dist/CalendarPicker/types.d.ts +8 -7
  50. package/dist/CalendarPickerCell/CalendarPickerCell.d.ts +11 -0
  51. package/dist/CalendarPickerCell/CalendarPickerCell.js +54 -0
  52. package/dist/CalendarPickerCell/CalendarRangePickerCell.d.ts +11 -0
  53. package/dist/CalendarPickerCell/CalendarRangePickerCell.js +56 -0
  54. package/dist/CalendarPickerCell/demo/base.d.ts +3 -0
  55. package/dist/CalendarPickerCell/demo/base.js +31 -0
  56. package/dist/CalendarPickerCell/index.d.ts +8 -0
  57. package/dist/CalendarPickerCell/index.js +5 -0
  58. package/dist/Card/demo/base.js +2 -2
  59. package/dist/Card/demo/base.scss +18 -18
  60. package/dist/CascaderPicker/cascader-picker.d.ts +27 -0
  61. package/dist/CascaderPicker/cascader-picker.js +90 -0
  62. package/dist/CascaderPicker/demo/base.js +1 -4
  63. package/dist/CascaderPicker/index.d.ts +1 -1
  64. package/dist/CascaderPicker/index.js +1 -1
  65. package/dist/CascaderPicker/style.scss +45 -0
  66. package/dist/CascaderPickerCell/CascaderPickerCell.d.ts +21 -0
  67. package/dist/CascaderPickerCell/CascaderPickerCell.js +70 -0
  68. package/dist/CascaderPickerCell/demo/base.js +71 -0
  69. package/dist/CascaderPickerCell/index.d.ts +3 -0
  70. package/dist/CascaderPickerCell/index.js +2 -0
  71. package/dist/CascaderPickerCell/style.scss +24 -0
  72. package/dist/Cell/demo/base.js +41 -2
  73. package/dist/Checkbox/demo/base.js +11 -6
  74. package/dist/Checkbox/demo/disabled.js +2 -1
  75. package/dist/ConfigProvider/demo/base.js +2 -2
  76. package/dist/DemoBlock/index.d.ts +6 -0
  77. package/dist/DemoBlock/index.js +9 -2
  78. package/dist/DemoBlock/index.scss +20 -20
  79. package/dist/DemoDescription/index.scss +3 -3
  80. package/dist/Divider/demo/base.js +2 -2
  81. package/dist/Ellipsis/demo/base.js +2 -2
  82. package/dist/Empty/demo/base.js +2 -2
  83. package/dist/ErrorBlock/demo/base.js +2 -2
  84. package/dist/FetchPicker/FetchPicker.d.ts +113 -0
  85. package/dist/FetchPicker/FetchPicker.js +319 -0
  86. package/dist/FetchPicker/index.d.ts +4 -0
  87. package/dist/FetchPicker/index.js +3 -0
  88. package/dist/FetchPicker/styles.scss +118 -0
  89. package/dist/FloatButton/FloatButton.d.ts +21 -0
  90. package/dist/FloatButton/FloatButton.js +66 -0
  91. package/dist/FloatButton/FloatButtonGroup.d.ts +21 -0
  92. package/dist/FloatButton/FloatButtonGroup.js +120 -0
  93. package/dist/FloatButton/context.d.ts +13 -0
  94. package/dist/FloatButton/context.js +2 -0
  95. package/dist/FloatButton/demo/base.d.ts +3 -0
  96. package/dist/FloatButton/demo/base.js +10 -0
  97. package/dist/FloatButton/demo/group.d.ts +3 -0
  98. package/dist/FloatButton/demo/group.js +20 -0
  99. package/dist/FloatButton/demo/square.d.ts +3 -0
  100. package/dist/FloatButton/demo/square.js +12 -0
  101. package/dist/FloatButton/index.d.ts +10 -0
  102. package/dist/FloatButton/index.js +5 -0
  103. package/dist/FloatButton/style.scss +123 -0
  104. package/dist/Footer/demo/base.js +2 -2
  105. package/dist/Form/FormItem/form-item-content.d.ts +17 -0
  106. package/dist/Form/FormItem/form-item-content.js +39 -0
  107. package/dist/Form/FormItem/form-item-label.d.ts +13 -0
  108. package/dist/Form/FormItem/form-item-label.js +29 -0
  109. package/dist/Form/FormItem/form-item.d.ts +51 -0
  110. package/dist/Form/FormItem/form-item.js +74 -0
  111. package/dist/Form/FormItem/index.d.ts +5 -0
  112. package/dist/Form/FormItem/index.js +3 -0
  113. package/dist/Form/demo/input.js +7 -3
  114. package/dist/Form/demo/vertical.d.ts +3 -0
  115. package/dist/Form/demo/vertical.js +45 -0
  116. package/dist/Form/index.d.ts +9 -2
  117. package/dist/Form/index.js +5 -1
  118. package/dist/Form/style.scss +106 -0
  119. package/dist/FormCell/index.d.ts +3 -0
  120. package/dist/FormCell/index.js +2 -0
  121. package/dist/Grid/demo/base.js +2 -2
  122. package/dist/Grid/demo/base.scss +7 -7
  123. package/dist/Icon/demo/base.js +2 -2
  124. package/dist/Image/demo/base.js +2 -2
  125. package/dist/Image/demo/base.scss +4 -4
  126. package/dist/Image/style.scss +30 -30
  127. package/dist/ImagesPreview/ImagesPreview.js +2 -2
  128. package/dist/ImagesPreview/style.scss +34 -34
  129. package/dist/ImagesWall/CameraModal.js +2 -2
  130. package/dist/ImagesWall/style.scss +70 -70
  131. package/dist/Input/base-input.d.ts +13 -0
  132. package/dist/Input/base-input.js +41 -0
  133. package/dist/Input/demo/base.js +115 -13
  134. package/dist/Input/index.d.ts +14 -2
  135. package/dist/Input/index.js +11 -1
  136. package/dist/Input/index.scss +240 -0
  137. package/dist/Input/input-affix-wrapper.d.ts +13 -0
  138. package/dist/Input/input-affix-wrapper.js +37 -0
  139. package/dist/Input/input-opt.d.ts +16 -0
  140. package/dist/Input/input-opt.js +87 -0
  141. package/dist/Input/input-password.d.ts +7 -0
  142. package/dist/Input/input-password.js +48 -0
  143. package/dist/Input/input.d.ts +20 -0
  144. package/dist/Input/input.js +66 -0
  145. package/dist/Input/textarea.d.ts +15 -0
  146. package/dist/Input/textarea.js +51 -0
  147. package/dist/Input/types.d.ts +3 -0
  148. package/dist/Input/types.js +2 -0
  149. package/dist/Loading/DotLoading.d.ts +1 -0
  150. package/dist/Loading/DotLoading.js +1 -0
  151. package/dist/Loading/SpinLoading.d.ts +1 -0
  152. package/dist/Loading/SpinLoading.js +1 -0
  153. package/dist/Loading/demo/base.d.ts +3 -0
  154. package/dist/{SpinLoading → Loading}/demo/base.js +8 -2
  155. package/dist/Loading/demo/dot-loading.d.ts +3 -0
  156. package/dist/Loading/demo/dot-loading.js +25 -0
  157. package/dist/Loading/index.d.ts +5 -0
  158. package/dist/Loading/index.js +3 -0
  159. package/dist/NavBar/demo/base.scss +5 -5
  160. package/dist/NoticeBar/demo/base.js +2 -2
  161. package/dist/Overlay/Overlay.d.ts +16 -0
  162. package/dist/Overlay/Overlay.js +117 -0
  163. package/dist/Overlay/demo/base.d.ts +3 -0
  164. package/dist/Overlay/demo/base.js +27 -0
  165. package/dist/Overlay/index.d.ts +4 -0
  166. package/dist/Overlay/index.js +3 -0
  167. package/dist/Overlay/style.scss +20 -0
  168. package/dist/PageIndicator/demo/base.js +2 -2
  169. package/dist/Picker/index.d.ts +1 -1
  170. package/dist/Picker/index.js +1 -1
  171. package/dist/Picker/picker.d.ts +20 -0
  172. package/dist/Picker/picker.js +94 -0
  173. package/dist/Picker/style.scss +44 -0
  174. package/dist/PickerView/index.d.ts +2 -1
  175. package/dist/PickerView/index.js +1 -1
  176. package/dist/PickerView/picker-view-column-item.d.ts +7 -0
  177. package/dist/PickerView/picker-view-column-item.js +11 -0
  178. package/dist/PickerView/picker-view-column.d.ts +10 -0
  179. package/dist/PickerView/picker-view-column.js +117 -0
  180. package/dist/PickerView/picker-view.d.ts +12 -0
  181. package/dist/PickerView/picker-view.js +60 -0
  182. package/dist/PickerView/style.scss +72 -0
  183. package/dist/PickerView/types.d.ts +4 -0
  184. package/dist/PickerView/types.js +1 -0
  185. package/dist/Popup/demo/base.js +109 -27
  186. package/dist/Popup/index.d.ts +2 -1
  187. package/dist/Popup/index.js +2 -1
  188. package/dist/Popup/popup.d.ts +31 -0
  189. package/dist/Popup/popup.js +87 -0
  190. package/dist/Popup/style.scss +129 -0
  191. package/dist/Progress/index.d.ts +1 -1
  192. package/dist/Progress/index.js +1 -1
  193. package/dist/Radio/demo/base.js +2 -2
  194. package/dist/Radio/demo/base.scss +4 -4
  195. package/dist/Result/demo/base.js +2 -2
  196. package/dist/SafeArea/demo/base.scss +18 -18
  197. package/dist/ScrollView/index.d.ts +2 -1
  198. package/dist/ScrollView/index.js +1 -1
  199. package/dist/ScrollView/scroll-view.d.ts +4 -0
  200. package/dist/ScrollView/scroll-view.js +55 -0
  201. package/dist/ScrollView/style.scss +19 -0
  202. package/dist/ScrollView/types.d.ts +26 -0
  203. package/dist/ScrollView/types.js +1 -0
  204. package/dist/Segmented/demo/base.d.ts +3 -0
  205. package/dist/Segmented/demo/base.js +33 -0
  206. package/dist/Segmented/index.d.ts +3 -0
  207. package/dist/Segmented/index.js +2 -0
  208. package/dist/SideBar/index.d.ts +1 -1
  209. package/dist/SideBar/side-bar.js +6 -6
  210. package/dist/SideBar/style.scss +85 -85
  211. package/dist/Skeleton/demo/base.d.ts +3 -0
  212. package/dist/Skeleton/demo/base.js +8 -0
  213. package/dist/Skeleton/index.d.ts +3 -0
  214. package/dist/Skeleton/index.js +2 -0
  215. package/dist/Space/demo/base.js +2 -2
  216. package/dist/Stepper/demo/base.d.ts +3 -0
  217. package/dist/Stepper/demo/base.js +23 -0
  218. package/dist/Stepper/index.d.ts +3 -0
  219. package/dist/Stepper/index.js +2 -0
  220. package/dist/Swiper/style.scss +54 -54
  221. package/dist/Switch/demo/base.js +2 -2
  222. package/dist/TabBar/demo/base.js +2 -2
  223. package/dist/Tag/demo/base.js +2 -2
  224. package/dist/Tag/demo/style.scss +8 -8
  225. package/dist/Toast/style.scss +63 -63
  226. package/dist/Toast/toast-modal.js +4 -4
  227. package/dist/VerificationCodeInput/demo/base.js +2 -2
  228. package/dist/VerificationCodeInput/index.d.ts +2 -2
  229. package/dist/VerificationCodeInput/index.js +1 -1
  230. package/dist/VerificationCodeInput/style.scss +20 -0
  231. package/dist/VerificationCodeInput/verification-code-input.d.ts +24 -0
  232. package/dist/VerificationCodeInput/verification-code-input.js +99 -0
  233. package/dist/WaterMark/demo/demo1.js +2 -2
  234. package/dist/WaterMark/demo/demo1.scss +6 -6
  235. package/dist/WaterMark/demo/demo2.js +2 -2
  236. package/dist/index.d.ts +33 -19
  237. package/dist/index.js +9 -2
  238. package/dist/style/variable.scss +1 -1
  239. package/dist/types.d.ts +0 -8
  240. package/dist/types.js +0 -1
  241. package/dist/utils/dayjs.d.ts +4 -0
  242. package/dist/utils/dayjs.js +42 -0
  243. package/dist/utils/type.js +36 -36
  244. package/dist/utils/use-isomorphic-update-layout-effect.d.ts +1 -1
  245. package/dist/utils/with-default-props.js +4 -4
  246. package/package.json +11 -16
  247. package/readme.md +43 -43
  248. package/dist/Mask/index.d.ts +0 -3
  249. package/dist/Mask/index.js +0 -2
  250. package/dist/Progress/Progress.d.ts +0 -37
  251. package/dist/Progress/Progress.js +0 -52
  252. package/dist/Progress/ProgressCircle.d.ts +0 -17
  253. package/dist/Progress/ProgressCircle.js +0 -148
  254. package/dist/Progress/ProgressLine.d.ts +0 -15
  255. package/dist/Progress/ProgressLine.js +0 -87
  256. package/dist/Progress/style.scss +0 -33
  257. package/dist/Progress/types.d.ts +0 -4
  258. package/dist/Progress/types.js +0 -2
  259. package/dist/SpinLoading/index.d.ts +0 -3
  260. package/dist/SpinLoading/index.js +0 -2
  261. /package/dist/{Mask → CalendarDatetimePickerCell}/demo/base.d.ts +0 -0
  262. /package/dist/{SpinLoading → CascaderPickerCell}/demo/base.d.ts +0 -0
@@ -0,0 +1,129 @@
1
+ @use "../style/variable" as variable;
2
+
3
+ $trionesPopupCls: 'triones-antm-popup';
4
+
5
+ .#{$trionesPopupCls} {
6
+ &-overlay {
7
+ display: flex;
8
+
9
+ .#{$trionesPopupCls} {
10
+ &-container {
11
+ position: relative;
12
+ background-color: white;
13
+
14
+ .#{$trionesPopupCls} {
15
+ &-header {
16
+ padding-block: variable.$trionesPaddingContentVertical;
17
+ padding-inline: variable.$trionesPaddingContentHorizontal;
18
+ }
19
+ }
20
+ }
21
+
22
+ &-title {
23
+ text-align: center;
24
+ }
25
+
26
+ &-close {
27
+ position: absolute;
28
+
29
+ &-top-right {
30
+ top: variable.$trionesPaddingContentVertical;
31
+ right: variable.$trionesPaddingContentHorizontal;
32
+ }
33
+
34
+ &-top-left {
35
+ top: variable.$trionesPaddingContentVertical;
36
+ left: variable.$trionesPaddingContentHorizontal;
37
+ }
38
+ }
39
+ }
40
+ }
41
+
42
+ &-top {
43
+ flex-direction: column;
44
+ align-items: flex-start;
45
+ justify-content: flex-start;
46
+
47
+ .#{$trionesPopupCls} {
48
+ &-container {
49
+ width: 100%;
50
+ min-height: 20%;
51
+ max-height: 90%;
52
+ }
53
+
54
+ &-round {
55
+ border-bottom-left-radius: variable.$trionesBorderRadius;
56
+ border-bottom-right-radius: variable.$trionesBorderRadius;
57
+ }
58
+ }
59
+ }
60
+
61
+ &-bottom {
62
+ flex-direction: column;
63
+ align-items: flex-end;
64
+ justify-content: flex-end;
65
+
66
+ .#{$trionesPopupCls} {
67
+ &-container {
68
+ width: 100%;
69
+ min-height: 20%;
70
+ max-height: 90%;
71
+ }
72
+
73
+ &-round {
74
+ border-top-left-radius: variable.$trionesBorderRadius;
75
+ border-top-right-radius: variable.$trionesBorderRadius;
76
+ }
77
+ }
78
+ }
79
+
80
+ &-left {
81
+ flex-direction: row;
82
+ justify-content: flex-start;
83
+
84
+ .#{$trionesPopupCls} {
85
+ &-container {
86
+ height: 100%;
87
+ min-width: 20%;
88
+ max-width: 90%;
89
+ }
90
+
91
+ &-round {
92
+ border-top-right-radius: variable.$trionesBorderRadius;
93
+ border-bottom-right-radius: variable.$trionesBorderRadius;
94
+ }
95
+ }
96
+ }
97
+
98
+
99
+ &-right {
100
+ flex-direction: row;
101
+ justify-content: flex-end;
102
+
103
+ .#{$trionesPopupCls} {
104
+ &-container {
105
+ height: 100%;
106
+ min-width: 20%;
107
+ max-width: 90%;
108
+ }
109
+
110
+ &-round {
111
+ border-top-left-radius: variable.$trionesBorderRadius;
112
+ border-bottom-left-radius: variable.$trionesBorderRadius;
113
+ }
114
+ }
115
+ }
116
+
117
+ &-center {
118
+ justify-content: center;
119
+ align-items: center;
120
+
121
+ .#{$trionesPopupCls} {
122
+ &-round {
123
+ border-radius: variable.$trionesBorderRadius;
124
+ }
125
+ }
126
+ }
127
+
128
+
129
+ }
@@ -1,3 +1,3 @@
1
- import { Progress, ProgressProps } from "./Progress";
1
+ import { Progress, ProgressProps } from "@trionesdev/antd-mobile-base-react";
2
2
  export type { ProgressProps };
3
3
  export default Progress;
@@ -1,2 +1,2 @@
1
- import { Progress } from "./Progress";
1
+ import { Progress } from "@trionesdev/antd-mobile-base-react";
2
2
  export default Progress;
@@ -25,7 +25,7 @@ export default (function () {
25
25
  title: "\u9009\u9879\u7EC4"
26
26
  }, /*#__PURE__*/React.createElement(Radio.Group, {
27
27
  defaultValue: "1",
28
- items: [{
28
+ options: [{
29
29
  label: '第一项',
30
30
  value: '1'
31
31
  }, {
@@ -68,7 +68,7 @@ export default (function () {
68
68
  }, /*#__PURE__*/React.createElement(Radio.Group, {
69
69
  defaultValue: "1",
70
70
  shape: 'button',
71
- items: [{
71
+ options: [{
72
72
  label: '第一项',
73
73
  value: '1'
74
74
  }, {
@@ -1,4 +1,4 @@
1
- .blockIndicator {
2
- background-color: #f5f5f5;
3
- border-radius: 2px;
4
- }
1
+ .blockIndicator {
2
+ background-color: #f5f5f5;
3
+ border-radius: 2px;
4
+ }
@@ -1,5 +1,5 @@
1
- /**
2
- * compact: true
1
+ /**
2
+ * compact: true
3
3
  */
4
4
  import { DemoBlock } from "../../DemoBlock";
5
5
  import React from 'react';
@@ -1,18 +1,18 @@
1
- $class-prefix-card: 'card-demo';
2
-
3
- .#{$class-prefix-card} {
4
- &-content {
5
- height: 50px;
6
- }
7
- &-footer {
8
- padding-top: 11px;
9
- border-top: 1px solid #e5e5e5;
10
- display: flex;
11
- justify-content: flex-end;
12
- }
13
-
14
- &-customBody {
15
- color: green;
16
- }
17
-
18
- }
1
+ $class-prefix-card: 'card-demo';
2
+
3
+ .#{$class-prefix-card} {
4
+ &-content {
5
+ height: 50px;
6
+ }
7
+ &-footer {
8
+ padding-top: 11px;
9
+ border-top: 1px solid #e5e5e5;
10
+ display: flex;
11
+ justify-content: flex-end;
12
+ }
13
+
14
+ &-customBody {
15
+ color: green;
16
+ }
17
+
18
+ }
@@ -1,3 +1,4 @@
1
- import { ScrollView, ScrollViewProps } from '@trionesdev/antd-mobile-base-react';
1
+ import { ScrollView } from "./scroll-view";
2
+ import type { ScrollViewProps } from "./types";
2
3
  export type { ScrollViewProps };
3
4
  export default ScrollView;
@@ -1,2 +1,2 @@
1
- import { ScrollView } from '@trionesdev/antd-mobile-base-react';
1
+ import { ScrollView } from "./scroll-view";
2
2
  export default ScrollView;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import './style.scss';
3
+ import { ScrollViewProps } from "./types";
4
+ export declare const ScrollView: FC<ScrollViewProps>;
@@ -0,0 +1,55 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
+ import classNames from 'classnames';
6
+ import React, { forwardRef, useEffect, useRef } from 'react';
7
+ import "./style.scss";
8
+ export var ScrollView = /*#__PURE__*/forwardRef(function (_ref, ref) {
9
+ var className = _ref.className,
10
+ style = _ref.style,
11
+ children = _ref.children,
12
+ _onScroll = _ref.onScroll,
13
+ _ref$showScrollbar = _ref.showScrollbar,
14
+ showScrollbar = _ref$showScrollbar === void 0 ? true : _ref$showScrollbar,
15
+ scrollX = _ref.scrollX,
16
+ scrollY = _ref.scrollY,
17
+ scrollTop = _ref.scrollTop,
18
+ _ref$upperThreshold = _ref.upperThreshold,
19
+ upperThreshold = _ref$upperThreshold === void 0 ? 50 : _ref$upperThreshold,
20
+ _ref$lowerThreshold = _ref.lowerThreshold,
21
+ lowerThreshold = _ref$lowerThreshold === void 0 ? 50 : _ref$lowerThreshold,
22
+ onScrollToUpper = _ref.onScrollToUpper,
23
+ onScrollToLower = _ref.onScrollToLower;
24
+ var scrollRef = useRef();
25
+ var handleRef = function handleRef(node) {
26
+ scrollRef.current = node;
27
+ if (ref) {
28
+ if (typeof ref === 'function') {
29
+ ref(node);
30
+ } else {
31
+ ref.current = node;
32
+ }
33
+ }
34
+ };
35
+ useEffect(function () {
36
+ if (scrollTop !== undefined) {}
37
+ }, [scrollTop]);
38
+ var trionesScrollViewCls = 'triones-antm-scroll-view';
39
+ return /*#__PURE__*/React.createElement("div", {
40
+ ref: handleRef,
41
+ className: classNames("".concat(trionesScrollViewCls), className, _defineProperty(_defineProperty(_defineProperty({}, "".concat(trionesScrollViewCls, "-scroll-x"), scrollX), "".concat(trionesScrollViewCls, "-scroll-y"), scrollY), "".concat(trionesScrollViewCls, "-scroll-bar-hidden"), !showScrollbar)),
42
+ style: style,
43
+ onScroll: function onScroll(e) {
44
+ // console.log(e);
45
+ _onScroll === null || _onScroll === void 0 || _onScroll({
46
+ detail: {
47
+ scrollLeft: e.target.scrollLeft,
48
+ scrollTop: e.target.scrollTop,
49
+ scrollHeight: e.target.scrollHeight,
50
+ scrollWidth: e.target.scrollWidth
51
+ }
52
+ });
53
+ }
54
+ }, children);
55
+ });
@@ -0,0 +1,19 @@
1
+ $trionesScrollViewCls: 'triones-antm-scroll-view';
2
+
3
+ .#{$trionesScrollViewCls} {
4
+ scrollbar-width: thin;
5
+
6
+ &-scroll-x {
7
+ overflow-x: auto;
8
+ overflow-y: hidden;
9
+ }
10
+
11
+ &-scroll-y {
12
+ overflow-x: hidden;
13
+ overflow-y: auto;
14
+ }
15
+
16
+ &-scroll-bar-hidden {
17
+ scrollbar-width: none;
18
+ }
19
+ }
@@ -0,0 +1,26 @@
1
+ import React, { ReactNode } from "react";
2
+ export type ScrollEvent = {
3
+ target?: any;
4
+ detail: {
5
+ deltaX?: number;
6
+ deltaY?: number;
7
+ scrollLeft?: number;
8
+ scrollTop?: number;
9
+ scrollHeight?: number;
10
+ scrollWidth?: number;
11
+ };
12
+ };
13
+ export type ScrollViewProps = {
14
+ className?: string;
15
+ style?: React.CSSProperties;
16
+ children?: ReactNode;
17
+ onScroll?: (e: ScrollEvent) => void;
18
+ showScrollbar?: boolean;
19
+ scrollX?: boolean;
20
+ scrollY?: boolean;
21
+ scrollTop?: number;
22
+ upperThreshold?: number;
23
+ lowerThreshold?: number;
24
+ onScrollToUpper?: () => void;
25
+ onScrollToLower?: () => void;
26
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const _default: () => React.JSX.Element;
3
+ export default _default;
@@ -0,0 +1,33 @@
1
+ import { Segmented } from "@trionesdev/antd-mobile-base-react";
2
+ import React from "react";
3
+ import { DemoBlock } from "../../DemoBlock";
4
+ export default (function () {
5
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(DemoBlock, {
6
+ title: "\u57FA\u672C\u4F7F\u7528"
7
+ }, /*#__PURE__*/React.createElement(Segmented, {
8
+ options: [{
9
+ label: '选项1',
10
+ value: '1'
11
+ }, {
12
+ label: '选项2',
13
+ value: '2'
14
+ }, {
15
+ label: '选项3',
16
+ value: '3'
17
+ }]
18
+ })), /*#__PURE__*/React.createElement(DemoBlock, {
19
+ title: "block \u5C5E\u6027\u4F7F\u5176\u9002\u5408\u7236\u5143\u7D20\u5BBD\u5EA6"
20
+ }, /*#__PURE__*/React.createElement(Segmented, {
21
+ block: true,
22
+ options: [{
23
+ label: '选项1',
24
+ value: '1'
25
+ }, {
26
+ label: '选项2',
27
+ value: '2'
28
+ }, {
29
+ label: '选项3',
30
+ value: '3'
31
+ }]
32
+ })));
33
+ });
@@ -0,0 +1,3 @@
1
+ import { Segmented, SegmentedProps } from "@trionesdev/antd-mobile-base-react";
2
+ export type { SegmentedProps };
3
+ export default Segmented;
@@ -0,0 +1,2 @@
1
+ import { Segmented } from "@trionesdev/antd-mobile-base-react";
2
+ export default Segmented;
@@ -1,3 +1,3 @@
1
- import { SideBar, SideBarProps } from './side-bar';
1
+ import { SideBar, SideBarProps } from "./side-bar";
2
2
  export type { SideBarProps };
3
3
  export default SideBar;
@@ -70,8 +70,8 @@ var SideBarContent = /*#__PURE__*/memo(function (_ref2) {
70
70
  };
71
71
  }();
72
72
 
73
- /**
74
- * 计算当前页顶部,距离可滚动区域顶部的距离
73
+ /**
74
+ * 计算当前页顶部,距离可滚动区域顶部的距离
75
75
  */
76
76
  var computeReactiveOffsetTop = /*#__PURE__*/function () {
77
77
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
@@ -90,8 +90,8 @@ var SideBarContent = /*#__PURE__*/memo(function (_ref2) {
90
90
  };
91
91
  }();
92
92
 
93
- /**
94
- * 计算当前页底部,距离可滚动区域顶部的距离
93
+ /**
94
+ * 计算当前页底部,距离可滚动区域顶部的距离
95
95
  */
96
96
  var computeReactiveOffsetBottom = /*#__PURE__*/function () {
97
97
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
@@ -138,8 +138,8 @@ var SideBarContent = /*#__PURE__*/memo(function (_ref2) {
138
138
  }
139
139
  }, [activeKey]);
140
140
 
141
- /**
142
- * 监听滚动变化,只有在人为操作的时候才监听滚动的位置是否需要切换tab,如果是切换tab 引发的滚动则不执行
141
+ /**
142
+ * 监听滚动变化,只有在人为操作的时候才监听滚动的位置是否需要切换tab,如果是切换tab 引发的滚动则不执行
143
143
  */
144
144
  useEffect(function () {
145
145
  // return;
@@ -1,85 +1,85 @@
1
- @use "../style/variable" as *;
2
-
3
- $trionesSideBarCls: 'triones-antm-sidebar';
4
-
5
- .#{$trionesSideBarCls} {
6
- display: flex;
7
- height: 100%;
8
-
9
-
10
- &-tabs {
11
- min-width: 0;
12
- background-color: $trionesColorFill;
13
- overflow: auto;
14
- scrollbar-width: thin;
15
- flex-shrink: 0;
16
- }
17
-
18
- &-tab {
19
- cursor: pointer;
20
- padding: $trionesPadding $trionesPadding;
21
- color: $trionesColorTextSecondary;
22
-
23
- &-active {
24
- color: $trionesColorPrimaryText;
25
- background-color: $trionesColorBgBase;
26
- }
27
-
28
- }
29
-
30
- &-content {
31
- flex: 1 auto;
32
- min-width: 0;
33
- overflow: hidden;
34
- //overflow-y: auto;
35
- //scrollbar-width: none;
36
- position: relative;
37
- user-select: none;
38
- touch-action: none;
39
-
40
-
41
- &-wheel {
42
- width: 100%;
43
- cursor: grab;
44
- position: absolute;
45
- }
46
-
47
- &-item {
48
-
49
- &-active {
50
- display: block;
51
- }
52
- }
53
- }
54
-
55
- &-switch-mode {
56
- .#{$trionesSideBarCls} {
57
- &-content {
58
-
59
- &-item {
60
- height: 100%;
61
- display: none;
62
- &-active {
63
- display: block;
64
- }
65
- }
66
- }
67
- }
68
- }
69
-
70
- &-scroll-mode {
71
- .#{$trionesSideBarCls} {
72
- &-content {
73
-
74
- &-item {
75
-
76
-
77
- &-active {
78
- display: block;
79
- }
80
- }
81
- }
82
- }
83
- }
84
-
85
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $trionesSideBarCls: 'triones-antm-sidebar';
4
+
5
+ .#{$trionesSideBarCls} {
6
+ display: flex;
7
+ height: 100%;
8
+
9
+
10
+ &-tabs {
11
+ min-width: 0;
12
+ background-color: variable.$trionesColorFill;
13
+ overflow: auto;
14
+ scrollbar-width: thin;
15
+ flex-shrink: 0;
16
+ }
17
+
18
+ &-tab {
19
+ cursor: pointer;
20
+ padding: variable.$trionesPadding variable.$trionesPadding;
21
+ color: variable.$trionesColorTextSecondary;
22
+
23
+ &-active {
24
+ color: variable.$trionesColorPrimaryText;
25
+ background-color: variable.$trionesColorBgBase;
26
+ }
27
+
28
+ }
29
+
30
+ &-content {
31
+ flex: 1 auto;
32
+ min-width: 0;
33
+ overflow: hidden;
34
+ //overflow-y: auto;
35
+ //scrollbar-width: none;
36
+ position: relative;
37
+ user-select: none;
38
+ touch-action: none;
39
+
40
+
41
+ &-wheel {
42
+ width: 100%;
43
+ cursor: grab;
44
+ position: absolute;
45
+ }
46
+
47
+ &-item {
48
+
49
+ &-active {
50
+ display: block;
51
+ }
52
+ }
53
+ }
54
+
55
+ &-switch-mode {
56
+ .#{$trionesSideBarCls} {
57
+ &-content {
58
+
59
+ &-item {
60
+ height: 100%;
61
+ display: none;
62
+ &-active {
63
+ display: block;
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+
70
+ &-scroll-mode {
71
+ .#{$trionesSideBarCls} {
72
+ &-content {
73
+
74
+ &-item {
75
+
76
+
77
+ &-active {
78
+ display: block;
79
+ }
80
+ }
81
+ }
82
+ }
83
+ }
84
+
85
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: () => React.JSX.Element;
3
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { DemoBlock } from "../../DemoBlock";
3
+ import { Skeleton } from "../../index";
4
+ export default (function () {
5
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
6
+ title: "\u57FA\u7840\u7528\u6CD5"
7
+ }, /*#__PURE__*/React.createElement(Skeleton, null)));
8
+ });
@@ -0,0 +1,3 @@
1
+ import { Skeleton } from '@trionesdev/antd-mobile-base-react';
2
+ export type { SkeletonAvatarProps, SkeletonAvatarShape, SkeletonAvatarSize, SkeletonBlockType, SkeletonButtonProps, SkeletonButtonShape, SkeletonInputProps, SkeletonParagraphProps, SkeletonProps, SkeletonTitleProps, } from '@trionesdev/antd-mobile-base-react';
3
+ export default Skeleton;
@@ -0,0 +1,2 @@
1
+ import { Skeleton } from '@trionesdev/antd-mobile-base-react';
2
+ export default Skeleton;
@@ -1,5 +1,5 @@
1
- /**
2
- * compact: true
1
+ /**
2
+ * compact: true
3
3
  */
4
4
  import { DemoBlock } from "../../DemoBlock";
5
5
  import React from 'react';
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const _default: () => React.JSX.Element;
3
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ import Stepper from "../index";
3
+ import { DemoBlock } from "../../DemoBlock";
4
+ export default (function () {
5
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(DemoBlock, {
6
+ title: "\u57FA\u672C\u4F7F\u7528"
7
+ }, /*#__PURE__*/React.createElement(Stepper, null)), /*#__PURE__*/React.createElement(DemoBlock, {
8
+ title: "\u6700\u5927\u503C\u6700\u5C0F\u503C"
9
+ }, /*#__PURE__*/React.createElement(Stepper, {
10
+ min: 0,
11
+ max: 10
12
+ })), /*#__PURE__*/React.createElement(DemoBlock, {
13
+ title: "\u57FA\u672C\u4F7F\u7528"
14
+ }, /*#__PURE__*/React.createElement(Stepper, {
15
+ max: 10
16
+ })), /*#__PURE__*/React.createElement(DemoBlock, {
17
+ title: "\u5360\u6EE1"
18
+ }, /*#__PURE__*/React.createElement(Stepper, {
19
+ block: true,
20
+ min: 0,
21
+ max: 10
22
+ })));
23
+ });
@@ -0,0 +1,3 @@
1
+ import { Stepper, StepperProps } from "@trionesdev/antd-mobile-base-react";
2
+ export type { StepperProps };
3
+ export default Stepper;
@@ -0,0 +1,2 @@
1
+ import { Stepper } from "@trionesdev/antd-mobile-base-react";
2
+ export default Stepper;