ui_bibz 3.0.13 → 4.0.0.beta3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +3 -3
- data/.github/workflows/linter.yml +13 -12
- data/.overcommit.yml +6 -0
- data/.rubocop.yml +6 -0
- data/.ruby-version +1 -1
- data/Gemfile +19 -12
- data/Gemfile.lock +178 -138
- data/app/assets/config/ui_bibz.js +12 -0
- data/app/assets/javascripts/forms/formula.js +82 -0
- data/app/assets/javascripts/forms/input-connected.js +132 -0
- data/app/assets/javascripts/forms/jquery.multi-select-extend.js +52 -0
- data/app/assets/javascripts/forms.js +160 -0
- data/app/assets/javascripts/interfaces.js +56 -0
- data/app/assets/javascripts/tables.js +49 -0
- data/app/assets/javascripts/ui_bibz_js.js +37 -0
- data/app/assets/stylesheets/navigations/_nav.sass +2 -0
- data/app/assets/stylesheets/navigations/_navbar.sass +12 -0
- data/app/assets/stylesheets/navigations/_progress_bar.sass +2 -0
- data/app/assets/stylesheets/navigations/_toolbar.sass +3 -0
- data/app/assets/stylesheets/sass/_boxes.sass +1 -0
- data/app/assets/stylesheets/sass/_containers.sass +2 -0
- data/app/assets/stylesheets/sass/_fixes.sass +2 -0
- data/app/assets/stylesheets/sass/_forms.sass +8 -0
- data/app/assets/stylesheets/sass/_navigations.sass +4 -0
- data/app/assets/stylesheets/sass/_notifications.sass +4 -0
- data/app/assets/stylesheets/sass/_tables.sass +2 -0
- data/app/assets/stylesheets/sass/_variables_mixins_functions.sass +3 -0
- data/app/assets/stylesheets/sass/boxes/_card.sass +4 -0
- data/app/assets/stylesheets/sass/containers/_panel.scss +330 -0
- data/app/assets/stylesheets/sass/forms/_bootstrap_select.sass +5 -0
- data/app/assets/stylesheets/sass/forms/_button.sass +3 -0
- data/app/assets/stylesheets/sass/forms/_date_picker.sass +3 -0
- data/app/assets/stylesheets/sass/forms/_form_check.sass +10 -0
- data/app/assets/stylesheets/sass/forms/_formula_field.sass +17 -0
- data/app/assets/stylesheets/sass/forms/_multiselect.sass +44 -0
- data/app/assets/stylesheets/sass/forms/_range.sass +44 -0
- data/app/assets/stylesheets/sass/forms/_slider.sass +136 -0
- data/app/assets/stylesheets/sass/forms/_surround_field.sass +25 -0
- data/app/assets/stylesheets/sass/notifications/_badge.sass +5 -0
- data/app/assets/stylesheets/sass/notifications/_glyph.sass +3 -0
- data/app/assets/stylesheets/sass/notifications/_star.sass +2 -0
- data/app/assets/stylesheets/sass/notifications/_toast.sass +3 -0
- data/app/assets/stylesheets/sass/tables/_table.sass +39 -0
- data/app/assets/stylesheets/sass/tables/_table_card.sass +39 -0
- data/app/assets/stylesheets/ui_bibz.sass +26 -0
- data/bin/test +3 -5
- data/config/importmap.rb +19 -0
- data/config/initializers/assets.rb +5 -0
- data/config/initializers/will_paginate.rb +1 -3
- data/lib/ui_bibz/builders/data_html_options_builder.rb +118 -0
- data/lib/ui_bibz/builders/html_classes_builder.rb +89 -0
- data/lib/ui_bibz/builders/html_options_builder.rb +22 -0
- data/lib/ui_bibz/factory_methods/component_initialize_factory_method.rb +33 -0
- data/lib/ui_bibz/helpers/ui/core/boxes_helper.rb +12 -12
- data/lib/ui_bibz/helpers/ui/core/forms_helper.rb +50 -50
- data/lib/ui_bibz/helpers/ui/core/icons_helper.rb +6 -6
- data/lib/ui_bibz/helpers/ui/core/layouts_helper.rb +2 -2
- data/lib/ui_bibz/helpers/ui/core/lists_helper.rb +2 -2
- data/lib/ui_bibz/helpers/ui/core/navigations_helper.rb +12 -12
- data/lib/ui_bibz/helpers/ui/core/notifications_helper.rb +4 -4
- data/lib/ui_bibz/helpers/ui/core/windows_helper.rb +10 -2
- data/lib/ui_bibz/helpers/ui/ux_helper.rb +2 -2
- data/lib/ui_bibz/helpers/utils_helper.rb +2 -2
- data/lib/ui_bibz/infos.rb +3 -3
- data/lib/ui_bibz/inputs/ui_bibz_form/ui_bibz_form_builder.rb +12 -12
- data/lib/ui_bibz/inputs/ui_bibz_inputs/collection_input.rb +1 -1
- data/lib/ui_bibz/rails/engine.rb +21 -4
- data/lib/ui_bibz/strategies/component_initialize_abstract_strategy.rb +27 -0
- data/lib/ui_bibz/strategies/component_initialize_block_strategy.rb +31 -0
- data/lib/ui_bibz/strategies/component_initialize_hash_strategy.rb +18 -0
- data/lib/ui_bibz/strategies/component_initialize_standard_strategy.rb +18 -0
- data/lib/ui_bibz/ui/concerns/card_itemable_concern.rb +4 -4
- data/lib/ui_bibz/ui/concerns/notification_concern.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card_accordion.rb +4 -4
- data/lib/ui_bibz/ui/core/boxes/card_column.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card_deck.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card_grid.rb +0 -3
- data/lib/ui_bibz/ui/core/boxes/card_group.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/card_body.rb +9 -9
- data/lib/ui_bibz/ui/core/boxes/components/card_col.rb +2 -2
- data/lib/ui_bibz/ui/core/boxes/components/card_list_group.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/card_row.rb +1 -1
- data/lib/ui_bibz/ui/core/component.rb +13 -62
- data/lib/ui_bibz/ui/core/forms/buttons/button.rb +3 -1
- data/lib/ui_bibz/ui/core/forms/buttons/button_group.rb +11 -11
- data/lib/ui_bibz/ui/core/forms/choices/box_switch_field.rb +7 -7
- data/lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb +2 -2
- data/lib/ui_bibz/ui/core/forms/choices/choice_group.rb +5 -6
- data/lib/ui_bibz/ui/core/forms/choices/components/choice.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dates/date_picker_field.rb +15 -15
- data/lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_link.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dropdowns/dropdown.rb +5 -5
- data/lib/ui_bibz/ui/core/forms/numbers/slider_field.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/selects/dropdown_select_field.rb +10 -10
- data/lib/ui_bibz/ui/core/forms/selects/multi_column_field.rb +2 -2
- data/lib/ui_bibz/ui/core/forms/surrounds/surround_field.rb +32 -32
- data/lib/ui_bibz/ui/core/forms/textareas/markdown_editor_field.rb +7 -8
- data/lib/ui_bibz/ui/core/icons/components/glyph_text.rb +1 -1
- data/lib/ui_bibz/ui/core/icons/glyph.rb +4 -3
- data/lib/ui_bibz/ui/core/layouts/row.rb +2 -2
- data/lib/ui_bibz/ui/core/lists/components/list.rb +4 -4
- data/lib/ui_bibz/ui/core/lists/list_group.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/breadcrumb.rb +6 -4
- data/lib/ui_bibz/ui/core/navigations/components/nav_link_span.rb +1 -2
- data/lib/ui_bibz/ui/core/navigations/components/navbar_form.rb +6 -5
- data/lib/ui_bibz/ui/core/navigations/components/toolbar_form.rb +2 -2
- data/lib/ui_bibz/ui/core/navigations/nav.rb +10 -6
- data/lib/ui_bibz/ui/core/navigations/navbar.rb +21 -19
- data/lib/ui_bibz/ui/core/navigations/pagination.rb +3 -3
- data/lib/ui_bibz/ui/core/navigations/toolbar.rb +5 -5
- data/lib/ui_bibz/ui/core/notifications/alert.rb +4 -5
- data/lib/ui_bibz/ui/core/notifications/badge.rb +6 -2
- data/lib/ui_bibz/ui/core/notifications/components/toast_header.rb +1 -1
- data/lib/ui_bibz/ui/core/notifications/progress_bar.rb +3 -3
- data/lib/ui_bibz/ui/core/notifications/toast.rb +8 -9
- data/lib/ui_bibz/ui/core/windows/components/offcanvas_body.rb +47 -0
- data/lib/ui_bibz/ui/core/windows/components/offcanvas_header.rb +54 -0
- data/lib/ui_bibz/ui/core/windows/modal.rb +9 -9
- data/lib/ui_bibz/ui/core/windows/offcanvas.rb +84 -0
- data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +4 -20
- data/lib/ui_bibz/ui/extensions/core/component/klass_extension.rb +11 -19
- data/lib/ui_bibz/ui/extensions/core/forms/connect_extension.rb +1 -1
- data/lib/ui_bibz/ui/ux/containers/components/panel_column.rb +3 -3
- data/lib/ui_bibz/ui/ux/containers/components/panel_deck.rb +3 -3
- data/lib/ui_bibz/ui/ux/containers/components/panel_group.rb +3 -3
- data/lib/ui_bibz/ui/ux/containers/components/panel_header.rb +4 -4
- data/lib/ui_bibz/ui/ux/containers/panel.rb +13 -13
- data/lib/ui_bibz/ui/ux/tables/components/actions.rb +4 -4
- data/lib/ui_bibz/ui/ux/tables/components/column.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/components/columns.rb +2 -2
- data/lib/ui_bibz/ui/ux/tables/extensions/sortable.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/table.rb +5 -5
- data/lib/ui_bibz/ui/ux/tables/table_card.rb +6 -6
- data/lib/ui_bibz/ui/ux/tables/table_search_field.rb +1 -1
- data/lib/ui_bibz/utils/breakdown_class_name_generator.rb +3 -3
- data/lib/ui_bibz/utils/screwdriver.rb +1 -1
- data/lib/ui_bibz/view_objects/glyph_component_view_object.rb +38 -0
- data/lib/ui_bibz.rb +25 -0
- data/test/builders/data_html_classes_builder_test.rb +37 -0
- data/test/builders/html_classes_builder_test.rb +76 -0
- data/test/dummy/Rakefile +1 -1
- data/test/dummy/app/assets/stylesheets/application.css +1 -15
- data/test/dummy/app/channels/application_cable/channel.rb +6 -0
- data/test/dummy/app/channels/application_cable/connection.rb +6 -0
- data/test/dummy/app/jobs/application_job.rb +9 -0
- data/test/dummy/app/mailers/application_mailer.rb +6 -0
- data/test/dummy/app/views/layouts/application.html.erb +10 -12
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/rails +3 -3
- data/test/dummy/bin/rake +2 -2
- data/test/dummy/bin/setup +12 -12
- data/test/dummy/config/application.rb +13 -17
- data/test/dummy/config/boot.rb +3 -3
- data/test/dummy/config/database.yml +2 -2
- data/test/dummy/config/environment.rb +1 -1
- data/test/dummy/config/environments/development.rb +21 -16
- data/test/dummy/config/environments/production.rb +16 -41
- data/test/dummy/config/environments/test.rb +19 -8
- data/test/dummy/config/importmap.rb +11 -0
- data/test/dummy/config/initializers/content_security_policy.rb +21 -24
- data/test/dummy/config/initializers/filter_parameter_logging.rb +6 -2
- data/test/dummy/config/initializers/inflections.rb +4 -4
- data/test/dummy/config/initializers/permissions_policy.rb +12 -0
- data/test/dummy/config/locales/en.yml +13 -3
- data/test/dummy/config/puma.rb +7 -2
- data/test/dummy/config/storage.yml +5 -5
- data/test/dummy/config.ru +2 -1
- data/test/simple_form_test.rb +24 -24
- data/test/ui/core/boxes/card_test.rb +2 -1
- data/test/ui/core/component_test.rb +2 -2
- data/test/ui/core/forms/buttons/button_group_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_link_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_refresh_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_test.rb +2 -2
- data/test/ui/core/forms/choices/box_switch_field_test.rb +10 -10
- data/test/ui/core/forms/choices/checkbox_field_test.rb +1 -1
- data/test/ui/core/forms/choices/choice_group_test.rb +1 -1
- data/test/ui/core/forms/dropdowns/dropdown_test.rb +1 -1
- data/test/ui/core/forms/numbers/formula_field_test.rb +1 -1
- data/test/ui/core/forms/selects/dropdown_select_field_test.rb +2 -2
- data/test/ui/core/forms/selects/select_field_test.rb +1 -1
- data/test/ui/core/forms/surrounds/surround_field_test.rb +4 -4
- data/test/ui/core/forms/texts/auto_complete_field_test.rb +2 -2
- data/test/ui/core/icons/glyph_test.rb +8 -4
- data/test/ui/core/icons/star_test.rb +12 -6
- data/test/ui/core/navigations/breadcrumb_test.rb +1 -1
- data/test/ui/core/navigations/link_test.rb +1 -1
- data/test/ui/core/navigations/nav_test.rb +11 -0
- data/test/ui/core/notifications/alert_test.rb +1 -1
- data/test/ui/core/notifications/badge_test.rb +3 -3
- data/test/ui/core/notifications/popover_test.rb +4 -4
- data/test/ui/core/notifications/spinner_test.rb +1 -1
- data/test/ui/core/notifications/toast_test.rb +1 -1
- data/test/ui/core/notifications/tooltip_test.rb +4 -4
- data/test/ui/core/windows/offcanvas_test.rb +27 -0
- data/test/ui/ux/containers/panel_test.rb +1 -1
- data/test/ui/ux/tables/table_test.rb +3 -3
- data/test/view_objects/glyph_component_view_object_test.rb +17 -0
- data/ui_bibz.gemspec +6 -20
- data/vendor/assets/fonts/fontawesome/fa-brands-400.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-brands-400.woff2 +0 -0
- data/vendor/assets/fonts/fontawesome/fa-regular-400.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-regular-400.woff2 +0 -0
- data/vendor/assets/fonts/fontawesome/fa-solid-900.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-solid-900.woff2 +0 -0
- data/vendor/assets/fonts/fontawesome/fa-v4compatibility.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-v4compatibility.woff2 +0 -0
- data/vendor/assets/javascripts/bootstrap-markdown.js +1 -1555
- data/vendor/assets/javascripts/bootstrap-multiselect.min.js +40 -1176
- data/vendor/assets/javascripts/bootstrap-switch.min.js +9 -21
- data/vendor/assets/javascripts/bs-custom-file-input.min.js +0 -1
- data/vendor/assets/javascripts/fontawesome/all.js +5977 -0
- data/vendor/assets/javascripts/fontawesome/all.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/brands.js +749 -0
- data/vendor/assets/javascripts/fontawesome/brands.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/conflict-detection.js +1138 -0
- data/vendor/assets/javascripts/fontawesome/conflict-detection.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/fontawesome.js +3126 -0
- data/vendor/assets/javascripts/fontawesome/fontawesome.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/regular.js +445 -0
- data/vendor/assets/javascripts/fontawesome/regular.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/solid.js +1672 -0
- data/vendor/assets/javascripts/fontawesome/solid.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/v4-shims.js +225 -0
- data/vendor/assets/javascripts/fontawesome/v4-shims.min.js +6 -0
- data/vendor/assets/javascripts/fuzzysort.js +562 -0
- data/vendor/assets/javascripts/jquery-3.7.0.min.js +2 -0
- data/vendor/assets/javascripts/jquery.multi-select.min.js +725 -1
- data/vendor/assets/stylesheets/bootstrap-multiselect.sass +115 -0
- data/vendor/assets/stylesheets/bootstrap-switch.scss +211 -0
- data/vendor/assets/stylesheets/fontawesome/_animated.scss +142 -9
- data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +13 -13
- data/vendor/assets/stylesheets/fontawesome/_core.scss +28 -6
- data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +2 -1
- data/vendor/assets/stylesheets/fontawesome/_functions.scss +57 -0
- data/vendor/assets/stylesheets/fontawesome/_icons.scss +7 -1438
- data/vendor/assets/stylesheets/fontawesome/_list.scss +4 -4
- data/vendor/assets/stylesheets/fontawesome/_mixins.scss +53 -34
- data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +25 -18
- data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +12 -3
- data/vendor/assets/stylesheets/fontawesome/_shims.scss +640 -664
- data/vendor/assets/stylesheets/fontawesome/_sizing.scss +16 -0
- data/vendor/assets/stylesheets/fontawesome/_stacked.scss +5 -4
- data/vendor/assets/stylesheets/fontawesome/_variables.scss +4896 -1393
- data/vendor/assets/stylesheets/fontawesome/brands.scss +17 -10
- data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +7 -2
- data/vendor/assets/stylesheets/fontawesome/regular.scss +13 -10
- data/vendor/assets/stylesheets/fontawesome/solid.scss +13 -11
- data/vendor/assets/stylesheets/fontawesome/v4-shims.scss +6 -1
- data/vendor/assets/stylesheets/multi-select.css +92 -0
- metadata +120 -348
- data/.gitlab-ci.yml +0 -17
- data/.travis.yml +0 -24
- data/lib/ui_bibz/ui/extensions/core/component/popover_extension.rb +0 -70
- data/structure.md +0 -68
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/javascripts/packs/index.js +0 -3
- data/test/dummy/config/initializers/application_controller_renderer.rb +0 -9
- data/test/dummy/config/initializers/assets.rb +0 -14
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -8
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -7
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/session_store.rb +0 -5
- data/test/dummy/config/initializers/ui_bibz.rb +0 -5
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -16
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/config/spring.rb +0 -8
- data/test/dummy/test/models/user_test.rb +0 -9
- data/vendor/assets/fonts/fa-brands-400.eot +0 -0
- data/vendor/assets/fonts/fa-brands-400.svg +0 -3570
- data/vendor/assets/fonts/fa-brands-400.ttf +0 -0
- data/vendor/assets/fonts/fa-brands-400.woff +0 -0
- data/vendor/assets/fonts/fa-brands-400.woff2 +0 -0
- data/vendor/assets/fonts/fa-regular-400.eot +0 -0
- data/vendor/assets/fonts/fa-regular-400.svg +0 -803
- data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
- data/vendor/assets/fonts/fa-regular-400.woff +0 -0
- data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
- data/vendor/assets/fonts/fa-solid-900.eot +0 -0
- data/vendor/assets/fonts/fa-solid-900.svg +0 -4938
- data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
- data/vendor/assets/fonts/fa-solid-900.woff +0 -0
- data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
- data/vendor/assets/javascripts/all.js +0 -4441
- data/vendor/assets/javascripts/all.min.js +0 -5
- data/vendor/assets/stylesheets/all.min.css +0 -5
- data/vendor/assets/stylesheets/fontawesome/_larger.scss +0 -23
- data/vendor/assets/stylesheets/svg-with-js.css +0 -5
- /data/{test/dummy/app/mailers/.keep → app/assets/stylesheets/sass/forms/_dropdown.sass} +0 -0
- /data/{test/dummy/app/views/users/index.html.erb → app/assets/stylesheets/sass/forms/_input_refresh_button.sass} +0 -0
@@ -5,145 +5,145 @@ module UiBibz::Helpers::Ui::Core::FormsHelper
|
|
5
5
|
#
|
6
6
|
# +options+ (Hash)
|
7
7
|
# +html_options+ (Hash)
|
8
|
-
def ui_button(content = nil, options = nil, html_options = nil, &
|
9
|
-
UiBibz::Ui::Core::Forms::Buttons::Button.new(content, options, html_options, &
|
8
|
+
def ui_button(content = nil, options = nil, html_options = nil, &)
|
9
|
+
UiBibz::Ui::Core::Forms::Buttons::Button.new(content, options, html_options, &).render
|
10
10
|
end
|
11
11
|
|
12
12
|
# Choice group Component
|
13
13
|
#
|
14
14
|
# +options+ (Hash)
|
15
15
|
# +html_options+ (Hash)
|
16
|
-
def ui_choice_group(content = nil, options = nil, html_options = nil, &
|
17
|
-
UiBibz::Ui::Core::Forms::Choices::ChoiceGroup.new(content, options, html_options).tap(&
|
16
|
+
def ui_choice_group(content = nil, options = nil, html_options = nil, &)
|
17
|
+
UiBibz::Ui::Core::Forms::Choices::ChoiceGroup.new(content, options, html_options).tap(&).render
|
18
18
|
end
|
19
19
|
|
20
20
|
# Button Group Component
|
21
21
|
#
|
22
22
|
# +options+ (Hash)
|
23
23
|
# +html_options+ (Hash)
|
24
|
-
def ui_button_group(content = nil, options = nil, html_options = nil, &
|
25
|
-
UiBibz::Ui::Core::Forms::Buttons::ButtonGroup.new(content, options, html_options).tap(&
|
24
|
+
def ui_button_group(content = nil, options = nil, html_options = nil, &)
|
25
|
+
UiBibz::Ui::Core::Forms::Buttons::ButtonGroup.new(content, options, html_options).tap(&).render
|
26
26
|
end
|
27
27
|
|
28
28
|
# Button Link Component
|
29
29
|
#
|
30
30
|
# +options+ (Hash)
|
31
31
|
# +html_options+ (Hash)
|
32
|
-
def ui_button_link(content = nil, options = nil, html_options = nil, &
|
33
|
-
UiBibz::Ui::Core::Forms::Buttons::ButtonLink.new(content, options, html_options, &
|
32
|
+
def ui_button_link(content = nil, options = nil, html_options = nil, &)
|
33
|
+
UiBibz::Ui::Core::Forms::Buttons::ButtonLink.new(content, options, html_options, &).render
|
34
34
|
end
|
35
35
|
|
36
36
|
# Date Picker Field Component
|
37
37
|
#
|
38
38
|
# +options+ (Hash)
|
39
39
|
# +html_options+ (Hash)
|
40
|
-
def ui_date_picker_field(content = nil, options = nil, html_options = nil, &
|
41
|
-
UiBibz::Ui::Core::Forms::Dates::DatePickerField.new(content, options, html_options, &
|
40
|
+
def ui_date_picker_field(content = nil, options = nil, html_options = nil, &)
|
41
|
+
UiBibz::Ui::Core::Forms::Dates::DatePickerField.new(content, options, html_options, &).render
|
42
42
|
end
|
43
43
|
|
44
44
|
# Markdown Editor Field Component
|
45
45
|
#
|
46
46
|
# +options+ (Hash)
|
47
47
|
# +html_options+ (Hash)
|
48
|
-
def ui_markdown_editor_field(content = nil, options = nil, html_options = nil, &
|
49
|
-
UiBibz::Ui::Core::Forms::Textareas::MarkdownEditorField.new(content, options, html_options, &
|
48
|
+
def ui_markdown_editor_field(content = nil, options = nil, html_options = nil, &)
|
49
|
+
UiBibz::Ui::Core::Forms::Textareas::MarkdownEditorField.new(content, options, html_options, &).render
|
50
50
|
end
|
51
51
|
|
52
52
|
# Multi Column Field Component
|
53
53
|
#
|
54
54
|
# +options+ (Hash)
|
55
55
|
# +html_options+ (Hash)
|
56
|
-
def ui_multi_column_field(content = nil, options = nil, html_options = nil, &
|
57
|
-
UiBibz::Ui::Core::Forms::Selects::MultiColumnField.new(content, options, html_options, &
|
56
|
+
def ui_multi_column_field(content = nil, options = nil, html_options = nil, &)
|
57
|
+
UiBibz::Ui::Core::Forms::Selects::MultiColumnField.new(content, options, html_options, &).render
|
58
58
|
end
|
59
59
|
|
60
60
|
# Multi Select Field Component
|
61
61
|
#
|
62
62
|
# +options+ (Hash)
|
63
63
|
# +html_options+ (Hash)
|
64
|
-
def ui_multi_select_field(content = nil, options = nil, html_options = nil, &
|
64
|
+
def ui_multi_select_field(content = nil, options = nil, html_options = nil, &)
|
65
65
|
options = (options || {}).merge(multiple: true)
|
66
|
-
UiBibz::Ui::Core::Forms::Selects::DropdownSelectField.new(content, options, html_options, &
|
66
|
+
UiBibz::Ui::Core::Forms::Selects::DropdownSelectField.new(content, options, html_options, &).render
|
67
67
|
end
|
68
68
|
|
69
69
|
# Formula Field Component
|
70
70
|
#
|
71
71
|
# +options+ (Hash)
|
72
72
|
# +html_options+ (Hash)
|
73
|
-
def ui_formula_field(content = nil, options = nil, html_options = nil, &
|
74
|
-
UiBibz::Ui::Core::Forms::Numbers::FormulaField.new(content, options, html_options, &
|
73
|
+
def ui_formula_field(content = nil, options = nil, html_options = nil, &)
|
74
|
+
UiBibz::Ui::Core::Forms::Numbers::FormulaField.new(content, options, html_options, &).render
|
75
75
|
end
|
76
76
|
|
77
77
|
# String Field Component
|
78
78
|
#
|
79
79
|
# +options+ (Hash)
|
80
80
|
# +html_options+ (Hash)
|
81
|
-
def ui_text_field(content = nil, options = nil, html_options = nil, &
|
82
|
-
UiBibz::Ui::Core::Forms::Texts::TextField.new(content, options, html_options, &
|
81
|
+
def ui_text_field(content = nil, options = nil, html_options = nil, &)
|
82
|
+
UiBibz::Ui::Core::Forms::Texts::TextField.new(content, options, html_options, &).render
|
83
83
|
end
|
84
84
|
|
85
85
|
# Box Switch Field Component
|
86
86
|
#
|
87
87
|
# +options+ (Hash)
|
88
88
|
# +html_options+ (Hash)
|
89
|
-
def ui_box_switch_field(content = nil, options = nil, html_options = nil, &
|
90
|
-
UiBibz::Ui::Core::Forms::Choices::BoxSwitchField.new(content, options, html_options, &
|
89
|
+
def ui_box_switch_field(content = nil, options = nil, html_options = nil, &)
|
90
|
+
UiBibz::Ui::Core::Forms::Choices::BoxSwitchField.new(content, options, html_options, &).render
|
91
91
|
end
|
92
92
|
|
93
93
|
# Switch Field Component
|
94
94
|
#
|
95
95
|
# +options+ (Hash)
|
96
96
|
# +html_options+ (Hash)
|
97
|
-
def ui_switch_field(content = nil, options = nil, html_options = nil, &
|
98
|
-
UiBibz::Ui::Core::Forms::Choices::SwitchField.new(content, options, html_options, &
|
97
|
+
def ui_switch_field(content = nil, options = nil, html_options = nil, &)
|
98
|
+
UiBibz::Ui::Core::Forms::Choices::SwitchField.new(content, options, html_options, &).render
|
99
99
|
end
|
100
100
|
|
101
101
|
# Checkbox Field Component
|
102
102
|
#
|
103
103
|
# +options+ (Hash)
|
104
104
|
# +html_options+ (Hash)
|
105
|
-
def ui_checkbox_field(content = nil, options = nil, html_options = nil, &
|
106
|
-
UiBibz::Ui::Core::Forms::Choices::CheckboxField.new(content, options, html_options, &
|
105
|
+
def ui_checkbox_field(content = nil, options = nil, html_options = nil, &)
|
106
|
+
UiBibz::Ui::Core::Forms::Choices::CheckboxField.new(content, options, html_options, &).render
|
107
107
|
end
|
108
108
|
|
109
109
|
# Radio Field Component
|
110
110
|
#
|
111
111
|
# +options+ (Hash)
|
112
112
|
# +html_options+ (Hash)
|
113
|
-
def ui_radio_field(content = nil, options = nil, html_options = nil, &
|
114
|
-
UiBibz::Ui::Core::Forms::Choices::RadioField.new(content, options, html_options, &
|
113
|
+
def ui_radio_field(content = nil, options = nil, html_options = nil, &)
|
114
|
+
UiBibz::Ui::Core::Forms::Choices::RadioField.new(content, options, html_options, &).render
|
115
115
|
end
|
116
116
|
|
117
117
|
# Select Field Component
|
118
118
|
#
|
119
119
|
# +options+ (Hash)
|
120
120
|
# +html_options+ (Hash)
|
121
|
-
def ui_select_field(content = nil, options = nil, html_options = nil, &
|
122
|
-
UiBibz::Ui::Core::Forms::Selects::SelectField.new(content, options, html_options, &
|
121
|
+
def ui_select_field(content = nil, options = nil, html_options = nil, &)
|
122
|
+
UiBibz::Ui::Core::Forms::Selects::SelectField.new(content, options, html_options, &).render
|
123
123
|
end
|
124
124
|
|
125
125
|
# Dropdown Select Field Component
|
126
126
|
#
|
127
127
|
# +options+ (Hash)
|
128
128
|
# +html_options+ (Hash)
|
129
|
-
def ui_dropdown_select_field(content = nil, options = nil, html_options = nil, &
|
130
|
-
UiBibz::Ui::Core::Forms::Selects::DropdownSelectField.new(content, options, html_options, &
|
129
|
+
def ui_dropdown_select_field(content = nil, options = nil, html_options = nil, &)
|
130
|
+
UiBibz::Ui::Core::Forms::Selects::DropdownSelectField.new(content, options, html_options, &).render
|
131
131
|
end
|
132
132
|
|
133
133
|
# Auto Complete Field Component
|
134
134
|
#
|
135
135
|
# +options+ (Hash)
|
136
136
|
# +html_options+ (Hash)
|
137
|
-
def ui_auto_complete_field(content = nil, options = nil, html_options = nil, &
|
138
|
-
UiBibz::Ui::Core::Forms::Texts::AutoCompleteField.new(content, options, html_options, &
|
137
|
+
def ui_auto_complete_field(content = nil, options = nil, html_options = nil, &)
|
138
|
+
UiBibz::Ui::Core::Forms::Texts::AutoCompleteField.new(content, options, html_options, &).render
|
139
139
|
end
|
140
140
|
|
141
141
|
# Surround Field Component
|
142
142
|
#
|
143
143
|
# +options+ (Hash)
|
144
144
|
# +html_options+ (Hash)
|
145
|
-
def ui_surround_field(content = nil, options = nil, html_options = nil, &
|
146
|
-
UiBibz::Ui::Core::Forms::Surrounds::SurroundField.new(content, options, html_options).tap(&
|
145
|
+
def ui_surround_field(content = nil, options = nil, html_options = nil, &)
|
146
|
+
UiBibz::Ui::Core::Forms::Surrounds::SurroundField.new(content, options, html_options).tap(&).render
|
147
147
|
end
|
148
148
|
|
149
149
|
# Dropdown Component
|
@@ -151,8 +151,8 @@ module UiBibz::Helpers::Ui::Core::FormsHelper
|
|
151
151
|
# +name+ (String) [Required]
|
152
152
|
# +options+ (Hash)
|
153
153
|
# +html_options+ (Hash)
|
154
|
-
def ui_dropdown(name, options = nil, html_options = nil, &
|
155
|
-
UiBibz::Ui::Core::Forms::Dropdowns::Dropdown.new(name, options, html_options).tap(&
|
154
|
+
def ui_dropdown(name, options = nil, html_options = nil, &)
|
155
|
+
UiBibz::Ui::Core::Forms::Dropdowns::Dropdown.new(name, options, html_options).tap(&).render
|
156
156
|
end
|
157
157
|
|
158
158
|
# Split Dropdown Component
|
@@ -160,8 +160,8 @@ module UiBibz::Helpers::Ui::Core::FormsHelper
|
|
160
160
|
# +name+ (String) [Required]
|
161
161
|
# +options+ (Hash)
|
162
162
|
# +html_options+ (Hash)
|
163
|
-
def ui_split_dropdown(name, options = nil, html_options = nil, &
|
164
|
-
UiBibz::Ui::Core::Forms::Dropdowns::SplitDropdown.new(name, options, html_options).tap(&
|
163
|
+
def ui_split_dropdown(name, options = nil, html_options = nil, &)
|
164
|
+
UiBibz::Ui::Core::Forms::Dropdowns::SplitDropdown.new(name, options, html_options).tap(&).render
|
165
165
|
end
|
166
166
|
|
167
167
|
# Number Component
|
@@ -169,8 +169,8 @@ module UiBibz::Helpers::Ui::Core::FormsHelper
|
|
169
169
|
# +name+ (String) [Required]
|
170
170
|
# +options+ (Hash)
|
171
171
|
# +html_options+ (Hash)
|
172
|
-
def ui_number_field(name, options = nil, html_options = nil, &
|
173
|
-
UiBibz::Ui::Core::Forms::Numbers::NumberField.new(name, options, html_options, &
|
172
|
+
def ui_number_field(name, options = nil, html_options = nil, &)
|
173
|
+
UiBibz::Ui::Core::Forms::Numbers::NumberField.new(name, options, html_options, &).render
|
174
174
|
end
|
175
175
|
|
176
176
|
# Range Component
|
@@ -178,8 +178,8 @@ module UiBibz::Helpers::Ui::Core::FormsHelper
|
|
178
178
|
# +name+ (String) [Required]
|
179
179
|
# +options+ (Hash)
|
180
180
|
# +html_options+ (Hash)
|
181
|
-
def ui_range_field(name, options = nil, html_options = nil, &
|
182
|
-
UiBibz::Ui::Core::Forms::Numbers::RangeField.new(name, options, html_options, &
|
181
|
+
def ui_range_field(name, options = nil, html_options = nil, &)
|
182
|
+
UiBibz::Ui::Core::Forms::Numbers::RangeField.new(name, options, html_options, &).render
|
183
183
|
end
|
184
184
|
|
185
185
|
# Slider Component
|
@@ -187,8 +187,8 @@ module UiBibz::Helpers::Ui::Core::FormsHelper
|
|
187
187
|
# +name+ (String) [Required]
|
188
188
|
# +options+ (Hash)
|
189
189
|
# +html_options+ (Hash)
|
190
|
-
def ui_slider_field(name, options = nil, html_options = nil, &
|
191
|
-
UiBibz::Ui::Core::Forms::Numbers::SliderField.new(name, options, html_options, &
|
190
|
+
def ui_slider_field(name, options = nil, html_options = nil, &)
|
191
|
+
UiBibz::Ui::Core::Forms::Numbers::SliderField.new(name, options, html_options, &).render
|
192
192
|
end
|
193
193
|
|
194
194
|
# Slider Header Component
|
@@ -196,8 +196,8 @@ module UiBibz::Helpers::Ui::Core::FormsHelper
|
|
196
196
|
# +name+ (String) [Required]
|
197
197
|
# +options+ (Hash)
|
198
198
|
# +html_options+ (Hash)
|
199
|
-
def ui_slider_header(options, html_options = nil, &
|
200
|
-
UiBibz::Ui::Core::Forms::Numbers::SliderHeader.new(nil, options, html_options, &
|
199
|
+
def ui_slider_header(options, html_options = nil, &)
|
200
|
+
UiBibz::Ui::Core::Forms::Numbers::SliderHeader.new(nil, options, html_options, &).render
|
201
201
|
end
|
202
202
|
|
203
203
|
# File Component
|
@@ -205,7 +205,7 @@ module UiBibz::Helpers::Ui::Core::FormsHelper
|
|
205
205
|
# +name+ (String) [Required]
|
206
206
|
# +options+ (Hash)
|
207
207
|
# +html_options+ (Hash)
|
208
|
-
def ui_file_field(name, options = nil, html_options = nil, &
|
209
|
-
UiBibz::Ui::Core::Forms::Files::FileField.new(name, options, html_options, &
|
208
|
+
def ui_file_field(name, options = nil, html_options = nil, &)
|
209
|
+
UiBibz::Ui::Core::Forms::Files::FileField.new(name, options, html_options, &).render
|
210
210
|
end
|
211
211
|
end
|
@@ -11,8 +11,8 @@ module UiBibz::Helpers::Ui::Core::IconsHelper
|
|
11
11
|
# => glyph 'calendar', size: :xs
|
12
12
|
# or
|
13
13
|
# => glyph { name: 'calendar', size: :xs }
|
14
|
-
def ui_glyph(content, options = nil, html_options = nil, &
|
15
|
-
UiBibz::Ui::Core::Icons::Glyph.new(content, options, html_options, &
|
14
|
+
def ui_glyph(content, options = nil, html_options = nil, &)
|
15
|
+
UiBibz::Ui::Core::Icons::Glyph.new(content, options, html_options, &).render
|
16
16
|
end
|
17
17
|
|
18
18
|
# Glyph Group Component
|
@@ -21,8 +21,8 @@ module UiBibz::Helpers::Ui::Core::IconsHelper
|
|
21
21
|
# +options+ (Hash)
|
22
22
|
# +html_options+ (Hash)
|
23
23
|
#
|
24
|
-
def ui_glyph_group(content = nil, options = nil, html_options = nil, &
|
25
|
-
UiBibz::Ui::Core::Icons::GlyphGroup.new(content, options, html_options).tap(&
|
24
|
+
def ui_glyph_group(content = nil, options = nil, html_options = nil, &)
|
25
|
+
UiBibz::Ui::Core::Icons::GlyphGroup.new(content, options, html_options).tap(&).render
|
26
26
|
end
|
27
27
|
|
28
28
|
# Glyph Changer
|
@@ -37,7 +37,7 @@ module UiBibz::Helpers::Ui::Core::IconsHelper
|
|
37
37
|
#
|
38
38
|
# +options+ (Hash)
|
39
39
|
# +html_options+ (Hash)
|
40
|
-
def ui_star(content = nil, options = nil, html_options = nil, &
|
41
|
-
UiBibz::Ui::Core::Icons::Star.new(content, options, html_options, &
|
40
|
+
def ui_star(content = nil, options = nil, html_options = nil, &)
|
41
|
+
UiBibz::Ui::Core::Icons::Star.new(content, options, html_options, &).render
|
42
42
|
end
|
43
43
|
end
|
@@ -29,7 +29,7 @@ module UiBibz::Helpers::Ui::Core::LayoutsHelper
|
|
29
29
|
#
|
30
30
|
# +options+ (Hash)
|
31
31
|
# +html_options+ (Hash)
|
32
|
-
def ui_container(content = nil, options = nil, html_options = nil, &
|
33
|
-
UiBibz::Ui::Core::Layouts::Container.new(content, options, html_options, &
|
32
|
+
def ui_container(content = nil, options = nil, html_options = nil, &)
|
33
|
+
UiBibz::Ui::Core::Layouts::Container.new(content, options, html_options, &).render
|
34
34
|
end
|
35
35
|
end
|
@@ -5,8 +5,8 @@ module UiBibz::Helpers::Ui::Core::ListsHelper
|
|
5
5
|
#
|
6
6
|
# +options+ (Hash)
|
7
7
|
# +html_options+ (Hash)
|
8
|
-
def ui_list_group(content = nil, options = nil, html_options = nil, &
|
9
|
-
UiBibz::Ui::Core::Lists::ListGroup.new(content, options, html_options).tap(&
|
8
|
+
def ui_list_group(content = nil, options = nil, html_options = nil, &)
|
9
|
+
UiBibz::Ui::Core::Lists::ListGroup.new(content, options, html_options).tap(&).render
|
10
10
|
end
|
11
11
|
|
12
12
|
# List Component
|
@@ -5,48 +5,48 @@ module UiBibz::Helpers::Ui::Core::NavigationsHelper
|
|
5
5
|
#
|
6
6
|
# +options+ (Hash)
|
7
7
|
# +html_options+ (Hash)
|
8
|
-
def ui_nav(content = nil, options = nil, html_options = nil, &
|
9
|
-
UiBibz::Ui::Core::Navigations::Nav.new(content, options, html_options).tap(&
|
8
|
+
def ui_nav(content = nil, options = nil, html_options = nil, &)
|
9
|
+
UiBibz::Ui::Core::Navigations::Nav.new(content, options, html_options).tap(&).render
|
10
10
|
end
|
11
11
|
|
12
12
|
# TabGroup Component
|
13
13
|
#
|
14
14
|
# +options+ (Hash)
|
15
15
|
# +html_options+ (Hash)
|
16
|
-
def ui_tab_group(content = nil, options = nil, html_options = nil, &
|
17
|
-
UiBibz::Ui::Core::Navigations::TabGroup.new(content, options, html_options).tap(&
|
16
|
+
def ui_tab_group(content = nil, options = nil, html_options = nil, &)
|
17
|
+
UiBibz::Ui::Core::Navigations::TabGroup.new(content, options, html_options).tap(&).render
|
18
18
|
end
|
19
19
|
|
20
20
|
# Navbar Component
|
21
21
|
#
|
22
22
|
# +options+ (Hash)
|
23
23
|
# +html_options+ (Hash)
|
24
|
-
def ui_navbar(content = nil, options = nil, html_options = nil, &
|
25
|
-
UiBibz::Ui::Core::Navigations::Navbar.new(content, options, html_options).tap(&
|
24
|
+
def ui_navbar(content = nil, options = nil, html_options = nil, &)
|
25
|
+
UiBibz::Ui::Core::Navigations::Navbar.new(content, options, html_options).tap(&).render
|
26
26
|
end
|
27
27
|
|
28
28
|
# Pagination Component
|
29
29
|
#
|
30
30
|
# +options+ (Hash)
|
31
31
|
# +html_options+ (Hash)
|
32
|
-
def ui_pagination(content = nil, options = nil, html_options = nil, &
|
33
|
-
UiBibz::Ui::Core::Navigations::Pagination.new(content, options, html_options).tap(&
|
32
|
+
def ui_pagination(content = nil, options = nil, html_options = nil, &)
|
33
|
+
UiBibz::Ui::Core::Navigations::Pagination.new(content, options, html_options).tap(&).render
|
34
34
|
end
|
35
35
|
|
36
36
|
# Toolbar Component
|
37
37
|
#
|
38
38
|
# +options+ (Hash)
|
39
39
|
# +html_options+ (Hash)
|
40
|
-
def ui_toolbar(content = nil, options = nil, html_options = nil, &
|
41
|
-
UiBibz::Ui::Core::Navigations::Toolbar.new(content, options, html_options).tap(&
|
40
|
+
def ui_toolbar(content = nil, options = nil, html_options = nil, &)
|
41
|
+
UiBibz::Ui::Core::Navigations::Toolbar.new(content, options, html_options).tap(&).render
|
42
42
|
end
|
43
43
|
|
44
44
|
# Link Component
|
45
45
|
#
|
46
46
|
# +options+ (Hash)
|
47
47
|
# +html_options+ (Hash)
|
48
|
-
def ui_link(content = nil, options = nil, html_options = nil, &
|
49
|
-
UiBibz::Ui::Core::Navigations::Link.new(content, options, html_options, &
|
48
|
+
def ui_link(content = nil, options = nil, html_options = nil, &)
|
49
|
+
UiBibz::Ui::Core::Navigations::Link.new(content, options, html_options, &).render
|
50
50
|
end
|
51
51
|
|
52
52
|
# Breadcrumb Component
|
@@ -19,8 +19,8 @@ module UiBibz::Helpers::Ui::Core::NotificationsHelper
|
|
19
19
|
# +options+ (Hash)
|
20
20
|
# +html_options+ (Hash)
|
21
21
|
#
|
22
|
-
def ui_badge(content = nil, options = nil, html_options = nil, &
|
23
|
-
UiBibz::Ui::Core::Notifications::Badge.new(content, options, html_options, &
|
22
|
+
def ui_badge(content = nil, options = nil, html_options = nil, &)
|
23
|
+
UiBibz::Ui::Core::Notifications::Badge.new(content, options, html_options, &).render
|
24
24
|
end
|
25
25
|
|
26
26
|
# ProgressBar Component
|
@@ -52,8 +52,8 @@ module UiBibz::Helpers::Ui::Core::NotificationsHelper
|
|
52
52
|
# +options+ (Hash)
|
53
53
|
# +html_options+ (Hash)
|
54
54
|
#
|
55
|
-
def ui_spinner(content = nil, options = nil, html_options = nil, &
|
56
|
-
UiBibz::Ui::Core::Notifications::Spinner.new(content, options, html_options, &
|
55
|
+
def ui_spinner(content = nil, options = nil, html_options = nil, &)
|
56
|
+
UiBibz::Ui::Core::Notifications::Spinner.new(content, options, html_options, &).render
|
57
57
|
end
|
58
58
|
|
59
59
|
private
|
@@ -5,7 +5,15 @@ module UiBibz::Helpers::Ui::Core::WindowsHelper
|
|
5
5
|
#
|
6
6
|
# +options+ (Hash)
|
7
7
|
# +html_options+ (Hash)
|
8
|
-
def ui_modal(content = nil, options = nil, html_options = nil, &
|
9
|
-
UiBibz::Ui::Core::Windows::Modal.new(content, options, html_options).tap(&
|
8
|
+
def ui_modal(content = nil, options = nil, html_options = nil, &)
|
9
|
+
UiBibz::Ui::Core::Windows::Modal.new(content, options, html_options).tap(&).render
|
10
|
+
end
|
11
|
+
|
12
|
+
# Offcanvas Component
|
13
|
+
#
|
14
|
+
# +options+ (Hash)
|
15
|
+
# +html_options+ (Hash)
|
16
|
+
def ui_offcanvas(content = nil, options = nil, html_options = nil, &)
|
17
|
+
UiBibz::Ui::Core::Windows::Offcanvas.new(content, options, html_options).tap(&).render
|
10
18
|
end
|
11
19
|
end
|
@@ -58,7 +58,7 @@ module UiBibz::Helpers::Ui::UxHelper
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
def ui_panel(content = nil, options = nil, html_options = nil, &
|
62
|
-
UiBibz::Ui::Ux::Containers::Panel.new(content, options, html_options).tap(&
|
61
|
+
def ui_panel(content = nil, options = nil, html_options = nil, &)
|
62
|
+
UiBibz::Ui::Ux::Containers::Panel.new(content, options, html_options).tap(&).render
|
63
63
|
end
|
64
64
|
end
|
@@ -7,9 +7,9 @@ module UiBibz::Helpers::UtilsHelper
|
|
7
7
|
UiBibz::Utils::Internationalization.new(translation, options).translate
|
8
8
|
end
|
9
9
|
|
10
|
-
def ui_form_for(object, *args, &
|
10
|
+
def ui_form_for(object, *args, &)
|
11
11
|
options = args.extract_options!
|
12
|
-
simple_form_for(object, *(args << new_options(options)), &
|
12
|
+
simple_form_for(object, *(args << new_options(options)), &)
|
13
13
|
end
|
14
14
|
|
15
15
|
private
|
data/lib/ui_bibz/infos.rb
CHANGED
@@ -3,15 +3,15 @@
|
|
3
3
|
module UiBibz
|
4
4
|
NAME = 'Ui Bibz'
|
5
5
|
SLUG = 'ui_bibz'
|
6
|
-
BOOTSTRAP_VERSION = '5.
|
6
|
+
BOOTSTRAP_VERSION = '5.3.2'
|
7
7
|
DESCRIPTION = "A Rails Interface Framework using Bootstrap #{BOOTSTRAP_VERSION}.".freeze
|
8
8
|
SUMMARY = "Ui Bibz is an Ui Framework that allows you to build an interface very quickly and simply using Bootstrap #{BOOTSTRAP_VERSION}.".freeze
|
9
9
|
LICENSE = 'MIT'
|
10
|
-
FONTAWESOME_VERSION = '
|
10
|
+
FONTAWESOME_VERSION = '6.4.0'
|
11
11
|
HOMEPAGE = 'https://hummel.link/ui-bibz/'
|
12
12
|
REPO = 'git+https://github.com/thooams/ui_bibz.git'
|
13
13
|
EMAIL = 'thomas@hummel.link'
|
14
14
|
AUTHOR = 'Thooams [Thomas HUMMEL]'
|
15
|
-
VERSION = '
|
15
|
+
VERSION = '4.0.0.beta3'
|
16
16
|
AUTHORS = ['Thooams'].freeze
|
17
17
|
end
|
@@ -9,17 +9,17 @@ module UiBibzForm
|
|
9
9
|
|
10
10
|
attr_accessor :output_buffer
|
11
11
|
|
12
|
-
def ui_surround_field(content = nil, opts = nil, html_options = nil, &
|
12
|
+
def ui_surround_field(content = nil, opts = nil, html_options = nil, &)
|
13
13
|
content = (options || {}).merge(content || {})
|
14
14
|
content = content.merge(template: @template, form: self)
|
15
15
|
|
16
|
-
input_classes = UiBibz::
|
16
|
+
input_classes = UiBibz::Builders::HtmlClassesBuilder.join_classes('form-group', 'surround_field', options[:input_html].try(:[], :class))
|
17
17
|
wrapper_html = (options[:input_html] || {}).merge({ class: input_classes })
|
18
|
-
surround_field = UiBibz::Ui::Core::Forms::Surrounds::SurroundField.new(content, opts, html_options).tap(&
|
18
|
+
surround_field = UiBibz::Ui::Core::Forms::Surrounds::SurroundField.new(content, opts, html_options).tap(&)
|
19
19
|
errors_text = surround_field.errors.flatten.to_sentence
|
20
20
|
required = surround_field.required_fields.any?(true)
|
21
|
-
wrapper_classes = UiBibz::
|
22
|
-
label_classes = UiBibz::
|
21
|
+
wrapper_classes = UiBibz::Builders::HtmlClassesBuilder.join_classes(('has-error' if errors_text.present?), wrapper_html.try(:[], :class))
|
22
|
+
label_classes = UiBibz::Builders::HtmlClassesBuilder.join_classes(('required' if required), 'control-label')
|
23
23
|
abbr_html = content_tag('abbr', I18n.t(:'simple_form.required.mark', default: '*'), title: I18n.t(:'simple_form.required.text', default: 'required')) if required
|
24
24
|
|
25
25
|
wrapper_html[:class] = wrapper_classes
|
@@ -31,26 +31,26 @@ module UiBibzForm
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
def ui_button_group(content = nil, opts = nil, html_options = nil, &
|
35
|
-
ui_component_group_by(UiBibz::Ui::Core::Forms::Buttons::ButtonGroup, content, opts, html_options, &
|
34
|
+
def ui_button_group(content = nil, opts = nil, html_options = nil, &)
|
35
|
+
ui_component_group_by(UiBibz::Ui::Core::Forms::Buttons::ButtonGroup, content, opts, html_options, &)
|
36
36
|
end
|
37
37
|
|
38
|
-
def ui_choice_group(content = nil, opts = nil, html_options = nil, &
|
39
|
-
ui_component_group_by(UiBibz::Ui::Core::Forms::Choices::ChoiceGroup, content, opts, html_options, &
|
38
|
+
def ui_choice_group(content = nil, opts = nil, html_options = nil, &)
|
39
|
+
ui_component_group_by(UiBibz::Ui::Core::Forms::Choices::ChoiceGroup, content, opts, html_options, &)
|
40
40
|
end
|
41
41
|
|
42
42
|
private
|
43
43
|
|
44
|
-
def ui_component_group_by(component_class, content = nil, opts = nil, html_options = nil, &
|
44
|
+
def ui_component_group_by(component_class, content = nil, opts = nil, html_options = nil, &)
|
45
45
|
content = (options || {}).merge(content || {})
|
46
46
|
content = content.merge(template: @template, form: self)
|
47
47
|
|
48
|
-
input_classes = UiBibz::
|
48
|
+
input_classes = UiBibz::Builders::HtmlClassesBuilder.join_classes('button_group', options[:input_html].try(:[], :class))
|
49
49
|
wrapper_html = (options[:input_html] || {}).merge({ class: input_classes })
|
50
50
|
|
51
51
|
content_tag :div, wrapper_html do
|
52
52
|
concat content_tag(:label, content[:label]) unless content[:label].nil?
|
53
|
-
concat component_class.new(content, opts, html_options).tap(&
|
53
|
+
concat component_class.new(content, opts, html_options).tap(&).render
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
@@ -7,7 +7,7 @@ module UiBibzInputs
|
|
7
7
|
|
8
8
|
def input_html_options
|
9
9
|
opts = super
|
10
|
-
input_classes = UiBibz::
|
10
|
+
input_classes = UiBibz::Builders::HtmlClassesBuilder.join_classes(@builder.options[:input_html].try(:[], :class), options[:input_html].try(:[], :class), options[:class])
|
11
11
|
opts = opts.merge({ prompt: options[:prompt] }) if options[:prompt].present?
|
12
12
|
opts = opts.merge({ disabled: options[:disabled] }) if options[:disabled].present?
|
13
13
|
opts = opts.merge({ include_blank: options[:include_blank] }) if options[:include_blank].present?
|
data/lib/ui_bibz/rails/engine.rb
CHANGED
@@ -8,18 +8,35 @@ module UiBibz
|
|
8
8
|
module Rails
|
9
9
|
class Engine < ::Rails::Engine
|
10
10
|
initializer 'ui_bibz.helpers' do
|
11
|
-
|
11
|
+
ActiveSupport.on_load(:action_view) { include UiBibz::Helpers::UtilsHelper }
|
12
12
|
end
|
13
13
|
|
14
14
|
initializer 'ui_bibz.helpers.ui' do
|
15
|
-
|
16
|
-
|
15
|
+
ActiveSupport.on_load(:action_view) { include UiBibz::Helpers::Ui::CoreHelper }
|
16
|
+
ActiveSupport.on_load(:action_view) { include UiBibz::Helpers::Ui::UxHelper }
|
17
17
|
end
|
18
18
|
|
19
19
|
config.autoload_paths += Dir["#{config.root}/lib/ui_bibz/inputs/"] if defined?(::SimpleForm)
|
20
20
|
|
21
21
|
initializer 'ui_bibz.helpers.form' do
|
22
|
-
|
22
|
+
ActiveSupport.on_load(:action_view) { include UiBibzForm }
|
23
|
+
end
|
24
|
+
|
25
|
+
initializer 'ui_bibz.assets' do |app|
|
26
|
+
%w[stylesheets javascripts config fonts images].each do |sub|
|
27
|
+
app.config.assets.paths << root.join('assets', sub).to_s
|
28
|
+
app.config.assets.paths << root.join('vendor/assets', sub).to_s
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
initializer 'ui_bibz.importmap', before: 'importmap' do |app|
|
33
|
+
app.config.importmap.paths << Engine.root.join('config/importmap.rb')
|
34
|
+
app.config.importmap.cache_sweepers << Engine.root.join('app/assets/javascripts')
|
35
|
+
end
|
36
|
+
|
37
|
+
initializer 'ui_bibz.assets.precompile' do |app|
|
38
|
+
app.config.assets.precompile += %w[bootstrap.min.js popper.js
|
39
|
+
jquery-3.7.0.min.js bootstrap-multiselect.min.js jquery.multi-select.min.js"]
|
23
40
|
end
|
24
41
|
end
|
25
42
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module UiBibz
|
4
|
+
module Strategies
|
5
|
+
# Class to initialize component
|
6
|
+
class ComponentInitializeAbstractStrategy
|
7
|
+
def initialize(component, component_binding)
|
8
|
+
@component = component
|
9
|
+
@binding = component_binding
|
10
|
+
@content = component_binding.local_variable_get(:content)
|
11
|
+
@options = component_binding.local_variable_get(:options)
|
12
|
+
@html_options = component_binding.local_variable_get(:html_options)
|
13
|
+
@block = component_binding.local_variable_get(:block)
|
14
|
+
end
|
15
|
+
|
16
|
+
def tapped?
|
17
|
+
false
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def with_indifferent_access(hash)
|
23
|
+
(hash || {}).with_indifferent_access
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module UiBibz
|
4
|
+
module Strategies
|
5
|
+
# Class to initialize component
|
6
|
+
class ComponentInitializeBlockStrategy < UiBibz::Strategies::ComponentInitializeAbstractStrategy
|
7
|
+
def content
|
8
|
+
context = eval('self', @block.binding) # rubocop:disable Style/EvalWithLocation
|
9
|
+
read_cache.nil? ? context.capture(&@block) : read_cache
|
10
|
+
end
|
11
|
+
|
12
|
+
def options
|
13
|
+
with_indifferent_access(@content)
|
14
|
+
end
|
15
|
+
|
16
|
+
def html_options
|
17
|
+
with_indifferent_access(@options)
|
18
|
+
end
|
19
|
+
|
20
|
+
def tapped?
|
21
|
+
UiBibz::Utils::Screwdriver.tapped?(@block)
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def read_cache
|
27
|
+
::Rails.cache.read(@options.try(:[], :cache))
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module UiBibz
|
4
|
+
module Strategies
|
5
|
+
# Class to initialize component
|
6
|
+
class ComponentInitializeHashStrategy < UiBibz::Strategies::ComponentInitializeAbstractStrategy
|
7
|
+
def content; end
|
8
|
+
|
9
|
+
def options
|
10
|
+
with_indifferent_access(@content)
|
11
|
+
end
|
12
|
+
|
13
|
+
def html_options
|
14
|
+
with_indifferent_access(@options)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|