ui_bibz 3.0.12 → 4.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +3 -3
  3. data/.github/workflows/linter.yml +13 -12
  4. data/.overcommit.yml +6 -0
  5. data/.rubocop.yml +6 -0
  6. data/.ruby-version +1 -1
  7. data/Gemfile +19 -12
  8. data/Gemfile.lock +178 -138
  9. data/app/assets/config/ui_bibz.js +12 -0
  10. data/app/assets/javascripts/forms/formula.js +82 -0
  11. data/app/assets/javascripts/forms/input-connected.js +132 -0
  12. data/app/assets/javascripts/forms/jquery.multi-select-extend.js +52 -0
  13. data/app/assets/javascripts/forms.js +160 -0
  14. data/app/assets/javascripts/interfaces.js +56 -0
  15. data/app/assets/javascripts/tables.js +49 -0
  16. data/app/assets/javascripts/ui_bibz_js.js +37 -0
  17. data/app/assets/stylesheets/navigations/_nav.sass +2 -0
  18. data/app/assets/stylesheets/navigations/_navbar.sass +12 -0
  19. data/app/assets/stylesheets/navigations/_progress_bar.sass +2 -0
  20. data/app/assets/stylesheets/navigations/_toolbar.sass +3 -0
  21. data/app/assets/stylesheets/sass/_boxes.sass +1 -0
  22. data/app/assets/stylesheets/sass/_containers.sass +2 -0
  23. data/app/assets/stylesheets/sass/_fixes.sass +2 -0
  24. data/app/assets/stylesheets/sass/_forms.sass +8 -0
  25. data/app/assets/stylesheets/sass/_navigations.sass +4 -0
  26. data/app/assets/stylesheets/sass/_notifications.sass +4 -0
  27. data/app/assets/stylesheets/sass/_tables.sass +2 -0
  28. data/app/assets/stylesheets/sass/_variables_mixins_functions.sass +3 -0
  29. data/app/assets/stylesheets/sass/boxes/_card.sass +4 -0
  30. data/app/assets/stylesheets/sass/containers/_panel.scss +330 -0
  31. data/app/assets/stylesheets/sass/forms/_bootstrap_select.sass +5 -0
  32. data/app/assets/stylesheets/sass/forms/_button.sass +3 -0
  33. data/app/assets/stylesheets/sass/forms/_date_picker.sass +3 -0
  34. data/app/assets/stylesheets/sass/forms/_form_check.sass +10 -0
  35. data/app/assets/stylesheets/sass/forms/_formula_field.sass +17 -0
  36. data/app/assets/stylesheets/sass/forms/_multiselect.sass +44 -0
  37. data/app/assets/stylesheets/sass/forms/_range.sass +44 -0
  38. data/app/assets/stylesheets/sass/forms/_slider.sass +136 -0
  39. data/app/assets/stylesheets/sass/forms/_surround_field.sass +25 -0
  40. data/app/assets/stylesheets/sass/notifications/_badge.sass +5 -0
  41. data/app/assets/stylesheets/sass/notifications/_glyph.sass +3 -0
  42. data/app/assets/stylesheets/sass/notifications/_star.sass +2 -0
  43. data/app/assets/stylesheets/sass/notifications/_toast.sass +3 -0
  44. data/app/assets/stylesheets/sass/tables/_table.sass +39 -0
  45. data/app/assets/stylesheets/sass/tables/_table_card.sass +39 -0
  46. data/app/assets/stylesheets/ui_bibz.sass +26 -0
  47. data/bin/test +3 -5
  48. data/config/importmap.rb +19 -0
  49. data/config/initializers/assets.rb +5 -0
  50. data/config/initializers/will_paginate.rb +1 -3
  51. data/lib/ui_bibz/builders/data_html_options_builder.rb +118 -0
  52. data/lib/ui_bibz/builders/html_classes_builder.rb +89 -0
  53. data/lib/ui_bibz/builders/html_options_builder.rb +22 -0
  54. data/lib/ui_bibz/concerns/models/searchable.rb +1 -1
  55. data/lib/ui_bibz/factory_methods/component_initialize_factory_method.rb +33 -0
  56. data/lib/ui_bibz/helpers/ui/core/boxes_helper.rb +12 -12
  57. data/lib/ui_bibz/helpers/ui/core/forms_helper.rb +50 -50
  58. data/lib/ui_bibz/helpers/ui/core/icons_helper.rb +6 -6
  59. data/lib/ui_bibz/helpers/ui/core/layouts_helper.rb +2 -2
  60. data/lib/ui_bibz/helpers/ui/core/lists_helper.rb +2 -2
  61. data/lib/ui_bibz/helpers/ui/core/navigations_helper.rb +12 -12
  62. data/lib/ui_bibz/helpers/ui/core/notifications_helper.rb +4 -4
  63. data/lib/ui_bibz/helpers/ui/core/windows_helper.rb +10 -2
  64. data/lib/ui_bibz/helpers/ui/ux_helper.rb +2 -2
  65. data/lib/ui_bibz/helpers/utils_helper.rb +2 -2
  66. data/lib/ui_bibz/infos.rb +3 -3
  67. data/lib/ui_bibz/inputs/ui_bibz_form/ui_bibz_form_builder.rb +12 -12
  68. data/lib/ui_bibz/inputs/ui_bibz_inputs/collection_input.rb +1 -1
  69. data/lib/ui_bibz/rails/engine.rb +21 -4
  70. data/lib/ui_bibz/strategies/component_initialize_abstract_strategy.rb +27 -0
  71. data/lib/ui_bibz/strategies/component_initialize_block_strategy.rb +31 -0
  72. data/lib/ui_bibz/strategies/component_initialize_hash_strategy.rb +18 -0
  73. data/lib/ui_bibz/strategies/component_initialize_standard_strategy.rb +18 -0
  74. data/lib/ui_bibz/ui/concerns/card_itemable_concern.rb +4 -4
  75. data/lib/ui_bibz/ui/concerns/notification_concern.rb +1 -1
  76. data/lib/ui_bibz/ui/core/boxes/card.rb +1 -1
  77. data/lib/ui_bibz/ui/core/boxes/card_accordion.rb +4 -4
  78. data/lib/ui_bibz/ui/core/boxes/card_column.rb +1 -1
  79. data/lib/ui_bibz/ui/core/boxes/card_deck.rb +1 -1
  80. data/lib/ui_bibz/ui/core/boxes/card_grid.rb +0 -3
  81. data/lib/ui_bibz/ui/core/boxes/card_group.rb +1 -1
  82. data/lib/ui_bibz/ui/core/boxes/components/card_body.rb +9 -9
  83. data/lib/ui_bibz/ui/core/boxes/components/card_col.rb +2 -2
  84. data/lib/ui_bibz/ui/core/boxes/components/card_list_group.rb +1 -1
  85. data/lib/ui_bibz/ui/core/boxes/components/card_row.rb +1 -1
  86. data/lib/ui_bibz/ui/core/component.rb +13 -62
  87. data/lib/ui_bibz/ui/core/forms/buttons/button.rb +3 -1
  88. data/lib/ui_bibz/ui/core/forms/buttons/button_group.rb +11 -11
  89. data/lib/ui_bibz/ui/core/forms/choices/box_switch_field.rb +7 -7
  90. data/lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb +2 -2
  91. data/lib/ui_bibz/ui/core/forms/choices/choice_group.rb +5 -6
  92. data/lib/ui_bibz/ui/core/forms/choices/components/choice.rb +1 -1
  93. data/lib/ui_bibz/ui/core/forms/dates/date_picker_field.rb +15 -15
  94. data/lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_link.rb +1 -1
  95. data/lib/ui_bibz/ui/core/forms/dropdowns/dropdown.rb +5 -5
  96. data/lib/ui_bibz/ui/core/forms/numbers/slider_field.rb +1 -1
  97. data/lib/ui_bibz/ui/core/forms/selects/dropdown_select_field.rb +10 -10
  98. data/lib/ui_bibz/ui/core/forms/selects/multi_column_field.rb +2 -2
  99. data/lib/ui_bibz/ui/core/forms/surrounds/surround_field.rb +32 -32
  100. data/lib/ui_bibz/ui/core/forms/textareas/markdown_editor_field.rb +7 -8
  101. data/lib/ui_bibz/ui/core/icons/components/glyph_text.rb +1 -1
  102. data/lib/ui_bibz/ui/core/icons/glyph.rb +4 -3
  103. data/lib/ui_bibz/ui/core/layouts/row.rb +2 -2
  104. data/lib/ui_bibz/ui/core/lists/components/list.rb +4 -4
  105. data/lib/ui_bibz/ui/core/lists/list_group.rb +1 -1
  106. data/lib/ui_bibz/ui/core/navigations/breadcrumb.rb +6 -4
  107. data/lib/ui_bibz/ui/core/navigations/components/nav_link_span.rb +1 -2
  108. data/lib/ui_bibz/ui/core/navigations/components/navbar_form.rb +6 -5
  109. data/lib/ui_bibz/ui/core/navigations/components/toolbar_form.rb +2 -2
  110. data/lib/ui_bibz/ui/core/navigations/nav.rb +10 -6
  111. data/lib/ui_bibz/ui/core/navigations/navbar.rb +21 -19
  112. data/lib/ui_bibz/ui/core/navigations/pagination.rb +3 -3
  113. data/lib/ui_bibz/ui/core/navigations/toolbar.rb +5 -5
  114. data/lib/ui_bibz/ui/core/notifications/alert.rb +4 -5
  115. data/lib/ui_bibz/ui/core/notifications/badge.rb +6 -2
  116. data/lib/ui_bibz/ui/core/notifications/components/toast_header.rb +1 -1
  117. data/lib/ui_bibz/ui/core/notifications/progress_bar.rb +3 -3
  118. data/lib/ui_bibz/ui/core/notifications/toast.rb +8 -9
  119. data/lib/ui_bibz/ui/core/windows/components/offcanvas_body.rb +47 -0
  120. data/lib/ui_bibz/ui/core/windows/components/offcanvas_header.rb +54 -0
  121. data/lib/ui_bibz/ui/core/windows/modal.rb +9 -9
  122. data/lib/ui_bibz/ui/core/windows/offcanvas.rb +84 -0
  123. data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +4 -20
  124. data/lib/ui_bibz/ui/extensions/core/component/klass_extension.rb +11 -19
  125. data/lib/ui_bibz/ui/extensions/core/forms/connect_extension.rb +1 -1
  126. data/lib/ui_bibz/ui/ux/containers/components/panel_column.rb +3 -3
  127. data/lib/ui_bibz/ui/ux/containers/components/panel_deck.rb +3 -3
  128. data/lib/ui_bibz/ui/ux/containers/components/panel_group.rb +3 -3
  129. data/lib/ui_bibz/ui/ux/containers/components/panel_header.rb +4 -4
  130. data/lib/ui_bibz/ui/ux/containers/panel.rb +13 -13
  131. data/lib/ui_bibz/ui/ux/tables/components/actions.rb +4 -4
  132. data/lib/ui_bibz/ui/ux/tables/components/column.rb +1 -1
  133. data/lib/ui_bibz/ui/ux/tables/components/columns.rb +2 -2
  134. data/lib/ui_bibz/ui/ux/tables/extensions/sortable.rb +1 -1
  135. data/lib/ui_bibz/ui/ux/tables/table.rb +5 -5
  136. data/lib/ui_bibz/ui/ux/tables/table_card.rb +6 -6
  137. data/lib/ui_bibz/ui/ux/tables/table_search_field.rb +1 -1
  138. data/lib/ui_bibz/utils/breakdown_class_name_generator.rb +3 -3
  139. data/lib/ui_bibz/utils/screwdriver.rb +1 -1
  140. data/lib/ui_bibz/view_objects/glyph_component_view_object.rb +38 -0
  141. data/lib/ui_bibz.rb +25 -0
  142. data/test/builders/data_html_classes_builder_test.rb +37 -0
  143. data/test/builders/html_classes_builder_test.rb +76 -0
  144. data/test/dummy/Rakefile +1 -1
  145. data/test/dummy/app/assets/stylesheets/application.css +1 -15
  146. data/test/dummy/app/channels/application_cable/channel.rb +6 -0
  147. data/test/dummy/app/channels/application_cable/connection.rb +6 -0
  148. data/test/dummy/app/jobs/application_job.rb +9 -0
  149. data/test/dummy/app/mailers/application_mailer.rb +6 -0
  150. data/test/dummy/app/views/layouts/application.html.erb +10 -12
  151. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  152. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  153. data/test/dummy/bin/rails +3 -3
  154. data/test/dummy/bin/rake +2 -2
  155. data/test/dummy/bin/setup +12 -12
  156. data/test/dummy/config/application.rb +13 -17
  157. data/test/dummy/config/boot.rb +3 -3
  158. data/test/dummy/config/database.yml +2 -2
  159. data/test/dummy/config/environment.rb +1 -1
  160. data/test/dummy/config/environments/development.rb +21 -16
  161. data/test/dummy/config/environments/production.rb +16 -41
  162. data/test/dummy/config/environments/test.rb +19 -8
  163. data/test/dummy/config/importmap.rb +11 -0
  164. data/test/dummy/config/initializers/content_security_policy.rb +21 -24
  165. data/test/dummy/config/initializers/filter_parameter_logging.rb +6 -2
  166. data/test/dummy/config/initializers/inflections.rb +4 -4
  167. data/test/dummy/config/initializers/permissions_policy.rb +12 -0
  168. data/test/dummy/config/locales/en.yml +13 -3
  169. data/test/dummy/config/puma.rb +7 -2
  170. data/test/dummy/config/storage.yml +5 -5
  171. data/test/dummy/config.ru +2 -1
  172. data/test/simple_form_test.rb +24 -24
  173. data/test/ui/core/boxes/card_test.rb +2 -1
  174. data/test/ui/core/component_test.rb +2 -2
  175. data/test/ui/core/forms/buttons/button_group_test.rb +1 -1
  176. data/test/ui/core/forms/buttons/button_link_test.rb +1 -1
  177. data/test/ui/core/forms/buttons/button_refresh_test.rb +1 -1
  178. data/test/ui/core/forms/buttons/button_test.rb +2 -2
  179. data/test/ui/core/forms/choices/box_switch_field_test.rb +10 -10
  180. data/test/ui/core/forms/choices/checkbox_field_test.rb +1 -1
  181. data/test/ui/core/forms/choices/choice_group_test.rb +1 -1
  182. data/test/ui/core/forms/dropdowns/dropdown_test.rb +1 -1
  183. data/test/ui/core/forms/numbers/formula_field_test.rb +1 -1
  184. data/test/ui/core/forms/selects/dropdown_select_field_test.rb +2 -2
  185. data/test/ui/core/forms/selects/select_field_test.rb +1 -1
  186. data/test/ui/core/forms/surrounds/surround_field_test.rb +4 -4
  187. data/test/ui/core/forms/texts/auto_complete_field_test.rb +2 -2
  188. data/test/ui/core/icons/glyph_test.rb +8 -4
  189. data/test/ui/core/icons/star_test.rb +12 -6
  190. data/test/ui/core/navigations/breadcrumb_test.rb +1 -1
  191. data/test/ui/core/navigations/link_test.rb +1 -1
  192. data/test/ui/core/navigations/nav_test.rb +11 -0
  193. data/test/ui/core/notifications/alert_test.rb +1 -1
  194. data/test/ui/core/notifications/badge_test.rb +3 -3
  195. data/test/ui/core/notifications/popover_test.rb +4 -4
  196. data/test/ui/core/notifications/spinner_test.rb +1 -1
  197. data/test/ui/core/notifications/toast_test.rb +1 -1
  198. data/test/ui/core/notifications/tooltip_test.rb +4 -4
  199. data/test/ui/core/windows/offcanvas_test.rb +27 -0
  200. data/test/ui/ux/containers/panel_test.rb +1 -1
  201. data/test/ui/ux/tables/table_test.rb +3 -3
  202. data/test/view_objects/glyph_component_view_object_test.rb +17 -0
  203. data/ui_bibz.gemspec +6 -20
  204. data/vendor/assets/fonts/fontawesome/fa-brands-400.ttf +0 -0
  205. data/vendor/assets/fonts/fontawesome/fa-brands-400.woff2 +0 -0
  206. data/vendor/assets/fonts/fontawesome/fa-regular-400.ttf +0 -0
  207. data/vendor/assets/fonts/fontawesome/fa-regular-400.woff2 +0 -0
  208. data/vendor/assets/fonts/fontawesome/fa-solid-900.ttf +0 -0
  209. data/vendor/assets/fonts/fontawesome/fa-solid-900.woff2 +0 -0
  210. data/vendor/assets/fonts/fontawesome/fa-v4compatibility.ttf +0 -0
  211. data/vendor/assets/fonts/fontawesome/fa-v4compatibility.woff2 +0 -0
  212. data/vendor/assets/javascripts/bootstrap-markdown.js +1 -1555
  213. data/vendor/assets/javascripts/bootstrap-multiselect.min.js +40 -1176
  214. data/vendor/assets/javascripts/bootstrap-switch.min.js +9 -21
  215. data/vendor/assets/javascripts/bs-custom-file-input.min.js +0 -1
  216. data/vendor/assets/javascripts/fontawesome/all.js +5977 -0
  217. data/vendor/assets/javascripts/fontawesome/all.min.js +6 -0
  218. data/vendor/assets/javascripts/fontawesome/brands.js +749 -0
  219. data/vendor/assets/javascripts/fontawesome/brands.min.js +6 -0
  220. data/vendor/assets/javascripts/fontawesome/conflict-detection.js +1138 -0
  221. data/vendor/assets/javascripts/fontawesome/conflict-detection.min.js +6 -0
  222. data/vendor/assets/javascripts/fontawesome/fontawesome.js +3126 -0
  223. data/vendor/assets/javascripts/fontawesome/fontawesome.min.js +6 -0
  224. data/vendor/assets/javascripts/fontawesome/regular.js +445 -0
  225. data/vendor/assets/javascripts/fontawesome/regular.min.js +6 -0
  226. data/vendor/assets/javascripts/fontawesome/solid.js +1672 -0
  227. data/vendor/assets/javascripts/fontawesome/solid.min.js +6 -0
  228. data/vendor/assets/javascripts/fontawesome/v4-shims.js +225 -0
  229. data/vendor/assets/javascripts/fontawesome/v4-shims.min.js +6 -0
  230. data/vendor/assets/javascripts/fuzzysort.js +562 -0
  231. data/vendor/assets/javascripts/jquery-3.7.0.min.js +2 -0
  232. data/vendor/assets/javascripts/jquery.multi-select.min.js +725 -1
  233. data/vendor/assets/stylesheets/bootstrap-multiselect.sass +115 -0
  234. data/vendor/assets/stylesheets/bootstrap-switch.scss +211 -0
  235. data/vendor/assets/stylesheets/fontawesome/_animated.scss +142 -9
  236. data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +13 -13
  237. data/vendor/assets/stylesheets/fontawesome/_core.scss +28 -6
  238. data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +2 -1
  239. data/vendor/assets/stylesheets/fontawesome/_functions.scss +57 -0
  240. data/vendor/assets/stylesheets/fontawesome/_icons.scss +7 -1438
  241. data/vendor/assets/stylesheets/fontawesome/_list.scss +4 -4
  242. data/vendor/assets/stylesheets/fontawesome/_mixins.scss +53 -34
  243. data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +25 -18
  244. data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +12 -3
  245. data/vendor/assets/stylesheets/fontawesome/_shims.scss +640 -664
  246. data/vendor/assets/stylesheets/fontawesome/_sizing.scss +16 -0
  247. data/vendor/assets/stylesheets/fontawesome/_stacked.scss +5 -4
  248. data/vendor/assets/stylesheets/fontawesome/_variables.scss +4896 -1393
  249. data/vendor/assets/stylesheets/fontawesome/brands.scss +17 -10
  250. data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +7 -2
  251. data/vendor/assets/stylesheets/fontawesome/regular.scss +13 -10
  252. data/vendor/assets/stylesheets/fontawesome/solid.scss +13 -11
  253. data/vendor/assets/stylesheets/fontawesome/v4-shims.scss +6 -1
  254. data/vendor/assets/stylesheets/multi-select.css +92 -0
  255. metadata +120 -348
  256. data/.gitlab-ci.yml +0 -17
  257. data/.travis.yml +0 -24
  258. data/lib/ui_bibz/ui/extensions/core/component/popover_extension.rb +0 -70
  259. data/structure.md +0 -68
  260. data/test/dummy/README.rdoc +0 -28
  261. data/test/dummy/app/assets/javascripts/application.js +0 -13
  262. data/test/dummy/app/javascripts/packs/index.js +0 -3
  263. data/test/dummy/config/initializers/application_controller_renderer.rb +0 -9
  264. data/test/dummy/config/initializers/assets.rb +0 -14
  265. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -8
  266. data/test/dummy/config/initializers/cookies_serializer.rb +0 -7
  267. data/test/dummy/config/initializers/mime_types.rb +0 -5
  268. data/test/dummy/config/initializers/session_store.rb +0 -5
  269. data/test/dummy/config/initializers/ui_bibz.rb +0 -5
  270. data/test/dummy/config/initializers/wrap_parameters.rb +0 -16
  271. data/test/dummy/config/secrets.yml +0 -22
  272. data/test/dummy/config/spring.rb +0 -8
  273. data/test/dummy/test/models/user_test.rb +0 -9
  274. data/vendor/assets/fonts/fa-brands-400.eot +0 -0
  275. data/vendor/assets/fonts/fa-brands-400.svg +0 -3570
  276. data/vendor/assets/fonts/fa-brands-400.ttf +0 -0
  277. data/vendor/assets/fonts/fa-brands-400.woff +0 -0
  278. data/vendor/assets/fonts/fa-brands-400.woff2 +0 -0
  279. data/vendor/assets/fonts/fa-regular-400.eot +0 -0
  280. data/vendor/assets/fonts/fa-regular-400.svg +0 -803
  281. data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
  282. data/vendor/assets/fonts/fa-regular-400.woff +0 -0
  283. data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
  284. data/vendor/assets/fonts/fa-solid-900.eot +0 -0
  285. data/vendor/assets/fonts/fa-solid-900.svg +0 -4938
  286. data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
  287. data/vendor/assets/fonts/fa-solid-900.woff +0 -0
  288. data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
  289. data/vendor/assets/javascripts/all.js +0 -4441
  290. data/vendor/assets/javascripts/all.min.js +0 -5
  291. data/vendor/assets/stylesheets/all.min.css +0 -5
  292. data/vendor/assets/stylesheets/fontawesome/_larger.scss +0 -23
  293. data/vendor/assets/stylesheets/svg-with-js.css +0 -5
  294. /data/{test/dummy/app/mailers/.keep → app/assets/stylesheets/sass/forms/_dropdown.sass} +0 -0
  295. /data/{test/dummy/app/views/users/index.html.erb → app/assets/stylesheets/sass/forms/_input_refresh_button.sass} +0 -0
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module UiBibz
4
+ module Strategies
5
+ # Class to initialize component
6
+ class ComponentInitializeStandardStrategy < UiBibz::Strategies::ComponentInitializeAbstractStrategy
7
+ attr_reader :content
8
+
9
+ def options
10
+ with_indifferent_access(@options)
11
+ end
12
+
13
+ def html_options
14
+ with_indifferent_access(@html_options)
15
+ end
16
+ end
17
+ end
18
+ end
@@ -34,15 +34,15 @@ module UiBibz::Ui::Concerns::CardItemableConcern # :nodoc:
34
34
  end
