trestle 0.9.9 → 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 +31 -3
- data/.gitignore +3 -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/turbo.rb +21 -0
- data/app/controllers/concerns/trestle/resource/controller/actions.rb +39 -28
- data/app/controllers/concerns/trestle/resource/controller/redirection.rb +5 -5
- data/app/controllers/trestle/application_controller.rb +2 -1
- 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/tab_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/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/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 +16 -11
- 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 +2 -36
- 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 +10 -6
- 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/color.rb +113 -0
- data/lib/trestle/configuration.rb +16 -8
- data/lib/trestle/engine.rb +23 -17
- 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/resource/toolbar.rb +2 -2
- 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 +2 -23
- data/package.json +31 -27
- data/trestle.gemspec +2 -3
- data/webpack.config.js +10 -10
- data/yarn.lock +1456 -1194
- metadata +166 -164
- data/app/assets/bundle/trestle/bundle.css +0 -12
- data/app/assets/bundle/trestle/bundle.js +0 -89
- 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,56 +1,186 @@
|
|
1
|
-
.select2-
|
2
|
-
|
3
|
-
// within Bootstrap tabs that are hidden when the page is first loaded.
|
4
|
-
// See: https://github.com/select2/select2/issues/4220
|
5
|
-
width: 100% !important;
|
1
|
+
.select2-dropdown {
|
2
|
+
z-index: $zindex-modal + 1;
|
6
3
|
}
|
7
4
|
|
8
|
-
.
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
.select2-container--bootstrap-5 {
|
6
|
+
width: auto !important;
|
7
|
+
|
8
|
+
.select2-dropdown {
|
9
|
+
.select2-search {
|
10
|
+
padding: $s2bs5-padding-y $s2bs5-padding-y;
|
13
11
|
|
14
|
-
|
12
|
+
.select2-search__field {
|
13
|
+
padding: $s2bs5-padding-y $s2bs5-padding-y;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
15
17
|
|
16
|
-
|
18
|
+
.select2-selection--single {
|
19
|
+
padding: 0;
|
17
20
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
+
.select2-selection__rendered {
|
22
|
+
height: 100%;
|
23
|
+
padding: $s2bs5-padding-y $s2bs5-indicator-padding $s2bs5-padding-y $s2bs5-padding-x;
|
21
24
|
|
22
|
-
|
23
|
-
|
25
|
+
&:has(.select2-selection__clear) {
|
26
|
+
padding-right: $s2bs5-indicator-padding + 1rem;
|
27
|
+
}
|
24
28
|
}
|
29
|
+
}
|
30
|
+
|
31
|
+
.select2-selection--multiple {
|
32
|
+
padding: $s2bs5-padding-y $s2bs5-padding-y;
|
25
33
|
|
26
|
-
.select2-
|
27
|
-
|
34
|
+
.select2-selection__rendered {
|
35
|
+
gap: $s2bs5-padding-y;
|
28
36
|
|
29
|
-
|
37
|
+
.select2-selection__choice {
|
38
|
+
background: #eee;
|
39
|
+
margin: 0;
|
40
|
+
}
|
30
41
|
|
31
|
-
|
32
|
-
|
33
|
-
|
42
|
+
.select2-selection__choice__remove {
|
43
|
+
cursor: pointer;
|
44
|
+
}
|
34
45
|
}
|
35
46
|
|
36
47
|
.select2-search--inline {
|
37
|
-
|
38
|
-
left:
|
48
|
+
width: auto;
|
49
|
+
margin-left: 0.12rem;
|
50
|
+
|
51
|
+
&:first-child {
|
52
|
+
margin-left: 0.375rem;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
&.select2-container--open {
|
58
|
+
$inset: -$input-btn-focus-width;
|
59
|
+
|
60
|
+
&.select2-container--below {
|
61
|
+
.select2-selection {
|
62
|
+
clip-path: inset($inset $inset 0 $inset);
|
63
|
+
border-bottom-width: 1px;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
&.select2-container--above {
|
68
|
+
.select2-selection {
|
69
|
+
clip-path: inset(0 $inset $inset $inset);
|
70
|
+
border-top-width: 1px;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
.select2-dropdown {
|
75
|
+
border-color: $s2bs5-focus-border-color;
|
76
|
+
box-shadow: $s2bs5-focus-box-shadow;
|
77
|
+
}
|
78
|
+
|
79
|
+
.select2-dropdown--below {
|
80
|
+
clip-path: inset(0 $inset $inset $inset);
|
81
|
+
}
|
82
|
+
|
83
|
+
.select2-dropdown--above {
|
84
|
+
clip-path: inset($inset $inset 0 $inset);
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
.tag-select.select2-selection--multiple {
|
89
|
+
clip-path: none !important;
|
90
|
+
|
91
|
+
.select2-selection__rendered {
|
92
|
+
.select2-selection__choice {
|
93
|
+
@extend .tag;
|
94
|
+
|
95
|
+
display: inline-flex !important;
|
96
|
+
align-items: center;
|
97
|
+
border: 0;
|
98
|
+
}
|
99
|
+
|
100
|
+
.select2-selection__choice__remove {
|
101
|
+
order: 99;
|
102
|
+
|
103
|
+
background: $s2bs5-clear-tag-bg;
|
104
|
+
|
105
|
+
margin-right: 0;
|
106
|
+
margin-left: 4px;
|
107
|
+
font-size: 0;
|
108
|
+
line-height: 1.2;
|
109
|
+
|
110
|
+
&:hover {
|
111
|
+
background: $s2bs5-clear-tag-bg;
|
112
|
+
}
|
113
|
+
}
|
39
114
|
}
|
40
115
|
}
|
41
116
|
|
42
117
|
// Hide the results dropdown
|
118
|
+
&.select2-container--open {
|
119
|
+
.tag-select {
|
120
|
+
&.select2-dropdown {
|
121
|
+
display: none;
|
122
|
+
}
|
123
|
+
|
124
|
+
&.select2-selection {
|
125
|
+
border-radius: $s2bs5-border-radius !important;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
129
|
+
&.select2-container--below .tag-select {
|
130
|
+
border-bottom-width: 1px;
|
131
|
+
}
|
43
132
|
|
44
|
-
|
45
|
-
|
133
|
+
&.select2-container--above .tag-select {
|
134
|
+
border-top-width: 1px;
|
135
|
+
}
|
46
136
|
}
|
47
137
|
|
48
|
-
|
49
|
-
|
50
|
-
|
138
|
+
// Prevent input zooming on mobile devices
|
139
|
+
@include media-breakpoint-down(sm) {
|
140
|
+
.select2-search--inline {
|
141
|
+
.select2-search__field {
|
142
|
+
font-size: 16px;
|
143
|
+
}
|
144
|
+
}
|
51
145
|
}
|
52
146
|
}
|
53
147
|
|
148
|
+
.form-select-sm {
|
149
|
+
~ .select2-container--bootstrap-5 {
|
150
|
+
.select2-selection--single {
|
151
|
+
padding: 0;
|
152
|
+
|
153
|
+
.select2-selection__rendered {
|
154
|
+
padding: map-get($s2bs5-small, padding-y) map-get($s2bs5-small, padding-x);
|
155
|
+
|
156
|
+
&:has(.select2-selection__clear) {
|
157
|
+
padding-right: $s2bs5-indicator-padding + 1rem;
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
}
|
162
|
+
}
|
163
|
+
|
164
|
+
.form-select-lg {
|
165
|
+
~ .select2-container--bootstrap-5 {
|
166
|
+
.select2-selection--single {
|
167
|
+
padding: 0;
|
168
|
+
|
169
|
+
.select2-selection__rendered {
|
170
|
+
padding: map-get($s2bs5-large, padding-y) map-get($s2bs5-large, padding-x);
|
171
|
+
|
172
|
+
&:has(.select2-selection__clear) {
|
173
|
+
padding-right: $s2bs5-indicator-padding + 1.5rem;
|
174
|
+
}
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}
|
179
|
+
|
180
|
+
.tag-select {
|
181
|
+
background-image: none;
|
182
|
+
}
|
183
|
+
|
54
184
|
.date-select,
|
55
185
|
.datetime-select,
|
56
186
|
.time-select {
|
@@ -59,7 +189,7 @@
|
|
59
189
|
width: auto;
|
60
190
|
}
|
61
191
|
|
62
|
-
.select2-container--bootstrap {
|
192
|
+
.select2-container--bootstrap-5 {
|
63
193
|
display: inline-block;
|
64
194
|
width: auto !important;
|
65
195
|
}
|
@@ -10,15 +10,17 @@
|
|
10
10
|
background-repeat: no-repeat;
|
11
11
|
background-size: 50px 100%, 50px 100%, 15px 100%, 15px 100%;
|
12
12
|
background-attachment: local, local, scroll, scroll;
|
13
|
+
|
14
|
+
// iOS 13 no longer supports -wekbit-overflow-scrolling so
|
15
|
+
// we must unfortunately disable the overflow shadows.
|
16
|
+
@supports (-webkit-touch-callout: none) {
|
17
|
+
background: none;
|
18
|
+
}
|
13
19
|
}
|
14
20
|
|
15
21
|
.table-container {
|
16
22
|
overflow-x: auto;
|
17
23
|
|
18
|
-
// Momentum scrolling (touch) causes rendering issues on iOS with the
|
19
|
-
// scrolling background hints. Must be disabled explicitly.
|
20
|
-
-webkit-overflow-scrolling: auto;
|
21
|
-
|
22
24
|
@include table-container-background(white);
|
23
25
|
|
24
26
|
.main-content-sidebar & {
|
@@ -36,24 +38,24 @@
|
|
36
38
|
@extend .table-hover;
|
37
39
|
|
38
40
|
margin-bottom: 0;
|
41
|
+
vertical-align: middle;
|
39
42
|
|
40
|
-
|
41
|
-
|
43
|
+
tr[data-url] {
|
44
|
+
cursor: pointer;
|
42
45
|
}
|
43
46
|
|
44
|
-
thead
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
}
|
49
|
-
}
|
47
|
+
// Wider border between thead/tbody/tfoot
|
48
|
+
> :not(:last-child) > :last-child > * {
|
49
|
+
border-bottom-color: $table-border-color;
|
50
|
+
border-bottom-width: 2px;
|
50
51
|
}
|
51
52
|
|
52
|
-
|
53
|
-
|
53
|
+
// No border on bottom of table
|
54
|
+
> :last-child > :last-child > * {
|
55
|
+
border-bottom: none;
|
54
56
|
}
|
55
57
|
|
56
|
-
th
|
58
|
+
thead th {
|
57
59
|
white-space: nowrap;
|
58
60
|
|
59
61
|
&.wrap {
|
@@ -67,59 +69,15 @@
|
|
67
69
|
|
68
70
|
.select-row {
|
69
71
|
width: 2.5em;
|
70
|
-
text-align: center;
|
71
|
-
|
72
|
-
.custom-control {
|
73
|
-
padding-left: 1.5rem;
|
74
|
-
}
|
75
|
-
|
76
|
-
.custom-control-input {
|
77
|
-
width: 1.5rem;
|
78
|
-
height: 1.5rem;
|
79
|
-
}
|
80
|
-
|
81
|
-
.custom-control-label {
|
82
|
-
&::before,
|
83
|
-
&::after {
|
84
|
-
left: -1.325rem;
|
85
|
-
}
|
86
|
-
}
|
87
|
-
}
|
88
|
-
|
89
|
-
.actions {
|
90
|
-
text-align: right;
|
91
|
-
white-space: nowrap;
|
92
|
-
|
93
|
-
.btn {
|
94
|
-
@extend .btn-sm;
|
95
|
-
|
96
|
-
padding: 0.5rem;
|
97
|
-
line-height: 1;
|
98
|
-
|
99
|
-
i {
|
100
|
-
font-size: 0.85rem;
|
101
72
|
|
102
|
-
|
103
|
-
|
104
|
-
}
|
73
|
+
padding-top: 0.125rem;
|
74
|
+
padding-bottom: 0.125rem;
|
105
75
|
|
106
|
-
|
107
|
-
|
108
|
-
}
|
109
|
-
}
|
110
|
-
|
111
|
-
.btn,
|
112
|
-
.btn-group {
|
113
|
-
+ .btn,
|
114
|
-
+ .btn-group {
|
115
|
-
margin-left: 4px;
|
116
|
-
}
|
117
|
-
}
|
76
|
+
text-align: center;
|
77
|
+
vertical-align: middle;
|
118
78
|
|
119
|
-
.
|
120
|
-
|
121
|
-
margin-left: -1px;
|
122
|
-
}
|
79
|
+
.form-check-input {
|
80
|
+
display: block;
|
123
81
|
}
|
124
82
|
}
|
125
83
|
|
@@ -139,3 +97,40 @@
|
|
139
97
|
list-style-position: inside;
|
140
98
|
}
|
141
99
|
}
|
100
|
+
|
101
|
+
.table-actions {
|
102
|
+
text-align: right;
|
103
|
+
white-space: nowrap;
|
104
|
+
|
105
|
+
.btn {
|
106
|
+
@extend .btn-sm;
|
107
|
+
|
108
|
+
padding: 0.5rem;
|
109
|
+
line-height: 1;
|
110
|
+
|
111
|
+
i {
|
112
|
+
font-size: 0.85rem;
|
113
|
+
|
114
|
+
width: 1.25rem;
|
115
|
+
text-align: center;
|
116
|
+
}
|
117
|
+
|
118
|
+
&.has-icon .btn-label {
|
119
|
+
@include visually-hidden;
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
.btn,
|
124
|
+
.btn-group {
|
125
|
+
+ .btn,
|
126
|
+
+ .btn-group {
|
127
|
+
margin-left: 4px;
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
.btn-group {
|
132
|
+
.btn + .btn {
|
133
|
+
margin-left: -1px;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
@@ -25,10 +25,17 @@
|
|
25
25
|
margin-right: 4px;
|
26
26
|
padding: 10px 20px;
|
27
27
|
|
28
|
+
font-weight: 500;
|
29
|
+
|
30
|
+
transition: $nav-tabs-link-transition;
|
31
|
+
|
28
32
|
background-color: $nav-tabs-link-bg;
|
29
33
|
color: $nav-tabs-link-color;
|
30
34
|
|
31
|
-
|
35
|
+
&:not(.active):hover {
|
36
|
+
background-color: $nav-tabs-link-hover-bg;
|
37
|
+
color: $nav-tabs-link-hover-color;
|
38
|
+
}
|
32
39
|
}
|
33
40
|
|
34
41
|
.align-right {
|
@@ -52,12 +59,12 @@
|
|
52
59
|
// Default badge color when no badge- classes specified
|
53
60
|
&:not([class*="badge-"]) {
|
54
61
|
background: $gray-600;
|
55
|
-
color: color-
|
62
|
+
color: color-contrast($gray-600);
|
56
63
|
}
|
57
64
|
}
|
58
65
|
}
|
59
66
|
|
60
|
-
@include media-breakpoint-down(
|
67
|
+
@include media-breakpoint-down(md) {
|
61
68
|
.nav-tabs {
|
62
69
|
.nav-link {
|
63
70
|
font-size: 0.95rem;
|
@@ -1,27 +1,82 @@
|
|
1
|
+
@mixin tag-variant(
|
2
|
+
$base-color,
|
3
|
+
$background: shift-color($base-color, $tag-bg-scale),
|
4
|
+
$border: shift-color($base-color, $tag-border-scale),
|
5
|
+
$color: color-contrast($background),
|
6
|
+
$hover-background: shift-color($base-color, $tag-hover-bg-scale),
|
7
|
+
$hover-border: shift-color($base-color, $tag-hover-border-scale),
|
8
|
+
$hover-color: $color
|
9
|
+
) {
|
10
|
+
--tag-bg: #{$background};
|
11
|
+
--tag-border-color: #{$border};
|
12
|
+
--tag-color: #{$color};
|
13
|
+
|
14
|
+
--tag-hover-bg: #{$hover-background};
|
15
|
+
--tag-hover-border-color: #{$hover-border};
|
16
|
+
--tag-hover-color: #{$hover-color};
|
17
|
+
}
|
18
|
+
|
1
19
|
.tag {
|
20
|
+
--tag-padding-y: 0.25rem;
|
21
|
+
--tag-padding-x: 6px;
|
22
|
+
|
23
|
+
--tag-border-width: 0.325rem;
|
24
|
+
--tag-border-radius: 0.25rem;
|
25
|
+
|
26
|
+
--tag-font-size: 0.8rem;
|
27
|
+
--tag-font-weight: normal;
|
28
|
+
--tag-line-height: 1.1;
|
29
|
+
|
30
|
+
--tag-bg: #{shift-color($primary, $tag-bg-scale)};
|
31
|
+
--tag-border-color: #{rgba(black, 0.25)};
|
32
|
+
--tag-color: white;
|
33
|
+
|
34
|
+
--tag-hover-border-color: #{rgba(black, 0.35)};
|
35
|
+
|
2
36
|
display: inline-block;
|
3
|
-
padding:
|
4
|
-
margin: 1px 4px 1px 0;
|
37
|
+
padding: var(--tag-padding-y) var(--tag-padding-x) var(--tag-padding-y) calc(var(--tag-padding-x) - var(--tag-border-width) / 2);
|
5
38
|
|
6
|
-
font-size:
|
7
|
-
|
39
|
+
font-size: var(--tag-font-size);
|
40
|
+
font-weight: var(--tag-font-weight);
|
41
|
+
line-height: var(--tag-line-height);
|
8
42
|
|
9
43
|
white-space: nowrap;
|
10
44
|
|
11
|
-
border-left:
|
12
|
-
border-radius:
|
45
|
+
border-left: var(--tag-border-width) solid var(--tag-border-color);
|
46
|
+
border-radius: var(--tag-border-radius);
|
13
47
|
|
14
|
-
color:
|
15
|
-
|
16
|
-
}
|
48
|
+
background-color: var(--tag-bg);
|
49
|
+
color: var(--tag-color);
|
17
50
|
|
18
|
-
a
|
19
|
-
|
51
|
+
@at-root a#{&} {
|
52
|
+
color: var(--tag-color);
|
53
|
+
font-weight: inherit;
|
20
54
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
55
|
+
&:hover, &:focus {
|
56
|
+
text-decoration: none;
|
57
|
+
|
58
|
+
background-color: var(--tag-hover-bg, var(--tag-bg));
|
59
|
+
border-color: var(--tag-hover-border-color, var(--tag-border-color));
|
60
|
+
color: var(--tag-hover-color, var(--tag-color));
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
@each $state, $value in $theme-colors {
|
66
|
+
.tag-#{$state} {
|
67
|
+
@include tag-variant($value);
|
26
68
|
}
|
27
69
|
}
|
70
|
+
|
71
|
+
.tag-list {
|
72
|
+
--tag-spacing-y: #{$tag-spacing-y};
|
73
|
+
--tag-spacing-x: #{$tag-spacing-x};
|
74
|
+
|
75
|
+
display: inline-flex;
|
76
|
+
flex-wrap: wrap;
|
77
|
+
gap: var(--tag-spacing-y) var(--tag-spacing-x);
|
78
|
+
|
79
|
+
list-style: none;
|
80
|
+
margin: 0;
|
81
|
+
padding: 0;
|
82
|
+
}
|
@@ -4,21 +4,24 @@
|
|
4
4
|
|
5
5
|
.primary-toolbar {
|
6
6
|
.btn {
|
7
|
-
|
7
|
+
--#{$prefix}btn-padding-x: 1.25rem;
|
8
|
+
--#{$prefix}btn-padding-y: 0.5rem;
|
9
|
+
--#{$prefix}btn-font-size: 1.35rem;
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
padding: 0.35rem 0.75rem;
|
11
|
+
@include media-breakpoint-down(md) {
|
12
|
+
--#{$prefix}btn-padding-x: 0.75rem;
|
13
|
+
--#{$prefix}btn-padding-y: 0.35rem;
|
14
|
+
--#{$prefix}btn-font-size: 1.25rem;
|
15
|
+
--#{$prefix}btn-border-radius: #{$btn-border-radius-sm};
|
15
16
|
}
|
16
17
|
}
|
17
18
|
}
|
18
19
|
|
19
20
|
.secondary-toolbar {
|
20
21
|
.btn {
|
21
|
-
|
22
|
+
--#{$prefix}btn-padding-x: #{$btn-padding-x-sm};
|
23
|
+
--#{$prefix}btn-padding-y: #{$btn-padding-y-sm};
|
24
|
+
--#{$prefix}btn-font-size: #{$btn-font-size-sm};
|
22
25
|
|
23
26
|
> i {
|
24
27
|
font-size: 80%;
|
@@ -28,9 +31,11 @@
|
|
28
31
|
}
|
29
32
|
}
|
30
33
|
|
31
|
-
@include media-breakpoint-down(
|
32
|
-
|
33
|
-
padding: 0.2rem
|
34
|
+
@include media-breakpoint-down(md) {
|
35
|
+
--#{$prefix}btn-padding-x: 0.5rem;
|
36
|
+
--#{$prefix}btn-padding-y: 0.2rem;
|
37
|
+
--#{$prefix}btn-font-size: 0.75rem;
|
38
|
+
--#{$prefix}btn-border-radius: #{$btn-border-radius-sm};
|
34
39
|
}
|
35
40
|
}
|
36
41
|
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
// Configuration
|
2
|
+
// @import "~bootstrap/scss/functions";
|
3
|
+
// @import "~bootstrap/scss/variables";
|
4
|
+
// @import "~bootstrap/scss/variables-dark";
|
5
|
+
@import "~bootstrap/scss/maps";
|
6
|
+
@import "~bootstrap/scss/mixins";
|
7
|
+
@import "~bootstrap/scss/utilities";
|
8
|
+
|
9
|
+
// Layout & components
|
10
|
+
@import "~bootstrap/scss/root";
|
11
|
+
@import "~bootstrap/scss/reboot";
|
12
|
+
@import "~bootstrap/scss/type";
|
13
|
+
@import "~bootstrap/scss/images";
|
14
|
+
@import "~bootstrap/scss/containers";
|
15
|
+
@import "~bootstrap/scss/grid";
|
16
|
+
@import "~bootstrap/scss/tables";
|
17
|
+
@import "~bootstrap/scss/forms";
|
18
|
+
@import "~bootstrap/scss/buttons";
|
19
|
+
@import "~bootstrap/scss/transitions";
|
20
|
+
@import "~bootstrap/scss/dropdown";
|
21
|
+
@import "~bootstrap/scss/button-group";
|
22
|
+
@import "~bootstrap/scss/nav";
|
23
|
+
@import "~bootstrap/scss/navbar";
|
24
|
+
@import "~bootstrap/scss/card";
|
25
|
+
@import "~bootstrap/scss/accordion";
|
26
|
+
@import "~bootstrap/scss/breadcrumb";
|
27
|
+
@import "~bootstrap/scss/pagination";
|
28
|
+
@import "~bootstrap/scss/badge";
|
29
|
+
@import "~bootstrap/scss/alert";
|
30
|
+
@import "~bootstrap/scss/progress";
|
31
|
+
@import "~bootstrap/scss/list-group";
|
32
|
+
@import "~bootstrap/scss/close";
|
33
|
+
@import "~bootstrap/scss/toasts";
|
34
|
+
@import "~bootstrap/scss/modal";
|
35
|
+
@import "~bootstrap/scss/tooltip";
|
36
|
+
@import "~bootstrap/scss/popover";
|
37
|
+
@import "~bootstrap/scss/carousel";
|
38
|
+
@import "~bootstrap/scss/spinners";
|
39
|
+
@import "~bootstrap/scss/offcanvas";
|
40
|
+
@import "~bootstrap/scss/placeholders";
|
41
|
+
|
42
|
+
// Helpers
|
43
|
+
@import "~bootstrap/scss/helpers";
|
44
|
+
|
45
|
+
// Utilities
|
46
|
+
@import "~bootstrap/scss/utilities/api";
|
@@ -1,5 +1,6 @@
|
|
1
|
-
@import "
|
2
|
-
|
1
|
+
@import "./bootstrap";
|
2
|
+
|
3
|
+
@import "~photoswipe/dist/photoswipe.css";
|
3
4
|
@import "~flatpickr/dist/flatpickr";
|
4
5
|
@import "~select2/src/scss/core";
|
5
|
-
@import "~select2-theme
|
6
|
+
@import "~select2-bootstrap-5-theme/src/include-all";
|
@@ -0,0 +1,39 @@
|
|
1
|
+
@use "sass:math";
|
2
|
+
|
3
|
+
@function soft-shadow($distance: 0.5rem, $blur: 1.5rem, $color: rgba(black, 0.125), $layers: 5, $reduce: math.div($distance, -4)) {
|
4
|
+
$val: 0 #{$distance} #{$blur} #{$reduce} #{$color};
|
5
|
+
|
6
|
+
@for $i from 1 through ($layers - 1) {
|
7
|
+
$distance: math.div($distance, 2);
|
8
|
+
$blur: math.div($blur, 2);
|
9
|
+
|
10
|
+
$val: 0 #{$distance} #{$blur} #{$reduce} #{$color}, #{$val};
|
11
|
+
}
|
12
|
+
|
13
|
+
@return $val;
|
14
|
+
}
|
15
|
+
|
16
|
+
@function strip-units($number) {
|
17
|
+
@return $number / ($number * 0 + 1);
|
18
|
+
}
|
19
|
+
|
20
|
+
@function em($rem) {
|
21
|
+
@return strip-units($rem) * 1em;
|
22
|
+
}
|
23
|
+
|
24
|
+
@function adjust-theme-hsl($name, $hue: null, $saturation: null, $lightness: null, $wrap: true) {
|
25
|
+
$hsl:
|
26
|
+
adjust-css-value(var(--#{$name}-h), $hue)
|
27
|
+
adjust-css-value(var(--#{$name}-s), $saturation)
|
28
|
+
adjust-css-value(var(--#{$name}-l), $lightness);
|
29
|
+
|
30
|
+
@return if($wrap, hsl($hsl), $hsl);
|
31
|
+
}
|
32
|
+
|
33
|
+
@function adjust-css-value($var, $adjustment) {
|
34
|
+
@if ($adjustment and $adjustment != 0) {
|
35
|
+
@return calc(#{$var} * #{1 + math.div($adjustment, 100%)});
|
36
|
+
} @else {
|
37
|
+
@return $var;
|
38
|
+
}
|
39
|
+
}
|