@hashicorp/react-components 0.0.0-canary.29ac326 → 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.
Files changed (104) hide show
  1. package/package.json +7 -6
  2. package/src/components/actions/index.tsx +5 -5
  3. package/src/components/call-to-action/index.tsx +12 -10
  4. package/src/components/call-to-action/styles/variant-centered.module.css +5 -4
  5. package/src/components/call-to-action/styles/variant-compact-grid.module.css +6 -4
  6. package/src/components/call-to-action/styles/variant-compact.module.css +6 -4
  7. package/src/components/call-to-action/styles/variant-links.module.css +6 -11
  8. package/src/components/card/index.test.tsx +1 -1
  9. package/src/components/card/newsroom-card/index.test.tsx +1 -1
  10. package/src/components/card/newsroom-card/style.module.css +1 -1
  11. package/src/components/card/partner-card/index.tsx +5 -5
  12. package/src/components/card/person-card/index.tsx +3 -3
  13. package/src/components/card/primitives.tsx +20 -19
  14. package/src/components/card/resource-card/index.test.tsx +1 -1
  15. package/src/components/card/resource-card/index.tsx +3 -0
  16. package/src/components/card/style.module.css +2 -2
  17. package/src/components/card/types.ts +2 -2
  18. package/src/components/card/unified-card/index.spec.tsx +40 -0
  19. package/src/components/card/unified-card/index.tsx +5 -11
  20. package/src/components/inline-video/index.tsx +104 -0
  21. package/src/components/inline-video/style.module.css +99 -0
  22. package/src/components/intro/style.module.css +2 -2
  23. package/src/components/marketo-form/contexts/FormMetadata.ts +2 -0
  24. package/src/components/marketo-form/form/index.tsx +12 -7
  25. package/src/components/marketo-form/partials/fields/checkbox-field/index.tsx +1 -1
  26. package/src/components/marketo-form/partials/fields/email-field/index.tsx +1 -1
  27. package/src/components/marketo-form/partials/fields/form-page-url-field/index.tsx +12 -1
  28. package/src/components/marketo-form/partials/fields/hidden-field/index.tsx +1 -0
  29. package/src/components/marketo-form/partials/fields/htmltext-field/style.module.css +2 -2
  30. package/src/components/marketo-form/partials/fields/radio-buttons-field/index.tsx +1 -1
  31. package/src/components/marketo-form/partials/fields/select-field/index.tsx +1 -1
  32. package/src/components/marketo-form/partials/fields/telephone-field/index.tsx +1 -1
  33. package/src/components/marketo-form/partials/fields/text-field/index.tsx +1 -1
  34. package/src/components/marketo-form/partials/fields/textarea-field/index.tsx +1 -1
  35. package/src/components/marketo-form/types.ts +10 -12
  36. package/src/components/marketo-form/utils.ts +1 -1
  37. package/src/components/nav-panel/components/link-list/index.tsx +15 -9
  38. package/src/components/nav-panel/components/link-list/style.module.css +10 -10
  39. package/src/components/nav-panel/components/panel/column/index.tsx +15 -2
  40. package/src/components/nav-panel/components/panel/column/style.module.css +13 -3
  41. package/src/components/nav-panel/components/panel/root/index.tsx +11 -2
  42. package/src/components/nav-panel/components/panel/root/style.module.css +20 -6
  43. package/src/components/nav-panel/components/promo/index.tsx +23 -10
  44. package/src/components/nav-panel/components/promo/style.module.css +48 -16
  45. package/src/components/nav-panel/product-panel/index.tsx +46 -16
  46. package/src/components/nav-panel/product-panel/style.module.css +151 -42
  47. package/src/components/nav-panel/standard-panel/index.tsx +3 -0
  48. package/src/components/nav-panel/standard-panel/style.module.css +2 -2
  49. package/src/components/next-steps/index.tsx +3 -2
  50. package/src/components/next-steps/style.module.css +18 -18
  51. package/src/components/product-badge/index.tsx +1 -1
  52. package/src/components/product-badge/style.module.css +2 -2
  53. package/src/components/products-used/style.module.css +7 -7
  54. package/src/components/related-content/index.tsx +28 -29
  55. package/src/components/related-content/style.module.css +58 -60
  56. package/src/components/related-content/types.ts +2 -2
  57. package/src/components/subnav/index.tsx +12 -3
  58. package/src/components/subnav/partials/CtaLinks/github-stars-link/style.module.css +8 -12
  59. package/src/components/subnav/partials/CtaLinks/index.tsx +9 -8
  60. package/src/components/subnav/partials/CtaLinks/style.module.css +6 -6
  61. package/src/components/subnav/partials/DropdownTrigger/index.tsx +2 -2
  62. package/src/components/subnav/partials/DropdownTrigger/style.module.css +11 -8
  63. package/src/components/subnav/partials/MenuItemsDefault/index.tsx +24 -8
  64. package/src/components/subnav/partials/MenuItemsDefault/style.module.css +44 -31
  65. package/src/components/subnav/partials/MenuItemsOverflow/index.tsx +17 -4
  66. package/src/components/subnav/partials/MenuItemsOverflow/style.module.css +24 -18
  67. package/src/components/subnav/partials/TitleLink/index.tsx +6 -4
  68. package/src/components/subnav/partials/TitleLink/mktg-logos/all-community-product-logos_on-dark.ts +2 -1
  69. package/src/components/subnav/partials/TitleLink/mktg-logos/all-community-product-logos_on-light.ts +2 -1
  70. package/src/components/subnav/partials/TitleLink/style.module.css +3 -3
  71. package/src/components/subnav/partials/nav-item-text/style.module.css +2 -4
  72. package/src/components/subnav/style.module.css +5 -7
  73. package/src/lib/get-localized-link-props/index.test.ts +30 -0
  74. package/src/lib/get-localized-link-props/index.ts +45 -0
  75. package/src/lib/parse-url/index.test.ts +40 -1
  76. package/src/lib/parse-url/index.ts +77 -9
  77. package/src/lib/supported-locales/index.ts +1 -0
  78. package/src/lib/track-nav-click-event/index.ts +4 -4
  79. package/src/lib/v/index.ts +4 -5
  80. package/src/components/consent-manager/README.md +0 -73
  81. package/src/components/consent-manager/components/banner/banner.module.css +0 -23
  82. package/src/components/consent-manager/components/banner/banner.test.tsx +0 -31
  83. package/src/components/consent-manager/components/banner/banner.tsx +0 -73
  84. package/src/components/consent-manager/components/dialog/dialog.module.css +0 -145
  85. package/src/components/consent-manager/components/dialog/dialog.test.tsx +0 -194
  86. package/src/components/consent-manager/components/dialog/dialog.tsx +0 -339
  87. package/src/components/consent-manager/img/icn_close.tsx +0 -19
  88. package/src/components/consent-manager/index.test.tsx +0 -334
  89. package/src/components/consent-manager/index.tsx +0 -186
  90. package/src/components/consent-manager/loader/README.md +0 -29
  91. package/src/components/consent-manager/loader/categories.ts +0 -22
  92. package/src/components/consent-manager/loader/index.tsx +0 -94
  93. package/src/components/consent-manager/loader/presets/enterprise.ts +0 -12
  94. package/src/components/consent-manager/loader/presets/oss.ts +0 -10
  95. package/src/components/consent-manager/loader/services.ts +0 -45
  96. package/src/components/consent-manager/scripts/custom.tsx +0 -59
  97. package/src/components/consent-manager/scripts/segment.tsx +0 -87
  98. package/src/components/consent-manager/style.module.css +0 -9
  99. package/src/components/consent-manager/types.ts +0 -55
  100. package/src/components/consent-manager/util/cookies.test.ts +0 -75
  101. package/src/components/consent-manager/util/cookies.ts +0 -70
  102. package/src/components/consent-manager/util/integrations.test.ts +0 -115
  103. package/src/components/consent-manager/util/integrations.ts +0 -110
  104. package/src/components/subnav/theme.module.css +0 -50
