@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 +11 -1
- package/package.json +10 -10
- package/src/components/do-dont.js +33 -8
- package/src/components/link.js +10 -0
- package/src/components/wrap-root-element.js +2 -1
- package/src/search.worker.js +1 -1
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 `
|
|
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.
|
|
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.
|
|
18
|
+
"eslint-plugin-primer-react": "0.7.4",
|
|
19
19
|
"eslint-plugin-react": "^7.26.1",
|
|
20
|
-
"gatsby": "^2.
|
|
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.
|
|
37
|
+
"@primer/octicons-react": "^16.3.1",
|
|
38
38
|
"@styled-system/theme-get": "^5.0.12",
|
|
39
|
-
"@testing-library/jest-dom": "^
|
|
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
|
|
44
|
+
"date-fns": "^2.28.0",
|
|
45
45
|
"details-element-polyfill": "^2.4.0",
|
|
46
46
|
"downshift": "^3.2.10",
|
|
47
|
-
"find-up": "^
|
|
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.
|
|
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": "^
|
|
74
|
-
"react-helmet": "^
|
|
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"
|
|
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
|
|
21
|
+
return <DoDontBase {...props} title="Don’t" bg="danger.fg" borderColor="danger.muted" />
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
function DoDontBase({children, title,
|
|
24
|
+
function DoDontBase({children, title, bg, borderColor, indented}) {
|
|
26
25
|
return (
|
|
27
26
|
<Box sx={{display: 'flex', flexDirection: 'column'}}>
|
|
28
|
-
<Box
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
{
|
|
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
|
)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {MDXProvider} from '@mdx-js/react'
|
|
2
|
-
import {
|
|
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'
|
package/src/search.worker.js
CHANGED
|
@@ -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
|
|
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
|
//
|