@trionesdev/antd-mobile-react 0.0.2-beta.15 → 0.0.2-beta.17
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/LICENSE +21 -21
- package/dist/ActionSheet/style.scss +52 -52
- package/dist/Avatar/demo/base.js +2 -2
- package/dist/Avatar/demo/style.scss +6 -6
- package/dist/Badge/demo/base.js +2 -2
- package/dist/Badge/demo/base.scss +6 -6
- package/dist/Button/button.d.ts +2 -1
- package/dist/Button/button.js +1 -1
- package/dist/Button/demo/base.js +2 -2
- package/dist/Button/style.scss +234 -234
- package/dist/Calendar/style.scss +85 -85
- package/dist/Calendar/touchable-calendar-grid.js +9 -9
- package/dist/CalendarDatetimePicker/style.scss +54 -54
- package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.d.ts +5 -4
- package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.js +7 -6
- package/dist/CalendarDatetimePickerCell/demo/base.js +2 -3
- package/dist/CalendarDatetimePickerCell/index.d.ts +1 -1
- package/dist/CalendarDatetimePickerCell/index.js +1 -1
- package/dist/CalendarDatetimePickerCell/style.scss +10 -10
- package/dist/CalendarPicker/style.scss +31 -31
- package/dist/CalendarPickerCell/CalendarPickerCell.d.ts +2 -2
- package/dist/CalendarPickerCell/CalendarPickerCell.js +3 -3
- package/dist/CalendarPickerCell/CalendarRangePickerCell.d.ts +2 -2
- package/dist/CalendarPickerCell/CalendarRangePickerCell.js +3 -3
- package/dist/CalendarPickerCell/demo/base.js +2 -4
- package/dist/Card/demo/base.js +2 -2
- package/dist/Card/demo/base.scss +18 -18
- package/dist/CascaderPicker/style.scss +45 -45
- package/dist/CascaderPickerCell/CascaderPickerCell.d.ts +2 -2
- package/dist/CascaderPickerCell/CascaderPickerCell.js +3 -3
- package/dist/CascaderPickerCell/demo/base.js +1 -2
- package/dist/CascaderPickerCell/style.scss +24 -24
- package/dist/Cell/demo/base.js +1 -1
- package/dist/Checkbox/demo/base.js +2 -2
- package/dist/ConfigProvider/demo/base.js +2 -2
- package/dist/DemoBlock/index.scss +20 -20
- package/dist/DemoDescription/index.scss +3 -3
- package/dist/Divider/demo/base.js +2 -2
- package/dist/Ellipsis/demo/base.js +2 -2
- package/dist/Empty/demo/base.js +2 -2
- package/dist/ErrorBlock/demo/base.js +2 -2
- package/dist/FloatButton/style.scss +123 -123
- package/dist/Footer/demo/base.js +2 -2
- package/dist/Form/FormItem/{form-item-input.d.ts → form-item-content.d.ts} +3 -1
- package/dist/Form/FormItem/{form-item-input.js → form-item-content.js} +1 -1
- package/dist/Form/FormItem/form-item-label.d.ts +3 -3
- package/dist/Form/FormItem/form-item-label.js +10 -8
- package/dist/Form/FormItem/form-item.d.ts +33 -4
- package/dist/Form/FormItem/form-item.js +22 -21
- package/dist/Form/demo/input.js +6 -2
- package/dist/Form/demo/vertical.js +45 -0
- package/dist/Form/index.d.ts +2 -2
- package/dist/Form/style.scss +106 -67
- package/dist/FormCell/index.d.ts +3 -0
- package/dist/FormCell/index.js +2 -0
- package/dist/Grid/demo/base.js +2 -2
- package/dist/Grid/demo/base.scss +7 -7
- package/dist/Icon/demo/base.js +2 -2
- package/dist/Image/demo/base.js +2 -2
- package/dist/Image/demo/base.scss +4 -4
- package/dist/Image/style.scss +30 -30
- package/dist/ImagesPreview/style.scss +34 -34
- package/dist/ImagesWall/style.scss +70 -70
- package/dist/Input/demo/base.js +28 -2
- package/dist/Input/index.scss +240 -223
- package/dist/Input/input-affix-wrapper.d.ts +3 -1
- package/dist/Input/input-affix-wrapper.js +4 -4
- package/dist/Input/input.d.ts +3 -1
- package/dist/Input/input.js +5 -2
- package/dist/Loading/DotLoading.d.ts +1 -0
- package/dist/Loading/DotLoading.js +1 -0
- package/dist/Loading/SpinLoading.d.ts +1 -0
- package/dist/Loading/SpinLoading.js +1 -0
- package/dist/Loading/demo/base.d.ts +3 -0
- package/dist/{SpinLoading → Loading}/demo/base.js +8 -2
- package/dist/Loading/demo/dot-loading.d.ts +3 -0
- package/dist/Loading/demo/dot-loading.js +25 -0
- package/dist/Loading/index.d.ts +5 -0
- package/dist/Loading/index.js +3 -0
- package/dist/NavBar/demo/base.scss +5 -5
- package/dist/NoticeBar/demo/base.js +2 -2
- package/dist/Overlay/style.scss +20 -20
- package/dist/PageIndicator/demo/base.js +2 -2
- package/dist/Picker/style.scss +44 -44
- package/dist/PickerView/style.scss +72 -72
- package/dist/Popup/demo/base.js +2 -2
- package/dist/Popup/style.scss +129 -129
- package/dist/Radio/demo/base.scss +4 -4
- package/dist/Result/demo/base.js +2 -2
- package/dist/SafeArea/demo/base.scss +18 -18
- package/dist/ScrollView/style.scss +19 -19
- package/dist/SideBar/side-bar.js +6 -6
- package/dist/SideBar/style.scss +85 -85
- package/dist/Skeleton/demo/base.d.ts +3 -0
- package/dist/Skeleton/demo/base.js +8 -0
- package/dist/Skeleton/index.d.ts +3 -0
- package/dist/Skeleton/index.js +2 -0
- package/dist/Space/demo/base.js +2 -2
- package/dist/Stepper/demo/base.d.ts +3 -0
- package/dist/Stepper/demo/base.js +23 -0
- package/dist/Stepper/index.d.ts +3 -0
- package/dist/Stepper/index.js +2 -0
- package/dist/Swiper/style.scss +54 -54
- package/dist/Switch/demo/base.js +2 -2
- package/dist/TabBar/demo/base.js +2 -2
- package/dist/Tag/demo/base.js +2 -2
- package/dist/Tag/demo/style.scss +8 -8
- package/dist/Toast/style.scss +63 -63
- package/dist/VerificationCodeInput/style.scss +20 -20
- package/dist/WaterMark/demo/demo1.js +2 -2
- package/dist/WaterMark/demo/demo1.scss +6 -6
- package/dist/WaterMark/demo/demo2.js +2 -2
- package/dist/index.d.ts +22 -18
- package/dist/index.js +3 -1
- package/dist/style/variable.scss +1 -1
- package/dist/utils/type.js +36 -36
- package/dist/utils/with-default-props.js +4 -4
- package/package.json +9 -13
- package/readme.md +43 -43
- package/dist/SpinLoading/index.d.ts +0 -3
- package/dist/SpinLoading/index.js +0 -2
- /package/dist/{SpinLoading/demo/base.d.ts → Form/demo/vertical.d.ts} +0 -0
package/dist/Input/index.scss
CHANGED
|
@@ -1,223 +1,240 @@
|
|
|
1
|
-
@use "../style/variable" as variable;
|
|
2
|
-
|
|
3
|
-
$inputCls: 'triones-antm-input';
|
|
4
|
-
$inputAffixWrapperCls: 'triones-antm-input-affix-wrapper';
|
|
5
|
-
$inputGroupWrapperCls: 'triones-antm-input-group-wrapper';
|
|
6
|
-
$inputPotCls: 'triones-antm-pot';
|
|
7
|
-
|
|
8
|
-
$inputSm: 24Px;
|
|
9
|
-
$inputMd: 32Px;
|
|
10
|
-
$inputLg: 40Px;
|
|
11
|
-
|
|
12
|
-
$placeholderColor: #
|
|
13
|
-
|
|
14
|
-
.#{$inputCls} {
|
|
15
|
-
box-sizing: border-box;
|
|
16
|
-
display: inline-block;
|
|
17
|
-
position: relative;
|
|
18
|
-
width: 100%;
|
|
19
|
-
min-width: 0;
|
|
20
|
-
transition: all .2s;
|
|
21
|
-
outline: none;
|
|
22
|
-
box-shadow: none;
|
|
23
|
-
border: none;
|
|
24
|
-
border-radius: variable.$trionesBorderRadius;
|
|
25
|
-
font-size: variable.$trionesInputInputFontSize;
|
|
26
|
-
padding: variable.$trionesInputPaddingBlock 0;
|
|
27
|
-
|
|
28
|
-
&-sm {
|
|
29
|
-
max-height: $inputSm;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
&-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
&-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
color:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
|
|
3
|
+
$inputCls: 'triones-antm-input';
|
|
4
|
+
$inputAffixWrapperCls: 'triones-antm-input-affix-wrapper';
|
|
5
|
+
$inputGroupWrapperCls: 'triones-antm-input-group-wrapper';
|
|
6
|
+
$inputPotCls: 'triones-antm-pot';
|
|
7
|
+
|
|
8
|
+
$inputSm: 24Px;
|
|
9
|
+
$inputMd: 32Px;
|
|
10
|
+
$inputLg: 40Px;
|
|
11
|
+
|
|
12
|
+
$placeholderColor: #CCCCCC;
|
|
13
|
+
|
|
14
|
+
.#{$inputCls} {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
display: inline-block;
|
|
17
|
+
position: relative;
|
|
18
|
+
width: 100%;
|
|
19
|
+
min-width: 0;
|
|
20
|
+
transition: all .2s;
|
|
21
|
+
outline: none;
|
|
22
|
+
box-shadow: none;
|
|
23
|
+
border: none;
|
|
24
|
+
border-radius: variable.$trionesBorderRadius;
|
|
25
|
+
font-size: variable.$trionesInputInputFontSize;
|
|
26
|
+
//padding: variable.$trionesInputPaddingBlock 0;
|
|
27
|
+
|
|
28
|
+
&-sm {
|
|
29
|
+
max-height: $inputSm;
|
|
30
|
+
//font-size: variable.$trionesInputPaddingInlineSm 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&-lg {
|
|
34
|
+
max-height: $inputLg;
|
|
35
|
+
//font-size: variable.$trionesInputPaddingInlineLg 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&::placeholder {
|
|
39
|
+
font-size: variable.$trionesInputInputFontSize;
|
|
40
|
+
color: $placeholderColor
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
.#{$inputAffixWrapperCls} {
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
position: relative;
|
|
50
|
+
display: inline-flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
width: 100%;
|
|
53
|
+
min-width: 0;
|
|
54
|
+
//line-height: variable.$trionesLineHeight;
|
|
55
|
+
//padding: variable.$trionesInputPaddingBlock 0;
|
|
56
|
+
gap: 4Px;
|
|
57
|
+
|
|
58
|
+
&-small {
|
|
59
|
+
padding: variable.$trionesInputPaddingBlockSm 0;
|
|
60
|
+
font-size: variable.$trionesInputInputFontSizeSm;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&-large {
|
|
64
|
+
padding: variable.$trionesInputPaddingBlockLg 0;
|
|
65
|
+
font-size: variable.$trionesInputInputFontSizeLg;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.#{$inputCls} {
|
|
69
|
+
padding: 0;
|
|
70
|
+
background-color: transparent;
|
|
71
|
+
|
|
72
|
+
&-prifix {
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&-suffix {
|
|
76
|
+
display: inline-flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
flex-shrink: 0;
|
|
79
|
+
gap: 4Px;
|
|
80
|
+
|
|
81
|
+
.clear-icon {
|
|
82
|
+
color: rgba(0, 0, 0, 0.25);
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
&:hover {
|
|
86
|
+
color: rgba(0, 0, 0, 0.45);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.triones-antm-icon {
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
input {
|
|
97
|
+
// height: 1.47059em;
|
|
98
|
+
line-height: 1.47059;
|
|
99
|
+
|
|
100
|
+
&::placeholder {
|
|
101
|
+
font-size: variable.$trionesInputInputFontSize;
|
|
102
|
+
color: $placeholderColor
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.#{$inputCls} {
|
|
108
|
+
&-outlined {
|
|
109
|
+
padding-block: variable.$trionesInputPaddingBlock;
|
|
110
|
+
border-radius: variable.$trionesBorderRadius;
|
|
111
|
+
border: 1Px solid variable.$trionesBorderColor;
|
|
112
|
+
padding-inline: 4Px;
|
|
113
|
+
box-sizing: border-box;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&-filled {
|
|
117
|
+
border-radius: variable.$trionesBorderRadius;
|
|
118
|
+
background-color: variable.$trionesColorFillTertiary;
|
|
119
|
+
padding-inline: variable.$trionesInputPaddingBlock;
|
|
120
|
+
padding-block: variable.$trionesInputPaddingBlock;
|
|
121
|
+
box-sizing: border-box;
|
|
122
|
+
border: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&-borderless {
|
|
126
|
+
border: 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&-underlined {
|
|
130
|
+
border-top: 0;
|
|
131
|
+
border-left: 0;
|
|
132
|
+
border-right: 0;
|
|
133
|
+
border-bottom: 1Px solid variable.$trionesBorderColor;
|
|
134
|
+
padding-block: variable.$trionesInputPaddingBlock;
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
.#{$inputPotCls} {
|
|
142
|
+
position: relative;
|
|
143
|
+
display: inline-flex;
|
|
144
|
+
vertical-align: middle;
|
|
145
|
+
|
|
146
|
+
&-wrapper {
|
|
147
|
+
position: relative;
|
|
148
|
+
display: inline-flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
flex-wrap: nowrap;
|
|
151
|
+
column-gap: 8Px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&-input {
|
|
155
|
+
position: absolute;
|
|
156
|
+
background-color: transparent;
|
|
157
|
+
z-index: -1;
|
|
158
|
+
left: 0;
|
|
159
|
+
top: 0;
|
|
160
|
+
right: 0;
|
|
161
|
+
bottom: 0;
|
|
162
|
+
opacity: 0;
|
|
163
|
+
-moz-appearance: textfield;
|
|
164
|
+
|
|
165
|
+
&::-webkit-outer-spin-button,
|
|
166
|
+
&::-webkit-inner-spin-button {
|
|
167
|
+
-webkit-appearance: none;
|
|
168
|
+
margin: 0;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&-item {
|
|
173
|
+
text-align: center;
|
|
174
|
+
font-size: variable.$trionesInputInputFontSize;
|
|
175
|
+
height: variable.$trionesControlHeight;
|
|
176
|
+
width: variable.$trionesControlHeight;
|
|
177
|
+
display: inline-flex;
|
|
178
|
+
align-items: center;
|
|
179
|
+
justify-content: center;
|
|
180
|
+
|
|
181
|
+
&-sm {
|
|
182
|
+
width: variable.$trionesControlHeightSm;
|
|
183
|
+
height: variable.$trionesControlHeightSm;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&-lg {
|
|
187
|
+
width: variable.$trionesControlHeightLg;
|
|
188
|
+
height: variable.$trionesControlHeightLg;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&::placeholder {
|
|
192
|
+
font-size: variable.$trionesInputInputFontSize;
|
|
193
|
+
color: $placeholderColor
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&-focus {
|
|
197
|
+
&::after {
|
|
198
|
+
content: ' ';
|
|
199
|
+
height: 100%;
|
|
200
|
+
width: 0.5Px;
|
|
201
|
+
background-color: #0a0a0a;
|
|
202
|
+
transition: transform 0.1s ease;
|
|
203
|
+
animation: blink 1s step-end infinite;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.#{$inputCls}-outlined {
|
|
210
|
+
font-size: variable.$trionesInputInputFontSize;
|
|
211
|
+
color: rgba(0, 0, 0, 0.88);
|
|
212
|
+
background: #ffffff;
|
|
213
|
+
border-width: 1Px;
|
|
214
|
+
border-style: solid;
|
|
215
|
+
border-color: #d9d9d9;
|
|
216
|
+
-webkit-appearance: none;
|
|
217
|
+
-moz-appearance: none;
|
|
218
|
+
appearance: none;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
.#{$inputCls}-textarea {
|
|
224
|
+
box-sizing: border-box;
|
|
225
|
+
width: 100%;
|
|
226
|
+
outline: 0;
|
|
227
|
+
//padding-block: variable.$trionesInputPaddingBlock;
|
|
228
|
+
font-size: variable.$trionesInputInputFontSize;
|
|
229
|
+
|
|
230
|
+
&::placeholder {
|
|
231
|
+
font-size: variable.$trionesInputInputFontSize;
|
|
232
|
+
color: $placeholderColor
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@keyframes blink {
|
|
237
|
+
50% {
|
|
238
|
+
background-color: transparent;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { BaseInputProps } from './base-input';
|
|
3
|
-
import { variantType } from
|
|
3
|
+
import { variantType } from './types';
|
|
4
|
+
import { AntSize } from "@trionesdev/antd-mobile-base-react";
|
|
4
5
|
export type InputAffixWrapperProps = BaseInputProps & {
|
|
6
|
+
size?: AntSize;
|
|
5
7
|
prefix?: React.ReactNode;
|
|
6
8
|
suffix?: React.ReactNode;
|
|
7
9
|
variant?: variantType;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
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
|
-
var _excluded = ["children", "prefix", "suffix", "variant", "allowClear", "value", "
|
|
2
|
+
var _excluded = ["children", "size", "prefix", "suffix", "variant", "allowClear", "value", "onClear"];
|
|
3
3
|
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; }
|
|
4
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
5
|
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); }
|
|
6
6
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
7
7
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
|
-
import { CloseCircleFill } from "../../../antd-mobile-icons-react";
|
|
9
8
|
import classNames from 'classnames';
|
|
10
9
|
import React from 'react';
|
|
11
10
|
import { inputAffixWrapperCls, inputCls } from "./types";
|
|
11
|
+
import { CloseCircleFill } from "@trionesdev/antd-mobile-icons-react";
|
|
12
12
|
export var InputAffixWrapper = function InputAffixWrapper(_ref) {
|
|
13
13
|
var children = _ref.children,
|
|
14
|
+
size = _ref.size,
|
|
14
15
|
prefix = _ref.prefix,
|
|
15
16
|
suffix = _ref.suffix,
|
|
16
17
|
_ref$variant = _ref.variant,
|
|
17
18
|
variant = _ref$variant === void 0 ? 'borderless' : _ref$variant,
|
|
18
19
|
allowClear = _ref.allowClear,
|
|
19
20
|
value = _ref.value,
|
|
20
|
-
onChange = _ref.onChange,
|
|
21
21
|
onClear = _ref.onClear,
|
|
22
22
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
23
23
|
var innerStyle = rest.style || {};
|
|
24
24
|
return /*#__PURE__*/React.createElement("div", {
|
|
25
|
-
className: classNames([inputAffixWrapperCls, _defineProperty({}, "".concat(inputCls, "-").concat(variant), variant), rest.className]),
|
|
25
|
+
className: classNames([inputAffixWrapperCls, "".concat(inputAffixWrapperCls, "-").concat(size), _defineProperty({}, "".concat(inputCls, "-").concat(variant), variant), rest.className]),
|
|
26
26
|
style: innerStyle
|
|
27
27
|
}, prefix && /*#__PURE__*/React.createElement("div", {
|
|
28
28
|
className: classNames(["".concat(inputCls, "-prefix")])
|
package/dist/Input/input.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { AntSize } from '@trionesdev/antd-mobile-base-react';
|
|
1
2
|
import React, { FC } from 'react';
|
|
2
3
|
import './index.scss';
|
|
3
|
-
import { variantType } from
|
|
4
|
+
import { variantType } from './types';
|
|
4
5
|
export type InputProps = {
|
|
5
6
|
className?: string;
|
|
6
7
|
style?: React.CSSProperties;
|
|
8
|
+
size?: AntSize;
|
|
7
9
|
placeholder?: string;
|
|
8
10
|
type?: 'text' | 'password' | 'textarea';
|
|
9
11
|
variant?: variantType;
|
package/dist/Input/input.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "style", "placeholder", "type", "disabled", "allowClear", "prefix", "suffix", "defaultValue", "value", "onChange"];
|
|
1
|
+
var _excluded = ["className", "style", "size", "placeholder", "type", "disabled", "allowClear", "prefix", "suffix", "defaultValue", "value", "onChange"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
4
|
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."); }
|
|
@@ -15,6 +15,8 @@ import { InputAffixWrapper } from "./input-affix-wrapper";
|
|
|
15
15
|
export var Input = function Input(_ref) {
|
|
16
16
|
var className = _ref.className,
|
|
17
17
|
style = _ref.style,
|
|
18
|
+
_ref$size = _ref.size,
|
|
19
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
18
20
|
placeholder = _ref.placeholder,
|
|
19
21
|
type = _ref.type,
|
|
20
22
|
disabled = _ref.disabled,
|
|
@@ -25,7 +27,7 @@ export var Input = function Input(_ref) {
|
|
|
25
27
|
value = _ref.value,
|
|
26
28
|
_onChange = _ref.onChange,
|
|
27
29
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
-
var _React$useState = React.useState(value),
|
|
30
|
+
var _React$useState = React.useState(value || defaultValue),
|
|
29
31
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
30
32
|
innerValue = _React$useState2[0],
|
|
31
33
|
setInnerValue = _React$useState2[1];
|
|
@@ -40,6 +42,7 @@ export var Input = function Input(_ref) {
|
|
|
40
42
|
return /*#__PURE__*/React.createElement(InputAffixWrapper, _extends({}, rest, {
|
|
41
43
|
className: className,
|
|
42
44
|
style: style,
|
|
45
|
+
size: size,
|
|
43
46
|
placeholder: placeholder,
|
|
44
47
|
prefix: prefix,
|
|
45
48
|
suffix: suffix,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DotLoading } from '@trionesdev/antd-mobile-base-react';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DotLoading } from '@trionesdev/antd-mobile-base-react';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SpinLoading } from '@trionesdev/antd-mobile-base-react';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SpinLoading } from '@trionesdev/antd-mobile-base-react';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DemoBlock } from "../../DemoBlock";
|
|
3
|
-
import SpinLoading from "../index";
|
|
4
3
|
import Space from "../../Space";
|
|
4
|
+
import { SpinLoading } from "../../index";
|
|
5
5
|
export default (function () {
|
|
6
6
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
7
7
|
title: "\u57FA\u7840\u4F7F\u7528"
|
|
@@ -9,8 +9,14 @@ export default (function () {
|
|
|
9
9
|
title: "\u989C\u8272"
|
|
10
10
|
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(SpinLoading, null), /*#__PURE__*/React.createElement(SpinLoading, {
|
|
11
11
|
color: "primary"
|
|
12
|
-
}), /*#__PURE__*/React.createElement(
|
|
12
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
style: {
|
|
14
|
+
backgroundColor: "#333"
|
|
15
|
+
}
|
|
16
|
+
}, /*#__PURE__*/React.createElement(SpinLoading, {
|
|
13
17
|
color: "white"
|
|
18
|
+
})), /*#__PURE__*/React.createElement(SpinLoading, {
|
|
19
|
+
color: "red"
|
|
14
20
|
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
15
21
|
title: "\u5927\u5C0F"
|
|
16
22
|
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(SpinLoading, {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DemoBlock } from "../../DemoBlock";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { DotLoading } from "../../index";
|
|
4
|
+
export default (function () {
|
|
5
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
6
|
+
title: "\u57FA\u7840\u4F7F\u7528"
|
|
7
|
+
}, /*#__PURE__*/React.createElement(DotLoading, null)), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
8
|
+
title: "\u57FA\u7840\u4F7F\u7528"
|
|
9
|
+
}, /*#__PURE__*/React.createElement(DotLoading, {
|
|
10
|
+
color: "primary"
|
|
11
|
+
})), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
12
|
+
title: "\u57FA\u7840\u4F7F\u7528"
|
|
13
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
style: {
|
|
15
|
+
backgroundColor: '#0000004a',
|
|
16
|
+
padding: '10px'
|
|
17
|
+
}
|
|
18
|
+
}, /*#__PURE__*/React.createElement(DotLoading, {
|
|
19
|
+
color: "white"
|
|
20
|
+
}))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
21
|
+
title: "\u57FA\u7840\u4F7F\u7528"
|
|
22
|
+
}, /*#__PURE__*/React.createElement(DotLoading, {
|
|
23
|
+
color: "red"
|
|
24
|
+
})));
|
|
25
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { DotLoadingProps, SpinLoadingProps } from '@trionesdev/antd-mobile-base-react';
|
|
3
|
+
export declare const SpinLoading: import("react").FC<SpinLoadingProps>;
|
|
4
|
+
export declare const DotLoading: import("react").FC<DotLoadingProps>;
|
|
5
|
+
export type { SpinLoadingProps, DotLoadingProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.my-nav-bar {
|
|
2
|
-
&-subtitle {
|
|
3
|
-
font-size: 12px;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
1
|
+
.my-nav-bar {
|
|
2
|
+
&-subtitle {
|
|
3
|
+
font-size: 12px;
|
|
4
|
+
}
|
|
5
|
+
}
|