35
35
 
36
36
  # Add List group which is a component
37
- def list_group(content = nil, options = nil, html_options = nil, &block)
38
- @items << UiBibz::Ui::Core::Boxes::Components::CardListGroup.new(content, options, html_options).tap(&block).render
37
+ def list_group(content = nil, options = nil, html_options = nil, &)
38
+ @items << UiBibz::Ui::Core::Boxes::Components::CardListGroup.new(content, options, html_options).tap(&).render
39
39
  end
40
40
 
41
41
  # Add Image which is a component
42
- def image(content = nil, options = nil, html_options = nil, &block)
42
+ def image(content = nil, options = nil, html_options = nil, &)
43
43
  # Add position top to the image if the image is in top of the card
44
44
  options = (options || {}).merge(position: :top) if @header.nil? && @items.empty? && options.try(:[], :position).nil?
45
- @items << UiBibz::Ui::Core::Boxes::Components::CardImage.new(content, options, html_options, &block).render
45
+ @items << UiBibz::Ui::Core::Boxes::Components::CardImage.new(content, options, html_options, &).render
46
46
  end
47
47
 
48
48
  # Add a row whih is a component
@@ -5,7 +5,7 @@ module UiBibz::Ui::Concerns::NotificationConcern # :nodoc:
5
5
 
