material-sass 4.0.0.beta2 → 4.0.0.beta3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +3 -3
- data/Rakefile +11 -9
- data/assets/javascripts/material.js +3278 -825
- data/assets/javascripts/material.min.js +17 -1
- data/assets/javascripts/material/{initializers/picker.js → addons/pickadate.js} +5 -23
- data/assets/javascripts/material/components/expansion-panel.js +9 -18
- data/assets/javascripts/material/components/floating-label.js +21 -24
- data/assets/javascripts/material/components/{navdrawer.js → nav-drawer.js} +51 -55
- data/assets/javascripts/material/components/selection-control-focus.js +15 -21
- data/assets/javascripts/material/components/tab-switch.js +13 -20
- data/assets/javascripts/material/components/util.js +31 -41
- data/assets/stylesheets/material/_functions.scss +1 -1
- data/assets/stylesheets/material/_print.scss +13 -2
- data/assets/stylesheets/material/_utilities.scss +0 -1
- data/assets/stylesheets/material/_variables.scss +0 -1
- data/assets/stylesheets/material/base/_base.scss +1 -16
- data/assets/stylesheets/material/bootstrap/_close.scss +4 -0
- data/assets/stylesheets/material/bootstrap/_code.scss +6 -0
- data/assets/stylesheets/material/bootstrap/_custom-form.scss +26 -28
- data/assets/stylesheets/material/bootstrap/_form.scss +7 -36
- data/assets/stylesheets/material/bootstrap/_pagination.scss +7 -2
- data/assets/stylesheets/material/bootstrap/_popover.scss +18 -14
- data/assets/stylesheets/material/material.scss +0 -1
- data/assets/stylesheets/material/material/_button-flat.scss +8 -8
- data/assets/stylesheets/material/material/_button-group.scss +26 -63
- data/assets/stylesheets/material/material/_button.scss +18 -18
- data/assets/stylesheets/material/material/_dialog.scss +6 -6
- data/assets/stylesheets/material/material/_expansion-panel.scss +4 -4
- data/assets/stylesheets/material/material/_menu.scss +2 -2
- data/assets/stylesheets/material/material/_picker.scss +3 -3
- data/assets/stylesheets/material/material/_progress.scss +2 -1
- data/assets/stylesheets/material/material/_selection-control.scss +88 -67
- data/assets/stylesheets/material/material/_text-field-input-group.scss +49 -82
- data/assets/stylesheets/material/material/_text-field.scss +36 -6
- data/assets/stylesheets/material/material/_toolbar.scss +4 -0
- data/assets/stylesheets/material/material/_tooltip.scss +1 -1
- data/assets/stylesheets/material/mixins/_breakpoint.scss +1 -1
- data/assets/stylesheets/material/mixins/_form.scss +79 -17
- data/assets/stylesheets/material/mixins/_grid-framework.scss +9 -3
- data/assets/stylesheets/material/mixins/_grid.scss +3 -1
- data/assets/stylesheets/material/mixins/_hover.scss +14 -55
- data/assets/stylesheets/material/mixins/_material-icons.scss +2 -4
- data/assets/stylesheets/material/mixins/_text-alignment.scss +2 -2
- data/assets/stylesheets/material/mixins/_text-hide.scss +1 -1
- data/assets/stylesheets/material/utilities/_border.scss +20 -0
- data/assets/stylesheets/material/variables/_palette.scss +2 -0
- data/assets/stylesheets/material/variables/_variable-bootstrap.scss +17 -0
- data/assets/stylesheets/material/variables/_variable-material.scss +2 -6
- data/lib/material-sass/version.rb +1 -1
- metadata +4 -12
- data/assets/javascripts/material/addons/picker.date.js +0 -234
- data/assets/javascripts/material/addons/picker.js +0 -172
- data/assets/javascripts/material/addons/textarea-autosize.js +0 -23
- data/assets/javascripts/material/addons/waves.js +0 -127
- data/assets/javascripts/material/initializers/textarea-autosize.js +0 -10
- data/assets/javascripts/material/initializers/waves.js +0 -13
- data/assets/stylesheets/material/material/_text-field-textarea.scss +0 -15
- data/assets/stylesheets/material/utilities/_waves.scss +0 -41
@@ -137,21 +137,21 @@
|
|
137
137
|
color: map-get(theme-color($color), color);
|
138
138
|
}
|
139
139
|
|
140
|
-
|
141
|
-
|
140
|
+
&.disabled,
|
141
|
+
&:disabled {
|
142
142
|
color: $btn-color-disabled;
|
143
143
|
}
|
144
144
|
}
|
145
145
|
}
|
146
146
|
|
147
|
-
|
148
|
-
|
147
|
+
&.active,
|
148
|
+
&:active {
|
149
149
|
background-color: $btn-bg-active;
|
150
150
|
box-shadow: none;
|
151
151
|
}
|
152
152
|
|
153
|
-
|
154
|
-
|
153
|
+
&.disabled,
|
154
|
+
&:disabled {
|
155
155
|
background-color: transparent;
|
156
156
|
}
|
157
157
|
}
|
@@ -62,8 +62,8 @@
|
|
62
62
|
text-decoration: none;
|
63
63
|
}
|
64
64
|
|
65
|
-
|
66
|
-
|
65
|
+
&.disabled,
|
66
|
+
&:disabled {
|
67
67
|
background-color: $expansion-panel-bg;
|
68
68
|
color: $expansion-panel-color-disabled;
|
69
69
|
}
|
@@ -208,8 +208,8 @@
|
|
208
208
|
text-decoration: none;
|
209
209
|
}
|
210
210
|
|
211
|
-
|
212
|
-
|
211
|
+
&.disabled,
|
212
|
+
&:disabled {
|
213
213
|
background-color: $expansion-panel-bg;
|
214
214
|
color: $expansion-panel-color-disabled;
|
215
215
|
}
|
@@ -7,7 +7,7 @@
|
|
7
7
|
}
|
8
8
|
|
9
9
|
.picker-box {
|
10
|
-
@include border-bottom-radius($border-radius);
|
10
|
+
@include border-bottom-radius($picker-border-radius);
|
11
11
|
|
12
12
|
background-color: $picker-content-bg;
|
13
13
|
overflow: hidden;
|
@@ -88,7 +88,7 @@
|
|
88
88
|
}
|
89
89
|
|
90
90
|
.picker-wrap {
|
91
|
-
@include border-radius($border-radius);
|
91
|
+
@include border-radius($picker-border-radius);
|
92
92
|
@include transition-standard-complex(transform);
|
93
93
|
@include typography-body-1;
|
94
94
|
|
@@ -178,7 +178,7 @@
|
|
178
178
|
// Material date display
|
179
179
|
|
180
180
|
.picker-date-display {
|
181
|
-
@include border-top-radius($border-radius);
|
181
|
+
@include border-top-radius($picker-border-radius);
|
182
182
|
@include text-align(left);
|
183
183
|
|
184
184
|
background-color: $picker-header-bg;
|
@@ -6,6 +6,7 @@
|
|
6
6
|
display: flex;
|
7
7
|
overflow: hidden;
|
8
8
|
position: relative;
|
9
|
+
z-index: 1;
|
9
10
|
}
|
10
11
|
|
11
12
|
.progress-bar {
|
@@ -136,7 +137,7 @@
|
|
136
137
|
|
137
138
|
&::after,
|
138
139
|
&::before {
|
139
|
-
@include border-radius($border-radius);
|
140
|
+
@include border-radius($progress-bar-border-radius);
|
140
141
|
|
141
142
|
animation-duration: 2s;
|
142
143
|
animation-iteration-count: infinite;
|
@@ -1,34 +1,41 @@
|
|
1
1
|
.custom-control {
|
2
|
-
|
3
|
-
|
4
|
-
font-size: $font-size-base;
|
5
|
-
margin-right: ($selection-control-spacer-x * 2);
|
2
|
+
display: block;
|
3
|
+
margin-bottom: $selection-control-spacer-y;
|
6
4
|
min-height: ($font-size-base * $line-height-base);
|
7
5
|
padding-left: ($selection-control-indicator-size + $selection-control-spacer-x);
|
8
6
|
position: relative;
|
9
7
|
}
|
10
8
|
|
11
|
-
.custom-control-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
9
|
+
.custom-control-inline {
|
10
|
+
display: inline-flex;
|
11
|
+
margin-right: ($selection-control-spacer-x * 2);
|
12
|
+
}
|
13
|
+
|
14
|
+
// Base styles for custom control indicators
|
15
|
+
|
16
|
+
.custom-control-label {
|
17
|
+
color: inherit;
|
18
|
+
font-size: $font-size-base;
|
19
|
+
line-height: inherit;
|
20
|
+
margin-bottom: 0;
|
21
|
+
|
22
|
+
&::after {
|
23
|
+
color: $selection-control-color;
|
24
|
+
position: absolute;
|
25
|
+
top: (($font-size-base * $line-height-base - $selection-control-indicator-size) / 2);
|
26
|
+
left: 0;
|
27
|
+
}
|
22
28
|
|
23
29
|
&::before {
|
24
30
|
@include transition-standard(background-color, opacity, transform);
|
25
31
|
|
26
32
|
background-color: currentColor;
|
27
33
|
border-radius: 50%;
|
34
|
+
color: $selection-control-color;
|
28
35
|
content: '';
|
29
36
|
display: block;
|
30
37
|
height: ($selection-control-indicator-size * 2);
|
31
|
-
margin-top: ($selection-control-indicator-size / -2);
|
38
|
+
margin-top: (($font-size-base * $line-height-base - $selection-control-indicator-size) / 2 + $selection-control-indicator-size / -2);
|
32
39
|
margin-left: ($selection-control-indicator-size / -2);
|
33
40
|
opacity: 0;
|
34
41
|
position: absolute;
|
@@ -44,58 +51,58 @@
|
|
44
51
|
position: absolute;
|
45
52
|
z-index: -1;
|
46
53
|
|
47
|
-
|
48
|
-
|
49
|
-
~ .custom-control-
|
54
|
+
&.focus,
|
55
|
+
&:active {
|
56
|
+
~ .custom-control-label::before {
|
50
57
|
opacity: $selection-control-radial-opacity;
|
51
58
|
transform: scale(1, 1) translateZ(0);
|
52
59
|
}
|
53
60
|
}
|
54
61
|
|
55
62
|
&:checked ~ {
|
56
|
-
.custom-control-
|
57
|
-
|
63
|
+
.custom-control-label {
|
64
|
+
&::after {
|
65
|
+
color: $selection-control-color-active;
|
66
|
+
}
|
67
|
+
|
68
|
+
&::before {
|
69
|
+
background-color: $selection-control-color-active;
|
70
|
+
}
|
58
71
|
}
|
59
72
|
}
|
60
73
|
|
61
74
|
&:disabled ~ {
|
62
|
-
.custom-control-
|
63
|
-
.custom-control-description {
|
75
|
+
.custom-control-label {
|
64
76
|
color: $selection-control-color-disabled;
|
65
|
-
}
|
66
77
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
.custom-controls-stacked {
|
74
|
-
display: flex;
|
75
|
-
flex-direction: column;
|
78
|
+
&::after {
|
79
|
+
color: $selection-control-color-disabled;
|
80
|
+
}
|
76
81
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
82
|
+
&::before {
|
83
|
+
display: none;
|
84
|
+
}
|
85
|
+
}
|
81
86
|
}
|
82
87
|
}
|
83
88
|
|
84
89
|
// Checkbox
|
85
90
|
|
86
91
|
.custom-checkbox {
|
87
|
-
.custom-control-
|
92
|
+
.custom-control-label::after {
|
88
93
|
@include set-material-icons;
|
89
94
|
|
90
95
|
content: $selection-control-checkbox-icon;
|
96
|
+
line-height: 1;
|
97
|
+
vertical-align: middle;
|
91
98
|
}
|
92
99
|
|
93
100
|
.custom-control-input {
|
94
|
-
&:checked ~ .custom-control-
|
101
|
+
&:checked ~ .custom-control-label::after {
|
95
102
|
content: $selection-control-checkbox-icon-checked;
|
96
103
|
}
|
97
104
|
|
98
|
-
&:indeterminate ~ .custom-control-
|
105
|
+
&:indeterminate ~ .custom-control-label::after {
|
99
106
|
content: $selection-control-checkbox-icon-indeterminate;
|
100
107
|
}
|
101
108
|
}
|
@@ -104,14 +111,16 @@
|
|
104
111
|
// Radio button
|
105
112
|
|
106
113
|
.custom-radio {
|
107
|
-
.custom-control-
|
114
|
+
.custom-control-label::after {
|
108
115
|
@include set-material-icons;
|
109
116
|
|
110
117
|
content: $selection-control-radio-icon;
|
118
|
+
line-height: 1;
|
119
|
+
vertical-align: middle;
|
111
120
|
}
|
112
121
|
|
113
122
|
.custom-control-input {
|
114
|
-
&:checked ~ .custom-control-
|
123
|
+
&:checked ~ .custom-control-label::after {
|
115
124
|
content: $selection-control-radio-icon-checked;
|
116
125
|
}
|
117
126
|
}
|
@@ -122,21 +131,9 @@
|
|
122
131
|
.custom-switch {
|
123
132
|
padding-left: ($selection-control-track-width + $selection-control-spacer-x);
|
124
133
|
|
125
|
-
.custom-control-
|
134
|
+
.custom-control-label {
|
126
135
|
@include transition-standard(background-color);
|
127
136
|
|
128
|
-
background-clip: content-box;
|
129
|
-
background-color: $selection-control-track-bg;
|
130
|
-
border: (($selection-control-indicator-size - $selection-control-track-height) / 2) solid transparent;
|
131
|
-
border-radius: $selection-control-track-height;
|
132
|
-
width: $selection-control-track-width;
|
133
|
-
|
134
|
-
&::after,
|
135
|
-
&::before {
|
136
|
-
top: (($selection-control-indicator-size - $selection-control-track-height) / -2);
|
137
|
-
left: (($selection-control-indicator-size - $selection-control-track-height) / -2);
|
138
|
-
}
|
139
|
-
|
140
137
|
&::after {
|
141
138
|
@include transition-standard(background-color, transform);
|
142
139
|
|
@@ -152,25 +149,49 @@
|
|
152
149
|
}
|
153
150
|
|
154
151
|
.custom-control-input {
|
155
|
-
&:checked
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
152
|
+
&:checked {
|
153
|
+
~ .custom-control-label {
|
154
|
+
// scss-lint:disable NestingDepth
|
155
|
+
&::after,
|
156
|
+
&::before {
|
157
|
+
transform: translateX($selection-control-track-width - $selection-control-indicator-size);
|
158
|
+
}
|
159
|
+
|
160
|
+
&::after {
|
161
|
+
background-color: $selection-control-color-active;
|
162
|
+
}
|
163
|
+
// scss-lint:enable
|
161
164
|
}
|
162
165
|
|
163
|
-
|
164
|
-
background-color: $selection-control-color-active;
|
166
|
+
~ .custom-control-track {
|
167
|
+
background-color: hex-to-rgba($selection-control-color-active, 0.5);
|
165
168
|
}
|
166
169
|
}
|
167
170
|
|
168
|
-
&:disabled
|
169
|
-
|
170
|
-
|
171
|
-
&::after {
|
171
|
+
&:disabled {
|
172
|
+
~ .custom-control-label::after {
|
172
173
|
background-color: $selection-control-thumb-bg-disabled;
|
173
174
|
}
|
175
|
+
|
176
|
+
~ .custom-control-track {
|
177
|
+
background-color: $selection-control-track-bg-disabled;
|
178
|
+
}
|
174
179
|
}
|
175
180
|
}
|
181
|
+
|
182
|
+
.custom-control-track {
|
183
|
+
@include transition-standard(background-color);
|
184
|
+
|
185
|
+
background-clip: content-box;
|
186
|
+
background-color: $selection-control-track-bg;
|
187
|
+
border: (($selection-control-indicator-size - $selection-control-track-height) / 2) solid transparent;
|
188
|
+
border-radius: $selection-control-track-height;
|
189
|
+
content: '';
|
190
|
+
display: block;
|
191
|
+
height: $selection-control-indicator-size;
|
192
|
+
position: absolute;
|
193
|
+
top: (($font-size-base * $line-height-base - $selection-control-indicator-size) / 2);
|
194
|
+
left: 0;
|
195
|
+
width: $selection-control-track-width;
|
196
|
+
}
|
176
197
|
}
|
@@ -1,105 +1,64 @@
|
|
1
1
|
.input-group {
|
2
2
|
align-items: center;
|
3
3
|
display: flex;
|
4
|
+
flex-wrap: wrap;
|
4
5
|
position: relative;
|
5
6
|
width: 100%;
|
6
7
|
|
8
|
+
.custom-file,
|
9
|
+
.custom-select,
|
7
10
|
.form-control {
|
8
11
|
flex: 1 1 auto;
|
12
|
+
margin-bottom: 0;
|
9
13
|
width: 1%;
|
10
14
|
}
|
11
15
|
}
|
12
16
|
|
13
|
-
//
|
17
|
+
// Addons
|
14
18
|
|
15
|
-
.input-group
|
16
|
-
.input-group
|
17
|
-
.input-group .form-control,
|
18
|
-
.input-group-addon,
|
19
|
-
.input-group-btn {
|
19
|
+
.input-group-append,
|
20
|
+
.input-group-prepend {
|
20
21
|
align-items: center;
|
21
22
|
display: flex;
|
22
|
-
}
|
23
|
-
|
24
|
-
.input-group .custom-file,
|
25
|
-
.input-group .custom-select {
|
26
|
-
width: 100%;
|
27
|
-
}
|
28
|
-
|
29
|
-
.input-group-addon,
|
30
|
-
.input-group-btn {
|
31
23
|
justify-content: center;
|
32
|
-
|
33
|
-
margin-left: $input-group-addon-margin-x;
|
24
|
+
min-width: $textfield-height;
|
34
25
|
|
35
|
-
|
36
|
-
|
37
|
-
}
|
26
|
+
.btn {
|
27
|
+
min-width: 0;
|
38
28
|
|
39
|
-
|
40
|
-
|
29
|
+
+ .btn {
|
30
|
+
margin-left: ($btn-group-inner-spacer-x * -1);
|
31
|
+
}
|
41
32
|
}
|
33
|
+
}
|
42
34
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
35
|
+
.input-group-append {
|
36
|
+
margin-left: $input-group-addon-margin-x;
|
37
|
+
}
|
38
|
+
|
39
|
+
.input-group-prepend {
|
40
|
+
margin-right: $input-group-addon-margin-x;
|
47
41
|
}
|
48
42
|
|
49
|
-
.input-group-
|
43
|
+
.input-group-text {
|
50
44
|
color: inherit;
|
51
45
|
font-size: $textfield-font-size;
|
52
46
|
line-height: $textfield-line-height;
|
53
|
-
|
47
|
+
margin-right: ($input-group-addon-margin-x / 2);
|
48
|
+
margin-bottom: 0;
|
49
|
+
margin-left: ($input-group-addon-margin-x / 2);
|
54
50
|
white-space: nowrap;
|
55
51
|
}
|
56
52
|
|
57
|
-
|
58
|
-
@include border-radius($btn-border-radius);
|
59
|
-
|
60
|
-
background-color: $btn-group-bg;
|
61
|
-
box-shadow: map-get($btn-elevation-shadow, shadow);
|
62
|
-
|
63
|
-
@each $color, $values in $theme-colors {
|
64
|
-
> .btn-#{$color} {
|
65
|
-
&:disabled,
|
66
|
-
&.disabled {
|
67
|
-
background-color: map-get(theme-color($color), lighter);
|
68
|
-
color: color-yiq(map-get(theme-color($color), lighter));
|
69
|
-
}
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
> .btn {
|
74
|
-
box-shadow: none;
|
75
|
-
flex: 0 1 auto;
|
76
|
-
margin-left: ($btn-group-inner-spacer-x * -1);
|
77
|
-
min-width: 0;
|
78
|
-
|
79
|
-
&:active,
|
80
|
-
&.active {
|
81
|
-
box-shadow: none;
|
82
|
-
}
|
83
|
-
|
84
|
-
&:first-child {
|
85
|
-
margin-left: 0;
|
86
|
-
}
|
87
|
-
}
|
88
|
-
|
89
|
-
> .btn:first-child:not(:last-child):not(.dropdown-toggle) {
|
90
|
-
@include border-right-radius(0);
|
91
|
-
}
|
53
|
+
// Border radius
|
92
54
|
|
93
|
-
|
94
|
-
|
55
|
+
.input-group > .input-group-append > .btn,
|
56
|
+
.input-group > .input-group-prepend > .btn {
|
57
|
+
&:not(:first-of-type) {
|
95
58
|
@include border-left-radius(0);
|
96
59
|
}
|
97
60
|
|
98
|
-
|
99
|
-
border-radius: 0;
|
100
|
-
}
|
101
|
-
|
102
|
-
> .dropdown-toggle:not(:last-child):not(:nth-last-child(2)) {
|
61
|
+
&:not(:last-of-type) {
|
103
62
|
@include border-right-radius(0);
|
104
63
|
}
|
105
64
|
}
|
@@ -111,14 +70,18 @@
|
|
111
70
|
@extend %form-control-lg;
|
112
71
|
}
|
113
72
|
|
114
|
-
> .input-group-
|
115
|
-
|
116
|
-
line-height: $textfield-line-height-lg;
|
73
|
+
> .input-group-append,
|
74
|
+
> .input-group-prepend {
|
117
75
|
min-width: $textfield-height-lg;
|
118
|
-
}
|
119
76
|
|
120
|
-
|
121
|
-
|
77
|
+
> .btn {
|
78
|
+
@extend %btn-lg;
|
79
|
+
}
|
80
|
+
|
81
|
+
> .input-group-text {
|
82
|
+
font-size: $textfield-font-size-lg;
|
83
|
+
line-height: $textfield-line-height-lg;
|
84
|
+
}
|
122
85
|
}
|
123
86
|
}
|
124
87
|
|
@@ -127,13 +90,17 @@
|
|
127
90
|
@extend %form-control-sm;
|
128
91
|
}
|
129
92
|
|
130
|
-
> .input-group-
|
131
|
-
|
132
|
-
line-height: $textfield-line-height-sm;
|
93
|
+
> .input-group-append,
|
94
|
+
> .input-group-prepend {
|
133
95
|
min-width: $textfield-height-sm;
|
134
|
-
}
|
135
96
|
|
136
|
-
|
137
|
-
|
97
|
+
> .btn {
|
98
|
+
@extend %btn-sm;
|
99
|
+
}
|
100
|
+
|
101
|
+
> .input-group-text {
|
102
|
+
font-size: $textfield-font-size-sm;
|
103
|
+
line-height: $textfield-line-height-sm;
|
104
|
+
}
|
138
105
|
}
|
139
106
|
}
|