archetype-theme 1.0.0.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +16 -0
  3. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/CHANGELOG.md +0 -0
  4. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/README.md +0 -0
  5. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/VERSION +0 -0
  6. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/lib/archetype-theme.rb +9 -0
  7. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/lib/archetype-theme/version.rb +3 -0
  8. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/_theme.scss +2 -0
  9. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/_components.scss +28 -0
  10. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/_core.scss +10 -0
  11. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/_helpers.scss +209 -0
  12. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/_identifiers.scss +25 -0
  13. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/_init.scss +5 -0
  14. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/_keyframes.scss +64 -0
  15. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/_primitives.scss +10 -0
  16. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_alerts.scss +54 -0
  17. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_annotations.scss +25 -0
  18. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_bristol.scss +13 -0
  19. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_button_groups.scss +40 -0
  20. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_button_toolbars.scss +15 -0
  21. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_buttons.scss +299 -0
  22. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_canvas.scss +13 -0
  23. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_carets.scss +292 -0
  24. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_closes.scss +56 -0
  25. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_container.scss +23 -0
  26. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_copy.scss +72 -0
  27. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_flyouts.scss +50 -0
  28. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_headings.scss +29 -0
  29. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_headlines.scss +57 -0
  30. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_hovercards.scss +26 -0
  31. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_icons.scss +16 -0
  32. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_identities.scss +29 -0
  33. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_links.scss +54 -0
  34. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_loaders.scss +138 -0
  35. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_menu_items.scss +27 -0
  36. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_module.scss +13 -0
  37. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_pullquotes.scss +27 -0
  38. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_punchcut.scss +17 -0
  39. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/components/_tooltips.scss +27 -0
  40. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/primitives/_animations.scss +17 -0
  41. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/primitives/_dimensions.scss +50 -0
  42. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/primitives/_glyphs.scss +11 -0
  43. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/primitives/_misc.scss +8 -0
  44. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/primitives/_palettes.scss +94 -0
  45. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/primitives/_shadows.scss +23 -0
  46. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/primitives/_sprites.scss +41 -0
  47. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/primitives/_textures.scss +10 -0
  48. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/stylesheets/archetype/theme/primitives/_typography.scss +56 -0
  49. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/templates/project/manifest.rb +6 -0
  50. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/templates/project/vendor/archetype/animations/loaders/large/large.png +0 -0
  51. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/templates/project/vendor/archetype/animations/loaders/large/large_dark.png +0 -0
  52. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/templates/project/vendor/archetype/animations/loaders/large/large_dark_static.png +0 -0
  53. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/templates/project/vendor/archetype/animations/loaders/large/large_static.png +0 -0
  54. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/templates/project/vendor/archetype/animations/loaders/medium/medium.png +0 -0
  55. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/templates/project/vendor/archetype/animations/loaders/medium/medium_dark.png +0 -0
  56. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/templates/project/vendor/archetype/animations/loaders/medium/medium_dark_static.png +0 -0
  57. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/templates/project/vendor/archetype/animations/loaders/medium/medium_static.png +0 -0
  58. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/templates/project/vendor/archetype/animations/loaders/small/small.png +0 -0
  59. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/templates/project/vendor/archetype/animations/loaders/small/small_dark.png +0 -0
  60. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/templates/project/vendor/archetype/animations/loaders/small/small_dark_static.png +0 -0
  61. data/Users/eoneill/workspace/archetype/extensions/archetype-theme/templates/project/vendor/archetype/animations/loaders/small/small_static.png +0 -0
  62. metadata +119 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ea9a0f479ee575757ee61ced88fbb7b16c52faaa
