react-luminus-components 1.2.40 → 1.2.42

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.
@@ -6,8 +6,9 @@ type Props = {
6
6
  photos: Array<PhotoLibraryItemModel>;
7
7
  defaultIndex: number;
8
8
  uploadPhotosText?: string;
9
+ noPhotosText?: string;
9
10
  onUploadPhotos?: (files: File[]) => void;
10
11
  photoActions?: PhotoAction[];
11
12
  };
12
- declare const PhotoLightbox: ({ show, onClose, photos, defaultIndex, uploadPhotosText, onUploadPhotos, photoActions, }: Props) => import("react").JSX.Element | null;
13
+ declare const PhotoLightbox: ({ show, onClose, photos, defaultIndex, uploadPhotosText, noPhotosText, onUploadPhotos, photoActions, }: Props) => import("react").JSX.Element;
13
14
  export default PhotoLightbox;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NoInputContainer-BkFSaMQy.cjs"),u=require("react");require("react-hook-form");const w=require("./usePermissions-yA39pMjm.cjs"),C=require("./SimpleTooltip-C_iRq-Q0.cjs"),M="_side-menu-item_6vbwa_1",B="_disabled_6vbwa_5",k="_nav-button_6vbwa_9",S="_child_6vbwa_17",P="_text_6vbwa_21",f="_icon_6vbwa_28",g="_collapse-icon_6vbwa_34",I="_collapsed_6vbwa_44",y="_expanded_6vbwa_51",T="_children-container_6vbwa_57",$="_visible_6vbwa_65",H="_children_6vbwa_57",o={"side-menu-item":"_side-menu-item_6vbwa_1",sideMenuItem:M,disabled:B,"nav-button":"_nav-button_6vbwa_9",navButton:k,child:S,text:P,icon:f,"collapse-icon":"_collapse-icon_6vbwa_34",collapseIcon:g,collapsed:I,expanded:y,"children-container":"_children-container_6vbwa_57",childrenContainer:T,visible:$,children:H},L=({item:e,menuExpanded:t,children:i})=>e.tooltip&&!t?s.jsxRuntimeExports.jsx(C.SimpleTooltip,{text:e.tooltip,placement:"right",children:i}):i,N=({item:e,menuExpanded:t,collapsed:i,onCollapse:a,currentPath:l})=>{var v,_;const{LinkComponent:c}=u.useContext(s.LuminusComponentsContext),[p,x]=u.useState(!1),[d]=l.split("?"),h=e.linkTo===d||((v=e.children)==null?void 0:v.some(n=>n.linkTo===d));return s.jsxRuntimeExports.jsxs("li",{className:s.classNames("luminus-side-menu-item",o.sideMenuItem,{[o.expanded]:t},{active:p||h},{open:i&&e.children},{[o.disabled]:e.disabled||e.notPermitted},{disabled:e.disabled||e.notPermitted}),onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[s.jsxRuntimeExports.jsx(L,{item:e,menuExpanded:t,children:e.children?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:s.jsxRuntimeExports.jsxs("button",{type:"button",className:s.classNames("nav-link",o.navButton),onClick:()=>a(),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",o.icon),children:e.icon}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("collapse-icon",o.collapseIcon,{[o.collapsed]:i}),children:s.jsxRuntimeExports.jsx(s.MdOutlineKeyboardArrowRight,{})})]})}):s.jsxRuntimeExports.jsxs(c,{to:e.disabled||e.notPermitted?"/":e.linkTo??"/",className:s.classNames("nav-link",o.navButton),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",o.icon),children:e.icon}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title})]})}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("children-container",o.childrenContainer,{[o.visible]:i}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("shadow rounded children",o.children),children:(_=e.children)==null?void 0:_.map(n=>s.jsxRuntimeExports.jsx(c,{to:n.disabled||n.notPermitted?"/":n.linkTo??"/",className:s.classNames("nav-link child rounded",o.navButton,o.child,{[o.disabled]:n.disabled||n.notPermitted},{disabled:n.disabled||n.notPermitted}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:n.title})},n.linkTo))})})]})},q="_side-menu_n1hvm_1",F="_sidebar-header_n1hvm_13",A="_side-menu-content_n1hvm_18",K="_expand_n1hvm_22",U="_divider_n1hvm_26",j={"side-menu":"_side-menu_n1hvm_1",sideMenu:q,"sidebar-header":"_sidebar-header_n1hvm_13",sidebarHeader:F,"side-menu-content":"_side-menu-content_n1hvm_18",sideMenuContent:A,expand:K,divider:U},z=({headerItem:e,mainItems:t,secondaryItems:i,expanded:a,setExpanded:l,currentPath:c})=>{const[p,x]=u.useState(-1),{checkUserHasPermissions:d}=w.usePermissions(),h=u.useMemo(()=>t.map(n=>{var r;return{...n,notPermitted:!d(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(m=>({...m,notPermitted:!d(m.permissions??[]),disabled:n.disabled||m.disabled}))}}),[t,d]),v=u.useMemo(()=>i.map(n=>{var r;return{...n,notPermitted:!d(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(m=>({...m,notPermitted:!d(m.permissions??[])}))}}),[i,d]),_=n=>{x(n===p?-1:n)};return u.useEffect(()=>{a||x(-1)},[a]),s.jsxRuntimeExports.jsxs("section",{className:s.classNames("luminus-side-menu shadow",j.sideMenu,{[j.expand]:a},{expand:a}),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("sidebar-header",j.sidebarHeader),children:e}),s.jsxRuntimeExports.jsxs("ul",{className:j.sideMenuContent,children:[h.map((n,r)=>s.jsxRuntimeExports.jsx(N,{item:n,menuExpanded:a,collapsed:r===p,onCollapse:()=>_(r),currentPath:c},n.title)),s.jsxRuntimeExports.jsx("hr",{className:s.classNames("divider",j.divider)}),v.map((n,r)=>s.jsxRuntimeExports.jsx(N,{item:n,menuExpanded:a,collapsed:r===p,onCollapse:()=>_(r),currentPath:c},n.title))]})]})},D="_top-bar_1lk80_1",G="_top-bar-brand_1lk80_14",R={"top-bar":"_top-bar_1lk80_1",topBar:D,"top-bar-brand":"_top-bar-brand_1lk80_14",topBarBrand:G},J=({appName:e,leftOffset:t,centerContent:i,rightContent:a})=>{const{LinkComponent:l}=u.useContext(s.LuminusComponentsContext);return s.jsxRuntimeExports.jsxs("nav",{className:s.classNames("luminus-top-bar shadow",R.topBar),style:{width:t?`calc(100% - ${t}px)`:void 0,left:t?`${t}px`:void 0},children:[s.jsxRuntimeExports.jsx(l,{to:"/",className:s.classNames("luminus-top-bar-brand",R.topBarBrand),children:e}),i&&s.jsxRuntimeExports.jsx("div",{children:i}),s.jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-end align-items-center gap-2",children:a??null})]})},O="_side-content-bar_17kwd_1",Q={"side-content-bar":"_side-content-bar_17kwd_1",sideContentBar:O},b=({width:e,children:t})=>s.jsxRuntimeExports.jsx("section",{className:s.classNames("luminus-side-content-bar shadow",Q.sideContentBar),style:{width:`${e}px`},children:t}),E=({title:e})=>s.jsxRuntimeExports.jsx("div",{className:"mb-3",children:typeof e=="string"?s.jsxRuntimeExports.jsx(s.Typography,{variant:"h3",children:e}):e}),V=({title:e,children:t,sideContent:i,sideContentWidth:a=250,noPadding:l,className:c})=>s.jsxRuntimeExports.jsxs("div",{className:s.classNames("container-fluid",l?"p-0":"p-3",c),children:[s.jsxRuntimeExports.jsxs("div",{style:{paddingRight:i?`${a}px`:void 0},children:[e?s.jsxRuntimeExports.jsx(E,{title:e}):null,t]}),i&&s.jsxRuntimeExports.jsx(b,{width:250,children:i})]}),W="_full-screen-container_1rm4r_1",X={"full-screen-container":"_full-screen-container_1rm4r_1",fullScreenContainer:W},Y=({title:e,children:t,sideContent:i,sideContentWidth:a=250,noPadding:l,className:c})=>s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs("div",{className:s.classNames("overflow-hidden luminus-full-screen-container",l?"p-0":"p-3",c,X.fullScreenContainer),style:{width:i?`calc(100% - ${a}px)`:"100%"},children:[e?s.jsxRuntimeExports.jsx(E,{title:e}):null,t]}),i&&s.jsxRuntimeExports.jsx(b,{width:250,children:i})]});exports.FullScreenContainer=Y;exports.MainContainer=V;exports.SideContentBar=b;exports.SideMenu=z;exports.TopBar=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NoInputContainer-BkFSaMQy.cjs"),u=require("react");require("react-hook-form");const w=require("./usePermissions-yA39pMjm.cjs"),C=require("./SimpleTooltip-C_iRq-Q0.cjs"),M="_side-menu-item_6vbwa_1",B="_disabled_6vbwa_5",k="_nav-button_6vbwa_9",S="_child_6vbwa_17",P="_text_6vbwa_21",f="_icon_6vbwa_28",g="_collapse-icon_6vbwa_34",I="_collapsed_6vbwa_44",y="_expanded_6vbwa_51",T="_children-container_6vbwa_57",$="_visible_6vbwa_65",H="_children_6vbwa_57",o={"side-menu-item":"_side-menu-item_6vbwa_1",sideMenuItem:M,disabled:B,"nav-button":"_nav-button_6vbwa_9",navButton:k,child:S,text:P,icon:f,"collapse-icon":"_collapse-icon_6vbwa_34",collapseIcon:g,collapsed:I,expanded:y,"children-container":"_children-container_6vbwa_57",childrenContainer:T,visible:$,children:H},L=({item:e,menuExpanded:t,children:i})=>e.tooltip&&!t?s.jsxRuntimeExports.jsx(C.SimpleTooltip,{text:e.tooltip,placement:"right",children:i}):i,N=({item:e,menuExpanded:t,collapsed:i,onCollapse:a,currentPath:l})=>{var v,_;const{LinkComponent:c}=u.useContext(s.LuminusComponentsContext),[p,x]=u.useState(!1),[d]=l.split("?"),h=e.linkTo===d||((v=e.children)==null?void 0:v.some(n=>n.linkTo===d));return s.jsxRuntimeExports.jsxs("li",{className:s.classNames("luminus-side-menu-item",o.sideMenuItem,{[o.expanded]:t},{active:p||h},{open:i&&e.children},{[o.disabled]:e.disabled||e.notPermitted},{disabled:e.disabled||e.notPermitted}),onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),children:[s.jsxRuntimeExports.jsx(L,{item:e,menuExpanded:t,children:e.children?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:s.jsxRuntimeExports.jsxs("button",{type:"button",className:s.classNames("nav-link",o.navButton),onClick:()=>a(),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",o.icon),children:e.icon}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("collapse-icon",o.collapseIcon,{[o.collapsed]:i}),children:s.jsxRuntimeExports.jsx(s.MdOutlineKeyboardArrowRight,{})})]})}):s.jsxRuntimeExports.jsxs(c,{to:e.disabled||e.notPermitted?"/":e.linkTo??"/",className:s.classNames("nav-link",o.navButton),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",o.icon),children:e.icon}),t&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title})]})}),s.jsxRuntimeExports.jsx("div",{className:s.classNames("children-container",o.childrenContainer,{[o.visible]:i}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("shadow rounded children",o.children),children:(_=e.children)==null?void 0:_.map(n=>s.jsxRuntimeExports.jsx(c,{to:n.disabled||n.notPermitted?"/":n.linkTo??"/",className:s.classNames("nav-link child rounded",o.navButton,o.child,{[o.disabled]:n.disabled||n.notPermitted},{disabled:n.disabled||n.notPermitted}),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:n.title})},n.linkTo))})})]})},q="_side-menu_n1hvm_1",F="_sidebar-header_n1hvm_13",A="_side-menu-content_n1hvm_18",K="_expand_n1hvm_22",U="_divider_n1hvm_26",j={"side-menu":"_side-menu_n1hvm_1",sideMenu:q,"sidebar-header":"_sidebar-header_n1hvm_13",sidebarHeader:F,"side-menu-content":"_side-menu-content_n1hvm_18",sideMenuContent:A,expand:K,divider:U},z=({headerItem:e,mainItems:t,secondaryItems:i,expanded:a,setExpanded:l,currentPath:c})=>{const[p,x]=u.useState(-1),{checkUserHasPermissions:d}=w.usePermissions(),h=u.useMemo(()=>t.map(n=>{var r;return{...n,notPermitted:!d(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(m=>({...m,notPermitted:!d(m.permissions??[]),disabled:n.disabled||m.disabled}))}}),[t,d]),v=u.useMemo(()=>i.map(n=>{var r;return{...n,notPermitted:!d(n.permissions??[]),children:(r=n.children)==null?void 0:r.map(m=>({...m,notPermitted:!d(m.permissions??[])}))}}),[i,d]),_=n=>{x(n===p?-1:n)};return u.useEffect(()=>{a||x(-1)},[a]),s.jsxRuntimeExports.jsxs("section",{className:s.classNames("luminus-side-menu shadow",j.sideMenu,{[j.expand]:a},{expand:a}),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("sidebar-header",j.sidebarHeader),children:e}),s.jsxRuntimeExports.jsxs("ul",{className:j.sideMenuContent,children:[h.map((n,r)=>s.jsxRuntimeExports.jsx(N,{item:n,menuExpanded:a,collapsed:r===p,onCollapse:()=>_(r),currentPath:c},n.title)),s.jsxRuntimeExports.jsx("hr",{className:s.classNames("divider",j.divider)}),v.map((n,r)=>s.jsxRuntimeExports.jsx(N,{item:n,menuExpanded:a,collapsed:r===p,onCollapse:()=>_(r),currentPath:c},n.title))]})]})},D="_top-bar_1lk80_1",G="_top-bar-brand_1lk80_14",R={"top-bar":"_top-bar_1lk80_1",topBar:D,"top-bar-brand":"_top-bar-brand_1lk80_14",topBarBrand:G},J=({appName:e,leftOffset:t,centerContent:i,rightContent:a})=>{const{LinkComponent:l}=u.useContext(s.LuminusComponentsContext);return s.jsxRuntimeExports.jsxs("nav",{className:s.classNames("luminus-top-bar shadow",R.topBar),style:{width:t?`calc(100% - ${t}px)`:void 0,left:t?`${t}px`:void 0},children:[s.jsxRuntimeExports.jsx(l,{to:"/",className:s.classNames("luminus-top-bar-brand",R.topBarBrand),children:e}),i&&s.jsxRuntimeExports.jsx("div",{children:i}),s.jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-end align-items-center gap-2",children:a??null})]})},O="_side-content-bar_17kwd_1",Q={"side-content-bar":"_side-content-bar_17kwd_1",sideContentBar:O},b=({width:e,children:t})=>s.jsxRuntimeExports.jsx("section",{className:s.classNames("luminus-side-content-bar shadow",Q.sideContentBar),style:{width:`${e}px`},children:t}),E=({title:e})=>s.jsxRuntimeExports.jsx("div",{className:"mb-3",children:typeof e=="string"?s.jsxRuntimeExports.jsx(s.Typography,{variant:"h3",children:e}):e}),V=({title:e,children:t,sideContent:i,sideContentWidth:a=250,noPadding:l,className:c})=>s.jsxRuntimeExports.jsxs("div",{className:s.classNames("container-fluid",l?"p-0":"p-3",c),children:[s.jsxRuntimeExports.jsxs("div",{style:{paddingRight:i?`${a}px`:void 0},children:[e?s.jsxRuntimeExports.jsx(E,{title:e}):null,t]}),i&&s.jsxRuntimeExports.jsx(b,{width:a,children:i})]}),X="_full-screen-container_1rm4r_1",Y={"full-screen-container":"_full-screen-container_1rm4r_1",fullScreenContainer:X},Z=({title:e,children:t,sideContent:i,sideContentWidth:a=250,noPadding:l,className:c})=>s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs("div",{className:s.classNames("overflow-hidden luminus-full-screen-container",l?"p-0":"p-3",c,Y.fullScreenContainer),style:{width:i?`calc(100% - ${a}px)`:"100%"},children:[e?s.jsxRuntimeExports.jsx(E,{title:e}):null,t]}),i&&s.jsxRuntimeExports.jsx(b,{width:a,children:i})]});exports.FullScreenContainer=Z;exports.MainContainer=V;exports.SideContentBar=b;exports.SideMenu=z;exports.TopBar=J;
