express_ui 0.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +38 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/config/express_ui_manifest.js +2 -0
  6. data/app/assets/javascripts/express_ui/application.js +1 -0
  7. data/app/assets/javascripts/express_ui/copy_code.js +63 -0
  8. data/app/assets/javascripts/express_ui/search.js +103 -0
  9. data/app/assets/javascripts/express_ui/styleguide.js +90 -0
  10. data/app/assets/stylesheets/express_ui/atoms/_animations.sass +35 -0
  11. data/app/assets/stylesheets/express_ui/atoms/_buttons.sass +119 -0
  12. data/app/assets/stylesheets/express_ui/atoms/_headings.sass +51 -0
  13. data/app/assets/stylesheets/express_ui/atoms/_icons.sass +3 -0
  14. data/app/assets/stylesheets/express_ui/atoms/_images.sass +37 -0
  15. data/app/assets/stylesheets/express_ui/atoms/_media_queries.sass +27 -0
  16. data/app/assets/stylesheets/express_ui/atoms/_mixins.sass +33 -0
  17. data/app/assets/stylesheets/express_ui/atoms/_reset.sass +11 -0
  18. data/app/assets/stylesheets/express_ui/atoms/_typography.sass +167 -0
  19. data/app/assets/stylesheets/express_ui/atoms/_variables.sass +52 -0
  20. data/app/assets/stylesheets/express_ui/molecules/_button_group.sass +54 -0
  21. data/app/assets/stylesheets/express_ui/molecules/_container.sass +29 -0
  22. data/app/assets/stylesheets/express_ui/molecules/_flash_messages.sass +56 -0
  23. data/app/assets/stylesheets/express_ui/molecules/_form_groups.sass +96 -0
  24. data/app/assets/stylesheets/express_ui/molecules/_forms.sass +159 -0
  25. data/app/assets/stylesheets/express_ui/molecules/_lists.sass +56 -0
  26. data/app/assets/stylesheets/express_ui/molecules/_nav.sass +85 -0
  27. data/app/assets/stylesheets/express_ui/molecules/_tables.sass +77 -0
  28. data/app/assets/stylesheets/express_ui/molecules/_tabs.sass +23 -0
  29. data/app/assets/stylesheets/express_ui/organisms/_header.sass +29 -0
  30. data/app/assets/stylesheets/express_ui/organisms/_sidebar.sass +113 -0
  31. data/app/assets/stylesheets/express_ui/style.sass +31 -0
  32. data/app/assets/stylesheets/express_ui/styleguide.sass +200 -0
  33. data/app/assets/stylesheets/express_ui/templates/_content_sidebar.sass +31 -0
  34. data/app/assets/stylesheets/express_ui/templates/_full_width.sass +5 -0
  35. data/app/assets/stylesheets/express_ui/templates/_half_width.sass +8 -0
  36. data/app/assets/stylesheets/express_ui/templates/_master_detail.sass +50 -0
  37. data/app/components/code_demo.rb +31 -0
  38. data/app/controllers/express_ui/about_controller.rb +10 -0
  39. data/app/controllers/express_ui/application_controller.rb +5 -0
  40. data/app/controllers/express_ui/styleguide_controller.rb +10 -0
  41. data/app/controllers/express_ui/templates_controller.rb +26 -0
  42. data/app/controllers/express_ui/uicomponents_controller.rb +26 -0
  43. data/app/helpers/express_ui/application_helper.rb +28 -0
  44. data/app/jobs/express_ui/application_job.rb +4 -0
  45. data/app/mailers/express_ui/application_mailer.rb +6 -0
  46. data/app/models/express_ui/application_record.rb +5 -0
  47. data/app/views/express_ui/atoms/_animations.html.erb +33 -0
  48. data/app/views/express_ui/atoms/_buttons.html.erb +129 -0
  49. data/app/views/express_ui/atoms/_headings.html.erb +3 -0
  50. data/app/views/express_ui/atoms/_icons.html.erb +13 -0
  51. data/app/views/express_ui/atoms/_mixins.html.erb +6 -0
  52. data/app/views/express_ui/atoms/_typography.html.erb +201 -0
  53. data/app/views/express_ui/atoms/_variables.html.erb +50 -0
  54. data/app/views/express_ui/molecules/_button_group.html.erb +90 -0
  55. data/app/views/express_ui/molecules/_container.html.erb +32 -0
  56. data/app/views/express_ui/molecules/_flash_messages.html.erb +49 -0
  57. data/app/views/express_ui/molecules/_form_group_horizontal.html.erb +14 -0
  58. data/app/views/express_ui/molecules/_form_group_inline.html.erb +1 -0
  59. data/app/views/express_ui/molecules/_form_group_single_line.html.erb +9 -0
  60. data/app/views/express_ui/molecules/_form_groups.html.erb +69 -0
  61. data/app/views/express_ui/molecules/_forms.html.erb +209 -0
  62. data/app/views/express_ui/molecules/_forms_checkbox.html.erb +20 -0
  63. data/app/views/express_ui/molecules/_forms_radio.html.erb +12 -0
  64. data/app/views/express_ui/molecules/_forms_select.html.erb +11 -0
  65. data/app/views/express_ui/molecules/_nav.html.erb +11 -0
  66. data/app/views/express_ui/molecules/_nav_mega_menu.html.erb +74 -0
  67. data/app/views/express_ui/molecules/_table.html.erb +93 -0
  68. data/app/views/express_ui/molecules/_table_with_filtering.html.erb +55 -0
  69. data/app/views/express_ui/organisms/_header.html.erb +24 -0
  70. data/app/views/express_ui/shared/_header.html.erb +10 -0
  71. data/app/views/express_ui/shared/_search_box.html.erb +6 -0
  72. data/app/views/express_ui/shared/_sidebar_left.html.erb +4 -0
  73. data/app/views/express_ui/shared/_sidebar_right.html.erb +5 -0
  74. data/app/views/express_ui/styleguide/about.html.erb +22 -0
  75. data/app/views/express_ui/styleguide/index.html.erb +79 -0
  76. data/app/views/express_ui/templates/_header.html.erb +15 -0
  77. data/app/views/express_ui/templates/_templates.html.erb +57 -0
  78. data/app/views/express_ui/templates/content_and_sidebar.html.erb +32 -0
  79. data/app/views/express_ui/templates/content_and_sidebar_fixed.html.erb +34 -0
  80. data/app/views/express_ui/templates/full_width.html.erb +25 -0
  81. data/app/views/express_ui/templates/half_width.html.erb +25 -0
  82. data/app/views/express_ui/templates/master_detail.html.erb +41 -0
  83. data/app/views/express_ui/templates/master_detail_fixed.html.erb +36 -0
  84. data/app/views/express_ui/uicomponents/_buttons.html.et +10 -0
  85. data/app/views/express_ui/uicomponents/_flash_message.html.et +19 -0
  86. data/app/views/express_ui/uicomponents/_forms.html.et +118 -0
  87. data/app/views/express_ui/uicomponents/_heading.html.et +24 -0
  88. data/app/views/express_ui/uicomponents/_icons.html.et +35 -0
  89. data/app/views/express_ui/uicomponents/_layout.html.et +47 -0
  90. data/app/views/express_ui/uicomponents/_lists.html.et +9 -0
  91. data/app/views/express_ui/uicomponents/_login.html.erb +15 -0
  92. data/app/views/express_ui/uicomponents/_nav.html.et +18 -0
  93. data/app/views/express_ui/uicomponents/_pages.html.et +22 -0
  94. data/app/views/express_ui/uicomponents/_panel.html.et +33 -0
  95. data/app/views/express_ui/uicomponents/_popup.html.et +19 -0
  96. data/app/views/express_ui/uicomponents/_register.html.erb +14 -0
  97. data/app/views/express_ui/uicomponents/_sidebar.html.et +8 -0
  98. data/app/views/express_ui/uicomponents/_table.html.et +29 -0
  99. data/app/views/express_ui/uicomponents/_widget_box.html.et +14 -0
  100. data/app/views/express_ui/uicomponents/index.html.erb +55 -0
  101. data/app/views/layouts/express_ui/styleguide.html.erb +20 -0
  102. data/config/routes.rb +12 -0
  103. data/lib/express_ui.rb +5 -0
  104. data/lib/express_ui/engine.rb +12 -0
  105. data/lib/express_ui/version.rb +3 -0
  106. data/lib/tasks/express_ui_tasks.rake +4 -0
  107. metadata +251 -0
