@papillonbits/css 1.4.0 → 1.6.0
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/LICENSE +1 -1
- package/build/primer/autocomplete/README.md +20 -0
- package/build/primer/autocomplete/index.scss +3 -0
- package/build/primer/autocomplete/suggester.scss +101 -0
- package/build/primer/avatars/README.md +20 -0
- package/build/primer/avatars/avatar-parent-child.scss +17 -0
- package/build/primer/avatars/circle-badge.scss +55 -0
- package/build/primer/avatars/index.scss +5 -0
- package/build/primer/base/README.md +20 -0
- package/build/primer/base/base.scss +2 -5
- package/build/primer/base/kbd.scss +2 -6
- package/build/primer/base/typography-base.scss +0 -3
- package/build/primer/box/README.md +20 -0
- package/build/primer/box/box-overlay.scss +45 -0
- package/build/primer/box/index.scss +2 -0
- package/build/primer/branch-name/README.md +20 -0
- package/build/primer/branch-name/branch-name.scss +33 -0
- package/build/primer/branch-name/index.scss +3 -0
- package/build/primer/buttons/README.md +20 -0
- package/build/primer/buttons/button-group.scss +104 -0
- package/build/primer/buttons/button.scss +347 -0
- package/build/primer/buttons/index.scss +4 -0
- package/build/primer/buttons/misc.scss +244 -0
- package/build/primer/color-modes/themes/dark.scss +1 -1
- package/build/primer/color-modes/themes/dark_colorblind.scss +1 -1
- package/build/primer/color-modes/themes/dark_dimmed.scss +1 -1
- package/build/primer/color-modes/themes/dark_high_contrast.scss +1 -1
- package/build/primer/color-modes/themes/dark_tritanopia.scss +1 -1
- package/build/primer/color-modes/themes/light.scss +1 -1
- package/build/primer/color-modes/themes/light_colorblind.scss +1 -1
- package/build/primer/color-modes/themes/light_high_contrast.scss +1 -1
- package/build/primer/color-modes/themes/light_tritanopia.scss +1 -1
- package/build/primer/core/README.md +20 -0
- package/build/primer/core/index.scss +18 -0
- package/build/primer/docs.scss +7 -0
- package/build/primer/forms/README.md +20 -0
- package/build/primer/forms/form-control.scss +286 -0
- package/build/primer/forms/form-group.scss +297 -0
- package/build/primer/forms/form-select.scss +47 -0
- package/build/primer/forms/index.scss +6 -0
- package/build/primer/forms/input-group.scss +81 -0
- package/build/primer/forms/radio-group.scss +68 -0
- package/build/primer/header/README.md +20 -0
- package/build/primer/header/header.scss +51 -0
- package/build/primer/header/index.scss +2 -0
- package/build/primer/index.scss +8 -3
- package/build/primer/labels/README.md +20 -0
- package/build/primer/labels/index.scss +3 -0
- package/build/primer/labels/issue-labels.scss +26 -0
- package/build/primer/labels/mixins.scss +44 -0
- package/build/primer/layout/README.md +20 -0
- package/build/primer/layout/app-frame.scss +156 -0
- package/build/primer/layout/container.scss +30 -0
- package/build/primer/layout/grid-offset.scss +19 -0
- package/build/primer/layout/grid.scss +77 -0
- package/build/primer/layout/index.scss +7 -0
- package/build/primer/layout/page-layout.scss +417 -0
- package/build/primer/layout/stack.scss +220 -0
- package/build/primer/loaders/README.md +20 -0
- package/build/primer/loaders/index.scss +2 -0
- package/build/primer/loaders/loaders.scss +19 -0
- package/build/primer/markdown/README.md +20 -0
- package/build/primer/markdown/blob-csv.scss +32 -0
- package/build/primer/markdown/code.scss +79 -0
- package/build/primer/markdown/footnotes.scss +59 -0
- package/build/primer/markdown/headings.scss +101 -0
- package/build/primer/markdown/images.scss +130 -0
- package/build/primer/markdown/index.scss +9 -0
- package/build/primer/markdown/lists.scss +101 -0
- package/build/primer/markdown/markdown-body.scss +101 -0
- package/build/primer/markdown/tables.scss +46 -0
- package/build/primer/marketing/README.md +20 -0
- package/build/primer/marketing/buttons/button.scss +171 -0
- package/build/primer/marketing/buttons/index.scss +3 -0
- package/build/primer/marketing/index.scss +8 -0
- package/build/primer/marketing/links/index.scss +3 -0
- package/build/primer/marketing/links/link.scss +51 -0
- package/build/primer/marketing/support/index.scss +2 -0
- package/build/primer/marketing/support/variables.scss +140 -0
- package/build/primer/marketing/type/index.scss +3 -0
- package/build/primer/marketing/type/typography.scss +140 -0
- package/build/primer/marketing/utilities/animations.scss +52 -0
- package/build/primer/marketing/utilities/borders.scss +4 -0
- package/build/primer/marketing/utilities/filters.scss +3 -0
- package/build/primer/marketing/utilities/index.scss +6 -0
- package/build/primer/marketing/utilities/layout.scss +58 -0
- package/build/primer/navigation/README.md +20 -0
- package/build/primer/navigation/filter-list.scss +86 -0
- package/build/primer/navigation/index.scss +5 -0
- package/build/primer/navigation/sidenav.scss +102 -0
- package/build/primer/navigation/subnav.scss +154 -0
- package/build/primer/pagination/README.md +20 -0
- package/build/primer/pagination/index.scss +3 -0
- package/build/primer/pagination/pagination.scss +157 -0
- package/build/primer/primitives/index.scss +8 -19
- package/build/primer/primitives/temp-typography-tokens.scss +22 -0
- package/build/primer/product/README.md +20 -0
- package/build/primer/product/index.scss +13 -0
- package/build/primer/select-menu/README.md +20 -0
- package/build/primer/select-menu/index.scss +3 -0
- package/build/primer/select-menu/select-menu.scss +486 -0
- package/build/primer/support/README.md +20 -0
- package/build/primer/support/mixins/layout.scss +1 -1
- package/build/primer/support/mixins/misc.scss +2 -0
- package/build/primer/support/mixins/typography.scss +0 -2
- package/build/primer/support/variables/typography.scss +1 -1
- package/build/primer/table-object/index.scss +1 -0
- package/build/primer/table-object/table-object.scss +23 -0
- package/build/primer/toasts/README.md +20 -0
- package/build/primer/toasts/index.scss +2 -0
- package/build/primer/toasts/toasts.scss +129 -0
- package/build/primer/tooltips/README.md +20 -0
- package/build/primer/tooltips/index.scss +2 -0
- package/build/primer/tooltips/tooltips.scss +228 -0
- package/build/primer/utilities/README.md +20 -0
- package/build/primer/utilities/borders.scss +12 -3
- package/build/primer/utilities/box-shadow.scss +0 -2
- package/build/primer/utilities/colors.scss +0 -1
- package/build/primer/utilities/details.scss +1 -1
- package/build/primer/utilities/flexbox.scss +2 -1
- package/build/primer/utilities/layout.scss +2 -2
- package/build/primer/utilities/margin.scss +2 -3
- package/build/primer/utilities/padding.scss +2 -3
- package/build/primer/utilities/typography.scss +4 -3
- package/build/primer/utilities/visibility-display.scss +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
// stylelint-disable selector-max-type
|
|
2
|
+
// selector-max-type is needed for body:not(.intent-mouse) to target keyboard only styles.
|
|
3
|
+
|
|
4
|
+
$SelectMenu-max-height: 480px !default;
|
|
5
|
+
|
|
6
|
+
// Select Menu
|
|
7
|
+
//
|
|
8
|
+
// A more advanced menu with support for navigation, filtering, and more.
|
|
9
|
+
|
|
10
|
+
.SelectMenu {
|
|
11
|
+
position: fixed;
|
|
12
|
+
top: 0;
|
|
13
|
+
right: 0;
|
|
14
|
+
bottom: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
z-index: 99;
|
|
17
|
+
display: flex;
|
|
18
|
+
padding: var(--base-size-16);
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
|
|
22
|
+
@include breakpoint(sm) {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: auto;
|
|
25
|
+
right: auto;
|
|
26
|
+
bottom: auto;
|
|
27
|
+
left: auto;
|
|
28
|
+
padding: 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Backdrop
|
|
33
|
+
//
|
|
34
|
+
// Adds a dark, semi transparent "cover" underneath the modal. Only visible for xs.
|
|
35
|
+
|
|
36
|
+
.SelectMenu::before {
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 0;
|
|
39
|
+
right: 0;
|
|
40
|
+
bottom: 0;
|
|
41
|
+
left: 0;
|
|
42
|
+
pointer-events: none;
|
|
43
|
+
content: '';
|
|
44
|
+
background-color: var(--overlay-backdrop-bgColor, var(--color-primer-canvas-backdrop));
|
|
45
|
+
|
|
46
|
+
@include breakpoint(sm) {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Modal
|
|
52
|
+
//
|
|
53
|
+
// The main "box" that contains the content
|
|
54
|
+
|
|
55
|
+
.SelectMenu-modal {
|
|
56
|
+
position: relative;
|
|
57
|
+
z-index: 99; // Needs to be higher than .details-overlay's z-index: 80.
|
|
58
|
+
display: flex;
|
|
59
|
+
max-height: 66%;
|
|
60
|
+
margin: auto 0;
|
|
61
|
+
overflow: hidden; // Enables border radius on scrollable child elements
|
|
62
|
+
pointer-events: auto;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
background-color: var(--overlay-bgColor, var(--color-canvas-overlay));
|
|
65
|
+
// stylelint-disable-next-line primer/borders, primer/colors
|
|
66
|
+
border: $border-width $border-style var(--selectMenu-borderColor, var(--color-select-menu-backdrop-border));
|
|
67
|
+
// stylelint-disable-next-line primer/borders
|
|
68
|
+
border-radius: $border-radius * 2;
|
|
69
|
+
box-shadow: var(--shadow-floating-legacy, var(--color-overlay-shadow));
|
|
70
|
+
animation: SelectMenu-modal-animation 0.12s cubic-bezier(0, 0.1, 0.1, 1) backwards;
|
|
71
|
+
|
|
72
|
+
@keyframes SelectMenu-modal-animation {
|
|
73
|
+
0% {
|
|
74
|
+
opacity: 0;
|
|
75
|
+
transform: scale(0.9);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@keyframes SelectMenu-modal-animation--sm {
|
|
80
|
+
0% {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
transform: translateY(calc(var(--base-size-16) * -1));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@include breakpoint(sm) {
|
|
87
|
+
width: 300px;
|
|
88
|
+
height: auto;
|
|
89
|
+
max-height: $SelectMenu-max-height;
|
|
90
|
+
margin: var(--base-size-8) 0 var(--base-size-16) 0;
|
|
91
|
+
// stylelint-disable-next-line primer/typography
|
|
92
|
+
font-size: $font-size-small;
|
|
93
|
+
border-color: var(--borderColor-default, var(--color-border-default));
|
|
94
|
+
// stylelint-disable-next-line primer/borders
|
|
95
|
+
border-radius: $border-radius;
|
|
96
|
+
box-shadow: var(--shadow-floating-legacy, var(--color-overlay-shadow));
|
|
97
|
+
animation-name: SelectMenu-modal-animation--sm;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Header
|
|
102
|
+
//
|
|
103
|
+
// Used for showing a title and the close button. Close button is only visible for xs.
|
|
104
|
+
|
|
105
|
+
.SelectMenu-header {
|
|
106
|
+
display: flex;
|
|
107
|
+
padding: var(--base-size-16);
|
|
108
|
+
flex: none; // fixes header from getting squeezed in Safari iOS
|
|
109
|
+
align-items: center;
|
|
110
|
+
// stylelint-disable-next-line primer/borders, primer/colors
|
|
111
|
+
border-bottom: $border-width $border-style var(--borderColor-muted, var(--color-border-muted));
|
|
112
|
+
|
|
113
|
+
@include breakpoint(sm) {
|
|
114
|
+
// stylelint-disable-next-line primer/spacing
|
|
115
|
+
padding: 7px 7px 7px var(--base-size-16);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.SelectMenu-title {
|
|
120
|
+
flex: 1;
|
|
121
|
+
// stylelint-disable-next-line primer/typography
|
|
122
|
+
font-size: $body-font-size;
|
|
123
|
+
// stylelint-disable-next-line primer/typography
|
|
124
|
+
font-weight: $font-weight-bold;
|
|
125
|
+
|
|
126
|
+
@include breakpoint(sm) {
|
|
127
|
+
font-size: inherit;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.SelectMenu-closeButton {
|
|
132
|
+
padding: var(--base-size-16);
|
|
133
|
+
margin: calc(var(--base-size-16) * -1);
|
|
134
|
+
// stylelint-disable-next-line primer/typography
|
|
135
|
+
line-height: 1;
|
|
136
|
+
color: var(--fgColor-muted, var(--color-fg-muted));
|
|
137
|
+
background-color: transparent;
|
|
138
|
+
border: 0;
|
|
139
|
+
|
|
140
|
+
@include breakpoint(sm) {
|
|
141
|
+
padding: var(--base-size-8);
|
|
142
|
+
// stylelint-disable-next-line primer/spacing
|
|
143
|
+
margin: calc(var(--base-size-8) * -1) (-7px); // Using -7px fixes a :focus glitch
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Filter
|
|
148
|
+
//
|
|
149
|
+
// An input to filter a large list
|
|
150
|
+
|
|
151
|
+
.SelectMenu-filter {
|
|
152
|
+
padding: var(--base-size-16);
|
|
153
|
+
margin: 0;
|
|
154
|
+
// stylelint-disable-next-line primer/borders, primer/colors
|
|
155
|
+
border-bottom: $border-width $border-style var(--borderColor-muted, var(--color-border-muted));
|
|
156
|
+
|
|
157
|
+
@include breakpoint(sm) {
|
|
158
|
+
padding: var(--base-size-8);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.SelectMenu-input {
|
|
163
|
+
display: block;
|
|
164
|
+
width: 100%;
|
|
165
|
+
|
|
166
|
+
@include breakpoint(sm) {
|
|
167
|
+
// stylelint-disable-next-line primer/typography
|
|
168
|
+
font-size: $h5-size;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// List
|
|
173
|
+
//
|
|
174
|
+
// The container that holds all the list items. Starts scrolling when the list gets too long.
|
|
175
|
+
|
|
176
|
+
.SelectMenu-list {
|
|
177
|
+
position: relative;
|
|
178
|
+
padding: 0;
|
|
179
|
+
margin: 0;
|
|
180
|
+
// stylelint-disable-next-line primer/spacing
|
|
181
|
+
margin-bottom: -$border-width; // Hides the last border in the list
|
|
182
|
+
flex: auto;
|
|
183
|
+
overflow-x: hidden;
|
|
184
|
+
overflow-y: auto;
|
|
185
|
+
background-color: var(--overlay-bgColor, var(--color-canvas-overlay));
|
|
186
|
+
-webkit-overflow-scrolling: touch; // Adds momentum + bouncy scrolling
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// List Item
|
|
190
|
+
//
|
|
191
|
+
// The interactive element used to make a selection
|
|
192
|
+
|
|
193
|
+
.SelectMenu-item {
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
width: 100%;
|
|
197
|
+
padding: var(--base-size-16);
|
|
198
|
+
overflow: hidden;
|
|
199
|
+
color: var(--fgColor-default, var(--color-fg-default));
|
|
200
|
+
text-align: left;
|
|
201
|
+
cursor: pointer;
|
|
202
|
+
background-color: var(--overlay-bgColor, var(--color-canvas-overlay));
|
|
203
|
+
border: 0;
|
|
204
|
+
// stylelint-disable-next-line primer/borders, primer/colors
|
|
205
|
+
border-bottom: $border-width $border-style var(--borderColor-muted, var(--color-border-muted));
|
|
206
|
+
|
|
207
|
+
@include breakpoint(sm) {
|
|
208
|
+
// stylelint-disable-next-line primer/spacing
|
|
209
|
+
padding-top: 7px;
|
|
210
|
+
// stylelint-disable-next-line primer/spacing
|
|
211
|
+
padding-bottom: 7px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Borderless
|
|
215
|
+
.SelectMenu-list--borderless & {
|
|
216
|
+
border-bottom: 0;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Icon
|
|
221
|
+
//
|
|
222
|
+
// Icon shown on the left of a list item.
|
|
223
|
+
|
|
224
|
+
.SelectMenu-icon {
|
|
225
|
+
width: var(--base-size-16); // fixed width to make sure following content aligns
|
|
226
|
+
margin-right: var(--base-size-8);
|
|
227
|
+
flex-shrink: 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Check icon
|
|
231
|
+
.SelectMenu-icon--check {
|
|
232
|
+
visibility: hidden;
|
|
233
|
+
transition: transform 0.12s cubic-bezier(0.5, 0.1, 1, 0.5), visibility 0s 0.12s linear;
|
|
234
|
+
transform: scale(0);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// Tabs
|
|
238
|
+
//
|
|
239
|
+
// Allows switching between multiple lists
|
|
240
|
+
|
|
241
|
+
.SelectMenu-tabs {
|
|
242
|
+
display: flex;
|
|
243
|
+
flex-shrink: 0;
|
|
244
|
+
overflow-x: auto;
|
|
245
|
+
overflow-y: hidden;
|
|
246
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
247
|
+
box-shadow: inset 0 -1px 0 var(--borderColor-muted, var(--color-border-muted));
|
|
248
|
+
-webkit-overflow-scrolling: touch;
|
|
249
|
+
|
|
250
|
+
// Hide scrollbar so it doesn't cover the text
|
|
251
|
+
&::-webkit-scrollbar {
|
|
252
|
+
display: none;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
@include breakpoint(sm) {
|
|
256
|
+
padding: var(--base-size-8) var(--base-size-8) 0 var(--base-size-8);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.SelectMenu-tab {
|
|
261
|
+
flex: 1;
|
|
262
|
+
padding: var(--base-size-8) var(--base-size-16);
|
|
263
|
+
// stylelint-disable-next-line primer/typography
|
|
264
|
+
font-size: $font-size-small;
|
|
265
|
+
// stylelint-disable-next-line primer/typography
|
|
266
|
+
font-weight: $font-weight-semibold;
|
|
267
|
+
color: var(--fgColor-muted, var(--color-fg-muted));
|
|
268
|
+
text-align: center;
|
|
269
|
+
background-color: transparent;
|
|
270
|
+
border: 0;
|
|
271
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
272
|
+
box-shadow: inset 0 -1px 0 var(--borderColor-muted, var(--color-border-muted));
|
|
273
|
+
|
|
274
|
+
@include breakpoint(sm) {
|
|
275
|
+
flex: none;
|
|
276
|
+
padding: var(--base-size-4) var(--base-size-16);
|
|
277
|
+
// stylelint-disable-next-line primer/borders, primer/colors
|
|
278
|
+
border: $border-width $border-style transparent;
|
|
279
|
+
border-bottom-width: 0;
|
|
280
|
+
// stylelint-disable-next-line primer/borders
|
|
281
|
+
border-top-left-radius: $border-radius;
|
|
282
|
+
// stylelint-disable-next-line primer/borders
|
|
283
|
+
border-top-right-radius: $border-radius;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
&[aria-selected='true'] {
|
|
287
|
+
z-index: 1; // Keeps box-shadow visible when hovering
|
|
288
|
+
color: var(--fgColor-default, var(--color-fg-default));
|
|
289
|
+
cursor: default;
|
|
290
|
+
background-color: var(--overlay-bgColor, var(--color-canvas-overlay));
|
|
291
|
+
// stylelint-disable-next-line primer/box-shadow
|
|
292
|
+
box-shadow: 0 0 0 1px var(--borderColor-muted, var(--color-border-muted));
|
|
293
|
+
|
|
294
|
+
@include breakpoint(sm) {
|
|
295
|
+
border-color: var(--borderColor-muted, var(--color-border-muted));
|
|
296
|
+
box-shadow: none;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Message
|
|
302
|
+
//
|
|
303
|
+
// A container used to show different kinds of text messages.
|
|
304
|
+
|
|
305
|
+
.SelectMenu-message {
|
|
306
|
+
// stylelint-disable-next-line primer/spacing
|
|
307
|
+
padding: 7px var(--base-size-16);
|
|
308
|
+
text-align: center;
|
|
309
|
+
background-color: var(--overlay-bgColor, var(--color-canvas-overlay));
|
|
310
|
+
// stylelint-disable-next-line primer/borders, primer/colors
|
|
311
|
+
border-bottom: $border-width $border-style var(--borderColor-muted, var(--color-border-muted));
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// Blankslate and Loading
|
|
315
|
+
//
|
|
316
|
+
// A container used to show a blankslate or the loading animation.
|
|
317
|
+
|
|
318
|
+
.SelectMenu-blankslate,
|
|
319
|
+
.SelectMenu-loading {
|
|
320
|
+
padding: var(--base-size-24) var(--base-size-16);
|
|
321
|
+
text-align: center;
|
|
322
|
+
background-color: var(--overlay-bgColor, var(--color-canvas-overlay));
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// Divider
|
|
326
|
+
//
|
|
327
|
+
// Can be used to divide the list into multiple groups
|
|
328
|
+
|
|
329
|
+
.SelectMenu-divider {
|
|
330
|
+
padding: var(--base-size-4) var(--base-size-16);
|
|
331
|
+
margin: 0;
|
|
332
|
+
// stylelint-disable-next-line primer/typography
|
|
333
|
+
font-size: $font-size-small;
|
|
334
|
+
// stylelint-disable-next-line primer/typography
|
|
335
|
+
font-weight: $font-weight-semibold;
|
|
336
|
+
color: var(--fgColor-muted, var(--color-fg-muted));
|
|
337
|
+
background-color: var(--bgColor-muted, var(--color-canvas-subtle));
|
|
338
|
+
// stylelint-disable-next-line primer/borders, primer/colors
|
|
339
|
+
border-bottom: $border-width $border-style var(--borderColor-muted, var(--color-border-muted));
|
|
340
|
+
|
|
341
|
+
// Borderless
|
|
342
|
+
.SelectMenu-list--borderless & {
|
|
343
|
+
// stylelint-disable-next-line primer/borders, primer/colors
|
|
344
|
+
border-top: $border-width $border-style var(--borderColor-muted, var(--color-border-muted));
|
|
345
|
+
|
|
346
|
+
&:empty {
|
|
347
|
+
padding: 0;
|
|
348
|
+
border-top: 0;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// Footer
|
|
354
|
+
//
|
|
355
|
+
// A container at the bottom.
|
|
356
|
+
|
|
357
|
+
.SelectMenu-footer {
|
|
358
|
+
z-index: 0; // Avoid top border from getting covered by the negative margin of the list
|
|
359
|
+
padding: var(--base-size-8) var(--base-size-16);
|
|
360
|
+
// stylelint-disable-next-line primer/typography
|
|
361
|
+
font-size: $font-size-small;
|
|
362
|
+
color: var(--fgColor-muted, var(--color-fg-muted));
|
|
363
|
+
text-align: center;
|
|
364
|
+
// stylelint-disable-next-line primer/borders, primer/colors
|
|
365
|
+
border-top: $border-width $border-style var(--borderColor-muted, var(--color-border-muted));
|
|
366
|
+
|
|
367
|
+
@include breakpoint(sm) {
|
|
368
|
+
// stylelint-disable-next-line primer/spacing
|
|
369
|
+
padding: 7px var(--base-size-16);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// Has Filter (modifier)
|
|
374
|
+
//
|
|
375
|
+
// Makes sure that the filter input keeps a fixed position at the top while typing. Only visible for xs.
|
|
376
|
+
|
|
377
|
+
.SelectMenu--hasFilter {
|
|
378
|
+
.SelectMenu-modal {
|
|
379
|
+
height: 80%;
|
|
380
|
+
max-height: none;
|
|
381
|
+
margin-top: 0;
|
|
382
|
+
|
|
383
|
+
@include breakpoint(sm) {
|
|
384
|
+
height: auto;
|
|
385
|
+
max-height: $SelectMenu-max-height;
|
|
386
|
+
margin-top: var(--base-size-8);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// States
|
|
392
|
+
//
|
|
393
|
+
// Different states
|
|
394
|
+
|
|
395
|
+
// Reset outlines
|
|
396
|
+
.SelectMenu-tab:focus,
|
|
397
|
+
.SelectMenu-item:focus {
|
|
398
|
+
outline: 0;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// Reset <a> elements
|
|
402
|
+
.SelectMenu-item:hover {
|
|
403
|
+
text-decoration: none;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// Selected
|
|
407
|
+
//
|
|
408
|
+
// Visible when a user clicks/taps on a list item
|
|
409
|
+
|
|
410
|
+
.SelectMenu-item[aria-checked='true'] {
|
|
411
|
+
// stylelint-disable-next-line primer/typography
|
|
412
|
+
font-weight: $font-weight-semibold;
|
|
413
|
+
color: var(--fgColor-default, var(--color-fg-default));
|
|
414
|
+
|
|
415
|
+
.SelectMenu-icon--check {
|
|
416
|
+
visibility: visible;
|
|
417
|
+
transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1), visibility 0s linear;
|
|
418
|
+
transform: scale(1);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
// Disabled
|
|
423
|
+
//
|
|
424
|
+
// Prevent list items to be selected
|
|
425
|
+
|
|
426
|
+
.SelectMenu-item:disabled,
|
|
427
|
+
.SelectMenu-item[aria-disabled='true'] {
|
|
428
|
+
color: var(--fgColor-disabled, var(--color-primer-fg-disabled));
|
|
429
|
+
pointer-events: none;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// Can hover states
|
|
433
|
+
//
|
|
434
|
+
// For mouse/keyboard input
|
|
435
|
+
|
|
436
|
+
@media (hover: hover) {
|
|
437
|
+
body:not(.intent-mouse) .SelectMenu-closeButton:focus,
|
|
438
|
+
.SelectMenu-closeButton:hover {
|
|
439
|
+
color: var(--fgColor-default, var(--color-fg-default));
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.SelectMenu-closeButton:active {
|
|
443
|
+
color: var(--fgColor-muted, var(--color-fg-muted));
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
body:not(.intent-mouse) .SelectMenu-item:focus,
|
|
447
|
+
.SelectMenu-item:hover {
|
|
448
|
+
background-color: var(--bgColor-neutral-muted, var(--color-neutral-subtle));
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.SelectMenu-item:active {
|
|
452
|
+
background-color: var(--bgColor-muted, var(--color-canvas-subtle));
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
body:not(.intent-mouse) .SelectMenu-tab:focus {
|
|
456
|
+
background-color: var(--selectMenu-bgColor-active, var(--color-select-menu-tap-focus-bg));
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.SelectMenu-tab:hover {
|
|
460
|
+
color: var(--fgColor-default, var(--color-fg-default));
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.SelectMenu-tab:not([aria-selected='true']):active {
|
|
464
|
+
color: var(--fgColor-default, var(--color-fg-default));
|
|
465
|
+
background-color: var(--bgColor-muted, var(--color-canvas-subtle));
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// Can not hover states
|
|
470
|
+
//
|
|
471
|
+
// For touch input
|
|
472
|
+
|
|
473
|
+
@media (hover: none) {
|
|
474
|
+
// Android
|
|
475
|
+
.SelectMenu-item:focus,
|
|
476
|
+
.SelectMenu-item:active {
|
|
477
|
+
background-color: var(--bgColor-muted, var(--color-canvas-subtle));
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
// iOS Safari
|
|
481
|
+
// :active would work if ontouchstart is added to the button
|
|
482
|
+
// Instead this tweaks the "native" highlight color
|
|
483
|
+
.SelectMenu-item {
|
|
484
|
+
-webkit-tap-highlight-color: var(--control-bgColor-active, var(--color-select-menu-tap-highlight));
|
|
485
|
+
}
|
|
486
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
bundle: "support"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Primer CSS: `support` bundle
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
|
|
10
|
+
Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:
|
|
11
|
+
|
|
12
|
+
```scss
|
|
13
|
+
@import "@primer/css/support/index.scss";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Build
|
|
17
|
+
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/support.css`.
|
|
19
|
+
|
|
20
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&::before {
|
|
26
|
+
// stylelint-disable-next-line primer/colors
|
|
26
27
|
background-color: $border;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
|
|
32
33
|
// inset box-shadow for form controls
|
|
33
34
|
@mixin focusBoxShadowInset($outlineWidth: 1px, $outlineColor: var(--focus-outlineColor, var(--color-accent-fg))) {
|
|
35
|
+
// stylelint-disable-next-line primer/colors
|
|
34
36
|
border-color: var(--focus-outlineColor, var(--color-accent-fg));
|
|
35
37
|
outline: none;
|
|
36
38
|
// stylelint-disable-next-line primer/box-shadow
|
|
@@ -32,7 +32,7 @@ $lh-condensed: 1.25 !default;
|
|
|
32
32
|
$lh-default: 1.5 !default;
|
|
33
33
|
|
|
34
34
|
// Font stacks
|
|
35
|
-
$body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji' !default;
|
|
35
|
+
$body-font: var(--fontStack-sansSerif, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji') !default;
|
|
36
36
|
|
|
37
37
|
// Monospace font stack
|
|
38
38
|
// Note: SFMono-Regular needs to come before SF Mono to fix an older version of the font in Chrome
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import './table-object.scss';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Deprecated
|
|
2
|
+
// TODO: Replace TableObject with flexbox or a new Table component
|
|
3
|
+
|
|
4
|
+
// TableObject is a module for creating dynamically resizable elements that
|
|
5
|
+
// always sit on the same horizontal line (e.g., they never wrap). Using
|
|
6
|
+
// tables means it's cross browser friendly.
|
|
7
|
+
|
|
8
|
+
.TableObject {
|
|
9
|
+
display: table;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Place this on every "cell"
|
|
13
|
+
.TableObject-item {
|
|
14
|
+
display: table-cell;
|
|
15
|
+
width: 1%;
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
vertical-align: middle;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Place this on the largest or most important "cell"
|
|
21
|
+
.TableObject-item--primary {
|
|
22
|
+
width: 99%;
|
|
23
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
bundle: "toasts"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Primer CSS: `toasts` bundle
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
|
|
10
|
+
Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:
|
|
11
|
+
|
|
12
|
+
```scss
|
|
13
|
+
@import "@primer/css/toasts/index.scss";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Build
|
|
17
|
+
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/toasts.css`.
|
|
19
|
+
|
|
20
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|