@react-md/core 1.0.0-next.5 → 1.0.0-next.7
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/.turbo/turbo-build.log +5 -5
- package/.turbo/turbo-lint.log +12 -0
- package/CHANGELOG.md +12 -0
- package/dist/_core.scss +157 -240
- package/dist/_utils.scss +10 -0
- package/dist/app-bar/_app-bar.scss +95 -93
- package/dist/avatar/_avatar.scss +49 -47
- package/dist/badge/_badge.scss +19 -17
- package/dist/box/_box.scss +57 -55
- package/dist/button/_button.scss +122 -120
- package/dist/card/_card.scss +72 -70
- package/dist/chip/_chip.scss +105 -103
- package/dist/dialog/_dialog.scss +128 -126
- package/dist/divider/_divider.scss +24 -22
- package/dist/draggable/_draggable.scss +16 -12
- package/dist/expansion-panel/_expansion-panel.scss +69 -52
- package/dist/form/Form.d.ts +1 -1
- package/dist/form/Form.js +2 -1
- package/dist/form/Form.js.map +1 -1
- package/dist/form/_form.scss +1175 -1128
- package/dist/icon/_icon.scss +64 -62
- package/dist/interaction/_interaction.scss +39 -35
- package/dist/layout/_layout.scss +68 -67
- package/dist/link/_link.scss +52 -50
- package/dist/list/_list.scss +124 -122
- package/dist/menu/_menu.scss +9 -7
- package/dist/overlay/_overlay.scss +25 -23
- package/dist/progress/_progress.scss +11 -6
- package/dist/responsive-item/_responsive-item.scss +91 -89
- package/dist/segmented-button/_segmented-button.scss +54 -49
- package/dist/sheet/_sheet.scss +84 -82
- package/dist/snackbar/_snackbar.scss +128 -123
- package/dist/table/_table.scss +159 -157
- package/dist/tabs/_tabs.scss +10 -8
- package/dist/tooltip/_tooltip.scss +60 -58
- package/dist/transition/_transition.scss +44 -39
- package/dist/tree/_tree.scss +83 -81
- package/dist/typography/_typography.scss +58 -49
- package/dist/window-splitter/_window-splitter.scss +72 -70
- package/package.json +1 -1
- package/src/_core.scss +157 -240
- package/src/_utils.scss +10 -0
- package/src/app-bar/_app-bar.scss +95 -93
- package/src/avatar/_avatar.scss +49 -47
- package/src/badge/_badge.scss +19 -17
- package/src/box/_box.scss +57 -55
- package/src/button/_button.scss +122 -120
- package/src/card/_card.scss +72 -70
- package/src/chip/_chip.scss +105 -103
- package/src/dialog/_dialog.scss +128 -126
- package/src/divider/_divider.scss +24 -22
- package/src/draggable/_draggable.scss +16 -12
- package/src/expansion-panel/_expansion-panel.scss +69 -52
- package/src/form/Form.tsx +2 -1
- package/src/form/_form.scss +1175 -1128
- package/src/icon/_icon.scss +64 -62
- package/src/interaction/_interaction.scss +39 -35
- package/src/layout/_layout.scss +68 -67
- package/src/link/_link.scss +52 -50
- package/src/list/_list.scss +124 -122
- package/src/menu/_menu.scss +9 -7
- package/src/overlay/_overlay.scss +25 -23
- package/src/progress/_progress.scss +11 -6
- package/src/responsive-item/_responsive-item.scss +91 -89
- package/src/segmented-button/_segmented-button.scss +54 -49
- package/src/sheet/_sheet.scss +84 -82
- package/src/snackbar/_snackbar.scss +128 -123
- package/src/table/_table.scss +159 -157
- package/src/tabs/_tabs.scss +10 -8
- package/src/tooltip/_tooltip.scss +60 -58
- package/src/transition/_transition.scss +44 -39
- package/src/tree/_tree.scss +83 -81
- package/src/typography/_typography.scss +58 -49
- package/src/window-splitter/_window-splitter.scss +72 -70
- package/tsconfig.json +2 -2
package/dist/form/_form.scss
CHANGED
|
@@ -426,7 +426,7 @@ $variables: (
|
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
-
@mixin file-input-styles {
|
|
429
|
+
@mixin file-input-styles($disable-layer: false) {
|
|
430
430
|
@if utils.$disable-has-selectors or utils.$disable-focus-visible {
|
|
431
431
|
.rmd-file-input:focus-within::before {
|
|
432
432
|
@include utils.keyboard-only {
|
|
@@ -440,394 +440,408 @@ $variables: (
|
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
-
@mixin form-message-styles {
|
|
444
|
-
.
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
443
|
+
@mixin form-message-styles($disable-layer: false) {
|
|
444
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
445
|
+
.rmd-form-message-container {
|
|
446
|
+
display: flex;
|
|
447
|
+
flex-direction: column;
|
|
448
|
+
}
|
|
448
449
|
|
|
449
|
-
|
|
450
|
-
|
|
450
|
+
.rmd-form-message {
|
|
451
|
+
@include utils.map-to-styles($message-typography-styles);
|
|
451
452
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
453
|
+
display: flex;
|
|
454
|
+
margin: $message-margin-top 0 $message-margin-bottom;
|
|
455
|
+
min-height: $message-min-height;
|
|
455
456
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
457
|
+
@if not $disable-text-field-filled-theme and $text-field-filled-padding {
|
|
458
|
+
&--filled {
|
|
459
|
+
padding-left: $text-field-filled-padding;
|
|
460
|
+
padding-right: $text-field-filled-padding;
|
|
461
|
+
}
|
|
460
462
|
}
|
|
461
|
-
}
|
|
462
463
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
464
|
+
@if not
|
|
465
|
+
$disable-text-field-outlined-theme and
|
|
466
|
+
$text-field-outlined-padding
|
|
467
|
+
{
|
|
468
|
+
&--outline {
|
|
469
|
+
padding-left: $text-field-outlined-padding;
|
|
470
|
+
padding-right: $text-field-outlined-padding;
|
|
471
|
+
}
|
|
468
472
|
}
|
|
469
|
-
}
|
|
470
473
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
474
|
+
@if not
|
|
475
|
+
$disable-text-field-underlined-theme and
|
|
476
|
+
$text-field-underlined-padding
|
|
477
|
+
{
|
|
478
|
+
&--underline {
|
|
479
|
+
padding-left: $text-field-underlined-padding;
|
|
480
|
+
padding-right: $text-field-underlined-padding;
|
|
481
|
+
}
|
|
478
482
|
}
|
|
479
|
-
}
|
|
480
483
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
+
&__message {
|
|
485
|
+
margin: 0;
|
|
486
|
+
}
|
|
484
487
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
488
|
+
@if not $disable-text-field-counter {
|
|
489
|
+
&__counter {
|
|
490
|
+
@include utils.auto-rtl(margin-left, auto);
|
|
491
|
+
@include utils.auto-rtl(padding-left, $message-counter-spacing);
|
|
489
492
|
|
|
490
|
-
|
|
491
|
-
|
|
493
|
+
flex-shrink: 0;
|
|
494
|
+
white-space: nowrap;
|
|
495
|
+
}
|
|
492
496
|
}
|
|
493
497
|
}
|
|
494
498
|
}
|
|
495
499
|
}
|
|
496
500
|
|
|
497
|
-
@mixin label-styles {
|
|
498
|
-
.
|
|
499
|
-
|
|
501
|
+
@mixin label-styles($disable-layer: false) {
|
|
502
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
503
|
+
.rmd-label {
|
|
504
|
+
@include utils.map-to-styles($label-typography);
|
|
500
505
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
506
|
+
align-items: center;
|
|
507
|
+
display: inline-flex;
|
|
508
|
+
transition-duration: transition.$linear-duration;
|
|
509
|
+
transition-property: background-color, transform;
|
|
505
510
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
+
$active-selector: "&--active";
|
|
512
|
+
@if not $_disable-text-field-container {
|
|
513
|
+
$active-selector: $active-selector +
|
|
514
|
+
", .rmd-text-field-container:focus-within &";
|
|
515
|
+
}
|
|
511
516
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
517
|
+
#{$active-selector} {
|
|
518
|
+
@include use-var(color, focus-color);
|
|
519
|
+
}
|
|
515
520
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
+
@if not $disable-floating-label {
|
|
522
|
+
&--floating {
|
|
523
|
+
@include utils.rtl {
|
|
524
|
+
left: auto;
|
|
525
|
+
right: 0;
|
|
526
|
+
transform: translate(
|
|
527
|
+
utils.negate-var(get-var(text-field-padding-left)),
|
|
528
|
+
get-var(label-floating-top)
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
left: 0;
|
|
533
|
+
// disable pointer events for floating labels so that the input behind
|
|
534
|
+
// is clicked instead. this prevents double click events for the Select
|
|
535
|
+
// component
|
|
536
|
+
pointer-events: none;
|
|
537
|
+
position: absolute;
|
|
538
|
+
top: 0;
|
|
521
539
|
transform: translate(
|
|
522
|
-
|
|
540
|
+
get-var(text-field-padding-left),
|
|
523
541
|
get-var(label-floating-top)
|
|
524
542
|
);
|
|
525
543
|
}
|
|
526
544
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
// component
|
|
531
|
-
pointer-events: none;
|
|
532
|
-
position: absolute;
|
|
533
|
-
top: 0;
|
|
534
|
-
transform: translate(
|
|
535
|
-
get-var(text-field-padding-left),
|
|
536
|
-
get-var(label-floating-top)
|
|
537
|
-
);
|
|
538
|
-
}
|
|
545
|
+
&--floating-dense {
|
|
546
|
+
@include set-var(label-floating-top, $label-floating-top-dense);
|
|
547
|
+
}
|
|
539
548
|
|
|
540
|
-
|
|
541
|
-
@
|
|
542
|
-
|
|
549
|
+
$floating-active-selector: "&--floating-active";
|
|
550
|
+
@if not
|
|
551
|
+
$disable-text-field or not
|
|
552
|
+
$disable-password or not
|
|
553
|
+
$disable-textarea
|
|
554
|
+
{
|
|
555
|
+
$floating-active-selector: $floating-active-selector +
|
|
556
|
+
", .rmd-text-field-container:focus-within &--floating" +
|
|
557
|
+
", .rmd-text-field:not(:placeholder-shown) + &--floating";
|
|
558
|
+
}
|
|
559
|
+
@if not $disable-native-select {
|
|
560
|
+
$floating-active-selector: $floating-active-selector +
|
|
561
|
+
", .rmd-native-select[multiple] + &--floating" +
|
|
562
|
+
", .rmd-native-select:not(:invalid) + &--floating";
|
|
563
|
+
}
|
|
543
564
|
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
$floating-active-selector: $floating-active-selector +
|
|
556
|
-
", .rmd-native-select[multiple] + &--floating" +
|
|
557
|
-
", .rmd-native-select:not(:invalid) + &--floating";
|
|
558
|
-
}
|
|
565
|
+
#{$floating-active-selector} {
|
|
566
|
+
@include utils.rtl {
|
|
567
|
+
transform: scale($label-floating-scale)
|
|
568
|
+
translate(
|
|
569
|
+
utils.negate-var(get-var(label-left-offset)),
|
|
570
|
+
get-var(label-top-offset)
|
|
571
|
+
);
|
|
572
|
+
transform-origin: 100% 0;
|
|
573
|
+
}
|
|
574
|
+
@include use-var(background-color, label-active-background-color);
|
|
575
|
+
@include use-var(padding, label-active-padding);
|
|
559
576
|
|
|
560
|
-
#{$floating-active-selector} {
|
|
561
|
-
@include utils.rtl {
|
|
562
577
|
transform: scale($label-floating-scale)
|
|
563
|
-
translate(
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
578
|
+
translate(get-var(label-left-offset), get-var(label-top-offset));
|
|
579
|
+
// need to add the `transform-origin` because of the scaling applied.
|
|
580
|
+
// it'll change the position based on the size of the label otherwise
|
|
581
|
+
transform-origin: 0 0;
|
|
582
|
+
z-index: 1;
|
|
567
583
|
}
|
|
568
|
-
@include use-var(background-color, label-active-background-color);
|
|
569
|
-
@include use-var(padding, label-active-padding);
|
|
570
|
-
|
|
571
|
-
transform: scale($label-floating-scale)
|
|
572
|
-
translate(get-var(label-left-offset), get-var(label-top-offset));
|
|
573
|
-
z-index: 1;
|
|
574
584
|
}
|
|
575
|
-
}
|
|
576
585
|
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
586
|
+
@if not $disable-label-gap {
|
|
587
|
+
&--gap {
|
|
588
|
+
gap: $label-gap;
|
|
589
|
+
}
|
|
580
590
|
}
|
|
581
|
-
}
|
|
582
591
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
592
|
+
@if not $disable-label-reversed {
|
|
593
|
+
&--reversed {
|
|
594
|
+
flex-direction: row-reverse;
|
|
595
|
+
// this makes it so the content is at the starting edge
|
|
596
|
+
justify-content: flex-end;
|
|
597
|
+
}
|
|
588
598
|
}
|
|
589
|
-
}
|
|
590
599
|
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
600
|
+
@if not $disable-label-stacked {
|
|
601
|
+
&--stacked {
|
|
602
|
+
flex-direction: column;
|
|
603
|
+
}
|
|
594
604
|
}
|
|
595
|
-
}
|
|
596
605
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
606
|
+
@if not $disable-label-stacked-reversed {
|
|
607
|
+
&--stacked-reversed {
|
|
608
|
+
flex-direction: column-reverse;
|
|
609
|
+
}
|
|
600
610
|
}
|
|
601
611
|
}
|
|
602
612
|
}
|
|
603
613
|
}
|
|
604
614
|
|
|
605
|
-
@mixin text-field-container-styles {
|
|
606
|
-
.
|
|
607
|
-
|
|
615
|
+
@mixin text-field-container-styles($disable-layer: false) {
|
|
616
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
617
|
+
.rmd-text-field-container {
|
|
618
|
+
@include set-var(label-left-offset, get-var(text-field-padding-left));
|
|
619
|
+
@include use-var(height, text-field-height);
|
|
608
620
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
621
|
+
align-items: center;
|
|
622
|
+
display: flex;
|
|
623
|
+
position: relative;
|
|
612
624
|
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
625
|
+
@if not $disable-text-field-container-dense {
|
|
626
|
+
&--dense {
|
|
627
|
+
@include set-var(text-field-height, $text-field-dense-height);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
&--dense-label {
|
|
631
|
+
@include set-var(text-field-height, $text-field-label-dense-height);
|
|
632
|
+
}
|
|
616
633
|
}
|
|
617
634
|
|
|
618
|
-
&--
|
|
619
|
-
|
|
635
|
+
&--inline {
|
|
636
|
+
display: inline-flex;
|
|
620
637
|
}
|
|
621
|
-
}
|
|
622
638
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
639
|
+
&--stretch {
|
|
640
|
+
flex: 1 1 auto;
|
|
641
|
+
width: 100%;
|
|
642
|
+
}
|
|
626
643
|
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
}
|
|
644
|
+
&--label {
|
|
645
|
+
@include set-var(text-field-height, $text-field-label-height);
|
|
646
|
+
}
|
|
631
647
|
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
648
|
+
&--error {
|
|
649
|
+
@if not $disable-text-field-addon {
|
|
650
|
+
@include icon.set-var(color, currentcolor);
|
|
651
|
+
}
|
|
652
|
+
@include set-var(active-color, currentcolor);
|
|
653
|
+
@include set-var(focus-color, currentcolor);
|
|
635
654
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
655
|
+
@if not
|
|
656
|
+
$disable-text-field-underlined-theme or not
|
|
657
|
+
$disable-text-field-outlined-theme
|
|
658
|
+
{
|
|
659
|
+
@include set-var(
|
|
660
|
+
text-field-border-color,
|
|
661
|
+
theme.theme-get-var(error-color)
|
|
662
|
+
);
|
|
663
|
+
@include set-var(
|
|
664
|
+
text-field-hover-border-color,
|
|
665
|
+
theme.theme-get-var(error-color)
|
|
666
|
+
);
|
|
667
|
+
}
|
|
639
668
|
}
|
|
640
|
-
@include set-var(active-color, currentcolor);
|
|
641
|
-
@include set-var(focus-color, currentcolor);
|
|
642
669
|
|
|
643
|
-
|
|
644
|
-
$disable-text-field-underlined-theme or not
|
|
645
|
-
$disable-text-field-outlined-theme
|
|
646
|
-
{
|
|
670
|
+
&--hoverable:hover {
|
|
647
671
|
@include set-var(
|
|
648
672
|
text-field-border-color,
|
|
649
|
-
|
|
650
|
-
);
|
|
651
|
-
@include set-var(
|
|
652
|
-
text-field-hover-border-color,
|
|
653
|
-
theme.theme-get-var(error-color)
|
|
673
|
+
get-var(text-field-hover-border-color)
|
|
654
674
|
);
|
|
655
675
|
}
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
&--hoverable:hover {
|
|
659
|
-
@include set-var(
|
|
660
|
-
text-field-border-color,
|
|
661
|
-
get-var(text-field-hover-border-color)
|
|
662
|
-
);
|
|
663
|
-
}
|
|
664
676
|
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
@include use-var(border-color, text-field-border-color);
|
|
683
|
-
|
|
684
|
-
border-radius: $text-field-border-radius;
|
|
685
|
-
border-style: solid;
|
|
686
|
-
border-width: $text-field-border-width;
|
|
677
|
+
@if not $disable-text-field-outlined-theme {
|
|
678
|
+
&--outline {
|
|
679
|
+
@include set-var(
|
|
680
|
+
text-field-padding-left,
|
|
681
|
+
$text-field-outlined-padding
|
|
682
|
+
);
|
|
683
|
+
@include set-var(
|
|
684
|
+
text-field-padding-right,
|
|
685
|
+
$text-field-outlined-padding
|
|
686
|
+
);
|
|
687
|
+
@include set-var(label-top-offset, -50%);
|
|
688
|
+
@include set-var(label-active-padding, 0 $label-floating-padding);
|
|
689
|
+
@include set-var(
|
|
690
|
+
label-active-background-color,
|
|
691
|
+
theme.theme-get-var(background-color)
|
|
692
|
+
);
|
|
693
|
+
@include use-var(border-color, text-field-border-color);
|
|
687
694
|
|
|
688
|
-
|
|
689
|
-
|
|
695
|
+
border-radius: $text-field-border-radius;
|
|
696
|
+
border-style: solid;
|
|
697
|
+
border-width: $text-field-border-width;
|
|
690
698
|
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
699
|
+
&::after {
|
|
700
|
+
@include utils.pseudo-element;
|
|
701
|
+
|
|
702
|
+
box-shadow: 0
|
|
703
|
+
0
|
|
704
|
+
0
|
|
705
|
+
$text-field-border-width-active
|
|
706
|
+
get-var(focus-color);
|
|
707
|
+
opacity: 0;
|
|
708
|
+
transition: opacity transition.$linear-duration;
|
|
709
|
+
}
|
|
698
710
|
}
|
|
699
|
-
}
|
|
700
711
|
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
712
|
+
&--outline:focus-within::after,
|
|
713
|
+
&--outline-active::after {
|
|
714
|
+
opacity: 1;
|
|
715
|
+
}
|
|
705
716
|
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
717
|
+
&--outline-left {
|
|
718
|
+
$distance: calc(
|
|
719
|
+
#{icon.get-var(size)} +
|
|
720
|
+
#{$text-field-outlined-padding +
|
|
721
|
+
$text-field-spacing}
|
|
722
|
+
);
|
|
712
723
|
|
|
713
|
-
|
|
714
|
-
|
|
724
|
+
@include set-var(text-field-padding-left, $distance);
|
|
725
|
+
}
|
|
715
726
|
|
|
716
|
-
|
|
717
|
-
|
|
727
|
+
&--outline-right {
|
|
728
|
+
$distance: calc(#{icon.get-var(size)} + #{$text-field-spacing * 2});
|
|
718
729
|
|
|
719
|
-
|
|
730
|
+
@include set-var(text-field-padding-right, $distance);
|
|
731
|
+
}
|
|
720
732
|
}
|
|
721
|
-
}
|
|
722
733
|
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
@include set-var(text-field-padding-right, $text-field-filled-padding);
|
|
727
|
-
@include set-var(label-left-offset, $text-field-filled-padding);
|
|
728
|
-
@include use-var(background-color, text-field-filled-color);
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
// the filled theme uses the same styles as underline
|
|
733
|
-
@if not
|
|
734
|
-
$disable-text-field-underlined-theme or not
|
|
735
|
-
$disable-text-field-filled-theme
|
|
736
|
-
{
|
|
737
|
-
&--underline {
|
|
738
|
-
@include use-var(border-color, text-field-border-color);
|
|
739
|
-
|
|
740
|
-
border-bottom-style: solid;
|
|
741
|
-
border-bottom-width: $text-field-border-width;
|
|
742
|
-
|
|
743
|
-
@if $text-field-underlined-padding {
|
|
744
|
-
@include set-var(
|
|
745
|
-
text-field-padding-left,
|
|
746
|
-
$text-field-underlined-padding
|
|
747
|
-
);
|
|
734
|
+
@if not $disable-text-field-filled-theme {
|
|
735
|
+
&--filled {
|
|
736
|
+
@include set-var(text-field-padding-left, $text-field-filled-padding);
|
|
748
737
|
@include set-var(
|
|
749
738
|
text-field-padding-right,
|
|
750
|
-
$text-field-
|
|
739
|
+
$text-field-filled-padding
|
|
751
740
|
);
|
|
741
|
+
@include use-var(background-color, text-field-filled-color);
|
|
752
742
|
}
|
|
743
|
+
}
|
|
753
744
|
|
|
754
|
-
|
|
755
|
-
|
|
745
|
+
// the filled theme uses the same styles as underline
|
|
746
|
+
@if not
|
|
747
|
+
$disable-text-field-underlined-theme or not
|
|
748
|
+
$disable-text-field-filled-theme
|
|
749
|
+
{
|
|
750
|
+
&--underline {
|
|
751
|
+
@include use-var(border-color, text-field-border-color);
|
|
756
752
|
|
|
757
|
-
bottom:
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
753
|
+
border-bottom-style: solid;
|
|
754
|
+
border-bottom-width: $text-field-border-width;
|
|
755
|
+
|
|
756
|
+
@if $text-field-underlined-padding {
|
|
757
|
+
@include set-var(
|
|
758
|
+
text-field-padding-left,
|
|
759
|
+
$text-field-underlined-padding
|
|
760
|
+
);
|
|
761
|
+
@include set-var(
|
|
762
|
+
text-field-padding-right,
|
|
763
|
+
$text-field-underlined-padding
|
|
764
|
+
);
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
&::after {
|
|
768
|
+
@include use-var(background-color, focus-color);
|
|
769
|
+
|
|
770
|
+
bottom: -$text-field-border-width;
|
|
771
|
+
content: "";
|
|
772
|
+
height: $text-field-border-width-active;
|
|
773
|
+
left: 0;
|
|
774
|
+
position: absolute;
|
|
775
|
+
right: 0;
|
|
776
|
+
transform: scale(0);
|
|
777
|
+
transition: transform
|
|
778
|
+
transition.$linear-duration
|
|
779
|
+
transition.$linear-timing-function;
|
|
780
|
+
z-index: 1;
|
|
781
|
+
}
|
|
768
782
|
}
|
|
769
|
-
}
|
|
770
783
|
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
784
|
+
@if $text-field-underlined-placeholder-height {
|
|
785
|
+
&--underline-placeholder {
|
|
786
|
+
@include set-var(
|
|
787
|
+
text-field-padding-top,
|
|
788
|
+
$text-field-underlined-placeholder-addon-padding-top
|
|
789
|
+
);
|
|
790
|
+
height: $text-field-underlined-placeholder-height;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
&--underline-placeholder-only {
|
|
794
|
+
@include set-var(
|
|
795
|
+
text-field-padding-top,
|
|
796
|
+
$text-field-underlined-placeholder-padding-top
|
|
797
|
+
);
|
|
798
|
+
}
|
|
778
799
|
}
|
|
779
800
|
|
|
780
|
-
&--underline-
|
|
801
|
+
&--underline-labelled {
|
|
781
802
|
@include set-var(
|
|
782
803
|
text-field-padding-top,
|
|
783
|
-
$text-field-underlined-
|
|
804
|
+
$text-field-underlined-label-padding-top
|
|
784
805
|
);
|
|
806
|
+
@include set-var(addon-margin-top, $text-field-addon-margin);
|
|
785
807
|
}
|
|
786
|
-
}
|
|
787
808
|
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
);
|
|
793
|
-
@include set-var(addon-margin-top, $text-field-addon-margin);
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
@if not $disable-text-field-underline-left {
|
|
797
|
-
&--underline-left::after {
|
|
798
|
-
transform-origin: left;
|
|
809
|
+
@if not $disable-text-field-underline-left {
|
|
810
|
+
&--underline-left::after {
|
|
811
|
+
transform-origin: left;
|
|
812
|
+
}
|
|
799
813
|
}
|
|
800
|
-
}
|
|
801
814
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
815
|
+
@if not $disable-text-field-underline-center {
|
|
816
|
+
&--underline-center::after {
|
|
817
|
+
transform-origin: center;
|
|
818
|
+
}
|
|
805
819
|
}
|
|
806
|
-
}
|
|
807
820
|
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
821
|
+
@if not $disable-text-field-underline-right {
|
|
822
|
+
&--underline-right::after {
|
|
823
|
+
transform-origin: right;
|
|
824
|
+
}
|
|
811
825
|
}
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
&:focus-within::after,
|
|
815
|
-
&--underline-active::after {
|
|
816
|
-
transform: scale(1);
|
|
817
|
-
}
|
|
818
826
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
$addon-offset: "#{$addon-offset} + #{$text-field-underlined-padding}";
|
|
827
|
+
&:focus-within::after,
|
|
828
|
+
&--underline-active::after {
|
|
829
|
+
transform: scale(1);
|
|
823
830
|
}
|
|
824
831
|
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
832
|
+
@if not $disable-text-field-addon {
|
|
833
|
+
$addon-offset: "#{icon.get-var(size)} + #{$text-field-underlined-label-left-offset * 2}";
|
|
834
|
+
@if $text-field-underlined-padding {
|
|
835
|
+
$addon-offset: "#{$addon-offset} + #{$text-field-underlined-padding}";
|
|
836
|
+
}
|
|
828
837
|
|
|
829
|
-
|
|
830
|
-
|
|
838
|
+
&--underline-left-addon {
|
|
839
|
+
@include set-var(text-field-padding-left, calc(#{$addon-offset}));
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
&--underline-right-addon {
|
|
843
|
+
@include set-var(text-field-padding-right, calc(#{$addon-offset}));
|
|
844
|
+
}
|
|
831
845
|
}
|
|
832
846
|
}
|
|
833
847
|
}
|
|
@@ -857,1054 +871,1080 @@ $variables: (
|
|
|
857
871
|
}
|
|
858
872
|
}
|
|
859
873
|
|
|
860
|
-
@mixin text-field-styles {
|
|
861
|
-
.
|
|
862
|
-
|
|
874
|
+
@mixin text-field-styles($disable-layer: false) {
|
|
875
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
876
|
+
.rmd-text-field {
|
|
877
|
+
@include _text-field-base-styles;
|
|
863
878
|
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
879
|
+
@if $text-field-color-min-width {
|
|
880
|
+
&[type="color"] {
|
|
881
|
+
min-width: $text-field-color-min-width;
|
|
882
|
+
}
|
|
867
883
|
}
|
|
868
|
-
}
|
|
869
884
|
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
885
|
+
&::placeholder {
|
|
886
|
+
@if not $disable-placeholder-ellipsis {
|
|
887
|
+
@include typography.text-overflow;
|
|
888
|
+
}
|
|
874
889
|
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
890
|
+
@include theme.theme-use-var(color, text-secondary-color);
|
|
891
|
+
// want to gain the same font styles as the input/textarea itself,
|
|
892
|
+
// just apply different colors as needed instead. Can't just do font: inherit
|
|
893
|
+
// since it'll break the styles in firefox.
|
|
894
|
+
font-family: inherit;
|
|
895
|
+
font-size: inherit;
|
|
896
|
+
font-weight: inherit;
|
|
882
897
|
|
|
883
|
-
|
|
884
|
-
|
|
898
|
+
// fix firefox setting opacity to 0.54 by default
|
|
899
|
+
opacity: 1;
|
|
885
900
|
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
901
|
+
// Note: doesn't look like firefox applies css transitions to placeholder text?
|
|
902
|
+
transition: opacity transition.$linear-duration;
|
|
903
|
+
}
|
|
889
904
|
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
905
|
+
&[disabled]::placeholder {
|
|
906
|
+
color: inherit;
|
|
907
|
+
}
|
|
893
908
|
|
|
894
|
-
|
|
895
|
-
|
|
909
|
+
&--placeholder-hidden:not(:focus)::placeholder {
|
|
910
|
+
opacity: 0;
|
|
911
|
+
}
|
|
896
912
|
}
|
|
897
913
|
}
|
|
898
914
|
}
|
|
899
915
|
|
|
900
|
-
@mixin password-styles {
|
|
901
|
-
.
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
916
|
+
@mixin password-styles($disable-layer: false) {
|
|
917
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
918
|
+
.rmd-password {
|
|
919
|
+
@include set-var(
|
|
920
|
+
text-field-padding-right,
|
|
921
|
+
$password-visibility-toggle-spacing
|
|
922
|
+
);
|
|
906
923
|
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
924
|
+
&__input {
|
|
925
|
+
@include utils.auto-rtl(margin-right, button.get-var(icon-size));
|
|
926
|
+
}
|
|
910
927
|
|
|
911
|
-
|
|
912
|
-
|
|
928
|
+
&__toggle {
|
|
929
|
+
@include utils.auto-rtl(right, 0);
|
|
913
930
|
|
|
914
|
-
|
|
931
|
+
position: absolute;
|
|
932
|
+
}
|
|
915
933
|
}
|
|
916
934
|
}
|
|
917
935
|
}
|
|
918
936
|
|
|
919
|
-
@mixin textarea-container-styles {
|
|
920
|
-
.
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
height: auto;
|
|
924
|
-
max-width: 100%;
|
|
925
|
-
padding-top: calc(
|
|
926
|
-
#{get-var(text-field-padding-top)} + #{get-var(textarea-padding)}
|
|
927
|
-
);
|
|
928
|
-
|
|
929
|
-
&--cursor:hover {
|
|
930
|
-
// need to add this cursor back since the textarea container adds padding to
|
|
931
|
-
// itself instead of the textarea so it loses this cursor. the container
|
|
932
|
-
// element will still focus the textarea when clicked
|
|
933
|
-
cursor: text;
|
|
934
|
-
}
|
|
937
|
+
@mixin textarea-container-styles($disable-layer: false) {
|
|
938
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
939
|
+
.rmd-textarea-container {
|
|
940
|
+
@include set-var(addon-top, $textarea-addon-top);
|
|
935
941
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
@include set-var(textarea-padding, 0px);
|
|
942
|
-
@include set-var(
|
|
943
|
-
label-floating-top,
|
|
944
|
-
$text-field-underlined-label-padding-top
|
|
945
|
-
);
|
|
946
|
-
}
|
|
947
|
-
}
|
|
942
|
+
height: auto;
|
|
943
|
+
max-width: 100%;
|
|
944
|
+
padding-top: calc(
|
|
945
|
+
#{get-var(text-field-padding-top)} + #{get-var(textarea-padding)}
|
|
946
|
+
);
|
|
948
947
|
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
#{get-var(textarea-height)}
|
|
955
|
-
);
|
|
948
|
+
&--cursor:hover {
|
|
949
|
+
// need to add this cursor back since the textarea container adds padding to
|
|
950
|
+
// itself instead of the textarea so it loses this cursor. the container
|
|
951
|
+
// element will still focus the textarea when clicked
|
|
952
|
+
cursor: text;
|
|
956
953
|
}
|
|
957
954
|
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
955
|
+
@if not
|
|
956
|
+
$disable-text-field-filled-theme or not
|
|
957
|
+
$disable-text-field-underlined-theme
|
|
958
|
+
{
|
|
959
|
+
&--underline-labelled {
|
|
960
|
+
@include set-var(textarea-padding, 0px);
|
|
961
|
+
@include set-var(
|
|
962
|
+
label-floating-top,
|
|
963
|
+
$text-field-underlined-label-padding-top
|
|
964
|
+
);
|
|
965
|
+
}
|
|
962
966
|
}
|
|
963
967
|
|
|
964
|
-
|
|
965
|
-
height
|
|
966
|
-
|
|
968
|
+
@if not $disable-textarea-resizing-rows {
|
|
969
|
+
&--height {
|
|
970
|
+
height: calc(
|
|
971
|
+
#{get-var(text-field-padding-top)} +
|
|
972
|
+
#{get-var(textarea-padding)} +
|
|
973
|
+
#{get-var(textarea-height)}
|
|
974
|
+
);
|
|
975
|
+
}
|
|
967
976
|
|
|
968
977
|
&--animate {
|
|
969
978
|
transition: height
|
|
970
979
|
transition.$linear-duration
|
|
971
980
|
transition.$linear-timing-function;
|
|
972
981
|
}
|
|
982
|
+
|
|
983
|
+
&__inner {
|
|
984
|
+
height: get-var(textarea-height, 100%);
|
|
985
|
+
width: 100%;
|
|
986
|
+
|
|
987
|
+
&--animate {
|
|
988
|
+
transition: height
|
|
989
|
+
transition.$linear-duration
|
|
990
|
+
transition.$linear-timing-function;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
973
993
|
}
|
|
974
994
|
}
|
|
975
995
|
}
|
|
976
996
|
}
|
|
977
997
|
|
|
978
|
-
@mixin textarea-styles {
|
|
979
|
-
.
|
|
980
|
-
|
|
981
|
-
|
|
998
|
+
@mixin textarea-styles($disable-layer: false) {
|
|
999
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
1000
|
+
.rmd-textarea {
|
|
1001
|
+
@include set-var(text-field-padding-top, 0px);
|
|
1002
|
+
@include use-var(min-height, text-field-height);
|
|
982
1003
|
|
|
983
|
-
|
|
1004
|
+
height: get-var(textarea-height, 100%);
|
|
984
1005
|
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1006
|
+
@if not $disable-textarea-resize-horizontal {
|
|
1007
|
+
&--rh {
|
|
1008
|
+
resize: horizontal;
|
|
1009
|
+
}
|
|
988
1010
|
}
|
|
989
|
-
}
|
|
990
1011
|
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1012
|
+
@if not $disable-textarea-resize-vertical {
|
|
1013
|
+
&--rv {
|
|
1014
|
+
resize: vertical;
|
|
1015
|
+
}
|
|
994
1016
|
}
|
|
995
|
-
}
|
|
996
1017
|
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1018
|
+
&--rn {
|
|
1019
|
+
overflow: hidden;
|
|
1020
|
+
resize: none;
|
|
1021
|
+
}
|
|
1001
1022
|
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1023
|
+
// only want the textarea to be scrollable if there's a limit on the rows
|
|
1024
|
+
// since it'll flash the scrollbar on most OS during the height transition
|
|
1025
|
+
&--scrollable {
|
|
1026
|
+
overflow: auto;
|
|
1027
|
+
}
|
|
1007
1028
|
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1029
|
+
@if not $disable-textarea-resizing-mask {
|
|
1030
|
+
&--mask {
|
|
1031
|
+
height: auto;
|
|
1032
|
+
left: 0;
|
|
1033
|
+
opacity: 0;
|
|
1034
|
+
overflow: hidden;
|
|
1035
|
+
pointer-events: none;
|
|
1036
|
+
position: absolute;
|
|
1037
|
+
right: 0;
|
|
1038
|
+
z-index: -1;
|
|
1039
|
+
}
|
|
1018
1040
|
}
|
|
1019
1041
|
}
|
|
1020
1042
|
}
|
|
1021
1043
|
}
|
|
1022
1044
|
|
|
1023
|
-
@mixin select-styles {
|
|
1024
|
-
.
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
.rmd-select-value {
|
|
1029
|
-
@include _text-field-base-styles;
|
|
1030
|
-
|
|
1031
|
-
align-items: center;
|
|
1032
|
-
display: flex;
|
|
1033
|
-
gap: 0.5rem;
|
|
1034
|
-
position: absolute;
|
|
1035
|
-
white-space: nowrap;
|
|
1036
|
-
|
|
1037
|
-
&__v {
|
|
1038
|
-
@include typography.text-overflow;
|
|
1045
|
+
@mixin select-styles($disable-layer: false) {
|
|
1046
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
1047
|
+
.rmd-select-container {
|
|
1048
|
+
outline-style: none;
|
|
1039
1049
|
}
|
|
1040
|
-
}
|
|
1041
1050
|
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
pointer-events: none;
|
|
1045
|
-
|
|
1046
|
-
// ALl these additional overrides are provided so that the select will have
|
|
1047
|
-
// the same sizing as a text field with the same props provided.
|
|
1048
|
-
@if not $disable-text-field-underlined-theme {
|
|
1049
|
-
&--underline {
|
|
1050
|
-
@include utils.rtl {
|
|
1051
|
-
@include use-var(padding-right, text-field-padding-left);
|
|
1051
|
+
.rmd-select-value {
|
|
1052
|
+
@include _text-field-base-styles;
|
|
1052
1053
|
|
|
1053
|
-
|
|
1054
|
-
|
|
1054
|
+
align-items: center;
|
|
1055
|
+
display: flex;
|
|
1056
|
+
gap: 0.5rem;
|
|
1057
|
+
position: absolute;
|
|
1058
|
+
white-space: nowrap;
|
|
1055
1059
|
|
|
1056
|
-
|
|
1060
|
+
&__v {
|
|
1061
|
+
@include typography.text-overflow;
|
|
1057
1062
|
}
|
|
1058
1063
|
}
|
|
1059
1064
|
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
@include use-var(padding-right, text-field-padding-left);
|
|
1064
|
-
|
|
1065
|
-
padding-left: $text-field-outlined-padding;
|
|
1066
|
-
}
|
|
1065
|
+
.rmd-select {
|
|
1066
|
+
opacity: 0;
|
|
1067
|
+
pointer-events: none;
|
|
1067
1068
|
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1069
|
+
// ALl these additional overrides are provided so that the select will have
|
|
1070
|
+
// the same sizing as a text field with the same props provided.
|
|
1071
|
+
@if not $disable-text-field-underlined-theme {
|
|
1072
|
+
&--underline {
|
|
1073
|
+
@include utils.rtl {
|
|
1074
|
+
@include use-var(padding-right, text-field-padding-left);
|
|
1071
1075
|
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
@include utils.rtl {
|
|
1075
|
-
@include use-var(padding-right, text-field-padding-left);
|
|
1076
|
+
padding-left: 0;
|
|
1077
|
+
}
|
|
1076
1078
|
|
|
1077
|
-
padding-
|
|
1079
|
+
padding-right: 0;
|
|
1078
1080
|
}
|
|
1079
|
-
|
|
1080
|
-
padding-right: $text-field-filled-padding;
|
|
1081
1081
|
}
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
1082
|
|
|
1086
|
-
@
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1083
|
+
@if not $disable-text-field-outlined-theme {
|
|
1084
|
+
&--outline {
|
|
1085
|
+
@include utils.rtl {
|
|
1086
|
+
@include use-var(padding-right, text-field-padding-left);
|
|
1087
|
+
|
|
1088
|
+
padding-left: $text-field-outlined-padding;
|
|
1089
|
+
}
|
|
1091
1090
|
|
|
1092
|
-
|
|
1091
|
+
padding-right: $text-field-outlined-padding;
|
|
1092
|
+
}
|
|
1093
1093
|
}
|
|
1094
1094
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1095
|
+
@if not $disable-text-field-filled-theme {
|
|
1096
|
+
&--filled {
|
|
1097
|
+
@include utils.rtl {
|
|
1098
|
+
@include use-var(padding-right, text-field-padding-left);
|
|
1097
1099
|
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
}
|
|
1100
|
+
padding-left: $text-field-filled-padding;
|
|
1101
|
+
}
|
|
1101
1102
|
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1103
|
+
padding-right: $text-field-filled-padding;
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1105
1106
|
}
|
|
1106
1107
|
}
|
|
1107
1108
|
}
|
|
1108
1109
|
|
|
1109
|
-
@mixin
|
|
1110
|
-
@
|
|
1111
|
-
.rmd-
|
|
1112
|
-
&--
|
|
1113
|
-
@include
|
|
1114
|
-
|
|
1110
|
+
@mixin option-styles($disable-layer: false) {
|
|
1111
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
1112
|
+
.rmd-option {
|
|
1113
|
+
&--icon {
|
|
1114
|
+
@include utils.rtl {
|
|
1115
|
+
@include list.use-var(padding-left, item-horizontal-padding);
|
|
1116
|
+
|
|
1117
|
+
padding-right: $option-padding-left;
|
|
1118
|
+
}
|
|
1115
1119
|
|
|
1116
|
-
|
|
1120
|
+
padding-left: $option-padding-left;
|
|
1117
1121
|
}
|
|
1118
1122
|
|
|
1119
|
-
&--
|
|
1120
|
-
|
|
1123
|
+
&--selected {
|
|
1124
|
+
@include utils.map-to-styles($option-selected-styles);
|
|
1121
1125
|
}
|
|
1122
1126
|
|
|
1123
|
-
|
|
1124
|
-
$
|
|
1125
|
-
$
|
|
1126
|
-
{
|
|
1127
|
-
&--underline {
|
|
1128
|
-
@include set-var(text-field-padding-top, 0);
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
&--underline-padded {
|
|
1132
|
-
padding-top: $native-select-multiple-underline-padding;
|
|
1133
|
-
}
|
|
1127
|
+
&__icon {
|
|
1128
|
+
@include icon.set-var(spacing, $option-selected-icon-spacing);
|
|
1129
|
+
@include icon.set-var(size, $option-selected-icon-size);
|
|
1134
1130
|
}
|
|
1135
1131
|
}
|
|
1136
1132
|
}
|
|
1133
|
+
}
|
|
1137
1134
|
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
@
|
|
1135
|
+
@mixin native-select-styles($disable-layer: false) {
|
|
1136
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
1137
|
+
@if not $disable-native-select-multiple {
|
|
1138
|
+
.rmd-native-select-container {
|
|
1139
|
+
&--multi {
|
|
1140
|
+
@include set-var(addon-top, $native-select-addon-top);
|
|
1141
|
+
@include use-var(min-height, text-field-height);
|
|
1141
1142
|
|
|
1142
|
-
|
|
1143
|
+
height: auto;
|
|
1144
|
+
}
|
|
1143
1145
|
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1146
|
+
&--padded {
|
|
1147
|
+
padding-top: $native-select-multiple-padding;
|
|
1148
|
+
}
|
|
1149
1149
|
|
|
1150
|
-
@
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
}
|
|
1150
|
+
@if not
|
|
1151
|
+
$disable-text-field-filled-theme or not
|
|
1152
|
+
$disable-text-field-underlined-theme
|
|
1153
|
+
{
|
|
1154
|
+
&--underline {
|
|
1155
|
+
@include set-var(text-field-padding-top, 0);
|
|
1156
|
+
}
|
|
1158
1157
|
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
// Note: Can't use `:first-child` and `:last-child` since
|
|
1166
|
-
// password/autocomplete managers might add another element into the
|
|
1167
|
-
// `.rmd-text-field-container` which would prevent these styles from being
|
|
1168
|
-
// applied
|
|
1169
|
-
&--before {
|
|
1170
|
-
@include utils.auto-rtl(left, get-var(label-left-offset));
|
|
1158
|
+
&--underline-padded {
|
|
1159
|
+
padding-top: $native-select-multiple-underline-padding;
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1171
1163
|
}
|
|
1172
1164
|
|
|
1173
|
-
|
|
1174
|
-
@include
|
|
1175
|
-
|
|
1165
|
+
.rmd-native-select {
|
|
1166
|
+
@include _text-field-base-styles;
|
|
1167
|
+
@include typography.text-overflow;
|
|
1176
1168
|
|
|
1177
|
-
|
|
1178
|
-
pointer-events: none;
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1169
|
+
appearance: none;
|
|
1182
1170
|
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
inset: 0;
|
|
1187
|
-
margin: 0;
|
|
1188
|
-
opacity: 0;
|
|
1189
|
-
position: absolute;
|
|
1190
|
-
width: 100%;
|
|
1191
|
-
z-index: 1;
|
|
1192
|
-
|
|
1193
|
-
&:not(:disabled):hover {
|
|
1194
|
-
cursor: pointer;
|
|
1171
|
+
&[multiple] {
|
|
1172
|
+
overflow: auto;
|
|
1173
|
+
}
|
|
1195
1174
|
}
|
|
1196
1175
|
}
|
|
1197
1176
|
}
|
|
1198
1177
|
|
|
1199
|
-
@mixin
|
|
1200
|
-
.
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
),
|
|
1208
|
-
$keyboard-only-focus: utils.$disable-has-selectors or
|
|
1209
|
-
utils.$disable-focus-visible,
|
|
1210
|
-
$disabled-selector: "&--disabled",
|
|
1211
|
-
$higher-contrast: false
|
|
1212
|
-
);
|
|
1213
|
-
@include icon.set-var(color, currentcolor);
|
|
1214
|
-
|
|
1215
|
-
align-items: center;
|
|
1216
|
-
border-radius: $input-toggle-border-radius;
|
|
1217
|
-
display: inline-flex;
|
|
1218
|
-
flex-shrink: 0;
|
|
1219
|
-
justify-content: center;
|
|
1220
|
-
padding: $input-toggle-padding;
|
|
1221
|
-
|
|
1222
|
-
&--em {
|
|
1223
|
-
@include icon.set-var(size, 1em);
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
&--active {
|
|
1227
|
-
@include use-var(color, active-color);
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
@if $input-toggle-small-size {
|
|
1231
|
-
&--small {
|
|
1232
|
-
font-size: $input-toggle-small-size;
|
|
1178
|
+
@mixin text-field-addon-styles($disable-layer: false) {
|
|
1179
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
1180
|
+
.rmd-text-field-addon {
|
|
1181
|
+
@if not
|
|
1182
|
+
$disable-text-field-filled-theme or not
|
|
1183
|
+
$disable-text-field-underlined-theme
|
|
1184
|
+
{
|
|
1185
|
+
@include use-var(margin-top, addon-margin-top);
|
|
1233
1186
|
}
|
|
1234
|
-
}
|
|
1235
1187
|
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1188
|
+
// this makes it so that this container element is the same size as the
|
|
1189
|
+
// child (normally icons). without this, icons would have a height of 30.5px
|
|
1190
|
+
// and no longer be centered
|
|
1191
|
+
display: inline-flex;
|
|
1192
|
+
position: absolute;
|
|
1193
|
+
|
|
1194
|
+
// Note: Can't use `:first-child` and `:last-child` since
|
|
1195
|
+
// password/autocomplete managers might add another element into the
|
|
1196
|
+
// `.rmd-text-field-container` which would prevent these styles from being
|
|
1197
|
+
// applied
|
|
1198
|
+
&--before {
|
|
1199
|
+
@include utils.auto-rtl(left, get-var(label-left-offset));
|
|
1239
1200
|
}
|
|
1240
|
-
}
|
|
1241
1201
|
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
font-size: $input-toggle-normal-size;
|
|
1202
|
+
&--after {
|
|
1203
|
+
@include utils.auto-rtl(right, $text-field-spacing);
|
|
1245
1204
|
}
|
|
1246
|
-
}
|
|
1247
1205
|
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
font-size: $input-toggle-large-size;
|
|
1206
|
+
&--presentational {
|
|
1207
|
+
pointer-events: none;
|
|
1251
1208
|
}
|
|
1252
1209
|
}
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1253
1212
|
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
// make sure the error color applies to the icon when checked
|
|
1266
|
-
&:where(:not(.rmd-error-color)) #{$icon-color-selector} {
|
|
1267
|
-
@include use-var(color, active-color);
|
|
1268
|
-
}
|
|
1213
|
+
@mixin hidden-input-styles($disable-layer: false) {
|
|
1214
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
1215
|
+
.rmd-hidden-input {
|
|
1216
|
+
height: 100%;
|
|
1217
|
+
inset: 0;
|
|
1218
|
+
margin: 0;
|
|
1219
|
+
opacity: 0;
|
|
1220
|
+
position: absolute;
|
|
1221
|
+
width: 100%;
|
|
1222
|
+
z-index: 1;
|
|
1269
1223
|
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
.rmd-hidden-input:checked #{$unchecked-icon-selector},
|
|
1273
|
-
.rmd-hidden-input:not(:checked) #{$checked-icon-selector} {
|
|
1274
|
-
opacity: 0;
|
|
1275
|
-
position: absolute;
|
|
1276
|
-
}
|
|
1224
|
+
&:not(:disabled):hover {
|
|
1225
|
+
cursor: pointer;
|
|
1277
1226
|
}
|
|
1278
1227
|
}
|
|
1279
1228
|
}
|
|
1280
1229
|
}
|
|
1281
1230
|
|
|
1282
|
-
@mixin
|
|
1283
|
-
.
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1231
|
+
@mixin input-toggle-styles($disable-layer: false) {
|
|
1232
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
1233
|
+
.rmd-input-toggle {
|
|
1234
|
+
@include interaction.surface(
|
|
1235
|
+
$focus-selector:
|
|
1236
|
+
if(
|
|
1237
|
+
utils.$disable-has-selectors or utils.$disable-focus-visible,
|
|
1238
|
+
"&:focus-within",
|
|
1239
|
+
"&:has(:focus-visible)"
|
|
1240
|
+
),
|
|
1241
|
+
$keyboard-only-focus: utils.$disable-has-selectors or
|
|
1242
|
+
utils.$disable-focus-visible,
|
|
1243
|
+
$disabled-selector: "&--disabled",
|
|
1244
|
+
$higher-contrast: false
|
|
1245
|
+
);
|
|
1246
|
+
@include icon.set-var(color, currentcolor);
|
|
1289
1247
|
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1248
|
+
align-items: center;
|
|
1249
|
+
border-radius: $input-toggle-border-radius;
|
|
1250
|
+
display: inline-flex;
|
|
1251
|
+
flex-shrink: 0;
|
|
1252
|
+
justify-content: center;
|
|
1253
|
+
padding: $input-toggle-padding;
|
|
1294
1254
|
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
@include utils.keyboard-only {
|
|
1298
|
-
&:focus + .rmd-switch__ball::before {
|
|
1299
|
-
@include interaction.focus-styles;
|
|
1300
|
-
}
|
|
1301
|
-
}
|
|
1302
|
-
} @else {
|
|
1303
|
-
&:focus-visible + .rmd-switch__ball::before {
|
|
1304
|
-
@include interaction.focus-styles;
|
|
1305
|
-
}
|
|
1255
|
+
&--em {
|
|
1256
|
+
@include icon.set-var(size, 1em);
|
|
1306
1257
|
}
|
|
1307
1258
|
|
|
1308
|
-
|
|
1309
|
-
|
|
1259
|
+
&--active {
|
|
1260
|
+
@include use-var(color, active-color);
|
|
1261
|
+
}
|
|
1310
1262
|
|
|
1311
|
-
|
|
1312
|
-
|
|
1263
|
+
@if $input-toggle-small-size {
|
|
1264
|
+
&--small {
|
|
1265
|
+
font-size: $input-toggle-small-size;
|
|
1313
1266
|
}
|
|
1314
1267
|
}
|
|
1315
|
-
}
|
|
1316
1268
|
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
$switch-circular-progress-width
|
|
1322
|
-
);
|
|
1323
|
-
@include progress.set-var(
|
|
1324
|
-
circular-size,
|
|
1325
|
-
$switch-circular-progress-size
|
|
1326
|
-
);
|
|
1327
|
-
}
|
|
1328
|
-
@if not $disable-switch-icon {
|
|
1329
|
-
@include icon.set-var(size, $switch-icon-size);
|
|
1269
|
+
@if $input-toggle-dense-size {
|
|
1270
|
+
&--dense {
|
|
1271
|
+
font-size: $input-toggle-dense-size;
|
|
1272
|
+
}
|
|
1330
1273
|
}
|
|
1331
|
-
@include use-var(background-color, switch-track-background-color);
|
|
1332
1274
|
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
transition.$linear-timing-function;
|
|
1338
|
-
width: $switch-track-width;
|
|
1339
|
-
|
|
1340
|
-
&--disabled {
|
|
1341
|
-
opacity: $switch-disabled-opacity;
|
|
1275
|
+
@if $input-toggle-normal-size {
|
|
1276
|
+
&--normal {
|
|
1277
|
+
font-size: $input-toggle-normal-size;
|
|
1278
|
+
}
|
|
1342
1279
|
}
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
&__ball {
|
|
1346
|
-
// The focus and disabled states are handled by the `.rmd-switch__input`'s
|
|
1347
|
-
// :focus and :disabled' states instead.
|
|
1348
|
-
@include interaction.surface(
|
|
1349
|
-
$focus-selector: null,
|
|
1350
|
-
$disabled-selector: null,
|
|
1351
|
-
$clickable: false
|
|
1352
|
-
);
|
|
1353
|
-
@include utils.auto-rtl(left, calc(-50% + #{$switch-ball-offset}));
|
|
1354
1280
|
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
justify-content: center;
|
|
1360
|
-
top: calc(-50% - #{$switch-ball-size - $switch-track-height});
|
|
1361
|
-
transition-duration: transition.$linear-duration;
|
|
1362
|
-
transition-property: background-color, transform;
|
|
1363
|
-
transition-timing-function: transition.$linear-timing-function;
|
|
1364
|
-
width: $switch-ball-size * 2;
|
|
1365
|
-
z-index: 1;
|
|
1366
|
-
|
|
1367
|
-
&::after {
|
|
1368
|
-
@include use-var(background-color, switch-ball-background-color);
|
|
1369
|
-
|
|
1370
|
-
border-radius: inherit;
|
|
1371
|
-
box-shadow: box-shadows.box-shadow(1);
|
|
1372
|
-
content: "";
|
|
1373
|
-
height: $switch-ball-size;
|
|
1374
|
-
left: 25%;
|
|
1375
|
-
pointer-events: none;
|
|
1376
|
-
position: absolute;
|
|
1377
|
-
top: 25%;
|
|
1378
|
-
width: $switch-ball-size;
|
|
1379
|
-
z-index: 0;
|
|
1281
|
+
@if $input-toggle-large-size {
|
|
1282
|
+
&--large {
|
|
1283
|
+
font-size: $input-toggle-large-size;
|
|
1284
|
+
}
|
|
1380
1285
|
}
|
|
1381
1286
|
|
|
1382
|
-
$
|
|
1383
|
-
|
|
1287
|
+
@if not $disable-uncontrolled-input-toggles {
|
|
1288
|
+
&--uncontrolled {
|
|
1289
|
+
$icon-color-selector: ".rmd-hidden-input:where(:checked:not(:disabled)) ~ .rmd-icon";
|
|
1290
|
+
$unchecked-icon-selector: "~ :nth-child(-n + 1 of .rmd-icon)";
|
|
1291
|
+
$checked-icon-selector: "~ :nth-child(n + 2 of .rmd-icon)";
|
|
1292
|
+
// make sure the active color from the label also applies to the icon when
|
|
1293
|
+
// checked
|
|
1294
|
+
.rmd-label--active & #{$icon-color-selector} {
|
|
1295
|
+
@include use-var(color, focus-color);
|
|
1296
|
+
}
|
|
1384
1297
|
|
|
1385
|
-
|
|
1386
|
-
|
|
1298
|
+
// make sure the error color applies to the icon when checked
|
|
1299
|
+
&:where(:not(.rmd-error-color)) #{$icon-color-selector} {
|
|
1300
|
+
@include use-var(color, active-color);
|
|
1301
|
+
}
|
|
1387
1302
|
|
|
1388
|
-
|
|
1389
|
-
|
|
1303
|
+
// when the input is checked, hide the first icon (unchecked state)
|
|
1304
|
+
// when the input is not checked, hide the second icon (checked state)
|
|
1305
|
+
.rmd-hidden-input:checked #{$unchecked-icon-selector},
|
|
1306
|
+
.rmd-hidden-input:not(:checked) #{$checked-icon-selector} {
|
|
1307
|
+
opacity: 0;
|
|
1308
|
+
position: absolute;
|
|
1309
|
+
}
|
|
1390
1310
|
}
|
|
1391
|
-
@include set-var(switch-ball-background-color, get-var(active-color));
|
|
1392
|
-
|
|
1393
|
-
transform: translateX($offset);
|
|
1394
1311
|
}
|
|
1395
1312
|
}
|
|
1396
1313
|
}
|
|
1397
1314
|
}
|
|
1398
1315
|
|
|
1399
|
-
@mixin
|
|
1400
|
-
.
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
// remove the padding since the icon isn't the click target anymore.
|
|
1404
|
-
padding: 0;
|
|
1316
|
+
@mixin switch-styles($disable-layer: false) {
|
|
1317
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
1318
|
+
.rmd-switch {
|
|
1319
|
+
padding: $switch-track-vertical-padding $switch-track-horizontal-padding;
|
|
1405
1320
|
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
content: none;
|
|
1409
|
-
}
|
|
1321
|
+
&--clickable:hover {
|
|
1322
|
+
cursor: pointer;
|
|
1410
1323
|
}
|
|
1411
|
-
}
|
|
1412
1324
|
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
&__track {
|
|
1417
|
-
@include icon.set-var(size, $switch-track-width);
|
|
1325
|
+
&--current-color,
|
|
1326
|
+
&--current-color .rmd-switch__input:checked + .rmd-switch__ball {
|
|
1327
|
+
@include set-var(switch-ball-background-color, currentcolor);
|
|
1418
1328
|
}
|
|
1419
1329
|
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1330
|
+
&__input {
|
|
1331
|
+
@if utils.$disable-focus-visible {
|
|
1332
|
+
@include utils.keyboard-only {
|
|
1333
|
+
&:focus + .rmd-switch__ball::before {
|
|
1334
|
+
@include interaction.focus-styles;
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
} @else {
|
|
1338
|
+
&:focus-visible + .rmd-switch__ball::before {
|
|
1339
|
+
@include interaction.focus-styles;
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1425
1342
|
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
width: $switch-ball-size;
|
|
1343
|
+
&:disabled + .rmd-switch__ball {
|
|
1344
|
+
cursor: auto;
|
|
1429
1345
|
|
|
1430
|
-
|
|
1431
|
-
|
|
1346
|
+
&:hover::before {
|
|
1347
|
+
@include interaction.set-var(background-color, transparent);
|
|
1348
|
+
}
|
|
1432
1349
|
}
|
|
1350
|
+
}
|
|
1433
1351
|
|
|
1434
|
-
|
|
1435
|
-
|
|
1352
|
+
&__track {
|
|
1353
|
+
@if not $disable-switch-circular-progress {
|
|
1354
|
+
@include progress.set-var(
|
|
1355
|
+
circular-stroke-width,
|
|
1356
|
+
$switch-circular-progress-width
|
|
1357
|
+
);
|
|
1358
|
+
@include progress.set-var(
|
|
1359
|
+
circular-size,
|
|
1360
|
+
$switch-circular-progress-size
|
|
1361
|
+
);
|
|
1436
1362
|
}
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1363
|
+
@if not $disable-switch-icon {
|
|
1364
|
+
@include icon.set-var(size, $switch-icon-size);
|
|
1365
|
+
}
|
|
1366
|
+
@include use-var(background-color, switch-track-background-color);
|
|
1441
1367
|
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
@include icon.set-var(spacing, $slider-container-addon-spacing);
|
|
1449
|
-
}
|
|
1368
|
+
border-radius: $switch-track-border-radius;
|
|
1369
|
+
height: $switch-track-height;
|
|
1370
|
+
position: relative;
|
|
1371
|
+
transition: background-color transition.$linear-duration
|
|
1372
|
+
transition.$linear-timing-function;
|
|
1373
|
+
width: $switch-track-width;
|
|
1450
1374
|
|
|
1451
|
-
|
|
1375
|
+
&--disabled {
|
|
1376
|
+
opacity: $switch-disabled-opacity;
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1452
1379
|
|
|
1453
|
-
|
|
1380
|
+
&__ball {
|
|
1381
|
+
// The focus and disabled states are handled by the `.rmd-switch__input`'s
|
|
1382
|
+
// :focus and :disabled' states instead.
|
|
1383
|
+
@include interaction.surface(
|
|
1384
|
+
$focus-selector: null,
|
|
1385
|
+
$disabled-selector: null,
|
|
1386
|
+
$clickable: false
|
|
1387
|
+
);
|
|
1388
|
+
@include utils.auto-rtl(left, calc(-50% + #{$switch-ball-offset}));
|
|
1454
1389
|
|
|
1455
|
-
|
|
1456
|
-
|
|
1390
|
+
align-items: center;
|
|
1391
|
+
border-radius: $switch-ball-border-radius;
|
|
1457
1392
|
display: flex;
|
|
1458
|
-
|
|
1459
|
-
|
|
1393
|
+
height: $switch-ball-size * 2;
|
|
1394
|
+
justify-content: center;
|
|
1395
|
+
top: calc(-50% - #{$switch-ball-size - $switch-track-height});
|
|
1396
|
+
transition-duration: transition.$linear-duration;
|
|
1397
|
+
transition-property: background-color, transform;
|
|
1398
|
+
transition-timing-function: transition.$linear-timing-function;
|
|
1399
|
+
width: $switch-ball-size * 2;
|
|
1400
|
+
z-index: 1;
|
|
1460
1401
|
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
}
|
|
1402
|
+
&::after {
|
|
1403
|
+
@include use-var(background-color, switch-ball-background-color);
|
|
1464
1404
|
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1405
|
+
border-radius: inherit;
|
|
1406
|
+
box-shadow: box-shadows.box-shadow(1);
|
|
1407
|
+
content: "";
|
|
1408
|
+
height: $switch-ball-size;
|
|
1409
|
+
left: 25%;
|
|
1410
|
+
pointer-events: none;
|
|
1411
|
+
position: absolute;
|
|
1412
|
+
top: 25%;
|
|
1413
|
+
width: $switch-ball-size;
|
|
1414
|
+
z-index: 0;
|
|
1415
|
+
}
|
|
1469
1416
|
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
display: inline-flex;
|
|
1473
|
-
flex-direction: column-reverse;
|
|
1474
|
-
}
|
|
1417
|
+
$active-selector: ".rmd-switch__input:checked + &" +
|
|
1418
|
+
if($disable-menu-item-switch, "", ", &--active");
|
|
1475
1419
|
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
}
|
|
1420
|
+
#{$active-selector} {
|
|
1421
|
+
$offset: $switch-ball-size + $switch-ball-offset;
|
|
1479
1422
|
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
.rmd-slider-track {
|
|
1487
|
-
position: relative;
|
|
1423
|
+
@include utils.rtl {
|
|
1424
|
+
transform: translateX(-$offset);
|
|
1425
|
+
}
|
|
1426
|
+
@include set-var(switch-ball-background-color, get-var(active-color));
|
|
1488
1427
|
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
@if $slider-track-color {
|
|
1492
|
-
@include use-var(background-color, slider-color);
|
|
1428
|
+
transform: translateX($offset);
|
|
1429
|
+
}
|
|
1493
1430
|
}
|
|
1494
|
-
|
|
1495
|
-
content: "";
|
|
1496
|
-
pointer-events: none;
|
|
1497
|
-
position: absolute;
|
|
1498
1431
|
}
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1499
1434
|
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
}
|
|
1435
|
+
@mixin menu-item-input-toggle-styles($disable-layer: false) {
|
|
1436
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
1437
|
+
.rmd-menu-item-input-toggle {
|
|
1438
|
+
@if not $disable-menu-item-radio or not $disable-menu-item-switch {
|
|
1439
|
+
&__icon {
|
|
1440
|
+
// remove the padding since the icon isn't the click target anymore.
|
|
1441
|
+
padding: 0;
|
|
1508
1442
|
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1443
|
+
// disable the hover states since it's handled by the ListItem instead
|
|
1444
|
+
&::before {
|
|
1445
|
+
content: none;
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1512
1448
|
}
|
|
1513
1449
|
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1450
|
+
@if not $disable-menu-item-switch {
|
|
1451
|
+
// this makes it so that the spacing between the switch and the text
|
|
1452
|
+
// aligns with other menu items/icons
|
|
1453
|
+
&__track {
|
|
1454
|
+
@include icon.set-var(size, $switch-track-width);
|
|
1455
|
+
}
|
|
1517
1456
|
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1457
|
+
// decrease the ball size and remove the hover states since it's handled
|
|
1458
|
+
// by the ListItem instead. without decreasing the ball size, horizontal
|
|
1459
|
+
// scrollbars will appear when the switch is checked
|
|
1460
|
+
&__ball {
|
|
1461
|
+
@include utils.auto-rtl(left, -$switch-ball-offset);
|
|
1521
1462
|
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
}
|
|
1463
|
+
height: $switch-ball-size;
|
|
1464
|
+
top: calc(50% - $switch-ball-size * 0.5);
|
|
1465
|
+
width: $switch-ball-size;
|
|
1526
1466
|
|
|
1527
|
-
@if $slider-track-color {
|
|
1528
|
-
&--disabled {
|
|
1529
|
-
@include set-var(slider-color, $slider-track-disabled-color);
|
|
1530
|
-
|
|
1531
|
-
@if $slider-track-inactive-opacity {
|
|
1532
1467
|
&::before {
|
|
1533
|
-
|
|
1468
|
+
content: none;
|
|
1534
1469
|
}
|
|
1535
|
-
}
|
|
1536
1470
|
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
@if $slider-track-active-opacity {
|
|
1540
|
-
opacity: 1;
|
|
1471
|
+
&::after {
|
|
1472
|
+
inset: 0;
|
|
1541
1473
|
}
|
|
1542
1474
|
}
|
|
1543
1475
|
}
|
|
1544
1476
|
}
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1545
1479
|
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1480
|
+
@mixin slider-styles($disable-layer: false) {
|
|
1481
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
1482
|
+
.rmd-slider-container {
|
|
1483
|
+
@if $slider-container-addon-spacing and
|
|
1484
|
+
$slider-container-addon-spacing !=
|
|
1485
|
+
icon.$spacing
|
|
1486
|
+
{
|
|
1487
|
+
@include icon.set-var(spacing, $slider-container-addon-spacing);
|
|
1488
|
+
}
|
|
1549
1489
|
|
|
1550
|
-
|
|
1551
|
-
display: flex;
|
|
1552
|
-
width: 100%;
|
|
1490
|
+
@include icon.use-var(gap, spacing);
|
|
1553
1491
|
|
|
1554
|
-
|
|
1555
|
-
@include use-var(height, slider-inactive-size);
|
|
1492
|
+
align-items: center;
|
|
1556
1493
|
|
|
1494
|
+
@if not $disable-horizontal-slider {
|
|
1495
|
+
&--h {
|
|
1496
|
+
display: flex;
|
|
1557
1497
|
width: 100%;
|
|
1558
1498
|
}
|
|
1559
1499
|
|
|
1560
|
-
|
|
1561
|
-
|
|
1500
|
+
&--pad-left {
|
|
1501
|
+
padding-left: $slider-container-padding;
|
|
1562
1502
|
}
|
|
1563
|
-
}
|
|
1564
1503
|
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
transition-property: max-width;
|
|
1570
|
-
width: 100%;
|
|
1504
|
+
&--pad-right {
|
|
1505
|
+
padding-right: $slider-container-padding;
|
|
1506
|
+
}
|
|
1571
1507
|
}
|
|
1572
1508
|
|
|
1573
|
-
@if not $disable-
|
|
1574
|
-
&--
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1509
|
+
@if not $disable-vertical-slider {
|
|
1510
|
+
&--v {
|
|
1511
|
+
display: inline-flex;
|
|
1512
|
+
flex-direction: column-reverse;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
&--pad-top {
|
|
1516
|
+
padding-top: $slider-container-padding;
|
|
1517
|
+
}
|
|
1579
1518
|
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
transition-property: left, right;
|
|
1583
|
-
will-change: left, right;
|
|
1519
|
+
&--pad-bottom {
|
|
1520
|
+
padding-bottom: $slider-container-padding;
|
|
1584
1521
|
}
|
|
1585
1522
|
}
|
|
1586
1523
|
}
|
|
1587
1524
|
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
@include use-var(height, slider-vertical-size);
|
|
1591
|
-
@include use-var(width, slider-size);
|
|
1525
|
+
.rmd-slider-track {
|
|
1526
|
+
position: relative;
|
|
1592
1527
|
|
|
1593
|
-
|
|
1594
|
-
|
|
1528
|
+
&::before,
|
|
1529
|
+
&::after {
|
|
1530
|
+
@if $slider-track-color {
|
|
1531
|
+
@include use-var(background-color, slider-color);
|
|
1532
|
+
}
|
|
1595
1533
|
|
|
1596
|
-
|
|
1597
|
-
|
|
1534
|
+
content: "";
|
|
1535
|
+
pointer-events: none;
|
|
1536
|
+
position: absolute;
|
|
1537
|
+
}
|
|
1598
1538
|
|
|
1599
|
-
|
|
1539
|
+
&::before {
|
|
1540
|
+
@if not $slider-track-color {
|
|
1541
|
+
@include use-var(background-color, slider-inactive-color);
|
|
1600
1542
|
}
|
|
1601
1543
|
|
|
1602
|
-
|
|
1603
|
-
|
|
1544
|
+
opacity: $slider-track-inactive-opacity;
|
|
1545
|
+
z-index: $slider-track-inactive-z-index;
|
|
1546
|
+
}
|
|
1604
1547
|
|
|
1605
|
-
|
|
1548
|
+
&::after {
|
|
1549
|
+
@if not $slider-track-color {
|
|
1550
|
+
@include use-var(background-color, slider-active-color);
|
|
1606
1551
|
}
|
|
1552
|
+
|
|
1553
|
+
opacity: $slider-track-active-opacity;
|
|
1554
|
+
z-index: $slider-track-active-z-index;
|
|
1607
1555
|
}
|
|
1608
1556
|
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1557
|
+
&--hoverable:hover {
|
|
1558
|
+
cursor: pointer;
|
|
1559
|
+
}
|
|
1612
1560
|
|
|
1613
|
-
|
|
1614
|
-
transition-
|
|
1561
|
+
&--animate::after {
|
|
1562
|
+
transition-duration: $slider-transition-duration;
|
|
1563
|
+
transition-timing-function: $slider-transition-timing-function;
|
|
1615
1564
|
}
|
|
1616
1565
|
|
|
1617
|
-
@if
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1566
|
+
@if $slider-track-color {
|
|
1567
|
+
&--disabled {
|
|
1568
|
+
@include set-var(slider-color, $slider-track-disabled-color);
|
|
1569
|
+
|
|
1570
|
+
@if $slider-track-inactive-opacity {
|
|
1571
|
+
&::before {
|
|
1572
|
+
opacity: 1;
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1621
1575
|
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1576
|
+
&::after {
|
|
1577
|
+
@include set-var(slider-active-size, 0px);
|
|
1578
|
+
@if $slider-track-active-opacity {
|
|
1579
|
+
opacity: 1;
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1625
1582
|
}
|
|
1626
1583
|
}
|
|
1627
|
-
}
|
|
1628
|
-
}
|
|
1629
1584
|
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
if($slider-track-color, slider-color, slider-active-color)
|
|
1634
|
-
);
|
|
1585
|
+
@if not $disable-horizontal-slider {
|
|
1586
|
+
&--h {
|
|
1587
|
+
@include use-var(height, slider-size);
|
|
1635
1588
|
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
position: absolute;
|
|
1640
|
-
width: $slider-thumb-size;
|
|
1641
|
-
z-index: $slider-thumb-z-index;
|
|
1589
|
+
align-items: center;
|
|
1590
|
+
display: flex;
|
|
1591
|
+
width: 100%;
|
|
1642
1592
|
|
|
1643
|
-
|
|
1644
|
-
|
|
1593
|
+
&::before {
|
|
1594
|
+
@include use-var(height, slider-inactive-size);
|
|
1645
1595
|
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
transition: transform $slider-transition-duration
|
|
1649
|
-
$slider-transition-timing-function;
|
|
1650
|
-
}
|
|
1596
|
+
width: 100%;
|
|
1597
|
+
}
|
|
1651
1598
|
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
transform: scale($slider-thumb-focus-scale);
|
|
1599
|
+
&::after {
|
|
1600
|
+
@include use-var(height, slider-active-size);
|
|
1601
|
+
}
|
|
1656
1602
|
}
|
|
1657
|
-
}
|
|
1658
|
-
} @else {
|
|
1659
|
-
&:focus-visible::after {
|
|
1660
|
-
transform: scale($slider-thumb-focus-scale);
|
|
1661
|
-
}
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
@include utils.mouse-hover(false) {
|
|
1665
|
-
&:hover::after,
|
|
1666
|
-
&--active::after,
|
|
1667
|
-
&--active:hover::after {
|
|
1668
|
-
transform: scale($slider-thumb-active-scale);
|
|
1669
|
-
}
|
|
1670
|
-
}
|
|
1671
1603
|
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
}
|
|
1604
|
+
&--h1::after {
|
|
1605
|
+
@include utils.auto-rtl(left, 0);
|
|
1606
|
+
@include use-var(max-width, slider-offset-1);
|
|
1676
1607
|
|
|
1677
|
-
|
|
1678
|
-
|
|
1608
|
+
transition-property: max-width;
|
|
1609
|
+
width: 100%;
|
|
1610
|
+
}
|
|
1679
1611
|
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1612
|
+
@if not $disable-range-slider {
|
|
1613
|
+
&--h2::after {
|
|
1614
|
+
@include utils.rtl {
|
|
1615
|
+
left: calc(100% - get-var(slider-offset-2));
|
|
1616
|
+
right: get-var(slider-offset-1);
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
left: get-var(slider-offset-1);
|
|
1620
|
+
right: calc(100% - get-var(slider-offset-2));
|
|
1621
|
+
transition-property: left, right;
|
|
1622
|
+
will-change: left, right;
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1683
1626
|
|
|
1684
|
-
|
|
1685
|
-
|
|
1627
|
+
@if not $disable-vertical-slider {
|
|
1628
|
+
&--v {
|
|
1629
|
+
@include use-var(height, slider-vertical-size);
|
|
1630
|
+
@include use-var(width, slider-size);
|
|
1686
1631
|
|
|
1687
|
-
|
|
1688
|
-
|
|
1632
|
+
display: inline-flex;
|
|
1633
|
+
justify-content: center;
|
|
1689
1634
|
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
@include utils.rtl {
|
|
1693
|
-
transform: translateX(50%);
|
|
1694
|
-
transition-property: right;
|
|
1695
|
-
}
|
|
1635
|
+
&::before {
|
|
1636
|
+
@include use-var(width, slider-inactive-size);
|
|
1696
1637
|
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
}
|
|
1638
|
+
height: 100%;
|
|
1639
|
+
}
|
|
1700
1640
|
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
}
|
|
1641
|
+
&::after {
|
|
1642
|
+
@include use-var(width, slider-active-size);
|
|
1704
1643
|
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
@include utils.auto-rtl(left, get-var(slider-offset-2));
|
|
1644
|
+
bottom: 0;
|
|
1645
|
+
}
|
|
1708
1646
|
}
|
|
1709
|
-
}
|
|
1710
1647
|
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1648
|
+
// one thumb track horizontal styles
|
|
1649
|
+
&--v1::after {
|
|
1650
|
+
@include use-var(max-height, slider-offset-1);
|
|
1651
|
+
|
|
1652
|
+
height: 100%;
|
|
1653
|
+
transition-property: max-height;
|
|
1714
1654
|
}
|
|
1715
1655
|
|
|
1716
|
-
|
|
1717
|
-
|
|
1656
|
+
@if not $disable-range-slider {
|
|
1657
|
+
// two thumb track horizontal styles
|
|
1658
|
+
&--v2::after {
|
|
1659
|
+
@include use-var(bottom, slider-offset-1);
|
|
1718
1660
|
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1661
|
+
top: calc(100% - #{get-var(slider-offset-2)});
|
|
1662
|
+
transition-property: bottom, top;
|
|
1663
|
+
will-change: bottom, top;
|
|
1664
|
+
}
|
|
1722
1665
|
}
|
|
1723
|
-
|
|
1724
|
-
transform: translateX(-50%) scale($slider-thumb-mask-scale);
|
|
1725
1666
|
}
|
|
1726
1667
|
}
|
|
1727
1668
|
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1669
|
+
.rmd-slider-thumb {
|
|
1670
|
+
@include use-var(
|
|
1671
|
+
background-color,
|
|
1672
|
+
if($slider-track-color, slider-color, slider-active-color)
|
|
1673
|
+
);
|
|
1674
|
+
|
|
1675
|
+
border-radius: $slider-thumb-border-radius;
|
|
1676
|
+
height: $slider-thumb-size;
|
|
1677
|
+
outline-style: none;
|
|
1678
|
+
position: absolute;
|
|
1679
|
+
width: $slider-thumb-size;
|
|
1680
|
+
z-index: $slider-thumb-z-index;
|
|
1681
|
+
|
|
1682
|
+
&::after {
|
|
1683
|
+
@include utils.pseudo-element($z-index: null);
|
|
1736
1684
|
|
|
1737
|
-
|
|
1738
|
-
|
|
1685
|
+
background-color: inherit;
|
|
1686
|
+
opacity: $slider-thumb-bubble-opacity;
|
|
1687
|
+
transition: transform $slider-transition-duration
|
|
1688
|
+
$slider-transition-timing-function;
|
|
1739
1689
|
}
|
|
1740
1690
|
|
|
1741
|
-
@if
|
|
1742
|
-
|
|
1743
|
-
|
|
1691
|
+
@if utils.$disable-focus-visible {
|
|
1692
|
+
@include utils.keyboard-only {
|
|
1693
|
+
&:focus::after {
|
|
1694
|
+
transform: scale($slider-thumb-focus-scale);
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
} @else {
|
|
1698
|
+
&:focus-visible::after {
|
|
1699
|
+
transform: scale($slider-thumb-focus-scale);
|
|
1744
1700
|
}
|
|
1745
1701
|
}
|
|
1746
1702
|
|
|
1747
|
-
|
|
1748
|
-
|
|
1703
|
+
@include utils.mouse-hover(false) {
|
|
1704
|
+
&:hover::after,
|
|
1705
|
+
&--active::after,
|
|
1706
|
+
&--active:hover::after {
|
|
1707
|
+
transform: scale($slider-thumb-active-scale);
|
|
1708
|
+
}
|
|
1749
1709
|
}
|
|
1750
1710
|
|
|
1751
|
-
&--
|
|
1752
|
-
|
|
1711
|
+
&--animate {
|
|
1712
|
+
transition-duration: $slider-transition-duration;
|
|
1713
|
+
transition-timing-function: $slider-transition-timing-function;
|
|
1753
1714
|
}
|
|
1754
|
-
}
|
|
1755
|
-
|
|
1756
|
-
&__input {
|
|
1757
|
-
appearance: none;
|
|
1758
|
-
height: 0;
|
|
1759
|
-
opacity: 0;
|
|
1760
|
-
pointer-events: none;
|
|
1761
|
-
width: 0;
|
|
1762
|
-
}
|
|
1763
|
-
}
|
|
1764
1715
|
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
opacity: 1;
|
|
1768
|
-
position: absolute;
|
|
1769
|
-
z-index: $slider-tooltip-z-index;
|
|
1716
|
+
&--disabled {
|
|
1717
|
+
background-color: $slider-thumb-disabled-color;
|
|
1770
1718
|
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
border: $slider-tooltip-caret-size solid transparent;
|
|
1774
|
-
content: "";
|
|
1775
|
-
position: absolute;
|
|
1719
|
+
// prevent hover effects like the "bubble"
|
|
1720
|
+
pointer-events: none;
|
|
1776
1721
|
}
|
|
1777
1722
|
|
|
1778
|
-
&--
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1723
|
+
&--mask {
|
|
1724
|
+
@include theme.theme-use-var(background-color);
|
|
1725
|
+
|
|
1726
|
+
border-radius: 0;
|
|
1782
1727
|
}
|
|
1783
1728
|
|
|
1784
1729
|
@if not $disable-horizontal-slider {
|
|
1785
1730
|
&--h {
|
|
1786
1731
|
@include utils.rtl {
|
|
1787
|
-
|
|
1732
|
+
transform: translateX(50%);
|
|
1733
|
+
transition-property: right;
|
|
1788
1734
|
}
|
|
1789
1735
|
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1736
|
+
transform: translateX(-50%);
|
|
1737
|
+
transition-property: left;
|
|
1738
|
+
}
|
|
1793
1739
|
|
|
1794
|
-
|
|
1795
|
-
|
|
1740
|
+
&--h1 {
|
|
1741
|
+
@include utils.auto-rtl(left, get-var(slider-offset-1));
|
|
1742
|
+
}
|
|
1796
1743
|
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1744
|
+
@if not $disable-range-slider {
|
|
1745
|
+
&--h2 {
|
|
1746
|
+
@include utils.auto-rtl(left, get-var(slider-offset-2));
|
|
1800
1747
|
}
|
|
1801
1748
|
}
|
|
1802
1749
|
|
|
1803
|
-
&--h
|
|
1804
|
-
@include
|
|
1750
|
+
&--disabled-h {
|
|
1751
|
+
@include utils.rtl {
|
|
1752
|
+
transform: translateX(50%) scale($slider-thumb-disabled-scale);
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
transform: translateX(-50%) scale($slider-thumb-disabled-scale);
|
|
1805
1756
|
}
|
|
1806
1757
|
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1758
|
+
&--mask-h {
|
|
1759
|
+
@include utils.rtl {
|
|
1760
|
+
transform: translateX(50%) scale($slider-thumb-mask-scale);
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
transform: translateX(-50%) scale($slider-thumb-mask-scale);
|
|
1811
1764
|
}
|
|
1812
1765
|
}
|
|
1813
1766
|
|
|
1814
1767
|
@if not $disable-vertical-slider {
|
|
1815
1768
|
&--v {
|
|
1816
|
-
//
|
|
1817
|
-
|
|
1818
|
-
|
|
1769
|
+
// want the thumb to be aligned so that the center is at the current value.
|
|
1770
|
+
// without this transformation, the thumb's bottom side would be aligned
|
|
1771
|
+
// with the current value
|
|
1772
|
+
transform: translateY(50%);
|
|
1773
|
+
transition-property: bottom;
|
|
1774
|
+
}
|
|
1819
1775
|
|
|
1820
|
-
|
|
1821
|
-
|
|
1776
|
+
&--v1 {
|
|
1777
|
+
@include use-var(bottom, slider-offset-1);
|
|
1778
|
+
}
|
|
1822
1779
|
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1780
|
+
@if not $disable-range-slider {
|
|
1781
|
+
&--v2 {
|
|
1782
|
+
@include use-var(bottom, slider-offset-2);
|
|
1826
1783
|
}
|
|
1827
1784
|
}
|
|
1828
1785
|
|
|
1829
|
-
&--v
|
|
1830
|
-
transform: translateY(50%) scale(
|
|
1786
|
+
&--disabled-v {
|
|
1787
|
+
transform: translateY(50%) scale($slider-thumb-disabled-scale);
|
|
1831
1788
|
}
|
|
1832
1789
|
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
&--v-on {
|
|
1836
|
-
transform: translateY(50%) scale(1);
|
|
1790
|
+
&--mask-v {
|
|
1791
|
+
transform: translateY(50%) scale($slider-thumb-mask-scale);
|
|
1837
1792
|
}
|
|
1838
1793
|
}
|
|
1794
|
+
|
|
1795
|
+
&__input {
|
|
1796
|
+
appearance: none;
|
|
1797
|
+
height: 0;
|
|
1798
|
+
opacity: 0;
|
|
1799
|
+
pointer-events: none;
|
|
1800
|
+
width: 0;
|
|
1801
|
+
}
|
|
1839
1802
|
}
|
|
1840
|
-
}
|
|
1841
1803
|
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1804
|
+
@if not $disable-discrete-slider {
|
|
1805
|
+
.rmd-slider-tooltip {
|
|
1806
|
+
opacity: 1;
|
|
1807
|
+
position: absolute;
|
|
1808
|
+
z-index: $slider-tooltip-z-index;
|
|
1846
1809
|
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1810
|
+
// this is used to generate the triangle
|
|
1811
|
+
&::after {
|
|
1812
|
+
border: $slider-tooltip-caret-size solid transparent;
|
|
1813
|
+
content: "";
|
|
1814
|
+
position: absolute;
|
|
1815
|
+
}
|
|
1850
1816
|
|
|
1851
|
-
|
|
1852
|
-
|
|
1817
|
+
&--animate {
|
|
1818
|
+
transition: transform
|
|
1819
|
+
$slider-transition-duration
|
|
1820
|
+
$slider-transition-timing-function;
|
|
1821
|
+
}
|
|
1853
1822
|
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1823
|
+
@if not $disable-horizontal-slider {
|
|
1824
|
+
&--h {
|
|
1825
|
+
@include utils.rtl {
|
|
1826
|
+
@include set-var(slider-tooltip-translate, 50%);
|
|
1827
|
+
}
|
|
1857
1828
|
|
|
1858
|
-
|
|
1859
|
-
|
|
1829
|
+
top: $slider-tooltip-offset;
|
|
1830
|
+
transform: translateX(get-var(slider-tooltip-translate))
|
|
1831
|
+
scale(get-var(slider-tooltip-scale));
|
|
1860
1832
|
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1833
|
+
&::after {
|
|
1834
|
+
@include tooltip.use-var(border-top-color, background-color);
|
|
1835
|
+
|
|
1836
|
+
left: 50%;
|
|
1837
|
+
top: 100%;
|
|
1838
|
+
transform: translateX(get-var(slider-tooltip-translate));
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
&--h-off {
|
|
1843
|
+
@include set-var(slider-tooltip-scale, 0);
|
|
1844
|
+
}
|
|
1864
1845
|
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1846
|
+
// have to "duplicate" these styles since the `--h-off` would override the
|
|
1847
|
+
// `--h` styles due to css order.
|
|
1848
|
+
&--h-on {
|
|
1849
|
+
@include set-var(slider-tooltip-scale, 1);
|
|
1850
|
+
}
|
|
1869
1851
|
}
|
|
1870
|
-
}
|
|
1871
1852
|
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1853
|
+
@if not $disable-vertical-slider {
|
|
1854
|
+
&--v {
|
|
1855
|
+
// going to force rendering always to the left even in RTL languages
|
|
1856
|
+
left: $slider-tooltip-offset;
|
|
1857
|
+
transform: translateY(50%) scale(1);
|
|
1858
|
+
|
|
1859
|
+
&::after {
|
|
1860
|
+
@include tooltip.use-var(border-left-color, background-color);
|
|
1861
|
+
|
|
1862
|
+
left: 100%;
|
|
1863
|
+
top: 50%;
|
|
1864
|
+
transform: translateY(-50%);
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
&--v-off {
|
|
1869
|
+
transform: translateY(50%) scale(0);
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
// have to "duplicate" these styles since the `--v-off` would override the
|
|
1873
|
+
// `--v` styles due to css order.
|
|
1874
|
+
&--v-on {
|
|
1875
|
+
transform: translateY(50%) scale(1);
|
|
1876
|
+
}
|
|
1878
1877
|
}
|
|
1879
1878
|
}
|
|
1880
1879
|
}
|
|
1881
|
-
}
|
|
1882
1880
|
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1881
|
+
@if not $disable-discrete-slider-marks {
|
|
1882
|
+
.rmd-slider-mark {
|
|
1883
|
+
border-radius: $slider-mark-border-radius;
|
|
1884
|
+
position: absolute;
|
|
1886
1885
|
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
@include
|
|
1890
|
-
@include use-var(right, slider-mark-offset);
|
|
1886
|
+
&--inactive {
|
|
1887
|
+
@include use-var(background-color, slider-mark-inactive-color);
|
|
1888
|
+
@include use-var(opacity, slider-mark-inactive-opacity);
|
|
1891
1889
|
|
|
1892
|
-
|
|
1893
|
-
|
|
1890
|
+
z-index: $slider-mark-inactive-z-index;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
&--active {
|
|
1894
|
+
@include use-var(background-color, slider-mark-active-color);
|
|
1895
|
+
@include use-var(opacity, slider-mark-active-opacity);
|
|
1896
|
+
|
|
1897
|
+
z-index: $slider-mark-active-z-index;
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
@if not $disable-horizontal-slider {
|
|
1901
|
+
&--h {
|
|
1902
|
+
@include utils.auto-rtl(left, get-var(slider-mark-offset));
|
|
1903
|
+
|
|
1904
|
+
height: $slider-mark-height;
|
|
1905
|
+
top: 50%;
|
|
1906
|
+
transform: translateY(-50%);
|
|
1907
|
+
width: $slider-mark-width;
|
|
1894
1908
|
}
|
|
1895
|
-
|
|
1909
|
+
}
|
|
1896
1910
|
|
|
1897
|
-
|
|
1898
|
-
|
|
1911
|
+
@if not $disable-vertical-slider {
|
|
1912
|
+
&--v {
|
|
1913
|
+
bottom: get-var(slider-mark-offset);
|
|
1914
|
+
height: $slider-mark-width;
|
|
1915
|
+
transform: translateY(50%);
|
|
1916
|
+
width: $slider-mark-height;
|
|
1917
|
+
}
|
|
1899
1918
|
}
|
|
1900
1919
|
}
|
|
1920
|
+
}
|
|
1901
1921
|
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1922
|
+
@if not $disable-discrete-slider-marks-labels {
|
|
1923
|
+
.rmd-slider-mark-label {
|
|
1924
|
+
position: absolute;
|
|
1925
|
+
|
|
1926
|
+
@if not $disable-horizontal-slider {
|
|
1927
|
+
&--h {
|
|
1928
|
+
@include utils.rtl {
|
|
1929
|
+
@include use-var(right, slider-mark-offset);
|
|
1930
|
+
|
|
1931
|
+
left: auto;
|
|
1932
|
+
transform: translateX(50%);
|
|
1933
|
+
}
|
|
1934
|
+
@include use-var(left, slider-mark-offset);
|
|
1905
1935
|
|
|
1906
|
-
|
|
1907
|
-
|
|
1936
|
+
top: 100%;
|
|
1937
|
+
transform: translateX(-50%);
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
@if not $disable-vertical-slider {
|
|
1942
|
+
&--v {
|
|
1943
|
+
@include utils.auto-rtl(left, 100%);
|
|
1944
|
+
|
|
1945
|
+
top: get-var(slider-mark-offset);
|
|
1946
|
+
transform: translateY(-50%);
|
|
1947
|
+
}
|
|
1908
1948
|
}
|
|
1909
1949
|
}
|
|
1910
1950
|
}
|
|
@@ -1998,91 +2038,98 @@ $variables: (
|
|
|
1998
2038
|
}
|
|
1999
2039
|
}
|
|
2000
2040
|
|
|
2001
|
-
@mixin styles {
|
|
2002
|
-
@
|
|
2003
|
-
@include
|
|
2004
|
-
|
|
2041
|
+
@mixin styles($disable-layer: false) {
|
|
2042
|
+
@if not $disable-everything {
|
|
2043
|
+
@include utils.optional-layer(form, $disable-layer) {
|
|
2044
|
+
@include theme.default-system-theme {
|
|
2045
|
+
@include use-dark-theme;
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
@if not $disable-fieldset {
|
|
2049
|
+
.rmd-fieldset {
|
|
2050
|
+
&--unstyled {
|
|
2051
|
+
border: 0;
|
|
2052
|
+
margin: 0;
|
|
2053
|
+
min-width: 0; // just so it can shrink correctly in flex or grid
|
|
2054
|
+
padding: 0;
|
|
2055
|
+
}
|
|
2005
2056
|
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
min-width: 0; // just so it can shrink correctly in flex or grid
|
|
2012
|
-
padding: 0;
|
|
2057
|
+
&--full-width {
|
|
2058
|
+
flex: 1 1 auto;
|
|
2059
|
+
width: 100%;
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2013
2062
|
}
|
|
2014
2063
|
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
width: 100%;
|
|
2064
|
+
@if not $disable-label {
|
|
2065
|
+
@include label-styles(true);
|
|
2018
2066
|
}
|
|
2019
|
-
}
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2022
|
-
@if not $disable-label {
|
|
2023
|
-
@include label-styles;
|
|
2024
|
-
}
|
|
2025
2067
|
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2068
|
+
@if not $disable-file-input {
|
|
2069
|
+
@include file-input-styles(true);
|
|
2070
|
+
}
|
|
2029
2071
|
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2072
|
+
@if not $disable-message {
|
|
2073
|
+
@include form-message-styles(true);
|
|
2074
|
+
}
|
|
2033
2075
|
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2076
|
+
@if not $_disable-text-field-container {
|
|
2077
|
+
@include text-field-container-styles(true);
|
|
2078
|
+
}
|
|
2037
2079
|
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2080
|
+
@if not
|
|
2081
|
+
$disable-text-field or not
|
|
2082
|
+
$disable-password or not
|
|
2083
|
+
$disable-textarea
|
|
2084
|
+
{
|
|
2085
|
+
@include text-field-styles(true);
|
|
2086
|
+
}
|
|
2042
2087
|
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2088
|
+
@if not $disable-password {
|
|
2089
|
+
@include password-styles(true);
|
|
2090
|
+
}
|
|
2046
2091
|
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2092
|
+
@if not $disable-textarea {
|
|
2093
|
+
@include textarea-container-styles(true);
|
|
2094
|
+
@include textarea-styles(true);
|
|
2095
|
+
}
|
|
2051
2096
|
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2097
|
+
@if not $disable-select {
|
|
2098
|
+
@include select-styles(true);
|
|
2099
|
+
}
|
|
2055
2100
|
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2101
|
+
@if not $disable-option {
|
|
2102
|
+
@include option-styles(true);
|
|
2103
|
+
}
|
|
2059
2104
|
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2105
|
+
@if not $disable-native-select {
|
|
2106
|
+
@include native-select-styles(true);
|
|
2107
|
+
}
|
|
2063
2108
|
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2109
|
+
@if not $disable-text-field-addon {
|
|
2110
|
+
@include text-field-addon-styles(true);
|
|
2111
|
+
}
|
|
2067
2112
|
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2113
|
+
@if not $disable-checkbox or not $disable-radio or not $disable-switch {
|
|
2114
|
+
@include hidden-input-styles(true);
|
|
2115
|
+
@include input-toggle-styles(true);
|
|
2116
|
+
}
|
|
2072
2117
|
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2118
|
+
@if not $disable-switch {
|
|
2119
|
+
@include switch-styles(true);
|
|
2120
|
+
}
|
|
2076
2121
|
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2122
|
+
@if not
|
|
2123
|
+
$disable-menu-item-checkbox or not
|
|
2124
|
+
$disable-menu-item-radio or not
|
|
2125
|
+
$disable-menu-item-switch
|
|
2126
|
+
{
|
|
2127
|
+
@include menu-item-input-toggle-styles(true);
|
|
2128
|
+
}
|
|
2084
2129
|
|
|
2085
|
-
|
|
2086
|
-
|
|
2130
|
+
@if not $disable-slider {
|
|
2131
|
+
@include slider-styles(true);
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2087
2134
|
}
|
|
2088
2135
|
}
|