rolodex 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +25 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +25 -0
  6. data/Rakefile +1 -0
  7. data/karma.conf.js +87 -0
  8. data/lib/rolodex.rb +31 -0
  9. data/lib/rolodex/engine.rb +12 -0
  10. data/lib/rolodex/sass.rb +5 -0
  11. data/lib/rolodex/version.rb +3 -0
  12. data/package.json +33 -0
  13. data/rolodex.gemspec +29 -0
  14. data/spec/javascripts/rolodex_angular/modal.spec.coffee +13 -0
  15. data/spec/spec_helper.rb +0 -0
  16. data/spec/test_lib/angular-mocks.js +2173 -0
  17. data/spec/test_lib/angular.js +21883 -0
  18. data/spec/test_lib/jquery-2.1.1.js +9190 -0
  19. data/spec/test_lib/lodash.js +6785 -0
  20. data/vendor/assets/.keep +0 -0
  21. data/vendor/assets/images/alerts/icon-danger-dark.png +0 -0
  22. data/vendor/assets/images/alerts/icon-danger-dark.svg +9 -0
  23. data/vendor/assets/images/alerts/icon-danger-light.png +0 -0
  24. data/vendor/assets/images/alerts/icon-danger-light.svg +9 -0
  25. data/vendor/assets/images/alerts/icon-flop-dark.png +0 -0
  26. data/vendor/assets/images/alerts/icon-flop-dark.svg +11 -0
  27. data/vendor/assets/images/alerts/icon-flop-light.png +0 -0
  28. data/vendor/assets/images/alerts/icon-flop-light.svg +11 -0
  29. data/vendor/assets/images/alerts/icon-info-dark.png +0 -0
  30. data/vendor/assets/images/alerts/icon-info-dark.svg +9 -0
  31. data/vendor/assets/images/alerts/icon-info-light.png +0 -0
  32. data/vendor/assets/images/alerts/icon-info-light.svg +9 -0
  33. data/vendor/assets/images/alerts/icon-tick-dark.png +0 -0
  34. data/vendor/assets/images/alerts/icon-tick-dark.svg +9 -0
  35. data/vendor/assets/images/alerts/icon-tick-light.png +0 -0
  36. data/vendor/assets/images/alerts/icon-tick-light.svg +9 -0
  37. data/vendor/assets/images/forms/checkbox.png +0 -0
  38. data/vendor/assets/images/forms/checkbox.svg +13 -0
  39. data/vendor/assets/images/forms/icon-calendar.png +0 -0
  40. data/vendor/assets/images/forms/icon-calendar.svg +20 -0
  41. data/vendor/assets/images/forms/icon-search.png +0 -0
  42. data/vendor/assets/images/forms/icon-search.svg +13 -0
  43. data/vendor/assets/images/forms/icon-validating.gif +0 -0
  44. data/vendor/assets/images/forms/icon-validating.psd +0 -0
  45. data/vendor/assets/images/forms/radio-button.png +0 -0
  46. data/vendor/assets/images/forms/radio-button.svg +12 -0
  47. data/vendor/assets/images/icons/icon-caret.png +0 -0
  48. data/vendor/assets/images/icons/icon-caret.svg +24 -0
  49. data/vendor/assets/images/icons/icon-close-x.png +0 -0
  50. data/vendor/assets/images/icons/icon-close-x.svg +9 -0
  51. data/vendor/assets/images/icons/icon-expand-gray.png +0 -0
  52. data/vendor/assets/images/icons/icon-expand-gray.svg +11 -0
  53. data/vendor/assets/images/icons/icon-expand-white.png +0 -0
  54. data/vendor/assets/images/icons/icon-expand-white.svg +11 -0
  55. data/vendor/assets/images/icons/icon-image.png +0 -0
  56. data/vendor/assets/images/icons/icon-image.svg +12 -0
  57. data/vendor/assets/images/icons/icon-invalid.png +0 -0
  58. data/vendor/assets/images/icons/icon-invalid.svg +14 -0
  59. data/vendor/assets/images/icons/icon-plane.png +0 -0
  60. data/vendor/assets/images/icons/icon-plane.svg +15 -0
  61. data/vendor/assets/images/icons/icon-star-banner.png +0 -0
  62. data/vendor/assets/images/icons/icon-star-banner.svg +16 -0
  63. data/vendor/assets/images/icons/icon-suggest.png +0 -0
  64. data/vendor/assets/images/icons/icon-suggest.svg +15 -0
  65. data/vendor/assets/images/icons/icon-tick.png +0 -0
  66. data/vendor/assets/images/icons/icon-tick.svg +9 -0
  67. data/vendor/assets/images/icons/icon-valid.png +0 -0
  68. data/vendor/assets/images/icons/icon-valid.svg +9 -0
  69. data/vendor/assets/images/loading/loading.png +0 -0
  70. data/vendor/assets/images/loading/loading.svg +23 -0
  71. data/vendor/assets/images/logo/belly-logo.png +0 -0
  72. data/vendor/assets/images/logo/belly-logo.svg +19 -0
  73. data/vendor/assets/images/tooltips/tooltip-star.png +0 -0
  74. data/vendor/assets/images/tooltips/tooltip-star.svg +20 -0
  75. data/vendor/assets/javascripts/rolodex_angular.coffee +3 -0
  76. data/vendor/assets/javascripts/rolodex_angular/README.md +68 -0
  77. data/vendor/assets/javascripts/rolodex_angular/rolodex.coffee +11 -0
  78. data/vendor/assets/javascripts/rolodex_angular/src/accordion.coffee +100 -0
  79. data/vendor/assets/javascripts/rolodex_angular/src/alert.coffee +17 -0
  80. data/vendor/assets/javascripts/rolodex_angular/src/buttons.coffee +59 -0
  81. data/vendor/assets/javascripts/rolodex_angular/src/collapse.coffee +65 -0
  82. data/vendor/assets/javascripts/rolodex_angular/src/dateparser.coffee +125 -0
  83. data/vendor/assets/javascripts/rolodex_angular/src/datepicker.coffee +547 -0
  84. data/vendor/assets/javascripts/rolodex_angular/src/dropdown.coffee +143 -0
  85. data/vendor/assets/javascripts/rolodex_angular/src/modal.coffee +331 -0
  86. data/vendor/assets/javascripts/rolodex_angular/src/position.coffee +128 -0
  87. data/vendor/assets/javascripts/rolodex_angular/src/transition.coffee +73 -0
  88. data/vendor/assets/javascripts/rolodex_angular/template/accordion/accordion-group.ngt.haml +7 -0
  89. data/vendor/assets/javascripts/rolodex_angular/template/accordion/accordion.ngt.haml +1 -0
  90. data/vendor/assets/javascripts/rolodex_angular/template/alert/alert.ngt.haml +3 -0
  91. data/vendor/assets/javascripts/rolodex_angular/template/datepicker/datepicker.ngt.haml +4 -0
  92. data/vendor/assets/javascripts/rolodex_angular/template/datepicker/day.ngt.haml +20 -0
  93. data/vendor/assets/javascripts/rolodex_angular/template/datepicker/month.ngt.haml +17 -0
  94. data/vendor/assets/javascripts/rolodex_angular/template/datepicker/popup.ngt.haml +2 -0
  95. data/vendor/assets/javascripts/rolodex_angular/template/datepicker/year.ngt.haml +17 -0
  96. data/vendor/assets/javascripts/rolodex_angular/template/modal/window.ngt.haml +2 -0
  97. data/vendor/assets/javascripts/vendor/jquery-1.10.2.min.js +6 -0
  98. data/vendor/assets/javascripts/vendor/modernizr-2.6.2.min.js +4 -0
  99. data/vendor/assets/stylesheets/rolodex.css.sass +26 -0
  100. data/vendor/assets/stylesheets/rolodex/base/_layout.sass +58 -0
  101. data/vendor/assets/stylesheets/rolodex/base/_typography.sass +123 -0
  102. data/vendor/assets/stylesheets/rolodex/components/_alerts.sass +112 -0
  103. data/vendor/assets/stylesheets/rolodex/components/_buttons.sass +103 -0
  104. data/vendor/assets/stylesheets/rolodex/components/_dropdowns.sass +121 -0
  105. data/vendor/assets/stylesheets/rolodex/components/_forms.sass +326 -0
  106. data/vendor/assets/stylesheets/rolodex/components/_icons.sass +76 -0
  107. data/vendor/assets/stylesheets/rolodex/components/_labels.sass +29 -0
  108. data/vendor/assets/stylesheets/rolodex/components/_lists.sass +15 -0
  109. data/vendor/assets/stylesheets/rolodex/components/_loading.sass +32 -0
  110. data/vendor/assets/stylesheets/rolodex/components/_media.sass +14 -0
  111. data/vendor/assets/stylesheets/rolodex/components/_modals.sass +83 -0
  112. data/vendor/assets/stylesheets/rolodex/components/_tables.sass +9 -0
  113. data/vendor/assets/stylesheets/rolodex/components/_tooltips.sass +123 -0
  114. data/vendor/assets/stylesheets/rolodex/settings/_settings.sass +33 -0
  115. data/vendor/assets/stylesheets/rolodex/settings/mixins/_bump.sass +51 -0
  116. data/vendor/assets/stylesheets/rolodex/settings/mixins/_icons.sass +17 -0
  117. data/vendor/assets/stylesheets/rolodex/settings/mixins/_layout.sass +52 -0
  118. data/vendor/assets/stylesheets/rolodex/settings/mixins/_rems.sass +41 -0
  119. data/vendor/assets/stylesheets/rolodex/settings/mixins/_svg.sass +10 -0
  120. data/vendor/assets/stylesheets/rolodex/settings/mixins/_typography.sass +65 -0
  121. data/vendor/assets/stylesheets/rolodex/settings/utilities/_layout.sass +51 -0
  122. data/vendor/assets/stylesheets/rolodex/settings/utilities/_misc.sass +13 -0
  123. data/vendor/assets/stylesheets/rolodex/settings/utilities/_typography.sass +60 -0
  124. data/vendor/assets/stylesheets/rolodex/settings/variables/_alerts.scss +27 -0
  125. data/vendor/assets/stylesheets/rolodex/settings/variables/_buttons.scss +10 -0
  126. data/vendor/assets/stylesheets/rolodex/settings/variables/_colors.scss +46 -0
  127. data/vendor/assets/stylesheets/rolodex/settings/variables/_labels.scss +10 -0
  128. data/vendor/assets/stylesheets/rolodex/settings/variables/_layout.scss +22 -0
  129. data/vendor/assets/stylesheets/rolodex/settings/variables/_misc.scss +12 -0
  130. data/vendor/assets/stylesheets/rolodex/settings/variables/_typography.scss +34 -0
  131. metadata +263 -0
