Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add data viz section to website #287

Merged
merged 137 commits into from
Oct 3, 2019
Merged
Show file tree
Hide file tree
Changes from 133 commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
37f8cc3
feat: update charts nav
alisonjoseph Sep 4, 2019
e00a5fd
feat: add stacked bar example (from codepen)
alisonjoseph Sep 4, 2019
a5e5daf
chore: add donut
alisonjoseph Sep 4, 2019
4c6a40c
chore: remove donut chart
alisonjoseph Sep 4, 2019
3bc5209
chore: remove chart import
alisonjoseph Sep 4, 2019
694d23d
Merge pull request #232 from alisonjoseph/charts
alisonjoseph Sep 4, 2019
a8f15e7
Merge branch 'master' of github.com:carbon-design-system/carbon-www i…
alisonjoseph Sep 5, 2019
b98a2b6
chore: attempt to get charts working
alisonjoseph Sep 6, 2019
a653007
chore: add bar chart types
alisonjoseph Sep 6, 2019
cb82df9
chore: cleanup old file
alisonjoseph Sep 6, 2019
b27940c
chore: upgrade carbon charts
alisonjoseph Sep 10, 2019
0d7234b
Merge branch 'master' into charts
alisonjoseph Sep 10, 2019
7dbaff6
chore: add d3
alisonjoseph Sep 10, 2019
28dcd99
chore: update nav
alisonjoseph Sep 10, 2019
7f0a4d9
Merge branch 'master' of github.com:carbon-design-system/carbon-www i…
alisonjoseph Sep 11, 2019
7c07971
chore: test
alisonjoseph Sep 11, 2019
265d711
feat: import charts directly to mdx
alisonjoseph Sep 11, 2019
172d2d9
chore: add width and height
alisonjoseph Sep 11, 2019
d549525
chore: missing style import
alisonjoseph Sep 11, 2019
9f74f75
chore: simplify demo data files
alisonjoseph Sep 11, 2019
b9cfb41
chore: fix
alisonjoseph Sep 11, 2019
cbc0a2e
chore: update yarn lock
alisonjoseph Sep 11, 2019
5575cf3
chore: update data
alisonjoseph Sep 11, 2019
5ee6b5a
chore: move data file
alisonjoseph Sep 11, 2019
e683c20
Merge pull request #257 from alisonjoseph/charts
alisonjoseph Sep 11, 2019
27b836e
chore: merge master
alisonjoseph Sep 17, 2019
3de74a2
add content Overview/elements
shixiedesign Sep 17, 2019
33f2d49
chore: add card
alisonjoseph Sep 17, 2019
1bab41b
no message
alisonjoseph Sep 17, 2019
9cc985c
add meter & gauge
shixiedesign Sep 17, 2019
ae4e1ed
img update
shixiedesign Sep 17, 2019
90e44f9
a few content fixes
shixiedesign Sep 17, 2019
6d917fb
add content / images / h2s
shixiedesign Sep 17, 2019
9b44d3a
feat: add overview card
alisonjoseph Sep 17, 2019
096ff60
Merge branch 'data-viz' of github.com:carbon-design-system/carbon-www…
alisonjoseph Sep 17, 2019
0de1c93
chore: cleanup unused css
alisonjoseph Sep 17, 2019
ee98f76
chore: merge master
alisonjoseph Sep 17, 2019
ba46107
chore: update content
alisonjoseph Sep 18, 2019
4ebbdd8
chore: update first chart example
alisonjoseph Sep 18, 2019
01d4258
chore: test
alisonjoseph Sep 18, 2019
d5bdc1f
image update, content tweaks
shixiedesign Sep 18, 2019
39e6c05
move scatterplot to coorelation
shixiedesign Sep 19, 2019
dc63595
add content & horiz bar
shixiedesign Sep 19, 2019
58dbf2d
renamed files
shixiedesign Sep 19, 2019
58ff2ae
chore: add develop pages for data viz
alisonjoseph Sep 20, 2019
78a6531
chore: add dummy content
alisonjoseph Sep 20, 2019
b1d3435
docs: copy changes
connor-leech Sep 20, 2019
e2d040c
docs: copy tweaks
connor-leech Sep 20, 2019
72dc14e
Merge branch 'data-viz' of https://github.com/carbon-design-system/ca…
connor-leech Sep 20, 2019
78645f5
chore: update to latest theme (to get notifications)
alisonjoseph Sep 20, 2019
31f6ca4
fix: tab order
alisonjoseph Sep 20, 2019
b71f393
add palette page
shixiedesign Sep 21, 2019
7808ed5
mobile layout sweep
shixiedesign Sep 23, 2019
b68119d
chore: merge
alisonjoseph Sep 23, 2019
d4f810d
chore: merge from master
alisonjoseph Sep 23, 2019
d1018ac
docs: copy clean up
connor-leech Sep 23, 2019
89a96e5
Merge branch 'data-viz' of github.com:carbon-design-system/carbon-www…
alisonjoseph Sep 23, 2019
611995d
chore: fix tab order
alisonjoseph Sep 23, 2019
0bba9ea
mobile sweep
shixiedesign Sep 23, 2019
12e9f62
Merge branch 'data-viz' of github.com:carbon-design-system/carbon-web…
shixiedesign Sep 23, 2019
d3c90a0
docs: more copy tweaks
connor-leech Sep 23, 2019
973e018
adv charts img, layout
shixiedesign Sep 24, 2019
d5b9e88
resolve palette page conflict
shixiedesign Sep 24, 2019
e9a1169
bugfix so page builds
shixiedesign Sep 24, 2019
bc57d24
chore: pull upstream
alisonjoseph Sep 24, 2019
661e058
chore: remove old files
alisonjoseph Sep 25, 2019
baa3d3f
fix: typo and update to latest theme
alisonjoseph Sep 25, 2019
0c22357
fix: typo
alisonjoseph Sep 25, 2019
43cf5eb
fix: typo
alisonjoseph Sep 25, 2019
21836d8
docs: nav adjustment
connor-leech Sep 25, 2019
4260861
Merge branch 'data-viz' of https://github.com/carbon-design-system/ca…
connor-leech Sep 25, 2019
1d9a0bd
anatomy pg mobile style, legend page start
shixiedesign Sep 25, 2019
33d1986
legend continues
shixiedesign Sep 25, 2019
6238054
inline notification set to info
shixiedesign Sep 26, 2019
3bb9125
fix: broken links
alisonjoseph Sep 26, 2019
2ee77ce
legend ends
shixiedesign Sep 26, 2019
4cda5c2
docs: copy tweaks
connor-leech Sep 26, 2019
bb508b7
Merge branch 'data-viz' of https://github.com/carbon-design-system/ca…
connor-leech Sep 26, 2019
6917c2f
legends img fix
shixiedesign Sep 26, 2019
7aa9f07
notification fix
shixiedesign Sep 26, 2019
22c86df
docs: nav update
connor-leech Sep 26, 2019
dadaca3
Merge branch 'data-viz' of https://github.com/carbon-design-system/ca…
connor-leech Sep 26, 2019
ca12ff6
docs: fix
connor-leech Sep 26, 2019
cd7f07e
add datavis getting started instructions & demo updates (#401)
theiliad Sep 26, 2019
0a78a9b
chore: merge master
alisonjoseph Sep 26, 2019
c4fc3a9
img update
shixiedesign Sep 27, 2019
b3f4bba
dashboard
shixiedesign Sep 27, 2019
94701c6
axislabel start
shixiedesign Sep 27, 2019
71f689f
axis&label
shixiedesign Sep 27, 2019
224d75d
chart types img
shixiedesign Sep 27, 2019
1cd12c0
more chart type img
shixiedesign Sep 28, 2019
3da8ed7
chart type img all
shixiedesign Sep 28, 2019
6878c47
svg tweaks
shixiedesign Sep 29, 2019
2eba762
first 3 pages small fixes
shixiedesign Sep 29, 2019
30f0721
Merge branch 'data-viz' of github.com:carbon-design-system/carbon-web…
theiliad Sep 30, 2019
81e51fa
palette page + tweaks
shixiedesign Sep 30, 2019
6cfa3b8
add scatter demos
theiliad Sep 30, 2019
8873c77
move scatter demo to the right place on page
theiliad Sep 30, 2019
9cf440b
docs: more edits
connor-leech Oct 1, 2019
f55e4f8
typo img fix
shixiedesign Oct 1, 2019
7bc180f
Update src/pages/data-visualization/axis-and-labels/index.mdx
shixiedesign Oct 1, 2019
1cf4b88
Update src/pages/data-visualization/axis-and-labels/index.mdx
shixiedesign Oct 1, 2019
32eb36d
Update src/pages/data-visualization/getting-started/shared-data-optio…
shixiedesign Oct 1, 2019
66de751
Update src/pages/data-visualization/legends/index.mdx
shixiedesign Oct 1, 2019
31b801f
Update src/pages/data-visualization/legends/index.mdx
shixiedesign Oct 1, 2019
ce91f10
Update src/pages/data-visualization/legends/index.mdx
shixiedesign Oct 1, 2019
c2fc2bf
Update src/pages/data-visualization/legends/index.mdx
shixiedesign Oct 1, 2019
d141974
Update src/pages/data-visualization/axis-and-labels/index.mdx
shixiedesign Oct 1, 2019
59662a1
Merge branch 'data-viz' of github.com:carbon-design-system/carbon-web…
shixiedesign Oct 1, 2019
8b88812
palette page polish
shixiedesign Oct 1, 2019
29956f3
img sweep legends & axes
shixiedesign Oct 1, 2019
eb526a2
mobile imgs
shixiedesign Oct 1, 2019
09c1cab
Merge branch 'data-viz' into data-viz-updates
theiliad Oct 1, 2019
7105141
example charts img pass
shixiedesign Oct 1, 2019
5bf46c6
Update src/pages/data-visualization/axis-and-labels/index.mdx
shixiedesign Oct 1, 2019
2a1a7b2
Merge branch 'data-viz' of https://github.com/carbon-design-system/ca…
connor-leech Oct 1, 2019
c6f6bfe
Merge pull request #413 from theiliad/data-viz-updates
connor-leech Oct 1, 2019
700c579
Merge branch 'master' into data-viz
connor-leech Oct 1, 2019
dfe3623
img clean, chart types fixes
shixiedesign Oct 1, 2019
d5d6039
more fixes
shixiedesign Oct 1, 2019
c69f20b
img tweaks
shixiedesign Oct 1, 2019
939da61
palette page final + fixes
shixiedesign Oct 2, 2019
87e7f85
mobile img, svg fix
shixiedesign Oct 2, 2019
a3f7acd
svg fix
shixiedesign Oct 2, 2019
48966bc
Merge branch 'master' into data-viz
alisonjoseph Oct 2, 2019
795d628
dark palette fix
shixiedesign Oct 2, 2019
36e3eee
Merge branch 'data-viz' of github.com:carbon-design-system/carbon-web…
shixiedesign Oct 2, 2019
35c3637
small fixes, add resource cards
shixiedesign Oct 2, 2019
d40e4f0
update charts version to reflect new color palette (#424)
theiliad Oct 2, 2019
0dad004
Update OverviewCard.js
alisonjoseph Oct 2, 2019
f24d7f4
Update data-visualization.scss
alisonjoseph Oct 2, 2019
1788b08
Update index.mdx
alisonjoseph Oct 2, 2019
5b59ead
Update src/pages/data-visualization/color-palettes/index.mdx
alisonjoseph Oct 2, 2019
2bceda0
spelling fix
alisonjoseph Oct 2, 2019
683a57d
docs: final copy pass
connor-leech Oct 2, 2019
3131d90
Merge branch 'data-viz' of https://github.com/carbon-design-system/ca…
connor-leech Oct 2, 2019
40803e5
Merge branch 'master' into data-viz
shixiedesign Oct 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"timestamp": "./build-timestamp.sh"
},
"dependencies": {
"@carbon/charts": "0.16.8",
"@carbon/charts-react": "0.16.8",
"@carbon/elements": "^10.6.0",
"@carbon/icons": "^10.6.0",
"@carbon/icons-react": "^10.6.0",
Expand All @@ -25,11 +27,12 @@
"carbon-components-react": "^7.6.0",
"change-case": "^3.1.0",
"classnames": "^2.2.6",
"d3": "^5.12.0",
"gatsby": "^2.13.73",
"gatsby-plugin-compile-es6-packages": "^2.1.0",
"gatsby-plugin-lodash": "^3.1.3",
"gatsby-plugin-remove-serviceworker": "^1.0.0",
"gatsby-theme-carbon": "^1.11.6",
"gatsby-theme-carbon": "^1.14.2",
"html-loader": "^0.5.5",
"lodash": "^4.17.15",
"markdown-it": "^9.0.1",
Expand Down
96 changes: 96 additions & 0 deletions src/components/OverviewCard/OverviewCard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { Link } from 'gatsby';
import { Tag } from 'carbon-components-react';

export default class OverviewCard extends React.Component {
static propTypes = {
children: PropTypes.node,

/**
* Add tag
*/
tag: PropTypes.string,

/**
* Set url for card
*/
href: PropTypes.string,

/**
* LTitle
*/
title: PropTypes.string,

/**
* Use for disabled card
*/
disabled: PropTypes.bool,

/**
* Specify a custom class
*/
className: PropTypes.string,
};

static defaultProps = {
disabled: false,
};

render() {
const { children, href, title, disabled, className, tag } = this.props;

let isLink;
if (href !== undefined) {
isLink = href.charAt(0) === '/';
}

const OverviewCardClassNames = classnames([`overview-card`], {
[className]: className,
[`overview-card--disabled`]: disabled,
});

const carbonTileclassNames = classnames(
[`bx--tile`],
[`bx--tile--clickable`]
);

const cardContent = (
<>
<h4 className="overview-card__title">{title}</h4>
{tag && <Tag type="teal">{tag}</Tag>}
<div className={`overview-card__img`}>{children}</div>
</>
);

let cardContainer;
if (disabled === true) {
cardContainer = <div className={carbonTileclassNames}>{cardContent}</div>;
} else if (isLink === true) {
cardContainer = (
<Link to={href} className={carbonTileclassNames}>
{cardContent}
</Link>
);
} else {
cardContainer = (
<a
target="_blank"
rel="noopener noreferrer"
href={href}
className={carbonTileclassNames}>
{cardContent}
</a>
);
}

return (
<div className={OverviewCardClassNames}>
<div className="bx--aspect-ratio--1x1">
<div className="bx--aspect-ratio--object">{cardContainer}</div>
</div>
</div>
);
}
}
3 changes: 3 additions & 0 deletions src/components/OverviewCard/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import OverviewCard from './OverviewCard';

export default OverviewCard;
22 changes: 22 additions & 0 deletions src/components/OverviewCard/overview-card-group.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.overview-card-group {
margin: $spacing-05 0 $spacing-07;
}

.overview-card-group .overview-card {
border-top: 1px solid $carbon--gray-20;
border-left: 1px solid $carbon--gray-20;
}

.overview-card-group .#{$prefix}--col-sm-2:nth-child(-n + 2) .overview-card {
border-top: 0px solid transparent;
}

@include carbon--breakpoint('md') {
.overview-card-group .#{$prefix}--col-lg-3:nth-child(-n + 4) .overview-card {
border-top: 0px solid transparent;
}

.overview-card-group .#{$prefix}--col-lg-3:nth-child(4n-7) .overview-card {
border-left: 0px solid transparent;
}
}
71 changes: 71 additions & 0 deletions src/components/OverviewCard/overview-card.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.overview-card {
position: relative;
}

.overview-card .#{$prefix}--tile {
height: 100%;
padding: $spacing-05;
position: relative;
text-decoration: none;
background: $carbon--white-0;
transition: background $transition--base;
display: flex;
justify-content: space-between;

&:hover {
background: $hover-ui;
}

&:active {
background: $active-ui;
}
}

.overview-card__title {
@include carbon--type-style('body-short-01');
text-decoration: none;
color: $text-01;
position: relative;
z-index: 1;
}

.overview-card .bx--tag {
margin-top: -0.25rem;
white-space: nowrap;
}

// Image
.overview-card__img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
}

.overview-card__img .gatsby-resp-image-wrapper,
.overview-card__img img[src*='svg'],
.overview-card__img img[src*='gif'] {
position: relative;
width: 100%;
height: 100%;
max-width: 100% !important;
top: -1px;
left: -1px;
Comment on lines +54 to +55
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to use our rem() function here?

background: transparent;
}

.overview-card .#{$prefix}--tile:hover .overview-card__img:after {
opacity: 1;
}

// Disabled
.overview-card--disabled .#{$prefix}--tile:hover {
background: $carbon--white-0;
cursor: not-allowed;
}

.overview-card--disabled .overview-card__title {
color: $disabled-03;
}
Loading