@trinityui/design-system 1.0.3 → 1.0.5
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/CHANGELOG.md +36 -0
- package/README.md +6 -0
- package/dist/Legend.js +1455 -0
- package/dist/accessibility.d.ts +119 -0
- package/dist/accessibility.d.ts.map +1 -0
- package/dist/assets/index.d.ts +234 -0
- package/dist/assets/index.d.ts.map +1 -0
- package/dist/components/AI/AIActions.d.ts +104 -0
- package/dist/components/AI/AIActions.d.ts.map +1 -0
- package/dist/components/AI/AIAvatar.d.ts +32 -0
- package/dist/components/AI/AIAvatar.d.ts.map +1 -0
- package/dist/components/AI/AIChat.d.ts +142 -0
- package/dist/components/AI/AIChat.d.ts.map +1 -0
- package/dist/components/AI/AIContainer.d.ts +97 -0
- package/dist/components/AI/AIContainer.d.ts.map +1 -0
- package/dist/components/AI/AIExplainability.d.ts +46 -0
- package/dist/components/AI/AIExplainability.d.ts.map +1 -0
- package/dist/components/AI/AILabel.d.ts +43 -0
- package/dist/components/AI/AILabel.d.ts.map +1 -0
- package/dist/components/AI/AIMessage.d.ts +93 -0
- package/dist/components/AI/AIMessage.d.ts.map +1 -0
- package/dist/components/AI/AIRelatedQuestions.d.ts +53 -0
- package/dist/components/AI/AIRelatedQuestions.d.ts.map +1 -0
- package/dist/components/AI/AIResponseRenderer.d.ts +50 -0
- package/dist/components/AI/AIResponseRenderer.d.ts.map +1 -0
- package/dist/components/AI/AISources.d.ts +66 -0
- package/dist/components/AI/AISources.d.ts.map +1 -0
- package/dist/components/AI/AISourcesPanel.d.ts +84 -0
- package/dist/components/AI/AISourcesPanel.d.ts.map +1 -0
- package/dist/components/AI/AITextBlock.d.ts +56 -0
- package/dist/components/AI/AITextBlock.d.ts.map +1 -0
- package/dist/components/AI/AIVisuals.d.ts +104 -0
- package/dist/components/AI/AIVisuals.d.ts.map +1 -0
- package/dist/components/AI/AIVoiceInput.d.ts +66 -0
- package/dist/components/AI/AIVoiceInput.d.ts.map +1 -0
- package/dist/components/AI/ChatHeader.d.ts +52 -0
- package/dist/components/AI/ChatHeader.d.ts.map +1 -0
- package/dist/components/AI/ChatHistoryList.d.ts +80 -0
- package/dist/components/AI/ChatHistoryList.d.ts.map +1 -0
- package/dist/components/AI/ChatThread.d.ts +74 -0
- package/dist/components/AI/ChatThread.d.ts.map +1 -0
- package/dist/components/AI/InsightEngine.d.ts +147 -0
- package/dist/components/AI/InsightEngine.d.ts.map +1 -0
- package/dist/components/AI/InsightEngineInput.d.ts +94 -0
- package/dist/components/AI/InsightEngineInput.d.ts.map +1 -0
- package/dist/components/AI/QueryInput.d.ts +114 -0
- package/dist/components/AI/QueryInput.d.ts.map +1 -0
- package/dist/components/AI/UserAvatar.d.ts +24 -0
- package/dist/components/AI/UserAvatar.d.ts.map +1 -0
- package/dist/components/AI/UserMessage.d.ts +26 -0
- package/dist/components/AI/UserMessage.d.ts.map +1 -0
- package/dist/components/AI/index.d.ts +39 -0
- package/dist/components/AI/index.d.ts.map +1 -0
- package/dist/components/AI/tokens.d.ts +132 -0
- package/dist/components/AI/tokens.d.ts.map +1 -0
- package/dist/components/AI/types/index.d.ts +6 -0
- package/dist/components/AI/types/index.d.ts.map +1 -0
- package/dist/components/AI/types/response.d.ts +312 -0
- package/dist/components/AI/types/response.d.ts.map +1 -0
- package/dist/components/AppLayout/AIFab.d.ts +50 -0
- package/dist/components/AppLayout/AIFab.d.ts.map +1 -0
- package/dist/components/AppLayout/AIFabLayout.deprecated.d.ts +32 -0
- package/dist/components/AppLayout/AIFabLayout.deprecated.d.ts.map +1 -0
- package/dist/components/AppLayout/AppLayout.d.ts +154 -0
- package/dist/components/AppLayout/AppLayout.d.ts.map +1 -0
- package/dist/components/AppLayout/InsightEnginePanel.d.ts +141 -0
- package/dist/components/AppLayout/InsightEnginePanel.d.ts.map +1 -0
- package/dist/components/AppLayout/ResizablePanel.d.ts +52 -0
- package/dist/components/AppLayout/ResizablePanel.d.ts.map +1 -0
- package/dist/components/AppLayout/ThreadHistorySidebar.d.ts +53 -0
- package/dist/components/AppLayout/ThreadHistorySidebar.d.ts.map +1 -0
- package/dist/components/AppLayout/index.d.ts +27 -0
- package/dist/components/AppLayout/index.d.ts.map +1 -0
- package/dist/components/Charts/AreaChart.d.ts +38 -0
- package/dist/components/Charts/AreaChart.d.ts.map +1 -0
- package/dist/components/Charts/BarChart.d.ts +47 -0
- package/dist/components/Charts/BarChart.d.ts.map +1 -0
- package/dist/components/Charts/ChartWrapper.d.ts +48 -0
- package/dist/components/Charts/ChartWrapper.d.ts.map +1 -0
- package/dist/components/Charts/ComposedChart.d.ts +34 -0
- package/dist/components/Charts/ComposedChart.d.ts.map +1 -0
- package/dist/components/Charts/CustomLegend.d.ts +69 -0
- package/dist/components/Charts/CustomLegend.d.ts.map +1 -0
- package/dist/components/Charts/CustomTooltip.d.ts +55 -0
- package/dist/components/Charts/CustomTooltip.d.ts.map +1 -0
- package/dist/components/Charts/LineChart.d.ts +36 -0
- package/dist/components/Charts/LineChart.d.ts.map +1 -0
- package/dist/components/Charts/PieChart.d.ts +52 -0
- package/dist/components/Charts/PieChart.d.ts.map +1 -0
- package/dist/components/Charts/RadialChart.d.ts +51 -0
- package/dist/components/Charts/RadialChart.d.ts.map +1 -0
- package/dist/components/Charts/ScatterChart.d.ts +55 -0
- package/dist/components/Charts/ScatterChart.d.ts.map +1 -0
- package/dist/components/Charts/Sparkline.d.ts +44 -0
- package/dist/components/Charts/Sparkline.d.ts.map +1 -0
- package/dist/components/Charts/index.d.ts +48 -0
- package/dist/components/Charts/index.d.ts.map +1 -0
- package/dist/components/Charts/tokens.d.ts +200 -0
- package/dist/components/Charts/tokens.d.ts.map +1 -0
- package/dist/components/Charts/types.d.ts +595 -0
- package/dist/components/Charts/types.d.ts.map +1 -0
- package/dist/components/Combobox/Combobox.d.ts +99 -0
- package/dist/components/Combobox/Combobox.d.ts.map +1 -0
- package/dist/components/Combobox/index.d.ts +3 -0
- package/dist/components/Combobox/index.d.ts.map +1 -0
- package/dist/components/CommandPalette/CommandPalette.d.ts +76 -0
- package/dist/components/CommandPalette/CommandPalette.d.ts.map +1 -0
- package/dist/components/CommandPalette/index.d.ts +2 -0
- package/dist/components/CommandPalette/index.d.ts.map +1 -0
- package/dist/components/DataCard/DataCard.d.ts +60 -0
- package/dist/components/DataCard/DataCard.d.ts.map +1 -0
- package/dist/components/DataCard/index.d.ts +2 -0
- package/dist/components/DataCard/index.d.ts.map +1 -0
- package/dist/components/DataTable/CellRenderers.d.ts +78 -0
- package/dist/components/DataTable/CellRenderers.d.ts.map +1 -0
- package/dist/components/DataTable/DataTable.d.ts +36 -0
- package/dist/components/DataTable/DataTable.d.ts.map +1 -0
- package/dist/components/DataTable/InlineAddRow.d.ts +27 -0
- package/dist/components/DataTable/InlineAddRow.d.ts.map +1 -0
- package/dist/components/DataTable/index.d.ts +6 -0
- package/dist/components/DataTable/index.d.ts.map +1 -0
- package/dist/components/DataTable/tokens.d.ts +132 -0
- package/dist/components/DataTable/tokens.d.ts.map +1 -0
- package/dist/components/DataTable/types.d.ts +334 -0
- package/dist/components/DataTable/types.d.ts.map +1 -0
- package/dist/components/DiffViewer/DiffViewer.d.ts +63 -0
- package/dist/components/DiffViewer/DiffViewer.d.ts.map +1 -0
- package/dist/components/DiffViewer/index.d.ts +3 -0
- package/dist/components/DiffViewer/index.d.ts.map +1 -0
- package/dist/components/DockLayout/DockLayout.d.ts +78 -0
- package/dist/components/DockLayout/DockLayout.d.ts.map +1 -0
- package/dist/components/DockLayout/index.d.ts +3 -0
- package/dist/components/DockLayout/index.d.ts.map +1 -0
- package/dist/components/FileUpload/FileUpload.d.ts +93 -0
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/FileUpload/index.d.ts.map +1 -0
- package/dist/components/FilterBar/FilterBar.d.ts +76 -0
- package/dist/components/FilterBar/FilterBar.d.ts.map +1 -0
- package/dist/components/FilterBar/index.d.ts +2 -0
- package/dist/components/FilterBar/index.d.ts.map +1 -0
- package/dist/components/Footer.d.ts +30 -0
- package/dist/components/Footer.d.ts.map +1 -0
- package/dist/components/Icon.d.ts +67 -0
- package/dist/components/Icon.d.ts.map +1 -0
- package/dist/components/IllustratedMessage.d.ts +99 -0
- package/dist/components/IllustratedMessage.d.ts.map +1 -0
- package/dist/components/LandingPage/FeatureCard.d.ts +89 -0
- package/dist/components/LandingPage/FeatureCard.d.ts.map +1 -0
- package/dist/components/LandingPage/LandingPage.d.ts +126 -0
- package/dist/components/LandingPage/LandingPage.d.ts.map +1 -0
- package/dist/components/LandingPage/index.d.ts +11 -0
- package/dist/components/LandingPage/index.d.ts.map +1 -0
- package/dist/components/Modal/Modal.d.ts +181 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/components/PageHeader/PageHeader.d.ts +91 -0
- package/dist/components/PageHeader/PageHeader.d.ts.map +1 -0
- package/dist/components/PageHeader/index.d.ts +2 -0
- package/dist/components/PageHeader/index.d.ts.map +1 -0
- package/dist/components/RichTextEditor/RichTextEditor.d.ts +52 -0
- package/dist/components/RichTextEditor/RichTextEditor.d.ts.map +1 -0
- package/dist/components/RichTextEditor/index.d.ts +3 -0
- package/dist/components/RichTextEditor/index.d.ts.map +1 -0
- package/dist/components/SearchInput/SearchInput.d.ts +66 -0
- package/dist/components/SearchInput/SearchInput.d.ts.map +1 -0
- package/dist/components/SearchInput/index.d.ts +2 -0
- package/dist/components/SearchInput/index.d.ts.map +1 -0
- package/dist/components/SimpleTable/SimpleTable.d.ts +93 -0
- package/dist/components/SimpleTable/SimpleTable.d.ts.map +1 -0
- package/dist/components/SimpleTable/index.d.ts +3 -0
- package/dist/components/SimpleTable/index.d.ts.map +1 -0
- package/dist/components/SplitPane/SplitPane.d.ts +52 -0
- package/dist/components/SplitPane/SplitPane.d.ts.map +1 -0
- package/dist/components/SplitPane/index.d.ts +3 -0
- package/dist/components/SplitPane/index.d.ts.map +1 -0
- package/dist/components/StatusIndicator/Badge.d.ts +71 -0
- package/dist/components/StatusIndicator/Badge.d.ts.map +1 -0
- package/dist/components/StatusIndicator/Chip.d.ts +64 -0
- package/dist/components/StatusIndicator/Chip.d.ts.map +1 -0
- package/dist/components/StatusIndicator/Indicators.d.ts +81 -0
- package/dist/components/StatusIndicator/Indicators.d.ts.map +1 -0
- package/dist/components/StatusIndicator/Legend.d.ts +42 -0
- package/dist/components/StatusIndicator/Legend.d.ts.map +1 -0
- package/dist/components/StatusIndicator/Shapes.d.ts +32 -0
- package/dist/components/StatusIndicator/Shapes.d.ts.map +1 -0
- package/dist/components/StatusIndicator/StatusIndicator.d.ts +183 -0
- package/dist/components/StatusIndicator/StatusIndicator.d.ts.map +1 -0
- package/dist/components/StatusIndicator/index.d.ts +55 -0
- package/dist/components/StatusIndicator/index.d.ts.map +1 -0
- package/dist/components/StatusIndicator/types.d.ts +37 -0
- package/dist/components/StatusIndicator/types.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.d.ts +89 -0
- package/dist/components/Timeline/Timeline.d.ts.map +1 -0
- package/dist/components/Timeline/index.d.ts +2 -0
- package/dist/components/Timeline/index.d.ts.map +1 -0
- package/dist/components/Toast/Toast.d.ts +124 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/TopNavHeader.d.ts +55 -0
- package/dist/components/TopNavHeader.d.ts.map +1 -0
- package/dist/components/TopNavWithSidebar.d.ts +64 -0
- package/dist/components/TopNavWithSidebar.d.ts.map +1 -0
- package/dist/components/TransferList/TransferList.d.ts +62 -0
- package/dist/components/TransferList/TransferList.d.ts.map +1 -0
- package/dist/components/TransferList/index.d.ts +3 -0
- package/dist/components/TransferList/index.d.ts.map +1 -0
- package/dist/components/TreeView/TreeView.d.ts +89 -0
- package/dist/components/TreeView/TreeView.d.ts.map +1 -0
- package/dist/components/TreeView/index.d.ts +3 -0
- package/dist/components/TreeView/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +119 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/internal/index.d.ts +27 -0
- package/dist/components/internal/index.d.ts.map +1 -0
- package/dist/components/navigation/components.d.ts +85 -0
- package/dist/components/navigation/components.d.ts.map +1 -0
- package/dist/components/navigation/hooks.d.ts +65 -0
- package/dist/components/navigation/hooks.d.ts.map +1 -0
- package/dist/components/navigation/index.d.ts +28 -0
- package/dist/components/navigation/index.d.ts.map +1 -0
- package/dist/components/navigation/styled.d.ts +13 -0
- package/dist/components/navigation/styled.d.ts.map +1 -0
- package/dist/components/navigation/types.d.ts +58 -0
- package/dist/components/navigation/types.d.ts.map +1 -0
- package/dist/components/shared/TrinityLogoSvg.d.ts +29 -0
- package/dist/components/shared/TrinityLogoSvg.d.ts.map +1 -0
- package/dist/components/shared.d.ts +92 -0
- package/dist/components/shared.d.ts.map +1 -0
- package/dist/components/templates/Dashboard/DashboardTemplate.d.ts +66 -0
- package/dist/components/templates/Dashboard/DashboardTemplate.d.ts.map +1 -0
- package/dist/components/templates/Dashboard/index.d.ts +2 -0
- package/dist/components/templates/Dashboard/index.d.ts.map +1 -0
- package/dist/components/templates/ListDetail/ListDetailTemplate.d.ts +88 -0
- package/dist/components/templates/ListDetail/ListDetailTemplate.d.ts.map +1 -0
- package/dist/components/templates/ListDetail/index.d.ts +2 -0
- package/dist/components/templates/ListDetail/index.d.ts.map +1 -0
- package/dist/components/templates/Settings/SettingsTemplate.d.ts +78 -0
- package/dist/components/templates/Settings/SettingsTemplate.d.ts.map +1 -0
- package/dist/components/templates/Settings/index.d.ts +2 -0
- package/dist/components/templates/Settings/index.d.ts.map +1 -0
- package/dist/components/templates/index.d.ts +5 -0
- package/dist/components/templates/index.d.ts.map +1 -0
- package/dist/essentials.d.ts +49 -0
- package/dist/essentials.d.ts.map +1 -0
- package/dist/essentials.js +256 -0
- package/dist/form.d.ts +212 -0
- package/dist/form.d.ts.map +1 -0
- package/dist/hierarchy.d.ts +371 -0
- package/dist/hierarchy.d.ts.map +1 -0
- package/dist/hooks/useTrinityPalette.d.ts +54 -0
- package/dist/hooks/useTrinityPalette.d.ts.map +1 -0
- package/dist/hooks.d.ts +217 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/index.d.ts +111 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2293 -3731
- package/dist/presets/analytics.d.ts +197 -0
- package/dist/presets/analytics.d.ts.map +1 -0
- package/dist/presets/crm.d.ts +67 -0
- package/dist/presets/crm.d.ts.map +1 -0
- package/dist/presets/index.d.ts +21 -0
- package/dist/presets/index.d.ts.map +1 -0
- package/dist/presets/portal.d.ts +67 -0
- package/dist/presets/portal.d.ts.map +1 -0
- package/dist/theme.d.ts +221 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/tokens.d.ts +4760 -0
- package/dist/tokens.d.ts.map +1 -0
- package/package.json +6 -9
package/dist/Legend.js
ADDED
|
@@ -0,0 +1,1455 @@
|
|
|
1
|
+
import { jsxs as f, jsx as e, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import Z, { useState as O, useCallback as S, useRef as re, createContext as oe, useContext as ne } from "react";
|
|
3
|
+
import { useTheme as le, Dialog as ce, DialogTitle as ae, Box as v, Typography as k, IconButton as se, DialogContent as de, DialogContentText as he, DialogActions as ge, Button as B, CircularProgress as fe, Portal as ue, Snackbar as pe, Alert as xe, AlertTitle as ye, Slide as me, Fade as we, Grow as be, Stack as z, Link as G, Badge as ke, Chip as ve } from "@mui/material";
|
|
4
|
+
import Se from "@mui/icons-material/Close";
|
|
5
|
+
import Le from "@mui/icons-material/CheckCircle";
|
|
6
|
+
import Ce from "@mui/icons-material/Error";
|
|
7
|
+
import We from "@mui/icons-material/Warning";
|
|
8
|
+
import Ie from "@mui/icons-material/Info";
|
|
9
|
+
import ze from "@mui/icons-material/HelpOutline";
|
|
10
|
+
import { s as L, b as h } from "./navigation.js";
|
|
11
|
+
import { I as T } from "./ai.js";
|
|
12
|
+
function De(t) {
|
|
13
|
+
const r = t.palette.trinity;
|
|
14
|
+
return {
|
|
15
|
+
default: {
|
|
16
|
+
icon: null,
|
|
17
|
+
color: r.interactive.default,
|
|
18
|
+
primaryColor: "primary"
|
|
19
|
+
},
|
|
20
|
+
info: {
|
|
21
|
+
icon: /* @__PURE__ */ e(Ie, {}),
|
|
22
|
+
color: r.status.info.text,
|
|
23
|
+
primaryColor: "info"
|
|
24
|
+
},
|
|
25
|
+
success: {
|
|
26
|
+
icon: /* @__PURE__ */ e(Le, {}),
|
|
27
|
+
color: r.status.success.text,
|
|
28
|
+
primaryColor: "success"
|
|
29
|
+
},
|
|
30
|
+
warning: {
|
|
31
|
+
icon: /* @__PURE__ */ e(We, {}),
|
|
32
|
+
color: r.status.warning.text,
|
|
33
|
+
primaryColor: "warning"
|
|
34
|
+
},
|
|
35
|
+
danger: {
|
|
36
|
+
icon: /* @__PURE__ */ e(Ce, {}),
|
|
37
|
+
color: r.status.error.text,
|
|
38
|
+
primaryColor: "error"
|
|
39
|
+
},
|
|
40
|
+
confirm: {
|
|
41
|
+
icon: /* @__PURE__ */ e(ze, {}),
|
|
42
|
+
color: r.interactive.default,
|
|
43
|
+
primaryColor: "primary"
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const Me = ({
|
|
48
|
+
open: t,
|
|
49
|
+
onClose: r,
|
|
50
|
+
title: i,
|
|
51
|
+
children: o,
|
|
52
|
+
variant: c = "default",
|
|
53
|
+
primaryAction: a,
|
|
54
|
+
onPrimaryAction: l,
|
|
55
|
+
secondaryAction: d = "Cancel",
|
|
56
|
+
onSecondaryAction: g,
|
|
57
|
+
loading: u = !1,
|
|
58
|
+
primaryDisabled: s = !1,
|
|
59
|
+
showCloseButton: b = !0,
|
|
60
|
+
disableBackdropClick: C = !1,
|
|
61
|
+
disableEscapeKeyDown: I = !1,
|
|
62
|
+
maxWidth: y = "sm",
|
|
63
|
+
fullWidth: D = !0,
|
|
64
|
+
fullScreenMobile: M = !1,
|
|
65
|
+
footer: Q,
|
|
66
|
+
hideFooter: j = !1,
|
|
67
|
+
sx: p
|
|
68
|
+
}) => {
|
|
69
|
+
const x = le(), [m, E] = O(!1), F = De(x)[c], Y = (R, N) => {
|
|
70
|
+
N === "backdropClick" && C || N === "escapeKeyDown" && I || r();
|
|
71
|
+
}, ee = async () => {
|
|
72
|
+
if (l) {
|
|
73
|
+
const R = l();
|
|
74
|
+
if (R instanceof Promise) {
|
|
75
|
+
E(!0);
|
|
76
|
+
try {
|
|
77
|
+
await R;
|
|
78
|
+
} finally {
|
|
79
|
+
E(!1);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}, ie = () => {
|
|
84
|
+
g?.(), r();
|
|
85
|
+
}, V = u || m, _ = Z.useId(), A = Z.useId();
|
|
86
|
+
return /* @__PURE__ */ f(
|
|
87
|
+
ce,
|
|
88
|
+
{
|
|
89
|
+
open: t,
|
|
90
|
+
onClose: Y,
|
|
91
|
+
maxWidth: y,
|
|
92
|
+
fullWidth: D,
|
|
93
|
+
fullScreen: M ? void 0 : !1,
|
|
94
|
+
"aria-labelledby": i ? _ : void 0,
|
|
95
|
+
"aria-describedby": o ? A : void 0,
|
|
96
|
+
sx: {
|
|
97
|
+
"& .MuiDialog-paper": {
|
|
98
|
+
borderRadius: L.borders.radiusPx.lg,
|
|
99
|
+
// 12px
|
|
100
|
+
...p
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
children: [
|
|
104
|
+
(i || b) && /* @__PURE__ */ f(
|
|
105
|
+
ae,
|
|
106
|
+
{
|
|
107
|
+
id: _,
|
|
108
|
+
sx: {
|
|
109
|
+
display: "flex",
|
|
110
|
+
alignItems: "center",
|
|
111
|
+
gap: 1.5,
|
|
112
|
+
pr: b ? 6 : 3
|
|
113
|
+
},
|
|
114
|
+
children: [
|
|
115
|
+
F.icon && /* @__PURE__ */ e(
|
|
116
|
+
v,
|
|
117
|
+
{
|
|
118
|
+
sx: {
|
|
119
|
+
width: L.iconSize.display + 4,
|
|
120
|
+
// 40px - prominent icon with frame
|
|
121
|
+
height: L.iconSize.display + 4,
|
|
122
|
+
borderRadius: `${L.borders.radius.circle}px`,
|
|
123
|
+
// Perfect circle
|
|
124
|
+
bgcolor: "action.selected",
|
|
125
|
+
// Theme-aware 12% overlay
|
|
126
|
+
display: "flex",
|
|
127
|
+
alignItems: "center",
|
|
128
|
+
justifyContent: "center",
|
|
129
|
+
"& .MuiSvgIcon-root": {
|
|
130
|
+
color: F.color,
|
|
131
|
+
fontSize: L.iconSize.prominent
|
|
132
|
+
// 24px
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
children: F.icon
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
/* @__PURE__ */ e(k, { variant: "h6", component: "span", fontWeight: 600, children: i }),
|
|
139
|
+
b && /* @__PURE__ */ e(
|
|
140
|
+
se,
|
|
141
|
+
{
|
|
142
|
+
onClick: r,
|
|
143
|
+
disabled: V,
|
|
144
|
+
"aria-label": "Close dialog",
|
|
145
|
+
sx: {
|
|
146
|
+
position: "absolute",
|
|
147
|
+
right: 8,
|
|
148
|
+
top: 8,
|
|
149
|
+
color: "text.secondary"
|
|
150
|
+
},
|
|
151
|
+
children: /* @__PURE__ */ e(Se, {})
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
/* @__PURE__ */ e(de, { id: A, dividers: c === "default", children: typeof o == "string" ? /* @__PURE__ */ e(he, { children: o }) : o }),
|
|
158
|
+
!j && /* @__PURE__ */ e(ge, { sx: { px: 3, py: 2 }, children: Q || /* @__PURE__ */ f(te, { children: [
|
|
159
|
+
d && /* @__PURE__ */ e(
|
|
160
|
+
B,
|
|
161
|
+
{
|
|
162
|
+
onClick: ie,
|
|
163
|
+
disabled: V,
|
|
164
|
+
color: "inherit",
|
|
165
|
+
children: d
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
a && /* @__PURE__ */ e(
|
|
169
|
+
B,
|
|
170
|
+
{
|
|
171
|
+
onClick: ee,
|
|
172
|
+
disabled: s || V,
|
|
173
|
+
variant: "contained",
|
|
174
|
+
color: F.primaryColor,
|
|
175
|
+
startIcon: V ? /* @__PURE__ */ e(fe, { size: 16, color: "inherit" }) : void 0,
|
|
176
|
+
children: a
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
] }) })
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
}, vi = ({
|
|
184
|
+
open: t,
|
|
185
|
+
onClose: r,
|
|
186
|
+
onConfirm: i,
|
|
187
|
+
title: o = "Confirm Action",
|
|
188
|
+
message: c = "Are you sure you want to proceed?",
|
|
189
|
+
confirmLabel: a = "Confirm",
|
|
190
|
+
cancelLabel: l = "Cancel",
|
|
191
|
+
variant: d = "default",
|
|
192
|
+
loading: g = !1
|
|
193
|
+
}) => /* @__PURE__ */ e(
|
|
194
|
+
Me,
|
|
195
|
+
{
|
|
196
|
+
open: t,
|
|
197
|
+
onClose: r,
|
|
198
|
+
title: o,
|
|
199
|
+
variant: d === "default" ? "confirm" : d,
|
|
200
|
+
primaryAction: a,
|
|
201
|
+
onPrimaryAction: i,
|
|
202
|
+
secondaryAction: l,
|
|
203
|
+
loading: g,
|
|
204
|
+
maxWidth: "xs",
|
|
205
|
+
children: /* @__PURE__ */ e(k, { color: "text.secondary", children: c })
|
|
206
|
+
}
|
|
207
|
+
), U = {
|
|
208
|
+
isOpen: !1,
|
|
209
|
+
title: "Confirm Action",
|
|
210
|
+
message: "Are you sure you want to proceed?",
|
|
211
|
+
variant: "default",
|
|
212
|
+
confirmLabel: "Confirm",
|
|
213
|
+
onConfirm: () => {
|
|
214
|
+
}
|
|
215
|
+
}, Si = () => {
|
|
216
|
+
const [t, r] = O(U), i = S(
|
|
217
|
+
(c) => {
|
|
218
|
+
r({
|
|
219
|
+
...U,
|
|
220
|
+
...c,
|
|
221
|
+
isOpen: !0
|
|
222
|
+
});
|
|
223
|
+
},
|
|
224
|
+
[]
|
|
225
|
+
), o = S(() => {
|
|
226
|
+
r((c) => ({ ...c, isOpen: !1 }));
|
|
227
|
+
}, []);
|
|
228
|
+
return { confirm: i, close: o, state: t };
|
|
229
|
+
}, q = oe(null), H = (t) => /* @__PURE__ */ e(me, { ...t, direction: "left" }), Pe = (t) => /* @__PURE__ */ e(be, { ...t }), Be = (t) => /* @__PURE__ */ e(we, { ...t }), Te = (t) => {
|
|
230
|
+
const [r, i] = t.split("-");
|
|
231
|
+
return { vertical: r, horizontal: i };
|
|
232
|
+
}, Ee = (t) => {
|
|
233
|
+
switch (t) {
|
|
234
|
+
case "slide":
|
|
235
|
+
return H;
|
|
236
|
+
case "grow":
|
|
237
|
+
return Pe;
|
|
238
|
+
case "fade":
|
|
239
|
+
return Be;
|
|
240
|
+
default:
|
|
241
|
+
return H;
|
|
242
|
+
}
|
|
243
|
+
}, $e = ({
|
|
244
|
+
id: t,
|
|
245
|
+
message: r,
|
|
246
|
+
title: i,
|
|
247
|
+
severity: o = "info",
|
|
248
|
+
duration: c = 5e3,
|
|
249
|
+
action: a,
|
|
250
|
+
onAction: l,
|
|
251
|
+
position: d = "top-right",
|
|
252
|
+
transition: g = "slide",
|
|
253
|
+
dismissible: u = !0,
|
|
254
|
+
open: s,
|
|
255
|
+
onClose: b
|
|
256
|
+
}) => {
|
|
257
|
+
const C = Te(d), I = Ee(g);
|
|
258
|
+
return /* @__PURE__ */ e(
|
|
259
|
+
pe,
|
|
260
|
+
{
|
|
261
|
+
open: s,
|
|
262
|
+
autoHideDuration: c,
|
|
263
|
+
onClose: b,
|
|
264
|
+
anchorOrigin: C,
|
|
265
|
+
TransitionComponent: I,
|
|
266
|
+
children: /* @__PURE__ */ f(
|
|
267
|
+
xe,
|
|
268
|
+
{
|
|
269
|
+
severity: o,
|
|
270
|
+
variant: "filled",
|
|
271
|
+
onClose: u ? b : void 0,
|
|
272
|
+
action: a ? /* @__PURE__ */ e(B, { color: "inherit", size: "small", onClick: () => {
|
|
273
|
+
l?.(), b();
|
|
274
|
+
}, children: a }) : void 0,
|
|
275
|
+
sx: {
|
|
276
|
+
width: "100%",
|
|
277
|
+
minWidth: 300,
|
|
278
|
+
maxWidth: 500,
|
|
279
|
+
boxShadow: 3,
|
|
280
|
+
"& .MuiAlert-message": {
|
|
281
|
+
flex: 1
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
children: [
|
|
285
|
+
i && /* @__PURE__ */ e(ye, { children: i }),
|
|
286
|
+
r
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
)
|
|
290
|
+
}
|
|
291
|
+
);
|
|
292
|
+
}, Li = ({
|
|
293
|
+
children: t,
|
|
294
|
+
defaultPosition: r = "top-right",
|
|
295
|
+
defaultDuration: i = 5e3,
|
|
296
|
+
maxToasts: o = 5,
|
|
297
|
+
defaultTransition: c = "slide"
|
|
298
|
+
}) => {
|
|
299
|
+
const [a, l] = O([]), d = re(0), g = S(() => (d.current += 1, `toast-${d.current}-${Date.now()}`), []), u = S(
|
|
300
|
+
(p) => {
|
|
301
|
+
const x = g(), m = {
|
|
302
|
+
...p,
|
|
303
|
+
id: x,
|
|
304
|
+
open: !0,
|
|
305
|
+
position: p.position ?? r,
|
|
306
|
+
duration: p.duration ?? i,
|
|
307
|
+
transition: p.transition ?? c,
|
|
308
|
+
dismissible: p.dismissible ?? !0
|
|
309
|
+
};
|
|
310
|
+
return l((E) => {
|
|
311
|
+
const $ = [...E, m];
|
|
312
|
+
return $.length > o ? $.slice(-o) : $;
|
|
313
|
+
}), x;
|
|
314
|
+
},
|
|
315
|
+
[g, r, i, c, o]
|
|
316
|
+
), s = S((p) => {
|
|
317
|
+
l(
|
|
318
|
+
(x) => x.map((m) => m.id === p ? { ...m, open: !1 } : m)
|
|
319
|
+
), setTimeout(() => {
|
|
320
|
+
l((x) => x.filter((m) => m.id !== p));
|
|
321
|
+
}, 300);
|
|
322
|
+
}, []), b = S(() => {
|
|
323
|
+
l((p) => p.map((x) => ({ ...x, open: !1 }))), setTimeout(() => {
|
|
324
|
+
l([]);
|
|
325
|
+
}, 300);
|
|
326
|
+
}, []), C = S(
|
|
327
|
+
(p) => u(p),
|
|
328
|
+
[u]
|
|
329
|
+
), I = S(
|
|
330
|
+
(p, x) => u({ message: p, severity: "success", ...x }),
|
|
331
|
+
[u]
|
|
332
|
+
), y = S(
|
|
333
|
+
(p, x) => u({ message: p, severity: "info", ...x }),
|
|
334
|
+
[u]
|
|
335
|
+
), D = S(
|
|
336
|
+
(p, x) => u({ message: p, severity: "warning", ...x }),
|
|
337
|
+
[u]
|
|
338
|
+
), M = S(
|
|
339
|
+
(p, x) => u({ message: p, severity: "error", ...x }),
|
|
340
|
+
[u]
|
|
341
|
+
), Q = {
|
|
342
|
+
toast: C,
|
|
343
|
+
success: I,
|
|
344
|
+
info: y,
|
|
345
|
+
warning: D,
|
|
346
|
+
error: M,
|
|
347
|
+
dismiss: s,
|
|
348
|
+
dismissAll: b
|
|
349
|
+
}, j = a.reduce((p, x) => {
|
|
350
|
+
const m = x.position || r;
|
|
351
|
+
return p[m] || (p[m] = []), p[m].push(x), p;
|
|
352
|
+
}, {});
|
|
353
|
+
return /* @__PURE__ */ f(q.Provider, { value: Q, children: [
|
|
354
|
+
t,
|
|
355
|
+
/* @__PURE__ */ e(ue, { children: Object.entries(j).map(([p, x]) => /* @__PURE__ */ e(
|
|
356
|
+
v,
|
|
357
|
+
{
|
|
358
|
+
sx: {
|
|
359
|
+
position: "fixed",
|
|
360
|
+
zIndex: 9999,
|
|
361
|
+
...Fe(p),
|
|
362
|
+
display: "flex",
|
|
363
|
+
flexDirection: "column",
|
|
364
|
+
gap: 1,
|
|
365
|
+
pointerEvents: "none",
|
|
366
|
+
"& > *": {
|
|
367
|
+
pointerEvents: "auto"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
children: x.map((m) => /* @__PURE__ */ e($e, { ...m, onClose: () => s(m.id) }, m.id))
|
|
371
|
+
},
|
|
372
|
+
p
|
|
373
|
+
)) })
|
|
374
|
+
] });
|
|
375
|
+
}, Fe = (t) => {
|
|
376
|
+
const r = {};
|
|
377
|
+
return t.startsWith("top") && (r.top = 16), t.startsWith("bottom") && (r.bottom = 16), t.endsWith("left") && (r.left = 16), t.endsWith("right") && (r.right = 16), t.endsWith("center") && (r.left = "50%", r.transform = "translateX(-50%)"), r;
|
|
378
|
+
}, Ci = () => {
|
|
379
|
+
const t = ne(q);
|
|
380
|
+
if (!t)
|
|
381
|
+
throw new Error("useToast must be used within a ToastProvider");
|
|
382
|
+
return t;
|
|
383
|
+
}, w = {
|
|
384
|
+
// Error/danger - Tailwind red-500
|
|
385
|
+
error: {
|
|
386
|
+
main: "#EF4444",
|
|
387
|
+
light: "#FEE2E2"
|
|
388
|
+
},
|
|
389
|
+
// Warning/caution - Tailwind amber-500
|
|
390
|
+
warning: {
|
|
391
|
+
main: "#F59E0B",
|
|
392
|
+
light: "#FEF3C7"
|
|
393
|
+
},
|
|
394
|
+
// Success/positive - Tailwind emerald-500
|
|
395
|
+
success: {
|
|
396
|
+
main: "#10B981",
|
|
397
|
+
light: "#D1FAE5"
|
|
398
|
+
},
|
|
399
|
+
// Accent/highlight - Yellow for flames/sparks
|
|
400
|
+
accent: {
|
|
401
|
+
flame: "#FFD93D"
|
|
402
|
+
}
|
|
403
|
+
}, J = {
|
|
404
|
+
small: {
|
|
405
|
+
illustrationSize: 120,
|
|
406
|
+
titleVariant: "subtitle1",
|
|
407
|
+
descriptionVariant: "body2",
|
|
408
|
+
spacing: 2,
|
|
409
|
+
padding: 3
|
|
410
|
+
},
|
|
411
|
+
medium: {
|
|
412
|
+
illustrationSize: 180,
|
|
413
|
+
titleVariant: "h6",
|
|
414
|
+
descriptionVariant: "body1",
|
|
415
|
+
spacing: 3,
|
|
416
|
+
padding: 4
|
|
417
|
+
},
|
|
418
|
+
large: {
|
|
419
|
+
illustrationSize: 240,
|
|
420
|
+
titleVariant: "h5",
|
|
421
|
+
descriptionVariant: "body1",
|
|
422
|
+
spacing: 4,
|
|
423
|
+
padding: 6
|
|
424
|
+
}
|
|
425
|
+
}, Ve = ({
|
|
426
|
+
size: t = 180,
|
|
427
|
+
primaryColor: r = h.primary.main,
|
|
428
|
+
secondaryColor: i = h.neutral.gray100,
|
|
429
|
+
accentColor: o = h.secondary.main
|
|
430
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
431
|
+
/* @__PURE__ */ e("rect", { x: "20", y: "60", width: "160", height: "100", rx: "8", fill: i }),
|
|
432
|
+
/* @__PURE__ */ e("rect", { x: "20", y: "60", width: "160", height: "24", rx: "8", fill: r, opacity: "0.2" }),
|
|
433
|
+
/* @__PURE__ */ e("rect", { x: "30", y: "94", width: "60", height: "8", rx: "4", fill: i, opacity: "0.8" }),
|
|
434
|
+
/* @__PURE__ */ e("rect", { x: "100", y: "94", width: "70", height: "8", rx: "4", fill: i, opacity: "0.6" }),
|
|
435
|
+
/* @__PURE__ */ e("rect", { x: "30", y: "114", width: "50", height: "8", rx: "4", fill: i, opacity: "0.8" }),
|
|
436
|
+
/* @__PURE__ */ e("rect", { x: "100", y: "114", width: "50", height: "8", rx: "4", fill: i, opacity: "0.6" }),
|
|
437
|
+
/* @__PURE__ */ e("rect", { x: "30", y: "134", width: "70", height: "8", rx: "4", fill: i, opacity: "0.8" }),
|
|
438
|
+
/* @__PURE__ */ e("rect", { x: "100", y: "134", width: "60", height: "8", rx: "4", fill: i, opacity: "0.6" }),
|
|
439
|
+
/* @__PURE__ */ e("circle", { cx: "100", cy: "115", r: "35", fill: "white", stroke: r, strokeWidth: "3", strokeDasharray: "6 4" }),
|
|
440
|
+
/* @__PURE__ */ e("text", { x: "100", y: "122", textAnchor: "middle", fill: r, fontSize: "32", fontWeight: "300", children: "?" })
|
|
441
|
+
] }), Qe = ({
|
|
442
|
+
size: t = 180,
|
|
443
|
+
primaryColor: r = h.primary.main,
|
|
444
|
+
secondaryColor: i = h.neutral.gray100,
|
|
445
|
+
accentColor: o = h.secondary.main
|
|
446
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
447
|
+
/* @__PURE__ */ e("rect", { x: "50", y: "50", width: "100", height: "120", rx: "6", fill: i, transform: "rotate(-5 50 50)" }),
|
|
448
|
+
/* @__PURE__ */ e("rect", { x: "55", y: "45", width: "100", height: "120", rx: "6", fill: "white", stroke: i, strokeWidth: "2" }),
|
|
449
|
+
/* @__PURE__ */ e("rect", { x: "70", y: "65", width: "60", height: "6", rx: "3", fill: i }),
|
|
450
|
+
/* @__PURE__ */ e("rect", { x: "70", y: "80", width: "70", height: "6", rx: "3", fill: i, opacity: "0.6" }),
|
|
451
|
+
/* @__PURE__ */ e("rect", { x: "70", y: "95", width: "50", height: "6", rx: "3", fill: i, opacity: "0.4" }),
|
|
452
|
+
/* @__PURE__ */ f("g", { transform: "translate(120, 100) rotate(45)", children: [
|
|
453
|
+
/* @__PURE__ */ e("rect", { x: "0", y: "0", width: "50", height: "10", fill: o }),
|
|
454
|
+
/* @__PURE__ */ e("polygon", { points: "50,0 60,5 50,10", fill: o, opacity: "0.7" }),
|
|
455
|
+
/* @__PURE__ */ e("rect", { x: "-5", y: "2", width: "5", height: "6", fill: r })
|
|
456
|
+
] })
|
|
457
|
+
] }), je = ({
|
|
458
|
+
size: t = 180,
|
|
459
|
+
primaryColor: r = h.primary.main,
|
|
460
|
+
secondaryColor: i = h.neutral.gray100,
|
|
461
|
+
accentColor: o = h.secondary.main
|
|
462
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
463
|
+
/* @__PURE__ */ e("ellipse", { cx: "100", cy: "100", rx: "30", ry: "50", fill: r }),
|
|
464
|
+
/* @__PURE__ */ e("circle", { cx: "100", cy: "85", r: "12", fill: "white" }),
|
|
465
|
+
/* @__PURE__ */ e("circle", { cx: "100", cy: "85", r: "8", fill: o, opacity: "0.3" }),
|
|
466
|
+
/* @__PURE__ */ e("path", { d: "M70 120 L50 150 L70 140 Z", fill: o }),
|
|
467
|
+
/* @__PURE__ */ e("path", { d: "M130 120 L150 150 L130 140 Z", fill: o }),
|
|
468
|
+
/* @__PURE__ */ e("ellipse", { cx: "100", cy: "160", rx: "15", ry: "25", fill: o, opacity: "0.8" }),
|
|
469
|
+
/* @__PURE__ */ e("ellipse", { cx: "100", cy: "155", rx: "10", ry: "18", fill: w.accent.flame }),
|
|
470
|
+
/* @__PURE__ */ e("ellipse", { cx: "100", cy: "150", rx: "5", ry: "10", fill: "white" }),
|
|
471
|
+
/* @__PURE__ */ e("circle", { cx: "40", cy: "50", r: "3", fill: r, opacity: "0.5" }),
|
|
472
|
+
/* @__PURE__ */ e("circle", { cx: "160", cy: "40", r: "2", fill: r, opacity: "0.5" }),
|
|
473
|
+
/* @__PURE__ */ e("circle", { cx: "30", cy: "120", r: "2", fill: o, opacity: "0.5" }),
|
|
474
|
+
/* @__PURE__ */ e("circle", { cx: "170", cy: "100", r: "3", fill: o, opacity: "0.5" })
|
|
475
|
+
] }), Re = ({
|
|
476
|
+
size: t = 180,
|
|
477
|
+
primaryColor: r = h.primary.main,
|
|
478
|
+
secondaryColor: i = h.neutral.gray100
|
|
479
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
480
|
+
/* @__PURE__ */ e("path", { d: "M30 70 L30 160 L170 160 L170 70 L100 70 L90 55 L30 55 Z", fill: i }),
|
|
481
|
+
/* @__PURE__ */ e("path", { d: "M30 70 L170 70 L170 160 L30 160 Z", fill: "white", stroke: i, strokeWidth: "2" }),
|
|
482
|
+
/* @__PURE__ */ e("rect", { x: "60", y: "85", width: "50", height: "60", rx: "4", fill: "white", stroke: r, strokeWidth: "2" }),
|
|
483
|
+
/* @__PURE__ */ e("rect", { x: "70", y: "95", width: "30", height: "4", rx: "2", fill: i }),
|
|
484
|
+
/* @__PURE__ */ e("rect", { x: "70", y: "105", width: "25", height: "4", rx: "2", fill: i, opacity: "0.6" }),
|
|
485
|
+
/* @__PURE__ */ e("rect", { x: "70", y: "115", width: "30", height: "4", rx: "2", fill: i, opacity: "0.4" }),
|
|
486
|
+
/* @__PURE__ */ e("circle", { cx: "140", cy: "130", r: "20", fill: r }),
|
|
487
|
+
/* @__PURE__ */ e("rect", { x: "132", y: "127", width: "16", height: "6", rx: "3", fill: "white" }),
|
|
488
|
+
/* @__PURE__ */ e("rect", { x: "137", y: "122", width: "6", height: "16", rx: "3", fill: "white" })
|
|
489
|
+
] }), Ze = ({
|
|
490
|
+
size: t = 180,
|
|
491
|
+
primaryColor: r = h.primary.main,
|
|
492
|
+
secondaryColor: i = h.neutral.gray100,
|
|
493
|
+
accentColor: o = h.secondary.main
|
|
494
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
495
|
+
/* @__PURE__ */ e("rect", { x: "30", y: "40", width: "140", height: "120", rx: "8", fill: "white", stroke: i, strokeWidth: "2" }),
|
|
496
|
+
/* @__PURE__ */ e("line", { x1: "30", y1: "80", x2: "170", y2: "80", stroke: i, strokeWidth: "1", strokeDasharray: "4" }),
|
|
497
|
+
/* @__PURE__ */ e("line", { x1: "30", y1: "120", x2: "170", y2: "120", stroke: i, strokeWidth: "1", strokeDasharray: "4" }),
|
|
498
|
+
/* @__PURE__ */ e("rect", { x: "50", y: "100", width: "20", height: "50", rx: "4", fill: i, opacity: "0.5" }),
|
|
499
|
+
/* @__PURE__ */ e("rect", { x: "90", y: "80", width: "20", height: "70", rx: "4", fill: i, opacity: "0.5" }),
|
|
500
|
+
/* @__PURE__ */ e("rect", { x: "130", y: "90", width: "20", height: "60", rx: "4", fill: i, opacity: "0.5" }),
|
|
501
|
+
/* @__PURE__ */ e("circle", { cx: "160", cy: "60", r: "25", fill: o, opacity: "0.2" }),
|
|
502
|
+
/* @__PURE__ */ e("path", { d: "M160 45 L160 55 M148 52 L155 58 M172 52 L165 58", stroke: o, strokeWidth: "3", strokeLinecap: "round" }),
|
|
503
|
+
/* @__PURE__ */ e("circle", { cx: "160", cy: "65", r: "10", fill: o }),
|
|
504
|
+
/* @__PURE__ */ e("rect", { x: "155", y: "75", width: "10", height: "8", rx: "2", fill: r })
|
|
505
|
+
] }), Oe = ({
|
|
506
|
+
size: t = 180,
|
|
507
|
+
primaryColor: r = h.primary.main,
|
|
508
|
+
secondaryColor: i = h.neutral.gray100
|
|
509
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
510
|
+
/* @__PURE__ */ e("circle", { cx: "85", cy: "85", r: "45", fill: "white", stroke: r, strokeWidth: "4" }),
|
|
511
|
+
/* @__PURE__ */ e("line", { x1: "118", y1: "118", x2: "160", y2: "160", stroke: r, strokeWidth: "8", strokeLinecap: "round" }),
|
|
512
|
+
/* @__PURE__ */ e("line", { x1: "65", y1: "65", x2: "105", y2: "105", stroke: i, strokeWidth: "6", strokeLinecap: "round" }),
|
|
513
|
+
/* @__PURE__ */ e("line", { x1: "105", y1: "65", x2: "65", y2: "105", stroke: i, strokeWidth: "6", strokeLinecap: "round" }),
|
|
514
|
+
/* @__PURE__ */ e("text", { x: "155", y: "50", fill: i, fontSize: "20", fontWeight: "bold", children: "?" }),
|
|
515
|
+
/* @__PURE__ */ e("text", { x: "40", y: "160", fill: i, fontSize: "16", fontWeight: "bold", children: "?" })
|
|
516
|
+
] }), _e = ({
|
|
517
|
+
size: t = 180,
|
|
518
|
+
primaryColor: r = h.primary.main,
|
|
519
|
+
secondaryColor: i = h.neutral.gray100
|
|
520
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
521
|
+
/* @__PURE__ */ e("path", { d: "M100 30 L170 150 L30 150 Z", fill: w.warning.light, stroke: w.warning.main, strokeWidth: "3" }),
|
|
522
|
+
/* @__PURE__ */ e("rect", { x: "94", y: "70", width: "12", height: "45", rx: "6", fill: w.warning.main }),
|
|
523
|
+
/* @__PURE__ */ e("circle", { cx: "100", cy: "130", r: "7", fill: w.warning.main }),
|
|
524
|
+
/* @__PURE__ */ e("circle", { cx: "30", cy: "60", r: "8", fill: i, opacity: "0.5" }),
|
|
525
|
+
/* @__PURE__ */ e("circle", { cx: "170", cy: "80", r: "6", fill: i, opacity: "0.5" }),
|
|
526
|
+
/* @__PURE__ */ e("rect", { x: "160", y: "130", width: "20", height: "4", rx: "2", fill: i, opacity: "0.3" }),
|
|
527
|
+
/* @__PURE__ */ e("rect", { x: "20", y: "120", width: "15", height: "4", rx: "2", fill: i, opacity: "0.3" })
|
|
528
|
+
] }), Ae = ({
|
|
529
|
+
size: t = 180,
|
|
530
|
+
primaryColor: r = h.primary.main,
|
|
531
|
+
secondaryColor: i = h.neutral.gray100,
|
|
532
|
+
accentColor: o = h.secondary.main
|
|
533
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
534
|
+
/* @__PURE__ */ e("text", { x: "100", y: "100", textAnchor: "middle", fill: r, fontSize: "48", fontWeight: "bold", children: "404" }),
|
|
535
|
+
/* @__PURE__ */ e("path", { d: "M60 130 Q40 130 40 150 Q40 170 60 170", stroke: i, strokeWidth: "4", fill: "none", strokeLinecap: "round" }),
|
|
536
|
+
/* @__PURE__ */ e("path", { d: "M140 130 Q160 130 160 150 Q160 170 140 170", stroke: i, strokeWidth: "4", fill: "none", strokeLinecap: "round" }),
|
|
537
|
+
/* @__PURE__ */ e("line", { x1: "85", y1: "150", x2: "95", y2: "140", stroke: o, strokeWidth: "3", strokeLinecap: "round" }),
|
|
538
|
+
/* @__PURE__ */ e("line", { x1: "105", y1: "160", x2: "115", y2: "150", stroke: o, strokeWidth: "3", strokeLinecap: "round" }),
|
|
539
|
+
/* @__PURE__ */ e("circle", { cx: "75", cy: "60", r: "5", fill: r }),
|
|
540
|
+
/* @__PURE__ */ e("circle", { cx: "125", cy: "60", r: "5", fill: r }),
|
|
541
|
+
/* @__PURE__ */ e("path", { d: "M80 75 Q100 65 120 75", stroke: r, strokeWidth: "3", fill: "none", strokeLinecap: "round" })
|
|
542
|
+
] }), Ne = ({
|
|
543
|
+
size: t = 180,
|
|
544
|
+
primaryColor: r = h.primary.main,
|
|
545
|
+
secondaryColor: i = h.neutral.gray100,
|
|
546
|
+
accentColor: o = h.secondary.main
|
|
547
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
548
|
+
/* @__PURE__ */ e("rect", { x: "60", y: "40", width: "80", height: "120", rx: "8", fill: i }),
|
|
549
|
+
/* @__PURE__ */ e("rect", { x: "70", y: "50", width: "60", height: "25", rx: "4", fill: "white" }),
|
|
550
|
+
/* @__PURE__ */ e("rect", { x: "70", y: "85", width: "60", height: "25", rx: "4", fill: "white" }),
|
|
551
|
+
/* @__PURE__ */ e("rect", { x: "70", y: "120", width: "60", height: "25", rx: "4", fill: "white" }),
|
|
552
|
+
/* @__PURE__ */ e("circle", { cx: "80", cy: "62", r: "4", fill: w.error.main }),
|
|
553
|
+
/* @__PURE__ */ e("circle", { cx: "92", cy: "62", r: "4", fill: w.error.main }),
|
|
554
|
+
/* @__PURE__ */ e("circle", { cx: "80", cy: "97", r: "4", fill: w.error.main }),
|
|
555
|
+
/* @__PURE__ */ e("circle", { cx: "92", cy: "97", r: "4", fill: o, opacity: "0.5" }),
|
|
556
|
+
/* @__PURE__ */ e("circle", { cx: "80", cy: "132", r: "4", fill: o, opacity: "0.5" }),
|
|
557
|
+
/* @__PURE__ */ e("circle", { cx: "92", cy: "132", r: "4", fill: o, opacity: "0.5" }),
|
|
558
|
+
/* @__PURE__ */ e("path", { d: "M150 50 L135 90 L150 90 L130 130 L155 80 L140 80 Z", fill: o }),
|
|
559
|
+
/* @__PURE__ */ f("g", { transform: "translate(40, 70)", children: [
|
|
560
|
+
/* @__PURE__ */ e("line", { x1: "0", y1: "0", x2: "15", y2: "15", stroke: w.error.main, strokeWidth: "3", strokeLinecap: "round" }),
|
|
561
|
+
/* @__PURE__ */ e("line", { x1: "15", y1: "0", x2: "0", y2: "15", stroke: w.error.main, strokeWidth: "3", strokeLinecap: "round" })
|
|
562
|
+
] })
|
|
563
|
+
] }), Ge = ({
|
|
564
|
+
size: t = 180,
|
|
565
|
+
primaryColor: r = h.primary.main,
|
|
566
|
+
secondaryColor: i = h.neutral.gray100,
|
|
567
|
+
accentColor: o = h.secondary.main
|
|
568
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
569
|
+
/* @__PURE__ */ e("rect", { x: "60", y: "90", width: "80", height: "70", rx: "10", fill: r }),
|
|
570
|
+
/* @__PURE__ */ e("path", { d: "M75 90 L75 60 Q75 40 100 40 Q125 40 125 60 L125 90", stroke: r, strokeWidth: "10", fill: "none", strokeLinecap: "round" }),
|
|
571
|
+
/* @__PURE__ */ e("circle", { cx: "100", cy: "115", r: "12", fill: "white" }),
|
|
572
|
+
/* @__PURE__ */ e("rect", { x: "95", y: "115", width: "10", height: "20", rx: "3", fill: "white" }),
|
|
573
|
+
/* @__PURE__ */ e("path", { d: "M100 25 L140 45 L140 85 Q140 115 100 135 Q60 115 60 85 L60 45 Z", fill: o, opacity: "0.15" }),
|
|
574
|
+
/* @__PURE__ */ e("circle", { cx: "155", cy: "65", r: "20", fill: w.error.light, stroke: w.error.main, strokeWidth: "2" }),
|
|
575
|
+
/* @__PURE__ */ e("rect", { x: "147", y: "55", width: "16", height: "20", rx: "4", fill: w.error.main })
|
|
576
|
+
] }), K = ({
|
|
577
|
+
size: t = 180,
|
|
578
|
+
primaryColor: r = h.primary.main,
|
|
579
|
+
secondaryColor: i = h.neutral.gray100,
|
|
580
|
+
accentColor: o = h.secondary.main
|
|
581
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
582
|
+
/* @__PURE__ */ e("ellipse", { cx: "100", cy: "80", rx: "60", ry: "40", fill: i }),
|
|
583
|
+
/* @__PURE__ */ e("ellipse", { cx: "60", cy: "95", rx: "35", ry: "25", fill: i }),
|
|
584
|
+
/* @__PURE__ */ e("ellipse", { cx: "140", cy: "95", rx: "35", ry: "25", fill: i }),
|
|
585
|
+
/* @__PURE__ */ e("ellipse", { cx: "100", cy: "100", rx: "50", ry: "30", fill: i }),
|
|
586
|
+
/* @__PURE__ */ e("rect", { x: "92", y: "110", width: "16", height: "50", rx: "4", fill: r }),
|
|
587
|
+
/* @__PURE__ */ e("polygon", { points: "100,85 75,120 125,120", fill: r }),
|
|
588
|
+
/* @__PURE__ */ e("rect", { x: "30", y: "140", width: "140", height: "50", rx: "8", fill: "white", stroke: o, strokeWidth: "2", strokeDasharray: "8 4" }),
|
|
589
|
+
/* @__PURE__ */ e("rect", { x: "85", y: "150", width: "30", height: "35", rx: "4", fill: "white", stroke: r, strokeWidth: "2" }),
|
|
590
|
+
/* @__PURE__ */ e("path", { d: "M100 150 L115 150 L115 165 L100 165 L100 150 Z", fill: r, opacity: "0.2" })
|
|
591
|
+
] }), Ue = ({
|
|
592
|
+
size: t = 180,
|
|
593
|
+
primaryColor: r = h.primary.main,
|
|
594
|
+
secondaryColor: i = h.neutral.gray100,
|
|
595
|
+
accentColor: o = h.secondary.main
|
|
596
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
597
|
+
/* @__PURE__ */ e("circle", { cx: "100", cy: "100", r: "70", fill: w.success.light }),
|
|
598
|
+
/* @__PURE__ */ e("circle", { cx: "100", cy: "100", r: "55", fill: w.success.main }),
|
|
599
|
+
/* @__PURE__ */ e("path", { d: "M65 100 L90 125 L135 75", stroke: "white", strokeWidth: "10", strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }),
|
|
600
|
+
/* @__PURE__ */ e("circle", { cx: "40", cy: "50", r: "6", fill: o, opacity: "0.6" }),
|
|
601
|
+
/* @__PURE__ */ e("circle", { cx: "160", cy: "60", r: "4", fill: o, opacity: "0.6" }),
|
|
602
|
+
/* @__PURE__ */ e("circle", { cx: "170", cy: "130", r: "5", fill: r, opacity: "0.4" }),
|
|
603
|
+
/* @__PURE__ */ e("circle", { cx: "30", cy: "140", r: "4", fill: r, opacity: "0.4" }),
|
|
604
|
+
/* @__PURE__ */ e("path", { d: "M45 170 L50 180 L55 170 L60 180", stroke: o, strokeWidth: "2", strokeLinecap: "round", opacity: "0.5" }),
|
|
605
|
+
/* @__PURE__ */ e("path", { d: "M140 170 L145 180 L150 170 L155 180", stroke: r, strokeWidth: "2", strokeLinecap: "round", opacity: "0.5" })
|
|
606
|
+
] }), He = ({
|
|
607
|
+
size: t = 180,
|
|
608
|
+
primaryColor: r = h.primary.main,
|
|
609
|
+
secondaryColor: i = h.neutral.gray100
|
|
610
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
611
|
+
/* @__PURE__ */ e("path", { d: "M100 40 Q130 40 140 80 L145 120 L55 120 L60 80 Q70 40 100 40 Z", fill: i }),
|
|
612
|
+
/* @__PURE__ */ e("ellipse", { cx: "100", cy: "120", rx: "50", ry: "12", fill: i }),
|
|
613
|
+
/* @__PURE__ */ e("circle", { cx: "100", cy: "145", r: "12", fill: i }),
|
|
614
|
+
/* @__PURE__ */ e("path", { d: "M100 40 L100 25", stroke: r, strokeWidth: "4", strokeLinecap: "round" }),
|
|
615
|
+
/* @__PURE__ */ e("text", { x: "145", y: "60", fill: r, fontSize: "20", fontWeight: "bold", opacity: "0.6", children: "Z" }),
|
|
616
|
+
/* @__PURE__ */ e("text", { x: "155", y: "45", fill: r, fontSize: "16", fontWeight: "bold", opacity: "0.4", children: "z" }),
|
|
617
|
+
/* @__PURE__ */ e("text", { x: "165", y: "35", fill: r, fontSize: "12", fontWeight: "bold", opacity: "0.2", children: "z" })
|
|
618
|
+
] }), qe = ({
|
|
619
|
+
size: t = 180,
|
|
620
|
+
primaryColor: r = h.primary.main,
|
|
621
|
+
secondaryColor: i = h.neutral.gray100
|
|
622
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
623
|
+
/* @__PURE__ */ e("ellipse", { cx: "100", cy: "60", rx: "50", ry: "20", fill: i }),
|
|
624
|
+
/* @__PURE__ */ e("rect", { x: "50", y: "60", width: "100", height: "80", fill: i }),
|
|
625
|
+
/* @__PURE__ */ e("ellipse", { cx: "100", cy: "140", rx: "50", ry: "20", fill: i }),
|
|
626
|
+
/* @__PURE__ */ e("ellipse", { cx: "100", cy: "60", rx: "50", ry: "20", fill: "white", stroke: r, strokeWidth: "2" }),
|
|
627
|
+
/* @__PURE__ */ e("ellipse", { cx: "100", cy: "140", rx: "50", ry: "20", fill: "white", stroke: r, strokeWidth: "2" }),
|
|
628
|
+
/* @__PURE__ */ e("line", { x1: "50", y1: "60", x2: "50", y2: "140", stroke: r, strokeWidth: "2" }),
|
|
629
|
+
/* @__PURE__ */ e("line", { x1: "150", y1: "60", x2: "150", y2: "140", stroke: r, strokeWidth: "2" }),
|
|
630
|
+
/* @__PURE__ */ e("circle", { cx: "100", cy: "100", r: "25", fill: "white", stroke: r, strokeWidth: "2", strokeDasharray: "5 3" }),
|
|
631
|
+
/* @__PURE__ */ e("text", { x: "100", y: "108", textAnchor: "middle", fill: r, fontSize: "24", fontWeight: "300", children: "0" })
|
|
632
|
+
] }), Je = ({
|
|
633
|
+
size: t = 180,
|
|
634
|
+
primaryColor: r = h.primary.main,
|
|
635
|
+
secondaryColor: i = h.neutral.gray100
|
|
636
|
+
}) => /* @__PURE__ */ f("svg", { width: t, height: t, viewBox: "0 0 200 200", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
637
|
+
/* @__PURE__ */ e("ellipse", { cx: "100", cy: "80", rx: "55", ry: "35", fill: i }),
|
|
638
|
+
/* @__PURE__ */ e("ellipse", { cx: "60", cy: "95", rx: "30", ry: "22", fill: i }),
|
|
639
|
+
/* @__PURE__ */ e("ellipse", { cx: "140", cy: "95", rx: "30", ry: "22", fill: i }),
|
|
640
|
+
/* @__PURE__ */ e("ellipse", { cx: "100", cy: "100", rx: "45", ry: "25", fill: i }),
|
|
641
|
+
/* @__PURE__ */ e("line", { x1: "75", y1: "70", x2: "125", y2: "110", stroke: w.error.main, strokeWidth: "8", strokeLinecap: "round" }),
|
|
642
|
+
/* @__PURE__ */ e("line", { x1: "125", y1: "70", x2: "75", y2: "110", stroke: w.error.main, strokeWidth: "8", strokeLinecap: "round" }),
|
|
643
|
+
/* @__PURE__ */ e("path", { d: "M45 140 Q45 160 65 160", stroke: i, strokeWidth: "3", fill: "none", strokeLinecap: "round" }),
|
|
644
|
+
/* @__PURE__ */ e("path", { d: "M35 145 Q35 170 65 170", stroke: i, strokeWidth: "3", fill: "none", strokeLinecap: "round", opacity: "0.6" }),
|
|
645
|
+
/* @__PURE__ */ e("path", { d: "M155 140 Q155 160 135 160", stroke: i, strokeWidth: "3", fill: "none", strokeLinecap: "round" }),
|
|
646
|
+
/* @__PURE__ */ e("path", { d: "M165 145 Q165 170 135 170", stroke: i, strokeWidth: "3", fill: "none", strokeLinecap: "round", opacity: "0.6" })
|
|
647
|
+
] }), Ke = {
|
|
648
|
+
"empty-table": Ve,
|
|
649
|
+
"empty-drafts": Qe,
|
|
650
|
+
"getting-started": je,
|
|
651
|
+
"empty-documents": Re,
|
|
652
|
+
"empty-insights": Ze,
|
|
653
|
+
"no-results": Oe,
|
|
654
|
+
"error-generic": _e,
|
|
655
|
+
"error-404": Ae,
|
|
656
|
+
"error-500": Ne,
|
|
657
|
+
"error-permission": Ge,
|
|
658
|
+
upload: K,
|
|
659
|
+
success: Ue,
|
|
660
|
+
"no-notifications": He,
|
|
661
|
+
"no-data": qe,
|
|
662
|
+
offline: Je
|
|
663
|
+
}, Wi = ({
|
|
664
|
+
illustration: t,
|
|
665
|
+
title: r,
|
|
666
|
+
description: i,
|
|
667
|
+
primaryAction: o,
|
|
668
|
+
secondaryAction: c,
|
|
669
|
+
size: a = "medium",
|
|
670
|
+
customIllustration: l,
|
|
671
|
+
sx: d
|
|
672
|
+
}) => {
|
|
673
|
+
const g = J[a], u = Ke[t];
|
|
674
|
+
return /* @__PURE__ */ f(
|
|
675
|
+
v,
|
|
676
|
+
{
|
|
677
|
+
sx: {
|
|
678
|
+
textAlign: "center",
|
|
679
|
+
p: g.padding,
|
|
680
|
+
maxWidth: a === "small" ? 300 : a === "large" ? 500 : 400,
|
|
681
|
+
mx: "auto",
|
|
682
|
+
...d
|
|
683
|
+
},
|
|
684
|
+
children: [
|
|
685
|
+
/* @__PURE__ */ e(
|
|
686
|
+
v,
|
|
687
|
+
{
|
|
688
|
+
sx: {
|
|
689
|
+
mb: g.spacing,
|
|
690
|
+
display: "flex",
|
|
691
|
+
justifyContent: "center",
|
|
692
|
+
alignItems: "center"
|
|
693
|
+
},
|
|
694
|
+
role: "img",
|
|
695
|
+
"aria-hidden": "true",
|
|
696
|
+
children: l || /* @__PURE__ */ e(u, { size: g.illustrationSize })
|
|
697
|
+
}
|
|
698
|
+
),
|
|
699
|
+
/* @__PURE__ */ e(
|
|
700
|
+
k,
|
|
701
|
+
{
|
|
702
|
+
variant: g.titleVariant,
|
|
703
|
+
sx: { mb: 1, fontWeight: 600 },
|
|
704
|
+
children: r
|
|
705
|
+
}
|
|
706
|
+
),
|
|
707
|
+
i && /* @__PURE__ */ e(
|
|
708
|
+
k,
|
|
709
|
+
{
|
|
710
|
+
variant: g.descriptionVariant,
|
|
711
|
+
color: "text.secondary",
|
|
712
|
+
sx: { mb: g.spacing },
|
|
713
|
+
children: i
|
|
714
|
+
}
|
|
715
|
+
),
|
|
716
|
+
(o || c) && /* @__PURE__ */ f(
|
|
717
|
+
z,
|
|
718
|
+
{
|
|
719
|
+
spacing: 1.5,
|
|
720
|
+
alignItems: "center",
|
|
721
|
+
sx: { mt: g.spacing },
|
|
722
|
+
children: [
|
|
723
|
+
o && (o.href ? /* @__PURE__ */ e(
|
|
724
|
+
B,
|
|
725
|
+
{
|
|
726
|
+
variant: "contained",
|
|
727
|
+
href: o.href,
|
|
728
|
+
onClick: o.onClick,
|
|
729
|
+
children: o.label
|
|
730
|
+
}
|
|
731
|
+
) : /* @__PURE__ */ e(
|
|
732
|
+
B,
|
|
733
|
+
{
|
|
734
|
+
variant: "contained",
|
|
735
|
+
onClick: o.onClick,
|
|
736
|
+
children: o.label
|
|
737
|
+
}
|
|
738
|
+
)),
|
|
739
|
+
c && (c.href ? /* @__PURE__ */ e(
|
|
740
|
+
G,
|
|
741
|
+
{
|
|
742
|
+
href: c.href,
|
|
743
|
+
onClick: c.onClick,
|
|
744
|
+
underline: "hover",
|
|
745
|
+
sx: { cursor: "pointer" },
|
|
746
|
+
children: c.label
|
|
747
|
+
}
|
|
748
|
+
) : /* @__PURE__ */ e(
|
|
749
|
+
G,
|
|
750
|
+
{
|
|
751
|
+
component: "button",
|
|
752
|
+
onClick: c.onClick,
|
|
753
|
+
underline: "hover",
|
|
754
|
+
sx: { cursor: "pointer" },
|
|
755
|
+
children: c.label
|
|
756
|
+
}
|
|
757
|
+
))
|
|
758
|
+
]
|
|
759
|
+
}
|
|
760
|
+
)
|
|
761
|
+
]
|
|
762
|
+
}
|
|
763
|
+
);
|
|
764
|
+
}, Ii = ({
|
|
765
|
+
title: t = "Drag and drop your file",
|
|
766
|
+
description: r = "or click to browse from your computer",
|
|
767
|
+
acceptedTypes: i = "PNG, JPG, PDF up to 10MB",
|
|
768
|
+
browseLabel: o = "Browse Files",
|
|
769
|
+
onDrop: c,
|
|
770
|
+
onBrowse: a,
|
|
771
|
+
isDragging: l = !1,
|
|
772
|
+
size: d = "medium",
|
|
773
|
+
sx: g
|
|
774
|
+
}) => {
|
|
775
|
+
const [u, s] = Z.useState(l), b = J[d], C = (y) => {
|
|
776
|
+
y.preventDefault(), y.stopPropagation(), y.type === "dragenter" || y.type === "dragover" ? s(!0) : y.type === "dragleave" && s(!1);
|
|
777
|
+
};
|
|
778
|
+
return /* @__PURE__ */ f(
|
|
779
|
+
v,
|
|
780
|
+
{
|
|
781
|
+
onDragEnter: C,
|
|
782
|
+
onDragLeave: C,
|
|
783
|
+
onDragOver: C,
|
|
784
|
+
onDrop: (y) => {
|
|
785
|
+
y.preventDefault(), y.stopPropagation(), s(!1), y.dataTransfer.files && y.dataTransfer.files.length > 0 && c?.(y.dataTransfer.files);
|
|
786
|
+
},
|
|
787
|
+
sx: {
|
|
788
|
+
p: b.padding,
|
|
789
|
+
border: "2px dashed",
|
|
790
|
+
borderColor: u ? "primary.main" : "grey.300",
|
|
791
|
+
borderRadius: 3,
|
|
792
|
+
// 12px - consistent with cards
|
|
793
|
+
bgcolor: u ? "primary.50" : "grey.50",
|
|
794
|
+
textAlign: "center",
|
|
795
|
+
cursor: "pointer",
|
|
796
|
+
transition: "all 0.2s ease",
|
|
797
|
+
"&:hover": {
|
|
798
|
+
borderColor: "primary.main",
|
|
799
|
+
bgcolor: "primary.50"
|
|
800
|
+
},
|
|
801
|
+
...g
|
|
802
|
+
},
|
|
803
|
+
onClick: a,
|
|
804
|
+
children: [
|
|
805
|
+
/* @__PURE__ */ e(v, { sx: { mb: 2 }, children: /* @__PURE__ */ e(K, { size: b.illustrationSize * 0.7 }) }),
|
|
806
|
+
/* @__PURE__ */ e(k, { variant: b.titleVariant, sx: { mb: 0.5, fontWeight: 600 }, children: t }),
|
|
807
|
+
/* @__PURE__ */ e(k, { variant: b.descriptionVariant, color: "text.secondary", sx: { mb: 2 }, children: r }),
|
|
808
|
+
/* @__PURE__ */ e(B, { variant: "outlined", size: d === "small" ? "small" : "medium", children: o }),
|
|
809
|
+
i && /* @__PURE__ */ e(k, { variant: "caption", color: "text.secondary", display: "block", sx: { mt: 2 }, children: i })
|
|
810
|
+
]
|
|
811
|
+
}
|
|
812
|
+
);
|
|
813
|
+
}, n = L.colors.indicator, W = {
|
|
814
|
+
// High Attention - Red
|
|
815
|
+
error: {
|
|
816
|
+
color: n.error.fg,
|
|
817
|
+
backgroundColor: n.error.bg,
|
|
818
|
+
icon: "error",
|
|
819
|
+
shape: "circle",
|
|
820
|
+
severity: "high",
|
|
821
|
+
label: "Error"
|
|
822
|
+
},
|
|
823
|
+
critical: {
|
|
824
|
+
color: n.critical.fg,
|
|
825
|
+
backgroundColor: n.critical.bg,
|
|
826
|
+
icon: "warning",
|
|
827
|
+
shape: "hexagon",
|
|
828
|
+
severity: "high",
|
|
829
|
+
label: "Critical"
|
|
830
|
+
},
|
|
831
|
+
failed: {
|
|
832
|
+
color: n.failed.fg,
|
|
833
|
+
backgroundColor: n.failed.bg,
|
|
834
|
+
icon: "close",
|
|
835
|
+
shape: "circle",
|
|
836
|
+
severity: "high",
|
|
837
|
+
label: "Failed"
|
|
838
|
+
},
|
|
839
|
+
rejected: {
|
|
840
|
+
color: n.rejected.fg,
|
|
841
|
+
backgroundColor: n.rejected.bg,
|
|
842
|
+
icon: "close",
|
|
843
|
+
shape: "circle",
|
|
844
|
+
severity: "high",
|
|
845
|
+
label: "Rejected"
|
|
846
|
+
},
|
|
847
|
+
cancelled: {
|
|
848
|
+
color: n.cancelled.fg,
|
|
849
|
+
backgroundColor: n.cancelled.bg,
|
|
850
|
+
icon: "close",
|
|
851
|
+
shape: "circle",
|
|
852
|
+
severity: "neutral",
|
|
853
|
+
label: "Cancelled"
|
|
854
|
+
},
|
|
855
|
+
// Medium Attention - Orange/Yellow
|
|
856
|
+
warning: {
|
|
857
|
+
color: n.warning.fg,
|
|
858
|
+
backgroundColor: n.warning.bg,
|
|
859
|
+
outlineColor: n.warning.outline,
|
|
860
|
+
icon: "warning",
|
|
861
|
+
shape: "triangle",
|
|
862
|
+
severity: "medium",
|
|
863
|
+
label: "Warning"
|
|
864
|
+
},
|
|
865
|
+
caution: {
|
|
866
|
+
color: n.caution.fg,
|
|
867
|
+
backgroundColor: n.caution.bg,
|
|
868
|
+
outlineColor: n.caution.outline,
|
|
869
|
+
icon: "warning",
|
|
870
|
+
shape: "triangle",
|
|
871
|
+
severity: "medium",
|
|
872
|
+
label: "Caution"
|
|
873
|
+
},
|
|
874
|
+
pending: {
|
|
875
|
+
color: n.pending.fg,
|
|
876
|
+
backgroundColor: n.pending.bg,
|
|
877
|
+
outlineColor: n.pending.outline,
|
|
878
|
+
icon: "clock",
|
|
879
|
+
shape: "circle",
|
|
880
|
+
severity: "medium",
|
|
881
|
+
label: "Pending"
|
|
882
|
+
},
|
|
883
|
+
"in-progress": {
|
|
884
|
+
color: n.inProgress.fg,
|
|
885
|
+
backgroundColor: n.inProgress.bg,
|
|
886
|
+
icon: "refresh",
|
|
887
|
+
shape: "circle",
|
|
888
|
+
severity: "medium",
|
|
889
|
+
label: "In Progress"
|
|
890
|
+
},
|
|
891
|
+
running: {
|
|
892
|
+
color: n.running.fg,
|
|
893
|
+
backgroundColor: n.running.bg,
|
|
894
|
+
icon: "play",
|
|
895
|
+
shape: "circle",
|
|
896
|
+
severity: "medium",
|
|
897
|
+
label: "Running"
|
|
898
|
+
},
|
|
899
|
+
// Low Attention - Green
|
|
900
|
+
success: {
|
|
901
|
+
color: n.success.fg,
|
|
902
|
+
backgroundColor: n.success.bg,
|
|
903
|
+
icon: "check-circle",
|
|
904
|
+
shape: "circle",
|
|
905
|
+
severity: "low",
|
|
906
|
+
label: "Success"
|
|
907
|
+
},
|
|
908
|
+
complete: {
|
|
909
|
+
color: n.complete.fg,
|
|
910
|
+
backgroundColor: n.complete.bg,
|
|
911
|
+
icon: "check",
|
|
912
|
+
shape: "circle",
|
|
913
|
+
severity: "low",
|
|
914
|
+
label: "Complete"
|
|
915
|
+
},
|
|
916
|
+
approved: {
|
|
917
|
+
color: n.approved.fg,
|
|
918
|
+
backgroundColor: n.approved.bg,
|
|
919
|
+
icon: "check-circle",
|
|
920
|
+
shape: "circle",
|
|
921
|
+
severity: "low",
|
|
922
|
+
label: "Approved"
|
|
923
|
+
},
|
|
924
|
+
active: {
|
|
925
|
+
color: n.active.fg,
|
|
926
|
+
backgroundColor: n.active.bg,
|
|
927
|
+
icon: "check",
|
|
928
|
+
shape: "circle",
|
|
929
|
+
severity: "low",
|
|
930
|
+
label: "Active"
|
|
931
|
+
},
|
|
932
|
+
enabled: {
|
|
933
|
+
color: n.enabled.fg,
|
|
934
|
+
backgroundColor: n.enabled.bg,
|
|
935
|
+
icon: "check",
|
|
936
|
+
shape: "circle",
|
|
937
|
+
severity: "low",
|
|
938
|
+
label: "Enabled"
|
|
939
|
+
},
|
|
940
|
+
// Informational - Blue
|
|
941
|
+
info: {
|
|
942
|
+
color: n.info.fg,
|
|
943
|
+
backgroundColor: n.info.bg,
|
|
944
|
+
icon: "info",
|
|
945
|
+
shape: "circle",
|
|
946
|
+
severity: "info",
|
|
947
|
+
label: "Info"
|
|
948
|
+
},
|
|
949
|
+
new: {
|
|
950
|
+
color: n.new.fg,
|
|
951
|
+
backgroundColor: n.new.bg,
|
|
952
|
+
icon: "star",
|
|
953
|
+
shape: "circle",
|
|
954
|
+
severity: "info",
|
|
955
|
+
label: "New"
|
|
956
|
+
},
|
|
957
|
+
updated: {
|
|
958
|
+
color: n.updated.fg,
|
|
959
|
+
backgroundColor: n.updated.bg,
|
|
960
|
+
icon: "refresh",
|
|
961
|
+
shape: "circle",
|
|
962
|
+
severity: "info",
|
|
963
|
+
label: "Updated"
|
|
964
|
+
},
|
|
965
|
+
// Neutral - Gray
|
|
966
|
+
draft: {
|
|
967
|
+
color: n.draft.fg,
|
|
968
|
+
backgroundColor: n.draft.bg,
|
|
969
|
+
icon: "edit",
|
|
970
|
+
shape: "circle",
|
|
971
|
+
severity: "neutral",
|
|
972
|
+
label: "Draft"
|
|
973
|
+
},
|
|
974
|
+
inactive: {
|
|
975
|
+
color: n.inactive.fg,
|
|
976
|
+
backgroundColor: n.inactive.bg,
|
|
977
|
+
icon: "remove",
|
|
978
|
+
shape: "circle",
|
|
979
|
+
severity: "neutral",
|
|
980
|
+
label: "Inactive"
|
|
981
|
+
},
|
|
982
|
+
disabled: {
|
|
983
|
+
color: n.disabled.fg,
|
|
984
|
+
backgroundColor: n.disabled.bg,
|
|
985
|
+
icon: "close",
|
|
986
|
+
shape: "circle",
|
|
987
|
+
severity: "neutral",
|
|
988
|
+
label: "Disabled"
|
|
989
|
+
},
|
|
990
|
+
unknown: {
|
|
991
|
+
color: n.unknown.fg,
|
|
992
|
+
backgroundColor: n.unknown.bg,
|
|
993
|
+
icon: "help",
|
|
994
|
+
shape: "circle",
|
|
995
|
+
severity: "neutral",
|
|
996
|
+
label: "Unknown"
|
|
997
|
+
},
|
|
998
|
+
// Special - Purple
|
|
999
|
+
beta: {
|
|
1000
|
+
color: n.beta.fg,
|
|
1001
|
+
backgroundColor: n.beta.bg,
|
|
1002
|
+
icon: "zap",
|
|
1003
|
+
shape: "diamond",
|
|
1004
|
+
severity: "info",
|
|
1005
|
+
label: "Beta"
|
|
1006
|
+
},
|
|
1007
|
+
experimental: {
|
|
1008
|
+
color: n.experimental.fg,
|
|
1009
|
+
backgroundColor: n.experimental.bg,
|
|
1010
|
+
icon: "code",
|
|
1011
|
+
shape: "diamond",
|
|
1012
|
+
severity: "info",
|
|
1013
|
+
label: "Experimental"
|
|
1014
|
+
}
|
|
1015
|
+
}, P = {
|
|
1016
|
+
small: { icon: 16, shape: 8, fontSize: "0.75rem", dotSize: 8 },
|
|
1017
|
+
medium: { icon: 20, shape: 10, fontSize: "0.875rem", dotSize: 10 },
|
|
1018
|
+
large: { icon: 24, shape: 12, fontSize: "1rem", dotSize: 12 }
|
|
1019
|
+
}, Xe = ({ size: t, color: r, outline: i }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", children: /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "7", fill: r, stroke: i, strokeWidth: i ? 1.5 : 0 }) }), Ye = ({ size: t, color: r, outline: i }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", children: /* @__PURE__ */ e("rect", { x: "2", y: "2", width: "12", height: "12", rx: "2", fill: r, stroke: i, strokeWidth: i ? 1.5 : 0 }) }), ei = ({ size: t, color: r, outline: i }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", children: /* @__PURE__ */ e(
|
|
1020
|
+
"rect",
|
|
1021
|
+
{
|
|
1022
|
+
x: "3",
|
|
1023
|
+
y: "3",
|
|
1024
|
+
width: "10",
|
|
1025
|
+
height: "10",
|
|
1026
|
+
rx: "1",
|
|
1027
|
+
fill: r,
|
|
1028
|
+
stroke: i,
|
|
1029
|
+
strokeWidth: i ? 1.5 : 0,
|
|
1030
|
+
transform: "rotate(45 8 8)"
|
|
1031
|
+
}
|
|
1032
|
+
) }), ii = ({ size: t, color: r, outline: i }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", children: /* @__PURE__ */ e(
|
|
1033
|
+
"path",
|
|
1034
|
+
{
|
|
1035
|
+
d: "M8 2L14 14H2L8 2Z",
|
|
1036
|
+
fill: r,
|
|
1037
|
+
stroke: i,
|
|
1038
|
+
strokeWidth: i ? 1.5 : 0,
|
|
1039
|
+
strokeLinejoin: "round"
|
|
1040
|
+
}
|
|
1041
|
+
) }), ti = ({ size: t, color: r, outline: i }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", children: /* @__PURE__ */ e(
|
|
1042
|
+
"polygon",
|
|
1043
|
+
{
|
|
1044
|
+
points: "8,1 14,4.5 14,11.5 8,15 2,11.5 2,4.5",
|
|
1045
|
+
fill: r,
|
|
1046
|
+
stroke: i,
|
|
1047
|
+
strokeWidth: i ? 1.5 : 0
|
|
1048
|
+
}
|
|
1049
|
+
) }), X = {
|
|
1050
|
+
circle: Xe,
|
|
1051
|
+
square: Ye,
|
|
1052
|
+
diamond: ei,
|
|
1053
|
+
triangle: ii,
|
|
1054
|
+
hexagon: ti
|
|
1055
|
+
}, ri = (t, r, i, o, c, a) => {
|
|
1056
|
+
const l = W[t], d = P[r];
|
|
1057
|
+
return c ? /* @__PURE__ */ f(z, { direction: "row", alignItems: "center", spacing: 1, sx: a, role: "status", children: [
|
|
1058
|
+
/* @__PURE__ */ e(
|
|
1059
|
+
T,
|
|
1060
|
+
{
|
|
1061
|
+
name: l.icon,
|
|
1062
|
+
size: r,
|
|
1063
|
+
sx: { color: l.backgroundColor },
|
|
1064
|
+
"aria-hidden": "true"
|
|
1065
|
+
}
|
|
1066
|
+
),
|
|
1067
|
+
o && /* @__PURE__ */ e(k, { variant: "body2", sx: { fontSize: d.fontSize }, children: i })
|
|
1068
|
+
] }) : /* @__PURE__ */ f(z, { direction: "row", alignItems: "center", spacing: 1, sx: a, role: "status", children: [
|
|
1069
|
+
/* @__PURE__ */ e(
|
|
1070
|
+
v,
|
|
1071
|
+
{
|
|
1072
|
+
sx: {
|
|
1073
|
+
display: "flex",
|
|
1074
|
+
alignItems: "center",
|
|
1075
|
+
justifyContent: "center",
|
|
1076
|
+
width: d.icon + 8,
|
|
1077
|
+
height: d.icon + 8,
|
|
1078
|
+
borderRadius: `${L.borders.radius.circle}px`,
|
|
1079
|
+
// Perfect circle
|
|
1080
|
+
backgroundColor: l.backgroundColor,
|
|
1081
|
+
color: l.color
|
|
1082
|
+
},
|
|
1083
|
+
"aria-hidden": "true",
|
|
1084
|
+
children: /* @__PURE__ */ e(T, { name: l.icon, size: r === "large" ? "medium" : "small" })
|
|
1085
|
+
}
|
|
1086
|
+
),
|
|
1087
|
+
o && /* @__PURE__ */ e(k, { variant: "body2", sx: { fontSize: d.fontSize }, children: i })
|
|
1088
|
+
] });
|
|
1089
|
+
}, oi = (t, r, i, o, c, a, l) => {
|
|
1090
|
+
const d = W[t], g = P[r], u = c || d.shape, s = X[u];
|
|
1091
|
+
return /* @__PURE__ */ f(z, { direction: "row", alignItems: "center", spacing: 1, sx: l, role: "status", children: [
|
|
1092
|
+
/* @__PURE__ */ e(v, { "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
1093
|
+
s,
|
|
1094
|
+
{
|
|
1095
|
+
size: g.shape * 1.6,
|
|
1096
|
+
color: d.backgroundColor,
|
|
1097
|
+
outline: a ? d.outlineColor : void 0
|
|
1098
|
+
}
|
|
1099
|
+
) }),
|
|
1100
|
+
o && /* @__PURE__ */ e(k, { variant: "body2", sx: { fontSize: g.fontSize }, children: i })
|
|
1101
|
+
] });
|
|
1102
|
+
}, ni = (t, r, i, o) => {
|
|
1103
|
+
const c = W[t], a = P[r];
|
|
1104
|
+
return /* @__PURE__ */ e(
|
|
1105
|
+
v,
|
|
1106
|
+
{
|
|
1107
|
+
role: "status",
|
|
1108
|
+
"aria-label": c.label,
|
|
1109
|
+
sx: {
|
|
1110
|
+
width: a.dotSize,
|
|
1111
|
+
height: a.dotSize,
|
|
1112
|
+
borderRadius: `${L.borders.radius.circle}px`,
|
|
1113
|
+
// Perfect circle
|
|
1114
|
+
backgroundColor: c.backgroundColor,
|
|
1115
|
+
flexShrink: 0,
|
|
1116
|
+
...i && {
|
|
1117
|
+
animation: "statusPulse 2s infinite",
|
|
1118
|
+
"@keyframes statusPulse": {
|
|
1119
|
+
"0%": { boxShadow: `0 0 0 0 ${c.backgroundColor}80` },
|
|
1120
|
+
"70%": { boxShadow: `0 0 0 ${a.dotSize}px transparent` },
|
|
1121
|
+
"100%": { boxShadow: "0 0 0 0 transparent" }
|
|
1122
|
+
}
|
|
1123
|
+
},
|
|
1124
|
+
...o
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
);
|
|
1128
|
+
}, li = (t, r, i, o, c, a, l) => {
|
|
1129
|
+
const d = W[t];
|
|
1130
|
+
return /* @__PURE__ */ e(
|
|
1131
|
+
ve,
|
|
1132
|
+
{
|
|
1133
|
+
label: i,
|
|
1134
|
+
size: r,
|
|
1135
|
+
icon: o ? /* @__PURE__ */ e(T, { name: d.icon, size: "small", "aria-hidden": "true" }) : void 0,
|
|
1136
|
+
onClick: c,
|
|
1137
|
+
onDelete: a,
|
|
1138
|
+
role: "status",
|
|
1139
|
+
sx: {
|
|
1140
|
+
backgroundColor: `${d.backgroundColor}20`,
|
|
1141
|
+
color: d.backgroundColor,
|
|
1142
|
+
borderColor: d.backgroundColor,
|
|
1143
|
+
"& .MuiChip-icon": {
|
|
1144
|
+
color: d.backgroundColor
|
|
1145
|
+
},
|
|
1146
|
+
"& .MuiChip-deleteIcon": {
|
|
1147
|
+
color: d.backgroundColor,
|
|
1148
|
+
"&:hover": {
|
|
1149
|
+
color: d.backgroundColor
|
|
1150
|
+
}
|
|
1151
|
+
},
|
|
1152
|
+
...l
|
|
1153
|
+
},
|
|
1154
|
+
variant: "outlined"
|
|
1155
|
+
}
|
|
1156
|
+
);
|
|
1157
|
+
}, ci = (t, r, i, o, c, a) => {
|
|
1158
|
+
const l = W[t], d = P[r];
|
|
1159
|
+
return /* @__PURE__ */ f(z, { direction: "row", alignItems: "center", spacing: 1, sx: a, role: "status", children: [
|
|
1160
|
+
o && /* @__PURE__ */ e(
|
|
1161
|
+
v,
|
|
1162
|
+
{
|
|
1163
|
+
"aria-hidden": "true",
|
|
1164
|
+
sx: {
|
|
1165
|
+
width: d.dotSize,
|
|
1166
|
+
height: d.dotSize,
|
|
1167
|
+
borderRadius: `${L.borders.radius.circle}px`,
|
|
1168
|
+
// Perfect circle
|
|
1169
|
+
backgroundColor: l.backgroundColor,
|
|
1170
|
+
flexShrink: 0
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
),
|
|
1174
|
+
c && !o && /* @__PURE__ */ e(
|
|
1175
|
+
T,
|
|
1176
|
+
{
|
|
1177
|
+
name: l.icon,
|
|
1178
|
+
size: r === "large" ? "medium" : "small",
|
|
1179
|
+
sx: { color: l.backgroundColor },
|
|
1180
|
+
"aria-hidden": "true"
|
|
1181
|
+
}
|
|
1182
|
+
),
|
|
1183
|
+
/* @__PURE__ */ e(
|
|
1184
|
+
k,
|
|
1185
|
+
{
|
|
1186
|
+
variant: "body2",
|
|
1187
|
+
sx: {
|
|
1188
|
+
fontSize: d.fontSize,
|
|
1189
|
+
color: l.backgroundColor,
|
|
1190
|
+
fontWeight: 500
|
|
1191
|
+
},
|
|
1192
|
+
children: i
|
|
1193
|
+
}
|
|
1194
|
+
)
|
|
1195
|
+
] });
|
|
1196
|
+
}, ai = (t, r, i, o, c, a, l) => {
|
|
1197
|
+
const d = W[t];
|
|
1198
|
+
return /* @__PURE__ */ e(
|
|
1199
|
+
ke,
|
|
1200
|
+
{
|
|
1201
|
+
badgeContent: o ? void 0 : i,
|
|
1202
|
+
max: c,
|
|
1203
|
+
variant: o ? "dot" : "standard",
|
|
1204
|
+
invisible: a,
|
|
1205
|
+
sx: {
|
|
1206
|
+
"& .MuiBadge-badge": {
|
|
1207
|
+
backgroundColor: d.backgroundColor,
|
|
1208
|
+
color: d.color,
|
|
1209
|
+
fontSize: "0.7rem",
|
|
1210
|
+
minWidth: o ? 8 : 18,
|
|
1211
|
+
height: o ? 8 : 18,
|
|
1212
|
+
padding: o ? 0 : "0 4px"
|
|
1213
|
+
},
|
|
1214
|
+
...l
|
|
1215
|
+
},
|
|
1216
|
+
children: r
|
|
1217
|
+
}
|
|
1218
|
+
);
|
|
1219
|
+
}, si = (t, r, i, o, c, a, l, d, g) => {
|
|
1220
|
+
const u = P[r], s = t >= 0, I = a !== !1 ? s ? l || "#24a148" : d || "#da1e28" : "inherit", y = () => {
|
|
1221
|
+
const D = Math.abs(t), M = s ? "+" : "-";
|
|
1222
|
+
return o ? `${M}${o}${D.toLocaleString()}` : i ? `${M}${D}%` : `${M}${D.toLocaleString()}`;
|
|
1223
|
+
};
|
|
1224
|
+
return /* @__PURE__ */ f(
|
|
1225
|
+
z,
|
|
1226
|
+
{
|
|
1227
|
+
direction: "row",
|
|
1228
|
+
alignItems: "center",
|
|
1229
|
+
spacing: 0.5,
|
|
1230
|
+
sx: { color: I, ...g },
|
|
1231
|
+
role: "status",
|
|
1232
|
+
"aria-label": `${s ? "Increased" : "Decreased"} by ${y()}`,
|
|
1233
|
+
children: [
|
|
1234
|
+
c !== !1 && /* @__PURE__ */ e(
|
|
1235
|
+
T,
|
|
1236
|
+
{
|
|
1237
|
+
name: s ? "trending-up" : "trending-down",
|
|
1238
|
+
size: r === "large" ? "medium" : "small",
|
|
1239
|
+
"aria-hidden": "true"
|
|
1240
|
+
}
|
|
1241
|
+
),
|
|
1242
|
+
/* @__PURE__ */ e(
|
|
1243
|
+
k,
|
|
1244
|
+
{
|
|
1245
|
+
variant: "body2",
|
|
1246
|
+
sx: {
|
|
1247
|
+
fontSize: u.fontSize,
|
|
1248
|
+
fontWeight: 500,
|
|
1249
|
+
fontFamily: "monospace"
|
|
1250
|
+
},
|
|
1251
|
+
children: y()
|
|
1252
|
+
}
|
|
1253
|
+
)
|
|
1254
|
+
]
|
|
1255
|
+
}
|
|
1256
|
+
);
|
|
1257
|
+
}, zi = (t) => {
|
|
1258
|
+
const {
|
|
1259
|
+
variant: r = "icon",
|
|
1260
|
+
status: i = "info",
|
|
1261
|
+
size: o = "medium",
|
|
1262
|
+
label: c,
|
|
1263
|
+
showLabel: a = !0,
|
|
1264
|
+
sx: l,
|
|
1265
|
+
"aria-label": d
|
|
1266
|
+
} = t, g = W[i], u = c || g.label;
|
|
1267
|
+
switch (r) {
|
|
1268
|
+
case "icon":
|
|
1269
|
+
case void 0:
|
|
1270
|
+
return ri(
|
|
1271
|
+
i,
|
|
1272
|
+
o,
|
|
1273
|
+
u,
|
|
1274
|
+
a,
|
|
1275
|
+
t.iconOnly || !1,
|
|
1276
|
+
l
|
|
1277
|
+
);
|
|
1278
|
+
case "shape": {
|
|
1279
|
+
const s = t;
|
|
1280
|
+
return oi(
|
|
1281
|
+
i,
|
|
1282
|
+
o,
|
|
1283
|
+
u,
|
|
1284
|
+
a,
|
|
1285
|
+
s.shape,
|
|
1286
|
+
s.showOutline ?? !0,
|
|
1287
|
+
l
|
|
1288
|
+
);
|
|
1289
|
+
}
|
|
1290
|
+
case "dot":
|
|
1291
|
+
return ni(i, o, t.pulse || !1, l);
|
|
1292
|
+
case "chip": {
|
|
1293
|
+
const s = t;
|
|
1294
|
+
return li(
|
|
1295
|
+
i,
|
|
1296
|
+
o === "large" ? "medium" : o,
|
|
1297
|
+
u,
|
|
1298
|
+
s.showIcon ?? !0,
|
|
1299
|
+
s.onClick,
|
|
1300
|
+
s.onDelete,
|
|
1301
|
+
l
|
|
1302
|
+
);
|
|
1303
|
+
}
|
|
1304
|
+
case "inline": {
|
|
1305
|
+
const s = t;
|
|
1306
|
+
return ci(
|
|
1307
|
+
i,
|
|
1308
|
+
o,
|
|
1309
|
+
u,
|
|
1310
|
+
s.showDot ?? !0,
|
|
1311
|
+
s.showIcon ?? !1,
|
|
1312
|
+
l
|
|
1313
|
+
);
|
|
1314
|
+
}
|
|
1315
|
+
case "badge": {
|
|
1316
|
+
const s = t;
|
|
1317
|
+
return ai(
|
|
1318
|
+
i,
|
|
1319
|
+
s.children,
|
|
1320
|
+
s.count,
|
|
1321
|
+
s.dot,
|
|
1322
|
+
s.max ?? 999,
|
|
1323
|
+
s.invisible,
|
|
1324
|
+
l
|
|
1325
|
+
);
|
|
1326
|
+
}
|
|
1327
|
+
case "differential": {
|
|
1328
|
+
const s = t;
|
|
1329
|
+
return si(
|
|
1330
|
+
s.value,
|
|
1331
|
+
o,
|
|
1332
|
+
s.percentage || !1,
|
|
1333
|
+
s.currency,
|
|
1334
|
+
s.showIcon,
|
|
1335
|
+
s.showColor,
|
|
1336
|
+
s.positiveColor,
|
|
1337
|
+
s.negativeColor,
|
|
1338
|
+
l
|
|
1339
|
+
);
|
|
1340
|
+
}
|
|
1341
|
+
default:
|
|
1342
|
+
return null;
|
|
1343
|
+
}
|
|
1344
|
+
}, di = ({
|
|
1345
|
+
status: t,
|
|
1346
|
+
size: r = "medium",
|
|
1347
|
+
pulse: i = !1,
|
|
1348
|
+
sx: o
|
|
1349
|
+
}) => {
|
|
1350
|
+
const c = W[t], a = P[r];
|
|
1351
|
+
return /* @__PURE__ */ e(
|
|
1352
|
+
v,
|
|
1353
|
+
{
|
|
1354
|
+
sx: {
|
|
1355
|
+
width: a.dotSize,
|
|
1356
|
+
height: a.dotSize,
|
|
1357
|
+
borderRadius: `${L.borders.radius.circle}px`,
|
|
1358
|
+
// Perfect circle
|
|
1359
|
+
backgroundColor: c.backgroundColor,
|
|
1360
|
+
...i && {
|
|
1361
|
+
animation: "pulse 2s infinite",
|
|
1362
|
+
"@keyframes pulse": {
|
|
1363
|
+
"0%": { boxShadow: `0 0 0 0 ${c.backgroundColor}80` },
|
|
1364
|
+
"70%": { boxShadow: `0 0 0 ${a.dotSize}px transparent` },
|
|
1365
|
+
"100%": { boxShadow: "0 0 0 0 transparent" }
|
|
1366
|
+
}
|
|
1367
|
+
},
|
|
1368
|
+
...o
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
);
|
|
1372
|
+
}, Di = ({
|
|
1373
|
+
items: t,
|
|
1374
|
+
variant: r = "dot",
|
|
1375
|
+
direction: i = "row",
|
|
1376
|
+
size: o = "small",
|
|
1377
|
+
sx: c
|
|
1378
|
+
}) => {
|
|
1379
|
+
const a = P[o];
|
|
1380
|
+
return /* @__PURE__ */ e(
|
|
1381
|
+
z,
|
|
1382
|
+
{
|
|
1383
|
+
direction: i,
|
|
1384
|
+
spacing: i === "row" ? 3 : 1,
|
|
1385
|
+
flexWrap: "wrap",
|
|
1386
|
+
useFlexGap: !0,
|
|
1387
|
+
sx: c,
|
|
1388
|
+
children: t.map((l, d) => {
|
|
1389
|
+
const g = W[l.status], u = l.label || g.label;
|
|
1390
|
+
return /* @__PURE__ */ f(z, { direction: "row", alignItems: "center", spacing: 1, children: [
|
|
1391
|
+
r === "icon" && /* @__PURE__ */ e(
|
|
1392
|
+
v,
|
|
1393
|
+
{
|
|
1394
|
+
sx: {
|
|
1395
|
+
display: "flex",
|
|
1396
|
+
alignItems: "center",
|
|
1397
|
+
justifyContent: "center",
|
|
1398
|
+
width: a.icon + 4,
|
|
1399
|
+
height: a.icon + 4,
|
|
1400
|
+
borderRadius: `${L.borders.radius.circle}px`,
|
|
1401
|
+
// Perfect circle
|
|
1402
|
+
backgroundColor: g.backgroundColor,
|
|
1403
|
+
color: g.color
|
|
1404
|
+
},
|
|
1405
|
+
children: /* @__PURE__ */ e(T, { name: g.icon, size: "small" })
|
|
1406
|
+
}
|
|
1407
|
+
),
|
|
1408
|
+
r === "shape" && (() => {
|
|
1409
|
+
const s = X[g.shape];
|
|
1410
|
+
return /* @__PURE__ */ e(
|
|
1411
|
+
s,
|
|
1412
|
+
{
|
|
1413
|
+
size: a.shape * 1.4,
|
|
1414
|
+
color: g.backgroundColor,
|
|
1415
|
+
outline: g.outlineColor
|
|
1416
|
+
}
|
|
1417
|
+
);
|
|
1418
|
+
})(),
|
|
1419
|
+
r === "dot" && /* @__PURE__ */ e(di, { status: l.status, size: o }),
|
|
1420
|
+
/* @__PURE__ */ f(k, { variant: "body2", sx: { fontSize: a.fontSize }, children: [
|
|
1421
|
+
u,
|
|
1422
|
+
l.count !== void 0 && /* @__PURE__ */ f(
|
|
1423
|
+
k,
|
|
1424
|
+
{
|
|
1425
|
+
component: "span",
|
|
1426
|
+
sx: {
|
|
1427
|
+
ml: 0.5,
|
|
1428
|
+
color: "text.secondary",
|
|
1429
|
+
fontSize: a.fontSize
|
|
1430
|
+
},
|
|
1431
|
+
children: [
|
|
1432
|
+
"(",
|
|
1433
|
+
l.count,
|
|
1434
|
+
")"
|
|
1435
|
+
]
|
|
1436
|
+
}
|
|
1437
|
+
)
|
|
1438
|
+
] })
|
|
1439
|
+
] }, d);
|
|
1440
|
+
})
|
|
1441
|
+
}
|
|
1442
|
+
);
|
|
1443
|
+
};
|
|
1444
|
+
export {
|
|
1445
|
+
vi as C,
|
|
1446
|
+
Wi as I,
|
|
1447
|
+
Me as M,
|
|
1448
|
+
zi as S,
|
|
1449
|
+
Li as T,
|
|
1450
|
+
Ii as U,
|
|
1451
|
+
Ci as a,
|
|
1452
|
+
$e as b,
|
|
1453
|
+
Di as c,
|
|
1454
|
+
Si as u
|
|
1455
|
+
};
|