package/dist/layout.es.js CHANGED
@@ -1,9 +1,9 @@
1
- import { N as C, j as e, b as i, W as I, X as P } from "./NoInputContainer-LdJeEMWI.js";
2
- import { useContext as B, useState as M, useMemo as j, useEffect as g } from "react";
1
+ import { N as B, j as e, b as o, W as I, X as P } from "./NoInputContainer-LdJeEMWI.js";
2
+ import { useContext as C, useState as M, useMemo as j, useEffect as g } from "react";
3
3
  import "react-hook-form";
4
4
  import { u as y } from "./usePermissions-CHfDy8Yx.js";
5
5
  import { S } from "./SimpleTooltip-mxX4RNUy.js";
6
- const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6vbwa_9", L = "_child_6vbwa_17", E = "_text_6vbwa_21", F = "_icon_6vbwa_28", R = "_collapse-icon_6vbwa_34", A = "_collapsed_6vbwa_44", K = "_expanded_6vbwa_51", U = "_children-container_6vbwa_57", W = "_visible_6vbwa_65", X = "_children_6vbwa_57", o = {
6
+ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6vbwa_9", L = "_child_6vbwa_17", E = "_text_6vbwa_21", F = "_icon_6vbwa_28", R = "_collapse-icon_6vbwa_34", A = "_collapsed_6vbwa_44", K = "_expanded_6vbwa_51", U = "_children-container_6vbwa_57", X = "_visible_6vbwa_65", q = "_children_6vbwa_57", i = {
7
7
  "side-menu-item": "_side-menu-item_6vbwa_1",
