openproject-primer_view_components 0.50.1 → 0.51.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/app/assets/javascripts/components/primer/alpha/action_menu/action_menu_element.d.ts +2 -0
  4. data/app/assets/javascripts/components/primer/open_project/danger_confirmation_dialog_form_helper.d.ts +13 -0
  5. data/app/assets/javascripts/components/primer/primer.d.ts +2 -0
  6. data/app/assets/javascripts/components/primer/utils.d.ts +1 -0
  7. data/app/assets/javascripts/primer_view_components.js +1 -1
  8. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  9. data/app/assets/styles/primer_view_components.css +1 -1
  10. data/app/assets/styles/primer_view_components.css.map +1 -1
  11. data/app/components/primer/alpha/action_list/item.html.erb +1 -4
  12. data/app/components/primer/alpha/action_list.css +1 -1
  13. data/app/components/primer/alpha/action_list.css.json +2 -6
  14. data/app/components/primer/alpha/action_list.css.map +1 -1
  15. data/app/components/primer/alpha/action_list.pcss +10 -43
  16. data/app/components/primer/alpha/action_menu/action_menu_element.d.ts +2 -0
  17. data/app/components/primer/alpha/action_menu/action_menu_element.js +31 -1
  18. data/app/components/primer/alpha/action_menu/action_menu_element.ts +37 -0
  19. data/app/components/primer/alpha/action_menu.rb +6 -0
  20. data/app/components/primer/alpha/select_panel_element.js +6 -19
  21. data/app/components/primer/alpha/select_panel_element.ts +9 -21
  22. data/app/components/primer/alpha/text_field.css +1 -1
  23. data/app/components/primer/alpha/text_field.css.json +30 -30
  24. data/app/components/primer/alpha/text_field.css.map +1 -1
  25. data/app/components/primer/alpha/text_field.pcss +2 -3
  26. data/app/components/primer/open_project/danger_confirmation_dialog/confirmation_check_box.rb +44 -0
  27. data/app/components/primer/open_project/danger_confirmation_dialog/form_wrapper.html.erb +7 -0
  28. data/app/components/primer/open_project/danger_confirmation_dialog/form_wrapper.rb +26 -0
  29. data/app/components/primer/open_project/danger_confirmation_dialog.html.erb +19 -0
  30. data/app/components/primer/open_project/danger_confirmation_dialog.rb +104 -0
  31. data/app/components/primer/open_project/danger_confirmation_dialog_form_helper.d.ts +13 -0
  32. data/app/components/primer/open_project/danger_confirmation_dialog_form_helper.js +44 -0
  33. data/app/components/primer/open_project/danger_confirmation_dialog_form_helper.ts +36 -0
  34. data/app/components/primer/primer.d.ts +2 -0
  35. data/app/components/primer/primer.js +2 -0
  36. data/app/components/primer/primer.ts +2 -0
  37. data/app/components/primer/utils.d.ts +1 -0
  38. data/app/components/primer/utils.js +16 -0
  39. data/app/components/primer/utils.ts +16 -0
  40. data/app/lib/primer/forms/acts_as_component.rb +9 -2
  41. data/app/lib/primer/forms/base.rb +0 -5
  42. data/app/lib/primer/forms/base_component.rb +5 -3
  43. data/app/lib/primer/forms/radio_button_group.html.erb +1 -1
  44. data/app/lib/primer/forms/utils.rb +16 -1
  45. data/lib/primer/view_components/version.rb +2 -2
  46. data/previews/primer/alpha/action_menu_preview/in_scroll_container.html.erb +3 -5
  47. data/previews/primer/open_project/danger_confirmation_dialog_preview/playground.html.erb +13 -0
  48. data/previews/primer/open_project/danger_confirmation_dialog_preview/with_additional_details.html.erb +40 -0
  49. data/previews/primer/open_project/danger_confirmation_dialog_preview/with_form.html.erb +11 -0
  50. data/previews/primer/open_project/danger_confirmation_dialog_preview/with_form_builder_form.html.erb +13 -0
  51. data/previews/primer/open_project/danger_confirmation_dialog_preview.rb +71 -0
  52. data/static/classes.json +6 -0
  53. metadata +28 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee0c706f13dfedc8047f4183c4cb5570b6e05c0ad72592380d0298609b3474bd
4
- data.tar.gz: 34c75cb39e5436abd05757aee46f36c0e570e3ef5a33037a239b5e93dc2ef8e3
3
+ metadata.gz: 29f2e2c298d265746a0e011f41ba5bc2c03cfcd416dc2a056bf1613546422d6e
4
+ data.tar.gz: 8d95c5b9b1001e11b446eb051278bbf65950df8be0bfd98ca5a72213a29a558d
5
5
  SHA512:
