@licklist/design 0.78.5-dev.91 → 0.78.5-dev.93

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 (777) hide show
  1. package/.storybook/preview.jsx +1 -0
  2. package/bitbucket-pipelines.yml +4 -0
  3. package/components.json +20 -0
  4. package/dist/index.d.ts +4 -2
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +21 -9
  7. package/dist/v2/components/AccountManagerCard/AccountManagerCard.d.ts +11 -0
  8. package/dist/v2/components/AccountManagerCard/AccountManagerCard.d.ts.map +1 -0
  9. package/dist/v2/components/AccountManagerCard/AccountManagerCard.js +62 -0
  10. package/dist/v2/components/AccountManagerCard/AccountManagerCard.scss.js +6 -0
  11. package/dist/v2/components/AccountManagerCard/index.d.ts +3 -0
  12. package/dist/v2/components/AccountManagerCard/index.d.ts.map +1 -0
  13. package/dist/v2/components/ActionMenu/ActionMenu.scss.js +1 -1
  14. package/dist/v2/components/Alert/Alert.scss.js +1 -1
  15. package/dist/v2/components/AvatarUpload/AvatarUpload.d.ts.map +1 -1
  16. package/dist/v2/components/AvatarUpload/AvatarUpload.js +23 -13
  17. package/dist/v2/components/AvatarUpload/AvatarUpload.scss.js +1 -1
  18. package/dist/v2/components/Button/Button.d.ts.map +1 -1
  19. package/dist/v2/components/Button/Button.js +2 -1
  20. package/dist/v2/components/Button/Button.scss.js +1 -1
  21. package/dist/v2/components/Button/GhostButton.scss.js +1 -1
  22. package/dist/v2/components/Checkbox/Checkbox.scss.js +1 -1
  23. package/dist/v2/components/DataTable/DataTable.d.ts +3 -1
  24. package/dist/v2/components/DataTable/DataTable.d.ts.map +1 -1
  25. package/dist/v2/components/DataTable/DataTable.js +40 -39
  26. package/dist/v2/components/DataTable/DataTable.scss.js +1 -1
  27. package/dist/v2/components/EmptyState/EmptyState.scss.js +1 -1
  28. package/dist/v2/components/FeatureToggle/FeatureToggle.d.ts +14 -0
  29. package/dist/v2/components/FeatureToggle/FeatureToggle.d.ts.map +1 -0
  30. package/dist/v2/components/FeatureToggle/FeatureToggle.js +47 -0
  31. package/dist/v2/components/FeatureToggle/FeatureToggle.scss.js +6 -0
  32. package/dist/v2/components/FeatureToggle/index.d.ts +3 -0
  33. package/dist/v2/components/FeatureToggle/index.d.ts.map +1 -0
  34. package/dist/v2/components/FormField/FormField.scss.js +1 -1
  35. package/dist/v2/components/InfoGrid/InfoGrid.scss.js +1 -1
  36. package/dist/v2/components/InputCheckbox/InputCheckbox.scss.js +1 -1
  37. package/dist/v2/components/Modal/DeleteModal.d.ts.map +1 -1
  38. package/dist/v2/components/Modal/DeleteModal.js +74 -76
  39. package/dist/v2/components/Modal/DeleteModal.scss.js +1 -1
  40. package/dist/v2/components/NewTable/NewTable.scss.js +1 -1
  41. package/dist/v2/components/NewTabs/NewTabs.scss.js +1 -1
  42. package/dist/v2/components/NotificationBanner/NotificationBanner.d.ts +16 -0
  43. package/dist/v2/components/NotificationBanner/NotificationBanner.d.ts.map +1 -0
  44. package/dist/v2/components/NotificationBanner/NotificationBanner.js +50 -0
  45. package/dist/v2/components/NotificationBanner/NotificationBanner.scss.js +6 -0
  46. package/dist/v2/components/NotificationBanner/index.d.ts +3 -0
  47. package/dist/v2/components/NotificationBanner/index.d.ts.map +1 -0
  48. package/dist/v2/components/RadioCard/{RadioCard.d.ts → RadioCardGroup.d.ts} +5 -4
  49. package/dist/v2/components/RadioCard/RadioCardGroup.d.ts.map +1 -0
  50. package/dist/v2/components/RadioCard/RadioCardGroup.js +69 -0
  51. package/dist/v2/components/RadioCard/RadioCardGroup.scss.js +6 -0
  52. package/dist/v2/components/RadioCard/index.d.ts +1 -1
  53. package/dist/v2/components/RadioCard/index.d.ts.map +1 -1
  54. package/dist/v2/components/Select/Select.d.ts +7 -1
  55. package/dist/v2/components/Select/Select.d.ts.map +1 -1
  56. package/dist/v2/components/Select/Select.js +9 -2
  57. package/dist/v2/components/Select/index.d.ts +1 -1
  58. package/dist/v2/components/Select/index.d.ts.map +1 -1
  59. package/dist/v2/components/StatusBadge/StatusBadge.d.ts +2 -1
  60. package/dist/v2/components/StatusBadge/StatusBadge.d.ts.map +1 -1
  61. package/dist/v2/components/StatusBadge/StatusBadge.js +7 -3
  62. package/dist/v2/components/StatusBadge/StatusBadge.scss.js +1 -1
  63. package/dist/v2/components/TableControls/TableControls.scss.js +1 -1
  64. package/dist/v2/components/Tabs/Tabs.d.ts.map +1 -1
  65. package/dist/v2/components/Tabs/Tabs.js +40 -0
  66. package/dist/v2/components/Tabs/Tabs.scss.js +1 -1
  67. package/dist/v2/components/Toggle/Toggle.d.ts +10 -0
  68. package/dist/v2/components/Toggle/Toggle.d.ts.map +1 -0
  69. package/dist/v2/components/Toggle/Toggle.js +17 -0
  70. package/dist/v2/components/Toggle/Toggle.scss.js +6 -0
  71. package/dist/v2/components/Toggle/index.d.ts +3 -0
  72. package/dist/v2/components/Toggle/index.d.ts.map +1 -0
  73. package/dist/v2/components/Tooltip/Tooltip.d.ts +0 -1
  74. package/dist/v2/components/Tooltip/Tooltip.d.ts.map +1 -1
  75. package/dist/v2/components/WYSIWYGEditor/WYSIWYGEditor.scss.js +1 -1
  76. package/dist/v2/components/index.d.ts +13 -2
  77. package/dist/v2/components/index.d.ts.map +1 -1
  78. package/dist/v2/dashboard-analytics/blog-posts/index.d.ts +1 -1
  79. package/dist/v2/dashboard-analytics/blog-posts/index.d.ts.map +1 -1
  80. package/dist/v2/dashboard-analytics/chart/Chart.d.ts.map +1 -1
  81. package/dist/v2/dashboard-analytics/chart/Chart.js +6 -5
  82. package/dist/v2/dashboard-analytics/venue-card/VenueCard.d.ts +2 -2
  83. package/dist/v2/dashboard-analytics/venue-card/VenueCard.d.ts.map +1 -1
  84. package/dist/v2/icons/index.d.ts +98 -4
  85. package/dist/v2/icons/index.d.ts.map +1 -1
  86. package/dist/v2/icons/index.js +497 -2
  87. package/dist/v2/index.d.ts +15 -4
  88. package/dist/v2/index.d.ts.map +1 -1
  89. package/dist/v2/navigation/DashboardLayout/AdminSidebar.d.ts +3 -0
  90. package/dist/v2/navigation/DashboardLayout/AdminSidebar.d.ts.map +1 -1
  91. package/dist/v2/navigation/DashboardLayout/AdminSidebar.js +34 -60
  92. package/dist/v2/navigation/DashboardLayout/AdminSidebar.scss.js +1 -1
  93. package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts +3 -0
  94. package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts.map +1 -1
  95. package/dist/v2/navigation/DashboardLayout/DashboardLayout.js +16 -6
  96. package/dist/v2/navigation/DashboardLayout/DashboardLayout.scss.js +1 -1
  97. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts.map +1 -1
  98. package/dist/v2/navigation/DashboardLayout/ProviderSidebar.js +7 -26
  99. package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts +1 -0
  100. package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts.map +1 -1
  101. package/dist/v2/navigation/DashboardLayout/TopNavigation.js +27 -8
  102. package/dist/v2/navigation/DashboardLayout/TopNavigation.scss.js +1 -1
  103. package/dist/v2/navigation/FigmasSideBar/FigmasSideBar.d.ts.map +1 -1
  104. package/dist/v2/navigation/config.d.ts.map +1 -1
  105. package/dist/v2/pages/Settings/SettingsPage.scss.js +1 -1
  106. package/dist/v2/pages/Settings/SettingsTabs.scss.js +1 -1
  107. package/dist/v2/pages/Settings/components/SidebarCustomisation.js +9 -1
  108. package/dist/v2/pages/Settings/components/SidebarCustomisation.scss.js +1 -1
  109. package/dist/v2/pages/Settings/components/SidebarNavItem.js +9 -1
  110. package/dist/v2/pages/Settings/components/SidebarNavItem.scss.js +1 -1
  111. package/dist/v2/pages/auth/AuthLayout/AuthLayout.js +138 -0
  112. package/dist/v2/pages/auth/AuthLayout/AuthLayout.scss.js +6 -0
  113. package/dist/v2/pages/auth/CreatePassword/CreatePasswordPage.js +377 -0
  114. package/dist/v2/pages/auth/CreatePassword/CreatePasswordPage.scss.js +6 -0
  115. package/dist/{auth → v2/pages/auth}/Login/LoginPage.js +97 -46
  116. package/dist/v2/pages/auth/Login/LoginPage.scss.js +6 -0
  117. package/dist/v2/pages/auth/ResetPassword/ResetPasswordPage.js +274 -0
  118. package/dist/v2/pages/auth/ResetPassword/ResetPasswordPage.scss.js +6 -0
  119. package/dist/v2/pages/auth/VerifyEmail/VerifyEmailPage.js +313 -0
  120. package/dist/v2/pages/auth/VerifyEmail/VerifyEmailPage.scss.js +6 -0
  121. package/dist/v2/shadcn/_reference/AccountManagerCard.d.ts +10 -0
  122. package/dist/v2/shadcn/_reference/AccountManagerCard.d.ts.map +1 -0
  123. package/dist/v2/shadcn/_reference/AffiliatesTable.d.ts +18 -0
  124. package/dist/v2/shadcn/_reference/AffiliatesTable.d.ts.map +1 -0
  125. package/dist/v2/shadcn/_reference/AuditArchive.d.ts +7 -0
  126. package/dist/v2/shadcn/_reference/AuditArchive.d.ts.map +1 -0
  127. package/dist/v2/shadcn/_reference/AuditContent.d.ts +4 -0
  128. package/dist/v2/shadcn/_reference/AuditContent.d.ts.map +1 -0
  129. package/dist/v2/shadcn/_reference/AutomationsGeneralSettings.d.ts +4 -0
  130. package/dist/v2/shadcn/_reference/AutomationsGeneralSettings.d.ts.map +1 -0
  131. package/dist/v2/shadcn/_reference/AvatarUpload.d.ts +9 -0
  132. package/dist/v2/shadcn/_reference/AvatarUpload.d.ts.map +1 -0
  133. package/dist/v2/shadcn/_reference/BookingsSummaryCard.d.ts +7 -0
  134. package/dist/v2/shadcn/_reference/BookingsSummaryCard.d.ts.map +1 -0
  135. package/dist/v2/shadcn/_reference/CodeCleanUpAudit.d.ts +4 -0
  136. package/dist/v2/shadcn/_reference/CodeCleanUpAudit.d.ts.map +1 -0
  137. package/dist/v2/shadcn/_reference/CompaniesTable.d.ts +4 -0
  138. package/dist/v2/shadcn/_reference/CompaniesTable.d.ts.map +1 -0
  139. package/dist/v2/shadcn/_reference/ComponentAudit.d.ts +4 -0
  140. package/dist/v2/shadcn/_reference/ComponentAudit.d.ts.map +1 -0
  141. package/dist/v2/shadcn/_reference/ConfigureSettingsCard.d.ts +28 -0
  142. package/dist/v2/shadcn/_reference/ConfigureSettingsCard.d.ts.map +1 -0
  143. package/dist/v2/shadcn/_reference/CustomerCard.d.ts +16 -0
  144. package/dist/v2/shadcn/_reference/CustomerCard.d.ts.map +1 -0
  145. package/dist/v2/shadcn/_reference/DashboardCards.d.ts +4 -0
  146. package/dist/v2/shadcn/_reference/DashboardCards.d.ts.map +1 -0
  147. package/dist/v2/shadcn/_reference/DashboardFooter.d.ts +3 -0
  148. package/dist/v2/shadcn/_reference/DashboardFooter.d.ts.map +1 -0
  149. package/dist/v2/shadcn/_reference/DiarySettings.d.ts +4 -0
  150. package/dist/v2/shadcn/_reference/DiarySettings.d.ts.map +1 -0
  151. package/dist/v2/shadcn/_reference/DiaryView.d.ts +15 -0
  152. package/dist/v2/shadcn/_reference/DiaryView.d.ts.map +1 -0
  153. package/dist/v2/shadcn/_reference/EmptyState.d.ts +10 -0
  154. package/dist/v2/shadcn/_reference/EmptyState.d.ts.map +1 -0
  155. package/dist/v2/shadcn/_reference/EntityInfoCard.d.ts +14 -0
  156. package/dist/v2/shadcn/_reference/EntityInfoCard.d.ts.map +1 -0
  157. package/dist/v2/shadcn/_reference/ExistingUserAssignments.d.ts +7 -0
  158. package/dist/v2/shadcn/_reference/ExistingUserAssignments.d.ts.map +1 -0
  159. package/dist/v2/shadcn/_reference/FeatureToggle.d.ts +20 -0
  160. package/dist/v2/shadcn/_reference/FeatureToggle.d.ts.map +1 -0
  161. package/dist/v2/shadcn/_reference/FlowCard.d.ts +21 -0
  162. package/dist/v2/shadcn/_reference/FlowCard.d.ts.map +1 -0
  163. package/dist/v2/shadcn/_reference/FlowsContent.d.ts +12 -0
  164. package/dist/v2/shadcn/_reference/FlowsContent.d.ts.map +1 -0
  165. package/dist/v2/shadcn/_reference/FlowsGeneralSettings.d.ts +8 -0
  166. package/dist/v2/shadcn/_reference/FlowsGeneralSettings.d.ts.map +1 -0
  167. package/dist/v2/shadcn/_reference/GeneralSettings.d.ts +8 -0
  168. package/dist/v2/shadcn/_reference/GeneralSettings.d.ts.map +1 -0
  169. package/dist/v2/shadcn/_reference/InventoryGeneralSettings.d.ts +17 -0
  170. package/dist/v2/shadcn/_reference/InventoryGeneralSettings.d.ts.map +1 -0
  171. package/dist/v2/shadcn/_reference/LanguageSelector.d.ts +12 -0
  172. package/dist/v2/shadcn/_reference/LanguageSelector.d.ts.map +1 -0
  173. package/dist/v2/shadcn/_reference/LoadingScreen.d.ts +8 -0
  174. package/dist/v2/shadcn/_reference/LoadingScreen.d.ts.map +1 -0
  175. package/dist/v2/shadcn/_reference/LoadingSpinner.d.ts +8 -0
  176. package/dist/v2/shadcn/_reference/LoadingSpinner.d.ts.map +1 -0
  177. package/dist/v2/shadcn/_reference/ManagedClientsList.d.ts +7 -0
  178. package/dist/v2/shadcn/_reference/ManagedClientsList.d.ts.map +1 -0
  179. package/dist/v2/shadcn/_reference/NPSScore.d.ts +8 -0
  180. package/dist/v2/shadcn/_reference/NPSScore.d.ts.map +1 -0
  181. package/dist/v2/shadcn/_reference/NPSSummaryCard.d.ts +8 -0
  182. package/dist/v2/shadcn/_reference/NPSSummaryCard.d.ts.map +1 -0
  183. package/dist/v2/shadcn/_reference/NotificationBanner.d.ts +20 -0
  184. package/dist/v2/shadcn/_reference/NotificationBanner.d.ts.map +1 -0
  185. package/dist/v2/shadcn/_reference/NotificationPanel.d.ts +11 -0
  186. package/dist/v2/shadcn/_reference/NotificationPanel.d.ts.map +1 -0
  187. package/dist/v2/shadcn/_reference/OnlineUsersCard.d.ts +7 -0
  188. package/dist/v2/shadcn/_reference/OnlineUsersCard.d.ts.map +1 -0
  189. package/dist/v2/shadcn/_reference/ProtectedRoute.d.ts +6 -0
  190. package/dist/v2/shadcn/_reference/ProtectedRoute.d.ts.map +1 -0
  191. package/dist/v2/shadcn/_reference/ProvidersTable.d.ts +7 -0
  192. package/dist/v2/shadcn/_reference/ProvidersTable.d.ts.map +1 -0
  193. package/dist/v2/shadcn/_reference/QuickAddPanel.d.ts +18 -0
  194. package/dist/v2/shadcn/_reference/QuickAddPanel.d.ts.map +1 -0
  195. package/dist/v2/shadcn/_reference/QuickFilters.d.ts +28 -0
  196. package/dist/v2/shadcn/_reference/QuickFilters.d.ts.map +1 -0
  197. package/dist/v2/shadcn/_reference/ScheduleView.d.ts +29 -0
  198. package/dist/v2/shadcn/_reference/ScheduleView.d.ts.map +1 -0
  199. package/dist/v2/shadcn/_reference/ScrollToTop.d.ts +3 -0
  200. package/dist/v2/shadcn/_reference/ScrollToTop.d.ts.map +1 -0
  201. package/dist/v2/shadcn/_reference/SecondaryNav.d.ts +12 -0
  202. package/dist/v2/shadcn/_reference/SecondaryNav.d.ts.map +1 -0
  203. package/dist/v2/shadcn/_reference/SecuritySettings.d.ts +8 -0
  204. package/dist/v2/shadcn/_reference/SecuritySettings.d.ts.map +1 -0
  205. package/dist/v2/shadcn/_reference/SessionDetailView.d.ts +33 -0
  206. package/dist/v2/shadcn/_reference/SessionDetailView.d.ts.map +1 -0
  207. package/dist/v2/shadcn/_reference/Sidebar.d.ts +4 -0
  208. package/dist/v2/shadcn/_reference/Sidebar.d.ts.map +1 -0
  209. package/dist/v2/shadcn/_reference/SidebarAwareLayout.d.ts +9 -0
  210. package/dist/v2/shadcn/_reference/SidebarAwareLayout.d.ts.map +1 -0
  211. package/dist/v2/shadcn/_reference/SidebarLabelCustomization.d.ts +9 -0
  212. package/dist/v2/shadcn/_reference/SidebarLabelCustomization.d.ts.map +1 -0
  213. package/dist/v2/shadcn/_reference/SimulationBanner.d.ts +3 -0
  214. package/dist/v2/shadcn/_reference/SimulationBanner.d.ts.map +1 -0
  215. package/dist/v2/shadcn/_reference/SortControls.d.ts +10 -0
  216. package/dist/v2/shadcn/_reference/SortControls.d.ts.map +1 -0
  217. package/dist/v2/shadcn/_reference/StatusBadge.d.ts +7 -0
  218. package/dist/v2/shadcn/_reference/StatusBadge.d.ts.map +1 -0
  219. package/dist/v2/shadcn/_reference/StyleGuideContent.d.ts +85 -0
  220. package/dist/v2/shadcn/_reference/StyleGuideContent.d.ts.map +1 -0
  221. package/dist/v2/shadcn/_reference/TableActionMenu.d.ts +21 -0
  222. package/dist/v2/shadcn/_reference/TableActionMenu.d.ts.map +1 -0
  223. package/dist/v2/shadcn/_reference/ThemeProvider.d.ts +14 -0
  224. package/dist/v2/shadcn/_reference/ThemeProvider.d.ts.map +1 -0
  225. package/dist/v2/shadcn/_reference/ThemeSettings.d.ts +4 -0
  226. package/dist/v2/shadcn/_reference/ThemeSettings.d.ts.map +1 -0
  227. package/dist/v2/shadcn/_reference/TopNavigation.d.ts +4 -0
  228. package/dist/v2/shadcn/_reference/TopNavigation.d.ts.map +1 -0
  229. package/dist/v2/shadcn/_reference/UserActivityHistory.d.ts +8 -0
  230. package/dist/v2/shadcn/_reference/UserActivityHistory.d.ts.map +1 -0
  231. package/dist/v2/shadcn/_reference/UserLanguageSettings.d.ts +4 -0
  232. package/dist/v2/shadcn/_reference/UserLanguageSettings.d.ts.map +1 -0
  233. package/dist/v2/shadcn/_reference/UserPanel.d.ts +9 -0
  234. package/dist/v2/shadcn/_reference/UserPanel.d.ts.map +1 -0
  235. package/dist/v2/shadcn/_reference/UsersTable.d.ts +23 -0
  236. package/dist/v2/shadcn/_reference/UsersTable.d.ts.map +1 -0
  237. package/dist/v2/shadcn/_reference/WaiverForm.d.ts +8 -0
  238. package/dist/v2/shadcn/_reference/WaiverForm.d.ts.map +1 -0
  239. package/dist/v2/shadcn/_reference/WaiversGeneralSettings.d.ts +4 -0
  240. package/dist/v2/shadcn/_reference/WaiversGeneralSettings.d.ts.map +1 -0
  241. package/dist/v2/shadcn/_reference/WaiversTable.d.ts +27 -0
  242. package/dist/v2/shadcn/_reference/WaiversTable.d.ts.map +1 -0
  243. package/dist/v2/shadcn/_reference/WaiversTemplatesSettings.d.ts +4 -0
  244. package/dist/v2/shadcn/_reference/WaiversTemplatesSettings.d.ts.map +1 -0
  245. package/dist/v2/shadcn/_reference/ai/AIChatPanel.d.ts +8 -0
  246. package/dist/v2/shadcn/_reference/ai/AIChatPanel.d.ts.map +1 -0
  247. package/dist/v2/shadcn/_reference/ai/AIChatSearchBar.d.ts +4 -0
  248. package/dist/v2/shadcn/_reference/ai/AIChatSearchBar.d.ts.map +1 -0
  249. package/dist/v2/shadcn/_reference/ai/ChatInteractiveBlock.d.ts +12 -0
  250. package/dist/v2/shadcn/_reference/ai/ChatInteractiveBlock.d.ts.map +1 -0
  251. package/dist/v2/shadcn/_reference/ai/ChatMessageContent.d.ts +11 -0
  252. package/dist/v2/shadcn/_reference/ai/ChatMessageContent.d.ts.map +1 -0
  253. package/dist/v2/shadcn/_reference/ai/parseInteractiveBlocks.d.ts +68 -0
  254. package/dist/v2/shadcn/_reference/ai/parseInteractiveBlocks.d.ts.map +1 -0
  255. package/dist/v2/shadcn/_reference/auth/AuthLayout.d.ts +11 -0
  256. package/dist/v2/shadcn/_reference/auth/AuthLayout.d.ts.map +1 -0
  257. package/dist/v2/shadcn/_reference/auth/CreatePasswordForm.d.ts +3 -0
  258. package/dist/v2/shadcn/_reference/auth/CreatePasswordForm.d.ts.map +1 -0
  259. package/dist/v2/shadcn/_reference/auth/CreatePasswordPanel.d.ts +3 -0
  260. package/dist/v2/shadcn/_reference/auth/CreatePasswordPanel.d.ts.map +1 -0
  261. package/dist/v2/shadcn/_reference/auth/LoginFooter.d.ts +3 -0
  262. package/dist/v2/shadcn/_reference/auth/LoginFooter.d.ts.map +1 -0
  263. package/dist/v2/shadcn/_reference/auth/LoginForm.d.ts +3 -0
  264. package/dist/v2/shadcn/_reference/auth/LoginForm.d.ts.map +1 -0
  265. package/dist/v2/shadcn/_reference/auth/LoginPanel.d.ts +3 -0
  266. package/dist/v2/shadcn/_reference/auth/LoginPanel.d.ts.map +1 -0
  267. package/dist/v2/shadcn/_reference/auth/ResetPasswordForm.d.ts +3 -0
  268. package/dist/v2/shadcn/_reference/auth/ResetPasswordForm.d.ts.map +1 -0
  269. package/dist/v2/shadcn/_reference/auth/ResetPasswordPanel.d.ts +3 -0
  270. package/dist/v2/shadcn/_reference/auth/ResetPasswordPanel.d.ts.map +1 -0
  271. package/dist/v2/shadcn/_reference/auth/VerifyEmailForm.d.ts +3 -0
  272. package/dist/v2/shadcn/_reference/auth/VerifyEmailForm.d.ts.map +1 -0
  273. package/dist/v2/shadcn/_reference/auth/VerifyEmailPanel.d.ts +3 -0
  274. package/dist/v2/shadcn/_reference/auth/VerifyEmailPanel.d.ts.map +1 -0
  275. package/dist/v2/shadcn/_reference/email/EmailAttachment.d.ts +14 -0
  276. package/dist/v2/shadcn/_reference/email/EmailAttachment.d.ts.map +1 -0
  277. package/dist/v2/shadcn/_reference/email/EmailAutomation.d.ts +12 -0
  278. package/dist/v2/shadcn/_reference/email/EmailAutomation.d.ts.map +1 -0
  279. package/dist/v2/shadcn/_reference/email/EmailPlaceholders.d.ts +11 -0
  280. package/dist/v2/shadcn/_reference/email/EmailPlaceholders.d.ts.map +1 -0
  281. package/dist/v2/shadcn/_reference/email/UnlayerEmailEditor.d.ts +9 -0
  282. package/dist/v2/shadcn/_reference/email/UnlayerEmailEditor.d.ts.map +1 -0
  283. package/dist/v2/shadcn/_reference/email/emailTemplateData.d.ts +14 -0
  284. package/dist/v2/shadcn/_reference/email/emailTemplateData.d.ts.map +1 -0
  285. package/dist/v2/shadcn/_reference/emptyStateIcons.d.ts +18 -0
  286. package/dist/v2/shadcn/_reference/emptyStateIcons.d.ts.map +1 -0
  287. package/dist/v2/shadcn/_reference/games/MazeGame.d.ts +4 -0
  288. package/dist/v2/shadcn/_reference/games/MazeGame.d.ts.map +1 -0
  289. package/dist/v2/shadcn/_reference/games/RunnerGame.d.ts +4 -0
  290. package/dist/v2/shadcn/_reference/games/RunnerGame.d.ts.map +1 -0
  291. package/dist/v2/shadcn/_reference/logos/BookedLogoFull.d.ts +6 -0
  292. package/dist/v2/shadcn/_reference/logos/BookedLogoFull.d.ts.map +1 -0
  293. package/dist/v2/shadcn/_reference/logos/BookedLogoMark.d.ts +7 -0
  294. package/dist/v2/shadcn/_reference/logos/BookedLogoMark.d.ts.map +1 -0
  295. package/dist/v2/shadcn/_reference/logos/BookedLogoNew.d.ts +6 -0
  296. package/dist/v2/shadcn/_reference/logos/BookedLogoNew.d.ts.map +1 -0
  297. package/dist/v2/shadcn/_reference/pricing/DynamicPricingRulesEditor.d.ts +31 -0
  298. package/dist/v2/shadcn/_reference/pricing/DynamicPricingRulesEditor.d.ts.map +1 -0
  299. package/dist/v2/shadcn/_reference/pricing/DynamicPricingTierCard.d.ts +24 -0
  300. package/dist/v2/shadcn/_reference/pricing/DynamicPricingTierCard.d.ts.map +1 -0
  301. package/dist/v2/shadcn/_reference/pricing/DynamicPricingTiersList.d.ts +4 -0
  302. package/dist/v2/shadcn/_reference/pricing/DynamicPricingTiersList.d.ts.map +1 -0
  303. package/dist/v2/shadcn/_reference/pricing/PricingCalendar.d.ts +4 -0
  304. package/dist/v2/shadcn/_reference/pricing/PricingCalendar.d.ts.map +1 -0
  305. package/dist/v2/shadcn/_reference/pricing/PricingPeriodCard.d.ts +35 -0
  306. package/dist/v2/shadcn/_reference/pricing/PricingPeriodCard.d.ts.map +1 -0
  307. package/dist/v2/shadcn/_reference/pricing/PricingPeriodForm.d.ts +19 -0
  308. package/dist/v2/shadcn/_reference/pricing/PricingPeriodForm.d.ts.map +1 -0
  309. package/dist/v2/shadcn/_reference/pricing/PricingPeriodsList.d.ts +4 -0
  310. package/dist/v2/shadcn/_reference/pricing/PricingPeriodsList.d.ts.map +1 -0
  311. package/dist/v2/shadcn/_reference/pricing/getRuleSummary.d.ts +4 -0
  312. package/dist/v2/shadcn/_reference/pricing/getRuleSummary.d.ts.map +1 -0
  313. package/dist/v2/shadcn/_reference/products/AvailabilityRulesSection.d.ts +24 -0
  314. package/dist/v2/shadcn/_reference/products/AvailabilityRulesSection.d.ts.map +1 -0
  315. package/dist/v2/shadcn/_reference/products/AvailabilitySection.d.ts +20 -0
  316. package/dist/v2/shadcn/_reference/products/AvailabilitySection.d.ts.map +1 -0
  317. package/dist/v2/shadcn/_reference/products/BookingTypeConfigOptions.d.ts +17 -0
  318. package/dist/v2/shadcn/_reference/products/BookingTypeConfigOptions.d.ts.map +1 -0
  319. package/dist/v2/shadcn/_reference/products/CapacityPeriodsSection.d.ts +18 -0
  320. package/dist/v2/shadcn/_reference/products/CapacityPeriodsSection.d.ts.map +1 -0
  321. package/dist/v2/shadcn/_reference/products/DynamicPricingTiersSection.d.ts +17 -0
  322. package/dist/v2/shadcn/_reference/products/DynamicPricingTiersSection.d.ts.map +1 -0
  323. package/dist/v2/shadcn/_reference/products/GiftCardOrdersTab.d.ts +7 -0
  324. package/dist/v2/shadcn/_reference/products/GiftCardOrdersTab.d.ts.map +1 -0
  325. package/dist/v2/shadcn/_reference/products/GiftCardSettings.d.ts +28 -0
  326. package/dist/v2/shadcn/_reference/products/GiftCardSettings.d.ts.map +1 -0
  327. package/dist/v2/shadcn/_reference/products/PackageProductsSection.d.ts +18 -0
  328. package/dist/v2/shadcn/_reference/products/PackageProductsSection.d.ts.map +1 -0
  329. package/dist/v2/shadcn/_reference/products/PricingSection.d.ts +13 -0
  330. package/dist/v2/shadcn/_reference/products/PricingSection.d.ts.map +1 -0
  331. package/dist/v2/shadcn/_reference/products/ProductTypeFields.d.ts +13 -0
  332. package/dist/v2/shadcn/_reference/products/ProductTypeFields.d.ts.map +1 -0
  333. package/dist/v2/shadcn/_reference/products/ProductTypeIcon.d.ts +9 -0
  334. package/dist/v2/shadcn/_reference/products/ProductTypeIcon.d.ts.map +1 -0
  335. package/dist/v2/shadcn/_reference/products/VariablePricingSection.d.ts +26 -0
  336. package/dist/v2/shadcn/_reference/products/VariablePricingSection.d.ts.map +1 -0
  337. package/dist/v2/shadcn/_reference/products/productTypeConfig.d.ts +28 -0
  338. package/dist/v2/shadcn/_reference/products/productTypeConfig.d.ts.map +1 -0
  339. package/dist/v2/shadcn/_reference/shared/BackButton.d.ts +13 -0
  340. package/dist/v2/shadcn/_reference/shared/BackButton.d.ts.map +1 -0
  341. package/dist/v2/shadcn/_reference/shared/CancelConfirmationDialog.d.ts +12 -0
  342. package/dist/v2/shadcn/_reference/shared/CancelConfirmationDialog.d.ts.map +1 -0
  343. package/dist/v2/shadcn/_reference/shared/ConfirmationDialog.d.ts +16 -0
  344. package/dist/v2/shadcn/_reference/shared/ConfirmationDialog.d.ts.map +1 -0
  345. package/dist/v2/shadcn/_reference/shared/DeleteConfirmationDialog.d.ts +12 -0
  346. package/dist/v2/shadcn/_reference/shared/DeleteConfirmationDialog.d.ts.map +1 -0
  347. package/dist/v2/shadcn/_reference/shared/DeleteEntityPage.d.ts +39 -0
  348. package/dist/v2/shadcn/_reference/shared/DeleteEntityPage.d.ts.map +1 -0
  349. package/dist/v2/shadcn/_reference/shared/SidebarIcons.d.ts +18 -0
  350. package/dist/v2/shadcn/_reference/shared/SidebarIcons.d.ts.map +1 -0
  351. package/dist/v2/shadcn/_reference/shared/UnifiedSidebar.d.ts +29 -0
  352. package/dist/v2/shadcn/_reference/shared/UnifiedSidebar.d.ts.map +1 -0
  353. package/dist/v2/shadcn/_reference/tables/BulkActionsBar.d.ts +17 -0
  354. package/dist/v2/shadcn/_reference/tables/BulkActionsBar.d.ts.map +1 -0
  355. package/dist/v2/shadcn/_reference/tables/DataTable.d.ts +7 -0
  356. package/dist/v2/shadcn/_reference/tables/DataTable.d.ts.map +1 -0
  357. package/dist/v2/shadcn/_reference/tables/TableControls.d.ts +8 -0
  358. package/dist/v2/shadcn/_reference/tables/TableControls.d.ts.map +1 -0
  359. package/dist/v2/shadcn/_reference/tables/index.d.ts +4 -0
  360. package/dist/v2/shadcn/_reference/tables/index.d.ts.map +1 -0
  361. package/dist/v2/shadcn/_reference/tables/types.d.ts +64 -0
  362. package/dist/v2/shadcn/_reference/tables/types.d.ts.map +1 -0
  363. package/dist/v2/shadcn/_reference/zones/LegacyZoneSettings.d.ts +24 -0
  364. package/dist/v2/shadcn/_reference/zones/LegacyZoneSettings.d.ts.map +1 -0
  365. package/dist/v2/shadcn/components/ui/accordion.d.ts +8 -0
  366. package/dist/v2/shadcn/components/ui/accordion.d.ts.map +1 -0
  367. package/dist/v2/shadcn/components/ui/alert-dialog.d.ts +21 -0
  368. package/dist/v2/shadcn/components/ui/alert-dialog.d.ts.map +1 -0
  369. package/dist/v2/shadcn/components/ui/alert.d.ts +9 -0
  370. package/dist/v2/shadcn/components/ui/alert.d.ts.map +1 -0
  371. package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts +4 -0
  372. package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts.map +1 -0
  373. package/dist/v2/shadcn/components/ui/avatar.d.ts +7 -0
  374. package/dist/v2/shadcn/components/ui/avatar.d.ts.map +1 -0
  375. package/dist/v2/shadcn/components/ui/badge.d.ts +10 -0
  376. package/dist/v2/shadcn/components/ui/badge.d.ts.map +1 -0
  377. package/dist/v2/shadcn/components/ui/breadcrumb.d.ts +20 -0
  378. package/dist/v2/shadcn/components/ui/breadcrumb.d.ts.map +1 -0
  379. package/dist/v2/shadcn/components/ui/button.d.ts +14 -0
  380. package/dist/v2/shadcn/components/ui/button.d.ts.map +1 -0
  381. package/dist/v2/shadcn/components/ui/calendar.d.ts +9 -0
  382. package/dist/v2/shadcn/components/ui/calendar.d.ts.map +1 -0
  383. package/dist/v2/shadcn/components/ui/card.d.ts +9 -0
  384. package/dist/v2/shadcn/components/ui/card.d.ts.map +1 -0
  385. package/dist/v2/shadcn/components/ui/carousel.d.ts +19 -0
  386. package/dist/v2/shadcn/components/ui/carousel.d.ts.map +1 -0
  387. package/dist/v2/shadcn/components/ui/checkbox.d.ts +6 -0
  388. package/dist/v2/shadcn/components/ui/checkbox.d.ts.map +1 -0
  389. package/dist/v2/shadcn/components/ui/checkbox.js +115 -0
  390. package/dist/v2/shadcn/components/ui/checkbox.scss.js +6 -0
  391. package/dist/v2/shadcn/components/ui/collapsible.d.ts +6 -0
  392. package/dist/v2/shadcn/components/ui/collapsible.d.ts.map +1 -0
  393. package/dist/v2/shadcn/components/ui/command.d.ts +83 -0
  394. package/dist/v2/shadcn/components/ui/command.d.ts.map +1 -0
  395. package/dist/v2/shadcn/components/ui/context-menu.d.ts +28 -0
  396. package/dist/v2/shadcn/components/ui/context-menu.d.ts.map +1 -0
  397. package/dist/v2/shadcn/components/ui/dialog.d.ts +20 -0
  398. package/dist/v2/shadcn/components/ui/dialog.d.ts.map +1 -0
  399. package/dist/v2/shadcn/components/ui/dialog.js +169 -0
  400. package/dist/v2/shadcn/components/ui/drawer.d.ts +23 -0
  401. package/dist/v2/shadcn/components/ui/drawer.d.ts.map +1 -0
  402. package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts +28 -0
  403. package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts.map +1 -0
  404. package/dist/v2/shadcn/components/ui/form.d.ts +24 -0
  405. package/dist/v2/shadcn/components/ui/form.d.ts.map +1 -0
  406. package/dist/v2/shadcn/components/ui/hover-card.d.ts +7 -0
  407. package/dist/v2/shadcn/components/ui/hover-card.d.ts.map +1 -0
  408. package/dist/v2/shadcn/components/ui/input-otp.d.ts +35 -0
  409. package/dist/v2/shadcn/components/ui/input-otp.d.ts.map +1 -0
  410. package/dist/v2/shadcn/components/ui/input.d.ts +6 -0
  411. package/dist/v2/shadcn/components/ui/input.d.ts.map +1 -0
  412. package/dist/v2/shadcn/components/ui/label.d.ts +6 -0
  413. package/dist/v2/shadcn/components/ui/label.d.ts.map +1 -0
  414. package/dist/v2/shadcn/components/ui/menubar.d.ts +34 -0
  415. package/dist/v2/shadcn/components/ui/menubar.d.ts.map +1 -0
  416. package/dist/v2/shadcn/components/ui/navigation-menu.d.ts +13 -0
  417. package/dist/v2/shadcn/components/ui/navigation-menu.d.ts.map +1 -0
  418. package/dist/v2/shadcn/components/ui/pagination.d.ts +29 -0
  419. package/dist/v2/shadcn/components/ui/pagination.d.ts.map +1 -0
  420. package/dist/v2/shadcn/components/ui/popover.d.ts +7 -0
  421. package/dist/v2/shadcn/components/ui/popover.d.ts.map +1 -0
  422. package/dist/v2/shadcn/components/ui/progress.d.ts +5 -0
  423. package/dist/v2/shadcn/components/ui/progress.d.ts.map +1 -0
  424. package/dist/v2/shadcn/components/ui/radio-card.d.ts +12 -0
  425. package/dist/v2/shadcn/components/ui/radio-card.d.ts.map +1 -0
  426. package/dist/v2/shadcn/components/ui/radio-group.d.ts +6 -0
  427. package/dist/v2/shadcn/components/ui/radio-group.d.ts.map +1 -0
  428. package/dist/v2/shadcn/components/ui/scroll-area.d.ts +6 -0
  429. package/dist/v2/shadcn/components/ui/scroll-area.d.ts.map +1 -0
  430. package/dist/v2/shadcn/components/ui/select.d.ts +14 -0
  431. package/dist/v2/shadcn/components/ui/select.d.ts.map +1 -0
  432. package/dist/v2/shadcn/components/ui/separator.d.ts +5 -0
  433. package/dist/v2/shadcn/components/ui/separator.d.ts.map +1 -0
  434. package/dist/v2/shadcn/components/ui/sheet.d.ts +26 -0
  435. package/dist/v2/shadcn/components/ui/sheet.d.ts.map +1 -0
  436. package/dist/v2/shadcn/components/ui/sidebar.d.ts +67 -0
  437. package/dist/v2/shadcn/components/ui/sidebar.d.ts.map +1 -0
  438. package/dist/v2/shadcn/components/ui/skeleton.d.ts +3 -0
  439. package/dist/v2/shadcn/components/ui/skeleton.d.ts.map +1 -0
  440. package/dist/v2/shadcn/components/ui/slider.d.ts +5 -0
  441. package/dist/v2/shadcn/components/ui/slider.d.ts.map +1 -0
  442. package/dist/v2/shadcn/components/ui/switch.d.ts +6 -0
  443. package/dist/v2/shadcn/components/ui/switch.d.ts.map +1 -0
  444. package/dist/v2/shadcn/components/ui/switch.js +115 -0
  445. package/dist/v2/shadcn/components/ui/switch.scss.js +6 -0
  446. package/dist/v2/shadcn/components/ui/table-pagination.d.ts +11 -0
  447. package/dist/v2/shadcn/components/ui/table-pagination.d.ts.map +1 -0
  448. package/dist/v2/shadcn/components/ui/table.d.ts +11 -0
  449. package/dist/v2/shadcn/components/ui/table.d.ts.map +1 -0
  450. package/dist/v2/shadcn/components/ui/tabs.d.ts +8 -0
  451. package/dist/v2/shadcn/components/ui/tabs.d.ts.map +1 -0
  452. package/dist/v2/shadcn/components/ui/textarea.d.ts +6 -0
  453. package/dist/v2/shadcn/components/ui/textarea.d.ts.map +1 -0
  454. package/dist/v2/shadcn/components/ui/toast.d.ts +16 -0
  455. package/dist/v2/shadcn/components/ui/toast.d.ts.map +1 -0
  456. package/dist/v2/shadcn/components/ui/toaster.d.ts +2 -0
  457. package/dist/v2/shadcn/components/ui/toaster.d.ts.map +1 -0
  458. package/dist/v2/shadcn/components/ui/toggle-group.d.ts +13 -0
  459. package/dist/v2/shadcn/components/ui/toggle-group.d.ts.map +1 -0
  460. package/dist/v2/shadcn/components/ui/toggle.d.ts +13 -0
  461. package/dist/v2/shadcn/components/ui/toggle.d.ts.map +1 -0
  462. package/dist/v2/shadcn/components/ui/tooltip.d.ts +8 -0
  463. package/dist/v2/shadcn/components/ui/tooltip.d.ts.map +1 -0
  464. package/dist/v2/shadcn/components/ui/use-toast.d.ts +3 -0
  465. package/dist/v2/shadcn/components/ui/use-toast.d.ts.map +1 -0
  466. package/dist/v2/shadcn/hooks/use-mobile.d.ts +2 -0
  467. package/dist/v2/shadcn/hooks/use-mobile.d.ts.map +1 -0
  468. package/dist/v2/shadcn/hooks/use-toast.d.ts +45 -0
  469. package/dist/v2/shadcn/hooks/use-toast.d.ts.map +1 -0
  470. package/dist/v2/shadcn/index.d.ts +20 -0
  471. package/dist/v2/shadcn/index.d.ts.map +1 -0
  472. package/dist/v2/shadcn/lib/utils.d.ts +3 -0
  473. package/dist/v2/shadcn/lib/utils.d.ts.map +1 -0
  474. package/dist/v2/shadcn/lib/utils.js +11 -0
  475. package/dist/v2/shadcn/styles/globals.css +112 -0
  476. package/dist/v2/styles/components/Button.scss +21 -23
  477. package/dist/v2/styles/form/NewInput.scss +1 -1
  478. package/dist/v2/styles/form/NewInput.scss.js +1 -1
  479. package/dist/v2/styles/tokens/_colors.scss +20 -0
  480. package/dist/v2/styles/tokens/_sizes.scss +4 -4
  481. package/dist/v2/types/navigation.d.ts +1 -0
  482. package/dist/v2/types/navigation.d.ts.map +1 -1
  483. package/package.json +38 -3
  484. package/rollup.config.js +1 -0
  485. package/src/index.ts +4 -2
  486. package/src/v2/components/AccountManagerCard/AccountManagerCard.scss +75 -0
  487. package/src/v2/components/AccountManagerCard/AccountManagerCard.stories.tsx +35 -0
  488. package/src/v2/components/AccountManagerCard/AccountManagerCard.tsx +37 -0
  489. package/src/v2/components/AccountManagerCard/index.ts +2 -0
  490. package/src/v2/components/AvatarUpload/AvatarUpload.scss +31 -9
  491. package/src/v2/components/AvatarUpload/AvatarUpload.tsx +13 -7
  492. package/src/v2/components/Button/Button.tsx +1 -0
  493. package/src/v2/components/Button/GhostButton.scss +2 -2
  494. package/src/v2/components/Customer/CustomersList.scss +48 -28
  495. package/src/v2/components/DataTable/DataTable.scss +14 -20
  496. package/src/v2/components/DataTable/DataTable.tsx +35 -34
  497. package/src/v2/components/FeatureToggle/FeatureToggle.scss +64 -0
  498. package/src/v2/components/FeatureToggle/FeatureToggle.stories.tsx +56 -0
  499. package/src/v2/components/FeatureToggle/FeatureToggle.tsx +41 -0
  500. package/src/v2/components/FeatureToggle/index.ts +2 -0
  501. package/src/v2/components/InputCheckbox/InputCheckbox.scss +6 -6
  502. package/src/v2/components/Modal/DeleteModal.scss +46 -85
  503. package/src/v2/components/Modal/DeleteModal.tsx +39 -35
  504. package/src/v2/components/NPSScore/NPSScore.tsx +2 -2
  505. package/src/v2/components/NewTable/NewTable.scss +1 -1
  506. package/src/v2/components/NewTabs/NewTabs.scss +4 -4
  507. package/src/v2/components/NotificationBanner/NotificationBanner.scss +123 -0
  508. package/src/v2/components/NotificationBanner/NotificationBanner.stories.tsx +54 -0
  509. package/src/v2/components/NotificationBanner/NotificationBanner.tsx +45 -0
  510. package/src/v2/components/NotificationBanner/index.ts +2 -0
  511. package/src/v2/components/RadioCard/RadioCard.stories.tsx +8 -8
  512. package/src/v2/components/RadioCard/{RadioCard.scss → RadioCardGroup.scss} +31 -6
  513. package/src/v2/components/RadioCard/{RadioCard.tsx → RadioCardGroup.tsx} +12 -4
  514. package/src/v2/components/RadioCard/index.ts +1 -1
  515. package/src/v2/components/Select/Select.tsx +15 -1
  516. package/src/v2/components/Select/index.ts +1 -1
  517. package/src/v2/components/StatusBadge/StatusBadge.tsx +11 -2
  518. package/src/v2/components/Tabs/Tabs.scss +41 -14
  519. package/src/v2/components/Tabs/Tabs.tsx +2 -1
  520. package/src/v2/components/Toggle/Toggle.scss +2 -0
  521. package/src/v2/components/Toggle/Toggle.tsx +20 -0
  522. package/src/v2/components/Toggle/index.ts +2 -0
  523. package/src/v2/components/Tooltip/Tooltip.tsx +0 -1
  524. package/src/v2/components/index.ts +26 -1
  525. package/src/v2/dashboard-analytics/blog-posts/index.ts +1 -1
  526. package/src/v2/dashboard-analytics/chart/Chart.tsx +20 -17
  527. package/src/v2/dashboard-analytics/venue-card/VenueCard.tsx +2 -2
  528. package/src/v2/icons/index.tsx +175 -9
  529. package/src/v2/index.ts +88 -7
  530. package/src/v2/navigation/DashboardLayout/AdminSidebar.scss +46 -8
  531. package/src/v2/navigation/DashboardLayout/AdminSidebar.tsx +35 -21
  532. package/src/v2/navigation/DashboardLayout/DashboardLayout.scss +3 -2
  533. package/src/v2/navigation/DashboardLayout/DashboardLayout.tsx +23 -5
  534. package/src/v2/navigation/DashboardLayout/ProviderSidebar.tsx +6 -7
  535. package/src/v2/navigation/DashboardLayout/TopNavigation.scss +16 -1
  536. package/src/v2/navigation/DashboardLayout/TopNavigation.tsx +20 -41
  537. package/src/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.tsx +1 -1
  538. package/src/v2/navigation/FigmasSideBar/FigmasSideBar.tsx +1 -2
  539. package/src/v2/navigation/FigmasTopHat/FigmasTopHat.tsx +6 -6
  540. package/src/v2/navigation/Navigation/Navigation.scss +1 -1
  541. package/src/v2/navigation/Navigation/Navigation.tsx +0 -1
  542. package/src/v2/navigation/Navigation/index.ts +0 -1
  543. package/src/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.tsx +1 -1
  544. package/src/v2/navigation/TopHatControlDisc/TopHatControlDisc.tsx +1 -1
  545. package/src/v2/navigation/config.tsx +0 -1
  546. package/src/v2/shadcn/_reference/AccountManagerCard.tsx +45 -0
  547. package/src/v2/shadcn/_reference/AffiliatesTable.tsx +178 -0
  548. package/src/v2/shadcn/_reference/AuditArchive.tsx +165 -0
  549. package/src/v2/shadcn/_reference/AuditContent.tsx +270 -0
  550. package/src/v2/shadcn/_reference/AutomationsGeneralSettings.tsx +251 -0
  551. package/src/v2/shadcn/_reference/AvatarUpload.tsx +150 -0
  552. package/src/v2/shadcn/_reference/BookingsSummaryCard.tsx +268 -0
  553. package/src/v2/shadcn/_reference/CodeCleanUpAudit.tsx +274 -0
  554. package/src/v2/shadcn/_reference/CompaniesTable.tsx +387 -0
  555. package/src/v2/shadcn/_reference/ComponentAudit.tsx +239 -0
  556. package/src/v2/shadcn/_reference/ConfigureSettingsCard.tsx +95 -0
  557. package/src/v2/shadcn/_reference/CustomerCard.tsx +155 -0
  558. package/src/v2/shadcn/_reference/DashboardCards.tsx +50 -0
  559. package/src/v2/shadcn/_reference/DashboardFooter.tsx +18 -0
  560. package/src/v2/shadcn/_reference/DiarySettings.tsx +187 -0
  561. package/src/v2/shadcn/_reference/DiaryView.tsx +998 -0
  562. package/src/v2/shadcn/_reference/EmptyState.tsx +76 -0
  563. package/src/v2/shadcn/_reference/EntityInfoCard.tsx +48 -0
  564. package/src/v2/shadcn/_reference/ExistingUserAssignments.tsx +131 -0
  565. package/src/v2/shadcn/_reference/FeatureToggle.tsx +72 -0
  566. package/src/v2/shadcn/_reference/FlowCard.tsx +170 -0
  567. package/src/v2/shadcn/_reference/FlowsContent.tsx +688 -0
  568. package/src/v2/shadcn/_reference/FlowsGeneralSettings.tsx +27 -0
  569. package/src/v2/shadcn/_reference/GeneralSettings.tsx +33 -0
  570. package/src/v2/shadcn/_reference/InventoryGeneralSettings.tsx +82 -0
  571. package/src/v2/shadcn/_reference/LanguageSelector.tsx +97 -0
  572. package/src/v2/shadcn/_reference/LoadingScreen.tsx +25 -0
  573. package/src/v2/shadcn/_reference/LoadingSpinner.tsx +41 -0
  574. package/src/v2/shadcn/_reference/ManagedClientsList.tsx +121 -0
  575. package/src/v2/shadcn/_reference/NPSScore.tsx +379 -0
  576. package/src/v2/shadcn/_reference/NPSSummaryCard.tsx +181 -0
  577. package/src/v2/shadcn/_reference/NotificationBanner.tsx +129 -0
  578. package/src/v2/shadcn/_reference/NotificationPanel.tsx +208 -0
  579. package/src/v2/shadcn/_reference/OnlineUsersCard.tsx +73 -0
  580. package/src/v2/shadcn/_reference/ProtectedRoute.tsx +39 -0
  581. package/src/v2/shadcn/_reference/ProvidersTable.tsx +353 -0
  582. package/src/v2/shadcn/_reference/QuickAddPanel.tsx +1057 -0
  583. package/src/v2/shadcn/_reference/QuickFilters.tsx +112 -0
  584. package/src/v2/shadcn/_reference/ScheduleView.tsx +410 -0
  585. package/src/v2/shadcn/_reference/ScrollToTop.tsx +14 -0
  586. package/src/v2/shadcn/_reference/SecondaryNav.tsx +50 -0
  587. package/src/v2/shadcn/_reference/SecuritySettings.tsx +258 -0
  588. package/src/v2/shadcn/_reference/SessionDetailView.tsx +294 -0
  589. package/src/v2/shadcn/_reference/Sidebar.tsx +14 -0
  590. package/src/v2/shadcn/_reference/SidebarAwareLayout.tsx +30 -0
  591. package/src/v2/shadcn/_reference/SidebarLabelCustomization.tsx +285 -0
  592. package/src/v2/shadcn/_reference/SimulationBanner.tsx +57 -0
  593. package/src/v2/shadcn/_reference/SortControls.tsx +65 -0
  594. package/src/v2/shadcn/_reference/StatusBadge.tsx +49 -0
  595. package/src/v2/shadcn/_reference/StyleGuideContent.tsx +331 -0
  596. package/src/v2/shadcn/_reference/TableActionMenu.tsx +126 -0
  597. package/src/v2/shadcn/_reference/ThemeProvider.tsx +119 -0
  598. package/src/v2/shadcn/_reference/ThemeSettings.tsx +73 -0
  599. package/src/v2/shadcn/_reference/TopNavigation.tsx +332 -0
  600. package/src/v2/shadcn/_reference/UserActivityHistory.tsx +209 -0
  601. package/src/v2/shadcn/_reference/UserLanguageSettings.tsx +94 -0
  602. package/src/v2/shadcn/_reference/UserPanel.tsx +472 -0
  603. package/src/v2/shadcn/_reference/UsersTable.tsx +1023 -0
  604. package/src/v2/shadcn/_reference/WaiverForm.tsx +301 -0
  605. package/src/v2/shadcn/_reference/WaiversGeneralSettings.tsx +46 -0
  606. package/src/v2/shadcn/_reference/WaiversTable.tsx +290 -0
  607. package/src/v2/shadcn/_reference/WaiversTemplatesSettings.tsx +416 -0
  608. package/src/v2/shadcn/_reference/ai/AIChatPanel.tsx +313 -0
  609. package/src/v2/shadcn/_reference/ai/AIChatSearchBar.tsx +36 -0
  610. package/src/v2/shadcn/_reference/ai/ChatInteractiveBlock.tsx +298 -0
  611. package/src/v2/shadcn/_reference/ai/ChatMessageContent.tsx +40 -0
  612. package/src/v2/shadcn/_reference/ai/parseInteractiveBlocks.ts +142 -0
  613. package/src/v2/shadcn/_reference/auth/AuthLayout.tsx +55 -0
  614. package/src/v2/shadcn/_reference/auth/CreatePasswordForm.tsx +285 -0
  615. package/src/v2/shadcn/_reference/auth/CreatePasswordPanel.tsx +18 -0
  616. package/src/v2/shadcn/_reference/auth/LoginFooter.tsx +14 -0
  617. package/src/v2/shadcn/_reference/auth/LoginForm.tsx +201 -0
  618. package/src/v2/shadcn/_reference/auth/LoginPanel.tsx +39 -0
  619. package/src/v2/shadcn/_reference/auth/ResetPasswordForm.tsx +100 -0
  620. package/src/v2/shadcn/_reference/auth/ResetPasswordPanel.tsx +18 -0
  621. package/src/v2/shadcn/_reference/auth/VerifyEmailForm.tsx +93 -0
  622. package/src/v2/shadcn/_reference/auth/VerifyEmailPanel.tsx +18 -0
  623. package/src/v2/shadcn/_reference/email/EmailAttachment.tsx +117 -0
  624. package/src/v2/shadcn/_reference/email/EmailAutomation.tsx +92 -0
  625. package/src/v2/shadcn/_reference/email/EmailPlaceholders.tsx +64 -0
  626. package/src/v2/shadcn/_reference/email/UnlayerEmailEditor.tsx +41 -0
  627. package/src/v2/shadcn/_reference/email/emailTemplateData.ts +53 -0
  628. package/src/v2/shadcn/_reference/emptyStateIcons.tsx +103 -0
  629. package/src/v2/shadcn/_reference/games/MazeGame.tsx +394 -0
  630. package/src/v2/shadcn/_reference/games/RunnerGame.tsx +497 -0
  631. package/src/v2/shadcn/_reference/logos/BookedLogoFull.tsx +36 -0
  632. package/src/v2/shadcn/_reference/logos/BookedLogoMark.tsx +31 -0
  633. package/src/v2/shadcn/_reference/logos/BookedLogoNew.tsx +36 -0
  634. package/src/v2/shadcn/_reference/pricing/DynamicPricingRulesEditor.tsx +401 -0
  635. package/src/v2/shadcn/_reference/pricing/DynamicPricingTierCard.tsx +77 -0
  636. package/src/v2/shadcn/_reference/pricing/DynamicPricingTiersList.tsx +218 -0
  637. package/src/v2/shadcn/_reference/pricing/PricingCalendar.tsx +810 -0
  638. package/src/v2/shadcn/_reference/pricing/PricingPeriodCard.tsx +152 -0
  639. package/src/v2/shadcn/_reference/pricing/PricingPeriodForm.tsx +377 -0
  640. package/src/v2/shadcn/_reference/pricing/PricingPeriodsList.tsx +213 -0
  641. package/src/v2/shadcn/_reference/pricing/getRuleSummary.ts +39 -0
  642. package/src/v2/shadcn/_reference/products/AvailabilityRulesSection.tsx +184 -0
  643. package/src/v2/shadcn/_reference/products/AvailabilitySection.tsx +677 -0
  644. package/src/v2/shadcn/_reference/products/BookingTypeConfigOptions.tsx +40 -0
  645. package/src/v2/shadcn/_reference/products/CapacityPeriodsSection.tsx +238 -0
  646. package/src/v2/shadcn/_reference/products/DynamicPricingTiersSection.tsx +131 -0
  647. package/src/v2/shadcn/_reference/products/GiftCardOrdersTab.tsx +192 -0
  648. package/src/v2/shadcn/_reference/products/GiftCardSettings.tsx +342 -0
  649. package/src/v2/shadcn/_reference/products/PackageProductsSection.tsx +322 -0
  650. package/src/v2/shadcn/_reference/products/PricingSection.tsx +173 -0
  651. package/src/v2/shadcn/_reference/products/ProductTypeFields.tsx +353 -0
  652. package/src/v2/shadcn/_reference/products/ProductTypeIcon.tsx +95 -0
  653. package/src/v2/shadcn/_reference/products/VariablePricingSection.tsx +140 -0
  654. package/src/v2/shadcn/_reference/products/productTypeConfig.ts +182 -0
  655. package/src/v2/shadcn/_reference/shared/BackButton.tsx +50 -0
  656. package/src/v2/shadcn/_reference/shared/CancelConfirmationDialog.tsx +18 -0
  657. package/src/v2/shadcn/_reference/shared/ConfirmationDialog.tsx +134 -0
  658. package/src/v2/shadcn/_reference/shared/DeleteConfirmationDialog.tsx +18 -0
  659. package/src/v2/shadcn/_reference/shared/DeleteEntityPage.tsx +221 -0
  660. package/src/v2/shadcn/_reference/shared/SidebarIcons.tsx +108 -0
  661. package/src/v2/shadcn/_reference/shared/UnifiedSidebar.tsx +722 -0
  662. package/src/v2/shadcn/_reference/tables/BulkActionsBar.tsx +68 -0
  663. package/src/v2/shadcn/_reference/tables/DataTable.tsx +221 -0
  664. package/src/v2/shadcn/_reference/tables/TableControls.tsx +94 -0
  665. package/src/v2/shadcn/_reference/tables/index.ts +3 -0
  666. package/src/v2/shadcn/_reference/tables/types.ts +79 -0
  667. package/src/v2/shadcn/_reference/zones/LegacyZoneSettings.tsx +299 -0
  668. package/src/v2/shadcn/components/ui/accordion.stories.tsx +63 -0
  669. package/src/v2/shadcn/components/ui/accordion.tsx +52 -0
  670. package/src/v2/shadcn/components/ui/alert-dialog.stories.tsx +44 -0
  671. package/src/v2/shadcn/components/ui/alert-dialog.tsx +104 -0
  672. package/src/v2/shadcn/components/ui/alert.stories.tsx +44 -0
  673. package/src/v2/shadcn/components/ui/alert.tsx +43 -0
  674. package/src/v2/shadcn/components/ui/aspect-ratio.stories.tsx +46 -0
  675. package/src/v2/shadcn/components/ui/aspect-ratio.tsx +5 -0
  676. package/src/v2/shadcn/components/ui/avatar.stories.tsx +39 -0
  677. package/src/v2/shadcn/components/ui/avatar.tsx +38 -0
  678. package/src/v2/shadcn/components/ui/badge.stories.tsx +17 -0
  679. package/src/v2/shadcn/components/ui/badge.tsx +30 -0
  680. package/src/v2/shadcn/components/ui/breadcrumb.stories.tsx +91 -0
  681. package/src/v2/shadcn/components/ui/breadcrumb.tsx +90 -0
  682. package/src/v2/shadcn/components/ui/button.stories.tsx +20 -0
  683. package/src/v2/shadcn/components/ui/button.tsx +60 -0
  684. package/src/v2/shadcn/components/ui/calendar.stories.tsx +61 -0
  685. package/src/v2/shadcn/components/ui/calendar.tsx +54 -0
  686. package/src/v2/shadcn/components/ui/card.stories.tsx +37 -0
  687. package/src/v2/shadcn/components/ui/card.tsx +43 -0
  688. package/src/v2/shadcn/components/ui/carousel.stories.tsx +92 -0
  689. package/src/v2/shadcn/components/ui/carousel.tsx +224 -0
  690. package/src/v2/shadcn/components/ui/checkbox.scss +38 -0
  691. package/src/v2/shadcn/components/ui/checkbox.stories.tsx +23 -0
  692. package/src/v2/shadcn/components/ui/checkbox.tsx +24 -0
  693. package/src/v2/shadcn/components/ui/collapsible.stories.tsx +59 -0
  694. package/src/v2/shadcn/components/ui/collapsible.tsx +9 -0
  695. package/src/v2/shadcn/components/ui/command.stories.tsx +70 -0
  696. package/src/v2/shadcn/components/ui/command.tsx +132 -0
  697. package/src/v2/shadcn/components/ui/context-menu.stories.tsx +72 -0
  698. package/src/v2/shadcn/components/ui/context-menu.tsx +178 -0
  699. package/src/v2/shadcn/components/ui/dialog.stories.tsx +67 -0
  700. package/src/v2/shadcn/components/ui/dialog.tsx +95 -0
  701. package/src/v2/shadcn/components/ui/drawer.stories.tsx +50 -0
  702. package/src/v2/shadcn/components/ui/drawer.tsx +87 -0
  703. package/src/v2/shadcn/components/ui/dropdown-menu.stories.tsx +73 -0
  704. package/src/v2/shadcn/components/ui/dropdown-menu.tsx +179 -0
  705. package/src/v2/shadcn/components/ui/form.stories.tsx +105 -0
  706. package/src/v2/shadcn/components/ui/form.tsx +129 -0
  707. package/src/v2/shadcn/components/ui/hover-card.stories.tsx +35 -0
  708. package/src/v2/shadcn/components/ui/hover-card.tsx +27 -0
  709. package/src/v2/shadcn/components/ui/input-otp.stories.tsx +72 -0
  710. package/src/v2/shadcn/components/ui/input-otp.tsx +61 -0
  711. package/src/v2/shadcn/components/ui/input.stories.tsx +16 -0
  712. package/src/v2/shadcn/components/ui/input.tsx +25 -0
  713. package/src/v2/shadcn/components/ui/label.stories.tsx +13 -0
  714. package/src/v2/shadcn/components/ui/label.tsx +17 -0
  715. package/src/v2/shadcn/components/ui/menubar.stories.tsx +86 -0
  716. package/src/v2/shadcn/components/ui/menubar.tsx +207 -0
  717. package/src/v2/shadcn/components/ui/navigation-menu.stories.tsx +68 -0
  718. package/src/v2/shadcn/components/ui/navigation-menu.tsx +120 -0
  719. package/src/v2/shadcn/components/ui/pagination.stories.tsx +78 -0
  720. package/src/v2/shadcn/components/ui/pagination.tsx +81 -0
  721. package/src/v2/shadcn/components/ui/popover.stories.tsx +44 -0
  722. package/src/v2/shadcn/components/ui/popover.tsx +29 -0
  723. package/src/v2/shadcn/components/ui/progress.stories.tsx +17 -0
  724. package/src/v2/shadcn/components/ui/progress.tsx +23 -0
  725. package/src/v2/shadcn/components/ui/radio-card.stories.tsx +68 -0
  726. package/src/v2/shadcn/components/ui/radio-card.tsx +52 -0
  727. package/src/v2/shadcn/components/ui/radio-group.stories.tsx +77 -0
  728. package/src/v2/shadcn/components/ui/radio-group.tsx +35 -0
  729. package/src/v2/shadcn/components/ui/scroll-area.stories.tsx +56 -0
  730. package/src/v2/shadcn/components/ui/scroll-area.tsx +38 -0
  731. package/src/v2/shadcn/components/ui/select.stories.tsx +60 -0
  732. package/src/v2/shadcn/components/ui/select.tsx +148 -0
  733. package/src/v2/shadcn/components/ui/separator.stories.tsx +30 -0
  734. package/src/v2/shadcn/components/ui/separator.tsx +20 -0
  735. package/src/v2/shadcn/components/ui/sheet.stories.tsx +115 -0
  736. package/src/v2/shadcn/components/ui/sheet.tsx +107 -0
  737. package/src/v2/shadcn/components/ui/sidebar.stories.tsx +167 -0
  738. package/src/v2/shadcn/components/ui/sidebar.tsx +637 -0
  739. package/src/v2/shadcn/components/ui/skeleton.stories.tsx +36 -0
  740. package/src/v2/shadcn/components/ui/skeleton.tsx +7 -0
  741. package/src/v2/shadcn/components/ui/slider.stories.tsx +16 -0
  742. package/src/v2/shadcn/components/ui/slider.tsx +23 -0
  743. package/src/v2/shadcn/components/ui/switch.scss +63 -0
  744. package/src/v2/shadcn/components/ui/switch.stories.tsx +23 -0
  745. package/src/v2/shadcn/components/ui/switch.tsx +24 -0
  746. package/src/v2/shadcn/components/ui/table-pagination.stories.tsx +81 -0
  747. package/src/v2/shadcn/components/ui/table-pagination.tsx +61 -0
  748. package/src/v2/shadcn/components/ui/table.stories.tsx +40 -0
  749. package/src/v2/shadcn/components/ui/table.tsx +72 -0
  750. package/src/v2/shadcn/components/ui/tabs.stories.tsx +85 -0
  751. package/src/v2/shadcn/components/ui/tabs.tsx +53 -0
  752. package/src/v2/shadcn/components/ui/textarea.stories.tsx +15 -0
  753. package/src/v2/shadcn/components/ui/textarea.tsx +21 -0
  754. package/src/v2/shadcn/components/ui/toast.stories.tsx +77 -0
  755. package/src/v2/shadcn/components/ui/toast.tsx +111 -0
  756. package/src/v2/shadcn/components/ui/toaster.stories.tsx +46 -0
  757. package/src/v2/shadcn/components/ui/toaster.tsx +24 -0
  758. package/src/v2/shadcn/components/ui/toggle-group.stories.tsx +95 -0
  759. package/src/v2/shadcn/components/ui/toggle-group.tsx +49 -0
  760. package/src/v2/shadcn/components/ui/toggle.stories.tsx +18 -0
  761. package/src/v2/shadcn/components/ui/toggle.tsx +37 -0
  762. package/src/v2/shadcn/components/ui/tooltip.stories.tsx +57 -0
  763. package/src/v2/shadcn/components/ui/tooltip.tsx +28 -0
  764. package/src/v2/shadcn/components/ui/use-toast.ts +3 -0
  765. package/src/v2/shadcn/hooks/use-mobile.tsx +19 -0
  766. package/src/v2/shadcn/hooks/use-toast.ts +184 -0
  767. package/src/v2/shadcn/index.ts +76 -0
  768. package/src/v2/shadcn/lib/utils.ts +6 -0
  769. package/src/v2/shadcn/styles/globals.css +112 -0
  770. package/src/v2/styles/components/Button.scss +21 -23
  771. package/src/v2/styles/form/NewInput.scss +1 -1
  772. package/src/v2/styles/tokens/_colors.scss +20 -0
  773. package/src/v2/styles/tokens/_sizes.scss +4 -4
  774. package/src/v2/types/navigation.ts +1 -0
  775. package/tailwind.config.js +46 -4
  776. package/dist/v2/components/RadioCard/RadioCard.d.ts.map +0 -1
  777. package/src/v2/navigation/Navigation/Navigation.stories.tsx +0 -137
