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.
- package/lib/DateEditor/mb-date-editor-popover/index.js +3 -3
- package/lib/Department-editor/department-multiple-select/index.css +4 -1
- package/lib/Department-editor/department-multiple-select/index.js +7 -4
- package/lib/Department-editor/department-single-select.js +7 -4
- package/lib/Department-editor/index.css +4 -0
- package/lib/FileFormatter/index.js +98 -38
- package/lib/FileItemFormatter/index.js +3 -1
- package/lib/constants/file.js +1 -0
- package/lib/index.js +1 -106
- package/lib/locales/zh-CN.json +1 -1
- package/package.json +3 -12
- package/lib/ActionSheet/index.js +0 -194
- package/lib/ActionSheet/style/index.css +0 -365
- package/lib/ActivityIndicator/index.css +0 -108
- package/lib/ActivityIndicator/index.js +0 -76
- package/lib/Badge/index.css +0 -96
- package/lib/Badge/index.js +0 -65
- package/lib/DatePicker/index.js +0 -120
- package/lib/DatePicker/locale/en_US.js +0 -14
- package/lib/DatePicker/locale/ru_RU.js +0 -14
- package/lib/DatePicker/locale/sv_SE.js +0 -14
- package/lib/DatePicker/locale/zh_CN.js +0 -14
- package/lib/DatePicker/style/index.css +0 -290
- package/lib/DatePicker/utils.js +0 -36
- package/lib/Drawer/index.css +0 -142
- package/lib/Drawer/index.js +0 -21
- package/lib/Icon/index.css +0 -50
- package/lib/Icon/index.js +0 -35
- package/lib/Icon/load-sprite.js +0 -56
- package/lib/InputItem/custom-input.js +0 -321
- package/lib/InputItem/custom-keyboard.js +0 -162
- package/lib/InputItem/index.js +0 -389
- package/lib/InputItem/input.js +0 -45
- package/lib/InputItem/locale/en_US.js +0 -12
- package/lib/InputItem/locale/ru_RU.js +0 -12
- package/lib/InputItem/locale/sv_SE.js +0 -12
- package/lib/InputItem/locale/zh_CN.js +0 -12
- package/lib/InputItem/portal.js +0 -23
- package/lib/InputItem/style/index.css +0 -512
- package/lib/List/index.css +0 -381
- package/lib/List/index.js +0 -41
- package/lib/List/list-item.js +0 -169
- package/lib/Modal/alert.js +0 -82
- package/lib/Modal/index.js +0 -16
- package/lib/Modal/modal.js +0 -118
- package/lib/Modal/operation.js +0 -77
- package/lib/Modal/prompt.js +0 -207
- package/lib/Modal/style/index.css +0 -580
- package/lib/Picker/AbstractPicker.js +0 -190
- package/lib/Picker/index.js +0 -28
- package/lib/Picker/locale/en_US.js +0 -12
- package/lib/Picker/locale/ru_RU.js +0 -12
- package/lib/Picker/locale/sv_SE.js +0 -12
- package/lib/Picker/locale/zh_CN.js +0 -12
- package/lib/Picker/popupProps.js +0 -12
- package/lib/Picker/style/index.css +0 -141
- package/lib/Popover/index.js +0 -63
- package/lib/Popover/item.js +0 -55
- package/lib/Popover/style/index.css +0 -229
- package/lib/Progress/index.css +0 -22
- package/lib/Progress/index.js +0 -66
- package/lib/Radio/Radio.js +0 -47
- package/lib/Radio/RadioItem.js +0 -57
- package/lib/Radio/index.css +0 -90
- package/lib/Radio/index.js +0 -12
- package/lib/TabBar/Tab.js +0 -76
- package/lib/TabBar/index.css +0 -138
- package/lib/TabBar/index.js +0 -129
- package/lib/Tabs/index.css +0 -443
- package/lib/Tabs/index.js +0 -39
- package/lib/TextareaItem/index.css +0 -231
- package/lib/TextareaItem/index.js +0 -231
- package/lib/Toast/index.css +0 -65
- package/lib/Toast/index.js +0 -131
- package/lib/_util/class.js +0 -34
- package/lib/_util/closest.js +0 -17
- package/lib/_util/exenv.js +0 -8
- package/lib/_util/getDataAttr.js +0 -15
- package/lib/_util/getLocale.js +0 -42
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
.am-popover {
|
|
2
|
-
position: absolute;
|
|
3
|
-
z-index: 1999;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.am-popover-hidden {
|
|
7
|
-
display: none;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.am-popover-mask {
|
|
11
|
-
position: fixed;
|
|
12
|
-
top: 0;
|
|
13
|
-
right: 0;
|
|
14
|
-
left: 0;
|
|
15
|
-
bottom: 0;
|
|
16
|
-
background-color: rgba(0, 0, 0, 0.4);
|
|
17
|
-
height: 100%;
|
|
18
|
-
z-index: 999;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.am-popover-mask-hidden {
|
|
22
|
-
display: none;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.am-popover-arrow {
|
|
26
|
-
position: absolute;
|
|
27
|
-
width: 7px;
|
|
28
|
-
height: 7px;
|
|
29
|
-
border-radius: 1PX;
|
|
30
|
-
background-color: #fff;
|
|
31
|
-
-webkit-transform: rotate(45deg);
|
|
32
|
-
-ms-transform: rotate(45deg);
|
|
33
|
-
transform: rotate(45deg);
|
|
34
|
-
z-index: 0;
|
|
35
|
-
-webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.21);
|
|
36
|
-
box-shadow: 0 0 2px rgba(0, 0, 0, 0.21);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.am-popover-placement-top .am-popover-arrow,
|
|
40
|
-
.am-popover-placement-topLeft .am-popover-arrow,
|
|
41
|
-
.am-popover-placement-topRight .am-popover-arrow {
|
|
42
|
-
-webkit-transform: rotate(225deg);
|
|
43
|
-
-ms-transform: rotate(225deg);
|
|
44
|
-
transform: rotate(225deg);
|
|
45
|
-
bottom: -3.5px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.am-popover-placement-top .am-popover-arrow {
|
|
49
|
-
left: 50%;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.am-popover-placement-topLeft .am-popover-arrow {
|
|
53
|
-
left: 8px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.am-popover-placement-topRight .am-popover-arrow {
|
|
57
|
-
right: 8px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.am-popover-placement-right .am-popover-arrow,
|
|
61
|
-
.am-popover-placement-rightTop .am-popover-arrow,
|
|
62
|
-
.am-popover-placement-rightBottom .am-popover-arrow {
|
|
63
|
-
-webkit-transform: rotate(-45deg);
|
|
64
|
-
-ms-transform: rotate(-45deg);
|
|
65
|
-
transform: rotate(-45deg);
|
|
66
|
-
left: -3.5px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.am-popover-placement-right .am-popover-arrow {
|
|
70
|
-
top: 50%;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.am-popover-placement-rightTop .am-popover-arrow {
|
|
74
|
-
top: 8px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.am-popover-placement-rightBottom .am-popover-arrow {
|
|
78
|
-
bottom: 8px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.am-popover-placement-left .am-popover-arrow,
|
|
82
|
-
.am-popover-placement-leftTop .am-popover-arrow,
|
|
83
|
-
.am-popover-placement-leftBottom .am-popover-arrow {
|
|
84
|
-
-webkit-transform: rotate(135deg);
|
|
85
|
-
-ms-transform: rotate(135deg);
|
|
86
|
-
transform: rotate(135deg);
|
|
87
|
-
right: -3.5px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.am-popover-placement-left .am-popover-arrow {
|
|
91
|
-
top: 50%;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.am-popover-placement-leftTop .am-popover-arrow {
|
|
95
|
-
top: 8px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.am-popover-placement-leftBottom .am-popover-arrow {
|
|
99
|
-
bottom: 8px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.am-popover-placement-bottom .am-popover-arrow,
|
|
103
|
-
.am-popover-placement-bottomLeft .am-popover-arrow,
|
|
104
|
-
.am-popover-placement-bottomRight .am-popover-arrow {
|
|
105
|
-
top: -3.5px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.am-popover-placement-bottom .am-popover-arrow {
|
|
109
|
-
left: 50%;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.am-popover-placement-bottomLeft .am-popover-arrow {
|
|
113
|
-
left: 8px;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.am-popover-placement-bottomRight .am-popover-arrow {
|
|
117
|
-
right: 8px;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.am-popover-inner {
|
|
121
|
-
font-size: 15px;
|
|
122
|
-
color: #000;
|
|
123
|
-
background-color: #fff;
|
|
124
|
-
border-radius: 3px;
|
|
125
|
-
-webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.21);
|
|
126
|
-
box-shadow: 0 0 2px rgba(0, 0, 0, 0.21);
|
|
127
|
-
overflow: hidden;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.am-popover-inner-wrapper {
|
|
131
|
-
position: relative;
|
|
132
|
-
background-color: #fff;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.am-popover .am-popover-item {
|
|
136
|
-
padding: 0 8px;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.am-popover .am-popover-item-container {
|
|
140
|
-
position: relative;
|
|
141
|
-
display: -webkit-box;
|
|
142
|
-
display: -webkit-flex;
|
|
143
|
-
display: -ms-flexbox;
|
|
144
|
-
display: flex;
|
|
145
|
-
-webkit-box-align: center;
|
|
146
|
-
-webkit-align-items: center;
|
|
147
|
-
-ms-flex-align: center;
|
|
148
|
-
align-items: center;
|
|
149
|
-
height: 39px;
|
|
150
|
-
-webkit-box-sizing: border-box;
|
|
151
|
-
box-sizing: border-box;
|
|
152
|
-
padding: 0 8px;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.am-popover .am-popover-item:not(:first-child) .am-popover-item-container {
|
|
156
|
-
border-top: 1PX solid #ddd;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
|
|
160
|
-
html:not([data-scale]) .am-popover .am-popover-item:not(:first-child) .am-popover-item-container {
|
|
161
|
-
border-top: none;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
html:not([data-scale]) .am-popover .am-popover-item:not(:first-child) .am-popover-item-container::before {
|
|
165
|
-
content: '';
|
|
166
|
-
position: absolute;
|
|
167
|
-
background-color: #ddd;
|
|
168
|
-
display: block;
|
|
169
|
-
z-index: 1;
|
|
170
|
-
top: 0;
|
|
171
|
-
right: auto;
|
|
172
|
-
bottom: auto;
|
|
173
|
-
left: 0;
|
|
174
|
-
width: 100%;
|
|
175
|
-
height: 1PX;
|
|
176
|
-
-webkit-transform-origin: 50% 50%;
|
|
177
|
-
-ms-transform-origin: 50% 50%;
|
|
178
|
-
transform-origin: 50% 50%;
|
|
179
|
-
-webkit-transform: scaleY(0.5);
|
|
180
|
-
-ms-transform: scaleY(0.5);
|
|
181
|
-
transform: scaleY(0.5);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
@media (-webkit-min-device-pixel-ratio: 2) and (-webkit-min-device-pixel-ratio: 3), (min-resolution: 2dppx) and (min-resolution: 3dppx) {
|
|
186
|
-
html:not([data-scale]) .am-popover .am-popover-item:not(:first-child) .am-popover-item-container::before {
|
|
187
|
-
-webkit-transform: scaleY(0.33);
|
|
188
|
-
-ms-transform: scaleY(0.33);
|
|
189
|
-
transform: scaleY(0.33);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.am-popover .am-popover-item.am-popover-item-active .am-popover-item-container {
|
|
194
|
-
border-top: 0;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.am-popover .am-popover-item.am-popover-item-active .am-popover-item-container:before {
|
|
198
|
-
display: none !important;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.am-popover .am-popover-item.am-popover-item-active+.am-popover-item .am-popover-item-container {
|
|
202
|
-
border-top: 0;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.am-popover .am-popover-item.am-popover-item-active+.am-popover-item .am-popover-item-container:before {
|
|
206
|
-
display: none !important;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.am-popover .am-popover-item.am-popover-item-active {
|
|
210
|
-
background-color: #ddd;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.am-popover .am-popover-item.am-popover-item-active.am-popover-item-fix-active-arrow {
|
|
214
|
-
position: relative;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.am-popover .am-popover-item.am-popover-item-disabled {
|
|
218
|
-
color: #bbb;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.am-popover .am-popover-item.am-popover-item-disabled.am-popover-item-active {
|
|
222
|
-
background-color: transparent;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.am-popover .am-popover-item-icon {
|
|
226
|
-
margin-right: 8px;
|
|
227
|
-
width: 18px;
|
|
228
|
-
height: 18px;
|
|
229
|
-
}
|
package/lib/Progress/index.css
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.am-progress-outer {
|
|
2
|
-
background-color: #ddd;
|
|
3
|
-
display: block;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.am-progress-fixed-outer {
|
|
7
|
-
position: fixed;
|
|
8
|
-
width: 100%;
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
z-index: 2000;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.am-progress-hide-outer {
|
|
15
|
-
background-color: transparent;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.am-progress-bar {
|
|
19
|
-
border: 2px solid #108ee9;
|
|
20
|
-
-webkit-transition: all .3s linear 0s;
|
|
21
|
-
transition: all .3s linear 0s;
|
|
22
|
-
}
|
package/lib/Progress/index.js
DELETED
|
@@ -1,66 +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
|
-
require("./index.css");
|
|
12
|
-
class Progress extends React.Component {
|
|
13
|
-
componentWillReceiveProps() {
|
|
14
|
-
this.noAppearTransition = true;
|
|
15
|
-
}
|
|
16
|
-
componentDidMount() {
|
|
17
|
-
if (this.props.appearTransition) {
|
|
18
|
-
setTimeout(() => {
|
|
19
|
-
if (this.barRef) {
|
|
20
|
-
this.barRef.style.width = "".concat(this.props.percent, "%");
|
|
21
|
-
}
|
|
22
|
-
}, 10);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
const {
|
|
27
|
-
className,
|
|
28
|
-
prefixCls,
|
|
29
|
-
position,
|
|
30
|
-
unfilled,
|
|
31
|
-
style = {},
|
|
32
|
-
barStyle = {}
|
|
33
|
-
} = this.props;
|
|
34
|
-
const percentStyle = {
|
|
35
|
-
width: this.noAppearTransition || !this.props.appearTransition ? "".concat(this.props.percent, "%") : 0,
|
|
36
|
-
height: 0
|
|
37
|
-
};
|
|
38
|
-
const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-outer"), className, {
|
|
39
|
-
["".concat(prefixCls, "-fixed-outer")]: position === 'fixed',
|
|
40
|
-
["".concat(prefixCls, "-hide-outer")]: !unfilled
|
|
41
|
-
});
|
|
42
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
style: style,
|
|
44
|
-
className: wrapCls,
|
|
45
|
-
role: "progressbar",
|
|
46
|
-
"aria-valuenow": this.props.percent,
|
|
47
|
-
"aria-valuemin": 0,
|
|
48
|
-
"aria-valuemax": 100
|
|
49
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
50
|
-
ref: el => this.barRef = el,
|
|
51
|
-
className: "".concat(prefixCls, "-bar"),
|
|
52
|
-
style: {
|
|
53
|
-
...barStyle,
|
|
54
|
-
...percentStyle
|
|
55
|
-
}
|
|
56
|
-
}));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.default = Progress;
|
|
60
|
-
Progress.defaultProps = {
|
|
61
|
-
prefixCls: 'am-progress',
|
|
62
|
-
percent: 0,
|
|
63
|
-
position: 'fixed',
|
|
64
|
-
unfilled: true,
|
|
65
|
-
appearTransition: false
|
|
66
|
-
};
|
package/lib/Radio/Radio.js
DELETED
|
@@ -1,47 +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 _rcCheckbox = _interopRequireDefault(require("rc-checkbox"));
|
|
11
|
-
var React = _interopRequireWildcard(require("react"));
|
|
12
|
-
class Radio extends React.Component {
|
|
13
|
-
render() {
|
|
14
|
-
const {
|
|
15
|
-
className,
|
|
16
|
-
style,
|
|
17
|
-
...restProps
|
|
18
|
-
} = this.props;
|
|
19
|
-
const {
|
|
20
|
-
prefixCls,
|
|
21
|
-
children
|
|
22
|
-
} = restProps;
|
|
23
|
-
const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-wrapper"), className);
|
|
24
|
-
if ('class' in restProps) {
|
|
25
|
-
// Todo https://github.com/developit/preact-compat/issues/422
|
|
26
|
-
/* tslint:disable:no-string-literal */
|
|
27
|
-
delete restProps['class'];
|
|
28
|
-
}
|
|
29
|
-
const mark = /*#__PURE__*/React.createElement("label", {
|
|
30
|
-
className: wrapCls,
|
|
31
|
-
style: style
|
|
32
|
-
}, /*#__PURE__*/React.createElement(_rcCheckbox.default, Object.assign({}, restProps, {
|
|
33
|
-
type: "radio"
|
|
34
|
-
})), children);
|
|
35
|
-
if (this.props.wrapLabel) {
|
|
36
|
-
return mark;
|
|
37
|
-
}
|
|
38
|
-
return /*#__PURE__*/React.createElement(_rcCheckbox.default, Object.assign({}, this.props, {
|
|
39
|
-
type: "radio"
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.default = Radio;
|
|
44
|
-
Radio.defaultProps = {
|
|
45
|
-
prefixCls: 'am-radio',
|
|
46
|
-
wrapLabel: true
|
|
47
|
-
};
|
package/lib/Radio/RadioItem.js
DELETED
|
@@ -1,57 +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 _List = _interopRequireDefault(require("../List"));
|
|
12
|
-
var _Radio = _interopRequireDefault(require("./Radio"));
|
|
13
|
-
const ListItem = _List.default.Item;
|
|
14
|
-
function noop() {}
|
|
15
|
-
class RadioItem extends React.Component {
|
|
16
|
-
render() {
|
|
17
|
-
const {
|
|
18
|
-
listPrefixCls,
|
|
19
|
-
onChange,
|
|
20
|
-
disabled,
|
|
21
|
-
radioProps,
|
|
22
|
-
onClick,
|
|
23
|
-
...otherProps
|
|
24
|
-
} = this.props;
|
|
25
|
-
const {
|
|
26
|
-
prefixCls,
|
|
27
|
-
className,
|
|
28
|
-
children
|
|
29
|
-
} = otherProps;
|
|
30
|
-
const wrapCls = (0, _classnames.default)("".concat(prefixCls, "-item"), className, {
|
|
31
|
-
["".concat(prefixCls, "-item-disabled")]: disabled === true
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
// Note: if not omit `onChange`, it will trigger twice on check listitem
|
|
35
|
-
|
|
36
|
-
if (!disabled) {
|
|
37
|
-
otherProps.onClick = onClick || noop;
|
|
38
|
-
}
|
|
39
|
-
const extraProps = {};
|
|
40
|
-
['name', 'defaultChecked', 'checked', 'onChange', 'disabled'].forEach(i => {
|
|
41
|
-
if (i in this.props) {
|
|
42
|
-
extraProps[i] = this.props[i];
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
return /*#__PURE__*/React.createElement(ListItem, Object.assign({}, otherProps, {
|
|
46
|
-
prefixCls: listPrefixCls,
|
|
47
|
-
className: wrapCls,
|
|
48
|
-
extra: /*#__PURE__*/React.createElement(_Radio.default, Object.assign({}, radioProps, extraProps))
|
|
49
|
-
}), children);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.default = RadioItem;
|
|
53
|
-
RadioItem.defaultProps = {
|
|
54
|
-
prefixCls: 'am-radio',
|
|
55
|
-
listPrefixCls: 'am-list',
|
|
56
|
-
radioProps: {}
|
|
57
|
-
};
|
package/lib/Radio/index.css
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
.am-radio {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: inline-block;
|
|
4
|
-
vertical-align: middle;
|
|
5
|
-
width: 15px;
|
|
6
|
-
height: 15px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.am-radio-inner {
|
|
10
|
-
position: absolute;
|
|
11
|
-
right: 0;
|
|
12
|
-
width: 15px;
|
|
13
|
-
height: 15px;
|
|
14
|
-
-webkit-box-sizing: border-box;
|
|
15
|
-
box-sizing: border-box;
|
|
16
|
-
-webkit-transform: rotate(0deg);
|
|
17
|
-
-ms-transform: rotate(0deg);
|
|
18
|
-
transform: rotate(0deg);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.am-radio-inner:after {
|
|
22
|
-
position: absolute;
|
|
23
|
-
display: none;
|
|
24
|
-
top: -2.5px;
|
|
25
|
-
right: 5px;
|
|
26
|
-
z-index: 999;
|
|
27
|
-
width: 7px;
|
|
28
|
-
height: 14px;
|
|
29
|
-
border-style: solid;
|
|
30
|
-
border-width: 0 1.5px 1.5px 0;
|
|
31
|
-
content: '\0020';
|
|
32
|
-
-webkit-transform: rotate(45deg);
|
|
33
|
-
-ms-transform: rotate(45deg);
|
|
34
|
-
transform: rotate(45deg);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.am-radio-input {
|
|
38
|
-
position: absolute;
|
|
39
|
-
top: 0;
|
|
40
|
-
left: 0;
|
|
41
|
-
opacity: 0;
|
|
42
|
-
width: 100%;
|
|
43
|
-
height: 100%;
|
|
44
|
-
z-index: 2;
|
|
45
|
-
border: 0 none;
|
|
46
|
-
-webkit-appearance: none;
|
|
47
|
-
-moz-appearance: none;
|
|
48
|
-
appearance: none;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.am-radio.am-radio-checked .am-radio-inner {
|
|
52
|
-
border-width: 0;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.am-radio.am-radio-checked .am-radio-inner:after {
|
|
56
|
-
display: block;
|
|
57
|
-
border-color: #108ee9;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.am-radio.am-radio-disabled.am-radio-checked .am-radio-inner:after {
|
|
61
|
-
display: block;
|
|
62
|
-
border-color: #bbb;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.am-list .am-list-item.am-radio-item .am-list-line .am-list-extra {
|
|
66
|
-
-webkit-box-flex: 0;
|
|
67
|
-
-webkit-flex: 0;
|
|
68
|
-
-ms-flex: 0;
|
|
69
|
-
flex: 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.am-list .am-list-item.am-radio-item .am-list-line .am-list-extra .am-radio {
|
|
73
|
-
position: absolute;
|
|
74
|
-
top: 0;
|
|
75
|
-
left: 0;
|
|
76
|
-
right: 0;
|
|
77
|
-
bottom: 0;
|
|
78
|
-
width: 100%;
|
|
79
|
-
height: 44px;
|
|
80
|
-
overflow: visible;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.am-list .am-list-item.am-radio-item .am-list-line .am-list-extra .am-radio-inner {
|
|
84
|
-
right: 15px;
|
|
85
|
-
top: 15px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.am-list .am-list-item.am-radio-item.am-radio-item-disabled .am-list-content {
|
|
89
|
-
color: #bbb;
|
|
90
|
-
}
|
package/lib/Radio/index.js
DELETED
|
@@ -1,12 +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 _Radio = _interopRequireDefault(require("./Radio"));
|
|
9
|
-
var _RadioItem = _interopRequireDefault(require("./RadioItem"));
|
|
10
|
-
require("./index.css");
|
|
11
|
-
_Radio.default.RadioItem = _RadioItem.default;
|
|
12
|
-
var _default = exports.default = _Radio.default;
|
package/lib/TabBar/Tab.js
DELETED
|
@@ -1,76 +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 = void 0;
|
|
9
|
-
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _Badge = _interopRequireDefault(require("../Badge"));
|
|
11
|
-
class Tab extends React.PureComponent {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
this.renderIcon = () => {
|
|
15
|
-
const {
|
|
16
|
-
dot,
|
|
17
|
-
badge,
|
|
18
|
-
selected,
|
|
19
|
-
selectedIcon,
|
|
20
|
-
icon,
|
|
21
|
-
title,
|
|
22
|
-
prefixCls
|
|
23
|
-
} = this.props;
|
|
24
|
-
const iconRes = selected ? selectedIcon : icon;
|
|
25
|
-
const iconDom = /*#__PURE__*/React.isValidElement(iconRes) ? iconRes : /*#__PURE__*/React.createElement("img", {
|
|
26
|
-
className: "".concat(prefixCls, "-image"),
|
|
27
|
-
src: iconRes ? iconRes.uri : iconRes,
|
|
28
|
-
alt: title
|
|
29
|
-
});
|
|
30
|
-
if (badge) {
|
|
31
|
-
return /*#__PURE__*/React.createElement(_Badge.default, {
|
|
32
|
-
text: badge,
|
|
33
|
-
className: "".concat(prefixCls, "-badge tab-badge")
|
|
34
|
-
}, ' ', iconDom, ' ');
|
|
35
|
-
}
|
|
36
|
-
if (dot) {
|
|
37
|
-
return /*#__PURE__*/React.createElement(_Badge.default, {
|
|
38
|
-
dot: true,
|
|
39
|
-
className: "".concat(prefixCls, "-badge tab-dot")
|
|
40
|
-
}, iconDom);
|
|
41
|
-
}
|
|
42
|
-
return iconDom;
|
|
43
|
-
};
|
|
44
|
-
this.onClick = () => {
|
|
45
|
-
const onClick = this.props.onClick;
|
|
46
|
-
if (onClick) {
|
|
47
|
-
onClick();
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
render() {
|
|
52
|
-
const {
|
|
53
|
-
title,
|
|
54
|
-
prefixCls,
|
|
55
|
-
selected,
|
|
56
|
-
unselectedTintColor,
|
|
57
|
-
tintColor
|
|
58
|
-
} = this.props;
|
|
59
|
-
const iconColor = selected ? tintColor : unselectedTintColor;
|
|
60
|
-
return /*#__PURE__*/React.createElement("div", Object.assign({}, this.props.dataAttrs, {
|
|
61
|
-
onClick: this.onClick,
|
|
62
|
-
className: "".concat(prefixCls)
|
|
63
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
64
|
-
className: "".concat(prefixCls, "-icon"),
|
|
65
|
-
style: {
|
|
66
|
-
color: iconColor
|
|
67
|
-
}
|
|
68
|
-
}, this.renderIcon()), /*#__PURE__*/React.createElement("p", {
|
|
69
|
-
className: "".concat(prefixCls, "-title"),
|
|
70
|
-
style: {
|
|
71
|
-
color: selected ? tintColor : unselectedTintColor
|
|
72
|
-
}
|
|
73
|
-
}, title));
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
var _default = exports.default = Tab;
|