bs5 0.0.8 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/app/components/bs5/alert_component.rb +2 -0
  3. data/app/components/bs5/badge_component.rb +2 -0
  4. data/app/components/bs5/button_tag_component.rb +100 -0
  5. data/app/components/bs5/button_to_component.rb +109 -0
  6. data/app/components/bs5/list_group_component.html.erb +17 -0
  7. data/app/components/bs5/list_group_component.rb +143 -0
  8. data/app/controllers/bs5/pages_controller.rb +11 -0
  9. data/app/helpers/bs5/components_helper.rb +16 -16
  10. data/app/validators/style_validator.rb +2 -4
  11. data/app/views/bs5/examples/accordion/default/_example.html.erb +1 -1
  12. data/app/views/bs5/examples/accordion/flush/_example.html.erb +1 -1
  13. data/app/views/bs5/examples/alert/additional_content/_example.html.erb +1 -1
  14. data/app/views/bs5/examples/alert/default/_example.html.erb +1 -1
  15. data/app/views/bs5/examples/alert/dismissable/_example.html.erb +1 -1
  16. data/app/views/bs5/examples/alert/style/_example.html.erb +1 -1
  17. data/app/views/bs5/examples/badge/default/_example.html.erb +1 -1
  18. data/app/views/bs5/examples/badge/pill/_example.html.erb +1 -1
  19. data/app/views/bs5/examples/badge/style/_example.html.erb +1 -1
  20. data/app/views/bs5/examples/breadcrumb/default/_example.html.erb +1 -1
  21. data/app/views/bs5/examples/buttons/button_tag/block_buttons/_example.html.erb +5 -0
  22. data/app/views/bs5/examples/buttons/button_tag/block_buttons/block_buttons.html.erb +4 -0
  23. data/app/views/bs5/examples/buttons/button_tag/block_buttons/responsive_block_buttons_1.html.erb +4 -0
  24. data/app/views/bs5/examples/buttons/button_tag/block_buttons/responsive_block_buttons_2.html.erb +4 -0
  25. data/app/views/bs5/examples/buttons/button_tag/block_buttons/responsive_block_buttons_3.html.erb +4 -0
  26. data/app/views/bs5/examples/buttons/button_tag/default/_example.html.erb +2 -0
  27. data/app/views/bs5/examples/buttons/button_tag/default/snippet.html.erb +15 -0
  28. data/app/views/bs5/examples/buttons/button_tag/outline/_example.html.erb +2 -0
  29. data/app/views/bs5/examples/buttons/button_tag/outline/snippet.html.erb +19 -0
  30. data/app/views/bs5/examples/buttons/button_tag/size/_example.html.erb +3 -0
  31. data/app/views/bs5/examples/buttons/button_tag/size/large.html.erb +3 -0
  32. data/app/views/bs5/examples/buttons/button_tag/size/small.html.erb +3 -0
  33. data/app/views/bs5/examples/buttons/button_tag/style/_example.html.erb +2 -0
  34. data/app/views/bs5/examples/buttons/button_tag/style/snippet.html.erb +19 -0
  35. data/app/views/bs5/examples/buttons/button_tag/toggle_states/_example.html.erb +2 -0
  36. data/app/views/bs5/examples/buttons/button_tag/toggle_states/snippet.html.erb +3 -0
  37. data/app/views/bs5/examples/buttons/button_to/default/_example.html.erb +2 -0
  38. data/app/views/bs5/examples/buttons/button_to/default/snippet.html.erb +11 -0
  39. data/app/views/bs5/examples/close_button/default/_example.html.erb +1 -1
  40. data/app/views/bs5/examples/close_button/disabled/_example.html.erb +1 -1
  41. data/app/views/bs5/examples/close_button/white/_example.html.erb +1 -1
  42. data/app/views/bs5/examples/list_group/actionable/_example.html.erb +3 -0
  43. data/app/views/bs5/examples/list_group/actionable/button.html.erb +7 -0
  44. data/app/views/bs5/examples/list_group/actionable/snippet.html.erb +7 -0
  45. data/app/views/bs5/examples/list_group/active/_example.html.erb +2 -0
  46. data/app/views/bs5/examples/list_group/active/snippet.html.erb +7 -0
  47. data/app/views/bs5/examples/list_group/checkboxes_and_radios/_example.html.erb +3 -0
  48. data/app/views/bs5/examples/list_group/checkboxes_and_radios/default.html.erb +22 -0
  49. data/app/views/bs5/examples/list_group/checkboxes_and_radios/with_labels.html.erb +32 -0
  50. data/app/views/bs5/examples/list_group/custom_content/_example.html.erb +2 -0
  51. data/app/views/bs5/examples/list_group/custom_content/default.html.erb +32 -0
  52. data/app/views/bs5/examples/list_group/default/_example.html.erb +2 -0
  53. data/app/views/bs5/examples/list_group/default/snippet.html.erb +7 -0
  54. data/app/views/bs5/examples/list_group/disabled/_example.html.erb +2 -0
  55. data/app/views/bs5/examples/list_group/disabled/snippet.html.erb +7 -0
  56. data/app/views/bs5/examples/list_group/flush/_example.html.erb +2 -0
  57. data/app/views/bs5/examples/list_group/flush/snippet.html.erb +7 -0
  58. data/app/views/bs5/examples/list_group/horizontal/_example.html.erb +2 -0
  59. data/app/views/bs5/examples/list_group/horizontal/snippet.html.erb +30 -0
  60. data/app/views/bs5/examples/list_group/style/_example.html.erb +3 -0
  61. data/app/views/bs5/examples/list_group/style/actionable.html.erb +11 -0
  62. data/app/views/bs5/examples/list_group/style/default.html.erb +11 -0
  63. data/app/views/bs5/examples/list_group/with_badges/_example.html.erb +2 -0
  64. data/app/views/bs5/examples/list_group/with_badges/default.html.erb +14 -0
  65. data/app/views/bs5/examples/tooltips/default/_example.html.erb +4 -0
  66. data/app/views/bs5/examples/tooltips/default/buttons.html.erb +9 -0
  67. data/app/views/bs5/examples/tooltips/default/disabled_elements.html.erb +3 -0
  68. data/app/views/bs5/examples/tooltips/default/snippet.html.erb +7 -0
  69. data/app/views/bs5/pages/accordion.html.erb +3 -0
  70. data/app/views/bs5/{examples/_alert.html.erb → pages/alert.html.erb} +1 -1
  71. data/app/views/bs5/{examples/_badge.html.erb → pages/badge.html.erb} +1 -1
  72. data/app/views/bs5/pages/breadcrumb.html.erb +2 -0
  73. data/app/views/bs5/pages/buttons.html.erb +11 -0
  74. data/app/views/bs5/{examples/_close_button.html.erb → pages/close_button.html.erb} +1 -1
  75. data/app/views/bs5/pages/list_group.html.erb +11 -0
  76. data/app/views/bs5/pages/tooltips.html.erb +2 -0
  77. data/app/views/layouts/bs5/pages.html.erb +32 -0
  78. data/config/definitions.rb +31 -0
  79. data/config/locales/en.yml +12 -0
  80. data/config/routes.rb +2 -2
  81. data/lib/bs5/version.rb +1 -1
  82. data/lib/generators/bs5/install/install_generator.rb +12 -4
  83. data/lib/generators/bs5/install/templates/bs5.js +14 -0
  84. metadata +77 -9
  85. data/app/controllers/bs5/examples_controller.rb +0 -9
  86. data/app/views/bs5/examples/_accordion.html.erb +0 -3
  87. data/app/views/bs5/examples/_breadcrumb.html.erb +0 -2
  88. data/app/views/bs5/examples/index.html.erb +0 -21