@@ -0,0 +1,998 @@
1
+ import React, { useState, useEffect, useMemo, useRef, useCallback } from 'react';
2
+ import { useNavigate, useParams } from 'react-router-dom';
3
+ import { supabase } from '@/integrations/supabase/client';
4
+ import { useNotify } from '../hooks/useNotify';
5
+ import { format, addDays, getDay } from 'date-fns';
6
+ import { cn } from '../lib/utils';
7
+ import { Button } from './ui/button';
8
+ import { IconArrowLeft, IconArrowRight, IconPlus, IconDetailed, IconOverview } from '../../icons';
9
+ import { QuickFilters } from './QuickFilters';
10
+ import { useProvider } from '@/contexts/ProviderContext';
11
+ import LoadingSpinner from './LoadingSpinner';
12
+ import { QuickAddPanel } from './QuickAddPanel';
13
+ import { HoverCard, HoverCardContent, HoverCardTrigger } from './ui/hover-card';
14
+ interface Zone {
15
+ id: string;
16
+ name: string;
17
+ description: string | null;
18
+ display_order: number;
19
+ availability_start: string | null;
20
+ availability_end: string | null;
21
+ use_venue_hours: boolean;
22
+ resources: Resource[];
23
+ opening_hours?: ZoneOpeningHour[];
24
+ }
25
+
26
+ interface Resource {
27
+ id: string;
28
+ name: string;
29
+ max_capacity: number;
30
+ instances: number;
31
+ }
32
+
33
+ interface Flow {
34
+ id: string;
35
+ type: 'booking' | 'enquiry';
36
+ reference_number: string;
37
+ customer_name: string;
38
+ activity_name: string;
39
+ booking_date: string;
40
+ booking_time_start: string;
41
+ booking_time_end: string | null;
42
+ status: string;
43
+ total_amount: number;
44
+ zone_id: string | null;
45
+ resource_id: string | null;
46
+ resource_instance: number | null;
47
+ }
48
+
49
+ interface OpeningHour {
50
+ day_of_week: number;
51
+ is_open: boolean;
52
+ open_time: string;
53
+ close_time: string;
54
+ }
55
+
56
+ interface ZoneOpeningHour {
57
+ zone_id: string;
58
+ day_of_week: number;
59
+ is_open: boolean;
60
+ open_time: string;
61
+ close_time: string;
62
+ }
63
+
64
+ interface DiaryViewProps {
65
+ providerId: string;
66
+ selectedDate: 'today' | 'tomorrow';
67
+ selectedZoneId?: string;
68
+ zoneFilters?: { id: string; name: string }[];
69
+ onZoneFilterChange?: (zoneId: string) => void;
70
+ onFlowClick?: (flowId: string) => void;
71
+ }
72
+
73
+ // Expand resources into individual instances with numbered names and capacity
74
+ // Guard rail: a misconfigured resource.instances (e.g. thousands) can generate a massive DOM and freeze the app.
75
+ const MAX_RESOURCE_INSTANCES_TO_RENDER = 50;
76
+
77
+ const expandResources = (
78
+ resource: Resource
79
+ ): { id: string; resourceId: string; name: string; instanceNumber: number; maxCapacity: number }[] => {
80
+ const instances: { id: string; resourceId: string; name: string; instanceNumber: number; maxCapacity: number }[] = [];
81
+ const instancesToRender = Math.min(Math.max(resource.instances ?? 0, 0), MAX_RESOURCE_INSTANCES_TO_RENDER);
82
+
83
+ for (let i = 1; i <= instancesToRender; i++) {
84
+ instances.push({
85
+ id: `${resource.id}-${i}`,
86
+ resourceId: resource.id, // Store original resource ID
87
+ name: `${resource.name} ${i}`,
88
+ instanceNumber: i,
89
+ maxCapacity: resource.max_capacity,
90
+ });
91
+ }
92
+
93
+ return instances;
94
+ };
95
+
96
+ // Time slot used by the diary grid. `totalMinutes` can exceed 1440 when opening hours run past midnight.
97
+ interface TimeSlot {
98
+ key: string;
99
+ label: string;
100
+ totalMinutes: number;
101
+ }
102
+
103
+ const formatSlotLabel = (totalMinutes: number): string => {
104
+ const normalized = ((totalMinutes % 1440) + 1440) % 1440;
105
+ const hour = Math.floor(normalized / 60);
106
+ const minute = normalized % 60;
107
+ return `${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`;
108
+ };
109
+
110
+ // Generate 30-minute time slots from startMinutes (inclusive) to endMinutes (exclusive)
111
+ const generateTimeSlots = (startMinutes: number, endMinutes: number): TimeSlot[] => {
112
+ const slots: TimeSlot[] = [];
113
+ const step = 30;
114
+
115
+ for (let m = startMinutes; m < endMinutes; m += step) {
116
+ slots.push({
117
+ key: String(m),
118
+ label: formatSlotLabel(m),
119
+ totalMinutes: m,
120
+ });
121
+ }
122
+
123
+ return slots;
124
+ };
125
+
126
+ // Parse time string to get hour and minute
127
+ const parseTime = (timeStr: string): { hour: number; minute: number } => {
128
+ const [hour, minute] = timeStr.split(':').map(Number);
129
+ return { hour, minute };
130
+ };
131
+
132
+ export const DiaryView: React.FC<DiaryViewProps> = ({ providerId, selectedDate, selectedZoneId, zoneFilters, onZoneFilterChange, onFlowClick }) => {
133
+ const navigate = useNavigate();
134
+ const { showError } = useNotify();
135
+ const params = useParams<{ providerId?: string; companyId?: string }>();
136
+ const { provider } = useProvider();
137
+ const [zones, setZones] = useState<Zone[]>([]);
138
+ const [flows, setFlows] = useState<Flow[]>([]);
139
+ const [openingHours, setOpeningHours] = useState<OpeningHour[]>([]);
140
+ const [isLoading, setIsLoading] = useState(true);
141
+ const [viewMode, setViewMode] = useState<'detailed' | 'overview'>('detailed');
142
+ const [dayOffset, setDayOffset] = useState(0);
143
+
144
+ // Hover state removed – CSS-only hover to prevent expensive re-renders
145
+
146
+ // V2 Quick Add Panel state
147
+ const [quickAddPanelOpen, setQuickAddPanelOpen] = useState(false);
148
+ const [quickAddData, setQuickAddData] = useState<{
149
+ date: string;
150
+ time: string;
151
+ zoneId?: string;
152
+ zoneName?: string;
153
+ resourceId?: string;
154
+ resourceName?: string;
155
+ resourceInstance?: number;
156
+ } | null>(null);
157
+
158
+ // Refs for synchronized scrolling
159
+ const headerScrollRef = useRef<HTMLDivElement>(null);
160
+ const bodyScrollRef = useRef<HTMLDivElement>(null);
161
+ const isScrolling = useRef(false);
162
+
163
+ const truncatedResources = useMemo(() => {
164
+ const items: Array<{ zoneName: string; resourceName: string; instances: number }> = [];
165
+ for (const zone of zones) {
166
+ for (const resource of zone.resources) {
167
+ if (resource.instances > MAX_RESOURCE_INSTANCES_TO_RENDER) {
168
+ items.push({ zoneName: zone.name, resourceName: resource.name, instances: resource.instances });
169
+ }
170
+ }
171
+ }
172
+ return items;
173
+ }, [zones]);
174
+
175
+ // Build base path for navigation
176
+ const getBasePath = () => {
177
+ const providerType = provider?.type === 'venue' ? 'venue' : 'promoter';
178
+ if (params.companyId) {
179
+ return `/company/${params.companyId}/${providerType}/${params.providerId}`;
180
+ }
181
+ return `/${providerType}/${params.providerId}`;
182
+ };
183
+
184
+ // Handle quick-add cell click
185
+ const handleQuickAdd = (
186
+ date: string,
187
+ timeSlot: string,
188
+ zone?: Zone,
189
+ resourceName?: string,
190
+ resourceId?: string,
191
+ instanceNumber?: number
192
+ ) => {
193
+ // =====================================================
194
+ // V1 Quick Add - Navigate to AddFlow page (COMMENTED OUT)
195
+ // =====================================================
196
+ // const basePath = getBasePath();
197
+ // const searchParams = new URLSearchParams();
198
+ // searchParams.set('date', date);
199
+ // searchParams.set('time', timeSlot);
200
+ // if (zone) {
201
+ // searchParams.set('zoneId', zone.id);
202
+ // searchParams.set('zoneName', zone.name);
203
+ // }
204
+ // if (resourceId) {
205
+ // searchParams.set('resourceId', resourceId);
206
+ // }
207
+ // if (resourceName) {
208
+ // searchParams.set('resourceName', resourceName);
209
+ // }
210
+ // if (instanceNumber) {
211
+ // searchParams.set('resourceInstance', instanceNumber.toString());
212
+ // }
213
+ // navigate(`${basePath}/flows/add?${searchParams.toString()}`);
214
+
215
+ // =====================================================
216
+ // V2 Quick Add - Open side panel (ACTIVE)
217
+ // =====================================================
218
+ setQuickAddData({
219
+ date,
220
+ time: timeSlot,
221
+ zoneId: zone?.id,
222
+ zoneName: zone?.name,
223
+ resourceId,
224
+ resourceName,
225
+ resourceInstance: instanceNumber
226
+ });
227
+ setQuickAddPanelOpen(true);
228
+ };
229
+
230
+ // Calculate target date based on selectedDate + dayOffset
231
+ const baseDate = selectedDate === 'today' ? new Date() : addDays(new Date(), 1);
232
+ const targetDate = addDays(baseDate, dayOffset);
233
+ const formattedDate = format(targetDate, 'yyyy-MM-dd');
234
+ const nextFormattedDate = format(addDays(targetDate, 1), 'yyyy-MM-dd');
235
+ const displayDate = format(targetDate, 'EEEE, d MMMM yyyy');
236
+ const dayOfWeek = getDay(targetDate);
237
+
238
+ // Get opening hours for this day
239
+ const todaysHours = openingHours.find((h) => h.day_of_week === dayOfWeek);
240
+
241
+ // Check for 24/7 mode (both open and close time are 00:00)
242
+ const is24_7 =
243
+ !!todaysHours?.is_open &&
244
+ todaysHours.open_time.startsWith('00:00') &&
245
+ todaysHours.close_time.startsWith('00:00');
246
+
247
+ const openTime = todaysHours?.is_open ? parseTime(todaysHours.open_time) : { hour: 9, minute: 0 };
248
+ const closeTime = todaysHours?.is_open ? parseTime(todaysHours.close_time) : { hour: 22, minute: 0 };
249
+
250
+ const openTotalMinutes = openTime.hour * 60 + openTime.minute;
251
+ const closeTotalMinutes = closeTime.hour * 60 + closeTime.minute;
252
+
253
+ // Venue runs into the next day when close time is earlier/equal to open time (e.g., 22:00 -> 02:00)
254
+ const isNextDayClose = !!todaysHours?.is_open && !is24_7 && closeTotalMinutes <= openTotalMinutes;
255
+
256
+ const startMinutes = todaysHours?.is_open ? openTotalMinutes : 9 * 60;
257
+
258
+ // Actual closing time in minutes (used to determine "closed" slots)
259
+ const actualCloseMinutes = todaysHours?.is_open
260
+ ? is24_7
261
+ ? 24 * 60
262
+ : isNextDayClose
263
+ ? closeTotalMinutes + 24 * 60
264
+ : closeTotalMinutes
265
+ : 22 * 60;
266
+
267
+ // Extend display by 1 hour past closing to show the closing time + buffer
268
+ const displayBufferMinutes = 60;
269
+ const endMinutes = actualCloseMinutes + displayBufferMinutes;
270
+
271
+ const timeSlots = useMemo(() => generateTimeSlots(startMinutes, endMinutes), [startMinutes, endMinutes]);
272
+
273
+ // For overview mode, show only hourly slots
274
+ const overviewSlots = useMemo(() => timeSlots.filter((slot) => slot.totalMinutes % 60 === 0), [timeSlots]);
275
+ const displaySlots: TimeSlot[] = viewMode === 'overview' ? overviewSlots : timeSlots;
276
+
277
+ // Pre-compute a flow lookup map: key = "resourceId-instanceNumber-slotMinutes" => Flow
278
+ // This replaces the O(flows) search inside every cell render
279
+ const flowLookup = useMemo(() => {
280
+ const map = new Map<string, Flow>();
281
+
282
+ for (const flow of flows) {
283
+ const startTime = parseTime(flow.booking_time_start);
284
+ const endTime = flow.booking_time_end
285
+ ? parseTime(flow.booking_time_end)
286
+ : { hour: startTime.hour + 1, minute: startTime.minute };
287
+
288
+ let flowStartMinutes = startTime.hour * 60 + startTime.minute;
289
+ let flowEndMinutes = endTime.hour * 60 + endTime.minute;
290
+ if (flowEndMinutes <= flowStartMinutes) flowEndMinutes += 1440;
291
+
292
+ // For each slot this flow occupies, add to the map
293
+ for (const slot of timeSlots) {
294
+ let fStart = flowStartMinutes;
295
+ let fEnd = flowEndMinutes;
296
+
297
+ // Handle next-day territory
298
+ if (slot.totalMinutes >= 1440 && fStart < startMinutes) {
299
+ fStart += 1440;
300
+ fEnd += 1440;
301
+ }
302
+
303
+ if (slot.totalMinutes >= fStart && slot.totalMinutes < fEnd) {
304
+ if (flow.resource_id && flow.resource_instance) {
305
+ const key = `${flow.resource_id}-${flow.resource_instance}-${slot.totalMinutes}`;
306
+ map.set(key, flow);
307
+ }
308
+ // Also store by zone for legacy/fallback matching
309
+ if (flow.zone_id) {
310
+ const legacyKey = `legacy-${flow.zone_id}-${flow.activity_name}-${slot.totalMinutes}`;
311
+ map.set(legacyKey, flow);
312
+ }
313
+ }
314
+ }
315
+ }
316
+ return map;
317
+ }, [flows, timeSlots, startMinutes]);
318
+
319
+ // Helper to find a flow at a given slot for a given instance
320
+ const getFlowAtSlot = useCallback((
321
+ instance: { resourceId: string; instanceNumber: number; name: string },
322
+ zone: Zone,
323
+ slotMinutes: number
324
+ ): Flow | undefined => {
325
+ // Direct lookup by resource + instance
326
+ const directKey = `${instance.resourceId}-${instance.instanceNumber}-${slotMinutes}`;
327
+ const direct = flowLookup.get(directKey);
328
+ if (direct) return direct;
329
+
330
+ // Fallback: check legacy flows that match by activity name
331
+ for (const flow of flows) {
332
+ if (flow.resource_id && flow.resource_instance) continue; // already handled above
333
+
334
+ const matchesName = flow.activity_name.toLowerCase().includes(zone.name.toLowerCase()) ||
335
+ flow.activity_name.toLowerCase().includes(instance.name.split(' ')[0].toLowerCase());
336
+ if (!matchesName) continue;
337
+
338
+ const st = parseTime(flow.booking_time_start);
339
+ const et = flow.booking_time_end ? parseTime(flow.booking_time_end) : { hour: st.hour + 1, minute: st.minute };
340
+ let fStart = st.hour * 60 + st.minute;
341
+ let fEnd = et.hour * 60 + et.minute;
342
+ if (fEnd <= fStart) fEnd += 1440;
343
+ if (slotMinutes >= 1440 && fStart < startMinutes) { fStart += 1440; fEnd += 1440; }
344
+ if (slotMinutes >= fStart && slotMinutes < fEnd) return flow;
345
+ }
346
+ return undefined;
347
+ }, [flowLookup, flows, startMinutes]);
348
+
349
+ // Column sizing (must match between header + body tables)
350
+ const firstColWidthPx = viewMode === 'overview' ? 120 : 192; // matches w-[120px] and w-48
351
+ const detailedSlotWidthPx = 50;
352
+ const tableWidthPx = viewMode === 'detailed'
353
+ ? firstColWidthPx + displaySlots.length * detailedSlotWidthPx
354
+ : undefined;
355
+
356
+ // Current time info for "past slot" detection
357
+ const now = new Date();
358
+ const isToday = format(now, 'yyyy-MM-dd') === formattedDate;
359
+ const currentHour = now.getHours();
360
+ const currentMinute = now.getMinutes();
361
+ const nowTotalMinutes = currentHour * 60 + currentMinute;
362
+
363
+ // Helper: check if a slot is in the past (only matters if viewing today)
364
+ const isSlotInPast = (slot: TimeSlot): boolean => {
365
+ if (!isToday) return false;
366
+ return slot.totalMinutes < nowTotalMinutes;
367
+ };
368
+
369
+ // Helper: check if a slot is after closing time (venue closed)
370
+ const isSlotClosed = (slot: TimeSlot): boolean => {
371
+ return slot.totalMinutes >= actualCloseMinutes;
372
+ };
373
+
374
+ // Helper: check if a slot is closed for a specific zone (considers zone-specific hours)
375
+ const isSlotClosedForZone = (slot: TimeSlot, zone: Zone): boolean => {
376
+ // If zone uses venue hours, use the venue's closed check
377
+ if (zone.use_venue_hours) {
378
+ return isSlotClosed(slot);
379
+ }
380
+
381
+ // Zone has custom hours - check against zone opening hours
382
+ const zoneHoursForDay = zone.opening_hours?.find(h => h.day_of_week === dayOfWeek);
383
+
384
+ // If no hours defined for this day or zone is closed, the slot is closed
385
+ if (!zoneHoursForDay || !zoneHoursForDay.is_open) {
386
+ return true;
387
+ }
388
+
389
+ // Parse zone hours
390
+ const zoneOpenTime = parseTime(zoneHoursForDay.open_time);
391
+ const zoneCloseTime = parseTime(zoneHoursForDay.close_time);
392
+ const zoneOpenMinutes = zoneOpenTime.hour * 60 + zoneOpenTime.minute;
393
+ const zoneCloseMinutes = zoneCloseTime.hour * 60 + zoneCloseTime.minute;
394
+
395
+ // Check if slot is outside zone availability
396
+ // Also check if slot is outside venue hours (can't be open when venue is closed)
397
+ const isOutsideZoneHours = slot.totalMinutes < zoneOpenMinutes || slot.totalMinutes >= zoneCloseMinutes;
398
+ const isOutsideVenueHours = isSlotClosed(slot);
399
+
400
+ return isOutsideZoneHours || isOutsideVenueHours;
401
+ };
402
+
403
+ // Scroll to show current time as second segment on load
404
+ const getNowColumnIndex = useMemo(() => {
405
+ if (!isToday) return null;
406
+ if (nowTotalMinutes < startMinutes || nowTotalMinutes >= endMinutes) return null;
407
+
408
+ const slotIndex = displaySlots.findIndex((slot, i) => {
409
+ const next = displaySlots[i + 1];
410
+ const upperBound = next ? next.totalMinutes : endMinutes;
411
+ return nowTotalMinutes >= slot.totalMinutes && nowTotalMinutes < upperBound;
412
+ });
413
+
414
+ return slotIndex >= 0 ? slotIndex : null;
415
+ }, [isToday, nowTotalMinutes, startMinutes, endMinutes, displaySlots]);
416
+
417
+ // Calculate "now" line position in pixels from the start of the time columns (detailed mode)
418
+ const nowLinePosition = useMemo(() => {
419
+ if (!isToday) return null;
420
+ if (viewMode !== 'detailed') return null;
421
+ if (nowTotalMinutes < startMinutes || nowTotalMinutes >= endMinutes) return null;
422
+
423
+ const minutesFromStart = nowTotalMinutes - startMinutes;
424
+
425
+ // Each 30-min slot is 50px wide
426
+ const pixelsPerMinute = detailedSlotWidthPx / 30;
427
+ return firstColWidthPx + minutesFromStart * pixelsPerMinute;
428
+ }, [isToday, nowTotalMinutes, startMinutes, endMinutes, viewMode, firstColWidthPx, detailedSlotWidthPx]);
429
+
430
+ // For overview mode, calculate percentage position
431
+ const nowLinePercentage = useMemo(() => {
432
+ if (!isToday || viewMode !== 'overview') return null;
433
+ if (nowTotalMinutes < startMinutes || nowTotalMinutes >= endMinutes) return null;
434
+
435
+ const minutesFromStart = nowTotalMinutes - startMinutes;
436
+ const totalMinutes = endMinutes - startMinutes;
437
+ if (totalMinutes <= 0) return null;
438
+
439
+ return (minutesFromStart / totalMinutes) * 100;
440
+ }, [isToday, nowTotalMinutes, startMinutes, endMinutes, viewMode]);
441
+
442
+ // Sync scroll position on initial load to show current time
443
+ useEffect(() => {
444
+ if (isToday && !isLoading && bodyScrollRef.current && getNowColumnIndex !== null && getNowColumnIndex > 0) {
445
+ const slotWidth = viewMode === 'detailed' ? 50 : 80;
446
+ const scrollPosition = Math.max(0, (getNowColumnIndex - 1) * slotWidth);
447
+ bodyScrollRef.current.scrollLeft = scrollPosition;
448
+ if (headerScrollRef.current) {
449
+ headerScrollRef.current.scrollLeft = scrollPosition;
450
+ }
451
+ }
452
+ }, [isLoading, isToday, getNowColumnIndex, viewMode]);
453
+
454
+ // Synchronized scroll handler
455
+ const handleBodyScroll = useCallback(() => {
456
+ if (isScrolling.current) return;
457
+ isScrolling.current = true;
458
+ if (headerScrollRef.current && bodyScrollRef.current) {
459
+ headerScrollRef.current.scrollLeft = bodyScrollRef.current.scrollLeft;
460
+ }
461
+ requestAnimationFrame(() => { isScrolling.current = false; });
462
+ }, []);
463
+
464
+ const handleHeaderScroll = useCallback(() => {
465
+ if (isScrolling.current) return;
466
+ isScrolling.current = true;
467
+ if (headerScrollRef.current && bodyScrollRef.current) {
468
+ bodyScrollRef.current.scrollLeft = headerScrollRef.current.scrollLeft;
469
+ }
470
+ requestAnimationFrame(() => { isScrolling.current = false; });
471
+ }, []);
472
+
473
+ // Reset day offset when selectedDate changes
474
+ useEffect(() => {
475
+ setDayOffset(0);
476
+ }, [selectedDate]);
477
+
478
+ useEffect(() => {
479
+ fetchData();
480
+ }, [providerId, formattedDate]);
481
+
482
+ const fetchData = async () => {
483
+ setIsLoading(true);
484
+ try {
485
+ // Fetch opening hours for this provider
486
+ const { data: hoursData, error: hoursError } = await supabase
487
+ .from('provider_opening_hours')
488
+ .select('*')
489
+ .eq('provider_id', providerId);
490
+
491
+ if (hoursError) throw hoursError;
492
+ setOpeningHours(hoursData || []);
493
+
494
+ // Fetch zones with their resources
495
+ const { data: zonesData, error: zonesError } = await supabase
496
+ .from('zones')
497
+ .select('*')
498
+ .eq('provider_id', providerId)
499
+ .eq('status', 'active')
500
+ .order('display_order', { ascending: true });
501
+
502
+ if (zonesError) throw zonesError;
503
+
504
+ // Fetch all zone opening hours for zones that have custom hours
505
+ const zoneIds = (zonesData || []).filter(z => !z.use_venue_hours).map(z => z.id);
506
+ let zoneOpeningHoursMap: Record<string, ZoneOpeningHour[]> = {};
507
+
508
+ if (zoneIds.length > 0) {
509
+ const { data: zoneHoursData, error: zoneHoursError } = await supabase
510
+ .from('zone_opening_hours')
511
+ .select('*')
512
+ .in('zone_id', zoneIds);
513
+
514
+ if (zoneHoursError) throw zoneHoursError;
515
+
516
+ // Group by zone_id
517
+ (zoneHoursData || []).forEach(h => {
518
+ if (!zoneOpeningHoursMap[h.zone_id]) {
519
+ zoneOpeningHoursMap[h.zone_id] = [];
520
+ }
521
+ zoneOpeningHoursMap[h.zone_id].push(h);
522
+ });
523
+ }
524
+
525
+ // Fetch resources for each zone
526
+ const zonesWithResources: Zone[] = [];
527
+ for (const zone of zonesData || []) {
528
+ const { data: resourcesData, error: resourcesError } = await supabase
529
+ .from('resources')
530
+ .select('*')
531
+ .eq('zone_id', zone.id)
532
+ .order('display_order', { ascending: true });
533
+
534
+ if (resourcesError) throw resourcesError;
535
+
536
+ zonesWithResources.push({
537
+ ...zone,
538
+ resources: resourcesData || [],
539
+ opening_hours: zoneOpeningHoursMap[zone.id] || []
540
+ });
541
+ }
542
+
543
+ setZones(zonesWithResources);
544
+
545
+ // Fetch flows for the selected date
546
+ const { data: flowsData, error: flowsError } = await supabase
547
+ .from('bookings')
548
+ .select('*')
549
+ .eq('provider_id', providerId)
550
+ .eq('booking_date', formattedDate)
551
+ .order('booking_time_start');
552
+
553
+ if (flowsError) throw flowsError;
554
+ setFlows(flowsData || []);
555
+ } catch (error) {
556
+ console.error('Error fetching diary data:', error);
557
+ showError('Failed to load diary data');
558
+ } finally {
559
+ setIsLoading(false);
560
+ }
561
+ };
562
+
563
+ // Day pagination handlers
564
+ const handlePrevDay = () => setDayOffset(prev => prev - 1);
565
+ const handleNextDay = () => setDayOffset(prev => prev + 1);
566
+
567
+ if (isLoading) {
568
+ return (
569
+ <div className="flex items-center justify-center py-12">
570
+ <LoadingSpinner size="sm" />
571
+ </div>
572
+ );
573
+ }
574
+
575
+ if (zones.length === 0) {
576
+ return (
577
+ <div className="text-center py-12 text-label-tertiary">
578
+ <p className="text-lg font-medium mb-2">No zones configured</p>
579
+ <p className="text-sm">Add zones in Settings → Zones to use the diary view.</p>
580
+ </div>
581
+ );
582
+ }
583
+
584
+ return (
585
+ <div className="flex flex-col gap-4 w-full min-w-0 max-w-full overflow-hidden">
586
+ {/* Header with Date and Day Pagination */}
587
+ <div className="flex flex-col gap-3">
588
+ <div className="flex items-center justify-between">
589
+ <div className="text-label-primary text-lg font-semibold">
590
+ {displayDate}
591
+ </div>
592
+ {/* Day Pagination Controls - matching table pagination style */}
593
+ <div className="flex items-center gap-2">
594
+ <Button
595
+ variant="ghost"
596
+ size="icon"
597
+ onClick={handlePrevDay}
598
+ className="h-8 w-8 rounded-full bg-surface-action-soft hover:bg-surface-action-soft-hover text-fill-action"
599
+ >
600
+ <IconArrowLeft className="h-4 w-4" />
601
+ </Button>
602
+ <Button
603
+ variant="ghost"
604
+ size="icon"
605
+ onClick={handleNextDay}
606
+ className="h-8 w-8 rounded-full bg-surface-action-soft hover:bg-surface-action-soft-hover text-fill-action"
607
+ >
608
+ <IconArrowRight className="h-4 w-4" />
609
+ </Button>
610
+ </div>
611
+ </div>
612
+
613
+ {/* Zone Quick Filters - Below Date */}
614
+ {zoneFilters && zoneFilters.length > 0 && onZoneFilterChange && (
615
+ <QuickFilters
616
+ filters={zoneFilters.map(zone => ({ value: zone.id, label: zone.name }))}
617
+ activeFilter={selectedZoneId || 'all'}
618
+ onFilterChange={(filter) => onZoneFilterChange(filter)}
619
+ />
620
+ )}
621
+
622
+ {truncatedResources.length > 0 && (
623
+ <div className="rounded-lg border border-border-primary bg-surface-secondary p-3">
624
+ <p className="text-sm text-label-secondary">
625
+ Some resources have very high instance counts and are capped to {MAX_RESOURCE_INSTANCES_TO_RENDER} instances in the diary to prevent freezing.
626
+ </p>
627
+ </div>
628
+ )}
629
+
630
+ </div>
631
+
632
+ {/* Diary Grid - Two-part structure for sticky header */}
633
+ <div className="border border-border-primary rounded-lg bg-surface-primary w-full overflow-hidden">
634
+ {/* Sticky Header Section */}
635
+ <div
636
+ className="sticky top-12 z-20 bg-surface-primary border-b border-border-primary"
637
+ >
638
+ <div
639
+ ref={headerScrollRef}
640
+ onScroll={handleHeaderScroll}
641
+ className={cn(
642
+ 'w-full',
643
+ viewMode === 'detailed' ? 'overflow-x-auto' : 'overflow-x-hidden'
644
+ )}
645
+ >
646
+ <div className={cn('relative', viewMode === 'detailed' ? 'min-w-max' : 'w-full')}>
647
+ <table
648
+ className="w-full table-fixed border-separate border-spacing-0"
649
+ style={viewMode === 'detailed' ? { width: tableWidthPx } : undefined}
650
+ >
651
+ <colgroup>
652
+ <col style={{ width: firstColWidthPx }} />
653
+ {displaySlots.map((slot) => (
654
+ <col
655
+ key={slot.key}
656
+ className={viewMode === 'overview' ? 'w-auto' : ''}
657
+ style={viewMode === 'detailed' ? { width: detailedSlotWidthPx } : undefined}
658
+ />
659
+ ))}
660
+ </colgroup>
661
+ <thead>
662
+ <tr className="bg-surface-secondary">
663
+ <th
664
+ style={{ width: firstColWidthPx }}
665
+ className="p-3 border-r border-border-primary text-left sticky left-0 bg-surface-secondary z-30"
666
+ >
667
+ <div className="flex items-center gap-2">
668
+ <button
669
+ onClick={() => setViewMode(viewMode === 'detailed' ? 'overview' : 'detailed')}
670
+ className="p-1 rounded-md bg-surface-primary text-label-secondary hover:bg-surface-primary-hover transition-colors"
671
+ title={viewMode === 'detailed' ? 'Switch to Overview' : 'Switch to Detailed'}
672
+ >
673
+ {viewMode === 'detailed' ? (
674
+ <IconOverview className="w-5 h-5" />
675
+ ) : (
676
+ <IconDetailed className="w-5 h-5" />
677
+ )}
678
+ </button>
679
+ <span className="text-label-secondary text-xs font-medium uppercase tracking-wider">
680
+ Zone
681
+ </span>
682
+ </div>
683
+ </th>
684
+ {displaySlots.map((slot) => {
685
+ const isPast = isSlotInPast(slot);
686
+ const isHourDivider = slot.totalMinutes % 60 === 0;
687
+ return (
688
+ <th
689
+ key={slot.key}
690
+ className={cn(
691
+ 'p-2 text-center border-r border-border-primary last:border-r-0 relative bg-surface-secondary',
692
+ isHourDivider &&
693
+ 'before:absolute before:left-0 before:top-0 before:bottom-0 before:w-px before:bg-border-secondary',
694
+ isPast && 'opacity-60'
695
+ )}
696
+ >
697
+ <span
698
+ className={cn(
699
+ 'text-xs font-medium',
700
+ isPast ? 'text-label-tertiary' : 'text-label-secondary'
701
+ )}
702
+ >
703
+ {slot.label}
704
+ </span>
705
+ </th>
706
+ );
707
+ })}
708
+ </tr>
709
+ </thead>
710
+ </table>
711
+ </div>
712
+ </div>
713
+ </div>
714
+
715
+ {/* Scrollable Body Section */}
716
+ <div
717
+ ref={bodyScrollRef}
718
+ onScroll={handleBodyScroll}
719
+ className={cn(
720
+ 'w-full relative',
721
+ viewMode === 'detailed' ? 'overflow-x-auto' : 'overflow-x-hidden'
722
+ )}
723
+ >
724
+ <div className={cn('relative', viewMode === 'detailed' ? 'min-w-max' : 'w-full')}>
725
+ {/* "Now" line indicator - z-[5] to render below sticky cells z-[9] */}
726
+ {isToday && viewMode === 'detailed' && nowLinePosition !== null && (
727
+ <div
728
+ className="absolute top-0 bottom-0 w-0.5 bg-fill-action z-[5] pointer-events-none"
729
+ style={{ left: nowLinePosition }}
730
+ />
731
+ )}
732
+ {isToday && viewMode === 'overview' && nowLinePercentage !== null && (
733
+ <div
734
+ className="absolute top-0 bottom-0 w-0.5 bg-fill-action z-[5] pointer-events-none"
735
+ style={{ left: `calc(${firstColWidthPx}px + (100% - ${firstColWidthPx}px) * ${nowLinePercentage / 100})` }}
736
+ />
737
+ )}
738
+ <table
739
+ className="w-full table-fixed border-separate border-spacing-0"
740
+ style={viewMode === 'detailed' ? { width: tableWidthPx } : undefined}
741
+ >
742
+ <colgroup>
743
+ <col style={{ width: firstColWidthPx }} />
744
+ {displaySlots.map((slot) => (
745
+ <col
746
+ key={slot.key}
747
+ className={viewMode === 'overview' ? 'w-auto' : ''}
748
+ style={viewMode === 'detailed' ? { width: detailedSlotWidthPx } : undefined}
749
+ />
750
+ ))}
751
+ </colgroup>
752
+ <tbody>
753
+ {zones.filter(zone => !selectedZoneId || zone.id === selectedZoneId).map((zone) => {
754
+ const expandedResources = zone.resources.flatMap(expandResources);
755
+
756
+ return (
757
+ <React.Fragment key={zone.id}>
758
+ {/* Zone Header - solid color */}
759
+ <tr className="bg-surface-tertiary">
760
+ <td
761
+ style={{ width: firstColWidthPx }}
762
+ className="p-3 border-r border-b border-border-primary sticky left-0 bg-surface-tertiary z-[9]"
763
+ >
764
+ <span className="text-label-primary text-sm font-semibold">{zone.name}</span>
765
+ {zone.description && (
766
+ <p className="text-label-tertiary text-xs mt-0.5 truncate">{zone.description}</p>
767
+ )}
768
+ </td>
769
+ {displaySlots.map((slot) => {
770
+ const isHourDivider = slot.totalMinutes % 60 === 0;
771
+ return (
772
+ <td
773
+ key={slot.key}
774
+ className={cn(
775
+ 'border-r border-b border-border-primary last:border-r-0 bg-surface-tertiary relative',
776
+ isHourDivider && 'before:absolute before:left-0 before:top-0 before:bottom-0 before:w-px before:bg-border-secondary'
777
+ )}
778
+ />
779
+ );
780
+ })}
781
+ </tr>
782
+
783
+ {/* Expanded Resources (each instance as a row) */}
784
+ {expandedResources.length > 0 ? (
785
+ expandedResources.map((instance, instanceIndex) => {
786
+ // Check if this is the last instance of the current resource
787
+ const currentResourceId = instance.resourceId;
788
+ const nextInstance = expandedResources[instanceIndex + 1];
789
+ const isLastInstanceOfResource = !nextInstance || nextInstance.resourceId !== currentResourceId;
790
+
791
+ return (
792
+ <React.Fragment key={instance.id}>
793
+ <tr>
794
+ <td
795
+ style={{ width: firstColWidthPx }}
796
+ className="p-3 border-r border-b border-border-primary sticky left-0 z-[9] bg-surface-primary"
797
+ >
798
+ <div className="flex flex-col">
799
+ <span className="text-label-primary text-sm">{instance.name}</span>
800
+ <span className="text-label-secondary text-xs">Cap: {instance.maxCapacity}</span>
801
+ </div>
802
+ </td>
803
+
804
+ {displaySlots.map((slot) => {
805
+ const bookingAtSlot = getFlowAtSlot(instance, zone, slot.totalMinutes);
806
+
807
+ const isPastSlot = isSlotInPast(slot);
808
+ const isClosedSlot = isSlotClosedForZone(slot, zone);
809
+ const isUnavailable = isPastSlot || isClosedSlot;
810
+ const canQuickAdd = !bookingAtSlot && !isUnavailable;
811
+ const isHourDivider = slot.totalMinutes % 60 === 0;
812
+
813
+ return (
814
+ <td
815
+ key={slot.key}
816
+ onClick={() => canQuickAdd && handleQuickAdd(
817
+ slot.totalMinutes >= 1440 ? nextFormattedDate : formattedDate,
818
+ slot.label,
819
+ zone,
820
+ instance.name,
821
+ instance.resourceId,
822
+ instance.instanceNumber
823
+ )}
824
+ className={cn(
825
+ 'border-r border-b border-border-primary last:border-r-0 h-10 p-0.5 relative group',
826
+ isHourDivider && 'before:absolute before:left-0 before:top-0 before:bottom-0 before:w-px before:bg-border-secondary',
827
+ isUnavailable && !bookingAtSlot && 'bg-surface-secondary',
828
+ bookingAtSlot && bookingAtSlot.type === 'booking' && 'bg-fill-highlight',
829
+ bookingAtSlot && bookingAtSlot.type === 'enquiry' && 'bg-fill-warning',
830
+ canQuickAdd && 'cursor-pointer hover:bg-surface-primary-hover'
831
+ )}
832
+ >
833
+ {bookingAtSlot ? (
834
+ <HoverCard openDelay={200} closeDelay={100}>
835
+ <HoverCardTrigger asChild>
836
+ <div
837
+ className="absolute inset-0 cursor-pointer"
838
+ onClick={() => onFlowClick?.(bookingAtSlot.id)}
839
+ >
840
+ {viewMode === 'detailed' && (
841
+ <div
842
+ className={cn(
843
+ 'text-xs truncate px-1 pt-0.5',
844
+ bookingAtSlot.type === 'booking' ? 'text-label-white' : 'text-label-primary'
845
+ )}
846
+ >
847
+ {bookingAtSlot.customer_name.split(' ')[0]}
848
+ </div>
849
+ )}
850
+ </div>
851
+ </HoverCardTrigger>
852
+ <HoverCardContent className="w-64 p-3" side="top" align="start">
853
+ <div className="flex flex-col gap-2">
854
+ <div className="flex items-center justify-between">
855
+ <span className={cn(
856
+ 'text-xs font-medium px-2 py-0.5 rounded',
857
+ bookingAtSlot.type === 'booking'
858
+ ? 'bg-fill-highlight text-label-white'
859
+ : 'bg-fill-warning text-label-primary'
860
+ )}>
861
+ {bookingAtSlot.type === 'booking' ? 'Booking' : 'Enquiry'}
862
+ </span>
863
+ <span className="text-xs text-label-tertiary">#{bookingAtSlot.reference_number}</span>
864
+ </div>
865
+ <div className="text-sm font-semibold text-label-primary">
866
+ {bookingAtSlot.customer_name}
867
+ </div>
868
+ <div className="text-sm text-label-secondary">
869
+ {bookingAtSlot.activity_name}
870
+ </div>
871
+ <div className="flex items-center gap-2 text-xs text-label-tertiary">
872
+ <span>{bookingAtSlot.booking_time_start.slice(0, 5)}</span>
873
+ {bookingAtSlot.booking_time_end && (
874
+ <>
875
+ <span>→</span>
876
+ <span>{bookingAtSlot.booking_time_end.slice(0, 5)}</span>
877
+ </>
878
+ )}
879
+ </div>
880
+ {bookingAtSlot.total_amount > 0 && (
881
+ <div className="text-sm font-medium text-label-primary">
882
+ £{bookingAtSlot.total_amount.toFixed(2)}
883
+ </div>
884
+ )}
885
+ </div>
886
+ </HoverCardContent>
887
+ </HoverCard>
888
+ ) : (
889
+ <>
890
+ {/* Icon overlay - uses group-hover from parent td */}
891
+ {canQuickAdd && (
892
+ <div className="absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-150 pointer-events-none">
893
+ <IconPlus size={32} className="text-fill-action" />
894
+ </div>
895
+ )}
896
+ </>
897
+ )}
898
+ </td>
899
+ );
900
+ })}
901
+ </tr>
902
+ {/* 4px gap divider between resources (but not at end of zone) */}
903
+ {isLastInstanceOfResource && nextInstance && (
904
+ <tr className="h-1 bg-surface-tertiary">
905
+ <td
906
+ style={{ width: firstColWidthPx }}
907
+ className="bg-surface-tertiary sticky left-0 z-[9]"
908
+ />
909
+ {displaySlots.map((slot) => (
910
+ <td key={slot.key} className="bg-surface-tertiary" />
911
+ ))}
912
+ </tr>
913
+ )}
914
+ </React.Fragment>
915
+ );
916
+ })
917
+ ) : (
918
+ <tr>
919
+ <td
920
+ style={{ width: firstColWidthPx }}
921
+ className="p-3 border-r border-b border-border-primary pl-6 sticky left-0 bg-surface-primary z-[9]"
922
+ >
923
+ <span className="text-label-tertiary text-sm italic">No resources</span>
924
+ </td>
925
+ {displaySlots.map((slot) => {
926
+ const isPastSlot = isSlotInPast(slot);
927
+ const isClosedSlot = isSlotClosed(slot);
928
+ const isUnavailable = isPastSlot || isClosedSlot;
929
+ const canQuickAdd = !isUnavailable;
930
+ const isHourDivider = slot.totalMinutes % 60 === 0;
931
+ return (
932
+ <td
933
+ key={slot.key}
934
+ onClick={() => canQuickAdd && handleQuickAdd(
935
+ slot.totalMinutes >= 1440 ? nextFormattedDate : formattedDate,
936
+ slot.label,
937
+ zone
938
+ )}
939
+ className={cn(
940
+ 'border-r border-b border-border-primary last:border-r-0 h-10 relative group',
941
+ isHourDivider && 'before:absolute before:left-0 before:top-0 before:bottom-0 before:w-px before:bg-border-secondary',
942
+ isUnavailable && 'bg-surface-secondary',
943
+ canQuickAdd && 'cursor-pointer hover:bg-surface-primary-hover'
944
+ )}
945
+ title={isClosedSlot ? 'Venue closed' : undefined}
946
+ >
947
+ {canQuickAdd && (
948
+ <div className="absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-150 pointer-events-none">
949
+ <IconPlus size={32} className="text-fill-action" />
950
+ </div>
951
+ )}
952
+ </td>
953
+ );
954
+ })}
955
+ </tr>
956
+ )}
957
+ </React.Fragment>
958
+ );
959
+ })}
960
+ </tbody>
961
+ </table>
962
+ </div>
963
+ </div>
964
+ </div>
965
+
966
+ {/* Legend */}
967
+ <div className="flex items-center gap-6 text-sm">
968
+ <div className="flex items-center gap-2">
969
+ <div className="w-4 h-4 rounded bg-fill-highlight" />
970
+ <span className="text-label-secondary">Booking</span>
971
+ </div>
972
+ <div className="flex items-center gap-2">
973
+ <div className="w-4 h-4 rounded bg-fill-warning" />
974
+ <span className="text-label-secondary">Enquiry</span>
975
+ </div>
976
+ </div>
977
+
978
+ {/* V2 Quick Add Panel */}
979
+ <QuickAddPanel
980
+ isOpen={quickAddPanelOpen}
981
+ onClose={() => setQuickAddPanelOpen(false)}
982
+ onSuccess={() => {
983
+ // Refresh flows after successful creation
984
+ fetchData();
985
+ }}
986
+ providerId={providerId}
987
+ providerType={provider?.type || 'venue'}
988
+ prefilledDate={quickAddData?.date}
989
+ prefilledTime={quickAddData?.time}
990
+ prefilledZoneId={quickAddData?.zoneId}
991
+ prefilledZoneName={quickAddData?.zoneName}
992
+ prefilledResourceId={quickAddData?.resourceId}
993
+ prefilledResourceName={quickAddData?.resourceName}
994
+ prefilledResourceInstance={quickAddData?.resourceInstance}
995
+ />
996
+ </div>
997
+ );
998
+ };