@expressivecss/expressive 0.1.0-alpha.3 → 0.2.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 +82 -2
- package/README.md +153 -43
- package/dist/css/expressive.css +7121 -9658
- package/dist/css/expressive.css.map +1 -0
- package/dist/css/expressive.min.css +1 -1
- package/dist/css/expressive.min.css.map +1 -0
- package/dist/js/expressive.cjs +7521 -0
- package/dist/js/expressive.cjs.map +7 -0
- package/dist/js/expressive.js +7383 -8099
- package/dist/js/expressive.js.map +7 -1
- package/dist/js/expressive.min.js +75 -1
- package/dist/js/expressive.min.js.map +7 -1
- package/dist/js/expressive.mjs +7292 -7998
- package/dist/js/expressive.mjs.map +7 -1
- package/dist/types/behaviors/dialogs.d.ts +25 -0
- package/dist/{js → types}/components/autocomplete.d.ts +10 -1
- package/dist/{js → types}/components/buttons.d.ts +11 -1
- package/dist/{js → types}/components/cards.d.ts +10 -1
- package/dist/{js → types}/components/carousel.d.ts +4 -5
- package/dist/{js/forms/character-counter.d.ts → types/components/characterCounter.d.ts} +1 -1
- package/dist/{js → types}/components/chips.d.ts +1 -1
- package/dist/{js → types}/components/collapsible.d.ts +1 -1
- package/dist/{js → types}/components/datepicker.d.ts +63 -2
- package/dist/{js → types}/components/dropdown.d.ts +3 -3
- package/dist/types/components/index.d.ts +23 -0
- package/dist/{js/components/materialbox.d.ts → types/components/lightbox.d.ts} +21 -21
- package/dist/{js → types}/components/modal.d.ts +1 -1
- package/dist/{js → types}/components/parallax.d.ts +11 -5
- package/dist/{js → types}/components/pushpin.d.ts +1 -1
- package/dist/{js/forms → types/components}/range.d.ts +3 -3
- package/dist/types/components/registry.d.ts +107 -0
- package/dist/{js → types}/components/scrollspy.d.ts +6 -9
- package/dist/{js/forms → types/components}/select.d.ts +11 -2
- package/dist/{js → types}/components/sidenav.d.ts +1 -1
- package/dist/{js → types}/components/slider.d.ts +3 -2
- package/dist/{js → types}/components/tabs.d.ts +3 -2
- package/dist/{js/components/tap-target.d.ts → types/components/tapTarget.d.ts} +2 -2
- package/dist/{js → types}/components/timepicker.d.ts +13 -5
- package/dist/{js/components/toast.d.ts → types/components/toasts.d.ts} +28 -4
- package/dist/{js → types}/components/tooltip.d.ts +2 -2
- package/dist/types/core/bounding.d.ts +6 -0
- package/dist/{js/foundation → types/core}/component.d.ts +1 -1
- package/dist/types/core/edges.d.ts +6 -0
- package/dist/{js/foundation → types/core}/utils.d.ts +21 -14
- package/dist/types/index.d.ts +7 -0
- package/dist/{js/plugins/docked-display.d.ts → types/plugins/dockedDisplayPlugin.d.ts} +7 -0
- package/package.json +60 -36
- package/src/sass/README.md +200 -0
- package/src/sass/abstracts/_breakpoints.scss +69 -0
- package/src/sass/abstracts/_elevation.scss +34 -0
- package/src/sass/abstracts/_index.scss +7 -0
- package/src/sass/abstracts/_mixins.scss +171 -0
- package/src/sass/abstracts/_variables.scss +57 -0
- package/src/{scss/layout/_table.scss → sass/base/_global.scss} +64 -2
- package/src/{scss/layout → sass/base}/_grid.scss +6 -6
- package/src/sass/base/_index.scss +6 -0
- package/src/{scss/foundation → sass/base}/_normalize.scss +51 -139
- package/src/sass/base/_typography.scss +90 -0
- package/src/sass/components/_badges.scss +77 -0
- package/src/{scss → sass}/components/_breadcrumb.scss +2 -0
- package/src/sass/components/_buttons.scss +407 -0
- package/src/sass/components/_cards.scss +328 -0
- package/src/{scss → sass}/components/_carousel.scss +5 -3
- package/src/sass/components/_chips.scss +140 -0
- package/src/sass/components/_collapsible.scss +81 -0
- package/src/{scss → sass}/components/_collection.scss +2 -2
- package/src/{scss/components/_date-picker.scss → sass/components/_datepicker.scss} +51 -44
- package/src/sass/components/_docked-display.scss +11 -0
- package/src/sass/components/_dropdown.scss +129 -0
- package/src/{scss/components/_material-icons.scss → sass/components/_icons-material-design.scss} +2 -0
- package/src/sass/components/_index.scss +35 -0
- package/src/{scss/components/_material-box.scss → sass/components/_lightbox.scss} +6 -4
- package/src/sass/components/_modal.scss +208 -0
- package/src/sass/components/_navbar.scss +345 -0
- package/src/{scss/layout/_footer.scss → sass/components/_page-footer.scss} +7 -6
- package/src/{scss → sass}/components/_pagination.scss +4 -3
- package/src/{scss → sass}/components/_parallax.scss +4 -1
- package/src/{scss → sass}/components/_preloader.scss +19 -97
- package/src/{scss → sass}/components/_pulse.scss +2 -0
- package/src/sass/components/_pushpin.scss +11 -0
- package/src/{scss → sass}/components/_sidenav.scss +99 -82
- package/src/{scss → sass}/components/_slider.scss +3 -1
- package/src/{scss/components/_table-of-contents.scss → sass/components/_table_of_contents.scss} +2 -0
- package/src/sass/components/_tabs.scss +232 -0
- package/src/{scss/components/_tap-target.scss → sass/components/_tapTarget.scss} +24 -22
- package/src/{scss/components/_time-picker.scss → sass/components/_timepicker.scss} +56 -56
- package/src/sass/components/_toast.scss +260 -0
- package/src/sass/components/_toolbar.scss +192 -0
- package/src/sass/components/_tooltip.scss +166 -0
- package/src/{scss → sass}/components/_transitions.scss +4 -4
- package/src/sass/components/forms/_checkboxes.scss +288 -0
- package/src/sass/components/forms/_fieldset.scss +128 -0
- package/src/{scss → sass/components}/forms/_file-input.scss +11 -9
- package/src/{scss → sass/components}/forms/_index.scss +2 -0
- package/src/sass/components/forms/_input-fields.scss +326 -0
- package/src/sass/components/forms/_radio-buttons.scss +190 -0
- package/src/sass/components/forms/_range.scss +310 -0
- package/src/sass/components/forms/_select.scss +103 -0
- package/src/sass/components/forms/_switches.scss +239 -0
- package/src/sass/expressive.scss +60 -0
- package/src/sass/tokens/_index.scss +4 -0
- package/src/sass/tokens/_reference.scss +265 -0
- package/src/sass/tokens/_theme.scss +49 -0
- package/src/sass/utilities/_helpers.scss +63 -0
- package/src/sass/utilities/_index.scss +8 -0
- package/src/{scss → sass}/utilities/_spacing.scss +4 -3
- package/src/sass/utilities/_typescale.scss +45 -0
- package/src/sass/utilities/_visibility.scss +63 -0
- package/src/sass/utilities/_z-depth.scss +18 -0
- package/dist/js/components/index.d.ts +0 -21
- package/dist/js/forms/index.d.ts +0 -4
- package/dist/js/foundation/index.d.ts +0 -2
- package/dist/js/index.d.ts +0 -52
- package/dist/js/plugins/index.d.ts +0 -1
- package/src/scss/components/_appbar.scss +0 -454
- package/src/scss/components/_badges.scss +0 -77
- package/src/scss/components/_buttons.scss +0 -412
- package/src/scss/components/_cards.scss +0 -267
- package/src/scss/components/_chips.scss +0 -147
- package/src/scss/components/_collapsible.scss +0 -84
- package/src/scss/components/_dropdown.scss +0 -98
- package/src/scss/components/_index.scss +0 -28
- package/src/scss/components/_modal.scss +0 -84
- package/src/scss/components/_tabs.scss +0 -176
- package/src/scss/components/_toast.scss +0 -70
- package/src/scss/components/_tooltip.scss +0 -49
- package/src/scss/components/_video.scss +0 -15
- package/src/scss/expressive.scss +0 -7
- package/src/scss/forms/_checkboxes.scss +0 -199
- package/src/scss/forms/_input-fields.scss +0 -360
- package/src/scss/forms/_radio-buttons.scss +0 -114
- package/src/scss/forms/_range.scss +0 -148
- package/src/scss/forms/_select.scss +0 -108
- package/src/scss/forms/_switches.scss +0 -127
- package/src/scss/foundation/_base.scss +0 -71
- package/src/scss/foundation/_color-palette.scss +0 -402
- package/src/scss/foundation/_index.scss +0 -10
- package/src/scss/foundation/_mixins.scss +0 -198
- package/src/scss/foundation/_motion.scss +0 -70
- package/src/scss/foundation/_shape.scss +0 -30
- package/src/scss/foundation/_state-layers.scss +0 -68
- package/src/scss/foundation/_theme.scss +0 -238
- package/src/scss/foundation/_tokens.scss +0 -511
- package/src/scss/foundation/_variables.scss +0 -57
- package/src/scss/layout/_index.scss +0 -3
- package/src/scss/utilities/_a11y.scss +0 -77
- package/src/scss/utilities/_elevation.scss +0 -63
- package/src/scss/utilities/_helpers.scss +0 -50
- package/src/scss/utilities/_index.scss +0 -7
- package/src/scss/utilities/_responsive.scss +0 -62
- package/src/scss/utilities/_typography.scss +0 -115
- /package/dist/{js/forms → types/behaviors}/forms.d.ts +0 -0
- /package/dist/{js/components → types/behaviors}/waves.d.ts +0 -0
- /package/src/{scss → sass}/utilities/_colors.scss +0 -0
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// M3 Expressive: Tooltip component tokens
|
|
2
|
-
.material-tooltip,
|
|
3
|
-
.md-tooltip {
|
|
4
|
-
// -- Component tokens --
|
|
5
|
-
--md-comp-tooltip-shape: var(--md-sys-shape-corner-extra-small, 4px);
|
|
6
|
-
--md-comp-tooltip-color: var(--md-sys-color-inverse-on-surface);
|
|
7
|
-
--md-comp-tooltip-container-color: var(--md-sys-color-inverse-surface);
|
|
8
|
-
|
|
9
|
-
padding: 0 8px;
|
|
10
|
-
border-radius: var(--md-comp-tooltip-shape);
|
|
11
|
-
color: var(--md-comp-tooltip-color);
|
|
12
|
-
background-color: var(--md-comp-tooltip-container-color);
|
|
13
|
-
font-family: var(--md-sys-typescale-body-small-font-family-name);
|
|
14
|
-
font-size: var(--md-sys-typescale-body-small-font-size);
|
|
15
|
-
line-height: var(--md-sys-typescale-body-small-line-height);
|
|
16
|
-
font-weight: var(--md-sys-typescale-body-small-font-weight);
|
|
17
|
-
min-height: 24px;
|
|
18
|
-
opacity: 0;
|
|
19
|
-
padding-top: 6px;
|
|
20
|
-
padding-bottom: 6px;
|
|
21
|
-
font-size: 12px;
|
|
22
|
-
line-height: 16px;
|
|
23
|
-
font-weight: 400;
|
|
24
|
-
letter-spacing: 0.4px;
|
|
25
|
-
position: absolute;
|
|
26
|
-
max-width: 300px;
|
|
27
|
-
overflow: hidden;
|
|
28
|
-
left: 0;
|
|
29
|
-
top: 0;
|
|
30
|
-
pointer-events: none;
|
|
31
|
-
display: flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
visibility: hidden;
|
|
34
|
-
z-index: 2000;
|
|
35
|
-
transition: opacity var(--md-sys-motion-duration-short4, 0.2s) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.backdrop {
|
|
39
|
-
position: absolute;
|
|
40
|
-
opacity: 0;
|
|
41
|
-
height: 7px;
|
|
42
|
-
width: 14px;
|
|
43
|
-
border-radius: 0 0 var(--md-sys-shape-corner-full, 50%) var(--md-sys-shape-corner-full, 50%);
|
|
44
|
-
background-color: var(--md-sys-color-inverse-surface);
|
|
45
|
-
z-index: -1;
|
|
46
|
-
transform-origin: 50% 0;
|
|
47
|
-
visibility: hidden;
|
|
48
|
-
transition: opacity var(--md-sys-motion-duration-short4, 0.2s) var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
49
|
-
}
|
package/src/scss/expressive.scss
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
/* Checkboxes */
|
|
2
|
-
|
|
3
|
-
[type="checkbox"] {
|
|
4
|
-
/* Remove default checkbox */
|
|
5
|
-
&:not(:checked),
|
|
6
|
-
&:checked {
|
|
7
|
-
position: absolute;
|
|
8
|
-
opacity: 0;
|
|
9
|
-
pointer-events: none;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// Text Label Style
|
|
13
|
-
+ span:not(.lever) {
|
|
14
|
-
position: relative;
|
|
15
|
-
padding-left: 35px;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
display: inline-block;
|
|
18
|
-
height: 25px;
|
|
19
|
-
line-height: 25px;
|
|
20
|
-
font-size: 1rem;
|
|
21
|
-
user-select: none;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* checkbox aspect */
|
|
25
|
-
+ span:not(.lever):before,
|
|
26
|
-
&:not(.filled-in) + span:not(.lever):after {
|
|
27
|
-
content: '';
|
|
28
|
-
position: absolute;
|
|
29
|
-
top: 0;
|
|
30
|
-
left: 0;
|
|
31
|
-
width: 18px;
|
|
32
|
-
height: 18px;
|
|
33
|
-
z-index: 0;
|
|
34
|
-
border: 2px solid var(--md-sys-color-on-surface-variant);
|
|
35
|
-
border-radius: 1px;
|
|
36
|
-
margin-top: 3px;
|
|
37
|
-
transition: .2s;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:not(.filled-in) + span:not(.lever):after {
|
|
41
|
-
border: 0;
|
|
42
|
-
transform: scale(0);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&:not(:checked):disabled + span:not(.lever):before {
|
|
46
|
-
border: none;
|
|
47
|
-
background-color: var(--md-sys-color-on-surface);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Focused styles
|
|
51
|
-
&.tabbed:focus + span:not(.lever):after {
|
|
52
|
-
transform: scale(1);
|
|
53
|
-
border: 0;
|
|
54
|
-
border-radius: 50%;
|
|
55
|
-
box-shadow: 0 0 0 10px rgba(0, 0, 0, 0.12);
|
|
56
|
-
background-color: rgba(0, 0, 0, 0.12);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Checked styles
|
|
60
|
-
&:checked {
|
|
61
|
-
+ span:not(.lever):before {
|
|
62
|
-
top: -4px;
|
|
63
|
-
left: -5px;
|
|
64
|
-
width: 12px;
|
|
65
|
-
height: 22px;
|
|
66
|
-
border-top: 2px solid transparent;
|
|
67
|
-
border-left: 2px solid transparent;
|
|
68
|
-
border-right: 2px solid var(--md-sys-color-primary);
|
|
69
|
-
border-bottom: 2px solid var(--md-sys-color-primary);
|
|
70
|
-
transform: rotate(40deg);
|
|
71
|
-
backface-visibility: hidden;
|
|
72
|
-
transform-origin: 100% 100%;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&:disabled + span:before {
|
|
76
|
-
border-right: 2px solid var(--md-sys-color-on-surface);
|
|
77
|
-
border-bottom: 2px solid var(--md-sys-color-on-surface);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/* Indeterminate checkbox */
|
|
82
|
-
&:indeterminate {
|
|
83
|
-
+ span:not(.lever):before {
|
|
84
|
-
top: -11px;
|
|
85
|
-
left: -12px;
|
|
86
|
-
width: 10px;
|
|
87
|
-
height: 22px;
|
|
88
|
-
border-top: none;
|
|
89
|
-
border-left: none;
|
|
90
|
-
border-right: 2px solid var(--md-sys-color-primary);
|
|
91
|
-
border-bottom: none;
|
|
92
|
-
transform: rotate(90deg);
|
|
93
|
-
backface-visibility: hidden;
|
|
94
|
-
transform-origin: 100% 100%;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Disabled indeterminate
|
|
98
|
-
&:disabled + span:not(.lever):before {
|
|
99
|
-
border-right: 2px solid var(--md-sys-color-on-surface);
|
|
100
|
-
background-color: transparent;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// Filled in Style
|
|
105
|
-
&.filled-in {
|
|
106
|
-
// General
|
|
107
|
-
+ span:not(.lever):after {
|
|
108
|
-
border-radius: 2px;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
+ span:not(.lever):before,
|
|
112
|
-
+ span:not(.lever):after {
|
|
113
|
-
content: '';
|
|
114
|
-
left: 0;
|
|
115
|
-
position: absolute;
|
|
116
|
-
/* .1s delay is for check animation */
|
|
117
|
-
transition: border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s;
|
|
118
|
-
z-index: 1;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// Unchecked style
|
|
122
|
-
&:not(:checked) + span:not(.lever):before {
|
|
123
|
-
width: 0;
|
|
124
|
-
height: 0;
|
|
125
|
-
border: 3px solid transparent;
|
|
126
|
-
left: 6px;
|
|
127
|
-
top: 10px;
|
|
128
|
-
transform: rotateZ(37deg);
|
|
129
|
-
transform-origin: 100% 100%;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
&:not(:checked) + span:not(.lever):after {
|
|
133
|
-
height: 20px;
|
|
134
|
-
width: 20px;
|
|
135
|
-
background-color: transparent;
|
|
136
|
-
border: 2px solid var(--md-sys-color-on-surface-variant);
|
|
137
|
-
top: 0px;
|
|
138
|
-
z-index: 0;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// Checked style
|
|
142
|
-
&:checked {
|
|
143
|
-
+ span:not(.lever):before {
|
|
144
|
-
top: 0;
|
|
145
|
-
left: 1px;
|
|
146
|
-
width: 8px;
|
|
147
|
-
height: 13px;
|
|
148
|
-
border-top: 2px solid transparent;
|
|
149
|
-
border-left: 2px solid transparent;
|
|
150
|
-
border-right: 2px solid var(--md-sys-color-on-primary);
|
|
151
|
-
border-bottom: 2px solid var(--md-sys-color-on-primary);
|
|
152
|
-
transform: rotateZ(37deg);
|
|
153
|
-
transform-origin: 100% 100%;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
+ span:not(.lever):after {
|
|
157
|
-
top: 0;
|
|
158
|
-
width: 20px;
|
|
159
|
-
height: 20px;
|
|
160
|
-
border: 2px solid var(--md-sys-color-primary);
|
|
161
|
-
background-color: var(--md-sys-color-primary);
|
|
162
|
-
z-index: 0;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// Focused styles
|
|
167
|
-
&.tabbed:focus + span:not(.lever):after {
|
|
168
|
-
border-radius: 2px;
|
|
169
|
-
border-color: var(--md-sys-color-on-surface-variant)r;
|
|
170
|
-
background-color: rgba(0, 0, 0, 0.12);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
&.tabbed:checked:focus + span:not(.lever):after {
|
|
174
|
-
border-radius: 2px;
|
|
175
|
-
background-color: var(--md-sys-color-primary);
|
|
176
|
-
border-color: var(--md-sys-color-primary);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// Disabled style
|
|
180
|
-
&:disabled:not(:checked) + span:not(.lever):before {
|
|
181
|
-
background-color: transparent;
|
|
182
|
-
border: 2px solid transparent;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
&:disabled:not(:checked) + span:not(.lever):after {
|
|
186
|
-
border-color: transparent;
|
|
187
|
-
background-color: var(--md-sys-color-on-surface);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
&:disabled:checked + span:not(.lever):before {
|
|
191
|
-
background-color: transparent;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
&:disabled:checked + span:not(.lever):after {
|
|
195
|
-
background-color: var(--md-sys-color-on-surface);
|
|
196
|
-
border-color: var(--md-sys-color-on-surface);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
@use '../foundation/variables' as *;
|
|
2
|
-
|
|
3
|
-
/* Style Placeholders */
|
|
4
|
-
::placeholder {
|
|
5
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/* Text inputs */
|
|
9
|
-
input:not([type]):not(.browser-default),
|
|
10
|
-
input[type=text]:not(.browser-default),
|
|
11
|
-
input[type=password]:not(.browser-default),
|
|
12
|
-
input[type=email]:not(.browser-default),
|
|
13
|
-
input[type=url]:not(.browser-default),
|
|
14
|
-
input[type=time]:not(.browser-default),
|
|
15
|
-
input[type=date]:not(.browser-default),
|
|
16
|
-
input[type=datetime]:not(.browser-default),
|
|
17
|
-
input[type=datetime-local]:not(.browser-default),
|
|
18
|
-
input[type=month]:not(.browser-default),
|
|
19
|
-
input[type=tel]:not(.browser-default),
|
|
20
|
-
input[type=number]:not(.browser-default),
|
|
21
|
-
input[type=search]:not(.browser-default),
|
|
22
|
-
textarea.materialize-textarea {
|
|
23
|
-
outline: none;
|
|
24
|
-
color: var(--md-sys-color-on-background);
|
|
25
|
-
width: 100%;
|
|
26
|
-
font-size: $md_sys_typescale_body-large_size; //16px; // => 16 dp
|
|
27
|
-
height: 56px; // 56dp
|
|
28
|
-
background-color: transparent;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
%invalid-input-style {
|
|
32
|
-
border-bottom: 2px solid var(--md-sys-color-error);
|
|
33
|
-
box-shadow: 0 1px 0 0 var(--md-sys-color-error);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
%hidden-text > span {
|
|
37
|
-
display: none
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
%custom-error-message {
|
|
41
|
-
content: attr(data-error);
|
|
42
|
-
color: var(--md-sys-color-error);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.input-field {
|
|
46
|
-
--input-color: var(--md-sys-color-primary);
|
|
47
|
-
|
|
48
|
-
position: relative;
|
|
49
|
-
clear: both;
|
|
50
|
-
|
|
51
|
-
// Default
|
|
52
|
-
|
|
53
|
-
input, textarea {
|
|
54
|
-
box-sizing: border-box; /* https://stackoverflow.com/questions/1377719/padding-within-inputs-breaks-width-100*/
|
|
55
|
-
padding: 0 16px;
|
|
56
|
-
padding-top: 20px;
|
|
57
|
-
//background-color: transparent; //background-color: var(--md-sys-color-surface);
|
|
58
|
-
border: none; // reset
|
|
59
|
-
border-radius: 4px; // md.sys.shape.corner.extra-small.top
|
|
60
|
-
border-bottom: 1px solid var(--md-sys-color-on-surface-variant);
|
|
61
|
-
border-bottom-left-radius: 0;
|
|
62
|
-
border-bottom-right-radius: 0;
|
|
63
|
-
|
|
64
|
-
&:focus:not([readonly]) {
|
|
65
|
-
border-bottom: 2px solid var(--input-color);
|
|
66
|
-
padding-top: 20px + 1px; // add border-width
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&:disabled, &[readonly="readonly"] {
|
|
70
|
-
color: rgba(var(--md_sys_color_on-surface), 0.38);
|
|
71
|
-
border-color: rgba(var(--md_sys_color_on-surface), 0.12);
|
|
72
|
-
background-color: rgba(var(--md_sys_color_on-surface), 0.04);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Label
|
|
76
|
-
&:focus:not([readonly]) + label {
|
|
77
|
-
color: var(--input-color);
|
|
78
|
-
}
|
|
79
|
-
&:focus:not([readonly]) + label,
|
|
80
|
-
&:not([placeholder=' ']) + label,
|
|
81
|
-
&:not(:placeholder-shown) + label {
|
|
82
|
-
//font-size: 12px; // md.sys.typescale.body-small.size
|
|
83
|
-
// https://stackoverflow.com/questions/34717492/css-transition-font-size-avoid-jittering-wiggling
|
|
84
|
-
transform: scale(calc(12 / 16));
|
|
85
|
-
top: 8px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&:disabled + label, &[readonly="readonly"] + label {
|
|
89
|
-
color: rgba(var(--md_sys_color_on-surface), 0.38);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// Hide helper text on data message
|
|
93
|
-
&.invalid ~ .supporting-text[data-error] {
|
|
94
|
-
@extend %hidden-text;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Invalid Input Style
|
|
98
|
-
&.invalid {
|
|
99
|
-
@extend %invalid-input-style;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Custom Error message
|
|
103
|
-
&.invalid ~ .supporting-text:after {
|
|
104
|
-
@extend %custom-error-message;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&.invalid ~ label,
|
|
108
|
-
&:focus.invalid ~ label {
|
|
109
|
-
color: var(--md-sys-color-error);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
input::placeholder {
|
|
114
|
-
user-select: none;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
& > label {
|
|
118
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
119
|
-
user-select: none;
|
|
120
|
-
font-size: 16px;
|
|
121
|
-
position: absolute;
|
|
122
|
-
left: 16px;
|
|
123
|
-
top: 16px;
|
|
124
|
-
cursor: text;
|
|
125
|
-
transform-origin: top left;
|
|
126
|
-
transition:
|
|
127
|
-
left 0.2s ease-out,
|
|
128
|
-
top 0.2s ease-out,
|
|
129
|
-
transform 0.2s ease-out
|
|
130
|
-
;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// Sub-Infos
|
|
134
|
-
|
|
135
|
-
.supporting-text {
|
|
136
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
137
|
-
font-size: 12px;
|
|
138
|
-
padding: 0 16px;
|
|
139
|
-
margin-top: 4px;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.character-counter {
|
|
143
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
144
|
-
font-size: 12px;
|
|
145
|
-
float: right;
|
|
146
|
-
padding: 0 16px;
|
|
147
|
-
margin-top: 4px;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.prefix {
|
|
151
|
-
position: absolute;
|
|
152
|
-
left: 12px;
|
|
153
|
-
top: 16px;
|
|
154
|
-
user-select: none;
|
|
155
|
-
display: flex;
|
|
156
|
-
align-self: center;
|
|
157
|
-
|
|
158
|
-
~ input, ~ textarea {
|
|
159
|
-
padding-left: calc(12px + 24px + 16px);
|
|
160
|
-
}
|
|
161
|
-
~ label {
|
|
162
|
-
left: calc(12px + 24px + 16px);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.suffix {
|
|
167
|
-
position: absolute;
|
|
168
|
-
right: 12px;
|
|
169
|
-
top: 16px;
|
|
170
|
-
user-select: none;
|
|
171
|
-
|
|
172
|
-
~ input, ~ textarea {
|
|
173
|
-
padding-right: calc(12px + 24px + 16px);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// Outlined
|
|
178
|
-
|
|
179
|
-
// todo: use this approach for floating labels with outline
|
|
180
|
-
// https://dev.to/icyjoseph/use-more-html-elements-floating-from-field-37o9
|
|
181
|
-
|
|
182
|
-
&.outlined {
|
|
183
|
-
|
|
184
|
-
input, textarea {
|
|
185
|
-
padding-top: 0;
|
|
186
|
-
background-color: transparent; //(--md-sys-color-background);
|
|
187
|
-
border: 1px solid var(--md-sys-color-on-surface-variant);
|
|
188
|
-
border-radius: 4px; // md.sys.shape.corner.extra-small
|
|
189
|
-
|
|
190
|
-
&:focus:not([readonly]) {
|
|
191
|
-
border: 2px solid var(--input-color);
|
|
192
|
-
padding-top: 0;
|
|
193
|
-
margin-left: -1px; // subtract border-width
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
// Label
|
|
198
|
-
&:focus:not([readonly]) + label {
|
|
199
|
-
color: var(--input-color);
|
|
200
|
-
}
|
|
201
|
-
&:focus:not([readonly]) + label,
|
|
202
|
-
&:not([placeholder=' ']) + label,
|
|
203
|
-
&:not(:placeholder-shown) + label {
|
|
204
|
-
top: -8px;
|
|
205
|
-
left: 16px;
|
|
206
|
-
margin-left: -4px;
|
|
207
|
-
padding: 0 4px;
|
|
208
|
-
background-color: transparent; //var(--md-sys-color-background);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
&:disabled, &[readonly="readonly"] {
|
|
212
|
-
color: rgba(var(--md_sys_color_on-surface), 0.38);
|
|
213
|
-
border-color: rgba(var(--md_sys_color_on-surface), 0.12);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// Error
|
|
219
|
-
&.error {
|
|
220
|
-
input, textarea {
|
|
221
|
-
border-color: var(--md-sys-color-error);
|
|
222
|
-
|
|
223
|
-
&:focus:not([readonly]) {
|
|
224
|
-
border-color: var(--md-sys-color-error);
|
|
225
|
-
|
|
226
|
-
+ label {
|
|
227
|
-
color: var(--md-sys-color-error);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
label {
|
|
232
|
-
color: var(--md-sys-color-error);
|
|
233
|
-
}
|
|
234
|
-
.supporting-text {
|
|
235
|
-
color: var(--md-sys-color-error);
|
|
236
|
-
}
|
|
237
|
-
.suffix {
|
|
238
|
-
color: var(--md-sys-color-error);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
/* Inline */
|
|
244
|
-
.inline {
|
|
245
|
-
display: inline-block;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/* Search Field */
|
|
249
|
-
.searchbar {
|
|
250
|
-
.prefix {
|
|
251
|
-
position: absolute;
|
|
252
|
-
padding-left: 1rem;
|
|
253
|
-
top: 0;
|
|
254
|
-
user-select: none;
|
|
255
|
-
display: flex;
|
|
256
|
-
align-self: center;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
& > input {
|
|
260
|
-
border-width: 0;
|
|
261
|
-
background-color: transparent;
|
|
262
|
-
padding-left: 3rem;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
&.has-sidebar {
|
|
266
|
-
margin-left: 0;
|
|
267
|
-
@media #{$large-and-up} {
|
|
268
|
-
margin-left: 300px;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
/*
|
|
274
|
-
.input-field input[type=search] {
|
|
275
|
-
display: block;
|
|
276
|
-
line-height: inherit;
|
|
277
|
-
|
|
278
|
-
.nav-wrapper & {
|
|
279
|
-
height: inherit;
|
|
280
|
-
padding-left: 4rem;
|
|
281
|
-
width: calc(100% - 4rem);
|
|
282
|
-
border: 0;
|
|
283
|
-
box-shadow: none;
|
|
284
|
-
}
|
|
285
|
-
&:focus:not(.browser-default) {
|
|
286
|
-
border: 0;
|
|
287
|
-
box-shadow: none;
|
|
288
|
-
}
|
|
289
|
-
& + .label-icon {
|
|
290
|
-
transform: none;
|
|
291
|
-
left: 1rem;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
*/
|
|
295
|
-
|
|
296
|
-
/* Textarea */
|
|
297
|
-
// Default textarea
|
|
298
|
-
textarea {
|
|
299
|
-
width: 100%;
|
|
300
|
-
height: 3rem;
|
|
301
|
-
background-color: transparent;
|
|
302
|
-
|
|
303
|
-
&.materialize-textarea {
|
|
304
|
-
padding-top: 26px !important;
|
|
305
|
-
padding-bottom: 4px !important;
|
|
306
|
-
line-height: normal;
|
|
307
|
-
overflow-y: hidden; /* prevents scroll bar flash */
|
|
308
|
-
resize: none;
|
|
309
|
-
min-height: 3rem;
|
|
310
|
-
box-sizing: border-box;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
// For textarea autoresize
|
|
315
|
-
.hiddendiv {
|
|
316
|
-
visibility: hidden;
|
|
317
|
-
white-space: pre-wrap;
|
|
318
|
-
word-wrap: break-word;
|
|
319
|
-
overflow-wrap: break-word; /* future version of deprecated 'word-wrap' */
|
|
320
|
-
padding-top: 1.2rem; /* prevents text jump on Enter keypress */
|
|
321
|
-
// Reduces repaints
|
|
322
|
-
position: absolute;
|
|
323
|
-
top: 0;
|
|
324
|
-
z-index: -1;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/* Autocomplete Items */
|
|
328
|
-
.autocomplete-content {
|
|
329
|
-
li {
|
|
330
|
-
.highlight { color: var(--md-sys-color-on-background); }
|
|
331
|
-
img {
|
|
332
|
-
height: $dropdown-item-height - 10;
|
|
333
|
-
width: $dropdown-item-height - 10;
|
|
334
|
-
margin: 5px 15px;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
/* Datepicker date input fields */
|
|
340
|
-
.datepicker-date-input {
|
|
341
|
-
position: relative;
|
|
342
|
-
text-indent: -9999px;
|
|
343
|
-
|
|
344
|
-
&::after {
|
|
345
|
-
display: block;
|
|
346
|
-
position: absolute;
|
|
347
|
-
top: 1.10rem;
|
|
348
|
-
content: attr(data-date);
|
|
349
|
-
color: var(--input-color);
|
|
350
|
-
text-indent: 0;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
&:focus-visible {
|
|
354
|
-
text-indent: 0;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
&:focus-visible:after {
|
|
358
|
-
text-indent: -9999px;
|
|
359
|
-
}
|
|
360
|
-
}
|