shipyard-framework 0.4.9 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e59c5563374fc7313cf537453ffad9671bcace4
4
- data.tar.gz: 5722d536bc665e1d0a84ddad0de047e5404010f3
3
+ metadata.gz: 99773df6e410fe11031d0952d7e3e2aa04591241
4
+ data.tar.gz: 9d2402c4c281779799c1f008fb635b6e979ef25e
5
5
  SHA512:
6
- metadata.gz: 47d6703a49855d7bfb25af458c451b058cb68a0e61d2613e17d66c383819c1888dd94055a1cfabc5d96ed88527838d24001ccc223f7b7d40d4c08770d42d3d61
7
- data.tar.gz: b81263634628232f399496f0362b67d8372da0d2d7bee106598bcdcc725335edcaec173593a51dc98d1bcde82fbbabb3da0aa9c8fa3171428a8450f5d6c4fc3b
6
+ metadata.gz: 969689dd5064d951992920c8bd8bb03edcd947580114416dea53c779710f245c15ad00e9fe94c54ed0f5bff4427c3b149b976c27e8b45ae528738e128a360ea5
7
+ data.tar.gz: 8523e6bf496dfa3afeec3c59abf0f81afdd136b934c346e57ab38d4c0f516a557691d5f30a3d6f7549a421ef58830b9e618a7572c024e95908aa23e902720487
@@ -16,6 +16,7 @@ module Shipyard
16
16
 
17
17
  # Output the appropriate button.
18
18
  if options.key?(:href)
19
+ options[:role] = :button
19
20
  link_to text, options[:href], btn_options(args, options)
20
21
  else
21
22
  content_tag :button, text, btn_options(args, options)
@@ -1,9 +1,10 @@
1
1
  +component('alert')
2
2
  display: block
3
3
  border-radius: 5px