6
6
  included do
7
7
  def data_attributes
8
- self.class.const_get('DATA_ATTRIBUTES').filter_map do |data_attribute|
8
+ self.class.const_get(:DATA_ATTRIBUTES).filter_map do |data_attribute|
9
9
  options[data_attribute].to_s.blank? ? nil : { "data-bs-#{data_attribute}" => data_attribute_value(data_attribute) }
10
10
  end.reduce(&:merge) || {}
11
11
  end
@@ -92,7 +92,7 @@ module UiBibz::Ui::Core::Boxes
92
92
  include UiBibz::Ui::Concerns::CardItemableConcern
93
93
 
94
94
  # (see UiBibz::Ui::Core::Component#initialize)
95
- def initialize(content = nil, options = nil, html_options = nil, &block)
95
+ def initialize(...)
96
96
  super
97
97
  @items = @content.nil? ? [] : [UiBibz::Ui::Core::Boxes::Components::CardBody.new(@content).render]
98
98
  end
@@ -34,7 +34,7 @@ module UiBibz::Ui::Core::Boxes
34
34
  include UiBibz::Ui::Concerns::HtmlConcern
35
35
 
36
36
  # See UiBibz::Ui::Core::Component.initialize
37
- def initialize(content = nil, options = nil, html_options = nil, &block)
37
+ def initialize(...)
38
38
  super
