@elevasis/ui 1.19.0 → 1.20.1
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/api/index.js +2 -2
- package/dist/auth/index.js +3 -3
- package/dist/charts/index.css +14 -0
- package/dist/charts/index.js +8 -6
- package/dist/{chunk-7ATCF6UL.js → chunk-3DIU726S.js} +11 -4
- package/dist/chunk-4SY4EQSK.js +68 -0
- package/dist/{chunk-2Z7LYTIX.js → chunk-AQ5MQDSS.js} +30 -17
- package/dist/chunk-AWMZCYKH.js +639 -0
- package/dist/{chunk-BVNAC4SQ.js → chunk-C7AD6N23.js} +38 -48
- package/dist/{chunk-ZFCG5SHW.js → chunk-COTI2QPO.js} +1 -1
- package/dist/{chunk-WAPZN2U3.js → chunk-EMN755L5.js} +7 -41
- package/dist/{chunk-LBY7FVFD.js → chunk-ERVB3QJQ.js} +31 -715
- package/dist/chunk-GBMNCNHX.js +105 -0
- package/dist/{chunk-MBZDE6UT.js → chunk-IOKL7BKE.js} +9 -1
- package/dist/{chunk-35UWYH2A.js → chunk-JFRG2JJE.js} +8 -2
- package/dist/chunk-JIABC3AE.js +2622 -0
- package/dist/chunk-JZEXFQ6N.js +671 -0
- package/dist/chunk-LGKLC5MG.js +44 -0
- package/dist/chunk-MG3NF7QL.js +63 -0
- package/dist/{chunk-KBLGVZBD.js → chunk-NNKKBSJN.js} +2 -22
- package/dist/{chunk-JNBHUCKW.js → chunk-NVOCKXUQ.js} +1 -1
- package/dist/chunk-OFAXUZPZ.js +2411 -0
- package/dist/chunk-PDHTXPSF.js +12 -0
- package/dist/chunk-QJ2S46NI.js +23 -0
- package/dist/{chunk-NUULWBAD.js → chunk-R3R367QY.js} +1 -1
- package/dist/{chunk-UANJP5P7.js → chunk-R7WLWGPO.js} +5 -5
- package/dist/{chunk-CC3SDRIF.js → chunk-RWQIFKMJ.js} +1 -1
- package/dist/chunk-UMFPUM7Q.js +1281 -0
- package/dist/{chunk-KNJKCD73.js → chunk-VLTVZXP6.js} +4 -4
- package/dist/chunk-WWEMNIHW.js +37 -0
- package/dist/{chunk-UTWJZEOJ.js → chunk-XOTN3X3Z.js} +3 -3
- package/dist/components/index.css +14 -0
- package/dist/components/index.d.ts +41 -7
- package/dist/components/index.js +564 -5023
- package/dist/components/navigation/index.js +2 -63
- package/dist/features/auth/index.css +579 -0
- package/dist/features/auth/index.d.ts +2557 -0
- package/dist/features/auth/index.js +125 -0
- package/dist/features/dashboard/index.css +579 -0
- package/dist/features/dashboard/index.d.ts +244 -0
- package/dist/features/dashboard/index.js +650 -0
- package/dist/features/monitoring/index.css +579 -0
- package/dist/features/monitoring/index.d.ts +121 -0
- package/dist/features/monitoring/index.js +538 -0
- package/dist/features/operations/index.css +14 -0
- package/dist/features/operations/index.d.ts +1675 -2
- package/dist/features/operations/index.js +2148 -28
- package/dist/features/settings/index.css +579 -0
- package/dist/features/settings/index.d.ts +2589 -0
- package/dist/features/settings/index.js +1437 -0
- package/dist/hooks/index.css +14 -0
- package/dist/hooks/index.d.ts +29 -11
- package/dist/hooks/index.js +13 -13
- package/dist/hooks/published.css +14 -0
- package/dist/hooks/published.d.ts +29 -11
- package/dist/hooks/published.js +12 -12
- package/dist/index.css +14 -0
- package/dist/index.d.ts +41 -12
- package/dist/index.js +15 -15
- package/dist/initialization/index.js +2 -2
- package/dist/layout/index.d.ts +7 -1
- package/dist/layout/index.js +7 -5
- package/dist/organization/index.js +2 -2
- package/dist/provider/index.css +14 -0
- package/dist/provider/index.d.ts +1 -1
- package/dist/provider/index.js +10 -10
- package/dist/provider/published.d.ts +1 -1
- package/dist/provider/published.js +6 -6
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.js +3 -3
- package/dist/theme/presets/__tests__/getPreset.test.d.ts +2 -0
- package/dist/theme/presets/__tests__/getPreset.test.d.ts.map +1 -0
- package/dist/theme/presets/__tests__/getPreset.test.js +92 -0
- package/dist/theme/presets/cyber-volt.d.ts +12 -0
- package/dist/theme/presets/cyber-volt.d.ts.map +1 -0
- package/dist/theme/presets/cyber-volt.js +70 -0
- package/dist/theme/presets/regal.d.ts +8 -0
- package/dist/theme/presets/regal.d.ts.map +1 -0
- package/dist/theme/presets/regal.js +69 -0
- package/dist/theme/presets/rose-gold.d.ts +12 -0
- package/dist/theme/presets/rose-gold.d.ts.map +1 -0
- package/dist/theme/presets/rose-gold.js +76 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.d.ts +12 -1
- package/dist/utils/index.js +1 -1
- package/dist/zustand/index.d.ts +80 -0
- package/dist/zustand/index.js +105 -0
- package/package.json +55 -4
- package/dist/chunk-2YW3LDFT.js +0 -1542
- package/dist/theme/presets/cyber-void.d.ts +0 -12
- package/dist/theme/presets/cyber-void.d.ts.map +0 -1
- package/dist/theme/presets/cyber-void.js +0 -75
- package/dist/{chunk-DVKEEY5J.js → chunk-TUXTSEAF.js} +1 -1
- package/dist/{chunk-U2522LSW.js → chunk-V7XHGJQZ.js} +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Box, Text } from '@mantine/core';
|
|
2
|
+
import { AreaChart } from '@mantine/charts';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
// src/components/monitoring/ResourceHealthChart.tsx
|
|
6
|
+
function getHealthColor(successRate, hasExecutions = true) {
|
|
7
|
+
if (!hasExecutions) return "var(--mantine-color-gray-6)";
|
|
8
|
+
if (successRate >= 95) return "var(--color-success)";
|
|
9
|
+
if (successRate >= 80) return "var(--color-warning)";
|
|
10
|
+
return "var(--color-error)";
|
|
11
|
+
}
|
|
12
|
+
function ResourceHealthChart({
|
|
13
|
+
healthData,
|
|
14
|
+
hasExecutions = true,
|
|
15
|
+
width = 300,
|
|
16
|
+
height = 60
|
|
17
|
+
}) {
|
|
18
|
+
if (!healthData || healthData.trendData.length === 0) {
|
|
19
|
+
return /* @__PURE__ */ jsx(Box, { w: width, h: height, style: { display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "No activity" }) });
|
|
20
|
+
}
|
|
21
|
+
const chartData = healthData.trendData.map((d) => ({
|
|
22
|
+
time: d.time,
|
|
23
|
+
rate: d.rate
|
|
24
|
+
}));
|
|
25
|
+
const chartColor = getHealthColor(healthData.summary.successRate, hasExecutions);
|
|
26
|
+
return /* @__PURE__ */ jsx(Box, { w: width, h: height, children: /* @__PURE__ */ jsx(
|
|
27
|
+
AreaChart,
|
|
28
|
+
{
|
|
29
|
+
h: height,
|
|
30
|
+
data: chartData,
|
|
31
|
+
dataKey: "time",
|
|
32
|
+
series: [{ name: "rate", color: chartColor }],
|
|
33
|
+
curveType: "monotone",
|
|
34
|
+
withDots: false,
|
|
35
|
+
withTooltip: false,
|
|
36
|
+
withXAxis: false,
|
|
37
|
+
withYAxis: false,
|
|
38
|
+
fillOpacity: 0.2,
|
|
39
|
+
gridAxis: "none"
|
|
40
|
+
}
|
|
41
|
+
) });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { ResourceHealthChart, getHealthColor };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
|
|
4
|
+
var useBreadcrumbs = (options = {}) => {
|
|
5
|
+
const { currentPath } = useRouterContext();
|
|
6
|
+
const { navItems = [] } = options;
|
|
7
|
+
return useMemo(() => {
|
|
8
|
+
const segments = currentPath.split("/").filter(Boolean);
|
|
9
|
+
if (segments.length === 0) {
|
|
10
|
+
return [{ label: "Dashboard", isActive: true }];
|
|
11
|
+
}
|
|
12
|
+
const breadcrumbs = [{ label: "Dashboard", path: "/" }];
|
|
13
|
+
let currentSegmentPath = "";
|
|
14
|
+
for (let i = 0; i < segments.length; i++) {
|
|
15
|
+
currentSegmentPath += `/${segments[i]}`;
|
|
16
|
+
const isLast = i === segments.length - 1;
|
|
17
|
+
let label = formatSegmentLabel(segments[i]);
|
|
18
|
+
let matchedItem = null;
|
|
19
|
+
for (const navItem of navItems) {
|
|
20
|
+
if (navItem.link === currentSegmentPath) {
|
|
21
|
+
matchedItem = navItem;
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
if (navItem.links) {
|
|
25
|
+
for (const subItem of navItem.links) {
|
|
26
|
+
if (subItem.link === currentSegmentPath) {
|
|
27
|
+
if (i === 0 && subItem.label === "Overview") {
|
|
28
|
+
matchedItem = { label: navItem.label };
|
|
29
|
+
} else {
|
|
30
|
+
matchedItem = subItem;
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
if (subItem.links) {
|
|
35
|
+
for (const nestedLink of subItem.links) {
|
|
36
|
+
if (nestedLink.link === currentSegmentPath) {
|
|
37
|
+
matchedItem = nestedLink;
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (matchedItem) break;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (matchedItem) break;
|
|
46
|
+
}
|
|
47
|
+
if (matchedItem) {
|
|
48
|
+
label = matchedItem.label;
|
|
49
|
+
}
|
|
50
|
+
breadcrumbs.push({
|
|
51
|
+
label,
|
|
52
|
+
path: isLast ? void 0 : currentSegmentPath,
|
|
53
|
+
isActive: isLast
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return breadcrumbs;
|
|
57
|
+
}, [currentPath, navItems]);
|
|
58
|
+
};
|
|
59
|
+
function formatSegmentLabel(segment) {
|
|
60
|
+
return segment.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { useBreadcrumbs };
|
|
@@ -1,28 +1,8 @@
|
|
|
1
|
+
import { sidebarItemPadding, sidebarItemHeight, sidebarIconSize, sidebarIconStroke, sidebarIconInnerSize } from './chunk-QJ2S46NI.js';
|
|
1
2
|
import { UnstyledButton, Group, Box, ThemeIcon } from '@mantine/core';
|
|
2
3
|
import { IconChevronRight } from '@tabler/icons-react';
|
|
3
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
|
-
// src/components/layout/constants.ts
|
|
6
|
-
var sidebarWidth = 240;
|
|
7
|
-
var sidebarCollapsedWidth = 72;
|
|
8
|
-
var sidebarTransitionDuration = 200;
|
|
9
|
-
var sidebarHoverDelay = 100;
|
|
10
|
-
var topbarHeight = 54;
|
|
11
|
-
var sidebarBottomSectionHeight = 71;
|
|
12
|
-
var sidebarBottomSectionCollapsedHeight = 59;
|
|
13
|
-
var sidebarItemHeight = 42;
|
|
14
|
-
var sidebarItemPadding = 10;
|
|
15
|
-
var sidebarItemGap = 4;
|
|
16
|
-
var sidebarSectionPadding = "var(--mantine-spacing-sm)";
|
|
17
|
-
var sidebarSubLinkIndent = 44;
|
|
18
|
-
var sidebarIconSize = 24;
|
|
19
|
-
var sidebarIconStroke = 1.6;
|
|
20
|
-
var sidebarIconInnerSize = 20;
|
|
21
|
-
var sidebarToggleIconSize = 20;
|
|
22
|
-
var sidebarSubLinkPaddingY = 6;
|
|
23
|
-
var sidebarSubLinkPaddingX = 10;
|
|
24
|
-
var sidebarGroupChevronSize = 14;
|
|
25
|
-
var sidebarListItemIconSize = 14;
|
|
26
6
|
var NavigationButton = ({
|
|
27
7
|
icon: Icon,
|
|
28
8
|
label,
|
|
@@ -135,4 +115,4 @@ var NavigationButton = ({
|
|
|
135
115
|
);
|
|
136
116
|
};
|
|
137
117
|
|
|
138
|
-
export { NavigationButton
|
|
118
|
+
export { NavigationButton };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APIClientError } from './chunk-
|
|
1
|
+
import { APIClientError } from './chunk-IOKL7BKE.js';
|
|
2
2
|
import { OrganizationContext } from './chunk-DD3CCMCZ.js';
|
|
3
3
|
import { createContext, useContext, useMemo, useCallback } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|