@papillonarts/css 0.6.0 → 0.7.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 +9 -17
- package/build/primer/base/index.scss +1 -0
- package/build/primer/base/kbd.scss +8 -10
- package/build/primer/{color-modes/native.scss → base/native-colors.scss} +4 -2
- package/build/primer/base/normalize.scss +4 -3
- package/build/primer/base/typography-base.scss +4 -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/index.scss +0 -1
- package/build/primer/color-modes/themes/dark.scss +1 -6
- package/build/primer/color-modes/themes/dark_colorblind.scss +1 -6
- package/build/primer/color-modes/themes/dark_dimmed.scss +1 -6
- package/build/primer/color-modes/themes/dark_high_contrast.scss +1 -6
- package/build/primer/color-modes/themes/dark_tritanopia.scss +1 -6
- package/build/primer/color-modes/themes/light.scss +1 -6
- package/build/primer/color-modes/themes/light_colorblind.scss +1 -6
- package/build/primer/color-modes/themes/light_high_contrast.scss +1 -6
- package/build/primer/color-modes/themes/light_tritanopia.scss +1 -6
- 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 +10 -0
- 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/color-modes.scss +89 -3
- package/build/primer/support/mixins/layout.scss +1 -2
- package/build/primer/support/mixins/misc.scss +15 -9
- package/build/primer/support/mixins/typography.scss +21 -2
- package/build/primer/support/variables/misc.scss +2 -2
- package/build/primer/support/variables/typography.scss +2 -2
- 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/truncate/truncate.scss +2 -66
- package/build/primer/utilities/README.md +20 -0
- package/build/primer/utilities/borders.scss +30 -21
- package/build/primer/utilities/box-shadow.scss +8 -6
- package/build/primer/utilities/colors.scss +59 -60
- package/build/primer/utilities/details.scss +2 -2
- package/build/primer/utilities/flexbox.scss +2 -2
- package/build/primer/utilities/layout.scss +8 -6
- package/build/primer/utilities/margin.scss +2 -5
- package/build/primer/utilities/padding.scss +8 -10
- package/build/primer/utilities/typography.scss +12 -11
- package/build/primer/utilities/visibility-display.scss +14 -12
- package/package.json +2 -2
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
// stylelint-disable selector-max-compound-selectors
|
|
2
|
+
// stylelint-disable selector-max-type
|
|
3
|
+
|
|
4
|
+
// Form groups
|
|
5
|
+
//
|
|
6
|
+
// Usage:
|
|
7
|
+
//
|
|
8
|
+
// <div class="form-group">
|
|
9
|
+
// <div class="form-group-header"> containing the label
|
|
10
|
+
// <div class="form-group-body"> containing the form elements
|
|
11
|
+
// </div>
|
|
12
|
+
|
|
13
|
+
.form-group {
|
|
14
|
+
// stylelint-disable-next-line primer/spacing
|
|
15
|
+
margin: 15px 0;
|
|
16
|
+
|
|
17
|
+
// Autocomplete with embedded icon
|
|
18
|
+
.form-control.autocomplete-embedded-icon-wrap {
|
|
19
|
+
&:focus-within {
|
|
20
|
+
background-color: var(--bgColor-default, var(--color-canvas-default));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Text fields
|
|
25
|
+
.form-control {
|
|
26
|
+
// stylelint-disable-next-line primer/responsive-widths
|
|
27
|
+
width: 440px;
|
|
28
|
+
max-width: 100%;
|
|
29
|
+
// stylelint-disable-next-line primer/spacing
|
|
30
|
+
margin-right: 5px;
|
|
31
|
+
background-color: var(--bgColor-muted, var(--color-canvas-inset));
|
|
32
|
+
|
|
33
|
+
&:focus {
|
|
34
|
+
background-color: var(--bgColor-default, var(--color-canvas-default));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.shorter {
|
|
38
|
+
width: 130px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.short {
|
|
42
|
+
width: 250px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.input-block,
|
|
46
|
+
&.long {
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Textarea
|
|
52
|
+
// stylelint-disable selector-no-qualifying-type
|
|
53
|
+
textarea.form-control {
|
|
54
|
+
width: 100%;
|
|
55
|
+
height: 200px;
|
|
56
|
+
min-height: 200px;
|
|
57
|
+
|
|
58
|
+
&.short {
|
|
59
|
+
height: 50px;
|
|
60
|
+
min-height: 50px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// stylelint-enable selector-no-qualifying-type
|
|
64
|
+
|
|
65
|
+
// The Label
|
|
66
|
+
dt, // TODO: Deprecate
|
|
67
|
+
.form-group-header {
|
|
68
|
+
// stylelint-disable-next-line primer/spacing
|
|
69
|
+
margin: 0 0 6px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
label {
|
|
73
|
+
// fix for chrome bug, see https://github.com/github/github/issues/53931
|
|
74
|
+
position: static;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.flattened dt, // TODO: Deprecate
|
|
78
|
+
&.flattened .form-group-header {
|
|
79
|
+
float: left;
|
|
80
|
+
margin: 0;
|
|
81
|
+
// stylelint-disable-next-line primer/typography
|
|
82
|
+
line-height: 32px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.flattened dd, // TODO: Deprecate
|
|
86
|
+
&.flattened .form-group-body {
|
|
87
|
+
// stylelint-disable-next-line primer/typography
|
|
88
|
+
line-height: 32px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
//
|
|
92
|
+
// Form Elements
|
|
93
|
+
//
|
|
94
|
+
// stylelint-disable selector-no-qualifying-type
|
|
95
|
+
dd, // TODO: Deprecate
|
|
96
|
+
.form-group-body {
|
|
97
|
+
h4 {
|
|
98
|
+
margin: var(--base-size-4) 0 0;
|
|
99
|
+
|
|
100
|
+
&.is-error {
|
|
101
|
+
color: var(--fgColor-danger, var(--color-danger-fg));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&.is-success {
|
|
105
|
+
color: var(--fgColor-success, var(--color-success-fg));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
+ .note {
|
|
109
|
+
margin-top: 0;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// stylelint-enable selector-no-qualifying-type
|
|
114
|
+
|
|
115
|
+
//
|
|
116
|
+
// Variants
|
|
117
|
+
//
|
|
118
|
+
|
|
119
|
+
&.required {
|
|
120
|
+
dt label::after, // TODO: Deprecate
|
|
121
|
+
.form-group-header label::after {
|
|
122
|
+
// stylelint-disable-next-line primer/spacing
|
|
123
|
+
padding-left: 5px;
|
|
124
|
+
color: var(--fgColor-danger, var(--color-danger-fg));
|
|
125
|
+
content: '*';
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Form AJAX states
|
|
130
|
+
//
|
|
131
|
+
// Form fields that need feedback for AJAX loading, success
|
|
132
|
+
// states and errored states.
|
|
133
|
+
.success,
|
|
134
|
+
.error,
|
|
135
|
+
.indicator {
|
|
136
|
+
display: none;
|
|
137
|
+
// stylelint-disable-next-line primer/typography
|
|
138
|
+
font-size: $font-size-small;
|
|
139
|
+
// stylelint-disable-next-line primer/typography
|
|
140
|
+
font-weight: $font-weight-bold;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&.loading {
|
|
144
|
+
opacity: 0.5;
|
|
145
|
+
|
|
146
|
+
.indicator {
|
|
147
|
+
display: inline;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.spinner {
|
|
151
|
+
display: inline-block;
|
|
152
|
+
vertical-align: middle;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&.successful {
|
|
157
|
+
.success {
|
|
158
|
+
display: inline;
|
|
159
|
+
color: var(--fgColor-success, var(--color-success-fg));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Form validation
|
|
164
|
+
//
|
|
165
|
+
// Our inline errors
|
|
166
|
+
|
|
167
|
+
&.successed,
|
|
168
|
+
&.warn,
|
|
169
|
+
&.errored {
|
|
170
|
+
.success,
|
|
171
|
+
.warning,
|
|
172
|
+
.error {
|
|
173
|
+
position: absolute;
|
|
174
|
+
z-index: 10;
|
|
175
|
+
display: block; // Show up in errored/warn state
|
|
176
|
+
max-width: 450px; // Keep our long errors readable
|
|
177
|
+
padding: var(--base-size-4) var(--base-size-8);
|
|
178
|
+
margin: var(--base-size-8) 0 0;
|
|
179
|
+
// stylelint-disable-next-line primer/typography
|
|
180
|
+
font-size: $font-size-small;
|
|
181
|
+
// stylelint-disable-next-line primer/typography
|
|
182
|
+
font-weight: $font-weight-normal;
|
|
183
|
+
// stylelint-disable-next-line primer/borders
|
|
184
|
+
border-style: $border-style;
|
|
185
|
+
// stylelint-disable-next-line primer/borders
|
|
186
|
+
border-width: $border-width;
|
|
187
|
+
// stylelint-disable-next-line primer/borders
|
|
188
|
+
border-radius: $border-radius;
|
|
189
|
+
|
|
190
|
+
&::after,
|
|
191
|
+
&::before {
|
|
192
|
+
position: absolute;
|
|
193
|
+
bottom: 100%;
|
|
194
|
+
// stylelint-disable-next-line primer/spacing
|
|
195
|
+
left: 10px;
|
|
196
|
+
z-index: 15;
|
|
197
|
+
width: 0;
|
|
198
|
+
height: 0;
|
|
199
|
+
pointer-events: none;
|
|
200
|
+
content: ' ';
|
|
201
|
+
// stylelint-disable-next-line primer/borders, primer/colors
|
|
202
|
+
border: $border-style transparent;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&::after {
|
|
206
|
+
// stylelint-disable-next-line primer/borders
|
|
207
|
+
border-width: 5px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&::before {
|
|
211
|
+
// stylelint-disable-next-line primer/spacing
|
|
212
|
+
margin-left: -1px;
|
|
213
|
+
// stylelint-disable-next-line primer/borders
|
|
214
|
+
border-width: 6px;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&.successed {
|
|
220
|
+
.success {
|
|
221
|
+
color: var(--fgColor-default, var(--color-fg-default));
|
|
222
|
+
background-color: var(--bgColor-default, var(--color-canvas-default)); // Makes sure the background is opaque to cover any content underneath
|
|
223
|
+
background-image: linear-gradient(var(--bgColor-success-muted, var(--bgColor-success-muted, var(--color-success-subtle))), var(--color-success-subtle));
|
|
224
|
+
border-color: var(--borderColor-success-muted, var(--color-success-muted));
|
|
225
|
+
|
|
226
|
+
&::after {
|
|
227
|
+
border-bottom-color: var(--borderColor-success-muted, var(--color-success-muted));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&::before {
|
|
231
|
+
border-bottom-color: var(--borderColor-success-muted, var(--color-success-muted));
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&.warn {
|
|
237
|
+
.form-control:not(:focus, :focus-visible) {
|
|
238
|
+
border-color: var(--borderColor-attention-emphasis, var(--color-attention-emphasis));
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.warning {
|
|
242
|
+
color: var(--fgColor-default, var(--color-fg-default));
|
|
243
|
+
background-color: var(--bgColor-default, var(--color-canvas-default)); // Makes sure the background is opaque to cover any content underneath
|
|
244
|
+
background-image: linear-gradient(var(--bgColor-attention-muted, var(--bgColor-attention-muted, var(--color-attention-subtle))), var(--color-attention-subtle));
|
|
245
|
+
border-color: var(--borderColor-attention-muted, var(--color-attention-muted));
|
|
246
|
+
|
|
247
|
+
&::after {
|
|
248
|
+
border-bottom-color: var(--borderColor-attention-muted, var(--color-attention-muted));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&::before {
|
|
252
|
+
border-bottom-color: var(--borderColor-attention-muted, var(--color-attention-muted));
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&.errored {
|
|
258
|
+
.form-control:not(:focus, :focus-visible) {
|
|
259
|
+
border-color: var(--borderColor-danger-emphasis, var(--color-danger-emphasis));
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
label {
|
|
263
|
+
color: var(--fgColor-danger, var(--color-danger-fg));
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.error {
|
|
267
|
+
color: var(--fgColor-default, var(--color-fg-default));
|
|
268
|
+
background-color: var(--bgColor-default, var(--color-canvas-default)); // Makes sure the background is opaque to cover any content underneath
|
|
269
|
+
background-image: linear-gradient(var(--bgColor-danger-muted, var(--bgColor-danger-muted, var(--color-danger-subtle))), var(--color-danger-subtle));
|
|
270
|
+
border-color: var(--borderColor-danger-muted, var(--color-danger-muted));
|
|
271
|
+
|
|
272
|
+
&::after {
|
|
273
|
+
border-bottom-color: var(--borderColor-danger-muted, var(--color-danger-muted));
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
&::before {
|
|
277
|
+
border-bottom-color: var(--borderColor-danger-muted, var(--color-danger-muted));
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// tooltip
|
|
284
|
+
.note {
|
|
285
|
+
min-height: 17px;
|
|
286
|
+
// stylelint-disable-next-line primer/spacing
|
|
287
|
+
margin: var(--base-size-4) 0 2px;
|
|
288
|
+
// stylelint-disable-next-line primer/typography
|
|
289
|
+
font-size: $font-size-small;
|
|
290
|
+
color: var(--fgColor-muted, var(--color-fg-muted));
|
|
291
|
+
|
|
292
|
+
.spinner {
|
|
293
|
+
// stylelint-disable-next-line primer/spacing
|
|
294
|
+
margin-right: 3px;
|
|
295
|
+
vertical-align: middle;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Custom select
|
|
2
|
+
//
|
|
3
|
+
// Apply `.select` to any `<select>` element for custom styles.
|
|
4
|
+
.form-select {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
height: $size-5;
|
|
8
|
+
padding-right: var(--base-size-24);
|
|
9
|
+
background-color: var(--bgColor-default, var(--color-canvas-default));
|
|
10
|
+
// SVG with fill: #586069 (--color-icon-secondary)
|
|
11
|
+
background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0iIzU4NjA2OSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNC40MjcgOS40MjdsMy4zOTYgMy4zOTZhLjI1MS4yNTEgMCAwMC4zNTQgMGwzLjM5Ni0zLjM5NkEuMjUuMjUgMCAwMDExLjM5NiA5SDQuNjA0YS4yNS4yNSAwIDAwLS4xNzcuNDI3ek00LjQyMyA2LjQ3TDcuODIgMy4wNzJhLjI1LjI1IDAgMDEuMzU0IDBMMTEuNTcgNi40N2EuMjUuMjUgMCAwMS0uMTc3LjQyN0g0LjZhLjI1LjI1IDAgMDEtLjE3Ny0uNDI3eiIgLz48L3N2Zz4=');
|
|
12
|
+
background-repeat: no-repeat;
|
|
13
|
+
background-position: right 4px center;
|
|
14
|
+
background-size: 16px;
|
|
15
|
+
appearance: none;
|
|
16
|
+
|
|
17
|
+
// Hides the default caret in IE11
|
|
18
|
+
&::-ms-expand {
|
|
19
|
+
opacity: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&[multiple] {
|
|
23
|
+
height: auto;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@include color-mode(dark) {
|
|
28
|
+
.form-select {
|
|
29
|
+
// SVG with fill: #6e7681 (--color-icon-secondary)
|
|
30
|
+
background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0iIzZlNzY4MSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNC40MjcgOS40MjdsMy4zOTYgMy4zOTZhLjI1MS4yNTEgMCAwMC4zNTQgMGwzLjM5Ni0zLjM5NkEuMjUuMjUgMCAwMDExLjM5NiA5SDQuNjA0YS4yNS4yNSAwIDAwLS4xNzcuNDI3ek00LjQyMyA2LjQ3TDcuODIgMy4wNzJhLjI1LjI1IDAgMDEuMzU0IDBMMTEuNTcgNi40N2EuMjUuMjUgMCAwMS0uMTc3LjQyN0g0LjZhLjI1LjI1IDAgMDEtLjE3Ny0uNDI3eiIgLz48L3N2Zz4=');
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.select-sm {
|
|
35
|
+
height: $size-4;
|
|
36
|
+
// stylelint-disable-next-line primer/spacing
|
|
37
|
+
padding-top: 3px;
|
|
38
|
+
// stylelint-disable-next-line primer/spacing
|
|
39
|
+
padding-bottom: 3px;
|
|
40
|
+
// stylelint-disable-next-line primer/typography
|
|
41
|
+
font-size: $font-size-small;
|
|
42
|
+
|
|
43
|
+
&[multiple] {
|
|
44
|
+
height: auto;
|
|
45
|
+
min-height: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
.input-group {
|
|
2
|
+
display: table;
|
|
3
|
+
|
|
4
|
+
.form-control {
|
|
5
|
+
position: relative;
|
|
6
|
+
width: 100%;
|
|
7
|
+
|
|
8
|
+
&:focus {
|
|
9
|
+
z-index: 2;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
+ .btn {
|
|
13
|
+
margin-left: 0;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// For when you want the input group to behave like inline-block.
|
|
18
|
+
&.inline {
|
|
19
|
+
display: inline-table;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// within input group, if button exists change focus styles to match input (no offset)
|
|
23
|
+
&:focus-within {
|
|
24
|
+
// stylelint-disable-next-line selector-max-type
|
|
25
|
+
button {
|
|
26
|
+
outline-offset: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Autocomplete with embedded icon
|
|
31
|
+
.form-control.autocomplete-embedded-icon-wrap {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
padding: calc(var(--base-size-4) * 1.25) var(--base-size-8);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.input-group .form-control,
|
|
38
|
+
.input-group-button {
|
|
39
|
+
display: table-cell;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.input-group-button {
|
|
43
|
+
width: 1%;
|
|
44
|
+
vertical-align: middle; // Match the inputs
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.input-group-button--autocomplete-embedded-icon {
|
|
48
|
+
vertical-align: bottom;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.input-group .form-control:first-child,
|
|
52
|
+
.input-group-button:first-child .btn {
|
|
53
|
+
border-top-right-radius: 0;
|
|
54
|
+
border-bottom-right-radius: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.input-group .form-control:first-child,
|
|
58
|
+
.input-group-button:first-child .btn:not(.btn-primary) {
|
|
59
|
+
border-color: var(--control-borderColor-rest, var(--color-border-default));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.input-group-button:first-child .btn {
|
|
63
|
+
// stylelint-disable-next-line primer/spacing
|
|
64
|
+
margin-right: -1px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.input-group .form-control:last-child,
|
|
68
|
+
.input-group-button:last-child .btn {
|
|
69
|
+
border-top-left-radius: 0;
|
|
70
|
+
border-bottom-left-radius: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.input-group .form-control:last-child,
|
|
74
|
+
.input-group-button:last-child .btn:not(.btn-primary) {
|
|
75
|
+
border-color: var(--control-borderColor-rest, var(--color-border-default));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.input-group-button:last-child .btn {
|
|
79
|
+
// stylelint-disable-next-line primer/spacing
|
|
80
|
+
margin-left: -1px;
|
|
81
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Tab like radio group
|
|
2
|
+
|
|
3
|
+
.radio-group {
|
|
4
|
+
@include clearfix;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.radio-label {
|
|
8
|
+
float: left;
|
|
9
|
+
// stylelint-disable-next-line primer/spacing
|
|
10
|
+
padding: 6px var(--base-size-16) 6px calc(var(--base-size-16) + 12px + var(--base-size-8)); // 12px is the size of the radio-input
|
|
11
|
+
// stylelint-disable-next-line primer/spacing
|
|
12
|
+
margin-left: -1px;
|
|
13
|
+
// stylelint-disable-next-line primer/typography
|
|
14
|
+
font-size: $body-font-size;
|
|
15
|
+
// stylelint-disable-next-line primer/typography
|
|
16
|
+
line-height: 20px; // Specifically not inherit our `<body>` default
|
|
17
|
+
color: var(--fgColor-default, var(--color-fg-default));
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
// stylelint-disable-next-line primer/borders, primer/colors
|
|
20
|
+
border: $border-width $border-style var(--borderColor-default, var(--color-border-default));
|
|
21
|
+
|
|
22
|
+
:checked + & {
|
|
23
|
+
position: relative;
|
|
24
|
+
z-index: 1;
|
|
25
|
+
border-color: var(--borderColor-accent-emphasis, var(--color-accent-emphasis));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:first-of-type {
|
|
29
|
+
margin-left: 0;
|
|
30
|
+
// stylelint-disable-next-line primer/borders
|
|
31
|
+
border-top-left-radius: $border-radius;
|
|
32
|
+
// stylelint-disable-next-line primer/borders
|
|
33
|
+
border-bottom-left-radius: $border-radius;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:last-of-type {
|
|
37
|
+
// stylelint-disable-next-line primer/borders
|
|
38
|
+
border-top-right-radius: $border-radius;
|
|
39
|
+
// stylelint-disable-next-line primer/borders
|
|
40
|
+
border-bottom-right-radius: $border-radius;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.octicon {
|
|
44
|
+
margin-left: var(--base-size-4);
|
|
45
|
+
color: var(--fgColor-muted, var(--color-fg-subtle));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.radio-input {
|
|
50
|
+
z-index: 3;
|
|
51
|
+
float: left;
|
|
52
|
+
// stylelint-disable-next-line primer/spacing
|
|
53
|
+
margin: 10px calc(var(--base-size-32) * -1) 0 var(--base-size-16);
|
|
54
|
+
|
|
55
|
+
&:disabled {
|
|
56
|
+
position: relative; // enables z-index
|
|
57
|
+
|
|
58
|
+
+ .radio-label {
|
|
59
|
+
color: var(--fgColor-disabled, var(--color-primer-fg-disabled));
|
|
60
|
+
cursor: default;
|
|
61
|
+
background-color: var(--bgColor-neutral-muted, var(--color-neutral-subtle));
|
|
62
|
+
|
|
63
|
+
.octicon {
|
|
64
|
+
color: inherit;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
bundle: "header"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Primer CSS: `header` 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/header/index.scss";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Build
|
|
17
|
+
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/header.css`.
|
|
19
|
+
|
|
20
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.Header {
|
|
2
|
+
z-index: 32; // TODO: Figure out z-index system
|
|
3
|
+
display: flex;
|
|
4
|
+
padding: var(--base-size-16);
|
|
5
|
+
// stylelint-disable-next-line primer/typography
|
|
6
|
+
font-size: $h5-size;
|
|
7
|
+
// stylelint-disable-next-line primer/typography
|
|
8
|
+
line-height: $lh-default;
|
|
9
|
+
color: var(--header-fgColor-default, var(--color-header-text));
|
|
10
|
+
background-color: var(--header-bgColor, var(--color-header-bg));
|
|
11
|
+
align-items: center;
|
|
12
|
+
flex-wrap: nowrap;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.Header-item {
|
|
16
|
+
display: flex;
|
|
17
|
+
margin-right: var(--base-size-16);
|
|
18
|
+
align-self: stretch;
|
|
19
|
+
align-items: center;
|
|
20
|
+
flex-wrap: nowrap;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.Header-item--full {
|
|
24
|
+
flex: auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.Header-link {
|
|
28
|
+
// stylelint-disable-next-line primer/typography
|
|
29
|
+
font-weight: $font-weight-bold;
|
|
30
|
+
color: var(--header-fgColor-logo, var(--color-header-logo));
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
|
|
33
|
+
&:hover,
|
|
34
|
+
&:focus {
|
|
35
|
+
color: var(--header-fgColor-default, var(--color-header-text));
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.Header-input {
|
|
41
|
+
color: var(--header-fgColor-default, var(--color-header-text));
|
|
42
|
+
background-color: var(--headerSearch-bgColor, var(--color-header-search-bg));
|
|
43
|
+
// stylelint-disable-next-line primer/borders, primer/colors
|
|
44
|
+
border: $border-width $border-style var(--headerSearch-borderColor, var(--color-header-search-border));
|
|
45
|
+
box-shadow: none;
|
|
46
|
+
|
|
47
|
+
&::placeholder {
|
|
48
|
+
// stylelint-disable-next-line primer/colors
|
|
49
|
+
color: rgba(255, 255, 255, 0.75);
|
|
50
|
+
}
|
|
51
|
+
}
|
package/build/primer/index.scss
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
// CSS color variables
|
|
1
2
|
@import './color-modes/index.scss';
|
|
2
|
-
@import './
|
|
3
|
-
|
|
3
|
+
@import './primitives/index.scss';
|
|
4
|
+
|
|
5
|
+
// mts-primer-legacy
|
|
4
6
|
@import './truncate/index.scss';
|
|
5
|
-
@import './utilities/index.scss';
|
|
6
7
|
|
|
8
|
+
// Global requirements
|
|
9
|
+
@import './core/index.scss';
|
|
10
|
+
@import './product/index.scss';
|
|
11
|
+
@import './marketing/index.scss';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
bundle: "labels"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Primer CSS: `labels` 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/labels/index.scss";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Build
|
|
17
|
+
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/labels.css`.
|
|
19
|
+
|
|
20
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Issue Labels
|
|
2
|
+
|
|
3
|
+
// TODO: Replace with .Label once solid backgrounds are supported
|
|
4
|
+
|
|
5
|
+
.IssueLabel {
|
|
6
|
+
@include labels-base;
|
|
7
|
+
|
|
8
|
+
.g-emoji {
|
|
9
|
+
position: relative;
|
|
10
|
+
// stylelint-disable-next-line primer/spacing
|
|
11
|
+
top: -0.05em;
|
|
12
|
+
display: inline-block;
|
|
13
|
+
// stylelint-disable-next-line primer/typography
|
|
14
|
+
font-size: 1em;
|
|
15
|
+
// stylelint-disable-next-line primer/typography
|
|
16
|
+
line-height: $lh-condensed-ultra;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:hover {
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.IssueLabel--big {
|
|
25
|
+
@include labels-large;
|
|
26
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Label mixins
|
|
2
|
+
|
|
3
|
+
// Default: 20px
|
|
4
|
+
// Large: 24px
|
|
5
|
+
// Inline: em based
|
|
6
|
+
|
|
7
|
+
@mixin labels-base {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
// stylelint-disable-next-line primer/spacing
|
|
10
|
+
padding: 0 7px;
|
|
11
|
+
// stylelint-disable-next-line primer/typography
|
|
12
|
+
font-size: $font-size-small;
|
|
13
|
+
// stylelint-disable-next-line primer/typography
|
|
14
|
+
font-weight: $font-weight-semibold;
|
|
15
|
+
// stylelint-disable-next-line primer/typography
|
|
16
|
+
line-height: 18px;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
// stylelint-disable-next-line primer/borders, primer/colors
|
|
19
|
+
border: $border-width $border-style transparent;
|
|
20
|
+
// stylelint-disable-next-line primer/borders
|
|
21
|
+
border-radius: 2em;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@mixin labels-large {
|
|
25
|
+
// stylelint-disable-next-line primer/spacing
|
|
26
|
+
padding-right: 10px;
|
|
27
|
+
// stylelint-disable-next-line primer/spacing
|
|
28
|
+
padding-left: 10px;
|
|
29
|
+
// stylelint-disable-next-line primer/typography
|
|
30
|
+
line-height: 22px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Inline
|
|
34
|
+
//
|
|
35
|
+
// Doesn't increase height of parent element
|
|
36
|
+
// Can be used with different font-sizes
|
|
37
|
+
|
|
38
|
+
@mixin labels--inline {
|
|
39
|
+
display: inline;
|
|
40
|
+
// stylelint-disable-next-line primer/spacing
|
|
41
|
+
padding: 0.12em $em-spacer-5;
|
|
42
|
+
// stylelint-disable-next-line primer/typography
|
|
43
|
+
font-size: 85%;
|
|
44
|
+
}
|