rails_admin_material 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +25 -0
  4. data/Rakefile +24 -0
  5. data/lib/rails_admin_material.rb +4 -0
  6. data/lib/rails_admin_material/engine.rb +4 -0
  7. data/lib/rails_admin_material/version.rb +3 -0
  8. data/vendor/assets/javascripts/rails_admin/themes/material/bootstrap-material-design/material.js +352 -0
  9. data/vendor/assets/javascripts/rails_admin/themes/material/bootstrap-material-design/material.min.js +2 -0
  10. data/vendor/assets/javascripts/rails_admin/themes/material/bootstrap-material-design/material.min.js.map +1 -0
  11. data/vendor/assets/javascripts/rails_admin/themes/material/bootstrap-material-design/ripples.js +324 -0
  12. data/vendor/assets/javascripts/rails_admin/themes/material/bootstrap-material-design/ripples.min.js +2 -0
  13. data/vendor/assets/javascripts/rails_admin/themes/material/bootstrap-material-design/ripples.min.js.map +1 -0
  14. data/vendor/assets/javascripts/rails_admin/themes/material/ui.js +6 -0
  15. data/vendor/assets/stylesheets/bootstrap/variables.scss +874 -0
  16. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_alerts.scss +19 -0
  17. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_buttons.scss +246 -0
  18. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_cards.scss +68 -0
  19. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_checkboxes.scss +272 -0
  20. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_colors-map.scss +311 -0
  21. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_colors.scss +361 -0
  22. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_core.scss +95 -0
  23. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_dialogs.scss +54 -0
  24. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_dividers.scss +73 -0
  25. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_form.scss +42 -0
  26. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_import-bs-less.scss +4 -0
  27. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_import-bs-sass.scss +1 -0
  28. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_inputs-size.scss +223 -0
  29. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_inputs.scss +354 -0
  30. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_labels.scss +6 -0
  31. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_lists.scss +104 -0
  32. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_mixins-utilities.scss +31 -0
  33. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_mixins.scss +242 -0
  34. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_navbar.scss +212 -0
  35. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_panels.scss +23 -0
  36. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_plugins.scss +7 -0
  37. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_popups.scss +20 -0
  38. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_progress.scss +12 -0
  39. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_radios.scss +117 -0
  40. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_shadows.scss +84 -0
  41. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_tabs.scss +26 -0
  42. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_themes.scss +8 -0
  43. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_togglebutton.scss +85 -0
  44. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_typography.scss +17 -0
  45. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_variables.scss +174 -0
  46. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/_welljumbo.scss +28 -0
  47. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/bootstrap-material-design.scss +6 -0
  48. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/plugins/_plugin-dropdownjs.scss +17 -0
  49. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/plugins/_plugin-nouislider.scss +112 -0
  50. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/plugins/_plugin-selectize.scss +93 -0
  51. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/plugins/_plugin-snackbarjs.scss +34 -0
  52. data/vendor/assets/stylesheets/rails_admin/themes/material/bootstrap-material-design/ripples.scss +38 -0
  53. data/vendor/assets/stylesheets/rails_admin/themes/material/mixins.scss +5 -0
  54. data/vendor/assets/stylesheets/rails_admin/themes/material/theming.scss +124 -0
  55. data/vendor/assets/stylesheets/rails_admin/themes/material/variables.scss +32 -0
  56. metadata +98 -0
