@licklist/design 0.78.21 → 0.78.26
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/assets/Trend-Down.svg +3 -0
- package/dist/assets/Trend-Up.svg +3 -0
- package/dist/auth/Authorizer.d.ts.map +1 -1
- package/dist/auth/Authorizer.js +47 -12
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/v2/components/EntityHeader/EntityHeader.d.ts +13 -0
- package/dist/v2/components/EntityHeader/EntityHeader.d.ts.map +1 -0
- package/dist/v2/components/EntityHeader/EntityHeader.js +85 -0
- package/dist/v2/components/EntityHeader/EntityHeader.scss.js +6 -0
- package/dist/v2/components/EntityHeader/index.d.ts +2 -0
- package/dist/v2/components/EntityHeader/index.d.ts.map +1 -0
- package/dist/v2/components/NPSScore/NPSScore.d.ts +18 -0
- package/dist/v2/components/NPSScore/NPSScore.d.ts.map +1 -0
- package/dist/v2/components/NPSScore/index.d.ts +3 -0
- package/dist/v2/components/NPSScore/index.d.ts.map +1 -0
- package/dist/v2/components/Select/Select.d.ts +10 -0
- package/dist/v2/components/Select/Select.d.ts.map +1 -0
- package/dist/v2/components/Select/index.d.ts +3 -0
- package/dist/v2/components/Select/index.d.ts.map +1 -0
- package/dist/v2/components/Tooltip/Tooltip.d.ts +21 -0
- package/dist/v2/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/v2/components/Tooltip/Tooltip.js +103 -0
- package/dist/v2/components/Tooltip/Tooltip.scss.js +6 -0
- package/dist/v2/components/Tooltip/index.d.ts +2 -0
- package/dist/v2/components/Tooltip/index.d.ts.map +1 -0
- package/dist/v2/components/UserAvatar/UserAvatar.d.ts +12 -0
- package/dist/v2/components/UserAvatar/UserAvatar.d.ts.map +1 -0
- package/dist/v2/components/UserAvatar/UserAvatar.js +77 -0
- package/dist/v2/components/UserAvatar/UserAvatar.scss.js +6 -0
- package/dist/v2/components/UserAvatar/index.d.ts +2 -0
- package/dist/v2/components/UserAvatar/index.d.ts.map +1 -0
- package/dist/v2/components/UserPanel/UserPanel.d.ts +17 -0
- package/dist/v2/components/UserPanel/UserPanel.d.ts.map +1 -0
- package/dist/v2/components/UserPanel/UserPanel.js +144 -0
- package/dist/v2/components/UserPanel/UserPanel.scss.js +6 -0
- package/dist/v2/components/UserPanel/index.d.ts +3 -0
- package/dist/v2/components/UserPanel/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/blog-posts/Blog.d.ts +15 -0
- package/dist/v2/dashboard-analytics/blog-posts/Blog.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/blog-posts/index.d.ts +3 -0
- package/dist/v2/dashboard-analytics/blog-posts/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/chart/Chart.d.ts +21 -0
- package/dist/v2/dashboard-analytics/chart/Chart.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/chart/index.d.ts +3 -0
- package/dist/v2/dashboard-analytics/chart/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/dashboard/Dashboard.d.ts +57 -0
- package/dist/v2/dashboard-analytics/dashboard/Dashboard.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/dashboard/index.d.ts +3 -0
- package/dist/v2/dashboard-analytics/dashboard/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/index.d.ts +13 -0
- package/dist/v2/dashboard-analytics/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/metric-card/MetricCard.d.ts +17 -0
- package/dist/v2/dashboard-analytics/metric-card/MetricCard.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/metric-card/index.d.ts +3 -0
- package/dist/v2/dashboard-analytics/metric-card/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/venue-card/VenueCard.d.ts +12 -0
- package/dist/v2/dashboard-analytics/venue-card/VenueCard.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/venue-card/index.d.ts +3 -0
- package/dist/v2/dashboard-analytics/venue-card/index.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.d.ts +25 -0
- package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.d.ts.map +1 -0
- package/dist/v2/dashboard-analytics/venue-closed-card/index.d.ts +3 -0
- package/dist/v2/dashboard-analytics/venue-closed-card/index.d.ts.map +1 -0
- package/dist/v2/index.d.ts +11 -5
- package/dist/v2/index.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/AdminSidebar.d.ts +10 -0
- package/dist/v2/navigation/DashboardLayout/AdminSidebar.d.ts.map +1 -0
- package/dist/v2/navigation/DashboardLayout/AdminSidebar.js +296 -0
- package/dist/v2/navigation/DashboardLayout/AdminSidebar.scss.js +6 -0
- package/dist/v2/navigation/DashboardLayout/DashboardFooter.d.ts +7 -0
- package/dist/v2/navigation/DashboardLayout/DashboardFooter.d.ts.map +1 -0
- package/dist/v2/navigation/DashboardLayout/DashboardFooter.js +34 -0
- package/dist/v2/navigation/DashboardLayout/DashboardFooter.scss.js +6 -0
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts +42 -0
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts.map +1 -0
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.js +176 -0
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.scss.js +6 -0
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts +35 -0
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts.map +1 -0
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.js +366 -0
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.scss.js +6 -0
- package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts +26 -0
- package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts.map +1 -0
- package/dist/v2/navigation/DashboardLayout/TopNavigation.js +360 -0
- package/dist/v2/navigation/DashboardLayout/TopNavigation.scss.js +6 -0
- package/dist/v2/navigation/DashboardLayout/assets/AdminLogo.png.js +3 -0
- package/dist/v2/navigation/DashboardLayout/assets/BookedLogo_Mark.png.js +3 -0
- package/dist/v2/navigation/DashboardLayout/index.d.ts +7 -0
- package/dist/v2/navigation/DashboardLayout/index.d.ts.map +1 -0
- package/package.json +5 -3
- package/src/assets/Trend-Down.svg +3 -0
- package/src/assets/Trend-Up.svg +3 -0
- package/src/auth/Authorizer.tsx +49 -20
- package/src/index.ts +2 -1
- package/src/v2/components/EntityHeader/EntityHeader.scss +133 -0
- package/src/v2/components/EntityHeader/EntityHeader.stories.tsx +103 -0
- package/src/v2/components/EntityHeader/EntityHeader.tsx +76 -0
- package/src/v2/components/EntityHeader/index.ts +1 -0
- package/src/v2/components/NPSScore/NPSScore.scss +330 -0
- package/src/v2/components/NPSScore/NPSScore.stories.tsx +29 -0
- package/src/v2/components/NPSScore/NPSScore.tsx +209 -0
- package/src/v2/components/NPSScore/index.ts +2 -0
- package/src/v2/components/Select/Select.scss +188 -0
- package/src/v2/components/Select/Select.stories.tsx +164 -0
- package/src/v2/components/Select/Select.tsx +56 -0
- package/src/v2/components/Select/index.ts +2 -0
- package/src/v2/components/Tooltip/Tooltip.scss +92 -0
- package/src/v2/components/Tooltip/Tooltip.stories.tsx +164 -0
- package/src/v2/components/Tooltip/Tooltip.tsx +64 -0
- package/src/v2/components/Tooltip/index.ts +8 -0
- package/src/v2/components/UserAvatar/UserAvatar.scss +62 -0
- package/src/v2/components/UserAvatar/UserAvatar.stories.tsx +94 -0
- package/src/v2/components/UserAvatar/UserAvatar.tsx +96 -0
- package/src/v2/components/UserAvatar/index.ts +1 -0
- package/src/v2/components/UserPanel/UserPanel.scss +195 -0
- package/src/v2/components/UserPanel/UserPanel.stories.tsx +66 -0
- package/src/v2/components/UserPanel/UserPanel.tsx +126 -0
- package/src/v2/components/UserPanel/index.ts +2 -0
- package/src/v2/dashboard-analytics/blog-posts/Blog.scss +92 -0
- package/src/v2/dashboard-analytics/blog-posts/Blog.stories.tsx +57 -0
- package/src/v2/dashboard-analytics/blog-posts/Blog.tsx +91 -0
- package/src/v2/dashboard-analytics/blog-posts/index.ts +2 -0
- package/src/v2/dashboard-analytics/chart/Chart.scss +424 -0
- package/src/v2/dashboard-analytics/chart/Chart.stories.tsx +157 -0
- package/src/v2/dashboard-analytics/chart/Chart.tsx +623 -0
- package/src/v2/dashboard-analytics/chart/index.ts +2 -0
- package/src/v2/dashboard-analytics/dashboard/Dashboard.scss +254 -0
- package/src/v2/dashboard-analytics/dashboard/Dashboard.stories.tsx +298 -0
- package/src/v2/dashboard-analytics/dashboard/Dashboard.tsx +248 -0
- package/src/v2/dashboard-analytics/dashboard/index.ts +2 -0
- package/src/v2/dashboard-analytics/index.ts +12 -0
- package/src/v2/dashboard-analytics/metric-card/MetricCard.scss +125 -0
- package/src/v2/dashboard-analytics/metric-card/MetricCard.stories.tsx +106 -0
- package/src/v2/dashboard-analytics/metric-card/MetricCard.tsx +72 -0
- package/src/v2/dashboard-analytics/metric-card/index.ts +2 -0
- package/src/v2/dashboard-analytics/venue-card/VenueCard.scss +112 -0
- package/src/v2/dashboard-analytics/venue-card/VenueCard.stories.tsx +40 -0
- package/src/v2/dashboard-analytics/venue-card/VenueCard.tsx +62 -0
- package/src/v2/dashboard-analytics/venue-card/index.ts +2 -0
- package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.scss +129 -0
- package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.stories.tsx +31 -0
- package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.tsx +61 -0
- package/src/v2/dashboard-analytics/venue-closed-card/index.ts +2 -0
- package/src/v2/design-system/colors/ColorSystem.scss +439 -0
- package/src/v2/design-system/colors/ColorSystem.stories.tsx +730 -0
- package/src/v2/design-system/typography/Typography.scss +295 -0
- package/src/v2/design-system/typography/Typography.stories.tsx +109 -0
- package/src/v2/index.ts +43 -7
- package/src/v2/navigation/DashboardLayout/AdminSidebar.scss +207 -0
- package/src/v2/navigation/DashboardLayout/AdminSidebar.tsx +171 -0
- package/src/v2/navigation/DashboardLayout/DashboardFooter.scss +30 -0
- package/src/v2/navigation/DashboardLayout/DashboardFooter.tsx +25 -0
- package/src/v2/navigation/DashboardLayout/DashboardLayout.scss +91 -0
- package/src/v2/navigation/DashboardLayout/DashboardLayout.stories.tsx +370 -0
- package/src/v2/navigation/DashboardLayout/DashboardLayout.tsx +233 -0
- package/src/v2/navigation/DashboardLayout/ProviderSidebar.scss +271 -0
- package/src/v2/navigation/DashboardLayout/ProviderSidebar.tsx +266 -0
- package/src/v2/navigation/DashboardLayout/Sidebar.stories.tsx +220 -0
- package/src/v2/navigation/DashboardLayout/TopNavigation.scss +206 -0
- package/src/v2/navigation/DashboardLayout/TopNavigation.tsx +279 -0
- package/src/v2/navigation/DashboardLayout/assets/AdminLogo.png +0 -0
- package/src/v2/navigation/DashboardLayout/assets/BookedLogo_Mark.png +0 -0
- package/src/v2/navigation/DashboardLayout/index.ts +20 -0
- package/src/v2/styles/index.scss +0 -1
- package/src/v2/styles/tokens/_colors.scss +531 -98
- package/dist/v2/components/Colors/Colors.d.ts +0 -21
- package/dist/v2/components/Colors/Colors.d.ts.map +0 -1
- package/dist/v2/components/Colors/index.d.ts +0 -3
- package/dist/v2/components/Colors/index.d.ts.map +0 -1
- package/dist/v2/components/Typography/Typography.d.ts +0 -11
- package/dist/v2/components/Typography/Typography.d.ts.map +0 -1
- package/dist/v2/components/Typography/index.d.ts +0 -3
- package/dist/v2/components/Typography/index.d.ts.map +0 -1
- package/src/v2/components/Colors/Colors.scss +0 -64
- package/src/v2/components/Colors/Colors.stories.tsx +0 -143
- package/src/v2/components/Colors/Colors.tsx +0 -51
- package/src/v2/components/Colors/ColorsAliases.stories.tsx +0 -285
- package/src/v2/components/Colors/Sizes.stories.tsx +0 -141
- package/src/v2/components/Colors/index.ts +0 -2
- package/src/v2/components/Typography/Typography.scss +0 -72
- package/src/v2/components/Typography/Typography.stories.tsx +0 -266
- package/src/v2/components/Typography/Typography.tsx +0 -56
- package/src/v2/components/Typography/index.ts +0 -2
- package/src/v2/styles/tokens/_aliases.scss +0 -199
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import './AdminSidebar.scss'
|
|
3
|
+
import AdminLogo from './assets/AdminLogo.png'
|
|
4
|
+
import { Tooltip } from '../../components/Tooltip'
|
|
5
|
+
|
|
6
|
+
export interface AdminSidebarProps {
|
|
7
|
+
expanded?: boolean
|
|
8
|
+
onNavigation?: (path: string) => void
|
|
9
|
+
activePath?: string
|
|
10
|
+
adminLogoUrl?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface NavItem {
|
|
14
|
+
id: string
|
|
15
|
+
label: string
|
|
16
|
+
path: string
|
|
17
|
+
icon: React.ReactNode
|
|
18
|
+
end?: boolean
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const HomeIcon = () => (
|
|
22
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
23
|
+
<path d="M17.7273 20.1182H6.27273C5.82086 20.1182 5.45455 19.7423 5.45455 19.2785V11.7207H3L11.4496 3.83661C11.7617 3.54543 12.2383 3.54543 12.5504 3.83661L21 11.7207H18.5455V19.2785C18.5455 19.7423 18.1792 20.1182 17.7273 20.1182ZM7.09091 18.4387H16.9091V10.1734L12 5.59288L7.09091 10.1734V18.4387Z" fill="currentColor" />
|
|
24
|
+
</svg>
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
const CompanyIcon = () => (
|
|
28
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
29
|
+
<path d="M19.5 18.75H4.5V17.25H5.25V6C5.25 5.58579 5.58579 5.25 6 5.25H16.5C16.9142 5.25 17.25 5.58579 17.25 6V9.75H18.75V17.25H19.5V18.75ZM15.75 17.25H17.25V11.25H12.75V17.25H14.25V12.75H15.75V17.25ZM15.75 9.75V6.75H6.75V17.25H11.25V9.75H15.75ZM8.25 11.25H9.75V12.75H8.25V11.25ZM8.25 14.25H9.75V15.75H8.25V14.25ZM8.25 8.25H9.75V9.75H8.25V8.25Z" fill="currentColor" />
|
|
30
|
+
</svg>
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
const ProvidersIcon = () => (
|
|
34
|
+
<svg width="24" height="24" viewBox="0 0 32 32" fill="none">
|
|
35
|
+
<path d="M8 10L17 6.5V24H8V10Z" fill="currentColor" fillOpacity="0.1"/>
|
|
36
|
+
<path d="M7 23V9.70046C7 9.27995 7.26307 8.90437 7.65826 8.76067L17.3291 5.24398C17.5886 5.14961 17.8755 5.28349 17.9699 5.54301C17.9898 5.59778 18 5.65561 18 5.71388V10.6667L24.3162 12.7721C24.7246 12.9082 25 13.2904 25 13.7208V23H27V25H5V23H7ZM9 23H16V7.85543L9 10.4009V23ZM23 23V14.4416L18 12.7749V23H23Z" fill="currentColor" />
|
|
37
|
+
</svg>
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
const UsersIcon = () => (
|
|
41
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
42
|
+
<path d="M4.5 19.5C4.5 16.1863 7.18629 13.5 10.5 13.5C13.8137 13.5 16.5 16.1863 16.5 19.5H15C15 17.0147 12.9853 15 10.5 15C8.01472 15 6 17.0147 6 19.5H4.5ZM10.5 12.75C8.01375 12.75 6 10.7362 6 8.25C6 5.76375 8.01375 3.75 10.5 3.75C12.9862 3.75 15 5.76375 15 8.25C15 10.7362 12.9862 12.75 10.5 12.75ZM10.5 11.25C12.1575 11.25 13.5 9.9075 13.5 8.25C13.5 6.5925 12.1575 5.25 10.5 5.25C8.8425 5.25 7.5 6.5925 7.5 8.25C7.5 9.9075 8.8425 11.25 10.5 11.25ZM16.7128 14.0271C18.7983 14.9671 20.25 17.064 20.25 19.5H18.75C18.75 17.673 17.6612 16.1003 16.0971 15.3953L16.7128 14.0271ZM16.1972 5.55991C17.6958 6.17777 18.75 7.65271 18.75 9.375C18.75 11.5276 17.1032 13.2939 15 13.4832V11.9734C16.2725 11.7916 17.25 10.698 17.25 9.375C17.25 8.33951 16.6512 7.44452 15.7808 7.01726L16.1972 5.55991Z" fill="currentColor" />
|
|
43
|
+
</svg>
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
const CustomersIcon = () => (
|
|
47
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
48
|
+
<path d="M4.5 19.5C4.5 16.1863 7.18629 13.5 10.5 13.5C13.8137 13.5 16.5 16.1863 16.5 19.5H15C15 17.0147 12.9853 15 10.5 15C8.01472 15 6 17.0147 6 19.5H4.5ZM10.5 12.75C8.01375 12.75 6 10.7362 6 8.25C6 5.76375 8.01375 3.75 10.5 3.75C12.9862 3.75 15 5.76375 15 8.25C15 10.7362 12.9862 12.75 10.5 12.75ZM10.5 11.25C12.1575 11.25 13.5 9.9075 13.5 8.25C13.5 6.5925 12.1575 5.25 10.5 5.25C8.8425 5.25 7.5 6.5925 7.5 8.25C7.5 9.9075 8.8425 11.25 10.5 11.25ZM16.7128 14.0271C18.7983 14.9671 20.25 17.064 20.25 19.5H18.75C18.75 17.673 17.6612 16.1003 16.0971 15.3953L16.7128 14.0271ZM16.1972 5.55991C17.6958 6.17777 18.75 7.65271 18.75 9.375C18.75 11.5276 17.1032 13.2939 15 13.4832V11.9734C16.2725 11.7916 17.25 10.698 17.25 9.375C17.25 8.33951 16.6512 7.44452 15.7808 7.01726L16.1972 5.55991Z" fill="currentColor" />
|
|
49
|
+
</svg>
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
const ReportsIcon = () => (
|
|
53
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
54
|
+
<path d="M11.25 8.25H12.75V15.75H11.25V8.25ZM14.25 11.25H15.75V15.75H14.25V11.25ZM8.25 12.75H9.75V15.75H8.25V12.75ZM14.25 6H6.75V18H17.25V9H14.25V6ZM5.25 5.24385C5.25 4.83304 5.58562 4.5 5.99888 4.5H15L18.7498 8.25L18.75 18.7444C18.75 19.1617 18.4163 19.5 18.0049 19.5H5.99505C5.58357 19.5 5.25 19.1585 5.25 18.7561V5.24385Z" fill="currentColor" />
|
|
55
|
+
</svg>
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
const AnalyticsIcon = () => (
|
|
59
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
60
|
+
<path d="M6.75 5.25V17.25H18.75V18.75H5.25V5.25H6.75ZM18.2197 7.71967L19.2803 8.78033L15 13.0606L12.75 10.8112L9.53033 14.0303L8.46967 12.9697L12.75 8.68934L15 10.9388L18.2197 7.71967Z" fill="currentColor" />
|
|
61
|
+
</svg>
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
const PaymentsIcon = () => (
|
|
65
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
66
|
+
<path d="M18.75 6.75H5.25C4.83579 6.75 4.5 7.08579 4.5 7.5V16.5C4.5 16.9142 4.83579 17.25 5.25 17.25H18.75C19.1642 17.25 19.5 16.9142 19.5 16.5V7.5C19.5 7.08579 19.1642 6.75 18.75 6.75ZM18 15.75H6V11.25H18V15.75ZM6 9.75V8.25H18V9.75H6ZM7.5 13.5H9.75V14.25H7.5V13.5Z" fill="currentColor" />
|
|
67
|
+
</svg>
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
const SettingsIcon = () => (
|
|
71
|
+
<svg width="24" height="24" viewBox="0 0 32 32" fill="none">
|
|
72
|
+
<path d="M6 15.6385C6 14.774 6.1097 13.9351 6.31595 13.135C7.40622 13.1915 8.48848 12.6488 9.0718 11.6385C9.65467 10.6289 9.58406 9.42138 8.99121 8.50568C10.1835 7.33396 11.6683 6.45889 13.326 6C13.8222 6.97252 14.8333 7.63849 16 7.63849C17.1667 7.63849 18.1778 6.97252 18.674 6C20.3317 6.45889 21.8165 7.33396 23.0088 8.50568C22.4159 9.42138 22.3453 10.6289 22.9282 11.6385C23.5115 12.6488 24.5938 13.1915 25.6841 13.135C25.8903 13.9351 26 14.774 26 15.6385C26 16.503 25.8903 17.3419 25.6841 18.142C24.5938 18.0855 23.5115 18.6282 22.9282 19.6385C22.3453 20.6481 22.4159 21.8556 23.0088 22.7713C21.8165 23.943 20.3317 24.8181 18.674 25.277C18.1778 24.3045 17.1667 23.6385 16 23.6385C14.8333 23.6385 13.8222 24.3045 13.326 25.277C11.6683 24.8181 10.1835 23.943 8.99121 22.7713C9.58406 21.8556 9.65467 20.6481 9.0718 19.6385C8.48848 18.6282 7.40622 18.0855 6.31595 18.142C6.1097 17.3419 6 16.503 6 15.6385ZM10.8039 18.6385C11.434 19.7299 11.6146 20.9846 11.3682 22.1623C11.776 22.4525 12.2101 22.7039 12.6649 22.9128C13.5618 22.1099 14.7392 21.6385 16 21.6385C17.2608 21.6385 18.4382 22.1099 19.3351 22.9128C19.7899 22.7039 20.224 22.4525 20.6318 22.1623C20.3854 20.9846 20.566 19.7299 21.1962 18.6385C21.8262 17.5472 22.8225 16.7635 23.9655 16.388C23.9884 16.1402 24 15.8903 24 15.6385C24 15.3868 23.9884 15.1368 23.9655 14.8891C22.8225 14.5136 21.8262 13.7299 21.1962 12.6385C20.566 11.5471 20.3854 10.2924 20.6318 9.11472C20.224 8.82455 19.7899 8.57314 19.3351 8.36419C18.4382 9.16711 17.2608 9.63849 16 9.63849C14.7392 9.63849 13.5618 9.16711 12.6649 8.36419C12.2101 8.57314 11.776 8.82455 11.3682 9.11472C11.6146 10.2924 11.434 11.5471 10.8039 12.6385C10.1738 13.7299 9.17754 14.5136 8.03451 14.8891C8.01157 15.1368 8 15.3868 8 15.6385C8 15.8903 8.01157 16.1402 8.03451 16.388C9.17754 16.7635 10.1738 17.5472 10.8039 18.6385ZM16 18.6385C14.3431 18.6385 13 17.2954 13 15.6385C13 13.9817 14.3431 12.6385 16 12.6385C17.6569 12.6385 19 13.9817 19 15.6385C19 17.2954 17.6569 18.6385 16 18.6385ZM16 16.6385C16.5523 16.6385 17 16.1908 17 15.6385C17 15.0862 16.5523 14.6385 16 14.6385C15.4477 14.6385 15 15.0862 15 15.6385C15 16.1908 15.4477 16.6385 16 16.6385Z" fill="currentColor" />
|
|
73
|
+
</svg>
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
const DebugIcon = () => (
|
|
77
|
+
<svg width="24" height="24" viewBox="0 0 32 32" fill="none">
|
|
78
|
+
<path d="M17 23.9C19.2822 23.4367 21 21.419 21 19V16C21 15.299 20.8564 14.6219 20.5846 14H11.4154C11.1436 14.6219 11 15.299 11 16V19C11 21.419 12.7178 23.4367 15 23.9V18H17V23.9ZM9.5358 21.6907C9.19061 20.8623 9 19.9534 9 19H6V17H9V16C9 15.3573 9.08661 14.7348 9.2488 14.1436L7.0359 12.866L8.0359 11.134L10.0564 12.3005C10.1199 12.1985 10.1861 12.0984 10.2547 12H21.7453C21.8139 12.0984 21.88 12.1985 21.9436 12.3005L23.9641 11.134L24.9641 12.866L22.7512 14.1436C22.9134 14.7348 23 15.3573 23 16V17H26V19H23C23 19.9534 22.8094 20.8623 22.4642 21.6907L24.9641 23.134L23.9641 24.866L21.4383 23.4077C20.1549 24.9893 18.1955 26 16 26C13.8045 26 11.8451 24.9893 10.5617 23.4077L8.0359 24.866L7.0359 23.134L9.5358 21.6907ZM12 10C12 7.79086 13.7909 6 16 6C18.2091 6 20 7.79086 20 10H12Z" fill="currentColor" />
|
|
79
|
+
</svg>
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
export const AdminSidebar: React.FC<AdminSidebarProps> = ({
|
|
83
|
+
expanded = true,
|
|
84
|
+
onNavigation,
|
|
85
|
+
activePath = '/admin',
|
|
86
|
+
adminLogoUrl,
|
|
87
|
+
}) => {
|
|
88
|
+
const navItems: NavItem[] = [
|
|
89
|
+
{ id: 'home', label: 'Home', path: '/admin', icon: <HomeIcon />, end: true },
|
|
90
|
+
{ id: 'companies', label: 'Companies', path: '/admin/companies', icon: <CompanyIcon /> },
|
|
91
|
+
{ id: 'providers', label: 'Providers', path: '/admin/providers', icon: <ProvidersIcon /> },
|
|
92
|
+
{ id: 'users', label: 'Users', path: '/admin/users', icon: <UsersIcon /> },
|
|
93
|
+
{ id: 'customers', label: 'Customers', path: '/admin/customers', icon: <CustomersIcon /> },
|
|
94
|
+
{ id: 'reports', label: 'Reports', path: '/admin/reports', icon: <ReportsIcon /> },
|
|
95
|
+
{ id: 'analytics', label: 'Analytics', path: '/admin/analytics', icon: <AnalyticsIcon /> },
|
|
96
|
+
{ id: 'payments', label: 'Payments', path: '/admin/payments', icon: <PaymentsIcon /> },
|
|
97
|
+
{ id: 'settings', label: 'Settings', path: '/admin/settings/general', icon: <SettingsIcon /> },
|
|
98
|
+
{ id: 'debugging', label: 'Debugging', path: '/admin/debugging', icon: <DebugIcon /> },
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
const isActive = (item: NavItem) => {
|
|
102
|
+
if (item.end) {
|
|
103
|
+
return activePath === item.path || activePath === item.path + '/'
|
|
104
|
+
}
|
|
105
|
+
return activePath?.startsWith(item.path)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const handleNavClick = (path: string) => {
|
|
109
|
+
onNavigation?.(path)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return (
|
|
113
|
+
<aside className={`admin-sidebar admin-sidebar--${expanded ? 'expanded' : 'collapsed'}`}>
|
|
114
|
+
<div className="admin-sidebar__content">
|
|
115
|
+
{expanded ? (
|
|
116
|
+
<div className="admin-sidebar__header">
|
|
117
|
+
<div className="admin-sidebar__avatar">
|
|
118
|
+
<img src={adminLogoUrl || AdminLogo} alt="Admin Panel" />
|
|
119
|
+
</div>
|
|
120
|
+
<div className="admin-sidebar__header-text">
|
|
121
|
+
<h3 className="admin-sidebar__title">Admin Panel</h3>
|
|
122
|
+
<div className="admin-sidebar__badge">
|
|
123
|
+
<span>Super Admin</span>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
) : (
|
|
128
|
+
<Tooltip content="Admin Panel" side="right" sideOffset={8} delayDuration={100}>
|
|
129
|
+
<div className="admin-sidebar__header admin-sidebar__header--collapsed">
|
|
130
|
+
<div className="admin-sidebar__avatar">
|
|
131
|
+
<img src={adminLogoUrl || AdminLogo} alt="Admin Panel" />
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</Tooltip>
|
|
135
|
+
)}
|
|
136
|
+
|
|
137
|
+
<nav className="admin-sidebar__nav">
|
|
138
|
+
{navItems.map((item) => {
|
|
139
|
+
const linkContent = (
|
|
140
|
+
<div
|
|
141
|
+
key={item.id}
|
|
142
|
+
className={`admin-sidebar__link ${isActive(item) ? 'admin-sidebar__link--active' : ''} ${expanded ? '' : 'admin-sidebar__link--collapsed'}`}
|
|
143
|
+
onClick={() => handleNavClick(item.path)}
|
|
144
|
+
role="button"
|
|
145
|
+
tabIndex={0}
|
|
146
|
+
onKeyDown={(e) => e.key === 'Enter' && handleNavClick(item.path)}
|
|
147
|
+
>
|
|
148
|
+
<div className="admin-sidebar__icon">
|
|
149
|
+
{item.icon}
|
|
150
|
+
</div>
|
|
151
|
+
{expanded && (
|
|
152
|
+
<span className="admin-sidebar__link-text">{item.label}</span>
|
|
153
|
+
)}
|
|
154
|
+
</div>
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
if (!expanded) {
|
|
158
|
+
return (
|
|
159
|
+
<Tooltip key={item.id} content={item.label} side="right" sideOffset={8} delayDuration={100}>
|
|
160
|
+
{linkContent}
|
|
161
|
+
</Tooltip>
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return linkContent
|
|
166
|
+
})}
|
|
167
|
+
</nav>
|
|
168
|
+
</div>
|
|
169
|
+
</aside>
|
|
170
|
+
)
|
|
171
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.dashboard-footer {
|
|
2
|
+
border-top: 1px solid var(--borders-main-border-primary, #E8E9EF);
|
|
3
|
+
padding: 16px;
|
|
4
|
+
margin-top: auto;
|
|
5
|
+
width: 100%;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
|
|
8
|
+
&__content {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
width: 100%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&__version,
|
|
16
|
+
&__copyright {
|
|
17
|
+
font-family: var(--font-family-mono);
|
|
18
|
+
font-size: 10px;
|
|
19
|
+
line-height: 12px;
|
|
20
|
+
color: var(--labels-main-label-secondary, #626A90);
|
|
21
|
+
|
|
22
|
+
span {
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&__copyright {
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import './DashboardFooter.scss'
|
|
3
|
+
|
|
4
|
+
export interface DashboardFooterProps {
|
|
5
|
+
version?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const DashboardFooter: React.FC<DashboardFooterProps> = ({
|
|
9
|
+
version
|
|
10
|
+
}) => {
|
|
11
|
+
const currentYear = new Date().getFullYear()
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<footer className="dashboard-footer">
|
|
15
|
+
<div className="dashboard-footer__content">
|
|
16
|
+
<div className="dashboard-footer__version">
|
|
17
|
+
Version: <span>{version}</span>
|
|
18
|
+
</div>
|
|
19
|
+
<div className="dashboard-footer__copyright">
|
|
20
|
+
© Booked it {currentYear}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</footer>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
.dashboard-layout {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100vw;
|
|
5
|
+
height: 100vh;
|
|
6
|
+
background: var(--surfaces-main-background-primary, #ffffff);
|
|
7
|
+
position: relative;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
&__body {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex: 1;
|
|
13
|
+
position: relative;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__sidebar {
|
|
18
|
+
position: fixed;
|
|
19
|
+
left: 0;
|
|
20
|
+
top: 48px;
|
|
21
|
+
bottom: 0;
|
|
22
|
+
z-index: 20;
|
|
23
|
+
overflow-y: auto;
|
|
24
|
+
overflow-x: hidden;
|
|
25
|
+
transition: width 0.3s ease;
|
|
26
|
+
background: var(--surfaces-main-background-secondary, #F8F8FA);
|
|
27
|
+
border-right: 1px solid var(--borders-main-border-primary, #E8E9EF);
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
|
|
31
|
+
&--mobile-open {
|
|
32
|
+
width: 100% !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.provider-sidebar,
|
|
36
|
+
.admin-sidebar {
|
|
37
|
+
flex: 1;
|
|
38
|
+
border-right: none;
|
|
39
|
+
height: 100%;
|
|
40
|
+
overflow-y: auto;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__main {
|
|
45
|
+
flex: 1;
|
|
46
|
+
height: calc(100vh - 48px);
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
transition: margin-left 0.3s ease;
|
|
50
|
+
background: var(--surfaces-main-background-primary, #ffffff);
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&__content {
|
|
55
|
+
flex: 1;
|
|
56
|
+
overflow-y: auto;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&__overlay {
|
|
60
|
+
position: fixed;
|
|
61
|
+
inset: 0;
|
|
62
|
+
background: rgba(0, 0, 0, 0.5);
|
|
63
|
+
z-index: 15;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@media (max-width: 768px) {
|
|
69
|
+
.dashboard-layout {
|
|
70
|
+
&__sidebar {
|
|
71
|
+
display: none;
|
|
72
|
+
width: 0 !important;
|
|
73
|
+
|
|
74
|
+
&--mobile-open {
|
|
75
|
+
display: flex;
|
|
76
|
+
width: 100% !important;
|
|
77
|
+
height: calc(100vh - 48px) !important;
|
|
78
|
+
top: 48px !important;
|
|
79
|
+
left: 0;
|
|
80
|
+
right: 0;
|
|
81
|
+
bottom: 0;
|
|
82
|
+
z-index: 25;
|
|
83
|
+
background: var(--surfaces-main-background-secondary, #F8F8FA);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__main {
|
|
88
|
+
margin-left: 0 !important;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|