rails_admin_material 0.1.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.
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,354 @@
1
+ // This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
2
+
3
+ @import '_inputs-size';
4
+
5
+ // label variations
6
+ .label {
7
+ border-radius: $border-radius-small;
8
+ @include variations(unquote(".label"), unquote(""), background-color, $grey);
9
+ padding: .3em .6em; // Make top & bottom .label padding the same: https://github.com/twbs/bootstrap/pull/19631
10
+ }
11
+
12
+ // must be broken out for reuse - webkit selector breaks firefox
13
+ @mixin label-static($label-top, $static-font-size, $static-line-height){
14
+ label.control-label {
15
+ top: $label-top;
16
+ left: 0;
17
+ // must repeat because the selector above is more specific than the general label sizing
18
+ font-size: $static-font-size;
19
+ line-height: $static-line-height;
20
+ }
21
+ }
22
+
23
+ @mixin label-size-variant($placeholder-font-size, $vertical-padding, $line-height, $static-font-size, $static-line-height, $help-block-font-size){
24
+ .form-control {
25
+ @include material-placeholder {
26
+ font-size: $placeholder-font-size;
27
+ line-height: $line-height;
28
+ color: $mdb-input-placeholder-color;
29
+ font-weight: 400;
30
+
31
+ }
32
+ // margin-bottom must be specified to give help-block vertical space.
33
+ // $see also form-group padding-bottom (and size variants) re: collapsible margins. These work together.
34
+ margin-bottom: $vertical-padding;
35
+ }
36
+
37
+ // generic labels used anywhere in the form (not control-label)
38
+ .checkbox label,
39
+ .radio label,
40
+ label {
41
+ font-size: $placeholder-font-size;
42
+ line-height: $line-height;
43
+ color: $mdb-input-placeholder-color;
44
+ font-weight: 400;
45
+ }
46
+
47
+ // smaller focused or static size
48
+ label.control-label {
49
+ font-size: $static-font-size;
50
+ line-height: $static-line-height;
51
+ font-weight: 400;
52
+ margin: 16px 0 0 0; // std and lg
53
+ }
54
+
55
+ .help-block {
56
+ margin-top: 0; // allow the input margin to set-off the top of the help-block
57
+ font-size: $help-block-font-size;
58
+ }
59
+ }
60
+
61
+ @mixin form-group-validation-state($name, $color){
62
+
63
+ &.#{$name} { // e.g. has-error
64
+ .form-control {
65
+ box-shadow: none;
66
+ }
67
+ &.is-focused .form-control {
68
+ background-image: linear-gradient($color, $color), linear-gradient($mdb-input-underline-color, $mdb-input-underline-color);
69
+ }
70
+ label.control-label,
71
+ .help-block {
72
+ color: $color;
73
+ }
74
+ }
75
+ }
76
+
77
+ @mixin form-group-size-variant($parent, $placeholder-font-size, $label-top-margin, $vertical-padding, $line-height, $label-as-placeholder-shim){
78
+ $static-font-size: ceil(($mdb-label-static-size-ratio * $placeholder-font-size)) !default;
79
+ $static-line-height: ($mdb-label-static-size-ratio * $line-height) !default;
80
+
81
+ $label-as-placeholder-top: -1 * ($vertical-padding + $label-as-placeholder-shim) !default;
82
+ $label-top: $label-as-placeholder-top - ($placeholder-font-size + $vertical-padding) !default;
83
+
84
+ $help-block-font-size: ceil(($mdb-help-block-size-ratio * $placeholder-font-size)) !default;
85
+ $help-block-line-height: ($mdb-help-block-size-ratio * $line-height) !default;
86
+
87
+ // this is outside a form-group
88
+ @if not $parent {
89
+ @include label-size-variant($placeholder-font-size, $vertical-padding, $line-height, $static-font-size, $static-line-height, $help-block-font-size);
90
+ }
91
+
92
+ // this is inside a form-group, may be .form-group.form-group-sm or .form-group.form-group-lg
93
+ @else {
94
+ #{$parent} {
95
+ @include label-size-variant($placeholder-font-size, $vertical-padding, $line-height, $static-font-size, $static-line-height, $help-block-font-size);
96
+
97
+ // form-group padding-bottom
98
+ // upon collapsing margins, the largest margin is honored which collapses the form-control margin-bottom,
99
+ // so the form-control margin-bottom must also be expressed as form-group padding
100
+ padding-bottom: $vertical-padding;
101
+
102
+ // form-group margin-top must be large enough for the label and the label's top padding since label is absolutely positioned
103
+ margin: ($label-top-margin + $static-font-size) 0 0 0;
104
+
105
+ // larger labels as placeholders
106
+ &.label-floating,
107
+ &.label-placeholder {
108
+ label.control-label {
109
+ top: $label-as-placeholder-top; // place the floating label to look like a placeholder with input padding
110
+ font-size: $placeholder-font-size;
111
+ line-height: $line-height;
112
+ }
113
+ }
114
+
115
+ // static, focused, or autofill floating labels
116
+ &.label-static,
117
+ &.label-floating.is-focused,
118
+ &.label-floating:not(.is-empty) {
119
+ @include label-static($label-top, $static-font-size, $static-line-height);
120
+ }
121
+ // #559 Fix for webkit/chrome autofill - rule must be separate because it breaks firefox otherwise #731
122
+ &.label-floating input.form-control:-webkit-autofill ~ label.control-label {
123
+ @include label-static($label-top, $static-font-size, $static-line-height);
124
+ }
125
+ }
126
+ }
127
+ }
128
+
129
+ // -----
130
+ // Inputs
131
+ //
132
+ // Reference http://www.google.com/design/spec/components/text-fields.html
133
+ // MDL implementation: http://www.getmdl.io/components/index.html#textfields-section
134
+ .form-control,
135
+ .form-group .form-control {
136
+ border: 0;
137
+ background-image: linear-gradient($brand-primary, $brand-primary), linear-gradient($mdb-input-underline-color, $mdb-input-underline-color);
138
+ background-size: 0 2px, 100% 1px;
139
+ background-repeat: no-repeat;
140
+ background-position: center bottom, center calc(100% - 1px);
141
+ background-color: rgba(0, 0, 0, 0);
142
+ transition: background 0s ease-out;
143
+ float: none;
144
+ box-shadow: none;
145
+ border-radius: 0;
146
+
147
+ // Placeholders and and labels-as-placeholders should look the same
148
+ @include material-placeholder {
149
+ color: $mdb-input-placeholder-color;
150
+ font-weight: 400;
151
+
152
+ }
153
+
154
+
155
+ //&:textarea { // appears to be an invalid selector
156
+ // height: 40px;
157
+ //}
158
+
159
+ &[readonly],
160
+ &[disabled],
161
+ fieldset[disabled] & {
162
+ background-color: rgba(0, 0, 0, 0);
163
+ }
164
+
165
+ &[disabled],
166
+ fieldset[disabled] & {
167
+ background-image: none;
168
+ border-bottom: 1px dotted $mdb-input-underline-color;
169
+ }
170
+ }
171
+
172
+ // -----
173
+ // Labels with form-group signalled state
174
+ //
175
+ // Reference http://www.google.com/design/spec/components/text-fields.html
176
+ // MDL implementation: http://www.getmdl.io/components/index.html#textfields-section
177
+ //.variations(unquote(" label.control-label"), color, $mdb-input-placeholder-color); // default label color variations
178
+
179
+ .form-group {
180
+ position: relative;
181
+
182
+ // -----
183
+ // Labels with form-group signalled state
184
+ //
185
+ // Reference http://www.google.com/design/spec/components/text-fields.html
186
+ // MDL implementation: http://www.getmdl.io/components/index.html#textfields-section
187
+ &.label-static,
188
+ &.label-placeholder,
189
+ &.label-floating {
190
+ label.control-label {
191
+ position: absolute;
192
+ pointer-events: none;
193
+ transition: 0.3s ease all;
194
+ }
195
+ }
196
+
197
+ // hint to browser for optimization
198
+ // TODO: evaluate effectiveness - looking for community feedback
199
+ &.label-floating label.control-label {
200
+ will-change: left, top, contents;
201
+ }
202
+
203
+ // hide label-placeholders when the field is not empty
204
+ &.label-placeholder:not(.is-empty){
205
+ label.control-label{
206
+ display: none;
207
+ }
208
+ }
209
+
210
+ // Help blocks - position: absolute approach - uses no vertical space, text wrapping - not so good.
211
+ .help-block {
212
+ position: absolute; // do not use position: absolute because width/wrapping isn't automatic and overflows occur
213
+ display: none;
214
+ }
215
+
216
+ // form-group is-focused display
217
+ &.is-focused {
218
+ .form-control {
219
+ outline: none;
220
+ background-image: linear-gradient($brand-primary, $brand-primary), linear-gradient($mdb-input-underline-color, $mdb-input-underline-color);
221
+ background-size: 100% 2px, 100% 1px;
222
+ box-shadow: none;
223
+ transition-duration: 0.3s;
224
+
225
+ .material-input:after {
226
+ background-color: $brand-primary;
227
+ }
228
+ }
229
+
230
+ //.variations(unquote(".is-focused label.control-label"), color, $brand-primary); // focused label color variations
231
+ label,
232
+ label.control-label {
233
+ color: $brand-primary;
234
+ }
235
+
236
+ //.variations(unquote(".is-focused.label-placeholder label.control-label"), color, $mdb-input-placeholder-color); // default label color variations
237
+ &.label-placeholder {
238
+ label,
239
+ label.control-label {
240
+ color: $mdb-input-placeholder-color;
241
+ }
242
+ }
243
+
244
+ .help-block {
245
+ display: block;
246
+ }
247
+ }
248
+
249
+ @include form-group-validation-state(has-warning, $brand-warning);
250
+ @include form-group-validation-state(has-error, $brand-danger);
251
+ @include form-group-validation-state(has-success, $brand-success);
252
+ @include form-group-validation-state(has-info, $brand-info);
253
+
254
+ textarea {
255
+ resize: none;
256
+ & ~ .form-control-highlight {
257
+ margin-top: -11px;
258
+ }
259
+ }
260
+
261
+ select {
262
+ appearance: none; // Fix for OS X
263
+
264
+ & ~ .material-input:after {
265
+ display: none;
266
+ }
267
+ }
268
+ }
269
+
270
+ // default floating size/location without a form-group (will skip form-group styles, and just render default sizing variation)
271
+ @include form-group-size-variant(null, $mdb-input-font-size-base, $mdb-label-top-margin-base, $mdb-input-padding-base-vertical, $mdb-input-line-height-base, $mdb-label-as-placeholder-shim-base);
272
+
273
+ // default floating size/location with a form-group (need margin etc from a default form-group)
274
+ @include form-group-size-variant(unquote(".form-group"), $mdb-input-font-size-base, $mdb-label-top-margin-base, $mdb-input-padding-base-vertical, $mdb-input-line-height-base, $mdb-label-as-placeholder-shim-base);
275
+
276
+ // sm floating size/location
277
+ @include form-group-size-variant(unquote(".form-group.form-group-sm"), $mdb-input-font-size-small, $mdb-label-top-margin-small, $mdb-input-padding-small-vertical, $mdb-input-line-height-small, $mdb-label-as-placeholder-shim-small);
278
+
279
+ // lg floating size/location
280
+ @include form-group-size-variant(unquote(".form-group.form-group-lg"), $mdb-input-font-size-large, $mdb-label-top-margin-large, $mdb-input-padding-large-vertical, $mdb-input-line-height-large, $mdb-label-as-placeholder-shim-large);
281
+
282
+
283
+ select.form-control {
284
+
285
+ border: 0;
286
+ box-shadow: none;
287
+ border-radius: 0;
288
+
289
+ .form-group.is-focused & {
290
+ box-shadow: none;
291
+ border-color: $mdb-input-underline-color;
292
+ }
293
+
294
+ &[multiple] {
295
+ &,
296
+ .form-group.is-focused & {
297
+ height: 85px;
298
+ }
299
+ }
300
+ }
301
+
302
+ @mixin input-group-button-variation($vertical-padding){
303
+ .input-group-btn {
304
+ .btn {
305
+ margin: 0 0 $vertical-padding 0;
306
+ }
307
+ }
308
+ }
309
+
310
+ // ----------------
311
+ // input group/addon related styles
312
+
313
+ // default margin - no form-group required
314
+ @include input-group-button-variation($mdb-input-padding-base-vertical);
315
+
316
+ .form-group {
317
+ //.form-control {
318
+ // float: none;
319
+ //}
320
+
321
+ // sm margin
322
+ &.form-group-sm {
323
+ @include input-group-button-variation($mdb-input-padding-small-vertical);
324
+ }
325
+
326
+ // lg margin
327
+ &.form-group-lg {
328
+ @include input-group-button-variation($mdb-input-padding-large-vertical);
329
+ }
330
+ }
331
+
332
+ .input-group { // may be in or outside of form-group
333
+ .input-group-btn {
334
+ padding: 0 12px; // match addon spacing
335
+ }
336
+
337
+ .input-group-addon {
338
+ border: 0;
339
+ background: transparent;
340
+ }
341
+ }
342
+
343
+ // Input files - hide actual input - requires specific markup in the sample.
344
+ .form-group input[type=file] {
345
+ opacity: 0;
346
+ position: absolute;
347
+ top: 0;
348
+ right: 0;
349
+ bottom: 0;
350
+ left: 0;
351
+ width: 100%;
352
+ height: 100%;
353
+ z-index: 100;
354
+ }
@@ -0,0 +1,6 @@
1
+ // This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
2
+
3
+ .label {
4
+ border-radius: 1px;
5
+ @include variations(unquote(""), unquote(""), background-color, $grey);
6
+ }
@@ -0,0 +1,104 @@
1
+ // This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
2
+
3
+ .list-group {
4
+ border-radius: 0;
5
+ .list-group-item {
6
+ background-color: transparent;
7
+ overflow: hidden;
8
+ border: 0;
9
+ border-radius: 0;
10
+ padding: 0 16px;
11
+ &.baseline {
12
+ border-bottom: 1px solid #cecece;
13
+ &:last-child {
14
+ border-bottom: none;
15
+ }
16
+ }
17
+ .row-picture, .row-action-primary {
18
+ //float: left; WARNING: float can't be used with display: inline-block. Certain properties shouldn't be used with certain display property values. (display-property-grouping) Browsers: All
19
+ display: inline-block;
20
+ padding-right: 16px;
21
+ img, i, label {
22
+ display: block;
23
+ width: 56px;
24
+ height: 56px;
25
+ }
26
+ img {
27
+ background: rgba(0,0,0,0.1);
28
+ padding: 1px;
29
+ &.circle {
30
+ border-radius: 100%;
31
+ }
32
+ }
33
+ i {
34
+ background: rgba(0,0,0,0.25);
35
+ border-radius: 100%;
36
+ text-align: center;
37
+ line-height: 56px;
38
+ font-size: 20px;
39
+ color: white;
40
+ }
41
+ label {
42
+ margin-left: 7px;
43
+ margin-right: -7px;
44
+ margin-top: 5px;
45
+ margin-bottom: -5px;
46
+ .checkbox-material {
47
+ left: -10px;
48
+ }
49
+ }
50
+ }
51
+ .row-content {
52
+ display: inline-block;
53
+ width: unquote("calc(100% - 92px)");
54
+ min-height: 66px;
55
+ .action-secondary {
56
+ position: absolute;
57
+ right: 16px;
58
+ top: 16px;
59
+ i {
60
+ font-size: 20px;
61
+ color: rgba(0,0,0,0.25);
62
+ cursor: pointer;
63
+ }
64
+ }
65
+ .action-secondary ~ * {
66
+ max-width: unquote("calc(100% - 30px)");
67
+ }
68
+ .least-content {
69
+ position: absolute;
70
+ right: 16px;
71
+ top: 0;
72
+ color: rgba(0,0,0,0.54);
73
+ font-size: 14px;
74
+ }
75
+ }
76
+ .list-group-item-heading {
77
+ color: rgba(0, 0, 0, 0.77);
78
+ font-size: 20px;
79
+ line-height: 29px;
80
+ }
81
+ }
82
+ .list-group-item.active {
83
+ &:hover, &:focus {
84
+ background: rgba(0,0,0,.15);
85
+ outline: 10px solid rgba(0,0,0,.15);
86
+ }
87
+ .list-group-item-heading, .list-group-item-text {
88
+ color: $mdb-text-color-primary;
89
+ }
90
+
91
+ }
92
+ .list-group-separator {
93
+ clear: both;
94
+ overflow: hidden;
95
+ margin-top: 10px;
96
+ margin-bottom: 10px;
97
+ &:before {
98
+ content: "";
99
+ width: unquote("calc(100% - 90px)");
100
+ border-bottom: 1px solid rgba(0,0,0,0.1);
101
+ float: right;
102
+ }
103
+ }
104
+ }