mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-02-06 06:40:37 +03:00
added support for hints under inputs on focus
This commit is contained in:
parent
3bad268ab5
commit
305b4ea378
|
@ -100,6 +100,8 @@ Add `.btn-raised` to a button to add a permanent shadow to it.
|
||||||
|
|
||||||
Add `.floating-label` to an input field with a `placeholder` to transform the placeholder in a floating label.
|
Add `.floating-label` to an input field with a `placeholder` to transform the placeholder in a floating label.
|
||||||
|
|
||||||
|
Add `data-hint="some hint"` to show an hint under the input when the user focus it.
|
||||||
|
|
||||||
Remember to use the proper HTML markup to get radio and checkboxes styled correctly (choose between *radio* or *checkbox*):
|
Remember to use the proper HTML markup to get radio and checkboxes styled correctly (choose between *radio* or *checkbox*):
|
||||||
|
|
||||||
<div class="radio/checkbox radio-primary">
|
<div class="radio/checkbox radio-primary">
|
||||||
|
|
160
dist/css/material-wfont.css
vendored
160
dist/css/material-wfont.css
vendored
|
@ -2625,7 +2625,6 @@ body .jumbotron-material-lightgrey,
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: rgba(255, 255, 255, 0.84);
|
color: rgba(255, 255, 255, 0.84);
|
||||||
-webkit-transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
||||||
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
outline: none !important;
|
outline: none !important;
|
||||||
}
|
}
|
||||||
|
@ -2785,7 +2784,6 @@ body .jumbotron-material-lightgrey,
|
||||||
}
|
}
|
||||||
.btn.btn-raised {
|
.btn.btn-raised {
|
||||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
||||||
-webkit-transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
||||||
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
}
|
}
|
||||||
.btn.btn-raised:active:not(.btn-link) {
|
.btn.btn-raised:active:not(.btn-link) {
|
||||||
|
@ -3004,7 +3002,6 @@ body .jumbotron-material-lightgrey,
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
margin: 10px 1px;
|
margin: 10px 1px;
|
||||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
||||||
-webkit-transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
||||||
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
}
|
}
|
||||||
.btn-group:active:not(.btn-link),
|
.btn-group:active:not(.btn-link),
|
||||||
|
@ -3018,7 +3015,6 @@ body .jumbotron-material-lightgrey,
|
||||||
.btn-group.btn-group-raised,
|
.btn-group.btn-group-raised,
|
||||||
.btn-group-vertical.btn-group-raised {
|
.btn-group-vertical.btn-group-raised {
|
||||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
||||||
-webkit-transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
||||||
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
}
|
}
|
||||||
.btn-group.btn-group-raised:active:not(.btn-link),
|
.btn-group.btn-group-raised:active:not(.btn-link),
|
||||||
|
@ -3053,7 +3049,6 @@ body .jumbotron-material-lightgrey,
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
-webkit-transition-duration: 0.2s;
|
|
||||||
transition-duration: 0.2s;
|
transition-duration: 0.2s;
|
||||||
}
|
}
|
||||||
.checkbox label .ripple {
|
.checkbox label .ripple {
|
||||||
|
@ -3071,11 +3066,9 @@ body .jumbotron-material-lightgrey,
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.checkbox label input[type=checkbox]:not(:checked) ~ .ripple {
|
.checkbox label input[type=checkbox]:not(:checked) ~ .ripple {
|
||||||
-webkit-animation: rippleOff 500ms;
|
|
||||||
animation: rippleOff 500ms;
|
animation: rippleOff 500ms;
|
||||||
}
|
}
|
||||||
.checkbox label input[type=checkbox]:checked ~ .ripple {
|
.checkbox label input[type=checkbox]:checked ~ .ripple {
|
||||||
-webkit-animation: rippleOn 500ms;
|
|
||||||
animation: rippleOn 500ms;
|
animation: rippleOn 500ms;
|
||||||
}
|
}
|
||||||
.checkbox label .check {
|
.checkbox label .check {
|
||||||
|
@ -3107,8 +3100,6 @@ body .jumbotron-material-lightgrey,
|
||||||
.checkbox label .check:before {
|
.checkbox label .check:before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
content: "";
|
content: "";
|
||||||
-webkit-transform: rotate(45deg);
|
|
||||||
-ms-transform: rotate(45deg);
|
|
||||||
transform: rotate(45deg);
|
transform: rotate(45deg);
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: -4px;
|
margin-top: -4px;
|
||||||
|
@ -3122,7 +3113,6 @@ body .jumbotron-material-lightgrey,
|
||||||
0 0 0 0,
|
0 0 0 0,
|
||||||
0 0 0 0,
|
0 0 0 0,
|
||||||
0px 0px 0 0px inset;
|
0px 0px 0 0px inset;
|
||||||
-webkit-animation: checkbox-off 0.3s linear forwards;
|
|
||||||
animation: checkbox-off 0.3s linear forwards;
|
animation: checkbox-off 0.3s linear forwards;
|
||||||
}
|
}
|
||||||
.checkbox input[type=checkbox] {
|
.checkbox input[type=checkbox] {
|
||||||
|
@ -3133,20 +3123,16 @@ body .jumbotron-material-lightgrey,
|
||||||
}
|
}
|
||||||
.checkbox input[type=checkbox]:checked ~ .check:before {
|
.checkbox input[type=checkbox]:checked ~ .check:before {
|
||||||
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px;
|
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px;
|
||||||
-webkit-animation: checkbox-on 0.3s linear forwards;
|
|
||||||
animation: checkbox-on 0.3s linear forwards;
|
animation: checkbox-on 0.3s linear forwards;
|
||||||
}
|
}
|
||||||
.checkbox input[type=checkbox]:not(:checked) ~ .check:after {
|
.checkbox input[type=checkbox]:not(:checked) ~ .check:after {
|
||||||
-webkit-animation: rippleOff 500ms linear forwards;
|
|
||||||
animation: rippleOff 500ms linear forwards;
|
animation: rippleOff 500ms linear forwards;
|
||||||
}
|
}
|
||||||
.checkbox input[type=checkbox]:checked ~ .check:after {
|
.checkbox input[type=checkbox]:checked ~ .check:after {
|
||||||
-webkit-animation: rippleOn 500ms linear forwards;
|
|
||||||
animation: rippleOn 500ms linear forwards;
|
animation: rippleOn 500ms linear forwards;
|
||||||
}
|
}
|
||||||
.checkbox:not(:hover) input[type=checkbox] ~ .check:before,
|
.checkbox:not(:hover) input[type=checkbox] ~ .check:before,
|
||||||
.checkbox:not(:hover) input[type=checkbox] ~ .check:after {
|
.checkbox:not(:hover) input[type=checkbox] ~ .check:after {
|
||||||
-webkit-animation-duration: 1ms;
|
|
||||||
animation-duration: 1ms;
|
animation-duration: 1ms;
|
||||||
}
|
}
|
||||||
.checkbox input[type=checkbox][disabled]:not(:checked) ~ .check:before,
|
.checkbox input[type=checkbox][disabled]:not(:checked) ~ .check:before,
|
||||||
|
@ -3155,8 +3141,6 @@ body .jumbotron-material-lightgrey,
|
||||||
}
|
}
|
||||||
.checkbox input[type=checkbox][disabled] ~ .check:after {
|
.checkbox input[type=checkbox][disabled] ~ .check:after {
|
||||||
background-color: rgba(0, 0, 0, 0.84);
|
background-color: rgba(0, 0, 0, 0.84);
|
||||||
-webkit-transform: rotate(-45deg);
|
|
||||||
-ms-transform: rotate(-45deg);
|
|
||||||
transform: rotate(-45deg);
|
transform: rotate(-45deg);
|
||||||
}
|
}
|
||||||
.checkbox input[type=checkbox]:checked ~ .check:after,
|
.checkbox input[type=checkbox]:checked ~ .check:after,
|
||||||
|
@ -3369,17 +3353,6 @@ body .jumbotron-material-lightgrey,
|
||||||
.checkbox-material-lightgrey input[type=checkbox]:checked ~ .check {
|
.checkbox-material-lightgrey input[type=checkbox]:checked ~ .check {
|
||||||
color: #ececec;
|
color: #ececec;
|
||||||
}
|
}
|
||||||
@-webkit-keyframes checkbox-on {
|
|
||||||
0% {
|
|
||||||
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px 2px 0 11px;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes checkbox-on {
|
@keyframes checkbox-on {
|
||||||
0% {
|
0% {
|
||||||
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px;
|
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px;
|
||||||
|
@ -3391,53 +3364,6 @@ body .jumbotron-material-lightgrey,
|
||||||
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px;
|
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@-webkit-keyframes checkbox-off {
|
|
||||||
0% {
|
|
||||||
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
|
|
||||||
}
|
|
||||||
25% {
|
|
||||||
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
-webkit-transform: rotate(45deg);
|
|
||||||
transform: rotate(45deg);
|
|
||||||
margin-top: -4px;
|
|
||||||
margin-left: 6px;
|
|
||||||
width: 0px;
|
|
||||||
height: 0px;
|
|
||||||
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px, 0 0 0 0 inset;
|
|
||||||
}
|
|
||||||
51% {
|
|
||||||
-webkit-transform: rotate(0deg);
|
|
||||||
transform: rotate(0deg);
|
|
||||||
margin-top: -2px;
|
|
||||||
margin-left: -2px;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
box-shadow: 0 0 0 0,
|
|
||||||
0 0 0 0,
|
|
||||||
0 0 0 0,
|
|
||||||
0 0 0 0,
|
|
||||||
0 0 0 0,
|
|
||||||
0 0 0 0,
|
|
||||||
0px 0px 0 10px inset;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
-webkit-transform: rotate(0deg);
|
|
||||||
transform: rotate(0deg);
|
|
||||||
margin-top: -2px;
|
|
||||||
margin-left: -2px;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
box-shadow: 0 0 0 0,
|
|
||||||
0 0 0 0,
|
|
||||||
0 0 0 0,
|
|
||||||
0 0 0 0,
|
|
||||||
0 0 0 0,
|
|
||||||
0 0 0 0,
|
|
||||||
0px 0px 0 0px inset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes checkbox-off {
|
@keyframes checkbox-off {
|
||||||
0% {
|
0% {
|
||||||
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
|
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
|
||||||
|
@ -3446,7 +3372,6 @@ body .jumbotron-material-lightgrey,
|
||||||
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
|
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
|
||||||
}
|
}
|
||||||
50% {
|
50% {
|
||||||
-webkit-transform: rotate(45deg);
|
|
||||||
transform: rotate(45deg);
|
transform: rotate(45deg);
|
||||||
margin-top: -4px;
|
margin-top: -4px;
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
|
@ -3455,7 +3380,6 @@ body .jumbotron-material-lightgrey,
|
||||||
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px, 0 0 0 0 inset;
|
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0px 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px, 0 0 0 0 inset;
|
||||||
}
|
}
|
||||||
51% {
|
51% {
|
||||||
-webkit-transform: rotate(0deg);
|
|
||||||
transform: rotate(0deg);
|
transform: rotate(0deg);
|
||||||
margin-top: -2px;
|
margin-top: -2px;
|
||||||
margin-left: -2px;
|
margin-left: -2px;
|
||||||
|
@ -3470,7 +3394,6 @@ body .jumbotron-material-lightgrey,
|
||||||
0px 0px 0 10px inset;
|
0px 0px 0 10px inset;
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
-webkit-transform: rotate(0deg);
|
|
||||||
transform: rotate(0deg);
|
transform: rotate(0deg);
|
||||||
margin-top: -2px;
|
margin-top: -2px;
|
||||||
margin-left: -2px;
|
margin-left: -2px;
|
||||||
|
@ -3485,17 +3408,6 @@ body .jumbotron-material-lightgrey,
|
||||||
0px 0px 0 0px inset;
|
0px 0px 0 0px inset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@-webkit-keyframes rippleOn {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes rippleOn {
|
@keyframes rippleOn {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
@ -3507,17 +3419,6 @@ body .jumbotron-material-lightgrey,
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@-webkit-keyframes rippleOff {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes rippleOff {
|
@keyframes rippleOff {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
@ -3542,7 +3443,6 @@ body .jumbotron-material-lightgrey,
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 10px;
|
left: 10px;
|
||||||
top: 2px;
|
top: 2px;
|
||||||
-webkit-transition-duration: 0.2s;
|
|
||||||
transition-duration: 0.2s;
|
transition-duration: 0.2s;
|
||||||
}
|
}
|
||||||
.radio label .circle {
|
.radio label .circle {
|
||||||
|
@ -3556,8 +3456,6 @@ body .jumbotron-material-lightgrey,
|
||||||
width: 15px;
|
width: 15px;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
background-color: rgba(0, 0, 0, 0.84);
|
background-color: rgba(0, 0, 0, 0.84);
|
||||||
-webkit-transform: scale(0);
|
|
||||||
-ms-transform: scale(0);
|
|
||||||
transform: scale(0);
|
transform: scale(0);
|
||||||
}
|
}
|
||||||
.radio label .check:after {
|
.radio label .check:after {
|
||||||
|
@ -3573,16 +3471,12 @@ body .jumbotron-material-lightgrey,
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
-webkit-transform: scale(1.5);
|
|
||||||
-ms-transform: scale(1.5);
|
|
||||||
transform: scale(1.5);
|
transform: scale(1.5);
|
||||||
}
|
}
|
||||||
.radio label input[type=radio]:not(:checked) ~ .check:after {
|
.radio label input[type=radio]:not(:checked) ~ .check:after {
|
||||||
-webkit-animation: rippleOff 500ms;
|
|
||||||
animation: rippleOff 500ms;
|
animation: rippleOff 500ms;
|
||||||
}
|
}
|
||||||
.radio label input[type=radio]:checked ~ .check:after {
|
.radio label input[type=radio]:checked ~ .check:after {
|
||||||
-webkit-animation: rippleOn 500ms;
|
|
||||||
animation: rippleOn 500ms;
|
animation: rippleOn 500ms;
|
||||||
}
|
}
|
||||||
.radio input[type=radio]:checked ~ .check,
|
.radio input[type=radio]:checked ~ .check,
|
||||||
|
@ -3733,8 +3627,6 @@ body .jumbotron-material-lightgrey,
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.radio input[type=radio]:checked ~ .check {
|
.radio input[type=radio]:checked ~ .check {
|
||||||
-webkit-transform: scale(0.55);
|
|
||||||
-ms-transform: scale(0.55);
|
|
||||||
transform: scale(0.55);
|
transform: scale(0.55);
|
||||||
}
|
}
|
||||||
.radio input[type=radio][disabled] ~ .circle {
|
.radio input[type=radio][disabled] ~ .circle {
|
||||||
|
@ -3814,7 +3706,6 @@ select[multiple].form-control.focus {
|
||||||
}
|
}
|
||||||
.form-control-wrapper {
|
.form-control-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
/* active state */
|
|
||||||
}
|
}
|
||||||
.form-control-wrapper .form-control:focus,
|
.form-control-wrapper .form-control:focus,
|
||||||
.form-control-wrapper .form-control.focus {
|
.form-control-wrapper .form-control.focus {
|
||||||
|
@ -3827,7 +3718,6 @@ select[multiple].form-control.focus {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
-webkit-transition: 0.2s ease all;
|
|
||||||
transition: 0.2s ease all;
|
transition: 0.2s ease all;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
@ -3861,18 +3751,12 @@ select[multiple].form-control.focus {
|
||||||
height: 2px;
|
height: 2px;
|
||||||
background-color: #4285f4;
|
background-color: #4285f4;
|
||||||
bottom: -1px;
|
bottom: -1px;
|
||||||
-webkit-transform: scaleX(0);
|
|
||||||
-ms-transform: scaleX(0);
|
|
||||||
transform: scaleX(0);
|
transform: scaleX(0);
|
||||||
-webkit-transition: -webkit-transform 0s;
|
|
||||||
transition: transform 0s;
|
transition: transform 0s;
|
||||||
}
|
}
|
||||||
.form-control-wrapper .form-control:focus ~ .material-input:before,
|
.form-control-wrapper .form-control:focus ~ .material-input:before,
|
||||||
.form-control-wrapper .form-control.focus ~ .material-input:before {
|
.form-control-wrapper .form-control.focus ~ .material-input:before {
|
||||||
-webkit-transform: scaleX(1);
|
|
||||||
-ms-transform: scaleX(1);
|
|
||||||
transform: scaleX(1);
|
transform: scaleX(1);
|
||||||
-webkit-transition: -webkit-transform 0.2s ease-out;
|
|
||||||
transition: transform 0.2s ease-out;
|
transition: transform 0.2s ease-out;
|
||||||
}
|
}
|
||||||
.form-control-wrapper .material-input:after {
|
.form-control-wrapper .material-input:after {
|
||||||
|
@ -3885,8 +3769,6 @@ select[multiple].form-control.focus {
|
||||||
left: 0;
|
left: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
-webkit-transform-origin: left;
|
|
||||||
-ms-transform-origin: left;
|
|
||||||
transform-origin: left;
|
transform-origin: left;
|
||||||
}
|
}
|
||||||
.form-control-wrapper .input-lg ~ .material-input:after {
|
.form-control-wrapper .input-lg ~ .material-input:after {
|
||||||
|
@ -3900,12 +3782,19 @@ select[multiple].form-control.focus {
|
||||||
}
|
}
|
||||||
.form-control-wrapper .form-control:focus ~ .material-input:after,
|
.form-control-wrapper .form-control:focus ~ .material-input:after,
|
||||||
.form-control-wrapper .form-control.focus ~ .material-input:after {
|
.form-control-wrapper .form-control.focus ~ .material-input:after {
|
||||||
-webkit-animation: input-highlight 0.3s ease;
|
|
||||||
animation: input-highlight 0.3s ease;
|
animation: input-highlight 0.3s ease;
|
||||||
-webkit-animation-fill-mode: forwards;
|
|
||||||
animation-fill-mode: forwards;
|
animation-fill-mode: forwards;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
.form-control-wrapper .hint {
|
||||||
|
position: absolute;
|
||||||
|
font-size: 80%;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.form-control-wrapper .form-control:focus ~ .hint,
|
||||||
|
.form-control-wrapper .form-control.focus ~ .hint {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
.form-control-wrapper select ~ .material-input:after {
|
.form-control-wrapper select ~ .material-input:after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -4321,30 +4210,12 @@ select.form-control.focus {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border-color: #757575;
|
border-color: #757575;
|
||||||
}
|
}
|
||||||
@-webkit-keyframes input-highlight {
|
|
||||||
0% {
|
|
||||||
left: 20%;
|
|
||||||
-webkit-transform: scaleX(20%);
|
|
||||||
transform: scaleX(20%);
|
|
||||||
}
|
|
||||||
99% {
|
|
||||||
-webkit-transform: scaleX(0);
|
|
||||||
transform: scaleX(0);
|
|
||||||
left: 0;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@keyframes input-highlight {
|
@keyframes input-highlight {
|
||||||
0% {
|
0% {
|
||||||
left: 20%;
|
left: 20%;
|
||||||
-webkit-transform: scaleX(20%);
|
|
||||||
transform: scaleX(20%);
|
transform: scaleX(20%);
|
||||||
}
|
}
|
||||||
99% {
|
99% {
|
||||||
-webkit-transform: scaleX(0);
|
|
||||||
transform: scaleX(0);
|
transform: scaleX(0);
|
||||||
left: 0;
|
left: 0;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
@ -5327,20 +5198,14 @@ icon-material-lightgrey {
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
|
||||||
height: 0;
|
height: 0;
|
||||||
-webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, padding 0 linear 0.2s, height 0 linear 0.2s;
|
|
||||||
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, padding 0 linear 0.2s, height 0 linear 0.2s;
|
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, padding 0 linear 0.2s, height 0 linear 0.2s;
|
||||||
-webkit-transform: translateY(200%);
|
|
||||||
-ms-transform: translateY(200%);
|
|
||||||
transform: translateY(200%);
|
transform: translateY(200%);
|
||||||
}
|
}
|
||||||
.snackbar.snackbar-opened {
|
.snackbar.snackbar-opened {
|
||||||
padding: 14px 15px;
|
padding: 14px 15px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
height: auto;
|
height: auto;
|
||||||
-webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, height 0 linear 0.2s;
|
|
||||||
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, height 0 linear 0.2s;
|
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, height 0 linear 0.2s;
|
||||||
-webkit-transform: none;
|
|
||||||
-ms-transform: none;
|
|
||||||
transform: none;
|
transform: none;
|
||||||
}
|
}
|
||||||
.snackbar.toast {
|
.snackbar.toast {
|
||||||
|
@ -5350,9 +5215,6 @@ icon-material-lightgrey {
|
||||||
.noUi-target * {
|
.noUi-target * {
|
||||||
-webkit-touch-callout: none;
|
-webkit-touch-callout: none;
|
||||||
-ms-touch-action: none;
|
-ms-touch-action: none;
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
user-select: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
@ -5380,7 +5242,6 @@ icon-material-lightgrey {
|
||||||
*z-index: -1;
|
*z-index: -1;
|
||||||
}
|
}
|
||||||
.noUi-state-tap .noUi-origin {
|
.noUi-state-tap .noUi-origin {
|
||||||
-webkit-transition: left 0.3s, top 0.3s;
|
|
||||||
transition: left 0.3s, top 0.3s;
|
transition: left 0.3s, top 0.3s;
|
||||||
}
|
}
|
||||||
.noUi-state-drag * {
|
.noUi-state-drag * {
|
||||||
|
@ -5397,7 +5258,6 @@ icon-material-lightgrey {
|
||||||
top: -5px;
|
top: -5px;
|
||||||
cursor: ew-resize;
|
cursor: ew-resize;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
-webkit-transition: all 0.2s ease-out;
|
|
||||||
transition: all 0.2s ease-out;
|
transition: all 0.2s ease-out;
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
}
|
}
|
||||||
|
@ -5442,8 +5302,6 @@ icon-material-lightgrey {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.noUi-handle.noUi-active {
|
.noUi-handle.noUi-active {
|
||||||
-webkit-transform: scale(2.5);
|
|
||||||
-ms-transform: scale(2.5);
|
|
||||||
transform: scale(2.5);
|
transform: scale(2.5);
|
||||||
}
|
}
|
||||||
[disabled].noUi-slider {
|
[disabled].noUi-slider {
|
||||||
|
|
2
dist/css/material-wfont.min.css
vendored
2
dist/css/material-wfont.min.css
vendored
File diff suppressed because one or more lines are too long
10
dist/css/material.css
vendored
10
dist/css/material.css
vendored
|
@ -3699,7 +3699,6 @@ select[multiple].form-control.focus {
|
||||||
}
|
}
|
||||||
.form-control-wrapper {
|
.form-control-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
/* active state */
|
|
||||||
}
|
}
|
||||||
.form-control-wrapper .form-control:focus,
|
.form-control-wrapper .form-control:focus,
|
||||||
.form-control-wrapper .form-control.focus {
|
.form-control-wrapper .form-control.focus {
|
||||||
|
@ -3780,6 +3779,15 @@ select[multiple].form-control.focus {
|
||||||
animation-fill-mode: forwards;
|
animation-fill-mode: forwards;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
.form-control-wrapper .hint {
|
||||||
|
position: absolute;
|
||||||
|
font-size: 80%;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.form-control-wrapper .form-control:focus ~ .hint,
|
||||||
|
.form-control-wrapper .form-control.focus ~ .hint {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
.form-control-wrapper select ~ .material-input:after {
|
.form-control-wrapper select ~ .material-input:after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
2
dist/css/material.min.css
vendored
2
dist/css/material.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/js/material.min.js
vendored
2
dist/js/material.min.js
vendored
|
@ -1 +1 @@
|
||||||
!function(a){function b(a){return"undefined"==typeof a.which?!0:"number"==typeof a.which&&a.which>0?!a.ctrlKey&&!a.metaKey&&!a.altKey&&8!=a.which:!1}a.expr[":"].notmdproc=function(b){return a(b).data("mdproc")?!1:!0},a.material={options:{withRipples:[".btn:not(.btn-link)",".card-image",".navbar a:not(.withoutripple)",".dropdown-menu a",".nav-tabs a:not(.withoutripple)",".withripple"].join(","),inputElements:"input.form-control, textarea.form-control, select.form-control",checkboxElements:".checkbox > label > input[type=checkbox]",radioElements:".radio > label > input[type=radio]"},checkbox:function(b){a(b?b:this.options.checkboxElements).filter(":notmdproc").data("mdproc",!0).after("<span class=ripple></span><span class=check></span>")},radio:function(b){a(b?b:this.options.radioElements).filter(":notmdproc").data("mdproc",!0).after("<span class=circle></span><span class=check></span>")},input:function(c){a(c?c:this.options.inputElements).filter(":notmdproc").data("mdproc",!0).each(function(){var b=a(this);if(b.wrap("<div class=form-control-wrapper></div>"),b.after("<span class=material-input></span>"),b.hasClass("floating-label")){var c=b.attr("placeholder");b.attr("placeholder",null).removeClass("floating-label"),b.after("<div class=floating-label>"+c+"</div>")}if((null===b.val()||"undefined"==b.val()||""===b.val())&&b.addClass("empty"),b.parent().next().is("[type=file]")){b.parent().addClass("fileinput");var d=b.parent().next().detach();b.after(d)}}),a(document).on("change",".checkbox input[type=checkbox]",function(){a(this).blur()}).on("keydown paste",".form-control",function(c){b(c)&&a(this).removeClass("empty")}).on("keyup change",".form-control",function(){var b=a(this);""===b.val()?b.addClass("empty"):b.removeClass("empty")}).on("focus",".form-control-wrapper.fileinput",function(){a(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){a(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var b="";a.each(a(this)[0].files,function(a,c){console.log(c),b+=c.name+", "}),b=b.substring(0,b.length-2),b?a(this).prev().removeClass("empty"):a(this).prev().addClass("empty"),a(this).prev().val(b)})},ripples:function(a){ripples.init(a?a:this.options.withRipples)},init:function(){this.ripples(),this.input(),this.checkbox(),this.radio(),document.arrive&&document.arrive("input, textarea, select",function(){a.material.init()}),function(){var b=setInterval(function(){a("input").each(function(){a(this).val()!==a(this).attr("value")&&a(this).trigger("change")})},100);setTimeout(function(){clearInterval(b)},1e4);var c;a(document).on("focus","input",function(){var b=a(this).parents("form").find("input");c=setInterval(function(){b.each(function(){a(this).val()!==a(this).attr("value")&&a(this).trigger("change")})},100)}).on("blur","input",function(){clearInterval(c)})}()}}}(jQuery);
|
!function(a){function b(a){return"undefined"==typeof a.which?!0:"number"==typeof a.which&&a.which>0?!a.ctrlKey&&!a.metaKey&&!a.altKey&&8!=a.which:!1}a.expr[":"].notmdproc=function(b){return a(b).data("mdproc")?!1:!0},a.material={options:{withRipples:[".btn:not(.btn-link)",".card-image",".navbar a:not(.withoutripple)",".dropdown-menu a",".nav-tabs a:not(.withoutripple)",".withripple"].join(","),inputElements:"input.form-control, textarea.form-control, select.form-control",checkboxElements:".checkbox > label > input[type=checkbox]",radioElements:".radio > label > input[type=radio]"},checkbox:function(b){a(b?b:this.options.checkboxElements).filter(":notmdproc").data("mdproc",!0).after("<span class=ripple></span><span class=check></span>")},radio:function(b){a(b?b:this.options.radioElements).filter(":notmdproc").data("mdproc",!0).after("<span class=circle></span><span class=check></span>")},input:function(c){a(c?c:this.options.inputElements).filter(":notmdproc").data("mdproc",!0).each(function(){var b=a(this);if(b.wrap("<div class=form-control-wrapper></div>"),b.after("<span class=material-input></span>"),b.hasClass("floating-label")){var c=b.attr("placeholder");b.attr("placeholder",null).removeClass("floating-label"),b.after("<div class=floating-label>"+c+"</div>")}if(b.attr("data-hint")&&b.after("<div class=hint>"+b.attr("data-hint")+"</div>"),(null===b.val()||"undefined"==b.val()||""===b.val())&&b.addClass("empty"),b.parent().next().is("[type=file]")){b.parent().addClass("fileinput");var d=b.parent().next().detach();b.after(d)}}),a(document).on("change",".checkbox input[type=checkbox]",function(){a(this).blur()}).on("keydown paste",".form-control",function(c){b(c)&&a(this).removeClass("empty")}).on("keyup change",".form-control",function(){var b=a(this);""===b.val()?b.addClass("empty"):b.removeClass("empty")}).on("focus",".form-control-wrapper.fileinput",function(){a(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){a(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var b="";a.each(a(this)[0].files,function(a,c){console.log(c),b+=c.name+", "}),b=b.substring(0,b.length-2),b?a(this).prev().removeClass("empty"):a(this).prev().addClass("empty"),a(this).prev().val(b)})},ripples:function(a){ripples.init(a?a:this.options.withRipples)},init:function(){this.ripples(),this.input(),this.checkbox(),this.radio(),document.arrive&&document.arrive("input, textarea, select",function(){a.material.init()}),function(){var b=setInterval(function(){a("input").each(function(){a(this).val()!==a(this).attr("value")&&a(this).trigger("change")})},100);setTimeout(function(){clearInterval(b)},1e4);var c;a(document).on("focus","input",function(){var b=a(this).parents("form").find("input");c=setInterval(function(){b.each(function(){a(this).val()!==a(this).attr("value")&&a(this).trigger("change")})},100)}).on("blur","input",function(){clearInterval(c)})}()}}}(jQuery);
|
||||||
|
|
|
@ -1520,6 +1520,10 @@
|
||||||
<input class="form-control floating-label" id="focusedInput" type="text" placeholder="Write something to make the label float">
|
<input class="form-control floating-label" id="focusedInput" type="text" placeholder="Write something to make the label float">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input class="form-control floating-label" id="focusedInput" type="text" placeholder="Focus to show the hint" data-hint="You should really write something here">
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label" for="disabledInput">Disabled input</label>
|
<label class="control-label" for="disabledInput">Disabled input</label>
|
||||||
<input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here..." disabled="">
|
<input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here..." disabled="">
|
||||||
|
|
|
@ -95,13 +95,23 @@ select[multiple].form-control {
|
||||||
margin-top: -11px;
|
margin-top: -11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* active state */
|
// active state
|
||||||
.form-control:focus ~ .material-input:after, .form-control.focus ~ .material-input:after {
|
.form-control:focus ~ .material-input:after, .form-control.focus ~ .material-input:after {
|
||||||
animation: input-highlight 0.3s ease;
|
animation: input-highlight 0.3s ease;
|
||||||
animation-fill-mode: forwards;
|
animation-fill-mode: forwards;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hints
|
||||||
|
.hint {
|
||||||
|
position: absolute;
|
||||||
|
font-size: 80%;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.form-control:focus ~ .hint, .form-control.focus ~ .hint {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
select ~ .material-input:after {
|
select ~ .material-input:after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,14 +55,25 @@
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
$this.wrap("<div class=form-control-wrapper></div>");
|
$this.wrap("<div class=form-control-wrapper></div>");
|
||||||
$this.after("<span class=material-input></span>");
|
$this.after("<span class=material-input></span>");
|
||||||
|
|
||||||
|
// Add floating label if required
|
||||||
if ($this.hasClass("floating-label")) {
|
if ($this.hasClass("floating-label")) {
|
||||||
var placeholder = $this.attr("placeholder");
|
var placeholder = $this.attr("placeholder");
|
||||||
$this.attr("placeholder", null).removeClass("floating-label");
|
$this.attr("placeholder", null).removeClass("floating-label");
|
||||||
$this.after("<div class=floating-label>" + placeholder + "</div>");
|
$this.after("<div class=floating-label>" + placeholder + "</div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add hint label if required
|
||||||
|
if ($this.attr("data-hint")) {
|
||||||
|
$this.after("<div class=hint>" + $this.attr("data-hint") + "</div>");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set as empty if is empty (damn I must improve this...)
|
||||||
if ($this.val() === null || $this.val() == "undefined" || $this.val() === "") {
|
if ($this.val() === null || $this.val() == "undefined" || $this.val() === "") {
|
||||||
$this.addClass("empty");
|
$this.addClass("empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Support for file input
|
||||||
if ($this.parent().next().is("[type=file]")) {
|
if ($this.parent().next().is("[type=file]")) {
|
||||||
$this.parent().addClass("fileinput");
|
$this.parent().addClass("fileinput");
|
||||||
var $input = $this.parent().next().detach();
|
var $input = $this.parent().next().detach();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user