shipyard-framework 0.5.55 → 0.5.56

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f40ecec157c31290f222df4bef18bce37cbe1014
4
- data.tar.gz: 6e82cc40048597c484009650f30f23df61df981b
3
+ metadata.gz: 6a6e5fe2e1a5a2fe2e9770d7dfb03f0c5189f449
4
+ data.tar.gz: f1f6d9613e5ea8dac457d5e34f1222ae6e6cfef0
5
5
  SHA512:
6
- metadata.gz: 2c7220f20c3bed855754189be9cd27285d4bc30275991a034f57e63e7c32aa8f80216415dce4a78b7b2d66d85538a56ab567ca2a5265306ca3856e4db07944f0
7
- data.tar.gz: 4d877afb8c01fc29be1e0b156adadb0899a7c13c38effa4c09283816f51335dc1215ccc8cb75f405b69eca8b8ac47c4c7fa7be44e826e7f01e4035bdf194ba9e
6
+ metadata.gz: 1943923e63586b092bc2710bbfcd2243d92dd080062881a76ef21ffbdd218186f48b72e41328b220d3c9f5dd81665bbb524711c531e2802a38c3a683026c44b3
7
+ data.tar.gz: c8bcb32fbced739b0fea2e3c64eda939ae37cc6a37efee2968bb24da25f8296cee2008ee08d15227e55b4570f020899ba7aeed2abd85e4f59927bca592c92217
@@ -4,9 +4,11 @@ module Shipyard
4
4
  include ActionView::Helpers::TagHelper
5
5
  include ActionView::Helpers::TextHelper
6
6
 
7
- def box(types, content)
7
+ def box(types=[], &block)
8
+ types = [*types]
9
+
8
10
  # Gather the appropriate box classes into an array.
9
- class_list = ['box']
11
+ class_list = types.include?(:secondary) ? [] : ['box']
10
12
  types.each do |type|
11
13
  class_list << "box-#{type}"
12
14
  end
@@ -16,7 +18,7 @@ module Shipyard
16
18
  options[:class] = class_list.join(' ')
17
19
 
18
20
  # Return the HTML structure for the box.
19
- content_tag :div, content, options
21
+ content_tag :div, capture(&block), options
20
22
  end
21
23
  end
22
24
  end
@@ -4,13 +4,12 @@ module Shipyard
4
4
  include ActionView::Helpers::TagHelper
5
5
  include ActionView::Helpers::TextHelper
6
6
 
7
- def note(type, content)
7
+ def note(type, content, options={})
8
8
  # Gather the appropriate box classes into an array.
9
9
  class_list = ['note']
10
10
  class_list << "note-#{type}" if type
11
11
 
12
12
  # Join the CSS Classes together.
13
- options ||= {}
14
13
  options[:class] = class_list.join(' ')
15
14
 
16
15
  # Return the HTML structure for the box.
@@ -1,17 +1,6 @@
1
- @import shipyard/variables/colors
2
- @import shipyard/functions/map-merge-options
3
- @import shipyard/functions/color
4
- @import shipyard/variables/color_utilities
5
- @import shipyard/variables/typography
6
- @import shipyard/variables/grid
7
- @import shipyard/variables/misc
8
- @import shipyard/variables/components
9
- @import shipyard/mixins/box-model
10
- @import shipyard/mixins/selectors
11
- @import shipyard/mixins/responsive
12
- @import shipyard/mixins/components
13
- @import shipyard/mixins/positioning
14
- @import shipyard/mixins/prefixed
1
+ @import shipyard/functions
2
+ @import shipyard/mixins
3
+ @import shipyard/variables
15
4
  @import shipyard/core/animations
16
5
  @import shipyard/core/reset
17
6
  @import shipyard/core/typography
