fernandes-ui 0.1.1 → 0.1.2
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 +4 -4
- data/README.md +7 -0
- data/app/assets/javascripts/ui.esm.js +12 -3
- data/app/assets/javascripts/ui.js +12 -3
- data/app/behaviors/ui/accordion_behavior.rb +50 -26
- data/app/behaviors/ui/accordion_content_behavior.rb +58 -58
- data/app/behaviors/ui/accordion_item_behavior.rb +38 -38
- data/app/behaviors/ui/accordion_trigger_behavior.rb +65 -65
- data/app/behaviors/ui/alert_behavior.rb +53 -36
- data/app/behaviors/ui/alert_description_behavior.rb +25 -25
- data/app/behaviors/ui/alert_dialog_action_behavior.rb +21 -21
- data/app/behaviors/ui/alert_dialog_behavior.rb +58 -33
- data/app/behaviors/ui/alert_dialog_cancel_behavior.rb +21 -21
- data/app/behaviors/ui/alert_dialog_content_behavior.rb +34 -34
- data/app/behaviors/ui/alert_dialog_description_behavior.rb +19 -19
- data/app/behaviors/ui/alert_dialog_footer_behavior.rb +20 -20
- data/app/behaviors/ui/alert_dialog_header_behavior.rb +19 -19
- data/app/behaviors/ui/alert_dialog_overlay_behavior.rb +56 -56
- data/app/behaviors/ui/alert_dialog_title_behavior.rb +19 -19
- data/app/behaviors/ui/alert_dialog_trigger_behavior.rb +31 -31
- data/app/behaviors/ui/alert_title_behavior.rb +25 -25
- data/app/behaviors/ui/aspect_ratio_behavior.rb +46 -38
- data/app/behaviors/ui/avatar_behavior.rb +44 -37
- data/app/behaviors/ui/avatar_fallback_behavior.rb +37 -37
- data/app/behaviors/ui/avatar_image_behavior.rb +40 -40
- data/app/behaviors/ui/badge_behavior.rb +50 -43
- data/app/behaviors/ui/blockquote_behavior.rb +25 -17
- data/app/behaviors/ui/breadcrumb_behavior.rb +35 -19
- data/app/behaviors/ui/breadcrumb_ellipsis_behavior.rb +28 -28
- data/app/behaviors/ui/breadcrumb_item_behavior.rb +26 -26
- data/app/behaviors/ui/breadcrumb_link_behavior.rb +27 -27
- data/app/behaviors/ui/breadcrumb_list_behavior.rb +26 -26
- data/app/behaviors/ui/breadcrumb_page_behavior.rb +29 -29
- data/app/behaviors/ui/breadcrumb_separator_behavior.rb +28 -28
- data/app/behaviors/ui/button_behavior.rb +94 -82
- data/app/behaviors/ui/button_group_behavior.rb +48 -48
- data/app/behaviors/ui/button_group_separator_behavior.rb +29 -29
- data/app/behaviors/ui/button_group_text_behavior.rb +29 -29
- data/app/behaviors/ui/calendar_behavior.rb +131 -104
- data/app/behaviors/ui/card_action_behavior.rb +26 -26
- data/app/behaviors/ui/card_behavior.rb +40 -26
- data/app/behaviors/ui/card_content_behavior.rb +26 -26
- data/app/behaviors/ui/card_description_behavior.rb +26 -26
- data/app/behaviors/ui/card_footer_behavior.rb +26 -26
- data/app/behaviors/ui/card_header_behavior.rb +26 -26
- data/app/behaviors/ui/card_title_behavior.rb +26 -26
- data/app/behaviors/ui/carousel_behavior.rb +74 -48
- data/app/behaviors/ui/carousel_content_behavior.rb +53 -53
- data/app/behaviors/ui/carousel_item_behavior.rb +20 -20
- data/app/behaviors/ui/carousel_next_behavior.rb +31 -31
- data/app/behaviors/ui/carousel_previous_behavior.rb +31 -31
- data/app/behaviors/ui/checkbox_behavior.rb +54 -38
- data/app/behaviors/ui/collapsible_behavior.rb +49 -34
- data/app/behaviors/ui/collapsible_content_behavior.rb +31 -31
- data/app/behaviors/ui/collapsible_trigger_behavior.rb +47 -47
- data/app/behaviors/ui/command_behavior.rb +56 -29
- data/app/behaviors/ui/command_dialog_behavior.rb +52 -28
- data/app/behaviors/ui/command_empty_behavior.rb +28 -28
- data/app/behaviors/ui/command_group_behavior.rb +34 -34
- data/app/behaviors/ui/command_input_behavior.rb +40 -40
- data/app/behaviors/ui/command_item_behavior.rb +39 -39
- data/app/behaviors/ui/command_list_behavior.rb +30 -30
- data/app/behaviors/ui/command_separator_behavior.rb +23 -23
- data/app/behaviors/ui/command_shortcut_behavior.rb +22 -22
- data/app/behaviors/ui/context_menu_behavior.rb +55 -28
- data/app/behaviors/ui/context_menu_checkbox_item_behavior.rb +32 -32
- data/app/behaviors/ui/context_menu_content_behavior.rb +32 -32
- data/app/behaviors/ui/context_menu_item_behavior.rb +34 -34
- data/app/behaviors/ui/context_menu_label_behavior.rb +28 -28
- data/app/behaviors/ui/context_menu_radio_group_behavior.rb +17 -17
- data/app/behaviors/ui/context_menu_radio_item_behavior.rb +32 -32
- data/app/behaviors/ui/context_menu_separator_behavior.rb +18 -18
- data/app/behaviors/ui/context_menu_shortcut_behavior.rb +17 -17
- data/app/behaviors/ui/context_menu_trigger_behavior.rb +28 -28
- data/app/behaviors/ui/date_picker_behavior.rb +95 -78
- data/app/behaviors/ui/date_picker_input_behavior.rb +56 -56
- data/app/behaviors/ui/date_picker_trigger_behavior.rb +56 -56
- data/app/behaviors/ui/dialog_behavior.rb +67 -42
- data/app/behaviors/ui/dialog_content_behavior.rb +38 -38
- data/app/behaviors/ui/dialog_footer_behavior.rb +20 -20
- data/app/behaviors/ui/dialog_header_behavior.rb +20 -20
- data/app/behaviors/ui/dialog_overlay_behavior.rb +57 -57
- data/app/behaviors/ui/drawer_behavior.rb +79 -52
- data/app/behaviors/ui/drawer_close_behavior.rb +8 -8
- data/app/behaviors/ui/drawer_content_behavior.rb +90 -90
- data/app/behaviors/ui/drawer_description_behavior.rb +17 -17
- data/app/behaviors/ui/drawer_footer_behavior.rb +17 -17
- data/app/behaviors/ui/drawer_handle_behavior.rb +33 -33
- data/app/behaviors/ui/drawer_header_behavior.rb +23 -23
- data/app/behaviors/ui/drawer_overlay_behavior.rb +63 -63
- data/app/behaviors/ui/drawer_title_behavior.rb +20 -20
- data/app/behaviors/ui/drawer_trigger_behavior.rb +15 -15
- data/app/behaviors/ui/dropdown_menu_behavior.rb +59 -37
- data/app/behaviors/ui/dropdown_menu_checkbox_item_behavior.rb +37 -39
- data/app/behaviors/ui/dropdown_menu_content_behavior.rb +32 -32
- data/app/behaviors/ui/dropdown_menu_item_behavior.rb +34 -34
- data/app/behaviors/ui/dropdown_menu_label_behavior.rb +25 -25
- data/app/behaviors/ui/dropdown_menu_radio_group_behavior.rb +17 -17
- data/app/behaviors/ui/dropdown_menu_radio_item_behavior.rb +37 -39
- data/app/behaviors/ui/dropdown_menu_separator_behavior.rb +19 -19
- data/app/behaviors/ui/dropdown_menu_shortcut_behavior.rb +17 -17
- data/app/behaviors/ui/dropdown_menu_sub_behavior.rb +17 -17
- data/app/behaviors/ui/dropdown_menu_sub_content_behavior.rb +33 -33
- data/app/behaviors/ui/dropdown_menu_sub_trigger_behavior.rb +30 -30
- data/app/behaviors/ui/dropdown_menu_trigger_behavior.rb +39 -39
- data/app/behaviors/ui/empty_behavior.rb +111 -100
- data/app/behaviors/ui/field_behavior.rb +51 -37
- data/app/behaviors/ui/field_content_behavior.rb +18 -20
- data/app/behaviors/ui/field_description_behavior.rb +18 -20
- data/app/behaviors/ui/field_error_behavior.rb +42 -37
- data/app/behaviors/ui/field_group_behavior.rb +18 -20
- data/app/behaviors/ui/field_label_behavior.rb +19 -21
- data/app/behaviors/ui/field_legend_behavior.rb +26 -22
- data/app/behaviors/ui/field_separator_behavior.rb +24 -26
- data/app/behaviors/ui/field_set_behavior.rb +24 -20
- data/app/behaviors/ui/field_title_behavior.rb +18 -20
- data/app/behaviors/ui/h1_behavior.rb +25 -17
- data/app/behaviors/ui/h2_behavior.rb +25 -17
- data/app/behaviors/ui/h3_behavior.rb +25 -17
- data/app/behaviors/ui/h4_behavior.rb +25 -17
- data/app/behaviors/ui/hover_card_behavior.rb +41 -25
- data/app/behaviors/ui/hover_card_content_behavior.rb +35 -35
- data/app/behaviors/ui/hover_card_trigger_behavior.rb +38 -38
- data/app/behaviors/ui/inline_code_behavior.rb +25 -17
- data/app/behaviors/ui/input_behavior.rb +52 -42
- data/app/behaviors/ui/input_group_addon_behavior.rb +9 -2
- data/app/behaviors/ui/input_group_button_behavior.rb +9 -2
- data/app/behaviors/ui/input_group_input_behavior.rb +1 -1
- data/app/behaviors/ui/input_group_textarea_behavior.rb +9 -3
- data/app/behaviors/ui/input_otp_behavior.rb +50 -36
- data/app/behaviors/ui/input_otp_group_behavior.rb +25 -25
- data/app/behaviors/ui/input_otp_separator_behavior.rb +26 -26
- data/app/behaviors/ui/input_otp_slot_behavior.rb +49 -41
- data/app/behaviors/ui/item_actions_behavior.rb +32 -26
- data/app/behaviors/ui/item_behavior.rb +100 -87
- data/app/behaviors/ui/item_content_behavior.rb +27 -26
- data/app/behaviors/ui/item_description_behavior.rb +27 -26
- data/app/behaviors/ui/item_footer_behavior.rb +27 -26
- data/app/behaviors/ui/item_group_behavior.rb +27 -26
- data/app/behaviors/ui/item_header_behavior.rb +27 -26
- data/app/behaviors/ui/item_media_behavior.rb +47 -41
- data/app/behaviors/ui/item_separator_behavior.rb +27 -26
- data/app/behaviors/ui/item_title_behavior.rb +27 -26
- data/app/behaviors/ui/kbd_behavior.rb +28 -22
- data/app/behaviors/ui/kbd_group_behavior.rb +18 -20
- data/app/behaviors/ui/label_behavior.rb +35 -26
- data/app/behaviors/ui/large_behavior.rb +25 -17
- data/app/behaviors/ui/lead_behavior.rb +25 -17
- data/app/behaviors/ui/list_behavior.rb +25 -17
- data/app/behaviors/ui/menubar_behavior.rb +73 -35
- data/app/behaviors/ui/menubar_checkbox_item_behavior.rb +54 -54
- data/app/behaviors/ui/menubar_content_behavior.rb +46 -46
- data/app/behaviors/ui/menubar_item_behavior.rb +63 -63
- data/app/behaviors/ui/menubar_label_behavior.rb +33 -33
- data/app/behaviors/ui/menubar_menu_behavior.rb +37 -33
- data/app/behaviors/ui/menubar_radio_group_behavior.rb +28 -28
- data/app/behaviors/ui/menubar_radio_item_behavior.rb +59 -59
- data/app/behaviors/ui/menubar_separator_behavior.rb +26 -26
- data/app/behaviors/ui/menubar_shortcut_behavior.rb +25 -25
- data/app/behaviors/ui/menubar_sub_behavior.rb +26 -26
- data/app/behaviors/ui/menubar_sub_content_behavior.rb +44 -44
- data/app/behaviors/ui/menubar_sub_trigger_behavior.rb +55 -55
- data/app/behaviors/ui/menubar_trigger_behavior.rb +40 -42
- data/app/behaviors/ui/muted_behavior.rb +25 -17
- data/app/behaviors/ui/navigation_menu_behavior.rb +65 -36
- data/app/behaviors/ui/navigation_menu_content_behavior.rb +58 -59
- data/app/behaviors/ui/navigation_menu_item_behavior.rb +31 -32
- data/app/behaviors/ui/navigation_menu_link_behavior.rb +57 -57
- data/app/behaviors/ui/navigation_menu_list_behavior.rb +28 -29
- data/app/behaviors/ui/navigation_menu_trigger_behavior.rb +50 -51
- data/app/behaviors/ui/navigation_menu_viewport_behavior.rb +54 -55
- data/app/behaviors/ui/p_behavior.rb +25 -17
- data/app/behaviors/ui/pagination_behavior.rb +36 -22
- data/app/behaviors/ui/pagination_content_behavior.rb +20 -20
- data/app/behaviors/ui/pagination_ellipsis_behavior.rb +21 -21
- data/app/behaviors/ui/pagination_item_behavior.rb +11 -11
- data/app/behaviors/ui/pagination_link_behavior.rb +51 -51
- data/app/behaviors/ui/pagination_next_behavior.rb +16 -16
- data/app/behaviors/ui/pagination_previous_behavior.rb +16 -16
- data/app/behaviors/ui/popover_behavior.rb +22 -3
- data/app/behaviors/ui/popover_content_behavior.rb +1 -1
- data/app/behaviors/ui/popover_trigger_behavior.rb +1 -1
- data/app/behaviors/ui/progress_behavior.rb +59 -40
- data/app/behaviors/ui/radio_button_behavior.rb +51 -36
- data/app/behaviors/ui/resizable_handle_behavior.rb +73 -73
- data/app/behaviors/ui/resizable_panel_behavior.rb +52 -45
- data/app/behaviors/ui/resizable_panel_group_behavior.rb +36 -36
- data/app/behaviors/ui/responsive_dialog_behavior.rb +43 -33
- data/app/behaviors/ui/scroll_area_behavior.rb +17 -2
- data/app/behaviors/ui/scroll_area_corner_behavior.rb +8 -2
- data/app/behaviors/ui/scroll_area_scrollbar_behavior.rb +8 -2
- data/app/behaviors/ui/scroll_area_thumb_behavior.rb +8 -2
- data/app/behaviors/ui/select_behavior.rb +111 -61
- data/app/behaviors/ui/select_content_behavior.rb +31 -31
- data/app/behaviors/ui/select_group_behavior.rb +24 -24
- data/app/behaviors/ui/select_item_behavior.rb +34 -34
- data/app/behaviors/ui/select_label_behavior.rb +23 -23
- data/app/behaviors/ui/select_scroll_down_button_behavior.rb +38 -38
- data/app/behaviors/ui/select_scroll_up_button_behavior.rb +38 -38
- data/app/behaviors/ui/select_trigger_behavior.rb +29 -29
- data/app/behaviors/ui/separator_behavior.rb +53 -49
- data/app/behaviors/ui/shared_as_child_behavior.rb +63 -63
- data/app/behaviors/ui/sheet_behavior.rb +63 -42
- data/app/behaviors/ui/sheet_content_behavior.rb +80 -80
- data/app/behaviors/ui/sheet_footer_behavior.rb +21 -21
- data/app/behaviors/ui/sheet_header_behavior.rb +21 -21
- data/app/behaviors/ui/sheet_overlay_behavior.rb +64 -64
- data/app/behaviors/ui/sidebar_behavior.rb +91 -76
- data/app/behaviors/ui/sidebar_content_behavior.rb +28 -28
- data/app/behaviors/ui/sidebar_footer_behavior.rb +27 -27
- data/app/behaviors/ui/sidebar_group_action_behavior.rb +32 -32
- data/app/behaviors/ui/sidebar_group_behavior.rb +27 -27
- data/app/behaviors/ui/sidebar_group_content_behavior.rb +27 -27
- data/app/behaviors/ui/sidebar_group_label_behavior.rb +31 -31
- data/app/behaviors/ui/sidebar_header_behavior.rb +27 -27
- data/app/behaviors/ui/sidebar_input_behavior.rb +28 -28
- data/app/behaviors/ui/sidebar_inset_behavior.rb +37 -31
- data/app/behaviors/ui/sidebar_menu_action_behavior.rb +45 -45
- data/app/behaviors/ui/sidebar_menu_badge_behavior.rb +38 -31
- data/app/behaviors/ui/sidebar_menu_behavior.rb +38 -27
- data/app/behaviors/ui/sidebar_menu_button_behavior.rb +67 -58
- data/app/behaviors/ui/sidebar_menu_item_behavior.rb +27 -27
- data/app/behaviors/ui/sidebar_menu_skeleton_behavior.rb +34 -27
- data/app/behaviors/ui/sidebar_menu_sub_behavior.rb +28 -28
- data/app/behaviors/ui/sidebar_menu_sub_button_behavior.rb +64 -55
- data/app/behaviors/ui/sidebar_menu_sub_item_behavior.rb +27 -27
- data/app/behaviors/ui/sidebar_provider_behavior.rb +53 -47
- data/app/behaviors/ui/sidebar_rail_behavior.rb +46 -39
- data/app/behaviors/ui/sidebar_separator_behavior.rb +28 -28
- data/app/behaviors/ui/sidebar_trigger_behavior.rb +32 -32
- data/app/behaviors/ui/slider_behavior.rb +40 -40
- data/app/behaviors/ui/slider_range_behavior.rb +15 -15
- data/app/behaviors/ui/slider_thumb_behavior.rb +21 -21
- data/app/behaviors/ui/slider_track_behavior.rb +19 -19
- data/app/behaviors/ui/small_behavior.rb +25 -17
- data/app/behaviors/ui/sonner_toaster_behavior.rb +37 -29
- data/app/behaviors/ui/spinner_behavior.rb +46 -41
- data/app/behaviors/ui/switch_behavior.rb +77 -56
- data/app/behaviors/ui/table_behavior.rb +30 -22
- data/app/behaviors/ui/table_body_behavior.rb +28 -22
- data/app/behaviors/ui/table_caption_behavior.rb +28 -22
- data/app/behaviors/ui/table_cell_behavior.rb +28 -22
- data/app/behaviors/ui/table_footer_behavior.rb +22 -22
- data/app/behaviors/ui/table_head_behavior.rb +28 -22
- data/app/behaviors/ui/table_header_behavior.rb +22 -22
- data/app/behaviors/ui/table_row_behavior.rb +28 -22
- data/app/behaviors/ui/tabs_behavior.rb +53 -28
- data/app/behaviors/ui/tabs_content_behavior.rb +33 -33
- data/app/behaviors/ui/tabs_list_behavior.rb +17 -17
- data/app/behaviors/ui/tabs_trigger_behavior.rb +42 -42
- data/app/behaviors/ui/textarea_behavior.rb +36 -28
- data/app/behaviors/ui/toggle_behavior.rb +83 -68
- data/app/behaviors/ui/toggle_group_behavior.rb +50 -52
- data/app/behaviors/ui/toggle_group_item_behavior.rb +69 -71
- data/app/behaviors/ui/tooltip_behavior.rb +36 -22
- data/app/behaviors/ui/tooltip_content_behavior.rb +53 -53
- data/app/behaviors/ui/tooltip_trigger_behavior.rb +55 -55
- data/app/components/ui/accordion.rb +32 -32
- data/app/components/ui/accordion_content.rb +25 -25
- data/app/components/ui/accordion_item.rb +41 -41
- data/app/components/ui/accordion_trigger.rb +44 -44
- data/app/components/ui/alert.rb +26 -26
- data/app/components/ui/alert_description.rb +21 -21
- data/app/components/ui/alert_dialog.rb +28 -28
- data/app/components/ui/alert_dialog_action.rb +29 -29
- data/app/components/ui/alert_dialog_cancel.rb +29 -29
- data/app/components/ui/alert_dialog_content.rb +20 -20
- data/app/components/ui/alert_dialog_description.rb +20 -20
- data/app/components/ui/alert_dialog_footer.rb +23 -23
- data/app/components/ui/alert_dialog_header.rb +22 -22
- data/app/components/ui/alert_dialog_overlay.rb +25 -25
- data/app/components/ui/alert_dialog_title.rb +20 -20
- data/app/components/ui/alert_dialog_trigger.rb +22 -22
- data/app/components/ui/alert_title.rb +19 -19
- data/app/components/ui/aspect_ratio.rb +26 -26
- data/app/components/ui/avatar.rb +26 -26
- data/app/components/ui/avatar_fallback.rb +28 -28
- data/app/components/ui/avatar_image.rb +29 -29
- data/app/components/ui/badge.rb +32 -32
- data/app/components/ui/blockquote.rb +1 -0
- data/app/components/ui/breadcrumb.rb +26 -26
- data/app/components/ui/breadcrumb_ellipsis.rb +47 -47
- data/app/components/ui/breadcrumb_item.rb +22 -22
- data/app/components/ui/breadcrumb_link.rb +22 -22
- data/app/components/ui/breadcrumb_list.rb +22 -22
- data/app/components/ui/breadcrumb_page.rb +20 -20
- data/app/components/ui/breadcrumb_separator.rb +43 -43
- data/app/components/ui/button.rb +44 -44
- data/app/components/ui/button_group.rb +44 -44
- data/app/components/ui/button_group_separator.rb +28 -28
- data/app/components/ui/button_group_text.rb +40 -40
- data/app/components/ui/calendar.rb +188 -188
- data/app/components/ui/card.rb +10 -10
- data/app/components/ui/card_action.rb +10 -10
- data/app/components/ui/card_content.rb +10 -10
- data/app/components/ui/card_description.rb +10 -10
- data/app/components/ui/card_footer.rb +10 -10
- data/app/components/ui/card_header.rb +10 -10
- data/app/components/ui/card_title.rb +10 -10
- data/app/components/ui/carousel.rb +14 -13
- data/app/components/ui/carousel_content.rb +12 -11
- data/app/components/ui/carousel_item.rb +11 -10
- data/app/components/ui/carousel_next.rb +13 -25
- data/app/components/ui/carousel_previous.rb +13 -25
- data/app/components/ui/checkbox.rb +43 -43
- data/app/components/ui/collapsible.rb +17 -17
- data/app/components/ui/collapsible_content.rb +11 -11
- data/app/components/ui/collapsible_trigger.rb +15 -15
- data/app/components/ui/combobox_wrapper.rb +53 -53
- data/app/components/ui/command.rb +12 -11
- data/app/components/ui/command_dialog.rb +17 -16
- data/app/components/ui/command_empty.rb +10 -10
- data/app/components/ui/command_group.rb +15 -15
- data/app/components/ui/command_input.rb +26 -26
- data/app/components/ui/command_item.rb +12 -12
- data/app/components/ui/command_list.rb +10 -10
- data/app/components/ui/command_separator.rb +10 -10
- data/app/components/ui/command_shortcut.rb +10 -10
- data/app/components/ui/context_menu.rb +25 -25
- data/app/components/ui/context_menu_checkbox_item.rb +42 -42
- data/app/components/ui/context_menu_content.rb +22 -22
- data/app/components/ui/context_menu_item.rb +34 -34
- data/app/components/ui/context_menu_label.rb +22 -22
- data/app/components/ui/context_menu_radio_group.rb +23 -23
- data/app/components/ui/context_menu_radio_item.rb +42 -42
- data/app/components/ui/context_menu_separator.rb +19 -19
- data/app/components/ui/context_menu_shortcut.rb +20 -20
- data/app/components/ui/context_menu_trigger.rb +22 -22
- data/app/components/ui/date_picker.rb +116 -116
- data/app/components/ui/date_picker_input.rb +66 -66
- data/app/components/ui/date_picker_trigger.rb +63 -63
- data/app/components/ui/dialog.rb +14 -14
- data/app/components/ui/dialog_close.rb +22 -22
- data/app/components/ui/dialog_content.rb +12 -12
- data/app/components/ui/dialog_description.rb +17 -17
- data/app/components/ui/dialog_footer.rb +10 -10
- data/app/components/ui/dialog_header.rb +10 -10
- data/app/components/ui/dialog_overlay.rb +13 -13
- data/app/components/ui/dialog_title.rb +17 -17
- data/app/components/ui/dialog_trigger.rb +32 -32
- data/app/components/ui/drawer.rb +34 -34
- data/app/components/ui/drawer_close.rb +18 -18
- data/app/components/ui/drawer_content.rb +14 -14
- data/app/components/ui/drawer_description.rb +11 -11
- data/app/components/ui/drawer_footer.rb +11 -11
- data/app/components/ui/drawer_handle.rb +10 -10
- data/app/components/ui/drawer_header.rb +11 -11
- data/app/components/ui/drawer_overlay.rb +12 -12
- data/app/components/ui/drawer_title.rb +11 -11
- data/app/components/ui/drawer_trigger.rb +29 -29
- data/app/components/ui/dropdown_menu.rb +49 -49
- data/app/components/ui/dropdown_menu_checkbox_item.rb +45 -45
- data/app/components/ui/dropdown_menu_content.rb +24 -24
- data/app/components/ui/dropdown_menu_item.rb +34 -34
- data/app/components/ui/dropdown_menu_label.rb +22 -22
- data/app/components/ui/dropdown_menu_radio_group.rb +23 -23
- data/app/components/ui/dropdown_menu_radio_item.rb +47 -47
- data/app/components/ui/dropdown_menu_separator.rb +19 -19
- data/app/components/ui/dropdown_menu_shortcut.rb +20 -20
- data/app/components/ui/dropdown_menu_sub.rb +23 -23
- data/app/components/ui/dropdown_menu_sub_content.rb +26 -26
- data/app/components/ui/dropdown_menu_sub_trigger.rb +40 -40
- data/app/components/ui/dropdown_menu_trigger.rb +36 -36
- data/app/components/ui/empty.rb +21 -21
- data/app/components/ui/empty_content.rb +18 -18
- data/app/components/ui/empty_description.rb +16 -16
- data/app/components/ui/empty_header.rb +20 -20
- data/app/components/ui/empty_media.rb +24 -24
- data/app/components/ui/empty_title.rb +16 -16
- data/app/components/ui/field.rb +30 -30
- data/app/components/ui/field_content.rb +20 -20
- data/app/components/ui/field_description.rb +20 -20
- data/app/components/ui/field_error.rb +50 -50
- data/app/components/ui/field_group.rb +23 -23
- data/app/components/ui/field_label.rb +22 -22
- data/app/components/ui/field_legend.rb +25 -25
- data/app/components/ui/field_separator.rb +41 -41
- data/app/components/ui/field_set.rb +22 -22
- data/app/components/ui/field_title.rb +20 -20
- data/app/components/ui/h1.rb +1 -0
- data/app/components/ui/h2.rb +1 -0
- data/app/components/ui/h3.rb +1 -0
- data/app/components/ui/h4.rb +1 -0
- data/app/components/ui/hover_card.rb +22 -22
- data/app/components/ui/hover_card_content.rb +28 -28
- data/app/components/ui/hover_card_trigger.rb +40 -40
- data/app/components/ui/inline_code.rb +1 -0
- data/app/components/ui/input.rb +15 -15
- data/app/components/ui/input_group.rb +28 -28
- data/app/components/ui/input_group_addon.rb +27 -27
- data/app/components/ui/input_group_button.rb +35 -35
- data/app/components/ui/input_group_input.rb +39 -39
- data/app/components/ui/input_group_text.rb +26 -26
- data/app/components/ui/input_group_textarea.rb +39 -39
- data/app/components/ui/input_otp.rb +48 -48
- data/app/components/ui/input_otp_group.rb +21 -21
- data/app/components/ui/input_otp_separator.rb +28 -28
- data/app/components/ui/input_otp_slot.rb +28 -28
- data/app/components/ui/item.rb +20 -20
- data/app/components/ui/item_actions.rb +10 -10
- data/app/components/ui/item_content.rb +10 -10
- data/app/components/ui/item_description.rb +10 -10
- data/app/components/ui/item_footer.rb +10 -10
- data/app/components/ui/item_group.rb +10 -10
- data/app/components/ui/item_header.rb +10 -10
- data/app/components/ui/item_media.rb +11 -11
- data/app/components/ui/item_separator.rb +10 -10
- data/app/components/ui/item_title.rb +10 -10
- data/app/components/ui/kbd.rb +24 -24
- data/app/components/ui/kbd_group.rb +25 -25
- data/app/components/ui/label.rb +25 -25
- data/app/components/ui/large.rb +1 -0
- data/app/components/ui/lead.rb +1 -0
- data/app/components/ui/list.rb +1 -0
- data/app/components/ui/menubar.rb +31 -31
- data/app/components/ui/menubar_checkbox_item.rb +45 -45
- data/app/components/ui/menubar_content.rb +27 -27
- data/app/components/ui/menubar_item.rb +34 -34
- data/app/components/ui/menubar_label.rb +24 -24
- data/app/components/ui/menubar_menu.rb +24 -24
- data/app/components/ui/menubar_radio_group.rb +24 -24
- data/app/components/ui/menubar_radio_item.rb +47 -47
- data/app/components/ui/menubar_separator.rb +18 -18
- data/app/components/ui/menubar_shortcut.rb +22 -22
- data/app/components/ui/menubar_sub.rb +25 -25
- data/app/components/ui/menubar_sub_content.rb +22 -22
- data/app/components/ui/menubar_sub_trigger.rb +41 -41
- data/app/components/ui/menubar_trigger.rb +21 -21
- data/app/components/ui/muted.rb +1 -0
- data/app/components/ui/navigation_menu.rb +43 -43
- data/app/components/ui/navigation_menu_content.rb +28 -28
- data/app/components/ui/navigation_menu_item.rb +31 -31
- data/app/components/ui/navigation_menu_link.rb +60 -60
- data/app/components/ui/navigation_menu_list.rb +23 -23
- data/app/components/ui/navigation_menu_trigger.rb +44 -44
- data/app/components/ui/navigation_menu_viewport.rb +20 -20
- data/app/components/ui/p.rb +1 -0
- data/app/components/ui/pagination.rb +15 -15
- data/app/components/ui/pagination_content.rb +15 -15
- data/app/components/ui/pagination_ellipsis.rb +20 -20
- data/app/components/ui/pagination_item.rb +13 -13
- data/app/components/ui/pagination_link.rb +21 -21
- data/app/components/ui/pagination_next.rb +25 -25
- data/app/components/ui/pagination_previous.rb +25 -25
- data/app/components/ui/popover.rb +44 -44
- data/app/components/ui/popover_content.rb +25 -25
- data/app/components/ui/popover_trigger.rb +30 -30
- data/app/components/ui/progress.rb +32 -32
- data/app/components/ui/radio_button.rb +44 -44
- data/app/components/ui/resizable_handle.rb +49 -49
- data/app/components/ui/resizable_panel.rb +31 -31
- data/app/components/ui/resizable_panel_group.rb +37 -37
- data/app/components/ui/responsive_dialog.rb +81 -81
- data/app/components/ui/scroll_area.rb +54 -54
- data/app/components/ui/scroll_area_corner.rb +27 -27
- data/app/components/ui/scroll_area_scrollbar.rb +37 -37
- data/app/components/ui/scroll_area_thumb.rb +31 -31
- data/app/components/ui/scroll_area_viewport.rb +33 -33
- data/app/components/ui/select.rb +38 -38
- data/app/components/ui/select_content.rb +36 -36
- data/app/components/ui/select_group.rb +32 -32
- data/app/components/ui/select_item.rb +58 -58
- data/app/components/ui/select_label.rb +28 -28
- data/app/components/ui/select_scroll_down_button.rb +39 -39
- data/app/components/ui/select_scroll_up_button.rb +39 -39
- data/app/components/ui/select_trigger.rb +38 -38
- data/app/components/ui/separator.rb +35 -35
- data/app/components/ui/sheet.rb +14 -14
- data/app/components/ui/sheet_close.rb +32 -32
- data/app/components/ui/sheet_content.rb +45 -45
- data/app/components/ui/sheet_description.rb +17 -17
- data/app/components/ui/sheet_footer.rb +10 -10
- data/app/components/ui/sheet_header.rb +10 -10
- data/app/components/ui/sheet_overlay.rb +13 -13
- data/app/components/ui/sheet_title.rb +17 -17
- data/app/components/ui/sheet_trigger.rb +21 -21
- data/app/components/ui/sidebar.rb +85 -85
- data/app/components/ui/sidebar_content.rb +27 -27
- data/app/components/ui/sidebar_footer.rb +29 -29
- data/app/components/ui/sidebar_group.rb +45 -45
- data/app/components/ui/sidebar_group_action.rb +39 -39
- data/app/components/ui/sidebar_group_content.rb +35 -35
- data/app/components/ui/sidebar_group_label.rb +38 -38
- data/app/components/ui/sidebar_header.rb +29 -29
- data/app/components/ui/sidebar_input.rb +35 -35
- data/app/components/ui/sidebar_inset.rb +35 -35
- data/app/components/ui/sidebar_menu.rb +32 -32
- data/app/components/ui/sidebar_menu_action.rb +52 -52
- data/app/components/ui/sidebar_menu_badge.rb +32 -32
- data/app/components/ui/sidebar_menu_button.rb +63 -63
- data/app/components/ui/sidebar_menu_item.rb +38 -38
- data/app/components/ui/sidebar_menu_skeleton.rb +57 -57
- data/app/components/ui/sidebar_menu_sub.rb +43 -43
- data/app/components/ui/sidebar_menu_sub_button.rb +40 -40
- data/app/components/ui/sidebar_menu_sub_item.rb +27 -27
- data/app/components/ui/sidebar_provider.rb +66 -66
- data/app/components/ui/sidebar_rail.rb +28 -28
- data/app/components/ui/sidebar_separator.rb +25 -25
- data/app/components/ui/sidebar_trigger.rb +54 -54
- data/app/components/ui/skeleton.rb +37 -37
- data/app/components/ui/small.rb +1 -0
- data/app/components/ui/sonner_toaster.rb +49 -49
- data/app/components/ui/spinner.rb +36 -36
- data/app/components/ui/switch.rb +62 -62
- data/app/components/ui/table.rb +42 -42
- data/app/components/ui/table_body.rb +22 -22
- data/app/components/ui/table_caption.rb +11 -11
- data/app/components/ui/table_cell.rb +11 -11
- data/app/components/ui/table_footer.rb +22 -22
- data/app/components/ui/table_head.rb +11 -11
- data/app/components/ui/table_header.rb +22 -22
- data/app/components/ui/table_row.rb +19 -19
- data/app/components/ui/tabs.rb +36 -36
- data/app/components/ui/tabs_content.rb +26 -26
- data/app/components/ui/tabs_list.rb +23 -23
- data/app/components/ui/tabs_trigger.rb +29 -29
- data/app/components/ui/textarea.rb +15 -15
- data/app/components/ui/toggle.rb +38 -38
- data/app/components/ui/toggle_group.rb +53 -53
- data/app/components/ui/toggle_group_item.rb +61 -61
- data/app/components/ui/tooltip.rb +27 -27
- data/app/components/ui/tooltip_content.rb +31 -31
- data/app/components/ui/tooltip_trigger.rb +36 -36
- data/app/helpers/ui/combobox_behavior.rb +1 -1
- data/app/helpers/ui/empty_behavior.rb +6 -6
- data/app/helpers/ui/input_group_input_behavior.rb +1 -1
- data/app/helpers/ui/input_group_textarea_behavior.rb +1 -1
- data/app/helpers/ui/popover_content_behavior.rb +1 -1
- data/app/helpers/ui/popover_trigger_behavior.rb +1 -1
- data/app/helpers/ui/select_behavior.rb +61 -61
- data/app/helpers/ui/select_content_behavior.rb +31 -31
- data/app/helpers/ui/select_group_behavior.rb +24 -24
- data/app/helpers/ui/select_item_behavior.rb +34 -34
- data/app/helpers/ui/select_label_behavior.rb +23 -23
- data/app/helpers/ui/select_scroll_down_button_behavior.rb +38 -38
- data/app/helpers/ui/select_scroll_up_button_behavior.rb +38 -38
- data/app/helpers/ui/select_trigger_behavior.rb +29 -29
- data/app/helpers/ui/spinner_behavior.rb +1 -1
- data/app/javascript/ui/controllers/accordion_controller.js +15 -3
- data/app/javascript/ui/controllers/command_controller.js +4 -3
- data/app/view_components/ui/accordion_component.rb +31 -31
- data/app/view_components/ui/accordion_content_component.rb +24 -24
- data/app/view_components/ui/accordion_item_component.rb +37 -37
- data/app/view_components/ui/accordion_trigger_component.rb +25 -25
- data/app/view_components/ui/alert_component.rb +18 -18
- data/app/view_components/ui/alert_description_component.rb +16 -16
- data/app/view_components/ui/alert_title_component.rb +16 -16
- data/app/view_components/ui/aspect_ratio_component.rb +20 -20
- data/app/view_components/ui/avatar_component.rb +16 -16
- data/app/view_components/ui/avatar_fallback_component.rb +16 -16
- data/app/view_components/ui/avatar_image_component.rb +19 -19
- data/app/view_components/ui/badge_component.rb +18 -18
- data/app/view_components/ui/blockquote_component.rb +1 -0
- data/app/view_components/ui/breadcrumb_component.rb +28 -28
- data/app/view_components/ui/breadcrumb_ellipsis_component.rb +41 -41
- data/app/view_components/ui/breadcrumb_item_component.rb +24 -24
- data/app/view_components/ui/breadcrumb_link_component.rb +24 -24
- data/app/view_components/ui/breadcrumb_list_component.rb +24 -24
- data/app/view_components/ui/breadcrumb_page_component.rb +22 -22
- data/app/view_components/ui/breadcrumb_separator_component.rb +38 -38
- data/app/view_components/ui/button_component.rb +39 -39
- data/app/view_components/ui/button_group_component.rb +33 -33
- data/app/view_components/ui/button_group_separator_component.rb +29 -29
- data/app/view_components/ui/button_group_text_component.rb +25 -25
- data/app/view_components/ui/calendar_component.rb +179 -182
- data/app/view_components/ui/card_action_component.rb +10 -10
- data/app/view_components/ui/card_component.rb +10 -10
- data/app/view_components/ui/card_content_component.rb +10 -10
- data/app/view_components/ui/card_description_component.rb +10 -10
- data/app/view_components/ui/card_footer_component.rb +10 -10
- data/app/view_components/ui/card_header_component.rb +10 -10
- data/app/view_components/ui/card_title_component.rb +10 -10
- data/app/view_components/ui/carousel_component.rb +14 -13
- data/app/view_components/ui/carousel_content_component.rb +12 -11
- data/app/view_components/ui/carousel_item_component.rb +11 -10
- data/app/view_components/ui/carousel_next_component.rb +15 -27
- data/app/view_components/ui/carousel_previous_component.rb +15 -27
- data/app/view_components/ui/checkbox_component.rb +48 -48
- data/app/view_components/ui/collapsible_component.rb +17 -17
- data/app/view_components/ui/collapsible_content_component.rb +11 -11
- data/app/view_components/ui/collapsible_trigger_component.rb +15 -15
- data/app/view_components/ui/combobox_wrapper_component.rb +53 -53
- data/app/view_components/ui/command_component.rb +12 -11
- data/app/view_components/ui/command_dialog_component.rb +17 -16
- data/app/view_components/ui/command_empty_component.rb +10 -10
- data/app/view_components/ui/command_group_component.rb +16 -16
- data/app/view_components/ui/command_input_component.rb +15 -15
- data/app/view_components/ui/command_item_component.rb +12 -12
- data/app/view_components/ui/command_list_component.rb +10 -10
- data/app/view_components/ui/command_separator_component.rb +10 -10
- data/app/view_components/ui/command_shortcut_component.rb +10 -10
- data/app/view_components/ui/context_menu_checkbox_item_component.rb +36 -37
- data/app/view_components/ui/context_menu_component.rb +14 -14
- data/app/view_components/ui/context_menu_content_component.rb +14 -14
- data/app/view_components/ui/context_menu_item_component.rb +22 -22
- data/app/view_components/ui/context_menu_label_component.rb +16 -16
- data/app/view_components/ui/context_menu_radio_group_component.rb +13 -13
- data/app/view_components/ui/context_menu_radio_item_component.rb +36 -37
- data/app/view_components/ui/context_menu_separator_component.rb +11 -11
- data/app/view_components/ui/context_menu_shortcut_component.rb +13 -13
- data/app/view_components/ui/context_menu_trigger_component.rb +14 -14
- data/app/view_components/ui/date_picker_component.rb +125 -125
- data/app/view_components/ui/date_picker_input_component.rb +68 -68
- data/app/view_components/ui/date_picker_trigger_component.rb +67 -67
- data/app/view_components/ui/dialog_close_component.rb +61 -61
- data/app/view_components/ui/dialog_component.rb +45 -45
- data/app/view_components/ui/dialog_content_component.rb +23 -23
- data/app/view_components/ui/dialog_description_component.rb +21 -21
- data/app/view_components/ui/dialog_footer_component.rb +17 -17
- data/app/view_components/ui/dialog_header_component.rb +18 -18
- data/app/view_components/ui/dialog_overlay_component.rb +30 -30
- data/app/view_components/ui/dialog_title_component.rb +21 -21
- data/app/view_components/ui/dialog_trigger_component.rb +61 -61
- data/app/view_components/ui/drawer_close_component.rb +30 -30
- data/app/view_components/ui/drawer_component.rb +76 -76
- data/app/view_components/ui/drawer_content_component.rb +26 -26
- data/app/view_components/ui/drawer_description_component.rb +17 -17
- data/app/view_components/ui/drawer_footer_component.rb +20 -20
- data/app/view_components/ui/drawer_handle_component.rb +19 -19
- data/app/view_components/ui/drawer_header_component.rb +20 -20
- data/app/view_components/ui/drawer_overlay_component.rb +22 -22
- data/app/view_components/ui/drawer_title_component.rb +17 -17
- data/app/view_components/ui/drawer_trigger_component.rb +60 -60
- data/app/view_components/ui/dropdown_menu_checkbox_item_component.rb +26 -26
- data/app/view_components/ui/dropdown_menu_component.rb +45 -45
- data/app/view_components/ui/dropdown_menu_content_component.rb +13 -13
- data/app/view_components/ui/dropdown_menu_item_component.rb +16 -16
- data/app/view_components/ui/dropdown_menu_label_component.rb +13 -13
- data/app/view_components/ui/dropdown_menu_radio_group_component.rb +12 -12
- data/app/view_components/ui/dropdown_menu_radio_item_component.rb +27 -27
- data/app/view_components/ui/dropdown_menu_separator_component.rb +11 -11
- data/app/view_components/ui/dropdown_menu_shortcut_component.rb +12 -12
- data/app/view_components/ui/dropdown_menu_sub_component.rb +12 -12
- data/app/view_components/ui/dropdown_menu_sub_content_component.rb +14 -14
- data/app/view_components/ui/dropdown_menu_sub_trigger_component.rb +22 -22
- data/app/view_components/ui/dropdown_menu_trigger_component.rb +46 -46
- data/app/view_components/ui/empty_component.rb +12 -12
- data/app/view_components/ui/empty_content_component.rb +12 -12
- data/app/view_components/ui/empty_description_component.rb +12 -12
- data/app/view_components/ui/empty_header_component.rb +12 -12
- data/app/view_components/ui/empty_media_component.rb +13 -13
- data/app/view_components/ui/empty_title_component.rb +12 -12
- data/app/view_components/ui/field_component.rb +36 -36
- data/app/view_components/ui/field_content_component.rb +22 -22
- data/app/view_components/ui/field_description_component.rb +22 -22
- data/app/view_components/ui/field_error_component.rb +55 -55
- data/app/view_components/ui/field_group_component.rb +27 -27
- data/app/view_components/ui/field_label_component.rb +24 -24
- data/app/view_components/ui/field_legend_component.rb +29 -29
- data/app/view_components/ui/field_separator_component.rb +43 -43
- data/app/view_components/ui/field_set_component.rb +25 -25
- data/app/view_components/ui/field_title_component.rb +22 -22
- data/app/view_components/ui/h3_component.rb +1 -0
- data/app/view_components/ui/h4_component.rb +1 -0
- data/app/view_components/ui/hover_card_component.rb +24 -24
- data/app/view_components/ui/hover_card_content_component.rb +30 -30
- data/app/view_components/ui/hover_card_trigger_component.rb +47 -47
- data/app/view_components/ui/inline_code_component.rb +1 -0
- data/app/view_components/ui/input_component.rb +17 -17
- data/app/view_components/ui/input_group_addon_component.rb +31 -31
- data/app/view_components/ui/input_group_button_component.rb +32 -32
- data/app/view_components/ui/input_group_component.rb +30 -30
- data/app/view_components/ui/input_group_input_component.rb +38 -38
- data/app/view_components/ui/input_group_text_component.rb +28 -28
- data/app/view_components/ui/input_group_textarea_component.rb +38 -38
- data/app/view_components/ui/input_otp_component.rb +52 -52
- data/app/view_components/ui/input_otp_group_component.rb +23 -23
- data/app/view_components/ui/input_otp_separator_component.rb +29 -29
- data/app/view_components/ui/input_otp_slot_component.rb +28 -28
- data/app/view_components/ui/item_actions_component.rb +12 -12
- data/app/view_components/ui/item_component.rb +23 -23
- data/app/view_components/ui/item_content_component.rb +12 -12
- data/app/view_components/ui/item_description_component.rb +12 -12
- data/app/view_components/ui/item_footer_component.rb +12 -12
- data/app/view_components/ui/item_group_component.rb +12 -12
- data/app/view_components/ui/item_header_component.rb +12 -12
- data/app/view_components/ui/item_media_component.rb +13 -13
- data/app/view_components/ui/item_separator_component.rb +12 -12
- data/app/view_components/ui/item_title_component.rb +12 -12
- data/app/view_components/ui/kbd_component.rb +25 -25
- data/app/view_components/ui/kbd_group_component.rb +26 -26
- data/app/view_components/ui/label_component.rb +18 -18
- data/app/view_components/ui/large_component.rb +1 -0
- data/app/view_components/ui/lead_component.rb +1 -0
- data/app/view_components/ui/list_component.rb +1 -0
- data/app/view_components/ui/menubar_checkbox_item_component.rb +40 -40
- data/app/view_components/ui/menubar_component.rb +19 -19
- data/app/view_components/ui/menubar_content_component.rb +21 -21
- data/app/view_components/ui/menubar_item_component.rb +26 -26
- data/app/view_components/ui/menubar_label_component.rb +18 -18
- data/app/view_components/ui/menubar_menu_component.rb +20 -20
- data/app/view_components/ui/menubar_radio_group_component.rb +21 -21
- data/app/view_components/ui/menubar_radio_item_component.rb +41 -41
- data/app/view_components/ui/menubar_separator_component.rb +16 -16
- data/app/view_components/ui/menubar_shortcut_component.rb +17 -17
- data/app/view_components/ui/menubar_sub_component.rb +20 -20
- data/app/view_components/ui/menubar_sub_content_component.rb +20 -20
- data/app/view_components/ui/menubar_sub_trigger_component.rb +37 -37
- data/app/view_components/ui/menubar_trigger_component.rb +18 -18
- data/app/view_components/ui/muted_component.rb +1 -0
- data/app/view_components/ui/navigation_menu_component.rb +37 -37
- data/app/view_components/ui/navigation_menu_content_component.rb +18 -18
- data/app/view_components/ui/navigation_menu_item_component.rb +18 -18
- data/app/view_components/ui/navigation_menu_link_component.rb +83 -83
- data/app/view_components/ui/navigation_menu_list_component.rb +16 -16
- data/app/view_components/ui/navigation_menu_trigger_component.rb +38 -38
- data/app/view_components/ui/navigation_menu_viewport_component.rb +16 -16
- data/app/view_components/ui/p_component.rb +1 -0
- data/app/view_components/ui/pagination_component.rb +14 -14
- data/app/view_components/ui/pagination_content_component.rb +14 -14
- data/app/view_components/ui/pagination_ellipsis_component.rb +20 -20
- data/app/view_components/ui/pagination_item_component.rb +12 -12
- data/app/view_components/ui/pagination_link_component.rb +21 -21
- data/app/view_components/ui/pagination_next_component.rb +24 -24
- data/app/view_components/ui/pagination_previous_component.rb +25 -25
- data/app/view_components/ui/popover_component.rb +50 -50
- data/app/view_components/ui/popover_content_component.rb +36 -36
- data/app/view_components/ui/popover_trigger_component.rb +60 -60
- data/app/view_components/ui/progress_component.rb +33 -33
- data/app/view_components/ui/radio_button_component.rb +49 -49
- data/app/view_components/ui/resizable_handle_component.rb +27 -27
- data/app/view_components/ui/resizable_panel_component.rb +33 -33
- data/app/view_components/ui/resizable_panel_group_component.rb +39 -39
- data/app/view_components/ui/responsive_dialog_component.rb +70 -70
- data/app/view_components/ui/scroll_area_component.rb +39 -39
- data/app/view_components/ui/scroll_area_corner_component.rb +18 -18
- data/app/view_components/ui/scroll_area_scrollbar_component.rb +28 -28
- data/app/view_components/ui/scroll_area_thumb_component.rb +23 -23
- data/app/view_components/ui/scroll_area_viewport_component.rb +25 -25
- data/app/view_components/ui/select_component.rb +27 -27
- data/app/view_components/ui/select_content_component.rb +35 -36
- data/app/view_components/ui/select_group_component.rb +22 -22
- data/app/view_components/ui/select_item_component.rb +39 -40
- data/app/view_components/ui/select_label_component.rb +18 -18
- data/app/view_components/ui/select_scroll_down_button_component.rb +29 -29
- data/app/view_components/ui/select_scroll_up_button_component.rb +29 -29
- data/app/view_components/ui/select_trigger_component.rb +22 -22
- data/app/view_components/ui/separator_component.rb +23 -23
- data/app/view_components/ui/sheet_close_component.rb +61 -61
- data/app/view_components/ui/sheet_component.rb +45 -45
- data/app/view_components/ui/sheet_content_component.rb +43 -43
- data/app/view_components/ui/sheet_description_component.rb +20 -20
- data/app/view_components/ui/sheet_footer_component.rb +17 -17
- data/app/view_components/ui/sheet_header_component.rb +17 -17
- data/app/view_components/ui/sheet_overlay_component.rb +30 -30
- data/app/view_components/ui/sheet_title_component.rb +20 -20
- data/app/view_components/ui/sheet_trigger_component.rb +50 -50
- data/app/view_components/ui/skeleton_component.rb +23 -23
- data/app/view_components/ui/slider_component.rb +55 -55
- data/app/view_components/ui/slider_range_component.rb +19 -19
- data/app/view_components/ui/slider_thumb_component.rb +25 -25
- data/app/view_components/ui/slider_track_component.rb +22 -22
- data/app/view_components/ui/small_component.rb +1 -0
- data/app/view_components/ui/sonner_toaster_component.rb +49 -49
- data/app/view_components/ui/spinner_component.rb +41 -41
- data/app/view_components/ui/switch_component.rb +52 -52
- data/app/view_components/ui/table_body_component.rb +14 -14
- data/app/view_components/ui/table_caption_component.rb +10 -10
- data/app/view_components/ui/table_cell_component.rb +10 -10
- data/app/view_components/ui/table_component.rb +20 -20
- data/app/view_components/ui/table_footer_component.rb +14 -14
- data/app/view_components/ui/table_head_component.rb +10 -10
- data/app/view_components/ui/table_header_component.rb +14 -14
- data/app/view_components/ui/table_row_component.rb +16 -16
- data/app/view_components/ui/tabs_component.rb +33 -33
- data/app/view_components/ui/tabs_content_component.rb +28 -28
- data/app/view_components/ui/tabs_list_component.rb +24 -24
- data/app/view_components/ui/tabs_trigger_component.rb +31 -31
- data/app/view_components/ui/textarea_component.rb +14 -14
- data/app/view_components/ui/toggle_component.rb +43 -43
- data/app/view_components/ui/toggle_group_component.rb +60 -60
- data/app/view_components/ui/toggle_group_item_component.rb +62 -62
- data/app/view_components/ui/tooltip_component.rb +14 -14
- data/app/view_components/ui/tooltip_content_component.rb +23 -23
- data/app/view_components/ui/tooltip_trigger_component.rb +19 -19
- data/app/views/ui/_command.html.erb +2 -0
- data/app/views/ui/carousel/_next.html.erb +1 -1
- data/app/views/ui/carousel/_previous.html.erb +1 -1
- data/lib/ui/version.rb +1 -1
- metadata +1 -1
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
# ResizableHandle component (Phlex)
|
|
4
|
+
# Draggable handle between resizable panels
|
|
5
|
+
#
|
|
6
|
+
# @example Basic handle
|
|
7
|
+
# render UI::Handle.new
|
|
8
|
+
#
|
|
9
|
+
# @example Handle with visible grip icon
|
|
10
|
+
# render UI::Handle.new(with_handle: true)
|
|
11
|
+
class UI::ResizableHandle < Phlex::HTML
|
|
12
|
+
include UI::ResizableHandleBehavior
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
# @param with_handle [Boolean] show visible grip icon
|
|
15
|
+
# @param classes [String] additional CSS classes
|
|
16
|
+
# @param attributes [Hash] additional HTML attributes
|
|
17
|
+
def initialize(with_handle: false, classes: "", attributes: {}, **)
|
|
18
|
+
@with_handle = with_handle
|
|
19
|
+
@classes = classes
|
|
20
|
+
@attributes = attributes
|
|
21
|
+
super()
|
|
22
|
+
end
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
end
|
|
30
|
-
end
|
|
24
|
+
def view_template
|
|
25
|
+
div(**handle_html_attributes) do
|
|
26
|
+
if @with_handle
|
|
27
|
+
div(class: grip_container_classes) do
|
|
28
|
+
render_grip_icon
|
|
31
29
|
end
|
|
32
30
|
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
private
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
end
|
|
57
|
-
end
|
|
36
|
+
def render_grip_icon
|
|
37
|
+
# GripVertical icon from lucide
|
|
38
|
+
svg(
|
|
39
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
+
width: "10",
|
|
41
|
+
height: "10",
|
|
42
|
+
viewBox: "0 0 24 24",
|
|
43
|
+
fill: "none",
|
|
44
|
+
stroke: "currentColor",
|
|
45
|
+
stroke_width: "2",
|
|
46
|
+
stroke_linecap: "round",
|
|
47
|
+
stroke_linejoin: "round",
|
|
48
|
+
class: "h-2.5 w-2.5"
|
|
49
|
+
) do |s|
|
|
50
|
+
s.circle(cx: "9", cy: "12", r: "1")
|
|
51
|
+
s.circle(cx: "9", cy: "5", r: "1")
|
|
52
|
+
s.circle(cx: "9", cy: "19", r: "1")
|
|
53
|
+
s.circle(cx: "15", cy: "12", r: "1")
|
|
54
|
+
s.circle(cx: "15", cy: "5", r: "1")
|
|
55
|
+
s.circle(cx: "15", cy: "19", r: "1")
|
|
58
56
|
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
# ResizablePanel component (Phlex)
|
|
4
|
+
# Individual resizable panel within a panel group
|
|
5
|
+
#
|
|
6
|
+
# @example Basic usage
|
|
7
|
+
# render UI::Panel.new(default_size: 50) do
|
|
8
|
+
# "Panel content"
|
|
9
|
+
# end
|
|
10
|
+
#
|
|
11
|
+
# @example With constraints
|
|
12
|
+
# render UI::Panel.new(default_size: 50, min_size: 20, max_size: 80) do
|
|
13
|
+
# "Constrained panel"
|
|
14
|
+
# end
|
|
15
|
+
class UI::ResizablePanel < Phlex::HTML
|
|
16
|
+
include UI::ResizablePanelBehavior
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
# @param default_size [Integer, Float] initial size as percentage (0-100)
|
|
19
|
+
# @param min_size [Integer, Float, nil] minimum size as percentage
|
|
20
|
+
# @param max_size [Integer, Float, nil] maximum size as percentage
|
|
21
|
+
# @param classes [String] additional CSS classes
|
|
22
|
+
# @param attributes [Hash] additional HTML attributes
|
|
23
|
+
def initialize(default_size: nil, min_size: nil, max_size: nil, classes: "", attributes: {}, **)
|
|
24
|
+
@default_size = default_size
|
|
25
|
+
@min_size = min_size
|
|
26
|
+
@max_size = max_size
|
|
27
|
+
@classes = classes
|
|
28
|
+
@attributes = attributes
|
|
29
|
+
super()
|
|
30
|
+
end
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
def view_template(&block)
|
|
33
|
+
div(**panel_html_attributes, &block)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
# ResizablePanelGroup container component (Phlex)
|
|
4
|
+
# Wraps resizable panels with Stimulus controller
|
|
5
|
+
#
|
|
6
|
+
# @example Basic horizontal layout
|
|
7
|
+
# render UI::PanelGroup.new(direction: "horizontal") do
|
|
8
|
+
# render UI::Panel.new(default_size: 50) do
|
|
9
|
+
# "Left panel content"
|
|
10
|
+
# end
|
|
11
|
+
# render UI::Handle.new
|
|
12
|
+
# render UI::Panel.new(default_size: 50) do
|
|
13
|
+
# "Right panel content"
|
|
14
|
+
# end
|
|
15
|
+
# end
|
|
16
|
+
#
|
|
17
|
+
# @example Vertical layout
|
|
18
|
+
# render UI::PanelGroup.new(direction: "vertical") do
|
|
19
|
+
# render UI::Panel.new(default_size: 30) { "Top" }
|
|
20
|
+
# render UI::Handle.new
|
|
21
|
+
# render UI::Panel.new(default_size: 70) { "Bottom" }
|
|
22
|
+
# end
|
|
23
|
+
class UI::ResizablePanelGroup < Phlex::HTML
|
|
24
|
+
include UI::ResizablePanelGroupBehavior
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
# @param direction [String] "horizontal" or "vertical" layout
|
|
27
|
+
# @param keyboard_resize_by [Integer] percentage to resize by on keyboard input
|
|
28
|
+
# @param classes [String] additional CSS classes
|
|
29
|
+
# @param attributes [Hash] additional HTML attributes
|
|
30
|
+
def initialize(direction: "horizontal", keyboard_resize_by: 10, classes: "", attributes: {}, **)
|
|
31
|
+
@direction = direction
|
|
32
|
+
@keyboard_resize_by = keyboard_resize_by
|
|
33
|
+
@classes = classes
|
|
34
|
+
@attributes = attributes
|
|
35
|
+
super()
|
|
36
|
+
end
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
def view_template(&block)
|
|
39
|
+
div(**panel_group_html_attributes, &block)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -1,98 +1,98 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
# ResponsiveDialog - Renders Dialog on desktop, Drawer on mobile
|
|
4
|
+
# Uses hybrid CSS + Stimulus approach for responsive switching at 768px (md breakpoint)
|
|
5
|
+
#
|
|
6
|
+
# This component renders BOTH Dialog and Drawer, hiding one with CSS.
|
|
7
|
+
# The responsive-dialog Stimulus controller handles state synchronization.
|
|
8
|
+
#
|
|
9
|
+
# @example Basic usage
|
|
10
|
+
# render UI::ResponsiveDialog.new do |rd|
|
|
11
|
+
# rd.with_trigger { "Edit Profile" }
|
|
12
|
+
# rd.with_content do
|
|
13
|
+
# # Shared content for both Dialog and Drawer
|
|
14
|
+
# render_form
|
|
15
|
+
# end
|
|
16
|
+
# end
|
|
17
|
+
class UI::ResponsiveDialog < Phlex::HTML
|
|
18
|
+
include UI::ResponsiveDialogBehavior
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
def initialize(
|
|
21
|
+
open: false,
|
|
22
|
+
breakpoint: 768,
|
|
23
|
+
direction: "bottom",
|
|
24
|
+
classes: nil,
|
|
25
|
+
**attributes
|
|
26
|
+
)
|
|
27
|
+
@open = open
|
|
28
|
+
@breakpoint = breakpoint
|
|
29
|
+
@direction = direction
|
|
30
|
+
@classes = classes
|
|
31
|
+
@attributes = attributes
|
|
32
|
+
@trigger_content = nil
|
|
33
|
+
@content_block = nil
|
|
34
|
+
end
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
# Builder method for trigger
|
|
37
|
+
def with_trigger(&block)
|
|
38
|
+
@trigger_content = block
|
|
39
|
+
end
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
# Builder method for content
|
|
42
|
+
def with_content(&block)
|
|
43
|
+
@content_block = block
|
|
44
|
+
end
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
def view_template(&block)
|
|
47
|
+
# Allow block-based API
|
|
48
|
+
yield(self) if block_given?
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
div(**responsive_dialog_html_attributes) do
|
|
51
|
+
# Mobile: Drawer (hidden on md and up)
|
|
52
|
+
div(class: "md:hidden", data: {ui__responsive_dialog_target: "drawer"}) do
|
|
53
|
+
render_drawer
|
|
54
|
+
end
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
end
|
|
60
|
-
end
|
|
56
|
+
# Desktop: Dialog (hidden below md)
|
|
57
|
+
div(class: "hidden md:block", data: {ui__responsive_dialog_target: "dialog"}) do
|
|
58
|
+
render_dialog
|
|
61
59
|
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
private
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
end
|
|
72
|
-
end
|
|
65
|
+
def render_drawer
|
|
66
|
+
render UI::Drawer.new(open: @open, direction: @direction) do
|
|
67
|
+
render_trigger_for(:drawer)
|
|
68
|
+
render UI::DrawerOverlay.new(open: @open)
|
|
69
|
+
render UI::DrawerContent.new(open: @open, direction: @direction) do
|
|
70
|
+
render_shared_content
|
|
73
71
|
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
end
|
|
82
|
-
end
|
|
75
|
+
def render_dialog
|
|
76
|
+
render UI::Dialog.new(open: @open) do
|
|
77
|
+
render_trigger_for(:dialog)
|
|
78
|
+
render UI::DialogOverlay.new(open: @open)
|
|
79
|
+
render UI::DialogContent.new do
|
|
80
|
+
render_shared_content
|
|
83
81
|
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if component_type == :drawer
|
|
89
|
-
render UI::DrawerTrigger.new(&@trigger_content)
|
|
90
|
-
else
|
|
91
|
-
render UI::DialogTrigger.new(&@trigger_content)
|
|
92
|
-
end
|
|
93
|
-
end
|
|
85
|
+
def render_trigger_for(component_type)
|
|
86
|
+
return unless @trigger_content
|
|
94
87
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
88
|
+
if component_type == :drawer
|
|
89
|
+
render UI::DrawerTrigger.new(&@trigger_content)
|
|
90
|
+
else
|
|
91
|
+
render UI::DialogTrigger.new(&@trigger_content)
|
|
98
92
|
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def render_shared_content
|
|
96
|
+
@content_block&.call
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
# ScrollArea - Phlex implementation
|
|
4
|
+
#
|
|
5
|
+
# Augments native scroll functionality for custom, cross-browser styling.
|
|
6
|
+
# Root container with Stimulus controller.
|
|
7
|
+
#
|
|
8
|
+
# @example Basic usage
|
|
9
|
+
# render UI::ScrollArea.new(classes: "h-[200px] w-[350px] rounded-md border p-4") do
|
|
10
|
+
# div(class: "space-y-4") do
|
|
11
|
+
# h3(class: "text-sm font-semibold") { "Tags" }
|
|
12
|
+
# div(class: "space-y-1") do
|
|
13
|
+
# # Content here
|
|
14
|
+
# end
|
|
15
|
+
# end
|
|
16
|
+
# end
|
|
17
|
+
#
|
|
18
|
+
# @example Horizontal scrolling
|
|
19
|
+
# render UI::ScrollArea.new(classes: "w-96 whitespace-nowrap rounded-md border") do
|
|
20
|
+
# # Wide content here
|
|
21
|
+
# end
|
|
22
|
+
class UI::ScrollArea < Phlex::HTML
|
|
23
|
+
include UI::ScrollAreaBehavior
|
|
24
|
+
include UI::SharedAsChildBehavior
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
# @param as_child [Boolean] When true, yields attributes to block instead of rendering div
|
|
27
|
+
# @param type [String] Scrollbar visibility behavior ("hover", "scroll", "auto", "always")
|
|
28
|
+
# @param scroll_hide_delay [Integer] Delay in ms before hiding scrollbar on hover
|
|
29
|
+
# @param classes [String] Additional CSS classes to merge
|
|
30
|
+
# @param attributes [Hash] Additional HTML attributes
|
|
31
|
+
def initialize(as_child: false, type: "hover", scroll_hide_delay: 600, classes: "", **attributes)
|
|
32
|
+
@as_child = as_child
|
|
33
|
+
@type = type
|
|
34
|
+
@scroll_hide_delay = scroll_hide_delay
|
|
35
|
+
@classes = classes
|
|
36
|
+
@attributes = attributes
|
|
37
|
+
end
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
def view_template(&block)
|
|
40
|
+
root_attrs = scroll_area_html_attributes.deep_merge(@attributes)
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
# Add Stimulus controller and values
|
|
43
|
+
root_attrs[:data] ||= {}
|
|
44
|
+
root_attrs[:data][:controller] = "ui--scroll-area"
|
|
45
|
+
root_attrs[:data][:ui__scroll_area_type_value] = @type
|
|
46
|
+
root_attrs[:data][:ui__scroll_area_scroll_hide_delay_value] = @scroll_hide_delay
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
end
|
|
60
|
-
end
|
|
48
|
+
if @as_child && block_given?
|
|
49
|
+
# asChild mode: yield attributes to block, but also render scrollbar and corner
|
|
50
|
+
yield(root_attrs)
|
|
51
|
+
render UI::Scrollbar.new(orientation: "vertical")
|
|
52
|
+
render UI::Corner.new
|
|
53
|
+
else
|
|
54
|
+
# Default mode: render as div with viewport, scrollbar, and corner
|
|
55
|
+
div(**root_attrs) do
|
|
56
|
+
render UI::Viewport.new(&block)
|
|
57
|
+
render UI::Scrollbar.new(orientation: "vertical")
|
|
58
|
+
render UI::Corner.new
|
|
61
59
|
end
|
|
62
60
|
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
# Corner - Phlex implementation
|
|
4
|
+
#
|
|
5
|
+
# Intersection element between vertical and horizontal scrollbars.
|
|
6
|
+
#
|
|
7
|
+
# @example Default usage (automatically used by ScrollArea)
|
|
8
|
+
# render UI::Corner.new
|
|
9
|
+
class UI::ScrollAreaCorner < Phlex::HTML
|
|
10
|
+
include UI::ScrollAreaCornerBehavior
|
|
11
|
+
include UI::SharedAsChildBehavior
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
# @param as_child [Boolean] When true, yields attributes to block instead of rendering div
|
|
14
|
+
# @param classes [String] Additional CSS classes to merge
|
|
15
|
+
# @param attributes [Hash] Additional HTML attributes
|
|
16
|
+
def initialize(as_child: false, classes: "", **attributes)
|
|
17
|
+
@as_child = as_child
|
|
18
|
+
@classes = classes
|
|
19
|
+
@attributes = attributes
|
|
20
|
+
end
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
def view_template(&block)
|
|
23
|
+
corner_attrs = scroll_area_corner_html_attributes.deep_merge(@attributes)
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
end
|
|
32
|
-
end
|
|
25
|
+
if @as_child && block_given?
|
|
26
|
+
# asChild mode: yield attributes to block
|
|
27
|
+
yield(corner_attrs)
|
|
28
|
+
else
|
|
29
|
+
# Default mode: render as empty div
|
|
30
|
+
div(**corner_attrs)
|
|
33
31
|
end
|
|
32
|
+
end
|
|
33
|
+
end
|