active_material 1.4.2 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +19 -41
- data/app/assets/javascripts/active_material/actions-toggle.js +38 -0
- data/app/assets/javascripts/active_material.js +4 -1
- data/app/assets/stylesheets/active_material/atoms/type.scss +15 -15
- data/app/assets/stylesheets/active_material/components/blank_slate.scss +1 -1
- data/app/assets/stylesheets/active_material/components/buttons.scss +1 -1
- data/app/assets/stylesheets/active_material/components/comments.scss +28 -0
- data/app/assets/stylesheets/active_material/components/forms.scss +21 -2
- data/app/assets/stylesheets/active_material/components/header.scss +1 -1
- data/app/assets/stylesheets/active_material/components/pagination.scss +20 -2
- data/app/assets/stylesheets/active_material/components/panels.scss +9 -0
- data/app/assets/stylesheets/active_material/components/scopes.scss +1 -1
- data/app/assets/stylesheets/active_material/components/select.scss +4 -0
- data/app/assets/stylesheets/active_material/components/sortable.scss +1 -1
- data/app/assets/stylesheets/active_material/components/tables.scss +27 -19
- data/app/assets/stylesheets/active_material/components/tabs.scss +2 -2
- data/app/assets/stylesheets/active_material/components/utility_nav.scss +37 -44
- data/app/assets/stylesheets/active_material/generators/functions.scss +2 -11
- data/app/assets/stylesheets/active_material/generators/mixins.scss +1 -11
- data/app/assets/stylesheets/active_material/global/foundation.scss +1 -1
- data/app/assets/stylesheets/active_material/prototypes/button.scss +2 -2
- data/app/assets/stylesheets/active_material/prototypes/datepicker.scss +4 -3
- data/app/assets/stylesheets/active_material/prototypes/dialog.scss +1 -1
- data/app/assets/stylesheets/active_material/prototypes/menu.scss +1 -1
- data/app/assets/stylesheets/active_material/prototypes/select.scss +6 -2
- data/app/assets/stylesheets/active_material/prototypes/snackbar.scss +1 -1
- data/app/assets/stylesheets/active_material/prototypes/subheader.scss +2 -2
- data/app/assets/stylesheets/active_material/prototypes/table.scss +5 -3
- data/app/assets/stylesheets/active_material/prototypes/tabs.scss +14 -3
- data/app/assets/stylesheets/active_material/prototypes/textfield.scss +14 -10
- data/app/assets/stylesheets/active_material/prototypes/toolbar.scss +5 -5
- data/app/assets/stylesheets/active_material/values/fonts.scss +14 -2
- data/app/assets/stylesheets/active_material.scss +59 -7
- data/lib/active_material/font_loader.rb +12 -0
- data/lib/active_material/version.rb +3 -3
- data/lib/active_material.rb +25 -0
- metadata +26 -23
- data/app/assets/images/active_material/icons/account_circle.svg +0 -9
- data/app/assets/images/active_material/icons/arrow-dropdown.svg +0 -7
- data/app/assets/images/active_material/icons/arrow_down.svg +0 -7
- data/app/assets/images/active_material/icons/clear.svg +0 -8
- data/app/assets/images/active_material/icons/create.svg +0 -8
- data/app/assets/images/active_material/icons/email.svg +0 -8
- data/app/assets/images/active_material/icons/event.svg +0 -8
- data/app/assets/images/active_material/icons/more.svg +0 -9
- data/app/assets/images/active_material/icons/reorder.svg +0 -4
- data/app/assets/images/active_material/icons/search.svg +0 -9
- data/app/assets/images/active_material/icons/secret.svg +0 -8
- data/app/assets/javascripts/active_material/fonts.js +0 -21
@@ -17,6 +17,7 @@ $am-datepicker-cell-size: am-unit(4) !default;
|
|
17
17
|
background: white;
|
18
18
|
border-radius: $am-datepicker-border-radius;
|
19
19
|
box-shadow: $am-datepicker-shadow;
|
20
|
+
display: none;
|
20
21
|
padding: 0 am-unit(1.5) am-unit(1);
|
21
22
|
width: $am-datepicker-width;
|
22
23
|
}
|
@@ -30,7 +31,7 @@ $am-datepicker-cell-size: am-unit(4) !default;
|
|
30
31
|
|
31
32
|
@mixin am-datepicker-title {
|
32
33
|
@include am-font-size(14px);
|
33
|
-
font-weight:
|
34
|
+
font-weight: $am-font-weight-semi-bold;
|
34
35
|
}
|
35
36
|
|
36
37
|
@mixin am-datepicker-icon {
|
@@ -71,13 +72,13 @@ $am-datepicker-cell-size: am-unit(4) !default;
|
|
71
72
|
|
72
73
|
@mixin am-datepicker-calendar-heading {
|
73
74
|
@include am-color(secondary-text);
|
74
|
-
font-weight:
|
75
|
+
font-weight: $am-font-weight-medium;
|
75
76
|
padding: 0 0 am-type-unit(1);
|
76
77
|
}
|
77
78
|
|
78
79
|
@mixin am-datepicker-calendar-day {
|
79
80
|
height: $am-datepicker-cell-size;
|
80
|
-
font-weight:
|
81
|
+
font-weight: $am-font-weight-medium;
|
81
82
|
line-height: $am-datepicker-cell-size;
|
82
83
|
padding: 0;
|
83
84
|
width: $am-datepicker-cell-size;
|
@@ -45,7 +45,7 @@ $am-dialog-title-padding: am-unit(4) am-unit(3) am-unit(1) !default;
|
|
45
45
|
|
46
46
|
@mixin am-dialog-close {
|
47
47
|
@include am-btn-icon;
|
48
|
-
background:
|
48
|
+
background: url('data:image/svg+xml;utf8,<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> <path opacity="0.54" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12 L19,6.41z"/> </svg>') 50% 50% no-repeat;
|
49
49
|
margin: 0;
|
50
50
|
padding: 0;
|
51
51
|
position: absolute;
|
@@ -39,7 +39,7 @@ $am-menu-carat-size: 5px !default;
|
|
39
39
|
border-color: am-color(primary) transparent transparent;
|
40
40
|
content: "";
|
41
41
|
height: 0;
|
42
|
-
margin-top: $am-menu-carat-size / -2;
|
42
|
+
margin-top: calc($am-menu-carat-size / -2);
|
43
43
|
position: absolute;
|
44
44
|
right: -15px;
|
45
45
|
top: 50%;
|
@@ -11,8 +11,8 @@
|
|
11
11
|
}
|
12
12
|
|
13
13
|
@mixin am-select-input {
|
14
|
-
@include am-font-size(
|
15
|
-
background: #fafafa
|
14
|
+
@include am-font-size(14px);
|
15
|
+
background: #fafafa url('data:image/svg+xml;utf8,<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="18px" height="18px" viewBox="0 0 18 18" enable-background="new 0 0 18 18" xml:space="preserve"> <path opacity="0.4" d="M5,8l4,4l4-4H5z"/> </svg>') no-repeat calc(100% - 4px) 50%;
|
16
16
|
border: 1px solid #d3d3d3;
|
17
17
|
border-radius: 3px;
|
18
18
|
box-shadow: inset 0 1px 0 rgba(#fff, 0.8);
|
@@ -32,6 +32,10 @@
|
|
32
32
|
border-radius: 0;
|
33
33
|
}
|
34
34
|
|
35
|
+
@mixin am-select-input-disabled {
|
36
|
+
background-color: #eeeeee;
|
37
|
+
}
|
38
|
+
|
35
39
|
@mixin am-select-unit {
|
36
40
|
border-left: 1px solid am-color(divider);
|
37
41
|
text-align: center;
|
@@ -31,7 +31,7 @@ $am-snackbar-duration: 9s !default;
|
|
31
31
|
color: $am-snackbar-color;
|
32
32
|
font-weight: 300;
|
33
33
|
font-size: 14px;
|
34
|
-
line-height: am-sp(
|
34
|
+
line-height: am-sp(20px);
|
35
35
|
margin: am-unit(2);
|
36
36
|
min-width: $am-snackbar-min-width;
|
37
37
|
max-width: $am-snackbar-max-width;
|
@@ -21,7 +21,7 @@ $am-table-border-color: am-color(divider);
|
|
21
21
|
@include am-color(secondary-text);
|
22
22
|
@include am-font-size(13px);
|
23
23
|
border-bottom: 1px solid $am-table-border-color;
|
24
|
-
font-weight:
|
24
|
+
font-weight: $am-font-weight-semi-bold;
|
25
25
|
height: am-unit(6);
|
26
26
|
line-height: am-unit(2);
|
27
27
|
padding: am-unit(1) am-unit(2);
|
@@ -87,12 +87,14 @@ $am-table-border-color: am-color(divider);
|
|
87
87
|
@include am-color(text);
|
88
88
|
@include am-font-size(13px);
|
89
89
|
border-bottom: 1px solid $am-table-border-color;
|
90
|
-
font-weight:
|
90
|
+
font-weight: $am-font-weight-regular;
|
91
91
|
padding: am-unit(1) am-unit(2);
|
92
92
|
|
93
93
|
img {
|
94
94
|
display: block;
|
95
|
+
height: auto;
|
95
96
|
max-width: 320px;
|
97
|
+
width: 100%;
|
96
98
|
}
|
97
99
|
}
|
98
100
|
|
@@ -110,7 +112,7 @@ $am-table-border-color: am-color(divider);
|
|
110
112
|
}
|
111
113
|
|
112
114
|
@mixin am-table-cell-actions {
|
113
|
-
background:
|
115
|
+
background: url('data:image/svg+xml;utf8,<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> <path fill="none" d="M0,0h24v24H0V0z"/> <path opacity="0.875" d="M12,8c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,8,12,8z M12,10c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2 c1.1,0,2-0.9,2-2C14,10.9,13.1,10,12,10z M12,16c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,16,12,16z"/> </svg>') 25% 50% no-repeat;
|
114
116
|
position: relative;
|
115
117
|
width: am-unit(6);
|
116
118
|
}
|
@@ -8,7 +8,10 @@ $am-tabs-background: am-color(primary) !default;
|
|
8
8
|
$am-tabs-border-width: 3px !default;
|
9
9
|
$am-tabs-color: rgba(#fff, 0.6) !default;
|
10
10
|
$am-tabs-color-focus: #fff !default;
|
11
|
-
$am-tabs-
|
11
|
+
$am-tabs-btn-background: inherit !default;
|
12
|
+
$am-tabs-btn-background-focus: inherit !default;
|
13
|
+
$am-tabs-btn-border-color: inherit !default;
|
14
|
+
$am-tabs-font: $am-font-weight-regular 14px/16px $am-font-sans !default;
|
12
15
|
|
13
16
|
@keyframes am-tabs-error-throb {
|
14
17
|
from {
|
@@ -37,10 +40,12 @@ $am-tabs-font: 400 14px/16px $am-font-sans !default;
|
|
37
40
|
|
38
41
|
@mixin am-tabs-list-item {
|
39
42
|
display: inline-block;
|
43
|
+
border-color: $am-tabs-btn-border-color;
|
40
44
|
}
|
41
45
|
|
42
46
|
@mixin am-tabs-btn {
|
43
|
-
|
47
|
+
background: $am-tabs-btn-background;
|
48
|
+
color: $am-tabs-color;
|
44
49
|
cursor: pointer;
|
45
50
|
display: block;
|
46
51
|
font: $am-tabs-font;
|
@@ -67,7 +72,7 @@ $am-tabs-font: 400 14px/16px $am-font-sans !default;
|
|
67
72
|
|
68
73
|
&:focus,
|
69
74
|
&:hover {
|
70
|
-
background:
|
75
|
+
background: $am-tabs-btn-background-focus;
|
71
76
|
outline: none;
|
72
77
|
text-decoration: none;
|
73
78
|
|
@@ -83,6 +88,7 @@ $am-tabs-font: 400 14px/16px $am-font-sans !default;
|
|
83
88
|
}
|
84
89
|
|
85
90
|
@mixin am-tabs-btn-active {
|
91
|
+
background: $am-tabs-btn-background-focus;
|
86
92
|
color: $am-tabs-color-focus;
|
87
93
|
|
88
94
|
&:after {
|
@@ -90,6 +96,11 @@ $am-tabs-font: 400 14px/16px $am-font-sans !default;
|
|
90
96
|
box-shadow: 0 -1px 1px rgba(#000, 0.1), inset 0 1px 1px rgba(#fff, 0.50);
|
91
97
|
transform: none;
|
92
98
|
}
|
99
|
+
|
100
|
+
&:focus,
|
101
|
+
&:hover {
|
102
|
+
background: $am-tabs-btn-background-focus;
|
103
|
+
}
|
93
104
|
}
|
94
105
|
|
95
106
|
@mixin am-tabs-btn-error {
|
@@ -5,9 +5,9 @@
|
|
5
5
|
////
|
6
6
|
|
7
7
|
/// Textfield input typography.
|
8
|
-
$am-textfield-input-type: normal am-sp(
|
8
|
+
$am-textfield-input-type: normal am-sp(14px)/24px $am-font-sans !default;
|
9
9
|
/// Textfield label typography.
|
10
|
-
$am-textfield-label-type:
|
10
|
+
$am-textfield-label-type: $am-font-weight-regular am-sp(12px)/am-unit(2) $am-font-sans !default;
|
11
11
|
/// Textfield margin.
|
12
12
|
$am-textfield-margin: am-unit(1) 0 !default;
|
13
13
|
/// Textfield padding.
|
@@ -19,11 +19,12 @@ $am-textfield-color: rgba(#000, 0.70) !default;
|
|
19
19
|
/// Textfield highlight color.
|
20
20
|
$am-textfield-primary: am-color(primary) !default;
|
21
21
|
/// Icon for email fields.
|
22
|
-
$am-textfield-email-icon:
|
22
|
+
$am-textfield-email-icon: url('data:image/svg+xml;utf8,<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> <path opacity="0.3" enable-background="new " d="M20,4H4C2.9,4,2.01,4.9,2.01,6L2,18c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6 C22,4.9,21.1,4,20,4z M20,8l-8,5L4,8V6l8,5l8-5V8z"/> </svg>') !default;
|
23
23
|
/// Icon for password fields.
|
24
|
-
$am-textfield-password-icon:
|
24
|
+
$am-textfield-password-icon: url('data:image/svg+xml;utf8,<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> <path opacity="0.4" d="M12.65,10C11.83,7.67,9.61,6,7,6c-3.31,0-6,2.69-6,6c0,3.311,2.69,6,6,6c2.61,0,4.83-1.67,5.65-4H17v4h4v-4h2 v-4H12.65z M7,14c-1.1,0-2-0.9-2-2c0-1.1,0.9-2,2-2s2,0.9,2,2C9,13.1,8.1,14,7,14z"/> </svg>') !default;
|
25
25
|
/// Icon for date fields.
|
26
|
-
$am-textfield-date-icon:
|
26
|
+
$am-textfield-date-icon: url('data:image/svg+xml;utf8,<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> <path opacity="0.4" d="M17,12h-5v5h5V12z M16,1v2H8V1H6v2H5C3.89,3,3.01,3.9,3.01,5L3,19c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V5 c0-1.1-0.9-2-2-2h-1V1H16z M19,19H5V8h14V19z"/> </svg>') !default;
|
27
|
+
|
27
28
|
|
28
29
|
@mixin am-textfield {
|
29
30
|
color: $am-textfield-color;
|
@@ -38,8 +39,7 @@ $am-textfield-date-icon: asset-url("active_material/icons/event.svg") !default;
|
|
38
39
|
border: 1px solid #d3d3d3;
|
39
40
|
box-shadow: inset 1px 1px 1px rgba(#222, 0.08);
|
40
41
|
display: block;
|
41
|
-
font
|
42
|
-
font-weight: normal;
|
42
|
+
font: $am-textfield-input-type;
|
43
43
|
line-height: 24px;
|
44
44
|
margin: 0;
|
45
45
|
padding: am-unit(1);
|
@@ -70,7 +70,7 @@ $am-textfield-date-icon: asset-url("active_material/icons/event.svg") !default;
|
|
70
70
|
|
71
71
|
@mixin am-textfield-textarea {
|
72
72
|
border-radius: 2px;
|
73
|
-
height: am-sp(
|
73
|
+
height: am-sp(7px);
|
74
74
|
padding: am-unit(1);
|
75
75
|
}
|
76
76
|
|
@@ -80,11 +80,11 @@ $am-textfield-date-icon: asset-url("active_material/icons/event.svg") !default;
|
|
80
80
|
}
|
81
81
|
|
82
82
|
@mixin am-textfield-label {
|
83
|
-
@include am-font-size(
|
83
|
+
@include am-font-size(13px);
|
84
84
|
@include am-color(secondary-text);
|
85
85
|
display: block;
|
86
86
|
line-height: 16px;
|
87
|
-
font
|
87
|
+
font: $am-textfield-label-type;
|
88
88
|
margin-bottom: 8px;
|
89
89
|
position: relative;
|
90
90
|
transition: 0.28s all;
|
@@ -121,6 +121,10 @@ $am-textfield-date-icon: asset-url("active_material/icons/event.svg") !default;
|
|
121
121
|
margin-left: 4px;
|
122
122
|
}
|
123
123
|
|
124
|
+
@mixin am-textfield-input-disabled {
|
125
|
+
background-color: #eeeeee;
|
126
|
+
}
|
127
|
+
|
124
128
|
@mixin am-textfield-inline {
|
125
129
|
align-items: center;
|
126
130
|
display: flex;
|
@@ -3,8 +3,8 @@
|
|
3
3
|
* A basic navigation element, primary used for top level navigation
|
4
4
|
*/
|
5
5
|
|
6
|
-
$am-toolbar-base-font-size : am-sp(
|
7
|
-
$am-toolbar-title-font-size : am-sp(
|
6
|
+
$am-toolbar-base-font-size : am-sp(14px) !default;
|
7
|
+
$am-toolbar-title-font-size : am-sp(20px) !default;
|
8
8
|
$am-toolbar-keyline-small : am-unit(7) !default;
|
9
9
|
$am-toolbar-keyline-medium : $am-toolbar-keyline-small + 8px !default;
|
10
10
|
|
@@ -24,7 +24,7 @@ $am-toolbar-keyline-medium : $am-toolbar-keyline-small + 8px !default;
|
|
24
24
|
|
25
25
|
@mixin am-toolbar-title {
|
26
26
|
font-size: $am-toolbar-title-font-size;
|
27
|
-
font-weight:
|
27
|
+
font-weight: $am-font-weight-medium;
|
28
28
|
line-height: am-unit(2);
|
29
29
|
padding: am-unit(2);
|
30
30
|
width: 100%;
|
@@ -45,7 +45,7 @@ $am-toolbar-keyline-medium : $am-toolbar-keyline-small + 8px !default;
|
|
45
45
|
@include am-link-no-decoration;
|
46
46
|
@include am-color(text);
|
47
47
|
display: inline-block;
|
48
|
-
font-weight:
|
48
|
+
font-weight: $am-font-weight-medium;
|
49
49
|
line-height: am-unit(3);
|
50
50
|
margin: 0;
|
51
51
|
}
|
@@ -66,5 +66,5 @@ $am-toolbar-keyline-medium : $am-toolbar-keyline-small + 8px !default;
|
|
66
66
|
|
67
67
|
@mixin am-toolbar-item-primary-active {
|
68
68
|
@include am-color(accent);
|
69
|
-
font-weight:
|
69
|
+
font-weight: $am-font-weight-semi-bold;
|
70
70
|
}
|
@@ -3,8 +3,20 @@
|
|
3
3
|
////
|
4
4
|
|
5
5
|
/// The default sans-serif font
|
6
|
-
$am-font-sans: '
|
6
|
+
$am-font-sans: 'Roboto', sans-serif !default;
|
7
|
+
|
8
|
+
/// The weight of bold type
|
9
|
+
$am-font-weight-bold: 700;
|
10
|
+
|
11
|
+
/// The weight of semi-bold type
|
12
|
+
$am-font-weight-semi-bold: 500;
|
13
|
+
|
14
|
+
/// The weight of medium type
|
15
|
+
$am-font-weight-medium: 500;
|
16
|
+
|
17
|
+
/// The weight of regular type
|
18
|
+
$am-font-weight-regular: 400;
|
7
19
|
|
8
20
|
$am-fonts: (
|
9
21
|
sans: $am-font-sans
|
10
|
-
)
|
22
|
+
);
|
@@ -2,7 +2,7 @@
|
|
2
2
|
/// Active Material
|
3
3
|
/// A redesign of ActiveAdmin that follows Material Design standards
|
4
4
|
/// www.google.com/design/spec/material-design/introduction.html
|
5
|
-
/// @author
|
5
|
+
/// @author Derek Kniffin
|
6
6
|
////
|
7
7
|
|
8
8
|
/// $variables, these should always end with !default
|
@@ -12,25 +12,77 @@
|
|
12
12
|
@import "active_material/values/fonts";
|
13
13
|
@import "active_material/values/breakpoints";
|
14
14
|
@import "active_material/values/elevation";
|
15
|
-
@import "active_material/values/*";
|
16
15
|
|
17
16
|
/// Generators describe functions, mixins, and classes
|
18
17
|
/// intended for extension. More or less, they are "style builders"
|
19
18
|
/// instead of "style descriptors"
|
20
19
|
@import "active_material/generators/functions";
|
21
20
|
@import "active_material/generators/mixins";
|
22
|
-
@import "active_material/generators/*";
|
23
21
|
|
24
22
|
/// Atoms are individual styles to enhance reusability
|
25
|
-
@import "active_material/atoms
|
23
|
+
@import "active_material/atoms/clearfix";
|
24
|
+
@import "active_material/atoms/color";
|
25
|
+
@import "active_material/atoms/family";
|
26
|
+
@import "active_material/atoms/fill";
|
27
|
+
@import "active_material/atoms/hidden";
|
28
|
+
@import "active_material/atoms/links";
|
29
|
+
@import "active_material/atoms/lists";
|
30
|
+
@import "active_material/atoms/paper";
|
31
|
+
@import "active_material/atoms/type";
|
26
32
|
|
27
33
|
/// Foundational rules that setup the page
|
28
34
|
@import "active_material/global/foundation";
|
29
|
-
@import "active_material/global/*";
|
30
35
|
|
31
36
|
/// Prototypes are collections of mixins that allow for css design
|
32
37
|
/// without the constraints of limiting ActiveAdmin selectors
|
33
|
-
@import "active_material/prototypes
|
38
|
+
@import "active_material/prototypes/actions-footer";
|
39
|
+
@import "active_material/prototypes/avatar";
|
40
|
+
@import "active_material/prototypes/btn-icon";
|
41
|
+
@import "active_material/prototypes/button";
|
42
|
+
@import "active_material/prototypes/datepicker";
|
43
|
+
@import "active_material/prototypes/dialog";
|
44
|
+
@import "active_material/prototypes/menu";
|
45
|
+
@import "active_material/prototypes/multiselect";
|
46
|
+
@import "active_material/prototypes/select";
|
47
|
+
@import "active_material/prototypes/snackbar";
|
48
|
+
@import "active_material/prototypes/subheader";
|
49
|
+
@import "active_material/prototypes/table";
|
50
|
+
@import "active_material/prototypes/tabs";
|
51
|
+
@import "active_material/prototypes/tag";
|
52
|
+
@import "active_material/prototypes/textfield";
|
53
|
+
@import "active_material/prototypes/toolbar";
|
54
|
+
@import "active_material/prototypes/underlay";
|
34
55
|
|
35
56
|
/// Components describe actual implementation within Active Admin
|
36
|
-
@import "active_material/components
|
57
|
+
@import "active_material/components/avatar";
|
58
|
+
@import "active_material/components/blank_slate";
|
59
|
+
@import "active_material/components/breadcrumbs";
|
60
|
+
@import "active_material/components/buttons";
|
61
|
+
@import "active_material/components/checkbox";
|
62
|
+
@import "active_material/components/clearfix";
|
63
|
+
@import "active_material/components/comments";
|
64
|
+
@import "active_material/components/date-select";
|
65
|
+
@import "active_material/components/datepicker";
|
66
|
+
@import "active_material/components/dialog";
|
67
|
+
@import "active_material/components/dropdown";
|
68
|
+
@import "active_material/components/featured-blocks";
|
69
|
+
@import "active_material/components/filter";
|
70
|
+
@import "active_material/components/flash";
|
71
|
+
@import "active_material/components/footer";
|
72
|
+
@import "active_material/components/forms";
|
73
|
+
@import "active_material/components/header";
|
74
|
+
@import "active_material/components/hidden";
|
75
|
+
@import "active_material/components/login";
|
76
|
+
@import "active_material/components/overlay";
|
77
|
+
@import "active_material/components/pagination";
|
78
|
+
@import "active_material/components/panels";
|
79
|
+
@import "active_material/components/photo_select";
|
80
|
+
@import "active_material/components/scopes";
|
81
|
+
@import "active_material/components/select";
|
82
|
+
@import "active_material/components/sortable";
|
83
|
+
@import "active_material/components/structure";
|
84
|
+
@import "active_material/components/tables";
|
85
|
+
@import "active_material/components/tabs";
|
86
|
+
@import "active_material/components/tag";
|
87
|
+
@import "active_material/components/title_bar";
|
88
|
+
@import "active_material/components/utility_nav";
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module ActiveMaterial
|
2
|
+
module FontLoader
|
3
|
+
def build_active_admin_head
|
4
|
+
within super do
|
5
|
+
uri = URI.parse(ActiveMaterial::Rails::Engine.config.active_material.font_url)
|
6
|
+
link(rel: "preconnect", href: uri.origin)
|
7
|
+
link(rel: "preconnect", href: uri.origin, crossorigin: true)
|
8
|
+
link(rel: "stylesheet", href: uri.to_s)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
module ActiveMaterial
|
2
|
-
VERSION = "1.
|
3
|
-
end
|
1
|
+
module ActiveMaterial
|
2
|
+
VERSION = "2.1.0"
|
3
|
+
end
|
data/lib/active_material.rb
CHANGED
@@ -1,8 +1,33 @@
|
|
1
1
|
require "active_material/version"
|
2
|
+
require "active_material/font_loader"
|
2
3
|
|
3
4
|
module ActiveMaterial
|
4
5
|
module Rails
|
5
6
|
class Engine < ::Rails::Engine
|
7
|
+
config.active_material = ActiveSupport::OrderedOptions.new
|
8
|
+
config.active_material.load_font = true
|
9
|
+
config.active_material.font_url = "https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
10
|
+
|
11
|
+
initializer "active_material" do |app|
|
12
|
+
if app.config.active_material.load_font
|
13
|
+
ActiveAdmin.before_load do
|
14
|
+
ActiveAdmin::Views::Pages::Base.prepend ActiveMaterial::FontLoader
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
initializer "active_material.precompile" do |app|
|
20
|
+
app.config.assets.paths << self.root.join("app/javascripts")
|
21
|
+
app.config.assets.paths << self.root.join("app/stylesheets")
|
22
|
+
app.config.assets.precompile << "active_material.js"
|
23
|
+
end
|
24
|
+
|
25
|
+
initializer "active_material.importmap", before: "importmap" do |app|
|
26
|
+
# Skip if importmap-rails is not installed
|
27
|
+
next unless app.config.respond_to?(:importmap)
|
28
|
+
|
29
|
+
app.config.importmap.paths << Engine.root.join("config/importmap.rb")
|
30
|
+
end
|
6
31
|
end
|
7
32
|
end
|
8
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_material
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
autorequire:
|
7
|
+
- Derek Kniffin
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,28 +38,31 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: sass-rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: ActiveAdmin skin based on Google's Material Design.
|
42
56
|
email:
|
43
|
-
-
|
57
|
+
- derek.kniffin@gmail.com
|
44
58
|
executables: []
|
45
59
|
extensions: []
|
46
60
|
extra_rdoc_files: []
|
47
61
|
files:
|
48
62
|
- LICENSE.txt
|
49
63
|
- README.md
|
50
|
-
- app/assets/images/active_material/icons/account_circle.svg
|
51
|
-
- app/assets/images/active_material/icons/arrow-dropdown.svg
|
52
|
-
- app/assets/images/active_material/icons/arrow_down.svg
|
53
|
-
- app/assets/images/active_material/icons/clear.svg
|
54
|
-
- app/assets/images/active_material/icons/create.svg
|
55
|
-
- app/assets/images/active_material/icons/email.svg
|
56
|
-
- app/assets/images/active_material/icons/event.svg
|
57
|
-
- app/assets/images/active_material/icons/more.svg
|
58
|
-
- app/assets/images/active_material/icons/reorder.svg
|
59
|
-
- app/assets/images/active_material/icons/search.svg
|
60
|
-
- app/assets/images/active_material/icons/secret.svg
|
61
64
|
- app/assets/javascripts/active_material.js
|
62
|
-
- app/assets/javascripts/active_material/
|
65
|
+
- app/assets/javascripts/active_material/actions-toggle.js
|
63
66
|
- app/assets/stylesheets/active_material.scss
|
64
67
|
- app/assets/stylesheets/active_material/atoms/clearfix.scss
|
65
68
|
- app/assets/stylesheets/active_material/atoms/color.scss
|
@@ -76,6 +79,7 @@ files:
|
|
76
79
|
- app/assets/stylesheets/active_material/components/buttons.scss
|
77
80
|
- app/assets/stylesheets/active_material/components/checkbox.scss
|
78
81
|
- app/assets/stylesheets/active_material/components/clearfix.scss
|
82
|
+
- app/assets/stylesheets/active_material/components/comments.scss
|
79
83
|
- app/assets/stylesheets/active_material/components/date-select.scss
|
80
84
|
- app/assets/stylesheets/active_material/components/datepicker.scss
|
81
85
|
- app/assets/stylesheets/active_material/components/dialog.scss
|
@@ -127,12 +131,13 @@ files:
|
|
127
131
|
- app/assets/stylesheets/active_material/values/fonts.scss
|
128
132
|
- app/assets/stylesheets/active_material/values/units.scss
|
129
133
|
- lib/active_material.rb
|
134
|
+
- lib/active_material/font_loader.rb
|
130
135
|
- lib/active_material/version.rb
|
131
|
-
homepage:
|
136
|
+
homepage: ''
|
132
137
|
licenses:
|
133
138
|
- MIT
|
134
139
|
metadata: {}
|
135
|
-
post_install_message:
|
140
|
+
post_install_message:
|
136
141
|
rdoc_options: []
|
137
142
|
require_paths:
|
138
143
|
- lib
|
@@ -147,10 +152,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
152
|
- !ruby/object:Gem::Version
|
148
153
|
version: '0'
|
149
154
|
requirements: []
|
150
|
-
|
151
|
-
|
152
|
-
signing_key:
|
155
|
+
rubygems_version: 3.3.26
|
156
|
+
signing_key:
|
153
157
|
specification_version: 4
|
154
158
|
summary: ActiveAdmin skin based on Google's Material Design.
|
155
159
|
test_files: []
|
156
|
-
has_rdoc:
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
-
width="48px" height="48px" viewBox="0 0 48 48" enable-background="new 0 0 48 48" xml:space="preserve">
|
6
|
-
<path fill="#FFFFFF" d="M24,4C12.95,4,4,12.95,4,24s8.95,20,20,20s20-8.95,20-20S35.05,4,24,4z M24,10c3.311,0,6,2.69,6,6
|
7
|
-
c0,3.32-2.689,6-6,6c-3.31,0-6-2.68-6-6C18,12.69,20.69,10,24,10z M24,38.4c-5.01,0-9.41-2.561-12-6.44c0.05-3.97,8.01-6.16,12-6.16
|
8
|
-
s11.939,2.19,12,6.16C33.41,35.84,29.01,38.4,24,38.4z"/>
|
9
|
-
</svg>
|
@@ -1,7 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
-
width="18px" height="18px" viewBox="0 0 18 18" enable-background="new 0 0 18 18" xml:space="preserve">
|
6
|
-
<path opacity="0.4" d="M5,8l4,4l4-4H5z"/>
|
7
|
-
</svg>
|
@@ -1,7 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
-
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
6
|
-
<path opacity="0.5" d="M7.41,7.84L12,12.42l4.59-4.58L18,9.25l-6,6l-6-6L7.41,7.84z"/>
|
7
|
-
</svg>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
-
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
6
|
-
<path opacity="0.54" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12
|
7
|
-
L19,6.41z"/>
|
8
|
-
</svg>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
-
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
6
|
-
<path opacity="0.54" d="M3,17.25V21h3.75L17.811,9.94l-3.75-3.75L3,17.25z M20.71,7.04c0.39-0.39,0.39-1.02,0-1.41l-2.34-2.34
|
7
|
-
c-0.39-0.39-1.021-0.39-1.41,0l-1.83,1.83l3.75,3.75L20.71,7.04z"/>
|
8
|
-
</svg>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
-
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
6
|
-
<path opacity="0.3" enable-background="new " d="M20,4H4C2.9,4,2.01,4.9,2.01,6L2,18c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6
|
7
|
-
C22,4.9,21.1,4,20,4z M20,8l-8,5L4,8V6l8,5l8-5V8z"/>
|
8
|
-
</svg>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
-
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
6
|
-
<path opacity="0.4" d="M17,12h-5v5h5V12z M16,1v2H8V1H6v2H5C3.89,3,3.01,3.9,3.01,5L3,19c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V5
|
7
|
-
c0-1.1-0.9-2-2-2h-1V1H16z M19,19H5V8h14V19z"/>
|
8
|
-
</svg>
|