39
39
  @items = []
40
40
  end
@@ -44,9 +44,9 @@ module UiBibz::Ui::Core::Boxes
44
44
  content_tag :div, @items.join.html_safe, html_options
45
45
  end
46
46
 
47
- def card(content = nil, options = nil, html_options = nil, &block)
47
+ def card(content = nil, options = nil, html_options = nil, &)
48
48
  content = (content || {}).merge({ parent_collapse: id })
49
- @items << UiBibz::Ui::Core::Boxes::Card.new(content, options, html_options).tap(&block).render
49
+ @items << UiBibz::Ui::Core::Boxes::Card.new(content, options, html_options).tap(&).render
50
50
  end
51
51
 
52
52
  private
@@ -60,7 +60,7 @@ module UiBibz::Ui::Core::Boxes
60
60
  end
61
61
 
62
62
  def component_html_options
63
- { id: id }
63
+ { id: }
64
64
  end
65
65
  end
66
66
  end
@@ -34,7 +34,7 @@ module UiBibz::Ui::Core::Boxes
34
34
  include UiBibz::Ui::Concerns::HtmlConcern
35
35
 
36
36
  # See UiBibz::Ui::Core::Component.initialize
37
- def initialize(content = nil, options = nil, html_options = nil, &block)
37
+ def initialize(...)
38
38
  super
