@hashicorp/react-components 1.1.7 → 1.1.10
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 +1 -1
- package/src/components/nav-panel/components/panel/column/style.module.css +1 -1
- package/src/components/nav-panel/components/panel/root/style.module.css +1 -1
- package/src/components/nav-panel/components/promo/style.module.css +1 -1
- package/src/components/nav-panel/product-panel/index.tsx +7 -13
- package/src/components/nav-panel/product-panel/style.module.css +5 -5
package/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
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'
|
|
@@ -64,17 +63,7 @@ const ProductPanel = ({
|
|
|
64
63
|
return (
|
|
65
64
|
<li key={title} className={s.productCategory}>
|
|
66
65
|
<TextPlus.Body className={s.eyebrow}>{title}</TextPlus.Body>
|
|
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
|
-
>
|
|
66
|
+
<ul className={s.productList}>
|
|
78
67
|
{products.map((product) => {
|
|
79
68
|
return (
|
|
80
69
|
<li key={product.url}>
|
|
@@ -106,7 +95,11 @@ const ProductPanel = ({
|
|
|
106
95
|
{sidePanel.navItems.map(({ icon, title, description, url }) => {
|
|
107
96
|
return (
|
|
108
97
|
<li key={title}>
|
|
109
|
-
<Link
|
|
98
|
+
<Link
|
|
99
|
+
aria-label={`${title} - ${description}`}
|
|
100
|
+
href={parseUrl(url).href}
|
|
101
|
+
className={classNames(s.sidePanelItem, s.focusIndicator)}
|
|
102
|
+
>
|
|
110
103
|
<div className={s.iconBackground}>
|
|
111
104
|
<FlightIcon
|
|
112
105
|
size={16}
|
|
@@ -141,6 +134,7 @@ function NavProduct({ url, product, description }: NavProductProps) {
|
|
|
141
134
|
return (
|
|
142
135
|
<NavigationMenu.Link asChild>
|
|
143
136
|
<Link
|
|
137
|
+
aria-label={`${product} - ${description}`}
|
|
144
138
|
href={parseUrl(url).href}
|
|
145
139
|
onClickCapture={() => {
|
|
146
140
|
trackNavClickEvent(product, url, 'products')
|
|
@@ -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%;
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
@nest .noSide & {
|
|
85
85
|
padding: var(--hdsplus-spacing-06) var(--hdsplus-spacing-05)
|
|
86
86
|
var(--hdsplus-spacing-04);
|
|
87
|
-
grid-auto-flow:
|
|
87
|
+
grid-auto-flow: row;
|
|
88
88
|
grid-template-columns: repeat(2, 300px);
|
|
89
|
-
grid-template-rows: repeat(
|
|
89
|
+
grid-template-rows: repeat(2, max-content);
|
|
90
90
|
gap: 0;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
@nest .hasSide & {
|
|
96
96
|
padding: var(--hdsplus-spacing-06) var(--hdsplus-spacing-05)
|
|
97
97
|
var(--hdsplus-spacing-04);
|
|
98
|
-
grid-auto-flow:
|
|
98
|
+
grid-auto-flow: row;
|
|
99
99
|
grid-template-columns: repeat(2, 300px);
|
|
100
|
-
grid-template-rows: repeat(
|
|
100
|
+
grid-template-rows: repeat(2, max-content);
|
|
101
101
|
gap: 0;
|
|
102
102
|
}
|
|
103
103
|
}
|