@primer/css 0.0.0-1ea75fe → 0.0.0-202110118627
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 +1225 -132
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTING.md +85 -0
- package/DEVELOP.md +11 -69
- package/LICENSE +1 -1
- package/README.md +13 -15
- package/RELEASING.md +5 -72
- package/actionlist/action-list-item-divider.scss +42 -0
- package/actionlist/action-list-item.scss +444 -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 +11 -22
- package/alerts/flash.scss +91 -21
- package/alerts/index.scss +2 -2
- package/autocomplete/README.md +25 -0
- package/autocomplete/autocomplete.scss +58 -0
- package/autocomplete/index.scss +4 -0
- package/autocomplete/suggester.scss +92 -0
- package/avatars/README.md +11 -23
- package/avatars/avatar-parent-child.scss +4 -3
- package/avatars/avatar-stack.scss +21 -13
- package/avatars/avatar.scss +31 -3
- package/avatars/circle-badge.scss +5 -4
- package/avatars/index.scss +5 -5
- package/base/README.md +11 -22
- package/base/base.scss +5 -4
- package/base/index.scss +6 -4
- package/base/kbd.scss +20 -0
- package/base/normalize.scss +5 -5
- package/base/octicons.scss +6 -0
- package/base/typography-base.scss +2 -0
- package/blankslate/README.md +11 -23
- package/blankslate/blankslate.scss +25 -12
- package/blankslate/index.scss +2 -2
- package/box/README.md +11 -23
- package/box/box.scss +52 -44
- package/box/index.scss +2 -2
- package/branch-name/README.md +11 -23
- package/branch-name/branch-name.scss +18 -8
- package/branch-name/index.scss +2 -2
- package/breadcrumb/README.md +17 -13
- package/breadcrumb/breadcrumb.scss +15 -5
- package/breadcrumb/index.scss +2 -2
- package/buttons/README.md +11 -23
- package/buttons/button-group.scss +2 -0
- package/buttons/button.scss +243 -143
- package/buttons/index.scss +4 -3
- package/buttons/misc.scss +222 -0
- 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 +11 -23
- package/core/index.scss +19 -20
- package/deprecations.js +24 -0
- 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 +2 -0
- package/dist/autocomplete.css.map +1 -0
- package/dist/autocomplete.js +1 -0
- 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 +3 -4
- package/dist/core.css.map +1 -1
- package/dist/core.js +1 -1
- package/dist/deprecations.json +539 -0
- package/dist/dropdown.css +2 -0
- package/dist/dropdown.css.map +1 -0
- package/dist/dropdown.js +1 -0
- package/dist/forms.css +1 -2
- package/dist/forms.css.map +1 -1
- package/dist/forms.js +1 -1
- package/dist/header.css +2 -0
- package/dist/header.css.map +1 -0
- package/dist/header.js +1 -0
- 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 +2 -0
- package/dist/loaders.css.map +1 -0
- package/dist/loaders.js +1 -0
- 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 +3 -4
- package/dist/marketing.css.map +1 -1
- package/dist/marketing.js +1 -1
- package/dist/meta.json +317 -274
- 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 +13 -14
- package/dist/primer.css.map +1 -1
- package/dist/primer.js +1 -1
- package/dist/product.css +3 -4
- 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 +2 -0
- package/dist/select-menu.css.map +1 -0
- package/dist/select-menu.js +1 -0
- package/dist/stats/actionlist.json +1 -0
- package/dist/stats/alerts.json +1 -1
- package/dist/stats/autocomplete.json +1 -0
- 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 -0
- package/dist/stats/forms.json +1 -1
- package/dist/stats/header.json +1 -0
- 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 -0
- 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 -0
- 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 -0
- package/dist/stats/toasts.json +1 -0
- 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 +2 -0
- package/dist/timeline.css.map +1 -0
- package/dist/timeline.js +1 -0
- package/dist/toasts.css +2 -0
- package/dist/toasts.css.map +1 -0
- package/dist/toasts.js +1 -0
- 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 +1352 -0
- package/dropdown/README.md +25 -0
- package/dropdown/dropdown.scss +272 -0
- package/dropdown/index.scss +2 -0
- package/forms/README.md +11 -23
- package/forms/form-control.scss +76 -32
- package/forms/form-group.scss +83 -46
- package/forms/form-select.scss +17 -5
- package/forms/form-validation.scss +51 -32
- package/forms/index.scss +7 -6
- package/forms/input-group.scss +2 -0
- package/forms/radio-group.scss +62 -0
- package/header/README.md +25 -0
- package/header/header.scss +47 -0
- package/header/index.scss +2 -0
- package/index.scss +7 -4
- package/labels/README.md +11 -23
- package/labels/counters.scss +24 -13
- package/labels/diffstat.scss +37 -0
- package/labels/index.scss +8 -4
- package/labels/issue-labels.scss +23 -0
- package/labels/labels.scss +59 -40
- package/labels/mixins.scss +32 -0
- package/labels/states.scss +40 -19
- package/layout/README.md +11 -23
- package/layout/container.scss +0 -8
- package/layout/grid-offset.scss +11 -11
- package/layout/grid.scss +23 -23
- package/layout/index.scss +7 -5
- package/layout/layout.scss +185 -0
- package/layout/mixins.scss +79 -0
- package/links/README.md +25 -0
- package/links/index.scss +3 -0
- package/links/link.scss +55 -0
- package/loaders/README.md +25 -0
- package/loaders/index.scss +2 -0
- package/loaders/loaders.scss +19 -0
- package/markdown/README.md +11 -23
- package/markdown/blob-csv.scss +4 -2
- package/markdown/code.scss +11 -3
- package/markdown/footnotes.scss +37 -0
- package/markdown/headings.scss +13 -4
- package/markdown/images.scss +15 -4
- package/markdown/index.scss +9 -8
- package/markdown/lists.scss +19 -5
- package/markdown/markdown-body.scss +15 -18
- package/markdown/tables.scss +8 -5
- package/marketing/README.md +11 -23
- package/marketing/buttons/button.scss +82 -61
- package/marketing/index.scss +6 -11
- package/marketing/support/index.scss +1 -0
- package/marketing/support/mixins.scss +66 -0
- package/marketing/support/variables.scss +110 -51
- package/marketing/type/typography.scss +100 -62
- package/marketing/utilities/animations.scss +9 -0
- package/marketing/utilities/filters.scss +0 -1
- package/marketing/utilities/index.scss +2 -3
- package/marketing/utilities/layout.scss +32 -11
- package/navigation/README.md +11 -23
- package/navigation/filter-list.scss +16 -14
- package/navigation/index.scss +7 -6
- package/navigation/menu.scss +44 -35
- package/navigation/sidenav.scss +108 -0
- package/navigation/subnav.scss +28 -21
- package/navigation/tabnav.scss +45 -21
- package/navigation/underline-nav.scss +36 -22
- package/package.json +78 -107
- package/pagination/README.md +12 -14
- package/pagination/index.scss +2 -2
- package/pagination/pagination.scss +61 -37
- package/popover/README.md +11 -24
- package/popover/index.scss +2 -2
- package/popover/popover.scss +18 -9
- package/postcss.config.cjs +22 -0
- package/prettier.config.cjs +1 -0
- package/product/README.md +11 -23
- package/product/index.scss +19 -17
- package/progress/README.md +11 -23
- package/progress/index.scss +2 -2
- package/progress/progress.scss +11 -1
- package/select-menu/README.md +25 -0
- package/select-menu/index.scss +3 -0
- package/select-menu/select-menu.scss +464 -0
- package/stylelint.config.cjs +16 -0
- package/subhead/README.md +11 -25
- package/subhead/index.scss +2 -2
- package/subhead/subhead.scss +10 -4
- package/support/README.md +12 -18
- package/support/index.scss +7 -8
- package/support/mixins/color-modes.scss +106 -0
- package/support/mixins/misc.scss +9 -12
- package/support/mixins/typography.scss +1 -1
- package/support/variables/layout.scss +106 -11
- package/support/variables/misc.scss +7 -30
- package/support/variables/typography.scss +4 -4
- package/table-object/README.md +11 -24
- package/table-object/index.scss +1 -1
- package/timeline/README.md +25 -0
- package/timeline/index.scss +2 -0
- package/timeline/timeline-item.scss +95 -0
- package/toasts/README.md +25 -0
- package/toasts/index.scss +2 -0
- package/toasts/toasts.scss +124 -0
- package/tooltips/README.md +11 -24
- package/tooltips/index.scss +2 -2
- package/tooltips/tooltips.scss +17 -8
- package/truncate/README.md +11 -24
- package/truncate/index.scss +2 -1
- package/truncate/truncate.scss +41 -7
- package/utilities/README.md +11 -23
- package/utilities/animations.scss +14 -2
- package/utilities/borders.scss +29 -65
- package/utilities/box-shadow.scss +8 -9
- package/utilities/colors.scss +71 -110
- package/utilities/details.scss +12 -4
- package/utilities/flexbox.scss +14 -14
- package/utilities/index.scss +12 -12
- package/utilities/layout.scss +28 -22
- package/utilities/margin.scss +34 -17
- package/utilities/padding.scss +13 -9
- package/utilities/typography.scss +54 -25
- package/utilities/visibility-display.scss +0 -13
- package/.browserslistrc +0 -6
- package/.eslintrc.json +0 -13
- package/.stylelintrc.json +0 -9
- package/MIGRATING.md +0 -70
- package/bin/primer-migrate +0 -86
- package/build/build.css +0 -23
- package/build/build.json +0 -1
- package/build/index.js +0 -1
- package/dist/marketing-support.css.map +0 -1
- package/dist/support.css.map +0 -1
- package/fonts/Inter-Medium.woff +0 -0
- package/fonts/Inter-Regular.woff +0 -0
- package/layout/columns.scss +0 -56
- package/marketing/buttons/README.md +0 -39
- package/marketing/support/README.md +0 -31
- package/marketing/type/README.md +0 -39
- package/marketing/utilities/README.md +0 -36
- package/marketing/utilities/margin.scss +0 -18
- package/marketing/utilities/padding.scss +0 -28
- package/postcss.config.js +0 -14
- package/prettier.config.js +0 -1
- package/support/mixins/buttons.scss +0 -160
- package/support/variables/color-system.scss +0 -243
- package/support/variables/colors.scss +0 -70
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
// Toast
|
|
2
|
+
|
|
3
|
+
.Toast {
|
|
4
|
+
display: flex;
|
|
5
|
+
margin: $spacer-2;
|
|
6
|
+
color: var(--color-fg-default);
|
|
7
|
+
background-color: var(--color-canvas-default);
|
|
8
|
+
border-radius: $border-radius;
|
|
9
|
+
box-shadow: inset 0 0 0 1px var(--color-border-default), var(--color-shadow-large);
|
|
10
|
+
|
|
11
|
+
@include breakpoint(sm) {
|
|
12
|
+
width: max-content;
|
|
13
|
+
max-width: 450px;
|
|
14
|
+
margin: $spacer-3;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.Toast-icon {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
width: $spacer-3 * 3;
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
color: var(--color-fg-on-emphasis);
|
|
25
|
+
background-color: var(--color-accent-emphasis);
|
|
26
|
+
border: $border-width $border-style transparent;
|
|
27
|
+
border-right: 0;
|
|
28
|
+
border-top-left-radius: inherit;
|
|
29
|
+
border-bottom-left-radius: inherit;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.Toast-content {
|
|
33
|
+
padding: $spacer-3;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.Toast-dismissButton {
|
|
37
|
+
max-height: 54px; // keeps button aligned to the top
|
|
38
|
+
padding: $spacer-3;
|
|
39
|
+
color: inherit;
|
|
40
|
+
background-color: transparent;
|
|
41
|
+
border: 0;
|
|
42
|
+
|
|
43
|
+
&:focus,
|
|
44
|
+
&:hover {
|
|
45
|
+
outline: none;
|
|
46
|
+
opacity: 0.7;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:active {
|
|
50
|
+
opacity: 0.5;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Modifier
|
|
55
|
+
|
|
56
|
+
.Toast--loading {
|
|
57
|
+
color: var(--color-fg-default);
|
|
58
|
+
box-shadow: inset 0 0 0 1px var(--color-border-default), var(--color-shadow-large);
|
|
59
|
+
|
|
60
|
+
.Toast-icon {
|
|
61
|
+
background-color: var(--color-neutral-emphasis);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.Toast--error {
|
|
66
|
+
color: var(--color-fg-default);
|
|
67
|
+
box-shadow: inset 0 0 0 1px var(--color-border-default), var(--color-shadow-large);
|
|
68
|
+
|
|
69
|
+
.Toast-icon {
|
|
70
|
+
background-color: var(--color-danger-emphasis);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.Toast--warning {
|
|
75
|
+
color: var(--color-fg-default);
|
|
76
|
+
box-shadow: inset 0 0 0 1px var(--color-border-default), var(--color-shadow-large);
|
|
77
|
+
|
|
78
|
+
.Toast-icon {
|
|
79
|
+
background-color: var(--color-attention-emphasis);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.Toast--success {
|
|
84
|
+
color: var(--color-fg-default);
|
|
85
|
+
box-shadow: inset 0 0 0 1px var(--color-border-default), var(--color-shadow-large);
|
|
86
|
+
|
|
87
|
+
.Toast-icon {
|
|
88
|
+
background-color: var(--color-success-emphasis);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Animations
|
|
93
|
+
|
|
94
|
+
.Toast--animateIn {
|
|
95
|
+
animation: Toast--animateIn 0.18s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@keyframes Toast--animateIn {
|
|
99
|
+
0% {
|
|
100
|
+
opacity: 0;
|
|
101
|
+
transform: translateY(100%);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.Toast--animateOut {
|
|
106
|
+
animation: Toast--animateOut 0.18s cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@keyframes Toast--animateOut {
|
|
110
|
+
100% {
|
|
111
|
+
pointer-events: none;
|
|
112
|
+
opacity: 0;
|
|
113
|
+
transform: translateY(100%);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.Toast--spinner {
|
|
118
|
+
animation: Toast--spinner 1000ms linear infinite;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@keyframes Toast--spinner {
|
|
122
|
+
from { transform: rotate(0deg); }
|
|
123
|
+
to { transform: rotate(360deg); }
|
|
124
|
+
}
|
package/tooltips/README.md
CHANGED
|
@@ -1,38 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
bundle: "tooltips"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
This repository is a module of the full [primer][primer] repository.
|
|
6
|
+
# Primer CSS: `tooltips` bundle
|
|
6
7
|
|
|
7
8
|
## Usage
|
|
8
9
|
|
|
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:
|
|
10
11
|
|
|
11
12
|
```scss
|
|
12
|
-
@import "primer
|
|
13
|
+
@import "@primer/css/tooltips/index.scss";
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._
|
|
16
|
-
|
|
17
16
|
## Build
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
$ npm run build
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Documentation
|
|
26
|
-
|
|
27
|
-
Find further documentation at [primer.style/css/components/tooltips](https://primer.style/css/components/tooltips).
|
|
28
|
-
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/tooltips.css`.
|
|
29
19
|
|
|
30
20
|
## License
|
|
31
21
|
|
|
32
|
-
[MIT](
|
|
22
|
+
[MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
|
|
23
|
+
|
|
33
24
|
|
|
34
|
-
[
|
|
35
|
-
[docs]: https://primer.style/css
|
|
36
|
-
[npm]: https://www.npmjs.com/
|
|
37
|
-
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
|
|
38
|
-
[sass]: http://sass-lang.com/
|
|
25
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|
package/tooltips/index.scss
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
1
|
+
@import '../support/index.scss';
|
|
2
|
+
@import './tooltips.scss';
|
package/tooltips/tooltips.scss
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
padding: $em-spacer-5 $em-spacer-6;
|
|
11
11
|
font: normal normal 11px/1.5 $body-font;
|
|
12
12
|
-webkit-font-smoothing: subpixel-antialiased;
|
|
13
|
-
color:
|
|
13
|
+
color: var(--color-fg-on-emphasis);
|
|
14
14
|
text-align: center;
|
|
15
15
|
text-decoration: none;
|
|
16
16
|
text-shadow: none;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
white-space: pre;
|
|
21
21
|
pointer-events: none;
|
|
22
22
|
content: attr(aria-label);
|
|
23
|
-
background:
|
|
23
|
+
background: var(--color-neutral-emphasis-plus);
|
|
24
24
|
border-radius: $border-radius;
|
|
25
25
|
opacity: 0;
|
|
26
26
|
}
|
|
@@ -32,9 +32,10 @@
|
|
|
32
32
|
display: none;
|
|
33
33
|
width: 0;
|
|
34
34
|
height: 0;
|
|
35
|
-
color:
|
|
35
|
+
color: var(--color-neutral-emphasis-plus);
|
|
36
36
|
pointer-events: none;
|
|
37
|
-
content:
|
|
37
|
+
content: '';
|
|
38
|
+
// stylelint-disable-next-line primer/borders
|
|
38
39
|
border: 6px $border-style transparent;
|
|
39
40
|
opacity: 0;
|
|
40
41
|
}
|
|
@@ -90,6 +91,7 @@
|
|
|
90
91
|
&::after {
|
|
91
92
|
top: 100%;
|
|
92
93
|
right: 50%;
|
|
94
|
+
// stylelint-disable-next-line primer/spacing
|
|
93
95
|
margin-top: 6px;
|
|
94
96
|
}
|
|
95
97
|
|
|
@@ -97,8 +99,9 @@
|
|
|
97
99
|
top: auto;
|
|
98
100
|
right: 50%;
|
|
99
101
|
bottom: -7px;
|
|
102
|
+
// stylelint-disable-next-line primer/spacing
|
|
100
103
|
margin-right: -6px;
|
|
101
|
-
border-bottom-color:
|
|
104
|
+
border-bottom-color: var(--color-neutral-emphasis-plus);
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
|
|
@@ -121,6 +124,7 @@
|
|
|
121
124
|
&::after {
|
|
122
125
|
right: 50%;
|
|
123
126
|
bottom: 100%;
|
|
127
|
+
// stylelint-disable-next-line primer/spacing
|
|
124
128
|
margin-bottom: 6px;
|
|
125
129
|
}
|
|
126
130
|
|
|
@@ -128,8 +132,9 @@
|
|
|
128
132
|
top: -7px;
|
|
129
133
|
right: 50%;
|
|
130
134
|
bottom: auto;
|
|
135
|
+
// stylelint-disable-next-line primer/spacing
|
|
131
136
|
margin-right: -6px;
|
|
132
|
-
border-top-color:
|
|
137
|
+
border-top-color: var(--color-neutral-emphasis-plus);
|
|
133
138
|
}
|
|
134
139
|
}
|
|
135
140
|
|
|
@@ -156,6 +161,7 @@
|
|
|
156
161
|
&::after {
|
|
157
162
|
right: 100%;
|
|
158
163
|
bottom: 50%;
|
|
164
|
+
// stylelint-disable-next-line primer/spacing
|
|
159
165
|
margin-right: 6px;
|
|
160
166
|
transform: translateY(50%);
|
|
161
167
|
}
|
|
@@ -164,8 +170,9 @@
|
|
|
164
170
|
top: 50%;
|
|
165
171
|
bottom: 50%;
|
|
166
172
|
left: -7px;
|
|
173
|
+
// stylelint-disable-next-line primer/spacing
|
|
167
174
|
margin-top: -6px;
|
|
168
|
-
border-left-color:
|
|
175
|
+
border-left-color: var(--color-neutral-emphasis-plus);
|
|
169
176
|
}
|
|
170
177
|
}
|
|
171
178
|
|
|
@@ -174,6 +181,7 @@
|
|
|
174
181
|
&::after {
|
|
175
182
|
bottom: 50%;
|
|
176
183
|
left: 100%;
|
|
184
|
+
// stylelint-disable-next-line primer/spacing
|
|
177
185
|
margin-left: 6px;
|
|
178
186
|
transform: translateY(50%);
|
|
179
187
|
}
|
|
@@ -182,8 +190,9 @@
|
|
|
182
190
|
top: 50%;
|
|
183
191
|
right: -7px;
|
|
184
192
|
bottom: 50%;
|
|
193
|
+
// stylelint-disable-next-line primer/spacing
|
|
185
194
|
margin-top: -6px;
|
|
186
|
-
border-right-color:
|
|
195
|
+
border-right-color: var(--color-neutral-emphasis-plus);
|
|
187
196
|
}
|
|
188
197
|
}
|
|
189
198
|
|
package/truncate/README.md
CHANGED
|
@@ -1,38 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
bundle: "truncate"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
This repository is a module of the full [primer][primer] repository.
|
|
6
|
+
# Primer CSS: `truncate` bundle
|
|
6
7
|
|
|
7
8
|
## Usage
|
|
8
9
|
|
|
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:
|
|
10
11
|
|
|
11
12
|
```scss
|
|
12
|
-
@import "primer
|
|
13
|
+
@import "@primer/css/truncate/index.scss";
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._
|
|
16
|
-
|
|
17
16
|
## Build
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
$ npm run build
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Documentation
|
|
26
|
-
|
|
27
|
-
Find further documentation at [primer.style/css/components/truncate](https://primer.style/css/components/truncate).
|
|
28
|
-
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/truncate.css`.
|
|
29
19
|
|
|
30
20
|
## License
|
|
31
21
|
|
|
32
|
-
[MIT](
|
|
22
|
+
[MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
|
|
23
|
+
|
|
33
24
|
|
|
34
|
-
[
|
|
35
|
-
[docs]: https://primer.style/css
|
|
36
|
-
[npm]: https://www.npmjs.com/
|
|
37
|
-
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
|
|
38
|
-
[sass]: http://sass-lang.com/
|
|
25
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|
package/truncate/index.scss
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import '../support/index.scss';
|
|
2
|
+
@import './truncate.scss';
|
package/truncate/truncate.scss
CHANGED
|
@@ -3,18 +3,22 @@
|
|
|
3
3
|
// css-truncate will shorten text with an ellipsis.
|
|
4
4
|
|
|
5
5
|
.css-truncate {
|
|
6
|
-
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
// of the .css-truncate-target
|
|
6
|
+
|
|
7
|
+
// css-truncate-auto will shorten text with an ellipsis when overflowing
|
|
8
|
+
&.css-truncate-overflow,
|
|
9
|
+
.css-truncate-overflow,
|
|
11
10
|
&.css-truncate-target,
|
|
12
11
|
.css-truncate-target {
|
|
13
|
-
display: inline-block;
|
|
14
|
-
max-width: 125px;
|
|
15
12
|
overflow: hidden;
|
|
16
13
|
text-overflow: ellipsis;
|
|
17
14
|
white-space: nowrap;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// css-truncate-target will shorten text with an ellipsis and a max width
|
|
18
|
+
&.css-truncate-target,
|
|
19
|
+
.css-truncate-target {
|
|
20
|
+
display: inline-block;
|
|
21
|
+
max-width: 125px;
|
|
18
22
|
vertical-align: top;
|
|
19
23
|
}
|
|
20
24
|
|
|
@@ -25,3 +29,33 @@
|
|
|
25
29
|
max-width: 10000px !important;
|
|
26
30
|
}
|
|
27
31
|
}
|
|
32
|
+
|
|
33
|
+
.Truncate {
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
min-width: 0;
|
|
36
|
+
max-width: 100%;
|
|
37
|
+
|
|
38
|
+
> .Truncate-text {
|
|
39
|
+
min-width: 1ch;
|
|
40
|
+
max-width: fit-content;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
text-overflow: ellipsis;
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
|
|
45
|
+
+ .Truncate-text {
|
|
46
|
+
margin-left: $spacer-1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.Truncate-text--primary {
|
|
50
|
+
flex-basis: 200%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.Truncate-text--expandable:hover,
|
|
54
|
+
&.Truncate-text--expandable:focus,
|
|
55
|
+
&.Truncate-text--expandable:active {
|
|
56
|
+
max-width: 100% !important;
|
|
57
|
+
flex-shrink: 0;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
package/utilities/README.md
CHANGED
|
@@ -1,37 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
bundle: "utilities"
|
|
3
|
+
generated: true
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
This repository is a module of the full [primer][primer] repository.
|
|
6
|
+
# Primer CSS: `utilities` bundle
|
|
6
7
|
|
|
7
8
|
## Usage
|
|
8
9
|
|
|
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:
|
|
10
11
|
|
|
11
12
|
```scss
|
|
12
|
-
@import "primer
|
|
13
|
+
@import "@primer/css/utilities/index.scss";
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._
|
|
16
|
-
|
|
17
16
|
## Build
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
$ npm run build
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Documentation
|
|
26
|
-
|
|
27
|
-
Find further documentation at [primer.style/css/utilities](https://primer.style/css/utilities).
|
|
18
|
+
The `@primer/css` npm package includes a standalone CSS build of this module in `dist/utilities.css`.
|
|
28
19
|
|
|
29
20
|
## License
|
|
30
21
|
|
|
31
|
-
[MIT](
|
|
22
|
+
[MIT](https://github.com/primer/css/blob/main/LICENSE) © [GitHub](https://github.com/)
|
|
23
|
+
|
|
32
24
|
|
|
33
|
-
[
|
|
34
|
-
[docs]: https://primer.style/css
|
|
35
|
-
[npm]: https://www.npmjs.com/
|
|
36
|
-
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
|
|
37
|
-
[sass]: http://sass-lang.com/
|
|
25
|
+
[scss]: https://sass-lang.com/documentation/syntax#scss
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// This file contains reusable animations for github.
|
|
2
|
-
// stylelint-disable primer/selector-no-utility
|
|
3
2
|
|
|
4
3
|
/* Fade in an element */
|
|
5
4
|
.anim-fade-in {
|
|
@@ -26,6 +25,7 @@
|
|
|
26
25
|
.anim-fade-out {
|
|
27
26
|
animation-name: fade-out;
|
|
28
27
|
animation-duration: 1s;
|
|
28
|
+
animation-fill-mode: forwards;
|
|
29
29
|
animation-timing-function: ease-out;
|
|
30
30
|
|
|
31
31
|
&.fast {
|
|
@@ -174,7 +174,8 @@
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
/* Increase scale of an element on hover */
|
|
177
|
-
.hover-grow
|
|
177
|
+
.hover-grow,
|
|
178
|
+
.anim-hover-grow {
|
|
178
179
|
transition: transform 0.3s;
|
|
179
180
|
backface-visibility: hidden;
|
|
180
181
|
|
|
@@ -182,3 +183,14 @@
|
|
|
182
183
|
transform: scale(1.025);
|
|
183
184
|
}
|
|
184
185
|
}
|
|
186
|
+
|
|
187
|
+
/* Rotate an element 360 degrees over and over, used for spinners */
|
|
188
|
+
.anim-rotate {
|
|
189
|
+
animation: rotate-keyframes 1s linear infinite;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@keyframes rotate-keyframes {
|
|
193
|
+
100% {
|
|
194
|
+
transform: rotate(360deg);
|
|
195
|
+
}
|
|
196
|
+
}
|
package/utilities/borders.scss
CHANGED
|
@@ -1,56 +1,41 @@
|
|
|
1
1
|
// Core border utilities
|
|
2
|
-
// stylelint-disable
|
|
3
|
-
// stylelint-disable block-opening-brace-space-before, comment-empty-line-before
|
|
4
|
-
|
|
5
|
-
/* Add a gray border on all sides */
|
|
6
|
-
.border { border: $border !important; }
|
|
2
|
+
// stylelint-disable block-opening-brace-space-before
|
|
7
3
|
|
|
8
4
|
/* Add a gray border to the left and right */
|
|
5
|
+
.border-x {
|
|
6
|
+
border-right: $border !important;
|
|
7
|
+
border-left: $border !important;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* Add a gray border to the top and bottom */
|
|
9
11
|
.border-y {
|
|
10
12
|
border-top: $border !important;
|
|
11
13
|
border-bottom: $border !important;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
/*
|
|
15
|
-
.border-0 { border: 0 !important; }
|
|
16
|
-
|
|
17
|
-
.border-dashed { border-style: dashed !important; }
|
|
18
|
-
|
|
19
|
-
$edges: (
|
|
20
|
-
top: (top-left, top-right),
|
|
21
|
-
right: (top-right, bottom-right),
|
|
22
|
-
bottom: (bottom-right, bottom-left),
|
|
23
|
-
left: (bottom-left, top-left)
|
|
24
|
-
);
|
|
25
|
-
|
|
16
|
+
/* Responsive gray borders */
|
|
26
17
|
@each $breakpoint, $variant in $responsive-variants {
|
|
27
18
|
@include breakpoint($breakpoint) {
|
|
28
|
-
/* Add a gray border */
|
|
29
|
-
|
|
19
|
+
/* Add a gray border on all sides at/above this breakpoint */
|
|
20
|
+
.border#{$variant} { border: $border !important; }
|
|
21
|
+
.border#{$variant}-0 { border: 0 !important; }
|
|
22
|
+
|
|
30
23
|
.border#{$variant}-top { border-top: $border !important; }
|
|
31
|
-
/* Add a gray border to the right */
|
|
32
24
|
.border#{$variant}-right { border-right: $border !important; }
|
|
33
|
-
/* Add a gray border to the bottom */
|
|
34
25
|
.border#{$variant}-bottom { border-bottom: $border !important; }
|
|
35
|
-
/* Add a gray border to the left */
|
|
36
26
|
.border#{$variant}-left { border-left: $border !important; }
|
|
37
27
|
|
|
38
|
-
/* Remove the top border */
|
|
39
28
|
.border#{$variant}-top-0 { border-top: 0 !important; }
|
|
40
|
-
/* Remove the right border */
|
|
41
29
|
.border#{$variant}-right-0 { border-right: 0 !important; }
|
|
42
|
-
/* Remove the bottom border */
|
|
43
30
|
.border#{$variant}-bottom-0 { border-bottom: 0 !important; }
|
|
44
|
-
/* Remove the left border */
|
|
45
31
|
.border#{$variant}-left-0 { border-left: 0 !important; }
|
|
46
32
|
|
|
47
33
|
// Rounded corners
|
|
48
|
-
|
|
34
|
+
.rounded#{$variant} { border-radius: $border-radius !important; }
|
|
49
35
|
.rounded#{$variant}-0 { border-radius: 0 !important; }
|
|
50
|
-
|
|
51
|
-
.rounded#{$variant}-
|
|
52
|
-
|
|
53
|
-
.rounded#{$variant}-2 { border-radius: $border-radius * 2 !important; }
|
|
36
|
+
.rounded#{$variant}-1 { border-radius: $border-radius-1 !important; }
|
|
37
|
+
.rounded#{$variant}-2 { border-radius: $border-radius-2 !important; }
|
|
38
|
+
.rounded#{$variant}-3 { border-radius: $border-radius-3 !important; }
|
|
54
39
|
|
|
55
40
|
@each $edge, $corners in $edges {
|
|
56
41
|
.rounded#{$variant}-#{$edge}-0 {
|
|
@@ -61,13 +46,19 @@ $edges: (
|
|
|
61
46
|
|
|
62
47
|
.rounded#{$variant}-#{$edge}-1 {
|
|
63
48
|
@each $corner in $corners {
|
|
64
|
-
border-#{$corner}-radius: $border-radius !important;
|
|
49
|
+
border-#{$corner}-radius: $border-radius-1 !important;
|
|
65
50
|
}
|
|
66
51
|
}
|
|
67
52
|
|
|
68
53
|
.rounded#{$variant}-#{$edge}-2 {
|
|
69
54
|
@each $corner in $corners {
|
|
70
|
-
border-#{$corner}-radius: $border-radius
|
|
55
|
+
border-#{$corner}-radius: $border-radius-2 !important;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.rounded#{$variant}-#{$edge}-3 {
|
|
60
|
+
@each $corner in $corners {
|
|
61
|
+
border-#{$corner}-radius: $border-radius-3 !important;
|
|
71
62
|
}
|
|
72
63
|
}
|
|
73
64
|
}
|
|
@@ -77,35 +68,8 @@ $edges: (
|
|
|
77
68
|
/* Add a 50% border-radius to make something into a circle */
|
|
78
69
|
.circle { border-radius: 50% !important; }
|
|
79
70
|
|
|
80
|
-
/*
|
|
81
|
-
.border-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
.border-green { border-color: $border-green !important; }
|
|
86
|
-
/* Use with .border to turn the border green light */
|
|
87
|
-
.border-green-light { border-color: $border-green-light !important; }
|
|
88
|
-
/* Use with .border to turn the border red */
|
|
89
|
-
.border-red { border-color: $border-red !important; }
|
|
90
|
-
/* Use with .border to turn the border red-light */
|
|
91
|
-
.border-red-light { border-color: $border-red-light !important; }
|
|
92
|
-
/* Use with .border to turn the border purple */
|
|
93
|
-
.border-purple { border-color: $border-purple !important; }
|
|
94
|
-
/* Use with .border to turn the border yellow */
|
|
95
|
-
.border-yellow { border-color: $border-yellow !important; }
|
|
96
|
-
/* Use with .border to turn the border gray-light */
|
|
97
|
-
.border-gray-light { border-color: $border-gray-light !important; }
|
|
98
|
-
/* Use with .border to turn the border gray-dark */
|
|
99
|
-
.border-gray-dark { border-color: $border-gray-dark !important; }
|
|
100
|
-
|
|
101
|
-
/* Use with .border to turn the border rgba black 0.15 */
|
|
102
|
-
.border-black-fade { border-color: $border-black-fade !important; }
|
|
103
|
-
/* Use with .border to turn the border rgba white 0.15 */
|
|
104
|
-
.border-white-fade { border-color: $border-white-fade !important; }
|
|
105
|
-
|
|
106
|
-
/* Use with .border to turn the border white w/varying transparency */
|
|
107
|
-
.border-white-fade-15 { border-color: $white-fade-15 !important; }
|
|
108
|
-
.border-white-fade-30 { border-color: $white-fade-30 !important; }
|
|
109
|
-
.border-white-fade-50 { border-color: $white-fade-50 !important; }
|
|
110
|
-
.border-white-fade-70 { border-color: $white-fade-70 !important; }
|
|
111
|
-
.border-white-fade-85 { border-color: $white-fade-85 !important; }
|
|
71
|
+
/* Change the border style to dashed, in conjunction with another utility */
|
|
72
|
+
.border-dashed {
|
|
73
|
+
// stylelint-disable-next-line primer/borders
|
|
74
|
+
border-style: dashed !important;
|
|
75
|
+
}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
// Box shadow utilities
|
|
2
|
-
// stylelint-disable primer/selector-no-utility
|
|
3
2
|
|
|
4
3
|
// Box shadows
|
|
5
4
|
|
|
6
|
-
.
|
|
7
|
-
box-shadow:
|
|
5
|
+
.color-shadow-small {
|
|
6
|
+
box-shadow: var(--color-shadow-small) !important;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
|
-
.
|
|
11
|
-
box-shadow:
|
|
9
|
+
.color-shadow-medium {
|
|
10
|
+
box-shadow: var(--color-shadow-medium) !important;
|
|
12
11
|
}
|
|
13
12
|
|
|
14
|
-
.
|
|
15
|
-
box-shadow:
|
|
13
|
+
.color-shadow-large {
|
|
14
|
+
box-shadow: var(--color-shadow-large) !important;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
.
|
|
19
|
-
box-shadow:
|
|
17
|
+
.color-shadow-extra-large {
|
|
18
|
+
box-shadow: var(--color-shadow-extra-large) !important;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
// Turn off box shadow
|