trestle 0.9.8 → 0.10.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yml +34 -4
- data/.gitignore +7 -0
- data/Gemfile +5 -1
- data/README.md +2 -1
- data/app/assets/bundle/trestle/admin.css +23 -0
- data/app/assets/bundle/trestle/admin.js +83 -0
- data/app/assets/bundle/trestle/fa-brands-400.ttf +0 -0
- data/app/assets/bundle/trestle/fa-brands-400.woff2 +0 -0
- data/app/assets/bundle/trestle/fa-regular-400.ttf +0 -0
- data/app/assets/bundle/trestle/fa-regular-400.woff2 +0 -0
- data/app/assets/bundle/trestle/fa-solid-900.ttf +0 -0
- data/app/assets/bundle/trestle/fa-solid-900.woff2 +0 -0
- data/app/assets/bundle/trestle/locale/cs.js +110 -0
- data/app/assets/bundle/trestle/locale/de.js +116 -0
- data/app/assets/bundle/trestle/locale/en.js +329 -0
- data/app/assets/bundle/trestle/locale/es-MX.js +109 -0
- data/app/assets/bundle/trestle/locale/es.js +109 -0
- data/app/assets/bundle/trestle/locale/fr.js +111 -0
- data/app/assets/bundle/trestle/locale/ko.js +111 -0
- data/app/assets/bundle/trestle/locale/lv.js +109 -0
- data/app/assets/bundle/trestle/locale/nl.js +96 -0
- data/app/assets/bundle/trestle/locale/pl.js +99 -0
- data/app/assets/bundle/trestle/locale/pt-BR.js +98 -0
- data/app/assets/bundle/trestle/locale/vi.js +116 -0
- data/app/assets/bundle/trestle/locale/zh-CN.js +109 -0
- data/app/assets/bundle/trestle/photoswipe-7aa1aec9c3c1fd65c382.digested.js +6 -0
- data/app/assets/sprockets/trestle/custom.css +1 -0
- data/app/assets/sprockets/trestle/icons/font-awesome.css.erb +32 -0
- data/app/assets/sprockets/trestle/manifest.js +4 -0
- data/app/assets/stylesheets/trestle/custom.css +6 -1
- data/app/controllers/concerns/trestle/controller/helpers.rb +2 -0
- data/app/controllers/concerns/trestle/controller/location.rb +1 -6
- data/app/controllers/concerns/trestle/controller/modal.rb +23 -0
- data/app/controllers/concerns/trestle/controller/toolbars.rb +1 -1
- data/app/controllers/concerns/trestle/controller/turbo.rb +21 -0
- data/app/controllers/concerns/trestle/resource/controller/actions.rb +40 -29
- data/app/controllers/concerns/trestle/resource/controller/redirection.rb +7 -5
- data/app/controllers/trestle/admin_controller.rb +4 -0
- data/app/controllers/trestle/application_controller.rb +2 -1
- data/app/helpers/trestle/card_helper.rb +2 -2
- data/app/helpers/trestle/flash_helper.rb +10 -0
- data/app/helpers/trestle/form_helper.rb +3 -2
- data/app/helpers/trestle/format_helper.rb +2 -1
- data/app/helpers/trestle/i18n_helper.rb +46 -7
- data/app/helpers/trestle/modal_helper.rb +34 -0
- data/app/helpers/trestle/navigation_helper.rb +3 -1
- data/app/helpers/trestle/tab_helper.rb +1 -1
- data/app/helpers/trestle/toolbars_helper.rb +1 -1
- data/app/helpers/trestle/turbo_frame_helper.rb +34 -0
- data/app/helpers/trestle/url_helper.rb +7 -4
- data/app/views/layouts/trestle/admin.html.erb +16 -18
- data/app/views/layouts/trestle/admin.turbo_stream.erb +11 -0
- data/app/views/layouts/trestle/modal.html.erb +5 -0
- data/app/views/trestle/_i18n.html.erb +12 -0
- data/app/views/trestle/_theme.html.erb +15 -0
- data/app/views/trestle/application/_header.html.erb +1 -1
- data/app/views/trestle/application/_layout.html.erb +6 -3
- data/app/views/trestle/application/_modal.html.erb +36 -0
- data/app/views/trestle/application/_tabs.html.erb +4 -4
- data/app/views/trestle/flash/_alert.html.erb +1 -1
- data/app/views/trestle/flash/_debug.html.erb +1 -1
- data/app/views/trestle/resource/_form.html.erb +5 -0
- data/app/views/trestle/resource/_scopes.html.erb +1 -1
- data/app/views/trestle/resource/create.turbo_stream.erb +5 -0
- data/app/views/trestle/resource/destroy.turbo_stream.erb +1 -0
- data/app/views/trestle/resource/edit.html.erb +4 -2
- data/app/views/trestle/resource/index.html.erb +12 -10
- data/app/views/trestle/resource/new.html.erb +4 -2
- data/app/views/trestle/resource/show.html.erb +4 -2
- data/app/views/trestle/resource/update.turbo_stream.erb +5 -0
- data/app/views/trestle/shared/_sidebar.html.erb +9 -9
- data/config/locales/vi.yml +1 -1
- data/frontend/css/components/_alerts.scss +19 -17
- data/frontend/css/components/_background.scss +7 -35
- data/frontend/css/components/_badges.scss +31 -0
- data/frontend/css/components/_breadcrumbs.scss +4 -4
- data/frontend/css/components/_buttons.scss +5 -4
- data/frontend/css/components/_datepicker.scss +12 -8
- data/frontend/css/components/_dropdown.scss +23 -3
- data/frontend/css/components/{_fields.scss → _forms.scss} +16 -3
- data/frontend/css/components/_media-grid.scss +52 -44
- data/frontend/css/components/_modal.scss +33 -4
- data/frontend/css/components/_pagination.scss +1 -1
- data/frontend/css/components/_photoswipe.scss +8 -0
- data/frontend/css/components/_popover.scss +1 -0
- data/frontend/css/components/_scopes.scss +1 -1
- data/frontend/css/components/_select.scss +161 -31
- data/frontend/css/components/_table.scss +60 -65
- data/frontend/css/components/_tabs.scss +10 -3
- data/frontend/css/components/_tags.scss +71 -16
- data/frontend/css/components/_toolbars.scss +18 -31
- data/frontend/css/components/_turbo.scss +3 -0
- data/frontend/css/core/_bootstrap.scss +46 -0
- data/frontend/css/core/_dependencies.scss +4 -3
- data/frontend/css/core/_functions.scss +39 -0
- data/frontend/css/core/_mixins.scss +3 -40
- data/frontend/css/core/_theme.scss +258 -0
- data/frontend/css/core/_typography.scss +10 -1
- data/frontend/css/icons/_fontawesome.scss +3 -15
- data/frontend/css/index.scss +12 -6
- data/frontend/css/layout/_base.scss +3 -3
- data/frontend/css/layout/_content.scss +11 -7
- data/frontend/css/layout/_footer.scss +1 -1
- data/frontend/css/layout/_header.scss +5 -3
- data/frontend/css/layout/_navigation.scss +2 -2
- data/frontend/css/layout/_sidebar.scss +19 -9
- data/frontend/css/support/_sprockets.scss +2 -0
- data/frontend/css/support/_webpack.scss +2 -0
- data/frontend/css/variables/_bootstrap.scss +134 -40
- data/frontend/css/variables/_maps.scss +15 -0
- data/frontend/css/variables/_trestle.scss +55 -26
- data/frontend/js/controllers/application_controller.js +17 -0
- data/frontend/js/controllers/checkbox_select_controller.js +43 -0
- data/frontend/js/controllers/confirm_controller.js +115 -0
- data/frontend/js/controllers/confirm_delete_controller.js +11 -0
- data/frontend/js/controllers/datepicker_controller.js +12 -0
- data/frontend/js/controllers/datetimepicker_controller.js +13 -0
- data/frontend/js/controllers/deprecated/init_controller.js +9 -0
- data/frontend/js/controllers/flatpickr_controller.js +50 -0
- data/frontend/js/controllers/follow_url_controller.js +36 -0
- data/frontend/js/controllers/form_error_controller.js +24 -0
- data/frontend/js/controllers/form_loading_controller.js +50 -0
- data/frontend/js/controllers/gallery_controller.js +10 -0
- data/frontend/js/controllers/index.js +19 -0
- data/frontend/js/controllers/keyboard_submit_controller.js +25 -0
- data/frontend/js/controllers/lightbox_controller.js +160 -0
- data/frontend/js/controllers/mobile_sidebar_controller.js +30 -0
- data/frontend/js/controllers/modal_controller.js +36 -0
- data/frontend/js/controllers/modal_frame_controller.js +11 -0
- data/frontend/js/controllers/modal_trigger_controller.js +74 -0
- data/frontend/js/{components/navigation.js → controllers/navigation_controller.js} +14 -10
- data/frontend/js/controllers/navigation_tooltip_controller.js +32 -0
- data/frontend/js/controllers/popover_controller.js +87 -0
- data/frontend/js/controllers/reloadable_controller.js +34 -0
- data/frontend/js/controllers/select_controller.js +49 -0
- data/frontend/js/controllers/sidebar_controller.js +33 -0
- data/frontend/js/controllers/tab_errors_controller.js +45 -0
- data/frontend/js/controllers/tabs_controller.js +45 -0
- data/frontend/js/controllers/timepicker_controller.js +14 -0
- data/frontend/js/controllers/toggle_attr_controller.js +27 -0
- data/frontend/js/controllers/toggle_class_controller.js +27 -0
- data/frontend/js/controllers/tooltip_controller.js +13 -0
- data/frontend/js/controllers/wrapper_controller.js +43 -0
- data/frontend/js/core/backdrop.js +100 -0
- data/frontend/js/core/error_modal.js +65 -0
- data/frontend/js/core/fetch.js +32 -0
- data/frontend/js/core/i18n.js +24 -10
- data/frontend/js/core/modal.js +52 -0
- data/frontend/js/core/stream_actions.js +56 -0
- data/frontend/js/core/turbo_errors.js +9 -0
- data/frontend/js/{core → deprecated}/events.js +1 -8
- data/frontend/js/deprecated/tooltip.js +8 -0
- data/frontend/js/index.js +28 -40
- data/frontend/js/mixins/index.js +5 -0
- data/frontend/js/mixins/photoswipe.js +10 -0
- data/frontend/js/util/bootstrap.js +93 -0
- data/i18n/config.yml +14 -0
- data/i18n/environment.rb +8 -0
- data/i18n/export +3 -0
- data/i18n/template.erb +1 -0
- data/lib/generators/trestle/install/install_generator.rb +3 -8
- data/lib/generators/trestle/install/templates/trestle.rb.erb +5 -5
- data/lib/trestle/adapters/active_record_adapter.rb +1 -1
- data/lib/trestle/admin/builder.rb +7 -0
- data/lib/trestle/admin.rb +12 -6
- data/lib/trestle/color.rb +113 -0
- data/lib/trestle/configurable.rb +2 -2
- data/lib/trestle/configuration.rb +16 -8
- data/lib/trestle/engine.rb +23 -17
- data/lib/trestle/form/automatic.rb +3 -1
- data/lib/trestle/form/fields/check_box_helpers.rb +7 -18
- data/lib/trestle/form/fields/collection_select.rb +1 -1
- data/lib/trestle/form/fields/color_field.rb +4 -0
- data/lib/trestle/form/fields/date_field.rb +4 -0
- data/lib/trestle/form/fields/date_picker.rb +10 -4
- data/lib/trestle/form/fields/date_select.rb +1 -1
- data/lib/trestle/form/fields/datetime_field.rb +4 -0
- data/lib/trestle/form/fields/datetime_select.rb +1 -1
- data/lib/trestle/form/fields/file_field.rb +3 -28
- data/lib/trestle/form/fields/form_control.rb +2 -2
- data/lib/trestle/form/fields/form_group.rb +1 -1
- data/lib/trestle/form/fields/grouped_collection_select.rb +1 -1
- data/lib/trestle/form/fields/radio_button_helpers.rb +5 -17
- data/lib/trestle/form/fields/range_field.rb +1 -5
- data/lib/trestle/form/fields/select.rb +17 -1
- data/lib/trestle/form/fields/time_field.rb +4 -0
- data/lib/trestle/form/fields/time_select.rb +1 -1
- data/lib/trestle/form/fields/time_zone_select.rb +1 -1
- data/lib/trestle/form/renderer.rb +3 -0
- data/lib/trestle/form.rb +16 -1
- data/lib/trestle/hook/helpers.rb +1 -1
- data/lib/trestle/reloader.rb +2 -11
- data/lib/trestle/resource/builder.rb +1 -8
- data/lib/trestle/resource/toolbar.rb +2 -2
- data/lib/trestle/resource.rb +2 -2
- data/lib/trestle/scopes/block.rb +7 -7
- data/lib/trestle/scopes/definition.rb +2 -2
- data/lib/trestle/scopes/scope.rb +4 -0
- data/lib/trestle/table/actions_column.rb +2 -2
- data/lib/trestle/table/row.rb +2 -1
- data/lib/trestle/table/select_column.rb +3 -6
- data/lib/trestle/table.rb +6 -1
- data/lib/trestle/toolbar/item.rb +1 -1
- data/lib/trestle/toolbar/menu.rb +3 -6
- data/lib/trestle/version.rb +1 -1
- data/lib/trestle.rb +3 -20
- data/package.json +31 -27
- data/trestle.gemspec +9 -10
- data/webpack.config.js +18 -11
- data/yarn.lock +1934 -2819
- metadata +181 -179
- data/app/assets/bundle/trestle/bundle.css +0 -12
- data/app/assets/bundle/trestle/bundle.js +0 -103
- data/app/assets/bundle/trestle/fa-brands-400.eot +0 -0
- data/app/assets/bundle/trestle/fa-brands-400.svg +0 -3717
- data/app/assets/bundle/trestle/fa-brands-400.woff +0 -0
- data/app/assets/bundle/trestle/fa-regular-400.eot +0 -0
- data/app/assets/bundle/trestle/fa-regular-400.svg +0 -801
- data/app/assets/bundle/trestle/fa-regular-400.woff +0 -0
- data/app/assets/bundle/trestle/fa-solid-900.eot +0 -0
- data/app/assets/bundle/trestle/fa-solid-900.svg +0 -5034
- data/app/assets/bundle/trestle/fa-solid-900.woff +0 -0
- data/app/assets/javascripts/trestle/admin.js +0 -3
- data/app/assets/javascripts/trestle/i18n.js.erb +0 -8
- data/app/assets/stylesheets/trestle/admin.css +0 -2
- data/app/assets/stylesheets/trestle/icons/_font-awesome.css.erb +0 -40
- data/app/controllers/concerns/trestle/controller/dialog.rb +0 -16
- data/app/views/trestle/application/_dialog.html.erb +0 -34
- data/frontend/css/components/_color-vars.scss +0 -10
- data/frontend/css/components/_custom-forms.scss +0 -35
- data/frontend/css/components/_magnific-popup.scss +0 -36
- data/frontend/css/components/_turbolinks.scss +0 -3
- data/frontend/js/components/confirmation.js +0 -32
- data/frontend/js/components/datepicker.js +0 -69
- data/frontend/js/components/dialog.js +0 -149
- data/frontend/js/components/file.js +0 -7
- data/frontend/js/components/form.js +0 -100
- data/frontend/js/components/gallery.js +0 -33
- data/frontend/js/components/pagination.js +0 -51
- data/frontend/js/components/select.js +0 -18
- data/frontend/js/components/sidebar.js +0 -75
- data/frontend/js/components/table.js +0 -61
- data/frontend/js/components/tabs.js +0 -59
- data/frontend/js/components/tooltips.js +0 -25
- data/frontend/js/core/contexts.js +0 -17
- data/frontend/js/core/turbolinks.js +0 -3
- data/frontend/js/core/visit.js +0 -16
- data/frontend/theme/trestle/_theme.scss +0 -4
- data/frontend/theme/trestle/_variables.scss +0 -4
- data/frontend/theme/trestle/theme/_defaults.scss +0 -152
- data/frontend/theme/trestle/theme/_functions.scss +0 -44
- data/frontend/theme/trestle/theme/_variables.scss +0 -15
- data/frontend/theme/trestle/theme/bootstrap/_alert.scss +0 -19
- data/frontend/theme/trestle/theme/bootstrap/_badge.scss +0 -25
- data/frontend/theme/trestle/theme/bootstrap/_buttons.scss +0 -93
- data/frontend/theme/trestle/theme/bootstrap/_color-vars.scss +0 -11
- data/frontend/theme/trestle/theme/bootstrap/_custom-forms.scss +0 -93
- data/frontend/theme/trestle/theme/bootstrap/_dropdown.scss +0 -6
- data/frontend/theme/trestle/theme/bootstrap/_forms.scss +0 -6
- data/frontend/theme/trestle/theme/bootstrap/_links.scss +0 -7
- data/frontend/theme/trestle/theme/bootstrap/_list-group.scss +0 -31
- data/frontend/theme/trestle/theme/bootstrap/_nav.scss +0 -6
- data/frontend/theme/trestle/theme/bootstrap/_pagination.scss +0 -18
- data/frontend/theme/trestle/theme/bootstrap/_progress.scss +0 -3
- data/frontend/theme/trestle/theme/bootstrap/_tables.scss +0 -41
- data/frontend/theme/trestle/theme/bootstrap/_utilities.scss +0 -3
- data/frontend/theme/trestle/theme/bootstrap/utilities/_background.scss +0 -17
- data/frontend/theme/trestle/theme/bootstrap/utilities/_borders.scss +0 -5
- data/frontend/theme/trestle/theme/bootstrap/utilities/_text.scss +0 -18
- data/frontend/theme/trestle/theme/trestle/_background.scss +0 -61
- data/frontend/theme/trestle/theme/trestle/_datepicker.scss +0 -58
- data/frontend/theme/trestle/theme/trestle/_headers.scss +0 -4
- data/frontend/theme/trestle/theme/trestle/_navbar.scss +0 -15
- data/frontend/theme/trestle/theme/trestle/_navigation.scss +0 -5
- data/frontend/theme/trestle/theme/trestle/_select2.scss +0 -22
- data/frontend/theme/trestle/theme/trestle/_tags.scss +0 -12
- data/frontend/theme/trestle/theme/trestle/_turbolinks.scss +0 -3
- data/frontend/theme/trestle/theme.scss +0 -29
- data/lib/generators/trestle/install/templates/_theme.scss +0 -13
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ar-dz.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ar.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/at.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/az.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/be.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/bg.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/bn.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/bs.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/cat.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ckb.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/cs.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/cy.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/da.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/de.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/default.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/eo.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/es.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/et.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/fa.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/fi.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/fo.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/fr.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ga.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/gr.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/he.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/hi.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/hr.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/hu.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/hy.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/id.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/is.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/it.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ja.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ka.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/km.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ko.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/kz.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/lt.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/lv.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/mk.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/mn.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ms.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/my.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/nl.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/nn.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/no.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/pa.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/pl.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/pt.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ro.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ru.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/si.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/sk.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/sl.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/sq.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/sr-cyr.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/sr.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/sv.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/th.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/tr.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/uk.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/uz.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/uz_latn.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/vn.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/zh-tw.js +0 -0
- /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/zh.js +0 -0
- /data/app/assets/{stylesheets → sprockets}/trestle/_custom.css +0 -0
@@ -1,13 +1,20 @@
|
|
1
|
+
@use "sass:math";
|
2
|
+
|
1
3
|
.app-sidebar {
|
2
4
|
background: $sidebar-bg;
|
3
5
|
|
4
6
|
width: $sidebar-width;
|
7
|
+
padding: 0;
|
8
|
+
|
5
9
|
flex-shrink: 0;
|
6
10
|
|
7
11
|
position: relative;
|
8
12
|
|
9
13
|
display: flex;
|
10
14
|
flex-direction: column;
|
15
|
+
flex-wrap: nowrap;
|
16
|
+
|
17
|
+
align-items: stretch;
|
11
18
|
}
|
12
19
|
|
13
20
|
.app-sidebar-header {
|
@@ -19,24 +26,27 @@
|
|
19
26
|
align-items: stretch;
|
20
27
|
|
21
28
|
.navbar-toggler {
|
29
|
+
--bs-navbar-toggler-bg: #{$sidebar-mobile-toggle-bg};
|
30
|
+
--bs-navbar-toggler-color: #{$sidebar-mobile-toggle-border-color};
|
31
|
+
--bs-navbar-toggler-border-color: #{$sidebar-mobile-toggle-border-color};
|
32
|
+
|
22
33
|
outline: none;
|
23
34
|
|
24
35
|
align-self: center;
|
25
36
|
|
26
|
-
margin-left: $grid-gutter-width
|
27
|
-
margin-right: $grid-gutter-width
|
37
|
+
margin-left: math.div($grid-gutter-width, 2);
|
38
|
+
margin-right: math.div($grid-gutter-width, 2);
|
28
39
|
|
29
|
-
background:
|
30
|
-
border: $sidebar-mobile-toggle-border;
|
40
|
+
background: var(--bs-navbar-toggler-bg);
|
31
41
|
|
32
42
|
&:hover, &:focus {
|
33
|
-
|
34
|
-
|
43
|
+
--bs-navbar-toggler-border-color: #{$sidebar-mobile-toggle-active-border-color};
|
44
|
+
--bs-navbar-toggler-bg: #{$sidebar-mobile-toggle-active-bg};
|
35
45
|
}
|
36
46
|
}
|
37
47
|
|
38
48
|
.navbar-toggler-icon {
|
39
|
-
|
49
|
+
--bs-navbar-toggler-icon-bg: #{$sidebar-mobile-toggle-icon-bg};
|
40
50
|
}
|
41
51
|
}
|
42
52
|
|
@@ -122,7 +132,7 @@
|
|
122
132
|
}
|
123
133
|
}
|
124
134
|
|
125
|
-
@include media-breakpoint-down(
|
135
|
+
@include media-breakpoint-down(md) {
|
126
136
|
html, body {
|
127
137
|
overflow-x: hidden;
|
128
138
|
}
|
@@ -170,7 +180,7 @@
|
|
170
180
|
}
|
171
181
|
}
|
172
182
|
|
173
|
-
@include media-breakpoint-between(md,
|
183
|
+
@include media-breakpoint-between(md, xl) {
|
174
184
|
.app-sidebar {
|
175
185
|
width: $sidebar-width-collapsed;
|
176
186
|
|
@@ -3,6 +3,7 @@
|
|
3
3
|
// Mixins & functions
|
4
4
|
@import "bootstrap/scss/functions";
|
5
5
|
@import "bootstrap/scss/mixins";
|
6
|
+
@import "trestle/frontend/css/core/functions";
|
6
7
|
@import "trestle/frontend/css/core/mixins";
|
7
8
|
|
8
9
|
// Variables
|
@@ -11,4 +12,5 @@
|
|
11
12
|
@import "bootstrap/scss/variables";
|
12
13
|
|
13
14
|
// Icon variables
|
15
|
+
@import "@fortawesome/fontawesome-free/scss/functions";
|
14
16
|
@import "@fortawesome/fontawesome-free/scss/variables";
|
@@ -3,6 +3,7 @@
|
|
3
3
|
// Mixins & functions
|
4
4
|
@import "~bootstrap/scss/functions";
|
5
5
|
@import "~bootstrap/scss/mixins";
|
6
|
+
@import "../core/functions";
|
6
7
|
@import "../core/mixins";
|
7
8
|
|
8
9
|
// Variables
|
@@ -11,4 +12,5 @@
|
|
11
12
|
@import "~bootstrap/scss/variables";
|
12
13
|
|
13
14
|
// Icon variables
|
15
|
+
@import "~@fortawesome/fontawesome-free/scss/functions";
|
14
16
|
@import "~@fortawesome/fontawesome-free/scss/variables";
|
@@ -1,17 +1,13 @@
|
|
1
1
|
// Color system
|
2
2
|
|
3
|
-
$
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
// Backwards compatibility
|
13
|
-
"default": #bbbbbb
|
14
|
-
);
|
3
|
+
$primary: #4d6bb2;
|
4
|
+
$secondary: #6c757d;
|
5
|
+
$success: #7dc67d;
|
6
|
+
$info: #7ccde5;
|
7
|
+
$warning: #f3bd71;
|
8
|
+
$danger: #e17572;
|
9
|
+
$light: #bbbbbb;
|
10
|
+
$dark: #444444;
|
15
11
|
|
16
12
|
|
17
13
|
// Body
|
@@ -20,21 +16,36 @@ $body-bg: #f3f3f3;
|
|
20
16
|
$body-color: #333333;
|
21
17
|
|
22
18
|
|
23
|
-
//
|
24
|
-
$
|
25
|
-
|
26
|
-
// Increase default color threshold for light vs dark
|
27
|
-
$yiq-contrasted-threshold: 200;
|
19
|
+
// The contrast ratio to reach against white, to determine if color changes from "light" to "dark".
|
20
|
+
$min-contrast-ratio: 1.7;
|
28
21
|
|
29
22
|
// Enable box shadows
|
30
23
|
$enable-shadows: true;
|
31
24
|
|
32
25
|
// Decrease default grid spacing
|
33
|
-
$grid-gutter-width:
|
26
|
+
$grid-gutter-width: 1.375rem;
|
27
|
+
|
28
|
+
|
29
|
+
// Characters which are escaped by the escape-svg function
|
30
|
+
$escaped-characters: (
|
31
|
+
("<", "%3c"),
|
32
|
+
(">", "%3e"),
|
33
|
+
("#", "%23"),
|
34
|
+
("(", "%28"),
|
35
|
+
(")", "%29"),
|
36
|
+
) !default;
|
37
|
+
|
38
|
+
|
39
|
+
// Components
|
40
|
+
|
41
|
+
$box-shadow: soft-shadow(1rem, 1.5em, rgba(black, 0.25));
|
42
|
+
$box-shadow-sm: soft-shadow(0.5rem, 0.75em, rgba(black, 0.075), $layers: 4);
|
34
43
|
|
35
44
|
|
36
45
|
// Typography
|
37
46
|
|
47
|
+
$link-decoration: none;
|
48
|
+
|
38
49
|
$headings-font-weight: 400;
|
39
50
|
$headings-margin-bottom: 1rem;
|
40
51
|
|
@@ -45,18 +56,25 @@ $h4-font-size: 1.25rem;
|
|
45
56
|
$h5-font-size: 1.1rem;
|
46
57
|
$h6-font-size: 1rem;
|
47
58
|
|
59
|
+
$hr-color: rgba(black, 0.375);
|
48
60
|
$hr-margin-y: 1.5rem;
|
49
61
|
|
50
62
|
|
51
63
|
// Navs
|
52
64
|
|
65
|
+
$nav-pills-link-active-bg: var(--primary);
|
66
|
+
|
53
67
|
$nav-tabs-border-radius: 0;
|
54
68
|
$nav-tabs-border-width: 0;
|
55
69
|
|
56
|
-
|
57
|
-
$nav-tabs-link-
|
70
|
+
// (non-Bootstrap variables)
|
71
|
+
$nav-tabs-link-bg: #eeeeee;
|
72
|
+
$nav-tabs-link-color: #555555;
|
73
|
+
$nav-tabs-link-hover-bg: #eaeaea;
|
74
|
+
$nav-tabs-link-hover-color: #505050;
|
75
|
+
$nav-tabs-link-transition: color .1s ease-in-out, background-color .1s ease-in-out;
|
58
76
|
|
59
|
-
$nav-tabs-link-active-bg:
|
77
|
+
$nav-tabs-link-active-bg: white;
|
60
78
|
$nav-tabs-link-active-color: $body-color;
|
61
79
|
|
62
80
|
|
@@ -70,21 +88,20 @@ $navbar-dark-color: rgba(white, 0.75);
|
|
70
88
|
|
71
89
|
$breadcrumb-padding-y: 0;
|
72
90
|
$breadcrumb-padding-x: 0;
|
73
|
-
$breadcrumb-bg: transparent;
|
74
91
|
$breadcrumb-active-color: #777777;
|
75
92
|
$breadcrumb-divider-color: #cccccc;
|
76
93
|
|
77
94
|
|
78
95
|
// Tables
|
79
96
|
|
80
|
-
$table-cell-padding:
|
81
|
-
$table-
|
97
|
+
$table-cell-padding-x: 0.625rem;
|
98
|
+
$table-cell-padding-y: 0.375rem;
|
99
|
+
|
100
|
+
$table-bg: transparent;
|
101
|
+
$table-striped-bg: rgba(black, 0.02);
|
82
102
|
$table-hover-bg: rgba(black, 0.04);
|
83
103
|
$table-border-color: rgba(black, 0.13);
|
84
104
|
|
85
|
-
$table-bg-level: -11;
|
86
|
-
$table-border-level: -7;
|
87
|
-
|
88
105
|
|
89
106
|
// Alerts
|
90
107
|
|
@@ -92,6 +109,23 @@ $alert-padding-y: 1.5rem;
|
|
92
109
|
$alert-border-radius: 0.1rem;
|
93
110
|
|
94
111
|
|
112
|
+
// Progress bars
|
113
|
+
|
114
|
+
$progress-bar-bg: var(--primary);
|
115
|
+
|
116
|
+
|
117
|
+
// List group
|
118
|
+
|
119
|
+
$list-group-bg: white;
|
120
|
+
$list-group-active-bg: var(--primary);
|
121
|
+
|
122
|
+
|
123
|
+
// Close
|
124
|
+
|
125
|
+
$btn-close-color: white;
|
126
|
+
$btn-close-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='#{$btn-close-color}'><path d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/></svg>");
|
127
|
+
|
128
|
+
|
95
129
|
// Badges
|
96
130
|
|
97
131
|
$badge-padding-y: 0.35em;
|
@@ -105,40 +139,55 @@ $btn-padding-x-sm: 0.65rem;
|
|
105
139
|
|
106
140
|
// Forms
|
107
141
|
|
108
|
-
$input-
|
142
|
+
$input-bg: white;
|
109
143
|
$input-disabled-bg: #fafafa;
|
110
144
|
|
111
|
-
$input-
|
145
|
+
$input-border-color: #cccccc;
|
112
146
|
|
113
147
|
$input-placeholder-color: #999999;
|
114
148
|
|
115
149
|
$input-group-addon-bg: #eeeeee;
|
116
150
|
|
117
|
-
$form-feedback-invalid-color:
|
151
|
+
$form-feedback-invalid-color: shade-color($danger, 10%);
|
118
152
|
|
119
153
|
$form-feedback-margin-top: 0.5rem;
|
120
154
|
$form-feedback-font-size: 90%;
|
121
155
|
|
156
|
+
$form-label-font-weight: bold;
|
157
|
+
|
122
158
|
$form-text-color: #666666;
|
123
159
|
|
124
|
-
$
|
125
|
-
$
|
160
|
+
$form-check-input-width: 1.25em;
|
161
|
+
$form-check-padding-start: $form-check-input-width + 0.6em;
|
126
162
|
|
127
|
-
$
|
163
|
+
$form-switch-width: 2.25em;
|
164
|
+
$form-switch-focus-color: #aaaaaa;
|
128
165
|
|
129
|
-
$
|
130
|
-
$
|
166
|
+
$form-select-padding-x-sm: 0.62rem;
|
167
|
+
$form-select-padding-x-lg: 0.75rem;
|
131
168
|
|
132
169
|
|
133
170
|
// Dropdowns
|
134
171
|
|
172
|
+
$dropdown-bg: white;
|
135
173
|
$dropdown-spacer: 0.5rem;
|
136
|
-
$dropdown-box-shadow:
|
174
|
+
$dropdown-box-shadow: $box-shadow-sm;
|
137
175
|
$dropdown-arrow-width: 7px;
|
138
176
|
$dropdown-arrow-outer-width: $dropdown-arrow-width + 1px;
|
139
177
|
$dropdown-header-color: #111111;
|
140
178
|
$dropdown-font-size: 0.9rem;
|
141
179
|
|
180
|
+
$dropdown-link-active-bg: var(--primary);
|
181
|
+
|
182
|
+
$dropdown-dark-bg: #222222;
|
183
|
+
$dropdown-dark-divider-bg: rgba(white, 0.15);
|
184
|
+
|
185
|
+
|
186
|
+
// Pagination
|
187
|
+
|
188
|
+
$pagination-bg: white;
|
189
|
+
$pagination-disabled-bg: white;
|
190
|
+
|
142
191
|
|
143
192
|
// Cards
|
144
193
|
|
@@ -146,11 +195,29 @@ $card-bg: rgba(white, 0.5);
|
|
146
195
|
$card-border-radius: 0;
|
147
196
|
|
148
197
|
|
198
|
+
// Accordion
|
199
|
+
|
200
|
+
$accordion-bg: white;
|
201
|
+
$accordion-icon-active-color: #111111;
|
202
|
+
|
203
|
+
|
204
|
+
// Tooltips
|
205
|
+
|
206
|
+
$tooltip-color: white;
|
207
|
+
|
208
|
+
|
149
209
|
// Popovers
|
150
210
|
|
151
|
-
$popover-
|
152
|
-
$popover-
|
153
|
-
|
211
|
+
$popover-font-size: 0.9rem;
|
212
|
+
$popover-box-shadow: $dropdown-box-shadow;
|
213
|
+
|
214
|
+
$popover-header-bg: #f7f7f7;
|
215
|
+
$popover-header-border: #ebebeb;
|
216
|
+
|
217
|
+
$popover-body-padding-y: 0.5rem;
|
218
|
+
$popover-body-padding-x: 0.75rem;
|
219
|
+
|
220
|
+
$popover-arrow-width: $dropdown-arrow-width;
|
154
221
|
|
155
222
|
|
156
223
|
// Modals
|
@@ -160,6 +227,7 @@ $modal-inner-padding: 1.5rem;
|
|
160
227
|
$modal-header-padding-x: 1.5rem;
|
161
228
|
$modal-header-padding-y: 1.05rem;
|
162
229
|
|
230
|
+
$modal-content-bg: white;
|
163
231
|
$modal-content-border-radius: 0;
|
164
232
|
$modal-content-border-width: 0;
|
165
233
|
|
@@ -172,4 +240,30 @@ $modal-lg: 900px;
|
|
172
240
|
|
173
241
|
// Select2 Bootstrap Theme
|
174
242
|
|
175
|
-
$
|
243
|
+
$s2bs5-border-color: #ced4da;
|
244
|
+
|
245
|
+
$s2bs5-item-active-bg: tint-color($primary, 90%);
|
246
|
+
|
247
|
+
$s2b25-clear-width: 0.5rem;
|
248
|
+
$s2b25-clear-height: 0.5rem;
|
249
|
+
$s2b25-clear-height-sm: 0.5rem;
|
250
|
+
$s2b25-clear-height-lg: 1rem;
|
251
|
+
|
252
|
+
$s2bs5-clear-icon: str-replace($btn-close-bg, #{$btn-close-color}, #{shade-color($s2bs5-border-color, 50%)});
|
253
|
+
$s2bs5-clear-bg: transparent escape-svg($s2bs5-clear-icon) center / $s2b25-clear-height auto no-repeat;
|
254
|
+
$s2bs5-clear-hover-bg: $s2bs5-clear-bg;
|
255
|
+
|
256
|
+
$s2bs5-clear-bg-sm: transparent escape-svg($s2bs5-clear-icon) center / $s2b25-clear-height-sm auto no-repeat;
|
257
|
+
$s2bs5-clear-hover-bg-sm: $s2bs5-clear-bg-sm;
|
258
|
+
|
259
|
+
$s2bs5-clear-bg-lg: transparent escape-svg($s2bs5-clear-icon) center / $s2b25-clear-height-lg auto no-repeat;
|
260
|
+
$s2bs5-clear-hover-bg-lg: $s2bs5-clear-bg-lg;
|
261
|
+
|
262
|
+
$s2bs5-clear-tag-icon: $btn-close-bg;
|
263
|
+
$s2bs5-clear-tag-bg: transparent escape-svg($s2bs5-clear-tag-icon) center / $s2b25-clear-height-sm auto no-repeat;
|
264
|
+
|
265
|
+
$s2bs5-padding-x: 0.75rem;
|
266
|
+
$s2bs5-padding-y: 0.375rem;
|
267
|
+
|
268
|
+
$s2bs5-multi-item-padding-x: 0.375rem;
|
269
|
+
$s2bs5-multi-item-padding-y: 0;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// Update color maps
|
2
|
+
|
3
|
+
$custom-colors: (
|
4
|
+
// Backwards compatibility
|
5
|
+
"default": #bbbbbb
|
6
|
+
);
|
7
|
+
|
8
|
+
$theme-colors: map-merge($theme-colors, $custom-colors);
|
9
|
+
|
10
|
+
|
11
|
+
// Disable box shadows on form controls.
|
12
|
+
// This is done after importing the default Bootstrap variables as a null value would be overwritten.
|
13
|
+
|
14
|
+
$input-box-shadow: null;
|
15
|
+
$form-select-box-shadow: null;
|
@@ -1,7 +1,19 @@
|
|
1
1
|
// Default theme
|
2
2
|
|
3
|
-
$theme-bg:
|
4
|
-
$error-bg:
|
3
|
+
$theme-bg: $primary;
|
4
|
+
$error-bg: $danger;
|
5
|
+
|
6
|
+
$theme-bg-variations: (
|
7
|
+
default: -20%,
|
8
|
+
|
9
|
+
dark: -35%,
|
10
|
+
darker: -50%,
|
11
|
+
darkest: -65%,
|
12
|
+
|
13
|
+
light: 0,
|
14
|
+
lighter: 15%,
|
15
|
+
lightest: 30%
|
16
|
+
);
|
5
17
|
|
6
18
|
|
7
19
|
// Header
|
@@ -31,22 +43,24 @@ $sidebar-group-color: #595959;
|
|
31
43
|
$sidebar-toggle-bg: rgba(black, 0.25);
|
32
44
|
$sidebar-toggle-color: rgba(white, 0.5);
|
33
45
|
|
34
|
-
$sidebar-mobile-toggle-
|
35
|
-
$sidebar-mobile-toggle-color
|
36
|
-
$sidebar-mobile-toggle-border: 1px solid rgba($sidebar-mobile-toggle-color, 0.15);
|
46
|
+
$sidebar-mobile-toggle-color: white;
|
47
|
+
$sidebar-mobile-toggle-icon-bg: str-replace(url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='#{$sidebar-mobile-toggle-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"), "#", "%23");
|
37
48
|
|
38
|
-
$sidebar-mobile-toggle-
|
39
|
-
$sidebar-mobile-toggle-
|
49
|
+
$sidebar-mobile-toggle-bg: transparent;
|
50
|
+
$sidebar-mobile-toggle-border-width: 1px;
|
51
|
+
$sidebar-mobile-toggle-border-color: rgba($sidebar-mobile-toggle-color, 0.15);
|
52
|
+
$sidebar-mobile-toggle-border: $sidebar-mobile-toggle-border-width solid $sidebar-mobile-toggle-border-color;
|
40
53
|
|
41
|
-
$sidebar-mobile-toggle-
|
54
|
+
$sidebar-mobile-toggle-active-bg: rgba($sidebar-mobile-toggle-color, 0.1);
|
55
|
+
$sidebar-mobile-toggle-active-border-width: $sidebar-mobile-toggle-border-width;
|
56
|
+
$sidebar-mobile-toggle-active-border-color: $sidebar-mobile-toggle-border-color;
|
57
|
+
$sidebar-mobile-toggle-active-border: $sidebar-mobile-toggle-border-width solid $sidebar-mobile-toggle-active-border-color;
|
42
58
|
|
43
59
|
$sidebar-width: 250px;
|
44
60
|
$sidebar-width-collapsed: 54px;
|
45
61
|
|
46
62
|
$sidebar-transition-duration: 250ms;
|
47
63
|
|
48
|
-
$sidebar-font-size-scale: 0.925;
|
49
|
-
|
50
64
|
|
51
65
|
// Content
|
52
66
|
|
@@ -64,15 +78,26 @@ $main-content-footer-padding: 12px 20px;
|
|
64
78
|
$main-content-footer-border: 1px solid rgba(black, 0.1);
|
65
79
|
|
66
80
|
|
81
|
+
// Typography
|
82
|
+
|
83
|
+
$headings-border: 1px solid rgba(black, 0.1);
|
84
|
+
|
85
|
+
$header-font-size-scale: 0.925;
|
86
|
+
$sidebar-font-size-scale: 0.925;
|
87
|
+
|
88
|
+
$badge-hover-scale: -15%;
|
89
|
+
|
90
|
+
|
67
91
|
// Tags
|
68
92
|
|
69
|
-
$tag-
|
70
|
-
$tag-
|
71
|
-
|
93
|
+
$tag-bg-scale: -30%;
|
94
|
+
$tag-border-scale: 0;
|
95
|
+
|
96
|
+
$tag-hover-bg-scale: -15%;
|
97
|
+
$tag-hover-border-scale: 15%;
|
72
98
|
|
73
|
-
$tag-
|
74
|
-
$tag-
|
75
|
-
$tag-hover-border: darken(theme-color("primary"), 10%);
|
99
|
+
$tag-spacing-x: 0.325rem;
|
100
|
+
$tag-spacing-y: 0.25rem;
|
76
101
|
|
77
102
|
|
78
103
|
// Scopes
|
@@ -101,25 +126,29 @@ $alert-danger-bg: #de7471;
|
|
101
126
|
$alert-danger-color: white;
|
102
127
|
$alert-danger-border: #d85956;
|
103
128
|
|
104
|
-
$alert-info-bg:
|
129
|
+
$alert-info-bg: shade-color($info, 10%);
|
105
130
|
$alert-info-color: white;
|
106
|
-
$alert-info-border:
|
131
|
+
$alert-info-border: shade-color($alert-info-bg, 5%);
|
107
132
|
|
108
|
-
$alert-warning-bg:
|
133
|
+
$alert-warning-bg: shade-color($warning, 5%);
|
109
134
|
$alert-warning-color: white;
|
110
|
-
$alert-warning-border:
|
135
|
+
$alert-warning-border: shade-color($alert-warning-bg, 5%);
|
111
136
|
|
112
|
-
$alert-light-bg:
|
137
|
+
$alert-light-bg: $light;
|
113
138
|
$alert-light-color: $body-color;
|
114
|
-
$alert-light-border:
|
139
|
+
$alert-light-border: shade-color($alert-light-bg, 5%);
|
115
140
|
|
116
|
-
$alert-dark-bg:
|
141
|
+
$alert-dark-bg: $dark;
|
117
142
|
$alert-dark-color: white;
|
118
|
-
$alert-dark-border:
|
143
|
+
$alert-dark-border: shade-color($alert-dark-bg, 20%);
|
119
144
|
|
120
|
-
$alert-primary-bg:
|
145
|
+
$alert-primary-bg: shade-color($primary, 10%);
|
121
146
|
$alert-primary-color: white;
|
122
|
-
$alert-primary-border:
|
147
|
+
$alert-primary-border: shade-color($alert-primary-bg, 10%);
|
148
|
+
|
149
|
+
$alert-secondary-bg: shade-color($secondary, 10%);
|
150
|
+
$alert-secondary-color: white;
|
151
|
+
$alert-secondary-border: shade-color($alert-secondary-bg, 10%);
|
123
152
|
|
124
153
|
|
125
154
|
// Modals
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Controller } from '@hotwired/stimulus'
|
2
|
+
|
3
|
+
import { fetchWithErrorHandling, fetchTurboStream } from '../core/fetch'
|
4
|
+
|
5
|
+
export default class extends Controller {
|
6
|
+
fetch (url, options = {}) {
|
7
|
+
return fetchWithErrorHandling(url, options)
|
8
|
+
}
|
9
|
+
|
10
|
+
fetchTurboStream (url, options = {}) {
|
11
|
+
return fetchTurboStream(url, options)
|
12
|
+
}
|
13
|
+
|
14
|
+
get csrfToken () {
|
15
|
+
return document.querySelector("[name='csrf-token']").content
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import ApplicationController from './application_controller'
|
2
|
+
|
3
|
+
export default class extends ApplicationController {
|
4
|
+
static targets = ['checkbox', 'selectAll']
|
5
|
+
|
6
|
+
toggle () {
|
7
|
+
this.updateSelectAllState()
|
8
|
+
}
|
9
|
+
|
10
|
+
toggleAll () {
|
11
|
+
const isChecked = this.selectAllTarget.checked
|
12
|
+
|
13
|
+
this.checkboxTargets.forEach((checkbox) => {
|
14
|
+
checkbox.checked = isChecked
|
15
|
+
})
|
16
|
+
}
|
17
|
+
|
18
|
+
updateSelectAllState () {
|
19
|
+
const checked = this.checked
|
20
|
+
const checkboxes = this.checkboxTargets
|
21
|
+
|
22
|
+
if (checked.length === checkboxes.length) {
|
23
|
+
// All checked
|
24
|
+
this.selectAllTarget.indeterminate = false
|
25
|
+
this.selectAllTarget.checked = true
|
26
|
+
} else if (checked.length == 0) {
|
27
|
+
// None checked
|
28
|
+
this.selectAllTarget.indeterminate = false
|
29
|
+
this.selectAllTarget.checked = false
|
30
|
+
} else {
|
31
|
+
// Some checked
|
32
|
+
this.selectAllTarget.indeterminate = true
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
get checked () {
|
37
|
+
return this.checkboxTargets.filter((checkbox) => checkbox.checked)
|
38
|
+
}
|
39
|
+
|
40
|
+
get unchecked () {
|
41
|
+
return this.checkboxTargets.filter((checkbox) => !checkbox.checked)
|
42
|
+
}
|
43
|
+
}
|