@@ -0,0 +1,17 @@
1
+ // Icons
2
+ // ========================================
3
+
4
+ =i-icon
5
+ +ir
6
+ background-repeat: no-repeat
7
+ display: inline-block
8
+ vertical-align: middle
9
+
10
+ =i-caret($color: "")
11
+ +i-icon
12
+ +background-svg("icons/icon-caret", 12px 23px)
13
+ +rem(height, 7px)
14
+ +rem(width, 12px)
15
+
16
+ @if $color == white
17
+ +rem(background-position, 0 -16px)
@@ -0,0 +1,52 @@
1
+ // Layout
2
+ // ========================================
3
+
4
+ // Image replacement
5
+
6
+ =ir
7
+ color: transparent
8
+ font: 0/0 a
9
+ text-shadow: none
10
+
11
+ // Box overlay
12
+
13
+ =box-overlay($border-color: "")
14
+ background-color: $white
15
+ +rem(border-radius, $border-radius-base)
16
+ +rem(box-shadow, 0 0 0 4px rgba($black, .06))
17
+
18
+ @if $border-color != ""
19
+ +rem(border, 1px solid $border-color)
20
+
21
+ @else
22
+ +rem(border, 1px solid $blue)
23
+
24
+ // Clearfix
25
+
26
+ =group
27
+ &:before,
28
+ &:after
29
+ content: ""
30
+ display: table
31
+
32
+ &:after
33
+ clear: both
34
+
35
+ // Center
36
+
37
+ =center($alignment)
38
+
39
+ @if $alignment == "x" or $alignment == "xy"
40
+ left: 50%
41
+
42
+ @if $alignment == "y" or $alignment == "xy"
43
+ top: 50%
44
+
45
+ @if $alignment == "x"
46
+ transform: translateX(-50%)
47
+
48
+ @if $alignment == "y"
49
+ transform: translateY(-50%)
50
+
51
+ @if $alignment == "xy"
52
+ transform: translateX(-50%) translateY(-50%)
@@ -0,0 +1,41 @@
1
+ // REM conversion
2
+ // ========================================
3
+
4
+ // Strip the unit from a value
5
+
6
+ @function remove-unit($num)
7
+ @return $num / ($num * 0 + 1)
8
+
9
+ // Mixin
10
+
11
+ =rem($property, $values)
12
+
13
+ $root: remove-unit($font-size-base)
14
+
15
+ $px-values: ()
16
+ $rem-values: ()
17
+
18
+ @each $value in $values
19
+
20
+ @if $value == 0 or type-of($value) != "number"
21
+ $px-values: append($px-values, $value)
22
+ $rem-values: append($rem-values, $value)
23
+
24
+ @else
25
+ $unit: unit($value)
26
+ $val: remove-unit($value)
27
+
28
+ @if $unit == "px"
29
+ $px-values: append($px-values, ($val + px))
30
+ $rem-values: append($rem-values, ($val / $root + rem))
31
+
32
+ @if $unit == "rem"
33
+ $px-values: append($px-values, ($val * $root + px))
34
+ $rem-values: append($rem-values, ($val + rem))
35
+
36
+ @if $rem-values == $px-values
37
+ #{$property}: $rem-values
38
+
39
+ @else
40
+ #{$property}: $px-values
41
+ #{$property}: $rem-values
@@ -0,0 +1,10 @@
1
+ // SVG fallbacks
2
+ // ========================================
3
+
4
+ =background-svg($file-name, $size...)
5
+
6
+ background-image: image-url("#{$file-name}.png")
7
+ background-image: image-url("#{$file-name}.svg")
8
+
9
+ @if length($size) > 0
10
+ +rem(background-size, $size)
@@ -0,0 +1,65 @@
1
+ // Typography
2
+ // ========================================
3
+
4
+ // Scale
5
+
6
+ =s-giga
7
+ +rem(font-size, $s-giga)
8
+
9
+ =s-mega
10
+ +rem(font-size, $s-mega)
11
+
12
+ =s-alpha
13
+ +rem(font-size, $s-alpha)
14
+ +rem(line-height, $baseline-xx-large)
15
+
16
+ =s-bravo
17
+ +rem(font-size, $s-bravo)
18
+ +rem(line-height, $baseline-large)
19
+
20
+ =s-charlie
21
+ +rem(font-size, $s-charlie)
22
+ +rem(line-height, $baseline-large)
23
+
24
+ =s-delta
25
+ +rem(font-size, $s-delta)
26
+
27
+ =s-echo
28
+ +rem(font-size, $s-echo)
29
+
30
+ =s-foxtrot
31
+ +rem(font-size, $s-foxtrot)
32
+
33
+ =s-golf
34
+ +rem(font, $s-golf $font-family-helvetica)
35
+ +rem(line-height, $baseline-small)
36
+
37
+ =s-hotel
38
+ +rem(font, $s-hotel $font-family-helvetica)
39
+ +rem(line-height, $baseline-small)
40
+
41
+ // Headings
42
+
43
+ =h-alpha
44
+ +s-alpha
45
+ font-weight: 300
46
+
47
+ =h-bravo
48
+ +s-bravo
49
+ font-weight: 300
50
+
51
+ =h-charlie
52
+ +s-charlie
53
+ font-weight: 300
54
+
55
+ =h-delta
56
+ +s-delta
57
+ font-weight: 400
58
+
59
+ =h-echo
60
+ +s-echo
61
+ font-weight: 600
62
+
63
+ =h-foxtrot
64
+ +s-foxtrot
65
+ font-weight: 600
@@ -0,0 +1,51 @@
1
+ // Layout
2
+ // ========================================
3
+
4
+ // Floats
5
+
6
+ .pull-left
7
+ float: left
8
+
9
+ .pull-right
10
+ float: right
11
+
12
+ // Clearfix
13
+
14
+ .group
15
+ +group
16
+
17
+ // Grid
18
+ // ========================================
19
+
20
+ .grid
21
+ list-style: none
22
+ +rem(letter-spacing, -4px)
23
+
24
+ .opera:-o-prefocus,
25
+ .grid
26
+ +rem(word-spacing, -5px)
27
+
28
+ .grid-col
29
+ display: inline-block
30
+ *display: inline
31
+ letter-spacing: normal
32
+ vertical-align: top
33
+ white-space: normal
34
+ zoom: 1
35
+
36
+ // Grid
37
+
38
+ .grid-1-1
39
+ width: 100%
40
+
41
+ $columns: 12
42
+
43
+ // Counting down from 12, for 12 columns
44
+ @while 1 <= $columns
45
+
46
+ // Counting up to the given potential number of columns in a given row
47
+ @for $column from 1 to $columns
48
+ .grid-#{$column}-#{$columns}
49
+ width: ($column/$columns) * 100%
50
+
51
+ $columns: $columns - 1
@@ -0,0 +1,13 @@
1
+ // Misc
2
+ // ========================================
3
+
4
+ // Icons
5
+
6
+ .i-icon
7
+ +i-icon
8
+
9
+ .i-caret
10
+ +i-caret
11
+
12
+ .i-caret-white
13
+ +i-caret(white)
@@ -0,0 +1,60 @@
1
+ // Typography
2
+ // ========================================
3
+
4
+ // Scale
5
+
6
+ .s-giga
7
+ +s-giga
8
+
9
+ .s-mega
10
+ +s-mega
11
+
12
+ .s-alpha
13
+ +s-alpha
14
+
15
+ .s-bravo
16
+ +s-bravo
17
+
18
+ .s-charlie
19
+ +s-charlie
20
+
21
+ .s-delta
22
+ +s-delta
23
+
24
+ .s-echo
25
+ +s-echo
26
+
27
+ .s-foxtrot
28
+ +s-foxtrot
29
+
30
+ .s-golf
31
+ +s-golf
32
+
33
+ .s-hotel
34
+ +s-hotel
35
+
36
+ // Headings
37
+
38
+ .h-alpha
39
+ +h-alpha
40
+
41
+ .h-bravo
42
+ +h-bravo
43
+
44
+ .h-charlie
45
+ +h-charlie
46
+
47
+ .h-delta
48
+ +h-delta
49
+
50
+ .h-echo
51
+ +h-echo
52
+
53
+ .h-foxtrot
54
+ +h-foxtrot
55
+
56
+ // Colors
57
+
58
+ @each $color, $i in $text-colors
59
+ .text-#{$i},
60
+ color: $color
@@ -0,0 +1,27 @@
1
+ // Alerts
2
+ // ========================================
3
+
4
+ $alerts: (
5
+ (success, tick, $green, $green-light, $green-dark)
6
+ (warning, info, $gold, $gold-light, $gold-dark)
7
+ (danger, danger, $red, $red-light, $red-dark)
8
+ (default, flop, $blue, $blue-light, $blue-dark)
9
+ );
10
+
11
+ // Banner - Width, height, & top offset
12
+
13
+ $alerts-banner: (
14
+ (success, 22px, 22px, 19px)
15
+ (warning, 22px, 22px, 19px)
16
+ (danger, 22px, 20px, 21px)
17
+ (default, 24px, 21px, 20px)
18
+ );
19
+
20
+ // Inline - Width, height, & top offset
21
+
22
+ $alerts-inline: (
23
+ (success, 16px, 16px, 12px)
24
+ (warning, 16px, 16px, 12px)
25
+ (danger, 16px, 15px, 13px)
26
+ (default, 20px, 18px, 11px)
27
+ );
@@ -0,0 +1,10 @@
1
+ // Buttons
2
+ // ========================================
3
+
4
+ $btns: (
5
+ (default, $blue, #3599c7, $blue-dark)
6
+ (success, $green, #3e9b56, $green-dark)
7
+ (warning, $gold, #d89b45, $gold-dark)
8
+ (danger, $red, #b6464a, $red-dark)
9
+ (boring, $white, $white-offset, #eee)
10
+ );
@@ -0,0 +1,46 @@
1
+ // Colors
2
+ // ========================================
3
+
4
+ // Brand palettes
5
+
6
+ $blue: #33a9e0;
7
+ $blue-light: #e1f2fa;
8
+ $blue-dark: #0076ad;
9
+
10
+ $slate: #45454c;
11
+ $slate-light: #efeff4;
12
+ $slate-dark: #1e1e21;
13
+
14
+ $red: #cb4e52;
15
+ $red-light: #f7e2e2;
16
+ $red-dark: #9c292d;
17
+
18
+ $gold: #f3ae4e;
19
+ $gold-light: #fceddf;
20
+ $gold-dark: #c07b1b;
21
+
22
+ $purple: #6479bf;
23
+ $purple-light: #cbd6f4;
24
+ $purple-dark: #31468c;
25
+
26
+ $orange: #ed844a;
27
+ $orange-light: #f4d4c6;
28
+ $orange-dark: #ba5117;
29
+
30
+ $green: #45ad60;
31
+ $green-light: #c8edcd;
32
+ $green-dark: #127a2d;
33
+
34
+ $pink: #d37295;
35
+ $pink-light: #f2d1e3;
36
+ $pink-dark: #a03f62;
37
+
38
+ // Monochromatic palette
39
+
40
+ $white: #fff;
41
+ $white-offset: #f7f7f7;
42
+ $gray-light: #ccc;
43
+ $gray: #999;
44
+ $gray-dark: #666;
45
+ $black-offset: #333;
46
+ $black: #000;
@@ -0,0 +1,10 @@
1
+ // Labels
2
+ // ========================================
3
+
4
+ $labels: (
5
+ (success, $green)
6
+ (warning, $gold)
7
+ (danger, $red)
8
+ (default, $blue)
9
+ (alt, $purple)
10
+ );
@@ -0,0 +1,22 @@
1
+ // Layout
2
+ // ========================================
3
+
4
+ // Gutters
5
+
6
+ $gutter: 30px;
7
+ $gutter-half: $gutter / 2;
8
+
9
+ // Baselines
10
+
11
+ $baseline-step: 6px;
12
+ $baseline-x-small: $baseline-step * 2; // 12px
13
+ $baseline-small: $baseline-step * 3; // 18px
14
+ $baseline-base: $baseline-step * 4; // 24px
15
+ $baseline-large: $baseline-step * 5; // 30px
16
+ $baseline-x-large: $baseline-step * 6; // 36px
17
+ $baseline-xx-large: $baseline-step * 7; // 42px
18
+
19
+ // Border radius
20
+
21
+ $border-radius-base: 6px;
22
+ $border-radius-mini: 4px;
@@ -0,0 +1,12 @@
1
+ // Misc
2
+ // ========================================
3
+
4
+ // Transition
5
+
6
+ $transition-duration: .15s;
7
+ $transition-function: ease;
8
+ $transition-all: all $transition-duration $transition-function;
9
+
10
+ // Icons
11
+
12
+ $i-transparent: .65