@primer/css 0.0.0-1f49d76 → 0.0.0-20211010195643

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. package/CHANGELOG.md +858 -133
  2. package/CONTRIBUTING.md +85 -0
  3. package/DEVELOP.md +4 -39
  4. package/LICENSE +1 -1
  5. package/README.md +13 -15
  6. package/RELEASING.md +5 -76
  7. package/actionlist/action-list-item-divider.scss +42 -0
  8. package/actionlist/action-list-item.scss +439 -0
  9. package/actionlist/action-list-variables.scss +8 -0
  10. package/actionlist/action-list.scss +33 -0
  11. package/actionlist/index.scss +5 -0
  12. package/alerts/README.md +1 -1
  13. package/alerts/flash.scss +32 -26
  14. package/alerts/index.scss +2 -2
  15. package/autocomplete/README.md +1 -1
  16. package/autocomplete/autocomplete.scss +18 -8
  17. package/autocomplete/index.scss +3 -3
  18. package/autocomplete/suggester.scss +27 -10
  19. package/avatars/README.md +1 -1
  20. package/avatars/avatar-parent-child.scss +2 -3
  21. package/avatars/avatar-stack.scss +12 -14
  22. package/avatars/avatar.scss +4 -0
  23. package/avatars/circle-badge.scss +4 -4
  24. package/avatars/index.scss +5 -5
  25. package/base/README.md +1 -1
  26. package/base/base.scss +39 -7
  27. package/base/index.scss +6 -5
  28. package/base/kbd.scss +5 -6
  29. package/base/normalize.scss +13 -53
  30. package/base/octicons.scss +6 -0
  31. package/blankslate/README.md +1 -1
  32. package/blankslate/blankslate.scss +7 -4
  33. package/blankslate/index.scss +2 -2
  34. package/box/README.md +1 -1
  35. package/box/box.scss +38 -38
  36. package/box/index.scss +2 -2
  37. package/branch-name/README.md +1 -1
  38. package/branch-name/branch-name.scss +15 -10
  39. package/branch-name/index.scss +2 -2
  40. package/breadcrumb/README.md +1 -1
  41. package/breadcrumb/breadcrumb.scss +12 -7
  42. package/breadcrumb/index.scss +2 -2
  43. package/buttons/README.md +1 -1
  44. package/buttons/button.scss +115 -121
  45. package/buttons/index.scss +4 -4
  46. package/buttons/misc.scss +52 -41
  47. package/color-modes/index.scss +9 -0
  48. package/color-modes/native.scss +10 -0
  49. package/color-modes/themes/dark.scss +7 -0
  50. package/color-modes/themes/dark_colorblind.scss +7 -0
  51. package/color-modes/themes/dark_dimmed.scss +7 -0
  52. package/color-modes/themes/dark_high_contrast.scss +7 -0
  53. package/color-modes/themes/light.scss +7 -0
  54. package/color-modes/themes/light_colorblind.scss +7 -0
  55. package/core/README.md +1 -1
  56. package/core/index.scss +17 -16
  57. package/deprecations.js +18 -200
  58. package/deprecations.json +539 -0
  59. package/dist/actionlist.css +2 -0
  60. package/dist/actionlist.css.map +1 -0
  61. package/dist/actionlist.js +1 -0
  62. package/dist/alerts.css +1 -2
  63. package/dist/alerts.css.map +1 -1
  64. package/dist/alerts.js +1 -1
  65. package/dist/autocomplete.css +1 -2
  66. package/dist/autocomplete.css.map +1 -1
  67. package/dist/autocomplete.js +1 -1
  68. package/dist/avatars.css +1 -2
  69. package/dist/avatars.css.map +1 -1
  70. package/dist/avatars.js +1 -1
  71. package/dist/base.css +1 -2
  72. package/dist/base.css.map +1 -1
  73. package/dist/base.js +1 -1
  74. package/dist/blankslate.css +1 -2
  75. package/dist/blankslate.css.map +1 -1
  76. package/dist/blankslate.js +1 -1
  77. package/dist/box.css +1 -2
  78. package/dist/box.css.map +1 -1
  79. package/dist/box.js +1 -1
  80. package/dist/branch-name.css +1 -2
  81. package/dist/branch-name.css.map +1 -1
  82. package/dist/branch-name.js +1 -1
  83. package/dist/breadcrumb.css +1 -2
  84. package/dist/breadcrumb.css.map +1 -1
  85. package/dist/breadcrumb.js +1 -1
  86. package/dist/buttons.css +1 -2
  87. package/dist/buttons.css.map +1 -1
  88. package/dist/buttons.js +1 -1
  89. package/dist/color-modes.css +2 -0
  90. package/dist/color-modes.css.map +1 -0
  91. package/dist/color-modes.js +1 -0
  92. package/dist/core.css +1 -2
  93. package/dist/core.css.map +1 -1
  94. package/dist/core.js +1 -1
  95. package/dist/deprecations.json +534 -571
  96. package/dist/dropdown.css +1 -2
  97. package/dist/dropdown.css.map +1 -1
  98. package/dist/dropdown.js +1 -1
  99. package/dist/forms.css +1 -2
  100. package/dist/forms.css.map +1 -1
  101. package/dist/forms.js +1 -1
  102. package/dist/header.css +1 -2
  103. package/dist/header.css.map +1 -1
  104. package/dist/header.js +1 -1
  105. package/dist/labels.css +1 -2
  106. package/dist/labels.css.map +1 -1
  107. package/dist/labels.js +1 -1
  108. package/dist/layout.css +1 -2
  109. package/dist/layout.css.map +1 -1
  110. package/dist/layout.js +1 -1
  111. package/dist/links.css +2 -0
  112. package/dist/links.css.map +1 -0
  113. package/dist/links.js +1 -0
  114. package/dist/loaders.css +0 -1
  115. package/dist/loaders.css.map +1 -1
  116. package/dist/loaders.js +1 -1
  117. package/dist/markdown.css +1 -2
  118. package/dist/markdown.css.map +1 -1
  119. package/dist/markdown.js +1 -1
  120. package/dist/marketing-buttons.css +1 -2
  121. package/dist/marketing-buttons.css.map +1 -1
  122. package/dist/marketing-buttons.js +1 -1
  123. package/dist/marketing-support.css +1 -2
  124. package/dist/marketing-support.js +1 -1
  125. package/dist/marketing-type.css +1 -2
  126. package/dist/marketing-type.css.map +1 -1
  127. package/dist/marketing-type.js +1 -1
  128. package/dist/marketing-utilities.css +1 -2
  129. package/dist/marketing-utilities.css.map +1 -1
  130. package/dist/marketing-utilities.js +1 -1
  131. package/dist/marketing.css +1 -2
  132. package/dist/marketing.css.map +1 -1
  133. package/dist/marketing.js +1 -1
  134. package/dist/meta.json +314 -369
  135. package/dist/navigation.css +1 -2
  136. package/dist/navigation.css.map +1 -1
  137. package/dist/navigation.js +1 -1
  138. package/dist/pagination.css +1 -2
  139. package/dist/pagination.css.map +1 -1
  140. package/dist/pagination.js +1 -1
  141. package/dist/popover.css +1 -2
  142. package/dist/popover.css.map +1 -1
  143. package/dist/popover.js +1 -1
  144. package/dist/primer.css +4 -5
  145. package/dist/primer.css.map +1 -1
  146. package/dist/primer.js +1 -1
  147. package/dist/product.css +1 -2
  148. package/dist/product.css.map +1 -1
  149. package/dist/product.js +1 -1
  150. package/dist/progress.css +1 -2
  151. package/dist/progress.css.map +1 -1
  152. package/dist/progress.js +1 -1
  153. package/dist/select-menu.css +1 -2
  154. package/dist/select-menu.css.map +1 -1
  155. package/dist/select-menu.js +1 -1
  156. package/dist/stats/actionlist.json +1 -0
  157. package/dist/stats/alerts.json +1 -1
  158. package/dist/stats/autocomplete.json +1 -1
  159. package/dist/stats/avatars.json +1 -1
  160. package/dist/stats/base.json +1 -1
  161. package/dist/stats/blankslate.json +1 -1
  162. package/dist/stats/box.json +1 -1
  163. package/dist/stats/branch-name.json +1 -1
  164. package/dist/stats/breadcrumb.json +1 -1
  165. package/dist/stats/buttons.json +1 -1
  166. package/dist/stats/color-modes.json +1 -0
  167. package/dist/stats/core.json +1 -1
  168. package/dist/stats/dropdown.json +1 -1
  169. package/dist/stats/forms.json +1 -1
  170. package/dist/stats/header.json +1 -1
  171. package/dist/stats/labels.json +1 -1
  172. package/dist/stats/layout.json +1 -1
  173. package/dist/stats/links.json +1 -0
  174. package/dist/stats/loaders.json +1 -1
  175. package/dist/stats/markdown.json +1 -1
  176. package/dist/stats/marketing-buttons.json +1 -1
  177. package/dist/stats/marketing-support.json +1 -1
  178. package/dist/stats/marketing-type.json +1 -1
  179. package/dist/stats/marketing-utilities.json +1 -1
  180. package/dist/stats/marketing.json +1 -1
  181. package/dist/stats/navigation.json +1 -1
  182. package/dist/stats/pagination.json +1 -1
  183. package/dist/stats/popover.json +1 -1
  184. package/dist/stats/primer.json +1 -1
  185. package/dist/stats/product.json +1 -1
  186. package/dist/stats/progress.json +1 -1
  187. package/dist/stats/select-menu.json +1 -1
  188. package/dist/stats/subhead.json +1 -1
  189. package/dist/stats/support.json +1 -1
  190. package/dist/stats/table-object.json +1 -1
  191. package/dist/stats/timeline.json +1 -1
  192. package/dist/stats/toasts.json +1 -1
  193. package/dist/stats/tooltips.json +1 -1
  194. package/dist/stats/truncate.json +1 -1
  195. package/dist/stats/utilities.json +1 -1
  196. package/dist/subhead.css +1 -2
  197. package/dist/subhead.css.map +1 -1
  198. package/dist/subhead.js +1 -1
  199. package/dist/support.css +1 -1
  200. package/dist/support.js +1 -1
  201. package/dist/table-object.css +0 -1
  202. package/dist/table-object.css.map +1 -1
  203. package/dist/table-object.js +1 -1
  204. package/dist/timeline.css +1 -2
  205. package/dist/timeline.css.map +1 -1
  206. package/dist/timeline.js +1 -1
  207. package/dist/toasts.css +1 -2
  208. package/dist/toasts.css.map +1 -1
  209. package/dist/toasts.js +1 -1
  210. package/dist/tooltips.css +1 -2
  211. package/dist/tooltips.css.map +1 -1
  212. package/dist/tooltips.js +1 -1
  213. package/dist/truncate.css +1 -2
  214. package/dist/truncate.css.map +1 -1
  215. package/dist/truncate.js +1 -1
  216. package/dist/utilities.css +1 -2
  217. package/dist/utilities.css.map +1 -1
  218. package/dist/utilities.js +1 -1
  219. package/dist/variables.json +630 -2274
  220. package/dropdown/README.md +1 -1
  221. package/dropdown/dropdown.scss +32 -88
  222. package/dropdown/index.scss +2 -2
  223. package/forms/README.md +1 -1
  224. package/forms/form-control.scss +39 -57
  225. package/forms/form-group.scss +31 -48
  226. package/forms/form-select.scss +12 -4
  227. package/forms/form-validation.scss +27 -32
  228. package/forms/index.scss +7 -7
  229. package/forms/input-group.scss +7 -0
  230. package/forms/radio-group.scss +22 -3
  231. package/header/README.md +1 -1
  232. package/header/header.scss +16 -6
  233. package/header/index.scss +2 -2
  234. package/index.scss +4 -1
  235. package/labels/README.md +1 -1
  236. package/labels/counters.scss +10 -11
  237. package/labels/diffstat.scss +8 -8
  238. package/labels/index.scss +7 -7
  239. package/labels/labels.scss +30 -41
  240. package/labels/states.scss +17 -16
  241. package/layout/README.md +1 -1
  242. package/layout/grid-offset.scss +11 -11
  243. package/layout/grid.scss +23 -23
  244. package/layout/index.scss +7 -4
  245. package/layout/layout.scss +185 -0
  246. package/layout/mixins.scss +79 -0
  247. package/{README.template.md → links/README.md} +5 -5
  248. package/links/index.scss +3 -0
  249. package/links/link.scss +55 -0
  250. package/loaders/README.md +1 -1
  251. package/loaders/index.scss +2 -2
  252. package/loaders/loaders.scss +1 -1
  253. package/markdown/README.md +1 -1
  254. package/markdown/blob-csv.scss +2 -2
  255. package/markdown/code.scss +7 -5
  256. package/markdown/footnotes.scss +37 -0
  257. package/markdown/headings.scss +6 -4
  258. package/markdown/images.scss +3 -4
  259. package/markdown/index.scss +9 -8
  260. package/markdown/lists.scss +18 -5
  261. package/markdown/markdown-body.scss +14 -9
  262. package/markdown/tables.scss +7 -7
  263. package/marketing/README.md +1 -1
  264. package/marketing/buttons/button.scss +81 -75
  265. package/marketing/index.scss +4 -4
  266. package/marketing/support/index.scss +1 -0
  267. package/marketing/support/mixins.scss +66 -0
  268. package/marketing/support/variables.scss +109 -58
  269. package/marketing/type/typography.scss +100 -62
  270. package/marketing/utilities/animations.scss +9 -0
  271. package/marketing/utilities/index.scss +2 -3
  272. package/marketing/utilities/layout.scss +31 -10
  273. package/navigation/README.md +1 -1
  274. package/navigation/filter-list.scss +8 -9
  275. package/navigation/index.scss +7 -7
  276. package/navigation/menu.scss +22 -23
  277. package/navigation/sidenav.scss +19 -25
  278. package/navigation/subnav.scss +9 -13
  279. package/navigation/tabnav.scss +20 -10
  280. package/navigation/underline-nav.scss +19 -14
  281. package/package.json +75 -63
  282. package/pagination/README.md +1 -1
  283. package/pagination/index.scss +2 -2
  284. package/pagination/pagination.scss +8 -8
  285. package/popover/README.md +1 -1
  286. package/popover/index.scss +2 -2
  287. package/popover/popover.scss +14 -13
  288. package/postcss.config.cjs +22 -0
  289. package/prettier.config.cjs +1 -0
  290. package/product/README.md +1 -1
  291. package/product/index.scss +17 -17
  292. package/progress/README.md +1 -1
  293. package/progress/index.scss +2 -2
  294. package/progress/progress.scss +3 -4
  295. package/select-menu/README.md +1 -1
  296. package/select-menu/index.scss +2 -2
  297. package/select-menu/select-menu.scss +44 -46
  298. package/{stylelint.config.js → stylelint.config.cjs} +5 -6
  299. package/subhead/README.md +1 -1
  300. package/subhead/index.scss +2 -2
  301. package/subhead/subhead.scss +9 -3
  302. package/support/README.md +1 -1
  303. package/support/index.scss +7 -8
  304. package/support/mixins/color-modes.scss +106 -0
  305. package/support/mixins/misc.scss +19 -13
  306. package/support/variables/layout.scss +68 -9
  307. package/support/variables/misc.scss +2 -27
  308. package/support/variables/typography.scss +2 -1
  309. package/table-object/README.md +1 -1
  310. package/table-object/index.scss +1 -1
  311. package/timeline/README.md +1 -1
  312. package/timeline/index.scss +2 -2
  313. package/timeline/timeline-item.scss +18 -18
  314. package/toasts/README.md +1 -1
  315. package/toasts/index.scss +2 -2
  316. package/toasts/toasts.scss +45 -24
  317. package/tooltips/README.md +1 -1
  318. package/tooltips/index.scss +2 -2
  319. package/tooltips/tooltips.scss +8 -12
  320. package/truncate/README.md +1 -1
  321. package/truncate/index.scss +2 -1
  322. package/truncate/truncate.scss +30 -0
  323. package/utilities/README.md +1 -1
  324. package/utilities/animations.scss +14 -1
  325. package/utilities/borders.scss +5 -50
  326. package/utilities/box-shadow.scss +8 -8
  327. package/utilities/colors.scss +71 -107
  328. package/utilities/details.scss +18 -6
  329. package/utilities/flexbox.scss +4 -3
  330. package/utilities/index.scss +12 -12
  331. package/utilities/layout.scss +23 -14
  332. package/utilities/margin.scss +34 -16
  333. package/utilities/padding.scss +13 -8
  334. package/utilities/typography.scss +5 -15
  335. package/.browserslistrc +0 -6
  336. package/.eslintrc.json +0 -13
  337. package/.nowignore +0 -5
  338. package/MIGRATING.md +0 -74
  339. package/bin/primer-migrate +0 -86
  340. package/dist/marketing-support.css.map +0 -1
  341. package/dist/support.css.map +0 -1
  342. package/fonts/Inter-Bold.woff +0 -0
  343. package/fonts/Inter-Medium.woff +0 -0
  344. package/fonts/Inter-Regular.woff +0 -0
  345. package/marketing/utilities/margin.scss +0 -17
  346. package/marketing/utilities/padding.scss +0 -24
  347. package/postcss.config.js +0 -14
  348. package/prettier.config.js +0 -1
  349. package/release.config.js +0 -4
  350. package/support/mixins/buttons.scss +0 -172
  351. package/support/variables/color-system.scss +0 -243
  352. package/support/variables/colors.scss +0 -55