39
39
  @items = []
40
40
  end
@@ -34,7 +34,7 @@ module UiBibz::Ui::Core::Boxes
34
34
  include UiBibz::Ui::Concerns::HtmlConcern
35
35
 
36
36
  # See UiBibz::Ui::Core::Component.initialize
37
- def initialize(content = nil, options = nil, html_options = nil, &block)
37
+ def initialize(...)
38
38
  super
39
39
  @items = []
40
40
  end
@@ -34,9 +34,6 @@ module UiBibz::Ui::Core::Boxes
34
34
  include UiBibz::Ui::Concerns::HtmlConcern
35
35
 
36
36
  # See UiBibz::Ui::Core::Component.initialize
37
- def initialize(content = nil, options = nil, html_options = nil, &block)
38
- super
39
- end
40
37
 
41
38
  # Render html tag
42
39
  def pre_render
@@ -34,7 +34,7 @@ module UiBibz::Ui::Core::Boxes
34
34
  include UiBibz::Ui::Concerns::HtmlConcern
35
35
 
36
36
  # See UiBibz::Ui::Core::Component.initialize
37
- def initialize(content = nil, options = nil, html_options = nil, &block)
37
+ def initialize(...)
38
38
  super
39
39
  @items = []
40
40
  end
@@ -38,7 +38,7 @@ module UiBibz::Ui::Core::Boxes::Components
38
38
  include UiBibz::Ui::Concerns::HtmlConcern
39
39
 
40
40
  # See UiBibz::Ui::Core::Component.initialize
41
- def initialize(content = nil, options = nil, html_options = nil, &block)
41
+ def initialize(...)
42
42
  super
43
43
  @items = [@content]
44
44
  end
@@ -54,20 +54,20 @@ module UiBibz::Ui::Core::Boxes::Components
54
54
  end
55
55
  end
56
56
 
57
- def title(content = nil, options = nil, html_options = nil, &block)
58
- @items << UiBibz::Ui::Core::Boxes::Components::Body::CardBodyTitle.new(content, options, html_options, &block).render
57
+ def title(content = nil, options = nil, html_options = nil, &)
58
+ @items << UiBibz::Ui::Core::Boxes::Components::Body::CardBodyTitle.new(content, options, html_options, &).render
59
59
  end
60
60
 
61
- def subtitle(content = nil, options = nil, html_options = nil, &block)
62
- @items << UiBibz::Ui::Core::Boxes::Components::Body::CardBodySubtitle.new(content, options, html_options, &block).render
61
+ def subtitle(content = nil, options = nil, html_options = nil, &)
62
+ @items << UiBibz::Ui::Core::Boxes::Components::Body::CardBodySubtitle.new(content, options, html_options, &).render
63
63
  end
64
64
 
65
- def link(content = nil, options = nil, html_options = nil, &block)
66
- @items << UiBibz::Ui::Core::Boxes::Components::Body::CardBodyLink.new(content, options, html_options, &block).render
65
+ def link(content = nil, options = nil, html_options = nil, &)
66
+ @items << UiBibz::Ui::Core::Boxes::Components::Body::CardBodyLink.new(content, options, html_options, &).render
67
67
  end
68
68
 
69
- def text(content = nil, options = nil, html_options = nil, &block)
70
- @items << UiBibz::Ui::Core::Boxes::Components::Body::CardBodyText.new(content, options, html_options, &block).render
69
+ def text(content = nil, options = nil, html_options = nil, &)
70
+ @items << UiBibz::Ui::Core::Boxes::Components::Body::CardBodyText.new(content, options, html_options, &).render
71
71
  end
72
72
 
73
73
  def row(content = nil, options = nil, html_options = nil, &block)
@@ -46,8 +46,8 @@ module UiBibz::Ui::Core::Boxes::Components
46
46
  include UiBibz::Ui::Concerns::CardItemableConcern
47
47
 
48
48
  # See UiBibz::Ui::Core::Component.initialize
49
- def initialize(content = nil, options = nil, html_options = nil, &block)
50
- content = { num: content } if content.is_a?(Integer)
49
+ def initialize(...)
50
+ { num: content } if content.is_a?(Integer)
51
51
  super
52
52
  @items = [@content]
53
53
  end
@@ -32,7 +32,7 @@ module UiBibz::Ui::Core::Boxes::Components
32
32
  #
33
33
  class CardListGroup < UiBibz::Ui::Core::Lists::ListGroup
34
34
  # See UiBibz::Ui::Core::Component.initialize
35
- def initialize(content = nil, options = nil, html_options = nil, &block)
35
+ def initialize(...)
36
36
  super
37
37
  @lists = []
38
38
  end
@@ -45,7 +45,7 @@ module UiBibz::Ui::Core::Boxes::Components
45
45
  #
46
46
  class CardRow < UiBibz::Ui::Core::Layouts::Row
47
47
  # See UiBibz::Ui::Core::Component.initialize
48
- def initialize(content = nil, options = nil, html_options = nil, &block)
48
+ def initialize(...)
49
49
  super
50
50
  @items = [@content]
51
51
  end
@@ -3,7 +3,6 @@
3
3
  require 'haml'
4
4
  require 'ui_bibz/ui/extensions/core/component/klass_extension'
5
5
  require 'ui_bibz/ui/extensions/core/component/glyph_extension'
6
- require 'ui_bibz/ui/extensions/core/component/popover_extension'
7
6
  module UiBibz::Ui::Core
8
7
  # Creates a component of the given +name+ using options created by the set of +options+.
9
8
  #
@@ -44,7 +43,6 @@ module UiBibz::Ui::Core
44
43
  class Component < UiBibz::Ui::Base
