@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,126 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import './UserPanel.scss'
|
|
3
|
+
import { UserAvatar } from '../UserAvatar'
|
|
4
|
+
|
|
5
|
+
export interface UserPanelProps {
|
|
6
|
+
isOpen: boolean
|
|
7
|
+
onClose: () => void
|
|
8
|
+
userName: string
|
|
9
|
+
firstName?: string
|
|
10
|
+
email?: string
|
|
11
|
+
initials?: string
|
|
12
|
+
avatarUrl?: string | null
|
|
13
|
+
userNumber?: number | null
|
|
14
|
+
userRole?: string
|
|
15
|
+
onProfileClick?: () => void
|
|
16
|
+
onLogoutClick?: () => void
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Icons as inline SVGs
|
|
20
|
+
const CloseIcon = () => (
|
|
21
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none">
|
|
22
|
+
<path d="M12 10.586L16.95 5.636L18.364 7.05L13.414 12L18.364 16.95L16.95 18.364L12 13.414L7.05 18.364L5.636 16.95L10.586 12L5.636 7.05L7.05 5.636L12 10.586Z" fill="currentColor"/>
|
|
23
|
+
</svg>
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
const UserIcon = () => (
|
|
27
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none">
|
|
28
|
+
<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.25Z" fill="currentColor"/>
|
|
29
|
+
</svg>
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
const LogoutIcon = () => (
|
|
33
|
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none">
|
|
34
|
+
<path d="M5 22C4.44772 22 4 21.5523 4 21V3C4 2.44772 4.44772 2 5 2H19C19.5523 2 20 2.44772 20 3V6H18V4H6V20H18V18H20V21C20 21.5523 19.5523 22 19 22H5ZM18 16V13H11V11H18V8L23 12L18 16Z" fill="currentColor"/>
|
|
35
|
+
</svg>
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
export const UserPanel: React.FC<UserPanelProps> = ({
|
|
39
|
+
isOpen,
|
|
40
|
+
onClose,
|
|
41
|
+
userName,
|
|
42
|
+
firstName,
|
|
43
|
+
email,
|
|
44
|
+
initials,
|
|
45
|
+
avatarUrl,
|
|
46
|
+
userNumber,
|
|
47
|
+
userRole,
|
|
48
|
+
onProfileClick,
|
|
49
|
+
onLogoutClick,
|
|
50
|
+
}) => {
|
|
51
|
+
const displayFirstName = firstName || userName?.split(' ')[0] || 'User'
|
|
52
|
+
const displayInitials = initials || userName?.split(' ').map(n => n[0]).join('').toUpperCase().slice(0, 2) || 'U'
|
|
53
|
+
|
|
54
|
+
if (!isOpen) return null
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<>
|
|
58
|
+
{/* Overlay */}
|
|
59
|
+
<div
|
|
60
|
+
className="user-panel__overlay"
|
|
61
|
+
onClick={onClose}
|
|
62
|
+
/>
|
|
63
|
+
|
|
64
|
+
{/* Panel */}
|
|
65
|
+
<div
|
|
66
|
+
className="user-panel"
|
|
67
|
+
onClick={(e) => e.stopPropagation()}
|
|
68
|
+
>
|
|
69
|
+
{/* Header */}
|
|
70
|
+
<div className="user-panel__header">
|
|
71
|
+
<div className="user-panel__user-info">
|
|
72
|
+
<UserAvatar
|
|
73
|
+
initials={displayInitials}
|
|
74
|
+
avatarUrl={avatarUrl || undefined}
|
|
75
|
+
size="md"
|
|
76
|
+
/>
|
|
77
|
+
<div className="user-panel__user-details">
|
|
78
|
+
<h2 className="user-panel__greeting">Hey {displayFirstName}</h2>
|
|
79
|
+
{email && (
|
|
80
|
+
<span className="user-panel__email">{email}</span>
|
|
81
|
+
)}
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
<button
|
|
85
|
+
onClick={onClose}
|
|
86
|
+
className="user-panel__close-btn"
|
|
87
|
+
aria-label="Close user menu"
|
|
88
|
+
>
|
|
89
|
+
<CloseIcon />
|
|
90
|
+
</button>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
{/* Menu Items */}
|
|
94
|
+
<div className="user-panel__menu">
|
|
95
|
+
<button
|
|
96
|
+
onClick={onProfileClick}
|
|
97
|
+
className="user-panel__menu-item"
|
|
98
|
+
>
|
|
99
|
+
<UserIcon />
|
|
100
|
+
<span>Profile</span>
|
|
101
|
+
</button>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
{/* Logout */}
|
|
105
|
+
<div className="user-panel__logout-section">
|
|
106
|
+
<button
|
|
107
|
+
onClick={onLogoutClick}
|
|
108
|
+
className="user-panel__menu-item"
|
|
109
|
+
>
|
|
110
|
+
<LogoutIcon />
|
|
111
|
+
<span>Log out</span>
|
|
112
|
+
</button>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
{/* Footer with User ID and Role */}
|
|
116
|
+
<div className="user-panel__footer">
|
|
117
|
+
<div className="user-panel__user-badge">
|
|
118
|
+
<span>
|
|
119
|
+
User: {userNumber ? String(userNumber).padStart(2, '0') : 'N/A'}{userRole ? ` - ${userRole}` : ''}
|
|
120
|
+
</span>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</>
|
|
125
|
+
)
|
|
126
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
@import '../../design-system/typography/Typography.scss';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
.blog {
|
|
5
|
+
width: 328px;
|
|
6
|
+
margin-top: 0;
|
|
7
|
+
|
|
8
|
+
@media (max-width: 1024px) {
|
|
9
|
+
width: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@media (max-width: 767px) {
|
|
13
|
+
padding-left: 8px;
|
|
14
|
+
padding-right: 8px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__header {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
margin-bottom: 1rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__title {
|
|
25
|
+
@include typography('heading.h3');
|
|
26
|
+
line-height: 1.75rem;
|
|
27
|
+
color: var(--label-primary);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&__logo {
|
|
31
|
+
height: 22px;
|
|
32
|
+
width: auto;
|
|
33
|
+
object-fit: contain;
|
|
34
|
+
filter: brightness(0) saturate(100%) invert(60%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(90%) contrast(100%);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&__posts {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
gap: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__post {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
padding: 1rem 0;
|
|
47
|
+
|
|
48
|
+
&:first-child {
|
|
49
|
+
padding-top: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:not(:last-child) {
|
|
53
|
+
border-bottom: 1px solid var(--border-selected);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&__post-title {
|
|
58
|
+
@include typography('heading.h4');
|
|
59
|
+
line-height: 1.5rem;
|
|
60
|
+
color: var(--label-primary);
|
|
61
|
+
margin-bottom: 0.5rem;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&__post-excerpt {
|
|
65
|
+
@include typography('text.regular');
|
|
66
|
+
line-height: 1.25rem;
|
|
67
|
+
color: var(--label-secondary);
|
|
68
|
+
margin-bottom: 0.5rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&__post-link {
|
|
72
|
+
@include typography('heading.h5');
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
gap: 0.25rem;
|
|
76
|
+
color: var(--label-action);
|
|
77
|
+
text-decoration: none;
|
|
78
|
+
transition: opacity 0.2s ease-in-out;
|
|
79
|
+
|
|
80
|
+
&:hover {
|
|
81
|
+
opacity: 0.8;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&__post-link-icon {
|
|
86
|
+
display: inline-flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
width: 12px;
|
|
89
|
+
height: 12px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react-vite';
|
|
2
|
+
import { Blog, BlogProps } from './Blog';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'v2/Dashboard Analytics/Blog',
|
|
6
|
+
component: Blog,
|
|
7
|
+
argTypes: {
|
|
8
|
+
posts: {
|
|
9
|
+
description: 'Array of blog posts to display',
|
|
10
|
+
control: 'object',
|
|
11
|
+
},
|
|
12
|
+
logoUrl: {
|
|
13
|
+
description: 'URL for the logo image',
|
|
14
|
+
control: 'text',
|
|
15
|
+
},
|
|
16
|
+
className: {
|
|
17
|
+
description: 'Additional CSS classes',
|
|
18
|
+
control: 'text',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
} as Meta<BlogProps>;
|
|
22
|
+
|
|
23
|
+
const Template: Story<BlogProps> = (args: BlogProps) => (
|
|
24
|
+
<div style={{ maxWidth: '600px', padding: '20px' }}>
|
|
25
|
+
<Blog {...args} />
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export const Default = Template.bind({});
|
|
30
|
+
Default.args = {};
|
|
31
|
+
|
|
32
|
+
export const CustomPosts = Template.bind({});
|
|
33
|
+
CustomPosts.args = {
|
|
34
|
+
posts: [
|
|
35
|
+
{
|
|
36
|
+
title: 'Getting Started with Our Platform',
|
|
37
|
+
excerpt: 'Learn the basics of setting up your account and making the most of our features. This comprehensive guide will walk you through everything you need to know.',
|
|
38
|
+
url: 'https://example.com/getting-started'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: 'Advanced Tips and Tricks',
|
|
42
|
+
excerpt: 'Unlock the full potential of our platform with these expert tips. Discover hidden features and shortcuts that will boost your productivity.',
|
|
43
|
+
url: 'https://example.com/tips-and-tricks'
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const SinglePost = Template.bind({});
|
|
49
|
+
SinglePost.args = {
|
|
50
|
+
posts: [
|
|
51
|
+
{
|
|
52
|
+
title: 'Important Announcement',
|
|
53
|
+
excerpt: 'We have exciting news to share with our community. Stay tuned for major updates coming your way.',
|
|
54
|
+
url: 'https://example.com/announcement'
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Blog.scss';
|
|
3
|
+
|
|
4
|
+
interface BlogPost {
|
|
5
|
+
title: string;
|
|
6
|
+
excerpt: string;
|
|
7
|
+
url: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface BlogProps {
|
|
11
|
+
posts?: BlogPost[];
|
|
12
|
+
logoUrl?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const defaultPosts: BlogPost[] = [
|
|
17
|
+
{
|
|
18
|
+
title: 'How Booking Software Transforms the Guest Experience',
|
|
19
|
+
excerpt: 'In the leisure and hospitality industry, first impressions matter. For competitive socialising venues, bowling alleys, cinemas, and beyond, that first impression is often formed long before guests step through your doors.',
|
|
20
|
+
url: 'https://booked.it/how-booking-software-transforms-the-guest-experience/'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: '5 ways booking software improves the guest experience before they arrive',
|
|
24
|
+
excerpt: 'When guests choose your venue, their experience doesn\'t begin at the door. It starts the moment they decide to book. That first digital touchpoint sets the tone for everything that follows.',
|
|
25
|
+
url: 'https://booked.it/5-ways-booking-software-improves-the-guest-experience-before-they-arrive/'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
title: 'Ticketing software vs booking software – which is right for your venue?',
|
|
29
|
+
excerpt: 'In the UK leisure and hospitality industry, the terms ticketing software and booking software are often used interchangeably. But while they may appear similar, they serve different purposes.',
|
|
30
|
+
url: 'https://booked.it/ticketing-software-vs-booking-software-which-is-right-for-your-venue/'
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
const ExternalLinkIcon = () => (
|
|
35
|
+
<svg
|
|
36
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
37
|
+
width="12"
|
|
38
|
+
height="12"
|
|
39
|
+
viewBox="0 0 24 24"
|
|
40
|
+
fill="none"
|
|
41
|
+
stroke="currentColor"
|
|
42
|
+
strokeWidth="2"
|
|
43
|
+
strokeLinecap="round"
|
|
44
|
+
strokeLinejoin="round"
|
|
45
|
+
>
|
|
46
|
+
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
|
|
47
|
+
<polyline points="15 3 21 3 21 9" />
|
|
48
|
+
<line x1="10" y1="14" x2="21" y2="3" />
|
|
49
|
+
</svg>
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
export const Blog: React.FC<BlogProps> = ({
|
|
53
|
+
posts = defaultPosts,
|
|
54
|
+
logoUrl = 'https://api.builder.io/api/v1/image/assets/TEMP/1f8a6c2f7239cf2c859ace81bb32160a5d376121?placeholderIfAbsent=true',
|
|
55
|
+
className = ''
|
|
56
|
+
}) => {
|
|
57
|
+
return (
|
|
58
|
+
<div className={`blog ${className}`}>
|
|
59
|
+
<div className="blog__header">
|
|
60
|
+
<h2 className="blog__title">Latest Updates</h2>
|
|
61
|
+
<img
|
|
62
|
+
src={logoUrl}
|
|
63
|
+
alt="Logo"
|
|
64
|
+
className="blog__logo"
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<div className="blog__posts">
|
|
69
|
+
{posts.map((post, index) => (
|
|
70
|
+
<div key={index} className="blog__post">
|
|
71
|
+
<h3 className="blog__post-title">{post.title}</h3>
|
|
72
|
+
<p className="blog__post-excerpt">{post.excerpt}</p>
|
|
73
|
+
<a
|
|
74
|
+
href={post.url}
|
|
75
|
+
target="_blank"
|
|
76
|
+
rel="noopener noreferrer"
|
|
77
|
+
className="blog__post-link"
|
|
78
|
+
>
|
|
79
|
+
Read more
|
|
80
|
+
<span className="blog__post-link-icon">
|
|
81
|
+
<ExternalLinkIcon />
|
|
82
|
+
</span>
|
|
83
|
+
</a>
|
|
84
|
+
</div>
|
|
85
|
+
))}
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export type { BlogProps, BlogPost };
|