shipyard-framework 0.6.1 → 0.7.0

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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/assets/javascripts/shipyard/modal.js +2 -2
  3. data/assets/stylesheets/shipyard/_components.sass +4 -0
  4. data/assets/stylesheets/shipyard/_mixins.sass +2 -0
  5. data/assets/stylesheets/shipyard/_utilities.sass +22 -8
  6. data/assets/stylesheets/shipyard/_variables.sass +1 -3
  7. data/assets/stylesheets/shipyard/{utilities → components}/_accordion.sass +4 -4
  8. data/assets/stylesheets/shipyard/components/_alerts.sass +8 -10
  9. data/assets/stylesheets/shipyard/components/_boxes.sass +1 -15
  10. data/assets/stylesheets/shipyard/components/_bullet.sass +6 -0
  11. data/assets/stylesheets/shipyard/components/_buttons.sass +0 -3
  12. data/assets/stylesheets/shipyard/components/_container.sass +6 -0
  13. data/assets/stylesheets/shipyard/components/_forms.sass +1 -1
  14. data/assets/stylesheets/shipyard/components/_grid.sass +62 -0
  15. data/assets/stylesheets/shipyard/components/_hamburger.sass +4 -4
  16. data/assets/stylesheets/shipyard/components/_header.sass +14 -14
  17. data/assets/stylesheets/shipyard/components/_horizontal-rules.sass +1 -1
  18. data/assets/stylesheets/shipyard/components/_input-radio-checkbox.sass +1 -1
  19. data/assets/stylesheets/shipyard/components/_input-select.sass +1 -1
  20. data/assets/stylesheets/shipyard/components/_input-text.sass +1 -1
  21. data/assets/stylesheets/shipyard/components/_modals.sass +2 -3
  22. data/assets/stylesheets/shipyard/components/_notes.sass +6 -6
  23. data/assets/stylesheets/shipyard/components/_tables.sass +1 -1
  24. data/assets/stylesheets/shipyard/components/_tooltips.sass +8 -4
  25. data/assets/stylesheets/shipyard/core/_typography.sass +0 -19
  26. data/assets/stylesheets/shipyard/functions/_color.sass +4 -7
  27. data/assets/stylesheets/shipyard/mixins/_components.sass +0 -6
  28. data/assets/stylesheets/shipyard/mixins/_grid.sass +17 -0
  29. data/assets/stylesheets/shipyard/mixins/_responsive.sass +38 -42
  30. data/assets/stylesheets/shipyard/mixins/_utility.sass +50 -0
  31. data/assets/stylesheets/shipyard/utilities/_border-radius.sass +29 -39
  32. data/assets/stylesheets/shipyard/utilities/_box-shadow.sass +1 -0
  33. data/assets/stylesheets/shipyard/utilities/_center.sass +8 -14
  34. data/assets/stylesheets/shipyard/utilities/_colors.sass +2 -12
  35. data/assets/stylesheets/shipyard/utilities/_cursor.sass +1 -0
  36. data/assets/stylesheets/shipyard/utilities/_display.sass +1 -14
  37. data/assets/stylesheets/shipyard/utilities/_flex-direction.sass +1 -0
  38. data/assets/stylesheets/shipyard/utilities/_float.sass +4 -0
  39. data/assets/stylesheets/shipyard/utilities/_font-family.sass +1 -0
  40. data/assets/stylesheets/shipyard/utilities/_font-size.sass +1 -0
  41. data/assets/stylesheets/shipyard/utilities/_font-style.sass +1 -0
  42. data/assets/stylesheets/shipyard/utilities/_font-weight.sass +1 -0
  43. data/assets/stylesheets/shipyard/utilities/_height.sass +1 -0
  44. data/assets/stylesheets/shipyard/utilities/_margin.sass +1 -0
  45. data/assets/stylesheets/shipyard/utilities/_opacity.sass +1 -4
  46. data/assets/stylesheets/shipyard/utilities/_overflow.sass +3 -11
  47. data/assets/stylesheets/shipyard/utilities/_padding.sass +1 -0
  48. data/assets/stylesheets/shipyard/utilities/_position.sass +1 -4
  49. data/assets/stylesheets/shipyard/utilities/_text-align.sass +1 -0
  50. data/assets/stylesheets/shipyard/utilities/_text-decoration.sass +1 -0
  51. data/assets/stylesheets/shipyard/utilities/_text-overflow.sass +1 -0
  52. data/assets/stylesheets/shipyard/utilities/_text-shadow.sass +1 -0
  53. data/assets/stylesheets/shipyard/utilities/_text-transform.sass +1 -0
  54. data/assets/stylesheets/shipyard/utilities/_transform.sass +1 -0
  55. data/assets/stylesheets/shipyard/utilities/_transition.sass +1 -0
  56. data/assets/stylesheets/shipyard/utilities/_white-space.sass +1 -0
  57. data/assets/stylesheets/shipyard/utilities/_z-index.sass +1 -0
  58. data/assets/stylesheets/shipyard/variables/_color_utilities.sass +54 -54
  59. data/assets/stylesheets/shipyard/variables/_colors.scss +101 -88
  60. data/assets/stylesheets/shipyard/variables/_components.scss +0 -1
  61. data/assets/stylesheets/shipyard/variables/_options.scss +322 -0
  62. data/assets/stylesheets/shipyard/variables/_typography.sass +3 -2
  63. data/lib/shipyard-framework.rb +0 -3
  64. data/lib/shipyard-framework/helpers/alert_helper.rb +1 -1
  65. data/lib/shipyard-framework/version.rb +1 -1
  66. metadata +29 -11
  67. data/assets/stylesheets/shipyard/utilities/_grid.sass +0 -74
  68. data/assets/stylesheets/shipyard/utilities/_margin-padding.sass +0 -40
  69. data/assets/stylesheets/shipyard/utilities/_typography.sass +0 -104
  70. data/assets/stylesheets/shipyard/variables/_grid.sass +0 -2
  71. data/assets/stylesheets/shipyard/variables/_opacities.scss +0 -22
  72. data/assets/stylesheets/shipyard/variables/_z-index.scss +0 -9
  73. data/lib/shipyard-framework/helpers/button_helper.rb +0 -39
  74. data/lib/shipyard-framework/jekyll/tags/button_tag.rb +0 -21
