hds-web 1.37.7 → 1.37.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hds-web",
3
- "version": "1.37.7",
3
+ "version": "1.37.9",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -22,26 +22,43 @@ const updatePGParam = (originalLink, websiteKey) => {
22
22
 
23
23
  export default function V3Header(props) {
24
24
  const listSize = props.HEADER_LIST.length;
25
+
25
26
  const [mobileNavOpen, setmobileNavOpen] = useState(false);
27
+
26
28
  const [isProduct, setIsProduct] = useState(false);
29
+
27
30
  const [isDeveloper, setIsDeveloper] = useState(false);
31
+
28
32
  const [isCompany, setIsCompany] = useState(false);
33
+
29
34
  const [currentTab, setCurrentTab] = useState("");
35
+
30
36
  const [isShown, setIsShown] = useState(false);
37
+
31
38
  const [isArrowActive, setIsArrowActive] = useState(false);
39
+
32
40
  const signUpLink = props.signUpLink
33
41
  ? props.signUpLink
34
42
  : "https://cloud.hasura.io/signup?pg=sample-apps&plcmt=header&cta=try-hasura&tech=default";
43
+
35
44
  const logInLink = props.logInLink
36
45
  ? props.logInLink
37
46
  : "https://cloud.hasura.io/login?pg=sample-apps&plcmt=header&cta=log-in&tech=default";
47
+
38
48
  const signupURL = updatePGParam(signUpLink, props.website_key);
49
+
39
50
  const loginURL = updatePGParam(logInLink, props.website_key);
51
+
40
52
  const hideLoginButton = props.hideLoginButton;
53
+
54
+ // const isDarkMode = true;
55
+ const isDarkMode = props?.isDarkMode;
56
+
41
57
  //testing
42
58
  const [dropdownVisibility, setDropdownVisibility] = useState(
43
59
  Array(props.HEADER_LIST.length).fill(false)
44
60
  );
61
+
45
62
  const handleDropdownEnter = (index) => {
46
63
  setDropdownVisibility((prevVisibility) => {
47
64
  const updatedVisibility = [...prevVisibility];
@@ -95,12 +112,20 @@ export default function V3Header(props) {
95
112
  <div
96
113
  className={classNames(
97
114
  "group inline-flex items-center rounded-md bg-white hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",
98
- dropdownVisibility[id] ? "" : "text-gray-500"
115
+ dropdownVisibility[id]
116
+ ? ""
117
+ : isDarkMode
118
+ ? "text-neutral-0"
119
+ : "text-gray-500"
99
120
  )}
100
121
  >
101
122
  <div className="flex flex-col items-center cursor-pointer">
102
123
  <Typography
103
- className="hover:text-blue-600"
124
+ className={
125
+ isDarkMode
126
+ ? "text-neutral-0 hover:text-blue-600"
127
+ : "hover:text-blue-600"
128
+ }
104
129
  textStyle="body3c-medium"
105
130
  >
106
131
  {`${title} `}
@@ -150,7 +175,11 @@ export default function V3Header(props) {
150
175
  {
151
176
  <a href="/customers">
152
177
  <Typography
153
- className="hover:text-blue-600 cursor-pointer"
178
+ className={
179
+ isDarkMode
180
+ ? "text-neutral-0 hover:text-blue-600 cursor-pointer"
181
+ : "hover:text-blue-600 cursor-pointer"
182
+ }
154
183
  textStyle="body3c-medium"
155
184
  >
156
185
  {`Customers `}
@@ -162,7 +191,11 @@ export default function V3Header(props) {
162
191
  {
163
192
  <a href="/pricing">
164
193
  <Typography
165
- className="hover:text-blue-600 cursor-pointer"
194
+ className={
195
+ isDarkMode
196
+ ? "text-neutral-0 hover:text-blue-600 cursor-pointer"
197
+ : "hover:text-blue-600 cursor-pointer"
198
+ }
166
199
  textStyle="body3c-medium"
167
200
  >
168
201
  {`Pricing `}
@@ -278,6 +311,10 @@ export default function V3Header(props) {
278
311
 
279
312
  // **************************** //
280
313
 
314
+ const logoUrl = isDarkMode
315
+ ? `https://res.cloudinary.com/dh8fp23nd/image/upload/v1718878031/hasura_dark_mode_kjrlxi.svg`
316
+ : `https://res.cloudinary.com/dh8fp23nd/image/upload/v1686659126/website%20v3/hasura-primary_y9cdnn.svg`;
317
+
281
318
  return (
282
319
  <div className="relative mx-auto">
283
320
  <div
@@ -288,10 +325,10 @@ export default function V3Header(props) {
288
325
  <div className="flex flex-row justify-between items-center w-full tb-l:w-fit">
289
326
  <div>
290
327
  <a href={props.headerUrl} className={"flex items-center"}>
291
- <Icon
292
- height="w-[103px] h-[33px]"
293
- variant={"hasuraPrimary"}
294
- strokeColor={""}
328
+ <img
329
+ className="min-w-[103px] w-[103px] h-[33px]"
330
+ src={logoUrl}
331
+ alt={props.brandAlt}
295
332
  />
296
333
  </a>
297
334
  </div>
@@ -330,11 +367,17 @@ export default function V3Header(props) {
330
367
  {headerListfunction(props.HEADER_LIST)}
331
368
  </nav>
332
369
  <div className="hds-hidden tb-l:flex flex-row items-center gap-x-4 ">
333
- {!props.hideSearch && <AlgoliaSearch {...props} />}
370
+ {!props.hideSearch && (
371
+ <AlgoliaSearch isDarkMode={isDarkMode} {...props} />
372
+ )}
334
373
  <a href="/contact-us" className="hds-hidden db:flex">
335
374
  <Typography
336
375
  textStyle="body3c-medium"
337
- className="text-neutral-800 hover:text-blue-600"
376
+ className={
377
+ isDarkMode
378
+ ? "text-neutral-0 hover:text-blue-600"
379
+ : "text-neutral-800 hover:text-blue-600"
380
+ }
338
381
  >
339
382
  Contact Us
340
383
  </Typography>
@@ -35,11 +35,15 @@ export default function Search(props) {
35
35
  setShowSearch((preShowSearch) => !preShowSearch);
36
36
  }}
37
37
  >
38
- <p className="-mt-1">/ </p>
38
+ <p className={props?.isDarkMode ? "-mt-1 text-neutral-0" : "-mt-1"}>
39
+ /{" "}
40
+ </p>
39
41
  <Icon
40
42
  height={"h-4 w-4 stroke-2"}
41
43
  variant={`searchsm`}
42
- strokeClass="stroke-neutral-1000"
44
+ strokeClass={
45
+ props?.isDarkMode ? "stroke-neutral-0" : "stroke-neutral-1000"
46
+ }
43
47
  />
44
48
  </div>
45
49
  </div>
@@ -2118,6 +2118,10 @@ select{
2118
2118
  min-width: 100%;
2119
2119
  }
2120
2120
 
2121
+ .min-w-\[103px\]{
2122
+ min-width: 103px;
2123
+ }
2124
+
2121
2125
  .max-w-2xl{
2122
2126
  max-width: 42rem;
2123
2127
  }