primer_view_components 0.30.0 → 0.32.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +51 -0
  3. data/app/assets/javascripts/app/components/primer/alpha/select_panel_element.d.ts +0 -1
  4. data/app/assets/javascripts/app/components/primer/shared_events.d.ts +2 -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_list/item.html.erb +1 -5
  10. data/app/components/primer/alpha/action_list/item.rb +10 -3
  11. data/app/components/primer/alpha/action_list.css +1 -1
  12. data/app/components/primer/alpha/action_list.css.json +33 -50
  13. data/app/components/primer/alpha/action_list.css.map +1 -1
  14. data/app/components/primer/alpha/action_menu/action_menu_element.js +20 -7
  15. data/app/components/primer/alpha/action_menu/action_menu_element.ts +20 -7
  16. data/app/components/primer/alpha/auto_complete.css +1 -1
  17. data/app/components/primer/alpha/auto_complete.css.json +3 -5
  18. data/app/components/primer/alpha/auto_complete.css.map +1 -1
  19. data/app/components/primer/alpha/banner.css +1 -1
  20. data/app/components/primer/alpha/banner.css.json +5 -5
  21. data/app/components/primer/alpha/banner.css.map +1 -1
  22. data/app/components/primer/alpha/button_marketing.css +1 -1
  23. data/app/components/primer/alpha/button_marketing.css.json +1 -4
  24. data/app/components/primer/alpha/button_marketing.css.map +1 -1
  25. data/app/components/primer/alpha/dialog.css +1 -1
  26. data/app/components/primer/alpha/dialog.css.json +7 -7
  27. data/app/components/primer/alpha/dialog.css.map +1 -1
  28. data/app/components/primer/alpha/layout.css +1 -1
  29. data/app/components/primer/alpha/layout.css.json +9 -15
  30. data/app/components/primer/alpha/layout.css.map +1 -1
  31. data/app/components/primer/alpha/menu.css +1 -1
  32. data/app/components/primer/alpha/menu.css.json +1 -3
  33. data/app/components/primer/alpha/menu.css.map +1 -1
  34. data/app/components/primer/alpha/segmented_control.css +1 -1
  35. data/app/components/primer/alpha/segmented_control.css.json +5 -5
  36. data/app/components/primer/alpha/segmented_control.css.map +1 -1
  37. data/app/components/primer/alpha/segmented_control.pcss +1 -0
  38. data/app/components/primer/alpha/select_panel.rb +5 -4
  39. data/app/components/primer/alpha/select_panel_element.d.ts +0 -1
  40. data/app/components/primer/alpha/select_panel_element.js +55 -26
  41. data/app/components/primer/alpha/select_panel_element.ts +53 -29
  42. data/app/components/primer/alpha/tab_nav.css +1 -1
  43. data/app/components/primer/alpha/tab_nav.css.json +1 -3
  44. data/app/components/primer/alpha/tab_nav.css.map +1 -1
  45. data/app/components/primer/alpha/text_field.css +1 -1
  46. data/app/components/primer/alpha/text_field.css.json +37 -78
  47. data/app/components/primer/alpha/text_field.css.map +1 -1
  48. data/app/components/primer/alpha/toggle_switch.css +1 -1
  49. data/app/components/primer/alpha/toggle_switch.css.json +1 -1
  50. data/app/components/primer/alpha/toggle_switch.css.map +1 -1
  51. data/app/components/primer/alpha/toggle_switch.rb +2 -1
  52. data/app/components/primer/alpha/tool_tip.js +2 -2
  53. data/app/components/primer/alpha/tool_tip.ts +2 -2
  54. data/app/components/primer/alpha/underline_nav.css +1 -1
  55. data/app/components/primer/alpha/underline_nav.css.json +2 -4
  56. data/app/components/primer/alpha/underline_nav.css.map +1 -1
  57. data/app/components/primer/beta/avatar_stack.css +1 -1
  58. data/app/components/primer/beta/avatar_stack.css.json +8 -8
  59. data/app/components/primer/beta/avatar_stack.css.map +1 -1
  60. data/app/components/primer/beta/border_box.css +1 -1
  61. data/app/components/primer/beta/border_box.css.json +4 -4
  62. data/app/components/primer/beta/border_box.css.map +1 -1
  63. data/app/components/primer/beta/breadcrumbs.css +1 -1
  64. data/app/components/primer/beta/breadcrumbs.css.json +1 -2
  65. data/app/components/primer/beta/breadcrumbs.css.map +1 -1
  66. data/app/components/primer/beta/button.css +1 -1
  67. data/app/components/primer/beta/button.css.json +6 -8
  68. data/app/components/primer/beta/button.css.map +1 -1
  69. data/app/components/primer/beta/button_group.css +1 -1
  70. data/app/components/primer/beta/button_group.css.json +3 -3
  71. data/app/components/primer/beta/button_group.css.map +1 -1
  72. data/app/components/primer/beta/label.css +1 -1
  73. data/app/components/primer/beta/label.css.json +1 -2
  74. data/app/components/primer/beta/label.css.map +1 -1
  75. data/app/components/primer/beta/link.css +1 -1
  76. data/app/components/primer/beta/link.css.json +1 -3
  77. data/app/components/primer/beta/link.css.map +1 -1
  78. data/app/components/primer/beta/popover.css +1 -1
  79. data/app/components/primer/beta/popover.css.json +16 -22
  80. data/app/components/primer/beta/popover.css.map +1 -1
  81. data/app/components/primer/beta/relative_time.rb +4 -4
  82. data/app/components/primer/beta/spinner.html.erb +1 -1
  83. data/app/components/primer/beta/state.css +1 -1
  84. data/app/components/primer/beta/state.css.map +1 -1
  85. data/app/components/primer/beta/state.pcss +4 -0
  86. data/app/components/primer/beta/truncate.css +1 -1
  87. data/app/components/primer/beta/truncate.css.json +5 -5
  88. data/app/components/primer/beta/truncate.css.map +1 -1
  89. data/app/components/primer/shared_events.d.ts +2 -0
  90. data/app/components/primer/shared_events.ts +2 -0
  91. data/lib/primer/forms/primer_text_field.js +3 -0
  92. data/lib/primer/forms/primer_text_field.ts +4 -0
  93. data/lib/primer/view_components/linters/details_menu_migration.rb +30 -1
  94. data/lib/primer/view_components/linters/tooltipped_migration.rb +1 -1
  95. data/lib/primer/view_components/version.rb +1 -1
  96. data/previews/primer/alpha/action_list_preview.rb +1 -1
  97. data/previews/primer/alpha/select_panel_preview/list_of_links.html.erb +16 -0
  98. data/previews/primer/alpha/select_panel_preview/no_values.html.erb +19 -0
  99. data/previews/primer/alpha/select_panel_preview/playground.html.erb +2 -1
  100. data/previews/primer/alpha/select_panel_preview/remote_fetch.html.erb +4 -1
  101. data/previews/primer/alpha/select_panel_preview/single_select.html.erb +4 -4
  102. data/previews/primer/alpha/select_panel_preview.rb +23 -7
  103. data/static/arguments.json +6 -6
  104. data/static/classes.json +39 -21
  105. data/static/info_arch.json +72 -13
  106. data/static/previews.json +26 -0
  107. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df08f8b3592da5d14d7c7f499196a5b1c1898de05aa142549c6cae24e0be3510
