poetry-ui 0.0.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 +7 -0
- data/.gitattributes +6 -0
- data/CHANGELOG.md +3 -0
- data/LICENSE.txt +21 -0
- data/README.md +87 -0
- data/THIRD_PARTY_NOTICES.md +201 -0
- data/app/components/poetry/ui/accordion/component.html.erb +3 -0
- data/app/components/poetry/ui/accordion/component.rb +197 -0
- data/app/components/poetry/ui/accordion/preview.rb +39 -0
- data/app/components/poetry/ui/accordion/style.rb +37 -0
- data/app/components/poetry/ui/alert/component.html.erb +6 -0
- data/app/components/poetry/ui/alert/component.rb +61 -0
- data/app/components/poetry/ui/alert/preview.rb +35 -0
- data/app/components/poetry/ui/alert/style.rb +24 -0
- data/app/components/poetry/ui/alert_dialog/component.html.erb +17 -0
- data/app/components/poetry/ui/alert_dialog/component.rb +208 -0
- data/app/components/poetry/ui/alert_dialog/preview.rb +48 -0
- data/app/components/poetry/ui/alert_dialog/style.rb +46 -0
- data/app/components/poetry/ui/aspect_ratio/component.rb +63 -0
- data/app/components/poetry/ui/aspect_ratio/preview.rb +29 -0
- data/app/components/poetry/ui/aspect_ratio/style.rb +13 -0
- data/app/components/poetry/ui/attachment/component.html.erb +13 -0
- data/app/components/poetry/ui/attachment/component.rb +139 -0
- data/app/components/poetry/ui/attachment/preview.rb +83 -0
- data/app/components/poetry/ui/attachment/style.rb +59 -0
- data/app/components/poetry/ui/autocomplete/component.html.erb +16 -0
- data/app/components/poetry/ui/autocomplete/component.rb +193 -0
- data/app/components/poetry/ui/autocomplete/preview.rb +39 -0
- data/app/components/poetry/ui/autocomplete/style.rb +18 -0
- data/app/components/poetry/ui/avatar/component.rb +103 -0
- data/app/components/poetry/ui/avatar/group_preview.html.erb +11 -0
- data/app/components/poetry/ui/avatar/preview.rb +50 -0
- data/app/components/poetry/ui/avatar/style.rb +34 -0
- data/app/components/poetry/ui/badge/component.rb +73 -0
- data/app/components/poetry/ui/badge/preview.rb +54 -0
- data/app/components/poetry/ui/badge/style.rb +35 -0
- data/app/components/poetry/ui/breadcrumb/component.html.erb +32 -0
- data/app/components/poetry/ui/breadcrumb/component.rb +102 -0
- data/app/components/poetry/ui/breadcrumb/dropdown_crumb_preview.html.erb +21 -0
- data/app/components/poetry/ui/breadcrumb/preview.rb +45 -0
- data/app/components/poetry/ui/breadcrumb/style.rb +25 -0
- data/app/components/poetry/ui/bubble/component.html.erb +4 -0
- data/app/components/poetry/ui/bubble/component.rb +106 -0
- data/app/components/poetry/ui/bubble/preview.rb +62 -0
- data/app/components/poetry/ui/bubble/style.rb +47 -0
- data/app/components/poetry/ui/button/component.html.erb +14 -0
- data/app/components/poetry/ui/button/component.rb +168 -0
- data/app/components/poetry/ui/button/preview.rb +94 -0
- data/app/components/poetry/ui/button/style.rb +41 -0
- data/app/components/poetry/ui/button_group/component.rb +70 -0
- data/app/components/poetry/ui/button_group/popup_triggers_preview.html.erb +21 -0
- data/app/components/poetry/ui/button_group/preview.rb +46 -0
- data/app/components/poetry/ui/button_group/style.rb +27 -0
- data/app/components/poetry/ui/button_group/text_prefix_preview.html.erb +7 -0
- data/app/components/poetry/ui/calendar/component.html.erb +72 -0
- data/app/components/poetry/ui/calendar/component.rb +366 -0
- data/app/components/poetry/ui/calendar/preview.rb +55 -0
- data/app/components/poetry/ui/calendar/style.rb +55 -0
- data/app/components/poetry/ui/card/component.html.erb +11 -0
- data/app/components/poetry/ui/card/component.rb +90 -0
- data/app/components/poetry/ui/card/preview.rb +29 -0
- data/app/components/poetry/ui/card/style.rb +23 -0
- data/app/components/poetry/ui/carousel/component.html.erb +17 -0
- data/app/components/poetry/ui/carousel/component.rb +179 -0
- data/app/components/poetry/ui/carousel/preview.rb +67 -0
- data/app/components/poetry/ui/carousel/style.rb +39 -0
- data/app/components/poetry/ui/checkbox/component.html.erb +22 -0
- data/app/components/poetry/ui/checkbox/component.rb +179 -0
- data/app/components/poetry/ui/checkbox/preview.rb +68 -0
- data/app/components/poetry/ui/checkbox/style.rb +28 -0
- data/app/components/poetry/ui/clipboard_text/component.html.erb +15 -0
- data/app/components/poetry/ui/clipboard_text/component.rb +154 -0
- data/app/components/poetry/ui/clipboard_text/preview.rb +24 -0
- data/app/components/poetry/ui/clipboard_text/style.rb +23 -0
- data/app/components/poetry/ui/code_block/component.html.erb +13 -0
- data/app/components/poetry/ui/code_block/component.rb +141 -0
- data/app/components/poetry/ui/code_block/preview.rb +40 -0
- data/app/components/poetry/ui/code_block/style.rb +38 -0
- data/app/components/poetry/ui/collapsible/component.html.erb +4 -0
- data/app/components/poetry/ui/collapsible/component.rb +134 -0
- data/app/components/poetry/ui/collapsible/preview.rb +24 -0
- data/app/components/poetry/ui/combobox/component.html.erb +49 -0
- data/app/components/poetry/ui/combobox/component.rb +1086 -0
- data/app/components/poetry/ui/combobox/preview.rb +164 -0
- data/app/components/poetry/ui/combobox/style.rb +148 -0
- data/app/components/poetry/ui/command/component.html.erb +20 -0
- data/app/components/poetry/ui/command/component.rb +526 -0
- data/app/components/poetry/ui/command/dialog_component.html.erb +14 -0
- data/app/components/poetry/ui/command/dialog_component.rb +206 -0
- data/app/components/poetry/ui/command/dialog_preview.rb +39 -0
- data/app/components/poetry/ui/command/preview.rb +121 -0
- data/app/components/poetry/ui/command/style.rb +78 -0
- data/app/components/poetry/ui/composable_trigger.rb +63 -0
- data/app/components/poetry/ui/context_menu/component.html.erb +6 -0
- data/app/components/poetry/ui/context_menu/component.rb +358 -0
- data/app/components/poetry/ui/context_menu/preview.rb +111 -0
- data/app/components/poetry/ui/context_menu/style.rb +59 -0
- data/app/components/poetry/ui/data_table/component.html.erb +78 -0
- data/app/components/poetry/ui/data_table/component.rb +277 -0
- data/app/components/poetry/ui/data_table/preview.rb +68 -0
- data/app/components/poetry/ui/data_table/state.rb +115 -0
- data/app/components/poetry/ui/data_table/style.rb +42 -0
- data/app/components/poetry/ui/date_field/component.html.erb +7 -0
- data/app/components/poetry/ui/date_field/component.rb +209 -0
- data/app/components/poetry/ui/date_field/preview.rb +42 -0
- data/app/components/poetry/ui/date_field/style.rb +35 -0
- data/app/components/poetry/ui/date_picker/component.html.erb +23 -0
- data/app/components/poetry/ui/date_picker/component.rb +242 -0
- data/app/components/poetry/ui/date_picker/preview.rb +31 -0
- data/app/components/poetry/ui/date_picker/style.rb +25 -0
- data/app/components/poetry/ui/deferred/component.html.erb +16 -0
- data/app/components/poetry/ui/deferred/component.rb +90 -0
- data/app/components/poetry/ui/deferred/preview.rb +24 -0
- data/app/components/poetry/ui/dialog/component.html.erb +21 -0
- data/app/components/poetry/ui/dialog/component.rb +194 -0
- data/app/components/poetry/ui/dialog/preview.rb +33 -0
- data/app/components/poetry/ui/dialog/style.rb +30 -0
- data/app/components/poetry/ui/drawer/component.html.erb +16 -0
- data/app/components/poetry/ui/drawer/component.rb +207 -0
- data/app/components/poetry/ui/drawer/preview.rb +69 -0
- data/app/components/poetry/ui/drawer/style.rb +105 -0
- data/app/components/poetry/ui/dropdown_menu/component.html.erb +6 -0
- data/app/components/poetry/ui/dropdown_menu/component.rb +350 -0
- data/app/components/poetry/ui/dropdown_menu/preview.rb +101 -0
- data/app/components/poetry/ui/dropdown_menu/style.rb +60 -0
- data/app/components/poetry/ui/empty/component.html.erb +10 -0
- data/app/components/poetry/ui/empty/component.rb +79 -0
- data/app/components/poetry/ui/empty/preview.rb +27 -0
- data/app/components/poetry/ui/empty/style.rb +27 -0
- data/app/components/poetry/ui/family_identity.rb +52 -0
- data/app/components/poetry/ui/field/component.html.erb +19 -0
- data/app/components/poetry/ui/field/component.rb +183 -0
- data/app/components/poetry/ui/field/preview.html.erb +30 -0
- data/app/components/poetry/ui/field/preview.rb +72 -0
- data/app/components/poetry/ui/field/style.rb +68 -0
- data/app/components/poetry/ui/field_group/component.rb +61 -0
- data/app/components/poetry/ui/field_group/preview.html.erb +30 -0
- data/app/components/poetry/ui/field_group/preview.rb +20 -0
- data/app/components/poetry/ui/field_group/style.rb +25 -0
- data/app/components/poetry/ui/field_separator/component.rb +70 -0
- data/app/components/poetry/ui/field_separator/preview.rb +18 -0
- data/app/components/poetry/ui/field_separator/style.rb +20 -0
- data/app/components/poetry/ui/fieldset/component.rb +90 -0
- data/app/components/poetry/ui/fieldset/preview.html.erb +22 -0
- data/app/components/poetry/ui/fieldset/preview.rb +25 -0
- data/app/components/poetry/ui/fieldset/style.rb +18 -0
- data/app/components/poetry/ui/file_input/component.html.erb +14 -0
- data/app/components/poetry/ui/file_input/component.rb +188 -0
- data/app/components/poetry/ui/file_input/preview.rb +30 -0
- data/app/components/poetry/ui/file_input/style.rb +35 -0
- data/app/components/poetry/ui/hover_card/component.html.erb +6 -0
- data/app/components/poetry/ui/hover_card/component.rb +201 -0
- data/app/components/poetry/ui/hover_card/preview.rb +60 -0
- data/app/components/poetry/ui/hover_card/style.rb +17 -0
- data/app/components/poetry/ui/icon/component.rb +127 -0
- data/app/components/poetry/ui/icon/preview.rb +21 -0
- data/app/components/poetry/ui/input/component.rb +80 -0
- data/app/components/poetry/ui/input/preview.rb +35 -0
- data/app/components/poetry/ui/input/style.rb +18 -0
- data/app/components/poetry/ui/input_group/button_preview.html.erb +12 -0
- data/app/components/poetry/ui/input_group/component.rb +69 -0
- data/app/components/poetry/ui/input_group/preview.rb +23 -0
- data/app/components/poetry/ui/input_group/search_preview.html.erb +13 -0
- data/app/components/poetry/ui/input_group/style.rb +40 -0
- data/app/components/poetry/ui/input_group/textarea_preview.html.erb +10 -0
- data/app/components/poetry/ui/input_group_field.rb +61 -0
- data/app/components/poetry/ui/input_otp/component.html.erb +25 -0
- data/app/components/poetry/ui/input_otp/component.rb +250 -0
- data/app/components/poetry/ui/input_otp/preview.rb +91 -0
- data/app/components/poetry/ui/input_otp/style.rb +36 -0
- data/app/components/poetry/ui/item/component.html.erb +13 -0
- data/app/components/poetry/ui/item/component.rb +99 -0
- data/app/components/poetry/ui/item/group_preview.html.erb +15 -0
- data/app/components/poetry/ui/item/preview.rb +52 -0
- data/app/components/poetry/ui/item/style.rb +45 -0
- data/app/components/poetry/ui/kbd/component.rb +47 -0
- data/app/components/poetry/ui/kbd/group_preview.html.erb +4 -0
- data/app/components/poetry/ui/kbd/preview.rb +23 -0
- data/app/components/poetry/ui/kbd/style.rb +13 -0
- data/app/components/poetry/ui/label/component.rb +46 -0
- data/app/components/poetry/ui/label/preview.html.erb +5 -0
- data/app/components/poetry/ui/label/preview.rb +16 -0
- data/app/components/poetry/ui/label/style.rb +13 -0
- data/app/components/poetry/ui/link/component.rb +62 -0
- data/app/components/poetry/ui/link/preview.rb +31 -0
- data/app/components/poetry/ui/link/style.rb +20 -0
- data/app/components/poetry/ui/marker/component.html.erb +4 -0
- data/app/components/poetry/ui/marker/component.rb +81 -0
- data/app/components/poetry/ui/marker/preview.rb +43 -0
- data/app/components/poetry/ui/marker/style.rb +24 -0
- data/app/components/poetry/ui/menubar/component.html.erb +3 -0
- data/app/components/poetry/ui/menubar/component.rb +493 -0
- data/app/components/poetry/ui/menubar/preview.rb +164 -0
- data/app/components/poetry/ui/menubar/style.rb +71 -0
- data/app/components/poetry/ui/menus.rb +386 -0
- data/app/components/poetry/ui/message/component.html.erb +8 -0
- data/app/components/poetry/ui/message/component.rb +64 -0
- data/app/components/poetry/ui/message/preview.rb +33 -0
- data/app/components/poetry/ui/message/style.rb +29 -0
- data/app/components/poetry/ui/message_scroller/component.html.erb +15 -0
- data/app/components/poetry/ui/message_scroller/component.rb +163 -0
- data/app/components/poetry/ui/message_scroller/preview.rb +33 -0
- data/app/components/poetry/ui/message_scroller/style.rb +39 -0
- data/app/components/poetry/ui/metadata_list/component.rb +88 -0
- data/app/components/poetry/ui/metadata_list/preview.rb +55 -0
- data/app/components/poetry/ui/metadata_list/style.rb +35 -0
- data/app/components/poetry/ui/meter/component.rb +117 -0
- data/app/components/poetry/ui/meter/preview.rb +28 -0
- data/app/components/poetry/ui/meter/style.rb +16 -0
- data/app/components/poetry/ui/native_select/component.rb +124 -0
- data/app/components/poetry/ui/native_select/labelled_preview.html.erb +7 -0
- data/app/components/poetry/ui/native_select/preview.rb +20 -0
- data/app/components/poetry/ui/native_select/style.rb +22 -0
- data/app/components/poetry/ui/navigation_menu/bar_preview.html.erb +14 -0
- data/app/components/poetry/ui/navigation_menu/component.html.erb +25 -0
- data/app/components/poetry/ui/navigation_menu/component.rb +254 -0
- data/app/components/poetry/ui/navigation_menu/preview.rb +20 -0
- data/app/components/poetry/ui/navigation_menu/style.rb +73 -0
- data/app/components/poetry/ui/navigation_menu/viewport_preview.html.erb +23 -0
- data/app/components/poetry/ui/number_field/component.html.erb +19 -0
- data/app/components/poetry/ui/number_field/component.rb +263 -0
- data/app/components/poetry/ui/number_field/preview.rb +66 -0
- data/app/components/poetry/ui/number_field/style.rb +14 -0
- data/app/components/poetry/ui/pagination/component.html.erb +40 -0
- data/app/components/poetry/ui/pagination/component.rb +182 -0
- data/app/components/poetry/ui/pagination/preview.rb +47 -0
- data/app/components/poetry/ui/pagination/style.rb +27 -0
- data/app/components/poetry/ui/popover/component.html.erb +17 -0
- data/app/components/poetry/ui/popover/component.rb +203 -0
- data/app/components/poetry/ui/popover/preview.html.erb +29 -0
- data/app/components/poetry/ui/popover/preview.rb +66 -0
- data/app/components/poetry/ui/popover/style.rb +26 -0
- data/app/components/poetry/ui/popper_consumer.rb +69 -0
- data/app/components/poetry/ui/progress/component.rb +95 -0
- data/app/components/poetry/ui/progress/preview.rb +22 -0
- data/app/components/poetry/ui/progress/style.rb +19 -0
- data/app/components/poetry/ui/questionnaire/component.html.erb +80 -0
- data/app/components/poetry/ui/questionnaire/component.rb +396 -0
- data/app/components/poetry/ui/questionnaire/preview.rb +99 -0
- data/app/components/poetry/ui/questionnaire/style.rb +53 -0
- data/app/components/poetry/ui/radio_group/component.html.erb +4 -0
- data/app/components/poetry/ui/radio_group/component.rb +323 -0
- data/app/components/poetry/ui/radio_group/preview.rb +109 -0
- data/app/components/poetry/ui/radio_group/style.rb +53 -0
- data/app/components/poetry/ui/resizable/component.html.erb +10 -0
- data/app/components/poetry/ui/resizable/component.rb +178 -0
- data/app/components/poetry/ui/resizable/preview.rb +42 -0
- data/app/components/poetry/ui/resizable/style.rb +30 -0
- data/app/components/poetry/ui/scroll_area/component.rb +76 -0
- data/app/components/poetry/ui/scroll_area/preview.rb +35 -0
- data/app/components/poetry/ui/scroll_area/style.rb +19 -0
- data/app/components/poetry/ui/search_field/component.html.erb +15 -0
- data/app/components/poetry/ui/search_field/component.rb +137 -0
- data/app/components/poetry/ui/search_field/preview.rb +23 -0
- data/app/components/poetry/ui/search_field/style.rb +18 -0
- data/app/components/poetry/ui/select/component.html.erb +15 -0
- data/app/components/poetry/ui/select/component.rb +639 -0
- data/app/components/poetry/ui/select/preview.rb +113 -0
- data/app/components/poetry/ui/select/style.rb +58 -0
- data/app/components/poetry/ui/sensitive_input/component.html.erb +29 -0
- data/app/components/poetry/ui/sensitive_input/component.rb +274 -0
- data/app/components/poetry/ui/sensitive_input/preview.rb +40 -0
- data/app/components/poetry/ui/sensitive_input/style.rb +49 -0
- data/app/components/poetry/ui/separator/component.rb +57 -0
- data/app/components/poetry/ui/separator/preview.rb +19 -0
- data/app/components/poetry/ui/separator/style.rb +15 -0
- data/app/components/poetry/ui/sheet/component.html.erb +21 -0
- data/app/components/poetry/ui/sheet/component.rb +97 -0
- data/app/components/poetry/ui/sheet/preview.rb +57 -0
- data/app/components/poetry/ui/sheet/style.rb +47 -0
- data/app/components/poetry/ui/sidebar/component.html.erb +20 -0
- data/app/components/poetry/ui/sidebar/component.rb +249 -0
- data/app/components/poetry/ui/sidebar/preview.rb +21 -0
- data/app/components/poetry/ui/sidebar/shell_preview.html.erb +47 -0
- data/app/components/poetry/ui/sidebar/style.rb +139 -0
- data/app/components/poetry/ui/skeleton/component.rb +39 -0
- data/app/components/poetry/ui/skeleton/preview.rb +22 -0
- data/app/components/poetry/ui/skeleton/style.rb +13 -0
- data/app/components/poetry/ui/slider/component.html.erb +13 -0
- data/app/components/poetry/ui/slider/component.rb +360 -0
- data/app/components/poetry/ui/slider/preview.rb +73 -0
- data/app/components/poetry/ui/slider/style.rb +55 -0
- data/app/components/poetry/ui/spinner/component.rb +58 -0
- data/app/components/poetry/ui/spinner/preview.rb +22 -0
- data/app/components/poetry/ui/spinner/style.rb +12 -0
- data/app/components/poetry/ui/stat/component.html.erb +13 -0
- data/app/components/poetry/ui/stat/component.rb +102 -0
- data/app/components/poetry/ui/stat/preview.rb +47 -0
- data/app/components/poetry/ui/stat/style.rb +29 -0
- data/app/components/poetry/ui/switch/component.html.erb +15 -0
- data/app/components/poetry/ui/switch/component.rb +136 -0
- data/app/components/poetry/ui/switch/preview.rb +66 -0
- data/app/components/poetry/ui/switch/style.rb +22 -0
- data/app/components/poetry/ui/table/component.html.erb +3 -0
- data/app/components/poetry/ui/table/component.rb +93 -0
- data/app/components/poetry/ui/table/preview.rb +96 -0
- data/app/components/poetry/ui/table/style.rb +26 -0
- data/app/components/poetry/ui/tabs/component.html.erb +10 -0
- data/app/components/poetry/ui/tabs/component.rb +253 -0
- data/app/components/poetry/ui/tabs/preview.rb +43 -0
- data/app/components/poetry/ui/tabs/style.rb +49 -0
- data/app/components/poetry/ui/tag_group/component.html.erb +8 -0
- data/app/components/poetry/ui/tag_group/component.rb +203 -0
- data/app/components/poetry/ui/tag_group/preview.rb +43 -0
- data/app/components/poetry/ui/tag_group/style.rb +29 -0
- data/app/components/poetry/ui/textarea/component.rb +64 -0
- data/app/components/poetry/ui/textarea/preview.rb +75 -0
- data/app/components/poetry/ui/textarea/style.rb +18 -0
- data/app/components/poetry/ui/time_field/component.html.erb +6 -0
- data/app/components/poetry/ui/time_field/component.rb +85 -0
- data/app/components/poetry/ui/time_field/preview.rb +40 -0
- data/app/components/poetry/ui/time_field/style.rb +30 -0
- data/app/components/poetry/ui/timeline/component.rb +134 -0
- data/app/components/poetry/ui/timeline/preview.rb +61 -0
- data/app/components/poetry/ui/timeline/style.rb +54 -0
- data/app/components/poetry/ui/toast/component.html.erb +24 -0
- data/app/components/poetry/ui/toast/component.rb +178 -0
- data/app/components/poetry/ui/toast/preview.rb +69 -0
- data/app/components/poetry/ui/toast/style.rb +33 -0
- data/app/components/poetry/ui/toast_trigger/addressed_preview.html.erb +12 -0
- data/app/components/poetry/ui/toast_trigger/component.html.erb +3 -0
- data/app/components/poetry/ui/toast_trigger/component.rb +82 -0
- data/app/components/poetry/ui/toast_trigger/default_preview.html.erb +11 -0
- data/app/components/poetry/ui/toast_trigger/preview.rb +19 -0
- data/app/components/poetry/ui/toaster/component.html.erb +1 -0
- data/app/components/poetry/ui/toaster/component.rb +99 -0
- data/app/components/poetry/ui/toaster/positions_preview.html.erb +24 -0
- data/app/components/poetry/ui/toaster/preview.rb +46 -0
- data/app/components/poetry/ui/toaster/stamp_preview.html.erb +15 -0
- data/app/components/poetry/ui/toaster/style.rb +26 -0
- data/app/components/poetry/ui/toggle/component.rb +120 -0
- data/app/components/poetry/ui/toggle/preview.rb +79 -0
- data/app/components/poetry/ui/toggle/style.rb +33 -0
- data/app/components/poetry/ui/toggle_group/component.html.erb +4 -0
- data/app/components/poetry/ui/toggle_group/component.rb +252 -0
- data/app/components/poetry/ui/toggle_group/preview.rb +143 -0
- data/app/components/poetry/ui/toggle_group/style.rb +33 -0
- data/app/components/poetry/ui/toolbar/component.rb +125 -0
- data/app/components/poetry/ui/toolbar/preview.rb +41 -0
- data/app/components/poetry/ui/toolbar/style.rb +20 -0
- data/app/components/poetry/ui/tooltip/component.html.erb +20 -0
- data/app/components/poetry/ui/tooltip/component.rb +185 -0
- data/app/components/poetry/ui/tooltip/preview.rb +74 -0
- data/app/components/poetry/ui/tooltip/previews/provider_row.html.erb +25 -0
- data/app/components/poetry/ui/tooltip/style.rb +24 -0
- data/app/components/poetry/ui/tree/component.html.erb +32 -0
- data/app/components/poetry/ui/tree/component.rb +233 -0
- data/app/components/poetry/ui/tree/preview.rb +55 -0
- data/app/components/poetry/ui/tree/style.rb +29 -0
- data/app/components/poetry/ui/typeset/component.rb +73 -0
- data/app/components/poetry/ui/typeset/preview.rb +45 -0
- data/app/components/poetry/ui/typeset/style.rb +15 -0
- data/app/controllers/poetry/ui/llms_controller.rb +28 -0
- data/app/helpers/poetry/ui/components_helper.rb +1794 -0
- data/app/helpers/poetry/ui/form_builder/type_inference.rb +117 -0
- data/app/helpers/poetry/ui/form_builder.rb +916 -0
- data/app/helpers/poetry/ui/optimistic_form_builder.rb +55 -0
- data/app/helpers/poetry/ui/toast_stream_actions.rb +27 -0
- data/config/component_descriptions.yml +96 -0
- data/config/component_registry.yml +12257 -0
- data/config/locales/en.yml +93 -0
- data/config/routes.rb +8 -0
- data/config/template_classes.txt +113 -0
- data/lib/generators/poetry/add/add_generator.rb +218 -0
- data/lib/generators/poetry/agent_rules/agent_rules_generator.rb +91 -0
- data/lib/generators/poetry/agents/agents_generator.rb +24 -0
- data/lib/generators/poetry/agents_section.rb +148 -0
- data/lib/generators/poetry/block/block_generator.rb +67 -0
- data/lib/generators/poetry/block/templates/action_bar.html.erb +45 -0
- data/lib/generators/poetry/block/templates/app_shell.html.erb +139 -0
- data/lib/generators/poetry/block/templates/data_index.html.erb +85 -0
- data/lib/generators/poetry/block/templates/destructive_panel.html.erb +26 -0
- data/lib/generators/poetry/block/templates/page_header.html.erb +25 -0
- data/lib/generators/poetry/block/templates/section_card.html.erb +42 -0
- data/lib/generators/poetry/block/templates/stepper.html.erb +79 -0
- data/lib/generators/poetry/block/templates/top_nav.html.erb +44 -0
- data/lib/generators/poetry/diff/diff_generator.rb +135 -0
- data/lib/generators/poetry/editor/editor_generator.rb +344 -0
- data/lib/generators/poetry/editor/templates/poetry-check-hook +81 -0
- data/lib/generators/poetry/install/install_generator.rb +364 -0
- data/lib/generators/poetry/pagination/pagination_generator.rb +76 -0
- data/lib/generators/poetry/pagination/templates/kaminari_paginator.html.erb +29 -0
- data/lib/generators/poetry/pagination/templates/poetry_link_renderer.rb +34 -0
- data/lib/generators/poetry/pagination/templates/poetry_pagy_helper.rb +28 -0
- data/lib/generators/poetry/recipes/agent_embed/app/javascript/controllers/agent_demo_controller.js +131 -0
- data/lib/generators/poetry/recipes/screen_data_index/app/controllers/orders_controller.rb +15 -0
- data/lib/generators/poetry/recipes/screen_data_index/app/views/orders/index.html.erb +7 -0
- data/lib/generators/poetry/recipes/screen_data_index/test/system/orders_index_test.rb +16 -0
- data/lib/generators/poetry/recipes/screen_settings/app/controllers/settings_controller.rb +14 -0
- data/lib/generators/poetry/recipes/screen_settings/app/views/settings/show.html.erb +9 -0
- data/lib/generators/poetry/recipes/screen_settings/test/system/settings_show_test.rb +16 -0
- data/lib/generators/poetry/scaffold_templates/scaffold_templates_generator.rb +60 -0
- data/lib/generators/poetry/scaffold_templates/templates/_form.html.erb.tt +77 -0
- data/lib/generators/poetry/scaffold_templates/templates/controller.rb.tt +78 -0
- data/lib/generators/poetry/scaffold_templates/templates/edit.html.erb.tt +14 -0
- data/lib/generators/poetry/scaffold_templates/templates/index.html.erb.tt +24 -0
- data/lib/generators/poetry/scaffold_templates/templates/new.html.erb.tt +11 -0
- data/lib/generators/poetry/scaffold_templates/templates/partial.html.erb.tt +13 -0
- data/lib/generators/poetry/scaffold_templates/templates/show.html.erb.tt +18 -0
- data/lib/generators/poetry/skill/skill_generator.rb +34 -0
- data/lib/generators/poetry/skill/templates/poetry-component/SKILL.md +58 -0
- data/lib/generators/poetry/skill/templates/poetry-component/references/anatomy.md +152 -0
- data/lib/generators/poetry/skill/templates/poetry-component/references/checklist.md +67 -0
- data/lib/generators/poetry/skill/templates/poetry-component/references/documentation.md +137 -0
- data/lib/generators/poetry/skill/templates/poetry-design/SKILL.md +56 -0
- data/lib/generators/poetry/skill/templates/poetry-design/references/audit.md +123 -0
- data/lib/generators/poetry/skill/templates/poetry-design/references/compose.md +73 -0
- data/lib/generators/poetry/skill/templates/poetry-design/references/figma.md +68 -0
- data/lib/generators/poetry/skill/templates/poetry-design/references/paper.md +56 -0
- data/lib/generators/poetry/skill/templates/poetry-design/references/study.md +47 -0
- data/lib/generators/poetry/skill/templates/poetry-design/references/theme.md +70 -0
- data/lib/generators/poetry/skills_section.rb +58 -0
- data/lib/poetry/ui/chat.rb +283 -0
- data/lib/poetry/ui/code_block_highlighter.rb +60 -0
- data/lib/poetry/ui/engine.rb +55 -0
- data/lib/poetry/ui/recipes.rb +157 -0
- data/lib/poetry/ui/testing/combobox.rb +167 -0
- data/lib/poetry/ui/testing/dialog.rb +73 -0
- data/lib/poetry/ui/testing/menu.rb +127 -0
- data/lib/poetry/ui/testing/registration.rb +58 -0
- data/lib/poetry/ui/testing/select.rb +147 -0
- data/lib/poetry/ui/testing/tester.rb +130 -0
- data/lib/poetry/ui/testing.rb +130 -0
- data/lib/poetry/ui/themes.rb +109 -0
- data/lib/poetry/ui/version.rb +8 -0
- data/lib/poetry/ui/webmcp.rb +91 -0
- data/lib/poetry/ui.rb +285 -0
- data/lib/poetry-ui.rb +5 -0
- data/lib/tasks/poetry/check.rake +73 -0
- data/lib/tasks/poetry/design.rake +293 -0
- data/lib/tasks/poetry/verify.rake +36 -0
- data/themes/default.css +1793 -0
- data/themes/luma.css +1764 -0
- data/themes/lyra.css +1768 -0
- data/themes/maia.css +1768 -0
- data/themes/mira.css +1760 -0
- data/themes/nova.css +1755 -0
- data/themes/rhea.css +1771 -0
- data/themes/sera.css +1757 -0
- data/themes/vega.css +1775 -0
- data/typeset/typeset.css +499 -0
- metadata +502 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Poetry
|
|
4
|
+
module Ui
|
|
5
|
+
module Combobox
|
|
6
|
+
# The Combobox preview matrix: the ported combobox-demo composition
|
|
7
|
+
# (framework picker), placeholder vs valued, grouped options, the
|
|
8
|
+
# server-rendered open state, disabled trigger/options, the
|
|
9
|
+
# filter:false server mode, RTL, and the width knob.
|
|
10
|
+
class Preview < Poetry::Core::Preview::Base
|
|
11
|
+
FRAMEWORKS = [%w[next.js Next.js], %w[sveltekit SvelteKit], %w[nuxt.js Nuxt.js],
|
|
12
|
+
%w[remix Remix], %w[astro Astro]].freeze
|
|
13
|
+
|
|
14
|
+
# The combobox-demo port: click (or type on) the trigger to open a
|
|
15
|
+
# typing session; the filter narrows, Enter commits to the hidden
|
|
16
|
+
# native select, Esc/Tab leave the value untouched.
|
|
17
|
+
def default
|
|
18
|
+
render_component(name: "framework", placeholder: "Select framework...",
|
|
19
|
+
search_placeholder: "Search framework...", "aria-label": "Framework") do |combobox|
|
|
20
|
+
FRAMEWORKS.each { |value, label| combobox.with_item(value: value) { label } }
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# The server-rendered value: display label + native option selected
|
|
25
|
+
# + the aria-selected/data-selected twin + the visible check indicator,
|
|
26
|
+
# all in one pass.
|
|
27
|
+
def valued
|
|
28
|
+
render_component(name: "framework", value: "sveltekit", placeholder: "Select framework...",
|
|
29
|
+
search_placeholder: "Search framework...", "aria-label": "Framework") do |combobox|
|
|
30
|
+
FRAMEWORKS.each { |value, label| combobox.with_item(value: value) { label } }
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# show_clear (the source's showClear): the trigger-side deselection X
|
|
35
|
+
# swaps in over the chevrons while a value is committed - the
|
|
36
|
+
# golden pins the swap (X visible, chevron box kept but invisible).
|
|
37
|
+
def clear
|
|
38
|
+
render_component(name: "framework", value: "next.js", show_clear: true,
|
|
39
|
+
placeholder: "Select framework...", search_placeholder: "Search framework...",
|
|
40
|
+
"aria-label": "Framework") do |combobox|
|
|
41
|
+
FRAMEWORKS.each { |value, label| combobox.with_item(value: value) { label } }
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Groups keep Command's heading anatomy; the filter hides a group
|
|
46
|
+
# when all its options hide.
|
|
47
|
+
def grouped
|
|
48
|
+
render_component(name: "stack", placeholder: "Select a tool...",
|
|
49
|
+
search_placeholder: "Search tools...", "aria-label": "Tool") do |combobox|
|
|
50
|
+
combobox.with_group(heading: "Frameworks") do |group|
|
|
51
|
+
group.with_item(value: "rails") { "Ruby on Rails" }
|
|
52
|
+
group.with_item(value: "hanami") { "Hanami" }
|
|
53
|
+
end
|
|
54
|
+
combobox.with_separator
|
|
55
|
+
combobox.with_group(heading: "Test runners") do |group|
|
|
56
|
+
group.with_item(value: "minitest") { "Minitest" }
|
|
57
|
+
group.with_item(value: "rspec") { "RSpec" }
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Server-rendered open state (controllable-state: the attributes
|
|
63
|
+
# are the store; the controller reconciles on connect). Type a
|
|
64
|
+
# non-matching query ("zzz") for the zero-match state: every option
|
|
65
|
+
# hides, the empty part shows, the popup STAYS OPEN.
|
|
66
|
+
def open
|
|
67
|
+
render_component(name: "framework", open: true, value: "remix",
|
|
68
|
+
placeholder: "Select framework...", search_placeholder: "Search framework...",
|
|
69
|
+
"aria-label": "Framework") do |combobox|
|
|
70
|
+
combobox.with_empty { "No framework found." }
|
|
71
|
+
FRAMEWORKS.each { |value, label| combobox.with_item(value: value) { label } }
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Disables the trigger AND the native select together.
|
|
76
|
+
def disabled
|
|
77
|
+
render_component(name: "framework", disabled: true, placeholder: "Select framework...",
|
|
78
|
+
"aria-label": "Framework") do |combobox|
|
|
79
|
+
FRAMEWORKS.each { |value, label| combobox.with_item(value: value) { label } }
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Disabled options: skipped by arrows and the filter re-seat;
|
|
84
|
+
# commit is unreachable (the engine's collection filter).
|
|
85
|
+
def disabled_options
|
|
86
|
+
render_component(name: "plan", placeholder: "Select a plan...",
|
|
87
|
+
"aria-label": "Plan") do |combobox|
|
|
88
|
+
combobox.with_item(value: "hobby") { "Hobby" }
|
|
89
|
+
combobox.with_item(value: "pro") { "Pro" }
|
|
90
|
+
combobox.with_item(value: "enterprise", disabled: true) { "Enterprise (contact sales)" }
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# filter: false - the SERVER-DRIVEN mode: typing never hides
|
|
95
|
+
# options client-side; the host re-renders the list (the Turbo
|
|
96
|
+
# frame ?q= recipe) and the frame response must render the twin
|
|
97
|
+
# native <option> for every committable item (the recipe's one
|
|
98
|
+
# hard rule).
|
|
99
|
+
def server_mode
|
|
100
|
+
render_component(name: "author_id", filter: false, placeholder: "Search authors...",
|
|
101
|
+
search_placeholder: "Type to search...", "aria-label": "Author") do |combobox|
|
|
102
|
+
combobox.with_item(value: "1") { "Ada Lovelace" }
|
|
103
|
+
combobox.with_item(value: "2") { "Grace Hopper" }
|
|
104
|
+
combobox.with_item(value: "3") { "Annie Easley" }
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# dir=rtl: the indicator's ms-auto keeps the check on the reading-
|
|
109
|
+
# order end (the logical-property fix over the demo's ml-auto);
|
|
110
|
+
# popper alignment flips via the direction helper.
|
|
111
|
+
def rtl
|
|
112
|
+
render_component(name: "language", dir: :rtl, value: "ar", "aria-label": "اللغة") do |combobox|
|
|
113
|
+
combobox.with_item(value: "ar") { "العربية" }
|
|
114
|
+
combobox.with_item(value: "he") { "עברית" }
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# The width knob: one utility on the trigger; the popup ALWAYS
|
|
119
|
+
# tracks it via the anchor-width binding.
|
|
120
|
+
def wide
|
|
121
|
+
render_component(name: "timezone", width: "w-80", placeholder: "Select a timezone...",
|
|
122
|
+
search_placeholder: "Search timezones...", "aria-label": "Timezone") do |combobox|
|
|
123
|
+
combobox.with_item(value: "est") { "Eastern Standard Time (EST)" }
|
|
124
|
+
combobox.with_item(value: "cet") { "Central European Time (CET)" }
|
|
125
|
+
combobox.with_item(value: "jst") { "Japan Standard Time (JST)" }
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# ## Multiple
|
|
130
|
+
|
|
131
|
+
# multiple: true - the chips FIELD replaces the trigger (the source's
|
|
132
|
+
# input-inside layout): value: takes an array, one chip per
|
|
133
|
+
# committed value in value order, the filter input rides inline,
|
|
134
|
+
# selection TOGGLES with the popup staying open, and the native
|
|
135
|
+
# <select multiple> posts frameworks[].
|
|
136
|
+
def multiple
|
|
137
|
+
render_component(name: "frameworks", multiple: true, value: %w[sveltekit remix],
|
|
138
|
+
placeholder: "Select frameworks...", "aria-label": "Frameworks") do |combobox|
|
|
139
|
+
FRAMEWORKS.each { |value, label| combobox.with_item(value: value) { label } }
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Empty selection: no toolbar role, data-placeholder on the frame,
|
|
144
|
+
# the placeholder text riding the inline input.
|
|
145
|
+
def multiple_empty
|
|
146
|
+
render_component(name: "frameworks", multiple: true,
|
|
147
|
+
placeholder: "Select frameworks...", "aria-label": "Frameworks") do |combobox|
|
|
148
|
+
FRAMEWORKS.each { |value, label| combobox.with_item(value: value) { label } }
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Disabled: the frame dims (data-disabled), chips carry
|
|
153
|
+
# data-disabled (focus is blocked entirely), the input and native
|
|
154
|
+
# select disable together.
|
|
155
|
+
def multiple_disabled
|
|
156
|
+
render_component(name: "frameworks", multiple: true, disabled: true, value: %w[astro],
|
|
157
|
+
placeholder: "Select frameworks...", "aria-label": "Frameworks") do |combobox|
|
|
158
|
+
FRAMEWORKS.each { |value, label| combobox.with_item(value: value) { label } }
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
end
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Poetry
|
|
4
|
+
module Ui
|
|
5
|
+
module Combobox
|
|
6
|
+
# Re-expressed through the cn-* theme layer. The embedded
|
|
7
|
+
# Command parts still reuse Command::Style verbatim; the popup's
|
|
8
|
+
# list and label are the combobox's own hooks. The input fills its
|
|
9
|
+
# well (h-full, mechanics) rather than carrying the classic demo's
|
|
10
|
+
# h-9 - every theme's well sizes it. The themed demo width still
|
|
11
|
+
# loses to the width: knob (caller utilities beat the base layer).
|
|
12
|
+
class Style < Poetry::Core::Style
|
|
13
|
+
# The demo trigger IS Button's reference shape with the demo deltas
|
|
14
|
+
# (justify-between, font-normal, the w-50 demo width) - all riding
|
|
15
|
+
# .cn-combobox-trigger now.
|
|
16
|
+
element :trigger, "cn-combobox-trigger inline-flex shrink-0 items-center justify-between " \
|
|
17
|
+
"whitespace-nowrap transition-all outline-none " \
|
|
18
|
+
"disabled:pointer-events-none disabled:opacity-50 " \
|
|
19
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
20
|
+
|
|
21
|
+
# The value DISPLAY truncates inside the fixed-width trigger.
|
|
22
|
+
element :value, "truncate"
|
|
23
|
+
# The width option's default - lives in the dictionary so the
|
|
24
|
+
# safelist ships it and verify_compiled gates it (a bare Ruby
|
|
25
|
+
# default string compiles in no host).
|
|
26
|
+
element :default_width, "w-50"
|
|
27
|
+
|
|
28
|
+
# The leading group (with_trigger only): a custom icon is a PREFIX
|
|
29
|
+
# to the value, not a third justify-between child - grouped, the
|
|
30
|
+
# chevrons stay the row's other end. min-w-0 keeps the value's
|
|
31
|
+
# truncate working inside the flex group.
|
|
32
|
+
element :trigger_leading, "flex min-w-0 items-center gap-2"
|
|
33
|
+
|
|
34
|
+
# The popup: Popover's chrome retuned per the demo (p-0 - the
|
|
35
|
+
# Command brings its own padding); the anchor-width binding stays
|
|
36
|
+
# inline (popper measures the anchor and sets the generic var).
|
|
37
|
+
# The column chain (flex-col + the popper's available-height cap,
|
|
38
|
+
# the source's structural pair) lets the LIST shrink under
|
|
39
|
+
# whatever cap the popup ends up with - the theme's design cap or
|
|
40
|
+
# the viewport - instead of every theme subtracting the embedded
|
|
41
|
+
# command's own padding; the list's themed max-height holds the
|
|
42
|
+
# design height.
|
|
43
|
+
element :content, "cn-combobox-content cn-menu-translucent z-50 flex w-(--anchor-width) " \
|
|
44
|
+
"max-h-(--available-height) origin-(--transform-origin) flex-col outline-hidden " \
|
|
45
|
+
"data-[chips=true]:min-w-(--anchor-width) group/combobox-content " \
|
|
46
|
+
"max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] relative"
|
|
47
|
+
|
|
48
|
+
# THE listbox, the popup's scroll owner: the source's combobox
|
|
49
|
+
# list, where the option inset rides the LIST and groups stay
|
|
50
|
+
# unpadded - an ungrouped option sits exactly where a grouped one
|
|
51
|
+
# does, and the first row clears the search field in every theme.
|
|
52
|
+
# (Command's list leaves the inset to its groups, the palette
|
|
53
|
+
# convention; a combobox's options are usually ungrouped.)
|
|
54
|
+
element :list, "cn-combobox-list overflow-x-hidden overflow-y-auto overscroll-contain"
|
|
55
|
+
|
|
56
|
+
# A group: role=group around a label and its options. No hook and
|
|
57
|
+
# no utilities ON PURPOSE - neither source styles the combobox
|
|
58
|
+
# group (the label and the list carry the geometry); themes reach
|
|
59
|
+
# it as [data-slot=command-group] inside the popup.
|
|
60
|
+
element :group, ""
|
|
61
|
+
|
|
62
|
+
# The group's label (the heading part): the source's combobox
|
|
63
|
+
# label rule, themed per style.
|
|
64
|
+
element :label, "cn-combobox-label"
|
|
65
|
+
|
|
66
|
+
# The filter input fills its well: h-full is mechanics (the well's
|
|
67
|
+
# height is the theme's - h-9 in default, the h-7/h-8 pill in the
|
|
68
|
+
# ports), so the input keeps covering the whole field for pointer
|
|
69
|
+
# focus without carrying a theme value. In default this lands where
|
|
70
|
+
# the classic demo's h-9 retune did; the ports' source sizes the
|
|
71
|
+
# input by its group the same way.
|
|
72
|
+
element :input_fill, "h-full"
|
|
73
|
+
|
|
74
|
+
# The source's option fills its list row (Command's item leaves width
|
|
75
|
+
# to the palette; the combobox row is the source's w-full).
|
|
76
|
+
element :item_fill, "w-full"
|
|
77
|
+
|
|
78
|
+
# POETRY ADDITION (Command's precedent): the label wrapper is
|
|
79
|
+
# layout-transparent - it mirrors the item's own row (preflight
|
|
80
|
+
# blockifies svg, so a bare span would stack an icon above its text).
|
|
81
|
+
element :item_text, "flex min-w-0 items-center gap-2"
|
|
82
|
+
|
|
83
|
+
# The committed-value check: TRAILING ms-auto per the demo (not
|
|
84
|
+
# Select's absolute right-2 gutter) - the family RTL fix.
|
|
85
|
+
element :item_indicator, "cn-combobox-item-indicator ms-auto flex items-center justify-center"
|
|
86
|
+
|
|
87
|
+
# POETRY ADDITION (Select's precedent): server-rendered always; the
|
|
88
|
+
# parent item's bare data-selected drives visibility.
|
|
89
|
+
element :item_indicator_state, "[:not([data-selected])>&]:hidden"
|
|
90
|
+
|
|
91
|
+
# The form bubble: visually hidden but PAINTED (sr-only clips,
|
|
92
|
+
# never display:none - autofill heuristics skip unpainted controls).
|
|
93
|
+
element :native, "sr-only"
|
|
94
|
+
|
|
95
|
+
# The chips FIELD frame (multiple: - replaces the trigger): the
|
|
96
|
+
# flex-wrap mechanism stays inline; the input-frame chrome (border,
|
|
97
|
+
# ring, paddings, min-height, the chips-present padding tighten)
|
|
98
|
+
# rides themes/*.css. The disabled plumbing mirrors the trigger's.
|
|
99
|
+
element :chips, "cn-combobox-chips flex flex-wrap items-center " \
|
|
100
|
+
"data-disabled:pointer-events-none data-disabled:opacity-50"
|
|
101
|
+
|
|
102
|
+
# One chip: real-focus surface (:focus-visible ring is theme-side).
|
|
103
|
+
element :chip, "cn-combobox-chip flex shrink-0 items-center outline-none " \
|
|
104
|
+
"has-disabled:cursor-not-allowed has-disabled:opacity-50 " \
|
|
105
|
+
"has-disabled:pointer-events-none"
|
|
106
|
+
|
|
107
|
+
# ChipRemove: the ghost icon-button mechanism; the dim/hover/size
|
|
108
|
+
# treatment is theme-side.
|
|
109
|
+
element :chip_remove, "cn-combobox-chip-remove inline-flex shrink-0 items-center " \
|
|
110
|
+
"justify-center outline-none [&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
111
|
+
|
|
112
|
+
# The inline filter input: bare (the FRAME is the visual field) -
|
|
113
|
+
# min-width and placeholder color are theme-side.
|
|
114
|
+
element :chip_input, "cn-combobox-chip-input flex-1 bg-transparent outline-none min-w-16"
|
|
115
|
+
|
|
116
|
+
# The show_clear: positioning wrapper - shrink-wraps the trigger so
|
|
117
|
+
# the absolute X seats against the TRIGGER's edge, not the
|
|
118
|
+
# full-width root (the root is a block; end-2 against it lands at
|
|
119
|
+
# the page edge). Rendered ONLY when show_clear - every other
|
|
120
|
+
# instance keeps its wrapper-free markup.
|
|
121
|
+
element :clear_anchor, "relative inline-flex"
|
|
122
|
+
|
|
123
|
+
# The show_clear: X: a trigger SIBLING
|
|
124
|
+
# (button-in-button is invalid) absolutely seated over the chevron
|
|
125
|
+
# slot (px-3 gutter + size-4 icon -> a size-6 hitbox at end-2
|
|
126
|
+
# centers on it). Structural-only chrome, like the chevron itself.
|
|
127
|
+
element :clear, "absolute end-2 top-1/2 flex size-6 -translate-y-1/2 items-center " \
|
|
128
|
+
"justify-center rounded-sm opacity-50 outline-none transition-opacity " \
|
|
129
|
+
"hover:opacity-100 focus-visible:opacity-100 focus-visible:ring-[3px] " \
|
|
130
|
+
"focus-visible:ring-ring/50 disabled:pointer-events-none"
|
|
131
|
+
element :clear_icon, "size-4"
|
|
132
|
+
|
|
133
|
+
# The chevron half of the clear swap: while the sibling X is
|
|
134
|
+
# showable (not [hidden]), the chevron goes INVISIBLE - visibility,
|
|
135
|
+
# never display, so it keeps its flex box and the value text never
|
|
136
|
+
# slides under the absolute X (the item_indicator_state pattern).
|
|
137
|
+
element :trigger_icon_swap,
|
|
138
|
+
"[[data-slot=combobox-trigger]:has(+[data-slot=combobox-clear]:not([hidden]))_&]:invisible"
|
|
139
|
+
|
|
140
|
+
# The source's inline lucide icon classes, named per part. The
|
|
141
|
+
# double chevron is the combobox tell (Select wears chevron-down).
|
|
142
|
+
element :trigger_icon, "size-4 opacity-50"
|
|
143
|
+
element :indicator_check, "size-4"
|
|
144
|
+
element :chip_remove_icon, "size-3"
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<%# The item union renders FIRST (into a capture) so the shared ItemSet
|
|
2
|
+
has assigned every server-stable option id - and decided the initial
|
|
3
|
+
highlight - before the input derives aria-activedescendant from it
|
|
4
|
+
(the Select capture pattern, activedescendant-flavored). %>
|
|
5
|
+
<% list_body = capture do %>
|
|
6
|
+
<% items.each do |item| %><%= item %><% end %>
|
|
7
|
+
<% end %>
|
|
8
|
+
<%= content_tag(:div, **root_attributes.to_attributes) do %>
|
|
9
|
+
<div data-slot="command-input-wrapper" class="<%= css(:input_wrapper) %>">
|
|
10
|
+
<span data-slot="command-search-icon"><%= render(Poetry::Ui::Icon::Component.new(name: :search, class: css(:search_icon))) %></span>
|
|
11
|
+
<%= tag.input(**Poetry::Core::HTML::Attributes.new(input_attributes).to_attributes) %>
|
|
12
|
+
<%= input_trailing_html %>
|
|
13
|
+
</div>
|
|
14
|
+
<%= content_tag(:div, **Poetry::Core::HTML::Attributes.new(list_attributes).to_attributes) do %>
|
|
15
|
+
<%= empty_part %>
|
|
16
|
+
<%= loading_part %>
|
|
17
|
+
<%= list_body %>
|
|
18
|
+
<% end %>
|
|
19
|
+
<%= status_part %>
|
|
20
|
+
<% end %>
|