administrate-materialize-theme 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +49 -0
  4. data/Rakefile +1 -0
  5. data/app/assets/javascripts/administrate-materialize-theme/anime.min.js +34 -0
  6. data/app/assets/javascripts/administrate-materialize-theme/autocomplete.js +450 -0
  7. data/app/assets/javascripts/administrate-materialize-theme/bin/materialize.js +12374 -0
  8. data/app/assets/javascripts/administrate-materialize-theme/bin/materialize.min.js +6 -0
  9. data/app/assets/javascripts/administrate-materialize-theme/buttons.js +354 -0
  10. data/app/assets/javascripts/administrate-materialize-theme/cards.js +40 -0
  11. data/app/assets/javascripts/administrate-materialize-theme/carousel.js +717 -0
  12. data/app/assets/javascripts/administrate-materialize-theme/cash.js +960 -0
  13. data/app/assets/javascripts/administrate-materialize-theme/characterCounter.js +136 -0
  14. data/app/assets/javascripts/administrate-materialize-theme/chips.js +481 -0
  15. data/app/assets/javascripts/administrate-materialize-theme/collapsible.js +275 -0
  16. data/app/assets/javascripts/administrate-materialize-theme/component.js +44 -0
  17. data/app/assets/javascripts/administrate-materialize-theme/datepicker.js +975 -0
  18. data/app/assets/javascripts/administrate-materialize-theme/dropdown.js +617 -0
  19. data/app/assets/javascripts/administrate-materialize-theme/forms.js +275 -0
  20. data/app/assets/javascripts/administrate-materialize-theme/global.js +427 -0
  21. data/app/assets/javascripts/administrate-materialize-theme/materialbox.js +453 -0
  22. data/app/assets/javascripts/administrate-materialize-theme/modal.js +382 -0
  23. data/app/assets/javascripts/administrate-materialize-theme/parallax.js +138 -0
  24. data/app/assets/javascripts/administrate-materialize-theme/pushpin.js +145 -0
  25. data/app/assets/javascripts/administrate-materialize-theme/range.js +263 -0
  26. data/app/assets/javascripts/administrate-materialize-theme/scrollspy.js +295 -0
  27. data/app/assets/javascripts/administrate-materialize-theme/select.js +432 -0
  28. data/app/assets/javascripts/administrate-materialize-theme/sidenav.js +580 -0
  29. data/app/assets/javascripts/administrate-materialize-theme/slider.js +359 -0
  30. data/app/assets/javascripts/administrate-materialize-theme/tabs.js +402 -0
  31. data/app/assets/javascripts/administrate-materialize-theme/tapTarget.js +314 -0
  32. data/app/assets/javascripts/administrate-materialize-theme/theme.js +6 -0
  33. data/app/assets/javascripts/administrate-materialize-theme/timepicker.js +647 -0
  34. data/app/assets/javascripts/administrate-materialize-theme/toasts.js +310 -0
  35. data/app/assets/javascripts/administrate-materialize-theme/tooltip.js +303 -0
  36. data/app/assets/javascripts/administrate-materialize-theme/waves.js +335 -0
  37. data/app/assets/stylesheets/administrate-materialize-theme/components/_badges.scss +55 -0
  38. data/app/assets/stylesheets/administrate-materialize-theme/components/_buttons.scss +322 -0
  39. data/app/assets/stylesheets/administrate-materialize-theme/components/_cards.scss +195 -0
  40. data/app/assets/stylesheets/administrate-materialize-theme/components/_carousel.scss +90 -0
  41. data/app/assets/stylesheets/administrate-materialize-theme/components/_chips.scss +90 -0
  42. data/app/assets/stylesheets/administrate-materialize-theme/components/_collapsible.scss +91 -0
  43. data/app/assets/stylesheets/administrate-materialize-theme/components/_color-classes.scss +32 -0
  44. data/app/assets/stylesheets/administrate-materialize-theme/components/_color-variables.scss +370 -0
  45. data/app/assets/stylesheets/administrate-materialize-theme/components/_datepicker.scss +191 -0
  46. data/app/assets/stylesheets/administrate-materialize-theme/components/_dropdown.scss +85 -0
  47. data/app/assets/stylesheets/administrate-materialize-theme/components/_global.scss +769 -0
  48. data/app/assets/stylesheets/administrate-materialize-theme/components/_grid.scss +156 -0
  49. data/app/assets/stylesheets/administrate-materialize-theme/components/_icons-material-design.scss +5 -0
  50. data/app/assets/stylesheets/administrate-materialize-theme/components/_materialbox.scss +43 -0
  51. data/app/assets/stylesheets/administrate-materialize-theme/components/_modal.scss +94 -0
  52. data/app/assets/stylesheets/administrate-materialize-theme/components/_navbar.scss +208 -0
  53. data/app/assets/stylesheets/administrate-materialize-theme/components/_normalize.scss +447 -0
  54. data/app/assets/stylesheets/administrate-materialize-theme/components/_preloader.scss +334 -0
  55. data/app/assets/stylesheets/administrate-materialize-theme/components/_pulse.scss +34 -0
  56. data/app/assets/stylesheets/administrate-materialize-theme/components/_sidenav.scss +216 -0
  57. data/app/assets/stylesheets/administrate-materialize-theme/components/_slider.scss +92 -0
  58. data/app/assets/stylesheets/administrate-materialize-theme/components/_table_of_contents.scss +33 -0
  59. data/app/assets/stylesheets/administrate-materialize-theme/components/_tabs.scss +99 -0
  60. data/app/assets/stylesheets/administrate-materialize-theme/components/_tapTarget.scss +103 -0
  61. data/app/assets/stylesheets/administrate-materialize-theme/components/_timepicker.scss +183 -0
  62. data/app/assets/stylesheets/administrate-materialize-theme/components/_toast.scss +58 -0
  63. data/app/assets/stylesheets/administrate-materialize-theme/components/_tooltip.scss +32 -0
  64. data/app/assets/stylesheets/administrate-materialize-theme/components/_transitions.scss +13 -0
  65. data/app/assets/stylesheets/administrate-materialize-theme/components/_typography.scss +60 -0
  66. data/app/assets/stylesheets/administrate-materialize-theme/components/_variables.scss +349 -0
  67. data/app/assets/stylesheets/administrate-materialize-theme/components/_waves.scss +114 -0
  68. data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_checkboxes.scss +200 -0
  69. data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_file-input.scss +44 -0
  70. data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_forms.scss +22 -0
  71. data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_input-fields.scss +354 -0
  72. data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_radio-buttons.scss +115 -0
  73. data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_range.scss +161 -0
  74. data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_select.scss +180 -0
  75. data/app/assets/stylesheets/administrate-materialize-theme/components/forms/_switches.scss +89 -0
  76. data/app/assets/stylesheets/administrate-materialize-theme/materialize.scss +41 -0
  77. data/app/assets/stylesheets/administrate-materialize-theme/theme.scss +200 -0
  78. data/lib/administrate-materialize-theme.rb +6 -0
  79. data/lib/administrate-materialize-theme/engine.rb +7 -0
  80. data/lib/administrate-materialize-theme/version.rb +5 -0
  81. metadata +150 -0
