bs5 0.0.15 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/app/components/bs5/accordion_component.html.erb +1 -1
  3. data/app/components/bs5/accordion_component.rb +7 -3
  4. data/app/components/bs5/alert_component.rb +5 -5
  5. data/app/components/bs5/badge_component.rb +6 -6
  6. data/app/components/bs5/breadcrumb_component.html.erb +1 -1
  7. data/app/components/bs5/breadcrumb_component.rb +6 -3
  8. data/app/components/bs5/button_group_component.html.erb +3 -0
  9. data/app/components/bs5/button_group_component.rb +49 -0
  10. data/app/components/bs5/button_tag_component.rb +8 -8
  11. data/app/components/bs5/button_to_component.rb +8 -8
  12. data/app/components/bs5/button_toolbar_component.html.erb +3 -0
  13. data/app/components/bs5/button_toolbar_component.rb +21 -0
  14. data/app/components/bs5/list_group_component.html.erb +2 -2
  15. data/app/components/bs5/list_group_component.rb +16 -9
  16. data/app/components/bs5/spinner_component.html.erb +5 -0
  17. data/app/components/bs5/spinner_component.rb +65 -0
  18. data/app/helpers/bs5/components_helper.rb +8 -8
  19. data/app/service/bs5/collapse_service.rb +5 -3
  20. data/app/service/bs5/popover_service.rb +31 -0
  21. data/app/service/bs5/tooltip_service.rb +31 -0
  22. data/app/views/bs5/examples/accordion/default/snippet.html.erb +4 -4
  23. data/app/views/bs5/examples/accordion/flush/snippet.html.erb +4 -4
  24. data/app/views/bs5/examples/alert/additional_content/snippet.html.erb +1 -1
  25. data/app/views/bs5/examples/alert/color/_example.html.erb +1 -0
  26. data/app/views/bs5/examples/alert/{style → color}/snippet.html.erb +8 -8
  27. data/app/views/bs5/examples/alert/dismissable/snippet.html.erb +1 -1
  28. data/app/views/bs5/examples/badge/color/_example.html.erb +2 -0
  29. data/app/views/bs5/examples/badge/color/snippet.html.erb +8 -0
  30. data/app/views/bs5/examples/badge/default/_example.html.erb +2 -1
  31. data/app/views/bs5/examples/badge/default/button.html.erb +3 -0
  32. data/app/views/bs5/examples/badge/pill/snippet.html.erb +8 -8
  33. data/app/views/bs5/examples/breadcrumb/default/snippet.html.erb +9 -9
  34. data/app/views/bs5/examples/button_group/button_toolbar/_example.html.erb +3 -0
  35. data/app/views/bs5/examples/button_group/button_toolbar/snippet.html.erb +18 -0
  36. data/app/views/bs5/examples/button_group/button_toolbar/snippet2.html.erb +27 -0
  37. data/app/views/bs5/examples/button_group/default/_example.html.erb +2 -0
  38. data/app/views/bs5/examples/button_group/default/snippet.html.erb +5 -0
  39. data/app/views/bs5/examples/button_group/sizing/_example.html.erb +2 -0
  40. data/app/views/bs5/examples/button_group/sizing/snippet.html.erb +17 -0
  41. data/app/views/bs5/examples/button_group/vertical/_example.html.erb +2 -0
  42. data/app/views/bs5/examples/button_group/vertical/snippet.html.erb +8 -0
  43. data/app/views/bs5/examples/buttons/button_tag/outline/snippet.html.erb +9 -9
  44. data/app/views/bs5/examples/buttons/button_tag/size/large.html.erb +2 -2
  45. data/app/views/bs5/examples/buttons/button_tag/size/small.html.erb +2 -2
  46. data/app/views/bs5/examples/buttons/button_tag/style/snippet.html.erb +9 -9
  47. data/app/views/bs5/examples/buttons/button_to/default/snippet.html.erb +3 -3
  48. data/app/views/bs5/examples/list_group/actionable/button.html.erb +5 -5
  49. data/app/views/bs5/examples/list_group/actionable/snippet.html.erb +5 -5
  50. data/app/views/bs5/examples/list_group/active/snippet.html.erb +5 -5
  51. data/app/views/bs5/examples/list_group/checkboxes_and_radios/default.html.erb +5 -5
  52. data/app/views/bs5/examples/list_group/checkboxes_and_radios/with_labels.html.erb +5 -5
  53. data/app/views/bs5/examples/list_group/custom_content/default.html.erb +3 -3
  54. data/app/views/bs5/examples/list_group/default/snippet.html.erb +5 -5
  55. data/app/views/bs5/examples/list_group/disabled/snippet.html.erb +5 -5
  56. data/app/views/bs5/examples/list_group/flush/snippet.html.erb +5 -5
  57. data/app/views/bs5/examples/list_group/horizontal/snippet.html.erb +18 -18
  58. data/app/views/bs5/examples/list_group/style/actionable.html.erb +9 -9
  59. data/app/views/bs5/examples/list_group/style/default.html.erb +9 -9
  60. data/app/views/bs5/examples/list_group/with_badges/default.html.erb +6 -6
  61. data/app/views/bs5/examples/popovers/default/_example.html.erb +2 -0
  62. data/app/views/bs5/examples/popovers/default/snippet.html.erb +1 -0
  63. data/app/views/bs5/examples/popovers/disabled_elements/_example.html.erb +2 -0
  64. data/app/views/bs5/examples/popovers/disabled_elements/snippet.html.erb +3 -0
  65. data/app/views/bs5/examples/popovers/dismissable_on_next_click/_example.html.erb +2 -0
  66. data/app/views/bs5/examples/popovers/dismissable_on_next_click/snippet.html.erb +1 -0
  67. data/app/views/bs5/examples/popovers/four_directions/_example.html.erb +2 -0
  68. data/app/views/bs5/examples/popovers/four_directions/snippet.html.erb +7 -0
  69. data/app/views/bs5/examples/spinners/border/_example.html.erb +2 -0
  70. data/app/views/bs5/examples/spinners/border/snippet.html.erb +1 -0
  71. data/app/views/bs5/examples/spinners/buttons/_example.html.erb +2 -0
  72. data/app/views/bs5/examples/spinners/buttons/snippet.html.erb +15 -0
  73. data/app/views/bs5/examples/spinners/colors/_example.html.erb +2 -0
  74. data/app/views/bs5/examples/spinners/colors/snippet.html.erb +16 -0
  75. data/app/views/bs5/examples/spinners/growing/_example.html.erb +3 -0
  76. data/app/views/bs5/examples/spinners/growing/colors.html.erb +16 -0
  77. data/app/views/bs5/examples/spinners/growing/snippet.html.erb +1 -0
  78. data/app/views/bs5/examples/spinners/options/_example.html.erb +10 -0
  79. data/app/views/bs5/examples/spinners/options/floats.html.erb +3 -0
  80. data/app/views/bs5/examples/spinners/options/margin.html.erb +1 -0
  81. data/app/views/bs5/examples/spinners/options/placement_flex1.html.erb +3 -0
  82. data/app/views/bs5/examples/spinners/options/placement_flex2.html.erb +4 -0
  83. data/app/views/bs5/examples/spinners/options/text_align.html.erb +3 -0
  84. data/app/views/bs5/examples/spinners/size/_example.html.erb +3 -0
  85. data/app/views/bs5/examples/spinners/size/size1.html.erb +7 -0
  86. data/app/views/bs5/examples/spinners/size/size2.html.erb +3 -0
  87. data/app/views/bs5/examples/tooltips/default/buttons.html.erb +5 -5
  88. data/app/views/bs5/pages/alert.html.erb +1 -1
  89. data/app/views/bs5/pages/badge.html.erb +1 -1
  90. data/app/views/bs5/pages/button_group.html.erb +5 -0
  91. data/app/views/bs5/pages/popovers.html.erb +5 -0
  92. data/app/views/bs5/pages/spinners.html.erb +7 -0
  93. data/app/views/layouts/bs5/pages.html.erb +12 -9
  94. data/config/initializers/hash_refinement.rb +9 -0
  95. data/lib/bs5/version.rb +1 -1
  96. data/lib/generators/bs5/install/templates/bs5.js +11 -1
  97. metadata +67 -19
  98. data/app/views/bs5/examples/alert/style/_example.html.erb +0 -2
  99. data/app/views/bs5/examples/badge/style/_example.html.erb +0 -2
  100. data/app/views/bs5/examples/badge/style/snippet.html.erb +0 -8
