avo 3.30.4 → 4.0.0.beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +18 -1
- data/Gemfile.lock +257 -174
- data/README.md +1 -1
- data/app/assets/builds/avo/application.css +13979 -0
- data/app/assets/builds/avo/application.js +1160 -0
- data/app/assets/builds/avo/application.js.map +7 -0
- data/app/assets/builds/avo/late-registration.js +2 -0
- data/app/assets/builds/avo/late-registration.js.map +7 -0
- data/app/assets/config/avo_manifest.js +2 -1
- data/app/assets/images/avo/placeholder.svg +1 -0
- data/app/assets/stylesheets/application.css +250 -0
- data/app/assets/stylesheets/css/button-group.css +23 -0
- data/app/assets/stylesheets/css/components/avatar.css +128 -0
- data/app/assets/stylesheets/css/components/breadcrumbs.css +43 -0
- data/app/assets/stylesheets/css/components/button.css +343 -0
- data/app/assets/stylesheets/css/components/color_scheme_switcher.css +226 -0
- data/app/assets/stylesheets/css/components/discreet_information.css +49 -0
- data/app/assets/stylesheets/css/components/field-wrapper.css +107 -0
- data/app/assets/stylesheets/css/components/grid.css +120 -0
- data/app/assets/stylesheets/css/components/input.css +312 -0
- data/app/assets/stylesheets/css/components/modal.css +228 -0
- data/app/assets/stylesheets/css/components/tooltip.css +25 -0
- data/app/assets/stylesheets/css/components/ui/badge.css +143 -0
- data/app/assets/stylesheets/css/components/ui/card.css +95 -0
- data/app/assets/stylesheets/css/components/ui/checkbox.css +50 -0
- data/app/assets/stylesheets/css/components/ui/description_list.css +3 -0
- data/app/assets/stylesheets/css/components/ui/dropdown.css +68 -0
- data/app/assets/stylesheets/css/components/ui/file_upload_input.css +94 -0
- data/app/assets/stylesheets/css/components/ui/file_upload_item.css +78 -0
- data/app/assets/stylesheets/css/components/ui/panel.css +59 -0
- data/app/assets/stylesheets/css/components/ui/panel_header.css +48 -0
- data/app/assets/stylesheets/css/components/ui/radio.css +22 -0
- data/app/assets/stylesheets/css/components/ui/tabs.css +74 -0
- data/app/assets/stylesheets/css/css-animations.css +54 -0
- data/app/assets/stylesheets/css/fields/code.css +75 -9
- data/app/assets/stylesheets/css/fields/easy-mde.css +7 -0
- data/app/assets/stylesheets/css/fields/key_value.css +97 -0
- data/app/assets/stylesheets/css/fields/progress.css +4 -4
- data/app/assets/stylesheets/css/fields/status.css +7 -1
- data/app/assets/stylesheets/css/fields/tags.css +33 -16
- data/app/assets/stylesheets/css/fields/tiptap.css +17 -15
- data/app/assets/stylesheets/css/fields/trix.css +62 -2
- data/app/assets/stylesheets/css/fonts.css +24 -24
- data/app/assets/stylesheets/css/layout.css +135 -0
- data/app/assets/stylesheets/css/pagination.css +114 -78
- data/app/assets/stylesheets/css/resource-controls.css +13 -0
- data/app/assets/stylesheets/css/search.css +22 -12
- data/app/assets/stylesheets/css/sidebar.css +310 -24
- data/app/assets/stylesheets/css/table.css +60 -0
- data/app/assets/stylesheets/css/tooltips.css +1 -1
- data/app/assets/stylesheets/css/typography.css +10 -1
- data/app/assets/stylesheets/css/variables.css +318 -0
- data/app/assets/svgs/avo/moon-plus-plus.svg +1 -0
- data/app/components/avo/actions_component.html.erb +30 -36
- data/app/components/avo/actions_component.rb +8 -11
- data/app/components/avo/alert_component.html.erb +3 -3
- data/app/components/avo/alert_component.rb +1 -1
- data/app/components/avo/asset_manager/javascript_component.html.erb +1 -2
- data/app/components/avo/backtrace_alert_component.html.erb +4 -4
- data/app/components/avo/base_component.rb +3 -4
- data/app/components/avo/breadcrumb_element_component.html.erb +17 -0
- data/app/components/avo/breadcrumb_element_component.rb +21 -0
- data/app/components/avo/breadcrumbs_component.html.erb +19 -0
- data/app/components/avo/breadcrumbs_component.rb +5 -0
- data/app/components/avo/button_component.rb +20 -126
- data/app/components/avo/clipboard_component.html.erb +3 -2
- data/app/components/avo/clipboard_component.rb +1 -1
- data/app/components/avo/component_missing_component.rb +11 -0
- data/app/components/avo/cover_component.html.erb +3 -0
- data/app/components/avo/cover_component.rb +25 -0
- data/app/components/avo/debug/status_component.html.erb +59 -0
- data/app/components/avo/debug/status_component.rb +30 -0
- data/app/components/avo/description_list_component.rb +11 -0
- data/app/components/avo/discreet_information_component.html.erb +31 -6
- data/app/components/avo/discreet_information_component.rb +23 -32
- data/app/components/avo/divider_component.html.erb +2 -2
- data/app/components/avo/empty_state_component.html.erb +2 -9
- data/app/components/avo/empty_state_component.rb +0 -8
- data/app/components/avo/field_wrapper_component.html.erb +21 -22
- data/app/components/avo/field_wrapper_component.rb +9 -18
- data/app/components/avo/fields/avatar_field/index_component.html.erb +9 -0
- data/app/components/avo/fields/avatar_field/index_component.rb +4 -0
- data/app/components/avo/fields/badge_field/index_component.html.erb +7 -1
- data/app/components/avo/fields/badge_field/show_component.html.erb +6 -1
- data/app/components/avo/fields/belongs_to_field/edit_component.html.erb +16 -14
- data/app/components/avo/fields/belongs_to_field/edit_component.rb +13 -3
- data/app/components/avo/fields/boolean_field/edit_component.html.erb +2 -2
- data/app/components/avo/fields/boolean_group_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/boolean_group_field/edit_component.rb +2 -3
- data/app/components/avo/fields/code_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/common/boolean_check_component.rb +3 -3
- data/app/components/avo/fields/common/boolean_group_component.html.erb +2 -2
- data/app/components/avo/fields/common/files/controls_component.html.erb +30 -27
- data/app/components/avo/fields/common/files/controls_component.rb +0 -1
- data/app/components/avo/fields/common/files/list_viewer_component.html.erb +4 -5
- data/app/components/avo/fields/common/files/view_type/grid_item_component.html.erb +1 -1
- data/app/components/avo/fields/common/files/view_type/list_item_component.html.erb +7 -19
- data/app/components/avo/fields/common/heading_component.html.erb +2 -2
- data/app/components/avo/fields/common/heading_component.rb +1 -1
- data/app/components/avo/fields/common/key_value_component.html.erb +20 -24
- data/app/components/avo/fields/common/nested_field_component.html.erb +1 -1
- data/app/components/avo/fields/common/nested_field_component.rb +1 -1
- data/app/components/avo/fields/common/progress_bar_component.html.erb +2 -2
- data/app/components/avo/fields/common/stars_component.html.erb +1 -1
- data/app/components/avo/fields/common/status_viewer_component.html.erb +4 -10
- data/app/components/avo/fields/date_field/edit_component.html.erb +14 -1
- data/app/components/avo/fields/date_time_field/edit_component.html.erb +3 -3
- data/app/components/avo/fields/easy_mde_field/show_component.html.erb +1 -1
- data/app/components/avo/fields/edit_component.rb +9 -5
- data/app/components/avo/fields/file_field/edit_component.html.erb +14 -6
- data/app/components/avo/fields/files_field/edit_component.html.erb +11 -4
- data/app/components/avo/fields/has_one_field/show_component.html.erb +10 -9
- data/app/components/avo/fields/heading_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/heading_field/show_component.html.erb +2 -2
- data/app/components/avo/fields/password_field/edit_component.html.erb +5 -7
- data/app/components/avo/fields/progress_bar_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/radio_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/show_component.rb +4 -7
- data/app/components/avo/fields/stars_field/edit_component.html.erb +3 -4
- data/app/components/avo/fields/tags_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/tags_field/tag_component.html.erb +7 -8
- data/app/components/avo/fields/time_field/edit_component.html.erb +3 -3
- data/app/components/avo/fields/tiptap_field/edit_component.html.erb +11 -11
- data/app/components/avo/fields/tiptap_field/show_component.html.erb +4 -4
- data/app/components/avo/fields/trix_field/edit_component.html.erb +2 -2
- data/app/components/avo/filters_component.html.erb +8 -16
- data/app/components/avo/index/field_wrapper_component.html.erb +9 -2
- data/app/components/avo/index/field_wrapper_component.rb +0 -16
- data/app/components/avo/index/grid_cover_empty_state_component.html.erb +16 -2
- data/app/components/avo/index/grid_cover_empty_state_component.rb +90 -0
- data/app/components/avo/index/grid_item_component.html.erb +29 -12
- data/app/components/avo/index/grid_item_component.rb +12 -10
- data/app/components/avo/index/resource_controls_component.html.erb +1 -1
- data/app/components/avo/index/resource_controls_component.rb +7 -17
- data/app/components/avo/index/resource_controls_dropdown_component.html.erb +3 -0
- data/app/components/avo/index/resource_controls_dropdown_component.rb +81 -0
- data/app/components/avo/index/table_row_component.html.erb +11 -11
- data/app/components/avo/items/panel_component.html.erb +8 -18
- data/app/components/avo/items/panel_component.rb +0 -20
- data/app/components/avo/items/switcher_component.html.erb +60 -1
- data/app/components/avo/items/switcher_component.rb +10 -5
- data/app/components/avo/items/visible_items_component.html.erb +2 -1
- data/app/components/avo/items/visible_items_component.rb +1 -0
- data/app/components/avo/media_library/item_details_component.html.erb +2 -2
- data/app/components/avo/media_library/list_component.html.erb +24 -19
- data/app/components/avo/media_library/list_component.rb +2 -2
- data/app/components/avo/media_library/list_item_component.html.erb +3 -3
- data/app/components/avo/modal_component.html.erb +52 -20
- data/app/components/avo/modal_component.rb +7 -12
- data/app/components/avo/paginator_component.html.erb +46 -33
- data/app/components/avo/paginator_component.rb +10 -5
- data/app/components/avo/panel_name_component.html.erb +1 -1
- data/app/components/avo/profile_item_component.html.erb +4 -4
- data/app/components/avo/profile_item_component.rb +2 -4
- data/app/components/avo/referrer_params_component.html.erb +1 -1
- data/app/components/avo/resource_component.rb +8 -19
- data/app/components/avo/resource_listing_component.html.erb +22 -0
- data/app/components/avo/resource_listing_component.rb +28 -0
- data/app/components/avo/resource_sidebar_component.html.erb +2 -2
- data/app/components/avo/resource_sidebar_component.rb +0 -4
- data/app/components/avo/row_component.html.erb +1 -1
- data/app/components/avo/row_selector_component.html.erb +2 -4
- data/app/components/avo/row_selector_component.rb +0 -1
- data/app/components/avo/search_overlay_component.html.erb +6 -0
- data/app/components/avo/search_overlay_component.rb +2 -0
- data/app/components/avo/sidebar/base_item_component.rb +9 -9
- data/app/components/avo/sidebar/group_component.html.erb +23 -27
- data/app/components/avo/sidebar/group_component.rb +4 -0
- data/app/components/avo/sidebar/link_component.html.erb +30 -7
- data/app/components/avo/sidebar/link_component.rb +30 -2
- data/app/components/avo/sidebar/section_component.html.erb +31 -11
- data/app/components/avo/sidebar/section_component.rb +1 -3
- data/app/components/avo/sidebar_component.html.erb +35 -36
- data/app/components/avo/sidebar_component.rb +16 -0
- data/app/components/avo/sidebar_profile_component.html.erb +27 -36
- data/app/components/avo/sidebar_profile_component.rb +14 -0
- data/app/components/avo/tab_group_component.html.erb +21 -9
- data/app/components/avo/tab_group_component.rb +54 -15
- data/app/components/avo/turbo_frame_wrapper_component.html.erb +4 -8
- data/app/components/avo/turbo_frame_wrapper_component.rb +9 -0
- data/app/components/avo/u_i/avatar_component.html.erb +11 -0
- data/app/components/avo/u_i/avatar_component.rb +61 -0
- data/app/components/avo/u_i/badge_component.html.erb +9 -0
- data/app/components/avo/u_i/badge_component.rb +35 -0
- data/app/components/avo/u_i/card_component.html.erb +29 -0
- data/app/components/avo/u_i/card_component.rb +65 -0
- data/app/components/avo/u_i/dropdown_component.html.erb +14 -0
- data/app/components/avo/u_i/dropdown_component.rb +26 -0
- data/app/components/avo/u_i/dropdown_menu_component.html.erb +16 -0
- data/app/components/avo/u_i/dropdown_menu_component.rb +8 -0
- data/app/components/avo/u_i/file_upload_input_component.html.erb +26 -0
- data/app/components/avo/u_i/file_upload_input_component.rb +15 -0
- data/app/components/avo/u_i/file_upload_item_component.html.erb +48 -0
- data/app/components/avo/u_i/file_upload_item_component.rb +17 -0
- data/app/components/avo/u_i/icon_button_component.html.erb +7 -0
- data/app/components/avo/u_i/icon_button_component.rb +22 -0
- data/app/components/avo/u_i/panel_component.html.erb +49 -0
- data/app/components/avo/u_i/panel_component.rb +29 -0
- data/app/components/avo/u_i/panel_header_component.html.erb +37 -0
- data/app/components/avo/u_i/panel_header_component.rb +24 -0
- data/app/components/avo/u_i/search_input_component.html.erb +28 -0
- data/app/components/avo/u_i/search_input_component.rb +12 -0
- data/app/components/avo/u_i/tabs/tab_component.html.erb +26 -0
- data/app/components/avo/u_i/tabs/tab_component.rb +25 -0
- data/app/components/avo/u_i/tabs/tabs_component.html.erb +7 -0
- data/app/components/avo/u_i/tabs/tabs_component.rb +13 -0
- data/app/components/avo/view_types/base_view_type_component.rb +26 -0
- data/app/components/avo/view_types/grid_component.html.erb +18 -0
- data/app/components/avo/view_types/grid_component.rb +4 -0
- data/app/components/avo/view_types/map_component.html.erb +17 -0
- data/app/components/avo/view_types/map_component.rb +110 -0
- data/app/components/avo/view_types/table_component.html.erb +63 -0
- data/app/components/avo/{index/resource_table_component.rb → view_types/table_component.rb} +1 -10
- data/app/components/avo/views/resource_edit_component.html.erb +12 -18
- data/app/components/avo/views/resource_edit_component.rb +1 -27
- data/app/components/avo/views/resource_index_component.html.erb +97 -74
- data/app/components/avo/views/resource_index_component.rb +23 -3
- data/app/components/avo/views/resource_show_component.html.erb +4 -2
- data/app/components/avo/views/resource_show_component.rb +1 -4
- data/app/controllers/avo/associations_controller.rb +1 -1
- data/app/controllers/avo/base_application_controller.rb +7 -5
- data/app/controllers/avo/base_controller.rb +139 -40
- data/app/controllers/avo/debug_controller.rb +0 -29
- data/app/controllers/avo/media_library_controller.rb +17 -1
- data/app/controllers/avo/search_controller.rb +5 -0
- data/app/controllers/concerns/avo/initializes_avo.rb +7 -8
- data/app/helpers/avo/application_helper.rb +60 -46
- data/app/helpers/avo/turbo_stream_actions_helper.rb +10 -1
- data/app/helpers/avo/url_helpers.rb +3 -2
- data/app/javascript/{avo.base.js → application.js} +9 -18
- data/app/javascript/js/application.js +40 -0
- data/app/javascript/js/controllers/action_controller.js +4 -4
- data/app/javascript/js/controllers/actions_overflow_controller.js +21 -6
- data/app/javascript/js/controllers/color_scheme_switcher_controller.js +226 -0
- data/app/javascript/js/controllers/dropdown_menu_controller.js +42 -0
- data/app/javascript/js/controllers/fields/code_field_controller.js +20 -3
- data/app/javascript/js/controllers/fields/easy_mde_controller.js +23 -1
- data/app/javascript/js/controllers/fields/key_value_controller.js +43 -39
- data/app/javascript/js/controllers/fields/panel_refresh_controller.js +4 -0
- data/app/javascript/js/controllers/fields/tags_field_controller.js +2 -2
- data/app/javascript/js/controllers/fields/tags_field_helpers.js +4 -6
- data/app/javascript/js/controllers/grid_cover_empty_state_controller.js +42 -0
- data/app/javascript/js/controllers/item_selector_controller.js +0 -2
- data/app/javascript/js/controllers/loading_button_controller.js +1 -5
- data/app/javascript/js/controllers/map_dark_mode_controller.js +131 -0
- data/app/javascript/js/controllers/menu_controller.js +38 -16
- data/app/javascript/js/controllers/modal_controller.js +16 -0
- data/app/javascript/js/controllers/modal_size_controller.js +83 -0
- data/app/javascript/js/controllers/nested_form_controller.js +2 -2
- data/app/javascript/js/controllers/password_visibility_controller.js +13 -0
- data/app/javascript/js/controllers/preview_controller.js +2 -2
- data/app/javascript/js/controllers/resource_search_controller.js +123 -0
- data/app/javascript/js/controllers/search_controller.js +10 -29
- data/app/javascript/js/controllers/sidebar_controller.js +29 -9
- data/app/javascript/js/controllers/table_row_controller.js +28 -0
- data/app/javascript/js/controllers/tippy_controller.js +1 -1
- data/app/javascript/js/controllers/toggle_controller.js +40 -5
- data/app/javascript/js/controllers.js +14 -2
- data/app/javascript/js/custom-stream-actions.js +10 -8
- data/app/views/avo/actions/show.html.erb +14 -10
- data/app/views/avo/base/_boolean_filter.html.erb +1 -1
- data/app/views/avo/base/_date_time_filter.html.erb +3 -3
- data/app/views/avo/base/_multiple_select_filter.html.erb +1 -1
- data/app/views/avo/base/_new_via_belongs_to.html.erb +2 -3
- data/app/views/avo/base/_text_filter.html.erb +1 -1
- data/app/views/avo/base/preview.html.erb +5 -4
- data/app/views/avo/debug/status.html.erb +5 -92
- data/app/views/avo/debug/status.text.erb +0 -2
- data/app/views/avo/home/_actions.html.erb +1 -1
- data/app/views/avo/home/_dashboards.html.erb +1 -1
- data/app/views/avo/home/_filters.html.erb +1 -1
- data/app/views/avo/home/_resources.html.erb +2 -2
- data/app/views/avo/home/failed_to_load.html.erb +2 -2
- data/app/views/avo/home/index.html.erb +25 -25
- data/app/views/avo/media_library/_form.html.erb +43 -28
- data/app/views/avo/media_library/show.html.erb +7 -3
- data/app/views/avo/modal/_size_selector.html.erb +46 -0
- data/app/views/avo/partials/_alerts.html.erb +1 -1
- data/app/views/avo/partials/_color_scheme_switcher.html.erb +106 -0
- data/app/views/avo/partials/_color_theme_override.html.erb +49 -0
- data/app/views/avo/partials/_confirm_dialog.html.erb +19 -17
- data/app/views/avo/partials/_custom_tools_alert.html.erb +6 -6
- data/app/views/avo/partials/_footer.html.erb +1 -1
- data/app/views/avo/partials/_header.html.erb +1 -1
- data/app/views/avo/partials/_javascript.html.erb +0 -2
- data/app/views/avo/partials/_navbar.html.erb +53 -8
- data/app/views/avo/partials/_sortable_component.html.erb +1 -1
- data/app/views/avo/partials/_table_header.html.erb +28 -19
- data/app/views/avo/partials/_view_toggle_button.html.erb +6 -29
- data/app/views/avo/partials/distribution_chart.html.erb +2 -2
- data/app/views/avo/private/_links_and_buttons.html.erb +12 -8
- data/app/views/avo/private/design.html.erb +8 -4
- data/app/views/avo/sidebar/_license_warning.html.erb +3 -3
- data/app/views/layouts/avo/application.html.erb +39 -17
- data/app/views/layouts/avo/modal.html.erb +7 -0
- data/avo.gemspec +3 -4
- data/config/i18n-tasks.yml +1 -1
- data/config/importmap.rb +1 -0
- data/config/initializers/pagy.rb +5 -25
- data/config/routes/dynamic_routes.rb +4 -0
- data/config/routes.rb +6 -7
- data/db/factories.rb +14 -0
- data/lib/avo/asset_manager.rb +2 -0
- data/lib/avo/avatar.rb +7 -0
- data/lib/avo/base_action.rb +16 -4
- data/lib/avo/concerns/breadcrumbs.rb +7 -66
- data/lib/avo/concerns/form_builder.rb +41 -0
- data/lib/avo/concerns/{has_profile_photo.rb → has_avatar.rb} +8 -4
- data/lib/avo/concerns/{has_cover_photo.rb → has_cover.rb} +4 -4
- data/lib/avo/concerns/has_description.rb +9 -0
- data/lib/avo/concerns/has_item_type.rb +6 -2
- data/lib/avo/concerns/has_items.rb +43 -58
- data/lib/avo/concerns/pagination.rb +29 -19
- data/lib/avo/concerns/row_controls_configuration.rb +22 -15
- data/lib/avo/configuration/branding.rb +7 -7
- data/lib/avo/configuration.rb +92 -45
- data/lib/avo/{cover_photo.rb → cover.rb} +2 -2
- data/lib/avo/current.rb +0 -11
- data/lib/avo/discreet_information.rb +52 -29
- data/lib/avo/dsl/field_parser.rb +1 -1
- data/lib/avo/engine.rb +41 -8
- data/lib/avo/error_manager.rb +1 -1
- data/lib/avo/fields/avatar_field.rb +19 -0
- data/lib/avo/fields/badge_field.rb +23 -3
- data/lib/avo/fields/base_field.rb +46 -1
- data/lib/avo/fields/concerns/dom_id.rb +17 -0
- data/lib/avo/fields/concerns/file_authorization.rb +4 -0
- data/lib/avo/fields/concerns/has_html_attributes.rb +1 -1
- data/lib/avo/fields/concerns/is_searchable.rb +2 -5
- data/lib/avo/fields/concerns/nested.rb +1 -1
- data/lib/avo/fields/files_field.rb +2 -2
- data/lib/avo/fields/frame_base_field.rb +2 -2
- data/lib/avo/fields/id_field.rb +5 -1
- data/lib/avo/fields/progress_bar_field.rb +1 -1
- data/lib/avo/fields/text_field.rb +1 -1
- data/lib/avo/photo_object.rb +12 -1
- data/lib/avo/plugin_manager.rb +4 -0
- data/lib/avo/resources/base.rb +33 -21
- data/lib/avo/resources/controls/actions_list.rb +3 -3
- data/lib/avo/resources/controls/base_control.rb +1 -1
- data/lib/avo/resources/items/card.rb +16 -0
- data/lib/avo/resources/items/header.rb +11 -0
- data/lib/avo/resources/items/holder.rb +18 -23
- data/lib/avo/resources/items/item_group.rb +5 -7
- data/lib/avo/resources/items/sidebar.rb +5 -9
- data/lib/avo/resources/items/tab.rb +8 -8
- data/lib/avo/resources/items/tab_group.rb +8 -10
- data/lib/avo/resources/resource_manager.rb +2 -1
- data/lib/avo/services/hq_reporter.rb +102 -0
- data/lib/avo/services/telemetry_service.rb +0 -1
- data/lib/avo/test_helpers.rb +36 -22
- data/lib/avo/u_i_instance.rb +60 -0
- data/lib/avo/version.rb +1 -1
- data/lib/avo/view_inquirer.rb +6 -1
- data/lib/avo/view_types/view_type_manager.rb +70 -0
- data/lib/avo.rb +30 -45
- data/lib/generators/avo/action_generator.rb +1 -1
- data/lib/generators/avo/resource_generator.rb +43 -0
- data/lib/generators/avo/resource_tool_generator.rb +1 -1
- data/lib/generators/avo/tailwindcss/install_generator.rb +0 -6
- data/lib/generators/avo/templates/cards/partial_card_partial.tt +1 -1
- data/lib/generators/avo/templates/initializer/avo.tt +7 -9
- data/lib/generators/avo/templates/locales/avo.ar.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.de.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.en.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.es.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.fr.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.it.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.ja.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.nb.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.nl.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.nn.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.pl.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.pt-BR.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.pt.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.ro.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.ru.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.tr.yml +25 -0
- data/lib/generators/avo/templates/locales/{avo.uk.yml → avo.ua.yml} +26 -1
- data/lib/generators/avo/templates/locales/avo.zh-TW.yml +25 -0
- data/lib/generators/avo/templates/locales/avo.zh.yml +25 -0
- data/lib/generators/avo/templates/resource/resource.tt +10 -1
- data/lib/generators/avo/templates/resource_tools/partial.tt +20 -22
- data/lib/generators/avo/templates/tailwindcss/avo.tailwind.css +1 -3
- data/lib/generators/avo/templates/tailwindcss/tailwind.config.js +0 -7
- data/lib/generators/avo/templates/tool/view.tt +14 -16
- data/lib/generators/avo/tool_generator.rb +3 -3
- data/lib/generators/avo/version_generator.rb +1 -1
- data/lib/tasks/avo_tasks.rake +29 -25
- metadata +145 -97
- data/app/assets/stylesheets/avo.base.css +0 -130
- data/app/assets/stylesheets/css/breadcrumbs.css +0 -16
- data/app/assets/stylesheets/css/buttons.css +0 -19
- data/app/assets/stylesheets/css/tailwindcss/base.css +0 -1
- data/app/assets/stylesheets/css/tailwindcss/components.css +0 -1
- data/app/assets/stylesheets/css/tailwindcss/utilities.css +0 -1
- data/app/assets/svgs/avo/arrow-down.svg +0 -3
- data/app/assets/svgs/avo/arrow-up.svg +0 -3
- data/app/assets/svgs/avo/detach.svg +0 -8
- data/app/assets/svgs/avo/download-solid-reversed.svg +0 -3
- data/app/assets/svgs/avo/download-solid.svg +0 -3
- data/app/assets/svgs/avo/edit.svg +0 -5
- data/app/assets/svgs/avo/editor-bold.svg +0 -1
- data/app/assets/svgs/avo/editor-italic.svg +0 -1
- data/app/assets/svgs/avo/editor-link.svg +0 -1
- data/app/assets/svgs/avo/editor-list.svg +0 -1
- data/app/assets/svgs/avo/editor-strike.svg +0 -1
- data/app/assets/svgs/avo/editor-underline.svg +0 -1
- data/app/assets/svgs/avo/eye.svg +0 -1
- data/app/assets/svgs/avo/trash-sm.svg +0 -3
- data/app/assets/svgs/avo/trash.svg +0 -7
- data/app/components/avo/cover_photo_component.html.erb +0 -3
- data/app/components/avo/cover_photo_component.rb +0 -19
- data/app/components/avo/fields/common/badge_viewer_component.html.erb +0 -1
- data/app/components/avo/fields/common/badge_viewer_component.rb +0 -33
- data/app/components/avo/index/resource_grid_component.html.erb +0 -23
- data/app/components/avo/index/resource_grid_component.rb +0 -10
- data/app/components/avo/index/resource_map_component.html.erb +0 -16
- data/app/components/avo/index/resource_map_component.rb +0 -114
- data/app/components/avo/index/resource_table_component.html.erb +0 -52
- data/app/components/avo/panel_component.html.erb +0 -63
- data/app/components/avo/panel_component.rb +0 -43
- data/app/components/avo/panel_header_component.html.erb +0 -42
- data/app/components/avo/panel_header_component.rb +0 -31
- data/app/components/avo/profile_photo_component.html.erb +0 -6
- data/app/components/avo/profile_photo_component.rb +0 -9
- data/app/components/avo/sidebar/heading_component.html.erb +0 -21
- data/app/components/avo/sidebar/heading_component.rb +0 -9
- data/app/components/avo/tab_switcher_component.html.erb +0 -20
- data/app/components/avo/tab_switcher_component.rb +0 -45
- data/app/views/avo/base/close_modal_and_reload_field.turbo_stream.erb +0 -8
- data/app/views/avo/debug/report.html.erb +0 -37
- data/app/views/avo/partials/_panel_breadcrumbs.html.erb +0 -3
- data/app/views/avo/partials/_resource_search.html.erb +0 -16
- data/lib/avo/licensing/community_license.rb +0 -6
- data/lib/avo/licensing/h_q.rb +0 -202
- data/lib/avo/licensing/license.rb +0 -76
- data/lib/avo/licensing/license_manager.rb +0 -24
- data/lib/avo/licensing/nil_license.rb +0 -14
- data/lib/avo/licensing/pro_license.rb +0 -20
- data/lib/avo/licensing/request.rb +0 -20
- data/lib/avo/profile_photo.rb +0 -7
- data/lib/avo/services/debug_service.rb +0 -107
- data/public/avo-assets/placeholder.svg +0 -1
- data/tailwind.preset.js +0 -171
- /data/{public/avo-assets → app/assets/images/avo}/favicon.ico +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-500.eot +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-500.svg +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-500.ttf +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-500.woff +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-500.woff2 +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-600.eot +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-600.svg +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-600.ttf +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-600.woff +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-600.woff2 +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-700.eot +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-700.svg +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-700.ttf +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-700.woff +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-700.woff2 +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-regular.eot +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-regular.svg +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-regular.ttf +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-regular.woff +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/fonts/inter-v7-latin-regular.woff2 +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/logo-on-white.png +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/logo.png +0 -0
- /data/{public/avo-assets → app/assets/images/avo}/logomark.png +0 -0
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<% models.each do |model| %>
|
|
21
21
|
<code class="text-lg"><%= model.to_s %></code>
|
|
22
22
|
<div>
|
|
23
|
-
<code class="p-1 rounded bg-sky-500 text-white">bin/rails generate avo:resource <%= model.to_s %></code>
|
|
23
|
+
<code class="p-1 rounded-sm bg-sky-500 text-white">bin/rails generate avo:resource <%= model.to_s %></code>
|
|
24
24
|
</div>
|
|
25
25
|
<% end %>
|
|
26
26
|
</div>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
You may generate a resource using the following command:
|
|
31
31
|
<br>
|
|
32
32
|
|
|
33
|
-
<code class="p-1 rounded bg-sky-500 text-white">bin/rails generate avo:resource post</code>
|
|
33
|
+
<code class="p-1 rounded-sm bg-sky-500 text-white">bin/rails generate avo:resource post</code>
|
|
34
34
|
</div>
|
|
35
35
|
<% end %>
|
|
36
36
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<%= render Avo::TurboFrameWrapperComponent.new(params[:turbo_frame]) do %>
|
|
2
2
|
<%
|
|
3
|
-
classes = 'absolute inset-auto
|
|
3
|
+
classes = 'absolute inset-auto start-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2'
|
|
4
4
|
label = t 'avo.failed_to_load'
|
|
5
5
|
src_url = params[:src].present? && !params[:src].starts_with?('http://') ? CGI.escapeHTML(params[:src]) : nil
|
|
6
6
|
%>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<div class="relative block text-gray-300 h-64 w-full">
|
|
9
9
|
<%= svg "avo/failed_to_load", class: "#{classes} h-52 text-gray-400" %>
|
|
10
10
|
</div>
|
|
11
|
-
<div class="relative block text-center text-lg text-gray-400 font-semibold pb-6"><%= label %> <span class="border-b-2 border-dashed"><%= params[:turbo_frame].to_s.humanize.downcase if params[:turbo_frame].present? %></span> frame</div>
|
|
11
|
+
<div class="relative block text-center text-lg text-gray-400 font-semibold pb-6"><%= label %> <span class="border-b-2 border-gray-200 border-dashed"><%= params[:turbo_frame].to_s.humanize.downcase if params[:turbo_frame].present? %></span> frame</div>
|
|
12
12
|
<% if Rails.env.development? && src_url %>
|
|
13
13
|
<div class="text-center text-sm w-full pb-3">
|
|
14
14
|
This is not an issue with Avo. Use <%= link_to 'this page', src_url, target: :_blank %> to see why this frame failed to load.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div class="flex flex-col">
|
|
2
|
-
<%= render
|
|
3
|
-
<%
|
|
2
|
+
<%= render ui.panel(title: 'Welcome to Avo', description: 'This page is visible only in development. It will be hidden in other environments.') do |panel| %>
|
|
3
|
+
<% panel.with_body do %>
|
|
4
4
|
<div class="flex flex-col justify-between py-6 min-h-24">
|
|
5
5
|
<div class="px-6 space-y-4">
|
|
6
6
|
<h3>About</h3>
|
|
@@ -15,29 +15,29 @@
|
|
|
15
15
|
We have big plans for Avo to make it the default starting point of your application. We'll be releasing features as soon as they're ready.
|
|
16
16
|
|
|
17
17
|
<ul class="grid sm:grid-cols-2 max-w-168">
|
|
18
|
-
<li><span class="
|
|
19
|
-
<li><span class="
|
|
20
|
-
<li><span class="
|
|
21
|
-
<li><span class="
|
|
22
|
-
<li><span class="
|
|
23
|
-
<li><span class="
|
|
24
|
-
<li><span class="
|
|
25
|
-
<li><span class="
|
|
26
|
-
<li><span class="
|
|
27
|
-
<li><span class="
|
|
28
|
-
<li><span class="
|
|
29
|
-
<li><span class="
|
|
30
|
-
<li><span class="
|
|
31
|
-
<li><span class="
|
|
32
|
-
<li><span class="
|
|
33
|
-
<li><span class="
|
|
34
|
-
<li><span class="
|
|
35
|
-
<li><span class="
|
|
36
|
-
<li><span class="
|
|
37
|
-
<li><span class="
|
|
38
|
-
<li><span class="
|
|
39
|
-
<li><span class="
|
|
40
|
-
<li><span class="
|
|
18
|
+
<li><span class="me-2">👍</span> Built with Hotwire</li>
|
|
19
|
+
<li><span class="me-2">👍</span> Resources</li>
|
|
20
|
+
<li><span class="me-2">👍</span> Ordering</li>
|
|
21
|
+
<li><span class="me-2">👍</span> Filters</li>
|
|
22
|
+
<li><span class="me-2">👍</span> Actions</li>
|
|
23
|
+
<li><span class="me-2">👍</span> Grid view</li>
|
|
24
|
+
<li><span class="me-2">👍</span> Authorization</li>
|
|
25
|
+
<li><span class="me-2">👍</span> Localization</li>
|
|
26
|
+
<li><span class="me-2">👍</span> Resource tools</li>
|
|
27
|
+
<li><span class="me-2">👍</span> Custom tools</li>
|
|
28
|
+
<li><span class="me-2">👍</span> Custom fields</li>
|
|
29
|
+
<li><span class="me-2">👍</span> Menu editor</li>
|
|
30
|
+
<li><span class="me-2">👍</span> Search</li>
|
|
31
|
+
<li><span class="me-2">👍</span> Dashboards</li>
|
|
32
|
+
<li><span class="me-2">👍</span> Responsive design</li>
|
|
33
|
+
<li><span class="me-2">👍</span> Menu editor</li>
|
|
34
|
+
<li><span class="me-2">👍</span> Stimulus JS integration</li>
|
|
35
|
+
<li><span class="me-2">👍</span> Tabs and panels</li>
|
|
36
|
+
<li><span class="me-2">🕐</span> Resource cards</li>
|
|
37
|
+
<li><span class="me-2">🕐</span> Track resource changes</li>
|
|
38
|
+
<li><span class="me-2">🕐</span> Smart resource generation</li>
|
|
39
|
+
<li><span class="me-2">🕐</span> Records preview</li>
|
|
40
|
+
<li><span class="me-2">🕐</span> Themes</li>
|
|
41
41
|
</ul>
|
|
42
42
|
</p>
|
|
43
43
|
|
|
@@ -1,33 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
<%# TODO: fix this view%>
|
|
2
|
+
<%= form_with model: @blob, url: avo.media_library_path(@blob), method: :patch, class: "pb-6 description-list w-full" do |f| %>
|
|
3
|
+
<%= avo_edit_field :filename,
|
|
4
|
+
as: :text,
|
|
5
|
+
stacked: true,
|
|
6
|
+
form: f,
|
|
7
|
+
required: true,
|
|
8
|
+
component_options: {
|
|
9
|
+
full_width: true,
|
|
10
|
+
stacked: true
|
|
11
|
+
} %>
|
|
12
|
+
<%= f.fields_for :metadata do |meta_form| %>
|
|
13
|
+
<%= avo_edit_field :title,
|
|
14
|
+
as: :text,
|
|
15
|
+
value: @blob.metadata[:title],
|
|
16
|
+
form: meta_form,
|
|
17
|
+
component_options: {
|
|
18
|
+
full_width: true,
|
|
19
|
+
stacked: true
|
|
20
|
+
},
|
|
21
|
+
required: true
|
|
22
|
+
%>
|
|
23
|
+
<%= avo_edit_field :alt,
|
|
24
|
+
as: :text,
|
|
25
|
+
value: @blob.metadata[:alt],
|
|
26
|
+
stacked: true,
|
|
27
|
+
component_options: {
|
|
28
|
+
full_width: true,
|
|
29
|
+
stacked: true
|
|
30
|
+
},
|
|
31
|
+
form: meta_form
|
|
32
|
+
%>
|
|
33
|
+
<%= avo_edit_field :description,
|
|
34
|
+
as: :textarea,
|
|
35
|
+
value: @blob.metadata[:description],
|
|
36
|
+
stacked: true,
|
|
37
|
+
component_options: {
|
|
38
|
+
full_width: true,
|
|
39
|
+
stacked: true
|
|
40
|
+
},
|
|
41
|
+
form: meta_form
|
|
42
|
+
%>
|
|
28
43
|
<% end %>
|
|
29
44
|
|
|
30
|
-
<div class="w-full flex justify-end
|
|
45
|
+
<div class="w-full flex justify-end pe-6">
|
|
31
46
|
<%= a_button type: :submit,
|
|
32
47
|
icon: "avo/save",
|
|
33
48
|
size: :sm,
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
<%= render
|
|
2
|
-
<%=
|
|
3
|
-
<%= render
|
|
1
|
+
<%= render ui.panel(title: t("avo.media_library.title")) do |panel| %>
|
|
2
|
+
<%= panel.with_body do %>
|
|
3
|
+
<%= render ui.card do |card| %>
|
|
4
|
+
<% card.with_body do %>
|
|
5
|
+
<%= render Avo::MediaLibrary::ItemDetailsComponent.new(blob: @blob) %>
|
|
6
|
+
<% end %>
|
|
7
|
+
<% end %>
|
|
4
8
|
<% end %>
|
|
5
9
|
<% end %>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<%
|
|
2
|
+
type = local_assigns[:type] || 'width'
|
|
3
|
+
is_width = type == 'width'
|
|
4
|
+
icon = is_width ? "tabler/outline/arrows-horizontal" : "tabler/outline/arrows-vertical"
|
|
5
|
+
selector_class = is_width ? "modal__width-selector" : "modal__height-selector"
|
|
6
|
+
aria_label = is_width ? "Change modal width" : "Change modal height"
|
|
7
|
+
controller_action = is_width ? "click->modal-size#changeWidth" : "click->modal-size#changeHeight"
|
|
8
|
+
current_value = is_width ? local_assigns[:width] : local_assigns[:height]
|
|
9
|
+
options = is_width ? %w[sm md lg xl 2xl 3xl 4xl 25 50 75 100 full] : %w[auto sm md lg xl 2xl 3xl 4xl 25 50 75 100 full]
|
|
10
|
+
%>
|
|
11
|
+
<div class="relative pb-2"
|
|
12
|
+
data-controller="toggle"
|
|
13
|
+
data-action="mouseenter->toggle#showPanel mouseleave->toggle#hidePanel"
|
|
14
|
+
>
|
|
15
|
+
<button
|
|
16
|
+
type="button"
|
|
17
|
+
class="<%= selector_class %> relative shrink-0 size-5 flex items-center justify-center"
|
|
18
|
+
aria-label="<%= aria_label %>"
|
|
19
|
+
title="<%= aria_label %>"
|
|
20
|
+
>
|
|
21
|
+
<%= svg icon, class: "size-4 text-content" %>
|
|
22
|
+
</button>
|
|
23
|
+
<div
|
|
24
|
+
class="absolute inset-auto top-full z-50 mt-2 flex w-auto overflow-hidden rounded-sm bg-white shadow-modal border border-tertiary css-animate-slide-down"
|
|
25
|
+
data-toggle-target="panel"
|
|
26
|
+
data-action="mouseenter->toggle#showPanel mouseleave->toggle#hidePanel"
|
|
27
|
+
hidden
|
|
28
|
+
>
|
|
29
|
+
<div class="flex flex-col divide-y divide-tertiary min-w-[120px]">
|
|
30
|
+
<% options.each do |size| %>
|
|
31
|
+
<button
|
|
32
|
+
type="button"
|
|
33
|
+
class="px-3 py-2 text-sm text-content hover:bg-primary-50 text-start <%= 'bg-primary-50 font-medium' if current_value.to_s == size %>"
|
|
34
|
+
<% if is_width %>
|
|
35
|
+
data-width="<%= size %>"
|
|
36
|
+
<% else %>
|
|
37
|
+
data-height="<%= size %>"
|
|
38
|
+
<% end %>
|
|
39
|
+
data-action="<%= controller_action %> click->toggle#hidePanel"
|
|
40
|
+
>
|
|
41
|
+
<%= size.upcase %>
|
|
42
|
+
</button>
|
|
43
|
+
<% end %>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<%= turbo_frame_tag :alerts, class: "fixed inset-0 bottom-0 flex flex-col space-y-4 items-end
|
|
1
|
+
<%= turbo_frame_tag :alerts, class: "fixed inset-0 bottom-0 flex flex-col space-y-4 items-end rtl:items-start px-4 py-6 sm:p-6 justify-end z-[100] pointer-events-none" do %>
|
|
2
2
|
<%= render partial: "avo/partials/all_alerts" %>
|
|
3
3
|
<% end %>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<div class="color-scheme-switcher"
|
|
2
|
+
data-controller="color-scheme-switcher">
|
|
3
|
+
<div class="color-scheme-switcher__theme-wrapper"
|
|
4
|
+
data-controller="toggle">
|
|
5
|
+
<button type="button"
|
|
6
|
+
data-color-scheme-switcher-target="themeTrigger"
|
|
7
|
+
data-action="click->toggle#togglePanel"
|
|
8
|
+
class="color-scheme-switcher__button color-scheme-switcher__button--theme"
|
|
9
|
+
title="Neutral theme">
|
|
10
|
+
<span class="color-scheme-switcher__text" data-color-scheme-switcher-target="themeLabel">Brand</span>
|
|
11
|
+
</button>
|
|
12
|
+
|
|
13
|
+
<div class="color-scheme-switcher__theme-panel"
|
|
14
|
+
hidden
|
|
15
|
+
data-toggle-target="panel"
|
|
16
|
+
data-color-scheme-switcher-target="themePanel"
|
|
17
|
+
data-action="mouseleave->color-scheme-switcher#revertTheme">
|
|
18
|
+
<div class="color-scheme-switcher__theme-options">
|
|
19
|
+
<% %w[brand slate stone gray zinc neutral taupe mauve mist olive].each do |theme| %>
|
|
20
|
+
<button type="button"
|
|
21
|
+
data-action="click->color-scheme-switcher#setTheme mouseenter->color-scheme-switcher#previewTheme"
|
|
22
|
+
data-theme="<%= theme %>"
|
|
23
|
+
data-color-scheme-switcher-target="themeOption"
|
|
24
|
+
class="color-scheme-switcher__theme-option">
|
|
25
|
+
<span class="color-scheme-switcher__theme-preview color-scheme-switcher__theme-preview--<%= theme %>"></span>
|
|
26
|
+
<span class="color-scheme-switcher__theme-option-label"><%= theme.capitalize %></span>
|
|
27
|
+
</button>
|
|
28
|
+
<% end %>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div class="color-scheme-switcher__accent-wrapper"
|
|
34
|
+
data-controller="toggle">
|
|
35
|
+
<button type="button"
|
|
36
|
+
data-color-scheme-switcher-target="button"
|
|
37
|
+
data-action="click->toggle#togglePanel"
|
|
38
|
+
class="color-scheme-switcher__button color-scheme-switcher__button--accent"
|
|
39
|
+
title="Accent color">
|
|
40
|
+
<%= svg "avo/color-swatch", class: "color-scheme-switcher__icon" %>
|
|
41
|
+
<span class="color-scheme-switcher__accent-badge">
|
|
42
|
+
<span class="color-scheme-switcher__accent-badge-preview color-scheme-switcher__accent-badge-preview--neutral"></span>
|
|
43
|
+
<% accent_colors.each do |accent| %>
|
|
44
|
+
<span class="color-scheme-switcher__accent-badge-preview color-scheme-switcher__accent-badge-preview--<%= accent %> bg-<%= accent %>-500"></span>
|
|
45
|
+
<% end %>
|
|
46
|
+
</span>
|
|
47
|
+
<span class="sr-only">Accent color</span>
|
|
48
|
+
</button>
|
|
49
|
+
|
|
50
|
+
<div class="color-scheme-switcher__accent-panel"
|
|
51
|
+
hidden
|
|
52
|
+
data-toggle-target="panel"
|
|
53
|
+
data-color-scheme-switcher-target="accentPanel"
|
|
54
|
+
data-action="mouseleave->color-scheme-switcher#revertAccent">
|
|
55
|
+
<div class="color-scheme-switcher__accent-options">
|
|
56
|
+
<% (['neutral'] + accent_colors).each do |accent| %>
|
|
57
|
+
<%
|
|
58
|
+
preview_class = if accent == "neutral"
|
|
59
|
+
"color-scheme-switcher__accent-preview color-scheme-switcher__accent-preview--neutral"
|
|
60
|
+
else
|
|
61
|
+
"color-scheme-switcher__accent-preview bg-#{accent}-500"
|
|
62
|
+
end
|
|
63
|
+
%>
|
|
64
|
+
<button type="button"
|
|
65
|
+
data-action="click->color-scheme-switcher#setAccent mouseenter->color-scheme-switcher#previewAccent"
|
|
66
|
+
data-accent="<%= accent %>"
|
|
67
|
+
data-color-scheme-switcher-target="accentOption"
|
|
68
|
+
data-tippy="tooltip"
|
|
69
|
+
title="<%= accent.capitalize %>"
|
|
70
|
+
class="color-scheme-switcher__accent-option">
|
|
71
|
+
<span class="<%= preview_class %>"></span>
|
|
72
|
+
<span class="sr-only"><%= accent.capitalize %></span>
|
|
73
|
+
</button>
|
|
74
|
+
<% end %>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<button type="button"
|
|
80
|
+
data-color-scheme-switcher-target="button"
|
|
81
|
+
data-action="click->color-scheme-switcher#setScheme"
|
|
82
|
+
data-scheme="auto"
|
|
83
|
+
class="color-scheme-switcher__button"
|
|
84
|
+
title="Auto (system preference)">
|
|
85
|
+
<%= svg "heroicons/outline/computer-desktop", class: "color-scheme-switcher__icon" %>
|
|
86
|
+
<span class="sr-only">Auto</span>
|
|
87
|
+
</button>
|
|
88
|
+
<button type="button"
|
|
89
|
+
data-color-scheme-switcher-target="button"
|
|
90
|
+
data-action="click->color-scheme-switcher#setScheme"
|
|
91
|
+
data-scheme="light"
|
|
92
|
+
class="color-scheme-switcher__button"
|
|
93
|
+
title="Light mode">
|
|
94
|
+
<%= svg "heroicons/outline/sun", class: "color-scheme-switcher__icon" %>
|
|
95
|
+
<span class="sr-only">Light</span>
|
|
96
|
+
</button>
|
|
97
|
+
<button type="button"
|
|
98
|
+
data-color-scheme-switcher-target="button"
|
|
99
|
+
data-action="click->color-scheme-switcher#setScheme"
|
|
100
|
+
data-scheme="dark"
|
|
101
|
+
class="color-scheme-switcher__button"
|
|
102
|
+
title="Dark mode">
|
|
103
|
+
<%= svg "heroicons/outline/moon", class: "color-scheme-switcher__icon" %>
|
|
104
|
+
<span class="sr-only">Dark</span>
|
|
105
|
+
</button>
|
|
106
|
+
</div>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
// On page load, apply color scheme, theme, and accent from cookies to avoid FOUC
|
|
3
|
+
(function() {
|
|
4
|
+
// Read cookies
|
|
5
|
+
function getCookie(name) {
|
|
6
|
+
const value = `; ${document.cookie}`;
|
|
7
|
+
const parts = value.split(`; ${name}=`);
|
|
8
|
+
if (parts.length === 2) return parts.pop().split(';').shift();
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const colorScheme = getCookie('color_scheme') || 'auto';
|
|
13
|
+
const theme = getCookie('theme') || 'brand';
|
|
14
|
+
const accent = getCookie('accent_color') || 'neutral';
|
|
15
|
+
|
|
16
|
+
// Apply color scheme
|
|
17
|
+
const isDark = colorScheme === 'dark' || (colorScheme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
18
|
+
if (isDark) {
|
|
19
|
+
document.documentElement.classList.add('dark');
|
|
20
|
+
} else {
|
|
21
|
+
document.documentElement.classList.remove('dark');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Apply scheme selection classes
|
|
25
|
+
document.documentElement.classList.remove('scheme-light', 'scheme-dark', 'scheme-auto');
|
|
26
|
+
if (colorScheme === 'light') {
|
|
27
|
+
document.documentElement.classList.add('scheme-light');
|
|
28
|
+
} else if (colorScheme === 'dark') {
|
|
29
|
+
document.documentElement.classList.add('scheme-dark');
|
|
30
|
+
} else {
|
|
31
|
+
document.documentElement.classList.add('scheme-auto');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Apply theme class
|
|
35
|
+
document.documentElement.classList.remove('theme-slate', 'theme-stone', 'theme-gray', 'theme-zinc', 'theme-neutral', 'theme-taupe', 'theme-mauve', 'theme-mist', 'theme-olive');
|
|
36
|
+
if (theme && theme !== 'brand') {
|
|
37
|
+
document.documentElement.classList.add('theme-' + theme);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Apply accent class
|
|
41
|
+
const accentColors = <%= accent_colors.inspect.html_safe %>;
|
|
42
|
+
accentColors.forEach((color) => {
|
|
43
|
+
document.documentElement.classList.remove('accent-' + color);
|
|
44
|
+
});
|
|
45
|
+
if (accent && accent !== 'neutral') {
|
|
46
|
+
document.documentElement.classList.add('accent-' + accent);
|
|
47
|
+
}
|
|
48
|
+
})();
|
|
49
|
+
</script>
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
<dialog id="turbo-confirm" class="w-72">
|
|
1
|
+
<dialog id="turbo-confirm" class="mx-auto my-auto w-72">
|
|
2
2
|
<form method="dialog">
|
|
3
|
-
<div class="relative
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<div class="
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
<div class="card relative">
|
|
4
|
+
<button value="cancel" class="absolute top-3 inset-e-2.5 text-content-secondary bg-transparent hover:bg-tertiary hover:text-content rounded-lg text-sm size-8 ms-auto inline-flex justify-center items-center" data-modal-hide="popup-modal" tabindex="3">
|
|
5
|
+
<%= svg "x-mark", class: "size-6" %>
|
|
6
|
+
<span class="sr-only"><%= t "avo.close_modal" %></span>
|
|
7
|
+
</button>
|
|
8
|
+
<div class="card__wrapper">
|
|
9
|
+
<div class="card__body text-center items-center justify-between min-h-56">
|
|
10
|
+
<div class="flex flex-col items-center justify-center p-4 md:p-5">
|
|
11
|
+
<svg class="mt-4 mx-auto mb-4 text-content-secondary size-12" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
|
|
12
|
+
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 11V6m0 8h.01M19 10a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
|
|
13
|
+
</svg>
|
|
14
|
+
<p class="text-md font-normal text-content">
|
|
15
|
+
<%= t "avo.are_you_sure" %>
|
|
16
|
+
</p>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="flex flex-col gap-2 w-full p-4 pt-0 mt-6">
|
|
19
|
+
<button value="confirm" class="text-danger border border-danger hover:bg-danger/10 focus:ring-4 focus:outline-hidden focus:ring-danger/30 font-medium rounded-lg text-sm px-4 py-2 text-center cursor-pointer" tabindex="1" autofocus>
|
|
18
20
|
<%= t "avo.yes_confirm" %>
|
|
19
21
|
</button>
|
|
20
|
-
<button value="cancel" class="px-4 py-2 text-sm font-medium text-
|
|
22
|
+
<button value="cancel" class="px-4 py-2 text-sm font-medium text-content focus:outline-hidden bg-primary rounded-lg border border-tertiary hover:bg-secondary hover:text-content focus:z-10 focus:ring-4 focus:ring-tertiary cursor-pointer" tabindex="2">
|
|
21
23
|
<%= t "avo.no_cancel" %>
|
|
22
24
|
</button>
|
|
23
25
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<% if @custom_tools_alert_visible %>
|
|
2
2
|
<div class="w-full inset-auto bottom-0 z-50 mb-4 opacity-75 hover:opacity-100 transition-opacity duration-150">
|
|
3
|
-
<a href="https://avohq.io/pricing" target="_blank" class="rounded bg-orange-700 text-white py-2 px-4 text-sm block items-center flex leading-tight">
|
|
4
|
-
<%= svg "avo/exclamation", class: "h-6 inline
|
|
3
|
+
<a href="https://avohq.io/pricing" target="_blank" class="rounded-sm bg-orange-700 text-white py-2 px-4 text-sm block items-center flex leading-tight">
|
|
4
|
+
<%= svg "avo/exclamation", class: "h-6 inline me-2 text-bold shrink-0 me-1" %> Warning. <%= @custom_tools_alert_visible %> This page will not be visible in a production environment.
|
|
5
5
|
</a>
|
|
6
6
|
</div>
|
|
7
7
|
<% end %>
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
url, message, target = error.values_at :url, :message, :target
|
|
13
13
|
%>
|
|
14
14
|
<div class="w-full inset-auto bottom-0 z-50 mb-4 opacity-75 hover:opacity-100 transition-opacity duration-150">
|
|
15
|
-
<a href="<%= url %>" target="<%= target %>" class="rounded bg-orange-700 text-white py-2 px-4 text-sm items-center flex leading-tight space-x-2">
|
|
16
|
-
<%= svg "avo/exclamation", class: "h-6 inline
|
|
15
|
+
<a href="<%= url %>" target="<%= target %>" class="rounded-sm bg-orange-700 text-white py-2 px-4 text-sm items-center flex leading-tight space-x-2 rtl:space-x-reverse">
|
|
16
|
+
<%= svg "avo/exclamation", class: "h-6 inline me-2 text-bold shrink-0 me-1" %>
|
|
17
17
|
<div>
|
|
18
18
|
<%= simple_format message %>
|
|
19
19
|
</div>
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
<% elsif error.is_a? String %>
|
|
23
23
|
<div class="w-full inset-auto bottom-0 z-50 mb-4 opacity-75 hover:opacity-100 transition-opacity duration-150">
|
|
24
|
-
<div class="rounded bg-orange-700 text-white py-2 px-4 text-sm items-center flex leading-tight space-x-2">
|
|
25
|
-
<%= svg "avo/exclamation", class: "h-6 inline
|
|
24
|
+
<div class="rounded-sm bg-orange-700 text-white py-2 px-4 text-sm items-center flex leading-tight space-x-2 rtl:space-x-reverse">
|
|
25
|
+
<%= svg "avo/exclamation", class: "h-6 inline me-2 text-bold shrink-0 me-1" %>
|
|
26
26
|
<div><%= simple_format error %></div>
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
<div class="text-center text-sm text-gray-700 <%= 'print:hidden' if Avo.configuration.hide_layout_when_printing %>">
|
|
2
|
-
<a href="https://avohq.io/" target="_blank">Avo</a> · © <%= Date.today.year %> AvoHQ ·
|
|
2
|
+
<a href="https://avohq.io/" target="_blank">Avo</a> · © <%= Date.today.year %> AvoHQ · v<%= Avo::VERSION %>
|
|
3
3
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<%= link_to Avo.configuration.app_name, '/', class: '
|
|
1
|
+
<%= link_to Avo.configuration.app_name, '/', class: 'font-semibold', target: :_blank %>
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
Avo.configuration.root_path = '<%= root_path_without_url %>'
|
|
5
5
|
Avo.configuration.search_debounce = '<%= Avo.configuration.search_debounce %>'
|
|
6
6
|
Avo.configuration.cookies_key = '<%= Avo::COOKIES_KEY %>'
|
|
7
|
-
Avo.configuration.preserve_sidebar_scroll = '<%= ::Avo.configuration.feature_enabled?(:preserve_sidebar_scroll) %>'
|
|
8
|
-
Avo.configuration.focus_sidebar_menu_item = '<%= ::Avo.configuration.feature_enabled?(:focus_sidebar_menu_item) %>'
|
|
9
7
|
<% if Avo.avo_dynamic_filters_installed? %>
|
|
10
8
|
Avo.configuration.avo_filters = {
|
|
11
9
|
param_key: '<%= Avo::DynamicFilters.configuration.param_key %>'
|
|
@@ -1,15 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<%
|
|
2
|
+
# Icons shown when sidebar is open (collapse) vs closed (expand). Change these to customize.
|
|
3
|
+
sidebar_open_icon = 'layout-sidebar-left-collapse'
|
|
4
|
+
sidebar_closed_icon = 'layout-sidebar-left-expand'
|
|
5
|
+
sidebar_state = @sidebar_open ? 'open' : 'closed'
|
|
6
|
+
%>
|
|
7
|
+
<%= content_tag :nav, class: class_names("top-navbar", {"print:hidden": Avo.configuration.hide_layout_when_printing}) do %>
|
|
8
|
+
<div class="flex items-center space-x-2 rtl:space-x-reverse w-auto lg:w-64 shrink-0 h-full py-2">
|
|
9
|
+
<div class="flex items-center gap-0">
|
|
10
|
+
<%= a_button class: 'lg:hidden',
|
|
11
|
+
size: :sm,
|
|
12
|
+
style: :text,
|
|
13
|
+
data: {
|
|
14
|
+
action: 'click->sidebar#toggleSidebarOnMobile',
|
|
15
|
+
sidebar_toggle_icon: true,
|
|
16
|
+
sidebar_state: sidebar_state
|
|
17
|
+
},
|
|
18
|
+
aria: { label: "Toggle sidebar" } do %>
|
|
19
|
+
<span class="sidebar-toggle-icon sidebar-toggle-icon--open">
|
|
20
|
+
<%= svg sidebar_open_icon, class: 'h-4 button__icon' %>
|
|
21
|
+
</span>
|
|
22
|
+
<span class="sidebar-toggle-icon sidebar-toggle-icon--closed">
|
|
23
|
+
<%= svg sidebar_closed_icon, class: 'h-4 button__icon' %>
|
|
24
|
+
</span>
|
|
25
|
+
<% end %>
|
|
26
|
+
|
|
27
|
+
<% if Avo.configuration.sidebar_toggle_visible %>
|
|
28
|
+
<%= a_button class: '!hidden lg:!inline-flex',
|
|
29
|
+
size: :sm,
|
|
30
|
+
style: :text,
|
|
31
|
+
data: {
|
|
32
|
+
action: 'click->sidebar#toggleSidebar',
|
|
33
|
+
sidebar_toggle_icon: true,
|
|
34
|
+
sidebar_state: sidebar_state
|
|
35
|
+
},
|
|
36
|
+
aria: { label: "Toggle sidebar" } do %>
|
|
37
|
+
<span class="sidebar-toggle-icon sidebar-toggle-icon--open">
|
|
38
|
+
<%= svg sidebar_open_icon, class: 'h-4 button__icon' %>
|
|
39
|
+
</span>
|
|
40
|
+
<span class="sidebar-toggle-icon sidebar-toggle-icon--closed">
|
|
41
|
+
<%= svg sidebar_closed_icon, class: 'h-4 button__icon' %>
|
|
42
|
+
</span>
|
|
43
|
+
<% end %>
|
|
44
|
+
<% end %>
|
|
6
45
|
</div>
|
|
7
46
|
<%= render partial: "avo/partials/logo" %>
|
|
8
47
|
</div>
|
|
9
|
-
<div class="flex-1 flex items-center justify-between lg:justify-start space-x-2 sm:space-x-8 lg:px-
|
|
10
|
-
<%= render Avo::Pro::
|
|
11
|
-
<div class="m-0">
|
|
48
|
+
<div class="flex-1 flex items-center justify-between lg:justify-start space-x-2 rtl:space-x-reverse sm:space-x-8 lg:px-1">
|
|
49
|
+
<%= render Avo::Pro::GlobalSearch::InputComponent.new(resource:) if defined?(Avo::Pro::GlobalSearch::InputComponent) %>
|
|
50
|
+
<div class="flex justify-between w-full h-full items-center m-0">
|
|
12
51
|
<%= render partial: "avo/partials/header" %>
|
|
52
|
+
<%= render partial: "avo/partials/color_scheme_switcher" %>
|
|
13
53
|
</div>
|
|
14
54
|
</div>
|
|
15
55
|
<% end %>
|
|
56
|
+
<!-- This is a hack to fix the issue with the navbar not being accesible because of the .main-content-wrapper padding-->
|
|
57
|
+
<!-- TODO: when implementing the final layout (search covered issue) see if we still need this hack-->
|
|
58
|
+
<%#
|
|
59
|
+
<div class="relative opacity-0 h-16 pointer-events-none"></div>
|
|
60
|
+
%>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
end
|
|
12
12
|
%>
|
|
13
13
|
<%= svg icon,
|
|
14
|
-
class: 'inline-block fill-current text-gray-500 relative leading-none min-w-[1rem] min-h-full
|
|
14
|
+
class: 'inline-block fill-current text-gray-500 relative leading-none min-w-[1rem] min-h-full ms-1 h-4',
|
|
15
15
|
data: {
|
|
16
16
|
tippy: :tooltip,
|
|
17
17
|
tippy_content: sort_tippy_content
|