@@ -1,16 +1,30 @@
1
+ @custom-media --dev-dot-viewport (min-width: 924px);
2
+
1
3
  .root {
2
4
  width: 100%;
3
5
  display: flex;
4
6
  flex-direction: column;
5
7
  justify-content: space-between;
6
8
  /* stylelint-disable-next-line unit-no-unknown */
7
- min-height: calc(100dvh - var(--hdsplus-spacing-12));
9
+ min-height: calc(100dvh - var(--mds-spacing-12));
8
10
 
9
11
  @media (--large) {
10
- justify-content: flex-start;
11
- height: 100%;
12
- min-height: fit-content;
13
- padding: var(--hdsplus-spacing-05) var(--hdsplus-spacing-04);
14
- gap: var(--hdsplus-spacing-04);
12
+ &:not(.hasSide) {
13
+ justify-content: flex-start;
14
+ height: 100%;
15
+ min-height: fit-content;
16
+ padding: var(--mds-spacing-05) var(--mds-spacing-04);
17
+ gap: var(--mds-spacing-04);
18
+ }
19
+ }
20
+
21
+ @media (--dev-dot-viewport) {
22
+ &.hasSide {
23
+ justify-content: flex-start;
24
+ height: 100%;
25
+ min-height: fit-content;
26
+ padding: var(--mds-spacing-05) var(--mds-spacing-04);
27
+ gap: var(--mds-spacing-04);
28
+ }
15
29
  }
16
30
  }
