primer_view_components 0.31.0 → 0.33.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 +41 -0
  3. data/app/assets/javascripts/app/components/primer/alpha/x_banner.d.ts +5 -0
  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.css +1 -1
  10. data/app/components/primer/alpha/action_list.css.json +33 -50
  11. data/app/components/primer/alpha/action_list.css.map +1 -1
  12. data/app/components/primer/alpha/action_menu/action_menu_element.js +20 -7
  13. data/app/components/primer/alpha/action_menu/action_menu_element.ts +20 -7
  14. data/app/components/primer/alpha/auto_complete.css +1 -1
  15. data/app/components/primer/alpha/auto_complete.css.json +3 -5
  16. data/app/components/primer/alpha/auto_complete.css.map +1 -1
  17. data/app/components/primer/alpha/banner.css +1 -1
  18. data/app/components/primer/alpha/banner.css.json +5 -5
  19. data/app/components/primer/alpha/banner.css.map +1 -1
  20. data/app/components/primer/alpha/banner.rb +6 -0
  21. data/app/components/primer/alpha/button_marketing.css +1 -1
  22. data/app/components/primer/alpha/button_marketing.css.json +1 -4
  23. data/app/components/primer/alpha/button_marketing.css.map +1 -1
  24. data/app/components/primer/alpha/dialog.css +1 -1
  25. data/app/components/primer/alpha/dialog.css.json +7 -7
  26. data/app/components/primer/alpha/dialog.css.map +1 -1
  27. data/app/components/primer/alpha/layout.css +1 -1
  28. data/app/components/primer/alpha/layout.css.json +9 -15
  29. data/app/components/primer/alpha/layout.css.map +1 -1
  30. data/app/components/primer/alpha/menu.css +1 -1
  31. data/app/components/primer/alpha/menu.css.json +1 -3
  32. data/app/components/primer/alpha/menu.css.map +1 -1
  33. data/app/components/primer/alpha/overlay.css +1 -1
  34. data/app/components/primer/alpha/overlay.css.json +1 -0
  35. data/app/components/primer/alpha/overlay.css.map +1 -1
  36. data/app/components/primer/alpha/overlay.pcss +4 -0
  37. data/app/components/primer/alpha/segmented_control.css +1 -1
  38. data/app/components/primer/alpha/segmented_control.css.json +5 -5
  39. data/app/components/primer/alpha/segmented_control.css.map +1 -1
  40. data/app/components/primer/alpha/select_panel.rb +3 -3
  41. data/app/components/primer/alpha/select_panel_element.js +30 -18
  42. data/app/components/primer/alpha/select_panel_element.ts +31 -20
  43. data/app/components/primer/alpha/tab_nav.css +1 -1
  44. data/app/components/primer/alpha/tab_nav.css.json +1 -3
  45. data/app/components/primer/alpha/tab_nav.css.map +1 -1
  46. data/app/components/primer/alpha/text_field.css +1 -1
  47. data/app/components/primer/alpha/text_field.css.json +37 -78
  48. data/app/components/primer/alpha/text_field.css.map +1 -1
  49. data/app/components/primer/alpha/toggle_switch.css +1 -1
  50. data/app/components/primer/alpha/toggle_switch.css.json +1 -1
  51. data/app/components/primer/alpha/toggle_switch.css.map +1 -1
  52. data/app/components/primer/alpha/toggle_switch.rb +2 -1
  53. data/app/components/primer/alpha/underline_nav.css +1 -1
  54. data/app/components/primer/alpha/underline_nav.css.json +2 -4
  55. data/app/components/primer/alpha/underline_nav.css.map +1 -1
  56. data/app/components/primer/alpha/x_banner.d.ts +5 -0
  57. data/app/components/primer/alpha/x_banner.js +4 -3
  58. data/app/components/primer/alpha/x_banner.ts +11 -3
  59. data/app/components/primer/beta/avatar_stack.css +1 -1
  60. data/app/components/primer/beta/avatar_stack.css.json +8 -8
  61. data/app/components/primer/beta/avatar_stack.css.map +1 -1
  62. data/app/components/primer/beta/border_box.css +1 -1
  63. data/app/components/primer/beta/border_box.css.json +4 -4
  64. data/app/components/primer/beta/border_box.css.map +1 -1
  65. data/app/components/primer/beta/breadcrumbs.css +1 -1
  66. data/app/components/primer/beta/breadcrumbs.css.json +1 -2
  67. data/app/components/primer/beta/breadcrumbs.css.map +1 -1
  68. data/app/components/primer/beta/button.css +1 -1
  69. data/app/components/primer/beta/button.css.json +6 -8
  70. data/app/components/primer/beta/button.css.map +1 -1
  71. data/app/components/primer/beta/button.pcss +1 -1
  72. data/app/components/primer/beta/button_group.css +1 -1
  73. data/app/components/primer/beta/button_group.css.json +3 -3
  74. data/app/components/primer/beta/button_group.css.map +1 -1
  75. data/app/components/primer/beta/label.css +1 -1
  76. data/app/components/primer/beta/label.css.json +1 -2
  77. data/app/components/primer/beta/label.css.map +1 -1
  78. data/app/components/primer/beta/link.css +1 -1
  79. data/app/components/primer/beta/link.css.json +1 -3
  80. data/app/components/primer/beta/link.css.map +1 -1
  81. data/app/components/primer/beta/popover.css +1 -1
  82. data/app/components/primer/beta/popover.css.json +16 -22
  83. data/app/components/primer/beta/popover.css.map +1 -1
  84. data/app/components/primer/beta/spinner.html.erb +8 -6
  85. data/app/components/primer/beta/spinner.rb +3 -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/app/lib/primer/attributes_helper.rb +10 -0
  92. data/lib/primer/forms/primer_text_field.ts +1 -0
  93. data/lib/primer/view_components/linters/base_linter.rb +4 -2
  94. data/lib/primer/view_components/linters/blankslate_component_migration_counter.rb +1 -1
  95. data/lib/primer/view_components/linters/select_menu_migration_counter.rb +14 -0
  96. data/lib/primer/view_components/version.rb +1 -1
  97. data/previews/primer/alpha/select_panel_preview/eventually_local_fetch.html.erb +2 -1
  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 +1 -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 +17 -11
  103. data/static/arguments.json +1 -1
  104. data/static/classes.json +39 -21
  105. data/static/info_arch.json +16 -3
  106. data/static/previews.json +13 -0
  107. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffaebf4672da733bf37dbfd1ef0c18944ccaa81513dcab8ab4f327c97977cdb0
