@trionesdev/antd-mobile-react 0.0.2-beta.1 → 0.0.2-beta.11

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 (203) 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/demo/base.js +2 -2
  12. package/dist/Button/style.scss +234 -232
  13. package/dist/Calendar/calendar.js +2 -1
  14. package/dist/Calendar/style.scss +85 -85
  15. package/dist/Calendar/touchable-calendar-grid.js +9 -9
  16. package/dist/CalendarDatetimePicker/CalendarDatetimePicker.d.ts +5 -6
  17. package/dist/CalendarDatetimePicker/CalendarDatetimePicker.js +37 -132
  18. package/dist/CalendarDatetimePicker/demo/base.js +5 -21
  19. package/dist/CalendarDatetimePicker/index.d.ts +2 -2
  20. package/dist/CalendarDatetimePicker/style.scss +10 -54
  21. package/dist/CalendarDatetimePicker/types.d.ts +0 -4
  22. package/dist/CalendarDatetimePicker/types.js +1 -6
  23. package/dist/CalendarDatetimePopup/CalendarDatetimePopup.d.ts +10 -0
  24. package/dist/CalendarDatetimePopup/CalendarDatetimePopup.js +142 -0
  25. package/dist/CalendarDatetimePopup/demo/base.js +41 -0
  26. package/dist/CalendarDatetimePopup/index.d.ts +3 -0
  27. package/dist/CalendarDatetimePopup/index.js +2 -0
  28. package/dist/CalendarDatetimePopup/style.scss +54 -0
  29. package/dist/CalendarDatetimePopup/types.d.ts +5 -0
  30. package/dist/CalendarDatetimePopup/types.js +6 -0
  31. package/dist/CalendarPopup/calendar-popup.d.ts +4 -0
  32. package/dist/{CalendarPicker/calendar-picker.js → CalendarPopup/calendar-popup.js} +2 -2
  33. package/dist/CalendarPopup/calendar-range-popup.d.ts +4 -0
  34. package/dist/{CalendarPicker/calendar-range-picker.js → CalendarPopup/calendar-range-popup.js} +8 -7
  35. package/dist/{CalendarPicker → CalendarPopup}/demo/base.js +3 -3
  36. package/dist/CalendarPopup/index.d.ts +9 -0
  37. package/dist/CalendarPopup/index.js +5 -0
  38. package/dist/CalendarPopup/style.scss +31 -0
  39. package/dist/{CalendarPicker → CalendarPopup}/types.d.ts +2 -2
  40. package/dist/Card/demo/base.js +2 -2
  41. package/dist/Card/demo/base.scss +18 -18
  42. package/dist/CascaderPicker/CascaderPicker.d.ts +25 -0
  43. package/dist/CascaderPicker/CascaderPicker.js +78 -0
  44. package/dist/CascaderPicker/demo/base.js +6 -18
  45. package/dist/CascaderPicker/index.d.ts +1 -1
  46. package/dist/CascaderPicker/index.js +1 -1
  47. package/dist/CascaderPicker/style.scss +24 -0
  48. package/dist/CascaderPopup/cascader-popup.d.ts +27 -0
  49. package/dist/CascaderPopup/cascader-popup.js +90 -0
  50. package/dist/CascaderPopup/demo/base.d.ts +3 -0
  51. package/dist/CascaderPopup/demo/base.js +82 -0
  52. package/dist/CascaderPopup/index.d.ts +3 -0
  53. package/dist/CascaderPopup/index.js +2 -0
  54. package/dist/CascaderPopup/style.scss +45 -0
  55. package/dist/Cell/demo/base.js +41 -2
  56. package/dist/Checkbox/demo/base.js +11 -6
  57. package/dist/Checkbox/demo/disabled.js +2 -1
  58. package/dist/ConfigProvider/demo/base.js +2 -2
  59. package/dist/DemoBlock/index.d.ts +6 -0
  60. package/dist/DemoBlock/index.js +9 -2
  61. package/dist/DemoBlock/index.scss +20 -20
  62. package/dist/DemoDescription/index.scss +3 -3
  63. package/dist/Divider/demo/base.js +2 -2
  64. package/dist/Ellipsis/demo/base.js +2 -2
  65. package/dist/Empty/demo/base.js +2 -2
  66. package/dist/ErrorBlock/demo/base.js +2 -2
  67. package/dist/Footer/demo/base.js +2 -2
  68. package/dist/Form/FormItem/form-item-input.d.ts +15 -0
  69. package/dist/Form/FormItem/form-item-input.js +39 -0
  70. package/dist/Form/FormItem/form-item-label.d.ts +13 -0
  71. package/dist/Form/FormItem/form-item-label.js +27 -0
  72. package/dist/Form/FormItem/form-item.d.ts +22 -0
  73. package/dist/Form/FormItem/form-item.js +73 -0
  74. package/dist/Form/FormItem/index.d.ts +5 -0
  75. package/dist/Form/FormItem/index.js +3 -0
  76. package/dist/Form/demo/input.js +1 -1
  77. package/dist/Form/index.d.ts +8 -1
  78. package/dist/Form/index.js +5 -1
  79. package/dist/Form/style.scss +67 -0
  80. package/dist/Grid/demo/base.js +2 -2
  81. package/dist/Grid/demo/base.scss +7 -7
  82. package/dist/Icon/demo/base.js +2 -2
  83. package/dist/Image/demo/base.js +2 -2
  84. package/dist/Image/demo/base.scss +4 -4
  85. package/dist/Image/style.scss +30 -30
  86. package/dist/ImagesPreview/ImagesPreview.js +2 -2
  87. package/dist/ImagesPreview/style.scss +34 -34
  88. package/dist/ImagesWall/CameraModal.js +2 -2
  89. package/dist/ImagesWall/style.scss +70 -70
  90. package/dist/Input/base-input.d.ts +13 -0
  91. package/dist/Input/base-input.js +41 -0
  92. package/dist/Input/demo/base.js +89 -13
  93. package/dist/Input/index.d.ts +14 -2
  94. package/dist/Input/index.js +11 -1
  95. package/dist/Input/index.scss +223 -0
  96. package/dist/Input/input-affix-wrapper.d.ts +11 -0
  97. package/dist/Input/input-affix-wrapper.js +37 -0
  98. package/dist/Input/input-opt.d.ts +16 -0
  99. package/dist/Input/input-opt.js +87 -0
  100. package/dist/Input/input-password.d.ts +7 -0
  101. package/dist/Input/input-password.js +48 -0
  102. package/dist/Input/input.d.ts +18 -0
  103. package/dist/Input/input.js +63 -0
  104. package/dist/Input/textarea.d.ts +15 -0
  105. package/dist/Input/textarea.js +51 -0
  106. package/dist/Input/types.d.ts +3 -0
  107. package/dist/Input/types.js +2 -0
  108. package/dist/NavBar/demo/base.scss +5 -5
  109. package/dist/NoticeBar/demo/base.js +2 -2
  110. package/dist/Overlay/Overlay.d.ts +16 -0
  111. package/dist/Overlay/Overlay.js +117 -0
  112. package/dist/Overlay/demo/base.d.ts +3 -0
  113. package/dist/{Mask → Overlay}/demo/base.js +14 -16
  114. package/dist/Overlay/index.d.ts +4 -0
  115. package/dist/Overlay/index.js +3 -0
  116. package/dist/Overlay/style.scss +20 -0
  117. package/dist/PageIndicator/demo/base.js +2 -2
  118. package/dist/Picker/index.d.ts +1 -1
  119. package/dist/Picker/index.js +1 -1
  120. package/dist/Picker/picker.d.ts +19 -0
  121. package/dist/Picker/picker.js +97 -0
  122. package/dist/Picker/style.scss +44 -0
  123. package/dist/PickerView/index.d.ts +2 -1
  124. package/dist/PickerView/index.js +1 -1
  125. package/dist/PickerView/picker-view-column-item.d.ts +7 -0
  126. package/dist/PickerView/picker-view-column-item.js +11 -0
  127. package/dist/PickerView/picker-view-column.d.ts +10 -0
  128. package/dist/PickerView/picker-view-column.js +117 -0
  129. package/dist/PickerView/picker-view.d.ts +12 -0
  130. package/dist/PickerView/picker-view.js +60 -0
  131. package/dist/PickerView/style.scss +72 -0
  132. package/dist/PickerView/types.d.ts +4 -0
  133. package/dist/PickerView/types.js +1 -0
  134. package/dist/Popup/demo/base.js +109 -27
  135. package/dist/Popup/index.d.ts +2 -1
  136. package/dist/Popup/index.js +2 -1
  137. package/dist/Popup/popup.d.ts +31 -0
  138. package/dist/Popup/popup.js +87 -0
  139. package/dist/Popup/style.scss +129 -0
  140. package/dist/Progress/index.d.ts +1 -1
  141. package/dist/Progress/index.js +1 -1
  142. package/dist/Radio/demo/base.js +2 -2
  143. package/dist/Radio/demo/base.scss +4 -4
  144. package/dist/Result/demo/base.js +2 -2
  145. package/dist/SafeArea/demo/base.scss +18 -18
  146. package/dist/ScrollView/index.d.ts +2 -1
  147. package/dist/ScrollView/index.js +1 -1
  148. package/dist/ScrollView/scroll-view.d.ts +4 -0
  149. package/dist/ScrollView/scroll-view.js +55 -0
  150. package/dist/ScrollView/style.scss +19 -0
  151. package/dist/ScrollView/types.d.ts +26 -0
  152. package/dist/ScrollView/types.js +1 -0
  153. package/dist/SideBar/index.d.ts +1 -1
  154. package/dist/SideBar/side-bar.js +6 -6
  155. package/dist/SideBar/style.scss +85 -85
  156. package/dist/Space/demo/base.js +2 -2
  157. package/dist/Swiper/style.scss +54 -54
  158. package/dist/Switch/demo/base.js +2 -2
  159. package/dist/TabBar/demo/base.js +2 -2
  160. package/dist/Tag/demo/base.js +2 -2
  161. package/dist/Tag/demo/style.scss +8 -8
  162. package/dist/Toast/style.scss +63 -63
  163. package/dist/Toast/toast-modal.js +4 -4
  164. package/dist/VerificationCodeInput/demo/base.js +2 -2
  165. package/dist/VerificationCodeInput/index.d.ts +2 -2
  166. package/dist/VerificationCodeInput/index.js +1 -1
  167. package/dist/VerificationCodeInput/style.scss +20 -0
  168. package/dist/VerificationCodeInput/verification-code-input.d.ts +24 -0
  169. package/dist/VerificationCodeInput/verification-code-input.js +99 -0
  170. package/dist/WaterMark/demo/demo1.js +2 -2
  171. package/dist/WaterMark/demo/demo1.scss +6 -6
  172. package/dist/WaterMark/demo/demo2.js +2 -2
  173. package/dist/index.d.ts +9 -7
  174. package/dist/index.js +4 -3
  175. package/dist/style/variable.scss +1 -1
  176. package/dist/types.d.ts +0 -8
  177. package/dist/types.js +0 -1
  178. package/dist/utils/type.js +36 -36
  179. package/dist/utils/use-isomorphic-update-layout-effect.d.ts +1 -1
  180. package/dist/utils/with-default-props.js +4 -4
  181. package/package.json +10 -11
  182. package/readme.md +43 -43
  183. package/dist/CalendarPicker/calendar-picker.d.ts +0 -4
  184. package/dist/CalendarPicker/calendar-range-picker.d.ts +0 -4
  185. package/dist/CalendarPicker/index.d.ts +0 -9
  186. package/dist/CalendarPicker/index.js +0 -5
  187. package/dist/CalendarPicker/style.scss +0 -31
  188. package/dist/Mask/index.d.ts +0 -3
  189. package/dist/Mask/index.js +0 -2
  190. package/dist/Progress/Progress.d.ts +0 -37
  191. package/dist/Progress/Progress.js +0 -52
  192. package/dist/Progress/ProgressCircle.d.ts +0 -17
  193. package/dist/Progress/ProgressCircle.js +0 -148
  194. package/dist/Progress/ProgressLine.d.ts +0 -15
  195. package/dist/Progress/ProgressLine.js +0 -87
  196. package/dist/Progress/style.scss +0 -33
  197. package/dist/Progress/types.d.ts +0 -4
  198. package/dist/Progress/types.js +0 -2
  199. /package/dist/{CalendarDatetimePicker → CalendarDatetimePopup}/DateTimeSwitch.d.ts +0 -0
  200. /package/dist/{CalendarDatetimePicker → CalendarDatetimePopup}/DateTimeSwitch.js +0 -0
  201. /package/dist/{CalendarPicker → CalendarDatetimePopup}/demo/base.d.ts +0 -0
  202. /package/dist/{Mask → CalendarPopup}/demo/base.d.ts +0 -0
  203. /package/dist/{CalendarPicker → CalendarPopup}/types.js +0 -0