@@ -1,11 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class StyleValidator < ActiveModel::EachValidator
4
- STYLES = %i[primary secondary success danger warning info light dark].freeze
5
-
6
4
  def validate_each(record, attribute, value)
7
- return if value.in?(STYLES)
5
+ return if value.in?(valid_styles = record.class::STYLES)
8
6
 
9
- record.errors.add(attribute, :inclusion, valid_styles: STYLES.to_sentence)
7
+ record.errors.add(attribute, :inclusion, valid_styles: valid_styles.to_sentence)
10
8
  end
11
9
  end
@@ -1,2 +1,2 @@
1
- <h3>Default</h3>
1
+ <h2>Example</h2>
2
2
  <%= bs5_example(snippet: 'accordion/default/snippet') %>
@@ -1,2 +1,2 @@
1
- <h3>Flush</h3>
1
+ <h2>Flush</h2>
2
2
  <%= bs5_example(snippet: 'accordion/flush/snippet') %>
@@ -1,2 +1,2 @@
1
- <h3>Additional content</h3>
1
+ <h2>Additional content</h2>
2
2
  <%= bs5_example(snippet: 'alert/additional_content/snippet') %>
@@ -1,2 +1,2 @@
1
- <h3>Default</h3>
1
+ <h2>Examples</h2>
2
2
  <%= bs5_example(snippet: 'alert/default/snippet') %>
