activeadmin-rails 1.7.2 → 1.8.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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/.babelrc +5 -0
  3. data/.github/workflows/ci.yaml +3 -18
  4. data/.github/workflows/daily.yaml +6 -18
  5. data/.github/workflows/pages.yml +1 -1
  6. data/.gitignore +2 -0
  7. data/CHANGELOG.md +25 -3
  8. data/CONTRIBUTING.md +1 -1
  9. data/Gemfile +2 -1
  10. data/Rakefile +1 -0
  11. data/activeadmin-rails.gemspec +2 -5
  12. data/app/assets/javascripts/active_admin/base.js +507 -0
  13. data/app/assets/stylesheets/active_admin/_base.scss +4 -1
  14. data/app/assets/stylesheets/active_admin/_forms.scss +11 -10
  15. data/app/assets/stylesheets/active_admin/_header.scss +22 -19
  16. data/app/assets/stylesheets/active_admin/_index.scss +7 -0
  17. data/app/assets/stylesheets/active_admin/components/_batch_actions.scss +2 -4
  18. data/app/assets/stylesheets/active_admin/components/_blank_slates.scss +1 -1
  19. data/app/assets/stylesheets/active_admin/components/_comments.scss +8 -6
  20. data/app/assets/stylesheets/active_admin/components/_date_picker.scss +4 -4
  21. data/app/assets/stylesheets/active_admin/components/_dropdown_menu.scss +20 -15
  22. data/app/assets/stylesheets/active_admin/components/_flash_messages.scss +3 -3
  23. data/app/assets/stylesheets/active_admin/components/_pagination.scss +21 -14
  24. data/app/assets/stylesheets/active_admin/components/_status_tags.scss +3 -1
  25. data/app/assets/stylesheets/active_admin/components/_table_tools.scss +13 -13
  26. data/app/assets/stylesheets/active_admin/components/_tables.scss +8 -7
  27. data/app/assets/stylesheets/active_admin/components/_tabs.scss +10 -7
  28. data/app/assets/stylesheets/active_admin/mixins/_all.scss +0 -4
  29. data/app/assets/stylesheets/active_admin/mixins/_buttons.scss +22 -15
  30. data/app/assets/stylesheets/active_admin/mixins/_gradients.scss +7 -5
  31. data/app/assets/stylesheets/active_admin/mixins/_sections.scss +4 -4
  32. data/app/assets/stylesheets/active_admin/mixins/_variables.scss +14 -3
  33. data/app/assets/stylesheets/active_admin/pages/_logged_out.scss +10 -6
  34. data/app/assets/stylesheets/active_admin/structure/_footer.scss +8 -1
  35. data/app/assets/stylesheets/active_admin/structure/_title_bar.scss +19 -8
  36. data/app/javascript/active_admin/base.js +28 -0
  37. data/app/{assets/javascripts/active_admin/lib/batch_actions.es6 → javascript/active_admin/initializers/batch-actions.js} +5 -3
  38. data/app/javascript/active_admin/initializers/checkbox-toggler.js +3 -0
  39. data/app/javascript/active_admin/initializers/dropdown-menu.js +9 -0
  40. data/app/javascript/active_admin/initializers/filters.js +10 -0
  41. data/app/{assets/javascripts/active_admin/lib/has_many.es6 → javascript/active_admin/initializers/has-many.js} +7 -1
  42. data/app/javascript/active_admin/initializers/per-page.js +13 -0
  43. data/app/javascript/active_admin/initializers/table-checkbox-toggler.js +3 -0
  44. data/app/{assets/javascripts/active_admin/lib/checkbox-toggler.es6 → javascript/active_admin/lib/checkbox-toggler.js} +2 -2
  45. data/app/{assets/javascripts/active_admin/lib/dropdown-menu.es6 → javascript/active_admin/lib/dropdown-menu.js} +2 -9
  46. data/app/javascript/active_admin/lib/filters.js +39 -0
  47. data/app/{assets/javascripts/active_admin/lib/modal_dialog.es6 → javascript/active_admin/lib/modal-dialog.js} +5 -3
  48. data/app/javascript/active_admin/lib/per-page.js +38 -0
  49. data/app/{assets/javascripts/active_admin/lib/table-checkbox-toggler.es6 → javascript/active_admin/lib/table-checkbox-toggler.js} +4 -2
  50. data/app/javascript/active_admin/lib/utils.js +40 -0
  51. data/cucumber.yml +2 -2
  52. data/docs/9-batch-actions.md +2 -2
  53. data/features/index/format_as_csv.feature +7 -7
  54. data/features/index/index_as_table.feature +6 -6
  55. data/gemfiles/rails_71.gemfile +2 -1
  56. data/gemfiles/rails_72.gemfile +2 -1
  57. data/gemfiles/rails_80.gemfile +2 -1
  58. data/gemfiles/rails_81.gemfile +18 -0
  59. data/lib/active_admin/application.rb +9 -1
  60. data/lib/active_admin/engine.rb +8 -5
  61. data/lib/active_admin/filters/active_filter.rb +1 -2
  62. data/lib/active_admin/namespace.rb +1 -1
  63. data/lib/active_admin/namespace_settings.rb +2 -1
  64. data/lib/active_admin/resource/attributes.rb +1 -1
  65. data/lib/active_admin/router.rb +4 -4
  66. data/lib/active_admin/version.rb +1 -1
  67. data/lib/active_admin.rb +2 -4
  68. data/lib/generators/active_admin/assets/assets_generator.rb +7 -1
  69. data/lib/generators/active_admin/assets/templates/active_admin.js.erb +6 -0
  70. data/lib/generators/active_admin/assets/templates/active_admin.scss +2 -2
  71. data/package.json +42 -0
  72. data/rollup.config.js +38 -0
  73. data/spec/requests/pages/layout_spec.rb +8 -2
  74. data/spec/requests/stylesheets_spec.rb +10 -3
  75. data/spec/support/active_admin_integration_spec_helper.rb +0 -3
  76. data/spec/support/rails_template.rb +29 -13
  77. data/spec/support/templates/dartsass.rb +4 -0
  78. data/spec/unit/namespace_spec.rb +0 -13
  79. data/spec/unit/resource/attributes_spec.rb +1 -1
  80. data/vendor/assets/stylesheets/active_admin/_normalize.scss +70 -354
  81. metadata +39 -77
  82. data/app/assets/javascripts/active_admin/base.es6 +0 -23
  83. data/app/assets/javascripts/active_admin/initializers/filters.es6 +0 -45
  84. data/app/assets/javascripts/active_admin/lib/active_admin.es6 +0 -41
  85. data/app/assets/javascripts/active_admin/lib/per_page.es6 +0 -47
  86. data/app/assets/stylesheets/active_admin/mixins/_rounded.scss +0 -22
  87. data/app/assets/stylesheets/active_admin/mixins/_shadows.scss +0 -15
  88. data/app/assets/stylesheets/active_admin/mixins/_typography.scss +0 -3
  89. data/app/assets/stylesheets/active_admin/mixins/_utilities.scss +0 -17
  90. data/gemfiles/rails_60.gemfile +0 -16
  91. data/gemfiles/rails_61.gemfile +0 -16
  92. data/gemfiles/rails_61_turbolinks.gemfile +0 -16
  93. data/gemfiles/rails_70.gemfile +0 -16
  94. data/gemfiles/rails_70_hotwire.gemfile +0 -16
  95. data/lib/generators/active_admin/assets/templates/active_admin.js +0 -1
  96. /data/app/{assets/javascripts/active_admin/ext/jquery-ui.es6 → javascript/active_admin/ext/jquery-ui.js} +0 -0
  97. /data/app/{assets/javascripts/active_admin/ext/jquery.es6 → javascript/active_admin/ext/jquery.js} +0 -0
  98. /data/app/{assets/javascripts/active_admin/initializers/datepicker.es6 → javascript/active_admin/initializers/datepicker.js} +0 -0
  99. /data/app/{assets/javascripts/active_admin/initializers/tabs.es6 → javascript/active_admin/initializers/tabs.js} +0 -0
