mtxuilib 0.1.304 → 0.1.307
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/components/button-scroll-to-bottom.d.ts +1 -1
- package/dist/components/button-scroll-to-bottom.js +1 -1
- package/dist/icons/icons.d.ts +1 -1
- package/dist/layouts/dash5/SiderNavItem.d.ts +1 -1
- package/dist/layouts/dash5/SiderNavItem.js +12 -4
- package/dist/layouts/dash5/SiderToggleButton.d.ts +1 -5
- package/dist/layouts/dash5/SiderToggleButton.js +5 -4
- package/dist/layouts/dash5/dash5.store.d.ts +3 -5
- package/dist/layouts/dash5/dash5.store.js +5 -8
- package/dist/layouts/dash5/index.js +11 -11
- package/dist/layouts/types.d.ts +5 -5
- package/package.json +1 -1
- package/dist/layouts/DashLayoutProvider.d.ts +0 -45
- package/dist/layouts/DashLayoutProvider.js +0 -55
- package/dist/layouts/dash5/DashSider.d.ts +0 -2
- package/dist/layouts/dash5/DashSider.js +0 -13
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Button } from "react-day-picker";
|
|
3
4
|
import { IconArrowDown } from "../icons/icons-ai";
|
|
4
5
|
import { cn } from "../lib/utils";
|
|
5
|
-
import { Button } from "../ui/button";
|
|
6
6
|
export function ButtonScrollToBottom({ className, isAtBottom, scrollToBottom, ...props }) {
|
|
7
7
|
return (_jsxs(Button, { variant: "outline", size: "icon", className: cn("absolute right-4 top-1 z-10 bg-background transition-opacity duration-300 sm:right-8 md:top-2", isAtBottom ? "opacity-0" : "opacity-100", className), onClick: () => scrollToBottom(), ...props, children: [_jsx(IconArrowDown, {}), _jsx("span", { className: "sr-only", children: "Scroll to bottom" })] }));
|
|
8
8
|
}
|
package/dist/icons/icons.d.ts
CHANGED
|
@@ -127,6 +127,6 @@ export declare const Icons: {
|
|
|
127
127
|
paypal: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
128
128
|
};
|
|
129
129
|
export declare const IconX: (props: {
|
|
130
|
-
name?: string;
|
|
130
|
+
name?: string | null;
|
|
131
131
|
} & IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
132
132
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NavProps } from "../types";
|
|
1
|
+
import type { NavProps } from "../types";
|
|
2
2
|
export declare function SiderNavItem({ items, isCollapsed }: NavProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,10 +10,18 @@ import { Fragment } from "react/jsx-runtime";
|
|
|
10
10
|
export function SiderNavItem({ items, isCollapsed }) {
|
|
11
11
|
const activatePath = useSelectedLayoutSegment();
|
|
12
12
|
return (_jsx("div", { "data-collapsed": isCollapsed, className: "group flex flex-col gap-4 py-2 data-[collapsed=true]:py-2", children: _jsx("nav", { className: "grid gap-1 px-2 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2", children: items.map((link, index) => {
|
|
13
|
-
const isActive = link.url === activatePath ||
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const isActive = link.url === activatePath ||
|
|
14
|
+
link.url === `/${activatePath}` ||
|
|
15
|
+
link.url === `/${activatePath}/`;
|
|
16
|
+
return (_jsx(Fragment, { children: isCollapsed ? (_jsx(_Fragment, { children: _jsxs(Tooltip, { delayDuration: 0, children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs(Link, { href: "#", className: cn(buttonVariants({
|
|
17
|
+
variant: link.variant,
|
|
18
|
+
size: "icon",
|
|
19
|
+
}), "h-9 w-9", link.variant === "default" &&
|
|
20
|
+
"dark:bg-muted dark:text-muted-foreground dark:hover:bg-muted dark:hover:text-white", isActive && "bg-blue-300"), children: [_jsx(IconX, { name: link.icon, className: "h-5 w-5" }), _jsx("span", { className: "sr-only", children: link.title })] }) }), _jsxs(TooltipContent, { side: "right", className: "flex items-center gap-4", children: [link.title, link.label && (_jsx("span", { className: "ml-auto text-muted-foreground", children: link.label }))] })] }, index) })) : (_jsx(_Fragment, { children: _jsxs(Link, { href: link.url || "#", className: cn(buttonVariants({
|
|
21
|
+
variant: link.variant,
|
|
22
|
+
size: "default",
|
|
23
|
+
}), link.variant === "default" &&
|
|
16
24
|
"dark:bg-muted dark:text-white dark:hover:bg-muted dark:hover:text-white", "justify-start", isActive && "bg-muted dark:bg-primary hover:shadow-sm"), children: [_jsx(IconX, { name: link.icon, className: "mr-2 h-5 w-5" }), link.title, link.label && (_jsx("span", { className: cn("ml-auto", link.variant === "default" &&
|
|
17
|
-
"text-background dark:text-white"), children: link.label }))] }, index) }) }, index);
|
|
25
|
+
"text-background dark:text-white"), children: link.label }))] }, index) })) }, index));
|
|
18
26
|
}) }) }));
|
|
19
27
|
}
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
isCollapsed: boolean;
|
|
3
|
-
setIsCollapsed: (isCollapsed: boolean) => void;
|
|
4
|
-
}
|
|
5
|
-
export declare const SiderToggleButton: ({ isCollapsed, setIsCollapsed }: SiderToggleButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare const SiderToggleButton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { useDash5Store } from
|
|
4
|
-
export const SiderToggleButton = (
|
|
5
|
-
const toggleAsideCollapsed = useDash5Store(x => x.toggleAsideCollapsed);
|
|
3
|
+
import { useDash5Store } from "./dash5.store";
|
|
4
|
+
export const SiderToggleButton = () => {
|
|
5
|
+
const toggleAsideCollapsed = useDash5Store((x) => x.toggleAsideCollapsed);
|
|
6
|
+
const isCollapsed = useDash5Store((x) => x.layoutConfig.asideIsCollapsed);
|
|
6
7
|
return (_jsx(_Fragment, { children: _jsx("button", { onClick: () => toggleAsideCollapsed(), className: "flex w-full items-center justify-center p-2 text-gray-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-800 transition-colors", "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar", children: isCollapsed ? (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 5l7 7-7 7M5 5l7 7-7 7" }) })) : (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M11 19l-7-7 7-7m8 14l-7-7 7-7" }) })) }) }));
|
|
7
8
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
1
|
import { type StateCreator } from "zustand";
|
|
3
2
|
import type { Renderable } from "../../lib/render";
|
|
4
|
-
import {
|
|
3
|
+
import type { DashASiderProps } from "../types";
|
|
5
4
|
export declare const dash5LayoutDefaultConfig: {
|
|
6
5
|
asideIsCollapsed: boolean;
|
|
7
6
|
asideCollapsedSize: number;
|
|
@@ -16,15 +15,14 @@ export declare const dash5LayoutDefaultConfig: {
|
|
|
16
15
|
layoutStoreKey: string;
|
|
17
16
|
};
|
|
18
17
|
export type Dash5LayoutProps = {
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
headerComponent?: Renderable<DashASiderProps>;
|
|
19
|
+
aSiderRender?: (props: DashASiderProps) => React.ReactNode;
|
|
21
20
|
};
|
|
22
21
|
export interface Dash5LayoutState extends Dash5LayoutProps {
|
|
23
22
|
_hasHydrated?: boolean;
|
|
24
23
|
layoutConfig: typeof dash5LayoutDefaultConfig;
|
|
25
24
|
setHasHydrated: (_hasHydrated: boolean) => void;
|
|
26
25
|
setIsSideCollapsed: (isSideCollapsed: boolean) => void;
|
|
27
|
-
setSiderComponent: (siderComponent: ReactNode) => void;
|
|
28
26
|
toggleAsideCollapsed: () => void;
|
|
29
27
|
}
|
|
30
28
|
export declare const createAppSlice: StateCreator<Dash5LayoutState, [
|
|
@@ -30,11 +30,12 @@ export const createAppSlice = (set, get, init) => {
|
|
|
30
30
|
const pre = get().layoutConfig;
|
|
31
31
|
set({ layoutConfig: { ...pre, asideIsCollapsed: isSideCollapsed } });
|
|
32
32
|
},
|
|
33
|
-
setSiderComponent: (siderComponent) => set({ siderComponent }),
|
|
34
33
|
toggleAsideCollapsed: () => {
|
|
35
34
|
const pre = get().layoutConfig;
|
|
36
|
-
set({
|
|
37
|
-
|
|
35
|
+
set({
|
|
36
|
+
layoutConfig: { ...pre, asideIsCollapsed: !pre.asideIsCollapsed },
|
|
37
|
+
});
|
|
38
|
+
},
|
|
38
39
|
};
|
|
39
40
|
};
|
|
40
41
|
const createMtAppStore = (initProps) => {
|
|
@@ -53,11 +54,7 @@ const createMtAppStore = (initProps) => {
|
|
|
53
54
|
},
|
|
54
55
|
partialize: (state) => {
|
|
55
56
|
return Object.fromEntries(Object.entries(state).filter(([key]) => {
|
|
56
|
-
return ![
|
|
57
|
-
"children",
|
|
58
|
-
"_hasHydrated",
|
|
59
|
-
"siderComponent",
|
|
60
|
-
].includes(key);
|
|
57
|
+
return !["children", "_hasHydrated", "siderComponent"].includes(key);
|
|
61
58
|
}));
|
|
62
59
|
},
|
|
63
60
|
}));
|
|
@@ -5,22 +5,22 @@ import { useEffect, useRef } from "react";
|
|
|
5
5
|
import { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from "../../ui/resizable";
|
|
6
6
|
import { TooltipProvider } from "../../ui/tooltip";
|
|
7
7
|
import { Dash5LayoutProvider, useDash5Store, } from "./dash5.store";
|
|
8
|
-
import { DashSider } from "./DashSider";
|
|
9
8
|
export function Dash5Layout(props) {
|
|
10
9
|
return (_jsx(Dash5LayoutProvider, { ...props, children: _jsx(DashLayoutInner, { children: props.children }) }));
|
|
11
10
|
}
|
|
12
11
|
const DashLayoutInner = (props) => {
|
|
13
12
|
const asideIsCollapsed = useDash5Store((x) => x.layoutConfig?.asideIsCollapsed);
|
|
14
|
-
const asideDefaultSize = useDash5Store(x => x.layoutConfig.asideDefaultSize);
|
|
15
|
-
const asideCollapsedSize = useDash5Store(x => x.layoutConfig.asideCollapsedSize);
|
|
16
|
-
const asideMinSize = useDash5Store(x => x.layoutConfig.asiderMinSize);
|
|
17
|
-
const asideMaxSize = useDash5Store(x => x.layoutConfig.asiderMaxSize);
|
|
18
|
-
const asideCollapsible = useDash5Store(x => x.layoutConfig.asiderCollapsible);
|
|
13
|
+
const asideDefaultSize = useDash5Store((x) => x.layoutConfig.asideDefaultSize);
|
|
14
|
+
const asideCollapsedSize = useDash5Store((x) => x.layoutConfig.asideCollapsedSize);
|
|
15
|
+
const asideMinSize = useDash5Store((x) => x.layoutConfig.asiderMinSize);
|
|
16
|
+
const asideMaxSize = useDash5Store((x) => x.layoutConfig.asiderMaxSize);
|
|
17
|
+
const asideCollapsible = useDash5Store((x) => x.layoutConfig.asiderCollapsible);
|
|
19
18
|
const setIsSideCollapsed = useDash5Store((x) => x.setIsSideCollapsed);
|
|
20
|
-
const layoutStoreKey = useDash5Store(x => x.layoutConfig.layoutStoreKey);
|
|
21
|
-
const mainPanelDefaultSize = useDash5Store(x => x.layoutConfig.mainPanelDefaultSize);
|
|
22
|
-
const mainPanelMinSize = useDash5Store(x => x.layoutConfig.mainPanelMinSize);
|
|
23
|
-
const mainPanelMaxSize = useDash5Store(x => x.layoutConfig.mainPanelMaxSize);
|
|
19
|
+
const layoutStoreKey = useDash5Store((x) => x.layoutConfig.layoutStoreKey);
|
|
20
|
+
const mainPanelDefaultSize = useDash5Store((x) => x.layoutConfig.mainPanelDefaultSize);
|
|
21
|
+
const mainPanelMinSize = useDash5Store((x) => x.layoutConfig.mainPanelMinSize);
|
|
22
|
+
const mainPanelMaxSize = useDash5Store((x) => x.layoutConfig.mainPanelMaxSize);
|
|
23
|
+
const aSiderRender = useDash5Store((x) => x.aSiderRender);
|
|
24
24
|
const navPanelRef = useRef(null);
|
|
25
25
|
useEffect(() => {
|
|
26
26
|
if (asideIsCollapsed) {
|
|
@@ -37,5 +37,5 @@ const DashLayoutInner = (props) => {
|
|
|
37
37
|
}, onExpand: () => {
|
|
38
38
|
setIsSideCollapsed(false);
|
|
39
39
|
}, className: cn(asideIsCollapsed &&
|
|
40
|
-
"min-w-[60px] transition-all duration-300 ease-in-out", "hidden sm:flex sm:flex-col"), children: _jsx(_Fragment, { children:
|
|
40
|
+
"min-w-[60px] transition-all duration-300 ease-in-out", "hidden sm:flex sm:flex-col"), children: _jsx(_Fragment, { children: aSiderRender?.({ isCollapsed: !!asideIsCollapsed }) }) }), _jsx(ResizableHandle, { withHandle: true, className: "hidden md:flex hover:cursor-col-resize hover:bg-gray-400" }), _jsx(ResizablePanel, { defaultSize: mainPanelDefaultSize, minSize: mainPanelMinSize, maxSize: mainPanelMaxSize, children: _jsx("div", { className: "bg-muted/40 flex min-h-screen w-full flex-col", children: _jsxs("div", { className: cn("flex min-h-dvh flex-col"), children: [_jsx("main", { className: cn("flex h-full min-h-full flex-1 p-1 flex-col px-1"), children: _jsx("div", { className: "min-h-full w-full flex-1 flex flex-col", children: props.children }) }), _jsx("div", { className: "bg-slate-50" })] }) }) })] }) }));
|
|
41
41
|
};
|
package/dist/layouts/types.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface DashASiderProps {
|
|
2
2
|
isCollapsed?: boolean;
|
|
3
3
|
}
|
|
4
4
|
export interface DashHeaderProps {
|
|
5
5
|
hidden?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export interface SiderNavItemProps {
|
|
8
|
-
title
|
|
9
|
-
label?: string;
|
|
10
|
-
icon?: string;
|
|
8
|
+
title?: string | null;
|
|
9
|
+
label?: string | null;
|
|
10
|
+
icon?: string | null;
|
|
11
11
|
variant?: "default" | "ghost";
|
|
12
|
-
url?: string;
|
|
12
|
+
url?: string | null;
|
|
13
13
|
}
|
|
14
14
|
export interface NavProps {
|
|
15
15
|
isCollapsed?: boolean;
|
package/package.json
CHANGED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { type StateCreator } from "zustand";
|
|
2
|
-
import type { SiderNavItemProps } from "./types";
|
|
3
|
-
export interface DashConfig {
|
|
4
|
-
pathPrefix: string;
|
|
5
|
-
logo?: string;
|
|
6
|
-
siderNavMenus: SiderNavItemProps[];
|
|
7
|
-
}
|
|
8
|
-
export interface MtmaiBotProps {
|
|
9
|
-
isDev?: boolean;
|
|
10
|
-
config?: DashConfig;
|
|
11
|
-
}
|
|
12
|
-
export interface DashState extends MtmaiBotProps {
|
|
13
|
-
hasHydrated?: boolean;
|
|
14
|
-
setHasHydrated: (hasHydrated: boolean) => void;
|
|
15
|
-
setConfig: (config: DashConfig) => void;
|
|
16
|
-
}
|
|
17
|
-
export declare const createAppSlice: StateCreator<DashState, [], [], DashState>;
|
|
18
|
-
export declare const dashContext: import("react").Context<(Omit<Omit<Omit<import("zustand").StoreApi<DashState>, "persist"> & {
|
|
19
|
-
persist: {
|
|
20
|
-
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<DashState, {
|
|
21
|
-
[k: string]: unknown;
|
|
22
|
-
}>>) => void;
|
|
23
|
-
clearStorage: () => void;
|
|
24
|
-
rehydrate: () => Promise<void> | void;
|
|
25
|
-
hasHydrated: () => boolean;
|
|
26
|
-
onHydrate: (fn: (state: DashState) => void) => () => void;
|
|
27
|
-
onFinishHydration: (fn: (state: DashState) => void) => () => void;
|
|
28
|
-
getOptions: () => Partial<import("zustand/middleware").PersistOptions<DashState, {
|
|
29
|
-
[k: string]: unknown;
|
|
30
|
-
}>>;
|
|
31
|
-
};
|
|
32
|
-
}, "setState"> & {
|
|
33
|
-
setState<A extends string | {
|
|
34
|
-
type: string;
|
|
35
|
-
}>(partial: DashState | Partial<DashState> | ((state: DashState) => DashState | Partial<DashState>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
36
|
-
}, "setState"> & {
|
|
37
|
-
setState(nextStateOrUpdater: DashState | Partial<DashState> | ((state: import("immer").WritableDraft<DashState>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
38
|
-
type: string;
|
|
39
|
-
} | undefined): void;
|
|
40
|
-
}) | null>;
|
|
41
|
-
type AppProviderProps = React.PropsWithChildren<MtmaiBotProps>;
|
|
42
|
-
export declare const DashLayoutProvider: (props: AppProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
-
export declare function useDash(): DashState;
|
|
44
|
-
export declare function useDash<T>(selector: (state: DashState) => T): T;
|
|
45
|
-
export {};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, useContext, useMemo } from "react";
|
|
4
|
-
import { createStore, useStore } from "zustand";
|
|
5
|
-
import { devtools, persist } from "zustand/middleware";
|
|
6
|
-
import { immer } from "zustand/middleware/immer";
|
|
7
|
-
import { useShallow } from "zustand/react/shallow";
|
|
8
|
-
export const createAppSlice = (set, get, init) => {
|
|
9
|
-
return {
|
|
10
|
-
isDev: false,
|
|
11
|
-
...init,
|
|
12
|
-
setHasHydrated: (hasHydrated) => set({ hasHydrated }),
|
|
13
|
-
setConfig: (config) => set({ config }),
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
const createMtAppStore = (initProps) => {
|
|
17
|
-
const initialState = { ...initProps };
|
|
18
|
-
return createStore()(persist(devtools(immer((...a) => ({
|
|
19
|
-
...createAppSlice(...a),
|
|
20
|
-
...initialState,
|
|
21
|
-
})), {
|
|
22
|
-
name: "DashProvider",
|
|
23
|
-
}), {
|
|
24
|
-
name: "DashProvider",
|
|
25
|
-
skipHydration: false,
|
|
26
|
-
version: 2,
|
|
27
|
-
onRehydrateStorage: () => (state, error) => {
|
|
28
|
-
state?.setHasHydrated(true);
|
|
29
|
-
if (error) {
|
|
30
|
-
console.error("onRehydrateStorage error", error);
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
partialize: (state) => {
|
|
34
|
-
return Object.fromEntries(Object.entries(state).filter(([key]) => {
|
|
35
|
-
return !["cookieStr", "socket", "session"].includes(key);
|
|
36
|
-
}));
|
|
37
|
-
},
|
|
38
|
-
}));
|
|
39
|
-
};
|
|
40
|
-
export const dashContext = createContext(null);
|
|
41
|
-
export const DashLayoutProvider = (props) => {
|
|
42
|
-
const { children, ...etc } = props;
|
|
43
|
-
const mystore = useMemo(() => createMtAppStore(etc), [etc]);
|
|
44
|
-
return (_jsx(dashContext.Provider, { value: mystore, children: children }));
|
|
45
|
-
};
|
|
46
|
-
const DEFAULT_USE_SHALLOW = false;
|
|
47
|
-
export function useDash(selector) {
|
|
48
|
-
const store = useContext(dashContext);
|
|
49
|
-
if (!store)
|
|
50
|
-
throw new Error("useDash must in DashLayoutProvider");
|
|
51
|
-
if (selector) {
|
|
52
|
-
return useStore(store, DEFAULT_USE_SHALLOW ? useShallow(selector) : selector);
|
|
53
|
-
}
|
|
54
|
-
return useStore(store);
|
|
55
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useDash5Store } from "mtxuilib/layouts/dash5/dash5.store";
|
|
4
|
-
import { SiderToggleButton } from "mtxuilib/layouts/dash5/SiderToggleButton";
|
|
5
|
-
import { cn } from "mtxuilib/lib/utils";
|
|
6
|
-
import { useDash } from "../DashLayoutProvider";
|
|
7
|
-
import { SiderNavItem } from "./SiderNavItem";
|
|
8
|
-
export const DashSider = (props) => {
|
|
9
|
-
const isSideCollapsed = useDash5Store((x) => x.layoutConfig.asideIsCollapsed);
|
|
10
|
-
const setIsSideCollapsed = useDash5Store((x) => x.setIsSideCollapsed);
|
|
11
|
-
const siderNavMenus = useDash(x => x.config?.siderNavMenus);
|
|
12
|
-
return (_jsxs("div", { className: "flex flex-col gap-2 p-1 h-full", children: [_jsx("div", { className: "mb-2 flex items-center justify-between", children: _jsx("img", { src: "/media/logo.svg", alt: "mtmai-logo", width: 200, height: 26, loading: "lazy", className: cn("m-1 max-w-none duration-75 group-hover:[clip-path:none] 2xl:[clip-path:none] block dark:hidden", isSideCollapsed && "[clip-path:inset(0%_75%_0%_0%)]") }) }), _jsx("div", { className: "flex-1", children: _jsx(SiderNavItem, { isCollapsed: props.isCollapsed, items: siderNavMenus || [] }) }), _jsx("div", { children: _jsx(SiderToggleButton, { isCollapsed: !!isSideCollapsed, setIsCollapsed: setIsSideCollapsed }) })] }));
|
|
13
|
-
};
|