@@ -0,0 +1,85 @@
1
+ ## Contributing
2
+
3
+ Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
4
+
5
+ ## Using the issue tracker
6
+
7
+ The issue tracker is the preferred channel for [bug reports](#bug-reports), [features requests](#feature-requests) and [submitting pull requests](#pull-requests), but please respect the following restrictions:
8
+
9
+ * Please **do not** use the issue tracker for personal support requests.
10
+ * Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others.
11
+
12
+ ## Bug reports
13
+
14
+ A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful, so thanks!
15
+
16
+ Guidelines for bug reports:
17
+
18
+ 1. **Validate and lint your code** — [validate your HTML](http://html5.validator.nu) to ensure your problem isn't caused by a simple error in your own code.
19
+
20
+ 2. **Use the GitHub issue search** — check if the issue has already been reported.
21
+
22
+ 3. **Check if the issue has been fixed** — try to reproduce it using the latest `main` branch in the repository.
23
+
24
+ 4. **Isolate the problem** — ideally create a [reduced test case](https://css-tricks.com/reduced-test-cases/) and a live example.
25
+
26
+ A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and OS experience the problem? Do other browsers show the bug differently? What would you expect to be the outcome? All these details will help people to fix any potential bugs.
27
+
28
+ Example:
29
+
30
+ > Short and descriptive example bug report title
31
+ >
32
+ > A summary of the issue and the browser/OS environment in which it occurs. If
33
+ > suitable, include the steps required to reproduce the bug.
34
+ >
35
+ > 1. This is the first step
36
+ > 2. This is the second step
37
+ > 3. Further steps, etc.
38
+ >
39
+ > `<url>` - a link to the reduced test case
40
+ >
41
+ > Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, and potential solutions (and your opinions on their merits).
42
+
43
+ ## Feature requests
44
+
45
+ Feature requests are welcome, but take a moment to find out whether your idea fits with the scope and aims of the project. It's up to *you* to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible.
46
+
47
+ ## Pull requests
48
+
49
+ Good pull requests—patches, improvements, new features—are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.
50
+
51
+ **Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
52
+
53
+ ### Updating Primer CSS
54
+
55
+ Anyone can open a pull request on Primer CSS. You do not need to work at GitHub or be a member of the org to open a pull request.
56
+
57
+ 1. Fork and clone [this repository](https://github.com/primer/css).
58
+ 2. Configure and install the dependencies: `npm install`
59
+ 3. Create a new branch from main `git checkout -b my-branch-name`
60
+ 4. Make your changes and commit them.
61
+ 5. Push your branch and open a pull request. Add a comment describing your proposed changes and request a review from `@primer/css-reviewers`.
62
+ 6. Wait for CI tests to finish.
63
+ - If the tests pass, you should see a status check telling you which alpha version of `@primer/css` you can install with npm to test your work in other projects.
64
+ - If the tests fail, review the logs and address any issues.
65
+ - If the builds fail for any other reason (as they occasionally do), they may need to be manually restarted.
66
+ 7. When CI tests pass, a new npm alpha release will be posted under the CI checks, you can use this npm version for testing in your project or with a GitHub site if you are staff.
67
+ 8. Pat yourself on the back and wait for your pull request to be reviewed.
68
+
69
+ Here are a few things you can do that will increase the likelihood of your pull request being accepted:
70
+
71
+ - Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
72
+ - Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
73
+
74
+ ## Releasing a new Primer CSS version
75
+ See [RELEASING.md](RELEASING.md) for our release process.
76
+
77
+ ## Resources
78
+
79
+ - [Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/)
80
+ - [Using Pull Requests](https://help.github.com/articles/using-pull-requests/)
81
+ - [GitHub Help](https://help.github.com)
82
+
83
+ [fork]: https://github.com/primer/css/fork
84
+ [pr]: https://github.com/primer/css/compare
85
+ [style]: https://primer.style/css/principles
package/DEVELOP.md CHANGED
@@ -22,16 +22,6 @@ Here's what you need to know about how the files are structured in both git and
22
22
  * All bundle interdependencies within Primer CSS are defined as relative imports (e.g. with `../`), so everything should work fine as long as the `@primer/css` directory is in one of your Sass include paths (i.e. `node_modules`).
23
23
 
24
24
 
25
- ## Workflow
26
- The typical Primer workflow looks something like this:
27
-
28
- 1. `npm install` to install the development dependencies.
29
- 1. [Start Storybook](#storybook)
30
- 1. Navigate to the module you're working on and modify the SCSS and/or markdown files.
31
- 1. Test your changes in Storybook.
32
- 1. Push your work to a new branch.
33
- 1. Request a review from one of the Primer "core" team members.
34
-
35
25
  ## Install
36
26
  Run `npm install` to install the npm dependencies.
37
27
 
@@ -45,53 +35,28 @@ npm start
45
35
  Then visit http://localhost:8000 to view the site.
46
36
 
47
37
  ### The docs directory
48
- The [docs directory](./docs/) contains all of the documentation files in our docs site. Files are nested in the `/content` folder.
49
-
50
-
51
- ### URL tests
52
- We have a script that catches inadvertent URL changes caused by renaming or deleting Markdown docs:
53
-
54
- ```sh
55
- npm run test-urls
56
- ```
38
+ The [docs directory](../docs/) contains all of the documentation files in our docs site. Files are nested in the `/content` folder.
57
39
 
58
- This script includes some exceptions for URLs that have been intentionally moved or removed in the process of moving away from the [GitHub Style Guide](https://styleguide.github.com/primer/), and which you will need to modify if you rename or remove either Markdown docs or their `path` frontmatter. See [#641](https://github.com/primer/css/pull/641) for more information.
59
-
60
- ## Storybook
61
- To borrow a [metaphor from Brad Frost](http://bradfrost.com/blog/post/the-workshop-and-the-storefront/), the [docs site](#docs-site) is Primer CSS's storefront, and [Storybook] is its workshop.
62
-
63
- Our Storybook setup allows you to view every HTML code block in Primer CSS's Markdown docs in isolation. To get started, run the Storybook server with:
64
-
65
- ```sh
66
- npm run start-storybook
67
- ```
68
-
69
- This should open up the site in your browser (if not, navigate to `http://localhost:8001`).
70
40
 
71
41
  ### Code blocks
72
42
  All `html` fenced code blocks in `src/**/*.md` will be rendered as stories and listed under the relevant module's name in the left-hand nav. File changes should trigger a live reload automatically (after a brief delay).
73
43
 
74
-
75
44
  ## Scripts
76
45
  Our [`package.json`](package.json) houses a collection of [run-scripts] that we use to maintain, test, build, and publish Primer CSS. Run `npm run <script>` with any of the following values for `<script>`:
77
46
 
78
- * `fresh` does a "fresh" npm install (like `npm install -f`)
79
47
  * `dist` runs `script/dist`, which creates CSS bundles of all the `index.scss` files in `src/`.
80
48
  * `check-links` runs a link checker on your local development server (`localhost:3000`, started with `npm start`).
81
- * `lint` lints both our SCSS and JavaScript source files.
82
- * `lint-css` lints our SCSS source files.
83
- * `lint-js` lints the JavaScript source files.
49
+ * `stylelint` lints the CSS source files.
50
+ * `eslint` lints the JavaScript source files.
84
51
  * `now-build` and `now-start` are run on [Now] to build and start the docs site server. `now-test` runs them both in order.
85
52
  * `start` runs the documentation site locally (alias: `dev`).
86
- * `test-urls` compares a (pre-generated) list of paths from the **deprecated** [Primer Style Guide](https://styleguide.github.com/primer/) to files in `pages/css`, and lets us know if we've inadvertently deleted or renamed anything.
87
- * `test-migrate` tests the [`primer-migrate`](MIGRATING.md#primer-migrate) command line utility.
53
+ * `test` runs our test suite.
88
54
 
89
55
  The above list may not always be up-to-date. You can list all of the available scripts by calling `npm run` with no other arguments.
90
56
 
91
57
 
92
58
  [@primer/css]: https://www.npmjs.com/package/@primer/css
93
59
  [run-scripts]: https://docs.npmjs.com/cli/run-script
94
- [storybook]: https://storybook.js.org/
95
60
  [now]: https://zeit.co/now
96
61
  [npm]: https://www.npmjs.com/
97
62
  [npx]: https://www.npmjs.com/package/npx
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018 GitHub Inc.
3
+ Copyright (c) 2021 GitHub Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img width="300px" src="./static/readme.png">
2
+ <img width="300px" src="./docs/src/readme.png">
3
3
  </p>
4
4
 
5
5
  <h1 align="center">Primer CSS</h1>
@@ -10,28 +10,29 @@
10
10
  <a aria-label="npm package" href="https://www.npmjs.com/package/@primer/css">
11
11
  <img alt="" src="https://img.shields.io/npm/v/@primer/css.svg">
12
12
  </a>
13
+ <a aria-label="build status" href="https://github.com/primer/css/actions/workflows/ci.yml">
14
+ <img alt="" src="https://github.com/primer/css/actions/workflows/ci.yml/badge.svg">
15
+ </a>
13
16
  <a aria-label="contributors graph" href="https://github.com/primer/css/graphs/contributors">
14
17
  <img src="https://img.shields.io/github/contributors/primer/css.svg">
15
18
  </a>
16
- <a aria-label="last commit" href="https://github.com/primer/css/commits/master">
19
+ <a aria-label="last commit" href="https://github.com/primer/css/commits/main">
17
20
  <img alt="" src="https://img.shields.io/github/last-commit/primer/css.svg">
18
21
  </a>
19
- <a aria-label="join us in spectrum" href="https://spectrum.chat/primer">
20
- <img alt="" src="https://withspectrum.github.io/badge/badge.svg">
21
- </a>
22
- <a aria-label="license" href="https://github.com/primer/css/blob/master/LICENSE">
22
+ <a aria-label="license" href="https://github.com/primer/css/blob/main/LICENSE">
23
23
  <img src="https://img.shields.io/github/license/primer/css.svg" alt="">
24
24
  </a>
25
25
  </p>
26
26
 
27
- ## Migrating
28
- :rotating_light: **If you currently use the `primer` or `primer-`-prefixed npm packages, please read [the migration guide](MIGRATING.md)!**
27
+ ## Documentation
28
+
29
+ Our documentation site lives at [primer.style/css](https://primer.style/css). You'll be able to find detailed documentation on getting started, all of the components, our theme, our principles, and more.
29
30
 
30
31
  ## Install
31
32
  This repository is distributed with [npm]. After [installing npm][install-npm], you can install `@primer/css` with this command:
32
33
 
33
34
  ```sh
34
- $ npm install --save @primer/css
35
+ npm install --save @primer/css
35
36
  ```
36
37
 
37
38
  ## Usage
@@ -50,13 +51,10 @@ You can import individual Primer modules directly from the `@primer/css` package
50
51
  ```
51
52
 
52
53
  ## Development
53
- See [DEVELOP.md](./DEVELOP.md) for development docs.
54
+ See [DEVELOP.md](DEVELOP.md) for development docs.
54
55
 
55
56
  ## Releasing (for GitHub staff)
56
- You can find docs about our release process in [RELEASING.md](./RELEASING.md).
57
-
58
- ## Documentation
59
- The [Primer CSS docs site](https://primer.style/css) is deployed from this repo with [primer/deploy](https://github.com/primer/deploy). See [the development docs](DEVELOP.md#docs-site) for more info.
57
+ You can find docs about our release process in [RELEASING.md](RELEASING.md).
60
58
 
61
59
  ## License
62
60
 
@@ -65,5 +63,5 @@ The [Primer CSS docs site](https://primer.style/css) is deployed from this repo
65
63
 
66
64
  [install-npm]: https://docs.npmjs.com/getting-started/installing-node
67
65
  [npm]: https://www.npmjs.com/
68
- [primer]: https://primer.style
66
+ [primer]: https://primer.style/
69
67
  [sass]: http://sass-lang.com/
package/RELEASING.md CHANGED
@@ -2,66 +2,9 @@
2
2
 
3
3
  ## Prepare the release (in `primer/css`)
4
4
 
5
- 1. Decide which [PRs](https://github.com/primer/css/pulls) should be part of the next release and if it will be a major, minor or patch `<version>`. You may also check the [release tracking project
6
- ](https://github.com/primer/css/projects/2#column-4482699) or ask your team members in Slack.
7
-
8
- 1. Create a new release branch from `master` and name it `release-<version>`.
9
-
10
- 1. Run [`npm version <version>`](https://docs.npmjs.com/cli/version) to update the `version` field in both `package.json` and `package-lock.json`.
11
-
12
- 1. Create a new PR for the `release-<version>` branch. Please use the following template for the PR description, linking to the relevant issues and/or pull requests for each change. The changelog gets generated automatically :
13
-
14
- ```md
15
- # Primer CSS [Major|Minor|Patch] Release
16
-
17
- Version: 📦 **`0.0.0`**
18
- Approximate release date: 📆 **DD/MM/YY**
19
- Changes: 🎉 [All merged PRs](https://github.com/primer/css/pulls?q=is%3Apr+is%3Amerged+base%3Arelease-0.0.0)
20
-
21
- ---
22
-
23
- ### :boom: Breaking Change
24
- - [ ] Description #
25
-
26
- ### :rocket: Enhancement
27
- - [ ] Description #
28
-
29
- ### :bug: Bug Fix
30
- - [ ] Description #
31
-
32
- ### :nail_care: Polish
33
- - [ ] Description #
34
-
35
- ### :memo: Documentation
36
- - [ ] Description #
37
-
38
- ### :house: Internal
39
- - [ ] Description #
40
-
41
- ---
42
-
43
- ### Ship checklist
44
-
45
- - [x] Update the `version` field in `package.json`
46
- - [ ] Update `CHANGELOG.md`
47
- - [ ] Test the release candidate version with `github/github`
48
- - [ ] Merge this PR and [create a new release](https://github.com/primer/css/releases/new)
49
- - [ ] Update `github/github`
50
- - [ ] Tell the world (Slack, Twitter, Team post)
51
-
52
- For more details, see [RELEASING.md](https://github.com/primer/css/blob/master/RELEASING.md).
53
-
54
- /cc @primer/ds-core
55
- ```
56
-
57
- 1. Start merging existing PRs into the release branch. Note: You have to change the base branch from `master` to the `release-<version>` branch before merging.
58
-
59
- 1. Update `CHANGELOG.md` and the PR description. **Tip**: You can copy&paste the changelog from `Checks > changelog > all > changelog`. It gets generated based on adding the `Tag` labels to PRs.
60
-
61
- 1. Wait for your checks to pass, and take note of the version that [primer/publish] lists in your status checks.
62
-
63
- **Tip**: The release candidate version will always be `<version>-rc.<sha>`, where `<version>` comes from the branch name and `<sha>` is the 7-character commit SHA.
5
+ The release process is automated by [changesets]. After you familiarize yourself with how they work. We use an [action workflow integrated in ci](https://github.com/atlassian/changesets#integrating-with-ci).
64
6
 
7
+ 1. Visit the pull requests page and find the [latest Release tracking pr from primer-css](https://github.com/primer/css/pulls/primer-css). If there isn't one, we'll need to build the next release by merging in PRs with changeset files.
65
8
 
66
9
  ## Test the release candidate (in `github/github`):
67
10
 
@@ -86,13 +29,9 @@
86
29
 
87
30
  1. If the release PR got approved and you've done necessary testing, merge it.
88
31
 
89
- After tests run, the docs site will be deployed and `@primer/css` will be published with your changes to the `latest` dist-tag. You can check [npm](https://www.npmjs.com/package/@primer/css?activeTab=versions) to see if [primer/publish] has finished.
90
-
91
- 1. [Create a new release](https://github.com/primer/primer/releases/new) with tag `v<version>`.
32
+ After tests run, the docs site will be deployed and `@primer/css` will be published with your changes to the `latest` dist-tag. You can check [npm](https://www.npmjs.com/package/@primer/css?activeTab=versions) to see if actions has finished.
92
33
 
93
- 1. Copy the changes from the [CHANGELOG] and paste them into the release notes.
94
-
95
- 1. Publish 🎉
34
+ 2. done 🎉
96
35
 
97
36
 
98
37
  ## Update github.com (in `github/github`):
@@ -109,15 +48,5 @@
109
48
 
110
49
  1. Deploy! :rocket:
111
50
 
112
-
113
- ### Publish the release
114
-
115
- 1. [Create a new release](https://github.com/primer/css/releases/new) with tag `v<version>`.
116
-
117
- 2. Copy the changes from the [CHANGELOG] and paste them into the release notes.
118
-
119
- 3. Publish 🎉
120
-
121
-
122
51
  [changelog]: ../CHANGELOG.md
123
- [primer/publish]: https://github.com/primer/publish
52
+ [changesets]: https://github.com/atlassian/changesets
@@ -0,0 +1,42 @@
1
+ // emtpy divider
2
+
3
+ .ActionList-sectionDivider {
4
+ // has children
5
+ &:not(:empty) {
6
+ display: flex;
7
+ // stylelint-disable-next-line primer/spacing
8
+ padding: ($spacer-1 * 1.5) $spacer-2;
9
+ font-size: $font-size-small;
10
+ font-weight: $font-weight-bold;
11
+ color: var(--color-fg-muted);
12
+ flex-direction: column;
13
+ }
14
+
15
+ // no children
16
+ &:empty {
17
+ height: 1px;
18
+ padding: 0;
19
+ // stylelint-disable-next-line primer/spacing
20
+ margin: ($spacer-2 - 1px) ($spacer-2 * -1) $spacer-2;
21
+ list-style: none;
22
+ background: var(--color-action-list-item-inline-divider);
23
+ border: 0;
24
+ }
25
+ }
26
+
27
+ .ActionList-sectionDivider--filled {
28
+ margin: $spacer-2 ($spacer-2 * -1);
29
+ background: var(--color-canvas-subtle);
30
+ border-top: $border-width $border-style var(--color-action-list-item-inline-divider);
31
+ border-bottom: $border-width $border-style var(--color-action-list-item-inline-divider);
32
+
33
+ // if no children, treat as divider
34
+ &:empty {
35
+ height: $spacer-2;
36
+ box-sizing: border-box;
37
+ }
38
+
39
+ &:first-child {
40
+ margin-top: 0;
41
+ }
42
+ }