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,45 @@
|
|
|
1
|
+
<div class="rounded-xl border border-hw-border bg-hw-card overflow-hidden shadow-lg max-w-sm"
|
|
2
|
+
data-controller="hw-quickview"
|
|
3
|
+
<%= tag.attributes(@extra_attrs) %>>
|
|
4
|
+
<% if @image %>
|
|
5
|
+
<div class="relative aspect-square bg-hw-muted">
|
|
6
|
+
<img src="<%= @image %>" alt="<%= @name %>" class="h-full w-full object-cover">
|
|
7
|
+
<button type="button"
|
|
8
|
+
class="absolute top-3 right-3 h-8 w-8 inline-flex items-center justify-center rounded-full bg-hw-background/80 backdrop-blur text-hw-muted-foreground hover:bg-hw-background hover:text-hw-foreground transition-colors cursor-pointer"
|
|
9
|
+
data-action="click->hw-quickview#close"
|
|
10
|
+
aria-label="Close">
|
|
11
|
+
<svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/></svg>
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
14
|
+
<% end %>
|
|
15
|
+
<div class="p-4 space-y-3">
|
|
16
|
+
<div class="flex items-start justify-between gap-2">
|
|
17
|
+
<h3 class="text-base font-semibold text-hw-foreground"><%= @name %></h3>
|
|
18
|
+
<span class="text-lg font-bold text-hw-primary"><%= @price %></span>
|
|
19
|
+
</div>
|
|
20
|
+
<% if @rating %>
|
|
21
|
+
<div class="flex items-center gap-1">
|
|
22
|
+
<% 5.times do |i| %>
|
|
23
|
+
<svg class="h-4 w-4 <%= i < @rating ? 'text-hw-warning' : 'text-hw-muted' %>" xmlns="http://www.w3.org/2000/svg" fill="<%= i < @rating ? 'currentColor' : 'none' %>" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
24
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"/>
|
|
25
|
+
</svg>
|
|
26
|
+
<% end %>
|
|
27
|
+
</div>
|
|
28
|
+
<% end %>
|
|
29
|
+
<% if @description %>
|
|
30
|
+
<p class="text-sm text-hw-muted-foreground line-clamp-2"><%= @description %></p>
|
|
31
|
+
<% end %>
|
|
32
|
+
<div class="flex gap-2 pt-2">
|
|
33
|
+
<button type="button"
|
|
34
|
+
class="flex-1 inline-flex h-9 items-center justify-center rounded-md bg-hw-primary px-4 text-sm font-medium text-hw-primary-foreground hover:bg-hw-primary/90 transition-colors cursor-pointer">
|
|
35
|
+
Add to Cart
|
|
36
|
+
</button>
|
|
37
|
+
<% if @href %>
|
|
38
|
+
<a href="<%= @href %>"
|
|
39
|
+
class="inline-flex h-9 items-center justify-center rounded-md border border-hw-input bg-hw-background px-4 text-sm font-medium text-hw-foreground hover:bg-hw-accent transition-colors">
|
|
40
|
+
Details
|
|
41
|
+
</a>
|
|
42
|
+
<% end %>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class ProductQuickviewComponent < Base
|
|
5
|
+
def initialize(name:, price:, image: nil, description: nil, rating: nil, href: nil, **attrs)
|
|
6
|
+
@name = name
|
|
7
|
+
@price = price
|
|
8
|
+
@image = image
|
|
9
|
+
@description = description
|
|
10
|
+
@rating = rating
|
|
11
|
+
@href = href
|
|
12
|
+
@extra_attrs = attrs
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<div <%= tag.attributes(@extra_attrs) %>>
|
|
2
|
+
<div class="flex items-center justify-between mb-1">
|
|
3
|
+
<% if @show_label %>
|
|
4
|
+
<span class="text-sm font-medium"><%= percentage %>%</span>
|
|
5
|
+
<% end %>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="<%= track_classes %>">
|
|
8
|
+
<div class="<%= bar_classes %>" style="width: <%= percentage %>%;"></div>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class ProgressComponent < Base
|
|
5
|
+
SIZES = {
|
|
6
|
+
sm: "h-1.5",
|
|
7
|
+
md: "h-2.5",
|
|
8
|
+
lg: "h-4"
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
COLORS = {
|
|
12
|
+
default: "bg-hw-primary",
|
|
13
|
+
success: "bg-hw-success",
|
|
14
|
+
warning: "bg-hw-warning",
|
|
15
|
+
destructive: "bg-hw-destructive"
|
|
16
|
+
}.freeze
|
|
17
|
+
|
|
18
|
+
def initialize(value:, max: 100, size: :md, color: :default, show_label: false, animated: false, **attrs)
|
|
19
|
+
@value = value
|
|
20
|
+
@max = max
|
|
21
|
+
@size = size
|
|
22
|
+
@color = color
|
|
23
|
+
@show_label = show_label
|
|
24
|
+
@animated = animated
|
|
25
|
+
@extra_attrs = attrs
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def percentage
|
|
29
|
+
return 0 if @max.zero?
|
|
30
|
+
|
|
31
|
+
[(@value.to_f / @max * 100).round, 100].min
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def track_classes
|
|
35
|
+
merge_classes(
|
|
36
|
+
"w-full overflow-hidden rounded-full bg-hw-muted",
|
|
37
|
+
SIZES[@size] || SIZES[:md]
|
|
38
|
+
)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def bar_classes
|
|
42
|
+
merge_classes(
|
|
43
|
+
"h-full rounded-full transition-all duration-300",
|
|
44
|
+
COLORS[@color] || COLORS[:default],
|
|
45
|
+
@animated ? "animate-pulse" : ""
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<div class="relative inline-flex items-center justify-center" <%= tag.attributes(@extra_attrs) %>>
|
|
2
|
+
<svg width="<%= @size %>" height="<%= @size %>" class="-rotate-90">
|
|
3
|
+
<circle
|
|
4
|
+
cx="<%= center %>"
|
|
5
|
+
cy="<%= center %>"
|
|
6
|
+
r="<%= radius %>"
|
|
7
|
+
fill="none"
|
|
8
|
+
stroke-width="4"
|
|
9
|
+
class="stroke-hw-muted"
|
|
10
|
+
/>
|
|
11
|
+
<circle
|
|
12
|
+
cx="<%= center %>"
|
|
13
|
+
cy="<%= center %>"
|
|
14
|
+
r="<%= radius %>"
|
|
15
|
+
fill="none"
|
|
16
|
+
stroke-width="4"
|
|
17
|
+
stroke-linecap="round"
|
|
18
|
+
stroke-dasharray="<%= circumference %>"
|
|
19
|
+
stroke-dashoffset="<%= stroke_dashoffset %>"
|
|
20
|
+
class="<%= color_class %> transition-all duration-300"
|
|
21
|
+
/>
|
|
22
|
+
</svg>
|
|
23
|
+
<% if @show_label %>
|
|
24
|
+
<span class="absolute text-sm font-medium"><%= percentage %>%</span>
|
|
25
|
+
<% end %>
|
|
26
|
+
</div>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class ProgressRingComponent < Base
|
|
5
|
+
COLORS = {
|
|
6
|
+
default: "stroke-hw-primary",
|
|
7
|
+
success: "stroke-hw-success",
|
|
8
|
+
warning: "stroke-hw-warning",
|
|
9
|
+
destructive: "stroke-hw-destructive"
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
def initialize(value:, max: 100, size: 64, show_label: false, color: :default, **attrs)
|
|
13
|
+
@value = value
|
|
14
|
+
@max = max
|
|
15
|
+
@size = size
|
|
16
|
+
@show_label = show_label
|
|
17
|
+
@color = color
|
|
18
|
+
@extra_attrs = attrs
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def percentage
|
|
22
|
+
return 0 if @max.zero?
|
|
23
|
+
|
|
24
|
+
[(@value.to_f / @max * 100).round, 100].min
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def radius
|
|
28
|
+
(@size - 8) / 2
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def circumference
|
|
32
|
+
2 * Math::PI * radius
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def stroke_dashoffset
|
|
36
|
+
circumference - (percentage / 100.0) * circumference
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def color_class
|
|
40
|
+
COLORS[@color] || COLORS[:default]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def center
|
|
44
|
+
@size / 2
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<section class="<%= section_classes %>" <%= tag.attributes(@extra_attrs) %>>
|
|
2
|
+
<div class="mx-auto grid max-w-7xl items-center gap-8 px-6 py-16 lg:grid-cols-2 lg:gap-16 lg:px-8">
|
|
3
|
+
<div class="flex flex-col items-start gap-4">
|
|
4
|
+
<% if @badge %>
|
|
5
|
+
<span class="inline-flex items-center rounded-full px-3 py-1 text-xs font-semibold ring-1 ring-inset
|
|
6
|
+
<%= @variant == :dark || @variant == :gradient ? 'ring-white/30 text-hw-primary-foreground/90' : 'ring-hw-primary/30 text-hw-primary bg-hw-primary/5' %>">
|
|
7
|
+
<%= @badge %>
|
|
8
|
+
</span>
|
|
9
|
+
<% end %>
|
|
10
|
+
<h2 class="text-3xl font-bold tracking-tight sm:text-4xl"><%= @title %></h2>
|
|
11
|
+
<% if @description %>
|
|
12
|
+
<p class="text-lg opacity-80"><%= @description %></p>
|
|
13
|
+
<% end %>
|
|
14
|
+
<% if @cta %>
|
|
15
|
+
<a href="<%= @cta[:href] %>"
|
|
16
|
+
class="mt-2 inline-flex items-center rounded-lg px-5 py-2.5 text-sm font-semibold transition-colors
|
|
17
|
+
<%= @variant == :dark || @variant == :gradient ? 'bg-white text-hw-foreground hover:bg-white/90' : 'bg-hw-primary text-hw-primary-foreground hover:bg-hw-primary/90' %>">
|
|
18
|
+
<%= @cta[:label] %>
|
|
19
|
+
<svg class="ml-2 h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
|
|
20
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"/>
|
|
21
|
+
</svg>
|
|
22
|
+
</a>
|
|
23
|
+
<% end %>
|
|
24
|
+
</div>
|
|
25
|
+
<% if @image %>
|
|
26
|
+
<div class="relative">
|
|
27
|
+
<img src="<%= @image %>" alt="" class="w-full rounded-xl object-cover shadow-2xl">
|
|
28
|
+
</div>
|
|
29
|
+
<% end %>
|
|
30
|
+
</div>
|
|
31
|
+
</section>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class PromoSectionComponent < Base
|
|
5
|
+
VARIANTS = {
|
|
6
|
+
default: "bg-white",
|
|
7
|
+
dark: "bg-hw-foreground text-hw-background",
|
|
8
|
+
gradient: "bg-gradient-to-br from-hw-primary to-hw-primary/70 text-hw-primary-foreground",
|
|
9
|
+
light: "bg-hw-muted"
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
def initialize(title:, badge: nil, description: nil, cta: nil, image: nil, variant: :default, **attrs)
|
|
13
|
+
@badge = badge
|
|
14
|
+
@title = title
|
|
15
|
+
@description = description
|
|
16
|
+
@cta = cta
|
|
17
|
+
@image = image
|
|
18
|
+
@variant = variant
|
|
19
|
+
@extra_attrs = attrs
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def section_classes
|
|
23
|
+
merge_classes(
|
|
24
|
+
"rounded-2xl overflow-hidden",
|
|
25
|
+
VARIANTS[@variant] || VARIANTS[:default],
|
|
26
|
+
@extra_attrs.delete(:class)
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<% qr = modules %>
|
|
2
|
+
<% total = qr.size + @margin * 2 %>
|
|
3
|
+
<div class="<%= merge_classes('inline-block', @extra_attrs.delete(:class)) %>"
|
|
4
|
+
<%= tag.attributes(@extra_attrs) %>>
|
|
5
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
width="<%= @size %>"
|
|
7
|
+
height="<%= @size %>"
|
|
8
|
+
viewBox="0 0 <%= total %> <%= total %>"
|
|
9
|
+
shape-rendering="crispEdges">
|
|
10
|
+
<rect width="<%= total %>" height="<%= total %>" fill="white"/>
|
|
11
|
+
<% qr.each_with_index do |row, r| %>
|
|
12
|
+
<% row.each_with_index do |cell, c| %>
|
|
13
|
+
<% if cell == 1 %>
|
|
14
|
+
<rect x="<%= c + @margin %>" y="<%= r + @margin %>" width="1" height="1" fill="black"/>
|
|
15
|
+
<% end %>
|
|
16
|
+
<% end %>
|
|
17
|
+
<% end %>
|
|
18
|
+
</svg>
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class QrCodeComponent < Base
|
|
5
|
+
def initialize(value:, size: 200, margin: 4, **attrs)
|
|
6
|
+
@value = value
|
|
7
|
+
@size = size
|
|
8
|
+
@margin = margin
|
|
9
|
+
@extra_attrs = attrs
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def modules
|
|
13
|
+
encode_qr(@value)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
def encode_qr(data)
|
|
19
|
+
# Simplified QR encoding using byte mode, version 2 (25x25)
|
|
20
|
+
# Uses a numeric/alphanumeric detection then byte fallback
|
|
21
|
+
version = determine_version(data.bytesize)
|
|
22
|
+
size = 17 + version * 4
|
|
23
|
+
matrix = Array.new(size) { Array.new(size, 0) }
|
|
24
|
+
reserved = Array.new(size) { Array.new(size, false) }
|
|
25
|
+
|
|
26
|
+
place_finder_patterns(matrix, reserved, size)
|
|
27
|
+
place_timing_patterns(matrix, reserved, size)
|
|
28
|
+
place_alignment_patterns(matrix, reserved, version) if version >= 2
|
|
29
|
+
place_dark_module(matrix, reserved)
|
|
30
|
+
|
|
31
|
+
data_bits = encode_data(data, version)
|
|
32
|
+
place_data(matrix, reserved, data_bits, size)
|
|
33
|
+
|
|
34
|
+
apply_best_mask(matrix, reserved, size)
|
|
35
|
+
|
|
36
|
+
place_format_info(matrix, reserved, size, 0)
|
|
37
|
+
|
|
38
|
+
matrix
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def determine_version(byte_len)
|
|
42
|
+
return 1 if byte_len <= 17
|
|
43
|
+
return 2 if byte_len <= 32
|
|
44
|
+
return 3 if byte_len <= 53
|
|
45
|
+
|
|
46
|
+
4
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def place_finder_patterns(matrix, reserved, size)
|
|
50
|
+
positions = [[0, 0], [0, size - 7], [size - 7, 0]]
|
|
51
|
+
positions.each do |r, c|
|
|
52
|
+
7.times do |i|
|
|
53
|
+
7.times do |j|
|
|
54
|
+
on_edge = [0, 6].include?(i) || j == 0 || j == 6
|
|
55
|
+
in_center = i.between?(2, 4) && j.between?(2, 4)
|
|
56
|
+
matrix[r + i][c + j] = (on_edge || in_center) ? 1 : 0
|
|
57
|
+
reserved[r + i][c + j] = true
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def place_timing_patterns(matrix, reserved, size)
|
|
64
|
+
(8...size - 8).each do |i|
|
|
65
|
+
unless reserved[6][i]
|
|
66
|
+
matrix[6][i] = i.even? ? 1 : 0
|
|
67
|
+
reserved[6][i] = true
|
|
68
|
+
end
|
|
69
|
+
unless reserved[i][6]
|
|
70
|
+
matrix[i][6] = i.even? ? 1 : 0
|
|
71
|
+
reserved[i][6] = true
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def place_alignment_patterns(matrix, reserved, version)
|
|
77
|
+
return if version < 2
|
|
78
|
+
|
|
79
|
+
positions = alignment_positions(version)
|
|
80
|
+
positions.each do |r|
|
|
81
|
+
positions.each do |c|
|
|
82
|
+
next if reserved[r][c]
|
|
83
|
+
|
|
84
|
+
(-2..2).each do |dr|
|
|
85
|
+
(-2..2).each do |dc|
|
|
86
|
+
on_edge = dr.abs == 2 || dc.abs == 2
|
|
87
|
+
center = dr == 0 && dc == 0
|
|
88
|
+
matrix[r + dr][c + dc] = (on_edge || center) ? 1 : 0
|
|
89
|
+
reserved[r + dr][c + dc] = true
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def alignment_positions(version)
|
|
97
|
+
return [6, 18] if version == 2
|
|
98
|
+
return [6, 22] if version == 3
|
|
99
|
+
|
|
100
|
+
[6, 26] if version == 4
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def place_dark_module(matrix, reserved)
|
|
104
|
+
matrix[-8][8] = 1
|
|
105
|
+
reserved[matrix.size - 8][8] = true
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def encode_data(data, version)
|
|
109
|
+
bits = "0100" # byte mode indicator
|
|
110
|
+
char_count = data.bytesize
|
|
111
|
+
cc_bits = (version <= 9) ? 8 : 16
|
|
112
|
+
bits += char_count.to_s(2).rjust(cc_bits, "0")
|
|
113
|
+
data.each_byte { |b| bits += b.to_s(2).rjust(8, "0") }
|
|
114
|
+
cap = data_capacity(version)
|
|
115
|
+
bits += "0" until bits.size >= cap || bits.size % 8 == 0
|
|
116
|
+
pad_bytes = %w[11101100 00010001]
|
|
117
|
+
pi = 0
|
|
118
|
+
bits += pad_bytes[pi % 2] while bits.size < cap && (pi += 1)
|
|
119
|
+
bits
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
def data_capacity(version)
|
|
123
|
+
[128, 224, 352, 512][version - 1]
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
def place_data(matrix, reserved, bits, size)
|
|
127
|
+
bit_idx = 0
|
|
128
|
+
upward = true
|
|
129
|
+
(size - 1).step(1, -2) do |col|
|
|
130
|
+
col -= 1 if col == 6
|
|
131
|
+
size.times do |i|
|
|
132
|
+
r = upward ? (size - 1 - i) : i
|
|
133
|
+
[col, col - 1].each do |c|
|
|
134
|
+
next if reserved[r][c]
|
|
135
|
+
|
|
136
|
+
matrix[r][c] = (bit_idx < bits.size && bits[bit_idx] == "1") ? 1 : 0
|
|
137
|
+
bit_idx += 1
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
upward = !upward
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
def apply_best_mask(matrix, reserved, size)
|
|
145
|
+
mask = ->(r, c) { (r + c).even? }
|
|
146
|
+
size.times do |r|
|
|
147
|
+
size.times do |c|
|
|
148
|
+
next if reserved[r][c]
|
|
149
|
+
|
|
150
|
+
matrix[r][c] ^= 1 if mask.call(r, c)
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
def place_format_info(matrix, _reserved, size, _mask_pattern)
|
|
156
|
+
format_bits = "011010101011100"
|
|
157
|
+
coords1 = (0..5).to_a + [7, 8]
|
|
158
|
+
coords2 = (0..7).reverse_each.to_a
|
|
159
|
+
coords1.each_with_index do |i, j|
|
|
160
|
+
matrix[8][i] = (format_bits[j] == "1") ? 1 : 0
|
|
161
|
+
matrix[i][8] = begin
|
|
162
|
+
(format_bits[j + 7] == "1") ? 1 : 0
|
|
163
|
+
rescue
|
|
164
|
+
nil
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
coords2.each_with_index do |i, j|
|
|
168
|
+
matrix[size - 1 - i][8] = (format_bits[j] == "1") ? 1 : 0
|
|
169
|
+
matrix[8][size - 1 - i] = begin
|
|
170
|
+
(format_bits[j + 7] == "1") ? 1 : 0
|
|
171
|
+
rescue
|
|
172
|
+
nil
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
end
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<label class="flex items-center gap-2 cursor-pointer" <%= tag.attributes(@extra_attrs) %>>
|
|
2
|
+
<input type="radio" name="<%= @name %>" value="<%= @value %>" <%= 'checked' if @checked %> <%= 'disabled' if @disabled %> class="peer aspect-square shrink-0 rounded-full border border-hw-input bg-hw-background text-hw-primary ring-offset-hw-background 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 <%= SIZES[@size] || 'h-4 w-4' %>">
|
|
3
|
+
<% if @label %>
|
|
4
|
+
<span class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"><%= @label %></span>
|
|
5
|
+
<% end %>
|
|
6
|
+
</label>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class RadioComponent < Base
|
|
5
|
+
SIZES = {
|
|
6
|
+
sm: "h-3.5 w-3.5",
|
|
7
|
+
md: "h-4 w-4",
|
|
8
|
+
lg: "h-5 w-5"
|
|
9
|
+
}.freeze
|
|
10
|
+
|
|
11
|
+
def initialize(name: nil, value: nil, checked: false, disabled: false, label: nil, size: :md, **attrs)
|
|
12
|
+
@name = name
|
|
13
|
+
@value = value
|
|
14
|
+
@checked = checked
|
|
15
|
+
@disabled = disabled
|
|
16
|
+
@label = label
|
|
17
|
+
@size = size
|
|
18
|
+
@extra_attrs = attrs
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
private
|
|
22
|
+
|
|
23
|
+
def input_element
|
|
24
|
+
tag.input(
|
|
25
|
+
type: "radio",
|
|
26
|
+
name: @name,
|
|
27
|
+
value: @value,
|
|
28
|
+
checked: @checked,
|
|
29
|
+
disabled: @disabled,
|
|
30
|
+
class: merge_classes(
|
|
31
|
+
"peer aspect-square shrink-0 rounded-full border border-hw-input bg-hw-background text-hw-primary",
|
|
32
|
+
"ring-offset-hw-background focus-visible:outline-none focus-visible:ring-2",
|
|
33
|
+
"focus-visible:ring-hw-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
34
|
+
SIZES[@size] || SIZES[:md]
|
|
35
|
+
),
|
|
36
|
+
**@extra_attrs
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<% left_pct = ((@value_min - @min).to_f / [@max - @min, 1].max) * 100 %>
|
|
2
|
+
<% width_pct = ((@value_max - @value_min).to_f / [@max - @min, 1].max) * 100 %>
|
|
3
|
+
<div class="relative w-full h-6" data-controller="hw-range-slider" data-hw-range-slider-min-value="<%= @min %>" data-hw-range-slider-max-value="<%= @max %>" <%= tag.attributes(@extra_attrs) %>>
|
|
4
|
+
<div class="absolute top-1/2 -translate-y-1/2 h-2 w-full rounded-full bg-hw-muted">
|
|
5
|
+
<div class="absolute h-full rounded-full bg-hw-primary" style="left: <%= left_pct %>%; width: <%= width_pct %>%" data-hw-range-slider-target="track"></div>
|
|
6
|
+
</div>
|
|
7
|
+
<input type="range" name="<%= @name_min %>" value="<%= @value_min %>" min="<%= @min %>" max="<%= @max %>" step="<%= @step %>" <%= 'disabled' if @disabled %> class="absolute top-0 left-0 w-full h-2 appearance-none bg-transparent pointer-events-none [&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-hw-primary [&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-hw-background [&::-webkit-slider-thumb]:shadow [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-hw-primary [&::-moz-range-thumb]:cursor-pointer [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-hw-background z-10" data-action="input->hw-range-slider#min" data-hw-range-slider-target="min">
|
|
8
|
+
<input type="range" name="<%= @name_max %>" value="<%= @value_max %>" min="<%= @min %>" max="<%= @max %>" step="<%= @step %>" <%= 'disabled' if @disabled %> class="absolute top-0 left-0 w-full h-2 appearance-none bg-transparent pointer-events-none [&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-hw-primary [&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-hw-background [&::-webkit-slider-thumb]:shadow [&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-hw-primary [&::-moz-range-thumb]:cursor-pointer [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-hw-background z-20" data-action="input->hw-range-slider#max" data-hw-range-slider-target="max">
|
|
9
|
+
</div>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class RangeSliderComponent < Base
|
|
5
|
+
def initialize(name_min: "min", name_max: "max", min: 0, max: 100, value_min: 25, value_max: 75, step: 1,
|
|
6
|
+
disabled: false, **attrs)
|
|
7
|
+
@name_min = name_min
|
|
8
|
+
@name_max = name_max
|
|
9
|
+
@min = min.to_i
|
|
10
|
+
@max = max.to_i
|
|
11
|
+
@value_min = value_min.to_i
|
|
12
|
+
@value_max = value_max.to_i
|
|
13
|
+
@step = step.to_i
|
|
14
|
+
@disabled = disabled
|
|
15
|
+
@extra_attrs = attrs
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
private
|
|
19
|
+
|
|
20
|
+
def track_element
|
|
21
|
+
left_pct = ((@value_min - @min).to_f / [@max - @min, 1].max) * 100
|
|
22
|
+
width_pct = ((@value_max - @value_min).to_f / [@max - @min, 1].max) * 100
|
|
23
|
+
|
|
24
|
+
tag.div(class: "absolute top-1/2 -translate-y-1/2 h-2 w-full rounded-full bg-hw-muted") do
|
|
25
|
+
tag.div(
|
|
26
|
+
class: "absolute h-full rounded-full bg-hw-primary",
|
|
27
|
+
style: "left: #{left_pct}%; width: #{width_pct}%",
|
|
28
|
+
data: {rb_range_slider_target: "track"}
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def input_element(which)
|
|
34
|
+
value = (which == :min) ? @value_min : @value_max
|
|
35
|
+
tag.input(
|
|
36
|
+
type: "range",
|
|
37
|
+
name: (which == :min) ? @name_min : @name_max,
|
|
38
|
+
value: value,
|
|
39
|
+
min: @min,
|
|
40
|
+
max: @max,
|
|
41
|
+
step: @step,
|
|
42
|
+
disabled: @disabled,
|
|
43
|
+
class: input_classes(which),
|
|
44
|
+
data: {action: "input->hw-range-slider##{which}", rb_range_slider_target: which.to_s}
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def input_classes(which)
|
|
49
|
+
merge_classes(
|
|
50
|
+
"absolute top-0 left-0 w-full h-2 appearance-none bg-transparent pointer-events-none",
|
|
51
|
+
"[&::-webkit-slider-thumb]:pointer-events-auto [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-hw-primary [&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-hw-background [&::-webkit-slider-thumb]:shadow",
|
|
52
|
+
"[&::-moz-range-thumb]:pointer-events-auto [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-hw-primary [&::-moz-range-thumb]:cursor-pointer [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-hw-background [&::-moz-range-thumb]:shadow",
|
|
53
|
+
(which == :min) ? "z-10" : "z-20"
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<div class="flex items-center gap-0.5" data-controller="hw-rating" <%= tag.attributes(@extra_attrs) %>
|
|
2
|
+
<input type="hidden" name="<%= @name %>" value="<%= @value %>" data-hw-rating-target="input">
|
|
3
|
+
<% @max.times do |i| %>
|
|
4
|
+
<% filled = (i + 1) <= @value %>
|
|
5
|
+
<button type="button" class="cursor-pointer <%= filled ? 'text-hw-warning' : 'text-hw-muted-foreground' %>" <%= 'disabled' if @readonly %> data-action="<%= 'click->hw-rating#select' unless @readonly %>" data-value="<%= i + 1 %>">
|
|
6
|
+
<svg class="<%= SIZES[@size] || 'h-5 w-5' %>" fill="<%= filled ? 'currentColor' : 'none' %>" stroke="currentColor" viewBox="0 0 24 24">
|
|
7
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"/>
|
|
8
|
+
</svg>
|
|
9
|
+
</button>
|
|
10
|
+
<% end %>
|
|
11
|
+
</div>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module HotwireBits
|
|
4
|
+
class RatingComponent < Base
|
|
5
|
+
SIZES = {
|
|
6
|
+
sm: "h-4 w-4",
|
|
7
|
+
md: "h-5 w-5",
|
|
8
|
+
lg: "h-6 w-6",
|
|
9
|
+
xl: "h-8 w-8"
|
|
10
|
+
}.freeze
|
|
11
|
+
|
|
12
|
+
def initialize(name: nil, value: 0, max: 5, size: :md, readonly: false, allow_half: false, icon: :star, **attrs)
|
|
13
|
+
@name = name
|
|
14
|
+
@value = value
|
|
15
|
+
@max = max
|
|
16
|
+
@size = size
|
|
17
|
+
@readonly = readonly
|
|
18
|
+
@allow_half = allow_half
|
|
19
|
+
@icon = icon
|
|
20
|
+
@extra_attrs = attrs
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
private
|
|
24
|
+
|
|
25
|
+
def hidden_input
|
|
26
|
+
tag.input(type: "hidden", name: @name, value: @value, data: {rb_rating_target: "input"})
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def star_button(index)
|
|
30
|
+
filled = index <= @value
|
|
31
|
+
tag.button(
|
|
32
|
+
type: "button",
|
|
33
|
+
class: merge_classes("text-hw-muted-foreground", filled ? "text-hw-warning" : ""),
|
|
34
|
+
data: {action: @readonly ? nil : "click->hw-rating#select", value: index},
|
|
35
|
+
disabled: @readonly
|
|
36
|
+
) do
|
|
37
|
+
if @icon == :star
|
|
38
|
+
tag.svg(class: SIZES[@size] || SIZES[:md], fill: filled ? "currentColor" : "none", stroke: "currentColor",
|
|
39
|
+
viewBox: "0 0 24 24") do
|
|
40
|
+
tag.path(stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "1.5",
|
|
41
|
+
d: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z")
|
|
42
|
+
end
|
|
43
|
+
else
|
|
44
|
+
tag.svg(class: SIZES[@size] || SIZES[:md], fill: filled ? "currentColor" : "none", stroke: "currentColor",
|
|
45
|
+
viewBox: "0 0 24 24") do
|
|
46
|
+
tag.path(stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "1.5",
|
|
47
|
+
d: "M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z")
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<div data-controller="hw-resizable" class="<%= container_classes %>" <%= tag.attributes(@extra_attrs) %>>
|
|
2
|
+
<% if @direction == :horizontal %>
|
|
3
|
+
<div class="<%= panel_classes %>" data-hw-resizable-target="panel1">
|
|
4
|
+
<%= left %>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="<%= handle_classes %>" data-hw-resizable-target="handle" data-action="pointerdown->hw-resizable#startResize"></div>
|
|
7
|
+
<div class="<%= panel_classes %>" data-hw-resizable-target="panel2">
|
|
8
|
+
<%= right %>
|
|
9
|
+
</div>
|
|
10
|
+
<% else %>
|
|
11
|
+
<div class="<%= panel_classes %>" data-hw-resizable-target="panel1">
|
|
12
|
+
<%= top %>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="<%= handle_classes %>" data-hw-resizable-target="handle" data-action="pointerdown->hw-resizable#startResize"></div>
|
|
15
|
+
<div class="<%= panel_classes %>" data-hw-resizable-target="panel2">
|
|
16
|
+
<%= bottom %>
|
|
17
|
+
</div>
|
|
18
|
+
<% end %>
|
|
19
|
+
</div>
|