@tarojs/components-react 4.0.8-beta.1 → 4.0.8-beta.3
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/README.md +31 -0
- package/dist/components/button/index.js +36 -10
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/image/index.js +1 -1
- package/dist/components/image/index.js.map +1 -1
- package/dist/components/image/style/{index.css.js → index.scss.js} +1 -1
- package/dist/components/image/style/index.scss.js.map +1 -0
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/picker/index.js +788 -0
- package/dist/components/picker/index.js.map +1 -0
- package/dist/components/picker/picker-group.js +491 -0
- package/dist/components/picker/picker-group.js.map +1 -0
- package/dist/components/{scroll-view/style/index.css.js → picker/style/index.scss.js} +1 -1
- package/dist/components/picker/style/index.scss.js.map +1 -0
- package/dist/components/pull-down-refresh/index.js +1 -1
- package/dist/components/pull-down-refresh/index.js.map +1 -1
- package/dist/components/pull-down-refresh/style/{index.css.js → index.scss.js} +1 -1
- package/dist/components/pull-down-refresh/style/index.scss.js.map +1 -0
- package/dist/components/refresher/index.js +7 -0
- package/dist/components/refresher/index.js.map +1 -0
- package/dist/components/scroll-view/index.js +8 -3
- package/dist/components/scroll-view/index.js.map +1 -1
- package/dist/components/{swiper/style/index.css.js → scroll-view/style/index.scss.js} +1 -1
- package/dist/components/scroll-view/style/index.scss.js.map +1 -0
- package/dist/components/swiper/index.js +5 -3
- package/dist/components/swiper/index.js.map +1 -1
- package/dist/components/swiper/style/index.scss.js +4 -0
- package/dist/components/swiper/style/index.scss.js.map +1 -0
- package/dist/components/text/index.js +1 -1
- package/dist/components/text/index.js.map +1 -1
- package/dist/components/text/style/index.scss.js +4 -0
- package/dist/components/text/style/index.scss.js.map +1 -0
- package/dist/components/view/index.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/original/components/button/index.js +113 -0
- package/dist/original/components/button/index.js.map +1 -0
- package/dist/original/components/button/style/index.scss +354 -0
- package/dist/original/components/icon/index.js +36 -0
- package/dist/original/components/icon/index.js.map +1 -0
- package/dist/original/components/icon/style/index.scss +304 -0
- package/dist/original/components/image/index.js +86 -0
- package/dist/original/components/image/index.js.map +1 -0
- package/dist/original/components/image/style/index.scss +90 -0
- package/dist/original/components/input/index.js +233 -0
- package/dist/original/components/input/index.js.map +1 -0
- package/dist/original/components/input/style/index.scss +71 -0
- package/dist/original/components/picker/index.js +788 -0
- package/dist/original/components/picker/index.js.map +1 -0
- package/dist/original/components/picker/picker-group.js +491 -0
- package/dist/original/components/picker/picker-group.js.map +1 -0
- package/dist/original/components/picker/style/index.scss +297 -0
- package/dist/original/components/pull-down-refresh/index.js +320 -0
- package/dist/original/components/pull-down-refresh/index.js.map +1 -0
- package/dist/original/components/pull-down-refresh/style/index.scss +53 -0
- package/dist/original/components/refresher/index.js +7 -0
- package/dist/original/components/refresher/index.js.map +1 -0
- package/dist/original/components/scroll-view/index.js +189 -0
- package/dist/original/components/scroll-view/index.js.map +1 -0
- package/dist/original/components/scroll-view/style/index.scss +22 -0
- package/dist/original/components/swiper/index.js +461 -0
- package/dist/original/components/swiper/index.js.map +1 -0
- package/dist/original/components/swiper/style/index.scss +9 -0
- package/dist/original/components/text/index.js +28 -0
- package/dist/original/components/text/index.js.map +1 -0
- package/dist/original/components/text/style/index.scss +13 -0
- package/dist/original/components/view/index.js +80 -0
- package/dist/original/components/view/index.js.map +1 -0
- package/dist/original/index.js +15 -0
- package/dist/original/index.js.map +1 -0
- package/dist/original/utils/hooks.react.js +15 -0
- package/dist/original/utils/hooks.react.js.map +1 -0
- package/dist/original/utils/index.js +162 -0
- package/dist/original/utils/index.js.map +1 -0
- package/dist/solid/components/button/index.js +50 -29
- package/dist/solid/components/button/index.js.map +1 -1
- package/dist/solid/components/icon/index.js.map +1 -1
- package/dist/solid/components/image/index.js +1 -1
- package/dist/solid/components/image/index.js.map +1 -1
- package/dist/solid/components/image/style/index.scss.js +4 -0
- package/dist/solid/components/image/style/index.scss.js.map +1 -0
- package/dist/solid/components/picker/index.js +830 -0
- package/dist/solid/components/picker/index.js.map +1 -0
- package/dist/solid/components/picker/picker-group.js +512 -0
- package/dist/solid/components/picker/picker-group.js.map +1 -0
- package/dist/solid/components/picker/style/index.scss.js +4 -0
- package/dist/solid/components/picker/style/index.scss.js.map +1 -0
- package/dist/solid/components/refresher/index.js +7 -0
- package/dist/solid/components/refresher/index.js.map +1 -0
- package/dist/solid/components/scroll-view/index.js +8 -3
- package/dist/solid/components/scroll-view/index.js.map +1 -1
- package/dist/solid/components/scroll-view/style/index.scss.js +4 -0
- package/dist/solid/components/scroll-view/style/index.scss.js.map +1 -0
- package/dist/solid/components/text/index.js +1 -1
- package/dist/solid/components/text/index.js.map +1 -1
- package/dist/solid/components/text/style/index.scss.js +4 -0
- package/dist/solid/components/text/style/index.scss.js.map +1 -0
- package/dist/solid/components/view/index.js.map +1 -1
- package/dist/solid/index.css +1 -1
- package/dist/solid/index.js +3 -1
- package/dist/solid/index.js.map +1 -1
- package/dist/solid/utils/hooks.solid.js.map +1 -1
- package/dist/solid/utils/index.js +103 -1
- package/dist/solid/utils/index.js.map +1 -1
- package/dist/utils/hooks.react.js.map +1 -1
- package/dist/utils/index.js +103 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +23 -9
- package/types/global.d.ts +1 -1
- package/types/index.d.ts +3 -1
- package/dist/components/image/style/index.css.js.map +0 -1
- package/dist/components/pull-down-refresh/style/index.css.js.map +0 -1
- package/dist/components/scroll-view/style/index.css.js.map +0 -1
- package/dist/components/swiper/style/index.css.js.map +0 -1
- package/dist/components/text/style/index.css.js +0 -4
- package/dist/components/text/style/index.css.js.map +0 -1
- package/dist/solid/components/image/style/index.css.js +0 -4
- package/dist/solid/components/image/style/index.css.js.map +0 -1
- package/dist/solid/components/scroll-view/style/index.css.js +0 -4
- package/dist/solid/components/scroll-view/style/index.css.js.map +0 -1
- package/dist/solid/components/text/style/index.css.js +0 -4
- package/dist/solid/components/text/style/index.css.js.map +0 -1
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
/* Imported from variable */
|
|
2
|
+
// @use "sass:math";
|
|
3
|
+
|
|
4
|
+
// body,
|
|
5
|
+
// .wx-root,
|
|
6
|
+
// page {
|
|
7
|
+
// --weui-BTN-HEIGHT: 48;
|
|
8
|
+
// --weui-BTN-HEIGHT-MEDIUM: 40;
|
|
9
|
+
// --weui-BTN-HEIGHT-SMALL: 32;
|
|
10
|
+
// }
|
|
11
|
+
// @include setColor(--weui-BTN-ACTIVE-MASK, rgba(0,0,0,0.1), rgba(255,255,255,0.1));
|
|
12
|
+
|
|
13
|
+
// @include setColor(--weui-BTN-DEFAULT-ACTIVE-BG, overlay(rgba(0, 0, 0, 0.05), #f2f2f2), overlay(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.08)));
|
|
14
|
+
|
|
15
|
+
// $weuiBtnWidth: 184px;
|
|
16
|
+
$weuiBtnHeight: 46px; // 48px;
|
|
17
|
+
$weuiBtnFontSize: 18px; // 17px;
|
|
18
|
+
$weuiBtnBorderRadius: 5px; // 8px;
|
|
19
|
+
$weuiBtnDefaultGap: 15px; // 16px;
|
|
20
|
+
|
|
21
|
+
$weuiBtnMiniFontSize: 13px; // 14px;
|
|
22
|
+
$weuiBtnMiniHeight: 2.3; // 32px;
|
|
23
|
+
|
|
24
|
+
// $weuiBtnCellHeight: 56px;
|
|
25
|
+
// $weuiBtnCellGap: 16px;
|
|
26
|
+
// $weuiBtnCellLineHeight: em(math.div($weuiBtnCellHeight - 2 * $weuiBtnCellGap, $weuiBtnFontSize));
|
|
27
|
+
|
|
28
|
+
$weuiBtnFontColor: #fff;
|
|
29
|
+
$weuiBtnDisabledFontColor: rgba(255, 255, 255, 0.6); // var(--weui-FG-4);
|
|
30
|
+
// $weuiBtnDisabledBg: var(--weui-FG-5);
|
|
31
|
+
$weuiBtnActiveFontColor: rgba(255, 255, 255, 0.6);
|
|
32
|
+
|
|
33
|
+
// default
|
|
34
|
+
$weuiBtnDefaultFontColor: #000000; // var(--weui-FG-0);
|
|
35
|
+
$weuiBtnDefaultDisabledFontColor: rgba(0, 0, 0, 0.3); // $weuiBtnDisabledFontColor;
|
|
36
|
+
$weuiBtnDefaultActiveFontColor: rgba(0, 0, 0, 0.6);
|
|
37
|
+
$weuiBtnDefaultActiveBg: #DEDEDE; // var(--weui-BTN-DEFAULT-ACTIVE-BG);
|
|
38
|
+
$weuiBtnDefaultDisabledBg: #F7F7F7; // $weuiBtnDisabledBg;
|
|
39
|
+
$weuiBtnDefaultBg: #F8F8F8;
|
|
40
|
+
|
|
41
|
+
// primary
|
|
42
|
+
// $weuiBtnPrimaryFontColor: $weuiBtnFontColor;
|
|
43
|
+
// $weuiBtnPrimaryDisabledFontColor: $weuiBtnDisabledFontColor;
|
|
44
|
+
$weuiBtnPrimaryBg: #1AAD19; // var(--weui-BRAND);
|
|
45
|
+
$weuiBtnPrimaryActiveBg: #179B16; // var(--weui-TAG-TEXT-GREEN);
|
|
46
|
+
$weuiBtnPrimaryDisabledBg: #9ED99D; // $weuiBtnDisabledBg;
|
|
47
|
+
|
|
48
|
+
// warn
|
|
49
|
+
// $weuiBtnWarnFontColor: $weuiColorWarn;
|
|
50
|
+
// $weuiBtnWarnDisabledFontColor: $weuiBtnDisabledFontColor;
|
|
51
|
+
$weuiBtnWarnBg: #E64340; // $weuiBtnDefaultBg;
|
|
52
|
+
$weuiBtnWarnActiveBg: #CE3C39;
|
|
53
|
+
$weuiBtnwarnDisabledBg: #EC8B89; // $weuiBtnDefaultDisabledBg;
|
|
54
|
+
|
|
55
|
+
$weuiBtnPlainPrimaryColor: rgba(26, 173, 25, 1);
|
|
56
|
+
$weuiBtnPlainPrimaryBorderColor: rgba(26, 173, 25, 1);
|
|
57
|
+
$weuiBtnPlainPrimaryActiveColor: rgba(26, 173, 25, .6);
|
|
58
|
+
$weuiBtnPlainPrimaryActiveBorderColor: rgba(26, 173, 25, .6);
|
|
59
|
+
|
|
60
|
+
$weuiBtnPlainDefaultColor: rgba(53, 53, 53, 1);
|
|
61
|
+
$weuiBtnPlainDefaultBorderColor: rgba(53, 53, 53, 1);
|
|
62
|
+
$weuiBtnPlainDefaultActiveColor: rgba(53, 53, 53, .6);
|
|
63
|
+
$weuiBtnPlainDefaultActiveBorderColor: rgba(53, 53, 53, .6);
|
|
64
|
+
|
|
65
|
+
/* Imported from weui-btn_loading.scss */
|
|
66
|
+
@-webkit-keyframes weuiLoading {
|
|
67
|
+
0% {
|
|
68
|
+
transform: rotate3d(0, 0, 1, 0deg);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
100% {
|
|
72
|
+
transform: rotate3d(0, 0, 1, 360deg);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@keyframes weuiLoading {
|
|
77
|
+
0% {
|
|
78
|
+
transform: rotate3d(0, 0, 1, 0deg);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
100% {
|
|
82
|
+
transform: rotate3d(0, 0, 1, 360deg);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.taro-button-core.taro-btn-loading {
|
|
87
|
+
.weui-loading {
|
|
88
|
+
display: inline-block;
|
|
89
|
+
width: 22px;
|
|
90
|
+
height: 22px;
|
|
91
|
+
animation: weuiLoading 1s steps(12, end) infinite;
|
|
92
|
+
background: transparent url("https://img13.360buyimg.com/imagetools/jfs/t1/353674/27/5761/14397/690ac1cfFf6bf0e2c/77727d0791bacf8e.png") no-repeat;
|
|
93
|
+
background-size: cover;
|
|
94
|
+
|
|
95
|
+
&.weui-btn_primary,
|
|
96
|
+
&.weui-btn_warn {
|
|
97
|
+
color: $weuiBtnActiveFontColor;
|
|
98
|
+
}
|
|
99
|
+
&.weui-btn_primary {
|
|
100
|
+
// color: var(--weui-WHITE);
|
|
101
|
+
background-color: $weuiBtnPrimaryActiveBg;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&.weui-btn_warn {
|
|
105
|
+
background-color: $weuiBtnWarnActiveBg;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.taro-button-core.taro-btn-loading.taro-btn-mini {
|
|
112
|
+
.weui-loading {
|
|
113
|
+
display: inline-block;
|
|
114
|
+
width: 16px;
|
|
115
|
+
height: 16px;
|
|
116
|
+
vertical-align: middle;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
$weuiBtnHeight: 46px;
|
|
121
|
+
$weuiBtnFontSize: 18px;
|
|
122
|
+
$weuiBtnFontColor: #fff;
|
|
123
|
+
$weuiBtnActiveFontColor: rgb(255 255 255 / 60%);
|
|
124
|
+
$weuiBtnDisabledFontColor: rgb(255 255 255 / 60%);
|
|
125
|
+
$weuiBtnBorderRadius: 5px;
|
|
126
|
+
$weuiBtnDefaultGap: 15px;
|
|
127
|
+
|
|
128
|
+
// Button Mini
|
|
129
|
+
$weuiBtnMiniFontSize: 13px;
|
|
130
|
+
$weuiBtnMiniHeight: 2;
|
|
131
|
+
|
|
132
|
+
// Button Default
|
|
133
|
+
$weuiBtnDefaultFontColor: #000;
|
|
134
|
+
$weuiBtnDefaultActiveFontColor: rgb(0 0 0 / 60%);
|
|
135
|
+
$weuiBtnDefaultDisabledFontColor: rgb(0 0 0 / 30%);
|
|
136
|
+
$weuiBtnDefaultBg: #f8f8f8;
|
|
137
|
+
$weuiBtnDefaultActiveBg: #dedede;
|
|
138
|
+
$weuiBtnDefaultDisabledBg: #f7f7f7;
|
|
139
|
+
|
|
140
|
+
// Button Primary
|
|
141
|
+
$weuiBtnPrimaryBg: #1aad19;
|
|
142
|
+
$weuiBtnPrimaryActiveBg: #179b16;
|
|
143
|
+
$weuiBtnPrimaryDisabledBg: #9ed99d;
|
|
144
|
+
|
|
145
|
+
// Button Warn
|
|
146
|
+
$weuiBtnWarnBg: #e64340;
|
|
147
|
+
$weuiBtnWarnActiveBg: #ce3c39;
|
|
148
|
+
$weuiBtnWarnDisabledBg: #ec8b89;
|
|
149
|
+
|
|
150
|
+
// Button Plain Primary
|
|
151
|
+
$weuiBtnPlainPrimaryColor: rgb(26 173 25 / 100%);
|
|
152
|
+
$weuiBtnPlainPrimaryBorderColor: rgb(26 173 25 / 100%);
|
|
153
|
+
$weuiBtnPlainPrimaryActiveColor: rgb(26 173 25 / 60%);
|
|
154
|
+
$weuiBtnPlainPrimaryActiveBorderColor: rgb(26 173 25 / 60%);
|
|
155
|
+
|
|
156
|
+
// Button Plain Default
|
|
157
|
+
$weuiBtnPlainDefaultColor: rgb(53 53 53 / 100%);
|
|
158
|
+
$weuiBtnPlainDefaultBorderColor: rgb(53 53 53 / 100%);
|
|
159
|
+
$weuiBtnPlainDefaultActiveColor: rgb(53 53 53 / 60%);
|
|
160
|
+
$weuiBtnPlainDefaultActiveBorderColor: rgb(53 53 53 / 60%);
|
|
161
|
+
|
|
162
|
+
// Button Plain Warn
|
|
163
|
+
$weuiBtnPlainWarnColor: #e64340;
|
|
164
|
+
$weuiBtnPlainWarnBorderColor: #e64340;
|
|
165
|
+
$weuiBtnPlainWarnActiveColor: rgba(230 67 64 / 60%);
|
|
166
|
+
$weuiBtnPlainWarnActiveBorderColor: rgba(230 67 64 / 60%);
|
|
167
|
+
|
|
168
|
+
.taro-button-core {
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
justify-content: center;
|
|
172
|
+
overflow: hidden;
|
|
173
|
+
position: relative;
|
|
174
|
+
box-sizing: border-box;
|
|
175
|
+
padding: 0 14px;
|
|
176
|
+
border: 1px solid rgb(0 0 0 / 20%);
|
|
177
|
+
border-radius: $weuiBtnBorderRadius * 2;
|
|
178
|
+
width: 100%;
|
|
179
|
+
appearance: none;
|
|
180
|
+
outline: 0;
|
|
181
|
+
background-color: $weuiBtnDefaultBg;
|
|
182
|
+
text-decoration: none;
|
|
183
|
+
font-size: $weuiBtnFontSize;
|
|
184
|
+
color: $weuiBtnDefaultFontColor;
|
|
185
|
+
-webkit-tap-highlight-color: rgb(0 0 0 / 0%);
|
|
186
|
+
|
|
187
|
+
&:focus {
|
|
188
|
+
outline: 0;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&:not(.taro-btn-disabled):active {
|
|
192
|
+
background-color: $weuiBtnDefaultActiveBg;
|
|
193
|
+
color: $weuiBtnDefaultActiveFontColor;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&+& {
|
|
197
|
+
margin-top: $weuiBtnDefaultGap;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
&.taro-btn-default {
|
|
201
|
+
background-color: $weuiBtnDefaultBg;
|
|
202
|
+
color: $weuiBtnDefaultFontColor;
|
|
203
|
+
|
|
204
|
+
&:not(.taro-btn-disabled):visited {
|
|
205
|
+
color: $weuiBtnDefaultFontColor;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
&:not(.taro-btn-disabled):active {
|
|
209
|
+
background-color: $weuiBtnDefaultActiveBg;
|
|
210
|
+
color: $weuiBtnDefaultActiveFontColor;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&.taro-btn-mini {
|
|
215
|
+
display: inline-block;
|
|
216
|
+
padding: 0 26px;
|
|
217
|
+
width: auto;
|
|
218
|
+
vertical-align: middle;
|
|
219
|
+
font-size: $weuiBtnMiniFontSize;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&.taro-btn-plain,
|
|
223
|
+
&.taro-btn-plain.taro-btn-default,
|
|
224
|
+
&.taro-btn-plain.taro-btn-primary,
|
|
225
|
+
&.taro-btn-plain.taro-btn-warn {
|
|
226
|
+
border-width: 1px;
|
|
227
|
+
background-color: transparent;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&.taro-btn-disabled {
|
|
231
|
+
color: $weuiBtnDisabledFontColor;
|
|
232
|
+
|
|
233
|
+
&.taro-btn-default {
|
|
234
|
+
background-color: $weuiBtnDefaultDisabledBg;
|
|
235
|
+
color: $weuiBtnDefaultDisabledFontColor;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&.taro-btn-primary {
|
|
239
|
+
background-color: $weuiBtnPrimaryDisabledBg;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
&.taro-btn-warn {
|
|
243
|
+
background-color: $weuiBtnWarnDisabledBg;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
&.taro-btn-loading {
|
|
248
|
+
|
|
249
|
+
&.taro-btn-primary,
|
|
250
|
+
&.taro-btn-warn {
|
|
251
|
+
color: $weuiBtnActiveFontColor;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&.taro-btn-primary {
|
|
255
|
+
background-color: $weuiBtnPrimaryActiveBg;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&.taro-btn-warn {
|
|
259
|
+
background-color: $weuiBtnWarnActiveBg;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
&.taro-btn-plain.taro-btn-primary {
|
|
264
|
+
border: 1px solid $weuiBtnPlainPrimaryBorderColor;
|
|
265
|
+
color: $weuiBtnPlainPrimaryColor;
|
|
266
|
+
|
|
267
|
+
&:not(.taro-btn-disabled):active {
|
|
268
|
+
border-color: $weuiBtnPlainPrimaryActiveBorderColor;
|
|
269
|
+
background-color: transparent;
|
|
270
|
+
color: $weuiBtnPlainPrimaryActiveColor;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
&::after {
|
|
274
|
+
border-width: 0;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
&.taro-btn-plain.taro-btn-warn {
|
|
279
|
+
border: 1px solid $weuiBtnPlainWarnBorderColor;
|
|
280
|
+
color: $weuiBtnPlainWarnColor;
|
|
281
|
+
|
|
282
|
+
&:not(.taro-btn-disabled):active {
|
|
283
|
+
border-color: $weuiBtnPlainWarnActiveBorderColor;
|
|
284
|
+
background-color: transparent;
|
|
285
|
+
color: $weuiBtnPlainWarnActiveColor;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
&::after {
|
|
289
|
+
border-width: 0;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
&.taro-btn-plain,
|
|
294
|
+
&.taro-btn-plain.taro-btn-default {
|
|
295
|
+
border: 1px solid $weuiBtnPlainDefaultBorderColor;
|
|
296
|
+
color: $weuiBtnPlainDefaultColor;
|
|
297
|
+
|
|
298
|
+
&:not(.taro-btn-disabled):active {
|
|
299
|
+
border-color: $weuiBtnPlainDefaultActiveBorderColor;
|
|
300
|
+
background-color: transparent;
|
|
301
|
+
color: $weuiBtnPlainDefaultActiveColor;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
&::after {
|
|
305
|
+
border-width: 0;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
&.taro-btn-primary {
|
|
310
|
+
background-color: $weuiBtnPrimaryBg;
|
|
311
|
+
color: #fff;
|
|
312
|
+
|
|
313
|
+
&:not(.taro-btn-disabled):visited {
|
|
314
|
+
color: $weuiBtnFontColor;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
&:not(.taro-btn-disabled):active {
|
|
318
|
+
background-color: $weuiBtnPrimaryActiveBg;
|
|
319
|
+
color: $weuiBtnActiveFontColor;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
&.taro-btn-warn {
|
|
324
|
+
background-color: $weuiBtnWarnBg;
|
|
325
|
+
color: #fff;
|
|
326
|
+
|
|
327
|
+
&:not(.taro-btn-disabled):visited {
|
|
328
|
+
color: $weuiBtnFontColor;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
&:not(.taro-btn-disabled):active {
|
|
332
|
+
background-color: $weuiBtnWarnActiveBg;
|
|
333
|
+
color: $weuiBtnActiveFontColor;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
&.taro-btn-plain.taro-btn-disabled.taro-btn-default {
|
|
338
|
+
border: 1px solid rgb(0 0 0 / 20%);
|
|
339
|
+
background-color: #f7f7f7;
|
|
340
|
+
color: rgb(0 0 0 / 30%);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
&.taro-btn-plain.taro-btn-disabled.taro-btn-primary {
|
|
344
|
+
border: 1px solid rgb(0 0 0 / 20%);
|
|
345
|
+
background-color: #f7f7f7;
|
|
346
|
+
color: rgb(0 0 0 / 30%);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
&.taro-btn-plain.taro-btn-disabled.taro-btn-warn {
|
|
350
|
+
border: 1px solid rgb(0 0 0 / 20%);
|
|
351
|
+
background-color: #f7f7f7;
|
|
352
|
+
color: rgb(0 0 0 / 30%);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import './style/index.scss';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { omit, createForwardRefComponent } from '../../utils/index.js';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
const Icon = props => {
|
|
7
|
+
let {
|
|
8
|
+
type,
|
|
9
|
+
className = '',
|
|
10
|
+
size = '23',
|
|
11
|
+
color,
|
|
12
|
+
forwardedRef
|
|
13
|
+
} = props;
|
|
14
|
+
if (type) type = type.replace(/_/g, '-');
|
|
15
|
+
const cls = classNames({
|
|
16
|
+
[`weui-icon-${type}`]: true
|
|
17
|
+
}, className);
|
|
18
|
+
const style = {
|
|
19
|
+
'font-size': size + 'px',
|
|
20
|
+
color: color
|
|
21
|
+
};
|
|
22
|
+
return (
|
|
23
|
+
/*#__PURE__*/
|
|
24
|
+
// eslint-disable-next-line react/react-in-jsx-scope
|
|
25
|
+
jsx("i", {
|
|
26
|
+
ref: forwardedRef,
|
|
27
|
+
...omit(props, ['type', 'className', 'forwardedRef']),
|
|
28
|
+
className: cls,
|
|
29
|
+
style: style
|
|
30
|
+
})
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
var index = createForwardRefComponent(Icon);
|
|
34
|
+
|
|
35
|
+
export { index as default };
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/icon/index.tsx"],"sourcesContent":["import './style/index.scss'\n\nimport classNames from 'classnames'\n\nimport { createForwardRefComponent, omit } from '../../utils'\n\ninterface IProps {\n type: string\n color: string\n size?: number | string\n className?: string\n forwardedRef?: React.MutableRefObject<HTMLLIElement>\n}\n\nconst Icon = (props: IProps) => {\n let { type, className = '', size = '23', color, forwardedRef } = props\n if (type) type = type.replace(/_/g, '-')\n const cls = classNames(\n {\n [`weui-icon-${type}`]: true\n },\n className\n )\n const style = { 'font-size': size + 'px', color: color }\n\n return (\n // eslint-disable-next-line react/react-in-jsx-scope\n <i ref={forwardedRef} {...omit(props, ['type', 'className', 'forwardedRef'])} className={cls} style={style} />\n )\n}\nexport default createForwardRefComponent(Icon)\n"],"names":["Icon","props","type","className","size","color","forwardedRef","replace","cls","classNames","style","_jsx","ref","omit","createForwardRefComponent"],"mappings":";;;;;AAcA,MAAMA,IAAI,GAAIC,KAAa,IAAI;EAC7B,IAAI;IAAEC,IAAI;AAAEC,IAAAA,SAAS,GAAG,EAAE;AAAEC,IAAAA,IAAI,GAAG,IAAI;IAAEC,KAAK;AAAEC,IAAAA;AAAc,GAAA,GAAGL,KAAK;EACtE,IAAIC,IAAI,EAAEA,IAAI,GAAGA,IAAI,CAACK,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;EACxC,MAAMC,GAAG,GAAGC,UAAU,CACpB;IACE,CAAC,CAAA,UAAA,EAAaP,IAAI,CAAA,CAAE,GAAG;GACxB,EACDC,SAAS,CACV;AACD,EAAA,MAAMO,KAAK,GAAG;IAAE,WAAW,EAAEN,IAAI,GAAG,IAAI;AAAEC,IAAAA,KAAK,EAAEA;GAAO;AAExD,EAAA;AAAA;AACE;IACAM,GAAA,CAAA,GAAA,EAAA;AAAGC,MAAAA,GAAG,EAAEN,YAAa;MAAA,GAAKO,IAAI,CAACZ,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;AAAEE,MAAAA,SAAS,EAAEK,GAAI;AAACE,MAAAA,KAAK,EAAEA;KAAM;AAAG;AAElH,CAAC;AACD,YAAeI,yBAAyB,CAACd,IAAI,CAAC;;;;"}
|