jcicl 0.0.109 → 0.0.110
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/Close.js +8 -0
- package/.chunks/DefaultPropsProvider.js +76 -74
- package/.chunks/Input.js +13 -7
- package/.chunks/Portal.js +27 -26
- package/AppContainer/AppContainer.d.ts +4 -0
- package/AppContainer/AppContainer.js +1551 -50
- package/AppHeader/AppHeader.d.ts +2 -1
- package/AppHeader/AppHeader.js +143 -28
- package/Avatar/Avatar.js +12 -12
- package/AvatarWithImage/AvatarWithImage.js +5 -5
- package/Button/Button.d.ts +3 -2
- package/Button/Button.js +101 -76
- package/EditableInfoCard/EditableInfoCard.js +45 -46
- package/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/Icon/Icon.js +6 -6
- package/ListButton/ListButton.d.ts +1 -3
- package/ListButton/ListButton.js +6 -6
- package/Nav/Nav.d.ts +3 -2
- package/Nav/Nav.js +57 -42
- package/Tooltip/Tooltip.js +69 -69
- package/WithLabel/WithLabel.d.ts +1 -1
- package/package.json +4 -2
- package/theme.d.ts +4 -4
- package/theme.js +9 -7
package/AppHeader/AppHeader.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export interface AppHeaderProps {
|
|
2
2
|
loggedIn?: boolean;
|
|
3
|
+
hamburgerMenu?: boolean;
|
|
3
4
|
onLogin?: () => void;
|
|
4
5
|
onUserMenuClick?: () => void;
|
|
5
|
-
|
|
6
|
+
onHamburgerMenuClick?: () => void;
|
|
6
7
|
}
|
|
7
8
|
declare const AppHeader: React.FC<AppHeaderProps>;
|
|
8
9
|
export default AppHeader;
|
package/AppHeader/AppHeader.js
CHANGED
|
@@ -1,33 +1,148 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
1
|
+
import { jsx as u, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import C, { useState as h, useLayoutEffect as z } from "react";
|
|
4
|
+
import { n as f } from "../.chunks/emotion-styled.browser.esm.js";
|
|
5
|
+
import { c as m } from "../.chunks/emotion-react.browser.esm.js";
|
|
6
|
+
import { l as W } from "../.chunks/jocologo.js";
|
|
7
|
+
import { I as k } from "../.chunks/Input.js";
|
|
8
|
+
import { Button as x } from "../Button/Button.js";
|
|
9
|
+
import I from "../Avatar/Avatar.js";
|
|
10
|
+
import E from "../WithLabel/WithLabel.js";
|
|
11
|
+
import { c as M } from "../.chunks/createSvgIcon.js";
|
|
12
|
+
const S = C[typeof document < "u" && document.createElement !== void 0 ? "useLayoutEffect" : "useEffect"], y = (e) => {
|
|
13
|
+
const l = g.useRef(e);
|
|
14
|
+
return g.useEffect(() => {
|
|
15
|
+
l.current = e;
|
|
16
|
+
}), l;
|
|
17
|
+
};
|
|
18
|
+
function L() {
|
|
19
|
+
}
|
|
20
|
+
function O(e, l, o = {}) {
|
|
21
|
+
const r = R(o.polyfill), a = y(l);
|
|
22
|
+
return S(() => {
|
|
23
|
+
let t = !1;
|
|
24
|
+
const i = e && "current" in e ? e.current : e;
|
|
25
|
+
if (!i) return L;
|
|
26
|
+
function s(n, c) {
|
|
27
|
+
t || a.current(n, c);
|
|
28
|
+
}
|
|
29
|
+
return r.subscribe(i, s), () => {
|
|
30
|
+
t = !0, r.unsubscribe(i, s);
|
|
31
|
+
};
|
|
32
|
+
}, [e, r, a]), r.observer;
|
|
33
|
+
}
|
|
34
|
+
function $(e) {
|
|
35
|
+
let l = !1, o = [];
|
|
36
|
+
const r = /* @__PURE__ */ new Map(), a = new (e || window.ResizeObserver)((t, i) => {
|
|
37
|
+
o = o.concat(t);
|
|
38
|
+
function s() {
|
|
39
|
+
const n = /* @__PURE__ */ new Set();
|
|
40
|
+
for (let c = 0; c < o.length; c++) {
|
|
41
|
+
if (n.has(o[c].target)) continue;
|
|
42
|
+
n.add(o[c].target);
|
|
43
|
+
const p = r.get(o[c].target);
|
|
44
|
+
p == null || p.forEach((d) => d(o[c], i));
|
|
45
|
+
}
|
|
46
|
+
o = [], l = !1;
|
|
47
|
+
}
|
|
48
|
+
l || window.requestAnimationFrame(s), l = !0;
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
observer: a,
|
|
52
|
+
subscribe(t, i) {
|
|
53
|
+
var s;
|
|
54
|
+
a.observe(t);
|
|
55
|
+
const n = (s = r.get(t)) !== null && s !== void 0 ? s : [];
|
|
56
|
+
n.push(i), r.set(t, n);
|
|
57
|
+
},
|
|
58
|
+
unsubscribe(t, i) {
|
|
59
|
+
var s;
|
|
60
|
+
const n = (s = r.get(t)) !== null && s !== void 0 ? s : [];
|
|
61
|
+
if (n.length === 1) {
|
|
62
|
+
a.unobserve(t), r.delete(t);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const c = n.indexOf(i);
|
|
66
|
+
c !== -1 && n.splice(c, 1), r.set(t, n);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
let v;
|
|
71
|
+
const R = (e) => v || (v = $(e)), _ = M(/* @__PURE__ */ u("path", {
|
|
72
|
+
d: "M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"
|
|
73
|
+
}), "Menu"), A = f("div")(() => ({
|
|
74
|
+
...m`
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: row;
|
|
77
|
+
padding: 4px 16px;
|
|
78
|
+
background-color: transparent;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: space-between;
|
|
81
|
+
gap: 1.5rem;
|
|
82
|
+
`
|
|
83
|
+
})), j = f("img")({
|
|
18
84
|
width: "36px"
|
|
19
|
-
}),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
85
|
+
}), H = f("div")(() => ({
|
|
86
|
+
...m`
|
|
87
|
+
display: flex;
|
|
88
|
+
gap: 1rem;
|
|
89
|
+
height: 50px;
|
|
90
|
+
`
|
|
91
|
+
})), U = f("div")(({ width: e, loggedIn: l }) => ({
|
|
92
|
+
...m`
|
|
93
|
+
width: ${e}px;
|
|
94
|
+
display: flex;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
align-items: flex-end;
|
|
97
|
+
flex-direction: ${l ? "column" : "column-reverse"};
|
|
98
|
+
flex-shrink: 0;
|
|
99
|
+
* {
|
|
100
|
+
white-space: nowrap;
|
|
101
|
+
}
|
|
102
|
+
`
|
|
103
|
+
})), w = f("div")(({ visible: e }) => ({
|
|
104
|
+
...m`
|
|
105
|
+
z-index: ${e ? 1 : 0};
|
|
106
|
+
opacity: ${e ? 1 : 0};
|
|
107
|
+
pointer-events: ${e ? "auto" : "none"};
|
|
108
|
+
position: ${e ? "relative" : "absolute"};
|
|
109
|
+
`
|
|
110
|
+
})), V = f("div")(() => ({
|
|
111
|
+
...m`
|
|
112
|
+
display: flex;
|
|
113
|
+
width: 1360px;
|
|
114
|
+
max-width: 100%;
|
|
115
|
+
.MuiFormControl-root {
|
|
116
|
+
width: 100%;
|
|
117
|
+
}
|
|
118
|
+
`
|
|
119
|
+
})), T = ({ hamburgerMenu: e, onHamburgerMenuClick: l }) => {
|
|
120
|
+
const [o, r] = h(!1), [a, t] = h(0), [i, s] = h(null), [n, c] = h(null);
|
|
121
|
+
z(() => {
|
|
122
|
+
i && i.clientWidth > a && t(i.clientWidth), n && n.clientWidth > a && t(n.clientWidth);
|
|
123
|
+
}, [i, n]);
|
|
124
|
+
const p = (d) => {
|
|
125
|
+
d != null && d.clientWidth && d.clientWidth > a && t(d.clientWidth);
|
|
126
|
+
};
|
|
127
|
+
return O(i, () => p(i)), /* @__PURE__ */ b(A, { children: [
|
|
128
|
+
/* @__PURE__ */ b(H, { children: [
|
|
129
|
+
/* @__PURE__ */ u(j, { src: W, height: "50px" }),
|
|
130
|
+
e && /* @__PURE__ */ u(x, { variant: "icon", onClick: l, children: /* @__PURE__ */ u(_, {}) })
|
|
131
|
+
] }),
|
|
132
|
+
/* @__PURE__ */ u(V, { children: /* @__PURE__ */ u(k, { placeholder: "Search..." }) }),
|
|
133
|
+
/* @__PURE__ */ b(U, { width: a, loggedIn: o, children: [
|
|
134
|
+
/* @__PURE__ */ u(w, { visible: o, ref: s, children: /* @__PURE__ */ u(
|
|
135
|
+
E,
|
|
136
|
+
{
|
|
137
|
+
id: "accountMenuContainer",
|
|
138
|
+
component: /* @__PURE__ */ u(I, { onClick: () => r(!1) }),
|
|
139
|
+
label: "Welcome, User"
|
|
140
|
+
}
|
|
141
|
+
) }),
|
|
142
|
+
/* @__PURE__ */ u(w, { visible: !o, ref: c, children: /* @__PURE__ */ u(x, { id: "loginButtonContainer", onClick: () => r(!0), children: "Log In" }) })
|
|
143
|
+
] })
|
|
29
144
|
] });
|
|
30
145
|
};
|
|
31
146
|
export {
|
|
32
|
-
|
|
147
|
+
T as default
|
|
33
148
|
};
|
package/Avatar/Avatar.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "../.chunks/createSvgIcon.js";
|
|
3
3
|
import { B as d } from "../.chunks/ButtonBase.js";
|
|
4
|
-
import
|
|
4
|
+
import t from "../theme.js";
|
|
5
5
|
import { n as a, i as l } from "../.chunks/emotion-styled.browser.esm.js";
|
|
6
|
-
const m = c(/* @__PURE__ */
|
|
6
|
+
const m = c(/* @__PURE__ */ i("path", {
|
|
7
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
8
|
}), "PersonOutlineOutlined"), s = a(m, {
|
|
9
9
|
shouldForwardProp: (r) => l(r)
|
|
10
|
-
})(({ avatarColor: r =
|
|
10
|
+
})(({ avatarColor: r = t.colors.darkGreen, backgroundColor: o = t.colors.mint, size: e = 40 }) => ({
|
|
11
11
|
border: `1px solid ${r}`,
|
|
12
|
-
backgroundColor:
|
|
12
|
+
backgroundColor: o,
|
|
13
13
|
borderRadius: "50%",
|
|
14
14
|
padding: "8px",
|
|
15
15
|
fill: r,
|
|
16
|
-
width: `${
|
|
17
|
-
height: `${
|
|
16
|
+
width: `${e - 18}px`,
|
|
17
|
+
height: `${e - 18}px`,
|
|
18
18
|
pointerEvents: "none"
|
|
19
19
|
})), p = a(d)({
|
|
20
20
|
backgroundColor: "transparent",
|
|
@@ -22,17 +22,17 @@ const m = c(/* @__PURE__ */ t("path", {
|
|
|
22
22
|
span: {
|
|
23
23
|
transition: "313ms all ease-in-out"
|
|
24
24
|
},
|
|
25
|
-
"&:hover, :focus": {
|
|
25
|
+
"&:hover, :focus-visible": {
|
|
26
26
|
span: {
|
|
27
|
-
backgroundColor:
|
|
27
|
+
backgroundColor: t.colors.grayO44
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}), g = ({
|
|
31
31
|
avatarColor: r,
|
|
32
|
-
backgroundColor:
|
|
33
|
-
size:
|
|
32
|
+
backgroundColor: o,
|
|
33
|
+
size: e,
|
|
34
34
|
...n
|
|
35
|
-
}) => n != null && n.onClick ? /* @__PURE__ */
|
|
35
|
+
}) => n != null && n.onClick ? /* @__PURE__ */ i(p, { ...n, children: /* @__PURE__ */ i(s, { avatarColor: r, backgroundColor: o, size: e }) }) : /* @__PURE__ */ i(s, { avatarColor: r, backgroundColor: o, size: e });
|
|
36
36
|
export {
|
|
37
37
|
g as default
|
|
38
38
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { B as l } from "../.chunks/ButtonBase.js";
|
|
3
3
|
import m from "../theme.js";
|
|
4
4
|
import { n as d } from "../.chunks/emotion-styled.browser.esm.js";
|
|
@@ -18,7 +18,7 @@ const s = d("img")(
|
|
|
18
18
|
span: {
|
|
19
19
|
transition: "313ms all ease-in-out"
|
|
20
20
|
},
|
|
21
|
-
"&:hover, :focus": {
|
|
21
|
+
"&:hover, :focus-visible": {
|
|
22
22
|
span: {
|
|
23
23
|
backgroundColor: m.colors.grayO44
|
|
24
24
|
}
|
|
@@ -27,10 +27,10 @@ const s = d("img")(
|
|
|
27
27
|
borderColor: o,
|
|
28
28
|
alt: r = "profile image",
|
|
29
29
|
size: e,
|
|
30
|
-
objectFit:
|
|
31
|
-
src:
|
|
30
|
+
objectFit: n,
|
|
31
|
+
src: t,
|
|
32
32
|
...a
|
|
33
|
-
}) => a != null && a.onClick ? /* @__PURE__ */
|
|
33
|
+
}) => a != null && a.onClick ? /* @__PURE__ */ i(c, { ...a, children: /* @__PURE__ */ i(s, { src: t, alt: r, borderColor: o, size: e, objectFit: n }) }) : /* @__PURE__ */ i(s, { src: t, alt: r, borderColor: o, size: e, objectFit: n });
|
|
34
34
|
export {
|
|
35
35
|
u as AvatarWithImage,
|
|
36
36
|
u as default
|
package/Button/Button.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ButtonProps as MuiButtonProps } from '@mui/material/Button/Button';
|
|
2
|
-
export interface ButtonProps extends Omit<MuiButtonProps, 'variant'> {
|
|
3
|
-
variant?: 1 | 2 | 'unstyled';
|
|
2
|
+
export interface ButtonProps extends Omit<MuiButtonProps, 'variant' | 'size'> {
|
|
3
|
+
variant?: 1 | 2 | 'unstyled' | 'icon';
|
|
4
|
+
size?: number;
|
|
4
5
|
}
|
|
5
6
|
export declare const Button: React.FC<ButtonProps & {
|
|
6
7
|
children: React.ReactNode;
|
package/Button/Button.js
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import { jsxs as F, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import * as g from "react";
|
|
3
|
-
import { g as U, a as _, s as l, r as H, c as
|
|
3
|
+
import { g as U, a as _, s as l, r as H, c as i, 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
|
-
import { B as
|
|
7
|
-
import
|
|
8
|
-
|
|
6
|
+
import { B as S } from "../.chunks/ButtonBase.js";
|
|
7
|
+
import { c as X } from "../.chunks/emotion-react.browser.esm.js";
|
|
8
|
+
import e from "../theme.js";
|
|
9
|
+
function Y(o) {
|
|
9
10
|
return U("MuiButton", o);
|
|
10
11
|
}
|
|
11
|
-
const c = _("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"]),
|
|
12
|
-
process.env.NODE_ENV !== "production" && (
|
|
12
|
+
const c = _("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
|
+
process.env.NODE_ENV !== "production" && (I.displayName = "ButtonGroupContext");
|
|
13
14
|
const O = /* @__PURE__ */ g.createContext(void 0);
|
|
14
15
|
process.env.NODE_ENV !== "production" && (O.displayName = "ButtonGroupButtonContext");
|
|
15
|
-
const
|
|
16
|
+
const Z = (o) => {
|
|
16
17
|
const {
|
|
17
|
-
color:
|
|
18
|
-
disableElevation:
|
|
18
|
+
color: n,
|
|
19
|
+
disableElevation: a,
|
|
19
20
|
fullWidth: r,
|
|
20
21
|
size: d,
|
|
21
22
|
variant: p,
|
|
22
23
|
classes: u
|
|
23
|
-
} = o,
|
|
24
|
-
root: ["root", p, `${p}${
|
|
24
|
+
} = o, f = {
|
|
25
|
+
root: ["root", p, `${p}${i(n)}`, `size${i(d)}`, `${p}Size${i(d)}`, `color${i(n)}`, a && "disableElevation", r && "fullWidth"],
|
|
25
26
|
label: ["label"],
|
|
26
|
-
startIcon: ["icon", "startIcon", `iconSize${
|
|
27
|
-
endIcon: ["icon", "endIcon", `iconSize${
|
|
28
|
-
},
|
|
27
|
+
startIcon: ["icon", "startIcon", `iconSize${i(d)}`],
|
|
28
|
+
endIcon: ["icon", "endIcon", `iconSize${i(d)}`]
|
|
29
|
+
}, y = J(f, Y, u);
|
|
29
30
|
return {
|
|
30
31
|
...u,
|
|
31
32
|
// forward the focused, disabled, etc. classes to the ButtonBase
|
|
32
|
-
...
|
|
33
|
+
...y
|
|
33
34
|
};
|
|
34
35
|
}, R = [{
|
|
35
36
|
props: {
|
|
@@ -58,20 +59,20 @@ const Y = (o) => {
|
|
|
58
59
|
fontSize: 22
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
|
-
}],
|
|
62
|
+
}], oo = l(S, {
|
|
62
63
|
shouldForwardProp: (o) => H(o) || o === "classes",
|
|
63
64
|
name: "MuiButton",
|
|
64
65
|
slot: "Root",
|
|
65
|
-
overridesResolver: (o,
|
|
66
|
+
overridesResolver: (o, n) => {
|
|
66
67
|
const {
|
|
67
|
-
ownerState:
|
|
68
|
+
ownerState: a
|
|
68
69
|
} = o;
|
|
69
|
-
return [
|
|
70
|
+
return [n.root, n[a.variant], n[`${a.variant}${i(a.color)}`], n[`size${i(a.size)}`], n[`${a.variant}Size${i(a.size)}`], a.color === "inherit" && n.colorInherit, a.disableElevation && n.disableElevation, a.fullWidth && n.fullWidth];
|
|
70
71
|
}
|
|
71
72
|
})(K(({
|
|
72
73
|
theme: o
|
|
73
74
|
}) => {
|
|
74
|
-
const
|
|
75
|
+
const n = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], a = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
|
|
75
76
|
return {
|
|
76
77
|
...o.typography.button,
|
|
77
78
|
minWidth: 64,
|
|
@@ -163,10 +164,10 @@ const Y = (o) => {
|
|
|
163
164
|
style: {
|
|
164
165
|
color: "inherit",
|
|
165
166
|
borderColor: "currentColor",
|
|
166
|
-
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedBg :
|
|
167
|
+
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedBg : n,
|
|
167
168
|
"@media (hover: hover)": {
|
|
168
169
|
"&:hover": {
|
|
169
|
-
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg :
|
|
170
|
+
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg : a,
|
|
170
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),
|
|
171
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)
|
|
172
173
|
}
|
|
@@ -254,14 +255,14 @@ const Y = (o) => {
|
|
|
254
255
|
}
|
|
255
256
|
}]
|
|
256
257
|
};
|
|
257
|
-
})),
|
|
258
|
+
})), to = l("span", {
|
|
258
259
|
name: "MuiButton",
|
|
259
260
|
slot: "StartIcon",
|
|
260
|
-
overridesResolver: (o,
|
|
261
|
+
overridesResolver: (o, n) => {
|
|
261
262
|
const {
|
|
262
|
-
ownerState:
|
|
263
|
+
ownerState: a
|
|
263
264
|
} = o;
|
|
264
|
-
return [
|
|
265
|
+
return [n.startIcon, n[`iconSize${i(a.size)}`]];
|
|
265
266
|
}
|
|
266
267
|
})({
|
|
267
268
|
display: "inherit",
|
|
@@ -275,14 +276,14 @@ const Y = (o) => {
|
|
|
275
276
|
marginLeft: -2
|
|
276
277
|
}
|
|
277
278
|
}, ...R]
|
|
278
|
-
}),
|
|
279
|
+
}), ao = l("span", {
|
|
279
280
|
name: "MuiButton",
|
|
280
281
|
slot: "EndIcon",
|
|
281
|
-
overridesResolver: (o,
|
|
282
|
+
overridesResolver: (o, n) => {
|
|
282
283
|
const {
|
|
283
|
-
ownerState:
|
|
284
|
+
ownerState: a
|
|
284
285
|
} = o;
|
|
285
|
-
return [
|
|
286
|
+
return [n.endIcon, n[`iconSize${i(a.size)}`]];
|
|
286
287
|
}
|
|
287
288
|
})({
|
|
288
289
|
display: "inherit",
|
|
@@ -296,61 +297,61 @@ const Y = (o) => {
|
|
|
296
297
|
marginRight: -2
|
|
297
298
|
}
|
|
298
299
|
}, ...R]
|
|
299
|
-
}),
|
|
300
|
-
const r = g.useContext(
|
|
300
|
+
}), k = /* @__PURE__ */ g.forwardRef(function(n, a) {
|
|
301
|
+
const r = g.useContext(I), d = g.useContext(O), p = A(r, n), u = q({
|
|
301
302
|
props: p,
|
|
302
303
|
name: "MuiButton"
|
|
303
304
|
}), {
|
|
304
|
-
children:
|
|
305
|
-
color:
|
|
306
|
-
component:
|
|
307
|
-
className:
|
|
305
|
+
children: f,
|
|
306
|
+
color: y = "primary",
|
|
307
|
+
component: B = "button",
|
|
308
|
+
className: N,
|
|
308
309
|
disabled: z = !1,
|
|
309
310
|
disableElevation: T = !1,
|
|
310
|
-
disableFocusRipple:
|
|
311
|
+
disableFocusRipple: $ = !1,
|
|
311
312
|
endIcon: C,
|
|
312
313
|
focusVisibleClassName: P,
|
|
313
314
|
fullWidth: W = !1,
|
|
314
315
|
size: M = "medium",
|
|
315
|
-
startIcon:
|
|
316
|
-
type:
|
|
316
|
+
startIcon: m,
|
|
317
|
+
type: w,
|
|
317
318
|
variant: V = "text",
|
|
318
|
-
...
|
|
319
|
+
...j
|
|
319
320
|
} = u, x = {
|
|
320
321
|
...u,
|
|
321
|
-
color:
|
|
322
|
-
component:
|
|
322
|
+
color: y,
|
|
323
|
+
component: B,
|
|
323
324
|
disabled: z,
|
|
324
325
|
disableElevation: T,
|
|
325
|
-
disableFocusRipple:
|
|
326
|
+
disableFocusRipple: $,
|
|
326
327
|
fullWidth: W,
|
|
327
328
|
size: M,
|
|
328
|
-
type:
|
|
329
|
+
type: w,
|
|
329
330
|
variant: V
|
|
330
|
-
}, v =
|
|
331
|
+
}, v = Z(x), G = m && /* @__PURE__ */ s(to, {
|
|
331
332
|
className: v.startIcon,
|
|
332
333
|
ownerState: x,
|
|
333
|
-
children:
|
|
334
|
-
}),
|
|
334
|
+
children: m
|
|
335
|
+
}), L = C && /* @__PURE__ */ s(ao, {
|
|
335
336
|
className: v.endIcon,
|
|
336
337
|
ownerState: x,
|
|
337
338
|
children: C
|
|
338
339
|
}), D = d || "";
|
|
339
|
-
return /* @__PURE__ */ F(
|
|
340
|
+
return /* @__PURE__ */ F(oo, {
|
|
340
341
|
ownerState: x,
|
|
341
|
-
className:
|
|
342
|
-
component:
|
|
342
|
+
className: h(r.className, v.root, N, D),
|
|
343
|
+
component: B,
|
|
343
344
|
disabled: z,
|
|
344
|
-
focusRipple:
|
|
345
|
-
focusVisibleClassName:
|
|
346
|
-
ref:
|
|
347
|
-
type:
|
|
348
|
-
...
|
|
345
|
+
focusRipple: !$,
|
|
346
|
+
focusVisibleClassName: h(v.focusVisible, P),
|
|
347
|
+
ref: a,
|
|
348
|
+
type: w,
|
|
349
|
+
...j,
|
|
349
350
|
classes: v,
|
|
350
|
-
children: [
|
|
351
|
+
children: [G, f, L]
|
|
351
352
|
});
|
|
352
353
|
});
|
|
353
|
-
process.env.NODE_ENV !== "production" && (
|
|
354
|
+
process.env.NODE_ENV !== "production" && (k.propTypes = {
|
|
354
355
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
355
356
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
356
357
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -444,47 +445,71 @@ process.env.NODE_ENV !== "production" && (E.propTypes = {
|
|
|
444
445
|
*/
|
|
445
446
|
variant: t.oneOfType([t.oneOf(["contained", "outlined", "text"]), t.string])
|
|
446
447
|
});
|
|
447
|
-
const
|
|
448
|
+
const E = l(k)`
|
|
448
449
|
text-transform: none;
|
|
449
450
|
&:disabled {
|
|
450
451
|
opacity: 0.5;
|
|
451
|
-
color: ${
|
|
452
|
+
color: ${e.colors.black};
|
|
452
453
|
display: flex;
|
|
453
454
|
justify-content: center;
|
|
454
455
|
align-items: center;
|
|
455
456
|
}
|
|
456
|
-
`,
|
|
457
|
-
background-color: ${
|
|
457
|
+
`, no = l(E)`
|
|
458
|
+
background-color: ${e.colors.green};
|
|
458
459
|
border-radius: 0;
|
|
459
460
|
height: 2.5rem;
|
|
460
461
|
border: 2px solid transparent;
|
|
461
|
-
color: ${
|
|
462
|
+
color: ${e.colors.white};
|
|
462
463
|
transition: 313ms all ease-in;
|
|
463
464
|
border-radius: 32px;
|
|
464
465
|
font-weight: 400;
|
|
465
466
|
padding: 0.75rem 2rem;
|
|
466
467
|
font-size: 1rem;
|
|
467
|
-
box-shadow: ${
|
|
468
|
+
box-shadow: ${e.boxShadow.gray63};
|
|
468
469
|
&:hover,
|
|
469
|
-
:focus {
|
|
470
|
-
background-color: ${
|
|
471
|
-
box-shadow: ${
|
|
470
|
+
:focus-visible {
|
|
471
|
+
background-color: ${e.colors.darkGreen};
|
|
472
|
+
box-shadow: ${e.boxShadow.black63};
|
|
472
473
|
}
|
|
473
474
|
&:disabled {
|
|
474
|
-
background-color: ${
|
|
475
|
+
background-color: ${e.colors.darkGreen};
|
|
475
476
|
}
|
|
476
|
-
`,
|
|
477
|
-
color: ${
|
|
478
|
-
border: 3px solid ${
|
|
477
|
+
`, ro = l(E)`
|
|
478
|
+
color: ${e.colors.black};
|
|
479
|
+
border: 3px solid ${e.colors.blue};
|
|
479
480
|
padding: 0.5rem 2rem;
|
|
480
|
-
`,
|
|
481
|
+
`, eo = l(S)`
|
|
481
482
|
border-radius: 8px;
|
|
482
|
-
`,
|
|
483
|
+
`, io = l(S)(({ size: o }) => ({
|
|
484
|
+
...X`
|
|
485
|
+
display: flex;
|
|
486
|
+
align-items: center;
|
|
487
|
+
justify-content: center;
|
|
488
|
+
background-color: transparent;
|
|
489
|
+
transition: 313ms all ease-in-out;
|
|
490
|
+
|
|
491
|
+
&:hover,
|
|
492
|
+
:focus-visible {
|
|
493
|
+
svg {
|
|
494
|
+
filter: drop-shadow(0 0 6px ${e.colors.dandelion}) drop-shadow(0 0 6px ${e.colors.dandelion})
|
|
495
|
+
drop-shadow(0 0 6px ${e.colors.dandelion}) drop-shadow(0 0 6px ${e.colors.dandelion});
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
svg {
|
|
500
|
+
transition: 313ms all ease-in-out;
|
|
501
|
+
fill: ${e.colors.darkGreen};
|
|
502
|
+
width: ${o}px;
|
|
503
|
+
height: ${o}px;
|
|
504
|
+
}
|
|
505
|
+
`
|
|
506
|
+
})), go = ({
|
|
483
507
|
variant: o = 1,
|
|
508
|
+
size: n = 50,
|
|
484
509
|
children: a,
|
|
485
|
-
...
|
|
486
|
-
}) => o === "unstyled" ? /* @__PURE__ */ s(
|
|
510
|
+
...r
|
|
511
|
+
}) => o === "unstyled" ? /* @__PURE__ */ s(eo, { ...r, children: a }) : o === 2 ? /* @__PURE__ */ s(ro, { ...r, children: /* @__PURE__ */ s("span", { children: a }) }) : o === "icon" ? /* @__PURE__ */ s(io, { ...{ size: n }, ...r, children: a }) : /* @__PURE__ */ s(no, { ...r, children: /* @__PURE__ */ s("span", { children: a }) });
|
|
487
512
|
export {
|
|
488
|
-
|
|
489
|
-
|
|
513
|
+
go as Button,
|
|
514
|
+
go as default
|
|
490
515
|
};
|