@@ -0,0 +1,72 @@
1
+ $pickerViewCls: 'triones-antm-picker-view';
2
+ .#{$pickerViewCls} {
3
+ width: 100%;
4
+ height: var(--height,240Px);
5
+ display: flex;
6
+ position: relative;
7
+ overflow: hidden;
8
+ --item-height: 34Px;
9
+ --item-font-size: 16Px;
10
+
11
+ &-column {
12
+ height: 100%;
13
+ flex: 1 1;
14
+ user-select: none;
15
+ touch-action: none;
16
+ position: relative;
17
+ z-index: 0;
18
+ &-wheel{
19
+ width: 100%;
20
+ cursor: grab;
21
+ position: absolute;
22
+ top: calc(50% - var(--item-height)/2);
23
+ left: 0;
24
+ }
25
+
26
+ &-item {
27
+ font-size: var(--item-font-size);
28
+ padding: 0 6px;
29
+ height: var(--item-height);
30
+ display: flex;
31
+ justify-content: center;
32
+ align-items: center;
33
+ &-label{
34
+ overflow: hidden;
35
+ text-overflow: ellipsis;
36
+ white-space: nowrap;
37
+ }
38
+ }
39
+ }
40
+
41
+ &-mask {
42
+ position: absolute;
43
+ z-index: 10000;
44
+ left: 0;
45
+ top: 0;
46
+ width: 100%;
47
+ height: 100%;
48
+ display: flex;
49
+ flex-direction: column;
50
+ pointer-events: none;
51
+
52
+ &-top {
53
+ background-color: white;
54
+ flex: auto;
55
+ mask: linear-gradient(0deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .8) 50%, #000);
56
+ }
57
+
58
+ &-middle {
59
+ height: var(--item-height);
60
+ box-sizing: border-box;
61
+ flex: none;
62
+ border-top: 1px solid #eee;
63
+ border-bottom: 1px solid #eee;
64
+ }
65
+
66
+ &-bottom {
67
+ background-color: white;
68
+ flex: auto;
69
+ mask: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .8) 50%, #000);
70
+ }
71
+ }
72
+ }
@@ -0,0 +1,4 @@
1
+ export type PickerColumnOption = {
2
+ label?: string;
3
+ value?: string;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -4,45 +4,76 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
5
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- /**
8
- * compact: true
7
+ /**
8
+ * compact: true
9
9
  */
10
10
  import { DemoBlock } from "../../DemoBlock";
11
- import React, { useEffect } from 'react';
11
+ import React from 'react';
12
12
  import Button from "../../Button";
13
13
  import Popup from "../index";
14
14
  export default (function () {
15
15
  var _React$useState = React.useState(false),
16
16
  _React$useState2 = _slicedToArray(_React$useState, 2),
17
- topOpen = _React$useState2[0],
18
- setTopOpen = _React$useState2[1];
17
+ defaultOpen = _React$useState2[0],
18
+ setDefaultOpen = _React$useState2[1];
19
19
  var _React$useState3 = React.useState(false),
20
20
  _React$useState4 = _slicedToArray(_React$useState3, 2),
21
- bottomOpen = _React$useState4[0],
22
- setBottomOpen = _React$useState4[1];
21
+ topOpen = _React$useState4[0],
22
+ setTopOpen = _React$useState4[1];
23
23
  var _React$useState5 = React.useState(false),
24
24
  _React$useState6 = _slicedToArray(_React$useState5, 2),
25
- leftOpen = _React$useState6[0],
26
- setLeftOpen = _React$useState6[1];
25
+ bottomOpen = _React$useState6[0],
26
+ setBottomOpen = _React$useState6[1];
27
27
  var _React$useState7 = React.useState(false),
28
28
  _React$useState8 = _slicedToArray(_React$useState7, 2),
29
- rightOpen = _React$useState8[0],
30
- setRightOpen = _React$useState8[1];
31
- useEffect(function () {
32
- console.log("topOpen", topOpen);
33
- }, [topOpen]);
29
+ leftOpen = _React$useState8[0],
30
+ setLeftOpen = _React$useState8[1];
31
+ var _React$useState9 = React.useState(false),
32
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
33
+ rightOpen = _React$useState10[0],
34
+ setRightOpen = _React$useState10[1];
35
+ var _React$useState11 = React.useState(false),
36
+ _React$useState12 = _slicedToArray(_React$useState11, 2),
37
+ centerOpen = _React$useState12[0],
38
+ setCenterOpen = _React$useState12[1];
39
+ var _React$useState13 = React.useState(false),
40
+ _React$useState14 = _slicedToArray(_React$useState13, 2),
41
+ roundOpen = _React$useState14[0],
42
+ setRoundOpen = _React$useState14[1];
43
+ var _React$useState15 = React.useState(false),
44
+ _React$useState16 = _slicedToArray(_React$useState15, 2),
45
+ closeIconOpen = _React$useState16[0],
46
+ setCloseIconOpen = _React$useState16[1];
34
47
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
35
- title: "\u57FA\u7840\u7528\u6CD5"
48
+ title: "\u57FA\u672C\u4F7F\u7528"
49
+ }, /*#__PURE__*/React.createElement(Popup, {
50
+ open: defaultOpen,
51
+ title: "\u6807\u9898",
52
+ closable: true,
53
+ afterClose: function afterClose() {
54
+ setDefaultOpen(false);
55
+ }
56
+ }, /*#__PURE__*/React.createElement("div", {
57
+ style: {
58
+ minHeight: '200px'
59
+ }
60
+ }, "\u57FA\u7840\u5F39\u7A97")), /*#__PURE__*/React.createElement(Button, {
61
+ block: true,
62
+ onClick: function onClick() {
63
+ setDefaultOpen(true);
64
+ }
65
+ }, "\u57FA\u7840\u5F39\u7A97")), /*#__PURE__*/React.createElement(DemoBlock, {
66
+ title: "\u5F39\u51FA\u4F4D\u7F6E"
36
67
  }, /*#__PURE__*/React.createElement(Popup, {
37
68
  open: topOpen,
38
- destroyOnClose: true,
39
- onClose: function onClose() {
69
+ destroyOnHidden: true,
70
+ position: "top",
71
+ afterClose: function afterClose() {
40
72
  setTopOpen(false);
41
- },
42
- maskClosable: true
73
+ }
43
74
  }, /*#__PURE__*/React.createElement("div", {
44
75
  style: {
45
- minHeight: "200px"
76
+ minHeight: '200px'
46
77
  }
47
78
  }, "\u9876\u90E8\u5F39\u51FA")), /*#__PURE__*/React.createElement(Button, {
48
79
  block: true,
@@ -53,12 +84,12 @@ export default (function () {
53
84
  open: bottomOpen,
54
85
  position: "bottom",
55
86
  closable: true,
56
- onClose: function onClose() {
87
+ afterClose: function afterClose() {
57
88
  setBottomOpen(false);
58
89
  }
59
90
  }, /*#__PURE__*/React.createElement("div", {
60
91
  style: {
61
- minHeight: "200px"
92
+ minHeight: '200px'
62
93
  }
63
94
  }, "\u5E95\u90E8\u5F39\u51FA")), /*#__PURE__*/React.createElement(Button, {
64
95
  block: true,
@@ -68,12 +99,12 @@ export default (function () {
68
99
  }, "\u5E95\u90E8\u5F39\u51FA"), /*#__PURE__*/React.createElement(Popup, {
69
100
  open: leftOpen,
70
101
  position: "left",
71
- onClose: function onClose() {
102
+ afterClose: function afterClose() {
72
103
  setLeftOpen(false);
73
104
  }
74
105
  }, /*#__PURE__*/React.createElement("div", {
75
106
  style: {
76
- minWidth: "200px"
107
+ minWidth: '200px'
77
108
  }
78
109
  }, "\u5DE6\u90E8\u5F39\u51FA")), /*#__PURE__*/React.createElement(Button, {
79
110
  block: true,
@@ -83,17 +114,68 @@ export default (function () {
83
114
  }, "\u5DE6\u90E8\u5F39\u51FA"), /*#__PURE__*/React.createElement(Popup, {
84
115
  open: rightOpen,
85
116
  position: "right",
86
- onClose: function onClose() {
117
+ afterClose: function afterClose() {
87
118
  setRightOpen(false);
88
119
  }
89
120
  }, /*#__PURE__*/React.createElement("div", {
90
121
  style: {
91
- minWidth: "200px"
122
+ minWidth: '200px'
92
123
  }
93
124
  }, "\u53F3\u90E8\u5F39\u51FA")), /*#__PURE__*/React.createElement(Button, {
94
125
  block: true,
95
126
  onClick: function onClick() {
96
127
  setRightOpen(true);
97
128
  }
98
- }, "\u53F3\u90E8\u5F39\u51FA")));
129
+ }, "\u53F3\u90E8\u5F39\u51FA"), /*#__PURE__*/React.createElement(Popup, {
130
+ open: centerOpen,
131
+ position: "center",
132
+ afterClose: function afterClose() {
133
+ setCenterOpen(false);
134
+ }
135
+ }, /*#__PURE__*/React.createElement("div", {
136
+ style: {
137
+ minWidth: '200px',
138
+ minHeight: '200px'
139
+ }
140
+ }, "\u5C45\u4E2D\u5F39\u51FA")), /*#__PURE__*/React.createElement(Button, {
141
+ block: true,
142
+ onClick: function onClick() {
143
+ setCenterOpen(true);
144
+ }
145
+ }, "\u5C45\u4E2D\u5F39\u51FA")), /*#__PURE__*/React.createElement(DemoBlock, {
146
+ title: "\u5706\u89D2"
147
+ }, /*#__PURE__*/React.createElement(Popup, {
148
+ open: roundOpen,
149
+ round: true,
150
+ afterClose: function afterClose() {
151
+ setRoundOpen(false);
152
+ }
153
+ }, /*#__PURE__*/React.createElement("div", {
154
+ style: {
155
+ minHeight: '200px'
156
+ }
157
+ }, "\u5706\u89D2\u5F39\u7A97")), /*#__PURE__*/React.createElement(Button, {
158
+ block: true,
159
+ onClick: function onClick() {
160
+ setRoundOpen(true);
161
+ }
162
+ }, "\u5706\u89D2\u5F39\u7A97")), /*#__PURE__*/React.createElement(DemoBlock, {
163
+ title: "\u5173\u95ED\u56FE\u6807"
164
+ }, /*#__PURE__*/React.createElement(Popup, {
165
+ open: closeIconOpen,
166
+ round: true,
167
+ closable: true,
168
+ afterClose: function afterClose() {
169
+ setCloseIconOpen(false);
170
+ }
171
+ }, /*#__PURE__*/React.createElement("div", {
172
+ style: {
173
+ minHeight: '200px'
174
+ }
175
+ }, "\u5706\u89D2\u5F39\u7A97")), /*#__PURE__*/React.createElement(Button, {
176
+ block: true,
177
+ onClick: function onClick() {
178
+ setCloseIconOpen(true);
179
+ }
180
+ }, "\u5173\u95ED\u56FE\u6807")));
99
181
  });
@@ -1,3 +1,4 @@
1
- import { Popup, PopupProps } from "@trionesdev/antd-mobile-base-react";
1
+ import { Popup, PopupProps } from "./popup";
2
+ import "./style.scss";
2
3
  export type { PopupProps };
3
4
  export default Popup;
@@ -1,2 +1,3 @@
1
- import { Popup } from "@trionesdev/antd-mobile-base-react";
1
+ import { Popup } from "./popup";
2
+ import "./style.scss";
2
3
  export default Popup;
@@ -0,0 +1,31 @@
1
+ import React, { FC, PropsWithChildren } from 'react';
2
+ export type PopupProps = {
3
+ open?: boolean;
4
+ title?: React.ReactNode;
5
+ position?: 'top' | 'bottom' | 'left' | 'right' | 'center';
6
+ closable?: boolean;
7
+ closeIconPosition?: 'top-left' | 'top-right';
8
+ closeIcon?: React.ReactNode;
9
+ /**
10
+ * @description 点击遮罩层是否关闭
11
+ * @default true
12
+ */
13
+ overlayClosable?: boolean;
14
+ destroyOnHidden?: boolean;
15
+ onClose?: () => void;
16
+ afterClose?: () => void;
17
+ afterOpenChange?: (open: boolean) => void;
18
+ className?: string;
19
+ style?: React.CSSProperties;
20
+ round?: boolean;
21
+ safeArea?: boolean;
22
+ zIndex?: number;
23
+ styles?: {
24
+ overlay?: React.CSSProperties;
25
+ container?: React.CSSProperties;
26
+ header?: React.CSSProperties;
27
+ title?: React.CSSProperties;
28
+ body?: React.CSSProperties;
29
+ };
30
+ };
31
+ export declare const Popup: FC<PropsWithChildren<PopupProps>>;
@@ -0,0 +1,87 @@
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
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
10
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ import React, { memo, useEffect, useState } from 'react';
12
+ import classNames from 'classnames';
13
+ import { CloseOutline } from '@trionesdev/antd-mobile-icons-react';
14
+ import Overlay from "../Overlay";
15
+ import SafeArea from "../SafeArea";
16
+ var cls = 'triones-antm-popup';
17
+ export var Popup = /*#__PURE__*/memo(function (_ref) {
18
+ var _ref$open = _ref.open,
19
+ open = _ref$open === void 0 ? false : _ref$open,
20
+ title = _ref.title,
21
+ _ref$position = _ref.position,
22
+ position = _ref$position === void 0 ? 'bottom' : _ref$position,
23
+ _ref$closable = _ref.closable,
24
+ closable = _ref$closable === void 0 ? false : _ref$closable,
25
+ _ref$closeIconPositio = _ref.closeIconPosition,
26
+ closeIconPosition = _ref$closeIconPositio === void 0 ? 'top-right' : _ref$closeIconPositio,
27
+ closeIcon = _ref.closeIcon,
28
+ _ref$overlayClosable = _ref.overlayClosable,
29
+ overlayClosable = _ref$overlayClosable === void 0 ? true : _ref$overlayClosable,
30
+ _ref$destroyOnHidden = _ref.destroyOnHidden,
31
+ destroyOnHidden = _ref$destroyOnHidden === void 0 ? false : _ref$destroyOnHidden,
32
+ onClose = _ref.onClose,
33
+ afterClose = _ref.afterClose,
34
+ afterOpenChange = _ref.afterOpenChange,
35
+ className = _ref.className,
36
+ style = _ref.style,
37
+ _ref$round = _ref.round,
38
+ round = _ref$round === void 0 ? false : _ref$round,
39
+ _ref$safeArea = _ref.safeArea,
40
+ safeArea = _ref$safeArea === void 0 ? true : _ref$safeArea,
41
+ zIndex = _ref.zIndex,
42
+ children = _ref.children,
43
+ styles = _ref.styles;
44
+ var _useState = useState(open || false),
45
+ _useState2 = _slicedToArray(_useState, 2),
46
+ internalOpen = _useState2[0],
47
+ setInternalOpen = _useState2[1];
48
+ var handleClose = function handleClose() {
49
+ setInternalOpen(false);
50
+ onClose === null || onClose === void 0 || onClose();
51
+ };
52
+ useEffect(function () {
53
+ if (open === undefined) {
54
+ return;
55
+ }
56
+ if (open !== internalOpen) {
57
+ setInternalOpen(open);
58
+ }
59
+ }, [open]);
60
+ var popupInner = /*#__PURE__*/React.createElement(React.Fragment, null, closable && /*#__PURE__*/React.createElement("div", {
61
+ className: classNames("".concat(cls, "-close"), "".concat(cls, "-close-").concat(closeIconPosition)),
62
+ onClick: handleClose
63
+ }, closeIcon || /*#__PURE__*/React.createElement(CloseOutline, null)), title && /*#__PURE__*/React.createElement("div", {
64
+ className: "".concat(cls, "-header"),
65
+ style: styles === null || styles === void 0 ? void 0 : styles.header
66
+ }, /*#__PURE__*/React.createElement("div", {
67
+ className: "".concat(cls, "-title"),
68
+ style: styles === null || styles === void 0 ? void 0 : styles.title
69
+ }, title)), /*#__PURE__*/React.createElement("div", {
70
+ className: "".concat(cls, "-body"),
71
+ style: styles === null || styles === void 0 ? void 0 : styles.body
72
+ }, children));
73
+ return /*#__PURE__*/React.createElement(Overlay, {
74
+ open: internalOpen,
75
+ onClose: handleClose,
76
+ closeOnOverlayClick: overlayClosable,
77
+ zIndex: zIndex,
78
+ className: classNames("".concat(cls, "-overlay"), "".concat(cls, "-").concat(position)),
79
+ afterClose: afterClose,
80
+ afterOpenChange: afterOpenChange,
81
+ destroyOnHidden: destroyOnHidden,
82
+ style: styles === null || styles === void 0 ? void 0 : styles.overlay
83
+ }, /*#__PURE__*/React.createElement("div", {
84
+ className: classNames("".concat(cls, "-container"), _defineProperty({}, "".concat(cls, "-round"), round)),
85
+ style: styles === null || styles === void 0 ? void 0 : styles.container
86
+ }, ['top', 'bottom', 'left', 'right'].includes(position) ? /*#__PURE__*/React.createElement(SafeArea, null, popupInner) : popupInner));
87
+ });
@@ -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>;