openproject-primer_view_components 0.52.0 → 0.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/assets/styles/primer_view_components.css +1 -1
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/action_list/divider.rb +4 -0
- data/app/components/primer/alpha/dialog.css +1 -1
- data/app/components/primer/alpha/dialog.css.json +0 -1
- data/app/components/primer/alpha/dialog.css.map +1 -1
- data/app/components/primer/alpha/dialog.pcss +0 -5
- data/app/components/primer/open_project/danger_confirmation_dialog/confirmation_check_box.rb +1 -0
- data/app/components/primer/open_project/danger_confirmation_dialog/form_wrapper.rb +2 -0
- data/app/components/primer/open_project/danger_confirmation_dialog.html.erb +1 -1
- data/app/components/primer/open_project/danger_confirmation_dialog.rb +8 -8
- data/app/components/primer/open_project/feedback_dialog.rb +6 -4
- data/lib/primer/view_components/version.rb +1 -1
- data/static/arguments.json +67 -0
- data/static/audited_at.json +3 -0
- data/static/constants.json +11 -0
- data/static/form_previews.json +5 -0
- data/static/info_arch.json +301 -15
- data/static/previews.json +112 -0
- data/static/statuses.json +3 -0
- metadata +2 -2
data/static/info_arch.json
CHANGED
@@ -14217,6 +14217,30 @@
|
|
14217
14217
|
"description": "Same arguments as {{#link_to_component}}Primer::Alpha::Tooltip{{/link_to_component}}."
|
14218
14218
|
}
|
14219
14219
|
]
|
14220
|
+
},
|
14221
|
+
{
|
14222
|
+
"name": "leading_visual",
|
14223
|
+
"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}}.",
|
14224
|
+
"parameters": [
|
14225
|
+
{
|
14226
|
+
"name": "system_arguments",
|
14227
|
+
"type": "Hash",
|
14228
|
+
"default": "N/A",
|
14229
|
+
"description": "Same arguments as {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}."
|
14230
|
+
}
|
14231
|
+
]
|
14232
|
+
},
|
14233
|
+
{
|
14234
|
+
"name": "trailing_visual",
|
14235
|
+
"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}}.",
|
14236
|
+
"parameters": [
|
14237
|
+
{
|
14238
|
+
"name": "system_arguments",
|
14239
|
+
"type": "Hash",
|
14240
|
+
"default": "N/A",
|
14241
|
+
"description": "Same arguments as {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}."
|
14242
|
+
}
|
14243
|
+
]
|
14220
14244
|
}
|
14221
14245
|
],
|
14222
14246
|
"methods": [
|
@@ -14326,6 +14350,32 @@
|
|
14326
14350
|
"color-contrast"
|
14327
14351
|
]
|
14328
14352
|
}
|
14353
|
+
},
|
14354
|
+
{
|
14355
|
+
"preview_path": "primer/beta/link/with_leading_icon",
|
14356
|
+
"name": "with_leading_icon",
|
14357
|
+
"snapshot": "false",
|
14358
|
+
"skip_rules": {
|
14359
|
+
"wont_fix": [
|
14360
|
+
"region"
|
14361
|
+
],
|
14362
|
+
"will_fix": [
|
14363
|
+
"color-contrast"
|
14364
|
+
]
|
14365
|
+
}
|
14366
|
+
},
|
14367
|
+
{
|
14368
|
+
"preview_path": "primer/beta/link/with_trailing_icon",
|
14369
|
+
"name": "with_trailing_icon",
|
14370
|
+
"snapshot": "false",
|
14371
|
+
"skip_rules": {
|
14372
|
+
"wont_fix": [
|
14373
|
+
"region"
|
14374
|
+
],
|
14375
|
+
"will_fix": [
|
14376
|
+
"color-contrast"
|
14377
|
+
]
|
14378
|
+
}
|
14329
14379
|
}
|
14330
14380
|
],
|
14331
14381
|
"subcomponents": [
|
@@ -17385,6 +17435,254 @@
|
|
17385
17435
|
|
17386
17436
|
]
|
17387
17437
|
},
|
17438
|
+
{
|
17439
|
+
"fully_qualified_name": "Primer::OpenProject::DangerConfirmationDialog",
|
17440
|
+
"description": "A pre-configured dialog for destructive/\"potentially dangerous\" actions",
|
17441
|
+
"accessibility_docs": null,
|
17442
|
+
"is_form_component": false,
|
17443
|
+
"is_published": true,
|
17444
|
+
"requires_js": false,
|
17445
|
+
"component": "OpenProject::DangerConfirmationDialog",
|
17446
|
+
"status": "open_project",
|
17447
|
+
"a11y_reviewed": false,
|
17448
|
+
"short_name": "OpenProjectDangerConfirmationDialog",
|
17449
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/danger_confirmation_dialog.rb",
|
17450
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/danger_confirmation_dialog/default/",
|
17451
|
+
"parameters": [
|
17452
|
+
{
|
17453
|
+
"name": "form_arguments",
|
17454
|
+
"type": "Hash",
|
17455
|
+
"default": "`{}`",
|
17456
|
+
"description": "Allows the dialog to submit a form. Pass EITHER the `builder:` option to this hash to reuse an existing Rails form, or `action:` if you prefer the component to render the form tag itself. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which is created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission."
|
17457
|
+
},
|
17458
|
+
{
|
17459
|
+
"name": "id",
|
17460
|
+
"type": "String",
|
17461
|
+
"default": "`self.class.generate_id`",
|
17462
|
+
"description": "The id of the dialog."
|
17463
|
+
},
|
17464
|
+
{
|
17465
|
+
"name": "system_arguments",
|
17466
|
+
"type": "Hash",
|
17467
|
+
"default": "N/A",
|
17468
|
+
"description": "{{link_to_system_arguments_docs}}"
|
17469
|
+
}
|
17470
|
+
],
|
17471
|
+
"slots": [
|
17472
|
+
{
|
17473
|
+
"name": "confirmation_message",
|
17474
|
+
"description": "A confirmation message with some defaults that are necessary for rendering nicely.\n\nTo render the message heading (required), call the `with_heading` method, which accepts a `:tag` argument, along with the arguments accepted by {{#link_to_component}}Primer::Beta::Heading{{/link_to_component}}.\n\nTo render the message description, call the `with_description` method, which accepts {{link_to_system_arguments_docs}}",
|
17475
|
+
"parameters": [
|
17476
|
+
{
|
17477
|
+
"name": "icon_arguments",
|
17478
|
+
"type": "Hash",
|
17479
|
+
"default": "N/A",
|
17480
|
+
"description": "the system_arguments for the icon"
|
17481
|
+
},
|
17482
|
+
{
|
17483
|
+
"name": "system_arguments",
|
17484
|
+
"type": "Hash",
|
17485
|
+
"default": "N/A",
|
17486
|
+
"description": "{{link_to_system_arguments_docs}}"
|
17487
|
+
}
|
17488
|
+
]
|
17489
|
+
},
|
17490
|
+
{
|
17491
|
+
"name": "confirmation_check_box",
|
17492
|
+
"description": "A checkbox that the user is required to check in order to continue with the destructive action.\n\nTo render the checkbox label (required), pass a block that returns a String.",
|
17493
|
+
"parameters": [
|
17494
|
+
{
|
17495
|
+
"name": "system_arguments",
|
17496
|
+
"type": "Hash",
|
17497
|
+
"default": "N/A",
|
17498
|
+
"description": "{{link_to_system_arguments_docs}}"
|
17499
|
+
}
|
17500
|
+
]
|
17501
|
+
},
|
17502
|
+
{
|
17503
|
+
"name": "additional_details",
|
17504
|
+
"description": "Optional additional details, such as grid displaying a list of items to be deleted",
|
17505
|
+
"parameters": [
|
17506
|
+
{
|
17507
|
+
"name": "system_arguments",
|
17508
|
+
"type": "Hash",
|
17509
|
+
"default": "N/A",
|
17510
|
+
"description": "{{link_to_system_arguments_docs}}"
|
17511
|
+
}
|
17512
|
+
]
|
17513
|
+
}
|
17514
|
+
],
|
17515
|
+
"methods": [
|
17516
|
+
{
|
17517
|
+
"name": "dialog_id",
|
17518
|
+
"description": "The dialog's ID value.",
|
17519
|
+
"parameters": [
|
17520
|
+
|
17521
|
+
],
|
17522
|
+
"return_types": [
|
17523
|
+
|
17524
|
+
]
|
17525
|
+
}
|
17526
|
+
],
|
17527
|
+
"previews": [
|
17528
|
+
{
|
17529
|
+
"preview_path": "primer/open_project/danger_confirmation_dialog/default",
|
17530
|
+
"name": "default",
|
17531
|
+
"snapshot": "interactive",
|
17532
|
+
"skip_rules": {
|
17533
|
+
"wont_fix": [
|
17534
|
+
"region"
|
17535
|
+
],
|
17536
|
+
"will_fix": [
|
17537
|
+
"color-contrast"
|
17538
|
+
]
|
17539
|
+
}
|
17540
|
+
},
|
17541
|
+
{
|
17542
|
+
"preview_path": "primer/open_project/danger_confirmation_dialog/playground",
|
17543
|
+
"name": "playground",
|
17544
|
+
"snapshot": "false",
|
17545
|
+
"skip_rules": {
|
17546
|
+
"wont_fix": [
|
17547
|
+
"region"
|
17548
|
+
],
|
17549
|
+
"will_fix": [
|
17550
|
+
"color-contrast"
|
17551
|
+
]
|
17552
|
+
}
|
17553
|
+
},
|
17554
|
+
{
|
17555
|
+
"preview_path": "primer/open_project/danger_confirmation_dialog/with_form_builder_form",
|
17556
|
+
"name": "with_form_builder_form",
|
17557
|
+
"snapshot": "false",
|
17558
|
+
"skip_rules": {
|
17559
|
+
"wont_fix": [
|
17560
|
+
"region"
|
17561
|
+
],
|
17562
|
+
"will_fix": [
|
17563
|
+
"color-contrast"
|
17564
|
+
]
|
17565
|
+
}
|
17566
|
+
},
|
17567
|
+
{
|
17568
|
+
"preview_path": "primer/open_project/danger_confirmation_dialog/with_form",
|
17569
|
+
"name": "with_form",
|
17570
|
+
"snapshot": "false",
|
17571
|
+
"skip_rules": {
|
17572
|
+
"wont_fix": [
|
17573
|
+
"region"
|
17574
|
+
],
|
17575
|
+
"will_fix": [
|
17576
|
+
"color-contrast"
|
17577
|
+
]
|
17578
|
+
}
|
17579
|
+
},
|
17580
|
+
{
|
17581
|
+
"preview_path": "primer/open_project/danger_confirmation_dialog/with_additional_details",
|
17582
|
+
"name": "with_additional_details",
|
17583
|
+
"snapshot": "false",
|
17584
|
+
"skip_rules": {
|
17585
|
+
"wont_fix": [
|
17586
|
+
"region"
|
17587
|
+
],
|
17588
|
+
"will_fix": [
|
17589
|
+
"color-contrast"
|
17590
|
+
]
|
17591
|
+
}
|
17592
|
+
},
|
17593
|
+
{
|
17594
|
+
"preview_path": "primer/open_project/danger_confirmation_dialog/custom_icon",
|
17595
|
+
"name": "custom_icon",
|
17596
|
+
"snapshot": "false",
|
17597
|
+
"skip_rules": {
|
17598
|
+
"wont_fix": [
|
17599
|
+
"region"
|
17600
|
+
],
|
17601
|
+
"will_fix": [
|
17602
|
+
"color-contrast"
|
17603
|
+
]
|
17604
|
+
}
|
17605
|
+
}
|
17606
|
+
],
|
17607
|
+
"subcomponents": [
|
17608
|
+
|
17609
|
+
]
|
17610
|
+
},
|
17611
|
+
{
|
17612
|
+
"fully_qualified_name": "Primer::OpenProject::DangerConfirmationDialog::ConfirmationCheckBox",
|
17613
|
+
"description": "This component is part of `Primer::OpenProject::DangerConfirmationDialog`\nand should not be used as a standalone component.",
|
17614
|
+
"accessibility_docs": null,
|
17615
|
+
"is_form_component": false,
|
17616
|
+
"is_published": true,
|
17617
|
+
"requires_js": false,
|
17618
|
+
"component": "OpenProject::DangerConfirmationDialog::ConfirmationCheckBox",
|
17619
|
+
"status": "open_project",
|
17620
|
+
"a11y_reviewed": false,
|
17621
|
+
"short_name": "OpenProjectDangerConfirmationDialogConfirmationCheckBox",
|
17622
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/danger_confirmation_dialog/confirmation_check_box.rb",
|
17623
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/danger_confirmation_dialog/confirmation_check_box/default/",
|
17624
|
+
"parameters": [
|
17625
|
+
{
|
17626
|
+
"name": "check_box_id",
|
17627
|
+
"type": "String",
|
17628
|
+
"default": "`self.class.generate_id`",
|
17629
|
+
"description": "The id of the check_box input."
|
17630
|
+
},
|
17631
|
+
{
|
17632
|
+
"name": "check_box_name",
|
17633
|
+
"type": "String",
|
17634
|
+
"default": "N/A",
|
17635
|
+
"description": "The name of the check_box input."
|
17636
|
+
},
|
17637
|
+
{
|
17638
|
+
"name": "system_arguments",
|
17639
|
+
"type": "Hash",
|
17640
|
+
"default": "N/A",
|
17641
|
+
"description": "{{link_to_system_arguments_docs}}"
|
17642
|
+
}
|
17643
|
+
],
|
17644
|
+
"slots": [
|
17645
|
+
|
17646
|
+
],
|
17647
|
+
"methods": [
|
17648
|
+
|
17649
|
+
],
|
17650
|
+
"previews": [
|
17651
|
+
|
17652
|
+
],
|
17653
|
+
"subcomponents": [
|
17654
|
+
|
17655
|
+
]
|
17656
|
+
},
|
17657
|
+
{
|
17658
|
+
"fully_qualified_name": "Primer::OpenProject::DangerConfirmationDialog::FormWrapper",
|
17659
|
+
"description": "Utility component for wrapping DangerConfirmationDialog in a form",
|
17660
|
+
"accessibility_docs": null,
|
17661
|
+
"is_form_component": false,
|
17662
|
+
"is_published": true,
|
17663
|
+
"requires_js": false,
|
17664
|
+
"component": "OpenProject::DangerConfirmationDialog::FormWrapper",
|
17665
|
+
"status": "open_project",
|
17666
|
+
"a11y_reviewed": false,
|
17667
|
+
"short_name": "OpenProjectDangerConfirmationDialogFormWrapper",
|
17668
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/open_project/danger_confirmation_dialog/form_wrapper.rb",
|
17669
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/open_project/danger_confirmation_dialog/form_wrapper/default/",
|
17670
|
+
"parameters": [
|
17671
|
+
|
17672
|
+
],
|
17673
|
+
"slots": [
|
17674
|
+
|
17675
|
+
],
|
17676
|
+
"methods": [
|
17677
|
+
|
17678
|
+
],
|
17679
|
+
"previews": [
|
17680
|
+
|
17681
|
+
],
|
17682
|
+
"subcomponents": [
|
17683
|
+
|
17684
|
+
]
|
17685
|
+
},
|
17388
17686
|
{
|
17389
17687
|
"fully_qualified_name": "Primer::OpenProject::DragHandle",
|
17390
17688
|
"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.",
|
@@ -17468,20 +17766,8 @@
|
|
17468
17766
|
"slots": [
|
17469
17767
|
{
|
17470
17768
|
"name": "feedback_message",
|
17471
|
-
"description": "A feedback message with some defaults that are necessary for rendering nicely",
|
17769
|
+
"description": "A feedback message with some defaults that are necessary for rendering nicely.\n\nTo render the message heading (required), call the `with_heading` method, which accepts a `:tag` argument, along with the arguments accepted by {{#link_to_component}}Primer::Beta::Heading{{/link_to_component}}.\n\nTo render the message description, call the `with_description` method, which accepts {{link_to_system_arguments_docs}}",
|
17472
17770
|
"parameters": [
|
17473
|
-
{
|
17474
|
-
"name": "heading",
|
17475
|
-
"type": "String",
|
17476
|
-
"default": "N/A",
|
17477
|
-
"description": "the heading for the success message"
|
17478
|
-
},
|
17479
|
-
{
|
17480
|
-
"name": "description",
|
17481
|
-
"type": "String",
|
17482
|
-
"default": "N/A",
|
17483
|
-
"description": "the description for the success message"
|
17484
|
-
},
|
17485
17771
|
{
|
17486
17772
|
"name": "icon_arguments",
|
17487
17773
|
"type": "Hash",
|
@@ -17498,7 +17784,7 @@
|
|
17498
17784
|
},
|
17499
17785
|
{
|
17500
17786
|
"name": "additional_details",
|
17501
|
-
"description": "Optional
|
17787
|
+
"description": "Optional additional details, like a form input or toast.",
|
17502
17788
|
"parameters": [
|
17503
17789
|
{
|
17504
17790
|
"name": "system_arguments",
|
@@ -19057,6 +19343,6 @@
|
|
19057
19343
|
"component": "BaseComponent",
|
19058
19344
|
"fully_qualified_name": "Primer::BaseComponent",
|
19059
19345
|
"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<h1 class=\"mt-0 mt-lg-4 mt-xl-2\">Hello world</h1>\n```",
|
19060
|
-
"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. `<div title=\"foo\">`.\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. |"
|
19346
|
+
"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. `<div title=\"foo\">`.\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. |"
|
19061
19347
|
}
|
19062
19348
|
]
|
data/static/previews.json
CHANGED
@@ -3108,6 +3108,92 @@
|
|
3108
3108
|
}
|
3109
3109
|
]
|
3110
3110
|
},
|
3111
|
+
{
|
3112
|
+
"name": "danger_confirmation_dialog",
|
3113
|
+
"component": "OpenProject::DangerConfirmationDialog",
|
3114
|
+
"status": "open_project",
|
3115
|
+
"lookup_path": "primer/open_project/danger_confirmation_dialog",
|
3116
|
+
"examples": [
|
3117
|
+
{
|
3118
|
+
"preview_path": "primer/open_project/danger_confirmation_dialog/default",
|
3119
|
+
"name": "default",
|
3120
|
+
"snapshot": "interactive",
|
3121
|
+
"skip_rules": {
|
3122
|
+
"wont_fix": [
|
3123
|
+
"region"
|
3124
|
+
],
|
3125
|
+
"will_fix": [
|
3126
|
+
"color-contrast"
|
3127
|
+
]
|
3128
|
+
}
|
3129
|
+
},
|
3130
|
+
{
|
3131
|
+
"preview_path": "primer/open_project/danger_confirmation_dialog/playground",
|
3132
|
+
"name": "playground",
|
3133
|
+
"snapshot": "false",
|
3134
|
+
"skip_rules": {
|
3135
|
+
"wont_fix": [
|
3136
|
+
"region"
|
3137
|
+
],
|
3138
|
+
"will_fix": [
|
3139
|
+
"color-contrast"
|
3140
|
+
]
|
3141
|
+
}
|
3142
|
+
},
|
3143
|
+
{
|
3144
|
+
"preview_path": "primer/open_project/danger_confirmation_dialog/with_form_builder_form",
|
3145
|
+
"name": "with_form_builder_form",
|
3146
|
+
"snapshot": "false",
|
3147
|
+
"skip_rules": {
|
3148
|
+
"wont_fix": [
|
3149
|
+
"region"
|
3150
|
+
],
|
3151
|
+
"will_fix": [
|
3152
|
+
"color-contrast"
|
3153
|
+
]
|
3154
|
+
}
|
3155
|
+
},
|
3156
|
+
{
|
3157
|
+
"preview_path": "primer/open_project/danger_confirmation_dialog/with_form",
|
3158
|
+
"name": "with_form",
|
3159
|
+
"snapshot": "false",
|
3160
|
+
"skip_rules": {
|
3161
|
+
"wont_fix": [
|
3162
|
+
"region"
|
3163
|
+
],
|
3164
|
+
"will_fix": [
|
3165
|
+
"color-contrast"
|
3166
|
+
]
|
3167
|
+
}
|
3168
|
+
},
|
3169
|
+
{
|
3170
|
+
"preview_path": "primer/open_project/danger_confirmation_dialog/with_additional_details",
|
3171
|
+
"name": "with_additional_details",
|
3172
|
+
"snapshot": "false",
|
3173
|
+
"skip_rules": {
|
3174
|
+
"wont_fix": [
|
3175
|
+
"region"
|
3176
|
+
],
|
3177
|
+
"will_fix": [
|
3178
|
+
"color-contrast"
|
3179
|
+
]
|
3180
|
+
}
|
3181
|
+
},
|
3182
|
+
{
|
3183
|
+
"preview_path": "primer/open_project/danger_confirmation_dialog/custom_icon",
|
3184
|
+
"name": "custom_icon",
|
3185
|
+
"snapshot": "false",
|
3186
|
+
"skip_rules": {
|
3187
|
+
"wont_fix": [
|
3188
|
+
"region"
|
3189
|
+
],
|
3190
|
+
"will_fix": [
|
3191
|
+
"color-contrast"
|
3192
|
+
]
|
3193
|
+
}
|
3194
|
+
}
|
3195
|
+
]
|
3196
|
+
},
|
3111
3197
|
{
|
3112
3198
|
"name": "details",
|
3113
3199
|
"component": "Details",
|
@@ -5017,6 +5103,32 @@
|
|
5017
5103
|
"color-contrast"
|
5018
5104
|
]
|
5019
5105
|
}
|
5106
|
+
},
|
5107
|
+
{
|
5108
|
+
"preview_path": "primer/beta/link/with_leading_icon",
|
5109
|
+
"name": "with_leading_icon",
|
5110
|
+
"snapshot": "false",
|
5111
|
+
"skip_rules": {
|
5112
|
+
"wont_fix": [
|
5113
|
+
"region"
|
5114
|
+
],
|
5115
|
+
"will_fix": [
|
5116
|
+
"color-contrast"
|
5117
|
+
]
|
5118
|
+
}
|
5119
|
+
},
|
5120
|
+
{
|
5121
|
+
"preview_path": "primer/beta/link/with_trailing_icon",
|
5122
|
+
"name": "with_trailing_icon",
|
5123
|
+
"snapshot": "false",
|
5124
|
+
"skip_rules": {
|
5125
|
+
"wont_fix": [
|
5126
|
+
"region"
|
5127
|
+
],
|
5128
|
+
"will_fix": [
|
5129
|
+
"color-contrast"
|
5130
|
+
]
|
5131
|
+
}
|
5020
5132
|
}
|
5021
5133
|
]
|
5022
5134
|
},
|
data/static/statuses.json
CHANGED
@@ -118,6 +118,9 @@
|
|
118
118
|
"Primer::Navigation::TabComponent": "deprecated",
|
119
119
|
"Primer::OpenProject::BorderGrid": "open_project",
|
120
120
|
"Primer::OpenProject::BorderGrid::Cell": "open_project",
|
121
|
+
"Primer::OpenProject::DangerConfirmationDialog": "open_project",
|
122
|
+
"Primer::OpenProject::DangerConfirmationDialog::ConfirmationCheckBox": "open_project",
|
123
|
+
"Primer::OpenProject::DangerConfirmationDialog::FormWrapper": "open_project",
|
121
124
|
"Primer::OpenProject::DragHandle": "open_project",
|
122
125
|
"Primer::OpenProject::FeedbackDialog": "open_project",
|
123
126
|
"Primer::OpenProject::FeedbackMessage": "open_project",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openproject-primer_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.52.
|
4
|
+
version: 0.52.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub Open Source
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-01-
|
12
|
+
date: 2025-01-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionview
|