@@ -8,7 +8,7 @@
8
8
  background: rgba($gray-lighter, .5)
9
9
 
10
10
  th, td
11
- +respond-to(padding, (x0: 5px, x1: 10px, x2: 15px))
11
+ +respond-to(padding, (all: 5px, sm: 10px, md: 15px))
12
12
 
13
13
  th
14
14
  border-bottom: 2px solid $gray-lighter
@@ -1,5 +1,4 @@
1
1
  +component('tooltip')
2
- +z-index
3
2
  +border-radius
4
3
  width: auto
5
4
  opacity: 0
@@ -55,7 +54,6 @@
55
54
  transform: rotate(45deg)
56
55
  transform-origin: center center
57
56
  border: 4px solid transparent
58
- z-index: map-get($z-index, 'tooltip-arrow')
59
57
  &-top
60
58
  left: 50%
61
59
  margin-left: -4px
@@ -126,15 +124,21 @@
126
124
  background-color: #fff
127
125
  +box-shadow
128
126
 
129
- // Data Tooltip
127
+ // Data-Tooltip
130
128
  &-data
131
129
  +extend('parent')
130
+
131
+ // Data-Tooltip: Arrow
132
132
  &::before
133
+ @extend .z-60 !optional
133
134
  opacity: 0
134
135
  visibility: hidden
135
136
  transition: opacity 300ms ease 300ms, transform 300ms ease 300ms, visibility 0ms ease 300ms
137
+
138
+ // Data-Tooltip: Content
136
139
  &::after
137
140
  +extend
