openproject-primer_view_components 0.17.1 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +49 -0
  3. data/app/assets/javascripts/app/components/primer/alpha/action_menu/action_menu_element.d.ts +20 -0
  4. data/app/assets/javascripts/app/components/primer/beta/nav_list.d.ts +0 -11
  5. data/app/assets/javascripts/app/components/primer/beta/nav_list_group_element.d.ts +19 -0
  6. data/app/assets/javascripts/app/components/primer/primer.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.rb +13 -1
  12. data/app/components/primer/alpha/action_list.css +1 -1
  13. data/app/components/primer/alpha/action_list.css.json +1 -0
  14. data/app/components/primer/alpha/action_list.css.map +1 -1
  15. data/app/components/primer/alpha/action_list.pcss +3 -1
  16. data/app/components/primer/alpha/action_list.rb +5 -4
  17. data/app/components/primer/alpha/action_menu/action_menu_element.d.ts +20 -0
  18. data/app/components/primer/alpha/action_menu/action_menu_element.js +85 -11
  19. data/app/components/primer/alpha/action_menu/action_menu_element.ts +110 -12
  20. data/app/components/primer/alpha/action_menu/group.rb +23 -0
  21. data/app/components/primer/alpha/action_menu/heading.rb +17 -0
  22. data/app/components/primer/alpha/action_menu/list.html.erb +1 -0
  23. data/app/components/primer/alpha/action_menu/list.rb +62 -51
  24. data/app/components/primer/alpha/action_menu/list_wrapper.rb +40 -0
  25. data/app/components/primer/alpha/action_menu.rb +38 -1
  26. data/app/components/primer/alpha/overlay.css +1 -1
  27. data/app/components/primer/alpha/overlay.css.json +2 -1
  28. data/app/components/primer/alpha/overlay.css.map +1 -1
  29. data/app/components/primer/alpha/overlay.pcss +6 -2
  30. data/app/components/primer/alpha/text_field.css +1 -1
  31. data/app/components/primer/alpha/text_field.css.map +1 -1
  32. data/app/components/primer/alpha/text_field.pcss +3 -3
  33. data/app/components/primer/alpha/tool_tip.js +8 -4
  34. data/app/components/primer/alpha/tool_tip.ts +9 -4
  35. data/app/components/primer/beta/auto_complete/auto_complete.html.erb +1 -7
  36. data/app/components/primer/beta/auto_complete/item.rb +1 -1
  37. data/app/components/primer/beta/auto_complete.rb +6 -1
  38. data/app/components/primer/beta/base_button.rb +2 -3
  39. data/app/components/primer/beta/blankslate.css +1 -1
  40. data/app/components/primer/beta/blankslate.css.map +1 -1
  41. data/app/components/primer/beta/blankslate.pcss +3 -3
  42. data/app/components/primer/beta/border_box.rb +3 -0
  43. data/app/components/primer/beta/button.css +1 -1
  44. data/app/components/primer/beta/button.css.json +9 -8
  45. data/app/components/primer/beta/button.css.map +1 -1
  46. data/app/components/primer/beta/button.pcss +15 -11
  47. data/app/components/primer/beta/nav_list/group.html.erb +7 -5
  48. data/app/components/primer/beta/nav_list/group.rb +2 -2
  49. data/app/components/primer/beta/nav_list.d.ts +0 -11
  50. data/app/components/primer/beta/nav_list.js +2 -85
  51. data/app/components/primer/beta/nav_list.ts +1 -85
  52. data/app/components/primer/beta/nav_list_group_element.d.ts +19 -0
  53. data/app/components/primer/beta/nav_list_group_element.js +108 -0
  54. data/app/components/primer/beta/nav_list_group_element.ts +97 -0
  55. data/app/components/primer/beta/relative_time.rb +4 -4
  56. data/app/components/primer/component.rb +3 -0
  57. data/app/components/primer/open_project/input_group.css +1 -0
  58. data/app/components/primer/open_project/input_group.css.json +11 -0
  59. data/app/components/primer/open_project/input_group.css.map +1 -0
  60. data/app/components/primer/open_project/input_group.html.erb +4 -0
  61. data/app/components/primer/open_project/input_group.pcss +25 -0
  62. data/app/components/primer/open_project/input_group.rb +93 -0
  63. data/app/components/primer/primer.d.ts +1 -0
  64. data/app/components/primer/primer.js +1 -0
  65. data/app/components/primer/primer.pcss +1 -0
  66. data/app/components/primer/primer.ts +1 -0
  67. data/app/lib/primer/experimental_render_helpers.rb +32 -0
  68. data/app/lib/primer/experimental_slot_helpers.rb +30 -0
  69. data/lib/primer/view_components/version.rb +2 -2
  70. data/lib/primer/yard/lookbook_pages_backend.rb +2 -2
  71. data/previews/primer/alpha/action_menu_preview.rb +73 -7
  72. data/previews/primer/alpha/dialog_preview/with_auto_complete.html.erb +8 -0
  73. data/previews/primer/alpha/dialog_preview.rb +17 -0
  74. data/previews/primer/beta/blankslate_preview/inside_flex_container.html.erb +6 -0
  75. data/previews/primer/beta/blankslate_preview.rb +3 -0
  76. data/previews/primer/beta/border_box_preview.rb +3 -2
  77. data/previews/primer/beta/nav_list_preview.rb +10 -1
  78. data/previews/primer/open_project/input_group_preview.rb +63 -0
  79. data/static/arguments.json +108 -1
  80. data/static/audited_at.json +5 -1
  81. data/static/classes.json +6 -0
  82. data/static/constants.json +28 -0
  83. data/static/info_arch.json +365 -52
  84. data/static/previews.json +112 -0
  85. data/static/statuses.json +4 -0
  86. metadata +21 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d73652be363fb9dd7e2a2b9560e10a72b29f9bd7a164a85f431b4169a6612e65
