@hashicorp/react-components 0.0.0-canary.23632af → 0.0.0-canary.32599ff
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -5
- package/src/components/actions/index.tsx +5 -5
- package/src/components/call-to-action/index.tsx +12 -10
- package/src/components/call-to-action/styles/variant-centered.module.css +5 -4
- package/src/components/call-to-action/styles/variant-compact-grid.module.css +6 -4
- package/src/components/call-to-action/styles/variant-compact.module.css +6 -4
- package/src/components/call-to-action/styles/variant-links.module.css +6 -11
- package/src/components/card/index.test.tsx +1 -1
- package/src/components/card/newsroom-card/index.test.tsx +1 -1
- package/src/components/card/newsroom-card/style.module.css +1 -1
- package/src/components/card/partner-card/index.tsx +5 -5
- package/src/components/card/person-card/index.tsx +3 -3
- package/src/components/card/primitives.tsx +20 -19
- package/src/components/card/resource-card/index.test.tsx +1 -1
- package/src/components/card/resource-card/index.tsx +3 -0
- package/src/components/card/style.module.css +2 -2
- package/src/components/card/types.ts +2 -2
- package/src/components/card/unified-card/index.spec.tsx +40 -0
- package/src/components/card/unified-card/index.tsx +5 -11
- package/src/components/inline-video/index.tsx +104 -0
- package/src/components/inline-video/style.module.css +99 -0
- package/src/components/intro/style.module.css +2 -2
- package/src/components/marketo-form/contexts/FormMetadata.ts +2 -0
- package/src/components/marketo-form/form/index.tsx +12 -7
- package/src/components/marketo-form/partials/fields/checkbox-field/index.tsx +1 -1
- package/src/components/marketo-form/partials/fields/email-field/index.tsx +1 -1
- package/src/components/marketo-form/partials/fields/form-page-url-field/index.tsx +12 -1
- package/src/components/marketo-form/partials/fields/hidden-field/index.tsx +1 -0
- package/src/components/marketo-form/partials/fields/htmltext-field/style.module.css +2 -2
- package/src/components/marketo-form/partials/fields/radio-buttons-field/index.tsx +1 -1
- package/src/components/marketo-form/partials/fields/select-field/index.tsx +1 -1
- package/src/components/marketo-form/partials/fields/telephone-field/index.tsx +1 -1
- package/src/components/marketo-form/partials/fields/text-field/index.tsx +1 -1
- package/src/components/marketo-form/partials/fields/textarea-field/index.tsx +1 -1
- package/src/components/marketo-form/types.ts +10 -12
- package/src/components/marketo-form/utils.ts +1 -1
- package/src/components/nav-panel/components/link-list/index.tsx +15 -9
- package/src/components/nav-panel/components/link-list/style.module.css +10 -10
- package/src/components/nav-panel/components/panel/column/style.module.css +3 -3
- package/src/components/nav-panel/components/panel/root/style.module.css +6 -6
- package/src/components/nav-panel/components/promo/index.tsx +15 -9
- package/src/components/nav-panel/components/promo/style.module.css +23 -13
- package/src/components/nav-panel/product-panel/index.tsx +36 -25
- package/src/components/nav-panel/product-panel/style.module.css +45 -41
- package/src/components/nav-panel/standard-panel/index.tsx +3 -0
- package/src/components/nav-panel/standard-panel/style.module.css +2 -2
- package/src/components/next-steps/index.tsx +3 -2
- package/src/components/next-steps/style.module.css +18 -18
- package/src/components/product-badge/index.tsx +1 -1
- package/src/components/product-badge/style.module.css +2 -2
- package/src/components/products-used/style.module.css +7 -7
- package/src/components/related-content/index.tsx +28 -29
- package/src/components/related-content/style.module.css +58 -60
- package/src/components/related-content/types.ts +2 -2
- package/src/components/subnav/index.tsx +12 -3
- package/src/components/subnav/partials/CtaLinks/github-stars-link/style.module.css +8 -12
- package/src/components/subnav/partials/CtaLinks/index.tsx +9 -8
- package/src/components/subnav/partials/CtaLinks/style.module.css +6 -6
- package/src/components/subnav/partials/DropdownTrigger/index.tsx +2 -2
- package/src/components/subnav/partials/DropdownTrigger/style.module.css +11 -8
- package/src/components/subnav/partials/MenuItemsDefault/index.tsx +24 -8
- package/src/components/subnav/partials/MenuItemsDefault/style.module.css +44 -31
- package/src/components/subnav/partials/MenuItemsOverflow/index.tsx +17 -4
- package/src/components/subnav/partials/MenuItemsOverflow/style.module.css +24 -18
- package/src/components/subnav/partials/TitleLink/index.tsx +6 -4
- package/src/components/subnav/partials/TitleLink/mktg-logos/all-community-product-logos_on-dark.ts +2 -1
- package/src/components/subnav/partials/TitleLink/mktg-logos/all-community-product-logos_on-light.ts +2 -1
- package/src/components/subnav/partials/TitleLink/style.module.css +3 -3
- package/src/components/subnav/partials/nav-item-text/style.module.css +2 -4
- package/src/components/subnav/style.module.css +5 -7
- package/src/lib/get-localized-link-props/index.test.ts +30 -0
- package/src/lib/get-localized-link-props/index.ts +45 -0
- package/src/lib/parse-url/index.test.ts +40 -1
- package/src/lib/parse-url/index.ts +75 -9
- package/src/lib/supported-locales/index.ts +1 -0
- package/src/lib/track-nav-click-event/index.ts +4 -4
- package/src/lib/v/index.ts +4 -5
- package/src/components/consent-manager/README.md +0 -73
- package/src/components/consent-manager/components/banner/banner.module.css +0 -23
- package/src/components/consent-manager/components/banner/banner.test.tsx +0 -31
- package/src/components/consent-manager/components/banner/banner.tsx +0 -73
- package/src/components/consent-manager/components/dialog/dialog.module.css +0 -145
- package/src/components/consent-manager/components/dialog/dialog.test.tsx +0 -194
- package/src/components/consent-manager/components/dialog/dialog.tsx +0 -339
- package/src/components/consent-manager/img/icn_close.tsx +0 -19
- package/src/components/consent-manager/index.test.tsx +0 -334
- package/src/components/consent-manager/index.tsx +0 -186
- package/src/components/consent-manager/loader/README.md +0 -29
- package/src/components/consent-manager/loader/categories.ts +0 -22
- package/src/components/consent-manager/loader/index.tsx +0 -94
- package/src/components/consent-manager/loader/presets/enterprise.ts +0 -12
- package/src/components/consent-manager/loader/presets/oss.ts +0 -10
- package/src/components/consent-manager/loader/services.ts +0 -45
- package/src/components/consent-manager/scripts/custom.tsx +0 -59
- package/src/components/consent-manager/scripts/segment.tsx +0 -87
- package/src/components/consent-manager/style.module.css +0 -9
- package/src/components/consent-manager/types.ts +0 -55
- package/src/components/consent-manager/util/cookies.test.ts +0 -75
- package/src/components/consent-manager/util/cookies.ts +0 -70
- package/src/components/consent-manager/util/integrations.test.ts +0 -115
- package/src/components/consent-manager/util/integrations.ts +0 -110
- package/src/components/subnav/theme.module.css +0 -50
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { useCallback } from 'react'
|
|
2
2
|
import classNames from 'classnames'
|
|
3
|
-
import {
|
|
3
|
+
import { vercelSplit } from '../../../../lib/v'
|
|
4
4
|
import Link from 'next/link'
|
|
5
|
-
import {
|
|
5
|
+
import { getLocalizedLinkProps } from '../../../../lib/get-localized-link-props'
|
|
6
6
|
import { trackNavClickEvent } from '../../../../lib/track-nav-click-event'
|
|
7
|
-
import FlightIcon from '@hashicorp/react-
|
|
7
|
+
import FlightIcon from '@hashicorp/react-mds/src/hds/components/flight-icon'
|
|
8
8
|
import * as NavigationMenu from '@radix-ui/react-navigation-menu'
|
|
9
9
|
import s from './style.module.css'
|
|
10
10
|
|
|
11
11
|
export interface PromoProps {
|
|
12
|
+
locale?: string
|
|
12
13
|
title: string
|
|
13
14
|
description: string
|
|
14
15
|
linkUrl: string
|
|
@@ -17,9 +18,11 @@ export interface PromoProps {
|
|
|
17
18
|
icon?: string
|
|
18
19
|
theme: string
|
|
19
20
|
hasSidePanel?: boolean
|
|
21
|
+
isPromoOnTop?: boolean
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
export default function Promo({
|
|
25
|
+
locale,
|
|
23
26
|
title,
|
|
24
27
|
description,
|
|
25
28
|
linkUrl,
|
|
@@ -28,6 +31,7 @@ export default function Promo({
|
|
|
28
31
|
icon,
|
|
29
32
|
theme,
|
|
30
33
|
hasSidePanel,
|
|
34
|
+
isPromoOnTop = false,
|
|
31
35
|
}: PromoProps) {
|
|
32
36
|
const handleClick = useCallback((title, linkUrl, linkTitle, slug) => {
|
|
33
37
|
if (window && window.analytics) {
|
|
@@ -46,24 +50,25 @@ export default function Promo({
|
|
|
46
50
|
className={classNames(s.promo, {
|
|
47
51
|
[s.hasSide]: hasSidePanel,
|
|
48
52
|
[s.noSide]: !hasSidePanel,
|
|
53
|
+
[s.topPromo]: isPromoOnTop,
|
|
49
54
|
})}
|
|
50
55
|
>
|
|
51
56
|
{icon && (
|
|
52
57
|
<div
|
|
53
58
|
className={classNames(s.icon, {
|
|
54
|
-
[s.hashidays]:
|
|
55
|
-
[s.hashiconf]:
|
|
59
|
+
[s.hashidays]: vercelSplit(theme) === 'hashidays',
|
|
60
|
+
[s.hashiconf]: vercelSplit(theme) === 'hashiconf',
|
|
56
61
|
})}
|
|
57
62
|
>
|
|
58
|
-
<FlightIcon name={
|
|
63
|
+
<FlightIcon name={vercelSplit(icon)} />
|
|
59
64
|
</div>
|
|
60
65
|
)}
|
|
61
66
|
<div className={s.rightContent}>
|
|
62
67
|
<div>
|
|
63
68
|
<div
|
|
64
69
|
className={classNames(s.title, {
|
|
65
|
-
[s.hashidays]:
|
|
66
|
-
[s.hashiconf]:
|
|
70
|
+
[s.hashidays]: vercelSplit(theme) === 'hashidays',
|
|
71
|
+
[s.hashiconf]: vercelSplit(theme) === 'hashiconf',
|
|
67
72
|
})}
|
|
68
73
|
>
|
|
69
74
|
{title}
|
|
@@ -72,7 +77,8 @@ export default function Promo({
|
|
|
72
77
|
</div>
|
|
73
78
|
<NavigationMenu.Link asChild>
|
|
74
79
|
<Link
|
|
75
|
-
|
|
80
|
+
locale={locale ? locale : undefined}
|
|
81
|
+
{...getLocalizedLinkProps(linkUrl, locale)}
|
|
76
82
|
className={s.link}
|
|
77
83
|
onClickCapture={() => handleClick(title, linkUrl, linkTitle, slug)}
|
|
78
84
|
>
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
@custom-media --dev-dot-viewport (min-width:
|
|
1
|
+
@custom-media --dev-dot-viewport (min-width: 924px);
|
|
2
2
|
|
|
3
3
|
.promo {
|
|
4
4
|
display: flex;
|
|
5
|
-
border-radius: var(--
|
|
5
|
+
border-radius: var(--mds-spacing-01);
|
|
6
6
|
border: 1px solid var(--token-color-border-faint);
|
|
7
7
|
background-color: var(--token-color-surface-faint);
|
|
8
|
-
padding: var(--
|
|
9
|
-
var(--
|
|
8
|
+
padding: var(--mds-spacing-05) var(--mds-spacing-08)
|
|
9
|
+
var(--mds-spacing-06) var(--mds-spacing-08);
|
|
10
10
|
flex-direction: row;
|
|
11
|
-
gap: var(--
|
|
12
|
-
margin: var(--
|
|
13
|
-
margin-bottom: var(--
|
|
11
|
+
gap: var(--mds-spacing-04);
|
|
12
|
+
margin: var(--mds-spacing-07);
|
|
13
|
+
margin-bottom: var(--mds-spacing-09);
|
|
14
14
|
|
|
15
15
|
@media (--large) {
|
|
16
|
+
&.topPromo {
|
|
17
|
+
margin-bottom: var(--mds-spacing-05);
|
|
18
|
+
}
|
|
16
19
|
&.noSide {
|
|
17
20
|
margin: 0;
|
|
18
21
|
width: min-content;
|
|
@@ -21,6 +24,9 @@
|
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
@media (--dev-dot-viewport) {
|
|
27
|
+
&.topPromo {
|
|
28
|
+
margin-bottom: var(--mds-spacing-05);
|
|
29
|
+
}
|
|
24
30
|
&.hasSide {
|
|
25
31
|
margin: 0;
|
|
26
32
|
width: min-content;
|
|
@@ -29,22 +35,26 @@
|
|
|
29
35
|
}
|
|
30
36
|
}
|
|
31
37
|
|
|
38
|
+
.topPromo {
|
|
39
|
+
margin-bottom: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
.rightContent {
|
|
33
43
|
display: flex;
|
|
34
44
|
flex-wrap: wrap;
|
|
35
|
-
gap: var(--
|
|
45
|
+
gap: var(--mds-spacing-03);
|
|
36
46
|
width: 100%;
|
|
37
47
|
justify-content: space-between;
|
|
38
48
|
}
|
|
39
49
|
|
|
40
50
|
.title {
|
|
41
|
-
font-weight: var(--font-weight-
|
|
51
|
+
font-weight: var(--mds-typography-font-weight-semibold);
|
|
42
52
|
}
|
|
43
53
|
|
|
44
54
|
.description {
|
|
45
|
-
font-size: var(--
|
|
46
|
-
font-weight: var(--
|
|
47
|
-
margin-top: var(--
|
|
55
|
+
font-size: var(--mds-typography-body-200-font-size);
|
|
56
|
+
font-weight: var(--mds-typography-font-weight-regular);
|
|
57
|
+
margin-top: var(--mds-spacing-01);
|
|
48
58
|
}
|
|
49
59
|
|
|
50
60
|
.icon {
|
|
@@ -70,7 +80,7 @@
|
|
|
70
80
|
display: flex;
|
|
71
81
|
flex-direction: row;
|
|
72
82
|
align-items: center;
|
|
73
|
-
gap: var(--
|
|
83
|
+
gap: var(--mds-spacing-02);
|
|
74
84
|
|
|
75
85
|
&:hover {
|
|
76
86
|
text-decoration: underline;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { CSSProperties } from 'react'
|
|
2
1
|
import classNames from 'classnames'
|
|
3
2
|
import Link from 'next/link'
|
|
4
3
|
import * as NavPanel from '../components/panel'
|
|
5
4
|
import Promo, { type PromoProps } from '../components/promo'
|
|
5
|
+
import { getLocalizedLinkProps } from '../../../lib/get-localized-link-props'
|
|
6
6
|
import { Products } from '@hashicorp/platform-product-meta'
|
|
7
|
-
import FlightIcon from '@hashicorp/react-
|
|
8
|
-
import {
|
|
9
|
-
import { parseUrl } from '../../../lib/parse-url'
|
|
7
|
+
import FlightIcon from '@hashicorp/react-mds/src/hds/components/flight-icon'
|
|
8
|
+
import { Text } from '@hashicorp/react-mds/src/components/text'
|
|
10
9
|
import { trackNavClickEvent } from '../../../lib/track-nav-click-event'
|
|
11
10
|
import * as NavigationMenu from '@radix-ui/react-navigation-menu'
|
|
12
11
|
import s from './style.module.css'
|
|
@@ -31,6 +30,7 @@ const PRODUCT_LOGO_EXCEPTION_CLASSNAMES = {
|
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
export interface ProductsPanelProps {
|
|
33
|
+
locale: string
|
|
34
34
|
productCategories: any
|
|
35
35
|
promo?: PromoProps
|
|
36
36
|
sidePanel?: {
|
|
@@ -42,43 +42,44 @@ export interface ProductsPanelProps {
|
|
|
42
42
|
url: string
|
|
43
43
|
}[]
|
|
44
44
|
}
|
|
45
|
+
isPromoOnTop?: boolean
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
const ProductPanel = ({
|
|
49
|
+
locale,
|
|
48
50
|
productCategories,
|
|
49
51
|
promo,
|
|
50
52
|
sidePanel,
|
|
53
|
+
isPromoOnTop = false,
|
|
51
54
|
}: ProductsPanelProps) => {
|
|
52
55
|
return (
|
|
53
56
|
<NavPanel.Root
|
|
54
57
|
className={classNames(s.productPanel, {
|
|
55
58
|
[s.hasSide]: sidePanel,
|
|
56
59
|
[s.noSide]: !sidePanel,
|
|
60
|
+
[s.topPromo]: isPromoOnTop,
|
|
57
61
|
})}
|
|
58
62
|
hasSidePanel={Boolean(sidePanel)}
|
|
59
63
|
>
|
|
60
64
|
<div className={s.mainPanel}>
|
|
65
|
+
{promo && isPromoOnTop ? (
|
|
66
|
+
<Promo
|
|
67
|
+
{...promo}
|
|
68
|
+
hasSidePanel={Boolean(sidePanel)}
|
|
69
|
+
isPromoOnTop={isPromoOnTop}
|
|
70
|
+
/>
|
|
71
|
+
) : null}
|
|
61
72
|
<NavPanel.Column hasSidePanel={Boolean(sidePanel)}>
|
|
62
73
|
<ul className={s.productCategories}>
|
|
63
74
|
{productCategories.map(({ title, products }) => {
|
|
64
75
|
return (
|
|
65
76
|
<li key={title} className={s.productCategory}>
|
|
66
|
-
<
|
|
67
|
-
<ul
|
|
68
|
-
className={s.productList}
|
|
69
|
-
// Dynamically calculate row count based on number of items divided by expected columns
|
|
70
|
-
style={
|
|
71
|
-
{
|
|
72
|
-
'--row-count-above-mobile': Math.ceil(
|
|
73
|
-
products.length / 2
|
|
74
|
-
),
|
|
75
|
-
} as CSSProperties
|
|
76
|
-
}
|
|
77
|
-
>
|
|
77
|
+
<Text.Body className={s.eyebrow}>{title}</Text.Body>
|
|
78
|
+
<ul className={s.productList}>
|
|
78
79
|
{products.map((product) => {
|
|
79
80
|
return (
|
|
80
81
|
<li key={product.url}>
|
|
81
|
-
<NavProduct {...product} />
|
|
82
|
+
<NavProduct locale={locale} {...product} />
|
|
82
83
|
</li>
|
|
83
84
|
)
|
|
84
85
|
})}
|
|
@@ -88,14 +89,16 @@ const ProductPanel = ({
|
|
|
88
89
|
})}
|
|
89
90
|
</ul>
|
|
90
91
|
</NavPanel.Column>
|
|
91
|
-
{promo
|
|
92
|
+
{promo && !isPromoOnTop ? (
|
|
93
|
+
<Promo {...promo} hasSidePanel={Boolean(sidePanel)} />
|
|
94
|
+
) : null}
|
|
92
95
|
</div>
|
|
93
96
|
|
|
94
97
|
{sidePanel ? (
|
|
95
98
|
<NavPanel.Column className={s.sidePanel}>
|
|
96
|
-
<
|
|
99
|
+
<Text.Body size="200" weight="semibold">
|
|
97
100
|
{sidePanel.label}
|
|
98
|
-
</
|
|
101
|
+
</Text.Body>
|
|
99
102
|
|
|
100
103
|
{/* ! TODO Replace the below list with the <LinkList /> component,
|
|
101
104
|
That component will require a refactor to support greater customization
|
|
@@ -106,7 +109,12 @@ const ProductPanel = ({
|
|
|
106
109
|
{sidePanel.navItems.map(({ icon, title, description, url }) => {
|
|
107
110
|
return (
|
|
108
111
|
<li key={title}>
|
|
109
|
-
<Link
|
|
112
|
+
<Link
|
|
113
|
+
aria-label={`${title} - ${description}`}
|
|
114
|
+
{...getLocalizedLinkProps(url, locale)}
|
|
115
|
+
locale={locale ? locale : undefined}
|
|
116
|
+
className={classNames(s.sidePanelItem, s.focusIndicator)}
|
|
117
|
+
>
|
|
110
118
|
<div className={s.iconBackground}>
|
|
111
119
|
<FlightIcon
|
|
112
120
|
size={16}
|
|
@@ -115,9 +123,9 @@ const ProductPanel = ({
|
|
|
115
123
|
/>
|
|
116
124
|
</div>
|
|
117
125
|
<div className={s.sidePanelItemContent}>
|
|
118
|
-
<
|
|
126
|
+
<Text.Body size="200" weight="semibold" tag="span">
|
|
119
127
|
{title}
|
|
120
|
-
</
|
|
128
|
+
</Text.Body>
|
|
121
129
|
<span className={s.sidePanelItemDesc}>{description}</span>
|
|
122
130
|
</div>
|
|
123
131
|
</Link>
|
|
@@ -132,16 +140,19 @@ const ProductPanel = ({
|
|
|
132
140
|
}
|
|
133
141
|
|
|
134
142
|
export interface NavProductProps {
|
|
143
|
+
locale?: string
|
|
135
144
|
url: string
|
|
136
145
|
product: Products | string
|
|
137
146
|
description: string
|
|
138
147
|
}
|
|
139
148
|
|
|
140
|
-
function NavProduct({ url, product, description }: NavProductProps) {
|
|
149
|
+
function NavProduct({ locale, url, product, description }: NavProductProps) {
|
|
141
150
|
return (
|
|
142
151
|
<NavigationMenu.Link asChild>
|
|
143
152
|
<Link
|
|
144
|
-
|
|
153
|
+
aria-label={`${product} - ${description}`}
|
|
154
|
+
{...getLocalizedLinkProps(url, locale)}
|
|
155
|
+
locale={locale ? locale : undefined}
|
|
145
156
|
onClickCapture={() => {
|
|
146
157
|
trackNavClickEvent(product, url, 'products')
|
|
147
158
|
}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@custom-media --dev-dot-viewport (min-width:
|
|
1
|
+
@custom-media --dev-dot-viewport (min-width: 924px);
|
|
2
2
|
|
|
3
3
|
.productPanel {
|
|
4
4
|
height: 100%;
|
|
@@ -26,7 +26,11 @@
|
|
|
26
26
|
list-style: none;
|
|
27
27
|
padding: 0;
|
|
28
28
|
display: grid;
|
|
29
|
-
margin: var(--
|
|
29
|
+
margin: var(--mds-spacing-07) 0 0;
|
|
30
|
+
|
|
31
|
+
@nest .topPromo & {
|
|
32
|
+
margin-bottom: var(--mds-spacing-07);
|
|
33
|
+
}
|
|
30
34
|
|
|
31
35
|
@media (--large) {
|
|
32
36
|
@nest .noSide & {
|
|
@@ -48,27 +52,27 @@
|
|
|
48
52
|
|
|
49
53
|
&:first-child {
|
|
50
54
|
border-bottom: 1px solid var(--token-color-border-primary);
|
|
51
|
-
margin-bottom: var(--
|
|
52
|
-
padding-bottom: var(--
|
|
55
|
+
margin-bottom: var(--mds-spacing-05);
|
|
56
|
+
padding-bottom: var(--mds-spacing-05);
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
.eyebrow {
|
|
57
|
-
padding-bottom: var(--
|
|
61
|
+
padding-bottom: var(--mds-spacing-04);
|
|
58
62
|
color: var(--token-color-foreground-strong);
|
|
59
|
-
font-weight: var(--font-weight-
|
|
63
|
+
font-weight: var(--mds-typography-font-weight-semibold);
|
|
60
64
|
|
|
61
65
|
@media (--large) {
|
|
62
66
|
@nest .noSide & {
|
|
63
67
|
padding-bottom: 0;
|
|
64
|
-
padding-left: var(--
|
|
68
|
+
padding-left: var(--mds-spacing-06);
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
@media (--dev-dot-viewport) {
|
|
69
73
|
@nest .hasSide & {
|
|
70
74
|
padding-bottom: 0;
|
|
71
|
-
padding-left: var(--
|
|
75
|
+
padding-left: var(--mds-spacing-06);
|
|
72
76
|
}
|
|
73
77
|
}
|
|
74
78
|
}
|
|
@@ -82,22 +86,22 @@
|
|
|
82
86
|
|
|
83
87
|
@media (--large) {
|
|
84
88
|
@nest .noSide & {
|
|
85
|
-
padding: var(--
|
|
86
|
-
var(--
|
|
87
|
-
grid-auto-flow:
|
|
89
|
+
padding: var(--mds-spacing-06) var(--mds-spacing-05)
|
|
90
|
+
var(--mds-spacing-04);
|
|
91
|
+
grid-auto-flow: row;
|
|
88
92
|
grid-template-columns: repeat(2, 300px);
|
|
89
|
-
grid-template-rows: repeat(
|
|
93
|
+
grid-template-rows: repeat(2, max-content);
|
|
90
94
|
gap: 0;
|
|
91
95
|
}
|
|
92
96
|
}
|
|
93
97
|
|
|
94
98
|
@media (--dev-dot-viewport) {
|
|
95
99
|
@nest .hasSide & {
|
|
96
|
-
padding: var(--
|
|
97
|
-
var(--
|
|
98
|
-
grid-auto-flow:
|
|
100
|
+
padding: var(--mds-spacing-06) var(--mds-spacing-05)
|
|
101
|
+
var(--mds-spacing-04);
|
|
102
|
+
grid-auto-flow: row;
|
|
99
103
|
grid-template-columns: repeat(2, 300px);
|
|
100
|
-
grid-template-rows: repeat(
|
|
104
|
+
grid-template-rows: repeat(2, max-content);
|
|
101
105
|
gap: 0;
|
|
102
106
|
}
|
|
103
107
|
}
|
|
@@ -113,29 +117,29 @@
|
|
|
113
117
|
|
|
114
118
|
.productWrapper {
|
|
115
119
|
display: flex;
|
|
116
|
-
margin-bottom: var(--
|
|
117
|
-
gap: var(--
|
|
120
|
+
margin-bottom: var(--mds-spacing-05);
|
|
121
|
+
gap: var(--mds-spacing-05);
|
|
118
122
|
|
|
119
123
|
@media (--large) {
|
|
120
124
|
@nest .noSide & {
|
|
121
|
-
padding: var(--
|
|
125
|
+
padding: var(--mds-spacing-03) var(--mds-spacing-05);
|
|
122
126
|
margin-bottom: 0;
|
|
123
127
|
|
|
124
128
|
&:hover {
|
|
125
129
|
background-color: var(--token-color-surface-interactive-hover);
|
|
126
|
-
border-radius: var(--
|
|
130
|
+
border-radius: var(--mds-spacing-01);
|
|
127
131
|
}
|
|
128
132
|
}
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
@media (--dev-dot-viewport) {
|
|
132
136
|
@nest .hasSide & {
|
|
133
|
-
padding: var(--
|
|
137
|
+
padding: var(--mds-spacing-03) var(--mds-spacing-05);
|
|
134
138
|
margin-bottom: 0;
|
|
135
139
|
|
|
136
140
|
&:hover {
|
|
137
141
|
background-color: var(--token-color-surface-interactive-hover);
|
|
138
|
-
border-radius: var(--
|
|
142
|
+
border-radius: var(--mds-spacing-01);
|
|
139
143
|
}
|
|
140
144
|
}
|
|
141
145
|
}
|
|
@@ -152,8 +156,8 @@
|
|
|
152
156
|
@nest .noSide & {
|
|
153
157
|
& svg {
|
|
154
158
|
@media (--large) {
|
|
155
|
-
height: var(--
|
|
156
|
-
width: var(--
|
|
159
|
+
height: var(--mds-spacing-08);
|
|
160
|
+
width: var(--mds-spacing-08);
|
|
157
161
|
}
|
|
158
162
|
}
|
|
159
163
|
}
|
|
@@ -161,8 +165,8 @@
|
|
|
161
165
|
@nest .hasSide & {
|
|
162
166
|
& svg {
|
|
163
167
|
@media (--dev-dot-viewport) {
|
|
164
|
-
height: var(--
|
|
165
|
-
width: var(--
|
|
168
|
+
height: var(--mds-spacing-08);
|
|
169
|
+
width: var(--mds-spacing-08);
|
|
166
170
|
}
|
|
167
171
|
}
|
|
168
172
|
}
|
|
@@ -197,15 +201,15 @@
|
|
|
197
201
|
|
|
198
202
|
@media (--large) {
|
|
199
203
|
@nest .noSide & {
|
|
200
|
-
padding: var(--
|
|
201
|
-
var(--
|
|
204
|
+
padding: var(--mds-spacing-07) 0 var(--mds-spacing-09)
|
|
205
|
+
var(--mds-spacing-04);
|
|
202
206
|
}
|
|
203
207
|
}
|
|
204
208
|
|
|
205
209
|
@media (--dev-dot-viewport) {
|
|
206
210
|
@nest .hasSide & {
|
|
207
|
-
padding: var(--
|
|
208
|
-
var(--
|
|
211
|
+
padding: var(--mds-spacing-07) 0 var(--mds-spacing-09)
|
|
212
|
+
var(--mds-spacing-04);
|
|
209
213
|
}
|
|
210
214
|
}
|
|
211
215
|
}
|
|
@@ -215,10 +219,10 @@
|
|
|
215
219
|
background: var(--token-color-surface-faint);
|
|
216
220
|
display: flex;
|
|
217
221
|
flex-direction: column;
|
|
218
|
-
gap: var(--
|
|
222
|
+
gap: var(--mds-spacing-05);
|
|
219
223
|
margin: 0;
|
|
220
|
-
padding: var(--
|
|
221
|
-
var(--
|
|
224
|
+
padding: var(--mds-spacing-07) var(--mds-spacing-04)
|
|
225
|
+
var(--mds-spacing-09) var(--mds-spacing-07);
|
|
222
226
|
}
|
|
223
227
|
|
|
224
228
|
.sidePanelItems {
|
|
@@ -227,24 +231,24 @@
|
|
|
227
231
|
padding: 0;
|
|
228
232
|
display: grid;
|
|
229
233
|
grid-template-columns: 1fr;
|
|
230
|
-
gap: var(--
|
|
234
|
+
gap: var(--mds-spacing-07);
|
|
231
235
|
|
|
232
236
|
@media (--dev-dot-viewport) {
|
|
233
|
-
gap: var(--
|
|
237
|
+
gap: var(--mds-spacing-05);
|
|
234
238
|
}
|
|
235
239
|
}
|
|
236
240
|
|
|
237
241
|
/* Lifted from .productWrapper */
|
|
238
242
|
.sidePanelItem {
|
|
239
243
|
display: flex;
|
|
240
|
-
gap: var(--
|
|
244
|
+
gap: var(--mds-spacing-05);
|
|
241
245
|
|
|
242
246
|
@media (--dev-dot-viewport) {
|
|
243
|
-
padding: var(--
|
|
247
|
+
padding: var(--mds-spacing-03) var(--mds-spacing-05);
|
|
244
248
|
|
|
245
249
|
&:hover {
|
|
246
250
|
background-color: var(--token-color-surface-interactive-hover);
|
|
247
|
-
border-radius: var(--
|
|
251
|
+
border-radius: var(--mds-spacing-01);
|
|
248
252
|
}
|
|
249
253
|
}
|
|
250
254
|
}
|
|
@@ -253,8 +257,8 @@
|
|
|
253
257
|
packages/react-components/src/components/nav-panel/components/link-list/style.module.css */
|
|
254
258
|
.iconBackground {
|
|
255
259
|
background: var(--token-color-foreground-high-contrast);
|
|
256
|
-
height: var(--
|
|
257
|
-
width: var(--
|
|
260
|
+
height: var(--mds-spacing-08);
|
|
261
|
+
width: var(--mds-spacing-08);
|
|
258
262
|
display: flex;
|
|
259
263
|
align-items: center;
|
|
260
264
|
justify-content: center;
|
|
@@ -301,7 +305,7 @@ packages/react-components/src/components/nav-panel/components/link-list/style.mo
|
|
|
301
305
|
*/
|
|
302
306
|
.hcpVaultSecrets,
|
|
303
307
|
.hcpVaultRadar {
|
|
304
|
-
padding: var(--
|
|
308
|
+
padding: var(--mds-spacing-01);
|
|
305
309
|
border: 2px solid var(--token-color-vault-brand);
|
|
306
310
|
border-radius: 3px;
|
|
307
311
|
|
|
@@ -12,12 +12,14 @@ interface StandardPanelProps {
|
|
|
12
12
|
navData: NavItem[]
|
|
13
13
|
promo?: PromoProps
|
|
14
14
|
sectionName?: string
|
|
15
|
+
locale?: any
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
const StandardPanel = ({
|
|
18
19
|
navData,
|
|
19
20
|
promo,
|
|
20
21
|
sectionName = '',
|
|
22
|
+
locale,
|
|
21
23
|
}: StandardPanelProps) => {
|
|
22
24
|
return (
|
|
23
25
|
<NavPanel.Root>
|
|
@@ -26,6 +28,7 @@ const StandardPanel = ({
|
|
|
26
28
|
return (
|
|
27
29
|
<NavPanel.Column key={stableIdx}>
|
|
28
30
|
<LinkList
|
|
31
|
+
locale={locale}
|
|
29
32
|
links={navItems}
|
|
30
33
|
linkClickHandler={(text, href) => {
|
|
31
34
|
trackNavClickEvent(text, href, sectionName)
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) HashiCorp, Inc.
|
|
3
3
|
* SPDX-License-Identifier: MPL-2.0
|
|
4
4
|
*/
|
|
5
|
+
'use client'
|
|
5
6
|
|
|
6
7
|
import { useState } from 'react'
|
|
7
8
|
import Badge from '@hashicorp/react-badge'
|
|
@@ -10,7 +11,7 @@ import ExpandableArrow from '@hashicorp/react-expandable-arrow'
|
|
|
10
11
|
import Intro from '../intro'
|
|
11
12
|
import Link from 'next/link'
|
|
12
13
|
import type { NextStepsProps } from './types'
|
|
13
|
-
import
|
|
14
|
+
import { HDSPlusStandaloneLink } from '@hashicorp/react-mds/src/hds-plus/standalone-link'
|
|
14
15
|
import { IconArrowRight16 } from '@hashicorp/flight-icons/svg-react/arrow-right-16'
|
|
15
16
|
import useProductMeta from '@hashicorp/platform-product-meta'
|
|
16
17
|
import s from './style.module.css'
|
|
@@ -69,7 +70,7 @@ export default function NextSteps({
|
|
|
69
70
|
{cta ? (
|
|
70
71
|
<div className={s.cta}>
|
|
71
72
|
<p className={s.ctaCopy}>{cta.copy}</p>
|
|
72
|
-
<
|
|
73
|
+
<HDSPlusStandaloneLink
|
|
73
74
|
href={cta.href}
|
|
74
75
|
text={cta.ctaText}
|
|
75
76
|
icon={
|