@primer/gatsby-theme-doctocat 3.2.1 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @primer/gatsby-theme-doctocat
2
2
 
3
+ ## 3.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`82bd051`](https://github.com/primer/doctocat/commit/82bd051ab35e5939a9ad5a3e89c26e2a63ce5df2) [#376](https://github.com/primer/doctocat/pull/376) Thanks [@vdepizzol](https://github.com/vdepizzol)! - New visual styles for Do/Dont components
8
+
9
+ ### Patch Changes
10
+
11
+ - [`0d35f17`](https://github.com/primer/doctocat/commit/0d35f17a34ebfc468e15a23783a55379b8f0e125) [#402](https://github.com/primer/doctocat/pull/402) Thanks [@ichelsea](https://github.com/ichelsea)! - Added underlines to links in markdown documents
12
+
3
13
  ## 3.2.1
4
14
 
5
15
  ### Patch Changes
@@ -183,4 +193,4 @@
183
193
 
184
194
  - [`5fb29c9`](https://github.com/primer/doctocat/commit/5fb29c9000dd2a26919f661d969142fa1938d329) [#187](https://github.com/primer/doctocat/pull/187) Thanks [@mvasilkov](https://github.com/mvasilkov)! - Fix typo in an internal import
185
195
 
186
- * [`cab38c3`](https://github.com/primer/doctocat/commit/cab38c38eb00a9645991147b28a47a535dcd1d41) [#190](https://github.com/primer/doctocat/pull/190) Thanks [@colebemis](https://github.com/colebemis)! - Update the navigation dropdown icon from a `chrevon` to a `caret` to follow our [progressive disclosure guidelines](https://primer.style/design/ui-patterns/progressive-disclosure#progressive-disclosure-ui-patterns)
196
+ * [`cab38c3`](https://github.com/primer/doctocat/commit/cab38c38eb00a9645991147b28a47a535dcd1d41) [#190](https://github.com/primer/doctocat/pull/190) Thanks [@colebemis](https://github.com/colebemis)! - Update the navigation dropdown icon from a `chevron` to a `caret` to follow our [progressive disclosure guidelines](https://primer.style/design/ui-patterns/progressive-disclosure#progressive-disclosure-ui-patterns)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/gatsby-theme-doctocat",
3
- "version": "3.2.1",
3
+ "version": "3.3.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -15,9 +15,9 @@
15
15
  "eslint-config-prettier": "^8.3.0",
16
16
  "eslint-plugin-jsx-a11y": "^6.4.1",
17
17
  "eslint-plugin-prettier": "^4.0.0",
18
- "eslint-plugin-primer-react": "0.7.3",
18
+ "eslint-plugin-primer-react": "0.7.4",
19
19
  "eslint-plugin-react": "^7.26.1",
20
- "gatsby": "^2.24.52",
20
+ "gatsby": "^2.32.13",
21
21
  "prettier": "^2.4.1",
22
22
  "react": "^16.13.1",
23
23
  "react-dom": "^16.13.1"
@@ -34,17 +34,17 @@
34
34
  "@mdx-js/react": "^1.0.21",
35
35
  "@primer/component-metadata": "^0.4.0",
36
36
  "@primer/react": "^34.5.0",
37
- "@primer/octicons-react": "^16.0.0",
37
+ "@primer/octicons-react": "^16.3.1",
38
38
  "@styled-system/theme-get": "^5.0.12",
39
- "@testing-library/jest-dom": "^4.1.0",
39
+ "@testing-library/jest-dom": "^5.16.2",
40
40
  "@testing-library/react": "^9.1.3",
41
41
  "axios": "^0.21.2",
42
42
  "babel-jest": "^24.9.0",
43
43
  "copy-to-clipboard": "^3.2.0",
44
- "date-fns": "^2.0.1",
44
+ "date-fns": "^2.28.0",
45
45
  "details-element-polyfill": "^2.4.0",
46
46
  "downshift": "^3.2.10",
47
- "find-up": "^4.1.0",
47
+ "find-up": "^6.3.0",
48
48
  "framer-motion": "^1.4.2",
49
49
  "fuse.js": "^3.4.5",
50
50
  "gatsby-plugin-catch-links": "^2.1.2",
@@ -66,12 +66,12 @@
66
66
  "pluralize": "^8.0.0",
67
67
  "preval.macro": "^3.0.0",
68
68
  "prism-react-renderer": "^1.2.0",
69
- "prismjs": "^1.25.0",
69
+ "prismjs": "^1.27.0",
70
70
  "react-addons-text-content": "^0.0.4",
71
71
  "react-element-to-jsx-string": "^14.0.3",
72
72
  "react-focus-on": "^3.3.0",
73
- "react-frame-component": "^4.1.1",
74
- "react-helmet": "^5.2.1",
73
+ "react-frame-component": "^5.2.1",
74
+ "react-helmet": "^6.1.0",
75
75
  "react-live": "^2.1.2",
76
76
  "react-measure": "^2.3.0",
77
77
  "read-pkg-up": "^6.0.0",
@@ -1,5 +1,4 @@
1
1
  import {Box, StyledOcticon, Text} from '@primer/react'
2
- import {CheckCircleFillIcon, XCircleFillIcon} from '@primer/octicons-react'
3
2
  import React from 'react'
4
3
 
5
4
  export function DoDontContainer({stacked, children}) {
@@ -15,22 +14,48 @@ DoDontContainer.defaultProps = {
15
14
  }
16
15
 
17
16
  export function Do(props) {
18
- return <DoDontBase {...props} title="Do" icon={CheckCircleFillIcon} iconBg="success.fg" />
17
+ return <DoDontBase {...props} title="Do" bg="success.fg" borderColor="success.muted" />
19
18
  }
20
19
 
21
20
  export function Dont(props) {
22
- return <DoDontBase {...props} title="Don't" icon={XCircleFillIcon} iconBg="danger.fg" />
21
+ return <DoDontBase {...props} title="Dont" bg="danger.fg" borderColor="danger.muted" />
23
22
  }
24
23
 
25
- function DoDontBase({children, title, icon: Icon, iconBg}) {
24
+ function DoDontBase({children, title, bg, borderColor, indented}) {
26
25
  return (
27
26
  <Box sx={{display: 'flex', flexDirection: 'column'}}>
28
- <Box sx={{display: 'flex', alignSelf: 'start', flexDirection: 'row', alignItems: 'center', mb: '2'}}>
29
- <StyledOcticon icon={Icon} sx={{color: iconBg}} />
30
- <Text sx={{fontWeight: 'bold', color: 'fg.default', ml: 2}}>{title}</Text>
27
+ <Box
28
+ sx={{
29
+ display: 'flex',
30
+ alignSelf: 'start',
31
+ flexDirection: 'row',
32
+ alignItems: 'center',
33
+ mb: '2',
34
+ backgroundColor: bg,
35
+ borderRadius: '2',
36
+ color: 'fg.onEmphasis',
37
+ paddingX: '2'
38
+ }}
39
+ >
40
+ <Text sx={{fontWeight: 'bold', fontSize: '1', color: 'fg.onEmphasis'}}>{title}</Text>
31
41
  </Box>
32
42
  <Box sx={{'& *:last-child': {mb: 0}, img: {maxWidth: '100%'}, display: 'flex', flexDirection: 'column'}}>
33
- {children}
43
+ {indented ? (
44
+ <Box
45
+ as="blockquote"
46
+ sx={{
47
+ margin: '0',
48
+ borderLeftWidth: '4px',
49
+ borderLeftStyle: 'solid',
50
+ borderLeftColor: borderColor,
51
+ paddingLeft: '3'
52
+ }}
53
+ >
54
+ {children}
55
+ </Box>
56
+ ) : (
57
+ children
58
+ )}
34
59
  </Box>
35
60
  </Box>
36
61
  )
@@ -0,0 +1,10 @@
1
+ import styled from 'styled-components'
2
+ import themeGet from '@styled-system/theme-get'
3
+
4
+ const Link = styled.a`
5
+ text-decoration: underline;
6
+ text-underline-offset: 25%;
7
+ color: ${themeGet('colors.accent.fg')};
8
+ `
9
+
10
+ export default Link
@@ -1,5 +1,6 @@
1
1
  import {MDXProvider} from '@mdx-js/react'
2
- import {Link, ThemeProvider} from '@primer/react'
2
+ import {ThemeProvider} from '@primer/react'
3
+ import Link from './link'
3
4
  import React from 'react'
4
5
  import mdxComponents from '../mdx-components'
5
6
  import Blockquote from './blockquote'
@@ -3,7 +3,7 @@ import debounce from 'lodash.debounce'
3
3
  ;(function searchWorker() {
4
4
  let fuse = null
5
5
 
6
- // [MKT]: I landed on the debouce wait value of 50 based mostly on
6
+ // [MKT]: I landed on the debounce wait value of 50 based mostly on
7
7
  // experimentation. With both `leading` and `trailing` set to `true`, this
8
8
  // feels pretty snappy.
9
9
  //