ariadne_view_components 0.0.59 → 0.0.65
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +70 -0
- data/LICENSE.txt +661 -49
- data/README.md +52 -4
- data/app/assets/javascripts/ariadne_view_components.js +98 -7
- data/app/assets/javascripts/ariadne_view_components.js.br +0 -0
- data/app/assets/javascripts/ariadne_view_components.js.gz +0 -0
- data/app/assets/javascripts/ariadne_view_components.js.map +1 -1
- data/app/assets/stylesheets/ariadne_view_components.css +1 -7
- data/app/assets/stylesheets/ariadne_view_components.css.br +0 -0
- data/app/assets/stylesheets/ariadne_view_components.css.gz +0 -0
- data/app/components/ariadne/base_component.rb +79 -27
- data/app/components/ariadne/behaviors/tooltipable.rb +120 -0
- data/app/components/ariadne/conditional_wrapper.rb +21 -0
- data/app/components/ariadne/form/base_component.rb +74 -0
- data/app/components/ariadne/form/base_input_component.rb +60 -0
- data/app/components/ariadne/form/caption/component.html.erb +10 -0
- data/app/components/ariadne/form/caption/component.rb +29 -0
- data/app/components/ariadne/form/form_control/component.html.erb +19 -0
- data/app/components/ariadne/form/form_control/component.rb +27 -0
- data/app/components/ariadne/form/form_reference/component.html.erb +1 -0
- data/app/components/ariadne/form/form_reference/component.rb +18 -0
- data/app/components/ariadne/form/group/component.html.erb +5 -0
- data/app/components/ariadne/form/group/component.rb +27 -0
- data/app/components/ariadne/form/hidden_field/component.html.erb +1 -0
- data/app/components/ariadne/form/hidden_field/component.rb +15 -0
- data/app/components/ariadne/form/separator/component.html.erb +1 -0
- data/app/components/ariadne/form/separator/component.rb +8 -0
- data/app/components/ariadne/form/spacing_wrapper/component.html.erb +3 -0
- data/app/components/ariadne/form/spacing_wrapper/component.rb +8 -0
- data/app/components/ariadne/form/text_field/component.html.erb +25 -0
- data/app/components/ariadne/form/text_field/component.rb +132 -0
- data/app/components/ariadne/form/validation_message/component.html.erb +5 -0
- data/app/components/ariadne/form/validation_message/component.rb +14 -0
- data/app/components/ariadne/layout/narrow/component.html.erb +10 -0
- data/app/components/ariadne/layout/narrow/component.rb +24 -0
- data/app/components/ariadne/layout/nav_bar/component.css +0 -0
- data/app/components/ariadne/layout/nav_bar/component.html.erb +123 -0
- data/app/components/ariadne/layout/nav_bar/component.rb +77 -0
- data/app/components/ariadne/ui/button/component.html.erb +5 -0
- data/app/components/ariadne/ui/button/component.rb +184 -0
- data/app/components/ariadne/ui/clipboard_copy/component.html.erb +8 -0
- data/app/components/ariadne/ui/clipboard_copy/component.rb +102 -0
- data/app/components/ariadne/ui/clipboard_copy/component.ts +54 -0
- data/app/components/ariadne/ui/combobox/component.html.erb +32 -0
- data/app/components/ariadne/ui/combobox/component.rb +83 -0
- data/app/components/ariadne/ui/combobox/component.ts +119 -0
- data/app/components/ariadne/ui/combobox/menu_item/component.html.erb +9 -0
- data/app/components/ariadne/ui/combobox/menu_item/component.rb +53 -0
- data/app/components/ariadne/ui/combobox/option/component.html.erb +11 -0
- data/app/components/ariadne/ui/combobox/option/component.rb +45 -0
- data/app/components/ariadne/ui/heroicon/component.html.erb +3 -0
- data/app/components/ariadne/ui/heroicon/component.rb +141 -0
- data/app/components/ariadne/ui/image/component.rb +69 -0
- data/app/components/ariadne/ui/link/component.html.erb +3 -0
- data/app/components/ariadne/ui/link/component.rb +56 -0
- data/app/components/ariadne/ui/typography/component.html.erb +3 -0
- data/app/components/ariadne/ui/typography/component.rb +41 -0
- data/app/frontend/ariadne/index.ts +14 -0
- data/app/frontend/ariadne/stimulus_app.ts +53 -0
- data/app/frontend/ariadne/theme.ts +8 -0
- data/app/frontend/controllers/tooltip.ts +75 -0
- data/app/frontend/entrypoints/application.ts +1 -0
- data/app/frontend/stylesheets/ariadne_view_components.css +18 -0
- data/app/frontend/stylesheets/scrollbar.css +28 -0
- data/app/frontend/stylesheets/tippy.js/themes/tomato.css +4 -0
- data/app/frontend/stylesheets/typography.css +117 -0
- data/app/frontend/utils/createController.ts +95 -0
- data/app/helpers/ariadne/form_helper.rb +31 -0
- data/app/lib/ariadne/attributes_helper.rb +119 -0
- data/app/lib/ariadne/fetch_or_fallback_helper.rb +1 -1
- data/app/lib/ariadne/form.rb +16 -0
- data/app/lib/ariadne/view_helper.rb +2 -5
- data/app/lib/view_components_contrib/html_attrs.rb +64 -0
- data/app/lib/view_components_contrib/style_variants.rb +14 -0
- data/lib/ariadne/forms/acts_as_component.rb +125 -0
- data/lib/ariadne/forms/base.html.erb +8 -0
- data/lib/ariadne/forms/base.rb +132 -0
- data/lib/ariadne/forms/buffer_rewriter.rb +51 -0
- data/lib/ariadne/forms/builder.rb +88 -0
- data/lib/ariadne/forms/dsl/button_input.rb +33 -0
- data/lib/ariadne/forms/dsl/form_object.rb +26 -0
- data/lib/ariadne/forms/dsl/input.rb +322 -0
- data/lib/ariadne/forms/dsl/input_group.rb +34 -0
- data/lib/ariadne/forms/dsl/input_methods.rb +157 -0
- data/lib/ariadne/forms/dsl/submit_button_input.rb +36 -0
- data/lib/ariadne/forms/dsl/text_field_input.rb +73 -0
- data/lib/ariadne/forms/utils.rb +34 -0
- data/lib/ariadne/generate.rb +11 -0
- data/lib/ariadne/view_components/engine.rb +24 -7
- data/lib/ariadne/view_components/version.rb +1 -1
- data/lib/ariadne/view_components.rb +1 -1
- data/lib/ariadne/yard/backend.rb +24 -0
- data/lib/ariadne/yard/component_manifest.rb +148 -0
- data/lib/ariadne/yard/component_ref.rb +49 -0
- data/lib/ariadne/yard/docs_helper.rb +98 -0
- data/lib/ariadne/yard/info_arch_docs_helper.rb +31 -0
- data/lib/ariadne/yard/lookbook_docs_helper.rb +32 -0
- data/lib/ariadne/yard/lookbook_pages_backend.rb +235 -0
- data/lib/ariadne/yard/registry.rb +136 -0
- data/lib/ariadne/yard/renders_many_handler.rb +23 -0
- data/lib/ariadne/yard/renders_one_handler.rb +23 -0
- data/lib/ariadne/yard.rb +19 -0
- data/static/arguments.yml +141 -48
- data/static/audited_at.json +0 -9
- data/static/classes.yml +210 -209
- data/static/constants.json +2 -209
- data/static/statuses.json +0 -9
- metadata +140 -210
- data/app/assets/builds/ariadne_view_components.css +0 -2202
- data/app/assets/javascripts/components/ariadne/accumulator_controller/accumulator_controller.d.ts +0 -22
- data/app/assets/javascripts/components/ariadne/ariadne-form.d.ts +0 -22
- data/app/assets/javascripts/components/ariadne/ariadne.d.ts +0 -2
- data/app/assets/javascripts/components/ariadne/clipboard_copy_component/clipboard-copy-component.d.ts +0 -4
- data/app/assets/javascripts/components/ariadne/dropdown/menu_component.d.ts +0 -1
- data/app/assets/javascripts/components/ariadne/events_controller/events_controller.d.ts +0 -4
- data/app/assets/javascripts/components/ariadne/options_controller/options_controller.d.ts +0 -39
- data/app/assets/javascripts/components/ariadne/outlet_manager_controller/outlet_manager_controller.d.ts +0 -42
- data/app/assets/javascripts/components/ariadne/slideover_component/slideover-component.d.ts +0 -9
- data/app/assets/javascripts/components/ariadne/string_match_controller/string_match_controller.d.ts +0 -27
- data/app/assets/javascripts/components/ariadne/synced_boolean_attributes_controller/synced_boolean_attributes_controller.d.ts +0 -48
- data/app/assets/javascripts/components/ariadne/tab_container_component/tab-container-component.d.ts +0 -1
- data/app/assets/javascripts/components/ariadne/tab_nav_component/tab-nav-component.d.ts +0 -9
- data/app/assets/javascripts/components/ariadne/time_ago_component/time-ago-component.d.ts +0 -1
- data/app/assets/javascripts/components/ariadne/toggleable_controller/toggleable_controller.d.ts +0 -34
- data/app/assets/javascripts/components/ariadne/tooltip_component/tooltip-component.d.ts +0 -24
- data/app/assets/stylesheets/dropdown.css +0 -46
- data/app/assets/stylesheets/prosemirror.css +0 -323
- data/app/assets/stylesheets/tooltip-component.css +0 -37
- data/app/components/ariadne/accumulator_controller/accumulator_controller.d.ts +0 -22
- data/app/components/ariadne/accumulator_controller/accumulator_controller.js +0 -39
- data/app/components/ariadne/accumulator_controller/accumulator_controller.ts +0 -48
- data/app/components/ariadne/action_card_component.html.erb +0 -13
- data/app/components/ariadne/action_card_component.rb +0 -88
- data/app/components/ariadne/ariadne-form.d.ts +0 -22
- data/app/components/ariadne/ariadne-form.js +0 -85
- data/app/components/ariadne/ariadne.d.ts +0 -2
- data/app/components/ariadne/ariadne.js +0 -24
- data/app/components/ariadne/ariadne.ts +0 -29
- data/app/components/ariadne/avatar_component.rb +0 -81
- data/app/components/ariadne/avatar_stack_component/avatar_stack_component.html.erb +0 -12
- data/app/components/ariadne/avatar_stack_component.rb +0 -75
- data/app/components/ariadne/base_button.rb +0 -70
- data/app/components/ariadne/blankslate_component/blankslate_component.html.erb +0 -26
- data/app/components/ariadne/blankslate_component.rb +0 -148
- data/app/components/ariadne/body_component.rb +0 -30
- data/app/components/ariadne/bottom_tab_component.html.erb +0 -4
- data/app/components/ariadne/bottom_tab_component.rb +0 -44
- data/app/components/ariadne/bottom_tab_nav_component.html.erb +0 -5
- data/app/components/ariadne/bottom_tab_nav_component.rb +0 -33
- data/app/components/ariadne/breadcrumbs_component.html.erb +0 -13
- data/app/components/ariadne/breadcrumbs_component.rb +0 -31
- data/app/components/ariadne/button_component/button_component.html.erb +0 -4
- data/app/components/ariadne/button_component.rb +0 -165
- data/app/components/ariadne/checkbox_component.html.erb +0 -5
- data/app/components/ariadne/checkbox_component.rb +0 -43
- data/app/components/ariadne/clipboard_copy_component/clipboard-copy-component.d.ts +0 -4
- data/app/components/ariadne/clipboard_copy_component/clipboard-copy-component.js +0 -18
- data/app/components/ariadne/clipboard_copy_component/clipboard-copy-component.ts +0 -19
- data/app/components/ariadne/clipboard_copy_component/clipboard_copy_component.html.erb +0 -9
- data/app/components/ariadne/clipboard_copy_component.rb +0 -90
- data/app/components/ariadne/close_button_component.html.erb +0 -4
- data/app/components/ariadne/close_button_component.rb +0 -33
- data/app/components/ariadne/combobox_component.html.erb +0 -14
- data/app/components/ariadne/combobox_component.rb +0 -76
- data/app/components/ariadne/component.rb +0 -127
- data/app/components/ariadne/container_component/container_component.html.erb +0 -3
- data/app/components/ariadne/container_component.rb +0 -25
- data/app/components/ariadne/content.rb +0 -12
- data/app/components/ariadne/counter_component.rb +0 -100
- data/app/components/ariadne/details_component/details_component.html.erb +0 -4
- data/app/components/ariadne/details_component.rb +0 -81
- data/app/components/ariadne/dropdown/menu_component.d.ts +0 -1
- data/app/components/ariadne/dropdown/menu_component.html.erb +0 -20
- data/app/components/ariadne/dropdown/menu_component.js +0 -1
- data/app/components/ariadne/dropdown/menu_component.rb +0 -101
- data/app/components/ariadne/dropdown/menu_component.ts +0 -1
- data/app/components/ariadne/dropdown_component/dropdown_component.html.erb +0 -8
- data/app/components/ariadne/dropdown_component.rb +0 -172
- data/app/components/ariadne/events_controller/events_controller.d.ts +0 -4
- data/app/components/ariadne/events_controller/events_controller.js +0 -6
- data/app/components/ariadne/events_controller/events_controller.ts +0 -7
- data/app/components/ariadne/flash_component/flash_component.html.erb +0 -31
- data/app/components/ariadne/flash_component.rb +0 -128
- data/app/components/ariadne/flex_component/flex_component.html.erb +0 -5
- data/app/components/ariadne/flex_component.rb +0 -56
- data/app/components/ariadne/footer_component/footer_component.html.erb +0 -7
- data/app/components/ariadne/footer_component.rb +0 -23
- data/app/components/ariadne/grid_component/grid_component.html.erb +0 -26
- data/app/components/ariadne/grid_component.rb +0 -67
- data/app/components/ariadne/header_component/header_component.html.erb +0 -29
- data/app/components/ariadne/header_component.rb +0 -111
- data/app/components/ariadne/heading_component.rb +0 -49
- data/app/components/ariadne/heroicon_component/heroicon_component.html.erb +0 -4
- data/app/components/ariadne/heroicon_component.rb +0 -166
- data/app/components/ariadne/image_component.rb +0 -53
- data/app/components/ariadne/inline_flex_component/inline_flex_component.html.erb +0 -6
- data/app/components/ariadne/inline_flex_component.rb +0 -72
- data/app/components/ariadne/layout_component.html.erb +0 -21
- data/app/components/ariadne/layout_component.rb +0 -69
- data/app/components/ariadne/link_component.rb +0 -65
- data/app/components/ariadne/list_component/list_component.html.erb +0 -3
- data/app/components/ariadne/list_component.rb +0 -70
- data/app/components/ariadne/modal_component.html.erb +0 -11
- data/app/components/ariadne/modal_component.rb +0 -88
- data/app/components/ariadne/narrow_container_component/narrow_container_component.html.erb +0 -3
- data/app/components/ariadne/narrow_container_component.rb +0 -30
- data/app/components/ariadne/options_controller/options_controller.d.ts +0 -39
- data/app/components/ariadne/options_controller/options_controller.js +0 -89
- data/app/components/ariadne/options_controller/options_controller.ts +0 -122
- data/app/components/ariadne/outlet_manager_controller/outlet_manager_controller.d.ts +0 -42
- data/app/components/ariadne/outlet_manager_controller/outlet_manager_controller.js +0 -237
- data/app/components/ariadne/outlet_manager_controller/outlet_manager_controller.ts +0 -278
- data/app/components/ariadne/panel_bar_component/panel_bar_component.html.erb +0 -20
- data/app/components/ariadne/panel_bar_component.rb +0 -80
- data/app/components/ariadne/pill_component/pill_component.html.erb +0 -3
- data/app/components/ariadne/pill_component.rb +0 -44
- data/app/components/ariadne/popover_component.html.erb +0 -10
- data/app/components/ariadne/popover_component.rb +0 -81
- data/app/components/ariadne/progress_bar_component.html.erb +0 -5
- data/app/components/ariadne/progress_bar_component.rb +0 -63
- data/app/components/ariadne/relative_time_component.html.erb +0 -3
- data/app/components/ariadne/relative_time_component.rb +0 -61
- data/app/components/ariadne/show_more_button_component.html.erb +0 -11
- data/app/components/ariadne/show_more_button_component.rb +0 -47
- data/app/components/ariadne/slideover_component/slideover-component.d.ts +0 -9
- data/app/components/ariadne/slideover_component/slideover-component.js +0 -11
- data/app/components/ariadne/slideover_component/slideover-component.ts +0 -17
- data/app/components/ariadne/slideover_component/slideover_component.html.erb +0 -9
- data/app/components/ariadne/slideover_component.rb +0 -66
- data/app/components/ariadne/spinner_component.html.erb +0 -16
- data/app/components/ariadne/spinner_component.rb +0 -45
- data/app/components/ariadne/string_match_controller/string_match_controller.d.ts +0 -27
- data/app/components/ariadne/string_match_controller/string_match_controller.js +0 -51
- data/app/components/ariadne/string_match_controller/string_match_controller.ts +0 -65
- data/app/components/ariadne/subheader_component.html.erb +0 -11
- data/app/components/ariadne/subheader_component.rb +0 -65
- data/app/components/ariadne/synced_boolean_attributes_controller/synced_boolean_attributes_controller.d.ts +0 -48
- data/app/components/ariadne/synced_boolean_attributes_controller/synced_boolean_attributes_controller.js +0 -207
- data/app/components/ariadne/synced_boolean_attributes_controller/synced_boolean_attributes_controller.ts +0 -256
- data/app/components/ariadne/tab_component/tab_component.html.erb +0 -3
- data/app/components/ariadne/tab_component.rb +0 -98
- data/app/components/ariadne/tab_container_component/tab-container-component.d.ts +0 -1
- data/app/components/ariadne/tab_container_component/tab-container-component.js +0 -23
- data/app/components/ariadne/tab_container_component/tab-container-component.ts +0 -24
- data/app/components/ariadne/tab_container_component.erb +0 -10
- data/app/components/ariadne/tab_container_component.rb +0 -68
- data/app/components/ariadne/tab_nav_component/tab-nav-component.d.ts +0 -9
- data/app/components/ariadne/tab_nav_component/tab-nav-component.js +0 -33
- data/app/components/ariadne/tab_nav_component/tab-nav-component.ts +0 -34
- data/app/components/ariadne/tab_nav_component/tab_nav_component.html.erb +0 -7
- data/app/components/ariadne/tab_nav_component.rb +0 -72
- data/app/components/ariadne/table_nav_component/table_nav_component.html.erb +0 -52
- data/app/components/ariadne/table_nav_component.rb +0 -338
- data/app/components/ariadne/text.rb +0 -25
- data/app/components/ariadne/time_ago_component/time-ago-component.d.ts +0 -1
- data/app/components/ariadne/time_ago_component/time-ago-component.js +0 -1
- data/app/components/ariadne/time_ago_component/time-ago-component.ts +0 -1
- data/app/components/ariadne/time_ago_component.rb +0 -56
- data/app/components/ariadne/timeline_component/timeline_component.html.erb +0 -19
- data/app/components/ariadne/timeline_component.rb +0 -34
- data/app/components/ariadne/toggle_component/toggle_component.html.erb +0 -15
- data/app/components/ariadne/toggle_component.rb +0 -95
- data/app/components/ariadne/toggleable_controller/toggleable_controller.d.ts +0 -34
- data/app/components/ariadne/toggleable_controller/toggleable_controller.js +0 -54
- data/app/components/ariadne/toggleable_controller/toggleable_controller.ts +0 -77
- data/app/components/ariadne/tooltip_component/tooltip-component.d.ts +0 -24
- data/app/components/ariadne/tooltip_component/tooltip-component.js +0 -43
- data/app/components/ariadne/tooltip_component/tooltip-component.ts +0 -57
- data/app/components/ariadne/tooltip_component/tooltip_component.html.erb +0 -4
- data/app/components/ariadne/tooltip_component.rb +0 -108
- data/app/lib/ariadne/action_view_extensions/form_helper.rb +0 -30
- data/app/lib/ariadne/audited/dsl.rb +0 -32
- data/app/lib/ariadne/form_builder.rb +0 -80
- data/app/lib/ariadne/status/dsl.rb +0 -41
- data/config/importmap.rb +0 -3
- data/exe/tailwindcss +0 -21
- data/lib/rubocop/cop/ariadne/base_cop.rb +0 -26
- data/tailwind.config.js +0 -70
@@ -1,7 +1 @@
|
|
1
|
-
@tailwind base;
|
2
|
-
@tailwind components;
|
3
|
-
@tailwind utilities;
|
4
|
-
|
5
|
-
@import 'tooltip-component.css';
|
6
|
-
@import 'prosemirror.css';
|
7
|
-
@import 'dropdown.css';
|
1
|
+
.scroll{scrollbar-color:rgb(163,166,177) transparent;scrollbar-color:oklch(.726563 .016 275 / 20) transparent}.scroll *::-webkit-scrollbar{height:1rem;width:.5rem}.scroll *::-webkit-scrollbar:horizontal{height:.5rem;width:1rem}.scroll *::-webkit-scrollbar-track{background-color:transparent}.scroll *::-webkit-scrollbar-thumb{background-color:#a3a6b133}.scroll *::-webkit-scrollbar-thumb:hover{background-color:#a3a6b166}.scroll *::-webkit-scrollbar-thumb{-webkit-transition-property:opacity;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@media (min-width: 768px){.scrollbar-trigger *::-webkit-scrollbar-thumb{visibility:hidden}.scrollbar-trigger:hover *::-webkit-scrollbar-thumb{visibility:visible}}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e0e3ef}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Instrument Sans,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:Martian Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#b7bac5}input::placeholder,textarea::placeholder{opacity:1;color:#b7bac5}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(147 197 253 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(147 197 253 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.ariadne-z-50{z-index:50}.ariadne-mx-auto{margin-left:auto;margin-right:auto}.ariadne-mt-10{margin-top:2.5rem}.ariadne-mt-2{margin-top:.5rem}.ariadne-flex{display:flex}.ariadne-inline-flex{display:inline-flex}.ariadne-hidden{display:none}.ariadne-h-10{height:2.5rem}.ariadne-h-12{height:3rem}.ariadne-h-16{height:4rem}.ariadne-h-4{height:1rem}.ariadne-h-5{height:1.25rem}.ariadne-h-6{height:1.5rem}.ariadne-w-10{width:2.5rem}.ariadne-w-12{width:3rem}.ariadne-w-16{width:4rem}.ariadne-w-4{width:1rem}.ariadne-w-5{width:1.25rem}.ariadne-w-6{width:1.5rem}.ariadne-w-8{width:2rem}.ariadne-w-full{width:100%}.ariadne-flex-1{flex:1 1 0%}.ariadne-flex-shrink-0{flex-shrink:0}.ariadne-grow{flex-grow:1}.ariadne-scroll-m-20{scroll-margin:5rem}.ariadne-flex-col{flex-direction:column}.ariadne-items-center{align-items:center}.ariadne-justify-end{justify-content:flex-end}.ariadne-justify-center{justify-content:center}.ariadne-justify-between{justify-content:space-between}.ariadne-gap-0{gap:0px}.ariadne-gap-0\.5{gap:.125rem}.ariadne-gap-1{gap:.25rem}.ariadne-gap-8{gap:2rem}.ariadne-gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.ariadne-gap-x-1\.5{-moz-column-gap:.375rem;column-gap:.375rem}.ariadne-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.ariadne-overflow-hidden{overflow:hidden}.ariadne-rounded{border-radius:.25rem}.ariadne-rounded-lg{border-radius:.5rem}.ariadne-rounded-md{border-radius:.375rem}.ariadne-border{border-width:1px}.ariadne-border-b{border-bottom-width:1px}.ariadne-border-solid{border-style:solid}.ariadne-border-red-600{--tw-border-opacity: 1;border-color:rgba(205,98,101,var(--tw-border-opacity))}@supports (color: oklab(0% 0 0%)){.ariadne-border-red-600{border-color:oklch(.626953 .135937 20 / var(--tw-border-opacity))}}.ariadne-border-transparent{border-color:transparent}.ariadne-border-zinc-100{--tw-border-opacity: 1;border-color:rgba(242,243,249,var(--tw-border-opacity))}@supports (color: oklab(0% 0 0%)){.ariadne-border-zinc-100{border-color:oklch(.964844 .008 275 / var(--tw-border-opacity))}}.ariadne-border-zinc-200{--tw-border-opacity: 1;border-color:rgba(226,228,233,var(--tw-border-opacity))}@supports (color: oklab(0% 0 0%)){.ariadne-border-zinc-200{border-color:oklch(.917969 .008 275 / var(--tw-border-opacity))}}.ariadne-bg-emerald-600{--tw-bg-opacity: 1;background-color:rgba(79,147,64,var(--tw-bg-opacity))}@supports (color: oklab(0% 0 0%)){.ariadne-bg-emerald-600{background-color:oklch(.597656 .135937 140 / var(--tw-bg-opacity))}}.ariadne-bg-red-200{--tw-bg-opacity: 1;background-color:rgba(255,219,218,var(--tw-bg-opacity))}@supports (color: color(display-p3 0 0 0%)){.ariadne-bg-red-200{background-color:color(display-p3 .98165 .86321 .85651 / var(--tw-bg-opacity))}}@supports (color: oklab(0% 0 0%)){.ariadne-bg-red-200{background-color:oklch(.921875 .0421875 20 / var(--tw-bg-opacity))}}.ariadne-bg-transparent{background-color:transparent}.ariadne-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.ariadne-bg-zinc-100{--tw-bg-opacity: 1;background-color:rgba(242,243,249,var(--tw-bg-opacity))}@supports (color: oklab(0% 0 0%)){.ariadne-bg-zinc-100{background-color:oklch(.964844 .008 275 / var(--tw-bg-opacity))}}.ariadne-bg-zinc-50{--tw-bg-opacity: 1;background-color:rgba(250,251,255,var(--tw-bg-opacity))}@supports (color: oklab(0% 0 0%)){.ariadne-bg-zinc-50{background-color:oklch(.988281 .004875 275 / var(--tw-bg-opacity))}}.ariadne-object-cover{-o-object-fit:cover;object-fit:cover}.ariadne-object-center{-o-object-position:center;object-position:center}.ariadne-px-1{padding-left:.25rem;padding-right:.25rem}.ariadne-px-1\.5{padding-left:.375rem;padding-right:.375rem}.ariadne-px-2{padding-left:.5rem;padding-right:.5rem}.ariadne-px-2\.5{padding-left:.625rem;padding-right:.625rem}.ariadne-px-3{padding-left:.75rem;padding-right:.75rem}.ariadne-px-3\.5{padding-left:.875rem;padding-right:.875rem}.ariadne-px-6{padding-left:1.5rem;padding-right:1.5rem}.ariadne-py-1{padding-top:.25rem;padding-bottom:.25rem}.ariadne-py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.ariadne-py-12{padding-top:3rem;padding-bottom:3rem}.ariadne-py-2{padding-top:.5rem;padding-bottom:.5rem}.ariadne-py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.ariadne-py-6{padding-top:1.5rem;padding-bottom:1.5rem}.ariadne-text-4xl{font-size:2.25rem;line-height:2.5rem}.ariadne-text-base{font-size:1rem;line-height:1.5rem}.ariadne-text-lg{font-size:1.125rem;line-height:1.75rem}.ariadne-text-sm{font-size:.875rem;line-height:1.25rem}.ariadne-text-xl{font-size:1.25rem;line-height:1.75rem}.ariadne-text-xs{font-size:.75rem;line-height:1rem}.ariadne-font-extrabold{font-weight:800}.ariadne-font-medium{font-weight:500}.ariadne-font-semibold{font-weight:600}.ariadne-leading-10{line-height:2.5rem}.ariadne-leading-5{line-height:1.25rem}.ariadne-leading-7{line-height:1.75rem}.ariadne-leading-8{line-height:2rem}.ariadne-leading-none{line-height:1}.ariadne-tracking-tight{letter-spacing:-.025em}.ariadne-text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.ariadne-text-gray-500{--tw-text-opacity: 1;color:rgba(163,166,177,var(--tw-text-opacity))}@supports (color: oklab(0% 0 0%)){.ariadne-text-gray-500{color:oklch(.726563 .016 275 / var(--tw-text-opacity))}}.ariadne-text-red-600{--tw-text-opacity: 1;color:rgba(205,98,101,var(--tw-text-opacity))}@supports (color: oklab(0% 0 0%)){.ariadne-text-red-600{color:oklch(.626953 .135937 20 / var(--tw-text-opacity))}}.ariadne-text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.ariadne-shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ariadne-shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ariadne-shadow-sm{--tw-shadow: 0 1px 3px 0 rgba(0 0 0 / 10%), 0 0 1px 0 rgba(0 0 0 / 10%);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}summary::-webkit-details-marker{display:none}@media (prefers-reduced-motion){*{animation-duration:.01s;transition-duration:.01s}}.placeholder\:ariadne-text-zinc-600::-moz-placeholder{--tw-text-opacity: 1;color:rgba(131,132,137,var(--tw-text-opacity))}.placeholder\:ariadne-text-zinc-600::placeholder{--tw-text-opacity: 1;color:rgba(131,132,137,var(--tw-text-opacity))}@supports (color: oklab(0% 0 0%)){.placeholder\:ariadne-text-zinc-600::-moz-placeholder{color:oklch(.613281 .008 275 / var(--tw-text-opacity))}.placeholder\:ariadne-text-zinc-600::placeholder{color:oklch(.613281 .008 275 / var(--tw-text-opacity))}}.hover\:ariadne-border-indigo-600:hover{--tw-border-opacity: 1;border-color:rgba(82,131,213,var(--tw-border-opacity))}@supports (color: oklab(0% 0 0%)){.hover\:ariadne-border-indigo-600:hover{border-color:oklch(.613281 .135937 260 / var(--tw-border-opacity))}}.hover\:ariadne-bg-emerald-700:hover{--tw-bg-opacity: 1;background-color:rgba(63,118,51,var(--tw-bg-opacity))}@supports (color: oklab(0% 0 0%)){.hover\:ariadne-bg-emerald-700:hover{background-color:oklch(.511719 .115625 140 / var(--tw-bg-opacity))}}.hover\:ariadne-bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgba(252,128,131,var(--tw-bg-opacity))}@supports (color: oklab(0% 0 0%)){.hover\:ariadne-bg-red-500:hover{background-color:oklch(.742188 .151562 20 / var(--tw-bg-opacity))}}.hover\:ariadne-bg-zinc-200\/20:hover{background-color:#e2e4e933}.hover\:ariadne-bg-zinc-300\/20:hover{background-color:#cdced433}.hover\:ariadne-text-indigo-600:hover{--tw-text-opacity: 1;color:rgba(82,131,213,var(--tw-text-opacity))}@supports (color: oklab(0% 0 0%)){.hover\:ariadne-text-indigo-600:hover{color:oklch(.613281 .135937 260 / var(--tw-text-opacity))}}.hover\:ariadne-text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\:\!ariadne-border-transparent:focus{border-color:transparent!important}.focus\:ariadne-border-blue-300:focus{--tw-border-opacity: 1;border-color:rgba(159,213,252,var(--tw-border-opacity))}@supports (color: oklab(0% 0 0%)){.focus\:ariadne-border-blue-300:focus{border-color:oklch(.849609 .078125 240 / var(--tw-border-opacity))}}.focus\:ariadne-bg-blue-300\/20:focus{background-color:#9fd5fc33}.focus\:ariadne-text-indigo-600:focus{--tw-text-opacity: 1;color:rgba(82,131,213,var(--tw-text-opacity))}@supports (color: oklab(0% 0 0%)){.focus\:ariadne-text-indigo-600:focus{color:oklch(.613281 .135937 260 / var(--tw-text-opacity))}}.focus-visible\:ariadne-outline:focus-visible{outline-style:solid}.focus-visible\:ariadne-outline-2:focus-visible{outline-width:2px}.focus-visible\:ariadne-outline-offset-2:focus-visible{outline-offset:2px}.active\:ariadne-border-transparent:active{border-color:transparent}.active\:ariadne-bg-emerald-800:active{--tw-bg-opacity: 1;background-color:rgba(43,83,33,var(--tw-bg-opacity))}@supports (color: oklab(0% 0 0%)){.active\:ariadne-bg-emerald-800:active{background-color:oklch(.400391 .090625 140 / var(--tw-bg-opacity))}}.active\:ariadne-bg-indigo-700\/10:active{background-color:#4169ac1a}.active\:ariadne-bg-red-600:active{--tw-bg-opacity: 1;background-color:rgba(205,98,101,var(--tw-bg-opacity))}@supports (color: oklab(0% 0 0%)){.active\:ariadne-bg-red-600:active{background-color:oklch(.626953 .135937 20 / var(--tw-bg-opacity))}}.active\:ariadne-bg-zinc-200\/80:active{background-color:#e2e4e9cc}.active\:ariadne-bg-zinc-500\/10:active{background-color:#a5a6ac1a}.active\:ariadne-text-white:active{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.disabled\:ariadne-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:ariadne-border-transparent:disabled{border-color:transparent}.disabled\:ariadne-bg-emerald-100:disabled{--tw-bg-opacity: 1;background-color:rgba(237,246,235,var(--tw-bg-opacity))}@supports (color: oklab(0% 0 0%)){.disabled\:ariadne-bg-emerald-100:disabled{background-color:oklch(.962891 .0171875 140 / var(--tw-bg-opacity))}}.disabled\:ariadne-bg-zinc-200:disabled{--tw-bg-opacity: 1;background-color:rgba(226,228,233,var(--tw-bg-opacity))}@supports (color: oklab(0% 0 0%)){.disabled\:ariadne-bg-zinc-200:disabled{background-color:oklch(.917969 .008 275 / var(--tw-bg-opacity))}}.disabled\:ariadne-text-emerald-400:disabled{--tw-text-opacity: 1;color:rgba(143,201,130,var(--tw-text-opacity))}@supports (color: oklab(0% 0 0%)){.disabled\:ariadne-text-emerald-400:disabled{color:oklch(.777344 .114063 140 / var(--tw-text-opacity))}}.disabled\:ariadne-text-zinc-400:disabled{--tw-text-opacity: 1;color:rgba(184,186,191,var(--tw-text-opacity))}@supports (color: oklab(0% 0 0%)){.disabled\:ariadne-text-zinc-400:disabled{color:oklch(.789063 .008 275 / var(--tw-text-opacity))}}.ariadne-peer:disabled~.peer-disabled\:ariadne-cursor-not-allowed{cursor:not-allowed}.ariadne-peer:disabled~.peer-disabled\:ariadne-opacity-70{opacity:.7}.dark\:ariadne-border-zinc-900:is(.ariadne-dark *){--tw-border-opacity: 1;border-color:rgba(45,46,51,var(--tw-border-opacity))}@supports (color: oklab(0% 0 0%)){.dark\:ariadne-border-zinc-900:is(.ariadne-dark *){border-color:oklch(.302734 .008 275 / var(--tw-border-opacity))}}.dark\:ariadne-bg-red-900:is(.ariadne-dark *){--tw-bg-opacity: 1;background-color:rgba(75,32,33,var(--tw-bg-opacity))}@supports (color: oklab(0% 0 0%)){.dark\:ariadne-bg-red-900:is(.ariadne-dark *){background-color:oklch(.306641 .065625 20 / var(--tw-bg-opacity))}}.dark\:ariadne-bg-zinc-900:is(.ariadne-dark *){--tw-bg-opacity: 1;background-color:rgba(45,46,51,var(--tw-bg-opacity))}@supports (color: oklab(0% 0 0%)){.dark\:ariadne-bg-zinc-900:is(.ariadne-dark *){background-color:oklch(.302734 .008 275 / var(--tw-bg-opacity))}}.dark\:ariadne-text-slate-100:is(.ariadne-dark *){--tw-text-opacity: 1;color:rgba(240,243,255,var(--tw-text-opacity))}@supports (color: color(display-p3 0 0 0%)){.dark\:ariadne-text-slate-100:is(.ariadne-dark *){color:color(display-p3 .94177 .95165 .99851 / var(--tw-text-opacity))}}@supports (color: oklab(0% 0 0%)){.dark\:ariadne-text-slate-100:is(.ariadne-dark *){color:oklch(.964844 .01775 275 / var(--tw-text-opacity))}}.dark\:ariadne-text-white:is(.ariadne-dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:placeholder\:ariadne-text-zinc-400:is(.ariadne-dark *)::-moz-placeholder{--tw-text-opacity: 1;color:rgba(184,186,191,var(--tw-text-opacity))}.dark\:placeholder\:ariadne-text-zinc-400:is(.ariadne-dark *)::placeholder{--tw-text-opacity: 1;color:rgba(184,186,191,var(--tw-text-opacity))}@supports (color: oklab(0% 0 0%)){.dark\:placeholder\:ariadne-text-zinc-400:is(.ariadne-dark *)::-moz-placeholder{color:oklch(.789063 .008 275 / var(--tw-text-opacity))}.dark\:placeholder\:ariadne-text-zinc-400:is(.ariadne-dark *)::placeholder{color:oklch(.789063 .008 275 / var(--tw-text-opacity))}}.dark\:hover\:ariadne-border-indigo-400:hover:is(.ariadne-dark *){--tw-border-opacity: 1;border-color:rgba(144,187,255,var(--tw-border-opacity))}@supports (color: color(display-p3 0 0 0%)){.dark\:hover\:ariadne-border-indigo-400:hover:is(.ariadne-dark *){border-color:color(display-p3 .59635 .72902 .99463 / var(--tw-border-opacity))}}@supports (color: oklab(0% 0 0%)){.dark\:hover\:ariadne-border-indigo-400:hover:is(.ariadne-dark *){border-color:oklch(.789063 .114063 260 / var(--tw-border-opacity))}}.dark\:hover\:ariadne-bg-zinc-600\/20:hover:is(.ariadne-dark *){background-color:#83848933}.dark\:hover\:ariadne-text-indigo-400:hover:is(.ariadne-dark *){--tw-text-opacity: 1;color:rgba(144,187,255,var(--tw-text-opacity))}@supports (color: color(display-p3 0 0 0%)){.dark\:hover\:ariadne-text-indigo-400:hover:is(.ariadne-dark *){color:color(display-p3 .59635 .72902 .99463 / var(--tw-text-opacity))}}@supports (color: oklab(0% 0 0%)){.dark\:hover\:ariadne-text-indigo-400:hover:is(.ariadne-dark *){color:oklch(.789063 .114063 260 / var(--tw-text-opacity))}}.dark\:focus\:ariadne-border-blue-600:focus:is(.ariadne-dark *){--tw-border-opacity: 1;border-color:rgba(12,138,202,var(--tw-border-opacity))}@supports (color: oklab(0% 0 0%)){.dark\:focus\:ariadne-border-blue-600:focus:is(.ariadne-dark *){border-color:oklch(.605469 .135937 240 / var(--tw-border-opacity))}}.dark\:focus\:ariadne-bg-blue-600\/20:focus:is(.ariadne-dark *){background-color:#0c8aca33}.dark\:focus\:ariadne-text-indigo-400:focus:is(.ariadne-dark *){--tw-text-opacity: 1;color:rgba(144,187,255,var(--tw-text-opacity))}@supports (color: color(display-p3 0 0 0%)){.dark\:focus\:ariadne-text-indigo-400:focus:is(.ariadne-dark *){color:color(display-p3 .59635 .72902 .99463 / var(--tw-text-opacity))}}@supports (color: oklab(0% 0 0%)){.dark\:focus\:ariadne-text-indigo-400:focus:is(.ariadne-dark *){color:oklch(.789063 .114063 260 / var(--tw-text-opacity))}}.active\:dark\:ariadne-bg-indigo-300\/10:is(.ariadne-dark *):active{background-color:#b3d0ff1a;background-color:color(display-p3 .71915 .81354 .99753 / .1);background-color:oklch(.853516 .078125 260 / .1)}.dark\:active\:ariadne-bg-red-400:active:is(.ariadne-dark *){--tw-bg-opacity: 1;background-color:rgba(255,160,159,var(--tw-bg-opacity))}@supports (color: color(display-p3 0 0 0%)){.dark\:active\:ariadne-bg-red-400:active:is(.ariadne-dark *){background-color:color(display-p3 .94751 .64312 .63424 / var(--tw-bg-opacity))}}@supports (color: oklab(0% 0 0%)){.dark\:active\:ariadne-bg-red-400:active:is(.ariadne-dark *){background-color:oklch(.800781 .114063 20 / var(--tw-bg-opacity))}}.dark\:active\:ariadne-bg-zinc-500\/10:active:is(.ariadne-dark *){background-color:#a5a6ac1a}.dark\:active\:ariadne-bg-zinc-700\/20:active:is(.ariadne-dark *){background-color:#686a6f33}.dark\:disabled\:ariadne-bg-zinc-800:disabled:is(.ariadne-dark *){--tw-bg-opacity: 1;background-color:rgba(73,75,79,var(--tw-bg-opacity))}@supports (color: oklab(0% 0 0%)){.dark\:disabled\:ariadne-bg-zinc-800:disabled:is(.ariadne-dark *){background-color:oklch(.412109 .008 275 / var(--tw-bg-opacity))}}.disabled\:dark\:ariadne-bg-emerald-900:is(.ariadne-dark *):disabled{--tw-bg-opacity: 1;background-color:rgba(25,52,19,var(--tw-bg-opacity))}@supports (color: oklab(0% 0 0%)){.disabled\:dark\:ariadne-bg-emerald-900:is(.ariadne-dark *):disabled{background-color:oklch(.294922 .065625 140 / var(--tw-bg-opacity))}}.dark\:disabled\:ariadne-text-zinc-600:disabled:is(.ariadne-dark *){--tw-text-opacity: 1;color:rgba(131,132,137,var(--tw-text-opacity))}@supports (color: oklab(0% 0 0%)){.dark\:disabled\:ariadne-text-zinc-600:disabled:is(.ariadne-dark *){color:oklch(.613281 .008 275 / var(--tw-text-opacity))}}.disabled\:dark\:ariadne-text-emerald-600:is(.ariadne-dark *):disabled{--tw-text-opacity: 1;color:rgba(79,147,64,var(--tw-text-opacity))}@supports (color: oklab(0% 0 0%)){.disabled\:dark\:ariadne-text-emerald-600:is(.ariadne-dark *):disabled{color:oklch(.597656 .135937 140 / var(--tw-text-opacity))}}@media (min-width: 640px){.sm\:ariadne-mx-auto{margin-left:auto;margin-right:auto}.sm\:ariadne-w-full{width:100%}.sm\:ariadne-max-w-\[480px\]{max-width:480px}.sm\:ariadne-rounded-lg{border-radius:.5rem}.sm\:ariadne-px-12{padding-left:3rem;padding-right:3rem}.sm\:ariadne-px-4{padding-left:1rem;padding-right:1rem}}@media (min-width: 1024px){.lg\:ariadne-ml-4{margin-left:1rem}.lg\:ariadne-ml-6{margin-left:1.5rem}.lg\:ariadne-flex{display:flex}.lg\:ariadne-items-center{align-items:center}.lg\:ariadne-space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:ariadne-px-0{padding-left:0;padding-right:0}.lg\:ariadne-px-8{padding-left:2rem;padding-right:2rem}.lg\:ariadne-text-5xl{font-size:3rem;line-height:1}}.\[\&\:not\(\:focus\)\]\:enabled\:hover\:ariadne-border-red-700:hover:enabled:not(:focus){--tw-border-opacity: 1;border-color:rgba(166,78,81,var(--tw-border-opacity))}@supports (color: oklab(0% 0 0%)){.\[\&\:not\(\:focus\)\]\:enabled\:hover\:ariadne-border-red-700:hover:enabled:not(:focus){border-color:oklch(.535156 .115625 20 / var(--tw-border-opacity))}}.\[\&\:not\(\:focus\)\]\:enabled\:hover\:ariadne-border-zinc-300:hover:enabled:not(:focus){--tw-border-opacity: 1;border-color:rgba(205,206,212,var(--tw-border-opacity))}@supports (color: oklab(0% 0 0%)){.\[\&\:not\(\:focus\)\]\:enabled\:hover\:ariadne-border-zinc-300:hover:enabled:not(:focus){border-color:oklch(.853516 .008 275 / var(--tw-border-opacity))}}.\[\&\:not\(\:focus\)\]\:enabled\:hover\:ariadne-bg-red-300\/80:hover:enabled:not(:focus){background-color:#ffbebdcc;background-color:color(display-p3 .96737 .75397 .74438 / .8);background-color:oklch(.861328 .078125 20 / .8)}.\[\&\:not\(\:focus\)\]\:enabled\:hover\:ariadne-bg-zinc-200\/20:hover:enabled:not(:focus){background-color:#e2e4e933}.\[\&\:not\(\:focus\)\]\:dark\:enabled\:hover\:ariadne-border-red-700:hover:enabled:is(.ariadne-dark *):not(:focus){--tw-border-opacity: 1;border-color:rgba(166,78,81,var(--tw-border-opacity))}@supports (color: oklab(0% 0 0%)){.\[\&\:not\(\:focus\)\]\:dark\:enabled\:hover\:ariadne-border-red-700:hover:enabled:is(.ariadne-dark *):not(:focus){border-color:oklch(.535156 .115625 20 / var(--tw-border-opacity))}}.\[\&\:not\(\:focus\)\]\:dark\:enabled\:hover\:ariadne-border-zinc-600:hover:enabled:is(.ariadne-dark *):not(:focus){--tw-border-opacity: 1;border-color:rgba(131,132,137,var(--tw-border-opacity))}@supports (color: oklab(0% 0 0%)){.\[\&\:not\(\:focus\)\]\:dark\:enabled\:hover\:ariadne-border-zinc-600:hover:enabled:is(.ariadne-dark *):not(:focus){border-color:oklch(.613281 .008 275 / var(--tw-border-opacity))}}.\[\&\:not\(\:focus\)\]\:dark\:enabled\:hover\:ariadne-bg-red-900\/80:hover:enabled:is(.ariadne-dark *):not(:focus){background-color:#4b2021cc}.\[\&\:not\(\:focus\)\]\:dark\:enabled\:hover\:ariadne-bg-zinc-700\/20:hover:enabled:is(.ariadne-dark *):not(:focus){background-color:#686a6f33}.\[\&\>svg\]\:ariadne-size-3>svg{width:.75rem;height:.75rem}.\[\&\>svg\]\:ariadne-size-4>svg{width:1rem;height:1rem}.\[\&\>svg\]\:ariadne-size-5>svg{width:1.25rem;height:1.25rem}.\[\&\>svg\]\:ariadne-text-zinc-400>svg{--tw-text-opacity: 1;color:rgba(184,186,191,var(--tw-text-opacity))}@supports (color: oklab(0% 0 0%)){.\[\&\>svg\]\:ariadne-text-zinc-400>svg{color:oklch(.789063 .008 275 / var(--tw-text-opacity))}}.\[\&\>svg\]\:dark\:ariadne-text-zinc-600:is(.ariadne-dark *)>svg{--tw-text-opacity: 1;color:rgba(131,132,137,var(--tw-text-opacity))}@supports (color: oklab(0% 0 0%)){.\[\&\>svg\]\:dark\:ariadne-text-zinc-600:is(.ariadne-dark *)>svg{color:oklch(.613281 .008 275 / var(--tw-text-opacity))}}.typography p,.typography ol,.typography ul{max-width:600px}.typography a{font-weight:500;text-decoration-line:underline}.typography strong{font-weight:700}.typography ol{position:relative;list-style-type:none;padding-left:1.5rem;counter-reset:list-number}.typography ol>li:before{position:absolute;left:0;width:1.25rem;overflow:hidden;text-align:right;counter-increment:list-number;content:counter(list-number) "."}.typography ul{position:relative;list-style-type:none;padding-left:1.5rem}.typography ul>li:before{position:absolute;left:0;width:1.25rem;overflow:hidden;text-align:center;content:"▪"}.typography dt{font-weight:600}.typography hr{border-top-width:1px}.typography blockquote{border-left-width:4px;padding-left:.5rem;font-weight:500;font-style:italic}.typography blockquote p:first-of-type:before{content:open-quote}.typography blockquote p:last-of-type:after{content:close-quote}.typography kbd{font-weight:500;color:inherit;font-family:inherit}.typography code{font-family:Martian Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-weight:600}.typography pre{overflow-x:auto;border-radius:.5rem;background-color:rgba(205,206,212,var(--tw-bg-opacity));--tw-bg-opacity: .1;padding:.5rem .75rem;font-family:Martian Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}@supports (color: oklab(0% 0 0%)){.typography pre{background-color:oklch(.853516 .008 275 / var(--tw-bg-opacity))}}.typography pre:is(.ariadne-dark *){background-color:rgba(104,106,111,var(--tw-bg-opacity));--tw-bg-opacity: .1}@supports (color: oklab(0% 0 0%)){.typography pre:is(.ariadne-dark *){background-color:oklch(.523438 .008 275 / var(--tw-bg-opacity))}}.typography pre code{color:inherit;font:inherit}.typography :not(pre)>code{border-radius:.5rem;background-color:rgba(205,206,212,var(--tw-bg-opacity));--tw-bg-opacity: .1;padding:.25rem}@supports (color: oklab(0% 0 0%)){.typography :not(pre)>code{background-color:oklch(.853516 .008 275 / var(--tw-bg-opacity))}}.typography :not(pre)>code:is(.ariadne-dark *){background-color:rgba(104,106,111,var(--tw-bg-opacity));--tw-bg-opacity: .1}@supports (color: oklab(0% 0 0%)){.typography :not(pre)>code:is(.ariadne-dark *){background-color:oklch(.523438 .008 275 / var(--tw-bg-opacity))}}.typography pre code:before,.typography pre code:after{--tw-content: none;content:var(--tw-content)}.typography table{width:100%;table-layout:auto;text-align:left}.typography thead{border-bottom-width:1px;border-bottom-color:#fafbfe1a}.typography thead th{padding-top:.25rem;padding-bottom:.25rem;vertical-align:bottom;font-weight:600}.typography tbody tr{border-bottom-width:1px;border-bottom-color:#fafbfe1a}.typography tbody tr:last-child{border-bottom-width:0px}.typography tbody td{padding-top:.25rem;padding-bottom:.25rem;vertical-align:baseline}.typography tfoot{border-top-width:1px}.typography tfoot td{vertical-align:top}.tippy-box.tomato-theme{background-color:tomato;color:#ff0}
|
Binary file
|
Binary file
|
@@ -1,37 +1,89 @@
|
|
1
|
+
# typed: false
|
1
2
|
# frozen_string_literal: true
|
2
3
|
|
4
|
+
require_relative "../../lib/view_components_contrib/html_attrs"
|
5
|
+
require "dry-initializer"
|
6
|
+
|
3
7
|
module Ariadne
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
8
|
+
# :nodoc:
|
9
|
+
class BaseComponent < ViewComponentContrib::Base
|
10
|
+
include ViewComponentContrib::StyleVariants
|
11
|
+
require_relative "../../lib/view_components_contrib/style_variants"
|
12
|
+
|
13
|
+
include ViewComponentContrib::HTMLAttrs
|
14
|
+
include ViewComponentContrib::TranslationHelper
|
15
|
+
|
16
|
+
include Ariadne::AttributesHelper
|
17
|
+
|
18
|
+
extend Dry::Initializer[undefined: false]
|
19
|
+
|
20
|
+
accepts_html_attributes
|
21
|
+
|
22
|
+
ACCEPT_ANYTHING = lambda { |static_content = nil, &block|
|
23
|
+
next static_content if static_content.present?
|
24
|
+
|
25
|
+
view_context.capture { block&.call }
|
26
|
+
}
|
27
|
+
|
28
|
+
# classes is an array of CSS classes
|
29
|
+
style_config.postprocess_with do |classes|
|
30
|
+
Ariadne::ViewComponents.tailwind_merger.merge(classes)
|
31
|
+
end
|
32
|
+
|
33
|
+
class << self
|
34
|
+
def component_name
|
35
|
+
@component_name ||= name.sub(/::Component$/, "").underscore
|
36
|
+
end
|
37
|
+
|
38
|
+
def component_id(&block)
|
39
|
+
@component_id ||= block || proc { self.class.component_name.delete_prefix("ui/").gsub(/[^a-z0-9]+/, "-") }
|
40
|
+
end
|
41
|
+
|
42
|
+
def stimulus_name
|
43
|
+
# @tag stimulus-id
|
44
|
+
@stimulus_name ||= component_name.gsub(/[^a-z0-9]+/, "-")
|
28
45
|
end
|
29
46
|
end
|
30
47
|
|
31
|
-
|
32
|
-
|
48
|
+
self.i18n_namespace = nil
|
49
|
+
|
50
|
+
# Support relative component names within components
|
51
|
+
def component(name, ...)
|
52
|
+
return super unless name.starts_with?(".")
|
53
|
+
|
54
|
+
full_name = Pathname.new(File.join(self.class.component_name, name)).cleanpath.to_s
|
55
|
+
|
56
|
+
super(full_name, ...)
|
57
|
+
end
|
58
|
+
|
59
|
+
def component_id
|
60
|
+
@component_id ||= instance_eval(&self.class.component_id)
|
61
|
+
end
|
62
|
+
|
63
|
+
def class_for(name)
|
64
|
+
# @tag isolated-styles
|
65
|
+
# stripping away UI and Component
|
66
|
+
modulename = self.class.name.split("::")[1...-1].join("--").downcase
|
67
|
+
|
68
|
+
"ariadne-#{modulename}-#{name}"
|
69
|
+
end
|
70
|
+
|
71
|
+
def stimulus_name
|
72
|
+
self.class.stimulus_name
|
73
|
+
end
|
74
|
+
|
75
|
+
def options
|
76
|
+
@options ||= self.class.dry_initializer.attributes(self)
|
77
|
+
end
|
78
|
+
|
79
|
+
def html_attributes
|
80
|
+
tag.attributes(html_attrs.except(:class))
|
81
|
+
end
|
33
82
|
|
34
|
-
|
83
|
+
def validate_aria_label!(html_attrs)
|
84
|
+
aria_label = aria(html_attrs, "label")
|
85
|
+
aria_labelledby = aria(html_attrs, "labelledby")
|
86
|
+
raise ArgumentError, "`aria-label` or `aria-labelledby` is required." if aria_label.nil? && aria_labelledby.nil?
|
35
87
|
end
|
36
88
|
end
|
37
89
|
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ariadne
|
4
|
+
module Behaviors
|
5
|
+
module Tooltipable
|
6
|
+
def with_tooltip(text, **options)
|
7
|
+
@tooltip_id = Generate.id
|
8
|
+
|
9
|
+
html_attrs.merge!(
|
10
|
+
"data-ariadne-tooltip-target" => "activator",
|
11
|
+
"aria-describedby" => @tooltip_id,
|
12
|
+
)
|
13
|
+
|
14
|
+
prepend_action(html_attrs, tooltip_action)
|
15
|
+
|
16
|
+
# TODO: this should raise if component's tag isn't an ARIA-compatible tag
|
17
|
+
# ('a, button, input, select, textarea, [tabindex]:not([tabindex="-1"])')
|
18
|
+
Ariadne::Behaviors::Tooltip.new(id: @tooltip_id, text: text, component: self, **options)
|
19
|
+
end
|
20
|
+
|
21
|
+
def tooltip_action
|
22
|
+
"mouseover->ariadne-tooltip#showTooltip mouseout->ariadne-tooltip#hideTooltip"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class Tooltip < Ariadne::BaseComponent
|
27
|
+
option :id
|
28
|
+
option :text
|
29
|
+
option :component
|
30
|
+
option :size, default: -> { :sm }
|
31
|
+
|
32
|
+
erb_template <<~ERB
|
33
|
+
<div data-controller="ariadne-tooltip",>
|
34
|
+
<%= render(component) { content } %>
|
35
|
+
<div class="<%= style(:tooltip_wrapper) %>" data-ariadne-tooltip-target="wrapper">
|
36
|
+
<div id="<%= id %>" class="<%= style(size:) %>" data-ariadne-tooltip-target="tooltip">
|
37
|
+
<div class="<%= style(:arrow) %>" class=arrow data-ariadne-tooltip-target="arrow"></div>
|
38
|
+
<div class="<%= style(:text) %>"><%= text %></div>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
</template>
|
42
|
+
ERB
|
43
|
+
|
44
|
+
style do
|
45
|
+
base do
|
46
|
+
[
|
47
|
+
"absolute",
|
48
|
+
"w-max",
|
49
|
+
"z-20",
|
50
|
+
"isolate",
|
51
|
+
"flex",
|
52
|
+
"flex-col",
|
53
|
+
"gap-0.5",
|
54
|
+
"p-2",
|
55
|
+
"text-center",
|
56
|
+
"rounded-lg",
|
57
|
+
"bg-zinc-950",
|
58
|
+
"dark:bg-zinc-100",
|
59
|
+
"shadow-lg",
|
60
|
+
"dark:shadow-zinc-100/50",
|
61
|
+
]
|
62
|
+
end
|
63
|
+
|
64
|
+
variants do
|
65
|
+
size do
|
66
|
+
# w-36
|
67
|
+
sm { "max-w-[min(144px,90vw)]" }
|
68
|
+
# w-52
|
69
|
+
md { "max-w-[min(208px,90vw)]" }
|
70
|
+
# w-96
|
71
|
+
lg { "max-w-[min(384px,90vw)]" }
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
style :tooltip_wrapper do
|
77
|
+
base do
|
78
|
+
"hidden"
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
style :arrow do
|
83
|
+
base do
|
84
|
+
[
|
85
|
+
"absolute",
|
86
|
+
"z-10",
|
87
|
+
"w-2",
|
88
|
+
"h-2",
|
89
|
+
"rounded-tl-sm",
|
90
|
+
"rotate-45",
|
91
|
+
"bg-zinc-950",
|
92
|
+
"dark:bg-zinc-50",
|
93
|
+
"shadow-lg",
|
94
|
+
"dark:shadow-zinc-50",
|
95
|
+
]
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
style :text do
|
100
|
+
base do
|
101
|
+
[
|
102
|
+
"text-sm",
|
103
|
+
"text-zinc-50",
|
104
|
+
"dark:text-zinc-900",
|
105
|
+
]
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
style :action_text do
|
110
|
+
base do
|
111
|
+
[
|
112
|
+
"ariadne-xs-md",
|
113
|
+
"text-zinc-400",
|
114
|
+
"dark:text-zinc-600",
|
115
|
+
]
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ariadne
|
4
|
+
# Conditionally renders a `Ariadne::BaseComponent` around the given content. If the given condition
|
5
|
+
# is true, a `Ariadne::BaseComponent` will render around the content. If the condition is false, only
|
6
|
+
# the content is rendered.
|
7
|
+
class ConditionalWrapper < Ariadne::BaseComponent
|
8
|
+
# @param condition [Boolean] Whether or not to wrap the content in a `Ariadne::BaseComponent`.
|
9
|
+
# @param base_component_arguments [Hash] The arguments to pass to `Ariadne::BaseComponent`.
|
10
|
+
def initialize(condition:, **base_component_arguments)
|
11
|
+
@condition = condition
|
12
|
+
@base_component_arguments = base_component_arguments
|
13
|
+
end
|
14
|
+
|
15
|
+
def call
|
16
|
+
return content unless @condition
|
17
|
+
|
18
|
+
BaseComponent.new(**@base_component_arguments).render_in(self) { content }
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ariadne
|
4
|
+
module Form
|
5
|
+
# :nodoc:
|
6
|
+
class BaseComponent
|
7
|
+
include Ariadne::ClassNameHelper
|
8
|
+
extend Ariadne::Forms::ActsAsComponent
|
9
|
+
|
10
|
+
def self.inherited(base)
|
11
|
+
base_path = Ariadne::Forms::Utils.const_source_location(base.name)
|
12
|
+
|
13
|
+
unless base_path
|
14
|
+
warn("Could not identify the template for #{base}")
|
15
|
+
return
|
16
|
+
end
|
17
|
+
|
18
|
+
dir = File.dirname(base_path)
|
19
|
+
base.renders_template(File.join(dir, "#{base.name.demodulize.underscore}.html.erb"), :render_template)
|
20
|
+
end
|
21
|
+
|
22
|
+
delegate :required?, :disabled?, :hidden?, to: :@input
|
23
|
+
|
24
|
+
def perform_render(&block)
|
25
|
+
return "" unless render?
|
26
|
+
|
27
|
+
@__prf_content_block = block
|
28
|
+
compile_and_render_template
|
29
|
+
end
|
30
|
+
|
31
|
+
def content
|
32
|
+
return @__prf_content if defined?(@__prf_content_evaluated) && @__prf_content_evaluated
|
33
|
+
|
34
|
+
@__prf_content_evaluated = true
|
35
|
+
@__prf_content = capture do
|
36
|
+
@__prf_content_block.call
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# :nocov:
|
41
|
+
def type
|
42
|
+
:component
|
43
|
+
end
|
44
|
+
# :nocov:
|
45
|
+
|
46
|
+
def input?
|
47
|
+
false
|
48
|
+
end
|
49
|
+
|
50
|
+
def to_component
|
51
|
+
self
|
52
|
+
end
|
53
|
+
|
54
|
+
def render?
|
55
|
+
true
|
56
|
+
end
|
57
|
+
|
58
|
+
private
|
59
|
+
|
60
|
+
def compile_and_render_template
|
61
|
+
self.class.compile! unless self.class.instance_methods(false).include?(:render_template)
|
62
|
+
render_template
|
63
|
+
end
|
64
|
+
|
65
|
+
def content_tag_if(condition, tag, **kwargs, &block)
|
66
|
+
if condition
|
67
|
+
content_tag(tag, **kwargs, &block)
|
68
|
+
else
|
69
|
+
capture(&block)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ariadne
|
4
|
+
module Form
|
5
|
+
class BaseInputComponent < Ariadne::BaseComponent
|
6
|
+
option :required, optional: true
|
7
|
+
option :caption, optional: true
|
8
|
+
|
9
|
+
def add_label_classes(*class_names)
|
10
|
+
# label_arguments[:class] = merge_class_names(
|
11
|
+
# label_arguments[:class], *class_names
|
12
|
+
# )
|
13
|
+
end
|
14
|
+
|
15
|
+
def label_arguments
|
16
|
+
{}
|
17
|
+
end
|
18
|
+
|
19
|
+
def hidden?
|
20
|
+
!!html_attrs[:hidden]
|
21
|
+
end
|
22
|
+
|
23
|
+
def full_width?
|
24
|
+
@full_width
|
25
|
+
end
|
26
|
+
|
27
|
+
# Whether or not to wrap the component in a FormControl, which renders a
|
28
|
+
# label above and validation message beneath the input.
|
29
|
+
def form_control?
|
30
|
+
html_attrs.delete(:form_control) { true }
|
31
|
+
end
|
32
|
+
|
33
|
+
private def before_render
|
34
|
+
# make sure to evaluate the component's content block so slots are defined
|
35
|
+
content
|
36
|
+
|
37
|
+
@input_attributes = {
|
38
|
+
aria: {},
|
39
|
+
}
|
40
|
+
|
41
|
+
ids = [].tap do |memo|
|
42
|
+
memo << @validation_id if @validation_message
|
43
|
+
memo << @caption_id if @init_caption || caption?
|
44
|
+
end
|
45
|
+
|
46
|
+
return if ids.empty?
|
47
|
+
|
48
|
+
@input_attributes[:aria][:describedby] = ids.join(" ")
|
49
|
+
end
|
50
|
+
|
51
|
+
private def caption?
|
52
|
+
@caption.present?
|
53
|
+
end
|
54
|
+
|
55
|
+
private def required?
|
56
|
+
@required.present?
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% if @input.caption? && !@input.caption.blank? %>
|
2
|
+
<span class="FormControl-caption" id="<%= @input.caption_id %>"><%= @input.caption %></span>
|
3
|
+
<% elsif caption_template? %>
|
4
|
+
<% caption_template = render_caption_template %>
|
5
|
+
<% unless caption_template.blank? %>
|
6
|
+
<span class="FormControl-caption" id="<%= @input.caption_id %>">
|
7
|
+
<%= caption_template %>
|
8
|
+
</span>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ariadne
|
4
|
+
module Form
|
5
|
+
# :nodoc:
|
6
|
+
class Caption < BaseComponent
|
7
|
+
def initialize(input:)
|
8
|
+
@input = input
|
9
|
+
end
|
10
|
+
|
11
|
+
def caption_template?
|
12
|
+
@input.caption_template?
|
13
|
+
end
|
14
|
+
|
15
|
+
def render_caption_template
|
16
|
+
@input.render_caption_template
|
17
|
+
end
|
18
|
+
|
19
|
+
def before_render
|
20
|
+
return unless @input.caption? && caption_template?
|
21
|
+
|
22
|
+
raise <<~MESSAGE
|
23
|
+
Please provide either a caption: argument or caption template for the
|
24
|
+
'#{@input.name}' input; both were found.
|
25
|
+
MESSAGE
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<% if @input.form_control? %>
|
2
|
+
<%= content_tag(@tag, **@form_group_arguments) do %>
|
3
|
+
<% if @input.label %>
|
4
|
+
<%= builder.label(@input.name, **@input.label_arguments) do %>
|
5
|
+
<%= @input.label %>
|
6
|
+
<% if @input.required? %>
|
7
|
+
<%= content_tag(:span, aria: { hidden: "true" }) { "*" } %>
|
8
|
+
<% end %>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
11
|
+
<%= content %>
|
12
|
+
<% if @input.supports_validation? %>
|
13
|
+
<%= render(ValidationMessage.new(input: @input)) %>
|
14
|
+
<% end %>
|
15
|
+
<%= render(Caption.new(input: @input)) %>
|
16
|
+
<% end %>
|
17
|
+
<% else %>
|
18
|
+
<%= content %>
|
19
|
+
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ariadne
|
4
|
+
module Form
|
5
|
+
# :nodoc:
|
6
|
+
class FormControl < BaseComponent
|
7
|
+
delegate :builder, :form, to: :@input
|
8
|
+
|
9
|
+
def initialize(input:, tag: :div, **system_arguments)
|
10
|
+
@input = input
|
11
|
+
@tag = tag
|
12
|
+
@input.add_label_classes("FormControl-label")
|
13
|
+
@form_group_arguments = {
|
14
|
+
# **system_arguments,
|
15
|
+
# class: class_names(
|
16
|
+
# system_arguments[:class],
|
17
|
+
# system_arguments[:classes],
|
18
|
+
# "FormControl",
|
19
|
+
# "width-full FormControl--fullWidth" => @input.full_width?,
|
20
|
+
# ),
|
21
|
+
}
|
22
|
+
|
23
|
+
@form_group_arguments[:hidden] = "hidden" if @input.hidden?
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ariadne
|
4
|
+
module Form
|
5
|
+
# :nodoc:
|
6
|
+
class FormReference < BaseComponent
|
7
|
+
delegate :builder, :form, to: :@input
|
8
|
+
|
9
|
+
def initialize(input:)
|
10
|
+
@input = input
|
11
|
+
end
|
12
|
+
|
13
|
+
def builder_or_view
|
14
|
+
@input.nested? ? builder : @view_context
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ariadne
|
4
|
+
module Form
|
5
|
+
# :nodoc:
|
6
|
+
module Group
|
7
|
+
class Component < Ariadne::Form::BaseComponent
|
8
|
+
VERTICAL = :vertical
|
9
|
+
HORIZONTAL = :horizontal
|
10
|
+
DEFAULT_LAYOUT = VERTICAL
|
11
|
+
LAYOUTS = [VERTICAL, HORIZONTAL].freeze
|
12
|
+
|
13
|
+
def initialize(inputs:, builder:, form:, layout: DEFAULT_LAYOUT, **system_arguments)
|
14
|
+
@inputs = inputs
|
15
|
+
@builder = builder
|
16
|
+
@form = form
|
17
|
+
@layout = layout
|
18
|
+
@system_arguments = system_arguments
|
19
|
+
end
|
20
|
+
|
21
|
+
def horizontal?
|
22
|
+
@layout == HORIZONTAL
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= builder.hidden_field(@input.name, **@input.input_attributes) %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Ariadne
|
4
|
+
module Form
|
5
|
+
# :nodoc:
|
6
|
+
class HiddenField < Ariadne::Forms::BaseComponent
|
7
|
+
delegate :builder, :form, to: :@input
|
8
|
+
|
9
|
+
def initialize(input:)
|
10
|
+
@input = input
|
11
|
+
@input.add_input_classes("FormField-input")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<div class="border-top color-border-muted"></div>
|