@licklist/design 0.78.21 → 0.78.25

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.
Files changed (186) hide show
  1. package/dist/assets/Trend-Down.svg +3 -0
  2. package/dist/assets/Trend-Up.svg +3 -0
  3. package/dist/auth/Authorizer.d.ts.map +1 -1
  4. package/dist/auth/Authorizer.js +47 -12
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +5 -0
  8. package/dist/v2/components/EntityHeader/EntityHeader.d.ts +13 -0
  9. package/dist/v2/components/EntityHeader/EntityHeader.d.ts.map +1 -0
  10. package/dist/v2/components/EntityHeader/EntityHeader.js +85 -0
  11. package/dist/v2/components/EntityHeader/EntityHeader.scss.js +6 -0
  12. package/dist/v2/components/EntityHeader/index.d.ts +2 -0
  13. package/dist/v2/components/EntityHeader/index.d.ts.map +1 -0
  14. package/dist/v2/components/NPSScore/NPSScore.d.ts +18 -0
  15. package/dist/v2/components/NPSScore/NPSScore.d.ts.map +1 -0
  16. package/dist/v2/components/NPSScore/index.d.ts +3 -0
  17. package/dist/v2/components/NPSScore/index.d.ts.map +1 -0
  18. package/dist/v2/components/Select/Select.d.ts +10 -0
  19. package/dist/v2/components/Select/Select.d.ts.map +1 -0
  20. package/dist/v2/components/Select/index.d.ts +3 -0
  21. package/dist/v2/components/Select/index.d.ts.map +1 -0
  22. package/dist/v2/components/Tooltip/Tooltip.d.ts +21 -0
  23. package/dist/v2/components/Tooltip/Tooltip.d.ts.map +1 -0
  24. package/dist/v2/components/Tooltip/Tooltip.js +103 -0
  25. package/dist/v2/components/Tooltip/Tooltip.scss.js +6 -0
  26. package/dist/v2/components/Tooltip/index.d.ts +2 -0
  27. package/dist/v2/components/Tooltip/index.d.ts.map +1 -0
  28. package/dist/v2/components/UserAvatar/UserAvatar.d.ts +12 -0
  29. package/dist/v2/components/UserAvatar/UserAvatar.d.ts.map +1 -0
  30. package/dist/v2/components/UserAvatar/UserAvatar.js +77 -0
  31. package/dist/v2/components/UserAvatar/UserAvatar.scss.js +6 -0
  32. package/dist/v2/components/UserAvatar/index.d.ts +2 -0
  33. package/dist/v2/components/UserAvatar/index.d.ts.map +1 -0
  34. package/dist/v2/components/UserPanel/UserPanel.d.ts +17 -0
  35. package/dist/v2/components/UserPanel/UserPanel.d.ts.map +1 -0
  36. package/dist/v2/components/UserPanel/UserPanel.js +168 -0
  37. package/dist/v2/components/UserPanel/UserPanel.scss.js +6 -0
  38. package/dist/v2/components/UserPanel/index.d.ts +3 -0
  39. package/dist/v2/components/UserPanel/index.d.ts.map +1 -0
  40. package/dist/v2/dashboard-analytics/blog-posts/Blog.d.ts +15 -0
  41. package/dist/v2/dashboard-analytics/blog-posts/Blog.d.ts.map +1 -0
  42. package/dist/v2/dashboard-analytics/blog-posts/index.d.ts +3 -0
  43. package/dist/v2/dashboard-analytics/blog-posts/index.d.ts.map +1 -0
  44. package/dist/v2/dashboard-analytics/chart/Chart.d.ts +21 -0
  45. package/dist/v2/dashboard-analytics/chart/Chart.d.ts.map +1 -0
  46. package/dist/v2/dashboard-analytics/chart/index.d.ts +3 -0
  47. package/dist/v2/dashboard-analytics/chart/index.d.ts.map +1 -0
  48. package/dist/v2/dashboard-analytics/dashboard/Dashboard.d.ts +57 -0
  49. package/dist/v2/dashboard-analytics/dashboard/Dashboard.d.ts.map +1 -0
  50. package/dist/v2/dashboard-analytics/dashboard/index.d.ts +3 -0
  51. package/dist/v2/dashboard-analytics/dashboard/index.d.ts.map +1 -0
  52. package/dist/v2/dashboard-analytics/index.d.ts +13 -0
  53. package/dist/v2/dashboard-analytics/index.d.ts.map +1 -0
  54. package/dist/v2/dashboard-analytics/metric-card/MetricCard.d.ts +17 -0
  55. package/dist/v2/dashboard-analytics/metric-card/MetricCard.d.ts.map +1 -0
  56. package/dist/v2/dashboard-analytics/metric-card/index.d.ts +3 -0
  57. package/dist/v2/dashboard-analytics/metric-card/index.d.ts.map +1 -0
  58. package/dist/v2/dashboard-analytics/venue-card/VenueCard.d.ts +12 -0
  59. package/dist/v2/dashboard-analytics/venue-card/VenueCard.d.ts.map +1 -0
  60. package/dist/v2/dashboard-analytics/venue-card/index.d.ts +3 -0
  61. package/dist/v2/dashboard-analytics/venue-card/index.d.ts.map +1 -0
  62. package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.d.ts +25 -0
  63. package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.d.ts.map +1 -0
  64. package/dist/v2/dashboard-analytics/venue-closed-card/index.d.ts +3 -0
  65. package/dist/v2/dashboard-analytics/venue-closed-card/index.d.ts.map +1 -0
  66. package/dist/v2/index.d.ts +11 -5
  67. package/dist/v2/index.d.ts.map +1 -1
  68. package/dist/v2/navigation/DashboardLayout/AdminSidebar.d.ts +10 -0
  69. package/dist/v2/navigation/DashboardLayout/AdminSidebar.d.ts.map +1 -0
  70. package/dist/v2/navigation/DashboardLayout/AdminSidebar.js +296 -0
  71. package/dist/v2/navigation/DashboardLayout/AdminSidebar.scss.js +6 -0
  72. package/dist/v2/navigation/DashboardLayout/DashboardFooter.d.ts +7 -0
  73. package/dist/v2/navigation/DashboardLayout/DashboardFooter.d.ts.map +1 -0
  74. package/dist/v2/navigation/DashboardLayout/DashboardFooter.js +34 -0
  75. package/dist/v2/navigation/DashboardLayout/DashboardFooter.scss.js +6 -0
  76. package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts +42 -0
  77. package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts.map +1 -0
  78. package/dist/v2/navigation/DashboardLayout/DashboardLayout.js +154 -0
  79. package/dist/v2/navigation/DashboardLayout/DashboardLayout.scss.js +6 -0
  80. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts +35 -0
  81. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts.map +1 -0
  82. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.js +344 -0
  83. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.scss.js +6 -0
  84. package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts +26 -0
  85. package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts.map +1 -0
  86. package/dist/v2/navigation/DashboardLayout/TopNavigation.js +468 -0
  87. package/dist/v2/navigation/DashboardLayout/TopNavigation.scss.js +6 -0
  88. package/dist/v2/navigation/DashboardLayout/assets/AdminLogo.png.js +3 -0
  89. package/dist/v2/navigation/DashboardLayout/assets/BookedLogo_Mark.png.js +3 -0
  90. package/dist/v2/navigation/DashboardLayout/index.d.ts +7 -0
  91. package/dist/v2/navigation/DashboardLayout/index.d.ts.map +1 -0
  92. package/package.json +5 -3
  93. package/src/assets/Trend-Down.svg +3 -0
  94. package/src/assets/Trend-Up.svg +3 -0
  95. package/src/auth/Authorizer.tsx +49 -20
  96. package/src/index.ts +2 -1
  97. package/src/v2/components/EntityHeader/EntityHeader.scss +133 -0
  98. package/src/v2/components/EntityHeader/EntityHeader.stories.tsx +103 -0
  99. package/src/v2/components/EntityHeader/EntityHeader.tsx +76 -0
  100. package/src/v2/components/EntityHeader/index.ts +1 -0
  101. package/src/v2/components/NPSScore/NPSScore.scss +330 -0
  102. package/src/v2/components/NPSScore/NPSScore.stories.tsx +29 -0
  103. package/src/v2/components/NPSScore/NPSScore.tsx +209 -0
  104. package/src/v2/components/NPSScore/index.ts +2 -0
  105. package/src/v2/components/Select/Select.scss +188 -0
  106. package/src/v2/components/Select/Select.stories.tsx +164 -0
  107. package/src/v2/components/Select/Select.tsx +56 -0
  108. package/src/v2/components/Select/index.ts +2 -0
  109. package/src/v2/components/Tooltip/Tooltip.scss +92 -0
  110. package/src/v2/components/Tooltip/Tooltip.stories.tsx +164 -0
  111. package/src/v2/components/Tooltip/Tooltip.tsx +64 -0
  112. package/src/v2/components/Tooltip/index.ts +8 -0
  113. package/src/v2/components/UserAvatar/UserAvatar.scss +62 -0
  114. package/src/v2/components/UserAvatar/UserAvatar.stories.tsx +94 -0
  115. package/src/v2/components/UserAvatar/UserAvatar.tsx +96 -0
  116. package/src/v2/components/UserAvatar/index.ts +1 -0
  117. package/src/v2/components/UserPanel/UserPanel.scss +195 -0
  118. package/src/v2/components/UserPanel/UserPanel.stories.tsx +66 -0
  119. package/src/v2/components/UserPanel/UserPanel.tsx +132 -0
  120. package/src/v2/components/UserPanel/index.ts +2 -0
  121. package/src/v2/dashboard-analytics/blog-posts/Blog.scss +92 -0
  122. package/src/v2/dashboard-analytics/blog-posts/Blog.stories.tsx +57 -0
  123. package/src/v2/dashboard-analytics/blog-posts/Blog.tsx +91 -0
  124. package/src/v2/dashboard-analytics/blog-posts/index.ts +2 -0
  125. package/src/v2/dashboard-analytics/chart/Chart.scss +424 -0
  126. package/src/v2/dashboard-analytics/chart/Chart.stories.tsx +157 -0
  127. package/src/v2/dashboard-analytics/chart/Chart.tsx +623 -0
  128. package/src/v2/dashboard-analytics/chart/index.ts +2 -0
  129. package/src/v2/dashboard-analytics/dashboard/Dashboard.scss +254 -0
  130. package/src/v2/dashboard-analytics/dashboard/Dashboard.stories.tsx +298 -0
  131. package/src/v2/dashboard-analytics/dashboard/Dashboard.tsx +248 -0
  132. package/src/v2/dashboard-analytics/dashboard/index.ts +2 -0
  133. package/src/v2/dashboard-analytics/index.ts +12 -0
  134. package/src/v2/dashboard-analytics/metric-card/MetricCard.scss +125 -0
  135. package/src/v2/dashboard-analytics/metric-card/MetricCard.stories.tsx +106 -0
  136. package/src/v2/dashboard-analytics/metric-card/MetricCard.tsx +72 -0
  137. package/src/v2/dashboard-analytics/metric-card/index.ts +2 -0
  138. package/src/v2/dashboard-analytics/venue-card/VenueCard.scss +112 -0
  139. package/src/v2/dashboard-analytics/venue-card/VenueCard.stories.tsx +40 -0
  140. package/src/v2/dashboard-analytics/venue-card/VenueCard.tsx +62 -0
  141. package/src/v2/dashboard-analytics/venue-card/index.ts +2 -0
  142. package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.scss +129 -0
  143. package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.stories.tsx +31 -0
  144. package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.tsx +61 -0
  145. package/src/v2/dashboard-analytics/venue-closed-card/index.ts +2 -0
  146. package/src/v2/design-system/colors/ColorSystem.scss +439 -0
  147. package/src/v2/design-system/colors/ColorSystem.stories.tsx +730 -0
  148. package/src/v2/design-system/typography/Typography.scss +295 -0
  149. package/src/v2/design-system/typography/Typography.stories.tsx +109 -0
  150. package/src/v2/index.ts +43 -7
  151. package/src/v2/navigation/DashboardLayout/AdminSidebar.scss +207 -0
  152. package/src/v2/navigation/DashboardLayout/AdminSidebar.tsx +171 -0
  153. package/src/v2/navigation/DashboardLayout/DashboardFooter.scss +30 -0
  154. package/src/v2/navigation/DashboardLayout/DashboardFooter.tsx +25 -0
  155. package/src/v2/navigation/DashboardLayout/DashboardLayout.scss +91 -0
  156. package/src/v2/navigation/DashboardLayout/DashboardLayout.stories.tsx +370 -0
  157. package/src/v2/navigation/DashboardLayout/DashboardLayout.tsx +215 -0
  158. package/src/v2/navigation/DashboardLayout/ProviderSidebar.scss +266 -0
  159. package/src/v2/navigation/DashboardLayout/ProviderSidebar.tsx +252 -0
  160. package/src/v2/navigation/DashboardLayout/Sidebar.stories.tsx +220 -0
  161. package/src/v2/navigation/DashboardLayout/TopNavigation.scss +206 -0
  162. package/src/v2/navigation/DashboardLayout/TopNavigation.tsx +270 -0
  163. package/src/v2/navigation/DashboardLayout/assets/AdminLogo.png +0 -0
  164. package/src/v2/navigation/DashboardLayout/assets/BookedLogo_Mark.png +0 -0
  165. package/src/v2/navigation/DashboardLayout/index.ts +20 -0
  166. package/src/v2/styles/index.scss +0 -1
  167. package/src/v2/styles/tokens/_colors.scss +531 -98
  168. package/dist/v2/components/Colors/Colors.d.ts +0 -21
  169. package/dist/v2/components/Colors/Colors.d.ts.map +0 -1
  170. package/dist/v2/components/Colors/index.d.ts +0 -3
  171. package/dist/v2/components/Colors/index.d.ts.map +0 -1
  172. package/dist/v2/components/Typography/Typography.d.ts +0 -11
  173. package/dist/v2/components/Typography/Typography.d.ts.map +0 -1
  174. package/dist/v2/components/Typography/index.d.ts +0 -3
  175. package/dist/v2/components/Typography/index.d.ts.map +0 -1
  176. package/src/v2/components/Colors/Colors.scss +0 -64
  177. package/src/v2/components/Colors/Colors.stories.tsx +0 -143
  178. package/src/v2/components/Colors/Colors.tsx +0 -51
  179. package/src/v2/components/Colors/ColorsAliases.stories.tsx +0 -285
  180. package/src/v2/components/Colors/Sizes.stories.tsx +0 -141
  181. package/src/v2/components/Colors/index.ts +0 -2
  182. package/src/v2/components/Typography/Typography.scss +0 -72
  183. package/src/v2/components/Typography/Typography.stories.tsx +0 -266
  184. package/src/v2/components/Typography/Typography.tsx +0 -56
  185. package/src/v2/components/Typography/index.ts +0 -2
  186. package/src/v2/styles/tokens/_aliases.scss +0 -199
