hds-web 1.8.7 → 1.8.9

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 (31) hide show
  1. package/dist/index.css +2 -2
  2. package/dist/index.es.css +2 -2
  3. package/dist/index.es.js +6 -6
  4. package/dist/index.js +6 -6
  5. package/package.json +1 -1
  6. package/src/HDS/assets/icons/caching.svg +4 -0
  7. package/src/HDS/assets/icons/doubleArrow.svg +3 -0
  8. package/src/HDS/assets/icons/endpoints.svg +3 -0
  9. package/src/HDS/assets/icons/mutations.svg +4 -0
  10. package/src/HDS/assets/icons/networking.svg +7 -0
  11. package/src/HDS/assets/icons/queries.svg +3 -0
  12. package/src/HDS/assets/icons/remote.svg +6 -0
  13. package/src/HDS/assets/icons/trigger.svg +5 -0
  14. package/src/HDS/assets/icons/watchTrigger.svg +3 -0
  15. package/src/HDS/components/Avatars/profileAvatar.js +1 -0
  16. package/src/HDS/components/BadgesCaption/badges.js +3 -1
  17. package/src/HDS/components/Cards/Feedback/feedback.js +42 -45
  18. package/src/HDS/components/Cards/Misc/imageBadgeCard.js +27 -0
  19. package/src/HDS/components/Cards/Testimonials/testimonial.js +20 -16
  20. package/src/HDS/components/Cards/VideoCard/homeVC.js +18 -15
  21. package/src/HDS/components/Carousels/customCarousel.js +193 -0
  22. package/src/HDS/components/Carousels/{homeCarousel2.js → homeCarousel.js} +183 -63
  23. package/src/HDS/components/Carousels/index.js +2 -1
  24. package/src/HDS/components/Footers/v3Footer.js +185 -1
  25. package/src/HDS/components/common-components/Icon/IconMap.js +18 -0
  26. package/src/HDS/helpers/Media/mediabox.js +0 -1
  27. package/src/HDS/helpers/index.js +0 -1
  28. package/src/HDS/modules/TextCard/textIconCard.js +17 -20
  29. package/src/styles/tailwind.css +237 -61
  30. package/src/HDS/helpers/Sliders/index.js +0 -1
  31. package/src/HDS/helpers/Sliders/scrollSlider.js +0 -134
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hds-web",
3
- "version": "1.8.7",
3
+ "version": "1.8.9",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -0,0 +1,4 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M20 10.5V6.8C20 5.11984 20 4.27976 19.673 3.63803C19.3854 3.07354 18.9265 2.6146 18.362 2.32698C17.7202 2 16.8802 2 15.2 2H8.8C7.11984 2 6.27976 2 5.63803 2.32698C5.07354 2.6146 4.6146 3.07354 4.32698 3.63803C4 4.27976 4 5.11984 4 6.8V17.2C4 18.8802 4 19.7202 4.32698 20.362C4.6146 20.9265 5.07354 21.3854 5.63803 21.673C6.27976 22 7.11984 22 8.8 22H12M14 11H8M10 15H8M16 7H8" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M17.8889 14L15.4989 17.0885C15.3388 17.2955 15.2587 17.399 15.2596 17.4859C15.2603 17.5615 15.2953 17.6326 15.3545 17.6795C15.4227 17.7333 15.5536 17.7333 15.8153 17.7333H19.163C19.4307 17.7333 19.5646 17.7333 19.6331 17.7882C19.6927 17.8358 19.7272 17.9081 19.7269 17.9844C19.7265 18.0721 19.6424 18.1763 19.4742 18.3846L16.5556 22" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M15 1V17M15 17L11 13M15 17L19 13M5 17V1M5 1L1 5M5 1L9 5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7.89706 1.5C5.82599 1.5 4.14706 3.17893 4.14706 5.25V8.64585C4.14706 9.42051 3.74856 10.1407 3.09223 10.5522L1.85161 11.33C1.63283 11.4671 1.5 11.7072 1.5 11.9654C1.5 12.2236 1.63283 12.4637 1.85161 12.6009L3.09223 13.3787C3.74856 13.7902 4.14706 14.5103 4.14706 15.285V18.75C4.14706 20.8211 5.82599 22.5 7.89706 22.5H9.75C10.1642 22.5 10.5 22.1642 10.5 21.75C10.5 21.3358 10.1642 21 9.75 21H7.89706C6.65442 21 5.64706 19.9926 5.64706 18.75V15.285C5.64706 13.9939 4.98289 12.7936 3.88901 12.1078L3.66193 11.9654L3.88901 11.8231C4.9829 11.1372 5.64706 9.93695 5.64706 8.64585V5.25C5.64706 4.00736 6.65442 3 7.89706 3H9.75C10.1642 3 10.5 2.66421 10.5 2.25C10.5 1.83579 10.1642 1.5 9.75 1.5H7.89706ZM16.3676 1.5C18.4387 1.5 20.1176 3.17893 20.1176 5.25V8.73954C20.1176 9.47556 20.4776 10.165 21.0816 10.5857L22.1787 11.35C22.38 11.4903 22.5 11.7201 22.5 11.9654C22.5 12.2108 22.38 12.4406 22.1787 12.5808L21.0816 13.3451C20.4776 13.7658 20.1176 14.4553 20.1176 15.1913V18.75C20.1176 20.8211 18.4387 22.5 16.3676 22.5H15C14.5858 22.5 14.25 22.1642 14.25 21.75C14.25 21.3358 14.5858 21 15 21H16.3676C17.6103 21 18.6176 19.9926 18.6176 18.75V15.1913C18.6176 13.9646 19.2176 12.8155 20.2242 12.1143L20.4379 11.9654L20.2242 11.8165C19.2176 11.1154 18.6176 9.96623 18.6176 8.73954V5.25C18.6176 4.00736 17.6103 3 16.3676 3H15C14.5858 3 14.25 2.66421 14.25 2.25C14.25 1.83579 14.5858 1.5 15 1.5H16.3676Z" fill="#1F2A37"/>
3
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9 13.4468C9 12.9576 9 12.713 9.05526 12.4829C9.10425 12.2788 9.18506 12.0837 9.29472 11.9048C9.4184 11.7029 9.59136 11.53 9.93726 11.1841L19.5 1.62132C20.3285 0.792893 21.6716 0.792894 22.5 1.62132C23.3285 2.44975 23.3285 3.79289 22.5 4.62132L12.9373 14.1841C12.5914 14.53 12.4184 14.7029 12.2166 14.8266C12.0377 14.9363 11.8426 15.0171 11.6385 15.0661C11.4083 15.1213 11.1637 15.1213 10.6745 15.1213H9V13.4468Z" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M20.5742 12.0717C20.7591 13.9135 20.3836 15.7682 19.4969 17.3931C18.6101 19.018 17.2535 20.3372 15.6045 21.1782C13.9555 22.0192 12.091 22.3428 10.2551 22.1065C8.41913 21.8703 6.69731 21.0852 5.31496 19.8541C3.93262 18.623 2.95418 17.0033 2.50771 15.2068C2.06124 13.4104 2.16754 11.5211 2.81271 9.78606C3.45787 8.05106 4.61184 6.55127 6.12355 5.48301C7.63527 4.41474 9.43429 3.82779 11.2851 3.79897" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </svg>
@@ -0,0 +1,7 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M15 16.6C15 16.0399 15 15.7599 15.109 15.546C15.2049 15.3578 15.3578 15.2049 15.546 15.109C15.7599 15 16.0399 15 16.6 15H19.4C19.9601 15 20.2401 15 20.454 15.109C20.6422 15.2049 20.7951 15.3578 20.891 15.546C21 15.7599 21 16.0399 21 16.6V19.4C21 19.9601 21 20.2401 20.891 20.454C20.7951 20.6422 20.6422 20.7951 20.454 20.891C20.2401 21 19.9601 21 19.4 21H16.6C16.0399 21 15.7599 21 15.546 20.891C15.3578 20.7951 15.2049 20.6422 15.109 20.454C15 20.2401 15 19.9601 15 19.4V16.6Z" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M3 16.6C3 16.0399 3 15.7599 3.10899 15.546C3.20487 15.3578 3.35785 15.2049 3.54601 15.109C3.75992 15 4.03995 15 4.6 15H7.4C7.96005 15 8.24008 15 8.45399 15.109C8.64215 15.2049 8.79513 15.3578 8.89101 15.546C9 15.7599 9 16.0399 9 16.6V19.4C9 19.9601 9 20.2401 8.89101 20.454C8.79513 20.6422 8.64215 20.7951 8.45399 20.891C8.24008 21 7.96005 21 7.4 21H4.6C4.03995 21 3.75992 21 3.54601 20.891C3.35785 20.7951 3.20487 20.6422 3.10899 20.454C3 20.2401 3 19.9601 3 19.4V16.6Z" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M5.99981 15L11.8232 9" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M18.0002 15L12.1768 9" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <rect x="9" y="3" width="6" height="6" rx="1" stroke-linecap="round" stroke-linejoin="round"/>
7
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.08997 8.99959C9.32507 8.33125 9.78912 7.76769 10.3999 7.40872C11.0107 7.04974 11.7289 6.91852 12.4271 7.0383C13.1254 7.15807 13.7588 7.52111 14.215 8.06311C14.6713 8.60512 14.921 9.29111 14.92 9.99959C14.92 11.9996 11.92 12.9996 11.92 12.9996M12 16.9996H12.01M3 7.94104V16.0582C3 16.4008 3 16.5721 3.05048 16.7249C3.09515 16.8601 3.16816 16.9842 3.26463 17.0889C3.37369 17.2072 3.52345 17.2904 3.82297 17.4568L11.223 21.5679C11.5066 21.7255 11.6484 21.8042 11.7985 21.8351C11.9315 21.8625 12.0685 21.8625 12.2015 21.8351C12.3516 21.8042 12.4934 21.7255 12.777 21.5679L20.177 17.4568C20.4766 17.2904 20.6263 17.2072 20.7354 17.0889C20.8318 16.9842 20.9049 16.8601 20.9495 16.7249C21 16.5721 21 16.4008 21 16.0582V7.94104C21 7.5984 21 7.42708 20.9495 7.27428C20.9049 7.1391 20.8318 7.01502 20.7354 6.91033C20.6263 6.79199 20.4766 6.70879 20.177 6.54239L12.777 2.43128C12.4934 2.27372 12.3516 2.19494 12.2015 2.16406C12.0685 2.13672 11.9315 2.13672 11.7985 2.16406C11.6484 2.19494 11.5066 2.27372 11.223 2.43128L3.82297 6.54239C3.52345 6.70879 3.37369 6.79199 3.26463 6.91033C3.16816 7.01502 3.09515 7.1391 3.05048 7.27428C3 7.42708 3 7.5984 3 7.94104Z" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M5 9V14.6C5 16.8402 5 17.9603 5.43597 18.816C5.81947 19.5686 6.43139 20.1805 7.18404 20.564C8.03968 21 9.15979 21 11.4 21H12.6C14.8402 21 15.9603 21 16.816 20.564C17.5686 20.1805 18.1805 19.5686 18.564 18.816C19 17.9603 19 16.8402 19 14.6V9" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M3 8H21" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M8 3L8 8" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M16 3L16 8" stroke-linecap="round" stroke-linejoin="round"/>
6
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8 19H11C11.5523 19 12 18.5523 12 18V6C12 5.44772 12.4477 5 13 5H16" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <circle cx="3" cy="3" r="3" transform="matrix(1 0 0 -1 2 22)" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <circle cx="3" cy="3" r="3" transform="matrix(1 0 0 -1 16 8)" stroke-linecap="round" stroke-linejoin="round"/>
5
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M14.5 19L16.5 21L21 16.5M21.9851 12.5499C21.995 12.3678 22 12.1845 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.4354 6.33651 21.858 11.7385 21.9966M12 6V12L15.7384 13.8692" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -8,6 +8,7 @@ const imgSizes = {
8
8
  'sm': 'h-10 w-10',