8
8
  sideMenuItem: T,
9
9
  disabled: $,
@@ -18,114 +18,114 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
18
18
  expanded: K,
19
19
  "children-container": "_children-container_6vbwa_57",
20
20
  childrenContainer: U,
21
- visible: W,
22
- children: X
23
- }, q = ({ item: n, menuExpanded: t, children: a }) => n.tooltip && !t ? /* @__PURE__ */ e.jsx(S, { text: n.tooltip, placement: "right", children: a }) : a, w = ({ item: n, menuExpanded: t, collapsed: a, onCollapse: r, currentPath: l }) => {
24
- var b, h;
25
- const { LinkComponent: c } = B(C), [p, u] = M(!1), [_] = l.split("?"), x = n.linkTo === _ || ((b = n.children) == null ? void 0 : b.some((s) => s.linkTo === _));
26
- return /* @__PURE__ */ e.jsxs("li", { className: i("luminus-side-menu-item", o.sideMenuItem, {
27
- [o.expanded]: t
28
- }, { active: p || x }, { open: a && n.children }, { [o.disabled]: n.disabled || n.notPermitted }, { disabled: n.disabled || n.notPermitted }), onMouseEnter: () => u(!0), onMouseLeave: () => u(!1), children: [
29
- /* @__PURE__ */ e.jsx(q, { item: n, menuExpanded: t, children: n.children ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: i("nav-link", o.navButton), onClick: () => r(), children: [
30
- /* @__PURE__ */ e.jsx("div", { className: i("icon", o.icon), children: n.icon }),
31
- t && /* @__PURE__ */ e.jsx("div", { className: i("text", o.text, "text-nowrap"), children: n.title }),
32
- t && /* @__PURE__ */ e.jsx("div", { className: i("collapse-icon", o.collapseIcon, {
33
- [o.collapsed]: a
21
+ visible: X,
22
+ children: q
23
+ }, z = ({ item: n, menuExpanded: t, children: a }) => n.tooltip && !t ? /* @__PURE__ */ e.jsx(S, { text: n.tooltip, placement: "right", children: a }) : a, w = ({ item: n, menuExpanded: t, collapsed: a, onCollapse: r, currentPath: d }) => {
24
+ var b, v;
25
+ const { LinkComponent: c } = C(B), [p, u] = M(!1), [_] = d.split("?"), x = n.linkTo === _ || ((b = n.children) == null ? void 0 : b.some((s) => s.linkTo === _));
26
+ return /* @__PURE__ */ e.jsxs("li", { className: o("luminus-side-menu-item", i.sideMenuItem, {
27
+ [i.expanded]: t
28
+ }, { active: p || x }, { open: a && n.children }, { [i.disabled]: n.disabled || n.notPermitted }, { disabled: n.disabled || n.notPermitted }), onMouseEnter: () => u(!0), onMouseLeave: () => u(!1), children: [
29
+ /* @__PURE__ */ e.jsx(z, { item: n, menuExpanded: t, children: n.children ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("button", { type: "button", className: o("nav-link", i.navButton), onClick: () => r(), children: [
30
+ /* @__PURE__ */ e.jsx("div", { className: o("icon", i.icon), children: n.icon }),
31
+ t && /* @__PURE__ */ e.jsx("div", { className: o("text", i.text, "text-nowrap"), children: n.title }),
32
+ t && /* @__PURE__ */ e.jsx("div", { className: o("collapse-icon", i.collapseIcon, {
33
+ [i.collapsed]: a
34
34
  }), children: /* @__PURE__ */ e.jsx(I, {}) })
35
- ] }) }) : /* @__PURE__ */ e.jsxs(c, { to: n.disabled || n.notPermitted ? "/" : n.linkTo ?? "/", className: i("nav-link", o.navButton), children: [
36
- /* @__PURE__ */ e.jsx("div", { className: i("icon", o.icon), children: n.icon }),
37
- t && /* @__PURE__ */ e.jsx("div", { className: i("text", o.text, "text-nowrap"), children: n.title })
35
+ ] }) }) : /* @__PURE__ */ e.jsxs(c, { to: n.disabled || n.notPermitted ? "/" : n.linkTo ?? "/", className: o("nav-link", i.navButton), children: [
36
+ /* @__PURE__ */ e.jsx("div", { className: o("icon", i.icon), children: n.icon }),
37
+ t && /* @__PURE__ */ e.jsx("div", { className: o("text", i.text, "text-nowrap"), children: n.title })
38
38
  ] }) }),
39
- /* @__PURE__ */ e.jsx("div", { className: i("children-container", o.childrenContainer, {
40
- [o.visible]: a
41
- }), children: /* @__PURE__ */ e.jsx("div", { className: i("shadow rounded children", o.children), children: (h = n.children) == null ? void 0 : h.map((s) => /* @__PURE__ */ e.jsx(c, { to: s.disabled || s.notPermitted ? "/" : s.linkTo ?? "/", className: i("nav-link child rounded", o.navButton, o.child, { [o.disabled]: s.disabled || s.notPermitted }, { disabled: s.disabled || s.notPermitted }), children: /* @__PURE__ */ e.jsx("div", { className: i("text", o.text, "text-nowrap"), children: s.title }) }, s.linkTo)) }) })
39
+ /* @__PURE__ */ e.jsx("div", { className: o("children-container", i.childrenContainer, {
40
+ [i.visible]: a
41
+ }), children: /* @__PURE__ */ e.jsx("div", { className: o("shadow rounded children", i.children), children: (v = n.children) == null ? void 0 : v.map((s) => /* @__PURE__ */ e.jsx(c, { to: s.disabled || s.notPermitted ? "/" : s.linkTo ?? "/", className: o("nav-link child rounded", i.navButton, i.child, { [i.disabled]: s.disabled || s.notPermitted }, { disabled: s.disabled || s.notPermitted }), children: /* @__PURE__ */ e.jsx("div", { className: o("text", i.text, "text-nowrap"), children: s.title }) }, s.linkTo)) }) })
42
42
  ] });
43
- }, z = "_side-menu_n1hvm_1", D = "_sidebar-header_n1hvm_13", G = "_side-menu-content_n1hvm_18", J = "_expand_n1hvm_22", Q = "_divider_n1hvm_26", v = {
43
+ }, D = "_side-menu_n1hvm_1", G = "_sidebar-header_n1hvm_13", J = "_side-menu-content_n1hvm_18", Q = "_expand_n1hvm_22", V = "_divider_n1hvm_26", h = {
44
44
  "side-menu": "_side-menu_n1hvm_1",
45
- sideMenu: z,
45
+ sideMenu: D,
46
46
  "sidebar-header": "_sidebar-header_n1hvm_13",
47
- sidebarHeader: D,
47
+ sidebarHeader: G,
48
48
  "side-menu-content": "_side-menu-content_n1hvm_18",
49
- sideMenuContent: G,
50
- expand: J,
51
- divider: Q
52
- }, re = ({ headerItem: n, mainItems: t, secondaryItems: a, expanded: r, setExpanded: l, currentPath: c }) => {
49
+ sideMenuContent: J,
50
+ expand: Q,
51
+ divider: V
52
+ }, re = ({ headerItem: n, mainItems: t, secondaryItems: a, expanded: r, setExpanded: d, currentPath: c }) => {
53
53
  const [p, u] = M(-1), { checkUserHasPermissions: _ } = y(), x = j(() => t.map((s) => {
54
- var d;
54
+ var l;
55
55
  return {
56
56
  ...s,
57
57
  notPermitted: !_(s.permissions ?? []),
58
- children: (d = s.children) == null ? void 0 : d.map((m) => ({
58
+ children: (l = s.children) == null ? void 0 : l.map((m) => ({
59
59
  ...m,
60
60
  notPermitted: !_(m.permissions ?? []),
61
61
  disabled: s.disabled || m.disabled
62
62
  }))
63
63
  };
64
64
  }), [t, _]), b = j(() => a.map((s) => {
65
- var d;
65
+ var l;
66
66
  return {
67
67
  ...s,
68
68
  notPermitted: !_(s.permissions ?? []),
69
- children: (d = s.children) == null ? void 0 : d.map((m) => ({
69
+ children: (l = s.children) == null ? void 0 : l.map((m) => ({
70
70
  ...m,
71
71
  notPermitted: !_(m.permissions ?? [])
72
72
  }))
73
73
  };
74
- }), [a, _]), h = (s) => {
74
+ }), [a, _]), v = (s) => {
75
75
  u(s === p ? -1 : s);
76
76
  };
77
77
  return g(() => {
78
78
  r || u(-1);
79
- }, [r]), /* @__PURE__ */ e.jsxs("section", { className: i("luminus-side-menu shadow", v.sideMenu, {
80
- [v.expand]: r
81
- }, { expand: r }), onMouseEnter: () => l(!0), onMouseLeave: () => l(!1), children: [
82
- /* @__PURE__ */ e.jsx("div", { className: i("sidebar-header", v.sidebarHeader), children: n }),
83
- /* @__PURE__ */ e.jsxs("ul", { className: v.sideMenuContent, children: [
84
- x.map((s, d) => /* @__PURE__ */ e.jsx(w, { item: s, menuExpanded: r, collapsed: d === p, onCollapse: () => h(d), currentPath: c }, s.title)),
85
- /* @__PURE__ */ e.jsx("hr", { className: i("divider", v.divider) }),
86
- b.map((s, d) => /* @__PURE__ */ e.jsx(w, { item: s, menuExpanded: r, collapsed: d === p, onCollapse: () => h(d), currentPath: c }, s.title))
79
+ }, [r]), /* @__PURE__ */ e.jsxs("section", { className: o("luminus-side-menu shadow", h.sideMenu, {
80
+ [h.expand]: r
81
+ }, { expand: r }), onMouseEnter: () => d(!0), onMouseLeave: () => d(!1), children: [
82
+ /* @__PURE__ */ e.jsx("div", { className: o("sidebar-header", h.sidebarHeader), children: n }),
83
+ /* @__PURE__ */ e.jsxs("ul", { className: h.sideMenuContent, children: [
84
+ x.map((s, l) => /* @__PURE__ */ e.jsx(w, { item: s, menuExpanded: r, collapsed: l === p, onCollapse: () => v(l), currentPath: c }, s.title)),
85
+ /* @__PURE__ */ e.jsx("hr", { className: o("divider", h.divider) }),
86
+ b.map((s, l) => /* @__PURE__ */ e.jsx(w, { item: s, menuExpanded: r, collapsed: l === p, onCollapse: () => v(l), currentPath: c }, s.title))
87
87
  ] })
88
88
  ] });
89
- }, V = "_top-bar_1lk80_1", Y = "_top-bar-brand_1lk80_14", N = {
89
+ }, Y = "_top-bar_1lk80_1", Z = "_top-bar-brand_1lk80_14", N = {
90
90
  "top-bar": "_top-bar_1lk80_1",
91
- topBar: V,
91
+ topBar: Y,
92
92
  "top-bar-brand": "_top-bar-brand_1lk80_14",
93
- topBarBrand: Y
94
- }, de = ({ appName: n, leftOffset: t, centerContent: a, rightContent: r }) => {
95
- const { LinkComponent: l } = B(C);
96
- return /* @__PURE__ */ e.jsxs("nav", { className: i("luminus-top-bar shadow", N.topBar), style: {
93
+ topBarBrand: Z
94
+ }, le = ({ appName: n, leftOffset: t, centerContent: a, rightContent: r }) => {
95
+ const { LinkComponent: d } = C(B);
96
+ return /* @__PURE__ */ e.jsxs("nav", { className: o("luminus-top-bar shadow", N.topBar), style: {
97
97
  width: t ? `calc(100% - ${t}px)` : void 0,
98
98
  left: t ? `${t}px` : void 0
99
99
  }, children: [
100
- /* @__PURE__ */ e.jsx(l, { to: "/", className: i("luminus-top-bar-brand", N.topBarBrand), children: n }),
100
+ /* @__PURE__ */ e.jsx(d, { to: "/", className: o("luminus-top-bar-brand", N.topBarBrand), children: n }),
101
101
  a && /* @__PURE__ */ e.jsx("div", { children: a }),
102
102
  /* @__PURE__ */ e.jsx("div", { className: "d-flex justify-content-end align-items-center gap-2", children: r ?? null })
103
103
  ] });
104
- }, Z = "_side-content-bar_17kwd_1", O = {
104
+ }, O = "_side-content-bar_17kwd_1", W = {
105
105
  "side-content-bar": "_side-content-bar_17kwd_1",
106
- sideContentBar: Z
107
- }, k = ({ width: n, children: t }) => /* @__PURE__ */ e.jsx("section", { className: i("luminus-side-content-bar shadow", O.sideContentBar), style: {
106
+ sideContentBar: O
107
+ }, k = ({ width: n, children: t }) => /* @__PURE__ */ e.jsx("section", { className: o("luminus-side-content-bar shadow", W.sideContentBar), style: {
108
108
  width: `${n}px`
109
- }, children: t }), f = ({ title: n }) => /* @__PURE__ */ e.jsx("div", { className: "mb-3", children: typeof n == "string" ? /* @__PURE__ */ e.jsx(P, { variant: "h3", children: n }) : n }), le = ({ title: n, children: t, sideContent: a, sideContentWidth: r = 250, noPadding: l, className: c }) => /* @__PURE__ */ e.jsxs("div", { className: i("container-fluid", l ? "p-0" : "p-3", c), children: [
109
+ }, children: t }), f = ({ title: n }) => /* @__PURE__ */ e.jsx("div", { className: "mb-3", children: typeof n == "string" ? /* @__PURE__ */ e.jsx(P, { variant: "h3", children: n }) : n }), de = ({ title: n, children: t, sideContent: a, sideContentWidth: r = 250, noPadding: d, className: c }) => /* @__PURE__ */ e.jsxs("div", { className: o("container-fluid", d ? "p-0" : "p-3", c), children: [
110
110
  /* @__PURE__ */ e.jsxs("div", { style: { paddingRight: a ? `${r}px` : void 0 }, children: [
111
111
  n ? /* @__PURE__ */ e.jsx(f, { title: n }) : null,
112
112
  t
113
113
  ] }),
114
- a && /* @__PURE__ */ e.jsx(k, { width: 250, children: a })
114
+ a && /* @__PURE__ */ e.jsx(k, { width: r, children: a })
115
115
  ] }), ee = "_full-screen-container_1rm4r_1", ne = {
116
116
  "full-screen-container": "_full-screen-container_1rm4r_1",
117
117
  fullScreenContainer: ee
118
- }, ce = ({ title: n, children: t, sideContent: a, sideContentWidth: r = 250, noPadding: l, className: c }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
119
- /* @__PURE__ */ e.jsxs("div", { className: i("overflow-hidden luminus-full-screen-container", l ? "p-0" : "p-3", c, ne.fullScreenContainer), style: { width: a ? `calc(100% - ${r}px)` : "100%" }, children: [
118
+ }, ce = ({ title: n, children: t, sideContent: a, sideContentWidth: r = 250, noPadding: d, className: c }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
119
+ /* @__PURE__ */ e.jsxs("div", { className: o("overflow-hidden luminus-full-screen-container", d ? "p-0" : "p-3", c, ne.fullScreenContainer), style: { width: a ? `calc(100% - ${r}px)` : "100%" }, children: [
120
120
  n ? /* @__PURE__ */ e.jsx(f, { title: n }) : null,
121
121
  t
122
122
  ] }),
123
- a && /* @__PURE__ */ e.jsx(k, { width: 250, children: a })
123
+ a && /* @__PURE__ */ e.jsx(k, { width: r, children: a })
124
124
  ] });
125
125
  export {
126
126
  ce as FullScreenContainer,
127
- le as MainContainer,
127
+ de as MainContainer,
128
128
  k as SideContentBar,
129
129
  re as SideMenu,
130
- de as TopBar
130
+ le as TopBar
131
131
  };