@@ -0,0 +1,132 @@
1
+ import React from 'react'
2
+ import './UserPanel.scss'
3
+
4
+ export interface UserPanelProps {
5
+ isOpen: boolean
6
+ onClose: () => void
7
+ userName: string
8
+ firstName?: string
9
+ email?: string
10
+ initials?: string
11
+ avatarUrl?: string | null
12
+ userNumber?: number | null
13
+ userRole?: string
14
+ onProfileClick?: () => void
15
+ onLogoutClick?: () => void
16
+ }
17
+
18
+ // Icons as inline SVGs
19
+ const CloseIcon = () => (
20
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none">
21
+ <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"/>
22
+ </svg>
23
+ )
24
+
25
+ const UserIcon = () => (
26
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none">
27
+ <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"/>
28
+ </svg>
29
+ )
30
+
31
+ const LogoutIcon = () => (
32
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none">
33
+ <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"/>
34
+ </svg>
35
+ )
36
+
37
+ export const UserPanel: React.FC<UserPanelProps> = ({
38
+ isOpen,
39
+ onClose,
40
+ userName,
41
+ firstName,
42
+ email,
43
+ initials,
44
+ avatarUrl,
45
+ userNumber,
46
+ userRole,
47
+ onProfileClick,
48
+ onLogoutClick,
49
+ }) => {
50
+ const displayFirstName = firstName || userName?.split(' ')[0] || 'User'
51
+ const displayInitials = initials || userName?.split(' ').map(n => n[0]).join('').toUpperCase().slice(0, 2) || 'U'
52
+
53
+ if (!isOpen) return null
54
+
55
+ return (
56
+ <>
57
+ {/* Overlay */}
58
+ <div
59
+ className="user-panel__overlay"
60
+ onClick={onClose}
61
+ />
62
+
63
+ {/* Panel */}
64
+ <div
65
+ className="user-panel"
66
+ onClick={(e) => e.stopPropagation()}
67
+ >
68
+ {/* Header */}
69
+ <div className="user-panel__header">
70
+ <div className="user-panel__user-info">
71
+ <div className="user-panel__avatar">
72
+ {avatarUrl ? (
73
+ <img src={avatarUrl} alt="Profile" />
74
+ ) : (
75
+ <>
76
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="none" className="user-panel__avatar-bg">
77
+ <circle cx="16" cy="16" r="15" fill="var(--fills-main-fill-secondary, #626A90)" fillOpacity="0.2" stroke="var(--fills-main-fill-secondary, #626A90)" strokeWidth="2" />
78
+ </svg>
79
+ <span className="user-panel__avatar-initials">{displayInitials}</span>
80
+ </>
81
+ )}
82
+ </div>
83
+ <div className="user-panel__user-details">
84
+ <h2 className="user-panel__greeting">Hey {displayFirstName}</h2>
85
+ {email && (
86
+ <span className="user-panel__email">{email}</span>
87
+ )}
88
+ </div>
89
+ </div>
90
+ <button
91
+ onClick={onClose}
92
+ className="user-panel__close-btn"
93
+ aria-label="Close user menu"
94
+ >
95
+ <CloseIcon />
96
+ </button>
97
+ </div>
98
+
99
+ {/* Menu Items */}
100
+ <div className="user-panel__menu">
101
+ <button
102
+ onClick={onProfileClick}
103
+ className="user-panel__menu-item"
104
+ >
105
+ <UserIcon />
106
+ <span>Profile</span>
107
+ </button>
108
+ </div>
109
+
110
+ {/* Logout */}
111
+ <div className="user-panel__logout-section">
112
+ <button
113
+ onClick={onLogoutClick}
114
+ className="user-panel__menu-item"
115
+ >
116
+ <LogoutIcon />
117
+ <span>Log out</span>
118
+ </button>
119
+ </div>
120
+
121
+ {/* Footer with User ID and Role */}
122
+ <div className="user-panel__footer">
123
+ <div className="user-panel__user-badge">
124
+ <span>
125
+ User: {userNumber ? String(userNumber).padStart(2, '0') : 'N/A'}{userRole ? ` - ${userRole}` : ''}
126
+ </span>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ </>
131
+ )
132
+ }
@@ -0,0 +1,2 @@
1
+ export { UserPanel } from './UserPanel'
2
+ export type { UserPanelProps } from './UserPanel'
@@ -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 };
@@ -0,0 +1,2 @@
1
+ export { Blog } from './Blog';
2
+ export type { BlogProps } from './Blog';