45
44
  include KlassExtension
46
45
  include GlyphExtension
47
- include PopoverExtension
48
46
 
49
47
  # Constants
50
48
  STATUSES = %i[primary secondary success danger warning info light dark].freeze
@@ -59,27 +57,13 @@ module UiBibz::Ui::Core
59
57
  # * Options of component is defined in hash options
60
58
  # * Html options is defined in hash html_options
61
59
  def initialize(content = nil, options = nil, html_options = nil, &block)
62
- if !block.nil?
63
- @tapped = tapped?(block)
64
- @html_options = options
65
- @options = content
66
- read_cache = Rails.cache.read(@options.try(:[], :cache))
67
- if read_cache.nil?
68
- context = eval('self', block.binding) # rubocop:disable Style/EvalWithLocation
69
- @content = context.capture(&block)
70
- else
71
- @content = read_cache
72
- end
73
- elsif content.is_a?(Hash)
74
- @html_options = options
75
- @options = content
76
- else
77
- @html_options = html_options
78
- @options = options
79
- @content = content
80
- end
81
- @html_options = (@html_options || {}).with_indifferent_access
82
- @options = (@options || {}).with_indifferent_access
60
+ component_initialize_factory_method = UiBibz::FactoryMethods::ComponentInitializeFactoryMethod.new(self, self.binding).make
61
+ @content = component_initialize_factory_method.content
62
+ @html_options = component_initialize_factory_method.html_options
63
+ @options = component_initialize_factory_method.options
64
+
65
+ @data_html_options_builder = UiBibz::Builders::DataHtmlOptionsBuilder.new(@html_options, @options)
66
+
83
67
  init_options
84
68
  init_component_html_options
85
69
  end
@@ -108,25 +92,7 @@ module UiBibz::Ui::Core
108
92
  end
109
93
 
110
94
  # Override this method to add html data
111
- def component_html_data
112
- # To stimulusjs
113
- data_target = html_options.try(:[], :data).try(:[], :target) || options.try(:delete, :target)
114
- add_html_data(:target, value: data_target) unless data_target.nil?
115
-
116
- data_controller = html_options.try(:[], :data).try(:[], :controller) || options.try(:delete, :controller)
117
- add_html_data(:controller, value: data_controller) unless data_controller.nil?
118
-
119
- data_action = html_options.try(:[], :data).try(:[], :action) || options.try(:delete, :action)
120
- add_html_data(:action, value: data_action) unless data_action.nil?
121
-
122
- # To turbolinks
123
- data_turbolinks = html_options.try(:[], :data).try(:[], :turbolinks) || options.try(:delete, :turbolinks)
124
- add_html_data(:turbolinks, value: data_turbolinks) unless data_turbolinks.nil?
125
-
126
- # To Turbo
127
- data_turbo = html_options.try(:[], :data).try(:[], :turbo) || options.try(:delete, :turbo)
128
- add_html_data(:turbo, value: data_turbo) unless data_turbo.nil?
129
- end
95
+ def component_html_data; end
130
96
 
131
97
  # Override this method to add html Options
132
98
  # Accept Hash
@@ -145,13 +111,6 @@ module UiBibz::Ui::Core
145
111
  []
146
112
  end
147
113
 
148
- # Add html data arguments
149
- def add_html_data(name, value: true)
150
- html_options[:data] = {} if html_options[:data].nil?
151
- value = value.strip if value.is_a?(String)
152
- html_options[:data].update({ name => value })
153
- end
154
-
155
114
  def disabled?
156
115
  options[:state] == :disabled || html_options[:disabled]
157
116
  end
@@ -181,20 +140,12 @@ module UiBibz::Ui::Core
181
140
  @options = component_options.merge(@options).with_indifferent_access
182
141
  end
183
142
 
184
- def initialize_component_html_data
185
- component_html_data
186
- popover_data_html
187
- tooltip_data_html
188
- end
189
-
190
- def initialize_component_html_options
191
- html_options.merge!(component_html_options)
192
- end
193
-
194
143
  def init_component_html_options
195
- initialize_component_html_data
196
- initialize_component_html_classes
197
- initialize_component_html_options
144
+ component_html_data
145
+ html_options_builder = UiBibz::Builders::HtmlOptionsBuilder.new(@data_html_options_builder.output, options)
146
+ html_options_builder.initialize_component_html_classes initialize_component_html_classes
147
+ html_options_builder.initialize_component_html_options component_html_options
148
+ @html_options = html_options_builder.html_options
198
149
  end
199
150
  end
200
151
  end
@@ -52,6 +52,8 @@ module UiBibz::Ui::Core::Forms::Buttons
52
52
  # content
53
53
  # end
54
54
  class Button < UiBibz::Ui::Core::Component
55
+ include GlyphExtension
56
+
55
57
  # Render html tag
56
58
  def pre_render
57
59
  button_html_tag
@@ -107,7 +109,7 @@ module UiBibz::Ui::Core::Forms::Buttons
107
109
  end
108
110
 
109
111
  def action
110
- add_html_data('action', value: options[:action]) unless options[:action].nil?
112
+ @data_html_options_builder.add('action', value: options[:action])
111
113
  end
112
114
 
113
115
  def badge_html
@@ -50,7 +50,7 @@ module UiBibz::Ui::Core::Forms::Buttons
50
50
  include UiBibz::Ui::Concerns::HtmlConcern
51
51
 
52
52
  # See UiBibz::Ui::Core::Component.initialize
53
- def initialize(content = nil, options = nil, html_options = nil, &block)
53
+ def initialize(...)
54
54
  super
55
55
  @items = []
56
56
  end
@@ -80,28 +80,28 @@ module UiBibz::Ui::Core::Forms::Buttons
80
80
  @items << ButtonLink.new(content, options, html_options, &block)
81
81
  end
82
82
 
83
- def dropdown(content, options = {}, html_options = nil, &block)
83
+ def dropdown(content, options = {}, html_options = nil, &)
84
84
  options = @options.merge(options)
85
- @items << ButtonGroupDropdown.new(content, options, html_options).tap(&block)
85
+ @items << ButtonGroupDropdown.new(content, options, html_options).tap(&)
86
86
  end
87
87
 
88
- def split_dropdown(content, options = {}, html_options = nil, &block)
88
+ def split_dropdown(content, options = {}, html_options = nil, &)
89
89
  options = @options.merge(options)
90
- @items << ButtonGroupSplitDropdown.new(content, options, html_options).tap(&block)
90
+ @items << ButtonGroupSplitDropdown.new(content, options, html_options).tap(&)
91
91
  end
92
92
 
93
- def input(attribute_name, options = {}, &block)
93
+ def input(attribute_name, options = {}, &)
94
94
  options = @options.merge(options)