4
- data.tar.gz: 77599bb66cc493732365c60cf6708711d7bc40663e5221d2be8961791a428327
3
+ metadata.gz: 35e6f316ff10780d56803278c1fd7da7afb60de270f8d73c4a7cabacc5f2a991
4
+ data.tar.gz: 0dac08367aa635097cd13b41bc753bdd2e20b95c7835093cd092d23e154bdf69
5
5
  SHA512:
6
- metadata.gz: 9747c444b5cfd1643eb09d9011c95f675819bba724766f5f7de20742322a2eb7dabe4494068b8107963b41a4a4a68fbd5995463da1ab84f33231871b1d497bcc
7
- data.tar.gz: 5cfa1e5f8da796ca9055d34cae7f67eb8216dd35e0a4d9420a88177b102736526bb3de95799ac7248aed867470f665c7247db66d67c35103b0a1c6afe9366997
6
+ metadata.gz: 86ac6ca76b8496cd3a5d7d32f5f82477d56a08fcfa37e8346ff58dca1c7da1395f4f6d8c78452868ede454ed43910893c4ff0bc5ec09dceab4ca1cb5fd696c07
7
+ data.tar.gz: d1c8315d615c17757ef19c2a8ffea19448ba03ce736a2b4b073c0219beaa28945ec697b59ada88531eb9d2681ece7a2da67dfa51049a28c4c5c6ae28203c76fa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.33.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#3026](https://github.com/primer/view_components/pull/3026) [`5be0a0f`](https://github.com/primer/view_components/commit/5be0a0f1e60e02cb5140e159fd6b68dfd25194fa) Thanks [@camertron](https://github.com/camertron)! - Fire an event when banners are dismissed
8
+
9
+ - [#3023](https://github.com/primer/view_components/pull/3023) [`3fb46ed`](https://github.com/primer/view_components/commit/3fb46ed1130f4a31e238b583de79db9d862c06a7) Thanks [@langermank](https://github.com/langermank)! - Bump `primer/primitives` v9
10
+
11
+ - [#3022](https://github.com/primer/view_components/pull/3022) [`01cbbea`](https://github.com/primer/view_components/commit/01cbbea74f1b102cfffed69b83b464394c8019b9) Thanks [@camertron](https://github.com/camertron)! - Add a linter for migrating from SelectMenu -> SelectPanel
12
+
13
+ ### Patch Changes
14
+
15
+ - [#3027](https://github.com/primer/view_components/pull/3027) [`5a205cd`](https://github.com/primer/view_components/commit/5a205cd63543c119b985e83e2800b8c2548cc051) Thanks [@camertron](https://github.com/camertron)! - Remove SelectPanel's backdrop
16
+
17
+ - [#3021](https://github.com/primer/view_components/pull/3021) [`8a16336`](https://github.com/primer/view_components/commit/8a16336d254321f43969c9ed5b72861dc4c53c2e) Thanks [@camertron](https://github.com/camertron)! - When hiding a `Spinner`, also hide its screen reader text
18
+
19
+ - [#3040](https://github.com/primer/view_components/pull/3040) [`612307d`](https://github.com/primer/view_components/commit/612307dd374352ccd71c8f82dbe7f065db54b9d4) Thanks [@camertron](https://github.com/camertron)! - Revert leading/trailing visuals for link component
20
+
21
+ - [#3038](https://github.com/primer/view_components/pull/3038) [`6b4983e`](https://github.com/primer/view_components/commit/6b4983e1ecc29e7cf80cb68f0d274346882123b7) Thanks [@jamieshark](https://github.com/jamieshark)! - SelectPanel: check for filter input when loading remote items.
22
+
23
+ ## 0.32.0
24
+
25
+ ### Minor Changes
26
+
27
+ - [#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
28
+
29
+ ### Patch Changes
30
+
31
+ - [#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
32
+
33
+ - [#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:
34
+
35
+ 1. If multiple server-rendered items are checked, the panel will only show one item checked.
36
+ 2. If no `data-value` attributes are provided, panels in single-select mode will allow multiple items to be checked.
37
+
38
+ - [#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
39
+ `eventually_local` SelectPanels
40
+
41
+ - [#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.
42
+ This started happening after the change in #2964 because `data-turbo=false` gets interpreted as a truthy value.
43
+
3
44
  ## 0.31.0
4
45
 
5
46
  ### Minor Changes
@@ -1,3 +1,8 @@
1
+ declare global {
2
+ interface HTMLElementEventMap {
3
+ 'banner:dismiss': CustomEvent<void>;
4
+ }
5
+ }
1
6
  declare class XBannerElement extends HTMLElement {
2
7
  #private;
3
8
  titleText: HTMLElement;
@@ -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
  }