@@ -1,14 +1,15 @@
1
1
  import { useCallback } from 'react'
2
2
  import classNames from 'classnames'
3
- import { v } from '../../../../lib/v'
3
+ import { vercelSplit } from '../../../../lib/v'
4
4
  import Link from 'next/link'
5
- import { parseUrl } from '../../../../lib/parse-url'
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-design-system-components/src/components/flight-icon'
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
@@ -16,9 +17,12 @@ export interface PromoProps {
16
17
  slug?: string
17
18
  icon?: string
18
19
  theme: string
20
+ hasSidePanel?: boolean
21
+ isPromoOnTop?: boolean
19
22
  }
20
23
 
21
24
  export default function Promo({
25
+ locale,
22
26
  title,
23
27
  description,
24
28
  linkUrl,
@@ -26,6 +30,8 @@ export default function Promo({
26
30
  slug,
27
31
  icon,
28
32
  theme,
33
+ hasSidePanel,
34
+ isPromoOnTop = false,
29
35
  }: PromoProps) {
30
36
  const handleClick = useCallback((title, linkUrl, linkTitle, slug) => {
31
37
  if (window && window.analytics) {
@@ -40,23 +46,29 @@ export default function Promo({
40
46
  }, [])
41
47
 
42
48
  return (
43
- <div className={s.promo}>
49
+ <div
50
+ className={classNames(s.promo, {
51
+ [s.hasSide]: hasSidePanel,
52
+ [s.noSide]: !hasSidePanel,
53
+ [s.topPromo]: isPromoOnTop,
54
+ })}
55
+ >
44
56
  {icon && (
45
57
  <div
46
58
  className={classNames(s.icon, {
47
- [s.hashidays]: v(theme) === 'hashidays',
48
- [s.hashiconf]: v(theme) === 'hashiconf',
59
+ [s.hashidays]: vercelSplit(theme) === 'hashidays',
60
+ [s.hashiconf]: vercelSplit(theme) === 'hashiconf',
49
61
  })}
50
62
  >
51
- <FlightIcon name={v(icon)} />
63
+ <FlightIcon name={vercelSplit(icon)} />
52
64
  </div>
53
65
  )}
54
66
  <div className={s.rightContent}>
55
67
  <div>
56
68
  <div
57
69
  className={classNames(s.title, {
58
- [s.hashidays]: v(theme) === 'hashidays',
59
- [s.hashiconf]: v(theme) === 'hashiconf',
70
+ [s.hashidays]: vercelSplit(theme) === 'hashidays',
71
+ [s.hashiconf]: vercelSplit(theme) === 'hashiconf',
60
72
  })}
61
73
  >
62
74
  {title}
@@ -65,7 +77,8 @@ export default function Promo({
65
77
  </div>
66
78
  <NavigationMenu.Link asChild>
67
79
  <Link
68
- href={parseUrl(linkUrl).href}
80
+ locale={locale ? locale : undefined}
81
+ {...getLocalizedLinkProps(linkUrl, locale)}
69
82
  className={s.link}
70
83
  onClickCapture={() => handleClick(title, linkUrl, linkTitle, slug)}
71
84
  >
@@ -1,45 +1,77 @@
1
+ @custom-media --dev-dot-viewport (min-width: 924px);
2
+
1
3
  .promo {
2
4
  display: flex;
3
- border-radius: var(--hdsplus-spacing-01);
5
+ border-radius: var(--mds-spacing-01);
4
6
  border: 1px solid var(--token-color-border-faint);
5
7
  background-color: var(--token-color-surface-faint);
6
- padding: var(--hdsplus-spacing-05) var(--hdsplus-spacing-08)
7
- var(--hdsplus-spacing-06) var(--hdsplus-spacing-08);
8
+ padding: var(--mds-spacing-05) var(--mds-spacing-08)
9
+ var(--mds-spacing-06) var(--mds-spacing-08);
8
10
  flex-direction: row;
9
- gap: var(--hdsplus-spacing-04);
10
- margin: var(--hdsplus-spacing-05);
11
+ gap: var(--mds-spacing-04);
12
+ margin: var(--mds-spacing-07);
13
+ margin-bottom: var(--mds-spacing-09);
11
14
 
12
15
  @media (--large) {
13
- margin: 0;
14
- width: min-content;
15
- min-width: 100%;
16
+ &.topPromo {
17
+ margin-bottom: var(--mds-spacing-05);
18
+ }
19
+ &.noSide {
20
+ margin: 0;
21
+ width: min-content;
22
+ min-width: 100%;
23
+ }
24
+ }
25
+
26
+ @media (--dev-dot-viewport) {
27
+ &.topPromo {
28
+ margin-bottom: var(--mds-spacing-05);
29
+ }
30
+ &.hasSide {
31
+ margin: 0;
32
+ width: min-content;
33
+ min-width: 100%;
34
+ }
16
35
  }
17
36
  }
18
37
 
38
+ .topPromo {
39
+ margin-bottom: 0;
40
+ }
41
+
19
42
  .rightContent {
20
43
  display: flex;
21
44
  flex-wrap: wrap;
22
- gap: var(--hdsplus-spacing-03);
45
+ gap: var(--mds-spacing-03);
23
46
  width: 100%;
24
47
  justify-content: space-between;
25
48
  }
26
49
 
27
50
  .title {
28
- font-weight: var(--font-weight-semi-bold);
51
+ font-weight: var(--mds-typography-font-weight-semibold);
29
52
  }
30
53
 
31
54
  .description {
32
- font-size: var(--hdsplus-typography-body-200-font-size);
33
- font-weight: var(--token-typography-font-weight-regular);
34
- margin-top: var(--hdsplus-spacing-01);
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);
35
58
  }
36
59
 
37
60
  .icon {
38
61
  display: none;
39
62
 
40
63
  @media (--large) {
41
- display: block;
42
- margin-top: 3px;
64
+ @nest .noSide & {
65
+ display: block;
66
+ margin-top: 3px;
67
+ }
68
+ }
69
+
70
+ @media (--dev-dot-viewport) {
71
+ @nest .hasSide & {
72
+ display: block;
73
+ margin-top: 3px;
74
+ }
43
75
  }
44
76
  }
45
77
 
@@ -48,7 +80,7 @@
48
80
  display: flex;
49
81
  flex-direction: row;
50
82
  align-items: center;
51
- gap: var(--hdsplus-spacing-02);
83
+ gap: var(--mds-spacing-02);
52
84
 
53
85
  &:hover {
54
86
  text-decoration: underline;
@@ -1,16 +1,17 @@
1
+ import classNames from 'classnames'
1
2
  import Link from 'next/link'
2
3
  import * as NavPanel from '../components/panel'
3
4
  import Promo, { type PromoProps } from '../components/promo'
5
+ import { getLocalizedLinkProps } from '../../../lib/get-localized-link-props'
4
6
  import { Products } from '@hashicorp/platform-product-meta'
5
- import FlightIcon from '@hashicorp/react-design-system-components/src/components/flight-icon'
6
- import { TextPlus } from '@hashicorp/react-design-system-components/src/components/text'
7
- 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'
8
9
  import { trackNavClickEvent } from '../../../lib/track-nav-click-event'
9
10
  import * as NavigationMenu from '@radix-ui/react-navigation-menu'
10
11
  import s from './style.module.css'
11
12
 
12
13
  const PRODUCT_LOGO_MAP = new Map([
13
- ['Terraform', 'terraform-fill-color'],
14
+ ['Terraform', 'terraform-fill'],
14
15
  ['Packer', 'packer-fill-color'],
15
16
  ['Vault', 'vault-fill-color'],
16
17
  ['Boundary', 'boundary-fill-color'],
@@ -23,11 +24,13 @@ const PRODUCT_LOGO_MAP = new Map([
23
24
  ])
24
25
 
25
26
  const PRODUCT_LOGO_EXCEPTION_CLASSNAMES = {
27
+ Terraform: 'terraform',
26
28
  'HCP Vault Secrets': 'hcpVaultSecrets',
27
29
  'HCP Vault Radar': 'hcpVaultRadar',
28
30
  }
29
31
 
30
32
  export interface ProductsPanelProps {
33
+ locale: string
31
34
  productCategories: any
32
35
  promo?: PromoProps
33
36
  sidePanel?: {
@@ -39,27 +42,44 @@ export interface ProductsPanelProps {
39
42
  url: string
40
43
  }[]
41
44
  }
45
+ isPromoOnTop?: boolean
42
46
  }
43
47
 
44
48
  const ProductPanel = ({
49
+ locale,
45
50
  productCategories,
46
51
  promo,
47
52
  sidePanel,
53
+ isPromoOnTop = false,
48
54
  }: ProductsPanelProps) => {
49
55
  return (
50
- <NavPanel.Root className={s.productPanel}>
56
+ <NavPanel.Root
57
+ className={classNames(s.productPanel, {
58
+ [s.hasSide]: sidePanel,
59
+ [s.noSide]: !sidePanel,
60
+ [s.topPromo]: isPromoOnTop,
61
+ })}
62
+ hasSidePanel={Boolean(sidePanel)}
63
+ >
51
64
  <div className={s.mainPanel}>
52
- <NavPanel.Column>
65
+ {promo && isPromoOnTop ? (
66
+ <Promo
67
+ {...promo}
68
+ hasSidePanel={Boolean(sidePanel)}
69
+ isPromoOnTop={isPromoOnTop}
70
+ />
71
+ ) : null}
72
+ <NavPanel.Column hasSidePanel={Boolean(sidePanel)}>
53
73
  <ul className={s.productCategories}>
54
74
  {productCategories.map(({ title, products }) => {
55
75
  return (
56
76
  <li key={title} className={s.productCategory}>
57
- <TextPlus.Body className={s.eyebrow}>{title}</TextPlus.Body>
77
+ <Text.Body className={s.eyebrow}>{title}</Text.Body>
58
78
  <ul className={s.productList}>
59
79
  {products.map((product) => {
60
80
  return (
61
81
  <li key={product.url}>
62
- <NavProduct {...product} />
82
+ <NavProduct locale={locale} {...product} />
63
83
  </li>
64
84
  )
65
85
  })}
@@ -69,14 +89,16 @@ const ProductPanel = ({
69
89
  })}
70
90
  </ul>
71
91
  </NavPanel.Column>
72
- {promo ? <Promo {...promo} /> : null}
92
+ {promo && !isPromoOnTop ? (
93
+ <Promo {...promo} hasSidePanel={Boolean(sidePanel)} />
94
+ ) : null}
73
95
  </div>
74
96
 
75
97
  {sidePanel ? (
76
98
  <NavPanel.Column className={s.sidePanel}>
77
- <TextPlus.Body size="200" weight="semibold">
99
+ <Text.Body size="200" weight="semibold">
78
100
  {sidePanel.label}
79
- </TextPlus.Body>
101
+ </Text.Body>
80
102
 
81
103
  {/* ! TODO Replace the below list with the <LinkList /> component,
82
104
  That component will require a refactor to support greater customization
@@ -87,7 +109,12 @@ const ProductPanel = ({
87
109
  {sidePanel.navItems.map(({ icon, title, description, url }) => {
88
110
  return (
89
111
  <li key={title}>
90
- <Link href={parseUrl(url).href} className={s.sidePanelItem}>
112
+ <Link
113
+ aria-label={`${title} - ${description}`}
114
+ {...getLocalizedLinkProps(url, locale)}
115
+ locale={locale ? locale : undefined}
116
+ className={classNames(s.sidePanelItem, s.focusIndicator)}
117
+ >
91
118
  <div className={s.iconBackground}>
92
119
  <FlightIcon
93
120
  size={16}
@@ -96,9 +123,9 @@ const ProductPanel = ({
96
123
  />
97
124
  </div>
98
125
  <div className={s.sidePanelItemContent}>
99
- <TextPlus.Body size="200" weight="semibold" tag="span">
126
+ <Text.Body size="200" weight="semibold" tag="span">
100
127
  {title}
101
- </TextPlus.Body>
128
+ </Text.Body>
102
129
  <span className={s.sidePanelItemDesc}>{description}</span>
103
130
  </div>
104
131
  </Link>
@@ -113,16 +140,19 @@ const ProductPanel = ({
113
140
  }
114
141
 
115
142
  export interface NavProductProps {
143
+ locale?: string
116
144
  url: string
117
145
  product: Products | string
118
146
  description: string
119
147
  }
120
148
 
121
- function NavProduct({ url, product, description }: NavProductProps) {
149
+ function NavProduct({ locale, url, product, description }: NavProductProps) {
122
150
  return (
123
151
  <NavigationMenu.Link asChild>
124
152
  <Link
125
- href={parseUrl(url).href}
153
+ aria-label={`${product} - ${description}`}
154
+ {...getLocalizedLinkProps(url, locale)}
155
+ locale={locale ? locale : undefined}
126
156
  onClickCapture={() => {
127
157
  trackNavClickEvent(product, url, 'products')
128
158
  }}
@@ -1,11 +1,24 @@
1
+ @custom-media --dev-dot-viewport (min-width: 924px);
2
+
1
3
  .productPanel {
2
4
  height: 100%;
3
5
 
4
6
  @media (--large) {
5
- display: grid;
6
- grid-template-rows: 1fr;
7
- grid-template-columns: max-content max-content;
8
- padding: 0;
7
+ &.noSide {
8
+ display: grid;
9
+ grid-template-rows: 1fr;
10
+ grid-template-columns: max-content max-content;
11
+ padding: 0;
12
+ }
13
+ }
14
+
15
+ @media (--dev-dot-viewport) {
16
+ &.hasSide {
17
+ display: grid;
18
+ grid-template-rows: 1fr;
19
+ grid-template-columns: max-content max-content;
20
+ padding: 0;
21
+ }
9
22
  }
10
23
  }
11
24
 
@@ -13,10 +26,22 @@
13
26
  list-style: none;
14
27
  padding: 0;
15
28
  display: grid;
16
- margin: var(--hdsplus-spacing-06) 0 0;
29
+ margin: var(--mds-spacing-07) 0 0;
30
+
31
+ @nest .topPromo & {
32
+ margin-bottom: var(--mds-spacing-07);
33
+ }
17
34
 
18
35
  @media (--large) {
19
- margin: 0;
36
+ @nest .noSide & {
37
+ margin: 0;
38
+ }
39
+ }
40
+
41
+ @media (--dev-dot-viewport) {
42
+ @nest .hasSide & {
43
+ margin: 0;
44
+ }
20
45
  }
21
46
  }
22
47
 
@@ -27,18 +52,28 @@
27
52
 
28
53
  &:first-child {
29
54
  border-bottom: 1px solid var(--token-color-border-primary);
30
- margin-bottom: var(--hdsplus-spacing-05);
31
- padding-bottom: var(--hdsplus-spacing-05);
55
+ margin-bottom: var(--mds-spacing-05);
56
+ padding-bottom: var(--mds-spacing-05);
32
57
  }
33
58
  }
34
59
 
35
60
  .eyebrow {
36
- padding-bottom: var(--hdsplus-spacing-04);
61
+ padding-bottom: var(--mds-spacing-04);
37
62
  color: var(--token-color-foreground-strong);
38
- font-weight: var(--font-weight-semi-bold);
63
+ font-weight: var(--mds-typography-font-weight-semibold);
39
64
 
40
65
  @media (--large) {
41
- padding: 0 0 var(--hdsplus-spacing-01) var(--hdsplus-spacing-04);
66
+ @nest .noSide & {
67
+ padding-bottom: 0;
68
+ padding-left: var(--mds-spacing-06);
69
+ }
70
+ }
71
+
72
+ @media (--dev-dot-viewport) {
73
+ @nest .hasSide & {
74
+ padding-bottom: 0;
75
+ padding-left: var(--mds-spacing-06);
76
+ }
42
77
  }
43
78
  }
44
79
 
@@ -50,10 +85,31 @@
50
85
  padding: 0;
51
86
 
52
87
  @media (--large) {
53
- grid-auto-flow: row;
54
- grid-template-columns: repeat(2, 300px);
55
- grid-template-rows: repeat(2, max-content);
56
- gap: 0;
88
+ @nest .noSide & {
89
+ padding: var(--mds-spacing-06) var(--mds-spacing-05)
90
+ var(--mds-spacing-04);
91
+ grid-auto-flow: row;
92
+ grid-template-columns: repeat(2, 300px);
93
+ grid-template-rows: repeat(2, max-content);
94
+ gap: 0;
95
+ }
96
+ }
97
+
98
+ @media (--dev-dot-viewport) {
99
+ @nest .hasSide & {
100
+ padding: var(--mds-spacing-06) var(--mds-spacing-05)
101
+ var(--mds-spacing-04);
102
+ grid-auto-flow: row;
103
+ grid-template-columns: repeat(2, 300px);
104
+ grid-template-rows: repeat(2, max-content);
105
+ gap: 0;
106
+ }
107
+ }
108
+
109
+ & li:last-child {
110
+ & .productWrapper {
111
+ margin-bottom: 0;
112
+ }
57
113
  }
58
114
  }
59
115
 
@@ -61,16 +117,30 @@
61
117
 
62
118
  .productWrapper {
63
119
  display: flex;
64
- margin-bottom: var(--hdsplus-spacing-05);
65
- gap: var(--hdsplus-spacing-05);
120
+ margin-bottom: var(--mds-spacing-05);
121
+ gap: var(--mds-spacing-05);
66
122
 
67
123
  @media (--large) {
68
- padding: var(--hdsplus-spacing-05);
69
- margin-bottom: 0;
124
+ @nest .noSide & {
125
+ padding: var(--mds-spacing-03) var(--mds-spacing-05);
126
+ margin-bottom: 0;
127
+
128
+ &:hover {
129
+ background-color: var(--token-color-surface-interactive-hover);
130
+ border-radius: var(--mds-spacing-01);
131
+ }
132
+ }
133
+ }
70
134
 
71
- &:hover {
72
- background-color: var(--token-color-surface-interactive-hover);
73
- border-radius: var(--hdsplus-spacing-01);
135
+ @media (--dev-dot-viewport) {
136
+ @nest .hasSide & {
137
+ padding: var(--mds-spacing-03) var(--mds-spacing-05);
138
+ margin-bottom: 0;
139
+
140
+ &:hover {
141
+ background-color: var(--token-color-surface-interactive-hover);
142
+ border-radius: var(--mds-spacing-01);
143
+ }
74
144
  }
75
145
  }
76
146
  }
@@ -81,10 +151,23 @@
81
151
  & svg {
82
152
  height: 42px;
83
153
  width: 42px;
154
+ }
155
+
156
+ @nest .noSide & {
157
+ & svg {
158
+ @media (--large) {
159
+ height: var(--mds-spacing-08);
160
+ width: var(--mds-spacing-08);
161
+ }
162
+ }
163
+ }
84
164
 
85
- @media (--large) {
86
- height: var(--hdsplus-spacing-08);
87
- width: var(--hdsplus-spacing-08);
165
+ @nest .hasSide & {
166
+ & svg {
167
+ @media (--dev-dot-viewport) {
168
+ height: var(--mds-spacing-08);
169
+ width: var(--mds-spacing-08);
170
+ }
88
171
  }
89
172
  }
90
173
  }
@@ -117,8 +200,17 @@
117
200
  flex-direction: column;
118
201
 
119
202
  @media (--large) {
120
- padding: var(--hdsplus-spacing-05) 0 var(--hdsplus-spacing-05)
121
- var(--hdsplus-spacing-04);
203
+ @nest .noSide & {
204
+ padding: var(--mds-spacing-07) 0 var(--mds-spacing-09)
205
+ var(--mds-spacing-04);
206
+ }
207
+ }
208
+
209
+ @media (--dev-dot-viewport) {
210
+ @nest .hasSide & {
211
+ padding: var(--mds-spacing-07) 0 var(--mds-spacing-09)
212
+ var(--mds-spacing-04);
213
+ }
122
214
  }
123
215
  }
124
216
 
@@ -127,10 +219,10 @@
127
219
  background: var(--token-color-surface-faint);
128
220
  display: flex;
129
221
  flex-direction: column;
130
- gap: var(--hdsplus-spacing-05);
222
+ gap: var(--mds-spacing-05);
131
223
  margin: 0;
132
- padding: var(--hdsplus-spacing-05) var(--hdsplus-spacing-07)
133
- var(--hdsplus-spacing-09) var(--hdsplus-spacing-07);
224
+ padding: var(--mds-spacing-07) var(--mds-spacing-04)
225
+ var(--mds-spacing-09) var(--mds-spacing-07);
134
226
  }
135
227
 
136
228
  .sidePanelItems {
@@ -139,26 +231,24 @@
139
231
  padding: 0;
140
232
  display: grid;
141
233
  grid-template-columns: 1fr;
142
- gap: var(--hdsplus-spacing-07);
234
+ gap: var(--mds-spacing-07);
143
235
 
144
- @media (--large) {
145
- gap: var(--hdsplus-spacing-05);
236
+ @media (--dev-dot-viewport) {
237
+ gap: var(--mds-spacing-05);
146
238
  }
147
239
  }
148
240
 
149
241
  /* Lifted from .productWrapper */
150
242
  .sidePanelItem {
151
243
  display: flex;
152
- margin-bottom: var(--hdsplus-spacing-05);
153
- gap: var(--hdsplus-spacing-05);
244
+ gap: var(--mds-spacing-05);
154
245
 
155
- @media (--large) {
156
- padding: var(--hdsplus-spacing-03) var(--hdsplus-spacing-05);
157
- margin-bottom: 0;
246
+ @media (--dev-dot-viewport) {
247
+ padding: var(--mds-spacing-03) var(--mds-spacing-05);
158
248
 
159
249
  &:hover {
160
250
  background-color: var(--token-color-surface-interactive-hover);
161
- border-radius: var(--hdsplus-spacing-01);
251
+ border-radius: var(--mds-spacing-01);
162
252
  }
163
253
  }
164
254
  }
@@ -167,8 +257,8 @@
167
257
  packages/react-components/src/components/nav-panel/components/link-list/style.module.css */
168
258
  .iconBackground {
169
259
  background: var(--token-color-foreground-high-contrast);
170
- height: var(--hdsplus-spacing-08);
171
- width: var(--hdsplus-spacing-08);
260
+ height: var(--mds-spacing-08);
261
+ width: var(--mds-spacing-08);
172
262
  display: flex;
173
263
  align-items: center;
174
264
  justify-content: center;
@@ -194,9 +284,28 @@ packages/react-components/src/components/nav-panel/components/link-list/style.mo
194
284
 
195
285
  /* Branding exception classnames */
196
286
 
287
+ /* Allows switching to a dark-mode-specific color for Terraform */
288
+ .terraform {
289
+ & use {
290
+ fill: var(--token-color-terraform-brand);
291
+
292
+ @nest [data-theme='dark'] & {
293
+ fill: var(--token-color-terraform-foreground);
294
+ }
295
+ }
296
+
297
+ & path {
298
+ fill: inherit;
299
+ }
300
+ }
301
+
302
+ /* Styles for HCP Vault mimic the spec for `product-square` icons,
303
+ while allowing the symbol inside the icon border to change color
304
+ based on the site's theme
305
+ */
197
306
  .hcpVaultSecrets,
198
307
  .hcpVaultRadar {
199
- padding: var(--hdsplus-spacing-01);
308
+ padding: var(--mds-spacing-01);
200
309
  border: 2px solid var(--token-color-vault-brand);
201
310
  border-radius: 3px;
202
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)