4
+ data.tar.gz: 7d120b14e70c45c3d77f815e8259a5041f519ee8
5
+ SHA512:
6
+ metadata.gz: 1b4d32123d02a42c4bf661b669098a725e6febcfa554d54d77280e4844a255f8ad30b98b46d119e43d7b68d6a62f678804da813e9a84e392ba7bbc291ff3faff
7
+ data.tar.gz: bebc8346eb88c2d71b23b6a2296d7016b26cd9f638ef1bf29eeb091b60daed52f0d2392d461008c10223dfafa445bc92ceef1f5bc49896cd7b5185df8038b975
data/LICENSE ADDED
@@ -0,0 +1,16 @@
1
+ Archetype
2
+ Copyright (c) 2013 LinkedIn Corp. All rights reserved.
3
+ Apache Software License 2.0
4
+
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
@@ -0,0 +1,9 @@
1
+ require 'archetype'
2
+
3
+ #
4
+ # register as an Archetype extension
5
+ #
6
+ Archetype::Extensions.register(
7
+ File.basename(__FILE__, '.rb'),
8
+ :path => File.expand_path(File.join(File.dirname(__FILE__), ".."))
9
+ )
@@ -0,0 +1,3 @@
1
+ module ArchetypeTheme
2
+ VERSION = File.read(File.join(File.dirname(__FILE__), "..", "..", "VERSION")).strip
3
+ end
@@ -0,0 +1,28 @@
1
+ // import the component identifiers
2
+ @import "identifiers";
3
+
4
+ // import components
5
+ @import "components/alerts";
6
+ @import "components/annotations";
7
+ @import "components/bristol";
8
+ @import "components/button_groups";
9
+ @import "components/button_toolbars";
10
+ @import "components/buttons";
11
+ @import "components/canvas";
12
+ @import "components/carets";
13
+ @import "components/closes";
14
+ @import "components/container";
15
+ @import "components/copy";
16
+ @import "components/flyouts";
17
+ @import "components/headings";
18
+ @import "components/headlines";
19
+ @import "components/hovercards";
20
+ @import "components/icons";
21
+ @import "components/identities";
22
+ @import "components/links";
23
+ @import "components/loaders";
24
+ @import "components/menu_items";
25
+ @import "components/module";
26
+ @import "components/pullquotes";
27
+ @import "components/punchcut";
28
+ @import "components/tooltips";
@@ -0,0 +1,10 @@
1
+ $a-blackhole: require-archetype-module(archetype/core);
2
+
3
+ // register module
4
+ $a-blackhole: register-archetype-module(archetype/theme);
5
+
6
+ // theme components
7
+ @import "primitives";
8
+ @import "helpers";
9
+ @import "components";
10
+ @import "keyframes";
@@ -0,0 +1,209 @@
1
+ // @category styleguide
2
+
3
+ // helper function to get the height of a button
4
+ // @function _styleguideGetButtonHeight
5
+ // @private
6
+ // @param $size {String} the size of the button to calculate
7
+ // @return {Number} the height of the button
8
+ @function _styleguideGetButtonHeight($size: medium) {
9
+ @if type-of($size) != list {
10
+ $sizes: (
11
+ (small, $CONFIG_FONT_BUTTON_SMALL),
12
+ (medium, $CONFIG_FONT_BUTTON_MEDIUM),
13
+ (large, $CONFIG_FONT_BUTTON_LARGE)
14
+ );
15
+ $size: associative($sizes, $size);
16
+ }
17
+ // font size + top/bottom padding
18
+ @return nth($size, 1) + (2 * nth($size, 2));
19
+ }
20
+
21
+ // helper function to get the padding of a button
22
+ // @function _styleguideGetButtonPadding
23
+ // @private
24
+ // @param $size {String} the size of the button to calculate
25
+ // @param $narrow {Boolean} is the button narrow or not
26
+ // @return {Number} the padding on the button
27
+ @function _styleguideGetButtonPadding($size: medium, $narrow: false) {
28
+ @if type-of($size) != list {
29
+ $sizes: (
30
+ (small, $CONFIG_FONT_BUTTON_SMALL),
31
+ (medium, $CONFIG_FONT_BUTTON_MEDIUM),
32
+ (large, $CONFIG_FONT_BUTTON_LARGE)
33
+ );
34
+ $size: nth(associative($sizes, $size), 3);
35
+ }
36
+ $size: floor(if($narrow, $size * 0.75, $size));
37
+ @return (0 $size);
38
+ }
39
+
40
+ // helper function to get the size of the caret
41
+ // @function _styleguideCaretSize
42
+ // @private
43
+ // @param $size {String} the size of the caret to calculate
44
+ // @param $direction {String} the direction the caret is facing [up|down]
45
+ // @return {List} the border widths needed to generate the caret
46
+ @function _styleguideCaretSize($size: medium, $direction: south) {
47
+ @if type-of($size) != number {
48
+ $size: associative((
49
+ (small $CONFIG_FONT_CARET_SMALL),
50
+ (medium $CONFIG_FONT_CARET_MEDIUM),
51
+ (large $CONFIG_FONT_CARET_LARGE),
52
+ (tooltip $CONFIG_DIM_TOOLTIP_TIP)
53
+ ), $size);
54
+ }
55
+ @return associative((
56
+ (default ($size $size 0)),
57
+ (north (0 $size $size)),
58
+ (east ($size 0 $size $size)),
59
+ (west ($size $size $size 0))
60
+ ), $direction);
61
+ }
62
+
63
+ // helper function to get the alert icon offset
64
+ // @function _styleguideGetAlertGlyphOffset
65
+ // @private
66
+ // @param $type {List} the glyph data
67
+ // @return {List} the top and left offsets for the glyph
68
+ @function _styleguideGetAlertGlyphOffset($type: $CONFIG_GLYPH_ALERT_NOTIFY) {
69
+ $top: (nth-cyclic($CONFIG_DIM_ALERTS_SPACING, 1) + nth-cyclic($CONFIG_DIM_ALERTS_SPACING, 3) + nth-cyclic($CONFIG_FONT_NOTICE, 2) - nth($type, 4)) / 2;
70
+ $left: ((nth-cyclic($CONFIG_DIM_ALERTS_SPACING, 4) - nth($type, 4))/2);
71
+ @return ($top $left);
72
+ }
73
+
74
+ // helper function to extract the glyph styles for an alert icon
75
+ // @function _styleguideGetAlertGlyph
76
+ // @private
77
+ // @param $type {List} the glyph data
78
+ // @return {List} the parameters needed for glyph-icon()
79
+ @function _styleguideGetAlertGlyph($type: $CONFIG_GLYPH_ALERT_NOTIFY) {
80
+ @return (nth($type, 1), nth($type, 2), nth($type, 3), before, '');
81
+ }
82
+
83
+
84
+ // helper function to return the list of shadows for the alert
85
+ // alerts have two shadows, one thats shared and ones that unique
86
+ // @function _styleguideGetAlertShadow
87
+ // @private
88
+ // @param $type {String} the type of alert [success|notice|yield|error]
89
+ // @return {List} the shadows on the alert
90
+ @function _styleguideGetAlertShadow($type: notice) {
91
+ $color: $type;
92
+ @if type-of($type) == string {
93
+ $color: associative((
94
+ (notice $CONFIG_COLOR_BORDER_ALERT_NOTIFY),
95
+ (success $CONFIG_COLOR_BORDER_ALERT_SUCCESS),
96
+ (error $CONFIG_COLOR_BORDER_ALERT_ERROR),
97
+ (yield $CONFIG_COLOR_BORDER_ALERT_YIELD)
98
+ ), $type);
99
+ }
100
+ @if not is-null($color) and not is-null($CONFIG_DIM_GENERIC_BORDER) {
101
+ @return ((0 0 0 $CONFIG_DIM_GENERIC_BORDER $color), $CONFIG_SHADOW_ALERT);
102
+ }
103
+ @else {
104
+ @return $CONFIG_SHADOW_ALERT;
105
+ }
106
+ }
107
+
108
+ // helper function to get the color of a context
109
+ // @function _styleguideGetContextColor
110
+ // @private
111
+ // @param $texture {List|String} a list or string for a background texture
112
+ // @return {Color} the color in the list
113
+ @function _styleguideGetContextColor($texture: $CONFIG_TEXTURE_CONTAINER) {
114
+ $texture: -archetype-list(first-value-of($texture)); // cast a string into a list
115
+ @return first-value-of($texture); // pull off the first value in the string/list
116
+ }
117
+
118
+ // helper function to get background position for the tooltip sprite
119
+ // @function _styleguideGetTooltipTipBG
120
+ // @private
121
+ // @param $direction {String} the direction the tip is pointing [north|south|east|west]
122
+ // @param $type {String} the type of the tip [hovercard]
123
+ // @return {List} the background position offsets
124
+ @function _styleguideGetTooltipTipBG($direction: south, $type: hovercard) {
125
+ $dim: $type;
126
+ @if type-of($type) == string {
127
+ $dim: map-get((
128
+ hovercard: $CONFIG_DIM_HOVERCARD_TIP
129
+ ), $type);
130
+ }
131
+ $a: nth($dim, 1);
132
+ $b: nth-cyclic($dim, 2);
133
+ @return map-get((
134
+ north: (-$b 0),
135
+ south: ((-$b) (-($a+$b))),
136
+ east: ((-($a+$b)) (-$b)),
137
+ west: (0 (-$b))
138
+ ), $direction);
139
+ }
140
+
141
+ // helper function to get the position of the loading spinner
142
+ // @function _styleguideGetLoaderPosition
143
+ // @private
144
+ // @param $size {String} the size of the loading spinner e.g. [small|medium|large]
145
+ // @param $type {String} the type of the loading spinner e.g. [static|dynamic]
146
+ // @param $context {Number} the index for the context type
147
+ // @return {List} background position of the image or null
148
+ @function _styleguideGetLoaderPosition($size: medium, $type: static, $context: 1) {
149
+ $img: nth-cyclic(map-get(map-get($CONFIG_LOADERS, $size), $type), $context);
150
+ @return -archetype-sprite-position($CONFIG_SPRITE_LOADERS, $img);
151
+ }
152
+
153
+ // helper function to get the dimensions of the loading spinner
154
+ // @function _styleguideGetLoaderDimension
155
+ // @private
156
+ // @param $size {String} the size of the loading spinner e.g. [small|medium|large]
157
+ // @param $type {String} the type of the loading spinner e.g. [static|dynamic]
158
+ // @param $dim {String} the dimension to return [width|height]
159
+ // @param $context {Number} the index for the context type
160
+ // @return {Number} the width/height of the loading spinner
161
+ @function _styleguideGetLoaderDimension($size: medium, $type: static, $dim: width, $context: 1) {
162
+ $img: nth-cyclic(map-get(map-get($CONFIG_LOADERS, $size), $type), $context);
163
+ $sprite-file: -archetype-sprite-file($CONFIG_SPRITE_LOADERS, $img);
164
+ @if $dim == width {
165
+ @return -archetype-image-width($sprite-file);
166
+ }
167
+ @else {
168
+ @return -archetype-image-height($sprite-file);
169
+ }
170
+ }
171
+
172
+ // helper function to get the animation routine of the loading spinner
173
+ // @function _styleguideGetLoaderAnimation
174
+ // @private
175
+ // @param $size {String} the size of the loading spinner e.g. [small|medium|large]
176
+ // @param $context {Number} the index for the context type
177
+ // @return {String} the animation value
178
+ @function _styleguideGetLoaderAnimation($size: medium, $context: 1) {
179
+ $values: map-get($CONFIG_LOADERS, $size);
180
+ $anim: (archetype-namespace($CONFIG_KEYFRAME_LOADERS));
181
+ $duration: nth-cyclic(map-get($values, duration), $context);
182
+ $delay: nth-cyclic(map-get($values, delay), $context);
183
+ $steps: nth-cyclic(map-get($values, steps), $context);
184
+ $iterations: nth-cyclic(map-get($values, iterations), $context);
185
+ @if not is-null($duration) { $anim: append($anim, $duration); }
186
+ @if not is-null($delay) { $anim: append($anim, $delay); }
187
+ @if not is-null($steps) { $anim: append($anim, steps($steps, end)); }
188
+ @if not is-null($iterations) { $anim: append($anim, $iterations); }
189
+ $position-keyframe-name: #{archetype-namespace($CONFIG_KEYFRAME_LOADERS)}-position-#{$size}-#{$context};
190
+ $anim: unquote("#{$anim}, #{$position-keyframe-name} 0.1ms step-end infinite");
191
+ @return $anim;
192
+ }
193
+
194
+ // helper function to get the CSS expression of the loading spinner (for IE6/7 support)
195
+ // @function _styleguideGetLoaderExpression
196
+ // @private
197
+ // @param $size {String} the size of the loading spinner e.g. [small|medium|large]
198
+ // @param $context {Number} the index for the context type
199
+ // @return {String} the CSS expression styles
200
+ @function _styleguideGetLoaderExpression($size: medium, $context: 1) {
201
+ $img: nth-cyclic(map-get(map-get($CONFIG_LOADERS, $size), static), $context);
202
+ $bg: -archetype-sprite($CONFIG_SPRITE_LOADERS, $img) no-repeat;
203
+ $bg: if(is-null($bg), none, $bg);
204
+ $width: _styleguideGetLoaderDimension($size, static, width, $context);
205
+ $height: _styleguideGetLoaderDimension($size, static, height, $context);
206
+ $margin-top: $height / -2;
207
+ $margin-left: $width / -2;
208
+ @return ("position:absolute;top:50%;left:50%;background:#{$bg};width:#{$width};height:#{$height};margin-left:#{$margin-left};margin-top:#{$margin-top};", false, loader);
209
+ }
@@ -0,0 +1,25 @@
1
+ // component identifiers
2
+ $STYLEGUIDE_ALERTS_ID: alert !default;
3
+ $STYLEGUIDE_ANNOTATIONS_ID: annotation !default;
4
+ $STYLEGUIDE_BRISTOLS_ID: bristol !default;
5
+ $STYLEGUIDE_BUTTON_GROUPS_ID: button-group !default;
6
+ $STYLEGUIDE_BUTTON_TOOLBARS_ID: button-toolbar !default;
7
+ $STYLEGUIDE_BUTTONS_ID: button !default;
8
+ $STYLEGUIDE_CANVAS_ID: canvas !default;
9
+ $STYLEGUIDE_CARETS_ID: caret !default;
10
+ $STYLEGUIDE_CLOSES_ID: close !default;
11
+ $STYLEGUIDE_CONTAINERS_ID: container !default;
12
+ $STYLEGUIDE_COPY_ID: copy !default;
13
+ $STYLEGUIDE_FLYOUTS_ID: flyout !default;
14
+ $STYLEGUIDE_HEADINGS_ID: heading !default;
15
+ $STYLEGUIDE_HEADLINES_ID: headline !default;
16
+ $STYLEGUIDE_HOVERCARDS_ID: hovercard !default;
17
+ $STYLEGUIDE_ICONS_ID: icon !default;
18
+ $STYLEGUIDE_IDENTITY_ID: identity !default;
19
+ $STYLEGUIDE_LINKS_ID: link !default;
20
+ $STYLEGUIDE_LOADERS_ID: loader !default;
21
+ $STYLEGUIDE_MENU_ITEMS_ID: menu-item !default;
22
+ $STYLEGUIDE_MODULES_ID: module !default;
23
+ $STYLEGUIDE_PULLQUOTES_ID: pullquote !default;
24
+ $STYLEGUIDE_PUNCHCUTS_ID: punchcut !default;
25
+ $STYLEGUIDE_TOOLTIPS_ID: tooltip !default;
@@ -0,0 +1,5 @@
1
+ @import "core";
2
+
3
+ @include unless-archetype-module-initalized(archetype/theme) {
4
+ @include generate-loader-keyframes;
5
+ }
@@ -0,0 +1,64 @@
1
+ // generate rotational and position keyframes for loading spinners
2
+ // @mixin generate-loader-keyframes
3
+ @mixin generate-loader-keyframes() {
4
+ @if not $CONFIG_DISABLE_STYLEGUIDE_SPRITES {
5
+ // generate rotating keyframes
6
+ @include -generate-loader-keyframes-360();
7
+ // generate specific keyframes
8
+ @each $size, $values in $CONFIG_LOADERS {
9
+ @if $size and $values {
10
+ @each $context in (1 2) {
11
+ $name: unquote('#{$size}-#{$context}');
12
+ $icon: nth-cyclic(map-get($values, default), $context);
13
+ $position: -archetype-sprite-position($CONFIG_SPRITE_LOADERS, $icon);
14
+ $sprite-file: -archetype-sprite-file($CONFIG_SPRITE_LOADERS, $icon);
15
+ $width: -archetype-image-width($sprite-file);
16
+ $height: -archetype-image-height($sprite-file);
17
+ @include -generate-loader-keyframes-position($name, $position, $width, $height);
18
+ }
19
+ }
20
+ }
21
+ }
22
+ }
23
+
24
+ // generate rotational keyframes for loading spinners
25
+ // @mixin -generate-loader-keyframes-360
26
+ // @private
27
+ @mixin -generate-loader-keyframes-360() {
28
+ @include do-once("archetype/ui/generate-keyframe/#{$CONFIG_KEYFRAME_LOADERS}") {
29
+ @include keyframes(archetype-namespace($CONFIG_KEYFRAME_LOADERS)) {
30
+ from { @include rotate(0deg); }
31
+ to { @include rotate(360deg); }
32
+ }
33
+ }
34
+ }
35
+
36
+ // generate position keyframes for loading spinners
37
+ // @mixin -generate-loader-keyframes-position
38
+ // @private
39
+ // @param $name {String} the name for this keyframe
40
+ // @param $position {List} the background-position of the spinner image
41
+ // @param $width {Number} the width of the spinner image
42
+ // @param $height {Number} the height of the spinner image
43
+ @mixin -generate-loader-keyframes-position($name, $position, $width, $height) {
44
+ $name: unquote('#{archetype-namespace($CONFIG_KEYFRAME_LOADERS)}-position-#{$name}');
45
+ @include do-once("archetype/ui/generate-keyframe/#{$name}") {
46
+ @include keyframes($name) {
47
+ from, to { @include -generate-loader-keyframes-position-css($position, $width, $height); }
48
+ }
49
+ }
50
+ }
51
+
52
+ // a helper to generate the required CSS for the position keyframe
53
+ // @mixin -generate-loader-keyframes-position-css
54
+ // @private
55
+ // @param $position {List} the background-position of the spinner image
56
+ // @param $width {Number} the width of the spinner image
57
+ // @param $height {Number} the height of the spinner image
58
+ @mixin -generate-loader-keyframes-position-css($position, $width, $height) {
59
+ background-position: $position;
60
+ width: $width;
61
+ height: $height;
62
+ margin-left: $width / -2;
63
+ margin-top: $height / -2;
64
+ }
@@ -0,0 +1,10 @@
1
+ // manifest for primitives
2
+ @import "primitives/animations";
3
+ @import "primitives/palettes";
4
+ @import "primitives/textures";
5
+ @import "primitives/typography";
6
+ @import "primitives/dimensions";
7
+ @import "primitives/sprites";
8
+ @import "primitives/glyphs";
9
+ @import "primitives/shadows";
10
+ @import "primitives/misc";
@@ -0,0 +1,54 @@
1
+ // ==========
2
+ // ALERTS
3
+ // ==========
4
+ $STYLEGUIDE_ALERTS_ID: alert !default;
5
+ $STYLEGUIDE_ALERTS: () !default;
6
+
7
+ @if should-register-component($STYLEGUIDE_ALERTS_ID) {
8
+ $a-blackhole: styleguide-add-component($STYLEGUIDE_ALERTS_ID, $STYLEGUIDE_ALERTS, (
9
+ default: (
10
+ // fallback background
11
+ background-color: $CONFIG_COLOR_BG_ALERT_NOTIFY,
12
+ background-repeat: no-repeat,
13
+ // gradient background
14
+ background: $CONFIG_GRADIENT_ALERT_NOTIFY,
15
+ box-shadow: _styleguideGetAlertShadow(notice),
16
+ // common
17
+ overflow: hidden,
18
+ display: block,
19
+ color: nth-cyclic($CONFIG_COLOR_COPY, 2),
20
+ font-size: nth($CONFIG_FONT_NOTICE, 1),
21
+ line-height: nth-cyclic($CONFIG_FONT_NOTICE, 2),
22
+ position: relative,
23
+ padding: $CONFIG_DIM_ALERTS_SPACING,
24
+ glyph-icon: _styleguideGetAlertGlyph($CONFIG_GLYPH_ALERT_NOTIFY),
25
+ selectors: (
26
+ $CORE_GLYPH_SELECTOR_VAR: (
27
+ position: absolute,
28
+ top: nth(_styleguideGetAlertGlyphOffset($CONFIG_GLYPH_ALERT_NOTIFY), 1),
29
+ left: nth(_styleguideGetAlertGlyphOffset($CONFIG_GLYPH_ALERT_NOTIFY), 2),
30
+ line-height: 1
31
+ )
32
+ )
33
+ ),
34
+ notice: null, // just inherits the default
35
+ success: (
36
+ background-color: $CONFIG_COLOR_BG_ALERT_SUCCESS,
37
+ background: $CONFIG_GRADIENT_ALERT_SUCCESS,
38
+ glyph-icon: _styleguideGetAlertGlyph($CONFIG_GLYPH_ALERT_SUCCESS),
39
+ box-shadow: _styleguideGetAlertShadow(success)
40
+ ),
41
+ error: (
42
+ background-color: $CONFIG_COLOR_BG_ALERT_ERROR,
43
+ background: $CONFIG_GRADIENT_ALERT_ERROR,
44
+ glyph-icon: _styleguideGetAlertGlyph($CONFIG_GLYPH_ALERT_ERROR),
45
+ box-shadow: _styleguideGetAlertShadow(error)
46
+ ),
47
+ yield: (
48
+ background-color: $CONFIG_COLOR_BG_ALERT_YIELD,
49
+ background: $CONFIG_GRADIENT_ALERT_YIELD,
50
+ glyph-icon: _styleguideGetAlertGlyph($CONFIG_GLYPH_ALERT_YIELD),
51
+ box-shadow: _styleguideGetAlertShadow(yield)
52
+ )
53
+ )) !global;
54
+ }