@elevasis/ui 1.14.2 → 1.14.4

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.
@@ -73,7 +73,6 @@ function OrganizationProvider({ apiRequest, children }) {
73
73
  }
74
74
  setMemberships(data);
75
75
  if (data.length === 0) {
76
- setError("No organization memberships found. Please contact your administrator or try refreshing the page.");
77
76
  hasInitializedRef.current = true;
78
77
  return;
79
78
  }
@@ -1,9 +1,8 @@
1
1
  import { sidebarItemGap, sidebarSubLinkPaddingY, sidebarSubLinkPaddingX, sidebarSubLinkIndent, sidebarHoverDelay, sidebarTransitionDuration, sidebarCollapsedWidth, sidebarWidth, topbarHeight, sidebarToggleIconSize, sidebarSectionPadding, NavigationButton, sidebarGroupChevronSize, sidebarIconInnerSize, sidebarListItemIconSize } from './chunk-MYRCM7VD.js';
2
- import { ElevasisLoader } from './chunk-SZHARWKU.js';
3
2
  import { useAppearance } from './chunk-QJ2KCHKX.js';
4
3
  import { useRouterContext } from './chunk-Q7DJKLEN.js';
5
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
- import { Collapse, HoverCard, Stack, Group, Text, UnstyledButton, Tooltip, ScrollArea, Menu, Avatar, Container, Loader, Title, Button, Box, Center, useMantineColorScheme, Switch, Code } from '@mantine/core';
5
+ import { Collapse, HoverCard, Stack, Group, Text, UnstyledButton, Tooltip, ScrollArea, Menu, Avatar, Container, Title, Button, Box, Center, useMantineColorScheme, Switch, Code } from '@mantine/core';
7
6
  import { IconLayoutSidebarLeftExpand, IconLayoutSidebarLeftCollapse, IconUser, IconLogout, IconAlertCircle, IconChevronDown, IconChevronRight, IconMoonStars, IconSun } from '@tabler/icons-react';
8
7
  import { createContext, memo, useEffect, createElement, useContext, useState } from 'react';
9
8
 
@@ -110,7 +109,8 @@ var AppShellCenteredContainer = ({ children }) => {
110
109
  );
111
110
  };
112
111
  var AppShellLoader = () => {
113
- return /* @__PURE__ */ jsx(AppShellCenteredContainer, { children: /* @__PURE__ */ jsx(Loader, { size: "xl", loaders: { elevasis: ElevasisLoader }, type: "elevasis" }) });
112
+ const { loader } = useAppearance();
113
+ return /* @__PURE__ */ jsx(AppShellCenteredContainer, { children: loader });
114
114
  };
