@primer/css 0.0.0-202198211147 → 0.0.0-20220106235309
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 +131 -6
- package/DEVELOP.md +15 -0
- package/actionlist/action-list-item-divider.scss +42 -0
- package/actionlist/action-list-item.scss +421 -194
- package/actionlist/action-list-tree.scss +92 -0
- package/actionlist/action-list-variables.scss +8 -0
- package/actionlist/action-list.scss +20 -38
- package/actionlist/index.scss +3 -1
- package/alerts/flash.scss +9 -0
- package/alerts/index.scss +2 -2
- package/autocomplete/autocomplete.scss +1 -1
- package/autocomplete/index.scss +3 -3
- package/autocomplete/suggester.scss +9 -1
- package/avatars/avatar-stack.scss +2 -1
- package/avatars/circle-badge.scss +1 -1
- package/avatars/index.scss +5 -5
- package/base/base.scss +1 -0
- package/base/index.scss +6 -7
- package/base/normalize.scss +1 -1
- package/blankslate/index.scss +2 -3
- package/box/box-overlay.scss +40 -0
- package/box/index.scss +3 -2
- package/branch-name/index.scss +2 -2
- package/breadcrumb/breadcrumb.scss +1 -1
- package/breadcrumb/index.scss +2 -2
- package/buttons/button-group.scss +3 -2
- package/buttons/button.scss +14 -14
- package/buttons/index.scss +4 -4
- package/buttons/misc.scss +14 -10
- package/color-modes/index.scss +8 -7
- package/color-modes/native.scss +1 -0
- package/color-modes/themes/dark.scss +2 -3
- package/color-modes/themes/dark_colorblind.scss +6 -0
- package/color-modes/themes/dark_dimmed.scss +2 -3
- package/color-modes/themes/dark_high_contrast.scss +2 -3
- package/color-modes/themes/light.scss +2 -3
- package/color-modes/themes/light_colorblind.scss +6 -0
- package/color-modes/themes/light_high_contrast.scss +6 -0
- package/deprecations.json +9 -7
- package/dist/actionlist.css +1 -1
- package/dist/actionlist.css.map +1 -1
- package/dist/alerts.css +1 -1
- package/dist/alerts.css.map +1 -1
- package/dist/autocomplete.css +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.map +1 -1
- package/dist/box.css +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/deprecations.json +9 -7
- 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.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 +113 -193
- 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 +1 -1
- package/dist/select-menu.css.map +1 -1
- package/dist/stats/actionlist.json +1 -1
- package/dist/stats/alerts.json +1 -1
- package/dist/stats/autocomplete.json +1 -1
- package/dist/stats/avatars.json +1 -1
- package/dist/stats/base.json +1 -1
- package/dist/stats/box.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/forms.json +1 -1
- package/dist/stats/labels.json +1 -1
- package/dist/stats/layout.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/select-menu.json +1 -1
- package/dist/stats/subhead.json +1 -1
- package/dist/stats/toasts.json +1 -1
- package/dist/stats/utilities.json +1 -1
- package/dist/subhead.css +1 -1
- package/dist/subhead.css.map +1 -1
- package/dist/timeline.css.map +1 -1
- package/dist/toasts.css +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 +62 -62
- package/dropdown/dropdown.scss +4 -4
- package/dropdown/index.scss +2 -2
- package/forms/form-control.scss +22 -8
- package/forms/form-group.scss +2 -2
- package/forms/form-select.scss +2 -2
- package/forms/form-validation.scss +9 -9
- package/forms/index.scss +7 -7
- package/forms/radio-group.scss +19 -0
- package/header/index.scss +2 -2
- package/index.scss +4 -4
- package/labels/counters.scss +1 -1
- package/labels/index.scss +7 -8
- package/labels/labels.scss +23 -4
- package/layout/grid.scss +1 -1
- package/layout/index.scss +7 -7
- package/layout/layout.scss +7 -11
- package/layout/mixins.scss +30 -4
- package/layout/page-layout.scss +380 -0
- package/links/index.scss +2 -2
- package/links/link.scss +1 -1
- package/loaders/index.scss +2 -2
- package/loaders/loaders.scss +1 -1
- package/markdown/footnotes.scss +1 -1
- package/markdown/images.scss +2 -2
- package/markdown/index.scss +9 -9
- package/markdown/lists.scss +3 -3
- package/markdown/markdown-body.scss +4 -4
- package/marketing/buttons/button.scss +102 -52
- package/marketing/buttons/index.scss +2 -2
- package/marketing/index.scss +5 -4
- package/marketing/links/index.scss +3 -0
- package/marketing/links/link.scss +50 -0
- package/marketing/support/index.scss +2 -3
- package/marketing/support/variables.scss +4 -5
- package/marketing/type/index.scss +2 -2
- package/marketing/type/typography.scss +26 -23
- package/marketing/utilities/animations.scss +42 -0
- package/marketing/utilities/index.scss +5 -5
- package/marketing/utilities/layout.scss +1 -1
- package/navigation/filter-list.scss +2 -2
- package/navigation/index.scss +7 -7
- package/navigation/menu.scss +3 -3
- package/navigation/sidenav.scss +5 -5
- package/navigation/subnav.scss +2 -2
- package/navigation/tabnav.scss +2 -2
- package/navigation/underline-nav.scss +2 -2
- package/package.json +17 -18
- package/pagination/index.scss +2 -2
- package/pagination/pagination.scss +5 -5
- package/popover/index.scss +2 -2
- package/popover/popover.scss +43 -5
- package/postcss.config.cjs +1 -1
- package/product/index.scss +17 -17
- package/progress/index.scss +2 -2
- package/select-menu/index.scss +2 -2
- package/select-menu/select-menu.scss +6 -6
- package/stylelint.config.cjs +2 -11
- package/subhead/index.scss +2 -2
- package/subhead/subhead.scss +6 -0
- package/support/index.scss +7 -7
- package/support/mixins/color-modes.scss +3 -0
- package/support/mixins/layout.scss +5 -5
- package/support/mixins/misc.scss +1 -1
- package/support/mixins/typography.scss +3 -2
- package/support/variables/layout.scss +8 -19
- package/support/variables/typography.scss +1 -1
- package/table-object/index.scss +1 -1
- package/timeline/index.scss +2 -2
- package/timeline/timeline-item.scss +1 -1
- package/toasts/index.scss +2 -2
- package/toasts/toasts.scss +0 -4
- package/tooltips/index.scss +2 -2
- package/tooltips/tooltips.scss +1 -1
- package/truncate/index.scss +2 -2
- package/utilities/colors.scss +32 -30
- package/utilities/details.scss +1 -1
- package/utilities/index.scss +12 -12
- package/utilities/visibility-display.scss +3 -3
- package/actionlist/action-list-divider.scss +0 -72
- package/color-modes/themes/dark_protanopia.scss +0 -7
- package/color-modes/themes/light_protanopia.scss +0 -7
- package/marketing/support/mixins.scss +0 -66
|
@@ -1,286 +1,513 @@
|
|
|
1
|
-
|
|
2
|
-
$actionList-item-hover-bg: #f0f3f5;
|
|
3
|
-
$actionList-item-active-bg: #e8ebed;
|
|
4
|
-
$actionList-item-selected-bg: #f0f3f5;
|
|
5
|
-
$actionList-item-focus-bg: #e0e4e7;
|
|
6
|
-
$actionList-item-divider: #e9e9ed;
|
|
7
|
-
|
|
8
|
-
$actionList-item-danger-hover-bg: #fff0f2;
|
|
9
|
-
$actionList-item-danger-active-bg: #ffebed;
|
|
10
|
-
$actionList-item-danger-focus-bg: #ffdbe0;
|
|
11
|
-
|
|
12
|
-
// expanded from src/support/variables/layout.scss
|
|
13
|
-
// adds 12px to the scale as of https://github.com/github/design-systems/issues/992
|
|
14
|
-
//
|
|
15
|
-
// https://github.com/github/design-systems/issues/1272
|
|
16
|
-
|
|
17
|
-
$s-20: 20px;
|
|
18
|
-
$s-28: 28px;
|
|
19
|
-
|
|
20
|
-
// CSS Easing
|
|
21
|
-
|
|
22
|
-
$ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
|
|
23
|
-
$ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
|
|
24
|
-
$ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
|
|
25
|
-
// $actionList-item-padding-vertical: (($spacer-5 - $s-20) / 2); hmmmmm
|
|
26
|
-
$actionList-item-padding-vertical: 6px;
|
|
27
|
-
$actionList-item-padding-horizontal: $spacer-2;
|
|
28
|
-
$actionList-item-bg-transition: background 33.333ms linear; // 2 frames on a 60hz monitor
|
|
29
|
-
|
|
30
|
-
// li
|
|
31
|
-
.actionList-item {
|
|
1
|
+
@mixin focusOutline {
|
|
32
2
|
position: relative;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
visibility: hidden;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
3
|
+
z-index: 1;
|
|
4
|
+
outline: none;
|
|
5
|
+
box-shadow: 0 0 0 2px var(--color-accent-fg); // this color breaks convention
|
|
6
|
+
}
|
|
40
7
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
+
}
|
|
47
18
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
column-gap: $spacer-2;
|
|
55
|
-
align-items: center;
|
|
56
|
-
position: relative;
|
|
57
|
-
border-radius: $border-radius-2;
|
|
58
|
-
font-weight: $font-weight-normal;
|
|
59
|
-
color: var(--color-fg-default);
|
|
60
|
-
user-select: none;
|
|
61
|
-
transition: $actionList-item-bg-transition;
|
|
62
|
-
// vini: https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-tap-highlight-color
|
|
63
|
-
// -webkit-tap-highlight-color: transparent;
|
|
19
|
+
// <li>
|
|
20
|
+
.ActionList-item {
|
|
21
|
+
position: relative;
|
|
22
|
+
list-style: none;
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
border-radius: $border-radius;
|
|
64
25
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
26
|
+
&:hover,
|
|
27
|
+
&:active {
|
|
28
|
+
cursor: pointer;
|
|
68
29
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
position: relative;
|
|
73
|
-
z-index: 1;
|
|
30
|
+
// a href
|
|
31
|
+
.ActionList-content {
|
|
32
|
+
text-decoration: none;
|
|
74
33
|
}
|
|
34
|
+
}
|
|
75
35
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
36
|
+
// only hover li without list as children
|
|
37
|
+
&:not(.ActionList-item--hasSubItem) {
|
|
38
|
+
&:hover {
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
background-color: var(--color-action-list-item-default-hover-bg);
|
|
82
41
|
}
|
|
83
42
|
|
|
84
43
|
&:active {
|
|
85
|
-
background:
|
|
44
|
+
background: var(--color-action-list-item-default-active-bg);
|
|
86
45
|
|
|
87
46
|
@media screen and (prefers-reduced-motion: no-preference) {
|
|
88
|
-
animation:
|
|
47
|
+
animation: ActionList-item-active-bg 4s forwards cubic-bezier(0.33, 1, 0.68, 1);
|
|
89
48
|
}
|
|
90
49
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
50
|
+
// stylelint-disable primer/box-shadow
|
|
51
|
+
@keyframes ActionList-item-active-bg {
|
|
52
|
+
// stylelint-disable-next-line max-nesting-depth
|
|
94
53
|
50% {
|
|
95
|
-
transform: scale(1);
|
|
96
54
|
box-shadow: inset 0 0 0 rgba(#000, 0.04);
|
|
55
|
+
transform: scale(1);
|
|
97
56
|
}
|
|
57
|
+
|
|
58
|
+
// stylelint-disable-next-line max-nesting-depth
|
|
98
59
|
100% {
|
|
99
|
-
transform: scale(0.97);
|
|
100
60
|
box-shadow: inset 0 3px 9px rgba(#000, 0.04);
|
|
61
|
+
transform: scale(0.97);
|
|
101
62
|
}
|
|
102
63
|
}
|
|
64
|
+
// stylelint-enable primer/box-shadow
|
|
103
65
|
}
|
|
104
66
|
|
|
105
|
-
|
|
67
|
+
&:hover,
|
|
68
|
+
&:active {
|
|
69
|
+
// hide dividers
|
|
70
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
71
|
+
.ActionList-item-label::before,
|
|
72
|
+
+ .ActionList-item .ActionList-item-label::before {
|
|
73
|
+
visibility: hidden;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
106
77
|
|
|
107
|
-
|
|
108
|
-
|
|
78
|
+
// target contents of li if sub-item (li wraps item label + nested ul)
|
|
79
|
+
// collapse styles here
|
|
80
|
+
&.ActionList-item--hasSubItem {
|
|
81
|
+
// first child
|
|
82
|
+
> .ActionList-content {
|
|
83
|
+
&:hover {
|
|
84
|
+
background-color: var(--color-action-list-item-default-hover-bg);
|
|
85
|
+
}
|
|
109
86
|
}
|
|
87
|
+
}
|
|
110
88
|
|
|
111
|
-
|
|
112
|
-
|
|
89
|
+
// active state [aria-current]
|
|
90
|
+
|
|
91
|
+
&.ActionList-item--navActive {
|
|
92
|
+
&:not(.ActionList-item--subItem) {
|
|
93
|
+
.ActionList-item-label {
|
|
94
|
+
font-weight: $font-weight-bold;
|
|
95
|
+
}
|
|
113
96
|
}
|
|
114
97
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
98
|
+
&:not(.ActionList-item--danger) {
|
|
99
|
+
background: var(--color-action-list-item-default-selected-bg);
|
|
100
|
+
|
|
101
|
+
&:hover {
|
|
102
|
+
background-color: var(--color-action-list-item-default-hover-bg);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
106
|
+
&::before,
|
|
107
|
+
+ .ActionList-item::before {
|
|
108
|
+
visibility: hidden;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// blue accent line
|
|
112
|
+
&::after {
|
|
113
|
+
@include activeIndicatorLine;
|
|
114
|
+
}
|
|
118
115
|
}
|
|
116
|
+
}
|
|
119
117
|
|
|
120
|
-
|
|
118
|
+
// collapsible item [aria-expanded]
|
|
121
119
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
// nesting (single level)
|
|
121
|
+
// target items inside expanded subgroups
|
|
122
|
+
&[aria-expanded] {
|
|
123
|
+
.ActionList--subGroup {
|
|
124
|
+
transition: opacity 160ms cubic-bezier(0.25, 1, 0.5, 1), transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
|
|
125
|
+
|
|
126
|
+
@media (prefers-reduced-motion) {
|
|
127
|
+
transition: none;
|
|
125
128
|
}
|
|
126
129
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
background: var(--color-danger-subtle);
|
|
130
|
-
}
|
|
130
|
+
.ActionList-content {
|
|
131
|
+
padding-left: $spacer-4;
|
|
131
132
|
}
|
|
133
|
+
}
|
|
132
134
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
// has 16px leading visual
|
|
136
|
+
.ActionList-content--visual16 + .ActionList--subGroup {
|
|
137
|
+
// stylelint-disable-next-line selector-max-compound-selectors, selector-max-specificity
|
|
138
|
+
.ActionList-content {
|
|
139
|
+
padding-left: $spacer-5;
|
|
135
140
|
}
|
|
136
141
|
}
|
|
137
142
|
|
|
138
|
-
//
|
|
143
|
+
// has 20px leading visual
|
|
144
|
+
.ActionList-content--visual20 + .ActionList--subGroup {
|
|
145
|
+
// stylelint-disable-next-line selector-max-compound-selectors, selector-max-specificity
|
|
146
|
+
.ActionList-content {
|
|
147
|
+
padding-left: $spacer-2 * 4.5; // 36px
|
|
148
|
+
}
|
|
149
|
+
}
|
|
139
150
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
151
|
+
// has 24px leading visual
|
|
152
|
+
.ActionList-content--visual24 + .ActionList--subGroup {
|
|
153
|
+
// stylelint-disable-next-line selector-max-compound-selectors, selector-max-specificity
|
|
154
|
+
.ActionList-content {
|
|
155
|
+
padding-left: $spacer-6;
|
|
144
156
|
}
|
|
145
157
|
}
|
|
158
|
+
}
|
|
146
159
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
160
|
+
&[aria-expanded='true'] {
|
|
161
|
+
.ActionList-item-collapseIcon {
|
|
162
|
+
transition: transform 120ms linear;
|
|
163
|
+
transform: scaleY(-1);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.ActionList--subGroup {
|
|
167
|
+
visibility: visible;
|
|
168
|
+
overflow: auto;
|
|
169
|
+
height: auto;
|
|
170
|
+
opacity: 1;
|
|
171
|
+
transform: translateY(0);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&.ActionList-item--hasActiveSubItem {
|
|
175
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
176
|
+
> .ActionList-content > .ActionList-item-label {
|
|
177
|
+
font-weight: $font-weight-bold;
|
|
178
|
+
}
|
|
150
179
|
}
|
|
180
|
+
}
|
|
151
181
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
182
|
+
&[aria-expanded='false'] {
|
|
183
|
+
.ActionList-item-collapseIcon {
|
|
184
|
+
transition: transform 120ms linear;
|
|
185
|
+
transform: scaleY(1);
|
|
155
186
|
}
|
|
156
187
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
188
|
+
.ActionList--subGroup {
|
|
189
|
+
display: block;
|
|
190
|
+
visibility: hidden;
|
|
191
|
+
overflow: hidden;
|
|
192
|
+
height: 0;
|
|
193
|
+
opacity: 0;
|
|
194
|
+
transform: translateY(-$spacer-3);
|
|
160
195
|
}
|
|
161
196
|
|
|
162
|
-
//
|
|
163
|
-
&.
|
|
164
|
-
|
|
165
|
-
grid-template-columns: min-content minmax(min-content, auto);
|
|
197
|
+
// show active indicator on parent collapse if child is active
|
|
198
|
+
&.ActionList-item--hasActiveSubItem {
|
|
199
|
+
background: var(--color-action-list-item-default-selected-bg);
|
|
166
200
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
grid-template-columns: min-content min-content minmax(min-content, auto);
|
|
201
|
+
.ActionList-item-label {
|
|
202
|
+
font-weight: $font-weight-bold;
|
|
170
203
|
}
|
|
171
204
|
|
|
172
|
-
//
|
|
173
|
-
|
|
174
|
-
|
|
205
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
206
|
+
&::before,
|
|
207
|
+
+ .ActionList-item::before {
|
|
208
|
+
visibility: hidden;
|
|
175
209
|
}
|
|
176
210
|
|
|
177
|
-
//
|
|
178
|
-
|
|
179
|
-
|
|
211
|
+
// blue accent line
|
|
212
|
+
&::after {
|
|
213
|
+
@include activeIndicatorLine;
|
|
180
214
|
}
|
|
181
215
|
}
|
|
216
|
+
}
|
|
182
217
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
.actionList-item-visual {
|
|
186
|
-
min-height: 20px;
|
|
187
|
-
display: flex;
|
|
188
|
-
align-items: center;
|
|
189
|
-
fill: var(--color-fg-muted);
|
|
190
|
-
color: var(--color-fg-muted); // if visual is text
|
|
191
|
-
}
|
|
218
|
+
// checkbox item [aria-checked]
|
|
219
|
+
// listbox [aria-selected]
|
|
192
220
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
221
|
+
&[aria-checked='true'],
|
|
222
|
+
&[aria-selected='true'] {
|
|
223
|
+
// multiselect checkmark
|
|
224
|
+
.ActionList-item-multiSelectCheckmark {
|
|
225
|
+
visibility: visible;
|
|
226
|
+
opacity: 1;
|
|
227
|
+
transition: visibility 0 linear 0, opacity $actionList-item-checkmark-transition-timing;
|
|
198
228
|
}
|
|
199
229
|
|
|
200
|
-
//
|
|
201
|
-
.
|
|
202
|
-
|
|
203
|
-
display: flex;
|
|
230
|
+
// singleselect checkmark
|
|
231
|
+
.ActionList-item-singleSelectCheckmark {
|
|
232
|
+
visibility: visible;
|
|
204
233
|
|
|
205
|
-
|
|
206
|
-
|
|
234
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
235
|
+
animation: checkmarkIn 200ms cubic-bezier(0.11, 0, 0.5, 0) forwards;
|
|
207
236
|
}
|
|
208
237
|
}
|
|
209
238
|
|
|
210
|
-
//
|
|
211
|
-
.
|
|
212
|
-
|
|
239
|
+
// checkbox
|
|
240
|
+
.ActionList-item-multiSelectIcon {
|
|
241
|
+
.ActionList-item-multiSelectIconRect {
|
|
242
|
+
fill: var(--color-accent-fg);
|
|
243
|
+
stroke: var(--color-accent-fg);
|
|
244
|
+
stroke-width: $border-width;
|
|
245
|
+
}
|
|
213
246
|
|
|
214
|
-
.
|
|
215
|
-
|
|
247
|
+
.ActionList-item-multiSelectCheckmark {
|
|
248
|
+
fill: var(--color-fg-on-emphasis);
|
|
216
249
|
}
|
|
217
250
|
}
|
|
251
|
+
}
|
|
218
252
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
253
|
+
&[aria-checked='false'],
|
|
254
|
+
&[aria-selected='false'] {
|
|
255
|
+
// multiselect checkmark
|
|
256
|
+
.ActionList-item-multiSelectCheckmark {
|
|
257
|
+
visibility: hidden;
|
|
258
|
+
opacity: 0;
|
|
259
|
+
transition:
|
|
260
|
+
visibility 0 linear $actionList-item-checkmark-transition-timing,
|
|
261
|
+
opacity $actionList-item-checkmark-transition-timing;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// singleselect checkmark
|
|
265
|
+
.ActionList-item-singleSelectCheckmark {
|
|
266
|
+
visibility: hidden;
|
|
267
|
+
transition: visibility 0s linear 200ms;
|
|
268
|
+
clip-path: inset(16px 0 0 0);
|
|
269
|
+
|
|
270
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
271
|
+
animation: checkmarkOut 200ms cubic-bezier(0.11, 0, 0.5, 0) forwards;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
223
274
|
|
|
224
|
-
|
|
225
|
-
|
|
275
|
+
// checkbox
|
|
276
|
+
.ActionList-item-multiSelectIcon {
|
|
277
|
+
.ActionList-item-multiSelectIconRect {
|
|
278
|
+
fill: var(--color-canvas-default);
|
|
279
|
+
stroke: var(--color-border-default);
|
|
280
|
+
stroke-width: $border-width;
|
|
226
281
|
}
|
|
227
282
|
}
|
|
228
283
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
line-height: $lh-default;
|
|
233
|
-
color: var(--color-fg-muted);
|
|
284
|
+
.ActionList-item-multiSelectIconRect {
|
|
285
|
+
fill: var(--color-canvas-default);
|
|
286
|
+
border: $border-width $border-style var(--color-border-default);
|
|
234
287
|
}
|
|
235
288
|
}
|
|
236
289
|
|
|
237
|
-
|
|
290
|
+
@keyframes checkmarkIn {
|
|
291
|
+
from {
|
|
292
|
+
clip-path: inset(16px 0 0 0);
|
|
293
|
+
}
|
|
238
294
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
.actionList-item-check {
|
|
242
|
-
visibility: hidden;
|
|
295
|
+
to {
|
|
296
|
+
clip-path: inset(0 0 0 0);
|
|
243
297
|
}
|
|
244
298
|
}
|
|
245
299
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
300
|
+
@keyframes checkmarkOut {
|
|
301
|
+
from {
|
|
302
|
+
clip-path: inset(0 0 0 0);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
to {
|
|
306
|
+
clip-path: inset(16px 0 0 0);
|
|
251
307
|
}
|
|
252
308
|
}
|
|
253
309
|
|
|
254
|
-
//
|
|
310
|
+
// variants
|
|
255
311
|
|
|
256
|
-
//
|
|
257
|
-
&.
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
visibility: hidden;
|
|
312
|
+
// danger
|
|
313
|
+
&.ActionList-item--danger {
|
|
314
|
+
.ActionList-item-label {
|
|
315
|
+
color: var(--color-danger-fg);
|
|
261
316
|
}
|
|
262
317
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
> :not(.actionList-item-content--danger):after {
|
|
266
|
-
content: '';
|
|
267
|
-
width: $spacer-1;
|
|
268
|
-
height: $spacer-4;
|
|
269
|
-
border-radius: $border-radius-1;
|
|
270
|
-
position: absolute;
|
|
271
|
-
left: -$actionList-item-padding-horizontal;
|
|
272
|
-
top: calc(50% - (24px / 2));
|
|
273
|
-
background: var(--color-accent-fg);
|
|
318
|
+
.ActionList-item-visual {
|
|
319
|
+
color: var(--color-danger-fg);
|
|
274
320
|
}
|
|
275
321
|
|
|
276
|
-
|
|
277
|
-
|
|
322
|
+
@media (hover: hover) and (pointer: fine) {
|
|
323
|
+
&:hover {
|
|
324
|
+
background: var(--color-action-list-item-danger-hover-bg);
|
|
278
325
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
326
|
+
// stylelint-disable-next-line max-nesting-depth
|
|
327
|
+
.ActionList-item-label {
|
|
328
|
+
color: var(--color-action-list-item-danger-hover-text);
|
|
282
329
|
}
|
|
283
330
|
}
|
|
284
331
|
}
|
|
332
|
+
|
|
333
|
+
&:active {
|
|
334
|
+
background: var(--color-action-list-item-danger-active-bg);
|
|
335
|
+
}
|
|
285
336
|
}
|
|
337
|
+
|
|
338
|
+
// disabled
|
|
339
|
+
&[aria-disabled='true'] {
|
|
340
|
+
.ActionList-item-label,
|
|
341
|
+
.ActionList-item-description {
|
|
342
|
+
color: var(--color-primer-fg-disabled);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.ActionList-item-visual {
|
|
346
|
+
fill: var(--color-primer-fg-disabled);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
@media (hover: hover) and (pointer: fine) {
|
|
350
|
+
&:hover {
|
|
351
|
+
cursor: not-allowed;
|
|
352
|
+
background-color: transparent;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// if nested list exists, remove default padding
|
|
358
|
+
.ActionList {
|
|
359
|
+
// stylelint-disable-next-line primer/spacing
|
|
360
|
+
padding: unset;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// span or a href
|
|
365
|
+
.ActionList-content {
|
|
366
|
+
position: relative;
|
|
367
|
+
display: grid;
|
|
368
|
+
// stylelint-disable-next-line primer/spacing
|
|
369
|
+
padding: $actionList-item-padding-vertical $actionList-item-padding-horizontal;
|
|
370
|
+
font-size: $body-font-size;
|
|
371
|
+
font-weight: $font-weight-normal;
|
|
372
|
+
color: var(--color-fg-default);
|
|
373
|
+
user-select: none;
|
|
374
|
+
border-radius: $border-radius;
|
|
375
|
+
transition: $actionList-item-bg-transition;
|
|
376
|
+
grid-template-rows: min-content;
|
|
377
|
+
grid-template-areas: 'leadingAction leadingVisual label trailingVisual trailingAction';
|
|
378
|
+
grid-template-columns: min-content min-content minmax(0, auto) min-content min-content;
|
|
379
|
+
align-items: start;
|
|
380
|
+
|
|
381
|
+
// column-gap persists with empty grid-areas, margin applies only when children exist
|
|
382
|
+
> :not(:last-child) {
|
|
383
|
+
margin-right: $spacer-2;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
&:focus-visible {
|
|
387
|
+
@include focusOutline;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// sizes
|
|
391
|
+
|
|
392
|
+
&.ActionList-content--sizeMedium {
|
|
393
|
+
// 44px total height
|
|
394
|
+
// stylelint-disable-next-line primer/spacing
|
|
395
|
+
padding: $actionList-item-padding-vertical-md $actionList-item-padding-horizontal;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
&.ActionList-content--sizeLarge {
|
|
399
|
+
// 48px total height
|
|
400
|
+
// stylelint-disable-next-line primer/spacing
|
|
401
|
+
padding: $actionList-item-padding-vertical-lg $actionList-item-padding-horizontal;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
&.ActionList-content--fontSmall {
|
|
405
|
+
font-size: $font-size-small;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// On pointer:coarse (mobile), all list items are large
|
|
409
|
+
@media (pointer: coarse) {
|
|
410
|
+
// stylelint-disable-next-line primer/spacing
|
|
411
|
+
padding: $actionList-item-padding-vertical-lg $actionList-item-padding-horizontal;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
&.ActionList-content--blockDescription {
|
|
415
|
+
// if leading/trailing visual, align with first line of content
|
|
416
|
+
.ActionList-item-visual {
|
|
417
|
+
place-self: start;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
// place children on grid
|
|
423
|
+
|
|
424
|
+
.ActionList-item-action--leading {
|
|
425
|
+
grid-area: leadingAction;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.ActionList-item-visual--leading {
|
|
429
|
+
grid-area: leadingVisual;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.ActionList-item-label {
|
|
433
|
+
grid-area: label;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.ActionList-item-visual--trailing {
|
|
437
|
+
grid-area: trailingVisual;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.ActionList-item-action--trailing {
|
|
441
|
+
grid-area: trailingAction;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// wrapper span
|
|
445
|
+
// default block
|
|
446
|
+
.ActionList-item-descriptionWrap {
|
|
447
|
+
grid-area: label;
|
|
448
|
+
display: flex;
|
|
449
|
+
flex-direction: column;
|
|
450
|
+
|
|
451
|
+
.ActionList-item-description {
|
|
452
|
+
margin-top: $spacer-1;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.ActionList-item-label {
|
|
456
|
+
font-weight: $font-weight-bold;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// inline
|
|
461
|
+
.ActionList-item-descriptionWrap--inline {
|
|
462
|
+
flex-direction: row;
|
|
463
|
+
align-items: baseline;
|
|
464
|
+
|
|
465
|
+
.ActionList-item-description {
|
|
466
|
+
// stylelint-disable-next-line primer/spacing
|
|
467
|
+
margin-left: $actionList-item-padding-horizontal;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// description
|
|
472
|
+
.ActionList-item-description {
|
|
473
|
+
font-size: $font-size-small;
|
|
474
|
+
font-weight: $font-weight-normal;
|
|
475
|
+
line-height: $lh-default;
|
|
476
|
+
color: var(--color-fg-muted);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
// helper for grid alignment with multi-line content
|
|
480
|
+
// span wrapping svg or text
|
|
481
|
+
.ActionList-item-visual,
|
|
482
|
+
.ActionList-item-action {
|
|
483
|
+
display: flex;
|
|
484
|
+
min-height: $actionList-item-height-sm;
|
|
485
|
+
color: var(--color-fg-muted); // if visual is text
|
|
486
|
+
fill: var(--color-fg-muted);
|
|
487
|
+
align-items: center;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
// text
|
|
491
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
|
492
|
+
.ActionList-item-label {
|
|
493
|
+
position: relative; // for pseudo dividers
|
|
494
|
+
font-weight: $font-weight-normal;
|
|
495
|
+
// we need a strict value here for grid alignment
|
|
496
|
+
// stylelint-disable-next-line primer/typography
|
|
497
|
+
line-height: $actionList-item-label-line-height;
|
|
498
|
+
color: var(--color-fg-default);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.ActionList-item-label--truncate {
|
|
502
|
+
overflow: hidden;
|
|
503
|
+
text-overflow: ellipsis;
|
|
504
|
+
white-space: nowrap;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
// nested lists (only supports 1 level currently)
|
|
508
|
+
// target ActionList-item--subItem for padding-left to maintain :active :after state
|
|
509
|
+
|
|
510
|
+
// TODO: remove with PVC implementation
|
|
511
|
+
.ActionList-item--subItem > .ActionList-content {
|
|
512
|
+
font-size: $font-size-small;
|
|
286
513
|
}
|