@admin-layout/tailwind-design-pro 10.0.6-alpha.9 → 10.0.9-alpha.13
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/lib/components/Layout/BasicLayout/index.d.ts +0 -6
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +18 -44
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts +1 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +32 -38
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts +1 -3
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +23 -0
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -0
- package/lib/components/Layout/ProTailwindLayout.d.ts +2 -0
- package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +6 -1
- package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
- package/lib/components/Layout/Sidebar/Sidebar.d.ts +1 -0
- package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/Sidebar.js +41 -10
- package/lib/components/Layout/Sidebar/Sidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +3 -5
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.js +118 -38
- package/lib/components/Layout/Sidebar/SidebarMenu.js.map +1 -1
- package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/TailwindLayout.js +8 -2
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +4 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.js +7 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -0
- package/lib/components/Layout/slot-fill/index.d.ts +1 -0
- package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +1 -6
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +1 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.js +106 -31
- package/lib/components/SettingDrawer/CheckBoxTheme.js.map +1 -1
- package/lib/components/SettingDrawer/LayoutChange.d.ts +1 -5
- package/lib/components/SettingDrawer/LayoutChange.d.ts.map +1 -1
- package/lib/components/SettingDrawer/LayoutChange.js +19 -23
- package/lib/components/SettingDrawer/LayoutChange.js.map +1 -1
- package/lib/components/SettingDrawer/NavigationsModes.d.ts +3 -0
- package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +1 -0
- package/lib/components/SettingDrawer/NavigationsModes.js +281 -0
- package/lib/components/SettingDrawer/NavigationsModes.js.map +1 -0
- package/lib/components/SettingDrawer/RegionalSettings.d.ts +1 -6
- package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/RegionalSettings.js +24 -31
- package/lib/components/SettingDrawer/RegionalSettings.js.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts +1 -24
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +115 -110
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/Switch/index.d.ts +2 -8
- package/lib/components/SettingDrawer/Switch/index.d.ts.map +1 -1
- package/lib/components/SettingDrawer/Switch/index.js +17 -34
- package/lib/components/SettingDrawer/Switch/index.js.map +1 -1
- package/lib/components/SettingDrawer/ThemeColor.d.ts +1 -6
- package/lib/components/SettingDrawer/ThemeColor.d.ts.map +1 -1
- package/lib/components/SettingDrawer/ThemeColor.js +3 -0
- package/lib/components/SettingDrawer/ThemeColor.js.map +1 -1
- package/lib/components/SettingDrawer/ThemeSelector.d.ts +3 -0
- package/lib/components/SettingDrawer/ThemeSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/ThemeSelector.js +18 -0
- package/lib/components/SettingDrawer/ThemeSelector.js.map +1 -0
- package/lib/components/SettingDrawer/types.d.ts +70 -0
- package/lib/components/SettingDrawer/types.d.ts.map +1 -0
- package/lib/components/ThemeProvider/ThemeProvider.d.ts +18 -0
- package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +1 -0
- package/lib/components/ThemeProvider/ThemeProvider.js +62 -0
- package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -0
- package/lib/components/ThemeProvider/ThemeToggle.d.ts +7 -0
- package/lib/components/ThemeProvider/ThemeToggle.d.ts.map +1 -0
- package/lib/components/ThemeProvider/index.d.ts +7 -0
- package/lib/components/ThemeProvider/index.d.ts.map +1 -0
- package/lib/components/ThemeProvider/themeRegistry.d.ts +3 -0
- package/lib/components/ThemeProvider/themeRegistry.d.ts.map +1 -0
- package/lib/components/ThemeProvider/themeRegistry.js +388 -0
- package/lib/components/ThemeProvider/themeRegistry.js.map +1 -0
- package/lib/components/ThemeProvider/themeUtils.d.ts +26 -0
- package/lib/components/ThemeProvider/themeUtils.d.ts.map +1 -0
- package/lib/components/ThemeProvider/themeUtils.js +135 -0
- package/lib/components/ThemeProvider/themeUtils.js.map +1 -0
- package/lib/components/ThemeProvider/types.d.ts +112 -0
- package/lib/components/ThemeProvider/types.d.ts.map +1 -0
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +3 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
- package/lib/components/typings.d.ts +8 -0
- package/lib/components/typings.d.ts.map +1 -1
- package/lib/compute.d.ts.map +1 -1
- package/lib/compute.js +6 -4
- package/lib/compute.js.map +1 -1
- package/lib/icons.d.ts +14 -0
- package/lib/icons.d.ts.map +1 -0
- package/lib/icons.js +13 -0
- package/lib/icons.js.map +1 -0
- package/lib/index.d.ts +0 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/machines/settingsMachine.d.ts +3 -0
- package/lib/machines/settingsMachine.d.ts.map +1 -0
- package/lib/machines/settingsMachine.js +220 -0
- package/lib/machines/settingsMachine.js.map +1 -0
- package/lib/machines/types.d.ts +67 -0
- package/lib/machines/types.d.ts.map +1 -0
- package/lib/routes.json +1 -0
- package/lib/styles/index.css +438 -46
- package/package.json +5 -5
- package/lib/utils/index.d.ts +0 -2
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.js +0 -13
- package/lib/utils/index.js.map +0 -1
|
@@ -1,88 +1,168 @@
|
|
|
1
|
-
import {jsx,jsxs}from'react/jsx-runtime';import {useState}from'react';import {
|
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';import {useState}from'react';import {Link}from'@remix-run/react';import {generateMenuPath}from'@admin-layout/client';import {generateLightShade}from'../BasicLayout/utils.js';import {icons}from'../../../icons.js';const SidebarMenu = ({
|
|
2
2
|
menuData,
|
|
3
3
|
routeParams,
|
|
4
|
-
settings
|
|
4
|
+
settings,
|
|
5
|
+
collapsed
|
|
5
6
|
}) => {
|
|
6
|
-
// Track open menus by their depth level
|
|
7
7
|
const [openMenusByLevel, setOpenMenusByLevel] = useState({});
|
|
8
|
-
// Track the currently active menu item
|
|
9
8
|
const [activePath, setActivePath] = useState('/dashboard');
|
|
9
|
+
const [hoveredMenu, setHoveredMenu] = useState(null);
|
|
10
|
+
const [popupPosition, setPopupPosition] = useState({
|
|
11
|
+
top: 0,
|
|
12
|
+
height: 0
|
|
13
|
+
});
|
|
14
|
+
const {
|
|
15
|
+
ChevronDownIcon,
|
|
16
|
+
ChevronRightIcon
|
|
17
|
+
} = icons;
|
|
10
18
|
const toggleMenu = (path, depth, e) => {
|
|
11
|
-
// Prevent link navigation when clicking on a parent menu with children
|
|
12
19
|
e.preventDefault();
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (newState[depth] === path) {
|
|
19
|
-
newState[depth] = null;
|
|
20
|
-
}
|
|
21
|
-
// Otherwise, close any other menu at this depth level and open this one
|
|
22
|
-
else {
|
|
23
|
-
newState[depth] = path;
|
|
24
|
-
}
|
|
25
|
-
return newState;
|
|
26
|
-
});
|
|
20
|
+
if (collapsed) return;
|
|
21
|
+
setOpenMenusByLevel(prev => ({
|
|
22
|
+
...prev,
|
|
23
|
+
[depth]: prev[depth] === path ? null : path
|
|
24
|
+
}));
|
|
27
25
|
};
|
|
28
26
|
const handleMenuClick = (path, hasChildren, depth, e) => {
|
|
29
|
-
if (hasChildren) {
|
|
27
|
+
if (hasChildren && !collapsed) {
|
|
30
28
|
toggleMenu(path, depth, e);
|
|
31
29
|
} else {
|
|
32
|
-
// For leaf items, set as active and allow navigation
|
|
33
30
|
setActivePath(path);
|
|
34
31
|
}
|
|
35
32
|
};
|
|
36
|
-
const
|
|
33
|
+
const getFirstLetter = name => {
|
|
34
|
+
return name.charAt(0).toUpperCase();
|
|
35
|
+
};
|
|
36
|
+
const handleMenuHover = (e, item, isHoverMenu) => {
|
|
37
|
+
// Only set hover state if the menu has children
|
|
38
|
+
if (collapsed && !isHoverMenu && item.children && item.children.length > 0) {
|
|
39
|
+
const element = e.currentTarget;
|
|
40
|
+
const rect = element.getBoundingClientRect();
|
|
41
|
+
let top = rect.top;
|
|
42
|
+
// Store the height to use for positioning
|
|
43
|
+
setPopupPosition({
|
|
44
|
+
top: top,
|
|
45
|
+
height: rect.height
|
|
46
|
+
});
|
|
47
|
+
setHoveredMenu(item.path);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const handleMenuLeave = (item, isHoverMenu) => {
|
|
51
|
+
if (collapsed && !isHoverMenu) {
|
|
52
|
+
setHoveredMenu(null);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const renderPopupMenu = (item, depth = 0) => {
|
|
56
|
+
if (!item.children || item.children.length === 0) return null;
|
|
57
|
+
const bgColor = generateLightShade(settings?.primaryColor, 0.98);
|
|
58
|
+
const sidebarWidth = collapsed ? 64 : 256; // 80px for collapsed (w-20), 256px for expanded (w-64)
|
|
59
|
+
return jsxs("div", {
|
|
60
|
+
className: "fixed shadow-xl rounded-md border border-gray-100 z-[999] overflow-hidden",
|
|
61
|
+
style: {
|
|
62
|
+
backgroundColor: bgColor,
|
|
63
|
+
left: `${sidebarWidth}px`,
|
|
64
|
+
// Position right after sidebar
|
|
65
|
+
top: `${popupPosition.top}px`,
|
|
66
|
+
boxShadow: '0 5px 15px rgba(0, 0, 0, 0.2)',
|
|
67
|
+
animation: 'fadeIn 0.2s ease-out forwards',
|
|
68
|
+
maxWidth: 'calc(100vw - 100px)',
|
|
69
|
+
// Prevent overflow on small screens
|
|
70
|
+
width: 'max-content',
|
|
71
|
+
minWidth: '220px'
|
|
72
|
+
},
|
|
73
|
+
children: [jsx("style", {
|
|
74
|
+
dangerouslySetInnerHTML: {
|
|
75
|
+
__html: `
|
|
76
|
+
@keyframes fadeIn {
|
|
77
|
+
from { opacity: 0; transform: translateX(-10px); }
|
|
78
|
+
to { opacity: 1; transform: translateX(0); }
|
|
79
|
+
}
|
|
80
|
+
`
|
|
81
|
+
}
|
|
82
|
+
}), jsx("div", {
|
|
83
|
+
className: "font-medium text-sm px-4 py-3 border-b border-gray-100 whitespace-nowrap",
|
|
84
|
+
style: {
|
|
85
|
+
backgroundColor: generateLightShade(settings?.primaryColor, 0.95)
|
|
86
|
+
},
|
|
87
|
+
children: jsx("span", {
|
|
88
|
+
style: {
|
|
89
|
+
color: settings?.primaryColor
|
|
90
|
+
},
|
|
91
|
+
children: item.name
|
|
92
|
+
})
|
|
93
|
+
}), jsx("div", {
|
|
94
|
+
className: "max-h-[400px] overflow-y-auto overflow-x-hidden py-1",
|
|
95
|
+
children: item.children.map(child => jsx("div", {
|
|
96
|
+
className: "w-full min-w-max",
|
|
97
|
+
children: renderMenuItem(child, depth + 1, true)
|
|
98
|
+
}, child.path))
|
|
99
|
+
})]
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
const renderMenuItem = (item, depth = 0, isHoverMenu = false) => {
|
|
37
103
|
const hasChildren = item.children && item.children.length > 0;
|
|
38
104
|
const isOpen = openMenusByLevel[depth] === item.path;
|
|
39
105
|
const isActive = activePath === item.path;
|
|
106
|
+
const isHovered = hoveredMenu === item.path;
|
|
40
107
|
const paddingLeft = `${depth * 1}rem`;
|
|
41
|
-
|
|
42
|
-
let bgColor = generateLightShade(settings?.primaryColor, 0.89);
|
|
108
|
+
const bgColor = generateLightShade(settings?.primaryColor, 0.89);
|
|
43
109
|
return jsxs("div", {
|
|
44
|
-
className:
|
|
110
|
+
className: `w-full relative group ${isHovered && collapsed && !isHoverMenu ? `rounded-md` : ''}`,
|
|
111
|
+
style: {
|
|
112
|
+
backgroundColor: isHovered && !isHoverMenu ? bgColor : ''
|
|
113
|
+
},
|
|
114
|
+
onMouseEnter: e => handleMenuHover(e, item, isHoverMenu),
|
|
115
|
+
onMouseLeave: () => handleMenuLeave(item, isHoverMenu),
|
|
45
116
|
children: [jsxs(Link, {
|
|
46
|
-
to: generateMenuPath(item?.path, routeParams),
|
|
47
|
-
className: `flex items-center justify-between w-full px-
|
|
117
|
+
to: hasChildren && collapsed && !isHoverMenu ? '#' : generateMenuPath(item?.path, routeParams),
|
|
118
|
+
className: `flex items-center justify-between w-full px-1 py-2 hover:bg-gray-100 text-sm cursor-pointer transition-colors rounded-md mx-1 my-0.5 whitespace-nowrap overflow-hidden text-ellipsis`,
|
|
48
119
|
style: {
|
|
49
120
|
paddingLeft: `calc(1rem + ${paddingLeft})`,
|
|
50
|
-
backgroundColor: isActive ? bgColor : ''
|
|
121
|
+
backgroundColor: isActive || isHovered ? bgColor : ''
|
|
51
122
|
},
|
|
52
123
|
onClick: e => handleMenuClick(item.path, hasChildren, depth, e),
|
|
53
124
|
children: [jsxs("div", {
|
|
54
|
-
className:
|
|
55
|
-
children: [item.icon
|
|
125
|
+
className: `flex items-center ${collapsed && !isHoverMenu ? 'justify-center w-full' : 'gap-3'}`,
|
|
126
|
+
children: [item.icon ? jsx("span", {
|
|
127
|
+
className: `${isActive || isHovered ? 'text-primary' : ''} flex-shrink-0`,
|
|
56
128
|
style: {
|
|
57
|
-
color: isActive ? settings?.primaryColor : ''
|
|
129
|
+
color: isActive || isHovered ? settings?.primaryColor : ''
|
|
58
130
|
},
|
|
59
131
|
children: item.icon
|
|
60
|
-
})
|
|
61
|
-
className:
|
|
132
|
+
}) : collapsed && !isHoverMenu ? jsx("span", {
|
|
133
|
+
className: "flex items-center justify-center flex-shrink-0",
|
|
134
|
+
style: {
|
|
135
|
+
color: isActive ? settings?.primaryColor : ''
|
|
136
|
+
},
|
|
137
|
+
children: getFirstLetter(item.name)
|
|
138
|
+
}) : null, (!collapsed || isHoverMenu) && jsx("span", {
|
|
139
|
+
className: "font-medium whitespace-nowrap overflow-hidden text-ellipsis",
|
|
62
140
|
style: {
|
|
63
141
|
color: isActive ? settings?.primaryColor : ''
|
|
64
142
|
},
|
|
65
143
|
children: item.name
|
|
66
144
|
})]
|
|
67
|
-
}), hasChildren && jsx("span", {
|
|
145
|
+
}), hasChildren && (!collapsed || isHoverMenu) && jsx("span", {
|
|
68
146
|
style: {
|
|
69
147
|
color: isActive ? settings?.primaryColor : ''
|
|
70
148
|
},
|
|
71
|
-
|
|
149
|
+
className: "flex-shrink-0 ml-1",
|
|
150
|
+
children: isOpen ? jsx(ChevronDownIcon, {
|
|
72
151
|
className: "h-4 w-4"
|
|
73
|
-
}) : jsx(
|
|
152
|
+
}) : jsx(ChevronRightIcon, {
|
|
74
153
|
className: "h-4 w-4"
|
|
75
154
|
})
|
|
76
155
|
})]
|
|
77
|
-
}), hasChildren && isOpen && jsx("div", {
|
|
156
|
+
}), collapsed && hasChildren && isHovered && !isHoverMenu && item.children.length > 0 && renderPopupMenu(item, depth), hasChildren && isOpen && !collapsed && jsx("div", {
|
|
78
157
|
className: "transition-all duration-200 ease-in-out",
|
|
79
158
|
children: item.children.map(child => renderMenuItem(child, depth + 1))
|
|
80
159
|
})]
|
|
81
160
|
}, item.path);
|
|
82
161
|
};
|
|
83
162
|
return jsx("div", {
|
|
163
|
+
className: "overflow-hidden",
|
|
84
164
|
children: jsx("nav", {
|
|
85
|
-
className:
|
|
165
|
+
className: `mt-2 ${collapsed ? 'px-1' : 'px-2'} overflow-x-hidden`,
|
|
86
166
|
children: menuData.map(item => renderMenuItem(item))
|
|
87
167
|
})
|
|
88
168
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarMenu.js","sources":["../../../../src/components/Layout/Sidebar/SidebarMenu.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SidebarMenu.js","sources":["../../../../src/components/Layout/Sidebar/SidebarMenu.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TailwindLayout.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/TailwindLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAqB,MAAM,sBAAsB,CAAC;AAE3E,OAAO,KAAqC,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAqC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"TailwindLayout.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/TailwindLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAqB,MAAM,sBAAsB,CAAC;AAE3E,OAAO,KAAqC,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAqC,MAAM,aAAa,CAAC;AAqDpG,KAAK,cAAc,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAEvD,QAAA,MAAM,SAAS;;;0EAAoB,CAAC;AAEpC,KAAK,+BAA+B,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAEzE,QAAA,MAAM,mBAAmB,EAAE,kBAAkB,CACzC,KAAK,CAAC,mBAAmB,CAAC,CAAC,KAAK,EAAE,+BAA+B,KAAK,GAAG,CAAC,OAAO,CAAC,EAClF,GAAG,CAC8C,CAAC;AAEtD,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import {jsx}from'react/jsx-runtime';import {useLayoutSettings}from'@admin-layout/client';import {userSelector}from'@adminide-stack/user-auth0-client';import React__default,{useMemo}from'react';import {connect,useSelector}from'react-redux';import {BasicLayout}from'./BasicLayout/index.js';function BasicLayoutWithAuthorities(props) {
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import {useLayoutSettings}from'@admin-layout/client';import {userSelector}from'@adminide-stack/user-auth0-client';import React__default,{useMemo}from'react';import {connect,useSelector}from'react-redux';import {BasicLayout}from'./BasicLayout/index.js';import {settingsMachine}from'../../machines/settingsMachine.js';import {createActor}from'xstate';import {useSelector as useSelector$1}from'@xstate/react';function BasicLayoutWithAuthorities(props) {
|
|
2
2
|
const userData = useSelector(userSelector);
|
|
3
3
|
const {
|
|
4
4
|
settings,
|
|
5
5
|
setSettings
|
|
6
6
|
} = useLayoutSettings();
|
|
7
7
|
// const { authenticated, user } = isUserAuthenticated();
|
|
8
|
+
const settingsActor = createActor(settingsMachine, {
|
|
9
|
+
systemId: 'settings'
|
|
10
|
+
}).start();
|
|
11
|
+
const state = useSelector$1(settingsActor, state => state);
|
|
12
|
+
const settingXstate = state?.context;
|
|
8
13
|
const {
|
|
9
14
|
permissions
|
|
10
15
|
} = props;
|
|
@@ -27,8 +32,9 @@ import {jsx}from'react/jsx-runtime';import {useLayoutSettings}from'@admin-layout
|
|
|
27
32
|
authorities: permissions?.resolveConfiguration ?? permissions,
|
|
28
33
|
onSettingChange: onSettingChange,
|
|
29
34
|
mainHeaderProps: mainHeaderProps,
|
|
35
|
+
actor: settingsActor,
|
|
30
36
|
...props,
|
|
31
|
-
settings:
|
|
37
|
+
settings: settingXstate
|
|
32
38
|
});
|
|
33
39
|
}
|
|
34
40
|
const mapState = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TailwindLayout.js","sources":["../../../src/components/Layout/TailwindLayout.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TailwindLayout.js","sources":["../../../src/components/Layout/TailwindLayout.tsx"],"sourcesContent":[null],"names":[],"mappings":"0bASA,SAAS,0BAA0B,CAAC,KAAgF,EAAA;AAChH,EAAA,MAAA,WAAiB,WAAA,CAAA,YAAY,CAAA;QACvB;IACN,QAAyD;AACzD,IAAA;AACI,GAAA,GAAA,iBAAoB,EAAA;;AAGxB,EAAA,MAAA,aAA+B,GAAA,WAAA,CAAC,eAAe,EAAC;AAEhD,IAAA,QAAmB,EAAA;AACnB,GAAA,CAAA,CAAA,KAAM,EAAE;AACR,EAAA,MAAA,qBAAwB,CAAA,aACb,EAAA,KAAA,IAAA,KAAA,CAAA;AACH,EAAA,MAAA,aAAS,GAAA,KAAW,EAAA,OAAU;AACjC,EAAA,MACD;AAGJ,IAAA;WACK;AACG,EAAA,MAAA,eAAiB,GAAA,OAAO,CAAA,OAAE;aACzB,QAAA,GAAA,QAAA,EAAA,OAAA,EAAA,OAAA,GAAA;AACT,GAAA,CAAA,EAAE,CAAA,QAAA,CAAA,CAAA;QAEU,eAAA,GAAA,MAAA,IAAA;IACZ,CAAM,YAAa;AACnB,MAAA,MACI,WAAY,CAAA,MAAA,CAAA;AAUpB,KAAC,GAAA;AAED,GAAM;;QAEM;AACX,IAAE,WAAA,EAAA;AAMH,MAAM;AAIN,KAAM,GAAA;AAKN,GAAA,GAAA,KAAA;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const ADDITIONAL_SETTINGS_SLOT_FILL_NAME = "additional_settings_slot_fill";
|
|
2
|
+
export declare const AdditionalSettingsSlot: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const AdditionalSettingsFillCard: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=AdditionalSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdditionalSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/slot-fill/AdditionalSettings.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,kCAAkC,kCAAkC,CAAC;AAElF,eAAO,MAAM,sBAAsB,yDAElC,CAAC;AAEF,eAAO,MAAM,0BAA0B,yDAEtC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import {Slot}from'@common-stack/components-pro';const ADDITIONAL_SETTINGS_SLOT_FILL_NAME = 'additional_settings_slot_fill';
|
|
2
|
+
const AdditionalSettingsSlot = props => {
|
|
3
|
+
return jsx(Slot, {
|
|
4
|
+
name: ADDITIONAL_SETTINGS_SLOT_FILL_NAME,
|
|
5
|
+
fillProps: props
|
|
6
|
+
});
|
|
7
|
+
};export{ADDITIONAL_SETTINGS_SLOT_FILL_NAME,AdditionalSettingsSlot};//# sourceMappingURL=AdditionalSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdditionalSettings.js","sources":["../../../../src/components/Layout/slot-fill/AdditionalSettings.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"oFAIO,MAAM,kCAAkC,GAAG;AAErC,MAAA,sBAAsB,GAAG,KAAC,IAAS;SACrCA,GAAA,CAAA,IAAK,EAAA;AAChB,IAAE,IAAA,EAAA,kCAAA;AAEF,IAAA,SAAa,EAAA;IACT;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/slot-fill/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/slot-fill/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
list?: any[];
|
|
3
|
-
changeSetting?: (key: string, value: string | boolean | any) => void;
|
|
4
|
-
settings?: any;
|
|
5
|
-
};
|
|
1
|
+
import { ICheckboxThemeProps } from './types';
|
|
6
2
|
export default function CheckBoxTheme(props: ICheckboxThemeProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
8
3
|
//# sourceMappingURL=CheckBoxTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckBoxTheme.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/CheckBoxTheme.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CheckBoxTheme.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/CheckBoxTheme.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAsD9C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,mBAAmB,2CAiC/D"}
|
|
@@ -1,47 +1,122 @@
|
|
|
1
|
-
import {jsx
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';const themelist = [{
|
|
2
|
+
key: 'light',
|
|
3
|
+
title: 'Light',
|
|
4
|
+
svg: jsxs("svg", {
|
|
5
|
+
width: "58",
|
|
6
|
+
height: "50",
|
|
7
|
+
viewBox: "0 0 58 50",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
children: [jsx("defs", {
|
|
10
|
+
children: jsx("filter", {
|
|
11
|
+
id: "softShadow",
|
|
12
|
+
x: "-20%",
|
|
13
|
+
y: "-20%",
|
|
14
|
+
width: "140%",
|
|
15
|
+
height: "140%",
|
|
16
|
+
children: jsx("feDropShadow", {
|
|
17
|
+
dx: "0",
|
|
18
|
+
dy: "2",
|
|
19
|
+
stdDeviation: "4",
|
|
20
|
+
floodColor: "#000000",
|
|
21
|
+
floodOpacity: "0.1"
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
}), jsx("rect", {
|
|
25
|
+
x: "0",
|
|
26
|
+
y: "0",
|
|
27
|
+
width: "58",
|
|
28
|
+
height: "50",
|
|
29
|
+
rx: "8",
|
|
30
|
+
fill: "#ffffff",
|
|
31
|
+
filter: "url(#softShadow)"
|
|
32
|
+
})]
|
|
33
|
+
})
|
|
34
|
+
}, {
|
|
35
|
+
key: 'realDark',
|
|
36
|
+
title: 'realDark',
|
|
37
|
+
svg: jsxs("svg", {
|
|
38
|
+
width: "58",
|
|
39
|
+
height: "50",
|
|
40
|
+
viewBox: "0 0 58 50",
|
|
41
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
42
|
+
children: [jsx("rect", {
|
|
43
|
+
x: "0",
|
|
44
|
+
y: "0",
|
|
45
|
+
width: "58",
|
|
46
|
+
height: "50",
|
|
47
|
+
rx: "8",
|
|
48
|
+
fill: "#ffffff"
|
|
49
|
+
}), jsx("path", {
|
|
50
|
+
d: "M0,8\n A8,8 0 0 1 8,0\n H18\n V50\n H8\n A8,8 0 0 1 0,42\n Z",
|
|
51
|
+
fill: "#011627"
|
|
52
|
+
})]
|
|
53
|
+
})
|
|
54
|
+
}, {
|
|
55
|
+
key: 'dark',
|
|
56
|
+
title: 'Dark',
|
|
57
|
+
svg: jsxs("svg", {
|
|
58
|
+
width: "58",
|
|
59
|
+
height: "50",
|
|
60
|
+
viewBox: "0 0 58 50",
|
|
61
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
62
|
+
children: [jsx("rect", {
|
|
63
|
+
width: "58",
|
|
64
|
+
height: "50",
|
|
65
|
+
rx: "8",
|
|
66
|
+
fill: "#000000"
|
|
67
|
+
}), jsx("clipPath", {
|
|
68
|
+
id: "roundedClip",
|
|
69
|
+
children: jsx("rect", {
|
|
70
|
+
width: "58",
|
|
71
|
+
height: "50",
|
|
72
|
+
rx: "8"
|
|
73
|
+
})
|
|
74
|
+
}), jsxs("g", {
|
|
75
|
+
clipPath: "url(#roundedClip)",
|
|
76
|
+
children: [jsx("rect", {
|
|
77
|
+
x: "0",
|
|
78
|
+
y: "13",
|
|
79
|
+
width: "29",
|
|
80
|
+
height: "37",
|
|
81
|
+
fill: "#0d1117"
|
|
82
|
+
}), jsx("rect", {
|
|
83
|
+
x: "29",
|
|
84
|
+
y: "13",
|
|
85
|
+
width: "29",
|
|
86
|
+
height: "37",
|
|
87
|
+
fill: "#233445"
|
|
88
|
+
})]
|
|
89
|
+
})]
|
|
90
|
+
})
|
|
91
|
+
}];
|
|
92
|
+
function CheckBoxTheme(props) {
|
|
2
93
|
const {
|
|
3
94
|
list,
|
|
4
95
|
changeSetting,
|
|
5
96
|
settings
|
|
6
97
|
} = props;
|
|
7
98
|
return jsx("div", {
|
|
8
|
-
className: "flex flex-row",
|
|
9
|
-
children:
|
|
10
|
-
return
|
|
11
|
-
className: "
|
|
99
|
+
className: "flex flex-row gap-4",
|
|
100
|
+
children: themelist.map((themeItems, index) => {
|
|
101
|
+
return jsx("div", {
|
|
102
|
+
className: "relative cursor-pointer hover:opacity-80 transition-opacity",
|
|
12
103
|
style: {
|
|
13
104
|
boxShadow: '0 1px 2.5px 0 rgb(0 0 0 / 18%)'
|
|
14
105
|
},
|
|
15
106
|
onClick: () => {
|
|
16
107
|
changeSetting('navTheme', themeItems.key);
|
|
17
|
-
changeSetting('primaryColor', settings
|
|
108
|
+
changeSetting('primaryColor', settings?.primaryColor);
|
|
18
109
|
},
|
|
19
|
-
children:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
className: "w-3/10 rounded-bl",
|
|
28
|
-
style: {
|
|
29
|
-
backgroundColor: themeItems.key === 'dark' ? 'rgba(13,32,51,1)' : '#ffff'
|
|
30
|
-
}
|
|
31
|
-
}), jsx("div", {
|
|
32
|
-
className: "w-7/10 rounded-br",
|
|
33
|
-
style: {
|
|
34
|
-
backgroundColor: themeItems.key == 'dark' ? 'rgba(38,55,72,1)' : '#f0f2f5'
|
|
35
|
-
}
|
|
110
|
+
children: jsxs("div", {
|
|
111
|
+
children: [themeItems.svg, settings?.navTheme === themeItems.key && jsx("svg", {
|
|
112
|
+
className: "absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-6 h-6 text-blue-500",
|
|
113
|
+
viewBox: "0 0 24 24",
|
|
114
|
+
fill: "currentColor",
|
|
115
|
+
children: jsx("path", {
|
|
116
|
+
d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
|
117
|
+
})
|
|
36
118
|
})]
|
|
37
|
-
})
|
|
38
|
-
className: "relative -bottom-8 left-8 w-4 h-4",
|
|
39
|
-
viewBox: "0 0 24 24",
|
|
40
|
-
fill: "currentColor",
|
|
41
|
-
children: jsx("path", {
|
|
42
|
-
d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
|
43
|
-
})
|
|
44
|
-
}) : '']
|
|
119
|
+
})
|
|
45
120
|
}, `themeItem_${index}`);
|
|
46
121
|
})
|
|
47
122
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckBoxTheme.js","sources":["../../../src/components/SettingDrawer/CheckBoxTheme.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"CheckBoxTheme.js","sources":["../../../src/components/SettingDrawer/CheckBoxTheme.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":"yCAGA,MAAM,SAAS,GAAG,CAAA;AACd,EAAA,GAAA,EAAA,OAAA;AACI,EAAA,KAAA,EAAA,OAAY;AACZ,EAAA,GAAA,EAAAA,IAAA,CAAK,KAAS,EAAA;SACX,EAAA,IACM;AASZ,IAAA,MAAA,EAAA,IAAA;AACD,IAAA,OAAA,EAAA,WAAA;AACI,IAAA,KAAA,EAAG,4BAAY;AACf,IAAA,QAAA,GAAOC,GAAU,CAAA,MAAA,EAAA;cAEb,EAAAA,GAAA,CAAA,QAAK,EAAK;AAcjB,QAAA,EAAA,EAAA,YAAA;AACD,QAAA,CAAA,EAAA,MAAA;AACI,QAAA,CAAA,EAAG,MAAQ;AACX,QAAA,KAAK,EAAE,MAAM;QACb,MACI,EAAK,MAAA;AAWZ,QAAA,QAAA,EAAAA,GAAA,CAAA,cAAA,EAAA;UACH,EAAA,EAAA,GAAA;AAEF,UAAO,EAAA,EAAO,GAAU;UACd,YAAQ,EAAA,GAAA;AACd,UAAA,UACI,EAAA,SAAc;AAEN,UAAA,YAGQ,EAAA;AAGI,SAAA;AACA,OAAA;AACJ,KAAA,CAAA,EAAAA,GAAA,CAAA;SAiBX,GACC;AAEd,MAAC,CAAA,EAAA,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type ILayoutSettingsProps = {
|
|
3
|
-
settings?: Partial<ProSettings>;
|
|
4
|
-
changeSetting?: (key: string, value: string | boolean) => void;
|
|
5
|
-
};
|
|
1
|
+
import { ILayoutSettingsProps } from './types';
|
|
6
2
|
export default function LayoutChange(props: ILayoutSettingsProps): import("react/jsx-runtime").JSX.Element;
|
|
7
3
|
//# sourceMappingURL=LayoutChange.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutChange.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/LayoutChange.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutChange.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/LayoutChange.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,oBAAoB,2CA0C/D"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {jsxs,jsx}from'react/jsx-runtime';import {
|
|
2
|
-
useState();
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {Switch}from'./Switch/index.js';function LayoutChange(props) {
|
|
3
2
|
const {
|
|
4
3
|
settings,
|
|
5
4
|
changeSetting
|
|
@@ -8,61 +7,58 @@ import {jsxs,jsx}from'react/jsx-runtime';import {useState}from'react';import {us
|
|
|
8
7
|
t
|
|
9
8
|
} = useTranslation('settings');
|
|
10
9
|
const {
|
|
11
|
-
|
|
12
|
-
splitMenus,
|
|
13
|
-
fixedHeader,
|
|
14
|
-
layout,
|
|
15
|
-
fixSiderbar,
|
|
10
|
+
layout = {},
|
|
16
11
|
navTheme
|
|
17
|
-
} = settings;
|
|
12
|
+
} = settings || {};
|
|
13
|
+
const handleLayoutChange = (key, value) => {
|
|
14
|
+
if (!changeSetting) return;
|
|
15
|
+
changeSetting('layout', {
|
|
16
|
+
...layout,
|
|
17
|
+
[key]: value
|
|
18
|
+
});
|
|
19
|
+
};
|
|
18
20
|
return jsxs("div", {
|
|
19
21
|
children: [jsxs("div", {
|
|
20
22
|
className: "flex items-center mt-4",
|
|
21
23
|
children: [jsx("p", {
|
|
22
24
|
className: "mb-0",
|
|
23
25
|
style: {
|
|
24
|
-
color: navTheme
|
|
26
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
25
27
|
},
|
|
26
28
|
children: t('fixed_header')
|
|
27
29
|
}), jsx("div", {
|
|
28
30
|
className: "flex-grow"
|
|
29
31
|
}), jsx(Switch, {
|
|
30
|
-
value: fixedHeader,
|
|
31
|
-
|
|
32
|
-
changeSetting: changeSetting,
|
|
33
|
-
settings: settings
|
|
32
|
+
value: layout.fixedHeader,
|
|
33
|
+
onChange: checked => handleLayoutChange('fixedHeader', checked)
|
|
34
34
|
})]
|
|
35
35
|
}), jsxs("div", {
|
|
36
36
|
className: "flex items-center mt-4",
|
|
37
37
|
children: [jsx("p", {
|
|
38
38
|
className: "mb-0",
|
|
39
39
|
style: {
|
|
40
|
-
color: navTheme
|
|
40
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
41
41
|
},
|
|
42
42
|
children: t('fixed_sidebar')
|
|
43
43
|
}), jsx("div", {
|
|
44
44
|
className: "flex-grow"
|
|
45
45
|
}), jsx(Switch, {
|
|
46
|
-
value:
|
|
47
|
-
|
|
48
|
-
changeSetting: changeSetting,
|
|
49
|
-
settings: settings
|
|
46
|
+
value: layout.fixedSidebar,
|
|
47
|
+
onChange: checked => handleLayoutChange('fixedSidebar', checked)
|
|
50
48
|
})]
|
|
51
49
|
}), jsxs("div", {
|
|
52
50
|
className: "flex items-center mt-4",
|
|
53
51
|
children: [jsx("p", {
|
|
54
52
|
className: "mb-0",
|
|
55
53
|
style: {
|
|
56
|
-
color: navTheme
|
|
54
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
57
55
|
},
|
|
58
56
|
children: t('split_menus')
|
|
59
57
|
}), jsx("div", {
|
|
60
58
|
className: "flex-grow"
|
|
61
59
|
}), jsx(Switch, {
|
|
62
|
-
value: splitMenus,
|
|
63
|
-
|
|
64
|
-
changeSetting: changeSetting,
|
|
65
|
-
settings: settings
|
|
60
|
+
value: layout.splitMenus,
|
|
61
|
+
onChange: checked => handleLayoutChange('splitMenus', checked)
|
|
66
62
|
})]
|
|
67
63
|
})]
|
|
68
64
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutChange.js","sources":["../../../src/components/SettingDrawer/LayoutChange.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutChange.js","sources":["../../../src/components/SettingDrawer/LayoutChange.tsx"],"sourcesContent":[null],"names":[],"mappings":"2HAKwB,SAAA,YAAY,CAAC,KAA2B,EAAA;AAC5D,EAAA,MAAA;IACA,QAAQ;IACR;AAEA,GAAA,GAAA;AACI,EAAA,MAAA;;oBAEa,CAAA,UAAW,CAAA;AACpB,EAAA,MAAA;aACC,EAAA;AACJ,IAAA;AACL,GAAA,GAAE,QAAA,IAAA,EAAA;QAEK,gCAEM,KAAA;AA0BjB,IAAC,IAAA,CAAA,aAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationsModes.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/NavigationsModes.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AA2E/C,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CAoExF"}
|