hotwirebits 0.1.0
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 +7 -0
- data/CHANGELOG.md +46 -0
- data/LICENSE +21 -0
- data/README.md +156 -0
- data/app/assets/stylesheets/hotwirebits/theme.css +131 -0
- data/app/assets/stylesheets/hotwirebits/themes/corporate.css +29 -0
- data/app/assets/stylesheets/hotwirebits/themes/midnight.css +29 -0
- data/app/components/hotwirebits/accordion_component.html.erb +23 -0
- data/app/components/hotwirebits/accordion_component.rb +34 -0
- data/app/components/hotwirebits/activity_feed_component.html.erb +40 -0
- data/app/components/hotwirebits/activity_feed_component.rb +11 -0
- data/app/components/hotwirebits/affix_component.html.erb +3 -0
- data/app/components/hotwirebits/affix_component.rb +25 -0
- data/app/components/hotwirebits/ai_chat_component.html.erb +32 -0
- data/app/components/hotwirebits/ai_chat_component.rb +12 -0
- data/app/components/hotwirebits/alert_component.html.erb +32 -0
- data/app/components/hotwirebits/alert_component.rb +39 -0
- data/app/components/hotwirebits/alert_dialog_component.html.erb +30 -0
- data/app/components/hotwirebits/alert_dialog_component.rb +40 -0
- data/app/components/hotwirebits/anchor_component.html.erb +9 -0
- data/app/components/hotwirebits/anchor_component.rb +12 -0
- data/app/components/hotwirebits/angle_slider_component.html.erb +9 -0
- data/app/components/hotwirebits/angle_slider_component.rb +19 -0
- data/app/components/hotwirebits/animated_number_component.html.erb +8 -0
- data/app/components/hotwirebits/animated_number_component.rb +28 -0
- data/app/components/hotwirebits/app_shell_component.html.erb +22 -0
- data/app/components/hotwirebits/app_shell_component.rb +15 -0
- data/app/components/hotwirebits/aspect_ratio_component.html.erb +3 -0
- data/app/components/hotwirebits/aspect_ratio_component.rb +27 -0
- data/app/components/hotwirebits/auth_block_component.html.erb +63 -0
- data/app/components/hotwirebits/auth_block_component.rb +35 -0
- data/app/components/hotwirebits/autocomplete_component.html.erb +5 -0
- data/app/components/hotwirebits/autocomplete_component.rb +45 -0
- data/app/components/hotwirebits/avatar_component.html.erb +18 -0
- data/app/components/hotwirebits/avatar_component.rb +67 -0
- data/app/components/hotwirebits/background_image_component.html.erb +9 -0
- data/app/components/hotwirebits/background_image_component.rb +17 -0
- data/app/components/hotwirebits/badge_component.html.erb +13 -0
- data/app/components/hotwirebits/badge_component.rb +55 -0
- data/app/components/hotwirebits/banner_component.html.erb +31 -0
- data/app/components/hotwirebits/banner_component.rb +36 -0
- data/app/components/hotwirebits/base.rb +13 -0
- data/app/components/hotwirebits/bento_grid_component.html.erb +7 -0
- data/app/components/hotwirebits/bento_grid_component.rb +36 -0
- data/app/components/hotwirebits/blog_section_component.html.erb +35 -0
- data/app/components/hotwirebits/blog_section_component.rb +20 -0
- data/app/components/hotwirebits/bottom_navigation_component.html.erb +21 -0
- data/app/components/hotwirebits/bottom_navigation_component.rb +22 -0
- data/app/components/hotwirebits/box_component.html.erb +3 -0
- data/app/components/hotwirebits/box_component.rb +16 -0
- data/app/components/hotwirebits/breadcrumb_advanced_component.html.erb +53 -0
- data/app/components/hotwirebits/breadcrumb_advanced_component.rb +32 -0
- data/app/components/hotwirebits/breadcrumb_component.html.erb +18 -0
- data/app/components/hotwirebits/breadcrumb_component.rb +11 -0
- data/app/components/hotwirebits/browser_mockup_component.html.erb +22 -0
- data/app/components/hotwirebits/browser_mockup_component.rb +11 -0
- data/app/components/hotwirebits/burger_component.html.erb +20 -0
- data/app/components/hotwirebits/burger_component.rb +29 -0
- data/app/components/hotwirebits/button_component.html.erb +21 -0
- data/app/components/hotwirebits/button_component.rb +84 -0
- data/app/components/hotwirebits/calendar_component.html.erb +70 -0
- data/app/components/hotwirebits/calendar_component.rb +49 -0
- data/app/components/hotwirebits/card_component.html.erb +24 -0
- data/app/components/hotwirebits/card_component.rb +21 -0
- data/app/components/hotwirebits/card_heading_component.html.erb +13 -0
- data/app/components/hotwirebits/card_heading_component.rb +13 -0
- data/app/components/hotwirebits/carousel_component.html.erb +50 -0
- data/app/components/hotwirebits/carousel_component.rb +27 -0
- data/app/components/hotwirebits/center_component.html.erb +3 -0
- data/app/components/hotwirebits/center_component.rb +22 -0
- data/app/components/hotwirebits/chart_component.html.erb +68 -0
- data/app/components/hotwirebits/chart_component.rb +67 -0
- data/app/components/hotwirebits/chat_bubble_component.html.erb +27 -0
- data/app/components/hotwirebits/chat_bubble_component.rb +35 -0
- data/app/components/hotwirebits/checkbox_component.html.erb +9 -0
- data/app/components/hotwirebits/checkbox_component.rb +70 -0
- data/app/components/hotwirebits/checkout_form_component.html.erb +40 -0
- data/app/components/hotwirebits/checkout_form_component.rb +21 -0
- data/app/components/hotwirebits/chip_component.html.erb +13 -0
- data/app/components/hotwirebits/chip_component.rb +51 -0
- data/app/components/hotwirebits/clipboard_component.html.erb +26 -0
- data/app/components/hotwirebits/clipboard_component.rb +19 -0
- data/app/components/hotwirebits/close_button_component.html.erb +3 -0
- data/app/components/hotwirebits/close_button_component.rb +40 -0
- data/app/components/hotwirebits/code_block_component.html.erb +17 -0
- data/app/components/hotwirebits/code_block_component.rb +19 -0
- data/app/components/hotwirebits/code_highlight_component.html.erb +6 -0
- data/app/components/hotwirebits/code_highlight_component.rb +32 -0
- data/app/components/hotwirebits/code_mockup_component.html.erb +13 -0
- data/app/components/hotwirebits/code_mockup_component.rb +19 -0
- data/app/components/hotwirebits/collapsible_component.html.erb +17 -0
- data/app/components/hotwirebits/collapsible_component.rb +11 -0
- data/app/components/hotwirebits/color_input_component.html.erb +19 -0
- data/app/components/hotwirebits/color_input_component.rb +14 -0
- data/app/components/hotwirebits/color_picker_component.html.erb +6 -0
- data/app/components/hotwirebits/color_picker_component.rb +37 -0
- data/app/components/hotwirebits/color_swatch_component.html.erb +1 -0
- data/app/components/hotwirebits/color_swatch_component.rb +18 -0
- data/app/components/hotwirebits/combobox_component.html.erb +15 -0
- data/app/components/hotwirebits/combobox_component.rb +56 -0
- data/app/components/hotwirebits/command_bar_component.html.erb +33 -0
- data/app/components/hotwirebits/command_bar_component.rb +11 -0
- data/app/components/hotwirebits/compare_component.html.erb +21 -0
- data/app/components/hotwirebits/compare_component.rb +17 -0
- data/app/components/hotwirebits/confirm_dialog_component.html.erb +17 -0
- data/app/components/hotwirebits/confirm_dialog_component.rb +23 -0
- data/app/components/hotwirebits/confirm_popup_component.html.erb +16 -0
- data/app/components/hotwirebits/confirm_popup_component.rb +31 -0
- data/app/components/hotwirebits/contact_section_component.html.erb +53 -0
- data/app/components/hotwirebits/contact_section_component.rb +17 -0
- data/app/components/hotwirebits/container_component.html.erb +3 -0
- data/app/components/hotwirebits/container_component.rb +29 -0
- data/app/components/hotwirebits/context_menu_component.html.erb +27 -0
- data/app/components/hotwirebits/context_menu_component.rb +14 -0
- data/app/components/hotwirebits/cookie_consent_component.html.erb +23 -0
- data/app/components/hotwirebits/cookie_consent_component.rb +28 -0
- data/app/components/hotwirebits/cookie_settings_component.html.erb +48 -0
- data/app/components/hotwirebits/cookie_settings_component.rb +10 -0
- data/app/components/hotwirebits/countdown_component.html.erb +8 -0
- data/app/components/hotwirebits/countdown_component.rb +14 -0
- data/app/components/hotwirebits/cta_section_component.html.erb +33 -0
- data/app/components/hotwirebits/cta_section_component.rb +23 -0
- data/app/components/hotwirebits/dashboard_card_component.html.erb +32 -0
- data/app/components/hotwirebits/dashboard_card_component.rb +25 -0
- data/app/components/hotwirebits/data_table_component.html.erb +53 -0
- data/app/components/hotwirebits/data_table_component.rb +40 -0
- data/app/components/hotwirebits/data_view_component.html.erb +21 -0
- data/app/components/hotwirebits/data_view_component.rb +76 -0
- data/app/components/hotwirebits/date_picker_component.html.erb +8 -0
- data/app/components/hotwirebits/date_picker_component.rb +61 -0
- data/app/components/hotwirebits/date_range_picker_component.html.erb +28 -0
- data/app/components/hotwirebits/date_range_picker_component.rb +14 -0
- data/app/components/hotwirebits/device_frame_component.html.erb +40 -0
- data/app/components/hotwirebits/device_frame_component.rb +36 -0
- data/app/components/hotwirebits/device_mockup_component.html.erb +51 -0
- data/app/components/hotwirebits/device_mockup_component.rb +37 -0
- data/app/components/hotwirebits/dialog_component.html.erb +41 -0
- data/app/components/hotwirebits/dialog_component.rb +49 -0
- data/app/components/hotwirebits/diff_component.html.erb +22 -0
- data/app/components/hotwirebits/diff_component.rb +21 -0
- data/app/components/hotwirebits/diff_view_component.html.erb +22 -0
- data/app/components/hotwirebits/diff_view_component.rb +39 -0
- data/app/components/hotwirebits/digital_signature_component.html.erb +21 -0
- data/app/components/hotwirebits/digital_signature_component.rb +14 -0
- data/app/components/hotwirebits/divider_component.html.erb +11 -0
- data/app/components/hotwirebits/divider_component.rb +29 -0
- data/app/components/hotwirebits/dock_menu_component.html.erb +21 -0
- data/app/components/hotwirebits/dock_menu_component.rb +10 -0
- data/app/components/hotwirebits/drag_drop_list_component.html.erb +16 -0
- data/app/components/hotwirebits/drag_drop_list_component.rb +20 -0
- data/app/components/hotwirebits/drawer_component.html.erb +38 -0
- data/app/components/hotwirebits/drawer_component.rb +21 -0
- data/app/components/hotwirebits/dropdown_component.html.erb +27 -0
- data/app/components/hotwirebits/dropdown_component.rb +21 -0
- data/app/components/hotwirebits/dropzone_component.html.erb +16 -0
- data/app/components/hotwirebits/dropzone_component.rb +15 -0
- data/app/components/hotwirebits/empty_cart_component.html.erb +19 -0
- data/app/components/hotwirebits/empty_cart_component.rb +14 -0
- data/app/components/hotwirebits/empty_state_component.html.erb +20 -0
- data/app/components/hotwirebits/empty_state_component.rb +14 -0
- data/app/components/hotwirebits/error_page_component.html.erb +14 -0
- data/app/components/hotwirebits/error_page_component.rb +30 -0
- data/app/components/hotwirebits/faq_section_component.html.erb +26 -0
- data/app/components/hotwirebits/faq_section_component.rb +18 -0
- data/app/components/hotwirebits/feature_section_component.html.erb +27 -0
- data/app/components/hotwirebits/feature_section_component.rb +24 -0
- data/app/components/hotwirebits/feedback_component.html.erb +51 -0
- data/app/components/hotwirebits/feedback_component.rb +23 -0
- data/app/components/hotwirebits/fieldset_component.html.erb +11 -0
- data/app/components/hotwirebits/fieldset_component.rb +21 -0
- data/app/components/hotwirebits/file_browser_component.html.erb +35 -0
- data/app/components/hotwirebits/file_browser_component.rb +11 -0
- data/app/components/hotwirebits/file_input_component.html.erb +7 -0
- data/app/components/hotwirebits/file_input_component.rb +25 -0
- data/app/components/hotwirebits/file_upload_progress_component.html.erb +26 -0
- data/app/components/hotwirebits/file_upload_progress_component.rb +33 -0
- data/app/components/hotwirebits/flex_component.html.erb +3 -0
- data/app/components/hotwirebits/flex_component.rb +37 -0
- data/app/components/hotwirebits/float_label_component.html.erb +4 -0
- data/app/components/hotwirebits/float_label_component.rb +11 -0
- data/app/components/hotwirebits/fluid_component.html.erb +3 -0
- data/app/components/hotwirebits/fluid_component.rb +13 -0
- data/app/components/hotwirebits/flyout_menu_component.html.erb +35 -0
- data/app/components/hotwirebits/flyout_menu_component.rb +25 -0
- data/app/components/hotwirebits/footer_component.html.erb +43 -0
- data/app/components/hotwirebits/footer_component.rb +13 -0
- data/app/components/hotwirebits/form_fieldset_component.html.erb +9 -0
- data/app/components/hotwirebits/form_fieldset_component.rb +11 -0
- data/app/components/hotwirebits/form_group_component.html.erb +31 -0
- data/app/components/hotwirebits/form_group_component.rb +15 -0
- data/app/components/hotwirebits/gallery_component.html.erb +25 -0
- data/app/components/hotwirebits/gallery_component.rb +29 -0
- data/app/components/hotwirebits/grid_component.html.erb +3 -0
- data/app/components/hotwirebits/grid_component.rb +31 -0
- data/app/components/hotwirebits/group_component.html.erb +3 -0
- data/app/components/hotwirebits/group_component.rb +27 -0
- data/app/components/hotwirebits/header_component.html.erb +25 -0
- data/app/components/hotwirebits/header_component.rb +23 -0
- data/app/components/hotwirebits/header_section_component.html.erb +33 -0
- data/app/components/hotwirebits/header_section_component.rb +18 -0
- data/app/components/hotwirebits/hero_component.html.erb +35 -0
- data/app/components/hotwirebits/hero_component.rb +36 -0
- data/app/components/hotwirebits/highlight_component.html.erb +1 -0
- data/app/components/hotwirebits/highlight_component.rb +21 -0
- data/app/components/hotwirebits/hover3d_card_component.html.erb +10 -0
- data/app/components/hotwirebits/hover3d_card_component.rb +16 -0
- data/app/components/hotwirebits/hover_card_component.html.erb +19 -0
- data/app/components/hotwirebits/hover_card_component.rb +35 -0
- data/app/components/hotwirebits/hover_gallery_component.html.erb +23 -0
- data/app/components/hotwirebits/hover_gallery_component.rb +15 -0
- data/app/components/hotwirebits/icon_field_component.html.erb +9 -0
- data/app/components/hotwirebits/icon_field_component.rb +35 -0
- data/app/components/hotwirebits/ifta_label_component.html.erb +4 -0
- data/app/components/hotwirebits/ifta_label_component.rb +11 -0
- data/app/components/hotwirebits/image_compare_component.html.erb +21 -0
- data/app/components/hotwirebits/image_compare_component.rb +19 -0
- data/app/components/hotwirebits/image_component.html.erb +22 -0
- data/app/components/hotwirebits/image_component.rb +23 -0
- data/app/components/hotwirebits/image_zoom_component.html.erb +8 -0
- data/app/components/hotwirebits/image_zoom_component.rb +17 -0
- data/app/components/hotwirebits/incentive_component.html.erb +11 -0
- data/app/components/hotwirebits/incentive_component.rb +16 -0
- data/app/components/hotwirebits/indicator_badge_component.html.erb +8 -0
- data/app/components/hotwirebits/indicator_badge_component.rb +33 -0
- data/app/components/hotwirebits/indicator_component.html.erb +6 -0
- data/app/components/hotwirebits/indicator_component.rb +30 -0
- data/app/components/hotwirebits/inline_edit_component.html.erb +50 -0
- data/app/components/hotwirebits/inline_edit_component.rb +16 -0
- data/app/components/hotwirebits/inplace_component.html.erb +6 -0
- data/app/components/hotwirebits/inplace_component.rb +39 -0
- data/app/components/hotwirebits/input_component.html.erb +13 -0
- data/app/components/hotwirebits/input_component.rb +97 -0
- data/app/components/hotwirebits/input_group_component.html.erb +9 -0
- data/app/components/hotwirebits/input_group_component.rb +38 -0
- data/app/components/hotwirebits/input_number_component.html.erb +14 -0
- data/app/components/hotwirebits/input_number_component.rb +78 -0
- data/app/components/hotwirebits/input_otp_component.html.erb +6 -0
- data/app/components/hotwirebits/input_otp_component.rb +29 -0
- data/app/components/hotwirebits/input_tags_component.html.erb +12 -0
- data/app/components/hotwirebits/input_tags_component.rb +31 -0
- data/app/components/hotwirebits/join_component.html.erb +3 -0
- data/app/components/hotwirebits/join_component.rb +18 -0
- data/app/components/hotwirebits/json_input_component.html.erb +14 -0
- data/app/components/hotwirebits/json_input_component.rb +20 -0
- data/app/components/hotwirebits/kanban_board_component.html.erb +39 -0
- data/app/components/hotwirebits/kanban_board_component.rb +17 -0
- data/app/components/hotwirebits/kbd_component.html.erb +1 -0
- data/app/components/hotwirebits/kbd_component.rb +27 -0
- data/app/components/hotwirebits/knob_component.html.erb +16 -0
- data/app/components/hotwirebits/knob_component.rb +23 -0
- data/app/components/hotwirebits/label_component.html.erb +5 -0
- data/app/components/hotwirebits/label_component.rb +18 -0
- data/app/components/hotwirebits/lightbox_component.html.erb +30 -0
- data/app/components/hotwirebits/lightbox_component.rb +11 -0
- data/app/components/hotwirebits/like_button_component.html.erb +15 -0
- data/app/components/hotwirebits/like_button_component.rb +23 -0
- data/app/components/hotwirebits/list_component.html.erb +3 -0
- data/app/components/hotwirebits/list_component.rb +19 -0
- data/app/components/hotwirebits/listbox_component.html.erb +16 -0
- data/app/components/hotwirebits/listbox_component.rb +52 -0
- data/app/components/hotwirebits/loading_overlay_component.html.erb +12 -0
- data/app/components/hotwirebits/loading_overlay_component.rb +23 -0
- data/app/components/hotwirebits/logo_cloud_component.html.erb +20 -0
- data/app/components/hotwirebits/logo_cloud_component.rb +23 -0
- data/app/components/hotwirebits/logo_item_component.html.erb +7 -0
- data/app/components/hotwirebits/logo_item_component.rb +20 -0
- data/app/components/hotwirebits/mark_component.html.erb +1 -0
- data/app/components/hotwirebits/mark_component.rb +17 -0
- data/app/components/hotwirebits/marquee_component.html.erb +29 -0
- data/app/components/hotwirebits/marquee_component.rb +38 -0
- data/app/components/hotwirebits/mask_component.html.erb +3 -0
- data/app/components/hotwirebits/mask_component.rb +25 -0
- data/app/components/hotwirebits/mega_menu_component.html.erb +43 -0
- data/app/components/hotwirebits/mega_menu_component.rb +11 -0
- data/app/components/hotwirebits/menu_component.html.erb +32 -0
- data/app/components/hotwirebits/menu_component.rb +20 -0
- data/app/components/hotwirebits/menubar_component.html.erb +30 -0
- data/app/components/hotwirebits/menubar_component.rb +10 -0
- data/app/components/hotwirebits/meter_group_component.html.erb +16 -0
- data/app/components/hotwirebits/meter_group_component.rb +36 -0
- data/app/components/hotwirebits/month_picker_component.html.erb +25 -0
- data/app/components/hotwirebits/month_picker_component.rb +51 -0
- data/app/components/hotwirebits/month_picker_input_component.html.erb +20 -0
- data/app/components/hotwirebits/month_picker_input_component.rb +21 -0
- data/app/components/hotwirebits/multiselect_component.html.erb +18 -0
- data/app/components/hotwirebits/multiselect_component.rb +56 -0
- data/app/components/hotwirebits/native_select_component.html.erb +10 -0
- data/app/components/hotwirebits/native_select_component.rb +20 -0
- data/app/components/hotwirebits/nav_link_component.html.erb +9 -0
- data/app/components/hotwirebits/nav_link_component.rb +23 -0
- data/app/components/hotwirebits/navbar_component.html.erb +25 -0
- data/app/components/hotwirebits/navbar_component.rb +26 -0
- data/app/components/hotwirebits/navigation_menu_component.html.erb +43 -0
- data/app/components/hotwirebits/navigation_menu_component.rb +10 -0
- data/app/components/hotwirebits/newsletter_section_component.html.erb +18 -0
- data/app/components/hotwirebits/newsletter_section_component.rb +15 -0
- data/app/components/hotwirebits/notification_bell_component.html.erb +18 -0
- data/app/components/hotwirebits/notification_bell_component.rb +22 -0
- data/app/components/hotwirebits/notification_component.html.erb +28 -0
- data/app/components/hotwirebits/notification_component.rb +23 -0
- data/app/components/hotwirebits/number_formatter_component.html.erb +1 -0
- data/app/components/hotwirebits/number_formatter_component.rb +27 -0
- data/app/components/hotwirebits/number_input_component.html.erb +1 -0
- data/app/components/hotwirebits/number_input_component.rb +32 -0
- data/app/components/hotwirebits/order_summary_component.html.erb +37 -0
- data/app/components/hotwirebits/order_summary_component.rb +23 -0
- data/app/components/hotwirebits/org_chart_component.html.erb +34 -0
- data/app/components/hotwirebits/org_chart_component.rb +14 -0
- data/app/components/hotwirebits/page_heading_component.html.erb +28 -0
- data/app/components/hotwirebits/page_heading_component.rb +18 -0
- data/app/components/hotwirebits/pagination_component.html.erb +29 -0
- data/app/components/hotwirebits/pagination_component.rb +32 -0
- data/app/components/hotwirebits/paginator_component.html.erb +36 -0
- data/app/components/hotwirebits/paginator_component.rb +44 -0
- data/app/components/hotwirebits/panel_component.html.erb +14 -0
- data/app/components/hotwirebits/panel_component.rb +48 -0
- data/app/components/hotwirebits/password_input_component.html.erb +8 -0
- data/app/components/hotwirebits/password_input_component.rb +72 -0
- data/app/components/hotwirebits/password_strength_component.html.erb +18 -0
- data/app/components/hotwirebits/password_strength_component.rb +24 -0
- data/app/components/hotwirebits/password_toggle_component.html.erb +15 -0
- data/app/components/hotwirebits/password_toggle_component.rb +10 -0
- data/app/components/hotwirebits/permission_badge_component.html.erb +15 -0
- data/app/components/hotwirebits/permission_badge_component.rb +33 -0
- data/app/components/hotwirebits/phone_input_component.html.erb +1 -0
- data/app/components/hotwirebits/phone_input_component.rb +29 -0
- data/app/components/hotwirebits/phone_mockup_component.html.erb +12 -0
- data/app/components/hotwirebits/phone_mockup_component.rb +30 -0
- data/app/components/hotwirebits/popover_component.html.erb +20 -0
- data/app/components/hotwirebits/popover_component.rb +45 -0
- data/app/components/hotwirebits/portal_component.html.erb +3 -0
- data/app/components/hotwirebits/portal_component.rb +10 -0
- data/app/components/hotwirebits/pricing_section_component.html.erb +46 -0
- data/app/components/hotwirebits/pricing_section_component.rb +19 -0
- data/app/components/hotwirebits/product_list_component.html.erb +24 -0
- data/app/components/hotwirebits/product_list_component.rb +21 -0
- data/app/components/hotwirebits/product_overview_component.html.erb +59 -0
- data/app/components/hotwirebits/product_overview_component.rb +19 -0
- data/app/components/hotwirebits/product_quickview_component.html.erb +45 -0
- data/app/components/hotwirebits/product_quickview_component.rb +15 -0
- data/app/components/hotwirebits/progress_component.html.erb +10 -0
- data/app/components/hotwirebits/progress_component.rb +49 -0
- data/app/components/hotwirebits/progress_ring_component.html.erb +26 -0
- data/app/components/hotwirebits/progress_ring_component.rb +47 -0
- data/app/components/hotwirebits/promo_section_component.html.erb +31 -0
- data/app/components/hotwirebits/promo_section_component.rb +30 -0
- data/app/components/hotwirebits/qr_code_component.html.erb +19 -0
- data/app/components/hotwirebits/qr_code_component.rb +177 -0
- data/app/components/hotwirebits/radio_component.html.erb +6 -0
- data/app/components/hotwirebits/radio_component.rb +40 -0
- data/app/components/hotwirebits/range_slider_component.html.erb +9 -0
- data/app/components/hotwirebits/range_slider_component.rb +57 -0
- data/app/components/hotwirebits/rating_component.html.erb +11 -0
- data/app/components/hotwirebits/rating_component.rb +53 -0
- data/app/components/hotwirebits/resizable_component.html.erb +19 -0
- data/app/components/hotwirebits/resizable_component.rb +35 -0
- data/app/components/hotwirebits/review_component.html.erb +36 -0
- data/app/components/hotwirebits/review_component.rb +19 -0
- data/app/components/hotwirebits/rich_text_editor_component.html.erb +55 -0
- data/app/components/hotwirebits/rich_text_editor_component.rb +15 -0
- data/app/components/hotwirebits/scroll_area_component.html.erb +3 -0
- data/app/components/hotwirebits/scroll_area_component.rb +28 -0
- data/app/components/hotwirebits/search_component.html.erb +56 -0
- data/app/components/hotwirebits/search_component.rb +21 -0
- data/app/components/hotwirebits/search_input_component.html.erb +6 -0
- data/app/components/hotwirebits/search_input_component.rb +50 -0
- data/app/components/hotwirebits/section_heading_component.html.erb +6 -0
- data/app/components/hotwirebits/section_heading_component.rb +26 -0
- data/app/components/hotwirebits/select_component.html.erb +16 -0
- data/app/components/hotwirebits/select_component.rb +38 -0
- data/app/components/hotwirebits/semi_circle_progress_component.html.erb +9 -0
- data/app/components/hotwirebits/semi_circle_progress_component.rb +52 -0
- data/app/components/hotwirebits/separator_component.html.erb +9 -0
- data/app/components/hotwirebits/separator_component.rb +26 -0
- data/app/components/hotwirebits/sheet_component.html.erb +42 -0
- data/app/components/hotwirebits/sheet_component.rb +44 -0
- data/app/components/hotwirebits/shopping_cart_component.html.erb +46 -0
- data/app/components/hotwirebits/shopping_cart_component.rb +17 -0
- data/app/components/hotwirebits/sidebar_component.html.erb +40 -0
- data/app/components/hotwirebits/sidebar_component.rb +29 -0
- data/app/components/hotwirebits/simple_grid_component.html.erb +3 -0
- data/app/components/hotwirebits/simple_grid_component.rb +23 -0
- data/app/components/hotwirebits/skeleton_card_component.html.erb +15 -0
- data/app/components/hotwirebits/skeleton_card_component.rb +17 -0
- data/app/components/hotwirebits/skeleton_component.html.erb +5 -0
- data/app/components/hotwirebits/skeleton_component.rb +39 -0
- data/app/components/hotwirebits/slider_component.html.erb +3 -0
- data/app/components/hotwirebits/slider_component.rb +34 -0
- data/app/components/hotwirebits/social_share_component.html.erb +20 -0
- data/app/components/hotwirebits/social_share_component.rb +25 -0
- data/app/components/hotwirebits/space_component.html.erb +1 -0
- data/app/components/hotwirebits/space_component.rb +22 -0
- data/app/components/hotwirebits/speed_dial_component.html.erb +24 -0
- data/app/components/hotwirebits/speed_dial_component.rb +41 -0
- data/app/components/hotwirebits/speed_dial_fab_component.html.erb +30 -0
- data/app/components/hotwirebits/speed_dial_fab_component.rb +27 -0
- data/app/components/hotwirebits/spinner_component.html.erb +10 -0
- data/app/components/hotwirebits/spinner_component.rb +20 -0
- data/app/components/hotwirebits/split_button_component.html.erb +20 -0
- data/app/components/hotwirebits/split_button_component.rb +33 -0
- data/app/components/hotwirebits/splitter_component.html.erb +9 -0
- data/app/components/hotwirebits/splitter_component.rb +38 -0
- data/app/components/hotwirebits/spoiler_component.html.erb +17 -0
- data/app/components/hotwirebits/spoiler_component.rb +12 -0
- data/app/components/hotwirebits/stack_component.html.erb +3 -0
- data/app/components/hotwirebits/stack_component.rb +28 -0
- data/app/components/hotwirebits/stacked_list_component.html.erb +20 -0
- data/app/components/hotwirebits/stacked_list_component.rb +18 -0
- data/app/components/hotwirebits/stat_component.html.erb +21 -0
- data/app/components/hotwirebits/stat_component.rb +26 -0
- data/app/components/hotwirebits/stats_component.html.erb +15 -0
- data/app/components/hotwirebits/stats_component.rb +25 -0
- data/app/components/hotwirebits/status_bar_component.html.erb +13 -0
- data/app/components/hotwirebits/status_bar_component.rb +20 -0
- data/app/components/hotwirebits/status_component.html.erb +6 -0
- data/app/components/hotwirebits/status_component.rb +30 -0
- data/app/components/hotwirebits/status_dot_component.html.erb +11 -0
- data/app/components/hotwirebits/status_dot_component.rb +37 -0
- data/app/components/hotwirebits/stepper_form_component.html.erb +55 -0
- data/app/components/hotwirebits/stepper_form_component.rb +23 -0
- data/app/components/hotwirebits/steps_component.html.erb +45 -0
- data/app/components/hotwirebits/steps_component.rb +44 -0
- data/app/components/hotwirebits/swap_component.html.erb +18 -0
- data/app/components/hotwirebits/swap_component.rb +29 -0
- data/app/components/hotwirebits/switch_component.html.erb +9 -0
- data/app/components/hotwirebits/switch_component.rb +51 -0
- data/app/components/hotwirebits/table_component.html.erb +5 -0
- data/app/components/hotwirebits/table_component.rb +27 -0
- data/app/components/hotwirebits/table_of_contents_component.html.erb +12 -0
- data/app/components/hotwirebits/table_of_contents_component.rb +23 -0
- data/app/components/hotwirebits/tabs_component.html.erb +43 -0
- data/app/components/hotwirebits/tabs_component.rb +58 -0
- data/app/components/hotwirebits/tag_component.html.erb +3 -0
- data/app/components/hotwirebits/tag_component.rb +35 -0
- data/app/components/hotwirebits/tag_input_component.html.erb +14 -0
- data/app/components/hotwirebits/tag_input_component.rb +56 -0
- data/app/components/hotwirebits/team_section_component.html.erb +39 -0
- data/app/components/hotwirebits/team_section_component.rb +20 -0
- data/app/components/hotwirebits/terminal_component.html.erb +21 -0
- data/app/components/hotwirebits/terminal_component.rb +11 -0
- data/app/components/hotwirebits/testimonial_component.html.erb +29 -0
- data/app/components/hotwirebits/testimonial_component.rb +22 -0
- data/app/components/hotwirebits/testimonials_section_component.html.erb +34 -0
- data/app/components/hotwirebits/testimonials_section_component.rb +23 -0
- data/app/components/hotwirebits/text_gradient_component.html.erb +3 -0
- data/app/components/hotwirebits/text_gradient_component.rb +18 -0
- data/app/components/hotwirebits/text_rotate_component.html.erb +7 -0
- data/app/components/hotwirebits/text_rotate_component.rb +24 -0
- data/app/components/hotwirebits/textarea_component.html.erb +1 -0
- data/app/components/hotwirebits/textarea_component.rb +35 -0
- data/app/components/hotwirebits/theme_controller_component.html.erb +13 -0
- data/app/components/hotwirebits/theme_controller_component.rb +11 -0
- data/app/components/hotwirebits/theme_icon_component.html.erb +3 -0
- data/app/components/hotwirebits/theme_icon_component.rb +18 -0
- data/app/components/hotwirebits/theme_selector_component.html.erb +27 -0
- data/app/components/hotwirebits/theme_selector_component.rb +11 -0
- data/app/components/hotwirebits/time_picker_component.html.erb +29 -0
- data/app/components/hotwirebits/time_picker_component.rb +28 -0
- data/app/components/hotwirebits/timeline_component.html.erb +24 -0
- data/app/components/hotwirebits/timeline_component.rb +17 -0
- data/app/components/hotwirebits/toast_component.html.erb +34 -0
- data/app/components/hotwirebits/toast_component.rb +47 -0
- data/app/components/hotwirebits/toggle_button_component.html.erb +4 -0
- data/app/components/hotwirebits/toggle_button_component.rb +31 -0
- data/app/components/hotwirebits/toggle_button_group_component.html.erb +8 -0
- data/app/components/hotwirebits/toggle_button_group_component.rb +54 -0
- data/app/components/hotwirebits/toggle_component.html.erb +3 -0
- data/app/components/hotwirebits/toggle_component.rb +38 -0
- data/app/components/hotwirebits/toolbar_component.html.erb +18 -0
- data/app/components/hotwirebits/toolbar_component.rb +50 -0
- data/app/components/hotwirebits/tooltip_component.html.erb +16 -0
- data/app/components/hotwirebits/tooltip_component.rb +32 -0
- data/app/components/hotwirebits/tree_view_component.html.erb +7 -0
- data/app/components/hotwirebits/tree_view_component.rb +47 -0
- data/app/components/hotwirebits/two_factor_component.html.erb +26 -0
- data/app/components/hotwirebits/two_factor_component.rb +14 -0
- data/app/components/hotwirebits/typing_indicator_component.html.erb +5 -0
- data/app/components/hotwirebits/typing_indicator_component.rb +33 -0
- data/app/components/hotwirebits/typography_component.html.erb +3 -0
- data/app/components/hotwirebits/typography_component.rb +35 -0
- data/app/components/hotwirebits/validator_component.html.erb +20 -0
- data/app/components/hotwirebits/validator_component.rb +12 -0
- data/app/components/hotwirebits/version_diff_component.html.erb +17 -0
- data/app/components/hotwirebits/version_diff_component.rb +38 -0
- data/app/components/hotwirebits/video_player_component.html.erb +11 -0
- data/app/components/hotwirebits/video_player_component.rb +29 -0
- data/app/components/hotwirebits/voice_recorder_component.html.erb +29 -0
- data/app/components/hotwirebits/voice_recorder_component.rb +14 -0
- data/app/components/hotwirebits/window_mockup_component.html.erb +20 -0
- data/app/components/hotwirebits/window_mockup_component.rb +11 -0
- data/app/helpers/hotwirebits_helper.rb +738 -0
- data/app/javascript/controllers/hotwirebits/index.js +216 -0
- data/app/javascript/controllers/hotwirebits/rb_accordion_controller.js +16 -0
- data/app/javascript/controllers/hotwirebits/rb_activity_feed_controller.js +11 -0
- data/app/javascript/controllers/hotwirebits/rb_ai_chat_controller.js +21 -0
- data/app/javascript/controllers/hotwirebits/rb_alert_controller.js +24 -0
- data/app/javascript/controllers/hotwirebits/rb_angle_slider_controller.js +11 -0
- data/app/javascript/controllers/hotwirebits/rb_animated_number_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_autocomplete_controller.js +34 -0
- data/app/javascript/controllers/hotwirebits/rb_badge_controller.js +8 -0
- data/app/javascript/controllers/hotwirebits/rb_banner_controller.js +27 -0
- data/app/javascript/controllers/hotwirebits/rb_burger_controller.js +25 -0
- data/app/javascript/controllers/hotwirebits/rb_calendar_controller.js +85 -0
- data/app/javascript/controllers/hotwirebits/rb_carousel_controller.js +74 -0
- data/app/javascript/controllers/hotwirebits/rb_clipboard_controller.js +42 -0
- data/app/javascript/controllers/hotwirebits/rb_code_highlight_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_collapsible_controller.js +51 -0
- data/app/javascript/controllers/hotwirebits/rb_color_input_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_color_picker_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_combobox_controller.js +91 -0
- data/app/javascript/controllers/hotwirebits/rb_command_bar_controller.js +32 -0
- data/app/javascript/controllers/hotwirebits/rb_compare_controller.js +18 -0
- data/app/javascript/controllers/hotwirebits/rb_confirm_dialog_controller.js +11 -0
- data/app/javascript/controllers/hotwirebits/rb_confirm_popup_controller.js +10 -0
- data/app/javascript/controllers/hotwirebits/rb_context_menu_controller.js +27 -0
- data/app/javascript/controllers/hotwirebits/rb_cookie_consent_controller.js +60 -0
- data/app/javascript/controllers/hotwirebits/rb_cookie_settings_controller.js +9 -0
- data/app/javascript/controllers/hotwirebits/rb_countdown_controller.js +60 -0
- data/app/javascript/controllers/hotwirebits/rb_data_view_controller.js +10 -0
- data/app/javascript/controllers/hotwirebits/rb_date_range_controller.js +9 -0
- data/app/javascript/controllers/hotwirebits/rb_datepicker_controller.js +107 -0
- data/app/javascript/controllers/hotwirebits/rb_dialog_controller.js +68 -0
- data/app/javascript/controllers/hotwirebits/rb_drag_drop_controller.js +21 -0
- data/app/javascript/controllers/hotwirebits/rb_drawer_controller.js +69 -0
- data/app/javascript/controllers/hotwirebits/rb_dropdown_controller.js +73 -0
- data/app/javascript/controllers/hotwirebits/rb_feedback_controller.js +50 -0
- data/app/javascript/controllers/hotwirebits/rb_file_browser_controller.js +9 -0
- data/app/javascript/controllers/hotwirebits/rb_highlight_controller.js +47 -0
- data/app/javascript/controllers/hotwirebits/rb_hover_3d_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_hover_card_controller.js +19 -0
- data/app/javascript/controllers/hotwirebits/rb_hover_gallery_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_image_compare_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_image_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_image_zoom_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_inline_edit_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_inplace_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_input_number_controller.js +9 -0
- data/app/javascript/controllers/hotwirebits/rb_json_input_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_kanban_controller.js +78 -0
- data/app/javascript/controllers/hotwirebits/rb_knob_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_lightbox_controller.js +36 -0
- data/app/javascript/controllers/hotwirebits/rb_like_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_listbox_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_marquee_controller.js +68 -0
- data/app/javascript/controllers/hotwirebits/rb_menubar_controller.js +78 -0
- data/app/javascript/controllers/hotwirebits/rb_month_picker_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_month_picker_input_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_multiselect_controller.js +83 -0
- data/app/javascript/controllers/hotwirebits/rb_nav_menu_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_newsletter_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_notification_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_otp_controller.js +54 -0
- data/app/javascript/controllers/hotwirebits/rb_paginator_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_panel_controller.js +12 -0
- data/app/javascript/controllers/hotwirebits/rb_password_controller.js +36 -0
- data/app/javascript/controllers/hotwirebits/rb_password_strength_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_password_toggle_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_popover_controller.js +61 -0
- data/app/javascript/controllers/hotwirebits/rb_portal_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_quickview_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_range_slider_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_rating_controller.js +55 -0
- data/app/javascript/controllers/hotwirebits/rb_resizable_controller.js +82 -0
- data/app/javascript/controllers/hotwirebits/rb_rich_text_editor_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_search_controller.js +70 -0
- data/app/javascript/controllers/hotwirebits/rb_sheet_controller.js +43 -0
- data/app/javascript/controllers/hotwirebits/rb_sidebar_controller.js +66 -0
- data/app/javascript/controllers/hotwirebits/rb_signature_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_speed_dial_controller.js +64 -0
- data/app/javascript/controllers/hotwirebits/rb_splitter_controller.js +27 -0
- data/app/javascript/controllers/hotwirebits/rb_spoiler_controller.js +26 -0
- data/app/javascript/controllers/hotwirebits/rb_stepper_form_controller.js +11 -0
- data/app/javascript/controllers/hotwirebits/rb_steps_controller.js +46 -0
- data/app/javascript/controllers/hotwirebits/rb_swap_controller.js +22 -0
- data/app/javascript/controllers/hotwirebits/rb_switch_controller.js +33 -0
- data/app/javascript/controllers/hotwirebits/rb_tabs_controller.js +46 -0
- data/app/javascript/controllers/hotwirebits/rb_tag_input_controller.js +19 -0
- data/app/javascript/controllers/hotwirebits/rb_tags_controller.js +50 -0
- data/app/javascript/controllers/hotwirebits/rb_text_rotate_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_theme_controller.js +48 -0
- data/app/javascript/controllers/hotwirebits/rb_theme_selector_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_time_picker_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_toast_controller.js +43 -0
- data/app/javascript/controllers/hotwirebits/rb_toggle_button_controller.js +9 -0
- data/app/javascript/controllers/hotwirebits/rb_toggle_button_group_controller.js +12 -0
- data/app/javascript/controllers/hotwirebits/rb_toggle_controller.js +28 -0
- data/app/javascript/controllers/hotwirebits/rb_tooltip_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_tree_controller.js +58 -0
- data/app/javascript/controllers/hotwirebits/rb_two_factor_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_validator_controller.js +7 -0
- data/app/javascript/controllers/hotwirebits/rb_voice_recorder_controller.js +7 -0
- data/app/views/hotwirebits/_accordion.html.erb +26 -0
- data/app/views/hotwirebits/_activity_feed.html.erb +43 -0
- data/app/views/hotwirebits/_affix.html.erb +6 -0
- data/app/views/hotwirebits/_ai_chat.html.erb +35 -0
- data/app/views/hotwirebits/_alert.html.erb +53 -0
- data/app/views/hotwirebits/_alert_dialog.html.erb +33 -0
- data/app/views/hotwirebits/_anchor.html.erb +12 -0
- data/app/views/hotwirebits/_angle_slider.html.erb +12 -0
- data/app/views/hotwirebits/_animated_number.html.erb +11 -0
- data/app/views/hotwirebits/_app_shell.html.erb +25 -0
- data/app/views/hotwirebits/_aspect_ratio.html.erb +6 -0
- data/app/views/hotwirebits/_auth_block.html.erb +66 -0
- data/app/views/hotwirebits/_autocomplete.html.erb +8 -0
- data/app/views/hotwirebits/_avatar.html.erb +32 -0
- data/app/views/hotwirebits/_background_image.html.erb +12 -0
- data/app/views/hotwirebits/_badge.html.erb +32 -0
- data/app/views/hotwirebits/_banner.html.erb +52 -0
- data/app/views/hotwirebits/_bento_grid.html.erb +10 -0
- data/app/views/hotwirebits/_blog_section.html.erb +38 -0
- data/app/views/hotwirebits/_bottom_navigation.html.erb +24 -0
- data/app/views/hotwirebits/_box.html.erb +6 -0
- data/app/views/hotwirebits/_breadcrumb.html.erb +28 -0
- data/app/views/hotwirebits/_breadcrumb_advanced.html.erb +56 -0
- data/app/views/hotwirebits/_browser_mockup.html.erb +25 -0
- data/app/views/hotwirebits/_burger.html.erb +23 -0
- data/app/views/hotwirebits/_button.html.erb +59 -0
- data/app/views/hotwirebits/_calendar.html.erb +73 -0
- data/app/views/hotwirebits/_card.html.erb +23 -0
- data/app/views/hotwirebits/_card_heading.html.erb +16 -0
- data/app/views/hotwirebits/_carousel.html.erb +53 -0
- data/app/views/hotwirebits/_center.html.erb +6 -0
- data/app/views/hotwirebits/_chart.html.erb +71 -0
- data/app/views/hotwirebits/_chat_bubble.html.erb +30 -0
- data/app/views/hotwirebits/_checkbox.html.erb +25 -0
- data/app/views/hotwirebits/_checkout_form.html.erb +43 -0
- data/app/views/hotwirebits/_chip.html.erb +30 -0
- data/app/views/hotwirebits/_clipboard.html.erb +29 -0
- data/app/views/hotwirebits/_close_button.html.erb +6 -0
- data/app/views/hotwirebits/_code_block.html.erb +20 -0
- data/app/views/hotwirebits/_code_highlight.html.erb +9 -0
- data/app/views/hotwirebits/_code_mockup.html.erb +16 -0
- data/app/views/hotwirebits/_collapsible.html.erb +20 -0
- data/app/views/hotwirebits/_color_input.html.erb +22 -0
- data/app/views/hotwirebits/_color_picker.html.erb +9 -0
- data/app/views/hotwirebits/_color_swatch.html.erb +4 -0
- data/app/views/hotwirebits/_combobox.html.erb +18 -0
- data/app/views/hotwirebits/_command_bar.html.erb +36 -0
- data/app/views/hotwirebits/_compare.html.erb +24 -0
- data/app/views/hotwirebits/_confirm_dialog.html.erb +20 -0
- data/app/views/hotwirebits/_confirm_popup.html.erb +19 -0
- data/app/views/hotwirebits/_contact_section.html.erb +56 -0
- data/app/views/hotwirebits/_container.html.erb +21 -0
- data/app/views/hotwirebits/_context_menu.html.erb +30 -0
- data/app/views/hotwirebits/_cookie_consent.html.erb +26 -0
- data/app/views/hotwirebits/_cookie_settings.html.erb +51 -0
- data/app/views/hotwirebits/_countdown.html.erb +11 -0
- data/app/views/hotwirebits/_cta_section.html.erb +36 -0
- data/app/views/hotwirebits/_dashboard_card.html.erb +35 -0
- data/app/views/hotwirebits/_data_table.html.erb +56 -0
- data/app/views/hotwirebits/_data_view.html.erb +24 -0
- data/app/views/hotwirebits/_date_picker.html.erb +11 -0
- data/app/views/hotwirebits/_date_range_picker.html.erb +31 -0
- data/app/views/hotwirebits/_device_frame.html.erb +43 -0
- data/app/views/hotwirebits/_device_mockup.html.erb +54 -0
- data/app/views/hotwirebits/_dialog.html.erb +58 -0
- data/app/views/hotwirebits/_diff.html.erb +25 -0
- data/app/views/hotwirebits/_diff_view.html.erb +25 -0
- data/app/views/hotwirebits/_digital_signature.html.erb +24 -0
- data/app/views/hotwirebits/_divider.html.erb +22 -0
- data/app/views/hotwirebits/_dock_menu.html.erb +24 -0
- data/app/views/hotwirebits/_drag_drop_list.html.erb +19 -0
- data/app/views/hotwirebits/_drawer.html.erb +41 -0
- data/app/views/hotwirebits/_dropdown.html.erb +33 -0
- data/app/views/hotwirebits/_dropzone.html.erb +19 -0
- data/app/views/hotwirebits/_empty_cart.html.erb +22 -0
- data/app/views/hotwirebits/_empty_state.html.erb +29 -0
- data/app/views/hotwirebits/_error_page.html.erb +17 -0
- data/app/views/hotwirebits/_faq_section.html.erb +29 -0
- data/app/views/hotwirebits/_feature_section.html.erb +30 -0
- data/app/views/hotwirebits/_feedback.html.erb +54 -0
- data/app/views/hotwirebits/_fieldset.html.erb +14 -0
- data/app/views/hotwirebits/_file_browser.html.erb +38 -0
- data/app/views/hotwirebits/_file_input.html.erb +10 -0
- data/app/views/hotwirebits/_file_upload_progress.html.erb +29 -0
- data/app/views/hotwirebits/_flex.html.erb +6 -0
- data/app/views/hotwirebits/_float_label.html.erb +7 -0
- data/app/views/hotwirebits/_fluid.html.erb +6 -0
- data/app/views/hotwirebits/_flyout_menu.html.erb +38 -0
- data/app/views/hotwirebits/_footer.html.erb +46 -0
- data/app/views/hotwirebits/_form_group.html.erb +43 -0
- data/app/views/hotwirebits/_gallery.html.erb +28 -0
- data/app/views/hotwirebits/_grid.html.erb +14 -0
- data/app/views/hotwirebits/_group.html.erb +6 -0
- data/app/views/hotwirebits/_header.html.erb +28 -0
- data/app/views/hotwirebits/_header_section.html.erb +36 -0
- data/app/views/hotwirebits/_hero.html.erb +38 -0
- data/app/views/hotwirebits/_highlight.html.erb +4 -0
- data/app/views/hotwirebits/_hover_3d_card.html.erb +13 -0
- data/app/views/hotwirebits/_hover_card.html.erb +22 -0
- data/app/views/hotwirebits/_hover_gallery.html.erb +26 -0
- data/app/views/hotwirebits/_icon_field.html.erb +12 -0
- data/app/views/hotwirebits/_ifta_label.html.erb +7 -0
- data/app/views/hotwirebits/_image.html.erb +22 -0
- data/app/views/hotwirebits/_image_compare.html.erb +24 -0
- data/app/views/hotwirebits/_image_zoom.html.erb +11 -0
- data/app/views/hotwirebits/_incentive.html.erb +14 -0
- data/app/views/hotwirebits/_indicator.html.erb +9 -0
- data/app/views/hotwirebits/_indicator_badge.html.erb +11 -0
- data/app/views/hotwirebits/_inline_edit.html.erb +53 -0
- data/app/views/hotwirebits/_inplace.html.erb +9 -0
- data/app/views/hotwirebits/_input.html.erb +33 -0
- data/app/views/hotwirebits/_input_group.html.erb +12 -0
- data/app/views/hotwirebits/_input_number.html.erb +17 -0
- data/app/views/hotwirebits/_input_otp.html.erb +9 -0
- data/app/views/hotwirebits/_input_tags.html.erb +15 -0
- data/app/views/hotwirebits/_join.html.erb +6 -0
- data/app/views/hotwirebits/_json_input.html.erb +17 -0
- data/app/views/hotwirebits/_kanban_board.html.erb +42 -0
- data/app/views/hotwirebits/_kbd.html.erb +17 -0
- data/app/views/hotwirebits/_knob.html.erb +19 -0
- data/app/views/hotwirebits/_label.html.erb +8 -0
- data/app/views/hotwirebits/_lightbox.html.erb +33 -0
- data/app/views/hotwirebits/_like_button.html.erb +18 -0
- data/app/views/hotwirebits/_list.html.erb +6 -0
- data/app/views/hotwirebits/_listbox.html.erb +19 -0
- data/app/views/hotwirebits/_loading_overlay.html.erb +15 -0
- data/app/views/hotwirebits/_logo_cloud.html.erb +23 -0
- data/app/views/hotwirebits/_logo_item.html.erb +10 -0
- data/app/views/hotwirebits/_mark.html.erb +4 -0
- data/app/views/hotwirebits/_marquee.html.erb +32 -0
- data/app/views/hotwirebits/_mask.html.erb +6 -0
- data/app/views/hotwirebits/_mega_menu.html.erb +46 -0
- data/app/views/hotwirebits/_menu.html.erb +35 -0
- data/app/views/hotwirebits/_menubar.html.erb +33 -0
- data/app/views/hotwirebits/_meter_group.html.erb +19 -0
- data/app/views/hotwirebits/_month_picker.html.erb +28 -0
- data/app/views/hotwirebits/_month_picker_input.html.erb +23 -0
- data/app/views/hotwirebits/_multiselect.html.erb +21 -0
- data/app/views/hotwirebits/_native_select.html.erb +13 -0
- data/app/views/hotwirebits/_nav_link.html.erb +12 -0
- data/app/views/hotwirebits/_navbar.html.erb +30 -0
- data/app/views/hotwirebits/_navigation_menu.html.erb +46 -0
- data/app/views/hotwirebits/_newsletter_section.html.erb +21 -0
- data/app/views/hotwirebits/_notification.html.erb +31 -0
- data/app/views/hotwirebits/_notification_bell.html.erb +21 -0
- data/app/views/hotwirebits/_number_formatter.html.erb +4 -0
- data/app/views/hotwirebits/_number_input.html.erb +4 -0
- data/app/views/hotwirebits/_order_summary.html.erb +40 -0
- data/app/views/hotwirebits/_org_chart.html.erb +37 -0
- data/app/views/hotwirebits/_page_heading.html.erb +31 -0
- data/app/views/hotwirebits/_pagination.html.erb +46 -0
- data/app/views/hotwirebits/_paginator.html.erb +39 -0
- data/app/views/hotwirebits/_panel.html.erb +17 -0
- data/app/views/hotwirebits/_password_input.html.erb +11 -0
- data/app/views/hotwirebits/_password_strength.html.erb +21 -0
- data/app/views/hotwirebits/_password_toggle.html.erb +18 -0
- data/app/views/hotwirebits/_permission_badge.html.erb +18 -0
- data/app/views/hotwirebits/_phone_input.html.erb +4 -0
- data/app/views/hotwirebits/_phone_mockup.html.erb +15 -0
- data/app/views/hotwirebits/_popover.html.erb +23 -0
- data/app/views/hotwirebits/_portal.html.erb +6 -0
- data/app/views/hotwirebits/_pricing.html.erb +55 -0
- data/app/views/hotwirebits/_pricing_section.html.erb +49 -0
- data/app/views/hotwirebits/_product_list.html.erb +27 -0
- data/app/views/hotwirebits/_product_overview.html.erb +62 -0
- data/app/views/hotwirebits/_product_quickview.html.erb +48 -0
- data/app/views/hotwirebits/_progress.html.erb +13 -0
- data/app/views/hotwirebits/_progress_ring.html.erb +29 -0
- data/app/views/hotwirebits/_promo_section.html.erb +34 -0
- data/app/views/hotwirebits/_qr_code.html.erb +22 -0
- data/app/views/hotwirebits/_radio.html.erb +9 -0
- data/app/views/hotwirebits/_range_slider.html.erb +12 -0
- data/app/views/hotwirebits/_rating.html.erb +14 -0
- data/app/views/hotwirebits/_resizable.html.erb +22 -0
- data/app/views/hotwirebits/_review.html.erb +39 -0
- data/app/views/hotwirebits/_rich_text_editor.html.erb +58 -0
- data/app/views/hotwirebits/_scroll_area.html.erb +6 -0
- data/app/views/hotwirebits/_search.html.erb +59 -0
- data/app/views/hotwirebits/_search_input.html.erb +9 -0
- data/app/views/hotwirebits/_section_heading.html.erb +9 -0
- data/app/views/hotwirebits/_select.html.erb +30 -0
- data/app/views/hotwirebits/_semi_circle_progress.html.erb +12 -0
- data/app/views/hotwirebits/_separator.html.erb +18 -0
- data/app/views/hotwirebits/_sheet.html.erb +45 -0
- data/app/views/hotwirebits/_shopping_cart.html.erb +49 -0
- data/app/views/hotwirebits/_sidebar.html.erb +39 -0
- data/app/views/hotwirebits/_simple_grid.html.erb +6 -0
- data/app/views/hotwirebits/_skeleton.html.erb +20 -0
- data/app/views/hotwirebits/_skeleton_card.html.erb +18 -0
- data/app/views/hotwirebits/_slider.html.erb +17 -0
- data/app/views/hotwirebits/_social_share.html.erb +23 -0
- data/app/views/hotwirebits/_space.html.erb +4 -0
- data/app/views/hotwirebits/_speed_dial.html.erb +27 -0
- data/app/views/hotwirebits/_speed_dial_fab.html.erb +33 -0
- data/app/views/hotwirebits/_spinner.html.erb +22 -0
- data/app/views/hotwirebits/_split_button.html.erb +23 -0
- data/app/views/hotwirebits/_splitter.html.erb +12 -0
- data/app/views/hotwirebits/_spoiler.html.erb +20 -0
- data/app/views/hotwirebits/_stack.html.erb +20 -0
- data/app/views/hotwirebits/_stacked_list.html.erb +23 -0
- data/app/views/hotwirebits/_stat.html.erb +24 -0
- data/app/views/hotwirebits/_stats.html.erb +6 -0
- data/app/views/hotwirebits/_status.html.erb +9 -0
- data/app/views/hotwirebits/_status_bar.html.erb +16 -0
- data/app/views/hotwirebits/_status_dot.html.erb +9 -0
- data/app/views/hotwirebits/_stepper_form.html.erb +58 -0
- data/app/views/hotwirebits/_steps.html.erb +48 -0
- data/app/views/hotwirebits/_swap.html.erb +20 -0
- data/app/views/hotwirebits/_switch.html.erb +19 -0
- data/app/views/hotwirebits/_table.html.erb +8 -0
- data/app/views/hotwirebits/_table_of_contents.html.erb +15 -0
- data/app/views/hotwirebits/_tabs.html.erb +44 -0
- data/app/views/hotwirebits/_tag.html.erb +20 -0
- data/app/views/hotwirebits/_tag_input.html.erb +17 -0
- data/app/views/hotwirebits/_team_section.html.erb +42 -0
- data/app/views/hotwirebits/_terminal.html.erb +24 -0
- data/app/views/hotwirebits/_testimonial.html.erb +32 -0
- data/app/views/hotwirebits/_testimonials_section.html.erb +37 -0
- data/app/views/hotwirebits/_text_gradient.html.erb +6 -0
- data/app/views/hotwirebits/_text_rotate.html.erb +10 -0
- data/app/views/hotwirebits/_textarea.html.erb +17 -0
- data/app/views/hotwirebits/_theme_controller.html.erb +16 -0
- data/app/views/hotwirebits/_theme_icon.html.erb +6 -0
- data/app/views/hotwirebits/_theme_selector.html.erb +30 -0
- data/app/views/hotwirebits/_time_picker.html.erb +32 -0
- data/app/views/hotwirebits/_timeline.html.erb +27 -0
- data/app/views/hotwirebits/_toast.html.erb +52 -0
- data/app/views/hotwirebits/_toggle.html.erb +12 -0
- data/app/views/hotwirebits/_toggle_button.html.erb +7 -0
- data/app/views/hotwirebits/_toggle_button_group.html.erb +11 -0
- data/app/views/hotwirebits/_toolbar.html.erb +21 -0
- data/app/views/hotwirebits/_tooltip.html.erb +26 -0
- data/app/views/hotwirebits/_tree_view.html.erb +18 -0
- data/app/views/hotwirebits/_two_factor.html.erb +29 -0
- data/app/views/hotwirebits/_typing_indicator.html.erb +8 -0
- data/app/views/hotwirebits/_typography.html.erb +7 -0
- data/app/views/hotwirebits/_validator.html.erb +23 -0
- data/app/views/hotwirebits/_version_diff.html.erb +20 -0
- data/app/views/hotwirebits/_video_player.html.erb +14 -0
- data/app/views/hotwirebits/_voice_recorder.html.erb +32 -0
- data/app/views/hotwirebits/_window_mockup.html.erb +23 -0
- data/config/routes.rb +4 -0
- data/lib/generators/hotwirebits/component_generator.rb +48 -0
- data/lib/generators/hotwirebits/install_generator.rb +47 -0
- data/lib/generators/hotwirebits/templates/component.html.erb.tt +4 -0
- data/lib/generators/hotwirebits/templates/component.rb.tt +9 -0
- data/lib/generators/hotwirebits/templates/controller.js.tt +6 -0
- data/lib/generators/hotwirebits/templates/theme.css +2 -0
- data/lib/hotwirebits/engine.rb +25 -0
- data/lib/hotwirebits/version.rb +5 -0
- data/lib/hotwirebits.rb +19 -0
- metadata +965 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class AlertComponent < Base
|
|
5
|
+
TYPES = {
|
|
6
|
+
info: {bg: "bg-hw-info/10 text-hw-info border-hw-info/30",
|
|
7
|
+
icon: "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"},
|
|
8
|
+
success: {bg: "bg-hw-success/10 text-hw-success border-hw-success/30",
|
|
9
|
+
icon: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},
|
|
10
|
+
warning: {bg: "bg-hw-warning/10 text-hw-warning border-hw-warning/30",
|
|
11
|
+
icon: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"},
|
|
12
|
+
error: {bg: "bg-hw-destructive/10 text-hw-destructive border-hw-destructive/30",
|
|
13
|
+
icon: "M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"}
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
def initialize(title: nil, message: nil, type: :info, dismissible: false, icon: true, **attrs)
|
|
17
|
+
@title = title
|
|
18
|
+
@message = message
|
|
19
|
+
@type = type
|
|
20
|
+
@dismissible = dismissible
|
|
21
|
+
@icon = icon
|
|
22
|
+
@extra_attrs = attrs
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
private
|
|
26
|
+
|
|
27
|
+
def type_config
|
|
28
|
+
TYPES[@type] || TYPES[:info]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def alert_classes
|
|
32
|
+
merge_classes(
|
|
33
|
+
"relative w-full rounded-lg border p-4",
|
|
34
|
+
type_config[:bg],
|
|
35
|
+
@extra_attrs.delete(:class)
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<div data-controller="hw-dialog"
|
|
2
|
+
data-hw-dialog-open-value="<%= @open %>">
|
|
3
|
+
<div class="fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
4
|
+
data-state="<%= @open ? 'open' : 'closed' %>"
|
|
5
|
+
data-hw-dialog-target="overlay"
|
|
6
|
+
aria-hidden="true"></div>
|
|
7
|
+
<div class="fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border border-hw-border bg-hw-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg"
|
|
8
|
+
data-state="<%= @open ? 'open' : 'closed' %>"
|
|
9
|
+
data-hw-dialog-target="panel"
|
|
10
|
+
role="alertdialog"
|
|
11
|
+
aria-modal="true"
|
|
12
|
+
<%= tag.attributes(@extra_attrs) %>>
|
|
13
|
+
<div class="flex flex-col space-y-2 text-center sm:text-left">
|
|
14
|
+
<% if @title %>
|
|
15
|
+
<h2 class="text-lg font-semibold tracking-tight"><%= @title %></h2>
|
|
16
|
+
<% end %>
|
|
17
|
+
<% if @description %>
|
|
18
|
+
<p class="text-sm text-hw-muted-foreground"><%= @description %></p>
|
|
19
|
+
<% end %>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2">
|
|
22
|
+
<button type="button" class="<%= cancel_classes %>" data-action="click->hw-dialog#close">
|
|
23
|
+
<%= cancel_action? ? cancel_action : @cancel_label %>
|
|
24
|
+
</button>
|
|
25
|
+
<button type="button" class="<%= confirm_classes %>">
|
|
26
|
+
<%= confirm_action? ? confirm_action : @confirm_label %>
|
|
27
|
+
</button>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class AlertDialogComponent < Base
|
|
5
|
+
renders_one :confirm_action
|
|
6
|
+
renders_one :cancel_action
|
|
7
|
+
|
|
8
|
+
VARIANTS = {
|
|
9
|
+
default: "bg-hw-primary text-hw-primary-foreground hover:bg-hw-primary/90",
|
|
10
|
+
destructive: "bg-hw-destructive text-hw-destructive-foreground hover:bg-hw-destructive/90"
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
def initialize(title: nil, description: nil, confirm_label: "Confirm", cancel_label: "Cancel", variant: :default,
|
|
14
|
+
open: false, **attrs)
|
|
15
|
+
@title = title
|
|
16
|
+
@description = description
|
|
17
|
+
@confirm_label = confirm_label
|
|
18
|
+
@cancel_label = cancel_label
|
|
19
|
+
@variant = variant
|
|
20
|
+
@open = open
|
|
21
|
+
@extra_attrs = attrs
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
private
|
|
25
|
+
|
|
26
|
+
def confirm_classes
|
|
27
|
+
merge_classes(
|
|
28
|
+
"inline-flex items-center justify-center rounded-md text-sm font-medium",
|
|
29
|
+
"ring-offset-hw-background transition-colors focus-visible:outline-none focus-visible:ring-2",
|
|
30
|
+
"focus-visible:ring-hw-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
31
|
+
"h-10 px-4 py-2",
|
|
32
|
+
VARIANTS[@variant] || VARIANTS[:default]
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def cancel_classes
|
|
37
|
+
"inline-flex items-center justify-center rounded-md text-sm font-medium border border-hw-input bg-hw-background hover:bg-hw-accent hover:text-hw-accent-foreground h-10 px-4 py-2 ring-offset-hw-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-hw-ring focus-visible:ring-offset-2"
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<a href="<%= @href %>" class="inline-flex items-center gap-1.5 text-sm text-hw-primary hover:text-hw-primary/80 transition-colors scroll-smooth" <%= tag.attributes(@extra_attrs) %>>
|
|
2
|
+
<% if @icon %>
|
|
3
|
+
<span class="h-4 w-4"><%= safe_svg(@icon) %></span>
|
|
4
|
+
<% end %>
|
|
5
|
+
<% if @label %>
|
|
6
|
+
<span><%= @label %></span>
|
|
7
|
+
<% end %>
|
|
8
|
+
<%= content if content %>
|
|
9
|
+
</a>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<div class="<%= container_classes %>" data-controller="hw-angle-slider" data-hw-angle-slider-value-value="<%= @value %>" <%= tag.attributes(@extra_attrs) %>>
|
|
2
|
+
<input type="hidden" name="<%= @name %>" value="<%= @value %>" data-hw-angle-slider-target="hidden">
|
|
3
|
+
<svg width="120" height="120" viewBox="0 0 120 120" class="cursor-pointer" data-hw-angle-slider-target="svg" data-action="mousedown->hw-angle-slider#startDrag touchstart->hw-angle-slider#startDrag">
|
|
4
|
+
<circle cx="60" cy="60" r="50" fill="none" class="stroke-hw-muted" stroke-width="4"/>
|
|
5
|
+
<circle cx="60" cy="60" r="50" fill="none" class="stroke-hw-primary" stroke-width="4" stroke-dasharray="<%= (2 * Math::PI * 50 * @value / 360.0).round(2) %> <%= (2 * Math::PI * 50).round(2) %>" stroke-linecap="round" transform="rotate(-90 60 60)"/>
|
|
6
|
+
<circle cx="<%= (60 + 50 * Math.cos(radians)).round(2) %>" cy="<%= (60 + 50 * Math.sin(radians)).round(2) %>" r="8" fill="currentColor" class="text-hw-primary drop-shadow-sm" data-hw-angle-slider-target="handle"/>
|
|
7
|
+
</svg>
|
|
8
|
+
<span class="text-sm font-medium text-hw-foreground" data-hw-angle-slider-target="label"><%= @value %>°</span>
|
|
9
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class AngleSliderComponent < Base
|
|
5
|
+
def initialize(name: nil, value: 0, **attrs)
|
|
6
|
+
@name = name
|
|
7
|
+
@value = value.to_i.clamp(0, 360)
|
|
8
|
+
@extra_attrs = attrs
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def container_classes
|
|
12
|
+
merge_classes("relative inline-flex flex-col items-center gap-2", @extra_attrs.delete(:class))
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def radians
|
|
16
|
+
(@value - 90) * Math::PI / 180.0
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<span data-controller="hw-animated-number"
|
|
2
|
+
data-hw-animated-number-value-value="<%= @value %>"
|
|
3
|
+
data-hw-animated-number-duration-value="<%= @duration %>"
|
|
4
|
+
data-hw-animated-number-easing-value="<%= easing_value %>"
|
|
5
|
+
class="tabular-nums inline-block"
|
|
6
|
+
<%= tag.attributes(@extra_attrs) %>>
|
|
7
|
+
<%= @prefix %><span data-hw-animated-number-target="output"><%= number_with_delimiter(@value) %></span><%= @suffix %>
|
|
8
|
+
</span>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class AnimatedNumberComponent < Base
|
|
5
|
+
EASINGS = {
|
|
6
|
+
linear: "linear",
|
|
7
|
+
ease: "ease",
|
|
8
|
+
ease_in: "ease-in",
|
|
9
|
+
ease_out: "ease-out",
|
|
10
|
+
ease_in_out: "ease-in-out"
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
def initialize(value: 0, duration: 1000, prefix: "", suffix: "", easing: :ease_out, **attrs)
|
|
14
|
+
@value = value
|
|
15
|
+
@duration = duration
|
|
16
|
+
@prefix = prefix
|
|
17
|
+
@suffix = suffix
|
|
18
|
+
@easing = easing
|
|
19
|
+
@extra_attrs = attrs
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
private
|
|
23
|
+
|
|
24
|
+
def easing_value
|
|
25
|
+
EASINGS[@easing] || EASINGS[:ease_out]
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<div class="flex h-screen flex-col" <%= tag.attributes(@extra_attrs) %>>
|
|
2
|
+
<% if header? %>
|
|
3
|
+
<header class="shrink-0 border-b border-hw-border bg-hw-background">
|
|
4
|
+
<%= header %>
|
|
5
|
+
</header>
|
|
6
|
+
<% end %>
|
|
7
|
+
<div class="flex flex-1 overflow-hidden">
|
|
8
|
+
<% if sidebar? %>
|
|
9
|
+
<aside class="<%= @sidebar_collapsed ? 'w-16' : 'w-64' %> shrink-0 border-r border-hw-border bg-hw-background overflow-y-auto transition-[width] duration-200">
|
|
10
|
+
<%= sidebar %>
|
|
11
|
+
</aside>
|
|
12
|
+
<% end %>
|
|
13
|
+
<main class="flex-1 overflow-y-auto bg-hw-background">
|
|
14
|
+
<%= body? ? body : content %>
|
|
15
|
+
</main>
|
|
16
|
+
</div>
|
|
17
|
+
<% if footer? %>
|
|
18
|
+
<footer class="shrink-0 border-t border-hw-border bg-hw-background">
|
|
19
|
+
<%= footer %>
|
|
20
|
+
</footer>
|
|
21
|
+
<% end %>
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class AppShellComponent < Base
|
|
5
|
+
renders_one :header
|
|
6
|
+
renders_one :sidebar
|
|
7
|
+
renders_one :body
|
|
8
|
+
renders_one :footer
|
|
9
|
+
|
|
10
|
+
def initialize(sidebar_collapsed: false, **attrs)
|
|
11
|
+
@sidebar_collapsed = sidebar_collapsed
|
|
12
|
+
@extra_attrs = attrs
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class AspectRatioComponent < Base
|
|
5
|
+
RATIOS = {
|
|
6
|
+
"16_9" => "aspect-video",
|
|
7
|
+
"4_3" => "aspect-[4/3]",
|
|
8
|
+
"1_1" => "aspect-square",
|
|
9
|
+
"21_9" => "aspect-[21/9]",
|
|
10
|
+
:custom => nil
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
def initialize(ratio: "16_9", custom_ratio: nil, **attrs)
|
|
14
|
+
@ratio = ratio.to_s
|
|
15
|
+
@custom_ratio = custom_ratio
|
|
16
|
+
@extra_attrs = attrs
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def ratio_classes
|
|
20
|
+
merge_classes(
|
|
21
|
+
@custom_ratio ? "aspect-[#{@custom_ratio}]" : RATIOS[@ratio],
|
|
22
|
+
"w-full",
|
|
23
|
+
@extra_attrs.delete(:class)
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<div class="<%= container_classes %>" <%= tag.attributes(@extra_attrs) %>>
|
|
2
|
+
<div class="rounded-xl border border-hw-border bg-hw-card p-8 shadow-sm">
|
|
3
|
+
<div class="text-center mb-6">
|
|
4
|
+
<h2 class="text-2xl font-bold text-hw-foreground">
|
|
5
|
+
<%= sign_up? ? 'Create an account' : 'Welcome back' %>
|
|
6
|
+
</h2>
|
|
7
|
+
<p class="mt-1 text-sm text-hw-muted-foreground">
|
|
8
|
+
<%= sign_up? ? 'Sign up to get started' : 'Sign in to your account' %>
|
|
9
|
+
</p>
|
|
10
|
+
</div>
|
|
11
|
+
<% if @providers.any? %>
|
|
12
|
+
<div class="space-y-2 mb-6">
|
|
13
|
+
<% @providers.each do |provider| %>
|
|
14
|
+
<button type="button"
|
|
15
|
+
class="w-full inline-flex items-center justify-center gap-2 rounded-lg border border-hw-border bg-hw-background h-10 px-4 text-sm font-medium text-hw-foreground hover:bg-hw-muted transition-colors">
|
|
16
|
+
<%= safe_svg(provider_icon(provider)) %>
|
|
17
|
+
Continue with <%= provider.to_s.capitalize %>
|
|
18
|
+
</button>
|
|
19
|
+
<% end %>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="relative mb-6">
|
|
22
|
+
<div class="absolute inset-0 flex items-center">
|
|
23
|
+
<div class="w-full border-t border-hw-border"></div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="relative flex justify-center text-xs"><span class="bg-hw-card px-2 text-hw-muted-foreground">or continue with email</span></div>
|
|
26
|
+
</div>
|
|
27
|
+
<% end %>
|
|
28
|
+
<form action="<%= @action_url %>" method="post" class="space-y-4">
|
|
29
|
+
<% if sign_up? %>
|
|
30
|
+
<div>
|
|
31
|
+
<label for="name" class="block text-sm font-medium text-hw-foreground mb-1.5">Name</label>
|
|
32
|
+
<input type="text" name="name" id="name" placeholder="Your name"
|
|
33
|
+
class="w-full h-10 rounded-lg border border-hw-border bg-hw-background px-3 text-sm text-hw-foreground placeholder:text-hw-muted-foreground focus:outline-none focus:ring-2 focus:ring-hw-ring">
|
|
34
|
+
</div>
|
|
35
|
+
<% end %>
|
|
36
|
+
<div>
|
|
37
|
+
<label for="email" class="block text-sm font-medium text-hw-foreground mb-1.5">Email</label>
|
|
38
|
+
<input type="email" name="email" id="email" placeholder="you@example.com" required
|
|
39
|
+
class="w-full h-10 rounded-lg border border-hw-border bg-hw-background px-3 text-sm text-hw-foreground placeholder:text-hw-muted-foreground focus:outline-none focus:ring-2 focus:ring-hw-ring">
|
|
40
|
+
</div>
|
|
41
|
+
<div>
|
|
42
|
+
<div class="flex items-center justify-between mb-1.5">
|
|
43
|
+
<label for="password" class="block text-sm font-medium text-hw-foreground">Password</label>
|
|
44
|
+
<% if @show_forgot && !sign_up? %>
|
|
45
|
+
<a href="/users/password/new" class="text-xs text-hw-primary hover:underline">Forgot password?</a>
|
|
46
|
+
<% end %>
|
|
47
|
+
</div>
|
|
48
|
+
<input type="password" name="password" id="password" placeholder="••••••••" required
|
|
49
|
+
class="w-full h-10 rounded-lg border border-hw-border bg-hw-background px-3 text-sm text-hw-foreground placeholder:text-hw-muted-foreground focus:outline-none focus:ring-2 focus:ring-hw-ring">
|
|
50
|
+
</div>
|
|
51
|
+
<button type="submit"
|
|
52
|
+
class="w-full inline-flex items-center justify-center rounded-lg bg-hw-primary text-hw-primary-foreground h-10 px-4 text-sm font-medium shadow-sm hover:bg-hw-primary/90 transition-colors">
|
|
53
|
+
<%= sign_up? ? 'Create account' : 'Sign in' %>
|
|
54
|
+
</button>
|
|
55
|
+
</form>
|
|
56
|
+
<p class="mt-6 text-center text-sm text-hw-muted-foreground">
|
|
57
|
+
<%= sign_up? ? 'Already have an account?' : "Don't have an account?" %>
|
|
58
|
+
<a href="<%= sign_up? ? '/users/sign_in' : '/users/sign_up' %>" class="text-hw-primary hover:underline font-medium">
|
|
59
|
+
<%= sign_up? ? 'Sign in' : 'Sign up' %>
|
|
60
|
+
</a>
|
|
61
|
+
</p>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class AuthBlockComponent < Base
|
|
5
|
+
def initialize(type: :sign_in, providers: [], show_forgot: true, action_url: nil, **attrs)
|
|
6
|
+
@type = type
|
|
7
|
+
@providers = providers
|
|
8
|
+
@show_forgot = show_forgot
|
|
9
|
+
@action_url = action_url || ((type == :sign_up) ? "/users" : "/users/sign_in")
|
|
10
|
+
@extra_attrs = attrs
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def sign_up?
|
|
14
|
+
@type == :sign_up
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def container_classes
|
|
18
|
+
merge_classes(
|
|
19
|
+
"w-full max-w-md mx-auto",
|
|
20
|
+
@extra_attrs.delete(:class)
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def provider_icon(provider)
|
|
25
|
+
case provider.to_sym
|
|
26
|
+
when :google
|
|
27
|
+
'<svg class="h-5 w-5" viewBox="0 0 24 24"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z" fill="#4285F4"/><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853"/><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="#FBBC05"/><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335"/></svg>'
|
|
28
|
+
when :github
|
|
29
|
+
'<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24"><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/></svg>'
|
|
30
|
+
when :apple
|
|
31
|
+
'<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24"><path d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/></svg>'
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<div class="relative" data-controller="hw-autocomplete" data-hw-autocomplete-url-value="<%= @url %>" data-hw-autocomplete-min-chars-value="<%= @min_chars %>" <%= tag.attributes(@extra_attrs) %>>
|
|
2
|
+
<input type="text" placeholder="<%= @placeholder %>" value="<%= @value %>" <%= 'disabled' if @disabled %> autocomplete="off" class="flex w-full rounded-md border border-hw-input bg-hw-background px-3 py-2 text-sm text-hw-foreground ring-offset-hw-background placeholder:text-hw-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-hw-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50" data-hw-autocomplete-target="input" data-action="input->hw-autocomplete#search keydown->hw-autocomplete#keydown">
|
|
3
|
+
<ul class="absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-md border border-hw-border bg-hw-popover shadow-md hidden" role="listbox" data-hw-autocomplete-target="results"></ul>
|
|
4
|
+
<input type="hidden" name="<%= @name %>" value="<%= @value %>" data-hw-autocomplete-target="hidden">
|
|
5
|
+
</div>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class AutocompleteComponent < Base
|
|
5
|
+
def initialize(name:, url:, placeholder: "Search...", min_chars: 2, value: nil, disabled: false, **attrs)
|
|
6
|
+
@name = name
|
|
7
|
+
@url = url
|
|
8
|
+
@placeholder = placeholder
|
|
9
|
+
@min_chars = min_chars
|
|
10
|
+
@value = value
|
|
11
|
+
@disabled = disabled
|
|
12
|
+
@extra_attrs = attrs
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
private
|
|
16
|
+
|
|
17
|
+
def input_element
|
|
18
|
+
tag.input(
|
|
19
|
+
type: "text",
|
|
20
|
+
placeholder: @placeholder,
|
|
21
|
+
value: @value,
|
|
22
|
+
disabled: @disabled,
|
|
23
|
+
class: merge_classes(
|
|
24
|
+
"flex w-full rounded-md border border-hw-input bg-hw-background px-3 py-2 text-sm text-hw-foreground",
|
|
25
|
+
"ring-offset-hw-background placeholder:text-hw-muted-foreground",
|
|
26
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-hw-ring focus-visible:ring-offset-2",
|
|
27
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
28
|
+
),
|
|
29
|
+
autocomplete: "off",
|
|
30
|
+
data: {
|
|
31
|
+
rb_autocomplete_target: "input",
|
|
32
|
+
action: "input->hw-autocomplete#search keydown->hw-autocomplete#keydown"
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def results_element
|
|
38
|
+
tag.ul(
|
|
39
|
+
class: "absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-md border border-hw-border bg-hw-popover shadow-md hidden",
|
|
40
|
+
role: "listbox",
|
|
41
|
+
data: {rb_autocomplete_target: "results"}
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<div class="relative inline-flex" <%= tag.attributes(@extra_attrs) %>>
|
|
2
|
+
<% if @src %>
|
|
3
|
+
<img src="<%= @src %>" alt="<%= @alt %>" class="<%= SIZES[@size] || 'h-10 w-10 text-sm' %> rounded-full object-cover">
|
|
4
|
+
<% elsif @initials %>
|
|
5
|
+
<div class="<%= SIZES[@size] || 'h-10 w-10 text-sm' %> rounded-full bg-hw-muted flex items-center justify-center font-medium text-hw-muted-foreground">
|
|
6
|
+
<%= @initials %>
|
|
7
|
+
</div>
|
|
8
|
+
<% else %>
|
|
9
|
+
<div class="<%= SIZES[@size] || 'h-10 w-10 text-sm' %> rounded-full bg-hw-muted flex items-center justify-center text-hw-muted-foreground">
|
|
10
|
+
<svg class="h-[60%] w-[60%]" fill="currentColor" viewBox="0 0 24 24">
|
|
11
|
+
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
|
|
12
|
+
</svg>
|
|
13
|
+
</div>
|
|
14
|
+
<% end %>
|
|
15
|
+
<% if @status %>
|
|
16
|
+
<span class="absolute block h-2.5 w-2.5 rounded-full ring-2 ring-white <%= @status == :online ? 'bg-hw-success' : @status == :busy ? 'bg-hw-destructive' : @status == :away ? 'bg-hw-warning' : 'bg-hw-muted-foreground/60' %> -bottom-0.5 -right-0.5"></span>
|
|
17
|
+
<% end %>
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class AvatarComponent < Base
|
|
5
|
+
SIZES = {
|
|
6
|
+
xs: "h-6 w-6 text-[10px]",
|
|
7
|
+
sm: "h-8 w-8 text-xs",
|
|
8
|
+
md: "h-10 w-10 text-sm",
|
|
9
|
+
lg: "h-12 w-12 text-base",
|
|
10
|
+
xl: "h-16 w-16 text-lg"
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
STATUS_COLORS = {
|
|
14
|
+
online: "bg-hw-success",
|
|
15
|
+
offline: "bg-hw-muted-foreground/60",
|
|
16
|
+
busy: "bg-hw-destructive",
|
|
17
|
+
away: "bg-hw-warning"
|
|
18
|
+
}.freeze
|
|
19
|
+
|
|
20
|
+
def initialize(src: nil, alt: nil, initials: nil, fallback: nil, size: :md, status: nil,
|
|
21
|
+
status_position: :bottom_right, **attrs)
|
|
22
|
+
@src = src
|
|
23
|
+
@alt = alt || ""
|
|
24
|
+
@initials = initials
|
|
25
|
+
@fallback = fallback
|
|
26
|
+
@size = size
|
|
27
|
+
@status = status
|
|
28
|
+
@status_position = status_position
|
|
29
|
+
@extra_attrs = attrs
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
private
|
|
33
|
+
|
|
34
|
+
def avatar_content
|
|
35
|
+
size_classes = SIZES[@size] || SIZES[:md]
|
|
36
|
+
|
|
37
|
+
if @src
|
|
38
|
+
tag.img(src: @src, alt: @alt, class: merge_classes(size_classes, "rounded-full object-cover"))
|
|
39
|
+
elsif @initials
|
|
40
|
+
tag.div(@initials,
|
|
41
|
+
class: merge_classes(size_classes,
|
|
42
|
+
"rounded-full bg-hw-muted flex items-center justify-center font-medium text-hw-muted-foreground"))
|
|
43
|
+
else
|
|
44
|
+
tag.div(class: merge_classes(size_classes,
|
|
45
|
+
"rounded-full bg-hw-muted flex items-center justify-center text-hw-muted-foreground")) do
|
|
46
|
+
tag.svg(class: "h-[60%] w-[60%]", fill: "currentColor", viewBox: "0 0 24 24") do
|
|
47
|
+
tag.path(d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z")
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def status_indicator
|
|
54
|
+
positions = {
|
|
55
|
+
top_right: "-top-0.5 -right-0.5",
|
|
56
|
+
top_left: "-top-0.5 -left-0.5",
|
|
57
|
+
bottom_right: "-bottom-0.5 -right-0.5",
|
|
58
|
+
bottom_left: "-bottom-0.5 -left-0.5"
|
|
59
|
+
}
|
|
60
|
+
tag.span(class: merge_classes(
|
|
61
|
+
"absolute block h-2.5 w-2.5 rounded-full ring-2 ring-white",
|
|
62
|
+
STATUS_COLORS[@status] || STATUS_COLORS[:offline],
|
|
63
|
+
positions[@status_position] || positions[:bottom_right]
|
|
64
|
+
))
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<div class="<%= container_classes %>" <%= tag.attributes(@extra_attrs) %>>
|
|
2
|
+
<div class="absolute inset-0 bg-no-repeat" style="background-image: url('<%= @src %>'); background-size: <%= @size %>; background-position: <%= @position %>;"></div>
|
|
3
|
+
<% if @overlay %>
|
|
4
|
+
<div class="absolute inset-0 bg-black/40"></div>
|
|
5
|
+
<% end %>
|
|
6
|
+
<div class="relative">
|
|
7
|
+
<%= content %>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class BackgroundImageComponent < Base
|
|
5
|
+
def initialize(src:, size: :cover, position: "center", overlay: false, **attrs)
|
|
6
|
+
@src = src
|
|
7
|
+
@size = size
|
|
8
|
+
@position = position
|
|
9
|
+
@overlay = overlay
|
|
10
|
+
@extra_attrs = attrs
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def container_classes
|
|
14
|
+
merge_classes("relative", @extra_attrs.delete(:class))
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div class="<%= badge_classes %>" data-controller="<%= 'hw-badge' if @removable %>" <%= tag.attributes(@extra_attrs) %>>
|
|
2
|
+
<% if @dot %>
|
|
3
|
+
<span class="h-1.5 w-1.5 rounded-full bg-current mr-1"></span>
|
|
4
|
+
<% end %>
|
|
5
|
+
<%= content || @label %>
|
|
6
|
+
<% if @removable %>
|
|
7
|
+
<button type="button" class="ml-1 -mr-0.5 h-3.5 w-3.5 rounded-full p-0.5 hover:bg-white/20 focus:outline-none" data-action="click->hw-badge#dismiss">
|
|
8
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="h-2.5 w-2.5">
|
|
9
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/>
|
|
10
|
+
</svg>
|
|
11
|
+
</button>
|
|
12
|
+
<% end %>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class BadgeComponent < Base
|
|
5
|
+
VARIANTS = {
|
|
6
|
+
default: "border-transparent bg-hw-primary text-hw-primary-foreground",
|
|
7
|
+
secondary: "border-transparent bg-hw-secondary text-hw-secondary-foreground",
|
|
8
|
+
destructive: "border-transparent bg-hw-destructive text-hw-destructive-foreground",
|
|
9
|
+
outline: "text-hw-foreground",
|
|
10
|
+
success: "border-transparent bg-hw-success text-hw-success-foreground",
|
|
11
|
+
warning: "border-transparent bg-hw-warning text-hw-warning-foreground",
|
|
12
|
+
info: "border-transparent bg-hw-info text-hw-info-foreground"
|
|
13
|
+
}.freeze
|
|
14
|
+
|
|
15
|
+
SIZES = {
|
|
16
|
+
sm: "px-1.5 py-0 text-[10px]",
|
|
17
|
+
md: "px-2.5 py-0.5 text-xs",
|
|
18
|
+
lg: "px-3 py-1 text-sm"
|
|
19
|
+
}.freeze
|
|
20
|
+
|
|
21
|
+
def initialize(label: nil, variant: :default, size: :md, dot: false, removable: false, dismiss_url: nil, **attrs)
|
|
22
|
+
@label = label
|
|
23
|
+
@variant = variant
|
|
24
|
+
@size = size
|
|
25
|
+
@dot = dot
|
|
26
|
+
@removable = removable
|
|
27
|
+
@dismiss_url = dismiss_url
|
|
28
|
+
@extra_attrs = attrs
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
private
|
|
32
|
+
|
|
33
|
+
def badge_classes
|
|
34
|
+
merge_classes(
|
|
35
|
+
"inline-flex items-center rounded-full border font-semibold transition-colors",
|
|
36
|
+
"focus:outline-none focus:ring-2 focus:ring-hw-ring focus:ring-offset-2",
|
|
37
|
+
VARIANTS[@variant] || VARIANTS[:default],
|
|
38
|
+
SIZES[@size] || SIZES[:md]
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def dismiss_button
|
|
43
|
+
tag.button(
|
|
44
|
+
type: "button",
|
|
45
|
+
class: "ml-1 -mr-0.5 h-3.5 w-3.5 rounded-full p-0.5 hover:bg-white/20",
|
|
46
|
+
data: {action: "click->hw-badge#dismiss"}
|
|
47
|
+
) do
|
|
48
|
+
tag.svg(xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none",
|
|
49
|
+
stroke: "currentColor", stroke_width: "2", class: "h-2.5 w-2.5") do
|
|
50
|
+
tag.path(stroke_linecap: "round", stroke_linejoin: "round", d: "M6 18L18 6M6 6l12 12")
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|