Skip to content

Commit

Permalink
Merge branch 'main' into docs-status-indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
janchild authored May 17, 2021
2 parents 9754045 + 5059b67 commit d19f353
Show file tree
Hide file tree
Showing 34 changed files with 304 additions and 202 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,24 @@
"/node_modules/*"
],
"resolutions": {
"carbon-components": "^10.34.0",
"carbon-components-react": "^7.34.0",
"@carbon/elements": "^10.33.0",
"@carbon/icons": "^10.31.0",
"@carbon/icons-react": "^10.31.0",
"carbon-components": "^10.35.0",
"carbon-components-react": "^7.35.0",
"@carbon/elements": "^10.34.0",
"@carbon/icons": "^10.32.0",
"@carbon/icons-react": "^10.32.0",
"gatsby-remark-images": "^3.3.33"
},
"dependencies": {
"@carbon/charts-react": "0.41.62",
"@carbon/elements": "^10.33.0",
"@carbon/icons": "^10.31.0",
"@carbon/icons-react": "^10.31.0",
"@carbon/pictograms": "^11.9.0",
"@carbon/pictograms-react": "^11.9.0",
"@carbon/elements": "^10.34.0",
"@carbon/icons": "^10.32.0",
"@carbon/icons-react": "^10.32.0",
"@carbon/pictograms": "^11.10.0",
"@carbon/pictograms-react": "^11.10.0",
"@loadable/component": "^5.12.0",
"@slack/web-api": "^5.11.0",
"carbon-components": "^10.34.0",
"carbon-components-react": "^7.34.0",
"carbon-components": "^10.35.0",
"carbon-components-react": "^7.35.0",
"change-case": "^4.1.1",
"classnames": "^2.2.6",
"codesandbox": "^2.1.10",
Expand Down
59 changes: 31 additions & 28 deletions src/components/ColorPalette/ColorPalette.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react';
import React, { useState, useEffect, useCallback } from 'react';
import { ContentSwitcher, Switch, Dropdown } from 'carbon-components-react';
import cx from 'classnames';
import {
Expand Down Expand Up @@ -85,37 +85,40 @@ const ColorPalette = ({ type, isMono, isDiverging }) => {
},
];

const onDropdownChange = (e) => {
const id = e.selectedItem ? e.selectedItem.id : e;

// update selected option
setGroupNumber(id);

// update colors rendered
switch (id) {
case 1:
setColorGroup(oneColor);
break;
case 2:
setColorGroup(twoColor);
break;
case 3:
setColorGroup(threeColor);
break;
case 4:
setColorGroup(fourColor);
break;
case 5:
setColorGroup(fiveColor);
break;
default:
}
};
const onDropdownChange = useCallback(
(e) => {
const id = e.selectedItem ? e.selectedItem.id : e;

// update selected option
setGroupNumber(id);

// update colors rendered
switch (id) {
case 1:
setColorGroup(oneColor);
break;
case 2:
setColorGroup(twoColor);
break;
case 3:
setColorGroup(threeColor);
break;
case 4:
setColorGroup(fourColor);
break;
case 5:
setColorGroup(fiveColor);
break;
default:
}
},
[oneColor, twoColor, threeColor, fourColor, fiveColor]
);

// Rerender color group values when theme is toggled
useEffect(() => {
onDropdownChange(groupNumber);
}, [dark]);
}, [groupNumber, onDropdownChange]);

// SWITCHER STUFF
const activateFirstSwitcher = () => {
Expand Down
8 changes: 6 additions & 2 deletions src/components/ComponentDemo/ComponentDemo.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,11 @@ body[data-live-preview-theme='Gray 100'] ul[class^='bx--overflow-menu-options'],
}

[class*='--content-switcher-btn'] {
height: 2.5rem;
height: 100%;
}

[class*='--loading-overlay'] {
position: static;
}

[class*='--overflow-menu__icon'] {
Expand Down Expand Up @@ -435,7 +439,7 @@ body[data-live-preview-theme='Gray 100'] ul[class^='bx--overflow-menu-options'],
}

