jcicl 0.0.18 → 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/{.chunks → templates/AppContainer}/AppContainer.js +7 -7
- 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/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,432 @@
|
|
|
1
|
+
import { jsx as r, jsxs as U, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
+
import { n as G } from "../../../../../.chunks/emotion-styled.browser.esm.js";
|
|
3
|
+
import * as N from "react";
|
|
4
|
+
import { useState as J } from "react";
|
|
5
|
+
import { N as le } from "../../../../../.chunks/NavLinkButton.js";
|
|
6
|
+
import { NavLinkText as pe } from "./NavLinkText.js";
|
|
7
|
+
import { Divider as ce } from "../../../../../base/Divider/Divider.js";
|
|
8
|
+
import { L as de, N as ue } from "../../../../../.chunks/NavLink.js";
|
|
9
|
+
import K from "../../../../../assets/theme.js";
|
|
10
|
+
import { u as he, T as fe, g as V, L as me, M as ge } from "../../../../../.chunks/Menu.js";
|
|
11
|
+
import { c as Q } from "../../../../../.chunks/createSvgIcon.js";
|
|
12
|
+
import { g as xe, a as ye, s as O, u as we, c as Ee, P as e, b as ze, f as be } from "../../../../../.chunks/DefaultPropsProvider.js";
|
|
13
|
+
import { m as Te } from "../../../../../.chunks/memoTheme.js";
|
|
14
|
+
import { b as ve, a as Ce, e as Le } from "../../../../../.chunks/TransitionGroupContext.js";
|
|
15
|
+
function Se(o) {
|
|
16
|
+
return ye("MuiCollapse", o);
|
|
17
|
+
}
|
|
18
|
+
xe("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]);
|
|
19
|
+
const Me = (o) => {
|
|
20
|
+
const {
|
|
21
|
+
orientation: n,
|
|
22
|
+
classes: i
|
|
23
|
+
} = o, s = {
|
|
24
|
+
root: ["root", `${n}`],
|
|
25
|
+
entered: ["entered"],
|
|
26
|
+
hidden: ["hidden"],
|
|
27
|
+
wrapper: ["wrapper", `${n}`],
|
|
28
|
+
wrapperInner: ["wrapperInner", `${n}`]
|
|
29
|
+
};
|
|
30
|
+
return ze(s, Se, i);
|
|
31
|
+
}, Re = O("div", {
|
|
32
|
+
name: "MuiCollapse",
|
|
33
|
+
slot: "Root",
|
|
34
|
+
overridesResolver: (o, n) => {
|
|
35
|
+
const {
|
|
36
|
+
ownerState: i
|
|
37
|
+
} = o;
|
|
38
|
+
return [n.root, n[i.orientation], i.state === "entered" && n.entered, i.state === "exited" && !i.in && i.collapsedSize === "0px" && n.hidden];
|
|
39
|
+
}
|
|
40
|
+
})(Te(({
|
|
41
|
+
theme: o
|
|
42
|
+
}) => ({
|
|
43
|
+
height: 0,
|
|
44
|
+
overflow: "hidden",
|
|
45
|
+
transition: o.transitions.create("height"),
|
|
46
|
+
variants: [{
|
|
47
|
+
props: {
|
|
48
|
+
orientation: "horizontal"
|
|
49
|
+
},
|
|
50
|
+
style: {
|
|
51
|
+
height: "auto",
|
|
52
|
+
width: 0,
|
|
53
|
+
transition: o.transitions.create("width")
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
props: {
|
|
57
|
+
state: "entered"
|
|
58
|
+
},
|
|
59
|
+
style: {
|
|
60
|
+
height: "auto",
|
|
61
|
+
overflow: "visible"
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
props: {
|
|
65
|
+
state: "entered",
|
|
66
|
+
orientation: "horizontal"
|
|
67
|
+
},
|
|
68
|
+
style: {
|
|
69
|
+
width: "auto"
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
props: ({
|
|
73
|
+
ownerState: n
|
|
74
|
+
}) => n.state === "exited" && !n.in && n.collapsedSize === "0px",
|
|
75
|
+
style: {
|
|
76
|
+
visibility: "hidden"
|
|
77
|
+
}
|
|
78
|
+
}]
|
|
79
|
+
}))), Ne = O("div", {
|
|
80
|
+
name: "MuiCollapse",
|
|
81
|
+
slot: "Wrapper",
|
|
82
|
+
overridesResolver: (o, n) => n.wrapper
|
|
83
|
+
})({
|
|
84
|
+
// Hack to get children with a negative margin to not falsify the height computation.
|
|
85
|
+
display: "flex",
|
|
86
|
+
width: "100%",
|
|
87
|
+
variants: [{
|
|
88
|
+
props: {
|
|
89
|
+
orientation: "horizontal"
|
|
90
|
+
},
|
|
91
|
+
style: {
|
|
92
|
+
width: "auto",
|
|
93
|
+
height: "100%"
|
|
94
|
+
}
|
|
95
|
+
}]
|
|
96
|
+
}), $e = O("div", {
|
|
97
|
+
name: "MuiCollapse",
|
|
98
|
+
slot: "WrapperInner",
|
|
99
|
+
overridesResolver: (o, n) => n.wrapperInner
|
|
100
|
+
})({
|
|
101
|
+
width: "100%",
|
|
102
|
+
variants: [{
|
|
103
|
+
props: {
|
|
104
|
+
orientation: "horizontal"
|
|
105
|
+
},
|
|
106
|
+
style: {
|
|
107
|
+
width: "auto",
|
|
108
|
+
height: "100%"
|
|
109
|
+
}
|
|
110
|
+
}]
|
|
111
|
+
}), $ = /* @__PURE__ */ N.forwardRef(function(n, i) {
|
|
112
|
+
const s = we({
|
|
113
|
+
props: n,
|
|
114
|
+
name: "MuiCollapse"
|
|
115
|
+
}), {
|
|
116
|
+
addEndListener: l,
|
|
117
|
+
children: m,
|
|
118
|
+
className: d,
|
|
119
|
+
collapsedSize: u = "0px",
|
|
120
|
+
component: D,
|
|
121
|
+
easing: g,
|
|
122
|
+
in: w,
|
|
123
|
+
onEnter: v,
|
|
124
|
+
onEntered: C,
|
|
125
|
+
onEntering: p,
|
|
126
|
+
onExit: x,
|
|
127
|
+
onExited: X,
|
|
128
|
+
onExiting: W,
|
|
129
|
+
orientation: j = "vertical",
|
|
130
|
+
style: P,
|
|
131
|
+
timeout: h = be.standard,
|
|
132
|
+
// eslint-disable-next-line react/prop-types
|
|
133
|
+
TransitionComponent: Y = fe,
|
|
134
|
+
...Z
|
|
135
|
+
} = s, L = {
|
|
136
|
+
...s,
|
|
137
|
+
orientation: j,
|
|
138
|
+
collapsedSize: u
|
|
139
|
+
}, E = Me(L), A = he(), I = ve(), f = N.useRef(null), k = N.useRef(), S = typeof u == "number" ? `${u}px` : u, z = j === "horizontal", b = z ? "width" : "height", M = N.useRef(null), ee = Ce(i, M), y = (t) => (a) => {
|
|
140
|
+
if (t) {
|
|
141
|
+
const c = M.current;
|
|
142
|
+
a === void 0 ? t(c) : t(c, a);
|
|
143
|
+
}
|
|
144
|
+
}, F = () => f.current ? f.current[z ? "clientWidth" : "clientHeight"] : 0, te = y((t, a) => {
|
|
145
|
+
f.current && z && (f.current.style.position = "absolute"), t.style[b] = S, v && v(t, a);
|
|
146
|
+
}), ne = y((t, a) => {
|
|
147
|
+
const c = F();
|
|
148
|
+
f.current && z && (f.current.style.position = "");
|
|
149
|
+
const {
|
|
150
|
+
duration: T,
|
|
151
|
+
easing: R
|
|
152
|
+
} = V({
|
|
153
|
+
style: P,
|
|
154
|
+
timeout: h,
|
|
155
|
+
easing: g
|
|
156
|
+
}, {
|
|
157
|
+
mode: "enter"
|
|
158
|
+
});
|
|
159
|
+
if (h === "auto") {
|
|
160
|
+
const H = A.transitions.getAutoHeightDuration(c);
|
|
161
|
+
t.style.transitionDuration = `${H}ms`, k.current = H;
|
|
162
|
+
} else
|
|
163
|
+
t.style.transitionDuration = typeof T == "string" ? T : `${T}ms`;
|
|
164
|
+
t.style[b] = `${c}px`, t.style.transitionTimingFunction = R, p && p(t, a);
|
|
165
|
+
}), oe = y((t, a) => {
|
|
166
|
+
t.style[b] = "auto", C && C(t, a);
|
|
167
|
+
}), re = y((t) => {
|
|
168
|
+
t.style[b] = `${F()}px`, x && x(t);
|
|
169
|
+
}), ie = y(X), se = y((t) => {
|
|
170
|
+
const a = F(), {
|
|
171
|
+
duration: c,
|
|
172
|
+
easing: T
|
|
173
|
+
} = V({
|
|
174
|
+
style: P,
|
|
175
|
+
timeout: h,
|
|
176
|
+
easing: g
|
|
177
|
+
}, {
|
|
178
|
+
mode: "exit"
|
|
179
|
+
});
|
|
180
|
+
if (h === "auto") {
|
|
181
|
+
const R = A.transitions.getAutoHeightDuration(a);
|
|
182
|
+
t.style.transitionDuration = `${R}ms`, k.current = R;
|
|
183
|
+
} else
|
|
184
|
+
t.style.transitionDuration = typeof c == "string" ? c : `${c}ms`;
|
|
185
|
+
t.style[b] = S, t.style.transitionTimingFunction = T, W && W(t);
|
|
186
|
+
});
|
|
187
|
+
return /* @__PURE__ */ r(Y, {
|
|
188
|
+
in: w,
|
|
189
|
+
onEnter: te,
|
|
190
|
+
onEntered: oe,
|
|
191
|
+
onEntering: ne,
|
|
192
|
+
onExit: re,
|
|
193
|
+
onExited: ie,
|
|
194
|
+
onExiting: se,
|
|
195
|
+
addEndListener: (t) => {
|
|
196
|
+
h === "auto" && I.start(k.current || 0, t), l && l(M.current, t);
|
|
197
|
+
},
|
|
198
|
+
nodeRef: M,
|
|
199
|
+
timeout: h === "auto" ? null : h,
|
|
200
|
+
...Z,
|
|
201
|
+
children: (t, a) => /* @__PURE__ */ r(Re, {
|
|
202
|
+
as: D,
|
|
203
|
+
className: Ee(E.root, d, {
|
|
204
|
+
entered: E.entered,
|
|
205
|
+
exited: !w && S === "0px" && E.hidden
|
|
206
|
+
}[t]),
|
|
207
|
+
style: {
|
|
208
|
+
[z ? "minWidth" : "minHeight"]: S,
|
|
209
|
+
...P
|
|
210
|
+
},
|
|
211
|
+
ref: ee,
|
|
212
|
+
...a,
|
|
213
|
+
// `ownerState` is set after `childProps` to override any existing `ownerState` property in `childProps`
|
|
214
|
+
// that might have been forwarded from the Transition component.
|
|
215
|
+
ownerState: {
|
|
216
|
+
...L,
|
|
217
|
+
state: t
|
|
218
|
+
},
|
|
219
|
+
children: /* @__PURE__ */ r(Ne, {
|
|
220
|
+
ownerState: {
|
|
221
|
+
...L,
|
|
222
|
+
state: t
|
|
223
|
+
},
|
|
224
|
+
className: E.wrapper,
|
|
225
|
+
ref: f,
|
|
226
|
+
children: /* @__PURE__ */ r($e, {
|
|
227
|
+
ownerState: {
|
|
228
|
+
...L,
|
|
229
|
+
state: t
|
|
230
|
+
},
|
|
231
|
+
className: E.wrapperInner,
|
|
232
|
+
children: m
|
|
233
|
+
})
|
|
234
|
+
})
|
|
235
|
+
})
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
process.env.NODE_ENV !== "production" && ($.propTypes = {
|
|
239
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
240
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
241
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
242
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
243
|
+
/**
|
|
244
|
+
* Add a custom transition end trigger. Called with the transitioning DOM
|
|
245
|
+
* node and a done callback. Allows for more fine grained transition end
|
|
246
|
+
* logic. Note: Timeouts are still used as a fallback if provided.
|
|
247
|
+
*/
|
|
248
|
+
addEndListener: e.func,
|
|
249
|
+
/**
|
|
250
|
+
* The content node to be collapsed.
|
|
251
|
+
*/
|
|
252
|
+
children: e.node,
|
|
253
|
+
/**
|
|
254
|
+
* Override or extend the styles applied to the component.
|
|
255
|
+
*/
|
|
256
|
+
classes: e.object,
|
|
257
|
+
/**
|
|
258
|
+
* @ignore
|
|
259
|
+
*/
|
|
260
|
+
className: e.string,
|
|
261
|
+
/**
|
|
262
|
+
* The width (horizontal) or height (vertical) of the container when collapsed.
|
|
263
|
+
* @default '0px'
|
|
264
|
+
*/
|
|
265
|
+
collapsedSize: e.oneOfType([e.number, e.string]),
|
|
266
|
+
/**
|
|
267
|
+
* The component used for the root node.
|
|
268
|
+
* Either a string to use a HTML element or a component.
|
|
269
|
+
*/
|
|
270
|
+
component: Le,
|
|
271
|
+
/**
|
|
272
|
+
* The transition timing function.
|
|
273
|
+
* You may specify a single easing or a object containing enter and exit values.
|
|
274
|
+
*/
|
|
275
|
+
easing: e.oneOfType([e.shape({
|
|
276
|
+
enter: e.string,
|
|
277
|
+
exit: e.string
|
|
278
|
+
}), e.string]),
|
|
279
|
+
/**
|
|
280
|
+
* If `true`, the component will transition in.
|
|
281
|
+
*/
|
|
282
|
+
in: e.bool,
|
|
283
|
+
/**
|
|
284
|
+
* @ignore
|
|
285
|
+
*/
|
|
286
|
+
onEnter: e.func,
|
|
287
|
+
/**
|
|
288
|
+
* @ignore
|
|
289
|
+
*/
|
|
290
|
+
onEntered: e.func,
|
|
291
|
+
/**
|
|
292
|
+
* @ignore
|
|
293
|
+
*/
|
|
294
|
+
onEntering: e.func,
|
|
295
|
+
/**
|
|
296
|
+
* @ignore
|
|
297
|
+
*/
|
|
298
|
+
onExit: e.func,
|
|
299
|
+
/**
|
|
300
|
+
* @ignore
|
|
301
|
+
*/
|
|
302
|
+
onExited: e.func,
|
|
303
|
+
/**
|
|
304
|
+
* @ignore
|
|
305
|
+
*/
|
|
306
|
+
onExiting: e.func,
|
|
307
|
+
/**
|
|
308
|
+
* The transition orientation.
|
|
309
|
+
* @default 'vertical'
|
|
310
|
+
*/
|
|
311
|
+
orientation: e.oneOf(["horizontal", "vertical"]),
|
|
312
|
+
/**
|
|
313
|
+
* @ignore
|
|
314
|
+
*/
|
|
315
|
+
style: e.object,
|
|
316
|
+
/**
|
|
317
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
318
|
+
*/
|
|
319
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
320
|
+
/**
|
|
321
|
+
* The duration for the transition, in milliseconds.
|
|
322
|
+
* You may specify a single timeout for all transitions, or individually with an object.
|
|
323
|
+
*
|
|
324
|
+
* Set to 'auto' to automatically calculate transition time based on height.
|
|
325
|
+
* @default duration.standard
|
|
326
|
+
*/
|
|
327
|
+
timeout: e.oneOfType([e.oneOf(["auto"]), e.number, e.shape({
|
|
328
|
+
appear: e.number,
|
|
329
|
+
enter: e.number,
|
|
330
|
+
exit: e.number
|
|
331
|
+
})])
|
|
332
|
+
});
|
|
333
|
+
$ && ($.muiSupportAuto = !0);
|
|
334
|
+
const B = Q(/* @__PURE__ */ r("path", {
|
|
335
|
+
d: "m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"
|
|
336
|
+
}), "ExpandLess"), _ = Q(/* @__PURE__ */ r("path", {
|
|
337
|
+
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
|
338
|
+
}), "ExpandMore"), De = G(me, {
|
|
339
|
+
shouldForwardProp: (o) => o !== "collapsed"
|
|
340
|
+
})(({ collapsed: o }) => ({
|
|
341
|
+
paddingLeft: o ? 0 : "2rem",
|
|
342
|
+
a: {
|
|
343
|
+
paddingLeft: o ? "3rem" : "1rem"
|
|
344
|
+
}
|
|
345
|
+
})), Pe = G(ge, { shouldForwardProp: (o) => o !== "collapsed" })`
|
|
346
|
+
.MuiPaper-root {
|
|
347
|
+
background-color: ${K.colors.charcoal};
|
|
348
|
+
ul {
|
|
349
|
+
display: flex;
|
|
350
|
+
flex-wrap: wrap;
|
|
351
|
+
flex-direction: row;
|
|
352
|
+
align-items: center;
|
|
353
|
+
padding: 0;
|
|
354
|
+
width: 100%;
|
|
355
|
+
li {
|
|
356
|
+
width: auto;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
`, q = ({
|
|
361
|
+
type: o = "link",
|
|
362
|
+
menuOrientation: n,
|
|
363
|
+
menuPosition: i,
|
|
364
|
+
collapsed: s,
|
|
365
|
+
...l
|
|
366
|
+
}) => {
|
|
367
|
+
switch (o) {
|
|
368
|
+
case "link":
|
|
369
|
+
return /* @__PURE__ */ r(ue, { ...l, menuOrientation: n });
|
|
370
|
+
case "menu":
|
|
371
|
+
return /* @__PURE__ */ r(ke, { menuOrientation: n, position: i, collapsed: s, ...l });
|
|
372
|
+
case "divider":
|
|
373
|
+
return /* @__PURE__ */ r(
|
|
374
|
+
ce,
|
|
375
|
+
{
|
|
376
|
+
color: K.colors.white,
|
|
377
|
+
opacity: 0.5,
|
|
378
|
+
spacing: 0,
|
|
379
|
+
orientation: n === "horizontal" ? "vertical" : "horizontal"
|
|
380
|
+
}
|
|
381
|
+
);
|
|
382
|
+
default:
|
|
383
|
+
return null;
|
|
384
|
+
}
|
|
385
|
+
}, ke = ({
|
|
386
|
+
label: o,
|
|
387
|
+
icon: n,
|
|
388
|
+
navItems: i,
|
|
389
|
+
menuOrientation: s,
|
|
390
|
+
collapsed: l,
|
|
391
|
+
position: m
|
|
392
|
+
}) => {
|
|
393
|
+
const [d, u] = J(!1), [D, g] = J(null), w = n, v = (p) => {
|
|
394
|
+
u(!d), s === "horizontal" && (g(null), g(p.currentTarget));
|
|
395
|
+
}, C = () => {
|
|
396
|
+
u(!1), g(null);
|
|
397
|
+
};
|
|
398
|
+
return /* @__PURE__ */ U(ae, { children: [
|
|
399
|
+
/* @__PURE__ */ r(de, { disablePadding: !0, children: /* @__PURE__ */ U(le, { onClick: v, menuOrientation: s, children: [
|
|
400
|
+
w && w,
|
|
401
|
+
/* @__PURE__ */ r(pe, { primary: o, collapsed: l }),
|
|
402
|
+
m !== "bottom" && (d ? /* @__PURE__ */ r(B, { sx: { marginLeft: "8px" } }) : /* @__PURE__ */ r(_, { sx: { marginLeft: "8px" } })),
|
|
403
|
+
m === "bottom" && (d ? /* @__PURE__ */ r(_, { sx: { marginLeft: "8px" } }) : /* @__PURE__ */ r(B, { sx: { marginLeft: "8px" } }))
|
|
404
|
+
] }) }, o),
|
|
405
|
+
s === "vertical" && /* @__PURE__ */ r($, { in: d, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ r(De, { component: "div", disablePadding: !0, collapsed: l, children: i == null ? void 0 : i.map((p, x) => /* @__PURE__ */ r(q, { ...p, collapsed: l }, `${JSON.stringify(p)}-${x}`)) }) }),
|
|
406
|
+
s === "horizontal" && /* @__PURE__ */ r(
|
|
407
|
+
Pe,
|
|
408
|
+
{
|
|
409
|
+
anchorEl: D,
|
|
410
|
+
anchorOrigin: { horizontal: "left", vertical: m === "bottom" ? "top" : "bottom" },
|
|
411
|
+
open: d,
|
|
412
|
+
onClose: C,
|
|
413
|
+
children: i == null ? void 0 : i.map((p, x) => /* @__PURE__ */ r(
|
|
414
|
+
q,
|
|
415
|
+
{
|
|
416
|
+
...p,
|
|
417
|
+
collapsed: l,
|
|
418
|
+
menuOrientation: s,
|
|
419
|
+
menuPosition: m
|
|
420
|
+
},
|
|
421
|
+
`${JSON.stringify(p)}-${x}`
|
|
422
|
+
))
|
|
423
|
+
}
|
|
424
|
+
)
|
|
425
|
+
] });
|
|
426
|
+
};
|
|
427
|
+
export {
|
|
428
|
+
ke as NavMenu,
|
|
429
|
+
Pe as SubMenuHorizontal,
|
|
430
|
+
De as SubMenuVertical,
|
|
431
|
+
ke as default
|
|
432
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MenuPosition, MenuOrientation } from '../../../../../../../../../../../src/components/supercomposite/Nav/types';
|
|
2
|
+
export interface NavItemProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
icon?: JSX.Element;
|
|
5
|
+
iconName?: string;
|
|
6
|
+
to?: string;
|
|
7
|
+
openInNewTab?: boolean;
|
|
8
|
+
type?: 'link' | 'menu' | 'divider';
|
|
9
|
+
menuOrientation?: MenuOrientation;
|
|
10
|
+
menuPosition?: MenuPosition;
|
|
11
|
+
collapsed?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/supercomposite/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { AppBar as e } from "./AppBar/AppBar.js";
|
|
2
|
+
import { default as a } from "./AppHeader/AppHeader.js";
|
|
3
|
+
import { Nav as t } from "./Nav/Nav.js";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
e as AppBar,
|
|
6
|
+
a as AppHeader,
|
|
7
|
+
t as Nav
|
|
8
8
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { AppHeaderProps } from '../../../../../../../../../src/components/supercomposite/AppHeader';
|
|
3
|
+
import { NavProps } from '../../../../../../../../../src/components/supercomposite/CompactNav/CompactNav';
|
|
4
|
+
export interface AppContainerProps {
|
|
5
|
+
navProps: NavProps;
|
|
6
|
+
appHeaderProps?: AppHeaderProps;
|
|
7
|
+
actionsPanelContent?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const AppContainer: React.FC<PropsWithChildren<AppContainerProps>>;
|
|
10
|
+
export default AppContainer;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as a, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { n as d } from "
|
|
5
|
-
import r from "
|
|
2
|
+
import l from "../../supercomposite/AppHeader/AppHeader.js";
|
|
3
|
+
import { CompactNav as s } from "../../supercomposite/CompactNav/CompactNav.js";
|
|
4
|
+
import { n as d } from "../../.chunks/emotion-styled.browser.esm.js";
|
|
5
|
+
import r from "../../assets/theme.js";
|
|
6
6
|
const c = d("div")({
|
|
7
7
|
display: "flex",
|
|
8
8
|
flexDirection: "column",
|
|
@@ -60,14 +60,14 @@ const c = d("div")({
|
|
|
60
60
|
}) => {
|
|
61
61
|
const t = e != null;
|
|
62
62
|
return /* @__PURE__ */ a(c, { children: [
|
|
63
|
-
/* @__PURE__ */ i(
|
|
63
|
+
/* @__PURE__ */ i(l, { ...n }),
|
|
64
64
|
/* @__PURE__ */ a(x, { children: [
|
|
65
|
-
/* @__PURE__ */ i(
|
|
65
|
+
/* @__PURE__ */ i(s, { ...o }),
|
|
66
66
|
/* @__PURE__ */ i(h, { withActionsPanel: t, children: e && e }),
|
|
67
67
|
/* @__PURE__ */ i(m, { withActionsPanel: t, children: p })
|
|
68
68
|
] })
|
|
69
69
|
] });
|
|
70
70
|
};
|
|
71
71
|
export {
|
|
72
|
-
R as
|
|
72
|
+
R as default
|
|
73
73
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { AppBarProps } from '../../../../../../../../../src/components/supercomposite/AppBar';
|
|
3
|
+
import { NavProps } from '../../../../../../../../../src/components/supercomposite/Nav';
|
|
4
|
+
export interface BasicPageProps {
|
|
5
|
+
appBarProps?: AppBarProps;
|
|
6
|
+
navProps: NavProps;
|
|
7
|
+
}
|
|
8
|
+
declare const BasicPage: React.FC<PropsWithChildren<BasicPageProps>>;
|
|
9
|
+
export default BasicPage;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { AppBar as s } from "../../supercomposite/AppBar/AppBar.js";
|
|
3
|
+
import { Nav as p } from "../../supercomposite/Nav/Nav.js";
|
|
4
|
+
import { n as a } from "../../.chunks/emotion-styled.browser.esm.js";
|
|
5
|
+
import r from "../../assets/theme.js";
|
|
6
|
+
const l = a("div")({
|
|
7
|
+
display: "flex",
|
|
8
|
+
flexDirection: "column",
|
|
9
|
+
width: "100%",
|
|
10
|
+
position: "relative"
|
|
11
|
+
}), m = a("div")({
|
|
12
|
+
display: "flex",
|
|
13
|
+
flexDirection: "column",
|
|
14
|
+
justifyContent: "flex-start",
|
|
15
|
+
alignItems: "flex-start",
|
|
16
|
+
width: `calc(100% - 2rem - ${r.constants.navBarWidth}px)`,
|
|
17
|
+
marginLeft: `${r.constants.navBarWidth}px`,
|
|
18
|
+
padding: "1rem",
|
|
19
|
+
height: `calc(100% - ${r.constants.appBarHeight}px)`,
|
|
20
|
+
fontFamily: "Roboto, sans-serif",
|
|
21
|
+
h1: {
|
|
22
|
+
margin: 0
|
|
23
|
+
}
|
|
24
|
+
}), g = ({ appBarProps: e, navProps: i, children: n }) => /* @__PURE__ */ o(l, { children: [
|
|
25
|
+
/* @__PURE__ */ t(s, { ...e }),
|
|
26
|
+
/* @__PURE__ */ t(p, { withAppBar: !0, ...i, anchor: "left" }),
|
|
27
|
+
/* @__PURE__ */ t(m, { children: n })
|
|
28
|
+
] });
|
|
29
|
+
export {
|
|
30
|
+
g as default
|
|
31
|
+
};
|
package/templates/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { default as o } from "./AppContainer/AppContainer.js";
|
|
2
|
+
import { default as t } from "./BasicPage/BasicPage.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
o as AppContainer,
|
|
5
|
+
t as BasicPage
|
|
6
6
|
};
|
package/.chunks/AppHeader.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useState as a } from "react";
|
|
3
|
-
import { n } from "./emotion-styled.browser.esm.js";
|
|
4
|
-
import r from "../assets/theme.js";
|
|
5
|
-
import { l as s } from "./jocologo.js";
|
|
6
|
-
import { I as p } from "./Input.js";
|
|
7
|
-
import { B as m } from "./Button.js";
|
|
8
|
-
import { A as c } from "./Avatar.js";
|
|
9
|
-
const d = n("div")({
|
|
10
|
-
display: "grid",
|
|
11
|
-
flexDirection: "row",
|
|
12
|
-
padding: "4px 16px",
|
|
13
|
-
backgroundColor: "transparent",
|
|
14
|
-
alignItems: "center",
|
|
15
|
-
justifyContent: "space-between",
|
|
16
|
-
gridTemplateColumns: `minmax(${r.constants.appSideNavWidth + r.constants.appInnerNavWidth}px, 1fr) 2fr 1fr`
|
|
17
|
-
}), l = n("img")({
|
|
18
|
-
width: "36px"
|
|
19
|
-
}), f = n("div")({}), g = n("div")({
|
|
20
|
-
justifySelf: "end"
|
|
21
|
-
}), j = () => {
|
|
22
|
-
const [e, o] = a(!1);
|
|
23
|
-
return /* @__PURE__ */ i(d, { children: [
|
|
24
|
-
/* @__PURE__ */ t(f, { children: /* @__PURE__ */ t(l, { src: s }) }),
|
|
25
|
-
/* @__PURE__ */ t(p, { placeholder: "Search..." }),
|
|
26
|
-
/* @__PURE__ */ t(g, { children: e ? /* @__PURE__ */ t(c, { onClick: () => o(!1) }) : /* @__PURE__ */ t(m, { onClick: () => o(!0), children: "Log In" }) })
|
|
27
|
-
] });
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
j as A
|
|
31
|
-
};
|
package/.chunks/Avatar.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "./createSvgIcon.js";
|
|
3
|
-
import { B as d } from "./ButtonBase.js";
|
|
4
|
-
import t from "../assets/theme.js";
|
|
5
|
-
import { n as a, i as l } from "./emotion-styled.browser.esm.js";
|
|
6
|
-
const m = c(/* @__PURE__ */ i("path", {
|
|
7
|
-
d: "M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4"
|
|
8
|
-
}), "PersonOutlineOutlined"), s = a(m, {
|
|
9
|
-
shouldForwardProp: (r) => l(r)
|
|
10
|
-
})(({ avatarColor: r = t.colors.darkGreen, backgroundColor: n = t.colors.mint, size: o = 40 }) => ({
|
|
11
|
-
border: `1px solid ${r}`,
|
|
12
|
-
backgroundColor: n,
|
|
13
|
-
borderRadius: "50%",
|
|
14
|
-
padding: "8px",
|
|
15
|
-
fill: r,
|
|
16
|
-
width: `${o - 18}px`,
|
|
17
|
-
height: `${o - 18}px`,
|
|
18
|
-
pointerEvents: "none"
|
|
19
|
-
})), p = a(d)({
|
|
20
|
-
backgroundColor: "transparent",
|
|
21
|
-
borderRadius: "50%",
|
|
22
|
-
span: {
|
|
23
|
-
transition: "313ms all ease-in-out"
|
|
24
|
-
},
|
|
25
|
-
"&:hover, :focus": {
|
|
26
|
-
span: {
|
|
27
|
-
backgroundColor: t.colors.grayO44
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}), g = ({
|
|
31
|
-
avatarColor: r,
|
|
32
|
-
backgroundColor: n,
|
|
33
|
-
size: o,
|
|
34
|
-
...e
|
|
35
|
-
}) => e != null && e.onClick ? /* @__PURE__ */ i(p, { ...e, children: /* @__PURE__ */ i(s, { avatarColor: r, backgroundColor: n, size: o }) }) : /* @__PURE__ */ i(s, { avatarColor: r, backgroundColor: n, size: o });
|
|
36
|
-
export {
|
|
37
|
-
g as A
|
|
38
|
-
};
|
package/.chunks/BasicPage.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { A as s } from "./AppBar.js";
|
|
3
|
-
import { N as p } from "./Nav.js";
|
|
4
|
-
import { n as r } from "./emotion-styled.browser.esm.js";
|
|
5
|
-
import a from "../assets/theme.js";
|
|
6
|
-
const m = r("div")({
|
|
7
|
-
display: "flex",
|
|
8
|
-
flexDirection: "column",
|
|
9
|
-
width: "100%",
|
|
10
|
-
position: "relative"
|
|
11
|
-
}), l = r("div")({
|
|
12
|
-
display: "flex",
|
|
13
|
-
flexDirection: "column",
|
|
14
|
-
justifyContent: "flex-start",
|
|
15
|
-
alignItems: "flex-start",
|
|
16
|
-
width: `calc(100% - 2rem - ${a.constants.navBarWidth}px)`,
|
|
17
|
-
marginLeft: `${a.constants.navBarWidth}px`,
|
|
18
|
-
padding: "1rem",
|
|
19
|
-
height: `calc(100% - ${a.constants.appBarHeight}px)`,
|
|
20
|
-
fontFamily: "Roboto, sans-serif",
|
|
21
|
-
h1: {
|
|
22
|
-
margin: 0
|
|
23
|
-
}
|
|
24
|
-
}), g = ({ appBarProps: e, navProps: i, children: n }) => /* @__PURE__ */ o(m, { children: [
|
|
25
|
-
/* @__PURE__ */ t(s, { ...e }),
|
|
26
|
-
/* @__PURE__ */ t(p, { withAppBar: !0, ...i, anchor: "left" }),
|
|
27
|
-
/* @__PURE__ */ t(l, { children: n })
|
|
28
|
-
] });
|
|
29
|
-
export {
|
|
30
|
-
g as B
|
|
31
|
-
};
|