6
- metadata.gz: b392abc90b6fde8fa348a04d8cf50669a7bf61c333ef019a2f571abb6eaa0e81e3017bda38d6e4e0a53e8801053a41a67d5bdec4a1e3f779fa153af0b7ed7b15
7
- data.tar.gz: da34470011c02ec67f98082fb2192faaf614097b83f14d345ca0f396b6007a528cb0a857ec28c02c79fafba68d9ccad731d10996d3b68932ef78ab7d90157751
6
+ metadata.gz: 79be0758f8f987cb25fa8ccaf4a68800a3c91e18d25845776c927b6ddc8f2cd8a8ba37398ea43151575b0cafd3ed0be84511fec5854f19898dbd9509081c46d6
7
+ data.tar.gz: 9d953a0aca8d4ecc7bfb916e9462e6fcd3c7be2edde929c370ef1ef40915f3127cc8e90db6008adc34e1c98a4b102d7eefe027cd86371152aef17147d67d4a08
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.51.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#214](https://github.com/opf/primer_view_components/pull/214) [`0d265ad`](https://github.com/opf/primer_view_components/commit/0d265ad5384099a1a3a8833cc25bee72d1c15684) Thanks [@myabc](https://github.com/myabc)! - [59468] Initial implementation of Danger Confirmation Dialog
8
+ This is an opinionated dialog that requires the user to confirm that they wish to perform a "potentially dangerous" action by clicking a checkbox. The submit button is disabled until the checkbox is clicked. A "potentially dangerous" action could be a destructive action that cannot be easily reverted, such as bulk delete.
9
+
10
+ ### Patch Changes
11
+
12
+ - [#3224](https://github.com/primer/view_components/pull/3224) [`3140ad9`](https://github.com/opf/primer_view_components/commit/3140ad99f59b2345a43774c369bcc35d7ddd04d3) Thanks [@camertron](https://github.com/camertron)! - Update check box styles for ActionList to match the rest of Primer
13
+
14
+ - [#3236](https://github.com/primer/view_components/pull/3236) [`eea9da6`](https://github.com/opf/primer_view_components/commit/eea9da6639c3fe81f328e7da8904d89df6b2467b) Thanks [@camertron](https://github.com/camertron)! - Improve template path detection for forms
15
+
16
+ - [#3235](https://github.com/primer/view_components/pull/3235) [`c765093`](https://github.com/opf/primer_view_components/commit/c765093790d53940b3d7810085441d3706d17229) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Adds `role="radiogroup"` on `fieldset` in radio group component
17
+
18
+ - [#3207](https://github.com/primer/view_components/pull/3207) [`5880922`](https://github.com/opf/primer_view_components/commit/5880922a563af6d51dc912616861cf3010a1d24a) Thanks [@camertron](https://github.com/camertron)! - Fix ActionMenu position issue when container is scrollable
19
+
3
20
  ## 0.50.1
4
21
 
5
22
  ### Patch Changes
@@ -1,5 +1,6 @@
1
1
  import '@oddbird/popover-polyfill';
2
2
  import type { IncludeFragmentElement } from '@github/include-fragment-element';
3
+ import AnchoredPositionElement from '../../anchored_position';
3
4
  type SelectVariant = 'none' | 'single' | 'multiple' | null;
4
5
  type SelectedItem = {
5
6
  label: string | null | undefined;
@@ -9,6 +10,7 @@ type SelectedItem = {
9
10
  export declare class ActionMenuElement extends HTMLElement {
10
11
  #private;
11
12
  includeFragment: IncludeFragmentElement;
13
+ overlay: AnchoredPositionElement;
12
14
  get selectVariant(): SelectVariant;
13
15
  set selectVariant(variant: SelectVariant);
14
16
  get dynamicLabelPrefix(): string;
@@ -0,0 +1,13 @@
1
+ declare class DangerConfirmationDialogFormHelperElement extends HTMLElement {
2
+ #private;
3
+ checkbox: HTMLInputElement;
4
+ get submitButton(): HTMLButtonElement | HTMLInputElement;
5
+ connectedCallback(): void;
6
+ toggle(): void;
7
+ }
8
+ declare global {
9
+ interface Window {
10
+ DangerConfirmationDialogFormHelperElement: typeof DangerConfirmationDialogFormHelperElement;
11
+ }
12
+ }
13
+ export {};
@@ -8,6 +8,7 @@ import './dialog_helper';
8
8
  import './focus_group';
9
9
  import './scrollable_region';
10
10
  import './shared_events';
11
+ import './utils';
11
12
  import './alpha/modal_dialog';
12
13
  import './beta/nav_list';
13
14
  import './beta/nav_list_group_element';
@@ -27,3 +28,4 @@ import './alpha/select_panel_element';
27
28
  import './open_project/page_header_element';
28
29
  import './open_project/zen_mode_button';
29
30
  import './open_project/sub_header_element';
31
+ import './open_project/danger_confirmation_dialog_form_helper';
@@ -0,0 +1 @@
1
+ export declare const observeMutationsUntilConditionMet: (element: Element, condition: () => boolean, body: () => void) => void;