hds-web 1.25.8 → 1.26.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.
package/package.json
CHANGED
@@ -11,51 +11,84 @@ export default function FeedbackCard(props) {
|
|
11
11
|
logoBg = HDSColor(props.logoBg);
|
12
12
|
}
|
13
13
|
return (
|
14
|
-
<a
|
14
|
+
<a
|
15
|
+
href={props.caseStudyUrl}
|
16
|
+
className="group bg-neutral-0 rounded-3xl shadow p-6 tb-l:p-10 grid mb-6 db-s:mb-0 last:mb-0 flex-1 max-w-[920px] mx-auto flex-col transition-all duration-300 ease-in-out hover:shadow-lg hover:translate-y-0.5"
|
17
|
+
>
|
15
18
|
<div className=" self-start">
|
16
19
|
<ProfileAvatar
|
17
20
|
name={props.speakerName}
|
18
|
-
size=
|
21
|
+
size="xl"
|
19
22
|
designation={props.speakerDesignation}
|
20
23
|
imageUrl={props.speakerImgUrl}
|
21
24
|
avatarVariant="circle"
|
22
25
|
avatarType="secondary"
|
23
26
|
/>
|
24
|
-
<div className={
|
25
|
-
<Typography textStyle=
|
27
|
+
<div className={props.dividerClass ? "py-8" : "py-6"}>
|
28
|
+
<Typography textStyle="sub2" className="text-neutral-600">
|
29
|
+
{props.description}
|
30
|
+
</Typography>
|
26
31
|
</div>
|
27
32
|
</div>
|
28
33
|
<div className=" self-end">
|
29
|
-
{
|
30
|
-
props.dividerClass
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
{props.dividerClass && (
|
35
|
+
<div className={`${HDSColor(props.dividerClass)} mb-2`}></div>
|
36
|
+
)}
|
37
|
+
<div
|
38
|
+
className={
|
39
|
+
"mb-s:flex items-start" + (props.dividerClass ? " pt-6" : "mt-0")
|
40
|
+
}
|
41
|
+
>
|
42
|
+
<div
|
43
|
+
className={
|
44
|
+
"border border-neutral-150 p-2 flex items-center justify-center rounded-2xl " +
|
45
|
+
logoBg +
|
46
|
+
(props.dividerClass
|
47
|
+
? " w-[72px] h-[56px] min-w-[72px]"
|
48
|
+
: " w-[112px] h-[90px] min-w-[112px] ")
|
49
|
+
}
|
50
|
+
>
|
51
|
+
<img
|
52
|
+
className="max-h-[20px]"
|
53
|
+
src={props.brandImgUrl}
|
54
|
+
alt={props.brandImgAlt}
|
55
|
+
/>
|
37
56
|
</div>
|
38
|
-
<div
|
39
|
-
|
57
|
+
<div
|
58
|
+
className={
|
59
|
+
"pt-4 mb-s:pt-0 " +
|
60
|
+
(props.dividerClass ? "mb-s:pl-6" : "mb-s:pl-8")
|
61
|
+
}
|
62
|
+
>
|
63
|
+
<Typography
|
64
|
+
textStyle={props.dividerClass ? "body2" : "body1"}
|
65
|
+
className="text-neutral-600 pb-1"
|
66
|
+
>
|
67
|
+
{props.blurb}
|
68
|
+
</Typography>
|
40
69
|
<div className="flex">
|
41
70
|
<HDSButton
|
42
|
-
label=
|
43
|
-
type=
|
44
|
-
leftIconVariant=
|
45
|
-
rightIconVariant=
|
46
|
-
state=
|
47
|
-
size=
|
71
|
+
label={props.ctaText}
|
72
|
+
type="secondaryLink"
|
73
|
+
leftIconVariant="none"
|
74
|
+
rightIconVariant="none"
|
75
|
+
state="default"
|
76
|
+
size="md"
|
48
77
|
rightAnimatedArrow={true}
|
49
|
-
rightAnimatedArrowColor=
|
50
|
-
className=
|
51
|
-
btnTextColorClass=
|
52
|
-
btnTextHoverClass=
|
53
|
-
animatedHoverStroke=
|
78
|
+
rightAnimatedArrowColor="#3970FD"
|
79
|
+
className="mt-0 justify-start"
|
80
|
+
btnTextColorClass="text-blue-500"
|
81
|
+
btnTextHoverClass="hover:text-blue-500"
|
82
|
+
animatedHoverStroke="group-hover:stroke-blue-500"
|
54
83
|
/>
|
55
84
|
</div>
|
56
85
|
</div>
|
57
86
|
</div>
|
58
87
|
</div>
|
59
88
|
</a>
|
60
|
-
)
|
89
|
+
);
|
61
90
|
}
|
91
|
+
|
92
|
+
FeedbackCard.defaultProps = {
|
93
|
+
ctaText: "Read the case study",
|
94
|
+
};
|
@@ -32,7 +32,7 @@ export default function V3Tab(props) {
|
|
32
32
|
onClick={() => {
|
33
33
|
handleTabClick(tab);
|
34
34
|
}}
|
35
|
-
className={`${activeTab === tab.name ? ' text-neutral-0
|
35
|
+
className={`${activeTab === tab.name ? ' text-neutral-0' : ' hover:bg-neutral-500/30 text-neutral-400'} relative px-3 py-1 whitespace-nowrap rounded-full hover:text-neutral-0`}
|
36
36
|
>
|
37
37
|
{activeTab === tab.name && (
|
38
38
|
<motion.div
|
@@ -2,17 +2,14 @@ function buildInvertedIndex(data) {
|
|
2
2
|
const invertedIndex = {};
|
3
3
|
|
4
4
|
for (const item of data) {
|
5
|
-
const
|
5
|
+
const key = Object.keys(item)[0];
|
6
|
+
const tags = item[key];
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
for (const tag of tags) {
|
11
|
-
if (!invertedIndex[tag]) {
|
12
|
-
invertedIndex[tag] = new Set();
|
13
|
-
}
|
14
|
-
invertedIndex[tag].add(item);
|
8
|
+
for (const tag of tags) {
|
9
|
+
if (!invertedIndex[tag]) {
|
10
|
+
invertedIndex[tag] = new Set();
|
15
11
|
}
|
12
|
+
invertedIndex[tag].add(key);
|
16
13
|
}
|
17
14
|
}
|
18
15
|
|
@@ -21,18 +18,17 @@ function buildInvertedIndex(data) {
|
|
21
18
|
|
22
19
|
export default function getSimilarAndRemainingKeys(data, inputKey) {
|
23
20
|
const invertedIndex = buildInvertedIndex(data);
|
24
|
-
const
|
21
|
+
const inputTags = data.find(item => item[inputKey]);
|
25
22
|
const similarKeys = new Set();
|
26
23
|
const allKeys = new Set();
|
27
24
|
|
28
|
-
if (
|
29
|
-
const
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
similarKeys.add(item.attributes.slug);
|
25
|
+
if (inputTags) {
|
26
|
+
for (const tag of inputTags[inputKey]) {
|
27
|
+
const keysWithSimilarTag = invertedIndex[tag];
|
28
|
+
if (keysWithSimilarTag) {
|
29
|
+
keysWithSimilarTag.forEach(key => {
|
30
|
+
if (key !== inputKey) {
|
31
|
+
similarKeys.add(key);
|
36
32
|
}
|
37
33
|
});
|
38
34
|
}
|
@@ -40,10 +36,12 @@ export default function getSimilarAndRemainingKeys(data, inputKey) {
|
|
40
36
|
}
|
41
37
|
|
42
38
|
for (const item of data) {
|
43
|
-
|
39
|
+
const key = Object.keys(item)[0];
|
40
|
+
allKeys.add(key);
|
44
41
|
}
|
45
42
|
|
46
43
|
const remainingKeys = [...allKeys].filter(key => !similarKeys.has(key));
|
47
44
|
|
48
45
|
return [...similarKeys, ...remainingKeys];
|
49
46
|
}
|
47
|
+
|