@@ -0,0 +1,31 @@
1
+ // This file is here to emulate the less #contrast function
2
+
3
+ // TODO: this may be useful for the inverse theme, but if not, remove (it is unused after the removal of fullpalette)
4
+
5
+ // contrast-color and brightness borrowed from compass
6
+ // Copyright (c) 2009-2014 Christopher M. Eppstein
7
+ // Complies with license: https://github.com/Compass/compass/blob/stable/LICENSE.markdown
8
+ @function contrast-color($color, $dark: $contrasted-dark-default, $light: $contrasted-light-default, $threshold: null) {
9
+ @if $threshold {
10
+ // Deprecated in Compass 0.13
11
+ @warn "The $threshold argment to contrast-color is no longer needed and will be removed in the next release.";
12
+ }
13
+ @if $color == null {
14
+ @return null;
15
+ }
16
+ @else {
17
+ $color-brightness: brightness($color);
18
+ $dark-text-brightness: brightness($dark);
19
+ $light-text-brightness: brightness($light);
20
+ @return if(abs($color-brightness - $light-text-brightness) > abs($color-brightness - $dark-text-brightness), $light, $dark);
21
+ }
22
+ }
23
+
24
+ @function brightness($color) {
25
+ @if type-of($color) == color {
26
+ @return (red($color) * 0.299 + green($color) * 0.587 + blue($color) * 0.114) / 255 * 100%;
27
+ }
28
+ @else {
29
+ @return unquote("brightness(#{$color})");
30
+ }
31
+ }
@@ -0,0 +1,242 @@
1
+ // This file is NOT automatically converted and must be manually merged
2
+ @import "mixins-utilities";
3
+
4
+ // Placeholder text
5
+ @mixin material-placeholder() {
6
+ &::-moz-placeholder {@content; } // Firefox
7
+ &:-ms-input-placeholder {@content; } // Internet Explorer 10+
8
+ &::-webkit-input-placeholder {@content; } // Safari and Chrome
9
+ }
10
+
11
+
12
+ // variations(unquote(""), background-color, #FFF);
13
+ @mixin variations($component, $selector-suffix, $mdb-param-1, $color-default) {
14
+ @include generic-variations($component, $selector-suffix, $color-default, "variations-content", $mdb-param-1);
15
+ }
16
+
17
+ @mixin variations-content($args) {
18
+ //@debug "#{map-get($args, mixin-name)}{ #{map-get($args, material-param-1)}: #{map-get($args, variation-color)}; }";
19
+ //@debug "#{inspect($args)}";
20
+ //@error "break here";
21
+ #{map-get($args, material-param-1)}: map-get($args, variation-color);
22
+ }
23
+
24
+ @mixin background-variations($component, $selector-suffix, $color-default) {
25
+ @include generic-variations($component, $selector-suffix, $color-default, "background-variations-content", null);
26
+ }
27
+
28
+ @mixin background-variations-content($args) {
29
+ background-color: map-get($args, variation-color);
30
+ @if (map-get($args, variation-color) == $mdb-btn-background-color) {
31
+ color: $mdb-text-color-primary;
32
+ } @else {
33
+ color: map-get($args, variation-color-text);
34
+ }
35
+ }
36
+
37
+ //@mixin text-variations($component, $selector-suffix, $color-default) {
38
+ // @include generic-variations($component, $selector-suffix, $color-default, "text-variations-content", null);
39
+ //}
40
+ //
41
+ //@mixin text-variations-content($args) {
42
+ // color: map-get($args, variation-color);
43
+ //}
44
+
45
+ @mixin button-variations($component, $selector-suffix, $color-default) {
46
+ @include generic-variations($component, $selector-suffix, $color-default, "button-variations-content", 4%);
47
+ }
48
+
49
+ @mixin button-variations-content($args) {
50
+ //@debug "#{inspect($args)}";
51
+ $variation-color: map-get($args, variation-color);
52
+ $mdb-param-1: map-get($args, material-param-1);
53
+ background-color: contrast-color($variation-color,
54
+ darken($variation-color, $mdb-param-1),
55
+ lighten($variation-color, $mdb-param-1));
56
+ }
57
+
58
+ //@mixin bg-color-variations($component, $selector-suffix, $color-default, $mdb-param-1) {
59
+ // @include generic-variations($component, $selector-suffix, $color-default, "bg-color-variations-content", $mdb-param-1);
60
+ //}
61
+ //
62
+ //@mixin bg-color-variations-content($args) {
63
+ // background-color: rgba(map-get($args, variation-color), map-get($args, material-param-1));
64
+ //}
65
+ //
66
+ //// bg-box-shadow-variations(" label input[type=checkbox]:checked + .toggle:active:after", $brand-primary
67
+ //@mixin bg-box-shadow-variations($component, $selector-suffix, $color-default) {
68
+ // @include generic-variations($component, $selector-suffix, $color-default, "bg-box-shadow-variations-content", null);
69
+ //}
70
+ //
71
+ //@mixin bg-box-shadow-variations-content($args){
72
+ // $variation-color: map-get($args, variation-color);
73
+ // box-shadow: 0 1px 3px 1px rgba(0,0,0,0.4), 0 0 0 15px rgba($variation-color, (10/100));
74
+ //}
75
+ //
76
+ //// bg-img-variations(" label input[type=checkbox]:checked + .toggle:active:after", $brand-primary
77
+ //@mixin bg-img-variations($component, $selector-suffix, $color-default) {
78
+ // @include generic-variations($component, $selector-suffix, $color-default, "bg-img-variations-content", null);
79
+ //}
80
+ //
81
+ //@mixin bg-img-variations-content($args){
82
+ // $variation-color: map-get($args, variation-color);
83
+ // //@debug "bg-img-variations-content called for #{map-get($args, extra)} #{map-get($args, default)} #{map-get($args, variation-color-name)} #{map-get($args, variation-color)}"; //#{inspect($args)}";
84
+ // background-image: linear-gradient($variation-color, $variation-color), linear-gradient($mdb-input-underline-color, $mdb-input-underline-color);
85
+ //}
86
+
87
+ // navbar-variations(" label input[type=checkbox]:checked + .toggle:active:after", $brand-primary
88
+ @mixin navbar-variations($component, $selector-suffix, $color-default) {
89
+ @include generic-variations($component, $selector-suffix, $color-default, "navbar-variations-content", null);
90
+ }
91
+
92
+ @mixin navbar-variations-content($args){
93
+ $variation-color: map-get($args, variation-color);
94
+ $variation-color-text: map-get($args, variation-color-text);
95
+
96
+ background-color: $variation-color;
97
+ color: $variation-color-text;
98
+ // deeply defined to override welljumbo class without !impotant need
99
+ .navbar-form .form-group input.form-control,
100
+ .navbar-form input.form-control {
101
+ @include material-placeholder {
102
+ color: $variation-color-text;
103
+ }
104
+ }
105
+ .dropdown-menu {
106
+ border-radius: $border-radius-base;
107
+ li > a {
108
+ font-size: $mdb-dropdown-font-size;
109
+ padding: 13px 16px;
110
+ &:hover,
111
+ &:focus {
112
+ color: $variation-color;
113
+ background-color: $grey-200;
114
+ }
115
+ }
116
+ .active > a {
117
+ &:hover,
118
+ &:focus {
119
+ color: $variation-color-text;
120
+ }
121
+ background-color: $variation-color;
122
+ color: $variation-color-text;
123
+ }
124
+ }
125
+ }
126
+
127
+ // alert-variations("", $brand-primary)
128
+ @mixin alert-variations($component, $selector-suffix, $color-default) {
129
+ @include generic-variations($component, $selector-suffix, $color-default, "alert-variations-content", null);
130
+ }
131
+
132
+ @mixin alert-variations-content($args){
133
+ $variation-color: map-get($args, variation-color);
134
+ $variation-color-text: map-get($args, variation-color-text);
135
+
136
+ background-color: $variation-color;
137
+ color: $variation-color-text;
138
+
139
+ a, .alert-link {
140
+ color: $variation-color-text;
141
+ }
142
+ }
143
+
144
+ // interpolation of mixin-name is not allowed evidently, so we statically include based on the mixin-name given
145
+ @mixin call-variations-content-mixin($args) {
146
+ $mixin-name: map-get($args, mixin-name);
147
+ @if $mixin-name == variations-content {
148
+ @include variations-content($args);
149
+ } @else if $mixin-name == background-variations-content {
150
+ @include background-variations-content($args);
151
+ } @else if $mixin-name == text-variations-content {
152
+ @include text-variations-content($args);
153
+ } @else if $mixin-name == button-variations-content {
154
+ @include button-variations-content($args);
155
+ } @else if $mixin-name == bg-color-variations-content {
156
+ @include bg-color-variations-content($args);
157
+ } @else if $mixin-name == bg-box-shadow-variations-content {
158
+ @include bg-box-shadow-variations-content($args);
159
+ } @else if $mixin-name == bg-img-variations-content {
160
+ @include bg-img-variations-content($args);
161
+ } @else if $mixin-name == navbar-variations-content {
162
+ @include navbar-variations-content($args);
163
+ }@else if $mixin-name == alert-variations-content {
164
+ @include alert-variations-content($args);
165
+ } @else {
166
+ @error "Unknown mixin: #{$mixin-name}"
167
+ }
168
+ }
169
+
170
+ //
171
+ // To use this mixin you should pass a function as final parameter to define
172
+ // the style. In that definition you can use the following variables to define it.
173
+ //
174
+ // $variation-color-name ---> "red", "green", "indigo" ...
175
+ // $variation-color-full-name ---> "red", "green-50", "indigo-400" ...
176
+ // $variation-color ---> #f44336, #e8f5e9, #5c6bc0 ...
177
+ // $variation-color-text ---> rgba(255,255,255,0.84), rgba(0,0,0,0.84), rgba(255,255,255,0.84) ...
178
+ //
179
+
180
+ @mixin generic-variations($component, $selector-suffix, $color-default, $mixin-name, $mdb-param-1) {
181
+
182
+ //setup map to pass parameters (instead of the incredibly long-error-prone list for each and every @include)
183
+ $args: (
184
+ //extra: $selector-suffix,
185
+ //default: $color-default,
186
+ mixin-name: $mixin-name,
187
+ material-param-1: $mdb-param-1
188
+ );
189
+
190
+ // bootstrap styles
191
+ &#{$selector-suffix},
192
+ &#{$component}-default#{$selector-suffix} {
193
+
194
+ $args-extra: map-merge($args, (
195
+ variation-color: $color-default,
196
+ variation-color-text: $mdb-text-color-light
197
+ ));
198
+ @include call-variations-content-mixin($args-extra);
199
+ }
200
+ &#{$component}-inverse#{$selector-suffix} {
201
+ $args-inverse: map-merge($args, (
202
+ variation-color: $mdb-brand-inverse,
203
+ variation-color-text: contrast-color($mdb-brand-inverse, $mdb-text-color-primary-hex, $mdb-text-color-light-hex)
204
+ ));
205
+ @include call-variations-content-mixin($args-inverse);
206
+ }
207
+ &#{$component}-primary#{$selector-suffix} {
208
+ $args-primary: map-merge($args, (
209
+ variation-color: $brand-primary,
210
+ variation-color-text: $mdb-text-color-light
211
+ ));
212
+ @include call-variations-content-mixin($args-primary);
213
+ }
214
+ &#{$component}-success#{$selector-suffix} {
215
+ $args-success: map-merge($args, (
216
+ variation-color: $brand-success,
217
+ variation-color-text: $mdb-text-color-light
218
+ ));
219
+ @include call-variations-content-mixin($args-success);
220
+ }
221
+ &#{$component}-info#{$selector-suffix} {
222
+ $args-info: map-merge($args, (
223
+ variation-color: $brand-info,
224
+ variation-color-text: $mdb-text-color-light
225
+ ));
226
+ @include call-variations-content-mixin($args-info);
227
+ }
228
+ &#{$component}-warning#{$selector-suffix} {
229
+ $args-warning: map-merge($args, (
230
+ variation-color: $brand-warning,
231
+ variation-color-text: $mdb-text-color-light
232
+ ));
233
+ @include call-variations-content-mixin($args-warning);
234
+ }
235
+ &#{$component}-danger#{$selector-suffix} {
236
+ $args-danger: map-merge($args, (
237
+ variation-color: $brand-danger,
238
+ variation-color-text: $mdb-text-color-light
239
+ ));
240
+ @include call-variations-content-mixin($args-danger);
241
+ }
242
+ }
@@ -0,0 +1,212 @@
1
+ // This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
2
+
3
+ .navbar {
4
+ background-color: $brand-primary;
5
+ border: 0;
6
+ border-radius: 0;
7
+
8
+ .navbar-brand {
9
+ position: relative;
10
+ height: 60px;
11
+ line-height: 30px;
12
+ color: inherit;
13
+ &:hover,
14
+ &:focus {
15
+ color: inherit;
16
+ background-color: transparent;
17
+ }
18
+ }
19
+
20
+ .navbar-text {
21
+ color: inherit;
22
+ margin-top: 20px;
23
+ margin-bottom: 20px;
24
+ }
25
+
26
+ .navbar-nav {
27
+ > li > a {
28
+ color: inherit;
29
+ padding-top: 20px;
30
+ padding-bottom: 20px;
31
+
32
+ &:hover,
33
+ &:focus {
34
+ color: inherit;
35
+ background-color: transparent;
36
+ }
37
+ }
38
+ > .active > a {
39
+ &,
40
+ &:hover,
41
+ &:focus {
42
+ color: inherit;
43
+ background-color: rgba(255, 255, 255, 0.1);
44
+ }
45
+ }
46
+ > .disabled > a {
47
+ &,
48
+ &:hover,
49
+ &:focus {
50
+ color: inherit;
51
+ background-color: transparent;
52
+ opacity: 0.9;
53
+ }
54
+ }
55
+ }
56
+
57
+ // Darken the responsive nav toggle
58
+ .navbar-toggle {
59
+ border: 0;
60
+ &:hover,
61
+ &:focus {
62
+ background-color: transparent;
63
+ }
64
+ .icon-bar {
65
+ background-color: inherit;
66
+ border: 1px solid;
67
+ }
68
+ }
69
+
70
+ .navbar-default .navbar-toggle,
71
+ .navbar-inverse .navbar-toggle {
72
+ border-color: transparent;
73
+ }
74
+
75
+ .navbar-collapse,
76
+ .navbar-form {
77
+ border-color: rgba(0,0,0,0.1);
78
+ }
79
+
80
+ // Dropdowns
81
+ .navbar-nav {
82
+ > .open > a {
83
+ &,
84
+ &:hover,
85
+ &:focus {
86
+ background-color: transparent;
87
+ color: inherit;
88
+ }
89
+ }
90
+
91
+ @media (max-width: $grid-float-breakpoint-max) {
92
+ .navbar-text {
93
+ color: inherit;
94
+ margin-top: 15px;
95
+ margin-bottom: 15px;
96
+ }
97
+
98
+ // Dropdowns get custom display
99
+ .open .dropdown-menu {
100
+ > .dropdown-header {
101
+ border: 0;
102
+ color: inherit;
103
+ }
104
+ .divider {
105
+ border-bottom: 1px solid;
106
+ opacity: 0.08;
107
+ }
108
+ > li > a {
109
+ color: inherit;
110
+ &:hover,
111
+ &:focus {
112
+ color: inherit;
113
+ background-color: transparent;
114
+ }
115
+ }
116
+ > .active > a {
117
+ &,
118
+ &:hover,
119
+ &:focus {
120
+ color: inherit;
121
+ background-color: transparent;
122
+ }
123
+ }
124
+ > .disabled > a {
125
+ &,
126
+ &:hover,
127
+ &:focus {
128
+ color: inherit;
129
+ background-color: transparent;
130
+ }
131
+ }
132
+ }
133
+ }
134
+ }
135
+
136
+ .navbar-link {
137
+ color: inherit;
138
+ &:hover {
139
+ color: inherit;
140
+ }
141
+ }
142
+
143
+ .btn-link {
144
+ color: inherit;
145
+ &:hover,
146
+ &:focus {
147
+ color: inherit;
148
+ }
149
+ &[disabled],
150
+ fieldset[disabled] & {
151
+ &:hover,
152
+ &:focus {
153
+ color: inherit;
154
+ }
155
+ }
156
+ }
157
+
158
+ .navbar-form {
159
+ margin-top: 16px;
160
+ .form-group {
161
+ margin: 0;
162
+ padding: 0;
163
+
164
+ .material-input:before,
165
+ &.is-focused .material-input:after {
166
+ background-color: inherit;
167
+ }
168
+ }
169
+
170
+ .form-group .form-control,
171
+ .form-control {
172
+ border-color: inherit;
173
+ color: inherit;
174
+ padding: 0;
175
+ margin: 0;
176
+
177
+ // re-normalize inputs in a navbar the size of standard bootstrap since our normal inputs are larger by spec than bootstrap
178
+ //---
179
+ //height: $mdb-input-height-base;
180
+ $bs-line-height-base: 1.428571429 !default;
181
+ $bs-line-height-computed: floor(($font-size-base * $bs-line-height-base)) !default; // ~20px
182
+ height: ($bs-line-height-computed + 8px);
183
+ font-size: $font-size-base;
184
+ line-height: $bs-line-height-base;
185
+ //---
186
+ }
187
+ }
188
+
189
+ // SASS conversion note: please mirror any content change in _mixins-shared.scss navbar-variations-content
190
+ @include navbar-variations(unquote(".navbar"), unquote(""), $brand-primary);
191
+
192
+
193
+ &-inverse {
194
+ background-color: $indigo;
195
+ }
196
+
197
+ @media (max-width: $screen-md-max) {
198
+
199
+ .navbar-brand {
200
+ height: 50px;
201
+ padding: 10px 15px;
202
+ }
203
+ .navbar-form {
204
+ margin-top: 10px;
205
+ }
206
+
207
+ .navbar-nav > li > a {
208
+ padding-top: 15px;
209
+ padding-bottom: 15px;
210
+ }
211
+ }
212
+ }