Skip to content

Commit

Permalink
Merge branch 'master' into 7647-link-02-token
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Feb 10, 2021
2 parents aa230ed + 6a495d5 commit 0f2be85
Show file tree
Hide file tree
Showing 170 changed files with 691 additions and 570 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"react"
],
"dependencies": {
"@babel/preset-env": "^7.12.13",
"jscodeshift": "^0.11.0"
}
}
3 changes: 3 additions & 0 deletions config/eslint-config-carbon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@
"eslint-plugin-react": "^7.18.0",
"eslint-plugin-react-hooks": "^4.0.4",
"eslint-restricted-globals": "^0.2.0"
},
"devDependencies": {
"prettier": "^2.2.1"
}
}
4 changes: 4 additions & 0 deletions config/jest-config-carbon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,9 @@
"enzyme-adapter-react-16": "^1.14.0",
"enzyme-to-json": "^3.3.5",
"jest-circus": "^26.0.1"
},
"devDependencies": {
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
}
1 change: 1 addition & 0 deletions config/stylelint-config-carbon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"stylelint-scss": "^3.13.0"
},
"devDependencies": {
"prettier": "^2.2.1",
"stylelint": "^13.6.0"
}
}
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"access": "public"
},
"dependencies": {
"@babel/core": "^7.12.13",
"@carbon/cli-reporter": "^10.4.0",
"@octokit/plugin-retry": "^3.0.7",
"@octokit/plugin-throttling": "^2.6.0",
Expand Down
9 changes: 9 additions & 0 deletions packages/components/src/components/ui-shell/_side-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,15 @@
height: mini-units(6);
}

//----------------------------------------------------------------------------
// Side-nav > Navigation > Divider
//----------------------------------------------------------------------------
.#{$prefix}--side-nav__divider {
height: 1px;
margin: $spacing-03 $spacing-05;
background-color: $ibm-color__gray-20;
}

//----------------------------------------------------------------------------
// Side-nav > Navigation > {Menu,Submenu}
//----------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions packages/icon-build-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"publishConfig": {
"access": "public"
},
"dependencies": {
"@babel/core": "^7.12.13"
},
"devDependencies": {
"@babel/preset-env": "^7.10.0",
"@babel/preset-react": "^7.10.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7023,6 +7023,13 @@ Map {
},
},
},
"SideNavDivider" => Object {
"propTypes": Object {
"className": Object {
"type": "string",
},
},
},
"SideNavFooter" => Object {
"defaultProps": Object {
"assistiveText": "Toggle opening or closing the side navigation",
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/__tests__/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ describe('Carbon Components React', () => {
"SelectableTile",
"SideNav",
"SideNavDetails",
"SideNavDivider",
"SideNavFooter",
"SideNavHeader",
"SideNavIcon",
Expand Down
27 changes: 27 additions & 0 deletions packages/react/src/components/UIShell/SideNavDivider.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Copyright IBM Corp. 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import { settings } from 'carbon-components';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';

const { prefix } = settings;

function SideNavDivider({ className }) {
const classNames = cx(`${prefix}--side-nav__divider`, className);
return <li role="separator" className={classNames} />;
}

SideNavDivider.propTypes = {
/**
* Provide an optional class to be applied to the containing node
*/
className: PropTypes.string,
};

export default SideNavDivider;
54 changes: 54 additions & 0 deletions packages/react/src/components/UIShell/UIShell-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
// SideNavHeader,
// SideNavDetails,
// SideNavSwitcher,
SideNavDivider,
SideNavItems,
SideNavLink,
SideNavMenu,
Expand Down Expand Up @@ -151,6 +152,7 @@ export default {
SkipToContent,
SideNav,
SideNavItems,
SideNavDivider,
SideNavLink,
SideNavMenu,
SideNavMenuItem,
Expand Down Expand Up @@ -683,6 +685,58 @@ export const FixedSideNavWIcons = withReadme(readme, () => (

FixedSideNavWIcons.storyName = 'Fixed SideNav w/ Icons';

export const FixedSideNavWDivider = withReadme(readme, () => (
<>
<SideNav
isFixedNav
expanded={true}
isChildOfHeader={false}
aria-label="Side navigation">
<SideNavItems>
<SideNavMenu title="L0 menu">
<SideNavMenuItem href="javascript:void(0)">
L0 menu item
</SideNavMenuItem>
<SideNavMenuItem href="javascript:void(0)">
L0 menu item
</SideNavMenuItem>
<SideNavMenuItem href="javascript:void(0)">
L0 menu item
</SideNavMenuItem>
</SideNavMenu>
<SideNavMenu title="L0 menu" isActive={true}>
<SideNavMenuItem href="javascript:void(0)">
L0 menu item
</SideNavMenuItem>
<SideNavMenuItem aria-current="page" href="javascript:void(0)">
L0 menu item
</SideNavMenuItem>
<SideNavMenuItem href="javascript:void(0)">
L0 menu item
</SideNavMenuItem>
</SideNavMenu>
<SideNavMenu title="L0 menu">
<SideNavMenuItem href="javascript:void(0)">
L0 menu item
</SideNavMenuItem>
<SideNavMenuItem href="javascript:void(0)">
L0 menu item
</SideNavMenuItem>
<SideNavMenuItem href="javascript:void(0)">
L0 menu item
</SideNavMenuItem>
</SideNavMenu>
<SideNavDivider />
<SideNavLink href="javascript:void(0)">L0 link</SideNavLink>
<SideNavLink href="javascript:void(0)">L0 link</SideNavLink>
</SideNavItems>
</SideNav>
<StoryContent useResponsiveOffset={false} />
</>
));

FixedSideNavWDivider.storyName = 'Fixed SideNav w/ Divider';

export const SideNavRail = withReadme(readme, () => (
<>
<SideNav aria-label="Side navigation" isRail>
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/UIShell/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export SkipToContent from './SkipToContent';

export SideNav from './SideNav';
export SideNavDetails from './SideNavDetails';
export SideNavDivider from './SideNavDivider';
export SideNavFooter from './SideNavFooter';
export SideNavHeader from './SideNavHeader';
export SideNavIcon from './SideNavIcon';
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export {
SkipToContent,
SideNav,
SideNavDetails,
SideNavDivider,
SideNavFooter,
SideNavHeader,
SideNavIcon,
Expand Down
1 change: 1 addition & 0 deletions packages/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
},
"dependencies": {
"prettier": "^2.2.1",
"react": "^17.0.1",
"resolve": "^1.12.0",
"sass": "^1.32.4",
"tabbable": "^4.0.0"
Expand Down
Loading

0 comments on commit 0f2be85

Please sign in to comment.