Skip to content

Commit 107d446

Browse files
authored
Merge branch 'dev' into import-input-groups
2 parents 05aeff3 + 72e979b commit 107d446

File tree

24 files changed

+378
-310
lines changed

24 files changed

+378
-310
lines changed

.github/pull_request_template.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
↖ First, change the base branch from "master" to "dev".
2+
3+
↑ Next, briefly describe your proposal in the title.
4+
5+
Finally, tell us more about the change here, in the description.
6+
7+
/cc @primer/ds-core

.storybook/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ setOptions({
1010
})
1111

1212
addDecorator(story => (
13-
<div className="p-4">
13+
<div className='p-4'>
1414
{story()}
1515
</div>
1616
))
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import remark from 'remark'
2+
import parents from 'unist-util-parents'
3+
import select from 'unist-util-select'
4+
import findBefore from 'unist-util-find-before'
5+
import htmlToReact from 'html-to-react'
6+
import parsePairs from 'parse-pairs'
7+
8+
const htmlParser = new htmlToReact.Parser()
9+
10+
const nodeToStory = (node, file) => {
11+
const html = node.value
12+
const element = htmlParser.parse(html)
13+
const pairs = node.lang.replace(/^html\s*/, '')
14+
const attrs = pairs.length ? parsePairs(pairs) : {}
15+
const title = attrs.title || getPreviousHeading(node) ||
16+
`story @ ${file}:${node.position.start.line}`
17+
return {
18+
title,
19+
story: () => element,
20+
attrs,
21+
html,
22+
file,
23+
node,
24+
}
25+
}
26+
27+
const getPreviousHeading = node => {
28+
const heading = findBefore(node.parent, node, 'heading')
29+
return (heading && !heading.used)
30+
? (heading.used = true, heading.children.map(c => c.value).join(''))
31+
: undefined
32+
}
33+
34+
export default req => {
35+
return req.keys().reduce((stories, file) => {
36+
const content = req(file)
37+
const ast = parents(remark.parse(content))
38+
const path = file.replace(/^\.\//, '')
39+
return stories.concat(
40+
select(ast, 'code[lang^=html]')
41+
.map(node => nodeToStory(node, path))
42+
.filter(({attrs}) => attrs.story !== "false")
43+
)
44+
}, [])
45+
}

.storybook/webpack.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ const modulesPath = path.resolve(__dirname, "../modules")
55
module.exports = {
66
module: {
77
rules: [
8+
{
9+
test: /\.md$/,
10+
use: "raw-loader",
11+
},
812
{
913
test: /\.scss$/,
1014
loaders: [
@@ -28,7 +32,7 @@ module.exports = {
2832
},
2933
],
3034
include: modulesPath,
31-
}
32-
]
35+
},
36+
],
3337
},
3438
}

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ deploy:
2626
skip_cleanup: true
2727
on:
2828
branch: release*
29+
tags: false
2930

3031
# publish "final" releases on master
3132
- provider: script
3233
script: script/release
3334
skip_cleanup: true
3435
on:
3536
branch: master
37+
tags: false
3638

