@primer/css 0.0.0-1f49d76 → 0.0.0-20211010195643
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 +858 -133
- package/CONTRIBUTING.md +85 -0
- package/DEVELOP.md +4 -39
- package/LICENSE +1 -1
- package/README.md +13 -15
- package/RELEASING.md +5 -76
- package/actionlist/action-list-item-divider.scss +42 -0
- package/actionlist/action-list-item.scss +439 -0
- package/actionlist/action-list-variables.scss +8 -0
- package/actionlist/action-list.scss +33 -0
- package/actionlist/index.scss +5 -0
- package/alerts/README.md +1 -1
- package/alerts/flash.scss +32 -26
- package/alerts/index.scss +2 -2
- package/autocomplete/README.md +1 -1
- package/autocomplete/autocomplete.scss +18 -8
- package/autocomplete/index.scss +3 -3
- package/autocomplete/suggester.scss +27 -10
- package/avatars/README.md +1 -1
- package/avatars/avatar-parent-child.scss +2 -3
- package/avatars/avatar-stack.scss +12 -14
- package/avatars/avatar.scss +4 -0
- package/avatars/circle-badge.scss +4 -4
- package/avatars/index.scss +5 -5
- package/base/README.md +1 -1
- package/base/base.scss +39 -7
- package/base/index.scss +6 -5
- package/base/kbd.scss +5 -6
- package/base/normalize.scss +13 -53
- package/base/octicons.scss +6 -0
- package/blankslate/README.md +1 -1
- package/blankslate/blankslate.scss +7 -4
- package/blankslate/index.scss +2 -2
- package/box/README.md +1 -1
- package/box/box.scss +38 -38
- package/box/index.scss +2 -2
- package/branch-name/README.md +1 -1
- package/branch-name/branch-name.scss +15 -10
- package/branch-name/index.scss +2 -2
- package/breadcrumb/README.md +1 -1
- package/breadcrumb/breadcrumb.scss +12 -7
- package/breadcrumb/index.scss +2 -2
- package/buttons/README.md +1 -1
- package/buttons/button.scss +115 -121
- package/buttons/index.scss +4 -4
- package/buttons/misc.scss +52 -41
- package/color-modes/index.scss +9 -0
- package/color-modes/native.scss +10 -0
- package/color-modes/themes/dark.scss +7 -0
- package/color-modes/themes/dark_colorblind.scss +7 -0
- package/color-modes/themes/dark_dimmed.scss +7 -0
- package/color-modes/themes/dark_high_contrast.scss +7 -0
- package/color-modes/themes/light.scss +7 -0
- package/color-modes/themes/light_colorblind.scss +7 -0
- package/core/README.md +1 -1
- package/core/index.scss +17 -16
- package/deprecations.js +18 -200
- package/deprecations.json +539 -0
- package/dist/actionlist.css +2 -0
- package/dist/actionlist.css.map +1 -0
- package/dist/actionlist.js +1 -0
- package/dist/alerts.css +1 -2
- package/dist/alerts.css.map +1 -1
- package/dist/alerts.js +1 -1
- package/dist/autocomplete.css +1 -2
- package/dist/autocomplete.css.map +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/avatars.css +1 -2
- package/dist/avatars.css.map +1 -1
- package/dist/avatars.js +1 -1
- package/dist/base.css +1 -2
- package/dist/base.css.map +1 -1
- package/dist/base.js +1 -1
- package/dist/blankslate.css +1 -2
- package/dist/blankslate.css.map +1 -1
- package/dist/blankslate.js +1 -1
- package/dist/box.css +1 -2
- package/dist/box.css.map +1 -1
- package/dist/box.js +1 -1
- package/dist/branch-name.css +1 -2
- package/dist/branch-name.css.map +1 -1
- package/dist/branch-name.js +1 -1
- package/dist/breadcrumb.css +1 -2
- package/dist/breadcrumb.css.map +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/buttons.css +1 -2
- package/dist/buttons.css.map +1 -1
- package/dist/buttons.js +1 -1
- package/dist/color-modes.css +2 -0
- package/dist/color-modes.css.map +1 -0
- package/dist/color-modes.js +1 -0
- package/dist/core.css +1 -2
- package/dist/core.css.map +1 -1
- package/dist/core.js +1 -1
- package/dist/deprecations.json +534 -571
- package/dist/dropdown.css +1 -2
- package/dist/dropdown.css.map +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/forms.css +1 -2
- package/dist/forms.css.map +1 -1
- package/dist/forms.js +1 -1
- package/dist/header.css +1 -2
- package/dist/header.css.map +1 -1
- package/dist/header.js +1 -1
- package/dist/labels.css +1 -2
- package/dist/labels.css.map +1 -1
- package/dist/labels.js +1 -1
- package/dist/layout.css +1 -2
- package/dist/layout.css.map +1 -1
- package/dist/layout.js +1 -1
- package/dist/links.css +2 -0
- package/dist/links.css.map +1 -0
- package/dist/links.js +1 -0
- package/dist/loaders.css +0 -1
- package/dist/loaders.css.map +1 -1
- package/dist/loaders.js +1 -1
- package/dist/markdown.css +1 -2
- package/dist/markdown.css.map +1 -1
- package/dist/markdown.js +1 -1
- package/dist/marketing-buttons.css +1 -2
- package/dist/marketing-buttons.css.map +1 -1
- package/dist/marketing-buttons.js +1 -1
- package/dist/marketing-support.css +1 -2
- package/dist/marketing-support.js +1 -1
- package/dist/marketing-type.css +1 -2
- package/dist/marketing-type.css.map +1 -1
- package/dist/marketing-type.js +1 -1
- package/dist/marketing-utilities.css +1 -2
- package/dist/marketing-utilities.css.map +1 -1
- package/dist/marketing-utilities.js +1 -1
- package/dist/marketing.css +1 -2
- package/dist/marketing.css.map +1 -1
- package/dist/marketing.js +1 -1
- package/dist/meta.json +314 -369
- package/dist/navigation.css +1 -2
- package/dist/navigation.css.map +1 -1
- package/dist/navigation.js +1 -1
- package/dist/pagination.css +1 -2
- package/dist/pagination.css.map +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover.css +1 -2
- package/dist/popover.css.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/primer.css +4 -5
- package/dist/primer.css.map +1 -1
- package/dist/primer.js +1 -1
- package/dist/product.css +1 -2
- package/dist/product.css.map +1 -1
- package/dist/product.js +1 -1
- package/dist/progress.css +1 -2
- package/dist/progress.css.map +1 -1
- package/dist/progress.js +1 -1
- package/dist/select-menu.css +1 -2
- package/dist/select-menu.css.map +1 -1
- package/dist/select-menu.js +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/blankslate.json +1 -1
- package/dist/stats/box.json +1 -1
- package/dist/stats/branch-name.json +1 -1
- package/dist/stats/breadcrumb.json +1 -1
- package/dist/stats/buttons.json +1 -1
- package/dist/stats/color-modes.json +1 -0
- package/dist/stats/core.json +1 -1
- package/dist/stats/dropdown.json +1 -1
- package/dist/stats/forms.json +1 -1
- package/dist/stats/header.json +1 -1
- package/dist/stats/labels.json +1 -1
- package/dist/stats/layout.json +1 -1
- package/dist/stats/links.json +1 -0
- package/dist/stats/loaders.json +1 -1
- package/dist/stats/markdown.json +1 -1
- package/dist/stats/marketing-buttons.json +1 -1
- package/dist/stats/marketing-support.json +1 -1
- package/dist/stats/marketing-type.json +1 -1
- package/dist/stats/marketing-utilities.json +1 -1
- package/dist/stats/marketing.json +1 -1
- package/dist/stats/navigation.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/progress.json +1 -1
- package/dist/stats/select-menu.json +1 -1
- package/dist/stats/subhead.json +1 -1
- package/dist/stats/support.json +1 -1
- package/dist/stats/table-object.json +1 -1
- package/dist/stats/timeline.json +1 -1
- package/dist/stats/toasts.json +1 -1
- package/dist/stats/tooltips.json +1 -1
- package/dist/stats/truncate.json +1 -1
- package/dist/stats/utilities.json +1 -1
- package/dist/subhead.css +1 -2
- package/dist/subhead.css.map +1 -1
- package/dist/subhead.js +1 -1
- package/dist/support.css +1 -1
- package/dist/support.js +1 -1
- package/dist/table-object.css +0 -1
- package/dist/table-object.css.map +1 -1
- package/dist/table-object.js +1 -1
- package/dist/timeline.css +1 -2
- package/dist/timeline.css.map +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toasts.css +1 -2
- package/dist/toasts.css.map +1 -1
- package/dist/toasts.js +1 -1
- package/dist/tooltips.css +1 -2
- package/dist/tooltips.css.map +1 -1
- package/dist/tooltips.js +1 -1
- package/dist/truncate.css +1 -2
- package/dist/truncate.css.map +1 -1
- package/dist/truncate.js +1 -1
- package/dist/utilities.css +1 -2
- package/dist/utilities.css.map +1 -1
- package/dist/utilities.js +1 -1
- package/dist/variables.json +630 -2274
- package/dropdown/README.md +1 -1
- package/dropdown/dropdown.scss +32 -88
- package/dropdown/index.scss +2 -2
- package/forms/README.md +1 -1
- package/forms/form-control.scss +39 -57
- package/forms/form-group.scss +31 -48
- package/forms/form-select.scss +12 -4
- package/forms/form-validation.scss +27 -32
- package/forms/index.scss +7 -7
- package/forms/input-group.scss +7 -0
- package/forms/radio-group.scss +22 -3
- package/header/README.md +1 -1
- package/header/header.scss +16 -6
- package/header/index.scss +2 -2
- package/index.scss +4 -1
- package/labels/README.md +1 -1
- package/labels/counters.scss +10 -11
- package/labels/diffstat.scss +8 -8
- package/labels/index.scss +7 -7
- package/labels/labels.scss +30 -41
- package/labels/states.scss +17 -16
- package/layout/README.md +1 -1
- package/layout/grid-offset.scss +11 -11
- package/layout/grid.scss +23 -23
- package/layout/index.scss +7 -4
- package/layout/layout.scss +185 -0
- package/layout/mixins.scss +79 -0
- package/{README.template.md → links/README.md} +5 -5
- package/links/index.scss +3 -0
- package/links/link.scss +55 -0
- package/loaders/README.md +1 -1
- package/loaders/index.scss +2 -2
- package/loaders/loaders.scss +1 -1
- package/markdown/README.md +1 -1
- package/markdown/blob-csv.scss +2 -2
- package/markdown/code.scss +7 -5
- package/markdown/footnotes.scss +37 -0
- package/markdown/headings.scss +6 -4
- package/markdown/images.scss +3 -4
- package/markdown/index.scss +9 -8
- package/markdown/lists.scss +18 -5
- package/markdown/markdown-body.scss +14 -9
- package/markdown/tables.scss +7 -7
- package/marketing/README.md +1 -1
- package/marketing/buttons/button.scss +81 -75
- package/marketing/index.scss +4 -4
- package/marketing/support/index.scss +1 -0
- package/marketing/support/mixins.scss +66 -0
- package/marketing/support/variables.scss +109 -58
- package/marketing/type/typography.scss +100 -62
- package/marketing/utilities/animations.scss +9 -0
- package/marketing/utilities/index.scss +2 -3
- package/marketing/utilities/layout.scss +31 -10
- package/navigation/README.md +1 -1
- package/navigation/filter-list.scss +8 -9
- package/navigation/index.scss +7 -7
- package/navigation/menu.scss +22 -23
- package/navigation/sidenav.scss +19 -25
- package/navigation/subnav.scss +9 -13
- package/navigation/tabnav.scss +20 -10
- package/navigation/underline-nav.scss +19 -14
- package/package.json +75 -63
- package/pagination/README.md +1 -1
- package/pagination/index.scss +2 -2
- package/pagination/pagination.scss +8 -8
- package/popover/README.md +1 -1
- package/popover/index.scss +2 -2
- package/popover/popover.scss +14 -13
- package/postcss.config.cjs +22 -0
- package/prettier.config.cjs +1 -0
- package/product/README.md +1 -1
- package/product/index.scss +17 -17
- package/progress/README.md +1 -1
- package/progress/index.scss +2 -2
- package/progress/progress.scss +3 -4
- package/select-menu/README.md +1 -1
- package/select-menu/index.scss +2 -2
- package/select-menu/select-menu.scss +44 -46
- package/{stylelint.config.js → stylelint.config.cjs} +5 -6
- package/subhead/README.md +1 -1
- package/subhead/index.scss +2 -2
- package/subhead/subhead.scss +9 -3
- package/support/README.md +1 -1
- package/support/index.scss +7 -8
- package/support/mixins/color-modes.scss +106 -0
- package/support/mixins/misc.scss +19 -13
- package/support/variables/layout.scss +68 -9
- package/support/variables/misc.scss +2 -27
- package/support/variables/typography.scss +2 -1
- package/table-object/README.md +1 -1
- package/table-object/index.scss +1 -1
- package/timeline/README.md +1 -1
- package/timeline/index.scss +2 -2
- package/timeline/timeline-item.scss +18 -18
- package/toasts/README.md +1 -1
- package/toasts/index.scss +2 -2
- package/toasts/toasts.scss +45 -24
- package/tooltips/README.md +1 -1
- package/tooltips/index.scss +2 -2
- package/tooltips/tooltips.scss +8 -12
- package/truncate/README.md +1 -1
- package/truncate/index.scss +2 -1
- package/truncate/truncate.scss +30 -0
- package/utilities/README.md +1 -1
- package/utilities/animations.scss +14 -1
- package/utilities/borders.scss +5 -50
- package/utilities/box-shadow.scss +8 -8
- package/utilities/colors.scss +71 -107
- package/utilities/details.scss +18 -6
- package/utilities/flexbox.scss +4 -3
- package/utilities/index.scss +12 -12
- package/utilities/layout.scss +23 -14
- package/utilities/margin.scss +34 -16
- package/utilities/padding.scss +13 -8
- package/utilities/typography.scss +5 -15
- package/.browserslistrc +0 -6
- package/.eslintrc.json +0 -13
- package/.nowignore +0 -5
- package/MIGRATING.md +0 -74
- package/bin/primer-migrate +0 -86
- package/dist/marketing-support.css.map +0 -1
- package/dist/support.css.map +0 -1
- package/fonts/Inter-Bold.woff +0 -0
- package/fonts/Inter-Medium.woff +0 -0
- package/fonts/Inter-Regular.woff +0 -0
- package/marketing/utilities/margin.scss +0 -17
- package/marketing/utilities/padding.scss +0 -24
- package/postcss.config.js +0 -14
- package/prettier.config.js +0 -1
- package/release.config.js +0 -4
- package/support/mixins/buttons.scss +0 -172
- package/support/variables/color-system.scss +0 -243
- package/support/variables/colors.scss +0 -55
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
// <li>
|
|
2
|
+
.ActionList-item {
|
|
3
|
+
position: relative;
|
|
4
|
+
list-style: none;
|
|
5
|
+
background-color: transparent;
|
|
6
|
+
border-radius: $border-radius;
|
|
7
|
+
|
|
8
|
+
&:hover,
|
|
9
|
+
&:active {
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
|
|
12
|
+
// a href
|
|
13
|
+
.ActionList-content {
|
|
14
|
+
text-decoration: none;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// li only: focus-visible, a href: focus-within on li
|
|
19
|
+
&:focus-visible,
|
|
20
|
+
&:focus-within {
|
|
21
|
+
@include focusOutline;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// only hover li without list as children
|
|
25
|
+
&:not(.ActionList-item--hasSubItem) {
|
|
26
|
+
&:hover {
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
background-color: var(--color-action-list-item-default-hover-bg);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:active {
|
|
32
|
+
background: var(--color-action-list-item-default-active-bg);
|
|
33
|
+
|
|
34
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
35
|
+
animation: ActionList-item-active-bg 4s forwards cubic-bezier(0.33, 1, 0.68, 1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// stylelint-disable primer/box-shadow
|
|
39
|
+
@keyframes ActionList-item-active-bg {
|
|
40
|
+
// stylelint-disable-next-line max-nesting-depth
|
|
41
|
+
50% {
|
|
42
|
+
box-shadow: inset 0 0 0 rgba(#000, 0.04);
|
|
43
|
+
transform: scale(1);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// stylelint-disable-next-line max-nesting-depth
|
|
47
|
+
100% {
|
|
48
|
+
box-shadow: inset 0 3px 9px rgba(#000, 0.04);
|
|
49
|
+
transform: scale(0.97);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// stylelint-enable primer/box-shadow
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:hover,
|
|
56
|
+
&:active {
|
|
57
|
+
// hide dividers
|
|
58
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
59
|
+
.ActionList-item-label::before,
|
|
60
|
+
+ .ActionList-item .ActionList-item-label::before {
|
|
61
|
+
visibility: hidden;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// target contents of li if sub-item (li wraps item label + nested ul)
|
|
67
|
+
// collapse styles here
|
|
68
|
+
&.ActionList-item--hasSubItem {
|
|
69
|
+
// first child
|
|
70
|
+
> .ActionList-content {
|
|
71
|
+
&:hover {
|
|
72
|
+
background-color: var(--color-action-list-item-default-hover-bg);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// active state [aria-current]
|
|
78
|
+
|
|
79
|
+
&.ActionList-item--navActive:not(.ActionList-item--danger) {
|
|
80
|
+
background: var(--color-action-list-item-default-selected-bg);
|
|
81
|
+
|
|
82
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
83
|
+
&::before,
|
|
84
|
+
+ .ActionList-item::before {
|
|
85
|
+
visibility: hidden;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// blue accent line
|
|
89
|
+
&::after {
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: calc(50% - 12px);
|
|
92
|
+
left: -$actionList-item-padding-horizontal;
|
|
93
|
+
width: $spacer-1;
|
|
94
|
+
height: $spacer-4;
|
|
95
|
+
content: '';
|
|
96
|
+
background: var(--color-accent-fg);
|
|
97
|
+
border-radius: $border-radius;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// collapsible item [aria-expanded]
|
|
102
|
+
|
|
103
|
+
&[aria-expanded='true'] {
|
|
104
|
+
.ActionList-item-collapseIcon {
|
|
105
|
+
transition: transform 120ms linear;
|
|
106
|
+
transform: scaleY(-1);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.ActionList--subGroup {
|
|
110
|
+
display: block;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&.ActionList-item--hasSubItem {
|
|
114
|
+
// stylelint-disable-next-line selector-max-specificity
|
|
115
|
+
> .ActionList-content > .ActionList-item-label {
|
|
116
|
+
font-weight: $font-weight-bold;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&[aria-expanded='false'] {
|
|
122
|
+
.ActionList-item-collapseIcon {
|
|
123
|
+
transition: transform 120ms linear;
|
|
124
|
+
transform: scaleY(1);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.ActionList--subGroup {
|
|
128
|
+
display: none;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// checkbox item [aria-checked]
|
|
133
|
+
// listbox [aria-selected]
|
|
134
|
+
|
|
135
|
+
&[aria-checked='true'],
|
|
136
|
+
&[aria-selected='true'] {
|
|
137
|
+
// multiselect checkmark
|
|
138
|
+
.ActionList-item-multiSelectCheckmark {
|
|
139
|
+
visibility: visible;
|
|
140
|
+
opacity: 1;
|
|
141
|
+
transition: visibility 0 linear 0, opacity $actionList-item-checkmark-transition-timing;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// singleselect checkmark
|
|
145
|
+
.ActionList-item-singleSelectCheckmark {
|
|
146
|
+
visibility: visible;
|
|
147
|
+
|
|
148
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
149
|
+
animation: checkmarkIn 200ms cubic-bezier(0.11, 0, 0.5, 0) forwards;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// checkbox
|
|
154
|
+
.ActionList-item-multiSelectIcon {
|
|
155
|
+
.ActionList-item-multiSelectIconRect {
|
|
156
|
+
fill: var(--color-accent-fg);
|
|
157
|
+
stroke: var(--color-accent-fg);
|
|
158
|
+
stroke-width: $border-width;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.ActionList-item-multiSelectCheckmark {
|
|
162
|
+
fill: var(--color-fg-on-emphasis);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&[aria-checked='false'],
|
|
168
|
+
&[aria-selected='false'] {
|
|
169
|
+
// multiselect checkmark
|
|
170
|
+
.ActionList-item-multiSelectCheckmark {
|
|
171
|
+
visibility: hidden;
|
|
172
|
+
opacity: 0;
|
|
173
|
+
transition:
|
|
174
|
+
visibility 0 linear $actionList-item-checkmark-transition-timing,
|
|
175
|
+
opacity $actionList-item-checkmark-transition-timing;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// singleselect checkmark
|
|
179
|
+
.ActionList-item-singleSelectCheckmark {
|
|
180
|
+
visibility: hidden;
|
|
181
|
+
transition: visibility 0s linear 200ms;
|
|
182
|
+
clip-path: inset(16px 0 0 0);
|
|
183
|
+
|
|
184
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
185
|
+
animation: checkmarkOut 200ms cubic-bezier(0.11, 0, 0.5, 0) forwards;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// checkbox
|
|
190
|
+
.ActionList-item-multiSelectIcon {
|
|
191
|
+
.ActionList-item-multiSelectIconRect {
|
|
192
|
+
fill: var(--color-canvas-default);
|
|
193
|
+
stroke: var(--color-border-default);
|
|
194
|
+
stroke-width: $border-width;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.ActionList-item-multiSelectIconRect {
|
|
199
|
+
fill: var(--color-canvas-default);
|
|
200
|
+
border: $border-width $border-style var(--color-border-default);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@keyframes checkmarkIn {
|
|
205
|
+
from {
|
|
206
|
+
clip-path: inset(16px 0 0 0);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
to {
|
|
210
|
+
clip-path: inset(0 0 0 0);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@keyframes checkmarkOut {
|
|
215
|
+
from {
|
|
216
|
+
clip-path: inset(0 0 0 0);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
to {
|
|
220
|
+
clip-path: inset(16px 0 0 0);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// variants
|
|
225
|
+
|
|
226
|
+
// danger
|
|
227
|
+
&.ActionList-item--danger {
|
|
228
|
+
.ActionList-item-label {
|
|
229
|
+
color: var(--color-danger-fg);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.ActionList-item-visual {
|
|
233
|
+
color: var(--color-danger-fg);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@media (hover: hover) and (pointer: fine) {
|
|
237
|
+
&:hover {
|
|
238
|
+
background: var(--color-action-list-item-danger-hover-bg);
|
|
239
|
+
|
|
240
|
+
// stylelint-disable-next-line max-nesting-depth
|
|
241
|
+
.ActionList-item-label {
|
|
242
|
+
color: var(--color-action-list-item-danger-hover-text);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
&:active {
|
|
248
|
+
background: var(--color-action-list-item-danger-active-bg);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// disabled
|
|
253
|
+
&[aria-disabled='true'] {
|
|
254
|
+
.ActionList-item-label,
|
|
255
|
+
.ActionList-item-description {
|
|
256
|
+
color: var(--color-primer-fg-disabled);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.ActionList-item-visual {
|
|
260
|
+
fill: var(--color-primer-fg-disabled);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
@media (hover: hover) and (pointer: fine) {
|
|
264
|
+
&:hover {
|
|
265
|
+
cursor: not-allowed;
|
|
266
|
+
background-color: transparent;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// if nested list exists, remove default padding
|
|
272
|
+
.ActionList {
|
|
273
|
+
// stylelint-disable-next-line primer/spacing
|
|
274
|
+
padding: unset;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// span or a href
|
|
279
|
+
.ActionList-content {
|
|
280
|
+
position: relative;
|
|
281
|
+
display: grid;
|
|
282
|
+
// stylelint-disable-next-line primer/spacing
|
|
283
|
+
padding: $actionList-item-padding-vertical $actionList-item-padding-horizontal;
|
|
284
|
+
font-weight: $font-weight-normal;
|
|
285
|
+
color: var(--color-fg-default);
|
|
286
|
+
user-select: none;
|
|
287
|
+
border-radius: $border-radius;
|
|
288
|
+
transition: $actionList-item-bg-transition;
|
|
289
|
+
grid-template-rows: min-content;
|
|
290
|
+
grid-template-areas: 'leadingAction leadingVisual label trailingVisual trailingAction';
|
|
291
|
+
grid-template-columns: min-content min-content minmax(min-content, auto) min-content min-content;
|
|
292
|
+
align-items: center;
|
|
293
|
+
|
|
294
|
+
// column-gap persists with empty grid-areas, margin applies only when children exist
|
|
295
|
+
> :not(:last-child) {
|
|
296
|
+
margin-right: $spacer-2;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// sizes
|
|
300
|
+
|
|
301
|
+
&.ActionList-content--sizeMedium {
|
|
302
|
+
// 44px total height
|
|
303
|
+
// stylelint-disable-next-line primer/spacing
|
|
304
|
+
padding: $actionList-item-padding-vertical-md $actionList-item-padding-horizontal;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
&.ActionList-content--sizeLarge {
|
|
308
|
+
// 48px total height
|
|
309
|
+
// stylelint-disable-next-line primer/spacing
|
|
310
|
+
padding: $actionList-item-padding-vertical-lg $actionList-item-padding-horizontal;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// On pointer:coarse (mobile), all list items are large
|
|
314
|
+
@media (pointer: coarse) {
|
|
315
|
+
// stylelint-disable-next-line primer/spacing
|
|
316
|
+
padding: $actionList-item-padding-vertical-lg $actionList-item-padding-horizontal;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
&.ActionList-content--blockDescription {
|
|
320
|
+
// if leading/trailing visual, align with first line of content
|
|
321
|
+
.ActionList-item-visual {
|
|
322
|
+
place-self: start;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// place children on grid
|
|
328
|
+
|
|
329
|
+
.ActionList-item-action--leading {
|
|
330
|
+
grid-area: leadingAction;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.ActionList-item-visual--leading {
|
|
334
|
+
grid-area: leadingVisual;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.ActionList-item-label {
|
|
338
|
+
grid-area: label;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.ActionList-item-visual--trailing {
|
|
342
|
+
grid-area: trailingVisual;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.ActionList-item-action--trailing {
|
|
346
|
+
grid-area: trailingAction;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// wrapper span
|
|
350
|
+
// default block
|
|
351
|
+
.ActionList-item-descriptionWrap {
|
|
352
|
+
grid-area: label;
|
|
353
|
+
display: flex;
|
|
354
|
+
flex-direction: column;
|
|
355
|
+
|
|
356
|
+
.ActionList-item-description {
|
|
357
|
+
margin-top: $spacer-1;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.ActionList-item-label {
|
|
361
|
+
font-weight: $font-weight-bold;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// inline
|
|
366
|
+
.ActionList-item-descriptionWrap--inline {
|
|
367
|
+
flex-direction: row;
|
|
368
|
+
align-items: baseline;
|
|
369
|
+
|
|
370
|
+
.ActionList-item-description {
|
|
371
|
+
// stylelint-disable-next-line primer/spacing
|
|
372
|
+
margin-left: $actionList-item-padding-horizontal;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// description
|
|
377
|
+
.ActionList-item-description {
|
|
378
|
+
font-size: $font-size-small;
|
|
379
|
+
font-weight: $font-weight-normal;
|
|
380
|
+
line-height: $lh-default;
|
|
381
|
+
color: var(--color-fg-muted);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// helper for grid alignment with multi-line content
|
|
385
|
+
// span wrapping svg or text
|
|
386
|
+
.ActionList-item-visual,
|
|
387
|
+
.ActionList-item-action {
|
|
388
|
+
display: flex;
|
|
389
|
+
min-height: $actionList-item-height-sm;
|
|
390
|
+
color: var(--color-fg-muted); // if visual is text
|
|
391
|
+
fill: var(--color-fg-muted);
|
|
392
|
+
align-items: center;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// text
|
|
396
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
|
397
|
+
.ActionList-item-label {
|
|
398
|
+
position: relative; // for pseudo dividers
|
|
399
|
+
font-weight: $font-weight-normal;
|
|
400
|
+
// we need a strict value here for grid alignment
|
|
401
|
+
// stylelint-disable-next-line primer/typography
|
|
402
|
+
line-height: $actionList-item-label-line-height;
|
|
403
|
+
color: var(--color-fg-default);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// nested lists (only supports 1 level currently)
|
|
407
|
+
// target ActionList-item--subItem for padding-left to maintain :active :after state
|
|
408
|
+
|
|
409
|
+
.ActionList-item--subItem > .ActionList-content {
|
|
410
|
+
font-size: $font-size-small;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// no leading visual
|
|
414
|
+
.ActionList--subGroup {
|
|
415
|
+
.ActionList-item--subItem {
|
|
416
|
+
padding-left: $spacer-3;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
// has 16px leading visual
|
|
421
|
+
.ActionList-content--visual16 + .ActionList--subGroup {
|
|
422
|
+
.ActionList-item--subItem {
|
|
423
|
+
padding-left: $spacer-4;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// has 20px leading visual
|
|
428
|
+
.ActionList-content--visual20 + .ActionList--subGroup {
|
|
429
|
+
.ActionList-item--subItem {
|
|
430
|
+
padding-left: $spacer-3 * 1.75;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// has 24px leading visual
|
|
435
|
+
.ActionList-content--visual24 + .ActionList--subGroup {
|
|
436
|
+
.ActionList-item--subItem {
|
|
437
|
+
padding-left: $spacer-5;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
@@ -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,33 @@
|
|
|
1
|
+
// <ul>
|
|
2
|
+
.ActionList {
|
|
3
|
+
padding: $spacer-2;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
// dividers
|
|
7
|
+
|
|
8
|
+
.ActionList--divided {
|
|
9
|
+
.ActionList-item-label::before {
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: -$actionList-item-padding-vertical;
|
|
12
|
+
display: block;
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 1px;
|
|
15
|
+
content: '';
|
|
16
|
+
background: var(--color-action-list-item-inline-divider);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// hide divider if item is active
|
|
20
|
+
.ActionList-item--navActive {
|
|
21
|
+
// stylelint-disable-next-line selector-max-specificity, selector-max-compound-selectors
|
|
22
|
+
.ActionList-item-label::before,
|
|
23
|
+
+ .ActionList-item .ActionList-item-label::before {
|
|
24
|
+
visibility: hidden;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// hide if item is first of type with label::before, or is the first item after a sectionDivider
|
|
30
|
+
.ActionList-item:first-of-type .ActionList-item-label::before,
|
|
31
|
+
.ActionList-sectionDivider + .ActionList-item .ActionList-item-label::before {
|
|
32
|
+
visibility: hidden;
|
|
33
|
+
}
|
package/alerts/README.md
CHANGED
|
@@ -19,7 +19,7 @@ The `@primer/css` npm package includes a standalone CSS build of this module in
|
|
|
19
19
|
|
|
20
20
|
## License
|
|
21
21
|
|
|
22
|
-
[MIT](https://github.com/primer/css/blob/
|
|
22
|
+
[MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
[scss]: https://sass-lang.com/documentation/syntax#scss
|
package/alerts/flash.scss
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
position: relative;
|
|
6
6
|
// stylelint-disable-next-line primer/spacing
|
|
7
7
|
padding: 20px $spacer-3;
|
|
8
|
-
color: $text-gray-dark;
|
|
9
8
|
border-style: $border-style;
|
|
10
9
|
border-width: $border-width;
|
|
11
10
|
border-radius: $border-radius;
|
|
@@ -58,6 +57,15 @@
|
|
|
58
57
|
margin-top: -3px;
|
|
59
58
|
margin-left: $spacer-4;
|
|
60
59
|
background-clip: padding-box;
|
|
60
|
+
|
|
61
|
+
&.btn .octicon {
|
|
62
|
+
margin-right: $spacer-1;
|
|
63
|
+
color: var(--color-fg-muted);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.btn-primary .octicon {
|
|
67
|
+
color: inherit;
|
|
68
|
+
}
|
|
61
69
|
}
|
|
62
70
|
|
|
63
71
|
//
|
|
@@ -65,49 +73,42 @@
|
|
|
65
73
|
//
|
|
66
74
|
|
|
67
75
|
.flash {
|
|
68
|
-
|
|
69
|
-
background-
|
|
70
|
-
|
|
71
|
-
border-color: rgba($blue-700, 0.2);
|
|
76
|
+
color: var(--color-fg-default);
|
|
77
|
+
background-image: linear-gradient(var(--color-accent-subtle), var(--color-accent-subtle));
|
|
78
|
+
border-color: var(--color-accent-muted);
|
|
72
79
|
|
|
73
80
|
.octicon {
|
|
74
|
-
|
|
75
|
-
color: rgba($blue-700, 0.6);
|
|
81
|
+
color: var(--color-accent-fg);
|
|
76
82
|
}
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
.flash-warn {
|
|
80
|
-
|
|
81
|
-
background-
|
|
82
|
-
|
|
83
|
-
border-color: rgba($yellow-800, 0.2);
|
|
86
|
+
color: var(--color-fg-default);
|
|
87
|
+
background-image: linear-gradient(var(--color-attention-subtle), var(--color-attention-subtle));
|
|
88
|
+
border-color: var(--color-attention-muted);
|
|
84
89
|
|
|
85
90
|
.octicon {
|
|
86
|
-
|
|
87
|
-
color: rgba($yellow-800, 1);
|
|
91
|
+
color: var(--color-attention-fg);
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
.flash-error {
|
|
92
|
-
|
|
93
|
-
background-
|
|
94
|
-
|
|
95
|
-
border-color: rgba($red-800, 0.2);
|
|
96
|
+
color: var(--color-fg-default);
|
|
97
|
+
background-image: linear-gradient(var(--color-danger-subtle), var(--color-danger-subtle));
|
|
98
|
+
border-color: var(--color-danger-muted);
|
|
96
99
|
|
|
97
100
|
.octicon {
|
|
98
|
-
|
|
99
|
-
color: rgba($red-800, 0.6);
|
|
101
|
+
color: var(--color-danger-fg);
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
.flash-success {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
border-color:
|
|
106
|
+
color: var(--color-fg-default);
|
|
107
|
+
background-image: linear-gradient(var(--color-success-subtle), var(--color-success-subtle));
|
|
108
|
+
border-color: var(--color-success-muted);
|
|
107
109
|
|
|
108
110
|
.octicon {
|
|
109
|
-
|
|
110
|
-
color: rgba($green-700, 0.8);
|
|
111
|
+
color: var(--color-success-fg);
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
|
|
@@ -134,12 +135,17 @@
|
|
|
134
135
|
border-radius: 0;
|
|
135
136
|
}
|
|
136
137
|
|
|
138
|
+
// Makes sure the background is opaque to cover any content underneath
|
|
139
|
+
.flash-full,
|
|
140
|
+
.flash-banner {
|
|
141
|
+
background-color: var(--color-canvas-default);
|
|
142
|
+
}
|
|
143
|
+
|
|
137
144
|
// FIXME deprecate this
|
|
138
145
|
.warning {
|
|
139
146
|
padding: $em-spacer-5;
|
|
140
147
|
// stylelint-disable-next-line primer/spacing
|
|
141
148
|
margin-bottom: 0.8em;
|
|
142
149
|
font-weight: $font-weight-bold;
|
|
143
|
-
|
|
144
|
-
background-color: $yellow-100;
|
|
150
|
+
background-color: var(--color-attention-subtle);
|
|
145
151
|
}
|
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';
|
package/autocomplete/README.md
CHANGED
|
@@ -19,7 +19,7 @@ The `@primer/css` npm package includes a standalone CSS build of this module in
|
|
|
19
19
|
|
|
20
20
|
## License
|
|
21
21
|
|
|
22
|
-
[MIT](https://github.com/primer/css/blob/
|
|
22
|
+
[MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
[scss]: https://sass-lang.com/documentation/syntax#scss
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
// stylelint-disable-next-line primer/typography
|
|
9
9
|
font-size: 13px;
|
|
10
10
|
list-style: none;
|
|
11
|
-
background:
|
|
11
|
+
background: var(--color-canvas-overlay);
|
|
12
|
+
border: $border-width $border-style var(--color-border-default);
|
|
12
13
|
border-radius: $border-radius;
|
|
13
|
-
|
|
14
|
-
box-shadow: inset 0 0 0 1px $border-color, $box-shadow-medium;
|
|
14
|
+
box-shadow: var(--color-shadow-medium);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
// One of the items that appears within an autocomplete group
|
|
@@ -23,22 +23,32 @@
|
|
|
23
23
|
padding: $spacer-1 $spacer-2;
|
|
24
24
|
overflow: hidden;
|
|
25
25
|
font-weight: $font-weight-bold;
|
|
26
|
-
color:
|
|
26
|
+
color: var(--color-fg-default);
|
|
27
27
|
text-align: left;
|
|
28
28
|
text-decoration: none;
|
|
29
29
|
text-overflow: ellipsis;
|
|
30
30
|
white-space: nowrap;
|
|
31
31
|
cursor: pointer;
|
|
32
|
-
background-color:
|
|
32
|
+
background-color: var(--color-canvas-overlay);
|
|
33
33
|
border: 0;
|
|
34
34
|
|
|
35
|
-
&:hover
|
|
35
|
+
&:hover {
|
|
36
|
+
color: var(--color-fg-on-emphasis);
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
background-color: var(--color-accent-emphasis);
|
|
39
|
+
|
|
40
|
+
// Inherit color on all child elements to ensure enough contrast
|
|
41
|
+
* {
|
|
42
|
+
color: inherit !important;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
36
46
|
&.selected,
|
|
37
47
|
&[aria-selected=true],
|
|
38
48
|
&.navigation-focus {
|
|
39
|
-
color:
|
|
49
|
+
color: var(--color-fg-on-emphasis);
|
|
40
50
|
text-decoration: none;
|
|
41
|
-
background-color:
|
|
51
|
+
background-color: var(--color-accent-emphasis);
|
|
42
52
|
|
|
43
53
|
// Inherit color on all child elements to ensure enough contrast
|
|
44
54
|
* {
|
package/autocomplete/index.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// support files
|
|
2
|
-
@import
|
|
3
|
-
@import
|
|
4
|
-
@import
|
|
2
|
+
@import '../support/index.scss';
|
|
3
|
+
@import './autocomplete.scss';
|
|
4
|
+
@import './suggester.scss';
|