hds-web 1.6.8 → 1.7.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.
Files changed (53) hide show
  1. package/dist/index.css +5 -2
  2. package/dist/index.es.css +5 -2
  3. package/dist/index.es.js +13 -13
  4. package/dist/index.js +13 -13
  5. package/package.json +1 -1
  6. package/src/HDS/assets/icons/calendar-plus-01.svg +1 -1
  7. package/src/HDS/assets/icons/calendar-plus-02.svg +1 -1
  8. package/src/HDS/assets/icons/hasura-1.svg +3 -0
  9. package/src/HDS/assets/icons/hasura-2.svg +3 -0
  10. package/src/HDS/assets/icons/hasura-3.svg +3 -0
  11. package/src/HDS/components/Avatars/hasConAv.js +9 -10
  12. package/src/HDS/components/Avatars/profileAvatar.js +10 -29
  13. package/src/HDS/components/BadgesCaption/badges.js +7 -4
  14. package/src/HDS/components/Buttons/button.js +25 -14
  15. package/src/HDS/components/Cards/Dropdown/v3Dropdown.js +1 -1
  16. package/src/HDS/components/Cards/Feedback/feedback.js +1 -1
  17. package/src/HDS/components/Cards/ImageBox/imagebox.js +51 -0
  18. package/src/HDS/components/Cards/ImageBox/index.js +1 -0
  19. package/src/HDS/components/Cards/Link/link.js +19 -13
  20. package/src/HDS/components/Cards/Menu/flyout.js +5 -4
  21. package/src/HDS/components/Cards/Menu/flyoutA.js +5 -4
  22. package/src/HDS/components/Cards/Menu/flyoutFull.js +1 -0
  23. package/src/HDS/components/Cards/Misc/iconCard.js +71 -60
  24. package/src/HDS/components/Cards/Misc/index.js +1 -0
  25. package/src/HDS/components/Cards/Misc/talkCard.js +19 -18
  26. package/src/HDS/components/Cards/Misc/talkcard2.js +118 -0
  27. package/src/HDS/components/Cards/TalkDetailCard/talkDetailCard.js +83 -52
  28. package/src/HDS/components/Carousels/carouselCard.js +101 -90
  29. package/src/HDS/components/Headers/v3Header.js +111 -85
  30. package/src/HDS/components/Hero/h2.js +58 -36
  31. package/src/HDS/components/Hero/h3.js +413 -0
  32. package/src/HDS/components/Hero/index.js +2 -1
  33. package/src/HDS/components/Tables/index.js +2 -1
  34. package/src/HDS/components/Tables/tableB.js +10 -10
  35. package/src/HDS/components/Tables/tableC.js +20 -23
  36. package/src/HDS/components/Tables/tableD.js +326 -0
  37. package/src/HDS/components/Tabs/tab.js +47 -16
  38. package/src/HDS/components/common-components/Icon/IconMap.js +6 -0
  39. package/src/HDS/components/index.js +2 -1
  40. package/src/HDS/foundation/ColorPalette/color.js +193 -1
  41. package/src/HDS/foundation/Typography/Typography.js +2 -1
  42. package/src/HDS/helpers/Grid/grid.js +64 -0
  43. package/src/HDS/helpers/Grid/index.js +1 -0
  44. package/src/HDS/helpers/Media/index.js +1 -0
  45. package/src/HDS/helpers/Media/mediabox.js +75 -0
  46. package/src/HDS/helpers/index.js +2 -1
  47. package/src/HDS/modules/TextCard/textCard.js +8 -71
  48. package/src/HDS/modules/index.js +2 -1
  49. package/src/HDS/modules/navCard/index.js +1 -0
  50. package/src/HDS/modules/navCard/navCard.js +82 -0
  51. package/src/index.css +39 -1
  52. package/src/styles/tailwind.css +3104 -1848
  53. package/tailwind.config.js +6 -3
@@ -3,17 +3,34 @@ 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
+ import ReactMarkdown from "react-markdown";
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'
12
16
  },
