administrate-materialize-theme 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +49 -0
- data/Rakefile +1 -0
- data/app/assets/javascripts/administrate-materialize-theme/anime.min.js +34 -0
- data/app/assets/javascripts/administrate-materialize-theme/autocomplete.js +450 -0
- data/app/assets/javascripts/administrate-materialize-theme/bin/materialize.js +12374 -0
- data/app/assets/javascripts/administrate-materialize-theme/bin/materialize.min.js +6 -0
- data/app/assets/javascripts/administrate-materialize-theme/buttons.js +354 -0
- data/app/assets/javascripts/administrate-materialize-theme/cards.js +40 -0
- data/app/assets/javascripts/administrate-materialize-theme/carousel.js +717 -0
- data/app/assets/javascripts/administrate-materialize-theme/cash.js +960 -0
- data/app/assets/javascripts/administrate-materialize-theme/characterCounter.js +136 -0
- data/app/assets/javascripts/administrate-materialize-theme/chips.js +481 -0
- data/app/assets/javascripts/administrate-materialize-theme/collapsible.js +275 -0
- data/app/assets/javascripts/administrate-materialize-theme/component.js +44 -0
- data/app/assets/javascripts/administrate-materialize-theme/datepicker.js +975 -0
- data/app/assets/javascripts/administrate-materialize-theme/dropdown.js +617 -0
- data/app/assets/javascripts/administrate-materialize-theme/forms.js +275 -0
- data/app/assets/javascripts/administrate-materialize-theme/global.js +427 -0
- data/app/assets/javascripts/administrate-materialize-theme/materialbox.js +453 -0
- data/app/assets/javascripts/administrate-materialize-theme/modal.js +382 -0
- data/app/assets/javascripts/administrate-materialize-theme/parallax.js +138 -0
- data/app/assets/javascripts/administrate-materialize-theme/pushpin.js +145 -0
- data/app/assets/javascripts/administrate-materialize-theme/range.js +263 -0
- data/app/assets/javascripts/administrate-materialize-theme/scrollspy.js +295 -0
- data/app/assets/javascripts/administrate-materialize-theme/select.js +432 -0
- data/app/assets/javascripts/administrate-materialize-theme/sidenav.js +580 -0
- data/app/assets/javascripts/administrate-materialize-theme/slider.js +359 -0
- data/app/assets/javascripts/administrate-materialize-theme/tabs.js +402 -0
- data/app/assets/javascripts/administrate-materialize-theme/tapTarget.js +314 -0
- data/app/assets/javascripts/administrate-materialize-theme/theme.js +6 -0
- data/app/assets/javascripts/administrate-materialize-theme/timepicker.js +647 -0
- data/app/assets/javascripts/administrate-materialize-theme/toasts.js +310 -0
- data/app/assets/javascripts/administrate-materialize-theme/tooltip.js +303 -0
- data/app/assets/javascripts/administrate-materialize-theme/waves.js +335 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_badges.scss +55 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_buttons.scss +322 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_cards.scss +195 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_carousel.scss +90 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_chips.scss +90 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_collapsible.scss +91 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_color-classes.scss +32 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_color-variables.scss +370 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_datepicker.scss +191 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_dropdown.scss +85 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_global.scss +769 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_grid.scss +156 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_icons-material-design.scss +5 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_materialbox.scss +43 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_modal.scss +94 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_navbar.scss +208 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_normalize.scss +447 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_preloader.scss +334 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_pulse.scss +34 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_sidenav.scss +216 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_slider.scss +92 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_table_of_contents.scss +33 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_tabs.scss +99 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_tapTarget.scss +103 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_timepicker.scss +183 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_toast.scss +58 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_tooltip.scss +32 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_transitions.scss +13 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_typography.scss +60 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_variables.scss +349 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/_waves.scss +114 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_checkboxes.scss +200 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_file-input.scss +44 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_forms.scss +22 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_input-fields.scss +354 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_radio-buttons.scss +115 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_range.scss +161 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_select.scss +180 -0
- data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_switches.scss +89 -0
- data/app/assets/stylesheets/administrate-materialize-theme/materialize.scss +41 -0
- data/app/assets/stylesheets/administrate-materialize-theme/theme.scss +200 -0
- data/lib/administrate-materialize-theme.rb +6 -0
- data/lib/administrate-materialize-theme/engine.rb +7 -0
- data/lib/administrate-materialize-theme/version.rb +5 -0
- metadata +150 -0
@@ -0,0 +1,200 @@
|
|
1
|
+
/* Checkboxes
|
2
|
+
========================================================================== */
|
3
|
+
|
4
|
+
/* Remove default checkbox */
|
5
|
+
[type="checkbox"]:not(:checked),
|
6
|
+
[type="checkbox"]:checked {
|
7
|
+
position: absolute;
|
8
|
+
opacity: 0;
|
9
|
+
pointer-events: none;
|
10
|
+
}
|
11
|
+
|
12
|
+
// Checkbox Styles
|
13
|
+
[type="checkbox"] {
|
14
|
+
// Text Label Style
|
15
|
+
+ span:not(.lever) {
|
16
|
+
position: relative;
|
17
|
+
padding-left: 35px;
|
18
|
+
cursor: pointer;
|
19
|
+
display: inline-block;
|
20
|
+
height: 25px;
|
21
|
+
line-height: 25px;
|
22
|
+
font-size: 1rem;
|
23
|
+
user-select: none;
|
24
|
+
}
|
25
|
+
|
26
|
+
/* checkbox aspect */
|
27
|
+
+ span:not(.lever):before,
|
28
|
+
&:not(.filled-in) + span:not(.lever):after {
|
29
|
+
content: '';
|
30
|
+
position: absolute;
|
31
|
+
top: 0;
|
32
|
+
left: 0;
|
33
|
+
width: 18px;
|
34
|
+
height: 18px;
|
35
|
+
z-index: 0;
|
36
|
+
border: 2px solid $radio-empty-color;
|
37
|
+
border-radius: 1px;
|
38
|
+
margin-top: 3px;
|
39
|
+
transition: .2s;
|
40
|
+
}
|
41
|
+
|
42
|
+
&:not(.filled-in) + span:not(.lever):after {
|
43
|
+
border: 0;
|
44
|
+
transform: scale(0);
|
45
|
+
}
|
46
|
+
|
47
|
+
&:not(:checked):disabled + span:not(.lever):before {
|
48
|
+
border: none;
|
49
|
+
background-color: $input-disabled-color;
|
50
|
+
}
|
51
|
+
|
52
|
+
// Focused styles
|
53
|
+
&.tabbed:focus + span:not(.lever):after {
|
54
|
+
transform: scale(1);
|
55
|
+
border: 0;
|
56
|
+
border-radius: 50%;
|
57
|
+
box-shadow: 0 0 0 10px rgba(0,0,0,.1);
|
58
|
+
background-color: rgba(0,0,0,.1);
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
[type="checkbox"]:checked {
|
63
|
+
+ span:not(.lever):before {
|
64
|
+
top: -4px;
|
65
|
+
left: -5px;
|
66
|
+
width: 12px;
|
67
|
+
height: 22px;
|
68
|
+
border-top: 2px solid transparent;
|
69
|
+
border-left: 2px solid transparent;
|
70
|
+
border-right: $radio-border;
|
71
|
+
border-bottom: $radio-border;
|
72
|
+
transform: rotate(40deg);
|
73
|
+
backface-visibility: hidden;
|
74
|
+
transform-origin: 100% 100%;
|
75
|
+
}
|
76
|
+
|
77
|
+
&:disabled + span:before {
|
78
|
+
border-right: 2px solid $input-disabled-color;
|
79
|
+
border-bottom: 2px solid $input-disabled-color;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
/* Indeterminate checkbox */
|
84
|
+
[type="checkbox"]:indeterminate {
|
85
|
+
+ span:not(.lever):before {
|
86
|
+
top: -11px;
|
87
|
+
left: -12px;
|
88
|
+
width: 10px;
|
89
|
+
height: 22px;
|
90
|
+
border-top: none;
|
91
|
+
border-left: none;
|
92
|
+
border-right: $radio-border;
|
93
|
+
border-bottom: none;
|
94
|
+
transform: rotate(90deg);
|
95
|
+
backface-visibility: hidden;
|
96
|
+
transform-origin: 100% 100%;
|
97
|
+
}
|
98
|
+
|
99
|
+
// Disabled indeterminate
|
100
|
+
&:disabled + span:not(.lever):before {
|
101
|
+
border-right: 2px solid $input-disabled-color;
|
102
|
+
background-color: transparent;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
// Filled in Style
|
107
|
+
[type="checkbox"].filled-in {
|
108
|
+
// General
|
109
|
+
+ span:not(.lever):after {
|
110
|
+
border-radius: 2px;
|
111
|
+
}
|
112
|
+
|
113
|
+
+ span:not(.lever):before,
|
114
|
+
+ span:not(.lever):after {
|
115
|
+
content: '';
|
116
|
+
left: 0;
|
117
|
+
position: absolute;
|
118
|
+
/* .1s delay is for check animation */
|
119
|
+
transition: border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s;
|
120
|
+
z-index: 1;
|
121
|
+
}
|
122
|
+
|
123
|
+
// Unchecked style
|
124
|
+
&:not(:checked) + span:not(.lever):before {
|
125
|
+
width: 0;
|
126
|
+
height: 0;
|
127
|
+
border: 3px solid transparent;
|
128
|
+
left: 6px;
|
129
|
+
top: 10px;
|
130
|
+
transform: rotateZ(37deg);
|
131
|
+
transform-origin: 100% 100%;
|
132
|
+
}
|
133
|
+
|
134
|
+
&:not(:checked) + span:not(.lever):after {
|
135
|
+
height: 20px;
|
136
|
+
width: 20px;
|
137
|
+
background-color: transparent;
|
138
|
+
border: 2px solid $radio-empty-color;
|
139
|
+
top: 0px;
|
140
|
+
z-index: 0;
|
141
|
+
}
|
142
|
+
|
143
|
+
// Checked style
|
144
|
+
&:checked {
|
145
|
+
+ span:not(.lever):before {
|
146
|
+
top: 0;
|
147
|
+
left: 1px;
|
148
|
+
width: 8px;
|
149
|
+
height: 13px;
|
150
|
+
border-top: 2px solid transparent;
|
151
|
+
border-left: 2px solid transparent;
|
152
|
+
border-right: 2px solid $input-background;
|
153
|
+
border-bottom: 2px solid $input-background;
|
154
|
+
transform: rotateZ(37deg);
|
155
|
+
transform-origin: 100% 100%;
|
156
|
+
}
|
157
|
+
|
158
|
+
+ span:not(.lever):after {
|
159
|
+
top: 0;
|
160
|
+
width: 20px;
|
161
|
+
height: 20px;
|
162
|
+
border: 2px solid $secondary-color;
|
163
|
+
background-color: $secondary-color;
|
164
|
+
z-index: 0;
|
165
|
+
}
|
166
|
+
}
|
167
|
+
|
168
|
+
// Focused styles
|
169
|
+
&.tabbed:focus + span:not(.lever):after {
|
170
|
+
border-radius: 2px;
|
171
|
+
border-color: $radio-empty-color;
|
172
|
+
background-color: rgba(0,0,0,.1);
|
173
|
+
}
|
174
|
+
|
175
|
+
&.tabbed:checked:focus + span:not(.lever):after {
|
176
|
+
border-radius: 2px;
|
177
|
+
background-color: $secondary-color;
|
178
|
+
border-color: $secondary-color;
|
179
|
+
}
|
180
|
+
|
181
|
+
// Disabled style
|
182
|
+
&:disabled:not(:checked) + span:not(.lever):before {
|
183
|
+
background-color: transparent;
|
184
|
+
border: 2px solid transparent;
|
185
|
+
}
|
186
|
+
|
187
|
+
&:disabled:not(:checked) + span:not(.lever):after {
|
188
|
+
border-color: transparent;
|
189
|
+
background-color: $input-disabled-solid-color;
|
190
|
+
}
|
191
|
+
|
192
|
+
&:disabled:checked + span:not(.lever):before {
|
193
|
+
background-color: transparent;
|
194
|
+
}
|
195
|
+
|
196
|
+
&:disabled:checked + span:not(.lever):after {
|
197
|
+
background-color: $input-disabled-solid-color;
|
198
|
+
border-color: $input-disabled-solid-color;
|
199
|
+
}
|
200
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
/* File Input
|
2
|
+
========================================================================== */
|
3
|
+
|
4
|
+
.file-field {
|
5
|
+
position: relative;
|
6
|
+
|
7
|
+
.file-path-wrapper {
|
8
|
+
overflow: hidden;
|
9
|
+
padding-left: 10px;
|
10
|
+
}
|
11
|
+
|
12
|
+
input.file-path { width: 100%; }
|
13
|
+
|
14
|
+
.btn {
|
15
|
+
float: left;
|
16
|
+
height: $input-height;
|
17
|
+
line-height: $input-height;
|
18
|
+
}
|
19
|
+
|
20
|
+
span {
|
21
|
+
cursor: pointer;
|
22
|
+
}
|
23
|
+
|
24
|
+
input[type=file] {
|
25
|
+
|
26
|
+
// Needed to override webkit button
|
27
|
+
&::-webkit-file-upload-button {
|
28
|
+
display: none;
|
29
|
+
}
|
30
|
+
|
31
|
+
position: absolute;
|
32
|
+
top: 0;
|
33
|
+
right: 0;
|
34
|
+
left: 0;
|
35
|
+
bottom: 0;
|
36
|
+
width: 100%;
|
37
|
+
margin: 0;
|
38
|
+
padding: 0;
|
39
|
+
font-size: 20px;
|
40
|
+
cursor: pointer;
|
41
|
+
opacity: 0;
|
42
|
+
filter: alpha(opacity=0);
|
43
|
+
}
|
44
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// Remove Focus Boxes
|
2
|
+
select:focus {
|
3
|
+
outline: $select-focus;
|
4
|
+
}
|
5
|
+
|
6
|
+
button:focus {
|
7
|
+
outline: none;
|
8
|
+
background-color: $button-background-focus;
|
9
|
+
}
|
10
|
+
|
11
|
+
label {
|
12
|
+
font-size: $label-font-size;
|
13
|
+
color: $input-border-color;
|
14
|
+
}
|
15
|
+
|
16
|
+
@import 'input-fields';
|
17
|
+
@import 'radio-buttons';
|
18
|
+
@import 'checkboxes';
|
19
|
+
@import 'switches';
|
20
|
+
@import 'select';
|
21
|
+
@import 'file-input';
|
22
|
+
@import 'range';
|
data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_input-fields.scss
ADDED
@@ -0,0 +1,354 @@
|
|
1
|
+
/* Text Inputs + Textarea
|
2
|
+
========================================================================== */
|
3
|
+
|
4
|
+
/* Style Placeholders */
|
5
|
+
|
6
|
+
::placeholder {
|
7
|
+
color: $placeholder-text-color;
|
8
|
+
}
|
9
|
+
|
10
|
+
/* Text inputs */
|
11
|
+
|
12
|
+
input:not([type]),
|
13
|
+
input[type=text]:not(.browser-default),
|
14
|
+
input[type=password]:not(.browser-default),
|
15
|
+
input[type=email]:not(.browser-default),
|
16
|
+
input[type=url]:not(.browser-default),
|
17
|
+
input[type=time]:not(.browser-default),
|
18
|
+
input[type=date]:not(.browser-default),
|
19
|
+
input[type=datetime]:not(.browser-default),
|
20
|
+
input[type=datetime-local]:not(.browser-default),
|
21
|
+
input[type=tel]:not(.browser-default),
|
22
|
+
input[type=number]:not(.browser-default),
|
23
|
+
input[type=search]:not(.browser-default),
|
24
|
+
textarea.materialize-textarea {
|
25
|
+
|
26
|
+
// General Styles
|
27
|
+
background-color: transparent;
|
28
|
+
border: none;
|
29
|
+
border-bottom: $input-border;
|
30
|
+
border-radius: 0;
|
31
|
+
outline: none;
|
32
|
+
height: $input-height;
|
33
|
+
width: 100%;
|
34
|
+
font-size: $input-font-size;
|
35
|
+
margin: $input-margin;
|
36
|
+
padding: $input-padding;
|
37
|
+
box-shadow: none;
|
38
|
+
box-sizing: content-box;
|
39
|
+
transition: box-shadow .3s, border .3s;
|
40
|
+
|
41
|
+
// Disabled input style
|
42
|
+
&:disabled,
|
43
|
+
&[readonly="readonly"] {
|
44
|
+
color: $input-disabled-color;
|
45
|
+
border-bottom: $input-disabled-border;
|
46
|
+
}
|
47
|
+
|
48
|
+
// Disabled label style
|
49
|
+
&:disabled+label,
|
50
|
+
&[readonly="readonly"]+label {
|
51
|
+
color: $input-disabled-color;
|
52
|
+
}
|
53
|
+
|
54
|
+
// Focused input style
|
55
|
+
&:focus:not([readonly]) {
|
56
|
+
border-bottom: 1px solid $input-focus-color;
|
57
|
+
box-shadow: 0 1px 0 0 $input-focus-color;
|
58
|
+
}
|
59
|
+
|
60
|
+
// Focused label style
|
61
|
+
&:focus:not([readonly])+label {
|
62
|
+
color: $input-focus-color;
|
63
|
+
}
|
64
|
+
|
65
|
+
// Hide helper text on data message
|
66
|
+
&.valid ~ .helper-text[data-success],
|
67
|
+
&:focus.valid ~ .helper-text[data-success],
|
68
|
+
&.invalid ~ .helper-text[data-error],
|
69
|
+
&:focus.invalid ~ .helper-text[data-error] {
|
70
|
+
@extend %hidden-text;
|
71
|
+
}
|
72
|
+
|
73
|
+
// Valid Input Style
|
74
|
+
&.valid,
|
75
|
+
&:focus.valid {
|
76
|
+
@extend %valid-input-style;
|
77
|
+
}
|
78
|
+
|
79
|
+
// Custom Success Message
|
80
|
+
&.valid ~ .helper-text:after,
|
81
|
+
&:focus.valid ~ .helper-text:after {
|
82
|
+
@extend %custom-success-message;
|
83
|
+
}
|
84
|
+
&:focus.valid ~ label {
|
85
|
+
color: $input-success-color;
|
86
|
+
}
|
87
|
+
|
88
|
+
// Invalid Input Style
|
89
|
+
&.invalid,
|
90
|
+
&:focus.invalid {
|
91
|
+
@extend %invalid-input-style;
|
92
|
+
}
|
93
|
+
|
94
|
+
// Custom Error message
|
95
|
+
&.invalid ~ .helper-text:after,
|
96
|
+
&:focus.invalid ~ .helper-text:after {
|
97
|
+
@extend %custom-error-message;
|
98
|
+
}
|
99
|
+
&:focus.invalid ~ label {
|
100
|
+
color: $input-error-color;
|
101
|
+
}
|
102
|
+
|
103
|
+
// Full width label when using validate for error messages
|
104
|
+
&.validate + label {
|
105
|
+
width: 100%;
|
106
|
+
}
|
107
|
+
|
108
|
+
// Form Message Shared Styles
|
109
|
+
& + label:after {
|
110
|
+
@extend %input-after-style;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
|
115
|
+
/* Validation Sass Placeholders */
|
116
|
+
%valid-input-style {
|
117
|
+
border-bottom: 1px solid $input-success-color;
|
118
|
+
box-shadow: 0 1px 0 0 $input-success-color;
|
119
|
+
}
|
120
|
+
%invalid-input-style {
|
121
|
+
border-bottom: $input-invalid-border;
|
122
|
+
box-shadow: 0 1px 0 0 $input-error-color;
|
123
|
+
}
|
124
|
+
%hidden-text {
|
125
|
+
color: transparent;
|
126
|
+
user-select: none;
|
127
|
+
pointer-events: none;
|
128
|
+
}
|
129
|
+
%custom-success-message {
|
130
|
+
content: attr(data-success);
|
131
|
+
color: $input-success-color;
|
132
|
+
}
|
133
|
+
%custom-error-message {
|
134
|
+
content: attr(data-error);
|
135
|
+
color: $input-error-color;
|
136
|
+
}
|
137
|
+
%input-after-style {
|
138
|
+
display: block;
|
139
|
+
content: "";
|
140
|
+
position: absolute;
|
141
|
+
top: 100%;
|
142
|
+
left: 0;
|
143
|
+
opacity: 0;
|
144
|
+
transition: .2s opacity ease-out, .2s color ease-out;
|
145
|
+
}
|
146
|
+
|
147
|
+
|
148
|
+
// Styling for input field wrapper
|
149
|
+
.input-field {
|
150
|
+
// Inline styles
|
151
|
+
&.inline {
|
152
|
+
display: inline-block;
|
153
|
+
vertical-align: middle;
|
154
|
+
margin-left: 5px;
|
155
|
+
|
156
|
+
input,
|
157
|
+
.select-dropdown {
|
158
|
+
margin-bottom: 1rem;
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
// Gutter spacing
|
163
|
+
&.col {
|
164
|
+
label {
|
165
|
+
left: $gutter-width / 2;
|
166
|
+
}
|
167
|
+
|
168
|
+
.prefix ~ label,
|
169
|
+
.prefix ~ .validate ~ label {
|
170
|
+
width: calc(100% - 3rem - #{$gutter-width});
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
position: relative;
|
175
|
+
margin-top: 1rem;
|
176
|
+
margin-bottom: 1rem;
|
177
|
+
|
178
|
+
& > label {
|
179
|
+
color: $input-border-color;
|
180
|
+
position: absolute;
|
181
|
+
top: 0;
|
182
|
+
left: 0;
|
183
|
+
font-size: 1rem;
|
184
|
+
cursor: text;
|
185
|
+
transition: transform .2s ease-out, color .2s ease-out;
|
186
|
+
transform-origin: 0% 100%;
|
187
|
+
text-align: initial;
|
188
|
+
transform: translateY(12px);
|
189
|
+
|
190
|
+
&:not(.label-icon).active {
|
191
|
+
transform: translateY(-14px) scale(.8);
|
192
|
+
transform-origin: 0 0;
|
193
|
+
}
|
194
|
+
}
|
195
|
+
|
196
|
+
// Autofill + date + time inputs
|
197
|
+
& > input[type]:-webkit-autofill:not(.browser-default):not([type="search"]) + label,
|
198
|
+
& > input[type=date]:not(.browser-default) + label,
|
199
|
+
& > input[type=time]:not(.browser-default) + label {
|
200
|
+
transform: translateY(-14px) scale(.8);
|
201
|
+
transform-origin: 0 0;
|
202
|
+
}
|
203
|
+
|
204
|
+
.helper-text {
|
205
|
+
&::after {
|
206
|
+
opacity: 1;
|
207
|
+
position: absolute;
|
208
|
+
top: 0;
|
209
|
+
left: 0;
|
210
|
+
}
|
211
|
+
|
212
|
+
position: relative;
|
213
|
+
min-height: 18px;
|
214
|
+
display: block;
|
215
|
+
font-size: 12px;
|
216
|
+
color: rgba(0,0,0,.54);
|
217
|
+
}
|
218
|
+
|
219
|
+
// Prefix Icons
|
220
|
+
.prefix {
|
221
|
+
position: absolute;
|
222
|
+
width: $input-height;
|
223
|
+
font-size: $input-icon-size;
|
224
|
+
transition: color .2s;
|
225
|
+
top: ($input-height - $input-icon-size) / 2;
|
226
|
+
|
227
|
+
&.active { color: $input-focus-color; }
|
228
|
+
}
|
229
|
+
|
230
|
+
.prefix ~ input,
|
231
|
+
.prefix ~ textarea,
|
232
|
+
.prefix ~ label,
|
233
|
+
.prefix ~ .validate ~ label,
|
234
|
+
.prefix ~ .helper-text,
|
235
|
+
.prefix ~ .autocomplete-content {
|
236
|
+
margin-left: 3rem;
|
237
|
+
width: 92%;
|
238
|
+
width: calc(100% - 3rem);
|
239
|
+
}
|
240
|
+
|
241
|
+
.prefix ~ label { margin-left: 3rem; }
|
242
|
+
|
243
|
+
@media #{$medium-and-down} {
|
244
|
+
.prefix ~ input {
|
245
|
+
width: 86%;
|
246
|
+
width: calc(100% - 3rem);
|
247
|
+
}
|
248
|
+
}
|
249
|
+
|
250
|
+
@media #{$small-and-down} {
|
251
|
+
.prefix ~ input {
|
252
|
+
width: 80%;
|
253
|
+
width: calc(100% - 3rem);
|
254
|
+
}
|
255
|
+
}
|
256
|
+
}
|
257
|
+
|
258
|
+
|
259
|
+
/* Search Field */
|
260
|
+
|
261
|
+
.input-field input[type=search] {
|
262
|
+
display: block;
|
263
|
+
line-height: inherit;
|
264
|
+
transition: .3s background-color;
|
265
|
+
|
266
|
+
.nav-wrapper & {
|
267
|
+
height: inherit;
|
268
|
+
padding-left: 4rem;
|
269
|
+
width: calc(100% - 4rem);
|
270
|
+
border: 0;
|
271
|
+
box-shadow: none;
|
272
|
+
}
|
273
|
+
|
274
|
+
&:focus:not(.browser-default) {
|
275
|
+
background-color: $input-background;
|
276
|
+
border: 0;
|
277
|
+
box-shadow: none;
|
278
|
+
color: #444;
|
279
|
+
|
280
|
+
& + label i,
|
281
|
+
& ~ .mdi-navigation-close,
|
282
|
+
& ~ .material-icons {
|
283
|
+
color: #444;
|
284
|
+
}
|
285
|
+
}
|
286
|
+
|
287
|
+
& + .label-icon {
|
288
|
+
transform: none;
|
289
|
+
left: 1rem;
|
290
|
+
}
|
291
|
+
|
292
|
+
& ~ .mdi-navigation-close,
|
293
|
+
& ~ .material-icons {
|
294
|
+
position: absolute;
|
295
|
+
top: 0;
|
296
|
+
right: 1rem;
|
297
|
+
color: transparent;
|
298
|
+
cursor: pointer;
|
299
|
+
font-size: $input-icon-size;
|
300
|
+
transition: .3s color;
|
301
|
+
}
|
302
|
+
}
|
303
|
+
|
304
|
+
|
305
|
+
/* Textarea */
|
306
|
+
|
307
|
+
// Default textarea
|
308
|
+
textarea {
|
309
|
+
width: 100%;
|
310
|
+
height: $input-height;
|
311
|
+
background-color: transparent;
|
312
|
+
|
313
|
+
&.materialize-textarea {
|
314
|
+
line-height: normal;
|
315
|
+
overflow-y: hidden; /* prevents scroll bar flash */
|
316
|
+
padding: .8rem 0 .8rem 0; /* prevents text jump on Enter keypress */
|
317
|
+
resize: none;
|
318
|
+
min-height: $input-height;
|
319
|
+
box-sizing: border-box;
|
320
|
+
}
|
321
|
+
}
|
322
|
+
|
323
|
+
// For textarea autoresize
|
324
|
+
.hiddendiv {
|
325
|
+
visibility: hidden;
|
326
|
+
white-space: pre-wrap;
|
327
|
+
word-wrap: break-word;
|
328
|
+
overflow-wrap: break-word; /* future version of deprecated 'word-wrap' */
|
329
|
+
padding-top: 1.2rem; /* prevents text jump on Enter keypress */
|
330
|
+
|
331
|
+
// Reduces repaints
|
332
|
+
position: absolute;
|
333
|
+
top: 0;
|
334
|
+
z-index: -1;
|
335
|
+
}
|
336
|
+
|
337
|
+
|
338
|
+
/* Autocomplete */
|
339
|
+
.autocomplete-content {
|
340
|
+
li {
|
341
|
+
.highlight { color: #444; }
|
342
|
+
|
343
|
+
img {
|
344
|
+
height: $dropdown-item-height - 10;
|
345
|
+
width: $dropdown-item-height - 10;
|
346
|
+
margin: 5px 15px;
|
347
|
+
}
|
348
|
+
}
|
349
|
+
}
|
350
|
+
|
351
|
+
/* Character Counter */
|
352
|
+
.character-counter {
|
353
|
+
min-height: 18px;
|
354
|
+
}
|