preact-material-components
Version:
preact wrapper for "Material Components for the web"
460 lines (432 loc) • 18.6 kB
CSS
/*!
Material Components for the Web
Copyright (c) 2018 Google Inc.
License: Apache-2.0
*/
@-webkit-keyframes mdc-select-float-native-control {
0% {
-webkit-transform: translateY(8px);
transform: translateY(8px);
opacity: 0; }
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
opacity: 1; } }
@keyframes mdc-select-float-native-control {
0% {
-webkit-transform: translateY(8px);
transform: translateY(8px);
opacity: 0; }
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
opacity: 1; } }
.mdc-line-ripple {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 2px;
-webkit-transform: scaleX(0);
transform: scaleX(0);
transition: opacity 180ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1), opacity 180ms cubic-bezier(0.4, 0, 0.2, 1);
transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1), opacity 180ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
opacity: 0;
z-index: 2; }
.mdc-line-ripple--active {
-webkit-transform: scaleX(1);
transform: scaleX(1);
opacity: 1; }
.mdc-line-ripple--deactivating {
opacity: 0; }
.mdc-notched-outline {
position: absolute;
top: 0;
left: 0;
width: calc(100% - 1px);
height: calc(100% - 2px);
transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
opacity: 0;
overflow: hidden; }
.mdc-notched-outline svg {
position: absolute;
width: 100%;
height: 100%; }
.mdc-notched-outline__idle {
position: absolute;
top: 0;
left: 0;
width: calc(100% - 4px);
height: calc(100% - 4px);
transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1), border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
border: 1px solid;
opacity: 1; }
.mdc-notched-outline__path {
stroke-width: 1px;
transition: stroke 150ms cubic-bezier(0.4, 0, 0.2, 1), stroke-width 150ms cubic-bezier(0.4, 0, 0.2, 1);
fill: transparent; }
.mdc-notched-outline--notched {
opacity: 1; }
.mdc-notched-outline--notched ~ .mdc-notched-outline__idle {
opacity: 0; }
.mdc-floating-label {
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 1rem;
line-height: 1.75rem;
font-weight: 400;
letter-spacing: 0.00937em;
text-decoration: inherit;
text-transform: inherit;
position: absolute;
bottom: 8px;
left: 0;
-webkit-transform-origin: left top;
transform-origin: left top;
transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1);
transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
line-height: 1.15rem;
cursor: text; }
[dir="rtl"] .mdc-floating-label, .mdc-floating-label[dir="rtl"] {
/* @noflip */
right: 0;
/* @noflip */
left: auto;
/* @noflip */
-webkit-transform-origin: right top;
transform-origin: right top; }
.mdc-floating-label--float-above {
cursor: auto; }
.mdc-floating-label--float-above {
-webkit-transform: translateY(-100%) scale(0.75);
transform: translateY(-100%) scale(0.75); }
.mdc-floating-label--shake {
-webkit-animation: mdc-floating-label-shake-float-above-standard 250ms 1;
animation: mdc-floating-label-shake-float-above-standard 250ms 1; }
@-webkit-keyframes mdc-floating-label-shake-float-above-standard {
0% {
-webkit-transform: translateX(calc(0 - 0%)) translateY(-100%) scale(0.75);
transform: translateX(calc(0 - 0%)) translateY(-100%) scale(0.75); }
33% {
-webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);
animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);
-webkit-transform: translateX(calc(4% - 0%)) translateY(-100%) scale(0.75);
transform: translateX(calc(4% - 0%)) translateY(-100%) scale(0.75); }
66% {
-webkit-animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);
animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);
-webkit-transform: translateX(calc(-4% - 0%)) translateY(-100%) scale(0.75);
transform: translateX(calc(-4% - 0%)) translateY(-100%) scale(0.75); }
100% {
-webkit-transform: translateX(calc(0 - 0%)) translateY(-100%) scale(0.75);
transform: translateX(calc(0 - 0%)) translateY(-100%) scale(0.75); } }
@keyframes mdc-floating-label-shake-float-above-standard {
0% {
-webkit-transform: translateX(calc(0 - 0%)) translateY(-100%) scale(0.75);
transform: translateX(calc(0 - 0%)) translateY(-100%) scale(0.75); }
33% {
-webkit-animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);
animation-timing-function: cubic-bezier(0.5, 0, 0.70173, 0.49582);
-webkit-transform: translateX(calc(4% - 0%)) translateY(-100%) scale(0.75);
transform: translateX(calc(4% - 0%)) translateY(-100%) scale(0.75); }
66% {
-webkit-animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);
animation-timing-function: cubic-bezier(0.30244, 0.38135, 0.55, 0.95635);
-webkit-transform: translateX(calc(-4% - 0%)) translateY(-100%) scale(0.75);
transform: translateX(calc(-4% - 0%)) translateY(-100%) scale(0.75); }
100% {
-webkit-transform: translateX(calc(0 - 0%)) translateY(-100%) scale(0.75);
transform: translateX(calc(0 - 0%)) translateY(-100%) scale(0.75); } }
@-webkit-keyframes mdc-ripple-fg-radius-in {
from {
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
-webkit-transform: translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1);
transform: translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1); }
to {
-webkit-transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));
transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1)); } }
@keyframes mdc-ripple-fg-radius-in {
from {
-webkit-animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
-webkit-transform: translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1);
transform: translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1); }
to {
-webkit-transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));
transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1)); } }
@-webkit-keyframes mdc-ripple-fg-opacity-in {
from {
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
opacity: 0; }
to {
opacity: var(--mdc-ripple-fg-opacity, 0); } }
@keyframes mdc-ripple-fg-opacity-in {
from {
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
opacity: 0; }
to {
opacity: var(--mdc-ripple-fg-opacity, 0); } }
@-webkit-keyframes mdc-ripple-fg-opacity-out {
from {
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
opacity: var(--mdc-ripple-fg-opacity, 0); }
to {
opacity: 0; } }
@keyframes mdc-ripple-fg-opacity-out {
from {
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
opacity: var(--mdc-ripple-fg-opacity, 0); }
to {
opacity: 0; } }
.mdc-ripple-surface--test-edge-var-bug {
--mdc-ripple-surface-test-edge-var: 1px solid #000;
visibility: hidden; }
.mdc-ripple-surface--test-edge-var-bug::before {
border: var(--mdc-ripple-surface-test-edge-var); }
.mdc-select {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2210px%22%20height%3D%225px%22%20viewBox%3D%227%2010%2010%205%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%20%20%3Cpolygon%20id%3D%22Shape%22%20stroke%3D%22none%22%20fill%3D%22%230%22%20fill-rule%3D%22evenodd%22%20opacity%3D%220.54%22%20points%3D%227%2010%2012%2015%2017%2010%22%3E%3C%2Fpolygon%3E%0A%3C%2Fsvg%3E");
display: inline-flex;
position: relative;
box-sizing: border-box;
height: 52px;
background-repeat: no-repeat;
background-position: right 8px bottom 12px; }
.mdc-select:not(.mdc-select--disabled) {
background-color: transparent; }
.mdc-select:not(.mdc-select--disabled) .mdc-select__native-control {
color: rgba(0, 0, 0, 0.87); }
.mdc-select:not(.mdc-select--disabled) .mdc-floating-label {
color: rgba(0, 0, 0, 0.6); }
.mdc-select:not(.mdc-select--disabled) .mdc-select__native-control {
border-bottom-color: rgba(0, 0, 0, 0.42); }
.mdc-select:not(.mdc-select--disabled) .mdc-select__native-control:focus ~ .mdc-line-ripple {
background-color: #6200ee;
/* @alternate */
background-color: var(--mdc-theme-primary, #6200ee); }
.mdc-select:not(.mdc-select--disabled) .mdc-select__native-control:focus ~ .mdc-floating-label {
color: rgba(98, 0, 238, 0.87); }
.mdc-select:not(.mdc-select--disabled) .mdc-select__native-control:hover {
border-bottom-color: rgba(0, 0, 0, 0.87); }
[dir="rtl"] .mdc-select, .mdc-select[dir="rtl"] {
background-position: left 8px bottom 12px; }
.mdc-select__native-control {
/* @noflip */
padding-left: 0;
/* @noflip */
padding-right: 26px;
font-family: Roboto, sans-serif;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-size: 1rem;
line-height: 1.75rem;
font-weight: 400;
letter-spacing: 0.00937em;
text-decoration: inherit;
text-transform: inherit;
width: 100%;
padding-top: 20px;
padding-bottom: 4px;
border: none;
border-bottom: 1px solid;
border-radius: 0;
outline: none;
background-color: transparent;
white-space: nowrap;
cursor: pointer;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none; }
[dir="rtl"] .mdc-select__native-control, .mdc-select__native-control[dir="rtl"] {
/* @noflip */
padding-left: 26px;
/* @noflip */
padding-right: 0; }
.mdc-select__native-control::-ms-expand {
display: none; }
@-moz-document url-prefix("") {
.mdc-select__native-control {
text-indent: -2px; } }
.mdc-select .mdc-floating-label {
pointer-events: none; }
.mdc-select .mdc-select__native-control:focus ~ .mdc-line-ripple::after {
-webkit-transform: scale(1, 2);
transform: scale(1, 2);
opacity: 1; }
.mdc-select--box {
--mdc-ripple-fg-size: 0;
--mdc-ripple-left: 0;
--mdc-ripple-top: 0;
--mdc-ripple-fg-scale: 1;
--mdc-ripple-fg-translate-end: 0;
--mdc-ripple-fg-translate-start: 0;
-webkit-tap-highlight-color: transparent;
will-change: transform, opacity;
height: 56px;
border-radius: 4px 4px 0 0;
background-position: right 10px center;
overflow: hidden; }
.mdc-select--box:not(.mdc-select--disabled) {
background-color: whitesmoke; }
.mdc-select--box::before, .mdc-select--box::after {
position: absolute;
border-radius: 50%;
opacity: 0;
pointer-events: none;
content: ""; }
.mdc-select--box::before {
transition: opacity 15ms linear;
z-index: 1; }
.mdc-select--box.mdc-ripple-upgraded::before {
-webkit-transform: scale(var(--mdc-ripple-fg-scale, 1));
transform: scale(var(--mdc-ripple-fg-scale, 1)); }
.mdc-select--box.mdc-ripple-upgraded::after {
top: 0;
/* @noflip */
left: 0;
-webkit-transform: scale(0);
transform: scale(0);
-webkit-transform-origin: center center;
transform-origin: center center; }
.mdc-select--box.mdc-ripple-upgraded--unbounded::after {
top: var(--mdc-ripple-top, 0);
/* @noflip */
left: var(--mdc-ripple-left, 0); }
.mdc-select--box.mdc-ripple-upgraded--foreground-activation::after {
-webkit-animation: 225ms mdc-ripple-fg-radius-in forwards, 75ms mdc-ripple-fg-opacity-in forwards;
animation: 225ms mdc-ripple-fg-radius-in forwards, 75ms mdc-ripple-fg-opacity-in forwards; }
.mdc-select--box.mdc-ripple-upgraded--foreground-deactivation::after {
-webkit-animation: 150ms mdc-ripple-fg-opacity-out;
animation: 150ms mdc-ripple-fg-opacity-out;
-webkit-transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));
transform: translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1)); }
.mdc-select--box::before, .mdc-select--box::after {
top: calc(50% - 100%);
/* @noflip */
left: calc(50% - 100%);
width: 200%;
height: 200%; }
.mdc-select--box.mdc-ripple-upgraded::after {
width: var(--mdc-ripple-fg-size, 100%);
height: var(--mdc-ripple-fg-size, 100%); }
.mdc-select--box::before, .mdc-select--box::after {
background-color: rgba(0, 0, 0, 0.87); }
.mdc-select--box:hover::before {
opacity: 0.04; }
.mdc-select--box:not(.mdc-ripple-upgraded):focus::before, .mdc-select--box:not(.mdc-ripple-upgraded):focus-within::before, .mdc-select--box.mdc-ripple-upgraded--background-focused::before {
transition-duration: 75ms;
opacity: 0.12; }
[dir="rtl"] .mdc-select--box, .mdc-select--box[dir="rtl"] {
background-position: left 10px center; }
.mdc-select--box .mdc-select__native-control {
/* @noflip */
padding-left: 16px;
/* @noflip */
padding-right: 26px;
height: 56px;
border-radius: 4px 4px 0 0; }
[dir="rtl"] .mdc-select--box .mdc-select__native-control, .mdc-select--box .mdc-select__native-control[dir="rtl"] {
/* @noflip */
padding-left: 26px;
/* @noflip */
padding-right: 16px; }
.mdc-select--box .mdc-floating-label {
/* @noflip */
left: 16px;
/* @noflip */
right: initial;
bottom: 12px;
line-height: 1.75rem; }
[dir="rtl"] .mdc-select--box .mdc-floating-label, .mdc-select--box .mdc-floating-label[dir="rtl"] {
/* @noflip */
left: initial;
/* @noflip */
right: 16px; }
.mdc-select--box .mdc-floating-label--float-above {
-webkit-transform: translateY(-40%) scale(0.75, 0.75);
transform: translateY(-40%) scale(0.75, 0.75); }
.mdc-select--outlined {
height: 56px;
border: none;
background-position: right 10px center; }
.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__idle {
border-color: rgba(0, 0, 0, 0.24); }
.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__path {
stroke: rgba(0, 0, 0, 0.24); }
.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select__native-control:focus) .mdc-select__native-control:hover ~ .mdc-notched-outline__idle {
border-color: rgba(0, 0, 0, 0.87); }
.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select__native-control:focus) .mdc-select__native-control:hover ~ .mdc-notched-outline .mdc-notched-outline__path {
stroke: rgba(0, 0, 0, 0.87); }
.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__native-control:focus ~ .mdc-notched-outline .mdc-notched-outline__path {
stroke-width: 2px; }
.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__native-control:focus ~ .mdc-notched-outline .mdc-notched-outline__path {
stroke: #6200ee;
/* @alternate */
stroke: var(--mdc-theme-primary, #6200ee); }
.mdc-select--outlined .mdc-floating-label--float-above {
-webkit-transform: translateY(-130%) scale(0.75);
transform: translateY(-130%) scale(0.75); }
.mdc-select--outlined .mdc-floating-label--shake {
-webkit-animation: mdc-floating-label-shake-float-above-text-field-outlined 250ms 1;
animation: mdc-floating-label-shake-float-above-text-field-outlined 250ms 1; }
.mdc-select--outlined .mdc-notched-outline {
border-radius: 4px; }
.mdc-select--outlined .mdc-notched-outline__idle {
border-radius: 4px; }
[dir="rtl"] .mdc-select--outlined, .mdc-select--outlined[dir="rtl"] {
background-position: left 10px center; }
.mdc-select--outlined .mdc-select__native-control {
/* @noflip */
padding-left: 16px;
/* @noflip */
padding-right: 26px;
display: flex;
padding-top: 12px;
padding-bottom: 12px;
border: none;
background-color: transparent;
z-index: 1; }
[dir="rtl"] .mdc-select--outlined .mdc-select__native-control, .mdc-select--outlined .mdc-select__native-control[dir="rtl"] {
/* @noflip */
padding-left: 26px;
/* @noflip */
padding-right: 16px; }
.mdc-select--outlined .mdc-floating-label {
/* @noflip */
left: 16px;
/* @noflip */
right: initial;
position: absolute;
bottom: 20px; }
[dir="rtl"] .mdc-select--outlined .mdc-floating-label, .mdc-select--outlined .mdc-floating-label[dir="rtl"] {
/* @noflip */
left: initial;
/* @noflip */
right: 16px; }
.mdc-select--disabled {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2210px%22%20height%3D%225px%22%20viewBox%3D%227%2010%2010%205%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%20%20%3Cpolygon%20id%3D%22Shape%22%20stroke%3D%22none%22%20fill%3D%22%23#000%22%20fill-rule%3D%22evenodd%22%20opacity%3D%220.54%22%20points%3D%227%2010%2012%2015%2017%2010%22%3E%3C%2Fpolygon%3E%0A%3C%2Fsvg%3E");
opacity: .38;
cursor: default;
pointer-events: none; }
.mdc-select--disabled .mdc-floating-label {
color: rgba(0, 0, 0, 0.37); }
.mdc-select--disabled .mdc-line-ripple {
display: none; }
.mdc-select--disabled .mdc-select__native-control {
border-bottom-style: dotted; }
.mdc-select--disabled.mdc-select--box {
background-color: #fafafa; }
.mdc-select--disabled.mdc-select--outlined .mdc-select__native-control {
border-bottom-style: none; }
.mdc-select--disabled.mdc-select--outlined .mdc-notched-outline__idle {
border-color: rgba(0, 0, 0, 0.16); }
.mdc-select--disabled.mdc-select--outlined .mdc-notched-outline__path {
stroke: rgba(0, 0, 0, 0.16); }
/*# sourceMappingURL=mdc.select.css.map*/