115
115
  var AppShellError = ({ message, retry }) => {
116
116
  return /* @__PURE__ */ jsxs(AppShellCenteredContainer, { children: [
@@ -1014,25 +1014,134 @@ var SubshellContentContainer = ({ children, className }) => {
1014
1014
  }
1015
1015
  );
1016
1016
  };
1017
- var SubshellSidebar = ({ children, className, width }) => {
1018
- return /* @__PURE__ */ jsx(
1019
- "aside",
1017
+ var SubshellSidebar = ({
1018
+ children,
1019
+ className,
1020
+ width,
1021
+ collapsible = true,
1022
+ defaultOpen = true
1023
+ }) => {
1024
+ const [isOpen, setIsOpen] = useState(defaultOpen);
1025
+ const effectiveWidth = collapsible && !isOpen ? 0 : width;
1026
+ if (!collapsible) {
1027
+ return /* @__PURE__ */ jsx(
1028
+ "aside",
1029
+ {
1030
+ className,
1031
+ style: {
1032
+ width: `${width}px`,
1033
+ flexShrink: 0,
1034
+ display: "flex",
1035
+ flexDirection: "column",
1036
+ backgroundColor: "var(--glass-background)",
1037
+ backdropFilter: "var(--glass-blur)",
1038
+ WebkitBackdropFilter: "var(--glass-blur)",
1039
+ borderRight: "1px solid var(--color-border)",
1040
+ minHeight: `calc(100vh - ${topbarHeight}px)`,
1041
+ marginTop: `${topbarHeight}px`,
1042
+ fontFamily: "var(--elevasis-font-family-subtitle)"
1043
+ },
1044
+ children
1045
+ }
1046
+ );
1047
+ }
1048
+ return /* @__PURE__ */ jsxs(
1049
+ "div",
1020
1050
  {
1021
- className,
1022
1051
  style: {
1023
- width: `${width}px`,
1052
+ position: "relative",
1024
1053
  flexShrink: 0,
1025
- display: "flex",
1026
- flexDirection: "column",
1027
- backgroundColor: "var(--glass-background)",
1028
- backdropFilter: "var(--glass-blur)",
1029
- WebkitBackdropFilter: "var(--glass-blur)",
1030
- borderRight: "1px solid var(--color-border)",
1031
- minHeight: `calc(100vh - ${topbarHeight}px)`,
1032
1054
  marginTop: `${topbarHeight}px`,
1033
- fontFamily: "var(--elevasis-font-family-subtitle)"
1055
+ minHeight: `calc(100vh - ${topbarHeight}px)`
1034
1056
  },
1035
- children
1057
+ children: [
1058
+ /* @__PURE__ */ jsx(
1059
+ "aside",
1060
+ {
1061
+ className,
1062
+ style: {
1063
+ width: `${effectiveWidth}px`,
1064
+ flexShrink: 0,
1065
+ display: "flex",
1066
+ flexDirection: "column",
1067
+ backgroundColor: "var(--glass-background)",
1068
+ backdropFilter: "var(--glass-blur)",
1069
+ WebkitBackdropFilter: "var(--glass-blur)",
1070
+ borderRight: isOpen ? "1px solid var(--color-border)" : "none",
1071
+ height: "100%",
1072
+ fontFamily: "var(--elevasis-font-family-subtitle)",
1073
+ overflow: "hidden",
1074
+ transition: `width ${sidebarTransitionDuration}ms var(--easing)`
1075
+ },
1076
+ children: /* @__PURE__ */ jsx(
1077
+ "div",
1078
+ {
1079
+ style: {
1080
+ width: `${width}px`,
1081
+ flexShrink: 0,
1082
+ display: "flex",
1083
+ flexDirection: "column",
1084
+ opacity: isOpen ? 1 : 0,
1085
+ transition: `opacity var(--duration-fast) var(--easing)`
1086
+ },
1087
+ children
1088
+ }
1089
+ )
1090
+ }
1091
+ ),
1092
+ /* @__PURE__ */ jsx(
1093
+ "button",
1094
+ {
1095
+ onClick: () => setIsOpen((prev) => !prev),
1096
+ style: {
1097
+ position: "absolute",
1098
+ right: 0,
1099
+ bottom: "12px",
1100
+ transform: "translateX(100%)",
1101
+ width: "20px",
1102
+ height: "64px",
1103
+ display: "flex",
1104
+ alignItems: "center",
1105
+ justifyContent: "center",
1106
+ backgroundColor: "var(--glass-background)",
1107
+ backdropFilter: "var(--glass-blur)",
1108
+ WebkitBackdropFilter: "var(--glass-blur)",
1109
+ border: "1px solid var(--color-border)",
1110
+ borderLeft: "none",
1111
+ borderRadius: "0 4px 4px 0",
1112
+ cursor: "pointer",
1113
+ color: "var(--color-text-subtle)",
1114
+ padding: 0,
1115
+ zIndex: 10,
1116
+ transition: `color var(--duration-fast) var(--easing)`
1117
+ },
1118
+ "aria-label": isOpen ? "Collapse sidebar" : "Expand sidebar",
1119
+ children: /* @__PURE__ */ jsx(
1120
+ "svg",
1121
+ {
1122
+ width: "6",
1123
+ height: "10",
1124
+ viewBox: "0 0 8 12",
1125
+ fill: "none",
1126
+ style: {
1127
+ transform: isOpen ? void 0 : "rotate(180deg)",
1128
+ transition: `transform var(--duration-fast) var(--easing)`
1129
+ },
1130
+ children: /* @__PURE__ */ jsx(
1131
+ "path",
1132
+ {
1133
+ d: "M6 1L1 6L6 11",
1134
+ stroke: "currentColor",
1135
+ strokeWidth: "1.5",
1136
+ strokeLinecap: "round",
1137
+ strokeLinejoin: "round"
1138
+ }
1139
+ )
1140
+ }
1141
+ )
1142
+ }
1143
+ )
1144
+ ]
1036
1145
  }
1037
1146
  );
1038
1147
  };
@@ -1,7 +1,7 @@
1
1
  import { getTimeRangeDates, observabilityKeys } from './chunk-EQNXEBGZ.js';
2
2
  import { useSupabase } from './chunk-NJJ3NQ7B.js';
3
3
  import { GRAPH_CONSTANTS } from './chunk-F6RBK7NJ.js';
4
- import { useNotificationAdapter } from './chunk-BUN337J3.js';
4
+ import { useNotificationAdapter } from './chunk-YCOTIVEZ.js';
5
5
  import { HTTP_HEADERS } from './chunk-RULQSZYX.js';
6
6
  import { STALE_TIME_MONITORING, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, STALE_TIME_DEFAULT, STALE_TIME_ADMIN } from './chunk-FCFLBMVI.js';
7
7
  import { useStableAccessToken } from './chunk-ALA56RGZ.js';
@@ -1,6 +1,6 @@
1
- import { CredentialNameSchema, UuidSchema, useErrorNotification } from './chunk-AMLON3UW.js';
1
+ import { CredentialNameSchema, UuidSchema, useErrorNotification } from './chunk-NOGBWAGU.js';
2
2
  import { getTimeRangeDates } from './chunk-EQNXEBGZ.js';
3
- import { useNotificationAdapter } from './chunk-BUN337J3.js';
3
+ import { useNotificationAdapter } from './chunk-YCOTIVEZ.js';
4
4
  import { GC_TIME_SHORT, STALE_TIME_MONITORING, GC_TIME_MEDIUM, STALE_TIME_DEFAULT, getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-FCFLBMVI.js';
5
5
  import { useElevasisServices } from './chunk-BK4EIWNU.js';
6
6
  import { z } from 'zod';
@@ -1,7 +1,7 @@
1
+ import { ElevasisLoader } from './chunk-SZHARWKU.js';
1
2
  import { PRESETS, getPreset, generateShades, mantineThemeOverride, createCssVariablesResolver, PresetsProvider } from './chunk-6ZNKDPAO.js';
2
3
  import { AppBackground } from './chunk-TBRTRBJV.js';
3
- import { ElevasisLoader } from './chunk-SZHARWKU.js';
4
- import { ElevasisCoreProvider } from './chunk-BUN337J3.js';
4
+ import { ElevasisCoreProvider } from './chunk-YCOTIVEZ.js';
5
5
  import { AppearanceProvider } from './chunk-QJ2KCHKX.js';
6
6
  import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-FCFLBMVI.js';
7
7
  import { useMemo, useEffect } from 'react';
@@ -1,4 +1,4 @@
1
- import { OrganizationProvider } from './chunk-HGNP6EVB.js';
1
+ import { OrganizationProvider } from './chunk-4J3GVBB7.js';
2
2
  import { ApiClientProvider, useApiClient } from './chunk-RULQSZYX.js';
3
3
  import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-FCFLBMVI.js';
4
4
  import { InitializationProvider } from './chunk-3VTC7OWU.js';