rails-bootstrap-material-design 0.5.10

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.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +4 -0
  3. data/README.md +18 -0
  4. data/Rakefile +1 -0
  5. data/app/.DS_Store +0 -0
  6. data/app/assets/.DS_Store +0 -0
  7. data/app/assets/images/.DS_Store +0 -0
  8. data/app/assets/images/bootstrap-material-design/material-design-color-palette.jpg +0 -0
  9. data/app/assets/javascripts/.DS_Store +0 -0
  10. data/app/assets/javascripts/bootstrap-material-design.js +2 -0
  11. data/app/assets/javascripts/bootstrap-material-design/material.js +350 -0
  12. data/app/assets/javascripts/bootstrap-material-design/ripples.js +325 -0
  13. data/app/assets/stylesheets/.DS_Store +0 -0
  14. data/app/assets/stylesheets/bootstrap-material-design.scss +4 -0
  15. data/app/assets/stylesheets/bootstrap-material-design/.DS_Store +0 -0
  16. data/app/assets/stylesheets/bootstrap-material-design/_alerts.scss +17 -0
  17. data/app/assets/stylesheets/bootstrap-material-design/_buttons.scss +244 -0
  18. data/app/assets/stylesheets/bootstrap-material-design/_cards.scss +66 -0
  19. data/app/assets/stylesheets/bootstrap-material-design/_checkboxes.scss +270 -0
  20. data/app/assets/stylesheets/bootstrap-material-design/_colors-map.scss +311 -0
  21. data/app/assets/stylesheets/bootstrap-material-design/_colors.scss +359 -0
  22. data/app/assets/stylesheets/bootstrap-material-design/_core.scss +93 -0
  23. data/app/assets/stylesheets/bootstrap-material-design/_dialogs.scss +52 -0
  24. data/app/assets/stylesheets/bootstrap-material-design/_dividers.scss +71 -0
  25. data/app/assets/stylesheets/bootstrap-material-design/_form.scss +40 -0
  26. data/app/assets/stylesheets/bootstrap-material-design/_import-bs-sass.scss +2 -0
  27. data/app/assets/stylesheets/bootstrap-material-design/_inputs-size.scss +221 -0
  28. data/app/assets/stylesheets/bootstrap-material-design/_inputs.scss +352 -0
  29. data/app/assets/stylesheets/bootstrap-material-design/_labels.scss +4 -0
  30. data/app/assets/stylesheets/bootstrap-material-design/_lists.scss +102 -0
  31. data/app/assets/stylesheets/bootstrap-material-design/_mixins-utilities.scss +31 -0
  32. data/app/assets/stylesheets/bootstrap-material-design/_mixins.scss +241 -0
  33. data/app/assets/stylesheets/bootstrap-material-design/_navbar.scss +232 -0
  34. data/app/assets/stylesheets/bootstrap-material-design/_panels.scss +21 -0
  35. data/app/assets/stylesheets/bootstrap-material-design/_plugins.scss +5 -0
  36. data/app/assets/stylesheets/bootstrap-material-design/_popups.scss +18 -0
  37. data/app/assets/stylesheets/bootstrap-material-design/_progress.scss +10 -0
  38. data/app/assets/stylesheets/bootstrap-material-design/_radios.scss +115 -0
  39. data/app/assets/stylesheets/bootstrap-material-design/_shadows.scss +82 -0
  40. data/app/assets/stylesheets/bootstrap-material-design/_table.scss +15 -0
  41. data/app/assets/stylesheets/bootstrap-material-design/_tabs.scss +24 -0
  42. data/app/assets/stylesheets/bootstrap-material-design/_themes.scss +6 -0
  43. data/app/assets/stylesheets/bootstrap-material-design/_togglebutton.scss +83 -0
  44. data/app/assets/stylesheets/bootstrap-material-design/_typography.scss +15 -0
  45. data/app/assets/stylesheets/bootstrap-material-design/_variables.scss +169 -0
  46. data/app/assets/stylesheets/bootstrap-material-design/_welljumbo.scss +26 -0
  47. data/app/assets/stylesheets/bootstrap-material-design/plugins/_plugin-dropdownjs.scss +15 -0
  48. data/app/assets/stylesheets/bootstrap-material-design/plugins/_plugin-nouislider.scss +110 -0
  49. data/app/assets/stylesheets/bootstrap-material-design/plugins/_plugin-selectize.scss +91 -0
  50. data/app/assets/stylesheets/bootstrap-material-design/plugins/_plugin-snackbarjs.scss +32 -0
  51. data/app/assets/stylesheets/bootstrap-material-design/ripples.scss +36 -0
  52. data/lib/rails-bootstrap-material-design.rb +25 -0
  53. data/lib/rails-bootstrap-material-design/version.rb +3 -0
  54. data/rails-bootstrap-material-design.gemspec +20 -0
  55. metadata +124 -0