4
- background: $blue
5
- color: rgba(#fff,.9)
4
+ background: $gray
5
+ color: $gray-lightest
6
6
  position: relative
7
+ text-shadow: 0 1px 0 rgba(#000,.08)
7
8
  +respond-to(min-height, (x0: 50px, x1: 60px))
8
9
  +respond-to(margin-bottom, (x0: 10px, x1: 15px))
9
10
  +respond-to(padding, (x0: 12px 10px, x1: 17px 20px, x2: 17px 30px))
@@ -24,23 +25,27 @@
24
25
  background: rgba(#fff, .25)
25
26
  transform: translatex(-100%)
26
27
  animation: slide-in-from-left 10s linear 0s forwards
27
- &-txt,
28
- &-txt p
29
- margin: 0
30
- font-weight: $medium
31
- .legacy-content &
32
- font-size: $font-size
33
- line-height: inherit
28
+
29
+ // Alert: Types
34
30
  &-success
31
+ color: $green-lightest
35
32
  background: darken($green, 5%)
36
33
  &-warning
34
+ color: $yellow-lightest
37
35
  background: darken($yellow, 20%)
38
36
  &-error
37
+ color: $red-lightest
39
38
  background: $red
40
- &-description
41
- opacity: 0.75
39
+ &-info
40
+ background: $blue
41
+ color: $blue-lightest
42
+
43
+ // Alert: Sub-components
44
+ &-txt,
45
+ &-txt p
46
+ margin: 0
47
+ font-weight: $medium
42
48
  &-cta
43
- +btn-color(darken($blue, 10%))
44
49
  +breakpoint-x0
45
50
  display: block
46
51
  text-align: center
@@ -88,6 +88,21 @@
88
88
  max-width: 600px
89
89
  margin: 0 auto
90
90
 
91
+ // Alert Buttons
92
+ .alert &
93
+ +btn-color(darken($gray, 20%))
94
+ +btn-hover(darken($gray, 25%))
95
+ .alert-info &
96
+ +btn-color(darken($blue, 10%))
97
+ +btn-hover(darken($blue, 15%))
98
+ .alert-warning &
99
+ +btn-color($yellow-darker)
100
+ +btn-hover($yellow-darkest)
101
+ .alert-success &
102
+ +extend('cta')
103
+ .alert-error &
104
+ +extend('caution')
105
+
91
106
  &-margin
92
107
  margin: 0 5px
93
108
  &-lg
@@ -107,6 +122,14 @@
107
122
  +btn-color(none, darken($text-color-light, 5%), lighten($gray-light, 5%))
108
123
  +btn-hover(none, darken($text-color-light, 20%), darken($gray-light, 5%))
109
124
 
125
+ &-caution
126
+ +btn-color($red-dark)
127
+ +btn-hover($red-darker)
128
+
129
+ &-cta
130
+ +btn-color($green-dark)
131
+ +btn-hover($green-darker)
132
+
110
133
  &-checked
111
134
  &, &:active, &:hover, &:focus
112
135
  +btn-color($green-dark, #fff)
@@ -22,6 +22,8 @@
22
22
  .alert &
23
23
  color: #fff
24
24
  margin: 0 2px
25
+ border-color: darken($gray, 10%)
26
+ background-color: darken($gray, 5%)
25
27
  .alert-info &
26
28
  border-color: darken($blue, 10%)
27
29
  background-color: darken($blue, 5%)
@@ -32,5 +34,5 @@
32
34
  border-color: $yellow-darker
33
35
  background-color: darken($yellow-dark, 5%)
34
36
  .alert-success &
35
- border-color: darken($green, 15%)
37
+ border-color: $green-dark
36
38
  background-color: darken($green, 10%)
@@ -1,73 +1,74 @@
1
1
  // Gray
2
2
  $gray: color('gray') !default
3
- $gray-light: color('gray', light) !default
4
- $gray-lighter: color('gray', lighter) !default
5
- $gray-lightest: color('gray', lightest) !default
6
- $gray-dark: color('gray', dark) !default
7
- $gray-darkest: color('gray', darkest) !default
3
+ $gray-light: color('gray', 'light') !default
4
+ $gray-lighter: color('gray', 'lighter') !default
5
+ $gray-lightest: color('gray', 'lightest') !default
6
+ $gray-dark: color('gray', 'dark') !default
7
+ $gray-darkest: color('gray', 'darkest') !default
8
8
 
9
9
  // Green
10
10
  $green: color('green') !default
11
- $green-light: color('green', light) !default
12
- $green-lightest: color('green', lightest) !default
13
- $green-dark: color('green', dark) !default
14
- $green-darkest: color('green', darkest) !default
11
+ $green-light: color('green', 'light') !default
12
+ $green-lightest: color('green', 'lightest') !default
13
+ $green-dark: color('green', 'dark') !default
14
+ $green-darker: color('green', 'darker') !default
15
+ $green-darkest: color('green', 'darkest') !default
15
16
 
16
17
  // Blue
17
18
  $blue: color('blue') !default
18
- $blue-light: color('blue', light) !default
19
- $blue-lightest: color('blue', lightest) !default
20
- $blue-dark: color('blue', dark) !default
21
- $blue-darkest: color('blue', darkest) !default
19
+ $blue-light: color('blue', 'light') !default
20
+ $blue-lightest: color('blue', 'lightest') !default
21
+ $blue-dark: color('blue', 'dark') !default
22
+ $blue-darkest: color('blue', 'darkest') !default
22
23
 
23
24
  // Teal
24
25
  $teal: color('teal') !default
25
- $teal-light: color('teal', light) !default
26
- $teal-lightest: color('teal', lightest) !default
27
- $teal-dark: color('teal', dark) !default
28
- $teal-darkest: color('teal', darkest) !default
26
+ $teal-light: color('teal', 'light') !default
27
+ $teal-lightest: color('teal', 'lightest') !default
28
+ $teal-dark: color('teal', 'dark') !default
29
+ $teal-darkest: color('teal', 'darkest') !default
29
30
 
30
31
  // Red
31
32
  $red: color('red') !default
32
- $red-light: color('red', light) !default
33
- $red-lighter: color('red', lighter) !default
34
- $red-lightest: color('red', lightest) !default
35
- $red-dark: color('red', dark) !default
36
- $red-darker: color('red', darker) !default
37
- $red-darkest: color('red', darkest) !default
33
+ $red-light: color('red', 'light') !default
34
+ $red-lighter: color('red', 'lighter') !default
35
+ $red-lightest: color('red', 'lightest') !default
36
+ $red-dark: color('red', 'dark') !default
37
+ $red-darker: color('red', 'darker') !default
38
+ $red-darkest: color('red', 'darkest') !default
38
39
 
39
40
  // Yellow
40
41
  $yellow: color('yellow') !default
41
- $yellow-light: color('yellow', light) !default
42
- $yellow-lighter: color('yellow', lighter) !default
43
- $yellow-lightest: color('yellow', lightest) !default
44
- $yellow-dark: color('yellow', dark) !default
45
- $yellow-darker: color('yellow', darker) !default
46
- $yellow-darkest: color('yellow', darkest) !default
42
+ $yellow-light: color('yellow', 'light') !default
43
+ $yellow-lighter: color('yellow', 'lighter') !default
44
+ $yellow-lightest: color('yellow', 'lightest') !default
45
+ $yellow-dark: color('yellow', 'dark') !default
46
+ $yellow-darker: color('yellow', 'darker') !default
47
+ $yellow-darkest: color('yellow', 'darkest') !default
47
48
 
48
49
  // Orange
49
50
  $orange: color('orange') !default
50
- $orange-light: color('orange', light) !default
51
- $orange-lighter: color('orange', lighter) !default
52
- $orange-lightest: color('orange', lightest) !default
53
- $orange-dark: color('orange', dark) !default
54
- $orange-darker: color('orange', darker) !default
55
- $orange-darkest: color('orange', darkest) !default
51
+ $orange-light: color('orange', 'light') !default
52
+ $orange-lighter: color('orange', 'lighter') !default
53
+ $orange-lightest: color('orange', 'lightest') !default
54
+ $orange-dark: color('orange', 'dark') !default
55
+ $orange-darker: color('orange', 'darker') !default
56
+ $orange-darkest: color('orange', 'darkest') !default
56
57
 
57
58
  // Coral
58
59
  $coral: color('coral') !default
59
- $coral-light: color('coral', light) !default
60
- $coral-lighter: color('coral', lighter) !default
61
- $coral-lightest: color('coral', lightest) !default
62
- $coral-dark: color('coral', dark) !default
63
- $coral-darker: color('coral', darker) !default
64
- $coral-darkest: color('coral', darkest) !default
60
+ $coral-light: color('coral', 'light') !default
61
+ $coral-lighter: color('coral', 'lighter') !default
62
+ $coral-lightest: color('coral', 'lightest') !default
63
+ $coral-dark: color('coral', 'dark') !default
64
+ $coral-darker: color('coral', 'darker') !default
65
+ $coral-darkest: color('coral', 'darkest') !default
65
66
 
66
67
  // Purple
67
68
  $purple: color('purple') !default
68
- $purple-light: color('purple', light) !default
69
- $purple-lighter: color('purple', lighter) !default
70
- $purple-lightest: color('purple', lightest) !default
71
- $purple-dark: color('purple', dark) !default
72
- $purple-darker: color('purple', darker) !default
73
- $purple-darkest: color('purple', darkest) !default
69
+ $purple-light: color('purple', 'light') !default
70
+ $purple-lighter: color('purple', 'lighter') !default
71
+ $purple-lightest: color('purple', 'lightest') !default
72
+ $purple-dark: color('purple', 'dark') !default
73
+ $purple-darker: color('purple', 'darker') !default
74
+ $purple-darkest: color('purple', 'darkest') !default
@@ -8,23 +8,27 @@ $colors: (
8
8
  darkest: #1e252c
9
9
  ),
10
10
  "green": (
11
- base: #3acc7c,
12
- light: #97ffc6,
13
- lightest: #b5ffd6,
14
- dark: #2c995d,
15
- darkest: #1d663e
11
+ base: darken(#3acc7c, 3%),
12
+ light: lighten(#3acc7c, 15%),
13
+ lighter: lighten(#3acc7c, 30%),
14
+ lightest: lighten(#3acc7c, 41%),
15
+ dark: darken(#3acc7c, 18%),
16
+ darker: darken(#3acc7c, 26%),
17
+ darkest: darken(#3acc7c, 32%)
16
18
  ),
17
19
  "blue": (
18
20
  base: #1ca1e3,
19
21
  light: #5eb9e6,
20
- lightest: #9ed8f5,
22
+ lighter: #9ed8f5,
23
+ lightest: lighten(#9ed8f5, 10%),
21
24
  dark: #0075b0,
22
25
  darkest: #004d73
23
26
  ),
24
27
  "teal": (
25
28
  base: #20a5a8,
26
29
  light: #6ab7b9,
27
- lightest: #b2dbdc,
30
+ lighter: #b2dbdc,
31
+ lightest: lighten(#b2dbdc, 13%),
28
32
  dark: #0e6e70,
29
33
  darkest: #00494b
30
34
  ),
@@ -32,7 +36,7 @@ $colors: (
32
36
  base: #e06158,
33
37
  light: lighten(#e06158, 8%),
34
38
  lighter: lighten(#e06158, 16%),
35
- lightest: lighten(#e06158, 25%),
39
+ lightest: lighten(#e06158, 32%),
36
40
  dark: #b13b39,
37
41
  darker: #892120,
38
42
  darkest: desaturate(darken(#892120, 8%), 0%)
@@ -7,11 +7,15 @@ module Shipyard
7
7
 
8
8
  def initialize(tag_name, type, options)
9
9
  super
10
- @type = type.tr(':','').to_sym
10
+ @type = type.tr(':','').to_sym unless type.blank?
11
11
  end
12
12
 
13
13
  def render(context)
14
- flash_alert @type, super
14
+ if @type
15
+ flash_alert @type, super
16
+ else
17
+ flash_alert super
18
+ end
15
19
  end
16
20
  end
17
21
  end
@@ -1,3 +1,3 @@
1
1
  module Shipyard
2
- VERSION = '0.4.9'
2
+ VERSION = '0.5.0'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- shipyard-framework (0.4.9)
4
+ shipyard-framework (0.5.0)
5
5
  actionview (~> 5.0)
6
6
 
7
7
  GEM
@@ -84,4 +84,4 @@ DEPENDENCIES
84
84
  shipyard-framework!
85
85
 
86
86
  BUNDLED WITH
87
- 1.15.4
87
+ 1.16.0.pre.2
@@ -1,3 +1,12 @@
1
+ // Global Styles
2
+ p, h1, h2, h3
3
+ code
4
+ margin: 0 5px
5
+ @extend .code-inline
6
+
7
+ hr
8
+ margin: 50px 0
9
+
1
10
  // Utilities: Colors
2
11
  +component('shade')
3
12
  &-list
@@ -3,25 +3,59 @@ title: Shipyard Alerts
3
3
  ---
4
4
 
5
5
  # {{ page.title }}
6
+ <p class="text-light text-lg margin-top-xxs">Alerts should be used to grab a user's attention before proceeding to the next action. They are commonly found at the very top of the page directly above the content.</p>
6
7
 
7
8
  ---
8
9
 
10
+ ### Default `.alert`
11
+ <p class="text-light margin-bottom-sm">Used to display notes, tips, and other non-critical information.</p>
12
+
13
+ {% alert %}
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.
16
+ {% btn Call to Action, :sm, class: 'alert-cta' %}
17
+ {% endalert %}
18
+
19
+ ---
20
+
21
+ ### Info `.alert-info`
22
+ <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
+
9
24
  {% alert :info %}
10
- Ten other people are also viewing tickets for this flight.
25
+ Ten other people are also viewing tickets for <a href="#">this flight</a>.
11
26
  Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
27
+ {% btn Call to Action, :sm, class: 'alert-cta' %}
12
28
  {% endalert %}
13
29
 
30
+ ---
31
+
32
+ ### Success `.alert-success`
33
+ <p class="text-light margin-bottom-sm">Useful when drawing attention to interactions that have produced successful results.</p>
34
+
14
35
  {% alert :success %}
15
36
  Pack your bags! You'll be on the next flight to Hawaii.
16
- Use the code <code class="code-inline">Travel_Light_2017</code> on your next flight.
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.
38
+ {% btn Call to Action, :sm, class: 'alert-cta' %}
17
39
  {% endalert %}
18
40
 
41
+ ---
42
+
43
+ ### Warning `.alert-warning`
44
+ <p class="text-light margin-bottom-sm">Useful when drawing attention to critical, time-sensitive information &mdash; even if nothing has gone wrong.</p>
45
+
19
46
  {% alert :warning %}
20
47
  There are only 2 seats left on this flight! We recommend to book your tickets as soon as possible.
21
48
  Use the code <code class="code-inline">Travel_Light_2017</code> before you book your flight.
49
+ {% btn Call to Action, :sm, class: 'alert-cta' %}
22
50
  {% endalert %}
23
51
 
52
+ ---
53
+
54
+ ### Error `.alert-error`
55
+ <p class="text-light margin-bottom-sm">Useful when drawing attention to something that has gone critically wrong.</p>
56
+
24
57
  {% alert :error %}
25
58
  This flight is now sold out. Let's get you on the next flight to Kauai.
26
59
  We hope the code <code class="code-inline">Travel_Light_2017</code> will be useful for your next flight.
60
+ {% btn Call to Action, :sm, class: 'alert-cta' %}
27
61
  {% endalert %}
@@ -12,6 +12,8 @@ title: Shipyard Buttons
12
12
  {% btn Primary, :primary %}
13
13
  {% btn Secondary, :secondary %}
14
14
  {% btn Disabled, :disabled %}
15
+ {% btn CTA, :cta %}
16
+ {% btn Caution, :caution %}
15
17
  </div>
16
18
  <div class="box-secondary box-padding align-center bg-gray-dark">
17
19
  {% btn Inverse, :inverse %}
@@ -20,6 +22,14 @@ title: Shipyard Buttons
20
22
 
21
23
  <hr />
22
24
 
25
+ <div class="box-padding align-center">
26
+ {% btn Button %}
27
+ <a href="#" class="btn">Link</a>
28
+ <input type="button" class="btn" value="Input" />
29
+ </div>
30
+
31
+ <hr />
32
+
23
33
  <h2>Button Sizes (default: md)</h2>
24
34
  <div class="box-padding align-center">
25
35
  {% btn XX-Small, :xxs %}
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.4.9
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shipyard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-01 00:00:00.000000000 Z
11
+ date: 2017-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview