bs5 0.0.18 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/bs5_manifest.js +1 -0
  3. data/app/assets/javascripts/bs5/application.js +13 -0
  4. data/app/components/bs5/accordion_component.html.erb +1 -1
  5. data/app/components/bs5/accordion_component.rb +7 -3
  6. data/app/components/bs5/alert_component.rb +5 -5
  7. data/app/components/bs5/badge_component.rb +6 -6
  8. data/app/components/bs5/breadcrumb_component.html.erb +1 -1
  9. data/app/components/bs5/breadcrumb_component.rb +6 -3
  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/example_component.html.erb +2 -1
  13. data/app/components/bs5/list_group_component.html.erb +2 -2
  14. data/app/components/bs5/list_group_component.rb +16 -9
  15. data/app/components/bs5/spinner_component.html.erb +5 -0
  16. data/app/components/bs5/spinner_component.rb +65 -0
  17. data/app/helpers/bs5/components_helper.rb +1 -1
  18. data/app/views/bs5/examples/accordion/default/snippet.html.erb +4 -4
  19. data/app/views/bs5/examples/accordion/flush/snippet.html.erb +4 -4
  20. data/app/views/bs5/examples/alert/additional_content/snippet.html.erb +1 -1
  21. data/app/views/bs5/examples/alert/color/_example.html.erb +1 -0
  22. data/app/views/bs5/examples/alert/{style → color}/snippet.html.erb +8 -8
  23. data/app/views/bs5/examples/alert/dismissable/snippet.html.erb +1 -1
  24. data/app/views/bs5/examples/badge/color/_example.html.erb +2 -0
  25. data/app/views/bs5/examples/badge/color/snippet.html.erb +8 -0
  26. data/app/views/bs5/examples/badge/default/_example.html.erb +2 -1
  27. data/app/views/bs5/examples/badge/default/button.html.erb +3 -0
  28. data/app/views/bs5/examples/badge/pill/snippet.html.erb +8 -8
  29. data/app/views/bs5/examples/breadcrumb/default/snippet.html.erb +9 -9
  30. data/app/views/bs5/examples/button_group/button_toolbar/snippet.html.erb +4 -4
  31. data/app/views/bs5/examples/button_group/button_toolbar/snippet2.html.erb +8 -8
  32. data/app/views/bs5/examples/button_group/sizing/snippet.html.erb +9 -9
  33. data/app/views/bs5/examples/button_group/vertical/snippet.html.erb +6 -6
  34. data/app/views/bs5/examples/buttons/button_tag/outline/snippet.html.erb +9 -9
  35. data/app/views/bs5/examples/buttons/button_tag/size/large.html.erb +2 -2
  36. data/app/views/bs5/examples/buttons/button_tag/size/small.html.erb +2 -2
  37. data/app/views/bs5/examples/buttons/button_tag/style/snippet.html.erb +9 -9
  38. data/app/views/bs5/examples/buttons/button_to/default/snippet.html.erb +3 -3
  39. data/app/views/bs5/examples/list_group/actionable/button.html.erb +5 -5
  40. data/app/views/bs5/examples/list_group/actionable/snippet.html.erb +5 -5
  41. data/app/views/bs5/examples/list_group/active/snippet.html.erb +5 -5
  42. data/app/views/bs5/examples/list_group/checkboxes_and_radios/default.html.erb +5 -5
  43. data/app/views/bs5/examples/list_group/checkboxes_and_radios/with_labels.html.erb +5 -5
  44. data/app/views/bs5/examples/list_group/custom_content/default.html.erb +3 -3
  45. data/app/views/bs5/examples/list_group/default/snippet.html.erb +5 -5
  46. data/app/views/bs5/examples/list_group/disabled/snippet.html.erb +5 -5
  47. data/app/views/bs5/examples/list_group/flush/snippet.html.erb +5 -5
  48. data/app/views/bs5/examples/list_group/horizontal/snippet.html.erb +18 -18
  49. data/app/views/bs5/examples/list_group/style/actionable.html.erb +9 -9
  50. data/app/views/bs5/examples/list_group/style/default.html.erb +9 -9
  51. data/app/views/bs5/examples/list_group/with_badges/default.html.erb +6 -6
  52. data/app/views/bs5/examples/popovers/default/snippet.html.erb +1 -1
  53. data/app/views/bs5/examples/popovers/four_directions/snippet.html.erb +4 -4
  54. data/app/views/bs5/examples/spinners/border/_example.html.erb +2 -0
  55. data/app/views/bs5/examples/spinners/border/snippet.html.erb +1 -0
  56. data/app/views/bs5/examples/spinners/buttons/_example.html.erb +2 -0
  57. data/app/views/bs5/examples/spinners/buttons/snippet.html.erb +15 -0
  58. data/app/views/bs5/examples/spinners/colors/_example.html.erb +2 -0
  59. data/app/views/bs5/examples/spinners/colors/snippet.html.erb +16 -0
  60. data/app/views/bs5/examples/spinners/growing/_example.html.erb +3 -0
  61. data/app/views/bs5/examples/spinners/growing/colors.html.erb +16 -0
  62. data/app/views/bs5/examples/spinners/growing/snippet.html.erb +1 -0
  63. data/app/views/bs5/examples/spinners/options/_example.html.erb +10 -0
  64. data/app/views/bs5/examples/spinners/options/floats.html.erb +3 -0
  65. data/app/views/bs5/examples/spinners/options/margin.html.erb +1 -0
  66. data/app/views/bs5/examples/spinners/options/placement_flex1.html.erb +3 -0
  67. data/app/views/bs5/examples/spinners/options/placement_flex2.html.erb +4 -0
  68. data/app/views/bs5/examples/spinners/options/text_align.html.erb +3 -0
  69. data/app/views/bs5/examples/spinners/size/_example.html.erb +3 -0
  70. data/app/views/bs5/examples/spinners/size/size1.html.erb +7 -0
  71. data/app/views/bs5/examples/spinners/size/size2.html.erb +3 -0
  72. data/app/views/bs5/examples/tooltips/default/buttons.html.erb +5 -5
  73. data/app/views/bs5/pages/alert.html.erb +1 -1
  74. data/app/views/bs5/pages/badge.html.erb +1 -1
  75. data/app/views/bs5/pages/spinners.html.erb +7 -0
  76. data/app/views/layouts/bs5/pages.html.erb +13 -11
  77. data/lib/bs5/engine.rb +6 -0
  78. data/lib/bs5/version.rb +1 -1
  79. metadata +31 -22
  80. data/app/views/bs5/examples/alert/style/_example.html.erb +0 -2
  81. data/app/views/bs5/examples/badge/style/_example.html.erb +0 -2
  82. data/app/views/bs5/examples/badge/style/snippet.html.erb +0 -8
@@ -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 %>
@@ -1 +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', style: :danger, size: :large)) %>
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)) %>
@@ -1,7 +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', style: :secondary)) %>
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
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', style: :secondary)) %>
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
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', style: :secondary)) %>
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
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', style: :secondary)) %>
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>
@@ -0,0 +1,3 @@
1
+ <h2>Size</h2>
2
+ <%= bs5_example(snippet: 'spinners/size/size1') %>
3
+ <%= bs5_example(snippet: 'spinners/size/size2') %>
@@ -0,0 +1,7 @@
1
+ <%= bs5_spinner(text: 'Loading...', size: :small) %>
2
+
3
+ <%= bs5_spinner(text: 'Loading...', size: :large) %>
4
+
5
+ <%= bs5_spinner(text: 'Loading...', size: :small, grow: true) %>
6
+
7
+ <%= bs5_spinner(text: 'Loading...', size: :large, grow: true) %>
@@ -0,0 +1,3 @@
1
+ <%= bs5_spinner(text: 'Loading...', style: 'width: 3rem; height: 3rem;') %>
2
+
3
+ <%= bs5_spinner(text: 'Loading...', grow: true, style: 'width: 3rem; height: 3rem;') %>
@@ -1,9 +1,9 @@
1
- <%= bs5_button_tag('Tooltip on top', bs5_tooltip('Tooltip on top', placement: :top).merge(style: :secondary)) %>
1
+ <%= bs5_button_tag('Tooltip on top', bs5_tooltip('Tooltip on top', placement: :top).merge(color: :secondary)) %>
2
2
 
3
- <%= bs5_button_tag('Tooltip on right', bs5_tooltip('Tooltip on right', placement: :right).merge(style: :secondary)) %>
3
+ <%= bs5_button_tag('Tooltip on right', bs5_tooltip('Tooltip on right', placement: :right).merge(color: :secondary)) %>
4
4
 
5
- <%= bs5_button_tag('Tooltip on bottom', bs5_tooltip('Tooltip on bottom', placement: :bottom).merge(style: :secondary)) %>
5
+ <%= bs5_button_tag('Tooltip on bottom', bs5_tooltip('Tooltip on bottom', placement: :bottom).merge(color: :secondary)) %>
6
6
 
7
- <%= bs5_button_tag('Tooltip on left', bs5_tooltip('Tooltip on left', placement: :left).merge(style: :secondary)) %>
7
+ <%= bs5_button_tag('Tooltip on left', bs5_tooltip('Tooltip on left', placement: :left).merge(color: :secondary)) %>
8
8
 
9
- <%= bs5_button_tag('Tooltip with HTML', bs5_tooltip('<em>Tooltip</em> <u>with</u> <b>HTML</b>', html: :true).merge(style: :secondary)) %>
9
+ <%= bs5_button_tag('Tooltip with HTML', bs5_tooltip('<em>Tooltip</em> <u>with</u> <b>HTML</b>', html: :true).merge(color: :secondary)) %>
@@ -1,5 +1,5 @@
1
1
  <h1 id='alert'>Alert</h1>
2
2
  <%= render 'bs5/examples/alert/default/example' %>
3
- <%= render 'bs5/examples/alert/style/example' %>
3
+ <%= render 'bs5/examples/alert/color/example' %>
4
4
  <%= render 'bs5/examples/alert/additional_content/example' %>
5
5
  <%= render 'bs5/examples/alert/dismissable/example' %>
@@ -1,4 +1,4 @@
1
1
  <h1 id='badge'>Badge</h1>
2
2
  <%= render 'bs5/examples/badge/default/example' %>
3
- <%= render 'bs5/examples/badge/style/example' %>
3
+ <%= render 'bs5/examples/badge/color/example' %>
4
4
  <%= render 'bs5/examples/badge/pill/example' %>
@@ -0,0 +1,7 @@
1
+ <h1>Spinners</h1>
2
+ <%= render 'bs5/examples/spinners/border/example' %>
3
+ <%= render 'bs5/examples/spinners/colors/example' %>
4
+ <%= render 'bs5/examples/spinners/growing/example' %>
5
+ <%= render 'bs5/examples/spinners/options/example' %>
6
+ <%= render 'bs5/examples/spinners/size/example' %>
7
+ <%= render 'bs5/examples/spinners/buttons/example' %>
@@ -4,6 +4,7 @@
4
4
  <title>Bs5</title>
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
7
+ <%= javascript_include_tag 'bs5/application', 'data-turbolinks-track': 'reload' %>
7
8
  <%= stylesheet_pack_tag 'styles', media: 'all', 'data-turbolinks-track': 'reload' %>
8
9
  <style><%= Rouge::Themes::Github.render(scope: '.highlight') %></style>
9
10
  </head>
@@ -13,17 +14,18 @@
13
14
  <div class="col">
14
15
  <div class="sticky-top">
15
16
  <%= bs5_list_group(flush: true) do |lg| %>
