@primer/css 0.0.0-1ea75fe → 0.0.0-202110100305

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.
Files changed (368) hide show
  1. package/CHANGELOG.md +1231 -132
  2. package/CODE_OF_CONDUCT.md +1 -1
  3. package/CONTRIBUTING.md +85 -0
  4. package/DEVELOP.md +11 -69
  5. package/LICENSE +1 -1
  6. package/README.md +13 -15
  7. package/RELEASING.md +5 -72
  8. package/actionlist/action-list-item-divider.scss +42 -0
  9. package/actionlist/action-list-item.scss +444 -0
  10. package/actionlist/action-list-variables.scss +8 -0
  11. package/actionlist/action-list.scss +33 -0
  12. package/actionlist/index.scss +5 -0
  13. package/alerts/README.md +11 -22
  14. package/alerts/flash.scss +91 -21
  15. package/alerts/index.scss +2 -2
  16. package/autocomplete/README.md +25 -0
  17. package/autocomplete/autocomplete.scss +58 -0
  18. package/autocomplete/index.scss +4 -0
  19. package/autocomplete/suggester.scss +92 -0
  20. package/avatars/README.md +11 -23
  21. package/avatars/avatar-parent-child.scss +4 -3
  22. package/avatars/avatar-stack.scss +21 -13
  23. package/avatars/avatar.scss +31 -3
  24. package/avatars/circle-badge.scss +5 -4
  25. package/avatars/index.scss +5 -5
  26. package/base/README.md +11 -22
  27. package/base/base.scss +5 -4
  28. package/base/index.scss +6 -4
  29. package/base/kbd.scss +20 -0
  30. package/base/normalize.scss +5 -5
  31. package/base/octicons.scss +6 -0
  32. package/base/typography-base.scss +2 -0
  33. package/blankslate/README.md +11 -23
  34. package/blankslate/blankslate.scss +25 -12
  35. package/blankslate/index.scss +2 -2
  36. package/box/README.md +11 -23
  37. package/box/box.scss +52 -44
  38. package/box/index.scss +2 -2
  39. package/branch-name/README.md +11 -23
  40. package/branch-name/branch-name.scss +18 -8
  41. package/branch-name/index.scss +2 -2
  42. package/breadcrumb/README.md +17 -13
  43. package/breadcrumb/breadcrumb.scss +15 -5
  44. package/breadcrumb/index.scss +2 -2
  45. package/buttons/README.md +11 -23
  46. package/buttons/button-group.scss +2 -0
  47. package/buttons/button.scss +243 -143
  48. package/buttons/index.scss +4 -3
  49. package/buttons/misc.scss +222 -0
  50. package/color-modes/index.scss +9 -0
  51. package/color-modes/native.scss +10 -0
  52. package/color-modes/themes/dark.scss +7 -0
  53. package/color-modes/themes/dark_colorblind.scss +7 -0
  54. package/color-modes/themes/dark_dimmed.scss +7 -0
  55. package/color-modes/themes/dark_high_contrast.scss +7 -0
  56. package/color-modes/themes/light.scss +7 -0
  57. package/color-modes/themes/light_colorblind.scss +7 -0
  58. package/core/README.md +11 -23
  59. package/core/index.scss +19 -20
  60. package/deprecations.js +24 -0
  61. package/deprecations.json +539 -0
  62. package/dist/actionlist.css +2 -0
  63. package/dist/actionlist.css.map +1 -0
  64. package/dist/actionlist.js +1 -0
  65. package/dist/alerts.css +1 -2
  66. package/dist/alerts.css.map +1 -1
  67. package/dist/alerts.js +1 -1
  68. package/dist/autocomplete.css +2 -0
  69. package/dist/autocomplete.css.map +1 -0
  70. package/dist/autocomplete.js +1 -0
  71. package/dist/avatars.css +1 -2
  72. package/dist/avatars.css.map +1 -1
  73. package/dist/avatars.js +1 -1
  74. package/dist/base.css +1 -2
  75. package/dist/base.css.map +1 -1
  76. package/dist/base.js +1 -1
  77. package/dist/blankslate.css +1 -2
  78. package/dist/blankslate.css.map +1 -1
  79. package/dist/blankslate.js +1 -1
  80. package/dist/box.css +1 -2
  81. package/dist/box.css.map +1 -1
  82. package/dist/box.js +1 -1
  83. package/dist/branch-name.css +1 -2
  84. package/dist/branch-name.css.map +1 -1
  85. package/dist/branch-name.js +1 -1
  86. package/dist/breadcrumb.css +1 -2
  87. package/dist/breadcrumb.css.map +1 -1
  88. package/dist/breadcrumb.js +1 -1
  89. package/dist/buttons.css +1 -2
  90. package/dist/buttons.css.map +1 -1
  91. package/dist/buttons.js +1 -1
  92. package/dist/color-modes.css +2 -0
  93. package/dist/color-modes.css.map +1 -0
  94. package/dist/color-modes.js +1 -0
  95. package/dist/core.css +3 -4
  96. package/dist/core.css.map +1 -1
  97. package/dist/core.js +1 -1
  98. package/dist/deprecations.json +539 -0
  99. package/dist/dropdown.css +2 -0
  100. package/dist/dropdown.css.map +1 -0
  101. package/dist/dropdown.js +1 -0
  102. package/dist/forms.css +1 -2
  103. package/dist/forms.css.map +1 -1
  104. package/dist/forms.js +1 -1
  105. package/dist/header.css +2 -0
  106. package/dist/header.css.map +1 -0
  107. package/dist/header.js +1 -0
  108. package/dist/labels.css +1 -2
  109. package/dist/labels.css.map +1 -1
  110. package/dist/labels.js +1 -1
  111. package/dist/layout.css +1 -2
  112. package/dist/layout.css.map +1 -1
  113. package/dist/layout.js +1 -1
  114. package/dist/links.css +2 -0
  115. package/dist/links.css.map +1 -0
  116. package/dist/links.js +1 -0
  117. package/dist/loaders.css +2 -0
  118. package/dist/loaders.css.map +1 -0
  119. package/dist/loaders.js +1 -0
  120. package/dist/markdown.css +1 -2
  121. package/dist/markdown.css.map +1 -1
  122. package/dist/markdown.js +1 -1
  123. package/dist/marketing-buttons.css +1 -2
  124. package/dist/marketing-buttons.css.map +1 -1
  125. package/dist/marketing-buttons.js +1 -1
  126. package/dist/marketing-support.css +1 -2
  127. package/dist/marketing-support.js +1 -1
  128. package/dist/marketing-type.css +1 -2
  129. package/dist/marketing-type.css.map +1 -1
  130. package/dist/marketing-type.js +1 -1
  131. package/dist/marketing-utilities.css +1 -2
  132. package/dist/marketing-utilities.css.map +1 -1
  133. package/dist/marketing-utilities.js +1 -1
  134. package/dist/marketing.css +3 -4
  135. package/dist/marketing.css.map +1 -1
  136. package/dist/marketing.js +1 -1
  137. package/dist/meta.json +316 -273
  138. package/dist/navigation.css +1 -2
  139. package/dist/navigation.css.map +1 -1
  140. package/dist/navigation.js +1 -1
  141. package/dist/pagination.css +1 -2
  142. package/dist/pagination.css.map +1 -1
  143. package/dist/pagination.js +1 -1
  144. package/dist/popover.css +1 -2
  145. package/dist/popover.css.map +1 -1
  146. package/dist/popover.js +1 -1
  147. package/dist/primer.css +13 -14
  148. package/dist/primer.css.map +1 -1
  149. package/dist/primer.js +1 -1
  150. package/dist/product.css +3 -4
  151. package/dist/product.css.map +1 -1
  152. package/dist/product.js +1 -1
  153. package/dist/progress.css +1 -2
  154. package/dist/progress.css.map +1 -1
  155. package/dist/progress.js +1 -1
  156. package/dist/select-menu.css +2 -0
  157. package/dist/select-menu.css.map +1 -0
  158. package/dist/select-menu.js +1 -0
  159. package/dist/stats/actionlist.json +1 -0
  160. package/dist/stats/alerts.json +1 -1
  161. package/dist/stats/autocomplete.json +1 -0
  162. package/dist/stats/avatars.json +1 -1
  163. package/dist/stats/base.json +1 -1
  164. package/dist/stats/blankslate.json +1 -1
  165. package/dist/stats/box.json +1 -1
  166. package/dist/stats/branch-name.json +1 -1
  167. package/dist/stats/breadcrumb.json +1 -1
  168. package/dist/stats/buttons.json +1 -1
  169. package/dist/stats/color-modes.json +1 -0
  170. package/dist/stats/core.json +1 -1
  171. package/dist/stats/dropdown.json +1 -0
  172. package/dist/stats/forms.json +1 -1
  173. package/dist/stats/header.json +1 -0
  174. package/dist/stats/labels.json +1 -1
  175. package/dist/stats/layout.json +1 -1
  176. package/dist/stats/links.json +1 -0
  177. package/dist/stats/loaders.json +1 -0
  178. package/dist/stats/markdown.json +1 -1
  179. package/dist/stats/marketing-buttons.json +1 -1
  180. package/dist/stats/marketing-support.json +1 -1
  181. package/dist/stats/marketing-type.json +1 -1
  182. package/dist/stats/marketing-utilities.json +1 -1
  183. package/dist/stats/marketing.json +1 -1
  184. package/dist/stats/navigation.json +1 -1
  185. package/dist/stats/pagination.json +1 -1
  186. package/dist/stats/popover.json +1 -1
  187. package/dist/stats/primer.json +1 -1
  188. package/dist/stats/product.json +1 -1
  189. package/dist/stats/progress.json +1 -1
  190. package/dist/stats/select-menu.json +1 -0
  191. package/dist/stats/subhead.json +1 -1
  192. package/dist/stats/support.json +1 -1
  193. package/dist/stats/table-object.json +1 -1
  194. package/dist/stats/timeline.json +1 -0
  195. package/dist/stats/toasts.json +1 -0
  196. package/dist/stats/tooltips.json +1 -1
  197. package/dist/stats/truncate.json +1 -1
  198. package/dist/stats/utilities.json +1 -1
  199. package/dist/subhead.css +1 -2
  200. package/dist/subhead.css.map +1 -1
  201. package/dist/subhead.js +1 -1
  202. package/dist/support.css +1 -1
  203. package/dist/support.js +1 -1
  204. package/dist/table-object.css +0 -1
  205. package/dist/table-object.css.map +1 -1
  206. package/dist/table-object.js +1 -1
  207. package/dist/timeline.css +2 -0
  208. package/dist/timeline.css.map +1 -0
  209. package/dist/timeline.js +1 -0
  210. package/dist/toasts.css +2 -0
  211. package/dist/toasts.css.map +1 -0
  212. package/dist/toasts.js +1 -0
  213. package/dist/tooltips.css +1 -2
  214. package/dist/tooltips.css.map +1 -1
  215. package/dist/tooltips.js +1 -1
  216. package/dist/truncate.css +1 -2
  217. package/dist/truncate.css.map +1 -1
  218. package/dist/truncate.js +1 -1
  219. package/dist/utilities.css +1 -2
  220. package/dist/utilities.css.map +1 -1
  221. package/dist/utilities.js +1 -1
  222. package/dist/variables.json +1352 -0
  223. package/dropdown/README.md +25 -0
  224. package/dropdown/dropdown.scss +272 -0
  225. package/dropdown/index.scss +2 -0
  226. package/forms/README.md +11 -23
  227. package/forms/form-control.scss +76 -32
  228. package/forms/form-group.scss +83 -46
  229. package/forms/form-select.scss +17 -5
  230. package/forms/form-validation.scss +51 -32
  231. package/forms/index.scss +7 -6
  232. package/forms/input-group.scss +2 -0
  233. package/forms/radio-group.scss +62 -0
  234. package/header/README.md +25 -0
  235. package/header/header.scss +47 -0
  236. package/header/index.scss +2 -0
  237. package/index.scss +7 -4
  238. package/labels/README.md +11 -23
  239. package/labels/counters.scss +24 -13
  240. package/labels/diffstat.scss +37 -0
  241. package/labels/index.scss +8 -4
  242. package/labels/issue-labels.scss +23 -0
  243. package/labels/labels.scss +59 -40
  244. package/labels/mixins.scss +32 -0
  245. package/labels/states.scss +40 -19
  246. package/layout/README.md +11 -23
  247. package/layout/container.scss +0 -8
  248. package/layout/grid-offset.scss +11 -11
  249. package/layout/grid.scss +23 -23
  250. package/layout/index.scss +8 -5
  251. package/layout/layout-beta.scss +339 -0
  252. package/layout/layout.scss +185 -0
  253. package/layout/mixins.scss +79 -0
  254. package/links/README.md +25 -0
  255. package/links/index.scss +3 -0
  256. package/links/link.scss +55 -0
  257. package/loaders/README.md +25 -0
  258. package/loaders/index.scss +2 -0
  259. package/loaders/loaders.scss +19 -0
  260. package/markdown/README.md +11 -23
  261. package/markdown/blob-csv.scss +4 -2
  262. package/markdown/code.scss +11 -3
  263. package/markdown/footnotes.scss +37 -0
  264. package/markdown/headings.scss +13 -4
  265. package/markdown/images.scss +15 -4
  266. package/markdown/index.scss +9 -8
  267. package/markdown/lists.scss +19 -5
  268. package/markdown/markdown-body.scss +15 -18
  269. package/markdown/tables.scss +8 -5
  270. package/marketing/README.md +11 -23
  271. package/marketing/buttons/button.scss +82 -61
  272. package/marketing/index.scss +6 -11
  273. package/marketing/support/index.scss +1 -0
  274. package/marketing/support/mixins.scss +66 -0
  275. package/marketing/support/variables.scss +110 -51
  276. package/marketing/type/typography.scss +100 -62
  277. package/marketing/utilities/animations.scss +9 -0
  278. package/marketing/utilities/filters.scss +0 -1
  279. package/marketing/utilities/index.scss +2 -3
  280. package/marketing/utilities/layout.scss +32 -11
  281. package/navigation/README.md +11 -23
  282. package/navigation/filter-list.scss +16 -14
  283. package/navigation/index.scss +7 -6
  284. package/navigation/menu.scss +44 -35
  285. package/navigation/sidenav.scss +108 -0
  286. package/navigation/subnav.scss +28 -21
  287. package/navigation/tabnav.scss +45 -21
  288. package/navigation/underline-nav.scss +36 -22
  289. package/package.json +78 -107
  290. package/pagination/README.md +12 -14
  291. package/pagination/index.scss +2 -2
  292. package/pagination/pagination.scss +61 -37
  293. package/popover/README.md +11 -24
  294. package/popover/index.scss +2 -2
  295. package/popover/popover.scss +18 -9
  296. package/postcss.config.cjs +22 -0
  297. package/prettier.config.cjs +1 -0
  298. package/product/README.md +11 -23
  299. package/product/index.scss +19 -17
  300. package/progress/README.md +11 -23
  301. package/progress/index.scss +2 -2
  302. package/progress/progress.scss +11 -1
  303. package/select-menu/README.md +25 -0
  304. package/select-menu/index.scss +3 -0
  305. package/select-menu/select-menu.scss +464 -0
  306. package/stylelint.config.cjs +16 -0
  307. package/subhead/README.md +11 -25
  308. package/subhead/index.scss +2 -2
  309. package/subhead/subhead.scss +10 -4
  310. package/support/README.md +12 -18
  311. package/support/index.scss +7 -8
  312. package/support/mixins/color-modes.scss +106 -0
  313. package/support/mixins/misc.scss +9 -12
  314. package/support/mixins/typography.scss +1 -1
  315. package/support/variables/layout.scss +103 -11
  316. package/support/variables/misc.scss +7 -30
  317. package/support/variables/typography.scss +4 -4
  318. package/table-object/README.md +11 -24
  319. package/table-object/index.scss +1 -1
  320. package/timeline/README.md +25 -0
  321. package/timeline/index.scss +2 -0
  322. package/timeline/timeline-item.scss +95 -0
  323. package/toasts/README.md +25 -0
  324. package/toasts/index.scss +2 -0
  325. package/toasts/toasts.scss +124 -0
  326. package/tooltips/README.md +11 -24
  327. package/tooltips/index.scss +2 -2
  328. package/tooltips/tooltips.scss +17 -8
  329. package/truncate/README.md +11 -24
  330. package/truncate/index.scss +2 -1
  331. package/truncate/truncate.scss +41 -7
  332. package/utilities/README.md +11 -23
  333. package/utilities/animations.scss +14 -2
  334. package/utilities/borders.scss +29 -65
  335. package/utilities/box-shadow.scss +8 -9
  336. package/utilities/colors.scss +71 -110
  337. package/utilities/details.scss +12 -4
  338. package/utilities/flexbox.scss +14 -14
  339. package/utilities/index.scss +12 -12
  340. package/utilities/layout.scss +28 -22
  341. package/utilities/margin.scss +34 -17
  342. package/utilities/padding.scss +13 -9
  343. package/utilities/typography.scss +54 -25
  344. package/utilities/visibility-display.scss +0 -13
  345. package/.browserslistrc +0 -6
  346. package/.eslintrc.json +0 -13
  347. package/.stylelintrc.json +0 -9
  348. package/MIGRATING.md +0 -70
  349. package/bin/primer-migrate +0 -86
  350. package/build/build.css +0 -23
  351. package/build/build.json +0 -1
  352. package/build/index.js +0 -1
  353. package/dist/marketing-support.css.map +0 -1
  354. package/dist/support.css.map +0 -1
  355. package/fonts/Inter-Medium.woff +0 -0
  356. package/fonts/Inter-Regular.woff +0 -0
  357. package/layout/columns.scss +0 -56
  358. package/marketing/buttons/README.md +0 -39
  359. package/marketing/support/README.md +0 -31
  360. package/marketing/type/README.md +0 -39
  361. package/marketing/utilities/README.md +0 -36
  362. package/marketing/utilities/margin.scss +0 -18
  363. package/marketing/utilities/padding.scss +0 -28
  364. package/postcss.config.js +0 -14
  365. package/prettier.config.js +0 -1
  366. package/support/mixins/buttons.scss +0 -160
  367. package/support/variables/color-system.scss +0 -243
  368. package/support/variables/colors.scss +0 -70
