1 | @charset "UTF-8";
|
2 |
|
3 | @import "../core/index-noreset.scss";
|
4 | @import "scss/variable";
|
5 | @import "scss/mixin";
|
6 | @import "scss/placeholder";
|
7 |
|
8 | #{$tab-prefix} {
|
9 | & {
|
10 | @include box-sizing;
|
11 | width: 100%;
|
12 | }
|
13 |
|
14 | &-bar {
|
15 | outline: none;
|
16 | &-popup {
|
17 | overflow-y: auto;
|
18 | max-height: 480px;
|
19 | }
|
20 | }
|
21 |
|
22 | &-nav-container {
|
23 | position: relative;
|
24 | @include clearfix;
|
25 | }
|
26 |
|
27 | &-nav-wrap {
|
28 | overflow: hidden;
|
29 | }
|
30 |
|
31 | &-nav-scroll {
|
32 | overflow: hidden;
|
33 | white-space: nowrap;
|
34 | }
|
35 |
|
36 | &-scrollable #{$tab-prefix}-nav-scroll {
|
37 | overflow-x: auto;
|
38 | overflow-y: hidden;
|
39 | -webkit-overflow-scrolling: touch;
|
40 | &::-webkit-scrollbar {
|
41 | display: none !important;
|
42 | width: 0 !important;
|
43 | height: 0 !important;
|
44 | -webkit-appearance: none;
|
45 | opacity: 0 !important;
|
46 | }
|
47 | }
|
48 |
|
49 | &-nav {
|
50 | display: inline-block;
|
51 | position: relative;
|
52 | transition: all $motion-duration-standard $motion-ease;
|
53 | list-style: none;
|
54 | padding: 0;
|
55 | margin: 0;
|
56 | &-enter,
|
57 | &-appear {
|
58 | animation: fadeInLeft .4s cubic-bezier(.78, .14, .15, .86);
|
59 | animation-fill-mode: both;
|
60 | }
|
61 |
|
62 | &-leave {
|
63 | animation: fadeOutLeft .2s cubic-bezier(.78, .14, .15, .86);
|
64 | animation-fill-mode: both;
|
65 | }
|
66 |
|
67 | &.#{$css-prefix}disable-animation #{$tab-prefix}-tab:before {
|
68 | transition: none;
|
69 | }
|
70 | }
|
71 |
|
72 | &-tab {
|
73 | display: inline-block;
|
74 | position: relative;
|
75 | transition: all $motion-duration-immediately $motion-linear;
|
76 |
|
77 | &-inner {
|
78 | position: relative;
|
79 | cursor: pointer;
|
80 | text-decoration: none;
|
81 | }
|
82 |
|
83 | &:before {
|
84 | content: "";
|
85 | position: absolute;
|
86 | transition: all $motion-duration-standard $motion-ease;
|
87 | }
|
88 |
|
89 | &.active {
|
90 | font-weight: $tab-item-font-weight-selected;
|
91 | }
|
92 |
|
93 | @include tabs-tab-close-icon(
|
94 | $tab-close-icon-color,
|
95 | $tab-close-icon-color-hover,
|
96 | $tab-close-icon-color-selected,
|
97 | $tab-close-icon-color-disabled
|
98 | );
|
99 | }
|
100 | &-tab:focus {
|
101 | outline: none;
|
102 | }
|
103 |
|
104 | &-tabpane {
|
105 | visibility: hidden;
|
106 | opacity: 0;
|
107 |
|
108 | &.active {
|
109 | visibility: visible;
|
110 | opacity: 1;
|
111 | height: auto;
|
112 | }
|
113 |
|
114 | &.hidden {
|
115 | overflow: hidden;
|
116 | height: 0 !important;
|
117 | margin: 0 !important;
|
118 | padding: 0 !important;
|
119 | border: 0 !important;
|
120 | }
|
121 | }
|
122 |
|
123 |
|
124 |
|
125 | &-btn-down,
|
126 | &-btn-prev,
|
127 | &-btn-next {
|
128 | position: absolute;
|
129 | top: 0;
|
130 | cursor: pointer;
|
131 | padding: 0;
|
132 | border: 0;
|
133 | outline: none;
|
134 | height: 100%;
|
135 |
|
136 | @include button-color($tab-nav-arrow-color-normal, $tab-nav-arrow-color-hover, $tab-nav-arrow-color-hover);
|
137 |
|
138 | &.disabled {
|
139 | cursor: not-allowed;
|
140 | color: $tab-nav-arrow-color-disabled;
|
141 | }
|
142 | }
|
143 |
|
144 | &-btn-next {
|
145 | right: $tab-nav-arrow-right-positon-right;
|
146 | }
|
147 | &-btn-prev {
|
148 | right: $tab-nav-arrow-left-positon-right;
|
149 | }
|
150 | &-btn-down {
|
151 | right: $tab-nav-arrow-down-positon-right;
|
152 | }
|
153 |
|
154 | & .#{$css-prefix}tab-icon-dropdown::before {
|
155 | content: $tab-icon-dropdown-content;
|
156 | }
|
157 |
|
158 | & .#{$css-prefix}tab-icon-prev::before {
|
159 | content: $tab-icon-prev-content;
|
160 | }
|
161 |
|
162 | & .#{$css-prefix}tab-icon-next::before {
|
163 | content: $tab-icon-next-content;
|
164 | }
|
165 |
|
166 | &-content {
|
167 | overflow: hidden;
|
168 | }
|
169 |
|
170 |
|
171 |
|
172 | &-vertical > #{$tab-prefix}-bar {
|
173 | #{$tab-prefix}-nav {
|
174 | width: 100%;
|
175 | }
|
176 |
|
177 | #{$tab-prefix}-tab {
|
178 | display: block;
|
179 | }
|
180 | }
|
181 |
|
182 |
|
183 |
|
184 | &.#{$css-prefix}medium {
|
185 | @include tabs-size(
|
186 | $tab-item-padding-tb-size-m,
|
187 | $tab-item-padding-lr-size-m,
|
188 | $tab-item-text-size-m,
|
189 | $tab-nav-tab-icon-size-m,
|
190 | $tab-nav-close-icon-size-m,
|
191 | $tab-nav-close-icon-padding-l-size-m,
|
192 | $tab-nav-scroll-padding-right-m
|
193 | );
|
194 | }
|
195 |
|
196 | &.#{$css-prefix}small {
|
197 | @include tabs-size(
|
198 | $tab-item-padding-tb-size-s,
|
199 | $tab-item-padding-lr-size-s,
|
200 | $tab-item-text-size-s,
|
201 | $tab-nav-tab-icon-size-s,
|
202 | $tab-nav-close-icon-size-s,
|
203 | $tab-nav-close-icon-padding-l-size-s,
|
204 | $tab-nav-scroll-padding-right-s
|
205 | );
|
206 | }
|
207 |
|
208 |
|
209 |
|
210 | &-pure > #{$tab-prefix}-bar {
|
211 | border-bottom: $tab-pure-divider-line;
|
212 | background-color: $tab-pure-bg-color;
|
213 |
|
214 | #{$tab-prefix}-nav-container {
|
215 | margin-bottom: calc(0px - #{$tab-pure-divider-line-width});
|
216 | box-shadow: $tab-pure-divider-shadow;
|
217 |
|
218 | #{$tab-prefix}-tab {
|
219 | @include tabs-tab-statement(
|
220 | $tab-pure-text-color-normal, // text color
|
221 | $tab-pure-text-color-hover,
|
222 | $tab-pure-text-color-selected,
|
223 | $tab-pure-text-color-disabled,
|
224 | transparent, // bg color
|
225 | transparent,
|
226 | transparent,
|
227 | transparent
|
228 | );
|
229 |
|
230 | @include tabs-tab-inkbar(
|
231 | $tab-pure-ink-bar-width,
|
232 | $tab-pure-ink-bar-color,
|
233 | 0%,
|
234 | 0%,
|
235 | $tab-pure-ink-bar-padding-l,
|
236 | 'bottom'
|
237 | );
|
238 | }
|
239 | }
|
240 | }
|
241 |
|
242 |
|
243 |
|
244 | &-wrapped > #{$tab-prefix}-bar {
|
245 | background: $tab-wrapped-bar-bg-color;
|
246 |
|
247 | #{$tab-prefix}-tab {
|
248 | @include tabs-tab-statement(
|
249 | $tab-wrapped-text-color,
|
250 | $tab-wrapped-text-color-hover,
|
251 | $tab-wrapped-text-color-selected,
|
252 | $tab-wrapped-text-color-disabled,
|
253 | $tab-wrapped-bg-color,
|
254 | $tab-wrapped-bg-color-hover,
|
255 | $tab-wrapped-bg-color-selected,
|
256 | $tab-wrapped-bg-color-disabled
|
257 | );
|
258 |
|
259 | @include tabs-tab-close-icon(
|
260 | $tab-close-icon-color,
|
261 | $tab-close-icon-color-hover,
|
262 | $tab-close-icon-color-selected,
|
263 | $tab-close-icon-color-disabled
|
264 | );
|
265 | }
|
266 | }
|
267 |
|
268 | &-wrapped:before, &-wrapped:after {
|
269 | content: "";
|
270 | display: table;
|
271 | }
|
272 |
|
273 | &-wrapped:after {
|
274 | clear: both;
|
275 | }
|
276 |
|
277 | &-wrapped > #{$tab-prefix}-content {
|
278 | position: relative;
|
279 | }
|
280 |
|
281 |
|
282 | &-wrapped#{$tab-prefix}-top > #{$tab-prefix}-bar {
|
283 | position: relative;
|
284 | #{$tab-prefix}-nav-extra {
|
285 | position: absolute;
|
286 | top: 50%;
|
287 | right: 0;
|
288 | transform: translateY(-50%);
|
289 | }
|
290 |
|
291 | #{$tab-prefix}-tab {
|
292 | margin-right: $tab-wrapped-tab-margin-right;
|
293 | @include tabs-tab-border(
|
294 | $tab-wrapped-bar-border,
|
295 | null,
|
296 | $tab-wrapped-tab-top-border-radius,
|
297 | $tab-wrapped-border-line-color-hover,
|
298 | $tab-wrapped-border-line-color,
|
299 | $tab-wrapped-border-line-color,
|
300 | $tab-wrapped-bg-color-selected,
|
301 | $tab-wrapped-border-line-color
|
302 | );
|
303 |
|
304 | @include tabs-tab-inkbar(
|
305 | $tab-wrapped-ink-bar-width,
|
306 | $tab-wrapped-ink-bar-color,
|
307 | calc(0px - #{$tab-wrapped-border-line-width}),
|
308 | $tab-wrapped-tab-corner-radius,
|
309 | $tab-wrapped-ink-bar-padding-l,
|
310 | 'top'
|
311 | );
|
312 | border-width: $tab-wrapped-border-side-width $tab-wrapped-border-side-width $tab-wrapped-border-line-width $tab-wrapped-border-side-width;
|
313 | &.active {
|
314 | border-width: $tab-wrapped-border-line-width $tab-wrapped-border-line-width $tab-wrapped-border-line-width $tab-wrapped-border-line-width;
|
315 | }
|
316 | }
|
317 | }
|
318 |
|
319 | &-wrapped#{$tab-prefix}-top > #{$tab-prefix}-bar:before {
|
320 | content: '';
|
321 | position: absolute;
|
322 | top: 100%;
|
323 | width: 100%;
|
324 | height: 0;
|
325 | border-bottom: $tab-wrapped-content-border;
|
326 | transform: translateY(calc(0px - #{$tab-wrapped-content-border-line-width}));
|
327 | display: block;
|
328 | }
|
329 |
|
330 |
|
331 | &-wrapped#{$tab-prefix}-bottom > #{$tab-prefix}-bar {
|
332 | position: relative;
|
333 | #{$tab-prefix}-nav-extra {
|
334 | position: absolute;
|
335 | top: 50%;
|
336 | right: 0;
|
337 | transform: translateY(-50%);
|
338 | }
|
339 |
|
340 | #{$tab-prefix}-tab {
|
341 | margin-right: $tab-wrapped-tab-margin-right;
|
342 | @include tabs-tab-border($tab-wrapped-bar-border, null, $tab-wrapped-tab-bottom-border-radius, $tab-wrapped-border-line-color-hover, $tab-wrapped-bg-color-selected, $tab-wrapped-border-line-color, $tab-wrapped-border-line-color, $tab-wrapped-border-line-color);
|
343 | @include tabs-tab-inkbar($tab-wrapped-ink-bar-width, $tab-wrapped-ink-bar-color, calc(0px - #{$tab-wrapped-border-line-width}), $tab-wrapped-tab-corner-radius, $tab-wrapped-ink-bar-padding-l, 'bottom');
|
344 | }
|
345 | }
|
346 |
|
347 | &-wrapped#{$tab-prefix}-bottom > #{$tab-prefix}-content {
|
348 | top: $tab-wrapped-content-position-top;
|
349 | border-bottom: $tab-wrapped-content-border;
|
350 | }
|
351 |
|
352 |
|
353 | &-wrapped#{$tab-prefix}-left > #{$tab-prefix}-bar {
|
354 | float: left;
|
355 | #{$tab-prefix}-tab {
|
356 | float: none;
|
357 | margin-bottom: $tab-wrapped-tab-margin-bottom;
|
358 | @include tabs-tab-border( $tab-wrapped-bar-border, null, $tab-wrapped-tab-left-border-radius, $tab-wrapped-border-line-color-hover, $tab-wrapped-border-line-color, $tab-wrapped-bg-color-selected, $tab-wrapped-border-line-color, $tab-wrapped-border-line-color);
|
359 | @include tabs-tab-inkbar($tab-wrapped-ink-bar-width, $tab-wrapped-ink-bar-color, calc(0px - #{$tab-wrapped-border-line-width}), $tab-wrapped-tab-corner-radius, $tab-wrapped-ink-bar-padding-l, 'left');
|
360 | border-width: $tab-wrapped-border-side-width $tab-wrapped-border-line-width $tab-wrapped-border-side-width $tab-wrapped-border-side-width;
|
361 | &.active {
|
362 | border-width: $tab-wrapped-border-line-width $tab-wrapped-border-line-width $tab-wrapped-border-line-width $tab-wrapped-border-line-width;
|
363 | }
|
364 | }
|
365 | }
|
366 |
|
367 | &-wrapped#{$tab-prefix}-left > #{$tab-prefix}-content {
|
368 | right: $tab-wrapped-content-position-right;
|
369 | border-left: $tab-wrapped-content-border;
|
370 | }
|
371 |
|
372 |
|
373 | &-wrapped#{$tab-prefix}-right > #{$tab-prefix}-bar {
|
374 | float: right;
|
375 | #{$tab-prefix}-tab {
|
376 | float: none;
|
377 | margin-bottom: $tab-wrapped-tab-margin-bottom;
|
378 | @include tabs-tab-border( $tab-wrapped-bar-border, null, $tab-wrapped-tab-right-border-radius, $tab-wrapped-border-line-color-hover, $tab-wrapped-border-line-color, $tab-wrapped-border-line-color, $tab-wrapped-border-line-color, $tab-wrapped-bg-color-selected);
|
379 | @include tabs-tab-inkbar($tab-wrapped-ink-bar-width, $tab-wrapped-ink-bar-color, calc(0px - #{$tab-wrapped-border-line-width}), $tab-wrapped-tab-corner-radius, $tab-wrapped-ink-bar-padding-l, 'right');
|
380 | border-width: $tab-wrapped-border-side-width $tab-wrapped-border-side-width $tab-wrapped-border-side-width $tab-wrapped-border-line-width;
|
381 | &.active {
|
382 | border-width: $tab-wrapped-border-line-width $tab-wrapped-border-line-width $tab-wrapped-border-line-width $tab-wrapped-border-line-width;
|
383 | }
|
384 | }
|
385 | }
|
386 |
|
387 | &-wrapped#{$tab-prefix}-right > #{$tab-prefix}-content {
|
388 | right: calc(0px - #{$tab-wrapped-content-position-right});
|
389 | border-right: $tab-wrapped-content-border;
|
390 | }
|
391 |
|
392 | &-capsule > #{$tab-prefix}-bar {
|
393 | #{$tab-prefix}-tab {
|
394 | transition: background-color $motion-duration-immediately $motion-linear;
|
395 | border: $tab-capsule-tab-border;
|
396 | border-right-color: transparent;
|
397 | margin-right: calc(0px - #{$tab-capsule-tab-border-line-width});
|
398 |
|
399 | &:first-child {
|
400 | border-radius: $tab-capsule-corner-radius 0 0 $tab-capsule-corner-radius;
|
401 | }
|
402 |
|
403 | &:last-child {
|
404 | border-radius: 0 $tab-capsule-corner-radius $tab-capsule-corner-radius 0;
|
405 | border-right: $tab-capsule-tab-border;
|
406 | }
|
407 |
|
408 | &.active {
|
409 | border-right: $tab-capsule-tab-border;
|
410 | border-color: $tab-capsule-tab-border-line-color-active;
|
411 | }
|
412 |
|
413 | &.disabled {
|
414 | border-color: $tab-capsule-tab-border-line-color-disabled;
|
415 | }
|
416 |
|
417 | &:hover {
|
418 | z-index: 2;
|
419 | border-right: $tab-capsule-tab-border;
|
420 | border-color: $tab-capsule-tab-border-line-color-hover;
|
421 | }
|
422 |
|
423 | @include tabs-tab-statement(
|
424 | $tab-capsule-text-color,
|
425 | $tab-capsule-text-color-hover,
|
426 | $tab-capsule-text-color-selected,
|
427 | $tab-capsule-text-color-disabled,
|
428 | $tab-capsule-bg-color,
|
429 | $tab-capsule-bg-color-hover,
|
430 | $tab-capsule-bg-color-selected,
|
431 | $tab-capsule-bg-color-disabled
|
432 | );
|
433 | }
|
434 | }
|
435 |
|
436 |
|
437 |
|
438 |
|
439 | &-text > #{$tab-prefix}-bar {
|
440 |
|
441 | #{$tab-prefix}-tab {
|
442 | @include tabs-tab-statement(
|
443 | $tab-text-text-color-normal,
|
444 | $tab-text-text-color-hover,
|
445 | $tab-text-text-color-selected,
|
446 | $tab-text-text-color-disabled,
|
447 | transparent, // no bg
|
448 | transparent, // no hover bg
|
449 | transparent, // no selected bg
|
450 | transparent // no disabled bg
|
451 | );
|
452 |
|
453 | &:not(:last-child):after {
|
454 | content: '';
|
455 | position: absolute;
|
456 | right: 0;
|
457 | top: calc((100% - #{$tab-text-item-sep-height}) / 2);
|
458 | width: $tab-text-item-sep-width;
|
459 | height: $tab-text-item-sep-height;
|
460 | background-color: $tab-text-item-sep-color;
|
461 | }
|
462 | }
|
463 | }
|
464 |
|
465 | &-pure > #{$tab-prefix}-bar {
|
466 | position: relative;
|
467 | #{$tab-prefix}-nav-extra {
|
468 | position: absolute;
|
469 | top: 50%;
|
470 | right: 0;
|
471 | transform: translateY(-50%);
|
472 | }
|
473 | }
|
474 |
|
475 | &-capsule > #{$tab-prefix}-bar {
|
476 | position: relative;
|
477 | #{$tab-prefix}-nav-extra {
|
478 | position: absolute;
|
479 | top: 50%;
|
480 | right: 0;
|
481 | transform: translateY(-50%);
|
482 | }
|
483 | }
|
484 |
|
485 | &-text > #{$tab-prefix}-bar {
|
486 | position: relative;
|
487 | #{$tab-prefix}-nav-extra {
|
488 | position: absolute;
|
489 | top: 50%;
|
490 | right: 0;
|
491 | transform: translateY(-50%);
|
492 | }
|
493 | }
|
494 | }
|
495 |
|
496 | @import "./rtl.scss";
|