hds-web 1.0.1 → 1.0.3

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 (32) hide show
  1. package/dist/index.css +2 -2
  2. package/dist/index.es.css +2 -2
  3. package/dist/index.es.js +4 -4
  4. package/dist/index.js +4 -4
  5. package/package.json +1 -1
  6. package/src/HDS/components/Avatars/profileAvatar.js +28 -16
  7. package/src/HDS/components/BadgesCaption/badges.js +10 -10
  8. package/src/HDS/components/Buttons/button.js +18 -7
  9. package/src/HDS/components/Cards/Feedback/feedback.js +25 -0
  10. package/src/HDS/components/Cards/Feedback/index.js +1 -0
  11. package/src/HDS/components/Cards/Link/index.js +2 -0
  12. package/src/HDS/components/Cards/Link/link.js +86 -0
  13. package/src/HDS/components/Cards/Link/resources.js +53 -0
  14. package/src/HDS/components/Cards/Menu/flyoutB.js +1 -0
  15. package/src/HDS/components/Cards/Misc/talkCard.js +22 -18
  16. package/src/HDS/components/Cards/TalkDetailCard/index.js +1 -0
  17. package/src/HDS/components/Cards/TalkDetailCard/talkDetailCard.js +68 -0
  18. package/src/HDS/components/Hero/h1.js +0 -1
  19. package/src/HDS/components/Hero/h2.js +198 -0
  20. package/src/HDS/components/Hero/index.js +2 -1
  21. package/src/HDS/components/Tables/index.js +2 -1
  22. package/src/HDS/components/Tables/tableB.js +146 -0
  23. package/src/HDS/components/Tabs/tab.js +2 -2
  24. package/src/HDS/components/common-components/Icon/IconMap.js +6 -4
  25. package/src/HDS/foundation/ColorPalette/color.js +97 -2
  26. package/src/HDS/helpers/Time/time.js +70 -48
  27. package/src/HDS/index.js +2 -1
  28. package/src/HDS/modules/TextCard/index.js +1 -0
  29. package/src/HDS/modules/TextCard/textCard.js +132 -0
  30. package/src/HDS/modules/index.js +1 -0
  31. package/src/styles/tailwind.css +647 -34
  32. package/tailwind.config.js +22 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hds-web",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -7,34 +7,39 @@ const imgSizes = {
7
7
  'md': 'h-12 w-12',
8
8
  'lg': 'h-[60px] w-[60px]',
9
9
  }
10
+ const AvatarVariant = {
11
+ 'circular': 'shadow rounded-full border-[1.5px] border-neutral-0',
12
+ 'square': 'rounded-lg',
13
+ }
14
+
10
15
 
11
16
  const nameTextStyle = {
12
- 'xs': 'text-sm-medium',
13
- 'sm': 'text-sm-medium',
14
- 'md': 'text-md-medium',
15
- 'lg': 'text-lg-medium'
17
+ 'xs': 'text-d-body1c-bold',
18
+ 'sm': 'text-d-body1c-bold',
19
+ 'md': 'text-d-body1c-bold',
20
+ 'lg': 'text-d-body1c-bold'
16
21
  }
17
22
 
18
23
  const desgnTextStyle = {
19
- 'xs': 'text-xs-regular',
20
- 'sm': 'text-sm-regular',
21
- 'md': 'text-md-regular',
22
- 'lg': 'text-md-regular'
24
+ 'xs': 'text-hds-d-body3c ',
25
+ 'sm': 'text-hds-d-body3c ',
26
+ 'md': 'text-hds-d-body3c ',
27
+ 'lg': 'text-hds-d-body3c '
23
28
  }
24
29
 