@@ -2,41 +2,63 @@
2
2
  // stylelint-disable selector-max-type
3
3
  .tabnav {
4
4
  margin-top: 0;
5
- margin-bottom: 15px;
6
- border-bottom: 1px solid $gray-300;
7
-
8
- .Counter {
9
- margin-left: 5px;
10
- }
5
+ margin-bottom: $spacer-3;
6
+ border-bottom: $border-width $border-style var(--color-border-default);
11
7
  }
12
8
 
13
9
  .tabnav-tabs {
10
+ display: flex;
11
+ // stylelint-disable-next-line primer/spacing
14
12
  margin-bottom: -1px;
13
+ overflow: auto;
15
14
  }
16
15
 
17
16
  .tabnav-tab {
18
17
  display: inline-block;
19
- padding: $spacer-2 12px;
18
+ flex-shrink: 0;
19
+ padding: $spacer-2 $spacer-3;
20
20
  font-size: $h5-size;
21
- line-height: 20px;
22
- color: $gray-600;
21
+ // stylelint-disable-next-line primer/typography
22
+ line-height: 23px;
23
+ color: var(--color-fg-muted);
23
24
  text-decoration: none;
24
25
  background-color: transparent;
25
- border: 1px solid transparent;
26
+ border: $border-width $border-style transparent;
26
27
  border-bottom: 0;
28
+ transition: color 0.2s cubic-bezier(0.3, 0, 0.5, 1);
27
29
 
30
+ &.selected,
28
31
  &[aria-selected=true],
29
- &.selected {
30
- color: $text-gray-dark;
31
- background-color: $bg-white;
32
- border-color: $gray-300;
33
- border-radius: 3px 3px 0 0;
32
+ &[aria-current]:not([aria-current=false]) {
33
+ color: var(--color-fg-default);
34
+ background-color: var(--color-canvas-default); // cover bottom border
35
+ border-color: var(--color-border-default);
36
+ border-radius: $border-radius $border-radius 0 0;
37
+
38
+ .octicon {
39
+ color: inherit;
40
+ }
34
41
  }
35
42
 
36
43
  &:hover,
37
44
  &:focus {
38
- color: $text-gray-dark;
45
+ color: var(--color-fg-default);
39
46
  text-decoration: none;
47
+ transition-duration: 0.1s;
48
+ }
49
+
50
+ &:active {
51
+ color: var(--color-fg-muted);
52
+ }
53
+
54
+ .octicon {
55
+ margin-right: $spacer-1;
56
+ color: var(--color-fg-muted);
57
+ }
58
+
59
+ .Counter {
60
+ margin-left: $spacer-1;
61
+ color: inherit;
40
62
  }
41
63
  }
42
64
 
@@ -47,23 +69,25 @@
47
69
 
48
70
  .tabnav-extra {
49
71
  display: inline-block;
72
+ // stylelint-disable-next-line primer/spacing
50
73
  padding-top: 10px;
74
+ // stylelint-disable-next-line primer/spacing
51
75
  margin-left: 10px;
52
76
  font-size: $font-size-small;
53
- color: $gray-600;
77
+ color: var(--color-fg-muted);
54
78
 
55
79
  > .octicon {
80
+ // stylelint-disable-next-line primer/spacing
56
81
  margin-right: 2px;
57
82
  }
58
83
  }
59
84
 
60
85
  // When tabnav-extra are anchors
61
- // stylelint-disable selector-no-qualifying-type
86
+ // stylelint-disable-next-line selector-no-qualifying-type
62
87
  a.tabnav-extra:hover {
63
- color: $text-blue;
88
+ color: var(--color-accent-fg);
64
89
  text-decoration: none;
65
90
  }
66
- // stylelint-enable selector-no-qualifying-type
67
91
 
68
92
  // Tabnav buttons
69
93
  //
@@ -71,5 +95,5 @@ a.tabnav-extra:hover {
71
95
  // the buttons to be floated or inline-block.
72
96
 
73
97
  .tabnav-btn {
74
- margin-left: 10px;
98
+ margin-left: $spacer-2;
75
99
  }
@@ -2,7 +2,8 @@
2
2
  display: flex;
3
3
  overflow-x: auto;
4
4
  overflow-y: hidden;
5
- border-bottom: $border;
5
+ // stylelint-disable-next-line primer/box-shadow
6
+ box-shadow: inset 0 -1px 0 var(--color-border-muted);
6
7
  justify-content: space-between;
7
8
  }
8
9
 
@@ -11,33 +12,39 @@
11
12
  }
