pusher-chameleon 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/.ruby-version +1 -0
  3. data/Gemfile +3 -0
  4. data/Gemfile.lock +23 -0
  5. data/README.md +17 -0
  6. data/docs/.gitignore +4 -0
  7. data/docs/Gemfile +10 -0
  8. data/docs/Gemfile.lock +72 -0
  9. data/docs/README.md +15 -0
  10. data/docs/Rakefile +40 -0
  11. data/docs/_config.production.yml +18 -0
  12. data/docs/_config.yml +39 -0
  13. data/docs/_includes/footer.html +38 -0
  14. data/docs/_includes/head.html +15 -0
  15. data/docs/_includes/header.html +27 -0
  16. data/docs/_includes/icon-github.html +1 -0
  17. data/docs/_includes/icon-github.svg +3 -0
  18. data/docs/_includes/logo-pusher.svg +4 -0
  19. data/docs/_includes/sidebar.html +33 -0
  20. data/docs/_layouts/default.html +53 -0
  21. data/docs/_layouts/page.html +14 -0
  22. data/docs/_layouts/post.html +15 -0
  23. data/docs/_plugins/chameleon_version.rb +11 -0
  24. data/docs/_plugins/copy_images_directory.rb +22 -0
  25. data/docs/_plugins/ext.rb +2 -0
  26. data/docs/_posts/2016-03-16-getting-started.md +28 -0
  27. data/docs/_posts/2016-03-16-introduction.md +24 -0
  28. data/docs/_posts/2016-03-17-buttons.md +61 -0
  29. data/docs/_posts/2016-03-17-colors.md +139 -0
  30. data/docs/_posts/2016-03-17-flex.md +24 -0
  31. data/docs/_posts/2016-03-17-forms.md +66 -0
  32. data/docs/_posts/2016-03-17-visibility.md +28 -0
  33. data/docs/_posts/2016-04-04-typography.md +111 -0
  34. data/docs/_posts/2016-04-05-syntax-highlighting.md +28 -0
  35. data/docs/_posts/2016-05-08-alerts.md +50 -0
  36. data/docs/_posts/2016-05-12-labels.md +22 -0
  37. data/docs/_posts/2016-05-13-tooltips.md +33 -0
  38. data/docs/_sass/_base.scss +36 -0
  39. data/docs/_sass/_chameleon_imports.scss +20 -0
  40. data/docs/_sass/_layout.scss +136 -0
  41. data/docs/_sass/_typography.scss +41 -0
  42. data/docs/_sass/layout/_aside.scss +151 -0
  43. data/docs/about.md +15 -0
  44. data/docs/autoprefixer.yml +4 -0
  45. data/docs/css/main.scss +11 -0
  46. data/docs/feed.xml +30 -0
  47. data/docs/index.html +23 -0
  48. data/images/ui_icons/alert_beta.svg +3 -0
  49. data/images/ui_icons/alert_info.svg +3 -0
  50. data/images/ui_icons/alert_tick.svg +6 -0
  51. data/images/ui_icons/alert_warning.svg +6 -0
  52. data/images/ui_icons/chevron_down.svg +3 -0
  53. data/images/ui_icons/github--active.svg +6 -0
  54. data/images/ui_icons/github.svg +6 -0
  55. data/images/ui_icons/google--active.svg +6 -0
  56. data/images/ui_icons/google.svg +10 -0
  57. data/images/ui_icons/plus.svg +3 -0
  58. data/javascripts/chameleon/code_box.js +14 -0
  59. data/javascripts/chameleon/pusher_featurette.js +52 -0
  60. data/javascripts/chameleon/pusher_text_cycler.js +60 -0
  61. data/lib/pusher-chameleon.rb +71 -0
  62. data/lib/pusher-chameleon/engine.rb +13 -0
  63. data/lib/pusher-chameleon/version.rb +8 -0
  64. data/package.json +24 -0
  65. data/pusher-chameleon.gemspec +21 -0
  66. data/stylesheets/.gitkeep +0 -0
  67. data/stylesheets/_base.scss +400 -0
  68. data/stylesheets/_global.scss +96 -0
  69. data/stylesheets/chameleon.scss +30 -0
  70. data/stylesheets/components/_alert.scss +102 -0
  71. data/stylesheets/components/_code_box.scss +84 -0
  72. data/stylesheets/components/_flex_aligners.scss +38 -0
  73. data/stylesheets/components/_label.scss +41 -0
  74. data/stylesheets/components/_signpost.scss +150 -0
  75. data/stylesheets/components/_spacers.scss +11 -0
  76. data/stylesheets/components/_statistic.scss +62 -0
  77. data/stylesheets/components/_tooltip.scss +65 -0
  78. data/stylesheets/components/_visibility.scss +117 -0
  79. data/stylesheets/forms/_base.scss +47 -0
  80. data/stylesheets/forms/_buttons.scss +242 -0
  81. data/stylesheets/forms/_checkbox.scss +31 -0
  82. data/stylesheets/forms/_field.scss +11 -0
  83. data/stylesheets/forms/_fieldset.scss +18 -0
  84. data/stylesheets/forms/_forms.scss +21 -0
  85. data/stylesheets/forms/_input.scss +14 -0
  86. data/stylesheets/forms/_range.scss +110 -0
  87. data/stylesheets/forms/_select.scss +15 -0
  88. data/stylesheets/forms/_textarea.scss +11 -0
  89. data/stylesheets/grid/_classes.scss +152 -0
  90. data/stylesheets/grid/_column.scss +126 -0
  91. data/stylesheets/grid/_flex-grid.scss +268 -0
  92. data/stylesheets/grid/_grid.scss +60 -0
  93. data/stylesheets/grid/_gutter.scss +34 -0
  94. data/stylesheets/grid/_layout.scss +51 -0
  95. data/stylesheets/grid/_position.scss +73 -0
  96. data/stylesheets/grid/_row.scss +95 -0
  97. data/stylesheets/grid/_size.scss +24 -0
  98. data/stylesheets/typography/_base.scss +60 -0
  99. data/stylesheets/typography/_helpers.scss +66 -0
  100. data/stylesheets/typography/_import.scss +54 -0
  101. data/stylesheets/typography/_syntax_highlighting.scss +168 -0
  102. data/stylesheets/typography/_syntax_highlighting_dark.scss +73 -0
  103. data/stylesheets/typography/_syntax_highlighting_light.scss +73 -0
  104. data/stylesheets/typography/_titles.scss +69 -0
  105. data/stylesheets/typography/_typography.scss +12 -0
  106. data/stylesheets/util/_breakpoint.scss +273 -0
  107. data/stylesheets/util/_color.scss +42 -0
  108. data/stylesheets/util/_flex.scss +68 -0
  109. data/stylesheets/util/_mixins.scss +233 -0
  110. data/stylesheets/util/_selector.scss +40 -0
  111. data/stylesheets/util/_unit.scss +90 -0
  112. data/stylesheets/util/_url_helper.scss +30 -0
  113. data/stylesheets/util/_util.scss +13 -0
  114. data/stylesheets/util/_value.scss +107 -0
  115. metadata +199 -0
