@licklist/design 0.78.5-dev.33 → 0.78.5-dev.34

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 (189) hide show
  1. package/dist/assets/Trend-Down.svg +3 -0
  2. package/dist/assets/Trend-Down.svg.js +16 -0
  3. package/dist/assets/Trend-Up.svg +3 -0
  4. package/dist/assets/Trend-Up.svg.js +16 -0
  5. package/dist/index.d.ts +2 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +11 -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/Select/Select.d.ts +10 -0
  15. package/dist/v2/components/Select/Select.d.ts.map +1 -0
  16. package/dist/v2/components/Select/Select.js +128 -0
  17. package/dist/v2/components/Select/Select.scss.js +6 -0
  18. package/dist/v2/components/Select/index.d.ts +3 -0
  19. package/dist/v2/components/Select/index.d.ts.map +1 -0
  20. package/dist/v2/components/Tooltip/Tooltip.d.ts +20 -0
  21. package/dist/v2/components/Tooltip/Tooltip.d.ts.map +1 -0
  22. package/dist/v2/components/Tooltip/Tooltip.js +103 -0
  23. package/dist/v2/components/Tooltip/Tooltip.scss.js +6 -0
  24. package/dist/v2/components/Tooltip/index.d.ts +2 -0
  25. package/dist/v2/components/Tooltip/index.d.ts.map +1 -0
  26. package/dist/v2/components/UserAvatar/UserAvatar.d.ts +12 -0
  27. package/dist/v2/components/UserAvatar/UserAvatar.d.ts.map +1 -0
  28. package/dist/v2/components/UserAvatar/UserAvatar.js +77 -0
  29. package/dist/v2/components/UserAvatar/UserAvatar.scss.js +6 -0
  30. package/dist/v2/components/UserAvatar/index.d.ts +2 -0
  31. package/dist/v2/components/UserAvatar/index.d.ts.map +1 -0
  32. package/dist/v2/components/UserPanel/UserPanel.d.ts +17 -0
  33. package/dist/v2/components/UserPanel/UserPanel.d.ts.map +1 -0
  34. package/dist/v2/components/UserPanel/index.d.ts +3 -0
  35. package/dist/v2/components/UserPanel/index.d.ts.map +1 -0
  36. package/dist/v2/dashboard-analytics/blog-posts/Blog.d.ts +15 -0
  37. package/dist/v2/dashboard-analytics/blog-posts/Blog.d.ts.map +1 -0
  38. package/dist/v2/dashboard-analytics/blog-posts/Blog.js +103 -0
  39. package/dist/v2/dashboard-analytics/blog-posts/Blog.scss.js +6 -0
  40. package/dist/v2/dashboard-analytics/blog-posts/index.d.ts +3 -0
  41. package/dist/v2/dashboard-analytics/blog-posts/index.d.ts.map +1 -0
  42. package/dist/v2/dashboard-analytics/chart/Chart.d.ts +21 -0
  43. package/dist/v2/dashboard-analytics/chart/Chart.d.ts.map +1 -0
  44. package/dist/v2/dashboard-analytics/chart/Chart.js +733 -0
  45. package/dist/v2/dashboard-analytics/chart/Chart.scss.js +6 -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/Dashboard.js +270 -0
  51. package/dist/v2/dashboard-analytics/dashboard/Dashboard.scss.js +6 -0
  52. package/dist/v2/dashboard-analytics/dashboard/index.d.ts +3 -0
  53. package/dist/v2/dashboard-analytics/dashboard/index.d.ts.map +1 -0
  54. package/dist/v2/dashboard-analytics/index.d.ts +13 -0
  55. package/dist/v2/dashboard-analytics/index.d.ts.map +1 -0
  56. package/dist/v2/dashboard-analytics/metric-card/MetricCard.d.ts +17 -0
  57. package/dist/v2/dashboard-analytics/metric-card/MetricCard.d.ts.map +1 -0
  58. package/dist/v2/dashboard-analytics/metric-card/MetricCard.js +65 -0
  59. package/dist/v2/dashboard-analytics/metric-card/MetricCard.scss.js +6 -0
  60. package/dist/v2/dashboard-analytics/metric-card/index.d.ts +3 -0
  61. package/dist/v2/dashboard-analytics/metric-card/index.d.ts.map +1 -0
  62. package/dist/v2/dashboard-analytics/venue-card/VenueCard.d.ts +12 -0
  63. package/dist/v2/dashboard-analytics/venue-card/VenueCard.d.ts.map +1 -0
  64. package/dist/v2/dashboard-analytics/venue-card/VenueCard.js +50 -0
  65. package/dist/v2/dashboard-analytics/venue-card/VenueCard.scss.js +6 -0
  66. package/dist/v2/dashboard-analytics/venue-card/index.d.ts +3 -0
  67. package/dist/v2/dashboard-analytics/venue-card/index.d.ts.map +1 -0
  68. package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.d.ts +25 -0
  69. package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.d.ts.map +1 -0
  70. package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.js +48 -0
  71. package/dist/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.scss.js +6 -0
  72. package/dist/v2/dashboard-analytics/venue-closed-card/index.d.ts +3 -0
  73. package/dist/v2/dashboard-analytics/venue-closed-card/index.d.ts.map +1 -0
  74. package/dist/v2/index.d.ts +7 -5
  75. package/dist/v2/index.d.ts.map +1 -1
  76. package/dist/v2/navigation/DashboardLayout/AdminSidebar.d.ts +10 -0
  77. package/dist/v2/navigation/DashboardLayout/AdminSidebar.d.ts.map +1 -0
  78. package/dist/v2/navigation/DashboardLayout/AdminSidebar.js +296 -0
  79. package/dist/v2/navigation/DashboardLayout/AdminSidebar.scss.js +6 -0
  80. package/dist/v2/navigation/DashboardLayout/DashboardFooter.d.ts +7 -0
  81. package/dist/v2/navigation/DashboardLayout/DashboardFooter.d.ts.map +1 -0
  82. package/dist/v2/navigation/DashboardLayout/DashboardFooter.js +34 -0
  83. package/dist/v2/navigation/DashboardLayout/DashboardFooter.scss.js +6 -0
  84. package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts +34 -0
  85. package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts.map +1 -0
  86. package/dist/v2/navigation/DashboardLayout/DashboardLayout.js +148 -0
  87. package/dist/v2/navigation/DashboardLayout/DashboardLayout.scss.js +6 -0
  88. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts +15 -0
  89. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts.map +1 -0
  90. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.js +343 -0
  91. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.scss.js +6 -0
  92. package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts +21 -0
  93. package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts.map +1 -0
  94. package/dist/v2/navigation/DashboardLayout/TopNavigation.js +453 -0
  95. package/dist/v2/navigation/DashboardLayout/TopNavigation.scss.js +6 -0
  96. package/dist/v2/navigation/DashboardLayout/assets/AdminLogo.png.js +3 -0
  97. package/dist/v2/navigation/DashboardLayout/assets/BookedLogo_Mark.png.js +3 -0
  98. package/dist/v2/navigation/DashboardLayout/index.d.ts +7 -0
  99. package/dist/v2/navigation/DashboardLayout/index.d.ts.map +1 -0
  100. package/package.json +4 -3
  101. package/src/assets/Trend-Down.svg +3 -0
  102. package/src/assets/Trend-Up.svg +3 -0
  103. package/src/index.ts +3 -1
  104. package/src/v2/components/EntityHeader/EntityHeader.scss +133 -0
  105. package/src/v2/components/EntityHeader/EntityHeader.stories.tsx +103 -0
  106. package/src/v2/components/EntityHeader/EntityHeader.tsx +76 -0
  107. package/src/v2/components/EntityHeader/index.ts +1 -0
  108. package/src/v2/components/Select/Select.scss +188 -0
  109. package/src/v2/components/Select/Select.stories.tsx +164 -0
  110. package/src/v2/components/Select/Select.tsx +56 -0
  111. package/src/v2/components/Select/index.ts +2 -0
  112. package/src/v2/components/Tooltip/Tooltip.scss +92 -0
  113. package/src/v2/components/Tooltip/Tooltip.stories.tsx +164 -0
  114. package/src/v2/components/Tooltip/Tooltip.tsx +64 -0
  115. package/src/v2/components/Tooltip/index.ts +8 -0
  116. package/src/v2/components/UserAvatar/UserAvatar.scss +62 -0
  117. package/src/v2/components/UserAvatar/UserAvatar.stories.tsx +94 -0
  118. package/src/v2/components/UserAvatar/UserAvatar.tsx +96 -0
  119. package/src/v2/components/UserAvatar/index.ts +1 -0
  120. package/src/v2/components/UserPanel/UserPanel.scss +195 -0
  121. package/src/v2/components/UserPanel/UserPanel.stories.tsx +66 -0
  122. package/src/v2/components/UserPanel/UserPanel.tsx +132 -0
  123. package/src/v2/components/UserPanel/index.ts +2 -0
  124. package/src/v2/dashboard-analytics/blog-posts/Blog.scss +92 -0
  125. package/src/v2/dashboard-analytics/blog-posts/Blog.stories.tsx +57 -0
  126. package/src/v2/dashboard-analytics/blog-posts/Blog.tsx +91 -0
  127. package/src/v2/dashboard-analytics/blog-posts/index.ts +2 -0
  128. package/src/v2/dashboard-analytics/chart/Chart.scss +424 -0
  129. package/src/v2/dashboard-analytics/chart/Chart.stories.tsx +157 -0
  130. package/src/v2/dashboard-analytics/chart/Chart.tsx +623 -0
  131. package/src/v2/dashboard-analytics/chart/index.ts +2 -0
  132. package/src/v2/dashboard-analytics/dashboard/Dashboard.scss +254 -0
  133. package/src/v2/dashboard-analytics/dashboard/Dashboard.stories.tsx +264 -0
  134. package/src/v2/dashboard-analytics/dashboard/Dashboard.tsx +248 -0
  135. package/src/v2/dashboard-analytics/dashboard/index.ts +2 -0
  136. package/src/v2/dashboard-analytics/index.ts +12 -0
  137. package/src/v2/dashboard-analytics/metric-card/MetricCard.scss +125 -0
  138. package/src/v2/dashboard-analytics/metric-card/MetricCard.stories.tsx +106 -0
  139. package/src/v2/dashboard-analytics/metric-card/MetricCard.tsx +72 -0
  140. package/src/v2/dashboard-analytics/metric-card/index.ts +2 -0
  141. package/src/v2/dashboard-analytics/venue-card/VenueCard.scss +112 -0
  142. package/src/v2/dashboard-analytics/venue-card/VenueCard.stories.tsx +40 -0
  143. package/src/v2/dashboard-analytics/venue-card/VenueCard.tsx +62 -0
  144. package/src/v2/dashboard-analytics/venue-card/index.ts +2 -0
  145. package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.scss +129 -0
  146. package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.stories.tsx +31 -0
  147. package/src/v2/dashboard-analytics/venue-closed-card/VenueClosedCard.tsx +61 -0
  148. package/src/v2/dashboard-analytics/venue-closed-card/index.ts +2 -0
  149. package/src/v2/design-system/colors/ColorSystem.scss +439 -0
  150. package/src/v2/design-system/colors/ColorSystem.stories.tsx +730 -0
  151. package/src/v2/design-system/typography/Typography.scss +295 -0
  152. package/src/v2/design-system/typography/Typography.stories.tsx +109 -0
  153. package/src/v2/index.ts +11 -7
  154. package/src/v2/navigation/DashboardLayout/AdminSidebar.scss +207 -0
  155. package/src/v2/navigation/DashboardLayout/AdminSidebar.tsx +171 -0
  156. package/src/v2/navigation/DashboardLayout/DashboardFooter.scss +30 -0
  157. package/src/v2/navigation/DashboardLayout/DashboardFooter.tsx +25 -0
  158. package/src/v2/navigation/DashboardLayout/DashboardLayout.scss +91 -0
  159. package/src/v2/navigation/DashboardLayout/DashboardLayout.stories.tsx +370 -0
  160. package/src/v2/navigation/DashboardLayout/DashboardLayout.tsx +190 -0
  161. package/src/v2/navigation/DashboardLayout/ProviderSidebar.scss +266 -0
  162. package/src/v2/navigation/DashboardLayout/ProviderSidebar.tsx +234 -0
  163. package/src/v2/navigation/DashboardLayout/Sidebar.stories.tsx +220 -0
  164. package/src/v2/navigation/DashboardLayout/TopNavigation.scss +206 -0
  165. package/src/v2/navigation/DashboardLayout/TopNavigation.tsx +244 -0
  166. package/src/v2/navigation/DashboardLayout/assets/AdminLogo.png +0 -0
  167. package/src/v2/navigation/DashboardLayout/assets/BookedLogo_Mark.png +0 -0
  168. package/src/v2/navigation/DashboardLayout/index.ts +6 -0
  169. package/src/v2/styles/index.scss +0 -1
  170. package/src/v2/styles/tokens/_colors.scss +531 -98
  171. package/dist/v2/components/Colors/Colors.d.ts +0 -21
  172. package/dist/v2/components/Colors/Colors.d.ts.map +0 -1
  173. package/dist/v2/components/Colors/index.d.ts +0 -3
  174. package/dist/v2/components/Colors/index.d.ts.map +0 -1
  175. package/dist/v2/components/Typography/Typography.d.ts +0 -11
  176. package/dist/v2/components/Typography/Typography.d.ts.map +0 -1
  177. package/dist/v2/components/Typography/index.d.ts +0 -3
  178. package/dist/v2/components/Typography/index.d.ts.map +0 -1
  179. package/src/v2/components/Colors/Colors.scss +0 -64
  180. package/src/v2/components/Colors/Colors.stories.tsx +0 -143
  181. package/src/v2/components/Colors/Colors.tsx +0 -51
  182. package/src/v2/components/Colors/ColorsAliases.stories.tsx +0 -285
  183. package/src/v2/components/Colors/Sizes.stories.tsx +0 -141
  184. package/src/v2/components/Colors/index.ts +0 -2
  185. package/src/v2/components/Typography/Typography.scss +0 -72
  186. package/src/v2/components/Typography/Typography.stories.tsx +0 -266
  187. package/src/v2/components/Typography/Typography.tsx +0 -56
  188. package/src/v2/components/Typography/index.ts +0 -2
  189. package/src/v2/styles/tokens/_aliases.scss +0 -199
