@primer/css 0.0.0-20220323012846 → 0.0.0-20220323031013
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.
- package/CHANGELOG.md +2 -64
- package/README.md +2 -2
- package/actionlist/action-list-item-divider.scss +1 -7
- package/actionlist/action-list-item.scss +130 -157
- package/actionlist/action-list-tree.scss +5 -100
- package/actionlist/action-list.scss +0 -29
- package/base/kbd.scss +1 -0
- package/base/normalize.scss +1 -1
- package/base/typography-base.scss +2 -3
- package/blankslate/blankslate.scss +1 -20
- package/box/box.scss +3 -0
- package/button-refactor/ButtonsLinksAPI.md +116 -0
- package/button-refactor/button-group.scss +27 -0
- package/button-refactor/button.scss +344 -0
- package/button-refactor/icon-button.scss +14 -0
- package/button-refactor/link-styled-as-button.scss +75 -0
- package/button-refactor/link.scss +28 -0
- package/buttons/button.scss +0 -1
- package/color-modes/native.scss +0 -11
- package/core/index.scss +5 -1
- package/dist/actionlist.css +1 -1
- package/dist/actionlist.css.map +1 -1
- package/dist/alerts.css.map +1 -1
- package/dist/autocomplete.css.map +1 -1
- package/dist/avatars.css.map +1 -1
- package/dist/base.css +1 -1
- package/dist/base.css.map +1 -1
- package/dist/blankslate.css +1 -1
- package/dist/blankslate.css.map +1 -1
- package/dist/box.css.map +1 -1
- package/dist/branch-name.css.map +1 -1
- package/dist/breadcrumb.css.map +1 -1
- package/dist/buttons.css.map +1 -1
- package/dist/color-modes.css +1 -1
- package/dist/color-modes.css.map +1 -1
- package/dist/core.css +1 -1
- package/dist/core.css.map +1 -1
- package/dist/dropdown.css.map +1 -1
- package/dist/forms.css +1 -1
- package/dist/forms.css.map +1 -1
- package/dist/header.css.map +1 -1
- package/dist/labels.css +1 -1
- package/dist/labels.css.map +1 -1
- package/dist/layout.css +1 -1
- package/dist/layout.css.map +1 -1
- package/dist/links.css.map +1 -1
- package/dist/loaders.css.map +1 -1
- package/dist/markdown.css +1 -1
- package/dist/markdown.css.map +1 -1
- package/dist/marketing-buttons.css.map +1 -1
- package/dist/marketing-links.css.map +1 -1
- package/dist/marketing-type.css.map +1 -1
- package/dist/marketing-utilities.css.map +1 -1
- package/dist/meta.json +86 -86
- package/dist/navigation.css.map +1 -1
- package/dist/pagination.css +1 -1
- package/dist/pagination.css.map +1 -1
- package/dist/popover.css.map +1 -1
- package/dist/primer.css +3 -3
- package/dist/primer.css.map +1 -1
- package/dist/product.css +1 -1
- package/dist/product.css.map +1 -1
- package/dist/progress.css.map +1 -1
- package/dist/select-menu.css.map +1 -1
- package/dist/stats/actionlist.json +1 -1
- package/dist/stats/base.json +1 -1
- package/dist/stats/blankslate.json +1 -1
- package/dist/stats/color-modes.json +1 -1
- package/dist/stats/core.json +1 -1
- package/dist/stats/forms.json +1 -1
- package/dist/stats/labels.json +1 -1
- package/dist/stats/layout.json +1 -1
- package/dist/stats/markdown.json +1 -1
- package/dist/stats/pagination.json +1 -1
- package/dist/stats/primer.json +1 -1
- package/dist/stats/product.json +1 -1
- package/dist/stats/subhead.json +1 -1
- package/dist/subhead.css +1 -1
- package/dist/subhead.css.map +1 -1
- package/dist/table-object.css.map +1 -1
- package/dist/timeline.css.map +1 -1
- package/dist/toasts.css.map +1 -1
- package/dist/tooltips.css.map +1 -1
- package/dist/truncate.css.map +1 -1
- package/dist/utilities.css.map +1 -1
- package/dist/variables.json +7 -7
- package/forms/form-control.scss +0 -1
- package/forms/form-group.scss +0 -2
- package/labels/mixins.scss +2 -7
- package/layout/grid-offset.scss +0 -1
- package/layout/grid.scss +0 -1
- package/layout/index.scss +0 -1
- package/layout/layout.scss +1 -2
- package/layout/page-layout.scss +2 -3
- package/markdown/code.scss +0 -5
- package/markdown/footnotes.scss +26 -38
- package/markdown/headings.scss +0 -17
- package/markdown/markdown-body.scss +8 -0
- package/marketing/type/typography.scss +0 -3
- package/marketing/utilities/layout.scss +0 -1
- package/package.json +15 -20
- package/pagination/pagination.scss +1 -38
- package/popover/popover.scss +1 -0
- package/subhead/subhead.scss +0 -3
- package/support/mixins/misc.scss +23 -1
- package/table-object/README.md +25 -0
- package/table-object/table-object.scss +0 -3
- package/timeline/timeline-item.scss +1 -0
- package/utilities/margin.scss +1 -4
- package/utilities/padding.scss +1 -3
- package/layout/page-header.scss +0 -201
package/CHANGELOG.md
CHANGED
|
@@ -1,68 +1,6 @@
|
|
|
1
1
|
# @primer/css
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- [#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
|
|
8
|
-
|
|
9
|
-
### Patch Changes
|
|
10
|
-
|
|
11
|
-
- [#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`
|
|
12
|
-
|
|
13
|
-
* [#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
|
|
14
|
-
|
|
15
|
-
- [#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
|
|
16
|
-
|
|
17
|
-
* Fake entry to force publishing
|
|
18
|
-
|
|
19
|
-
- [#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
|
|
20
|
-
|
|
21
|
-
* [#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
|
|
22
|
-
|
|
23
|
-
- [#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
|
|
24
|
-
|
|
25
|
-
* [#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>`
|
|
26
|
-
|
|
27
|
-
- [#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
|
|
28
|
-
|
|
29
|
-
## 19.4.0
|
|
30
|
-
|
|
31
|
-
### Minor Changes
|
|
32
|
-
|
|
33
|
-
- [#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
|
|
34
|
-
|
|
35
|
-
* [#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.
|
|
36
|
-
|
|
37
|
-
- [#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
|
|
38
|
-
|
|
39
|
-
### Patch Changes
|
|
40
|
-
|
|
41
|
-
- [#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 `[ ]`
|
|
42
|
-
|
|
43
|
-
## 19.3.0
|
|
44
|
-
|
|
45
|
-
### Minor Changes
|
|
46
|
-
|
|
47
|
-
- [#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
|
|
48
|
-
|
|
49
|
-
* [#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
|
|
50
|
-
|
|
51
|
-
### Patch Changes
|
|
52
|
-
|
|
53
|
-
- [#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
|
|
54
|
-
|
|
55
|
-
* [#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
|
|
56
|
-
|
|
57
|
-
- [#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`
|
|
58
|
-
|
|
59
|
-
* [#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
|
|
60
|
-
|
|
61
|
-
- [#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
|
|
62
|
-
|
|
63
|
-
* [#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
|
|
64
|
-
|
|
65
|
-
## 19.2.0
|
|
3
|
+
## 0.0.0-20220323031013
|
|
66
4
|
|
|
67
5
|
### Minor Changes
|
|
68
6
|
|
|
@@ -74,7 +12,7 @@
|
|
|
74
12
|
|
|
75
13
|
* [#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.
|
|
76
14
|
|
|
77
|
-
-
|
|
15
|
+
- Fake entry to force publishing
|
|
78
16
|
|
|
79
17
|
* [#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
|
|
80
18
|
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img width="300px"
|
|
2
|
+
<img width="300px" 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
|
|
17
|
+
<img 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">
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// has children
|
|
5
5
|
&:not(:empty) {
|
|
6
6
|
display: flex;
|
|
7
|
+
// stylelint-disable-next-line primer/spacing
|
|
7
8
|
padding: ($spacer-1 * 1.5) $spacer-2;
|
|
8
9
|
font-size: $font-size-small;
|
|
9
10
|
font-weight: $font-weight-bold;
|
|
@@ -13,7 +14,6 @@
|
|
|
13
14
|
|
|
14
15
|
// no children
|
|
15
16
|
&:empty {
|
|
16
|
-
display: block;
|
|
17
17
|
height: 1px;
|
|
18
18
|
padding: 0;
|
|
19
19
|
// stylelint-disable-next-line primer/spacing
|
|
@@ -22,12 +22,6 @@
|
|
|
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
|
-
}
|
|
31
25
|
}
|
|
32
26
|
|
|
33
27
|
.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
|
|
2
2
|
|
|
3
3
|
@mixin focusOutline {
|
|
4
4
|
position: relative;
|
|
@@ -24,57 +24,48 @@
|
|
|
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;
|
|
27
29
|
|
|
28
30
|
&:hover,
|
|
29
31
|
&:active {
|
|
30
32
|
cursor: pointer;
|
|
33
|
+
|
|
34
|
+
// a href
|
|
35
|
+
.ActionList-content {
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
}
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
// only hover li without list as children
|
|
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 {
|
|
41
|
+
&:not(.ActionList-item--hasSubItem) {
|
|
37
42
|
@media (hover: hover) {
|
|
38
43
|
&:hover {
|
|
39
44
|
cursor: pointer;
|
|
40
45
|
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
|
-
}
|
|
49
46
|
}
|
|
50
47
|
}
|
|
51
48
|
|
|
52
49
|
&:active {
|
|
53
50
|
background: var(--color-action-list-item-default-active-bg);
|
|
54
51
|
|
|
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
|
-
|
|
63
52
|
@media screen and (prefers-reduced-motion: no-preference) {
|
|
64
53
|
animation: ActionList-item-active-bg 4s forwards cubic-bezier(0.33, 1, 0.68, 1);
|
|
65
54
|
}
|
|
66
55
|
|
|
56
|
+
// stylelint-disable primer/box-shadow
|
|
67
57
|
@keyframes ActionList-item-active-bg {
|
|
68
58
|
50% {
|
|
69
|
-
|
|
70
|
-
box-shadow: inset 0 2px 12px 6px rgba(var(--color-canvas-default), 0.4);
|
|
59
|
+
box-shadow: inset 0 0 0 rgba(#000, 0.04);
|
|
71
60
|
transform: scale(1);
|
|
72
61
|
}
|
|
73
62
|
|
|
74
63
|
100% {
|
|
64
|
+
box-shadow: inset 0 3px 9px rgba(#000, 0.04);
|
|
75
65
|
transform: scale(0.97);
|
|
76
66
|
}
|
|
77
67
|
}
|
|
68
|
+
// stylelint-enable primer/box-shadow
|
|
78
69
|
}
|
|
79
70
|
|
|
80
71
|
// hide dividers
|
|
@@ -85,11 +76,6 @@
|
|
|
85
76
|
+ .ActionList-item .ActionList-item-label::before {
|
|
86
77
|
visibility: hidden;
|
|
87
78
|
}
|
|
88
|
-
|
|
89
|
-
.ActionList-item-descriptionWrap--inline::before,
|
|
90
|
-
+ .ActionList-item .ActionList-item-descriptionWrap--inline::before {
|
|
91
|
-
visibility: hidden;
|
|
92
|
-
}
|
|
93
79
|
}
|
|
94
80
|
}
|
|
95
81
|
// stylelint-disable-next-line no-duplicate-selectors
|
|
@@ -150,6 +136,101 @@
|
|
|
150
136
|
}
|
|
151
137
|
}
|
|
152
138
|
|
|
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
|
+
|
|
153
234
|
// checkbox item [aria-checked]
|
|
154
235
|
// listbox [aria-selected]
|
|
155
236
|
|
|
@@ -264,9 +345,26 @@
|
|
|
264
345
|
}
|
|
265
346
|
}
|
|
266
347
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
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;
|
|
270
368
|
}
|
|
271
369
|
}
|
|
272
370
|
}
|
|
@@ -278,26 +376,19 @@
|
|
|
278
376
|
}
|
|
279
377
|
}
|
|
280
378
|
|
|
281
|
-
//
|
|
379
|
+
// span or a href
|
|
282
380
|
.ActionList-content {
|
|
283
381
|
position: relative;
|
|
284
382
|
display: grid;
|
|
285
|
-
width: 100%;
|
|
286
383
|
// stylelint-disable-next-line primer/spacing
|
|
287
384
|
padding: $actionList-item-padding-vertical $actionList-item-padding-horizontal;
|
|
288
385
|
font-size: $body-font-size;
|
|
289
386
|
font-weight: $font-weight-normal;
|
|
290
387
|
color: var(--color-fg-default);
|
|
291
|
-
text-align: left;
|
|
292
388
|
user-select: none;
|
|
293
|
-
|
|
294
|
-
// stylelint-disable-next-line declaration-property-value-disallowed-list
|
|
295
|
-
border: none;
|
|
389
|
+
touch-action: manipulation;
|
|
296
390
|
border-radius: $border-radius;
|
|
297
391
|
transition: $actionList-item-bg-transition;
|
|
298
|
-
touch-action: manipulation;
|
|
299
|
-
touch-action: manipulation;
|
|
300
|
-
-webkit-tap-highlight-color: transparent;
|
|
301
392
|
grid-template-rows: min-content;
|
|
302
393
|
grid-template-areas: 'leadingAction leadingVisual label trailingVisual trailingAction';
|
|
303
394
|
grid-template-columns: min-content min-content minmax(0, auto) min-content min-content;
|
|
@@ -308,127 +399,10 @@
|
|
|
308
399
|
margin-right: $spacer-2;
|
|
309
400
|
}
|
|
310
401
|
|
|
311
|
-
// state
|
|
312
|
-
|
|
313
|
-
&:hover {
|
|
314
|
-
text-decoration: none;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
402
|
&:focus-visible {
|
|
318
403
|
@include focusOutline;
|
|
319
404
|
}
|
|
320
405
|
|
|
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
|
-
|
|
432
406
|
// sizes
|
|
433
407
|
|
|
434
408
|
&.ActionList-content--sizeMedium {
|
|
@@ -501,7 +475,6 @@
|
|
|
501
475
|
|
|
502
476
|
// inline
|
|
503
477
|
.ActionList-item-descriptionWrap--inline {
|
|
504
|
-
position: relative;
|
|
505
478
|
flex-direction: row;
|
|
506
479
|
align-items: baseline;
|
|
507
480
|
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
// stylelint-disable max-nesting-depth, selector-max-compound-selectors, selector-max-specificity, no-duplicate-selectors, selector-max-type
|
|
2
1
|
// tree-view variant
|
|
3
2
|
// renders ActionList with default styling for tree-view
|
|
4
3
|
// collapse/expand icons presents as leadingActions, rotate 90deg
|
|
5
4
|
// connecting vertical lines between collapse groups
|
|
6
5
|
// consistent font-size between nested groups
|
|
7
6
|
|
|
8
|
-
@mixin activeIndicatorLine {
|
|
9
|
-
position: absolute;
|
|
10
|
-
top: calc(50% - 12px);
|
|
11
|
-
left: -$actionList-item-padding-horizontal;
|
|
12
|
-
width: $spacer-1;
|
|
13
|
-
height: $spacer-4;
|
|
14
|
-
content: '';
|
|
15
|
-
background: var(--color-accent-fg);
|
|
16
|
-
border-radius: $border-radius;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
7
|
@mixin treeConnectingLine($left) {
|
|
20
8
|
position: absolute;
|
|
21
9
|
left: $left;
|
|
@@ -33,94 +21,6 @@
|
|
|
33
21
|
}
|
|
34
22
|
|
|
35
23
|
.ActionList-item {
|
|
36
|
-
// class for single tree items not within a group
|
|
37
|
-
&.ActionList-item--singleton {
|
|
38
|
-
.ActionList-content {
|
|
39
|
-
padding-left: $spacer-5;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// start: copy from ActionList proper- backwards compatible for treeview with different markup structure
|
|
44
|
-
&[aria-expanded] {
|
|
45
|
-
.ActionList--subGroup {
|
|
46
|
-
@media screen and (prefers-reduced-motion: no-preference) {
|
|
47
|
-
transition: opacity 160ms cubic-bezier(0.25, 1, 0.5, 1), transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.ActionList-content {
|
|
51
|
-
padding-left: $spacer-4;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// has 16px leading visual
|
|
56
|
-
.ActionList-content--visual16 + .ActionList--subGroup {
|
|
57
|
-
.ActionList-content {
|
|
58
|
-
padding-left: $spacer-5;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// has 20px leading visual
|
|
63
|
-
.ActionList-content--visual20 + .ActionList--subGroup {
|
|
64
|
-
.ActionList-content {
|
|
65
|
-
padding-left: $spacer-2 * 4.5; // 36px
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// has 24px leading visual
|
|
70
|
-
.ActionList-content--visual24 + .ActionList--subGroup {
|
|
71
|
-
.ActionList-content {
|
|
72
|
-
padding-left: $spacer-6;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&[aria-expanded='true'] {
|
|
78
|
-
.ActionList-item-collapseIcon {
|
|
79
|
-
transition: transform 120ms linear;
|
|
80
|
-
transform: scaleY(-1);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.ActionList--subGroup {
|
|
84
|
-
height: auto;
|
|
85
|
-
overflow: visible;
|
|
86
|
-
visibility: visible;
|
|
87
|
-
opacity: 1;
|
|
88
|
-
transform: translateY(0);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&[aria-expanded='false'] {
|
|
93
|
-
.ActionList-item-collapseIcon {
|
|
94
|
-
transition: transform 120ms linear;
|
|
95
|
-
transform: scaleY(1);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.ActionList--subGroup {
|
|
99
|
-
height: 0;
|
|
100
|
-
overflow: hidden;
|
|
101
|
-
visibility: hidden;
|
|
102
|
-
opacity: 0;
|
|
103
|
-
transform: translateY(-$spacer-3);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// show active indicator on parent collapse if child is active
|
|
107
|
-
// this class changed in ActionList proper
|
|
108
|
-
&.ActionList-item--hasActiveSubItem {
|
|
109
|
-
background: var(--color-action-list-item-default-selected-bg);
|
|
110
|
-
|
|
111
|
-
&::before,
|
|
112
|
-
+ .ActionList-item::before {
|
|
113
|
-
visibility: hidden;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// blue accent line
|
|
117
|
-
&::after {
|
|
118
|
-
@include activeIndicatorLine;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
// end copy
|
|
123
|
-
|
|
124
24
|
// nesting (infinate levels)
|
|
125
25
|
// target items inside expanded subgroup
|
|
126
26
|
&[aria-expanded] {
|
|
@@ -128,6 +28,7 @@
|
|
|
128
28
|
position: relative;
|
|
129
29
|
|
|
130
30
|
// --ActionList-tree-depth is defined as an inline style referencing the aria-level of each item ie: aria-level="2"
|
|
31
|
+
// stylelint-disable-next-line selector-max-specificity, max-nesting-depth, selector-max-compound-selectors
|
|
131
32
|
.ActionList-content {
|
|
132
33
|
// stylelint-disable-next-line primer/spacing
|
|
133
34
|
padding-left: calc(#{$spacer-2} * var(--ActionList-tree-depth));
|
|
@@ -154,9 +55,11 @@
|
|
|
154
55
|
// expand/collapse group
|
|
155
56
|
.ActionList-item--hasSubItem {
|
|
156
57
|
.ActionList-item--subItem:not(.ActionList-item--hasSubItem) {
|
|
58
|
+
// stylelint-disable-next-line selector-max-specificity, selector-max-compound-selectors
|
|
157
59
|
.ActionList-content {
|
|
158
60
|
// increase child padding by targeting content first child span (add to ActionList-content padding, not replace)
|
|
159
61
|
// creates a slight indent of child items
|
|
62
|
+
// stylelint-disable-next-line selector-max-specificity, selector-max-type, max-nesting-depth, selector-max-compound-selectors
|
|
160
63
|
> span:first-child {
|
|
161
64
|
padding-left: $spacer-4;
|
|
162
65
|
}
|
|
@@ -167,6 +70,7 @@
|
|
|
167
70
|
// first subitem
|
|
168
71
|
> [aria-level='1'].ActionList-item--hasSubItem {
|
|
169
72
|
> .ActionList--subGroup {
|
|
73
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
170
74
|
&::before {
|
|
171
75
|
@include treeConnectingLine($left: $spacer-3);
|
|
172
76
|
}
|
|
@@ -177,6 +81,7 @@
|
|
|
177
81
|
// center connecting line with parent (line is 1px (8px - 1px)
|
|
178
82
|
.ActionList-item--hasSubItem:not([aria-level='1']) {
|
|
179
83
|
> .ActionList--subGroup {
|
|
84
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
180
85
|
&::before {
|
|
181
86
|
@include treeConnectingLine(
|
|
182
87
|
$left: calc(#{$spacer-2} * (var(--ActionList-tree-depth)) + #{$spacer-2 - $border-width})
|