jcicl 0.0.17 → 0.0.19
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/.chunks/ButtonBase.js +2 -1
- package/.chunks/DefaultPropsProvider.js +10 -10
- package/.chunks/ListContext.js +6 -0
- package/.chunks/Menu.js +489 -628
- package/.chunks/NavLink.js +436 -0
- package/.chunks/NavLinkButton.js +259 -0
- package/.chunks/TransitionGroupContext.js +69 -297
- package/.chunks/emotion-react.browser.esm.js +231 -0
- package/.chunks/index.js +131 -0
- package/.chunks/isHostComponent.js +17 -0
- package/README.md +1 -7
- package/base/Avatar/Avatar/Avatar.d.ts +8 -0
- package/base/Avatar/Avatar/Avatar.js +38 -0
- package/base/Avatar/Avatar/index.js +2 -2
- package/base/Avatar/AvatarWithImage/AvatarWithImage.d.ts +10 -0
- package/{.chunks → base/Avatar/AvatarWithImage}/AvatarWithImage.js +9 -8
- package/base/Avatar/AvatarWithImage/index.js +2 -2
- package/base/Avatar/index.js +3 -3
- package/base/Button/Button.d.ts +7 -0
- package/{.chunks → base/Button}/Button.js +7 -6
- package/base/Button/index.js +2 -2
- package/base/Divider/Divider.d.ts +10 -0
- package/{.chunks → base/Divider}/Divider.js +12 -11
- package/base/Divider/index.js +2 -2
- package/base/Flex/Flex.d.ts +19 -0
- package/{.chunks → base/Flex}/Flex.js +7 -7
- package/base/Flex/index.js +2 -2
- package/base/Grid/Grid.d.ts +14 -0
- package/base/Grid/Grid.js +19 -0
- package/base/Grid/index.js +2 -2
- package/base/Input/Input.d.ts +3 -0
- package/{.chunks → base/Input}/Input.js +21 -18
- package/base/Input/index.js +2 -2
- package/base/index.js +12 -12
- package/composite/ContactCard/ContactCard.d.ts +2 -0
- package/composite/ContactCard/ContactCard.js +1 -0
- package/composite/ContactListItem/ContactListItem.d.ts +1 -0
- package/composite/ContactListItem/ContactListItem.js +1 -0
- package/index.js +19 -17
- package/package.json +1 -1
- package/supercomposite/AppBar/AppBar.d.ts +5 -0
- package/{.chunks → supercomposite/AppBar}/AppBar.js +14 -13
- package/supercomposite/AppBar/index.js +2 -2
- package/supercomposite/AppHeader/AppHeader.d.ts +7 -0
- package/supercomposite/AppHeader/AppHeader.js +31 -0
- package/supercomposite/AppHeader/index.js +2 -2
- package/supercomposite/CompactNav/CompactNav.d.ts +17 -0
- package/{.chunks → supercomposite/CompactNav}/CompactNav.js +14 -12
- package/supercomposite/CompactNav/index.js +2 -2
- package/supercomposite/Nav/Nav.d.ts +13 -0
- package/supercomposite/Nav/Nav.js +626 -0
- package/supercomposite/Nav/index.js +1 -1
- package/supercomposite/Nav/subcomponents/NavItem/NavItem.d.ts +3 -0
- package/supercomposite/Nav/subcomponents/NavItem/NavItem.js +34 -0
- package/supercomposite/Nav/subcomponents/NavItem/subcomponents/NavLink.d.ts +3 -0
- package/supercomposite/Nav/subcomponents/NavItem/subcomponents/NavLink.js +8 -0
- package/supercomposite/Nav/subcomponents/NavItem/subcomponents/NavLinkButton.d.ts +19 -0
- package/supercomposite/Nav/subcomponents/NavItem/subcomponents/NavLinkButton.js +8 -0
- package/supercomposite/Nav/subcomponents/NavItem/subcomponents/NavLinkText.d.ts +8 -0
- package/supercomposite/Nav/subcomponents/NavItem/subcomponents/NavLinkText.js +425 -0
- package/supercomposite/Nav/subcomponents/NavItem/subcomponents/NavMenu.d.ts +20 -0
- package/supercomposite/Nav/subcomponents/NavItem/subcomponents/NavMenu.js +432 -0
- package/supercomposite/Nav/subcomponents/NavItem/types.d.ts +12 -0
- package/supercomposite/Nav/subcomponents/NavItem/types.js +1 -0
- package/supercomposite/Nav/types.d.ts +2 -0
- package/supercomposite/Nav/types.js +1 -0
- package/supercomposite/index.js +6 -6
- package/templates/AppContainer/AppContainer.d.ts +10 -0
- package/templates/AppContainer/AppContainer.js +73 -0
- package/templates/AppContainer/index.js +2 -2
- package/templates/BasicPage/BasicPage.d.ts +9 -0
- package/templates/BasicPage/BasicPage.js +31 -0
- package/templates/BasicPage/index.js +2 -2
- package/templates/index.js +4 -4
- package/.chunks/AppContainer.js +0 -70
- package/.chunks/AppHeader.js +0 -31
- package/.chunks/Avatar.js +0 -38
- package/.chunks/BasicPage.js +0 -31
- package/.chunks/Grid.js +0 -18
- package/.chunks/Nav.js +0 -2139
|
@@ -0,0 +1,626 @@
|
|
|
1
|
+
import { jsx as l, jsxs as H, Fragment as le } from "react/jsx-runtime";
|
|
2
|
+
import * as x from "react";
|
|
3
|
+
import { useState as ce, createElement as de } from "react";
|
|
4
|
+
import { n as q } from "../../.chunks/emotion-styled.browser.esm.js";
|
|
5
|
+
import { c as J } from "../../.chunks/createSvgIcon.js";
|
|
6
|
+
import v from "../../assets/theme.js";
|
|
7
|
+
import { Divider as fe } from "../../base/Divider/Divider.js";
|
|
8
|
+
import { NavItem as U } from "./subcomponents/NavItem/NavItem.js";
|
|
9
|
+
import { C as ue } from "../../.chunks/NavLinkButton.js";
|
|
10
|
+
import { P as r, a as me, g as he, s as V, r as ge, e as L, u as xe, c as O, b as ye } from "../../.chunks/DefaultPropsProvider.js";
|
|
11
|
+
import { e as we, H as be, u as G, a as ve, d as Ee, o as K, T as Pe, r as Te, g as X, b as ke, P as De, c as Re, i as Ce } from "../../.chunks/Menu.js";
|
|
12
|
+
import { m as Q } from "../../.chunks/memoTheme.js";
|
|
13
|
+
import { c as $e, a as Se } from "../../.chunks/TransitionGroupContext.js";
|
|
14
|
+
import { L as Be } from "../../.chunks/NavLink.js";
|
|
15
|
+
function Me(t, e, o) {
|
|
16
|
+
const n = e.getBoundingClientRect(), a = o && o.getBoundingClientRect(), h = K(e);
|
|
17
|
+
let s;
|
|
18
|
+
if (e.fakeTransform)
|
|
19
|
+
s = e.fakeTransform;
|
|
20
|
+
else {
|
|
21
|
+
const d = h.getComputedStyle(e);
|
|
22
|
+
s = d.getPropertyValue("-webkit-transform") || d.getPropertyValue("transform");
|
|
23
|
+
}
|
|
24
|
+
let p = 0, c = 0;
|
|
25
|
+
if (s && s !== "none" && typeof s == "string") {
|
|
26
|
+
const d = s.split("(")[1].split(")")[0].split(",");
|
|
27
|
+
p = parseInt(d[4], 10), c = parseInt(d[5], 10);
|
|
28
|
+
}
|
|
29
|
+
return t === "left" ? a ? `translateX(${a.right + p - n.left}px)` : `translateX(${h.innerWidth + p - n.left}px)` : t === "right" ? a ? `translateX(-${n.right - a.left - p}px)` : `translateX(-${n.left + n.width - p}px)` : t === "up" ? a ? `translateY(${a.bottom + c - n.top}px)` : `translateY(${h.innerHeight + c - n.top}px)` : a ? `translateY(-${n.top - a.top + n.height - c}px)` : `translateY(-${n.top + n.height - c}px)`;
|
|
30
|
+
}
|
|
31
|
+
function Z(t) {
|
|
32
|
+
return typeof t == "function" ? t() : t;
|
|
33
|
+
}
|
|
34
|
+
function z(t, e, o) {
|
|
35
|
+
const n = Z(o), a = Me(t, e, n);
|
|
36
|
+
a && (e.style.webkitTransform = a, e.style.transform = a);
|
|
37
|
+
}
|
|
38
|
+
const ee = /* @__PURE__ */ x.forwardRef(function(e, o) {
|
|
39
|
+
const n = G(), a = {
|
|
40
|
+
enter: n.transitions.easing.easeOut,
|
|
41
|
+
exit: n.transitions.easing.sharp
|
|
42
|
+
}, h = {
|
|
43
|
+
enter: n.transitions.duration.enteringScreen,
|
|
44
|
+
exit: n.transitions.duration.leavingScreen
|
|
45
|
+
}, {
|
|
46
|
+
addEndListener: s,
|
|
47
|
+
appear: p = !0,
|
|
48
|
+
children: c,
|
|
49
|
+
container: d,
|
|
50
|
+
direction: m = "down",
|
|
51
|
+
easing: D = a,
|
|
52
|
+
in: y,
|
|
53
|
+
onEnter: $,
|
|
54
|
+
onEntered: N,
|
|
55
|
+
onEntering: S,
|
|
56
|
+
onExit: E,
|
|
57
|
+
onExited: R,
|
|
58
|
+
onExiting: A,
|
|
59
|
+
style: C,
|
|
60
|
+
timeout: P = h,
|
|
61
|
+
// eslint-disable-next-line react/prop-types
|
|
62
|
+
TransitionComponent: T = Pe,
|
|
63
|
+
...k
|
|
64
|
+
} = e, u = x.useRef(null), j = Se(ve(c), u, o), w = (i) => (f) => {
|
|
65
|
+
i && (f === void 0 ? i(u.current) : i(u.current, f));
|
|
66
|
+
}, b = w((i, f) => {
|
|
67
|
+
z(m, i, d), Te(i), $ && $(i, f);
|
|
68
|
+
}), g = w((i, f) => {
|
|
69
|
+
const F = X({
|
|
70
|
+
timeout: P,
|
|
71
|
+
style: C,
|
|
72
|
+
easing: D
|
|
73
|
+
}, {
|
|
74
|
+
mode: "enter"
|
|
75
|
+
});
|
|
76
|
+
i.style.webkitTransition = n.transitions.create("-webkit-transform", {
|
|
77
|
+
...F
|
|
78
|
+
}), i.style.transition = n.transitions.create("transform", {
|
|
79
|
+
...F
|
|
80
|
+
}), i.style.webkitTransform = "none", i.style.transform = "none", S && S(i, f);
|
|
81
|
+
}), B = w(N), M = w(A), ae = w((i) => {
|
|
82
|
+
const f = X({
|
|
83
|
+
timeout: P,
|
|
84
|
+
style: C,
|
|
85
|
+
easing: D
|
|
86
|
+
}, {
|
|
87
|
+
mode: "exit"
|
|
88
|
+
});
|
|
89
|
+
i.style.webkitTransition = n.transitions.create("-webkit-transform", f), i.style.transition = n.transitions.create("transform", f), z(m, i, d), E && E(i);
|
|
90
|
+
}), se = w((i) => {
|
|
91
|
+
i.style.webkitTransition = "", i.style.transition = "", R && R(i);
|
|
92
|
+
}), pe = (i) => {
|
|
93
|
+
s && s(u.current, i);
|
|
94
|
+
}, W = x.useCallback(() => {
|
|
95
|
+
u.current && z(m, u.current, d);
|
|
96
|
+
}, [m, d]);
|
|
97
|
+
return x.useEffect(() => {
|
|
98
|
+
if (y || m === "down" || m === "right")
|
|
99
|
+
return;
|
|
100
|
+
const i = Ee(() => {
|
|
101
|
+
u.current && z(m, u.current, d);
|
|
102
|
+
}), f = K(u.current);
|
|
103
|
+
return f.addEventListener("resize", i), () => {
|
|
104
|
+
i.clear(), f.removeEventListener("resize", i);
|
|
105
|
+
};
|
|
106
|
+
}, [m, y, d]), x.useEffect(() => {
|
|
107
|
+
y || W();
|
|
108
|
+
}, [y, W]), /* @__PURE__ */ l(T, {
|
|
109
|
+
nodeRef: u,
|
|
110
|
+
onEnter: b,
|
|
111
|
+
onEntered: B,
|
|
112
|
+
onEntering: g,
|
|
113
|
+
onExit: ae,
|
|
114
|
+
onExited: se,
|
|
115
|
+
onExiting: M,
|
|
116
|
+
addEndListener: pe,
|
|
117
|
+
appear: p,
|
|
118
|
+
in: y,
|
|
119
|
+
timeout: P,
|
|
120
|
+
...k,
|
|
121
|
+
children: (i, f) => /* @__PURE__ */ x.cloneElement(c, {
|
|
122
|
+
ref: j,
|
|
123
|
+
style: {
|
|
124
|
+
visibility: i === "exited" && !y ? "hidden" : void 0,
|
|
125
|
+
...C,
|
|
126
|
+
...c.props.style
|
|
127
|
+
},
|
|
128
|
+
...f
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
133
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
134
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
135
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
136
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
137
|
+
/**
|
|
138
|
+
* Add a custom transition end trigger. Called with the transitioning DOM
|
|
139
|
+
* node and a done callback. Allows for more fine grained transition end
|
|
140
|
+
* logic. Note: Timeouts are still used as a fallback if provided.
|
|
141
|
+
*/
|
|
142
|
+
addEndListener: r.func,
|
|
143
|
+
/**
|
|
144
|
+
* Perform the enter transition when it first mounts if `in` is also `true`.
|
|
145
|
+
* Set this to `false` to disable this behavior.
|
|
146
|
+
* @default true
|
|
147
|
+
*/
|
|
148
|
+
appear: r.bool,
|
|
149
|
+
/**
|
|
150
|
+
* A single child content element.
|
|
151
|
+
*/
|
|
152
|
+
children: we.isRequired,
|
|
153
|
+
/**
|
|
154
|
+
* An HTML element, or a function that returns one.
|
|
155
|
+
* It's used to set the container the Slide is transitioning from.
|
|
156
|
+
*/
|
|
157
|
+
container: $e(r.oneOfType([be, r.func]), (t) => {
|
|
158
|
+
if (t.open) {
|
|
159
|
+
const e = Z(t.container);
|
|
160
|
+
if (e && e.nodeType === 1) {
|
|
161
|
+
const o = e.getBoundingClientRect();
|
|
162
|
+
if (process.env.NODE_ENV !== "test" && o.top === 0 && o.left === 0 && o.right === 0 && o.bottom === 0)
|
|
163
|
+
return new Error(["MUI: The `container` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
|
|
164
|
+
`));
|
|
165
|
+
} else if (!e || typeof e.getBoundingClientRect != "function" || e.contextElement != null && e.contextElement.nodeType !== 1)
|
|
166
|
+
return new Error(["MUI: The `container` prop provided to the component is invalid.", "It should be an HTML element instance."].join(`
|
|
167
|
+
`));
|
|
168
|
+
}
|
|
169
|
+
return null;
|
|
170
|
+
}),
|
|
171
|
+
/**
|
|
172
|
+
* Direction the child node will enter from.
|
|
173
|
+
* @default 'down'
|
|
174
|
+
*/
|
|
175
|
+
direction: r.oneOf(["down", "left", "right", "up"]),
|
|
176
|
+
/**
|
|
177
|
+
* The transition timing function.
|
|
178
|
+
* You may specify a single easing or a object containing enter and exit values.
|
|
179
|
+
* @default {
|
|
180
|
+
* enter: theme.transitions.easing.easeOut,
|
|
181
|
+
* exit: theme.transitions.easing.sharp,
|
|
182
|
+
* }
|
|
183
|
+
*/
|
|
184
|
+
easing: r.oneOfType([r.shape({
|
|
185
|
+
enter: r.string,
|
|
186
|
+
exit: r.string
|
|
187
|
+
}), r.string]),
|
|
188
|
+
/**
|
|
189
|
+
* If `true`, the component will transition in.
|
|
190
|
+
*/
|
|
191
|
+
in: r.bool,
|
|
192
|
+
/**
|
|
193
|
+
* @ignore
|
|
194
|
+
*/
|
|
195
|
+
onEnter: r.func,
|
|
196
|
+
/**
|
|
197
|
+
* @ignore
|
|
198
|
+
*/
|
|
199
|
+
onEntered: r.func,
|
|
200
|
+
/**
|
|
201
|
+
* @ignore
|
|
202
|
+
*/
|
|
203
|
+
onEntering: r.func,
|
|
204
|
+
/**
|
|
205
|
+
* @ignore
|
|
206
|
+
*/
|
|
207
|
+
onExit: r.func,
|
|
208
|
+
/**
|
|
209
|
+
* @ignore
|
|
210
|
+
*/
|
|
211
|
+
onExited: r.func,
|
|
212
|
+
/**
|
|
213
|
+
* @ignore
|
|
214
|
+
*/
|
|
215
|
+
onExiting: r.func,
|
|
216
|
+
/**
|
|
217
|
+
* @ignore
|
|
218
|
+
*/
|
|
219
|
+
style: r.object,
|
|
220
|
+
/**
|
|
221
|
+
* The duration for the transition, in milliseconds.
|
|
222
|
+
* You may specify a single timeout for all transitions, or individually with an object.
|
|
223
|
+
* @default {
|
|
224
|
+
* enter: theme.transitions.duration.enteringScreen,
|
|
225
|
+
* exit: theme.transitions.duration.leavingScreen,
|
|
226
|
+
* }
|
|
227
|
+
*/
|
|
228
|
+
timeout: r.oneOfType([r.number, r.shape({
|
|
229
|
+
appear: r.number,
|
|
230
|
+
enter: r.number,
|
|
231
|
+
exit: r.number
|
|
232
|
+
})])
|
|
233
|
+
});
|
|
234
|
+
function Oe(t) {
|
|
235
|
+
return me("MuiDrawer", t);
|
|
236
|
+
}
|
|
237
|
+
he("MuiDrawer", ["root", "docked", "paper", "paperAnchorLeft", "paperAnchorRight", "paperAnchorTop", "paperAnchorBottom", "paperAnchorDockedLeft", "paperAnchorDockedRight", "paperAnchorDockedTop", "paperAnchorDockedBottom", "modal"]);
|
|
238
|
+
const te = (t, e) => {
|
|
239
|
+
const {
|
|
240
|
+
ownerState: o
|
|
241
|
+
} = t;
|
|
242
|
+
return [e.root, (o.variant === "permanent" || o.variant === "persistent") && e.docked, e.modal];
|
|
243
|
+
}, ze = (t) => {
|
|
244
|
+
const {
|
|
245
|
+
classes: e,
|
|
246
|
+
anchor: o,
|
|
247
|
+
variant: n
|
|
248
|
+
} = t, a = {
|
|
249
|
+
root: ["root"],
|
|
250
|
+
docked: [(n === "permanent" || n === "persistent") && "docked"],
|
|
251
|
+
modal: ["modal"],
|
|
252
|
+
paper: ["paper", `paperAnchor${L(o)}`, n !== "temporary" && `paperAnchorDocked${L(o)}`]
|
|
253
|
+
};
|
|
254
|
+
return ye(a, Oe, e);
|
|
255
|
+
}, Le = V(ke, {
|
|
256
|
+
name: "MuiDrawer",
|
|
257
|
+
slot: "Root",
|
|
258
|
+
overridesResolver: te
|
|
259
|
+
})(Q(({
|
|
260
|
+
theme: t
|
|
261
|
+
}) => ({
|
|
262
|
+
zIndex: (t.vars || t).zIndex.drawer
|
|
263
|
+
}))), Y = V("div", {
|
|
264
|
+
shouldForwardProp: ge,
|
|
265
|
+
name: "MuiDrawer",
|
|
266
|
+
slot: "Docked",
|
|
267
|
+
skipVariantsResolver: !1,
|
|
268
|
+
overridesResolver: te
|
|
269
|
+
})({
|
|
270
|
+
flex: "0 0 auto"
|
|
271
|
+
}), Ne = V(De, {
|
|
272
|
+
name: "MuiDrawer",
|
|
273
|
+
slot: "Paper",
|
|
274
|
+
overridesResolver: (t, e) => {
|
|
275
|
+
const {
|
|
276
|
+
ownerState: o
|
|
277
|
+
} = t;
|
|
278
|
+
return [e.paper, e[`paperAnchor${L(o.anchor)}`], o.variant !== "temporary" && e[`paperAnchorDocked${L(o.anchor)}`]];
|
|
279
|
+
}
|
|
280
|
+
})(Q(({
|
|
281
|
+
theme: t
|
|
282
|
+
}) => ({
|
|
283
|
+
overflowY: "auto",
|
|
284
|
+
display: "flex",
|
|
285
|
+
flexDirection: "column",
|
|
286
|
+
height: "100%",
|
|
287
|
+
flex: "1 0 auto",
|
|
288
|
+
zIndex: (t.vars || t).zIndex.drawer,
|
|
289
|
+
// Add iOS momentum scrolling for iOS < 13.0
|
|
290
|
+
WebkitOverflowScrolling: "touch",
|
|
291
|
+
// temporary style
|
|
292
|
+
position: "fixed",
|
|
293
|
+
top: 0,
|
|
294
|
+
// We disable the focus ring for mouse, touch and keyboard users.
|
|
295
|
+
// At some point, it would be better to keep it for keyboard users.
|
|
296
|
+
// :focus-ring CSS pseudo-class will help.
|
|
297
|
+
outline: 0,
|
|
298
|
+
variants: [{
|
|
299
|
+
props: {
|
|
300
|
+
anchor: "left"
|
|
301
|
+
},
|
|
302
|
+
style: {
|
|
303
|
+
left: 0
|
|
304
|
+
}
|
|
305
|
+
}, {
|
|
306
|
+
props: {
|
|
307
|
+
anchor: "top"
|
|
308
|
+
},
|
|
309
|
+
style: {
|
|
310
|
+
top: 0,
|
|
311
|
+
left: 0,
|
|
312
|
+
right: 0,
|
|
313
|
+
height: "auto",
|
|
314
|
+
maxHeight: "100%"
|
|
315
|
+
}
|
|
316
|
+
}, {
|
|
317
|
+
props: {
|
|
318
|
+
anchor: "right"
|
|
319
|
+
},
|
|
320
|
+
style: {
|
|
321
|
+
right: 0
|
|
322
|
+
}
|
|
323
|
+
}, {
|
|
324
|
+
props: {
|
|
325
|
+
anchor: "bottom"
|
|
326
|
+
},
|
|
327
|
+
style: {
|
|
328
|
+
top: "auto",
|
|
329
|
+
left: 0,
|
|
330
|
+
bottom: 0,
|
|
331
|
+
right: 0,
|
|
332
|
+
height: "auto",
|
|
333
|
+
maxHeight: "100%"
|
|
334
|
+
}
|
|
335
|
+
}, {
|
|
336
|
+
props: ({
|
|
337
|
+
ownerState: e
|
|
338
|
+
}) => e.anchor === "left" && e.variant !== "temporary",
|
|
339
|
+
style: {
|
|
340
|
+
borderRight: `1px solid ${(t.vars || t).palette.divider}`
|
|
341
|
+
}
|
|
342
|
+
}, {
|
|
343
|
+
props: ({
|
|
344
|
+
ownerState: e
|
|
345
|
+
}) => e.anchor === "top" && e.variant !== "temporary",
|
|
346
|
+
style: {
|
|
347
|
+
borderBottom: `1px solid ${(t.vars || t).palette.divider}`
|
|
348
|
+
}
|
|
349
|
+
}, {
|
|
350
|
+
props: ({
|
|
351
|
+
ownerState: e
|
|
352
|
+
}) => e.anchor === "right" && e.variant !== "temporary",
|
|
353
|
+
style: {
|
|
354
|
+
borderLeft: `1px solid ${(t.vars || t).palette.divider}`
|
|
355
|
+
}
|
|
356
|
+
}, {
|
|
357
|
+
props: ({
|
|
358
|
+
ownerState: e
|
|
359
|
+
}) => e.anchor === "bottom" && e.variant !== "temporary",
|
|
360
|
+
style: {
|
|
361
|
+
borderTop: `1px solid ${(t.vars || t).palette.divider}`
|
|
362
|
+
}
|
|
363
|
+
}]
|
|
364
|
+
}))), re = {
|
|
365
|
+
left: "right",
|
|
366
|
+
right: "left",
|
|
367
|
+
top: "down",
|
|
368
|
+
bottom: "up"
|
|
369
|
+
};
|
|
370
|
+
function Ae(t) {
|
|
371
|
+
return ["left", "right"].includes(t);
|
|
372
|
+
}
|
|
373
|
+
function je({
|
|
374
|
+
direction: t
|
|
375
|
+
}, e) {
|
|
376
|
+
return t === "rtl" && Ae(e) ? re[e] : e;
|
|
377
|
+
}
|
|
378
|
+
const ne = /* @__PURE__ */ x.forwardRef(function(e, o) {
|
|
379
|
+
const n = xe({
|
|
380
|
+
props: e,
|
|
381
|
+
name: "MuiDrawer"
|
|
382
|
+
}), a = G(), h = Re(), s = {
|
|
383
|
+
enter: a.transitions.duration.enteringScreen,
|
|
384
|
+
exit: a.transitions.duration.leavingScreen
|
|
385
|
+
}, {
|
|
386
|
+
anchor: p = "left",
|
|
387
|
+
BackdropProps: c,
|
|
388
|
+
children: d,
|
|
389
|
+
className: m,
|
|
390
|
+
elevation: D = 16,
|
|
391
|
+
hideBackdrop: y = !1,
|
|
392
|
+
ModalProps: {
|
|
393
|
+
BackdropProps: $,
|
|
394
|
+
...N
|
|
395
|
+
} = {},
|
|
396
|
+
onClose: S,
|
|
397
|
+
open: E = !1,
|
|
398
|
+
PaperProps: R = {},
|
|
399
|
+
SlideProps: A,
|
|
400
|
+
// eslint-disable-next-line react/prop-types
|
|
401
|
+
TransitionComponent: C = ee,
|
|
402
|
+
transitionDuration: P = s,
|
|
403
|
+
variant: T = "temporary",
|
|
404
|
+
...k
|
|
405
|
+
} = n, u = x.useRef(!1);
|
|
406
|
+
x.useEffect(() => {
|
|
407
|
+
u.current = !0;
|
|
408
|
+
}, []);
|
|
409
|
+
const j = je({
|
|
410
|
+
direction: h ? "rtl" : "ltr"
|
|
411
|
+
}, p), b = {
|
|
412
|
+
...n,
|
|
413
|
+
anchor: p,
|
|
414
|
+
elevation: D,
|
|
415
|
+
open: E,
|
|
416
|
+
variant: T,
|
|
417
|
+
...k
|
|
418
|
+
}, g = ze(b), B = /* @__PURE__ */ l(Ne, {
|
|
419
|
+
elevation: T === "temporary" ? D : 0,
|
|
420
|
+
square: !0,
|
|
421
|
+
...R,
|
|
422
|
+
className: O(g.paper, R.className),
|
|
423
|
+
ownerState: b,
|
|
424
|
+
children: d
|
|
425
|
+
});
|
|
426
|
+
if (T === "permanent")
|
|
427
|
+
return /* @__PURE__ */ l(Y, {
|
|
428
|
+
className: O(g.root, g.docked, m),
|
|
429
|
+
ownerState: b,
|
|
430
|
+
ref: o,
|
|
431
|
+
...k,
|
|
432
|
+
children: B
|
|
433
|
+
});
|
|
434
|
+
const M = /* @__PURE__ */ l(C, {
|
|
435
|
+
in: E,
|
|
436
|
+
direction: re[j],
|
|
437
|
+
timeout: P,
|
|
438
|
+
appear: u.current,
|
|
439
|
+
...A,
|
|
440
|
+
children: B
|
|
441
|
+
});
|
|
442
|
+
return T === "persistent" ? /* @__PURE__ */ l(Y, {
|
|
443
|
+
className: O(g.root, g.docked, m),
|
|
444
|
+
ownerState: b,
|
|
445
|
+
ref: o,
|
|
446
|
+
...k,
|
|
447
|
+
children: M
|
|
448
|
+
}) : /* @__PURE__ */ l(Le, {
|
|
449
|
+
BackdropProps: {
|
|
450
|
+
...c,
|
|
451
|
+
...$,
|
|
452
|
+
transitionDuration: P
|
|
453
|
+
},
|
|
454
|
+
className: O(g.root, g.modal, m),
|
|
455
|
+
open: E,
|
|
456
|
+
ownerState: b,
|
|
457
|
+
onClose: S,
|
|
458
|
+
hideBackdrop: y,
|
|
459
|
+
ref: o,
|
|
460
|
+
...k,
|
|
461
|
+
...N,
|
|
462
|
+
children: M
|
|
463
|
+
});
|
|
464
|
+
});
|
|
465
|
+
process.env.NODE_ENV !== "production" && (ne.propTypes = {
|
|
466
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
467
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
468
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
469
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
470
|
+
/**
|
|
471
|
+
* Side from which the drawer will appear.
|
|
472
|
+
* @default 'left'
|
|
473
|
+
*/
|
|
474
|
+
anchor: r.oneOf(["bottom", "left", "right", "top"]),
|
|
475
|
+
/**
|
|
476
|
+
* @ignore
|
|
477
|
+
*/
|
|
478
|
+
BackdropProps: r.object,
|
|
479
|
+
/**
|
|
480
|
+
* The content of the component.
|
|
481
|
+
*/
|
|
482
|
+
children: r.node,
|
|
483
|
+
/**
|
|
484
|
+
* Override or extend the styles applied to the component.
|
|
485
|
+
*/
|
|
486
|
+
classes: r.object,
|
|
487
|
+
/**
|
|
488
|
+
* @ignore
|
|
489
|
+
*/
|
|
490
|
+
className: r.string,
|
|
491
|
+
/**
|
|
492
|
+
* The elevation of the drawer.
|
|
493
|
+
* @default 16
|
|
494
|
+
*/
|
|
495
|
+
elevation: Ce,
|
|
496
|
+
/**
|
|
497
|
+
* If `true`, the backdrop is not rendered.
|
|
498
|
+
* @default false
|
|
499
|
+
*/
|
|
500
|
+
hideBackdrop: r.bool,
|
|
501
|
+
/**
|
|
502
|
+
* Props applied to the [`Modal`](https://mui.com/material-ui/api/modal/) element.
|
|
503
|
+
* @default {}
|
|
504
|
+
*/
|
|
505
|
+
ModalProps: r.object,
|
|
506
|
+
/**
|
|
507
|
+
* Callback fired when the component requests to be closed.
|
|
508
|
+
* The `reason` parameter can optionally be used to control the response to `onClose`.
|
|
509
|
+
*
|
|
510
|
+
* @param {object} event The event source of the callback.
|
|
511
|
+
* @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
|
|
512
|
+
*/
|
|
513
|
+
onClose: r.func,
|
|
514
|
+
/**
|
|
515
|
+
* If `true`, the component is shown.
|
|
516
|
+
* @default false
|
|
517
|
+
*/
|
|
518
|
+
open: r.bool,
|
|
519
|
+
/**
|
|
520
|
+
* Props applied to the [`Paper`](https://mui.com/material-ui/api/paper/) element.
|
|
521
|
+
* @default {}
|
|
522
|
+
*/
|
|
523
|
+
PaperProps: r.object,
|
|
524
|
+
/**
|
|
525
|
+
* Props applied to the [`Slide`](https://mui.com/material-ui/api/slide/) element.
|
|
526
|
+
*/
|
|
527
|
+
SlideProps: r.object,
|
|
528
|
+
/**
|
|
529
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
530
|
+
*/
|
|
531
|
+
sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
|
|
532
|
+
/**
|
|
533
|
+
* The duration for the transition, in milliseconds.
|
|
534
|
+
* You may specify a single timeout for all transitions, or individually with an object.
|
|
535
|
+
* @default {
|
|
536
|
+
* enter: theme.transitions.duration.enteringScreen,
|
|
537
|
+
* exit: theme.transitions.duration.leavingScreen,
|
|
538
|
+
* }
|
|
539
|
+
*/
|
|
540
|
+
transitionDuration: r.oneOfType([r.number, r.shape({
|
|
541
|
+
appear: r.number,
|
|
542
|
+
enter: r.number,
|
|
543
|
+
exit: r.number
|
|
544
|
+
})]),
|
|
545
|
+
/**
|
|
546
|
+
* The variant to use.
|
|
547
|
+
* @default 'temporary'
|
|
548
|
+
*/
|
|
549
|
+
variant: r.oneOf(["permanent", "persistent", "temporary"])
|
|
550
|
+
});
|
|
551
|
+
const I = J(/* @__PURE__ */ l("path", {
|
|
552
|
+
d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"
|
|
553
|
+
}), "ChevronLeft"), _ = J(/* @__PURE__ */ l("path", {
|
|
554
|
+
d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
555
|
+
}), "ChevronRight"), oe = ["collapsed", "withAppBar"], ie = q(ne, { shouldForwardProp: (t) => !oe.includes(t) })(({ collapsed: t, anchor: e, withAppBar: o }) => ({
|
|
556
|
+
minWidth: t ? 0 : `${v.constants.navBarWidth}px`,
|
|
557
|
+
width: t ? "auto" : "81px",
|
|
558
|
+
transition: "201ms all ease-out",
|
|
559
|
+
flexShrink: 0,
|
|
560
|
+
zIndex: 100,
|
|
561
|
+
".MuiPaper-root": {
|
|
562
|
+
padding: 0,
|
|
563
|
+
transition: "313ms all ease-in-out",
|
|
564
|
+
minWidth: t ? 0 : `${v.constants.navBarWidth}px`,
|
|
565
|
+
width: t ? "auto" : "81px",
|
|
566
|
+
boxSizing: "border-box",
|
|
567
|
+
backgroundColor: v.colors.midnight,
|
|
568
|
+
color: v.colors.white,
|
|
569
|
+
boxShadow: "0px 0px 7px 4px rgba(0, 0, 0, 0.63)",
|
|
570
|
+
overflowX: "hidden",
|
|
571
|
+
height: e === "top" || e === "bottom" ? "auto" : o ? `calc(100% - ${v.constants.appBarHeight}px)` : "100%",
|
|
572
|
+
top: e !== "bottom" ? o ? `${v.constants.appBarHeight}px` : 0 : void 0
|
|
573
|
+
}
|
|
574
|
+
})), He = q(ie, { shouldForwardProp: (t) => !oe.includes(t) })`
|
|
575
|
+
.MuiPaper-root {
|
|
576
|
+
width: 100%;
|
|
577
|
+
display: flex;
|
|
578
|
+
flex-wrap: wrap;
|
|
579
|
+
flex-direction: row;
|
|
580
|
+
align-items: center;
|
|
581
|
+
li {
|
|
582
|
+
width: auto;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
`, Ze = ({ navItems: t, anchor: e = "left", collapsible: o, ...n }) => {
|
|
586
|
+
const [a, h] = ce(!1), s = e === "top" || e === "bottom" ? "horizontal" : "vertical";
|
|
587
|
+
return s === "horizontal" ? /* @__PURE__ */ l(He, { ...n, anchor: e, variant: "permanent", children: t == null ? void 0 : t.map((p, c) => /* @__PURE__ */ de(
|
|
588
|
+
U,
|
|
589
|
+
{
|
|
590
|
+
...p,
|
|
591
|
+
menuOrientation: s,
|
|
592
|
+
menuPosition: e,
|
|
593
|
+
key: `${JSON.stringify(p)}-${c}`
|
|
594
|
+
}
|
|
595
|
+
)) }) : /* @__PURE__ */ H(ie, { ...n, anchor: e, variant: "permanent", collapsed: a, children: [
|
|
596
|
+
o && /* @__PURE__ */ H(le, { children: [
|
|
597
|
+
/* @__PURE__ */ l(Be, { disablePadding: !0, children: /* @__PURE__ */ H(
|
|
598
|
+
ue,
|
|
599
|
+
{
|
|
600
|
+
onClick: () => h(!a),
|
|
601
|
+
menuOrientation: s,
|
|
602
|
+
menuPosition: e,
|
|
603
|
+
children: [
|
|
604
|
+
e === "left" && (a ? /* @__PURE__ */ l(_, {}) : /* @__PURE__ */ l(I, {})),
|
|
605
|
+
e === "right" && (a ? /* @__PURE__ */ l(I, {}) : /* @__PURE__ */ l(_, {}))
|
|
606
|
+
]
|
|
607
|
+
}
|
|
608
|
+
) }),
|
|
609
|
+
/* @__PURE__ */ l(fe, { color: v.colors.white, opacity: 0.5, spacing: 0 })
|
|
610
|
+
] }),
|
|
611
|
+
t == null ? void 0 : t.map((p, c) => /* @__PURE__ */ l(
|
|
612
|
+
U,
|
|
613
|
+
{
|
|
614
|
+
...p,
|
|
615
|
+
menuOrientation: s,
|
|
616
|
+
menuPosition: e,
|
|
617
|
+
collapsed: a
|
|
618
|
+
},
|
|
619
|
+
`${JSON.stringify(p)}-${c}`
|
|
620
|
+
))
|
|
621
|
+
] });
|
|
622
|
+
};
|
|
623
|
+
export {
|
|
624
|
+
Ze as Nav,
|
|
625
|
+
Ze as default
|
|
626
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Divider as a } from "../../../../base/Divider/Divider.js";
|
|
3
|
+
import { N as l } from "../../../../.chunks/NavLink.js";
|
|
4
|
+
import { NavMenu as n } from "./subcomponents/NavMenu.js";
|
|
5
|
+
import c from "../../../../assets/theme.js";
|
|
6
|
+
const v = ({
|
|
7
|
+
type: i = "link",
|
|
8
|
+
menuOrientation: r,
|
|
9
|
+
menuPosition: e,
|
|
10
|
+
...t
|
|
11
|
+
}) => {
|
|
12
|
+
switch (i) {
|
|
13
|
+
case "link":
|
|
14
|
+
return /* @__PURE__ */ o(l, { ...t, menuOrientation: r });
|
|
15
|
+
case "menu":
|
|
16
|
+
return /* @__PURE__ */ o(n, { menuOrientation: r, position: e, ...t });
|
|
17
|
+
case "divider":
|
|
18
|
+
return /* @__PURE__ */ o(
|
|
19
|
+
a,
|
|
20
|
+
{
|
|
21
|
+
color: c.colors.white,
|
|
22
|
+
opacity: 0.5,
|
|
23
|
+
spacing: 0,
|
|
24
|
+
orientation: r === "horizontal" ? "vertical" : "horizontal"
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
default:
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
v as NavItem,
|
|
33
|
+
v as default
|
|
34
|
+
};
|