95
95
 
96
- @items << @options[:form].input(attribute_name, options.merge({ label: false, wrapper: false }), &block)
96
+ @items << @options[:form].input(attribute_name, options.merge({ label: false, wrapper: false }), &)
97
97
  end
98
98
 
99
- def html(content = nil, options = nil, html_options = nil, &block)
100
- @items << UiBibz::Ui::Core::Component.new(content, options, html_options, &block)
99
+ def html(content = nil, options = nil, html_options = nil, &)
100
+ @items << UiBibz::Ui::Core::Component.new(content, options, html_options, &)
101
101
  end
102
102
 
103
- def choice_group(content = nil, options = nil, html_options = nil, &block)
104
- @items << UiBibz::Ui::Core::Forms::Choices::ChoiceGroup.new(content, options, html_options).tap(&block)
103
+ def choice_group(content = nil, options = nil, html_options = nil, &)
104
+ @items << UiBibz::Ui::Core::Forms::Choices::ChoiceGroup.new(content, options, html_options).tap(&)
105
105
  end
106
106
 
107
107
  private
@@ -88,7 +88,7 @@ module UiBibz::Ui::Core::Forms::Choices
88
88
 
89
89
  # '', 'mini', 'small', 'normal', 'large'
90
90
  def size
91
- add_html_data('size', value: matching_size[options[:size]]) unless options[:size].nil?
91
+ @data_html_options_builder.add('size', value: matching_size[options[:size]])
92
92
  end
93
93
 
94
94
  def matching_size
@@ -97,7 +97,7 @@ module UiBibz::Ui::Core::Forms::Choices
97
97
 
98
98
  # true, false => default : true
99
99
  def animate
100
- add_html_data('animate', value: options.delete(:animate)) unless options[:animate].nil?
100
+ @data_html_options_builder.add('animate', value: options.delete(:animate)) unless options[:animate].nil?
101
101
  end
102
102
 
103
103
  # active, disabled => default : active
@@ -107,27 +107,27 @@ module UiBibz::Ui::Core::Forms::Choices
107
107
 
108
108
  # 'primary', 'info', 'success', 'warning', 'danger', 'default' => default : default
109
109
  def left_color
110
- add_html_data('on_color', value: options[:left_color]) unless options[:left_color].nil?
110
+ @data_html_options_builder.add('on_color', value: options[:left_color])
111
111
  end
112
112
 
113
113
  # 'primary', 'info', 'success', 'warning', 'danger', 'default' => default : default
114
114
  def right_color
115
- add_html_data('off_color', value: options[:right_color]) unless options[:right_color].nil?
115
+ @data_html_options_builder.add('off_color', value: options[:right_color])
116
116
  end
117
117
 
118
118
  # String => default : "ON"
119
119
  def left_text
120
- add_html_data('on_text', value: options[:left_text]) unless options[:left_text].nil?
120
+ @data_html_options_builder.add('on_text', value: options[:left_text])
121
121
  end
122
122
 
123
123
  # String => default : "OFF"
124
124
  def right_text
125
- add_html_data('off_text', value: options[:right_text]) unless options[:right_text].nil?
125
+ @data_html_options_builder.add('off_text', value: options[:right_text])
126
126
  end
127
127
 
128
128
  # String => default : '&nbsp;'
129
129
  def middle_text
130
- add_html_data('label_text', value: options[:middle_text]) unless options[:middle_text].nil?
130
+ @data_html_options_builder.add('label_text', value: options[:middle_text])
131
131
  end
132
132
 
133
133
  def inline
@@ -65,13 +65,13 @@ module UiBibz::Ui::Core::Forms::Choices
65
65
 
66
66
  def wrapper_html_options
67
67
  (options[:wrapper_html] || {}).tap do |option|
68
- option[:class] = UiBibz::Utils::Screwdriver.join_classes(wrapper_classes, inline, options[:wrapper_html].try(:[], :class))
68
+ option[:class] = UiBibz::Builders::HtmlClassesBuilder.join_classes(wrapper_classes, inline, options[:wrapper_html].try(:[], :class))
69
69
  end
70
70
  end
71
71
 
72
72
  def label_html_options
73
73
  (options[:label_html] || {}).tap do |option|
74
- option[:class] = UiBibz::Utils::Screwdriver.join_classes(label_classes, options[:label_html].try(:[], :class))
74
+ option[:class] = UiBibz::Builders::HtmlClassesBuilder.join_classes(label_classes, options[:label_html].try(:[], :class))
75
75
  end
76
76
  end
77
77
 
@@ -52,7 +52,7 @@ module UiBibz::Ui::Core::Forms::Choices
52
52
 
53
53
  # See UiBibz::Ui::Core::Forms::Choices::Button.initialize
54
54
  #
55
- def initialize(content = nil, options = nil, html_options = nil, &block)
55
+ def initialize(...)
56
56
  super
57
57
  @items = []
58
58
  @errors = []
@@ -72,14 +72,14 @@ module UiBibz::Ui::Core::Forms::Choices
72
72
  @items << Choice.new(content, opts, html_options, &block)
73
73
  end
74
74
 
75
- def input(attribute_name, options = {}, &block)
75
+ def input(attribute_name, options = {}, &)
76
76
  new_options = options.merge(old_label: options[:label], label: false, wrapper: false, error: false)
77
77
  new_options = new_options.merge(name: @radio_name, type: :radio) if @options[:type] == :radio
78
78
 
79
- @items << @options[:form].input(attribute_name, new_options, &block)
79
+ @items << @options[:form].input(attribute_name, new_options, &)
80
80
  obj = @options[:form].object
81
81
  @errors << obj.errors[attribute_name] unless obj.errors[attribute_name].empty?
82
- @required_fields << (obj._validators[attribute_name].try(:first).class.to_s == 'ActiveRecord::Validations::PresenceValidator')
82
+ @required_fields << (obj._validators[attribute_name].try(:first).instance_of?(::ActiveRecord::Validations::PresenceValidator))
83
83
  end
84
84
 
85
85
  private
@@ -93,8 +93,7 @@ module UiBibz::Ui::Core::Forms::Choices
93
93
  end
94
94
 
95
95
  def component_html_data
96
- super
97
- add_html_data 'toggle', value: 'buttons' if @options[:form].nil?
96
+ @data_html_options_builder.add('toggle', value: 'buttons') if @options[:form].nil?
98
97
  end
99
98
  end
100
99
  end
@@ -61,7 +61,7 @@ module UiBibz::Ui::Core::Forms::Choices
61
61
  end
62
62
 
63
63
  def input_options
64
- @input_options ||= { type: type, autocomplete: :off, class: 'btn-check' }
64
+ @input_options ||= { type:, autocomplete: :off, class: 'btn-check' }
65
65
  .merge(checked)