@@ -0,0 +1,51 @@
1
+ @mixin h1
2
+ @include font-size(22px, 24px)
3
+
4
+ @mixin h2
5
+ @include font-size(20px, 20px)
6
+
7
+ @mixin h3
8
+ @include font-size(18px, 18px)
9
+
10
+ @mixin h4
11
+ @include font-size(16px, 16px)
12
+
13
+ @mixin h5
14
+ @include font-size(14px, 14px)
15
+
16
+ @mixin h6
17
+ @include font-size(12px, 12px)
18
+
19
+ @mixin heading($border-color, $casing)
20
+ text-transform: $casing
21
+ border-bottom: 1px solid $border-color
22
+ padding-bottom: 0.5em
23
+
24
+ // $casing: uppercase, default
25
+
26
+ h1, h2, h3, h4, h5, h6
27
+ padding-top: 1.25em
28
+ margin-bottom: 0.25em
29
+ font-weight: bold
30
+ color: $heading-color
31
+
32
+ h1
33
+ @include h1
34
+
35
+ h2
36
+ @include h2
37
+
38
+ h3
39
+ @include h3
40
+
41
+ h4
42
+ @include h4
43
+
44
+ h5
45
+ @include h5
46
+
47
+ h6
48
+ @include h6
49
+
50
+ .ae-heading-bottom-border
51
+ @include heading($border-light, uppercase)
@@ -0,0 +1,3 @@
1
+ .fa
2
+ @include font-size(16px, 16px)
3
+ color: $icon-color
@@ -0,0 +1,37 @@
1
+ [class*="ae-avatar"]
2
+ display: inline-block
3
+ margin-right: 12px
4
+
5
+ .ae-avatar-sm
6
+ width: 24px
7
+ height: 24px
8
+
9
+ .ae-avatar-md
10
+ width: 34px
11
+ height: 34px
12
+
13
+ .ae-avatar-lg
14
+ width: 50px
15
+ height: 50px
16
+
17
+ .ae-avatar-auto
18
+ width: 100%
19
+ height: 100%
20
+ margin-right: 0
21
+
22
+ .ae-favicon
23
+ width: 32px
24
+ height: 32px
25
+
26
+ img
27
+ display: block
28
+ text-align: center
29
+ position: relative
30
+ margin-bottom: 1.25em
31
+ margin-left: auto
32
+ margin-right: auto
33
+
34
+ .ae-img-responsive
35
+ max-width: 100%
36
+ text-align: center
37
+ display: block
@@ -0,0 +1,27 @@
1
+ @mixin smartphone
2
+ @media only screen and (min-width: $smartphone)
3
+ @content
4
+
5
+ @mixin smartphone-max
6
+ @media only screen and (max-width: $smartphone)
7
+ @content
8
+
9
+ @mixin tablet
10
+ @media only screen and (min-width: $tablet)
11
+ @content
12
+
13
+ @mixin tablet-max
14
+ @media only screen and (max-width: $tablet)
15
+ @content
16
+
17
+ @mixin laptop
18
+ @media only screen and (min-width: $laptop)
19
+ @content
20
+
21
+ @mixin laptop-max
22
+ @media only screen and (max-width: $laptop)
23
+ @content
24
+
25
+ @mixin desktop
26
+ @media only screen and (min-width: $desktop)
27
+ @content
@@ -0,0 +1,33 @@
1
+ // Global mixins are mixins that don't quite fall in a specific category.
2
+ // These are used by any element
3
+
4
+ @mixin border-radius($n)
5
+ -moz-border-radius: $n
6
+ -webkit-border-radius: $n
7
+ border-radius: $n
8
+
9
+ @mixin box-shadow($top, $left, $blur, $color, $inset:"")
10
+ -webkit-box-shadow: $top $left $blur $color #{$inset}
11
+ -moz-box-shadow: $top $left $blur $color #{$inset}
12
+ box-shadow: $top $left $blur $color #{$inset}
13
+
14
+ @mixin well
15
+ margin: 0
16
+ background: $gray-background
17
+ @include border-radius(2px)
18
+ @include box-shadow(inset 0, 0, 3px, $border-dark)
19
+ @include animate(0.5s)
20
+
21
+ &:hover
22
+ background: rgba($primary-color, 0.1)
23
+
24
+ *
25
+ color: #333
26
+
27
+ @mixin clearfix
28
+ overflow: auto
29
+
30
+ &:before, &:after
31
+ content: ""
32
+ display: table
33
+
@@ -0,0 +1,11 @@
1
+ *
2
+ box-sizing: border-box
3
+ margin: 0
4
+ padding: 0
5
+
6
+ html, body
7
+ line-height: 1.4
8
+ height: 100%
9
+
10
+ body
11
+ width: 100%
@@ -0,0 +1,167 @@
1
+ @mixin body-font
2
+ font-family: 'Lato', sans-serif
3
+
4
+ @mixin header-font
5
+ font-family: 'Lato', sans-serif
6
+
7
+ @function rem($size)
8
+ $remSize: $size / 16px
9
+ @return #{$remSize}rem
10
+
11
+ @mixin font-size($size, $large_size)
12
+ font-size: rem($size)
13
+
14
+ @include tablet
15
+ font-size: rem($large_size)
16
+
17
+ @include desktop
18
+ font-size: rem($large_size/1.4)
19
+
20
+ @mixin p
21
+ @include font-size(12px, 14px)
22
+ font-weight: normal
23
+
24
+ .ae-u-text-left
25
+ text-align: left
26
+
27
+ .ae-u-text-right
28
+ text-align: right
29
+
30
+ .ae-u-text-center
31
+ text-align: center
32
+
33
+ .ae-u-text-justify
34
+ text-align: justify
35
+
36
+ .ae-u-float-right
37
+ float: right
38
+
39
+ .ae-u-float-left
40
+ float: left
41
+
42
+ .ae-code-block
43
+ white-space: pre-wrap
44
+
45
+ @mixin ae-margin-left
46
+ margin-left: 0.25em
47
+
48
+ @mixin ae-margin-right
49
+ margin-right: 0.25em
50
+
51
+ @mixin status
52
+ @include border-radius(2px)
53
+ padding: 4px 10px
54
+ font-weight: bold
55
+ text-transform: uppercase
56
+
57
+ @mixin status-success
58
+ background: $success
59
+ color: #fff !important
60
+
61
+ @mixin status-error
62
+ background: $cancelled
63
+ color: #fff !important
64
+
65
+ @mixin status-pending
66
+ background: $pending
67
+ color: darken($pending, 60%)
68
+
69
+ @mixin status-deleted
70
+ background: $deleted
71
+ color: #999
72
+
73
+
74
+ html
75
+ font-size: $font-size-root
76
+
77
+ body
78
+ @include body-font
79
+ font-size: 1.6rem
80
+ color: $body-color
81
+
82
+ // The type font size in a responsive layout should be able to adjust with each viewport. You can calculate the font size based on the viewport height and width using :root:. Now that you've set the :root pseudo-class to calculate font-size based on viewport height and width, the body will utilize the root em that's based on the value calculated by :root. Notice when you resize the window that the root font size for all elements stays relative no matter viewport size?
83
+ \:root
84
+ font-size: calc(1vw + 1vh + .5vmin)
85
+
86
+ p
87
+ @include body-font
88
+ @include p
89
+ line-height: 1.4
90
+ padding-top: 1.25rem
91
+ margin-bottom: 0.25rem
92
+
93
+ code
94
+ @include border-radius(2px)
95
+ background: rgba($primary-color, 0.2)
96
+ color: $body-color
97
+ padding: 0 0.25em
98
+ display: inline-block
99
+
100
+ button
101
+ @include p
102
+ @include body-font
103
+
104
+
105
+ a:link
106
+ color: $link-color
107
+
108
+ a:visited
109
+ color: darken($link-color, 10%)
110
+
111
+ a:hover
112
+ text-decoration: none
113
+
114
+ .ae-status
115
+ @include status
116
+
117
+ &-success
118
+ @include status-success
119
+
120
+ &-cancelled, &-error
121
+ @include status-error
122
+
123
+ &-pending
124
+ @include status-pending
125
+
126
+ &-deleted
127
+ @include status-deleted
128
+
129
+ @mixin badge
130
+ background: $primary-color
131
+ color: #fff
132
+ @include border-radius(20px)
133
+ margin-left: 10px
134
+ padding: 4px 10px
135
+ font-weight: bold
136
+ text-transform: uppercase
137
+
138
+ @mixin badge-success
139
+ background: $success
140
+ color: #fff !important
141
+
142
+ @mixin badge-error
143
+ background: $cancelled
144
+ color: #fff !important
145
+
146
+ @mixin badge-pending
147
+ background: $pending
148
+ color: darken($pending, 60%) !important
149
+
150
+ @mixin badge-deleted
151
+ background: $deleted
152
+ color: #999 !important
153
+
154
+ .ae-badge
155
+ @include badge
156
+
157
+ &-success
158
+ @include badge-success
159
+
160
+ &-cancelled, &-error
161
+ @include badge-error
162
+
163
+ &-pending
164
+ @include badge-pending
165
+
166
+ &-deleted
167
+ @include badge-deleted
@@ -0,0 +1,52 @@
1
+ $primary-color: #6699CC
2
+
3
+ $primary-active-color: #477db0
4
+
5
+ $secondary-color: #999999
6
+
7
+ $success: #3c763d
8
+
9
+ $cancelled: #a94442
10
+
11
+ $pending: #faf2cc
12
+
13
+ $deleted: lighten($secondary-color, 30%)
14
+
15
+ $border-dark: $secondary-color
16
+
17
+ $border-light: #eaeaea
18
+
19
+ $body-color: #666
20
+
21
+ $heading-color: #333
22
+
23
+ $link-color: $primary-color
24
+
25
+ $body-lighter: #999
26
+
27
+ $icon-color: #333
28
+
29
+ $smartphone: 480px
30
+
31
+ $tablet: 768px
32
+
33
+ $laptop: 1024px
34
+
35
+ $desktop: 1440px
36
+
37
+ $gray-background: #F7F7F7
38
+
39
+ $thead-color: #888
40
+
41
+ $dark-gray-background: rgba(#ccc, 0.1)
42
+
43
+ $container: 960px
44
+
45
+ $line-height: 14px
46
+
47
+ $font-size-root: 62.5%
48
+
49
+ $header-max-height: 3.5em
50
+
51
+ $container-padding: 0.25em
52
+ // Because all browsers have a default font-size of 16px, setting the font-size to 62.5% on the html element gives it a font-size of 10px (10 / 16 * 100 = 62.5)
@@ -0,0 +1,54 @@
1
+ .ae-btn-group
2
+ position: relative
3
+ vertical-align: middle
4
+ margin: 1em 0
5
+
6
+ .ae-btn-group-left
7
+ text-align: left
8
+
9
+ .ae-btn-group-center
10
+ text-align: center
11
+
12
+ .ae-btn-group-right
13
+ text-align: right
14
+
15
+ .ae-btn-group-justified
16
+ @include tablet-max
17
+ .ae-btn
18
+ display: block
19
+ width: 100%
20
+
21
+ @include tablet
22
+ display: table
23
+ width: 100%
24
+ table-layout: fixed
25
+ border-collapse: separate
26
+
27
+ .ae-btn-group
28
+ display: table-cell
29
+ float: none
30
+ width: 1%
31
+ position: relative
32
+
33
+ &:not(:last-of-type)
34
+ padding-right: 1%
35
+
36
+
37
+ .ae-btn
38
+ width: 100%
39
+
40
+ .ae-btn-group-full-width
41
+ width: 100%
42
+ @include clearfix
43
+
44
+ @include tablet
45
+ .ae-btn
46
+ width: auto
47
+
48
+ .ae-btn-left
49
+ float: left
50
+ display: inline-block
51
+
52
+ .ae-btn-right
53
+ float: right
54
+ display: inline-block