@@ -1,11 +1,11 @@
1
1
  <div class="d-grid gap-2 d-md-flex">
2
2
  <%= bs5_button_to('New', 'http://www.example.com') %>
3
3
 
4
- <%= bs5_button_to('http://www.example.com', style: :success) do %>
4
+ <%= bs5_button_to('http://www.example.com', color: :success) do %>
5
5
  Make happy <strong>John Doe</strong>
6
6
  <%- end %>
7
7
 
8
- <%= bs5_button_to('New', 'http://www.example.com', style: :dark, outline: true, size: :large, form_class: 'new-thing') %>
8
+ <%= bs5_button_to('New', 'http://www.example.com', color: :dark, outline: true, size: :large, form_class: 'new-thing') %>
9
9
 
10
- <%= bs5_button_to('Destroy', 'http://www.example.com', style: :danger, method: "delete", remote: true, data: { confirm: 'Are you sure?', disable_with: 'loading...' }) %>
10
+ <%= bs5_button_to('Destroy', 'http://www.example.com', color: :danger, method: "delete", remote: true, data: { confirm: 'Are you sure?', disable_with: 'loading...' }) %>
11
11
  </div>
@@ -1,7 +1,7 @@
1
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 %>
2
+ <% lg.item(active: true) do %><%= button_tag 'Cras justo odio' %><% end %>
3
+ <% lg.item do %><%= button_tag 'Dapibus ac facilisis in' %><% end %>
4
+ <% lg.item do %><%= button_tag 'Morbi leo risus' %><% end %>
5
+ <% lg.item do %><%= button_tag 'Porta ac consectetur ac' %><% end %>
6
+ <% lg.item(disabled: true) do %><%= button_tag 'Vestibulum at eros' %><% end %>
7
7
  <%- end %>
