Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrohan committed Oct 24, 2017
2 parents 5dbec5c + 8b5ebf0 commit 23e4fbc
Show file tree
Hide file tree
Showing 86 changed files with 1,616 additions and 860 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
.sass-cache
node_modules
**/package-lock.json
*.log
build
_site
Expand Down
7 changes: 7 additions & 0 deletions .storybook/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": [
"env",
"react",
"minify"
]
}
15 changes: 9 additions & 6 deletions .storybook/Octicon.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ const Octicon = (props) => {
}

const story = storiesOf('Octicons', module)
const sizes = [64, 32, 16]

Object.keys(octicons).forEach(name => {
story.add(name, () => (
<div>{sizes.map((size, i) => (
<Octicon name={name} width={size} height={size} key={i} />
))}</div>
))
story.add(name, () => {
return (
<div>
<Octicon name={name} height="64" />
<Octicon name={name} height="32" />
<Octicon name={name} height="16" />
</div>
)
})
})
68 changes: 37 additions & 31 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,43 @@ const path = require("path");

const modulesPath = path.resolve(__dirname, "../modules")

module.exports = {
module: {
rules: [
{
test: /\.md$/,
use: "raw-loader",
},
{
test: /\.scss$/,
loaders: [
"style-loader",
"css-loader",
{
loader: "postcss-loader",
options: {
config: {
path: require.resolve("./postcss.config.js"),
},
module.exports = (config, env) => {

if (env === 'PRODUCTION') {
config.plugins = config.plugins
.filter(plugin => plugin.constructor.name !== 'UglifyJsPlugin')
}

config.module.rules.push(
{
test: /\.md$/,
use: "raw-loader",
},
{
test: /\.scss$/,
loaders: [
"style-loader",
"css-loader",
{
loader: "postcss-loader",
options: {
config: {
path: require.resolve("./postcss.config.js"),
},
},
{
loader: "sass-loader",
options: {
includePaths: [
modulesPath,
],
}
},
],
include: modulesPath,
},
],
},
},
{
loader: "sass-loader",
options: {
includePaths: [
modulesPath,
],
}
},
],
include: modulesPath,
}
)

return config
}
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# 9.6.0

### Added
- Storybook. We've added a storybook prototyping environment for testing components in seclusion. To start the server run `npm start`
- Adding yeoman generator for creating a primer module. `generator-primer-module`
- Importing `stylelint-config-primer` from https://github.com/primer/stylelint-config-primer/ into monorepo.
- Importing `stylelint-selector-no-utility` from https://github.com/primer/stylelint-selector-no-utility into monorepo.

### Changes
- Deployment and publishing scripts refinements.

# 9.5.0

### Added
- It's now possible to style `<summary>` elements as buttons and have them appear in the active/selected state when the enclosing [`<details>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details) is open. #346

### Changes
- Updates our release candidate versioning logic so that prerelease increments are done on a per-module basis, fixing #350.

# 9.4.0

### Added
- Add `v-align-baseline` class to `primer-utilities` #324
- Add deprecation warnings for `primer-cards` and `primer-forms/lib/form-validation.scss` #347 (these will be removed in v10.0.0)

### Changes
- Update npm metadata for `primer-css`, `primer-core`, `primer-product`, and `primer-marketing` #328
- Remove `HEAD` heading from the changelog #327

# 9.3.0

## Added
Expand Down
5 changes: 3 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"lerna": "2.0.0-rc.5",
"lerna": "2.4.0",
"packages": [
"modules/*"
"modules/*",
"tools/*"
],
"version": "independent"
}
4 changes: 2 additions & 2 deletions modules/primer-alerts/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.4.0",
"version": "1.5.1",
"name": "primer-alerts",
"description": "Flash messages, or alerts, inform users of successful or pending actions.",
"homepage": "http://primercss.io/",
Expand Down Expand Up @@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.1"
},
"keywords": [
"alerts",
Expand Down
4 changes: 2 additions & 2 deletions modules/primer-avatars/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.1",
"name": "primer-avatars",
"description": "Basic styles for user profile avatars.",
"homepage": "http://primercss.io/",
Expand Down Expand Up @@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.1"
},
"keywords": [
"avatars",
Expand Down
4 changes: 2 additions & 2 deletions modules/primer-base/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.4.0",
"version": "1.5.1",
"name": "primer-base",
"description": "CSS to reset the browsers default styles",
"homepage": "http://primercss.io/",
Expand Down Expand Up @@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.1"
},
"keywords": [
"primer",
Expand Down
4 changes: 2 additions & 2 deletions modules/primer-blankslate/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.1",
"name": "primer-blankslate",
"description": "Blankslates are for when there is a lack of content within a page or section.",
"homepage": "http://primercss.io/",
Expand Down Expand Up @@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.1"
},
"keywords": [
"primer",
Expand Down
2 changes: 1 addition & 1 deletion modules/primer-box/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The `.Box` component can be used for something as simple as a rounded corner box

## Box

A `.Box` is a container with a a white background ,a light gray border, and rounded corners. By default there are no additional styles such as padding, these can be added as needed with utility classes. Other styles and layouts can be achieved with box elements and modifiers shown in the documentation below.
A `.Box` is a container with a a white background, a light gray border, and rounded corners. By default there are no additional styles such as padding, these can be added as needed with utility classes. Other styles and layouts can be achieved with box elements and modifiers shown in the documentation below.

```html
<div class="Box">
Expand Down
4 changes: 2 additions & 2 deletions modules/primer-box/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.4.0",
"version": "2.5.1",
"name": "primer-box",
"description": "A module for creating rounded-corner boxes with options for headers, lists, and footers.",
"homepage": "http://primercss.io/",
Expand Down Expand Up @@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.1"
},
"keywords": [
"primer",
Expand Down
1 change: 1 addition & 0 deletions modules/primer-breadcrumb/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// support files
@import "primer-support/index.scss";
@import "primer-marketing-support/index.scss";
@import "./lib/breadcrumb.scss";
7 changes: 4 additions & 3 deletions modules/primer-breadcrumb/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.1",
"name": "primer-breadcrumb",
"description": "Breadcrumb navigation for pages with parents / grandparents.",
"homepage": "http://primercss.io/",
Expand All @@ -8,7 +8,7 @@
"style": "build/build.css",
"main": "build/index.js",
"primer": {
"category": "core",
"category": "marketing",
"module_type": "components"
},
"files": [
Expand All @@ -28,7 +28,8 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-marketing-support": "1.3.1",
"primer-support": "4.4.1"
},
"keywords": [
"breadcrumb",
Expand Down
19 changes: 19 additions & 0 deletions modules/primer-buttons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,25 @@ Use `.hidden-text-expander` to indicate and toggle hidden text.

You can also make the expander appear inline by adding `.inline`.


#### Using button styles with the details summary element

You can add `.btn` and `.btn-*` classes to any
[`<summary>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary)
element so that it gains the appearance of a button, and
selected/active styles when the parent
[`<details>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details)
element is open.

```html
<details>
<summary class="btn btn-block btn-primary">Toggle the content</summary>
<p class="mt-2">
This content will be toggled.
</p>
</details>
```

<!-- %enddocs -->

## License
Expand Down
4 changes: 2 additions & 2 deletions modules/primer-buttons/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.3.0",
"version": "2.4.1",
"name": "primer-buttons",
"description": "A collection of buttons used for primary and secondary actions.",
"homepage": "http://primercss.io/",
Expand Down Expand Up @@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.1"
},
"keywords": [
"primer",
Expand Down
6 changes: 3 additions & 3 deletions modules/primer-cards/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.4.1",
"version": "0.5.1",
"name": "primer-cards",
"description": "Card-like containers to group semantically related content together on marketing websites at GitHub.",
"homepage": "http://primercss.io/",
Expand Down Expand Up @@ -27,8 +27,8 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-marketing-support": "1.3.0",
"primer-support": "4.3.0"
"primer-marketing-support": "1.3.1",
"primer-support": "4.4.1"
},
"keywords": [
"cards",
Expand Down
1 change: 0 additions & 1 deletion modules/primer-core/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
// Core modules
@import "primer-base/index.scss";
@import "primer-box/index.scss";
@import "primer-breadcrumb/index.scss";
@import "primer-buttons/index.scss";
@import "primer-table-object/index.scss";
@import "primer-forms/index.scss";
Expand Down
25 changes: 12 additions & 13 deletions modules/primer-core/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "6.3.1",
"version": "6.4.1",
"name": "primer-core",
"description": "Primer CSS's core modules",
"homepage": "http://primercss.io/",
Expand All @@ -26,17 +26,16 @@
"lint": "../../script/lint-scss"
},
"dependencies": {
"primer-base": "1.4.0",
"primer-box": "2.4.0",
"primer-breadcrumb": "1.3.0",
"primer-buttons": "2.3.0",
"primer-forms": "1.3.1",
"primer-layout": "1.3.0",
"primer-navigation": "1.3.0",
"primer-support": "4.3.0",
"primer-table-object": "1.3.0",
"primer-tooltips": "1.3.0",
"primer-truncate": "1.3.0",
"primer-utilities": "4.7.0"
"primer-base": "1.5.1",
"primer-box": "2.5.1",
"primer-buttons": "2.4.1",
"primer-forms": "1.4.1",
"primer-layout": "1.4.1",
"primer-navigation": "1.4.1",
"primer-support": "4.4.1",
"primer-table-object": "1.4.1",
"primer-tooltips": "1.4.1",
"primer-truncate": "1.4.1",
"primer-utilities": "4.8.1"
}
}
Loading

0 comments on commit 23e4fbc

Please sign in to comment.