@genai-fi/base 3.0.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button-CGKw9sMz.js +656 -0
- package/dist/CircularProgress-C6sMwjDC.js +1275 -0
- package/dist/{DefaultPropsProvider-C0Ib4Mye.js → DefaultPropsProvider-D2IJ8Qbs.js} +5 -1
- package/dist/{DialogQR-DVWhImXI.js → DialogQR-CyZcX7ul.js} +9 -5
- package/dist/{FlashWifi-CaAOKd3g.js → FlashWifi-CYp0UP0B.js} +1 -1
- package/dist/Portal-BqkDy0Wc.js +613 -0
- package/dist/SvgLayer-CA0elY7q.js +36 -0
- package/dist/assets/IconButtonDot.css +1 -0
- package/dist/assets/LangSelect.css +1 -0
- package/dist/assets/Loading.css +1 -0
- package/dist/assets/PercentageBar.css +1 -0
- package/dist/assets/PieScore.css +1 -0
- package/dist/assets/SvgLayer.css +1 -0
- package/dist/assets/Widget.css +1 -0
- package/dist/assets/style.css +1 -1
- package/dist/assets/style2.css +1 -0
- package/dist/colours.module.css +4 -0
- package/dist/components/AlertPara/AlertPara.js +1 -1
- package/dist/components/Application/Application.d.ts +10 -0
- package/dist/components/Application/Application.js +1610 -0
- package/dist/components/BusyButton/BusyButton.js +7 -6
- package/dist/components/Button/Button.js +12 -4
- package/dist/components/ConnectionStatus/ConnectionStatus.d.ts +1 -5
- package/dist/components/ConnectionStatus/ConnectionStatus.js +48 -47
- package/dist/components/ConnectionStatus/FlashWifi.js +1 -1
- package/dist/components/ContentLoader/ContentError.js +1 -1
- package/dist/components/ContentLoader/ContentLoader.js +5 -1
- package/dist/components/ContentLoader/ContentProgress.js +1 -1
- package/dist/components/IconButtonDot/IconButtonDot.d.ts +7 -0
- package/dist/components/IconButtonDot/IconButtonDot.js +22 -0
- package/dist/components/IconMenu/IconMenu.d.ts +12 -0
- package/dist/components/IconMenu/IconMenu.js +26 -0
- package/dist/components/IconMenu/IconMenuInline.d.ts +6 -0
- package/dist/components/IconMenu/IconMenuInline.js +12 -0
- package/dist/components/IconMenu/Item.d.ts +9 -0
- package/dist/components/IconMenu/Item.js +34 -0
- package/dist/components/IconMenu/Spacer.d.ts +1 -0
- package/dist/components/IconMenu/Spacer.js +11 -0
- package/dist/components/IconMenu/context.d.ts +1 -0
- package/dist/components/IconMenu/context.js +5 -0
- package/dist/components/IconMenu/index.d.ts +4 -0
- package/dist/components/IconMenu/index.js +10 -0
- package/dist/components/LangSelect/LangSelect.d.ts +12 -0
- package/dist/components/LangSelect/LangSelect.js +46 -0
- package/dist/components/Loading/Loading.d.ts +7 -0
- package/dist/components/Loading/Loading.js +15 -0
- package/dist/components/Motd/Motd.js +1 -1
- package/dist/components/PercentageBar/PercentageBar.d.ts +7 -0
- package/dist/components/PercentageBar/PercentageBar.js +37 -0
- package/dist/components/PieScore/PieScore.d.ts +6 -0
- package/dist/components/PieScore/PieScore.js +10676 -0
- package/dist/components/QRCode/DialogQR.js +8 -4
- package/dist/components/QRCode/QRCode.js +1 -1
- package/dist/components/Webcam/Webcam.js +3 -3
- package/dist/components/WorkflowLayout/Layout.d.ts +7 -0
- package/dist/components/WorkflowLayout/Layout.js +43 -0
- package/dist/components/WorkflowLayout/SvgLayer.d.ts +14 -0
- package/dist/components/WorkflowLayout/SvgLayer.js +5 -0
- package/dist/components/WorkflowLayout/Widget.d.ts +18 -0
- package/dist/components/WorkflowLayout/Widget.js +7413 -0
- package/dist/components/WorkflowLayout/index.d.ts +3 -0
- package/dist/components/WorkflowLayout/index.js +6 -0
- package/dist/components/WorkflowLayout/lines.d.ts +17 -0
- package/dist/components/WorkflowLayout/lines.js +37 -0
- package/dist/{createSvgIcon-BfF8yuCp.js → createSvgIcon-DmrVEdN7.js} +2 -2
- package/dist/{createTheme-BIcG8YPQ.js → createTheme-a85zdZWm.js} +4 -0
- package/dist/hooks/peer.d.ts +25 -2
- package/dist/hooks/peer.js +196 -54
- package/dist/main.d.ts +6 -0
- package/dist/main.js +53 -33
- package/dist/react-D_xU5dL6.js +112 -0
- package/dist/state/webrtcState.js +5 -4
- package/dist/style/theme.js +1 -1
- package/dist/style.module-BAnhZ_KJ.js +9 -0
- package/dist/style.module-BDpZJv9y.js +26 -0
- package/dist/util/Observer.d.ts +7 -0
- package/dist/util/Observer.js +9 -0
- package/dist/{webrtcState-D0nJpE9Z.js → vanilla-BJxibF1U.js} +83 -85
- package/package.json +8 -2
- package/dist/Button-DQwRVw4a.js +0 -1918
- package/dist/react-D-b-Xrzv.js +0 -98
- package/dist/style.module-DSFm2eLD.js +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as oe, r as D, d as se, s as j, i as ie, a as ae, P as A, c as fe } from "./createTheme-
|
|
1
|
+
import { g as oe, r as D, d as se, s as j, i as ie, a as ae, P as A, c as fe } from "./createTheme-a85zdZWm.js";
|
|
2
2
|
import ue from "@emotion/styled";
|
|
3
3
|
import "@emotion/react";
|
|
4
4
|
import * as U from "react";
|
|
@@ -509,9 +509,13 @@ function Ue(e) {
|
|
|
509
509
|
return Ee(e);
|
|
510
510
|
}
|
|
511
511
|
export {
|
|
512
|
+
Fe as T,
|
|
512
513
|
ke as a,
|
|
513
514
|
Ie as b,
|
|
514
515
|
Ge as c,
|
|
516
|
+
$e as d,
|
|
517
|
+
Ve as e,
|
|
518
|
+
E as f,
|
|
515
519
|
Le as g,
|
|
516
520
|
He as m,
|
|
517
521
|
T as r,
|
|
@@ -3,14 +3,18 @@ import { useRef as ue, useCallback as ae, useEffect as ce } from "react";
|
|
|
3
3
|
import { g as le } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
4
4
|
import { Dialog as fe, DialogContent as de, DialogActions as ge } from "@mui/material";
|
|
5
5
|
import { useTranslation as he } from "react-i18next";
|
|
6
|
-
import { c as me } from "./createSvgIcon-
|
|
7
|
-
import "./webrtcState
|
|
8
|
-
import
|
|
6
|
+
import { c as me } from "./createSvgIcon-DmrVEdN7.js";
|
|
7
|
+
import "./state/webrtcState.js";
|
|
8
|
+
import "./hooks/peer.js";
|
|
9
|
+
import { Button as It } from "./components/Button/Button.js";
|
|
9
10
|
import "./index-SOhdqzHq.js";
|
|
10
11
|
import "./style/theme.js";
|
|
11
12
|
import "./util/canvas.js";
|
|
12
13
|
import "./FileSaver.min-DhePf63e.js";
|
|
13
14
|
import "./components/BusyButton/BusyButton.js";
|
|
15
|
+
import "./components/WorkflowLayout/Widget.js";
|
|
16
|
+
import "./components/IconMenu/context.js";
|
|
17
|
+
import "@emotion/react";
|
|
14
18
|
import './assets/DialogQR.css';var V = {}, $, Tt;
|
|
15
19
|
function we() {
|
|
16
20
|
return Tt || (Tt = 1, $ = function() {
|
|
@@ -1563,7 +1567,7 @@ const ze = /* @__PURE__ */ le(ke), Ve = "_link_1udre_3", He = "_container_1udre_
|
|
|
1563
1567
|
}, Ye = me(/* @__PURE__ */ U("path", {
|
|
1564
1568
|
d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"
|
|
1565
1569
|
}), "ContentCopy");
|
|
1566
|
-
function
|
|
1570
|
+
function ln({ url: r, open: o, onClose: i }) {
|
|
1567
1571
|
var s;
|
|
1568
1572
|
const { t: n } = he("translation"), t = ue(null), e = ae(() => {
|
|
1569
1573
|
navigator.clipboard.writeText(r);
|
|
@@ -1620,7 +1624,7 @@ function sn({ url: r, open: o, onClose: i }) {
|
|
|
1620
1624
|
);
|
|
1621
1625
|
}
|
|
1622
1626
|
export {
|
|
1623
|
-
|
|
1627
|
+
ln as D,
|
|
1624
1628
|
ze as q,
|
|
1625
1629
|
je as s
|
|
1626
1630
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as a, useEffect as c } from "react";
|
|
3
|
-
import { c as r } from "./createSvgIcon-
|
|
3
|
+
import { c as r } from "./createSvgIcon-DmrVEdN7.js";
|
|
4
4
|
const f = r(/* @__PURE__ */ t("path", {
|
|
5
5
|
d: "m1 9 2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9m8 8 3 3 3-3c-1.65-1.66-4.34-1.66-6 0m-4-4 2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13"
|
|
6
6
|
}), "Wifi"), l = r(/* @__PURE__ */ t("path", {
|
|
@@ -0,0 +1,613 @@
|
|
|
1
|
+
import * as c from "react";
|
|
2
|
+
import { i as H, e as W, P as s, d as L, g as A, a as m, b as C } from "./createTheme-a85zdZWm.js";
|
|
3
|
+
import { jsx as g, jsxs as G } from "react/jsx-runtime";
|
|
4
|
+
import { d as k, T as z, g as U, u as Z, s as D, c as T, a as Y, m as R } from "./DefaultPropsProvider-D2IJ8Qbs.js";
|
|
5
|
+
import { Global as q, ThemeContext as J } from "@emotion/react";
|
|
6
|
+
import { u as K, B as Q, c as S, C as X, a as F, b as V, d as B } from "./CircularProgress-C6sMwjDC.js";
|
|
7
|
+
import * as ee from "react-dom";
|
|
8
|
+
const te = (e) => {
|
|
9
|
+
var o;
|
|
10
|
+
const t = {
|
|
11
|
+
systemProps: {},
|
|
12
|
+
otherProps: {}
|
|
13
|
+
}, n = ((o = e == null ? void 0 : e.theme) == null ? void 0 : o.unstable_sxConfig) ?? W;
|
|
14
|
+
return Object.keys(e).forEach((r) => {
|
|
15
|
+
n[r] ? t.systemProps[r] = e[r] : t.otherProps[r] = e[r];
|
|
16
|
+
}), t;
|
|
17
|
+
};
|
|
18
|
+
function ne(e) {
|
|
19
|
+
const {
|
|
20
|
+
sx: t,
|
|
21
|
+
...n
|
|
22
|
+
} = e, {
|
|
23
|
+
systemProps: o,
|
|
24
|
+
otherProps: r
|
|
25
|
+
} = te(n);
|
|
26
|
+
let a;
|
|
27
|
+
return Array.isArray(t) ? a = [o, ...t] : typeof t == "function" ? a = (...i) => {
|
|
28
|
+
const u = t(...i);
|
|
29
|
+
return H(u) ? {
|
|
30
|
+
...o,
|
|
31
|
+
...u
|
|
32
|
+
} : o;
|
|
33
|
+
} : a = {
|
|
34
|
+
...o,
|
|
35
|
+
...t
|
|
36
|
+
}, {
|
|
37
|
+
...r,
|
|
38
|
+
sx: a
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function oe(e) {
|
|
42
|
+
return e == null || Object.keys(e).length === 0;
|
|
43
|
+
}
|
|
44
|
+
function w(e) {
|
|
45
|
+
const {
|
|
46
|
+
styles: t,
|
|
47
|
+
defaultTheme: n = {}
|
|
48
|
+
} = e;
|
|
49
|
+
return /* @__PURE__ */ g(q, {
|
|
50
|
+
styles: typeof t == "function" ? (r) => t(oe(r) ? n : r) : t
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
process.env.NODE_ENV !== "production" && (w.propTypes = {
|
|
54
|
+
defaultTheme: s.object,
|
|
55
|
+
styles: s.oneOfType([s.array, s.string, s.object, s.func])
|
|
56
|
+
});
|
|
57
|
+
function se(e) {
|
|
58
|
+
return Object.keys(e).length === 0;
|
|
59
|
+
}
|
|
60
|
+
function re(e = null) {
|
|
61
|
+
const t = c.useContext(J);
|
|
62
|
+
return !t || se(t) ? e : t;
|
|
63
|
+
}
|
|
64
|
+
const ae = L();
|
|
65
|
+
function P(e = ae) {
|
|
66
|
+
return re(e);
|
|
67
|
+
}
|
|
68
|
+
function _({
|
|
69
|
+
styles: e,
|
|
70
|
+
themeId: t,
|
|
71
|
+
defaultTheme: n = {}
|
|
72
|
+
}) {
|
|
73
|
+
const o = P(n), r = typeof e == "function" ? e(t && o[t] || o) : e;
|
|
74
|
+
return /* @__PURE__ */ g(w, {
|
|
75
|
+
styles: r
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
process.env.NODE_ENV !== "production" && (_.propTypes = {
|
|
79
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
80
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
81
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
82
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
83
|
+
/**
|
|
84
|
+
* @ignore
|
|
85
|
+
*/
|
|
86
|
+
defaultTheme: s.object,
|
|
87
|
+
/**
|
|
88
|
+
* @ignore
|
|
89
|
+
*/
|
|
90
|
+
styles: s.oneOfType([s.array, s.func, s.number, s.object, s.string, s.bool]),
|
|
91
|
+
/**
|
|
92
|
+
* @ignore
|
|
93
|
+
*/
|
|
94
|
+
themeId: s.string
|
|
95
|
+
});
|
|
96
|
+
const ie = "exact-prop: ";
|
|
97
|
+
function le(e) {
|
|
98
|
+
return process.env.NODE_ENV === "production" ? e : {
|
|
99
|
+
...e,
|
|
100
|
+
[ie]: (t) => {
|
|
101
|
+
const n = Object.keys(t).filter((o) => !e.hasOwnProperty(o));
|
|
102
|
+
return n.length > 0 ? new Error(`The following props are not supported: ${n.map((o) => `\`${o}\``).join(", ")}. Please remove them.`) : null;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
const ce = /* @__PURE__ */ c.createContext();
|
|
107
|
+
process.env.NODE_ENV !== "production" && (s.node, s.bool);
|
|
108
|
+
const $e = () => c.useContext(ce) ?? !1;
|
|
109
|
+
function je() {
|
|
110
|
+
const e = P(k);
|
|
111
|
+
return process.env.NODE_ENV !== "production" && c.useDebugValue(e), e[z] || e;
|
|
112
|
+
}
|
|
113
|
+
function M(e) {
|
|
114
|
+
return /* @__PURE__ */ g(_, {
|
|
115
|
+
...e,
|
|
116
|
+
defaultTheme: k,
|
|
117
|
+
themeId: z
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
process.env.NODE_ENV !== "production" && (M.propTypes = {
|
|
121
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
122
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
123
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
124
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
125
|
+
/**
|
|
126
|
+
* The styles you want to apply globally.
|
|
127
|
+
*/
|
|
128
|
+
styles: s.oneOfType([s.array, s.func, s.number, s.object, s.string, s.bool])
|
|
129
|
+
});
|
|
130
|
+
function xe(e) {
|
|
131
|
+
return function(n) {
|
|
132
|
+
return (
|
|
133
|
+
// Pigment CSS `globalCss` support callback with theme inside an object but `GlobalStyles` support theme as a callback value.
|
|
134
|
+
/* @__PURE__ */ g(M, {
|
|
135
|
+
styles: typeof e == "function" ? (o) => e({
|
|
136
|
+
theme: o,
|
|
137
|
+
...n
|
|
138
|
+
}) : e
|
|
139
|
+
})
|
|
140
|
+
);
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
function ke() {
|
|
144
|
+
return ne;
|
|
145
|
+
}
|
|
146
|
+
function ue(e) {
|
|
147
|
+
return e && e.ownerDocument || document;
|
|
148
|
+
}
|
|
149
|
+
function ze(e) {
|
|
150
|
+
return ue(e).defaultView || window;
|
|
151
|
+
}
|
|
152
|
+
function $(e, t) {
|
|
153
|
+
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
154
|
+
}
|
|
155
|
+
function de(e) {
|
|
156
|
+
return A("MuiIconButton", e);
|
|
157
|
+
}
|
|
158
|
+
const j = U("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge", "loading", "loadingIndicator", "loadingWrapper"]), fe = (e) => {
|
|
159
|
+
const {
|
|
160
|
+
classes: t,
|
|
161
|
+
disabled: n,
|
|
162
|
+
color: o,
|
|
163
|
+
edge: r,
|
|
164
|
+
size: a,
|
|
165
|
+
loading: i
|
|
166
|
+
} = e, u = {
|
|
167
|
+
root: ["root", i && "loading", n && "disabled", o !== "default" && `color${m(o)}`, r && `edge${m(r)}`, `size${m(a)}`],
|
|
168
|
+
loadingIndicator: ["loadingIndicator"],
|
|
169
|
+
loadingWrapper: ["loadingWrapper"]
|
|
170
|
+
};
|
|
171
|
+
return Y(u, de, t);
|
|
172
|
+
}, pe = D(Q, {
|
|
173
|
+
name: "MuiIconButton",
|
|
174
|
+
slot: "Root",
|
|
175
|
+
overridesResolver: (e, t) => {
|
|
176
|
+
const {
|
|
177
|
+
ownerState: n
|
|
178
|
+
} = e;
|
|
179
|
+
return [t.root, n.loading && t.loading, n.color !== "default" && t[`color${m(n.color)}`], n.edge && t[`edge${m(n.edge)}`], t[`size${m(n.size)}`]];
|
|
180
|
+
}
|
|
181
|
+
})(R(({
|
|
182
|
+
theme: e
|
|
183
|
+
}) => ({
|
|
184
|
+
textAlign: "center",
|
|
185
|
+
flex: "0 0 auto",
|
|
186
|
+
fontSize: e.typography.pxToRem(24),
|
|
187
|
+
padding: 8,
|
|
188
|
+
borderRadius: "50%",
|
|
189
|
+
color: (e.vars || e).palette.action.active,
|
|
190
|
+
transition: e.transitions.create("background-color", {
|
|
191
|
+
duration: e.transitions.duration.shortest
|
|
192
|
+
}),
|
|
193
|
+
variants: [{
|
|
194
|
+
props: (t) => !t.disableRipple,
|
|
195
|
+
style: {
|
|
196
|
+
"--IconButton-hoverBg": e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` : C(e.palette.action.active, e.palette.action.hoverOpacity),
|
|
197
|
+
"&:hover": {
|
|
198
|
+
backgroundColor: "var(--IconButton-hoverBg)",
|
|
199
|
+
// Reset on touch devices, it doesn't add specificity
|
|
200
|
+
"@media (hover: none)": {
|
|
201
|
+
backgroundColor: "transparent"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}, {
|
|
206
|
+
props: {
|
|
207
|
+
edge: "start"
|
|
208
|
+
},
|
|
209
|
+
style: {
|
|
210
|
+
marginLeft: -12
|
|
211
|
+
}
|
|
212
|
+
}, {
|
|
213
|
+
props: {
|
|
214
|
+
edge: "start",
|
|
215
|
+
size: "small"
|
|
216
|
+
},
|
|
217
|
+
style: {
|
|
218
|
+
marginLeft: -3
|
|
219
|
+
}
|
|
220
|
+
}, {
|
|
221
|
+
props: {
|
|
222
|
+
edge: "end"
|
|
223
|
+
},
|
|
224
|
+
style: {
|
|
225
|
+
marginRight: -12
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
props: {
|
|
229
|
+
edge: "end",
|
|
230
|
+
size: "small"
|
|
231
|
+
},
|
|
232
|
+
style: {
|
|
233
|
+
marginRight: -3
|
|
234
|
+
}
|
|
235
|
+
}]
|
|
236
|
+
})), R(({
|
|
237
|
+
theme: e
|
|
238
|
+
}) => ({
|
|
239
|
+
variants: [{
|
|
240
|
+
props: {
|
|
241
|
+
color: "inherit"
|
|
242
|
+
},
|
|
243
|
+
style: {
|
|
244
|
+
color: "inherit"
|
|
245
|
+
}
|
|
246
|
+
}, ...Object.entries(e.palette).filter(S()).map(([t]) => ({
|
|
247
|
+
props: {
|
|
248
|
+
color: t
|
|
249
|
+
},
|
|
250
|
+
style: {
|
|
251
|
+
color: (e.vars || e).palette[t].main
|
|
252
|
+
}
|
|
253
|
+
})), ...Object.entries(e.palette).filter(S()).map(([t]) => ({
|
|
254
|
+
props: {
|
|
255
|
+
color: t
|
|
256
|
+
},
|
|
257
|
+
style: {
|
|
258
|
+
"--IconButton-hoverBg": e.vars ? `rgba(${(e.vars || e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : C((e.vars || e).palette[t].main, e.palette.action.hoverOpacity)
|
|
259
|
+
}
|
|
260
|
+
})), {
|
|
261
|
+
props: {
|
|
262
|
+
size: "small"
|
|
263
|
+
},
|
|
264
|
+
style: {
|
|
265
|
+
padding: 5,
|
|
266
|
+
fontSize: e.typography.pxToRem(18)
|
|
267
|
+
}
|
|
268
|
+
}, {
|
|
269
|
+
props: {
|
|
270
|
+
size: "large"
|
|
271
|
+
},
|
|
272
|
+
style: {
|
|
273
|
+
padding: 12,
|
|
274
|
+
fontSize: e.typography.pxToRem(28)
|
|
275
|
+
}
|
|
276
|
+
}],
|
|
277
|
+
[`&.${j.disabled}`]: {
|
|
278
|
+
backgroundColor: "transparent",
|
|
279
|
+
color: (e.vars || e).palette.action.disabled
|
|
280
|
+
},
|
|
281
|
+
[`&.${j.loading}`]: {
|
|
282
|
+
color: "transparent"
|
|
283
|
+
}
|
|
284
|
+
}))), ge = D("span", {
|
|
285
|
+
name: "MuiIconButton",
|
|
286
|
+
slot: "LoadingIndicator"
|
|
287
|
+
})(({
|
|
288
|
+
theme: e
|
|
289
|
+
}) => ({
|
|
290
|
+
display: "none",
|
|
291
|
+
position: "absolute",
|
|
292
|
+
visibility: "visible",
|
|
293
|
+
top: "50%",
|
|
294
|
+
left: "50%",
|
|
295
|
+
transform: "translate(-50%, -50%)",
|
|
296
|
+
color: (e.vars || e).palette.action.disabled,
|
|
297
|
+
variants: [{
|
|
298
|
+
props: {
|
|
299
|
+
loading: !0
|
|
300
|
+
},
|
|
301
|
+
style: {
|
|
302
|
+
display: "flex"
|
|
303
|
+
}
|
|
304
|
+
}]
|
|
305
|
+
})), ye = /* @__PURE__ */ c.forwardRef(function(t, n) {
|
|
306
|
+
const o = Z({
|
|
307
|
+
props: t,
|
|
308
|
+
name: "MuiIconButton"
|
|
309
|
+
}), {
|
|
310
|
+
edge: r = !1,
|
|
311
|
+
children: a,
|
|
312
|
+
className: i,
|
|
313
|
+
color: u = "default",
|
|
314
|
+
disabled: f = !1,
|
|
315
|
+
disableFocusRipple: l = !1,
|
|
316
|
+
size: b = "medium",
|
|
317
|
+
id: p,
|
|
318
|
+
loading: d = null,
|
|
319
|
+
loadingIndicator: v,
|
|
320
|
+
...h
|
|
321
|
+
} = o, y = K(p), I = v ?? /* @__PURE__ */ g(X, {
|
|
322
|
+
"aria-labelledby": y,
|
|
323
|
+
color: "inherit",
|
|
324
|
+
size: 16
|
|
325
|
+
}), E = {
|
|
326
|
+
...o,
|
|
327
|
+
edge: r,
|
|
328
|
+
color: u,
|
|
329
|
+
disabled: f,
|
|
330
|
+
disableFocusRipple: l,
|
|
331
|
+
loading: d,
|
|
332
|
+
loadingIndicator: I,
|
|
333
|
+
size: b
|
|
334
|
+
}, O = fe(E);
|
|
335
|
+
return /* @__PURE__ */ G(pe, {
|
|
336
|
+
id: d ? y : p,
|
|
337
|
+
className: T(O.root, i),
|
|
338
|
+
centerRipple: !0,
|
|
339
|
+
focusRipple: !l,
|
|
340
|
+
disabled: f || d,
|
|
341
|
+
ref: n,
|
|
342
|
+
...h,
|
|
343
|
+
ownerState: E,
|
|
344
|
+
children: [typeof d == "boolean" && // use plain HTML span to minimize the runtime overhead
|
|
345
|
+
/* @__PURE__ */ g("span", {
|
|
346
|
+
className: O.loadingWrapper,
|
|
347
|
+
style: {
|
|
348
|
+
display: "contents"
|
|
349
|
+
},
|
|
350
|
+
children: /* @__PURE__ */ g(ge, {
|
|
351
|
+
className: O.loadingIndicator,
|
|
352
|
+
ownerState: E,
|
|
353
|
+
children: d && I
|
|
354
|
+
})
|
|
355
|
+
}), a]
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
process.env.NODE_ENV !== "production" && (ye.propTypes = {
|
|
359
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
360
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
361
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
362
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
363
|
+
/**
|
|
364
|
+
* The icon to display.
|
|
365
|
+
*/
|
|
366
|
+
children: F(s.node, (e) => c.Children.toArray(e.children).some((n) => /* @__PURE__ */ c.isValidElement(n) && n.props.onClick) ? new Error(["MUI: You are providing an onClick event listener to a child of a button element.", "Prefer applying it to the IconButton directly.", "This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
367
|
+
`)) : null),
|
|
368
|
+
/**
|
|
369
|
+
* Override or extend the styles applied to the component.
|
|
370
|
+
*/
|
|
371
|
+
classes: s.object,
|
|
372
|
+
/**
|
|
373
|
+
* @ignore
|
|
374
|
+
*/
|
|
375
|
+
className: s.string,
|
|
376
|
+
/**
|
|
377
|
+
* The color of the component.
|
|
378
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
379
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
380
|
+
* @default 'default'
|
|
381
|
+
*/
|
|
382
|
+
color: s.oneOfType([s.oneOf(["inherit", "default", "primary", "secondary", "error", "info", "success", "warning"]), s.string]),
|
|
383
|
+
/**
|
|
384
|
+
* If `true`, the component is disabled.
|
|
385
|
+
* @default false
|
|
386
|
+
*/
|
|
387
|
+
disabled: s.bool,
|
|
388
|
+
/**
|
|
389
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
390
|
+
* @default false
|
|
391
|
+
*/
|
|
392
|
+
disableFocusRipple: s.bool,
|
|
393
|
+
/**
|
|
394
|
+
* If `true`, the ripple effect is disabled.
|
|
395
|
+
*
|
|
396
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
397
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
398
|
+
* @default false
|
|
399
|
+
*/
|
|
400
|
+
disableRipple: s.bool,
|
|
401
|
+
/**
|
|
402
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
403
|
+
* side (this is often helpful for aligning the left or right
|
|
404
|
+
* side of the icon with content above or below, without ruining the border
|
|
405
|
+
* size and shape).
|
|
406
|
+
* @default false
|
|
407
|
+
*/
|
|
408
|
+
edge: s.oneOf(["end", "start", !1]),
|
|
409
|
+
/**
|
|
410
|
+
* @ignore
|
|
411
|
+
*/
|
|
412
|
+
id: s.string,
|
|
413
|
+
/**
|
|
414
|
+
* If `true`, the loading indicator is visible and the button is disabled.
|
|
415
|
+
* If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).
|
|
416
|
+
* @default null
|
|
417
|
+
*/
|
|
418
|
+
loading: s.bool,
|
|
419
|
+
/**
|
|
420
|
+
* Element placed before the children if the button is in loading state.
|
|
421
|
+
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
422
|
+
* By default, it renders a `CircularProgress` that is labeled by the button itself.
|
|
423
|
+
* @default <CircularProgress color="inherit" size={16} />
|
|
424
|
+
*/
|
|
425
|
+
loadingIndicator: s.node,
|
|
426
|
+
/**
|
|
427
|
+
* The size of the component.
|
|
428
|
+
* `small` is equivalent to the dense button styling.
|
|
429
|
+
* @default 'medium'
|
|
430
|
+
*/
|
|
431
|
+
size: s.oneOfType([s.oneOf(["small", "medium", "large"]), s.string]),
|
|
432
|
+
/**
|
|
433
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
434
|
+
*/
|
|
435
|
+
sx: s.oneOfType([s.arrayOf(s.oneOfType([s.func, s.object, s.bool])), s.func, s.object])
|
|
436
|
+
});
|
|
437
|
+
function me(e) {
|
|
438
|
+
return typeof e == "string";
|
|
439
|
+
}
|
|
440
|
+
function be(e, t, n) {
|
|
441
|
+
return e === void 0 || me(e) ? t : {
|
|
442
|
+
...t,
|
|
443
|
+
ownerState: {
|
|
444
|
+
...t.ownerState,
|
|
445
|
+
...n
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
function ve(e, t, n) {
|
|
450
|
+
return typeof e == "function" ? e(t, n) : e;
|
|
451
|
+
}
|
|
452
|
+
function he(e, t = []) {
|
|
453
|
+
if (e === void 0)
|
|
454
|
+
return {};
|
|
455
|
+
const n = {};
|
|
456
|
+
return Object.keys(e).filter((o) => o.match(/^on[A-Z]/) && typeof e[o] == "function" && !t.includes(o)).forEach((o) => {
|
|
457
|
+
n[o] = e[o];
|
|
458
|
+
}), n;
|
|
459
|
+
}
|
|
460
|
+
function x(e) {
|
|
461
|
+
if (e === void 0)
|
|
462
|
+
return {};
|
|
463
|
+
const t = {};
|
|
464
|
+
return Object.keys(e).filter((n) => !(n.match(/^on[A-Z]/) && typeof e[n] == "function")).forEach((n) => {
|
|
465
|
+
t[n] = e[n];
|
|
466
|
+
}), t;
|
|
467
|
+
}
|
|
468
|
+
function Ee(e) {
|
|
469
|
+
const {
|
|
470
|
+
getSlotProps: t,
|
|
471
|
+
additionalProps: n,
|
|
472
|
+
externalSlotProps: o,
|
|
473
|
+
externalForwardedProps: r,
|
|
474
|
+
className: a
|
|
475
|
+
} = e;
|
|
476
|
+
if (!t) {
|
|
477
|
+
const v = T(n == null ? void 0 : n.className, a, r == null ? void 0 : r.className, o == null ? void 0 : o.className), h = {
|
|
478
|
+
...n == null ? void 0 : n.style,
|
|
479
|
+
...r == null ? void 0 : r.style,
|
|
480
|
+
...o == null ? void 0 : o.style
|
|
481
|
+
}, y = {
|
|
482
|
+
...n,
|
|
483
|
+
...r,
|
|
484
|
+
...o
|
|
485
|
+
};
|
|
486
|
+
return v.length > 0 && (y.className = v), Object.keys(h).length > 0 && (y.style = h), {
|
|
487
|
+
props: y,
|
|
488
|
+
internalRef: void 0
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
const i = he({
|
|
492
|
+
...r,
|
|
493
|
+
...o
|
|
494
|
+
}), u = x(o), f = x(r), l = t(i), b = T(l == null ? void 0 : l.className, n == null ? void 0 : n.className, a, r == null ? void 0 : r.className, o == null ? void 0 : o.className), p = {
|
|
495
|
+
...l == null ? void 0 : l.style,
|
|
496
|
+
...n == null ? void 0 : n.style,
|
|
497
|
+
...r == null ? void 0 : r.style,
|
|
498
|
+
...o == null ? void 0 : o.style
|
|
499
|
+
}, d = {
|
|
500
|
+
...l,
|
|
501
|
+
...n,
|
|
502
|
+
...f,
|
|
503
|
+
...u
|
|
504
|
+
};
|
|
505
|
+
return b.length > 0 && (d.className = b), Object.keys(p).length > 0 && (d.style = p), {
|
|
506
|
+
props: d,
|
|
507
|
+
internalRef: l.ref
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
function Oe(e) {
|
|
511
|
+
var t;
|
|
512
|
+
return parseInt(c.version, 10) >= 19 ? ((t = e == null ? void 0 : e.props) == null ? void 0 : t.ref) || null : (e == null ? void 0 : e.ref) || null;
|
|
513
|
+
}
|
|
514
|
+
function Te(e, t, n, o, r) {
|
|
515
|
+
if (process.env.NODE_ENV === "production")
|
|
516
|
+
return null;
|
|
517
|
+
const a = e[t], i = r || t;
|
|
518
|
+
return a == null ? null : a && a.nodeType !== 1 ? new Error(`Invalid ${o} \`${i}\` supplied to \`${n}\`. Expected an HTMLElement.`) : null;
|
|
519
|
+
}
|
|
520
|
+
function De(e) {
|
|
521
|
+
var p;
|
|
522
|
+
const {
|
|
523
|
+
elementType: t,
|
|
524
|
+
externalSlotProps: n,
|
|
525
|
+
ownerState: o,
|
|
526
|
+
skipResolvingSlotProps: r = !1,
|
|
527
|
+
...a
|
|
528
|
+
} = e, i = r ? {} : ve(n, o), {
|
|
529
|
+
props: u,
|
|
530
|
+
internalRef: f
|
|
531
|
+
} = Ee({
|
|
532
|
+
...a,
|
|
533
|
+
externalSlotProps: i
|
|
534
|
+
}), l = V(f, i == null ? void 0 : i.ref, (p = e.additionalProps) == null ? void 0 : p.ref);
|
|
535
|
+
return be(t, {
|
|
536
|
+
...u,
|
|
537
|
+
ref: l
|
|
538
|
+
}, o);
|
|
539
|
+
}
|
|
540
|
+
function Ne(e) {
|
|
541
|
+
return typeof e == "function" ? e() : e;
|
|
542
|
+
}
|
|
543
|
+
const N = /* @__PURE__ */ c.forwardRef(function(t, n) {
|
|
544
|
+
const {
|
|
545
|
+
children: o,
|
|
546
|
+
container: r,
|
|
547
|
+
disablePortal: a = !1
|
|
548
|
+
} = t, [i, u] = c.useState(null), f = V(/* @__PURE__ */ c.isValidElement(o) ? Oe(o) : null, n);
|
|
549
|
+
if (B(() => {
|
|
550
|
+
a || u(Ne(r) || document.body);
|
|
551
|
+
}, [r, a]), B(() => {
|
|
552
|
+
if (i && !a)
|
|
553
|
+
return $(n, i), () => {
|
|
554
|
+
$(n, null);
|
|
555
|
+
};
|
|
556
|
+
}, [n, i, a]), a) {
|
|
557
|
+
if (/* @__PURE__ */ c.isValidElement(o)) {
|
|
558
|
+
const l = {
|
|
559
|
+
ref: f
|
|
560
|
+
};
|
|
561
|
+
return /* @__PURE__ */ c.cloneElement(o, l);
|
|
562
|
+
}
|
|
563
|
+
return o;
|
|
564
|
+
}
|
|
565
|
+
return i && /* @__PURE__ */ ee.createPortal(o, i);
|
|
566
|
+
});
|
|
567
|
+
process.env.NODE_ENV !== "production" && (N.propTypes = {
|
|
568
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
569
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
570
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
571
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
572
|
+
/**
|
|
573
|
+
* The children to render into the `container`.
|
|
574
|
+
*/
|
|
575
|
+
children: s.node,
|
|
576
|
+
/**
|
|
577
|
+
* An HTML element or function that returns one.
|
|
578
|
+
* The `container` will have the portal children appended to it.
|
|
579
|
+
*
|
|
580
|
+
* You can also provide a callback, which is called in a React layout effect.
|
|
581
|
+
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
|
582
|
+
*
|
|
583
|
+
* By default, it uses the body of the top-level document object,
|
|
584
|
+
* so it's simply `document.body` most of the time.
|
|
585
|
+
*/
|
|
586
|
+
container: s.oneOfType([Te, s.func]),
|
|
587
|
+
/**
|
|
588
|
+
* The `children` will be under the DOM hierarchy of the parent component.
|
|
589
|
+
* @default false
|
|
590
|
+
*/
|
|
591
|
+
disablePortal: s.bool
|
|
592
|
+
});
|
|
593
|
+
process.env.NODE_ENV !== "production" && (N.propTypes = le(N.propTypes));
|
|
594
|
+
export {
|
|
595
|
+
Te as H,
|
|
596
|
+
ye as I,
|
|
597
|
+
N as P,
|
|
598
|
+
be as a,
|
|
599
|
+
ue as b,
|
|
600
|
+
Oe as c,
|
|
601
|
+
he as d,
|
|
602
|
+
le as e,
|
|
603
|
+
$e as f,
|
|
604
|
+
xe as g,
|
|
605
|
+
De as h,
|
|
606
|
+
P as i,
|
|
607
|
+
re as j,
|
|
608
|
+
ke as k,
|
|
609
|
+
Ee as m,
|
|
610
|
+
ze as o,
|
|
611
|
+
ve as r,
|
|
612
|
+
je as u
|
|
613
|
+
};
|