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,29 @@
1
+ @mixin container-table
2
+ display: table
3
+
4
+ @mixin container-table-cell
5
+ display: table-cell
6
+
7
+ .ae-container
8
+ position: relative
9
+ margin-left: auto
10
+ margin-right: auto
11
+ max-width: $container
12
+
13
+ @include tablet
14
+ width: 100%
15
+
16
+ .ae-container-left
17
+ margin-left: 0
18
+
19
+ .ae-container-full
20
+ position: relative
21
+ width: 100%
22
+ padding-left: 0.5rem
23
+ padding-right: 0.5rem
24
+
25
+ .ae-container-table
26
+ @include container-table
27
+
28
+ .ae-container-table-cell
29
+ @include container-table-cell
@@ -0,0 +1,56 @@
1
+ .ae-alert
2
+ padding: 0.5rem
3
+ position: relative
4
+
5
+ p
6
+ padding-top: 0
7
+ margin-bottom: 0
8
+
9
+ & + &
10
+ margin-top: 0.25rem
11
+
12
+ .ae-alert-action
13
+ position: absolute
14
+ top: 0.5rem
15
+ right: 0.5rem
16
+ text-decoration: none
17
+
18
+ &-success
19
+ background: lighten($success, 50%)ƒ
20
+ border: 1px solid $success
21
+ color: $success
22
+
23
+ a:link, a:visited, a .fa
24
+ color: lighten($success, 10%)
25
+ font-weight: bold
26
+
27
+ &-error
28
+ background: lighten($cancelled, 30%)
29
+ border: 1px solid $cancelled
30
+ color: $cancelled
31
+
32
+ a:link, a:visited, a .fa
33
+ color: $cancelled
34
+ font-weight: bold
35
+
36
+ &-pending
37
+ background: darken($pending, 10%)
38
+ border: 1px solid darken($pending, 50%)
39
+ color: darken($pending, 50%)
40
+
41
+ a:link, a:visited, a .fa
42
+ color: darken($pending, 50%)
43
+ font-weight: bold
44
+
45
+ &-info
46
+ background: lighten($primary-color, 30%)
47
+ border: 1px solid darken($primary-color, 20%)
48
+ color: darken($primary-color, 10%)
49
+
50
+ a:link, a:visited, a .fa
51
+ color: darken($primary-color, 20%)
52
+ font-weight: bold
53
+
54
+ @include tablet-max
55
+ p
56
+ padding-right: 1em
@@ -0,0 +1,96 @@
1
+ @mixin fa-input
2
+ position: absolute
3
+ top: 30%
4
+ left: 15px
5
+ color: $body-color
6
+
7
+ @include tablet-max
8
+ top: 34%
9
+
10
+ .ae-form-horizontal
11
+ .ae-form-field
12
+ input
13
+ width: 100%
14
+
15
+ .ae-form-field.ae-has-icon
16
+ & > div
17
+ display: block
18
+
19
+ .ae-form-inline
20
+ .ae-form-field
21
+ input
22
+ width: auto
23
+ min-width: 100px
24
+
25
+ label
26
+ min-width: 30%
27
+ margin: 0.5em 1em 0.5em 0
28
+ display: inline-block
29
+
30
+ .ae-form-single
31
+ display: flex
32
+ flex-flow: row nowrap
33
+ align-items: stretch
34
+
35
+ .ae-form-field
36
+ position: relative
37
+
38
+ .ae-actions
39
+ width: auto
40
+
41
+ .ae-actions
42
+ margin: 10px 0 10px 10px
43
+
44
+ .ae-btn
45
+ margin: 0
46
+
47
+
48
+ .ae-search-form
49
+ .ae-text-field
50
+ padding-left: 2em
51
+
52
+ & + .fa-search
53
+ position: absolute
54
+ top: 35%
55
+ left: 10px
56
+ color: $body-color
57
+
58
+ &:focus + .fa-search
59
+ color: $primary-color
60
+
61
+
62
+ .ae-form-field.ae-has-icon
63
+ position: relative
64
+
65
+ .ae-text-field
66
+ padding-left: 2em
67
+
68
+ & > div
69
+ width: auto
70
+ display: inline-block
71
+ vertical-align: top
72
+
73
+ & > .fa
74
+ @include fa-input
75
+
76
+ &:focus > .fa
77
+ color: $primary-color
78
+
79
+
80
+ & > div
81
+ position: relative
82
+
83
+ .fa
84
+ @include fa-input
85
+
86
+ &:focus > div .fa
87
+ color: $primary-color
88
+
89
+
90
+ .ae-has-icon
91
+ padding: 0 4px
92
+
93
+
94
+ @include tablet-max
95
+ form, input
96
+ width: 100%!important
@@ -0,0 +1,159 @@
1
+ @mixin input
2
+ border: 1px solid $border-dark
3
+ width: 100%
4
+ @include border-radius(3px)
5
+ @include box-shadow(inset, 2px, 2px, 2px, lighten($border-dark, 20%))
6
+ outline: none
7
+ @include easeInOut
8
+ margin: 10px 0
9
+ @include body-font
10
+
11
+ &:focus
12
+ border: 1px solid $primary-color
13
+ @include box-shadow(0, 0, 5px, 0, $primary-color)
14
+
15
+ .ae-text-field
16
+ @include input
17
+
18
+ .ae-form-field
19
+
20
+ input[type="range"]
21
+ @include box-shadow(0, 0, 0, 0)
22
+
23
+ .ae-textarea
24
+ @include input
25
+
26
+ select
27
+ @include input
28
+
29
+ .ae-radio-field, .ae-checkbox-field
30
+ @include box-shadow(0, 0, 0, 0)
31
+ border: 0
32
+ clip: rect(0 0 0 0)
33
+ height: 20px
34
+ margin: -1px
35
+ overflow: hidden
36
+ padding: 0
37
+ position: absolute
38
+ width: 1px
39
+
40
+ & ~ label:before
41
+ font-family: FontAwesome
42
+ display: inline-block
43
+ color: $body-color
44
+ width: 20px
45
+
46
+ &:checked ~ label:before
47
+ color: $primary-color
48
+
49
+ &:checked ~ label
50
+ color: $primary-color
51
+
52
+ .ae-radio-field
53
+ & ~ label:before
54
+ content: "\f10c"
55
+
56
+ &:checked ~ label:before
57
+ content: "\f192"
58
+
59
+ .ae-checkbox-field
60
+ & ~ label:before
61
+ content: "\f096"
62
+ font-size: 15px
63
+
64
+ &:checked ~ label:before
65
+ content: "\f14a"
66
+ top: -1px
67
+ position: relative
68
+ font-size: 14px
69
+
70
+ .ae-input-sm
71
+ @include h6
72
+ padding: rem(3px)
73
+
74
+ @include desktop
75
+ padding: rem(2px)
76
+
77
+ .ae-input-md
78
+ @include h5
79
+ padding: rem(6px)
80
+
81
+ @include desktop
82
+ padding: rem(5px)
83
+
84
+ .ae-input-lg
85
+ @include h4
86
+ padding: rem(8px)
87
+
88
+ @include desktop
89
+ padding: rem(7px)
90
+
91
+ label
92
+ line-height: 1.4
93
+ @include p
94
+ padding-right: 0.5em
95
+
96
+ .ae-actions
97
+ margin: 20px 0
98
+
99
+ .ae-hint
100
+ margin: 0 0 20px 0
101
+ padding: 0
102
+ color: $body-lighter
103
+
104
+ .ae-switch
105
+ position: relative
106
+ width: 50px
107
+ -webkit-user-select: none
108
+ -moz-user-select: none
109
+ -ms-user-select: none
110
+
111
+ &-checkbox
112
+ display: none
113
+ &-label
114
+ border: 1px solid $border-light
115
+ border-radius: 20px
116
+ cursor: pointer
117
+ display: block
118
+ overflow: hidden
119
+ &-inner
120
+ display: block
121
+ margin-left: -100%
122
+ transition: margin 0.3s ease-in 0s
123
+ width: 200%
124
+
125
+ &:before, &:after
126
+ box-sizing: border-box
127
+ display: block
128
+ float: left
129
+ height: 30px
130
+ line-height: 30px
131
+ padding: 0
132
+ width: 50%
133
+ &:before
134
+ background-color: $primary-color
135
+ content: ""
136
+ padding-left: 10px
137
+ &:after
138
+ background-color: $body-lighter
139
+ content: ""
140
+ padding-right: 10px
141
+
142
+ &-button
143
+ background: #FFFFFF
144
+ border: 1px solid $border-dark
145
+ border-radius: 20px
146
+ bottom: 0
147
+ display: block
148
+ margin: 5px
149
+ position: absolute
150
+ right: 20px
151
+ top: 0
152
+ transition: all 0.3s ease-in 0s
153
+ width: 20px
154
+
155
+ &-checkbox:checked + &-label &-inner
156
+ margin-left: 0
157
+
158
+ &-checkbox:checked + &-label &-button
159
+ right: 0
@@ -0,0 +1,56 @@
1
+ ul, ol
2
+ margin: 0
3
+ padding: 0
4
+ list-style-position: inside
5
+
6
+ li
7
+ @include p
8
+ @include font-size(12px, 12px)
9
+
10
+ &:before
11
+ content: ""
12
+ float: left
13
+ padding-left: 0.5rem
14
+
15
+ ul
16
+ list-style: none
17
+
18
+ .ae-list-inline
19
+ li
20
+ display: block
21
+ width: auto
22
+ float: left
23
+
24
+ &:after
25
+ content: " "
26
+ display: block
27
+ clear: both
28
+
29
+ .ae-list-block
30
+ li
31
+ display: block
32
+ width: auto
33
+
34
+ &:after
35
+ content: " "
36
+ display: block
37
+ clear: both
38
+
39
+
40
+ .ae-list-media
41
+ figure
42
+ display: flex
43
+
44
+ figcaption
45
+ text-align: left
46
+ margin-left: 1rem
47
+
48
+ .ae-list-description
49
+ .ae-li-title
50
+ font-weight: bold
51
+ .ae-li-inline
52
+ text-align: right
53
+ margin-right: 2em
54
+
55
+ @include tablet-max
56
+ text-align: left!important
@@ -0,0 +1,85 @@
1
+ nav
2
+ a:link, a:visited
3
+ text-decoration: none
4
+ display: block
5
+ color: $body-color
6
+ padding: 0.25em 0.5em
7
+ @include easeInOut
8
+
9
+ &:hover
10
+ color: $primary-color
11
+
12
+ .ae-nav-item, .ae-page-item
13
+ &.active
14
+ a:link, a:visited
15
+ color: $primary-color
16
+
17
+ .fa
18
+ color: #fff
19
+
20
+ .ae-nav-left
21
+ float: left
22
+
23
+ .ae-nav-right
24
+ float: right
25
+
26
+ .ae-page-item
27
+ & > a
28
+ @include button
29
+
30
+ .ae-breadcrumbs
31
+ .ae-nav-item
32
+ position: relative
33
+
34
+ &:not(:first-of-type)
35
+ margin-left: 0.5em
36
+
37
+ &:after
38
+ content: " »"
39
+ position: absolute
40
+ top: 0.3em
41
+ right: -0.3em
42
+ color: $icon-color
43
+
44
+ .ae-mega-menu
45
+ .ae-mega-menu-title
46
+ padding:
47
+ top: 0
48
+ left: 0.5em
49
+ right: 0.5em
50
+ margin-bottom: 1em
51
+
52
+ .ae-mega-menu-close
53
+ text-decoration: none
54
+
55
+ .ae-nav-mega-menu-content
56
+ background: #fff
57
+ padding: 1em
58
+ @include box-shadow(0, 0px, 5px, 0, $border-light)
59
+ @include border-radius(2px)
60
+
61
+
62
+ [class*="ae-nav-mega-menu-list"]
63
+ max-height: 140px
64
+ overflow: scroll
65
+
66
+ .ae-nav-mega-menu-list-icons
67
+ .ae-nav-mega-menu-item
68
+ border-right: 1px solid $border-light
69
+ padding: 1em
70
+ text-align: center
71
+
72
+ .ae-nav-mega-menu-list
73
+ .ae-nav-mega-menu-item
74
+ padding: 0.5em
75
+ text-align: left
76
+
77
+ a:link
78
+ display: block
79
+
80
+ img
81
+ display: inline-block
82
+ vertical-align: middle
83
+ margin-right: 1em
84
+ margin-bottom: 0
85
+ width: 25px