4
- data.tar.gz: c49357f994349d15acb41452eaeabbe2894af4cab2fbde1faa9a5d5cb56030f2
3
+ metadata.gz: c1610cdfe75fea880531dfa774fc5f9089468cfd87ede0579fc540fcc06e1576
4
+ data.tar.gz: 297bfe3ccfdf56378a935945af1dfb8ce42a38652d805ae544d5ce8b49712e7e
5
5
  SHA512:
6
- metadata.gz: b53813e3c073e678c72b674f72961168d1f541240ce7a23ab9066d1a8f8149674c587ef108a10cbdf0d071a6f6b2c963d8681434899294e8f76a7286ffd642c7
7
- data.tar.gz: bee8c4d789c67332a6f1751209dd2155d9638212af2461344bbc2b6bc23e2bd6d3a90b64bd4dc1cc2b91f5f63878740a121db816a9d3b1e2e392047284131d19
6
+ metadata.gz: 5af328feb8f98e3a35fb551b038c3932d49c36d70fc3217ed759060b3212b3b1b9d05fc39c88c0ad6d1f7a7193b5aba5b2bc3254e5feabff5040d3230e2fe095
7
+ data.tar.gz: 9c3c36edc613e20b81b096800fd92d046afd8a3fb670fe4f21e3cdfc8989d1d879ff168a184be641aec170d0aab5a16630e27dc87f12c9cc5f82990495416967
data/CHANGELOG.md CHANGED
@@ -1,5 +1,56 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.32.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#3009](https://github.com/primer/view_components/pull/3009) [`8f06f7a`](https://github.com/primer/view_components/commit/8f06f7a61bccf684db56ff8ddd275447db10c409) Thanks [@camertron](https://github.com/camertron)! - Include value in event metadata when SelectPanel items are activated
8
+
9
+ ### Patch Changes
10
+
11
+ - [#2983](https://github.com/primer/view_components/pull/2983) [`5d68193`](https://github.com/primer/view_components/commit/5d681938247c4a957d62b05c2560fef24195ff51) Thanks [@keithamus](https://github.com/keithamus)! - Ensure ActionMenu restores focus on close of a dialog, if a menu item opened that dialog
12
+
13
+ - [#3010](https://github.com/primer/view_components/pull/3010) [`ebab85a`](https://github.com/primer/view_components/commit/ebab85a3a3d2644079aaf495fd1e6689b89f713b) Thanks [@camertron](https://github.com/camertron)! - Fixes several SelectPanel bugs:
14
+
15
+ 1. If multiple server-rendered items are checked, the panel will only show one item checked.
16
+ 2. If no `data-value` attributes are provided, panels in single-select mode will allow multiple items to be checked.
17
+
18
+ - [#3011](https://github.com/primer/view_components/pull/3011) [`9507093`](https://github.com/primer/view_components/commit/9507093d6e9a1f7b04c25d66d51bdbb5da805fdd) Thanks [@JoyceZhu](https://github.com/JoyceZhu)! - Remove "loading" screenreader-only text after Spinner load for
19
+ `eventually_local` SelectPanels
20
+
21
+ - [#3012](https://github.com/primer/view_components/pull/3012) [`adcdddd`](https://github.com/primer/view_components/commit/adcdddd1c1d0524c4d2f6d57980052914d680dc8) Thanks [@orhantoy](https://github.com/orhantoy)! - Fix a bug where all requests from the `ToggleSwitch` view component are being made with a Turbo Accept header.
22
+ This started happening after the change in #2964 because `data-turbo=false` gets interpreted as a truthy value.
23
+
24
+ ## 0.31.0
25
+
26
+ ### Minor Changes
27
+
28
+ - [#2984](https://github.com/primer/view_components/pull/2984) [`c56f325`](https://github.com/primer/view_components/commit/c56f3254128999ed69cdaeefb5a48cd08636fca0) Thanks [@camertron](https://github.com/camertron)! - Add ability to attach a test selector to ActionList items
29
+
30
+ ### Patch Changes
31
+
32
+ - [#2995](https://github.com/primer/view_components/pull/2995) [`0647fed`](https://github.com/primer/view_components/commit/0647fedd4c0a9c23c5312f8e753a346e3ac42960) Thanks [@camertron](https://github.com/camertron)! - Allow ActionList item content to be supplied by positional arg
33
+
34
+ - [#2979](https://github.com/primer/view_components/pull/2979) [`ae6e3d7`](https://github.com/primer/view_components/commit/ae6e3d73d5bc70492a151845e4d35c48f5510fa5) Thanks [@langermank](https://github.com/langermank)! - Prep for high contrast theme updates
35
+
36
+ - [#2986](https://github.com/primer/view_components/pull/2986) [`4d8ec0c`](https://github.com/primer/view_components/commit/4d8ec0c67c748d07ff3c2b69d6bdaff408461d8e) Thanks [@kendallgassner](https://github.com/kendallgassner)! - Fixes Alpha::SelectPanel remote loading bug where items from the server were overriding the users selections. Additionally, update the #removeSelectedItem function to grab the data-value from the correct element.
37
+
38
+ - [#2987](https://github.com/primer/view_components/pull/2987) [`82f0267`](https://github.com/primer/view_components/commit/82f026711246f6f5409e79e4cffb74cc5145b39c) Thanks [@kendallgassner](https://github.com/kendallgassner)! - Ensure focus is set on SelectPanel item when arrowing down from input
39
+
40
+ - [#2997](https://github.com/primer/view_components/pull/2997) [`0d0b5bc`](https://github.com/primer/view_components/commit/0d0b5bcf2d2fd9f328f69545f850d825d2cc435b) Thanks [@camertron](https://github.com/camertron)! - Prevent an empty list of custom regexes in the DetailsMenuMigration linter from reporting false-positives
41
+
42
+ - [#2978](https://github.com/primer/view_components/pull/2978) [`fac1ec9`](https://github.com/primer/view_components/commit/fac1ec9aed4c05d1034bb04d24c1380c9ef06c97) Thanks [@camertron](https://github.com/camertron)! - Ensure pressing 'Enter' in SelectPanel filter input causes navigation if first item is link.
43
+
44
+ - [#2996](https://github.com/primer/view_components/pull/2996) [`53abaa6`](https://github.com/primer/view_components/commit/53abaa6a14ace48cf5d016edf58cf60930cd764e) Thanks [@kendallgassner](https://github.com/kendallgassner)! - Remove tabindex="-1" from li elements labelled as role="none" since tabindex's remove/negate role presentation
45
+
46
+ - [#2989](https://github.com/primer/view_components/pull/2989) [`36a044a`](https://github.com/primer/view_components/commit/36a044a28f6070e422681c8765693d1c21411fea) Thanks [@JoyceZhu](https://github.com/JoyceZhu)! - Add `aria-haspopup` and `aria-expanded` to `SelectPanel` state
47
+
48
+ - [#2994](https://github.com/primer/view_components/pull/2994) [`3bf8fd4`](https://github.com/primer/view_components/commit/3bf8fd4142a7647bd4cc2798f7e62bf1046092b4) Thanks [@kendallgassner](https://github.com/kendallgassner)! - Add aria-labelledby on the SelectPanel dialog
49
+
50
+ - [#2985](https://github.com/primer/view_components/pull/2985) [`868b49e`](https://github.com/primer/view_components/commit/868b49ee1e8d82066be91a6ffe97d948c1d7dc43) Thanks [@jamieshark](https://github.com/jamieshark)! - Adds custom config for DetailsMenuMigration linter.
51
+
52
+ - [#2988](https://github.com/primer/view_components/pull/2988) [`a5eefd9`](https://github.com/primer/view_components/commit/a5eefd9b5c7b8e6463b64ce6f7b3c46f65897759) Thanks [@gjtorikian](https://github.com/gjtorikian)! - Fix documentation comments in relative_time.rb
53
+
3
54
  ## 0.30.0
4
55
 
5
56
  ### Minor Changes
@@ -6,7 +6,6 @@ type SelectedItem = {
6
6
  label: string | null | undefined;
7
7
  value: string | null | undefined;
8
8
  inputName: string | null | undefined;
9
- element: SelectPanelItem;
10
9
  };
11
10
  export type SelectPanelItem = HTMLLIElement;
12
11
  export type FilterFn = (item: SelectPanelItem, query: string) => boolean;
@@ -1,9 +1,11 @@
1
1
  export type ItemActivatedEvent = {
2
2
  item: Element;
3
3
  checked: boolean;
4
+ value: string | null;
4
5
  };
5
6
  declare global {
6
7
  interface HTMLElementEventMap {
7
8
  itemActivated: CustomEvent<ItemActivatedEvent>;
9
+ beforeItemActivated: CustomEvent<ItemActivatedEvent>;
8
10
  }
9
11
  }