13
17
  "withoutButton": {
14
18
  'cardStyle': 'p-6',
15
19
  'iconWidthStyle': 'h-12 w-12',
16
20
  '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'
17
34
  }
18
35
  }
19
36
 
@@ -21,68 +38,62 @@ export default function IconCard(props) {
21
38
  const iconBG = HDSColor(props.iconBg);
22
39
  return (
23
40
  <div
24
- className={`bg-neutral-0 rounded-3xl shadow ${cardVariant[props.cardType]['cardStyle']}`}
41
+ className={`bg-neutral-0 grid h-full rounded-3xl shadow ${cardVariant[props.cardType]['cardStyle']}`}
25
42
  >
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)} />
34
- </div>
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
- )}
43
+ <div className=" self-start">
44
+ <div
45
+ className={`${iconBG} ${cardVariant[props.cardType]['iconWidthStyle']} w-12 h-12 flex items-center justify-center rounded-full mb-6`}
46
+ >
47
+ <Icon
48
+ height={`stroke-[1.5px] ${cardVariant[props.cardType]['iconStyle']}`}
49
+ variant={props.iconVariant}
50
+ strokeColor={props.iconStroke}
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>
84
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>
85
79
  </div>
80
+ {props.cardType === 'withButton' && (
81
+ <div className="flex self-end mt-7">
82
+ <HDSButton
83
+ label='Start free'
84
+ type='secondary'
85
+ leftIconVariant='none'
86
+ rightIconVariant='none'
87
+ state='default'
88
+ size='sm'
89
+ rightAnimatedArrow={true}
90
+ rightAnimatedArrowColor='#3970FD'
91
+ className=' mt-7'
92
+ />
93
+ </div>
94
+ )}
95
+
96
+
86
97
 
87
98
  </div>
88
99
  )
@@ -1,2 +1,3 @@
1
1
  export {default as TalkCard} from './talkCard';
2
+ export {default as TalkCard2} from './talkcard2';
2
3
  export {default as IconCard} from './iconCard';
@@ -4,18 +4,19 @@ import { Typography } from '../../../foundation/Typography'
4
4
  import { ProfileAvatar } from '../../Avatars'
5
5
  import { Time } from "../../../helpers/Time";
6
6
  import { HDSButton } from '../../Buttons'
7
+ import ReactMarkdown from "react-markdown";
7
8
 