141
+ @extend .z-50 !optional
138
142
  width: auto
139
143
  min-width: 0
140
144
  max-width: none
@@ -153,7 +157,7 @@
153
157
  &::before
154
158
  +extend('light')
155
159
 
156
- // Data Tooltip: Directions
160
+ // Data-Tooltip: Directions
157
161
  @each $direction in (top, bottom, left, right)
158
162
  &-#{$direction}
159
163
  &::before
@@ -15,9 +15,6 @@
15
15
  color: darken($blue, 10%)
16
16
  text-decoration: underline
17
17
 
18
- strong
19
- font-weight: $bold
20
-
21
18
  .list
22
19
  list-style: circle
23
20
  &, &-disc
@@ -36,19 +33,3 @@ button
36
33
  background: none
37
34
  border: none
38
35
  cursor: pointer
39
-
40
- h1, .h1
41
- +respond-to(font-size, (x0: 20px, x1: 24px))
42
- h2, .h2
43
- font-size: 18px
44
-
45
- .h-primary
46
- margin-bottom: 0
47
- +respond-to(font-size, (x0: 24px, x1: 28px))
48
- .h-secondary
49
- color: $text-color-lighter
50
- font-weight: $normal
51
- margin: 5px 0 30px
52
- +respond-to(font-size, (x0: 16px, x1: 18px))
53
- .h-margin
54
- margin: 0 0 30px
@@ -1,10 +1,7 @@
1
1
  @function color($name, $shade: null)
2
- $colors: $colors !global
3
- $color: map-get($colors, $name)
2
+ $shipyard-colors: $shipyard-colors !global
3
+ $color: map-get($shipyard-colors, $name)
4
4
  @if $color
5
- @if $shade
6
- @return map-get($color, $shade)
7
- @else
8
- @return map-get($color, base)
5
+ @return $color
9
6
  @else
10
- @error "Sorry, but the color `#{$name}` hasn't been defined in the $colors variable."
7
+ @error "Sorry, but the color `#{$name}` hasn't been defined in the $shipyard-colors variable."
@@ -17,12 +17,6 @@
17
17
  @else
18
18
  @extend .#{$component} !optional
19
19
 
20
- @mixin z-index($value: null)
21
- @if $value
22
- z-index: $value
23
- @else if $component and map-get($z-index, $component)
24
- z-index: map-get($z-index, $component)
25
-
26
20
  @mixin component-styles($modifier)
27
21
  $component-styles: map-get($components, $component)
28
22
  @if $component-styles
@@ -0,0 +1,17 @@
1
+ @mixin column-style($property, $width)
2
+ @if $width == 0 and $property == max-width
3
+ max-width: none
4
+ @else if $width == 66
5
+ #{$property}: 66.6666666666%
6
+ @else if $width == 33
7
+ #{$property}: 33.3333333333%
8
+ @else
9
+ #{$property}: percentage($width / 100)
10
+
11
+ @mixin column-sizes
12
+ @each $width in $widths
13
+ &-#{$width}
14
+ +column-style(max-width, $width)
15
+ +column-style(flex-basis, $width)
16
+ &-offset-#{$width}
17
+ +column-style(margin-left, $width)
@@ -29,84 +29,80 @@
29
29
 
30
30
  @mixin all-media-sizes
31
31
  @content
32
- +media-sizes
33
- @content
34
-
35
- @mixin media-sizes
36
32
  @each $breakpoint, $min-width in $breakpoints
37
- &-#{$breakpoint}
33
+ @at-root #{".#{$breakpoint}\\:" + str-slice("#{&}", 2)}
38
34
  +media(min-width $min-width)
39
35
  @content
40
36
 
41
- @mixin breakpoint-x0
42
- +media(max-width map-get($breakpoints, x1) - 1)
37
+ @mixin breakpoint-all
38
+ +media(max-width map-get($breakpoints, sm) - 1)
43
39
  @content
44
40
 