@@ -0,0 +1,4 @@
1
+ @import 'bootstrap-material-design/_variables';
2
+ @import 'bootstrap-material-design/_mixins';
3
+ @import 'bootstrap-material-design/_shadows';
4
+ @import 'bootstrap-material-design/_core';
@@ -0,0 +1,17 @@
1
+ .alert {
2
+ border: 0;
3
+ border-radius: 0;
4
+
5
+ // SASS conversion note: please mirror any content change in _mixins-shared.scss alert-variations-content
6
+ @include alert-variations(unquote(".alert"), unquote(""), $mdb-text-color-light);
7
+
8
+ &-info, &-danger, &-warning, &-success {
9
+ color: $mdb-text-color-light;
10
+ }
11
+
12
+ &-default {
13
+ a, .alert-link {
14
+ color: $mdb-text-color-primary;
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,244 @@
1
+ // specification: https://www.google.com/design/spec/components/buttons.html
2
+
3
+ @mixin typo-button($colorContrast: false){
4
+ font-size: $mdb-btn-font-size-base;
5
+ font-weight: 500;
6
+ text-transform: uppercase;
7
+ //line-height: 1;
8
+ letter-spacing: 0;
9
+
10
+ @if ($colorContrast) {
11
+ opacity: 0.87;
12
+ }
13
+ }
14
+
15
+ // mdb default buttons are flat by default
16
+ // synchronized with mdl 11/23/15
17
+ .btn,
18
+ .input-group-btn .btn {
19
+ border: none;
20
+ border-radius: $border-radius-base;
21
+ position: relative;
22
+ padding: 8px 30px;
23
+ margin: 10px 1px;
24
+ @include typo-button();
25
+ will-change: box-shadow, transform;
26
+ transition: box-shadow 0.2s $mdb-animation-curve-fast-out-linear-in,
27
+ background-color 0.2s $mdb-animation-curve-default,
28
+ color 0.2s $mdb-animation-curve-default;
29
+ outline: 0;
30
+ cursor: pointer;
31
+ text-decoration: none;
32
+
33
+ &::-moz-focus-inner {
34
+ border: 0;
35
+ }
36
+
37
+ //---
38
+ // btn-flat
39
+ background: transparent;
40
+ &:not(.btn-raised) {
41
+ @include variations(unquote(".btn"), unquote(""), color, $mdb-text-color-primary);
42
+ box-shadow: none;
43
+
44
+ &:not(.btn-link) {
45
+ &:hover,
46
+ &:focus {
47
+ // spec: flat/light bg Hover: 20% #999999
48
+ background-color: rgba(#999999, (20/100));
49
+
50
+ .theme-dark & {
51
+ // spec: dark bg Hover: 15% #CCCCCC
52
+ background-color: rgba(#CCCCCC, (15/100));
53
+ }
54
+ }
55
+ }
56
+ }
57
+
58
+ //--
59
+ // color variations
60
+ &.btn-raised,
61
+ &.btn-fab,
62
+ .btn-group-raised & {
63
+ @include background-variations(unquote(".btn"), unquote(""), $mdb-btn-background-color);
64
+ }
65
+
66
+ //---
67
+ // btn-raised
68
+ &.btn-raised,
69
+ .btn-group-raised & {
70
+ &:not(.btn-link) {
71
+ @include shadow-2dp();
72
+
73
+ // colors on hover, focus, active
74
+ &:hover,
75
+ &:focus,
76
+ &.active,
77
+ &:active {
78
+
79
+ outline: 0;
80
+
81
+ // FIXME: SPEC - this should be the 600 color, how can we get that programmatically if at all? Or are we limited to the color palette only?
82
+ // SASS conversion note: please mirror any content change in _mixins-shared.scss button-variations-content
83
+ @include button-variations(unquote(".btn"), "", $mdb-btn-background-color);
84
+
85
+ // Spec:
86
+ // - Raised Light/Light theme no hover.
87
+ // - Raised Dark/Dark theme Hover color: 600
88
+ .theme-dark & {
89
+ }
90
+ }
91
+
92
+ // shadow on active
93
+ &.active,
94
+ &:active {
95
+ &,
96
+ &:hover {
97
+ @include shadow-4dp();
98
+ }
99
+ }
100
+
101
+ // shadow on focus
102
+ // Focus should take precedence over active, so specificity is needed
103
+ &:focus {
104
+ &,
105
+ &.active,
106
+ &:active {
107
+ &,
108
+ &:hover {
109
+ @include focus-shadow();
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
115
+
116
+ &.btn-fab {
117
+ // see above for color variations
118
+ border-radius: 50%;
119
+ font-size: $mdb-btn-fab-font-size;
120
+ height: $mdb-btn-fab-size;
121
+ margin: auto;
122
+ min-width: $mdb-btn-fab-size;
123
+ width: $mdb-btn-fab-size;
124
+ padding: 0;
125
+ overflow: hidden;
126
+ box-shadow: 0 1px 1.5px 0 rgba(0, 0, 0, 0.12), 0 1px 1px 0 rgba(0, 0, 0, 0.24);
127
+ position: relative;
128
+ line-height: normal;
129
+
130
+ .ripple-container {
131
+ border-radius: 50%;
132
+ }
133
+
134
+ &.btn-fab-mini,
135
+ .btn-group-sm & {
136
+ height: $mdb-btn-fab-size-mini;
137
+ min-width: $mdb-btn-fab-size-mini;
138
+ width: $mdb-btn-fab-size-mini;
139
+
140
+ &.material-icons {
141
+ top: ($mdb-btn-icon-size-mini - $mdb-btn-fab-font-size) / 2;
142
+ left: ($mdb-btn-icon-size-mini - $mdb-btn-fab-font-size) / 2;
143
+ }
144
+ }
145
+
146
+ i.material-icons {
147
+ position: absolute;
148
+ top: 50%;
149
+ left: 50%;
150
+ transform: translate(-($mdb-btn-fab-font-size / 2), -($mdb-btn-fab-font-size / 2));
151
+ line-height: $mdb-btn-fab-font-size;
152
+ width: $mdb-btn-fab-font-size;
153
+ }
154
+ }
155
+
156
+ // Align icons inside buttons with text
157
+ i.material-icons {
158
+ vertical-align: middle;
159
+ }
160
+
161
+ // Size variations
162
+ &.btn-lg,
163
+ .btn-group-lg & {
164
+ font-size: $mdb-btn-font-size-lg;
165
+ }
166
+ &.btn-sm,
167
+ .btn-group-sm & {
168
+ padding: 5px 20px;
169
+ font-size: $mdb-btn-font-size-sm;
170
+ }
171
+ &.btn-xs,
172
+ .btn-group-xs & {
173
+ padding: 4px 15px;
174
+ font-size: $mdb-btn-font-size-xs;
175
+ }
176
+ }
177
+
178
+ // Disabled buttons and button groups
179
+ .btn,
180
+ .input-group-btn .btn,
181
+ .btn-group,
182
+ .btn-group-vertical {
183
+ // have to ratchet up the specificity to kill drop shadows on disabled raised buttons
184
+ fieldset[disabled][disabled] &,
185
+ &.disabled,
186
+ &:disabled,
187
+ &[disabled][disabled] {
188
+ // spec: light theme: Disabled text: 26% #000000
189
+ color: rgba(#000000, (26/100));
190
+ .theme-dark & {
191
+ // spec: dark theme: Disabled text: 30% #FFFFFF
192
+ color: rgba(#FFFFFF, (30/100));
193
+ }
194
+
195
+ // flat buttons lose transparency
196
+ background: transparent;
197
+
198
+ // no box-shadow on raised - need specificity
199
+ &.btn-raised,
200
+ &.btn-group-raised {
201
+ &,
202
+ &.active,
203
+ &:active,
204
+ &:focus:not(:active) {
205
+ box-shadow: none;
206
+ }
207
+ }
208
+ }
209
+ }
210
+
211
+ // btn-group variations
212
+ .btn-group,
213
+ .btn-group-vertical {
214
+
215
+ position: relative;
216
+ //border-radius: 2px;
217
+ margin: 10px 1px;
218
+
219
+ // spec: https://www.google.com/design/spec/components/buttons.html#buttons-toggle-buttons
220
+ &.open {
221
+ .dropdown-toggle {
222
+ //box-shadow: none;
223
+ }
224
+
225
+ & > .dropdown-toggle.btn {
226
+ @include variations(unquote(".btn"), unquote(""), background-color, $mdb-btn-background-color);
227
+ }
228
+ }
229
+
230
+ .dropdown-menu {
231
+ border-radius: 0 0 $border-radius-base $border-radius-base;
232
+ }
233
+
234
+ &.btn-group-raised {
235
+ @include shadow-2dp();
236
+ }
237
+
238
+ & .btn + .btn,
239
+ .btn,
240
+ .btn:active,
241
+ .btn-group {
242
+ margin: 0;
243
+ }
244
+ }
@@ -0,0 +1,66 @@
1
+ .card {
2
+
3
+ /***** Make height equal to width (http://stackoverflow.com/a/6615994) ****/
4
+
5
+ display: inline-block;
6
+ position: relative;
7
+ width: 100%;
8
+ .card-height-indicator {
9
+ margin-top: 100%;
10
+ }
11
+ .card-content {
12
+ position: absolute;
13
+ top: 0;
14
+ bottom: 0;
15
+ left: 0;
16
+ right: 0;
17
+ }
18
+
19
+ /**************************************************************************/
20
+
21
+
22
+ border-radius: $border-radius-base;
23
+ color: $mdb-card-body-text;
24
+ background: $mdb-card-body-background;
25
+
26
+ @include shadow-z-2();
27
+
28
+ .card-image {
29
+ height: 60%;
30
+ position: relative;
31
+ overflow: hidden;
32
+ img {
33
+ width: 100%;
34
+ height: 100%;
35
+ border-top-left-radius: 2px;
36
+ border-top-right-radius: 2px;
37
+ pointer-events: none;
38
+ }
39
+ .card-image-headline {
40
+ position: absolute;
41
+ bottom: 16px;
42
+ left: 18px;
43
+ color: $mdb-card-image-headline;
44
+ font-size: 2em;
45
+ }
46
+ }
47
+
48
+ .card-body {
49
+ height: 30%;
50
+ padding: 18px;
51
+ }
52
+
53
+ .card-footer {
54
+ height: 10%;
55
+ padding: 18px;
56
+ button, a {
57
+ margin: 0 !important;
58
+ position: relative;
59
+ bottom: 25px;
60
+ width: auto;
61
+ &:first-child {
62
+ left: -15px;
63
+ }
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,270 @@
1
+ // http://www.google.com/design/spec/components/selection-controls.html#selection-controls-checkbox
2
+
3
+ .checkbox label,
4
+ label.checkbox-inline {
5
+ cursor: pointer;
6
+ padding-left: 0; // Reset for Bootstrap rule
7
+ color: $mdb-checkbox-label-color;
8
+ @include mdb-label-color-toggle-focus();
9
+ }
10
+
11
+ .checkbox,
12
+ label.checkbox-inline {
13
+ // Hide native checkbox
14
+ input[type=checkbox] {
15
+ opacity: 0;
16
+ position: absolute;
17
+ margin: 0;
18
+ z-index: -1;
19
+ width: 0;
20
+ height: 0;
21
+ overflow: hidden;
22
+ left: 0;
23
+ pointer-events: none;
24
+ }
25
+
26
+ .checkbox-material {
27
+ vertical-align: middle;
28
+ position: relative;
29
+ top: 3px;
30
+ &:before { // FIXME: document why this is necessary (doesn't seem to be on chrome)
31
+ display: block;
32
+ position: absolute;
33
+ top:-5px;
34
+ left: 0;
35
+ content: "";
36
+ background-color: rgba(0, 0, 0, .84);
37
+ height: $mdb-checkbox-size;
38
+ width: $mdb-checkbox-size;
39
+ border-radius: 100%;
40
+ z-index: 1;
41
+ opacity: 0;
42
+ margin: 0;
43
+ transform: scale3d(2.3, 2.3, 1);
44
+ }
45
+
46
+ .check {
47
+ position: relative;
48
+ display: inline-block;
49
+ width: $mdb-checkbox-size;
50
+ height: $mdb-checkbox-size;
51
+ border: $mdb-checkbox-border-size solid $mdb-checkbox-border-color;
52
+ border-radius: $border-radius-base;
53
+ overflow: hidden;
54
+ z-index: 1;
55
+ }
56
+ .check:before {
57
+ position: absolute;
58
+ content: "";
59
+ transform: rotate(45deg);
60
+ display: block;
61
+ margin-top: -4px;
62
+ margin-left: 6px;
63
+ width: 0;
64
+ height: 0;
65
+ box-shadow:
66
+ 0 0 0 0,
67
+ 0 0 0 0,
68
+ 0 0 0 0,
69
+ 0 0 0 0,
70
+ 0 0 0 0,
71
+ 0 0 0 0,
72
+ 0 0 0 0 inset;
73
+ }
74
+ }
75
+
76
+ input[type=checkbox] {
77
+
78
+ &:focus + .checkbox-material .check:after {
79
+ opacity: 0.2;
80
+ }
81
+
82
+ &:focus{
83
+
84
+ &:checked{
85
+ & + .checkbox-material:before {
86
+ animation: rippleOn 500ms;
87
+ }
88
+ & + .checkbox-material .check:before {
89
+ animation: checkbox-on $mdb-checkbox-animation-check forwards;
90
+ }
91
+ & + .checkbox-material .check:after {
92
+ animation: rippleOn $mdb-checkbox-animation-ripple forwards; // Ripple effect on check
93
+ }
94
+ }
95
+
96
+ &:not(:checked) {
97
+ & + .checkbox-material:before {
98
+ animation: rippleOff 500ms;
99
+ }
100
+ & + .checkbox-material .check:before {
101
+ animation: checkbox-off $mdb-checkbox-animation-check forwards;
102
+ }
103
+ & + .checkbox-material .check:after {
104
+ animation: rippleOff $mdb-checkbox-animation-ripple forwards; // Ripple effect on uncheck
105
+ }
106
+ }
107
+
108
+ }
109
+
110
+
111
+ &:checked {
112
+
113
+ // FIXME: once working - combine further to reduce code
114
+ & + .checkbox-material .check {
115
+ color: $mdb-checkbox-checked-color;
116
+ border-color: $mdb-checkbox-checked-color;
117
+ }
118
+
119
+ & + .checkbox-material .check:before {
120
+ color: $mdb-checkbox-checked-color;
121
+ box-shadow:
122
+ 0 0 0 10px,
123
+ 10px -10px 0 10px,
124
+ 32px 0 0 20px,
125
+ 0px 32px 0 20px,
126
+ -5px 5px 0 10px,
127
+ 20px -12px 0 11px;
128
+ }
129
+
130
+ & + .checkbox-material .check:after {
131
+ //background-color: $brand-success; // FIXME: seems like tho wrong color, test and make sure it can be removed
132
+ }
133
+ }
134
+ }
135
+
136
+ // Style for disabled inputs
137
+ fieldset[disabled] &,
138
+ fieldset[disabled] & input[type=checkbox],
139
+ input[type=checkbox][disabled]:not(:checked) ~ .checkbox-material .check:before,
140
+ input[type=checkbox][disabled]:not(:checked) ~ .checkbox-material .check,
141
+ input[type=checkbox][disabled] + .circle {
142
+ opacity: 0.5;
143
+ }
144
+ input[type=checkbox][disabled] + .checkbox-material .check:after {
145
+ background-color: $mdb-text-color-primary;
146
+ transform: rotate(-45deg);
147
+ }
148
+ }
149
+
150
+ @keyframes checkbox-on {
151
+ 0% {
152
+ box-shadow:
153
+ 0 0 0 10px,
154
+ 10px -10px 0 10px,
155
+ 32px 0 0 20px,
156
+ 0px 32px 0 20px,
157
+ -5px 5px 0 10px,
158
+ 15px 2px 0 11px;
159
+ }
160
+ 50% {
161
+ box-shadow:
162
+ 0 0 0 10px,
163
+ 10px -10px 0 10px,
164
+ 32px 0 0 20px,
165
+ 0px 32px 0 20px,
166
+ -5px 5px 0 10px,
167
+ 20px 2px 0 11px;
168
+ }
169
+ 100% {
170
+ box-shadow:
171
+ 0 0 0 10px,
172
+ 10px -10px 0 10px,
173
+ 32px 0 0 20px,
174
+ 0px 32px 0 20px,
175
+ -5px 5px 0 10px,
176
+ 20px -12px 0 11px;
177
+ }
178
+ }
179
+
180
+ @keyframes checkbox-off {
181
+ 0% {
182
+ box-shadow:
183
+ 0 0 0 10px,
184
+ 10px -10px 0 10px,
185
+ 32px 0 0 20px,
186
+ 0px 32px 0 20px,
187
+ -5px 5px 0 10px,
188
+ 20px -12px 0 11px,
189
+ 0 0 0 0 inset;
190
+ }
191
+ 25% {
192
+ box-shadow:
193
+ 0 0 0 10px,
194
+ 10px -10px 0 10px,
195
+ 32px 0 0 20px,
196
+ 0px 32px 0 20px,
197
+ -5px 5px 0 10px,
198
+ 20px -12px 0 11px,
199
+ 0 0 0 0 inset;
200
+ }
201
+ 50% {
202
+ transform: rotate(45deg);
203
+ margin-top: -4px;
204
+ margin-left: 6px;
205
+ width: 0;
206
+ height: 0;
207
+ box-shadow:
208
+ 0 0 0 10px,
209
+ 10px -10px 0 10px,
210
+ 32px 0 0 20px,
211
+ 0px 32px 0 20px,
212
+ -5px 5px 0 10px,
213
+ 15px 2px 0 11px,
214
+ 0 0 0 0 inset;
215
+ }
216
+ 51% {
217
+ transform: rotate(0deg);
218
+ margin-top: -2px;
219
+ margin-left: -2px;
220
+ width: 20px;
221
+ height: 20px;
222
+ box-shadow:
223
+ 0 0 0 0,
224
+ 0 0 0 0,
225
+ 0 0 0 0,
226
+ 0 0 0 0,
227
+ 0 0 0 0,
228
+ 0 0 0 0,
229
+ 0px 0 0 10px inset;
230
+ }
231
+ 100% {
232
+ transform: rotate(0deg);
233
+ margin-top: -2px;
234
+ margin-left: -2px;
235
+ width: 20px;
236
+ height: 20px;
237
+ box-shadow:
238
+ 0 0 0 0,
239
+ 0 0 0 0,
240
+ 0 0 0 0,
241
+ 0 0 0 0,
242
+ 0 0 0 0,
243
+ 0 0 0 0,
244
+ 0px 0 0 0 inset;
245
+ }
246
+ }
247
+
248
+ @keyframes rippleOn {
249
+ 0% {
250
+ opacity: 0;
251
+ }
252
+ 50% {
253
+ opacity: 0.2;
254
+ }
255
+ 100% {
256
+ opacity: 0;
257
+ }
258
+ }
259
+
260
+ @keyframes rippleOff {
261
+ 0% {
262
+ opacity: 0;
263
+ }
264
+ 50% {
265
+ opacity: 0.2;
266
+ }
267
+ 100% {
268
+ opacity: 0;
269
+ }
270
+ }