1
1
mirror of https://github.com/primer/css.git synced 2024-11-23 03:10:10 +03:00

Merge pull request #492 from primer/release-10.6.0

10.6.0 Release Tracking PR
This commit is contained in:
Jon Rohan 2018-06-14 08:42:23 -07:00 committed by GitHub
commit 0a11a2d7ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
101 changed files with 44230 additions and 190 deletions

1
.gitignore vendored
View File

@ -1,7 +1,6 @@
.DS_Store
.sass-cache
node_modules
**/package-lock.json
*.log
build
_site

2
.npmrc Normal file
View File

@ -0,0 +1,2 @@
save=true
save-exact=true

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
8

View File

@ -1,3 +1,22 @@
# 10.6.0
#### :bug: Bug Fix
* [#491](https://github.com/primer/primer/pull/491) Add `backface-visibility` to `.hover-grow`. ([@brandonrosage](https://github.com/brandonrosage))
#### :memo: Documentation
* [#490](https://github.com/primer/primer/pull/490) Add release documentation. ([@emplums](https://github.com/emplums))
#### :house: Internal
* [#475](https://github.com/primer/primer/pull/475) Import primer-module-build to the monorepo. ([@shawnbot](https://github.com/shawnbot))
* [#479](https://github.com/primer/primer/pull/479) Add "scoreboard" test suite. ([@shawnbot](https://github.com/shawnbot))
#### Committers: 4
- Brandon Rosage ([brandonrosage](https://github.com/brandonrosage))
- Emily ([emplums](https://github.com/emplums))
- Shawn Allen ([shawnbot](https://github.com/shawnbot))
- [muan](https://github.com/muan)
# 10.5.0
#### :rocket: Enhancement

View File

@ -61,6 +61,10 @@ For a compiled **CSS** version of this module, an npm script is included that wi
$ npm run build
```
## Releasing (Staff only)
You can find docs about our release process in [RELEASING.md](./RELEASING.md).
## Documentation
You can read more about primer in the [docs][docs].

68
RELEASING.md Normal file
View File

@ -0,0 +1,68 @@
## Releasing a new Primer version 🎉
### In `primer/primer`:
1. Create a new release branch from `dev` and name it `release-<version>`.
(CI will publish a release candidate version to npm for branches prefixed with `release`. These version numbers have a `rc.<number>` suffix on them)
2. Go through the tracking issue and make sure everything that should be merged in is merged in.
3. Once your builds finish, click on the details links for the continuous-integration/travis-ci/push build. Expand the `Deploying application` output and you should be able to find an outputted change log here. Copy this and update the [CHANGELOG.md](https://github.com/primer/primer/blob/master/CHANGELOG.md) file.
4. Run the version bump in your terminal: `npm run bump`.
5. Test your changes with the latest release candidate version in the appropriate places (styleguide, storybook, github/github).
6. Once the release PR is approved and you've done necessary testing, merge to `master`. This will trigger a publish to npm.
### In `github/github`:
1. Create a new branch
2. Update the primer version in your terminal `npm install primer@<version>`.
3. Update `stylelint-config-primer` in your terminal to the appropriate version `npm install stylelint-config-primer@latest`.
4. If you need to make changes to github/github due to the Primer release, make a separate branch. When ready, merge that branch into your release branch.
5. Add reviewers.
6. Check that every deleted vendor file has an accompanying updated vendor file and that the version numbers look correct.
7. Test on review-lab.
8. When ready, merge! 🎉
## Other items that need to be done after publishing Primer
#### Update the Style Guide
1. In [github/styleguide](https://github.com/github/styleguide), update `primer` to your newly released version in your terminal:
`npm install primer@latest`
2. Then run: `script/update-primer-docs`.
3. Commit changes, make PR, get it approved, merge! 🚀
#### Update [primer.github.io](primer.github.io)
1. Edit [index.html](https://github.com/primer/primer.github.io/blob/master/index.html) to include the latest version.
#### Update Storybook
1. Pull the latest from master on primer/primer (after merging in release branch).
2. Run `npm run publish-storybook`.
#### Publish release tag
1. Create a new release tag [here](https://github.com/primer/primer/releases/new).
2. Copy the changes from the [CHANGELOG](https://github.com/primer/primer/blob/master/CHANGELOG.md) and paste it into the release notes.
3. Publish 🎉

96
meta/scoreboard/index.js Normal file
View File

@ -0,0 +1,96 @@
const {basename, join, resolve} = require('path')
const PromiseQueue = require('p-queue')
const execa = require('execa')
const globby = require('globby')
const rootDir = resolve(__dirname, '../..')
const lernaConfig = require(join(rootDir, 'lerna.json'))
const modulesDir = join(rootDir, 'modules')
require('console.table')
const unique = list => Array.from(new Set(list)).sort()
const matchAll = (pattern, text) => {
const matches = []
let match
while (match = pattern.exec(text)) {
matches.push(match)
}
return matches
}
const checks = {
'has stories': (module, key) => {
return globby(join(module.path, '**/stories.js'))
.then(files => ({
[key]: files.length > 0 ? 'yes' : 'no'
}))
},
'docs test': (module, key) => {
return execa(join(rootDir, 'script/test-docs'), {
cwd: module.path
})
.then(result => ({[key]: 'pass'}))
.catch(({stderr}) => {
const pattern = /("\.[-\w]+") is not documented/g
const matches = matchAll(pattern, stderr)
.map(match => match[1])
let missing = matches ? Array.from(matches) : []
const max = 5
if (missing.length > max) {
const more = missing.length - max
missing = missing.slice(0, max).concat(`and ${more} more...`)
}
return {
[key]: 'FAIL',
'missing docs': unique(missing).join(', ')
}
})
}
}
const args = process.argv.slice(2)
const modules = args.length
? Promise.resolve(args)
: globby(join(modulesDir, 'primer-*'))
modules
.then(moduleDirs => {
console.log('Found %d module directories', moduleDirs.length)
return moduleDirs
.map(path => ({
path,
name: basename(path),
pkg: require(join(path, 'package.json'))
}))
.filter(({pkg}) => pkg.primer.module_type !== 'meta')
})
.then(modules => {
console.log('Filtered to %d modules (excluding meta-packages)', modules.length)
const queue = new PromiseQueue({concurrency: 3})
for (const module of modules) {
module.checks = {}
for (const [name, check] of Object.entries(checks)) {
queue.add(() => {
// console.warn(`? check: ${module.name} ${name}`)
return check(module, name)
.then(result => {
Object.assign(module.checks, result)
})
})
}
}
console.warn(`Running ${queue.size} checks...`)
return queue.onIdle().then(() => modules)
})
.then(modules => {
console.warn('ran tests on %d modules', modules.length)
const rows = modules.map(({name, checks}) => {
return Object.assign({'package': name}, checks)
})
console.table(rows)
})

View File

@ -0,0 +1,13 @@
{
"private": true,
"name": "primer-scorecard",
"scripts": {
"test": "node index.js"
},
"devDependencies": {
"console.table": "^0.10.0",
"execa": "^0.10.0",
"globby": "^6.1.0",
"p-queue": "^2.4.2"
}
}

View File

@ -72,6 +72,7 @@
border-radius: 0;
}
// FIXME deprecate this
.warning {
padding: $em-spacer-5;
margin-bottom: 0.8em;

11
modules/primer-alerts/package-lock.json generated Normal file
View File

@ -0,0 +1,11 @@
{
"name": "primer-alerts",
"version": "1.5.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.5.6",
"version": "1.5.7",
"name": "primer-alerts",
"description": "Flash messages, or alerts, inform users of successful or pending actions.",
"homepage": "http://primer.github.io/",
@ -10,7 +10,10 @@
"main": "build/index.js",
"primer": {
"category": "product",
"module_type": "components"
"module_type": "components",
"class_whitelist": [
"warning"
]
},
"files": [
"index.scss",
@ -28,7 +31,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"alerts",

11
modules/primer-avatars/package-lock.json generated Normal file
View File

@ -0,0 +1,11 @@
{
"name": "primer-avatars",
"version": "1.5.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.5.3",
"version": "1.5.4",
"name": "primer-avatars",
"description": "Basic styles for user profile avatars.",
"homepage": "http://primer.github.io/",
@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"avatars",

11
modules/primer-base/package-lock.json generated Normal file
View File

@ -0,0 +1,11 @@
{
"name": "primer-base",
"version": "1.7.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.7.1",
"version": "1.7.2",
"name": "primer-base",
"description": "CSS to reset the browsers default styles",
"homepage": "http://primer.github.io/",
@ -10,7 +10,11 @@
"main": "build/index.js",
"primer": {
"category": "core",
"module_type": "support"
"module_type": "support",
"class_whitelist": [
"octicon",
"rule"
]
},
"files": [
"index.scss",
@ -28,7 +32,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"primer",

View File

@ -0,0 +1,11 @@
{
"name": "primer-blankslate",
"version": "1.4.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.4.6",
"version": "1.4.7",
"name": "primer-blankslate",
"description": "Blankslates are for when there is a lack of content within a page or section.",
"homepage": "http://primer.github.io/",
@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"primer",

11
modules/primer-box/package-lock.json generated Normal file
View File

@ -0,0 +1,11 @@
{
"name": "primer-box",
"version": "2.5.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "2.5.6",
"version": "2.5.7",
"name": "primer-box",
"description": "A module for creating rounded-corner boxes with options for headers, lists, and footers.",
"homepage": "http://primer.github.io/",
@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"primer",

View File

@ -0,0 +1,11 @@
{
"name": "primer-branch-name",
"version": "1.0.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.0.4",
"version": "1.0.5",
"name": "primer-branch-name",
"description": "A nice, consistent way to display branch names.",
"homepage": "http://primer.github.io/",
@ -29,7 +29,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"github",

View File

@ -0,0 +1,11 @@
{
"name": "primer-breadcrumb",
"version": "1.5.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.5.2",
"version": "1.5.3",
"name": "primer-breadcrumb",
"description": "Breadcrumb navigation for pages with parents / grandparents.",
"homepage": "http://primer.github.io/",
@ -29,7 +29,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"breadcrumb",

11
modules/primer-buttons/package-lock.json generated Normal file
View File

@ -0,0 +1,11 @@
{
"name": "primer-buttons",
"version": "2.5.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "2.5.4",
"version": "2.5.5",
"name": "primer-buttons",
"description": "A collection of buttons used for primary and secondary actions.",
"homepage": "http://primer.github.io/",
@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"primer",

155
modules/primer-core/package-lock.json generated Normal file
View File

@ -0,0 +1,155 @@
{
"name": "primer-core",
"version": "6.10.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-base": {
"version": "1.7.2",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-box": {
"version": "2.5.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-breadcrumb": {
"version": "1.5.3",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-buttons": {
"version": "2.5.5",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-forms": {
"version": "2.1.2",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-layout": {
"version": "1.4.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-navigation": {
"version": "1.5.5",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-pagination": {
"version": "1.0.1",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-support": {
"version": "4.5.4"
},
"primer-table-object": {
"version": "1.4.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-tooltips": {
"version": "1.5.5",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-truncate": {
"version": "1.4.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-utilities": {
"version": "4.11.0",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "6.9.0",
"version": "6.10.0",
"name": "primer-core",
"description": "Primer's core modules",
"homepage": "http://primer.github.io/",
@ -27,18 +27,18 @@
"lint": "../../script/lint-scss"
},
"dependencies": {
"primer-base": "1.7.1",
"primer-box": "2.5.6",
"primer-breadcrumb": "1.5.2",
"primer-buttons": "2.5.4",
"primer-forms": "2.1.1",
"primer-layout": "1.4.6",
"primer-navigation": "1.5.4",
"primer-pagination": "1.0.0",
"primer-support": "4.5.3",
"primer-table-object": "1.4.6",
"primer-tooltips": "1.5.4",
"primer-truncate": "1.4.6",
"primer-utilities": "4.10.0"
"primer-base": "1.7.2",
"primer-box": "2.5.7",
"primer-breadcrumb": "1.5.3",
"primer-buttons": "2.5.5",
"primer-forms": "2.1.2",
"primer-layout": "1.4.7",
"primer-navigation": "1.5.5",
"primer-pagination": "1.0.1",
"primer-support": "4.5.4",
"primer-table-object": "1.4.7",
"primer-tooltips": "1.5.5",
"primer-truncate": "1.4.7",
"primer-utilities": "4.11.0"
}
}

11
modules/primer-forms/package-lock.json generated Normal file
View File

@ -0,0 +1,11 @@
{
"name": "primer-forms",
"version": "2.1.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "2.1.1",
"version": "2.1.2",
"name": "primer-forms",
"description": "Style individual form controls and utilize common layouts.",
"homepage": "http://primer.github.io/",
@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"primer",

11
modules/primer-labels/package-lock.json generated Normal file
View File

@ -0,0 +1,11 @@
{
"name": "primer-labels",
"version": "1.5.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.5.6",
"version": "1.5.7",
"name": "primer-labels",
"description": "Labels add metatdata or indicate status of items and navigational elements.",
"homepage": "http://primer.github.io/",
@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"primer",

11
modules/primer-layout/package-lock.json generated Normal file
View File

@ -0,0 +1,11 @@
{
"name": "primer-layout",
"version": "1.4.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.4.6",
"version": "1.4.7",
"name": "primer-layout",
"description": "Containers, rows, and columns for creating page layout.",
"homepage": "http://primer.github.io/",
@ -29,7 +29,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"primer",

View File

@ -0,0 +1,11 @@
{
"name": "primer-markdown",
"version": "3.7.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "3.7.6",
"version": "3.7.7",
"name": "primer-markdown",
"description": "GitHub stylesheets for rendering markdown.",
"homepage": "https://github.com/primer/primer-markdown",
@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"github",

View File

@ -0,0 +1,11 @@
{
"name": "primer-marketing-buttons",
"version": "1.0.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.0.5",
"version": "1.0.6",
"name": "primer-marketing-buttons",
"description": "Buttons for marketing websites at GitHub",
"homepage": "http://primer.github.io/",
@ -29,7 +29,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"peerDependencies": {
"primer-buttons": ">=2.5.0"

View File

@ -0,0 +1,5 @@
{
"name": "primer-marketing-support",
"version": "1.5.2",
"lockfileVersion": 1
}

View File

@ -1,5 +1,5 @@
{
"version": "1.5.1",
"version": "1.5.2",
"name": "primer-marketing-support",
"description": "Sass variables, mixins, and functions for use in our components.",
"homepage": "http://primer.github.io/",

View File

@ -0,0 +1,14 @@
{
"name": "primer-marketing-type",
"version": "1.4.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2"
},
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.4.6",
"version": "1.4.7",
"name": "primer-marketing-type",
"description": "Typography for marketing websites at GitHub",
"homepage": "http://primer.github.io/",
@ -29,8 +29,8 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-marketing-support": "1.5.1",
"primer-support": "4.5.3"
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"keywords": [
"css",

View File

@ -0,0 +1,14 @@
{
"name": "primer-marketing-utilities",
"version": "1.6.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2"
},
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.6.2",
"version": "1.6.3",
"name": "primer-marketing-utilities",
"description": "Marketing specific immutable, atomic CSS classes",
"homepage": "http://primer.github.io/",
@ -10,7 +10,11 @@
"main": "build/index.js",
"primer": {
"category": "marketing",
"module_type": "utilities"
"module_type": "utilities",
"class_whitelist": [
"border-??-*",
"position-??-*"
]
},
"files": [
"index.scss",
@ -29,8 +33,8 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-marketing-support": "1.5.1",
"primer-support": "4.5.3"
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"keywords": [
"primer",

111
modules/primer-marketing/package-lock.json generated Normal file
View File

@ -0,0 +1,111 @@
{
"name": "primer-marketing",
"version": "6.2.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-marketing-buttons": {
"version": "1.0.6",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-marketing-support": {
"version": "1.5.2"
},
"primer-marketing-type": {
"version": "1.4.7",
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-marketing-utilities": {
"version": "1.6.3",
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-page-headers": {
"version": "1.4.7",
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-page-sections": {
"version": "1.4.7",
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-support": {
"version": "4.5.4"
},
"primer-tables": {
"version": "1.4.7",
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "6.2.1",
"version": "6.2.2",
"name": "primer-marketing",
"description": "Primer marketing packages",
"homepage": "http://primer.github.io/",
@ -27,13 +27,13 @@
"lint": "../../script/lint-scss"
},
"dependencies": {
"primer-marketing-buttons": "1.0.5",
"primer-marketing-support": "1.5.1",
"primer-marketing-type": "1.4.6",
"primer-marketing-utilities": "1.6.2",
"primer-page-headers": "1.4.6",
"primer-page-sections": "1.4.6",
"primer-support": "4.5.3",
"primer-tables": "1.4.6"
"primer-marketing-buttons": "1.0.6",
"primer-marketing-support": "1.5.2",
"primer-marketing-type": "1.4.7",
"primer-marketing-utilities": "1.6.3",
"primer-page-headers": "1.4.7",
"primer-page-sections": "1.4.7",
"primer-support": "4.5.4",
"primer-tables": "1.4.7"
}
}

View File

@ -0,0 +1,11 @@
{
"name": "primer-navigation",
"version": "1.5.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.5.4",
"version": "1.5.5",
"name": "primer-navigation",
"description": "Singular purpose and flexible navigation elements.",
"homepage": "http://primer.github.io/",
@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"primer",

View File

@ -0,0 +1,14 @@
{
"name": "primer-page-headers",
"version": "1.4.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2"
},
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.4.6",
"version": "1.4.7",
"name": "primer-page-headers",
"description": "Jumbotrons, heroes, and featured content sections for marketing websites at GitHub.",
"homepage": "http://primer.github.io/",
@ -28,8 +28,8 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-marketing-support": "1.5.1",
"primer-support": "4.5.3"
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"keywords": [
"css",

View File

@ -0,0 +1,14 @@
{
"name": "primer-page-sections",
"version": "1.4.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2"
},
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.4.6",
"version": "1.4.7",
"name": "primer-page-sections",
"description": "Styles to create distinct sections of marketing pages at GitHub.",
"homepage": "http://primer.github.io/",
@ -28,8 +28,8 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-marketing-support": "1.5.1",
"primer-support": "4.5.3"
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"keywords": [
"css",

View File

@ -0,0 +1,11 @@
{
"name": "primer-pagination",
"version": "1.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.0.0",
"version": "1.0.1",
"name": "primer-pagination",
"description": "Pagination component for applying button styles to a connected set of links that go to related pages",
"homepage": "http://primer.github.io/",
@ -24,7 +24,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"github",

11
modules/primer-popover/package-lock.json generated Normal file
View File

@ -0,0 +1,11 @@
{
"name": "primer-popover",
"version": "0.1.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "0.1.0",
"version": "0.1.1",
"name": "primer-popover",
"description": "Popover for suggesting, guiding, and bringing attention to specific UI elements on a page.",
"homepage": "http://primer.github.io/",
@ -24,7 +24,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"peerDependencies": {
"primer-box": ">=2.5.0"

107
modules/primer-product/package-lock.json generated Normal file
View File

@ -0,0 +1,107 @@
{
"name": "primer-product",
"version": "5.6.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-alerts": {
"version": "1.5.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-avatars": {
"version": "1.5.4",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-blankslate": {
"version": "1.4.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-branch-name": {
"version": "1.0.5",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-labels": {
"version": "1.5.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-markdown": {
"version": "3.7.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-popover": {
"version": "0.1.1",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-subhead": {
"version": "1.0.5",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "5.6.3",
"version": "5.6.4",
"name": "primer-product",
"description": "Primer's product modules",
"homepage": "http://primer.github.io/",
@ -27,14 +27,14 @@
"lint": "../../script/lint-scss"
},
"dependencies": {
"primer-alerts": "1.5.6",
"primer-avatars": "1.5.3",
"primer-blankslate": "1.4.6",
"primer-branch-name": "1.0.4",
"primer-labels": "1.5.6",
"primer-markdown": "3.7.6",
"primer-popover": "0.1.0",
"primer-subhead": "1.0.4",
"primer-support": "4.5.3"
"primer-alerts": "1.5.7",
"primer-avatars": "1.5.4",
"primer-blankslate": "1.4.7",
"primer-branch-name": "1.0.5",
"primer-labels": "1.5.7",
"primer-markdown": "3.7.7",
"primer-popover": "0.1.1",
"primer-subhead": "1.0.5",
"primer-support": "4.5.4"
}
}

11
modules/primer-subhead/package-lock.json generated Normal file
View File

@ -0,0 +1,11 @@
{
"name": "primer-subhead",
"version": "1.0.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.0.4",
"version": "1.0.5",
"name": "primer-subhead",
"description": "The Subhead is a simple header with a bottom border. It&#39;s designed to be used on settings and configuration pages.",
"homepage": "http://primer.github.io/",
@ -24,7 +24,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"github",

View File

@ -0,0 +1,5 @@
{
"name": "primer-support",
"version": "4.5.4",
"lockfileVersion": 1
}

View File

@ -1,5 +1,5 @@
{
"version": "4.5.3",
"version": "4.5.4",
"name": "primer-support",
"description": "Sass variables, mixins, and functions for use in our components.",
"homepage": "http://primer.github.io/",

View File

@ -0,0 +1,11 @@
{
"name": "primer-table-object",
"version": "1.4.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.4.6",
"version": "1.4.7",
"name": "primer-table-object",
"description": "A module for creating dynamically resizable elements that always sit on the same horizontal line.",
"homepage": "http://primer.github.io/",
@ -29,7 +29,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"primer",

14
modules/primer-tables/package-lock.json generated Normal file
View File

@ -0,0 +1,14 @@
{
"name": "primer-tables",
"version": "1.4.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2"
},
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.4.6",
"version": "1.4.7",
"name": "primer-tables",
"description": "Styles to display tabular data for marketing websites at GitHub.",
"homepage": "http://primer.github.io/",
@ -28,8 +28,8 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-marketing-support": "1.5.1",
"primer-support": "4.5.3"
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"keywords": [
"css",

View File

@ -0,0 +1,11 @@
{
"name": "primer-tooltips",
"version": "1.5.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.5.4",
"version": "1.5.5",
"name": "primer-tooltips",
"description": "Add tooltips built entirely in CSS to nearly any element.",
"homepage": "http://primer.github.io/",
@ -29,7 +29,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"primer",

View File

@ -0,0 +1,11 @@
{
"name": "primer-truncate",
"version": "1.4.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.4.6",
"version": "1.4.7",
"name": "primer-truncate",
"description": "Shorten text with an ellipsis.",
"homepage": "http://primer.github.io/",
@ -29,7 +29,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"primer",

View File

@ -0,0 +1,30 @@
---
title: Details
status: New release
---
Details classes are created to enhance the native behaviors of `<details>`.
{:toc}
## Fullscreen click area
Use `.details-overlay` to expand the click area of `<summary>` to cover the full screen, so user can click anywhere on a page to close `<details>`.
```html
<details class="details-overlay">
<summary class="btn">More</summary>
<div class="position-relative bg-white p-3 border" style="z-index: 100">Hidden text</div>
</details>
```
## Darkened fullscreen click area
Use `.details-overlay-dark` darken the click area overlay. Useful for modals.
```html
<details class="details-overlay details-overlay-dark">
<summary class="btn">More</summary>
<div class="position-relative bg-white p-3 border" style="z-index: 100">Hidden text</div>
</details>
```

View File

@ -4,6 +4,7 @@
@import "./lib/borders.scss";
@import "./lib/box-shadow.scss";
@import "./lib/colors.scss";
@import "./lib/details.scss";
@import "./lib/flexbox.scss";
@import "./lib/layout.scss";
@import "./lib/margin.scss";

View File

@ -176,6 +176,7 @@
/* Increase scale of an element on hover */
.hover-grow {
transition: transform 0.3s;
backface-visibility: hidden;
&:hover {
transform: scale(1.025);

View File

@ -0,0 +1,17 @@
// stylelint-disable selector-max-type
.details-overlay[open] > summary::before {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 99;
display: block;
cursor: default;
content: " ";
background: transparent;
}
.details-overlay-dark[open] > summary::before {
background: $black-fade-50;
}

View File

@ -0,0 +1,11 @@
{
"name": "primer-utilities",
"version": "4.11.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-support": {
"version": "4.5.4"
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "4.10.0",
"version": "4.11.0",
"name": "primer-utilities",
"description": "Immutable, atomic CSS classes to rapidly build product",
"homepage": "http://primer.github.io/",
@ -29,7 +29,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.5.3"
"primer-support": "4.5.4"
},
"keywords": [
"primer",

View File

@ -0,0 +1,16 @@
import React from 'react'
import { storiesOf } from '@storybook/react'
storiesOf('Details utilities', module)
.add('details-overlay', () => (
<details className='details-overlay'>
<summary className='btn'>More</summary>
<div className='position-relative bg-white p-3 border' style={{zIndex: 100}}>Hidden text</div>
</details>
))
.add('details-overlay-dark', () => (
<details className='details-overlay details-overlay-dark'>
<summary className='btn'>More</summary>
<div className='position-relative bg-white p-3 border' style={{zIndex: 100}}>Hidden text</div>
</details>
))

781
modules/primer/package-lock.json generated Normal file
View File

@ -0,0 +1,781 @@
{
"name": "primer",
"version": "10.6.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"primer-alerts": {
"version": "1.5.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-avatars": {
"version": "1.5.4",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-base": {
"version": "1.7.2",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-blankslate": {
"version": "1.4.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-box": {
"version": "2.5.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-branch-name": {
"version": "1.0.5",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-breadcrumb": {
"version": "1.5.3",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-buttons": {
"version": "2.5.5",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-core": {
"version": "6.10.0",
"requires": {
"primer-base": "1.7.2",
"primer-box": "2.5.7",
"primer-breadcrumb": "1.5.3",
"primer-buttons": "2.5.5",
"primer-forms": "2.1.2",
"primer-layout": "1.4.7",
"primer-navigation": "1.5.5",
"primer-pagination": "1.0.1",
"primer-support": "4.5.4",
"primer-table-object": "1.4.7",
"primer-tooltips": "1.5.5",
"primer-truncate": "1.4.7",
"primer-utilities": "4.11.0"
},
"dependencies": {
"primer-base": {
"version": "1.7.2",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-box": {
"version": "2.5.7",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-breadcrumb": {
"version": "1.5.3",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-buttons": {
"version": "2.5.5",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-forms": {
"version": "2.1.2",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-layout": {
"version": "1.4.7",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-navigation": {
"version": "1.5.5",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-pagination": {
"version": "1.0.1",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-support": {
"version": "4.5.4",
"bundled": true
},
"primer-table-object": {
"version": "1.4.7",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-tooltips": {
"version": "1.5.5",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-truncate": {
"version": "1.4.7",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-utilities": {
"version": "4.11.0",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
}
}
},
"primer-forms": {
"version": "2.1.2",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-labels": {
"version": "1.5.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-layout": {
"version": "1.4.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-markdown": {
"version": "3.7.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-marketing": {
"version": "6.2.2",
"requires": {
"primer-marketing-buttons": "1.0.6",
"primer-marketing-support": "1.5.2",
"primer-marketing-type": "1.4.7",
"primer-marketing-utilities": "1.6.3",
"primer-page-headers": "1.4.7",
"primer-page-sections": "1.4.7",
"primer-support": "4.5.4",
"primer-tables": "1.4.7"
},
"dependencies": {
"primer-marketing-buttons": {
"version": "1.0.6",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-marketing-type": {
"version": "1.4.7",
"bundled": true,
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-marketing-utilities": {
"version": "1.6.3",
"bundled": true,
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-page-headers": {
"version": "1.4.7",
"bundled": true,
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-page-sections": {
"version": "1.4.7",
"bundled": true,
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-support": {
"version": "4.5.4",
"bundled": true
},
"primer-tables": {
"version": "1.4.7",
"bundled": true,
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
}
}
},
"primer-marketing-buttons": {
"version": "1.0.6",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-marketing-support": {
"version": "1.5.2"
},
"primer-marketing-type": {
"version": "1.4.7",
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-marketing-utilities": {
"version": "1.6.3",
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-navigation": {
"version": "1.5.5",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-page-headers": {
"version": "1.4.7",
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-page-sections": {
"version": "1.4.7",
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-pagination": {
"version": "1.0.1",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-popover": {
"version": "0.1.1",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-product": {
"version": "5.6.4",
"requires": {
"primer-alerts": "1.5.7",
"primer-avatars": "1.5.4",
"primer-blankslate": "1.4.7",
"primer-branch-name": "1.0.5",
"primer-labels": "1.5.7",
"primer-markdown": "3.7.7",
"primer-popover": "0.1.1",
"primer-subhead": "1.0.5",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-alerts": {
"version": "1.5.7",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-avatars": {
"version": "1.5.4",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-blankslate": {
"version": "1.4.7",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-branch-name": {
"version": "1.0.5",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-labels": {
"version": "1.5.7",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-markdown": {
"version": "3.7.7",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-popover": {
"version": "0.1.1",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-subhead": {
"version": "1.0.5",
"bundled": true,
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-subhead": {
"version": "1.0.5",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-support": {
"version": "4.5.4"
},
"primer-table-object": {
"version": "1.4.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-tables": {
"version": "1.4.7",
"requires": {
"primer-marketing-support": "1.5.2",
"primer-support": "4.5.4"
},
"dependencies": {
"primer-marketing-support": {
"version": "1.5.2",
"bundled": true
},
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-tooltips": {
"version": "1.5.5",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-truncate": {
"version": "1.4.7",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
},
"primer-utilities": {
"version": "4.11.0",
"requires": {
"primer-support": "4.5.4"
},
"dependencies": {
"primer-support": {
"version": "4.5.4",
"bundled": true
}
}
}
}
}

View File

@ -1,5 +1,5 @@
{
"version": "10.5.0",
"version": "10.6.0",
"name": "primer",
"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.",
"homepage": "http://primer.github.io/",
@ -28,37 +28,37 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-alerts": "1.5.6",
"primer-avatars": "1.5.3",
"primer-base": "1.7.1",
"primer-blankslate": "1.4.6",
"primer-box": "2.5.6",
"primer-branch-name": "1.0.4",
"primer-breadcrumb": "1.5.2",
"primer-buttons": "2.5.4",
"primer-core": "6.9.0",
"primer-forms": "2.1.1",
"primer-labels": "1.5.6",
"primer-layout": "1.4.6",
"primer-markdown": "3.7.6",
"primer-marketing": "6.2.1",
"primer-marketing-buttons": "1.0.5",
"primer-marketing-support": "1.5.1",
"primer-marketing-type": "1.4.6",
"primer-marketing-utilities": "1.6.2",
"primer-navigation": "1.5.4",
"primer-page-headers": "1.4.6",
"primer-page-sections": "1.4.6",
"primer-pagination": "1.0.0",
"primer-popover": "0.1.0",
"primer-product": "5.6.3",
"primer-subhead": "1.0.4",
"primer-support": "4.5.3",
"primer-table-object": "1.4.6",
"primer-tables": "1.4.6",
"primer-tooltips": "1.5.4",
"primer-truncate": "1.4.6",
"primer-utilities": "4.10.0"
"primer-alerts": "1.5.7",
"primer-avatars": "1.5.4",
"primer-base": "1.7.2",
"primer-blankslate": "1.4.7",
"primer-box": "2.5.7",
"primer-branch-name": "1.0.5",
"primer-breadcrumb": "1.5.3",
"primer-buttons": "2.5.5",
"primer-core": "6.10.0",
"primer-forms": "2.1.2",
"primer-labels": "1.5.7",
"primer-layout": "1.4.7",
"primer-markdown": "3.7.7",
"primer-marketing": "6.2.2",
"primer-marketing-buttons": "1.0.6",
"primer-marketing-support": "1.5.2",
"primer-marketing-type": "1.4.7",
"primer-marketing-utilities": "1.6.3",
"primer-navigation": "1.5.5",
"primer-page-headers": "1.4.7",
"primer-page-sections": "1.4.7",
"primer-pagination": "1.0.1",
"primer-popover": "0.1.1",
"primer-product": "5.6.4",
"primer-subhead": "1.0.5",
"primer-support": "4.5.4",
"primer-table-object": "1.4.7",
"primer-tables": "1.4.7",
"primer-tooltips": "1.5.5",
"primer-truncate": "1.4.7",
"primer-utilities": "4.11.0"
},
"keywords": [
"primer",

26042
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -21,15 +21,19 @@
"test-all-modules": "ava --verbose tests/test-*.js"
},
"devDependencies": {
"@storybook/addon-options": "^3.2.6",
"@storybook/react": "^3.2.12",
"primer-module-build": "file:tools/primer-module-build",
"stylelint-config-primer": "^2.2.6",
"@storybook/addon-options": "3.4.3",
"@storybook/addons": "3.4.3",
"@storybook/react": "3.4.3",
"ava": "^0.23.0",
"babel-core": "^6.26.3",
"babel-preset-env": "^1.6.0",
"babel-preset-minify": "^0.2.0",
"babel-preset-react": "^6.24.1",
"commit-status": "^4.1.0",
"css-loader": "^0.28.4",
"execa": "^0.8.0",
"execa": "^0.10.0",
"fs-extra": "^4.0.2",
"gh-pages": "^1.0.0",
"glob": "^7.1.2",
@ -38,12 +42,13 @@
"isomorphic-fetch": "^2.2.1",
"lerna": "2.4.0",
"lerna-changelog": "^0.7.0",
"node-sass": "^4.5.3",
"minimatch": "^3.0.4",
"node-sass": "^4.9.0",
"npm-run-all": "^4.0.2",
"npx": "^10.2.0",
"octicons": "^6.0.1",
"parse-pairs": "^0.2.2",
"postcss-loader": "^2.0.6",
"primer-module-build": "^1.0.2",
"raw-loader": "^0.5.1",
"react": "^15.6.1",
"react-dom": "^15.6.1",
@ -53,7 +58,6 @@
"semver": "^5.3.0",
"style-loader": "^0.18.2",
"stylelint": "^7.13.0",
"stylelint-config-primer": "^2.0.0",
"unist-util-find-before": "^2.0.1",
"unist-util-parents": "^1.0.0",
"unist-util-select": "^1.5.0",

View File

@ -1,3 +1,3 @@
#!/bin/bash
set -e
$(dirname $0)/npm-run stylelint --quiet --syntax scss **/*.scss
npx stylelint --quiet --syntax scss **/*.scss

View File

@ -1,3 +1,3 @@
#!/bin/bash
set -e
$(dirname $0)/npm-run npm-run-all --serial --silent "$@"
npx npm-run-all --serial --silent "$@"

View File

@ -1,3 +1,3 @@
#!/bin/bash
set -e
$(dirname $0)/npm-run ava --verbose $(dirname $0)/../tests/modules/test-document-styles.js
npx ava --verbose $(dirname $0)/../tests/modules/test-document-styles.js "$@"

View File

@ -1,73 +1,95 @@
const test = require("ava")
const css = require(process.cwd())
const fs = require("fs")
const glob = require("glob")
const {join} = require('path')
const fse = require('fs-extra')
const globby = require('globby')
const test = require('ava')
const minimatch = require('minimatch')
let selectors
let classnames
const cwd = process.cwd()
const css = require(cwd)
const pkg = require(join(cwd, 'package.json'))
const unique = list => Array.from(new Set(list)).sort()
/*
* These are the regular expressions that match what we
* expect to be class name instances in the docs.
* Patterns should group the matched class name(s) such that:
*
* ```js
* const [, klass, ] = pattern.exec(content)
* ```
*/
const classPatterns = [
// HTML class attributes
/class="([^"]+)"/ig,
/:class ?=> "([^"]+)"/g,
/class: "([^"]+)"/g,
// assume that ERB helpers generate an element with the same class
/<%= (\w+)\b/g,
]
const whitelistClasses = (pkg.primer ? pkg.primer.class_whitelist || [] : [])
.concat('js*')
const isWhitelisted = klass => {
return whitelistClasses.some(glob => minimatch(klass, glob))
}
// Find unique selectors from the cssstats selector list
function uniqueSelectors(s) {
s = s.map(s => {
function uniqueSelectors(selectors) {
return unique(selectors.map(s => {
// split multi-selectors into last class used .foo .bar .baz
return s.split(" ").pop()
return s.split(' ').pop()
})
.filter(s => {
// remove any selector that aren't just regular classnames eg. ::hover [type]
// only match exact class selectors
return s.match(/^\.[a-z\-_]+$/ig)
})
// return only the unique selectors
return [...new Set(s)]
}))
}
// From the given glob sources array, read the files and return found classnames
function documentedClassnames(sources) {
const classes = []
const files = sources.reduce((acc, pattern) => {
return acc.concat(glob.sync(pattern))
}, [])
files.forEach(file => {
let match = null
const content = fs.readFileSync(file, "utf8")
classPatterns.forEach(pattern => {
// match each pattern against the source
while (match = pattern.exec(content)) {
// get the matched classnames and split by whitespace into classes
const klasses = match[1].trim().split(/\s+/)
classes.push(...klasses)
}
function getDocumentedClassnames(sources) {
return globby(sources)
.then(paths => {
return Promise.all(paths.map(path => {
return fse.readFile(path, 'utf8')
.then(content => ({path, content}))
}))
})
})
// return only the unique classnames
return Array.from(new Set(classes))
.then(files => {
return files.reduce((classes, {path, content}) => {
classPatterns.forEach(pattern => {
let match
while (match = pattern.exec(content)) {
// get the matched classnames and split by whitespace into classes
let klasses = match[1].trim().split(/\s+/)
classes.push(...klasses)
}
})
return classes
}, [])
})
.then(classes => unique(classes))
}
// Before all the tests get the selectors and classnames
const selectors = uniqueSelectors(css.cssstats.selectors.values)
let classnames
test.before(t => {
selectors = uniqueSelectors(css.cssstats.selectors.values)
classnames = documentedClassnames([
"docs/*.md",
"README.md"
])
return getDocumentedClassnames([
'docs/*.md',
'README.md'
])
.then(_ => (classnames = _))
})
test("Every selector class is documented", t => {
const undocumented = []
selectors.forEach(selector => {
if (!classnames.includes(selector.replace(/^\./, ""))) {
undocumented.push(selector)
selectors.forEach(selector => {
const klass = selector.replace(/^\./, '')
test(`Selector "${selector}" is documented/whitelisted`, t => {
t.plan(1)
if (isWhitelisted(klass)) {
t.pass(`Selector "${selector}" is whitelisted`)
} else {
t.is(classnames.includes(klass), true, `Selector "${selector}" is not documented`)
}
})
t.is(undocumented.length, 0, `I did not find documentation for the "${undocumented.join(", ")}" selector(s) in the ${process.env.npm_package_name} module.`);
})

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
{
"version": "1.0.5",
"version": "1.0.6",
"name": "generator-primer-module",
"description": "Use this to create a new Primer modules!",
"author": "GitHub, Inc.",
@ -17,7 +17,7 @@
},
"dependencies": {
"chalk": "^2.1.0",
"primer-support": "4.5.3",
"primer-support": "4.5.4",
"yeoman-generator": "^1.1.1"
},
"keywords": [

View File

@ -0,0 +1,14 @@
{
"plugins": [
"eslint-plugin-github"
],
"env": {
"es6": true,
"node": true
},
"extends": [
"plugin:github/recommended",
"plugin:github/es6"
]
}

View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2018 GitHub Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,29 @@
#!/usr/bin/env node
'use strict'
/* eslint-disable no-console */
const meow = require('meow')
const build = require('./')
const cli = meow(`
Usage
$ primer-module-build [file]
File
File. This is required. The file input is the .scss file that
will be built into .css. The build automatically looks in the
node_modules/ directory for any inputs.
Example
$ primer-module-build index.scss
`)
build(cli)
.then(files => {
console.warn('YES! wrote %d files:', files.length)
for (const file of files) console.warn(file)
process.exit(0)
})
.catch(err => {
console.error('NO:', err)
process.exit(1)
})

View File

@ -0,0 +1,19 @@
const build = require('./lib/build')
function InputException(message) {
this.message = message
this.name = "InputException"
}
module.exports = ({input, flags}) => {
if (!input || input.length === 0) {
throw new InputException("You must supply a file to build")
}
const [file] = input
if (!file.match(/\.scss$/)) {
throw new InputException("We are only able to handle .scss files")
}
return build(file, flags)
}

View File

@ -0,0 +1,6 @@
{
"use": ["autoprefixer"],
"autoprefixer": {
"browsers": "> 5%, last 2 firefox versions, last 2 chrome versions, last 2 safari versions, last 2 edge versions, ie 11"
}
}

View File

@ -0,0 +1,69 @@
const {isAbsolute} = require('path')
const cssstats = require('cssstats')
const fse = require('fs-extra')
const nodeSassImport = require('node-sass-import')
const postcss = require('postcss')
const promisify = require('pify')
const sass = require('node-sass')
const sassRender = promisify(sass.render)
function arrayify(value) {
return Array.isArray(value) ? value : [value]
}
module.exports = (src, flags = {}) => {
const cwd = process.cwd()
const sourceFile = isAbsolute(src) ? src : `${cwd}/${src}`
const outputDir = flags.outputDir || `${cwd}/build`
const outputFile = flags.output || `${outputDir}/build.css`
const outputJSFile = flags.outputJS || `${outputDir}/index.js`
const outputDataFile = flags.outputData || `${outputDir}/data.json`
const sassOptions = {
file: sourceFile,
outputStyle: flags.outputStyle || 'compressed',
importer: nodeSassImport,
includePaths: arrayify(flags.include)
}
// console.warn('sass options:', sassOptions)
return fse.mkdirp(outputDir)
.then(() => sassRender(sassOptions))
.then(({css}) => {
function postcssPlugins() {
const postcssrc = (() => {
if (flags.postcssconfig && fse.existsSync(`${cwd}/${flags.postcssconfig}`)) {
return require(`${cwd}/${flags.postcssconfig}`)
} else if (fse.existsSync(`${cwd}/.postcss.json`)) {
return require(`${cwd}/.postcss.json`)
} else {
return require('./.postcss.json')
}
})()
return postcssrc.use.map(name => {
return require(name)(postcssrc[name])
})
}
return postcss(postcssPlugins())
.process(css, {
from: sourceFile,
to: outputFile
})
})
.then(result => {
const data = {
cssstats: cssstats(result.css)
}
const json = JSON.stringify(data)
return Promise.all([
fse.writeFile(outputFile, result.css),
fse.writeFile(outputJSFile, `module.exports = ${json}`),
fse.writeFile(outputDataFile, json)
])
.then(() => [outputFile, outputJSFile, outputDataFile])
})
}

2089
tools/primer-module-build/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,49 @@
{
"version": "1.0.3",
"name": "primer-module-build",
"description": "Scripts to build primer SCSS modules into CSS and stats",
"homepage": "http://primercss.io/",
"author": "GitHub, Inc.",
"license": "MIT",
"files": [
"index.js",
"cli.js",
"lib"
],
"repository": {
"type": "git",
"url": "git+https://github.com/primer/primer-module-build.git"
},
"bugs": {
"url": "https://github.com/primer/primer-module-build/issues"
},
"bin": "cli.js",
"engines": {
"node": ">=4"
},
"scripts": {
"ava": "../../script/npm-run ava --verbose \"tests/**/*.js\"",
"lint": "../../script/npm-run eslint lib/**/*.js *.js tests/**/*.js",
"test": "../../script/npm-run-all lint ava"
},
"keywords": [
"primer",
"build",
"css",
"postcss",
"node-sass"
],
"dependencies": {
"autoprefixer": "^6.7.7",
"cssstats": "^3.2.0",
"meow": "^3.7.0",
"node-sass": "^4.9.0",
"node-sass-import": "^2.0.0",
"pify": "^3.0.0",
"postcss": "^5.2.5"
},
"devDependencies": {
"primer-utilities": "4.9.0",
"tempy": "^0.2.1"
}
}

View File

@ -0,0 +1 @@
@import "primer-utilities/index.scss";

View File

@ -0,0 +1 @@
@import "./primer-package.scss"

View File

@ -0,0 +1,33 @@
const build = require('../lib/build.js')
const test = require('ava')
const tempy = require('tempy')
const {exists} = require('fs-extra')
const {join} = require('path')
function fixture(...path) {
return join(__dirname, 'fixtures', ...path)
}
function assertExists(t, filename) {
return exists(filename)
.then(exists => {
exists ? t.pass() : t.fail(`No such file: ${filename}`)
})
}
test('resolves npm-installed primer package', t => {
return build(fixture('primer-package.scss'), {})
.then(() => t.pass())
})
test('resolves relative paths', t => {
return build(fixture('relative.scss'), {})
.then(() => t.pass())
})
test('writes build.css by default', t => {
const outputDir = tempy.directory()
const outputFile = join(outputDir, 'build.css')
return build(fixture('primer-package.scss'), {outputDir})
.then(() => assertExists(t, outputFile))
})

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "stylelint-config-primer",
"version": "2.2.6",
"version": "2.2.7",
"description": "Sharable stylelint config used by GitHub's CSS",
"homepage": "http://primer.github.io/",
"author": "GitHub, Inc.",
@ -19,7 +19,7 @@
"stylelint-no-unsupported-browser-features": "^1.0.0",
"stylelint-order": "^0.4.4",
"stylelint-scss": "^1.4.1",
"stylelint-selector-no-utility": "1.8.6"
"stylelint-selector-no-utility": "1.8.7"
},
"devDependencies": {
"eslint": "^3.19.0",

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More