Skip to content

Commit

Permalink
Merge pull request #3020 from Autodesk/update-side-nav
Browse files Browse the repository at this point in the history
refactor: update side-nav to point to new @weave-design
  • Loading branch information
wmui51 authored Aug 9, 2023
2 parents f0ed77b + 192b1b2 commit 4b3a60a
Show file tree
Hide file tree
Showing 24 changed files with 56 additions and 58 deletions.
4 changes: 1 addition & 3 deletions deprecated/side-nav/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

The Side Navigation component provides the highest level navigation tier and allows the user to switch between modules. It also houses secondary and legal/copyright links.

Read more about when and how to use the SideNav component [on the internal wiki](https://wiki.autodesk.com/x/S3n2Eg).

## Getting started

```bash
yarn add @hig/side-nav @hig/theme-context @hig/theme-data
yarn add @hig/side-nav @weave-design/theme-context @weave-design/theme-data
```

### Import
Expand Down
22 changes: 11 additions & 11 deletions deprecated/side-nav/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hig/side-nav",
"version": "3.1.1",
"version": "4.0.1",
"description": "HIG SideNav components",
"author": "Autodesk Inc.",
"license": "Apache-2.0",
Expand All @@ -18,13 +18,13 @@
"build/*"
],
"dependencies": {
"@hig/icon-button": "^3.1.0",
"@hig/icons": "^4.1.0",
"@hig/skeleton-item": "^2.1.0",
"@hig/surface": "^2.1.0",
"@hig/text-link": "^2.1.0",
"@hig/typography": "^2.1.0",
"@hig/utils": "^0.4.1",
"@weave-design/icon-button": "^1.0.0",
"@weave-design/icons": "^1.1.0",
"@weave-design/skeleton-item": "^1.0.0",
"@weave-design/surface": "^1.0.0",
"@weave-design/text-link": "^1.0.0",
"@weave-design/typography": "^1.0.0",
"@weave-design/utils": "^1.0.0",
"emotion": "^10.0.0",
"prop-types": "^15.7.1"
},
Expand All @@ -36,9 +36,9 @@
"@weave-design/semantic-release-config": "^1.0.0"
},
"peerDependencies": {
"@hig/theme-context": "^4.2.0",
"@hig/theme-data": "^3.4.2",
"react": "^17.0.0"
"@weave-design/theme-context": "^1.0.0",
"@weave-design/theme-data": "^1.3.0",
"react": "^17.0.0 || ^18.0.0"
},
"scripts": {
"build": "weave-scripts-build",
Expand Down
6 changes: 3 additions & 3 deletions deprecated/side-nav/src/CollapseButton/CollapseButton.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import { css, cx } from "emotion";
import { CaretDownMUI, CaretDownSUI } from "@hig/icons";
import ThemeContext from "@hig/theme-context";
import { memoizeCreateButtonEventHandlers } from "@hig/utils";
import { CaretDownMUI, CaretDownSUI } from "@weave-design/icons";
import ThemeContext from "@weave-design/theme-context";
import { memoizeCreateButtonEventHandlers } from "@weave-design/utils";
import stylesheet from "./stylesheet";

/**
Expand Down
4 changes: 2 additions & 2 deletions deprecated/side-nav/src/Group/Group.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import { css, cx } from "emotion";
import ThemeContext from "@hig/theme-context";
import { createCustomClassNames } from "@hig/utils";
import ThemeContext from "@weave-design/theme-context";
import { createCustomClassNames } from "@weave-design/utils";
import stylesheet from "./stylesheet";

export default class Group extends Component {
Expand Down
8 changes: 4 additions & 4 deletions deprecated/side-nav/src/Link/Link.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import { sizes as iconSizes } from "@hig/icons";
import ThemeContext from "@hig/theme-context";
import Typography from "@hig/typography";
import { createCustomClassNames } from "@hig/utils";
import { sizes as iconSizes } from "@weave-design/icons";
import ThemeContext from "@weave-design/theme-context";
import Typography from "@weave-design/typography";
import { createCustomClassNames } from "@weave-design/utils";
import { css, cx } from "emotion";

import { AVAILABLE_TARGETS } from "../targets";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import { css, cx } from "emotion";
import ThemeContext from "@hig/theme-context";
import ThemeContext from "@weave-design/theme-context";
import {
createCustomClassNames,
memoizeCreateButtonEventHandlers,
} from "@hig/utils";
} from "@weave-design/utils";
import stylesheet from "./stylesheet";

export default class ModuleCompact extends Component {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Collaboration24 } from "@hig/icons";
import { Collaboration24 } from "@weave-design/icons";
import { takeSnapshotsOf } from "@weave-design/jest-preset/helpers";

import ModuleCompactPresenter from "./ModuleCompactPresenter";
Expand Down
4 changes: 2 additions & 2 deletions deprecated/side-nav/src/Module/presenters/ModulePresenter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import { css, cx } from "emotion";
import ThemeContext from "@hig/theme-context";
import { createCustomClassNames } from "@hig/utils";
import ThemeContext from "@weave-design/theme-context";
import { createCustomClassNames } from "@weave-design/utils";

import CollapseButton from "../../CollapseButton";
import TitlePresenter from "./TitlePresenter";
Expand Down
6 changes: 3 additions & 3 deletions deprecated/side-nav/src/Module/presenters/TitlePresenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React, { Component } from "react";
import PropTypes from "prop-types";
import { css, cx } from "emotion";

import { sizes as iconSizes } from "@hig/icons";
import ThemeContext from "@hig/theme-context";
import { sizes as iconSizes } from "@weave-design/icons";
import ThemeContext from "@weave-design/theme-context";
import {
createCustomClassNames,
memoizeCreateButtonEventHandlers,
} from "@hig/utils";
} from "@weave-design/utils";

import { targets, AVAILABLE_TARGETS } from "../../targets";
import ExternalLinkIcon from "../../presenters/ExternalLinkIcon";
Expand Down
6 changes: 3 additions & 3 deletions deprecated/side-nav/src/Search/Search.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { useState, useEffect } from "react";
import PropTypes from "prop-types";
import { css, cx } from "emotion";
import ThemeContext from "@hig/theme-context";
import { Search24, CloseLUI } from "@hig/icons";
import ThemeContext from "@weave-design/theme-context";
import { Search24, CloseLUI } from "@weave-design/icons";
import {
createCustomClassNames,
memoizeCreateButtonEventHandlers,
} from "@hig/utils";
} from "@weave-design/utils";
import stylesheet from "./stylesheet";

const Search = (props) => {
Expand Down
2 changes: 1 addition & 1 deletion deprecated/side-nav/src/SideNavSkeleton/SideNavSkeleton.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import { css, cx } from "emotion";
import SkeletonItem from "@hig/skeleton-item";
import SkeletonItem from "@weave-design/skeleton-item";
import stylesheet from "./stylesheet";

const skeletonItemStyles = Object.freeze([
Expand Down
6 changes: 3 additions & 3 deletions deprecated/side-nav/src/Submodule/Submodule.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import { css, cx } from "emotion";
import { sizes as iconSizes } from "@hig/icons";
import ThemeContext from "@hig/theme-context";
import { sizes as iconSizes } from "@weave-design/icons";
import ThemeContext from "@weave-design/theme-context";
import {
createCustomClassNames,
memoizeCreateButtonEventHandlers,
} from "@hig/utils";
} from "@weave-design/utils";

import { AVAILABLE_TARGETS, targets } from "../targets";
import ExternalLinkIcon from "../presenters/ExternalLinkIcon";
Expand Down
4 changes: 2 additions & 2 deletions deprecated/side-nav/src/__stories__/ExampleSideNav.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { Graph24, ProductsAndServices24, Collaboration24 } from "@hig/icons";
import Typography from "@hig/typography";
import { Graph24, ProductsAndServices24, Collaboration24 } from "@weave-design/icons";
import Typography from "@weave-design/typography";

import SideNav from "../index";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { ArgsTable, Primary, Stories } from "@storybook/addon-docs";
import { Collaboration24, Graph24, ProductsAndServices24 } from "@hig/icons";
import { Collaboration24, Graph24, ProductsAndServices24 } from "@weave-design/icons";

import SideNav, { BelowTopNavCompact } from "../index";
import Readme from "../../README.md";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { ArgsTable, Primary, Stories } from "@storybook/addon-docs";
import Surface from "@hig/surface";
import Surface from "@weave-design/surface";

import SideNav, { BelowTopNavCompact, Docked } from "../index";
import ExampleSideNav from "./ExampleSideNav";
Expand Down
2 changes: 1 addition & 1 deletion deprecated/side-nav/src/__stories__/SideNavModule.story.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { ArgsTable, Primary, Stories } from "@storybook/addon-docs";
import { Graph24 } from "@hig/icons";
import { Graph24 } from "@weave-designweave-design/icons";

import SideNav from "../index";
import Readme from "../../README.md";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { ArgsTable, Primary, Stories } from "@storybook/addon-docs";
import { Graph24 } from "@hig/icons";
import { Graph24 } from "@weave-design/icons";

import SideNav from "../index";
import Readme from "../../README.md";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { ArgsTable, Primary, Stories } from "@storybook/addon-docs";
import { Collaboration24, Graph24, ProductsAndServices24 } from "@hig/icons";
import { Collaboration24, Graph24, ProductsAndServices24 } from "@weave-design/icons";

import SideNav from "../index";
import Readme from "../../README.md";
Expand Down
4 changes: 2 additions & 2 deletions deprecated/side-nav/src/containers/BelowTopNav.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import Surface from "@hig/surface";
import ThemeContext from "@hig/theme-context";
import Surface from "@weave-design/surface";
import ThemeContext from "@weave-design/theme-context";
import stylesheet from "./stylesheet";

export default class BelowTopNav extends Component {
Expand Down
4 changes: 2 additions & 2 deletions deprecated/side-nav/src/containers/BelowTopNavCompact.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import Surface from "@hig/surface";
import ThemeContext from "@hig/theme-context";
import Surface from "@weave-design/surface";
import ThemeContext from "@weave-design/theme-context";
import stylesheet from "./stylesheet";

export default class BelowTopNavCompact extends Component {
Expand Down
2 changes: 1 addition & 1 deletion deprecated/side-nav/src/containers/Docked.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import { css, cx } from "emotion";
import ThemeContext from "@hig/theme-context";
import ThemeContext from "@weave-design/theme-context";
import stylesheet from "./stylesheet";

export default class Docked extends Component {
Expand Down
2 changes: 1 addition & 1 deletion deprecated/side-nav/src/presenters/ExternalLinkIcon.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import { ExternalLink16, ExternalLink24, sizes as iconSizes } from "@hig/icons";
import { ExternalLink16, ExternalLink24, sizes as iconSizes } from "@weave-design/icons";

export default class ExternalLinkIcon extends Component {
// eslint-disable-next-line react/static-property-placement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { shallow } from "enzyme";
import React from "react";
import { ExternalLink16, ExternalLink24, sizes as iconSizes } from "@hig/icons";
import { ExternalLink16, ExternalLink24, sizes as iconSizes } from "@weave-design/icons";

import ExternalLinkIcon from "./ExternalLinkIcon";

Expand Down
12 changes: 6 additions & 6 deletions deprecated/side-nav/src/presenters/SideNav.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import { css, cx } from "emotion";
import { ThemeContext } from "@hig/theme-context";
import { Back24, Back16 } from "@hig/icons";
import Typography from "@hig/typography";
import TextLink from "@hig/text-link";
import IconButton from "@hig/icon-button";
import { createCustomClassNames } from "@hig/utils";
import { ThemeContext } from "@weave-design/theme-context";
import { Back24, Back16 } from "@weave-design/icons";
import Typography from "@weave-design/typography";
import TextLink from "@weave-design/text-link";
import IconButton from "@weave-design/icon-button";
import { createCustomClassNames } from "@weave-design/utils";

import stylesheet from "./stylesheet";

Expand Down

0 comments on commit 4b3a60a

Please sign in to comment.