@@ -1,7 +1,7 @@
1
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 %>
2
+ <% lg.item(active: true) do %><%= link_to 'Cras justo odio', '#' %><% end %>
3
+ <% lg.item do %><%= link_to 'Dapibus ac facilisis in', '#' %><% end %>
4
+ <% lg.item do %><%= link_to 'Morbi leo risus', '#' %><% end %>
5
+ <% lg.item do %><%= link_to 'Porta ac consectetur ac', '#' %><% end %>
6
+ <% lg.item(disabled: true) do %><%= link_to 'Vestibulum at eros', '#' %><% end %>
7
7
  <%- end %>
@@ -1,7 +1,7 @@
1
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 %>
2
+ <% lg.item(active: true) do %>Cras justo odio<% end %>
3
+ <% lg.item do %>Dapibus ac facilisis in<% end %>
4
+ <% lg.item do %>Morbi leo risus<% end %>
5
+ <% lg.item do %>Porta ac consectetur ac<% end %>
6
+ <% lg.item do %>Vestibulum at eros<% end %>
7
7
  <%- end %>
@@ -1,21 +1,21 @@
1
1
  <%= bs5_list_group do |lg| %>
2
- <% lg.slot(:item) do %>
2
+ <% lg.item do %>
3
3
  <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
4
4
  Cras justo odio
5
5
  <% end %>
6
- <% lg.slot(:item) do %>
6
+ <% lg.item do %>
7
7
  <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
8
8
  Dapibus ac facilisis in
9
9
  <% end %>
10
- <% lg.slot(:item) do %>
10
+ <% lg.item do %>
11
11
  <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
12
12
  Morbi leo risus
13
13
  <% end %>
14
- <% lg.slot(:item) do %>
14
+ <% lg.item do %>
15
15
  <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
16
16
  Porta ac consectetur ac
17
17
  <% end %>
18
- <% lg.slot(:item) do %>
18
+ <% lg.item do %>
19
19
  <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
20
20
  Vestibulum at eros
21
21
  <% end %>
@@ -1,29 +1,29 @@
1
1
  <%= bs5_list_group do |lg| %>
