coveragebook_components 0.12.2 → 0.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/build/coco/app.css +6615 -5488
- data/app/assets/build/coco/app.js +3142 -3169
- data/app/assets/build/coco/book.css +5169 -2130
- data/app/assets/build/coco/book.js +3986 -1565
- data/app/assets/css/app.css +2 -8
- data/app/assets/css/base/config.css +1 -0
- data/app/assets/css/{base.css → base/setup.css} +7 -4
- data/app/assets/css/{shared → base}/tippy.css +18 -0
- data/app/assets/css/book.css +2 -4
- data/app/assets/js/app.js +25 -9
- data/app/assets/js/{libs → base}/alpine/directives/dropdown.js +1 -1
- data/app/assets/js/{libs → base}/alpine/directives/tooltip.js +1 -1
- data/app/assets/js/{libs → base}/alpine/index.js +7 -7
- data/app/assets/js/{libs → base}/alpine/utils/tippy_modifiers.js +1 -1
- data/app/assets/js/base/setup.js +8 -0
- data/app/assets/js/book.js +4 -4
- data/app/components/coco/app/{layouts/application/application.js → application_layout/application_layout.js} +1 -1
- data/app/components/coco/app/application_layout/application_layout.rb +16 -0
- data/app/components/coco/app/contact_callout/contact_callout.rb +21 -0
- data/app/components/coco/app/faqs/faqs.rb +14 -0
- data/app/components/coco/app/{blocks/header → header}/header.js +1 -1
- data/app/components/coco/app/header/header.rb +33 -0
- data/app/components/coco/app/{blocks/nav_drawer → nav_drawer}/nav_drawer.css +1 -1
- data/app/components/coco/app/{blocks/nav_drawer → nav_drawer}/nav_drawer.js +1 -1
- data/app/components/coco/app/nav_drawer/nav_drawer.rb +32 -0
- data/app/components/coco/app/plan_card/plan_card.rb +39 -0
- data/app/components/coco/app/{blocks/plan_picker → plan_picker}/plan_picker.css +3 -3
- data/app/components/coco/app/{blocks/plan_picker → plan_picker}/plan_picker.js +1 -1
- data/app/components/coco/app/plan_picker/plan_picker.rb +25 -0
- data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/item/item.js +2 -2
- data/app/components/coco/app/sidebar_nav/item/item.rb +48 -0
- data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/menu/menu.js +1 -1
- data/app/components/coco/app/sidebar_nav/menu/menu.rb +46 -0
- data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/navbar/navbar.html.erb +1 -1
- data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/navbar/navbar.js +2 -2
- data/app/components/coco/app/sidebar_nav/navbar/navbar.rb +50 -0
- data/app/components/coco/app/{blocks/slide_editor → slide_editor}/slide_editor.js +2 -2
- data/app/components/coco/app/slide_editor/slide_editor.rb +114 -0
- data/app/components/coco/book/editable_slide/editable_slide.rb +72 -0
- data/app/components/coco/book/media_slide/media_slide.rb +12 -0
- data/app/components/coco/{shared → buttons}/button/button.js +1 -1
- data/app/components/coco/{shared → buttons}/button/button.rb +2 -2
- data/app/components/coco/{shared → buttons}/button/button_dropdown.js +1 -1
- data/app/components/coco/{shared → buttons}/button_group/button_group.js +2 -2
- data/app/components/coco/{shared → buttons}/button_to/button_to.rb +1 -1
- data/app/components/coco/{app/elements → buttons}/color_picker_button/color_picker_button.css +2 -2
- data/app/components/coco/{app/elements → buttons}/color_picker_button/color_picker_button.html.erb +1 -1
- data/app/components/coco/{app/elements → buttons}/color_picker_button/color_picker_button.js +2 -2
- data/app/components/coco/buttons/color_picker_button/color_picker_button.rb +53 -0
- data/app/components/coco/{app/elements → buttons}/confirm_panel/confirm_panel.css +1 -1
- data/app/components/coco/{app/elements → buttons}/confirm_panel/confirm_panel.html.erb +1 -1
- data/app/components/coco/{app/elements → buttons}/confirm_panel/confirm_panel.js +2 -2
- data/app/components/coco/buttons/confirm_panel/confirm_panel.rb +19 -0
- data/app/components/coco/{app/elements → buttons}/image_picker_button/image_picker_button.css +2 -2
- data/app/components/coco/{app/elements → buttons}/image_picker_button/image_picker_button.html.erb +1 -1
- data/app/components/coco/{app/elements → buttons}/image_picker_button/image_picker_button.js +2 -2
- data/app/components/coco/buttons/image_picker_button/image_picker_button.rb +44 -0
- data/app/components/coco/{app/elements → buttons}/layout_picker_button/layout_picker_button.css +11 -11
- data/app/components/coco/{app/elements → buttons}/layout_picker_button/layout_picker_button.html.erb +1 -1
- data/app/components/coco/{app/elements → buttons}/layout_picker_button/layout_picker_button.js +2 -2
- data/app/components/coco/buttons/layout_picker_button/layout_picker_button.rb +33 -0
- data/app/components/coco/{app/elements → buttons}/menu/menu.css +2 -4
- data/app/components/coco/buttons/menu/menu.rb +37 -0
- data/app/components/coco/{app/elements → buttons}/menu_button/menu_button.css +1 -1
- data/app/components/coco/{app/elements → buttons}/menu_button/menu_button.html.erb +1 -1
- data/app/components/coco/buttons/menu_button/menu_button.js +6 -0
- data/app/components/coco/buttons/menu_button/menu_button.rb +30 -0
- data/app/components/coco/{app/elements → buttons}/menu_items/user_profile/user_profile.css +1 -1
- data/app/components/coco/buttons/menu_items/user_profile/user_profile.rb +18 -0
- data/app/components/coco/{app/elements → buttons}/option_bar/option_bar.css +1 -1
- data/app/components/coco/buttons/option_bar/option_bar.rb +13 -0
- data/app/components/coco/{app/elements → buttons}/toolbar/toolbar.css +1 -1
- data/app/components/coco/{app/elements → buttons}/toolbar/toolbar.js +1 -1
- data/app/components/coco/buttons/toolbar/toolbar.rb +35 -0
- data/app/components/coco/component.rb +1 -1
- data/app/components/coco/concerns/acts_as_button_group.rb +4 -11
- data/app/components/coco/concerns/acts_as_field_with_html_options.rb +1 -1
- data/app/components/coco/concerns/acts_as_field_with_options.rb +2 -2
- data/app/components/coco/concerns/with_icon.rb +1 -1
- data/app/components/coco/embeds/youtube_embed/youtube_embed.rb +16 -0
- data/app/components/coco/fields/button_component.rb +14 -0
- data/app/components/coco/fields/check_box_component.rb +7 -0
- data/app/components/coco/fields/collection_check_boxes_component.rb +7 -0
- data/app/components/coco/fields/collection_radio_buttons_component.rb +7 -0
- data/app/components/coco/fields/collection_select_component.rb +7 -0
- data/app/components/coco/fields/color_field_component.rb +7 -0
- data/app/components/coco/fields/date_field_component.rb +7 -0
- data/app/components/coco/fields/date_select_component.rb +7 -0
- data/app/components/coco/fields/datetime_local_field_component.rb +7 -0
- data/app/components/coco/fields/datetime_select_component.rb +7 -0
- data/app/components/coco/fields/email_field_component.rb +7 -0
- data/app/components/coco/fields/error_message_component.rb +7 -0
- data/app/components/coco/fields/file_field_component.rb +7 -0
- data/app/components/coco/fields/grouped_collection_select_component.rb +7 -0
- data/app/components/coco/fields/hint_component.rb +7 -0
- data/app/components/coco/fields/label_component.rb +7 -0
- data/app/components/coco/fields/month_field_component.rb +7 -0
- data/app/components/coco/fields/number_field_component.rb +7 -0
- data/app/components/coco/fields/password_field_component.rb +7 -0
- data/app/components/coco/fields/radio_button_component.rb +7 -0
- data/app/components/coco/fields/range_field_component.rb +7 -0
- data/app/components/coco/fields/search_field_component.rb +7 -0
- data/app/components/coco/fields/select_component.rb +7 -0
- data/app/components/coco/fields/submit_component.rb +14 -0
- data/app/components/coco/fields/telephone_field_component.rb +7 -0
- data/app/components/coco/fields/text_area_component.rb +7 -0
- data/app/components/coco/fields/text_field_component.rb +7 -0
- data/app/components/coco/fields/time_field_component.rb +7 -0
- data/app/components/coco/fields/time_select_component.rb +7 -0
- data/app/components/coco/fields/time_zone_select_component.rb +7 -0
- data/app/components/coco/fields/url_field_component.rb +7 -0
- data/app/components/coco/fields/week_field_component.rb +7 -0
- data/app/components/coco/fields/weekday_select_component.rb +7 -0
- data/app/components/coco/{shared → images}/icon/icon.js +1 -1
- data/app/components/coco/{shared → images}/image_uploader/image_uploader.js +1 -1
- data/app/components/coco/{app/elements → indicators}/stamp/stamp.css +1 -1
- data/app/components/coco/indicators/stamp/stamp.rb +25 -0
- data/app/components/coco/{app/layouts → layout}/page/page.js +1 -1
- data/app/components/coco/layout/page/page.rb +55 -0
- data/app/components/coco/{app/elements → messaging}/alert/alert.css +7 -7
- data/app/components/coco/{app/elements → messaging}/alert/alert.html.erb +1 -1
- data/app/components/coco/{app/elements → messaging}/alert/alert.js +2 -2
- data/app/components/coco/messaging/alert/alert.rb +75 -0
- data/app/components/coco/{app/elements → messaging}/notice/notice.css +1 -1
- data/app/components/coco/messaging/notice/notice.html.erb +5 -0
- data/app/components/coco/messaging/notice/notice.js +5 -0
- data/app/components/coco/messaging/notice/notice.rb +18 -0
- data/app/components/coco/{app/elements → messaging}/snackbar/snackbar.css +1 -1
- data/app/components/coco/{app/elements → messaging}/snackbar/snackbar.html.erb +1 -1
- data/app/components/coco/{app/elements → messaging}/snackbar/snackbar.js +2 -2
- data/app/components/coco/messaging/snackbar/snackbar.rb +34 -0
- data/app/components/coco/messaging/system_banner/system_banner.css +4 -0
- data/app/components/coco/messaging/system_banner/system_banner.html.erb +5 -0
- data/app/components/coco/{app/elements → messaging}/system_banner/system_banner.js +2 -2
- data/app/components/coco/messaging/system_banner/system_banner.rb +78 -0
- data/app/components/coco/{app/elements → messaging}/toast/toast.css +1 -1
- data/app/components/coco/{app/elements → messaging}/toast/toast.html.erb +1 -1
- data/app/components/coco/{app/elements → messaging}/toast/toast.js +2 -2
- data/app/components/coco/messaging/toast/toast.rb +19 -0
- data/app/components/coco/{shared → modals}/modal/modal.js +2 -2
- data/app/components/coco/{shared → modals}/modal/modal.rb +2 -1
- data/app/components/coco/{shared → modals}/modal_dialog/modal_dialog.js +1 -1
- data/app/components/coco/{shared → modals}/modal_dialog/modal_dialog.rb +1 -1
- data/app/components/coco/{shared → modals}/modal_lightbox/modal_lightbox.js +1 -1
- data/app/components/coco/{shared → navigation}/link/link.rb +1 -1
- data/app/components/coco/{shared/pager_link/pager_link.css → navigation/pager_button/pager_button.css} +1 -1
- data/app/components/coco/{shared/pager_link/pager_link.rb → navigation/pager_button/pager_button.rb} +1 -1
- data/app/components/coco/{app/elements → pickers}/color_picker/color_picker.css +11 -11
- data/app/components/coco/{app/elements → pickers}/color_picker/color_picker.html.erb +1 -1
- data/app/components/coco/{app/elements → pickers}/color_picker/color_picker.js +2 -2
- data/app/components/coco/pickers/color_picker/color_picker.rb +48 -0
- data/app/components/coco/{app/elements → pickers}/image_picker/image_picker.css +11 -11
- data/app/components/coco/{app/elements → pickers}/image_picker/image_picker.html.erb +1 -1
- data/app/components/coco/{app/elements → pickers}/image_picker/image_picker.js +2 -2
- data/app/components/coco/pickers/image_picker/image_picker.rb +20 -0
- data/app/components/coco/presented_component.rb +1 -1
- data/app/components/coco/{shared → utilities}/dropdown/dropdown.js +1 -1
- data/app/components/coco/{shared → utilities}/poll_controller/poll_controller.js +1 -1
- data/app/components/coco/{app/elements → utilities}/seamless_textarea/seamless_textarea.css +1 -1
- data/app/components/coco/{app/elements → utilities}/seamless_textarea/seamless_textarea.html.erb +1 -1
- data/app/components/coco/{app/elements → utilities}/seamless_textarea/seamless_textarea.js +2 -2
- data/app/components/coco/utilities/seamless_textarea/seamless_textarea.rb +25 -0
- data/app/helpers/coco/app_components_helper.rb +35 -0
- data/app/helpers/coco/book_components_helper.rb +11 -0
- data/app/helpers/coco/components_helper.rb +7 -0
- data/app/helpers/coco/core_components_helper.rb +257 -0
- data/app/helpers/coco/helpers.rb +2 -2
- data/app/helpers/coco/modal_helper.rb +22 -0
- data/config/locales/coco.en.yml +17 -18
- data/config/{tailwind.base.config.cjs → tailwind.config.cjs} +10 -0
- data/config/tokens.cjs +9 -23
- data/lib/coco/app_form_builder.rb +1 -1
- data/lib/coco/engine.rb +3 -3
- data/lib/coco.rb +1 -1
- metadata +253 -274
- data/app/assets/css/app/config.css +0 -1
- data/app/assets/css/app/tippy.css +0 -19
- data/app/assets/css/book/config.css +0 -1
- data/app/assets/js/app/components.js +0 -4
- data/app/assets/js/app/setup.js +0 -23
- data/app/assets/js/book/components.js +0 -4
- data/app/assets/js/shared/components.js +0 -4
- data/app/components/coco/app/blocks/contact_callout/contact_callout.rb +0 -23
- data/app/components/coco/app/blocks/faqs/faqs.rb +0 -16
- data/app/components/coco/app/blocks/header/header.rb +0 -35
- data/app/components/coco/app/blocks/nav_drawer/nav_drawer.rb +0 -34
- data/app/components/coco/app/blocks/plan_picker/plan_picker.rb +0 -27
- data/app/components/coco/app/blocks/sidebar_nav/item/item.rb +0 -50
- data/app/components/coco/app/blocks/sidebar_nav/menu/menu.rb +0 -48
- data/app/components/coco/app/blocks/sidebar_nav/navbar/navbar.rb +0 -50
- data/app/components/coco/app/blocks/slide_editor/slide_editor.rb +0 -116
- data/app/components/coco/app/elements/alert/alert.rb +0 -79
- data/app/components/coco/app/elements/color_picker/color_picker.rb +0 -53
- data/app/components/coco/app/elements/color_picker_button/color_picker_button.rb +0 -58
- data/app/components/coco/app/elements/confirm_panel/confirm_panel.rb +0 -23
- data/app/components/coco/app/elements/image_picker/image_picker.rb +0 -25
- data/app/components/coco/app/elements/image_picker_button/image_picker_button.rb +0 -49
- data/app/components/coco/app/elements/layout_picker_button/layout_picker_button.rb +0 -38
- data/app/components/coco/app/elements/menu/menu.rb +0 -41
- data/app/components/coco/app/elements/menu_button/menu_button.js +0 -6
- data/app/components/coco/app/elements/menu_button/menu_button.rb +0 -35
- data/app/components/coco/app/elements/menu_items/user_profile/user_profile.rb +0 -20
- data/app/components/coco/app/elements/notice/notice.html.erb +0 -5
- data/app/components/coco/app/elements/notice/notice.js +0 -5
- data/app/components/coco/app/elements/notice/notice.rb +0 -22
- data/app/components/coco/app/elements/option_bar/option_bar.rb +0 -17
- data/app/components/coco/app/elements/plan_card/plan_card.rb +0 -41
- data/app/components/coco/app/elements/seamless_textarea/seamless_textarea.rb +0 -29
- data/app/components/coco/app/elements/snackbar/snackbar.rb +0 -38
- data/app/components/coco/app/elements/stamp/stamp.rb +0 -29
- data/app/components/coco/app/elements/system_banner/system_banner.css +0 -4
- data/app/components/coco/app/elements/system_banner/system_banner.html.erb +0 -5
- data/app/components/coco/app/elements/system_banner/system_banner.rb +0 -82
- data/app/components/coco/app/elements/toast/toast.rb +0 -23
- data/app/components/coco/app/elements/toolbar/toolbar.rb +0 -41
- data/app/components/coco/app/fields/button_component.rb +0 -16
- data/app/components/coco/app/fields/check_box_component.rb +0 -9
- data/app/components/coco/app/fields/collection_check_boxes_component.rb +0 -9
- data/app/components/coco/app/fields/collection_radio_buttons_component.rb +0 -9
- data/app/components/coco/app/fields/collection_select_component.rb +0 -9
- data/app/components/coco/app/fields/color_field_component.rb +0 -9
- data/app/components/coco/app/fields/date_field_component.rb +0 -9
- data/app/components/coco/app/fields/date_select_component.rb +0 -9
- data/app/components/coco/app/fields/datetime_local_field_component.rb +0 -9
- data/app/components/coco/app/fields/datetime_select_component.rb +0 -9
- data/app/components/coco/app/fields/email_field_component.rb +0 -9
- data/app/components/coco/app/fields/error_message_component.rb +0 -9
- data/app/components/coco/app/fields/file_field_component.rb +0 -9
- data/app/components/coco/app/fields/grouped_collection_select_component.rb +0 -9
- data/app/components/coco/app/fields/hint_component.rb +0 -9
- data/app/components/coco/app/fields/label_component.rb +0 -9
- data/app/components/coco/app/fields/month_field_component.rb +0 -9
- data/app/components/coco/app/fields/number_field_component.rb +0 -9
- data/app/components/coco/app/fields/password_field_component.rb +0 -9
- data/app/components/coco/app/fields/radio_button_component.rb +0 -9
- data/app/components/coco/app/fields/range_field_component.rb +0 -9
- data/app/components/coco/app/fields/search_field_component.rb +0 -9
- data/app/components/coco/app/fields/select_component.rb +0 -9
- data/app/components/coco/app/fields/submit_component.rb +0 -16
- data/app/components/coco/app/fields/telephone_field_component.rb +0 -9
- data/app/components/coco/app/fields/text_area_component.rb +0 -9
- data/app/components/coco/app/fields/text_field_component.rb +0 -9
- data/app/components/coco/app/fields/time_field_component.rb +0 -9
- data/app/components/coco/app/fields/time_select_component.rb +0 -9
- data/app/components/coco/app/fields/time_zone_select_component.rb +0 -9
- data/app/components/coco/app/fields/url_field_component.rb +0 -9
- data/app/components/coco/app/fields/week_field_component.rb +0 -9
- data/app/components/coco/app/fields/weekday_select_component.rb +0 -9
- data/app/components/coco/app/layouts/application/application.rb +0 -18
- data/app/components/coco/app/layouts/page/page.rb +0 -59
- data/app/components/coco/book/blocks/slides/editable_slide/editable_slide.rb +0 -76
- data/app/components/coco/book/blocks/slides/media_slide/media_slide.rb +0 -16
- data/app/components/coco/shared/embeds/youtube/youtube.rb +0 -20
- data/app/helpers/coco/app_helper.rb +0 -141
- data/app/helpers/coco/book_helper.rb +0 -11
- data/app/helpers/coco/component_helper.rb +0 -15
- data/app/helpers/coco/shared_helper.rb +0 -111
- data/app/helpers/coco/url_helper.rb +0 -30
- data/config/tailwind.app.config.cjs +0 -21
- data/config/tailwind.book.config.cjs +0 -21
- /data/app/assets/css/{shared → base}/utils/colors.css +0 -0
- /data/app/assets/css/{shared → base}/utils/icons.css +0 -0
- /data/app/assets/css/{app/utils.css → base/utils/layout.css} +0 -0
- /data/app/assets/css/{shared → base}/utils/text.css +0 -0
- /data/app/assets/js/{libs → base}/alpine/directives/destroy.js +0 -0
- /data/app/assets/js/{libs → base}/alpine/directives/dimensions.js +0 -0
- /data/app/assets/js/{libs → base}/alpine/directives/notification.js +0 -0
- /data/app/assets/js/{libs → base}/alpine/directives/options.js +0 -0
- /data/app/assets/js/{libs → base}/alpine/directives/undo.js +0 -0
- /data/app/assets/js/{shared → base}/coco.js +0 -0
- /data/app/assets/js/{libs → base}/tippy/index.js +0 -0
- /data/app/assets/js/{libs → base}/tippy/plugins/hide_on_esc.js +0 -0
- /data/app/components/coco/app/{layouts/application/application.css → application_layout/application_layout.css} +0 -0
- /data/app/components/coco/app/{layouts/application/application.html.erb → application_layout/application_layout.html.erb} +0 -0
- /data/app/components/coco/app/{blocks/contact_callout → contact_callout}/contact_callout.css +0 -0
- /data/app/components/coco/app/{blocks/contact_callout → contact_callout}/contact_callout.html.erb +0 -0
- /data/app/components/coco/app/{blocks/faqs → faqs}/faqs.css +0 -0
- /data/app/components/coco/app/{blocks/faqs → faqs}/faqs.html.erb +0 -0
- /data/app/components/coco/app/{blocks/header → header}/header.css +0 -0
- /data/app/components/coco/app/{blocks/header → header}/header.html.erb +0 -0
- /data/app/components/coco/app/{blocks/nav_drawer → nav_drawer}/nav_drawer.html.erb +0 -0
- /data/app/components/coco/app/{elements/plan_card → plan_card}/plan_card.css +0 -0
- /data/app/components/coco/app/{elements/plan_card → plan_card}/plan_card.html.erb +0 -0
- /data/app/components/coco/app/{blocks/plan_picker → plan_picker}/plan_picker.html.erb +0 -0
- /data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/item/item.css +0 -0
- /data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/item/item.html.erb +0 -0
- /data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/menu/menu.css +0 -0
- /data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/menu/menu.html.erb +0 -0
- /data/app/components/coco/app/{blocks/sidebar_nav → sidebar_nav}/navbar/navbar.css +0 -0
- /data/app/components/coco/app/{blocks/slide_editor → slide_editor}/slide_editor.css +0 -0
- /data/app/components/coco/app/{blocks/slide_editor → slide_editor}/slide_editor.html.erb +0 -0
- /data/app/components/coco/book/{blocks/slides/editable_slide → editable_slide}/editable_slide.css +0 -0
- /data/app/components/coco/book/{blocks/slides/editable_slide → editable_slide}/editable_slide.html.erb +0 -0
- /data/app/components/coco/book/{blocks/slides/media_slide → media_slide}/media_slide.css +0 -0
- /data/app/components/coco/book/{blocks/slides/media_slide → media_slide}/media_slide.html.erb +0 -0
- /data/app/components/coco/{shared → buttons}/button/button.css +0 -0
- /data/app/components/coco/{shared → buttons}/button/button.html.erb +0 -0
- /data/app/components/coco/{shared → buttons}/button_group/button_group.css +0 -0
- /data/app/components/coco/{shared → buttons}/button_group/button_group.html.erb +0 -0
- /data/app/components/coco/{shared → buttons}/button_group/button_group.rb +0 -0
- /data/app/components/coco/{shared → buttons}/button_to/button_to.css +0 -0
- /data/app/components/coco/{shared → buttons}/button_to/button_to.html.erb +0 -0
- /data/app/components/coco/{app/elements → buttons}/menu/menu.html.erb +0 -0
- /data/app/components/coco/{app/elements → buttons}/menu_items/user_profile/user_profile.html.erb +0 -0
- /data/app/components/coco/{app/elements → buttons}/option_bar/option_bar.html.erb +0 -0
- /data/app/components/coco/{app/elements → buttons}/toolbar/toolbar.html.erb +0 -0
- /data/app/components/coco/{shared/embeds/youtube/youtube.css → embeds/youtube_embed/youtube_embed.css} +0 -0
- /data/app/components/coco/{shared/embeds/youtube/youtube.html.erb → embeds/youtube_embed/youtube_embed.html.erb} +0 -0
- /data/app/components/coco/{shared → images}/avatar/avatar.css +0 -0
- /data/app/components/coco/{shared → images}/avatar/avatar.rb +0 -0
- /data/app/components/coco/{shared → images}/icon/icon.css +0 -0
- /data/app/components/coco/{shared → images}/icon/icon.html.erb +0 -0
- /data/app/components/coco/{shared → images}/icon/icon.rb +0 -0
- /data/app/components/coco/{shared → images}/image/image.css +0 -0
- /data/app/components/coco/{shared → images}/image/image.rb +0 -0
- /data/app/components/coco/{shared → images}/image_uploader/image_uploader.css +0 -0
- /data/app/components/coco/{shared → images}/image_uploader/image_uploader.html.erb +0 -0
- /data/app/components/coco/{shared → images}/image_uploader/image_uploader.rb +0 -0
- /data/app/components/coco/{shared → images}/svg/svg.html.erb +0 -0
- /data/app/components/coco/{shared → images}/svg/svg.rb +0 -0
- /data/app/components/coco/{shared → indicators}/badge/badge.css +0 -0
- /data/app/components/coco/{shared → indicators}/badge/badge.html.erb +0 -0
- /data/app/components/coco/{shared → indicators}/badge/badge.rb +0 -0
- /data/app/components/coco/{app/elements → indicators}/stamp/stamp.html.erb +0 -0
- /data/app/components/coco/{app/layouts → layout}/page/page.css +0 -0
- /data/app/components/coco/{app/layouts → layout}/page/page.html.erb +0 -0
- /data/app/components/coco/{shared → layout}/panel/panel.css +0 -0
- /data/app/components/coco/{shared → layout}/panel/panel.html.erb +0 -0
- /data/app/components/coco/{shared → layout}/panel/panel.rb +0 -0
- /data/app/components/coco/{shared → layout}/spacer/spacer.css +0 -0
- /data/app/components/coco/{shared → layout}/spacer/spacer.rb +0 -0
- /data/app/components/coco/{shared → layout}/stack/stack.css +0 -0
- /data/app/components/coco/{shared → layout}/stack/stack.html.erb +0 -0
- /data/app/components/coco/{shared → layout}/stack/stack.rb +0 -0
- /data/app/components/coco/{shared → modals}/modal/modal.css +0 -0
- /data/app/components/coco/{shared → modals}/modal/modal.html.erb +0 -0
- /data/app/components/coco/{shared → modals}/modal_dialog/modal_dialog.css +0 -0
- /data/app/components/coco/{shared → modals}/modal_dialog/modal_dialog.html.erb +0 -0
- /data/app/components/coco/{shared → modals}/modal_lightbox/modal_lightbox.css +0 -0
- /data/app/components/coco/{shared → modals}/modal_lightbox/modal_lightbox.html.erb +0 -0
- /data/app/components/coco/{shared → modals}/modal_lightbox/modal_lightbox.rb +0 -0
- /data/app/components/coco/{shared → navigation}/link/link.css +0 -0
- /data/app/components/coco/{shared/pager_link/pager_link.html.erb → navigation/pager_button/pager_button.html.erb} +0 -0
- /data/app/components/coco/{shared → typography}/prose/prose.css +0 -0
- /data/app/components/coco/{shared → typography}/prose/prose.rb +0 -0
- /data/app/components/coco/{shared → utilities}/content/content.rb +0 -0
- /data/app/components/coco/{shared → utilities}/dropdown/dropdown.css +0 -0
- /data/app/components/coco/{shared → utilities}/dropdown/dropdown.html.erb +0 -0
- /data/app/components/coco/{shared → utilities}/dropdown/dropdown.rb +0 -0
- /data/app/components/coco/{shared → utilities}/placeholder/placeholder.css +0 -0
- /data/app/components/coco/{shared → utilities}/placeholder/placeholder.html.erb +0 -0
- /data/app/components/coco/{shared → utilities}/placeholder/placeholder.rb +0 -0
- /data/app/components/coco/{shared → utilities}/poll_controller/poll_controller.css +0 -0
- /data/app/components/coco/{shared → utilities}/poll_controller/poll_controller.html.erb +0 -0
- /data/app/components/coco/{shared → utilities}/poll_controller/poll_controller.rb +0 -0
@@ -1,16 +0,0 @@
|
|
1
|
-
module Coco
|
2
|
-
module App
|
3
|
-
module Fields
|
4
|
-
class SubmitComponent < ViewComponent::Form::SubmitComponent
|
5
|
-
include Concerns::ActsAsFieldWithOptions
|
6
|
-
include Coco::SharedHelper
|
7
|
-
|
8
|
-
def call
|
9
|
-
coco_button(**options, type: :submit) do
|
10
|
-
content || value
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Coco
|
2
|
-
module App
|
3
|
-
module Layouts
|
4
|
-
class Application < Coco::Component
|
5
|
-
renders_one :flashes
|
6
|
-
renders_one :banner
|
7
|
-
renders_one :header
|
8
|
-
renders_one :sidebar_nav
|
9
|
-
|
10
|
-
component_name :application_layout
|
11
|
-
|
12
|
-
def banner_content?
|
13
|
-
banner.to_s.strip != ""
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,59 +0,0 @@
|
|
1
|
-
module Coco
|
2
|
-
module App
|
3
|
-
module Layouts
|
4
|
-
class Page < Coco::Component
|
5
|
-
include Concerns::AcceptsOptions
|
6
|
-
|
7
|
-
component_name :page_layout
|
8
|
-
|
9
|
-
accepts_option :width, from: [:full, :constrained], default: :constrained
|
10
|
-
|
11
|
-
renders_one :header
|
12
|
-
renders_many :hidden_sections
|
13
|
-
|
14
|
-
renders_many :sections, ->(tag_name = :section, **kwargs, &block) do
|
15
|
-
stack.with_space(@spacing) unless stack.starts_with_spacer?
|
16
|
-
stack.with_item(tag_name, **kwargs) { block&.call }
|
17
|
-
end
|
18
|
-
|
19
|
-
renders_one :previous_link, ->(**kwargs) do
|
20
|
-
Coco::PagerLink.new(**kwargs, direction: :previous, class: "page-control-previous")
|
21
|
-
end
|
22
|
-
|
23
|
-
renders_one :next_link, ->(**kwargs) do
|
24
|
-
Coco::PagerLink.new(**kwargs, direction: :next, class: "page-control-next")
|
25
|
-
end
|
26
|
-
|
27
|
-
renders_one :poll_controller, ->(interval) do
|
28
|
-
Coco::PollController.new(interval: interval)
|
29
|
-
end
|
30
|
-
|
31
|
-
before_render do
|
32
|
-
with_poll_controller(@poll) unless poll_controller? || @poll.nil?
|
33
|
-
with_next_link(href: @next_page) if @next_page
|
34
|
-
with_previous_link(href: @previous_page) if @previous_page
|
35
|
-
|
36
|
-
with_section(class: "contents") { content } if content.present?
|
37
|
-
stack.with_space(@spacing) unless stack.ends_with_spacer?
|
38
|
-
end
|
39
|
-
|
40
|
-
delegate :with_space, to: :stack
|
41
|
-
|
42
|
-
def initialize(spacing: 4, poll: nil, **kwargs)
|
43
|
-
@poll = poll
|
44
|
-
@previous_page = kwargs[:previous]
|
45
|
-
@next_page = kwargs[:next]
|
46
|
-
@spacing = spacing
|
47
|
-
end
|
48
|
-
|
49
|
-
def stack
|
50
|
-
@stack ||= Coco::Stack.new(
|
51
|
-
spacing: @spacing,
|
52
|
-
direction: :vertical,
|
53
|
-
class: "page-body-content"
|
54
|
-
)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
@@ -1,76 +0,0 @@
|
|
1
|
-
module Coco
|
2
|
-
module Book
|
3
|
-
module Blocks
|
4
|
-
module Slides
|
5
|
-
class EditableSlide < Coco::Component
|
6
|
-
include Concerns::AcceptsOptions
|
7
|
-
include Coco::TagHelper
|
8
|
-
include Coco::FormatHelper
|
9
|
-
|
10
|
-
accepts_option :layout, from: %w[one-col-title one-col-text one-col-media two-col-text two-col-media two-col-mixed], default: "one-col-title"
|
11
|
-
|
12
|
-
renders_one :title,
|
13
|
-
->(&block) do
|
14
|
-
@has_content = true
|
15
|
-
block.call
|
16
|
-
end
|
17
|
-
|
18
|
-
renders_one :text_1,
|
19
|
-
->(&block) do
|
20
|
-
@has_content = true
|
21
|
-
block.call
|
22
|
-
end
|
23
|
-
|
24
|
-
renders_one :text_2,
|
25
|
-
->(&block) do
|
26
|
-
@has_content = true
|
27
|
-
block.call
|
28
|
-
end
|
29
|
-
|
30
|
-
renders_one :image_1,
|
31
|
-
->(src: nil, &block) do
|
32
|
-
@has_content = true
|
33
|
-
block ? block.call : tag.img(src: src)
|
34
|
-
end
|
35
|
-
|
36
|
-
renders_one :image_2,
|
37
|
-
->(src: nil, &block) do
|
38
|
-
@has_content = true
|
39
|
-
block ? block.call : tag.img(src: src)
|
40
|
-
end
|
41
|
-
|
42
|
-
before_initialize do |kwargs|
|
43
|
-
if kwargs[:layout]
|
44
|
-
kwargs[:layout] = kwargs[:layout].to_s.tr("_", "-")
|
45
|
-
kwargs[:layout] = "one-col-title" if kwargs[:layout] == "basic" # handle legacy layout name
|
46
|
-
end
|
47
|
-
|
48
|
-
kwargs
|
49
|
-
end
|
50
|
-
|
51
|
-
attr_reader :bg_image, :text_color_hex, :bg_color_hex
|
52
|
-
|
53
|
-
def initialize(bg_image: nil, bg_color_hex: nil, text_color_hex: nil, render_empty: false, **kwargs)
|
54
|
-
@bg_image = bg_image
|
55
|
-
@bg_color_hex = bg_color_hex
|
56
|
-
@text_color_hex = text_color_hex
|
57
|
-
@has_content = false
|
58
|
-
@render_empty = render_empty
|
59
|
-
end
|
60
|
-
|
61
|
-
def render?
|
62
|
-
@has_content || bg_image.present? || @render_empty == true
|
63
|
-
end
|
64
|
-
|
65
|
-
def slide_styles
|
66
|
-
style_str({
|
67
|
-
background_color: format_css_hex_color(bg_color_hex),
|
68
|
-
color: format_css_hex_color(text_color_hex),
|
69
|
-
background_image: ("url('#{bg_image}')" if bg_image)
|
70
|
-
})
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module Coco
|
2
|
-
module Embeds
|
3
|
-
class Youtube < Coco::Component
|
4
|
-
component_name :youtube_embed
|
5
|
-
|
6
|
-
def initialize(url:, **kwargs)
|
7
|
-
@url = url
|
8
|
-
end
|
9
|
-
|
10
|
-
def video_id
|
11
|
-
youtube_url = /youtube.com\/(watch\?v=|v\/)([^&]+)/.match(@url)
|
12
|
-
youtube_url[2] if youtube_url
|
13
|
-
end
|
14
|
-
|
15
|
-
def src
|
16
|
-
"https://www.youtube.com/embed/#{video_id}"
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,141 +0,0 @@
|
|
1
|
-
module Coco
|
2
|
-
module AppHelper
|
3
|
-
def coco_link(*args, **, &block)
|
4
|
-
href, content = if block
|
5
|
-
[args.first, nil]
|
6
|
-
else
|
7
|
-
(args.size == 1) ? [nil, args.first] : args[0..2].reverse!
|
8
|
-
end
|
9
|
-
|
10
|
-
link = Coco::Link.new(href: href, **)
|
11
|
-
link = link.with_content(content) if !block && content.present?
|
12
|
-
|
13
|
-
render(link, &block)
|
14
|
-
end
|
15
|
-
|
16
|
-
def coco_menu_button(**, &block)
|
17
|
-
render Coco::App::Elements::MenuButton.new(**), &block
|
18
|
-
end
|
19
|
-
|
20
|
-
def coco_confirm_button(href = nil, **, &block)
|
21
|
-
render Coco::App::Elements::ConfirmButton.new(href: href, **), &block
|
22
|
-
end
|
23
|
-
|
24
|
-
def coco_color_picker_button(**, &block)
|
25
|
-
render Coco::App::Elements::ColorPickerButton.new(**), &block
|
26
|
-
end
|
27
|
-
|
28
|
-
def coco_image_picker_button(**, &block)
|
29
|
-
render Coco::App::Elements::ImagePickerButton.new(**), &block
|
30
|
-
end
|
31
|
-
|
32
|
-
def coco_layout_picker_button(**, &block)
|
33
|
-
render Coco::App::Elements::LayoutPickerButton.new(**), &block
|
34
|
-
end
|
35
|
-
|
36
|
-
def coco_dropdown_button(**, &block)
|
37
|
-
render Coco::App::Elements::DropdownButton.new(**), &block
|
38
|
-
end
|
39
|
-
|
40
|
-
def coco_toolbar(**, &block)
|
41
|
-
render Coco::App::Elements::Toolbar.new(**), &block
|
42
|
-
end
|
43
|
-
|
44
|
-
def coco_option_bar(**, &block)
|
45
|
-
render Coco::App::Elements::OptionBar.new(**), &block
|
46
|
-
end
|
47
|
-
|
48
|
-
def coco_seamless_textarea(**, &block)
|
49
|
-
render Coco::App::Elements::SeamlessTextarea.new(**), &block
|
50
|
-
end
|
51
|
-
|
52
|
-
def coco_stamp(type = nil, **)
|
53
|
-
props = case type
|
54
|
-
when :success, :positive
|
55
|
-
{icon: :check_circle, theme: :positive}
|
56
|
-
when :error, :negative
|
57
|
-
{icon: :alert_circle, theme: :negative}
|
58
|
-
when :warning
|
59
|
-
{icon: :alert_triangle, theme: :warning}
|
60
|
-
when :info
|
61
|
-
{icon: :info, theme: :info}
|
62
|
-
else
|
63
|
-
{}
|
64
|
-
end
|
65
|
-
|
66
|
-
render Coco::App::Elements::Stamp.new(**props, **)
|
67
|
-
end
|
68
|
-
|
69
|
-
def coco_snackbar(**, &block)
|
70
|
-
render Coco::App::Elements::Snackbar.new(**), &block
|
71
|
-
end
|
72
|
-
|
73
|
-
def coco_notice(**, &block)
|
74
|
-
render Coco::App::Elements::Notice.new(**), &block
|
75
|
-
end
|
76
|
-
|
77
|
-
def coco_toast(**, &block)
|
78
|
-
render Coco::App::Elements::Toast.new(**), &block
|
79
|
-
end
|
80
|
-
|
81
|
-
def coco_system_banner(**, &block)
|
82
|
-
render Coco::App::Elements::SystemBanner.new(**), &block
|
83
|
-
end
|
84
|
-
|
85
|
-
def coco_plan_card(**, &block)
|
86
|
-
render Coco::App::Elements::PlanCard.new(**), &block
|
87
|
-
end
|
88
|
-
|
89
|
-
def coco_panel(**, &block)
|
90
|
-
render Coco::Panel.new(**), &block
|
91
|
-
end
|
92
|
-
|
93
|
-
def coco_form_with(**, &block)
|
94
|
-
form_with(**, builder: Coco::AppFormBuilder, &block)
|
95
|
-
end
|
96
|
-
|
97
|
-
def coco_form_for(*, **, &block)
|
98
|
-
form_for(*, **, builder: Coco::AppFormBuilder, &block)
|
99
|
-
end
|
100
|
-
|
101
|
-
def coco_fields(**, &block)
|
102
|
-
fields(**, builder: Coco::AppFormBuilder, &block)
|
103
|
-
end
|
104
|
-
|
105
|
-
def coco_layout(name, **, &block)
|
106
|
-
render coco_component("app/layouts/#{name}", **), &block
|
107
|
-
end
|
108
|
-
|
109
|
-
def coco_faqs(**, &block)
|
110
|
-
render Coco::App::Blocks::Faqs.new(**), &block
|
111
|
-
end
|
112
|
-
|
113
|
-
def coco_contact_callout(**, &block)
|
114
|
-
render Coco::App::Blocks::ContactCallout.new(**), &block
|
115
|
-
end
|
116
|
-
|
117
|
-
def coco_plan_picker(**, &block)
|
118
|
-
render Coco::App::Blocks::PlanPicker.new(**), &block
|
119
|
-
end
|
120
|
-
|
121
|
-
def coco_app_header(*, **, &block)
|
122
|
-
render Coco::App::Blocks::Header.new(*, **), &block
|
123
|
-
end
|
124
|
-
|
125
|
-
def coco_sidebar_nav(*, **, &block)
|
126
|
-
render Coco::App::Blocks::SidebarNav::Navbar.new(*, **), &block
|
127
|
-
end
|
128
|
-
|
129
|
-
def coco_sidebar_nav_menu(*, **, &block)
|
130
|
-
render Coco::App::Blocks::SidebarNav::Menu.new(*, **), &block
|
131
|
-
end
|
132
|
-
|
133
|
-
def coco_menu_item(type, **, &block)
|
134
|
-
render coco_component("app/elements/menu_items/#{type}", **), &block
|
135
|
-
end
|
136
|
-
|
137
|
-
def coco_page(id, **, &block)
|
138
|
-
render coco_component("app/layouts/page", id: id, **), &block
|
139
|
-
end
|
140
|
-
end
|
141
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
module Coco
|
2
|
-
module BookHelper
|
3
|
-
def coco_editable_slide(**, &block)
|
4
|
-
render Coco::Book::Blocks::Slides::EditableSlide.new(**), &block
|
5
|
-
end
|
6
|
-
|
7
|
-
def coco_media_slide(src = nil, **, &block)
|
8
|
-
render Coco::Book::Blocks::Slides::MediaSlide.new(src: src, **), &block
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module Coco
|
2
|
-
module ComponentHelper
|
3
|
-
include Coco::SharedHelper
|
4
|
-
include Coco::BookHelper
|
5
|
-
include Coco::AppHelper
|
6
|
-
|
7
|
-
def coco_component(name, *, **)
|
8
|
-
resolve_component("coco/#{name}", *, **)
|
9
|
-
end
|
10
|
-
|
11
|
-
def resolve_component(...)
|
12
|
-
Coco::ComponentResolver.new(...)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|