@julseb-lib/react 0.0.2 → 0.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.
package/dist/index.umd.js CHANGED
@@ -3839,7 +3839,7 @@ React keys must be passed directly to JSX without using spread:
3839
3839
  right: 0;
3840
3840
  }
3841
3841
  `;default:return null}}}
3842
- `;_([V6,D6,T6]);const I9=n.forwardRef(({"data-testid":l,as:c,children:e,className:t,isOpen:h,setIsOpen:d,enableScrollingOpen:f,disableEsc:i,backgroundColor:r="primary",contentColor:o="background",linksColor:z="background",gap:p="s",width:v="30vw",zIndex:k=998,overlayColor:b="black-80",position:g="right",padding:A="l",...H},y)=>{n.useEffect(()=>{h&&!f?C.disableScroll():C.enableScroll()},[h]);const R=()=>{d(!1),C.enableScroll()};return J2("Escape",()=>{!i&&h&&R()}),a.jsxs(V6,{"data-testid":l,ref:y,as:c,className:O(t,{Open:h}),$zIndex:k,...H,children:[a.jsx(D6,{"data-testid":l&&`${l}.Overlay`,onClick:R,className:O({DrawerOverlay:t},{Open:h}),$overlayColor:b}),a.jsx(T6,{"data-testid":l&&`${l}.Content`,className:O({DrawerContent:t},{Open:h}),$gap:p,$backgroundColor:r,$contentColor:o,$linksColor:z,$width:v,$position:g,$padding:A,children:e})]})});function N9({children:l,isLoading:c,pageLoading:e,titleLoading:t,helmet:h,header:d,footer:f,noWrapper:i,wrapper:r,template:o="single",main:z,mainMinHeight:p="85vh"}){return a.jsxs(a.Fragment,{children:[h&&a.jsx(N6,{...h,title:c&&t?t:h.title}),c?a.jsx(P5,{...e}):a.jsxs(a.Fragment,{children:[d&&a.jsx(x6,{...d}),i?l:a.jsx(N1,{className:"wrapper",...r,children:o==="single"?a.jsx(D1,{className:"main",minHeight:p,...z,children:l}):l}),f&&a.jsx(I6,{...f})]}),a.jsx(E6,{})]})}const G6=m.div`
3842
+ `;_([V6,D6,T6]);const I9=n.forwardRef(({"data-testid":l,as:c,children:e,className:t,isOpen:h,setIsOpen:d,enableScrollingOpen:f,disableEsc:i,backgroundColor:r="primary",contentColor:o="background",linksColor:z="background",gap:p="s",width:v="30vw",zIndex:k=998,overlayColor:b="black-80",position:g="right",padding:A="l",...H},y)=>{n.useEffect(()=>{h&&!f?C.disableScroll():C.enableScroll()},[h]);const R=()=>{d(!1),C.enableScroll()};return J2("Escape",()=>{!i&&h&&R()}),a.jsxs(V6,{"data-testid":l,ref:y,as:c,className:O(t,{Open:h}),$zIndex:k,...H,children:[a.jsx(D6,{"data-testid":l&&`${l}.Overlay`,onClick:R,className:O({DrawerOverlay:t},{Open:h}),$overlayColor:b}),a.jsx(T6,{"data-testid":l&&`${l}.Content`,className:O({DrawerContent:t},{Open:h}),$gap:p,$backgroundColor:r,$contentColor:o,$linksColor:z,$width:v,$position:g,$padding:A,children:e})]})});function N9({children:l,isLoading:c,pageLoading:e,titleLoading:t,helmet:h,header:d,footer:f,noWrapper:i,wrapper:r,template:o="single",main:z,mainMinHeight:p="85vh"}){return a.jsxs(a.Fragment,{children:[h&&a.jsx(N6,{...h,title:c&&t?t:h.title}),c?a.jsx(P5,{...e}):a.jsxs(a.Fragment,{children:[d&&a.jsx(x6,{...d,children:(d==null?void 0:d.nav)&&(d==null?void 0:d.nav)}),i?l:a.jsx(N1,{className:"wrapper",...r,children:o==="single"?a.jsx(D1,{className:"main",minHeight:p,...z,children:l}):l}),f&&a.jsx(I6,{...f})]}),a.jsx(E6,{})]})}const G6=m.div`
3843
3843
  ${({$gap:l})=>s.Flexbox({$flexDirection:"column",$alignItems:"stretch",$gap:l})}
3844
3844
  ${({$border:l})=>s.Border(l)};
3845
3845
  ${({$padding:l})=>s.Padding(l)};
@@ -19,7 +19,7 @@ import type { ILibPageLayout } from "./types"
19
19
  * @prop titleLoading?: string
20
20
  * @prop pageLoading?: ILibPageLoading => imported from PageLoading component
21
21
  * @prop helmet?: ILibHelmet => imported from Helmet component
22
- * @prop header?: ILibHeader => imported from Header component
22
+ * @prop header?: ILibHeader & { nav?: JSX.Element } => imported from Header component
23
23
  * @prop footer?: ILibFooter => imported from Footer component
24
24
  * @prop wrapper?: ILibWrapper => imported from Wrapper component, only if noWrapper is not set to true
25
25
  * @prop noWrapper?: false
@@ -56,7 +56,11 @@ export function PageLayout({
56
56
  <PageLoading {...pageLoading} />
57
57
  ) : (
58
58
  <>
59
- {header && <Header {...(header as any)} />}
59
+ {header && (
60
+ <Header {...(header as any)}>
61
+ {header?.nav && header?.nav}
62
+ </Header>
63
+ )}
60
64
 
61
65
  {!noWrapper ? (
62
66
  <Wrapper className="wrapper" {...wrapper}>
@@ -14,7 +14,7 @@ interface ILibPageLayoutBase {
14
14
  pageLoading?: ILibPageLoading
15
15
  titleLoading?: string
16
16
  helmet?: Omit<ILibHelmet, "children">
17
- header?: Omit<ILibHeader, "children">
17
+ header?: Omit<ILibHeader, "children"> & { nav?: JSX.Element }
18
18
  footer?: Omit<ILibFooter, "children">
19
19
  }
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@julseb-lib/react",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "scripts": {