@primer/css 0.0.0-20220323031013 → 0.0.0-20220323180404

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 (129) hide show
  1. package/CHANGELOG.md +93 -3
  2. package/CONTRIBUTING.md +6 -4
  3. package/README.md +2 -2
  4. package/actionlist/action-list-item-divider.scss +8 -2
  5. package/actionlist/action-list-item.scss +158 -130
  6. package/actionlist/action-list-tree.scss +101 -6
  7. package/actionlist/action-list.scss +29 -0
  8. package/alerts/flash.scss +6 -2
  9. package/autocomplete/autocomplete.scss +17 -1
  10. package/base/kbd.scss +0 -1
  11. package/base/normalize.scss +1 -1
  12. package/base/typography-base.scss +3 -2
  13. package/blankslate/blankslate.scss +20 -1
  14. package/box/box.scss +0 -3
  15. package/buttons/button.scss +1 -0
  16. package/color-modes/native.scss +11 -0
  17. package/core/index.scss +1 -5
  18. package/dist/actionlist.css +1 -1
  19. package/dist/actionlist.css.map +1 -1
  20. package/dist/alerts.css +1 -1
  21. package/dist/alerts.css.map +1 -1
  22. package/dist/autocomplete.css +1 -1
  23. package/dist/autocomplete.css.map +1 -1
  24. package/dist/avatars.css.map +1 -1
  25. package/dist/base.css +1 -1
  26. package/dist/base.css.map +1 -1
  27. package/dist/blankslate.css +1 -1
  28. package/dist/blankslate.css.map +1 -1
  29. package/dist/box.css.map +1 -1
  30. package/dist/branch-name.css.map +1 -1
  31. package/dist/breadcrumb.css.map +1 -1
  32. package/dist/buttons.css.map +1 -1
  33. package/dist/color-modes.css +1 -1
  34. package/dist/color-modes.css.map +1 -1
  35. package/dist/core.css +1 -1
  36. package/dist/core.css.map +1 -1
  37. package/dist/dropdown.css.map +1 -1
  38. package/dist/forms.css +1 -1
  39. package/dist/forms.css.map +1 -1
  40. package/dist/header.css.map +1 -1
  41. package/dist/labels.css +1 -1
  42. package/dist/labels.css.map +1 -1
  43. package/dist/layout.css +1 -1
  44. package/dist/layout.css.map +1 -1
  45. package/dist/links.css +1 -1
  46. package/dist/links.css.map +1 -1
  47. package/dist/loaders.css.map +1 -1
  48. package/dist/markdown.css +1 -1
  49. package/dist/markdown.css.map +1 -1
  50. package/dist/marketing-buttons.css.map +1 -1
  51. package/dist/marketing-links.css.map +1 -1
  52. package/dist/marketing-type.css.map +1 -1
  53. package/dist/marketing-utilities.css.map +1 -1
  54. package/dist/meta.json +31 -31
  55. package/dist/navigation.css.map +1 -1
  56. package/dist/pagination.css +1 -1
  57. package/dist/pagination.css.map +1 -1
  58. package/dist/popover.css.map +1 -1
  59. package/dist/primer.css +3 -3
  60. package/dist/primer.css.map +1 -1
  61. package/dist/product.css +1 -1
  62. package/dist/product.css.map +1 -1
  63. package/dist/progress.css.map +1 -1
  64. package/dist/select-menu.css.map +1 -1
  65. package/dist/stats/actionlist.json +1 -1
  66. package/dist/stats/alerts.json +1 -1
  67. package/dist/stats/autocomplete.json +1 -1
  68. package/dist/stats/base.json +1 -1
  69. package/dist/stats/blankslate.json +1 -1
  70. package/dist/stats/color-modes.json +1 -1
  71. package/dist/stats/core.json +1 -1
  72. package/dist/stats/forms.json +1 -1
  73. package/dist/stats/labels.json +1 -1
  74. package/dist/stats/layout.json +1 -1
  75. package/dist/stats/links.json +1 -1
  76. package/dist/stats/markdown.json +1 -1
  77. package/dist/stats/pagination.json +1 -1
  78. package/dist/stats/primer.json +1 -1
  79. package/dist/stats/product.json +1 -1
  80. package/dist/stats/subhead.json +1 -1
  81. package/dist/stats/utilities.json +1 -1
  82. package/dist/subhead.css +1 -1
  83. package/dist/subhead.css.map +1 -1
  84. package/dist/table-object.css.map +1 -1
  85. package/dist/timeline.css.map +1 -1
  86. package/dist/toasts.css.map +1 -1
  87. package/dist/tooltips.css.map +1 -1
  88. package/dist/truncate.css.map +1 -1
  89. package/dist/utilities.css +1 -1
  90. package/dist/utilities.css.map +1 -1
  91. package/dist/variables.json +7 -7
  92. package/forms/form-control.scss +1 -0
  93. package/forms/form-group.scss +2 -0
  94. package/forms/form-validation.scss +1 -1
  95. package/labels/labels.scss +11 -1
  96. package/labels/mixins.scss +7 -2
  97. package/labels/states.scss +2 -2
  98. package/layout/grid-offset.scss +1 -0
  99. package/layout/grid.scss +1 -0
  100. package/layout/layout.scss +2 -1
  101. package/layout/page-layout.scss +16 -12
  102. package/links/link.scss +1 -1
  103. package/markdown/code.scss +5 -0
  104. package/markdown/footnotes.scss +38 -26
  105. package/markdown/headings.scss +17 -0
  106. package/markdown/images.scss +1 -1
  107. package/markdown/markdown-body.scss +0 -8
  108. package/marketing/type/typography.scss +3 -0
  109. package/marketing/utilities/layout.scss +1 -0
  110. package/package.json +23 -18
  111. package/pagination/pagination.scss +38 -1
  112. package/popover/popover.scss +0 -1
  113. package/select-menu/select-menu.scss +1 -1
  114. package/subhead/subhead.scss +3 -0
  115. package/support/mixins/misc.scss +1 -23
  116. package/support/variables/layout.scss +1 -1
  117. package/table-object/table-object.scss +3 -0
  118. package/timeline/timeline-item.scss +0 -1
  119. package/utilities/colors.scss +16 -0
  120. package/utilities/layout.scss +1 -1
  121. package/utilities/margin.scss +4 -1
  122. package/utilities/padding.scss +3 -1
  123. package/button-refactor/ButtonsLinksAPI.md +0 -116
  124. package/button-refactor/button-group.scss +0 -27
  125. package/button-refactor/button.scss +0 -344
  126. package/button-refactor/icon-button.scss +0 -14
  127. package/button-refactor/link-styled-as-button.scss +0 -75
  128. package/button-refactor/link.scss +0 -28
  129. package/table-object/README.md +0 -25
