gatsby-theme-carbon 2.3.0 → 3.0.0-next.2
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/gatsby-config.js +0 -6
- package/package.json +18 -22
- package/src/components/Accordion/Accordion.js +1 -1
- package/src/components/Accordion/Accordion.module.scss +6 -6
- package/src/components/Accordion/AccordionItem.js +1 -1
- package/src/components/AlertBanner.js +6 -5
- package/src/components/AnchorLinks/AnchorLinks.module.scss +5 -5
- package/src/components/ArticleCard/ArticleCard.js +30 -38
- package/src/components/ArticleCard/article-card.scss +61 -52
- package/src/components/Aside/Aside.module.scss +6 -6
- package/src/components/AutolinkHeader/AutolinkHeader.js +2 -2
- package/src/components/AutolinkHeader/AutolinkHeader.module.scss +2 -2
- package/src/components/BackToTopBtn/BackToTopBtn.js +2 -2
- package/src/components/BackToTopBtn/BackToTopBtn.module.scss +3 -3
- package/src/components/Caption/Caption.module.scss +4 -4
- package/src/components/Code/Code.js +3 -3
- package/src/components/Code/Code.module.scss +20 -28
- package/src/components/Code/PathRow.js +3 -3
- package/src/components/Code/Sidebar.js +3 -3
- package/src/components/DoDontExample/DoDontExample.js +25 -32
- package/src/components/DoDontExample/do-dont-example.scss +61 -48
- package/src/components/DoDontRow/DoDont.js +3 -3
- package/src/components/DoDontRow/DoDontRow.module.scss +16 -16
- package/src/components/EditLink/EditLink.js +2 -2
- package/src/components/EditLink/EditLink.module.scss +2 -2
- package/src/components/ExpressiveList/ExpressiveList.js +0 -3
- package/src/components/ExpressiveList/ExpressiveList.module.scss +7 -7
- package/src/components/ExpressiveListContainer/ExpressiveListContainer.js +0 -3
- package/src/components/ExpressiveListContainer/ExpressiveListContainer.module.scss +7 -7
- package/src/components/FeatureCard/FeatureCard.js +10 -14
- package/src/components/FeatureCard/feature-card.scss +32 -24
- package/src/components/FeedbackDialog/Comment.js +1 -1
- package/src/components/FeedbackDialog/Comment.module.scss +4 -4
- package/src/components/FeedbackDialog/Experience.js +16 -12
- package/src/components/FeedbackDialog/Experience.module.scss +1 -1
- package/src/components/FeedbackDialog/FeedbackDialog.js +2 -2
- package/src/components/FeedbackDialog/Form.js +1 -1
- package/src/components/FeedbackDialog/Form.module.scss +5 -5
- package/src/components/FeedbackDialog/LaunchButton.js +1 -2
- package/src/components/FeedbackDialog/LaunchButton.module.scss +3 -3
- package/src/components/Footer/Footer.module.scss +17 -17
- package/src/components/FourOhFour/FourOhFour.module.scss +13 -13
- package/src/components/GifPlayer/GifPlayer.js +7 -7
- package/src/components/GlobalSearch/GlobalSearch.js +5 -9
- package/src/components/GlobalSearch/GlobalSearch.module.scss +28 -28
- package/src/components/Grid/Grid.js +33 -29
- package/src/components/Grid/Grid.module.scss +1 -1
- package/src/components/Header/Header.js +4 -4
- package/src/components/Header/Header.module.scss +48 -35
- package/src/components/HeaderNav/HeaderNav.js +1 -1
- package/src/components/HeaderNav/HeaderNavItem.js +1 -1
- package/src/components/HeaderNav/HeaderNavItem.module.scss +10 -10
- package/src/components/Homepage/Banner.module.scss +3 -3
- package/src/components/Homepage/Callout.module.scss +5 -5
- package/src/components/Homepage/homepage.scss +33 -26
- package/src/components/ImageCard/ImageCard.js +31 -36
- package/src/components/ImageCard/image-card.scss +52 -43
- package/src/components/ImageGallery/ImageGallery.js +5 -5
- package/src/components/ImageGallery/ImageGallery.module.scss +12 -12
- package/src/components/InlineNotification/InlineNotification.js +4 -5
- package/src/components/InlineNotification/InlineNotification.module.scss +6 -6
- package/src/components/LastModifiedDate/last-modified-date.module.scss +1 -1
- package/src/components/LeftNav/LeftNav.js +1 -1
- package/src/components/LeftNav/LeftNav.module.scss +34 -32
- package/src/components/LeftNav/LeftNavItem.js +1 -1
- package/src/components/LeftNav/LeftNavWrapper.module.scss +6 -6
- package/src/components/LeftNav/ResourceLinks.js +2 -2
- package/src/components/Link/Link.js +1 -1
- package/src/components/Link/Link.module.scss +2 -2
- package/src/components/MDXProvider/defaultComponents.js +2 -2
- package/src/components/Main/Main.module.scss +1 -1
- package/src/components/MediumPosts/MediumPosts.module.scss +5 -5
- package/src/components/MiniCard/CardGroup.module.scss +3 -3
- package/src/components/MiniCard/MiniCard.js +13 -16
- package/src/components/MiniCard/MiniCard.module.scss +3 -3
- package/src/components/NextPrevious/NextPrevious.module.scss +7 -7
- package/src/components/PageDescription/PageDescription.module.scss +2 -2
- package/src/components/PageHeader/PageHeader.js +3 -3
- package/src/components/PageHeader/PageHeader.module.scss +5 -7
- package/src/components/PageTable/PageTable.js +4 -4
- package/src/components/PageTable/page-table.scss +23 -14
- package/src/components/PageTabs/PageTabs.js +3 -3
- package/src/components/PageTabs/PageTabs.module.scss +11 -11
- package/src/components/ResourceCard/ResourceCard.js +26 -36
- package/src/components/ResourceCard/resource-card-group.scss +21 -24
- package/src/components/ResourceCard/resource-card.scss +53 -43
- package/src/components/SquareCard/SquareCard.js +16 -24
- package/src/components/SquareCard/SquareCard.module.scss +27 -27
- package/src/components/Switcher/Switcher.js +2 -2
- package/src/components/Switcher/Switcher.module.scss +18 -18
- package/src/components/Tabs/Tabs.js +1 -1
- package/src/components/Tabs/Tabs.module.scss +4 -4
- package/src/components/Utils/Utils.module.scss +9 -7
- package/src/components/Video/Video.js +3 -3
- package/src/components/Video/Video.module.scss +2 -2
- package/src/components/markdown/Abbr.js +1 -1
- package/src/components/markdown/Li.js +1 -1
- package/src/components/markdown/Markdown.module.scss +54 -52
- package/src/components/markdown/Ol.js +2 -2
- package/src/components/markdown/Ul.js +2 -2
- package/src/styles/_theme.scss +4 -0
- package/src/styles/index.scss +15 -13
- package/src/styles/internal/_global.scss +17 -21
- package/src/styles/internal/_page.scss +46 -33
- package/src/styles/internal/_website-side-nav.scss +96 -102
- package/src/styles/internal/g10.scss +5 -2
- package/src/styles/internal/g100.scss +4 -3
- package/src/styles/internal/g90.scss +4 -3
- package/src/styles/internal/resources.scss +14 -3
- package/src/styles/internal/white.scss +4 -3
- package/src/styles/internal/_carbon-components.scss +0 -43
package/gatsby-config.js
CHANGED
|
@@ -93,12 +93,6 @@ module.exports = (themeOptions) => {
|
|
|
93
93
|
`gatsby-remark-images`,
|
|
94
94
|
`gatsby-transformer-yaml`,
|
|
95
95
|
`gatsby-plugin-catch-links`,
|
|
96
|
-
{
|
|
97
|
-
resolve: 'gatsby-plugin-webpack-bundle-analyser-v2',
|
|
98
|
-
options: {
|
|
99
|
-
disable: !process.env.ANALYZE,
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
96
|
{
|
|
103
97
|
resolve: 'gatsby-plugin-lunr',
|
|
104
98
|
options: lunrOptions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-theme-carbon",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-next.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"author": "vpicone <vp@vincepic.one> (@vpicone)",
|
|
6
6
|
"repository": {
|
|
@@ -12,60 +12,56 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "Apache 2.0",
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"gatsby": "^
|
|
15
|
+
"gatsby": "^4.4.0",
|
|
16
16
|
"react": "^17.0.2",
|
|
17
17
|
"react-dom": "^17.0.2"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"gatsby": "^
|
|
20
|
+
"gatsby": "^4.4.0",
|
|
21
21
|
"react": "^17.0.2",
|
|
22
22
|
"react-dom": "^17.0.2"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/core": "^7.14.6",
|
|
26
26
|
"@carbon/elements": "^10.38.0",
|
|
27
|
-
"@carbon/icons-react": "^10.35.0",
|
|
28
27
|
"@carbon/pictograms-react": "^11.14.0",
|
|
28
|
+
"@carbon/react": "^0.15.1",
|
|
29
29
|
"@carbon/themes": "^10.38.0",
|
|
30
30
|
"@mdx-js/mdx": "^1.5.5",
|
|
31
31
|
"@mdx-js/react": "^1.5.5",
|
|
32
32
|
"@reach/router": "^1.2.1",
|
|
33
33
|
"@vimeo/player": "^2.9.1",
|
|
34
34
|
"beautiful-react-hooks": "^0.23.1",
|
|
35
|
-
"carbon-components": "^10.39.0",
|
|
36
|
-
"carbon-components-react": "^7.39.0",
|
|
37
|
-
"carbon-icons": "^7.0.7",
|
|
38
35
|
"classnames": "^2.2.6",
|
|
39
36
|
"copy-to-clipboard": "^3.2.0",
|
|
40
37
|
"focus-trap-react": "^8.4.2",
|
|
41
|
-
"gatsby-plugin-catch-links": "^
|
|
38
|
+
"gatsby-plugin-catch-links": "^4.0.0",
|
|
42
39
|
"gatsby-plugin-lunr": "^1.5.2",
|
|
43
|
-
"gatsby-plugin-manifest": "^
|
|
44
|
-
"gatsby-plugin-mdx": "^
|
|
45
|
-
"gatsby-plugin-offline": "^
|
|
46
|
-
"gatsby-plugin-react-helmet": "^
|
|
47
|
-
"gatsby-plugin-sass": "^
|
|
40
|
+
"gatsby-plugin-manifest": "^4.0.0",
|
|
41
|
+
"gatsby-plugin-mdx": "^3.0.0",
|
|
42
|
+
"gatsby-plugin-offline": "^5.0.0",
|
|
43
|
+
"gatsby-plugin-react-helmet": "^5.0.0",
|
|
44
|
+
"gatsby-plugin-sass": "^5.0.0",
|
|
48
45
|
"gatsby-plugin-sass-resources": "^2.0.0",
|
|
49
|
-
"gatsby-plugin-sharp": "^
|
|
50
|
-
"gatsby-
|
|
51
|
-
"gatsby-remark-
|
|
52
|
-
"gatsby-remark-
|
|
53
|
-
"gatsby-remark-
|
|
54
|
-
"gatsby-remark-smartypants": "^4.4.1",
|
|
46
|
+
"gatsby-plugin-sharp": "^4.0.0",
|
|
47
|
+
"gatsby-remark-copy-linked-files": "^5.0.0",
|
|
48
|
+
"gatsby-remark-images": "^6.0.0",
|
|
49
|
+
"gatsby-remark-responsive-iframe": "^5.0.0",
|
|
50
|
+
"gatsby-remark-smartypants": "^5.0.0",
|
|
55
51
|
"gatsby-remark-unwrap-images": "^1.0.1",
|
|
56
|
-
"gatsby-source-filesystem": "^
|
|
52
|
+
"gatsby-source-filesystem": "^4.0.0",
|
|
57
53
|
"gatsby-source-medium-feed": "^1.0.6",
|
|
58
|
-
"gatsby-transformer-yaml": "^
|
|
54
|
+
"gatsby-transformer-yaml": "^4.0.0",
|
|
59
55
|
"lodash.startcase": "^4.4.0",
|
|
60
56
|
"lodash.throttle": "^4.1.1",
|
|
61
57
|
"mkdirp": "^1.0.3",
|
|
62
|
-
"node-sass": "^6.0.1",
|
|
63
58
|
"prism-react-renderer": "^1.2.1",
|
|
64
59
|
"prop-types": "^15.7.2",
|
|
65
60
|
"react-helmet": "^6.0.0-beta",
|
|
66
61
|
"react-transition-group": "^4.4.2",
|
|
67
62
|
"react-use": "^15.3.4",
|
|
68
63
|
"remark-slug": "^6.0.0",
|
|
64
|
+
"sass": "^1.49.0",
|
|
69
65
|
"slugify": "^1.3.4",
|
|
70
66
|
"smooth-scroll": "^16.1.3",
|
|
71
67
|
"use-media": "^1.4.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
|
-
import { Accordion as CarbonAccordion } from 'carbon
|
|
3
|
+
import { Accordion as CarbonAccordion } from '@carbon/react';
|
|
4
4
|
import { accordion } from './Accordion.module.scss';
|
|
5
5
|
import { Row, Column } from '../Grid';
|
|
6
6
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
.accordion :global(.
|
|
1
|
+
.accordion :global(.cds--accordion__content) {
|
|
2
2
|
padding-right: 4rem;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.accordion :global(.
|
|
5
|
+
.accordion :global(.cds--accordion__heading) {
|
|
6
6
|
padding-top: $spacing-04;
|
|
7
7
|
padding-bottom: $spacing-04;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.accordion :global(.
|
|
11
|
-
@include
|
|
10
|
+
.accordion :global(.cds--accordion__title) {
|
|
11
|
+
@include type-style('heading-02');
|
|
12
12
|
padding-right: $spacing-07;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.accordion :global(.
|
|
16
|
-
@include
|
|
15
|
+
.accordion :global(.cds--accordion__content) p {
|
|
16
|
+
@include type-style('body-long-02');
|
|
17
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
|
-
import { AccordionItem as CarbonAccordionItem } from 'carbon
|
|
3
|
+
import { AccordionItem as CarbonAccordionItem } from '@carbon/react';
|
|
4
4
|
|
|
5
5
|
const AccordionItem = ({ className, children, ...rest }) => (
|
|
6
6
|
<CarbonAccordionItem {...rest} className={cx(className)}>
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Link } from 'gatsby';
|
|
4
|
-
import {
|
|
4
|
+
import { ArrowRight, Information } from '@carbon/react/icons';
|
|
5
5
|
|
|
6
6
|
const AlertBanner = ({ alertText, buttonText }) => (
|
|
7
7
|
<aside aria-label="alert banner" className="website-alert">
|
|
8
|
-
<
|
|
8
|
+
<Information size={20} className="website-alert__icon" />
|
|
9
9
|
<p className="website-alert__text">{alertText}</p>
|
|
10
10
|
<Link
|
|
11
11
|
className="website-alert__button"
|
|
12
12
|
tabIndex="-1"
|
|
13
13
|
to="/updates/v10-migration/overview">
|
|
14
|
-
<button
|
|
14
|
+
<button
|
|
15
|
+
className="cds--btn cds--btn--secondary cds--btn--sm"
|
|
16
|
+
type="button">
|
|
15
17
|
{buttonText}
|
|
16
|
-
<
|
|
18
|
+
<ArrowRight size={20} />
|
|
17
19
|
</button>
|
|
18
20
|
</Link>
|
|
19
21
|
</aside>
|
|
20
22
|
);
|
|
21
|
-
|
|
22
23
|
AlertBanner.propTypes = {
|
|
23
24
|
alertText: PropTypes.string.isRequired,
|
|
24
25
|
buttonText: PropTypes.string.isRequired,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
--space: 32px;
|
|
4
4
|
|
|
5
|
-
@include
|
|
5
|
+
@include breakpoint('lg') {
|
|
6
6
|
width: 66.67%;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.link {
|
|
15
|
-
@include
|
|
15
|
+
@include type-style('expressive-heading-03', true);
|
|
16
16
|
position: relative;
|
|
17
17
|
display: inline-block;
|
|
18
|
-
transition: color $transition
|
|
18
|
+
transition: color $transition-base;
|
|
19
19
|
color: currentColor;
|
|
20
20
|
text-decoration: none;
|
|
21
21
|
margin-bottom: $spacing-03;
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.list--small .link {
|
|
38
|
-
@include
|
|
38
|
+
@include type-style('body-long-02');
|
|
39
39
|
margin-bottom: 0;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// Multiple Columns
|
|
43
43
|
.multiple-columns {
|
|
44
|
-
@include
|
|
44
|
+
@include breakpoint('md') {
|
|
45
45
|
column-count: 2;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -3,15 +3,12 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import cx from 'classnames';
|
|
4
4
|
import { Link } from 'gatsby';
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} from '@carbon/icons
|
|
12
|
-
import { settings } from 'carbon-components';
|
|
13
|
-
|
|
14
|
-
const { prefix } = settings;
|
|
6
|
+
Launch,
|
|
7
|
+
Download,
|
|
8
|
+
ArrowRight,
|
|
9
|
+
Error,
|
|
10
|
+
Email,
|
|
11
|
+
} from '@carbon/react/icons';
|
|
15
12
|
|
|
16
13
|
export default class ArticleCard extends React.Component {
|
|
17
14
|
render() {
|
|
@@ -30,69 +27,64 @@ export default class ArticleCard extends React.Component {
|
|
|
30
27
|
...rest
|
|
31
28
|
} = this.props;
|
|
32
29
|
|
|
30
|
+
// const prefix = 'cds';
|
|
31
|
+
|
|
33
32
|
let isLink;
|
|
34
33
|
if (href !== undefined) {
|
|
35
34
|
isLink = href.charAt(0) === '/';
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
const ArticleCardClassNames = cx(className,
|
|
39
|
-
[
|
|
40
|
-
[
|
|
37
|
+
const ArticleCardClassNames = cx(className, `cds--article-card`, {
|
|
38
|
+
[`cds--article-card--disabled`]: disabled,
|
|
39
|
+
[`cds--article-card--dark`]: color === 'dark',
|
|
41
40
|
});
|
|
42
41
|
|
|
43
42
|
const aspectRatioClassNames = cx(
|
|
44
|
-
[
|
|
45
|
-
[
|
|
43
|
+
[`cds--aspect-ratio`],
|
|
44
|
+
[`cds--aspect-ratio--2x1`]
|
|
46
45
|
);
|
|
47
46
|
|
|
48
47
|
const cardContentClassNames = cx(
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
48
|
+
[`cds--tile`],
|
|
49
|
+
[`cds--tile--clickable`],
|
|
50
|
+
[`cds--article-card_content`]
|
|
52
51
|
);
|
|
53
52
|
|
|
54
53
|
const cardContent = (
|
|
55
54
|
<>
|
|
56
|
-
<div className=
|
|
55
|
+
<div className="cds--article-card__img">{children}</div>
|
|
57
56
|
<div className={aspectRatioClassNames}>
|
|
58
|
-
<div
|
|
59
|
-
className={`${prefix}--aspect-ratio--object ${prefix}--article-card__tile`}>
|
|
57
|
+
<div className="cds--aspect-ratio--object cds--article-card__tile">
|
|
60
58
|
{subTitle ? (
|
|
61
|
-
<h5 className=
|
|
62
|
-
{subTitle}
|
|
63
|
-
</h5>
|
|
59
|
+
<h5 className="cds--article-card__subtitle">{subTitle}</h5>
|
|
64
60
|
) : null}
|
|
65
61
|
{title ? (
|
|
66
|
-
<h4 className=
|
|
62
|
+
<h4 className="cds--article-card__title">{title}</h4>
|
|
67
63
|
) : null}
|
|
68
|
-
<div className=
|
|
64
|
+
<div className="cds--article-card__info">
|
|
69
65
|
{author ? (
|
|
70
|
-
<p className=
|
|
71
|
-
) : null}
|
|
72
|
-
{date ? (
|
|
73
|
-
<p className={`${prefix}--article-card__date`}>{date}</p>
|
|
66
|
+
<p className="cds--article-card__author">{author}</p>
|
|
74
67
|
) : null}
|
|
68
|
+
{date ? <p className="cds--article-card__date">{date}</p> : null}
|
|
75
69
|
{readTime ? (
|
|
76
|
-
<p className=
|
|
77
|
-
{readTime}
|
|
78
|
-
</p>
|
|
70
|
+
<p className="cds--article-card__read-time">{readTime}</p>
|
|
79
71
|
) : null}
|
|
80
72
|
</div>
|
|
81
|
-
<div className=
|
|
73
|
+
<div className="cds--article-card__icon--action">
|
|
82
74
|
{actionIcon === 'launch' && !disabled ? (
|
|
83
|
-
<
|
|
75
|
+
<Launch size={20} aria-label="Open" />
|
|
84
76
|
) : null}
|
|
85
77
|
{actionIcon === 'arrowRight' && !disabled ? (
|
|
86
|
-
<
|
|
78
|
+
<ArrowRight size={20} aria-label="Open" />
|
|
87
79
|
) : null}
|
|
88
80
|
{actionIcon === 'download' && !disabled ? (
|
|
89
|
-
<
|
|
81
|
+
<Download size={20} aria-label="Download" />
|
|
90
82
|
) : null}
|
|
91
83
|
{actionIcon === 'email' && !disabled ? (
|
|
92
|
-
<
|
|
84
|
+
<Email size={20} aria-label="Email" />
|
|
93
85
|
) : null}
|
|
94
86
|
{actionIcon === 'disabled' || disabled === true ? (
|
|
95
|
-
<
|
|
87
|
+
<Error size={20} aria-label="disabled" />
|
|
96
88
|
) : null}
|
|
97
89
|
</div>
|
|
98
90
|
</div>
|
|
@@ -1,37 +1,55 @@
|
|
|
1
|
-
|
|
1
|
+
// $carbon--white-0
|
|
2
|
+
@use '@carbon/react/scss/colors' as *;
|
|
3
|
+
// $spacing-0X
|
|
4
|
+
@use '@carbon/react/scss/spacing' as *;
|
|
5
|
+
// carbon--type-style
|
|
6
|
+
@use '@carbon/react/scss/type' as *;
|
|
7
|
+
// color tokens
|
|
8
|
+
@use '@carbon/react/scss/compat/theme' as *;
|
|
9
|
+
// $standard-easing $transition-x
|
|
10
|
+
@use '@carbon/react/scss/motion' as *;
|
|
11
|
+
// carbon--breakpoint
|
|
12
|
+
@use '@carbon/react/scss/breakpoint' as *;
|
|
13
|
+
|
|
14
|
+
.cds--article-card .cds--tile {
|
|
2
15
|
background: $ui-01;
|
|
3
16
|
height: 100%;
|
|
4
17
|
padding: 0;
|
|
5
18
|
position: relative;
|
|
6
|
-
transition: background $duration
|
|
19
|
+
transition: background $duration-fast-01;
|
|
7
20
|
text-decoration: none;
|
|
8
|
-
@include
|
|
21
|
+
@include breakpoint('lg') {
|
|
9
22
|
margin-bottom: var(--space);
|
|
10
23
|
}
|
|
11
24
|
}
|
|
12
25
|
|
|
13
|
-
|
|
14
|
-
|
|
26
|
+
.cds--article-card__tile {
|
|
27
|
+
padding: $spacing-05 25% $spacing-05 $spacing-05;
|
|
15
28
|
}
|
|
16
29
|
|
|
17
|
-
|
|
18
|
-
|
|
30
|
+
// Dark
|
|
31
|
+
.cds--article-card--dark .cds--article-card__tile {
|
|
32
|
+
background: $gray-90; //$ui-background for gray 90 theme
|
|
19
33
|
}
|
|
20
34
|
|
|
21
|
-
|
|
22
|
-
|
|
35
|
+
.cds--article-card:hover .cds--article-card__tile {
|
|
36
|
+
background: $hover-ui;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.cds--article-card__title {
|
|
40
|
+
@include type-style('body-short-02');
|
|
23
41
|
text-decoration: none;
|
|
24
42
|
color: $text-01;
|
|
25
43
|
}
|
|
26
44
|
|
|
27
|
-
|
|
28
|
-
@include
|
|
45
|
+
.cds--article-card__subtitle {
|
|
46
|
+
@include type-style('heading-01');
|
|
29
47
|
font-weight: 400;
|
|
30
48
|
text-decoration: none;
|
|
31
49
|
color: $text-01;
|
|
32
50
|
}
|
|
33
51
|
|
|
34
|
-
|
|
52
|
+
.cds--article-card__info {
|
|
35
53
|
position: absolute;
|
|
36
54
|
bottom: 1rem;
|
|
37
55
|
left: 1rem;
|
|
@@ -39,22 +57,22 @@
|
|
|
39
57
|
color: $text-02;
|
|
40
58
|
}
|
|
41
59
|
|
|
42
|
-
|
|
43
|
-
@include
|
|
60
|
+
.cds--article-card__info p {
|
|
61
|
+
@include type-style('caption-01');
|
|
44
62
|
}
|
|
45
63
|
|
|
46
64
|
// At the moment, we force 16:9 for medium posts, this
|
|
47
65
|
// is how we would force 16:9 for all article cards
|
|
48
66
|
//
|
|
49
|
-
//
|
|
67
|
+
// .cds--article-card__img {
|
|
50
68
|
// aspect-ratio: 16 / 9;
|
|
51
69
|
// }
|
|
52
70
|
|
|
53
|
-
|
|
71
|
+
.cds--article-card__img .gatsby-resp-image-wrapper {
|
|
54
72
|
margin-bottom: 0;
|
|
55
73
|
}
|
|
56
74
|
|
|
57
|
-
|
|
75
|
+
.cds--article-card__icon--action {
|
|
58
76
|
position: absolute;
|
|
59
77
|
bottom: 1rem;
|
|
60
78
|
right: 1rem;
|
|
@@ -62,71 +80,62 @@
|
|
|
62
80
|
height: 20px;
|
|
63
81
|
}
|
|
64
82
|
|
|
65
|
-
|
|
83
|
+
.cds--article-card__icon--action svg {
|
|
66
84
|
fill: $icon-01;
|
|
67
85
|
}
|
|
68
86
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
background: $carbon--gray-90; //$ui-background for gray 90 theme
|
|
87
|
+
.cds--article-card--dark:hover .cds--article-card__tile {
|
|
88
|
+
background: $gray-80; //$hover-ui for gray 90 theme
|
|
72
89
|
}
|
|
73
90
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.#{$prefix}--article-card--dark .#{$prefix}--article-card__title,
|
|
79
|
-
.#{$prefix}--article-card--dark .#{$prefix}--article-card__subtitle {
|
|
91
|
+
.cds--article-card--dark .cds--article-card__title,
|
|
92
|
+
.cds--article-card--dark .cds--article-card__subtitle {
|
|
80
93
|
color: $text-04;
|
|
81
94
|
}
|
|
82
95
|
|
|
83
|
-
|
|
84
|
-
color: $
|
|
96
|
+
.cds--article-card--dark .cds--article-card__info {
|
|
97
|
+
color: $gray-30; //$text-02 for gray 90 theme
|
|
85
98
|
}
|
|
86
99
|
|
|
87
|
-
|
|
88
|
-
fill: $
|
|
100
|
+
.cds--article-card--dark .cds--article-card__icon--action svg {
|
|
101
|
+
fill: $gray-10; //$icon-01 for grsay 90 theme
|
|
89
102
|
}
|
|
90
103
|
|
|
91
104
|
// Disabled
|
|
92
|
-
|
|
105
|
+
.cds--article-card--disabled {
|
|
93
106
|
cursor: not-allowed;
|
|
94
107
|
}
|
|
95
108
|
|
|
96
|
-
|
|
109
|
+
.cds--article-card--disabled .cds--article-card__tile:hover {
|
|
97
110
|
background: $ui-01;
|
|
98
111
|
cursor: not-allowed;
|
|
99
112
|
}
|
|
100
113
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
114
|
+
.cds--article-card--disabled .cds--article-card__title,
|
|
115
|
+
.cds--article-card--disabled .cds--article-card__subtitle,
|
|
116
|
+
.cds--article-card--disabled .cds--article-card__info {
|
|
104
117
|
color: $disabled-03;
|
|
105
118
|
}
|
|
106
119
|
|
|
107
|
-
|
|
108
|
-
.#{$prefix}--article-card__icon--action
|
|
109
|
-
svg {
|
|
120
|
+
.cds--article-card--disabled .cds--article-card__icon--action svg {
|
|
110
121
|
fill: $disabled-02;
|
|
111
122
|
}
|
|
112
123
|
|
|
113
124
|
// Disabled dark
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
background: $
|
|
125
|
+
.cds--article-card--disabled.cds--article-card--dark
|
|
126
|
+
.cds--article-card__tile:hover {
|
|
127
|
+
background: $gray-90; //$ui-background for gray 90 theme
|
|
117
128
|
}
|
|
118
129
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
.#{$prefix}--article-card__info {
|
|
125
|
-
color: $carbon--gray-50; //$disabled-03 for gray 90
|
|
130
|
+
.cds--article-card--disabled.cds--article-card--dark .cds--article-card__title,
|
|
131
|
+
.cds--article-card--disabled.cds--article-card--dark
|
|
132
|
+
.cds--article-card__subtitle,
|
|
133
|
+
.cds--article-card--disabled.cds--article-card--dark .cds--article-card__info {
|
|
134
|
+
color: $gray-50; //$disabled-03 for gray 90
|
|
126
135
|
}
|
|
127
136
|
|
|
128
|
-
|
|
129
|
-
|
|
137
|
+
.cds--article-card--disabled.cds--article-card--dark
|
|
138
|
+
.cds--article-card__icon--action
|
|
130
139
|
svg {
|
|
131
|
-
fill: $
|
|
140
|
+
fill: $gray-70; //$disabled-02 for gray 90
|
|
132
141
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
.aside {
|
|
2
|
-
@include
|
|
2
|
+
@include type-style('body-long-01');
|
|
3
3
|
position: relative;
|
|
4
4
|
padding-top: $spacing-04;
|
|
5
5
|
top: -$spacing-04;
|
|
6
6
|
display: none;
|
|
7
7
|
|
|
8
|
-
@include
|
|
8
|
+
@include breakpoint('md') {
|
|
9
9
|
display: block;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
@include
|
|
12
|
+
@include breakpoint('lg') {
|
|
13
13
|
padding-right: 26%; //spacing values came from IDL site design
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
content: none;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
:global(
|
|
32
|
-
@include
|
|
31
|
+
:global(.cds--row) .aside p {
|
|
32
|
+
@include type-style('body-long-01');
|
|
33
33
|
width: 100%;
|
|
34
34
|
padding-right: 0;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
// dark background
|
|
38
38
|
:global(.container--dark) .aside:before {
|
|
39
|
-
background: $
|
|
39
|
+
background: $white-0;
|
|
40
40
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import useMedia from 'use-media';
|
|
3
3
|
import { breakpoints } from '@carbon/elements';
|
|
4
|
-
import {
|
|
4
|
+
import { Link } from '@carbon/react/icons';
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import slugify from 'slugify';
|
|
7
7
|
|
|
@@ -23,7 +23,7 @@ const Anchor = ({ id, string, position }) => {
|
|
|
23
23
|
className={anchorClasses}
|
|
24
24
|
href={`#${id}`}
|
|
25
25
|
aria-label={`${string} permalink`}>
|
|
26
|
-
<Link />
|
|
26
|
+
<Link size={20} />
|
|
27
27
|
</a>
|
|
28
28
|
);
|
|
29
29
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
.anchor {
|
|
6
6
|
opacity: 0;
|
|
7
|
-
transition: opacity $duration
|
|
7
|
+
transition: opacity $duration-fast-01 $standard-easing;
|
|
8
8
|
|
|
9
9
|
&:hover,
|
|
10
10
|
&:active,
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
margin-left: $spacing-03;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
@include
|
|
35
|
+
@include breakpoint('md') {
|
|
36
36
|
.header:hover .anchor {
|
|
37
37
|
opacity: 1;
|
|
38
38
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { UpToTop } from '@carbon/react/icons';
|
|
3
3
|
import { button } from './BackToTopBtn.module.scss';
|
|
4
4
|
|
|
5
5
|
const BackToTopBtn = () => (
|
|
@@ -8,7 +8,7 @@ const BackToTopBtn = () => (
|
|
|
8
8
|
className={button}
|
|
9
9
|
type="button"
|
|
10
10
|
aria-label="Back to Top">
|
|
11
|
-
<
|
|
11
|
+
<UpToTop size={20} />
|
|
12
12
|
</button>
|
|
13
13
|
);
|
|
14
14
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
border-radius: 50%;
|
|
5
5
|
border-color: transparent;
|
|
6
6
|
background: $interactive-02; //g60
|
|
7
|
-
transition: all $duration
|
|
7
|
+
transition: all $duration-fast-02;
|
|
8
8
|
z-index: z('modal');
|
|
9
9
|
padding-top: 0.325rem;
|
|
10
10
|
cursor: pointer;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
bottom: $spacing-06;
|
|
13
13
|
right: $spacing-05;
|
|
14
14
|
|
|
15
|
-
@include
|
|
15
|
+
@include breakpoint('md') {
|
|
16
16
|
bottom: $spacing-09;
|
|
17
17
|
right: $spacing-07;
|
|
18
18
|
}
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
[class*='container--dark'] {
|
|
36
36
|
.button {
|
|
37
|
-
background: $
|
|
37
|
+
background: $gray-60;
|
|
38
38
|
&:hover {
|
|
39
39
|
background: #606060;
|
|
40
40
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
.caption {
|
|
2
|
-
@include
|
|
2
|
+
@include type-style('body-short-01');
|
|
3
3
|
--space: #{$spacing-05};
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
// Responsive by default
|
|
7
7
|
.caption-responsive {
|
|
8
8
|
// 6/8 columns
|
|
9
|
-
@include
|
|
9
|
+
@include breakpoint('md') {
|
|
10
10
|
width: 75%;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
// 6/12 columns wide
|
|
14
|
-
@include
|
|
14
|
+
@include breakpoint('lg') {
|
|
15
15
|
width: 50%;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// If caption is inside a user specified row then allow the grid code to set the width
|
|
20
|
-
:global(
|
|
20
|
+
:global(.cds--row) .caption {
|
|
21
21
|
width: 100%;
|
|
22
22
|
}
|