express_ui 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/express_ui/styleguide.js +1 -1
  3. data/app/assets/stylesheets/express_ui/atoms/_buttons.sass +2 -2
  4. data/app/assets/stylesheets/express_ui/atoms/_headings.sass +2 -2
  5. data/app/assets/stylesheets/express_ui/atoms/_icons.sass +2 -2
  6. data/app/assets/stylesheets/express_ui/atoms/_typography.sass +8 -0
  7. data/app/assets/stylesheets/express_ui/molecules/_button_group.sass +8 -9
  8. data/app/assets/stylesheets/express_ui/molecules/_form_groups.sass +1 -1
  9. data/app/assets/stylesheets/express_ui/molecules/_forms.sass +8 -1
  10. data/app/assets/stylesheets/express_ui/molecules/_tables.sass +9 -0
  11. data/app/assets/stylesheets/express_ui/organisms/_footer.sass +3 -0
  12. data/app/assets/stylesheets/express_ui/organisms/_header.sass +1 -1
  13. data/app/assets/stylesheets/express_ui/style.sass +1 -0
  14. data/app/assets/stylesheets/express_ui/templates/_full_width.sass +4 -0
  15. data/app/components/component_docitem.rb +55 -19
  16. data/app/components/component_example.rb +47 -10
  17. data/app/components/express_ui/panel.rb +37 -0
  18. data/app/components/express_ui/table/express_table.rb +6 -0
  19. data/app/components/express_ui/unordered_list.rb +18 -4
  20. data/app/helpers/express_ui/application_helper.rb +7 -0
  21. data/app/models/express_ui/examples/person.rb +12 -0
  22. data/app/views/express_ui/uicomponents/_lists.html.et +39 -19
  23. data/app/views/express_ui/uicomponents/_panels.html.et +14 -0
  24. data/app/views/express_ui/uicomponents/examples/_panel.html.et +9 -0
  25. data/app/views/express_ui/uicomponents/examples/_unordered_list.html.et +5 -0
  26. data/app/views/express_ui/uicomponents/examples/_unordered_list_with_ids.html.et +5 -0
  27. data/app/views/express_ui/uicomponents/index.html.et +25 -30
  28. data/app/views/layouts/express_ui/_head.html.erb +3 -1
  29. data/app/views/layouts/express_ui/full_width.html.erb +2 -2
  30. data/app/views/layouts/express_ui/half_width.html.erb +2 -2
  31. data/app/views/layouts/express_ui/master_detail.html.html.erb +2 -2
  32. data/app/views/layouts/express_ui/master_detail_fixed.html.erb +2 -2
  33. data/lib/express_ui/engine.rb +1 -0
  34. data/lib/express_ui/version.rb +1 -1
  35. metadata +13 -21
  36. data/app/views/express_ui/uicomponents/_panel.html.et +0 -33
  37. data/app/views/express_ui/uicomponents/_unordered_list.html.et +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 501cb78ab946ee9fc1321df247a4fa0b38aa3e67
4
- data.tar.gz: 99ec2242c3f07d855b58c0d58046810d269d5cf3
3
+ metadata.gz: f5860624c101208efa7c57aa801fe58ec2f46b8a
4
+ data.tar.gz: 0bf1177ac93dc0cae44e6687047eb727465bc757
5
5
  SHA512:
6
- metadata.gz: a582262e21cb1bcb3d164cd716b4ea2c5fc8e50d84337c79595f58ffc3dee0ada49b9dbb7de7863389e789563fa02a282c66888ac6c855cae1c215451f28b656
7
- data.tar.gz: 80b7f360a378a63be7cbb6f5033f7fd491dab13357490628af6464481045def6e439dda8e4bf75ff2463a9983c97312a072decf1659d043e43d88908730ee47f
6
+ metadata.gz: 007cc3f0516976e55ae6e845fa306fa53eaf8624580b9ebf51b70d833cc2e27b309882912ab98a24b0adba8b3cbf17b49a1153faa4fdfafa3a49411c57cc7bf0
7
+ data.tar.gz: 5e58e6d6eef6ff5d5b1328db471a92a1b148598737aa8229e723d141f81ec14d3c1cc2a55c5e891e49661d99868dd12d03f7954aeb4bcecea44a2a18245f5449
@@ -28,7 +28,7 @@ $(function() {
28
28
  }
29
29
  })
