react-luminus-components 1.1.26 → 1.1.27
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/.vite/manifest.json +41 -41
- package/dist/{DataKey-DN_Gd8yX.cjs → DataKey-BW7pVEN-.cjs} +1 -1
- package/dist/{DataKey-BM6Hi4Og.js → DataKey-DLEAAtqJ.js} +1 -1
- package/dist/{SimpleTooltip-DnZSi_qT.js → SimpleTooltip-Bclp93h0.js} +1 -1
- package/dist/{SimpleTooltip-Bg8N9Up2.cjs → SimpleTooltip-SKI6LrMC.cjs} +1 -1
- package/dist/{Typography-CsdF39gW.js → Typography-CmC4x8yQ.js} +1 -1
- package/dist/{Typography-C0E6aQv2.cjs → Typography-yDv-w5KK.cjs} +1 -1
- package/dist/{UserAvatarToggle-0_jNWWSB.cjs → UserAvatarToggle-B7PDqhFk.cjs} +9 -9
- package/dist/{UserAvatarToggle-xT1i6nSz.js → UserAvatarToggle-CsMWlplC.js} +1654 -1655
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +4 -4
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +3 -3
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +83 -82
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +6 -6
- package/dist/style.css +1 -1
- package/dist/{useConfirm-CQp43K_n.js → useConfirm-CXFo5fIW.js} +1 -1
- package/dist/{useConfirm-CdQJyKxQ.cjs → useConfirm-DtEg0CeZ.cjs} +1 -1
- package/package.json +1 -1
package/dist/layout.es.js
CHANGED
|
@@ -1,107 +1,108 @@
|
|
|
1
|
-
import { L as b, j as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { S as
|
|
4
|
-
import { T as
|
|
5
|
-
const
|
|
6
|
-
"side-menu-item": "_side-menu-
|
|
7
|
-
sideMenuItem:
|
|
8
|
-
"nav-button": "_nav-
|
|
9
|
-
navButton:
|
|
10
|
-
child:
|
|
11
|
-
text:
|
|
12
|
-
icon:
|
|
13
|
-
"collapse-icon": "_collapse-
|
|
14
|
-
collapseIcon:
|
|
15
|
-
collapsed:
|
|
16
|
-
expanded:
|
|
17
|
-
"children-container": "_children-
|
|
18
|
-
childrenContainer:
|
|
19
|
-
visible:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { L as b, j as n, c as a, M } from "./UserAvatarToggle-CsMWlplC.js";
|
|
2
|
+
import { useContext as w, useState as N, useEffect as f } from "react";
|
|
3
|
+
import { S as k } from "./SimpleTooltip-Bclp93h0.js";
|
|
4
|
+
import { T as q } from "./Typography-CmC4x8yQ.js";
|
|
5
|
+
const I = "_side-menu-item_ra7qw_1", g = "_nav-button_ra7qw_5", y = "_child_ra7qw_13", T = "_text_ra7qw_17", S = "_icon_ra7qw_20", $ = "_collapse-icon_ra7qw_26", L = "_collapsed_ra7qw_36", H = "_expanded_ra7qw_43", F = "_children-container_ra7qw_49", R = "_visible_ra7qw_57", A = "_children_ra7qw_49", i = {
|
|
6
|
+
"side-menu-item": "_side-menu-item_ra7qw_1",
|
|
7
|
+
sideMenuItem: I,
|
|
8
|
+
"nav-button": "_nav-button_ra7qw_5",
|
|
9
|
+
navButton: g,
|
|
10
|
+
child: y,
|
|
11
|
+
text: T,
|
|
12
|
+
icon: S,
|
|
13
|
+
"collapse-icon": "_collapse-icon_ra7qw_26",
|
|
14
|
+
collapseIcon: $,
|
|
15
|
+
collapsed: L,
|
|
16
|
+
expanded: H,
|
|
17
|
+
"children-container": "_children-container_ra7qw_49",
|
|
18
|
+
childrenContainer: F,
|
|
19
|
+
visible: R,
|
|
20
|
+
children: A
|
|
21
|
+
}, E = ({ item: e, menuExpanded: s, children: t }) => e.tooltip && !s ? /* @__PURE__ */ n.jsx(k, { text: e.tooltip, placement: "right", children: t }) : t, v = ({ item: e, menuExpanded: s, collapsed: t, onCollapse: o, currentPath: l }) => {
|
|
22
|
+
var c, x;
|
|
23
|
+
const { LinkComponent: _ } = w(b), [u, d] = N(!1), [h] = l.split("?"), r = e.linkTo === h || ((c = e.children) == null ? void 0 : c.some((m) => m.linkTo === h));
|
|
24
|
+
return /* @__PURE__ */ n.jsxs("li", { className: a("luminus-side-menu-item", i.sideMenuItem, {
|
|
24
25
|
[i.expanded]: s
|
|
25
|
-
}, { active:
|
|
26
|
-
/* @__PURE__ */ e.jsxs("button", { type: "button", className:
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
s && /* @__PURE__ */
|
|
29
|
-
s && /* @__PURE__ */
|
|
26
|
+
}, { active: u || r }, { open: t && e.children }), onMouseEnter: () => d(!0), onMouseLeave: () => d(!1), children: [
|
|
27
|
+
/* @__PURE__ */ n.jsx(E, { item: e, menuExpanded: s, children: e.children ? /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs("button", { type: "button", className: a("nav-link", i.navButton), onClick: () => o(), children: [
|
|
28
|
+
/* @__PURE__ */ n.jsx("div", { className: a("icon", i.icon), children: e.icon }),
|
|
29
|
+
s && /* @__PURE__ */ n.jsx("div", { className: a("text", i.text, "text-nowrap"), children: e.title }),
|
|
30
|
+
s && /* @__PURE__ */ n.jsx("div", { className: a("collapse-icon", i.collapseIcon, {
|
|
30
31
|
[i.collapsed]: t
|
|
31
|
-
}), children: /* @__PURE__ */
|
|
32
|
-
] }),
|
|
33
|
-
|
|
32
|
+
}), children: /* @__PURE__ */ n.jsx(M, {}) })
|
|
33
|
+
] }) }) : /* @__PURE__ */ n.jsxs(_, { to: e.linkTo ?? "/", className: a("nav-link", i.navButton), children: [
|
|
34
|
+
/* @__PURE__ */ n.jsx("div", { className: a("icon", i.icon), children: e.icon }),
|
|
35
|
+
s && /* @__PURE__ */ n.jsx("div", { className: a("text", i.text, "text-nowrap"), children: e.title })
|
|
36
|
+
] }) }),
|
|
37
|
+
/* @__PURE__ */ n.jsx("div", { className: a("children-container", i.childrenContainer, {
|
|
34
38
|
[i.visible]: t
|
|
35
|
-
}), children: (
|
|
36
|
-
] })
|
|
37
|
-
|
|
38
|
-
s && /* @__PURE__ */ e.jsx("div", { className: o("text", i.text, "text-nowrap"), children: n.title })
|
|
39
|
-
] }) }) });
|
|
40
|
-
}, K = "_side-menu_n1hvm_1", q = "_sidebar-header_n1hvm_13", z = "_side-menu-content_n1hvm_18", D = "_expand_n1hvm_22", G = "_divider_n1hvm_26", p = {
|
|
39
|
+
}), children: /* @__PURE__ */ n.jsx("div", { className: a("shadow rounded children", i.children), children: (x = e.children) == null ? void 0 : x.map((m) => /* @__PURE__ */ n.jsx(_, { to: m.linkTo ?? "/", className: a("nav-link child rounded", i.navButton, i.child), children: /* @__PURE__ */ n.jsx("div", { className: a("text", i.text, "text-nowrap"), children: m.title }) }, m.linkTo)) }) })
|
|
40
|
+
] });
|
|
41
|
+
}, K = "_side-menu_n1hvm_1", z = "_sidebar-header_n1hvm_13", D = "_side-menu-content_n1hvm_18", G = "_expand_n1hvm_22", J = "_divider_n1hvm_26", p = {
|
|
41
42
|
"side-menu": "_side-menu_n1hvm_1",
|
|
42
43
|
sideMenu: K,
|
|
43
44
|
"sidebar-header": "_sidebar-header_n1hvm_13",
|
|
44
|
-
sidebarHeader:
|
|
45
|
+
sidebarHeader: z,
|
|
45
46
|
"side-menu-content": "_side-menu-content_n1hvm_18",
|
|
46
|
-
sideMenuContent:
|
|
47
|
-
expand:
|
|
48
|
-
divider:
|
|
49
|
-
},
|
|
50
|
-
const [
|
|
51
|
-
d(
|
|
47
|
+
sideMenuContent: D,
|
|
48
|
+
expand: G,
|
|
49
|
+
divider: J
|
|
50
|
+
}, en = ({ headerItem: e, mainItems: s, secondaryItems: t, expanded: o, setExpanded: l, currentPath: _ }) => {
|
|
51
|
+
const [u, d] = N(-1), h = (r) => {
|
|
52
|
+
d(r === u ? -1 : r);
|
|
52
53
|
};
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
}, [
|
|
56
|
-
[p.expand]:
|
|
57
|
-
}, { expand:
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
s.map((
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
t.map((
|
|
54
|
+
return f(() => {
|
|
55
|
+
o || d(-1);
|
|
56
|
+
}, [o]), /* @__PURE__ */ n.jsxs("section", { className: a("luminus-side-menu", p.sideMenu, {
|
|
57
|
+
[p.expand]: o
|
|
58
|
+
}, { expand: o }), onMouseEnter: () => l(!0), onMouseLeave: () => l(!1), children: [
|
|
59
|
+
/* @__PURE__ */ n.jsx("div", { className: a("sidebar-header", p.sidebarHeader), children: e }),
|
|
60
|
+
/* @__PURE__ */ n.jsxs("ul", { className: p.sideMenuContent, children: [
|
|
61
|
+
s.map((r, c) => /* @__PURE__ */ n.jsx(v, { item: r, menuExpanded: o, collapsed: c === u, onCollapse: () => h(c), currentPath: _ }, r.title)),
|
|
62
|
+
/* @__PURE__ */ n.jsx("hr", { className: a("divider", p.divider) }),
|
|
63
|
+
t.map((r, c) => /* @__PURE__ */ n.jsx(v, { item: r, menuExpanded: o, collapsed: c === u, onCollapse: () => h(c), currentPath: _ }, r.title))
|
|
63
64
|
] })
|
|
64
65
|
] });
|
|
65
|
-
},
|
|
66
|
+
}, P = "_top-bar_1lk80_1", Q = "_top-bar-brand_1lk80_14", j = {
|
|
66
67
|
"top-bar": "_top-bar_1lk80_1",
|
|
67
|
-
topBar:
|
|
68
|
+
topBar: P,
|
|
68
69
|
"top-bar-brand": "_top-bar-brand_1lk80_14",
|
|
69
|
-
topBarBrand:
|
|
70
|
-
},
|
|
71
|
-
const { LinkComponent:
|
|
72
|
-
return /* @__PURE__ */
|
|
70
|
+
topBarBrand: Q
|
|
71
|
+
}, sn = ({ appName: e, leftOffset: s, centerContent: t, rightContent: o }) => {
|
|
72
|
+
const { LinkComponent: l } = w(b);
|
|
73
|
+
return /* @__PURE__ */ n.jsxs("nav", { className: a("luminus-top-bar", j.topBar), style: {
|
|
73
74
|
width: s ? `calc(100% - ${s}px)` : void 0,
|
|
74
75
|
left: s ? `${s}px` : void 0
|
|
75
76
|
}, children: [
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
t && /* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ n.jsx(l, { to: "/", className: a("luminus-top-bar-brand", j.topBarBrand), children: e }),
|
|
78
|
+
t && /* @__PURE__ */ n.jsx("div", { children: t }),
|
|
79
|
+
/* @__PURE__ */ n.jsx("div", { className: "d-flex justify-content-end align-items-center gap-2", children: o ?? null })
|
|
79
80
|
] });
|
|
80
|
-
},
|
|
81
|
+
}, U = "_side-content-bar_17kwd_1", V = {
|
|
81
82
|
"side-content-bar": "_side-content-bar_17kwd_1",
|
|
82
|
-
sideContentBar:
|
|
83
|
-
},
|
|
84
|
-
width: `${
|
|
85
|
-
}, children: s }),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
83
|
+
sideContentBar: U
|
|
84
|
+
}, C = ({ width: e, children: s }) => /* @__PURE__ */ n.jsx("section", { className: a("luminus-side-content-bar", V.sideContentBar), style: {
|
|
85
|
+
width: `${e}px`
|
|
86
|
+
}, children: s }), B = ({ title: e }) => /* @__PURE__ */ n.jsx("div", { className: "mb-3", children: typeof e == "string" ? /* @__PURE__ */ n.jsx(q, { variant: "h3", children: e }) : e }), tn = ({ title: e, children: s, sideContent: t }) => /* @__PURE__ */ n.jsxs("div", { className: "container-fluid p-3", children: [
|
|
87
|
+
/* @__PURE__ */ n.jsxs("div", { style: { paddingRight: t ? "250px" : void 0 }, children: [
|
|
88
|
+
e ? /* @__PURE__ */ n.jsx(B, { title: e }) : null,
|
|
88
89
|
s
|
|
89
90
|
] }),
|
|
90
|
-
t && /* @__PURE__ */
|
|
91
|
-
] }),
|
|
91
|
+
t && /* @__PURE__ */ n.jsx(C, { width: 250, children: t })
|
|
92
|
+
] }), W = "_full-screen-container_1rm4r_1", X = {
|
|
92
93
|
"full-screen-container": "_full-screen-container_1rm4r_1",
|
|
93
|
-
fullScreenContainer:
|
|
94
|
-
},
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
|
|
94
|
+
fullScreenContainer: W
|
|
95
|
+
}, an = ({ title: e, children: s, sideContent: t }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
96
|
+
/* @__PURE__ */ n.jsxs("div", { className: a("ontainer-fluid p-3 overflow-hidden luminus-full-screen-container", X.fullScreenContainer), style: { width: t ? "calc(100% - 250px)" : "100%" }, children: [
|
|
97
|
+
e ? /* @__PURE__ */ n.jsx(B, { title: e }) : null,
|
|
97
98
|
s
|
|
98
99
|
] }),
|
|
99
|
-
t && /* @__PURE__ */
|
|
100
|
+
t && /* @__PURE__ */ n.jsx(C, { width: 250, children: t })
|
|
100
101
|
] });
|
|
101
102
|
export {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
an as FullScreenContainer,
|
|
104
|
+
tn as MainContainer,
|
|
105
|
+
C as SideContentBar,
|
|
106
|
+
en as SideMenu,
|
|
107
|
+
sn as TopBar
|
|
107
108
|
};
|