coveragebook_components 0.12.2 → 0.13.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/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/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 +1 -0
- data/app/components/coco/{shared → modals}/modal_dialog/modal_dialog.js +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 +251 -258
- 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_dialog/modal_dialog.rb +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,4 +1,4 @@
|
|
1
|
-
<%= render component_tag(x: {data: x_data("
|
1
|
+
<%= render component_tag(x: {data: x_data("imagePicker", {src: src}), ":class": "hasImage && 'has-image'"}) do %>
|
2
2
|
<div class="picker-file-name" x-show="hasImage">
|
3
3
|
<label x-text="name"></label>
|
4
4
|
</div>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { CocoComponent } from "@assets/js/
|
1
|
+
import { CocoComponent } from "@assets/js/base/coco";
|
2
2
|
import { getComponent } from "@helpers/alpine";
|
3
3
|
import { basename } from "@helpers/path";
|
4
4
|
|
5
|
-
export default CocoComponent("
|
5
|
+
export default CocoComponent("imagePicker", ({ src }) => {
|
6
6
|
return {
|
7
7
|
image: {
|
8
8
|
name: basename(src),
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Coco
|
2
|
+
class ImagePicker < Coco::Component
|
3
|
+
include Concerns::AcceptsOptions
|
4
|
+
|
5
|
+
accepts_option :size, from: [:sm, :md, nil], default: :sm
|
6
|
+
|
7
|
+
renders_one :blank_state_text
|
8
|
+
|
9
|
+
before_render do
|
10
|
+
args[:resize]&.each { set_tag_data_attr("size-#{_1}", _2) }
|
11
|
+
end
|
12
|
+
|
13
|
+
attr_reader :uploader_args, :src
|
14
|
+
|
15
|
+
def initialize(src: nil, accept: "image/*", **kwargs)
|
16
|
+
@src = src
|
17
|
+
@uploader_args = {accept: accept}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { CocoComponent } from "@assets/js/
|
1
|
+
import { CocoComponent } from "@assets/js/base/coco";
|
2
2
|
|
3
|
-
export default CocoComponent("
|
3
|
+
export default CocoComponent("seamlessTextarea", () => {
|
4
4
|
return {
|
5
5
|
height: null,
|
6
6
|
observer: null,
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Coco
|
2
|
+
class SeamlessTextarea < Coco::Component
|
3
|
+
include TagHelper
|
4
|
+
include Concerns::AcceptsOptions
|
5
|
+
|
6
|
+
accepts_option :multiline, from: [true, false]
|
7
|
+
accepts_option :focus, from: [true, false]
|
8
|
+
|
9
|
+
attr_reader :placeholder
|
10
|
+
|
11
|
+
def initialize(textarea: nil, value: nil, placeholder: nil, **kwargs)
|
12
|
+
@textarea_args = textarea.to_h
|
13
|
+
@value = value
|
14
|
+
@placeholder = placeholder
|
15
|
+
end
|
16
|
+
|
17
|
+
def multiline?
|
18
|
+
get_option_value(:multiline)
|
19
|
+
end
|
20
|
+
|
21
|
+
def value
|
22
|
+
(@value.presence || content.presence || "").strip_heredoc.strip
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Coco
|
2
|
+
module AppComponentsHelper
|
3
|
+
def coco_plan_card(**, &block)
|
4
|
+
render Coco::App::PlanCard.new(**), &block
|
5
|
+
end
|
6
|
+
|
7
|
+
def coco_faqs(**, &block)
|
8
|
+
render Coco::App::Faqs.new(**), &block
|
9
|
+
end
|
10
|
+
|
11
|
+
def coco_contact_callout(**, &block)
|
12
|
+
render Coco::App::ContactCallout.new(**), &block
|
13
|
+
end
|
14
|
+
|
15
|
+
def coco_plan_picker(**, &block)
|
16
|
+
render Coco::App::PlanPicker.new(**), &block
|
17
|
+
end
|
18
|
+
|
19
|
+
def coco_app_header(*, **, &block)
|
20
|
+
render Coco::App::Header.new(*, **), &block
|
21
|
+
end
|
22
|
+
|
23
|
+
def coco_sidebar_nav(*, **, &block)
|
24
|
+
render Coco::App::SidebarNav::Navbar.new(*, **), &block
|
25
|
+
end
|
26
|
+
|
27
|
+
def coco_sidebar_nav_menu(*, **, &block)
|
28
|
+
render Coco::App::SidebarNav::Menu.new(*, **), &block
|
29
|
+
end
|
30
|
+
|
31
|
+
def coco_app_layout(**, &block)
|
32
|
+
render Coco::App::ApplicationLayout.new(**), &block
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Coco
|
2
|
+
module BookComponentsHelper
|
3
|
+
def coco_editable_slide(**, &block)
|
4
|
+
render Coco::Book::EditableSlide.new(**), &block
|
5
|
+
end
|
6
|
+
|
7
|
+
def coco_media_slide(src = nil, **, &block)
|
8
|
+
render Coco::Book::MediaSlide.new(src: src, **), &block
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,257 @@
|
|
1
|
+
module Coco
|
2
|
+
module CoreComponentsHelper
|
3
|
+
include ActionView::Helpers::UrlHelper
|
4
|
+
|
5
|
+
# Buttons
|
6
|
+
|
7
|
+
def coco_button(*args, **kwargs, &block)
|
8
|
+
href, content = if block
|
9
|
+
[args.first, nil]
|
10
|
+
else
|
11
|
+
(args.size == 1) ? [nil, args.first] : args[0..2].reverse!
|
12
|
+
end
|
13
|
+
|
14
|
+
button = if kwargs.key?(:action) || kwargs.key?(:method) || kwargs.key?(:params)
|
15
|
+
"Coco::ButtonTo"
|
16
|
+
else
|
17
|
+
"Coco::Button"
|
18
|
+
end
|
19
|
+
|
20
|
+
component = button.constantize.new(href: href, **kwargs)
|
21
|
+
component = component.with_content(content) if !block && content.present?
|
22
|
+
|
23
|
+
render(component, &block)
|
24
|
+
end
|
25
|
+
|
26
|
+
def coco_button_group(**, &block)
|
27
|
+
render Coco::ButtonGroup.new(**), &block
|
28
|
+
end
|
29
|
+
|
30
|
+
def coco_menu_button(**, &block)
|
31
|
+
render Coco::MenuButton.new(**), &block
|
32
|
+
end
|
33
|
+
|
34
|
+
def coco_menu_item(type, **, &block)
|
35
|
+
render coco_component("menu_items/#{type}", **), &block
|
36
|
+
end
|
37
|
+
|
38
|
+
def coco_confirm_button(href = nil, **, &block)
|
39
|
+
render Coco::ConfirmButton.new(href: href, **), &block
|
40
|
+
end
|
41
|
+
|
42
|
+
def coco_color_picker_button(**, &block)
|
43
|
+
render Coco::ColorPickerButton.new(**), &block
|
44
|
+
end
|
45
|
+
|
46
|
+
def coco_image_picker_button(**, &block)
|
47
|
+
render Coco::ImagePickerButton.new(**), &block
|
48
|
+
end
|
49
|
+
|
50
|
+
def coco_layout_picker_button(**, &block)
|
51
|
+
render Coco::LayoutPickerButton.new(**), &block
|
52
|
+
end
|
53
|
+
|
54
|
+
def coco_toolbar(**, &block)
|
55
|
+
render Coco::Toolbar.new(**), &block
|
56
|
+
end
|
57
|
+
|
58
|
+
def coco_option_bar(**, &block)
|
59
|
+
render Coco::OptionBar.new(**), &block
|
60
|
+
end
|
61
|
+
|
62
|
+
# Embeds
|
63
|
+
|
64
|
+
def coco_embed(platform, url = nil, **)
|
65
|
+
case platform
|
66
|
+
when :youtube
|
67
|
+
render Coco::YoutubeEmbed.new(url: url, **)
|
68
|
+
else
|
69
|
+
raise ArgumentError, "`#{platform}` is not a valid embed type"
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Forms (WIP)
|
74
|
+
|
75
|
+
def coco_form_with(**, &block)
|
76
|
+
form_with(**, builder: Coco::AppFormBuilder, &block)
|
77
|
+
end
|
78
|
+
|
79
|
+
def coco_form_for(*, **, &block)
|
80
|
+
form_for(*, **, builder: Coco::AppFormBuilder, &block)
|
81
|
+
end
|
82
|
+
|
83
|
+
def coco_fields(**, &block)
|
84
|
+
fields(**, builder: Coco::AppFormBuilder, &block)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Images
|
88
|
+
|
89
|
+
def coco_svg(path = nil, **)
|
90
|
+
render Coco::Svg.new(path: path, **)
|
91
|
+
end
|
92
|
+
|
93
|
+
def coco_image(src = nil, **)
|
94
|
+
render Coco::Image.new(src: src, **)
|
95
|
+
end
|
96
|
+
|
97
|
+
def coco_avatar(src, name = nil, **)
|
98
|
+
render Coco::Avatar.new(src: src, name: name, **)
|
99
|
+
end
|
100
|
+
|
101
|
+
def coco_icon(icon_name = nil, **, &block)
|
102
|
+
render Coco::Icon.new(name: icon_name, **), &block
|
103
|
+
end
|
104
|
+
|
105
|
+
# Indicators
|
106
|
+
|
107
|
+
def coco_stamp(type = nil, **)
|
108
|
+
props = case type
|
109
|
+
when :success, :positive
|
110
|
+
{icon: :check_circle, theme: :positive}
|
111
|
+
when :error, :negative
|
112
|
+
{icon: :alert_circle, theme: :negative}
|
113
|
+
when :warning
|
114
|
+
{icon: :alert_triangle, theme: :warning}
|
115
|
+
when :info
|
116
|
+
{icon: :info, theme: :info}
|
117
|
+
else
|
118
|
+
{}
|
119
|
+
end
|
120
|
+
|
121
|
+
render Coco::Stamp.new(**props, **)
|
122
|
+
end
|
123
|
+
|
124
|
+
def coco_badge(text, **)
|
125
|
+
render Coco::Badge.new(**).with_content(text)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Layout
|
129
|
+
|
130
|
+
def coco_spacer(size = Coco::Spacer::DEFAULT, **)
|
131
|
+
render Coco::Spacer.new(size:, **)
|
132
|
+
end
|
133
|
+
alias_method :space, :coco_spacer
|
134
|
+
|
135
|
+
def coco_stack(spacing: Coco::Spacer::DEFAULT, **, &block)
|
136
|
+
render Coco::Stack.new(spacing:, **), &block
|
137
|
+
end
|
138
|
+
|
139
|
+
def coco_panel(**, &block)
|
140
|
+
render Coco::Panel.new(**), &block
|
141
|
+
end
|
142
|
+
|
143
|
+
def coco_page(id, **, &block)
|
144
|
+
render Coco::Page.new(id: id, **), &block
|
145
|
+
end
|
146
|
+
|
147
|
+
# Messaging
|
148
|
+
|
149
|
+
def coco_notice(**, &block)
|
150
|
+
render Coco::Notice.new(**), &block
|
151
|
+
end
|
152
|
+
|
153
|
+
def coco_snackbar(**, &block)
|
154
|
+
render Coco::Snackbar.new(**), &block
|
155
|
+
end
|
156
|
+
|
157
|
+
def coco_toast(**, &block)
|
158
|
+
render Coco::Toast.new(**), &block
|
159
|
+
end
|
160
|
+
|
161
|
+
def coco_system_banner(**, &block)
|
162
|
+
render Coco::SystemBanner.new(**), &block
|
163
|
+
end
|
164
|
+
|
165
|
+
# Modals
|
166
|
+
|
167
|
+
def coco_modal(name = "default", **, &block)
|
168
|
+
render(Coco::Modal.new(name: name, **), &block)
|
169
|
+
end
|
170
|
+
|
171
|
+
def coco_modal_dialog(name = "default", **, &block)
|
172
|
+
render(Coco::Modal.new(name: name, **)) do |modal|
|
173
|
+
modal.with_container_dialog(&block)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
def coco_modal_lightbox(name = "default", scroll_top: nil, **, &block)
|
178
|
+
render(Coco::Modal.new(name: name, scroll_top: scroll_top, **)) do |modal|
|
179
|
+
modal.with_container_lightbox(&block)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
# Navigation
|
184
|
+
|
185
|
+
def coco_link(*args, **, &block)
|
186
|
+
href, content = if block
|
187
|
+
[args.first, nil]
|
188
|
+
else
|
189
|
+
(args.size == 1) ? [nil, args.first] : args[0..2].reverse!
|
190
|
+
end
|
191
|
+
|
192
|
+
link = Coco::Link.new(href: href, **)
|
193
|
+
link = link.with_content(content) if !block && content.present?
|
194
|
+
|
195
|
+
render(link, &block)
|
196
|
+
end
|
197
|
+
|
198
|
+
def coco_link_to(name = nil, options = nil, html_options = nil, &block)
|
199
|
+
html_options, options, name = options, name, block if block
|
200
|
+
options ||= {}
|
201
|
+
html_options = Coco::ActionViewHelper.convert_options_to_data_attributes(options, html_options)
|
202
|
+
|
203
|
+
href = Coco::ActionViewHelper.url_target(name, options)
|
204
|
+
|
205
|
+
if block
|
206
|
+
coco_link(href, **html_options.symbolize_keys!, &block)
|
207
|
+
else
|
208
|
+
coco_link(name, href, **html_options.symbolize_keys!)
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
def coco_button_to(name = nil, options = nil, html_options = nil, &block)
|
213
|
+
html_options, options = options, name if block
|
214
|
+
options ||= {}
|
215
|
+
html_options ||= {}
|
216
|
+
html_options.symbolize_keys!
|
217
|
+
|
218
|
+
button = Coco::ButtonTo.new(action: options, type: :submit, **html_options)
|
219
|
+
button = button.with_content(name) unless block
|
220
|
+
render(button, &block)
|
221
|
+
end
|
222
|
+
|
223
|
+
def coco_pager_button(direction, **, &block)
|
224
|
+
render Coco::PagerButton.new(direction:, **), &block
|
225
|
+
end
|
226
|
+
|
227
|
+
# Typography
|
228
|
+
|
229
|
+
def coco_prose(**, &block)
|
230
|
+
render Coco::Prose.new(**), &block
|
231
|
+
end
|
232
|
+
|
233
|
+
def coco_seamless_textarea(**, &block)
|
234
|
+
render Coco::SeamlessTextarea.new(**), &block
|
235
|
+
end
|
236
|
+
|
237
|
+
# Utilties (internal)
|
238
|
+
|
239
|
+
def coco_placeholder(text_content = nil, **, &block)
|
240
|
+
render Coco::Placeholder.new(text_content:, **), &block
|
241
|
+
end
|
242
|
+
|
243
|
+
# General
|
244
|
+
|
245
|
+
def coco_tag(*, **, &block)
|
246
|
+
render Coco::Tag.new(*, **), &block
|
247
|
+
end
|
248
|
+
|
249
|
+
def coco_component(name, *, **)
|
250
|
+
resolve_component("coco/#{name}", *, **)
|
251
|
+
end
|
252
|
+
|
253
|
+
def resolve_component(...)
|
254
|
+
Coco::ComponentResolver.new(...)
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
data/app/helpers/coco/helpers.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
module Coco
|
2
|
+
module ModalHelper
|
3
|
+
def coco_modal_frame_id(name = "default")
|
4
|
+
"coco-modal-frame-#{name.to_s.dasherize}"
|
5
|
+
end
|
6
|
+
|
7
|
+
def coco_modal_data_attributes(name = "default")
|
8
|
+
return {} if name.nil?
|
9
|
+
{
|
10
|
+
turbo: true,
|
11
|
+
turbo_frame: coco_modal_frame_id(name)
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
# Deprecated, do not use
|
16
|
+
def coco_link_to_modal(*, data: {}, modal: nil, **kwargs, &)
|
17
|
+
kwargs[:data] = coco_modal_data_attributes(modal || "default").merge(data)
|
18
|
+
|
19
|
+
coco_link_to(*, **kwargs, &)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/config/locales/coco.en.yml
CHANGED
@@ -1,24 +1,23 @@
|
|
1
1
|
en:
|
2
2
|
coco:
|
3
3
|
app:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
saving_label: "Saving..."
|
4
|
+
slide_editor:
|
5
|
+
bg_color_picker:
|
6
|
+
label: "Background colour"
|
7
|
+
bg_image_picker:
|
8
|
+
label: "Background image"
|
9
|
+
blank_state: "Drag a jpg, png or gif onto the slide area or..."
|
10
|
+
text_color_picker:
|
11
|
+
label: "Text colour"
|
12
|
+
layout_picker:
|
13
|
+
label: "Layout"
|
14
|
+
undo_button:
|
15
|
+
tooltip: "Undo"
|
16
|
+
redo_button:
|
17
|
+
tooltip: "Redo"
|
18
|
+
save_button:
|
19
|
+
label: "Save"
|
20
|
+
saving_label: "Saving..."
|
22
21
|
test:
|
23
22
|
translatable:
|
24
23
|
greeting: "Hello"
|
@@ -1,6 +1,8 @@
|
|
1
1
|
/** @type {import('tailwindcss').Config} */
|
2
2
|
|
3
|
+
const defaultTheme = require("tailwindcss/defaultTheme");
|
3
4
|
const { cocoPath } = require("./utils.cjs");
|
5
|
+
const { fontSize, fontFamily, colors, screens } = require("./tokens.cjs");
|
4
6
|
|
5
7
|
module.exports = {
|
6
8
|
content: [
|
@@ -15,7 +17,15 @@ module.exports = {
|
|
15
17
|
],
|
16
18
|
blocklist: ["container"],
|
17
19
|
theme: {
|
20
|
+
colors,
|
21
|
+
screens,
|
22
|
+
fontFamily: {
|
23
|
+
display: [fontFamily.displaySans, ...defaultTheme.fontFamily.sans],
|
24
|
+
body: [fontFamily.bodySans, ...defaultTheme.fontFamily.sans],
|
25
|
+
branded: [fontFamily.displaySerif, ...defaultTheme.fontFamily.serif],
|
26
|
+
},
|
18
27
|
extend: {
|
28
|
+
fontSize,
|
19
29
|
containers: {
|
20
30
|
"slide-fluid": "700px",
|
21
31
|
},
|
data/config/tokens.cjs
CHANGED
@@ -219,29 +219,15 @@ const fontSize = {
|
|
219
219
|
};
|
220
220
|
|
221
221
|
module.exports = {
|
222
|
-
|
223
|
-
colors
|
224
|
-
|
225
|
-
...colorAliases,
|
226
|
-
},
|
227
|
-
screens,
|
228
|
-
fontSize,
|
229
|
-
fontFamily: {
|
230
|
-
displaySans: "proxima-nova",
|
231
|
-
bodySans: "proxima-nova",
|
232
|
-
displaySerif: "merriweather",
|
233
|
-
},
|
222
|
+
colors: {
|
223
|
+
...colors,
|
224
|
+
...colorAliases,
|
234
225
|
},
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
fontSize,
|
242
|
-
fontFamily: {
|
243
|
-
displaySans: "proxima-nova",
|
244
|
-
bodySans: "proxima-nova",
|
245
|
-
},
|
226
|
+
screens,
|
227
|
+
fontSize,
|
228
|
+
fontFamily: {
|
229
|
+
displaySans: "proxima-nova",
|
230
|
+
bodySans: "proxima-nova",
|
231
|
+
displaySerif: "merriweather",
|
246
232
|
},
|
247
233
|
};
|
data/lib/coco/engine.rb
CHANGED
@@ -7,7 +7,7 @@ module Coco
|
|
7
7
|
class Engine < ::Rails::Engine
|
8
8
|
isolate_namespace Coco
|
9
9
|
|
10
|
-
COLLAPSE_DIRS = %w[shared]
|
10
|
+
COLLAPSE_DIRS = %w[shared layout messaging pickers buttons modals navigation utilities typography images indicators embeds]
|
11
11
|
|
12
12
|
config.autoload_paths += %W[
|
13
13
|
#{root}/app/components
|
@@ -22,11 +22,11 @@ module Coco
|
|
22
22
|
autoloader.collapse("#{coco_dir}/#{path}")
|
23
23
|
end
|
24
24
|
|
25
|
-
Dir.glob("#{coco_dir}/
|
25
|
+
Dir.glob("#{coco_dir}/{#{COLLAPSE_DIRS.join(",")}}/**/*.rb").each do |path|
|
26
26
|
autoloader.collapse(File.dirname(path))
|
27
27
|
end
|
28
28
|
|
29
|
-
Dir.glob("#{coco_dir}/{app,book}
|
29
|
+
Dir.glob("#{coco_dir}/{app,book}/**/*.rb").each do |path|
|
30
30
|
autoloader.collapse(File.dirname(path))
|
31
31
|
end
|
32
32
|
end
|
data/lib/coco.rb
CHANGED