66
66
  .merge(value)
67
67
  .merge(name)
@@ -95,15 +95,15 @@ module UiBibz::Ui::Core::Forms::Dates
95
95
  end
96
96
 
97
97
  def date_locale
98
- add_html_data 'date_locale', value: I18n.locale.to_s
98
+ @data_html_options_builder.add 'date_locale', value: I18n.locale.to_s
99
99
  end
100
100
 
101
101
  def provide
102
- add_html_data 'provide', value: 'datepicker'
102
+ @data_html_options_builder.add 'provide', value: 'datepicker'
103
103
  end
104
104
 
105
105
  def format
106
- add_html_data 'date_format', value: picker_pattern
106
+ @data_html_options_builder.add 'date_format', value: picker_pattern
107
107
  end
108
108
 
109
109
  def picker_pattern
@@ -111,51 +111,51 @@ module UiBibz::Ui::Core::Forms::Dates
111
111
  end
112
112
 
113
113
  def today_btn
114
- add_html_data 'date_today_btn', value: 'linked'
114
+ @data_html_options_builder.add 'date_today_btn', value: 'linked'
115
115
  end
116
116
 
117
117
  def today_highlight
118
- add_html_data('date_today_highlight') if options[:today_highlight]
118
+ @data_html_options_builder.add('date_today_highlight') if options[:today_highlight]
119
119
  end
120
120
 
121
121
  def calendar_weeks
122
- add_html_data('date_calendar_weeks') if options[:calendar_weeks]
122
+ @data_html_options_builder.add('date_calendar_weeks') if options[:calendar_weeks]
123
123
  end
124
124
 
125
125
  def autoclose
126
- add_html_data('date_autoclose') if options[:autoclose]
126
+ @data_html_options_builder.add('date_autoclose') if options[:autoclose]
127
127
  end
128
128
 
129
129
  def dates_disabled
130
- add_html_data('dates_disabled', value: [options[:dates_disabled]].flatten) if options[:dates_disabled]
130
+ @data_html_options_builder.add('dates_disabled', value: [options[:dates_disabled]].flatten) if options[:dates_disabled]
131
131
  end
132
132
 
133
133
  def toggle_active
134
- add_html_data('date_toggle_active')
134
+ @data_html_options_builder.add('date_toggle_active')
135
135
  end
136
136
 
137
137
  def display_mode
138
- add_html_data('date_start_view', value: views[options[:display_mode]]) if options[:display_mode]
138
+ @data_html_options_builder.add('date_start_view', value: views[options[:display_mode]]) if options[:display_mode]
139
139
  end
140
140
 
141
141
  def display_mode_min
142
- add_html_data('date_min_view_mode', value: views[options[:display_mode_min]]) if options[:display_mode_min]
142
+ @data_html_options_builder.add('date_min_view_mode', value: views[options[:display_mode_min]]) if options[:display_mode_min]
143
143
  end
144
144
 
145
145
  def display_mode_max
146
- add_html_data('date_max_view_mode', value: views[options[:display_mode_max]]) if options[:display_mode_max]
146
+ @data_html_options_builder.add('date_max_view_mode', value: views[options[:display_mode_max]]) if options[:display_mode_max]
147
147
  end
148
148
 
149
149
  def days_of_week_disabled
150
- add_html_data('date_days_of_week_disabled', value: [options[:days_of_week_disabled]].flatten) if options[:days_of_week_disabled]
150
+ @data_html_options_builder.add('date_days_of_week_disabled', value: [options[:days_of_week_disabled]].flatten) if options[:days_of_week_disabled]
151
151
  end
152
152
 
153
153
  def days_of_week_highlighted
154
- add_html_data('date_days_of_week_highlighted', value: [options[:days_of_week_highlighted]].flatten) if options[:days_of_week_highlighted]
154
+ @data_html_options_builder.add('date_days_of_week_highlighted', value: [options[:days_of_week_highlighted]].flatten) if options[:days_of_week_highlighted]
155
155
  end
156
156
 
157
157
  def multiple
158
- add_html_data('date_multidate', value: options[:multiple]) if options[:multiple]
158
+ @data_html_options_builder.add('date_multidate', value: options[:multiple])
159
159
  end
160
160
 
161
161
  # :lg, :sm or :xs
@@ -42,7 +42,7 @@ module UiBibz::Ui::Core::Forms::Dropdowns::Components
42
42
  #
43
43
  class DropdownLink < UiBibz::Ui::Core::Component
44
44
  # See UiBibz::Ui::Core::Component.initialize
45
- def initialize(content = nil, options = nil, html_options = nil, &block)
45
+ def initialize(...)
46
46
  super
47
47
  @html_options = @html_options.merge(link_html_options)
48
48
  end
@@ -70,7 +70,7 @@ module UiBibz::Ui::Core::Forms::Dropdowns
70
70
  class Dropdown < UiBibz::Ui::Core::Component
71
71
  include UiBibz::Ui::Concerns::HtmlConcern
72
72
 
73
- def initialize(content, options = nil, html_options = nil, &block)
73
+ def initialize(...)
74
74
  super
75
75
  @items = []
76
76
  @status = @options.delete(:status)
@@ -86,8 +86,8 @@ module UiBibz::Ui::Core::Forms::Dropdowns
86
86
 
87
87
  # Add dropdown header
88
88
  # See UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownHeader
89
- def header(content = nil, options = nil, html_options = nil, &block)
90
- @items << UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownHeader.new(content, options, html_options, &block).render
89
+ def header(content = nil, options = nil, html_options = nil, &)
90
+ @items << UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownHeader.new(content, options, html_options, &).render
91
91
  end
92
92
 
93
93
  # Add dropdown Separator
@@ -98,8 +98,8 @@ module UiBibz::Ui::Core::Forms::Dropdowns
98
98
 
99
99
  # Add dropdown link in list
100
100
  # See UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownLink
101
- def link(content = nil, options = nil, html_options = nil, &block)
102
- @items << UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownLink.new(content, options, html_options, &block).render
101
+ def link(content = nil, options = nil, html_options = nil, &)
102
+ @items << UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownLink.new(content, options, html_options, &).render
103
103
  end
104
104
 
105
105
  def id
@@ -74,7 +74,7 @@ module UiBibz::Ui::Core::Forms::Numbers
74
74
  end
75
75
 
76
76
  def range_html_options
77
- { max: options[:max] || 100, min: options[:min] || 0, step: options[:step] || 1, disabled: disabled }
77
+ { max: options[:max] || 100, min: options[:min] || 0, step: options[:step] || 1, disabled: }
78
78
  end
79
79
 
80
80
  def not_on_hundred_percent?