react-luminus-components 1.0.3 → 1.0.4

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/README.md CHANGED
@@ -234,7 +234,6 @@ Common layout components
234
234
  - **TopBar**\
235
235
  Renders the top bar with the application name and child items
236
236
  - appName: string
237
- - sideMenuExpanded: boolean
238
237
  ***
239
238
  - **SideContentBar**\
240
239
  Renders the side content bar on the right side, content is sent as children
@@ -1,8 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  type Props = {
3
3
  appName: string;
4
- sideMenuExpanded: boolean;
5
4
  children?: React.ReactNode;
6
5
  };
7
- declare const TopBar: ({ appName, sideMenuExpanded, children }: Props) => import("react").JSX.Element;
6
+ declare const TopBar: ({ appName, children }: Props) => import("react").JSX.Element;
8
7
  export default TopBar;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./HomeDashboard.module-BI8obEZ_.js"),d=require("react"),v=require("./SimpleTooltip-HYwwaCn4.js"),x=require("./hasClass-DABt6TfW.js");function _(...s){return s.filter(n=>n!=null).reduce((n,t)=>{if(typeof t!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return n===null?t:function(...i){n.apply(this,i),t.apply(this,i)}},null)}const L={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function D(s,n){const t=`offset${s[0].toUpperCase()}${s.slice(1)}`,o=n[t],i=L[s];return o+parseInt(x.style(n,i[0]),10)+parseInt(x.style(n,i[1]),10)}const O={[x.EXITED]:"collapse",[x.EXITING]:"collapsing",[x.ENTERING]:"collapsing",[x.ENTERED]:"collapse show"},q=d.forwardRef(({onEnter:s,onEntering:n,onEntered:t,onExit:o,onExiting:i,className:p,children:c,dimension:j="height",in:u=!1,timeout:m=300,mountOnEnter:B=!1,unmountOnExit:w=!1,appear:g=!1,getDimensionValue:f=D,...N},y)=>{const l=typeof j=="function"?j():j,I=d.useMemo(()=>_(r=>{r.style[l]="0"},s),[l,s]),S=d.useMemo(()=>_(r=>{const E=`scroll${l[0].toUpperCase()}${l.slice(1)}`;r.style[l]=`${r[E]}px`},n),[l,n]),T=d.useMemo(()=>_(r=>{r.style[l]=null},t),[l,t]),$=d.useMemo(()=>_(r=>{r.style[l]=`${f(l,r)}px`,x.triggerBrowserReflow(r)},o),[o,f,l]),k=d.useMemo(()=>_(r=>{r.style[l]=null},i),[l,i]);return e.jsxRuntimeExports.jsx(x.TransitionWrapper,{ref:y,addEndListener:x.transitionEndListener,...N,"aria-expanded":N.role?u:null,onEnter:I,onEntering:S,onEntered:T,onExit:$,onExiting:k,childRef:c.ref,in:u,timeout:m,mountOnEnter:B,unmountOnExit:w,appear:g,children:(r,E)=>d.cloneElement(c,{...E,className:e.classNames(p,c.props.className,O[r],l==="width"&&"collapse-horizontal")})})}),F=q,H="_side-menu-item_8j1cd_1",A="_nav-button_8j1cd_4",G="_child_8j1cd_11",U="_text_8j1cd_14",X="_icon_8j1cd_17",z="_collapse-icon_8j1cd_23",K="_collapsed_8j1cd_33",W="_expanded_8j1cd_40",a={"side-menu-item":"_side-menu-item_8j1cd_1",sideMenuItem:H,"nav-button":"_nav-button_8j1cd_4",navButton:A,child:G,text:U,icon:X,"collapse-icon":"_collapse-icon_8j1cd_23",collapseIcon:z,collapsed:K,expanded:W},R=({item:s,menuExpanded:n,children:t})=>s.tooltip&&!n?e.jsxRuntimeExports.jsx(v.SimpleTooltip,{text:s.tooltip,placement:"right",children:t}):t,b=({item:s,menuExpanded:n,collapsed:t,onCollapse:o})=>{var p;const{LinkComponent:i}=d.useContext(e.LuminusComponentsContext);return s.children?e.jsxRuntimeExports.jsx("li",{className:e.classNames("luminus-side-menu-item",a.sideMenuItem,{[a.expanded]:n}),children:e.jsxRuntimeExports.jsx(R,{item:s,menuExpanded:n,children:e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsxs("button",{type:"button",className:e.classNames("nav-link",a.navButton),onClick:()=>o(),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",a.icon),children:s.icon}),n&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",a.text,"text-nowrap"),children:s.title}),n&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("collapse-icon",a.collapseIcon,{[a.collapsed]:t}),children:e.jsxRuntimeExports.jsx(v.MdOutlineKeyboardArrowDown,{})})]}),e.jsxRuntimeExports.jsx(F,{in:t,children:e.jsxRuntimeExports.jsx("div",{children:(p=s.children)==null?void 0:p.map(c=>e.jsxRuntimeExports.jsx(i,{to:c.linkTo??"/",className:e.classNames("nav-link",a.navButton,a.child),children:e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",a.text,"text-nowrap"),children:c.title})},c.linkTo))})})]})})}):e.jsxRuntimeExports.jsx("li",{className:e.classNames("luminus-side-menu-item",a.sideMenuItem,{[a.expanded]:n}),children:e.jsxRuntimeExports.jsx(R,{item:s,menuExpanded:n,children:e.jsxRuntimeExports.jsxs(i,{to:s.linkTo??"/",className:e.classNames("nav-link",a.navButton),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("icon",a.icon),children:s.icon}),n&&e.jsxRuntimeExports.jsx("div",{className:e.classNames("text",a.text,"text-nowrap"),children:s.title})]})})})},J="_side-menu_s0700_1",P="_sidebar-header_s0700_14",Q="_side-menu-content_s0700_19",V="_expand_s0700_23",h={"side-menu":"_side-menu_s0700_1",sideMenu:J,"sidebar-header":"_sidebar-header_s0700_14",sidebarHeader:P,"side-menu-content":"_side-menu-content_s0700_19",sideMenuContent:Q,expand:V},Y=({headerItem:s,mainItems:n,secondaryItems:t,expanded:o,setExpanded:i})=>{const[p,c]=d.useState(-1),j=u=>{c(u===p?-1:u)};return d.useEffect(()=>{o||c(-1)},[o]),e.jsxRuntimeExports.jsxs("section",{className:e.classNames("luminus-side-menu",h.sideMenu,"shadow",{[h.expand]:o},{expand:o}),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[e.jsxRuntimeExports.jsx("div",{className:e.classNames("sidebar-header",h.sidebarHeader),children:s}),e.jsxRuntimeExports.jsxs("ul",{className:h.sideMenuContent,children:[n.map((u,m)=>e.jsxRuntimeExports.jsx(b,{item:u,menuExpanded:o,collapsed:m===p,onCollapse:()=>j(m)},u.title)),e.jsxRuntimeExports.jsx("hr",{}),t.map((u,m)=>e.jsxRuntimeExports.jsx(b,{item:u,menuExpanded:o,collapsed:m===p,onCollapse:()=>j(m)},u.title))]})]})},Z="_top-bar_j4je9_1",ee="_top-bar-brand_j4je9_12",C={"top-bar":"_top-bar_j4je9_1",topBar:Z,"top-bar-brand":"_top-bar-brand_j4je9_12",topBarBrand:ee},se=({appName:s,sideMenuExpanded:n,children:t})=>{const{LinkComponent:o}=d.useContext(e.LuminusComponentsContext);return e.jsxRuntimeExports.jsxs("nav",{className:e.classNames("shadow luminus-top-bar",C.topBar,{"topbar-expand":n}),children:[e.jsxRuntimeExports.jsx(o,{to:"/",className:e.classNames("luminus-top-bar-brand",C.topBarBrand),children:s}),e.jsxRuntimeExports.jsx("div",{className:"w-100 d-flex justify-content-end align-items-center gap-2",children:t})]})},ne="_side-content-bar_17kwd_1",te={"side-content-bar":"_side-content-bar_17kwd_1",sideContentBar:ne},M=({width:s,children:n})=>e.jsxRuntimeExports.jsx("section",{className:e.classNames("shadow luminus-side-content-bar",te.sideContentBar),style:{width:`${s}px`},children:n}),oe=({children:s,sideContent:n})=>e.jsxRuntimeExports.jsxs("div",{className:"container-fluid p-3",children:[e.jsxRuntimeExports.jsx("div",{style:{paddingRight:n?"250px":void 0},children:s}),n&&e.jsxRuntimeExports.jsx(M,{width:250,children:n})]}),ae="_full-screen-container_1c9bu_1",ie={"full-screen-container":"_full-screen-container_1c9bu_1",fullScreenContainer:ae},le=({children:s})=>e.jsxRuntimeExports.jsx("div",{className:e.classNames("container-fluid p-3 overflow-hidden luminus-full-screen-container",ie.fullScreenContainer),children:s});exports.FullScreenContainer=le;exports.MainContainer=oe;exports.SideContentBar=M;exports.SideMenu=Y;exports.TopBar=se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./HomeDashboard.module-BI8obEZ_.js"),d=require("react"),v=require("./SimpleTooltip-HYwwaCn4.js"),x=require("./hasClass-DABt6TfW.js");function _(...e){return e.filter(n=>n!=null).reduce((n,t)=>{if(typeof t!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return n===null?t:function(...i){n.apply(this,i),t.apply(this,i)}},null)}const L={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function D(e,n){const t=`offset${e[0].toUpperCase()}${e.slice(1)}`,a=n[t],i=L[e];return a+parseInt(x.style(n,i[0]),10)+parseInt(x.style(n,i[1]),10)}const O={[x.EXITED]:"collapse",[x.EXITING]:"collapsing",[x.ENTERING]:"collapsing",[x.ENTERED]:"collapse show"},q=d.forwardRef(({onEnter:e,onEntering:n,onEntered:t,onExit:a,onExiting:i,className:p,children:c,dimension:j="height",in:u=!1,timeout:m=300,mountOnEnter:B=!1,unmountOnExit:w=!1,appear:g=!1,getDimensionValue:f=D,...N},y)=>{const l=typeof j=="function"?j():j,I=d.useMemo(()=>_(r=>{r.style[l]="0"},e),[l,e]),S=d.useMemo(()=>_(r=>{const E=`scroll${l[0].toUpperCase()}${l.slice(1)}`;r.style[l]=`${r[E]}px`},n),[l,n]),T=d.useMemo(()=>_(r=>{r.style[l]=null},t),[l,t]),$=d.useMemo(()=>_(r=>{r.style[l]=`${f(l,r)}px`,x.triggerBrowserReflow(r)},a),[a,f,l]),k=d.useMemo(()=>_(r=>{r.style[l]=null},i),[l,i]);return s.jsxRuntimeExports.jsx(x.TransitionWrapper,{ref:y,addEndListener:x.transitionEndListener,...N,"aria-expanded":N.role?u:null,onEnter:I,onEntering:S,onEntered:T,onExit:$,onExiting:k,childRef:c.ref,in:u,timeout:m,mountOnEnter:B,unmountOnExit:w,appear:g,children:(r,E)=>d.cloneElement(c,{...E,className:s.classNames(p,c.props.className,O[r],l==="width"&&"collapse-horizontal")})})}),F=q,H="_side-menu-item_8j1cd_1",A="_nav-button_8j1cd_4",G="_child_8j1cd_11",U="_text_8j1cd_14",X="_icon_8j1cd_17",z="_collapse-icon_8j1cd_23",K="_collapsed_8j1cd_33",W="_expanded_8j1cd_40",o={"side-menu-item":"_side-menu-item_8j1cd_1",sideMenuItem:H,"nav-button":"_nav-button_8j1cd_4",navButton:A,child:G,text:U,icon:X,"collapse-icon":"_collapse-icon_8j1cd_23",collapseIcon:z,collapsed:K,expanded:W},R=({item:e,menuExpanded:n,children:t})=>e.tooltip&&!n?s.jsxRuntimeExports.jsx(v.SimpleTooltip,{text:e.tooltip,placement:"right",children:t}):t,b=({item:e,menuExpanded:n,collapsed:t,onCollapse:a})=>{var p;const{LinkComponent:i}=d.useContext(s.LuminusComponentsContext);return e.children?s.jsxRuntimeExports.jsx("li",{className:s.classNames("luminus-side-menu-item",o.sideMenuItem,{[o.expanded]:n}),children:s.jsxRuntimeExports.jsx(R,{item:e,menuExpanded:n,children:s.jsxRuntimeExports.jsxs("div",{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}),n&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title}),n&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("collapse-icon",o.collapseIcon,{[o.collapsed]:t}),children:s.jsxRuntimeExports.jsx(v.MdOutlineKeyboardArrowDown,{})})]}),s.jsxRuntimeExports.jsx(F,{in:t,children:s.jsxRuntimeExports.jsx("div",{children:(p=e.children)==null?void 0:p.map(c=>s.jsxRuntimeExports.jsx(i,{to:c.linkTo??"/",className:s.classNames("nav-link",o.navButton,o.child),children:s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:c.title})},c.linkTo))})})]})})}):s.jsxRuntimeExports.jsx("li",{className:s.classNames("luminus-side-menu-item",o.sideMenuItem,{[o.expanded]:n}),children:s.jsxRuntimeExports.jsx(R,{item:e,menuExpanded:n,children:s.jsxRuntimeExports.jsxs(i,{to:e.linkTo??"/",className:s.classNames("nav-link",o.navButton),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("icon",o.icon),children:e.icon}),n&&s.jsxRuntimeExports.jsx("div",{className:s.classNames("text",o.text,"text-nowrap"),children:e.title})]})})})},J="_side-menu_s0700_1",P="_sidebar-header_s0700_14",Q="_side-menu-content_s0700_19",V="_expand_s0700_23",h={"side-menu":"_side-menu_s0700_1",sideMenu:J,"sidebar-header":"_sidebar-header_s0700_14",sidebarHeader:P,"side-menu-content":"_side-menu-content_s0700_19",sideMenuContent:Q,expand:V},Y=({headerItem:e,mainItems:n,secondaryItems:t,expanded:a,setExpanded:i})=>{const[p,c]=d.useState(-1),j=u=>{c(u===p?-1:u)};return d.useEffect(()=>{a||c(-1)},[a]),s.jsxRuntimeExports.jsxs("section",{className:s.classNames("luminus-side-menu",h.sideMenu,"shadow",{[h.expand]:a},{expand:a}),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[s.jsxRuntimeExports.jsx("div",{className:s.classNames("sidebar-header",h.sidebarHeader),children:e}),s.jsxRuntimeExports.jsxs("ul",{className:h.sideMenuContent,children:[n.map((u,m)=>s.jsxRuntimeExports.jsx(b,{item:u,menuExpanded:a,collapsed:m===p,onCollapse:()=>j(m)},u.title)),s.jsxRuntimeExports.jsx("hr",{}),t.map((u,m)=>s.jsxRuntimeExports.jsx(b,{item:u,menuExpanded:a,collapsed:m===p,onCollapse:()=>j(m)},u.title))]})]})},Z="_top-bar_1t428_1",ss="_top-bar-brand_1t428_11",C={"top-bar":"_top-bar_1t428_1",topBar:Z,"top-bar-brand":"_top-bar-brand_1t428_11",topBarBrand:ss},es=({appName:e,children:n})=>{const{LinkComponent:t}=d.useContext(s.LuminusComponentsContext);return s.jsxRuntimeExports.jsxs("nav",{className:s.classNames("shadow luminus-top-bar",C.topBar),children:[s.jsxRuntimeExports.jsx(t,{to:"/",className:s.classNames("luminus-top-bar-brand",C.topBarBrand),children:e}),s.jsxRuntimeExports.jsx("div",{className:"w-100 d-flex justify-content-end align-items-center gap-2",children:n})]})},ns="_side-content-bar_17kwd_1",ts={"side-content-bar":"_side-content-bar_17kwd_1",sideContentBar:ns},M=({width:e,children:n})=>s.jsxRuntimeExports.jsx("section",{className:s.classNames("shadow luminus-side-content-bar",ts.sideContentBar),style:{width:`${e}px`},children:n}),os=({children:e,sideContent:n})=>s.jsxRuntimeExports.jsxs("div",{className:"container-fluid p-3",children:[s.jsxRuntimeExports.jsx("div",{style:{paddingRight:n?"250px":void 0},children:e}),n&&s.jsxRuntimeExports.jsx(M,{width:250,children:n})]}),as="_full-screen-container_1c9bu_1",is={"full-screen-container":"_full-screen-container_1c9bu_1",fullScreenContainer:as},ls=({children:e})=>s.jsxRuntimeExports.jsx("div",{className:s.classNames("container-fluid p-3 overflow-hidden luminus-full-screen-container",is.fullScreenContainer),children:e});exports.FullScreenContainer=ls;exports.MainContainer=os;exports.SideContentBar=M;exports.SideMenu=Y;exports.TopBar=es;