@@ -0,0 +1,2 @@
1
+ @import shipyard/functions/map-merge-options
2
+ @import shipyard/functions/color
@@ -0,0 +1,6 @@
1
+ @import shipyard/mixins/box-model
2
+ @import shipyard/mixins/selectors
3
+ @import shipyard/mixins/responsive
4
+ @import shipyard/mixins/components
5
+ @import shipyard/mixins/positioning
6
+ @import shipyard/mixins/prefixed
@@ -0,0 +1,6 @@
1
+ @import shipyard/variables/colors
2
+ @import shipyard/variables/color_utilities
3
+ @import shipyard/variables/typography
4
+ @import shipyard/variables/grid
5
+ @import shipyard/variables/misc
6
+ @import shipyard/variables/components
@@ -4,7 +4,6 @@
4
4
  border-radius: 5px
5
5
  border: 0
6
6
  cursor: pointer
7
- color: #fff
8
7
  transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease, opacity 300ms ease
9
8
  outline: none
10
9
  border-width: 2px
@@ -151,11 +150,6 @@
151
150
  &-inverse
152
151
  +btn-color(#fff, inherit)
153
152
  +btn-hover($blue, #fff)
154
- &.btn-current
155
- +btn-hover(#fff, inherit)
156
153
  &-secondary
157
154
  +btn-color(transparent, #fff, rgba(#fff,.2))
158
155
  +btn-hover(transparent, #fff, rgba(#fff,.5))
159
-
160
- &-current
161
- cursor: default
@@ -25,12 +25,12 @@
25
25
  +respond-to(top, (x0: -7px, x1: -8px))
26
26
  .hamburger-button-clicked &
27
27
  top: 0
28
- +rotate(45deg)
28
+ transform: rotate(45deg)
29
29
  &:after
30
30
  +respond-to(bottom, (x0: -8px, x1: -9px))
31
31
  .hamburger-button-clicked &
32
32
  bottom: 0
33
- +rotate(-45deg)
33
+ transform: rotate(-45deg)
34
34
 
35
35
  // --------------------------------------------------
36
36
  // Hamburger: Button
@@ -2,7 +2,7 @@
2
2
  display: block
3
3
  position: relative
4
4
  +respond-to(min-height, (x0: 50px, x1: 60px))
5
- +respond-to(margin-bottom, (x0: 10px, x1: 15px))
5
+ +respond-to(margin, (x0: 10px 0, x1: 15px 0))
6
6
  +respond-to(padding, (x0: 12px 10px, x1: 17px 20px, x2: 17px 30px))
7
7
  a, strong, .strong
8
8
  &:not(.btn)
@@ -12,6 +12,3 @@
12
12
 
13
13
  *:-moz-focusring
14
14
  outline: none
15
-
16
- button
17
- font: inherit
@@ -15,16 +15,16 @@ a, .link
15
15
  color: darken($blue, 10%)
16
16
  text-decoration: underline
17
17
 
18
- hr
18
+ +component('hr')
19
19
  height: 0
20
20
  border: 0 solid $border-color-light
21
21
  border-width: 2px 0 0
22
22
  +respond-to(margin, (x0: 20px 0, x1: 30px 0))
23
- &.dark
23
+ &-dark
24
24
  border-color: $border-color
25
- &.lightest
25
+ &-light
26
26
  border-color: $border-color-lightest
27
- &.thin
27
+ &-thin
28
28
  border-width: 1px 0 0
29
29
 
30
30
  strong
@@ -47,6 +47,7 @@ img
47
47
  display: block
48
48
 
49
49
  button
50
+ font: inherit
50
51
  background: none
51
52
  border: none
52
53
  cursor: pointer
@@ -1,9 +1,3 @@
1
- @mixin rotate($deg)
2
- -ms-transform: rotate($deg)
3
- -moz-transform: rotate($deg)
4
- -webkit-transform: rotate($deg)
5
- transform: rotate($deg)
6
-
7
1
  @mixin appearance($value)
8
2
  appearance: $value
9
3
  -moz-appearance: $value
@@ -1,4 +1,4 @@
1
- $widths: (auto, 5, 10, 15, 20, 25, 30, 33, 35, 40, 45, 50, 55, 60, 65, 66, 70, 75, 80, 85, 90, 95, 100)
1
+ $widths: (5, 10, 15, 20, 25, 30, 33, 35, 40, 45, 50, 55, 60, 65, 66, 70, 75, 80, 85, 90, 95, 100)
2
2
 
3
3
  @mixin column-style($property, $width)
4
4
  @if $width == auto
@@ -14,7 +14,7 @@ module Shipyard
14
14
  end
15
15
 
16
16
  def render(context)
17
- box @types, raw(super.strip)
17
+ box(@types) { raw(super.strip) }
18
18
  end
19
19
  end
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module Shipyard
2
- VERSION = '0.5.55'
2
+ VERSION = '0.5.56'
3
3
  end
@@ -3,19 +3,25 @@ require 'spec_helper'
3
3
  RSpec.describe Shipyard::BoxHelper, type: :helper do
4
4
  include Shipyard::BoxHelper
5
5
 
6
- xit 'should return a default box' do
6
+ it 'should return a default box' do
7
7
  expect(box { 'test' }).to match(%r{<div class="box">test</div>})
8
8
  end
9
9
 
10
10
  it 'should return all box types' do
11
- %w(secondary padding link).each do |type|
12
- expect(box([type.to_sym], 'test')).to match(%r{<div class="box box-#{type}">test</div>})
11
+ types = %w(secondary padding link).map(&:to_sym)
12
+ types.each do |type|
13
+ if type == :secondary
14
+ expect(box(type) { 'test' }).to match(%r{<div class="box-#{type}">test</div>})
15
+ else
16
+ expect(box(type) { 'test' }).to match(%r{<div class="box box-#{type}">test</div>})
17
+ end
13
18
  end
14
19
  end
15
20
 
16
21
  it 'should return all box sizes' do
17
- %w(xxs xs sm md lg xl).each do |size|
18
- expect(box([size.to_sym], 'test')).to match(%r{<div class="box box-#{size}">test</div>})
22
+ sizes = %w(xxs xs sm md lg xl xxl).map(&:to_sym)
23
+ sizes.each do |size|
24
+ expect(box(size) { 'test' }).to match(%r{<div class="box box-#{size}">test</div>})
19
25
  end
20
26
  end
21
27
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- shipyard-framework (0.5.54)
4
+ shipyard-framework (0.5.56)
5
5
  actionview (~> 5.0)
6
6
  sprockets-es6 (~> 0.9.2)
7
7
 
@@ -101,7 +101,7 @@ GEM
101
101
  babel-transpiler
102
102
  sprockets (>= 3.0.0)
103
103
  thread_safe (0.3.6)
104
- tzinfo (1.2.3)
104
+ tzinfo (1.2.4)
105
105
  thread_safe (~> 0.1)
106
106
 
107
107
  PLATFORMS
@@ -1,9 +1,3 @@
1
- $font-family: "museo-sans-rounded", "Museo Sans Rounded", Arial, sans-serif
2
- $font-monospace: 'Roboto Mono', monospace
3
- @import shipyard
4
- @import shipyard/components/header
5
- @import url('https://use.typekit.net/wel6tpj.css')
6
- @import url('https://fonts.googleapis.com/css?family=Roboto+Mono')
7
-
1
+ @import vendor
8
2
  @import layout
9
3
  @import views
@@ -0,0 +1,6 @@
1
+ $font-family: "museo-sans-rounded", "Museo Sans Rounded", Arial, sans-serif
2
+ $font-monospace: 'Roboto Mono', monospace
3
+ @import shipyard
4
+ @import shipyard/components/header
5
+ @import url('https://use.typekit.net/wel6tpj.css')
6
+ @import url('https://fonts.googleapis.com/css?family=Roboto+Mono')
@@ -1,13 +1,14 @@
1
- // Code Styles
2
- code
3
- li &, p &, h1 &, h2 &, h3 &
4
- margin: 0 3px
5
- @extend .code-inline
6
- div.highlighter-rouge &
7
- @extend .code-block
8
- margin: 15px 0
1
+ // Code "Span"
2
+ code.highlighter-rouge
3
+ @extend .code-inline
4
+ margin: 0 3px
5
+
6
+ // Code "Block"
7
+ .code-block
8
+ margin: 15px 0
9
9
 
10
10
  hr
11
+ @extend .hr
11
12
  +respond-to(margin, (x0: 30px 0, x1: 40px 0, x2: 50px 0))
12
13
 
13
14
  // Utilities: Colors
@@ -63,3 +64,20 @@ hr
63
64
  min-height: 30px
64
65
  flex-direction: column
65
66
  justify-content: center
67
+
68
+ +component('utilities-typography')
69
+ &-hr
70
+ margin: 0 30px
71
+ &-box
72
+ &,
73
+ &-dark,
74
+ &-light,
75
+ &-default
76
+ padding: 30px 0
77
+ margin: 15px 0
78
+ &-dark
79
+ background: $gray-lighter
80
+ &-light
81
+ background: #fff
82
+ &-default
83
+ border: 2px solid $border-color-light
@@ -27,6 +27,20 @@ sass:
27
27
 
28
28
  # Build settings
29
29
  markdown: kramdown
30
+ kramdown:
31
+ syntax_highlighter: rouge
32
+ syntax_highlighter_opts:
33
+ default_lang: html
34
+ block:
35
+ css: class
36
+ wrap: true
37
+ disable: false
38
+ css_class: 'code-block'
39
+ span:
40
+ css: class
41
+ wrap: true
42
+ disable: false
43
+ css_class: 'code-inline'
30
44
  plugins:
31
45
  - jekyll-assets
32
46
  - shipyard-framework
@@ -11,8 +11,10 @@ description: Notes should be used to grab a user's attention along side of other
11
11
  <p class="text-light margin-bottom-sm">Used to display notes, tips, and other non-critical information.</p>
12
12
 
13
13
  {% note %}
14
- Ten other people are also viewing tickets for <a href="#">this flight</a>.
15
- Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
14
+ <p markdown="1">
15
+ Ten other people are also viewing tickets for [this flight](#).
16
+ Use the code `Travel_Light_2017` before you book your flight.
17
+ </p>
16
18
  {% btn Call to Action, :sm, class: 'note-cta' %}
17
19
  {% endnote %}
18
20
 
@@ -22,8 +24,10 @@ description: Notes should be used to grab a user's attention along side of other
22
24
  <p class="text-light margin-bottom-sm">Useful when drawing attention to non-critical information or actions we want the user to take.</p>
23
25
 
24
26
  {% note :info %}
25
- Ten other people are also viewing tickets for <a href="#">this flight</a>.
26
- Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
27
+ <p markdown="1">
28
+ Ten other people are also viewing tickets for [this flight](#).
29
+ Use the code `Travel_Light_2017` before you book your flight.
30
+ </p>
27
31
  {% btn Call to Action, :sm, class: 'note-cta' %}
28
32
  {% endnote %}
29
33
 
@@ -33,8 +37,10 @@ description: Notes should be used to grab a user's attention along side of other
33
37
  <p class="text-light margin-bottom-sm">Useful when drawing attention to interactions that have produced successful results.</p>
34
38
 
35
39
  {% note :success %}
36
- Pack your bags! You'll be on the next flight to Hawaii.
37
- Use the code <code class="code-inline">Travel_Light_2017</code> on your next flight. In the meantime you can <a href="#">invite a friend</a> to this flight.
40
+ <p markdown="1">
41
+ Pack your bags! You'll be on the next flight to Hawaii.
42
+ Use the code `Travel_Light_2017` on your next flight. In the meantime you can [invite a friend](#) to this flight.
43
+ </p>
38
44
  {% btn Call to Action, :sm, class: 'note-cta' %}
39
45
  {% endnote %}
40
46
 
@@ -44,7 +50,9 @@ description: Notes should be used to grab a user's attention along side of other
44
50
  <p class="text-light margin-bottom-sm">Useful when drawing attention to critical information.</p>
45
51
 
46
52
  {% note :warning %}
47
- There are only 2 seats left on this flight! We recommend to <a href="#">book your tickets</a> as soon as possible.
48
- Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
53
+ <p markdown="1">
54
+ There are only 2 seats left on this flight! We recommend to [book your tickets](#) as soon as possible.
55
+ Use the code `Travel_Light_2017` before you book your flight.
56
+ </p>
49
57
  {% btn Call to Action, :sm, class: 'note-cta' %}
50
58
  {% endnote %}
@@ -67,3 +67,59 @@ text_shades: [normal, light, lighter, lightest]
67
67
  </div>
68
68
  </div>
69
69
  </div>
70
+
71
+ ---
72
+
73
+ ## Horizontal Rules
74
+ <p class="text-light margin-bottom-md" markdown="1">Shipyard doesn't make any assumptions on how you want to common tags like an `hr` to styled. As a result, we would recommend extending the `.hr` class in your own SASS files to achieve the results below on all `hr` tags (e.g. `@extend .hr`).</p>
75
+
76
+ <div class="utilities-typography-hr-box-default">
77
+ <hr class="utilities-typography-hr" />
78
+ </div>
79
+ <div class="utilities-typography-hr-box-dark">
80
+ <hr class="utilities-typography-hr hr-dark" />
81
+ </div>
82
+ <div class="utilities-typography-hr-box-light">
83
+ <hr class="utilities-typography-hr hr-light" />
84
+ </div>
85
+
86
+ {% note :warning %}
87
+ <p markdown="1">
88
+ Please note that the code examples below are **not possible** without `hr { @extend .hr }` somewhere in your application's sass files. If you haven't done this, then you'll need to include the `.hr` class on every horizontal rule.
89
+ </p>
90
+ {% endnote %}
91
+
92
+ ```html
93
+ <hr />
94
+
95
+ <!-- Useful on darker backgrounds. -->
96
+ <hr class="hr-dark" />
97
+
98
+ <!-- Useful on lighter backgrounds. -->
99
+ <hr class="hr-light" />
100
+ ```
101
+
102
+ ---
103
+
104
+ ## Thin Horizontal Rules `.hr-thin`
105
+ {: .margin-bottom-md }
106
+
107
+ <div class="utilities-typography-hr-box-default">
108
+ <hr class="utilities-typography-hr hr-thin" />
109
+ </div>
110
+ <div class="utilities-typography-hr-box-dark">
111
+ <hr class="utilities-typography-hr hr-dark hr-thin" />
112
+ </div>
113
+ <div class="utilities-typography-hr-box-light">
114
+ <hr class="utilities-typography-hr hr-light hr-thin" />
115
+ </div>
116
+
117
+ ```html
118
+ <hr class="hr-thin" />
119
+
120
+ <!-- Useful on darker backgrounds. -->
121
+ <hr class="hr-thin hr-dark" />
122
+
123
+ <!-- Useful on lighter backgrounds. -->
124
+ <hr class="hr-thin hr-light" />
125
+ ```
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shipyard-framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.55
4
+ version: 0.5.56
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codeship
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-26 00:00:00.000000000 Z
11
+ date: 2017-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -208,7 +208,10 @@ files:
208
208
  - assets/stylesheets/_shipyard.sass
209
209
  - assets/stylesheets/shipyard/_components.sass
210
210
  - assets/stylesheets/shipyard/_core.sass
211
+ - assets/stylesheets/shipyard/_functions.sass
212
+ - assets/stylesheets/shipyard/_mixins.sass
211
213
  - assets/stylesheets/shipyard/_utilities.sass
214
+ - assets/stylesheets/shipyard/_variables.sass
212
215
  - assets/stylesheets/shipyard/components/_alerts.sass
213
216
  - assets/stylesheets/shipyard/components/_boxes.sass
214
217
  - assets/stylesheets/shipyard/components/_buttons.sass
@@ -284,6 +287,7 @@ files:
284
287
  - styleguide/Gemfile.lock
285
288
  - styleguide/_assets/css/application.sass
286
289
  - styleguide/_assets/css/layout.sass
290
+ - styleguide/_assets/css/vendor.sass
287
291
  - styleguide/_assets/css/views.sass
288
292
  - styleguide/_assets/js/application.es6
289
293
  - styleguide/_assets/js/views/utilities/colors.es6
@@ -309,7 +313,7 @@ files:
309
313
  - styleguide/utilities/index.md
310
314
  - styleguide/utilities/margin-padding.md
311
315
  - styleguide/utilities/responsive.md
312
- - styleguide/utilities/typography.html
316
+ - styleguide/utilities/typography.md
313
317
  homepage: https://github.com/codeship/shipyard
314
318
  licenses:
315
319
  - MIT