openproject-primer_view_components 0.11.0 → 0.13.0

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.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +110 -0
  3. data/app/assets/javascripts/app/components/primer/alpha/tool_tip.d.ts +1 -0
  4. data/app/assets/javascripts/app/components/primer/primer.d.ts +1 -1
  5. data/app/assets/javascripts/primer_view_components.js +1 -1
  6. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  7. data/app/assets/styles/primer_view_components.css +1 -1
  8. data/app/assets/styles/primer_view_components.css.map +1 -1
  9. data/app/components/primer/alpha/action_bar/item.rb +7 -4
  10. data/app/components/primer/alpha/action_bar.rb +2 -2
  11. data/app/components/primer/alpha/action_bar_element.js +9 -4
  12. data/app/components/primer/alpha/action_bar_element.ts +9 -2
  13. data/app/components/primer/alpha/action_list/form_wrapper.html.erb +4 -2
  14. data/app/components/primer/alpha/action_list/form_wrapper.rb +20 -9
  15. data/app/components/primer/alpha/action_menu/action_menu_element.js +162 -86
  16. data/app/components/primer/alpha/action_menu/action_menu_element.ts +197 -82
  17. data/app/components/primer/alpha/action_menu/list.rb +0 -2
  18. data/app/components/primer/alpha/action_menu.rb +120 -3
  19. data/app/components/primer/alpha/check_box_group.rb +2 -0
  20. data/app/components/primer/alpha/dialog/header.rb +12 -0
  21. data/app/components/primer/alpha/dialog.rb +1 -1
  22. data/app/components/primer/alpha/modal_dialog.js +10 -13
  23. data/app/components/primer/alpha/modal_dialog.ts +10 -13
  24. data/app/components/primer/alpha/nav_list/divider.rb +2 -5
  25. data/app/components/primer/alpha/nav_list/group.rb +2 -98
  26. data/app/components/primer/alpha/nav_list/heading.rb +2 -27
  27. data/app/components/primer/alpha/nav_list/item.rb +2 -147
  28. data/app/components/primer/alpha/nav_list.rb +2 -205
  29. data/app/components/primer/alpha/overlay.css +1 -1
  30. data/app/components/primer/alpha/overlay.css.map +1 -1
  31. data/app/components/primer/alpha/overlay.pcss +1 -7
  32. data/app/components/primer/alpha/overlay.rb +6 -4
  33. data/app/components/primer/alpha/radio_button_group.rb +2 -0
  34. data/app/components/primer/alpha/segmented_control/item.html.erb +1 -8
  35. data/app/components/primer/alpha/segmented_control/item.rb +38 -4
  36. data/app/components/primer/alpha/segmented_control.css +1 -1
  37. data/app/components/primer/alpha/segmented_control.css.json +14 -13
  38. data/app/components/primer/alpha/segmented_control.css.map +1 -1
  39. data/app/components/primer/alpha/segmented_control.pcss +75 -66
  40. data/app/components/primer/alpha/segmented_control.rb +10 -0
  41. data/app/components/primer/alpha/text_field.css +1 -1
  42. data/app/components/primer/alpha/text_field.css.json +4 -1
  43. data/app/components/primer/alpha/text_field.css.map +1 -1
  44. data/app/components/primer/alpha/text_field.pcss +18 -3
  45. data/app/components/primer/alpha/tool_tip.d.ts +1 -0
  46. data/app/components/primer/alpha/tool_tip.js +26 -93
  47. data/app/components/primer/alpha/tool_tip.ts +25 -91
  48. data/app/components/primer/alpha/tooltip.rb +3 -1
  49. data/app/components/primer/beta/base_button.rb +4 -0
  50. data/app/components/primer/beta/button.css +1 -1
  51. data/app/components/primer/beta/button.css.json +2 -0
  52. data/app/components/primer/beta/button.css.map +1 -1
  53. data/app/components/primer/beta/button.pcss +17 -5
  54. data/app/components/primer/beta/icon_button.html.erb +1 -1
  55. data/app/components/primer/beta/icon_button.rb +8 -1
  56. data/app/components/primer/beta/link.css +1 -1
  57. data/app/components/primer/beta/link.css.json +1 -0
  58. data/app/components/primer/beta/link.css.map +1 -1
  59. data/app/components/primer/beta/link.pcss +5 -0
  60. data/app/components/primer/beta/link.rb +2 -2
  61. data/app/components/primer/beta/nav_list/divider.rb +14 -0
  62. data/app/components/primer/beta/nav_list/group.rb +107 -0
  63. data/app/components/primer/beta/nav_list/heading.rb +36 -0
  64. data/app/components/primer/beta/nav_list/item.rb +156 -0
  65. data/app/components/primer/beta/nav_list.rb +212 -0
  66. data/app/components/primer/focus_group.js +30 -4
  67. data/app/components/primer/focus_group.ts +29 -2
  68. data/app/components/primer/open_project/flex_layout.html.erb +23 -0
  69. data/app/components/primer/open_project/flex_layout.rb +52 -0
  70. data/app/components/primer/open_project/grid_layout/area.rb +38 -0
  71. data/app/components/primer/open_project/grid_layout.html.erb +11 -0
  72. data/app/components/primer/open_project/grid_layout.rb +34 -0
  73. data/app/components/primer/open_project/page_header.css +1 -1
  74. data/app/components/primer/open_project/page_header.css.map +1 -1
  75. data/app/components/primer/open_project/page_header.pcss +4 -0
  76. data/app/components/primer/primer.d.ts +1 -1
  77. data/app/components/primer/primer.js +1 -1
  78. data/app/components/primer/primer.ts +1 -1
  79. data/app/helpers/primer/form_helper.rb +10 -0
  80. data/lib/primer/accessibility.rb +3 -1
  81. data/lib/primer/deprecations.yml +20 -0
  82. data/lib/primer/forms/check_box_group.html.erb +3 -0
  83. data/lib/primer/forms/dsl/check_box_group_input.rb +1 -5
  84. data/lib/primer/forms/dsl/check_box_input.rb +5 -0
  85. data/lib/primer/forms/dsl/radio_button_input.rb +5 -0
  86. data/lib/primer/forms/form_control.html.erb +1 -4
  87. data/lib/primer/forms/radio_button_group.html.erb +3 -0
  88. data/lib/primer/forms/utils.rb +2 -0
  89. data/lib/primer/forms/validation_message.html.erb +4 -0
  90. data/lib/primer/forms/validation_message.rb +14 -0
  91. data/lib/primer/forms.rb +16 -0
  92. data/lib/primer/static/generate_info_arch.rb +86 -5
  93. data/lib/primer/view_components/version.rb +1 -1
  94. data/lib/primer/yard/component_manifest.rb +4 -0
  95. data/previews/primer/alpha/action_menu_preview/single_select_form_items.html.erb +31 -0
  96. data/previews/primer/alpha/action_menu_preview/with_actions.html.erb +6 -5
  97. data/previews/primer/alpha/action_menu_preview.rb +10 -1
  98. data/previews/primer/alpha/check_box_group_preview.rb +13 -0
  99. data/previews/primer/alpha/check_box_preview.rb +1 -0
  100. data/previews/primer/alpha/dialog_preview/autofocus_element.html.erb +8 -0
  101. data/previews/primer/alpha/dialog_preview/with_header.html.erb +5 -0
  102. data/previews/primer/alpha/dialog_preview.rb +22 -0
  103. data/previews/primer/alpha/overlay_preview.rb +1 -1
  104. data/previews/primer/alpha/radio_button_group_preview.rb +13 -0
  105. data/previews/primer/alpha/radio_button_preview.rb +2 -1
  106. data/previews/primer/alpha/segmented_control_preview.rb +35 -0
  107. data/previews/primer/alpha/text_field_preview/input_group_leading_action_menu.html.erb +21 -0
  108. data/previews/primer/alpha/text_field_preview/input_group_leading_button.html.erb +18 -0
  109. data/previews/primer/alpha/text_field_preview/input_group_trailing_button.html.erb +18 -0
  110. data/previews/primer/alpha/text_field_preview.rb +21 -0
  111. data/previews/primer/alpha/tooltip_preview/tooltip_with_dialog_moving_focus_to_input.html.erb +23 -0
  112. data/previews/primer/alpha/tooltip_preview.rb +6 -1
  113. data/previews/primer/beta/button_group_preview.rb +6 -6
  114. data/previews/primer/beta/button_preview.rb +21 -3
  115. data/previews/primer/beta/icon_button_preview.rb +3 -0
  116. data/previews/primer/{alpha → beta}/nav_list_preview/trailing_action.html.erb +1 -1
  117. data/previews/primer/{alpha → beta}/nav_list_preview.rb +5 -5
  118. data/previews/primer/open_project/flex_layout_preview.rb +73 -0
  119. data/previews/primer/open_project/grid_layout_preview.rb +37 -0
  120. data/static/arguments.json +278 -7
  121. data/static/audited_at.json +8 -0
  122. data/static/classes.json +15 -0
  123. data/static/constants.json +47 -1
  124. data/static/info_arch.json +1338 -632
  125. data/static/previews.json +271 -167
  126. data/static/statuses.json +13 -5
  127. metadata +33 -319
  128. /data/app/assets/javascripts/app/components/primer/{alpha → beta}/nav_list.d.ts +0 -0
  129. /data/app/components/primer/{alpha → beta}/nav_list/group.html.erb +0 -0
  130. /data/app/components/primer/{alpha → beta}/nav_list/item.html.erb +0 -0
  131. /data/app/components/primer/{alpha → beta}/nav_list.d.ts +0 -0
  132. /data/app/components/primer/{alpha → beta}/nav_list.html.erb +0 -0
  133. /data/app/components/primer/{alpha → beta}/nav_list.js +0 -0
  134. /data/app/components/primer/{alpha → beta}/nav_list.ts +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43a046cf56989d6e29c7f321bc2c655830cb9acf37d6a02569d8de9b7070215b