3739
notifications:
3840
slack:

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,271 @@
1+
# 9.3.0
2+
3+
## Added
4+
- Docs for `primer-layout` (grid), `primer-support`, `primer-utilities`, and `primer-marketing-utilities`
5+
- Primer keys for `category` and `module_type` to `package.json` (for use in documentation and gathering stats)
6+
7+
## Changes
8+
- Removes `docs` from `gitignore`
9+
- Removes the `^` from all dependencies so that we can publish exact versions
10+
- Consolidates release notes from various sources into one changelog located in `/modules/primer-css/CHANGELOG.md`
11+
12+
# 9.2.0
13+
14+
## Added
15+
16+
- Add `test-docs` npm script in each module to check that every CSS class is documented (or at least mentioned) in the module's own markdown docs
17+
18+
## Changes
19+
20+
- Remove per-module configurations (`.gitignore`, `.postcss.json`, `.stylelintrc.json`) and `CHANGELOG.md` files in #284
21+
- Replace most static `font-size`, `font-weight`, and `line-height` CSS property values with their [SCSS variable equivalents](https://github.com/primer/primer-css/blob/c9ea37316fbb73c4d9931c52b42bc197260c0bf6/modules/primer-support/lib/variables/typography.scss#L12-L33) in #252
22+
- Refactor CI scripts to use Travis conditional deployment for release candidate and final release publish steps in #290
23+
24+
# 9.1.1
25+
26+
This release updates primer modules to use variables for spacing units instead of pixel values.
27+
28+
## Changes
29+
30+
- primer-alerts: 1.2.0 => 1.2.1
31+
- primer-avatars: 1.1.0 => 1.1.1
32+
- primer-base: 1.2.0 => 1.2.1
33+
- primer-blankslate: 1.1.0 => 1.1.1
34+
- primer-box: 2.2.0 => 2.2.1
35+
- primer-breadcrumb: 1.1.0 => 1.1.1
36+
- primer-buttons: 2.1.0 => 2.1.1
37+
- primer-cards: 0.2.0 => 0.2.1
38+
- primer-core: 6.1.0 => 6.1.1
39+
- primer-css: 9.1.0 => 9.1.1
40+
- primer-forms: 1.1.0 => 1.1.1
41+
- primer-labels: 1.2.0 => 1.2.1
42+
- primer-layout: 1.1.0 => 1.1.1
43+
- primer-markdown: 3.4.0 => 3.4.1
44+
- primer-marketing-type: 1.1.0 => 1.1.1
45+
- primer-marketing-utilities: 1.1.0 => 1.1.1
46+
- primer-marketing: 5.1.0 => 5.1.1
47+
- primer-navigation: 1.1.0 => 1.1.1
48+
- primer-page-headers: 1.1.0 => 1.1.1
49+
- primer-page-sections: 1.1.0 => 1.1.1
50+
- primer-product: 5.1.0 => 5.1.1
51+
- primer-support: 4.1.0 => 4.1.1
52+
- primer-table-object: 1.1.0 => 1.1.1
53+
- primer-tables: 1.1.0 => 1.1.1
54+
- primer-tooltips: 1.1.0 => 1.1.1
55+
- primer-truncate: 1.1.0 => 1.1.1
56+
- primer-utilities: 4.4.0 => 4.4.1
57+
58+
# 9.1.0
59+
60+
This release updates our [stylelint config](/primer/stylelint-config-primer) to [v2.0.0](https://github.com/primer/stylelint-config-primer/releases/tag/v2.0.0), and to stylelint v7.13.0. Each module also now has a `lint` npm script, and there are top-level `test` and `lint` scripts that you can use to lint and test all modules in one go.
61+
62+
This release also includes major improvements to our Travis build scripts to automatically publish PR builds, release candidates, and the "final" versions to npm.
63+
64+
# 9.0.0 - Core dependency & repo urls
65+
66+
We discovered that `primer-core` specified and outdated version of `primer-base` in it's dependencies. The outdated version did not have `normalize.scss` included which could cause some issues. This has issue occurred during v7.0.0 when creating the new monorepo. Also fixes repo urls in `package.json` for individual packages.
67+
68+
See PR [#243](https://github.com/primer/primer-css/pull/243)
69+
70+
## Changes
71+
72+
### Primer Core v6.0.0
73+
- Fixed `primer-base` dependency to point to latest version
74+
75+
**Repo urls corrected from `packages` to `modules` in:**
76+
- primer-base v1.1.5
77+
- primer-box v2.1.8
78+
- primer-buttons v2.0.6
79+
- primer-forms v1.0.13
80+
- primer-layout v1.0.5
81+
- primer-navigation v1.0.6
82+
- primer-support v4.0.7
83+
- primer-table-object v1.0.9
84+
- primer-tooltips v1.0.2
85+
- primer-truncate v1.0.2
86+
- primer-utilities v4.3.5
87+
88+
### Primer Product v5.0.2
89+
90+
**Repo urls corrected from `packages` to `modules` in:**
91+
- primer-alerts v1.1.8
92+
- primer-avatars v1.0.2
93+
- primer-blankslate v1.0.2
94+
- primer-labels v1.1.6
95+
- primer-markdown v3.3.13
96+
- primer-support v4.0.7
97+
98+
### Primer Marketing v5.0.2
99+
100+
**Repo urls corrected from `packages` to `modules` in:**
101+
- primer-breadcrumb v1.0.2
102+
- primer-cards v0.1.8
103+
- primer-marketing-support v1.0.2
104+
- primer-marketing-type v1.0.2
105+
- primer-marketing-utilities v1.0.2
106+
- primer-page-headers v1.0.2
107+
- primer-page-sections v1.0.2
108+
- primer-support v4.0.7
109+
- primer-tables v1.0.2
110+
111+
# 8.0.0 - Imports
112+
113+
Fixes issues with the ordering of imports in each of our meta-packages. See PR [#239](https://github.com/primer/primer-css/pull/239)
114+
115+
116+
## Changes
117+
118+
### Primer Core v5.0.1
119+
- Re-ordered imports in `index.scss` to ensure utilities come last in the cascade
120+
121+
### Primer Product v5.0.1
122+
- Re-ordered imports in `index.scss` to move markdown import to end of list to match former setup in GitHub.com
123+
124+
### Primer Marketing v5.0.1
125+
- Re-ordered imports in `index.scss` to ensure marketing utilities come last in the cascade
126+
127+
# 7.0.0 - Monorepo
128+
129+
In an effort to improve our publishing workflow we turned Primer CSS into a monorepo, made this repo the source of truth for Primer by removing Primer modules from GitHub, and setup Lerna for managing multiple packages and maintaining independent versioning for all our modules.
130+
131+
This is exciting because:
132+
133+
- we can spend less time hunting down the cause of a broken build and more time focussing on making Primer more useful and robust for everyone to use
134+
- we can be more confident that changes we publish won't cause unexpected problems on GitHub.com and many other GitHub websites that use Primer
135+
- we no longer have files like package.json, scripts, and readme's in the GitHub app that don't really belong there
136+
- **we can accept pull requests from external contributors** again!
137+
138+
See PR for more details on this change: https://github.com/primer/primer-css/pull/230
139+
140+
## Other changes:
141+
142+
### Primer Core v4.0.3
143+
144+
#### primer-support v4.0.5
145+
- Update fade color variables to use rgba instead of transparentize color function for better Sass readability
146+
- Update support variables and mixins to use new color variables
147+
148+
#### primer-layout v1.0.3
149+
- Update grid gutter styles naming convention and add responsive modifiers
150+
- Deprecate `single-column` and `table-column` from layout module
151+
- Remove `@include clearfix` from responsive container classes
152+
153+
#### primer-utilities v4.3.3
154+
- Add `show-on-focus` utility class for accessibility
155+
- Update typography utilities to use new color variables
156+
- Add `.p-responsive` class
157+
158+
#### primer-base v1.1.3
159+
- Update `b` tag font weight to use variable in base styles
160+
161+
### Primer Marketing v4.0.3
162+
163+
#### primer-tables
164+
- Update marketing table colors to use new variables
165+
166+
167+
# 6.0.0
168+
- Add `State--small` to labels module
169+
- Fix responsive border utilities
170+
- Added and updated typography variables and mixins; updated variables used in typography utilities; updated margin, padding, and typography readmes
171+
- Darken `.box-shadow-extra-large` shadow
172+
- Update `.tooltip-multiline` to remove `word-break: break-word` property
173+
- Add `.border-purple` utility class
174+
- Add responsive border utilities to primer-marketing
175+
- Add `ws-normal` utility for `whitespace: normal`
176+
- Updated syntax and classnames for `Counters` and `Labels`, moved into combined module with states.
177+
178+
# 5.1.0
179+
- Add negative margin utilities
180+
- Move `.d-flex` & `.d-flex-inline` to be with other display utility classes in `visibility-display.scss`
181+
- Delete `.shade-gradient` in favor of `.bg-shade-gradient`
182+
- Removed alt-body-font variable from primer-marketing
183+
- Removed un-used `alt` typography styles from primer-marketing
184+
- Add green border utility
185+
186+
# 5.0.0
187+
- Added new border variable and utility, replaced deprecated flash border variables
188+
- Updated variable name in form validation
189+
- Updated `.sr-only` to not use negative margin
190+
- Added and removed border variables and utilities
191+
- Add filter utility to Primer Marketing
192+
- Removed all custom color variables within Primer-marketing in favor of the new color system
193+
- Updated style for form group error display so it is positioned properly
194+
- Updated state closed color and text and background pending utilities
195+
- Removed local font css file from primer-marketing/support
196+
- Updated all color variables and replaced 579 hex refs across modules with new variables, added additional shades to start introducing a new color system which required updating nearly all primer modules
197+
- Added layout utility `.sr-only` for creating screen reader only elements
198+
- Added `.flex{-infix}-item-equal` utilities for creating equal width and equal height flex items.
199+
- Added `.flex{-infix}-row-reverse` utility for reversing rows of content
200+
- Updated `.select-menu-button-large` to use `em` units for sizing of the CSS triangle.
201+
- Added `.box-shadow-extra-large` utility for large, diffused shadow
202+
- Updated: removed background color from markdown body
203+
- Updated: remove background on the only item in an avatar stack
204+
- Added form utility `.form-checkbox-details` to allow content to be shown/hidden based on a radio button being checked
205+
- Added form utility to override Webkit's incorrect assumption of where to try to autofill contact information
206+
207+
# 4.7.0
208+
- Update primer modules to use bold variable applying `font-weight: 600`
209+
210+
# 4.6.0
211+
- Added `CircleBadge` component for badge-like displays within product/components/avatars
212+
- Added Box shadow utilities `box-shadow`, `box-shadow-medium`, `box-shadow-large`, `box-shadow-none`
213+
- Moved visibility and display utilities to separate partial at the end of the imports list, moved flexbox to it's own partial
214+
- Added `flex-shrink-0` to address Flexbox Safari bug
215+
- Updated: Using spacing variables in the `.flash` component
216+
- Updated Box component styles and documentation
217+
- Added `.wb-break-all` utility
218+
219+
# 4.4.0
220+
- Adding primer-marketing module to primer
221+
- Added red and blue border color variables and utilities
222+
- Updated: `$spacer-5` has been changed to `32px` from `36px`
223+
- Updated: `$spacer-6` has been changed to `40px` from `48px`
224+
- Deprecated `link-blue`, updated `link-gray` and `link-gray-dark`, added `link-hover-blue` - Updated: blankslate module to use support variables for sizing
225+
226+
# 4.3.0
227+
- Renamed `.flex-table` to `.TableObject`
228+
- Updated: `$spacer-1` has been changed to `4px` from `3px`
229+
- Updated: `$spacer-2` has been changed to `6px` from `8px`
230+
- Added: `.text-shadow-dark` & `.text-shadow-light` utilities
231+
- Updated: Moved non-framework CSS out of Primer modules. Added `box.scss` to `primer-core`. Added `discussion-timeline.scss` to `primer-product`, and moved `blob-csv.scss` into `/primer-product/markdown` directory
232+
- Added: Flex utilities
233+
- Refactor: Site typography to use Primer Marketing styles
234+
- Added: `.list-style-none` utility
235+
- Refactor: Button groups into some cleaner CSS
236+
- Updated: Reorganizing how we separate primer-core, primer-product, primer-marketing css
237+
238+
239+
# 4.2.0
240+
- Added: Responsive styles for margin and padding utilities, display, float, and new responsive hide utility, and updates to make typography responsive
241+
- Added: new container styles and grid styles with responsive options
242+
- Added: updated underline nav styles
243+
- Deprecate: Deprecating a lot of color and layout utilities
244+
- Added: More type utilities for different weights and larger sizes.
245+
- Added: Well defined browser support
246+
247+
248+
# 4.1.0
249+
- Added: [primer-markdown](https://github.com/primer/markdown) to the build
250+
- Fixes: Pointing "style" package.json to `build/build.css` file.
251+
- Added: Update font stack to system fonts
252+
- Added: Updated type scale as part of system font update
253+
- Added: `.Box` component for replacing boxed groups, simple box, and table-list styles
254+
- Added: New type utilities for headings and line-height
255+
- Deprecated: `vertical-middle` was replaced with `v-align-middle`.
256+
- Added: Layout utilities for vertical alignment, overflow, width and height, visibility, and display table
257+
- Added: Changing from font icons to SVG
258+
259+
# 4.0.2
260+
- Added npm build scripts to add `build/build.css` to the npm package
261+
262+
# 4.0.1
263+
- Fixed: missing primer-layout from build
264+
265+
# 4.0.0
266+
- Whole new npm build system, pulling in the code from separate component repos
267+
268+
# 3.0.0
269+
- Added: Animation utilities
270+
- Added: Whitespace scale, and margin and padding utilities
271+
- Added: Border utilities

modules/primer-breadcrumb/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Primer Marketing CSS Breadcrumb Navigation
1+
# Primer CSS Breadcrumb Navigation
22

33
[![npm version](http://img.shields.io/npm/v/primer-breadcrumb.svg)](https://www.npmjs.org/package/primer-breadcrumb)
44
[![Build Status](https://travis-ci.org/primer/primer-css.svg?branch=master)](https://travis-ci.org/primer/primer-css)
55

6-
> Breadcrumb navigation for GitHub's marketing pages with parents / grandparents.
6+
> Breadcrumb navigation for GitHub's pages with parents / grandparents.
77
88
This repository is a module of the full [primer-css][primer] repository.
99

@@ -22,7 +22,7 @@ Breadcrumbs are used to show taxonomical context on pages that are many levels d
2222

2323
#### Usage
2424

25-
```html
25+
```html title="Breadcrumb"
2626
<nav aria-label="Breadcrumb">
2727
<ol>
2828
<li class="breadcrumb-item text-small"><a href="/business">Business</a></li>

0 commit comments

Comments
 (0)