16
- <% lg.slot(:item, active: current_page?(pages_path('accordion'))) do %><%= link_to 'Accordion', pages_path('accordion') %><% end %>
17
- <% lg.slot(:item, active: current_page?(pages_path('alert'))) do %><%= link_to 'Alert', pages_path('alert') %><% end %>
18
- <% lg.slot(:item, active: current_page?(pages_path('badge'))) do %><%= link_to 'Badge', pages_path('badge') %><% end %>
19
- <% lg.slot(:item, active: current_page?(pages_path('breadcrumb'))) do %><%= link_to 'Breadcrumb', pages_path('breadcrumb') %><% end %>
20
- <% lg.slot(:item, active: current_page?(pages_path('buttons'))) do %><%= link_to 'Buttons', pages_path('buttons') %><% end %>
21
- <% lg.slot(:item, active: current_page?(pages_path('button_group'))) do %><%= link_to 'Button group', pages_path('button_group') %><% end %>
22
- <% lg.slot(:item, active: current_page?(pages_path('close_button'))) do %><%= link_to 'Close button', pages_path('close_button') %><% end %>
23
- <% lg.slot(:item, active: current_page?(pages_path('collapse'))) do %><%= link_to 'Collapse', pages_path('collapse') %><% end %>
24
- <% lg.slot(:item, active: current_page?(pages_path('list_group'))) do %><%= link_to 'List group', pages_path('list_group') %><% end %>
25
- <% lg.slot(:item, active: current_page?(pages_path('popovers'))) do %><%= link_to 'Popovers', pages_path('popovers') %><% end %>
26
- <% lg.slot(:item, active: current_page?(pages_path('tooltips'))) do %><%= link_to 'Tooltips', pages_path('tooltips') %><% end %>
17
+ <% lg.item(active: current_page?(pages_path('accordion'))) do %><%= link_to 'Accordion', pages_path('accordion') %><% end %>
18
+ <% lg.item(active: current_page?(pages_path('alert'))) do %><%= link_to 'Alert', pages_path('alert') %><% end %>
19
+ <% lg.item(active: current_page?(pages_path('badge'))) do %><%= link_to 'Badge', pages_path('badge') %><% end %>
20
+ <% lg.item(active: current_page?(pages_path('breadcrumb'))) do %><%= link_to 'Breadcrumb', pages_path('breadcrumb') %><% end %>
21
+ <% lg.item(active: current_page?(pages_path('buttons'))) do %><%= link_to 'Buttons', pages_path('buttons') %><% end %>
22
+ <% lg.item(active: current_page?(pages_path('button_group'))) do %><%= link_to 'Button group', pages_path('button_group') %><% end %>
23
+ <% lg.item(active: current_page?(pages_path('close_button'))) do %><%= link_to 'Close button', pages_path('close_button') %><% end %>
24
+ <% lg.item(active: current_page?(pages_path('collapse'))) do %><%= link_to 'Collapse', pages_path('collapse') %><% end %>
25
+ <% lg.item(active: current_page?(pages_path('list_group'))) do %><%= link_to 'List group', pages_path('list_group') %><% end %>
26
+ <% lg.item(active: current_page?(pages_path('popovers'))) do %><%= link_to 'Popovers', pages_path('popovers') %><% end %>
27
+ <% lg.item(active: current_page?(pages_path('spinners'))) do %><%= link_to 'Spinners', pages_path('spinners') %><% end %>
28
+ <% lg.item(active: current_page?(pages_path('tooltips'))) do %><%= link_to 'Tooltips', pages_path('tooltips') %><% end %>
27
29
  <%- end %>
28
30
  </div>
29
31
  </div>
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'view_component/engine'
4
+ require 'sprockets/railtie'
4
5
  module Bs5
5
6
  class Engine < ::Rails::Engine
6
7
  isolate_namespace Bs5
@@ -9,5 +10,10 @@ module Bs5
9
10
  config.before_configuration do |app|
10
11
  app.config.view_component.preview_paths << "#{Bs5::Engine.root}/spec/components/previews"
11
12
  end
13
+
14
+ initializer 'bs5.assets.precompile' do |app|
15
+ app.config.assets.paths << Rails.root.join('app/assets/javascripts')
16
+ app.config.assets.precompile << 'bs5/application.js'
17
+ end
12
18
  end
13
19
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bs5
4
- VERSION = '0.0.18'
4
+ VERSION = '0.0.23'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bs5
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Baselier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-11 00:00:00.000000000 Z
11
+ date: 2020-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -58,34 +58,20 @@ dependencies:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: 3.25.0
61
- - !ruby/object:Gem::Dependency
62
- name: rubocop-rails
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '2.8'
68
- type: :runtime
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '2.8'
75
61
  - !ruby/object:Gem::Dependency
76
62
  name: view_component
77
63
  requirement: !ruby/object:Gem::Requirement
78
64
  requirements:
79
65
  - - "~>"
80
66
  - !ruby/object:Gem::Version
81
- version: 2.22.0
67
+ version: 2.23.0
82
68
  type: :runtime
83
69
  prerelease: false
84
70
  version_requirements: !ruby/object:Gem::Requirement
85
71
  requirements:
86
72
  - - "~>"
87
73
  - !ruby/object:Gem::Version
88
- version: 2.22.0
74
+ version: 2.23.0
89
75
  - !ruby/object:Gem::Dependency
90
76
  name: capybara
91
77
  requirement: !ruby/object:Gem::Requirement
@@ -139,6 +125,7 @@ files:
139
125
  - README.md
140
126
  - Rakefile
141
127
  - app/assets/config/bs5_manifest.js
128
+ - app/assets/javascripts/bs5/application.js
142
129
  - app/assets/stylesheets/bs5/application.css
143
130
  - app/components/bs5/accordion_component.html.erb
144
131
  - app/components/bs5/accordion_component.rb
@@ -160,6 +147,8 @@ files:
160
147
  - app/components/bs5/example_component.rb
161
148
  - app/components/bs5/list_group_component.html.erb
162
149
  - app/components/bs5/list_group_component.rb
150
+ - app/components/bs5/spinner_component.html.erb
151
+ - app/components/bs5/spinner_component.rb
163
152
  - app/controllers/bs5/application_controller.rb
