react-luminus-components 1.2.68 → 1.2.70

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/layout.es.js CHANGED
@@ -1,9 +1,9 @@
1
- import { N as B, j as e, b as o, W as I, X as P } from "./NoInputContainer-2Ycv-Em1.js";
1
+ import { Q as B, j as e, b as o, X as I, Y as P } from "./NoInputContainer-BnAPYzCz.js";
2
2
  import { useContext as C, useState as M, useMemo as j, useEffect as g } from "react";
3
3
  import "react-hook-form";
4
- import { u as y } from "./usePermissions-DtwWvIV0.js";
5
- import { S } from "./SimpleTooltip-DbIaK2su.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", X = "_visible_6vbwa_65", q = "_children_6vbwa_57", i = {
4
+ import { u as y } from "./usePermissions-Dn_gKjni.js";
5
+ import { S } from "./SimpleTooltip-ty5BQkX3.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", Q = "_children-container_6vbwa_57", U = "_visible_6vbwa_65", X = "_children_6vbwa_57", i = {
7
7
  "side-menu-item": "_side-menu-item_6vbwa_1",
8
8
  sideMenuItem: T,
9
9
  disabled: $,
@@ -17,16 +17,16 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
17
17
  collapsed: A,
18
18
  expanded: K,
19
19
  "children-container": "_children-container_6vbwa_57",
20
- childrenContainer: U,
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 }) => {
20
+ childrenContainer: Q,
21
+ visible: U,
22
+ children: X
23
+ }, Y = ({ 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
24
  var b, v;
25
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
26
  return /* @__PURE__ */ e.jsxs("li", { className: o("luminus-side-menu-item", i.sideMenuItem, {
27
27
  [i.expanded]: t
28
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: [
29
+ /* @__PURE__ */ e.jsx(Y, { 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
30
  /* @__PURE__ */ e.jsx("div", { className: o("icon", i.icon), children: n.icon }),
31
31
  t && /* @__PURE__ */ e.jsx("div", { className: o("text", i.text, "text-nowrap"), children: n.title }),
32
32
  t && /* @__PURE__ */ e.jsx("div", { className: o("collapse-icon", i.collapseIcon, {
@@ -40,15 +40,15 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
40
40
  [i.visible]: a
41
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
- }, 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 = {
43
+ }, q = "_side-menu_n1hvm_1", z = "_sidebar-header_n1hvm_13", D = "_side-menu-content_n1hvm_18", G = "_expand_n1hvm_22", J = "_divider_n1hvm_26", h = {
44
44
  "side-menu": "_side-menu_n1hvm_1",
45
- sideMenu: D,
45
+ sideMenu: q,
46
46
  "sidebar-header": "_sidebar-header_n1hvm_13",
47
- sidebarHeader: G,
47
+ sidebarHeader: z,
48
48
  "side-menu-content": "_side-menu-content_n1hvm_18",
49
- sideMenuContent: J,
50
- expand: Q,
51
- divider: V
49
+ sideMenuContent: D,
50
+ expand: G,
51
+ divider: J
52
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
54
  var l;
@@ -86,9 +86,9 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
86
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
- }, Y = "_top-bar_1lk80_1", Z = "_top-bar-brand_1lk80_14", N = {
89
+ }, V = "_top-bar_1lk80_1", Z = "_top-bar-brand_1lk80_14", N = {
90
90
  "top-bar": "_top-bar_1lk80_1",
91
- topBar: Y,
91
+ topBar: V,
92
92
  "top-bar-brand": "_top-bar-brand_1lk80_14",
93
93
  topBarBrand: Z
94
94
  }, le = ({ appName: n, leftOffset: t, centerContent: a, rightContent: r }) => {