4
- data.tar.gz: 75512a6d1979504fff3964ff4c2213a4403f48a36236806cb197a0f82544aca4
3
+ metadata.gz: 3c17581220cb9e77d3a09810a549aff8aa2cfa9e50913676dc99d29664e871f5
4
+ data.tar.gz: dfa539af0aaf4e4d8fc53bad65563a7b5aa9603ef2b4bc0f48bf0147e88621ae
5
5
  SHA512:
6
- metadata.gz: 64951caf8923628511e81f897440e86030d36210b3bb8f3b79e8967fe5e2b866fc4e2a5fd2eab2f173bd9ea8dce907be896a44c7da8ae5d20385dcd1ae934a0f
7
- data.tar.gz: c51ace1208c5f8e36ba1104b73bb942fafcaa30862e6e592c598683aab2d68d0bbb5308475f074d8eac5c69032569dc506ce5e04a177c817f993b8e3350c9960
6
+ metadata.gz: bd3676b9395caf3dab08f8a6495390a6dc9f9a74fd0de37b1b7e3ec032005e130f168cf3dbc82c0c3f1559517fa062568ea11ae2e04b59407229b6d674cb802f
7
+ data.tar.gz: 8c35a2d098860e1f2a1c484019632c0f5b0b1489361524fd9f64275e3fc6916aa0d8b0438a0d3944221b9b83e5fad7fbe41ce313024b1c220d49ab95737d9938
data/CHANGELOG.md CHANGED
@@ -1,5 +1,115 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2284](https://github.com/primer/view_components/pull/2284) [`374d10fd`](https://github.com/opf/primer_view_components/commit/374d10fd18e7371f49abf75dde135c3ed29fe33d) Thanks [@langermank](https://github.com/langermank)! - Update tooltip design
8
+
9
+ - Removes caret
10
+ - Decrease offset
11
+ - Remove animation delay
12
+ - Use v8 color tokens
13
+
14
+ <!-- Changed components: Tooltip -->
15
+
16
+ - [#2293](https://github.com/primer/view_components/pull/2293) [`d7eafca0`](https://github.com/opf/primer_view_components/commit/d7eafca0b2bbcea41f28c7ab16e6f396c150be8f) Thanks [@camertron](https://github.com/camertron)! - Fix multi-select behavior when ActionMenus are embedded in dialogs
17
+
18
+ <!-- Changed components: Primer::Alpha::ActionMenu -->
19
+
20
+ - [#2291](https://github.com/primer/view_components/pull/2291) [`725bbd95`](https://github.com/opf/primer_view_components/commit/725bbd954564995667398b1ea0b1388d4f6d8410) Thanks [@camertron](https://github.com/camertron)! - Allow ActionMenu items to submit multiple values on form submission; fix keyboard handling for submit items
21
+
22
+ <!-- Changed components: Primer::Alpha::ActionMenu -->
23
+
24
+ ### Patch Changes
25
+
26
+ - [#2286](https://github.com/primer/view_components/pull/2286) [`02e7f785`](https://github.com/opf/primer_view_components/commit/02e7f785666bb85f522fe31c51a51c9a58806e33) Thanks [@langermank](https://github.com/langermank)! - fix SegmentedControl alignment issues
27
+
28
+ <!-- Changed components: SegmentedControl -->
29
+
30
+ - [#2288](https://github.com/primer/view_components/pull/2288) [`caf09967`](https://github.com/opf/primer_view_components/commit/caf09967dd29668f380e509514ec98b9aa95baa7) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Fixes issue where sometimes a dialog cannot be closed if another is open
31
+
32
+ <!-- Changed components: Primer::Alpha::Dialog -->
33
+
34
+ - [#2292](https://github.com/primer/view_components/pull/2292) [`46e3ff02`](https://github.com/opf/primer_view_components/commit/46e3ff02bd1e253e2bfb3bb2a586c589b3aa0c5b) Thanks [@jonrohan](https://github.com/jonrohan)! - Fix ActionBar issue where left and end key don't loop around to end of the action bar items.
35
+
36
+ - [#2290](https://github.com/primer/view_components/pull/2290) [`f33eed35`](https://github.com/opf/primer_view_components/commit/f33eed35e619550bf2937d3f8f2ecaa219369d46) Thanks [@jonrohan](https://github.com/jonrohan)! - Bug fix: Respect autofocus attributes inside of a Dialog when opening a modal-dialog. When the dialog was opening before it was always focusing the first focusable element which was always the close button.
37
+
38
+ ## 0.12.1
39
+
40
+ ### Patch Changes
41
+
42
+ - [#39](https://github.com/opf/primer_view_components/pull/39) [`95b40c0e`](https://github.com/opf/primer_view_components/commit/95b40c0e31658a3331b04f14618c75129fff4d08) Thanks [@HDinger](https://github.com/HDinger)! - Update docs for setup instructions
43
+
44
+ <!-- Changed components: _none_ -->
45
+
46
+ ## 0.12.0
47
+
48
+ ### Minor Changes
49
+
50
+ - [#36](https://github.com/opf/primer_view_components/pull/36) [`cfa8b633`](https://github.com/opf/primer_view_components/commit/cfa8b633d7718abdb6ca5a54389fff542951c4d4) Thanks [@HDinger](https://github.com/HDinger)! - - Add FlexLayout Component
51
+
52
+ - Add GridLayout Component
53
+
54
+ <!-- Changed components: Primer::OpenProject::FlexLayout, Primer::OpenProject::GridLayout -->
55
+
56
+ - [#2240](https://github.com/primer/view_components/pull/2240) [`512fc39e`](https://github.com/opf/primer_view_components/commit/512fc39eef56321e2f2001604b4c4c89ca656c63) Thanks [@camertron](https://github.com/camertron)! - Allow anonymous forms, mostly useful for tests
57
+
58
+ <!-- Changed components: _none_ -->
59
+
60
+ - [#2241](https://github.com/primer/view_components/pull/2241) [`3f7e6198`](https://github.com/opf/primer_view_components/commit/3f7e61989c31a19fafc07b01ca48d5554ab269de) Thanks [@camertron](https://github.com/camertron)! - Enable validation messages on radio button and check box groups
61
+
62
+ <!-- Changed components: Primer::Alpha::CheckBoxGroup, Primer::Alpha::RadioButtonGroup -->
63
+
64
+ - [#2247](https://github.com/primer/view_components/pull/2247) [`09648632`](https://github.com/opf/primer_view_components/commit/09648632c5b083b87f03e006e38f303bd75bc9cc) Thanks [@jonrohan](https://github.com/jonrohan)! - Graduate NavList to beta status
65
+
66
+ <!-- Changed components: Primer::Alpha::NavList, Primer::Beta::NavList -->
67
+
68
+ - [#2251](https://github.com/primer/view_components/pull/2251) [`4a51102d`](https://github.com/opf/primer_view_components/commit/4a51102d49c57ac0caaafa54e1c422afc66dd8ca) Thanks [@camertron](https://github.com/camertron)! - Add header variant to Dialog
69
+
70
+ <!-- Changed components: Primer::Alpha::Dialog -->
71
+
72
+ ### Patch Changes
73
+
74
+ - [#2256](https://github.com/primer/view_components/pull/2256) [`fd17adfd`](https://github.com/opf/primer_view_components/commit/fd17adfd1cca6d034d3063b3ac7ab107b1725a8d) Thanks [@langermank](https://github.com/langermank)! - Fix disabled styles for radio
75
+
76
+ <!-- Changed components: _none_ -->
77
+
78
+ - [#2250](https://github.com/primer/view_components/pull/2250) [`66c4dd69`](https://github.com/opf/primer_view_components/commit/66c4dd6936b386caa42868beef9ea1b33f84b11b) Thanks [@langermank](https://github.com/langermank)! - - Improve contrast for icons in `invisible` button on hover in dark mode (within v8 colors)
79
+
80
+ - Fix disabled button styles (v8 colors)
81
+ - Bump Primitives to latest
82
+
83
+ <!-- Changed components: Primer::Beta::Button -->
84
+
85
+ - [#2242](https://github.com/primer/view_components/pull/2242) [`bc254f13`](https://github.com/opf/primer_view_components/commit/bc254f135eeb57b9872665d5e8ce1c30a8208f33) Thanks [@keithamus](https://github.com/keithamus)! - Remove background from anchored-position
86
+
87
+ <!-- Changed components: Primer::Alpha::ActionMenu, Primer::Alpha::Overlay -->
88
+
89
+ - [#2249](https://github.com/primer/view_components/pull/2249) [`1209d241`](https://github.com/opf/primer_view_components/commit/1209d2415c944796741c57150b8a41679d634fe5) Thanks [@camertron](https://github.com/camertron)! - Fix underline behavior in Link component
90
+
91
+ <!-- Changed components: Primer::Beta::Link -->
92
+
93
+ - [#2254](https://github.com/primer/view_components/pull/2254) [`cdb9fe4d`](https://github.com/opf/primer_view_components/commit/cdb9fe4d2e5d4c49c0aa4c76567709d9ac58ac7a) Thanks [@keithamus](https://github.com/keithamus)! - Only supply aria-label on Overlays with a role assigned
94
+
95
+ <!-- Changed components: Primer::Alpha::ActionMenu, Primer::Alpha::Overlay -->
96
+
97
+ - [#37](https://github.com/opf/primer_view_components/pull/37) [`a5979b8b`](https://github.com/opf/primer_view_components/commit/a5979b8b1a9d44b5902ad2492cdfe39f0e0b2fbd) Thanks [@HDinger](https://github.com/HDinger)! - Don't show a border for PageHeaders on mobile
98
+
99
+ <!-- Changed components: Primer::OpenProject::PageHeader -->
100
+
101
+ - [#2245](https://github.com/primer/view_components/pull/2245) [`495f911c`](https://github.com/opf/primer_view_components/commit/495f911c5c4be2d8722dbb811eacc23a35e7d36a) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Fix bug in ActionMenu keyboard navigation, where items aren't skipped when they're functionally `[hidden]`.
102
+
103
+ <!-- Changed components: Primer::Alpha::ActionMenu -->
104
+
105
+ - [#2244](https://github.com/primer/view_components/pull/2244) [`3c5fb3a7`](https://github.com/opf/primer_view_components/commit/3c5fb3a70df51e10e720b97422678aa0b19a256e) Thanks [@camertron](https://github.com/camertron)! - Fix race condition causing dotcom axe check failures for icon button tooltips
106
+
107
+ <!-- Changed components: Primer::Alpha::Tooltip, Primer::Beta::IconButton -->
108
+
109
+ - [#2248](https://github.com/primer/view_components/pull/2248) [`9885a5d8`](https://github.com/opf/primer_view_components/commit/9885a5d8566df6c6b0dc165986c7cf60f051299a) Thanks [@keithamus](https://github.com/keithamus)! - Update popover support in older browsers.
110
+
111
+ <!-- Changed components: Primer::Alpha::ActionMenu, Primer::Alpha::Overlay -->
112
+
3
113
  ## 0.11.0
4
114
 
5
115
  ### Minor Changes
@@ -3,6 +3,7 @@ type Direction = 'n' | 's' | 'e' | 'w' | 'ne' | 'se' | 'nw' | 'sw';
3
3
  declare class ToolTipElement extends HTMLElement {
4
4
  #private;
5
5
  styles(): string;
6
+ get showReason(): "focus" | "mouse";
6
7
  get htmlFor(): string;
7
8
  set htmlFor(value: string);
8
9
  get type(): 'description' | 'label';
@@ -6,7 +6,7 @@ import './anchored_position';
6
6
  import './focus_group';
7
7
  import './alpha/image_crop';
8
8
  import './alpha/modal_dialog';
9
- import './alpha/nav_list';
9
+ import './beta/nav_list';
10
10
  import './alpha/segmented_control';
11
11
  import './alpha/toggle_switch';
12
12
  import './alpha/tool_tip';