package/CHANGELOG.md CHANGED
@@ -1,6 +1,96 @@
1
1
  # @primer/css
2
2
 
3
- ## 0.0.0-20220323031013
3
+ ## 0.0.0-20220323180404
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1991](https://github.com/primer/css/pull/1991) [`5e87effa`](https://github.com/primer/css/commit/5e87effa671b194e188f699a79b246bdf61bd191) Thanks [@simurai](https://github.com/simurai)! - Fix `btn-primary` in flash alerts
8
+
9
+ * Fake entry to force publishing
10
+
11
+ ## 19.6.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#1989](https://github.com/primer/css/pull/1989) [`f544ef85`](https://github.com/primer/css/commit/f544ef8574a4d6e12cccf94d534ad66df3e9249a) Thanks [@vdepizzol](https://github.com/vdepizzol)! - Make `pane` an optional region for PageLayout component
16
+
17
+ ### Patch Changes
18
+
19
+ - [#1988](https://github.com/primer/css/pull/1988) [`e3443f1a`](https://github.com/primer/css/commit/e3443f1a69ba5a23d3e3804bf4e22d384783c443) Thanks [@simurai](https://github.com/simurai)! - Fix color-fg utilities in links
20
+
21
+ * [#1985](https://github.com/primer/css/pull/1985) [`c2bd6bc9`](https://github.com/primer/css/commit/c2bd6bc9bf90686f258af11c102097d7da000a5b) Thanks [@cheshire137](https://github.com/cheshire137)! - Adding .color-bg-transparent utility class
22
+
23
+ ## 19.5.1
24
+
25
+ ### Patch Changes
26
+
27
+ - [#1983](https://github.com/primer/css/pull/1983) [`07bc069e`](https://github.com/primer/css/commit/07bc069ec0faae9c0e4530e5171e3346fa643a10) Thanks [@simurai](https://github.com/simurai)! - Bump `primer/primitives` to `^7.5.1`
28
+
29
+ ## 19.5.0
30
+
31
+ ### Minor Changes
32
+
33
+ - [#1948](https://github.com/primer/css/pull/1948) [`6a83a92b`](https://github.com/primer/css/commit/6a83a92b4332d577cdd72eee084e3f2c41b588ee) Thanks [@simurai](https://github.com/simurai)! - Add `open` and `closed` color roles
34
+
35
+ * [#1961](https://github.com/primer/css/pull/1961) [`a35a8bdc`](https://github.com/primer/css/commit/a35a8bdcc17906848fcb486842d2345db0441c7c) Thanks [@jonrohan](https://github.com/jonrohan)! - Default .PageLayout to display block
36
+
37
+ ### Patch Changes
38
+
39
+ - [#1954](https://github.com/primer/css/pull/1954) [`30f29d38`](https://github.com/primer/css/commit/30f29d383256a7d4023a859fdeee44471307159d) Thanks [@simurai](https://github.com/simurai)! - Fix `input-block` in `form-group`
40
+
41
+ * [#1956](https://github.com/primer/css/pull/1956) [`39063461`](https://github.com/primer/css/commit/3906346182ed983d9725fd95da41b21424378b3e) Thanks [@jonrohan](https://github.com/jonrohan)! - Upgrading @primer/stylelint-config@12.3.2
42
+
43
+ - [#1931](https://github.com/primer/css/pull/1931) [`e5c5312e`](https://github.com/primer/css/commit/e5c5312ec8bf139f6c94d2f70ceecd4b3cd9fd82) Thanks [@vdepizzol](https://github.com/vdepizzol)! - Page layout api updates renaming spacing options in storybook
44
+
45
+ * [#1950](https://github.com/primer/css/pull/1950) [`7c85c500`](https://github.com/primer/css/commit/7c85c500569fe6e1b29665c2eed37d58625ab06f) Thanks [@hectahertz](https://github.com/hectahertz)! - Fix sequence of content in Subhead
46
+
47
+ - [#1942](https://github.com/primer/css/pull/1942) [`0450ccbb`](https://github.com/primer/css/commit/0450ccbb86104564c7d4038eb68989f370014fa1) Thanks [@reeceatkinson](https://github.com/reeceatkinson)! - Added line break to docs
48
+
49
+ * [#1953](https://github.com/primer/css/pull/1953) [`3a91a29a`](https://github.com/primer/css/commit/3a91a29a822a28ea9679fbbb90250fc039057f23) Thanks [@hectahertz](https://github.com/hectahertz)! - Use `<h2>` instead of `<div>` on Subhead-heading docs
50
+
51
+ - [#1949](https://github.com/primer/css/pull/1949) [`dab83198`](https://github.com/primer/css/commit/dab83198c3bf1c7e03826b8cd498b8c48c9a2869) Thanks [@heiskr](https://github.com/heiskr)! - Render headings inline when in a `<summary>`
52
+
53
+ * [#1978](https://github.com/primer/css/pull/1978) [`a00e6bce`](https://github.com/primer/css/commit/a00e6bce01b368d9cb6da5ec2af1d833f4d785c1) Thanks [@langermank](https://github.com/langermank)! - Handle pointer-events on ActionList visuals
54
+
55
+ - [#1977](https://github.com/primer/css/pull/1977) [`80bf9d9d`](https://github.com/primer/css/commit/80bf9d9dea6fe7fbb0837fea265ec95cbbbd75d6) Thanks [@jonrohan](https://github.com/jonrohan)! - [Bug Fix] Adding white-space nowrap to Labels
56
+
57
+ ## 19.4.0
58
+
59
+ ### Minor Changes
60
+
61
+ - [#1937](https://github.com/primer/css/pull/1937) [`67f08009`](https://github.com/primer/css/commit/67f08009ef458088b9fda6267ab25ad6d0a514aa) Thanks [@langermank](https://github.com/langermank)! - TreeView single item nesting
62
+
63
+ * [#1905](https://github.com/primer/css/pull/1905) [`50221a54`](https://github.com/primer/css/commit/50221a5486d28c54dc1f578b459addd867bd01d3) Thanks [@langermank](https://github.com/langermank)! - Refactors NavigationList to better handle accessibility. Backwards compatible for TreeView CSS.
64
+
65
+ - [#1936](https://github.com/primer/css/pull/1936) [`c53ecdff`](https://github.com/primer/css/commit/c53ecdff5442cf4ac5da0d1e2ba45871ab662855) Thanks [@khiga8](https://github.com/khiga8)! - Deprecating `.tooltipped` CSS classes
66
+
67
+ ### Patch Changes
68
+
69
+ - [#1928](https://github.com/primer/css/pull/1928) [`0fb67895`](https://github.com/primer/css/commit/0fb6789555652860cfa5178b60433eb2c3d2575c) Thanks [@simurai](https://github.com/simurai)! - Fix `<sup><a>` from getting wrapped with `[ ]`
70
+
71
+ ## 19.3.0
72
+
73
+ ### Minor Changes
74
+
75
+ - [#1876](https://github.com/primer/css/pull/1876) [`bcf447ab`](https://github.com/primer/css/commit/bcf447ab226e6043dd47c1fcc395ba104af866d4) Thanks [@vdepizzol](https://github.com/vdepizzol)! - Add mono font stack to <samp> tag
76
+
77
+ * [#1919](https://github.com/primer/css/pull/1919) [`21085f5c`](https://github.com/primer/css/commit/21085f5c6cc538b5014a47de76642554a4291cc6) Thanks [@hectahertz](https://github.com/hectahertz)! - Add blankslate classes to replace utilities
78
+
79
+ ### Patch Changes
80
+
81
+ - [#1892](https://github.com/primer/css/pull/1892) [`55bd498b`](https://github.com/primer/css/commit/55bd498b7357e86659ac574f0f745f7b420fb6d3) Thanks [@langermank](https://github.com/langermank)! - Patch: Fix ActionList--divided for label with inline description scenarios
82
+
83
+ * [#1906](https://github.com/primer/css/pull/1906) [`f02d9a3e`](https://github.com/primer/css/commit/f02d9a3e4e86c2659a9f507995bcb90c5226e34e) Thanks [@jonrohan](https://github.com/jonrohan)! - Upgrading @primer/stylelint-config@12.3.0 and fixing violations
84
+
85
+ - [#1908](https://github.com/primer/css/pull/1908) [`84581e96`](https://github.com/primer/css/commit/84581e96aee50ff3883907dfe1069701edd1c24a) Thanks [@simurai](https://github.com/simurai)! - Reduce size of `Label--inline`
86
+
87
+ * [#1890](https://github.com/primer/css/pull/1890) [`74d0438b`](https://github.com/primer/css/commit/74d0438bd4dbaed447b553c5d3c8b945da282836) Thanks [@andrialexandrou](https://github.com/andrialexandrou)! - Adds --color-accent-emphasis and --color-fg-on-emphasis rules for Windows High Contrast Mode
88
+
89
+ - [#1882](https://github.com/primer/css/pull/1882) [`4a06aba1`](https://github.com/primer/css/commit/4a06aba1d3f80bcc228ff4360d0e02d5ace158ff) Thanks [@tqwewe](https://github.com/tqwewe)! - Fix layout gutter none styles
90
+
91
+ * [#1894](https://github.com/primer/css/pull/1894) [`d1adf595`](https://github.com/primer/css/commit/d1adf595308afb97f83c5ca172222944189a5961) Thanks [@simurai](https://github.com/simurai)! - Make `pagination` responsive by default
92
+
93
+ ## 19.2.0
4
94
 
5
95
  ### Minor Changes
6
96
 
@@ -12,7 +102,7 @@
12
102
 
13
103
  * [#1869](https://github.com/primer/css/pull/1869) [`868f61a1`](https://github.com/primer/css/commit/868f61a199df14862922d52905de66cdb1e1c192) Thanks [@jdanyow](https://github.com/jdanyow)! - Minor bugfix for AvatarStack. Removing the box-shadow from the AvatarStack-body on hover.
14
104
 
15
- - Fake entry to force publishing
105
+ - [#1856](https://github.com/primer/css/pull/1856) [`cbe3fb56`](https://github.com/primer/css/commit/cbe3fb56e4c7ee6bfe803eb0c15e15ab95d84157) Thanks [@langermank](https://github.com/langermank)! - ActionList item outlines for high contrast theme
16
106
 
17
107
  * [#1870](https://github.com/primer/css/pull/1870) [`815daff9`](https://github.com/primer/css/commit/815daff9f07d8096d572cf75bee17284f36492f6) Thanks [@vdepizzol](https://github.com/vdepizzol)! - [ActionList] Add hover to `aria-current` elements and other micro interactions
18
108
 
@@ -253,7 +343,7 @@
253
343
 
254
344
  ### Patch Changes
255
345
 
256
- - [#1540](https://github.com/primer/css/pull/1540) [`6b6e89a8`](https://github.com/primer/css/commit/6b6e89a8bff2319ef75d25217dafc272a5e597f0) Thanks [@joelhawksley](https://github.com/joelhawksley)! - Use standard lifecyle milestones for statuses.
346
+ - [#1540](https://github.com/primer/css/pull/1540) [`6b6e89a8`](https://github.com/primer/css/commit/6b6e89a8bff2319ef75d25217dafc272a5e597f0) Thanks [@joelhawksley](https://github.com/joelhawksley)! - Use standard lifecycle milestones for statuses.
257
347
 
258
348
  * [#1528](https://github.com/primer/css/pull/1528) [`303cacae`](https://github.com/primer/css/commit/303cacae77244a9e0de02b4caee2a8c01097aced) Thanks [@koddsson](https://github.com/koddsson)! - Convert package to a ES module
259
349
 
package/CONTRIBUTING.md CHANGED
@@ -58,13 +58,15 @@ Anyone can open a pull request on Primer CSS. You do not need to work at GitHub
58
58
  2. Configure and install the dependencies: `npm install`
59
59
  3. Create a new branch from main `git checkout -b my-branch-name`
60
60
  4. Make your changes and commit them.
61
- 5. Push your branch and open a pull request. Add a comment describing your proposed changes and request a review from `@primer/css-reviewers`.
62
- 6. Wait for CI tests to finish.
61
+ 5. Create a changeset for your changes: `npx changeset`
62
+ - See [changesets/changesets](https://github.com/changesets/changesets) for more information.
63
+ 6. Push your branch and open a pull request. Add a comment describing your proposed changes and request a review from `@primer/css-reviewers`.
64
+ 7. Wait for CI tests to finish.
63
65
  - If the tests pass, you should see a status check telling you which alpha version of `@primer/css` you can install with npm to test your work in other projects.
64
66
  - If the tests fail, review the logs and address any issues.
65
67
  - If the builds fail for any other reason (as they occasionally do), they may need to be manually restarted.
66
- 7. When CI tests pass, a new npm alpha release will be posted under the CI checks, you can use this npm version for testing in your project or with a GitHub site if you are staff.
67
- 8. Pat yourself on the back and wait for your pull request to be reviewed.
68
+ 8. When CI tests pass, a new npm alpha release will be posted under the CI checks, you can use this npm version for testing in your project or with a GitHub site if you are staff.
69
+ 9. Pat yourself on the back and wait for your pull request to be reviewed.
68
70
 
69
71
  Here are a few things you can do that will increase the likelihood of your pull request being accepted:
70
72
 
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img width="300px" src="./docs/src/readme.png">
2
+ <img width="300px" alt="" src="./docs/src/readme.png">
3
3
  </p>
4
4
 
5
5
  <h1 align="center">Primer CSS</h1>
@@ -14,7 +14,7 @@
14
14
  <img alt="" src="https://github.com/primer/css/actions/workflows/ci.yml/badge.svg">
15
15
  </a>
16
16
  <a aria-label="contributors graph" href="https://github.com/primer/css/graphs/contributors">
17
- <img src="https://img.shields.io/github/contributors/primer/css.svg">
17
+ <img alt="" src="https://img.shields.io/github/contributors/primer/css.svg">
18
18
  </a>
19
19
  <a aria-label="last commit" href="https://github.com/primer/css/commits/main">
20
20
  <img alt="" src="https://img.shields.io/github/last-commit/primer/css.svg">
@@ -1,10 +1,9 @@
1
- // emtpy divider
1
+ // empty divider
2
2
 
3
3
  .ActionList-sectionDivider {
4
4
  // has children
5
5
  &:not(:empty) {
6
6
  display: flex;
7
- // stylelint-disable-next-line primer/spacing
8
7
  padding: ($spacer-1 * 1.5) $spacer-2;
9
8
  font-size: $font-size-small;
10
9
  font-weight: $font-weight-bold;
@@ -14,6 +13,7 @@
14
13
 
15
14
  // no children
16
15
  &:empty {
16
+ display: block;
17
17
  height: 1px;
18
18
  padding: 0;
19
19
  // stylelint-disable-next-line primer/spacing
@@ -22,6 +22,12 @@
22
22
  background: var(--color-action-list-item-inline-divider);
23
23
  border: 0;
24
24
  }
25
+
26
+ .ActionList-sectionDivider-title {
27
+ font-size: $font-size-small;
28
+ font-weight: $font-weight-bold;
29
+ color: var(--color-fg-muted);
30
+ }
25
31
  }
26
32
 
27
33
  .ActionList-sectionDivider--filled {
@@ -1,4 +1,4 @@
1
- // stylelint-disable max-nesting-depth, selector-max-specificity
1
+ // stylelint-disable max-nesting-depth, selector-max-specificity, selector-max-compound-selectors
2
2
 
3
3
  @mixin focusOutline {
4
4
  position: relative;
@@ -24,48 +24,57 @@
24
24
  list-style: none;
25
25
  background-color: transparent;
26
26
  border-radius: $border-radius;
27
- touch-action: manipulation;
28
- -webkit-tap-highlight-color: transparent;
29
27
 
30
28
  &:hover,
31
29
  &:active {
32
30
  cursor: pointer;
33
-
34
- // a href
35
- .ActionList-content {
36
- text-decoration: none;
37
- }
38
31
  }
39
32
 
40
33
  // only hover li without list as children
41
- &:not(.ActionList-item--hasSubItem) {
34
+ &:not(.ActionList-item--hasSubItem),
35
+ // target contents of first child li if sub-item (li wraps item label + nested ul)
36
+ &.ActionList-item--hasSubItem > .ActionList-content {
42
37
  @media (hover: hover) {
43
38
  &:hover {
44
39
  cursor: pointer;
45
40
  background-color: var(--color-action-list-item-default-hover-bg);
41
+
42
+ &:not(.ActionList-item--navActive) {
43
+ // Support for "Windows high contrast mode"
44
+ outline: $border-style $border-width transparent;
45
+ outline-offset: -$border-width;
46
+ // stylelint-disable-next-line primer/box-shadow
47
+ box-shadow: inset 0 0 0 2px var(--color-action-list-item-default-active-border);
48
+ }
46
49
  }
47
50
  }
48
51
 
49
52
  &:active {
50
53
  background: var(--color-action-list-item-default-active-bg);
51
54
 
55
+ &:not(.ActionList-item--navActive) {
56
+ // Support for "Windows high contrast mode" https://sarahmhigley.com/writing/whcm-quick-tips/
57
+ outline: $border-style $border-width transparent;
58
+ outline-offset: -$border-width;
59
+ // stylelint-disable-next-line primer/box-shadow
60
+ box-shadow: inset 0 0 0 2px var(--color-action-list-item-default-active-border);
61
+ }
62
+
52
63
  @media screen and (prefers-reduced-motion: no-preference) {
53
64
  animation: ActionList-item-active-bg 4s forwards cubic-bezier(0.33, 1, 0.68, 1);
54
65
  }
55
66
 
56
- // stylelint-disable primer/box-shadow
57
67
  @keyframes ActionList-item-active-bg {
58
68
  50% {
59
- box-shadow: inset 0 0 0 rgba(#000, 0.04);
69
+ // stylelint-disable-next-line primer/box-shadow
70
+ box-shadow: inset 0 2px 12px 6px rgba(var(--color-canvas-default), 0.4);
60
71
  transform: scale(1);
61
72
  }
62
73
 
63
74
  100% {
64
- box-shadow: inset 0 3px 9px rgba(#000, 0.04);
65
75
  transform: scale(0.97);
66
76
  }
67
77
  }
68
- // stylelint-enable primer/box-shadow
69
78
  }
70
79
 
71
80
  // hide dividers
@@ -76,6 +85,11 @@
76
85
  + .ActionList-item .ActionList-item-label::before {
77
86
  visibility: hidden;
78
87
  }
88
+
89
+ .ActionList-item-descriptionWrap--inline::before,
90
+ + .ActionList-item .ActionList-item-descriptionWrap--inline::before {
91
+ visibility: hidden;
92
+ }
79
93
  }
80
94
  }
81
95
  // stylelint-disable-next-line no-duplicate-selectors
@@ -136,101 +150,6 @@
136
150
  }
137
151
  }
138
152
 
139
- // collapsible item [aria-expanded]
140
-
141
- // nesting (single level)
142
- // target items inside expanded subgroups
143
- &[aria-expanded] {
144
- .ActionList--subGroup {
145
- @media screen and (prefers-reduced-motion: no-preference) {
146
- transition: opacity 160ms cubic-bezier(0.25, 1, 0.5, 1), transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
147
- }
148
-
149
- .ActionList-content {
150
- padding-left: $spacer-4;
151
- }
152
- }
153
-
154
- // has 16px leading visual
155
- .ActionList-content--visual16 + .ActionList--subGroup {
156
- // stylelint-disable-next-line selector-max-compound-selectors
157
- .ActionList-content {
158
- padding-left: $spacer-5;
159
- }
160
- }
161
-
162
- // has 20px leading visual
163
- .ActionList-content--visual20 + .ActionList--subGroup {
164
- // stylelint-disable-next-line selector-max-compound-selectors
165
- .ActionList-content {
166
- padding-left: $spacer-2 * 4.5; // 36px
167
- }
168
- }
169
-
170
- // has 24px leading visual
171
- .ActionList-content--visual24 + .ActionList--subGroup {
172
- // stylelint-disable-next-line selector-max-compound-selectors
173
- .ActionList-content {
174
- padding-left: $spacer-6;
175
- }
176
- }
177
- }
178
-
179
- &[aria-expanded='true'] {
180
- .ActionList-item-collapseIcon {
181
- transition: transform 120ms linear;
182
- transform: scaleY(-1);
183
- }
184
-
185
- .ActionList--subGroup {
186
- height: auto;
187
- overflow: visible;
188
- visibility: visible;
189
- opacity: 1;
190
- transform: translateY(0);
191
- }
192
-
193
- &.ActionList-item--hasActiveSubItem {
194
- > .ActionList-content > .ActionList-item-label {
195
- font-weight: $font-weight-bold;
196
- }
197
- }
198
- }
199
-
200
- &[aria-expanded='false'] {
201
- .ActionList-item-collapseIcon {
202
- transition: transform 120ms linear;
203
- transform: scaleY(1);
204
- }
205
-
206
- .ActionList--subGroup {
207
- height: 0;
208
- overflow: hidden;
209
- visibility: hidden;
210
- opacity: 0;
211
- transform: translateY(-$spacer-3);
212
- }
213
-
214
- // show active indicator on parent collapse if child is active
215
- &.ActionList-item--hasActiveSubItem {
216
- background: var(--color-action-list-item-default-selected-bg);
217
-
218
- .ActionList-item-label {
219
- font-weight: $font-weight-bold;
220
- }
221
-
222
- &::before,
223
- + .ActionList-item::before {
224
- visibility: hidden;
225
- }
226
-
227
- // blue accent line
228
- &::after {
229
- @include activeIndicatorLine;
230
- }
231
- }
232
- }
233
-
234
153
  // checkbox item [aria-checked]
235
154
  // listbox [aria-selected]
236
155
 
@@ -345,26 +264,9 @@
345
264
  }
346
265
  }
347
266
 
348
- &:active {
349
- background: var(--color-action-list-item-danger-active-bg);
350
- }
351
- }
352
-
353
- // disabled
354
- &[aria-disabled='true'] {
355
- .ActionList-item-label,
356
- .ActionList-item-description {
357
- color: var(--color-primer-fg-disabled);
358
- }
359
-
360
- .ActionList-item-visual {
361
- fill: var(--color-primer-fg-disabled);
362
- }
363
-
364
- @media (hover: hover) {
365
- &:hover {
366
- cursor: not-allowed;
367
- background-color: transparent;
267
+ .ActionList-content {
268
+ &:active {
269
+ background: var(--color-action-list-item-danger-active-bg);
368
270
  }
369
271
  }
370
272
  }
@@ -376,19 +278,26 @@
376
278
  }
377
279
  }
378
280
 
379
- // span or a href
281
+ // button or a href
380
282
  .ActionList-content {
381
283
  position: relative;
382
284
  display: grid;
285
+ width: 100%;
383
286
  // stylelint-disable-next-line primer/spacing
384
287
  padding: $actionList-item-padding-vertical $actionList-item-padding-horizontal;
385
288
  font-size: $body-font-size;
386
289
  font-weight: $font-weight-normal;
387
290
  color: var(--color-fg-default);
291
+ text-align: left;
388
292
  user-select: none;
389
- touch-action: manipulation;
293
+ background-color: transparent;
294
+ // stylelint-disable-next-line declaration-property-value-disallowed-list
295
+ border: none;
390
296
  border-radius: $border-radius;
391
297
  transition: $actionList-item-bg-transition;
298
+ touch-action: manipulation;
299
+ touch-action: manipulation;
300
+ -webkit-tap-highlight-color: transparent;
392
301
  grid-template-rows: min-content;
393
302
  grid-template-areas: 'leadingAction leadingVisual label trailingVisual trailingAction';
394
303
  grid-template-columns: min-content min-content minmax(0, auto) min-content min-content;
@@ -399,10 +308,127 @@
399
308
  margin-right: $spacer-2;
400
309
  }
401
310
 
311
+ // state
312
+
313
+ &:hover {
314
+ text-decoration: none;
315
+ }
316
+
402
317
  &:focus-visible {
403
318
  @include focusOutline;
404
319
  }
405
320
 
321
+ // disabled
322
+ &[aria-disabled='true'] {
323
+ .ActionList-item-label,
324
+ .ActionList-item-description {
325
+ color: var(--color-primer-fg-disabled);
326
+ }
327
+
328
+ .ActionList-item-visual {
329
+ fill: var(--color-primer-fg-disabled);
330
+ }
331
+
332
+ @media (hover: hover) {
333
+ &:hover {
334
+ cursor: not-allowed;
335
+ background-color: transparent;
336
+ }
337
+ }
338
+ }
339
+
340
+ // collapsible item [aria-expanded]
341
+
342
+ // nesting (single level)
343
+ // target items inside expanded subgroups
344
+ &[aria-expanded] {
345
+ + .ActionList--subGroup {
346
+ @media screen and (prefers-reduced-motion: no-preference) {
347
+ transition: opacity 160ms cubic-bezier(0.25, 1, 0.5, 1), transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
348
+ }
349
+
350
+ .ActionList-content {
351
+ padding-left: $spacer-4;
352
+ }
353
+ }
354
+
355
+ // has 16px leading visual
356
+ &.ActionList-content--visual16 + .ActionList--subGroup {
357
+ .ActionList-content {
358
+ padding-left: $spacer-5;
359
+ }
360
+ }
361
+
362
+ // has 20px leading visual
363
+ &.ActionList-content--visual20 + .ActionList--subGroup {
364
+ .ActionList-content {
365
+ padding-left: $spacer-2 * 4.5; // 36px
366
+ }
367
+ }
368
+
369
+ // has 24px leading visual
370
+ &.ActionList-content--visual24 + .ActionList--subGroup {
371
+ .ActionList-content {
372
+ padding-left: $spacer-6;
373
+ }
374
+ }
375
+ }
376
+
377
+ &[aria-expanded='true'] {
378
+ .ActionList-item-collapseIcon {
379
+ transition: transform 120ms linear;
380
+ transform: scaleY(-1);
381
+ }
382
+
383
+ + .ActionList--subGroup {
384
+ height: auto;
385
+ overflow: visible;
386
+ visibility: visible;
387
+ opacity: 1;
388
+ transform: translateY(0);
389
+ }
390
+
391
+ &.ActionList-content--hasActiveSubItem {
392
+ > .ActionList-item-label {
393
+ font-weight: $font-weight-bold;
394
+ }
395
+ }
396
+ }
397
+
398
+ &[aria-expanded='false'] {
399
+ .ActionList-item-collapseIcon {
400
+ transition: transform 120ms linear;
401
+ transform: scaleY(1);
402
+ }
403
+
404
+ + .ActionList--subGroup {
405
+ height: 0;
406
+ overflow: hidden;
407
+ visibility: hidden;
408
+ opacity: 0;
409
+ transform: translateY(-$spacer-3);
410
+ }
411
+
412
+ // show active indicator on parent collapse if child is active
413
+ &.ActionList-content--hasActiveSubItem {
414
+ background: var(--color-action-list-item-default-selected-bg);
415
+
416
+ .ActionList-item-label {
417
+ font-weight: $font-weight-bold;
418
+ }
419
+
420
+ &::before,
421
+ + .ActionList-item::before {
422
+ visibility: hidden;
423
+ }
424
+
425
+ // blue accent line
426
+ &::after {
427
+ @include activeIndicatorLine;
428
+ }
429
+ }
430
+ }
431
+
406
432
  // sizes
407
433
 
408
434
  &.ActionList-content--sizeMedium {
@@ -475,6 +501,7 @@
475
501
 
476
502
  // inline
477
503
  .ActionList-item-descriptionWrap--inline {
504
+ position: relative;
478
505
  flex-direction: row;
479
506
  align-items: baseline;
480
507
 
@@ -499,6 +526,7 @@
499
526
  display: flex;
500
527
  min-height: $actionList-item-height-sm;
501
528
  color: var(--color-fg-muted); // if visual is text
529
+ pointer-events: none;
502
530
  fill: var(--color-fg-muted);
503
531
  align-items: center;
504
532
  }