30
30
  $(".js-anchorific-content").anchorific({
31
- headers: ':header:not(.ae-demo-container :header)'
31
+ headers: ':header:not(.ae-demo-container :header, h4)'
32
32
  });
33
33
 
34
34
  $(".anchorific li").each(function(index, item) {
@@ -98,8 +98,8 @@
98
98
  @include h5
99
99
 
100
100
  .ae-btn-lg
101
- padding-top: 0.5em
102
- padding-bottom: 0.5em
101
+ padding-top: 0.75em
102
+ padding-bottom: 0.75em
103
103
  @include h4
104
104
 
105
105
  .ae-btn-border
@@ -1,8 +1,8 @@
1
1
  @mixin h1
2
- @include font-size(22px, 24px)
2
+ @include font-size(32px, 24px)
3
3
 
4
4
  @mixin h2
5
- @include font-size(20px, 20px)
5
+ @include font-size(28px, 20px)
6
6
 
7
7
  @mixin h3
8
8
  @include font-size(18px, 18px)
@@ -1,3 +1,3 @@
1
1
  .fa
2
- @include font-size(16px, 16px)
3
- color: $icon-color
2
+ @include font-size(14px, 16px)
3
+ color: $icon-color
@@ -103,6 +103,8 @@ button
103
103
  @include p
104
104
  @include body-font
105
105
 
106
+ em
107
+ @include p
106
108
 
107
109
  a:link
108
110
  color: $link-color
@@ -128,6 +130,12 @@ a:hover
128
130
  &-deleted
129
131
  @include status-deleted
130
132
 
133
+ .ae-text
134
+ &-success
135
+ color: $success !important
136
+ &-cancelled
137
+ color: $cancelled !important
138
+
131
139
  @mixin badge
132
140
  background: $primary-color
133
141
  color: #fff
@@ -41,14 +41,13 @@
41
41
  width: 100%
42
42
  @include clearfix
43
43
 
44
- @include tablet
45
- .ae-btn
46
- width: auto
44
+ .ae-btn
45
+ width: auto
47
46
 
48
- .ae-btn-left
49
- float: left
50
- display: inline-block
47
+ .ae-btn-left
48
+ float: left
49
+ display: inline-block
51
50
 
52
- .ae-btn-right
53
- float: right
54
- display: inline-block
51
+ .ae-btn-right
52
+ float: right
53
+ display: inline-block
@@ -96,4 +96,4 @@
96
96
 
97
97
  @include tablet-max
98
98
  form, input
99
- width: 100%!important
99
+ width: 100%
@@ -84,7 +84,7 @@
84
84
 
85
85
  .ae-input-lg
86
86
  @include h4
87
- padding: rem(8px)
87
+ padding: rem(12px)
88
88
 
89
89
  @include desktop
90
90
  padding: rem(7px)
@@ -97,6 +97,13 @@ label
97
97
  .ae-actions
98
98
  margin: 20px 0
99
99
 
100
+ @include tablet-max
101
+ text-align: center
102
+
103
+ .ae-btn
104
+ width: 100%
105
+ display: block
106
+
100
107
  .ae-hint
101
108
  margin: 0 0 20px 0
102
109
  padding: 0
@@ -44,12 +44,21 @@ table
44
44
  tr:nth-child(even)
45
45
  background: transparent
46
46
 
47
+ &.ae-table-list
48
+ tbody
49
+ tr
50
+ border-bottom: 1px solid $border-light
51
+
52
+
47
53
  @include laptop-max
48
54
  width: 100%!important
49
55
 
50
56
  .ae-table-responsive
51
57
  overflow-x: scroll
52
58
 
59
+ .ae-table-actions
60
+ vertical-align: middle
61
+
53
62
  .ae-table-filter
54
63
  background-color: $gray-background
55
64
 
@@ -0,0 +1,3 @@
1
+ footer
2
+ position: relative
3
+
@@ -41,7 +41,7 @@ header
41
41
  z-index: 99
42
42
 
43
43
 
44
- & + [class*="ae-template-"]
44
+ & + [class*="ae-template-"], & + [class*="ae-template-master-"]
45
45
  margin-top: ($header-max-height/2.75)
46
46
 
47
47
  @include tablet-max
@@ -24,6 +24,7 @@
24
24
  @import "molecules/tables"
25
25
  @import "molecules/lists"
26
26
  @import "organisms/header"
27
+ @import "organisms/footer"
27
28
  @import "organisms/sidebar"
28
29
  @import "templates/full_width"
29
30
  @import "templates/half_width"
@@ -3,3 +3,7 @@
3
3
  @include laptop-max
4
4
  padding-left: $container-padding*4
5
5
  padding-right: $container-padding*4
6
+
7
+ @include tablet-max
8
+ padding-left: $container-padding*2
9
+ padding-right: $container-padding*2
@@ -1,12 +1,21 @@
1
1
  class ComponentDocitem < ExpressTemplates::Container
2
2
 
3
+ has_option :examples, "Examples. Keys are partial names. :assigns and :expected_output are passed to component_example.", type: :hash
4
+
5
+ # TODO: See if we could pull this from RDoc
6
+ has_option :description, "A description of the component."
7
+
3
8
  prepends -> {
4
9
  h3(style: 'text-transform: none') { component_class.to_s.demodulize }
5
10
 
6
- h5 "General Information"
11
+ h4 "General Information"
12
+
13
+ para(style: 'padding: 0 0.25rem 1rem 0.25rem', only_when: !!config[:description]) {
14
+ config[:description]
15
+ }
7
16
 
8
17
  table {
9
- tbody {
18
+ tbody {
10
19
  tr {
11
20
  th(width: "25%", style: "text-transform: none") { "Builder Method" }
12
21
  td {
@@ -28,36 +37,61 @@ class ComponentDocitem < ExpressTemplates::Container
28
37
  }
29
38
  }
30
39
 
31
- if component_class.respond_to?(:supported_options)
32
- h5 "Supported Options"
40
+ if component_class.respond_to?(:supported_arguments) &&
41
+ component_class.supported_arguments.any?
42
+
43
+ h4 "Supported Arguments"
33
44
 
34
45
  table {
35
46
  thead {
36
47
  th { "option" }
37
48
  th { "type" }
38
49
  th { "default" }
50
+ th { "required" }
39
51
  th { "Description" }
40
52
  }
41
53
  tbody {
42
- component_class.supported_options.each do |option, config|
54
+ component_class.supported_arguments.each do |arg, config|
43
55
  tr {
44
- td(width: "25%", style: "text-transform: none") {
45
- code {
46
- option.inspect
47
- }
56
+ td(style: "text-transform: none") {
57
+ code { arg.inspect }
48
58
  }
49
- td {
50
- pre {
51
- option_types(config[:type])
52
- }
59
+ td { pre { option_types(config[:type]) } }
60
+ td { pre { config[:default] } }
61
+ td { pre { config[:required] ? 'yes' : 'no' } }
62
+ td(width: "50%") {
63
+ config[:description].html_safe
53
64
  }
54
- td {
55
- pre {
56
- config[:default]
57
- }
65
+ }
66
+ end
67
+ }
68
+ }
69
+
70
+ end
71
+
72
+
73
+ if component_class.respond_to?(:supported_options)
74
+ h4 "Supported Options"
75
+
76
+ table {
77
+ thead {
78
+ th { "option" }
79
+ th { "type" }
80
+ th { "default" }
81
+ th { "required" }
82
+ th { "Description" }
83
+ }
84
+ tbody {
85
+ component_class.supported_options.each do |option, config|
86
+ tr {
87
+ td(style: "text-transform: none") {
88
+ code { option.inspect }
58
89
  }
59
- td {
60
- config[:description]
90
+ td { pre { option_types(config[:type]) } }
91
+ td { pre { config[:default] } }
92
+ td { pre { config[:required] ? 'yes' : 'no' } }
93
+ td(width: "50%") {
94
+ config[:description].html_safe
61
95
  }
62
96
  }
63
97
  end
@@ -95,6 +129,8 @@ class ComponentDocitem < ExpressTemplates::Container
95
129
  types.keys.map(&:inspect).join(', ')
96
130
  when config[:type].kind_of?(Array)
97
131
  types.map(&:inspect).join(', ')
132
+ when types.nil?
133
+ ''
98
134
  else
99
135
  types.inspect
100
136
  end
@@ -3,23 +3,42 @@ class ComponentExample < ExpressTemplates::Component
3
3
  tag :section
4
4
 
5
5
  has_option :expected_output, "The markup that the example is expected to produce."
6
+ has_option :assigns, "Values to be passed in.", type: :hash
7
+ has_option :example_name, "A distinguishing name for the example if part of a set."
6
8
 
7
9
  contains -> {
10
+
11
+ h4 { example_title }
12
+
13
+ panel(only_when: config[:assigns].present?) {
14
+ para { "Input:" }
15
+ table {
16
+ tbody {
17
+ config[:assigns].each do |key, value|
18
+ tr {
19
+ td { code { key.to_s } }
20
+ td { pre { format(value) } }
21
+ }
22
+ end
23
+ }
24
+ }
25
+ }
26
+
8
27
  div(class: 'ae-demo-container') {
9
28
  ul(class: 'ae-tabs') {
10
- li(class: 'ae-tab active-tab', 'data-tab' => input_id){
11
- "Code"
29
+ li(class: 'ae-tab active-tab', 'data-tab' => usage_id){
30
+ "Usage"
12
31
  }
13
32
  li(class: 'ae-tab', 'data-tab' => output_id){
14
33
  "Output"
15
34
  }
16
35
  li(class: 'ae-tab', 'data-tab' => expected_id,
17
- :only_when => config[:expected_output]){
36
+ :only_when => !!config[:expected_output]){
18
37
  "Expected Output"
19
38
  }
20
39
  }
21
40
 
22
- div(id: input_id, class: 'ae-tab-content active-tab'){
41
+ div(id: usage_id, class: 'ae-tab-content active-tab'){
23
42
  highlight_code_block {
24
43
  partial_body
25
44
  }
@@ -27,12 +46,12 @@ class ComponentExample < ExpressTemplates::Component
27
46
 
28
47
  div(id: output_id, class: 'ae-tab-content'){
29
48
  div(class: 'demo-container'){
30
- render partial: example_partial_name
49
+ render(partial: example_partial_path, locals: config[:assigns])
31
50
  }
32
51
  }
33
52
 
34
53
  div(id: expected_id, class: 'ae-tab-content',
35
- only_when: config[:expected_output]){
54
+ only_when: !!config[:expected_output]){
36
55
  div(class: 'demo-container'){
37
56
  highlight_code_block {
38
57
  config[:expected_output]
@@ -42,9 +61,27 @@ class ComponentExample < ExpressTemplates::Component
42
61
  }
43
62
  }
44
63
 
45
- def input_id; "input_#{example_partial_name}"; end
46
- def output_id; "output_#{example_partial_name}"; end
47
- def expected_id; "expected_#{example_partial_name}"; end
64
+ def format(value)
65
+ io = StringIO.new
66
+ PP.pp value, io
67
+ io.string.html_safe
68
+ end
69
+
70
+ def usage_id; "#{example_partial_name}_usage"; end
71
+ def output_id; "#{example_partial_name}_output"; end
72
+ def expected_id; "#{example_partial_name}_expected"; end
73
+
74
+ def example_title
75
+ if config[:example_name]
76
+ "Example #{config[:example_name].to_s.titleize}"
77
+ else
78
+ "Example"
79
+ end
80
+ end
81
+
82
+ def example_partial_path
83
+ "express_ui/uicomponents/examples/#{example_partial_name}"
84
+ end
48
85
 
49
86
  def example_partial_name
50
87
  s = component_name.dup
@@ -54,7 +91,7 @@ class ComponentExample < ExpressTemplates::Component
54
91
 
55
92
  def partial_body
56
93
  location = File.dirname(__FILE__)
57
- File.read(File.join(location, '..', 'views', 'express_ui', 'uicomponents', "_#{example_partial_name}.html.et"))
94
+ File.read(File.join(location, '..', 'views', 'express_ui', 'uicomponents', 'examples', "_#{example_partial_name}.html.et"))
58
95
  end
59
96
 
60
97
  def component_name
@@ -0,0 +1,37 @@
1
+ module ExpressUi
2
+ class Panel < ExpressTemplates::Container
3
+
4
+ has_option :heading, "The panel heading text. Set to false to supress", default: true
5
+ has_option :footer, "The panel footing text."
6
+
7
+ before_build -> {
8
+ add_class 'panel'
9
+ }
10
+
11
+ contains -> (&block) {
12
+ div(class: "panel-heading", only_when: !!config[:heading]) {
13
+ panel_header
14
+ }
15
+ div(class: "panel-body") {
16
+ block.call
17
+ }
18
+ div(class: "panel-footer", only_when: !!config[:footer]) {
19
+ panel_footer
20
+ }
21
+ }
22
+
23
+ def panel_footer
24
+ config[:footer]
25
+ end
26
+
27
+ def panel_header
28
+ case config[:header]
29
+ when String
30
+ config[:header]
31
+ else
32
+ config[:id].to_s.titleize
33
+ end
34
+ end
35
+
36
+ end
37
+ end
@@ -0,0 +1,6 @@
1
+ module ExpressUi
2
+ module Table
3
+ class ExpressTable < ExpressTemplates::Component
4
+ end
5
+ end
6
+ end
@@ -1,15 +1,29 @@
1
1
  module ExpressUi
2
2
  class UnorderedList < ExpressTemplates::Container
3
3
 
4
+ include ExpressTemplates::Components::Capabilities::Iteration
5
+
4
6
  tag :ul
5
7
 
8
+ has_option :collection_name, "Optional name for the collection if different from the :id"
9
+
6
10
  contains -> (&block) {
7
- collection.each do |item|
8
- assigns[:item] = item
9
- li {
11
+ for_all(collection_name) {
12
+ li(id: item_id, class: singular_item_name) {
10
13
  block.call()
11
14
  }
12
- end
15
+ }
13
16
  }
17
+
18
+ def collection_name
19
+ config[:collection_name] || config[:id]
20
+ end
21
+
22
+ def item_id
23
+ if item.respond_to?(:id)
24
+ "#{singular_item_name}:#{item.id}"
25
+ end
26
+ end
27
+
14
28
  end
15
29
  end
@@ -24,5 +24,12 @@ module ExpressUi
24
24
  code_block.strip_heredoc.html_safe
25
25
  end
26
26
  end
27
+
28
+ # This only works for controllers within this engine. (eg test/dummy)
29
+ # Put this method in your application_helper.rb and
30
+ # customize it to your purpose.
31
+ def user_role_classes
32
+ return "role-user" if defined?(current_user) && current_user.present?
33
+ end
27
34
  end
28
35
  end
@@ -0,0 +1,12 @@
1
+ module ExpressUi
2
+ module Examples
3
+ class Person
4
+ include ActiveModel::Model
5
+ attr_accessor :id, :name
6
+
7
+ def inspect
8
+ "Person.new(id: #{id}, name: #{name})"
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,29 +1,49 @@
1
1
  component_docitem(:unordered_list) {
2
2
  component_example(:unordered_list,
3
- expected_output: <<-HTML
3
+ assigns: {
4
+ people: ["Callahan", 'Reyes', 'Morrison', 'Quimby']
5
+ },
6
+ expected_output: <<-HTML
4
7
  <ul class="unordered-list" id="people">
5
- <li>
6
- <strong>Foo</strong>
8
+ <li class="person">
9
+ <strong>Callahan</strong>
7
10
  </li>
8
- <li>
9
- <strong>Foo</strong>
11
+ <li class="person">
12
+ <strong>Reyes</strong>
10
13
  </li>
11
- <li>
12
- <strong>Foo</strong>
14
+ <li class="person">
15
+ <strong>Morrison</strong>
16
+ </li>
17
+ <li class="person">
18
+ <strong>Quimby</strong>
13
19
  </li>
14
20
  </ul>
15
21
  HTML
16
- )
17
- }
18
-
19
-
22
+ )
20
23
 
21
- h3 { 'definition_list()' }
24
+ component_example(:unordered_list, example_name: 'with_ids',
25
+ assigns: {
26
+ people: [ExpressUi::Examples::Person.new(id: 1, name: 'Callahan'),
27
+ ExpressUi::Examples::Person.new(id: 2, name: 'Reyes'),
28
+ ExpressUi::Examples::Person.new(id: 3, name: 'Morrison'),
29
+ ExpressUi::Examples::Person.new(id: 4, name: 'Quimby')]
30
+ },
31
+ expected_output: <<-HTML
32
+ <ul class="unordered-list" id="people_with_ids">
33
+ <li id="person:1" class="person">
34
+ <strong>Callahan</strong>
35
+ </li>
36
+ <li id="person:2" class="person">
37
+ <strong>Reyes</strong>
38
+ </li>
39
+ <li id="person:3" class="person">
40
+ <strong>Morrison</strong>
41
+ </li>
42
+ <li id="person:4" class="person">
43
+ <strong>Quimby</strong>
44
+ </li>
45
+ </ul>
46
+ HTML
47
+ )
22
48
 
23
- section {
24
- code_demo {
25
- %Q{
26
- definition_list()
27
- }
28
- }
29
- }
49
+ }
@@ -0,0 +1,14 @@
1
+ component_docitem(:panel,
2
+ description:
3
+ %q(
4
+ A Panel provides a way of boxing up groups of related
5
+ contents to separate it from the rest of the document.
6
+
7
+ Panels usually have a header, content body, and footer.
8
+ Normal content blocks don't need to be in panels
9
+ if they only include texts or images. Panels offer styling
10
+ options.
11
+ )
12
+ ) {
13
+ component_example(:panel)
14
+ }
@@ -0,0 +1,9 @@
1
+ panel(:a_panel_example) {
2
+ para %q(Lorem ipsum dolor sit amet, consectetur adipiscing elit,
3
+ sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.)
4
+ ul {
5
+ li "one"
6
+ li "two"
7
+ li "three"
8
+ }
9
+ }
@@ -0,0 +1,5 @@
1
+ unordered_list(:people) {
2
+ strong {
3
+ person
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ unordered_list(:people_with_ids, collection_name: :people) {
2
+ strong {
3
+ person.name
4
+ }
5
+ }
@@ -9,49 +9,44 @@ div(class: "ae-template-content-sidebar-fixed") {
9
9
 
10
10
  div(class: "js-anchorific-content") {
11
11
 
12
- h2 "Lists"
12
+ h2 "Lists"
13
13
  render "express_ui/uicomponents/lists"
14
14
 
15
+ h2 "Panels"
16
+ render "express_ui/uicomponents/panels"
15
17
 
16
- # <!-- <h2>Buttons</h2>
18
+ h2 "Buttons"
19
+ # render "express_ui/uicomponents/buttons"
17
20
 
18
- # render "express_ui/uicomponents/buttons"
21
+ h2 "Forms"
22
+ # render "express_ui/uicomponents/forms"
19
23
 
20
- # <h2>Forms</h2>
21
- # render "express_ui/uicomponents/forms"
22
- # <h2>Flash Messages</h2>
23
- # render "express_ui/uicomponents/flash_message"
24
+ h2 "Flash Messages"
25
+ # render "express_ui/uicomponents/flash_message"
24
26
 
25
- # <h2>Heading</h2>
26
- # render "express_ui/uicomponents/heading"
27
+ h2 "Heading"
28
+ # render "express_ui/uicomponents/heading"
27
29
 
28
- # <h2>Icons</h2>
29
- # render "express_ui/uicomponents/icons"
30
+ h2 "Icons"
31
+ # render "express_ui/uicomponents/icons"
30
32
 
31
- # <h2>Layout</h2>
32
- # render "express_ui/uicomponents/layout"
33
+ h2 "Layout"
34
+ # render "express_ui/uicomponents/layout"
33
35
 
34
- # <h2>Nav</h2>
35
- # render "express_ui/uicomponents/nav"
36
+ h2 "Nav"
37
+ # render "express_ui/uicomponents/nav"
36
38
 
37
- # <h2>Panel</h2>
38
- # render "express_ui/uicomponents/panel"
39
+ h2 "Popups"
40
+ # render "express_ui/uicomponents/popup"
39
41
 
40
- # <h2>Popup</h2>
41
- # render "express_ui/uicomponents/popup"
42
+ h2 "Tables"
43
+ # render "express_ui/uicomponents/table"
42
44
 
43
- # <h2>Tables</h2>
44
- # render "express_ui/uicomponents/table"
45
- # <h2>Widget Box</h2>
45
+ h2 "Templates"
46
+ # render "express_ui/templates/templates"
46
47
 
47
- # render "express_ui/uicomponents/widget_box"
48
-
49
- # <h2>Templates</h2>
50
- # render "express_ui/templates/templates"
51
-
52
- # <h2>Pages</h2>
53
- # render "express_ui/uicomponents/pages"
54
- # -->
48
+ h2 "Pages"
49
+ # render "express_ui/uicomponents/pages"
55
50
  }
56
51
  }
57
52
  }
@@ -5,9 +5,11 @@
5
5
  <head>
6
6
  <meta charset="utf-8"/>
7
7
  <meta content="AppExpress" name="author"/>
8
- <title><%= @page_title || (page_title rescue "No Page Title Set") %></title>
8
+ <title><%= @page_title || content_for(:page_title) || (page_title rescue "No Page Title Set") %></title>
9
9
  <%= csrf_meta_tags %>
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1">
11
11
  <%= stylesheet_link_tag 'express_ui/styleguide', :media => "all" %>
12
+ <%= stylesheet_link_tag 'application', :media => "all" %>
12
13
  <%= javascript_include_tag 'express_ui/application', 'data-turbolinks-track': 'reload' %>
14
+ <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
13
15
  </head>
@@ -1,10 +1,10 @@
1
1
  <html>
2
2
  <%= render partial: 'layouts/express_ui/head' %>
3
- <body>
3
+ <body class="<%= controller_name %> <%= controller_name%>-<%= params[:action] %> <%= user_role_classes if defined?(user_role_classes) %>">
4
4
  <header>
5
5
  <%= content_for(:header) || render(partial: 'shared/header') rescue nil %>
6
6
  </header>
7
- <div class=".ae-template-full-width">
7
+ <div class="ae-template-full-width">
8
8
  <div class="ae-container">
9
9
  <div class="ae-content">
10
10
  <%= yield %>
@@ -1,10 +1,10 @@
1
1
  <html>
2
2
  <%= render partial: 'layouts/express_ui/head' %>
3
- <body>
3
+ <body class="<%= controller_name %> <%= controller_name%>-<%= params[:action] %> <%= user_role_classes if defined?(user_role_classes) %>">
4
4
  <header>
5
5
  <%= content_for(:header) || render(partial: 'shared/header') rescue nil %>
6
6
  </header>
7
- <div class=".ae-template-full-width">
7
+ <div class="ae-template-half-width">
8
8
  <div class="ae-container">
9
9
  <div class="ae-content">
10
10
  <%= yield %>
@@ -1,10 +1,10 @@
1
1
  <html>
2
2
  <%= render partial: 'layouts/express_ui/head' %>
3
- <body>
3
+ <body class="<%= controller_name %> <%= controller_name%>-<%= params[:action] %> <%= user_role_classes if defined?(user_role_classes) %>">
4
4
  <header>
5
5
  <%= content_for(:header) || render(partial: 'shared/header') rescue nil %>
6
6
  </header>
7
- <div class=".ae-template-master-detail">
7
+ <div class="ae-template-master-detail">
8
8
  <div class="ae-container">
9
9
  <div class="ae-content">
10
10
  <%= yield %>
@@ -1,10 +1,10 @@
1
1
  <html>
2
2
  <%= render partial: 'layouts/express_ui/head' %>
3
- <body>
3
+ <body class="<%= controller_name %> <%= controller_name%>-<%= params[:action] %> <%= user_role_classes if defined?(user_role_classes) %>">
4
4
  <header>
5
5
  <%= content_for(:header) || render(partial: 'shared/header') rescue nil %>
6
6
  </header>
7
- <div class=".ae-template-master-detail-fixed">
7
+ <div class="ae-template-master-detail-fixed">
8
8
  <div class="ae-container">
9
9
  <div class="ae-content">
10
10
  <%= yield %>
@@ -32,6 +32,7 @@ module ExpressUi
32
32
  )
33
33
 
34
34
  # Load all component definitions.
35
+ # TODO: does this really belong here?
35
36
  Dir.glob(File.expand_path('../../../app/components/**/*.rb', __FILE__)).each do |component_file|
36
37
  component_name = File.basename(component_file).split('.').first
37
38
  part_to_remove = File.expand_path('../../../app/components/',__FILE__)
@@ -1,3 +1,3 @@
1
1
  module ExpressUi
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: express_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Talcott Smith
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-04-07 00:00:00.000000000 Z
13
+ date: 2017-04-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: express_templates
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.11.17
21
+ version: 0.11.18
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.11.17
28
+ version: 0.11.18
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rails
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -82,20 +82,6 @@ dependencies:
82
82
  - - "~>"
83
83
  - !ruby/object:Gem::Version
84
84
  version: '4.7'
85
- - !ruby/object:Gem::Dependency
86
- name: pry
87
- requirement: !ruby/object:Gem::Requirement
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- version: '0'
92
- type: :development
93
- prerelease: false
94
- version_requirements: !ruby/object:Gem::Requirement
95
- requirements:
96
- - - ">="
97
- - !ruby/object:Gem::Version
98
- version: '0'
99
85
  description: User interface library for AppExpress components (https://appexpress.io)
100
86
  email:
101
87
  - steve@aelogica.com
@@ -144,6 +130,7 @@ files:
144
130
  - app/assets/stylesheets/express_ui/molecules/_nav.sass
145
131
  - app/assets/stylesheets/express_ui/molecules/_tables.sass
146
132
  - app/assets/stylesheets/express_ui/molecules/_tabs.sass
133
+ - app/assets/stylesheets/express_ui/organisms/_footer.sass
147
134
  - app/assets/stylesheets/express_ui/organisms/_header.sass
148
135
  - app/assets/stylesheets/express_ui/organisms/_sidebar.sass
149
136
  - app/assets/stylesheets/express_ui/style.sass
@@ -155,6 +142,8 @@ files:
155
142
  - app/components/code_demo.rb
156
143
  - app/components/component_docitem.rb
157
144
  - app/components/component_example.rb
145
+ - app/components/express_ui/panel.rb
146
+ - app/components/express_ui/table/express_table.rb
158
147
  - app/components/express_ui/unordered_list.rb
159
148
  - app/controllers/express_ui/about_controller.rb
160
149
  - app/controllers/express_ui/application_controller.rb
@@ -166,6 +155,7 @@ files:
166
155
  - app/jobs/express_ui/application_job.rb
167
156
  - app/mailers/express_ui/application_mailer.rb
168
157
  - app/models/express_ui/application_record.rb
158
+ - app/models/express_ui/examples/person.rb
169
159
  - app/views/express_ui/atoms/_animations.html.erb
170
160
  - app/views/express_ui/atoms/_buttons.html.erb
171
161
  - app/views/express_ui/atoms/_headings.html.erb
@@ -217,13 +207,15 @@ files:
217
207
  - app/views/express_ui/uicomponents/_lists.html.et
218
208
  - app/views/express_ui/uicomponents/_nav.html.et
219
209
  - app/views/express_ui/uicomponents/_pages.html.erb
220
- - app/views/express_ui/uicomponents/_panel.html.et
210
+ - app/views/express_ui/uicomponents/_panels.html.et
221
211
  - app/views/express_ui/uicomponents/_popup.html.et
222
212
  - app/views/express_ui/uicomponents/_register.html.erb
223
213
  - app/views/express_ui/uicomponents/_sidebar.html.et
224
214
  - app/views/express_ui/uicomponents/_table.html.et
225
- - app/views/express_ui/uicomponents/_unordered_list.html.et
226
215
  - app/views/express_ui/uicomponents/_widget_box.html.et
216
+ - app/views/express_ui/uicomponents/examples/_panel.html.et
217
+ - app/views/express_ui/uicomponents/examples/_unordered_list.html.et
218
+ - app/views/express_ui/uicomponents/examples/_unordered_list_with_ids.html.et
227
219
  - app/views/express_ui/uicomponents/index.html.et
228
220
  - app/views/layouts/express_ui/_head.html.erb
229
221
  - app/views/layouts/express_ui/content_and_sidebar.html.erb
@@ -261,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
253
  version: '0'
262
254
  requirements: []
263
255
  rubyforge_project:
264
- rubygems_version: 2.5.2
256
+ rubygems_version: 2.4.7
265
257
  signing_key:
266
258
  specification_version: 4
267
259
  summary: User interface library for AppExpress components
@@ -1,33 +0,0 @@
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
- }
@@ -1,3 +0,0 @@
1
- unordered_list(:people) {
2
- strong { 'Foo' }
3
- }