@@ -1,2 +1,2 @@
1
- <h3>Dismissing</h3>
1
+ <h2>Dismissing</h2>
2
2
  <%= bs5_example(snippet: 'alert/dismissable/snippet') %>
@@ -1,2 +1,2 @@
1
- <h3>Style</h3>
1
+ <h2>Style</h2>
2
2
  <%= bs5_example(snippet: 'alert/style/snippet') %>
@@ -1,2 +1,2 @@
1
- <h3>Example</h3>
1
+ <h2>Example</h2>
2
2
  <%= bs5_example(snippet: 'badge/default/snippet') %>
@@ -1,2 +1,2 @@
1
- <h3>Pill badges</h3>
1
+ <h2>Pill badges</h2>
2
2
  <%= bs5_example(snippet: 'badge/pill/snippet') %>
@@ -1,2 +1,2 @@
1
- <h3>Background colors</h3>
1
+ <h2>Background colors</h2>
2
2
  <%= bs5_example(snippet: 'badge/style/snippet') %>
@@ -1,2 +1,2 @@
1
- <h3>Example</h3>
1
+ <h2>Example</h2>
2
2
  <%= bs5_example(snippet: 'breadcrumb/default/snippet') %>
@@ -0,0 +1,5 @@
1
+ <h3>Block buttons</h3>
2
+ <%= bs5_example(snippet: 'buttons/button_tag/block_buttons/block_buttons') %>
3
+ <%= bs5_example(snippet: 'buttons/button_tag/block_buttons/responsive_block_buttons_1') %>
4
+ <%= bs5_example(snippet: 'buttons/button_tag/block_buttons/responsive_block_buttons_2') %>
5
+ <%= bs5_example(snippet: 'buttons/button_tag/block_buttons/responsive_block_buttons_3') %>
@@ -0,0 +1,4 @@
1
+ <div class="d-grid gap-2">
2
+ <%= bs5_button_tag %>
3
+ <%= bs5_button_tag %>
4
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="d-grid gap-2 d-md-block">
2
+ <%= bs5_button_tag %>
3
+ <%= bs5_button_tag %>
4
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="d-grid gap-2 col-6 mx-auto">
2
+ <%= bs5_button_tag %>
3
+ <%= bs5_button_tag %>
4
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="d-grid gap-2 d-md-flex justify-content-md-end">
2
+ <%= bs5_button_tag('Button', class: 'mr-md-2') %>
3
+ <%= bs5_button_tag %>
4
+ </div>
@@ -0,0 +1,2 @@
1
+ <h3>Example</h3>
2
+ <%= bs5_example(snippet: 'buttons/button_tag/default/snippet') %>
@@ -0,0 +1,15 @@
1
+ <%= bs5_button_tag %>
2
+
3
+ <%= bs5_button_tag('Reset', type: 'reset') %>
4
+
5
+ <%= bs5_button_tag('Button', type: 'button') %>
6
+
7
+ <%= bs5_button_tag('Reset', type: 'reset', disabled: true) %>
8
+
9
+ <%= bs5_button_tag(type: 'button') do %>
10
+ <%= tag.strong('Ask me!') %>
11
+ <% end %>
12
+
13
+ <%= bs5_button_tag('Save', data: { confirm: 'Are you sure?' }) %>
14
+
15
+ <%= bs5_button_tag('Checkout', data: { disable_with: 'Please wait...' }) %>
@@ -0,0 +1,2 @@
1
+ <h3>Outline</h3>
2
+ <%= bs5_example(snippet: 'buttons/button_tag/outline/snippet') %>
@@ -0,0 +1,19 @@
1
+ <%= bs5_button_tag('Primary', style: :primary, outline: true) %>
2
+
3
+ <%= bs5_button_tag('Secondary', style: :secondary, outline: true) %>
4
+
5
+ <%= bs5_button_tag('Success', style: :success, outline: true) %>
6
+
7
+ <%= bs5_button_tag('Danger', style: :danger, outline: true) %>
8
+
9
+ <%= bs5_button_tag(style: :warning, outline: true, type: 'button') do %>
10
+ <%= tag.strong('Warning') %>
11
+ <% end %>
12
+
13
+ <%= bs5_button_tag('Info', style: :info, outline: true) %>
14
+
15
+ <%= bs5_button_tag('Light', style: :light, outline: true) %>
16
+
17
+ <%= bs5_button_tag('Dark', style: :dark, outline: true) %>
18
+
19
+ <%= bs5_button_tag('Link', style: :link, outline: true) %>
@@ -0,0 +1,3 @@
1
+ <h3>Sizes</h3>
2
+ <%= bs5_example(snippet: 'buttons/button_tag/size/large') %>
3
+ <%= bs5_example(snippet: 'buttons/button_tag/size/small') %>
@@ -0,0 +1,3 @@
1
+ <%= bs5_button_tag('Large button', style: :primary, size: :large) %>
2
+
3
+ <%= bs5_button_tag('Large button', style: :secondary, size: :large) %>
@@ -0,0 +1,3 @@
1
+ <%= bs5_button_tag('Small button', style: :primary, size: :small) %>
2
+
3
+ <%= bs5_button_tag('Small button', style: :secondary, size: :small) %>
@@ -0,0 +1,2 @@
1
+ <h3>Style</h3>
2
+ <%= bs5_example(snippet: 'buttons/button_tag/style/snippet') %>
@@ -0,0 +1,19 @@
1
+ <%= bs5_button_tag('Primary', style: :primary) %>
2
+
3
+ <%= bs5_button_tag('Secondary', style: :secondary) %>
4
+
5
+ <%= bs5_button_tag('Success', style: :success) %>
6
+
7
+ <%= bs5_button_tag('Danger', style: :danger) %>
8
+
9
+ <%= bs5_button_tag(style: :warning, type: 'button') do %>
10
+ <%= tag.strong('Warning') %>
11
+ <% end %>
12
+
13
+ <%= bs5_button_tag('Info', style: :info) %>
14
+
15
+ <%= bs5_button_tag('Light', style: :light) %>
16
+
17
+ <%= bs5_button_tag('Dark', style: :dark) %>
18
+
19
+ <%= bs5_button_tag('Link', style: :link) %>
@@ -0,0 +1,2 @@
1
+ <h3>Toggle states</h3>
2
+ <%= bs5_example(snippet: 'buttons/button_tag/toggle_states/snippet') %>
@@ -0,0 +1,3 @@
1
+ <%= bs5_button_tag('Toggle button', data: { toggle: 'button' }, autocomplete: 'off') %>
2
+ <%= bs5_button_tag('Active toggle button', class: 'active', data: { toggle: 'button' }, autocomplete: 'off', aria: { pressed: true }) %>
3
+ <%= bs5_button_tag('Disabled toggle button', data: { toggle: 'button' }, autocomplete: 'off', disabled: true) %>
@@ -0,0 +1,2 @@
1
+ <h3>Example</h3>
2
+ <%= bs5_example(snippet: 'buttons/button_to/default/snippet') %>
@@ -0,0 +1,11 @@
1
+ <div class="d-grid gap-2 d-md-flex">
2
+ <%= bs5_button_to('New', 'http://www.example.com') %>
3
+
4
+ <%= bs5_button_to('http://www.example.com', style: :success) do %>
5
+ Make happy <strong>John Doe</strong>
6
+ <%- end %>
7
+
8
+ <%= bs5_button_to('New', 'http://www.example.com', style: :dark, outline: true, size: :large, form_class: 'new-thing') %>
9
+
10
+ <%= bs5_button_to('Destroy', 'http://www.example.com', style: :danger, method: "delete", remote: true, data: { confirm: 'Are you sure?', disable_with: 'loading...' }) %>
11
+ </div>
@@ -1,2 +1,2 @@
1
- <h3>Default</h3>
1
+ <h2>Default</h2>
2
2
  <%= bs5_example(snippet: 'close_button/default/snippet') %>
