active_material 1.4.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 (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,84 @@
1
+ /**
2
+ * Utility Nav
3
+ * Displays current user and logout information
4
+ */
5
+
6
+ #utility_nav {
7
+ background: asset-url("active_material/icons/account_circle.svg") no-repeat;
8
+ background-size: am-unit(5);
9
+ width: am-unit(5);
10
+ height: am-unit(5);
11
+ margin-top: am-unit(-2.5);
12
+ position: absolute;
13
+ z-index: 2;
14
+ top: 50%;
15
+ right: am-unit(2);
16
+
17
+ // Increase the hit region
18
+ &:before {
19
+ content: "";
20
+ position: absolute;
21
+ width: 90px;
22
+ height: 50px;
23
+ top: 0;
24
+ right: -12px;
25
+ }
26
+
27
+ a {
28
+ color: #333;
29
+ }
30
+
31
+ #current_user,
32
+ #logout {
33
+ clip: rect(0, 0, 0, 0);
34
+ opacity: 0;
35
+ transition: 0.28s all;
36
+ }
37
+
38
+ &:hover {
39
+ #current_user,
40
+ #logout {
41
+ clip: initial;
42
+ opacity: 1;
43
+ }
44
+ }
45
+ }
46
+
47
+ #current_user {
48
+ box-shadow: 0 1px 2px rgba(#000, 0.22);
49
+ background: #fff;
50
+ border-top-right-radius: 2px;
51
+ border-top-left-radius: 2px;
52
+ padding: 16px;
53
+ height: 56px;
54
+ width: 200px;
55
+ position: absolute;
56
+ right: 0;
57
+ top: 48px;
58
+
59
+ &:before {
60
+ content: "";
61
+ border: 7px solid transparent;
62
+ border-bottom-color: #fff;
63
+ top: -14px;
64
+ right: 12px;
65
+ position: absolute;
66
+ }
67
+ }
68
+
69
+ #logout {
70
+ border-top: 1px solid #d9d9d9;
71
+ box-shadow: 0 1px 2px rgba(#000, 0.22);
72
+ position: absolute;
73
+ width: 200px;
74
+ right: 0;
75
+ top: 104px;
76
+ border-bottom-left-radius: 2px;
77
+ border-bottom-right-radius: 2px;
78
+ background: #efefef;
79
+ text-align: right;
80
+
81
+ a {
82
+ @include am-btn;
83
+ }
84
+ }
@@ -0,0 +1,102 @@
1
+ /// Emulates letter tracking in Adobe Photoshop, which is used for
2
+ /// adjusting the space between letters in text.
3
+ ///
4
+ /// Follows the guidance of https://scotch.io/quick-tips/converting-photoshop-letter-spacing-to-css.
5
+ ///
6
+ /// @param {number} $amount - An integer value, such as 100
7
+ /// @return {number} The amount of letter-spacing in ems.
8
+ @function am-tracking($amount) {
9
+ @return ($amount / 1000) + 0em;
10
+ }
11
+
12
+
13
+ /// Removes units (px, em, etc...) from a given number.
14
+ ///
15
+ /// @param {number} $number - The numeric value to strip units from.
16
+ /// @return {number} A unitless number value.
17
+ @function am-strip-units($number) {
18
+ @return $number / ($number * 0 + 1);
19
+ }
20
+
21
+
22
+ /// Calculates "scalable pixel" values. This is implemented using rems.
23
+ /// Within material design, scalable pixel values are those that respect
24
+ /// the user's font settings.
25
+ ///
26
+ /// According to the [Google Material Design Specification](https://www.google.com/design/spec/layout/units-measurements.html#units-measurements-scaleable-pixels-sp-):
27
+ /// > "Users who have larger text settings for accessibility will see
28
+ /// > the font size matched to their text size preferences."
29
+ ///
30
+ /// @param {number} $value - A pixel value to be converted into rems.
31
+ /// @param {number} $baseline [16] - The assumed base font size.
32
+ /// @return {number} Scalable pixel value in rems.
33
+ @function am-sp($value, $baseline:16) {
34
+ @return (am-strip-units($value) / $baseline) + rem;
35
+ }
36
+
37
+
38
+ /// Calculates measurements along the base unit grid defined under $am-unit-base. This provides
39
+ /// an easy way to align elements upon a baseline mesh grid.
40
+ ///
41
+ /// @param {number} $step - The scale of units
42
+ /// @return {number} A pixel value representing the number of units along the mesh grid.
43
+ @function am-unit($step:1) {
44
+ @return $am-unit-base * $step;
45
+ }
46
+
47
+
48
+ /// Calculates measurements along the base type grid defined under $am-unit-base. This provides
49
+ /// an easy way to align elements upon a baseline typographic mesh grid.
50
+ ///
51
+ /// @param {number} $step - The scale of units
52
+ /// @return {number} A pixel value representing the number of units along the typographic mesh grid.
53
+ @function am-type-unit($step:1) {
54
+ @return $am-unit-type * $step;
55
+ }
56
+
57
+
58
+ /// Extracts a color out of the $am-color map. Throws an error if that key is not defined.
59
+ ///
60
+ /// @param {any} $key - The desired key in $am-colors.
61
+ /// @return {color} A color value from $am-colors.
62
+ @function am-color ($key) {
63
+ @if map-has-key($am-colors, $key) {
64
+ @return map-get($am-colors, $key);
65
+ }
66
+
67
+ @error "Unknown color value '#{$key}'";
68
+ @return null;
69
+ }
70
+
71
+
72
+ /// Extracts a color out of the $am-color map and lightens it using the built-in Sass function.
73
+ ///
74
+ /// @param {any} $key - The desired key in $am-colors.
75
+ /// @param {number} $amount - The degree of lightness.
76
+ /// @return {color} A lightened color value from $am-colors.
77
+ @function am-lighten ($color, $amount) {
78
+ @return lighten(am-color($color), $amount);
79
+ }
80
+
81
+
82
+ /// Extracts a color out of the $am-color map and darkens it using the built-in Sass function.
83
+ ///
84
+ /// @param {any} $key - The desired key in $am-colors.
85
+ /// @param {number} $amount - The degree of darkness.
86
+ /// @return {color} A darkened color value from $am-colors.
87
+ @function am-darken ($color, $amount) {
88
+ @return darken(am-color($color), $amount);
89
+ }
90
+
91
+ /// Extracts a font family out of the $am-fonts map. Throws an error if that key is not defined.
92
+ ///
93
+ /// @param {any} $key - The desired key in $am-colors.
94
+ /// @return {font} A font family from $am-colors.
95
+ @function am-font-family ($key) {
96
+ @if map-has-key($am-fonts, $key) {
97
+ @return map-get($am-fonts, $key);
98
+ }
99
+
100
+ @error "Unknown font value '#{$key}'";
101
+ @return null;
102
+ }
@@ -0,0 +1,24 @@
1
+ /// Standard logic for management of breakpoints
2
+ @mixin am-min-breakpoint($breakpoint) {
3
+ @media screen and (min-width: $breakpoint) {
4
+ @content;
5
+ }
6
+ }
7
+
8
+ /// Assign a given font size in rems, falling back to pixel values
9
+ /// in older browsers.
10
+ /// @param {number} $size - Font size in pixels
11
+ @mixin am-font-size($size) {
12
+ font-size: am-strip-units($size) + 0px;
13
+ font-size: am-sp($size);
14
+ }
15
+
16
+ /// When using the Webfont.js font loader, only show the loaded font-family
17
+ /// when the loader indicates it is active (via the .wf-active) class.
18
+ @mixin am-web-font($family, $fallback: sans-serif) {
19
+ font-family: $fallback;
20
+
21
+ .wf-active & {
22
+ @include am-font-family($family);
23
+ }
24
+ }
@@ -0,0 +1,107 @@
1
+ html {
2
+ box-sizing: border-box;
3
+ }
4
+
5
+ *,
6
+ *:before,
7
+ *:after {
8
+ box-sizing: inherit;
9
+ }
10
+
11
+ ::selection {
12
+ @include am-fill(accent);
13
+ @include am-color(text-light);
14
+ }
15
+
16
+ html,
17
+ body {
18
+ height: 100%;
19
+ }
20
+
21
+ body {
22
+ @include am-type-body-1;
23
+ @include am-color(text);
24
+ @include am-web-font(sans);
25
+ margin: 0;
26
+ }
27
+
28
+ img {
29
+ max-width: 100%;
30
+ }
31
+
32
+ b,
33
+ strong {
34
+ @include am-type-body-2;
35
+ }
36
+
37
+ h1,
38
+ h2,
39
+ h3,
40
+ h4,
41
+ h5,
42
+ h6 {
43
+ font: inherit;
44
+ margin: 0;
45
+ }
46
+
47
+ p {
48
+ margin: am-type-unit(3) 0;
49
+ }
50
+
51
+ button,
52
+ input {
53
+ @include am-font-family(sans);
54
+ }
55
+
56
+ button::-moz-focus-inner {
57
+ padding: 0;
58
+ border: 0
59
+ }
60
+
61
+ a {
62
+ color: inherit;
63
+ text-decoration: none;
64
+ transition: 0.3s color;
65
+
66
+ &:link,
67
+ &:visited {
68
+ @include am-color(primary);
69
+
70
+ &:hover {
71
+ text-decoration: underline;
72
+ }
73
+ }
74
+
75
+ &:hover,
76
+ &:focus {
77
+ @include am-color(accent-hover);
78
+ transition: 0.1s color;
79
+ }
80
+
81
+ &:active {
82
+ @include am-color(accent-active);
83
+ transition: 0.1s color;
84
+ }
85
+ }
86
+
87
+ blockquote {
88
+ border-left: 4px solid am-color(hint);
89
+ margin: am-type-unit(4) 0;
90
+ padding: am-type-unit(4);
91
+ }
92
+
93
+ hr {
94
+ border: 0;
95
+ border-bottom: 1px solid am-color(divider);
96
+ margin: am-unit(4) 0
97
+ }
98
+
99
+ fieldset {
100
+ border: 0;
101
+ margin: 0;
102
+ padding: 0;
103
+ }
104
+
105
+ hr {
106
+ margin: 0;
107
+ }
@@ -0,0 +1,8 @@
1
+ @mixin am-actions-footer {
2
+ background: #fefefe;
3
+ border-bottom-left-radius: 2px;
4
+ border-bottom-right-radius: 2px;
5
+ box-shadow: inset 0 1px 1px rgba(#000, 0.2);
6
+ display: block;
7
+ padding: am-unit(2);
8
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Avatar
3
+ * A circular image
4
+ */
5
+
6
+ @import '../values/colors';
7
+
8
+ $am-avatar-background: am-color(icon) !default;
9
+ $am-avatar-box-shadow: 0 1px 2px rgba(#000, 0.2) !default;
10
+ $am-avatar-border-radius: 50% !default;
11
+ $am-avatar-block-level: block !default;
12
+
13
+ @mixin am-avatar {
14
+ background: $am-avatar-background;
15
+ border-radius: $am-avatar-border-radius;
16
+ box-shadow: $am-avatar-box-shadow;
17
+ color: transparent;
18
+ display: $am-avatar-block-level;
19
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Button Icon
3
+ * A simple, reusable icon button
4
+ */
5
+
6
+ @mixin am-btn-icon {
7
+ border-radius: 50%;
8
+ height: 40px;
9
+ overflow: hidden;
10
+ padding: 0;
11
+ text-indent: 100%;
12
+ white-space: nowrap;
13
+ width: 40px;
14
+ }
@@ -0,0 +1,58 @@
1
+ $am-btn-min-width: 88px !default;
2
+ $am-btn-padding: 12px 8px !default;
3
+ $am-btn-border-radius: 2px !default;
4
+ $am-btn-focus-color: rgba(#999, 0.2) !default;
5
+ $am-btn-active-color: rgba(#999, 0.4) !default;
6
+
7
+ @mixin am-btn {
8
+ @include am-type-btn;
9
+ @include am-color(text);
10
+ background: transparent;
11
+ border-radius: $am-btn-border-radius;
12
+ border: 0;
13
+ cursor: pointer;
14
+ display: inline-block;
15
+ line-height: 18px;
16
+ margin: 4px;
17
+ padding: $am-btn-padding;
18
+ position: relative;
19
+ text-align: center;
20
+ text-transform: uppercase;
21
+ transition: 0.25s all;
22
+ user-select: none;
23
+ vertical-align: center;
24
+
25
+ &:focus {
26
+ outline: none;
27
+ }
28
+
29
+ &:hover {
30
+ @include am-color(primary);
31
+ text-decoration: none;
32
+ }
33
+ }
34
+
35
+ @mixin am-btn-raised {
36
+ @include am-type-smooth;
37
+ @include am-fill(primary);
38
+ @include am-color(white);
39
+ box-shadow: 0 0 2px rgba(#000, 0.12);
40
+ font-weight: 600;
41
+ min-width: $am-btn-min-width;
42
+
43
+ &:focus,
44
+ &:hover {
45
+ @include am-color(text-light);
46
+ background: am-lighten(primary, 10%);
47
+ outline: none;
48
+ }
49
+
50
+ &:active {
51
+ background: am-lighten(primary, 5%);
52
+ box-shadow: inset 0 1px 0 rgba(#fff, 0.2);
53
+ }
54
+ }
55
+
56
+ @mixin am-btn-disabled {
57
+ opacity: 0.4;
58
+ }
@@ -0,0 +1,107 @@
1
+ ////
2
+ /// Datepicker
3
+ /// A calendar widget
4
+ /// @group datepicker
5
+ ////
6
+
7
+ /// The width of the datepicker.
8
+ $am-datepicker-width: am-unit(35) !default;
9
+ /// The shadow cast below the datepicker.
10
+ $am-datepicker-shadow: (0 1px 2px rgba(#000, 0.25), 0 -1px 1px rgba(#000, 0.12)) !default;
11
+ /// The border radius of the picker.
12
+ $am-datepicker-border-radius: 2px !default;
13
+ /// The size of an individual cell in the calendar. Square.
14
+ $am-datepicker-cell-size: am-unit(4) !default;
15
+
16
+ @mixin am-datepicker {
17
+ background: white;
18
+ border-radius: $am-datepicker-border-radius;
19
+ box-shadow: $am-datepicker-shadow;
20
+ padding: 0 am-unit(1.5) am-unit(1);
21
+ width: $am-datepicker-width;
22
+ }
23
+
24
+ @mixin am-datepicker-header {
25
+ line-height: $am-datepicker-cell-size;
26
+ padding: am-unit(1) 0 am-unit(0.5);
27
+ position: relative;
28
+ text-align: center;
29
+ }
30
+
31
+ @mixin am-datepicker-title {
32
+ @include am-font-size(14px);
33
+ font-weight: 600;
34
+ }
35
+
36
+ @mixin am-datepicker-icon {
37
+ &:before {
38
+ @include am-font-size(am-unit(2));
39
+ display: inline-block;
40
+ height: $am-datepicker-cell-size;
41
+ width: $am-datepicker-cell-size;
42
+ }
43
+ }
44
+
45
+ @mixin am-datepicker-prev {
46
+ cursor: pointer;
47
+ float: left;
48
+
49
+ &:before {
50
+ @include am-datepicker-icon;
51
+ content: "‹";
52
+ }
53
+ }
54
+
55
+ @mixin am-datepicker-next {
56
+ cursor: pointer;
57
+ float: right;
58
+
59
+ &:before {
60
+ @include am-datepicker-icon;
61
+ content: "›";
62
+ }
63
+ }
64
+
65
+ @mixin am-datepicker-calendar {
66
+ @include am-font-size(12px);
67
+ border-collapse: collapse;
68
+ text-align: center;
69
+ width: 100%;
70
+ }
71
+
72
+ @mixin am-datepicker-calendar-heading {
73
+ @include am-color(secondary-text);
74
+ font-weight: 500;
75
+ padding: 0 0 am-type-unit(1);
76
+ }
77
+
78
+ @mixin am-datepicker-calendar-day {
79
+ height: $am-datepicker-cell-size;
80
+ font-weight: 500;
81
+ line-height: $am-datepicker-cell-size;
82
+ padding: 0;
83
+ width: $am-datepicker-cell-size;
84
+ }
85
+
86
+ @mixin am-datepicker-calendar-day-disabled {
87
+ opacity: 0;
88
+ }
89
+
90
+ @mixin am-datepicker-calendar-day-link {
91
+ @include am-link(text);
92
+ border-radius: 50%;
93
+ display: block;
94
+ height: inherit;
95
+ margin: 0 auto;
96
+ width: inherit;
97
+ }
98
+
99
+ @mixin am-datepicker-calendar-day-link-focus {
100
+ @include am-color(primary);
101
+ text-decoration: none;
102
+ }
103
+
104
+ @mixin am-datepicker-calendar-day-link-current {
105
+ @include am-fill(primary);
106
+ @include am-color(white);
107
+ }
@@ -0,0 +1,54 @@
1
+ ////
2
+ /// Dialog
3
+ /// A modal that appears above all other content
4
+ /// @group dialog
5
+ ////
6
+
7
+ // Dialog background color
8
+ $am-dialog-background: #fff !default;
9
+ // Dialog container border-radius
10
+ $am-dialog-border-radius: 2px !default;
11
+ // Dialog title padding
12
+ $am-dialog-title-padding: am-unit(4) am-unit(3) am-unit(1) !default;
13
+
14
+ @keyframes am-dialog-fade {
15
+ from {
16
+ opacity: 0;
17
+ transform: translate3d(0, 10px, 0);
18
+ }
19
+
20
+ to {
21
+ opacity: 1;
22
+ transform: translate3d(0, 0, 0);
23
+ }
24
+ }
25
+
26
+ @mixin am-dialog {
27
+ animation: 0.6s am-dialog-fade;
28
+ background: $am-dialog-background;
29
+ border-radius: $am-dialog-border-radius;
30
+ box-shadow: 0 3px 3px rgba(#000, 0.23), 0 3px 3px rgba(#000, 0.16);
31
+ outline: none;
32
+ z-index: $am-elevation-top;
33
+ }
34
+
35
+ @mixin am-dialog-title {
36
+ @include am-type-subheader;
37
+ display: block;
38
+ padding: $am-dialog-title-padding;
39
+ }
40
+
41
+ @mixin am-dialog-footer {
42
+ padding: am-unit(1) am-unit(1) 0;
43
+ text-align: right;
44
+ }
45
+
46
+ @mixin am-dialog-close {
47
+ @include am-btn-icon;
48
+ background: asset_url("active_material/icons/clear.svg") 50% 50% no-repeat;
49
+ margin: 0;
50
+ padding: 0;
51
+ position: absolute;
52
+ right: 0;
53
+ top: 0;
54
+ }
@@ -0,0 +1,118 @@
1
+ ////
2
+ /// Menu
3
+ /// A dropdown menu. Used for nested navigation and selection
4
+ /// @group menu
5
+ ////
6
+
7
+ /// Background color of the menu
8
+ $am-menu-background: #fff !default;
9
+ /// Border radious of the menu
10
+ $am-menu-border-radius: 2px !default;
11
+ /// X-axis offset of opened menu
12
+ $am-menu-offset-x: 0 !default;
13
+ /// Y-axis offset of opened menu
14
+ $am-menu-offset-y: am-unit(4) !default;
15
+ /// Padding of opened menu's container
16
+ $am-menu-padding: am-unit(1) !default;
17
+ /// Padding of individual menu items
18
+ $am-menu-item-padding: am-type-unit(1) am-unit(2) !default;
19
+ /// Transition time of menu opening
20
+ $am-menu-transition: 0.2s !default;
21
+ /// Transition delay when a menu opens
22
+ $am-menu-transition-delay: 0.2s !default;
23
+ /// Minimum allowable width of menu
24
+ $am-menu-min-width: am-unit(14) !default;
25
+ /// Desktop breakpoint
26
+ $am-menu-breakpoint: 1300px !default;
27
+ /// The size of the dropdown carot that displays next to the menu toggle
28
+ $am-menu-carat-size: 5px !default;
29
+
30
+ @mixin am-menu {
31
+ display: inline-block;
32
+ outline: 0;
33
+ position: relative;
34
+ text-align: left;
35
+ }
36
+
37
+ @mixin am-menu-carat {
38
+ border: $am-menu-carat-size solid transparent;
39
+ border-color: am-color(primary) transparent transparent;
40
+ content: "";
41
+ height: 0;
42
+ margin-top: $am-menu-carat-size / -2;
43
+ position: absolute;
44
+ right: -15px;
45
+ top: 50%;
46
+ width: 0;
47
+ }
48
+
49
+ @mixin am-menu-carat-muted {
50
+ border-top-color: am-color(hint);
51
+ }
52
+
53
+ @mixin am-menu-list {
54
+ background: $am-menu-background;
55
+ border-radius: $am-menu-border-radius;
56
+ box-shadow: 0 1px 1px rgba(#000, 0.24), 0 0 1.5px rgba(#000, 0.12);
57
+ filter: blur(1px);
58
+ left: $am-menu-offset-x;
59
+ list-style: none;
60
+ margin: 0;
61
+ min-width: $am-menu-min-width;
62
+ padding: $am-menu-padding 0;
63
+ position: absolute;
64
+ text-align: left;
65
+ top: $am-menu-offset-y;
66
+ transform-origin: 0 0;
67
+ transform: translate3d(0, -4px, 0) scaleY(0);
68
+ transition: $am-menu-transition all;
69
+ width: auto;
70
+ will-change: transform;
71
+ z-index: $am-elevation-top;
72
+ }
73
+
74
+ @mixin am-menu-list-right {
75
+ left: auto;
76
+ right: $am-menu-offset-x;
77
+ }
78
+
79
+ @mixin am-menu-item {
80
+ display: block;
81
+ margin: 0;
82
+ transition: $am-menu-transition all;
83
+ }
84
+
85
+ @mixin am-menu-link {
86
+ @include am-link(secondary-text);
87
+ @include am-link-no-decoration;
88
+ display: block;
89
+ font-size: 14px;
90
+ opacity: 0;
91
+ padding: $am-menu-item-padding;
92
+ transition: 0.28s opacity, 0.28s color;
93
+ white-space: nowrap;
94
+
95
+ &:hover,
96
+ &:focus {
97
+ @include am-color(primary);
98
+ }
99
+
100
+ @include am-min-breakpoint($am-menu-breakpoint) {
101
+ font-size: 13px;
102
+ }
103
+ }
104
+
105
+ @mixin am-menu-button {
106
+ position: relative;
107
+ }
108
+
109
+ @mixin am-menu-list-open {
110
+ filter: none;
111
+ transition: $am-menu-transition all;
112
+ transform: translateZ(0) scale(1);
113
+ }
114
+
115
+ @mixin am-menu-item-open {
116
+ opacity: 1;
117
+ transition: $am-menu-transition opacity;
118
+ }