hds-web 1.32.5 → 1.32.7

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hds-web",
3
- "version": "1.32.5",
3
+ "version": "1.32.7",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -31,11 +31,11 @@ export default function V3Header(props) {
31
31
  const [currentTab, setCurrentTab] = useState('')
32
32
  const [isShown, setIsShown] = useState(false)
33
33
  const [isArrowActive, setIsArrowActive] = useState(false)
34
- const signUpLink = 'https://cloud.hasura.io/signup?pg=sample-apps&plcmt=header&cta=try-hasura&tech=default';
35
- const logInLink = 'https://cloud.hasura.io/login?pg=sample-apps&plcmt=header&cta=log-in&tech=default'
34
+ const signUpLink = props.signUpLink ? props.signUpLink :'https://cloud.hasura.io/signup?pg=sample-apps&plcmt=header&cta=try-hasura&tech=default';
35
+ const logInLink = props.logInLink ? props.logInLink :'https://cloud.hasura.io/login?pg=sample-apps&plcmt=header&cta=log-in&tech=default'
36
36
  const signupURL = updatePGParam(signUpLink, props.website_key)
37
37
  const loginURL = updatePGParam(logInLink, props.website_key)
38
-
38
+ const hideLoginButton = props.hideLoginButton;
39
39
  //testing
40
40
  const [dropdownVisibility, setDropdownVisibility] = useState(Array(props.HEADER_LIST.length).fill(false));
41
41
  const handleDropdownEnter = (index) => {
@@ -323,7 +323,7 @@ export default function V3Header(props) {
323
323
  Contact Sales
324
324
  </Typography>
325
325
  </a>
326
- <a href={loginURL} >
326
+ {!hideLoginButton && <a href={loginURL} >
327
327
  <HDSButton
328
328
  label="Log In"
329
329
  type='tonal'
@@ -336,7 +336,7 @@ export default function V3Header(props) {
336
336
  animatedHoverStroke='group-hover:stroke-neutral-0'
337
337
  className='hds-hidden tb-l:flex'
338
338
  />
339
- </a>
339
+ </a>}
340
340
  <a href={signupURL}>
341
341
 
342
342
  <HDSButton
@@ -355,7 +355,7 @@ export default function V3Header(props) {
355
355
  </div>
356
356
 
357
357
  </div>
358
-
358
+ {/* mobile */}
359
359
  <div className="hds-hidden-tbl overflow-auto flex ">
360
360
  {/* <Popover.Button className="inline-flex items-center justify-center rounded-md bg-white pl-6 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500">
361
361
  <span className="sr-only">Open menu</span> */}
@@ -454,7 +454,7 @@ export default function V3Header(props) {
454
454
 
455
455
  <div className='flex flex-row justify-around'>
456
456
  <div className='w-full flex gap-2'>
457
- <a href={loginURL} className='w-1/2'>
457
+ {!hideLoginButton && <a href={loginURL} className='w-1/2'>
458
458
  <HDSButton
459
459
  label="Log In"
460
460
  type='tonal'
@@ -467,8 +467,8 @@ export default function V3Header(props) {
467
467
  animatedHoverStroke='group-hover:stroke-neutral-0'
468
468
  className=' !w-full'
469
469
  />
470
- </a>
471
- <a href={signupURL} className='w-1/2'>
470
+ </a>}
471
+ <a href={signupURL} className={!hideLoginButton ? 'w-1/2' : 'w-full'}>
472
472
  <HDSButton
473
473
  label="Get Started"
474
474
  type='primary'
@@ -495,6 +495,7 @@ export default function V3Header(props) {
495
495
  }
496
496
 
497
497
  V3Header.defaultProps = {
498
+ hideLoginButton:false,
498
499
  hideSearch:false,
499
500
  HEADER_LIST: [
500
501
  {
@@ -25,14 +25,14 @@ const tabCard = (Content) => (
25
25
  }
26
26
  {
27
27
  Content.buttons && (
28
- <div className='flex items-center flex-wrap flex-row gap-2'>
28
+ <div className='flex items-center flex-wrap flex-row gap-2 pt-6'>
29
29
  {Content.buttons.map((btn, index) => (
30
30
  <Fragment key={index}>
31
31
  {btn.url && btn.text && btn.type && (
32
- <a href={btn.url} key={index} className='flex pt-6'>
32
+ <a href={btn.url} key={index} className='flex '>
33
33
  <HDSButton
34
34
  label={btn.text}
35
- type={ btn.type}
35
+ type={btn.type}
36
36
  leftIconVariant='none'
37
37
  rightIconVariant='none'
38
38
  state='default'
@@ -47,8 +47,8 @@ const tabCard = (Content) => (
47
47
  btnbgHoverClass={btn.btnBgColorClass}
48
48
  />
49
49
  </a>)}
50
- </Fragment>
51
- ))
50
+ </Fragment>
51
+ ))
52
52
  }
53
53
  </div>
54
54
  )
@@ -57,91 +57,91 @@ const tabCard = (Content) => (
57
57
  )
58
58
 
59
59
  export default function HeroLinkCard(props) {
60
- const [showVideo, setShowVideo] = useState(false);
61
- if (!props) {
62
- return <div></div>; // Replace with your loading indicator or fallback UI
63
- }
64
- const LinkCardsFn = (props) => {
65
- return (
66
- props.linkCards && (
67
- <div className="flex tb-m:justify-center overflow-auto no-scrollbar db:overflow-visible scrollbar-hide flex-row mt-10 tb:mt-12 db:mt-16 gap-6 tb:flex-row ">
68
- {props.linkCards.map((card, index) => (
69
- <div key={index} className={`${HDSColor(card.cardBorderClass)} ${HDSColor(card.cardBgColor)} ${HDSColor(card.cardHoverBg)} transition-all ease-out duration-300 hover:shadow-2xl hover:border-opacity-0 border rounded-2xl w-full min-w-[11.5rem] max-w-[22.313rem]`}>
70
- <LinkCard
71
- titleTextColor={card.titleTextColor}
72
- descTextColor={card.descTextColor}
73
- linkUrl={card.linkUrl}
74
- iconVariant={card.iconVariant}
75
- iconStrokeClass={card.iconStrokeColor}
76
- iconArrowVariant={card.iconArrowVariant}
77
- iconArrowStrokeClass={card.iconArrowStrokeColor}
78
- title={card.title}
79
- description={card.description}
80
- />
81
- </div>
82
- ))}
83
- </div>
84
- )
85
- );
86
- };
87
-
88
-
60
+ const [showVideo, setShowVideo] = useState(false);
61
+ if (!props) {
62
+ return <div></div>; // Replace with your loading indicator or fallback UI
63
+ }
64
+ const LinkCardsFn = (props) => {
89
65
  return (
90
- <div>
91
- <div className="flex flex-col-reverse tb:flex tb:flex-row tb:justify-between">
92
- <div className={`tb:w-1/2 db:max-w-[${props.contentWd ? props.contentWd : '535px'}]`}>
93
- {props &&
94
- tabCard(props)}
95
- </div>
96
- <div className="grid items-center relative db:max-w-[500px] tb:w-1/2 transition-opacity duration-700 ease-linear ">
97
- <Typography
98
- textStyle="h2"
99
- as="h2"
100
- className={`tb:hidden pb-6 ${props.titleTextColor ? HDSColor(props.titleTextColor) : 'text-neutral-1000'}`}
101
- >
102
- {props.title}
103
- </Typography>
104
- {showVideo ? (
105
- <>
106
- {props.videoUrl && (
107
- <video
108
- id="hero_vid"
109
- controls={true}
110
- autoPlay
111
- playsInline
112
- width="500"
113
- height="500"
114
- className="tb:w-full w-full rounded-3xl"
115
- src={props.videoUrl}
116
- ></video>
117
- )}
118
- </>
119
- ) : (
120
- <div className="relative">
121
- {props.imgUrl && (
122
- <img src={props.imgUrl} alt="Illustration" loading="lazy" />
123
- )}
124
- {props.videoUrl && (
125
- <div
126
- className={`${props.currentPlayBtnClass} w-14 h-14 cursor-pointer video-play-btn rounded-full flex items-center justify-center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 shadow-neutral-1000 shadow-2xl`}
127
- onClick={() => setShowVideo(true)}
128
- >
129
- <Icon
130
- variant="play"
131
- height="h-6 w-6"
132
- strokeColor="#ffffff"
133
- strokeClass="stroke-neutral-0"
134
- />
135
- </div>
136
- )}
137
- </div>
138
- )}
139
- </div>
66
+ props.linkCards && (
67
+ <div className="flex tb-m:justify-center overflow-auto no-scrollbar db:overflow-visible scrollbar-hide flex-row mt-10 tb:mt-12 db:mt-16 gap-6 tb:flex-row ">
68
+ {props.linkCards.map((card, index) => (
69
+ <div key={index} className={`${HDSColor(card.cardBorderClass)} ${HDSColor(card.cardBgColor)} ${HDSColor(card.cardHoverBg)} transition-all ease-out duration-300 hover:shadow-2xl hover:border-opacity-0 border rounded-2xl w-full min-w-[11.5rem] max-w-[22.313rem]`}>
70
+ <LinkCard
71
+ titleTextColor={card.titleTextColor}
72
+ descTextColor={card.descTextColor}
73
+ linkUrl={card.linkUrl}
74
+ iconVariant={card.iconVariant}
75
+ iconStrokeClass={card.iconStrokeColor}
76
+ iconArrowVariant={card.iconArrowVariant}
77
+ iconArrowStrokeClass={card.iconArrowStrokeColor}
78
+ title={card.title}
79
+ description={card.description}
80
+ />
81
+ </div>
82
+ ))}
140
83
  </div>
84
+ )
85
+ );
86
+ };
87
+
141
88
 
142
- <div className="">
143
- {LinkCardsFn(props)}
89
+ return (
90
+ <div>
91
+ <div className="flex flex-col-reverse tb-l:flex tb-l:flex-row tb-l:justify-between gap-4">
92
+ <div className={`max-w-[435px] db:max-w-[${props.contentWd ? props.contentWd : '535px'}]`}>
93
+ {props &&
94
+ tabCard(props)}
95
+ </div>
96
+ <div className="grid items-center relative db:max-w-[500px] tb:w-1/2 transition-opacity duration-700 ease-linear ">
97
+ <Typography
98
+ textStyle="h2"
99
+ as="h2"
100
+ className={`tb:hidden pb-6 ${props.titleTextColor ? HDSColor(props.titleTextColor) : 'text-neutral-1000'}`}
101
+ >
102
+ {props.title}
103
+ </Typography>
104
+ {showVideo ? (
105
+ <>
106
+ {props.videoUrl && (
107
+ <video
108
+ id="hero_vid"
109
+ controls={true}
110
+ autoPlay
111
+ playsInline
112
+ width="500"
113
+ height="500"
114
+ className="tb:w-full w-full rounded-3xl"
115
+ src={props.videoUrl}
116
+ ></video>
117
+ )}
118
+ </>
119
+ ) : (
120
+ <div className="relative">
121
+ {props.imgUrl && (
122
+ <img src={props.imgUrl} alt="Illustration" loading="lazy" />
123
+ )}
124
+ {props.videoUrl && (
125
+ <div
126
+ className={`${props.currentPlayBtnClass} w-14 h-14 cursor-pointer video-play-btn rounded-full flex items-center justify-center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 shadow-neutral-1000 shadow-2xl`}
127
+ onClick={() => setShowVideo(true)}
128
+ >
129
+ <Icon
130
+ variant="play"
131
+ height="h-6 w-6"
132
+ strokeColor="#ffffff"
133
+ strokeClass="stroke-neutral-0"
134
+ />
135
+ </div>
136
+ )}
137
+ </div>
138
+ )}
144
139
  </div>
145
140
  </div>
146
- );
141
+
142
+ <div className="">
143
+ {LinkCardsFn(props)}
144
+ </div>
145
+ </div>
146
+ );
147
147
  }
@@ -2193,6 +2193,10 @@ select{
2193
2193
  max-width: 430px;
2194
2194
  }
2195
2195
 
2196
+ .max-w-\[435px\]{
2197
+ max-width: 435px;
2198
+ }
2199
+
2196
2200
  .max-w-\[44\.44rem\]{
2197
2201
  max-width: 44.44rem;
2198
2202
  }
@@ -3494,10 +3498,6 @@ select{
3494
3498
  border-top-color: rgb(229 231 235 / var(--tw-border-opacity));
3495
3499
  }
3496
3500
 
3497
- .border-opacity-0{
3498
- --tw-border-opacity: 0;
3499
- }
3500
-
3501
3501
  .bg-amber-100{
3502
3502
  --tw-bg-opacity: 1;
3503
3503
  background-color: rgb(255 243 212 / var(--tw-bg-opacity));
@@ -12998,19 +12998,6 @@ select{
12998
12998
  max-width: 420px;
12999
12999
  }
13000
13000
 
13001
- .\[\&\>p\>strong\]\:my-2>p>strong{
13002
- margin-top: 0.5rem;
13003
- margin-bottom: 0.5rem;
13004
- }
13005
-
13006
- .\[\&\>p\>strong\]\:mt-2>p>strong{
13007
- margin-top: 0.5rem;
13008
- }
13009
-
13010
- .\[\&\>p\>strong\]\:pt-2>p>strong{
13011
- padding-top: 0.5rem;
13012
- }
13013
-
13014
13001
  .\[\&\>p\]\:pb-1>p{
13015
13002
  padding-bottom: 0.25rem;
13016
13003
  }