TokiCLI 0.2.1 → 0.3.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 (129) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +9 -17
  4. data/.rspec +3 -0
  5. data/.travis.yml +3 -0
  6. data/CHANGELOG.md +4 -0
  7. data/README.md +99 -163
  8. data/Rakefile +5 -0
  9. data/TokiCLI.gemspec +5 -4
  10. data/bin/toki +2 -2
  11. data/lib/API/helpers.rb +27 -170
  12. data/lib/API/toki_api.rb +227 -0
  13. data/lib/API/toki_db.rb +67 -0
  14. data/lib/TokiCLI.rb +270 -5
  15. data/lib/TokiCLI/adnimport.rb +202 -0
  16. data/lib/TokiCLI/fileops.rb +187 -0
  17. data/lib/TokiCLI/status.rb +49 -37
  18. data/lib/TokiCLI/version.rb +1 -1
  19. data/lib/TokiCLI/view.rb +133 -86
  20. data/lib/TokiServer/.bowerrc +3 -0
  21. data/lib/TokiServer/.gitignore +2 -0
  22. data/lib/TokiServer/Gemfile +1 -0
  23. data/lib/TokiServer/bower.json +0 -0
  24. data/lib/TokiServer/bower_components/fastclick/.bower.json +4 -4
  25. data/lib/TokiServer/bower_components/fastclick/bower.json +1 -1
  26. data/lib/TokiServer/bower_components/fastclick/lib/fastclick.js +33 -2
  27. data/lib/TokiServer/bower_components/foundation/.bower.json +5 -4
  28. data/lib/TokiServer/bower_components/foundation/bower.json +2 -1
  29. data/lib/TokiServer/bower_components/foundation/css/foundation.css +2173 -922
  30. data/lib/TokiServer/bower_components/foundation/css/foundation.css.map +7 -0
  31. data/lib/TokiServer/bower_components/foundation/css/normalize.css +53 -16
  32. data/lib/TokiServer/bower_components/foundation/css/normalize.css.map +7 -0
  33. data/lib/TokiServer/bower_components/foundation/js/foundation.js +782 -542
  34. data/lib/TokiServer/bower_components/foundation/js/foundation.min.js +4 -3
  35. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.abide.js +45 -31
  36. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.accordion.js +12 -6
  37. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.alert.js +5 -5
  38. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.clearing.js +34 -10
  39. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.dropdown.js +83 -29
  40. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.equalizer.js +3 -3
  41. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.interchange.js +25 -12
  42. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.joyride.js +112 -40
  43. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.js +19 -5
  44. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.magellan.js +22 -11
  45. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.offcanvas.js +52 -8
  46. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.orbit.js +133 -271
  47. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.reveal.js +27 -20
  48. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.slider.js +73 -33
  49. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.tab.js +88 -31
  50. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.tooltip.js +7 -5
  51. data/lib/TokiServer/bower_components/foundation/js/foundation/foundation.topbar.js +44 -24
  52. data/lib/TokiServer/bower_components/foundation/js/vendor/fastclick.js +2 -2
  53. data/lib/TokiServer/bower_components/foundation/js/vendor/modernizr.js +2 -2
  54. data/lib/TokiServer/bower_components/foundation/scss/foundation.scss +38 -38
  55. data/lib/TokiServer/bower_components/foundation/scss/foundation/_functions.scss +3 -3
  56. data/lib/TokiServer/bower_components/foundation/scss/foundation/_settings.scss +417 -271
  57. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_accordion.scss +110 -6
  58. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_alert-boxes.scss +2 -2
  59. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_block-grid.scss +2 -2
  60. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_breadcrumbs.scss +8 -3
  61. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_button-groups.scss +99 -9
  62. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_buttons.scss +66 -28
  63. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_clearing.scss +5 -5
  64. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_dropdown-buttons.scss +4 -4
  65. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_dropdown.scss +48 -35
  66. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_forms.scss +104 -32
  67. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_global.scss +48 -30
  68. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_grid.scss +19 -4
  69. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_icon-bar.scss +293 -0
  70. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_joyride.scss +11 -9
  71. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_keystrokes.scss +4 -4
  72. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_labels.scss +4 -2
  73. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_magellan.scss +1 -1
  74. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_offcanvas.scss +193 -35
  75. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_orbit.scss +92 -147
  76. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_pagination.scss +22 -10
  77. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_panels.scss +10 -7
  78. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_pricing-tables.scss +11 -11
  79. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_progress-bars.scss +2 -2
  80. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_range-slider.scss +29 -9
  81. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_reveal.scss +60 -56
  82. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_side-nav.scss +3 -2
  83. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_split-buttons.scss +2 -2
  84. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_sub-nav.scss +2 -2
  85. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_switches.scss +226 -0
  86. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_tables.scss +13 -7
  87. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_tabs.scss +22 -8
  88. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_thumbs.scss +2 -4
  89. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_toolbar.scss +70 -0
  90. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_tooltips.scss +9 -7
  91. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_top-bar.scss +77 -44
  92. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_type.scss +21 -9
  93. data/lib/TokiServer/bower_components/modernizr/.bower.json +4 -4
  94. data/lib/TokiServer/bower_components/modernizr/feature-detects/workers-blobworkers.js +2 -2
  95. data/lib/TokiServer/bower_components/modernizr/grunt.js +1 -1
  96. data/lib/TokiServer/bower_components/modernizr/modernizr.js +2 -2
  97. data/lib/TokiServer/config.rb +0 -0
  98. data/lib/TokiServer/humans.txt +0 -0
  99. data/lib/TokiServer/{itunesicon.rb → itunesicons.rb} +25 -23
  100. data/lib/TokiServer/js/app.js +0 -0
  101. data/lib/TokiServer/public/stylesheets/app.css +2636 -1610
  102. data/lib/TokiServer/robots.txt +0 -0
  103. data/lib/TokiServer/scss/_settings.scss +0 -0
  104. data/lib/TokiServer/scss/app.scss +7 -1
  105. data/lib/TokiServer/tokiserver.rb +239 -244
  106. data/lib/TokiServer/views/activity.erb +42 -0
  107. data/lib/TokiServer/views/apps_total.erb +8 -2
  108. data/lib/TokiServer/views/error.erb +13 -4
  109. data/lib/TokiServer/views/index.erb +36 -27
  110. data/lib/TokiServer/views/logs_total.erb +34 -0
  111. data/spec/TokiCLI_spec.rb +354 -0
  112. data/spec/mock/mock.sqlite3 +0 -0
  113. data/spec/spec_helper.rb +26 -0
  114. metadata +78 -23
  115. data/lib/API/dbapi.rb +0 -488
  116. data/lib/TokiCLI/app.rb +0 -389
  117. data/lib/TokiCLI/authorize.rb +0 -77
  118. data/lib/TokiCLI/export.rb +0 -81
  119. data/lib/TokiCLI/get_channels.rb +0 -22
  120. data/lib/TokiCLI/get_messages.rb +0 -32
  121. data/lib/TokiCLI/import.rb +0 -122
  122. data/lib/TokiCLI/scan.rb +0 -19
  123. data/lib/TokiCLI/search_messages.rb +0 -23
  124. data/lib/TokiServer/README.md +0 -37
  125. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_reveal-new.scss +0 -0
  126. data/lib/TokiServer/bower_components/foundation/scss/foundation/components/_switch.scss +0 -294
  127. data/lib/TokiServer/views/name_log.erb +0 -50
  128. data/lib/TokiServer/views/name_split.erb +0 -37
  129. data/lib/TokiServer/views/name_total.erb +0 -34
