anc 0.1.0 → 0.1.1

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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/_sass/anc.scss +9 -0
  3. data/_sass/anc/_base.scss +144 -0
  4. data/_sass/anc/_layout.scss +0 -0
  5. data/_sass/anc/_materialize.scss +42 -0
  6. data/_sass/anc/_syntax-highlighting.scss +78 -0
  7. data/_sass/anc/components/_variables.scss +343 -0
  8. data/_sass/materialize/components/_badges.scss +47 -0
  9. data/_sass/materialize/components/_buttons.scss +291 -0
  10. data/_sass/materialize/components/_cards.scss +196 -0
  11. data/_sass/materialize/components/_carousel.scss +90 -0
  12. data/_sass/materialize/components/_chips.scss +89 -0
  13. data/_sass/materialize/components/_collapsible.scss +84 -0
  14. data/_sass/materialize/components/_color.scss +412 -0
  15. data/_sass/materialize/components/_dropdown.scss +68 -0
  16. data/_sass/materialize/components/_global.scss +734 -0
  17. data/_sass/materialize/components/_grid.scss +156 -0
  18. data/_sass/materialize/components/_icons-material-design.scss +5 -0
  19. data/_sass/materialize/components/_materialbox.scss +43 -0
  20. data/_sass/materialize/components/_modal.scss +90 -0
  21. data/_sass/materialize/components/_navbar.scss +208 -0
  22. data/_sass/materialize/components/_normalize.scss +424 -0
  23. data/_sass/materialize/components/_preloader.scss +334 -0
  24. data/_sass/materialize/components/_pulse.scss +34 -0
  25. data/_sass/materialize/components/_roboto.scss +39 -0
  26. data/_sass/materialize/components/_sideNav.scss +214 -0
  27. data/_sass/materialize/components/_slider.scss +92 -0
  28. data/_sass/materialize/components/_table_of_contents.scss +33 -0
  29. data/_sass/materialize/components/_tabs.scss +93 -0
  30. data/_sass/materialize/components/_tapTarget.scss +103 -0
  31. data/_sass/materialize/components/_toast.scss +59 -0
  32. data/_sass/materialize/components/_tooltip.scss +31 -0
  33. data/_sass/materialize/components/_transitions.scss +13 -0
  34. data/_sass/materialize/components/_typography.scss +61 -0
  35. data/_sass/materialize/components/_variables.scss +343 -0
  36. data/_sass/materialize/components/_waves.scss +114 -0
  37. data/_sass/materialize/components/date_picker/_default.date.scss +456 -0
  38. data/_sass/materialize/components/date_picker/_default.scss +212 -0
  39. data/_sass/materialize/components/date_picker/_default.time.scss +267 -0
  40. data/_sass/materialize/components/forms/_checkboxes.scss +210 -0
  41. data/_sass/materialize/components/forms/_file-input.scss +44 -0
  42. data/_sass/materialize/components/forms/_forms.scss +22 -0
  43. data/_sass/materialize/components/forms/_input-fields.scss +333 -0
  44. data/_sass/materialize/components/forms/_radio-buttons.scss +115 -0
  45. data/_sass/materialize/components/forms/_range.scss +160 -0
  46. data/_sass/materialize/components/forms/_select.scss +182 -0
  47. data/_sass/materialize/components/forms/_switches.scss +89 -0
  48. data/_sass/materialize/materialize.scss +42 -0
  49. metadata +48 -1