4
- data.tar.gz: 0a4b14c164d36fd5f61bfb12f74890b7f5099db8d34262e9f12f71be9c34ab72
3
+ metadata.gz: a440df9756ae23d7db3614b2efad994988c052d3f4ebc343b5f5c5c19ae2bfe2
4
+ data.tar.gz: d66f14a39edc3d157650b424c5aaf028e2bea48ead29ac64249a94dacae949ac
5
5
  SHA512:
6
- metadata.gz: 9e9d1823bc8272165f0cc205395c350d34626cc102dbdb1d8778ff7b751d367f5d29f52a4a45b85563b8272ecda9d8faa1a7e2a0f72165eaab46fa959400925c
7
- data.tar.gz: 5714fd8e47a4071c464f1218b1d0bbb776301cc97c0b707cc42ce8891599c934d63374e9d6c82d0eea2e2fd6a2188ddc3ac77bf0a2bb660fe39fe77dbd7979fd
6
+ metadata.gz: 8bbe2134e705abc56607092f56865ae9d8d2714c3b972405a625497d557d7aff799e408a26bcc2623968c67d42c8a07a67833aba5597e42a93bc77f83c63ed9d
7
+ data.tar.gz: 1f215934bbabd68f14e7a0fc6156ec5e5579274b1462eb063fbaf7f26e9a0703bc135dd795f62bf7a0c41c92f03aeb30ae892fb928d87f86cded94407c50c3ce
data/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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
8
+
9
+ - [#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
10
+
11
+ - [#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
12
+
13
+ ### Patch Changes
14
+
15
+ - [#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
16
+
17
+ - [#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
18
+
19
+ - [#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:
20
+
21
+ - inactive buttons need to meet the color contrast ratio minimum
22
+ - inactive buttons shouldn't have aria-disabled since they can still accept interactions such as:
23
+ - hover/focus to show a tooltip
24
+ - click/activate to show a dialog with more detailed info on why it's inactive
25
+
26
+ <!-- Changed components: Button -->
27
+
28
+ - [#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
29
+
30
+ - [#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
31
+
32
+ - [#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
33
+
34
+ ## 0.18.1
35
+
36
+ ### Patch Changes
37
+
38
+ - [#58](https://github.com/opf/primer_view_components/pull/58) [`97595a03`](https://github.com/opf/primer_view_components/commit/97595a03c2fb3a0e6712392c80e18f2dae597398) Thanks [@HDinger](https://github.com/HDinger)! - Fix invalid CSS rule for `input_width: :auto`
39
+
40
+ ## 0.18.0
41
+
42
+ ### Minor Changes
43
+
44
+ - [#56](https://github.com/opf/primer_view_components/pull/56) [`384c4b45`](https://github.com/opf/primer_view_components/commit/384c4b456a5f217cd9caa3ccaad6cfed289766ea) Thanks [@HDinger](https://github.com/HDinger)! - Create OpenProject::InputGroupComponent
45
+
46
+ ### Patch Changes
47
+
48
+ - [#57](https://github.com/opf/primer_view_components/pull/57) [`29a18c91`](https://github.com/opf/primer_view_components/commit/29a18c91d6d9e4cfbdfffa52c178481cb8305031) Thanks [@aaron-contreras](https://github.com/aaron-contreras)! - Allow setting an `id` attribute on the BorderBox's `ul` element
49
+
50
+ <!-- Changed components: Primer::Beta::BorderBox -->
51
+
3
52
  ## 0.17.1
4
53
 
5
54
  ### Patch Changes
@@ -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
+ }
@@ -6,6 +6,7 @@ import './focus_group';
6
6
  import './alpha/image_crop';
7
7
  import './alpha/modal_dialog';
8
8
  import './beta/nav_list';
9
+ import './beta/nav_list_group_element';
9
10
  import './alpha/segmented_control';
10
11
  import './alpha/toggle_switch';
11
12
  import './alpha/tool_tip';