@@ -11,21 +11,125 @@
11
11
  $include-html-accordion-classes: $include-html-classes !default;
12
12
 
13
13
  $accordion-navigation-padding: rem-calc(16) !default;
14
- $accordion-navigation-bg-color: #efefef !default;
14
+ $accordion-navigation-bg-color: $silver !default;
15
15
  $accordion-navigation-hover-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -5%) !default;
16
16
  $accordion-navigation-active-bg-color: scale-color($accordion-navigation-bg-color, $lightness: -3%) !default;
17
- $accordion-navigation-font-color: #222 !default;
17
+ $accordion-navigation-font-color: $jet !default;
18
18
  $accordion-navigation-font-size: rem-calc(16) !default;
19
19
  $accordion-navigation-font-family: $body-font-family !default;
20
20
 
21
21
  $accordion-content-padding: $column-gutter/2 !default;
22
- $accordion-content-active-bg-color: #fff !default;
22
+ $accordion-content-active-bg-color: $white !default;
23
+
24
+
25
+ // Mixin: accordion-container()
26
+ // Decription: Responsible for the container component of accordions, generating styles relating to a margin of zero and a clearfix
27
+ // Explicit Dependencies: a clearfix mixin *is* defined.
28
+ // Implicit Dependencies: None
29
+
30
+ @mixin accordion-container() {
31
+ @include clearfix;
32
+ margin-bottom: 0;
33
+ }
34
+
35
+ // Mixin: accordion-navigation( $bg, $hover-bg, $active-bg, $padding, $active_class, $font-color, $font-size, $font-family){
36
+ // @params $bg-color: [ color or string ]: Specify the background color for the navigation element
37
+ // @params $hover-bg-color [ color or string ]: Specify the background color for the navigation element when hovered
38
+ // @params $active-bg [ color or string ]: Specify the background color for the navigation element when clicked and not released.
39
+ // @params $active_class [ string ]: Specify the class name used to keep track of which accordion tab should be visible
40
+ // @params $font-color [ color or string ]: Color of the font for accordion
41
+ // @params $font-size [ number ]: Specifiy the font-size of the text inside the navigation element
42
+ // @params $font-family [ string ]: Specify the font family for the text of the navigation of the accorion
43
+
44
+ @mixin accordion-navigation( $bg: $accordion-navigation-bg-color, $hover-bg: $accordion-navigation-hover-bg-color, $active-bg: $accordion-navigation-active-bg-color, $padding: $accordion-navigation-padding, $active_class: 'active', $font-color: $accordion-navigation-font-color, $font-size: $accordion-navigation-font-size, $font-family: $accordion-navigation-font-family ){
45
+ display: block;
46
+ margin-bottom: 0 !important;
47
+ @if type-of($active_class) != "string" {
48
+ @warn "`#{$active_class}` isn't a valid string. A valid string is needed to correctly be interpolated as a CSS class. CSS classes cannot start with a number or consist of only numbers. CSS will not be generated for the active state of this navigation component."
49
+ }
50
+ @else {
51
+ &.#{ $active_class } > a {
52
+ background: $active-bg;
53
+ }
54
+ }
55
+ > a {
56
+ background: $bg;
57
+ color: $font-color;
58
+ @if type-of($padding) != number {
59
+ @warn "`#{$padding}` was read as #{type-of($padding)}";
60
+ @if $accordion-navigation-padding != null {
61
+ @warn "#{$padding} was read as a #{type-of($padding)}";
62
+ @warn "`#{$padding}` isn't a valid number. $accordion-navigation-padding (#{$accordion-navigation-padding}) will be used instead.)";
63
+ padding: $accordion-navigation-padding;
64
+ }
65
+ @else {
66
+ @warn "`#{$padding}` isn't a valid number and $accordion-navigation-padding is missing. A value of `null` is returned to not output an invalid value for padding";
67
+ padding: null;
68
+ }
69
+ }
70
+ @else {
71
+ padding: $padding;
72
+ }
73
+ display: block;
74
+ font-family: $font-family;
75
+ @if type-of($font-size) != number {
76
+ @warn "`#{$font-size}` was read as a #{type-of($font-size)}";
77
+ @if $accordion-navigation-font-size != null {
78
+ @warn "`#{$font-size}` is not a valid number. The value of $accordion-navigation-font-size will be used instead (#{$accordion-navigation-font-size}).";
79
+ font-size: $accordion-navigation-font-size;
80
+ }
81
+ @else{
82
+ @warn "`#{$font-size}` is not a valid number and the default value of $accordion-navigation-font-size is not defined. A value of `null` will be returned to not generate an invalid value for font-size.";
83
+ font-size: null;
84
+
85
+ }
86
+ }
87
+ @else {
88
+ font-size: $font-size;
89
+ }
90
+ &:hover {
91
+ background: $hover-bg;
92
+ }
93
+ }
94
+ }
95
+
96
+ // Mixin: accordion-content($bg, $padding, $active-class)
97
+ // @params $padding [ number ]: Padding for the content of the container
98
+ // @params $bg [ color ]: Background color for the content when it's visible
99
+ // @params $active_class [ string ]: Class name used to keep track of which accordion tab should be visible.
100
+
101
+ @mixin accordion-content($bg: $accordion-content-active-bg-color, $padding: $accordion-content-padding, $active_class: 'active'){
102
+ display: none;
103
+ @if type-of($padding) != "number" {
104
+ @warn "#{$padding} was read as a #{type-of($padding)}";
105
+ @if $accordion-content-padding != null {
106
+ @warn "`#{$padding}` isn't a valid number. $accordion-content-padding used instead";
107
+ padding: $accordion-content-padding;
108
+ } @else {
109
+ @warn "`#{$padding}` isn't a valid number and the default value of $accordion-content-padding is not defined. A value of `null` is returned to not output an invalid value for padding.";
110
+ padding: null;
111
+ }
112
+ } @else {
113
+ padding: $padding;
114
+ }
115
+
116
+ @if type-of($active_class) != "string" {
117
+ @warn "`#{$active_class}` isn't a valid string. A valid string is needed to correctly be interpolated as a CSS class. CSS classes cannot start with a number or consist of only numbers. CSS will not be generated for the active state of the content. "
118
+ }
119
+ @else {
120
+ &.#{$active_class} {
121
+ display: block;
122
+ background: $bg;
123
+ }
124
+ }
125
+ }
23
126
 
