@hashicorp/react-components 1.1.10 → 1.2.0

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.
Files changed (173) hide show
  1. package/README.md +1 -1
  2. package/package.json +8 -13
  3. package/postcss.config.js +1 -1
  4. package/src/components/nav-panel/components/flight-icon/index.tsx +53 -0
  5. package/src/components/nav-panel/components/flight-icon/style.module.css +3 -0
  6. package/src/components/nav-panel/components/link/cloud-fill.svg +3 -0
  7. package/src/components/nav-panel/components/link/index.tsx +139 -0
  8. package/src/components/nav-panel/components/link/layers-fill.svg +5 -0
  9. package/src/components/nav-panel/components/link/shield-alert-fill.svg +3 -0
  10. package/src/components/nav-panel/components/link/style.module.css +64 -0
  11. package/src/components/nav-panel/components/link/zap-fill.svg +3 -0
  12. package/src/components/nav-panel/components/link-list/index.tsx +12 -64
  13. package/src/components/nav-panel/components/link-list/style.module.css +1 -50
  14. package/src/components/nav-panel/components/panel/column/style.module.css +2 -2
  15. package/src/components/nav-panel/components/panel/root/style.module.css +5 -5
  16. package/src/components/nav-panel/components/promo/index.tsx +35 -15
  17. package/src/components/nav-panel/components/promo/style.module.css +32 -28
  18. package/src/components/nav-panel/components/text/index.tsx +34 -0
  19. package/src/components/nav-panel/product-panel/index.tsx +71 -20
  20. package/src/components/nav-panel/product-panel/style.module.css +111 -53
  21. package/src/components/nav-panel/standard-panel/index.tsx +3 -0
  22. package/src/components/nav-panel/standard-panel/style.module.css +2 -2
  23. package/src/lib/get-localized-link-props/index.test.ts +30 -0
  24. package/src/lib/get-localized-link-props/index.ts +45 -0
  25. package/src/lib/parse-url/index.test.ts +57 -2
  26. package/src/lib/parse-url/index.ts +97 -13
  27. package/src/lib/send-posthog-event/index.ts +22 -0
  28. package/src/lib/supported-locales/index.ts +10 -0
  29. package/src/lib/track-nav-click-event/index.ts +5 -5
  30. package/src/lib/v/index.ts +9 -4
  31. package/tsconfig.json +1 -2
  32. package/.eslintrc.js +0 -4
  33. package/.stylelintrc.js +0 -3
  34. package/src/components/actions/index.tsx +0 -107
  35. package/src/components/actions/style.module.css +0 -28
  36. package/src/components/actions/types.ts +0 -73
  37. package/src/components/call-to-action/index.tsx +0 -205
  38. package/src/components/call-to-action/styles/variant-centered.module.css +0 -93
  39. package/src/components/call-to-action/styles/variant-compact-grid.module.css +0 -88
  40. package/src/components/call-to-action/styles/variant-compact.module.css +0 -91
  41. package/src/components/call-to-action/styles/variant-links.module.css +0 -85
  42. package/src/components/card/README.md +0 -11
  43. package/src/components/card/card.tsx +0 -45
  44. package/src/components/card/index.test.tsx +0 -69
  45. package/src/components/card/index.tsx +0 -14
  46. package/src/components/card/newsroom-card/index.test.tsx +0 -39
  47. package/src/components/card/newsroom-card/index.tsx +0 -37
  48. package/src/components/card/newsroom-card/style.module.css +0 -12
  49. package/src/components/card/partner-card/index.test.tsx +0 -57
  50. package/src/components/card/partner-card/index.tsx +0 -69
  51. package/src/components/card/partner-card/style.module.css +0 -24
  52. package/src/components/card/person-card/index.test.tsx +0 -71
  53. package/src/components/card/person-card/index.tsx +0 -93
  54. package/src/components/card/person-card/style.module.css +0 -33
  55. package/src/components/card/primitives.tsx +0 -176
  56. package/src/components/card/promo-card/index.tsx +0 -51
  57. package/src/components/card/resource-card/index.test.tsx +0 -48
  58. package/src/components/card/resource-card/index.tsx +0 -37
  59. package/src/components/card/style.module.css +0 -145
  60. package/src/components/card/types.ts +0 -66
  61. package/src/components/card/unified-card/index.tsx +0 -64
  62. package/src/components/consent-manager/README.md +0 -73
  63. package/src/components/consent-manager/components/banner/banner.module.css +0 -23
  64. package/src/components/consent-manager/components/banner/banner.test.tsx +0 -31
  65. package/src/components/consent-manager/components/banner/banner.tsx +0 -73
  66. package/src/components/consent-manager/components/dialog/dialog.module.css +0 -145
  67. package/src/components/consent-manager/components/dialog/dialog.test.tsx +0 -194
  68. package/src/components/consent-manager/components/dialog/dialog.tsx +0 -339
  69. package/src/components/consent-manager/img/icn_close.tsx +0 -19
  70. package/src/components/consent-manager/index.test.tsx +0 -334
  71. package/src/components/consent-manager/index.tsx +0 -186
  72. package/src/components/consent-manager/loader/README.md +0 -29
  73. package/src/components/consent-manager/loader/categories.ts +0 -22
  74. package/src/components/consent-manager/loader/index.tsx +0 -94
  75. package/src/components/consent-manager/loader/presets/enterprise.ts +0 -12
  76. package/src/components/consent-manager/loader/presets/oss.ts +0 -10
  77. package/src/components/consent-manager/loader/services.ts +0 -45
  78. package/src/components/consent-manager/scripts/custom.tsx +0 -59
  79. package/src/components/consent-manager/scripts/segment.tsx +0 -87
  80. package/src/components/consent-manager/style.module.css +0 -9
  81. package/src/components/consent-manager/types.ts +0 -55
  82. package/src/components/consent-manager/util/cookies.test.ts +0 -75
  83. package/src/components/consent-manager/util/cookies.ts +0 -70
  84. package/src/components/consent-manager/util/integrations.test.ts +0 -115
  85. package/src/components/consent-manager/util/integrations.ts +0 -110
  86. package/src/components/intro/index.tsx +0 -82
  87. package/src/components/intro/style.module.css +0 -67
  88. package/src/components/intro/types.ts +0 -44
  89. package/src/components/marketo-form/CHANGELOG.md +0 -122
  90. package/src/components/marketo-form/README.md +0 -1
  91. package/src/components/marketo-form/contexts/FormMetadata.ts +0 -11
  92. package/src/components/marketo-form/docs.mdx +0 -197
  93. package/src/components/marketo-form/fixtures/index.ts +0 -185
  94. package/src/components/marketo-form/form/index.tsx +0 -369
  95. package/src/components/marketo-form/index.test.tsx +0 -320
  96. package/src/components/marketo-form/index.ts +0 -11
  97. package/src/components/marketo-form/package.original.json +0 -30
  98. package/src/components/marketo-form/partials/error-message/index.tsx +0 -12
  99. package/src/components/marketo-form/partials/error-message/style.module.css +0 -13
  100. package/src/components/marketo-form/partials/field/index.tsx +0 -90
  101. package/src/components/marketo-form/partials/field-wrapper/index.tsx +0 -26
  102. package/src/components/marketo-form/partials/fields/checkbox-field/index.tsx +0 -32
  103. package/src/components/marketo-form/partials/fields/email-field/index.tsx +0 -35
  104. package/src/components/marketo-form/partials/fields/form-page-url-field/index.tsx +0 -21
  105. package/src/components/marketo-form/partials/fields/hidden-field/index.tsx +0 -37
  106. package/src/components/marketo-form/partials/fields/htmltext-field/index.tsx +0 -21
  107. package/src/components/marketo-form/partials/fields/htmltext-field/style.module.css +0 -18
  108. package/src/components/marketo-form/partials/fields/name-field/index.tsx +0 -19
  109. package/src/components/marketo-form/partials/fields/name-field/style.module.css +0 -13
  110. package/src/components/marketo-form/partials/fields/radio-buttons-field/index.tsx +0 -48
  111. package/src/components/marketo-form/partials/fields/select-field/index.tsx +0 -39
  112. package/src/components/marketo-form/partials/fields/select-field/style.module.css +0 -5
  113. package/src/components/marketo-form/partials/fields/telephone-field/index.tsx +0 -30
  114. package/src/components/marketo-form/partials/fields/text-field/index.tsx +0 -30
  115. package/src/components/marketo-form/partials/fields/textarea-field/index.tsx +0 -29
  116. package/src/components/marketo-form/partials/label/index.tsx +0 -24
  117. package/src/components/marketo-form/partials/label/style.module.css +0 -12
  118. package/src/components/marketo-form/partials/visibility-rule/index.tsx +0 -84
  119. package/src/components/marketo-form/props.js +0 -66
  120. package/src/components/marketo-form/server/api-routes.ts +0 -109
  121. package/src/components/marketo-form/server/client.ts +0 -98
  122. package/src/components/marketo-form/server/index.ts +0 -8
  123. package/src/components/marketo-form/types.ts +0 -268
  124. package/src/components/marketo-form/utils.test.tsx +0 -103
  125. package/src/components/marketo-form/utils.ts +0 -449
  126. package/src/components/next-steps/index.tsx +0 -137
  127. package/src/components/next-steps/style.module.css +0 -270
  128. package/src/components/next-steps/types.ts +0 -63
  129. package/src/components/product-badge/index.test.tsx +0 -11
  130. package/src/components/product-badge/index.tsx +0 -42
  131. package/src/components/product-badge/style.module.css +0 -76
  132. package/src/components/products-used/index.tsx +0 -84
  133. package/src/components/products-used/style.module.css +0 -87
  134. package/src/components/products-used/types.ts +0 -31
  135. package/src/components/related-content/index.test.tsx +0 -74
  136. package/src/components/related-content/index.tsx +0 -56
  137. package/src/components/related-content/style.module.css +0 -89
  138. package/src/components/related-content/types.ts +0 -21
  139. package/src/components/subnav/helpers/areBasePathsMatching.ts +0 -13
  140. package/src/components/subnav/helpers/traverse/index.ts +0 -42
  141. package/src/components/subnav/helpers/useHeightRef.ts +0 -42
  142. package/src/components/subnav/helpers/useNavRef.ts +0 -30
  143. package/src/components/subnav/helpers/useOverflowRef.ts +0 -85
  144. package/src/components/subnav/helpers/useStuckRef.ts +0 -51
  145. package/src/components/subnav/index.tsx +0 -199
  146. package/src/components/subnav/partials/CtaLinks/github-stars-link/formatStarCount/index.test.ts +0 -26
  147. package/src/components/subnav/partials/CtaLinks/github-stars-link/formatStarCount/index.ts +0 -22
  148. package/src/components/subnav/partials/CtaLinks/github-stars-link/index.tsx +0 -87
  149. package/src/components/subnav/partials/CtaLinks/github-stars-link/parseGithubUrl/index.test.ts +0 -29
  150. package/src/components/subnav/partials/CtaLinks/github-stars-link/parseGithubUrl/index.ts +0 -32
  151. package/src/components/subnav/partials/CtaLinks/github-stars-link/style.module.css +0 -85
  152. package/src/components/subnav/partials/CtaLinks/icons/github-logo.js +0 -20
  153. package/src/components/subnav/partials/CtaLinks/icons/github.svg.js +0 -7
  154. package/src/components/subnav/partials/CtaLinks/icons/star.js +0 -20
  155. package/src/components/subnav/partials/CtaLinks/index.tsx +0 -130
  156. package/src/components/subnav/partials/CtaLinks/style.module.css +0 -45
  157. package/src/components/subnav/partials/DropdownTrigger/index.tsx +0 -35
  158. package/src/components/subnav/partials/DropdownTrigger/style.module.css +0 -36
  159. package/src/components/subnav/partials/MenuItemsDefault/index.tsx +0 -151
  160. package/src/components/subnav/partials/MenuItemsDefault/style.module.css +0 -91
  161. package/src/components/subnav/partials/MenuItemsOverflow/index.tsx +0 -139
  162. package/src/components/subnav/partials/MenuItemsOverflow/style.module.css +0 -82
  163. package/src/components/subnav/partials/TitleLink/index.tsx +0 -113
  164. package/src/components/subnav/partials/TitleLink/mktg-logos/all-community-product-logos_on-dark.ts +0 -9
  165. package/src/components/subnav/partials/TitleLink/mktg-logos/all-community-product-logos_on-light.ts +0 -9
  166. package/src/components/subnav/partials/TitleLink/mktg-logos/all-primary-logos_on-dark.ts +0 -23
  167. package/src/components/subnav/partials/TitleLink/mktg-logos/all-primary-logos_on-light.ts +0 -23
  168. package/src/components/subnav/partials/TitleLink/style.module.css +0 -43
  169. package/src/components/subnav/partials/nav-item-text/index.tsx +0 -37
  170. package/src/components/subnav/partials/nav-item-text/style.module.css +0 -15
  171. package/src/components/subnav/style.module.css +0 -68
  172. package/src/components/subnav/subnav-consts.ts +0 -1
  173. package/src/components/subnav/theme.module.css +0 -50
