diff --git a/.storybook/lib/storiesFromMarkdown.js b/.storybook/lib/storiesFromMarkdown.js
index 564600dfdb..081d42feca 100644
--- a/.storybook/lib/storiesFromMarkdown.js
+++ b/.storybook/lib/storiesFromMarkdown.js
@@ -19,17 +19,22 @@ const railsOcticonToReact = (html) => {
return html
}
-const nodeToStory = (node, file) => {
- const html = railsOcticonToReact(node.value)
- const element = htmlParser.parse(html)
+const parseBlockAttrs = (node, file) => {
const pairs = node.lang.replace(/^html\s*/, '')
const attrs = pairs.length ? parsePairs(pairs) : {}
- const title = attrs.title || getPreviousHeading(node) ||
- `story @ ${file}:${node.position.start.line}`
+ attrs.title = attrs.title
+ || getPreviousHeading(node)
+ || `story @ ${file}:${node.position.start.line}`
+ node.block = attrs
+ return node
+}
+
+const nodeToStory = (node, file) => {
+ const html = railsOcticonToReact(node.value)
+ const {title} = node.block
return {
title,
- story: () => element,
- attrs,
+ story: () => htmlParser.parse(html),
html,
file,
node,
@@ -44,14 +49,17 @@ const getPreviousHeading = node => {
}
export default req => {
- return req.keys().reduce((stories, file) => {
- const content = req(file)
- const ast = parents(remark.parse(content))
- const path = file.replace(/^\.\//, '')
- return stories.concat(
- select(ast, 'code[lang^=html]')
- .map(node => nodeToStory(node, path))
- .filter(({attrs}) => attrs.story !== "false")
- )
- }, [])
+ return req.keys()
+ .filter(file => !file.match(/node_modules/))
+ .reduce((stories, file) => {
+ const content = req(file)
+ const ast = parents(remark.parse(content))
+ const path = file.replace(/^\.\//, '')
+ return stories.concat(
+ select(ast, 'code[lang^=html]')
+ .map(parseBlockAttrs)
+ .filter(({block}) => block.story !== "false")
+ .map(node => nodeToStory(node, path))
+ )
+ }, [])
}
diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js
index 59c421d1d3..be4eb6596b 100644
--- a/.storybook/webpack.config.js
+++ b/.storybook/webpack.config.js
@@ -1,6 +1,6 @@
-const path = require("path");
+const path = require('path');
-const modulesPath = path.resolve(__dirname, "../modules")
+const modulesPath = path.resolve(__dirname, '../modules')
module.exports = (config, env) => {
@@ -9,26 +9,34 @@ module.exports = (config, env) => {
.filter(plugin => plugin.constructor.name !== 'UglifyJsPlugin')
}
- config.module.rules.push(
- {
- test: /\.md$/,
- use: "raw-loader",
- },
+ const rules = config.module.rules
+
+ rules.forEach((rule, index) => {
+ if ('README.md'.match(rule.test)) {
+ // console.warn('replacing MD rule:', rule)
+ rules.splice(index, 1, {
+ test: /\.md$/,
+ loader: 'raw-loader',
+ })
+ }
+ })
+
+ rules.push(
{
test: /\.scss$/,
loaders: [
- "style-loader",
- "css-loader",
+ 'style-loader',
+ 'css-loader',
{
- loader: "postcss-loader",
+ loader: 'postcss-loader',
options: {
config: {
- path: require.resolve("./postcss.config.js"),
+ path: require.resolve('./postcss.config.js'),
},
},
},
{
- loader: "sass-loader",
+ loader: 'sass-loader',
options: {
includePaths: [
modulesPath,
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53b9c50b08..a20126ae5c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,30 @@
+# 10.5.0
+
+#### :rocket: Enhancement
+* [#487](https://github.com/primer/primer/pull/487) Import Pagination Component. ([@emplums](https://github.com/emplums))
+* [#474](https://github.com/primer/primer/pull/474) Add text-mono utility class. ([@emplums](https://github.com/emplums))
+* [#456](https://github.com/primer/primer/pull/456) Adding height-fit utility class. ([@jonrohan](https://github.com/jonrohan))
+
+#### :bug: Bug Fix
+* [#465](https://github.com/primer/primer/pull/465) Fix Popover--right-bottom caret positioning. ([@shawnbot](https://github.com/shawnbot))
+* [#458](https://github.com/primer/primer/pull/458) Fix broken pointer from packages to modules. ([@tysongach](https://github.com/tysongach))
+
+#### :memo: Documentation
+* [#486](https://github.com/primer/primer/pull/486) Documenting the text-inheritance color utility. ([@jonrohan](https://github.com/jonrohan))
+* [#481](https://github.com/primer/primer/pull/481) Styleguide Polish. ([@emplums](https://github.com/emplums))
+* [#464](https://github.com/primer/primer/pull/464) Fix markdown stories. ([@shawnbot](https://github.com/shawnbot))
+* [#455](https://github.com/primer/primer/pull/455) Add colorizeTooltip deprecation warning. ([@jonrohan](https://github.com/jonrohan))
+* [#452](https://github.com/primer/primer/pull/452) Update dead links in CONTRIBUTING.md. ([@agisilaos](https://github.com/agisilaos))
+
+#### Committers: 7
+- Agisilaos Tsaraboulidis ([agisilaos](https://github.com/agisilaos))
+- Catherine Bui ([gladwearefriends](https://github.com/gladwearefriends))
+- Emily ([emplums](https://github.com/emplums))
+- Jon Rohan ([jonrohan](https://github.com/jonrohan))
+- Shawn Allen ([shawnbot](https://github.com/shawnbot))
+- Tyson Gach ([tysongach](https://github.com/tysongach))
+- [muan](https://github.com/muan)
+
# 10.4.0 (2018-03-14)
#### :rocket: Enhancement
diff --git a/README.md b/README.md
index 5b07f7be6d..b3793fe480 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@ Then, you would import the module with:
@import "primer-navigation/index.scss";
```
-Or, while you're figuring out which modules you need, you can import them directly from the `primer` [`packages` directory](./packages) like so:
+Or, while you're figuring out which modules you need, you can import them directly from the `primer` [`modules` directory](./modules) like so:
```scss
@import "primer/modules/primer-navigation/index.css";
diff --git a/modules/primer-alerts/package.json b/modules/primer-alerts/package.json
index 7f0335e4ca..f424ca7f13 100644
--- a/modules/primer-alerts/package.json
+++ b/modules/primer-alerts/package.json
@@ -1,5 +1,5 @@
{
- "version": "1.5.5",
+ "version": "1.5.6",
"name": "primer-alerts",
"description": "Flash messages, or alerts, inform users of successful or pending actions.",
"homepage": "http://primer.github.io/",
@@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
- "primer-support": "4.5.2"
+ "primer-support": "4.5.3"
},
"keywords": [
"alerts",
diff --git a/modules/primer-avatars/package.json b/modules/primer-avatars/package.json
index 29a3316b62..3ccb2f87c5 100644
--- a/modules/primer-avatars/package.json
+++ b/modules/primer-avatars/package.json
@@ -1,5 +1,5 @@
{
- "version": "1.5.2",
+ "version": "1.5.3",
"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.2"
+ "primer-support": "4.5.3"
},
"keywords": [
"avatars",
diff --git a/modules/primer-base/package.json b/modules/primer-base/package.json
index 6da36b07ac..6de82e77b1 100644
--- a/modules/primer-base/package.json
+++ b/modules/primer-base/package.json
@@ -1,5 +1,5 @@
{
- "version": "1.7.0",
+ "version": "1.7.1",
"name": "primer-base",
"description": "CSS to reset the browsers default styles",
"homepage": "http://primer.github.io/",
@@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
- "primer-support": "4.5.2"
+ "primer-support": "4.5.3"
},
"keywords": [
"primer",
diff --git a/modules/primer-blankslate/package.json b/modules/primer-blankslate/package.json
index a37c35b24f..066a3602e4 100644
--- a/modules/primer-blankslate/package.json
+++ b/modules/primer-blankslate/package.json
@@ -1,5 +1,5 @@
{
- "version": "1.4.5",
+ "version": "1.4.6",
"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.2"
+ "primer-support": "4.5.3"
},
"keywords": [
"primer",
diff --git a/modules/primer-box/README.md b/modules/primer-box/README.md
index c8773cd473..6ddffdcb18 100644
--- a/modules/primer-box/README.md
+++ b/modules/primer-box/README.md
@@ -259,7 +259,7 @@ Use `Box--danger` to apply a red border to the outside of the box. This theme is
```
-`Box-danger` is often paired with a red heading. See the [subhead](/styleguide/css/styles/product/components/subhead) docs for more information.
+`Box-danger` is often paired with a red heading. See the [subhead](../subhead) docs for more information.
```html
@@ -356,7 +356,7 @@ Use the `border-dashed` utility to apply a dashed border to a box.
## Boxes with flash alerts
Use `flash-full` for flash alert inside a box to remove the rounded corners. Place the flash alert above the `Box-body` and underneath the `Box-header`.
-Flash alerts come in three different colors and can be used with icons and buttons, see the [alert documentation](/alerts) for more information.
+Flash alerts come in three different colors and can be used with icons and buttons, see the [alert documentation](../alerts) for more information.
```html
@@ -455,7 +455,7 @@ Use `Counter--gray-dark` for a counter with a dark gray background and white tex
## Form elements and buttons in boxes
To achieve different layouts when adding buttons or form elements to boxes we suggest you use utilities to achieve the layout you want. Here's some common examples:
-Use [flexbox utilities](../utilities/flexbox) to center align items, and avoid using floats by using `flex-auto` to have the text fill the remaining space so that the button rests on the far right.
+Use [flexbox utilities](../../utilities/flexbox) to center align items, and avoid using floats by using `flex-auto` to have the text fill the remaining space so that the button rests on the far right.
```html
@@ -561,7 +561,7 @@ You can put forms in boxes. Often form submission buttons are aligned to the bot
```
-When a box is all by itself centered on a page you can use [column widths](/grid) to control the width of the box. If needed, break the mold a little and use [typography utilities](../utilities/typography) instead of the built in box title styles.
+When a box is all by itself centered on a page you can use [column widths](../../objects/grid) to control the width of the box. If needed, break the mold a little and use [typography utilities](../../utilities/typography) instead of the built in box title styles.
```html
@@ -582,7 +582,7 @@ When a box is all by itself centered on a page you can use [column widths](/grid
```
-Box patterns can also be made with, and modified with [border utilities](../utilities/borders).
+Box patterns can also be made with, and modified with [border utilities](../../utilities/borders).
diff --git a/modules/primer-box/package.json b/modules/primer-box/package.json
index db1f980e71..276d243ca3 100644
--- a/modules/primer-box/package.json
+++ b/modules/primer-box/package.json
@@ -1,5 +1,5 @@
{
- "version": "2.5.5",
+ "version": "2.5.6",
"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.2"
+ "primer-support": "4.5.3"
},
"keywords": [
"primer",
diff --git a/modules/primer-branch-name/package.json b/modules/primer-branch-name/package.json
index 61db2aa086..d72c1d97ff 100644
--- a/modules/primer-branch-name/package.json
+++ b/modules/primer-branch-name/package.json
@@ -1,5 +1,5 @@
{
- "version": "1.0.3",
+ "version": "1.0.4",
"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.2"
+ "primer-support": "4.5.3"
},
"keywords": [
"github",
diff --git a/modules/primer-breadcrumb/package.json b/modules/primer-breadcrumb/package.json
index 4bc4f20680..395a2cb61e 100644
--- a/modules/primer-breadcrumb/package.json
+++ b/modules/primer-breadcrumb/package.json
@@ -1,5 +1,5 @@
{
- "version": "1.5.1",
+ "version": "1.5.2",
"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.2"
+ "primer-support": "4.5.3"
},
"keywords": [
"breadcrumb",
diff --git a/modules/primer-buttons/README.md b/modules/primer-buttons/README.md
index 948843bae0..3ebbe61e36 100644
--- a/modules/primer-buttons/README.md
+++ b/modules/primer-buttons/README.md
@@ -175,7 +175,7 @@ You can easily append a count to a **small button**. Add the `.with-count` class
```
-You can also use the [counter](../../product/components/labels) component within buttons:
+You can also use the [counter](../labels#counters) component within buttons:
```html