164
153
  - app/controllers/bs5/pages_controller.rb
165
154
  - app/helpers/bs5/application_helper.rb
@@ -176,18 +165,19 @@ files:
176
165
  - app/views/bs5/examples/accordion/flush/snippet.html.erb
177
166
  - app/views/bs5/examples/alert/additional_content/_example.html.erb
178
167
  - app/views/bs5/examples/alert/additional_content/snippet.html.erb
168
+ - app/views/bs5/examples/alert/color/_example.html.erb
169
+ - app/views/bs5/examples/alert/color/snippet.html.erb
179
170
  - app/views/bs5/examples/alert/default/_example.html.erb
180
171
  - app/views/bs5/examples/alert/default/snippet.html.erb
181
172
  - app/views/bs5/examples/alert/dismissable/_example.html.erb
182
173
  - app/views/bs5/examples/alert/dismissable/snippet.html.erb
183
- - app/views/bs5/examples/alert/style/_example.html.erb
184
- - app/views/bs5/examples/alert/style/snippet.html.erb
174
+ - app/views/bs5/examples/badge/color/_example.html.erb
175
+ - app/views/bs5/examples/badge/color/snippet.html.erb
185
176
  - app/views/bs5/examples/badge/default/_example.html.erb
177
+ - app/views/bs5/examples/badge/default/button.html.erb
186
178
  - app/views/bs5/examples/badge/default/snippet.html.erb
187
179
  - app/views/bs5/examples/badge/pill/_example.html.erb
188
180
  - app/views/bs5/examples/badge/pill/snippet.html.erb
189
- - app/views/bs5/examples/badge/style/_example.html.erb
190
- - app/views/bs5/examples/badge/style/snippet.html.erb
191
181
  - app/views/bs5/examples/breadcrumb/default/_example.html.erb
192
182
  - app/views/bs5/examples/breadcrumb/default/snippet.html.erb
193
183
  - app/views/bs5/examples/button_group/button_toolbar/_example.html.erb
@@ -257,6 +247,24 @@ files:
257
247
  - app/views/bs5/examples/popovers/dismissable_on_next_click/snippet.html.erb
258
248
  - app/views/bs5/examples/popovers/four_directions/_example.html.erb
259
249
  - app/views/bs5/examples/popovers/four_directions/snippet.html.erb
250
+ - app/views/bs5/examples/spinners/border/_example.html.erb
251
+ - app/views/bs5/examples/spinners/border/snippet.html.erb
252
+ - app/views/bs5/examples/spinners/buttons/_example.html.erb
253
+ - app/views/bs5/examples/spinners/buttons/snippet.html.erb
254
+ - app/views/bs5/examples/spinners/colors/_example.html.erb
255
+ - app/views/bs5/examples/spinners/colors/snippet.html.erb
256
+ - app/views/bs5/examples/spinners/growing/_example.html.erb
257
+ - app/views/bs5/examples/spinners/growing/colors.html.erb
258
+ - app/views/bs5/examples/spinners/growing/snippet.html.erb
259
+ - app/views/bs5/examples/spinners/options/_example.html.erb
260
+ - app/views/bs5/examples/spinners/options/floats.html.erb
261
+ - app/views/bs5/examples/spinners/options/margin.html.erb
262
+ - app/views/bs5/examples/spinners/options/placement_flex1.html.erb
263
+ - app/views/bs5/examples/spinners/options/placement_flex2.html.erb
264
+ - app/views/bs5/examples/spinners/options/text_align.html.erb
265
+ - app/views/bs5/examples/spinners/size/_example.html.erb
266
+ - app/views/bs5/examples/spinners/size/size1.html.erb
267
+ - app/views/bs5/examples/spinners/size/size2.html.erb
260
268
  - app/views/bs5/examples/tooltips/default/_example.html.erb
261
269
  - app/views/bs5/examples/tooltips/default/buttons.html.erb
262
270
  - app/views/bs5/examples/tooltips/default/disabled_elements.html.erb
@@ -271,6 +279,7 @@ files:
271
279
  - app/views/bs5/pages/collapse.html.erb
272
280
  - app/views/bs5/pages/list_group.html.erb
273
281
  - app/views/bs5/pages/popovers.html.erb
282
+ - app/views/bs5/pages/spinners.html.erb
274
283
  - app/views/bs5/pages/tooltips.html.erb
275
284
  - app/views/layouts/bs5/application.html.erb
276
285
  - app/views/layouts/bs5/pages.html.erb