25
- export default function ProfileAvatar({ name, designation, size, imageUrl }) {
26
- const imgSizeClass = imgSizes[size] || imgSizes.medium;
30
+ export default function ProfileAvatar({ name, designation, size, imageUrl, avatarVariant }) {
31
+ const imgSizeClass = imgSizes[size] || imgSizes.md;
32
+ const avatarVariantClass = AvatarVariant[avatarVariant] || AvatarVariant.circular;
27
33
  const defaultAvatarIcon = "user03";
28
34
  const hasImageUrl = imageUrl && imageUrl.length > 0;
29
35
  return (
30
- <a href="#" className="group block flex-shrink-0">
36
+ <div className="group block flex-shrink-0">
31
37
  <div className="flex items-center">
32
38
  <div>
33
39
  {hasImageUrl ? (
34
40
  <img
35
- className={`${imgSizeClass} inline-block shadow rounded-full border-[1.5px] border-neutral-0`}
41
+ className={`${imgSizeClass} ${avatarVariantClass} rounded inline-block`}
36
42
  src={imageUrl}
37
-
38
43
  />
39
44
  ) : (
40
45
  <Icon
@@ -45,11 +50,18 @@ export default function ProfileAvatar({ name, designation, size, imageUrl }) {
45
50
  )}
46
51
  </div>
47
52
  <div className="ml-3">
48
- <p className={`${nameTextStyle[`${size}`]} text-neutral-900 group-hover:text-gray-900`}>{name}</p>
49
- <p className={`${desgnTextStyle[`${size}`]} text-neutral-500 group-hover:text-gray-700`}>{designation}</p>
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>
50
62
  </div>
51
63
  </div>
52
- </a>
64
+ </div>
53
65
  )
54
66
  }
55
67
 
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { useState } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { Icon } from '../common-components/Icon';
5
+ import {Typography} from '../../foundation/Typography'
5
6
  const sizeClasses = {
6
7
  sm: 'py-0.5 px-2 hds-d-body3c',
7
8
  default: 'py-1 px-3',
@@ -13,17 +14,16 @@ const iconClasses = {
13
14
  };
14
15
 
15
16
  const colorVariants = {
16
- blue: 'bg-blue-600 text-blue-800 hover:bg-blue-300 dark:bg-blue-500 dark:text-blue-100 dark:hover:bg-blue-600',
17
- grey: 'bg-neutral-600 text-neutral-800 hover:bg-neutral-300 dark:bg-neutral-500 dark:text-neutral-100 dark:hover:bg-neutral-600',
18
- purple: 'bg-purple-600 text-purple-800 hover:bg-purple-300 dark:bg-purple-500 dark:text-purple-100 dark:hover:bg-purple-600',
19
- pink: 'bg-pink-600 text-pink-800 hover:bg-pink-300 dark:bg-pink-500 dark:text-pink-100 dark:hover:bg-pink-600',
20
- amber: 'bg-amber-600 text-amber-800 hover:bg-amber-300 dark:bg-amber-500 dark:text-amber-100 dark:hover:bg-amber-600',
21
- cyan: 'bg-cyan-600 text-cyan-800 hover:bg-cyan-300 dark:bg-cyan-500 dark:text-cyan-100 dark:hover:bg-cyan-600',
22
- green: 'bg-green-600 text-green-800 hover:bg-green-300 dark:bg-green-500 dark:text-green-100 dark:hover:bg-green-600',
17
+ blue: 'bg-blue-200 text-blue-800 group-hover:bg-blue-300 border border-blue-400 ',
18
+ grey: 'bg-neutral-200 text-neutral-800 group-hover:bg-neutral-300 border border-neutral-400 ',
19
+ purple: 'bg-purple-200 text-purple-800 group-hover:bg-purple-300 border border-purple-400 ',
20
+ pink: 'bg-pink-200 text-pink-800 group-hover:bg-pink-300 border border-pink-400 ',
21
+ amber: 'bg-amber-200 text-amber-800 group-hover:bg-amber-300 border border-amber-400 ',
22
+ cyan: 'bg-cyan-200 text-cyan-800 group-hover:bg-cyan-300 border border-cyan-400 ',
23
+ cyan200: 'bg-cyan-200 text-cyan-600 border border-cyan-400 border border-cyan-400 ',
24
+ green: 'bg-green-200 text-green-800 group-hover:bg-green-300 border border-green-400 ',
23
25
  }
24
26
 
25
-
26
-
27
27
  export default function Badge({
28
28
  leftIconVariant,
29
29
  leftIconColor,
@@ -55,7 +55,7 @@ export default function Badge({
55
55
  <Icon height={'h-4 w-4'} variant={leftIconVariant} strokeColor={leftIconColor} />
56
56
  </div>
57
57
  )}
58
- {children}
58
+ <Typography textStyle='h6'>{children}</Typography>
59
59
 
60
60
  {rightIconVariant && rightIconVariant !== 'none' && (
61
61
  <div className='ml-1'>
@@ -93,7 +93,12 @@ const Buttonclasses = {
93
93
  'sm': 'rounded-full',
94
94
  'md': 'rounded-full p-2.5',
95
95
  'lg': 'trounded-full p-3'
96
- }
96
+ },
97
+ 'links': {
98
+ 'sm': 'text-hds-d-body3c-medium rounded-full',
99
+ 'md': 'text-hds-d-body3c-medium rounded-full',
100
+ 'lg': 'text-hds-d-body1c-medium rounded-full'
101
+ },
97
102
  }
98
103
  }
99
104
  export default function Button(props) {
@@ -126,6 +131,7 @@ export default function Button(props) {
126
131
 
127
132
  let sizeType = 'default';
128
133
  if(type=='iconOnly'){sizeType='iconOnly'}
134
+ if(type=='secondaryLink' || type=='primaryLink' ){sizeType='links'}
129
135
 
130
136
 
131
137
  const buttonClasses = [
@@ -190,12 +196,17 @@ Button.propTypes = {
190
196
  };
191
197
 
192
198
  Button.defaultProps = {
193
- size: 'sm',
199
+ size: 'md',
194
200
  type: 'primary',
195
- leftIconVariant: 'home03',
201
+ leftIconVariant: 'none',
196
202
  rightIconVariant: 'home3',
197
- rightIconColor: '#80ff00',
198
- leftIconColor: '#80ff00',
199
- animatedHoverStroke:''
200
-
203
+ rightIconColor: '#FFFFFF',
204
+ leftIconColor: '#FFFFFF',
205
+ animatedHoverStroke:'#FFFFFF',
206
+ state: 'default',
207
+ label: 'Button',
208
+ rightAnimatedArrow: 'True' ,
209
+ rightAnimatedArrowColor: '#FFFFFF',
210
+ animatedHoverStroke: 'group-hover:stroke-neutral-0',
211
+
201
212
  };
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import {HDSColor} from '../../../foundation/ColorPalette'
3
+ import { ProfileAvatar } from '../../Avatars'
4
+ import { Typography } from '../../../foundation/Typography'
5
+
6
+
7
+ export default function FeedbackCard(props) {
8
+ return (
9
+ <div className='bg-neutral-0 rounded-3xl shadow p-6 tb-l:p-10'>
10
+ <div className='pb-8'>
11
+ <img src={props.brandImgUrl} alt={props.brandImgAlt} />
12
+ </div>
13
+ <div className="pb-10">
14
+ <Typography textStyle="quote" className='text-neutral-1000'>{props.description}</Typography>
15
+ </div>
16
+ <ProfileAvatar
17
+ name={props.speakerName}
18
+ size='md'
19
+ designation={props.speakerDesignation}
20
+ imageUrl={props.speakerImgUrl}
21
+ avatarVariant="square"
22
+ />
23
+ </div>
24
+ )
25
+ }
@@ -0,0 +1 @@
1
+ export {default as FeedbackCard} from './feedback';
@@ -0,0 +1,2 @@
1
+ export {default as LinkCard} from './link';
2
+ export {default as ResourcesCard} from './resources';
@@ -0,0 +1,86 @@
1
+ import React from "react";
2
+ import PropTypes from 'prop-types';
3
+ import { Icon } from "../../common-components/Icon";
4
+ import { HDSColor } from '../../../foundation/ColorPalette'
5
+ import { Typography } from '../../../foundation/Typography'
6
+
7
+
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';
12
+ return (
13
+ <>
14
+ <a
15
+ href={props.linkUrl}
16
+ className={`${cardHoverClasses} ${cardBgColorClass} min-w-[15rem] rounded-2xl border border-neutral-150 p-6 block`}
17
+ >
18
+ {props.brandImageUrl ?
19
+ (
20
+ <div className="flex flex-col">
21
+ <div className="flex justify-end items-end pr-6">
22
+ {props.iconArrowVariant &&
23
+ (<Icon
24
+ height={'w-6 h-6 stroke-[1.5px] stroke-blue-400'}
25
+ variant={props.iconArrowVariant}
26
+ strokeColor={props.iconArrowStrokeColor}
27
+ />)
28
+ }
29
+ </div>
30
+ <img src={props.brandImageUrl} alt={props.brandImageAlt} />
31
+
32
+ </div>
33
+ )
34
+ :
35
+ (
36
+ <>
37
+ <div className='flex items-center'>
38
+ <div className='flex items-center flex-1'>
39
+ {props.iconVariant &&
40
+ (<Icon
41
+ height={'w-6 h-6 mr-2 stroke-[1.5px] '}
42
+ variant={props.iconVariant}
43
+ strokeColor={iconStrokeColor}
44
+ />)}
45
+ <Typography
46
+ as="h5"
47
+ textStyle="body1c-bold"
48
+ className="text-neutral-1000">
49
+ {props.title}
50
+ </Typography>
51
+ </div>
52
+ {props.iconArrowVariant &&
53
+ (<Icon
54
+ height={'w-6 h-6 stroke-[1.5px] stroke-blue-400'}
55
+ variant={props.iconArrowVariant}
56
+ strokeColor={props.iconArrowStrokeColor}
57
+ />)
58
+ }
59
+ </div>
60
+ {props.description &&
61
+ (<Typography
62
+ textStyle="body3"
63
+ className="text-neutral-1000 mt-2">
64
+ {props.description}
65
+ </Typography>)}
66
+ </>
67
+ )
68
+ }
69
+ </a>
70
+ </>
71
+ )
72
+ }
73
+
74
+ LinkCard.defaultProps = {
75
+ brandImageUrl: '',
76
+ brandImageAlt:'',
77
+ linkUrl: '#',
78
+ cardBgColor: 'bg-neutral-0',
79
+ cardHoverBg: 'bg-neutral-0',
80
+ iconVariant: 'videorecorder',
81
+ iconStrokeColor: 'blue-500',
82
+ iconArrowVariant: 'arrownarrowupright',
83
+ iconArrowStrokeColor: 'blue-400',
84
+ title: 'Webinar',
85
+ description: 'Model Level Authorization System for GraphQL with Hasura',
86
+ };
@@ -0,0 +1,53 @@
1
+ import React from "react";
2
+ import { Icon } from "../../common-components/Icon";
3
+ import { HDSColor } from '../../../foundation/ColorPalette';
4
+ import { Typography } from '../../../foundation/Typography';
5
+ import PropTypes from 'prop-types';
6
+
7
+
8
+ export default function ResourcesCard(props) {
9
+ const iconBG = HDSColor(props.iconBg);
10
+ console.log(props.resourcesArr);
11
+ return (
12
+ <>
13
+ <div className={`p-8 ${props.cardBg} min-w-[18rem] rounded-3xl`}>
14
+
15
+ {props.title && (
16
+ <Typography
17
+ textStyle='h6'
18
+ className={`uppercase ${props.title_text_color}`}>
19
+ {props.title}
20
+ </Typography>
21
+ )}
22
+ <div className="mt-6">
23
+ {props.resourcesArr.map((value) => (
24
+ <a href={value.cta_linkUrl} className="flex gap-2 mt-4">
25
+ <Icon
26
+ height={'w-6 h-6 mr-2 stroke-[1.5px] stroke-blue-600'}
27
+ variant={value.cta_icon}
28
+ strokeClass={value.cta_stroke}
29
+ />
30
+ <Typography
31
+ textStyle='body2c'
32
+ className={value.cta_text_color}>
33
+ {value.cta_text}
34
+ </Typography>
35
+ </a>
36
+ ))}
37
+ </div>
38
+ </div>
39
+ </>
40
+ )
41
+ }
42
+ ResourcesCard.defaultProps = {
43
+ cardBg: 'bg-neutral-0',
44
+ title: 'Resources Card',
45
+ title_text_color: 'text-blue-600',
46
+ resourcesArr: [
47
+ { cta_text: 'This is one really long link that may spill onto the next line', cta_icon: 'linkexternal01', cta_text_color: 'text-neutral-700 hover:text-blue-600 ', cta_stroke: 'stroke-blue-600', cta_linkUrl: '#' },
48
+ { cta_text: 'This is a regular link that fits in one line', cta_text_color: 'text-neutral-700', cta_icon: 'linkexternal01', cta_stroke: 'stroke-blue-600', cta_linkUrl: '#' },
49
+ { cta_text: 'text3', cta_text_color: 'text-neutral-700', cta_icon: 'linkexternal01', cta_stroke: 'stroke-blue-600', cta_linkUrl: '#' },
50
+ { cta_text: 'text4', cta_text_color: 'text-neutral-700', cta_icon: 'linkexternal01', cta_stroke: 'stroke-blue-600', cta_linkUrl: '#' },
51
+
52
+ ]
53
+ }
@@ -34,6 +34,7 @@ export default function FlyoutB(props) {
34
34
  size='sm'
35
35
  rightAnimatedArrow={true}
36
36
  rightAnimatedArrowColor='#6C737F'
37
+ className='mt-4'
37
38
  />
38
39
  </div>
39
40
  <Typography className='mt-2 text-neutral-800' textStyle='body3'>{mainDescription}</Typography>
@@ -10,8 +10,8 @@ export default function TalkCard(props) {
10
10
 
11
11
  <div className=" ">
12
12
 
13
- <div className="grid rounded-3xl shadow bg-neutral-0 grid-cols-2 border border-neutral-200 min-w-[882px] ">
14
- <div className="px-8 py-6 border-r border-r-neutral-150" >
13
+ <div className="grid rounded-3xl shadow bg-neutral-0 grid-cols-1 tb:grid-cols-2 border border-neutral-200 w-full max-w-[882px] ">
14
+ <div className="px-8 py-6 border-b border-b-neutral-150 tb:border-0 tb:border-r tb:border-r-neutral-150" >
15
15
 
16
16
 
17
17
  <Badges
@@ -22,25 +22,29 @@ export default function TalkCard(props) {
22
22
  children={props.badges.label}
23
23
  />
24
24
 
25
- <Typography className='my-2 text-neutral-800' textStyle='h5'>{props.title}</Typography>
26
- <Typography className='my-2 text-neutral-600' textStyle='body1'>{props.para}</Typography>
25
+ <Typography className='my-2 text-blue-800' textStyle='h5'>{props.title}</Typography>
26
+ <Typography className='my-2 text-neutral-700' textStyle='body1'>{props.para}</Typography>
27
27
  </div>
28
28
 
29
- <div className="flex flex-col pt-[2.875rem] justify-between">
30
- <div className="pl-6 flex gap-6 mb-9 flex-col ">
31
- {props.speakerSet.map((value, i) => (
32
- <div key={i} className="">
29
+ <div className="flex flex-col pt-0 tb:pt-[2.875rem] justify-between">
30
+ {
31
+ props.speakerSet && (
32
+ <div className="pl-6 flex gap-6 mt-9 tb:mt-0 mb-9 flex-col ">
33
+ {props.speakerSet.map((value, i) => (
34
+ <div key={i} className="">
33
35
 
34
- <ProfileAvatar
35
- name={value.name}
36
- size='md'
37
- designation={value.designation}
38
- imageUrl={value.imageUrl}
39
- />
40
- </div>
36
+ <ProfileAvatar
37
+ name={value.name}
38
+ size='md'
39
+ designation={value.designation}
40
+ imageUrl={value.imageUrl}
41
+ />
42
+ </div>
41
43
 
42
- ))}
43
- </div>
44
+ ))}
45
+ </div>
46
+ )
47
+ }
44
48
  <div className=" w-full border-t border-t-neutral-150 p-6 flex flex-row justify-between items-center">
45
49
  <Typography textStyle='h6' className='text-blue-800'>{props.eventTime}</Typography>
46
50
  <HDSButton
@@ -50,7 +54,7 @@ export default function TalkCard(props) {
50
54
  state='default'
51
55
  size='sm'
52
56
  type="iconOnly"
53
-
57
+ label=''
54
58
  />
55
59
  </div>
56
60
  </div>
@@ -0,0 +1 @@
1
+ export {default as TalkDetailCard} from './talkDetailCard';
@@ -0,0 +1,68 @@
1
+ import React from "react";
2
+ import PropTypes from 'prop-types';
3
+ import {HDSColor} from '../../../foundation/ColorPalette';
4
+ import { Badges } from '../../BadgesCaption';
5
+ import { ProfileAvatar } from '../../Avatars'
6
+ import { Typography } from "../../../foundation/Typography";
7
+
8
+
9
+ export default function TalkDetailCard(props) {
10
+ const badgeLeftIconColor = HDSColor(props.badgeLeftIconColor);
11
+ 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
+ }
56
+ </div>
57
+ )
58
+ }
59
+
60
+ 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: '',
68
+ };
@@ -31,7 +31,6 @@ export default function Hero({ heroData, logo, scrollArrow, fontSize }) {
31
31
  {
32
32
  heroData.tag_line && (
33
33
  <div
34
-
35
34
  >
36
35
  <Typography textStyle="h6" as="h6" className={"pb-6 uppercase text-center db:text-left font-normal tb-l:text-left " + ((heroData.tag_line_color) ? heroData.tag_line_color : "") + ((heroData.video_url) ? " tb:text-center" : " tb:text-left")}
37
36
  >