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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/app/assets/javascripts/components/primer/alpha/action_menu/action_menu_element.d.ts +2 -0
- data/app/assets/javascripts/components/primer/open_project/danger_confirmation_dialog_form_helper.d.ts +13 -0
- data/app/assets/javascripts/components/primer/primer.d.ts +2 -0
- data/app/assets/javascripts/components/primer/utils.d.ts +1 -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/item.html.erb +1 -4
- data/app/components/primer/alpha/action_list.css +1 -1
- data/app/components/primer/alpha/action_list.css.json +2 -6
- data/app/components/primer/alpha/action_list.css.map +1 -1
- data/app/components/primer/alpha/action_list.pcss +10 -43
- data/app/components/primer/alpha/action_menu/action_menu_element.d.ts +2 -0
- data/app/components/primer/alpha/action_menu/action_menu_element.js +31 -1
- data/app/components/primer/alpha/action_menu/action_menu_element.ts +37 -0
- data/app/components/primer/alpha/action_menu.rb +6 -0
- data/app/components/primer/alpha/select_panel_element.js +6 -19
- data/app/components/primer/alpha/select_panel_element.ts +9 -21
- data/app/components/primer/alpha/text_field.css +1 -1
- data/app/components/primer/alpha/text_field.css.json +30 -30
- data/app/components/primer/alpha/text_field.css.map +1 -1
- data/app/components/primer/alpha/text_field.pcss +2 -3
- data/app/components/primer/open_project/danger_confirmation_dialog/confirmation_check_box.rb +44 -0
- data/app/components/primer/open_project/danger_confirmation_dialog/form_wrapper.html.erb +7 -0
- data/app/components/primer/open_project/danger_confirmation_dialog/form_wrapper.rb +26 -0
- data/app/components/primer/open_project/danger_confirmation_dialog.html.erb +19 -0
- data/app/components/primer/open_project/danger_confirmation_dialog.rb +104 -0
- data/app/components/primer/open_project/danger_confirmation_dialog_form_helper.d.ts +13 -0
- data/app/components/primer/open_project/danger_confirmation_dialog_form_helper.js +44 -0
- data/app/components/primer/open_project/danger_confirmation_dialog_form_helper.ts +36 -0
- data/app/components/primer/primer.d.ts +2 -0
- data/app/components/primer/primer.js +2 -0
- data/app/components/primer/primer.ts +2 -0
- data/app/components/primer/utils.d.ts +1 -0
- data/app/components/primer/utils.js +16 -0
- data/app/components/primer/utils.ts +16 -0
- data/app/lib/primer/forms/acts_as_component.rb +9 -2
- data/app/lib/primer/forms/base.rb +0 -5
- data/app/lib/primer/forms/base_component.rb +5 -3
- data/app/lib/primer/forms/radio_button_group.html.erb +1 -1
- data/app/lib/primer/forms/utils.rb +16 -1
- data/lib/primer/view_components/version.rb +2 -2
- data/previews/primer/alpha/action_menu_preview/in_scroll_container.html.erb +3 -5
- data/previews/primer/open_project/danger_confirmation_dialog_preview/playground.html.erb +13 -0
- data/previews/primer/open_project/danger_confirmation_dialog_preview/with_additional_details.html.erb +40 -0
- data/previews/primer/open_project/danger_confirmation_dialog_preview/with_form.html.erb +11 -0
- data/previews/primer/open_project/danger_confirmation_dialog_preview/with_form_builder_form.html.erb +13 -0
- data/previews/primer/open_project/danger_confirmation_dialog_preview.rb +71 -0
- data/static/classes.json +6 -0
- metadata +28 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29f2e2c298d265746a0e011f41ba5bc2c03cfcd416dc2a056bf1613546422d6e
|
4
|
+
data.tar.gz: 8d95c5b9b1001e11b446eb051278bbf65950df8be0bfd98ca5a72213a29a558d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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;
|