lookbook 2.3.4 → 2.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/components/lookbook/base_component.rb +1 -0
- data/app/components/lookbook/button/component.html.erb +11 -12
- data/app/components/lookbook/button/component.js +19 -24
- data/app/components/lookbook/button/component.rb +4 -0
- data/app/components/lookbook/button_group/component.html.erb +1 -1
- data/app/components/lookbook/code/component.html.erb +1 -1
- data/app/components/lookbook/copy_button/component.html.erb +1 -1
- data/app/components/lookbook/debug_menu/component.html.erb +1 -1
- data/app/components/lookbook/dimensions_display/component.html.erb +2 -2
- data/app/components/lookbook/display_options/editor/component.html.erb +1 -1
- data/app/components/lookbook/display_options/field/component.html.erb +1 -1
- data/app/components/lookbook/embed/component.html.erb +1 -1
- data/app/components/lookbook/file_source/component.html.erb +1 -1
- data/app/components/lookbook/filter/component.html.erb +2 -2
- data/app/components/lookbook/icon_button/component.html.erb +2 -2
- data/app/components/lookbook/inspector_panel/component.html.erb +1 -1
- data/app/components/lookbook/logo/component.html.erb +1 -1
- data/app/components/lookbook/message/component.html.erb +1 -1
- data/app/components/lookbook/nav/component.html.erb +1 -1
- data/app/components/lookbook/nav/directory/component.html.erb +1 -1
- data/app/components/lookbook/nav/entity/component.html.erb +1 -1
- data/app/components/lookbook/page_tabs/component.html.erb +1 -1
- data/app/components/lookbook/params/editor/component.html.erb +1 -1
- data/app/components/lookbook/params/editor/component.rb +1 -1
- data/app/components/lookbook/params/field/component.rb +1 -1
- data/app/components/lookbook/prose/component.html.erb +1 -1
- data/app/components/lookbook/split_layout/component.html.erb +1 -1
- data/app/components/lookbook/tab_panels/component.html.erb +1 -1
- data/app/components/lookbook/tab_panels/component.rb +1 -1
- data/app/components/lookbook/tab_panels/panel/component.html.erb +1 -1
- data/app/components/lookbook/tabs/component.html.erb +1 -1
- data/app/components/lookbook/tabs/dropdown_tab/component.html.erb +1 -1
- data/app/components/lookbook/tabs/tab/component.html.erb +1 -1
- data/app/components/lookbook/text_button/component.html.erb +2 -2
- data/app/components/lookbook/toolbar/component.html.erb +1 -1
- data/app/controllers/lookbook/application_controller.rb +17 -0
- data/app/controllers/lookbook/previews_controller.rb +11 -7
- data/app/views/layouts/lookbook/application.html.erb +3 -3
- data/app/views/layouts/lookbook/embed.html.erb +1 -1
- data/app/views/layouts/lookbook/skeleton.html.erb +2 -0
- data/app/views/lookbook/embeds/show.html.erb +1 -1
- data/app/views/lookbook/errors/default.html.erb +1 -1
- data/app/views/lookbook/errors/not_found.html.erb +1 -1
- data/app/views/lookbook/index.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_color.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_range.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_select.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_text.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_text_two_step.html.erb +1 -1
- data/app/views/lookbook/inspector/inputs/_textarea.html.erb +1 -1
- data/app/views/lookbook/inspector/panels/_notes.html.erb +2 -2
- data/app/views/lookbook/inspector/panels/_output.html.erb +1 -1
- data/app/views/lookbook/inspector/panels/_preview.html.erb +1 -1
- data/app/views/lookbook/inspector/panels/_source.html.erb +1 -1
- data/app/views/lookbook/inspector/show.html.erb +4 -4
- data/app/views/lookbook/pages/show.html.erb +1 -1
- data/app/views/lookbook/partials/_iframe_content_scripts.html.erb +1 -1
- data/app/views/lookbook/partials/_user_styles.html.erb +1 -1
- data/app/views/lookbook/previews/group.html.erb +1 -1
- data/app/views/lookbook/previews/preview.html.erb +5 -1
- data/app/views/lookbook/previews/show.html.erb +1 -1
- data/config/app.yml +1 -1
- data/lib/lookbook/engine.rb +42 -18
- data/lib/lookbook/preview_controller_actions.rb +7 -2
- data/lib/lookbook/preview_parser.rb +2 -4
- data/lib/lookbook/services/markdown_renderer.rb +12 -4
- data/lib/lookbook/stores/config_store.rb +4 -0
- data/lib/lookbook/support/errors/config_error.rb +1 -1
- data/lib/lookbook/support/errors/parser_error.rb +1 -1
- data/lib/lookbook/support/errors/preview_template_error.rb +1 -1
- data/lib/lookbook/support/errors/template_error.rb +1 -1
- data/lib/lookbook/support/store.rb +1 -1
- data/lib/lookbook/support/utils/utils.rb +1 -1
- data/lib/lookbook/tags/param_tag.rb +4 -1
- data/lib/lookbook/tags/yard_tag.rb +1 -1
- data/lib/lookbook/version.rb +1 -1
- data/public/lookbook-assets/css/lookbook.css +131 -136
- data/public/lookbook-assets/css/lookbook.css.map +1 -1
- data/public/lookbook-assets/css/themes/blue.css +0 -1
- data/public/lookbook-assets/css/themes/green.css +0 -1
- data/public/lookbook-assets/css/themes/indigo.css +0 -1
- data/public/lookbook-assets/css/themes/rose.css +0 -1
- data/public/lookbook-assets/css/themes/zinc.css +0 -1
- data/public/lookbook-assets/js/iframe.js +205 -196
- data/public/lookbook-assets/js/iframe.js.map +1 -1
- data/public/lookbook-assets/js/index.js +1171 -1025
- data/public/lookbook-assets/js/index.js.map +1 -1
- data/public/lookbook-assets/js/lookbook-core.js +0 -37
- data/public/lookbook-assets/js/lookbook.js +277 -296
- metadata +4 -385
- data/assets/icons/activity-square.svg +0 -1
- data/assets/icons/ampersand.svg +0 -1
- data/assets/icons/ampersands.svg +0 -1
- data/assets/icons/antenna.svg +0 -1
- data/assets/icons/app-window.svg +0 -1
- data/assets/icons/archive-x.svg +0 -1
- data/assets/icons/area-chart.svg +0 -1
- data/assets/icons/arrow-big-down-dash.svg +0 -1
- data/assets/icons/arrow-big-left-dash.svg +0 -1
- data/assets/icons/arrow-big-right-dash.svg +0 -1
- data/assets/icons/arrow-big-up-dash.svg +0 -1
- data/assets/icons/arrow-down-0-1.svg +0 -1
- data/assets/icons/arrow-down-1-0.svg +0 -1
- data/assets/icons/arrow-down-a-z.svg +0 -1
- data/assets/icons/arrow-down-from-line.svg +0 -1
- data/assets/icons/arrow-down-left-from-circle.svg +0 -1
- data/assets/icons/arrow-down-left-square.svg +0 -1
- data/assets/icons/arrow-down-narrow-wide.svg +0 -1
- data/assets/icons/arrow-down-right-from-circle.svg +0 -1
- data/assets/icons/arrow-down-right-square.svg +0 -1
- data/assets/icons/arrow-down-square.svg +0 -1
- data/assets/icons/arrow-down-to-dot.svg +0 -1
- data/assets/icons/arrow-down-to-line.svg +0 -1
- data/assets/icons/arrow-down-up.svg +0 -1
- data/assets/icons/arrow-down-wide-narrow.svg +0 -1
- data/assets/icons/arrow-down-z-a.svg +0 -1
- data/assets/icons/arrow-left-from-line.svg +0 -1
- data/assets/icons/arrow-left-square.svg +0 -1
- data/assets/icons/arrow-left-to-line.svg +0 -1
- data/assets/icons/arrow-right-from-line.svg +0 -1
- data/assets/icons/arrow-right-left.svg +0 -1
- data/assets/icons/arrow-right-square.svg +0 -1
- data/assets/icons/arrow-right-to-line.svg +0 -1
- data/assets/icons/arrow-up-0-1.svg +0 -1
- data/assets/icons/arrow-up-1-0.svg +0 -1
- data/assets/icons/arrow-up-a-z.svg +0 -1
- data/assets/icons/arrow-up-from-dot.svg +0 -1
- data/assets/icons/arrow-up-from-line.svg +0 -1
- data/assets/icons/arrow-up-left-from-circle.svg +0 -1
- data/assets/icons/arrow-up-left-square.svg +0 -1
- data/assets/icons/arrow-up-narrow-wide.svg +0 -1
- data/assets/icons/arrow-up-right-from-circle.svg +0 -1
- data/assets/icons/arrow-up-right-square.svg +0 -1
- data/assets/icons/arrow-up-square.svg +0 -1
- data/assets/icons/arrow-up-to-line.svg +0 -1
- data/assets/icons/arrow-up-wide-narrow.svg +0 -1
- data/assets/icons/arrow-up-z-a.svg +0 -1
- data/assets/icons/arrows-up-from-line.svg +0 -1
- data/assets/icons/atom.svg +0 -1
- data/assets/icons/badge-alert.svg +0 -1
- data/assets/icons/badge-cent.svg +0 -1
- data/assets/icons/badge-check.svg +0 -1
- data/assets/icons/badge-dollar-sign.svg +0 -1
- data/assets/icons/badge-euro.svg +0 -1
- data/assets/icons/badge-help.svg +0 -1
- data/assets/icons/badge-indian-rupee.svg +0 -1
- data/assets/icons/badge-info.svg +0 -1
- data/assets/icons/badge-japanese-yen.svg +0 -1
- data/assets/icons/badge-minus.svg +0 -1
- data/assets/icons/badge-percent.svg +0 -1
- data/assets/icons/badge-plus.svg +0 -1
- data/assets/icons/badge-pound-sterling.svg +0 -1
- data/assets/icons/badge-russian-ruble.svg +0 -1
- data/assets/icons/badge-swiss-franc.svg +0 -1
- data/assets/icons/badge-x.svg +0 -1
- data/assets/icons/badge.svg +0 -1
- data/assets/icons/ban.svg +0 -1
- data/assets/icons/bar-chart-big.svg +0 -1
- data/assets/icons/bar-chart-horizontal-big.svg +0 -1
- data/assets/icons/bell-dot.svg +0 -1
- data/assets/icons/biohazard.svg +0 -1
- data/assets/icons/blocks.svg +0 -1
- data/assets/icons/book-copy.svg +0 -1
- data/assets/icons/book-down.svg +0 -1
- data/assets/icons/book-key.svg +0 -1
- data/assets/icons/book-lock.svg +0 -1
- data/assets/icons/book-marked.svg +0 -1
- data/assets/icons/book-minus.svg +0 -1
- data/assets/icons/book-plus.svg +0 -1
- data/assets/icons/book-template.svg +0 -1
- data/assets/icons/book-up-2.svg +0 -1
- data/assets/icons/book-up.svg +0 -1
- data/assets/icons/book-x.svg +0 -1
- data/assets/icons/bookmark-check.svg +0 -1
- data/assets/icons/bookmark-x.svg +0 -1
- data/assets/icons/boom-box.svg +0 -1
- data/assets/icons/braces.svg +0 -1
- data/assets/icons/brackets.svg +0 -1
- data/assets/icons/brain-circuit.svg +0 -1
- data/assets/icons/brain-cog.svg +0 -1
- data/assets/icons/brain.svg +0 -1
- data/assets/icons/bring-to-front.svg +0 -1
- data/assets/icons/bug-off.svg +0 -1
- data/assets/icons/bug-play.svg +0 -1
- data/assets/icons/bus-front.svg +0 -1
- data/assets/icons/cable-car.svg +0 -1
- data/assets/icons/cable.svg +0 -1
- data/assets/icons/cake-slice.svg +0 -1
- data/assets/icons/candlestick-chart.svg +0 -1
- data/assets/icons/candy-cane.svg +0 -1
- data/assets/icons/car-front.svg +0 -1
- data/assets/icons/car-taxi-front.svg +0 -1
- data/assets/icons/case-lower.svg +0 -1
- data/assets/icons/case-sensitive.svg +0 -1
- data/assets/icons/case-upper.svg +0 -1
- data/assets/icons/cassette-tape.svg +0 -1
- data/assets/icons/castle.svg +0 -1
- data/assets/icons/chevron-down-circle.svg +0 -1
- data/assets/icons/chevron-down-square.svg +0 -1
- data/assets/icons/chevron-left-circle.svg +0 -1
- data/assets/icons/chevron-left-square.svg +0 -1
- data/assets/icons/chevron-right-circle.svg +0 -1
- data/assets/icons/chevron-right-square.svg +0 -1
- data/assets/icons/chevron-up-circle.svg +0 -1
- data/assets/icons/chevron-up-square.svg +0 -1
- data/assets/icons/church.svg +0 -1
- data/assets/icons/circle-dashed.svg +0 -1
- data/assets/icons/circle-dollar-sign.svg +0 -1
- data/assets/icons/circle-dot-dashed.svg +0 -1
- data/assets/icons/circle-equal.svg +0 -1
- data/assets/icons/circle-off.svg +0 -1
- data/assets/icons/circle-slash-2.svg +0 -1
- data/assets/icons/circle-slash.svg +0 -1
- data/assets/icons/circuit-board.svg +0 -1
- data/assets/icons/clipboard-paste.svg +0 -1
- data/assets/icons/club.svg +0 -1
- data/assets/icons/combine.svg +0 -1
- data/assets/icons/computer.svg +0 -1
- data/assets/icons/contact-2.svg +0 -1
- data/assets/icons/container.svg +0 -1
- data/assets/icons/copy-check.svg +0 -1
- data/assets/icons/copy-minus.svg +0 -1
- data/assets/icons/copy-plus.svg +0 -1
- data/assets/icons/copy-slash.svg +0 -1
- data/assets/icons/copy-x.svg +0 -1
- data/assets/icons/database-zap.svg +0 -1
- data/assets/icons/dessert.svg +0 -1
- data/assets/icons/disc-2.svg +0 -1
- data/assets/icons/disc-3.svg +0 -1
- data/assets/icons/donut.svg +0 -1
- data/assets/icons/door-closed.svg +0 -1
- data/assets/icons/door-open.svg +0 -1
- data/assets/icons/dot.svg +0 -1
- data/assets/icons/drama.svg +0 -1
- data/assets/icons/ferris-wheel.svg +0 -1
- data/assets/icons/file-code-2.svg +0 -1
- data/assets/icons/file-stack.svg +0 -1
- data/assets/icons/fish-symbol.svg +0 -1
- data/assets/icons/fold-horizontal.svg +0 -1
- data/assets/icons/fold-vertical.svg +0 -1
- data/assets/icons/folder-dot.svg +0 -1
- data/assets/icons/folder-git-2.svg +0 -1
- data/assets/icons/folder-git.svg +0 -1
- data/assets/icons/folder-kanban.svg +0 -1
- data/assets/icons/folder-open-dot.svg +0 -1
- data/assets/icons/folder-root.svg +0 -1
- data/assets/icons/folder-sync.svg +0 -1
- data/assets/icons/gallery-horizontal-end.svg +0 -1
- data/assets/icons/gallery-horizontal.svg +0 -1
- data/assets/icons/gallery-thumbnails.svg +0 -1
- data/assets/icons/gallery-vertical-end.svg +0 -1
- data/assets/icons/gallery-vertical.svg +0 -1
- data/assets/icons/gantt-chart-square.svg +0 -1
- data/assets/icons/gantt-chart.svg +0 -1
- data/assets/icons/gauge-circle.svg +0 -1
- data/assets/icons/goal.svg +0 -1
- data/assets/icons/grid-2x2.svg +0 -1
- data/assets/icons/grid-3x3.svg +0 -1
- data/assets/icons/group.svg +0 -1
- data/assets/icons/hard-drive-download.svg +0 -1
- data/assets/icons/hard-drive-upload.svg +0 -1
- data/assets/icons/hdmi-port.svg +0 -1
- data/assets/icons/hotel.svg +0 -1
- data/assets/icons/iteration-ccw.svg +0 -1
- data/assets/icons/iteration-cw.svg +0 -1
- data/assets/icons/kanban-square-dashed.svg +0 -1
- data/assets/icons/kanban-square.svg +0 -1
- data/assets/icons/kanban.svg +0 -1
- data/assets/icons/key-round.svg +0 -1
- data/assets/icons/key-square.svg +0 -1
- data/assets/icons/layout-panel-left.svg +0 -1
- data/assets/icons/layout-panel-top.svg +0 -1
- data/assets/icons/leafy-green.svg +0 -1
- data/assets/icons/ligature.svg +0 -1
- data/assets/icons/list-filter.svg +0 -1
- data/assets/icons/list-restart.svg +0 -1
- data/assets/icons/list-todo.svg +0 -1
- data/assets/icons/list-tree.svg +0 -1
- data/assets/icons/lollipop.svg +0 -1
- data/assets/icons/m-square.svg +0 -1
- data/assets/icons/mailbox.svg +0 -1
- data/assets/icons/memory-stick.svg +0 -1
- data/assets/icons/menu-square.svg +0 -1
- data/assets/icons/merge.svg +0 -1
- data/assets/icons/message-square-dashed.svg +0 -1
- data/assets/icons/message-square-plus.svg +0 -1
- data/assets/icons/messages-square.svg +0 -1
- data/assets/icons/monitor-check.svg +0 -1
- data/assets/icons/monitor-dot.svg +0 -1
- data/assets/icons/monitor-down.svg +0 -1
- data/assets/icons/monitor-pause.svg +0 -1
- data/assets/icons/monitor-play.svg +0 -1
- data/assets/icons/monitor-stop.svg +0 -1
- data/assets/icons/monitor-up.svg +0 -1
- data/assets/icons/monitor-x.svg +0 -1
- data/assets/icons/moon-star.svg +0 -1
- data/assets/icons/mouse-pointer-square-dashed.svg +0 -1
- data/assets/icons/mouse-pointer-square.svg +0 -1
- data/assets/icons/move-down-left.svg +0 -1
- data/assets/icons/move-down-right.svg +0 -1
- data/assets/icons/move-down.svg +0 -1
- data/assets/icons/move-left.svg +0 -1
- data/assets/icons/move-right.svg +0 -1
- data/assets/icons/move-up-left.svg +0 -1
- data/assets/icons/move-up-right.svg +0 -1
- data/assets/icons/move-up.svg +0 -1
- data/assets/icons/orbit.svg +0 -1
- data/assets/icons/panel-bottom-close.svg +0 -1
- data/assets/icons/panel-bottom-inactive.svg +0 -1
- data/assets/icons/panel-bottom-open.svg +0 -1
- data/assets/icons/panel-bottom.svg +0 -1
- data/assets/icons/panel-left-close.svg +0 -1
- data/assets/icons/panel-left-inactive.svg +0 -1
- data/assets/icons/panel-left-open.svg +0 -1
- data/assets/icons/panel-left.svg +0 -1
- data/assets/icons/panel-right-close.svg +0 -1
- data/assets/icons/panel-right-inactive.svg +0 -1
- data/assets/icons/panel-right-open.svg +0 -1
- data/assets/icons/panel-right.svg +0 -1
- data/assets/icons/panel-top-close.svg +0 -1
- data/assets/icons/panel-top-inactive.svg +0 -1
- data/assets/icons/panel-top-open.svg +0 -1
- data/assets/icons/panel-top.svg +0 -1
- data/assets/icons/parentheses.svg +0 -1
- data/assets/icons/parking-circle-off.svg +0 -1
- data/assets/icons/parking-circle.svg +0 -1
- data/assets/icons/parking-meter.svg +0 -1
- data/assets/icons/parking-square-off.svg +0 -1
- data/assets/icons/parking-square.svg +0 -1
- data/assets/icons/paw-print.svg +0 -1
- data/assets/icons/pc-case.svg +0 -1
- data/assets/icons/pen-line.svg +0 -1
- data/assets/icons/pen-square.svg +0 -1
- data/assets/icons/pen.svg +0 -1
- data/assets/icons/pencil-line.svg +0 -1
- data/assets/icons/pencil-ruler.svg +0 -1
- data/assets/icons/percent-circle.svg +0 -1
- data/assets/icons/percent-diamond.svg +0 -1
- data/assets/icons/percent-square.svg +0 -1
- data/assets/icons/pi-square.svg +0 -1
- data/assets/icons/pi.svg +0 -1
- data/assets/icons/pilcrow-square.svg +0 -1
- data/assets/icons/plane-landing.svg +0 -1
- data/assets/icons/plane-takeoff.svg +0 -1
- data/assets/icons/play-square.svg +0 -1
- data/assets/icons/plug-zap-2.svg +0 -1
- data/assets/icons/pocket-knife.svg +0 -1
- data/assets/icons/popcorn.svg +0 -1
- data/assets/icons/popsicle.svg +0 -1
- data/assets/icons/presentation.svg +0 -1
- data/assets/icons/projector.svg +0 -1
- data/assets/icons/rabbit.svg +0 -1
- data/assets/icons/radar.svg +0 -1
- data/assets/icons/radiation.svg +0 -1
- data/assets/icons/radio-tower.svg +0 -1
- data/assets/icons/rail-symbol.svg +0 -1
- data/assets/icons/rainbow.svg +0 -1
- data/assets/icons/rat.svg +0 -1
- data/assets/icons/ratio.svg +0 -1
- data/assets/icons/receipt.svg +0 -1
- data/assets/icons/redo-dot.svg +0 -1
- data/assets/icons/refresh-ccw-dot.svg +0 -1
- data/assets/icons/refresh-cw-off.svg +0 -1
- data/assets/icons/repeat-2.svg +0 -1
- data/assets/icons/replace-all.svg +0 -1
- data/assets/icons/replace.svg +0 -1
- data/assets/icons/roller-coaster.svg +0 -1
- data/assets/icons/rows.svg +0 -1
- data/assets/icons/satellite-dish.svg +0 -1
- data/assets/icons/satellite.svg +0 -1
- data/assets/icons/save-all.svg +0 -1
- data/assets/icons/scatter-chart.svg +0 -1
- data/assets/icons/school-2.svg +0 -1
- data/assets/icons/school.svg +0 -1
- data/assets/icons/scissors-line-dashed.svg +0 -1
- data/assets/icons/scissors-square-dashed-bottom.svg +0 -1
- data/assets/icons/scissors-square.svg +0 -1
- data/assets/icons/scroll-text.svg +0 -1
- data/assets/icons/search-check.svg +0 -1
- data/assets/icons/search-code.svg +0 -1
- data/assets/icons/search-slash.svg +0 -1
- data/assets/icons/search-x.svg +0 -1
- data/assets/icons/send-horizontal.svg +0 -1
- data/assets/icons/send-to-back.svg +0 -1
- data/assets/icons/shapes.svg +0 -1
- data/assets/icons/shell.svg +0 -1
- data/assets/icons/shield-ban.svg +0 -1
- data/assets/icons/shield-ellipsis.svg +0 -1
- data/assets/icons/shield-half.svg +0 -1
- data/assets/icons/shield-minus.svg +0 -1
- data/assets/icons/shield-plus.svg +0 -1
- data/assets/icons/shield-question.svg +0 -1
- data/assets/icons/shield-x.svg +0 -1
- data/assets/icons/ship-wheel.svg +0 -1
- data/assets/icons/shopping-basket.svg +0 -1
- data/assets/icons/sigma-square.svg +0 -1
- data/assets/icons/snail.svg +0 -1
- data/assets/icons/space.svg +0 -1
- data/assets/icons/spade.svg +0 -1
- data/assets/icons/sparkle.svg +0 -1
- data/assets/icons/sparkles.svg +0 -1
- data/assets/icons/speech.svg +0 -1
- data/assets/icons/spell-check-2.svg +0 -1
- data/assets/icons/spell-check.svg +0 -1
- data/assets/icons/split.svg +0 -1
- data/assets/icons/spray-can.svg +0 -1
- data/assets/icons/square-asterisk.svg +0 -1
- data/assets/icons/square-code.svg +0 -1
- data/assets/icons/square-dashed-bottom-code.svg +0 -1
- data/assets/icons/square-dashed-bottom.svg +0 -1
- data/assets/icons/square-dot.svg +0 -1
- data/assets/icons/square-equal.svg +0 -1
- data/assets/icons/square-slash.svg +0 -1
- data/assets/icons/square-stack.svg +0 -1
- data/assets/icons/squirrel.svg +0 -1
- data/assets/icons/step-back.svg +0 -1
- data/assets/icons/step-forward.svg +0 -1
- data/assets/icons/store.svg +0 -1
- data/assets/icons/table-properties.svg +0 -1
- data/assets/icons/tablet-smartphone.svg +0 -1
- data/assets/icons/tally-1.svg +0 -1
- data/assets/icons/tally-2.svg +0 -1
- data/assets/icons/tally-3.svg +0 -1
- data/assets/icons/tally-4.svg +0 -1
- data/assets/icons/tally-5.svg +0 -1
- data/assets/icons/test-tube-2.svg +0 -1
- data/assets/icons/test-tube.svg +0 -1
- data/assets/icons/test-tubes.svg +0 -1
- data/assets/icons/text-quote.svg +0 -1
- data/assets/icons/text-select.svg +0 -1
- data/assets/icons/text.svg +0 -1
- data/assets/icons/theater.svg +0 -1
- data/assets/icons/touchpad-off.svg +0 -1
- data/assets/icons/touchpad.svg +0 -1
- data/assets/icons/tractor.svg +0 -1
- data/assets/icons/traffic-cone.svg +0 -1
- data/assets/icons/train-front-tunnel.svg +0 -1
- data/assets/icons/train-front.svg +0 -1
- data/assets/icons/train-track.svg +0 -1
- data/assets/icons/tram-front.svg +0 -1
- data/assets/icons/triangle-right.svg +0 -1
- data/assets/icons/turtle.svg +0 -1
- data/assets/icons/undo-dot.svg +0 -1
- data/assets/icons/unfold-horizontal.svg +0 -1
- data/assets/icons/unfold-vertical.svg +0 -1
- data/assets/icons/ungroup.svg +0 -1
- data/assets/icons/unplug.svg +0 -1
- data/assets/icons/user-2.svg +0 -1
- data/assets/icons/user-check-2.svg +0 -1
- data/assets/icons/user-circle-2.svg +0 -1
- data/assets/icons/user-circle.svg +0 -1
- data/assets/icons/user-cog-2.svg +0 -1
- data/assets/icons/user-minus-2.svg +0 -1
- data/assets/icons/user-plus-2.svg +0 -1
- data/assets/icons/user-square-2.svg +0 -1
- data/assets/icons/user-square.svg +0 -1
- data/assets/icons/user-x-2.svg +0 -1
- data/assets/icons/users-2.svg +0 -1
- data/assets/icons/variable.svg +0 -1
- data/assets/icons/videotape.svg +0 -1
- data/assets/icons/wallet-2.svg +0 -1
- data/assets/icons/wallet-cards.svg +0 -1
- data/assets/icons/wallpaper.svg +0 -1
- data/assets/icons/warehouse.svg +0 -1
- data/assets/icons/whole-word.svg +0 -1
- data/assets/icons/workflow.svg +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6690e132c2afade65dabcdd620bf4d8e67f6bfcbacd8d94ad5f156d443417eb9
|
4
|
+
data.tar.gz: fa40a220f164cef926db2e1ce4a6be8681ccac8069149b49d791e58157e1a2a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6590230a593eccba2833f205758255543ae6fdb4afea7ccc656909d7426a0032dc67163dfcb412c000c0d7b1fb78bc55070d4e738d05068d9bb6a21b6154166d
|
7
|
+
data.tar.gz: cb3f413449f297e41ec1a6706b11dcfb3589631a70252f4220466dcda5ade1e9ae8b909627ad923de8c9aa5471397085fcb50cbc6cacf81348cbfaf550ceaa02
|
data/README.md
CHANGED
@@ -49,9 +49,9 @@ To preview changes locally you can run a development version of the docs site:
|
|
49
49
|
|
50
50
|
### Testing
|
51
51
|
|
52
|
-
Lookbook uses [RSpec](https://relishapp.com/rspec)
|
52
|
+
Lookbook uses [RSpec](https://relishapp.com/rspec). [Appraisal](https://github.com/thoughtbot/appraisal) is used to run tests against different Ruby and Rails versions.
|
53
53
|
|
54
|
-
Tests can be run using the `
|
54
|
+
Tests can be run using the `bundle exec appraisal rspec` command.
|
55
55
|
|
56
56
|
The dummy app that the tests are being run against can be viewed by running the `bin/dummy` command and then browsing to http://localhost:9292/lookbook
|
57
57
|
|
@@ -3,6 +3,7 @@ module Lookbook
|
|
3
3
|
send(:include, Lookbook::Engine.routes.url_helpers) # YARD parsing workaround: https://github.com/lsegal/yard/issues/546
|
4
4
|
include Lookbook::UiElementsHelper
|
5
5
|
include Lookbook::ClassNamesHelper if Engine.runtime_context.rails_older_than?("6.1.0")
|
6
|
+
include ERB::Util # for json_escape
|
6
7
|
|
7
8
|
def initialize(alpine_data: [], **html_attrs)
|
8
9
|
@alpine_data ||= alpine_data
|
@@ -1,18 +1,17 @@
|
|
1
|
-
<%=
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<% end %>
|
1
|
+
<div class="contents" key="<%= key %>">
|
2
|
+
<%= lookbook_render button_component.new(
|
3
|
+
id: id,
|
4
|
+
icon: icon,
|
5
|
+
**button_attrs,
|
6
|
+
"x-on:keydown.esc.stop.document": "hideDropdown") do %>
|
7
|
+
<%= content %>
|
8
|
+
<% end %>
|
9
9
|
|
10
|
-
<% if dropdown? %>
|
11
|
-
|
12
|
-
<div data-dropdown-id="<%= id %>">
|
10
|
+
<% if dropdown? %>
|
11
|
+
<div data-dropdown-id="<%= id %>" hidden>
|
13
12
|
<div class="divide-y divide-lookbook-divider text-left">
|
14
13
|
<%= dropdown %>
|
15
14
|
</div>
|
16
15
|
</div>
|
17
16
|
<% end %>
|
18
|
-
|
17
|
+
</div>
|
@@ -14,24 +14,28 @@ export default function buttonComponent() {
|
|
14
14
|
}
|
15
15
|
|
16
16
|
if (this.dropdownContent) {
|
17
|
-
|
18
|
-
content: this.dropdownContent,
|
19
|
-
trigger: "click",
|
20
|
-
theme: "menu",
|
21
|
-
triggerTarget: this.$el,
|
22
|
-
interactive: true,
|
23
|
-
zIndex: 99999,
|
24
|
-
onShow: () => {
|
25
|
-
if (!this.$store.settings.showTooltips) {
|
26
|
-
return false;
|
27
|
-
}
|
28
|
-
this.$dispatch("dropdown:show", { dropdown: this });
|
29
|
-
},
|
30
|
-
onHide: () => this.$dispatch("dropdown:hide", { dropdown: this }),
|
31
|
-
});
|
17
|
+
this.initDropdown();
|
32
18
|
}
|
33
19
|
},
|
34
20
|
|
21
|
+
initDropdown() {
|
22
|
+
dropdown = tippy(this.$el, {
|
23
|
+
content: this.dropdownContent,
|
24
|
+
trigger: "click",
|
25
|
+
theme: "menu",
|
26
|
+
triggerTarget: this.$el,
|
27
|
+
interactive: true,
|
28
|
+
zIndex: 99999,
|
29
|
+
onShow: () => {
|
30
|
+
if (!this.$store.settings.showTooltips) {
|
31
|
+
return false;
|
32
|
+
}
|
33
|
+
this.$dispatch("dropdown:show", { dropdown: this });
|
34
|
+
},
|
35
|
+
onHide: () => this.$dispatch("dropdown:hide", { dropdown: this }),
|
36
|
+
});
|
37
|
+
},
|
38
|
+
|
35
39
|
get dropdownContent() {
|
36
40
|
if (this.$root && this.$root.id) {
|
37
41
|
const dropdown = document.querySelector(
|
@@ -48,15 +52,6 @@ export default function buttonComponent() {
|
|
48
52
|
}
|
49
53
|
},
|
50
54
|
|
51
|
-
updateDropdown() {
|
52
|
-
if (dropdown) {
|
53
|
-
dropdown.hide();
|
54
|
-
this.$nextTick(() => {
|
55
|
-
dropdown.setContent(this.dropdownContent);
|
56
|
-
});
|
57
|
-
}
|
58
|
-
},
|
59
|
-
|
60
55
|
startSpin() {
|
61
56
|
this._spinning = true;
|
62
57
|
},
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= render_component_tag class: "flex items-center text-xs font-mono space-x-1 transition",
|
2
|
-
":class":"{'!opacity-100': resizing}",
|
2
|
+
"x-bind:class":"{'!opacity-100': resizing}",
|
3
3
|
"x-on:viewport:resize-start.window": "resizing = true",
|
4
4
|
"x-on:viewport:resize-complete.window": "resizing = false",
|
5
5
|
"x-on:dom:update-start.window": "tearDown",
|
@@ -8,4 +8,4 @@
|
|
8
8
|
<span x-text="`${width}px`"></span>
|
9
9
|
<span class="opacity-70">x</span>
|
10
10
|
<span x-text="`${height}px`"></span>
|
11
|
-
<% end %>
|
11
|
+
<% end %>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
x-on:keydown.f.window="if (!($event.shiftKey || $event.metaKey || $event.ctrlKey || $event.altKey)) { focus(); $event.preventDefault(); $event.stopPropagation(); }"
|
12
12
|
x-on:keydown.stop>
|
13
13
|
<button class="text-lookbook-icon-button-stroke hover:text-lookbook-icon-button-stroke-hover focus:ring-0 focus:outline-none absolute top-1/2 right-3 -translate-y-1/2" x-on:click="clear" x-bind:class="{hidden: !active}">
|
14
|
-
<%= icon :x, size:
|
14
|
+
<%= icon :x, size: 4 %>
|
15
15
|
</button>
|
16
16
|
</div>
|
17
|
-
<% end %>
|
17
|
+
<% end %>
|
@@ -11,10 +11,10 @@
|
|
11
11
|
disabled: disabled,
|
12
12
|
aria: { label: tooltip } do %>
|
13
13
|
<span x-ref="icon">
|
14
|
-
<%= icons.present? ? safe_join(icons) : (lookbook_render(:icon, name: icon, size: icon_size, ":class": "{'animate-spin': _spinning}") if icon) %>
|
14
|
+
<%= icons.present? ? safe_join(icons) : (lookbook_render(:icon, name: icon, size: icon_size, "x-bind:class": "{'animate-spin': _spinning}") if icon) %>
|
15
15
|
</span>
|
16
16
|
<% if tooltip %>
|
17
17
|
<label class="hidden" x-ref="tooltip"><%= tooltip %></label>
|
18
18
|
<% end %>
|
19
19
|
<%= content %>
|
20
|
-
<% end %>
|
20
|
+
<% end %>
|
@@ -14,7 +14,7 @@ module Lookbook
|
|
14
14
|
styles, html = StylesExtractor.call(render_input)
|
15
15
|
Editor::Component.add_styles(param.input, styles)
|
16
16
|
|
17
|
-
escaped_value = json_escape(param.value.to_s).gsub("\n", '\n')
|
17
|
+
escaped_value = html_escape(json_escape(param.value.to_s).gsub("\n", '\n'))
|
18
18
|
wrapper_attrs = {
|
19
19
|
data: {"param-input": param.input},
|
20
20
|
"x-data": "paramsInputComponent({name: \"#{param.name}\", value: \"#{escaped_value}\"})"
|
@@ -8,7 +8,7 @@
|
|
8
8
|
"py-2 text-base": @theme == :page,
|
9
9
|
}
|
10
10
|
],
|
11
|
-
":class": "{
|
11
|
+
"x-bind:class": "{
|
12
12
|
'border-lookbook-tabs-border-active': isSelected($el),
|
13
13
|
'border-transparent text-lookbook-tabs-text hover:text-lookbook-tabs-text-hover': !isSelected($el),
|
14
14
|
'hidden': visibleTabsCount >= #{@position}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"px-2 text-lg relative -bottom-px": @theme == :page,
|
10
10
|
}
|
11
11
|
],
|
12
|
-
":class": "{
|
12
|
+
"x-bind:class": "{
|
13
13
|
'border-lookbook-tabs-border-active': isSelected($el),
|
14
14
|
'border-transparent text-lookbook-tabs-text hover:text-lookbook-tabs-text-hover': !isSelected($el),
|
15
15
|
'!text-lookbook-tabs-text-disabled': isDisabled($el),
|
@@ -13,7 +13,7 @@
|
|
13
13
|
|
14
14
|
<span class="flex items-center space-x-2 justify-center">
|
15
15
|
<span x-ref="icon">
|
16
|
-
<%= icons.present? ? safe_join(icons) : (lookbook_render(:icon, name: icon, size: icon_size, ":class": "{'animate-spin': _spinning}") if icon) %>
|
16
|
+
<%= icons.present? ? safe_join(icons) : (lookbook_render(:icon, name: icon, size: icon_size, "x-bind:class": "{'animate-spin': _spinning}") if icon) %>
|
17
17
|
</span>
|
18
18
|
<% if content %>
|
19
19
|
<span><%= content %></span>
|
@@ -23,4 +23,4 @@
|
|
23
23
|
<% if tooltip %>
|
24
24
|
<label class="hidden" x-ref="tooltip"><%= tooltip %></label>
|
25
25
|
<% end %>
|
26
|
-
<% end %>
|
26
|
+
<% end %>
|
@@ -10,6 +10,9 @@ module Lookbook
|
|
10
10
|
helper Lookbook::ApplicationHelper
|
11
11
|
helper Lookbook::UiElementsHelper
|
12
12
|
|
13
|
+
before_action :disable_annotations
|
14
|
+
after_action :restore_annotations
|
15
|
+
|
13
16
|
before_action :assign_theme_overrides
|
14
17
|
before_action :assign_instance_vars
|
15
18
|
|
@@ -37,6 +40,20 @@ module Lookbook
|
|
37
40
|
|
38
41
|
protected
|
39
42
|
|
43
|
+
def disable_annotations
|
44
|
+
return unless ActionView::Base.respond_to?(:annotate_rendered_view_with_filenames)
|
45
|
+
|
46
|
+
@original_annotations_value = ActionView::Base.annotate_rendered_view_with_filenames
|
47
|
+
ActionView::Base.annotate_rendered_view_with_filenames = false
|
48
|
+
end
|
49
|
+
|
50
|
+
def restore_annotations
|
51
|
+
return if @original_annotations_value.nil?
|
52
|
+
|
53
|
+
ActionView::Base.annotate_rendered_view_with_filenames = @original_annotations_value
|
54
|
+
@original_annotations_value = nil
|
55
|
+
end
|
56
|
+
|
40
57
|
def assign_theme_overrides
|
41
58
|
@theme_overrides ||= Engine.theme.to_css
|
42
59
|
end
|
@@ -39,13 +39,17 @@ module Lookbook
|
|
39
39
|
def show
|
40
40
|
raise_not_found("Preview not found") unless @target
|
41
41
|
|
42
|
-
@preview_html =
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
42
|
+
@preview_html = if Lookbook.config.preview_single_pass_rendering && !inspector_data.scenarios.many?
|
43
|
+
inspector_data.scenarios.first.output + (iframe_content_scripts if embedded?)
|
44
|
+
else
|
45
|
+
preview_controller.process(
|
46
|
+
:render_in_layout_to_string,
|
47
|
+
"lookbook/previews/group",
|
48
|
+
inspector_data,
|
49
|
+
layout: @preview.layout,
|
50
|
+
append_html: (iframe_content_scripts if embedded?)
|
51
|
+
)
|
52
|
+
end
|
49
53
|
end
|
50
54
|
|
51
55
|
private
|
@@ -22,10 +22,10 @@
|
|
22
22
|
|
23
23
|
<%= lookbook_render :split_layout,
|
24
24
|
alpine_data: "$store.layout.main",
|
25
|
-
":class": "$store.layout.mobile && '!block'" do |layout| %>
|
25
|
+
"x-bind:class": "$store.layout.mobile && '!block'" do |layout| %>
|
26
26
|
|
27
27
|
<% layout.with_pane id: "app-sidebar", class: "flex flex-col bg-lookbook-sidebar-bg relative translate-x-0",
|
28
|
-
":class": "{
|
28
|
+
"x-bind:class": "{
|
29
29
|
'transition': $store.layout.mobile,
|
30
30
|
'translate-x-full': $store.layout.mobile && sidebarHidden,
|
31
31
|
'!absolute right-0 bottom-0 top-[40px] h-[calc(100%_-_40px)] w-full max-w-[420px] z-[1001] border-l border-lookbook-divider': $store.layout.mobile
|
@@ -93,7 +93,7 @@
|
|
93
93
|
<% end %>
|
94
94
|
<% end %>
|
95
95
|
|
96
|
-
<% layout.with_pane id: "app-main", class: "overflow-hidden h-full", ":class": "$store.layout.mobile && 'w-screen'" do %>
|
96
|
+
<% layout.with_pane id: "app-main", class: "overflow-hidden h-full", "x-bind:class": "$store.layout.mobile && 'w-screen'" do %>
|
97
97
|
<%= content_for?(:main) ? yield(:main) : yield %>
|
98
98
|
<% end %>
|
99
99
|
<% end %>
|
@@ -5,6 +5,8 @@
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
7
7
|
|
8
|
+
<%= csrf_meta_tags %>
|
9
|
+
|
8
10
|
<link href="<%= lookbook_asset_path("/css/lookbook.css") %>" rel="stylesheet">
|
9
11
|
<link href="<%= lookbook_asset_path("/css/themes/#{@config.ui_theme}.css") %>" rel="stylesheet">
|
10
12
|
|
@@ -11,9 +11,9 @@
|
|
11
11
|
<% end %>
|
12
12
|
</div>
|
13
13
|
<% else %>
|
14
|
-
<div class="p-4 w-full h-full bg-lookbook-prose-bg">
|
14
|
+
<div class="p-4 w-full min-h-full h-max bg-lookbook-prose-bg">
|
15
15
|
<%= lookbook_render :prose do %>
|
16
16
|
<%== items.any? ? items.first.notes : "<em class='opacity-50'>No notes provided.</em>" %>
|
17
17
|
<% end %>
|
18
18
|
</div>
|
19
|
-
<% end %>
|
19
|
+
<% end %>
|