2
- <% lg.slot(:item) do %>
2
+ <% lg.item do %>
3
3
  <%= label_tag do %>
4
4
  <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
5
5
  Cras justo odio
6
6
  <% end %>
7
7
  <% end %>
8
- <% lg.slot(:item) do %>
8
+ <% lg.item do %>
9
9
  <%= label_tag do %>
10
10
  <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
11
11
  Dapibus ac facilisis in
12
12
  <% end %>
13
13
  <% end %>
14
- <% lg.slot(:item) do %>
14
+ <% lg.item do %>
15
15
  <%= label_tag do %>
16
16
  <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
17
17
  Morbi leo risus
18
18
  <% end %>
19
19
  <% end %>
20
- <% lg.slot(:item) do %>
20
+ <% lg.item do %>
21
21
  <%= label_tag do %>
22
22
  <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
23
23
  Porta ac consectetur ac
24
24
  <% end %>
25
25
  <% end %>
26
- <% lg.slot(:item) do %>
26
+ <% lg.item do %>
27
27
  <%= label_tag do %>
28
28
  <%= check_box_tag nil, nil, false, class: 'form-check-input mr-1', aria: { label: '...' } %>
29
29
  Vestibulum at eros
@@ -1,5 +1,5 @@
1
1
  <%= bs5_list_group do |lg| %>
2
- <% lg.slot(:item, active: true) do %>
2
+ <% lg.item(active: true) do %>
3
3
  <%= link_to '#' do %>
4
4
  <div class="d-flex w-100 justify-content-between">
5
5
  <h5 class="mb-1">List group item heading</h5>
@@ -9,7 +9,7 @@
9
9
  <small>Donec id elit non mi porta.</small>
10
10
  <% end %>
11
11
  <% end %>
12
- <% lg.slot(:item) do %>
12
+ <% lg.item do %>
13
13
  <%= link_to '#' do %>
14
14
  <div class="d-flex w-100 justify-content-between">
15
15
  <h5 class="mb-1">List group item heading</h5>
@@ -19,7 +19,7 @@
19
19
  <small class="text-muted">Donec id elit non mi porta.</small>
20
20
  <% end %>
21
21
  <% end %>
22
- <% lg.slot(:item) do %>
22
+ <% lg.item do %>
23
23
  <%= link_to '#' do %>
24
24
  <div class="d-flex w-100 justify-content-between">
25
25
  <h5 class="mb-1">List group item heading</h5>
@@ -1,7 +1,7 @@
1
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 %>
2
+ <% lg.item do %>Cras justo odio<% end %>
3
+ <% lg.item do %>Dapibus ac facilisis in<% end %>
4
+ <% lg.item do %>Morbi leo risus<% end %>
5
+ <% lg.item do %>Porta ac consectetur ac<% end %>
6
+ <% lg.item do %>Vestibulum at eros<% end %>
7
7
  <%- end %>
@@ -1,7 +1,7 @@
1
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 %>
2
+ <% lg.item(disabled: true) do %>Cras justo odio<% end %>
3
+ <% lg.item do %>Dapibus ac facilisis in<% end %>
4
+ <% lg.item do %>Morbi leo risus<% end %>
5
+ <% lg.item do %>Porta ac consectetur ac<% end %>
6
+ <% lg.item do %>Vestibulum at eros<% end %>
7
7
  <%- end %>
@@ -1,7 +1,7 @@
1
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 %>
2
+ <% lg.item do %>Cras justo odio<% end %>
3
+ <% lg.item do %>Dapibus ac facilisis in<% end %>
4
+ <% lg.item do %>Morbi leo risus<% end %>
5
+ <% lg.item do %>Porta ac consectetur ac<% end %>
6
+ <% lg.item do %>Vestibulum at eros<% end %>
7
7
  <%- end %>
@@ -1,30 +1,30 @@
1
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 %>
2
+ <% lg.item do %>Cras justo odio<% end %>
3
+ <% lg.item do %>Dapibus ac facilisis in<% end %>
4
+ <% lg.item do %>Morbi leo risus<% end %>
5
5
  <%- end %>
6
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 %>
7
+ <% lg.item do %>Cras justo odio<% end %>
8
+ <% lg.item do %>Dapibus ac facilisis in<% end %>
9
+ <% lg.item do %>Morbi leo risus<% end %>
10
10
  <%- end %>
