@hashicorp/react-components 0.0.0-canary.88aaf8d → 0.0.0-canary.91072b5
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,10 +426,6 @@ 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
|
-
|
|
433
429
|
return fieldsArr.map((f) => {
|
|
434
430
|
const columnSplit = getFieldColumnSplit(fieldsArr, f)
|
|
435
431
|
return { ...f, columnSplit }
|
|
@@ -18,15 +18,8 @@ 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'],
|
|
23
21
|
])
|
|
24
22
|
|
|
25
|
-
const PRODUCT_LOGO_EXCEPTION_CLASSNAMES = {
|
|
26
|
-
'HCP Vault Secrets': 'hcpVaultSecrets',
|
|
27
|
-
'HCP Vault Radar': 'hcpVaultRadar',
|
|
28
|
-
}
|
|
29
|
-
|
|
30
23
|
export interface ProductsPanelProps {
|
|
31
24
|
productCategories: any
|
|
32
25
|
promo?: PromoProps
|
|
@@ -36,7 +29,6 @@ export interface ProductsPanelProps {
|
|
|
36
29
|
icon: string
|
|
37
30
|
title: string
|
|
38
31
|
description: string
|
|
39
|
-
url: string
|
|
40
32
|
}[]
|
|
41
33
|
}
|
|
42
34
|
}
|
|
@@ -77,31 +69,23 @@ const ProductPanel = ({
|
|
|
77
69
|
<TextPlus.Body size="200" weight="semibold">
|
|
78
70
|
{sidePanel.label}
|
|
79
71
|
</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
|
-
*/}
|
|
86
72
|
<ul className={s.sidePanelItems}>
|
|
87
|
-
{sidePanel.navItems.map(({ icon, title, description
|
|
73
|
+
{sidePanel.navItems.map(({ icon, title, description }) => {
|
|
88
74
|
return (
|
|
89
|
-
<li key={title}>
|
|
90
|
-
<
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
</div>
|
|
104
|
-
</Link>
|
|
75
|
+
<li key={title} className={s.sidePanelItem}>
|
|
76
|
+
<div className={s.iconBackground}>
|
|
77
|
+
<FlightIcon
|
|
78
|
+
size={16}
|
|
79
|
+
name={icon}
|
|
80
|
+
color="var(--token-color-foreground-faint)"
|
|
81
|
+
/>
|
|
82
|
+
</div>
|
|
83
|
+
<div className={s.sidePanelItemContent}>
|
|
84
|
+
<TextPlus.Body size="200" weight="semibold" tag="span">
|
|
85
|
+
{title}
|
|
86
|
+
</TextPlus.Body>
|
|
87
|
+
<span className={s.sidePanelItemDesc}>{description}</span>
|
|
88
|
+
</div>
|
|
105
89
|
</li>
|
|
106
90
|
)
|
|
107
91
|
})}
|
|
@@ -131,15 +115,7 @@ function NavProduct({ url, product, description }: NavProductProps) {
|
|
|
131
115
|
<div className={s.productWrapper}>
|
|
132
116
|
<div className={s.productLogo}>
|
|
133
117
|
<FlightIcon
|
|
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
|
-
}
|
|
118
|
+
name={PRODUCT_LOGO_MAP.get(product) ?? 'hashicorp-fill-color'}
|
|
143
119
|
/>
|
|
144
120
|
</div>
|
|
145
121
|
<div className={s.productTextContent}>
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
/* Lifted from:
|
|
167
167
|
packages/react-components/src/components/nav-panel/components/link-list/style.module.css */
|
|
168
168
|
.iconBackground {
|
|
169
|
-
background: var(--token-color-
|
|
169
|
+
background: var(--token-color-page-primary);
|
|
170
170
|
height: var(--hdsplus-spacing-08);
|
|
171
171
|
width: var(--hdsplus-spacing-08);
|
|
172
172
|
display: flex;
|
|
@@ -175,7 +175,6 @@ packages/react-components/src/components/nav-panel/components/link-list/style.mo
|
|
|
175
175
|
border-radius: 3px;
|
|
176
176
|
flex: none;
|
|
177
177
|
margin-top: 3px;
|
|
178
|
-
border: 1px solid var(--token-color-border-primary);
|
|
179
178
|
}
|
|
180
179
|
|
|
181
180
|
/* Lifted from .productTextContent */
|
|
@@ -191,24 +190,3 @@ packages/react-components/src/components/nav-panel/components/link-list/style.mo
|
|
|
191
190
|
line-height: 18px;
|
|
192
191
|
color: var(--token-color-foreground-primary);
|
|
193
192
|
}
|
|
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
|
-
}
|