@@ -0,0 +1,254 @@
1
+
2
+ .dashboard {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 1rem;
6
+ width: 100%;
7
+ max-width: 100%;
8
+ padding-bottom: 24px;
9
+ background-color: var(--surface-primary);
10
+ overflow: hidden;
11
+ box-sizing: border-box;
12
+ transition: all 0.3s ease-in-out;
13
+
14
+
15
+
16
+ &__metrics-grid {
17
+ display: grid;
18
+ grid-template-columns: 1fr;
19
+ gap: 1rem;
20
+ padding: 0 1rem;
21
+
22
+ @media (min-width: 768px) {
23
+ grid-template-columns: repeat(4, 1fr);
24
+ padding: 0 1rem;
25
+ }
26
+ }
27
+
28
+ &__filter {
29
+ display: flex;
30
+ align-items: center;
31
+ gap: 1rem;
32
+ font-size: 13px;
33
+ color: var(--surface-primary);
34
+ font-weight: 500;
35
+ text-align: right;
36
+ line-height: 1;
37
+ max-width: 100%;
38
+ padding: 1rem 1rem 0 1rem;
39
+ transition: all 0.3s ease-in-out;
40
+ @media (min-width: 768px) {
41
+ max-width: 100%;
42
+ }
43
+
44
+ .select--transitioning {
45
+ opacity: 0.8;
46
+ transition: all 0.2s ease-in-out;
47
+ }
48
+ }
49
+
50
+ &__charts {
51
+ display: flex;
52
+ flex-direction: column;
53
+ gap: 1rem;
54
+ padding: 0 1rem;
55
+
56
+ @media (min-width: 480px) {
57
+ gap: 1rem;
58
+ }
59
+
60
+ @media (min-width: 768px) {
61
+ gap: 1.5rem;
62
+ padding: 0 1rem;
63
+ }
64
+ }
65
+
66
+ &__metric-performance-text {
67
+ display: flex;
68
+ flex-direction: column;
69
+ gap: 0.25rem;
70
+ font-size: 11px;
71
+ font-weight: 500;
72
+ color: var(--label-secondary);
73
+
74
+ &--mobile {
75
+ display: block;
76
+
77
+ @media (min-width: 768px) {
78
+ display: none;
79
+ }
80
+ }
81
+
82
+ &--desktop {
83
+ display: none;
84
+
85
+ @media (min-width: 768px) {
86
+ display: flex;
87
+ flex-direction: column;
88
+ gap: 0.25rem;
89
+ }
90
+ }
91
+ }
92
+
93
+ &__content {
94
+ display: flex;
95
+ gap: 0.75rem;
96
+ align-items: flex-start;
97
+ padding: 0 1rem;
98
+ width: 100%;
99
+ overflow: hidden;
100
+
101
+ @media (min-width: 480px) {
102
+ gap: 1rem;
103
+ }
104
+
105
+ @media (min-width: 768px) {
106
+ padding: 0 1rem;
107
+ }
108
+
109
+ @media (max-width: 1024px) {
110
+ flex-direction: column;
111
+ }
112
+
113
+ @media (min-width: 1200px) {
114
+ gap: 1.5rem;
115
+ }
116
+
117
+ // When only charts section (no sidebar), ensure full width usage
118
+ &:has(.dashboard__charts-section:only-child) {
119
+ padding-right: 1rem;
120
+
121
+ @media (min-width: 768px) {
122
+ padding-right: 1rem;
123
+ }
124
+ }
125
+ }
126
+
127
+ // Charts take up remaining space
128
+ &__charts-section {
129
+ flex: 1;
130
+ min-width: 0;
131
+ width: 100%;
132
+ display: flex;
133
+ flex-direction: column;
134
+ gap: 0.75rem;
135
+ overflow: hidden;
136
+ transition: all 0.3s ease-in-out;
137
+ @media (min-width: 480px) {
138
+ gap: 1rem;
139
+ }
140
+
141
+ @media (min-width: 768px) {
142
+ gap: 1rem;
143
+ }
144
+
145
+ @media (min-width: 1200px) {
146
+ gap: 1rem;
147
+ }
148
+
149
+ &:only-child {
150
+ padding-right: 0;
151
+ margin-right: 0;
152
+ }
153
+
154
+ &--transitioning {
155
+ opacity: 0.8;
156
+ transform: translateY(2px);
157
+
158
+ .chart {
159
+ transition: all 0.3s ease-in-out;
160
+ filter: blur(1px);
161
+ }
162
+ }
163
+
164
+ // Chart transition states
165
+ .chart--transitioning {
166
+ opacity: 0.7;
167
+ transform: scale(0.98);
168
+ transition: all 0.3s ease-in-out;
169
+ }
170
+ }
171
+
172
+ &__sidebar {
173
+ display: flex;
174
+ flex-direction: column;
175
+ gap: 1rem;
176
+ flex-shrink: 0;
177
+ width: auto;
178
+ min-width: 280px;
179
+ @media (min-width: 480px) {
180
+ gap: 1.25rem;
181
+ }
182
+
183
+ @media (min-width: 768px) {
184
+ gap: 1.5rem;
185
+ }
186
+
187
+ @media (max-width: 1024px) {
188
+ width: 100%;
189
+ min-width: 0;
190
+ }
191
+
192
+ @media (min-width: 1440px) {
193
+ min-width: 320px;
194
+ }
195
+ }
196
+
197
+ &__venue-section {
198
+ display: flex;
199
+ flex-direction: row;
200
+ gap: 0.75rem;
201
+ flex-shrink: 0;
202
+ width: auto;
203
+
204
+ @media (min-width: 480px) {
205
+ gap: 1rem;
206
+ }
207
+
208
+ @media (max-width: 1024px) {
209
+ width: 100%;
210
+ }
211
+
212
+ @media (min-width: 1200px) {
213
+ gap: 1.25rem;
214
+ }
215
+ }
216
+
217
+ &--charts-focus {
218
+ .dashboard__content {
219
+ padding: 0 1rem;
220
+
221
+ @media (min-width: 768px) {
222
+ padding: 0 1rem;
223
+ }
224
+ }
225
+
226
+ .dashboard__charts-section {
227
+ padding: 0;
228
+ .chart {
229
+ padding: 1rem 1rem 1rem 1rem;
230
+
231
+ &[data-full-width="true"] {
232
+ .chart__container {
233
+ margin-left: -1rem;
234
+ margin-right: -1rem;
235
+ padding-left: 1rem;
236
+ width: calc(100% + 2rem);
237
+
238
+ @media (max-width: 480px) {
239
+ padding-left: 0.75rem;
240
+ }
241
+ }
242
+ }
243
+
244
+ @media (max-width: 480px) {
245
+ padding: 0.75rem 0.75rem 0.75rem 0.75rem;
246
+ }
247
+
248
+ @media (min-width: 768px) {
249
+ padding: 1.375rem 1rem 1rem 1rem;
250
+ }
251
+ }
252
+ }
253
+ }
254
+ }
@@ -0,0 +1,264 @@
1
+ import React, { useState } from 'react';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import { Dashboard } from './Dashboard';
4
+
5
+ type TimeFilter = 'Today' | 'Yesterday' | 'This Week';
6
+ type DatasetType = 'Bookings For' | 'Bookings Made';
7
+
8
+ const meta = {
9
+ title: 'v2/Dashboard Analytics/Dashboard',
10
+ component: Dashboard,
11
+ parameters: {
12
+ layout: 'fullscreen',
13
+ },
14
+ tags: [],
15
+ decorators: [
16
+ (Story) => (
17
+ <div style={{ minHeight: '100vh', backgroundColor: '#fff' }}>
18
+ <Story />
19
+ </div>
20
+ ),
21
+ ],
22
+ } satisfies Meta<typeof Dashboard>;
23
+
24
+ export default meta;
25
+
26
+ const mockMetrics = {
27
+ totalBookings: {
28
+ value: '24',
29
+ change: '+8 vs yesterday',
30
+ is_positive: true,
31
+ },
32
+ revenue: {
33
+ value: '£1,240.50',
34
+ change: '+£450 vs yesterday',
35
+ is_positive: true,
36
+ },
37
+ numberOfPeople: {
38
+ value: '89',
39
+ change: '+12 vs yesterday',
40
+ is_positive: true,
41
+ },
42
+ busiestTime: {
43
+ value: '14:00 - 15:00',
44
+ peopleText: '18 people',
45
+ bookingText: '6 bookings',
46
+ },
47
+ workHours: {
48
+ company_name: 'Sharksys Soft Play',
49
+ is_open: true,
50
+ status: 'Open',
51
+ message: 'Open until 18:00',
52
+ opens_at: '09:00'
53
+ },
54
+ peopleInVenue: {
55
+ value: '30',
56
+ formatted_value: '30',
57
+ description: 'people currently in venue'
58
+ }
59
+ };
60
+
61
+ const mockBookingsData = [
62
+ { time: '00:00', value: 2, participants: 4 },
63
+ { time: '01:00', value: 1, participants: 2 },
64
+ { time: '02:00', value: 0, participants: 0 },
65
+ { time: '03:00', value: 1, participants: 2 },
66
+ { time: '04:00', value: 2, participants: 4 },
67
+ { time: '05:00', value: 3, participants: 6 },
68
+ { time: '06:00', value: 4, participants: 8 },
69
+ { time: '07:00', value: 5, participants: 10 },
70
+ { time: '08:00', value: 6, participants: 12 },
71
+ { time: '09:00', value: 8, participants: 16 },
72
+ { time: '10:00', value: 6, participants: 12 },
73
+ { time: '11:00', value: 7, participants: 14 },
74
+ { time: '12:00', value: 8, participants: 16 },
75
+ { time: '13:00', value: 9, participants: 18 },
76
+ { time: '14:00', value: 6, participants: 12 },
77
+ { time: '15:00', value: 5, participants: 10 },
78
+ ];
79
+
80
+ const mockRevenueData = [
81
+ { time: '00:00', value: 25.50 },
82
+ { time: '01:00', value: 15.75 },
83
+ { time: '02:00', value: 0 },
84
+ { time: '03:00', value: 18.25 },
85
+ { time: '04:00', value: 35.00 },
86
+ { time: '05:00', value: 42.50 },
87
+ { time: '06:00', value: 58.75 },
88
+ { time: '07:00', value: 75.25 },
89
+ { time: '08:00', value: 92.50 },
90
+ { time: '09:00', value: 125.75 },
91
+ { time: '10:00', value: 95.50 },
92
+ { time: '11:00', value: 110.25 },
93
+ { time: '12:00', value: 128.00 },
94
+ { time: '13:00', value: 145.75 },
95
+ { time: '14:00', value: 98.50 },
96
+ { time: '15:00', value: 85.25 },
97
+ ];
98
+
99
+ export const Interactive = () => {
100
+ const [timeFilter, setTimeFilter] = useState<TimeFilter>('Today');
101
+ const [dataset, setDataset] = useState<DatasetType>('Bookings For');
102
+
103
+ const getDataForFilter = (filter: TimeFilter) => {
104
+ switch (filter) {
105
+ case 'Today':
106
+ return {
107
+ metrics: mockMetrics,
108
+ bookingsChart: {
109
+ title: 'Bookings',
110
+ subtitle: 'Today',
111
+ data: mockBookingsData,
112
+ isRevenue: false,
113
+ },
114
+ revenueChart: {
115
+ title: 'Revenue',
116
+ subtitle: 'Today',
117
+ data: mockRevenueData,
118
+ isRevenue: true,
119
+ },
120
+ };
121
+ case 'Yesterday':
122
+ return {
123
+ metrics: {
124
+ totalBookings: { value: '18', change: '-6 vs day before', is_positive: false },
125
+ revenue: { value: '£980.25', change: '-£260 vs day before', is_positive: false },
126
+ numberOfPeople: { value: '72', change: '-17 vs day before', is_positive: false },
127
+ busiestTime: { value: '13:00 - 14:00', peopleText: '15 people', bookingText: '5 bookings' },
128
+ peopleInVenue: { value: '25', formatted_value: '25', description: 'people currently in venue' },
129
+ workHours: { company_name: 'Sharksys Soft Play', is_open: true, status: 'Open', message: 'Open until 18:00', opens_at: '09:00' }
130
+ },
131
+ bookingsChart: {
132
+ title: 'Bookings',
133
+ subtitle: 'Yesterday',
134
+ data: mockBookingsData.map(d => ({ ...d, value: d.value - 1 })),
135
+ isRevenue: false,
136
+ },
137
+ revenueChart: {
138
+ title: 'Revenue',
139
+ subtitle: 'Yesterday',
140
+ data: mockRevenueData.map(d => ({ ...d, value: d.value * 0.8 })),
141
+ isRevenue: true,
142
+ },
143
+ };
144
+ case 'This Week':
145
+ return {
146
+ metrics: {
147
+ totalBookings: { value: '156', change: '+42 vs last week', is_positive: true },
148
+ revenue: { value: '£8,540.25', change: '+£2,100 vs last week', is_positive: true },
149
+ numberOfPeople: { value: '612', change: '+89 vs last week', is_positive: true },
150
+ busiestTime: { value: 'Saturday', peopleText: '125 people', bookingText: '32 bookings' },
151
+ peopleInVenue: { value: '45', formatted_value: '45', description: 'people currently in venue' },
152
+ workHours: { company_name: 'Sharksys Soft Play', is_open: true, status: 'Open', message: 'Open until 18:00', opens_at: '09:00' }
153
+ },
154
+ bookingsChart: {
155
+ title: 'Bookings',
156
+ subtitle: 'Mon 1st - Sun 7th Nov',
157
+ data: [
158
+ { time: 'Mon', value: 18, participants: 36 },
159
+ { time: 'Tue', value: 22, participants: 44 },
160
+ { time: 'Wed', value: 20, participants: 40 },
161
+ { time: 'Thu', value: 25, participants: 50 },
162
+ { time: 'Fri', value: 28, participants: 56 },
163
+ { time: 'Sat', value: 32, participants: 64 },
164
+ { time: 'Sun', value: 11, participants: 22 },
165
+ ],
166
+ isRevenue: false,
167
+ },
168
+ revenueChart: {
169
+ title: 'Revenue',
170
+ subtitle: 'Mon 1st - Sun 7th Nov',
171
+ data: [
172
+ { time: 'Mon', value: 1200 },
173
+ { time: 'Tue', value: 1450 },
174
+ { time: 'Wed', value: 1320 },
175
+ { time: 'Thu', value: 1650 },
176
+ { time: 'Fri', value: 1850 },
177
+ { time: 'Sat', value: 2100 },
178
+ { time: 'Sun', value: 750 },
179
+ ],
180
+ isRevenue: true,
181
+ },
182
+ };
183
+ default:
184
+ return getDataForFilter('Today');
185
+ }
186
+ };
187
+
188
+ const currentData = getDataForFilter(timeFilter);
189
+
190
+ return (
191
+ <Dashboard
192
+ timeFilter={timeFilter}
193
+ metrics={currentData.metrics}
194
+ bookingsChart={currentData.bookingsChart}
195
+ revenueChart={currentData.revenueChart}
196
+ onFilterChange={setTimeFilter}
197
+ />
198
+ );
199
+ };
200
+
201
+ export const Today = () => {
202
+ return (
203
+ <Dashboard
204
+ timeFilter="Today"
205
+ metrics={mockMetrics}
206
+ bookingsChart={{
207
+ title: 'Bookings',
208
+ subtitle: 'Today',
209
+ data: mockBookingsData,
210
+ isRevenue: false,
211
+ }}
212
+ revenueChart={{
213
+ title: 'Revenue',
214
+ subtitle: 'Today',
215
+ data: mockRevenueData,
216
+ isRevenue: true,
217
+ }}
218
+ />
219
+ );
220
+ };
221
+
222
+ export const ThisWeek = () => {
223
+ return (
224
+ <Dashboard
225
+ timeFilter="This Week"
226
+ metrics={{
227
+ totalBookings: { value: '156', change: '+42 vs last week', is_positive: true },
228
+ revenue: { value: '£8,540.25', change: '+£2,100 vs last week', is_positive: true },
229
+ numberOfPeople: { value: '612', change: '+89 vs last week', is_positive: true },
230
+ busiestTime: { value: 'Saturday', peopleText: '125 people', bookingText: '32 bookings' },
231
+ peopleInVenue: { value: '45', formatted_value: '45', description: 'people currently in venue' },
232
+ workHours: { company_name: 'Sharksys Soft Play', is_open: true, status: 'Open', message: 'Open until 18:00', opens_at: '09:00' }
233
+ }}
234
+ bookingsChart={{
235
+ title: 'Bookings',
236
+ subtitle: 'Mon 1st - Sun 7th Nov',
237
+ data: [
238
+ { time: 'Mon', value: 18, participants: 36 },
239
+ { time: 'Tue', value: 22, participants: 44 },
240
+ { time: 'Wed', value: 20, participants: 40 },
241
+ { time: 'Thu', value: 25, participants: 50 },
242
+ { time: 'Fri', value: 28, participants: 56 },
243
+ { time: 'Sat', value: 32, participants: 64 },
244
+ { time: 'Sun', value: 11, participants: 22 },
245
+ ],
246
+ isRevenue: false,
247
+ }}
248
+ revenueChart={{
249
+ title: 'Revenue',
250
+ subtitle: 'Mon 1st - Sun 7th Nov',
251
+ data: [
252
+ { time: 'Mon', value: 1200 },
253
+ { time: 'Tue', value: 1450 },
254
+ { time: 'Wed', value: 1320 },
255
+ { time: 'Thu', value: 1650 },
256
+ { time: 'Fri', value: 1850 },
257
+ { time: 'Sat', value: 2100 },
258
+ { time: 'Sun', value: 750 },
259
+ ],
260
+ isRevenue: true,
261
+ }}
262
+ />
263
+ );
264
+ };