package/dist/layout.es.js CHANGED
@@ -16,8 +16,8 @@ const J = {
16
16
  width: ["marginLeft", "marginRight"]
17
17
  };
18
18
  function Q(n, s) {
19
- const t = `offset${n[0].toUpperCase()}${n.slice(1)}`, a = s[t], c = J[n];
20
- return a + // @ts-ignore
19
+ const t = `offset${n[0].toUpperCase()}${n.slice(1)}`, l = s[t], c = J[n];
20
+ return l + // @ts-ignore
21
21
  parseInt(C(s, c[0]), 10) + // @ts-ignore
22
22
  parseInt(C(s, c[1]), 10);
23
23
  }
@@ -30,7 +30,7 @@ const V = {
30
30
  onEnter: n,
31
31
  onEntering: s,
32
32
  onEntered: t,
33
- onExit: a,
33
+ onExit: l,
34
34
  onExiting: c,
35
35
  className: p,
36
36
  children: d,
@@ -46,13 +46,13 @@ const V = {
46
46
  const i = typeof m == "function" ? m() : m, k = x(() => h((r) => {
47
47
  r.style[i] = "0";
48
48
  }, n), [i, n]), S = x(() => h((r) => {
49
- const f = `scroll${i[0].toUpperCase()}${i.slice(1)}`;
50
- r.style[i] = `${r[f]}px`;
49
+ const j = `scroll${i[0].toUpperCase()}${i.slice(1)}`;
50
+ r.style[i] = `${r[j]}px`;
51
51
  }, s), [i, s]), R = x(() => h((r) => {
52
52
  r.style[i] = null;
53
53
  }, t), [i, t]), L = x(() => h((r) => {
54
54
  r.style[i] = `${b(i, r)}px`, q(r);
55
- }, a), [a, b, i]), D = x(() => h((r) => {
55
+ }, l), [l, b, i]), D = x(() => h((r) => {
56
56
  r.style[i] = null;
57
57
  }, c), [i, c]);
58
58
  return /* @__PURE__ */ e.jsx(H, {
@@ -71,12 +71,12 @@ const V = {
71
71
  mountOnEnter: y,
72
72
  unmountOnExit: E,
73
73
  appear: T,
74
- children: (r, f) => /* @__PURE__ */ N.cloneElement(d, {
75
- ...f,
74
+ children: (r, j) => /* @__PURE__ */ N.cloneElement(d, {
75
+ ...j,
76
76
  className: o(p, d.props.className, V[r], i === "width" && "collapse-horizontal")
77
77
  })
78
78
  });
79
- }), Z = Y, P = "_side-menu-item_8j1cd_1", ee = "_nav-button_8j1cd_4", ne = "_child_8j1cd_11", se = "_text_8j1cd_14", te = "_icon_8j1cd_17", oe = "_collapse-icon_8j1cd_23", ae = "_collapsed_8j1cd_33", le = "_expanded_8j1cd_40", l = {
79
+ }), Z = Y, P = "_side-menu-item_8j1cd_1", ee = "_nav-button_8j1cd_4", ne = "_child_8j1cd_11", se = "_text_8j1cd_14", te = "_icon_8j1cd_17", oe = "_collapse-icon_8j1cd_23", ae = "_collapsed_8j1cd_33", le = "_expanded_8j1cd_40", a = {
80
80
  "side-menu-item": "_side-menu-item_8j1cd_1",
81
81
  sideMenuItem: P,
82
82
  "nav-button": "_nav-button_8j1cd_4",
@@ -88,27 +88,27 @@ const V = {
88
88
  collapseIcon: oe,
89
89
  collapsed: ae,
90
90
  expanded: le
91
- }, w = ({ item: n, menuExpanded: s, children: t }) => n.tooltip && !s ? /* @__PURE__ */ e.jsx(G, { text: n.tooltip, placement: "right", children: t }) : t, B = ({ item: n, menuExpanded: s, collapsed: t, onCollapse: a }) => {
91
+ }, w = ({ item: n, menuExpanded: s, children: t }) => n.tooltip && !s ? /* @__PURE__ */ e.jsx(G, { text: n.tooltip, placement: "right", children: t }) : t, B = ({ item: n, menuExpanded: s, collapsed: t, onCollapse: l }) => {
92
92
  var p;
93
93
  const { LinkComponent: c } = g(M);
94
- return n.children ? /* @__PURE__ */ e.jsx("li", { className: o("luminus-side-menu-item", l.sideMenuItem, {
95
- [l.expanded]: s
94
+ return n.children ? /* @__PURE__ */ e.jsx("li", { className: o("luminus-side-menu-item", a.sideMenuItem, {
95
+ [a.expanded]: s
96
96
  }), children: /* @__PURE__ */ e.jsx(w, { item: n, menuExpanded: s, children: /* @__PURE__ */ e.jsxs("div", { children: [
97
- /* @__PURE__ */ e.jsxs("button", { type: "button", className: o("nav-link", l.navButton), onClick: () => a(), children: [
98
- /* @__PURE__ */ e.jsx("div", { className: o("icon", l.icon), children: n.icon }),
99
- s && /* @__PURE__ */ e.jsx("div", { className: o("text", l.text, "text-nowrap"), children: n.title }),
100
- s && /* @__PURE__ */ e.jsx("div", { className: o("collapse-icon", l.collapseIcon, {
101
- [l.collapsed]: t
97
+ /* @__PURE__ */ e.jsxs("button", { type: "button", className: o("nav-link", a.navButton), onClick: () => l(), children: [
98
+ /* @__PURE__ */ e.jsx("div", { className: o("icon", a.icon), children: n.icon }),
99
+ s && /* @__PURE__ */ e.jsx("div", { className: o("text", a.text, "text-nowrap"), children: n.title }),
100
+ s && /* @__PURE__ */ e.jsx("div", { className: o("collapse-icon", a.collapseIcon, {
101
+ [a.collapsed]: t
102
102
  }), children: /* @__PURE__ */ e.jsx(F, {}) })
103
103
  ] }),
104
- /* @__PURE__ */ e.jsx(Z, { in: t, children: /* @__PURE__ */ e.jsx("div", { children: (p = n.children) == null ? void 0 : p.map((d) => /* @__PURE__ */ e.jsx(c, { to: d.linkTo ?? "/", className: o("nav-link", l.navButton, l.child), children: /* @__PURE__ */ e.jsx("div", { className: o("text", l.text, "text-nowrap"), children: d.title }) }, d.linkTo)) }) })
105
- ] }) }) }) : /* @__PURE__ */ e.jsx("li", { className: o("luminus-side-menu-item", l.sideMenuItem, {
106
- [l.expanded]: s
107
- }), children: /* @__PURE__ */ e.jsx(w, { item: n, menuExpanded: s, children: /* @__PURE__ */ e.jsxs(c, { to: n.linkTo ?? "/", className: o("nav-link", l.navButton), children: [
108
- /* @__PURE__ */ e.jsx("div", { className: o("icon", l.icon), children: n.icon }),
109
- s && /* @__PURE__ */ e.jsx("div", { className: o("text", l.text, "text-nowrap"), children: n.title })
104
+ /* @__PURE__ */ e.jsx(Z, { in: t, children: /* @__PURE__ */ e.jsx("div", { children: (p = n.children) == null ? void 0 : p.map((d) => /* @__PURE__ */ e.jsx(c, { to: d.linkTo ?? "/", className: o("nav-link", a.navButton, a.child), children: /* @__PURE__ */ e.jsx("div", { className: o("text", a.text, "text-nowrap"), children: d.title }) }, d.linkTo)) }) })
105
+ ] }) }) }) : /* @__PURE__ */ e.jsx("li", { className: o("luminus-side-menu-item", a.sideMenuItem, {
106
+ [a.expanded]: s
107
+ }), children: /* @__PURE__ */ e.jsx(w, { item: n, menuExpanded: s, children: /* @__PURE__ */ e.jsxs(c, { to: n.linkTo ?? "/", className: o("nav-link", a.navButton), children: [
108
+ /* @__PURE__ */ e.jsx("div", { className: o("icon", a.icon), children: n.icon }),
109
+ s && /* @__PURE__ */ e.jsx("div", { className: o("text", a.text, "text-nowrap"), children: n.title })
110
110
  ] }) }) });
111
- }, ce = "_side-menu_s0700_1", ie = "_sidebar-header_s0700_14", re = "_side-menu-content_s0700_19", de = "_expand_s0700_23", j = {
111
+ }, ce = "_side-menu_s0700_1", ie = "_sidebar-header_s0700_14", re = "_side-menu-content_s0700_19", de = "_expand_s0700_23", f = {
112
112
  "side-menu": "_side-menu_s0700_1",
113
113
  sideMenu: ce,
114
114
  "sidebar-header": "_sidebar-header_s0700_14",
@@ -116,34 +116,32 @@ const V = {
116
116
  "side-menu-content": "_side-menu-content_s0700_19",
117
117
  sideMenuContent: re,
118
118
  expand: de
119
- }, Ce = ({ headerItem: n, mainItems: s, secondaryItems: t, expanded: a, setExpanded: c }) => {
119
+ }, Ce = ({ headerItem: n, mainItems: s, secondaryItems: t, expanded: l, setExpanded: c }) => {
120
120
  const [p, d] = O(-1), m = (u) => {
121
121
  d(u === p ? -1 : u);
122
122
  };
123
123
  return A(() => {
124
- a || d(-1);
125
- }, [a]), /* @__PURE__ */ e.jsxs("section", { className: o("luminus-side-menu", j.sideMenu, "shadow", {
126
- [j.expand]: a
127
- }, { expand: a }), onMouseEnter: () => c(!0), onMouseLeave: () => c(!1), children: [
128
- /* @__PURE__ */ e.jsx("div", { className: o("sidebar-header", j.sidebarHeader), children: n }),
129
- /* @__PURE__ */ e.jsxs("ul", { className: j.sideMenuContent, children: [
130
- s.map((u, _) => /* @__PURE__ */ e.jsx(B, { item: u, menuExpanded: a, collapsed: _ === p, onCollapse: () => m(_) }, u.title)),
124
+ l || d(-1);
125
+ }, [l]), /* @__PURE__ */ e.jsxs("section", { className: o("luminus-side-menu", f.sideMenu, "shadow", {
126
+ [f.expand]: l
127
+ }, { expand: l }), onMouseEnter: () => c(!0), onMouseLeave: () => c(!1), children: [
128
+ /* @__PURE__ */ e.jsx("div", { className: o("sidebar-header", f.sidebarHeader), children: n }),
129
+ /* @__PURE__ */ e.jsxs("ul", { className: f.sideMenuContent, children: [
130
+ s.map((u, _) => /* @__PURE__ */ e.jsx(B, { item: u, menuExpanded: l, collapsed: _ === p, onCollapse: () => m(_) }, u.title)),
131
131
  /* @__PURE__ */ e.jsx("hr", {}),
132
- t.map((u, _) => /* @__PURE__ */ e.jsx(B, { item: u, menuExpanded: a, collapsed: _ === p, onCollapse: () => m(_) }, u.title))
132
+ t.map((u, _) => /* @__PURE__ */ e.jsx(B, { item: u, menuExpanded: l, collapsed: _ === p, onCollapse: () => m(_) }, u.title))
133
133
  ] })
134
134
  ] });
135
- }, ue = "_top-bar_j4je9_1", pe = "_top-bar-brand_j4je9_12", I = {
136
- "top-bar": "_top-bar_j4je9_1",
135
+ }, ue = "_top-bar_1t428_1", pe = "_top-bar-brand_1t428_11", I = {
136
+ "top-bar": "_top-bar_1t428_1",
137
137
  topBar: ue,
138
- "top-bar-brand": "_top-bar-brand_j4je9_12",
138
+ "top-bar-brand": "_top-bar-brand_1t428_11",
139
139
  topBarBrand: pe
140
- }, we = ({ appName: n, sideMenuExpanded: s, children: t }) => {
141
- const { LinkComponent: a } = g(M);
142
- return /* @__PURE__ */ e.jsxs("nav", { className: o("shadow luminus-top-bar", I.topBar, {
143
- "topbar-expand": s
144
- }), children: [
145
- /* @__PURE__ */ e.jsx(a, { to: "/", className: o("luminus-top-bar-brand", I.topBarBrand), children: n }),
146
- /* @__PURE__ */ e.jsx("div", { className: "w-100 d-flex justify-content-end align-items-center gap-2", children: t })
140
+ }, we = ({ appName: n, children: s }) => {
141
+ const { LinkComponent: t } = g(M);
142
+ return /* @__PURE__ */ e.jsxs("nav", { className: o("shadow luminus-top-bar", I.topBar), children: [
143
+ /* @__PURE__ */ e.jsx(t, { to: "/", className: o("luminus-top-bar-brand", I.topBarBrand), children: n }),
144
+ /* @__PURE__ */ e.jsx("div", { className: "w-100 d-flex justify-content-end align-items-center gap-2", children: s })
147
145
  ] });
148
146
  }, _e = "_side-content-bar_17kwd_1", me = {
149
147
  "side-content-bar": "_side-content-bar_17kwd_1",
@@ -153,10 +151,10 @@ const V = {
153
151
  }, children: s }), Be = ({ children: n, sideContent: s }) => /* @__PURE__ */ e.jsxs("div", { className: "container-fluid p-3", children: [
154
152
  /* @__PURE__ */ e.jsx("div", { style: { paddingRight: s ? "250px" : void 0 }, children: n }),
155
153
  s && /* @__PURE__ */ e.jsx(xe, { width: 250, children: s })
156
- ] }), he = "_full-screen-container_1c9bu_1", je = {
154
+ ] }), he = "_full-screen-container_1c9bu_1", fe = {
157
155
  "full-screen-container": "_full-screen-container_1c9bu_1",
158
156
  fullScreenContainer: he
159
- }, Ie = ({ children: n }) => /* @__PURE__ */ e.jsx("div", { className: o("container-fluid p-3 overflow-hidden luminus-full-screen-container", je.fullScreenContainer), children: n });
157
+ }, Ie = ({ children: n }) => /* @__PURE__ */ e.jsx("div", { className: o("container-fluid p-3 overflow-hidden luminus-full-screen-container", fe.fullScreenContainer), children: n });
160
158
  export {
161
159
  Ie as FullScreenContainer,
162
160
  Be as MainContainer,
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- ._loading_14qfh_1{position:fixed;display:flex;align-items:center;justify-content:center;height:100vh;width:100vw;gap:8px}._loading_14qfh_1 ._spinner-grow_14qfh_10{width:40px;height:40px}._loading_14qfh_1 ._spinner-grow_14qfh_10._second_14qfh_14{animation-delay:.1s}._loading_14qfh_1 ._spinner-grow_14qfh_10._third_14qfh_17{animation-delay:.2s}._h1_8gr7h_1{font-size:32px;font-weight:400;margin:0;padding:0}._h3_8gr7h_8{font-size:24px;font-weight:400;margin:0;padding:0}._h6_8gr7h_15{font-size:20px;font-weight:400;margin:0;padding:0}._subtitle_8gr7h_22,._body_8gr7h_29{font-size:16px;font-weight:400;margin:0;padding:0}._body2_8gr7h_36{font-size:14px;font-weight:400;margin:0;padding:0}._caption_8gr7h_43{font-size:12px;font-weight:400;margin:0;padding:0}._widget_1sdw8_1{height:320px;display:flex;justify-content:center;align-items:center}._dashboard_1ikl9_1 ._widgets-grid_1ikl9_1{display:grid;grid-template-columns:repeat(2,1fr);column-gap:16px;row-gap:16px}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7{position:relative;height:320px;width:100%}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7._full-width_1ikl9_12{grid-column:span 2}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7._widget-edit_1ikl9_15{border:2px dashed gray}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7 ._remove-icon_1ikl9_18{z-index:2;position:absolute;right:-16px;top:-16px;background-color:#fff}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7 ._full-width-icon_1ikl9_25{z-index:2;position:absolute;right:-16px;top:calc(50% - 15px);background-color:#fff}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7 ._full-width-icon_1ikl9_25 svg{rotate:90deg}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7 ._widget-edit-overlay_1ikl9_35{position:absolute;left:0;top:0;height:100%;width:100%;background-color:#80808080;opacity:.6}._side-menu-item_8j1cd_1{width:100%}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4{width:100%;display:flex;align-items:center;justify-content:center;padding:8px 16px}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4._child_8j1cd_11{padding:4px 8px}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4._child_8j1cd_11 ._text_8j1cd_14{font-size:14px}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4 ._icon_8j1cd_17{display:flex;justify-content:center;align-items:center;font-size:22px}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4 ._collapse-icon_8j1cd_23{width:100%;display:flex;justify-content:end;align-items:center;font-size:20px}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4 ._collapse-icon_8j1cd_23 svg{transition:.2s ease}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4 ._collapse-icon_8j1cd_23._collapsed_8j1cd_33 svg{rotate:180deg}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4 ._text_8j1cd_14{font-size:16px;margin-left:32px}._side-menu-item_8j1cd_1._expanded_8j1cd_40 ._nav-button_8j1cd_4,._side-menu-item_8j1cd_1._expanded_8j1cd_40 ._nav-button_8j1cd_4 ._icon_8j1cd_17{justify-content:flex-start}._side-menu_s0700_1{position:fixed;top:0;left:0;height:100%;background-color:#fff;transition:.3s ease;overflow-x:hidden;scrollbar-width:none}._side-menu_s0700_1::state(webkit-scrollbar){display:none}._side-menu_s0700_1 ._sidebar-header_s0700_14{display:flex;justify-content:center;align-items:center}._side-menu_s0700_1 ._side-menu-content_s0700_19{margin-top:8px;padding:0}._side-menu_s0700_1._expand_s0700_23 ._sidebar-header_s0700_14{padding:0 12px;justify-content:start}._top-bar_j4je9_1{padding:0 24px;border-left:16px solid transparent;display:flex;align-items:center;grid-gap:24px;position:sticky;top:0;left:0;transition:.3s ease}._top-bar_j4je9_1 ._top-bar-brand_j4je9_12{text-decoration:none;font-size:20px}._side-content-bar_17kwd_1{position:fixed;top:0;right:0;height:100%;background-color:#fff;overflow-x:hidden;scrollbar-width:none}._side-content-bar_17kwd_1::state(webkit-scrollbar){display:none}._full-screen-container_1c9bu_1{width:100%;display:flex;flex-direction:column}.luminus-input-remove-icon{position:absolute;top:0;right:16px;height:100%;display:flex;align-items:center;justify-content:center}.luminus-input-remove-icon.inset{right:40px}.luminus-input-remove-icon .icon-button{padding:0;margin:0;font-size:16px;height:20px;width:20px;display:flex;align-items:center}._avatar-icon_1axl6_1{height:36px;width:36px;display:flex;align-items:center;justify-content:center;border-radius:100%;color:#fff;font-size:16px}._modal_18hh3_1 ._modal-content_18hh3_1{height:100%;max-height:90vh}._modal_18hh3_1 ._modal-body_18hh3_5{height:100%;display:flex;flex-direction:column;overflow:hidden}._form-submit_1wjhr_1{position:fixed;width:160px;bottom:40px;left:calc(50% - 80px)}
1
+ ._loading_14qfh_1{position:fixed;display:flex;align-items:center;justify-content:center;height:100vh;width:100vw;gap:8px}._loading_14qfh_1 ._spinner-grow_14qfh_10{width:40px;height:40px}._loading_14qfh_1 ._spinner-grow_14qfh_10._second_14qfh_14{animation-delay:.1s}._loading_14qfh_1 ._spinner-grow_14qfh_10._third_14qfh_17{animation-delay:.2s}._h1_8gr7h_1{font-size:32px;font-weight:400;margin:0;padding:0}._h3_8gr7h_8{font-size:24px;font-weight:400;margin:0;padding:0}._h6_8gr7h_15{font-size:20px;font-weight:400;margin:0;padding:0}._subtitle_8gr7h_22,._body_8gr7h_29{font-size:16px;font-weight:400;margin:0;padding:0}._body2_8gr7h_36{font-size:14px;font-weight:400;margin:0;padding:0}._caption_8gr7h_43{font-size:12px;font-weight:400;margin:0;padding:0}._widget_1sdw8_1{height:320px;display:flex;justify-content:center;align-items:center}._dashboard_1ikl9_1 ._widgets-grid_1ikl9_1{display:grid;grid-template-columns:repeat(2,1fr);column-gap:16px;row-gap:16px}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7{position:relative;height:320px;width:100%}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7._full-width_1ikl9_12{grid-column:span 2}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7._widget-edit_1ikl9_15{border:2px dashed gray}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7 ._remove-icon_1ikl9_18{z-index:2;position:absolute;right:-16px;top:-16px;background-color:#fff}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7 ._full-width-icon_1ikl9_25{z-index:2;position:absolute;right:-16px;top:calc(50% - 15px);background-color:#fff}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7 ._full-width-icon_1ikl9_25 svg{rotate:90deg}._dashboard_1ikl9_1 ._widget-wrapper_1ikl9_7 ._widget-edit-overlay_1ikl9_35{position:absolute;left:0;top:0;height:100%;width:100%;background-color:#80808080;opacity:.6}._side-menu-item_8j1cd_1{width:100%}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4{width:100%;display:flex;align-items:center;justify-content:center;padding:8px 16px}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4._child_8j1cd_11{padding:4px 8px}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4._child_8j1cd_11 ._text_8j1cd_14{font-size:14px}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4 ._icon_8j1cd_17{display:flex;justify-content:center;align-items:center;font-size:22px}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4 ._collapse-icon_8j1cd_23{width:100%;display:flex;justify-content:end;align-items:center;font-size:20px}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4 ._collapse-icon_8j1cd_23 svg{transition:.2s ease}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4 ._collapse-icon_8j1cd_23._collapsed_8j1cd_33 svg{rotate:180deg}._side-menu-item_8j1cd_1 ._nav-button_8j1cd_4 ._text_8j1cd_14{font-size:16px;margin-left:32px}._side-menu-item_8j1cd_1._expanded_8j1cd_40 ._nav-button_8j1cd_4,._side-menu-item_8j1cd_1._expanded_8j1cd_40 ._nav-button_8j1cd_4 ._icon_8j1cd_17{justify-content:flex-start}._side-menu_s0700_1{position:fixed;top:0;left:0;height:100%;background-color:#fff;transition:.3s ease;overflow-x:hidden;scrollbar-width:none}._side-menu_s0700_1::state(webkit-scrollbar){display:none}._side-menu_s0700_1 ._sidebar-header_s0700_14{display:flex;justify-content:center;align-items:center}._side-menu_s0700_1 ._side-menu-content_s0700_19{margin-top:8px;padding:0}._side-menu_s0700_1._expand_s0700_23 ._sidebar-header_s0700_14{padding:0 12px;justify-content:start}._top-bar_1t428_1{padding:0 24px;border-left:16px solid transparent;display:flex;align-items:center;grid-gap:24px;position:sticky;top:0;left:0}._top-bar_1t428_1 ._top-bar-brand_1t428_11{text-decoration:none;font-size:20px}._side-content-bar_17kwd_1{position:fixed;top:0;right:0;height:100%;background-color:#fff;overflow-x:hidden;scrollbar-width:none}._side-content-bar_17kwd_1::state(webkit-scrollbar){display:none}._full-screen-container_1c9bu_1{width:100%;display:flex;flex-direction:column}.luminus-input-remove-icon{position:absolute;top:0;right:16px;height:100%;display:flex;align-items:center;justify-content:center}.luminus-input-remove-icon.inset{right:40px}.luminus-input-remove-icon .icon-button{padding:0;margin:0;font-size:16px;height:20px;width:20px;display:flex;align-items:center}._avatar-icon_1axl6_1{height:36px;width:36px;display:flex;align-items:center;justify-content:center;border-radius:100%;color:#fff;font-size:16px}._modal_18hh3_1 ._modal-content_18hh3_1{height:100%;max-height:90vh}._modal_18hh3_1 ._modal-body_18hh3_5{height:100%;display:flex;flex-direction:column;overflow:hidden}._form-submit_1wjhr_1{position:fixed;width:160px;bottom:40px;left:calc(50% - 80px)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-luminus-components",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Library of React Components reusable in Luminus projects (Fleetman, CAFM)",
5
5
  "repository": {
6
6
  "type": "git",