dtable-ui-component 6.0.26 → 6.0.28

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 (79) hide show
  1. package/lib/DateEditor/mb-date-editor-popover/index.js +3 -3
  2. package/lib/Department-editor/department-multiple-select/index.css +4 -1
  3. package/lib/Department-editor/department-multiple-select/index.js +7 -4
  4. package/lib/Department-editor/department-single-select.js +7 -4
  5. package/lib/Department-editor/index.css +4 -0
  6. package/lib/FileFormatter/index.js +98 -38
  7. package/lib/FileItemFormatter/index.js +3 -1
  8. package/lib/constants/file.js +1 -0
  9. package/lib/index.js +1 -106
  10. package/lib/locales/zh-CN.json +1 -1
  11. package/package.json +3 -12
  12. package/lib/ActionSheet/index.js +0 -194
  13. package/lib/ActionSheet/style/index.css +0 -365
  14. package/lib/ActivityIndicator/index.css +0 -108
  15. package/lib/ActivityIndicator/index.js +0 -76
  16. package/lib/Badge/index.css +0 -96
  17. package/lib/Badge/index.js +0 -65
  18. package/lib/DatePicker/index.js +0 -120
  19. package/lib/DatePicker/locale/en_US.js +0 -14
  20. package/lib/DatePicker/locale/ru_RU.js +0 -14
  21. package/lib/DatePicker/locale/sv_SE.js +0 -14
  22. package/lib/DatePicker/locale/zh_CN.js +0 -14
  23. package/lib/DatePicker/style/index.css +0 -290
  24. package/lib/DatePicker/utils.js +0 -36
  25. package/lib/Drawer/index.css +0 -142
  26. package/lib/Drawer/index.js +0 -21
  27. package/lib/Icon/index.css +0 -50
  28. package/lib/Icon/index.js +0 -35
  29. package/lib/Icon/load-sprite.js +0 -56
  30. package/lib/InputItem/custom-input.js +0 -321
  31. package/lib/InputItem/custom-keyboard.js +0 -162
  32. package/lib/InputItem/index.js +0 -389
  33. package/lib/InputItem/input.js +0 -45
  34. package/lib/InputItem/locale/en_US.js +0 -12
  35. package/lib/InputItem/locale/ru_RU.js +0 -12
  36. package/lib/InputItem/locale/sv_SE.js +0 -12
  37. package/lib/InputItem/locale/zh_CN.js +0 -12
  38. package/lib/InputItem/portal.js +0 -23
  39. package/lib/InputItem/style/index.css +0 -512
  40. package/lib/List/index.css +0 -381
  41. package/lib/List/index.js +0 -41
  42. package/lib/List/list-item.js +0 -169
  43. package/lib/Modal/alert.js +0 -82
  44. package/lib/Modal/index.js +0 -16
  45. package/lib/Modal/modal.js +0 -118
  46. package/lib/Modal/operation.js +0 -77
  47. package/lib/Modal/prompt.js +0 -207
  48. package/lib/Modal/style/index.css +0 -580
  49. package/lib/Picker/AbstractPicker.js +0 -190
  50. package/lib/Picker/index.js +0 -28
  51. package/lib/Picker/locale/en_US.js +0 -12
  52. package/lib/Picker/locale/ru_RU.js +0 -12
  53. package/lib/Picker/locale/sv_SE.js +0 -12
  54. package/lib/Picker/locale/zh_CN.js +0 -12
  55. package/lib/Picker/popupProps.js +0 -12
  56. package/lib/Picker/style/index.css +0 -141
  57. package/lib/Popover/index.js +0 -63
  58. package/lib/Popover/item.js +0 -55
  59. package/lib/Popover/style/index.css +0 -229
  60. package/lib/Progress/index.css +0 -22
  61. package/lib/Progress/index.js +0 -66
  62. package/lib/Radio/Radio.js +0 -47
  63. package/lib/Radio/RadioItem.js +0 -57
  64. package/lib/Radio/index.css +0 -90
  65. package/lib/Radio/index.js +0 -12
  66. package/lib/TabBar/Tab.js +0 -76
  67. package/lib/TabBar/index.css +0 -138
  68. package/lib/TabBar/index.js +0 -129
  69. package/lib/Tabs/index.css +0 -443
  70. package/lib/Tabs/index.js +0 -39
  71. package/lib/TextareaItem/index.css +0 -231
  72. package/lib/TextareaItem/index.js +0 -231
  73. package/lib/Toast/index.css +0 -65
  74. package/lib/Toast/index.js +0 -131
  75. package/lib/_util/class.js +0 -34
  76. package/lib/_util/closest.js +0 -17
  77. package/lib/_util/exenv.js +0 -8
  78. package/lib/_util/getDataAttr.js +0 -15
  79. package/lib/_util/getLocale.js +0 -42
