@primer/css 0.0.0-2022020193741 → 0.0.0-20220202015422
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 +65 -6
- package/actionlist/action-list-item-divider.scss +0 -2
- package/actionlist/action-list-item.scss +126 -60
- package/actionlist/action-list-tree.scss +91 -0
- package/actionlist/action-list.scss +24 -0
- package/actionlist/index.scss +1 -0
- package/autocomplete/autocomplete.scss +1 -1
- package/avatars/avatar-stack.scss +1 -0
- package/base/base.scss +1 -0
- package/base/index.scss +0 -1
- package/base/kbd.scss +0 -1
- package/base/normalize.scss +1 -1
- package/base/typography-base.scss +3 -2
- package/blankslate/blankslate.scss +20 -1
- package/blankslate/index.scss +0 -1
- package/box/box.scss +0 -3
- package/breadcrumb/breadcrumb.scss +1 -1
- package/buttons/button-group.scss +3 -2
- package/buttons/button.scss +1 -35
- package/buttons/misc.scss +6 -7
- package/color-modes/native.scss +12 -0
- package/color-modes/themes/dark.scss +0 -1
- package/color-modes/themes/dark_colorblind.scss +0 -1
- package/color-modes/themes/dark_dimmed.scss +0 -1
- package/color-modes/themes/dark_high_contrast.scss +0 -1
- package/color-modes/themes/light.scss +0 -1
- package/color-modes/themes/light_colorblind.scss +0 -1
- package/color-modes/themes/light_high_contrast.scss +0 -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 +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 +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.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 +1 -1
- package/dist/marketing-buttons.css.map +1 -1
- package/dist/marketing-links.css +2 -0
- package/dist/marketing-links.css.map +1 -0
- package/dist/marketing-links.js +1 -0
- package/dist/marketing-type.css.map +1 -1
- package/dist/marketing-utilities.css +1 -1
- package/dist/marketing-utilities.css.map +1 -1
- package/dist/marketing.css +1 -1
- package/dist/marketing.css.map +1 -1
- package/dist/meta.json +106 -95
- package/dist/navigation.css.map +1 -1
- package/dist/pagination.css +1 -1
- package/dist/pagination.css.map +1 -1
- package/dist/popover.css +1 -1
- package/dist/popover.css.map +1 -1
- package/dist/primer.css +4 -4
- 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/avatars.json +1 -1
- package/dist/stats/base.json +1 -1
- package/dist/stats/blankslate.json +1 -1
- package/dist/stats/buttons.json +1 -1
- package/dist/stats/color-modes.json +1 -1
- package/dist/stats/core.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/marketing-buttons.json +1 -1
- package/dist/stats/marketing-links.json +1 -0
- package/dist/stats/marketing-utilities.json +1 -1
- package/dist/stats/marketing.json +1 -1
- package/dist/stats/pagination.json +1 -1
- package/dist/stats/popover.json +1 -1
- package/dist/stats/primer.json +1 -1
- package/dist/stats/product.json +1 -1
- package/dist/stats/utilities.json +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 +1 -1
- package/dist/utilities.css.map +1 -1
- package/dist/variables.json +7 -7
- package/forms/form-control.scss +3 -0
- package/forms/form-group.scss +1 -0
- package/forms/radio-group.scss +0 -3
- package/labels/counters.scss +1 -1
- package/labels/index.scss +0 -1
- package/labels/labels.scss +1 -0
- package/labels/mixins.scss +6 -2
- package/layout/grid-offset.scss +1 -0
- package/layout/grid.scss +1 -0
- package/layout/index.scss +1 -1
- package/layout/layout.scss +8 -11
- package/layout/mixins.scss +30 -4
- package/layout/page-layout.scss +375 -0
- package/markdown/code.scss +5 -0
- package/markdown/images.scss +2 -2
- package/marketing/buttons/button.scss +8 -0
- package/marketing/index.scss +1 -0
- package/marketing/links/index.scss +3 -0
- package/marketing/links/link.scss +50 -0
- package/marketing/type/typography.scss +6 -0
- package/marketing/utilities/animations.scss +42 -0
- package/navigation/filter-list.scss +2 -2
- package/navigation/menu.scss +2 -2
- package/navigation/sidenav.scss +2 -2
- package/navigation/subnav.scss +2 -2
- package/navigation/tabnav.scss +2 -2
- package/navigation/underline-nav.scss +2 -2
- package/package.json +19 -18
- package/pagination/pagination.scss +41 -4
- package/popover/popover.scss +1 -2
- package/select-menu/select-menu.scss +2 -2
- package/stylelint.config.cjs +2 -11
- package/support/mixins/color-modes.scss +3 -0
- package/support/mixins/misc.scss +1 -16
- package/support/mixins/typography.scss +3 -2
- package/support/variables/layout.scss +1 -2
- package/table-object/table-object.scss +3 -0
- package/timeline/timeline-item.scss +0 -1
- package/utilities/margin.scss +4 -1
- package/utilities/padding.scss +3 -1
- package/utilities/visibility-display.scss +3 -3
- package/table-object/README.md +0 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,81 @@
|
|
|
1
1
|
# @primer/css
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20220202015422
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#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
|
|
8
|
+
|
|
9
|
+
* [#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
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#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
|
|
14
|
+
|
|
15
|
+
* Fake entry to force publishing
|
|
16
|
+
|
|
17
|
+
- [#1906](https://github.com/primer/css/pull/1906) [`89bbf002`](https://github.com/primer/css/commit/89bbf0029beeab29116a460538bbd03e784cef92) Thanks [@jonrohan](https://github.com/jonrohan)! - Upgrading @primer/stylelint-config@12.3.0 and fixing violations
|
|
18
|
+
|
|
19
|
+
* [#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`
|
|
20
|
+
|
|
21
|
+
- [#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
|
|
22
|
+
|
|
23
|
+
* [#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
|
|
24
|
+
|
|
25
|
+
- [#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
|
|
26
|
+
|
|
27
|
+
## 19.2.0
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- [#1737](https://github.com/primer/css/pull/1737) [`6b4089d8`](https://github.com/primer/css/commit/6b4089d8b37174ca061762c56b5e4134a54cf4ef) Thanks [@vdepizzol](https://github.com/vdepizzol)! - Adds new PageLayout component CSS with Storybook documentation
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- [#1855](https://github.com/primer/css/pull/1855) [`8f2e7534`](https://github.com/primer/css/commit/8f2e7534ecbdb3d0e773d60c725b55dc4bb263e2) Thanks [@simurai](https://github.com/simurai)! - Bump primer/primitives to `7.4.0`
|
|
36
|
+
|
|
37
|
+
* [#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.
|
|
38
|
+
|
|
39
|
+
- [#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
|
|
40
|
+
|
|
41
|
+
* [#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
|
|
42
|
+
|
|
43
|
+
## 19.1.1
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- [#1827](https://github.com/primer/css/pull/1827) [`69e1fc53`](https://github.com/primer/css/commit/69e1fc539e4bb2fdf78d34a18fc591ebdfddd2f5) Thanks [@simurai](https://github.com/simurai)! - Support fractional viewport sizes for `max-width` media queries
|
|
48
|
+
|
|
49
|
+
* [#1803](https://github.com/primer/css/pull/1803) [`c46fe918`](https://github.com/primer/css/commit/c46fe9186efbcf6e4a482685529bdb0bda28aa9f) Thanks [@langermank](https://github.com/langermank)! - - Adds ActionList tree-view specific CSS
|
|
50
|
+
- Minor bug fixes for ActionList default
|
|
51
|
+
|
|
52
|
+
- [#1827](https://github.com/primer/css/pull/1827) [`69e1fc53`](https://github.com/primer/css/commit/69e1fc539e4bb2fdf78d34a18fc591ebdfddd2f5) Thanks [@simurai](https://github.com/simurai)! - Support fractional viewport sizes for the `hide` utilities
|
|
53
|
+
|
|
54
|
+
## 19.1.0
|
|
4
55
|
|
|
5
56
|
### Minor Changes
|
|
6
57
|
|
|
7
58
|
- [#1759](https://github.com/primer/css/pull/1759) [`74724ce7`](https://github.com/primer/css/commit/74724ce7c72b1cb540a9ef3d845169f1df17b55e) Thanks [@langermank](https://github.com/langermank)! - Remove `popover` responsive hack
|
|
8
59
|
|
|
60
|
+
* [#1807](https://github.com/primer/css/pull/1807) [`13a4654f`](https://github.com/primer/css/commit/13a4654fa0854accfaabbbd2f21d2e0a1c90442d) Thanks [@enstyled](https://github.com/enstyled)! - Marketing: Add link components
|
|
61
|
+
Marketing: Add animated arrow utility
|
|
62
|
+
Marketing: Document button components with arrows
|
|
63
|
+
|
|
9
64
|
### Patch Changes
|
|
10
65
|
|
|
11
|
-
-
|
|
66
|
+
- [#1780](https://github.com/primer/css/pull/1780) [`8e9ba62d`](https://github.com/primer/css/commit/8e9ba62d30ed10c012b99dd998751df01ad6aa99) Thanks [@langermank](https://github.com/langermank)! - ActionList followup
|
|
67
|
+
|
|
68
|
+
* [#1805](https://github.com/primer/css/pull/1805) [`99537d31`](https://github.com/primer/css/commit/99537d317f04ff5474a076ab96d3ea315b2181e2) Thanks [@tobiasahlin](https://github.com/tobiasahlin)! - Fix local dev (revert webpack 5.5.0 → 6.0.0)
|
|
69
|
+
|
|
70
|
+
- [#1781](https://github.com/primer/css/pull/1781) [`4d8dcf24`](https://github.com/primer/css/commit/4d8dcf24bc9e0732a9a2f34c94f6bcad7d3382dd) Thanks [@simurai](https://github.com/simurai)! - Reformat `rgba()` colors for `.btn-mktg`
|
|
12
71
|
|
|
13
|
-
* [#
|
|
72
|
+
* [#1768](https://github.com/primer/css/pull/1768) [`4abb1af9`](https://github.com/primer/css/commit/4abb1af95b9b3c8c38512fa5e1e4fae9e7d01f4f) Thanks [@tobiasahlin](https://github.com/tobiasahlin)! - Marketing: Add disabled states for buttons (and tweak hover)
|
|
14
73
|
|
|
15
|
-
- [#
|
|
74
|
+
- [#1792](https://github.com/primer/css/pull/1792) [`b1c43f1f`](https://github.com/primer/css/commit/b1c43f1f8d9b07b58b275665ca69abd5d4f7a5fc) Thanks [@simurai](https://github.com/simurai)! - Use `counter-border` for LHC
|
|
16
75
|
|
|
17
|
-
* [#
|
|
76
|
+
* [#1808](https://github.com/primer/css/pull/1808) [`ee27583f`](https://github.com/primer/css/commit/ee27583f594248bd44122ea5dc81b12382c02b09) Thanks [@manuelpuyol](https://github.com/manuelpuyol)! - Add hover and active states to btn-invisible
|
|
18
77
|
|
|
19
|
-
- [#
|
|
78
|
+
- [#1818](https://github.com/primer/css/pull/1818) [`22c29e7a`](https://github.com/primer/css/commit/22c29e7a8b1b6a0df1dd61d400cc0dd132e0c909) Thanks [@vdepizzol](https://github.com/vdepizzol)! - [Layout component] Avoid resizing `main` while loading
|
|
20
79
|
|
|
21
80
|
## 19.0.0
|
|
22
81
|
|
|
@@ -4,7 +4,6 @@
|
|
|
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;
|
|
@@ -16,7 +15,6 @@
|
|
|
16
15
|
&:empty {
|
|
17
16
|
height: 1px;
|
|
18
17
|
padding: 0;
|
|
19
|
-
// stylelint-disable-next-line primer/spacing
|
|
20
18
|
margin: ($spacer-2 - 1px) ($spacer-2 * -1) $spacer-2;
|
|
21
19
|
list-style: none;
|
|
22
20
|
background: var(--color-action-list-item-inline-divider);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// stylelint-disable max-nesting-depth, selector-max-specificity, selector-max-compound-selectors
|
|
2
|
+
|
|
1
3
|
@mixin focusOutline {
|
|
2
4
|
position: relative;
|
|
3
5
|
z-index: 1;
|
|
@@ -22,6 +24,8 @@
|
|
|
22
24
|
list-style: none;
|
|
23
25
|
background-color: transparent;
|
|
24
26
|
border-radius: $border-radius;
|
|
27
|
+
touch-action: manipulation;
|
|
28
|
+
-webkit-tap-highlight-color: transparent;
|
|
25
29
|
|
|
26
30
|
&:hover,
|
|
27
31
|
&:active {
|
|
@@ -34,40 +38,69 @@
|
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
// only hover li without list as children
|
|
37
|
-
&:not(.ActionList-item--hasSubItem)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
&:not(.ActionList-item--hasSubItem),
|
|
42
|
+
// target contents of first child li if sub-item (li wraps item label + nested ul)
|
|
43
|
+
&.ActionList-item--hasSubItem > .ActionList-content {
|
|
44
|
+
@media (hover: hover) {
|
|
45
|
+
&:hover {
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
background-color: var(--color-action-list-item-default-hover-bg);
|
|
48
|
+
|
|
49
|
+
&:not(.ActionList-item--navActive) {
|
|
50
|
+
// Support for "Windows high contrast mode"
|
|
51
|
+
outline: $border-style $border-width transparent;
|
|
52
|
+
outline-offset: -$border-width;
|
|
53
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
54
|
+
box-shadow: inset 0 0 0 2px var(--color-action-list-item-default-active-border);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
41
57
|
}
|
|
42
58
|
|
|
43
59
|
&:active {
|
|
44
60
|
background: var(--color-action-list-item-default-active-bg);
|
|
45
61
|
|
|
62
|
+
&:not(.ActionList-item--navActive) {
|
|
63
|
+
// Support for "Windows high contrast mode" https://sarahmhigley.com/writing/whcm-quick-tips/
|
|
64
|
+
outline: $border-style $border-width transparent;
|
|
65
|
+
outline-offset: -$border-width;
|
|
66
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
67
|
+
box-shadow: inset 0 0 0 2px var(--color-action-list-item-default-active-border);
|
|
68
|
+
}
|
|
69
|
+
|
|
46
70
|
@media screen and (prefers-reduced-motion: no-preference) {
|
|
47
71
|
animation: ActionList-item-active-bg 4s forwards cubic-bezier(0.33, 1, 0.68, 1);
|
|
48
72
|
}
|
|
49
73
|
|
|
50
|
-
// stylelint-disable primer/box-shadow
|
|
51
74
|
@keyframes ActionList-item-active-bg {
|
|
52
|
-
// stylelint-disable-next-line max-nesting-depth
|
|
53
75
|
50% {
|
|
54
|
-
box-shadow
|
|
76
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
77
|
+
box-shadow: inset 0 2px 12px 6px rgba(var(--color-canvas-default), 0.4);
|
|
55
78
|
transform: scale(1);
|
|
56
79
|
}
|
|
57
80
|
|
|
58
|
-
// stylelint-disable-next-line max-nesting-depth
|
|
59
81
|
100% {
|
|
60
|
-
box-shadow: inset 0 3px 9px rgba(#000, 0.04);
|
|
61
82
|
transform: scale(0.97);
|
|
62
83
|
}
|
|
63
84
|
}
|
|
64
|
-
// stylelint-enable primer/box-shadow
|
|
65
85
|
}
|
|
66
86
|
|
|
67
|
-
|
|
87
|
+
// hide dividers
|
|
88
|
+
|
|
89
|
+
@media (hover: hover) {
|
|
90
|
+
&:hover {
|
|
91
|
+
.ActionList-item-label::before,
|
|
92
|
+
+ .ActionList-item .ActionList-item-label::before {
|
|
93
|
+
visibility: hidden;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.ActionList-item-descriptionWrap--inline::before,
|
|
97
|
+
+ .ActionList-item .ActionList-item-descriptionWrap--inline::before {
|
|
98
|
+
visibility: hidden;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
|
68
103
|
&:active {
|
|
69
|
-
// hide dividers
|
|
70
|
-
// stylelint-disable-next-line selector-max-specificity
|
|
71
104
|
.ActionList-item-label::before,
|
|
72
105
|
+ .ActionList-item .ActionList-item-label::before {
|
|
73
106
|
visibility: hidden;
|
|
@@ -80,8 +113,16 @@
|
|
|
80
113
|
&.ActionList-item--hasSubItem {
|
|
81
114
|
// first child
|
|
82
115
|
> .ActionList-content {
|
|
83
|
-
|
|
84
|
-
|
|
116
|
+
z-index: 1;
|
|
117
|
+
|
|
118
|
+
@media (hover: hover) {
|
|
119
|
+
&:hover {
|
|
120
|
+
background-color: var(--color-action-list-item-default-hover-bg);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:active {
|
|
125
|
+
background-color: var(--color-action-list-item-default-active-bg);
|
|
85
126
|
}
|
|
86
127
|
}
|
|
87
128
|
}
|
|
@@ -98,7 +139,12 @@
|
|
|
98
139
|
&:not(.ActionList-item--danger) {
|
|
99
140
|
background: var(--color-action-list-item-default-selected-bg);
|
|
100
141
|
|
|
101
|
-
|
|
142
|
+
@media (hover: hover) {
|
|
143
|
+
&:hover {
|
|
144
|
+
background-color: var(--color-action-list-item-default-hover-bg);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
102
148
|
&::before,
|
|
103
149
|
+ .ActionList-item::before {
|
|
104
150
|
visibility: hidden;
|
|
@@ -113,6 +159,41 @@
|
|
|
113
159
|
|
|
114
160
|
// collapsible item [aria-expanded]
|
|
115
161
|
|
|
162
|
+
// nesting (single level)
|
|
163
|
+
// target items inside expanded subgroups
|
|
164
|
+
&[aria-expanded] {
|
|
165
|
+
.ActionList--subGroup {
|
|
166
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
167
|
+
transition: opacity 160ms cubic-bezier(0.25, 1, 0.5, 1), transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.ActionList-content {
|
|
171
|
+
padding-left: $spacer-4;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// has 16px leading visual
|
|
176
|
+
.ActionList-content--visual16 + .ActionList--subGroup {
|
|
177
|
+
.ActionList-content {
|
|
178
|
+
padding-left: $spacer-5;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// has 20px leading visual
|
|
183
|
+
.ActionList-content--visual20 + .ActionList--subGroup {
|
|
184
|
+
.ActionList-content {
|
|
185
|
+
padding-left: $spacer-2 * 4.5; // 36px
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// has 24px leading visual
|
|
190
|
+
.ActionList-content--visual24 + .ActionList--subGroup {
|
|
191
|
+
.ActionList-content {
|
|
192
|
+
padding-left: $spacer-6;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
116
197
|
&[aria-expanded='true'] {
|
|
117
198
|
.ActionList-item-collapseIcon {
|
|
118
199
|
transition: transform 120ms linear;
|
|
@@ -120,11 +201,14 @@
|
|
|
120
201
|
}
|
|
121
202
|
|
|
122
203
|
.ActionList--subGroup {
|
|
123
|
-
|
|
204
|
+
height: auto;
|
|
205
|
+
overflow: visible;
|
|
206
|
+
visibility: visible;
|
|
207
|
+
opacity: 1;
|
|
208
|
+
transform: translateY(0);
|
|
124
209
|
}
|
|
125
210
|
|
|
126
211
|
&.ActionList-item--hasActiveSubItem {
|
|
127
|
-
// stylelint-disable-next-line selector-max-specificity
|
|
128
212
|
> .ActionList-content > .ActionList-item-label {
|
|
129
213
|
font-weight: $font-weight-bold;
|
|
130
214
|
}
|
|
@@ -138,7 +222,11 @@
|
|
|
138
222
|
}
|
|
139
223
|
|
|
140
224
|
.ActionList--subGroup {
|
|
141
|
-
|
|
225
|
+
height: 0;
|
|
226
|
+
overflow: hidden;
|
|
227
|
+
visibility: hidden;
|
|
228
|
+
opacity: 0;
|
|
229
|
+
transform: translateY(-$spacer-3);
|
|
142
230
|
}
|
|
143
231
|
|
|
144
232
|
// show active indicator on parent collapse if child is active
|
|
@@ -149,7 +237,6 @@
|
|
|
149
237
|
font-weight: $font-weight-bold;
|
|
150
238
|
}
|
|
151
239
|
|
|
152
|
-
// stylelint-disable-next-line selector-max-specificity
|
|
153
240
|
&::before,
|
|
154
241
|
+ .ActionList-item::before {
|
|
155
242
|
visibility: hidden;
|
|
@@ -204,7 +291,7 @@
|
|
|
204
291
|
visibility: hidden;
|
|
205
292
|
opacity: 0;
|
|
206
293
|
transition:
|
|
207
|
-
|
|
294
|
+
visibility 0 linear $actionList-item-checkmark-transition-timing,
|
|
208
295
|
opacity $actionList-item-checkmark-transition-timing;
|
|
209
296
|
}
|
|
210
297
|
|
|
@@ -266,11 +353,10 @@
|
|
|
266
353
|
color: var(--color-danger-fg);
|
|
267
354
|
}
|
|
268
355
|
|
|
269
|
-
@media (hover: hover)
|
|
356
|
+
@media (hover: hover) {
|
|
270
357
|
&:hover {
|
|
271
358
|
background: var(--color-action-list-item-danger-hover-bg);
|
|
272
359
|
|
|
273
|
-
// stylelint-disable-next-line max-nesting-depth
|
|
274
360
|
.ActionList-item-label {
|
|
275
361
|
color: var(--color-action-list-item-danger-hover-text);
|
|
276
362
|
}
|
|
@@ -293,7 +379,7 @@
|
|
|
293
379
|
fill: var(--color-primer-fg-disabled);
|
|
294
380
|
}
|
|
295
381
|
|
|
296
|
-
@media (hover: hover)
|
|
382
|
+
@media (hover: hover) {
|
|
297
383
|
&:hover {
|
|
298
384
|
cursor: not-allowed;
|
|
299
385
|
background-color: transparent;
|
|
@@ -303,7 +389,6 @@
|
|
|
303
389
|
|
|
304
390
|
// if nested list exists, remove default padding
|
|
305
391
|
.ActionList {
|
|
306
|
-
// stylelint-disable-next-line primer/spacing
|
|
307
392
|
padding: unset;
|
|
308
393
|
}
|
|
309
394
|
}
|
|
@@ -312,17 +397,18 @@
|
|
|
312
397
|
.ActionList-content {
|
|
313
398
|
position: relative;
|
|
314
399
|
display: grid;
|
|
315
|
-
// stylelint-disable-next-line primer/spacing
|
|
316
400
|
padding: $actionList-item-padding-vertical $actionList-item-padding-horizontal;
|
|
401
|
+
font-size: $body-font-size;
|
|
317
402
|
font-weight: $font-weight-normal;
|
|
318
403
|
color: var(--color-fg-default);
|
|
319
404
|
user-select: none;
|
|
405
|
+
touch-action: manipulation;
|
|
320
406
|
border-radius: $border-radius;
|
|
321
407
|
transition: $actionList-item-bg-transition;
|
|
322
408
|
grid-template-rows: min-content;
|
|
323
409
|
grid-template-areas: 'leadingAction leadingVisual label trailingVisual trailingAction';
|
|
324
|
-
grid-template-columns: min-content min-content minmax(
|
|
325
|
-
align-items:
|
|
410
|
+
grid-template-columns: min-content min-content minmax(0, auto) min-content min-content;
|
|
411
|
+
align-items: start;
|
|
326
412
|
|
|
327
413
|
// column-gap persists with empty grid-areas, margin applies only when children exist
|
|
328
414
|
> :not(:last-child) {
|
|
@@ -337,19 +423,20 @@
|
|
|
337
423
|
|
|
338
424
|
&.ActionList-content--sizeMedium {
|
|
339
425
|
// 44px total height
|
|
340
|
-
// stylelint-disable-next-line primer/spacing
|
|
341
426
|
padding: $actionList-item-padding-vertical-md $actionList-item-padding-horizontal;
|
|
342
427
|
}
|
|
343
428
|
|
|
344
429
|
&.ActionList-content--sizeLarge {
|
|
345
430
|
// 48px total height
|
|
346
|
-
// stylelint-disable-next-line primer/spacing
|
|
347
431
|
padding: $actionList-item-padding-vertical-lg $actionList-item-padding-horizontal;
|
|
348
432
|
}
|
|
349
433
|
|
|
434
|
+
&.ActionList-content--fontSmall {
|
|
435
|
+
font-size: $font-size-small;
|
|
436
|
+
}
|
|
437
|
+
|
|
350
438
|
// On pointer:coarse (mobile), all list items are large
|
|
351
439
|
@media (pointer: coarse) {
|
|
352
|
-
// stylelint-disable-next-line primer/spacing
|
|
353
440
|
padding: $actionList-item-padding-vertical-lg $actionList-item-padding-horizontal;
|
|
354
441
|
}
|
|
355
442
|
|
|
@@ -401,11 +488,11 @@
|
|
|
401
488
|
|
|
402
489
|
// inline
|
|
403
490
|
.ActionList-item-descriptionWrap--inline {
|
|
491
|
+
position: relative;
|
|
404
492
|
flex-direction: row;
|
|
405
493
|
align-items: baseline;
|
|
406
494
|
|
|
407
495
|
.ActionList-item-description {
|
|
408
|
-
// stylelint-disable-next-line primer/spacing
|
|
409
496
|
margin-left: $actionList-item-padding-horizontal;
|
|
410
497
|
}
|
|
411
498
|
}
|
|
@@ -440,37 +527,16 @@
|
|
|
440
527
|
color: var(--color-fg-default);
|
|
441
528
|
}
|
|
442
529
|
|
|
530
|
+
.ActionList-item-label--truncate {
|
|
531
|
+
overflow: hidden;
|
|
532
|
+
text-overflow: ellipsis;
|
|
533
|
+
white-space: nowrap;
|
|
534
|
+
}
|
|
535
|
+
|
|
443
536
|
// nested lists (only supports 1 level currently)
|
|
444
537
|
// target ActionList-item--subItem for padding-left to maintain :active :after state
|
|
445
538
|
|
|
539
|
+
// TODO: remove with PVC implementation
|
|
446
540
|
.ActionList-item--subItem > .ActionList-content {
|
|
447
541
|
font-size: $font-size-small;
|
|
448
542
|
}
|
|
449
|
-
|
|
450
|
-
// no leading visual
|
|
451
|
-
.ActionList--subGroup {
|
|
452
|
-
.ActionList-item--subItem {
|
|
453
|
-
padding-left: $spacer-3;
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
// has 16px leading visual
|
|
458
|
-
.ActionList-content--visual16 + .ActionList--subGroup {
|
|
459
|
-
.ActionList-item--subItem {
|
|
460
|
-
padding-left: $spacer-4;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
// has 20px leading visual
|
|
465
|
-
.ActionList-content--visual20 + .ActionList--subGroup {
|
|
466
|
-
.ActionList-item--subItem {
|
|
467
|
-
padding-left: $spacer-3 * 1.75;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
// has 24px leading visual
|
|
472
|
-
.ActionList-content--visual24 + .ActionList--subGroup {
|
|
473
|
-
.ActionList-item--subItem {
|
|
474
|
-
padding-left: $spacer-5;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// tree-view variant
|
|
2
|
+
// renders ActionList with default styling for tree-view
|
|
3
|
+
// collapse/expand icons presents as leadingActions, rotate 90deg
|
|
4
|
+
// connecting vertical lines between collapse groups
|
|
5
|
+
// consistent font-size between nested groups
|
|
6
|
+
|
|
7
|
+
@mixin treeConnectingLine($left) {
|
|
8
|
+
position: absolute;
|
|
9
|
+
left: $left;
|
|
10
|
+
width: 1px;
|
|
11
|
+
height: 100%;
|
|
12
|
+
content: '';
|
|
13
|
+
background: var(--color-action-list-item-inline-divider);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ActionList--tree {
|
|
17
|
+
--ActionList-tree-depth: 1;
|
|
18
|
+
// TODO: remove with PVC implementation
|
|
19
|
+
.ActionList-item--subItem > .ActionList-content {
|
|
20
|
+
font-size: $body-font-size;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ActionList-item {
|
|
24
|
+
// nesting (infinate levels)
|
|
25
|
+
// target items inside expanded subgroup
|
|
26
|
+
&[aria-expanded] {
|
|
27
|
+
.ActionList--subGroup {
|
|
28
|
+
position: relative;
|
|
29
|
+
|
|
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
|
|
32
|
+
.ActionList-content {
|
|
33
|
+
padding-left: calc(#{$spacer-2} * var(--ActionList-tree-depth));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// tree-view specific collapse icon positioning/animation
|
|
39
|
+
&[aria-expanded='true'] {
|
|
40
|
+
.ActionList-item-collapseIcon {
|
|
41
|
+
transition: transform 120ms linear;
|
|
42
|
+
transform: rotate(0deg);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&[aria-expanded='false'] {
|
|
47
|
+
.ActionList-item-collapseIcon {
|
|
48
|
+
transition: transform 120ms linear;
|
|
49
|
+
transform: rotate(-90deg);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// expand/collapse group
|
|
55
|
+
.ActionList-item--hasSubItem {
|
|
56
|
+
.ActionList-item--subItem:not(.ActionList-item--hasSubItem) {
|
|
57
|
+
// stylelint-disable-next-line selector-max-specificity, selector-max-compound-selectors
|
|
58
|
+
.ActionList-content {
|
|
59
|
+
// increase child padding by targeting content first child span (add to ActionList-content padding, not replace)
|
|
60
|
+
// creates a slight indent of child items
|
|
61
|
+
// stylelint-disable-next-line selector-max-specificity, selector-max-type, max-nesting-depth, selector-max-compound-selectors
|
|
62
|
+
> span:first-child {
|
|
63
|
+
padding-left: $spacer-4;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// first subitem
|
|
70
|
+
> [aria-level='1'].ActionList-item--hasSubItem {
|
|
71
|
+
> .ActionList--subGroup {
|
|
72
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
73
|
+
&::before {
|
|
74
|
+
@include treeConnectingLine($left: $spacer-3);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// all other subitems
|
|
80
|
+
// center connecting line with parent (line is 1px (8px - 1px)
|
|
81
|
+
.ActionList-item--hasSubItem:not([aria-level='1']) {
|
|
82
|
+
> .ActionList--subGroup {
|
|
83
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
84
|
+
&::before {
|
|
85
|
+
@include treeConnectingLine(
|
|
86
|
+
$left: calc(#{$spacer-2} * (var(--ActionList-tree-depth)) + #{$spacer-2 - $border-width})
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -21,6 +21,24 @@
|
|
|
21
21
|
background: var(--color-action-list-item-inline-divider);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
// if descriptionWrap--inline exists, move pseudo divider to wrapper
|
|
25
|
+
.ActionList-item-descriptionWrap--inline {
|
|
26
|
+
&::before {
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: -$actionList-item-padding-vertical;
|
|
29
|
+
display: block;
|
|
30
|
+
width: 100%;
|
|
31
|
+
height: $border-width;
|
|
32
|
+
content: '';
|
|
33
|
+
background: var(--color-action-list-item-inline-divider);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// unset the default label pseudo
|
|
37
|
+
.ActionList-item-label::before {
|
|
38
|
+
content: unset;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
24
42
|
// hide divider if item is active
|
|
25
43
|
.ActionList-item--navActive {
|
|
26
44
|
// stylelint-disable-next-line selector-max-specificity, selector-max-compound-selectors
|
|
@@ -36,3 +54,9 @@
|
|
|
36
54
|
.ActionList-sectionDivider + .ActionList-item .ActionList-item-label::before {
|
|
37
55
|
visibility: hidden;
|
|
38
56
|
}
|
|
57
|
+
|
|
58
|
+
// hide if item is first of type with label::before, or is the first item after a sectionDivider
|
|
59
|
+
.ActionList-item:first-of-type .ActionList-item-descriptionWrap--inline::before,
|
|
60
|
+
.ActionList-sectionDivider + .ActionList-item .ActionList-item-descriptionWrap--inline::before {
|
|
61
|
+
visibility: hidden;
|
|
62
|
+
}
|
package/actionlist/index.scss
CHANGED
package/base/base.scss
CHANGED
package/base/index.scss
CHANGED
package/base/kbd.scss
CHANGED
package/base/normalize.scss
CHANGED