fernandes-ui 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/MIT-LICENSE +20 -0
- data/README.md +392 -0
- data/Rakefile +6 -0
- data/app/assets/javascripts/ui.esm.js +14385 -0
- data/app/assets/javascripts/ui.js +13990 -0
- data/app/assets/stylesheets/ui/application.css +584 -0
- data/app/assets/stylesheets/ui/sonner.css +610 -0
- data/app/behaviors/ui/accordion_behavior.rb +30 -0
- data/app/behaviors/ui/accordion_content_behavior.rb +72 -0
- data/app/behaviors/ui/accordion_item_behavior.rb +47 -0
- data/app/behaviors/ui/accordion_trigger_behavior.rb +79 -0
- data/app/behaviors/ui/alert_behavior.rb +44 -0
- data/app/behaviors/ui/alert_description_behavior.rb +32 -0
- data/app/behaviors/ui/alert_dialog_action_behavior.rb +27 -0
- data/app/behaviors/ui/alert_dialog_behavior.rb +41 -0
- data/app/behaviors/ui/alert_dialog_cancel_behavior.rb +27 -0
- data/app/behaviors/ui/alert_dialog_content_behavior.rb +42 -0
- data/app/behaviors/ui/alert_dialog_description_behavior.rb +25 -0
- data/app/behaviors/ui/alert_dialog_footer_behavior.rb +26 -0
- data/app/behaviors/ui/alert_dialog_header_behavior.rb +25 -0
- data/app/behaviors/ui/alert_dialog_overlay_behavior.rb +68 -0
- data/app/behaviors/ui/alert_dialog_title_behavior.rb +25 -0
- data/app/behaviors/ui/alert_dialog_trigger_behavior.rb +39 -0
- data/app/behaviors/ui/alert_title_behavior.rb +32 -0
- data/app/behaviors/ui/aspect_ratio_behavior.rb +47 -0
- data/app/behaviors/ui/avatar_behavior.rb +43 -0
- data/app/behaviors/ui/avatar_fallback_behavior.rb +43 -0
- data/app/behaviors/ui/avatar_image_behavior.rb +46 -0
- data/app/behaviors/ui/badge_behavior.rb +50 -0
- data/app/behaviors/ui/blockquote_behavior.rb +23 -0
- data/app/behaviors/ui/breadcrumb_behavior.rb +22 -0
- data/app/behaviors/ui/breadcrumb_ellipsis_behavior.rb +34 -0
- data/app/behaviors/ui/breadcrumb_item_behavior.rb +32 -0
- data/app/behaviors/ui/breadcrumb_link_behavior.rb +33 -0
- data/app/behaviors/ui/breadcrumb_list_behavior.rb +32 -0
- data/app/behaviors/ui/breadcrumb_page_behavior.rb +35 -0
- data/app/behaviors/ui/breadcrumb_separator_behavior.rb +34 -0
- data/app/behaviors/ui/button_behavior.rb +99 -0
- data/app/behaviors/ui/button_group_behavior.rb +55 -0
- data/app/behaviors/ui/button_group_separator_behavior.rb +33 -0
- data/app/behaviors/ui/button_group_text_behavior.rb +34 -0
- data/app/behaviors/ui/calendar_behavior.rb +119 -0
- data/app/behaviors/ui/card_action_behavior.rb +32 -0
- data/app/behaviors/ui/card_behavior.rb +32 -0
- data/app/behaviors/ui/card_content_behavior.rb +32 -0
- data/app/behaviors/ui/card_description_behavior.rb +32 -0
- data/app/behaviors/ui/card_footer_behavior.rb +32 -0
- data/app/behaviors/ui/card_header_behavior.rb +32 -0
- data/app/behaviors/ui/card_title_behavior.rb +32 -0
- data/app/behaviors/ui/carousel_behavior.rb +53 -0
- data/app/behaviors/ui/carousel_content_behavior.rb +65 -0
- data/app/behaviors/ui/carousel_item_behavior.rb +26 -0
- data/app/behaviors/ui/carousel_next_behavior.rb +39 -0
- data/app/behaviors/ui/carousel_previous_behavior.rb +39 -0
- data/app/behaviors/ui/checkbox_behavior.rb +48 -0
- data/app/behaviors/ui/collapsible_behavior.rb +42 -0
- data/app/behaviors/ui/collapsible_content_behavior.rb +39 -0
- data/app/behaviors/ui/collapsible_trigger_behavior.rb +55 -0
- data/app/behaviors/ui/combobox_behavior.rb +0 -0
- data/app/behaviors/ui/command_behavior.rb +37 -0
- data/app/behaviors/ui/command_dialog_behavior.rb +30 -0
- data/app/behaviors/ui/command_empty_behavior.rb +36 -0
- data/app/behaviors/ui/command_group_behavior.rb +43 -0
- data/app/behaviors/ui/command_input_behavior.rb +49 -0
- data/app/behaviors/ui/command_item_behavior.rb +47 -0
- data/app/behaviors/ui/command_list_behavior.rb +38 -0
- data/app/behaviors/ui/command_separator_behavior.rb +30 -0
- data/app/behaviors/ui/command_shortcut_behavior.rb +29 -0
- data/app/behaviors/ui/context_menu_behavior.rb +32 -0
- data/app/behaviors/ui/context_menu_checkbox_item_behavior.rb +38 -0
- data/app/behaviors/ui/context_menu_content_behavior.rb +37 -0
- data/app/behaviors/ui/context_menu_item_behavior.rb +40 -0
- data/app/behaviors/ui/context_menu_label_behavior.rb +33 -0
- data/app/behaviors/ui/context_menu_radio_group_behavior.rb +20 -0
- data/app/behaviors/ui/context_menu_radio_item_behavior.rb +38 -0
- data/app/behaviors/ui/context_menu_separator_behavior.rb +22 -0
- data/app/behaviors/ui/context_menu_shortcut_behavior.rb +21 -0
- data/app/behaviors/ui/context_menu_trigger_behavior.rb +32 -0
- data/app/behaviors/ui/date_picker_behavior.rb +90 -0
- data/app/behaviors/ui/date_picker_input_behavior.rb +62 -0
- data/app/behaviors/ui/date_picker_trigger_behavior.rb +62 -0
- data/app/behaviors/ui/dialog_behavior.rb +46 -0
- data/app/behaviors/ui/dialog_content_behavior.rb +46 -0
- data/app/behaviors/ui/dialog_footer_behavior.rb +26 -0
- data/app/behaviors/ui/dialog_header_behavior.rb +26 -0
- data/app/behaviors/ui/dialog_overlay_behavior.rb +69 -0
- data/app/behaviors/ui/drawer_behavior.rb +57 -0
- data/app/behaviors/ui/drawer_close_behavior.rb +10 -0
- data/app/behaviors/ui/drawer_content_behavior.rb +107 -0
- data/app/behaviors/ui/drawer_description_behavior.rb +23 -0
- data/app/behaviors/ui/drawer_footer_behavior.rb +23 -0
- data/app/behaviors/ui/drawer_handle_behavior.rb +40 -0
- data/app/behaviors/ui/drawer_header_behavior.rb +29 -0
- data/app/behaviors/ui/drawer_overlay_behavior.rb +75 -0
- data/app/behaviors/ui/drawer_title_behavior.rb +26 -0
- data/app/behaviors/ui/drawer_trigger_behavior.rb +18 -0
- data/app/behaviors/ui/dropdown_menu_behavior.rb +43 -0
- data/app/behaviors/ui/dropdown_menu_checkbox_item_behavior.rb +46 -0
- data/app/behaviors/ui/dropdown_menu_content_behavior.rb +37 -0
- data/app/behaviors/ui/dropdown_menu_item_behavior.rb +40 -0
- data/app/behaviors/ui/dropdown_menu_label_behavior.rb +30 -0
- data/app/behaviors/ui/dropdown_menu_radio_group_behavior.rb +20 -0
- data/app/behaviors/ui/dropdown_menu_radio_item_behavior.rb +46 -0
- data/app/behaviors/ui/dropdown_menu_separator_behavior.rb +23 -0
- data/app/behaviors/ui/dropdown_menu_shortcut_behavior.rb +21 -0
- data/app/behaviors/ui/dropdown_menu_sub_behavior.rb +21 -0
- data/app/behaviors/ui/dropdown_menu_sub_content_behavior.rb +38 -0
- data/app/behaviors/ui/dropdown_menu_sub_trigger_behavior.rb +35 -0
- data/app/behaviors/ui/dropdown_menu_trigger_behavior.rb +46 -0
- data/app/behaviors/ui/empty_behavior.rb +124 -0
- data/app/behaviors/ui/field_behavior.rb +46 -0
- data/app/behaviors/ui/field_content_behavior.rb +26 -0
- data/app/behaviors/ui/field_description_behavior.rb +26 -0
- data/app/behaviors/ui/field_error_behavior.rb +47 -0
- data/app/behaviors/ui/field_group_behavior.rb +26 -0
- data/app/behaviors/ui/field_label_behavior.rb +27 -0
- data/app/behaviors/ui/field_legend_behavior.rb +28 -0
- data/app/behaviors/ui/field_separator_behavior.rb +33 -0
- data/app/behaviors/ui/field_set_behavior.rb +26 -0
- data/app/behaviors/ui/field_title_behavior.rb +26 -0
- data/app/behaviors/ui/h1_behavior.rb +23 -0
- data/app/behaviors/ui/h2_behavior.rb +23 -0
- data/app/behaviors/ui/h3_behavior.rb +23 -0
- data/app/behaviors/ui/h4_behavior.rb +23 -0
- data/app/behaviors/ui/hover_card_behavior.rb +29 -0
- data/app/behaviors/ui/hover_card_content_behavior.rb +41 -0
- data/app/behaviors/ui/hover_card_trigger_behavior.rb +44 -0
- data/app/behaviors/ui/inline_code_behavior.rb +23 -0
- data/app/behaviors/ui/input_behavior.rb +52 -0
- data/app/behaviors/ui/input_group_addon_behavior.rb +52 -0
- data/app/behaviors/ui/input_group_behavior.rb +63 -0
- data/app/behaviors/ui/input_group_button_behavior.rb +82 -0
- data/app/behaviors/ui/input_group_input_behavior.rb +50 -0
- data/app/behaviors/ui/input_group_text_behavior.rb +32 -0
- data/app/behaviors/ui/input_group_textarea_behavior.rb +50 -0
- data/app/behaviors/ui/input_otp_behavior.rb +44 -0
- data/app/behaviors/ui/input_otp_group_behavior.rb +32 -0
- data/app/behaviors/ui/input_otp_separator_behavior.rb +33 -0
- data/app/behaviors/ui/input_otp_slot_behavior.rb +49 -0
- data/app/behaviors/ui/item_actions_behavior.rb +31 -0
- data/app/behaviors/ui/item_behavior.rb +100 -0
- data/app/behaviors/ui/item_content_behavior.rb +31 -0
- data/app/behaviors/ui/item_description_behavior.rb +31 -0
- data/app/behaviors/ui/item_footer_behavior.rb +31 -0
- data/app/behaviors/ui/item_group_behavior.rb +31 -0
- data/app/behaviors/ui/item_header_behavior.rb +31 -0
- data/app/behaviors/ui/item_media_behavior.rb +47 -0
- data/app/behaviors/ui/item_separator_behavior.rb +31 -0
- data/app/behaviors/ui/item_title_behavior.rb +31 -0
- data/app/behaviors/ui/kbd_behavior.rb +28 -0
- data/app/behaviors/ui/kbd_group_behavior.rb +26 -0
- data/app/behaviors/ui/label_behavior.rb +35 -0
- data/app/behaviors/ui/large_behavior.rb +23 -0
- data/app/behaviors/ui/lead_behavior.rb +23 -0
- data/app/behaviors/ui/list_behavior.rb +23 -0
- data/app/behaviors/ui/menubar_behavior.rb +43 -0
- data/app/behaviors/ui/menubar_checkbox_item_behavior.rb +56 -0
- data/app/behaviors/ui/menubar_content_behavior.rb +53 -0
- data/app/behaviors/ui/menubar_item_behavior.rb +78 -0
- data/app/behaviors/ui/menubar_label_behavior.rb +41 -0
- data/app/behaviors/ui/menubar_menu_behavior.rb +39 -0
- data/app/behaviors/ui/menubar_radio_group_behavior.rb +34 -0
- data/app/behaviors/ui/menubar_radio_item_behavior.rb +61 -0
- data/app/behaviors/ui/menubar_separator_behavior.rb +30 -0
- data/app/behaviors/ui/menubar_shortcut_behavior.rb +29 -0
- data/app/behaviors/ui/menubar_sub_behavior.rb +30 -0
- data/app/behaviors/ui/menubar_sub_content_behavior.rb +49 -0
- data/app/behaviors/ui/menubar_sub_trigger_behavior.rb +57 -0
- data/app/behaviors/ui/menubar_trigger_behavior.rb +48 -0
- data/app/behaviors/ui/muted_behavior.rb +23 -0
- data/app/behaviors/ui/navigation_menu_behavior.rb +42 -0
- data/app/behaviors/ui/navigation_menu_content_behavior.rb +65 -0
- data/app/behaviors/ui/navigation_menu_item_behavior.rb +38 -0
- data/app/behaviors/ui/navigation_menu_link_behavior.rb +68 -0
- data/app/behaviors/ui/navigation_menu_list_behavior.rb +33 -0
- data/app/behaviors/ui/navigation_menu_trigger_behavior.rb +57 -0
- data/app/behaviors/ui/navigation_menu_viewport_behavior.rb +61 -0
- data/app/behaviors/ui/p_behavior.rb +23 -0
- data/app/behaviors/ui/pagination_behavior.rb +26 -0
- data/app/behaviors/ui/pagination_content_behavior.rb +24 -0
- data/app/behaviors/ui/pagination_ellipsis_behavior.rb +25 -0
- data/app/behaviors/ui/pagination_item_behavior.rb +13 -0
- data/app/behaviors/ui/pagination_link_behavior.rb +57 -0
- data/app/behaviors/ui/pagination_next_behavior.rb +20 -0
- data/app/behaviors/ui/pagination_previous_behavior.rb +20 -0
- data/app/behaviors/ui/popover_behavior.rb +54 -0
- data/app/behaviors/ui/popover_content_behavior.rb +52 -0
- data/app/behaviors/ui/popover_trigger_behavior.rb +33 -0
- data/app/behaviors/ui/progress_behavior.rb +48 -0
- data/app/behaviors/ui/radio_button_behavior.rb +46 -0
- data/app/behaviors/ui/resizable_handle_behavior.rb +81 -0
- data/app/behaviors/ui/resizable_panel_behavior.rb +53 -0
- data/app/behaviors/ui/resizable_panel_group_behavior.rb +41 -0
- data/app/behaviors/ui/responsive_dialog_behavior.rb +41 -0
- data/app/behaviors/ui/scroll_area_behavior.rb +36 -0
- data/app/behaviors/ui/scroll_area_corner_behavior.rb +34 -0
- data/app/behaviors/ui/scroll_area_scrollbar_behavior.rb +50 -0
- data/app/behaviors/ui/scroll_area_thumb_behavior.rb +34 -0
- data/app/behaviors/ui/scroll_area_viewport_behavior.rb +36 -0
- data/app/behaviors/ui/select_behavior.rb +84 -0
- data/app/behaviors/ui/select_content_behavior.rb +42 -0
- data/app/behaviors/ui/select_group_behavior.rb +35 -0
- data/app/behaviors/ui/select_item_behavior.rb +48 -0
- data/app/behaviors/ui/select_label_behavior.rb +34 -0
- data/app/behaviors/ui/select_scroll_down_button_behavior.rb +51 -0
- data/app/behaviors/ui/select_scroll_up_button_behavior.rb +51 -0
- data/app/behaviors/ui/select_trigger_behavior.rb +40 -0
- data/app/behaviors/ui/separator_behavior.rb +58 -0
- data/app/behaviors/ui/shared_as_child_behavior.rb +71 -0
- data/app/behaviors/ui/sheet_behavior.rb +46 -0
- data/app/behaviors/ui/sheet_content_behavior.rb +92 -0
- data/app/behaviors/ui/sheet_footer_behavior.rb +27 -0
- data/app/behaviors/ui/sheet_header_behavior.rb +27 -0
- data/app/behaviors/ui/sheet_overlay_behavior.rb +76 -0
- data/app/behaviors/ui/sidebar_behavior.rb +88 -0
- data/app/behaviors/ui/sidebar_content_behavior.rb +36 -0
- data/app/behaviors/ui/sidebar_footer_behavior.rb +35 -0
- data/app/behaviors/ui/sidebar_group_action_behavior.rb +40 -0
- data/app/behaviors/ui/sidebar_group_behavior.rb +35 -0
- data/app/behaviors/ui/sidebar_group_content_behavior.rb +35 -0
- data/app/behaviors/ui/sidebar_group_label_behavior.rb +39 -0
- data/app/behaviors/ui/sidebar_header_behavior.rb +35 -0
- data/app/behaviors/ui/sidebar_input_behavior.rb +36 -0
- data/app/behaviors/ui/sidebar_inset_behavior.rb +39 -0
- data/app/behaviors/ui/sidebar_menu_action_behavior.rb +49 -0
- data/app/behaviors/ui/sidebar_menu_badge_behavior.rb +39 -0
- data/app/behaviors/ui/sidebar_menu_behavior.rb +35 -0
- data/app/behaviors/ui/sidebar_menu_button_behavior.rb +70 -0
- data/app/behaviors/ui/sidebar_menu_item_behavior.rb +35 -0
- data/app/behaviors/ui/sidebar_menu_skeleton_behavior.rb +35 -0
- data/app/behaviors/ui/sidebar_menu_sub_behavior.rb +36 -0
- data/app/behaviors/ui/sidebar_menu_sub_button_behavior.rb +59 -0
- data/app/behaviors/ui/sidebar_menu_sub_item_behavior.rb +35 -0
- data/app/behaviors/ui/sidebar_provider_behavior.rb +56 -0
- data/app/behaviors/ui/sidebar_rail_behavior.rb +47 -0
- data/app/behaviors/ui/sidebar_separator_behavior.rb +36 -0
- data/app/behaviors/ui/sidebar_trigger_behavior.rb +40 -0
- data/app/behaviors/ui/slider_behavior.rb +46 -0
- data/app/behaviors/ui/slider_range_behavior.rb +18 -0
- data/app/behaviors/ui/slider_thumb_behavior.rb +25 -0
- data/app/behaviors/ui/slider_track_behavior.rb +23 -0
- data/app/behaviors/ui/small_behavior.rb +23 -0
- data/app/behaviors/ui/sonner_toaster_behavior.rb +34 -0
- data/app/behaviors/ui/spinner_behavior.rb +50 -0
- data/app/behaviors/ui/switch_behavior.rb +68 -0
- data/app/behaviors/ui/table_behavior.rb +28 -0
- data/app/behaviors/ui/table_body_behavior.rb +28 -0
- data/app/behaviors/ui/table_caption_behavior.rb +28 -0
- data/app/behaviors/ui/table_cell_behavior.rb +28 -0
- data/app/behaviors/ui/table_footer_behavior.rb +28 -0
- data/app/behaviors/ui/table_head_behavior.rb +28 -0
- data/app/behaviors/ui/table_header_behavior.rb +28 -0
- data/app/behaviors/ui/table_row_behavior.rb +28 -0
- data/app/behaviors/ui/tabs_behavior.rb +32 -0
- data/app/behaviors/ui/tabs_content_behavior.rb +38 -0
- data/app/behaviors/ui/tabs_list_behavior.rb +20 -0
- data/app/behaviors/ui/tabs_trigger_behavior.rb +47 -0
- data/app/behaviors/ui/textarea_behavior.rb +36 -0
- data/app/behaviors/ui/toggle_behavior.rb +85 -0
- data/app/behaviors/ui/toggle_group_behavior.rb +68 -0
- data/app/behaviors/ui/toggle_group_item_behavior.rb +88 -0
- data/app/behaviors/ui/tooltip_behavior.rb +29 -0
- data/app/behaviors/ui/tooltip_content_behavior.rb +57 -0
- data/app/behaviors/ui/tooltip_trigger_behavior.rb +60 -0
- data/app/components/ui/accordion.rb +36 -0
- data/app/components/ui/accordion_content.rb +30 -0
- data/app/components/ui/accordion_item.rb +48 -0
- data/app/components/ui/accordion_trigger.rb +52 -0
- data/app/components/ui/alert.rb +31 -0
- data/app/components/ui/alert_description.rb +26 -0
- data/app/components/ui/alert_dialog.rb +33 -0
- data/app/components/ui/alert_dialog_action.rb +34 -0
- data/app/components/ui/alert_dialog_cancel.rb +34 -0
- data/app/components/ui/alert_dialog_content.rb +25 -0
- data/app/components/ui/alert_dialog_description.rb +25 -0
- data/app/components/ui/alert_dialog_footer.rb +28 -0
- data/app/components/ui/alert_dialog_header.rb +27 -0
- data/app/components/ui/alert_dialog_overlay.rb +30 -0
- data/app/components/ui/alert_dialog_title.rb +25 -0
- data/app/components/ui/alert_dialog_trigger.rb +27 -0
- data/app/components/ui/alert_title.rb +24 -0
- data/app/components/ui/aspect_ratio.rb +32 -0
- data/app/components/ui/avatar.rb +31 -0
- data/app/components/ui/avatar_fallback.rb +33 -0
- data/app/components/ui/avatar_image.rb +33 -0
- data/app/components/ui/badge.rb +37 -0
- data/app/components/ui/blockquote.rb +15 -0
- data/app/components/ui/breadcrumb.rb +31 -0
- data/app/components/ui/breadcrumb_ellipsis.rb +55 -0
- data/app/components/ui/breadcrumb_item.rb +27 -0
- data/app/components/ui/breadcrumb_link.rb +27 -0
- data/app/components/ui/breadcrumb_list.rb +27 -0
- data/app/components/ui/breadcrumb_page.rb +25 -0
- data/app/components/ui/breadcrumb_separator.rb +51 -0
- data/app/components/ui/button.rb +52 -0
- data/app/components/ui/button_group.rb +48 -0
- data/app/components/ui/button_group_separator.rb +32 -0
- data/app/components/ui/button_group_text.rb +45 -0
- data/app/components/ui/calendar.rb +209 -0
- data/app/components/ui/card.rb +14 -0
- data/app/components/ui/card_action.rb +14 -0
- data/app/components/ui/card_content.rb +14 -0
- data/app/components/ui/card_description.rb +14 -0
- data/app/components/ui/card_footer.rb +14 -0
- data/app/components/ui/card_header.rb +14 -0
- data/app/components/ui/card_title.rb +14 -0
- data/app/components/ui/carousel.rb +16 -0
- data/app/components/ui/carousel_content.rb +15 -0
- data/app/components/ui/carousel_item.rb +13 -0
- data/app/components/ui/carousel_next.rb +29 -0
- data/app/components/ui/carousel_previous.rb +29 -0
- data/app/components/ui/checkbox.rb +49 -0
- data/app/components/ui/collapsible.rb +23 -0
- data/app/components/ui/collapsible_content.rb +15 -0
- data/app/components/ui/collapsible_trigger.rb +21 -0
- data/app/components/ui/combobox_wrapper.rb +57 -0
- data/app/components/ui/command.rb +15 -0
- data/app/components/ui/command_dialog.rb +25 -0
- data/app/components/ui/command_empty.rb +14 -0
- data/app/components/ui/command_group.rb +21 -0
- data/app/components/ui/command_input.rb +32 -0
- data/app/components/ui/command_item.rb +16 -0
- data/app/components/ui/command_list.rb +14 -0
- data/app/components/ui/command_separator.rb +14 -0
- data/app/components/ui/command_shortcut.rb +14 -0
- data/app/components/ui/context_menu.rb +30 -0
- data/app/components/ui/context_menu_checkbox_item.rb +51 -0
- data/app/components/ui/context_menu_content.rb +27 -0
- data/app/components/ui/context_menu_item.rb +40 -0
- data/app/components/ui/context_menu_label.rb +27 -0
- data/app/components/ui/context_menu_radio_group.rb +28 -0
- data/app/components/ui/context_menu_radio_item.rb +51 -0
- data/app/components/ui/context_menu_separator.rb +23 -0
- data/app/components/ui/context_menu_shortcut.rb +25 -0
- data/app/components/ui/context_menu_trigger.rb +27 -0
- data/app/components/ui/date_picker.rb +128 -0
- data/app/components/ui/date_picker_input.rb +75 -0
- data/app/components/ui/date_picker_trigger.rb +74 -0
- data/app/components/ui/dialog.rb +19 -0
- data/app/components/ui/dialog_close.rb +27 -0
- data/app/components/ui/dialog_content.rb +17 -0
- data/app/components/ui/dialog_description.rb +22 -0
- data/app/components/ui/dialog_footer.rb +15 -0
- data/app/components/ui/dialog_header.rb +15 -0
- data/app/components/ui/dialog_overlay.rb +18 -0
- data/app/components/ui/dialog_title.rb +22 -0
- data/app/components/ui/dialog_trigger.rb +38 -0
- data/app/components/ui/drawer.rb +39 -0
- data/app/components/ui/drawer_close.rb +23 -0
- data/app/components/ui/drawer_content.rb +19 -0
- data/app/components/ui/drawer_description.rb +16 -0
- data/app/components/ui/drawer_footer.rb +16 -0
- data/app/components/ui/drawer_handle.rb +14 -0
- data/app/components/ui/drawer_header.rb +16 -0
- data/app/components/ui/drawer_overlay.rb +17 -0
- data/app/components/ui/drawer_title.rb +16 -0
- data/app/components/ui/drawer_trigger.rb +34 -0
- data/app/components/ui/dropdown_menu.rb +56 -0
- data/app/components/ui/dropdown_menu_checkbox_item.rb +55 -0
- data/app/components/ui/dropdown_menu_content.rb +29 -0
- data/app/components/ui/dropdown_menu_item.rb +40 -0
- data/app/components/ui/dropdown_menu_label.rb +27 -0
- data/app/components/ui/dropdown_menu_radio_group.rb +28 -0
- data/app/components/ui/dropdown_menu_radio_item.rb +57 -0
- data/app/components/ui/dropdown_menu_separator.rb +23 -0
- data/app/components/ui/dropdown_menu_shortcut.rb +25 -0
- data/app/components/ui/dropdown_menu_sub.rb +28 -0
- data/app/components/ui/dropdown_menu_sub_content.rb +31 -0
- data/app/components/ui/dropdown_menu_sub_trigger.rb +47 -0
- data/app/components/ui/dropdown_menu_trigger.rb +43 -0
- data/app/components/ui/empty.rb +25 -0
- data/app/components/ui/empty_content.rb +22 -0
- data/app/components/ui/empty_description.rb +20 -0
- data/app/components/ui/empty_header.rb +24 -0
- data/app/components/ui/empty_media.rb +28 -0
- data/app/components/ui/empty_title.rb +20 -0
- data/app/components/ui/field.rb +35 -0
- data/app/components/ui/field_content.rb +25 -0
- data/app/components/ui/field_description.rb +25 -0
- data/app/components/ui/field_error.rb +61 -0
- data/app/components/ui/field_group.rb +28 -0
- data/app/components/ui/field_label.rb +27 -0
- data/app/components/ui/field_legend.rb +30 -0
- data/app/components/ui/field_separator.rb +50 -0
- data/app/components/ui/field_set.rb +27 -0
- data/app/components/ui/field_title.rb +25 -0
- data/app/components/ui/h1.rb +15 -0
- data/app/components/ui/h2.rb +15 -0
- data/app/components/ui/h3.rb +15 -0
- data/app/components/ui/h4.rb +15 -0
- data/app/components/ui/hover_card.rb +26 -0
- data/app/components/ui/hover_card_content.rb +32 -0
- data/app/components/ui/hover_card_trigger.rb +46 -0
- data/app/components/ui/inline_code.rb +15 -0
- data/app/components/ui/input.rb +19 -0
- data/app/components/ui/input_group.rb +33 -0
- data/app/components/ui/input_group_addon.rb +32 -0
- data/app/components/ui/input_group_button.rb +40 -0
- data/app/components/ui/input_group_input.rb +43 -0
- data/app/components/ui/input_group_text.rb +31 -0
- data/app/components/ui/input_group_textarea.rb +43 -0
- data/app/components/ui/input_otp.rb +56 -0
- data/app/components/ui/input_otp_group.rb +25 -0
- data/app/components/ui/input_otp_separator.rb +34 -0
- data/app/components/ui/input_otp_slot.rb +32 -0
- data/app/components/ui/item.rb +26 -0
- data/app/components/ui/item_actions.rb +14 -0
- data/app/components/ui/item_content.rb +14 -0
- data/app/components/ui/item_description.rb +14 -0
- data/app/components/ui/item_footer.rb +14 -0
- data/app/components/ui/item_group.rb +14 -0
- data/app/components/ui/item_header.rb +14 -0
- data/app/components/ui/item_media.rb +15 -0
- data/app/components/ui/item_separator.rb +14 -0
- data/app/components/ui/item_title.rb +14 -0
- data/app/components/ui/kbd.rb +29 -0
- data/app/components/ui/kbd_group.rb +30 -0
- data/app/components/ui/label.rb +30 -0
- data/app/components/ui/large.rb +15 -0
- data/app/components/ui/lead.rb +15 -0
- data/app/components/ui/list.rb +15 -0
- data/app/components/ui/menubar.rb +36 -0
- data/app/components/ui/menubar_checkbox_item.rb +54 -0
- data/app/components/ui/menubar_content.rb +32 -0
- data/app/components/ui/menubar_item.rb +39 -0
- data/app/components/ui/menubar_label.rb +29 -0
- data/app/components/ui/menubar_menu.rb +29 -0
- data/app/components/ui/menubar_radio_group.rb +29 -0
- data/app/components/ui/menubar_radio_item.rb +56 -0
- data/app/components/ui/menubar_separator.rb +22 -0
- data/app/components/ui/menubar_shortcut.rb +27 -0
- data/app/components/ui/menubar_sub.rb +30 -0
- data/app/components/ui/menubar_sub_content.rb +27 -0
- data/app/components/ui/menubar_sub_trigger.rb +48 -0
- data/app/components/ui/menubar_trigger.rb +26 -0
- data/app/components/ui/muted.rb +15 -0
- data/app/components/ui/navigation_menu.rb +50 -0
- data/app/components/ui/navigation_menu_content.rb +33 -0
- data/app/components/ui/navigation_menu_item.rb +36 -0
- data/app/components/ui/navigation_menu_link.rb +70 -0
- data/app/components/ui/navigation_menu_list.rb +28 -0
- data/app/components/ui/navigation_menu_trigger.rb +51 -0
- data/app/components/ui/navigation_menu_viewport.rb +25 -0
- data/app/components/ui/p.rb +15 -0
- data/app/components/ui/pagination.rb +19 -0
- data/app/components/ui/pagination_content.rb +19 -0
- data/app/components/ui/pagination_ellipsis.rb +26 -0
- data/app/components/ui/pagination_item.rb +17 -0
- data/app/components/ui/pagination_link.rb +25 -0
- data/app/components/ui/pagination_next.rb +31 -0
- data/app/components/ui/pagination_previous.rb +31 -0
- data/app/components/ui/popover.rb +48 -0
- data/app/components/ui/popover_content.rb +29 -0
- data/app/components/ui/popover_trigger.rb +36 -0
- data/app/components/ui/progress.rb +37 -0
- data/app/components/ui/radio_button.rb +50 -0
- data/app/components/ui/resizable_handle.rb +58 -0
- data/app/components/ui/resizable_panel.rb +35 -0
- data/app/components/ui/resizable_panel_group.rb +41 -0
- data/app/components/ui/responsive_dialog.rb +98 -0
- data/app/components/ui/scroll_area.rb +62 -0
- data/app/components/ui/scroll_area_corner.rb +33 -0
- data/app/components/ui/scroll_area_scrollbar.rb +45 -0
- data/app/components/ui/scroll_area_thumb.rb +38 -0
- data/app/components/ui/scroll_area_viewport.rb +41 -0
- data/app/components/ui/select.rb +42 -0
- data/app/components/ui/select_content.rb +43 -0
- data/app/components/ui/select_group.rb +38 -0
- data/app/components/ui/select_item.rb +67 -0
- data/app/components/ui/select_label.rb +34 -0
- data/app/components/ui/select_scroll_down_button.rb +47 -0
- data/app/components/ui/select_scroll_up_button.rb +47 -0
- data/app/components/ui/select_trigger.rb +45 -0
- data/app/components/ui/separator.rb +39 -0
- data/app/components/ui/sheet.rb +19 -0
- data/app/components/ui/sheet_close.rb +39 -0
- data/app/components/ui/sheet_content.rb +55 -0
- data/app/components/ui/sheet_description.rb +22 -0
- data/app/components/ui/sheet_footer.rb +15 -0
- data/app/components/ui/sheet_header.rb +15 -0
- data/app/components/ui/sheet_overlay.rb +18 -0
- data/app/components/ui/sheet_title.rb +22 -0
- data/app/components/ui/sheet_trigger.rb +27 -0
- data/app/components/ui/sidebar.rb +100 -0
- data/app/components/ui/sidebar_content.rb +34 -0
- data/app/components/ui/sidebar_footer.rb +36 -0
- data/app/components/ui/sidebar_group.rb +52 -0
- data/app/components/ui/sidebar_group_action.rb +47 -0
- data/app/components/ui/sidebar_group_content.rb +42 -0
- data/app/components/ui/sidebar_group_label.rb +46 -0
- data/app/components/ui/sidebar_header.rb +36 -0
- data/app/components/ui/sidebar_input.rb +42 -0
- data/app/components/ui/sidebar_inset.rb +42 -0
- data/app/components/ui/sidebar_menu.rb +39 -0
- data/app/components/ui/sidebar_menu_action.rb +60 -0
- data/app/components/ui/sidebar_menu_badge.rb +39 -0
- data/app/components/ui/sidebar_menu_button.rb +71 -0
- data/app/components/ui/sidebar_menu_item.rb +45 -0
- data/app/components/ui/sidebar_menu_skeleton.rb +63 -0
- data/app/components/ui/sidebar_menu_sub.rb +50 -0
- data/app/components/ui/sidebar_menu_sub_button.rb +48 -0
- data/app/components/ui/sidebar_menu_sub_item.rb +34 -0
- data/app/components/ui/sidebar_provider.rb +73 -0
- data/app/components/ui/sidebar_rail.rb +35 -0
- data/app/components/ui/sidebar_separator.rb +32 -0
- data/app/components/ui/sidebar_trigger.rb +57 -0
- data/app/components/ui/skeleton.rb +42 -0
- data/app/components/ui/small.rb +15 -0
- data/app/components/ui/sonner_toaster.rb +53 -0
- data/app/components/ui/spinner.rb +41 -0
- data/app/components/ui/switch.rb +70 -0
- data/app/components/ui/table.rb +45 -0
- data/app/components/ui/table_body.rb +29 -0
- data/app/components/ui/table_caption.rb +16 -0
- data/app/components/ui/table_cell.rb +16 -0
- data/app/components/ui/table_footer.rb +29 -0
- data/app/components/ui/table_head.rb +16 -0
- data/app/components/ui/table_header.rb +29 -0
- data/app/components/ui/table_row.rb +25 -0
- data/app/components/ui/tabs.rb +40 -0
- data/app/components/ui/tabs_content.rb +30 -0
- data/app/components/ui/tabs_list.rb +27 -0
- data/app/components/ui/tabs_trigger.rb +33 -0
- data/app/components/ui/textarea.rb +19 -0
- data/app/components/ui/toggle.rb +43 -0
- data/app/components/ui/toggle_group.rb +58 -0
- data/app/components/ui/toggle_group_item.rb +71 -0
- data/app/components/ui/tooltip.rb +31 -0
- data/app/components/ui/tooltip_content.rb +35 -0
- data/app/components/ui/tooltip_trigger.rb +42 -0
- data/app/controllers/ui/application_controller.rb +4 -0
- data/app/helpers/ui/application_helper.rb +20 -0
- data/app/helpers/ui/combobox_behavior.rb +59 -0
- data/app/helpers/ui/empty_behavior.rb +124 -0
- data/app/helpers/ui/input_group_addon_behavior.rb +52 -0
- data/app/helpers/ui/input_group_behavior.rb +63 -0
- data/app/helpers/ui/input_group_button_behavior.rb +82 -0
- data/app/helpers/ui/input_group_input_behavior.rb +50 -0
- data/app/helpers/ui/input_group_text_behavior.rb +32 -0
- data/app/helpers/ui/input_group_textarea_behavior.rb +50 -0
- data/app/helpers/ui/popover_behavior.rb +54 -0
- data/app/helpers/ui/popover_content_behavior.rb +52 -0
- data/app/helpers/ui/popover_trigger_behavior.rb +33 -0
- data/app/helpers/ui/scroll_area_behavior.rb +36 -0
- data/app/helpers/ui/scroll_area_corner_behavior.rb +34 -0
- data/app/helpers/ui/scroll_area_scrollbar_behavior.rb +50 -0
- data/app/helpers/ui/scroll_area_thumb_behavior.rb +34 -0
- data/app/helpers/ui/scroll_area_viewport_behavior.rb +36 -0
- data/app/helpers/ui/select_behavior.rb +84 -0
- data/app/helpers/ui/select_content_behavior.rb +42 -0
- data/app/helpers/ui/select_group_behavior.rb +35 -0
- data/app/helpers/ui/select_item_behavior.rb +48 -0
- data/app/helpers/ui/select_label_behavior.rb +34 -0
- data/app/helpers/ui/select_scroll_down_button_behavior.rb +51 -0
- data/app/helpers/ui/select_scroll_up_button_behavior.rb +51 -0
- data/app/helpers/ui/select_trigger_behavior.rb +40 -0
- data/app/helpers/ui/spinner_behavior.rb +50 -0
- data/app/helpers/ui/textarea_behavior.rb +36 -0
- data/app/javascript/ui/common.js +24 -0
- data/app/javascript/ui/controllers/accordion_controller.js +159 -0
- data/app/javascript/ui/controllers/alert_dialog_controller.js +98 -0
- data/app/javascript/ui/controllers/avatar_controller.js +84 -0
- data/app/javascript/ui/controllers/calendar_controller.js +867 -0
- data/app/javascript/ui/controllers/carousel_controller.js +191 -0
- data/app/javascript/ui/controllers/checkbox_controller.js +27 -0
- data/app/javascript/ui/controllers/collapsible_controller.js +65 -0
- data/app/javascript/ui/controllers/combobox_controller.js +149 -0
- data/app/javascript/ui/controllers/command_controller.js +199 -0
- data/app/javascript/ui/controllers/command_dialog_controller.js +100 -0
- data/app/javascript/ui/controllers/context_menu_controller.js +289 -0
- data/app/javascript/ui/controllers/datepicker_controller.js +385 -0
- data/app/javascript/ui/controllers/dialog_controller.js +136 -0
- data/app/javascript/ui/controllers/drawer_controller.js +945 -0
- data/app/javascript/ui/controllers/dropdown_controller.js +850 -0
- data/app/javascript/ui/controllers/hello_controller.js +30 -0
- data/app/javascript/ui/controllers/hover_card_controller.js +147 -0
- data/app/javascript/ui/controllers/input_otp_controller.js +139 -0
- data/app/javascript/ui/controllers/menubar_controller.js +799 -0
- data/app/javascript/ui/controllers/navigation_menu_controller.js +527 -0
- data/app/javascript/ui/controllers/popover_controller.js +257 -0
- data/app/javascript/ui/controllers/resizable_controller.js +449 -0
- data/app/javascript/ui/controllers/responsive_dialog_controller.js +156 -0
- data/app/javascript/ui/controllers/scroll_area_controller.js +623 -0
- data/app/javascript/ui/controllers/select_controller.js +456 -0
- data/app/javascript/ui/controllers/sidebar_controller.js +284 -0
- data/app/javascript/ui/controllers/slider_controller.js +342 -0
- data/app/javascript/ui/controllers/sonner_controller.js +393 -0
- data/app/javascript/ui/controllers/switch_controller.js +75 -0
- data/app/javascript/ui/controllers/tabs_controller.js +156 -0
- data/app/javascript/ui/controllers/toggle_controller.js +49 -0
- data/app/javascript/ui/controllers/toggle_group_controller.js +155 -0
- data/app/javascript/ui/controllers/tooltip_controller.js +122 -0
- data/app/javascript/ui/index.js +94 -0
- data/app/javascript/ui/utils/click-outside-manager.js +133 -0
- data/app/javascript/ui/utils/escape-key-manager.js +118 -0
- data/app/javascript/ui/utils/floating-ui-positioner.js +282 -0
- data/app/javascript/ui/utils/focus-trap-manager.js +238 -0
- data/app/javascript/ui/utils/index.js +86 -0
- data/app/javascript/ui/utils/menu_utils.js +423 -0
- data/app/javascript/ui/utils/scroll-lock-manager.js +149 -0
- data/app/javascript/ui/utils/state-manager.js +205 -0
- data/app/jobs/ui/application_job.rb +4 -0
- data/app/mailers/ui/application_mailer.rb +6 -0
- data/app/models/ui/application_record.rb +5 -0
- data/app/view_components/ui/accordion_component.rb +35 -0
- data/app/view_components/ui/accordion_content_component.rb +29 -0
- data/app/view_components/ui/accordion_item_component.rb +43 -0
- data/app/view_components/ui/accordion_trigger_component.rb +31 -0
- data/app/view_components/ui/alert_component.rb +23 -0
- data/app/view_components/ui/alert_description_component.rb +21 -0
- data/app/view_components/ui/alert_title_component.rb +21 -0
- data/app/view_components/ui/aspect_ratio_component.rb +26 -0
- data/app/view_components/ui/avatar_component.rb +21 -0
- data/app/view_components/ui/avatar_fallback_component.rb +21 -0
- data/app/view_components/ui/avatar_image_component.rb +23 -0
- data/app/view_components/ui/badge_component.rb +23 -0
- data/app/view_components/ui/blockquote_component.rb +18 -0
- data/app/view_components/ui/breadcrumb_component.rb +33 -0
- data/app/view_components/ui/breadcrumb_ellipsis_component.rb +50 -0
- data/app/view_components/ui/breadcrumb_item_component.rb +29 -0
- data/app/view_components/ui/breadcrumb_link_component.rb +29 -0
- data/app/view_components/ui/breadcrumb_list_component.rb +29 -0
- data/app/view_components/ui/breadcrumb_page_component.rb +27 -0
- data/app/view_components/ui/breadcrumb_separator_component.rb +47 -0
- data/app/view_components/ui/button_component.rb +43 -0
- data/app/view_components/ui/button_group_component.rb +38 -0
- data/app/view_components/ui/button_group_separator_component.rb +33 -0
- data/app/view_components/ui/button_group_text_component.rb +30 -0
- data/app/view_components/ui/calendar_component.rb +185 -0
- data/app/view_components/ui/card_action_component.rb +14 -0
- data/app/view_components/ui/card_component.rb +14 -0
- data/app/view_components/ui/card_content_component.rb +14 -0
- data/app/view_components/ui/card_description_component.rb +14 -0
- data/app/view_components/ui/card_footer_component.rb +14 -0
- data/app/view_components/ui/card_header_component.rb +14 -0
- data/app/view_components/ui/card_title_component.rb +14 -0
- data/app/view_components/ui/carousel_component.rb +16 -0
- data/app/view_components/ui/carousel_content_component.rb +15 -0
- data/app/view_components/ui/carousel_item_component.rb +13 -0
- data/app/view_components/ui/carousel_next_component.rb +31 -0
- data/app/view_components/ui/carousel_previous_component.rb +31 -0
- data/app/view_components/ui/checkbox_component.rb +55 -0
- data/app/view_components/ui/collapsible_component.rb +23 -0
- data/app/view_components/ui/collapsible_content_component.rb +15 -0
- data/app/view_components/ui/collapsible_trigger_component.rb +21 -0
- data/app/view_components/ui/combobox_wrapper_component.rb +56 -0
- data/app/view_components/ui/command_component.rb +15 -0
- data/app/view_components/ui/command_dialog_component.rb +25 -0
- data/app/view_components/ui/command_empty_component.rb +14 -0
- data/app/view_components/ui/command_group_component.rb +21 -0
- data/app/view_components/ui/command_input_component.rb +20 -0
- data/app/view_components/ui/command_item_component.rb +16 -0
- data/app/view_components/ui/command_list_component.rb +14 -0
- data/app/view_components/ui/command_separator_component.rb +14 -0
- data/app/view_components/ui/command_shortcut_component.rb +14 -0
- data/app/view_components/ui/context_menu_checkbox_item_component.rb +45 -0
- data/app/view_components/ui/context_menu_component.rb +20 -0
- data/app/view_components/ui/context_menu_content_component.rb +20 -0
- data/app/view_components/ui/context_menu_item_component.rb +29 -0
- data/app/view_components/ui/context_menu_label_component.rb +22 -0
- data/app/view_components/ui/context_menu_radio_group_component.rb +19 -0
- data/app/view_components/ui/context_menu_radio_item_component.rb +45 -0
- data/app/view_components/ui/context_menu_separator_component.rb +15 -0
- data/app/view_components/ui/context_menu_shortcut_component.rb +19 -0
- data/app/view_components/ui/context_menu_trigger_component.rb +20 -0
- data/app/view_components/ui/date_picker_component.rb +137 -0
- data/app/view_components/ui/date_picker_input_component.rb +76 -0
- data/app/view_components/ui/date_picker_trigger_component.rb +79 -0
- data/app/view_components/ui/dialog_close_component.rb +71 -0
- data/app/view_components/ui/dialog_component.rb +50 -0
- data/app/view_components/ui/dialog_content_component.rb +28 -0
- data/app/view_components/ui/dialog_description_component.rb +26 -0
- data/app/view_components/ui/dialog_footer_component.rb +21 -0
- data/app/view_components/ui/dialog_header_component.rb +22 -0
- data/app/view_components/ui/dialog_overlay_component.rb +36 -0
- data/app/view_components/ui/dialog_title_component.rb +26 -0
- data/app/view_components/ui/dialog_trigger_component.rb +71 -0
- data/app/view_components/ui/drawer_close_component.rb +35 -0
- data/app/view_components/ui/drawer_component.rb +81 -0
- data/app/view_components/ui/drawer_content_component.rb +32 -0
- data/app/view_components/ui/drawer_description_component.rb +21 -0
- data/app/view_components/ui/drawer_footer_component.rb +24 -0
- data/app/view_components/ui/drawer_handle_component.rb +24 -0
- data/app/view_components/ui/drawer_header_component.rb +24 -0
- data/app/view_components/ui/drawer_overlay_component.rb +28 -0
- data/app/view_components/ui/drawer_title_component.rb +21 -0
- data/app/view_components/ui/drawer_trigger_component.rb +71 -0
- data/app/view_components/ui/dropdown_menu_checkbox_item_component.rb +36 -0
- data/app/view_components/ui/dropdown_menu_component.rb +52 -0
- data/app/view_components/ui/dropdown_menu_content_component.rb +18 -0
- data/app/view_components/ui/dropdown_menu_item_component.rb +21 -0
- data/app/view_components/ui/dropdown_menu_label_component.rb +18 -0
- data/app/view_components/ui/dropdown_menu_radio_group_component.rb +17 -0
- data/app/view_components/ui/dropdown_menu_radio_item_component.rb +37 -0
- data/app/view_components/ui/dropdown_menu_separator_component.rb +15 -0
- data/app/view_components/ui/dropdown_menu_shortcut_component.rb +17 -0
- data/app/view_components/ui/dropdown_menu_sub_component.rb +17 -0
- data/app/view_components/ui/dropdown_menu_sub_content_component.rb +19 -0
- data/app/view_components/ui/dropdown_menu_sub_trigger_component.rb +29 -0
- data/app/view_components/ui/dropdown_menu_trigger_component.rb +52 -0
- data/app/view_components/ui/empty_component.rb +17 -0
- data/app/view_components/ui/empty_content_component.rb +17 -0
- data/app/view_components/ui/empty_description_component.rb +17 -0
- data/app/view_components/ui/empty_header_component.rb +17 -0
- data/app/view_components/ui/empty_media_component.rb +18 -0
- data/app/view_components/ui/empty_title_component.rb +17 -0
- data/app/view_components/ui/field_component.rb +41 -0
- data/app/view_components/ui/field_content_component.rb +27 -0
- data/app/view_components/ui/field_description_component.rb +27 -0
- data/app/view_components/ui/field_error_component.rb +63 -0
- data/app/view_components/ui/field_group_component.rb +32 -0
- data/app/view_components/ui/field_label_component.rb +29 -0
- data/app/view_components/ui/field_legend_component.rb +34 -0
- data/app/view_components/ui/field_separator_component.rb +53 -0
- data/app/view_components/ui/field_set_component.rb +30 -0
- data/app/view_components/ui/field_title_component.rb +27 -0
- data/app/view_components/ui/h1_component.rb +21 -0
- data/app/view_components/ui/h2_component.rb +21 -0
- data/app/view_components/ui/h3_component.rb +18 -0
- data/app/view_components/ui/h4_component.rb +18 -0
- data/app/view_components/ui/hover_card_component.rb +30 -0
- data/app/view_components/ui/hover_card_content_component.rb +36 -0
- data/app/view_components/ui/hover_card_trigger_component.rb +54 -0
- data/app/view_components/ui/inline_code_component.rb +18 -0
- data/app/view_components/ui/input_component.rb +23 -0
- data/app/view_components/ui/input_group_addon_component.rb +36 -0
- data/app/view_components/ui/input_group_button_component.rb +36 -0
- data/app/view_components/ui/input_group_component.rb +35 -0
- data/app/view_components/ui/input_group_input_component.rb +42 -0
- data/app/view_components/ui/input_group_text_component.rb +33 -0
- data/app/view_components/ui/input_group_textarea_component.rb +42 -0
- data/app/view_components/ui/input_otp_component.rb +61 -0
- data/app/view_components/ui/input_otp_group_component.rb +29 -0
- data/app/view_components/ui/input_otp_separator_component.rb +36 -0
- data/app/view_components/ui/input_otp_slot_component.rb +32 -0
- data/app/view_components/ui/item_actions_component.rb +18 -0
- data/app/view_components/ui/item_component.rb +30 -0
- data/app/view_components/ui/item_content_component.rb +18 -0
- data/app/view_components/ui/item_description_component.rb +18 -0
- data/app/view_components/ui/item_footer_component.rb +18 -0
- data/app/view_components/ui/item_group_component.rb +18 -0
- data/app/view_components/ui/item_header_component.rb +18 -0
- data/app/view_components/ui/item_media_component.rb +19 -0
- data/app/view_components/ui/item_separator_component.rb +18 -0
- data/app/view_components/ui/item_title_component.rb +18 -0
- data/app/view_components/ui/kbd_component.rb +31 -0
- data/app/view_components/ui/kbd_group_component.rb +32 -0
- data/app/view_components/ui/label_component.rb +23 -0
- data/app/view_components/ui/large_component.rb +18 -0
- data/app/view_components/ui/lead_component.rb +18 -0
- data/app/view_components/ui/list_component.rb +18 -0
- data/app/view_components/ui/menubar_checkbox_item_component.rb +47 -0
- data/app/view_components/ui/menubar_component.rb +24 -0
- data/app/view_components/ui/menubar_content_component.rb +26 -0
- data/app/view_components/ui/menubar_item_component.rb +31 -0
- data/app/view_components/ui/menubar_label_component.rb +23 -0
- data/app/view_components/ui/menubar_menu_component.rb +25 -0
- data/app/view_components/ui/menubar_radio_group_component.rb +26 -0
- data/app/view_components/ui/menubar_radio_item_component.rb +48 -0
- data/app/view_components/ui/menubar_separator_component.rb +20 -0
- data/app/view_components/ui/menubar_shortcut_component.rb +22 -0
- data/app/view_components/ui/menubar_sub_component.rb +25 -0
- data/app/view_components/ui/menubar_sub_content_component.rb +25 -0
- data/app/view_components/ui/menubar_sub_trigger_component.rb +43 -0
- data/app/view_components/ui/menubar_trigger_component.rb +23 -0
- data/app/view_components/ui/muted_component.rb +18 -0
- data/app/view_components/ui/navigation_menu_component.rb +42 -0
- data/app/view_components/ui/navigation_menu_content_component.rb +23 -0
- data/app/view_components/ui/navigation_menu_item_component.rb +23 -0
- data/app/view_components/ui/navigation_menu_link_component.rb +101 -0
- data/app/view_components/ui/navigation_menu_list_component.rb +21 -0
- data/app/view_components/ui/navigation_menu_trigger_component.rb +45 -0
- data/app/view_components/ui/navigation_menu_viewport_component.rb +21 -0
- data/app/view_components/ui/p_component.rb +18 -0
- data/app/view_components/ui/pagination_component.rb +18 -0
- data/app/view_components/ui/pagination_content_component.rb +18 -0
- data/app/view_components/ui/pagination_ellipsis_component.rb +25 -0
- data/app/view_components/ui/pagination_item_component.rb +16 -0
- data/app/view_components/ui/pagination_link_component.rb +26 -0
- data/app/view_components/ui/pagination_next_component.rb +30 -0
- data/app/view_components/ui/pagination_previous_component.rb +30 -0
- data/app/view_components/ui/popover_component.rb +55 -0
- data/app/view_components/ui/popover_content_component.rb +43 -0
- data/app/view_components/ui/popover_trigger_component.rb +72 -0
- data/app/view_components/ui/progress_component.rb +39 -0
- data/app/view_components/ui/radio_button_component.rb +56 -0
- data/app/view_components/ui/resizable_handle_component.rb +35 -0
- data/app/view_components/ui/resizable_panel_component.rb +39 -0
- data/app/view_components/ui/resizable_panel_group_component.rb +45 -0
- data/app/view_components/ui/responsive_dialog_component.rb +81 -0
- data/app/view_components/ui/scroll_area_component.rb +46 -0
- data/app/view_components/ui/scroll_area_corner_component.rb +22 -0
- data/app/view_components/ui/scroll_area_scrollbar_component.rb +35 -0
- data/app/view_components/ui/scroll_area_thumb_component.rb +29 -0
- data/app/view_components/ui/scroll_area_viewport_component.rb +32 -0
- data/app/view_components/ui/select_component.rb +31 -0
- data/app/view_components/ui/select_content_component.rb +41 -0
- data/app/view_components/ui/select_group_component.rb +26 -0
- data/app/view_components/ui/select_item_component.rb +45 -0
- data/app/view_components/ui/select_label_component.rb +22 -0
- data/app/view_components/ui/select_scroll_down_button_component.rb +35 -0
- data/app/view_components/ui/select_scroll_up_button_component.rb +35 -0
- data/app/view_components/ui/select_trigger_component.rb +27 -0
- data/app/view_components/ui/separator_component.rb +27 -0
- data/app/view_components/ui/sheet_close_component.rb +71 -0
- data/app/view_components/ui/sheet_component.rb +50 -0
- data/app/view_components/ui/sheet_content_component.rb +52 -0
- data/app/view_components/ui/sheet_description_component.rb +25 -0
- data/app/view_components/ui/sheet_footer_component.rb +21 -0
- data/app/view_components/ui/sheet_header_component.rb +21 -0
- data/app/view_components/ui/sheet_overlay_component.rb +36 -0
- data/app/view_components/ui/sheet_title_component.rb +25 -0
- data/app/view_components/ui/sheet_trigger_component.rb +60 -0
- data/app/view_components/ui/skeleton_component.rb +30 -0
- data/app/view_components/ui/slider_component.rb +61 -0
- data/app/view_components/ui/slider_range_component.rb +24 -0
- data/app/view_components/ui/slider_thumb_component.rb +30 -0
- data/app/view_components/ui/slider_track_component.rb +28 -0
- data/app/view_components/ui/small_component.rb +18 -0
- data/app/view_components/ui/sonner_toaster_component.rb +53 -0
- data/app/view_components/ui/spinner_component.rb +48 -0
- data/app/view_components/ui/switch_component.rb +55 -0
- data/app/view_components/ui/table_body_component.rb +21 -0
- data/app/view_components/ui/table_caption_component.rb +14 -0
- data/app/view_components/ui/table_cell_component.rb +14 -0
- data/app/view_components/ui/table_component.rb +27 -0
- data/app/view_components/ui/table_footer_component.rb +21 -0
- data/app/view_components/ui/table_head_component.rb +14 -0
- data/app/view_components/ui/table_header_component.rb +21 -0
- data/app/view_components/ui/table_row_component.rb +23 -0
- data/app/view_components/ui/tabs_component.rb +39 -0
- data/app/view_components/ui/tabs_content_component.rb +34 -0
- data/app/view_components/ui/tabs_list_component.rb +30 -0
- data/app/view_components/ui/tabs_trigger_component.rb +37 -0
- data/app/view_components/ui/textarea_component.rb +18 -0
- data/app/view_components/ui/toggle_component.rb +48 -0
- data/app/view_components/ui/toggle_group_component.rb +68 -0
- data/app/view_components/ui/toggle_group_item_component.rb +72 -0
- data/app/view_components/ui/tooltip_component.rb +19 -0
- data/app/view_components/ui/tooltip_content_component.rb +28 -0
- data/app/view_components/ui/tooltip_trigger_component.rb +25 -0
- data/app/views/layouts/ui/application.html.erb +21 -0
- data/app/views/ui/_accordion.html.erb +17 -0
- data/app/views/ui/_alert.html.erb +22 -0
- data/app/views/ui/_aspect_ratio.html.erb +18 -0
- data/app/views/ui/_avatar.html.erb +13 -0
- data/app/views/ui/_badge.html.erb +18 -0
- data/app/views/ui/_blockquote.html.erb +19 -0
- data/app/views/ui/_breadcrumb.html.erb +14 -0
- data/app/views/ui/_button.html.erb +38 -0
- data/app/views/ui/_button_group.html.erb +17 -0
- data/app/views/ui/_calendar.html.erb +172 -0
- data/app/views/ui/_card.html.erb +18 -0
- data/app/views/ui/_carousel.html.erb +17 -0
- data/app/views/ui/_checkbox.html.erb +32 -0
- data/app/views/ui/_collapsible.html.erb +23 -0
- data/app/views/ui/_command.html.erb +19 -0
- data/app/views/ui/_context_menu.html.erb +21 -0
- data/app/views/ui/_date_picker.html.erb +93 -0
- data/app/views/ui/_dialog.html.erb +18 -0
- data/app/views/ui/_drawer.html.erb +25 -0
- data/app/views/ui/_dropdown_menu.html.erb +40 -0
- data/app/views/ui/_empty.html.erb +13 -0
- data/app/views/ui/_field.html.erb +15 -0
- data/app/views/ui/_h1.html.erb +19 -0
- data/app/views/ui/_h2.html.erb +19 -0
- data/app/views/ui/_h3.html.erb +19 -0
- data/app/views/ui/_h4.html.erb +19 -0
- data/app/views/ui/_hover_card.html.erb +14 -0
- data/app/views/ui/_inline_code.html.erb +19 -0
- data/app/views/ui/_input.html.erb +18 -0
- data/app/views/ui/_input_group.html.erb +14 -0
- data/app/views/ui/_input_otp.html.erb +44 -0
- data/app/views/ui/_item.html.erb +9 -0
- data/app/views/ui/_kbd.html.erb +15 -0
- data/app/views/ui/_label.html.erb +16 -0
- data/app/views/ui/_large.html.erb +19 -0
- data/app/views/ui/_lead.html.erb +19 -0
- data/app/views/ui/_list.html.erb +19 -0
- data/app/views/ui/_menubar.html.erb +25 -0
- data/app/views/ui/_muted.html.erb +19 -0
- data/app/views/ui/_navigation_menu.html.erb +34 -0
- data/app/views/ui/_p.html.erb +19 -0
- data/app/views/ui/_pagination.html.erb +14 -0
- data/app/views/ui/_popover.html.erb +19 -0
- data/app/views/ui/_progress.html.erb +15 -0
- data/app/views/ui/_radio_button.html.erb +34 -0
- data/app/views/ui/_responsive_dialog.html.erb +44 -0
- data/app/views/ui/_scroll_area.html.erb +60 -0
- data/app/views/ui/_select.html.erb +17 -0
- data/app/views/ui/_separator.html.erb +20 -0
- data/app/views/ui/_sheet.html.erb +18 -0
- data/app/views/ui/_skeleton.html.erb +19 -0
- data/app/views/ui/_slider.html.erb +27 -0
- data/app/views/ui/_small.html.erb +19 -0
- data/app/views/ui/_spinner.html.erb +28 -0
- data/app/views/ui/_switch.html.erb +45 -0
- data/app/views/ui/_table.html.erb +18 -0
- data/app/views/ui/_tabs.html.erb +23 -0
- data/app/views/ui/_textarea.html.erb +16 -0
- data/app/views/ui/_toggle.html.erb +27 -0
- data/app/views/ui/_toggle_group.html.erb +38 -0
- data/app/views/ui/_tooltip.html.erb +13 -0
- data/app/views/ui/accordion/_content.html.erb +21 -0
- data/app/views/ui/accordion/_item.html.erb +21 -0
- data/app/views/ui/accordion/_trigger.html.erb +23 -0
- data/app/views/ui/alert/_description.html.erb +13 -0
- data/app/views/ui/alert/_title.html.erb +13 -0
- data/app/views/ui/avatar/_fallback.html.erb +13 -0
- data/app/views/ui/avatar/_image.html.erb +18 -0
- data/app/views/ui/breadcrumb/_ellipsis.html.erb +26 -0
- data/app/views/ui/breadcrumb/_item.html.erb +14 -0
- data/app/views/ui/breadcrumb/_link.html.erb +16 -0
- data/app/views/ui/breadcrumb/_list.html.erb +14 -0
- data/app/views/ui/breadcrumb/_page.html.erb +15 -0
- data/app/views/ui/breadcrumb/_separator.html.erb +23 -0
- data/app/views/ui/button_group/_separator.html.erb +19 -0
- data/app/views/ui/button_group/_text.html.erb +16 -0
- data/app/views/ui/card/_action.html.erb +18 -0
- data/app/views/ui/card/_content.html.erb +18 -0
- data/app/views/ui/card/_description.html.erb +20 -0
- data/app/views/ui/card/_footer.html.erb +18 -0
- data/app/views/ui/card/_header.html.erb +18 -0
- data/app/views/ui/card/_title.html.erb +20 -0
- data/app/views/ui/carousel/_content.html.erb +16 -0
- data/app/views/ui/carousel/_item.html.erb +14 -0
- data/app/views/ui/carousel/_next.html.erb +13 -0
- data/app/views/ui/carousel/_previous.html.erb +13 -0
- data/app/views/ui/collapsible/_content.html.erb +20 -0
- data/app/views/ui/collapsible/_trigger.html.erb +18 -0
- data/app/views/ui/combobox/_wrapper.html.erb +43 -0
- data/app/views/ui/command/_dialog.html.erb +17 -0
- data/app/views/ui/command/_empty.html.erb +19 -0
- data/app/views/ui/command/_group.html.erb +23 -0
- data/app/views/ui/command/_input.html.erb +20 -0
- data/app/views/ui/command/_item.html.erb +21 -0
- data/app/views/ui/command/_list.html.erb +17 -0
- data/app/views/ui/command/_separator.html.erb +15 -0
- data/app/views/ui/command/_shortcut.html.erb +19 -0
- data/app/views/ui/context_menu/_checkbox_item.html.erb +23 -0
- data/app/views/ui/context_menu/_content.html.erb +15 -0
- data/app/views/ui/context_menu/_item.html.erb +19 -0
- data/app/views/ui/context_menu/_label.html.erb +16 -0
- data/app/views/ui/context_menu/_radio_group.html.erb +14 -0
- data/app/views/ui/context_menu/_radio_item.html.erb +23 -0
- data/app/views/ui/context_menu/_separator.html.erb +12 -0
- data/app/views/ui/context_menu/_shortcut.html.erb +15 -0
- data/app/views/ui/context_menu/_trigger.html.erb +14 -0
- data/app/views/ui/date_picker/_input.html.erb +47 -0
- data/app/views/ui/date_picker/_trigger.html.erb +53 -0
- data/app/views/ui/dialog/_close.html.erb +24 -0
- data/app/views/ui/dialog/_content.html.erb +22 -0
- data/app/views/ui/dialog/_description.html.erb +14 -0
- data/app/views/ui/dialog/_footer.html.erb +14 -0
- data/app/views/ui/dialog/_header.html.erb +14 -0
- data/app/views/ui/dialog/_overlay.html.erb +19 -0
- data/app/views/ui/dialog/_title.html.erb +14 -0
- data/app/views/ui/dialog/_trigger.html.erb +24 -0
- data/app/views/ui/drawer/_close.html.erb +17 -0
- data/app/views/ui/drawer/_content.html.erb +31 -0
- data/app/views/ui/drawer/_description.html.erb +15 -0
- data/app/views/ui/drawer/_footer.html.erb +15 -0
- data/app/views/ui/drawer/_handle.html.erb +12 -0
- data/app/views/ui/drawer/_header.html.erb +15 -0
- data/app/views/ui/drawer/_overlay.html.erb +16 -0
- data/app/views/ui/drawer/_title.html.erb +15 -0
- data/app/views/ui/drawer/_trigger.html.erb +25 -0
- data/app/views/ui/dropdown_menu/_checkbox_item.html.erb +24 -0
- data/app/views/ui/dropdown_menu/_content.html.erb +15 -0
- data/app/views/ui/dropdown_menu/_item.html.erb +24 -0
- data/app/views/ui/dropdown_menu/_label.html.erb +16 -0
- data/app/views/ui/dropdown_menu/_radio_group.html.erb +15 -0
- data/app/views/ui/dropdown_menu/_radio_item.html.erb +27 -0
- data/app/views/ui/dropdown_menu/_separator.html.erb +12 -0
- data/app/views/ui/dropdown_menu/_shortcut.html.erb +15 -0
- data/app/views/ui/dropdown_menu/_sub.html.erb +14 -0
- data/app/views/ui/dropdown_menu/_sub_content.html.erb +17 -0
- data/app/views/ui/dropdown_menu/_sub_trigger.html.erb +17 -0
- data/app/views/ui/dropdown_menu/_trigger.html.erb +20 -0
- data/app/views/ui/empty/_content.html.erb +13 -0
- data/app/views/ui/empty/_description.html.erb +13 -0
- data/app/views/ui/empty/_header.html.erb +13 -0
- data/app/views/ui/empty/_media.html.erb +14 -0
- data/app/views/ui/empty/_title.html.erb +13 -0
- data/app/views/ui/field/_content.html.erb +14 -0
- data/app/views/ui/field/_description.html.erb +15 -0
- data/app/views/ui/field/_error.html.erb +15 -0
- data/app/views/ui/field/_group.html.erb +14 -0
- data/app/views/ui/field/_label.html.erb +15 -0
- data/app/views/ui/field/_legend.html.erb +16 -0
- data/app/views/ui/field/_separator.html.erb +15 -0
- data/app/views/ui/field/_set.html.erb +14 -0
- data/app/views/ui/field/_title.html.erb +15 -0
- data/app/views/ui/hover_card/_content.html.erb +16 -0
- data/app/views/ui/hover_card/_trigger.html.erb +27 -0
- data/app/views/ui/input_group/_addon.html.erb +15 -0
- data/app/views/ui/input_group/_button.html.erb +18 -0
- data/app/views/ui/input_group/_input.html.erb +17 -0
- data/app/views/ui/input_group/_text.html.erb +15 -0
- data/app/views/ui/input_group/_textarea.html.erb +17 -0
- data/app/views/ui/input_otp/_group.html.erb +20 -0
- data/app/views/ui/input_otp/_separator.html.erb +22 -0
- data/app/views/ui/input_otp/_slot.html.erb +28 -0
- data/app/views/ui/item/_actions.html.erb +7 -0
- data/app/views/ui/item/_content.html.erb +7 -0
- data/app/views/ui/item/_description.html.erb +7 -0
- data/app/views/ui/item/_footer.html.erb +7 -0
- data/app/views/ui/item/_group.html.erb +7 -0
- data/app/views/ui/item/_header.html.erb +7 -0
- data/app/views/ui/item/_media.html.erb +8 -0
- data/app/views/ui/item/_separator.html.erb +5 -0
- data/app/views/ui/item/_title.html.erb +7 -0
- data/app/views/ui/kbd/_group.html.erb +14 -0
- data/app/views/ui/menubar/_checkbox_item.html.erb +24 -0
- data/app/views/ui/menubar/_content.html.erb +18 -0
- data/app/views/ui/menubar/_item.html.erb +24 -0
- data/app/views/ui/menubar/_label.html.erb +16 -0
- data/app/views/ui/menubar/_menu.html.erb +14 -0
- data/app/views/ui/menubar/_radio_group.html.erb +16 -0
- data/app/views/ui/menubar/_radio_item.html.erb +25 -0
- data/app/views/ui/menubar/_separator.html.erb +12 -0
- data/app/views/ui/menubar/_shortcut.html.erb +15 -0
- data/app/views/ui/menubar/_sub.html.erb +15 -0
- data/app/views/ui/menubar/_sub_content.html.erb +15 -0
- data/app/views/ui/menubar/_sub_trigger.html.erb +20 -0
- data/app/views/ui/menubar/_trigger.html.erb +15 -0
- data/app/views/ui/navigation_menu/_content.html.erb +13 -0
- data/app/views/ui/navigation_menu/_item.html.erb +13 -0
- data/app/views/ui/navigation_menu/_link.html.erb +33 -0
- data/app/views/ui/navigation_menu/_list.html.erb +12 -0
- data/app/views/ui/navigation_menu/_trigger.html.erb +30 -0
- data/app/views/ui/navigation_menu/_viewport.html.erb +13 -0
- data/app/views/ui/pagination/_content.html.erb +14 -0
- data/app/views/ui/pagination/_ellipsis.html.erb +19 -0
- data/app/views/ui/pagination/_item.html.erb +14 -0
- data/app/views/ui/pagination/_link.html.erb +18 -0
- data/app/views/ui/pagination/_next.html.erb +19 -0
- data/app/views/ui/pagination/_previous.html.erb +19 -0
- data/app/views/ui/popover/_content.html.erb +14 -0
- data/app/views/ui/popover/_trigger.html.erb +15 -0
- data/app/views/ui/resizable/_handle.html.erb +22 -0
- data/app/views/ui/resizable/_panel.html.erb +21 -0
- data/app/views/ui/resizable/_panel_group.html.erb +20 -0
- data/app/views/ui/scroll_area/_corner.html.erb +40 -0
- data/app/views/ui/scroll_area/_scrollbar.html.erb +50 -0
- data/app/views/ui/scroll_area/_thumb.html.erb +44 -0
- data/app/views/ui/scroll_area/_viewport.html.erb +47 -0
- data/app/views/ui/select/_content.html.erb +25 -0
- data/app/views/ui/select/_group.html.erb +42 -0
- data/app/views/ui/select/_item.html.erb +48 -0
- data/app/views/ui/select/_label.html.erb +42 -0
- data/app/views/ui/select/_scroll_down_button.html.erb +44 -0
- data/app/views/ui/select/_scroll_up_button.html.erb +44 -0
- data/app/views/ui/select/_trigger.html.erb +43 -0
- data/app/views/ui/sheet/_close.html.erb +24 -0
- data/app/views/ui/sheet/_content.html.erb +30 -0
- data/app/views/ui/sheet/_description.html.erb +14 -0
- data/app/views/ui/sheet/_footer.html.erb +14 -0
- data/app/views/ui/sheet/_header.html.erb +14 -0
- data/app/views/ui/sheet/_overlay.html.erb +19 -0
- data/app/views/ui/sheet/_title.html.erb +14 -0
- data/app/views/ui/sheet/_trigger.html.erb +21 -0
- data/app/views/ui/slider/_range.html.erb +13 -0
- data/app/views/ui/slider/_thumb.html.erb +14 -0
- data/app/views/ui/slider/_track.html.erb +16 -0
- data/app/views/ui/sonner/_toaster.html.erb +38 -0
- data/app/views/ui/table/_body.html.erb +18 -0
- data/app/views/ui/table/_caption.html.erb +18 -0
- data/app/views/ui/table/_cell.html.erb +18 -0
- data/app/views/ui/table/_footer.html.erb +18 -0
- data/app/views/ui/table/_head.html.erb +18 -0
- data/app/views/ui/table/_header.html.erb +18 -0
- data/app/views/ui/table/_row.html.erb +18 -0
- data/app/views/ui/tabs/_content.html.erb +19 -0
- data/app/views/ui/tabs/_list.html.erb +16 -0
- data/app/views/ui/tabs/_trigger.html.erb +20 -0
- data/app/views/ui/toggle_group/_item.html.erb +51 -0
- data/app/views/ui/tooltip/_content.html.erb +17 -0
- data/app/views/ui/tooltip/_trigger.html.erb +39 -0
- data/config/importmap.rb +6 -0
- data/config/routes.rb +3 -0
- data/lib/fernandes-ui.rb +12 -0
- data/lib/generators/ui/install/install_generator.rb +141 -0
- data/lib/generators/ui/install/templates/Procfile.dev +2 -0
- data/lib/generators/ui/install/templates/application.tailwind.css +32 -0
- data/lib/generators/ui/install/templates/package.json +13 -0
- data/lib/tasks/ui_tasks.rake +4 -0
- data/lib/ui/configuration.rb +54 -0
- data/lib/ui/engine.rb +158 -0
- data/lib/ui/version.rb +3 -0
- data/lib/ui.rb +8 -0
- metadata +1214 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# TriggerComponent - ViewComponent implementation
|
|
4
|
+
class UI::DropdownMenuTriggerComponent < ViewComponent::Base
|
|
5
|
+
include UI::DropdownMenuTriggerBehavior
|
|
6
|
+
|
|
7
|
+
def initialize(as_child: false, classes: "", **attributes)
|
|
8
|
+
@as_child = as_child
|
|
9
|
+
@classes = classes
|
|
10
|
+
@attributes = attributes
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def call
|
|
14
|
+
trigger_attrs = dropdown_menu_trigger_html_attributes.deep_merge(@attributes)
|
|
15
|
+
|
|
16
|
+
if @as_child
|
|
17
|
+
# asChild mode: merge attributes into child element
|
|
18
|
+
rendered = content.to_s
|
|
19
|
+
doc = Nokogiri::HTML::DocumentFragment.parse(rendered)
|
|
20
|
+
first_element = doc.children.find { |node| node.element? }
|
|
21
|
+
|
|
22
|
+
if first_element
|
|
23
|
+
# Merge data attributes (convert Rails naming to HTML)
|
|
24
|
+
trigger_attrs.fetch(:data, {}).each do |key, value|
|
|
25
|
+
html_key = key.to_s.gsub("__", "--").gsub("_", "-")
|
|
26
|
+
first_element["data-#{html_key}"] = value
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Merge CSS classes with TailwindMerge
|
|
30
|
+
if trigger_attrs[:class]
|
|
31
|
+
existing_classes = first_element["class"] || ""
|
|
32
|
+
merged_classes = TailwindMerge::Merger.new.merge([existing_classes, trigger_attrs[:class]].join(" "))
|
|
33
|
+
first_element["class"] = merged_classes
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Merge other attributes (except data and class)
|
|
37
|
+
trigger_attrs.except(:data, :class).each do |key, value|
|
|
38
|
+
first_element[key.to_s] = value
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
doc.to_html.html_safe
|
|
42
|
+
else
|
|
43
|
+
content
|
|
44
|
+
end
|
|
45
|
+
else
|
|
46
|
+
# Default mode: render as div
|
|
47
|
+
content_tag :div, **trigger_attrs do
|
|
48
|
+
content
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# EmptyComponent - ViewComponent implementation
|
|
4
|
+
class UI::EmptyComponent < ViewComponent::Base
|
|
5
|
+
include UI::EmptyBehavior
|
|
6
|
+
|
|
7
|
+
def initialize(classes: "", **attributes)
|
|
8
|
+
@classes = classes
|
|
9
|
+
@attributes = attributes
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def call
|
|
13
|
+
tag.div(**empty_html_attributes.merge(@attributes)) do
|
|
14
|
+
content
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# EmptyContentComponent - ViewComponent implementation
|
|
4
|
+
class UI::EmptyContentComponent < ViewComponent::Base
|
|
5
|
+
include UI::EmptyContentBehavior
|
|
6
|
+
|
|
7
|
+
def initialize(classes: "", **attributes)
|
|
8
|
+
@classes = classes
|
|
9
|
+
@attributes = attributes
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def call
|
|
13
|
+
tag.div(**empty_content_html_attributes.merge(@attributes)) do
|
|
14
|
+
content
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# EmptyDescriptionComponent - ViewComponent implementation
|
|
4
|
+
class UI::EmptyDescriptionComponent < ViewComponent::Base
|
|
5
|
+
include UI::EmptyDescriptionBehavior
|
|
6
|
+
|
|
7
|
+
def initialize(classes: "", **attributes)
|
|
8
|
+
@classes = classes
|
|
9
|
+
@attributes = attributes
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def call
|
|
13
|
+
tag.p(**empty_description_html_attributes.merge(@attributes)) do
|
|
14
|
+
content
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# EmptyHeaderComponent - ViewComponent implementation
|
|
4
|
+
class UI::EmptyHeaderComponent < ViewComponent::Base
|
|
5
|
+
include UI::EmptyHeaderBehavior
|
|
6
|
+
|
|
7
|
+
def initialize(classes: "", **attributes)
|
|
8
|
+
@classes = classes
|
|
9
|
+
@attributes = attributes
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def call
|
|
13
|
+
tag.div(**empty_header_html_attributes.merge(@attributes)) do
|
|
14
|
+
content
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# EmptyMediaComponent - ViewComponent implementation
|
|
4
|
+
class UI::EmptyMediaComponent < ViewComponent::Base
|
|
5
|
+
include UI::EmptyMediaBehavior
|
|
6
|
+
|
|
7
|
+
def initialize(variant: "default", classes: "", **attributes)
|
|
8
|
+
@variant = variant
|
|
9
|
+
@classes = classes
|
|
10
|
+
@attributes = attributes
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def call
|
|
14
|
+
tag.div(**empty_media_html_attributes.merge(@attributes)) do
|
|
15
|
+
content
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# EmptyTitleComponent - ViewComponent implementation
|
|
4
|
+
class UI::EmptyTitleComponent < ViewComponent::Base
|
|
5
|
+
include UI::EmptyTitleBehavior
|
|
6
|
+
|
|
7
|
+
def initialize(classes: "", **attributes)
|
|
8
|
+
@classes = classes
|
|
9
|
+
@attributes = attributes
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def call
|
|
13
|
+
tag.h3(**empty_title_html_attributes.merge(@attributes)) do
|
|
14
|
+
content
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# FieldComponent - ViewComponent implementation
|
|
4
|
+
#
|
|
5
|
+
# Core wrapper for a single form field with support for different orientations.
|
|
6
|
+
# Uses FieldBehavior concern for shared styling logic.
|
|
7
|
+
#
|
|
8
|
+
# @example Basic usage
|
|
9
|
+
# <%= render UI::FieldComponent.new do %>
|
|
10
|
+
# Field content here
|
|
11
|
+
# <% end %>
|
|
12
|
+
#
|
|
13
|
+
# @example With orientation
|
|
14
|
+
# <%= render UI::FieldComponent.new(orientation: "horizontal") do %>
|
|
15
|
+
# Field content
|
|
16
|
+
# <% end %>
|
|
17
|
+
#
|
|
18
|
+
# @example With validation state
|
|
19
|
+
# <%= render UI::FieldComponent.new(data_invalid: true) do %>
|
|
20
|
+
# Field content
|
|
21
|
+
# <% end %>
|
|
22
|
+
class UI::FieldComponent < ViewComponent::Base
|
|
23
|
+
include UI::FieldBehavior
|
|
24
|
+
|
|
25
|
+
# @param orientation [String] Layout orientation: "vertical", "horizontal", or "responsive"
|
|
26
|
+
# @param data_invalid [Boolean] Whether field is in invalid state
|
|
27
|
+
# @param classes [String] Additional CSS classes to merge
|
|
28
|
+
# @param attributes [Hash] Additional HTML attributes
|
|
29
|
+
def initialize(orientation: "vertical", data_invalid: nil, classes: "", **attributes)
|
|
30
|
+
@orientation = orientation
|
|
31
|
+
@data_invalid = data_invalid
|
|
32
|
+
@classes = classes
|
|
33
|
+
@attributes = attributes
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def call
|
|
37
|
+
content_tag :div, **field_html_attributes do
|
|
38
|
+
content
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# FieldContentComponent - ViewComponent implementation
|
|
4
|
+
#
|
|
5
|
+
# Flex column that groups control and descriptions.
|
|
6
|
+
# Uses FieldContentBehavior concern for shared styling logic.
|
|
7
|
+
#
|
|
8
|
+
# @example Basic usage
|
|
9
|
+
# <%= render UI::FieldContentComponent.new do %>
|
|
10
|
+
# Content here
|
|
11
|
+
# <% end %>
|
|
12
|
+
class UI::FieldContentComponent < ViewComponent::Base
|
|
13
|
+
include UI::FieldContentBehavior
|
|
14
|
+
|
|
15
|
+
# @param classes [String] Additional CSS classes to merge
|
|
16
|
+
# @param attributes [Hash] Additional HTML attributes
|
|
17
|
+
def initialize(classes: "", **attributes)
|
|
18
|
+
@classes = classes
|
|
19
|
+
@attributes = attributes
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def call
|
|
23
|
+
content_tag :div, **field_content_html_attributes do
|
|
24
|
+
content
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# FieldDescriptionComponent - ViewComponent implementation
|
|
4
|
+
#
|
|
5
|
+
# Helper text for form fields.
|
|
6
|
+
# Uses FieldDescriptionBehavior concern for shared styling logic.
|
|
7
|
+
#
|
|
8
|
+
# @example With block
|
|
9
|
+
# <%= render UI::FieldDescriptionComponent.new do %>
|
|
10
|
+
# Helper text
|
|
11
|
+
# <% end %>
|
|
12
|
+
class UI::FieldDescriptionComponent < ViewComponent::Base
|
|
13
|
+
include UI::FieldDescriptionBehavior
|
|
14
|
+
|
|
15
|
+
# @param classes [String] Additional CSS classes to merge
|
|
16
|
+
# @param attributes [Hash] Additional HTML attributes
|
|
17
|
+
def initialize(classes: "", **attributes)
|
|
18
|
+
@classes = classes
|
|
19
|
+
@attributes = attributes
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def call
|
|
23
|
+
content_tag :p, **field_description_html_attributes do
|
|
24
|
+
content
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# FieldErrorComponent - ViewComponent implementation
|
|
4
|
+
#
|
|
5
|
+
# Error message display for form fields with accessibility support.
|
|
6
|
+
# Uses FieldErrorBehavior concern for shared styling logic.
|
|
7
|
+
#
|
|
8
|
+
# @example With single error
|
|
9
|
+
# <%= render UI::FieldErrorComponent.new(errors: ["Email is required"]) %>
|
|
10
|
+
#
|
|
11
|
+
# @example With multiple errors
|
|
12
|
+
# <%= render UI::FieldErrorComponent.new(errors: ["Email is required", "Email is invalid"]) %>
|
|
13
|
+
#
|
|
14
|
+
# @example With block
|
|
15
|
+
# <%= render UI::FieldErrorComponent.new do %>
|
|
16
|
+
# Error message
|
|
17
|
+
# <% end %>
|
|
18
|
+
class UI::FieldErrorComponent < ViewComponent::Base
|
|
19
|
+
include UI::FieldErrorBehavior
|
|
20
|
+
|
|
21
|
+
# @param errors [Array] Array of error messages
|
|
22
|
+
# @param classes [String] Additional CSS classes to merge
|
|
23
|
+
# @param attributes [Hash] Additional HTML attributes
|
|
24
|
+
def initialize(errors: nil, classes: "", **attributes)
|
|
25
|
+
@errors = errors
|
|
26
|
+
@classes = classes
|
|
27
|
+
@attributes = attributes
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def call
|
|
31
|
+
return unless has_errors? || content?
|
|
32
|
+
|
|
33
|
+
if has_errors?
|
|
34
|
+
render_errors
|
|
35
|
+
else
|
|
36
|
+
render_content
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
private
|
|
41
|
+
|
|
42
|
+
attr_reader :classes, :attributes
|
|
43
|
+
|
|
44
|
+
def render_errors
|
|
45
|
+
if single_error?
|
|
46
|
+
content_tag :p, **field_error_html_attributes do
|
|
47
|
+
error_message(@errors.first)
|
|
48
|
+
end
|
|
49
|
+
else
|
|
50
|
+
content_tag :ul, **field_error_html_attributes do
|
|
51
|
+
safe_join(@errors.map { |error|
|
|
52
|
+
content_tag :li, error_message(error)
|
|
53
|
+
})
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def render_content
|
|
59
|
+
content_tag :p, **field_error_html_attributes do
|
|
60
|
+
content
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# FieldGroupComponent - ViewComponent implementation
|
|
4
|
+
#
|
|
5
|
+
# Layout wrapper that stacks Field components.
|
|
6
|
+
# Uses FieldGroupBehavior concern for shared styling logic.
|
|
7
|
+
#
|
|
8
|
+
# @example Basic usage
|
|
9
|
+
# <%= render UI::FieldGroupComponent.new do %>
|
|
10
|
+
# <%= render UI::FieldComponent.new do %>
|
|
11
|
+
# Field 1
|
|
12
|
+
# <% end %>
|
|
13
|
+
# <%= render UI::FieldComponent.new do %>
|
|
14
|
+
# Field 2
|
|
15
|
+
# <% end %>
|
|
16
|
+
# <% end %>
|
|
17
|
+
class UI::FieldGroupComponent < ViewComponent::Base
|
|
18
|
+
include UI::FieldGroupBehavior
|
|
19
|
+
|
|
20
|
+
# @param classes [String] Additional CSS classes to merge
|
|
21
|
+
# @param attributes [Hash] Additional HTML attributes
|
|
22
|
+
def initialize(classes: "", **attributes)
|
|
23
|
+
@classes = classes
|
|
24
|
+
@attributes = attributes
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def call
|
|
28
|
+
content_tag :div, **field_group_html_attributes do
|
|
29
|
+
content
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# FieldLabelComponent - ViewComponent implementation
|
|
4
|
+
#
|
|
5
|
+
# Label styled for form fields with disability states.
|
|
6
|
+
# Uses FieldLabelBehavior concern for shared styling logic.
|
|
7
|
+
#
|
|
8
|
+
# @example With block
|
|
9
|
+
# <%= render UI::FieldLabelComponent.new(for_id: "email") do %>
|
|
10
|
+
# Email Address
|
|
11
|
+
# <% end %>
|
|
12
|
+
class UI::FieldLabelComponent < ViewComponent::Base
|
|
13
|
+
include UI::FieldLabelBehavior
|
|
14
|
+
|
|
15
|
+
# @param for_id [String] ID of the associated form control
|
|
16
|
+
# @param classes [String] Additional CSS classes to merge
|
|
17
|
+
# @param attributes [Hash] Additional HTML attributes
|
|
18
|
+
def initialize(for_id: nil, classes: "", **attributes)
|
|
19
|
+
@for_id = for_id
|
|
20
|
+
@classes = classes
|
|
21
|
+
@attributes = attributes
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def call
|
|
25
|
+
content_tag :label, **field_label_html_attributes do
|
|
26
|
+
content
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# FieldLegendComponent - ViewComponent implementation
|
|
4
|
+
#
|
|
5
|
+
# Legend element for FieldSet with variant support.
|
|
6
|
+
# Uses FieldLegendBehavior concern for shared styling logic.
|
|
7
|
+
#
|
|
8
|
+
# @example With block
|
|
9
|
+
# <%= render UI::FieldLegendComponent.new do %>
|
|
10
|
+
# Personal Information
|
|
11
|
+
# <% end %>
|
|
12
|
+
#
|
|
13
|
+
# @example With variant
|
|
14
|
+
# <%= render UI::FieldLegendComponent.new(variant: "label") do %>
|
|
15
|
+
# Settings
|
|
16
|
+
# <% end %>
|
|
17
|
+
class UI::FieldLegendComponent < ViewComponent::Base
|
|
18
|
+
include UI::FieldLegendBehavior
|
|
19
|
+
|
|
20
|
+
# @param variant [String] Style variant: "legend" or "label"
|
|
21
|
+
# @param classes [String] Additional CSS classes to merge
|
|
22
|
+
# @param attributes [Hash] Additional HTML attributes
|
|
23
|
+
def initialize(variant: "legend", classes: "", **attributes)
|
|
24
|
+
@variant = variant
|
|
25
|
+
@classes = classes
|
|
26
|
+
@attributes = attributes
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def call
|
|
30
|
+
content_tag :legend, **field_legend_html_attributes do
|
|
31
|
+
content
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# FieldSeparatorComponent - ViewComponent implementation
|
|
4
|
+
#
|
|
5
|
+
# Visual divider to separate sections inside FieldGroup.
|
|
6
|
+
# Uses FieldSeparatorBehavior concern for shared styling logic.
|
|
7
|
+
#
|
|
8
|
+
# @example Basic separator (line only)
|
|
9
|
+
# <%= render UI::FieldSeparatorComponent.new %>
|
|
10
|
+
#
|
|
11
|
+
# @example With block
|
|
12
|
+
# <%= render UI::FieldSeparatorComponent.new do %>
|
|
13
|
+
# OR
|
|
14
|
+
# <% end %>
|
|
15
|
+
class UI::FieldSeparatorComponent < ViewComponent::Base
|
|
16
|
+
include UI::FieldSeparatorBehavior
|
|
17
|
+
|
|
18
|
+
# @param classes [String] Additional CSS classes to merge
|
|
19
|
+
# @param attributes [Hash] Additional HTML attributes
|
|
20
|
+
def initialize(classes: "", **attributes)
|
|
21
|
+
@classes = classes
|
|
22
|
+
@attributes = attributes
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def call
|
|
26
|
+
content_tag :div, **field_separator_html_attributes do
|
|
27
|
+
if content?
|
|
28
|
+
render_with_label
|
|
29
|
+
else
|
|
30
|
+
render_line_only
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
private
|
|
36
|
+
|
|
37
|
+
attr_reader :classes, :attributes
|
|
38
|
+
|
|
39
|
+
def render_with_label
|
|
40
|
+
safe_join([
|
|
41
|
+
content_tag(:div, class: "border-border bg-background absolute inset-x-0 flex items-center") do
|
|
42
|
+
content_tag(:div, "", class: "border-border w-full border-t")
|
|
43
|
+
end,
|
|
44
|
+
content_tag(:span, class: "bg-background text-muted-foreground relative px-2") do
|
|
45
|
+
content
|
|
46
|
+
end
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def render_line_only
|
|
51
|
+
content_tag(:div, "", class: "border-border w-full border-t")
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# FieldSetComponent - ViewComponent implementation
|
|
4
|
+
#
|
|
5
|
+
# Semantic fieldset container for grouped fields.
|
|
6
|
+
# Uses FieldSetBehavior concern for shared styling logic.
|
|
7
|
+
#
|
|
8
|
+
# @example Basic usage
|
|
9
|
+
# <%= render UI::FieldSetComponent.new do %>
|
|
10
|
+
# <%= render UI::FieldLegendComponent.new do %>
|
|
11
|
+
# Contact Information
|
|
12
|
+
# <% end %>
|
|
13
|
+
# Field groups here
|
|
14
|
+
# <% end %>
|
|
15
|
+
class UI::FieldSetComponent < ViewComponent::Base
|
|
16
|
+
include UI::FieldSetBehavior
|
|
17
|
+
|
|
18
|
+
# @param classes [String] Additional CSS classes to merge
|
|
19
|
+
# @param attributes [Hash] Additional HTML attributes
|
|
20
|
+
def initialize(classes: "", **attributes)
|
|
21
|
+
@classes = classes
|
|
22
|
+
@attributes = attributes
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def call
|
|
26
|
+
content_tag :fieldset, **field_set_html_attributes do
|
|
27
|
+
content
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# FieldTitleComponent - ViewComponent implementation
|
|
4
|
+
#
|
|
5
|
+
# Title with label styling inside FieldContent.
|
|
6
|
+
# Uses FieldTitleBehavior concern for shared styling logic.
|
|
7
|
+
#
|
|
8
|
+
# @example With block
|
|
9
|
+
# <%= render UI::FieldTitleComponent.new do %>
|
|
10
|
+
# Section Title
|
|
11
|
+
# <% end %>
|
|
12
|
+
class UI::FieldTitleComponent < ViewComponent::Base
|
|
13
|
+
include UI::FieldTitleBehavior
|
|
14
|
+
|
|
15
|
+
# @param classes [String] Additional CSS classes to merge
|
|
16
|
+
# @param attributes [Hash] Additional HTML attributes
|
|
17
|
+
def initialize(classes: "", **attributes)
|
|
18
|
+
@classes = classes
|
|
19
|
+
@attributes = attributes
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def call
|
|
23
|
+
content_tag :div, **field_title_html_attributes do
|
|
24
|
+
content
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module UI
|
|
4
|
+
class H1Component < ViewComponent::Base
|
|
5
|
+
# @param classes [String] Additional CSS classes
|
|
6
|
+
def initialize(classes: nil, **attributes)
|
|
7
|
+
@classes = classes
|
|
8
|
+
@attributes = attributes
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def call
|
|
12
|
+
extend UI::H1Behavior
|
|
13
|
+
|
|
14
|
+
attrs = h1_html_attributes
|
|
15
|
+
|
|
16
|
+
content_tag :h1, **attrs.merge(@attributes) do
|
|
17
|
+
content
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module UI
|
|
4
|
+
class H2Component < ViewComponent::Base
|
|
5
|
+
# @param classes [String] Additional CSS classes
|
|
6
|
+
def initialize(classes: nil, **attributes)
|
|
7
|
+
@classes = classes
|
|
8
|
+
@attributes = attributes
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def call
|
|
12
|
+
extend UI::H2Behavior
|
|
13
|
+
|
|
14
|
+
attrs = h2_html_attributes
|
|
15
|
+
|
|
16
|
+
content_tag :h2, **attrs.merge(@attributes) do
|
|
17
|
+
content
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module UI
|
|
4
|
+
class H3Component < ViewComponent::Base
|
|
5
|
+
def initialize(classes: nil, **attributes)
|
|
6
|
+
@classes = classes
|
|
7
|
+
@attributes = attributes
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def call
|
|
11
|
+
extend UI::H3Behavior
|
|
12
|
+
attrs = h3_html_attributes
|
|
13
|
+
content_tag :h3, **attrs.merge(@attributes) do
|
|
14
|
+
content
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module UI
|
|
4
|
+
class H4Component < ViewComponent::Base
|
|
5
|
+
def initialize(classes: nil, **attributes)
|
|
6
|
+
@classes = classes
|
|
7
|
+
@attributes = attributes
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def call
|
|
11
|
+
extend UI::H4Behavior
|
|
12
|
+
attrs = h4_html_attributes
|
|
13
|
+
content_tag :h4, **attrs.merge(@attributes) do
|
|
14
|
+
content
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# HoverCardComponent - ViewComponent implementation
|
|
4
|
+
#
|
|
5
|
+
# Container for hover card trigger and content.
|
|
6
|
+
# Uses HoverCardBehavior for shared styling logic.
|
|
7
|
+
#
|
|
8
|
+
# @example Basic usage
|
|
9
|
+
# <%= render UI::HoverCardComponent.new do %>
|
|
10
|
+
# <%= render UI::TriggerComponent.new { "Hover me" } %>
|
|
11
|
+
# <%= render UI::ContentComponent.new { "Content" } %>
|
|
12
|
+
# <% end %>
|
|
13
|
+
class UI::HoverCardComponent < ViewComponent::Base
|
|
14
|
+
include UI::HoverCardBehavior
|
|
15
|
+
|
|
16
|
+
# @param classes [String] Additional CSS classes to merge
|
|
17
|
+
# @param attributes [Hash] Additional HTML attributes
|
|
18
|
+
def initialize(classes: "", **attributes)
|
|
19
|
+
@classes = classes
|
|
20
|
+
@attributes = attributes
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def call
|
|
24
|
+
attrs = hover_card_html_attributes
|
|
25
|
+
|
|
26
|
+
content_tag :div, **attrs.merge(@attributes) do
|
|
27
|
+
content
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|