45
- @mixin breakpoint-x1
46
- +media(min-width map-get($breakpoints, x1))
41
+ @mixin breakpoint-sm
42
+ +media(min-width map-get($breakpoints, sm))
47
43
  @content
48
44
 
49
- @mixin breakpoint-x2
50
- +media(min-width map-get($breakpoints, x2))
45
+ @mixin breakpoint-md
46
+ +media(min-width map-get($breakpoints, md))
51
47
  @content
52
48
 
53
- @mixin breakpoint-x3
54
- +media(min-width map-get($breakpoints, x3))
49
+ @mixin breakpoint-lg
50
+ +media(min-width map-get($breakpoints, lg))
55
51
  @content
56
52
 
57
- @mixin breakpoint-x4
58
- +media(min-width map-get($breakpoints, x4))
53
+ @mixin breakpoint-xl
54
+ +media(min-width map-get($breakpoints, xl))
59
55
  @content
60
56
 
61
57
  @mixin responsive-padding($properties: null, $divisor: 2)
62
58
  transition: padding 500ms ease
63
59
  @if $properties
64
60
  @each $property in $properties
65
- padding-#{$property}: map-get($margins, x0) / $divisor
66
- +breakpoint-x1
61
+ padding-#{$property}: map-get($margins, all) / $divisor
62
+ +breakpoint-sm
67
63
  @each $property in $properties
68
- padding-#{$property}: map-get($margins, x1) / $divisor
69
- +breakpoint-x2
64
+ padding-#{$property}: map-get($margins, sm) / $divisor
65
+ +breakpoint-md
70
66
  @each $property in $properties
71
- padding-#{$property}: map-get($margins, x2) / $divisor
67
+ padding-#{$property}: map-get($margins, md) / $divisor
72
68
  @else
73
- +respond-to(padding, (x0: map-get($margins, x0), x1: map-get($margins, x1), x2: map-get($margins, x2)))
69
+ +respond-to(padding, (all: map-get($margins, all), sm: map-get($margins, sm), md: map-get($margins, md)))
74
70
 
75
71
  @mixin responsive-margin($properties, $divisor: 2)
76
72
  transition: margin 500ms ease
77
73
  @each $property in $properties
78
- margin-#{$property}: map-get($margins, x0) / $divisor
79
- +breakpoint-x1
74
+ margin-#{$property}: map-get($margins, all) / $divisor
75
+ +breakpoint-sm
80
76
  @each $property in $properties
81
- margin-#{$property}: map-get($margins, x1) / $divisor
82
- +breakpoint-x2
77
+ margin-#{$property}: map-get($margins, sm) / $divisor
78
+ +breakpoint-md
83
79
  @each $property in $properties
84
- margin-#{$property}: map-get($margins, x2) / $divisor
80
+ margin-#{$property}: map-get($margins, md) / $divisor
85
81
 
86
82
  @mixin respond-to($property, $breakpoints)
87
- @if map-has-key($breakpoints, x0)
88
- #{$property}: map-get($breakpoints, x0)
89
- @if map-has-key($breakpoints, x1)
90
- +breakpoint-x1
91
- #{$property}: map-get($breakpoints, x1)
92
- @if map-has-key($breakpoints, x2)
93
- +breakpoint-x2
94
- #{$property}: map-get($breakpoints, x2)
95
- @if map-has-key($breakpoints, x3)
96
- +breakpoint-x3
97
- #{$property}: map-get($breakpoints, x3)
83
+ @if map-has-key($breakpoints, all)
84
+ #{$property}: map-get($breakpoints, all)
85
+ @if map-has-key($breakpoints, sm)
86
+ +breakpoint-sm
87
+ #{$property}: map-get($breakpoints, sm)
88
+ @if map-has-key($breakpoints, md)
89
+ +breakpoint-md
90
+ #{$property}: map-get($breakpoints, md)
91
+ @if map-has-key($breakpoints, lg)
92
+ +breakpoint-lg
93
+ #{$property}: map-get($breakpoints, lg)
98
94
 
