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