@@ -1,6 +1,4 @@
1
1
  #collection_selection_toggle_panel {
2
- @include clearfix;
3
- >.resource_selection_toggle_cell {
4
- float:left;
5
- }
2
+ display: flex;
3
+ align-items: center;
6
4
  }
@@ -3,7 +3,7 @@
3
3
  text-align: center;
4
4
 
5
5
  .blank_slate {
6
- @include rounded;
6
+ border-radius: 3px;
7
7
  border: $blank-slate-border;
8
8
  color: $blank-slate-primary-color;
9
9
  display: inline-block;
@@ -1,18 +1,20 @@
1
+ @use "sass:color";
1
2
  // -------------------------------------- Admin Notes
2
3
  .comments {
3
4
 
4
5
  .active_admin_comment {
5
- clear: both;
6
6
  margin-top: 10px;
7
- margin-bottom: 40px;
7
+ margin-bottom: 20px;
8
8
  max-width: 700px;
9
+ display: flex;
10
+ gap: 20px;
9
11
 
10
12
  .active_admin_comment_meta {
11
13
  width: 130px;
12
- float: left;
14
+ flex-shrink: 0;
13
15
  overflow: hidden;
14
16
  font-size: 0.9em;
15
- color: lighten($primary-color, 10%);
17
+ color: color.adjust($primary-color, $lightness: 10%);
16
18
  .active_admin_comment_author {
17
19
  font-size: 1.2em;
18
20
  font-weight: bold;
@@ -21,7 +23,7 @@
21
23
  }
22
24
  }
23
25
  .active_admin_comment_body {
24
- margin-left: 150px;
26
+ flex: 1;
25
27
  }
26
28
  }
27
29
  form.active_admin_comment {
@@ -33,7 +35,7 @@
33
35
  margin: 0;
34
36
  padding: 0;
35
37
  background: none;
36
- @include no-shadow;
38
+ box-shadow: $shadow-none;
37
39
  }
38
40
  li { padding: 0; }
39
41
  fieldset.buttons { padding: 0; margin-top: 5px;}
@@ -40,7 +40,7 @@
40
40
  }
41
41
 
42
42
  .ui-datepicker-title {
43
- @include text-shadow(#000);
43
+ text-shadow: $text-shadow-dark;
44
44
  color: #fff;
45
45
  display: block;
46
46
  font-size: 1.1em;
@@ -90,8 +90,8 @@
90
90
  }
91
91
 
92
92
  table.ui-datepicker-calendar {
93
- @include rounded-bottom;
94
- @include shadow(0,1px,6px,rgba(0,0,0,0.26));
93
+ border-radius: 0 0 3px 3px;
94
+ box-shadow: $shadow-lg;
95
95
  background-color: #f4f4f4;
96
96
  border: solid 1px #63686e;
97
97
  left: 2px;
@@ -122,7 +122,7 @@
122
122
  width: 22px;
123
123
 
124
124
  a {
125
- @include rounded;
125
+ border-radius: 3px;
126
126
  color: #666666;
127
127
  font-weight: bold;
128
128
  font-size: 0.85em;
@@ -1,11 +1,16 @@
1
+ @use "sass:color";
2
+
1
3
  .dropdown_menu {
2
4
  display: inline;
3
5
 
4
6
  .dropdown_menu_button {
5
7
  @include light-button;
6
- position: relative;
7
- padding-right: 22px !important;
8
- cursor: pointer;
8
+
9
+ & {
10
+ position: relative;
11
+ padding-right: 22px !important;
12
+ cursor: pointer;
13
+ }
9
14
 
10
15
  &:before {
11
16
  content: ' ';
@@ -43,7 +48,7 @@
43
48
  height: 0;
44
49
  border-width: 0 6px 6px;
45
50
  border-style: solid;
46
- border-color: darken($primary-color, 4%) transparent;
51
+ border-color: color.adjust($primary-color, $lightness: -4%) transparent;
47
52
  z-index: 100;
48
53
 
49
54
  // The nipple's inner shadow
@@ -55,7 +60,7 @@
55
60
  height: 0;
56
61
  border-width: 0 5px 5px;
57
62
  border-style: solid;
58
- border-color: lighten($primary-color, 15%) transparent;
63
+ border-color: color.adjust($primary-color, $lightness: 15%) transparent;
59
64
  left: -5px;
60
65
  top: 1px;
61
66
  }
@@ -69,7 +74,7 @@
69
74
  height: 0;
70
75
  border-width: 0 5px 5px;
71
76
  border-style: solid;
72
- border-color: lighten($primary-color, 4%) transparent;
77
+ border-color: color.adjust($primary-color, $lightness: 4%) transparent;
73
78
  left: -5px;
74
79
  top: 2px;
75
80
  }
@@ -80,12 +85,12 @@
80
85
  position: absolute;
81
86
  background-color: white;
82
87
  padding: 2px;
83
- box-shadow: rgba(0,0,0,0.4) 0 1px 3px, lighten($primary-color, 15%) 0px 1px 0px 0px inset;
88
+ box-shadow: rgba(0,0,0,0.4) 0 1px 3px, color.adjust($primary-color, $lightness: 15%) 0px 1px 0px 0px inset;
84
89
  background-color: $primary-color;
85
- @include gradient(lighten($primary-color, 4%), darken($primary-color, 5%));
86
- border: solid 1px darken($primary-color, 10%);
87
- border-top-color: darken($primary-color, 4%);
88
- border-bottom-color: darken($primary-color, 17%);
90
+ @include gradient(color.adjust($primary-color, $lightness: 4%), color.adjust($primary-color, $lightness: -5%));
91
+ border: solid 1px color.adjust($primary-color, $lightness: -10%);
92
+ border-top-color: color.adjust($primary-color, $lightness: -4%);
93
+ border-bottom-color: color.adjust($primary-color, $lightness: -17%);
89
94
  border-radius: 4px;
90
95
  z-index: 2000;
91
96
  display: none;
@@ -93,8 +98,8 @@
93
98
  .dropdown_menu_list {
94
99
  display: block;
95
100
  background-color: #FFF;
96
- border: solid 1px darken($primary-color, 10%);
97
- box-shadow: lighten($primary-color, 5%) 0px 1px 0px 0px;
101
+ border: solid 1px color.adjust($primary-color, $lightness: -10%);
102
+ box-shadow: color.adjust($primary-color, $lightness: 5%) 0px 1px 0px 0px;
98
103
  border-radius: 3px;
99
104
  margin: 0;
100
105
  overflow: hidden;
@@ -120,7 +125,7 @@
120
125
 
121
126
  &:hover {
122
127
  @include highlight-gradient;
123
- @include text-shadow(#5a83aa);
128
+ text-shadow: 0 1px 0 #5a83aa;
124
129
  color: #FFF;
125
130
  }
126
131
 
@@ -140,11 +145,11 @@
140
145
  }
141
146
 
142
147
  &:last-child {
148
+ border: none;
143
149
  a {
144
150
  border-bottom-left-radius: 2px;
145
151
  border-bottom-right-radius: 2px;
146
152
  }
147
- border: none;
148
153
  }
149
154
  }
150
155
  }
@@ -1,7 +1,7 @@
1
1
  body.logged_in {
2
2
  .flash {
3
3
  @include gradient(#f7f1d3, #f5edc5);
4
- @include text-shadow(#fafafa);
4
+ text-shadow: 0 1px 0 #fafafa;
5
5
  border-bottom: 1px solid #eee098;
6
6
  color: #cb9810;
7
7
  font-weight: bold;
@@ -25,8 +25,8 @@ body.logged_in {
25
25
 
26
26
  body.logged_out {
27
27
  .flash {
28
- @include no-shadow;
29
- @include text-shadow(#fff);
28
+ box-shadow: $shadow-none;
29
+ text-shadow: $text-shadow-light;
30
30
  background: none;
31
31
  color: #666;
32
32
  font-weight: bold;
@@ -1,11 +1,10 @@
1
- .paginated_collection_contents {
2
- clear: both;
3
- }
4
-
5
1
  .pagination {
6
- float: right;
2
+ display: flex;
3
+ justify-content: flex-end;
4
+ gap: 4px;
7
5
  font-size: 0.9em;
8
- margin-left: 10px;
6
+ margin-left: 8px;
7
+ order: 2;
9
8
 
10
9
  a {
11
10
  @include light-button;
@@ -16,40 +15,48 @@
16
15
  }
17
16
 
18
17
  a, span.page.current {
19
- @include rounded(0px);
20
- margin-right: 4px;
18
+ border-radius: 0;
21
19
  padding: 2px 5px;
22
20
  }
23
21
  }
24
22
 
25
23
  .pagination_information {
26
- float: right;
24
+ display: inline-block;
25
+ margin-left: auto;
27
26
  margin-bottom: 5px;
27
+ white-space: nowrap;
28
28
  color: #b3bcc1;
29
+ order: 1;
29
30
  b { color: #5c6469; }
30
31
  }
31
32
 
32
33
  .download_links {
33
- float: left;
34
+ display: flex;
35
+ justify-content: flex-start;
36
+ margin-left: 0;
37
+ margin-right: auto;
38
+ order: 0;
34
39
  }
35
40
 
36
41
  .pagination_per_page {
37
- float: right;
42
+ display: flex;
43
+ justify-content: flex-end;
38
44
  margin-left: 4px;
45
+ order: 0;
39
46
  select {
40
47
  @include light-button;
41
- @include rounded(0px);
48
+ border-radius: 0;
42
49
  padding: 1px 5px;
43
50
  }
44
51
  }
45
52
 
46
53
  .comments {
47
54
  .pagination {
48
- float: left;
55
+ justify-content: flex-start;
49
56
  margin-bottom: 30px;
50
57
  }
51
58
  .pagination_information {
52
- float: left;
59
+ text-align: left;
53
60
  color: #000;
54
61
  }
55
62
  }
@@ -1,5 +1,7 @@
1
+ @use "sass:color";
2
+
1
3
  .status_tag {
2
- background: darken($secondary-color, 15%);
4
+ background: color.adjust($secondary-color, $lightness: -15%);
3
5
  color: #fff;
4
6
  text-transform: uppercase;
5
7
  letter-spacing: 0.15em;
@@ -1,19 +1,20 @@
1
1
  .table_tools {
2
- @include clearfix;
3
2
  margin-bottom: 16px;
4
- }
5
-
6
- .table_tools .dropdown_menu {
7
- float: left;
3
+ display: flex;
4
+ align-items: center;
5
+ gap: 8px;
8
6
  }
9
7
 
10
8
  a.table_tools_button, .table_tools .dropdown_menu_button {
11
9
  @include light-button;
12
- @include gradient(#FFFFFF, #F0F0F0);
13
- @include border-colors(#d9d9d9, #d0d0d0, #c5c5c5);
14
- font-size: 0.9em;
15
- padding: 4px 14px 4px;
16
- margin: 0;
10
+
11
+ & {
12
+ @include gradient(#FFFFFF, #F0F0F0);
13
+ border-color: #d9d9d9 #d0d0d0 #c5c5c5 #d0d0d0;
14
+ font-size: 0.9em;
15
+ padding: 4px 14px 4px;
16
+ margin: 0;
17
+ }
17
18
 
18
19
  &:not(.disabled) {
19
20
  &:hover {
@@ -21,7 +22,7 @@ a.table_tools_button, .table_tools .dropdown_menu_button {
21
22
  }
22
23
 
23
24
  &:active {
24
- @include border-colors(#d7d7d7, #c8c8c8, #c3c3c3);
25
+ border-color: #d7d7d7 #c8c8c8 #c3c3c3 #c8c8c8;
25
26
  box-shadow: 0 1px 1px 0 rgba(0,0,0,0.17) inset;
26
27
  @include gradient(#FFFFFF, #E8E8E8);
27
28
  }
@@ -32,10 +33,9 @@ a.table_tools_button, .table_tools .dropdown_menu_button {
32
33
  list-style-type: none;
33
34
  padding: 0;
34
35
  margin: 0;
36
+ display: flex;
35
37
 
36
38
  li {
37
- float: left;
38
-
39
39
  a {
40
40
  border-width: 1px .5px 1px .5px;
41
41
  border-radius: 0;
@@ -1,3 +1,4 @@
1
+ @use "sass:color";
1
2
  //= depend_on_asset "active_admin/orderable.png"
2
3
  // ----------------------------------- Tables
3
4
 
@@ -40,7 +41,7 @@ table.index_table {
40
41
  &.sorted-desc a { background-position: 0 -56px;}
41
42
 
42
43
  &.sorted-asc, &.sorted-desc {
43
- @include gradient(darken($secondary-gradient-start, 5%), darken($secondary-gradient-stop, 5%));
44
+ @include gradient(color.adjust($secondary-gradient-start, $lightness: -5%), color.adjust($secondary-gradient-stop, $lightness: -5%));
44
45
  }
45
46
 
46
47
  &:last-child {
@@ -70,12 +71,12 @@ table.index_table {
70
71
  padding-top: 10px;
71
72
  background: none;
72
73
  color: $primary-color;
73
- @include no-shadow;
74
- @include text-shadow;
74
+ box-shadow: $shadow-none;
75
+ text-shadow: $text-shadow-light;
75
76
  text-transform: uppercase;
76
77
  border-bottom: 1px solid #ccc;
77
78
  }
78
- tr.odd td { background: darken($table-stripe-color, 3%); }
79
+ tr.odd td { background: color.adjust($table-stripe-color, $lightness: -3%); }
79
80
  tr.even td { background: $table-stripe-color; }
80
81
  }
81
82
 
@@ -84,21 +85,21 @@ table.index_table {
84
85
 
85
86
  .attributes_table table {
86
87
  col.even { background: $table-stripe-color; }
87
- col.odd { background: darken($table-stripe-color, 3%); }
88
+ col.odd { background: color.adjust($table-stripe-color, $lightness: -3%); }
88
89
  th, td {
89
90
  padding: 8px $cell-horizontal-padding 6px $cell-horizontal-padding;
90
91
  vertical-align: top;
91
92
  border-bottom: 1px solid #e8e8e8;
92
93
  }
93
94
  th {
94
- @include no-shadow;
95
+ box-shadow: $shadow-none;
95
96
  @include no-gradient;
96
97
  width: 150px;
97
98
  font-size: 0.9em;
98
99
  padding-left: 0;
99
100
  text-transform: uppercase;
100
101
  color: $primary-color;
101
- @include text-shadow;
102
+ text-shadow: $text-shadow-light;
102
103
  }
103
104
  td {
104
105
  .empty {
@@ -28,13 +28,16 @@
28
28
 
29
29
  a {
30
30
  @include light-button;
31
- @include gradient(#FFFFFF, #F0F0F0);
32
- @include border-colors(#d9d9d9, #d0d0d0, #c5c5c5);
33
- text-decoration: none;
34
- border-radius: 0;
35
- border-width: 1px .5px 1px .5px;
36
- margin-right: 0;
37
- padding: 4px 14px 4px;
31
+
32
+ & {
33
+ @include gradient(#FFFFFF, #F0F0F0);
34
+ border-color: #d9d9d9 #d0d0d0 #c5c5c5 #d0d0d0;
35
+ text-decoration: none;
36
+ border-radius: 0;
37
+ border-width: 1px .5px 1px .5px;
38
+ margin-right: 0;
39
+ padding: 4px 14px 4px;
40
+ }
38
41
 
39
42
  &:not(.disabled) {
40
43
  &:hover {
@@ -1,8 +1,4 @@
1
1
  @import "active_admin/mixins/variables";
2
2
  @import "active_admin/mixins/gradients";
3
- @import "active_admin/mixins/shadows";
4
- @import "active_admin/mixins/rounded";
5
3
  @import "active_admin/mixins/buttons";
6
4
  @import "active_admin/mixins/sections";
7
- @import "active_admin/mixins/utilities";
8
- @import "active_admin/mixins/typography";
@@ -1,9 +1,10 @@
1
+ @use "sass:color";
1
2
  @mixin basic-button {
2
- @include rounded(200px);
3
+ border-radius: 200px;
3
4
  display: inline-block;
4
5
  font-weight: bold;
5
6
  font-size: 1.0em;
6
- @include sans-family;
7
+ font-family: $font-family-sans;
7
8
  line-height: 12px;
8
9
  margin-right: 3px;
9
10
  padding: 7px 16px 6px;
@@ -17,44 +18,50 @@
17
18
  }
18
19
 
19
20
  @mixin default-button {
20
- @include basic-button;
21
- @include gradient(lighten($primary-color, 15%), darken($primary-color, 12%));
22
- @include text-shadow(#000);
21
+ background-color: color.adjust($primary-color, $lightness: 15%);
22
+ background-image: linear-gradient(180deg, color.adjust($primary-color, $lightness: 15%), color.adjust($primary-color, $lightness: -12%));
23
+ text-shadow: $text-shadow-dark;
23
24
  box-shadow: 0 1px 1px rgba(0,0,0,0.10), 0 1px 0 0px rgba(255,255,255, 0.2) inset;
24
25
  border: solid 1px #484e53;
25
- @include border-colors(#616a71, #484e53, #363b3f);
26
+ border-color: #616a71 #484e53 #363b3f #484e53;
26
27
  color: #efefef;
28
+ @include basic-button;
27
29
 
28
30
  &:not(.disabled) {
29
31
  &:hover{
30
- @include gradient(lighten($primary-color, 18%), darken($primary-color, 9%));
32
+ background-color: color.adjust($primary-color, $lightness: 18%);
33
+ background-image: linear-gradient(180deg, color.adjust($primary-color, $lightness: 18%), color.adjust($primary-color, $lightness: -9%));
31
34
  }
32
35
 
33
36
  &:active {
34
37
  box-shadow: 0 1px 3px rgba(0,0,0,0.40) inset, 0 1px 0 0px #FFF;
35
- @include gradient(lighten($primary-color, 8%), darken($primary-color, 17%));
38
+ background-color: color.adjust($primary-color, $lightness: 8%);
39
+ background-image: linear-gradient(180deg, color.adjust($primary-color, $lightness: 8%), color.adjust($primary-color, $lightness: -17%));
36
40
  }
37
41
  }
38
42
  }
39
43
 
40
44
  @mixin light-button {
41
- @include basic-button;
42
- @include gradient(#FFFFFF, #E7E7E7);
45
+ background-color: #FFFFFF;
46
+ background-image: linear-gradient(180deg, #FFFFFF, #E7E7E7);
43
47
  box-shadow: 0 1px 1px rgba(0,0,0,0.10), 0 1px 0 0 rgba(255,255,255, 0.8) inset;
44
48
  border: solid 1px #c7c7c7;
45
- @include border-colors(#d3d3d3, #c7c7c7, #c2c2c2);
46
- @include text-shadow;
49
+ border-color: #d3d3d3 #c7c7c7 #c2c2c2 #c7c7c7;
50
+ text-shadow: $text-shadow-light;
47
51
  color: $primary-color;
52
+ @include basic-button;
48
53
 
49
54
  &:not(.disabled) {
50
55
  &:hover {
51
- @include gradient(#FFFFFF, #F1F1F1);
56
+ background-color: #FFFFFF;
57
+ background-image: linear-gradient(180deg, #FFFFFF, #F1F1F1);
52
58
  }
53
59
 
54
60
  &:active {
55
61
  box-shadow: 0 1px 2px rgba(0,0,0,0.22) inset, 0 1px 0 0px #EEE;
56
- @include border-colors(#c2c2c2, #b9b9b9, #b7b7b7);
57
- @include gradient(#F3F3F3, #D8D8D8);
62
+ border-color: #c2c2c2 #b9b9b9 #b7b7b7 #b9b9b9;
63
+ background-color: #F3F3F3;
64
+ background-image: linear-gradient(180deg, #F3F3F3, #D8D8D8);
58
65
  }
59
66
  }
60
67
 
@@ -1,14 +1,15 @@
1
+ @use "sass:color";
1
2
  $secondary-gradient-start: #efefef !default;
2
3
  $secondary-gradient-stop: #dfe1e2 !default;
3
4
 
4
- @mixin gradient($start, $end){
5
+ @mixin gradient($start, $end, $direction: 180deg){
5
6
  background-color: $start;
6
- background-image: linear-gradient(180deg, $start, $end);
7
+ background-image: linear-gradient($direction, $start, $end);
7
8
  }
8
9
 
9
10
  @mixin primary-gradient {
10
- @include gradient(lighten($primary-color, 5%), darken($primary-color, 7%));
11
- border-bottom: 1px solid darken($primary-color, 11%);
11
+ @include gradient(color.adjust($primary-color, $lightness: 5%), color.adjust($primary-color, $lightness: -7%));
12
+ border-bottom: 1px solid color.adjust($primary-color, $lightness: -11%);
12
13
  }
13
14
 
14
15
  @mixin secondary-gradient {
@@ -24,5 +25,6 @@ $secondary-gradient-stop: #dfe1e2 !default;
24
25
  }
25
26
 
26
27
  @mixin no-gradient {
27
- background-color: none;
28
+ background: transparent;
29
+ background-image: none;
28
30
  }
@@ -1,8 +1,8 @@
1
1
  @mixin section-header {
2
2
  @include secondary-gradient;
3
- @include text-shadow;
3
+ text-shadow: $text-shadow-light;
4
4
  border: solid 1px #cdcdcd;
5
- @include border-colors(#e6e6e6, #d4d4d4, #cdcdcd);
5
+ border-color: #e6e6e6 #d4d4d4 #cdcdcd #d4d4d4;
6
6
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 0 1px #FFF inset;
7
7
 
8
8
  font-size: 1em;
@@ -16,8 +16,8 @@
16
16
 
17
17
  @mixin section-background {
18
18
  background: #f4f4f4;
19
- @include rounded(4px);
20
- @include inset-shadow(0,1px,4px, #ddd);
19
+ border-radius: 4px;
20
+ box-shadow: $shadow-inset;
21
21
  }
22
22
 
23
23
  @mixin section {
@@ -1,4 +1,5 @@
1
1
  // Variables used throughout Active Admin.
2
+ @use "sass:color";
2
3
  // They can be overridden by prepending your own
3
4
  // to 'app/assets/stylesheets/active_admin.scss'.
4
5
 
@@ -9,10 +10,20 @@ $secondary-color: #f0f0f0 !default;
9
10
  $text-color: #323537 !default;
10
11
  $link-color: #38678b !default;
11
12
  $section-header-text-color: $primary-color !default;
12
- $current-menu-item-background: lighten($primary-color, 12%) !default;
13
- $hover-menu-item-background: lighten($primary-color, 12%) !default;
14
- $table-stripe-color: lighten($primary-color, 57%) !default;
13
+ $current-menu-item-background: color.adjust($primary-color, $lightness: 12%) !default;
14
+ $hover-menu-item-background: color.adjust($primary-color, $lightness: 12%) !default;
15
+ $table-stripe-color: color.adjust($primary-color, $lightness: 57%) !default;
15
16
  $table-selected-color: #d9e4ec !default;
17
+ $shadow-sm: 0 1px 1px rgba(0, 0, 0, 0.1) !default;
18
+ $shadow-md: 0 1px 2px rgba(0, 0, 0, 0.37) !default;
19
+ $shadow-lg: 0 1px 6px rgba(0, 0, 0, 0.26) !default;
20
+ $shadow-inset: inset 0 1px 4px #ddd !default;
21
+ $shadow-none: none !default;
22
+ $text-shadow-light: 0 1px 0 rgba(255, 255, 255, 0.9) !default;
23
+ $text-shadow-dark: 0 1px 0 rgba(0, 0, 0, 0.6) !default;
24
+
25
+ $font-family-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif !default;
26
+
16
27
  $error-color: #932419 !default;
17
28
  $blank-slate-primary-color: #AAA !default;
18
29
  $breadcrumbs-color: #8a949e !default;
@@ -5,7 +5,7 @@ body.logged_out {
5
5
  width: 500px;
6
6
  margin: 70px auto;
7
7
  #active_admin_content {
8
- @include shadow;
8
+ box-shadow: $shadow-md;
9
9
  background: #fff;
10
10
  padding: 13px 30px;
11
11
  }
@@ -14,7 +14,7 @@ body.logged_out {
14
14
  h2 {
15
15
  @include section-header;
16
16
  @include primary-gradient;
17
- @include text-shadow(#000);
17
+ text-shadow: $text-shadow-dark;
18
18
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
19
19
  border: none;
20
20
  color: #fff;
@@ -22,23 +22,27 @@ body.logged_out {
22
22
  }
23
23
 
24
24
  #login {
25
- /* Login Form */
25
+ display: flex;
26
+ flex-direction: column;
26
27
  form {
27
28
  fieldset {
28
- @include no-shadow;
29
+ box-shadow: $shadow-none;
29
30
  background: none;
30
31
  padding: 0;
32
+ margin-bottom: 0;
31
33
  li { padding: 10px 0; }
32
34
 
33
35
  input[type=text], input[type=email], input[type=password] {
34
36
  width: 70%;
35
37
  }
36
38
  &.buttons { margin-left: 20%; }
37
- margin-bottom: 0;
38
39
  }
39
40
  }
40
41
 
41
- a { float: right; margin-top: -32px; }
42
+ a {
43
+ align-self: flex-end;
44
+ margin-top: -32px;
45
+ }
42
46
  }
43
47
 
44
48
  }
@@ -9,6 +9,13 @@
9
9
  }
10
10
 
11
11
  // -------------------------------------- Index Footer (Under Table)
12
- #index_footer { padding-top: 5px; text-align: right; font-size: 0.85em; }
12
+ #index_footer {
13
+ padding-top: 5px;
14
+ font-size: 0.85em;
15
+ display: flex;
16
+ flex-wrap: wrap;
17
+ align-items: center;
18
+ gap: 8px;
19
+ }
13
20
 
14
21
  .index_content { clear: both; }