24
127
  @include exports("accordion") {
25
128
  @if $include-html-accordion-classes {
26
129
  .accordion {
27
- @include clearfix; margin-bottom: 0;
28
- dd {
130
+ @include clearfix;
131
+ margin-bottom: 0;
132
+ .accordion-navigation, dd {
29
133
  display: block;
30
134
  margin-bottom: 0 !important;
31
135
  &.active > a { background: $accordion-navigation-active-bg-color; }
@@ -38,7 +142,7 @@ $accordion-content-active-bg-color: #fff !default;
38
142
  font-size: $accordion-navigation-font-size;
39
143
  &:hover { background: $accordion-navigation-hover-bg-color; }
40
144
  }
41
-
145
+
42
146
  > .content {
43
147
  display: none;
44
148
  padding: $accordion-content-padding;
@@ -18,7 +18,7 @@ $alert-padding-bottom: $alert-padding-top !default;
18
18
  // We use these to control text style.
19
19
  $alert-font-weight: $font-weight-normal !default;
20
20
  $alert-font-size: rem-calc(13) !default;
21
- $alert-font-color: #fff !default;
21
+ $alert-font-color: $white !default;
22
22
  $alert-font-color-alt: scale-color($secondary-color, $lightness: -66%) !default;
23
23
 
24
24
  // We use this for close hover effect.
@@ -31,7 +31,7 @@ $alert-border-color: scale-color($primary-color, $lightness: $alert-function-fac
31
31
  $alert-bottom-margin: rem-calc(20) !default;
32
32
 
33
33
  // We use these to style the close buttons
34
- $alert-close-color: #333 !default;
34
+ $alert-close-color: $oil !default;
35
35
  $alert-close-top: 50% !default;
36
36
  $alert-close-position: rem-calc(4) !default;
37
37
  $alert-close-font-size: rem-calc(22) !default;
@@ -7,7 +7,7 @@
7
7
  //
8
8
  // Block Grid Variables
9
9
  //
10
- $include-html-grid-classes: $include-html-classes !default;
10
+ $include-html-block-grid-classes: $include-html-classes !default;
11
11
  $include-xl-html-block-grid-classes: false !default;
12
12
 
13
13
  // We use this to control the maximum number of block grid elements per row
@@ -101,7 +101,7 @@ $block-grid-media-queries: true !default;
101
101
  }
102
102
 
103
103
  @include exports("block-grid") {
104
- @if $include-html-grid-classes {
104
+ @if $include-html-block-grid-classes {
105
105
 
106
106
  [class*="block-grid-"] { @include block-grid; }
107
107
 
@@ -26,13 +26,13 @@ $crumb-radius: $global-radius !default;
26
26
  // We use these to set various text styles for breadcrumbs.
27
27
  $crumb-font-size: rem-calc(11) !default;
28
28
  $crumb-font-color: $primary-color !default;
29
- $crumb-font-color-current: #333 !default;
30
- $crumb-font-color-unavailable: #999 !default;
29
+ $crumb-font-color-current: $oil !default;
30
+ $crumb-font-color-unavailable: $aluminum !default;
31
31
  $crumb-font-transform: uppercase !default;
32
32
  $crumb-link-decor: underline !default;
33
33
 
34
34
  // We use these to control the slash between breadcrumbs
35
- $crumb-slash-color: #aaa !default;
35
+ $crumb-slash-color: $base !default;
36
36
  $crumb-slash: "/" !default;
37
37
 
38
38
  //
@@ -125,3 +125,8 @@ $crumb-slash: "/" !default;
125
125
  }
126
126
  }
127
127
  }
128
+
129
+ /* Accessibility - hides the forward slash */
130
+ [aria-label="breadcrumbs"] [aria-hidden="true"]:after {
131
+ content: "/";
132
+ }
@@ -5,7 +5,6 @@
5
5
  @import "global";
6
6
  @import "buttons";
7
7
 
8
-
9
8
  //
10
9
  // Button Group Variables
11
10
  //
@@ -35,7 +34,7 @@ $button-group-border-width: 1px !default;
35
34
  }
36
35
 
37
36
  // We use this to control styles for button groups
38
- @mixin button-group-style($radius:false, $even:false, $float:$default-float) {
37
+ @mixin button-group-style($radius:false, $even:false, $float:false, $orientation:horizontal) {
39
38
 
40
39
  > button, .button {
41
40
  border-#{$default-float}: $button-group-border-width solid;
@@ -52,30 +51,90 @@ $button-group-border-width: 1px !default;
52
51
  @if $float {
53
52
  margin: 0;
54
53
  float: $float;
54
+ display: list-item;
55
55
  // Make sure the first child doesn't get the negative margin.
56
56
  &:first-child { margin-#{$default-float}: 0; }
57
57
  }
58
+ @else {
59
+ margin: 0 -2px;
60
+ float: none;
61
+ display: inline-block;
62
+ }
63
+
64
+ @if $orientation == vertical {
65
+ display:block;
66
+ margin:0;
67
+ > button, .button {
68
+ border-top: $button-group-border-width solid;
69
+ border-color: rgba(255, 255, 255, 0.5);
70
+ border-left-width: 0px;
71
+ margin:0;
72
+ display: block;
73
+ }
74
+
75
+ &:first-child {
76
+ button, .button {
77
+ border-top: 0;
78
+ }
79
+ }
80
+ }
58
81
 
59
82
  // We use these to control left and right radius on first/last buttons in the group.
60
83
  @if $radius == true {
84
+ &,
85
+ & > a,
86
+ & > button,
87
+ & > .button { @include radius(0); }
61
88
  &:first-child,
62
89
  &:first-child > a,
63
90
  &:first-child > button,
64
- &:first-child > .button { @include side-radius($default-float, $button-radius); }
91
+ &:first-child > .button {
92
+ @if $orientation == vertical {
93
+ @include side-radius(top, $button-radius);
94
+ }
95
+ @else {
96
+ @include side-radius($default-float, $button-radius);
97
+ }
98
+ }
65
99
  &:last-child,
66
100
  &:last-child > a,
67
101
  &:last-child > button,
68
- &:last-child > .button { @include side-radius($opposite-direction, $button-radius); }
102
+ &:last-child > .button {
103
+ @if $orientation == vertical {
104
+ @include side-radius(bottom, $button-radius);
105
+ }
106
+ @else {
107
+ @include side-radius($opposite-direction, $button-radius);
108
+ }
109
+ }
69
110
  }
70
111
  @else if $radius {
112
+ &,
113
+ & > a,
114
+ & > button,
115
+ & > .button { @include radius(0); }
71
116
  &:first-child,
72
117
  &:first-child > a,
73
118
  &:first-child > button,
74
- &:first-child > .button { @include side-radius($default-float, $radius); }
119
+ &:first-child > .button {
120
+ @if $orientation == vertical {
121
+ @include side-radius(top, $radius);
122
+ }
123
+ @else {
124
+ @include side-radius($default-float, $radius);
125
+ }
126
+ }
75
127
  &:last-child,
76
128
  &:last-child > a,
77
129
  &:last-child > button,
78
- &:last-child > .button { @include side-radius($opposite-direction, $radius); }
130
+ &:last-child > .button {
131
+ @if $orientation == vertical {
132
+ @include side-radius(bottom, $radius);
133
+ }
134
+ @else {
135
+ @include side-radius($opposite-direction, $radius);
136
+ }
137
+ }
79
138
  }
80
139
 
81
140
  // We use this to make the buttons even width across their container
@@ -83,7 +142,6 @@ $button-group-border-width: 1px !default;
83
142
  width: percentage((100/$even) / 100);
84
143
  button, .button { width: 100%; }
85
144
  }
86
-
87
145
  }
88
146
 
89
147
  @include exports("button-group") {
@@ -92,8 +150,40 @@ $button-group-border-width: 1px !default;
92
150
 
93
151
  & > li { @include button-group-style(); }
94
152
 
153
+ &.stack {
154
+ & > li { @include button-group-style($orientation:vertical); }
155
+ }
156
+
157
+ &.stack-for-small {
158
+ & > li {
159
+ @include button-group-style($orientation:horizontal);
160
+ @media #{$small-only} {
161
+ @include button-group-style($orientation:vertical);
162
+ }
163
+ }
164
+ }
165
+
95
166
  &.radius > * { @include button-group-style($radius:$button-radius, $float:null); }
167
+ &.radius.stack > * { @include button-group-style($radius:$button-radius, $float:null, $orientation:vertical); }
168
+ &.radius.stack-for-small > * {
169
+ @media #{$medium-up} {
170
+ @include button-group-style($radius:$button-radius, $orientation:horizontal);
171
+ }
172
+ @media #{$small-only} {
173
+ @include button-group-style($radius:$button-radius, $orientation:vertical);
174
+ }
175
+ }
176
+
96
177
  &.round > * { @include button-group-style($radius:$button-round, $float:null); }
178
+ &.round.stack > * { @include button-group-style($radius:$button-med, $float:null, $orientation:vertical); }
179
+ &.round.stack-for-small > * {
180
+ @media #{$medium-up} {
181
+ @include button-group-style($radius:$button-round, $orientation:horizontal);
182
+ }
183
+ @media #{$small-only} {
184
+ @include button-group-style($radius:$button-med, $orientation:vertical);
185
+ }
186
+ }
97
187
 
98
188
  @for $i from 2 through 8 {
99
189
  &.even-#{$i} li { @include button-group-style($even:$i, $float:null); }
@@ -102,7 +192,7 @@ $button-group-border-width: 1px !default;
102
192
 
103
193
  .button-bar {
104
194
  @include clearfix;
105
- .button-group { @include button-group-container($styles:false,$float:true); }
195
+ .button-group { @include button-group-container($styles:false, $float:true); }
106
196
  }
107
197
  }
108
- }
198
+ }
@@ -21,8 +21,8 @@ $button-margin-bottom: rem-calc(20) !default;
21
21
 
