jcicl 0.0.110 → 0.0.114
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/AppContainer/AppContainer.d.ts +6 -4
- package/AppContainer/AppContainer.js +570 -493
- package/AppHeader/AppHeader.d.ts +7 -0
- package/AppHeader/AppHeader.js +83 -84
- package/Button/Button.d.ts +2 -1
- package/Button/Button.js +86 -83
- package/Nav/Nav.d.ts +12 -0
- package/Nav/Nav.js +79 -73
- package/package.json +1 -1
- package/theme.d.ts +5 -0
- package/theme.js +5 -0
package/AppHeader/AppHeader.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
export interface CustomLogoProps {
|
|
2
|
+
logoSrc: string;
|
|
3
|
+
logoWidth: number;
|
|
4
|
+
logoHeight: number;
|
|
5
|
+
}
|
|
1
6
|
export interface AppHeaderProps {
|
|
2
7
|
loggedIn?: boolean;
|
|
3
8
|
hamburgerMenu?: boolean;
|
|
4
9
|
onLogin?: () => void;
|
|
5
10
|
onUserMenuClick?: () => void;
|
|
6
11
|
onHamburgerMenuClick?: () => void;
|
|
12
|
+
logoProps: CustomLogoProps;
|
|
13
|
+
iconColor: string;
|
|
7
14
|
}
|
|
8
15
|
declare const AppHeader: React.FC<AppHeaderProps>;
|
|
9
16
|
export default AppHeader;
|
package/AppHeader/AppHeader.js
CHANGED
|
@@ -1,77 +1,76 @@
|
|
|
1
|
-
import { jsx as u, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as u, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import * as w from "react";
|
|
3
|
+
import I, { useState as m, useLayoutEffect as S } from "react";
|
|
4
4
|
import { n as f } from "../.chunks/emotion-styled.browser.esm.js";
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}), l;
|
|
5
|
+
import { c as p } from "../.chunks/emotion-react.browser.esm.js";
|
|
6
|
+
import { I as E } from "../.chunks/Input.js";
|
|
7
|
+
import { Button as C } from "../Button/Button.js";
|
|
8
|
+
import M from "../Avatar/Avatar.js";
|
|
9
|
+
import y from "../WithLabel/WithLabel.js";
|
|
10
|
+
import { c as L } from "../.chunks/createSvgIcon.js";
|
|
11
|
+
const O = I[typeof document < "u" && document.createElement !== void 0 ? "useLayoutEffect" : "useEffect"], R = (e) => {
|
|
12
|
+
const s = w.useRef(e);
|
|
13
|
+
return w.useEffect(() => {
|
|
14
|
+
s.current = e;
|
|
15
|
+
}), s;
|
|
17
16
|
};
|
|
18
|
-
function
|
|
17
|
+
function _() {
|
|
19
18
|
}
|
|
20
|
-
function
|
|
21
|
-
const r =
|
|
22
|
-
return
|
|
23
|
-
let
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
26
|
-
function
|
|
27
|
-
|
|
19
|
+
function A(e, s, l = {}) {
|
|
20
|
+
const r = j(l.polyfill), a = R(s);
|
|
21
|
+
return O(() => {
|
|
22
|
+
let n = !1;
|
|
23
|
+
const o = e && "current" in e ? e.current : e;
|
|
24
|
+
if (!o) return _;
|
|
25
|
+
function i(t, c) {
|
|
26
|
+
n || a.current(t, c);
|
|
28
27
|
}
|
|
29
|
-
return r.subscribe(
|
|
30
|
-
|
|
28
|
+
return r.subscribe(o, i), () => {
|
|
29
|
+
n = !0, r.unsubscribe(o, i);
|
|
31
30
|
};
|
|
32
31
|
}, [e, r, a]), r.observer;
|
|
33
32
|
}
|
|
34
|
-
function
|
|
35
|
-
let
|
|
36
|
-
const r = /* @__PURE__ */ new Map(), a = new (e || window.ResizeObserver)((
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
const
|
|
40
|
-
for (let c = 0; c <
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
33
|
+
function H(e) {
|
|
34
|
+
let s = !1, l = [];
|
|
35
|
+
const r = /* @__PURE__ */ new Map(), a = new (e || window.ResizeObserver)((n, o) => {
|
|
36
|
+
l = l.concat(n);
|
|
37
|
+
function i() {
|
|
38
|
+
const t = /* @__PURE__ */ new Set();
|
|
39
|
+
for (let c = 0; c < l.length; c++) {
|
|
40
|
+
if (t.has(l[c].target)) continue;
|
|
41
|
+
t.add(l[c].target);
|
|
42
|
+
const d = r.get(l[c].target);
|
|
43
|
+
d == null || d.forEach((b) => b(l[c], o));
|
|
45
44
|
}
|
|
46
|
-
|
|
45
|
+
l = [], s = !1;
|
|
47
46
|
}
|
|
48
|
-
|
|
47
|
+
s || window.requestAnimationFrame(i), s = !0;
|
|
49
48
|
});
|
|
50
49
|
return {
|
|
51
50
|
observer: a,
|
|
52
|
-
subscribe(
|
|
53
|
-
var
|
|
54
|
-
a.observe(
|
|
55
|
-
const
|
|
56
|
-
|
|
51
|
+
subscribe(n, o) {
|
|
52
|
+
var i;
|
|
53
|
+
a.observe(n);
|
|
54
|
+
const t = (i = r.get(n)) !== null && i !== void 0 ? i : [];
|
|
55
|
+
t.push(o), r.set(n, t);
|
|
57
56
|
},
|
|
58
|
-
unsubscribe(
|
|
59
|
-
var
|
|
60
|
-
const
|
|
61
|
-
if (
|
|
62
|
-
a.unobserve(
|
|
57
|
+
unsubscribe(n, o) {
|
|
58
|
+
var i;
|
|
59
|
+
const t = (i = r.get(n)) !== null && i !== void 0 ? i : [];
|
|
60
|
+
if (t.length === 1) {
|
|
61
|
+
a.unobserve(n), r.delete(n);
|
|
63
62
|
return;
|
|
64
63
|
}
|
|
65
|
-
const c =
|
|
66
|
-
c !== -1 &&
|
|
64
|
+
const c = t.indexOf(o);
|
|
65
|
+
c !== -1 && t.splice(c, 1), r.set(n, t);
|
|
67
66
|
}
|
|
68
67
|
};
|
|
69
68
|
}
|
|
70
69
|
let v;
|
|
71
|
-
const
|
|
70
|
+
const j = (e) => v || (v = H(e)), U = L(/* @__PURE__ */ u("path", {
|
|
72
71
|
d: "M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"
|
|
73
|
-
}), "Menu"),
|
|
74
|
-
...
|
|
72
|
+
}), "Menu"), V = f("div")(() => ({
|
|
73
|
+
...p`
|
|
75
74
|
display: flex;
|
|
76
75
|
flex-direction: row;
|
|
77
76
|
padding: 4px 16px;
|
|
@@ -80,35 +79,35 @@ const R = (e) => v || (v = $(e)), _ = M(/* @__PURE__ */ u("path", {
|
|
|
80
79
|
justify-content: space-between;
|
|
81
80
|
gap: 1.5rem;
|
|
82
81
|
`
|
|
83
|
-
})),
|
|
84
|
-
width:
|
|
85
|
-
}),
|
|
86
|
-
...
|
|
82
|
+
})), B = f("img")(({ width: e }) => ({
|
|
83
|
+
width: `${e}px`
|
|
84
|
+
})), F = f("div")(({ height: e }) => ({
|
|
85
|
+
...p`
|
|
87
86
|
display: flex;
|
|
88
87
|
gap: 1rem;
|
|
89
|
-
height:
|
|
88
|
+
height: ${e}px;
|
|
90
89
|
`
|
|
91
|
-
})),
|
|
92
|
-
...
|
|
90
|
+
})), q = f("div")(({ width: e, loggedIn: s }) => ({
|
|
91
|
+
...p`
|
|
93
92
|
width: ${e}px;
|
|
94
93
|
display: flex;
|
|
95
94
|
justify-content: center;
|
|
96
95
|
align-items: flex-end;
|
|
97
|
-
flex-direction: ${
|
|
96
|
+
flex-direction: ${s ? "column" : "column-reverse"};
|
|
98
97
|
flex-shrink: 0;
|
|
99
98
|
* {
|
|
100
99
|
white-space: nowrap;
|
|
101
100
|
}
|
|
102
101
|
`
|
|
103
|
-
})),
|
|
104
|
-
...
|
|
102
|
+
})), W = f("div")(({ visible: e }) => ({
|
|
103
|
+
...p`
|
|
105
104
|
z-index: ${e ? 1 : 0};
|
|
106
105
|
opacity: ${e ? 1 : 0};
|
|
107
106
|
pointer-events: ${e ? "auto" : "none"};
|
|
108
107
|
position: ${e ? "relative" : "absolute"};
|
|
109
108
|
`
|
|
110
|
-
})),
|
|
111
|
-
...
|
|
109
|
+
})), P = f("div")(() => ({
|
|
110
|
+
...p`
|
|
112
111
|
display: flex;
|
|
113
112
|
width: 1360px;
|
|
114
113
|
max-width: 100%;
|
|
@@ -116,33 +115,33 @@ const R = (e) => v || (v = $(e)), _ = M(/* @__PURE__ */ u("path", {
|
|
|
116
115
|
width: 100%;
|
|
117
116
|
}
|
|
118
117
|
`
|
|
119
|
-
})),
|
|
120
|
-
const [
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}, [
|
|
124
|
-
const
|
|
125
|
-
|
|
118
|
+
})), Z = ({ logoProps: e, iconColor: s, hamburgerMenu: l, onHamburgerMenuClick: r }) => {
|
|
119
|
+
const [a, n] = m(!1), [o, i] = m(0), [t, c] = m(null), [d, b] = m(null), { logoSrc: z, logoWidth: $, logoHeight: x } = e;
|
|
120
|
+
S(() => {
|
|
121
|
+
t && t.clientWidth > o && i(t.clientWidth), d && d.clientWidth > o && i(d.clientWidth);
|
|
122
|
+
}, [t, d]);
|
|
123
|
+
const k = (h) => {
|
|
124
|
+
h != null && h.clientWidth && h.clientWidth > o && i(h.clientWidth);
|
|
126
125
|
};
|
|
127
|
-
return
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */ u(
|
|
130
|
-
|
|
126
|
+
return A(t, () => k(t)), /* @__PURE__ */ g(V, { children: [
|
|
127
|
+
/* @__PURE__ */ g(F, { height: x, children: [
|
|
128
|
+
/* @__PURE__ */ u(B, { src: z, height: `${x}px`, width: $ }),
|
|
129
|
+
l && /* @__PURE__ */ u(C, { variant: "icon", onClick: r, color: s, children: /* @__PURE__ */ u(U, {}) })
|
|
131
130
|
] }),
|
|
132
|
-
/* @__PURE__ */ u(
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */ u(
|
|
135
|
-
|
|
131
|
+
/* @__PURE__ */ u(P, { children: /* @__PURE__ */ u(E, { placeholder: "Search..." }) }),
|
|
132
|
+
/* @__PURE__ */ g(q, { width: o, loggedIn: a, children: [
|
|
133
|
+
/* @__PURE__ */ u(W, { visible: a, ref: c, children: /* @__PURE__ */ u(
|
|
134
|
+
y,
|
|
136
135
|
{
|
|
137
136
|
id: "accountMenuContainer",
|
|
138
|
-
component: /* @__PURE__ */ u(
|
|
137
|
+
component: /* @__PURE__ */ u(M, { onClick: () => n(!1) }),
|
|
139
138
|
label: "Welcome, User"
|
|
140
139
|
}
|
|
141
140
|
) }),
|
|
142
|
-
/* @__PURE__ */ u(
|
|
141
|
+
/* @__PURE__ */ u(W, { visible: !a, ref: b, children: /* @__PURE__ */ u(C, { id: "loginButtonContainer", onClick: () => n(!0), children: "Log In" }) })
|
|
143
142
|
] })
|
|
144
143
|
] });
|
|
145
144
|
};
|
|
146
145
|
export {
|
|
147
|
-
|
|
146
|
+
Z as default
|
|
148
147
|
};
|
package/Button/Button.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ButtonProps as MuiButtonProps } from '@mui/material/Button/Button';
|
|
2
|
-
export interface ButtonProps extends Omit<MuiButtonProps, 'variant' | 'size'> {
|
|
2
|
+
export interface ButtonProps extends Omit<MuiButtonProps, 'variant' | 'size' | 'color'> {
|
|
3
3
|
variant?: 1 | 2 | 'unstyled' | 'icon';
|
|
4
4
|
size?: number;
|
|
5
|
+
color?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare const Button: React.FC<ButtonProps & {
|
|
7
8
|
children: React.ReactNode;
|
package/Button/Button.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as F, jsx as
|
|
1
|
+
import { jsxs as F, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import * as g from "react";
|
|
3
|
-
import { g as U, a as _, s as
|
|
3
|
+
import { g as U, a as _, s as d, r as H, c as s, f as A, u as q, b as h, P as t, d as J, e as b } from "../.chunks/DefaultPropsProvider.js";
|
|
4
4
|
import { m as K } from "../.chunks/memoTheme.js";
|
|
5
5
|
import { c as Q } from "../.chunks/createSimplePaletteValueFilter.js";
|
|
6
6
|
import { B as S } from "../.chunks/ButtonBase.js";
|
|
@@ -9,23 +9,23 @@ import e from "../theme.js";
|
|
|
9
9
|
function Y(o) {
|
|
10
10
|
return U("MuiButton", o);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const p = _("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge"]), I = /* @__PURE__ */ g.createContext({});
|
|
13
13
|
process.env.NODE_ENV !== "production" && (I.displayName = "ButtonGroupContext");
|
|
14
14
|
const O = /* @__PURE__ */ g.createContext(void 0);
|
|
15
15
|
process.env.NODE_ENV !== "production" && (O.displayName = "ButtonGroupButtonContext");
|
|
16
16
|
const Z = (o) => {
|
|
17
17
|
const {
|
|
18
|
-
color:
|
|
19
|
-
disableElevation:
|
|
20
|
-
fullWidth:
|
|
21
|
-
size:
|
|
22
|
-
variant:
|
|
18
|
+
color: a,
|
|
19
|
+
disableElevation: r,
|
|
20
|
+
fullWidth: n,
|
|
21
|
+
size: i,
|
|
22
|
+
variant: c,
|
|
23
23
|
classes: u
|
|
24
24
|
} = o, f = {
|
|
25
|
-
root: ["root",
|
|
25
|
+
root: ["root", c, `${c}${s(a)}`, `size${s(i)}`, `${c}Size${s(i)}`, `color${s(a)}`, r && "disableElevation", n && "fullWidth"],
|
|
26
26
|
label: ["label"],
|
|
27
|
-
startIcon: ["icon", "startIcon", `iconSize${i
|
|
28
|
-
endIcon: ["icon", "endIcon", `iconSize${i
|
|
27
|
+
startIcon: ["icon", "startIcon", `iconSize${s(i)}`],
|
|
28
|
+
endIcon: ["icon", "endIcon", `iconSize${s(i)}`]
|
|
29
29
|
}, y = J(f, Y, u);
|
|
30
30
|
return {
|
|
31
31
|
...u,
|
|
@@ -59,20 +59,20 @@ const Z = (o) => {
|
|
|
59
59
|
fontSize: 22
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
}], oo =
|
|
62
|
+
}], oo = d(S, {
|
|
63
63
|
shouldForwardProp: (o) => H(o) || o === "classes",
|
|
64
64
|
name: "MuiButton",
|
|
65
65
|
slot: "Root",
|
|
66
|
-
overridesResolver: (o,
|
|
66
|
+
overridesResolver: (o, a) => {
|
|
67
67
|
const {
|
|
68
|
-
ownerState:
|
|
68
|
+
ownerState: r
|
|
69
69
|
} = o;
|
|
70
|
-
return [
|
|
70
|
+
return [a.root, a[r.variant], a[`${r.variant}${s(r.color)}`], a[`size${s(r.size)}`], a[`${r.variant}Size${s(r.size)}`], r.color === "inherit" && a.colorInherit, r.disableElevation && a.disableElevation, r.fullWidth && a.fullWidth];
|
|
71
71
|
}
|
|
72
72
|
})(K(({
|
|
73
73
|
theme: o
|
|
74
74
|
}) => {
|
|
75
|
-
const
|
|
75
|
+
const a = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], r = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
|
|
76
76
|
return {
|
|
77
77
|
...o.typography.button,
|
|
78
78
|
minWidth: 64,
|
|
@@ -85,7 +85,7 @@ const Z = (o) => {
|
|
|
85
85
|
"&:hover": {
|
|
86
86
|
textDecoration: "none"
|
|
87
87
|
},
|
|
88
|
-
[`&.${
|
|
88
|
+
[`&.${p.disabled}`]: {
|
|
89
89
|
color: (o.vars || o).palette.action.disabled
|
|
90
90
|
},
|
|
91
91
|
variants: [{
|
|
@@ -106,10 +106,10 @@ const Z = (o) => {
|
|
|
106
106
|
"&:active": {
|
|
107
107
|
boxShadow: (o.vars || o).shadows[8]
|
|
108
108
|
},
|
|
109
|
-
[`&.${
|
|
109
|
+
[`&.${p.focusVisible}`]: {
|
|
110
110
|
boxShadow: (o.vars || o).shadows[6]
|
|
111
111
|
},
|
|
112
|
-
[`&.${
|
|
112
|
+
[`&.${p.disabled}`]: {
|
|
113
113
|
color: (o.vars || o).palette.action.disabled,
|
|
114
114
|
boxShadow: (o.vars || o).shadows[0],
|
|
115
115
|
backgroundColor: (o.vars || o).palette.action.disabledBackground
|
|
@@ -125,7 +125,7 @@ const Z = (o) => {
|
|
|
125
125
|
borderColor: "var(--variant-outlinedBorder, currentColor)",
|
|
126
126
|
backgroundColor: "var(--variant-outlinedBg)",
|
|
127
127
|
color: "var(--variant-outlinedColor)",
|
|
128
|
-
[`&.${
|
|
128
|
+
[`&.${p.disabled}`]: {
|
|
129
129
|
border: `1px solid ${(o.vars || o).palette.action.disabledBackground}`
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -138,22 +138,22 @@ const Z = (o) => {
|
|
|
138
138
|
color: "var(--variant-textColor)",
|
|
139
139
|
backgroundColor: "var(--variant-textBg)"
|
|
140
140
|
}
|
|
141
|
-
}, ...Object.entries(o.palette).filter(Q()).map(([
|
|
141
|
+
}, ...Object.entries(o.palette).filter(Q()).map(([n]) => ({
|
|
142
142
|
props: {
|
|
143
|
-
color:
|
|
143
|
+
color: n
|
|
144
144
|
},
|
|
145
145
|
style: {
|
|
146
|
-
"--variant-textColor": (o.vars || o).palette[
|
|
147
|
-
"--variant-outlinedColor": (o.vars || o).palette[
|
|
148
|
-
"--variant-outlinedBorder": o.vars ? `rgba(${o.vars.palette[
|
|
149
|
-
"--variant-containedColor": (o.vars || o).palette[
|
|
150
|
-
"--variant-containedBg": (o.vars || o).palette[
|
|
146
|
+
"--variant-textColor": (o.vars || o).palette[n].main,
|
|
147
|
+
"--variant-outlinedColor": (o.vars || o).palette[n].main,
|
|
148
|
+
"--variant-outlinedBorder": o.vars ? `rgba(${o.vars.palette[n].mainChannel} / 0.5)` : b(o.palette[n].main, 0.5),
|
|
149
|
+
"--variant-containedColor": (o.vars || o).palette[n].contrastText,
|
|
150
|
+
"--variant-containedBg": (o.vars || o).palette[n].main,
|
|
151
151
|
"@media (hover: hover)": {
|
|
152
152
|
"&:hover": {
|
|
153
|
-
"--variant-containedBg": (o.vars || o).palette[
|
|
154
|
-
"--variant-textBg": o.vars ? `rgba(${o.vars.palette[
|
|
155
|
-
"--variant-outlinedBorder": (o.vars || o).palette[
|
|
156
|
-
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette[
|
|
153
|
+
"--variant-containedBg": (o.vars || o).palette[n].dark,
|
|
154
|
+
"--variant-textBg": o.vars ? `rgba(${o.vars.palette[n].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : b(o.palette[n].main, o.palette.action.hoverOpacity),
|
|
155
|
+
"--variant-outlinedBorder": (o.vars || o).palette[n].main,
|
|
156
|
+
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette[n].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : b(o.palette[n].main, o.palette.action.hoverOpacity)
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
}
|
|
@@ -164,10 +164,10 @@ const Z = (o) => {
|
|
|
164
164
|
style: {
|
|
165
165
|
color: "inherit",
|
|
166
166
|
borderColor: "currentColor",
|
|
167
|
-
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedBg :
|
|
167
|
+
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedBg : a,
|
|
168
168
|
"@media (hover: hover)": {
|
|
169
169
|
"&:hover": {
|
|
170
|
-
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg :
|
|
170
|
+
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg : r,
|
|
171
171
|
"--variant-textBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : b(o.palette.text.primary, o.palette.action.hoverOpacity),
|
|
172
172
|
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : b(o.palette.text.primary, o.palette.action.hoverOpacity)
|
|
173
173
|
}
|
|
@@ -236,13 +236,13 @@ const Z = (o) => {
|
|
|
236
236
|
"&:hover": {
|
|
237
237
|
boxShadow: "none"
|
|
238
238
|
},
|
|
239
|
-
[`&.${
|
|
239
|
+
[`&.${p.focusVisible}`]: {
|
|
240
240
|
boxShadow: "none"
|
|
241
241
|
},
|
|
242
242
|
"&:active": {
|
|
243
243
|
boxShadow: "none"
|
|
244
244
|
},
|
|
245
|
-
[`&.${
|
|
245
|
+
[`&.${p.disabled}`]: {
|
|
246
246
|
boxShadow: "none"
|
|
247
247
|
}
|
|
248
248
|
}
|
|
@@ -255,14 +255,14 @@ const Z = (o) => {
|
|
|
255
255
|
}
|
|
256
256
|
}]
|
|
257
257
|
};
|
|
258
|
-
})), to =
|
|
258
|
+
})), to = d("span", {
|
|
259
259
|
name: "MuiButton",
|
|
260
260
|
slot: "StartIcon",
|
|
261
|
-
overridesResolver: (o,
|
|
261
|
+
overridesResolver: (o, a) => {
|
|
262
262
|
const {
|
|
263
|
-
ownerState:
|
|
263
|
+
ownerState: r
|
|
264
264
|
} = o;
|
|
265
|
-
return [
|
|
265
|
+
return [a.startIcon, a[`iconSize${s(r.size)}`]];
|
|
266
266
|
}
|
|
267
267
|
})({
|
|
268
268
|
display: "inherit",
|
|
@@ -276,14 +276,14 @@ const Z = (o) => {
|
|
|
276
276
|
marginLeft: -2
|
|
277
277
|
}
|
|
278
278
|
}, ...R]
|
|
279
|
-
}), ao =
|
|
279
|
+
}), ao = d("span", {
|
|
280
280
|
name: "MuiButton",
|
|
281
281
|
slot: "EndIcon",
|
|
282
|
-
overridesResolver: (o,
|
|
282
|
+
overridesResolver: (o, a) => {
|
|
283
283
|
const {
|
|
284
|
-
ownerState:
|
|
284
|
+
ownerState: r
|
|
285
285
|
} = o;
|
|
286
|
-
return [
|
|
286
|
+
return [a.endIcon, a[`iconSize${s(r.size)}`]];
|
|
287
287
|
}
|
|
288
288
|
})({
|
|
289
289
|
display: "inherit",
|
|
@@ -297,9 +297,9 @@ const Z = (o) => {
|
|
|
297
297
|
marginRight: -2
|
|
298
298
|
}
|
|
299
299
|
}, ...R]
|
|
300
|
-
}), k = /* @__PURE__ */ g.forwardRef(function(
|
|
301
|
-
const
|
|
302
|
-
props:
|
|
300
|
+
}), k = /* @__PURE__ */ g.forwardRef(function(a, r) {
|
|
301
|
+
const n = g.useContext(I), i = g.useContext(O), c = A(n, a), u = q({
|
|
302
|
+
props: c,
|
|
303
303
|
name: "MuiButton"
|
|
304
304
|
}), {
|
|
305
305
|
children: f,
|
|
@@ -316,7 +316,7 @@ const Z = (o) => {
|
|
|
316
316
|
startIcon: m,
|
|
317
317
|
type: w,
|
|
318
318
|
variant: V = "text",
|
|
319
|
-
...
|
|
319
|
+
...G
|
|
320
320
|
} = u, x = {
|
|
321
321
|
...u,
|
|
322
322
|
color: y,
|
|
@@ -328,27 +328,27 @@ const Z = (o) => {
|
|
|
328
328
|
size: M,
|
|
329
329
|
type: w,
|
|
330
330
|
variant: V
|
|
331
|
-
}, v = Z(x),
|
|
331
|
+
}, v = Z(x), j = m && /* @__PURE__ */ l(to, {
|
|
332
332
|
className: v.startIcon,
|
|
333
333
|
ownerState: x,
|
|
334
334
|
children: m
|
|
335
|
-
}), L = C && /* @__PURE__ */
|
|
335
|
+
}), L = C && /* @__PURE__ */ l(ao, {
|
|
336
336
|
className: v.endIcon,
|
|
337
337
|
ownerState: x,
|
|
338
338
|
children: C
|
|
339
|
-
}), D =
|
|
339
|
+
}), D = i || "";
|
|
340
340
|
return /* @__PURE__ */ F(oo, {
|
|
341
341
|
ownerState: x,
|
|
342
|
-
className: h(
|
|
342
|
+
className: h(n.className, v.root, N, D),
|
|
343
343
|
component: B,
|
|
344
344
|
disabled: z,
|
|
345
345
|
focusRipple: !$,
|
|
346
346
|
focusVisibleClassName: h(v.focusVisible, P),
|
|
347
|
-
ref:
|
|
347
|
+
ref: r,
|
|
348
348
|
type: w,
|
|
349
|
-
...
|
|
349
|
+
...G,
|
|
350
350
|
classes: v,
|
|
351
|
-
children: [
|
|
351
|
+
children: [j, f, L]
|
|
352
352
|
});
|
|
353
353
|
});
|
|
354
354
|
process.env.NODE_ENV !== "production" && (k.propTypes = {
|
|
@@ -445,7 +445,7 @@ process.env.NODE_ENV !== "production" && (k.propTypes = {
|
|
|
445
445
|
*/
|
|
446
446
|
variant: t.oneOfType([t.oneOf(["contained", "outlined", "text"]), t.string])
|
|
447
447
|
});
|
|
448
|
-
const E =
|
|
448
|
+
const E = d(k)`
|
|
449
449
|
text-transform: none;
|
|
450
450
|
&:disabled {
|
|
451
451
|
opacity: 0.5;
|
|
@@ -454,7 +454,7 @@ const E = l(k)`
|
|
|
454
454
|
justify-content: center;
|
|
455
455
|
align-items: center;
|
|
456
456
|
}
|
|
457
|
-
`, no =
|
|
457
|
+
`, no = d(E)`
|
|
458
458
|
background-color: ${e.colors.green};
|
|
459
459
|
border-radius: 0;
|
|
460
460
|
height: 2.5rem;
|
|
@@ -474,41 +474,44 @@ const E = l(k)`
|
|
|
474
474
|
&:disabled {
|
|
475
475
|
background-color: ${e.colors.darkGreen};
|
|
476
476
|
}
|
|
477
|
-
`, ro =
|
|
477
|
+
`, ro = d(E)`
|
|
478
478
|
color: ${e.colors.black};
|
|
479
479
|
border: 3px solid ${e.colors.blue};
|
|
480
480
|
padding: 0.5rem 2rem;
|
|
481
|
-
`, eo =
|
|
481
|
+
`, eo = d(S)`
|
|
482
482
|
border-radius: 8px;
|
|
483
|
-
`, io =
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
483
|
+
`, io = d(S)(
|
|
484
|
+
({ size: o, color: a = e.colors.darkGreen }) => ({
|
|
485
|
+
...X`
|
|
486
|
+
display: flex;
|
|
487
|
+
align-items: center;
|
|
488
|
+
justify-content: center;
|
|
489
|
+
background-color: transparent;
|
|
490
|
+
transition: 313ms all ease-in-out;
|
|
490
491
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
492
|
+
&:hover,
|
|
493
|
+
:focus-visible {
|
|
494
|
+
svg {
|
|
495
|
+
filter: drop-shadow(0 0 6px ${e.colors.dandelion}) drop-shadow(0 0 6px ${e.colors.dandelion})
|
|
496
|
+
drop-shadow(0 0 6px ${e.colors.dandelion}) drop-shadow(0 0 6px ${e.colors.dandelion});
|
|
497
|
+
}
|
|
496
498
|
}
|
|
497
|
-
}
|
|
498
499
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
})
|
|
500
|
+
svg {
|
|
501
|
+
transition: 313ms all ease-in-out;
|
|
502
|
+
fill: ${a};
|
|
503
|
+
width: ${o}px;
|
|
504
|
+
height: ${o}px;
|
|
505
|
+
}
|
|
506
|
+
`
|
|
507
|
+
})
|
|
508
|
+
), go = ({
|
|
507
509
|
variant: o = 1,
|
|
508
|
-
size:
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
510
|
+
size: a = 50,
|
|
511
|
+
color: r = e.colors.darkGreen,
|
|
512
|
+
children: n,
|
|
513
|
+
...i
|
|
514
|
+
}) => o === "unstyled" ? /* @__PURE__ */ l(eo, { ...i, children: n }) : o === 2 ? /* @__PURE__ */ l(ro, { ...i, children: /* @__PURE__ */ l("span", { children: n }) }) : o === "icon" ? /* @__PURE__ */ l(io, { ...{ size: a, color: r }, ...i, children: n }) : /* @__PURE__ */ l(no, { ...i, children: /* @__PURE__ */ l("span", { children: n }) });
|
|
512
515
|
export {
|
|
513
516
|
go as Button,
|
|
514
517
|
go as default
|
package/Nav/Nav.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
export interface TemplateThemeProps {
|
|
2
|
+
backgroundPrimary: string;
|
|
3
|
+
backgroundSecondary: string;
|
|
4
|
+
backgroundTertiary: string;
|
|
5
|
+
borderPrimary: string;
|
|
6
|
+
iconPrimary: string;
|
|
7
|
+
highlightPrimary: string;
|
|
8
|
+
highlightSecondary: string;
|
|
9
|
+
highlightTertiary: string;
|
|
10
|
+
shadowPrimary: string;
|
|
11
|
+
}
|
|
1
12
|
export interface NavItemProps {
|
|
2
13
|
label?: string;
|
|
3
14
|
icon?: React.ReactNode;
|
|
@@ -10,6 +21,7 @@ export interface NavProps {
|
|
|
10
21
|
activeRoute?: string;
|
|
11
22
|
navWidth?: string;
|
|
12
23
|
isTablet?: boolean;
|
|
24
|
+
themeColors: TemplateThemeProps;
|
|
13
25
|
}
|
|
14
26
|
export declare const Nav: React.FC<NavProps>;
|
|
15
27
|
export default Nav;
|