11
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 %>
12
+ <% lg.item do %>Cras justo odio<% end %>
13
+ <% lg.item do %>Dapibus ac facilisis in<% end %>
14
+ <% lg.item do %>Morbi leo risus<% end %>
15
15
  <%- end %>
16
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 %>
17
+ <% lg.item do %>Cras justo odio<% end %>
18
+ <% lg.item do %>Dapibus ac facilisis in<% end %>
19
+ <% lg.item do %>Morbi leo risus<% end %>
20
20
  <%- end %>
21
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 %>
22
+ <% lg.item do %>Cras justo odio<% end %>
23
+ <% lg.item do %>Dapibus ac facilisis in<% end %>
24
+ <% lg.item do %>Morbi leo risus<% end %>
25
25
  <%- end %>
26
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 %>
27
+ <% lg.item do %>Cras justo odio<% end %>
28
+ <% lg.item do %>Dapibus ac facilisis in<% end %>
29
+ <% lg.item do %>Morbi leo risus<% end %>
30
30
  <%- end %>
@@ -1,11 +1,11 @@
1
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 %>
2
+ <% lg.item do %><%= link_to 'Dapibus ac facilisis in', '#' %><% end %>
3
+ <% lg.item(color: :primary) do %><%= link_to 'A simple primary list group item', '#' %><% end %>
4
+ <% lg.item(color: :secondary) do %><%= link_to 'A simple secondary list group item', '#' %><% end %>
5
+ <% lg.item(color: :success) do %><%= link_to 'A simple success list group item', '#' %><% end %>
6
+ <% lg.item(color: :danger) do %><%= link_to 'A simple danger list group item', '#' %><% end %>
7
+ <% lg.item(color: :warning) do %><%= link_to 'A simple warning list group item', '#' %><% end %>
8
+ <% lg.item(color: :info) do %><%= link_to 'A simple info list group item', '#' %><% end %>
9
+ <% lg.item(color: :light) do %><%= link_to 'A simple light list group item', '#' %><% end %>
10
+ <% lg.item(color: :dark) do %><%= link_to 'A simple dark list group item', '#' %><% end %>
11
11
  <%- end %>
@@ -1,11 +1,11 @@
1
1
  <%= bs5_list_group do |lg| %>
2
- <% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
3
- <% lg.slot(:item, style: :primary) do %>A simple primary list group item<% end %>
4
- <% lg.slot(:item, style: :secondary) do %>A simple secondary list group item<% end %>
5
- <% lg.slot(:item, style: :success) do %>A simple success list group item<% end %>
6
- <% lg.slot(:item, style: :danger) do %>A simple danger list group item<% end %>
7
- <% lg.slot(:item, style: :warning) do %>A simple warning list group item<% end %>
8
- <% lg.slot(:item, style: :info) do %>A simple info list group item<% end %>
9
- <% lg.slot(:item, style: :light) do %>A simple light list group item<% end %>
10
- <% lg.slot(:item, style: :dark) do %>A simple dark list group item<% end %>
2
+ <% lg.item do %>Dapibus ac facilisis in<% end %>
3
+ <% lg.item(color: :primary) do %>A simple primary list group item<% end %>
4
+ <% lg.item(color: :secondary) do %>A simple secondary list group item<% end %>
5
+ <% lg.item(color: :success) do %>A simple success list group item<% end %>
6
+ <% lg.item(color: :danger) do %>A simple danger list group item<% end %>
7
+ <% lg.item(color: :warning) do %>A simple warning list group item<% end %>
8
+ <% lg.item(color: :info) do %>A simple info list group item<% end %>
9
+ <% lg.item(color: :light) do %>A simple light list group item<% end %>
10
+ <% lg.item(color: :dark) do %>A simple dark list group item<% end %>
11
11
  <%- end %>
@@ -1,14 +1,14 @@
1
1
  <%= bs5_list_group do |lg| %>
2
- <% lg.slot(:item, class: 'd-flex justify-content-between align-items-center') do %>
2
+ <% lg.item(class: 'd-flex justify-content-between align-items-center') do %>
3
3
  Cras justo odio