22
22
  // We use these to control button text styles.
23
23
  $button-font-family: $body-font-family !default;
24
- $button-font-color: #fff !default;
25
- $button-font-color-alt: #333 !default;
24
+ $button-font-color: $white !default;
25
+ $button-font-color-alt: $oil !default;
26
26
  $button-font-tny: rem-calc(11) !default;
27
27
  $button-font-sml: rem-calc(13) !default;
28
28
  $button-font-med: rem-calc(16) !default;
@@ -36,15 +36,27 @@ $button-function-factor: -20% !default;
36
36
  // We use these to control button border styles.
37
37
  $button-border-width: 0px !default;
38
38
  $button-border-style: solid !default;
39
- $button-bg: $primary-color !default;
40
- $button-border-color: scale-color($button-bg, $lightness: $button-function-factor) !default;
39
+ $button-bg-color: $primary-color !default;
40
+ $button-bg-hover: scale-color($button-bg-color, $lightness: $button-function-factor) !default;
41
+ $button-border-color: $button-bg-hover !default;
42
+ $secondary-button-bg-hover: scale-color($secondary-color, $lightness: $button-function-factor) !default;
43
+ $secondary-button-border-color: $secondary-button-bg-hover !default;
44
+ $success-button-bg-hover: scale-color($success-color, $lightness: $button-function-factor) !default;
45
+ $success-button-border-color: $success-button-bg-hover !default;
46
+ $alert-button-bg-hover: scale-color($alert-color, $lightness: $button-function-factor) !default;
47
+ $alert-button-border-color: $alert-button-bg-hover !default;
48
+ $warning-button-bg-hover: scale-color($warning-color, $lightness: $button-function-factor) !default;
49
+ $warning-button-border-color: $warning-button-bg-hover !default;
50
+ $info-button-bg-hover: scale-color($info-color, $lightness: $button-function-factor) !default;
51
+ $info-button-border-color: $info-button-bg-hover !default;
41
52
 