12
13
 
13
14
  .UnderlineNav-item {
14
- padding: $spacer-3 $spacer-2;
15
- margin-right: $spacer-3;
15
+ padding: $spacer-2 $spacer-3;
16
16
  font-size: $body-font-size;
17
- line-height: $lh-default;
18
- color: $text-gray;
17
+ // stylelint-disable-next-line primer/typography
18
+ line-height: 30px;
19
+ color: var(--color-fg-default);
19
20
  text-align: center;
21
+ white-space: nowrap;
22
+ background-color: transparent;
23
+ border: 0;
24
+ // stylelint-disable-next-line primer/borders
20
25
  border-bottom: 2px $border-style transparent;
21
26
 
22
27
  &:hover,
23
28
  &:focus {
24
- color: $text-gray-dark;
29
+ color: var(--color-fg-default);
25
30
  text-decoration: none;
26
- border-bottom-color: $gray-300;
27
- transition: 0.2s ease;
28
-
29
- .UnderlineNav-octicon {
30
- color: $gray-500;
31
- }
31
+ border-bottom-color: var(--color-neutral-muted);
32
+ outline: 1px dotted transparent; // Support Firefox custom colors
33
+ outline-offset: -1px;
34
+ transition: border-bottom-color 0.12s ease-out;
32
35
  }
33
36
 
34
- &.selected {
37
+ &.selected,
38
+ &[role=tab][aria-selected=true],
39
+ &[aria-current]:not([aria-current=false]) {
35
40
  font-weight: $font-weight-bold;
36
- color: $text-gray-dark;
37
- border-bottom-color: $orange-600;
41
+ color: var(--color-fg-default);
42
+ border-bottom-color: var(--color-primer-border-active);
43
+ outline: 1px dotted transparent; // Support Firefox custom colors
44
+ outline-offset: -1px;
38
45
 
39
46
  .UnderlineNav-octicon {
40
- color: $gray-500;
47
+ color: var(--color-fg-muted);
41
48
  }
42
49
  }
43
50
  }
@@ -45,11 +52,6 @@
45
52
  .UnderlineNav--right {
46
53
  justify-content: flex-end;
47
54
 
48
- .UnderlineNav-item {
49
- margin-right: 0;
50
- margin-left: $spacer-3;
51
- }
52
-
53
55
  .UnderlineNav-actions {
54
56
  flex: 1 1 auto;
55
57
  }
@@ -64,7 +66,19 @@
64
66
  }
65
67
 
66
68
  .UnderlineNav-octicon {
67
- color: $gray-400;
69
+ margin-right: $spacer-1;
70
+ color: var(--color-fg-subtle);
71
+ }
72
+
73
+ .UnderlineNav .Counter {
74
+ margin-left: $spacer-1;
75
+ color: var(--color-fg-default);
76
+ background-color: var(--color-neutral-muted);
77
+
78
+ &--primary {
79
+ color: var(--color-fg-on-emphasis);
80
+ background-color: var(--color-neutral-emphasis);
81
+ }
68
82
  }
69
83
 
70
84
  .UnderlineNav-container {
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "@primer/css",
3
- "version": "0.0.0-1ea75fe",
4
- "description": "Primer is the CSS framework that powers GitHub's front-end design. primer includes 23 packages that are grouped into 3 core meta-packages for easy install. Each package and meta-package is independently versioned and distributed via npm, so it's easy to include all or part of Primer within your own project.",
3
+ "version": "0.0.0-202110100305",
4
+ "description": "The CSS implementation of GitHub's Primer Design System",
5
5
  "homepage": "https://primer.style/css",
6
6
  "author": "GitHub, Inc.",
7
+ "engines": {
8
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
9
+ },
7
10
  "license": "MIT",
8
11
  "style": "dist/primer.css",
9
12
  "sass": "index.scss",
13
+ "type": "module",
10
14
  "main": "dist/primer.js",
11
15
  "repository": "https://github.com/primer/css",
12
16
  "bugs": {
@@ -18,114 +22,81 @@
18
22
  "github",
19
23
  "design-system"
20
24
  ],
21
- "bin": {
22
- "primer-migrate": "bin/primer-migrate"
23
- },
24
25
  "scripts": {
25
- "fresh": "rm -rf node_modules; npm install",
26
- "dist": "script/dist",
27
- "check-links": "script/check-links http://localhost:3000/css -v",
28
- "lint": "npm-run-all -s lint-css lint-js",
29
- "lint-css": "stylelint --quiet --syntax scss src/**/*.scss",
30
- "lint-js": "eslint lib docs .storybook",
31
- "now-build": "npm run dist && next build",
32
- "now-start": "next start",
33
- "now-test": "npm-run-all -s now-build now-start",
34
- "postpublish": "script/postpublish",
26
+ "dist": "script/dist.js",
27
+ "stylelint": "stylelint --quiet src/**/*.scss",
28
+ "eslint": "eslint deprecations.js __tests__ script",
35
29
  "prepublishOnly": "script/prepublish",
36
- "publish-storybook": "script/publish-storybook",
37
- "start": "next dev",
38
- "dev": "next dev",
39
- "start-storybook": "start-storybook -p 8001",
40
- "build-storybook": "build-storybook -o .storybuild",
41
- "test": "npm-run-all -s test-urls test-migrate",
42
- "test-urls": "node docs-test/urls.js",
43
- "test-migrate": "script/test-migrate"
30
+ "start": "yarn dev",
31
+ "dev": "cd docs && yarn && yarn develop",
32
+ "pretest": "yarn dist && script/pretest",
33
+ "test": "NODE_OPTIONS=--experimental-vm-modules yarn jest",
34
+ "release": "changeset publish",
35
+ "storybook": "cd docs && yarn && yarn storybook"
36
+ },
37
+ "dependencies": {
38
+ "@primer/primitives": "^6.1.0"
44
39
  },
45
40
  "devDependencies": {
46
- "@githubprimer/octicons-react": "^8.1.3",
47
- "@mdx-js/mdx": "^0.16.6",
48
- "@mdx-js/tag": "0.15.0",
49
- "@primer/blueprints": "4.0.1",
50
- "@primer/components": "12.0.1",
51
- "@primer/next-pages": "0.0.3",
52
- "@storybook/addon-viewport": "5.0.0",
53
- "@storybook/react": "5.0.10",
54
- "@svgr/webpack": "2.4.1",
55
- "@zeit/next-css": "^1.0.1",
56
- "@zeit/next-sass": "^1.0.1",
57
- "action-status": "0.1.1",
58
- "autoprefixer": "9.4.7",
59
- "broken-link-checker": "^0.7.8",
60
- "char-spinner": "^1.0.1",
61
- "chroma-js": "^1.4.1",
62
- "clipboard-copy-element": "^0.5.0",
63
- "code-blocks": "^1.1.0",
64
- "colorette": "^1.0.7",
65
- "css-loader": "^0.28.4",
66
- "cssstats": "3.3.0",
67
- "details-dialog-element": "^1.4.0",
68
- "eslint": "4.19.1",
69
- "eslint-plugin-github": "1.0.0",
70
- "execa": "^0.10.0",
71
- "filesize": "4.1.2",
72
- "fs-extra": "^4.0.2",
73
- "fx": "11.0.1",
74
- "gh-pages": "^1.0.0",
75
- "globby": "^6.1.0",
76
- "gray-matter": "^4.0.1",
77
- "hast-util-to-html": "^5.0.0",
78
- "hast-util-to-string": "^1.0.1",
79
- "html-2-jsx": "0.5.1-dev",
80
- "html-to-react": "^1.2.11",
81
- "klaw": "3.0.0",
82
- "loader-utils": "^1.1.0",
83
- "mdx-constant": "^0.1.0",
84
- "metalsmith": "^2.3.0",
85
- "metalsmith-filter": "^1.0.2",
86
- "metalsmith-matters": "^1.2.0",
87
- "metalsmith-watch": "^1.0.3",
88
- "minimist": "1.2.0",
89
- "next": "7.0.2",
90
- "node-fetch": "2.4.0",
91
- "now": "^12.1.8",
92
- "npm-run-all": "4.1.5",
93
- "postcss": "7.0.14",
94
- "postcss-load-config": "2.0.0",
95
- "postcss-loader": "^2.0.6",
96
- "postcss-node-sass": "2.1.8",
97
- "postcss-scss": "2.0.0",
98
- "primer-colors": "^1.0.1",
99
- "prism-github": "^1.1.0",
100
- "prop-types": "^15.6.2",
101
- "raw-loader": "^0.5.1",
102
- "react": "16.8.1",
103
- "react-bodymovin": "2.0.0",
104
- "react-dom": "16.8.1",
105
- "react-live": "1.12.0",
106
- "react-measure": "^2.2.2",
107
- "refractor": "^2.6.2",
108
- "remark": "^8.0.0",
109
- "remark-emoji": "^2.0.2",
110
- "remark-images": "^0.16.1",
111
- "remark-parse": "^6.0.3",
112
- "remark-textr": "^3.0.3",
113
- "remark-toc": "^5.1.1",
114
- "sass-loader": "^6.0.6",
115
- "semver": "^5.3.0",
116
- "style-loader": "^0.18.2",
117
- "styled-components": "4.1.2",
118
- "stylelint": "9.10.1",
119
- "stylelint-config-primer": "7.0.0",
120
- "table": "5.2.3",
121
- "tar": "4.4.8",
122
- "title-case": "^2.1.1",
123
- "tree-model": "^1.0.7",
124
- "typographic-base": "^1.0.4",
125
- "unified": "^7.1.0",
126
- "unist-util-select": "^2.0.0",
127
- "unist-util-stringify-position": "^2.0.0",
128
- "unist-util-visit": "^1.4.0",
129
- "webpack": "4.20.2"
41
+ "@changesets/changelog-github": "0.4.1",
42
+ "@changesets/cli": "2.17.0",
43
+ "@github/prettier-config": "0.0.4",
44
+ "@koddsson/postcss-sass": "5.0.0",
45
+ "@primer/stylelint-config": "12.1.0",
46
+ "autoprefixer": "10.4.0",
47
+ "cssstats": "4.0.2",
48
+ "eslint": "8.1.0",
49
+ "eslint-plugin-github": "4.3.3",
50
+ "eslint-plugin-jest": "25.2.2",
51
+ "eslint-plugin-prettier": "4.0.0",
52
+ "filesize": "8.0.6",
53
+ "front-matter": "4.0.2",
54
+ "fs-extra": "10.0.0",
55
+ "globby": "12.0.2",
56
+ "jest": "27.3.1",
57
+ "js-yaml": "4.1.0",
58
+ "postcss": "8.3.11",
59
+ "postcss-calc": "8.0.0",
60
+ "postcss-import": "14.0.2",
61
+ "postcss-load-config": "3.1.0",
62
+ "postcss-scss": "4.0.2",
63
+ "postcss-simple-vars": "6.0.3",
64
+ "prettier": "2.4.1",
65
+ "semver": "7.3.5",
66
+ "stylelint": "14.0.1",
67
+ "stylelint-scss": "4.0.0",
68
+ "table": "6.7.2"
69
+ },
70
+ "jest": {
71
+ "testEnvironment": "node",
72
+ "testPathIgnorePatterns": [
73
+ "/node_modules/",
74
+ "/__tests__/utils/",
75
+ "/__tests__/docs.test.js"
76
+ ],
77
+ "transform": {}
78
+ },
79
+ "browserslist": [
80
+ "last 10 Chrome versions",
81
+ "last 4 Firefox versions",
82
+ "last 3 Safari versions",
83
+ "not Safari 12",
84
+ "last 4 Edge versions",
85
+ "not Edge <= 18",
86
+ "Firefox ESR"
87
+ ],
88
+ "eslintConfig": {
89
+ "extends": [
90
+ "plugin:github/internal",
91
+ "plugin:github/recommended"
92
+ ],
93
+ "env": {
94
+ "es6": true,
95
+ "node": true
96
+ },
97
+ "parserOptions": {
98
+ "ecmaVersion": 2017,
99
+ "requireConfigFile": false
100
+ }
130
101
  }
131
102
  }
@@ -1,27 +1,25 @@
1
- # Primer Pagination
1
+ ---
2
+ bundle: "pagination"
3
+ generated: true
4
+ ---
2
5
 
3
- > Pagination component for applying button styles to a connected set of links that go to related pages
4
-
5
- This repository is a module of the full [primer][primer] repository.
6
+ # Primer CSS: `pagination` bundle
6
7
 
7
8
  ## Usage
8
9
 
9
- The source files included are written in [Sass][sass] (SCSS) You can simply point your sass `include-path` at your `node_modules` directory and import it like this.
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-pagination/index.scss";
13
+ @import "@primer/css/pagination/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
- For a compiled **CSS** version of this module, an npm script is included that will output a css version to `build/build.css` The built css file is also included in the npm package:
18
+ The `@primer/css` npm package includes a standalone CSS build of this module in `dist/pagination.css`.
20
19
 
21
- ```
22
- $ npm run build
23
- ```
20
+ ## License
21
+
22
+ [MIT](https://github.com/primer/css/blob/main/LICENSE) &copy; [GitHub](https://github.com/)
24
23
 
25
- ## Documentation
26
24
 
27
- Find further documentation at [primer.style/css/components/pagination](https://primer.style/css/components/pagination).
25
+ [scss]: https://sass-lang.com/documentation/syntax#scss
@@ -1,3 +1,3 @@
1
1
  // support files
2
- @import "../support/index.scss";
3
- @import "./pagination.scss";
2
+ @import '../support/index.scss';
3
+ @import './pagination.scss';
@@ -1,71 +1,95 @@
1
1
  // Needs refactoring
2
2
  // stylelint-disable selector-max-type
3
3
  .pagination {
4
- @include clearfix;
5
-
6
4
  a,
7
5
  span,
8
6
  em {
9
- position: relative;
10
- float: left;
11
- padding: 7px 12px;
12
- margin-left: -1px;
13
- font-size: 13px;
7
+ display: inline-block;
8
+ min-width: 32px;
9
+ // stylelint-disable-next-line primer/spacing
10
+ padding: 5px 10px;
14
11
  font-style: normal;
15
- font-weight: $font-weight-bold;
16
- color: $text-blue;
12
+ // stylelint-disable-next-line primer/typography
13
+ line-height: 20px;
14
+ color: var(--color-fg-default);
15
+ text-align: center;
17
16
  white-space: nowrap;
18
17
  vertical-align: middle;
19
18
  cursor: pointer;
20
19
  user-select: none;
21
- background: $bg-white; // Reset default gradient backgrounds and colors
22
- border: $border-width $border-style $border-gray;
23
-
24
- &:first-child {
25
- margin-left: 0;
26
- border-top-left-radius: $border-radius;
27
- border-bottom-left-radius: $border-radius;
28
- }
20
+ border: $border-width $border-style transparent;
21
+ border-radius: $border-radius;
22
+ transition: border-color 0.2s cubic-bezier(0.3, 0, 0.5, 1);
29
23
 
30
- &:last-child {
31
- border-top-right-radius: $border-radius;
32
- border-bottom-right-radius: $border-radius;
33
- }
34
-
35
- // Bring any button into forefront for proper borders given negative margin below
36
24
  &:hover,
37
25
  &:focus {
38
- z-index: 2;
39
26
  text-decoration: none;
40
- background-color: darken($gray-100, 2%);
41
- border-color: $border-gray;
27
+ border-color: var(--color-border-default);
28
+ outline: 0;
29
+ transition-duration: 0.1s;
30
+ }
31
+
32
+ &:active {
33
+ border-color: var(--color-border-muted);
34
+ transition: none;
42
35
  }
43
36
  }
44
37
 
45
- .selected { z-index: 3; }
38
+ .previous_page,
39
+ .next_page {
40
+ color: var(--color-accent-fg);
41
+ }
46
42
 
47
43
  .current,
48
- .current:hover {
49
- z-index: 3;
50
- color: $text-white;
51
- background-color: $bg-blue;
52
- border-color: $border-blue;
44
+ .current:hover,
45
+ [aria-current]:not([aria-current=false]) {
46
+ color: var(--color-fg-on-emphasis);
47
+ background-color: var(--color-accent-emphasis);
48
+ border-color: transparent;
53
49
  }
54
50
 
55
51
  .gap,
56
52
  .disabled,
53
+ [aria-disabled=true],
57
54
  .gap:hover,
58
- .disabled:hover {
59
- color: $gray-300;
55
+ .disabled:hover,
56
+ [aria-disabled=true]:hover {
57
+ color: var(--color-primer-fg-disabled);
60
58
  cursor: default;
61
- background-color: $bg-gray-light;
59
+ border-color: transparent;
60
+ }
61
+
62
+ // chevron icons using clip-path
63
+ @supports (clip-path: polygon(50% 0, 100% 50%, 50% 100%)) {
64
+ .previous_page::before,
65
+ .next_page::after {
66
+ display: inline-block;
67
+ width: 16px;
68
+ height: 16px;
69
+ vertical-align: text-bottom;
70
+ content: '';
71
+ // stylelint-disable-next-line primer/colors
72
+ background-color: currentColor;
73
+ }
74
+
75
+ // chevron-left
76
+ .previous_page::before {
77
+ margin-right: $spacer-1;
78
+ clip-path: polygon(9.8px 12.8px, 8.7px 12.8px, 4.5px 8.5px, 4.5px 7.5px, 8.7px 3.2px, 9.8px 4.3px, 6.1px 8px, 9.8px 11.7px, 9.8px 12.8px);
79
+ }
80
+
81
+ // chevron-right
82
+ .next_page::after {
83
+ margin-left: $spacer-1;
84
+ clip-path: polygon(6.2px 3.2px, 7.3px 3.2px, 11.5px 7.5px, 11.5px 8.5px, 7.3px 12.8px, 6.2px 11.7px, 9.9px 8px, 6.2px 4.3px, 6.2px 3.2px);
85
+ }
62
86
  }
63
87
  }
64
88
 
65
89
  // Unified centered pagination across the site
66
90
  .paginate-container {
67
- margin-top: 20px;
68
- margin-bottom: 15px;
91
+ margin-top: $spacer-3;
92
+ margin-bottom: $spacer-3;
69
93
  text-align: center;
70
94
 
71
95
  .pagination {
package/popover/README.md CHANGED
@@ -1,38 +1,25 @@
1
- # Primer Popover
1
+ ---
2
+ bundle: "popover"
3
+ generated: true
4
+ ---
2
5
 
3
- > Popover for suggesting, guiding, and bringing attention to specific UI elements on a page.
4
-
5
- This repository is a module of the full [primer][primer] repository.
6
+ # Primer CSS: `popover` bundle
6
7
 
7
8
  ## Usage
8
9
 
9
- The source files included are written in [Sass][sass] (SCSS) You can simply point your sass `include-path` at your `node_modules` directory and import it like this.
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-popover/index.scss";
13
+ @import "@primer/css/popover/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
- For a compiled **CSS** version of this module, an npm script is included that will output a css version to `build/build.css` The built css file is also included in the npm package:
20
-
21
- ```
22
- $ npm run build
23
- ```
24
-
25
- ## Documentation
26
-
27
- Find further documentation at [primer.style/css/components/popover](https://primer.style/css/components/popover).
28
-
18
+ The `@primer/css` npm package includes a standalone CSS build of this module in `dist/popover.css`.
29
19
 
30
20
  ## License
31
21
 
32
- [MIT](./LICENSE) &copy; [GitHub](https://github.com/)
22
+ [MIT](https://github.com/primer/css/blob/main/LICENSE) &copy; [GitHub](https://github.com/)
23
+
33
24
 
34
- [primer]: https://github.com/primer/css
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
@@ -1,3 +1,3 @@
1
1
  // support files
2
- @import "../support/index.scss";
3
- @import "./popover.scss";
2
+ @import '../support/index.scss';
3
+ @import './popover.scss';