@ixo/ui 0.0.33 → 0.0.35
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/.vite/manifest.json +31 -31
- package/dist/components/AppShellNavigation/components/AsideResizable.d.ts.map +1 -1
- package/dist/components/AppShellNavigation/components/MenuItem.d.ts +1 -0
- package/dist/components/AppShellNavigation/components/MenuItem.d.ts.map +1 -1
- package/dist/components/AppShellNavigation/index.d.ts.map +1 -1
- package/dist/{components-CR3XazP1.js → components-C94tOtsd.js} +239 -129
- package/dist/{components-CR3XazP1.js.map → components-C94tOtsd.js.map} +1 -1
- package/dist/{components-DTMttD70.cjs → components-DF2Bd0es.cjs} +238 -128
- package/dist/{components-DTMttD70.cjs.map → components-DF2Bd0es.cjs.map} +1 -1
- package/dist/export/components.cjs +1 -1
- package/dist/export/components.mjs +1 -1
- package/dist/{index-CQD9E1Y0.cjs → index-AIkST7gl.cjs} +2 -2
- package/dist/{index-CQD9E1Y0.cjs.map → index-AIkST7gl.cjs.map} +1 -1
- package/dist/{index-Dgo89leo.cjs → index-BQ1DH7WK.cjs} +2 -2
- package/dist/{index-Dgo89leo.cjs.map → index-BQ1DH7WK.cjs.map} +1 -1
- package/dist/{index-CJuGk9X4.js → index-BUhftlk7.js} +3 -3
- package/dist/{index-CJuGk9X4.js.map → index-BUhftlk7.js.map} +1 -1
- package/dist/{index-C5Vs6UTu.js → index-BUiJr7Uj.js} +3 -3
- package/dist/{index-C5Vs6UTu.js.map → index-BUiJr7Uj.js.map} +1 -1
- package/dist/{index-B1iDlIBb.js → index-BgMqOKWQ.js} +2 -2
- package/dist/{index-B1iDlIBb.js.map → index-BgMqOKWQ.js.map} +1 -1
- package/dist/{index-DFVmSv_s.js → index-BwGm7BDz.js} +2 -2
- package/dist/{index-DFVmSv_s.js.map → index-BwGm7BDz.js.map} +1 -1
- package/dist/{index-CAG6hgw7.js → index-CBHwvT9n.js} +2 -2
- package/dist/{index-CAG6hgw7.js.map → index-CBHwvT9n.js.map} +1 -1
- package/dist/{index-CXKd9L7W.cjs → index-CFWPityN.cjs} +3 -3
- package/dist/{index-CXKd9L7W.cjs.map → index-CFWPityN.cjs.map} +1 -1
- package/dist/{index-DlJaYoXJ.js → index-CJFj_oLr.js} +2 -2
- package/dist/{index-DlJaYoXJ.js.map → index-CJFj_oLr.js.map} +1 -1
- package/dist/{index-DLS4Rlpw.js → index-D--aZB3M.js} +2 -2
- package/dist/{index-DLS4Rlpw.js.map → index-D--aZB3M.js.map} +1 -1
- package/dist/{index-DRTHOayr.cjs → index-DF1KwyRS.cjs} +2 -2
- package/dist/{index-DRTHOayr.cjs.map → index-DF1KwyRS.cjs.map} +1 -1
- package/dist/{index-CenKQltX.js → index-DQ5_MRcm.js} +2 -2
- package/dist/{index-CenKQltX.js.map → index-DQ5_MRcm.js.map} +1 -1
- package/dist/{index-CcdRvpPG.cjs → index-DV9aLRa2.cjs} +2 -2
- package/dist/{index-CcdRvpPG.cjs.map → index-DV9aLRa2.cjs.map} +1 -1
- package/dist/{index-C-XqjvyN.js → index-D_XYIRB0.js} +2 -2
- package/dist/{index-C-XqjvyN.js.map → index-D_XYIRB0.js.map} +1 -1
- package/dist/{index-EDgDTxEE.cjs → index-Dpgn820L.cjs} +2 -2
- package/dist/{index-EDgDTxEE.cjs.map → index-Dpgn820L.cjs.map} +1 -1
- package/dist/{index-CrGDWCSQ.cjs → index-MFrpv1U1.cjs} +2 -2
- package/dist/{index-CrGDWCSQ.cjs.map → index-MFrpv1U1.cjs.map} +1 -1
- package/dist/{index-O9u1LytR.cjs → index-RTCppkPk.cjs} +3 -3
- package/dist/{index-O9u1LytR.cjs.map → index-RTCppkPk.cjs.map} +1 -1
- package/dist/{index-CP4dPoSE.cjs → index-lq6zoyTk.cjs} +2 -2
- package/dist/{index-CP4dPoSE.cjs.map → index-lq6zoyTk.cjs.map} +1 -1
- package/dist/{index-DCDIWKNW.cjs → index-pkTICWLF.cjs} +2 -2
- package/dist/{index-DCDIWKNW.cjs.map → index-pkTICWLF.cjs.map} +1 -1
- package/dist/{index-CmvbskDl.js → index-qLlUomkF.js} +2 -2
- package/dist/{index-CmvbskDl.js.map → index-qLlUomkF.js.map} +1 -1
- package/package.json +1 -1
|
@@ -797,8 +797,8 @@ function AccordionTable({
|
|
|
797
797
|
}
|
|
798
798
|
);
|
|
799
799
|
}
|
|
800
|
-
const Header$3 = react$1.lazy(() => Promise.resolve().then(() => require("./index-
|
|
801
|
-
const Footer = react$1.lazy(() => Promise.resolve().then(() => require("./index-
|
|
800
|
+
const Header$3 = react$1.lazy(() => Promise.resolve().then(() => require("./index-BQ1DH7WK.cjs")));
|
|
801
|
+
const Footer = react$1.lazy(() => Promise.resolve().then(() => require("./index-CFWPityN.cjs")));
|
|
802
802
|
function ActionCard({ header, content, footer, useHoverMode = false }) {
|
|
803
803
|
const hasContent = !!content || !!footer;
|
|
804
804
|
const initialVisibility = footer?.startHidden !== true;
|
|
@@ -882,7 +882,7 @@ function Loader({ size, color = "primary" }) {
|
|
|
882
882
|
}
|
|
883
883
|
const CARD_WIDTH$1 = 350;
|
|
884
884
|
const CARD_HEADER_HEIGHT = 158;
|
|
885
|
-
const Header$2 = react$1.lazy(() => Promise.resolve().then(() => require("./index-
|
|
885
|
+
const Header$2 = react$1.lazy(() => Promise.resolve().then(() => require("./index-MFrpv1U1.cjs")));
|
|
886
886
|
function Card({ children, className, contentClassName, roundedBottom, noPadding = false, fullWidth = false, header, wrapperSx, onClick }) {
|
|
887
887
|
const wrapperRef = react$1.useRef(null);
|
|
888
888
|
const handleOnClick = react$1.useCallback(
|
|
@@ -1317,7 +1317,7 @@ function ModalSheet({ isOpen, children, hideHandler, zIndex, onRequestHide, onRe
|
|
|
1317
1317
|
document.body
|
|
1318
1318
|
);
|
|
1319
1319
|
}
|
|
1320
|
-
const Badge = react$1.lazy(() => Promise.resolve().then(() => require("./index-
|
|
1320
|
+
const Badge = react$1.lazy(() => Promise.resolve().then(() => require("./index-DF1KwyRS.cjs")));
|
|
1321
1321
|
function ActionSheet({ children, isOpen, header, navMenu = void 0, onRequestHide, onRequestShow }) {
|
|
1322
1322
|
const shadowScrollRef = react$1.useRef(null);
|
|
1323
1323
|
const wrapperContentAreaRef = react$1.useRef(null);
|
|
@@ -2207,6 +2207,7 @@ function Avatar({ src, rounded = true, size = 62, did }) {
|
|
|
2207
2207
|
return /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.User, { css: ({ text }) => ({ ...css2, backgroundColor: text.secondary }) });
|
|
2208
2208
|
}
|
|
2209
2209
|
const MIN_WIDTH = 200;
|
|
2210
|
+
const MAX_WIDTH = 700;
|
|
2210
2211
|
function AsideResizable({ children, asideCollapsed = false, onAsideToggle, width = 450, onWidthChange, onMaxExpand }) {
|
|
2211
2212
|
const [isResizing, setIsResizing] = react$1.useState(false);
|
|
2212
2213
|
const [ref] = hooks.useResizeObserver();
|
|
@@ -2242,7 +2243,7 @@ function AsideResizable({ children, asideCollapsed = false, onAsideToggle, width
|
|
|
2242
2243
|
const handleMouseMove = (e) => {
|
|
2243
2244
|
if (!isResizing) return;
|
|
2244
2245
|
const newWidth = window.innerWidth - e.clientX;
|
|
2245
|
-
const maxWidth = window.innerWidth - 600;
|
|
2246
|
+
const maxWidth = Math.min(window.innerWidth - 600, MAX_WIDTH);
|
|
2246
2247
|
const constrainedWidth = Math.min(Math.max(newWidth, MIN_WIDTH), maxWidth);
|
|
2247
2248
|
onWidthChange?.(constrainedWidth);
|
|
2248
2249
|
};
|
|
@@ -2253,7 +2254,7 @@ function AsideResizable({ children, asideCollapsed = false, onAsideToggle, width
|
|
|
2253
2254
|
}
|
|
2254
2255
|
}, [width, asideCollapsed, onAsideToggle]);
|
|
2255
2256
|
react$1.useEffect(() => {
|
|
2256
|
-
const maxWidth = window.innerWidth - 600;
|
|
2257
|
+
const maxWidth = Math.min(window.innerWidth - 600, MAX_WIDTH);
|
|
2257
2258
|
if (width >= maxWidth && onMaxExpand && !hasFiredMaxExpand.current) {
|
|
2258
2259
|
hasFiredMaxExpand.current = true;
|
|
2259
2260
|
clearListeners();
|
|
@@ -2264,7 +2265,7 @@ function AsideResizable({ children, asideCollapsed = false, onAsideToggle, width
|
|
|
2264
2265
|
}, [width, onMaxExpand]);
|
|
2265
2266
|
react$1.useEffect(() => {
|
|
2266
2267
|
const handleWindowResize = () => {
|
|
2267
|
-
const newMaxWidth = window.innerWidth - 600;
|
|
2268
|
+
const newMaxWidth = Math.min(window.innerWidth - 600, MAX_WIDTH);
|
|
2268
2269
|
const newMinWidth = MIN_WIDTH;
|
|
2269
2270
|
if (width > newMaxWidth) {
|
|
2270
2271
|
onWidthChange?.(newMaxWidth);
|
|
@@ -2286,7 +2287,7 @@ function AsideResizable({ children, asideCollapsed = false, onAsideToggle, width
|
|
|
2286
2287
|
{
|
|
2287
2288
|
w: width,
|
|
2288
2289
|
miw: 200,
|
|
2289
|
-
maw:
|
|
2290
|
+
maw: MAX_WIDTH,
|
|
2290
2291
|
ref,
|
|
2291
2292
|
sx: {
|
|
2292
2293
|
overflowY: "auto",
|
|
@@ -2429,19 +2430,70 @@ function RoomCategory({ category }) {
|
|
|
2429
2430
|
!value && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 1, children: category.rooms.map((room) => /* @__PURE__ */ jsxRuntime.jsx(RoomItem, { room }, room.id)) })
|
|
2430
2431
|
] });
|
|
2431
2432
|
}
|
|
2433
|
+
function hasActiveDescendant(children) {
|
|
2434
|
+
if (!children || children.length === 0) return false;
|
|
2435
|
+
return children.some((child) => child.isActive === true || hasActiveDescendant(child.children));
|
|
2436
|
+
}
|
|
2432
2437
|
function MenuItem({ item, onMenuItemClick, depth = 0 }) {
|
|
2433
2438
|
const { hovered, ref } = hooks.useHover();
|
|
2434
2439
|
const theme = useUITheme.useUITheme();
|
|
2435
|
-
const { value: isExpanded, toggle } = useToggle(false);
|
|
2436
2440
|
const hasChildren = item.children && item.children.length > 0;
|
|
2441
|
+
const hasActiveChild = react$1.useMemo(() => hasActiveDescendant(item.children), [item.children]);
|
|
2442
|
+
const initialExpanded = item?.isActive === true || hasActiveChild;
|
|
2443
|
+
const { value: isExpanded, toggle, set: setIsExpanded } = useToggle(initialExpanded);
|
|
2444
|
+
const prevHasActiveChildRef = react$1.useRef(hasActiveChild);
|
|
2445
|
+
const manuallyToggledRef = react$1.useRef(false);
|
|
2446
|
+
react$1.useEffect(() => {
|
|
2447
|
+
if (item?.isActive !== void 0) {
|
|
2448
|
+
setIsExpanded(item.isActive);
|
|
2449
|
+
manuallyToggledRef.current = false;
|
|
2450
|
+
}
|
|
2451
|
+
}, [item?.isActive, setIsExpanded]);
|
|
2452
|
+
react$1.useEffect(() => {
|
|
2453
|
+
if (hasActiveChild && !prevHasActiveChildRef.current) {
|
|
2454
|
+
if (!manuallyToggledRef.current || isExpanded) {
|
|
2455
|
+
setIsExpanded(true);
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
prevHasActiveChildRef.current = hasActiveChild;
|
|
2459
|
+
}, [hasActiveChild, isExpanded, setIsExpanded]);
|
|
2437
2460
|
const handleItemClick = () => {
|
|
2438
2461
|
if (!!item?.disabled) return;
|
|
2439
2462
|
onMenuItemClick(item);
|
|
2440
2463
|
};
|
|
2441
2464
|
const handleToggleClick = (e) => {
|
|
2442
2465
|
e.stopPropagation();
|
|
2466
|
+
manuallyToggledRef.current = true;
|
|
2443
2467
|
toggle();
|
|
2444
2468
|
};
|
|
2469
|
+
const shouldShowActiveStyle = item.isActive === true && !hasActiveChild;
|
|
2470
|
+
const renderIcon = () => {
|
|
2471
|
+
if (hasChildren && hovered) {
|
|
2472
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2473
|
+
core.Center,
|
|
2474
|
+
{
|
|
2475
|
+
onClick: handleToggleClick,
|
|
2476
|
+
p: 4,
|
|
2477
|
+
sx: {
|
|
2478
|
+
cursor: "pointer",
|
|
2479
|
+
borderRadius: 4,
|
|
2480
|
+
transform: isExpanded ? "rotate(-90deg)" : "rotate(0deg)",
|
|
2481
|
+
transition: "transform 0.2s ease",
|
|
2482
|
+
"&:hover": {
|
|
2483
|
+
backgroundColor: theme.neutral.transparent10
|
|
2484
|
+
}
|
|
2485
|
+
},
|
|
2486
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.AngleLeftSolid, { size: 12, color: "secondary" })
|
|
2487
|
+
}
|
|
2488
|
+
);
|
|
2489
|
+
} else {
|
|
2490
|
+
if (typeof item.icon === "string") {
|
|
2491
|
+
return /* @__PURE__ */ jsxRuntime.jsx(core.Image, { w: 20, h: 20, src: item.icon, radius: "50%" });
|
|
2492
|
+
} else {
|
|
2493
|
+
return /* @__PURE__ */ jsxRuntime.jsx(item.icon, { size: 20, color: shouldShowActiveStyle ? "overPicture" : "secondary" });
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
};
|
|
2445
2497
|
return /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: 1, children: [
|
|
2446
2498
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2447
2499
|
Flex,
|
|
@@ -2456,50 +2508,31 @@ function MenuItem({ item, onMenuItemClick, depth = 0 }) {
|
|
|
2456
2508
|
style: {
|
|
2457
2509
|
cursor: "pointer",
|
|
2458
2510
|
borderRadius: 8,
|
|
2459
|
-
backgroundColor:
|
|
2511
|
+
backgroundColor: shouldShowActiveStyle ? theme.neutral.transparent10 : hovered ? theme.neutral.transparent10 : "transparent",
|
|
2460
2512
|
transform: hovered ? "translateX(4px)" : "translateX(0px)",
|
|
2461
2513
|
transition: "all 0.2s ease"
|
|
2462
2514
|
},
|
|
2463
2515
|
onClick: handleItemClick,
|
|
2464
2516
|
children: [
|
|
2465
2517
|
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: 8, children: [
|
|
2466
|
-
|
|
2467
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Text, { fz: 14, fw: 500, c:
|
|
2518
|
+
renderIcon(),
|
|
2519
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.Text, { fz: 14, fw: 500, c: shouldShowActiveStyle ? theme.neutral.lightGray : theme.text.secondary, style: { flex: 1 }, children: item.name }),
|
|
2468
2520
|
item.badgeCount ? /* @__PURE__ */ jsxRuntime.jsx(core.Badge, { size: "xs", variant: "filled", ml: 4, style: { minWidth: "16px", height: "15px", padding: "0 4px", fontSize: "8px" }, children: item.badgeCount }) : null
|
|
2469
2521
|
] }),
|
|
2470
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
{
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
},
|
|
2485
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.AngleLeftSolid, { size: 12, color: "secondary" })
|
|
2486
|
-
}
|
|
2487
|
-
),
|
|
2488
|
-
item?.actions && item.actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2489
|
-
core.Center,
|
|
2490
|
-
{
|
|
2491
|
-
sx: {
|
|
2492
|
-
cursor: "pointer",
|
|
2493
|
-
borderRadius: 4,
|
|
2494
|
-
transition: "transform 0.2s ease",
|
|
2495
|
-
"&:hover": {
|
|
2496
|
-
backgroundColor: theme.neutral.transparent10
|
|
2497
|
-
}
|
|
2498
|
-
},
|
|
2499
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(MoreMenu, { items: item.actions, controlColor: "secondary" })
|
|
2500
|
-
}
|
|
2501
|
-
)
|
|
2502
|
-
] })
|
|
2522
|
+
/* @__PURE__ */ jsxRuntime.jsx(Flex, { children: item?.actions && item.actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2523
|
+
core.Center,
|
|
2524
|
+
{
|
|
2525
|
+
sx: {
|
|
2526
|
+
cursor: "pointer",
|
|
2527
|
+
borderRadius: 4,
|
|
2528
|
+
transition: "transform 0.2s ease",
|
|
2529
|
+
"&:hover": {
|
|
2530
|
+
backgroundColor: theme.neutral.transparent10
|
|
2531
|
+
}
|
|
2532
|
+
},
|
|
2533
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(MoreMenu, { items: item.actions, controlColor: "secondary" })
|
|
2534
|
+
}
|
|
2535
|
+
) })
|
|
2503
2536
|
]
|
|
2504
2537
|
}
|
|
2505
2538
|
),
|
|
@@ -2576,6 +2609,64 @@ function AppShellNavigation({
|
|
|
2576
2609
|
const [isNavbarNotCollapsed, { toggle: toggleNavbar }] = hooks.useDisclosure(true);
|
|
2577
2610
|
const [asideWidth, setAsideWidth] = react$1.useState(450);
|
|
2578
2611
|
const theme = useUITheme.useUITheme();
|
|
2612
|
+
const [navbarWidth, setNavbarWidth] = react$1.useState(isAiOpened ? 450 : 300);
|
|
2613
|
+
const [isNavbarResizing, setIsNavbarResizing] = react$1.useState(false);
|
|
2614
|
+
const isNavbarResizingRef = react$1.useRef(false);
|
|
2615
|
+
react$1.useEffect(() => {
|
|
2616
|
+
const minWidth = isAiOpened ? 450 : 300;
|
|
2617
|
+
if (navbarWidth < minWidth) {
|
|
2618
|
+
setNavbarWidth(minWidth);
|
|
2619
|
+
}
|
|
2620
|
+
}, [isAiOpened, navbarWidth]);
|
|
2621
|
+
function clearNavbarListeners() {
|
|
2622
|
+
document.removeEventListener("mousemove", handleNavbarMouseMove);
|
|
2623
|
+
document.removeEventListener("mouseup", handleNavbarMouseUp);
|
|
2624
|
+
document.body.style.cursor = "";
|
|
2625
|
+
document.body.style.userSelect = "";
|
|
2626
|
+
}
|
|
2627
|
+
const handleNavbarMouseMove = react$1.useCallback(
|
|
2628
|
+
(e) => {
|
|
2629
|
+
if (!isNavbarResizingRef.current) return;
|
|
2630
|
+
const minWidth = isAiOpened ? 450 : 300;
|
|
2631
|
+
const maxWidth = 700;
|
|
2632
|
+
const newWidth = Math.min(Math.max(e.clientX, minWidth), maxWidth);
|
|
2633
|
+
setNavbarWidth(newWidth);
|
|
2634
|
+
},
|
|
2635
|
+
[isAiOpened]
|
|
2636
|
+
);
|
|
2637
|
+
const handleNavbarMouseUp = react$1.useCallback(() => {
|
|
2638
|
+
setIsNavbarResizing(false);
|
|
2639
|
+
isNavbarResizingRef.current = false;
|
|
2640
|
+
}, []);
|
|
2641
|
+
const handleNavbarMouseDown = (e) => {
|
|
2642
|
+
e.preventDefault();
|
|
2643
|
+
setIsNavbarResizing(true);
|
|
2644
|
+
isNavbarResizingRef.current = true;
|
|
2645
|
+
};
|
|
2646
|
+
react$1.useEffect(() => {
|
|
2647
|
+
if (isNavbarResizing) {
|
|
2648
|
+
document.addEventListener("mousemove", handleNavbarMouseMove);
|
|
2649
|
+
document.addEventListener("mouseup", handleNavbarMouseUp);
|
|
2650
|
+
document.body.style.cursor = "col-resize";
|
|
2651
|
+
document.body.style.userSelect = "none";
|
|
2652
|
+
} else {
|
|
2653
|
+
clearNavbarListeners();
|
|
2654
|
+
}
|
|
2655
|
+
return () => clearNavbarListeners();
|
|
2656
|
+
}, [isNavbarResizing, handleNavbarMouseMove, handleNavbarMouseUp]);
|
|
2657
|
+
react$1.useEffect(() => {
|
|
2658
|
+
const handleWindowResize = () => {
|
|
2659
|
+
const maxWidth = 700;
|
|
2660
|
+
const minWidth = isAiOpened ? 450 : 300;
|
|
2661
|
+
if (navbarWidth > maxWidth) {
|
|
2662
|
+
setNavbarWidth(maxWidth);
|
|
2663
|
+
} else if (navbarWidth < minWidth) {
|
|
2664
|
+
setNavbarWidth(minWidth);
|
|
2665
|
+
}
|
|
2666
|
+
};
|
|
2667
|
+
window.addEventListener("resize", handleWindowResize);
|
|
2668
|
+
return () => window.removeEventListener("resize", handleWindowResize);
|
|
2669
|
+
}, [navbarWidth, isAiOpened]);
|
|
2579
2670
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2580
2671
|
core.AppShell,
|
|
2581
2672
|
{
|
|
@@ -2583,7 +2674,7 @@ function AppShellNavigation({
|
|
|
2583
2674
|
styles: {
|
|
2584
2675
|
navbar: {
|
|
2585
2676
|
background: theme.bg.navIconsBg,
|
|
2586
|
-
transition: "width 0.3s ease"
|
|
2677
|
+
transition: isNavbarResizing ? "none" : "width 0.3s ease"
|
|
2587
2678
|
},
|
|
2588
2679
|
aside: {
|
|
2589
2680
|
background: theme.bg.navScaled
|
|
@@ -2591,7 +2682,7 @@ function AppShellNavigation({
|
|
|
2591
2682
|
},
|
|
2592
2683
|
bg: theme.bg.centralCanvasBg,
|
|
2593
2684
|
navbar: {
|
|
2594
|
-
width: isNavbarNotCollapsed ?
|
|
2685
|
+
width: isNavbarNotCollapsed ? navbarWidth : 56,
|
|
2595
2686
|
breakpoint: "sm"
|
|
2596
2687
|
},
|
|
2597
2688
|
aside: {
|
|
@@ -2599,90 +2690,109 @@ function AppShellNavigation({
|
|
|
2599
2690
|
breakpoint: "sm"
|
|
2600
2691
|
},
|
|
2601
2692
|
children: [
|
|
2602
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.AppShell.Navbar, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2603
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Divider, { w: 40, mx: 10, color: theme.neutral.transparent10 })
|
|
2627
|
-
] }),
|
|
2628
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2629
|
-
core.Stack,
|
|
2630
|
-
{
|
|
2631
|
-
align: "center",
|
|
2632
|
-
gap: 8,
|
|
2633
|
-
style: {
|
|
2634
|
-
flex: 1,
|
|
2635
|
-
overflowY: "auto",
|
|
2636
|
-
maxHeight: "calc(100vh - 300px)",
|
|
2637
|
-
scrollbarWidth: "none",
|
|
2638
|
-
msOverflowStyle: "none"
|
|
2639
|
-
},
|
|
2640
|
-
sx: {
|
|
2641
|
-
"&::-webkit-scrollbar": {
|
|
2642
|
-
display: "none"
|
|
2643
|
-
}
|
|
2644
|
-
},
|
|
2645
|
-
children: spaces.map(({ icon, id, name, onClick }) => /* @__PURE__ */ jsxRuntime.jsx(SpaceItem, { selectedSpace, icon, name, id, onClick }, id))
|
|
2646
|
-
}
|
|
2647
|
-
)
|
|
2648
|
-
] }),
|
|
2649
|
-
onAddSpaceClick && /* @__PURE__ */ jsxRuntime.jsx(core.Center, { sx: { cursor: "pointer", borderRadius: 24 }, bg: theme.bg.navIconsBg, h: 40, w: 40, onClick: onAddSpaceClick, children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.PlusSolid, { color: "secondary" }) }),
|
|
2650
|
-
onMinusSpaceClick && /* @__PURE__ */ jsxRuntime.jsx(core.Center, { sx: { cursor: "pointer", borderRadius: 24 }, bg: theme.bg.navIconsBg, h: 40, w: 40, onClick: onMinusSpaceClick, children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.MinusCircleSolid, { color: "secondary" }) }),
|
|
2651
|
-
/* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { align: "center", gap: 8, children: [
|
|
2652
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Divider, { w: 40, mx: 10, color: theme.neutral.transparent10 }),
|
|
2653
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Center, { sx: { cursor: "pointer", borderRadius: 24 }, bg: theme.bg.navIconsBg, h: 40, w: 40, onClick: onSettingsIconClick, children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.SettingsBarSolid, { size: 22, color: "secondary" }) })
|
|
2654
|
-
] })
|
|
2655
|
-
] }),
|
|
2656
|
-
isAiOpened && isNavbarNotCollapsed && aiNavbarContent,
|
|
2657
|
-
isNavbarNotCollapsed && !isAiOpened && /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { justify: "space-between", w: "100%", pt: 16, pb: 10, px: 12, children: [
|
|
2658
|
-
/* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: 5, children: [
|
|
2659
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { mb: 24, style: { width: "100%" }, justify: "space-between", align: "center", children: [
|
|
2660
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: "10px", children: [
|
|
2661
|
-
isBackButtonVisible ? /* @__PURE__ */ jsxRuntime.jsx(core.Center, { onClick: onBackClick, sx: { borderRadius: 4, cursor: "pointer", padding: 2, background: theme.bg.navIconsBg }, children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.ArrowLeftSolid, { size: 18 }) }) : /* @__PURE__ */ jsxRuntime.jsx(core.Center, { sx: { borderRadius: 4, padding: 2, background: theme.bg.navIconsBg }, children: pageItem.pageIcon ? /* @__PURE__ */ jsxRuntime.jsx(pageItem.pageIcon, { size: 18 }) : /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.Globe, { size: 18 }) }),
|
|
2662
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.Text, { lh: 1, c: theme.text.overPicture, children: pageItem.pageTitle || "Unknown" })
|
|
2693
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.AppShell.Navbar, { children: /* @__PURE__ */ jsxRuntime.jsxs(core.Box, { sx: { position: "relative", height: "100%" }, children: [
|
|
2694
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2695
|
+
core.Box,
|
|
2696
|
+
{
|
|
2697
|
+
w: 4,
|
|
2698
|
+
top: 0,
|
|
2699
|
+
right: 0,
|
|
2700
|
+
h: "100%",
|
|
2701
|
+
pos: "absolute",
|
|
2702
|
+
bg: isNavbarResizing ? theme.colors.focus : "transparent",
|
|
2703
|
+
sx: {
|
|
2704
|
+
zIndex: 2,
|
|
2705
|
+
cursor: "col-resize",
|
|
2706
|
+
transition: "background-color 0.2s ease"
|
|
2707
|
+
},
|
|
2708
|
+
onMouseDown: handleNavbarMouseDown
|
|
2709
|
+
}
|
|
2710
|
+
),
|
|
2711
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { style: { height: "100%" }, children: [
|
|
2712
|
+
/* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { p: 8, w: 56, justify: "space-between", h: "100%", bg: theme.bg.navSpaces, children: [
|
|
2713
|
+
/* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { align: "center", style: { flex: 1 }, gap: 8, children: [
|
|
2714
|
+
/* @__PURE__ */ jsxRuntime.jsxs(core.Center, { sx: { cursor: "pointer", borderRadius: 24 }, pos: "relative", h: 40, w: 40, onClick: companyIcon.onClick, children: [
|
|
2715
|
+
typeof companyIcon.icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(core.Image, { radius: 24, src: companyIcon.icon, w: 32, h: 32 }) : companyIcon.icon,
|
|
2716
|
+
companyIcon.isSelected && /* @__PURE__ */ jsxRuntime.jsx(SelectedIndicator, {})
|
|
2663
2717
|
] }),
|
|
2664
|
-
|
|
2665
|
-
core.
|
|
2718
|
+
avatarIcon && /* @__PURE__ */ jsxRuntime.jsxs(core.Center, { sx: { cursor: "pointer", borderRadius: 24 }, pos: "relative", bg: theme.bg.navIconsBg, h: 40, w: 40, onClick: avatarIcon.onClick, children: [
|
|
2719
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.Tooltip, { label: "Home", position: "right", withArrow: true, ml: 5, fz: 12, children: typeof avatarIcon.icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(core.Image, { radius: 24, src: avatarIcon.icon, w: 32, h: 32 }) : avatarIcon.icon }),
|
|
2720
|
+
avatarIcon.isSelected && /* @__PURE__ */ jsxRuntime.jsx(SelectedIndicator, {})
|
|
2721
|
+
] }),
|
|
2722
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.Divider, { w: 40, mx: 10, color: theme.neutral.transparent10 }),
|
|
2723
|
+
temporarySpace && !spaces?.some((space) => space.id === temporarySpace.id) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2724
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2725
|
+
SpaceItem,
|
|
2726
|
+
{
|
|
2727
|
+
selectedSpace,
|
|
2728
|
+
icon: temporarySpace.icon,
|
|
2729
|
+
name: temporarySpace.name,
|
|
2730
|
+
id: temporarySpace.id,
|
|
2731
|
+
onClick: temporarySpace.onClick
|
|
2732
|
+
},
|
|
2733
|
+
temporarySpace.id
|
|
2734
|
+
),
|
|
2735
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.Divider, { w: 40, mx: 10, color: theme.neutral.transparent10 })
|
|
2736
|
+
] }),
|
|
2737
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2738
|
+
core.Stack,
|
|
2666
2739
|
{
|
|
2740
|
+
align: "center",
|
|
2741
|
+
gap: 8,
|
|
2742
|
+
style: {
|
|
2743
|
+
flex: 1,
|
|
2744
|
+
overflowY: "auto",
|
|
2745
|
+
maxHeight: "calc(100vh - 300px)",
|
|
2746
|
+
scrollbarWidth: "none",
|
|
2747
|
+
msOverflowStyle: "none"
|
|
2748
|
+
},
|
|
2667
2749
|
sx: {
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
transition: "background 0.15s",
|
|
2671
|
-
background: theme.neutral.transparent10,
|
|
2672
|
-
"&:hover": {
|
|
2673
|
-
background: theme.neutral.transparent30
|
|
2750
|
+
"&::-webkit-scrollbar": {
|
|
2751
|
+
display: "none"
|
|
2674
2752
|
}
|
|
2675
2753
|
},
|
|
2676
|
-
|
|
2677
|
-
onClick: onAiOpen,
|
|
2678
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.Assistant, { size: 18, color: "primary" })
|
|
2754
|
+
children: spaces.map(({ icon, id, name, onClick }) => /* @__PURE__ */ jsxRuntime.jsx(SpaceItem, { selectedSpace, icon, name, id, onClick }, id))
|
|
2679
2755
|
}
|
|
2680
2756
|
)
|
|
2681
2757
|
] }),
|
|
2682
|
-
|
|
2683
|
-
|
|
2758
|
+
onAddSpaceClick && /* @__PURE__ */ jsxRuntime.jsx(core.Center, { sx: { cursor: "pointer", borderRadius: 24 }, bg: theme.bg.navIconsBg, h: 40, w: 40, onClick: onAddSpaceClick, children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.PlusSolid, { color: "secondary" }) }),
|
|
2759
|
+
onMinusSpaceClick && /* @__PURE__ */ jsxRuntime.jsx(core.Center, { sx: { cursor: "pointer", borderRadius: 24 }, bg: theme.bg.navIconsBg, h: 40, w: 40, onClick: onMinusSpaceClick, children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.MinusCircleSolid, { color: "secondary" }) }),
|
|
2760
|
+
/* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { align: "center", gap: 8, children: [
|
|
2761
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.Divider, { w: 40, mx: 10, color: theme.neutral.transparent10 }),
|
|
2762
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.Center, { sx: { cursor: "pointer", borderRadius: 24 }, bg: theme.bg.navIconsBg, h: 40, w: 40, onClick: onSettingsIconClick, children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.SettingsBarSolid, { size: 22, color: "secondary" }) })
|
|
2763
|
+
] })
|
|
2684
2764
|
] }),
|
|
2685
|
-
|
|
2765
|
+
isAiOpened && isNavbarNotCollapsed && aiNavbarContent,
|
|
2766
|
+
isNavbarNotCollapsed && !isAiOpened && /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { justify: "space-between", w: "100%", pt: 16, pb: 10, px: 12, children: [
|
|
2767
|
+
/* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: 5, children: [
|
|
2768
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { mb: 24, style: { width: "100%" }, justify: "space-between", align: "center", children: [
|
|
2769
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: "10px", children: [
|
|
2770
|
+
isBackButtonVisible ? /* @__PURE__ */ jsxRuntime.jsx(core.Center, { onClick: onBackClick, sx: { borderRadius: 4, cursor: "pointer", padding: 2, background: theme.bg.navIconsBg }, children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.ArrowLeftSolid, { size: 18 }) }) : /* @__PURE__ */ jsxRuntime.jsx(core.Center, { sx: { borderRadius: 4, padding: 2, background: theme.bg.navIconsBg }, children: pageItem.pageIcon ? /* @__PURE__ */ jsxRuntime.jsx(pageItem.pageIcon, { size: 18 }) : /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.Globe, { size: 18 }) }),
|
|
2771
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.Text, { lh: 1, c: theme.text.overPicture, children: pageItem.pageTitle || "Unknown" })
|
|
2772
|
+
] }),
|
|
2773
|
+
isAiBtnVisible && !isAiOpened && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2774
|
+
core.Center,
|
|
2775
|
+
{
|
|
2776
|
+
sx: {
|
|
2777
|
+
cursor: "pointer",
|
|
2778
|
+
borderRadius: 8,
|
|
2779
|
+
transition: "background 0.15s",
|
|
2780
|
+
background: theme.neutral.transparent10,
|
|
2781
|
+
"&:hover": {
|
|
2782
|
+
background: theme.neutral.transparent30
|
|
2783
|
+
}
|
|
2784
|
+
},
|
|
2785
|
+
p: 4,
|
|
2786
|
+
onClick: onAiOpen,
|
|
2787
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(UsersSolid.Assistant, { size: 18, color: "primary" })
|
|
2788
|
+
}
|
|
2789
|
+
)
|
|
2790
|
+
] }),
|
|
2791
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 5, children: Array.from({ length: 6 }).map((_, idx) => /* @__PURE__ */ jsxRuntime.jsx(NavigationItemSkeleton, {}, idx)) }) : menuItems?.map((item) => /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { onMenuItemClick, item }, item.id)),
|
|
2792
|
+
roomCategories && roomCategories.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 8, mt: 16, children: roomCategories.map((category) => /* @__PURE__ */ jsxRuntime.jsx(RoomCategory, { category }, category.id)) })
|
|
2793
|
+
] }),
|
|
2794
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 5, children: footerContent })
|
|
2795
|
+
] })
|
|
2686
2796
|
] })
|
|
2687
2797
|
] }) }),
|
|
2688
2798
|
/* @__PURE__ */ jsxRuntime.jsx(core.AppShell.Main, { children }),
|
|
@@ -5707,13 +5817,13 @@ function ActionButton({ onClick, left, right }) {
|
|
|
5707
5817
|
}
|
|
5708
5818
|
);
|
|
5709
5819
|
}
|
|
5710
|
-
const MainAction = react$1.lazy(() => Promise.resolve().then(() => require("./index-
|
|
5711
|
-
const Header$1 = react$1.lazy(() => Promise.resolve().then(() => require("./index-
|
|
5712
|
-
const Content = react$1.lazy(() => Promise.resolve().then(() => require("./index-
|
|
5820
|
+
const MainAction = react$1.lazy(() => Promise.resolve().then(() => require("./index-lq6zoyTk.cjs")));
|
|
5821
|
+
const Header$1 = react$1.lazy(() => Promise.resolve().then(() => require("./index-AIkST7gl.cjs")));
|
|
5822
|
+
const Content = react$1.lazy(() => Promise.resolve().then(() => require("./index-pkTICWLF.cjs")));
|
|
5713
5823
|
const Map = react$1.lazy(() => Promise.resolve().then(() => require("./index-D4PsPquZ.cjs")));
|
|
5714
5824
|
const CustomContent = react$1.lazy(() => Promise.resolve().then(() => require("./index-ByrCNpS2.cjs")));
|
|
5715
|
-
const Assets = react$1.lazy(() => Promise.resolve().then(() => require("./index-
|
|
5716
|
-
const Actions = react$1.lazy(() => Promise.resolve().then(() => require("./index-
|
|
5825
|
+
const Assets = react$1.lazy(() => Promise.resolve().then(() => require("./index-DV9aLRa2.cjs")));
|
|
5826
|
+
const Actions = react$1.lazy(() => Promise.resolve().then(() => require("./index-RTCppkPk.cjs")));
|
|
5717
5827
|
const HOVER_BORDER_WIDTH = 1;
|
|
5718
5828
|
function SodaCardCmp({ numSelected = 0, expanded = true, mainAction, header, content, map, customContent, customFooter, actions, assets, onClick }, ref) {
|
|
5719
5829
|
const wrapperRef = react$1.useRef(null);
|
|
@@ -11026,4 +11136,4 @@ exports.UserMessage = UserMessage;
|
|
|
11026
11136
|
exports.WorkspaceModal = WorkspaceModal;
|
|
11027
11137
|
exports.cutText = cutText;
|
|
11028
11138
|
exports.isValidClick = isValidClick;
|
|
11029
|
-
//# sourceMappingURL=components-
|
|
11139
|
+
//# sourceMappingURL=components-DF2Bd0es.cjs.map
|