@@ -2,17 +2,19 @@
2
2
 
3
3
  .promo {
4
4
  display: flex;
5
- border-radius: var(--hdsplus-spacing-01);
6
- border: 1px solid var(--token-color-border-faint);
7
- background-color: var(--token-color-surface-faint);
8
- padding: var(--hdsplus-spacing-05) var(--hdsplus-spacing-08)
9
- var(--hdsplus-spacing-06) var(--hdsplus-spacing-08);
5
+ border-radius: var(--mds-spacing-01);
6
+ border: 1px solid var(--mds-color-border-faint);
7
+ background-color: var(--mds-color-surface-faint);
8
+ padding: var(--mds-spacing-05) var(--mds-spacing-08) var(--mds-spacing-06) var(--mds-spacing-08);
10
9
  flex-direction: row;
11
- gap: var(--hdsplus-spacing-04);
12
- margin: var(--hdsplus-spacing-07);
13
- margin-bottom: var(--hdsplus-spacing-09);
10
+ gap: var(--mds-spacing-04);
11
+ margin: var(--mds-spacing-07);
12
+ margin-bottom: var(--mds-spacing-09);
14
13
 
15
14
  @media (--large) {
15
+ &.topPromo {
16
+ margin-bottom: var(--mds-spacing-05);
17
+ }
16
18
  &.noSide {
17
19
  margin: 0;
18
20
  width: min-content;
@@ -21,7 +23,14 @@
21
23
  }
22
24
 
23
25
  @media (--dev-dot-viewport) {
26
+ &.topPromo {
27
+ margin-bottom: var(--mds-spacing-05);
28
+ }
24
29
  &.hasSide {
30
+ &.topPromo {
31
+ margin-bottom: var(--mds-spacing-05);
32
+ }
33
+
25
34
  margin: 0;
26
35
  width: min-content;
27
36
  min-width: 100%;
@@ -29,22 +38,26 @@
29
38
  }
30
39
  }
31
40
 
41
+ .topPromo {
42
+ margin-bottom: 0;
43
+ }
44
+
32
45
  .rightContent {
33
46
  display: flex;
34
47
  flex-wrap: wrap;
35
- gap: var(--hdsplus-spacing-03);
48
+ gap: var(--mds-spacing-03);
36
49
  width: 100%;
37
50
  justify-content: space-between;
38
51
  }
39
52
 
40
53
  .title {
41
- font-weight: var(--font-weight-semi-bold);
54
+ font-weight: var(--mds-typography-font-weight-semibold);
42
55
  }
43
56
 
44
57
  .description {
45
- font-size: var(--hdsplus-typography-body-200-font-size);
46
- font-weight: var(--token-typography-font-weight-regular);
47
- margin-top: var(--hdsplus-spacing-01);
58
+ font-size: var(--mds-typography-body-200-font-size);
59
+ font-weight: var(--mds-typography-font-weight-regular);
60
+ margin-top: var(--mds-spacing-01);
48
61
  }
49
62
 
50
63
  .icon {
@@ -66,29 +79,24 @@
66
79
  }
67
80
 
68
81
  .link {
69
- color: var(--token-color-foreground-strong);
82
+ color: var(--mds-color-foreground-strong);
70
83
  display: flex;
71
84
  flex-direction: row;
72
85
  align-items: center;
73
- gap: var(--hdsplus-spacing-02);
86
+ gap: var(--mds-spacing-02);
74
87
 
75
88
  &:hover {
76
89
  text-decoration: underline;
77
90
  }
78
91
 
79
92
  &:focus {
80
- outline: 2px solid var(--token-color-focus-action-internal);
93
+ outline: 2px solid var(--mds-color-focus-action-internal);
81
94
  outline-style: auto;
82
95
  }
83
96
  }
84
97
 
85
98
  .hashidays {
86
- background: linear-gradient(
87
- 90deg,
88
- #7b54b6 0%,
89
- #4c69d8 74.77%,
90
- #60d0dc 115.93%
91
- );
99
+ background: linear-gradient(90deg, #7b54b6 0%, #4c69d8 74.77%, #60d0dc 115.93%);
92
100
  -webkit-background-clip: text;
93
101
  -webkit-text-fill-color: transparent;
94
102
  max-width: fit-content;
@@ -99,16 +107,12 @@
99
107
  }
100
108
 
101
109
  .hashiconf {
102
- background: linear-gradient(
103
- to right,
104
- var(--token-color-terraform-foreground),
105
- var(--token-color-vagrant-foreground)
106
- );
110
+ background: linear-gradient(to right, var(--mds-color-terraform-foreground), var(--mds-color-vagrant-foreground));
107
111
  -webkit-background-clip: text;
108
112
  -webkit-text-fill-color: transparent;
109
113
  max-width: fit-content;
110
114
 
111
115
  & svg {
112
- color: var(--token-color-terraform-foreground);
116
+ color: var(--mds-color-terraform-foreground);
113
117
  }
114
118
  }
@@ -0,0 +1,34 @@
1
+ import classNames from 'classnames'
2
+ import { type ReactNode, type HTMLAttributes } from 'react'
3
+
4
+ type TextSize = '200' | '300' | '400'
5
+ type TextWeight = 'regular' | 'medium' | 'semibold' | 'bold'
6
+
7
+ interface TextProps extends HTMLAttributes<HTMLSpanElement> {
8
+ size?: TextSize
9
+ weight?: TextWeight
10
+ children: ReactNode
11
+ }
12
+
13
+ const Text = ({
14
+ size = '300',
15
+ weight,
16
+ children,
17
+ className,
18
+ ...rest
19
+ }: TextProps) => {
20
+ return (
21
+ <span
22
+ className={classNames(
23
+ `mds-typography-body-${size}`,
24
+ weight && `mds-typography-font-weight-${weight}`,
25
+ className,
26
+ )}
27
+ {...rest}
28
+ >
29
+ {children}
30
+ </span>
31
+ )
32
+ }
33
+
34
+ export { Text }
@@ -2,18 +2,21 @@ import classNames from 'classnames'
2
2
  import Link from 'next/link'
3
3
  import * as NavPanel from '../components/panel'
4
4
  import Promo, { type PromoProps } from '../components/promo'
5
- import { Products } from '@hashicorp/platform-product-meta'
6
- import FlightIcon from '@hashicorp/react-design-system-components/src/components/flight-icon'
7
- import { TextPlus } from '@hashicorp/react-design-system-components/src/components/text'
8
- import { parseUrl } from '../../../lib/parse-url'
5
+ import { getLocalizedLinkProps } from '../../../lib/get-localized-link-props'
6
+ import { Products } from '@web/product-meta'
7
+ import FlightIcon from '../components/flight-icon'
8
+ import { Text } from '../components/text'
9
9
  import { trackNavClickEvent } from '../../../lib/track-nav-click-event'
10
10
  import * as NavigationMenu from '@radix-ui/react-navigation-menu'
11
+ import { LinkListProps } from '../components/link-list'
12
+ import NavLink from '../components/link'
11
13
  import s from './style.module.css'
12
14
 
13
15
  const PRODUCT_LOGO_MAP = new Map([
14
16
  ['Terraform', 'terraform-fill'],
15
17
  ['Packer', 'packer-fill-color'],
16
18
  ['Vault', 'vault-fill-color'],
19
+ ['Vault Radar', 'vault-fill-color'],
17
20
  ['Boundary', 'boundary-fill-color'],
18
21
  ['Consul', 'consul-fill-color'],
19
22
  ['Nomad', 'nomad-fill-color'],
@@ -29,8 +32,15 @@ const PRODUCT_LOGO_EXCEPTION_CLASSNAMES = {
29
32
  'HCP Vault Radar': 'hcpVaultRadar',
30
33
  }
31
34
 
35
+ export type ProductCategoriesProps = Array<{
36
+ title: string
37
+ group?: LinkListProps['links'][0]
38
+ products: NavProductProps[]
39
+ }>
40
+
32
41
  export interface ProductsPanelProps {
33
- productCategories: any
42
+ locale?: string
43
+ productCategories: ProductCategoriesProps
34
44
  promo?: PromoProps
35
45
  sidePanel?: {
36
46
  label: string
@@ -41,33 +51,53 @@ export interface ProductsPanelProps {
41
51
  url: string
42
52
  }[]
43
53
  }
54
+ isPromoOnTop?: boolean
44
55
  }
45
56
 
46
57
  const ProductPanel = ({
58
+ locale,
47
59
  productCategories,
48
60
  promo,
49
61
  sidePanel,
62
+ isPromoOnTop = false,
50
63
  }: ProductsPanelProps) => {
51
64
  return (
52
65
  <NavPanel.Root
53
66
  className={classNames(s.productPanel, {
54
67
  [s.hasSide]: sidePanel,
55
68
  [s.noSide]: !sidePanel,
69
+ [s.topPromo]: isPromoOnTop,
56
70
  })}
57
71
  hasSidePanel={Boolean(sidePanel)}
58
72
  >
59
73
  <div className={s.mainPanel}>
74
+ {promo && isPromoOnTop ? (
75
+ <Promo
76
+ {...promo}
77
+ hasSidePanel={Boolean(sidePanel)}
78
+ isPromoOnTop={isPromoOnTop}
79
+ />
80
+ ) : null}
60
81
  <NavPanel.Column hasSidePanel={Boolean(sidePanel)}>
61
82
  <ul className={s.productCategories}>
62
- {productCategories.map(({ title, products }) => {
83
+ {productCategories.map(({ group, title, products }) => {
63
84
  return (
64
- <li key={title} className={s.productCategory}>
65
- <TextPlus.Body className={s.eyebrow}>{title}</TextPlus.Body>
85
+ <li
86
+ key={title}
87
+ className={classNames(s.productCategory, {
88
+ [s.productCategoryHasGroup]: group,
89
+ })}
90
+ >
91
+ {group ? (
92
+ <NavLink {...group} className={s.productGroupLink} />
93
+ ) : (
94
+ <Text className={s.eyebrow}>{title}</Text>
95
+ )}
66
96
  <ul className={s.productList}>
67
97
  {products.map((product) => {
68
98
  return (
69
99
  <li key={product.url}>
70
- <NavProduct {...product} />
100
+ <NavProduct locale={locale} {...product} />
71
101
  </li>
72
102
  )
73
103
  })}
@@ -77,14 +107,16 @@ const ProductPanel = ({
77
107
  })}
78
108
  </ul>
79
109
  </NavPanel.Column>
80
- {promo ? <Promo {...promo} hasSidePanel={Boolean(sidePanel)} /> : null}
110
+ {promo && !isPromoOnTop ? (
111
+ <Promo {...promo} hasSidePanel={Boolean(sidePanel)} />
112
+ ) : null}
81
113
  </div>
82
114
 
83
115
  {sidePanel ? (
84
116
  <NavPanel.Column className={s.sidePanel}>
85
- <TextPlus.Body size="200" weight="semibold">
117
+ <Text size="200" weight="semibold" className={s.sidePanelText}>
86
118
  {sidePanel.label}
87
- </TextPlus.Body>
119
+ </Text>
88
120
 
89
121
  {/* ! TODO Replace the below list with the <LinkList /> component,
90
122
  That component will require a refactor to support greater customization
@@ -97,20 +129,24 @@ const ProductPanel = ({
97
129
  <li key={title}>
98
130
  <Link
99
131
  aria-label={`${title} - ${description}`}
100
- href={parseUrl(url).href}
132
+ {...getLocalizedLinkProps(url, locale)}
133
+ locale={locale ? locale : undefined}
101
134
  className={classNames(s.sidePanelItem, s.focusIndicator)}
102
135
  >
103
136
  <div className={s.iconBackground}>
104
137
  <FlightIcon
105
- size={16}
106
138
  name={icon}
107
- color="var(--token-color-foreground-faint)"
139
+ color="var(--mds-color-foreground-faint)"
108
140
  />
109
141
  </div>
110
142
  <div className={s.sidePanelItemContent}>
111
- <TextPlus.Body size="200" weight="semibold" tag="span">
143
+ <Text
144
+ size="200"
145
+ weight="semibold"
146
+ className={s.sidePanelText}
147
+ >
112
148
  {title}
113
- </TextPlus.Body>
149
+ </Text>
114
150
  <span className={s.sidePanelItemDesc}>{description}</span>
115
151
  </div>
116
152
  </Link>
@@ -125,17 +161,19 @@ const ProductPanel = ({
125
161
  }
126
162
 
127
163
  export interface NavProductProps {
164
+ locale?: string
128
165
  url: string
129
166
  product: Products | string
130
167
  description: string
131
168
  }
132
169
 
133
- function NavProduct({ url, product, description }: NavProductProps) {
170
+ function NavProduct({ locale, url, product, description }: NavProductProps) {
134
171
  return (
135
172
  <NavigationMenu.Link asChild>
136
173
  <Link
137
174
  aria-label={`${product} - ${description}`}
138
- href={parseUrl(url).href}
175
+ {...getLocalizedLinkProps(url, locale)}
176
+ locale={locale ? locale : undefined}
139
177
  onClickCapture={() => {
140
178
  trackNavClickEvent(product, url, 'products')
141
179
  }}
@@ -153,7 +191,20 @@ function NavProduct({ url, product, description }: NavProductProps) {
153
191
  />
154
192
  </div>
155
193
  <div className={s.productTextContent}>
156
- <span>{product}</span>
194
+ {product === 'Vault Radar' ? (
195
+ <div>
196
+ <Text size="200" weight="semibold">
197
+ Vault&nbsp;
198
+ </Text>
199
+ <Text size="200" weight="regular">
200
+ Radar
201
+ </Text>
202
+ </div>
203
+ ) : (
204
+ <Text size="200" weight="semibold">
205
+ {product}
206
+ </Text>
207
+ )}
157
208
  <span className={s.productDesc}>{description}</span>
158
209
  </div>
159
210
  </div>
@@ -26,7 +26,11 @@
26
26
  list-style: none;
27
27
  padding: 0;
28
28
  display: grid;
29
- margin: var(--hdsplus-spacing-07) 0 0;
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 & {
@@ -47,28 +51,28 @@
47
51
  min-width: 160px;
48
52
 
49
53
  &:first-child {
50
- border-bottom: 1px solid var(--token-color-border-primary);
51
- margin-bottom: var(--hdsplus-spacing-05);
52
- padding-bottom: var(--hdsplus-spacing-05);
54
+ border-bottom: 1px solid var(--mds-color-border-primary);
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(--hdsplus-spacing-04);
58
- color: var(--token-color-foreground-strong);
59
- font-weight: var(--font-weight-semi-bold);
61
+ padding-bottom: var(--mds-spacing-04);
62
+ color: var(--mds-color-foreground-strong);
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(--hdsplus-spacing-06);
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(--hdsplus-spacing-06);
75
+ padding-left: var(--mds-spacing-06);
72
76
  }
73
77
  }
74
78
  }
@@ -82,8 +86,7 @@
82
86
 
83
87
  @media (--large) {
84
88
  @nest .noSide & {
85
- padding: var(--hdsplus-spacing-06) var(--hdsplus-spacing-05)
86
- var(--hdsplus-spacing-04);
89
+ padding: var(--mds-spacing-06) var(--mds-spacing-05) var(--mds-spacing-04);
87
90
  grid-auto-flow: row;
88
91
  grid-template-columns: repeat(2, 300px);
89
92
  grid-template-rows: repeat(2, max-content);
@@ -93,8 +96,7 @@
93
96
 
94
97
  @media (--dev-dot-viewport) {
95
98
  @nest .hasSide & {
96
- padding: var(--hdsplus-spacing-06) var(--hdsplus-spacing-05)
97
- var(--hdsplus-spacing-04);
99
+ padding: var(--mds-spacing-06) var(--mds-spacing-05) var(--mds-spacing-04);
98
100
  grid-auto-flow: row;
99
101
  grid-template-columns: repeat(2, 300px);
100
102
  grid-template-rows: repeat(2, max-content);
@@ -113,29 +115,29 @@
113
115
 
114
116
  .productWrapper {
115
117
  display: flex;
116
- margin-bottom: var(--hdsplus-spacing-05);
117
- gap: var(--hdsplus-spacing-05);
118
+ margin-bottom: var(--mds-spacing-05);
119
+ gap: var(--mds-spacing-05);
118
120
 
119
121
  @media (--large) {
120
122
  @nest .noSide & {
121
- padding: var(--hdsplus-spacing-03) var(--hdsplus-spacing-05);
123
+ padding: var(--mds-spacing-03) var(--mds-spacing-05);
122
124
  margin-bottom: 0;
123
125
 
124
126
  &:hover {
125
- background-color: var(--token-color-surface-interactive-hover);
126
- border-radius: var(--hdsplus-spacing-01);
127
+ background-color: var(--mds-color-surface-interactive-hover);
128
+ border-radius: var(--mds-spacing-01);
127
129
  }
128
130
  }
129
131
  }
130
132
 
131
133
  @media (--dev-dot-viewport) {
132
134
  @nest .hasSide & {
133
- padding: var(--hdsplus-spacing-03) var(--hdsplus-spacing-05);
135
+ padding: var(--mds-spacing-03) var(--mds-spacing-05);
134
136
  margin-bottom: 0;
135
137
 
136
138
  &:hover {
137
- background-color: var(--token-color-surface-interactive-hover);
138
- border-radius: var(--hdsplus-spacing-01);
139
+ background-color: var(--mds-color-surface-interactive-hover);
140
+ border-radius: var(--mds-spacing-01);
139
141
  }
140
142
  }
141
143
  }
@@ -152,8 +154,8 @@
152
154
  @nest .noSide & {
153
155
  & svg {
154
156
  @media (--large) {
155
- height: var(--hdsplus-spacing-08);
156
- width: var(--hdsplus-spacing-08);
157
+ height: var(--mds-spacing-08);
158
+ width: var(--mds-spacing-08);
157
159
  }
158
160
  }
159
161
  }
@@ -161,8 +163,8 @@
161
163
  @nest .hasSide & {
162
164
  & svg {
163
165
  @media (--dev-dot-viewport) {
164
- height: var(--hdsplus-spacing-08);
165
- width: var(--hdsplus-spacing-08);
166
+ height: var(--mds-spacing-08);
167
+ width: var(--mds-spacing-08);
166
168
  }
167
169
  }
168
170
  }
@@ -171,7 +173,7 @@
171
173
  .productTextContent {
172
174
  display: flex;
173
175
  flex-direction: column;
174
- color: var(--token-color-foreground-strong);
176
+ color: var(--mds-color-foreground-strong);
175
177
  }
176
178
 
177
179
  .productDesc {
@@ -179,12 +181,12 @@
179
181
  font-size: 14px;
180
182
  line-height: 20px;
181
183
  letter-spacing: 0.0125em;
182
- color: var(--token-color-foreground-faint);
184
+ color: var(--mds-color-foreground-faint);
183
185
  }
184
186
 
185
187
  .focusIndicator {
186
188
  &:focus {
187
- outline: 2px solid var(--token-color-focus-action-internal);
189
+ outline: 2px solid var(--mds-color-focus-action-internal);
188
190
  outline-style: auto;
189
191
  }
190
192
  }
@@ -195,30 +197,39 @@
195
197
  justify-content: space-between;
196
198
  flex-direction: column;
197
199
 
200
+ @nest .topPromo & {
201
+ justify-content: flex-start;
202
+ }
203
+
198
204
  @media (--large) {
199
205
  @nest .noSide & {
200
- padding: var(--hdsplus-spacing-07) 0 var(--hdsplus-spacing-09)
201
- var(--hdsplus-spacing-04);
206
+ padding: var(--mds-spacing-05) 0 var(--mds-spacing-05) var(--mds-spacing-04);
207
+ }
208
+
209
+ @nest .topPromo & {
210
+ padding-bottom: var(--mds-spacing-04);
202
211
  }
203
212
  }
204
213
 
205
214
  @media (--dev-dot-viewport) {
206
215
  @nest .hasSide & {
207
- padding: var(--hdsplus-spacing-07) 0 var(--hdsplus-spacing-09)
208
- var(--hdsplus-spacing-04);
216
+ padding: var(--mds-spacing-07) 0 var(--mds-spacing-09) var(--mds-spacing-04);
217
+ }
218
+
219
+ @nest .topPromo & {
220
+ padding-bottom: var(--mds-spacing-04);
209
221
  }
210
222
  }
211
223
  }
212
224
 
213
225
  .sidePanel {
214
226
  height: 100%;
215
- background: var(--token-color-surface-faint);
227
+ background: var(--mds-color-surface-faint);
216
228
  display: flex;
217
229
  flex-direction: column;
218
- gap: var(--hdsplus-spacing-05);
230
+ gap: var(--mds-spacing-05);
219
231
  margin: 0;
220
- padding: var(--hdsplus-spacing-07) var(--hdsplus-spacing-04)
221
- var(--hdsplus-spacing-09) var(--hdsplus-spacing-07);
232
+ padding: var(--mds-spacing-07) var(--mds-spacing-04) var(--mds-spacing-09) var(--mds-spacing-07);
222
233
  }
223
234
 
224
235
  .sidePanelItems {
@@ -227,24 +238,24 @@
227
238
  padding: 0;
228
239
  display: grid;
229
240
  grid-template-columns: 1fr;
230
- gap: var(--hdsplus-spacing-07);
241
+ gap: var(--mds-spacing-07);
231
242
 
232
243
  @media (--dev-dot-viewport) {
233
- gap: var(--hdsplus-spacing-05);
244
+ gap: var(--mds-spacing-05);
234
245
  }
235
246
  }
236
247
 
237
248
  /* Lifted from .productWrapper */
238
249
  .sidePanelItem {
239
250
  display: flex;
240
- gap: var(--hdsplus-spacing-05);
251
+ gap: var(--mds-spacing-05);
241
252
 
242
253
  @media (--dev-dot-viewport) {
243
- padding: var(--hdsplus-spacing-03) var(--hdsplus-spacing-05);
254
+ padding: var(--mds-spacing-03) var(--mds-spacing-05);
244
255
 
245
256
  &:hover {
246
- background-color: var(--token-color-surface-interactive-hover);
247
- border-radius: var(--hdsplus-spacing-01);
257
+ background-color: var(--mds-color-surface-interactive-hover);
258
+ border-radius: var(--mds-spacing-01);
248
259
  }
249
260
  }
250
261
  }
@@ -252,30 +263,30 @@
252
263
  /* Lifted from:
253
264
  packages/react-components/src/components/nav-panel/components/link-list/style.module.css */
254
265
  .iconBackground {
255
- background: var(--token-color-foreground-high-contrast);
256
- height: var(--hdsplus-spacing-08);
257
- width: var(--hdsplus-spacing-08);
266
+ background: var(--mds-color-foreground-high-contrast);
267
+ height: var(--mds-spacing-08);
268
+ width: var(--mds-spacing-08);
258
269
  display: flex;
259
270
  align-items: center;
260
271
  justify-content: center;
261
272
  border-radius: 3px;
262
273
  flex: none;
263
274
  margin-top: 3px;
264
- border: 1px solid var(--token-color-border-primary);
275
+ border: 1px solid var(--mds-color-border-primary);
265
276
  }
266
277
 
267
278
  /* Lifted from .productTextContent */
268
279
  .sidePanelItemContent {
269
280
  display: flex;
270
281
  flex-direction: column;
271
- color: var(--token-color-foreground-strong);
282
+ color: var(--mds-color-foreground-strong);
272
283
  }
273
284
 
274
285
  .sidePanelItemDesc {
275
286
  font-weight: 400;
276
287
  font-size: 13px;
277
288
  line-height: 18px;
278
- color: var(--token-color-foreground-primary);
289
+ color: var(--mds-color-foreground-primary);
279
290
  }
280
291
 
281
292
  /* Branding exception classnames */
@@ -283,10 +294,10 @@ packages/react-components/src/components/nav-panel/components/link-list/style.mo
283
294
  /* Allows switching to a dark-mode-specific color for Terraform */
284
295
  .terraform {
285
296
  & use {
286
- fill: var(--token-color-terraform-brand);
297
+ fill: var(--mds-color-terraform-brand);
287
298
 
288
299
  @nest [data-theme='dark'] & {
289
- fill: var(--token-color-terraform-foreground);
300
+ fill: var(--mds-color-terraform-foreground);
290
301
  }
291
302
  }
292
303
 
@@ -301,15 +312,62 @@ packages/react-components/src/components/nav-panel/components/link-list/style.mo
301
312
  */
302
313
  .hcpVaultSecrets,
303
314
  .hcpVaultRadar {
304
- padding: var(--hdsplus-spacing-01);
305
- border: 2px solid var(--token-color-vault-brand);
315
+ padding: var(--mds-spacing-01);
316
+ border: 2px solid var(--mds-color-vault-brand);
306
317
  border-radius: 3px;
307
318
 
308
319
  & use {
309
- fill: var(--token-color-foreground-strong);
320
+ fill: var(--mds-color-foreground-strong);
310
321
  }
311
322
 
312
323
  & path {
313
324
  fill: inherit;
314
325
  }
315
326
  }
327
+
328
+ .sidePanelText {
329
+ font-weight: var(--mds-typography-font-weight-semibold);
330
+ }
331
+
332
+ .productCategoryHasGroup {
333
+ & .productList {
334
+ padding-left: 0;
335
+ padding-right: 0;
336
+ padding-top: 0;
337
+ }
338
+
339
+ & .productWrapper {
340
+ gap: var(--mds-spacing-04);
341
+
342
+ @media (--small) {
343
+ padding: var(--mds-spacing-03) var(--mds-spacing-05);
344
+ }
345
+ }
346
+
347
+ & .productLogo {
348
+ margin-top: 3px;
349
+ height: 32px;
350
+ width: 32px;
351
+ min-width: 32px;
352
+
353
+ & svg {
354
+ width: 100%;
355
+ height: 100%;
356
+ }
357
+ }
358
+
359
+ & .terraform {
360
+ width: 100%;
361
+ height: 100%;
362
+ }
363
+ }
364
+
365
+ .productGroupLink {
366
+ min-width: 100%;
367
+ max-width: 100%;
368
+ margin-bottom: var(--mds-spacing-03);
369
+ color: var(--mds-color-foreground-strong);
370
+ font-family: var(--mds-typography-font-stack-text);
371
+ font-size: var(--mds-typography-body-200-font-size);
372
+ line-height: var(--mds-typography-body-200-line-height);
373
+ }