hds-web 1.6.6 → 1.6.8
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/dist/index.css +2 -5
- package/dist/index.es.css +2 -5
- package/dist/index.es.js +13 -13
- package/dist/index.js +13 -13
- package/package.json +1 -1
- package/src/HDS/assets/icons/calendar-plus-01.svg +1 -1
- package/src/HDS/assets/icons/calendar-plus-02.svg +1 -1
- package/src/HDS/components/Avatars/hasConAv.js +10 -9
- package/src/HDS/components/Avatars/profileAvatar.js +29 -10
- package/src/HDS/components/BadgesCaption/badges.js +4 -7
- package/src/HDS/components/Buttons/button.js +14 -25
- package/src/HDS/components/Cards/Dropdown/v3Dropdown.js +1 -1
- package/src/HDS/components/Cards/Feedback/feedback.js +1 -1
- package/src/HDS/components/Cards/Link/link.js +13 -19
- package/src/HDS/components/Cards/Menu/flyout.js +4 -5
- package/src/HDS/components/Cards/Menu/flyoutA.js +4 -5
- package/src/HDS/components/Cards/Menu/flyoutFull.js +0 -1
- package/src/HDS/components/Cards/Misc/iconCard.js +60 -71
- package/src/HDS/components/Cards/Misc/index.js +0 -1
- package/src/HDS/components/Cards/Misc/talkCard.js +18 -19
- package/src/HDS/components/Cards/TalkDetailCard/talkDetailCard.js +52 -83
- package/src/HDS/components/Carousels/carouselCard.js +90 -101
- package/src/HDS/components/Headers/v3Header.js +85 -111
- package/src/HDS/components/Hero/h2.js +36 -58
- package/src/HDS/components/Hero/index.js +1 -2
- package/src/HDS/components/Tables/index.js +1 -2
- package/src/HDS/components/Tables/tableB.js +10 -10
- package/src/HDS/components/Tables/tableC.js +23 -20
- package/src/HDS/components/Tabs/tab.js +16 -47
- package/src/HDS/components/common-components/Icon/IconMap.js +0 -6
- package/src/HDS/components/index.js +1 -2
- package/src/HDS/foundation/ColorPalette/color.js +1 -193
- package/src/HDS/foundation/Typography/Typography.js +1 -2
- package/src/HDS/helpers/index.js +1 -2
- package/src/HDS/modules/TextCard/textCard.js +71 -8
- package/src/HDS/modules/index.js +1 -2
- package/src/index.css +1 -39
- package/src/styles/tailwind.css +1842 -3151
- package/tailwind.config.js +3 -6
- package/src/HDS/assets/icons/hasura-1.svg +0 -3
- package/src/HDS/assets/icons/hasura-2.svg +0 -3
- package/src/HDS/assets/icons/hasura-3.svg +0 -3
- package/src/HDS/components/Cards/ImageBox/imagebox.js +0 -51
- package/src/HDS/components/Cards/ImageBox/index.js +0 -1
- package/src/HDS/components/Cards/Misc/talkcard2.js +0 -118
- package/src/HDS/components/Hero/h3.js +0 -413
- package/src/HDS/components/Tables/tableD.js +0 -326
- package/src/HDS/helpers/Grid/grid.js +0 -64
- package/src/HDS/helpers/Grid/index.js +0 -1
- package/src/HDS/helpers/Media/index.js +0 -1
- package/src/HDS/helpers/Media/mediabox.js +0 -75
- package/src/HDS/modules/navCard/index.js +0 -1
- package/src/HDS/modules/navCard/navCard.js +0 -82
package/package.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path d="M21 8H3M16 2V5M8 2V5M12 18V12M9 15H15M7.8 22H16.2C17.8802 22 18.7202 22 19.362 21.673C19.9265 21.3854 20.3854 20.9265 20.673 20.362C21 19.7202 21 18.8802 21 17.2V8.8C21 7.11984 21 6.27976 20.673 5.63803C20.3854 5.07354 19.9265 4.6146 19.362 4.32698C18.7202 4 17.8802 4 16.2 4H7.8C6.11984 4 5.27976 4 4.63803 4.32698C4.07354 4.6146 3.6146 5.07354 3.32698 5.63803C3 6.27976 3 7.11984 3 8.8V17.2C3 18.8802 3 19.7202 3.32698 20.362C3.6146 20.9265 4.07354 21.3854 4.63803 21.673C5.27976 22 6.11984 22 7.8 22Z" stroke-linecap="round" stroke-linejoin="round"/>
|
2
|
+
<path d="M21 8H3M16 2V5M8 2V5M12 18V12M9 15H15M7.8 22H16.2C17.8802 22 18.7202 22 19.362 21.673C19.9265 21.3854 20.3854 20.9265 20.673 20.362C21 19.7202 21 18.8802 21 17.2V8.8C21 7.11984 21 6.27976 20.673 5.63803C20.3854 5.07354 19.9265 4.6146 19.362 4.32698C18.7202 4 17.8802 4 16.2 4H7.8C6.11984 4 5.27976 4 4.63803 4.32698C4.07354 4.6146 3.6146 5.07354 3.32698 5.63803C3 6.27976 3 7.11984 3 8.8V17.2C3 18.8802 3 19.7202 3.32698 20.362C3.6146 20.9265 4.07354 21.3854 4.63803 21.673C5.27976 22 6.11984 22 7.8 22Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
3
3
|
</svg>
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path d="M21 11.5V8.8C21 7.11984 21 6.27976 20.673 5.63803C20.3854 5.07354 19.9265 4.6146 19.362 4.32698C18.7202 4 17.8802 4 16.2 4H7.8C6.11984 4 5.27976 4 4.63803 4.32698C4.07354 4.6146 3.6146 5.07354 3.32698 5.63803C3 6.27976 3 7.11984 3 8.8V17.2C3 18.8802 3 19.7202 3.32698 20.362C3.6146 20.9265 4.07354 21.3854 4.63803 21.673C5.27976 22 6.11984 22 7.8 22H12.5M21 10H3M16 2V6M8 2V6M18 21V15M15 18H21" stroke-linecap="round" stroke-linejoin="round"/>
|
2
|
+
<path d="M21 11.5V8.8C21 7.11984 21 6.27976 20.673 5.63803C20.3854 5.07354 19.9265 4.6146 19.362 4.32698C18.7202 4 17.8802 4 16.2 4H7.8C6.11984 4 5.27976 4 4.63803 4.32698C4.07354 4.6146 3.6146 5.07354 3.32698 5.63803C3 6.27976 3 7.11984 3 8.8V17.2C3 18.8802 3 19.7202 3.32698 20.362C3.6146 20.9265 4.07354 21.3854 4.63803 21.673C5.27976 22 6.11984 22 7.8 22H12.5M21 10H3M16 2V6M8 2V6M18 21V15M15 18H21" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
3
3
|
</svg>
|
@@ -1,22 +1,23 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
|
-
import {Typography} from '../../foundation/Typography'
|
3
|
+
import { Typography } from '../../foundation/Typography'
|
4
|
+
import { Icon } from '../common-components/Icon';
|
4
5
|
|
5
6
|
export default function HasConAvatar({ name, designation, size, imageUrl }) {
|
6
7
|
const hasImageUrl = imageUrl && imageUrl.length > 0;
|
7
8
|
return (
|
8
|
-
<div className={
|
9
|
+
<div className={`${size} group flex-shrink-0 rounded-2xl flex items-center justify-between bg-neutral-0 tb:inline-flex tb:flex-col shadow hover:shadow-xl tb:min-w-[18rem]`}>
|
9
10
|
|
10
|
-
<div className="
|
11
|
-
<
|
12
|
-
<
|
11
|
+
<div className="mx-5 tb:flex-col tb:flex tb:items-center tb:p-8 tb:ml-0 bg-neutral-0">
|
12
|
+
<Typography textStyle='body1c-bold' className='text-blue-400'>{name}</Typography>
|
13
|
+
<Typography textStyle='body3c-medium' className='text-blue-800'>{designation}</Typography>
|
13
14
|
</div>
|
14
|
-
<div className='relative
|
15
|
+
<div className='relative '>
|
15
16
|
<img
|
16
|
-
className={`inline-block
|
17
|
+
className={`inline-block w-[9rem] tb:min-w-[18rem] tb:rounded-2xl border-neutral-0 rounded-r-2xl `}
|
17
18
|
src={imageUrl}
|
18
19
|
/>
|
19
|
-
|
20
|
+
<div className="absolute rounded-b-2xl inset-0 group-hover:bg-gradient-to-t group-hover:from-amber-200 group-hover:to-transparent group-hover:opacity-30" ></div>
|
20
21
|
</div>
|
21
22
|
|
22
23
|
|
@@ -32,5 +33,5 @@ HasConAvatar.propTypes = {
|
|
32
33
|
HasConAvatar.defaultProps = {
|
33
34
|
name: 'Names',
|
34
35
|
designation: 'Product Marketing, Hasura',
|
35
|
-
imageUrl:
|
36
|
+
imageUrl: `https://images.unsplash.com/photo-1503023345310-bd7c1de61c7d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8aHVtYW58ZW58MHx8MHx8&w=1000&q=80`
|
36
37
|
};
|
@@ -1,32 +1,44 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { Icon } from '../common-components/Icon';
|
4
|
-
import { Typography } from '../../foundation/Typography';
|
5
|
-
import { HDSColor } from '../../foundation/ColorPalette';
|
6
4
|
const imgSizes = {
|
7
5
|
'xs': 'h-8 w-8',
|
8
6
|
'sm': 'h-10 w-10',
|
9
|
-
'md': 'h-12 w-12
|
7
|
+
'md': 'h-12 w-12',
|
10
8
|
'lg': 'h-[60px] w-[60px]',
|
11
9
|
}
|
12
10
|
const AvatarVariant = {
|
13
|
-
'circular': 'shadow rounded-full ',
|
11
|
+
'circular': 'shadow rounded-full border-[1.5px] border-neutral-0',
|
14
12
|
'square': 'rounded-lg',
|
15
13
|
}
|
16
14
|
|
17
|
-
|
15
|
+
|
16
|
+
const nameTextStyle = {
|
17
|
+
'xs': 'text-d-body1c-bold',
|
18
|
+
'sm': 'text-d-body1c-bold',
|
19
|
+
'md': 'text-d-body1c-bold',
|
20
|
+
'lg': 'text-d-body1c-bold'
|
21
|
+
}
|
22
|
+
|
23
|
+
const desgnTextStyle = {
|
24
|
+
'xs': 'text-hds-d-body3c ',
|
25
|
+
'sm': 'text-hds-d-body3c ',
|
26
|
+
'md': 'text-hds-d-body3c ',
|
27
|
+
'lg': 'text-hds-d-body3c '
|
28
|
+
}
|
29
|
+
|
30
|
+
export default function ProfileAvatar({ name, designation, size, imageUrl, avatarVariant }) {
|
18
31
|
const imgSizeClass = imgSizes[size] || imgSizes.md;
|
19
32
|
const avatarVariantClass = AvatarVariant[avatarVariant] || AvatarVariant.circular;
|
20
33
|
const defaultAvatarIcon = "user03";
|
21
34
|
const hasImageUrl = imageUrl && imageUrl.length > 0;
|
22
|
-
|
23
35
|
return (
|
24
36
|
<div className="group block flex-shrink-0">
|
25
37
|
<div className="flex items-center">
|
26
38
|
<div>
|
27
39
|
{hasImageUrl ? (
|
28
40
|
<img
|
29
|
-
className={`${imgSizeClass} ${avatarVariantClass}
|
41
|
+
className={`${imgSizeClass} ${avatarVariantClass} rounded inline-block`}
|
30
42
|
src={imageUrl}
|
31
43
|
/>
|
32
44
|
) : (
|
@@ -38,8 +50,15 @@ export default function ProfileAvatar({avatarBgColor, name, designation, size, i
|
|
38
50
|
)}
|
39
51
|
</div>
|
40
52
|
<div className="ml-3">
|
41
|
-
|
42
|
-
|
53
|
+
<p
|
54
|
+
className={`${nameTextStyle[`${size}`]}text-neutral-900 group-hover:text-gray-900`}
|
55
|
+
>
|
56
|
+
{name}
|
57
|
+
</p>
|
58
|
+
<p
|
59
|
+
className={`${desgnTextStyle[`${size}`]} text-neutral-500 group-hover:text-gray-700`}>
|
60
|
+
{designation}
|
61
|
+
</p>
|
43
62
|
</div>
|
44
63
|
</div>
|
45
64
|
</div>
|
@@ -54,5 +73,5 @@ ProfileAvatar.propTypes = {
|
|
54
73
|
ProfileAvatar.defaultProps = {
|
55
74
|
name: 'Names',
|
56
75
|
designation: 'Product Marketing, Hasura',
|
57
|
-
imageUrl:
|
76
|
+
imageUrl: `https://images.unsplash.com/photo-1503023345310-bd7c1de61c7d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8aHVtYW58ZW58MHx8MHx8&w=1000&q=80`
|
58
77
|
};
|
@@ -3,7 +3,6 @@ import { useState } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import { Icon } from '../common-components/Icon';
|
5
5
|
import {Typography} from '../../foundation/Typography'
|
6
|
-
import { HDSColor } from '../../foundation/ColorPalette';
|
7
6
|
const sizeClasses = {
|
8
7
|
sm: 'py-0.5 px-2 hds-d-body3c',
|
9
8
|
default: 'py-1 px-3',
|
@@ -28,10 +27,8 @@ const colorVariants = {
|
|
28
27
|
export default function Badge({
|
29
28
|
leftIconVariant,
|
30
29
|
leftIconColor,
|
31
|
-
leftIconColorClass,
|
32
30
|
rightIconVariant,
|
33
31
|
rightIconColor,
|
34
|
-
rightIconColorClass,
|
35
32
|
size,
|
36
33
|
children,
|
37
34
|
color,
|
@@ -47,7 +44,7 @@ export default function Badge({
|
|
47
44
|
|
48
45
|
return (
|
49
46
|
<button
|
50
|
-
className={
|
47
|
+
className={`${sizeClasses[size]} ${
|
51
48
|
colorVariants[color]
|
52
49
|
} inline-flex items-center rounded-full`}
|
53
50
|
onClick={handleClick}
|
@@ -55,14 +52,14 @@ export default function Badge({
|
|
55
52
|
>
|
56
53
|
{leftIconVariant && leftIconVariant !== 'none' && (
|
57
54
|
<div className='mr-1'>
|
58
|
-
<Icon height={'h-4 w-4
|
55
|
+
<Icon height={'h-4 w-4'} variant={leftIconVariant} strokeColor={leftIconColor} />
|
59
56
|
</div>
|
60
57
|
)}
|
61
|
-
<Typography textStyle='
|
58
|
+
<Typography textStyle='h6'>{children}</Typography>
|
62
59
|
|
63
60
|
{rightIconVariant && rightIconVariant !== 'none' && (
|
64
61
|
<div className='ml-1'>
|
65
|
-
<Icon height={'h-4
|
62
|
+
<Icon height={'h-4'} variant={rightIconVariant} strokeColor={rightIconColor} />
|
66
63
|
</div>
|
67
64
|
)}
|
68
65
|
</button>
|
@@ -13,7 +13,7 @@ const ANIMATED_ARR_CLASSES = {
|
|
13
13
|
'md': 'h-5 w-5 -mt-5',
|
14
14
|
'lg': 'h-6 w-6 -mt-6'
|
15
15
|
},
|
16
|
-
|
16
|
+
|
17
17
|
}
|
18
18
|
|
19
19
|
const Buttonclasses = {
|
@@ -22,13 +22,13 @@ const Buttonclasses = {
|
|
22
22
|
'base': 'db:w-fit tb:w-fit w-full justify-center justify-center bg-blue-500 text-neutral-0',
|
23
23
|
'hover': 'hover:bg-blue-700 hover:text-neutral-0 hover:shadow-md hover:shadow hover:transition-all hover:ease-out hover:duration-300',
|
24
24
|
'focus': 'focus:bg-blue-600 focus:shadow-[0_0px_0px_4px_#DFE8FF] focus:text-neutral-0 focus:outline-none active:bg-blue-600 active:text-neutral-0 active:outline-none',
|
25
|
-
|
25
|
+
|
26
26
|
},
|
27
27
|
'disabled': 'bg-neutral-200 text-neutral-400',
|
28
28
|
},
|
29
29
|
'tonal': {
|
30
30
|
'default': {
|
31
|
-
'base': 'db:w-fit tb:w-fit w-full
|
31
|
+
'base': 'db:w-fit tb:w-fit w-full justify-center bg-blue-200 text-blue-600',
|
32
32
|
'hover': 'hover:bg-blue-700 hover:text-neutral-0 hover:shadow-md hover:shadow hover:transition-all hover:ease-out hover:duration-300',
|
33
33
|
'focus': 'focus:bg-blue-100 focus:text-blue-600 focus:shadow-[0px_0px_0px_4px_#DFE8FF] focus:outline-none',
|
34
34
|
},
|
@@ -36,25 +36,14 @@ const Buttonclasses = {
|
|
36
36
|
},
|
37
37
|
'secondary': {
|
38
38
|
'default': {
|
39
|
-
'base': 'db:w-fit tb:w-fit w-full justify-center border-2 border-
|
39
|
+
'base': 'db:w-fit tb:w-fit w-full justify-center border-2 border-neutral-0 text-blue-500',
|
40
40
|
|
41
|
-
'hover': 'hover:text-neutral-0 hover:bg-blue-700 hover:border-2 hover:border-blue-700 hover:shadow-md hover:shadow hover:transition-all hover:ease-out hover:duration-300',
|
42
|
-
|
43
|
-
'focus': 'focus:bg-blue-200 focus:text-blue-500 focus:border-2 border-blue-500 focus:shadow-[0px_0px_0px_4px_#DFE8FF] focus:outline-none focus:text-blue-500',
|
44
|
-
},
|
45
|
-
'disabled': 'bg-neutral-200 text-neutral-400',
|
46
|
-
},
|
47
|
-
'secondaryWhite': {
|
48
|
-
'default': {
|
49
|
-
'base': 'db:w-fit tb:w-fit w-full justify-center border-2 border-neutral-0 text-neutral-0 ',
|
41
|
+
'hover': 'hover:text-neutral-0 hover:bg-blue-700 hover:border-2 hover:border-blue-700 hover:shadow-md hover:shadow hover:transition-all hover:ease-out hover:delay-100 hover:duration-300',
|
50
42
|
|
51
|
-
'
|
52
|
-
|
53
|
-
'focus': 'focus:text-neutrak-0 focus:border-2 border-neutral-0 focus:outline-none focus:text-neutral-0',
|
43
|
+
'focus': 'focus:bg-blue-200 focus:text-blue-500 focus:border-2 border-blue-500 focus:shadow-[0px_0px_0px_4px_#DFE8FF] focus:outline-none focus:text-blue-500',
|
54
44
|
},
|
55
45
|
'disabled': 'bg-neutral-200 text-neutral-400',
|
56
46
|
},
|
57
|
-
|
58
47
|
'ghost': {
|
59
48
|
'default': {
|
60
49
|
'base': 'db:w-fit tb:w-fit w-full justify-center text-blue-600',
|
@@ -65,7 +54,7 @@ const Buttonclasses = {
|
|
65
54
|
},
|
66
55
|
'primaryLink': {
|
67
56
|
'default': {
|
68
|
-
'base': 'db:w-fit tb:w-fit w-full justify-center ',
|
57
|
+
'base': 'db:w-fit tb:w-fit w-full justify-center text-blue-500',
|
69
58
|
'hover': 'hover:text-neutral-0',
|
70
59
|
'focus': 'focus:shadow-[0px_0px_0px_4px_#DFE8FF] focus:outline-none focus:text-blue-600',
|
71
60
|
},
|
@@ -73,8 +62,8 @@ const Buttonclasses = {
|
|
73
62
|
},
|
74
63
|
'secondaryLink': {
|
75
64
|
'default': {
|
76
|
-
'base': 'db:w-fit tb:w-fit w-full justify-center ',
|
77
|
-
'hover': '',
|
65
|
+
'base': 'db:w-fit tb:w-fit w-full justify-center text-neutral-800',
|
66
|
+
'hover': 'hover:text-neutral-900 ',
|
78
67
|
'focus': 'focus:text-neutral-900 focus:outline-none focus:shadow-[0px_0px_0px_4px_#E5E7EB]',
|
79
68
|
},
|
80
69
|
'disabled': 'text-neutral-300',
|
@@ -171,10 +160,10 @@ export default function Button(props) {
|
|
171
160
|
<Icon variant={leftIconVariant} strokeColor={leftIconColor} />
|
172
161
|
</div>
|
173
162
|
)}
|
174
|
-
|
163
|
+
|
175
164
|
{leftIconVariant && leftIconVariant !== 'none' && type=='iconOnly' && (
|
176
|
-
<div className={
|
177
|
-
<Icon variant={leftIconVariant} height=
|
165
|
+
<div className={`${ANIMATED_ARR_CLASSES['icon1'][`${size}`]} `}>
|
166
|
+
<Icon variant={leftIconVariant} height='group-active:stroke-neutral-0 group-hover:transition-all group-hover:ease-in-out group-hover:duration-100 group-hover:stroke-neutral-0 group-focus:stroke-neutral-0' strokeColor={leftIconColor} />
|
178
167
|
</div>
|
179
168
|
)}
|
180
169
|
{label}
|
@@ -206,7 +195,7 @@ Button.propTypes = {
|
|
206
195
|
leftIconVariant: PropTypes.string,
|
207
196
|
rightIconVariant: PropTypes.string,
|
208
197
|
animatedHoverStroke: PropTypes.string
|
209
|
-
|
198
|
+
|
210
199
|
|
211
200
|
};
|
212
201
|
|
@@ -223,5 +212,5 @@ Button.defaultProps = {
|
|
223
212
|
rightAnimatedArrow: 'True' ,
|
224
213
|
rightAnimatedArrowColor: '#FFFFFF',
|
225
214
|
animatedHoverStroke: 'group-hover:stroke-neutral-0',
|
226
|
-
|
215
|
+
|
227
216
|
};
|
@@ -5,7 +5,7 @@ import { FlyoutB, FlyoutA } from '../Menu'
|
|
5
5
|
|
6
6
|
export default function DropdownA(props) {
|
7
7
|
return (
|
8
|
-
<div className='flex
|
8
|
+
<div className='flex flex-col tb:flex-row gap-2'>
|
9
9
|
<div className=' bg-neutral-0 rounded-2xl tb:min-w-[28.063rem]'>
|
10
10
|
<FlyoutB
|
11
11
|
{...props.primaryCard}
|
@@ -8,7 +8,7 @@ export default function FeedbackCard(props) {
|
|
8
8
|
return (
|
9
9
|
<div className='bg-neutral-0 rounded-3xl shadow p-6 tb-l:p-10'>
|
10
10
|
<div className='pb-8'>
|
11
|
-
<img src={props.brandImgUrl} alt={props.brandImgAlt}
|
11
|
+
<img src={props.brandImgUrl} alt={props.brandImgAlt} />
|
12
12
|
</div>
|
13
13
|
<div className="pb-10">
|
14
14
|
<Typography textStyle="quote" className='text-neutral-1000'>{props.description}</Typography>
|
@@ -6,22 +6,24 @@ import { Typography } from '../../../foundation/Typography'
|
|
6
6
|
|
7
7
|
|
8
8
|
export default function LinkCard(props) {
|
9
|
+
const iconStrokeColor = HDSColor(props.iconStrokeColor);
|
10
|
+
const cardBgColorClass = HDSColor(props.cardBgColor)
|
11
|
+
const cardHoverClasses = `hover:${HDSColor(props.cardHoverBg)}` + ' hover:shadow-xl';
|
9
12
|
return (
|
10
13
|
<>
|
11
14
|
<a
|
12
15
|
href={props.linkUrl}
|
13
|
-
className={
|
16
|
+
className={`${cardHoverClasses} ${cardBgColorClass} min-w-[15rem] rounded-2xl border border-neutral-150 p-6 block`}
|
14
17
|
>
|
15
18
|
{props.brandImageUrl ?
|
16
19
|
(
|
17
20
|
<div className="flex flex-col">
|
18
|
-
<div className="flex justify-end items-end">
|
21
|
+
<div className="flex justify-end items-end pr-6">
|
19
22
|
{props.iconArrowVariant &&
|
20
23
|
(<Icon
|
21
24
|
height={'w-6 h-6 stroke-[1.5px] stroke-blue-400'}
|
22
25
|
variant={props.iconArrowVariant}
|
23
26
|
strokeColor={props.iconArrowStrokeColor}
|
24
|
-
strokeClass={HDSColor(props.iconArrowStrokeClass)}
|
25
27
|
/>)
|
26
28
|
}
|
27
29
|
</div>
|
@@ -33,18 +35,17 @@ export default function LinkCard(props) {
|
|
33
35
|
(
|
34
36
|
<>
|
35
37
|
<div className='flex items-center'>
|
36
|
-
<div className='flex items-center flex-1
|
38
|
+
<div className='flex items-center flex-1'>
|
37
39
|
{props.iconVariant &&
|
38
40
|
(<Icon
|
39
41
|
height={'w-6 h-6 mr-2 stroke-[1.5px] '}
|
40
42
|
variant={props.iconVariant}
|
41
|
-
strokeColor={
|
42
|
-
strokeClass={HDSColor(props.iconStrokeClass)}
|
43
|
+
strokeColor={iconStrokeColor}
|
43
44
|
/>)}
|
44
45
|
<Typography
|
45
46
|
as="h5"
|
46
47
|
textStyle="body1c-bold"
|
47
|
-
className=
|
48
|
+
className="text-neutral-1000">
|
48
49
|
{props.title}
|
49
50
|
</Typography>
|
50
51
|
</div>
|
@@ -53,22 +54,15 @@ export default function LinkCard(props) {
|
|
53
54
|
height={'w-6 h-6 stroke-[1.5px] stroke-blue-400'}
|
54
55
|
variant={props.iconArrowVariant}
|
55
56
|
strokeColor={props.iconArrowStrokeColor}
|
56
|
-
strokeClass={HDSColor(props.iconArrowStrokeClass)}
|
57
57
|
/>)
|
58
58
|
}
|
59
59
|
</div>
|
60
60
|
{props.description &&
|
61
|
-
(
|
62
|
-
<div>
|
63
|
-
|
64
|
-
<Typography
|
61
|
+
(<Typography
|
65
62
|
textStyle="body3"
|
66
|
-
className=
|
63
|
+
className="text-neutral-1000 mt-2">
|
67
64
|
{props.description}
|
68
|
-
</Typography>
|
69
|
-
</div>
|
70
|
-
|
71
|
-
)}
|
65
|
+
</Typography>)}
|
72
66
|
</>
|
73
67
|
)
|
74
68
|
}
|
@@ -78,11 +72,11 @@ export default function LinkCard(props) {
|
|
78
72
|
}
|
79
73
|
|
80
74
|
LinkCard.defaultProps = {
|
81
|
-
descTextColor:'',
|
82
|
-
titleTextColor:'',
|
83
75
|
brandImageUrl: '',
|
84
76
|
brandImageAlt:'',
|
85
77
|
linkUrl: '#',
|
78
|
+
cardBgColor: 'bg-neutral-0',
|
79
|
+
cardHoverBg: 'bg-neutral-0',
|
86
80
|
iconVariant: 'videorecorder',
|
87
81
|
iconStrokeColor: 'blue-500',
|
88
82
|
iconArrowVariant: 'arrownarrowupright',
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import { Typography } from '../../../foundation/Typography';
|
1
|
+
import { Fragment } from 'react'
|
2
|
+
import { Popover, Transition } from '@headlessui/react'
|
3
|
+
import { Icon } from '../../common-components/Icon'
|
4
|
+
import { Typography } from '../../../foundation/Typography'
|
6
5
|
export default function flyout(props) {
|
7
6
|
const {
|
8
7
|
label,
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import { Typography } from '../../../foundation/Typography';
|
1
|
+
import { Fragment } from 'react'
|
2
|
+
import { Popover, Transition } from '@headlessui/react'
|
3
|
+
import { Icon } from '../../common-components/Icon'
|
4
|
+
import { Typography } from '../../../foundation/Typography'
|
6
5
|
export default function FlyoutA(props) {
|
7
6
|
const {
|
8
7
|
label,
|
@@ -3,34 +3,17 @@ import { Icon } from "../../common-components/Icon";
|
|
3
3
|
import { HDSColor } from '../../../foundation/ColorPalette'
|
4
4
|
import { Typography } from '../../../foundation/Typography'
|
5
5
|
import { HDSButton } from "../../Buttons";
|
6
|
-
|
6
|
+
|
7
7
|
const cardVariant = {
|
8
8
|
"withButton": {
|
9
9
|
'cardStyle': 'p-10 ',
|
10
10
|
'iconWidthStyle': 'h-20 w-20',
|
11
11
|
'iconStyle': 'h-10 w-10',
|
12
|
-
'titleTextStyle': 'h4',
|
13
|
-
'titleClasses': 'mb-1 text-blue-800 text-hds-m-h4 tb:text-hds-t-h4 db:text-hds-d-h4',
|
14
|
-
'descTextStyle': 'body1c',
|
15
|
-
'descClasses': 'text-neutral-1000 text-hds-m-body1c tb:text-hds-t-body1c db:text-hds-d-body1c'
|
16
12
|
},
|
17
13
|
"withoutButton": {
|
18
14
|
'cardStyle': 'p-6',
|
19
15
|
'iconWidthStyle': 'h-12 w-12',
|
20
16
|
'iconStyle': 'h-6 w-6',
|
21
|
-
'titleTextStyle': 'h5',
|
22
|
-
'titleClasses': 'mb-1 text-blue-600 text-hds-m-h5 tb:text-hds-t-h5 db:text-hds-d-h5',
|
23
|
-
'descTextStyle': 'body1',
|
24
|
-
'descClasses': 'text-neutral-1000 text-hds-m-body1 tb:text-hds-t-body1 db:text-hds-d-body1'
|
25
|
-
},
|
26
|
-
"sm": {
|
27
|
-
'cardStyle': 'p-6',
|
28
|
-
'iconWidthStyle': 'h-12 w-12',
|
29
|
-
'iconStyle': 'h-6 w-6',
|
30
|
-
'titleTextStyle': 'body3c',
|
31
|
-
'titleClasses': 'mb-1 text-neutral-800 text-hds-m-body3c-bold tb:text-hds-t-body3c-bold db:text-hds-d-body3c-bold',
|
32
|
-
'descTextStyle': 'body3',
|
33
|
-
'descClasses': 'text-neutral-800 text-hds-m-body3 tb:text-hds-t-body3 db:text-hds-d-body3'
|
34
17
|
}
|
35
18
|
}
|
36
19
|
|
@@ -38,62 +21,68 @@ export default function IconCard(props) {
|
|
38
21
|
const iconBG = HDSColor(props.iconBg);
|
39
22
|
return (
|
40
23
|
<div
|
41
|
-
className={`bg-neutral-0
|
24
|
+
className={`bg-neutral-0 rounded-3xl shadow ${cardVariant[props.cardType]['cardStyle']}`}
|
42
25
|
>
|
43
|
-
<div
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
strokeClass={HDSColor(props.iconStrokeClass)} />
|
52
|
-
</div>
|
53
|
-
<div
|
54
|
-
className="flex-1">
|
55
|
-
|
56
|
-
{props.cardType &&
|
57
|
-
(
|
58
|
-
<>
|
59
|
-
<Typography
|
60
|
-
textStyle={cardVariant[props.cardType]['titleTextStyle']}
|
61
|
-
as={cardVariant[props.cardType]['titleTextStyle']}
|
62
|
-
className={cardVariant[props.cardType]['titleClasses']}
|
63
|
-
>
|
64
|
-
{props.title}
|
65
|
-
</Typography>
|
66
|
-
|
67
|
-
<Typography
|
68
|
-
textStyle={cardVariant[props.cardType]['descTextStyle']}
|
69
|
-
className={`${cardVariant[props.cardType]['descClasses']} [&>p]:pb-2 last:[&>p]:pb-0 [&>ul]:ps-4 [&>ul>li]:list-disc [&>ul>li]:pb-2 last:[&>ul>li]:pb-0 [&>p>a]:text-blue-600`}
|
70
|
-
>
|
71
|
-
<ReactMarkdown>
|
72
|
-
{props.description}
|
73
|
-
</ReactMarkdown>
|
74
|
-
</Typography>
|
75
|
-
</>
|
76
|
-
)
|
77
|
-
}
|
78
|
-
</div>
|
26
|
+
<div
|
27
|
+
className={`${iconBG} ${cardVariant[props.cardType]['iconWidthStyle']} w-12 h-12 flex items-center justify-center rounded-full mb-6`}
|
28
|
+
>
|
29
|
+
<Icon
|
30
|
+
height={`stroke-[1.5px] ${cardVariant[props.cardType]['iconStyle']}`}
|
31
|
+
variant={props.iconVariant}
|
32
|
+
strokeColor={props.iconStroke}
|
33
|
+
strokeClass={HDSColor(props.iconStrokeClass)} />
|
79
34
|
</div>
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
35
|
+
<div
|
36
|
+
className="flex-1">
|
37
|
+
{props.cardType === 'withoutButton' ? (
|
38
|
+
<>
|
39
|
+
<Typography
|
40
|
+
textStyle="h5"
|
41
|
+
as="h5"
|
42
|
+
className="mb-1 text-blue-600">
|
43
|
+
{props.title}
|
44
|
+
</Typography>
|
45
|
+
<Typography
|
46
|
+
textStyle="body1"
|
47
|
+
className="text-neutral-1000">
|
48
|
+
{props.description}
|
49
|
+
</Typography>
|
50
|
+
</>
|
51
|
+
)
|
52
|
+
:
|
53
|
+
(
|
54
|
+
<>
|
55
|
+
<Typography
|
56
|
+
textStyle="h4"
|
57
|
+
as="h4"
|
58
|
+
className="mb-1 text-blue-800">
|
59
|
+
{props.title}
|
60
|
+
</Typography>
|
61
|
+
<Typography
|
62
|
+
textStyle="body1c"
|
63
|
+
className="text-neutral-1000">
|
64
|
+
{props.description}
|
65
|
+
</Typography>
|
66
|
+
</>
|
67
|
+
)
|
68
|
+
}
|
69
|
+
{props.cardType === 'withButton' && (
|
70
|
+
<div className="flex mt-7">
|
71
|
+
<HDSButton
|
72
|
+
label='Start free'
|
73
|
+
type='secondary'
|
74
|
+
leftIconVariant='none'
|
75
|
+
rightIconVariant='none'
|
76
|
+
state='default'
|
77
|
+
size='sm'
|
78
|
+
rightAnimatedArrow={true}
|
79
|
+
rightAnimatedArrowColor='#3970FD'
|
80
|
+
className=' mt-7'
|
81
|
+
/>
|
82
|
+
</div>
|
83
|
+
)}
|
96
84
|
|
85
|
+
</div>
|
97
86
|
|
98
87
|
</div>
|
99
88
|
)
|