@@ -0,0 +1,30 @@
1
+ // File URL Helpers - Used for loading in images
2
+ $file-url-helper-path: false !default;
3
+ $file-url-path: "/images/" !default;
4
+
5
+ // Font URL Helpers
6
+ $font-url-helper-path: false !default;
7
+ $font-url-path: "/fonts/" !default;
8
+
9
+ // A function which can either output a image-url to be used with the Rails
10
+ // Asset Pipeline or Compass or a plain url which is prefixed with a defined
11
+ // path variable.
12
+ @function file-url($file) {
13
+ $url: '';
14
+ @if $file-url-helper-path {
15
+ $url: url($file-url-path + $file);
16
+ } @else {
17
+ $url: asset-url($file);
18
+ }
19
+ @return $url;
20
+ }
21
+
22
+ @function font-url-helper($file) {
23
+ $url: '';
24
+ @if $font-url-helper-path {
25
+ $url: font-url($file);
26
+ } @else {
27
+ $url: url($font-url-path + $file);
28
+ }
29
+ @return $url;
30
+ }
@@ -0,0 +1,13 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ @import 'unit';
6
+ @import 'value';
7
+ @import 'color';
8
+ @import 'selector';
9
+ @import 'flex';
10
+ @import 'breakpoint';
11
+ @import 'mixins';
12
+ @import 'url_helper';
13
+
@@ -0,0 +1,107 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group functions
7
+ ////
8
+
9
+ /// Determine if a value is not falsey, in CSS terms. Falsey values are `null`, `none`, `0` with any unit, or an empty list.
10
+ ///
11
+ /// @param {Mixed} $val - Value to check.
12
+ ///
13
+ /// @returns {Boolean} `true` if `$val` is not falsey.
14
+ @function has-value($val) {
15
+ @if $val == null or $val == none {
16
+ @return false;
17
+ }
18
+ @if type-of($val) == 'number' and strip-unit($val) == 0 {
19
+ @return false;
20
+ }
21
+ @if type-of($val) == 'list' and length($val) == 0 {
22
+ @return false;
23
+ }
24
+ @return true;
25
+ }
26
+
27
+ /// Determine a top/right/bottom/right value on a padding, margin, etc. property, no matter how many values were passed in. Use this function if you need to know the specific side of a value, but don't know if the value is using a shorthand format.
28
+ ///
29
+ /// @param {List|Number} $val - Value to analyze. Should be a shorthand sizing property, e.g. "1em 2em 1em"
30
+ /// @param {Keyword} $side - Side to return. Should be `top`, `right`, `bottom`, or `left`.
31
+ ///
32
+ /// @returns {Number} A single value based on `$val` and `$side`.
33
+ @function get-side($val, $side) {
34
+ $length: length($val);
35
+
36
+ @if $length == 1 {
37
+ @return $val;
38
+ }
39
+ @if $length == 2 {
40
+ @return map-get((
41
+ top: nth($val, 1),
42
+ bottom: nth($val, 1),
43
+ left: nth($val, 2),
44
+ right: nth($val, 2),
45
+ ), $side);
46
+ }
47
+ @if $length == 3 {
48
+ @return map-get((
49
+ top: nth($val, 1),
50
+ left: nth($val, 2),
51
+ right: nth($val, 2),
52
+ bottom: nth($val, 3),
53
+ ), $side);
54
+ }
55
+ @if $length == 4 {
56
+ @return map-get((
57
+ top: nth($val, 1),
58
+ right: nth($val, 2),
59
+ bottom: nth($val, 3),
60
+ left: nth($val, 4),
61
+ ), $side);
62
+ }
63
+ }
64
+
65
+ /// Given border $val, find a specific element of the border, which is $elem. The possible values for $elem are width, style, and color.
66
+ ///
67
+ /// @param {List} $val - Border value to find a value in.
68
+ /// @param {Keyword} $elem - Border component to extract.
69
+ ///
70
+ /// @returns {Mixed} If the value exists, returns the value. If the value is not in the border definition, the function will return a 0px width, solid style, or black border.
71
+ @function get-border-value($val, $elem) {
72
+ // Find the width, style, or color and return it
73
+ @each $v in $val {
74
+ $type: type-of($v);
75
+ @if $elem == width and $type == 'number' {
76
+ @return $v;
77
+ }
78
+ @if $elem == style and $type == 'string' {
79
+ @return $v;
80
+ }
81
+ @if $elem == color and $type == 'color' {
82
+ @return $v;
83
+ }
84
+ }
85
+
86
+ // Defaults
87
+ $defaults: (
88
+ width: 0,
89
+ style: solid,
90
+ color: #000,
91
+ );
92
+
93
+ @return map-get($defaults, $elem);
94
+ }
95
+
96
+ /// Finds a value in a nested map.
97
+ /// @link https://css-tricks.com/snippets/sass/deep-getset-maps/ Deep Get/Set in Maps
98
+ ///
99
+ /// @param {Map} $map - Map to pull a value from.
100
+ /// @param {String} $keys... - Keys to use when looking for a value.
101
+ /// @returns {Mixed} The value found in the map.
102
+ @function map-deep-get($map, $keys...) {
103
+ @each $key in $keys {
104
+ $map: map-get($map, $key);
105
+ }
106
+ @return $map;
107
+ }
metadata ADDED
@@ -0,0 +1,199 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pusher-chameleon
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Alex Pate
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-10-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sass
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 3.2.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 3.2.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: gem_publisher
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 1.3.1
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.3.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 0.9.2.2
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 0.9.2.2
55
+ description: Chameleon holds various front-end assets that are shared across our products
56
+ email: ap@pusher.com
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - ".ruby-version"
62
+ - Gemfile
63
+ - Gemfile.lock
64
+ - README.md
65
+ - docs/.gitignore
66
+ - docs/Gemfile
67
+ - docs/Gemfile.lock
68
+ - docs/README.md
69
+ - docs/Rakefile
70
+ - docs/_config.production.yml
71
+ - docs/_config.yml
72
+ - docs/_includes/footer.html
73
+ - docs/_includes/head.html
74
+ - docs/_includes/header.html
75
+ - docs/_includes/icon-github.html
76
+ - docs/_includes/icon-github.svg
77
+ - docs/_includes/logo-pusher.svg
78
+ - docs/_includes/sidebar.html
79
+ - docs/_layouts/default.html
80
+ - docs/_layouts/page.html
81
+ - docs/_layouts/post.html
82
+ - docs/_plugins/chameleon_version.rb
83
+ - docs/_plugins/copy_images_directory.rb
84
+ - docs/_plugins/ext.rb
85
+ - docs/_posts/2016-03-16-getting-started.md
86
+ - docs/_posts/2016-03-16-introduction.md
87
+ - docs/_posts/2016-03-17-buttons.md
88
+ - docs/_posts/2016-03-17-colors.md
89
+ - docs/_posts/2016-03-17-flex.md
90
+ - docs/_posts/2016-03-17-forms.md
91
+ - docs/_posts/2016-03-17-visibility.md
92
+ - docs/_posts/2016-04-04-typography.md
93
+ - docs/_posts/2016-04-05-syntax-highlighting.md
94
+ - docs/_posts/2016-05-08-alerts.md
95
+ - docs/_posts/2016-05-12-labels.md
96
+ - docs/_posts/2016-05-13-tooltips.md
97
+ - docs/_sass/_base.scss
98
+ - docs/_sass/_chameleon_imports.scss
99
+ - docs/_sass/_layout.scss
100
+ - docs/_sass/_typography.scss
101
+ - docs/_sass/layout/_aside.scss
102
+ - docs/about.md
103
+ - docs/autoprefixer.yml
104
+ - docs/css/main.scss
105
+ - docs/feed.xml
106
+ - docs/index.html
107
+ - images/ui_icons/alert_beta.svg
108
+ - images/ui_icons/alert_info.svg
109
+ - images/ui_icons/alert_tick.svg
110
+ - images/ui_icons/alert_warning.svg
111
+ - images/ui_icons/chevron_down.svg
112
+ - images/ui_icons/github--active.svg
113
+ - images/ui_icons/github.svg
114
+ - images/ui_icons/google--active.svg
115
+ - images/ui_icons/google.svg
116
+ - images/ui_icons/plus.svg
117
+ - javascripts/chameleon/code_box.js
118
+ - javascripts/chameleon/pusher_featurette.js
119
+ - javascripts/chameleon/pusher_text_cycler.js
120
+ - lib/pusher-chameleon.rb
121
+ - lib/pusher-chameleon/engine.rb
122
+ - lib/pusher-chameleon/version.rb
123
+ - package.json
124
+ - pusher-chameleon.gemspec
125
+ - stylesheets/.gitkeep
126
+ - stylesheets/_base.scss
127
+ - stylesheets/_global.scss
128
+ - stylesheets/chameleon.scss
129
+ - stylesheets/components/_alert.scss
130
+ - stylesheets/components/_code_box.scss
131
+ - stylesheets/components/_flex_aligners.scss
132
+ - stylesheets/components/_label.scss
133
+ - stylesheets/components/_signpost.scss
134
+ - stylesheets/components/_spacers.scss
135
+ - stylesheets/components/_statistic.scss
136
+ - stylesheets/components/_tooltip.scss
137
+ - stylesheets/components/_visibility.scss
138
+ - stylesheets/forms/_base.scss
139
+ - stylesheets/forms/_buttons.scss
140
+ - stylesheets/forms/_checkbox.scss
141
+ - stylesheets/forms/_field.scss
142
+ - stylesheets/forms/_fieldset.scss
143
+ - stylesheets/forms/_forms.scss
144
+ - stylesheets/forms/_input.scss
145
+ - stylesheets/forms/_range.scss
146
+ - stylesheets/forms/_select.scss
147
+ - stylesheets/forms/_textarea.scss
148
+ - stylesheets/grid/_classes.scss
149
+ - stylesheets/grid/_column.scss
150
+ - stylesheets/grid/_flex-grid.scss
151
+ - stylesheets/grid/_grid.scss
152
+ - stylesheets/grid/_gutter.scss
153
+ - stylesheets/grid/_layout.scss
154
+ - stylesheets/grid/_position.scss
155
+ - stylesheets/grid/_row.scss
156
+ - stylesheets/grid/_size.scss
157
+ - stylesheets/typography/_base.scss
158
+ - stylesheets/typography/_helpers.scss
159
+ - stylesheets/typography/_import.scss
160
+ - stylesheets/typography/_syntax_highlighting.scss
161
+ - stylesheets/typography/_syntax_highlighting_dark.scss
162
+ - stylesheets/typography/_syntax_highlighting_light.scss
163
+ - stylesheets/typography/_titles.scss
164
+ - stylesheets/typography/_typography.scss
165
+ - stylesheets/util/_breakpoint.scss
166
+ - stylesheets/util/_color.scss
167
+ - stylesheets/util/_flex.scss
168
+ - stylesheets/util/_mixins.scss
169
+ - stylesheets/util/_selector.scss
170
+ - stylesheets/util/_unit.scss
171
+ - stylesheets/util/_url_helper.scss
172
+ - stylesheets/util/_util.scss
173
+ - stylesheets/util/_value.scss
174
+ homepage: https://github.com/pusher/chameleon
175
+ licenses:
176
+ - MIT
177
+ metadata: {}
178
+ post_install_message:
179
+ rdoc_options: []
180
+ require_paths:
181
+ - lib
182
+ - app
183
+ required_ruby_version: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ required_rubygems_version: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
193
+ requirements: []
194
+ rubyforge_project:
195
+ rubygems_version: 2.4.8
196
+ signing_key:
197
+ specification_version: 4
198
+ summary: Pusher Chameleon front-end asset library
199
+ test_files: []