fernandes-ui 0.1.1 → 0.1.4
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 +15 -9
- data/app/assets/javascripts/ui.js +15 -9
- 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 +44 -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_behavior.rb +3 -1
- data/app/behaviors/ui/input_group_button_behavior.rb +16 -8
- 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 +33 -6
- 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 +28 -7
- 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 +73 -71
- data/app/behaviors/ui/tooltip_behavior.rb +46 -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/base.rb +8 -0
- 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 +231 -180
- 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 +37 -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 +42 -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 +67 -42
- 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 +49 -37
- 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 +58 -52
- data/app/components/ui/toggle_group_item.rb +62 -61
- data/app/components/ui/tooltip.rb +49 -25
- 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_behavior.rb +5 -2
- 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/collapsible_controller.js +2 -0
- data/app/javascript/ui/controllers/command_controller.js +4 -3
- data/app/javascript/ui/controllers/dropdown_controller.js +8 -14
- 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 +241 -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 +32 -48
- 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 +47 -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 +70 -49
- data/app/view_components/ui/popover_content_component.rb +36 -36
- data/app/view_components/ui/popover_trigger_component.rb +64 -59
- 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 +37 -26
- 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 +44 -13
- data/app/view_components/ui/tooltip_content_component.rb +23 -23
- data/app/view_components/ui/tooltip_trigger_component.rb +38 -18
- data/app/views/ui/_avatar.html.erb +8 -4
- data/app/views/ui/_button.html.erb +16 -0
- data/app/views/ui/_command.html.erb +2 -0
- data/app/views/ui/_date_picker.html.erb +4 -4
- data/app/views/ui/_popover.html.erb +30 -4
- data/app/views/ui/_select.html.erb +13 -2
- data/app/views/ui/_skeleton.html.erb +1 -1
- data/app/views/ui/_tooltip.html.erb +28 -2
- data/app/views/ui/carousel/_next.html.erb +1 -1
- data/app/views/ui/carousel/_previous.html.erb +1 -1
- data/app/views/ui/dropdown_menu/_trigger.html.erb +3 -1
- data/app/views/ui/input_group/_button.html.erb +14 -3
- data/app/views/ui/popover/_trigger.html.erb +22 -2
- data/app/views/ui/tooltip/_trigger.html.erb +16 -21
- data/lib/ui/version.rb +1 -1
- metadata +2 -1
|
@@ -1,185 +1,244 @@
|
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
private
|
|
64
|
-
|
|
65
|
-
def live_region_html
|
|
66
|
-
tag.div("", class: "sr-only", "aria-live": "polite", "aria-atomic": "true", data: { ui__calendar_target: "liveRegion" })
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
def hidden_input
|
|
70
|
-
return unless @name
|
|
71
|
-
|
|
72
|
-
tag.input(type: "hidden", name: @name, value: selected_value, data: { ui__calendar_target: "input" })
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
def months_html
|
|
76
|
-
safe_join(@number_of_months.times.map { |i| month_html(i) })
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
def month_html(index)
|
|
80
|
-
content_tag(:div, class: "space-y-4") do
|
|
81
|
-
safe_join([header_html(index), table_html])
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
def header_html(_index)
|
|
86
|
-
content_tag(:div, class: "flex justify-center pt-1 relative items-center") do
|
|
87
|
-
safe_join([
|
|
88
|
-
nav_button(:previous),
|
|
89
|
-
@show_dropdowns ? dropdowns_html : month_label_html,
|
|
90
|
-
nav_button(:next)
|
|
91
|
-
])
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
def nav_button(direction)
|
|
96
|
-
action = direction == :previous ? "previousMonth" : "nextMonth"
|
|
97
|
-
label = direction == :previous ? "Go to previous month" : "Go to next month"
|
|
98
|
-
position = direction == :previous ? "left" : "right"
|
|
99
|
-
|
|
100
|
-
content_tag(:button,
|
|
101
|
-
type: "button",
|
|
102
|
-
data: { action: "click->ui--calendar##{action}" },
|
|
103
|
-
class: nav_button_classes(position),
|
|
104
|
-
"aria-label": label
|
|
105
|
-
) do
|
|
106
|
-
direction == :previous ? chevron_left_svg : chevron_right_svg
|
|
107
|
-
end
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
def nav_button_classes(position)
|
|
111
|
-
base = "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium " \
|
|
112
|
-
"ring-offset-background transition-colors " \
|
|
113
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 " \
|
|
114
|
-
"border border-input bg-background hover:bg-accent hover:text-accent-foreground " \
|
|
115
|
-
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
116
|
-
position_class = position == "left" ? "absolute left-1" : "absolute right-1"
|
|
117
|
-
"#{base} #{position_class}"
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
def month_label_html
|
|
121
|
-
content_tag(:div, "", class: "text-sm font-medium", data: { ui__calendar_target: "monthLabel" })
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
def dropdowns_html
|
|
125
|
-
content_tag(:div, class: "flex items-center gap-1") do
|
|
126
|
-
safe_join([month_select_html, year_select_html])
|
|
127
|
-
end
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
def month_select_html
|
|
131
|
-
content_tag(:select,
|
|
132
|
-
data: { ui__calendar_target: "monthSelect", action: "change->ui--calendar#goToMonth" },
|
|
133
|
-
class: "text-sm font-medium h-7 px-2 rounded-md border border-input bg-background"
|
|
134
|
-
) do
|
|
135
|
-
safe_join(Date::MONTHNAMES.compact.each_with_index.map { |name, i| tag.option(name, value: i) })
|
|
136
|
-
end
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
def year_select_html
|
|
140
|
-
current_year = Date.today.year
|
|
141
|
-
content_tag(:select,
|
|
142
|
-
data: { ui__calendar_target: "yearSelect", action: "change->ui--calendar#goToYear" },
|
|
143
|
-
class: "text-sm font-medium h-7 px-2 rounded-md border border-input bg-background"
|
|
144
|
-
) do
|
|
145
|
-
safe_join(((current_year - @year_range)..(current_year + 10)).map { |y| tag.option(y.to_s, value: y) })
|
|
146
|
-
end
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
def table_html
|
|
150
|
-
content_tag(:table, class: "w-full border-collapse space-y-1", role: "grid") do
|
|
151
|
-
safe_join([
|
|
152
|
-
content_tag(:thead) { weekdays_html },
|
|
153
|
-
content_tag(:tbody, "", data: { ui__calendar_target: "grid" }, role: "rowgroup")
|
|
154
|
-
])
|
|
155
|
-
end
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
def weekdays_html
|
|
159
|
-
content_tag(:tr, class: "flex", data: { ui__calendar_target: "weekdaysHeader" }) do
|
|
160
|
-
safe_join(ordered_weekdays.map { |day| tag.th(day, scope: "col", class: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]") })
|
|
161
|
-
end
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
def chevron_left_svg
|
|
165
|
-
tag.svg(
|
|
166
|
-
xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16",
|
|
167
|
-
viewBox: "0 0 24 24", fill: "none", stroke: "currentColor",
|
|
168
|
-
"stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round",
|
|
169
|
-
class: "h-4 w-4"
|
|
170
|
-
) do
|
|
171
|
-
tag.path(d: "m15 18-6-6 6-6")
|
|
172
|
-
end
|
|
173
|
-
end
|
|
174
|
-
|
|
175
|
-
def chevron_right_svg
|
|
176
|
-
tag.svg(
|
|
177
|
-
xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16",
|
|
178
|
-
viewBox: "0 0 24 24", fill: "none", stroke: "currentColor",
|
|
179
|
-
"stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round",
|
|
180
|
-
class: "h-4 w-4"
|
|
181
|
-
) do
|
|
182
|
-
tag.path(d: "m9 18 6-6-6-6")
|
|
183
|
-
end
|
|
184
|
-
end
|
|
3
|
+
# Calendar component (ViewComponent)
|
|
4
|
+
# A date picker calendar with support for single, range, and multiple selection
|
|
5
|
+
class UI::CalendarComponent < ViewComponent::Base
|
|
6
|
+
include UI::CalendarBehavior
|
|
7
|
+
|
|
8
|
+
def initialize(
|
|
9
|
+
mode: :single,
|
|
10
|
+
selected: nil,
|
|
11
|
+
month: Date.today,
|
|
12
|
+
number_of_months: 1,
|
|
13
|
+
week_starts_on: 0,
|
|
14
|
+
locale: "en-US",
|
|
15
|
+
min_date: nil,
|
|
16
|
+
max_date: nil,
|
|
17
|
+
disabled_dates: [],
|
|
18
|
+
show_outside_days: true,
|
|
19
|
+
fixed_weeks: false,
|
|
20
|
+
show_dropdowns: false,
|
|
21
|
+
year_range: 100,
|
|
22
|
+
min_range_days: 0,
|
|
23
|
+
max_range_days: 0,
|
|
24
|
+
exclude_disabled: false,
|
|
25
|
+
use_native_select: true,
|
|
26
|
+
name: nil,
|
|
27
|
+
classes: "",
|
|
28
|
+
attributes: {}
|
|
29
|
+
)
|
|
30
|
+
@mode = mode
|
|
31
|
+
@selected = selected
|
|
32
|
+
@month = month
|
|
33
|
+
@number_of_months = number_of_months
|
|
34
|
+
@week_starts_on = week_starts_on
|
|
35
|
+
@locale = locale
|
|
36
|
+
@min_date = min_date
|
|
37
|
+
@max_date = max_date
|
|
38
|
+
@disabled_dates = disabled_dates
|
|
39
|
+
@show_outside_days = show_outside_days
|
|
40
|
+
@fixed_weeks = fixed_weeks
|
|
41
|
+
@show_dropdowns = show_dropdowns
|
|
42
|
+
@year_range = year_range
|
|
43
|
+
@min_range_days = min_range_days
|
|
44
|
+
@max_range_days = max_range_days
|
|
45
|
+
@exclude_disabled = exclude_disabled
|
|
46
|
+
@use_native_select = use_native_select
|
|
47
|
+
@name = name
|
|
48
|
+
@classes = classes
|
|
49
|
+
@attributes = attributes
|
|
50
|
+
super()
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def call
|
|
54
|
+
content_tag(:div, **calendar_html_attributes) do
|
|
55
|
+
safe_join([
|
|
56
|
+
live_region_html,
|
|
57
|
+
hidden_input,
|
|
58
|
+
months_html
|
|
59
|
+
].compact)
|
|
185
60
|
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
private
|
|
64
|
+
|
|
65
|
+
def live_region_html
|
|
66
|
+
tag.div("", class: "sr-only", "aria-live": "polite", "aria-atomic": "true", data: {ui__calendar_target: "liveRegion"})
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def hidden_input
|
|
70
|
+
return unless @name
|
|
71
|
+
|
|
72
|
+
tag.input(type: "hidden", name: @name, value: selected_value, data: {ui__calendar_target: "input"})
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def months_html
|
|
76
|
+
safe_join(@number_of_months.times.map { |i| month_html(i) })
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def month_html(index)
|
|
80
|
+
content_tag(:div, class: "space-y-4") do
|
|
81
|
+
safe_join([header_html(index), table_html])
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def header_html(_index)
|
|
86
|
+
content_tag(:div, class: "flex justify-center pt-1 relative items-center") do
|
|
87
|
+
safe_join([
|
|
88
|
+
nav_button(:previous),
|
|
89
|
+
@show_dropdowns ? dropdowns_html : month_label_html,
|
|
90
|
+
nav_button(:next)
|
|
91
|
+
])
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def nav_button(direction)
|
|
96
|
+
action = (direction == :previous) ? "previousMonth" : "nextMonth"
|
|
97
|
+
label = (direction == :previous) ? "Go to previous month" : "Go to next month"
|
|
98
|
+
position = (direction == :previous) ? "left" : "right"
|
|
99
|
+
|
|
100
|
+
content_tag(:button,
|
|
101
|
+
type: "button",
|
|
102
|
+
data: {action: "click->ui--calendar##{action}"},
|
|
103
|
+
class: nav_button_classes(position),
|
|
104
|
+
"aria-label": label) do
|
|
105
|
+
(direction == :previous) ? chevron_left_svg : chevron_right_svg
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
def nav_button_classes(position)
|
|
110
|
+
base = "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium " \
|
|
111
|
+
"ring-offset-background transition-colors " \
|
|
112
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 " \
|
|
113
|
+
"border border-input bg-background hover:bg-accent hover:text-accent-foreground " \
|
|
114
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
115
|
+
position_class = (position == "left") ? "absolute left-1" : "absolute right-1"
|
|
116
|
+
"#{base} #{position_class}"
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def month_label_html
|
|
120
|
+
content_tag(:div, "", class: "text-sm font-medium", data: {ui__calendar_target: "monthLabel"})
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def dropdowns_html
|
|
124
|
+
if use_native_select?
|
|
125
|
+
native_dropdowns_html
|
|
126
|
+
else
|
|
127
|
+
ui_select_dropdowns_html
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def native_dropdowns_html
|
|
132
|
+
content_tag(:div, class: "flex items-center gap-1") do
|
|
133
|
+
safe_join([month_select_html, year_select_html])
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def month_select_html
|
|
138
|
+
content_tag(:select,
|
|
139
|
+
data: {ui__calendar_target: "monthSelect", action: "change->ui--calendar#goToMonth"},
|
|
140
|
+
class: "text-sm font-medium h-7 px-2 rounded-md border border-input bg-background") do
|
|
141
|
+
safe_join(Date::MONTHNAMES.compact.each_with_index.map { |name, i| tag.option(name, value: i) })
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def year_select_html
|
|
146
|
+
current_year = Date.today.year
|
|
147
|
+
content_tag(:select,
|
|
148
|
+
data: {ui__calendar_target: "yearSelect", action: "change->ui--calendar#goToYear"},
|
|
149
|
+
class: "text-sm font-medium h-7 px-2 rounded-md border border-input bg-background") do
|
|
150
|
+
safe_join(((current_year - @year_range)..(current_year + 10)).map { |y| tag.option(y.to_s, value: y) })
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
def ui_select_dropdowns_html
|
|
155
|
+
content_tag(:div, class: "flex items-center gap-1 px-8 flex-1") do
|
|
156
|
+
safe_join([
|
|
157
|
+
ui_month_select_html,
|
|
158
|
+
ui_year_select_html
|
|
159
|
+
])
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
def ui_month_select_html
|
|
164
|
+
render(UI::SelectComponent.new(classes: "flex-1", value: (@month.month - 1).to_s)) do
|
|
165
|
+
safe_join([
|
|
166
|
+
render(UI::SelectTriggerComponent.new(classes: "h-9 w-full gap-1 px-2 text-sm font-medium border-0 shadow-none")),
|
|
167
|
+
render(UI::SelectContentComponent.new(classes: "min-w-[8rem]")) {
|
|
168
|
+
safe_join(Date::MONTHNAMES.compact.each_with_index.map { |name, i|
|
|
169
|
+
render(UI::SelectItemComponent.new(value: i.to_s)) { name }
|
|
170
|
+
})
|
|
171
|
+
},
|
|
172
|
+
tag.input(
|
|
173
|
+
type: "hidden",
|
|
174
|
+
value: (@month.month - 1).to_s,
|
|
175
|
+
data: {
|
|
176
|
+
ui__select_target: "hiddenInput",
|
|
177
|
+
ui__calendar_target: "monthSelect",
|
|
178
|
+
action: "change->ui--calendar#goToMonth"
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
])
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
def ui_year_select_html
|
|
186
|
+
current_year = Date.today.year
|
|
187
|
+
render(UI::SelectComponent.new(value: @month.year.to_s)) do
|
|
188
|
+
safe_join([
|
|
189
|
+
render(UI::SelectTriggerComponent.new(classes: "min-w-[75px] h-9 w-auto gap-1 px-2 text-sm font-medium border-0 shadow-none")),
|
|
190
|
+
render(UI::SelectContentComponent.new(classes: "min-w-[5rem] max-h-[200px]")) {
|
|
191
|
+
safe_join(((current_year - @year_range)..(current_year + 10)).map { |y|
|
|
192
|
+
render(UI::SelectItemComponent.new(value: y.to_s)) { y.to_s }
|
|
193
|
+
})
|
|
194
|
+
},
|
|
195
|
+
tag.input(
|
|
196
|
+
type: "hidden",
|
|
197
|
+
value: @month.year.to_s,
|
|
198
|
+
data: {
|
|
199
|
+
ui__select_target: "hiddenInput",
|
|
200
|
+
ui__calendar_target: "yearSelect",
|
|
201
|
+
action: "change->ui--calendar#goToYear"
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
])
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
def table_html
|
|
209
|
+
content_tag(:table, class: "w-full border-collapse space-y-1", role: "grid") do
|
|
210
|
+
safe_join([
|
|
211
|
+
content_tag(:thead) { weekdays_html },
|
|
212
|
+
content_tag(:tbody, "", data: {ui__calendar_target: "grid"}, role: "rowgroup")
|
|
213
|
+
])
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def weekdays_html
|
|
218
|
+
content_tag(:tr, class: "flex", data: {ui__calendar_target: "weekdaysHeader"}) do
|
|
219
|
+
safe_join(ordered_weekdays.map { |day| tag.th(day, scope: "col", class: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]") })
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
def chevron_left_svg
|
|
224
|
+
tag.svg(
|
|
225
|
+
xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16",
|
|
226
|
+
viewBox: "0 0 24 24", fill: "none", stroke: "currentColor",
|
|
227
|
+
"stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round",
|
|
228
|
+
class: "h-4 w-4"
|
|
229
|
+
) do
|
|
230
|
+
tag.path(d: "m15 18-6-6 6-6")
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
def chevron_right_svg
|
|
235
|
+
tag.svg(
|
|
236
|
+
xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16",
|
|
237
|
+
viewBox: "0 0 24 24", fill: "none", stroke: "currentColor",
|
|
238
|
+
"stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round",
|
|
239
|
+
class: "h-4 w-4"
|
|
240
|
+
) do
|
|
241
|
+
tag.path(d: "m9 18 6-6-6-6")
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
class UI::CardActionComponent < ViewComponent::Base
|
|
4
|
+
include UI::CardActionBehavior
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
def initialize(classes: "", **attributes)
|
|
7
|
+
@classes = classes
|
|
8
|
+
@attributes = attributes
|
|
9
|
+
end
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
def call
|
|
12
|
+
render_card_action { content }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
class UI::CardComponent < ViewComponent::Base
|
|
4
|
+
include UI::CardBehavior
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
def initialize(classes: "", **attributes)
|
|
7
|
+
@classes = classes
|
|
8
|
+
@attributes = attributes
|
|
9
|
+
end
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
def call
|
|
12
|
+
render_card { content }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
class UI::CardContentComponent < ViewComponent::Base
|
|
4
|
+
include UI::CardContentBehavior
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
def initialize(classes: "", **attributes)
|
|
7
|
+
@classes = classes
|
|
8
|
+
@attributes = attributes
|
|
9
|
+
end
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
def call
|
|
12
|
+
render_card_content { content }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
class UI::CardDescriptionComponent < ViewComponent::Base
|
|
4
|
+
include UI::CardDescriptionBehavior
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
def initialize(classes: "", **attributes)
|
|
7
|
+
@classes = classes
|
|
8
|
+
@attributes = attributes
|
|
9
|
+
end
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
def call
|
|
12
|
+
render_card_description { content }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
class UI::CardFooterComponent < ViewComponent::Base
|
|
4
|
+
include UI::CardFooterBehavior
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
def initialize(classes: "", **attributes)
|
|
7
|
+
@classes = classes
|
|
8
|
+
@attributes = attributes
|
|
9
|
+
end
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
def call
|
|
12
|
+
render_card_footer { content }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
class UI::CardHeaderComponent < ViewComponent::Base
|
|
4
|
+
include UI::CardHeaderBehavior
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
def initialize(classes: "", **attributes)
|
|
7
|
+
@classes = classes
|
|
8
|
+
@attributes = attributes
|
|
9
|
+
end
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
def call
|
|
12
|
+
render_card_header { content }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
class UI::CardTitleComponent < ViewComponent::Base
|
|
4
|
+
include UI::CardTitleBehavior
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
def initialize(classes: "", **attributes)
|
|
7
|
+
@classes = classes
|
|
8
|
+
@attributes = attributes
|
|
9
|
+
end
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
def call
|
|
12
|
+
render_card_title { content }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
class UI::CarouselComponent < ViewComponent::Base
|
|
4
|
+
def initialize(classes: nil, orientation: "horizontal", opts: {}, plugins: nil, **attributes)
|
|
5
|
+
@classes = classes
|
|
6
|
+
@orientation = orientation
|
|
7
|
+
@opts = opts
|
|
8
|
+
@plugins = plugins
|
|
9
|
+
@attributes = attributes
|
|
10
|
+
end
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
def call
|
|
13
|
+
extend UI::CarouselBehavior
|
|
14
|
+
|
|
15
|
+
content_tag :div, content, **carousel_html_attributes
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
class UI::CarouselContentComponent < ViewComponent::Base
|
|
4
|
+
def initialize(classes: nil, **attributes)
|
|
5
|
+
@classes = classes
|
|
6
|
+
@attributes = attributes
|
|
7
|
+
end
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
end
|
|
9
|
+
def call
|
|
10
|
+
extend UI::CarouselContentBehavior
|
|
11
|
+
|
|
12
|
+
content_tag :div, **carousel_content_html_attributes do
|
|
13
|
+
content_tag :div, content, **carousel_content_container_html_attributes
|
|
15
14
|
end
|
|
15
|
+
end
|
|
16
|
+
end
|