plutonium 0.16.5 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/plutonium.css +9 -1
- data/app/assets/plutonium.js +23273 -9599
- data/app/assets/plutonium.js.map +4 -4
- data/app/assets/plutonium.min.js +159 -49
- data/app/assets/plutonium.min.js.map +4 -4
- data/app/views/plutonium/_resource_header.html.erb +33 -24
- data/app/views/rodauth/otp_unlock.html.erb +22 -0
- data/app/views/rodauth/otp_unlock_not_available.html.erb +14 -0
- data/app/views/rodauth/webauthn_remove.html.erb +1 -0
- data/docs/guide/getting-started/resources.md +2 -2
- data/docs/guide/tutorial.md +4 -4
- data/gemfiles/rails_7.gemfile.lock +406 -0
- data/lib/generators/pu/core/assets/assets_generator.rb +1 -1
- data/lib/generators/pu/res/conn/conn_generator.rb +24 -10
- data/lib/generators/pu/rodauth/concerns/configuration.rb +11 -0
- data/lib/generators/pu/rodauth/concerns/feature_selector.rb +4 -0
- data/lib/generators/pu/rodauth/install_generator.rb +3 -1
- data/lib/generators/pu/rodauth/migration/active_record/otp_unlock.erb +7 -0
- data/lib/generators/pu/rodauth/templates/INSTRUCTIONS +2 -46
- data/lib/generators/pu/rodauth/templates/app/controllers/plugin_controller.rb.tt +3 -3
- data/lib/generators/pu/rodauth/templates/app/mailers/rodauth_mailer.rb.tt +50 -1
- data/lib/generators/pu/rodauth/templates/app/rodauth/account_rodauth_plugin.rb.tt +37 -3
- data/lib/generators/pu/rodauth/templates/app/rodauth/rodauth_plugin.rb.tt +33 -8
- data/lib/generators/pu/rodauth/templates/app/views/rodauth_mailer/otp_disabled.text.erb +2 -0
- data/lib/generators/pu/rodauth/templates/app/views/rodauth_mailer/otp_locked_out.text.erb +9 -0
- data/lib/generators/pu/rodauth/templates/app/views/rodauth_mailer/otp_setup.text.erb +2 -0
- data/lib/generators/pu/rodauth/templates/app/views/rodauth_mailer/otp_unlock_failed.text.erb +8 -0
- data/lib/generators/pu/rodauth/templates/app/views/rodauth_mailer/otp_unlocked.text.erb +2 -0
- data/lib/generators/pu/rodauth/templates/app/views/rodauth_mailer/webauthn_authenticator_added.text.erb +3 -0
- data/lib/generators/pu/rodauth/templates/app/views/rodauth_mailer/webauthn_authenticator_removed.text.erb +3 -0
- data/lib/generators/pu/rodauth/views_generator.rb +1 -12
- data/lib/plutonium/core/controllers/authorizable.rb +3 -1
- data/lib/plutonium/helpers/application_helper.rb +0 -8
- data/lib/plutonium/helpers.rb +0 -3
- data/lib/plutonium/railtie.rb +0 -14
- data/lib/plutonium/reloader.rb +2 -12
- data/lib/plutonium/rodauth/controller_methods.rb +1 -3
- data/lib/plutonium/ui/component/behaviour.rb +1 -1
- data/lib/plutonium/ui/component/kit.rb +59 -15
- data/lib/plutonium/ui/display/base.rb +6 -2
- data/lib/plutonium/ui/display/{component → components}/association.rb +1 -1
- data/lib/plutonium/ui/display/components/attachment.rb +93 -0
- data/lib/plutonium/ui/display/{component → components}/markdown.rb +2 -1
- data/lib/plutonium/ui/display/resource.rb +21 -6
- data/lib/plutonium/ui/display/theme.rb +2 -1
- data/lib/plutonium/ui/form/base.rb +7 -0
- data/lib/plutonium/ui/form/components/belongs_to.rb +45 -1
- data/lib/plutonium/ui/form/components/has_many.rb +45 -1
- data/lib/plutonium/ui/form/components/uppy.rb +173 -0
- data/lib/plutonium/ui/form/query.rb +5 -5
- data/lib/plutonium/ui/form/resource.rb +6 -6
- data/lib/plutonium/ui/form/theme.rb +6 -2
- data/lib/plutonium/ui/frame_navigator_panel.rb +25 -4
- data/lib/plutonium/ui/layout/base.rb +1 -1
- data/lib/plutonium/ui/layout/header.rb +1 -1
- data/lib/plutonium/ui/layout/sidebar.rb +0 -1
- data/lib/plutonium/ui/nav_grid_menu.rb +93 -0
- data/lib/plutonium/ui/nav_user.rb +121 -0
- data/lib/plutonium/ui/panel.rb +2 -2
- data/lib/plutonium/ui/tab_list.rb +73 -0
- data/lib/plutonium/ui/table/base.rb +7 -1
- data/lib/plutonium/ui/table/components/attachment.rb +71 -0
- data/lib/plutonium/ui/table/components/pagy_info.rb +12 -4
- data/lib/plutonium/ui/table/components/pagy_pagination.rb +5 -5
- data/lib/plutonium/ui/table/display_theme.rb +2 -1
- data/lib/plutonium/ui/table/resource.rb +11 -12
- data/lib/plutonium/version.rb +1 -1
- data/package-lock.json +356 -18
- data/package.json +6 -2
- data/src/css/plutonium.css +3 -0
- data/src/js/controllers/attachment_input_controller.js +241 -0
- data/src/js/controllers/attachment_preview_container_controller.js +15 -0
- data/src/js/controllers/attachment_preview_controller.js +63 -0
- data/src/js/controllers/color_mode_controller.js +0 -1
- data/src/js/controllers/easymde_controller.js +0 -1
- data/src/js/controllers/flatpickr_controller.js +0 -1
- data/src/js/controllers/form_controller.js +0 -1
- data/src/js/controllers/frame_navigator_controller.js +16 -12
- data/src/js/controllers/intl_tel_input_controller.js +0 -1
- data/src/js/controllers/register_controllers.js +12 -30
- data/src/js/controllers/resource_collapse_controller.js +0 -1
- data/src/js/controllers/resource_dismiss_controller.js +0 -1
- data/src/js/controllers/resource_drop_down_controller.js +161 -9
- data/src/js/controllers/{header_controller.js → resource_header_controller.js} +1 -0
- data/src/js/controllers/resource_tab_list_controller.js +64 -0
- data/src/js/controllers/select_navigator.js +16 -0
- data/src/js/controllers/slim_select_controller.js +0 -1
- data/src/js/support/dom_element.js +78 -0
- data/src/js/support/mime_icon.js +127 -0
- data/tailwind.options.js +0 -5
- metadata +29 -642
- data/README copy.md +0 -83
- data/app/assets/application.js.bk +0 -31419
- data/app/assets/icons/flags/ghana.svg +0 -49
- data/app/assets/icons/outline/address-book.svg +0 -3
- data/app/assets/icons/outline/adjustments-horizontal.svg +0 -3
- data/app/assets/icons/outline/adjustments-vertical.svg +0 -3
- data/app/assets/icons/outline/align-center.svg +0 -3
- data/app/assets/icons/outline/angle-down.svg +0 -3
- data/app/assets/icons/outline/angle-left.svg +0 -3
- data/app/assets/icons/outline/angle-right.svg +0 -3
- data/app/assets/icons/outline/angle-up.svg +0 -3
- data/app/assets/icons/outline/annotation.svg +0 -3
- data/app/assets/icons/outline/archive-arrow-down.svg +0 -3
- data/app/assets/icons/outline/archive.svg +0 -3
- data/app/assets/icons/outline/arrow-down-to-bracket.svg +0 -3
- data/app/assets/icons/outline/arrow-down.svg +0 -3
- data/app/assets/icons/outline/arrow-left-to-bracket.svg +0 -3
- data/app/assets/icons/outline/arrow-left.svg +0 -3
- data/app/assets/icons/outline/arrow-right-alt.svg +0 -3
- data/app/assets/icons/outline/arrow-right-to-bracket.svg +0 -3
- data/app/assets/icons/outline/arrow-right.svg +0 -3
- data/app/assets/icons/outline/arrow-sort-letters.svg +0 -3
- data/app/assets/icons/outline/arrow-up-down.svg +0 -3
- data/app/assets/icons/outline/arrow-up-from-bracket.svg +0 -3
- data/app/assets/icons/outline/arrow-up-right-down-left.svg +0 -3
- data/app/assets/icons/outline/arrow-up-right-from-square.svg +0 -3
- data/app/assets/icons/outline/arrow-up.svg +0 -3
- data/app/assets/icons/outline/arrows-repeat-count.svg +0 -3
- data/app/assets/icons/outline/arrows-repeat.svg +0 -3
- data/app/assets/icons/outline/atom.svg +0 -3
- data/app/assets/icons/outline/backward-step.svg +0 -3
- data/app/assets/icons/outline/badge-check.svg +0 -3
- data/app/assets/icons/outline/bars-from-left.svg +0 -3
- data/app/assets/icons/outline/bars.svg +0 -3
- data/app/assets/icons/outline/bell-active-alt.svg +0 -3
- data/app/assets/icons/outline/bell-active.svg +0 -3
- data/app/assets/icons/outline/bell-ring.svg +0 -3
- data/app/assets/icons/outline/bell.svg +0 -3
- data/app/assets/icons/outline/blender-phone.svg +0 -3
- data/app/assets/icons/outline/book-open.svg +0 -3
- data/app/assets/icons/outline/book.svg +0 -3
- data/app/assets/icons/outline/bookmark.svg +0 -3
- data/app/assets/icons/outline/brain.svg +0 -3
- data/app/assets/icons/outline/briefcase.svg +0 -3
- data/app/assets/icons/outline/bug.svg +0 -3
- data/app/assets/icons/outline/building.svg +0 -3
- data/app/assets/icons/outline/bullhorn.svg +0 -3
- data/app/assets/icons/outline/calendar-edit.svg +0 -3
- data/app/assets/icons/outline/calendar-month.svg +0 -3
- data/app/assets/icons/outline/calendar-plus.svg +0 -3
- data/app/assets/icons/outline/calendar-week.svg +0 -3
- data/app/assets/icons/outline/camera-photo.svg +0 -4
- data/app/assets/icons/outline/caption.svg +0 -3
- data/app/assets/icons/outline/caret-down.svg +0 -3
- data/app/assets/icons/outline/caret-left.svg +0 -3
- data/app/assets/icons/outline/caret-right.svg +0 -3
- data/app/assets/icons/outline/caret-sort.svg +0 -3
- data/app/assets/icons/outline/caret-up.svg +0 -3
- data/app/assets/icons/outline/cart-plus-alt.svg +0 -3
- data/app/assets/icons/outline/cart-plus.svg +0 -3
- data/app/assets/icons/outline/cart.svg +0 -3
- data/app/assets/icons/outline/cash.svg +0 -3
- data/app/assets/icons/outline/chart-line-down.svg +0 -3
- data/app/assets/icons/outline/chart-line-up.svg +0 -3
- data/app/assets/icons/outline/chart-mixed-dollar.svg +0 -3
- data/app/assets/icons/outline/chart-mixed.svg +0 -3
- data/app/assets/icons/outline/chart-pie.svg +0 -4
- data/app/assets/icons/outline/chart.svg +0 -3
- data/app/assets/icons/outline/check-circle.svg +0 -3
- data/app/assets/icons/outline/check-plus-circle.svg +0 -3
- data/app/assets/icons/outline/check.svg +0 -3
- data/app/assets/icons/outline/chevron-double-down.svg +0 -3
- data/app/assets/icons/outline/chevron-double-left.svg +0 -3
- data/app/assets/icons/outline/chevron-double-right.svg +0 -3
- data/app/assets/icons/outline/chevron-double-up.svg +0 -3
- data/app/assets/icons/outline/chevron-down.svg +0 -3
- data/app/assets/icons/outline/chevron-left.svg +0 -3
- data/app/assets/icons/outline/chevron-right.svg +0 -3
- data/app/assets/icons/outline/chevron-sort.svg +0 -3
- data/app/assets/icons/outline/chevron-up.svg +0 -3
- data/app/assets/icons/outline/circle-pause.svg +0 -3
- data/app/assets/icons/outline/circle-plus.svg +0 -3
- data/app/assets/icons/outline/clapperboard-play.svg +0 -3
- data/app/assets/icons/outline/clipboard-check.svg +0 -3
- data/app/assets/icons/outline/clipboard-list.svg +0 -3
- data/app/assets/icons/outline/clipboard.svg +0 -3
- data/app/assets/icons/outline/clock.svg +0 -3
- data/app/assets/icons/outline/close-circle.svg +0 -3
- data/app/assets/icons/outline/close.svg +0 -3
- data/app/assets/icons/outline/cloud-arrow-up.svg +0 -3
- data/app/assets/icons/outline/code-branch.svg +0 -3
- data/app/assets/icons/outline/code-fork.svg +0 -3
- data/app/assets/icons/outline/code-merge.svg +0 -3
- data/app/assets/icons/outline/code-pull-request.svg +0 -3
- data/app/assets/icons/outline/code.svg +0 -3
- data/app/assets/icons/outline/cog.svg +0 -4
- data/app/assets/icons/outline/column.svg +0 -3
- data/app/assets/icons/outline/command.svg +0 -3
- data/app/assets/icons/outline/compress.svg +0 -3
- data/app/assets/icons/outline/computer-speaker.svg +0 -3
- data/app/assets/icons/outline/credit-card.svg +0 -3
- data/app/assets/icons/outline/database.svg +0 -3
- data/app/assets/icons/outline/desktop-pc.svg +0 -3
- data/app/assets/icons/outline/dna.svg +0 -3
- data/app/assets/icons/outline/dollar.svg +0 -3
- data/app/assets/icons/outline/dots-horizontal.svg +0 -3
- data/app/assets/icons/outline/dots-vertical.svg +0 -3
- data/app/assets/icons/outline/download.svg +0 -3
- data/app/assets/icons/outline/draw-square.svg +0 -3
- data/app/assets/icons/outline/edit.svg +0 -3
- data/app/assets/icons/outline/envelope-open.svg +0 -3
- data/app/assets/icons/outline/envelope.svg +0 -3
- data/app/assets/icons/outline/euro.svg +0 -3
- data/app/assets/icons/outline/exclamation-circle.svg +0 -3
- data/app/assets/icons/outline/expand.svg +0 -3
- data/app/assets/icons/outline/eye-slash.svg +0 -3
- data/app/assets/icons/outline/eye.svg +0 -4
- data/app/assets/icons/outline/face-explode.svg +0 -4
- data/app/assets/icons/outline/face-grin-stars.svg +0 -6
- data/app/assets/icons/outline/face-grin.svg +0 -3
- data/app/assets/icons/outline/face-laugh.svg +0 -3
- data/app/assets/icons/outline/file-chart-bar.svg +0 -3
- data/app/assets/icons/outline/file-check.svg +0 -3
- data/app/assets/icons/outline/file-circle-plus.svg +0 -3
- data/app/assets/icons/outline/file-clone.svg +0 -3
- data/app/assets/icons/outline/file-code.svg +0 -3
- data/app/assets/icons/outline/file-copy-alt.svg +0 -3
- data/app/assets/icons/outline/file-copy.svg +0 -3
- data/app/assets/icons/outline/file-csv.svg +0 -3
- data/app/assets/icons/outline/file-export.svg +0 -3
- data/app/assets/icons/outline/file-image.svg +0 -4
- data/app/assets/icons/outline/file-import.svg +0 -3
- data/app/assets/icons/outline/file-invoice.svg +0 -3
- data/app/assets/icons/outline/file-lines.svg +0 -3
- data/app/assets/icons/outline/file-music.svg +0 -3
- data/app/assets/icons/outline/file-paste.svg +0 -3
- data/app/assets/icons/outline/file-pdf.svg +0 -3
- data/app/assets/icons/outline/file-pen.svg +0 -3
- data/app/assets/icons/outline/file-ppt.svg +0 -3
- data/app/assets/icons/outline/file-search.svg +0 -3
- data/app/assets/icons/outline/file-shield.svg +0 -3
- data/app/assets/icons/outline/file-video.svg +0 -3
- data/app/assets/icons/outline/file-word.svg +0 -3
- data/app/assets/icons/outline/file-zip.svg +0 -3
- data/app/assets/icons/outline/file.svg +0 -3
- data/app/assets/icons/outline/filter.svg +0 -3
- data/app/assets/icons/outline/fingerprint.svg +0 -3
- data/app/assets/icons/outline/fire.svg +0 -3
- data/app/assets/icons/outline/flag.svg +0 -3
- data/app/assets/icons/outline/folder-arrow-right.svg +0 -3
- data/app/assets/icons/outline/folder-duplicate.svg +0 -3
- data/app/assets/icons/outline/folder-open.svg +0 -3
- data/app/assets/icons/outline/folder-plus.svg +0 -3
- data/app/assets/icons/outline/folder.svg +0 -3
- data/app/assets/icons/outline/forward-step.svg +0 -3
- data/app/assets/icons/outline/forward.svg +0 -3
- data/app/assets/icons/outline/gift-box.svg +0 -3
- data/app/assets/icons/outline/globe.svg +0 -3
- data/app/assets/icons/outline/grid-plus.svg +0 -3
- data/app/assets/icons/outline/grid.svg +0 -3
- data/app/assets/icons/outline/headphones.svg +0 -3
- data/app/assets/icons/outline/heart.svg +0 -3
- data/app/assets/icons/outline/home.svg +0 -3
- data/app/assets/icons/outline/hourglass.svg +0 -3
- data/app/assets/icons/outline/image.svg +0 -3
- data/app/assets/icons/outline/inbox-full.svg +0 -3
- data/app/assets/icons/outline/inbox.svg +0 -3
- data/app/assets/icons/outline/indent.svg +0 -3
- data/app/assets/icons/outline/info-circle.svg +0 -3
- data/app/assets/icons/outline/keyboard.svg +0 -5
- data/app/assets/icons/outline/label.svg +0 -3
- data/app/assets/icons/outline/landmark.svg +0 -3
- data/app/assets/icons/outline/layers.svg +0 -3
- data/app/assets/icons/outline/letter-bold.svg +0 -3
- data/app/assets/icons/outline/letter-italic.svg +0 -3
- data/app/assets/icons/outline/letter-underline.svg +0 -3
- data/app/assets/icons/outline/life-saver.svg +0 -3
- data/app/assets/icons/outline/lightbulb.svg +0 -3
- data/app/assets/icons/outline/link.svg +0 -3
- data/app/assets/icons/outline/list-music.svg +0 -3
- data/app/assets/icons/outline/list.svg +0 -3
- data/app/assets/icons/outline/lock-open.svg +0 -3
- data/app/assets/icons/outline/lock-time.svg +0 -3
- data/app/assets/icons/outline/lock.svg +0 -3
- data/app/assets/icons/outline/mail-box.svg +0 -3
- data/app/assets/icons/outline/map-pin-alt.svg +0 -4
- data/app/assets/icons/outline/map-pin.svg +0 -3
- data/app/assets/icons/outline/message-caption.svg +0 -3
- data/app/assets/icons/outline/message-dots.svg +0 -3
- data/app/assets/icons/outline/messages.svg +0 -3
- data/app/assets/icons/outline/microphone.svg +0 -3
- data/app/assets/icons/outline/minimize.svg +0 -3
- data/app/assets/icons/outline/minus.svg +0 -3
- data/app/assets/icons/outline/mobile-phone.svg +0 -3
- data/app/assets/icons/outline/moon.svg +0 -3
- data/app/assets/icons/outline/newspaper.svg +0 -3
- data/app/assets/icons/outline/ordered-list.svg +0 -3
- data/app/assets/icons/outline/outdent.svg +0 -3
- data/app/assets/icons/outline/palette.svg +0 -3
- data/app/assets/icons/outline/paper-clip.svg +0 -3
- data/app/assets/icons/outline/paper-plane.svg +0 -3
- data/app/assets/icons/outline/paragraph.svg +0 -3
- data/app/assets/icons/outline/pause.svg +0 -3
- data/app/assets/icons/outline/pen-nib.svg +0 -3
- data/app/assets/icons/outline/pen.svg +0 -3
- data/app/assets/icons/outline/phone.svg +0 -3
- data/app/assets/icons/outline/play.svg +0 -3
- data/app/assets/icons/outline/plus.svg +0 -3
- data/app/assets/icons/outline/printer.svg +0 -3
- data/app/assets/icons/outline/profile-card.svg +0 -3
- data/app/assets/icons/outline/question-circle.svg +0 -3
- data/app/assets/icons/outline/quote.svg +0 -3
- data/app/assets/icons/outline/receipt.svg +0 -3
- data/app/assets/icons/outline/rectangle-list.svg +0 -3
- data/app/assets/icons/outline/redo.svg +0 -3
- data/app/assets/icons/outline/refresh.svg +0 -3
- data/app/assets/icons/outline/reply-all.svg +0 -3
- data/app/assets/icons/outline/reply.svg +0 -3
- data/app/assets/icons/outline/restore-window.svg +0 -3
- data/app/assets/icons/outline/rocket.svg +0 -3
- data/app/assets/icons/outline/ruler-combined.svg +0 -3
- data/app/assets/icons/outline/sale-percent.svg +0 -3
- data/app/assets/icons/outline/scale-balanced.svg +0 -3
- data/app/assets/icons/outline/search.svg +0 -3
- data/app/assets/icons/outline/share-all.svg +0 -3
- data/app/assets/icons/outline/share-nodes.svg +0 -3
- data/app/assets/icons/outline/shield-check.svg +0 -3
- data/app/assets/icons/outline/shield.svg +0 -3
- data/app/assets/icons/outline/shopping-bag.svg +0 -3
- data/app/assets/icons/outline/shuffle.svg +0 -3
- data/app/assets/icons/outline/sort-horizontal.svg +0 -3
- data/app/assets/icons/outline/sort.svg +0 -3
- data/app/assets/icons/outline/star-half-stroke.svg +0 -3
- data/app/assets/icons/outline/star-half.svg +0 -3
- data/app/assets/icons/outline/star.svg +0 -3
- data/app/assets/icons/outline/store.svg +0 -3
- data/app/assets/icons/outline/sun.svg +0 -3
- data/app/assets/icons/outline/swatchbook.svg +0 -3
- data/app/assets/icons/outline/table-column.svg +0 -3
- data/app/assets/icons/outline/table-row.svg +0 -3
- data/app/assets/icons/outline/tablet.svg +0 -3
- data/app/assets/icons/outline/tag.svg +0 -3
- data/app/assets/icons/outline/terminal.svg +0 -3
- data/app/assets/icons/outline/text-size.svg +0 -3
- data/app/assets/icons/outline/text-slash.svg +0 -3
- data/app/assets/icons/outline/thumbs-down.svg +0 -3
- data/app/assets/icons/outline/thumbs-up.svg +0 -3
- data/app/assets/icons/outline/ticket.svg +0 -3
- data/app/assets/icons/outline/trash-bin.svg +0 -3
- data/app/assets/icons/outline/truck.svg +0 -3
- data/app/assets/icons/outline/undo.svg +0 -3
- data/app/assets/icons/outline/upload.svg +0 -3
- data/app/assets/icons/outline/user-add.svg +0 -3
- data/app/assets/icons/outline/user-circle.svg +0 -3
- data/app/assets/icons/outline/user-edit.svg +0 -3
- data/app/assets/icons/outline/user-headset.svg +0 -3
- data/app/assets/icons/outline/user-remove.svg +0 -3
- data/app/assets/icons/outline/user-settings.svg +0 -3
- data/app/assets/icons/outline/user.svg +0 -3
- data/app/assets/icons/outline/users-group.svg +0 -3
- data/app/assets/icons/outline/users.svg +0 -3
- data/app/assets/icons/outline/video-camera.svg +0 -3
- data/app/assets/icons/outline/volume-down.svg +0 -3
- data/app/assets/icons/outline/volume-up.svg +0 -3
- data/app/assets/icons/outline/wallet.svg +0 -3
- data/app/assets/icons/outline/wand-magic-sparkles.svg +0 -3
- data/app/assets/icons/outline/window.svg +0 -3
- data/app/assets/icons/outline/zoom-in.svg +0 -3
- data/app/assets/icons/outline/zoom-out.svg +0 -3
- data/app/assets/icons/solid/X.svg +0 -3
- data/app/assets/icons/solid/address-book.svg +0 -3
- data/app/assets/icons/solid/adjustments-horizontal.svg +0 -3
- data/app/assets/icons/solid/adjustments-vertical.svg +0 -3
- data/app/assets/icons/solid/annotation.svg +0 -3
- data/app/assets/icons/solid/apple.svg +0 -3
- data/app/assets/icons/solid/archive-arrow-down.svg +0 -3
- data/app/assets/icons/solid/archive.svg +0 -4
- data/app/assets/icons/solid/arrow-right-alt.svg +0 -3
- data/app/assets/icons/solid/arrow-up-right-from-square.svg +0 -4
- data/app/assets/icons/solid/backward-step.svg +0 -3
- data/app/assets/icons/solid/badge-check.svg +0 -3
- data/app/assets/icons/solid/bell-active-alt.svg +0 -3
- data/app/assets/icons/solid/bell-active.svg +0 -5
- data/app/assets/icons/solid/bell-ring.svg +0 -3
- data/app/assets/icons/solid/bell.svg +0 -3
- data/app/assets/icons/solid/blender-phone.svg +0 -3
- data/app/assets/icons/solid/book-open.svg +0 -3
- data/app/assets/icons/solid/book.svg +0 -3
- data/app/assets/icons/solid/bookmark.svg +0 -3
- data/app/assets/icons/solid/brain.svg +0 -3
- data/app/assets/icons/solid/briefcase.svg +0 -3
- data/app/assets/icons/solid/bug.svg +0 -3
- data/app/assets/icons/solid/building.svg +0 -3
- data/app/assets/icons/solid/bullhorn.svg +0 -3
- data/app/assets/icons/solid/calendar-edit.svg +0 -4
- data/app/assets/icons/solid/calendar-month.svg +0 -3
- data/app/assets/icons/solid/calendar-plus.svg +0 -3
- data/app/assets/icons/solid/calendar-week.svg +0 -3
- data/app/assets/icons/solid/camera-photo.svg +0 -3
- data/app/assets/icons/solid/caption.svg +0 -3
- data/app/assets/icons/solid/caret-down.svg +0 -3
- data/app/assets/icons/solid/caret-left.svg +0 -3
- data/app/assets/icons/solid/caret-right.svg +0 -3
- data/app/assets/icons/solid/caret-sort.svg +0 -3
- data/app/assets/icons/solid/caret-up.svg +0 -3
- data/app/assets/icons/solid/cart-plus-alt.svg +0 -4
- data/app/assets/icons/solid/cart-plus.svg +0 -4
- data/app/assets/icons/solid/cart.svg +0 -3
- data/app/assets/icons/solid/cash.svg +0 -5
- data/app/assets/icons/solid/chart-mixed-dollar.svg +0 -3
- data/app/assets/icons/solid/chart-pie.svg +0 -4
- data/app/assets/icons/solid/check-circle.svg +0 -3
- data/app/assets/icons/solid/check-plus-circle.svg +0 -4
- data/app/assets/icons/solid/circle-pause.svg +0 -3
- data/app/assets/icons/solid/circle-plus.svg +0 -3
- data/app/assets/icons/solid/clapperboard-play.svg +0 -3
- data/app/assets/icons/solid/clipboard-check.svg +0 -3
- data/app/assets/icons/solid/clipboard-list.svg +0 -3
- data/app/assets/icons/solid/clipboard.svg +0 -3
- data/app/assets/icons/solid/clock.svg +0 -3
- data/app/assets/icons/solid/close-circle.svg +0 -3
- data/app/assets/icons/solid/cloud-arrow-up.svg +0 -4
- data/app/assets/icons/solid/code-branch.svg +0 -3
- data/app/assets/icons/solid/code-fork.svg +0 -3
- data/app/assets/icons/solid/code-merge.svg +0 -3
- data/app/assets/icons/solid/code-pull-request.svg +0 -3
- data/app/assets/icons/solid/cog.svg +0 -3
- data/app/assets/icons/solid/column.svg +0 -3
- data/app/assets/icons/solid/computer-speaker.svg +0 -4
- data/app/assets/icons/solid/credit-card.svg +0 -4
- data/app/assets/icons/solid/css.svg +0 -3
- data/app/assets/icons/solid/database.svg +0 -3
- data/app/assets/icons/solid/desktop-pc.svg +0 -3
- data/app/assets/icons/solid/discord.svg +0 -3
- data/app/assets/icons/solid/download.svg +0 -4
- data/app/assets/icons/solid/draw-square.svg +0 -4
- data/app/assets/icons/solid/dribbble.svg +0 -3
- data/app/assets/icons/solid/dropbox.svg +0 -4
- data/app/assets/icons/solid/edit.svg +0 -4
- data/app/assets/icons/solid/envelope-open.svg +0 -4
- data/app/assets/icons/solid/envelope.svg +0 -4
- data/app/assets/icons/solid/exclamation-circle.svg +0 -3
- data/app/assets/icons/solid/eye-slash.svg +0 -5
- data/app/assets/icons/solid/eye.svg +0 -3
- data/app/assets/icons/solid/face-explode.svg +0 -3
- data/app/assets/icons/solid/face-grin-stars.svg +0 -3
- data/app/assets/icons/solid/face-grin.svg +0 -3
- data/app/assets/icons/solid/face-laugh.svg +0 -3
- data/app/assets/icons/solid/facebook.svg +0 -3
- data/app/assets/icons/solid/file-chart-bar.svg +0 -3
- data/app/assets/icons/solid/file-check.svg +0 -4
- data/app/assets/icons/solid/file-circle-plus.svg +0 -4
- data/app/assets/icons/solid/file-clone.svg +0 -4
- data/app/assets/icons/solid/file-code.svg +0 -3
- data/app/assets/icons/solid/file-copy-alt.svg +0 -4
- data/app/assets/icons/solid/file-copy.svg +0 -4
- data/app/assets/icons/solid/file-csv.svg +0 -3
- data/app/assets/icons/solid/file-export.svg +0 -3
- data/app/assets/icons/solid/file-image.svg +0 -3
- data/app/assets/icons/solid/file-import.svg +0 -3
- data/app/assets/icons/solid/file-invoice.svg +0 -3
- data/app/assets/icons/solid/file-lines.svg +0 -3
- data/app/assets/icons/solid/file-music.svg +0 -3
- data/app/assets/icons/solid/file-paste.svg +0 -4
- data/app/assets/icons/solid/file-pdf.svg +0 -3
- data/app/assets/icons/solid/file-pen.svg +0 -4
- data/app/assets/icons/solid/file-ppt.svg +0 -3
- data/app/assets/icons/solid/file-search.svg +0 -3
- data/app/assets/icons/solid/file-shield.svg +0 -4
- data/app/assets/icons/solid/file-video.svg +0 -3
- data/app/assets/icons/solid/file-word.svg +0 -3
- data/app/assets/icons/solid/file-zip.svg +0 -3
- data/app/assets/icons/solid/file.svg +0 -3
- data/app/assets/icons/solid/filter.svg +0 -3
- data/app/assets/icons/solid/fire.svg +0 -3
- data/app/assets/icons/solid/flag.svg +0 -3
- data/app/assets/icons/solid/flowbite.svg +0 -6
- data/app/assets/icons/solid/folder-arrow-right.svg +0 -3
- data/app/assets/icons/solid/folder-duplicate.svg +0 -4
- data/app/assets/icons/solid/folder-open.svg +0 -3
- data/app/assets/icons/solid/folder-plus.svg +0 -3
- data/app/assets/icons/solid/folder.svg +0 -3
- data/app/assets/icons/solid/forward-step.svg +0 -3
- data/app/assets/icons/solid/forward.svg +0 -3
- data/app/assets/icons/solid/gift-box.svg +0 -3
- data/app/assets/icons/solid/github.svg +0 -3
- data/app/assets/icons/solid/globe.svg +0 -3
- data/app/assets/icons/solid/google.svg +0 -3
- data/app/assets/icons/solid/grid-plus.svg +0 -3
- data/app/assets/icons/solid/grid.svg +0 -3
- data/app/assets/icons/solid/headphones.svg +0 -3
- data/app/assets/icons/solid/heart.svg +0 -3
- data/app/assets/icons/solid/home.svg +0 -3
- data/app/assets/icons/solid/hourglass.svg +0 -3
- data/app/assets/icons/solid/html.svg +0 -3
- data/app/assets/icons/solid/image.svg +0 -4
- data/app/assets/icons/solid/inbox-full.svg +0 -3
- data/app/assets/icons/solid/inbox.svg +0 -3
- data/app/assets/icons/solid/indent.svg +0 -3
- data/app/assets/icons/solid/info-circle.svg +0 -3
- data/app/assets/icons/solid/keyboard.svg +0 -3
- data/app/assets/icons/solid/label.svg +0 -3
- data/app/assets/icons/solid/landmark.svg +0 -4
- data/app/assets/icons/solid/layers.svg +0 -4
- data/app/assets/icons/solid/life-saver.svg +0 -3
- data/app/assets/icons/solid/lightbulb.svg +0 -3
- data/app/assets/icons/solid/linkedin.svg +0 -4
- data/app/assets/icons/solid/list-music.svg +0 -3
- data/app/assets/icons/solid/lock-open.svg +0 -3
- data/app/assets/icons/solid/lock-time.svg +0 -4
- data/app/assets/icons/solid/lock.svg +0 -3
- data/app/assets/icons/solid/mail-box.svg +0 -3
- data/app/assets/icons/solid/map-pin-alt.svg +0 -3
- data/app/assets/icons/solid/map-pin.svg +0 -3
- data/app/assets/icons/solid/message-caption.svg +0 -3
- data/app/assets/icons/solid/message-dots.svg +0 -3
- data/app/assets/icons/solid/messages.svg +0 -4
- data/app/assets/icons/solid/microphone.svg +0 -4
- data/app/assets/icons/solid/mobile-phone.svg +0 -3
- data/app/assets/icons/solid/moon.svg +0 -3
- data/app/assets/icons/solid/newspaper.svg +0 -3
- data/app/assets/icons/solid/npm.svg +0 -3
- data/app/assets/icons/solid/outdent.svg +0 -3
- data/app/assets/icons/solid/palette.svg +0 -3
- data/app/assets/icons/solid/paper-plane.svg +0 -3
- data/app/assets/icons/solid/paragraph.svg +0 -3
- data/app/assets/icons/solid/pause.svg +0 -3
- data/app/assets/icons/solid/pen-nib.svg +0 -3
- data/app/assets/icons/solid/pen.svg +0 -3
- data/app/assets/icons/solid/phone.svg +0 -3
- data/app/assets/icons/solid/play.svg +0 -3
- data/app/assets/icons/solid/printer.svg +0 -3
- data/app/assets/icons/solid/profile-card.svg +0 -3
- data/app/assets/icons/solid/question-circle.svg +0 -3
- data/app/assets/icons/solid/quote.svg +0 -3
- data/app/assets/icons/solid/react.svg +0 -4
- data/app/assets/icons/solid/receipt.svg +0 -3
- data/app/assets/icons/solid/rectangle-list.svg +0 -3
- data/app/assets/icons/solid/reply-all.svg +0 -3
- data/app/assets/icons/solid/reply.svg +0 -3
- data/app/assets/icons/solid/rocket.svg +0 -3
- data/app/assets/icons/solid/sale-percent.svg +0 -3
- data/app/assets/icons/solid/scale-balanced.svg +0 -3
- data/app/assets/icons/solid/search.svg +0 -4
- data/app/assets/icons/solid/share-all.svg +0 -3
- data/app/assets/icons/solid/share-nodes.svg +0 -3
- data/app/assets/icons/solid/shield-check.svg +0 -3
- data/app/assets/icons/solid/shield.svg +0 -3
- data/app/assets/icons/solid/shopping-bag.svg +0 -3
- data/app/assets/icons/solid/stackoverflow.svg +0 -4
- data/app/assets/icons/solid/star-half-stroke.svg +0 -3
- data/app/assets/icons/solid/star-half.svg +0 -3
- data/app/assets/icons/solid/star.svg +0 -3
- data/app/assets/icons/solid/store.svg +0 -3
- data/app/assets/icons/solid/sun.svg +0 -3
- data/app/assets/icons/solid/swatchbook.svg +0 -3
- data/app/assets/icons/solid/table-column.svg +0 -3
- data/app/assets/icons/solid/table-row.svg +0 -3
- data/app/assets/icons/solid/tablet.svg +0 -3
- data/app/assets/icons/solid/tag.svg +0 -3
- data/app/assets/icons/solid/tailwind.svg +0 -3
- data/app/assets/icons/solid/terminal.svg +0 -3
- data/app/assets/icons/solid/thumbs-down.svg +0 -3
- data/app/assets/icons/solid/thumbs-up.svg +0 -3
- data/app/assets/icons/solid/ticket.svg +0 -3
- data/app/assets/icons/solid/trash-bin.svg +0 -3
- data/app/assets/icons/solid/truck.svg +0 -3
- data/app/assets/icons/solid/twitter.svg +0 -3
- data/app/assets/icons/solid/upload.svg +0 -3
- data/app/assets/icons/solid/user-add.svg +0 -3
- data/app/assets/icons/solid/user-circle.svg +0 -3
- data/app/assets/icons/solid/user-edit.svg +0 -3
- data/app/assets/icons/solid/user-headset.svg +0 -3
- data/app/assets/icons/solid/user-remove.svg +0 -3
- data/app/assets/icons/solid/user-settings.svg +0 -3
- data/app/assets/icons/solid/user.svg +0 -3
- data/app/assets/icons/solid/users-group.svg +0 -3
- data/app/assets/icons/solid/users.svg +0 -3
- data/app/assets/icons/solid/video-camera.svg +0 -3
- data/app/assets/icons/solid/volume-down.svg +0 -4
- data/app/assets/icons/solid/volume-up.svg +0 -5
- data/app/assets/icons/solid/vue.svg +0 -3
- data/app/assets/icons/solid/wallet.svg +0 -4
- data/app/assets/icons/solid/wand-magic-sparkles.svg +0 -4
- data/app/assets/icons/solid/window-restore.svg +0 -4
- data/app/assets/icons/solid/window.svg +0 -3
- data/app/assets/icons/solid/youtube.svg +0 -3
- data/app/assets/icons/solid/zoom-in.svg +0 -3
- data/app/assets/icons/solid/zoom-out.svg +0 -3
- data/app/views/components/action_button/action_button_component.html.erb +0 -7
- data/app/views/components/action_button/action_button_component.rb +0 -15
- data/app/views/components/attributes.rb +0 -184
- data/app/views/components/base.rb +0 -29
- data/app/views/components/block/block_component.html.erb +0 -3
- data/app/views/components/block/block_component.rb +0 -44
- data/app/views/components/breadcrumbs/breadcrumbs_component.html.erb +0 -96
- data/app/views/components/breadcrumbs/breadcrumbs_component.rb +0 -9
- data/app/views/components/button/button_component.html.erb +0 -11
- data/app/views/components/button/button_component.rb +0 -128
- data/app/views/components/dyna_frame_content/dyna_frame_content_component.html.erb +0 -8
- data/app/views/components/dyna_frame_content/dyna_frame_content_component.rb +0 -6
- data/app/views/components/dyna_frame_host/dyna_frame_host_component.html.erb +0 -3
- data/app/views/components/dyna_frame_host/dyna_frame_host_component.rb +0 -18
- data/app/views/components/empty_card/empty_card_component.html.erb +0 -6
- data/app/views/components/empty_card/empty_card_component.rb +0 -7
- data/app/views/components/form/form_builder.rb +0 -75
- data/app/views/components/form/form_component.html.erb +0 -73
- data/app/views/components/form/form_component.rb +0 -23
- data/app/views/components/has_many_panel/has_many_panel_component.html.erb +0 -25
- data/app/views/components/has_many_panel/has_many_panel_component.rb +0 -16
- data/app/views/components/header/header_component.html.erb +0 -1
- data/app/views/components/header/header_component.rb +0 -7
- data/app/views/components/interactive_action_form/interactive_action_form_component.html.erb +0 -39
- data/app/views/components/interactive_action_form/interactive_action_form_component.rb +0 -8
- data/app/views/components/nav_grid_menu/nav_grid_menu_component.html.erb +0 -24
- data/app/views/components/nav_grid_menu/nav_grid_menu_component.rb +0 -23
- data/app/views/components/nav_grid_menu_item/nav_grid_menu_item_component.html.erb +0 -4
- data/app/views/components/nav_grid_menu_item/nav_grid_menu_item_component.rb +0 -20
- data/app/views/components/nav_user/nav_user_component.html.erb +0 -50
- data/app/views/components/nav_user/nav_user_component.rb +0 -32
- data/app/views/components/nav_user_link/nav_user_link_component.html.erb +0 -7
- data/app/views/components/nav_user_link/nav_user_link_component.rb +0 -23
- data/app/views/components/nav_user_section/nav_user_section_component.html.erb +0 -7
- data/app/views/components/nav_user_section/nav_user_section_component.rb +0 -18
- data/app/views/components/nested_resource_form_fields/nested_resource_form_fields_component.html.erb +0 -64
- data/app/views/components/nested_resource_form_fields/nested_resource_form_fields_component.rb +0 -29
- data/app/views/components/pagination/pagination_component.html.erb +0 -6
- data/app/views/components/pagination/pagination_component.rb +0 -94
- data/app/views/components/panel/panel_component.html.erb +0 -17
- data/app/views/components/panel/panel_component.rb +0 -17
- data/app/views/components/resource_header/resource_header_component.html.erb +0 -83
- data/app/views/components/resource_header/resource_header_component.rb +0 -30
- data/app/views/components/resource_layout/resource_layout_component.html.erb +0 -53
- data/app/views/components/resource_layout/resource_layout_component.rb +0 -41
- data/app/views/components/sidebar/sidebar_component.html.erb +0 -69
- data/app/views/components/sidebar/sidebar_component.rb +0 -23
- data/app/views/components/sidebar_menu/sidebar_menu_component.html.erb +0 -5
- data/app/views/components/sidebar_menu/sidebar_menu_component.rb +0 -17
- data/app/views/components/sidebar_menu_item/sidebar_menu_item_component.html.erb +0 -64
- data/app/views/components/sidebar_menu_item/sidebar_menu_item_component.rb +0 -52
- data/app/views/components/skeleton/table/table_component.html.erb +0 -18
- data/app/views/components/skeleton/table/table_component.rb +0 -6
- data/app/views/components/table/table_component.html.erb +0 -43
- data/app/views/components/table/table_component.rb +0 -159
- data/app/views/components/table_search_input/table_search_input_component.html.erb +0 -48
- data/app/views/components/table_search_input/table_search_input_component.rb +0 -15
- data/app/views/components/table_toolbar/table_toolbar_component.html.erb +0 -7
- data/app/views/components/table_toolbar/table_toolbar_component.rb +0 -17
- data/app/views/components/toolbar/toolbar_component.html.erb +0 -67
- data/app/views/components/toolbar/toolbar_component.rb +0 -26
- data/app/views/layouts/resource.html copy.erb +0 -49
- data/app/views/plutonium/_resource_header.html copy.erb +0 -287
- data/lib/generators/pu/gen/component/component_generator.rb +0 -99
- data/lib/generators/pu/gen/component/templates/component.html.erb.tt +0 -3
- data/lib/generators/pu/gen/component/templates/component.rb.tt +0 -15
- data/lib/generators/pu/gen/component/templates/controller.js.tt +0 -8
- data/lib/plutonium/builders/menus/sidebar_menu.rb.bk +0 -26
- data/lib/plutonium/builders/menus/sidebar_menu_item.rb.bk +0 -28
- data/lib/plutonium/component_registry.rb +0 -19
- data/lib/plutonium/core/action.rb +0 -49
- data/lib/plutonium/core/actions/basic_action.rb +0 -16
- data/lib/plutonium/core/actions/collection.rb +0 -37
- data/lib/plutonium/core/actions/destroy_action.rb +0 -23
- data/lib/plutonium/core/actions/edit_action.rb +0 -21
- data/lib/plutonium/core/actions/interactive_action.rb +0 -64
- data/lib/plutonium/core/actions/new_action.rb +0 -20
- data/lib/plutonium/core/actions/show_action.rb +0 -19
- data/lib/plutonium/core/associations/renderers/base.rb +0 -77
- data/lib/plutonium/core/associations/renderers/factory.rb +0 -36
- data/lib/plutonium/core/associations/renderers/has_many_renderer.rb +0 -18
- data/lib/plutonium/core/autodiscovery/association_renderer_discoverer.rb +0 -31
- data/lib/plutonium/core/autodiscovery/discoverer.rb +0 -15
- data/lib/plutonium/core/autodiscovery/input_discoverer.rb +0 -31
- data/lib/plutonium/core/autodiscovery/renderer_discoverer.rb +0 -31
- data/lib/plutonium/core/definers/action_definer.rb +0 -25
- data/lib/plutonium/core/definers/association_renderer_definer.rb +0 -33
- data/lib/plutonium/core/definers/field_definer.rb +0 -19
- data/lib/plutonium/core/definers/field_input_definer.rb +0 -77
- data/lib/plutonium/core/definers/field_renderer_definer.rb +0 -37
- data/lib/plutonium/core/fields/inputs/attachment_input.rb +0 -24
- data/lib/plutonium/core/fields/inputs/base.rb +0 -110
- data/lib/plutonium/core/fields/inputs/belongs_to_association_input.rb +0 -15
- data/lib/plutonium/core/fields/inputs/checkbox_input.rb +0 -15
- data/lib/plutonium/core/fields/inputs/date_time_input.rb +0 -15
- data/lib/plutonium/core/fields/inputs/factory.rb +0 -50
- data/lib/plutonium/core/fields/inputs/has_many_association_input.rb +0 -15
- data/lib/plutonium/core/fields/inputs/nested_input.rb +0 -72
- data/lib/plutonium/core/fields/inputs/noop_input.rb +0 -16
- data/lib/plutonium/core/fields/inputs/phone_input.rb +0 -22
- data/lib/plutonium/core/fields/inputs/polymorphic_belongs_to_association_input.rb +0 -48
- data/lib/plutonium/core/fields/inputs/simple_form_association_input.rb +0 -26
- data/lib/plutonium/core/fields/inputs/simple_form_input.rb +0 -13
- data/lib/plutonium/core/fields/renderers/association_renderer.rb +0 -28
- data/lib/plutonium/core/fields/renderers/attachment_renderer.rb +0 -21
- data/lib/plutonium/core/fields/renderers/base.rb +0 -83
- data/lib/plutonium/core/fields/renderers/basic_renderer.rb +0 -13
- data/lib/plutonium/core/fields/renderers/factory.rb +0 -37
- data/lib/plutonium/core/renderable.rb +0 -20
- data/lib/plutonium/core/ui/collection.rb +0 -18
- data/lib/plutonium/core/ui/detail.rb +0 -15
- data/lib/plutonium/core/ui/form.rb +0 -12
- data/lib/plutonium/helpers/action_buttons_helper.rb +0 -32
- data/lib/plutonium/helpers/component_helper.rb +0 -14
- data/lib/plutonium/helpers/form_helper.rb +0 -50
- data/lib/plutonium/icons.rb +0 -32
- data/lib/plutonium/preserved__/field.rb.bk +0 -65
- data/lib/plutonium/preserved__/input.rb.bk +0 -93
- data/lib/plutonium/ui/table/components/pagy_page_info.rb +0 -70
- data/src/js/controllers/has_many_panel_controller.js +0 -8
- data/src/js/controllers/interactive_action_form_controller.js +0 -13
- data/src/js/controllers/nav_grid_menu_controller.js +0 -8
- data/src/js/controllers/nav_grid_menu_item_controller.js +0 -8
- data/src/js/controllers/nav_user_controller.js +0 -8
- data/src/js/controllers/nav_user_link_controller.js +0 -8
- data/src/js/controllers/nav_user_section_controller.js +0 -8
- data/src/js/controllers/resource_layout_controller.js +0 -8
- data/src/js/controllers/sidebar_controller.js +0 -8
- data/src/js/controllers/sidebar_menu_controller.js +0 -8
- data/src/js/controllers/sidebar_menu_item_controller.js +0 -8
- data/src/js/controllers/table_controller.js +0 -8
- data/src/js/controllers/table_search_input_controller.js +0 -8
- data/src/js/controllers/table_toolbar_controller.js +0 -8
- data/src/js/controllers/toolbar_controller.js +0 -8
@@ -1,18 +0,0 @@
|
|
1
|
-
module PlutoniumUi
|
2
|
-
class NavUserSectionComponent < PlutoniumUi::Base
|
3
|
-
renders_many :links, "PlutoniumUi::NavUserLinkComponent"
|
4
|
-
|
5
|
-
private
|
6
|
-
|
7
|
-
def base_attributes
|
8
|
-
# base attributes go here
|
9
|
-
{
|
10
|
-
classname: "nav-user-section text-gray-700 dark:text-gray-300",
|
11
|
-
controller: "nav-user-section",
|
12
|
-
aria: {labelledby: "user-nav-dropdown-toggle"}
|
13
|
-
}
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
Plutonium::ComponentRegistry.register :nav_user_section, to: PlutoniumUi::NavUserSectionComponent
|
data/app/views/components/nested_resource_form_fields/nested_resource_form_fields_component.html.erb
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
<div <%= attributes_html %>>
|
2
|
-
<h2 class="text-lg font-bold dark:text-white ">
|
3
|
-
<%= label %>
|
4
|
-
</h2>
|
5
|
-
<p class="mb-4 text-md font-normal text-gray-500 dark:text-gray-400">
|
6
|
-
<%= description %>
|
7
|
-
</p>
|
8
|
-
|
9
|
-
<template data-nested-resource-form-fields-target="template">
|
10
|
-
<% new_record = resource_class.new %>
|
11
|
-
<%= form.simple_fields_for name, new_record, child_index: 'NEW_RECORD' do |nested| %>
|
12
|
-
<fieldset class="border-t mt-4 pt-4 first:border-t-0 first:pt-0 nested-resource-form-fields" data-new-record="<%= nested.object.new_record? %>">
|
13
|
-
<% inputs.values.each do |input| %>
|
14
|
-
<%= render input.with(form: nested, record: new_record) %>
|
15
|
-
<% end %>
|
16
|
-
|
17
|
-
<div class="text-right">
|
18
|
-
<% if nested.object.new_record? || allow_destroy %>
|
19
|
-
<label class="text-md font-medium text-red-900">
|
20
|
-
<%= "Delete" %>
|
21
|
-
<input type="checkbox" value=""
|
22
|
-
data-action="nested-resource-form-fields#remove"
|
23
|
-
class="w-4 h-4 ms-2 text-red-600 bg-red-100 border-red-300 rounded focus:ring-red-500 dark:focus:ring-red-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600">
|
24
|
-
</label>
|
25
|
-
<% end %>
|
26
|
-
</div>
|
27
|
-
|
28
|
-
<%= nested.hidden_field :_destroy %>
|
29
|
-
</fieldset>
|
30
|
-
<% end %>
|
31
|
-
</template>
|
32
|
-
|
33
|
-
<div>
|
34
|
-
<%= form.simple_fields_for name do |nested| %>
|
35
|
-
<fieldset class="border-t mt-4 pt-4 first:border-t-0 first:pt-0 nested-resource-form-fields" data-new-record="<%= nested.object.new_record? %>">
|
36
|
-
<% inputs.values.each do |input| %>
|
37
|
-
<%= render input.with(form: nested, record: new_record) %>
|
38
|
-
<% end %>
|
39
|
-
|
40
|
-
<div>
|
41
|
-
<% if nested.object.new_record? || allow_destroy %>
|
42
|
-
<label class="flex items-center justify-end text-md font-medium text-red-900">
|
43
|
-
<%= "Delete" %>
|
44
|
-
<input type="checkbox" value=""
|
45
|
-
data-action="nested-resource-form-fields#remove"
|
46
|
-
class="w-4 h-4 ms-2 text-red-600 bg-red-100 border-red-300 rounded focus:ring-red-500 dark:focus:ring-red-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600">
|
47
|
-
</label>
|
48
|
-
<% end %>
|
49
|
-
</div>
|
50
|
-
|
51
|
-
<%= nested.hidden_field :_destroy %>
|
52
|
-
</fieldset>
|
53
|
-
<% end %>
|
54
|
-
|
55
|
-
<div data-nested-resource-form-fields-target="target" hidden></div>
|
56
|
-
</div>
|
57
|
-
|
58
|
-
<%=
|
59
|
-
render_component :button, label: "Add #{name.to_s.singularize.humanize}", classname: "mt-4", data: {
|
60
|
-
action: "nested-resource-form-fields#add",
|
61
|
-
"nested-resource-form-fields-target": "addButton"
|
62
|
-
}
|
63
|
-
%>
|
64
|
-
</div>
|
data/app/views/components/nested_resource_form_fields/nested_resource_form_fields_component.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
module PlutoniumUi
|
2
|
-
class NestedResourceFormFieldsComponent < PlutoniumUi::Base
|
3
|
-
option :name
|
4
|
-
option :resource_class
|
5
|
-
option :form
|
6
|
-
option :inputs
|
7
|
-
option :label, optional: true
|
8
|
-
option :description, optional: true
|
9
|
-
option :allow_destroy, optional: true
|
10
|
-
option :update_only, optional: true
|
11
|
-
option :limit, optional: true
|
12
|
-
|
13
|
-
def base_attributes
|
14
|
-
{
|
15
|
-
classname: "mt-6 mb-4",
|
16
|
-
controller: "nested-resource-form-fields",
|
17
|
-
data: {
|
18
|
-
"nested-resource-form-fields-limit-value": limit
|
19
|
-
}
|
20
|
-
}
|
21
|
-
end
|
22
|
-
|
23
|
-
def label
|
24
|
-
super || name.to_s.humanize
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
Plutonium::ComponentRegistry.register :nested_resource_form_fields, to: PlutoniumUi::NestedResourceFormFieldsComponent
|
@@ -1,94 +0,0 @@
|
|
1
|
-
require "pagy"
|
2
|
-
|
3
|
-
module PlutoniumUi
|
4
|
-
class PaginationComponent < PlutoniumUi::Base
|
5
|
-
include Pagy::Frontend
|
6
|
-
|
7
|
-
option :pager
|
8
|
-
option :pagy_id, optional: true
|
9
|
-
option :nav_aria_label, optional: true
|
10
|
-
option :nav_i18n_key, optional: true
|
11
|
-
|
12
|
-
def pagy_nav(pagy, **vars)
|
13
|
-
p_id = %( id="#{pagy_id}") if pagy_id
|
14
|
-
link = pagy_link_proc(pagy, link_extra: "class=\"#{default_link_classes} #{page_link_classes}\"")
|
15
|
-
|
16
|
-
html = +%(<nav#{p_id} class="pagy pagy-nav pagination" #{nav_aria_label_attr(pagy, nav_aria_label, nav_i18n_key)}>)
|
17
|
-
html = +%(<ul class="inline-flex -space-x-px text-sm">)
|
18
|
-
html << prev_html(pagy)
|
19
|
-
pagy.series(**vars).each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
|
20
|
-
html << case item
|
21
|
-
when Integer
|
22
|
-
%(<li class="page" >#{link.call(item)}</li>)
|
23
|
-
when String
|
24
|
-
%(<li class="page active">) +
|
25
|
-
%(<a role="link" aria-disabled="true" aria-current="page" class="#{default_link_classes} #{active_link_classes}">#{pagy.label_for(item)}</a></li>)
|
26
|
-
when :gap
|
27
|
-
%(<li class="page gap #{default_link_classes} border-y-0">#{pagy_t("pagy.gap")}</li>)
|
28
|
-
else
|
29
|
-
raise InternalError, "expected item types in series to be Integer, String or :gap; got #{item.inspect}"
|
30
|
-
end
|
31
|
-
end
|
32
|
-
html << %(#{next_html(pagy)}</ul></nav>)
|
33
|
-
end
|
34
|
-
|
35
|
-
def pagy_info(pagy, pagy_id: nil, item_name: nil, item_i18n_key: nil)
|
36
|
-
p_id = %( id="#{pagy_id}") if pagy_id
|
37
|
-
p_count = pagy.count
|
38
|
-
key = if p_count.zero? then "pagy.info.no_items"
|
39
|
-
elsif pagy.pages == 1 then "pagy.info.single_page"
|
40
|
-
else "pagy.info.multiple_pages" # rubocop:disable Lint/ElseLayout
|
41
|
-
end
|
42
|
-
|
43
|
-
%(<span#{p_id} class="text-sm text-gray-700 dark:text-gray-200 pagy-info">#{
|
44
|
-
pagy_t key, item_name: item_name || pagy_t(item_i18n_key || pagy.vars[:item_i18n_key], count: p_count),
|
45
|
-
count: p_count, from: pagy.from, to: pagy.to
|
46
|
-
}</span>)
|
47
|
-
end
|
48
|
-
|
49
|
-
private
|
50
|
-
|
51
|
-
def base_attributes
|
52
|
-
{
|
53
|
-
classname: "flex flex-col items-center space-y-2 p-6",
|
54
|
-
controller: "pagination"
|
55
|
-
}
|
56
|
-
end
|
57
|
-
|
58
|
-
def prev_html(pagy, text: pagy_t("pagy.prev"))
|
59
|
-
link = pagy_link_proc(pagy, link_extra: "class=\"#{default_link_classes} #{page_link_classes} rounded-s-lg\"")
|
60
|
-
|
61
|
-
if (p_prev = pagy.prev)
|
62
|
-
%(<li class="page prev">#{link.call(p_prev, text, prev_aria_label_attr)}</li>)
|
63
|
-
else
|
64
|
-
%(<li class="page prev disabled"><span role="link" aria-disabled="true" class="#{default_link_classes} #{active_link_classes} border-e-0 rounded-s-lg" #{
|
65
|
-
prev_aria_label_attr}>#{text}</span></li>)
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
def next_html(pagy, text: pagy_t("pagy.next"))
|
70
|
-
link = pagy_link_proc(pagy, link_extra: "class=\"#{default_link_classes} #{page_link_classes} rounded-e-lg\"")
|
71
|
-
|
72
|
-
if (p_next = pagy.next)
|
73
|
-
%(<li class="page next">#{link.call(p_next, text, next_aria_label_attr)}</li>)
|
74
|
-
else
|
75
|
-
%(<li class="page next disabled"><span role="link" aria-disabled="true" class="#{default_link_classes} #{active_link_classes} rounded-e-lg" #{
|
76
|
-
next_aria_label_attr}>#{text}</span></li>)
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
def default_link_classes
|
81
|
-
"flex items-center justify-center px-3 h-8 leading-tight text-gray-500 border border-gray-300 bg-white dark:bg-gray-800 dark:border-gray-700 dark:text-gray-200"
|
82
|
-
end
|
83
|
-
|
84
|
-
def page_link_classes
|
85
|
-
"hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-white"
|
86
|
-
end
|
87
|
-
|
88
|
-
def active_link_classes
|
89
|
-
"text-primary-600 hover:text-primary-600 dark:bg-gray-700 dark:text-white dark:hover:text-white cursor-default select-none"
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
Plutonium::ComponentRegistry.register :pagination, to: PlutoniumUi::PaginationComponent
|
@@ -1,17 +0,0 @@
|
|
1
|
-
<%= render_component :block, rounded: :all do %>
|
2
|
-
<div <%= attributes_html %>>
|
3
|
-
<div class="flex justify-between items-center mb-4">
|
4
|
-
<% if title.present? %>
|
5
|
-
<h5 class="text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
|
6
|
-
<%= title %>
|
7
|
-
</h5>
|
8
|
-
<% end %>
|
9
|
-
<div class="flex">
|
10
|
-
<% actions.each do |action| %>
|
11
|
-
<%= action %>
|
12
|
-
<% end %>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
<%= content %>
|
16
|
-
</div>
|
17
|
-
<% end %>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module PlutoniumUi
|
2
|
-
class PanelComponent < PlutoniumUi::Base
|
3
|
-
renders_many :actions
|
4
|
-
|
5
|
-
option :title, optional: true
|
6
|
-
|
7
|
-
private
|
8
|
-
|
9
|
-
def base_attributes
|
10
|
-
{
|
11
|
-
classname: "p-4"
|
12
|
-
}
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
Plutonium::ComponentRegistry.register :panel, to: PlutoniumUi::PanelComponent
|
@@ -1,83 +0,0 @@
|
|
1
|
-
<nav <%= attributes_html %>>
|
2
|
-
<div class="flex flex-wrap justify-between items-center">
|
3
|
-
<div class="flex justify-start items-center">
|
4
|
-
<% if sidebar_toggle %>
|
5
|
-
<button
|
6
|
-
data-drawer-target="<%= sidebar_toggle %>"
|
7
|
-
data-drawer-toggle="<%= sidebar_toggle %>"
|
8
|
-
aria-controls="<%= sidebar_toggle %>"
|
9
|
-
class="p-2 mr-2 text-gray-600 rounded-lg cursor-pointer lg:hidden hover:text-gray-900 hover:bg-gray-100 focus:bg-gray-100 dark:focus:bg-gray-700 focus:ring-2 focus:ring-gray-100 dark:focus:ring-gray-700 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-white">
|
10
|
-
<svg
|
11
|
-
aria-hidden="true"
|
12
|
-
class="w-6 h-6"
|
13
|
-
fill="currentColor"
|
14
|
-
viewBox="0 0 20 20"
|
15
|
-
xmlns="http://www.w3.org/2000/svg">
|
16
|
-
<path
|
17
|
-
fill-rule="evenodd"
|
18
|
-
d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h6a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
|
19
|
-
clip-rule="evenodd"
|
20
|
-
></path>
|
21
|
-
</svg>
|
22
|
-
<svg
|
23
|
-
aria-hidden="true"
|
24
|
-
class="hidden w-6 h-6"
|
25
|
-
fill="currentColor"
|
26
|
-
viewBox="0 0 20 20"
|
27
|
-
xmlns="http://www.w3.org/2000/svg">
|
28
|
-
<path
|
29
|
-
fill-rule="evenodd"
|
30
|
-
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
31
|
-
clip-rule="evenodd"></path>
|
32
|
-
</svg>
|
33
|
-
<span class="sr-only">Toggle sidebar</span>
|
34
|
-
</button>
|
35
|
-
<% end %>
|
36
|
-
<% if brand_name.present? || brand_logo.present? %>
|
37
|
-
<a href="<%= root_path %>" class="flex items-center justify-between md:min-w-60">
|
38
|
-
<%= brand_logo if brand_logo.present? %>
|
39
|
-
<% if brand_name.present? %>
|
40
|
-
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white hidden xs:block">
|
41
|
-
<%= brand_name %>
|
42
|
-
</span>
|
43
|
-
<% end %>
|
44
|
-
</a>
|
45
|
-
<% end %>
|
46
|
-
|
47
|
-
<%= content %>
|
48
|
-
<%#
|
49
|
-
<form action="#" method="GET" class="hidden md:block md:pl-2">
|
50
|
-
<label for="topbar-search" class="sr-only">Search</label>
|
51
|
-
<div class="relative md:w-64">
|
52
|
-
<div
|
53
|
-
class="flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none">
|
54
|
-
<svg
|
55
|
-
class="w-5 h-5 text-gray-500 dark:text-gray-200"
|
56
|
-
fill="currentColor"
|
57
|
-
viewBox="0 0 20 20"
|
58
|
-
xmlns="http://www.w3.org/2000/svg">
|
59
|
-
<path
|
60
|
-
fill-rule="evenodd"
|
61
|
-
clip-rule="evenodd"
|
62
|
-
d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"></path>
|
63
|
-
</svg>
|
64
|
-
</div>
|
65
|
-
<input
|
66
|
-
type="text"
|
67
|
-
name="email"
|
68
|
-
id="topbar-search"
|
69
|
-
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full pl-10 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"
|
70
|
-
placeholder="Search" />
|
71
|
-
</div>
|
72
|
-
</form>
|
73
|
-
%>
|
74
|
-
</div>
|
75
|
-
<% if actions.present? %>
|
76
|
-
<div class="flex items-center lg:order-2">
|
77
|
-
<% actions.each do |action| %>
|
78
|
-
<%= action %>
|
79
|
-
<% end %>
|
80
|
-
</div>
|
81
|
-
<% end %>
|
82
|
-
</div>
|
83
|
-
</nav>
|
@@ -1,30 +0,0 @@
|
|
1
|
-
module PlutoniumUi
|
2
|
-
class ResourceHeaderComponent < PlutoniumUi::Base
|
3
|
-
renders_one :brand_logo
|
4
|
-
renders_many :actions
|
5
|
-
|
6
|
-
option :brand_name, optional: true
|
7
|
-
option :default_brand_logo, default: -> { true }
|
8
|
-
option :sidebar_toggle, default: -> {}
|
9
|
-
|
10
|
-
private
|
11
|
-
|
12
|
-
def base_attributes
|
13
|
-
# base attributes go here
|
14
|
-
{
|
15
|
-
classname: "resource-header bg-white border-b border-gray-200 px-4 py-2.5 dark:bg-gray-800 dark:border-gray-700 fixed left-0 right-0 top-0 z-50",
|
16
|
-
controller: "header"
|
17
|
-
}
|
18
|
-
end
|
19
|
-
|
20
|
-
def before_render
|
21
|
-
return if brand_logo.present? || !default_brand_logo
|
22
|
-
|
23
|
-
with_brand_logo do
|
24
|
-
resource_logo_tag classname: "mr-3 h-10"
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
Plutonium::ComponentRegistry.register :resource_header, to: PlutoniumUi::ResourceHeaderComponent
|
@@ -1,53 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html <%= attributes_html %>>
|
3
|
-
<head>
|
4
|
-
<title><%= page_title %></title>
|
5
|
-
<meta charset="utf-8">
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
<%= csp_meta_tag %>
|
9
|
-
|
10
|
-
<% if default_turbo_tag %>
|
11
|
-
<meta name="turbo-cache-control" content="no-cache">
|
12
|
-
<meta name="turbo-refresh-method" content="morph">
|
13
|
-
<meta name="turbo-refresh-scroll" content="preserve">
|
14
|
-
<% end %>
|
15
|
-
|
16
|
-
<%= meta %>
|
17
|
-
<%= favicon %>
|
18
|
-
|
19
|
-
<% if default_fonts_tag %>
|
20
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
21
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
22
|
-
<link href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap" rel="stylesheet">
|
23
|
-
<% end %>
|
24
|
-
|
25
|
-
<% if default_assets_tag %>
|
26
|
-
<%= resource_stylesheet_tag %>
|
27
|
-
<%= resource_script_tag %>
|
28
|
-
<% end %>
|
29
|
-
|
30
|
-
<%= assets %>
|
31
|
-
<%= head %>
|
32
|
-
<%#
|
33
|
-
|
34
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/quill/1.3.7/quill.snow.min.css" integrity="sha512-/FHUK/LsH78K9XTqsR9hbzr21J8B8RwHR/r8Jv9fzry6NVAOVIGFKQCNINsbhK7a1xubVu2r5QZcz2T9cKpubw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
35
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/quill/1.3.7/quill.min.js" integrity="sha512-P2W2rr8ikUPfa31PLBo5bcBQrsa+TNj8jiKadtaIrHQGMo6hQM6RdPjQYxlNguwHz8AwSQ28VkBK6kHBLgd/8g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
36
|
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slim-select/2.6.0/slimselect.min.css" integrity="sha512-GvqWM4KWH8mbgWIyvwdH8HgjUbyZTXrCq0sjGij9fDNiXz3vJoy3jCcAaWNekH2rJe4hXVWCJKN+bEW8V7AAEQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
37
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/slim-select/2.6.0/slimselect.min.js" integrity="sha512-0E8oaoA2v32h26IycsmRDShtQ8kMgD91zWVBxdIvUCjU3xBw81PV61QBsBqNQpWkp/zYJZip8Ag3ifmzz1wCKQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
38
|
-
|
39
|
-
%>
|
40
|
-
</head>
|
41
|
-
<body class="<%= body_classname %>">
|
42
|
-
<%= header %>
|
43
|
-
<%= sidebar %>
|
44
|
-
<main class="<%= build_main_classname %>">
|
45
|
-
<%= render "flash" %>
|
46
|
-
<%= content %>
|
47
|
-
</main>
|
48
|
-
</body>
|
49
|
-
</html>
|
50
|
-
|
51
|
-
<%#= modal_frame_tag do %>
|
52
|
-
<%#= yield(:modal) %>
|
53
|
-
<%# end %>
|
@@ -1,41 +0,0 @@
|
|
1
|
-
module PlutoniumUi
|
2
|
-
class ResourceLayoutComponent < PlutoniumUi::Base
|
3
|
-
renders_one :meta
|
4
|
-
renders_one :favicon
|
5
|
-
renders_one :assets
|
6
|
-
renders_one :head
|
7
|
-
renders_one :header
|
8
|
-
renders_one :sidebar
|
9
|
-
|
10
|
-
option :page_title
|
11
|
-
option :lang
|
12
|
-
option :body_classname, default: -> { "antialiased min-h-screen bg-gray-50 dark:bg-gray-900" }
|
13
|
-
option :main_classname, default: -> { "p-4 min-h-screen" }
|
14
|
-
option :header_adjustment, default: -> { "pt-20" }
|
15
|
-
option :sidebar_adjustment, default: -> { "lg:ml-64" }
|
16
|
-
option :default_turbo_tag, default: -> { true }
|
17
|
-
option :default_fonts_tag, default: -> { true }
|
18
|
-
option :default_assets_tag, default: -> { true }
|
19
|
-
|
20
|
-
private
|
21
|
-
|
22
|
-
def base_attributes
|
23
|
-
# base attributes go here
|
24
|
-
{
|
25
|
-
classname: "resource-layout",
|
26
|
-
controller: "resource-layout color-mode",
|
27
|
-
lang:
|
28
|
-
}
|
29
|
-
end
|
30
|
-
|
31
|
-
def build_main_classname
|
32
|
-
classname = Array(main_classname)
|
33
|
-
classname += Array(header_adjustment) if header.present?
|
34
|
-
classname += Array(sidebar_adjustment) if sidebar.present?
|
35
|
-
|
36
|
-
classname.join " "
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
Plutonium::ComponentRegistry.register :resource_layout, to: PlutoniumUi::ResourceLayoutComponent
|
@@ -1,69 +0,0 @@
|
|
1
|
-
<aside <%= attributes_html %>>
|
2
|
-
<div class="<%= sidebar_container_class %>">
|
3
|
-
<%= content %>
|
4
|
-
</div>
|
5
|
-
|
6
|
-
<div class="hidden absolute bottom-0 left-0 justify-center p-4 space-x-4 w-full lg:flex bg-white dark:bg-gray-800 z-20 border-r border-gray-200 dark:border-gray-700">
|
7
|
-
<div data-controller="resource-drop-down">
|
8
|
-
<button
|
9
|
-
type="button"
|
10
|
-
data-resource-drop-down-target="trigger"
|
11
|
-
class="inline-flex justify-center p-2 text-gray-500 rounded cursor-pointer dark:hover:text-white dark:text-gray-200 hover:text-gray-900 hover:bg-gray-100 dark:hover:bg-gray-600">
|
12
|
-
<svg class="w-6 h-6 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
|
13
|
-
<path d="M5 13.17a3.001 3.001 0 0 0 0 5.66V20a1 1 0 1 0 2 0v-1.17a3.001 3.001 0 0 0 0-5.66V4a1 1 0 0 0-2 0v9.17ZM11 20v-9.17a3.001 3.001 0 0 1 0-5.66V4a1 1 0 1 1 2 0v1.17a3.001 3.001 0 0 1 0 5.66V20a1 1 0 1 1-2 0Zm6-1.17V20a1 1 0 1 0 2 0v-1.17a3.001 3.001 0 0 0 0-5.66V4a1 1 0 1 0-2 0v9.17a3.001 3.001 0 0 0 0 5.66Z"/>
|
14
|
-
</svg>
|
15
|
-
</button>
|
16
|
-
<div
|
17
|
-
class="hidden z-50 my-4 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700"
|
18
|
-
data-resource-drop-down-target="menu">
|
19
|
-
<ul class="py-1" role="none">
|
20
|
-
<li>
|
21
|
-
<button
|
22
|
-
type="button"
|
23
|
-
class="w-full block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:text-white dark:text-gray-300 dark:hover:bg-gray-600"
|
24
|
-
role="menuitem"
|
25
|
-
data-action="click->color-mode#setLightColorMode"
|
26
|
-
>
|
27
|
-
<div class="flex justify-start">
|
28
|
-
<svg class="w-6 h-6 me-2 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
29
|
-
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 5V3m0 18v-2M7.05 7.05 5.636 5.636m12.728 12.728L16.95 16.95M5 12H3m18 0h-2M7.05 16.95l-1.414 1.414M18.364 5.636 16.95 7.05M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/>
|
30
|
-
</svg>
|
31
|
-
Light
|
32
|
-
</div>
|
33
|
-
</a>
|
34
|
-
</li>
|
35
|
-
<li>
|
36
|
-
<button
|
37
|
-
type="button"
|
38
|
-
class="w-full block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:text-white dark:text-gray-300 dark:hover:bg-gray-600"
|
39
|
-
role="menuitem"
|
40
|
-
data-action="click->color-mode#setDarkColorMode"
|
41
|
-
>
|
42
|
-
<div class="flex justify-start">
|
43
|
-
<svg class="w-6 h-6 me-2 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
44
|
-
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 1-.5-17.986V3c-.354.966-.5 1.911-.5 3a9 9 0 0 0 9 9c.239 0 .254.018.488 0A9.004 9.004 0 0 1 12 21Z"/>
|
45
|
-
</svg>
|
46
|
-
Dark
|
47
|
-
</div>
|
48
|
-
</a>
|
49
|
-
</li>
|
50
|
-
<li>
|
51
|
-
<button
|
52
|
-
type="button"
|
53
|
-
class="w-full block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:text-white dark:text-gray-300 dark:hover:bg-gray-600"
|
54
|
-
role="menuitem"
|
55
|
-
data-action="click->color-mode#setSystemColorMode"
|
56
|
-
>
|
57
|
-
<div class="flex justify-start">
|
58
|
-
<svg class="w-6 h-6 me-2 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
59
|
-
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 16H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v1M9 12H4m8 8V9h8v11h-8Zm0 0H9m8-4a1 1 0 1 0-2 0 1 1 0 0 0 2 0Z"/>
|
60
|
-
</svg>
|
61
|
-
System
|
62
|
-
</div>
|
63
|
-
</a>
|
64
|
-
</li>
|
65
|
-
</ul>
|
66
|
-
</div>
|
67
|
-
</div>
|
68
|
-
</div>
|
69
|
-
</aside>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module PlutoniumUi
|
2
|
-
class SidebarComponent < PlutoniumUi::Base
|
3
|
-
private
|
4
|
-
|
5
|
-
def base_attributes
|
6
|
-
# base attributes go here
|
7
|
-
{
|
8
|
-
id: "sidebar-navigation",
|
9
|
-
controller: "",
|
10
|
-
aria: {label: "Sidebar Navigation"},
|
11
|
-
data: {turbo_permanent: true},
|
12
|
-
class: "fixed top-0 left-0 z-40 w-64 h-screen pt-14 transition-transform -translate-x-full lg:translate-x-0",
|
13
|
-
sidebar_container_class: "overflow-y-auto py-5 px-3 h-full bg-white border-r border-gray-200 dark:bg-gray-800 dark:border-gray-700"
|
14
|
-
}
|
15
|
-
end
|
16
|
-
|
17
|
-
def sidebar_container_class
|
18
|
-
raw_attributes_hash[:sidebar_container_class]
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
Plutonium::ComponentRegistry.register :sidebar, to: PlutoniumUi::SidebarComponent
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module PlutoniumUi
|
2
|
-
class SidebarMenuComponent < PlutoniumUi::Base
|
3
|
-
renders_many :items, "::PlutoniumUi::SidebarMenuItemComponent"
|
4
|
-
|
5
|
-
private
|
6
|
-
|
7
|
-
def base_attributes
|
8
|
-
# base attributes go here
|
9
|
-
{
|
10
|
-
classname: "sidebar-menu space-y-2 pb-6 mb-6",
|
11
|
-
controller: "sidebar-menu"
|
12
|
-
}
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
Plutonium::ComponentRegistry.register :sidebar_menu, to: PlutoniumUi::SidebarMenuComponent
|
@@ -1,64 +0,0 @@
|
|
1
|
-
<li <%= attributes_html %>>
|
2
|
-
<% if sub_items.any? %>
|
3
|
-
<button
|
4
|
-
type="button"
|
5
|
-
class="<%= link_button_class %> w-full transition duration-75"
|
6
|
-
data-resource-collapse-target="trigger"
|
7
|
-
aria-controls="side-menu-item-<%= name.parameterize %>">
|
8
|
-
<% if icon.present? %>
|
9
|
-
<%= render_icon icon, size: :lg, classname: icon_class %>
|
10
|
-
<% else %>
|
11
|
-
<div class="shrink-0 w-6 h-6">
|
12
|
-
|
13
|
-
</div>
|
14
|
-
<% end %>
|
15
|
-
<span class="<%= link_label_class %>"><%= name %></span>
|
16
|
-
<svg
|
17
|
-
aria-hidden="true"
|
18
|
-
class="w-6 h-6"
|
19
|
-
fill="currentColor"
|
20
|
-
viewBox="0 0 20 20"
|
21
|
-
xmlns="http://www.w3.org/2000/svg"
|
22
|
-
>
|
23
|
-
<path
|
24
|
-
fill-rule="evenodd"
|
25
|
-
d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
|
26
|
-
clip-rule="evenodd"
|
27
|
-
></path>
|
28
|
-
</svg>
|
29
|
-
</button>
|
30
|
-
|
31
|
-
<ul id="side-menu-item-<%= name.parameterize %>" data-resource-collapse-target="menu" class="hidden py-2 space-y-2">
|
32
|
-
<% sub_items.each do |sub_item| %>
|
33
|
-
<%#= sub_item %>
|
34
|
-
<li>
|
35
|
-
<a
|
36
|
-
href="<%= sub_item.url %>"
|
37
|
-
class="<%= sub_link_button_class %>">
|
38
|
-
<%= sub_item.name %>
|
39
|
-
</a>
|
40
|
-
</li>
|
41
|
-
<% end %>
|
42
|
-
</ul>
|
43
|
-
<% else %>
|
44
|
-
<a
|
45
|
-
href="<%= url %>"
|
46
|
-
class="<%= link_link_class %>">
|
47
|
-
<% if icon.present? %>
|
48
|
-
<%= render_icon icon, size: :lg, classname: icon_class %>
|
49
|
-
<% else %>
|
50
|
-
<div class="shrink-0 w-6 h-6">
|
51
|
-
|
52
|
-
</div>
|
53
|
-
<% end %>
|
54
|
-
<span class="<%= link_label_class %>"><%= name %></span>
|
55
|
-
<%#
|
56
|
-
<% if indicator.present? % >
|
57
|
-
<span class="inline-flex justify-center items-center w-5 h-5 text-xs font-semibold rounded-full text-primary-800 bg-primary-100 dark:bg-primary-200 dark:text-primary-800">
|
58
|
-
<%= indicator % >
|
59
|
-
</span>
|
60
|
-
<% end % >
|
61
|
-
%>
|
62
|
-
</a>
|
63
|
-
<% end %>
|
64
|
-
</li>
|