react-luminus-components 1.2.36 → 1.2.38

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 C, j as e, b as i, W as I, a1 as P } from "./UserAvatarToggle-CH7OqxNp.js";
1
+ import { N as C, j as e, b as i, W as I, X as P } from "./NoInputContainer-LdJeEMWI.js";
2
2
  import { useContext as B, useState as M, useMemo as j, useEffect as g } from "react";
3
3
  import "react-hook-form";
4
- import { u as y } from "./usePermissions-DVO-znuB.js";
5
- import { S } from "./SimpleTooltip-MhGCEWts.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", q = "_children_6vbwa_57", o = {
4
+ import { u as y } from "./usePermissions-CHfDy8Yx.js";
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 = {
7
7
  "side-menu-item": "_side-menu-item_6vbwa_1",
8
8
  sideMenuItem: T,
9
9
  disabled: $,
@@ -19,14 +19,14 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
19
19
  "children-container": "_children-container_6vbwa_57",
20
20
  childrenContainer: U,
21
21
  visible: W,
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: l }) => {
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
24
  var b, h;
25
25
  const { LinkComponent: m } = B(C), [p, _] = M(!1), [c] = l.split("?"), x = n.linkTo === c || ((b = n.children) == null ? void 0 : b.some((s) => s.linkTo === c));
26
26
  return /* @__PURE__ */ e.jsxs("li", { className: i("luminus-side-menu-item", o.sideMenuItem, {
27
27
  [o.expanded]: t
28
28
  }, { active: p || x }, { open: a && n.children }, { [o.disabled]: n.disabled || n.notPermitted }, { disabled: n.disabled || n.notPermitted }), onMouseEnter: () => _(!0), onMouseLeave: () => _(!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: i("nav-link", o.navButton), onClick: () => r(), 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
30
  /* @__PURE__ */ e.jsx("div", { className: i("icon", o.icon), children: n.icon }),
31
31
  t && /* @__PURE__ */ e.jsx("div", { className: i("text", o.text, "text-nowrap"), children: n.title }),
32
32
  t && /* @__PURE__ */ e.jsx("div", { className: i("collapse-icon", o.collapseIcon, {
@@ -40,15 +40,15 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
40
40
  [o.visible]: a
41
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(m, { 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)) }) })
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", v = {
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 = {
44
44
  "side-menu": "_side-menu_n1hvm_1",
45
- sideMenu: D,
45
+ sideMenu: z,
46
46
  "sidebar-header": "_sidebar-header_n1hvm_13",
47
- sidebarHeader: G,
47
+ sidebarHeader: D,
48
48
  "side-menu-content": "_side-menu-content_n1hvm_18",
49
- sideMenuContent: J,
50
- expand: Q,
51
- divider: V
49
+ sideMenuContent: G,
50
+ expand: J,
51
+ divider: Q
52
52
  }, re = ({ headerItem: n, mainItems: t, secondaryItems: a, expanded: r, setExpanded: l, currentPath: m }) => {
53
53
  const [p, _] = M(-1), { checkUserHasPermissions: c } = y(), x = j(() => t.map((s) => {
54
54
  var d;
@@ -86,9 +86,9 @@ const T = "_side-menu-item_6vbwa_1", $ = "_disabled_6vbwa_5", H = "_nav-button_6
86
86
  b.map((s, d) => /* @__PURE__ */ e.jsx(w, { item: s, menuExpanded: r, collapsed: d === p, onCollapse: () => h(d), currentPath: m }, s.title))
87
87
  ] })
88
88
  ] });
89
- }, X = "_top-bar_1lk80_1", Y = "_top-bar-brand_1lk80_14", N = {
89
+ }, V = "_top-bar_1lk80_1", Y = "_top-bar-brand_1lk80_14", N = {
90
90
  "top-bar": "_top-bar_1lk80_1",
91
- topBar: X,
91
+ topBar: V,
92
92
  "top-bar-brand": "_top-bar-brand_1lk80_14",
93
93
  topBarBrand: Y
94
94
  }, de = ({ appName: n, leftOffset: t, centerContent: a, rightContent: r }) => {