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,76 @@
1
+ // Icons
2
+ // ========================================
3
+
4
+ .i-expand-gray,
5
+ .i-expand-white,
6
+ .i-image,
7
+ .i-suggest-tick,
8
+ .i-suggest-x,
9
+ .i-plane,
10
+ .i-star-banner
11
+ +i-icon
12
+
13
+ // Close
14
+
15
+ .i-close
16
+ +ir
17
+ background-color: transparent
18
+ +background-svg("icons/icon-close-x", 10px)
19
+ background-position: 50%
20
+ background-repeat: no-repeat
21
+ border: 0
22
+ cursor: pointer
23
+ +rem(height, 15px)
24
+ opacity: .4
25
+ outline: 0
26
+ position: absolute
27
+ +rem(right, 15px)
28
+ +rem(top, 13px)
29
+ transition: $transition-all
30
+ +rem(width, 15px)
31
+
32
+ &:hover,
33
+ &:focus
34
+ opacity: $i-transparent
35
+
36
+ // Expand & image
37
+
38
+ .i-expand-gray,
39
+ .i-expand-white,
40
+ .i-image
41
+ +rem(height, 20px)
42
+ +rem(width, 25px)
43
+
44
+ .i-expand-gray
45
+ +background-svg("icons/icon-expand-gray", 25px 20px)
46
+
47
+ .i-expand-white
48
+ +background-svg("icons/icon-expand-white", 25px 20px)
49
+
50
+ .i-image
51
+ +background-svg("icons/icon-image", 25px 20px)
52
+
53
+ // Suggest
54
+
55
+ .i-suggest-tick,
56
+ .i-suggest-x
57
+ +background-svg("icons/icon-suggest", 12px 18px)
58
+ +rem(height, 9px)
59
+ +rem(width, 12px)
60
+
61
+ .i-suggest-x
62
+ +rem(background-position, 0 -9px)
63
+
64
+ // Plane
65
+
66
+ .i-plane
67
+ +background-svg("icons/icon-plane", 32px 24px)
68
+ +rem(height, 24px)
69
+ +rem(width, 32px)
70
+
71
+ // Star banner
72
+
73
+ .i-star-banner
74
+ +background-svg("icons/icon-star-banner", 21px 30px)
75
+ +rem(height, 30px)
76
+ +rem(width, 21px)
@@ -0,0 +1,29 @@
1
+ // Labels
2
+ // ========================================
3
+
4
+ .label
5
+ background-color: $white
6
+ +rem(border-radius, $border-radius-mini)
7
+ border-style: solid
8
+ +rem(border-width, 1px)
9
+ +s-hotel
10
+ font-weight: 500
11
+ +rem(padding, 3px 7px 4px 7px)
12
+ position: relative
13
+ text-transform: uppercase
14
+ vertical-align: middle
15
+ white-space: nowrap
16
+
17
+ .label-push-left
18
+ +rem(margin-left, 5px)
19
+
20
+ // Backgrounds
21
+
22
+ @each $label in $labels
23
+
24
+ $kind: nth($label, 1)
25
+ $color: nth($label, 2)
26
+
27
+ .label-#{$kind}
28
+ border-color: $color
29
+ color: $color
@@ -0,0 +1,15 @@
1
+ // Lists
2
+ // ========================================
3
+
4
+ ul,
5
+ ol,
6
+ dl,
7
+ dt,
8
+ dd
9
+ list-style: none
10
+ margin: 0
11
+ padding: 0
12
+
13
+ .list-base
14
+ list-style: disc
15
+ +rem(margin-left, 20px)
@@ -0,0 +1,32 @@
1
+ // Loading
2
+ // ========================================
3
+
4
+ .loading,
5
+ .loading:after
6
+ +background-svg("loading/loading", 34px)
7
+ +rem(height, 34px)
8
+ +rem(width, 34px)
9
+
10
+ .loading
11
+ +rem(background-position, 0 -34px)
12
+ margin-left: auto
13
+ margin-right: auto
14
+ position: relative
15
+
16
+ &:after
17
+ animation: loading 1s linear infinite
18
+ content: ""
19
+ position: absolute
20
+ right: 0
21
+ top: 0
22
+
23
+ .modal-footer &
24
+ +rem(margin-top, 4px)
25
+
26
+ // Keyframes
27
+
28
+ @keyframes loading
29
+ 0%
30
+ transform: rotate(0deg)
31
+ 100%
32
+ transform: rotate(360deg)
@@ -0,0 +1,14 @@
1
+ // Media
2
+ // ========================================
3
+
4
+ img
5
+ border: 0
6
+ display: inline-block
7
+
8
+ figure
9
+ margin: 0
10
+
11
+ iframe
12
+ border: 0
13
+ display: block
14
+ width: 100%
@@ -0,0 +1,83 @@
1
+ // Modals
2
+ // ========================================
3
+
4
+ .modal
5
+ background-color: rgba($slate-dark, .8)
6
+ bottom: 0
7
+ left: 0
8
+ opacity: 0
9
+ overflow-x: hidden
10
+ overflow-y: auto
11
+ +rem(padding, $baseline-step * 10)
12
+ position: fixed
13
+ right: 0
14
+ top: 0
15
+ transition: $transition-all
16
+ z-index: 99
17
+
18
+ .modal-fade
19
+ opacity: 1
20
+
21
+ .modal-content
22
+ background-color: $white
23
+ +rem(border-radius, $border-radius-base)
24
+ +rem(box-shadow, 0 0 0 4px rgba($black, .15))
25
+ margin: 0 auto
26
+ +rem(max-width, 660px)
27
+
28
+ .modal-header,
29
+ .modal-footer
30
+ +bump(padding, box)
31
+
32
+ .modal-header
33
+ position: relative
34
+ text-align: center
35
+
36
+ p:last-child
37
+ margin: 0
38
+
39
+ .modal-title
40
+ +s-bravo
41
+ font-weight: 400
42
+ margin: 0
43
+
44
+ .modal-body,
45
+ .modal-body-alt
46
+ background-color: $white-offset
47
+ +rem(border, 1px solid $gray-light)
48
+ +rem(border-width, 1px 0)
49
+
50
+ .modal-body
51
+ +rem(padding, ($baseline-base - 1) $gutter)
52
+
53
+ p:last-child
54
+ margin-bottom: 0
55
+
56
+ // Nav
57
+
58
+ .modal-nav
59
+ +bump(padding, gutters)
60
+
61
+ li
62
+ +rem(margin-bottom, -1px)
63
+ +bump(padding, gutters)
64
+ position: relative
65
+ z-index: 1
66
+
67
+ a
68
+ +rem(border-bottom, 5px solid transparent)
69
+ color: $gray
70
+ display: block
71
+ +s-delta
72
+ +rem(padding-bottom, $baseline-x-small)
73
+ text-align: center
74
+
75
+ &:hover,
76
+ &:focus,
77
+ &:active
78
+ color: $blue
79
+
80
+ &.modal-nav-active
81
+ border-color: $blue
82
+ color: $black
83
+ cursor: default
@@ -0,0 +1,9 @@
1
+ // Tables
2
+ // ========================================
3
+
4
+ table
5
+ border-spacing: 0
6
+
7
+ th,
8
+ td
9
+ padding: 0
@@ -0,0 +1,123 @@
1
+ // Tooltips
2
+ // ========================================
3
+
4
+ .tooltip
5
+ +rem(border, 2px solid $gray-light)
6
+ border-radius: 50%
7
+ cursor: pointer
8
+ display: inline-block
9
+ +rem(height, 22px)
10
+ position: relative
11
+ vertical-align: middle
12
+ +rem(width, 22px)
13
+
14
+ &:after
15
+ +background-svg("tooltips/tooltip-star", 10px)
16
+ content: ""
17
+ +rem(height, 10px)
18
+ position: absolute
19
+ +center(xy)
20
+ +rem(width, 10px)
21
+
22
+ &:hover,
23
+ &:focus
24
+ border-color: $blue
25
+
26
+ &:after
27
+ +rem(background-position, 0 -10px)
28
+
29
+ .form-group &
30
+ +rem(margin-left, $gutter-half)
31
+
32
+ .tooltip-push-down
33
+ +rem(margin-top, 1px)
34
+
35
+ .tooltip-pull-up
36
+ +rem(margin-top, -2px)
37
+
38
+ // Tip
39
+
40
+ .tooltip-tip,
41
+ .tooltip-header,
42
+ .tooltip-body
43
+ display: inline-block
44
+
45
+ .tooltip-header,
46
+ .tooltip-body
47
+ width: 100%
48
+
49
+ .tooltip-tip
50
+ +box-overlay($gray-light)
51
+ cursor: default
52
+ opacity: 0
53
+ pointer-events: none
54
+ position: absolute
55
+ transition: $transition-all
56
+ +rem(width, 300px)
57
+ z-index: 9
58
+
59
+ .tooltip:hover &
60
+ opacity: 1
61
+ pointer-events: auto
62
+
63
+ &:before
64
+ content: ""
65
+ +rem(height, $baseline-x-small)
66
+ position: absolute
67
+ +rem(width, 40px)
68
+
69
+ .tooltip-header
70
+ +rem(border-bottom, 1px solid $gray-light)
71
+ +h-foxtrot
72
+ +rem(padding, ($baseline-step + 3) 20px)
73
+ text-align: center
74
+
75
+ .tooltip-body
76
+ color: $gray-dark
77
+ +s-golf
78
+ +rem(padding, $baseline-small 20px)
79
+
80
+ p:not(:last-child),
81
+ .list-base li:not(:last-child)
82
+ +rem(margin-bottom, $baseline-step)
83
+
84
+ // Positioning
85
+
86
+ .tooltip-top-right,
87
+ .tooltip-top,
88
+ .tooltip-top-left
89
+ .tooltip-tip
90
+ bottom: 100%
91
+ +rem(margin-bottom, $baseline-x-small)
92
+
93
+ &:before
94
+ +rem(bottom, ($baseline-x-small * -1) - 1)
95
+
96
+ .tooltip-bottom-right,
97
+ .tooltip-bottom,
98
+ .tooltip-bottom-left
99
+ .tooltip-tip
100
+ top: 100%
101
+ +rem(margin-top, $baseline-x-small)
102
+
103
+ &:before
104
+ +rem(top, ($baseline-x-small * -1) - 1)
105
+
106
+ .tooltip-top-right,
107
+ .tooltip-bottom-right
108
+ .tooltip-tip:before
109
+ +rem(left, -1px)
110
+
111
+ .tooltip-top .tooltip-tip,
112
+ .tooltip-top .tooltip-tip:before,
113
+ .tooltip-bottom .tooltip-tip,
114
+ .tooltip-bottom .tooltip-tip:before
115
+ +center(x)
116
+
117
+ .tooltip-top-left,
118
+ .tooltip-bottom-left
119
+ .tooltip-tip
120
+ right: 0
121
+
122
+ &:before
123
+ +rem(right, -1px)
@@ -0,0 +1,33 @@
1
+ // Settings
2
+ // ========================================
3
+
4
+ // Variables
5
+ // ========================================
6
+
7
+ @import variables/colors
8
+ @import variables/layout
9
+ @import variables/misc
10
+ @import variables/typography
11
+
12
+ // Component based
13
+
14
+ @import variables/alerts
15
+ @import variables/buttons
16
+ @import variables/labels
17
+
18
+ // Mixins
19
+ // ========================================
20
+
21
+ @import mixins/bump
22
+ @import mixins/icons
23
+ @import mixins/layout
24
+ @import mixins/rems
25
+ @import mixins/svg
26
+ @import mixins/typography
27
+
28
+ // Utilities
29
+ // ========================================
30
+
31
+ @import utilities/layout
32
+ @import utilities/misc
33
+ @import utilities/typography
@@ -0,0 +1,51 @@
1
+ // Bump
2
+ // ========================================
3
+
4
+ // Bumper function
5
+
6
+ @function bumper($value)
7
+
8
+ @if $value == "baselines-step"
9
+ @return $baseline-step
10
+
11
+ @if $value == "baselines-x-small"
12
+ @return $baseline-x-small
13
+
14
+ @if $value == "baselines-small"
15
+ @return $baseline-small
16
+
17
+ @if $value == "baselines"
18
+ @return $baseline-base
19
+
20
+ @if $value == "baselines-large"
21
+ @return $baseline-large
22
+
23
+ @if $value == "baselines-x-large"
24
+ @return $baseline-x-large
25
+
26
+ @if $value == "baselines-xx-large"
27
+ @return $baseline-xx-large
28
+
29
+ @if $value == "gutters"
30
+ @return $gutter
31
+
32
+ @if $value == "gutters-half"
33
+ @return $gutter-half
34
+
35
+ // Bump mixin
36
+
37
+ =bump($property, $sides)
38
+
39
+ @if length($sides) == 2
40
+ +rem(#{$property}, bumper(nth($sides, 1)) bumper(nth($sides, 2)))
41
+
42
+ @else if str-slice($sides, 1, 9) == "baselines"
43
+ +rem(#{$property}-bottom, bumper($sides))
44
+ +rem(#{$property}-top, bumper($sides))
45
+
46
+ @else if str-slice($sides, 1, 7) == "gutters"
47
+ +rem(#{$property}-left, bumper($sides))
48
+ +rem(#{$property}-right, bumper($sides))
49
+
50
+ @else if $sides == "box"
51
+ +rem(#{$property}, $baseline-base $gutter)