@hashicorp/react-components 0.0.0-canary.16e137b → 0.0.0-canary.1931511
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
CHANGED
|
@@ -426,6 +426,10 @@ export const resolverErrors = (
|
|
|
426
426
|
* @returns MarketoFormField[] with columnSplit property set
|
|
427
427
|
*/
|
|
428
428
|
export function setFieldsColumnSplit(fieldsArr: MarketoFormField[]) {
|
|
429
|
+
if (!fieldsArr) {
|
|
430
|
+
return []
|
|
431
|
+
}
|
|
432
|
+
|
|
429
433
|
return fieldsArr.map((f) => {
|
|
430
434
|
const columnSplit = getFieldColumnSplit(fieldsArr, f)
|
|
431
435
|
return { ...f, columnSplit }
|
|
@@ -18,8 +18,15 @@ const PRODUCT_LOGO_MAP = new Map([
|
|
|
18
18
|
['Nomad', 'nomad-fill-color'],
|
|
19
19
|
['Waypoint', 'waypoint-fill-color'],
|
|
20
20
|
['Vagrant', 'vagrant-fill-color'],
|
|
21
|
+
['HCP Vault Secrets', 'vault-secrets'],
|
|
22
|
+
['HCP Vault Radar', 'vault-radar'],
|
|
21
23
|
])
|
|
22
24
|
|
|
25
|
+
const PRODUCT_LOGO_EXCEPTION_CLASSNAMES = {
|
|
26
|
+
'HCP Vault Secrets': 'hcpVaultSecrets',
|
|
27
|
+
'HCP Vault Radar': 'hcpVaultRadar',
|
|
28
|
+
}
|
|
29
|
+
|
|
23
30
|
export interface ProductsPanelProps {
|
|
24
31
|
productCategories: any
|
|
25
32
|
promo?: PromoProps
|
|
@@ -29,6 +36,7 @@ export interface ProductsPanelProps {
|
|
|
29
36
|
icon: string
|
|
30
37
|
title: string
|
|
31
38
|
description: string
|
|
39
|
+
url: string
|
|
32
40
|
}[]
|
|
33
41
|
}
|
|
34
42
|
}
|
|
@@ -69,23 +77,31 @@ const ProductPanel = ({
|
|
|
69
77
|
<TextPlus.Body size="200" weight="semibold">
|
|
70
78
|
{sidePanel.label}
|
|
71
79
|
</TextPlus.Body>
|
|
80
|
+
|
|
81
|
+
{/* ! TODO Replace the below list with the <LinkList /> component,
|
|
82
|
+
That component will require a refactor to support greater customization
|
|
83
|
+
Ticket:
|
|
84
|
+
https://app.asana.com/0/1206176289707208/1208162145034615/f
|
|
85
|
+
*/}
|
|
72
86
|
<ul className={s.sidePanelItems}>
|
|
73
|
-
{sidePanel.navItems.map(({ icon, title, description }) => {
|
|
87
|
+
{sidePanel.navItems.map(({ icon, title, description, url }) => {
|
|
74
88
|
return (
|
|
75
|
-
<li key={title}
|
|
76
|
-
<
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
<li key={title}>
|
|
90
|
+
<Link href={parseUrl(url).href} className={s.sidePanelItem}>
|
|
91
|
+
<div className={s.iconBackground}>
|
|
92
|
+
<FlightIcon
|
|
93
|
+
size={16}
|
|
94
|
+
name={icon}
|
|
95
|
+
color="var(--token-color-foreground-faint)"
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
<div className={s.sidePanelItemContent}>
|
|
99
|
+
<TextPlus.Body size="200" weight="semibold" tag="span">
|
|
100
|
+
{title}
|
|
101
|
+
</TextPlus.Body>
|
|
102
|
+
<span className={s.sidePanelItemDesc}>{description}</span>
|
|
103
|
+
</div>
|
|
104
|
+
</Link>
|
|
89
105
|
</li>
|
|
90
106
|
)
|
|
91
107
|
})}
|
|
@@ -115,7 +131,15 @@ function NavProduct({ url, product, description }: NavProductProps) {
|
|
|
115
131
|
<div className={s.productWrapper}>
|
|
116
132
|
<div className={s.productLogo}>
|
|
117
133
|
<FlightIcon
|
|
118
|
-
name={
|
|
134
|
+
name={
|
|
135
|
+
PRODUCT_LOGO_MAP.get('HCP Vault Secrets') ??
|
|
136
|
+
'hashicorp-fill-color'
|
|
137
|
+
}
|
|
138
|
+
className={
|
|
139
|
+
PRODUCT_LOGO_EXCEPTION_CLASSNAMES['HCP Vault Secrets']
|
|
140
|
+
? s[PRODUCT_LOGO_EXCEPTION_CLASSNAMES['HCP Vault Secrets']]
|
|
141
|
+
: undefined
|
|
142
|
+
}
|
|
119
143
|
/>
|
|
120
144
|
</div>
|
|
121
145
|
<div className={s.productTextContent}>
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
background: var(--token-color-surface-faint);
|
|
128
128
|
display: flex;
|
|
129
129
|
flex-direction: column;
|
|
130
|
-
gap: var(--hdsplus-spacing-
|
|
130
|
+
gap: var(--hdsplus-spacing-05);
|
|
131
131
|
margin: 0;
|
|
132
132
|
padding: var(--hdsplus-spacing-05) var(--hdsplus-spacing-07)
|
|
133
133
|
var(--hdsplus-spacing-09) var(--hdsplus-spacing-07);
|
|
@@ -137,6 +137,13 @@
|
|
|
137
137
|
list-style: none;
|
|
138
138
|
margin: 0;
|
|
139
139
|
padding: 0;
|
|
140
|
+
display: grid;
|
|
141
|
+
grid-template-columns: 1fr;
|
|
142
|
+
gap: var(--hdsplus-spacing-07);
|
|
143
|
+
|
|
144
|
+
@media (--large) {
|
|
145
|
+
gap: var(--hdsplus-spacing-05);
|
|
146
|
+
}
|
|
140
147
|
}
|
|
141
148
|
|
|
142
149
|
/* Lifted from .productWrapper */
|
|
@@ -146,7 +153,7 @@
|
|
|
146
153
|
gap: var(--hdsplus-spacing-05);
|
|
147
154
|
|
|
148
155
|
@media (--large) {
|
|
149
|
-
padding: var(--hdsplus-spacing-05);
|
|
156
|
+
padding: var(--hdsplus-spacing-03) var(--hdsplus-spacing-05);
|
|
150
157
|
margin-bottom: 0;
|
|
151
158
|
|
|
152
159
|
&:hover {
|
|
@@ -157,9 +164,9 @@
|
|
|
157
164
|
}
|
|
158
165
|
|
|
159
166
|
/* Lifted from:
|
|
160
|
-
|
|
167
|
+
packages/react-components/src/components/nav-panel/components/link-list/style.module.css */
|
|
161
168
|
.iconBackground {
|
|
162
|
-
background: var(--token-color-
|
|
169
|
+
background: var(--token-color-foreground-high-contrast);
|
|
163
170
|
height: var(--hdsplus-spacing-08);
|
|
164
171
|
width: var(--hdsplus-spacing-08);
|
|
165
172
|
display: flex;
|
|
@@ -168,6 +175,7 @@
|
|
|
168
175
|
border-radius: 3px;
|
|
169
176
|
flex: none;
|
|
170
177
|
margin-top: 3px;
|
|
178
|
+
border: 1px solid var(--token-color-border-primary);
|
|
171
179
|
}
|
|
172
180
|
|
|
173
181
|
/* Lifted from .productTextContent */
|
|
@@ -177,9 +185,30 @@
|
|
|
177
185
|
color: var(--token-color-foreground-strong);
|
|
178
186
|
}
|
|
179
187
|
|
|
180
|
-
.
|
|
188
|
+
.sidePanelItemDesc {
|
|
181
189
|
font-weight: 400;
|
|
182
190
|
font-size: 13px;
|
|
183
191
|
line-height: 18px;
|
|
184
192
|
color: var(--token-color-foreground-primary);
|
|
185
193
|
}
|
|
194
|
+
|
|
195
|
+
/* Branding exception classnames */
|
|
196
|
+
|
|
197
|
+
/* Styles for HCP Vault mimic the spec for `product-square` icons,
|
|
198
|
+
while allowing the symbol inside the icon border to change color
|
|
199
|
+
based on the site's theme
|
|
200
|
+
*/
|
|
201
|
+
.hcpVaultSecrets,
|
|
202
|
+
.hcpVaultRadar {
|
|
203
|
+
padding: var(--hdsplus-spacing-01);
|
|
204
|
+
border: 2px solid var(--token-color-vault-brand);
|
|
205
|
+
border-radius: 3px;
|
|
206
|
+
|
|
207
|
+
& use {
|
|
208
|
+
fill: var(--token-color-foreground-strong);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
& path {
|
|
212
|
+
fill: inherit;
|
|
213
|
+
}
|
|
214
|
+
}
|