@materializecss/materialize 1.2.0 → 1.2.1
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/Gruntfile.js +722 -712
- package/LICENSE +21 -21
- package/README.md +91 -91
- package/dist/css/materialize.css +68 -135
- package/dist/css/materialize.min.css +12 -12
- package/dist/js/materialize.js +1112 -1112
- package/dist/js/materialize.min.js +6 -6
- package/extras/noUiSlider/nouislider.css +403 -403
- package/extras/noUiSlider/nouislider.js +2147 -2147
- package/js/anime.min.js +34 -34
- package/js/autocomplete.js +479 -479
- package/js/buttons.js +354 -354
- package/js/cards.js +40 -40
- package/js/carousel.js +732 -732
- package/js/cash.js +960 -960
- package/js/characterCounter.js +136 -136
- package/js/chips.js +486 -486
- package/js/collapsible.js +275 -275
- package/js/component.js +44 -44
- package/js/datepicker.js +983 -983
- package/js/dropdown.js +669 -669
- package/js/forms.js +285 -285
- package/js/global.js +428 -428
- package/js/materialbox.js +453 -453
- package/js/modal.js +382 -382
- package/js/parallax.js +138 -138
- package/js/pushpin.js +148 -148
- package/js/range.js +263 -263
- package/js/scrollspy.js +295 -295
- package/js/select.js +391 -391
- package/js/sidenav.js +583 -583
- package/js/slider.js +359 -359
- package/js/tabs.js +402 -402
- package/js/tapTarget.js +315 -315
- package/js/timepicker.js +712 -712
- package/js/toasts.js +325 -325
- package/js/tooltip.js +320 -320
- package/js/waves.js +614 -614
- package/package.json +87 -84
- package/sass/_style.scss +929 -929
- package/sass/components/_badges.scss +55 -55
- package/sass/components/_buttons.scss +322 -322
- package/sass/components/_cards.scss +195 -195
- package/sass/components/_carousel.scss +90 -90
- package/sass/components/_chips.scss +96 -96
- package/sass/components/_collapsible.scss +91 -91
- package/sass/components/_collection.scss +106 -106
- package/sass/components/_color-classes.scss +32 -32
- package/sass/components/_color-variables.scss +370 -370
- package/sass/components/_datepicker.scss +191 -191
- package/sass/components/_dropdown.scss +84 -84
- package/sass/components/_global.scss +646 -646
- package/sass/components/_grid.scss +158 -158
- package/sass/components/_icons-material-design.scss +5 -5
- package/sass/components/_materialbox.scss +42 -42
- package/sass/components/_modal.scss +97 -97
- package/sass/components/_navbar.scss +208 -208
- package/sass/components/_normalize.scss +447 -447
- package/sass/components/_preloader.scss +334 -334
- package/sass/components/_pulse.scss +34 -34
- package/sass/components/_sidenav.scss +214 -214
- package/sass/components/_slider.scss +91 -91
- package/sass/components/_table_of_contents.scss +33 -33
- package/sass/components/_tabs.scss +99 -99
- package/sass/components/_tapTarget.scss +103 -103
- package/sass/components/_timepicker.scss +199 -199
- package/sass/components/_toast.scss +58 -58
- package/sass/components/_tooltip.scss +32 -32
- package/sass/components/_transitions.scss +12 -12
- package/sass/components/_typography.scss +62 -62
- package/sass/components/_variables.scss +352 -352
- package/sass/components/_waves.scss +187 -187
- package/sass/components/forms/_checkboxes.scss +200 -200
- package/sass/components/forms/_file-input.scss +44 -44
- package/sass/components/forms/_forms.scss +22 -22
- package/sass/components/forms/_input-fields.scss +388 -388
- package/sass/components/forms/_radio-buttons.scss +115 -115
- package/sass/components/forms/_range.scss +161 -161
- package/sass/components/forms/_select.scss +199 -199
- package/sass/components/forms/_switches.scss +91 -91
- package/sass/ghpages-materialize.scss +7 -7
- package/sass/materialize.scss +42 -42
|
@@ -1,388 +1,388 @@
|
|
|
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]):not(.browser-default),
|
|
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=month]:not(.browser-default),
|
|
22
|
-
input[type=tel]:not(.browser-default),
|
|
23
|
-
input[type=number]:not(.browser-default),
|
|
24
|
-
input[type=search]:not(.browser-default),
|
|
25
|
-
textarea.materialize-textarea {
|
|
26
|
-
|
|
27
|
-
// General Styles
|
|
28
|
-
background-color: transparent;
|
|
29
|
-
border: none;
|
|
30
|
-
border-bottom: $input-border;
|
|
31
|
-
border-radius: 0;
|
|
32
|
-
outline: none;
|
|
33
|
-
height: $input-height;
|
|
34
|
-
width: 100%;
|
|
35
|
-
font-size: $input-font-size;
|
|
36
|
-
margin: $input-margin;
|
|
37
|
-
padding: $input-padding;
|
|
38
|
-
box-shadow: none;
|
|
39
|
-
box-sizing: content-box;
|
|
40
|
-
transition: box-shadow .3s, border .3s;
|
|
41
|
-
|
|
42
|
-
// Disabled input style
|
|
43
|
-
&:disabled,
|
|
44
|
-
&[readonly="readonly"] {
|
|
45
|
-
color: $input-disabled-color;
|
|
46
|
-
border-bottom: $input-disabled-border;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Disabled label style
|
|
50
|
-
&:disabled+label,
|
|
51
|
-
&[readonly="readonly"]+label {
|
|
52
|
-
color: $input-disabled-color;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Focused input style
|
|
56
|
-
&:focus:not([readonly]) {
|
|
57
|
-
border-bottom: 1px solid $input-focus-color;
|
|
58
|
-
box-shadow: 0 1px 0 0 $input-focus-color;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Focused label style
|
|
62
|
-
&:focus:not([readonly])+label {
|
|
63
|
-
color: $input-focus-color;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Hide helper text on data message
|
|
67
|
-
&.valid ~ .helper-text[data-success],
|
|
68
|
-
&:focus.valid ~ .helper-text[data-success],
|
|
69
|
-
&.invalid ~ .helper-text[data-error],
|
|
70
|
-
&:focus.invalid ~ .helper-text[data-error] {
|
|
71
|
-
@extend %hidden-text;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Valid Input Style
|
|
75
|
-
&.valid,
|
|
76
|
-
&:focus.valid {
|
|
77
|
-
@extend %valid-input-style;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// Custom Success Message
|
|
81
|
-
&.valid ~ .helper-text:after,
|
|
82
|
-
&:focus.valid ~ .helper-text:after {
|
|
83
|
-
@extend %custom-success-message;
|
|
84
|
-
}
|
|
85
|
-
&:focus.valid ~ label {
|
|
86
|
-
color: $input-success-color;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Invalid Input Style
|
|
90
|
-
&.invalid,
|
|
91
|
-
&:focus.invalid {
|
|
92
|
-
@extend %invalid-input-style;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// Custom Error message
|
|
96
|
-
&.invalid ~ .helper-text:after,
|
|
97
|
-
&:focus.invalid ~ .helper-text:after {
|
|
98
|
-
@extend %custom-error-message;
|
|
99
|
-
}
|
|
100
|
-
&:focus.invalid ~ label {
|
|
101
|
-
color: $input-error-color;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// Full width label when using validate for error messages
|
|
105
|
-
&.validate + label {
|
|
106
|
-
width: 100%;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Form Message Shared Styles
|
|
110
|
-
& + label:after {
|
|
111
|
-
@extend %input-after-style;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
/* Validation Sass Placeholders */
|
|
117
|
-
%valid-input-style {
|
|
118
|
-
border-bottom: 1px solid $input-success-color;
|
|
119
|
-
box-shadow: 0 1px 0 0 $input-success-color;
|
|
120
|
-
}
|
|
121
|
-
%invalid-input-style {
|
|
122
|
-
border-bottom: $input-invalid-border;
|
|
123
|
-
box-shadow: 0 1px 0 0 $input-error-color;
|
|
124
|
-
}
|
|
125
|
-
%hidden-text {
|
|
126
|
-
color: transparent;
|
|
127
|
-
user-select: none;
|
|
128
|
-
pointer-events: none;
|
|
129
|
-
}
|
|
130
|
-
%custom-success-message {
|
|
131
|
-
content: attr(data-success);
|
|
132
|
-
color: $input-success-color;
|
|
133
|
-
}
|
|
134
|
-
%custom-error-message {
|
|
135
|
-
content: attr(data-error);
|
|
136
|
-
color: $input-error-color;
|
|
137
|
-
}
|
|
138
|
-
%input-after-style {
|
|
139
|
-
display: block;
|
|
140
|
-
content: "";
|
|
141
|
-
position: absolute;
|
|
142
|
-
top: 100%;
|
|
143
|
-
left: 0;
|
|
144
|
-
opacity: 0;
|
|
145
|
-
transition: .2s opacity ease-out, .2s color ease-out;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
// Styling for input field wrapper
|
|
150
|
-
.input-field {
|
|
151
|
-
// Inline styles
|
|
152
|
-
&.inline {
|
|
153
|
-
display: inline-block;
|
|
154
|
-
vertical-align: middle;
|
|
155
|
-
margin-left: 5px;
|
|
156
|
-
|
|
157
|
-
input,
|
|
158
|
-
.select-dropdown {
|
|
159
|
-
margin-bottom: 1rem;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Gutter spacing
|
|
164
|
-
&.col {
|
|
165
|
-
label {
|
|
166
|
-
left: $gutter-width * 0.5;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.prefix ~ label,
|
|
170
|
-
.prefix ~ .validate ~ label,
|
|
171
|
-
.suffix ~ label,
|
|
172
|
-
.suffix ~ .validate ~ label {
|
|
173
|
-
width: calc(100% - 3rem - #{$gutter-width});
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
position: relative;
|
|
178
|
-
margin-top: 1rem;
|
|
179
|
-
margin-bottom: 1rem;
|
|
180
|
-
|
|
181
|
-
& > label {
|
|
182
|
-
color: $input-border-color;
|
|
183
|
-
position: absolute;
|
|
184
|
-
top: 0;
|
|
185
|
-
left: 0;
|
|
186
|
-
font-size: 1rem;
|
|
187
|
-
cursor: text;
|
|
188
|
-
transition: transform .2s ease-out, color .2s ease-out;
|
|
189
|
-
transform-origin: 0% 100%;
|
|
190
|
-
text-align: initial;
|
|
191
|
-
transform: translateY(12px);
|
|
192
|
-
|
|
193
|
-
&:not(.label-icon).active {
|
|
194
|
-
transform: translateY(-14px) scale(.8);
|
|
195
|
-
transform-origin: 0 0;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
// Prevent label from floating on top of default HTML placeholders
|
|
199
|
-
&:not(.active) + input[type=date],
|
|
200
|
-
&:not(.active) + input[type=datetime-local],
|
|
201
|
-
&:not(.active) + input[type=month],
|
|
202
|
-
&:not(.active) + input[type=time] {
|
|
203
|
-
color: transparent;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// Autofill + date + time inputs
|
|
208
|
-
& > input[type]:-webkit-autofill:not(.browser-default):not([type="search"]) + label,
|
|
209
|
-
& > input[type=date]:not(.browser-default) + label,
|
|
210
|
-
& > input[type=time]:not(.browser-default) + label {
|
|
211
|
-
transform: translateY(-14px) scale(.8);
|
|
212
|
-
transform-origin: 0 0;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.helper-text {
|
|
216
|
-
&::after {
|
|
217
|
-
opacity: 1;
|
|
218
|
-
position: absolute;
|
|
219
|
-
top: 0;
|
|
220
|
-
left: 0;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
position: relative;
|
|
224
|
-
min-height: 18px;
|
|
225
|
-
display: block;
|
|
226
|
-
font-size: 12px;
|
|
227
|
-
color: rgba(0,0,0,.54);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// Prefix Icons
|
|
231
|
-
.prefix, .suffix {
|
|
232
|
-
position: absolute;
|
|
233
|
-
width: $input-height;
|
|
234
|
-
font-size: $input-icon-size;
|
|
235
|
-
transition: color .2s;
|
|
236
|
-
top: ($input-height - $input-icon-size) * 0.5;
|
|
237
|
-
|
|
238
|
-
&.active { color: $input-focus-color; }
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.prefix ~ input,
|
|
242
|
-
.prefix ~ textarea,
|
|
243
|
-
.prefix ~ .select-wrapper,
|
|
244
|
-
.prefix ~ label,
|
|
245
|
-
.prefix ~ .validate ~ label,
|
|
246
|
-
.prefix ~ .helper-text,
|
|
247
|
-
.prefix ~ .autocomplete-content {
|
|
248
|
-
margin-left: 3rem;
|
|
249
|
-
width: 92%;
|
|
250
|
-
width: calc(100% - 3rem);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.prefix ~ label { margin-left: 3rem; }
|
|
254
|
-
|
|
255
|
-
@media #{$medium-and-down} {
|
|
256
|
-
.prefix ~ input,
|
|
257
|
-
.suffix ~ input {
|
|
258
|
-
width: 86%;
|
|
259
|
-
width: calc(100% - 3rem);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
@media #{$small-and-down} {
|
|
264
|
-
.prefix ~ input,
|
|
265
|
-
.suffix ~ input {
|
|
266
|
-
width: 80%;
|
|
267
|
-
width: calc(100% - 3rem);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
// Suffix Icons
|
|
273
|
-
.suffix {
|
|
274
|
-
right: 0;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.suffix ~ input,
|
|
278
|
-
.suffix ~ textarea,
|
|
279
|
-
.suffix ~ .select-wrapper,
|
|
280
|
-
.suffix ~ label,
|
|
281
|
-
.suffix ~ .validate ~ label,
|
|
282
|
-
.suffix ~ .helper-text,
|
|
283
|
-
.suffix ~ .autocomplete-content {
|
|
284
|
-
margin-right: 3rem;
|
|
285
|
-
width: 92%;
|
|
286
|
-
width: calc(100% - 3rem);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.suffix ~ label { margin-right: 3rem; }
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
/* Search Field */
|
|
294
|
-
|
|
295
|
-
.input-field input[type=search] {
|
|
296
|
-
display: block;
|
|
297
|
-
line-height: inherit;
|
|
298
|
-
transition: .3s background-color;
|
|
299
|
-
|
|
300
|
-
.nav-wrapper & {
|
|
301
|
-
height: inherit;
|
|
302
|
-
padding-left: 4rem;
|
|
303
|
-
width: calc(100% - 4rem);
|
|
304
|
-
border: 0;
|
|
305
|
-
box-shadow: none;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
&:focus:not(.browser-default) {
|
|
309
|
-
background-color: $input-background;
|
|
310
|
-
border: 0;
|
|
311
|
-
box-shadow: none;
|
|
312
|
-
color: #444;
|
|
313
|
-
|
|
314
|
-
& + label i,
|
|
315
|
-
& ~ .mdi-navigation-close,
|
|
316
|
-
& ~ .material-icons {
|
|
317
|
-
color: #444;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
& + .label-icon {
|
|
322
|
-
transform: none;
|
|
323
|
-
left: 1rem;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
& ~ .mdi-navigation-close,
|
|
327
|
-
& ~ .material-icons {
|
|
328
|
-
position: absolute;
|
|
329
|
-
top: 0;
|
|
330
|
-
right: 1rem;
|
|
331
|
-
color: transparent;
|
|
332
|
-
cursor: pointer;
|
|
333
|
-
font-size: $input-icon-size;
|
|
334
|
-
transition: .3s color;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
/* Textarea */
|
|
340
|
-
|
|
341
|
-
// Default textarea
|
|
342
|
-
textarea {
|
|
343
|
-
width: 100%;
|
|
344
|
-
height: $input-height;
|
|
345
|
-
background-color: transparent;
|
|
346
|
-
|
|
347
|
-
&.materialize-textarea {
|
|
348
|
-
line-height: normal;
|
|
349
|
-
overflow-y: hidden; /* prevents scroll bar flash */
|
|
350
|
-
padding: .8rem 0 .8rem 0; /* prevents text jump on Enter keypress */
|
|
351
|
-
resize: none;
|
|
352
|
-
min-height: $input-height;
|
|
353
|
-
box-sizing: border-box;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
// For textarea autoresize
|
|
358
|
-
.hiddendiv {
|
|
359
|
-
visibility: hidden;
|
|
360
|
-
white-space: pre-wrap;
|
|
361
|
-
word-wrap: break-word;
|
|
362
|
-
overflow-wrap: break-word; /* future version of deprecated 'word-wrap' */
|
|
363
|
-
padding-top: 1.2rem; /* prevents text jump on Enter keypress */
|
|
364
|
-
|
|
365
|
-
// Reduces repaints
|
|
366
|
-
position: absolute;
|
|
367
|
-
top: 0;
|
|
368
|
-
z-index: -1;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
/* Autocomplete */
|
|
373
|
-
.autocomplete-content {
|
|
374
|
-
li {
|
|
375
|
-
.highlight { color: #444; }
|
|
376
|
-
|
|
377
|
-
img {
|
|
378
|
-
height: $dropdown-item-height - 10;
|
|
379
|
-
width: $dropdown-item-height - 10;
|
|
380
|
-
margin: 5px 15px;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
/* Character Counter */
|
|
386
|
-
.character-counter {
|
|
387
|
-
min-height: 18px;
|
|
388
|
-
}
|
|
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]):not(.browser-default),
|
|
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=month]:not(.browser-default),
|
|
22
|
+
input[type=tel]:not(.browser-default),
|
|
23
|
+
input[type=number]:not(.browser-default),
|
|
24
|
+
input[type=search]:not(.browser-default),
|
|
25
|
+
textarea.materialize-textarea {
|
|
26
|
+
|
|
27
|
+
// General Styles
|
|
28
|
+
background-color: transparent;
|
|
29
|
+
border: none;
|
|
30
|
+
border-bottom: $input-border;
|
|
31
|
+
border-radius: 0;
|
|
32
|
+
outline: none;
|
|
33
|
+
height: $input-height;
|
|
34
|
+
width: 100%;
|
|
35
|
+
font-size: $input-font-size;
|
|
36
|
+
margin: $input-margin;
|
|
37
|
+
padding: $input-padding;
|
|
38
|
+
box-shadow: none;
|
|
39
|
+
box-sizing: content-box;
|
|
40
|
+
transition: box-shadow .3s, border .3s;
|
|
41
|
+
|
|
42
|
+
// Disabled input style
|
|
43
|
+
&:disabled,
|
|
44
|
+
&[readonly="readonly"] {
|
|
45
|
+
color: $input-disabled-color;
|
|
46
|
+
border-bottom: $input-disabled-border;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Disabled label style
|
|
50
|
+
&:disabled+label,
|
|
51
|
+
&[readonly="readonly"]+label {
|
|
52
|
+
color: $input-disabled-color;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Focused input style
|
|
56
|
+
&:focus:not([readonly]) {
|
|
57
|
+
border-bottom: 1px solid $input-focus-color;
|
|
58
|
+
box-shadow: 0 1px 0 0 $input-focus-color;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Focused label style
|
|
62
|
+
&:focus:not([readonly])+label {
|
|
63
|
+
color: $input-focus-color;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Hide helper text on data message
|
|
67
|
+
&.valid ~ .helper-text[data-success],
|
|
68
|
+
&:focus.valid ~ .helper-text[data-success],
|
|
69
|
+
&.invalid ~ .helper-text[data-error],
|
|
70
|
+
&:focus.invalid ~ .helper-text[data-error] {
|
|
71
|
+
@extend %hidden-text;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Valid Input Style
|
|
75
|
+
&.valid,
|
|
76
|
+
&:focus.valid {
|
|
77
|
+
@extend %valid-input-style;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Custom Success Message
|
|
81
|
+
&.valid ~ .helper-text:after,
|
|
82
|
+
&:focus.valid ~ .helper-text:after {
|
|
83
|
+
@extend %custom-success-message;
|
|
84
|
+
}
|
|
85
|
+
&:focus.valid ~ label {
|
|
86
|
+
color: $input-success-color;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Invalid Input Style
|
|
90
|
+
&.invalid,
|
|
91
|
+
&:focus.invalid {
|
|
92
|
+
@extend %invalid-input-style;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Custom Error message
|
|
96
|
+
&.invalid ~ .helper-text:after,
|
|
97
|
+
&:focus.invalid ~ .helper-text:after {
|
|
98
|
+
@extend %custom-error-message;
|
|
99
|
+
}
|
|
100
|
+
&:focus.invalid ~ label {
|
|
101
|
+
color: $input-error-color;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Full width label when using validate for error messages
|
|
105
|
+
&.validate + label {
|
|
106
|
+
width: 100%;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Form Message Shared Styles
|
|
110
|
+
& + label:after {
|
|
111
|
+
@extend %input-after-style;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
/* Validation Sass Placeholders */
|
|
117
|
+
%valid-input-style {
|
|
118
|
+
border-bottom: 1px solid $input-success-color;
|
|
119
|
+
box-shadow: 0 1px 0 0 $input-success-color;
|
|
120
|
+
}
|
|
121
|
+
%invalid-input-style {
|
|
122
|
+
border-bottom: $input-invalid-border;
|
|
123
|
+
box-shadow: 0 1px 0 0 $input-error-color;
|
|
124
|
+
}
|
|
125
|
+
%hidden-text {
|
|
126
|
+
color: transparent;
|
|
127
|
+
user-select: none;
|
|
128
|
+
pointer-events: none;
|
|
129
|
+
}
|
|
130
|
+
%custom-success-message {
|
|
131
|
+
content: attr(data-success);
|
|
132
|
+
color: $input-success-color;
|
|
133
|
+
}
|
|
134
|
+
%custom-error-message {
|
|
135
|
+
content: attr(data-error);
|
|
136
|
+
color: $input-error-color;
|
|
137
|
+
}
|
|
138
|
+
%input-after-style {
|
|
139
|
+
display: block;
|
|
140
|
+
content: "";
|
|
141
|
+
position: absolute;
|
|
142
|
+
top: 100%;
|
|
143
|
+
left: 0;
|
|
144
|
+
opacity: 0;
|
|
145
|
+
transition: .2s opacity ease-out, .2s color ease-out;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
// Styling for input field wrapper
|
|
150
|
+
.input-field {
|
|
151
|
+
// Inline styles
|
|
152
|
+
&.inline {
|
|
153
|
+
display: inline-block;
|
|
154
|
+
vertical-align: middle;
|
|
155
|
+
margin-left: 5px;
|
|
156
|
+
|
|
157
|
+
input,
|
|
158
|
+
.select-dropdown {
|
|
159
|
+
margin-bottom: 1rem;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Gutter spacing
|
|
164
|
+
&.col {
|
|
165
|
+
label {
|
|
166
|
+
left: $gutter-width * 0.5;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.prefix ~ label,
|
|
170
|
+
.prefix ~ .validate ~ label,
|
|
171
|
+
.suffix ~ label,
|
|
172
|
+
.suffix ~ .validate ~ label {
|
|
173
|
+
width: calc(100% - 3rem - #{$gutter-width});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
position: relative;
|
|
178
|
+
margin-top: 1rem;
|
|
179
|
+
margin-bottom: 1rem;
|
|
180
|
+
|
|
181
|
+
& > label {
|
|
182
|
+
color: $input-border-color;
|
|
183
|
+
position: absolute;
|
|
184
|
+
top: 0;
|
|
185
|
+
left: 0;
|
|
186
|
+
font-size: 1rem;
|
|
187
|
+
cursor: text;
|
|
188
|
+
transition: transform .2s ease-out, color .2s ease-out;
|
|
189
|
+
transform-origin: 0% 100%;
|
|
190
|
+
text-align: initial;
|
|
191
|
+
transform: translateY(12px);
|
|
192
|
+
|
|
193
|
+
&:not(.label-icon).active {
|
|
194
|
+
transform: translateY(-14px) scale(.8);
|
|
195
|
+
transform-origin: 0 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Prevent label from floating on top of default HTML placeholders
|
|
199
|
+
&:not(.active) + input[type=date],
|
|
200
|
+
&:not(.active) + input[type=datetime-local],
|
|
201
|
+
&:not(.active) + input[type=month],
|
|
202
|
+
&:not(.active) + input[type=time] {
|
|
203
|
+
color: transparent;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Autofill + date + time inputs
|
|
208
|
+
& > input[type]:-webkit-autofill:not(.browser-default):not([type="search"]) + label,
|
|
209
|
+
& > input[type=date]:not(.browser-default) + label,
|
|
210
|
+
& > input[type=time]:not(.browser-default) + label {
|
|
211
|
+
transform: translateY(-14px) scale(.8);
|
|
212
|
+
transform-origin: 0 0;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.helper-text {
|
|
216
|
+
&::after {
|
|
217
|
+
opacity: 1;
|
|
218
|
+
position: absolute;
|
|
219
|
+
top: 0;
|
|
220
|
+
left: 0;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
position: relative;
|
|
224
|
+
min-height: 18px;
|
|
225
|
+
display: block;
|
|
226
|
+
font-size: 12px;
|
|
227
|
+
color: rgba(0,0,0,.54);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Prefix Icons
|
|
231
|
+
.prefix, .suffix {
|
|
232
|
+
position: absolute;
|
|
233
|
+
width: $input-height;
|
|
234
|
+
font-size: $input-icon-size;
|
|
235
|
+
transition: color .2s;
|
|
236
|
+
top: ($input-height - $input-icon-size) * 0.5;
|
|
237
|
+
|
|
238
|
+
&.active { color: $input-focus-color; }
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.prefix ~ input,
|
|
242
|
+
.prefix ~ textarea,
|
|
243
|
+
.prefix ~ .select-wrapper,
|
|
244
|
+
.prefix ~ label,
|
|
245
|
+
.prefix ~ .validate ~ label,
|
|
246
|
+
.prefix ~ .helper-text,
|
|
247
|
+
.prefix ~ .autocomplete-content {
|
|
248
|
+
margin-left: 3rem;
|
|
249
|
+
width: 92%;
|
|
250
|
+
width: calc(100% - 3rem);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.prefix ~ label { margin-left: 3rem; }
|
|
254
|
+
|
|
255
|
+
@media #{$medium-and-down} {
|
|
256
|
+
.prefix ~ input,
|
|
257
|
+
.suffix ~ input {
|
|
258
|
+
width: 86%;
|
|
259
|
+
width: calc(100% - 3rem);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
@media #{$small-and-down} {
|
|
264
|
+
.prefix ~ input,
|
|
265
|
+
.suffix ~ input {
|
|
266
|
+
width: 80%;
|
|
267
|
+
width: calc(100% - 3rem);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
// Suffix Icons
|
|
273
|
+
.suffix {
|
|
274
|
+
right: 0;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.suffix ~ input,
|
|
278
|
+
.suffix ~ textarea,
|
|
279
|
+
.suffix ~ .select-wrapper,
|
|
280
|
+
.suffix ~ label,
|
|
281
|
+
.suffix ~ .validate ~ label,
|
|
282
|
+
.suffix ~ .helper-text,
|
|
283
|
+
.suffix ~ .autocomplete-content {
|
|
284
|
+
margin-right: 3rem;
|
|
285
|
+
width: 92%;
|
|
286
|
+
width: calc(100% - 3rem);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.suffix ~ label { margin-right: 3rem; }
|
|
290
|
+
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* Search Field */
|
|
294
|
+
|
|
295
|
+
.input-field input[type=search] {
|
|
296
|
+
display: block;
|
|
297
|
+
line-height: inherit;
|
|
298
|
+
transition: .3s background-color;
|
|
299
|
+
|
|
300
|
+
.nav-wrapper & {
|
|
301
|
+
height: inherit;
|
|
302
|
+
padding-left: 4rem;
|
|
303
|
+
width: calc(100% - 4rem);
|
|
304
|
+
border: 0;
|
|
305
|
+
box-shadow: none;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
&:focus:not(.browser-default) {
|
|
309
|
+
background-color: $input-background;
|
|
310
|
+
border: 0;
|
|
311
|
+
box-shadow: none;
|
|
312
|
+
color: #444;
|
|
313
|
+
|
|
314
|
+
& + label i,
|
|
315
|
+
& ~ .mdi-navigation-close,
|
|
316
|
+
& ~ .material-icons {
|
|
317
|
+
color: #444;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
& + .label-icon {
|
|
322
|
+
transform: none;
|
|
323
|
+
left: 1rem;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
& ~ .mdi-navigation-close,
|
|
327
|
+
& ~ .material-icons {
|
|
328
|
+
position: absolute;
|
|
329
|
+
top: 0;
|
|
330
|
+
right: 1rem;
|
|
331
|
+
color: transparent;
|
|
332
|
+
cursor: pointer;
|
|
333
|
+
font-size: $input-icon-size;
|
|
334
|
+
transition: .3s color;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
/* Textarea */
|
|
340
|
+
|
|
341
|
+
// Default textarea
|
|
342
|
+
textarea {
|
|
343
|
+
width: 100%;
|
|
344
|
+
height: $input-height;
|
|
345
|
+
background-color: transparent;
|
|
346
|
+
|
|
347
|
+
&.materialize-textarea {
|
|
348
|
+
line-height: normal;
|
|
349
|
+
overflow-y: hidden; /* prevents scroll bar flash */
|
|
350
|
+
padding: .8rem 0 .8rem 0; /* prevents text jump on Enter keypress */
|
|
351
|
+
resize: none;
|
|
352
|
+
min-height: $input-height;
|
|
353
|
+
box-sizing: border-box;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// For textarea autoresize
|
|
358
|
+
.hiddendiv {
|
|
359
|
+
visibility: hidden;
|
|
360
|
+
white-space: pre-wrap;
|
|
361
|
+
word-wrap: break-word;
|
|
362
|
+
overflow-wrap: break-word; /* future version of deprecated 'word-wrap' */
|
|
363
|
+
padding-top: 1.2rem; /* prevents text jump on Enter keypress */
|
|
364
|
+
|
|
365
|
+
// Reduces repaints
|
|
366
|
+
position: absolute;
|
|
367
|
+
top: 0;
|
|
368
|
+
z-index: -1;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
/* Autocomplete */
|
|
373
|
+
.autocomplete-content {
|
|
374
|
+
li {
|
|
375
|
+
.highlight { color: #444; }
|
|
376
|
+
|
|
377
|
+
img {
|
|
378
|
+
height: $dropdown-item-height - 10;
|
|
379
|
+
width: $dropdown-item-height - 10;
|
|
380
|
+
margin: 5px 15px;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/* Character Counter */
|
|
386
|
+
.character-counter {
|
|
387
|
+
min-height: 18px;
|
|
388
|
+
}
|