@@ -1,381 +0,0 @@
1
- .am-list-header {
2
- padding: 15px 15px 9px 15px;
3
- font-size: 14px;
4
- color: #888;
5
- width: 100%;
6
- -webkit-box-sizing: border-box;
7
- box-sizing: border-box;
8
- }
9
-
10
- .am-list-footer {
11
- padding: 9px 15px 15px 15px;
12
- font-size: 14px;
13
- color: #888;
14
- }
15
-
16
- .am-list-body {
17
- position: relative;
18
- background-color: #fff;
19
- border-top: 1PX solid #ddd;
20
- border-bottom: 1PX solid #ddd;
21
- }
22
-
23
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
24
- html:not([data-scale]) .am-list-body {
25
- border-top: none;
26
- }
27
-
28
- html:not([data-scale]) .am-list-body::before {
29
- content: '';
30
- position: absolute;
31
- background-color: #ddd;
32
- display: block;
33
- z-index: 1;
34
- top: 0;
35
- right: auto;
36
- bottom: auto;
37
- left: 0;
38
- width: 100%;
39
- height: 1PX;
40
- -webkit-transform-origin: 50% 50%;
41
- -ms-transform-origin: 50% 50%;
42
- transform-origin: 50% 50%;
43
- -webkit-transform: scaleY(0.5);
44
- -ms-transform: scaleY(0.5);
45
- transform: scaleY(0.5);
46
- }
47
- }
48
-
49
- @media (-webkit-min-device-pixel-ratio: 2) and (-webkit-min-device-pixel-ratio: 3), (min-resolution: 2dppx) and (min-resolution: 3dppx) {
50
- html:not([data-scale]) .am-list-body::before {
51
- -webkit-transform: scaleY(0.33);
52
- -ms-transform: scaleY(0.33);
53
- transform: scaleY(0.33);
54
- }
55
- }
56
-
57
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
58
- html:not([data-scale]) .am-list-body {
59
- border-bottom: none;
60
- }
61
-
62
- html:not([data-scale]) .am-list-body::after {
63
- content: '';
64
- position: absolute;
65
- background-color: #ddd;
66
- display: block;
67
- z-index: 1;
68
- top: auto;
69
- right: auto;
70
- bottom: 0;
71
- left: 0;
72
- width: 100%;
73
- height: 1PX;
74
- -webkit-transform-origin: 50% 100%;
75
- -ms-transform-origin: 50% 100%;
76
- transform-origin: 50% 100%;
77
- -webkit-transform: scaleY(0.5);
78
- -ms-transform: scaleY(0.5);
79
- transform: scaleY(0.5);
80
- }
81
- }
82
-
83
- @media (-webkit-min-device-pixel-ratio: 2) and (-webkit-min-device-pixel-ratio: 3), (min-resolution: 2dppx) and (min-resolution: 3dppx) {
84
- html:not([data-scale]) .am-list-body::after {
85
- -webkit-transform: scaleY(0.33);
86
- -ms-transform: scaleY(0.33);
87
- transform: scaleY(0.33);
88
- }
89
- }
90
-
91
- .am-list-body div:not(:last-child) .am-list-line {
92
- border-bottom: 1PX solid #ddd;
93
- }
94
-
95
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
96
- html:not([data-scale]) .am-list-body div:not(:last-child) .am-list-line {
97
- border-bottom: none;
98
- }
99
-
100
- html:not([data-scale]) .am-list-body div:not(:last-child) .am-list-line::after {
101
- content: '';
102
- position: absolute;
103
- background-color: #ddd;
104
- display: block;
105
- z-index: 1;
106
- top: auto;
107
- right: auto;
108
- bottom: 0;
109
- left: 0;
110
- width: 100%;
111
- height: 1PX;
112
- -webkit-transform-origin: 50% 100%;
113
- -ms-transform-origin: 50% 100%;
114
- transform-origin: 50% 100%;
115
- -webkit-transform: scaleY(0.5);
116
- -ms-transform: scaleY(0.5);
117
- transform: scaleY(0.5);
118
- }
119
- }
120
-
121
- @media (-webkit-min-device-pixel-ratio: 2) and (-webkit-min-device-pixel-ratio: 3), (min-resolution: 2dppx) and (min-resolution: 3dppx) {
122
- html:not([data-scale]) .am-list-body div:not(:last-child) .am-list-line::after {
123
- -webkit-transform: scaleY(0.33);
124
- -ms-transform: scaleY(0.33);
125
- transform: scaleY(0.33);
126
- }
127
- }
128
-
129
- .am-list-item {
130
- position: relative;
131
- display: -webkit-box;
132
- display: -webkit-flex;
133
- display: -ms-flexbox;
134
- display: flex;
135
- padding-left: 15px;
136
- min-height: 44px;
137
- background-color: #fff;
138
- vertical-align: middle;
139
- overflow: hidden;
140
- -webkit-transition: background-color 200ms;
141
- transition: background-color 200ms;
142
- -webkit-box-align: center;
143
- -webkit-align-items: center;
144
- -ms-flex-align: center;
145
- align-items: center;
146
- /* list左图片显示*/
147
- }
148
-
149
- .am-list-item .am-list-ripple {
150
- position: absolute;
151
- background: transparent;
152
- display: inline-block;
153
- overflow: hidden;
154
- will-change: box-shadow, transform;
155
- -webkit-transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1);
156
- transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1);
157
- transition: box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
158
- transition: box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1), -webkit-box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1);
159
- outline: none;
160
- cursor: pointer;
161
- border-radius: 100%;
162
- -webkit-transform: scale(0);
163
- -ms-transform: scale(0);
164
- transform: scale(0);
165
- }
166
-
167
- .am-list-item .am-list-ripple.am-list-ripple-animate {
168
- background-color: rgba(158, 158, 158, 0.2);
169
- -webkit-animation: ripple 1s linear;
170
- animation: ripple 1s linear;
171
- }
172
-
173
- .am-list-item.am-list-item-top .am-list-line {
174
- -webkit-box-align: start;
175
- -webkit-align-items: flex-start;
176
- -ms-flex-align: start;
177
- align-items: flex-start;
178
- }
179
-
180
- .am-list-item.am-list-item-top .am-list-line .am-list-arrow {
181
- margin-top: 2px;
182
- }
183
-
184
- .am-list-item.am-list-item-middle .am-list-line {
185
- -webkit-box-align: center;
186
- -webkit-align-items: center;
187
- -ms-flex-align: center;
188
- align-items: center;
189
- }
190
-
191
- .am-list-item.am-list-item-bottom .am-list-line {
192
- -webkit-box-align: end;
193
- -webkit-align-items: flex-end;
194
- -ms-flex-align: end;
195
- align-items: flex-end;
196
- }
197
-
198
- .am-list-item.am-list-item-error .am-list-line .am-list-extra {
199
- color: #f50;
200
- }
201
-
202
- .am-list-item.am-list-item-error .am-list-line .am-list-extra .am-list-brief {
203
- color: #f50;
204
- }
205
-
206
- .am-list-item.am-list-item-active {
207
- background-color: #ddd;
208
- }
209
-
210
- .am-list-item.am-list-item-disabled .am-list-line .am-list-content,
211
- .am-list-item.am-list-item-disabled .am-list-line .am-list-extra {
212
- color: #bbb;
213
- }
214
-
215
- .am-list-item img {
216
- width: 22px;
217
- height: 22px;
218
- vertical-align: middle;
219
- }
220
-
221
- .am-list-item .am-list-thumb:first-child {
222
- margin-right: 15px;
223
- }
224
-
225
- .am-list-item .am-list-thumb:last-child {
226
- margin-left: 8px;
227
- }
228
-
229
- .am-list-item .am-list-line {
230
- position: relative;
231
- display: -webkit-box;
232
- display: -webkit-flex;
233
- display: -ms-flexbox;
234
- display: flex;
235
- -webkit-box-flex: 1;
236
- -webkit-flex: 1;
237
- -ms-flex: 1;
238
- flex: 1;
239
- -webkit-align-self: stretch;
240
- -ms-flex-item-align: stretch;
241
- align-self: stretch;
242
- padding-right: 15px;
243
- overflow: hidden;
244
- /* list左侧主内容*/
245
- /* list右补充内容*/
246
- /* 辅助性文字*/
247
- /* list右侧箭头*/
248
- }
249
-
250
- .am-list-item .am-list-line .am-list-content {
251
- -webkit-box-flex: 1;
252
- -webkit-flex: 1;
253
- -ms-flex: 1;
254
- flex: 1;
255
- color: #000;
256
- font-size: 17px;
257
- line-height: 1.5;
258
- text-align: left;
259
- width: auto;
260
- overflow: hidden;
261
- text-overflow: ellipsis;
262
- white-space: nowrap;
263
- padding-top: 7px;
264
- padding-bottom: 7px;
265
- }
266
-
267
- .am-list-item .am-list-line .am-list-extra {
268
- -webkit-flex-basis: 36%;
269
- -ms-flex-preferred-size: 36%;
270
- flex-basis: 36%;
271
- color: #888;
272
- font-size: 16px;
273
- line-height: 1.5;
274
- text-align: right;
275
- width: auto;
276
- overflow: hidden;
277
- text-overflow: ellipsis;
278
- white-space: nowrap;
279
- padding-top: 7px;
280
- padding-bottom: 7px;
281
- }
282
-
283
- .am-list-item .am-list-line .am-list-title {
284
- width: auto;
285
- overflow: hidden;
286
- text-overflow: ellipsis;
287
- white-space: nowrap;
288
- }
289
-
290
- .am-list-item .am-list-line .am-list-brief {
291
- color: #888;
292
- font-size: 15px;
293
- line-height: 1.5;
294
- margin-top: 6px;
295
- width: auto;
296
- overflow: hidden;
297
- text-overflow: ellipsis;
298
- white-space: nowrap;
299
- }
300
-
301
- .am-list-item .am-list-line .am-list-arrow {
302
- display: block;
303
- width: 15px;
304
- height: 15px;
305
- margin-left: 8px;
306
- background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2216%22%20height%3D%2226%22%20viewBox%3D%220%200%2016%2026%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cg%20id%3D%22UI-KIT_%E5%9F%BA%E7%A1%80%E5%85%83%E4%BB%B6%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cg%20id%3D%229.9%E5%9F%BA%E7%A1%80%E5%85%83%E4%BB%B6%22%20transform%3D%22translate(-5809.000000%2C%20-8482.000000)%22%20fill%3D%22%23C7C7CC%22%3E%3Cpolygon%20id%3D%22Disclosure-Indicator%22%20points%3D%225811%208482%205809%208484%205820.5%208495%205809%208506%205811%208508%205825%208495%22%3E%3C%2Fpolygon%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E");
307
- background-size: contain;
308
- background-repeat: no-repeat;
309
- background-position: 50% 50%;
310
- visibility: hidden;
311
- }
312
-
313
- .am-list-item .am-list-line .am-list-arrow-horizontal {
314
- visibility: visible;
315
- }
316
-
317
- .am-list-item .am-list-line .am-list-arrow-vertical {
318
- visibility: visible;
319
- -webkit-transform: rotate(90deg);
320
- -ms-transform: rotate(90deg);
321
- transform: rotate(90deg);
322
- }
323
-
324
- .am-list-item .am-list-line .am-list-arrow-vertical-up {
325
- visibility: visible;
326
- -webkit-transform: rotate(270deg);
327
- -ms-transform: rotate(270deg);
328
- transform: rotate(270deg);
329
- }
330
-
331
- .am-list-item .am-list-line-multiple {
332
- padding: 12.5px 15px 12.5px 0;
333
- }
334
-
335
- .am-list-item .am-list-line-multiple .am-list-content {
336
- padding-top: 0;
337
- padding-bottom: 0;
338
- }
339
-
340
- .am-list-item .am-list-line-multiple .am-list-extra {
341
- padding-top: 0;
342
- padding-bottom: 0;
343
- }
344
-
345
- .am-list-item .am-list-line-wrap .am-list-content {
346
- white-space: normal;
347
- }
348
-
349
- .am-list-item .am-list-line-wrap .am-list-extra {
350
- white-space: normal;
351
- }
352
-
353
- .am-list-item select {
354
- position: relative;
355
- display: block;
356
- width: 100%;
357
- height: 100%;
358
- padding: 0;
359
- border: 0;
360
- font-size: 17px;
361
- -webkit-appearance: none;
362
- -moz-appearance: none;
363
- appearance: none;
364
- background-color: transparent;
365
- }
366
-
367
- @-webkit-keyframes ripple {
368
- 100% {
369
- opacity: 0;
370
- -webkit-transform: scale(2.5);
371
- transform: scale(2.5);
372
- }
373
- }
374
-
375
- @keyframes ripple {
376
- 100% {
377
- opacity: 0;
378
- -webkit-transform: scale(2.5);
379
- transform: scale(2.5);
380
- }
381
- }
package/lib/List/index.js DELETED
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
- var _classnames = _interopRequireDefault(require("classnames"));
10
- var React = _interopRequireWildcard(require("react"));
11
- var _listItem = _interopRequireDefault(require("./list-item"));
12
- require("./index.css");
13
- class List extends React.Component {
14
- render() {
15
- const {
16
- prefixCls,
17
- children,
18
- className,
19
- style,
20
- renderHeader,
21
- renderFooter,
22
- ...restProps
23
- } = this.props;
24
- const wrapCls = (0, _classnames.default)(prefixCls, className);
25
- return /*#__PURE__*/React.createElement("div", Object.assign({
26
- className: wrapCls,
27
- style: style
28
- }, restProps), renderHeader ? /*#__PURE__*/React.createElement("div", {
29
- className: "".concat(prefixCls, "-header")
30
- }, typeof renderHeader === 'function' ? renderHeader() : renderHeader) : null, children ? /*#__PURE__*/React.createElement("div", {
31
- className: "".concat(prefixCls, "-body")
32
- }, children) : null, renderFooter ? /*#__PURE__*/React.createElement("div", {
33
- className: "".concat(prefixCls, "-footer")
34
- }, typeof renderFooter === 'function' ? renderFooter() : renderFooter) : null);
35
- }
36
- }
37
- List.defaultProps = {
38
- prefixCls: 'am-list'
39
- };
40
- List.Item = _listItem.default;
41
- var _default = exports.default = List;
@@ -1,169 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = exports.Brief = void 0;
9
- var _classnames = _interopRequireDefault(require("classnames"));
10
- var React = _interopRequireWildcard(require("react"));
11
- var _rmcFeedback = _interopRequireDefault(require("rmc-feedback"));
12
- /* tslint:disable:jsx-no-multiline-js */
13
-
14
- class Brief extends React.Component {
15
- render() {
16
- return /*#__PURE__*/React.createElement('div', {
17
- className: 'am-list-brief',
18
- style: this.props.style
19
- }, this.props.children);
20
- }
21
- }
22
- exports.Brief = Brief;
23
- class ListItem extends React.Component {
24
- constructor(props) {
25
- super(props);
26
- this.onClick = ev => {
27
- const {
28
- onClick,
29
- platform
30
- } = this.props;
31
- const isAndroid = platform === 'android';
32
- if (!!onClick && isAndroid) {
33
- if (this.debounceTimeout) {
34
- clearTimeout(this.debounceTimeout);
35
- this.debounceTimeout = null;
36
- }
37
- const Item = ev.currentTarget;
38
- const RippleWidth = Math.max(Item.offsetHeight, Item.offsetWidth);
39
- const ClientRect = ev.currentTarget.getBoundingClientRect();
40
- const pointX = ev.clientX - ClientRect.left - Item.offsetWidth / 2;
41
- const pointY = ev.clientY - ClientRect.top - Item.offsetWidth / 2;
42
- const coverRippleStyle = {
43
- width: "".concat(RippleWidth, "px"),
44
- height: "".concat(RippleWidth, "px"),
45
- left: "".concat(pointX, "px"),
46
- top: "".concat(pointY, "px")
47
- };
48
- this.setState({
49
- coverRippleStyle,
50
- RippleClicked: true
51
- }, () => {
52
- this.debounceTimeout = setTimeout(() => {
53
- this.setState({
54
- coverRippleStyle: {
55
- display: 'none'
56
- },
57
- RippleClicked: false
58
- });
59
- }, 1000);
60
- });
61
- }
62
- if (onClick) {
63
- onClick(ev);
64
- }
65
- };
66
- this.state = {
67
- coverRippleStyle: {
68
- display: 'none'
69
- },
70
- RippleClicked: false
71
- };
72
- }
73
- componentWillUnmount() {
74
- if (this.debounceTimeout) {
75
- clearTimeout(this.debounceTimeout);
76
- this.debounceTimeout = null;
77
- }
78
- }
79
- render() {
80
- const {
81
- prefixCls,
82
- className,
83
- activeStyle,
84
- error,
85
- align,
86
- wrap,
87
- disabled,
88
- children,
89
- multipleLine,
90
- thumb,
91
- extra,
92
- arrow,
93
- onClick,
94
- ...restProps
95
- } = this.props;
96
- const {
97
- platform,
98
- ...otherProps
99
- } = restProps;
100
- const {
101
- coverRippleStyle,
102
- RippleClicked
103
- } = this.state;
104
- const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-item"), className, {
105
- ["".concat(prefixCls, "-item-disabled")]: disabled,
106
- ["".concat(prefixCls, "-item-error")]: error,
107
- ["".concat(prefixCls, "-item-top")]: align === 'top',
108
- ["".concat(prefixCls, "-item-middle")]: align === 'middle',
109
- ["".concat(prefixCls, "-item-bottom")]: align === 'bottom'
110
- });
111
- const rippleCls = (0, _classnames.default)("".concat(prefixCls, "-ripple"), {
112
- ["".concat(prefixCls, "-ripple-animate")]: RippleClicked
113
- });
114
- const lineCls = (0, _classnames.default)("".concat(prefixCls, "-line"), {
115
- ["".concat(prefixCls, "-line-multiple")]: multipleLine,
116
- ["".concat(prefixCls, "-line-wrap")]: wrap
117
- });
118
- const arrowCls = (0, _classnames.default)("".concat(prefixCls, "-arrow"), {
119
- ["".concat(prefixCls, "-arrow-horizontal")]: arrow === 'horizontal',
120
- ["".concat(prefixCls, "-arrow-vertical")]: arrow === 'down' || arrow === 'up',
121
- ["".concat(prefixCls, "-arrow-vertical-up")]: arrow === 'up'
122
- });
123
- const content = /*#__PURE__*/React.createElement("div", Object.assign({}, otherProps, {
124
- onClick: ev => {
125
- this.onClick(ev);
126
- },
127
- className: wrapCls
128
- }), thumb ? /*#__PURE__*/React.createElement("div", {
129
- className: "".concat(prefixCls, "-thumb")
130
- }, typeof thumb === 'string' ? /*#__PURE__*/React.createElement("img", {
131
- src: thumb,
132
- alt: ""
133
- }) : thumb) : null, /*#__PURE__*/React.createElement("div", {
134
- className: lineCls
135
- }, children !== undefined && /*#__PURE__*/React.createElement("div", {
136
- className: "".concat(prefixCls, "-content")
137
- }, children), extra !== undefined && /*#__PURE__*/React.createElement("div", {
138
- className: "".concat(prefixCls, "-extra")
139
- }, extra), arrow && /*#__PURE__*/React.createElement("div", {
140
- className: arrowCls,
141
- "aria-hidden": "true"
142
- })), /*#__PURE__*/React.createElement("div", {
143
- style: coverRippleStyle,
144
- className: rippleCls
145
- }));
146
- let touchProps = {};
147
- Object.keys(otherProps).forEach(key => {
148
- if (/onTouch/i.test(key)) {
149
- touchProps[key] = otherProps[key];
150
- delete otherProps[key];
151
- }
152
- });
153
- return /*#__PURE__*/React.createElement(_rmcFeedback.default, Object.assign({}, touchProps, {
154
- disabled: disabled || !onClick,
155
- activeStyle: activeStyle,
156
- activeClassName: "".concat(prefixCls, "-item-active")
157
- }), content);
158
- }
159
- }
160
- ListItem.defaultProps = {
161
- prefixCls: 'am-list',
162
- align: 'middle',
163
- error: false,
164
- multipleLine: false,
165
- wrap: false,
166
- platform: 'ios'
167
- };
168
- ListItem.Brief = Brief;
169
- var _default = exports.default = ListItem;
@@ -1,82 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = alert;
9
- var React = _interopRequireWildcard(require("react"));
10
- var ReactDOM = _interopRequireWildcard(require("react-dom"));
11
- var _closest = _interopRequireDefault(require("../_util/closest"));
12
- var _modal = _interopRequireDefault(require("./modal"));
13
- function alert(title, message) {
14
- let actions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [{
15
- text: '确定'
16
- }];
17
- let platform = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'ios';
18
- let closed = false;
19
- if (!title && !message) {
20
- // console.log('Must specify either an alert title, or message, or both');
21
- return {
22
- close: () => {}
23
- };
24
- }
25
- const div = document.createElement('div');
26
- document.body.appendChild(div);
27
- function close() {
28
- ReactDOM.unmountComponentAtNode(div);
29
- if (div && div.parentNode) {
30
- div.parentNode.removeChild(div);
31
- }
32
- }
33
- const footer = actions.map(button => {
34
- // tslint:disable-next-line:only-arrow-functions
35
- const orginPress = button.onPress || function () {};
36
- button.onPress = () => {
37
- if (closed) {
38
- return;
39
- }
40
- const res = orginPress();
41
- if (res && res.then) {
42
- res.then(() => {
43
- closed = true;
44
- close();
45
- }).catch(() => {});
46
- } else {
47
- closed = true;
48
- close();
49
- }
50
- };
51
- return button;
52
- });
53
- const prefixCls = 'am-modal';
54
- function onWrapTouchStart(e) {
55
- if (!/iPhone|iPod|iPad/i.test(navigator.userAgent)) {
56
- return;
57
- }
58
- const pNode = (0, _closest.default)(e.target, ".".concat(prefixCls, "-footer"));
59
- if (!pNode) {
60
- e.preventDefault();
61
- }
62
- }
63
- ReactDOM.render( /*#__PURE__*/React.createElement(_modal.default, {
64
- visible: true,
65
- transparent: true,
66
- title: title,
67
- transitionName: "am-zoom",
68
- closable: false,
69
- maskClosable: false,
70
- footer: footer,
71
- maskTransitionName: "am-fade",
72
- platform: platform,
73
- wrapProps: {
74
- onTouchStart: onWrapTouchStart
75
- }
76
- }, /*#__PURE__*/React.createElement("div", {
77
- className: "".concat(prefixCls, "-alert-content")
78
- }, message)), div);
79
- return {
80
- close
81
- };
82
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _alert = _interopRequireDefault(require("./alert"));
9
- var _modal = _interopRequireDefault(require("./modal"));
10
- var _operation = _interopRequireDefault(require("./operation"));
11
- var _prompt = _interopRequireDefault(require("./prompt"));
12
- require("./style/index.css");
13
- _modal.default.alert = _alert.default;
14
- _modal.default.prompt = _prompt.default;
15
- _modal.default.operation = _operation.default;
16
- var _default = exports.default = _modal.default;