primer_view_components 0.36.5 → 0.38.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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/app/assets/javascripts/components/primer/beta/details_toggle_element.d.ts +39 -0
  4. data/app/assets/javascripts/components/primer/primer.d.ts +1 -0
  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_menu/action_menu_element.js +13 -3
  10. data/app/components/primer/alpha/action_menu/action_menu_element.ts +14 -2
  11. data/app/components/primer/alpha/dialog.css +1 -1
  12. data/app/components/primer/alpha/dialog.css.json +0 -1
  13. data/app/components/primer/alpha/dialog.css.map +1 -1
  14. data/app/components/primer/alpha/dialog.pcss +1 -4
  15. data/app/components/primer/alpha/dropdown.rb +8 -0
  16. data/app/components/primer/alpha/form_control.rb +47 -7
  17. data/app/components/primer/alpha/toggle_switch.html.erb +1 -1
  18. data/app/components/primer/alpha/toggle_switch.js +1 -0
  19. data/app/components/primer/alpha/toggle_switch.rb +14 -2
  20. data/app/components/primer/alpha/toggle_switch.ts +1 -0
  21. data/app/components/primer/beta/auto_complete/item.rb +2 -3
  22. data/app/components/primer/beta/auto_complete/no_result_item.rb +21 -0
  23. data/app/components/primer/beta/details.html.erb +8 -6
  24. data/app/components/primer/beta/details.rb +42 -0
  25. data/app/components/primer/beta/details_toggle_element.d.ts +39 -0
  26. data/app/components/primer/beta/details_toggle_element.js +60 -0
  27. data/app/components/primer/beta/details_toggle_element.ts +57 -0
  28. data/app/components/primer/beta/markdown.rb +1 -0
  29. data/app/components/primer/beta/nav_list.rb +1 -1
  30. data/app/components/primer/dialog_helper.js +3 -0
  31. data/app/components/primer/dialog_helper.ts +3 -0
  32. data/app/components/primer/primer.d.ts +1 -0
  33. data/app/components/primer/primer.js +1 -0
  34. data/app/components/primer/primer.ts +1 -0
  35. data/app/lib/primer/forms/action_menu.html.erb +1 -1
  36. data/app/lib/primer/forms/action_menu.rb +5 -0
  37. data/lib/primer/view_components/version.rb +2 -2
  38. data/lib/primer/yard/component_manifest.rb +11 -10
  39. data/lib/primer/yard/lookbook_pages_backend.rb +8 -0
  40. data/previews/primer/alpha/action_menu_preview/multiple_select_form.html.erb +1 -1
  41. data/previews/primer/alpha/form_control_preview/playground.html.erb +14 -6
  42. data/previews/primer/alpha/overlay_preview.rb +0 -31
  43. data/previews/primer/alpha/select_preview.rb +6 -6
  44. data/previews/primer/alpha/text_field_preview.rb +22 -22
  45. data/previews/primer/alpha/toggle_switch_preview.rb +4 -0
  46. data/previews/primer/beta/auto_complete_preview.rb +6 -0
  47. data/previews/primer/beta/details_preview.rb +12 -0
  48. data/previews/primer/beta/markdown_preview.rb +9 -9
  49. data/previews/primer/beta/nav_list_preview/truncate.html.erb +25 -0
  50. data/previews/primer/beta/nav_list_preview.rb +4 -24
  51. data/previews/primer/beta/relative_time_preview.rb +20 -10
  52. data/static/arguments.json +23 -0
  53. data/static/audited_at.json +1 -0
  54. data/static/constants.json +8 -0
  55. data/static/info_arch.json +213 -85
  56. data/static/previews.json +42 -67
  57. data/static/statuses.json +1 -0
  58. metadata +8 -4
  59. data/previews/primer/alpha/overlay_preview/in_an_action_menu.html.erb +0 -13
  60. data/previews/primer/alpha/overlay_preview/overlay_with_header_filter.html.erb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3d5be7d8ad864a19c92d5b441ce1ed4167008906e67268f620b14e17dc62d85
4
- data.tar.gz: 836ec64b60f1019acfed7c71eacae2647cb71df70e18ea08c81be062c826416d
3
+ metadata.gz: 8872749bd02f10033b078dceb055b4c65a16ff7dac9cfb36863fe28ba170f62b
4
+ data.tar.gz: ee204f2aff496dd70691438ebb38cb6b853f8a8b233d79729dba2cfa31dcef7d
5
5
  SHA512:
6
- metadata.gz: 44f6895c1f42eafc715012b1ea1c7402a8a52aa93cf644dea0c6a939545f448360575ecd4d6a7a9e22fc3e5d6f30bef57f8912b031d7a862d39dc59e9acee561
7
- data.tar.gz: 03bb30ba7ea66bcc4c2022fe2d2ae51769d9dae0d669c891df415018de1cb13472ad2743daef07df13687f4546962f81709b067315ac02ea758b0aafde70dbfc
6
+ metadata.gz: 618de4ce2365779cc4686f18916ad6e975b28858188e05e0db334b84264e4fbdf325236eb1abeacc52b338fa9cc8e96c512b661be4d0430946c85d4a3a7a59ac
7
+ data.tar.gz: 07ed043e784d4ae8dec7b4c5ae7593b711c30df5f6c29cd8a05961405571beb1823de51b1a91909e67288bfd8102ad592c971527e6a9de97a9f8d142c68053fe
data/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.38.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#3321](https://github.com/primer/view_components/pull/3321) [`de2397d`](https://github.com/primer/view_components/commit/de2397d9e181a764cbedc292ac7d3487ad79f763) Thanks [@kendallgassner](https://github.com/kendallgassner)! - [Primer::Beta::Autocomplete] Added a new component to render inside the the Autocomplete dropdown: Primer::Beta::AutoComplete::NoResultItem. This new component can be used to display a message to indicate that there are no available results. This component is marked upas role='presentation' as the autocomplete component already uses aria-live to announce if there are no results.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#3334](https://github.com/primer/view_components/pull/3334) [`c6996b5`](https://github.com/primer/view_components/commit/c6996b508f6fcd3dc1f445aeb1346a8bc13f1fa4) Thanks [@klaustopher](https://github.com/klaustopher)! - Do not close dialogs when clicking on the backdrop if the dialog contains a form
12
+
13
+ - [#3377](https://github.com/primer/view_components/pull/3377) [`9626afb`](https://github.com/primer/view_components/commit/9626afbd904c713bdd0037b7cc3b7f78205b7408) Thanks [@jonrohan](https://github.com/jonrohan)! - Fixing bug in the select panel that pushes the page when any `:modal` is open.
14
+
15
+ ## 0.37.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#3292](https://github.com/primer/view_components/pull/3292) [`66637a4`](https://github.com/primer/view_components/commit/66637a4869431a53bcb39b24b907da7b930729ed) Thanks [@ktravers](https://github.com/ktravers)! - Improve Details component accessibility by setting aria-label and aria-expanded attributes correctly on initial render and when toggled open/closed.
20
+
21
+ ### Patch Changes
22
+
23
+ - [#3327](https://github.com/primer/view_components/pull/3327) [`e3e29b0`](https://github.com/primer/view_components/commit/e3e29b0e983b494fce7bdd95390908d4583ede16) Thanks [@acbreton](https://github.com/acbreton)! - Prevent scroll when opening `ActionMenu`s.
24
+
25
+ - [#3319](https://github.com/primer/view_components/pull/3319) [`42db9dd`](https://github.com/primer/view_components/commit/42db9dd724b0edd3806fdc0661f248d87b0d8f5f) Thanks [@ktravers](https://github.com/ktravers)! - Adds optional autofocus to ToggleSwitch
26
+
27
+ - [#3291](https://github.com/primer/view_components/pull/3291) [`aeaeb96`](https://github.com/primer/view_components/commit/aeaeb9632f651bbfbb45c630a1d088b1fe3303b8) Thanks [@francinelucca](https://github.com/francinelucca)! - fix(ToggleSwitch): add X-Requested-With header
28
+
29
+ - [#3318](https://github.com/primer/view_components/pull/3318) [`081e5dd`](https://github.com/primer/view_components/commit/081e5dd9f2912dc3b7070f2af5c235c31b5a306c) Thanks [@kendallgassner](https://github.com/kendallgassner)! - [ActionMenuForm] Add aria-describedby to the ActionMenuForm's button so that the label is describing the button
30
+
31
+ - [#3316](https://github.com/primer/view_components/pull/3316) [`4552438`](https://github.com/primer/view_components/commit/45524387a016bb8dab7555bd40ff4dd2e84f3bb2) Thanks [@camertron](https://github.com/camertron)! - Correct accessibility issues in FormControl examples and address missing aria attributes
32
+
33
+ - [#3303](https://github.com/primer/view_components/pull/3303) [`7fbd8da`](https://github.com/primer/view_components/commit/7fbd8da673f4a4c9459712379c240a923784f42d) Thanks [@camertron](https://github.com/camertron)! - Do not populate dynamic label with active item in multi-select mode
34
+
3
35
  ## 0.36.5
4
36
 
5
37
  ### Patch Changes
@@ -0,0 +1,39 @@
1
+ /**
2
+ * A companion Catalyst element for the Details view component. This element
3
+ * ensures the <details> and <summary> elements markup is properly accessible by
4
+ * updating the aria-label and aria-expanded attributes on click.
5
+ *
6
+ * aria-label values default to "Expand" and "Collapse". To override those
7
+ * values, use the `data-aria-label-open` and `data-aria-label-closed`
8
+ * attributes on the summary target.
9
+ *
10
+ * @example
11
+ * ```html
12
+ * <details-toggle>
13
+ * <details open=true data-target="details-toggle.detailsTarget">
14
+ * <summary
15
+ * aria-expanded="true"
16
+ * aria-label="Collapse me"
17
+ * data-target="details-toggle.summaryTarget"
18
+ * data-action="click:details-toggle#toggle"
19
+ * data-aria-label-closed="Expand me"
20
+ * data-aria-label-open="Collapse me"
21
+ * >
22
+ * Click me
23
+ * </summary>
24
+ * <div>Contents</div>
25
+ * </details>
26
+ * </details-toggle>
27
+ * ```
28
+ */
29
+ declare class DetailsToggleElement extends HTMLElement {
30
+ detailsTarget: HTMLDetailsElement;
31
+ summaryTarget: HTMLElement;
32
+ toggle(): void;
33
+ }
34
+ declare global {
35
+ interface Window {
36
+ DetailsToggleElement: typeof DetailsToggleElement;
37
+ }
38
+ }
39
+ export {};
@@ -25,3 +25,4 @@ import '../../lib/primer/forms/primer_text_field';
25
25
  import '../../lib/primer/forms/toggle_switch_input';
26
26
  import './alpha/action_menu/action_menu_element';
27
27
  import './alpha/select_panel_element';
28
+ import './beta/details_toggle_element';