@adminide-stack/yantra-help-browser 12.0.16-alpha.25 → 12.0.16-alpha.26
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../src/components/Logo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAC;
|
|
1
|
+
{"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../src/components/Logo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAC;AASzF,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAwIrC,CAAC"}
|
package/lib/components/Logo.js
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import {jsxs,jsx}from'react/jsx-runtime';import {useParams}from'@remix-run/react'
|
|
2
|
-
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import {useParams,useLocation}from'@remix-run/react';/**
|
|
2
|
+
* Routes that have a dark hero section behind the header.
|
|
3
|
+
* On these pages, the logo can safely use white fill before scrolling.
|
|
4
|
+
*/
|
|
5
|
+
const DARK_HERO_ROUTES = ['/', '/landing', '/help-center', '/get-started'];
|
|
6
|
+
const Logo = props => {
|
|
7
|
+
useParams();
|
|
8
|
+
const loc = useLocation();
|
|
3
9
|
const {
|
|
4
10
|
settings,
|
|
5
11
|
logo,
|
|
6
12
|
scrolled,
|
|
7
13
|
location
|
|
8
14
|
} = props;
|
|
9
|
-
const
|
|
15
|
+
const pathname = loc?.pathname || location?.pathname || '/';
|
|
16
|
+
const hasDarkHero = DARK_HERO_ROUTES.includes(pathname);
|
|
17
|
+
const fill = !scrolled && hasDarkHero ? '#fff' : settings?.navTheme === 'dark' ? '#fff' : 'black';
|
|
10
18
|
return jsxs("svg", {
|
|
11
19
|
version: "1.1",
|
|
12
20
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.js","sources":["../../src/components/Logo.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Logo.js","sources":["../../src/components/Logo.tsx"],"sourcesContent":[null],"names":[],"mappings":"8FAIA;;;AAGG;AACH,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,CAAC;AAE7D,MAAA,IAAI,GAAyB,KAAC,IAAS;AAChD,EAAY,SAAY;AACxB,EAAA,MAAA,GAAS,GAAA,WAAc,EAAA;QACjB;IACN,QAAM;IACN,IAAM;IACN,QAAM;AAEN,IAAA;;;mBAce,GAAI,gBAAA,CAAA,QAAA,CAAA,QAAA,CAAA;;;;;;;;;;;UAYH,EAAA;AAsGpB,MAAE,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/navbar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/navbar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAqBxC,UAAU,kBAAkB;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAsFtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -11,14 +11,20 @@ import {jsxs,jsx}from'react/jsx-runtime';import {useState}from'react';import {us
|
|
|
11
11
|
label: 'Help Center',
|
|
12
12
|
path: '/help-center'
|
|
13
13
|
}];
|
|
14
|
+
/**
|
|
15
|
+
* Routes that have a dark hero section behind the header.
|
|
16
|
+
* On these pages, the nav text can safely use white color before scrolling.
|
|
17
|
+
*/
|
|
18
|
+
const DARK_HERO_ROUTES = ['/', '/landing', '/help-center', '/get-started'];
|
|
14
19
|
const RightNavItems = ({
|
|
15
20
|
scrolled = false
|
|
16
21
|
}) => {
|
|
17
22
|
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
18
23
|
const location = useLocation();
|
|
19
|
-
|
|
24
|
+
useParams();
|
|
20
25
|
const isActive = path => location.pathname === path;
|
|
21
|
-
const
|
|
26
|
+
const hasDarkHero = DARK_HERO_ROUTES.includes(location.pathname);
|
|
27
|
+
const isDark = !scrolled && hasDarkHero;
|
|
22
28
|
return jsxs("div", {
|
|
23
29
|
className: `flex items-center justify-between ${isDark ? 'text-white' : 'text-foreground'}`,
|
|
24
30
|
children: [jsxs("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/navbar/index.tsx"],"sourcesContent":[null],"names":["_jsxs"],"mappings":"gIASA,MAAM,QAAQ,GAAc,CAAA;KACtB,EAAA,MAAK;OACL,EAAG,MAAE;MACL,EAAA;CACL,EAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/navbar/index.tsx"],"sourcesContent":[null],"names":["_jsxs"],"mappings":"gIASA,MAAM,QAAQ,GAAc,CAAA;KACtB,EAAA,MAAK;OACL,EAAG,MAAE;MACL,EAAA;CACL,EAAC;AAEF,EAAA,GAAA,EAAA,aAAA;;;AAGG,CAAA,EAAA;AACH,EAAM,GAAA,EAAA,aAAA;AAMN,EAAM,KAAC,EAAM,aAAA;MACH,EAAA;AACN,CAAA,CAAA;AACA;AAEA;;AAEA;MAEO,gBACE,GAAA,CAAA,GAAA,EAAA,UAAW,EAAA,cAAA,EAAA,cAAA,CAAA;AAUY,MAAA,aAAA,GAAA,CAAA;AACI,EAAA,QAAA,GAAA;AACA,CAAA,KAAA;AACJ,EAAA,MAAA,CAAA,UAAA,EAAA,aAAE,CAAM,GAAA,QAAA,CAAA,KAAA,CAAA;AACN,EAAA,MAAA,QAAA,GAAA,WAAA,EAAA;AACA,EAAA,SAAA;AA+CE,EAAA,MAAA,QAAA,GAAA,IAAA,IAAA,QAAoE,CAAA,QAAA,KAAA,IAAA;AACpE,EAAA,MAAA,WAAA,GAAA,gBACR,CAAA,QAAA,CAAA,QAAA,CAAA,QAAA,CAAA;AAYhC,EAAE,MAAA,MAAA,GAAA,CAAA,QAAA,IAAA,WAAA;AAEF,EAAA,OAAAA,IAAA,CAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminide-stack/yantra-help-browser",
|
|
3
|
-
"version": "12.0.16-alpha.
|
|
3
|
+
"version": "12.0.16-alpha.26",
|
|
4
4
|
"description": "Sample core for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "Yantra App",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"typescript": {
|
|
72
72
|
"definition": "lib/index.d.ts"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "d9192652b52237b62a54633dff3ae1d3f51c9916"
|
|
75
75
|
}
|