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,36 @@
1
+ <%= render "express_ui/shared/header" %>
2
+ <div class="ae-template-master-detail-fixed">
3
+
4
+ <div class="ae-sidebar ae-sidebar-left">
5
+ <nav><a href="#">{Sidebar Menu}</a></nav>
6
+ </div>
7
+
8
+ <div class="ae-sidebar ae-sidebar-right">
9
+ <p>{Detail}</p>
10
+ </div>
11
+
12
+ <div class="ae-content content">
13
+ <%= render "express_ui/shared/search_box" %>
14
+
15
+ <h1>This is a fixed master-detail layout</h1>
16
+
17
+ <%= highlight_code_block do %>
18
+ <%= "<header></header>" %>
19
+ <%= "<div class=\"ae-template-master-detail-fixed\">" %>
20
+ <%= "<div class=\"ae-sidebar ae-sidebar-left\">" %>
21
+ <%= "<nav>" %>
22
+ <%= "{Sidebar Menu}" %>
23
+ <%= "</nav>" %>
24
+ <%= "</div>" %>
25
+ <%= "<div class=\"ae-sidebar ae-sidebar-right\">" %>
26
+ <%= "{Detail View}" %>
27
+ <%= "</div>" %>
28
+ <%= "<div class=\"ae-content\">" %>
29
+ <%= "{Content}" %>
30
+ <%= "</div>" %>
31
+ <%= "</div>" %>
32
+ <%= "<footer></footer>" %>
33
+ <% end %>
34
+ </div>
35
+ </div>
36
+ </div>
@@ -0,0 +1,10 @@
1
+
2
+ h3 { 'command_button()'}
3
+ section {
4
+ code_demo {
5
+ %Q{
6
+ command_button() {
7
+ }
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,19 @@
1
+ h3 { 'flash_message' }
2
+ section {
3
+ code_demo {
4
+ %Q{
5
+ flash_message()
6
+ }
7
+ }
8
+ }
9
+
10
+
11
+ h3 { 'error_message()' }
12
+ section {
13
+ code_demo {
14
+ %Q{
15
+ error_message()
16
+ }
17
+ }
18
+ }
19
+
@@ -0,0 +1,118 @@
1
+ h3 { "input()" }
2
+ section {
3
+ code_demo {
4
+ %Q{
5
+ input(
6
+ class: 'ae-text-field ae-input-sm',
7
+ type: "text",
8
+ name: "text",
9
+ value: "Enter a word",
10
+ placeholder: "Enter some text"
11
+ )
12
+ }
13
+ }
14
+ }
15
+
16
+ h3 { "smart_form()" }
17
+ section {
18
+ code_demo {
19
+ %Q{
20
+ smart_form(){
21
+ }
22
+ }
23
+ }
24
+ }
25
+
26
+ h3 { 'express_form()'}
27
+ section {
28
+ code_demo {
29
+ %Q{
30
+ express_form() {
31
+ }
32
+ }
33
+ }
34
+ }
35
+
36
+
37
+ h3 { "Search" }
38
+ section {
39
+
40
+ para {
41
+ "A search form always contains a search field and reset search field button. Search button is optional. Search on \"enter\" key is always enabled."
42
+ }
43
+
44
+ table {
45
+ thead {
46
+ th { "Properties" }
47
+ th { "Notes" }
48
+ }
49
+ tbody {
50
+ tr {
51
+ td { code { "maxLength" } }
52
+ td { "auto or string" }
53
+ }
54
+
55
+ tr {
56
+ td { code { "grouping" } }
57
+ td { "inline, horizontal, or single_line" }
58
+ }
59
+
60
+ tr {
61
+ td { code { "button"} }
62
+ td { "true or false" }
63
+ }
64
+ }
65
+ }
66
+
67
+ code_demo {
68
+ %Q{
69
+ search_form(
70
+ name: "",
71
+ maxlength: "",
72
+ class: "",
73
+ placeholder: "Enter a keyword and hit enter",
74
+ value: "",
75
+ grouping: "single_line",
76
+ button: true,
77
+ button_text: "Search"){
78
+ }
79
+ }
80
+ }
81
+ }
82
+
83
+ h3 { "Express Billing" }
84
+ section {
85
+ para { "Credit card form, coupon code" }
86
+ }
87
+
88
+ h3 { 'code_editor()'}
89
+ section {
90
+ code_demo {
91
+ %Q{
92
+ express_form() {
93
+ code_editor()
94
+ }
95
+ }
96
+ }
97
+ }
98
+
99
+
100
+ h3 { 'country_select()'}
101
+ section {
102
+ code_demo {
103
+ %Q{
104
+ express_form() {
105
+ country_select :country_code, label: "Country", class: form_field_class(:country)
106
+ }
107
+ }
108
+ }
109
+ }
110
+
111
+ h3 { "media_form()" }
112
+ section {
113
+ code_demo {
114
+ %Q{
115
+ media_form()
116
+ }
117
+ }
118
+ }
@@ -0,0 +1,24 @@
1
+ section {
2
+ para {
3
+ text_node "Heading blocks ("
4
+ code { "<h1>" }
5
+ text_node "to"
6
+ code { "<h6>" }
7
+ text_node ") can have optional icon and extra text."
8
+ }
9
+
10
+ para {
11
+ text_node "To use icons inside headers, see the"
12
+ code { "fa_icon" }
13
+ text_node "component guide."
14
+ }
15
+
16
+ code_demo {
17
+ %Q{
18
+ heading(){
19
+ text_node "Heading"
20
+ fa_icon "class"
21
+ }
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,35 @@
1
+ h3 { 'icon()' }
2
+
3
+ section {
4
+ para {
5
+ text_node "Font Awesome (FA) has over 600 icons for commercial use. To use FA icons in ExpressUI, use the"
6
+ code { "icon" }
7
+ text_node "component. Simply look for the FA class and append it as a value. No need to prepend the"
8
+ code { ".fa-" }
9
+ text_node "icon class as instructed in the FA document because ExpressUI already automatically prepends it. To know which classes to use, see the"
10
+ a(href: 'http://fontawesome.io/icons/') { "Font Awesome documentation" }
11
+ text_node "."
12
+ }
13
+
14
+ code_demo {
15
+ %Q{
16
+ icon 'close'
17
+ icon 'check'
18
+ }
19
+ }
20
+ }
21
+
22
+ h3 { 'icon_link()' }
23
+ section {
24
+ code_demo {
25
+ %Q{
26
+ icon_link(
27
+ 'cancel',
28
+ text: 'View Site',
29
+ href: '/',
30
+ target: '_blank'
31
+ )
32
+ }
33
+ }
34
+
35
+ }
@@ -0,0 +1,47 @@
1
+ h3 { "header()" }
2
+ section {
3
+ para { "The header consists of a logo and main nav on the left. A secondary nav on the right is optional." }
4
+
5
+ code_demo {
6
+ "header() {
7
+ 'Header contents here'
8
+ }"
9
+ }
10
+ }
11
+
12
+ h3 { "sidebar_region()" }
13
+ section {
14
+ div(class: 'demo-container') {
15
+ render 'express_ui/uicomponents/sidebar'
16
+ }
17
+ }
18
+
19
+ h3 { "main_region()" }
20
+ section {
21
+ code_demo {
22
+ "main_region() {
23
+ p 'This block of text goes right into the contents.'
24
+ }"
25
+ }
26
+ }
27
+
28
+ h3 { "page_header()" }
29
+ section {
30
+ code_demo {
31
+ "content_for(:page_header) {
32
+ h1 'Welcome to Express UI'
33
+ p 'This block of text goes right into the page header.'
34
+ }"
35
+ }
36
+ }
37
+
38
+ h3 { "footer()" }
39
+ section {
40
+ para { "(Nav, logo, social media inks)" }
41
+
42
+ code_demo {
43
+ "footer() {
44
+ 'Footer contents here'
45
+ }"
46
+ }
47
+ }
@@ -0,0 +1,9 @@
1
+ h3 { 'definition_list()' }
2
+
3
+ section {
4
+ code_demo {
5
+ %Q{
6
+ definition_list()
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,15 @@
1
+
2
+ <form class="ae-form-horizontal ae-u-text-left">
3
+ <div class="ae-form-field">
4
+ <label for="email">Email</label>
5
+ <input class="ae-text-field ae-input-md" type="email" name="email" value="user@email.com" id="email" placeholder="user@email.com" />
6
+ <p class="ae-hint">Your email adress</p>
7
+ </div>
8
+ <div class="ae-form-field">
9
+ <label for="password">Password</label>
10
+ <input class="ae-text-field ae-input-md" type="password" name="password" value="Enter password" id="password" placeholder="Enter password" />
11
+ </div>
12
+ <div class="ae-actions">
13
+ <button class="ae-btn ae-btn-primary ae-btn-md" type="submit">Login</button>
14
+ </div>
15
+ </form>
@@ -0,0 +1,18 @@
1
+ h3 { 'navbaractions()' }
2
+ section {
3
+
4
+ code_demo {
5
+ "navbaractions() {
6
+ }"
7
+ }
8
+ }
9
+
10
+ h3 { 'mega_menu()' }
11
+ section {
12
+
13
+ code_demo {
14
+ "mega_menu() {
15
+ }"
16
+ }
17
+ }
18
+
@@ -0,0 +1,22 @@
1
+ section {
2
+ table {
3
+ thead {
4
+ th { 'Page Name' }
5
+ th { 'Demo' }
6
+ }
7
+ tbody {
8
+ tr {
9
+ td { 'Register' }
10
+ td { a(href: "#", title: "View Sample") { 'View Sample' } }
11
+ }
12
+ tr {
13
+ td { 'Login' }
14
+ td { a(href: "#", title: "View Sample") { 'View Sample' } }
15
+ }
16
+ tr {
17
+ td { 'Static' }
18
+ td { a(href: "#", title: "View Sample") { 'View Sample' } }
19
+ }
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,33 @@
1
+ section {
2
+ para {
3
+ "A panel is a way of boxing up groups of related contents to separate it from the rest of the document. Panels usually have a header, content body, and footer. Normal content blocks don't need to be in panels if all they are are texts or images. Panels have styling options. "
4
+ }
5
+
6
+ para {
7
+ 'This outlines the basic structure of a panel'
8
+ }
9
+
10
+ highlight_code_block {
11
+ %Q{
12
+ <div class=\"panel\">
13
+ <div class=\"panel-heading\">
14
+ <h2>Heading</h2>
15
+ </div>
16
+
17
+ <div class=\"panel-body\">
18
+ {Content}
19
+ </div>
20
+
21
+ <div class=\"panel-footer\"></div>
22
+ </div>
23
+ }
24
+ }
25
+
26
+
27
+ code_demo {
28
+ %Q{
29
+ pane(){
30
+ }
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,19 @@
1
+ section {
2
+ para {
3
+ "Popups (or modal) is a dialog box window that is displayed on top of the current page."
4
+ }
5
+
6
+ code_demo {
7
+ %Q{
8
+ popup() {
9
+ }
10
+ }
11
+ }
12
+
13
+ code_demo {
14
+ %Q{
15
+ popup_actions() {
16
+ }
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,14 @@
1
+ <form class="ae-form-horizontal ae-u-text-left">
2
+ <div class="ae-form-field">
3
+ <label for="email">Email</label>
4
+ <input class="ae-text-field ae-input-md" type="email" name="email" value="user@email.com" id="email" placeholder="user@email.com" />
5
+ <p class="ae-hint">Your email adress</p>
6
+ </div>
7
+ <div class="ae-form-field">
8
+ <label for="password">New Password</label>
9
+ <input class="ae-text-field ae-input-md" type="password" name="password" value="Enter password" id="password" placeholder="Enter password" />
10
+ </div>
11
+ <div class="ae-actions">
12
+ <button class="ae-btn ae-btn-primary ae-btn-md" type="submit">Create an Account</button>
13
+ </div>
14
+ </form>
@@ -0,0 +1,8 @@
1
+ section {
2
+ code_demo {
3
+ %Q{
4
+ sidebar_region {
5
+ }
6
+ }
7
+ }
8
+ }