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
data/typeset/typeset.css
ADDED
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* poetry/typeset - a styling system for HTML and rendered markdown.
|
|
3
|
+
* Ported verbatim from shadcn/typeset (upstream 3cdaa6eb);
|
|
4
|
+
* https://ui.shadcn.com/docs/typeset.
|
|
5
|
+
*
|
|
6
|
+
* This file is app-owned: poetry copied it here at install and will never
|
|
7
|
+
* overwrite it - tune the variables or rules directly. Body verbatim from
|
|
8
|
+
* upstream ON PURPOSE (diffable against future upstream pins). Note the
|
|
9
|
+
* font vars: poetry ships font families as metadata, not CSS, so
|
|
10
|
+
* --font-heading / --font-mono may be undefined in your app - font-family
|
|
11
|
+
* then simply inherits, which is the poetry default. Define them (or a
|
|
12
|
+
* .typeset-* preset) to opt into a pairing.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
@layer components {
|
|
16
|
+
.typeset {
|
|
17
|
+
--typeset-font-body: inherit;
|
|
18
|
+
--typeset-font-heading: var(--font-heading);
|
|
19
|
+
--typeset-font-mono: var(--font-mono);
|
|
20
|
+
--typeset-size: 1em;
|
|
21
|
+
--typeset-leading: 1.75;
|
|
22
|
+
--typeset-flow: 1.25em;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@layer components {
|
|
27
|
+
.typeset {
|
|
28
|
+
font-family: var(--typeset-font-body);
|
|
29
|
+
font-size: calc(var(--typeset-size) * 1.125);
|
|
30
|
+
line-height: var(--typeset-leading);
|
|
31
|
+
color: var(--color-foreground, currentColor);
|
|
32
|
+
overflow-wrap: break-word;
|
|
33
|
+
margin-trim: block-start;
|
|
34
|
+
|
|
35
|
+
@media (min-width: 48rem), print {
|
|
36
|
+
font-size: var(--typeset-size);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
--typeset-muted: var(
|
|
40
|
+
--color-muted-foreground,
|
|
41
|
+
color-mix(in oklab, currentColor 60%, transparent)
|
|
42
|
+
);
|
|
43
|
+
--typeset-rule: var(
|
|
44
|
+
--color-border,
|
|
45
|
+
color-mix(in oklab, currentColor 20%, transparent)
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.typeset
|
|
50
|
+
*:not(
|
|
51
|
+
:where(
|
|
52
|
+
.not-typeset,
|
|
53
|
+
[data-not-typeset],
|
|
54
|
+
.not-typeset *,
|
|
55
|
+
[data-not-typeset] *
|
|
56
|
+
)
|
|
57
|
+
) {
|
|
58
|
+
/* Paragraphs. */
|
|
59
|
+
&:where(p) {
|
|
60
|
+
margin-block-start: var(--typeset-flow);
|
|
61
|
+
margin-block-end: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Headings. */
|
|
65
|
+
&:where(h1, h2, h3, h4, h5, h6) {
|
|
66
|
+
color: var(--color-foreground, currentColor);
|
|
67
|
+
font-family: var(--typeset-font-heading);
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
margin-block-end: 0;
|
|
70
|
+
}
|
|
71
|
+
&:where(h1) {
|
|
72
|
+
font-size: 1.75em;
|
|
73
|
+
line-height: 1.3;
|
|
74
|
+
margin-block-start: var(--typeset-flow);
|
|
75
|
+
}
|
|
76
|
+
&:where(h2) {
|
|
77
|
+
font-size: 1.25em;
|
|
78
|
+
line-height: 1.4;
|
|
79
|
+
margin-block-start: calc(var(--typeset-flow) * 1.4);
|
|
80
|
+
}
|
|
81
|
+
&:where(h3) {
|
|
82
|
+
font-size: 1.125em;
|
|
83
|
+
line-height: 1.45;
|
|
84
|
+
margin-block-start: var(--typeset-flow);
|
|
85
|
+
}
|
|
86
|
+
&:where(h4) {
|
|
87
|
+
font-size: 1em;
|
|
88
|
+
line-height: 1.5;
|
|
89
|
+
margin-block-start: var(--typeset-flow);
|
|
90
|
+
}
|
|
91
|
+
&:where(h5) {
|
|
92
|
+
font-size: 0.875em;
|
|
93
|
+
line-height: 1.5;
|
|
94
|
+
font-weight: 500;
|
|
95
|
+
color: var(--typeset-muted);
|
|
96
|
+
margin-block-start: calc(var(--typeset-flow) / 0.875);
|
|
97
|
+
}
|
|
98
|
+
&:where(h6) {
|
|
99
|
+
font-size: 0.8125em;
|
|
100
|
+
line-height: 1.5;
|
|
101
|
+
font-weight: 500;
|
|
102
|
+
letter-spacing: 0.08em;
|
|
103
|
+
text-transform: uppercase;
|
|
104
|
+
color: var(--typeset-muted);
|
|
105
|
+
margin-block-start: calc(var(--typeset-flow) / 0.8125);
|
|
106
|
+
}
|
|
107
|
+
/* Anchors. */
|
|
108
|
+
&:where([id]) {
|
|
109
|
+
scroll-margin-block-start: var(--typeset-flow);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Headings own the space below them. */
|
|
113
|
+
&:where(h1 + *, h2 + *, h3 + *, h4 + *, h5 + *, h6 + *) {
|
|
114
|
+
margin-block-start: 1em;
|
|
115
|
+
}
|
|
116
|
+
&:where(:is(h1, h2, h3, h4) :is(code)) {
|
|
117
|
+
font-size: 0.9em;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Links. */
|
|
121
|
+
&:where(a) {
|
|
122
|
+
color: inherit;
|
|
123
|
+
font-weight: 500;
|
|
124
|
+
text-decoration-line: underline;
|
|
125
|
+
text-decoration-color: color-mix(in oklab, currentColor 30%, transparent);
|
|
126
|
+
}
|
|
127
|
+
&:where(a:hover) {
|
|
128
|
+
text-decoration-color: currentColor;
|
|
129
|
+
}
|
|
130
|
+
&:where(a:focus-visible) {
|
|
131
|
+
outline: 2px solid var(--color-ring, currentColor);
|
|
132
|
+
outline-offset: 2px;
|
|
133
|
+
border-radius: 0.125em;
|
|
134
|
+
}
|
|
135
|
+
&:where(:is(h1, h2, h3, h4, h5, h6) :is(a)) {
|
|
136
|
+
font-weight: inherit;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Inline semantics. */
|
|
140
|
+
&:where(strong, b) {
|
|
141
|
+
font-weight: 600;
|
|
142
|
+
}
|
|
143
|
+
&:where(:is(h1, h2, h3, h4) :is(strong, b)) {
|
|
144
|
+
font-weight: 600;
|
|
145
|
+
}
|
|
146
|
+
&:where(mark) {
|
|
147
|
+
background-color: color-mix(
|
|
148
|
+
in oklab,
|
|
149
|
+
oklch(0.86 0.17 95) 40%,
|
|
150
|
+
transparent
|
|
151
|
+
);
|
|
152
|
+
color: inherit;
|
|
153
|
+
padding: 0.05em 0.15em;
|
|
154
|
+
border-radius: 0.2em;
|
|
155
|
+
}
|
|
156
|
+
&:where(abbr[title]) {
|
|
157
|
+
text-decoration-line: underline;
|
|
158
|
+
text-decoration-style: dotted;
|
|
159
|
+
text-underline-offset: 0.2em;
|
|
160
|
+
cursor: help;
|
|
161
|
+
}
|
|
162
|
+
&:where(del, s) {
|
|
163
|
+
color: var(--typeset-muted);
|
|
164
|
+
text-decoration-line: line-through;
|
|
165
|
+
}
|
|
166
|
+
&:where(sup, sub) {
|
|
167
|
+
font-size: 0.75em;
|
|
168
|
+
line-height: 0;
|
|
169
|
+
position: relative;
|
|
170
|
+
vertical-align: baseline;
|
|
171
|
+
}
|
|
172
|
+
&:where(sup) {
|
|
173
|
+
top: -0.5em;
|
|
174
|
+
}
|
|
175
|
+
&:where(sub) {
|
|
176
|
+
bottom: -0.25em;
|
|
177
|
+
}
|
|
178
|
+
&:where(sup a) {
|
|
179
|
+
text-decoration-line: none;
|
|
180
|
+
font-weight: 500;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* Lists. */
|
|
184
|
+
&:where(ul) {
|
|
185
|
+
list-style-type: disc;
|
|
186
|
+
}
|
|
187
|
+
&:where(ol) {
|
|
188
|
+
list-style-type: decimal;
|
|
189
|
+
}
|
|
190
|
+
&:where(ul ul) {
|
|
191
|
+
list-style-type: circle;
|
|
192
|
+
}
|
|
193
|
+
&:where(ul ul ul) {
|
|
194
|
+
list-style-type: square;
|
|
195
|
+
}
|
|
196
|
+
&:where(ol[type="a" i]) {
|
|
197
|
+
list-style-type: lower-alpha;
|
|
198
|
+
}
|
|
199
|
+
&:where(ol[type="i" i]) {
|
|
200
|
+
list-style-type: lower-roman;
|
|
201
|
+
}
|
|
202
|
+
&:where(ol[type="A" s]) {
|
|
203
|
+
list-style-type: upper-alpha;
|
|
204
|
+
}
|
|
205
|
+
&:where(ol[type="I" s]) {
|
|
206
|
+
list-style-type: upper-roman;
|
|
207
|
+
}
|
|
208
|
+
&:where(ul, ol) {
|
|
209
|
+
margin-block-start: var(--typeset-flow);
|
|
210
|
+
margin-block-end: 0;
|
|
211
|
+
padding-inline-start: 1.5em;
|
|
212
|
+
}
|
|
213
|
+
&:where(li) {
|
|
214
|
+
margin-block-start: 0.5em;
|
|
215
|
+
padding-inline-start: 0.4em;
|
|
216
|
+
}
|
|
217
|
+
&:where(li > p, li > ul, li > ol) {
|
|
218
|
+
margin-block-start: 0.5em;
|
|
219
|
+
}
|
|
220
|
+
&:where(ul > li)::marker {
|
|
221
|
+
color: var(--typeset-muted);
|
|
222
|
+
}
|
|
223
|
+
&:where(ol > li)::marker {
|
|
224
|
+
color: var(--typeset-muted);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* GFM task lists. */
|
|
228
|
+
&:where(ul.contains-task-list) {
|
|
229
|
+
list-style-type: none;
|
|
230
|
+
padding-inline-start: 0.25em;
|
|
231
|
+
}
|
|
232
|
+
&:where(li.task-list-item > input[type="checkbox"]) {
|
|
233
|
+
margin-inline-end: 0.5em;
|
|
234
|
+
vertical-align: -0.1em;
|
|
235
|
+
accent-color: var(--color-primary, currentColor);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* Disclosures. */
|
|
239
|
+
&:where(details) {
|
|
240
|
+
margin-block-start: var(--typeset-flow);
|
|
241
|
+
margin-block-end: 0;
|
|
242
|
+
}
|
|
243
|
+
&:where(summary) {
|
|
244
|
+
cursor: pointer;
|
|
245
|
+
font-weight: 500;
|
|
246
|
+
}
|
|
247
|
+
&:where(summary)::marker {
|
|
248
|
+
color: var(--typeset-muted);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* Keyboard keys. */
|
|
252
|
+
&:where(kbd) {
|
|
253
|
+
font-family: inherit;
|
|
254
|
+
font-size: 0.85em;
|
|
255
|
+
font-weight: 500;
|
|
256
|
+
border: 1px solid var(--typeset-rule);
|
|
257
|
+
border-block-end-width: 2px;
|
|
258
|
+
border-radius: min(calc(var(--radius, 0.5em) * 0.6), 0.35em);
|
|
259
|
+
padding: 0.0625em 0.35em;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* Definition lists. */
|
|
263
|
+
&:where(dl) {
|
|
264
|
+
margin-block-start: var(--typeset-flow);
|
|
265
|
+
margin-block-end: 0;
|
|
266
|
+
}
|
|
267
|
+
&:where(dt) {
|
|
268
|
+
font-weight: 500;
|
|
269
|
+
margin-block-start: 1em;
|
|
270
|
+
}
|
|
271
|
+
&:where(dt + dt) {
|
|
272
|
+
margin-block-start: 0.25em;
|
|
273
|
+
}
|
|
274
|
+
&:where(dd) {
|
|
275
|
+
margin-block-start: 0.25em;
|
|
276
|
+
margin-inline-start: 0;
|
|
277
|
+
padding-inline-start: 1em;
|
|
278
|
+
color: var(--typeset-muted);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/* Inline code. */
|
|
282
|
+
&:where(:not(pre) > code) {
|
|
283
|
+
background-color: var(
|
|
284
|
+
--color-muted,
|
|
285
|
+
color-mix(in oklab, currentColor 8%, transparent)
|
|
286
|
+
);
|
|
287
|
+
font-family: var(--typeset-font-mono);
|
|
288
|
+
font-size: 0.85em;
|
|
289
|
+
border-radius: min(calc(var(--radius, 0.5em) * 0.6), 0.35em);
|
|
290
|
+
padding: 0.125em 0.3em;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* Code blocks. */
|
|
294
|
+
&:where(pre) {
|
|
295
|
+
background-color: var(
|
|
296
|
+
--color-muted,
|
|
297
|
+
color-mix(in oklab, currentColor 8%, transparent)
|
|
298
|
+
);
|
|
299
|
+
font-family: var(--typeset-font-mono);
|
|
300
|
+
font-size: 0.875em;
|
|
301
|
+
line-height: 1.5;
|
|
302
|
+
tab-size: 2;
|
|
303
|
+
direction: ltr;
|
|
304
|
+
border-radius: var(--radius, 0.5em);
|
|
305
|
+
padding: 0.75em 1em;
|
|
306
|
+
overflow-x: auto;
|
|
307
|
+
margin-block-start: calc(var(--typeset-flow) / 0.875);
|
|
308
|
+
margin-block-end: 0;
|
|
309
|
+
}
|
|
310
|
+
&:where(pre code) {
|
|
311
|
+
background-color: transparent;
|
|
312
|
+
font-family: inherit;
|
|
313
|
+
font-size: inherit;
|
|
314
|
+
padding: 0;
|
|
315
|
+
border-radius: 0;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* Blockquote. */
|
|
319
|
+
&:where(blockquote) {
|
|
320
|
+
border-inline-start: 2px solid var(--typeset-rule);
|
|
321
|
+
padding-inline-start: 1em;
|
|
322
|
+
margin-block-start: var(--typeset-flow);
|
|
323
|
+
margin-block-end: 0;
|
|
324
|
+
margin-inline: 0;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/* Dividers. */
|
|
328
|
+
&:where(hr) {
|
|
329
|
+
border: 0;
|
|
330
|
+
border-block-start: 1px solid var(--typeset-rule);
|
|
331
|
+
margin-block-start: calc(var(--typeset-flow) * 2.4);
|
|
332
|
+
margin-block-end: 0;
|
|
333
|
+
}
|
|
334
|
+
&:where(hr + h1, hr + h2, hr + h3, hr + h4) {
|
|
335
|
+
margin-block-start: var(--typeset-flow);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/* GFM footnotes. */
|
|
339
|
+
&:where(.footnotes, [data-footnotes]) {
|
|
340
|
+
margin-block-start: calc(var(--typeset-flow) * 2);
|
|
341
|
+
border-block-start: 1px solid var(--typeset-rule);
|
|
342
|
+
padding-block-start: var(--typeset-flow);
|
|
343
|
+
font-size: 0.875em;
|
|
344
|
+
color: var(--typeset-muted);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/* Math. */
|
|
348
|
+
&:where(math[display="block"]) {
|
|
349
|
+
margin-block-start: var(--typeset-flow);
|
|
350
|
+
margin-block-end: 0;
|
|
351
|
+
overflow-x: auto;
|
|
352
|
+
overflow-y: hidden;
|
|
353
|
+
padding-block: 0.25em;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/* Media. */
|
|
357
|
+
&:where(img, video) {
|
|
358
|
+
border-radius: var(--radius, 0.5em);
|
|
359
|
+
max-width: 100%;
|
|
360
|
+
height: auto;
|
|
361
|
+
margin-block-start: var(--typeset-flow);
|
|
362
|
+
margin-block-end: 0;
|
|
363
|
+
}
|
|
364
|
+
&:where(p img) {
|
|
365
|
+
margin-block-start: 0;
|
|
366
|
+
}
|
|
367
|
+
&:where(figure) {
|
|
368
|
+
margin-block-start: var(--typeset-flow);
|
|
369
|
+
margin-block-end: 0;
|
|
370
|
+
margin-inline: 0;
|
|
371
|
+
}
|
|
372
|
+
&:where(figcaption, caption) {
|
|
373
|
+
color: var(--typeset-muted);
|
|
374
|
+
font-size: 0.875em;
|
|
375
|
+
text-align: center;
|
|
376
|
+
margin-block-start: calc(0.75em / 0.875);
|
|
377
|
+
}
|
|
378
|
+
&:where(caption) {
|
|
379
|
+
caption-side: bottom;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/* Tables. Separators sit on cells, not tr:last-child: append-safe.
|
|
383
|
+
Bare tables stay real tables (keep their semantics) and wrap to fit. */
|
|
384
|
+
&:where(table) {
|
|
385
|
+
max-width: 100%;
|
|
386
|
+
font-size: 1em;
|
|
387
|
+
line-height: 1.5;
|
|
388
|
+
font-variant-numeric: tabular-nums;
|
|
389
|
+
border-collapse: separate;
|
|
390
|
+
border-spacing: 0;
|
|
391
|
+
border-block-end: 1px solid var(--typeset-rule);
|
|
392
|
+
margin-block-start: var(--typeset-flow);
|
|
393
|
+
margin-block-end: 0;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/* Horizontal scroll for any wide block. Wrap it and the wrapper owns the
|
|
397
|
+
flow margin. Tables shrink to fit, so widen the table to make it scroll
|
|
398
|
+
instead of compress. */
|
|
399
|
+
&:where(.typeset-scroll) {
|
|
400
|
+
overflow-x: auto;
|
|
401
|
+
margin-block-start: var(--typeset-flow);
|
|
402
|
+
}
|
|
403
|
+
&:where(.typeset-scroll > *) {
|
|
404
|
+
margin-block-start: 0;
|
|
405
|
+
}
|
|
406
|
+
&:where(.typeset-scroll table) {
|
|
407
|
+
width: max-content;
|
|
408
|
+
max-width: none;
|
|
409
|
+
}
|
|
410
|
+
&:where(thead th) {
|
|
411
|
+
font-weight: 500;
|
|
412
|
+
text-align: start;
|
|
413
|
+
white-space: nowrap;
|
|
414
|
+
padding: 0.65em 1em;
|
|
415
|
+
}
|
|
416
|
+
&:where(:is(tbody, tfoot) :is(td, th)) {
|
|
417
|
+
padding: 0.75em 1em;
|
|
418
|
+
text-align: start;
|
|
419
|
+
vertical-align: top;
|
|
420
|
+
border-block-start: 1px solid var(--typeset-rule);
|
|
421
|
+
}
|
|
422
|
+
&:where(tbody th, tfoot th) {
|
|
423
|
+
font-weight: 500;
|
|
424
|
+
}
|
|
425
|
+
&:where(th:first-child, td:first-child) {
|
|
426
|
+
padding-inline-start: 0;
|
|
427
|
+
}
|
|
428
|
+
&:where(th[align="center"], td[align="center"]) {
|
|
429
|
+
text-align: center;
|
|
430
|
+
}
|
|
431
|
+
&:where(th[align="right"], td[align="right"]) {
|
|
432
|
+
text-align: end;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/* Blocks inside list items keep the list's tighter rhythm. */
|
|
436
|
+
&:where(li > blockquote, li > table, li > figure) {
|
|
437
|
+
margin-block-start: 0.5em;
|
|
438
|
+
}
|
|
439
|
+
&:where(li > pre) {
|
|
440
|
+
margin-block-start: calc(0.5em / 0.875);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
@media print {
|
|
444
|
+
&:where(pre, table, blockquote, figure) {
|
|
445
|
+
break-inside: avoid;
|
|
446
|
+
}
|
|
447
|
+
&:where(h1, h2, h3, h4) {
|
|
448
|
+
break-after: avoid;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/* Forced colors strips the code background, so give it a border. */
|
|
453
|
+
@media (forced-colors: active) {
|
|
454
|
+
&:where(:not(pre) > code) {
|
|
455
|
+
border: 1px solid;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/* First child adds no space above. Last so it wins ties. */
|
|
461
|
+
.typeset
|
|
462
|
+
> :where(:first-child):not(
|
|
463
|
+
:where(
|
|
464
|
+
.not-typeset,
|
|
465
|
+
[data-not-typeset],
|
|
466
|
+
.not-typeset *,
|
|
467
|
+
[data-not-typeset] *
|
|
468
|
+
)
|
|
469
|
+
),
|
|
470
|
+
.typeset
|
|
471
|
+
> :where(:first-child)
|
|
472
|
+
> :where(:first-child):not(
|
|
473
|
+
:where(
|
|
474
|
+
.not-typeset,
|
|
475
|
+
[data-not-typeset],
|
|
476
|
+
.not-typeset *,
|
|
477
|
+
[data-not-typeset] *
|
|
478
|
+
)
|
|
479
|
+
),
|
|
480
|
+
.typeset
|
|
481
|
+
:where(
|
|
482
|
+
li > :first-child,
|
|
483
|
+
blockquote > :first-child,
|
|
484
|
+
td > :first-child,
|
|
485
|
+
th > :first-child,
|
|
486
|
+
dd > :first-child,
|
|
487
|
+
figure > :first-child,
|
|
488
|
+
figure > picture > img
|
|
489
|
+
):not(
|
|
490
|
+
:where(
|
|
491
|
+
.not-typeset,
|
|
492
|
+
[data-not-typeset],
|
|
493
|
+
.not-typeset *,
|
|
494
|
+
[data-not-typeset] *
|
|
495
|
+
)
|
|
496
|
+
) {
|
|
497
|
+
margin-block-start: 0;
|
|
498
|
+
}
|
|
499
|
+
}
|