openproject-primer_view_components 0.18.1 → 0.20.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 +61 -0
- data/app/assets/javascripts/app/components/primer/alpha/action_bar_element.d.ts +3 -2
- data/app/assets/javascripts/app/components/primer/alpha/action_menu/action_menu_element.d.ts +20 -0
- data/app/assets/javascripts/app/components/primer/beta/nav_list.d.ts +0 -11
- data/app/assets/javascripts/app/components/primer/beta/nav_list_group_element.d.ts +19 -0
- data/app/assets/javascripts/app/components/primer/primer.d.ts +2 -0
- data/app/assets/javascripts/app/components/primer/scrollable_region.d.ts +13 -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_bar.css +1 -1
- data/app/components/primer/alpha/action_bar.css.map +1 -1
- data/app/components/primer/alpha/action_bar.pcss +8 -6
- data/app/components/primer/alpha/action_bar_element.d.ts +3 -2
- data/app/components/primer/alpha/action_bar_element.js +80 -97
- data/app/components/primer/alpha/action_bar_element.ts +84 -89
- data/app/components/primer/alpha/action_list/item.rb +13 -1
- data/app/components/primer/alpha/action_list.css +1 -1
- data/app/components/primer/alpha/action_list.css.json +1 -0
- data/app/components/primer/alpha/action_list.css.map +1 -1
- data/app/components/primer/alpha/action_list.pcss +3 -1
- data/app/components/primer/alpha/action_list.rb +5 -4
- data/app/components/primer/alpha/action_menu/action_menu_element.d.ts +20 -0
- data/app/components/primer/alpha/action_menu/action_menu_element.js +92 -15
- data/app/components/primer/alpha/action_menu/action_menu_element.ts +115 -13
- data/app/components/primer/alpha/action_menu/group.rb +23 -0
- data/app/components/primer/alpha/action_menu/heading.rb +17 -0
- data/app/components/primer/alpha/action_menu/list.html.erb +1 -0
- data/app/components/primer/alpha/action_menu/list.rb +62 -51
- data/app/components/primer/alpha/action_menu/list_wrapper.rb +40 -0
- data/app/components/primer/alpha/action_menu.rb +38 -1
- data/app/components/primer/alpha/banner.html.erb +1 -1
- data/app/components/primer/alpha/banner.rb +5 -1
- data/app/components/primer/alpha/dialog.html.erb +3 -1
- data/app/components/primer/alpha/dialog.rb +5 -1
- data/app/components/primer/alpha/layout.css +1 -1
- data/app/components/primer/alpha/layout.css.map +1 -1
- data/app/components/primer/alpha/modal_dialog.ts +1 -1
- data/app/components/primer/alpha/overlay.css +1 -1
- data/app/components/primer/alpha/overlay.css.json +4 -2
- data/app/components/primer/alpha/overlay.css.map +1 -1
- data/app/components/primer/alpha/overlay.pcss +12 -2
- data/app/components/primer/alpha/text_field.css +1 -1
- data/app/components/primer/alpha/text_field.css.map +1 -1
- data/app/components/primer/alpha/text_field.pcss +4 -3
- data/app/components/primer/alpha/tool_tip.js +22 -5
- data/app/components/primer/alpha/tool_tip.ts +24 -5
- data/app/components/primer/alpha/underline_nav.css +1 -1
- data/app/components/primer/alpha/underline_nav.css.map +1 -1
- data/app/components/primer/base_component.rb +20 -18
- data/app/components/primer/beta/auto_complete/auto_complete.html.erb +1 -7
- data/app/components/primer/beta/auto_complete/item.rb +1 -1
- data/app/components/primer/beta/auto_complete.rb +6 -1
- data/app/components/primer/beta/base_button.rb +2 -3
- data/app/components/primer/beta/blankslate.css +1 -1
- data/app/components/primer/beta/blankslate.css.map +1 -1
- data/app/components/primer/beta/blankslate.pcss +3 -3
- data/app/components/primer/beta/button.css +1 -1
- data/app/components/primer/beta/button.css.json +9 -8
- data/app/components/primer/beta/button.css.map +1 -1
- data/app/components/primer/beta/button.pcss +15 -11
- data/app/components/primer/beta/nav_list/group.html.erb +7 -5
- data/app/components/primer/beta/nav_list/group.rb +2 -2
- data/app/components/primer/beta/nav_list.d.ts +0 -11
- data/app/components/primer/beta/nav_list.js +2 -85
- data/app/components/primer/beta/nav_list.ts +1 -85
- data/app/components/primer/beta/nav_list_group_element.d.ts +19 -0
- data/app/components/primer/beta/nav_list_group_element.js +108 -0
- data/app/components/primer/beta/nav_list_group_element.ts +97 -0
- data/app/components/primer/beta/relative_time.rb +4 -4
- data/app/components/primer/component.rb +3 -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/scrollable_region.d.ts +13 -0
- data/app/components/primer/scrollable_region.js +52 -0
- data/app/components/primer/scrollable_region.ts +48 -0
- data/app/lib/primer/experimental_render_helpers.rb +32 -0
- data/app/lib/primer/experimental_slot_helpers.rb +30 -0
- data/lib/primer/classify/utilities.rb +3 -4
- data/lib/primer/view_components/version.rb +2 -2
- data/lib/primer/yard/lookbook_pages_backend.rb +2 -2
- data/previews/primer/alpha/action_menu_preview/in_scroll_container.html.erb +11 -0
- data/previews/primer/alpha/action_menu_preview.rb +80 -7
- data/previews/primer/alpha/banner_preview.rb +3 -2
- data/previews/primer/alpha/dialog_preview/with_auto_complete.html.erb +8 -0
- data/previews/primer/alpha/dialog_preview.rb +17 -0
- data/previews/primer/beta/blankslate_preview/inside_flex_container.html.erb +6 -0
- data/previews/primer/beta/blankslate_preview.rb +3 -0
- data/previews/primer/beta/nav_list_preview.rb +10 -1
- data/static/arguments.json +92 -1
- data/static/audited_at.json +4 -1
- data/static/classes.json +3 -0
- data/static/constants.json +9 -0
- data/static/info_arch.json +256 -52
- data/static/previews.json +52 -0
- data/static/statuses.json +3 -0
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e4b0323c06e38ced85cd7397ebe545ccff6a2215dcd969b3a7e281fcf3cb30e
|
4
|
+
data.tar.gz: aec6454c1e351b6836a9124980b7d5cd378bf5b9930f6553f516667c270fcf37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b64d5218076f13536065c168bff9417f052ae151a571995041d33372539d27350a4d55d7e097f33042ea559af1812f37c866c6a447560767ea9248afcd0233b0
|
7
|
+
data.tar.gz: 97d8d9aa7b9b96c2cc38c7a3c40449454cc19877fb46a58edf61917e2baae099c87fe7eb2aa1246991f6c0cf930708d68a6e6e5583c9f0672e9a821961cc909e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,66 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 0.20.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- [#2445](https://github.com/primer/view_components/pull/2445) [`da60c73`](https://github.com/opf/primer_view_components/commit/da60c7370104a7edd8713d271210e2c9cb3eeb96) Thanks [@camertron](https://github.com/camertron)! - Always convert CSS classes to system arguments in linters
|
8
|
+
|
9
|
+
- [#2447](https://github.com/primer/view_components/pull/2447) [`08a8e01`](https://github.com/opf/primer_view_components/commit/08a8e012572bb5d2248f89acdaf7329747fd3108) Thanks [@kenyonj](https://github.com/kenyonj)! - Support font_size and border_radius in classify/utilities
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- [#2452](https://github.com/primer/view_components/pull/2452) [`87e03ea`](https://github.com/opf/primer_view_components/commit/87e03ea4dd41822454c72ddb7e55b0aa9294c69c) Thanks [@nicolleromero](https://github.com/nicolleromero)! - Ensure tooltip does not reopen errantly unless focus is visible
|
14
|
+
|
15
|
+
- [#2456](https://github.com/primer/view_components/pull/2456) [`fd38b17`](https://github.com/opf/primer_view_components/commit/fd38b170014cfadbd8ecc78814f70a5323fda3ee) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Adds visible outlines to `Overlay` and `Tooltip` in high contrast mode.
|
16
|
+
|
17
|
+
- [#2432](https://github.com/primer/view_components/pull/2432) [`c162880`](https://github.com/opf/primer_view_components/commit/c162880a5a57b86fd6f640d0dd5c9a4548335f09) Thanks [@dylanatsmith](https://github.com/dylanatsmith)! - Remove `user-select: none` to allow users to select form label text
|
18
|
+
|
19
|
+
- [#2428](https://github.com/primer/view_components/pull/2428) [`4cb9a57`](https://github.com/opf/primer_view_components/commit/4cb9a57de1d507e7c22d7c3cdb39b20e73bc36bc) Thanks [@strackoverflow](https://github.com/strackoverflow)! - Fix an accessibility issue where the Dialog body could not be reached via keyboard navigation
|
20
|
+
|
21
|
+
- [#2426](https://github.com/primer/view_components/pull/2426) [`78dd9dd`](https://github.com/opf/primer_view_components/commit/78dd9ddb70ee5ade30e243968c87364a80ff1325) Thanks [@camertron](https://github.com/camertron)! - Fix typo in argument passed to event listener in ToolTip
|
22
|
+
|
23
|
+
- [#2478](https://github.com/primer/view_components/pull/2478) [`6e7b7c2`](https://github.com/opf/primer_view_components/commit/6e7b7c2340339a15b21857ee1fbc734a5760135d) Thanks [@jonrohan](https://github.com/jonrohan)! - Bug fix in ActionBar: When collapsed the menu and tooltips aren't visible in Firefox
|
24
|
+
|
25
|
+
- [#2411](https://github.com/primer/view_components/pull/2411) [`58e700a`](https://github.com/opf/primer_view_components/commit/58e700ab9222054bc803541d9eccc4877254b1c1) Thanks [@keithamus](https://github.com/keithamus)! - Ensure scroll position does not change when opening ActionMenus
|
26
|
+
|
27
|
+
- [#2425](https://github.com/primer/view_components/pull/2425) [`65f418f`](https://github.com/opf/primer_view_components/commit/65f418f8f191768b0fc0b92ffd2a681631594631) Thanks [@camertron](https://github.com/camertron)! - Use floats to hide ActionBar items to address Android Chrome overflow issue
|
28
|
+
|
29
|
+
- [#2455](https://github.com/primer/view_components/pull/2455) [`6ca4ac4`](https://github.com/opf/primer_view_components/commit/6ca4ac4476b00be4f5561ae3ad452c4609dd2928) Thanks [@HDinger](https://github.com/HDinger)! - Make dismiss action on Banner translatable
|
30
|
+
|
31
|
+
- [#2434](https://github.com/primer/view_components/pull/2434) [`dc87edf`](https://github.com/opf/primer_view_components/commit/dc87edf407d98cdefc32d095fea99909c066a2fc) Thanks [@langermank](https://github.com/langermank)! - Add missing `box-shadow` to text field
|
32
|
+
|
33
|
+
## 0.19.0
|
34
|
+
|
35
|
+
### Minor Changes
|
36
|
+
|
37
|
+
- [#2378](https://github.com/primer/view_components/pull/2378) [`81b5acc`](https://github.com/opf/primer_view_components/commit/81b5acc641d2bebc3a634fe0d5d712ad289747cd) Thanks [@keithamus](https://github.com/keithamus)! - Primer::Alpha::ActionList now uses popover
|
38
|
+
|
39
|
+
- [#2340](https://github.com/primer/view_components/pull/2340) [`b8d0540`](https://github.com/opf/primer_view_components/commit/b8d05407b42ec843f4a46b979779e6db69bd56ba) Thanks [@camertron](https://github.com/camertron)! - Add group support to ActionMenu
|
40
|
+
|
41
|
+
- [#2393](https://github.com/primer/view_components/pull/2393) [`745eae0`](https://github.com/opf/primer_view_components/commit/745eae0d0be5efa3f368630b49db1eda2a11307e) Thanks [@camertron](https://github.com/camertron)! - [ActionMenu] Don't allow previously hidden items to be checkable; add JavaScript API
|
42
|
+
|
43
|
+
### Patch Changes
|
44
|
+
|
45
|
+
- [#2414](https://github.com/primer/view_components/pull/2414) [`48a2405`](https://github.com/opf/primer_view_components/commit/48a2405a2cdb6865eb57c2ea411fcece026590d0) Thanks [@keithamus](https://github.com/keithamus)! - Prevent other Overlays closing when Escape is pressed while Tooltips are open
|
46
|
+
|
47
|
+
- [#2426](https://github.com/primer/view_components/pull/2426) [`78dd9dd`](https://github.com/opf/primer_view_components/commit/78dd9ddb70ee5ade30e243968c87364a80ff1325) Thanks [@camertron](https://github.com/camertron)! - Fix typo in argument passed to event listener in ToolTip
|
48
|
+
|
49
|
+
- [#2379](https://github.com/primer/view_components/pull/2379) [`2c59c33`](https://github.com/opf/primer_view_components/commit/2c59c33bf54e392d743fbdd1076d06bff2151b42) Thanks [@mperrotti](https://github.com/mperrotti)! - Updates 'inactive' state for buttons based on feedback from the a11y team:
|
50
|
+
|
51
|
+
- inactive buttons need to meet the color contrast ratio minimum
|
52
|
+
- inactive buttons shouldn't have aria-disabled since they can still accept interactions such as:
|
53
|
+
- hover/focus to show a tooltip
|
54
|
+
- click/activate to show a dialog with more detailed info on why it's inactive
|
55
|
+
|
56
|
+
<!-- Changed components: Button -->
|
57
|
+
|
58
|
+
- [#2408](https://github.com/primer/view_components/pull/2408) [`57586da`](https://github.com/opf/primer_view_components/commit/57586da49cf0f82c0da4736bc276984d6ea3b479) Thanks [@HDinger](https://github.com/HDinger)! - Fix: Allow month attribute for Primer::Beta::RelativeTime
|
59
|
+
|
60
|
+
- [#2406](https://github.com/primer/view_components/pull/2406) [`fb9bf25`](https://github.com/opf/primer_view_components/commit/fb9bf257c358add060679d401719993b21ce7f45) Thanks [@strackoverflow](https://github.com/strackoverflow)! - Fix an issue where multiple groups could not be paginated within the same NavList
|
61
|
+
|
62
|
+
- [#2412](https://github.com/primer/view_components/pull/2412) [`e7c9a6c`](https://github.com/opf/primer_view_components/commit/e7c9a6c62b82ec9ebff575ddd5fbd361fcc40334) Thanks [@camertron](https://github.com/camertron)! - Prevent Blankslates from having a zero width inside flex containers
|
63
|
+
|
3
64
|
## 0.18.1
|
4
65
|
|
5
66
|
### Patch Changes
|
@@ -1,12 +1,13 @@
|
|
1
|
+
import { ActionMenuElement } from './action_menu/action_menu_element';
|
1
2
|
declare class ActionBarElement extends HTMLElement {
|
2
3
|
#private;
|
3
4
|
items: HTMLElement[];
|
4
5
|
itemContainer: HTMLElement;
|
5
|
-
moreMenu:
|
6
|
+
moreMenu: ActionMenuElement;
|
6
7
|
connectedCallback(): void;
|
7
8
|
disconnectedCallback(): void;
|
8
9
|
menuItemClick(event: Event): void;
|
9
|
-
update(
|
10
|
+
update(): void;
|
10
11
|
}
|
11
12
|
declare global {
|
12
13
|
interface Window {
|
data/app/assets/javascripts/app/components/primer/alpha/action_menu/action_menu_element.d.ts
CHANGED
@@ -6,6 +6,15 @@ type SelectedItem = {
|
|
6
6
|
value: string | null | undefined;
|
7
7
|
element: Element;
|
8
8
|
};
|
9
|
+
export type ItemActivatedEvent = {
|
10
|
+
item: Element;
|
11
|
+
checked: boolean;
|
12
|
+
};
|
13
|
+
declare global {
|
14
|
+
interface HTMLElementEventMap {
|
15
|
+
itemActivated: CustomEvent<ItemActivatedEvent>;
|
16
|
+
}
|
17
|
+
}
|
9
18
|
export declare class ActionMenuElement extends HTMLElement {
|
10
19
|
#private;
|
11
20
|
includeFragment: IncludeFragmentElement;
|
@@ -22,6 +31,17 @@ export declare class ActionMenuElement extends HTMLElement {
|
|
22
31
|
connectedCallback(): void;
|
23
32
|
disconnectedCallback(): void;
|
24
33
|
handleEvent(event: Event): void;
|
34
|
+
get items(): HTMLElement[];
|
35
|
+
getItemById(itemId: string): HTMLElement | null;
|
36
|
+
isItemDisabled(item: Element | null): boolean;
|
37
|
+
disableItem(item: Element | null): void;
|
38
|
+
enableItem(item: Element | null): void;
|
39
|
+
isItemHidden(item: Element | null): boolean;
|
40
|
+
hideItem(item: Element | null): void;
|
41
|
+
showItem(item: Element | null): void;
|
42
|
+
isItemChecked(item: Element | null): boolean;
|
43
|
+
checkItem(item: Element | null): void;
|
44
|
+
uncheckItem(item: Element | null): void;
|
25
45
|
}
|
26
46
|
declare global {
|
27
47
|
interface Window {
|
@@ -1,15 +1,6 @@
|
|
1
1
|
export declare class NavListElement extends HTMLElement {
|
2
2
|
#private;
|
3
3
|
items: HTMLElement[];
|
4
|
-
showMoreItem: HTMLElement;
|
5
|
-
focusMarkers: HTMLElement[];
|
6
|
-
connectedCallback(): void;
|
7
|
-
get showMoreDisabled(): boolean;
|
8
|
-
set showMoreDisabled(value: boolean);
|
9
|
-
set currentPage(value: number);
|
10
|
-
get currentPage(): number;
|
11
|
-
get totalPages(): number;
|
12
|
-
get paginationSrc(): string;
|
13
4
|
selectItemById(itemId: string | null): boolean;
|
14
5
|
selectItemByHref(href: string | null): boolean;
|
15
6
|
selectItemByCurrentLocation(): boolean;
|
@@ -18,8 +9,6 @@ export declare class NavListElement extends HTMLElement {
|
|
18
9
|
itemIsExpanded(item: HTMLElement | null): boolean;
|
19
10
|
handleItemWithSubItemClick(e: Event): void;
|
20
11
|
handleItemWithSubItemKeydown(e: KeyboardEvent): void;
|
21
|
-
private showMore;
|
22
|
-
private setShowMoreItemState;
|
23
12
|
}
|
24
13
|
declare global {
|
25
14
|
interface Window {
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export declare class NavListGroupElement extends HTMLElement {
|
2
|
+
#private;
|
3
|
+
showMoreItem: HTMLElement;
|
4
|
+
focusMarkers: HTMLElement[];
|
5
|
+
connectedCallback(): void;
|
6
|
+
get showMoreDisabled(): boolean;
|
7
|
+
set showMoreDisabled(value: boolean);
|
8
|
+
set currentPage(value: number);
|
9
|
+
get currentPage(): number;
|
10
|
+
get totalPages(): number;
|
11
|
+
get paginationSrc(): string;
|
12
|
+
private showMore;
|
13
|
+
private setShowMoreItemState;
|
14
|
+
}
|
15
|
+
declare global {
|
16
|
+
interface Window {
|
17
|
+
NavListGroupElement: typeof NavListGroupElement;
|
18
|
+
}
|
19
|
+
}
|
@@ -3,9 +3,11 @@ import './alpha/action_bar_element';
|
|
3
3
|
import './alpha/dropdown';
|
4
4
|
import './anchored_position';
|
5
5
|
import './focus_group';
|
6
|
+
import './scrollable_region';
|
6
7
|
import './alpha/image_crop';
|
7
8
|
import './alpha/modal_dialog';
|
8
9
|
import './beta/nav_list';
|
10
|
+
import './beta/nav_list_group_element';
|
9
11
|
import './alpha/segmented_control';
|
10
12
|
import './alpha/toggle_switch';
|
11
13
|
import './alpha/tool_tip';
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export declare class ScrollableRegionElement extends HTMLElement {
|
2
|
+
hasOverflow: boolean;
|
3
|
+
labelledBy: string;
|
4
|
+
observer: ResizeObserver;
|
5
|
+
connectedCallback(): void;
|
6
|
+
disconnectedCallback(): void;
|
7
|
+
attributeChangedCallback(name: string): void;
|
8
|
+
}
|
9
|
+
declare global {
|
10
|
+
interface Window {
|
11
|
+
ScrollableRegionElement: typeof ScrollableRegionElement;
|
12
|
+
}
|
13
|
+
}
|