99
95
  @mixin responsive-left
100
- +respond-to(left, (x0: map-get($margins, x0), x1: map-get($margins, x1), x2: map-get($margins, x2)))
96
+ +respond-to(left, (all: map-get($margins, all), sm: map-get($margins, sm), md: map-get($margins, md)))
101
97
 
102
98
  @mixin responsive-right
103
- +respond-to(right, (x0: map-get($margins, x0), x1: map-get($margins, x1), x2: map-get($margins, x2)))
99
+ +respond-to(right, (all: map-get($margins, all), sm: map-get($margins, sm), md: map-get($margins, md)))
104
100
 
105
101
  @mixin responsive-padding-left
106
- +respond-to(padding-left, (x0: map-get($margins, x0), x1: map-get($margins, x1), x2: map-get($margins, x2)))
102
+ +respond-to(padding-left, (all: map-get($margins, all), sm: map-get($margins, sm), md: map-get($margins, md)))
107
103
 
108
104
  @mixin responsive-padding-right
109
- +respond-to(padding-right, (x0: map-get($margins, x0), x1: map-get($margins, x1), x2: map-get($margins, x2)))
105
+ +respond-to(padding-right, (all: map-get($margins, all), sm: map-get($margins, sm), md: map-get($margins, md)))
110
106
 
111
107
  @function merge-and-add($map1, $map2)
