1 | @import "../node_modules/tinper-bee-core/scss/minxin-variables";
|
2 | @import "../node_modules/tinper-bee-core/scss/minxin-mixins";
|
3 |
|
4 | $radio-icon-width:16px;
|
5 | $radio-icon-height:16px;
|
6 | $radio-icon-checked-width: 6px;
|
7 | $radio-icon-checked-height: 6px;
|
8 | .u-radio-group {
|
9 | position: relative;
|
10 | display: inline-block;
|
11 | }
|
12 |
|
13 | .u-radio-group{
|
14 | .u-radio-button:first-child:not(:last-child):not(.dropdown-toggle) {
|
15 | border-top-right-radius: 0;
|
16 | border-bottom-right-radius: 0;
|
17 | }
|
18 | .u-radio-button:not(:first-child):not(:last-child):not(.dropdown-toggle) {
|
19 | border-radius: 0;
|
20 | }
|
21 | .u-radio-button{
|
22 | position: relative;
|
23 | float: left;
|
24 | display: inline-block;
|
25 | padding: 6px 12px;
|
26 | margin-bottom: 0;
|
27 | font-size: 12px;
|
28 | font-weight: 400;
|
29 | line-height: 12px;
|
30 | text-align: center;
|
31 | white-space: nowrap;
|
32 | vertical-align: middle;
|
33 | -ms-touch-action: manipulation;
|
34 | touch-action: manipulation;
|
35 | cursor: pointer;
|
36 | -webkit-user-select: none;
|
37 | -moz-user-select: none;
|
38 | -ms-user-select: none;
|
39 | user-select: none;
|
40 | background-image: none;
|
41 | border: 1px solid transparent;
|
42 | border-radius: $border-radius-base;
|
43 | color: $font-color-base;
|
44 | background-color: #fff;
|
45 | border-color: $border-color-base;
|
46 | z-index: 10;
|
47 | &:first-child {
|
48 | margin-left: 0;
|
49 | border-radius: $border-radius-base 0 0 $border-radius-base;
|
50 | }
|
51 | &:last-child{
|
52 | border-radius: 0 $border-radius-base $border-radius-base 0;
|
53 | border-right: 1px solid $border-color-base;
|
54 | }
|
55 | &.u-radio-button-lg {
|
56 | height: $radio-button-lg-height;
|
57 | line-height: $radio-button-lg-line-height;
|
58 | }
|
59 | &.u-radio-button-sm {
|
60 | height: $radio-button-sm-height;
|
61 | line-height: $radio-button-sm-line-height;
|
62 | padding: 0 12px;
|
63 | }
|
64 | &.sm:first-child{
|
65 | border-radius: 2px 0 0 2px;
|
66 | }
|
67 |
|
68 | &:hover,&:focus{
|
69 |
|
70 | position: relative;
|
71 | }
|
72 | input{
|
73 | position: absolute;
|
74 | left: 2px;
|
75 | z-index: 3;
|
76 | cursor: pointer;
|
77 | opacity: 0;
|
78 | top: 7px;
|
79 | bottom: 0;
|
80 | right: 0;
|
81 | box-sizing: border-box;
|
82 | padding: 0;
|
83 | width: 100%;
|
84 | }
|
85 | &.is-checked{
|
86 | border-color: $radio-checked-color;
|
87 | .u-radio-button-label{
|
88 | color: #fff;
|
89 | }
|
90 | &.disabled,&.disabled:hover{
|
91 | border-color: #c1c7d0;
|
92 | background-color:#c1c7d0;
|
93 | }
|
94 | &.disabled .u-radio-button-label{
|
95 | color: #fff;
|
96 | }
|
97 | }
|
98 | &.disabled {
|
99 | z-index: 1;
|
100 | border-color: #DFE1E6;
|
101 | background-color: #F7F9FB;
|
102 | cursor: not-allowed;
|
103 | color: #909090;
|
104 | span,label , input[type='radio']{
|
105 | cursor: not-allowed;
|
106 | }
|
107 | &:hover{
|
108 | border-color: #DFE1E6;
|
109 | background-color: #F7F9FB;
|
110 | color: #909090;
|
111 | box-shadow: none;
|
112 | cursor: not-allowed;
|
113 | }
|
114 | }
|
115 | &:hover, &.is-checked {
|
116 | background: $hover-bg-color-base;
|
117 | }
|
118 | &:focus, &.focus, &:active, &.active, &.is-checked{
|
119 | border-color: $radio-checked-color;
|
120 | background: $radio-checked-color;
|
121 | color: #fff;
|
122 | }
|
123 | }
|
124 | }
|
125 |
|
126 | .u-radio-group .u-radio-button+.u-radio-button, .u-radio-group .u-radio-button+.u-radio-group, .u-radio-group .u-radio-group+.u-radio-button, .u-radio-group .u-radio-group+.u-radio-group {
|
127 | margin-left: -1px;
|
128 | }
|
129 |
|
130 | .u-radio {
|
131 | position: relative;
|
132 | line-height: 18px;
|
133 | input[type='radio']{
|
134 | position: absolute;
|
135 | z-index: 3;
|
136 | cursor: pointer;
|
137 | opacity: 0;
|
138 | top: 1px;
|
139 | box-sizing: border-box;
|
140 | padding: 0;
|
141 | width: 100%;
|
142 | height: 100%;
|
143 | }
|
144 | input[type='radio']:focus + .u-radio-label:before{
|
145 |
|
146 | }
|
147 | &.is-checked {
|
148 | .u-radio-label:before{
|
149 | -moz-box-shadow: inset 0 0 0 10px $brand-light;
|
150 | -webkit-box-shadow: inset 0 0 0 10px $brand-light;
|
151 | box-shadow: inset 0 0 0 10px $brand-light;
|
152 | border-color:$border-color-base;
|
153 | }
|
154 | .u-radio-label:after {
|
155 | position: absolute;
|
156 | top: 6px;
|
157 | border-radius: 4px;
|
158 | height: $radio-icon-checked-height;
|
159 | width: $radio-icon-checked-width;
|
160 | background: $radio-checked-color;
|
161 | margin-left: 5px;
|
162 | }
|
163 | &.u-radio-inverse .u-radio-label{
|
164 | &:before{
|
165 | -moz-box-shadow: inset 0 0 0 10px $radio-checked-color;
|
166 | -webkit-box-shadow: inset 0 0 0 10px $radio-checked-color;
|
167 | box-shadow: inset 0 0 0 10px $radio-checked-color;
|
168 | border-color:$radio-checked-color;
|
169 | }
|
170 | &:after{
|
171 | background: $brand-light;
|
172 | }
|
173 | }
|
174 | }
|
175 | &.u-radio-noContent{
|
176 | .u-radio-label:after {
|
177 | top: -7px;
|
178 | }
|
179 | &.u-radio .u-radio-label:before{
|
180 | bottom: -4px;
|
181 | }
|
182 | }
|
183 | &.disabled{
|
184 | cursor: not-allowed;
|
185 | input[type='radio'] {
|
186 | cursor: not-allowed;
|
187 | }
|
188 | .u-radio-label{
|
189 | color: #909090;
|
190 | &:before{
|
191 | border-color: #DFE1E6;
|
192 | }
|
193 | }
|
194 | }
|
195 | &.disabled.is-checked .u-radio-label{
|
196 | color: #909090;
|
197 | &:after{
|
198 | background: #c1c7d0;
|
199 | }
|
200 | }
|
201 | .u-radio-label {
|
202 | font-size: 12px;
|
203 | cursor: pointer;
|
204 | display: inline-block;
|
205 | position: relative;
|
206 | padding-left: 24px;
|
207 | margin-right: 16px;
|
208 | color: #212121;
|
209 | &:before {
|
210 | -moz-border-radius: 50%;
|
211 | -webkit-border-radius: 50%;
|
212 | border-radius: 50%;
|
213 | border: 2px solid $border-color-base;
|
214 | background-color: #fff;
|
215 |
|
216 |
|
217 |
|
218 |
|
219 | content: '';
|
220 | font-family: 'uf';
|
221 | display: inline-block;
|
222 | width: $radio-icon-width;
|
223 | height: $radio-icon-height;
|
224 | left: 0;
|
225 | bottom: 1px;
|
226 | text-align: center;
|
227 | position: absolute;
|
228 | }
|
229 | &:after {
|
230 | content: '';
|
231 | font-family: 'uf';
|
232 | display: inline-block;
|
233 | width: $radio-icon-width;
|
234 | height: $radio-icon-height;
|
235 | left: 0;
|
236 | bottom: 0;
|
237 | text-align: center;
|
238 | position: absolute;
|
239 | }
|
240 | }
|
241 | }
|
242 |
|
243 |
|
244 |
|
245 |
|
246 | .u-radio.u-radio-success {
|
247 | &.is-checked {
|
248 | .u-radio-label:before{
|
249 | -moz-box-shadow: inset 0 0 0 10px #fff;
|
250 | -webkit-box-shadow: inset 0 0 0 10px #fff;
|
251 | box-shadow: inset 0 0 0 10px #fff;
|
252 | border-color:$border-color-base;
|
253 | }
|
254 | .u-radio-label:after{
|
255 | background: $radio-success-bg;
|
256 | }
|
257 | }
|
258 | .u-radio-label {
|
259 | color: $radio-success-bg;
|
260 |
|
261 | }
|
262 | input[type='radio']:focus + .u-radio-label:before{
|
263 |
|
264 | }
|
265 | }
|
266 |
|
267 |
|
268 |
|
269 | .u-radio.u-radio-warning {
|
270 | &.is-checked {
|
271 | .u-radio-label:before{
|
272 | -moz-box-shadow: inset 0 0 0 10px #fff;
|
273 | -webkit-box-shadow: inset 0 0 0 10px #fff;
|
274 | box-shadow: inset 0 0 0 10px #fff;
|
275 | border-color:$border-color-base;
|
276 | }
|
277 | .u-radio-label:after{
|
278 | background: $radio-warning-bg;
|
279 | }
|
280 | }
|
281 | .u-radio-label {
|
282 | color: $radio-warning-bg;
|
283 | }
|
284 | input[type='radio']:focus + .u-radio-label:before{
|
285 |
|
286 | }
|
287 | }
|
288 |
|
289 |
|
290 |
|
291 | .u-radio.u-radio-danger {
|
292 | &.is-checked {
|
293 | .u-radio-label:before{
|
294 | -moz-box-shadow: inset 0 0 0 10px #fff;
|
295 | -webkit-box-shadow: inset 0 0 0 10px #fff;
|
296 | box-shadow: inset 0 0 0 10px #fff;
|
297 | border-color:$border-color-base;
|
298 | }
|
299 | .u-radio-label:after{
|
300 | background: $radio-danger-bg;
|
301 | }
|
302 | }
|
303 | .u-radio-label {
|
304 | color: $radio-danger-bg;
|
305 | }
|
306 | input[type='radio']:focus + .u-radio-label:before{
|
307 |
|
308 | }
|
309 | }
|
310 |
|
311 |
|
312 |
|
313 |
|
314 | .u-radio.u-radio-info {
|
315 | &.is-checked {
|
316 | .u-radio-label:before{
|
317 | -moz-box-shadow: inset 0 0 0 10px #fff;
|
318 | -webkit-box-shadow: inset 0 0 0 10px #fff;
|
319 | box-shadow: inset 0 0 0 10px #fff;
|
320 | border-color:$border-color-base;
|
321 | }
|
322 | .u-radio-label:after{
|
323 | background: $radio-info-bg;
|
324 | }
|
325 | }
|
326 | .u-radio-label {
|
327 | color: $radio-info-bg;
|
328 |
|
329 | }
|
330 | input[type='radio']:focus + .u-radio-label:before{
|
331 |
|
332 | }
|
333 | }
|
334 |
|
335 |
|
336 |
|
337 |
|
338 | .u-radio.u-radio-dark {
|
339 | &.is-checked {
|
340 | .u-radio-label:before{
|
341 | -moz-box-shadow: inset 0 0 0 10px #fff;
|
342 | -webkit-box-shadow: inset 0 0 0 10px #fff;
|
343 | box-shadow: inset 0 0 0 10px #fff;
|
344 | border-color:$border-color-base;
|
345 | }
|
346 | .u-radio-label:after{
|
347 | background: $radio-dark-bg;
|
348 | }
|
349 | }
|
350 | .u-radio-label {
|
351 | color: $radio-dark-bg;
|
352 |
|
353 | }
|
354 | input[type='radio']:focus + .u-radio-label:before{
|
355 |
|
356 | }
|
357 | } |
\ | No newline at end of file |