@materializecss/materialize 2.2.1 → 2.3.0
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/LICENSE +21 -21
- package/README.md +94 -94
- package/dist/css/materialize.colors.min.css +6 -0
- package/dist/css/materialize.css +9624 -8820
- package/dist/css/materialize.min.css +6 -8
- package/dist/css/materialize.min.css.map +1 -1
- package/dist/js/materialize.cjs.js +8370 -7926
- package/dist/js/materialize.d.ts +2552 -2491
- package/dist/js/materialize.js +8375 -7931
- package/dist/js/materialize.min.js +6 -6
- package/dist/js/materialize.mjs +8342 -7898
- package/package.json +95 -79
- package/sass/{components/_color-variables.scss → _colors.scss} +403 -370
- package/sass/{components/_global.scss → _global.scss} +490 -558
- package/sass/{components/_grid.scss → _grid.scss} +172 -170
- package/sass/{components/_table_of_contents.scss → _table_of_contents.scss} +28 -32
- package/sass/{components/_tapTarget.scss → _tapTarget.scss} +102 -103
- package/sass/{components/_typography.scss → _typography.scss} +59 -62
- package/sass/{components/_variables.scss → _variables.scss} +57 -56
- package/sass/components/forms/_forms.scss +19 -24
- package/sass/materialize.scss +48 -47
- package/sass/mixins.module.scss +168 -0
- package/sass/components/_badges.scss +0 -75
- package/sass/components/_buttons.scss +0 -455
- package/sass/components/_cards.scss +0 -210
- package/sass/components/_carousel.scss +0 -95
- package/sass/components/_chips.scss +0 -148
- package/sass/components/_collapsible.scss +0 -80
- package/sass/components/_collection.scss +0 -115
- package/sass/components/_color-classes.scss +0 -32
- package/sass/components/_datepicker.scss +0 -216
- package/sass/components/_dropdown.scss +0 -78
- package/sass/components/_icons-material-design.scss +0 -6
- package/sass/components/_materialbox.scss +0 -43
- package/sass/components/_modal.scss +0 -68
- package/sass/components/_navbar.scss +0 -231
- package/sass/components/_normalize.scss +0 -349
- package/sass/components/_preloader.scss +0 -418
- package/sass/components/_pulse.scss +0 -35
- package/sass/components/_sidenav.scss +0 -249
- package/sass/components/_slider.scss +0 -121
- package/sass/components/_tabs.scss +0 -155
- package/sass/components/_timepicker.scss +0 -279
- package/sass/components/_toast.scss +0 -65
- package/sass/components/_tooltip.scss +0 -48
- package/sass/components/_transitions.scss +0 -13
- package/sass/components/colors.module.scss +0 -74
- package/sass/components/forms/_checkboxes.scss +0 -200
- package/sass/components/forms/_file-input.scss +0 -43
- package/sass/components/forms/_input-fields.scss +0 -350
- package/sass/components/forms/_radio-buttons.scss +0 -112
- package/sass/components/forms/_range.scss +0 -153
- package/sass/components/forms/_select.scss +0 -195
- package/sass/components/forms/_switches.scss +0 -122
- package/sass/components/theme.module.scss +0 -140
- package/sass/components/tokens.module.scss +0 -272
- package/sass/components/typography.module.scss +0 -150
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
.primary { background-color: var(--md-sys-color-primary); }
|
|
2
|
-
.primary-text { color: var(--md-sys-color-primary); }
|
|
3
|
-
.on-primary { background-color: var(--md-sys-color-on-primary); }
|
|
4
|
-
.on-primary-text { color: var(--md-sys-color-on-primary); }
|
|
5
|
-
.primary-container { background-color: var(--md-sys-color-primary-container); }
|
|
6
|
-
.primary-container-text { color: var(--md-sys-color-primary-container); }
|
|
7
|
-
.on-primary-container { background-color: var(--md-sys-color-on-primary-container); }
|
|
8
|
-
.on-primary-container-text { color: var(--md-sys-color-on-primary-container); }
|
|
9
|
-
|
|
10
|
-
.secondary { background-color: var(--md-sys-color-secondary); }
|
|
11
|
-
.secondary-text { color: var(--md-sys-color-secondary); }
|
|
12
|
-
.on-secondary { background-color: var(--md-sys-color-on-secondary); }
|
|
13
|
-
.on-secondary-text { color: var(--md-sys-color-on-secondary); }
|
|
14
|
-
.secondary-container { background-color: var(--md-sys-color-secondary-container); }
|
|
15
|
-
.secondary-container-text { color: var(--md-sys-color-secondary-container); }
|
|
16
|
-
.on-secondary-container { background-color: var(--md-sys-color-on-secondary-container); }
|
|
17
|
-
.on-secondary-container-text { color: var(--md-sys-color-on-secondary-container); }
|
|
18
|
-
|
|
19
|
-
.tertiary { background-color: var(--md-sys-color-tertiary); }
|
|
20
|
-
.tertiary-text { color: var(--md-sys-color-tertiary); }
|
|
21
|
-
.on-tertiary { background-color: var(--md-sys-color-on-tertiary); }
|
|
22
|
-
.on-tertiary-text { color: var(--md-sys-color-on-tertiary); }
|
|
23
|
-
.tertiary-container { background-color: var(--md-sys-color-tertiary-container); }
|
|
24
|
-
.tertiary-container-text { color: var(--md-sys-color-tertiary-container); }
|
|
25
|
-
.on-tertiary-container { background-color: var(--md-sys-color-on-tertiary-container); }
|
|
26
|
-
.on-tertiary-container-text { color: var(--md-sys-color-on-tertiary-container); }
|
|
27
|
-
|
|
28
|
-
.error { background-color: var(--md-sys-color-error); }
|
|
29
|
-
.error-text { color: var(--md-sys-color-error); }
|
|
30
|
-
.on-error { background-color: var(--md-sys-color-on-error); }
|
|
31
|
-
.on-error-text { color: var(--md-sys-color-on-error); }
|
|
32
|
-
.error-container { background-color: var(--md-sys-color-error-container); }
|
|
33
|
-
.error-container-text { color: var(--md-sys-color-error-container); }
|
|
34
|
-
.on-error-container { background-color: var(--md-sys-color-on-error-container); }
|
|
35
|
-
.on-error-container-text { color: var(--md-sys-color-on-error-container); }
|
|
36
|
-
|
|
37
|
-
.background { background-color: var(--md-sys-color-background); }
|
|
38
|
-
.background-text { color: var(--md-sys-color-background); }
|
|
39
|
-
.on-background { background-color: var(--md-sys-color-on-background); }
|
|
40
|
-
.on-background-text { color: var(--md-sys-color-on-background); }
|
|
41
|
-
|
|
42
|
-
.surface { background-color: var(--md-sys-color-surface); }
|
|
43
|
-
.surface-text { color: var(--md-sys-color-surface); }
|
|
44
|
-
.on-surface { background-color: var(--md-sys-color-on-surface); }
|
|
45
|
-
.on-surface-text { color: var(--md-sys-color-on-surface); }
|
|
46
|
-
|
|
47
|
-
.surface-variant { background-color: var(--md-sys-color-surface-variant); }
|
|
48
|
-
.surface-variant-text { color: var(--md-sys-color-surface-variant); }
|
|
49
|
-
.on-surface-variant { background-color: var(--md-sys-color-on-surface-variant); }
|
|
50
|
-
.on-surface-variant-text { color: var(--md-sys-color-on-surface-variant); }
|
|
51
|
-
|
|
52
|
-
.outline { background-color: var(--md-sys-color-outline); }
|
|
53
|
-
.outline-text { color: var(--md-sys-color-outline); }
|
|
54
|
-
|
|
55
|
-
.inverse-on-surface { background-color: var(--md-sys-color-inverse-on-surface); }
|
|
56
|
-
.inverse-on-surface-text { color: var(--md-sys-color-inverse-on-surface); }
|
|
57
|
-
|
|
58
|
-
.inverse-surface { background-color: var(--md-sys-color-inverse-surface); }
|
|
59
|
-
.inverse-surface-text { color: var(--md-sys-color-inverse-surface); }
|
|
60
|
-
|
|
61
|
-
.inverse-primary { background-color: var(--md-sys-color-inverse-primary); }
|
|
62
|
-
.inverse-primary-text { color: var(--md-sys-color-inverse-primary); }
|
|
63
|
-
|
|
64
|
-
.shadow { background-color: var(--md-sys-color-shadow); }
|
|
65
|
-
.shadow-text { color: var(--md-sys-color-shadow); }
|
|
66
|
-
|
|
67
|
-
.surface-tint { background-color: var(--md-sys-color-surface-tint); }
|
|
68
|
-
.surface-tint-text { color: var(--md-sys-color-surface-tint); }
|
|
69
|
-
|
|
70
|
-
.outline-variant { background-color: var(--md-sys-color-outline-variant); }
|
|
71
|
-
.outline-variant-text { color: var(--md-sys-color-outline-variant); }
|
|
72
|
-
|
|
73
|
-
.scrim { background-color: var(--md-sys-color-scrim); }
|
|
74
|
-
.scrim-text { color: var(--md-sys-color-scrim); }
|
|
@@ -1,200 +0,0 @@
|
|
|
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 var(--md-sys-color-on-surface-variant);
|
|
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: var(--md-sys-color-on-surface);
|
|
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, 0.12);
|
|
58
|
-
background-color: rgba(0, 0, 0, 0.12);
|
|
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: 2px solid var(--md-sys-color-primary);
|
|
71
|
-
border-bottom: 2px solid var(--md-sys-color-primary);
|
|
72
|
-
transform: rotate(40deg);
|
|
73
|
-
backface-visibility: hidden;
|
|
74
|
-
transform-origin: 100% 100%;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&:disabled + span:before {
|
|
78
|
-
border-right: 2px solid var(--md-sys-color-on-surface);
|
|
79
|
-
border-bottom: 2px solid var(--md-sys-color-on-surface);
|
|
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: 2px solid var(--md-sys-color-primary);
|
|
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 var(--md-sys-color-on-surface);
|
|
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 var(--md-sys-color-on-surface-variant);
|
|
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 var(--md-sys-color-on-primary);
|
|
153
|
-
border-bottom: 2px solid var(--md-sys-color-on-primary);
|
|
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 var(--md-sys-color-primary);
|
|
163
|
-
background-color: var(--md-sys-color-primary);
|
|
164
|
-
z-index: 0;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// Focused styles
|
|
169
|
-
&.tabbed:focus + span:not(.lever):after {
|
|
170
|
-
border-radius: 2px;
|
|
171
|
-
border-color: var(--md-sys-color-on-surface-variant)r;
|
|
172
|
-
background-color: rgba(0, 0, 0, 0.12);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&.tabbed:checked:focus + span:not(.lever):after {
|
|
176
|
-
border-radius: 2px;
|
|
177
|
-
background-color: var(--md-sys-color-primary);
|
|
178
|
-
border-color: var(--md-sys-color-primary);
|
|
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: var(--md-sys-color-on-surface);
|
|
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: var(--md-sys-color-on-surface);
|
|
198
|
-
border-color: var(--md-sys-color-on-surface);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
.file-field {
|
|
2
|
-
//position: relative;
|
|
3
|
-
display: grid;
|
|
4
|
-
grid-template-columns: min-content auto;
|
|
5
|
-
gap: 10px;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
.file-path-wrapper {
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
input.file-path { width: 100%; }
|
|
13
|
-
|
|
14
|
-
.btn {
|
|
15
|
-
height: 3rem;
|
|
16
|
-
line-height: 3rem;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
span {
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
input[type=file] {
|
|
24
|
-
// Needed to override webkit button
|
|
25
|
-
&::-webkit-file-upload-button {
|
|
26
|
-
display: none;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
position: absolute;
|
|
30
|
-
top: 0;
|
|
31
|
-
right: 0;
|
|
32
|
-
left: 0;
|
|
33
|
-
bottom: 0;
|
|
34
|
-
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
width: 100%;
|
|
37
|
-
margin: 0;
|
|
38
|
-
padding: 0;
|
|
39
|
-
opacity: 0;
|
|
40
|
-
font-size: 20px;
|
|
41
|
-
filter: alpha(opacity=0);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
/* Style Placeholders */
|
|
2
|
-
::placeholder {
|
|
3
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
/* Text inputs */
|
|
7
|
-
input:not([type]):not(.browser-default),
|
|
8
|
-
input[type=text]:not(.browser-default),
|
|
9
|
-
input[type=password]:not(.browser-default),
|
|
10
|
-
input[type=email]:not(.browser-default),
|
|
11
|
-
input[type=url]:not(.browser-default),
|
|
12
|
-
input[type=time]:not(.browser-default),
|
|
13
|
-
input[type=date]:not(.browser-default),
|
|
14
|
-
input[type=datetime]:not(.browser-default),
|
|
15
|
-
input[type=datetime-local]:not(.browser-default),
|
|
16
|
-
input[type=month]:not(.browser-default),
|
|
17
|
-
input[type=tel]:not(.browser-default),
|
|
18
|
-
input[type=number]:not(.browser-default),
|
|
19
|
-
input[type=search]:not(.browser-default),
|
|
20
|
-
textarea.materialize-textarea {
|
|
21
|
-
outline: none;
|
|
22
|
-
color: var(--md-sys-color-on-background);
|
|
23
|
-
width: 100%;
|
|
24
|
-
font-size: $md_sys_typescale_body-large_size; //16px; // => 16 dp
|
|
25
|
-
height: 56px; // 56dp
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
%invalid-input-style {
|
|
29
|
-
border-bottom: 2px solid var(--md-sys-color-error);
|
|
30
|
-
box-shadow: 0 1px 0 0 var(--md-sys-color-error);
|
|
31
|
-
}
|
|
32
|
-
%hidden-text > span {
|
|
33
|
-
display: none
|
|
34
|
-
}
|
|
35
|
-
%custom-error-message {
|
|
36
|
-
content: attr(data-error);
|
|
37
|
-
color: var(--md-sys-color-error);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.input-field {
|
|
41
|
-
--input-color: var(--md-sys-color-primary);
|
|
42
|
-
|
|
43
|
-
position: relative;
|
|
44
|
-
clear: both;
|
|
45
|
-
|
|
46
|
-
// Default
|
|
47
|
-
|
|
48
|
-
input, textarea {
|
|
49
|
-
box-sizing: border-box; /* https://stackoverflow.com/questions/1377719/padding-within-inputs-breaks-width-100*/
|
|
50
|
-
|
|
51
|
-
padding: 0 16px;
|
|
52
|
-
padding-top: 20px;
|
|
53
|
-
|
|
54
|
-
background-color: var(--md-sys-color-surface);
|
|
55
|
-
|
|
56
|
-
border: none; // reset
|
|
57
|
-
border-radius: 4px; // md.sys.shape.corner.extra-small.top
|
|
58
|
-
border-bottom: 1px solid var(--md-sys-color-on-surface-variant);
|
|
59
|
-
border-bottom-left-radius: 0;
|
|
60
|
-
border-bottom-right-radius: 0;
|
|
61
|
-
|
|
62
|
-
&:focus:not([readonly]) {
|
|
63
|
-
border-bottom: 2px solid var(--input-color);
|
|
64
|
-
padding-top: 20px + 1px; // add border-width
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&:disabled, &[readonly="readonly"] {
|
|
68
|
-
color: rgba(var(--md_sys_color_on-surface), 0.38);
|
|
69
|
-
border-color: rgba(var(--md_sys_color_on-surface), 0.12);
|
|
70
|
-
background-color: rgba(var(--md_sys_color_on-surface), 0.04);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Label
|
|
74
|
-
&:focus:not([readonly]) + label {
|
|
75
|
-
color: var(--input-color);
|
|
76
|
-
}
|
|
77
|
-
&:focus:not([readonly]) + label,
|
|
78
|
-
&:not([placeholder=' ']) + label,
|
|
79
|
-
&:not(:placeholder-shown) + label {
|
|
80
|
-
//font-size: 12px; // md.sys.typescale.body-small.size
|
|
81
|
-
// https://stackoverflow.com/questions/34717492/css-transition-font-size-avoid-jittering-wiggling
|
|
82
|
-
transform: scale(calc(12 / 16));
|
|
83
|
-
top: 8px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&:disabled + label, &[readonly="readonly"] + label {
|
|
87
|
-
color: rgba(var(--md_sys_color_on-surface), 0.38);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Hide helper text on data message
|
|
91
|
-
&.invalid ~ .supporting-text[data-error] {
|
|
92
|
-
@extend %hidden-text;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// Invalid Input Style
|
|
96
|
-
&.invalid {
|
|
97
|
-
@extend %invalid-input-style;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Custom Error message
|
|
101
|
-
&.invalid ~ .supporting-text:after {
|
|
102
|
-
@extend %custom-error-message;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&.invalid ~ label,
|
|
106
|
-
&:focus.invalid ~ label {
|
|
107
|
-
color: var(--md-sys-color-error);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
input::placeholder {
|
|
112
|
-
user-select: none;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
& > label {
|
|
116
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
117
|
-
user-select: none;
|
|
118
|
-
font-size: 16px;
|
|
119
|
-
position: absolute;
|
|
120
|
-
left: 16px;
|
|
121
|
-
top: 16px;
|
|
122
|
-
cursor: text;
|
|
123
|
-
transform-origin: top left;
|
|
124
|
-
transition:
|
|
125
|
-
left 0.2s ease-out,
|
|
126
|
-
top 0.2s ease-out,
|
|
127
|
-
transform 0.2s ease-out
|
|
128
|
-
;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// Sub-Infos
|
|
132
|
-
|
|
133
|
-
.supporting-text {
|
|
134
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
135
|
-
font-size: 12px;
|
|
136
|
-
padding: 0 16px;
|
|
137
|
-
margin-top: 4px;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.character-counter {
|
|
141
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
142
|
-
font-size: 12px;
|
|
143
|
-
float: right;
|
|
144
|
-
padding: 0 16px;
|
|
145
|
-
margin-top: 4px;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.prefix {
|
|
149
|
-
position: absolute;
|
|
150
|
-
left: 12px;
|
|
151
|
-
top: 16px;
|
|
152
|
-
user-select: none;
|
|
153
|
-
display: flex;
|
|
154
|
-
align-self: center;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.suffix {
|
|
158
|
-
position: absolute;
|
|
159
|
-
right: 12px;
|
|
160
|
-
top: 16px;
|
|
161
|
-
user-select: none;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.prefix ~ input, .prefix ~ textarea {
|
|
165
|
-
padding-left: calc(12px + 24px + 16px);
|
|
166
|
-
}
|
|
167
|
-
.suffix ~ input, .suffix ~ textarea {
|
|
168
|
-
padding-right: calc(12px + 24px + 16px);
|
|
169
|
-
}
|
|
170
|
-
.prefix ~ label {
|
|
171
|
-
left: calc(12px + 24px + 16px);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// Outlined
|
|
175
|
-
|
|
176
|
-
&.outlined {
|
|
177
|
-
|
|
178
|
-
input, textarea {
|
|
179
|
-
padding-top: 0;
|
|
180
|
-
|
|
181
|
-
background-color: var(--md-sys-color-background);
|
|
182
|
-
|
|
183
|
-
border: 1px solid var(--md-sys-color-on-surface-variant);
|
|
184
|
-
border-radius: 4px; // md.sys.shape.corner.extra-small
|
|
185
|
-
|
|
186
|
-
&:focus:not([readonly]) {
|
|
187
|
-
border: 2px solid var(--input-color);
|
|
188
|
-
padding-top: 0;
|
|
189
|
-
margin-left: -1px; // subtract border-width
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
// Label
|
|
193
|
-
&:focus:not([readonly]) + label {
|
|
194
|
-
color: var(--input-color);
|
|
195
|
-
}
|
|
196
|
-
&:focus:not([readonly]) + label,
|
|
197
|
-
&:not([placeholder=' ']) + label,
|
|
198
|
-
&:not(:placeholder-shown) + label {
|
|
199
|
-
top: -8px;
|
|
200
|
-
left: 16px;
|
|
201
|
-
margin-left: -4px;
|
|
202
|
-
padding: 0 4px;
|
|
203
|
-
background-color: var(--md-sys-color-background);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
&:disabled, &[readonly="readonly"] {
|
|
207
|
-
color: rgba(var(--md_sys_color_on-surface), 0.38);
|
|
208
|
-
border-color: rgba(var(--md_sys_color_on-surface), 0.12);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
// Error
|
|
215
|
-
&.error {
|
|
216
|
-
input, textarea {
|
|
217
|
-
border-color: var(--md-sys-color-error);
|
|
218
|
-
}
|
|
219
|
-
input:focus:not([readonly]), textarea:focus:not([readonly]) {
|
|
220
|
-
border-color: var(--md-sys-color-error);
|
|
221
|
-
}
|
|
222
|
-
input:focus:not([readonly]) + label, textarea:focus:not([readonly]) + label {
|
|
223
|
-
color: var(--md-sys-color-error);
|
|
224
|
-
}
|
|
225
|
-
label {
|
|
226
|
-
color: var(--md-sys-color-error);
|
|
227
|
-
}
|
|
228
|
-
.supporting-text {
|
|
229
|
-
color: var(--md-sys-color-error);
|
|
230
|
-
}
|
|
231
|
-
.suffix {
|
|
232
|
-
color: var(--md-sys-color-error);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/* Search Field */
|
|
238
|
-
.searchbar {
|
|
239
|
-
.prefix {
|
|
240
|
-
position: absolute;
|
|
241
|
-
//left: 12px;
|
|
242
|
-
padding-left: 1rem;
|
|
243
|
-
top: 0;
|
|
244
|
-
user-select: none;
|
|
245
|
-
display: flex;
|
|
246
|
-
align-self: center;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
& > input {
|
|
250
|
-
border-width: 0;
|
|
251
|
-
background-color: transparent;
|
|
252
|
-
padding-left: 3rem;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
.searchbar.has-sidebar {
|
|
256
|
-
margin-left: 0;
|
|
257
|
-
@media #{$large-and-up} {
|
|
258
|
-
margin-left: 300px;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/*
|
|
263
|
-
.input-field input[type=search] {
|
|
264
|
-
display: block;
|
|
265
|
-
line-height: inherit;
|
|
266
|
-
|
|
267
|
-
.nav-wrapper & {
|
|
268
|
-
height: inherit;
|
|
269
|
-
padding-left: 4rem;
|
|
270
|
-
width: calc(100% - 4rem);
|
|
271
|
-
border: 0;
|
|
272
|
-
box-shadow: none;
|
|
273
|
-
}
|
|
274
|
-
&:focus:not(.browser-default) {
|
|
275
|
-
border: 0;
|
|
276
|
-
box-shadow: none;
|
|
277
|
-
}
|
|
278
|
-
& + .label-icon {
|
|
279
|
-
transform: none;
|
|
280
|
-
left: 1rem;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
*/
|
|
284
|
-
|
|
285
|
-
/* Textarea */
|
|
286
|
-
// Default textarea
|
|
287
|
-
textarea {
|
|
288
|
-
width: 100%;
|
|
289
|
-
height: 3rem;
|
|
290
|
-
background-color: transparent;
|
|
291
|
-
|
|
292
|
-
&.materialize-textarea {
|
|
293
|
-
padding-top: 26px !important;
|
|
294
|
-
padding-bottom: 4px !important;
|
|
295
|
-
line-height: normal;
|
|
296
|
-
overflow-y: hidden; /* prevents scroll bar flash */
|
|
297
|
-
resize: none;
|
|
298
|
-
min-height: 3rem;
|
|
299
|
-
box-sizing: border-box;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
// For textarea autoresize
|
|
304
|
-
.hiddendiv {
|
|
305
|
-
visibility: hidden;
|
|
306
|
-
white-space: pre-wrap;
|
|
307
|
-
word-wrap: break-word;
|
|
308
|
-
overflow-wrap: break-word; /* future version of deprecated 'word-wrap' */
|
|
309
|
-
padding-top: 1.2rem; /* prevents text jump on Enter keypress */
|
|
310
|
-
|
|
311
|
-
// Reduces repaints
|
|
312
|
-
position: absolute;
|
|
313
|
-
top: 0;
|
|
314
|
-
z-index: -1;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/* Autocomplete Items */
|
|
318
|
-
.autocomplete-content {
|
|
319
|
-
li {
|
|
320
|
-
.highlight { color: var(--md-sys-color-on-background); }
|
|
321
|
-
img {
|
|
322
|
-
height: $dropdown-item-height - 10;
|
|
323
|
-
width: $dropdown-item-height - 10;
|
|
324
|
-
margin: 5px 15px;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
/* Datepicker date input fields */
|
|
330
|
-
.datepicker-date-input {
|
|
331
|
-
position: relative;
|
|
332
|
-
text-indent: -9999px;
|
|
333
|
-
|
|
334
|
-
&::after {
|
|
335
|
-
display: block;
|
|
336
|
-
position: absolute;
|
|
337
|
-
top: 1.10rem;
|
|
338
|
-
content: attr(data-date);
|
|
339
|
-
color: var(--input-color);
|
|
340
|
-
text-indent: 0;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
&:focus-visible {
|
|
344
|
-
text-indent: 0;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
&:focus-visible:after {
|
|
348
|
-
text-indent: -9999px;
|
|
349
|
-
}
|
|
350
|
-
}
|