42
53
  // We use this to set the default radius used throughout the core.
43
54
  $button-radius: $global-radius !default;
44
55
  $button-round: $global-rounded !default;
45
56
 
46
- // We use this to set default opacity for disabled buttons.
57
+ // We use this to set default opacity and cursor for disabled buttons.
47
58
  $button-disabled-opacity: 0.7 !default;
59
+ $button-disabled-cursor: $cursor-default-value !default;
48
60
 
49
61
 
50
62
  //
@@ -113,6 +125,10 @@ $button-disabled-opacity: 0.7 !default;
113
125
  }
114
126
  }
115
127
 
128
+ // @MIXIN
129
+ //
130
+ // we use this mixin to create the button hover and border colors
131
+
116
132
  // @MIXIN
117
133
  //
118
134
  // We use this mixin to add button color styles
@@ -120,42 +136,50 @@ $button-disabled-opacity: 0.7 !default;
120
136
  // $bg - Primary color set in settings file. Default: $button-bg.
121
137
  // $radius - If true, set to button radius which is $global-radius || explicitly set radius amount in px (ex. $radius:10px). Default: true
122
138
  // $disabled - We can set $disabled:true to create a disabled transparent button. Default: false
123
- @mixin button-style($bg:$button-bg, $radius:false, $disabled:false) {
139
+ // $bg-hover - Button Hover Background Color. Default: $button-bg-hover
140
+ // $border-color - Button Border Color. Default: $button-border-color
141
+ @mixin button-style($bg:$button-bg-color, $radius:false, $disabled:false, $bg-hover:null, $border-color:null) {
124
142
 
125
143
  // We control which background styles are used,
126
144
  // these can be removed by setting $bg:false
127
145
  @if $bg {
146
+
147
+ @if $bg-hover == null {
148
+ $bg-hover: if($bg == $button-bg-color, $button-bg-hover, scale-color($bg, $lightness: $button-function-factor));
149
+ }
150
+
151
+ @if $border-color == null {
152
+ $border-color: if($bg == $button-bg-color, $button-border-color, scale-color($bg, $lightness: $button-function-factor));
153
+ }
154
+
128
155
  // This find the lightness percentage of the background color.
129
156
  $bg-lightness: lightness($bg);
157
+ $bg-hover-lightness: lightness($bg-hover);
130
158
 
131
159
  background-color: $bg;
132
- border-color: scale-color($bg, $lightness: $button-function-factor);
160
+ border-color: $border-color;
133
161
  &:hover,
134
- &:focus { background-color: scale-color($bg, $lightness: $button-function-factor); }
162
+ &:focus { background-color: $bg-hover; }
135
163
 
136
164
  // We control the text color for you based on the background color.
137
- @if $bg-lightness > 70% {
138
- color: $button-font-color-alt;
139
- &:hover,
140
- &:focus { color: $button-font-color-alt; }
141
- }
142
- @else {
143
- color: $button-font-color;
144
- &:hover,
145
- &:focus { color: $button-font-color; }
165
+ color: if($bg-lightness > 70%, $button-font-color-alt, $button-font-color);
166
+
167
+ &:hover,
168
+ &:focus {
169
+ color: if($bg-hover-lightness > 70%, $button-font-color-alt, $button-font-color);
146
170
  }
147
171
  }
148
172
 
149
173
  // We can set $disabled:true to create a disabled transparent button.
150
174
  @if $disabled {
151
- cursor: $cursor-default-value;
175
+ cursor: $button-disabled-cursor;
152
176
  opacity: $button-disabled-opacity;
153
177
  box-shadow: none;
154
178
  &:hover,
155
179
  &:focus { background-color: $bg; }
156
180
  }
157
181
 
158
- // We can control how much button radius us used.
182
+ // We can control how much button radius is used.
159
183
  @if $radius == true { @include radius($button-radius); }
160
184
  @else if $radius { @include radius($radius); }
161
185
 
@@ -172,10 +196,17 @@ $button-disabled-opacity: 0.7 !default;
172
196
  // $disabled - We can set $disabled:true to create a disabled transparent button. Default:false.
173
197
  // $is-input - <input>'s and <button>'s take on strange padding. We added this to help fix that. Default:false.
174
198
  // $is-prefix - Not used? Default:false.
175
- @mixin button($padding:$button-med, $bg:$button-bg, $radius:false, $full-width:false, $disabled:false, $is-prefix:false) {
199
+ // $bg-hover - Button Hover Color - Default null - see button-style mixin
200
+ // $border-color - Button Border Color - Default null - see button-style mixin
201
+ // $transition - We can control whether or not to include the background-color transition property - Default:true.
202
+ @mixin button($padding:$button-med, $bg:$button-bg-color, $radius:false, $full-width:false, $disabled:false, $is-input:false, $is-prefix:false, $bg-hover:null, $border-color:null, $transition: true) {
176
203
  @include button-base;
177
204
  @include button-size($padding, $full-width);
178
- @include button-style($bg, $radius, $disabled);
205
+ @include button-style($bg, $radius, $disabled, $bg-hover, $border-color);
206
+
207
+ @if $transition {
208
+ @include single-transition(background-color);
209
+ }
179
210
  }
180
211
 
181
212
 
@@ -190,9 +221,11 @@ $button-disabled-opacity: 0.7 !default;
190
221
 
191
222
  @include single-transition(background-color);
192
223
 
193
- &.secondary { @include button-style($bg:$secondary-color); }
194
- &.success { @include button-style($bg:$success-color); }
195
- &.alert { @include button-style($bg:$alert-color); }
224
+ &.secondary { @include button-style($bg:$secondary-color, $bg-hover:$secondary-button-bg-hover, $border-color:$secondary-button-border-color); }
225
+ &.success { @include button-style($bg:$success-color, $bg-hover:$success-button-bg-hover, $border-color:$success-button-border-color); }
226
+ &.alert { @include button-style($bg:$alert-color, $bg-hover:$alert-button-bg-hover, $border-color:$alert-button-border-color); }
227
+ &.warning { @include button-style($bg:$warning-color, $bg-hover:$warning-button-bg-hover, $border-color:$warning-button-border-color); }
228
+ &.info { @include button-style($bg:$info-color, $bg-hover:$info-button-bg-hover, $border-color:$info-button-border-color); }
196
229
 
197
230
  &.large { @include button-size($padding:$button-lrg); }
198
231
  &.small { @include button-size($padding:$button-sml); }
@@ -205,13 +238,18 @@ $button-disabled-opacity: 0.7 !default;
205
238
  &.radius { @include button-style($bg:false, $radius:true); }
206
239
  &.round { @include button-style($bg:false, $radius:$button-round); }
207
240
 
208
- &.disabled, &[disabled] { @include button-style($bg:$button-bg, $disabled:true);
209
- &.secondary { @include button-style($bg:$secondary-color, $disabled:true); }
210
- &.success { @include button-style($bg:$success-color, $disabled:true); }
211
- &.alert { @include button-style($bg:$alert-color, $disabled:true); }
241
+ &.disabled, &[disabled] { @include button-style($bg:$button-bg-color, $disabled:true, $bg-hover:$button-bg-hover, $border-color:$button-border-color);
242
+ &.secondary { @include button-style($bg:$secondary-color, $disabled:true, $bg-hover:$secondary-button-bg-hover, $border-color:$secondary-button-border-color); }
243
+ &.success { @include button-style($bg:$success-color, $disabled:true, $bg-hover:$success-button-bg-hover, $border-color:$success-button-border-color); }
244
+ &.alert { @include button-style($bg:$alert-color, $disabled:true, $bg-hover:$alert-button-bg-hover, $border-color:$alert-button-border-color); }
245
+ &.warning { @include button-style($bg:$warning-color, $disabled:true, $bg-hover:$warning-button-bg-hover, $border-color:$warning-button-border-color); }
246
+ &.info { @include button-style($bg:$info-color, $disabled:true, $bg-hover:$info-button-bg-hover, $border-color:$info-button-border-color); }
212
247
  }
213
248
  }
214
249
 
250
+ //firefox 2px fix
251
+ button::-moz-focus-inner {border:0; padding:0;}
252
+
215
253
  @media #{$medium-up} {
216
254
  button, .button {
217
255
  @include button-base($style:false, $display:inline-block);