@@ -1,2 +1,2 @@
1
- <h3>Disabled</h3>
1
+ <h2>Disabled</h2>
2
2
  <%= bs5_example(snippet: 'close_button/disabled/snippet') %>
@@ -1,2 +1,2 @@
1
- <h3>White</h3>
1
+ <h2>White</h2>
2
2
  <%= bs5_example(snippet: 'close_button/white/snippet') %>
@@ -0,0 +1,3 @@
1
+ <h2>Links and buttons</h2>
2
+ <%= bs5_example(snippet: 'list_group/actionable/snippet') %>
3
+ <%= bs5_example(snippet: 'list_group/actionable/button') %>
@@ -0,0 +1,7 @@
1
+ <%= bs5_list_group do |lg| %>
2
+ <% lg.slot(:item, active: true) do %><%= button_tag 'Cras justo odio' %><% end %>
3
+ <% lg.slot(:item) do %><%= button_tag 'Dapibus ac facilisis in' %><% end %>
4
+ <% lg.slot(:item) do %><%= button_tag 'Morbi leo risus' %><% end %>
5
+ <% lg.slot(:item) do %><%= button_tag 'Porta ac consectetur ac' %><% end %>
6
+ <% lg.slot(:item, disabled: true) do %><%= button_tag 'Vestibulum at eros' %><% end %>
7
+ <%- end %>
@@ -0,0 +1,7 @@
1
+ <%= bs5_list_group do |lg| %>
2
+ <% lg.slot(:item, active: true) do %><%= link_to 'Cras justo odio', '#' %><% end %>
3
+ <% lg.slot(:item) do %><%= link_to 'Dapibus ac facilisis in', '#' %><% end %>
4
+ <% lg.slot(:item) do %><%= link_to 'Morbi leo risus', '#' %><% end %>
5
+ <% lg.slot(:item) do %><%= link_to 'Porta ac consectetur ac', '#' %><% end %>
6
+ <% lg.slot(:item, disabled: true) do %><%= link_to 'Vestibulum at eros', '#' %><% end %>
7
+ <%- end %>
@@ -0,0 +1,2 @@
1
+ <h2>Active items</h2>
2
+ <%= bs5_example(snippet: 'list_group/active/snippet') %>
@@ -0,0 +1,7 @@
1
+ <%= bs5_list_group do |lg| %>
2
+ <% lg.slot(:item, active: true) do %>Cras justo odio<% end %>
3
+ <% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
4
+ <% lg.slot(:item) do %>Morbi leo risus<% end %>
5
+ <% lg.slot(:item) do %>Porta ac consectetur ac<% end %>
6
+ <% lg.slot(:item) do %>Vestibulum at eros<% end %>
7
+ <%- end %>
@@ -0,0 +1,3 @@
1
+ <h2>Checkboxes and radios</h2>
2
+ <%= bs5_example(snippet: 'list_group/checkboxes_and_radios/default') %>
3
+ <%= bs5_example(snippet: 'list_group/checkboxes_and_radios/with_labels') %>
@@ -0,0 +1,22 @@
1
+ <%= bs5_list_group do |lg| %>
2
+ <% lg.slot(:item) do %>
3
+ <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
4
+ Cras justo odio
5
+ <% end %>
6
+ <% lg.slot(:item) do %>
7
+ <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
8
+ Dapibus ac facilisis in
9
+ <% end %>
10
+ <% lg.slot(:item) do %>
11
+ <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
12
+ Morbi leo risus
13
+ <% end %>
14
+ <% lg.slot(:item) do %>
15
+ <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
16
+ Porta ac consectetur ac
17
+ <% end %>
18
+ <% lg.slot(:item) do %>
19
+ <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
20
+ Vestibulum at eros
21
+ <% end %>
22
+ <%- end %>
@@ -0,0 +1,32 @@
1
+ <%= bs5_list_group do |lg| %>
2
+ <% lg.slot(:item) do %>
3
+ <%= label_tag do %>
4
+ <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
5
+ Cras justo odio
6
+ <% end %>
7
+ <% end %>
8
+ <% lg.slot(:item) do %>
9
+ <%= label_tag do %>
10
+ <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
11
+ Dapibus ac facilisis in
12
+ <% end %>
13
+ <% end %>
14
+ <% lg.slot(:item) do %>
15
+ <%= label_tag do %>
16
+ <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
17
+ Morbi leo risus
18
+ <% end %>
19
+ <% end %>
20
+ <% lg.slot(:item) do %>
21
+ <%= label_tag do %>
22
+ <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
23
+ Porta ac consectetur ac
24
+ <% end %>
25
+ <% end %>
26
+ <% lg.slot(:item) do %>
27
+ <%= label_tag do %>
28
+ <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
29
+ Vestibulum at eros
30
+ <% end %>
31
+ <% end %>
32
+ <%- end %>
@@ -0,0 +1,2 @@
1
+ <h2>Custom content</h2>
2
+ <%= bs5_example(snippet: 'list_group/custom_content/default') %>
@@ -0,0 +1,32 @@
1
+ <%= bs5_list_group do |lg| %>
2
+ <% lg.slot(:item, active: true) do %>
3
+ <%= link_to '#' do %>
4
+ <div class="d-flex w-100 justify-content-between">
5
+ <h5 class="mb-1">List group item heading</h5>
6
+ <small>3 days ago</small>
7
+ </div>
8
+ <p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
9
+ <small>Donec id elit non mi porta.</small>
10
+ <% end %>
11
+ <% end %>
12
+ <% lg.slot(:item) do %>
13
+ <%= link_to '#' do %>
14
+ <div class="d-flex w-100 justify-content-between">
15
+ <h5 class="mb-1">List group item heading</h5>
16
+ <small class="text-muted">3 days ago</small>
17
+ </div>
18
+ <p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
19
+ <small class="text-muted">Donec id elit non mi porta.</small>
20
+ <% end %>
21
+ <% end %>
22
+ <% lg.slot(:item) do %>
23
+ <%= link_to '#' do %>
24
+ <div class="d-flex w-100 justify-content-between">
25
+ <h5 class="mb-1">List group item heading</h5>
26
+ <small class="text-muted">3 days ago</small>
27
+ </div>
28
+ <p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
29
+ <small class="text-muted">Donec id elit non mi porta.</small>
30
+ <% end %>
31
+ <% end %>
32
+ <%- end %>
@@ -0,0 +1,2 @@
1
+ <h2>Basic example</h2>
2
+ <%= bs5_example(snippet: 'list_group/default/snippet') %>
@@ -0,0 +1,7 @@
1
+ <%= bs5_list_group do |lg| %>
2
+ <% lg.slot(:item) do %>Cras justo odio<% end %>
3
+ <% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
4
+ <% lg.slot(:item) do %>Morbi leo risus<% end %>
5
+ <% lg.slot(:item) do %>Porta ac consectetur ac<% end %>
6
+ <% lg.slot(:item) do %>Vestibulum at eros<% end %>
7
+ <%- end %>
@@ -0,0 +1,2 @@
1
+ <h2>Disabled items</h2>
2
+ <%= bs5_example(snippet: 'list_group/disabled/snippet') %>
@@ -0,0 +1,7 @@
1
+ <%= bs5_list_group do |lg| %>
2
+ <% lg.slot(:item, disabled: true) do %>Cras justo odio<% end %>
3
+ <% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
4
+ <% lg.slot(:item) do %>Morbi leo risus<% end %>
5
+ <% lg.slot(:item) do %>Porta ac consectetur ac<% end %>
6
+ <% lg.slot(:item) do %>Vestibulum at eros<% end %>
7
+ <%- end %>
@@ -0,0 +1,2 @@
1
+ <h2>Flush</h2>
2
+ <%= bs5_example(snippet: 'list_group/flush/snippet') %>
@@ -0,0 +1,7 @@
1
+ <%= bs5_list_group(flush: true) do |lg| %>
2
+ <% lg.slot(:item) do %>Cras justo odio<% end %>
3
+ <% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
4
+ <% lg.slot(:item) do %>Morbi leo risus<% end %>
5
+ <% lg.slot(:item) do %>Porta ac consectetur ac<% end %>
6
+ <% lg.slot(:item) do %>Vestibulum at eros<% end %>
7
+ <%- end %>
@@ -0,0 +1,2 @@
1
+ <h2>Horizontal</h2>
2
+ <%= bs5_example(snippet: 'list_group/horizontal/snippet') %>
@@ -0,0 +1,30 @@
1
+ <%= bs5_list_group(horizontal: true) do |lg| %>
2
+ <% lg.slot(:item) do %>Cras justo odio<% end %>
3
+ <% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
4
+ <% lg.slot(:item) do %>Morbi leo risus<% end %>
5
+ <%- end %>
6
+ <%= bs5_list_group(horizontal: :sm) do |lg| %>
7
+ <% lg.slot(:item) do %>Cras justo odio<% end %>
8
+ <% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
9
+ <% lg.slot(:item) do %>Morbi leo risus<% end %>
10
+ <%- end %>
11
+ <%= bs5_list_group(horizontal: :md) do |lg| %>
12
+ <% lg.slot(:item) do %>Cras justo odio<% end %>
13
+ <% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
14
+ <% lg.slot(:item) do %>Morbi leo risus<% end %>
15
+ <%- end %>
16
+ <%= bs5_list_group(horizontal: :lg) do |lg| %>
17
+ <% lg.slot(:item) do %>Cras justo odio<% end %>
18
+ <% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
19
+ <% lg.slot(:item) do %>Morbi leo risus<% end %>
20
+ <%- end %>
21
+ <%= bs5_list_group(horizontal: :xl) do |lg| %>
22
+ <% lg.slot(:item) do %>Cras justo odio<% end %>
23
+ <% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
24
+ <% lg.slot(:item) do %>Morbi leo risus<% end %>
25
+ <%- end %>
26
+ <%= bs5_list_group(horizontal: :xxl) do |lg| %>
27
+ <% lg.slot(:item) do %>Cras justo odio<% end %>
28
+ <% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
29
+ <% lg.slot(:item) do %>Morbi leo risus<% end %>
30
+ <%- end %>
@@ -0,0 +1,3 @@
1
+ <h2>Contextual classes</h2>
2
+ <%= bs5_example(snippet: 'list_group/style/default') %>
3
+ <%= bs5_example(snippet: 'list_group/style/actionable') %>
@@ -0,0 +1,11 @@
1
+ <%= bs5_list_group do |lg| %>
2
+ <% lg.slot(:item) do %><%= link_to 'Dapibus ac facilisis in', '#' %><% end %>
3
+ <% lg.slot(:item, style: :primary) do %><%= link_to 'A simple primary list group item', '#' %><% end %>
4
+ <% lg.slot(:item, style: :secondary) do %><%= link_to 'A simple secondary list group item', '#' %><% end %>
5
+ <% lg.slot(:item, style: :success) do %><%= link_to 'A simple success list group item', '#' %><% end %>
6
+ <% lg.slot(:item, style: :danger) do %><%= link_to 'A simple danger list group item', '#' %><% end %>
7
+ <% lg.slot(:item, style: :warning) do %><%= link_to 'A simple warning list group item', '#' %><% end %>
8
+ <% lg.slot(:item, style: :info) do %><%= link_to 'A simple info list group item', '#' %><% end %>
9
+ <% lg.slot(:item, style: :light) do %><%= link_to 'A simple light list group item', '#' %><% end %>
10
+ <% lg.slot(:item, style: :dark) do %><%= link_to 'A simple dark list group item', '#' %><% end %>
11
+ <%- end %>