@@ -0,0 +1,210 @@
1
+ /* Checkboxes
2
+ ========================================================================== */
3
+
4
+ /* CUSTOM CSS CHECKBOXES */
5
+ form p {
6
+ margin-bottom: 10px;
7
+ text-align: left;
8
+ }
9
+
10
+ form p:last-child {
11
+ margin-bottom: 0;
12
+ }
13
+
14
+ /* Remove default checkbox */
15
+ [type="checkbox"]:not(:checked),
16
+ [type="checkbox"]:checked {
17
+ position: absolute;
18
+ opacity: 0;
19
+ pointer-events: none;
20
+ }
21
+
22
+ // Checkbox Styles
23
+ [type="checkbox"] {
24
+ // Text Label Style
25
+ + label {
26
+ position: relative;
27
+ padding-left: 35px;
28
+ cursor: pointer;
29
+ display: inline-block;
30
+ height: 25px;
31
+ line-height: 25px;
32
+ font-size: 1rem;
33
+ user-select: none;
34
+ }
35
+
36
+ /* checkbox aspect */
37
+ + label:before,
38
+ &:not(.filled-in) + label:after {
39
+ content: '';
40
+ position: absolute;
41
+ top: 0;
42
+ left: 0;
43
+ width: 18px;
44
+ height: 18px;
45
+ z-index: 0;
46
+ border: 2px solid $radio-empty-color;
47
+ border-radius: 1px;
48
+ margin-top: 2px;
49
+ transition: .2s;
50
+ }
51
+
52
+ &:not(.filled-in) + label:after {
53
+ border: 0;
54
+ transform: scale(0);
55
+ }
56
+
57
+ &:not(:checked):disabled + label:before {
58
+ border: none;
59
+ background-color: $input-disabled-color;
60
+ }
61
+
62
+ // Focused styles
63
+ &.tabbed:focus + label:after {
64
+ transform: scale(1);
65
+ border: 0;
66
+ border-radius: 50%;
67
+ box-shadow: 0 0 0 10px rgba(0,0,0,.1);
68
+ background-color: rgba(0,0,0,.1);
69
+ }
70
+ }
71
+
72
+ [type="checkbox"]:checked {
73
+ + label:before {
74
+ top: -4px;
75
+ left: -5px;
76
+ width: 12px;
77
+ height: 22px;
78
+ border-top: 2px solid transparent;
79
+ border-left: 2px solid transparent;
80
+ border-right: $radio-border;
81
+ border-bottom: $radio-border;
82
+ transform: rotate(40deg);
83
+ backface-visibility: hidden;
84
+ transform-origin: 100% 100%;
85
+ }
86
+
87
+ &:disabled + label:before {
88
+ border-right: 2px solid $input-disabled-color;
89
+ border-bottom: 2px solid $input-disabled-color;
90
+ }
91
+ }
92
+
93
+ /* Indeterminate checkbox */
94
+ [type="checkbox"]:indeterminate {
95
+ +label:before {
96
+ top: -11px;
97
+ left: -12px;
98
+ width: 10px;
99
+ height: 22px;
100
+ border-top: none;
101
+ border-left: none;
102
+ border-right: $radio-border;
103
+ border-bottom: none;
104
+ transform: rotate(90deg);
105
+ backface-visibility: hidden;
106
+ transform-origin: 100% 100%;
107
+ }
108
+
109
+ // Disabled indeterminate
110
+ &:disabled + label:before {
111
+ border-right: 2px solid $input-disabled-color;
112
+ background-color: transparent;
113
+ }
114
+ }
115
+
116
+ // Filled in Style
117
+ [type="checkbox"].filled-in {
118
+ // General
119
+ + label:after {
120
+ border-radius: 2px;
121
+ }
122
+
123
+ + label:before,
124
+ + label:after {
125
+ content: '';
126
+ left: 0;
127
+ position: absolute;
128
+ /* .1s delay is for check animation */
129
+ transition: border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s;
130
+ z-index: 1;
131
+ }
132
+
133
+ // Unchecked style
134
+ &:not(:checked) + label:before {
135
+ width: 0;
136
+ height: 0;
137
+ border: 3px solid transparent;
138
+ left: 6px;
139
+ top: 10px;
140
+ transform: rotateZ(37deg);
141
+ transform-origin: 100% 100%;
142
+ }
143
+
144
+ &:not(:checked) + label:after {
145
+ height: 20px;
146
+ width: 20px;
147
+ background-color: transparent;
148
+ border: 2px solid $radio-empty-color;
149
+ top: 0px;
150
+ z-index: 0;
151
+ }
152
+
153
+ // Checked style
154
+ &:checked {
155
+ + label:before {
156
+ top: 0;
157
+ left: 1px;
158
+ width: 8px;
159
+ height: 13px;
160
+ border-top: 2px solid transparent;
161
+ border-left: 2px solid transparent;
162
+ border-right: 2px solid $input-background;
163
+ border-bottom: 2px solid $input-background;
164
+ transform: rotateZ(37deg);
165
+ transform-origin: 100% 100%;
166
+ }
167
+
168
+ + label:after {
169
+ top: 0;
170
+ width: 20px;
171
+ height: 20px;
172
+ border: 2px solid $secondary-color;
173
+ background-color: $secondary-color;
174
+ z-index: 0;
175
+ }
176
+ }
177
+
178
+ // Focused styles
179
+ &.tabbed:focus + label:after {
180
+ border-radius: 2px;
181
+ border-color: $radio-empty-color;
182
+ background-color: rgba(0,0,0,.1);
183
+ }
184
+
185
+ &.tabbed:checked:focus + label:after {
186
+ border-radius: 2px;
187
+ background-color: $secondary-color;
188
+ border-color: $secondary-color;
189
+ }
190
+
191
+ // Disabled style
192
+ &:disabled:not(:checked) + label:before {
193
+ background-color: transparent;
194
+ border: 2px solid transparent;
195
+ }
196
+
197
+ &:disabled:not(:checked) + label:after {
198
+ border-color: transparent;
199
+ background-color: $input-disabled-solid-color;
200
+ }
201
+
202
+ &:disabled:checked + label:before {
203
+ background-color: transparent;
204
+ }
205
+
206
+ &:disabled:checked + label:after {
207
+ background-color: $input-disabled-solid-color;
208
+ border-color: $input-disabled-solid-color;
209
+ }
210
+ }
@@ -0,0 +1,44 @@
1
+ /* File Input
2
+ ========================================================================== */
3
+
4
+ .file-field {
5
+ position: relative;
6
+
7
+ .file-path-wrapper {
8
+ overflow: hidden;
9
+ padding-left: 10px;
10
+ }
11
+
12
+ input.file-path { width: 100%; }
13
+
14
+ .btn {
15
+ float: left;
16
+ height: $input-height;
17
+ line-height: $input-height;
18
+ }
19
+
20
+ span {
21
+ cursor: pointer;
22
+ }
23
+
24
+ input[type=file] {
25
+
26
+ // Needed to override webkit button
27
+ &::-webkit-file-upload-button {
28
+ display: none;
29
+ }
30
+
31
+ position: absolute;
32
+ top: 0;
33
+ right: 0;
34
+ left: 0;
35
+ bottom: 0;
36
+ width: 100%;
37
+ margin: 0;
38
+ padding: 0;
39
+ font-size: 20px;
40
+ cursor: pointer;
41
+ opacity: 0;
42
+ filter: alpha(opacity=0);
43
+ }
44
+ }
@@ -0,0 +1,22 @@
1
+ // Remove Focus Boxes
2
+ select:focus {
3
+ outline: $select-focus;
4
+ }
5
+
6
+ button:focus {
7
+ outline: none;
8
+ background-color: $button-background-focus;
9
+ }
10
+
11
+ label {
12
+ font-size: $label-font-size;
13
+ color: $input-border-color;
14
+ }
15
+
16
+ @import 'input-fields';
17
+ @import 'radio-buttons';
18
+ @import 'checkboxes';
19
+ @import 'switches';
20
+ @import 'select';
21
+ @import 'file-input';
22
+ @import 'range';
@@ -0,0 +1,333 @@
1
+ /* Text Inputs + Textarea
2
+ ========================================================================== */
3
+
4
+ /* Style Placeholders */
5
+
6
+ ::placeholder {
7
+ color: $placeholder-text-color;
8
+ }
9
+
10
+ /* Text inputs */
11
+
12
+ input:not([type]),
13
+ input[type=text]:not(.browser-default),
14
+ input[type=password]:not(.browser-default),
15
+ input[type=email]:not(.browser-default),
16
+ input[type=url]:not(.browser-default),
17
+ input[type=time]:not(.browser-default),
18
+ input[type=date]:not(.browser-default),
19
+ input[type=datetime]:not(.browser-default),
20
+ input[type=datetime-local]:not(.browser-default),
21
+ input[type=tel]:not(.browser-default),
22
+ input[type=number]:not(.browser-default),
23
+ input[type=search]:not(.browser-default),
24
+ textarea.materialize-textarea {
25
+
26
+ // General Styles
27
+ background-color: transparent;
28
+ border: none;
29
+ border-bottom: $input-border;
30
+ border-radius: 0;
31
+ outline: none;
32
+ height: $input-height;
33
+ width: 100%;
34
+ font-size: $input-font-size;
35
+ margin: $input-margin;
36
+ padding: $input-padding;
37
+ box-shadow: none;
38
+ box-sizing: content-box;
39
+ transition: $input-transition;
40
+
41
+ // Disabled input style
42
+ &:disabled,
43
+ &[readonly="readonly"] {
44
+ color: $input-disabled-color;
45
+ border-bottom: $input-disabled-border;
46
+ }
47
+
48
+ // Disabled label style
49
+ &:disabled+label,
50
+ &[readonly="readonly"]+label {
51
+ color: $input-disabled-color;
52
+ }
53
+
54
+ // Focused input style
55
+ &:focus:not([readonly]) {
56
+ border-bottom: 1px solid $input-focus-color;
57
+ box-shadow: 0 1px 0 0 $input-focus-color;
58
+ }
59
+
60
+ // Focused label style
61
+ &:focus:not([readonly])+label {
62
+ color: $input-focus-color;
63
+ }
64
+
65
+ // Valid Input Style
66
+ &.valid,
67
+ &:focus.valid {
68
+ @extend %valid-input-style;
69
+ }
70
+
71
+ // Custom Success Message
72
+ &.valid + label:after,
73
+ &:focus.valid + label:after {
74
+ @extend %custom-success-message;
75
+ }
76
+
77
+ // Invalid Input Style
78
+ &.invalid,
79
+ &:focus.invalid {
80
+ @extend %invalid-input-style;
81
+ }
82
+
83
+ // Custom Error message
84
+ &.invalid + label:after,
85
+ &:focus.invalid + label:after {
86
+ @extend %custom-error-message;
87
+ }
88
+
89
+ // Full width label when using validate for error messages
90
+ &.validate + label {
91
+ width: 100%;
92
+ }
93
+
94
+ // Form Message Shared Styles
95
+ & + label:after {
96
+ @extend %input-after-style;
97
+ }
98
+
99
+ // TODO: Remove once input fields are reworked to support validation messages better
100
+ &.invalid + label:after,
101
+ &.valid + label:after{
102
+ display: none;
103
+ }
104
+
105
+ &.invalid + label.active:after,
106
+ &.valid + label.active:after{
107
+ display: block;
108
+ }
109
+ }
110
+
111
+
112
+ /* Validation Sass Placeholders */
113
+ %valid-input-style {
114
+ border-bottom: 1px solid $input-success-color;
115
+ box-shadow: 0 1px 0 0 $input-success-color;
116
+ }
117
+ %invalid-input-style {
118
+ border-bottom: $input-invalid-border;
119
+ box-shadow: 0 1px 0 0 $input-error-color;
120
+ }
121
+ %custom-success-message {
122
+ content: attr(data-success);
123
+ color: $input-success-color;
124
+ opacity: 1;
125
+ transform: translateY(9px);
126
+ }
127
+ %custom-error-message {
128
+ content: attr(data-error);
129
+ color: $input-error-color;
130
+ opacity: 1;
131
+ transform: translateY(9px);
132
+ }
133
+ %input-after-style {
134
+ display: block;
135
+ content: "";
136
+ position: absolute;
137
+ top: 100%;
138
+ left: 0;
139
+ opacity: 0;
140
+ transition: .2s opacity ease-out, .2s color ease-out;
141
+ }
142
+
143
+
144
+ // Styling for input field wrapper
145
+ .input-field {
146
+ // Inline styles
147
+ &.inline {
148
+ display: inline-block;
149
+ vertical-align: middle;
150
+ margin-left: 5px;
151
+
152
+ input,
153
+ .select-dropdown {
154
+ margin-bottom: 1rem;
155
+ }
156
+ }
157
+
158
+ // Gutter spacing
159
+ &.col {
160
+ label {
161
+ left: $gutter-width / 2;
162
+ }
163
+
164
+ .prefix ~ label,
165
+ .prefix ~ .validate ~ label {
166
+ width: calc(100% - 3rem - #{$gutter-width});
167
+ }
168
+ }
169
+
170
+ position: relative;
171
+ margin-top: 1rem;
172
+
173
+ label {
174
+ color: $input-border-color;
175
+ position: absolute;
176
+ top: 0;
177
+ left: 0;
178
+ height: 100%;
179
+ font-size: 1rem;
180
+ cursor: text;
181
+ transition: transform .2s ease-out;
182
+ transform-origin: 0% 100%;
183
+ text-align: initial;
184
+ transform: translateY(12px);
185
+ pointer-events: none;
186
+
187
+ &:not(.label-icon).active {
188
+ transform: translateY(-14px) scale(.8);
189
+ transform-origin: 0 0;
190
+ }
191
+ }
192
+
193
+ // Prefix Icons
194
+ .prefix {
195
+ position: absolute;
196
+ width: $input-height;
197
+ font-size: 2rem;
198
+ transition: color .2s;
199
+
200
+ &.active { color: $input-focus-color; }
201
+ }
202
+
203
+ .prefix ~ input,
204
+ .prefix ~ textarea,
205
+ .prefix ~ label,
206
+ .prefix ~ .validate ~ label,
207
+ .prefix ~ .autocomplete-content {
208
+ margin-left: 3rem;
209
+ width: 92%;
210
+ width: calc(100% - 3rem);
211
+ }
212
+
213
+ .prefix ~ label { margin-left: 3rem; }
214
+
215
+ @media #{$medium-and-down} {
216
+ .prefix ~ input {
217
+ width: 86%;
218
+ width: calc(100% - 3rem);
219
+ }
220
+ }
221
+
222
+ @media #{$small-and-down} {
223
+ .prefix ~ input {
224
+ width: 80%;
225
+ width: calc(100% - 3rem);
226
+ }
227
+ }
228
+ }
229
+
230
+
231
+ /* Search Field */
232
+
233
+ .input-field input[type=search] {
234
+ display: block;
235
+ line-height: inherit;
236
+
237
+ .nav-wrapper & {
238
+ height: inherit;
239
+ padding-left: 4rem;
240
+ width: calc(100% - 4rem);
241
+ border: 0;
242
+ box-shadow: none;
243
+ }
244
+
245
+ &:focus {
246
+ background-color: $input-background;
247
+ border: 0;
248
+ box-shadow: none;
249
+ color: #444;
250
+
251
+ & + label i,
252
+ & ~ .mdi-navigation-close,
253
+ & ~ .material-icons {
254
+ color: #444;
255
+ }
256
+ }
257
+
258
+ & + label {
259
+ left: 1rem;
260
+ }
261
+
262
+ & ~ .mdi-navigation-close,
263
+ & ~ .material-icons {
264
+ position: absolute;
265
+ top: 0;
266
+ right: 1rem;
267
+ color: transparent;
268
+ cursor: pointer;
269
+ font-size: 2rem;
270
+ transition: .3s color;
271
+ }
272
+ }
273
+
274
+
275
+ /* Textarea */
276
+
277
+ // Default textarea
278
+ textarea {
279
+ width: 100%;
280
+ height: $input-height;
281
+ background-color: transparent;
282
+
283
+ &.materialize-textarea {
284
+ // Fixes validation messages for dynamic textareas
285
+ &.validate + label {
286
+ &::after {
287
+ top: calc(100% - 12px);
288
+ }
289
+ &:not(.label-icon).active {
290
+ transform: translateY(-25px);
291
+ }
292
+ height: 100%;
293
+ }
294
+
295
+ overflow-y: hidden; /* prevents scroll bar flash */
296
+ padding: .8rem 0 1.6rem 0; /* prevents text jump on Enter keypress */
297
+ resize: none;
298
+ min-height: $input-height;
299
+ }
300
+ }
301
+
302
+ // For textarea autoresize
303
+ .hiddendiv {
304
+ display: none;
305
+ white-space: pre-wrap;
306
+ word-wrap: break-word;
307
+ overflow-wrap: break-word; /* future version of deprecated 'word-wrap' */
308
+ padding-top: 1.2rem; /* prevents text jump on Enter keypress */
309
+
310
+ // Reduces repaints
311
+ position: absolute;
312
+ top: 0;
313
+ }
314
+
315
+
316
+ /* Autocomplete */
317
+ .autocomplete-content {
318
+ margin-top: -1 * $input-margin-bottom;
319
+ margin-bottom: $input-margin-bottom;
320
+ display: block;
321
+ opacity: 1;
322
+ position: static;
323
+
324
+ li {
325
+ .highlight { color: #444; }
326
+
327
+ img {
328
+ height: $dropdown-item-height - 10;
329
+ width: $dropdown-item-height - 10;
330
+ margin: 5px 15px;
331
+ }
332
+ }
333
+ }