body {
[class$='--tooltip'] {
[class$='bx--tooltip'] {
background-color: var(--cds-inverse-02, #393939);
}

Expand Down
7 changes: 5 additions & 2 deletions src/components/ComponentDemo/KnobContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ const Knob = ({
// eslint-disable-next-line no-useless-escape
const pattern = `<${component}(\\s?>|\\s[\\s\\S]*?>)`;
const componentPropsRegex = new RegExp(pattern);
const globalComponentPropsRegex = new RegExp(componentPropsRegex.source, 'g');

// stores whatever props are provided in the inital code
const defaultKnobProps = useDefaultProps(
Expand Down Expand Up @@ -176,10 +177,12 @@ const Knob = ({
setKnobs(newKnobs);
if (isSelfClosingTag) {
setCode(
code.replace(componentPropsRegex, `<${component}${propString} />`)
code.replace(globalComponentPropsRegex, `<${component}${propString} />`)
);
} else {
setCode(code.replace(componentPropsRegex, `<${component}${propString}>`));
setCode(
code.replace(globalComponentPropsRegex, `<${component}${propString}>`)
);
}
};

Expand Down
4 changes: 2 additions & 2 deletions src/components/ComponentIndexPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ const sortOptions = ['A to Z', 'Maintainer', 'Newest'];
const initialSortOption = 'A to Z';
const sortBy = {
'A to Z': sortByName,
'Maintainer': sortByMaintainer,
'Newest': sortByNewest,
Maintainer: sortByMaintainer,
Newest: sortByNewest,
};

const filterLabels = [
Expand Down
11 changes: 3 additions & 8 deletions src/components/data-visualization/ChartDemoGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@ import * as ChartComponents from '@carbon/charts-react';

import H2 from 'gatsby-theme-carbon/src/components/markdown/H2';
import P from 'gatsby-theme-carbon/src/components/markdown/P';
import { MiniCard } from 'gatsby-theme-carbon/src/components/MiniCard';
import CodeBar from '../ComponentDemo/Code/CodeBar.js';

import {
CardGroup,
MiniCard,
} from 'gatsby-theme-carbon/src/components/MiniCard';

import STORYBOOK_LOGO from '../../images/storybook-icon.svg';

const generateHeadingID = (title) =>
Expand All @@ -22,7 +17,7 @@ const generateHeadingID = (title) =>
const ChartDemoGroup = ({ demoGroup, light }) => {
let demo = demoGroup.demos.find((d) => d.mainDemo === true);
if (!demo) {
demo = demoGroup.demos[0];
[demo] = demoGroup.demos;
}

const DemoComponent = ChartComponents[demo.chartType.vanilla];
Expand Down Expand Up @@ -84,7 +79,7 @@ const ChartDemoGroup = ({ demoGroup, light }) => {
numberOfRemainingDemos > 1 ? 's' : ''
}`}
href={`https://carbon-design-system.github.io/carbon-charts/?path=/story/${demoGroupClassification}-charts-${demo.id}`}>
<img src={STORYBOOK_LOGO} style={{ height: 20 }} />
<img src={STORYBOOK_LOGO} alt="" style={{ height: 20 }} />
</MiniCard>
)}
</>
Expand Down
8 changes: 5 additions & 3 deletions src/data/docgen/react-docgen.json
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,8 @@
"name": "enum",
"value": [
{ "value": "'sm'", "computed": false },
{ "value": "'xl'", "computed": false }
{ "value": "'md'", "computed": false },
{ "value": "'lg'", "computed": false }
]
},
"required": false,
Expand Down Expand Up @@ -2021,11 +2022,12 @@
"name": "enum",
"value": [
{ "value": "'sm'", "computed": false },
{ "value": "'md'", "computed": false },
{ "value": "'xl'", "computed": false }
]
},
"required": false,
"description": "Specify the size of the Date Picker Input. Currently supports either `sm` or `xl` as an option."
"description": "Specify the size of the Date Picker Input. Currently supports either `sm`, `md`, or `xl` as an option."
}
}
},
Expand Down Expand Up @@ -3014,7 +3016,7 @@
"description": "Specify whether you want the loading indicator to be spinning or not"
},
"withOverlay": {
"defaultValue": { "value": "true", "computed": false },
"defaultValue": { "value": "false", "computed": false },
"type": { "name": "bool" },
"required": false,
"description": "Specify whether you want the loader to be applied with an overlay"
Expand Down
25 changes: 13 additions & 12 deletions src/data/nav-items.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@
path: /case-studies/consistency-in-the-cloud
- title: IBM Commerce Platform
path: /case-studies/ibm-commerce-platform
- title: What’s happening
pages:
- title: Releases
path: /whats-happening/releases/
- title: The v11 release
path: /whats-happening/v11-release/
- title: News and articles
path: /whats-happening/news-and-articles/
- title: Meetups
path: /whats-happening/meetups/
- title: Work in progress
path: /whats-happening/work-in-progress/
hasDivider: true
- title: Designing
pages:
- title: Get started
Expand Down Expand Up @@ -58,18 +71,6 @@
path: /contributing/contribute-pictograms/
- title: Add ons
path: /contributing/add-ons/
- title: What’s happening
pages:
- title: Releases
path: /whats-happening/releases/
- title: The v11 release
path: /whats-happening/v11-release/
- title: News and articles
path: /whats-happening/news-and-articles/
- title: Meetups
path: /whats-happening/meetups/
- title: Work in progress
path: /whats-happening/work-in-progress/
hasDivider: true
- title: Guidelines
pages:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 44 additions & 7 deletions src/pages/all-about-carbon/the-team.mdx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
title: The Carbon team
description:
Carbon is funded and built by IBM. That means we build for the company’s
business needs. Carbon is also an open source community-driven project. It is
available for anyone to use and everyone is encouraged to contribute.
Carbon’s designers, developers, and writers provide teams with universal
assets—elements, components, patterns, and code—and the guidance for how to
design and build with them.
---

<PageDescription>

Carbon supports its users with a dedicated team of designers, developers, and
writers working closely to support teams across the business to be productive
and successful in designing digital experiences and products.
Carbon’s designers, developers, and writers provide teams with universal
assets—elements, components, patterns, and code—and the guidance for how to
design and build with them.

</PageDescription>

## The people
## Design system

<Row>

Expand Down Expand Up @@ -113,6 +113,7 @@ and successful in designing digital experiences and products.
![Jeannie Servaas headshot](/images/team/servaas_jean.png)

</Profile>

<Profile name="Scott Strubberg" title="Front-end Developer">

![Scott Strubberg headshot](/images/team/strubberg_scott.png)
Expand All @@ -124,3 +125,39 @@ and successful in designing digital experiences and products.

</Profile>
</Row>

## Data visualization

<Row>

<Profile name="Natasha Decoste" title="Software Developer">

![Natasha Decoste headshot](/images/team/decoste_natasha.png)

</Profile>
<Profile name="Zvonimir Fras" title="Software Developer">

![Zvonimir Fras headshot](/images/team/fras_zvonimir.png)

</Profile>
<Profile name="Nina Li" title="Project Manager">

![Nina Li headshot](/images/team/li_nina.png)

</Profile>
<Profile name="Eliad Moosavi" title="Senior Software Developer, Technical Lead">

![Eliad Moosavi headshot](/images/team/moosavi_eliad.png)

</Profile>
<Profile name="Cal Smith" title="Angular Technical Lead">

![Cal Smith headshot](/images/team/smith_cal.png)

</Profile>
<Profile name="Dean Williams" title="Senior Development Manager">

![Dean Williams headshot](/images/team/williams_dean.png)

</Profile>
</Row>
11 changes: 6 additions & 5 deletions src/pages/community/domain-guidance.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
---
title: Domain guidance
description:
These sites within the Carbon community include guidance, assets, and resources for all of IBM's digital
experiences from product to website. Some guidance is accessible to IBMers
only.
These sites within the Carbon community include guidance, assets, and
resources for all of IBM's digital experiences from product to website. Some
guidance is accessible to IBMers only.
---

<PageDescription>

These sites within the Carbon community include guidance, assets, and resources for all of IBM's digital
experiences from product to website. Some guidance is accessible to IBMers only.
These sites within the Carbon community include guidance, assets, and resources
for all of IBM's digital experiences from product to website. Some guidance is
accessible to IBMers only.

</PageDescription>

Expand Down
Binary file modified src/pages/components/button/images/button_usage_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d19f353

Please sign in to comment.