From be6a0effaf57809750c7e03e102989ab1bddc40e Mon Sep 17 00:00:00 2001 From: Jimmy Merritello <7191639+jmfury@users.noreply.github.com> Date: Fri, 9 Oct 2020 10:48:21 -0500 Subject: [PATCH] [Website] Add HashiStackMenu to website (#8854) * Add new HashiStackMenu * Add transpile option * Bump version * Bump HSM version and rm meganav styles --- website/next.config.js | 3 ++- website/package-lock.json | 24 ++++++++++++++++-------- website/package.json | 2 +- website/pages/_app.js | 4 ++-- website/pages/style.css | 1 - 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/website/next.config.js b/website/next.config.js index 5974c49f30..f7a7725c37 100644 --- a/website/next.config.js +++ b/website/next.config.js @@ -3,9 +3,10 @@ const path = require('path') module.exports = withHashicorp({ defaultLayout: true, - transpileModules: ['is-absolute-url', '@hashicorp/react-mega-nav'], + transpileModules: ['is-absolute-url', '@hashicorp/react-.*'], mdx: { resolveIncludes: path.join(__dirname, 'pages/partials') }, })({ + svgo: { plugins: [{ removeViewBox: false }] }, experimental: { modern: true, rewrites: () => [ diff --git a/website/package-lock.json b/website/package-lock.json index 926667eaae..886c5e5ade 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -3688,6 +3688,22 @@ "resolved": "https://registry.npmjs.org/@hashicorp/react-global-styles/-/react-global-styles-4.4.2.tgz", "integrity": "sha512-EprEFwymJJbrbIQmzMCODM6eYwew2OsgVa9EtWNE984/KFk71QWvbjKVjebqNB0vWdpwSt6+127kfOQsx8JolA==" }, + "@hashicorp/react-hashi-stack-menu": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@hashicorp/react-hashi-stack-menu/-/react-hashi-stack-menu-1.0.3.tgz", + "integrity": "sha512-bzO6fBodh61OrunYIMQKfGSJQUKIq70TQ74dt2trBPjBsgURHMCIkiMmKffjuSdJjhCxx2nb+y0/B/PwxxHxmg==", + "requires": { + "@hashicorp/react-inline-svg": "^1.0.2", + "slugify": "1.3.4" + }, + "dependencies": { + "slugify": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.3.4.tgz", + "integrity": "sha512-KP0ZYk5hJNBS8/eIjGkFDCzGQIoZ1mnfQRYS5WM3273z+fxGWXeN0fkwf2ebEweydv9tioZIHGZKoF21U07/nw==" + } + } + }, "@hashicorp/react-head": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@hashicorp/react-head/-/react-head-1.1.3.tgz", @@ -3744,14 +3760,6 @@ } } }, - "@hashicorp/react-mega-nav": { - "version": "4.0.1-2", - "resolved": "https://registry.npmjs.org/@hashicorp/react-mega-nav/-/react-mega-nav-4.0.1-2.tgz", - "integrity": "sha512-uDw+vk6YBDSR9sZoZa3oYd0N15UzYpuGLV1/2lofM6O4/IhEkWlGlsyWpzWABV+pcHBB4KOqnCUxpvmS9Ar61g==", - "requires": { - "@hashicorp/react-inline-svg": "^1.0.0" - } - }, "@hashicorp/react-product-downloader": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/@hashicorp/react-product-downloader/-/react-product-downloader-4.1.1.tgz", diff --git a/website/package.json b/website/package.json index 40fe6af15f..1abc8db143 100644 --- a/website/package.json +++ b/website/package.json @@ -15,11 +15,11 @@ "@hashicorp/react-docs-page": "5.0.0", "@hashicorp/react-featured-slider": "1.1.4", "@hashicorp/react-global-styles": "4.4.2", + "@hashicorp/react-hashi-stack-menu": "^1.0.3", "@hashicorp/react-head": "1.1.3", "@hashicorp/react-image": "2.0.3", "@hashicorp/react-inline-svg": "1.0.2", "@hashicorp/react-logo-grid": "2.1.4", - "@hashicorp/react-mega-nav": "4.0.1-2", "@hashicorp/react-product-downloader": "4.1.1", "@hashicorp/react-product-features-list": "1.0.3", "@hashicorp/react-search": "^2.1.0", diff --git a/website/pages/_app.js b/website/pages/_app.js index c7b6b56ca6..07c5286d96 100644 --- a/website/pages/_app.js +++ b/website/pages/_app.js @@ -8,7 +8,7 @@ import { ErrorBoundary } from '@hashicorp/nextjs-scripts/lib/bugsnag' import createConsentManager from '@hashicorp/nextjs-scripts/lib/consent-manager' import useAnchorLinkAnalytics from '@hashicorp/nextjs-scripts/lib/anchor-link-analytics' import HashiHead from '@hashicorp/react-head' -import MegaNav from '@hashicorp/react-mega-nav' +import HashiStackMenu from '@hashicorp/react-hashi-stack-menu' import AlertBanner from '@hashicorp/react-alert-banner' import Footer from '../components/footer' import ProductSubnav from '../components/subnav' @@ -53,7 +53,7 @@ function App({ Component, pageProps }) { {ALERT_BANNER_ACTIVE && ( )} - +
diff --git a/website/pages/style.css b/website/pages/style.css index cdc29ac81f..b420d97450 100644 --- a/website/pages/style.css +++ b/website/pages/style.css @@ -23,7 +23,6 @@ @import '~@hashicorp/react-enterprise-alert/dist/style.css'; @import '~@hashicorp/react-featured-slider/dist/style.css'; @import '~@hashicorp/react-logo-grid/dist/style.css'; -@import '~@hashicorp/react-mega-nav/style.css'; @import '~@hashicorp/react-product-downloader/dist/style.css'; @import '~@hashicorp/react-product-features-list/dist/style.css'; @import '~@hashicorp/react-search/dist/style.css';