active_material 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +22 -0
  3. data/README.md +60 -0
  4. data/app/assets/images/active_material/icons/account_circle.svg +9 -0
  5. data/app/assets/images/active_material/icons/arrow-dropdown.svg +7 -0
  6. data/app/assets/images/active_material/icons/arrow_down.svg +7 -0
  7. data/app/assets/images/active_material/icons/clear.svg +8 -0
  8. data/app/assets/images/active_material/icons/create.svg +8 -0
  9. data/app/assets/images/active_material/icons/email.svg +8 -0
  10. data/app/assets/images/active_material/icons/event.svg +8 -0
  11. data/app/assets/images/active_material/icons/more.svg +9 -0
  12. data/app/assets/images/active_material/icons/reorder.svg +4 -0
  13. data/app/assets/images/active_material/icons/search.svg +9 -0
  14. data/app/assets/images/active_material/icons/secret.svg +8 -0
  15. data/app/assets/javascripts/active_material/fonts.js +21 -0
  16. data/app/assets/javascripts/active_material.js +1 -0
  17. data/app/assets/stylesheets/active_material/atoms/clearfix.scss +14 -0
  18. data/app/assets/stylesheets/active_material/atoms/color.scss +5 -0
  19. data/app/assets/stylesheets/active_material/atoms/family.scss +5 -0
  20. data/app/assets/stylesheets/active_material/atoms/fill.scss +5 -0
  21. data/app/assets/stylesheets/active_material/atoms/hidden.scss +5 -0
  22. data/app/assets/stylesheets/active_material/atoms/links.scss +23 -0
  23. data/app/assets/stylesheets/active_material/atoms/lists.scss +13 -0
  24. data/app/assets/stylesheets/active_material/atoms/paper.scss +7 -0
  25. data/app/assets/stylesheets/active_material/atoms/type.scss +54 -0
  26. data/app/assets/stylesheets/active_material/components/avatar.scss +3 -0
  27. data/app/assets/stylesheets/active_material/components/blank_slate.scss +26 -0
  28. data/app/assets/stylesheets/active_material/components/breadcrumbs.scss +11 -0
  29. data/app/assets/stylesheets/active_material/components/buttons.scss +20 -0
  30. data/app/assets/stylesheets/active_material/components/checkbox.scss +21 -0
  31. data/app/assets/stylesheets/active_material/components/clearfix.scss +3 -0
  32. data/app/assets/stylesheets/active_material/components/date-select.scss +31 -0
  33. data/app/assets/stylesheets/active_material/components/datepicker.scss +58 -0
  34. data/app/assets/stylesheets/active_material/components/dialog.scss +37 -0
  35. data/app/assets/stylesheets/active_material/components/dropdown.scss +33 -0
  36. data/app/assets/stylesheets/active_material/components/featured-blocks.scss +12 -0
  37. data/app/assets/stylesheets/active_material/components/filter.scss +61 -0
  38. data/app/assets/stylesheets/active_material/components/flash.scss +13 -0
  39. data/app/assets/stylesheets/active_material/components/footer.scss +4 -0
  40. data/app/assets/stylesheets/active_material/components/forms.scss +92 -0
  41. data/app/assets/stylesheets/active_material/components/header.scss +64 -0
  42. data/app/assets/stylesheets/active_material/components/hidden.scss +3 -0
  43. data/app/assets/stylesheets/active_material/components/login.scss +53 -0
  44. data/app/assets/stylesheets/active_material/components/overlay.scss +8 -0
  45. data/app/assets/stylesheets/active_material/components/pagination.scss +43 -0
  46. data/app/assets/stylesheets/active_material/components/panels.scss +38 -0
  47. data/app/assets/stylesheets/active_material/components/photo_select.scss +7 -0
  48. data/app/assets/stylesheets/active_material/components/scopes.scss +29 -0
  49. data/app/assets/stylesheets/active_material/components/select.scss +20 -0
  50. data/app/assets/stylesheets/active_material/components/sortable.scss +36 -0
  51. data/app/assets/stylesheets/active_material/components/structure.scss +30 -0
  52. data/app/assets/stylesheets/active_material/components/tables.scss +85 -0
  53. data/app/assets/stylesheets/active_material/components/tabs.scss +25 -0
  54. data/app/assets/stylesheets/active_material/components/tag.scss +23 -0
  55. data/app/assets/stylesheets/active_material/components/title_bar.scss +21 -0
  56. data/app/assets/stylesheets/active_material/components/utility_nav.scss +84 -0
  57. data/app/assets/stylesheets/active_material/generators/functions.scss +102 -0
  58. data/app/assets/stylesheets/active_material/generators/mixins.scss +24 -0
  59. data/app/assets/stylesheets/active_material/global/foundation.scss +107 -0
  60. data/app/assets/stylesheets/active_material/prototypes/actions-footer.scss +8 -0
  61. data/app/assets/stylesheets/active_material/prototypes/avatar.scss +19 -0
  62. data/app/assets/stylesheets/active_material/prototypes/btn-icon.scss +14 -0
  63. data/app/assets/stylesheets/active_material/prototypes/button.scss +58 -0
  64. data/app/assets/stylesheets/active_material/prototypes/datepicker.scss +107 -0
  65. data/app/assets/stylesheets/active_material/prototypes/dialog.scss +54 -0
  66. data/app/assets/stylesheets/active_material/prototypes/menu.scss +118 -0
  67. data/app/assets/stylesheets/active_material/prototypes/multiselect.scss +20 -0
  68. data/app/assets/stylesheets/active_material/prototypes/select.scss +42 -0
  69. data/app/assets/stylesheets/active_material/prototypes/snackbar.scss +47 -0
  70. data/app/assets/stylesheets/active_material/prototypes/subheader.scss +13 -0
  71. data/app/assets/stylesheets/active_material/prototypes/table.scss +116 -0
  72. data/app/assets/stylesheets/active_material/prototypes/tabs.scss +109 -0
  73. data/app/assets/stylesheets/active_material/prototypes/tag.scss +36 -0
  74. data/app/assets/stylesheets/active_material/prototypes/textfield.scss +137 -0
  75. data/app/assets/stylesheets/active_material/prototypes/toolbar.scss +70 -0
  76. data/app/assets/stylesheets/active_material/prototypes/underlay.scss +16 -0
  77. data/app/assets/stylesheets/active_material/values/breakpoints.scss +3 -0
  78. data/app/assets/stylesheets/active_material/values/colors.scss +104 -0
  79. data/app/assets/stylesheets/active_material/values/elevation.scss +8 -0
  80. data/app/assets/stylesheets/active_material/values/fonts.scss +10 -0
  81. data/app/assets/stylesheets/active_material/values/units.scss +8 -0
  82. data/app/assets/stylesheets/active_material.scss +36 -0
  83. data/lib/active_material/version.rb +3 -0
  84. data/lib/active_material.rb +8 -0
  85. metadata +156 -0
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Filters
3
+ * Filters show up as sidebars on most index pages
4
+ */
5
+
6
+ .filter_form_field,
7
+ .select_and_search,
8
+ .filter_date_range {
9
+ @include am-textfield;
10
+ @include am-textfield-inline;
11
+
12
+ label {
13
+ @include am-textfield-label;
14
+ @include am-textfield-label-inline;
15
+ }
16
+
17
+ > select:not([multiple]) {
18
+ @include am-select-input;
19
+ border-bottom-right-radius: 0;
20
+ border-top-right-radius: 0;
21
+ flex-basis: 100px;
22
+ }
23
+
24
+ > select[multiple] {
25
+ flex-basis: 100%;
26
+ }
27
+
28
+ > select {
29
+ &:last-child {
30
+ border-bottom-right-radius: 3px;
31
+ border-top-right-radius: 3px;
32
+ }
33
+
34
+ + input[type="text"],
35
+ + input[type="number"] {
36
+ border-bottom-left-radius: 0;
37
+ border-top-left-radius: 0;
38
+ border-left: 0;
39
+ }
40
+ }
41
+
42
+ > input.datepicker {
43
+ @include am-textfield-input;
44
+ @include am-textfield-input-inline;
45
+ @include am-textfield-input-date;
46
+ border-bottom-right-radius: 0;
47
+ border-top-right-radius: 0;
48
+ }
49
+
50
+ > input[type="submit"] {
51
+ border-bottom-left-radius: 0;
52
+ border-top-left-radius: 0;
53
+ margin: 0;
54
+ }
55
+ }
56
+
57
+ .filter_string input,
58
+ .filter_numeric input {
59
+ @include am-textfield-input;
60
+ @include am-textfield-input-inline;
61
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Flash
3
+ * Notifications that appear whenever a CRUD action or error
4
+ * has surfaced
5
+ */
6
+
7
+ .flash {
8
+ @include am-snackbar;
9
+
10
+ &.flash_alert {
11
+ @include am-snackbar-error;
12
+ }
13
+ }
@@ -0,0 +1,4 @@
1
+ .footer {
2
+ padding: am-unit(2);
3
+ text-align: center;
4
+ }
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Forms
3
+ */
4
+
5
+ fieldset.inputs {
6
+ margin-bottom: am-unit(2);
7
+
8
+ > ol {
9
+ @include am-list-blank;
10
+ }
11
+
12
+ > legend {
13
+ @include am-subheader;
14
+ border: 0;
15
+ }
16
+ }
17
+
18
+ .input {
19
+ @include am-textfield;
20
+
21
+ > label,
22
+ .label > label {
23
+ @include am-textfield-label;
24
+ }
25
+
26
+ &.string input,
27
+ &.stringish input,
28
+ &.numberic input {
29
+ @include am-textfield-input;
30
+ }
31
+
32
+ &.email input {
33
+ @include am-textfield-input-email;
34
+ }
35
+
36
+ &.password input {
37
+ @include am-textfield-input-password;
38
+ }
39
+
40
+ &.datepicker input {
41
+ @include am-textfield-input-date;
42
+ }
43
+
44
+ &.text textarea {
45
+ @include am-textfield-input;
46
+ @include am-textfield-textarea;
47
+ }
48
+
49
+ select + input {
50
+ margin-top: am-unit(2);
51
+ }
52
+
53
+ }
54
+
55
+ .field_with_errors input {
56
+ @include am-textfield-input-error;
57
+ }
58
+
59
+ .inline-hints {
60
+ @include am-textfield-hint;
61
+ }
62
+
63
+ .inline-errors {
64
+ @include am-textfield-hint;
65
+ @include am-textfield-hint-error;
66
+
67
+ + .inline-hints {
68
+ display: none;
69
+ }
70
+ }
71
+
72
+ abbr[title="required"] {
73
+ @include am-textfield-required;
74
+ }
75
+
76
+ fieldset.actions,
77
+ .buttons {
78
+ @include am-actions-footer;
79
+
80
+ > ol {
81
+ @include am-list-blank;
82
+ @include am-list-inline;
83
+ }
84
+
85
+ .cancel a {
86
+ @include am-btn-raised;
87
+ }
88
+
89
+ .cancel a {
90
+ @include am-btn;
91
+ }
92
+ }
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Header
3
+ * Encapsulates several elements related to navigation at
4
+ * the top of the page.
5
+ */
6
+
7
+ .header {
8
+ @include am-toolbar;
9
+ @include am-toolbar-primary;
10
+ padding-right: am-unit(8);
11
+ }
12
+
13
+ .site_title {
14
+ @include am-toolbar-title;
15
+ @include am-color(text-light);
16
+ text-shadow: 0 1px 2px rgba(#000, 0.15);
17
+ }
18
+
19
+ #tabs {
20
+ flex-grow: 1;
21
+ }
22
+
23
+ .header-item {
24
+ @include am-toolbar-list;
25
+ }
26
+
27
+ .header-item > li {
28
+ @include am-toolbar-item;
29
+
30
+ > a {
31
+ @include am-toolbar-item-primary;
32
+ text-shadow: 0 1px 2px rgba(black, 0.15);
33
+ }
34
+
35
+ &.current > a {
36
+ @include am-toolbar-item-primary-active;
37
+ }
38
+ }
39
+
40
+ .has_nested {
41
+ @include am-menu;
42
+
43
+ ul {
44
+ @include am-menu-list;
45
+
46
+ li {
47
+ @include am-menu-item;
48
+ }
49
+
50
+ li a {
51
+ @include am-menu-link;
52
+ }
53
+ }
54
+
55
+ &:hover ul,
56
+ &:focus ul {
57
+ @include am-menu-list-open;
58
+
59
+ li a {
60
+ @include am-menu-item-open
61
+ }
62
+ }
63
+
64
+ }
@@ -0,0 +1,3 @@
1
+ .hidden {
2
+ @include am-hidden;
3
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Login
3
+ * This screen appears if no session is active
4
+ */
5
+
6
+ #login {
7
+ @include am-dialog;
8
+ margin: am-unit(-4) auto 0;
9
+ max-width: am-unit(50);
10
+
11
+ h2 {
12
+ @include am-hidden;
13
+ }
14
+
15
+ // This is the "forgot password" button
16
+ > a {
17
+ @include am-actions-footer;
18
+ border-bottom-left-radius: 3px;
19
+ border-bottom-right-radius: 3px;
20
+ }
21
+
22
+ // Annoying br included for whatever reason
23
+ > br {
24
+ display: none;
25
+ }
26
+
27
+ .inputs {
28
+ margin-bottom: 0;
29
+ }
30
+
31
+ // Override actions, in this case the border and shadow are
32
+ // not applicable
33
+ .actions {
34
+ background: transparent;
35
+ box-shadow: none;
36
+ padding-top: 0;
37
+ box-shadow: none;
38
+
39
+ .action,
40
+ input[type='submit'] {
41
+ margin: 0;
42
+ width: 100%;
43
+ }
44
+ }
45
+ }
46
+
47
+ body.logged_out {
48
+ @include am-fill(primary-700);
49
+ background-size: cover;
50
+ display: flex;
51
+ flex-direction: column;
52
+ justify-content: center;
53
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Overlay
3
+ * Overlays appear below modal content that takes up the entire screen.
4
+ */
5
+
6
+ .ui-widget-overlay {
7
+ @include am-underlay;
8
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Pagination
3
+ * Typically appears on index pages, below tables
4
+ */
5
+
6
+ .paginated_collection {
7
+ @include am-clearfix;
8
+ clear: both;
9
+
10
+ .pagination_information,
11
+ .download_links {
12
+ @include am-type-caption;
13
+ padding: am-unit(2);
14
+ }
15
+
16
+ .pagination_information {
17
+ float: left;
18
+ }
19
+
20
+ .download_links {
21
+ line-height: am-unit(3);
22
+ float: right;
23
+ text-align: right;
24
+ }
25
+ }
26
+
27
+
28
+ .pagination {
29
+ background: #fff;
30
+ border-bottom: 1px solid #efefef;
31
+ display: flex;
32
+ justify-content: flex-end;
33
+ padding: 0 am-unit(2);
34
+
35
+ .page,
36
+ .first,
37
+ .prev,
38
+ .next,
39
+ .last {
40
+ @include am-btn;
41
+ min-width: am-unit(3);
42
+ }
43
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Panels
3
+ * Stand-alone segments of content, in Material Design
4
+ * these could be considered Cards or pieces of paper.
5
+ */
6
+
7
+ .panel,
8
+ .has_many_container,
9
+ body.index #main_content,
10
+ body.edit #main_content > form,
11
+ body.new #main_content > form,
12
+ body.create #main_content > form,
13
+ body.update #main_content > form {
14
+ @include am-paper;
15
+
16
+ > h3 {
17
+ @include am-subheader;
18
+ }
19
+
20
+ .header_action {
21
+ float: right
22
+ }
23
+
24
+ .row th {
25
+ width: 20%;
26
+ padding-left: am-unit(2);
27
+ }
28
+ }
29
+
30
+ .panel {
31
+ & + & {
32
+ margin-top: 16px;
33
+ }
34
+ }
35
+
36
+ .panel_well {
37
+ padding: 0 am-unit(2) am-unit(2);
38
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * PhotoSelects
3
+ */
4
+
5
+ .photo_select {
6
+ display: inline-block;
7
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Scopes
3
+ * Theses appear above tables, providing the ability to filter rows
4
+ */
5
+
6
+ .scopes {
7
+ @include am-list-blank;
8
+ @include am-list-inline;
9
+ flex-grow: 1;
10
+ text-align: right;
11
+ }
12
+
13
+ .scope {
14
+ font-size: 13px;
15
+ font-weight: 500;
16
+ margin-left: am-unit(2);
17
+
18
+ a {
19
+ @include am-link(secondary-text);
20
+ }
21
+
22
+ &.selected {
23
+ font-weight: bold;
24
+
25
+ a {
26
+ @include am-fill(primary);
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Basic Selects
3
+ */
4
+
5
+ .select,
6
+ .polymorphic_select {
7
+
8
+ select:not([multiple]) {
9
+ @include am-select-input;
10
+ }
11
+
12
+ }
13
+
14
+ select[multiple] {
15
+ @include am-multiselect;
16
+
17
+ option {
18
+ @include am-multiselect-option;
19
+ }
20
+ }
@@ -0,0 +1,36 @@
1
+ ////
2
+ /// Sortable
3
+ /// Generic styles for sortable elements. Leans on
4
+ /// jQuery UI for the bulk of work
5
+ /// @group sortable
6
+ ////
7
+
8
+ /// The icon displayed within a sortable element's drag handle
9
+ $am-sortable-icon: asset-url("active_material/icons/reorder.svg") !default;
10
+ // The size of the draggable handle
11
+ $am-sortable-handle-size: am-unit(7);
12
+
13
+ .ui-sortable {
14
+
15
+ .reorder-handle-col {
16
+ padding: 0 0 0 am-unit(1);
17
+ width: $am-sortable-handle-size;
18
+ }
19
+
20
+ .reorder-handle {
21
+ background: transparent $am-sortable-icon 50% 50% no-repeat;
22
+ color: transparent;
23
+ cursor: move;
24
+ display: block;
25
+ height: $am-sortable-handle-size;
26
+ margin: 0 auto;
27
+ opacity: 0.40;
28
+ transition: 0.2s all;
29
+ width: $am-sortable-handle-size;
30
+
31
+ &:hover {
32
+ opacity: 1;
33
+ }
34
+ }
35
+
36
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Structure
3
+ * Global structural elements
4
+ */
5
+
6
+ body {
7
+ @include am-fill(backdrop);
8
+ }
9
+
10
+ #active_admin_content {
11
+ padding: am-unit(3);
12
+ }
13
+
14
+ #sidebar {
15
+ margin-left: am-unit(3);
16
+ }
17
+
18
+ .with_sidebar {
19
+ display: flex;
20
+ width: 100%;
21
+
22
+ #main_content_wrapper {
23
+ flex-grow: 1;
24
+ }
25
+
26
+ #sidebar {
27
+ max-width: am-unit(40);
28
+ width: 100%;
29
+ }
30
+ }
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Tables
3
+ */
4
+
5
+ .table_tools {
6
+ @include am-table-header;
7
+ }
8
+
9
+ .index_table,
10
+ .panel_contents table {
11
+ @include am-table;
12
+
13
+ th {
14
+ @include am-table-column-heading;
15
+
16
+ a {
17
+ @include am-table-sort;
18
+ }
19
+
20
+ &.sorted-asc a {
21
+ @include am-table-sort-asc;
22
+ }
23
+
24
+ &.sorted-desc a {
25
+ @include am-table-sort-desc;
26
+ }
27
+ }
28
+
29
+ tr {
30
+ @include am-table-row;
31
+ }
32
+
33
+ tbody tr {
34
+ &:hover {
35
+ @include am-table-row-hover;
36
+ }
37
+
38
+ &.selected {
39
+ @include am-table-row-selected;
40
+ }
41
+ }
42
+
43
+ td {
44
+ @include am-table-cell;
45
+
46
+ }
47
+
48
+ .col-selectable {
49
+ @include am-table-cell-selectable;
50
+
51
+ // ActiveAdmin wraps checkboxes in a div. This rule prevents
52
+ // that div from messing up vertical alignment
53
+ .resource_selection_cell {
54
+ display: inline;
55
+ }
56
+ }
57
+
58
+ td.col-actions {
59
+ @include am-table-cell-actions;
60
+
61
+ .table_actions {
62
+ @include am-menu-list;
63
+ @include am-menu-list-right;
64
+ top: 50%;
65
+ margin-top: am-unit(-2);
66
+ margin-right: am-unit(2);
67
+
68
+ a {
69
+ @include am-menu-link;
70
+ }
71
+ }
72
+
73
+ &:hover,
74
+ &:focus {
75
+ .table_actions {
76
+ @include am-menu-list-open;
77
+
78
+ a {
79
+ @include am-menu-item-open;
80
+ }
81
+ }
82
+ }
83
+
84
+ }
85
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Tabs
3
+ * Theses show up on complicated forms, such as the Exhibit edit page.
4
+ */
5
+
6
+ .nav-tabs {
7
+ @include am-tabs;
8
+ @include am-tabs-list;
9
+
10
+ > li {
11
+ @include am-tabs-list-item;
12
+ }
13
+
14
+ > li > a {
15
+ @include am-tabs-btn;
16
+ }
17
+
18
+ > li.ui-state-active > a {
19
+ @include am-tabs-btn-active;
20
+ }
21
+
22
+ > li.tab_with_errors > a {
23
+ @include am-tabs-btn-error;
24
+ }
25
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Tags
3
+ * Tags show up as states within tables and other components
4
+ */
5
+
6
+ .status_tag {
7
+ @include am-tag;
8
+
9
+ a & {
10
+ @include am-tag-pressable;
11
+ }
12
+
13
+ &.yes {
14
+ @include am-tag-success;
15
+ }
16
+ }
17
+
18
+ .empty {
19
+ color: #ccc;
20
+ font-size: 0.9em;
21
+ letter-spacing: 2px;
22
+ text-transform: uppercase;
23
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Titlebar
3
+ */
4
+
5
+ .title_bar {
6
+ @include am-toolbar-title;
7
+ @include am-fill(white);
8
+ box-shadow: 0 1px 2px rgba(#000, 0.24);
9
+ align-items: center;
10
+ display: flex;
11
+ position: relative;
12
+ z-index: 1;
13
+ }
14
+
15
+ #titlebar_left {
16
+ flex-grow: 1;
17
+ }
18
+
19
+ #titlebar_right .action_item a {
20
+ @include am-btn;
21
+ }