4
- <%= bs5_badge(text: 14, style: :primary, pill: true) %>
4
+ <%= bs5_badge(text: 14, color: :primary, pill: true) %>
5
5
  <% end %>
6
- <% lg.slot(:item, class: 'd-flex justify-content-between align-items-center') do %>
6
+ <% lg.item(class: 'd-flex justify-content-between align-items-center') do %>
7
7
  Dapibus ac facilisis in
8
- <%= bs5_badge(text: 2, style: :primary, pill: true) %>
8
+ <%= bs5_badge(text: 2, color: :primary, pill: true) %>
9
9
  <% end %>
10
- <% lg.slot(:item, class: 'd-flex justify-content-between align-items-center') do %>
10
+ <% lg.item(class: 'd-flex justify-content-between align-items-center') do %>
11
11
  Morbi leo risus
12
- <%= bs5_badge(text: 1, style: :primary, pill: true) %>
12
+ <%= bs5_badge(text: 1, color: :primary, pill: true) %>
13
13
  <% end %>
14
14
  <%- end %>
@@ -0,0 +1,2 @@
1
+ <h2>Example</h2>
2
+ <%= bs5_example(snippet: 'popovers/default/snippet') %>
@@ -0,0 +1 @@
1
+ <%= bs5_button_tag('Click to toggle popover', bs5_popover(title: 'Popover title', content: "And here's some amazing content. It's very engaging. Right?").merge(type: 'button', color: :danger, size: :large)) %>
@@ -0,0 +1,2 @@
1
+ <h2>Disabled elements</h2>
2
+ <%= bs5_example(snippet: 'popovers/disabled_elements/snippet') %>
@@ -0,0 +1,3 @@
1
+ <%= tag.span(bs5_popover(content: 'Disabled popover').merge(class: 'd-inline-block')) do %>
2
+ <%= bs5_button_tag('Disabled button', disabled: true) %>
3
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <h2>Dismissable on next click</h2>
2
+ <%= bs5_example(snippet: 'popovers/dismissable_on_next_click/snippet') %>
@@ -0,0 +1 @@
1
+ <%= tag.a 'Dismissible popover', bs5_popover(title: 'Dismissible popover', content: "And here's some amazing content. It's very engaging. Right?", trigger: :focus).merge(class: 'btn btn-lg btn-danger', role: :button, tabindex: 0) %>
@@ -0,0 +1,2 @@
1
+ <h2>Four directions</h2>
2
+ <%= bs5_example(snippet: 'popovers/four_directions/snippet') %>
@@ -0,0 +1,7 @@
1
+ <%= bs5_button_tag('Popover on top', bs5_popover(content: "Vivamus sagittis lacus vel augue laoreet rutrum faucibus.", container: :body, placement: :top).merge(type: 'button', color: :secondary)) %>
2
+
3
+ <%= bs5_button_tag('Popover on right', bs5_popover(content: "Vivamus sagittis lacus vel augue laoreet rutrum faucibus.", container: :body, placement: :right).merge(type: 'button', color: :secondary)) %>
4
+
5
+ <%= bs5_button_tag('Popover on bottom', bs5_popover(content: "Vivamus sagittis lacus vel augue laoreet rutrum faucibus.", container: :body, placement: :bottom).merge(type: 'button', color: :secondary)) %>
6
+
7
+ <%= bs5_button_tag('Popover on left', bs5_popover(content: "Vivamus sagittis lacus vel augue laoreet rutrum faucibus.", container: :body, placement: :left).merge(type: 'button', color: :secondary)) %>
@@ -0,0 +1,2 @@
1
+ <h2>Border spinner</h2>
2
+ <%= bs5_example(snippet: 'spinners/border/snippet') %>
@@ -0,0 +1 @@
1
+ <%= bs5_spinner(text: 'Loading...') %>
@@ -0,0 +1,2 @@
1
+ <h2>Buttons</h2>
2
+ <%= bs5_example(snippet: 'spinners/buttons/snippet') %>
@@ -0,0 +1,15 @@
1
+ <%= bs5_button_tag(disabled: true) do %>
2
+ <%= bs5_spinner(text: 'Loading...', size: :small) %>
3
+ <% end %>
4
+
5
+ <%= bs5_button_tag(disabled: true) do %>
6
+ <%= bs5_spinner(size: :small) %> Loading...
7
+ <% end %>
8
+
9
+ <%= bs5_button_tag(disabled: true) do %>
10
+ <%= bs5_spinner(text: 'Loading...', grow: true, size: :small) %>
11
+ <% end %>
12
+
13
+ <%= bs5_button_tag(disabled: true) do %>
14
+ <%= bs5_spinner(grow: true, size: :small) %> Loading...
15
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <h2>Colors</h2>
2
+ <%= bs5_example(snippet: 'spinners/colors/snippet') %>
@@ -0,0 +1,16 @@
1
+ <%= bs5_spinner(text: 'Loading...', color: :primary) %>
2
+
3
+ <%= bs5_spinner(text: 'Loading...', color: :secondary) %>
4
+
5
+ <%= bs5_spinner(text: 'Loading...', color: :success) %>
6
+
7
+ <%= bs5_spinner(text: 'Loading...', color: :danger) %>
8
+
9
+ <%= bs5_spinner(text: 'Loading...', color: :warning) %>
10
+
11
+ <%= bs5_spinner(text: 'Loading...', color: :info) %>
12
+
13
+ <%= bs5_spinner(text: 'Loading...', color: :light) %>
14
+
15
+ <%= bs5_spinner(text: 'Loading...', color: :dark) %>
16
+
@@ -0,0 +1,3 @@
1
+ <h2>Growing spinner</h2>
2
+ <%= bs5_example(snippet: 'spinners/growing/snippet') %>
3
+ <%= bs5_example(snippet: 'spinners/growing/colors') %>
@@ -0,0 +1,16 @@
1
+ <%= bs5_spinner(text: 'Loading...', color: :primary, grow: true) %>
2
+
3
+ <%= bs5_spinner(text: 'Loading...', color: :secondary, grow: true) %>
4
+
5
+ <%= bs5_spinner(text: 'Loading...', color: :success, grow: true) %>
6
+
7
+ <%= bs5_spinner(text: 'Loading...', color: :danger, grow: true) %>
8
+
9
+ <%= bs5_spinner(text: 'Loading...', color: :warning, grow: true) %>
10
+
11
+ <%= bs5_spinner(text: 'Loading...', color: :info, grow: true) %>
12
+
13
+ <%= bs5_spinner(text: 'Loading...', color: :light, grow: true) %>
14
+
15
+ <%= bs5_spinner(text: 'Loading...', color: :dark, grow: true) %>
16
+
@@ -0,0 +1 @@
1
+ <%= bs5_spinner(text: 'Loading...', grow: true) %>
@@ -0,0 +1,10 @@
1
+ <h2>Alignment</h2>
2
+ <h3>Margin</h3>
3
+ <%= bs5_example(snippet: 'spinners/options/margin') %>
4
+ <h3>Placement</h3>
5
+ <h4>Flex</h4>
6
+ <%= bs5_example(snippet: 'spinners/options/placement_flex1') %>
7
+ <%= bs5_example(snippet: 'spinners/options/placement_flex2') %>
8
+ <h4>Floats</h4>
9
+ <%= bs5_example(snippet: 'spinners/options/floats') %>
10
+ <%= bs5_example(snippet: 'spinners/options/text_align') %>
@@ -0,0 +1,3 @@
1
+ <div class="clearfix">
2
+ <%= bs5_spinner(class: 'float-end', text: 'Loading...') %>
3
+ </div>
@@ -0,0 +1 @@
1
+ <%= bs5_spinner(text: 'Loading...', class: 'm-5') %>
@@ -0,0 +1,3 @@
1
+ <div class="d-flex justify-content-center">
2
+ <%= bs5_spinner(text: 'Loading...') %>
3
+ </div>
@@ -0,0 +1,4 @@
1
+ <div class="d-flex align-items-center">
2
+ <strong>Loading...</strong>
3
+ <%= bs5_spinner(class: 'ms-auto', aria: { hidden: true }) %>
4
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="text-center">
2
+ <%= bs5_spinner(text: 'Loading...') %>
3
+ </div>