112
- @return (x0: map-get($map1, x0) + map-get($map2, x0), x1: map-get($map1, x1) + map-get($map2, x1), x2: map-get($map1, x2) + map-get($map2, x2))
108
+ @return (all: map-get($map1, all) + map-get($map2, all), sm: map-get($map1, sm) + map-get($map2, sm), md: map-get($map1, md) + map-get($map2, md))
@@ -0,0 +1,50 @@
1
+ @function utility-class($prefix, $class)
2
+ @if $prefix
3
+ $class: if($class == '', $prefix, "#{$prefix}-#{$class}")
4
+ @return $class
5
+
6
+ @mixin utility($name)
7
+ $utility: map-get($shipyard-options, $name)
8
+
9
+ @if $utility != false
10
+ $prefix: map-get($utility, prefix)
11
+ $utility-values: map-get($utility, values)
12
+ $utility-variants: map-get($utility, variants)
13
+ $utility-is-responsive: map-get($utility, responsive)
14
+
15
+ // Print out styles for all screens
16
+ @each $class, $value in $utility-values
17
+ $value: if($value, $value, $class)
18
+ .#{utility-class($prefix, $class)}
19
+ #{$name}: $value
20
+
21
+ // Print out variants like: left, right, top, bottom
22
+ @if $utility-variants
23
+ @each $v-class, $v-prop in $utility-variants
24
+ .#{utility-class($prefix + $v-class, $class)}
25
+ #{$name}-#{$v-prop}: $value
26
+
27
+ // Print out other utility content
28
+ @if $prefix
29
+ .#{$prefix}
30
+ @content
31
+
32
+ // Print out styles for all breakpoints
33
+ @if $utility-is-responsive
34
+ @each $breakpoint, $min-width in $breakpoints
35
+ @media screen and (min-width:#{$min-width})
36
+ @each $class, $value in $utility-values
37
+ $value: if($value, $value, $class)
38
+ .#{$breakpoint + '\\:' + utility-class($prefix, $class)}
39
+ #{$name}: $value
40
+
41
+ // Print out variants like: left, right, top, bottom
42
+ @if $utility-variants
43
+ @each $v-class, $v-prop in $utility-variants
44
+ .#{$breakpoint + '\\:' + utility-class($prefix + $v-class, $class)}
45
+ #{$name}-#{$v-prop}: $value
46
+
47
+ // Print out other utility content
48
+ @if $prefix
49
+ .#{$breakpoint + '\\:' + $prefix}
50
+ @content
@@ -1,39 +1,29 @@
1
- +component('rounded')
2
- +all-media-sizes
3
- +border-radius
4
- &-0
5
- border-radius: 0
6
- &-xs
7
- border-radius: 2px
8
- &-sm
9
- border-radius: 3px
10
- &-md
11
- border-radius: 5px
12
- &-top
13
- border-bottom-left-radius: 0
14
- border-bottom-right-radius: 0
15
- &-bottom
16
- border-top-left-radius: 0
17
- border-top-right-radius: 0
18
- &-left
19
- border-top-right-radius: 0
20
- border-bottom-right-radius: 0
21
- &-right
22
- border-top-left-radius: 0
23
- border-bottom-left-radius: 0
24
- &-top-left
25
- border-top-right-radius: 0
26
- border-bottom-left-radius: 0
27
- border-bottom-right-radius: 0
28
- &-top-right
29
- border-top-left-radius: 0
30
- border-bottom-left-radius: 0
31
- border-bottom-right-radius: 0
32
- &-bottom-left
33
- border-top-left-radius: 0
34
- border-top-right-radius: 0
35
- border-bottom-right-radius: 0
36
- &-bottom-right
37
- border-top-left-radius: 0
38
- border-top-right-radius: 0
39
- border-bottom-left-radius: 0
1
+ +utility(border-radius)
2
+ &-top
3
+ border-bottom-left-radius: 0
4
+ border-bottom-right-radius: 0
5
+ &-bottom
6
+ border-top-left-radius: 0
7
+ border-top-right-radius: 0
8
+ &-left
9
+ border-top-right-radius: 0
10
+ border-bottom-right-radius: 0
11
+ &-right
12
+ border-top-left-radius: 0
13
+ border-bottom-left-radius: 0
14
+ &-top-left
15
+ border-top-right-radius: 0
16
+ border-bottom-left-radius: 0
17
+ border-bottom-right-radius: 0
18
+ &-top-right
19
+ border-top-left-radius: 0
20
+ border-bottom-left-radius: 0
21
+ border-bottom-right-radius: 0
22
+ &-bottom-left
23
+ border-top-left-radius: 0
24
+ border-top-right-radius: 0
25
+ border-bottom-right-radius: 0
26
+ &-bottom-right
27
+ border-top-left-radius: 0
28
+ border-top-right-radius: 0
29
+ border-bottom-left-radius: 0
@@ -0,0 +1 @@
1
+ +utility(box-shadow)
@@ -1,16 +1,10 @@
1
- .center
2
- +all-media-sizes
3
- +center
4
-
5
- .v-center
6
- +all-media-sizes
1
+ +utility(center)
2
+ +center
3
+ &-v
7
4
  +center($vertical: true)
8
-
9
- .h-center
10
- +all-media-sizes
5
+ &-h
11
6
  +center($horizontal: true)
12
-
13
- .align-middle
14
- top: -1px
15
- position: relative
16
- vertical-align: middle
7
+ &-obj
8
+ top: -1px
9
+ position: relative
10
+ vertical-align: middle
@@ -1,12 +1,2 @@
1
- @each $color, $shades in $colors
2
- @each $shade, $value in $shades
3
- @if $shade == base
4
- .#{$color}
5
- color: $value
6
- .bg-#{$color}
7
- background-color: $value
8
- @else
9
- .#{$color}-#{$shade}
10
- color: $value
11
- .bg-#{$color}-#{$shade}
12
- background-color: $value
1
+ +utility(color)
2
+ +utility(background-color)
@@ -0,0 +1 @@
1
+ +utility(cursor)
@@ -1,14 +1 @@
1
- .float
2
- +all-media-sizes
3
- @each $value in (none, left, right)
4
- &-#{$value}
5
- float: $value
6
-
7
- .display
8
- +all-media-sizes
9
- @each $value in (flex, block, table, inline, inline-block, none)
10
- &-#{$value}
11
- display: $value
12
-
13
- .clearfix
14
- +clearfix
1
+ +utility(display)
@@ -0,0 +1 @@
1
+ +utility(flex-direction)