@@ -0,0 +1,115 @@
1
+ /* Radio Buttons
2
+ ========================================================================== */
3
+
4
+ // Remove default Radio Buttons
5
+ [type="radio"]:not(:checked),
6
+ [type="radio"]:checked {
7
+ position: absolute;
8
+ opacity: 0;
9
+ pointer-events: none;
10
+ }
11
+
12
+ [type="radio"]:not(:checked) + span,
13
+ [type="radio"]:checked + span {
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
+ transition: .28s ease;
22
+ user-select: none;
23
+ }
24
+
25
+ [type="radio"] + span:before,
26
+ [type="radio"] + span:after {
27
+ content: '';
28
+ position: absolute;
29
+ left: 0;
30
+ top: 0;
31
+ margin: 4px;
32
+ width: 16px;
33
+ height: 16px;
34
+ z-index: 0;
35
+ transition: .28s ease;
36
+ }
37
+
38
+ /* Unchecked styles */
39
+ [type="radio"]:not(:checked) + span:before,
40
+ [type="radio"]:not(:checked) + span:after,
41
+ [type="radio"]:checked + span:before,
42
+ [type="radio"]:checked + span:after,
43
+ [type="radio"].with-gap:checked + span:before,
44
+ [type="radio"].with-gap:checked + span:after {
45
+ border-radius: 50%;
46
+ }
47
+
48
+ [type="radio"]:not(:checked) + span:before,
49
+ [type="radio"]:not(:checked) + span:after {
50
+ border: 2px solid $radio-empty-color;
51
+ }
52
+
53
+ [type="radio"]:not(:checked) + span:after {
54
+ transform: scale(0);
55
+ }
56
+
57
+ /* Checked styles */
58
+ [type="radio"]:checked + span:before {
59
+ border: 2px solid transparent;
60
+ }
61
+
62
+ [type="radio"]:checked + span:after,
63
+ [type="radio"].with-gap:checked + span:before,
64
+ [type="radio"].with-gap:checked + span:after {
65
+ border: $radio-border;
66
+ }
67
+
68
+ [type="radio"]:checked + span:after,
69
+ [type="radio"].with-gap:checked + span:after {
70
+ background-color: $radio-fill-color;
71
+ }
72
+
73
+ [type="radio"]:checked + span:after {
74
+ transform: scale(1.02);
75
+ }
76
+
77
+ /* Radio With gap */
78
+ [type="radio"].with-gap:checked + span:after {
79
+ transform: scale(.5);
80
+ }
81
+
82
+ /* Focused styles */
83
+ [type="radio"].tabbed:focus + span:before {
84
+ box-shadow: 0 0 0 10px rgba(0,0,0,.1);
85
+ }
86
+
87
+ /* Disabled Radio With gap */
88
+ [type="radio"].with-gap:disabled:checked + span:before {
89
+ border: 2px solid $input-disabled-color;
90
+ }
91
+
92
+ [type="radio"].with-gap:disabled:checked + span:after {
93
+ border: none;
94
+ background-color: $input-disabled-color;
95
+ }
96
+
97
+ /* Disabled style */
98
+ [type="radio"]:disabled:not(:checked) + span:before,
99
+ [type="radio"]:disabled:checked + span:before {
100
+ background-color: transparent;
101
+ border-color: $input-disabled-color;
102
+ }
103
+
104
+ [type="radio"]:disabled + span {
105
+ color: $input-disabled-color;
106
+ }
107
+
108
+ [type="radio"]:disabled:not(:checked) + span:before {
109
+ border-color: $input-disabled-color;
110
+ }
111
+
112
+ [type="radio"]:disabled:checked + span:after {
113
+ background-color: $input-disabled-color;
114
+ border-color: $input-disabled-solid-color;
115
+ }
@@ -0,0 +1,161 @@
1
+ /* Range
2
+ ========================================================================== */
3
+
4
+ .range-field {
5
+ position: relative;
6
+ }
7
+
8
+ input[type=range],
9
+ input[type=range] + .thumb {
10
+ @extend .no-select;
11
+ cursor: pointer;
12
+ }
13
+
14
+ input[type=range] {
15
+ position: relative;
16
+ background-color: transparent;
17
+ border: none;
18
+ outline: none;
19
+ width: 100%;
20
+ margin: 15px 0;
21
+ padding: 0;
22
+
23
+ &:focus {
24
+ outline: none;
25
+ }
26
+ }
27
+
28
+ input[type=range] + .thumb {
29
+ position: absolute;
30
+ top: 10px;
31
+ left: 0;
32
+ border: none;
33
+ height: 0;
34
+ width: 0;
35
+ border-radius: 50%;
36
+ background-color: $radio-fill-color;
37
+ margin-left: 7px;
38
+
39
+ transform-origin: 50% 50%;
40
+ transform: rotate(-45deg);
41
+
42
+ .value {
43
+ display: block;
44
+ width: 30px;
45
+ text-align: center;
46
+ color: $radio-fill-color;
47
+ font-size: 0;
48
+ transform: rotate(45deg);
49
+ }
50
+
51
+ &.active {
52
+ border-radius: 50% 50% 50% 0;
53
+
54
+ .value {
55
+ color: $input-background;
56
+ margin-left: -1px;
57
+ margin-top: 8px;
58
+ font-size: 10px;
59
+ }
60
+ }
61
+ }
62
+
63
+ // Shared
64
+ @mixin range-track {
65
+ height: $track-height;
66
+ background: #c2c0c2;
67
+ border: none;
68
+ }
69
+
70
+ @mixin range-thumb {
71
+ border: none;
72
+ height: $range-height;
73
+ width: $range-width;
74
+ border-radius: 50%;
75
+ background: $radio-fill-color;
76
+ transition: box-shadow .3s;
77
+ }
78
+
79
+ // WebKit
80
+ input[type=range] {
81
+ -webkit-appearance: none;
82
+ }
83
+
84
+ input[type=range]::-webkit-slider-runnable-track {
85
+ @include range-track;
86
+ }
87
+
88
+ input[type=range]::-webkit-slider-thumb {
89
+ @include range-thumb;
90
+ -webkit-appearance: none;
91
+ background-color: $radio-fill-color;
92
+ transform-origin: 50% 50%;
93
+ margin: -5px 0 0 0;
94
+
95
+ }
96
+
97
+ .keyboard-focused input[type=range]:focus:not(.active)::-webkit-slider-thumb {
98
+ box-shadow: 0 0 0 10px rgba($radio-fill-color, .26);
99
+ }
100
+
101
+ // FireFox
102
+ input[type=range] {
103
+ /* fix for FF unable to apply focus style bug */
104
+ border: 1px solid white;
105
+
106
+ /*required for proper track sizing in FF*/
107
+ }
108
+
109
+ input[type=range]::-moz-range-track {
110
+ @include range-track;
111
+ }
112
+
113
+ input[type=range]::-moz-focus-inner {
114
+ border: 0;
115
+ }
116
+
117
+ input[type=range]::-moz-range-thumb {
118
+ @include range-thumb;
119
+ margin-top: -5px;
120
+ }
121
+
122
+ // hide the outline behind the border
123
+ input[type=range]:-moz-focusring {
124
+ outline: 1px solid #fff;
125
+ outline-offset: -1px;
126
+ }
127
+
128
+ .keyboard-focused input[type=range]:focus:not(.active)::-moz-range-thumb {
129
+ box-shadow: 0 0 0 10px rgba($radio-fill-color, .26);
130
+ }
131
+
132
+ // IE 10+
133
+ input[type=range]::-ms-track {
134
+ height: $track-height;
135
+
136
+ // remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead
137
+ background: transparent;
138
+
139
+ // leave room for the larger thumb to overflow with a transparent border */
140
+ border-color: transparent;
141
+ border-width: 6px 0;
142
+
143
+ /*remove default tick marks*/
144
+ color: transparent;
145
+ }
146
+
147
+ input[type=range]::-ms-fill-lower {
148
+ background: #777;
149
+ }
150
+
151
+ input[type=range]::-ms-fill-upper {
152
+ background: #ddd;
153
+ }
154
+
155
+ input[type=range]::-ms-thumb {
156
+ @include range-thumb;
157
+ }
158
+
159
+ .keyboard-focused input[type=range]:focus:not(.active)::-ms-thumb {
160
+ box-shadow: 0 0 0 10px rgba($radio-fill-color, .26);
161
+ }
@@ -0,0 +1,180 @@
1
+ /* Select Field
2
+ ========================================================================== */
3
+
4
+ select { display: none; }
5
+ select.browser-default { display: block; }
6
+
7
+ select {
8
+ background-color: $select-background;
9
+ width: 100%;
10
+ padding: $select-padding;
11
+ border: $select-border;
12
+ border-radius: $select-radius;
13
+ height: $input-height;
14
+ }
15
+
16
+ .select-label {
17
+ position: absolute;
18
+ }
19
+
20
+ .select-wrapper {
21
+ &.valid .helper-text[data-success],
22
+ &.invalid ~ .helper-text[data-error] {
23
+ @extend %hidden-text;
24
+ }
25
+
26
+ &.valid {
27
+ & > input.select-dropdown {
28
+ @extend %valid-input-style;
29
+ }
30
+
31
+ & ~ .helper-text:after {
32
+ @extend %custom-success-message;
33
+ }
34
+ }
35
+
36
+ &.invalid {
37
+ & > input.select-dropdown,
38
+ & > input.select-dropdown:focus {
39
+ @extend %invalid-input-style;
40
+ }
41
+
42
+ & ~ .helper-text:after {
43
+ @extend %custom-error-message;
44
+ }
45
+ }
46
+
47
+ &.valid + label,
48
+ &.invalid + label {
49
+ width: 100%;
50
+ pointer-events: none;
51
+ }
52
+
53
+ & + label:after {
54
+ @extend %input-after-style;
55
+ }
56
+
57
+ position: relative;
58
+
59
+ input.select-dropdown {
60
+ &:focus {
61
+ border-bottom: 1px solid $input-focus-color;
62
+ }
63
+ position: relative;
64
+ cursor: pointer;
65
+ background-color: transparent;
66
+ border: none;
67
+ border-bottom: $input-border;
68
+ outline: none;
69
+ height: $input-height;
70
+ line-height: $input-height;
71
+ width: 100%;
72
+ font-size: $input-font-size;
73
+ margin: $input-margin;
74
+ padding: 0;
75
+ display: block;
76
+ user-select:none;
77
+ z-index: 1;
78
+ }
79
+
80
+ .caret {
81
+ position: absolute;
82
+ right: 0;
83
+ top: 0;
84
+ bottom: 0;
85
+ margin: auto 0;
86
+ z-index: 0;
87
+ fill: rgba(0,0,0,.87);
88
+ }
89
+
90
+ & + label {
91
+ position: absolute;
92
+ top: -26px;
93
+ font-size: $label-font-size;
94
+ }
95
+ }
96
+
97
+ // Disabled styles
98
+ select:disabled {
99
+ color: $input-disabled-color;
100
+ }
101
+
102
+ .select-wrapper.disabled {
103
+ + label {
104
+ color: $input-disabled-color;
105
+ }
106
+ .caret {
107
+ fill: $input-disabled-color;
108
+ }
109
+ }
110
+
111
+ .select-wrapper input.select-dropdown:disabled {
112
+ color: $input-disabled-color;
113
+ cursor: default;
114
+ user-select: none;
115
+ }
116
+
117
+ .select-wrapper i {
118
+ color: $select-disabled-color;
119
+ }
120
+
121
+ .select-dropdown li.disabled,
122
+ .select-dropdown li.disabled > span,
123
+ .select-dropdown li.optgroup {
124
+ color: $select-disabled-color;
125
+ background-color: transparent;
126
+ }
127
+
128
+ body.keyboard-focused {
129
+ .select-dropdown.dropdown-content li:focus {
130
+ background-color: $select-option-focus;
131
+ }
132
+ }
133
+
134
+ .select-dropdown.dropdown-content {
135
+ li {
136
+ &:hover {
137
+ background-color: $select-option-hover;
138
+ }
139
+
140
+ &.selected {
141
+ background-color: $select-option-selected;
142
+ }
143
+ }
144
+ }
145
+
146
+ // Prefix Icons
147
+ .prefix ~ .select-wrapper {
148
+ margin-left: 3rem;
149
+ width: 92%;
150
+ width: calc(100% - 3rem);
151
+ }
152
+
153
+ .prefix ~ label { margin-left: 3rem; }
154
+
155
+ // Icons
156
+ .select-dropdown li {
157
+ img {
158
+ height: $dropdown-item-height - 10;
159
+ width: $dropdown-item-height - 10;
160
+ margin: 5px 15px;
161
+ float: right;
162
+ }
163
+ }
164
+
165
+ // Optgroup styles
166
+ .select-dropdown li.optgroup {
167
+ border-top: 1px solid $dropdown-hover-bg-color;
168
+
169
+ &.selected > span {
170
+ color: rgba(0, 0, 0, .7);
171
+ }
172
+
173
+ & > span {
174
+ color: rgba(0, 0, 0, .4);
175
+ }
176
+
177
+ & ~ li.optgroup-option {
178
+ padding-left: 1rem;
179
+ }
180
+ }