8
9
  export default function TalkCard(props) {
9
10
  let CardClass = ''
10
- if (props.speakerSet === undefined && props.eventTime === undefined) {
11
+ if (props.speakerSet === undefined) {
11
12
  CardClass = 'flex';
12
13
  }
13
- else CardClass = 'grid shadow';
14
+ else CardClass = 'flex tb-l:flex-row flex-col';
14
15
  return (
15
16
 
16
- <div className=" ">
17
- <div className={`${CardClass} rounded-3xl bg-neutral-0 grid-cols-1 tb:grid-cols-2 border border-neutral-200 w-full max-w-[882px]`}>
18
- <div className="px-8 py-6 border-b rounded-3xl border-b-neutral-150 tb:border-0 tb:border-r tb:border-r-neutral-150" >
17
+ <div className="grid w-full">
18
+ <div className={`${CardClass} w-full max-w-[882px]`}>
19
+ <div className={"px-8 py-6" + ((props.speakerSet) ? " border-b tb-l:w-[62%] border-b-neutral-150 tb:border-0 tb:border-r tb:border-r-neutral-150" : "")}>
19
20
  <Badges
20
21
  size={props.badges.size}
21
22
  color={props.badges.color}
@@ -24,19 +25,19 @@ export default function TalkCard(props) {
24
25
  children={props.badges.label}
25
26
  />
26
27
 
27
- <Typography
28
- className='my-2 text-blue-800'
29
- textStyle='h5'>{props.title}
30
- </Typography>
31
- <Typography
32
- className='my-2 text-neutral-700'
33
- textStyle='body1'>{props.para}</Typography>
34
- </div>
28
+ <Typography className='my-2 text-blue-800' textStyle='h5'>{props.title}</Typography>
29
+
30
+ {props.para &&
31
+ <Typography
32
+ className='line-clamp-3 text-neutral-700'
33
+ textStyle='body1c'>
34
+ {props.para}
35
+ </Typography>}
35
36
 
36
- {props.speakerSet &&
37
- props.eventTime &&
37
+ </div>
38
38
 
39
- <div className="flex flex-col pt-0 tb:pt-[2.875rem] justify-between">
39
+ {props.speakerSet && (
40
+ <div className="flex flex-col tb-l:w-[38%] pt-0 tb:pt-[2.875rem] justify-between">
40
41
  {
41
42
  props.speakerSet && (
42
43
  <div className="pl-6 flex gap-6 mt-9 tb:mt-0 mb-9 flex-col ">
@@ -67,10 +68,10 @@ export default function TalkCard(props) {
67
68
  label=''
68
69
  />
69
70
  </div>
70
- </div>}
71
+ </div>)}
71
72
  </div>
72
73
  </div>
73
74
 
74
75
  )
75
76
 
76
- }
77
+ }
@@ -0,0 +1,118 @@
1
+ import React from "react";
2
+ import { Badges } from '../../BadgesCaption';
3
+ import { Typography } from '../../../foundation/Typography'
4
+ import { ProfileAvatar } from '../../Avatars'
5
+ import { Time } from "../../../helpers/Time";
6
+ import { HDSButton } from '../../Buttons'
7
+ import ReactMarkdown from "react-markdown";
8
+ import { HDSColor } from "../../../foundation/ColorPalette";
9
+
10
+ export default function TalkCard2(props) {
11
+ let CardClass = ''
12
+ if (props.speakerSet) {
13
+ CardClass = 'tb-l:justify-between';
14
+ }
15
+ else CardClass = 'tb-l:justify-center';
16
+
17
+
18
+ return (
19
+
20
+ <div className="grid">
21
+ <div className={`flex flex-col tb-l:flex-row tb-l:justify-between `}>
22
+ <div className={"px-6 pt-6 tb-l:px-8 tb-l:pb-6 tb-l:border-r tb-l:border-r-neutral-200"}>
23
+ <div className="flex flex-row flex-wrap tb:gap-3 gap-2">
24
+ {props.badges &&
25
+ props.badges.map((value, index) => (
26
+ <div key={index} className='flex whitespace-nowrap'>
27
+ <Badges
28
+ size={value.size}
29
+ color={value.color}
30
+ leftIconVariant={value.leftIconVariant}
31
+ leftIconColor={value.leftIconColor}
32
+ leftIconColorClass={HDSColor(value.leftIconColorClass)}
33
+ children={value.label}
34
+
35
+ />
36
+ </div>
37
+ ))
38
+ }
39
+
40
+ </div>
41
+ <div className="tb-l:w-[380px] db:w-[520px] flex flex-col tb:justify-between">
42
+ <div>
43
+ <Typography className='mt-2 text-blue-800' textStyle='h5'>{props.title}</Typography>
44
+ {props.para &&
45
+ <Typography
46
+ className='line-clamp-3 mt-2 text-neutral-700'
47
+ textStyle='body1c'>
48
+ {props.para}
49
+ </Typography>
50
+ }
51
+ </div>
52
+ <div className="flex pb-6 tb-l:pb-0">
53
+ {props.readUrl &&
54
+ props.para && (
55
+ <a href={props.readUrl}>
56
+ <HDSButton
57
+ label='Read more'
58
+ type='secondaryLink'
59
+ leftIconVariant='none'
60
+ rightIconVariant='none'
61
+ state='default'
62
+ size='md'
63
+ rightAnimatedArrow={true}
64
+ rightAnimatedArrowColor='#3970FD'
65
+ className='mt-2'
66
+ btnTextColorClass='text-blue-500'
67
+ animatedHoverStroke='stroke-blue-500'
68
+ />
69
+ </a>
70
+ )}
71
+ </div>
72
+ </div>
73
+ </div>
74
+
75
+ <div className={`${CardClass} tb-l:divide-y-2 divide-neutral-200 flex tb-l:w-full flex-col pt-0`} >
76
+ {
77
+ props.speakerSet && (
78
+ <div className="px-6 py-6 border-t border-neutral-200 flex flex-col gap-6 tb:mt-0 tb-l:border-0 tb-l:h-full tb-l:justify-center ">
79
+ {props.speakerSet.map((value, i) => (
80
+ <div key={i} className="block">
81
+
82
+ <ProfileAvatar
83
+ name={value.name}
84
+ size='md'
85
+ designation={value.designation}
86
+ imageUrl={value.imageUrl}
87
+ avatarBgColor={props.avatarBgColor}
88
+ />
89
+ </div>
90
+
91
+ ))}
92
+ </div>
93
+ )
94
+ }
95
+ {props.eventTime &&
96
+ <div className="border-t border-neutral-200 tb-l:border-0 w-full pl-6 p-6 flex flex-row justify-between items-center">
97
+ <Typography textStyle='h6' className='text-blue-800 uppercase'>{props.eventTime}</Typography>
98
+ {props.addCalendarUrl &&
99
+ <a href={props.addCalendarUrl}>
100
+ <HDSButton
101
+ leftIconVariant='calendarplus02'
102
+ leftIconColor="#1E56E3"
103
+ rightIconVariant='none'
104
+ state='default'
105
+ size='sm'
106
+ type="iconOnly"
107
+ label=''
108
+ />
109
+ </a>
110
+ }
111
+ </div>}
112
+ </div>
113
+ </div>
114
+ </div>
115
+
116
+ )
117
+
118
+ }
@@ -1,68 +1,99 @@
1
1
  import React from "react";
2
2
  import PropTypes from 'prop-types';
3
- import {HDSColor} from '../../../foundation/ColorPalette';
3
+ import { HDSColor } from '../../../foundation/ColorPalette';
4
4
  import { Badges } from '../../BadgesCaption';
5
5
  import { ProfileAvatar } from '../../Avatars'
6
6
  import { Typography } from "../../../foundation/Typography";
7
+ import ReactMarkdown from "react-markdown";
7
8
 
8
9
 
9
10
  export default function TalkDetailCard(props) {
10
11
  const badgeLeftIconColor = HDSColor(props.badgeLeftIconColor);
11
12
  return (
12
- <div>
13
- <Badges
14
- color={props.badgeColor}
15
- leftIconColor={badgeLeftIconColor}
16
- leftIconVariant='home03'
17
- size='default'
18
- >
19
- {props.talk_type}
20
- </Badges>
21
- <Typography textStyle='h6' className='text-blue-600 uppercase pt-4 pb-2'>{props.tag_line}</Typography>
22
- <Typography textStyle='h3' as='h3' className='text-blue-900 pb-4'>{props.title}</Typography>
23
- {
24
- props.social_share && (
25
- <div className='flex items-center pb-14'>
26
- {
27
- props.social_share.map((socialShare, i) => (
28
- <div className='mx-2 first:ml-0 last:mr-0'>
29
- <img src={socialShare.img_url} alt={socialShare.img_alt} />
30
- </div>
31
- ))
32
- }
33
- </div>
34
- )
35
- }
36
- {
37
- props.speaker_card && (
38
- <div>
39
- <Typography textStyle='h6' as='h6' className='uppercase text-neutral-500 pb-6'>speakers</Typography>
40
- {
41
- props.speaker_card.map((speaker, i) => (
42
- <div className='pb-4 last:pb-0'>
43
- <ProfileAvatar
44
- name={speaker.name}
45
- size='md'
46
- designation={speaker.designation}
47
- imageUrl={speaker.speakerImgUrl}
48
- avatarVariant="circle"
49
- />
50
- </div>
51
- ))
52
- }
53
- </div>
54
- )
55
- }
13
+ <div className="grid grid-cols-1 tb:grid-cols-2 gap-6 db:gap-28 tb:gap-16">
14
+ <div>
15
+ <div className="flex flex-row flex-wrap tb:gap-3 gap-2">
16
+ {props.badges &&
17
+ props.badges.map((value, index) => (
18
+ <div key={index} className='flex whitespace-nowrap'>
19
+ <Badges
20
+ size={value.size}
21
+ color={value.color}
22
+ leftIconVariant={value.leftIconVariant}
23
+ leftIconColor={value.leftIconColor}
24
+ leftIconColorClass={HDSColor(value.leftIconColorClass)}
25
+ children={value.label}
26
+
27
+ />
28
+
29
+ </div>
30
+ ))
31
+ }
32
+ </div>
33
+
34
+ {
35
+ props.tag_line && (<Typography textStyle='h6' className='text-blue-600 uppercase pt-4 pb-2'>{props.tag_line}</Typography>)
36
+ }
37
+ {
38
+ props.title && (<Typography textStyle='h3' as='h3' className='text-blue-900 pb-6 db:pb-0'>{props.title}</Typography>)
39
+ }
40
+ {
41
+ props.social_share && (
42
+ <div className='flex pb-6 tb:pt-0 tb:pb-0 items-center '>
43
+ {
44
+ props.social_share.map((socialShare, i) => (
45
+ <a href={socialShare.share_url} className='mx-2 first:ml-0 last:mr-0'>
46
+ <img src={socialShare.img_url} alt={socialShare.img_alt} />
47
+ </a>
48
+ ))
49
+ }
50
+ </div>
51
+ )
52
+ }
53
+ {
54
+ props.speaker_card && (
55
+ <div className="border-t border-neutral-200 border-b pb-6 tb:border-0 tb:pb-0">
56
+ <Typography textStyle='h6' as='h6' className='uppercase text-neutral-500 pb-6 pt-6 tb:pt-14'>speakers</Typography>
57
+
58
+ {
59
+ props.speaker_card.map((speaker, i) => (
60
+ <div key={i} className='pb-4 last:pb-0'>
61
+ <ProfileAvatar
62
+ name={speaker.name}
63
+ size='md'
64
+ designation={speaker.designation}
65
+ imageUrl={speaker.imageUrl}
66
+ avatarVariant="circle"
67
+ avatarBgColor={props.avatarBgColor}
68
+ />
69
+ </div>
70
+ ))
71
+ }
72
+
73
+ </div>
74
+ )
75
+ }
76
+ </div>
77
+ <div>
78
+ <Typography textStyle="h4" as="h4" className="text-neutral-800 pb-4">About the Talk</Typography>
79
+ {
80
+ props.description && (
81
+ <Typography className='text-neutral-800 [&>p]:pb-2 last:[&>p]:pb-0 [&>ul]:ps-4 [&>ul>li]:list-disc [&>ul>li]:pb-2 last:[&>ul>li]:pb-0' textStyle='body1'>
82
+ <ReactMarkdown>{props.description}</ReactMarkdown>
83
+ </Typography>
84
+ )
85
+ }
86
+ </div>
56
87
  </div>
57
88
  )
58
89
  }
59
90
 
60
91
  TalkDetailCard.defaultProps = {
61
- badgeColor: 'green',
62
- badgeLeftIconColor: 'stroke-neutral-0',
63
- talk_type: 'Talk',
64
- tag_line: 'June 20-22, 2023 | VIRTUAL | Free',
65
- title: 'Deploying Hasura apps the fast way with the new Vercel integration',
66
- social_share: '',
67
- speaker_card: '',
92
+ // badgeColor: 'green',
93
+ // badgeLeftIconColor: 'stroke-neutral-0',
94
+ // talk_type: 'Talk',
95
+ // tag_line: 'June 20-22, 2023 | VIRTUAL | Free',
96
+ // title: 'Deploying Hasura apps the fast way with the new Vercel integration',
97
+ // social_share: '',
98
+ // speaker_card: '',
68
99
  };