9
9
  'md': 'h-12 w-12 min-w-[48px]',
10
10
  'lg': 'h-[60px] w-[60px]',
11
+ 'xl': 'h-16 w-16',
11
12
  }
12
13
  const AvatarVariant = {
13
14
  'circular': 'shadow rounded-full ',
@@ -23,6 +23,7 @@ const colorVariants = {
23
23
  cyan: 'bg-cyan-200 text-cyan-800 group-hover:bg-cyan-300 ',
24
24
  cyan200: 'bg-cyan-200 text-cyan-600 border border-cyan-400 border border-cyan-400 ',
25
25
  green: 'bg-green-200 text-green-800 group-hover:bg-green-300 ',
26
+ purple500: 'bg-purple-500 shadow-sm'
26
27
  }
27
28
 
28
29
  export default function Badge({
@@ -35,6 +36,7 @@ export default function Badge({
35
36
  size,
36
37
  children,
37
38
  color,
39
+ text_color,
38
40
  onClick
39
41
  }) {
40
42
  const [isClicked, setIsClicked] = useState(false);
@@ -58,7 +60,7 @@ export default function Badge({
58
60
  <Icon height={'h-4 w-4 stroke-[1.5px]'} variant={leftIconVariant} strokeColor={leftIconColor} strokeClass={HDSColor(leftIconColorClass)} />
59
61
  </div>
60
62
  )}
61
- <Typography textStyle='body3c'>{children}</Typography>
63
+ <Typography textStyle='body3c' className={HDSColor(text_color)}>{children}</Typography>
62
64
 
63
65
  {rightIconVariant && rightIconVariant !== 'none' && (
64
66
  <div className='ml-1'>
@@ -7,54 +7,51 @@ import { HDSButton } from "../../Buttons";
7
7
 
8
8
  export default function FeedbackCard(props) {
9
9
  return (
10
- <div className='bg-neutral-0 rounded-3xl shadow p-6 tb-l:p-10'>
11
- <ProfileAvatar
12
- name={props.speakerName}
13
- size='md'
14
- designation={props.speakerDesignation}
15
- imageUrl={props.speakerImgUrl}
16
- avatarVariant="circle"
17
- avatarType="secondary"
18
-
19
- />
20
- <div className={((props.dividerClass) ? "py-8" : "py-6")}>
21
- <Typography textStyle={((props.dividerClass) ? "sub2" : "sub1")} className='text-neutral-1000'>{props.description}</Typography>
22
- </div>
23
- {
24
- props.dividerClass && (
25
- <div className={`${HDSColor(props.dividerClass)} my-2`}></div>
26
- )
27
- }
28
- <div className={"mb-s:flex items-start" + ((props.dividerClass) ? " pt-6" : "mt-0")}>
29
- <div className={"border border-neutral-150 p-2 flex items-center justify-center rounded-2xl" + ((props.dividerClass) ? " w-[72px] h-[56px] min-w-[72px]" : " w-[112px] h-[90px] min-w-[112px]")}>
30
- <img src={props.brandImgUrl} alt={props.brandImgAlt}/>
31
- </div>
32
- <div className={"pt-4 mb-s:pt-0 " + ((props.dividerClass) ? "mb-s:pl-6" : "mb-s:pl-8")}>
33
- <Typography textStyle={((props.dividerClass) ? "body2" : "body1")} className='text-neutral-600 pb-1'>{props.blurb}</Typography>
34
- <a href={props.caseStudyUrl} className="flex">
35
- <HDSButton
36
- label='Read casestudy'
37
- type='secondaryLink'
38
- leftIconVariant='none'
39
- rightIconVariant='none'
40
- state='default'
41
- size='md'
42
- rightAnimatedArrow={true}
43
- rightAnimatedArrowColor='#3970FD'
44
- className='mt-0 justify-start'
45
- btnTextColorClass='text-blue-500'
46
- btnTextHoverClass= 'hover:text-blue-500'
47
- animatedHoverStroke= 'group-hover:stroke-blue-500'
48
- />
49
- </a>
10
+ <div className='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'>
11
+ <div className=" self-start">
12
+ <ProfileAvatar
13
+ name={props.speakerName}
14
+ size='xl'
15
+ designation={props.speakerDesignation}
16
+ imageUrl={props.speakerImgUrl}
17
+ avatarVariant="circle"
18
+ avatarType="secondary"
19
+ />
20
+ <div className={((props.dividerClass) ? "py-8" : "py-6")}>
21
+ <Typography textStyle='sub1' className='text-neutral-1000'>{props.description}</Typography>
50
22
  </div>
51
-
52
23
  </div>
53
- <div className='pb-8'>
54
-
24
+ <div className=" self-end">
25
+ {
26
+ props.dividerClass && (
27
+ <div className={`${HDSColor(props.dividerClass)} mb-2`}></div>
28
+ )
29
+ }
30
+ <div className={"mb-s:flex items-start" + ((props.dividerClass) ? " pt-6" : "mt-0")}>
31
+ <div className={"border border-neutral-150 p-2 flex items-center justify-center rounded-2xl" + ((props.dividerClass) ? " w-[72px] h-[56px] min-w-[72px]" : " w-[112px] h-[90px] min-w-[112px]")}>
32
+ <img className="max-h-[20px]" src={props.brandImgUrl} alt={props.brandImgAlt}/>
33
+ </div>
34
+ <div className={"pt-4 mb-s:pt-0 " + ((props.dividerClass) ? "mb-s:pl-6" : "mb-s:pl-8")}>
35
+ <Typography textStyle={((props.dividerClass) ? "body2" : "body1")} className='text-neutral-600 pb-1'>{props.blurb}</Typography>
36
+ <a href={props.caseStudyUrl} className="flex">
37
+ <HDSButton
38
+ label='Read casestudy'
39
+ type='secondaryLink'
40
+ leftIconVariant='none'
41
+ rightIconVariant='none'
42
+ state='default'
43
+ size='md'
44
+ rightAnimatedArrow={true}
45
+ rightAnimatedArrowColor='#3970FD'
46
+ className='mt-0 justify-start'
47
+ btnTextColorClass='text-blue-500'
48
+ btnTextHoverClass= 'hover:text-blue-500'
49
+ animatedHoverStroke= 'group-hover:stroke-blue-500'
50
+ />
51
+ </a>
52
+ </div>
53
+ </div>
55
54
  </div>
56
-
57
-
58
55
  </div>
59
56
  )
60
57
  }
@@ -0,0 +1,27 @@
1
+ export default function imageBadgeCard (card){
2
+
3
+ return(
4
+ <>
5
+ <div className={`${HDSColor(card.cardBg)}bg-neutral-0 max-w-[700px] min-h-[245px] rounded-3xl p-8`}>
6
+ <div className='flex flex-row justify-between gap-4'>
7
+
8
+
9
+ <div className='max-w-[400px]'>
10
+
11
+ <Badges
12
+ color={card.badge.color}
13
+ children={card.badge.label}
14
+ text_color='text-neutral-0'
15
+ />
16
+ <Typography textStyle='h4' className='mt-2 text-neutral-1000'>{card.title}</Typography>
17
+ <Typography textStyle='sub2' className='mt-2 text-neutral-600'>{card.subTitle}</Typography>
18
+ </div>
19
+ <div>
20
+ <img src={card.imageUrl} alt={card.title} className='max-w-[290px] max-h-[181px]' />
21
+
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </>
26
+ )
27
+ }
@@ -25,16 +25,18 @@ export default function Testimonial(props) {
25
25
  const Card1 = () => {
26
26
  return (
27
27
  <>
28
- <div className={`${HDSColor(card.cardBg)} max-w-[220px] flex flex-col `}>
29
- <div className="mt-8">
30
- <div className="max-w-[64px] pt-8 pl-6">
31
- <img src="https://res.cloudinary.com/dh8fp23nd/image/upload/v1686737531/hasura-design-system/icons/optum_zn0bhw.png" alt="Card" className=" inline-block w-16 h-[18.52px]" />
28
+ <div className={`${HDSColor(card.cardBg)} bg-neutral-1000/40 rounded-2xl max-w-[220px] min-h-[441px] flex flex-col justify-between `}>
29
+ <div className="">
30
+ <div className=" pt-8 pl-6">
31
+ <img src="https://res.cloudinary.com/dh8fp23nd/image/upload/v1686737531/hasura-design-system/icons/optum_zn0bhw.png" alt="Card" className=" inline-block w-16 " />
32
32
  </div>
33
- <Typography textStyle='quote' className="mt-6 px-6">{card.subtitle}</Typography>
33
+
34
+
35
+ <div className="mt-6 px-6 font-petrona text-base font-normal text-neutral-0 ">{card.subtitle}</div>
34
36
  </div>
35
37
  <div className="pl-6 pb-8">
36
38
  <img
37
- className={` w-14 h-14 shadow rounded-full ${HDSColor(card.avatar.avatarBgColor)} rounded inline-block`}
39
+ className={` w-14 h-14 shadow rounded-full ${HDSColor(card.avatar['avatarBgColor'])} rounded inline-block`}
38
40
  alt='avatar'
39
41
  src={card.img_url}
40
42
  />
@@ -51,13 +53,13 @@ export default function Testimonial(props) {
51
53
 
52
54
  const Card2 = () => {
53
55
  return (
54
- <div className="">
55
- <div className={`${HDSColor(cardHover.cardBg)} max-w-[221px] justify-between h-[442px] flex flex-col`}>
56
+ <div className="max-h-[441px]">
57
+ <div className={`${HDSColor(cardHover.cardBg)} bg-blue-500 rounded-2xl max-w-[221px] justify-between h-[442px] flex flex-col`}>
56
58
  <div className=" ">
57
- <div className="max-w-[148px] pt-8 pl-6 ">
58
- <img src="https://res.cloudinary.com/dh8fp23nd/image/upload/v1685596743/website%20v3/capabilities-pre-footer_qxqlon.png" alt="Card" className=" inline-block max-w-[150px] h-[18.52px] pl-6 pr-12 pt-8" />
59
+ <div className="pt-8 pl-6 pr-12 ">
60
+ <img src="https://res.cloudinary.com/dh8fp23nd/image/upload/v1686760719/website%20v3/hascon_t5kwrf.png" alt="Card" className=" inline-block w-full" />
59
61
  </div>
60
- <Typography textStyle='quote' className="mt-6 px-6">{cardHover.title}</Typography>
62
+ <div className="mt-6 px-6 text-xl leading-[27px] font-semibold text-neutral-0">{cardHover.title}</div>
61
63
 
62
64
  </div>
63
65
  <div className="flex pb-8 pl-6 pt-5">
@@ -79,10 +81,11 @@ export default function Testimonial(props) {
79
81
 
80
82
  return (
81
83
  <div
82
- className={` ${isHovered ? '' : ''} max-w-[221px]`}
84
+ className={` ${isHovered ? '' : ''} max-w-[221px] rounded-2xl`}
83
85
  onMouseEnter={handleMouseEnter}
84
86
  onMouseLeave={handleMouseLeave}
85
87
  >
88
+
86
89
  <div className={`transition-all max-w-[220px] fixed ease-in-out duration-300 ${isHovered ? 'opacity-0 ' : 'opacity-100'}`}>
87
90
  <Card1 />
88
91
  </div>
@@ -95,10 +98,11 @@ export default function Testimonial(props) {
95
98
 
96
99
  Testimonial.defaultProps = {
97
100
  card: {
98
- cardBg: 'bg-green-400',
101
+ cardBg: '',
102
+ img_url: 'https://res.cloudinary.com/dh8fp23nd/image/upload/v1679302435/main-web/roadshow/nagaraja-nayak_l4xte5.png',
99
103
  title_img: "Optum",
100
104
  img_alt: 'optum',
101
- subtitle: '“It took just 100 days to get our new clinical platform running… We don’t think we could have achieved this unbelievable speed without Hasura.”',
105
+ subtitle: '“Optum goes from concept to production in 100 days with Hasura',
102
106
  avatar: {
103
107
  img_url: '',
104
108
  name: 'Nagaraja Nayak',
@@ -107,8 +111,8 @@ Testimonial.defaultProps = {
107
111
  }
108
112
  },
109
113
  cardHover: {
110
- cardBg: 'bg-yellow-500',
111
- img_url: '',
114
+ cardBg: 'bg-green-500',
115
+ img_url:'',
112
116
  img_alt: '',
113
117
  title: 'Optum goes from concept to production in 100 days with Hasura',
114
118
  button: {
@@ -1,28 +1,31 @@
1
1
  import React, { useState } from 'react';
2
+ import { Testimonial } from '../Testimonials';
2
3
 
3
4
  export default function HomeVC(props) {
4
-
5
-
6
5
  return (
7
6
  <>
8
-
9
7
  <div className='carouselShadow'>
10
8
  <div className='w-[643.51px] h-[472.64px] bg-base-1000 rounded-2xl flex flex-col items-center justify-center border-2 border-neutral-300'>
11
- <div className='w-[598.55px] h-[449.94px] border-x-2 border-neutral-800 bg-base-1000 rounded-lg grid grid-cols-2 '>
12
- <div className='relative bg-neutral-0 w-full h-full'></div>
13
- <div className='relative bg-yellow-100 w-[221px] justify-self-end h-full'></div>
14
- </div>
15
- <div className='w-[598.55px] h-[449.94px] border-x-2 border-neutral-800 bg-base-1000 rounded-lg grid grid-cols-2 '>
16
- <div className='relative bg-neutral-0 w-full h-full'></div>
17
- <div className='relative bg-yellow-100 w-[221px] justify-self-end h-full'></div>
18
- </div>
19
- <div className='w-[598.55px] h-[449.94px] border-x-2 border-neutral-800 bg-base-1000 rounded-lg grid grid-cols-2 '>
20
- <div className='relative bg-neutral-0 w-full h-full'></div>
21
- <div className='relative bg-yellow-100 w-[221px] justify-self-end h-full'></div>
22
- </div>
9
+ <div className='absolute'>
10
+ <div>
11
+ <video
12
+ autoPlay
13
+ loop
14
+ className="object-contain max-w-full max-h-full px-1"
15
+ src={props.video_url}
16
+ />
17
+ </div>
18
+ <div className='fixed top-[15px] left-[415px] filter-[16px]'>
23
19
 
20
+ <Testimonial {...props.testimonial}/>
21
+ </div>
22
+ </div>
24
23
  </div>
25
24
  {/* <div className='relative mx-auto top-[442.72px] w-[151.7px] h-[3.1px] bg-neutral-0/20' /> */}
26
25
  </div>
27
26
  </>)
27
+ }
28
+
29
+ HomeVC.defaultProps= {
30
+
28
31
  }
@@ -0,0 +1,193 @@
1
+ import React from "react";
2
+ import { useRef, useState } from "react";
3
+ import { Icon } from "../common-components/Icon";
4
+ import { HDSButton } from "../Buttons";
5
+ export default function CustomCarousel(props) {
6
+ const carouselRef = useRef(null); // Create a ref using useRef
7
+ const [currentCard, setCurrentCard] = React.useState(0);
8
+ const [touchStart, setTouchStart] = React.useState(0);
9
+ const [touchEnd, setTouchEnd] = React.useState(0);
10
+ const [showAllCards, setShowAllCards] = useState(false);
11
+
12
+ const handleTouchStart = e => {
13
+ setTouchStart(e.targetTouches[0].clientX);
14
+ };
15
+
16
+ const handleTouchMove = e => {
17
+ setTouchEnd(e.targetTouches[0].clientX);
18
+ };
19
+
20
+ const handleTouchEnd = () => {
21
+ if (touchStart - touchEnd > 150) {
22
+ nextCard();
23
+ }
24
+
25
+ if (touchStart - touchEnd < -150) {
26
+ previousCard();
27
+ }
28
+ };
29
+
30
+ const refs = props.cards.reduce((acc, val, i) => {
31
+ acc[i] = React.createRef();
32
+ return acc;
33
+ }, {});
34
+
35
+
36
+
37
+ const totalCards = props.cards.length;
38
+
39
+ const nextCard = () => {
40
+ let scrollByAmount = 1;
41
+
42
+ if (currentCard < totalCards - scrollByAmount) {
43
+ setCurrentCard(currentCard + scrollByAmount);
44
+ carouselRef.current.scrollTo({
45
+ left: carouselRef.current.scrollLeft + carouselRef.current.children[0].offsetWidth * scrollByAmount,
46
+ behavior: "smooth",
47
+ });
48
+ }
49
+ else {
50
+ setCurrentCard(0);
51
+ carouselRef.current.scrollTo({
52
+ left: 0,
53
+ behavior: "smooth",
54
+ });
55
+ }
56
+ };
57
+
58
+ const previousCard = () => {
59
+ let scrollByAmount = 1;
60
+
61
+ if (currentCard > 0) {
62
+ setCurrentCard(currentCard - scrollByAmount);
63
+ carouselRef.current.scrollTo({
64
+ left: carouselRef.current.scrollLeft - carouselRef.current.children[0].offsetWidth * scrollByAmount,
65
+ behavior: "smooth",
66
+ });
67
+ } else {
68
+ const lastCardIndex = totalCards - 1;
69
+ const scrollLeft = carouselRef.current.scrollWidth - carouselRef.current.children[0].offsetWidth * scrollByAmount;
70
+ setCurrentCard(lastCardIndex);
71
+ carouselRef.current.scrollTo({
72
+ left: scrollLeft,
73
+ behavior: "smooth",
74
+ });
75
+ }
76
+ };
77
+
78
+ const maxVisibleCards = 6;
79
+
80
+ const arrowStyle = ' text-2xl z-10 bg-black h-10 ml-6 w-10 rounded-full bg-neutral-0 shadow hover:bg-neutral-0 flex items-center justify-center';
81
+
82
+ const sliderControl = isLeft => (
83
+ <button
84
+ type="button"
85
+ onClick={isLeft ? previousCard : nextCard}
86
+ className={`flex ${arrowStyle} ${isLeft ? '' : ''}`}
87
+
88
+ >
89
+ <span role="img" aria-label={`Arrow ${isLeft ? 'left' : 'right'}`}>
90
+ {isLeft ?
91
+
92
+ <Icon height={'h-6 w-6'} variant={'chevronleft'} strokeColor='#00288E' />
93
+
94
+ :
95
+
96
+ <Icon height={'h-6 w-6'} variant={'chevronright'} strokeColor='#00288E' />
97
+
98
+ }
99
+ </span>
100
+ </button>
101
+ );
102
+ return (
103
+ <div className="">
104
+ <div className="block tb:hidden">
105
+ {showAllCards
106
+ ? props.cards.map((item, i) => (
107
+ <div className="my-5" key={i} ref={refs[i]}>
108
+ <div className="rounded-3xl overflow-hidden">
109
+ {React.createElement(props.component, item)}
110
+ </div>
111
+ </div>
112
+ ))
113
+ : props.cards.slice(0, maxVisibleCards).map((item, i) => (
114
+ <div className="my-5" key={i} ref={refs[i]}>
115
+ <div className="rounded-3xl overflow-hidden">
116
+ {React.createElement(props.component, item)}
117
+ </div>
118
+ </div>
119
+ ))}
120
+ {props.cards.length > maxVisibleCards && (
121
+ <div className="flex">
122
+ <HDSButton
123
+ label={showAllCards ? "View less" : "View more"}
124
+ type='secondary'
125
+ leftIconVariant='none'
126
+ rightIconVariant='none'
127
+ state='default'
128
+ size='sm'
129
+ rightAnimatedArrow={true}
130
+ rightAnimatedArrowColor='#1E56E3'
131
+ animatedHoverStroke='group-hover:stroke-neutral-0'
132
+ className='flex'
133
+ btnTextColorClass='text-blue-600'
134
+ btnBgColorClass=''
135
+ onClick={() => setShowAllCards(!showAllCards)}
136
+ />
137
+ {/* <button
138
+ className="text-blue-500 mt-1 cursor-pointer"
139
+ onClick={() => setShowAllCards(!showAllCards)}
140
+ >
141
+ {showAllCards ? "View less" : "View more"}
142
+ </button> */}
143
+ </div>
144
+ )}
145
+ </div>
146
+
147
+
148
+ <div className="hidden tb:flex tb:flex-col-reverse">
149
+ <div className="flex items-center justify-center mt-10">
150
+ {/* {slider()} */}
151
+ <div className="flex">
152
+ {sliderControl(true)}
153
+ {sliderControl()}
154
+ </div>
155
+ </div>
156
+ <div className="justify-center select-none items-center"
157
+ onTouchStart={handleTouchStart}
158
+ onTouchMove={handleTouchMove}
159
+ onTouchEnd={handleTouchEnd}
160
+ onMouseDown={e => setTouchStart(e.clientX)}
161
+ onMouseUp={e => {
162
+ if (touchStart - e.clientX > 50) {
163
+ nextCard();
164
+ }
165
+
166
+ if (touchStart - e.clientX < -50) {
167
+ previousCard();
168
+ }
169
+ }}
170
+ >
171
+ <div className="">
172
+ <div className={`snap-x w-full inline-flex select-none overflow-x-hidden scrollbar-hide`}
173
+ ref={carouselRef}
174
+ >
175
+
176
+ {props.cards.map((item, i) => (
177
+ // <div className="max-[1140px]:snap-always tb:snap-always mx-5 max-[1140px]:shrink-0" key={i} ref={refs[i]}>
178
+ <div className=" snap-center mx-5 shrink-0" key={i} ref={refs[i]}>
179
+ <div className="w-full select-none rounded-3xl object-contain">
180
+ {React.createElement(props.component, item)}
181
+ </div>
182
+
183
+ </div>
184
+ ))}
185
+
186
+ </div>
187
+ </div>
188
+ </div>
189
+ </div>
190
+
191
+ </div>
192
+ );
193
+ };