From 927f5275ca3f82aa53eb36a97a22efbc620d22ce Mon Sep 17 00:00:00 2001 From: Alexander Brandon Coles Date: Mon, 13 Jan 2025 15:59:03 -0300 Subject: [PATCH] Commit generated static files --- static/arguments.json | 67 ++++++++ static/audited_at.json | 3 + static/constants.json | 11 ++ static/form_previews.json | 5 + static/info_arch.json | 312 +++++++++++++++++++++++++++++++++++++- static/previews.json | 112 ++++++++++++++ static/statuses.json | 3 + 7 files changed, 512 insertions(+), 1 deletion(-) diff --git a/static/arguments.json b/static/arguments.json index a2be48287b..1efb597da4 100644 --- a/static/arguments.json +++ b/static/arguments.json @@ -5105,6 +5105,73 @@ } ] }, + { + "component": "OpenProject::DangerConfirmationDialog", + "status": "open_project", + "a11y_reviewed": false, + "short_name": "OpenProjectDangerConfirmationDialog", + "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/danger_confirmation_dialog.rb", + "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/danger_confirmation_dialog/default/", + "parameters": [ + { + "name": "form_arguments", + "type": "Hash", + "default": "`{}`", + "description": "Allows the dialog to submit a form. Pass EITHER the `builder:` option to this hash" + }, + { + "name": "id", + "type": "String", + "default": "`self.class.generate_id`", + "description": "The id of the dialog." + }, + { + "name": "system_arguments", + "type": "Hash", + "default": "N/A", + "description": "[System arguments](/system-arguments)" + } + ] + }, + { + "component": "OpenProject::DangerConfirmationDialog::ConfirmationCheckBox", + "status": "open_project", + "a11y_reviewed": false, + "short_name": "OpenProjectDangerConfirmationDialogConfirmationCheckBox", + "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/danger_confirmation_dialog/confirmation_check_box.rb", + "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/danger_confirmation_dialog/confirmation_check_box/default/", + "parameters": [ + { + "name": "check_box_id", + "type": "String", + "default": "`self.class.generate_id`", + "description": "The id of the check_box input." + }, + { + "name": "check_box_name", + "type": "String", + "default": "N/A", + "description": "The name of the check_box input." + }, + { + "name": "system_arguments", + "type": "Hash", + "default": "N/A", + "description": "[System arguments](/system-arguments)" + } + ] + }, + { + "component": "OpenProject::DangerConfirmationDialog::FormWrapper", + "status": "open_project", + "a11y_reviewed": false, + "short_name": "OpenProjectDangerConfirmationDialogFormWrapper", + "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/danger_confirmation_dialog/form_wrapper.rb", + "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/danger_confirmation_dialog/form_wrapper/default/", + "parameters": [ + + ] + }, { "component": "OpenProject::DragHandle", "status": "open_project", diff --git a/static/audited_at.json b/static/audited_at.json index e4af3a25df..db866d4443 100644 --- a/static/audited_at.json +++ b/static/audited_at.json @@ -118,6 +118,9 @@ "Primer::Navigation::TabComponent": "", "Primer::OpenProject::BorderGrid": "", "Primer::OpenProject::BorderGrid::Cell": "", + "Primer::OpenProject::DangerConfirmationDialog": "", + "Primer::OpenProject::DangerConfirmationDialog::ConfirmationCheckBox": "", + "Primer::OpenProject::DangerConfirmationDialog::FormWrapper": "", "Primer::OpenProject::DragHandle": "", "Primer::OpenProject::FeedbackDialog": "", "Primer::OpenProject::FeedbackMessage": "", diff --git a/static/constants.json b/static/constants.json index 0f85a79028..1da4929d31 100644 --- a/static/constants.json +++ b/static/constants.json @@ -1561,6 +1561,17 @@ "Primer::OpenProject::BorderGrid::Cell": { "GeneratedSlotMethods": "Primer::OpenProject::BorderGrid::Cell::GeneratedSlotMethods" }, + "Primer::OpenProject::DangerConfirmationDialog": { + "ConfirmationCheckBox": "Primer::OpenProject::DangerConfirmationDialog::ConfirmationCheckBox", + "FormWrapper": "Primer::OpenProject::DangerConfirmationDialog::FormWrapper", + "GeneratedSlotMethods": "Primer::OpenProject::DangerConfirmationDialog::GeneratedSlotMethods" + }, + "Primer::OpenProject::DangerConfirmationDialog::ConfirmationCheckBox": { + "GeneratedSlotMethods": "Primer::OpenProject::DangerConfirmationDialog::ConfirmationCheckBox::GeneratedSlotMethods" + }, + "Primer::OpenProject::DangerConfirmationDialog::FormWrapper": { + "GeneratedSlotMethods": "Primer::OpenProject::DangerConfirmationDialog::FormWrapper::GeneratedSlotMethods" + }, "Primer::OpenProject::DragHandle": { "DEFAULT_SIZE": "small", "GeneratedSlotMethods": "Primer::OpenProject::DragHandle::GeneratedSlotMethods", diff --git a/static/form_previews.json b/static/form_previews.json index 20ebd3bfed..76a9ee0609 100644 --- a/static/form_previews.json +++ b/static/form_previews.json @@ -13,6 +13,11 @@ "name": "multi_text_field_form", "snapshot": "true" }, + { + "preview_path": "primer/forms/custom_width_fields_form", + "name": "custom_width_fields_form", + "snapshot": "false" + }, { "preview_path": "primer/forms/text_field_and_checkbox_form", "name": "text_field_and_checkbox_form", diff --git a/static/info_arch.json b/static/info_arch.json index 1b3584ed8d..8868ed5b83 100644 --- a/static/info_arch.json +++ b/static/info_arch.json @@ -14217,6 +14217,30 @@ "description": "Same arguments as {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}}." } ] + }, + { + "name": "leading_visual", + "description": "Leading visuals appear to the left of the link text.\n\nUse:\n\n- `leading_visual_icon` which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}.", + "parameters": [ + { + "name": "system_arguments", + "type": "Hash", + "default": "N/A", + "description": "Same arguments as {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}." + } + ] + }, + { + "name": "trailing_visual", + "description": "Trailing visuals appear to the right of the link text.\n\nUse:\n\n- `trailing_visual_icon` which accepts the arguments accepted by {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}.", + "parameters": [ + { + "name": "system_arguments", + "type": "Hash", + "default": "N/A", + "description": "Same arguments as {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}." + } + ] } ], "methods": [ @@ -14326,6 +14350,32 @@ "color-contrast" ] } + }, + { + "preview_path": "primer/beta/link/with_leading_icon", + "name": "with_leading_icon", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/beta/link/with_trailing_icon", + "name": "with_trailing_icon", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } } ], "subcomponents": [ @@ -17385,6 +17435,266 @@ ] }, + { + "fully_qualified_name": "Primer::OpenProject::DangerConfirmationDialog", + "description": "A pre-configured dialog for destructive/\"potentially dangerous\" actions", + "accessibility_docs": null, + "is_form_component": false, + "is_published": true, + "requires_js": false, + "component": "OpenProject::DangerConfirmationDialog", + "status": "open_project", + "a11y_reviewed": false, + "short_name": "OpenProjectDangerConfirmationDialog", + "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/danger_confirmation_dialog.rb", + "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/danger_confirmation_dialog/default/", + "parameters": [ + { + "name": "form_arguments", + "type": "Hash", + "default": "`{}`", + "description": "Allows the dialog to submit a form. Pass EITHER the `builder:` option to this hash" + }, + { + "name": "id", + "type": "String", + "default": "`self.class.generate_id`", + "description": "The id of the dialog." + }, + { + "name": "system_arguments", + "type": "Hash", + "default": "N/A", + "description": "{{link_to_system_arguments_docs}}" + } + ], + "slots": [ + { + "name": "confirmation_message", + "description": "A confirmation message with some defaults that are necessary for rendering nicely.", + "parameters": [ + { + "name": "heading", + "type": "String", + "default": "N/A", + "description": "the heading for the success message" + }, + { + "name": "description", + "type": "String", + "default": "N/A", + "description": "the description for the success message" + }, + { + "name": "icon_arguments", + "type": "Hash", + "default": "N/A", + "description": "the system_arguments for the icon" + }, + { + "name": "system_arguments", + "type": "Hash", + "default": "N/A", + "description": "{{link_to_system_arguments_docs}}" + } + ] + }, + { + "name": "confirmation_check_box", + "description": "A checkbox that the user is required to check in order to continue with the destructive action.", + "parameters": [ + { + "name": "system_arguments", + "type": "Hash", + "default": "N/A", + "description": "{{link_to_system_arguments_docs}}" + } + ] + }, + { + "name": "additional_details", + "description": "Optional additional_details such as grid displaying a list of items to be deleted", + "parameters": [ + { + "name": "system_arguments", + "type": "Hash", + "default": "N/A", + "description": "{{link_to_system_arguments_docs}}" + } + ] + } + ], + "methods": [ + { + "name": "dialog_id", + "description": "The dialog's ID value.", + "parameters": [ + + ], + "return_types": [ + + ] + } + ], + "previews": [ + { + "preview_path": "primer/open_project/danger_confirmation_dialog/default", + "name": "default", + "snapshot": "interactive", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/danger_confirmation_dialog/playground", + "name": "playground", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/danger_confirmation_dialog/with_form_builder_form", + "name": "with_form_builder_form", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/danger_confirmation_dialog/with_form", + "name": "with_form", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/danger_confirmation_dialog/with_additional_details", + "name": "with_additional_details", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/danger_confirmation_dialog/custom_icon", + "name": "custom_icon", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + } + ], + "subcomponents": [ + + ] + }, + { + "fully_qualified_name": "Primer::OpenProject::DangerConfirmationDialog::ConfirmationCheckBox", + "description": "This component is part of `Primer::OpenProject::DangerConfirmationDialog`\nand should not be used as a standalone component.", + "accessibility_docs": null, + "is_form_component": false, + "is_published": true, + "requires_js": false, + "component": "OpenProject::DangerConfirmationDialog::ConfirmationCheckBox", + "status": "open_project", + "a11y_reviewed": false, + "short_name": "OpenProjectDangerConfirmationDialogConfirmationCheckBox", + "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/danger_confirmation_dialog/confirmation_check_box.rb", + "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/danger_confirmation_dialog/confirmation_check_box/default/", + "parameters": [ + { + "name": "check_box_id", + "type": "String", + "default": "`self.class.generate_id`", + "description": "The id of the check_box input." + }, + { + "name": "check_box_name", + "type": "String", + "default": "N/A", + "description": "The name of the check_box input." + }, + { + "name": "system_arguments", + "type": "Hash", + "default": "N/A", + "description": "{{link_to_system_arguments_docs}}" + } + ], + "slots": [ + + ], + "methods": [ + + ], + "previews": [ + + ], + "subcomponents": [ + + ] + }, + { + "fully_qualified_name": "Primer::OpenProject::DangerConfirmationDialog::FormWrapper", + "description": "Utility component for wrapping DangerConfirmationDialog in a form", + "accessibility_docs": null, + "is_form_component": false, + "is_published": true, + "requires_js": false, + "component": "OpenProject::DangerConfirmationDialog::FormWrapper", + "status": "open_project", + "a11y_reviewed": false, + "short_name": "OpenProjectDangerConfirmationDialogFormWrapper", + "source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/danger_confirmation_dialog/form_wrapper.rb", + "lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/danger_confirmation_dialog/form_wrapper/default/", + "parameters": [ + + ], + "slots": [ + + ], + "methods": [ + + ], + "previews": [ + + ], + "subcomponents": [ + + ] + }, { "fully_qualified_name": "Primer::OpenProject::DragHandle", "description": "Add a general description of component here\nAdd additional usage considerations or best practices that may aid the user to use the component correctly.", @@ -19057,6 +19367,6 @@ "component": "BaseComponent", "fully_qualified_name": "Primer::BaseComponent", "description_md": "All Primer ViewComponents accept a standard set of options called system arguments, mimicking the [styled-system API](https://styled-system.com/table) previously used by [Primer React](https://primer.style/guides/react/system-props).\n\nUnder the hood, system arguments are [mapped](https://github.com/primer/view_components/blob/main/lib/primer/classify.rb) to Primer CSS classes, with any remaining options passed to Rails' [`content_tag`](https://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-content_tag).\n\n## Responsive values\n\nTo apply different values across responsive breakpoints, pass an array with up to five values in the order `[default, small, medium, large, xlarge]`. To skip a breakpoint, pass `nil`.\n\nFor example:\n\n```erb\n<%= render Primer::Beta::Heading.new(mt: [0, nil, nil, 4, 2]) do %>\n Hello world\n<% end %>\n```\n\nRenders:\n\n```html\n

Hello world

\n```", - "args_md": "## HTML attributes\n\nUse system arguments to add HTML attributes to elements. For the most part, system arguments map 1:1 to\nHTML attributes. For example, `render(Component.new(title: \"Foo\"))` will result in eg. `
`.\nHowever, ViewComponents applies special handling to certain system arguments. See the table below for details.\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `aria` | `Hash` | Aria attributes: `aria: { label: \"foo\" }` renders `aria-label='foo'`. |\n| `data` | `Hash` | Data attributes: `data: { foo: :bar }` renders `data-foo='bar'`. |\n\n## Utility classes\n\nViewComponents provides a convenient way to add Primer CSS utility classes to HTML elements. Use the shorthand\ndocumented in the tables below instead of adding CSS classes directly.\n\n### Animation\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `animation` | Symbol | One of `:fade_down`, `:fade_in`, `:fade_out`, `:fade_up`, `:grow_x`, `:hover_grow`, `:pulse`, `:pulse_in`, `:rotate`, `:scale_in`, or `:shrink_x`. |\n\n### Border\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `border_bottom` | Integer | Set to `0` to remove the bottom border. |\n| `border_left` | Integer | Set to `0` to remove the left border. |\n| `border_radius` | Integer | One of `0`, `1`, `2`, or `3`. |\n| `border_right` | Integer | Set to `0` to remove the right border. |\n| `border_top` | Integer | Set to `0` to remove the top border. |\n| `border` | Symbol | One of `:bottom`, `:left`, `:right`, `:top`, `:x`, `:y`, or `true`. |\n| `box_shadow` | Boolean, Symbol | Box shadow. One of `:extra_large`, `:large`, `:medium`, `:none`, or `true`. |\n\n### Color\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `bg` | Symbol | Background color. One of `:accent`, `:accent_emphasis`, `:attention`, `:attention_emphasis`, `:closed`, `:closed_emphasis`, `:danger`, `:danger_emphasis`, `:default`, `:done`, `:done_emphasis`, `:emphasis`, `:inset`, `:open`, `:open_emphasis`, `:overlay`, `:severe`, `:severe_emphasis`, `:sponsors`, `:sponsors_emphasis`, `:subtle`, `:success`, `:success_emphasis`, or `:transparent`. |\n| `border_color` | Symbol | Border color. One of `:accent`, `:accent_emphasis`, `:attention`, `:attention_emphasis`, `:closed`, `:closed_emphasis`, `:danger`, `:danger_emphasis`, `:default`, `:done`, `:done_emphasis`, `:muted`, `:open`, `:open_emphasis`, `:severe`, `:severe_emphasis`, `:sponsors`, `:sponsors_emphasis`, `:subtle`, `:success`, or `:success_emphasis`. |\n| `color` | Symbol | Text color. One of `:accent`, `:attention`, `:closed`, `:danger`, `:default`, `:done`, `:inherit`, `:muted`, `:on_emphasis`, `:open`, `:severe`, `:sponsors`, `:subtle`, or `:success`. |\n\n### Flex\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `align_items` | Symbol | One of `:baseline`, `:center`, `:flex_end`, `:flex_start`, or `:stretch`. |\n| `align_self` | Symbol | One of `:auto`, `:baseline`, `:center`, `:end`, `:start`, or `:stretch`. |\n| `direction` | Symbol | One of `:column`, `:column_reverse`, `:row`, or `:row_reverse`. |\n| `flex` | Integer, Symbol | One of `1` or `:auto`. |\n| `flex_grow` | Integer | To enable, set to `0`. |\n| `flex_shrink` | Integer | To enable, set to `0`. |\n| `flex_wrap` | Symbol | One of `:nowrap`, `:reverse`, or `:wrap`. |\n| `justify_content` | Symbol | One of `:center`, `:flex_end`, `:flex_start`, `:space_around`, or `:space_between`. |\n\n### Grid\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `clearfix` | Boolean | Whether to assign the `clearfix` class. |\n| `col` | Integer | Number of columns. One of `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `container` | Symbol | Size of the container. One of `:lg`, `:md`, `:sm`, or `:xl`. |\n\n### Layout\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `display` | Symbol | One of `:block`, `:flex`, `:inline`, `:inline_block`, `:inline_flex`, `:none`, `:table`, or `:table_cell`. |\n| `w` | Symbol | Sets the element's width. One of `:auto`, `:fit`, or `:full`. |\n| `h` | Symbol | Sets the element's height. One of `:fit` or `:full`. |\n| `hide` | Symbol | Hide the element at a specific breakpoint. One of `:lg`, `:md`, `:sm`, `:whenNarrow`, `:whenRegular`, `:whenWide`, or `:xl`. |\n| `visibility` | Symbol | Visibility. One of `:hidden` or `:visible`. |\n| `vertical_align` | Symbol | One of `:baseline`, `:bottom`, `:middle`, `:text_bottom`, `:text_top`, or `:top`. |\n\n### Position\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `bottom` | Boolean | If `false`, sets `bottom: 0`. |\n| `float` | Symbol | One of `:left`, `:none`, or `:right`. |\n| `left` | Boolean | If `false`, sets `left: 0`. |\n| `position` | Symbol | One of `:absolute`, `:fixed`, `:relative`, `:static`, or `:sticky`. |\n| `right` | Boolean | If `false`, sets `right: 0`. |\n| `top` | Boolean | If `false`, sets `top: 0`. |\n\n### Spacing\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `m` | Integer | Margin. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mb` | Integer | Margin bottom. One of `-12`, `-11`, `-10`, `-9`, `-8`, `-7`, `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, or `:auto`. |\n| `ml` | Integer | Margin left. One of `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mr` | Integer | Margin right. One of `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mt` | Integer | Margin top. One of `-12`, `-11`, `-10`, `-9`, `-8`, `-7`, `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, or `:auto`. |\n| `mx` | Integer | Horizontal margins. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `my` | Integer | Vertical margins. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `p` | Integer | Padding. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:responsive`. |\n| `pb` | Integer | Padding bottom. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pl` | Integer | Padding left. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pr` | Integer | Padding right. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pt` | Integer | Padding top. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `px` | Integer | Horizontal padding. One of `0`, `1`, `2`, `3`, `4`, `5`, or `6`. |\n| `py` | Integer | Vertical padding. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n\n### Typography\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `font_family` | Symbol | Font family. One of `:mono`. |\n| `font_size` | String, Integer, Symbol | One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `00`, `:normal`, or `:small`. |\n| `font_style` | Symbol | Font style. One of `:italic`. |\n| `font_weight` | Symbol | Font weight. One of `:bold`, `:emphasized`, `:light`, or `:normal`. |\n| `text_align` | Symbol | Text alignment. One of `:center`, `:left`, or `:right`. |\n| `text_transform` | Symbol | Text transformation. One of `:capitalize` or `:uppercase`. |\n| `underline` | Boolean | Whether text should be underlined. |\n| `word_break` | Symbol | Whether to break words on line breaks. One of `:break_all` or `:break_word`. |\n\n### Other\n\n| Name | Type | Description |\n| :- | :- | :- |\n| classes | String | CSS class name value to be concatenated with generated Primer CSS classes. |\n| test_selector | String | Adds `data-test-selector='given value'` in non-Production environments for testing purposes. |" + "args_md": "## HTML attributes\n\nUse system arguments to add HTML attributes to elements. For the most part, system arguments map 1:1 to\nHTML attributes. For example, `render(Component.new(title: \"Foo\"))` will result in eg. `
`.\nHowever, ViewComponents applies special handling to certain system arguments. See the table below for details.\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `aria` | `Hash` | Aria attributes: `aria: { label: \"foo\" }` renders `aria-label='foo'`. |\n| `data` | `Hash` | Data attributes: `data: { foo: :bar }` renders `data-foo='bar'`. |\n\n## Utility classes\n\nViewComponents provides a convenient way to add Primer CSS utility classes to HTML elements. Use the shorthand\ndocumented in the tables below instead of adding CSS classes directly.\n\n### Animation\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `animation` | Symbol | One of `:fade_down`, `:fade_in`, `:fade_out`, `:fade_up`, `:grow_x`, `:hover_grow`, `:pulse`, `:pulse_in`, `:rotate`, `:scale_in`, or `:shrink_x`. |\n\n### Border\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `border_bottom` | Integer | Set to `0` to remove the bottom border. |\n| `border_left` | Integer | Set to `0` to remove the left border. |\n| `border_radius` | Integer | One of `0`, `1`, `2`, or `3`. |\n| `border_right` | Integer | Set to `0` to remove the right border. |\n| `border_top` | Integer | Set to `0` to remove the top border. |\n| `border` | Symbol | One of `:bottom`, `:left`, `:right`, `:top`, `:x`, `:y`, or `true`. |\n| `box_shadow` | Boolean, Symbol | Box shadow. One of `:extra_large`, `:large`, `:medium`, `:none`, or `true`. |\n\n### Color\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `bg` | Symbol | Background color. One of `:accent`, `:accent_emphasis`, `:attention`, `:attention_emphasis`, `:closed`, `:closed_emphasis`, `:danger`, `:danger_emphasis`, `:default`, `:done`, `:done_emphasis`, `:emphasis`, `:inset`, `:open`, `:open_emphasis`, `:overlay`, `:severe`, `:severe_emphasis`, `:sponsors`, `:sponsors_emphasis`, `:subtle`, `:success`, `:success_emphasis`, or `:transparent`. |\n| `border_color` | Symbol | Border color. One of `:accent`, `:accent_emphasis`, `:attention`, `:attention_emphasis`, `:closed`, `:closed_emphasis`, `:danger`, `:danger_emphasis`, `:default`, `:done`, `:done_emphasis`, `:muted`, `:open`, `:open_emphasis`, `:severe`, `:severe_emphasis`, `:sponsors`, `:sponsors_emphasis`, `:subtle`, `:success`, or `:success_emphasis`. |\n| `color` | Symbol | Text color. One of `:accent`, `:attention`, `:closed`, `:danger`, `:default`, `:done`, `:inherit`, `:muted`, `:on_emphasis`, `:open`, `:severe`, `:sponsors`, `:subtle`, or `:success`. |\n\n### Flex\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `align_items` | Symbol | One of `:baseline`, `:center`, `:flex_end`, `:flex_start`, or `:stretch`. |\n| `align_self` | Symbol | One of `:auto`, `:baseline`, `:center`, `:end`, `:start`, or `:stretch`. |\n| `direction` | Symbol | One of `:column`, `:column_reverse`, `:row`, or `:row_reverse`. |\n| `flex` | Integer, Symbol | One of `1` or `:auto`. |\n| `flex_grow` | Integer | To enable, set to `0`. |\n| `flex_shrink` | Integer | To enable, set to `0`. |\n| `flex_wrap` | Symbol | One of `:nowrap`, `:reverse`, or `:wrap`. |\n| `justify_content` | Symbol | One of `:center`, `:flex_end`, `:flex_start`, `:space_around`, or `:space_between`. |\n\n### Grid\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `clearfix` | Boolean | Whether to assign the `clearfix` class. |\n| `col` | Integer | Number of columns. One of `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `container` | Symbol | Size of the container. One of `:lg`, `:md`, `:sm`, or `:xl`. |\n\n### Layout\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `display` | Symbol | One of `:block`, `:flex`, `:inline`, `:inline_block`, `:inline_flex`, `:none`, `:table`, or `:table_cell`. |\n| `w` | Symbol | Sets the element's width. One of `:auto`, `:fit`, or `:full`. |\n| `h` | Symbol | Sets the element's height. One of `:fit` or `:full`. |\n| `hide` | Symbol | Hide the element at a specific breakpoint. One of `:lg`, `:md`, `:sm`, `:whenNarrow`, `:whenRegular`, `:whenWide`, or `:xl`. |\n| `visibility` | Symbol | Visibility. One of `:hidden` or `:visible`. |\n| `vertical_align` | Symbol | One of `:baseline`, `:bottom`, `:middle`, `:text_bottom`, `:text_top`, or `:top`. |\n\n### Position\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `bottom` | Boolean | If `false`, sets `bottom: 0`. |\n| `float` | Symbol | One of `:left`, `:none`, or `:right`. |\n| `left` | Boolean | If `false`, sets `left: 0`. |\n| `position` | Symbol | One of `:absolute`, `:fixed`, `:relative`, `:static`, or `:sticky`. |\n| `right` | Boolean | If `false`, sets `right: 0`. |\n| `top` | Boolean | If `false`, sets `top: 0`. |\n\n### Spacing\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `m` | Integer | Margin. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mb` | Integer | Margin bottom. One of `-12`, `-11`, `-10`, `-9`, `-8`, `-7`, `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, or `:auto`. |\n| `ml` | Integer | Margin left. One of `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mr` | Integer | Margin right. One of `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `mt` | Integer | Margin top. One of `-12`, `-11`, `-10`, `-9`, `-8`, `-7`, `-6`, `-5`, `-4`, `-3`, `-2`, `-1`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, or `:auto`. |\n| `mx` | Integer | Horizontal margins. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:auto`. |\n| `my` | Integer | Vertical margins. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `p` | Integer | Padding. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, or `:responsive`. |\n| `pb` | Integer | Padding bottom. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pl` | Integer | Padding left. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pr` | Integer | Padding right. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `pt` | Integer | Padding top. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n| `px` | Integer | Horizontal padding. One of `0`, `1`, `2`, `3`, `4`, `5`, or `6`. |\n| `py` | Integer | Vertical padding. One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, or `12`. |\n\n### Typography\n\n| Name | Type | Description |\n| :- | :- | :- |\n| `font_family` | Symbol | Font family. One of `:mono`. |\n| `font_size` | String, Integer, Symbol | One of `0`, `1`, `2`, `3`, `4`, `5`, `6`, `00`, `:normal`, or `:small`. |\n| `font_style` | Symbol | Font style. One of `:italic`. |\n| `font_weight` | Symbol | Font weight. One of `:bold`, `:emphasized`, `:light`, or `:normal`. |\n| `text_align` | Symbol | Text alignment. One of `:center`, `:left`, or `:right`. |\n| `text_transform` | Symbol | Text transformation. One of `:capitalize` or `:uppercase`. |\n| `underline` | Boolean | Whether text should be underlined. |\n| `word_break` | Symbol | Whether to break words on line breaks. One of `:break_all` or `:break_word`. |\n\n### Other\n\n| Name | Type | Description |\n| :- | :- | :- |\n| classes | String | CSS class name value to be concatenated with generated Primer CSS classes. |\n| test_selector | String | Adds `data-test-selector='given value'` in non-Production environments for testing purposes. |\n| trim | Boolean | Calls `strip` on the content to remove trailing and leading white spaces. |" } ] diff --git a/static/previews.json b/static/previews.json index 2e65785c39..45e6f534d2 100644 --- a/static/previews.json +++ b/static/previews.json @@ -3108,6 +3108,92 @@ } ] }, + { + "name": "danger_confirmation_dialog", + "component": "OpenProject::DangerConfirmationDialog", + "status": "open_project", + "lookup_path": "primer/open_project/danger_confirmation_dialog", + "examples": [ + { + "preview_path": "primer/open_project/danger_confirmation_dialog/default", + "name": "default", + "snapshot": "interactive", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/danger_confirmation_dialog/playground", + "name": "playground", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/danger_confirmation_dialog/with_form_builder_form", + "name": "with_form_builder_form", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/danger_confirmation_dialog/with_form", + "name": "with_form", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/danger_confirmation_dialog/with_additional_details", + "name": "with_additional_details", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/open_project/danger_confirmation_dialog/custom_icon", + "name": "custom_icon", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + } + ] + }, { "name": "details", "component": "Details", @@ -5017,6 +5103,32 @@ "color-contrast" ] } + }, + { + "preview_path": "primer/beta/link/with_leading_icon", + "name": "with_leading_icon", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } + }, + { + "preview_path": "primer/beta/link/with_trailing_icon", + "name": "with_trailing_icon", + "snapshot": "false", + "skip_rules": { + "wont_fix": [ + "region" + ], + "will_fix": [ + "color-contrast" + ] + } } ] }, diff --git a/static/statuses.json b/static/statuses.json index c7cd75ac85..d073d56db9 100644 --- a/static/statuses.json +++ b/static/statuses.json @@ -118,6 +118,9 @@ "Primer::Navigation::TabComponent": "deprecated", "Primer::OpenProject::BorderGrid": "open_project", "Primer::OpenProject::BorderGrid::Cell": "open_project", + "Primer::OpenProject::DangerConfirmationDialog": "open_project", + "Primer::OpenProject::DangerConfirmationDialog::ConfirmationCheckBox": "open_project", + "Primer::OpenProject::DangerConfirmationDialog::FormWrapper": "open_project", "Primer::OpenProject::DragHandle": "open_project", "Primer::OpenProject::FeedbackDialog": "open_project", "Primer::OpenProject::FeedbackMessage": "open_project",