@licklist/design 0.78.5-dev.105 → 0.78.5-dev.107

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 (371) hide show
  1. package/.vscode/settings.json +3 -0
  2. package/bitbucket-pipelines.yml +13 -4
  3. package/dist/index.js +1 -1
  4. package/dist/product-set/form/ProductsControl.d.ts +2 -1
  5. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  6. package/dist/product-set/form/ProductsControl.js +0 -24
  7. package/dist/v2/components/DataTable/DataTable.d.ts.map +1 -1
  8. package/dist/v2/components/DataTable/DataTable.js +86 -2
  9. package/dist/v2/components/InputCheckbox/InputCheckbox.scss.js +1 -1
  10. package/dist/v2/components/Modal/DeleteModal.d.ts.map +1 -1
  11. package/dist/v2/components/Modal/DeleteModal.js +13 -11
  12. package/dist/v2/components/Toggle/Toggle.d.ts.map +1 -1
  13. package/dist/v2/components/Toggle/Toggle.js +8 -5
  14. package/dist/v2/components/ZoneCard/ZoneCard.scss.js +1 -1
  15. package/dist/v2/components/index.d.ts +1 -1
  16. package/dist/v2/components/index.d.ts.map +1 -1
  17. package/dist/v2/icons/index.d.ts +4 -0
  18. package/dist/v2/icons/index.d.ts.map +1 -1
  19. package/dist/v2/icons/index.js +47 -16
  20. package/dist/v2/index.d.ts +0 -4
  21. package/dist/v2/index.d.ts.map +1 -1
  22. package/dist/v2/pages/Settings/components/SidebarCustomisation.js +0 -3
  23. package/dist/v2/pages/Settings/components/SidebarNavItem.js +0 -3
  24. package/package.json +6 -6
  25. package/rollup.config.js +16 -2
  26. package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +1 -1
  27. package/src/product-set/form/ProductsControl.tsx +2 -1
  28. package/src/v2/components/DataTable/DataTable.tsx +23 -1
  29. package/src/v2/components/InputCheckbox/InputCheckbox.scss +6 -6
  30. package/src/v2/components/Modal/DeleteModal.tsx +12 -20
  31. package/src/v2/components/Toggle/Toggle.tsx +6 -5
  32. package/src/v2/components/ZoneCard/ZoneCard.scss +78 -0
  33. package/src/v2/components/index.ts +1 -0
  34. package/src/v2/icons/index.tsx +10 -0
  35. package/src/v2/index.ts +0 -73
  36. package/src/v2/navigation/Navigation/Navigation.stories.tsx +137 -0
  37. package/dist/v2/shadcn/components/ui/accordion.d.ts +0 -8
  38. package/dist/v2/shadcn/components/ui/accordion.d.ts.map +0 -1
  39. package/dist/v2/shadcn/components/ui/alert-dialog.d.ts +0 -21
  40. package/dist/v2/shadcn/components/ui/alert-dialog.d.ts.map +0 -1
  41. package/dist/v2/shadcn/components/ui/alert.d.ts +0 -9
  42. package/dist/v2/shadcn/components/ui/alert.d.ts.map +0 -1
  43. package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts +0 -4
  44. package/dist/v2/shadcn/components/ui/aspect-ratio.d.ts.map +0 -1
  45. package/dist/v2/shadcn/components/ui/avatar.d.ts +0 -7
  46. package/dist/v2/shadcn/components/ui/avatar.d.ts.map +0 -1
  47. package/dist/v2/shadcn/components/ui/badge.d.ts +0 -10
  48. package/dist/v2/shadcn/components/ui/badge.d.ts.map +0 -1
  49. package/dist/v2/shadcn/components/ui/breadcrumb.d.ts +0 -20
  50. package/dist/v2/shadcn/components/ui/breadcrumb.d.ts.map +0 -1
  51. package/dist/v2/shadcn/components/ui/button.d.ts +0 -14
  52. package/dist/v2/shadcn/components/ui/button.d.ts.map +0 -1
  53. package/dist/v2/shadcn/components/ui/calendar.d.ts +0 -9
  54. package/dist/v2/shadcn/components/ui/calendar.d.ts.map +0 -1
  55. package/dist/v2/shadcn/components/ui/card.d.ts +0 -9
  56. package/dist/v2/shadcn/components/ui/card.d.ts.map +0 -1
  57. package/dist/v2/shadcn/components/ui/carousel.d.ts +0 -19
  58. package/dist/v2/shadcn/components/ui/carousel.d.ts.map +0 -1
  59. package/dist/v2/shadcn/components/ui/checkbox.d.ts +0 -6
  60. package/dist/v2/shadcn/components/ui/checkbox.d.ts.map +0 -1
  61. package/dist/v2/shadcn/components/ui/checkbox.js +0 -115
  62. package/dist/v2/shadcn/components/ui/checkbox.scss.js +0 -6
  63. package/dist/v2/shadcn/components/ui/collapsible.d.ts +0 -6
  64. package/dist/v2/shadcn/components/ui/collapsible.d.ts.map +0 -1
  65. package/dist/v2/shadcn/components/ui/command.d.ts +0 -83
  66. package/dist/v2/shadcn/components/ui/command.d.ts.map +0 -1
  67. package/dist/v2/shadcn/components/ui/context-menu.d.ts +0 -28
  68. package/dist/v2/shadcn/components/ui/context-menu.d.ts.map +0 -1
  69. package/dist/v2/shadcn/components/ui/dialog.d.ts +0 -20
  70. package/dist/v2/shadcn/components/ui/dialog.d.ts.map +0 -1
  71. package/dist/v2/shadcn/components/ui/dialog.js +0 -169
  72. package/dist/v2/shadcn/components/ui/drawer.d.ts +0 -23
  73. package/dist/v2/shadcn/components/ui/drawer.d.ts.map +0 -1
  74. package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts +0 -28
  75. package/dist/v2/shadcn/components/ui/dropdown-menu.d.ts.map +0 -1
  76. package/dist/v2/shadcn/components/ui/form.d.ts +0 -24
  77. package/dist/v2/shadcn/components/ui/form.d.ts.map +0 -1
  78. package/dist/v2/shadcn/components/ui/hover-card.d.ts +0 -7
  79. package/dist/v2/shadcn/components/ui/hover-card.d.ts.map +0 -1
  80. package/dist/v2/shadcn/components/ui/input-otp.d.ts +0 -35
  81. package/dist/v2/shadcn/components/ui/input-otp.d.ts.map +0 -1
  82. package/dist/v2/shadcn/components/ui/input.d.ts +0 -6
  83. package/dist/v2/shadcn/components/ui/input.d.ts.map +0 -1
  84. package/dist/v2/shadcn/components/ui/label.d.ts +0 -6
  85. package/dist/v2/shadcn/components/ui/label.d.ts.map +0 -1
  86. package/dist/v2/shadcn/components/ui/menubar.d.ts +0 -34
  87. package/dist/v2/shadcn/components/ui/menubar.d.ts.map +0 -1
  88. package/dist/v2/shadcn/components/ui/navigation-menu.d.ts +0 -13
  89. package/dist/v2/shadcn/components/ui/navigation-menu.d.ts.map +0 -1
  90. package/dist/v2/shadcn/components/ui/pagination.d.ts +0 -29
  91. package/dist/v2/shadcn/components/ui/pagination.d.ts.map +0 -1
  92. package/dist/v2/shadcn/components/ui/popover.d.ts +0 -7
  93. package/dist/v2/shadcn/components/ui/popover.d.ts.map +0 -1
  94. package/dist/v2/shadcn/components/ui/progress.d.ts +0 -5
  95. package/dist/v2/shadcn/components/ui/progress.d.ts.map +0 -1
  96. package/dist/v2/shadcn/components/ui/radio-card.d.ts +0 -12
  97. package/dist/v2/shadcn/components/ui/radio-card.d.ts.map +0 -1
  98. package/dist/v2/shadcn/components/ui/radio-group.d.ts +0 -6
  99. package/dist/v2/shadcn/components/ui/radio-group.d.ts.map +0 -1
  100. package/dist/v2/shadcn/components/ui/scroll-area.d.ts +0 -6
  101. package/dist/v2/shadcn/components/ui/scroll-area.d.ts.map +0 -1
  102. package/dist/v2/shadcn/components/ui/select.d.ts +0 -14
  103. package/dist/v2/shadcn/components/ui/select.d.ts.map +0 -1
  104. package/dist/v2/shadcn/components/ui/separator.d.ts +0 -5
  105. package/dist/v2/shadcn/components/ui/separator.d.ts.map +0 -1
  106. package/dist/v2/shadcn/components/ui/sheet.d.ts +0 -26
  107. package/dist/v2/shadcn/components/ui/sheet.d.ts.map +0 -1
  108. package/dist/v2/shadcn/components/ui/sidebar.d.ts +0 -67
  109. package/dist/v2/shadcn/components/ui/sidebar.d.ts.map +0 -1
  110. package/dist/v2/shadcn/components/ui/skeleton.d.ts +0 -3
  111. package/dist/v2/shadcn/components/ui/skeleton.d.ts.map +0 -1
  112. package/dist/v2/shadcn/components/ui/slider.d.ts +0 -5
  113. package/dist/v2/shadcn/components/ui/slider.d.ts.map +0 -1
  114. package/dist/v2/shadcn/components/ui/switch.d.ts +0 -6
  115. package/dist/v2/shadcn/components/ui/switch.d.ts.map +0 -1
  116. package/dist/v2/shadcn/components/ui/switch.js +0 -115
  117. package/dist/v2/shadcn/components/ui/switch.scss.js +0 -6
  118. package/dist/v2/shadcn/components/ui/table-pagination.d.ts +0 -11
  119. package/dist/v2/shadcn/components/ui/table-pagination.d.ts.map +0 -1
  120. package/dist/v2/shadcn/components/ui/table.d.ts +0 -11
  121. package/dist/v2/shadcn/components/ui/table.d.ts.map +0 -1
  122. package/dist/v2/shadcn/components/ui/tabs.d.ts +0 -8
  123. package/dist/v2/shadcn/components/ui/tabs.d.ts.map +0 -1
  124. package/dist/v2/shadcn/components/ui/textarea.d.ts +0 -6
  125. package/dist/v2/shadcn/components/ui/textarea.d.ts.map +0 -1
  126. package/dist/v2/shadcn/components/ui/toast.d.ts +0 -16
  127. package/dist/v2/shadcn/components/ui/toast.d.ts.map +0 -1
  128. package/dist/v2/shadcn/components/ui/toaster.d.ts +0 -2
  129. package/dist/v2/shadcn/components/ui/toaster.d.ts.map +0 -1
  130. package/dist/v2/shadcn/components/ui/toggle-group.d.ts +0 -13
  131. package/dist/v2/shadcn/components/ui/toggle-group.d.ts.map +0 -1
  132. package/dist/v2/shadcn/components/ui/toggle.d.ts +0 -13
  133. package/dist/v2/shadcn/components/ui/toggle.d.ts.map +0 -1
  134. package/dist/v2/shadcn/components/ui/tooltip.d.ts +0 -8
  135. package/dist/v2/shadcn/components/ui/tooltip.d.ts.map +0 -1
  136. package/dist/v2/shadcn/components/ui/use-toast.d.ts +0 -3
  137. package/dist/v2/shadcn/components/ui/use-toast.d.ts.map +0 -1
  138. package/dist/v2/shadcn/hooks/use-mobile.d.ts +0 -2
  139. package/dist/v2/shadcn/hooks/use-mobile.d.ts.map +0 -1
  140. package/dist/v2/shadcn/hooks/use-toast.d.ts +0 -45
  141. package/dist/v2/shadcn/hooks/use-toast.d.ts.map +0 -1
  142. package/dist/v2/shadcn/index.d.ts +0 -20
  143. package/dist/v2/shadcn/index.d.ts.map +0 -1
  144. package/dist/v2/shadcn/lib/utils.d.ts +0 -3
  145. package/dist/v2/shadcn/lib/utils.d.ts.map +0 -1
  146. package/dist/v2/shadcn/lib/utils.js +0 -11
  147. package/dist/v2/shadcn/styles/globals.css +0 -112
  148. package/src/v2/shadcn/_reference/AccountManagerCard.tsx +0 -45
  149. package/src/v2/shadcn/_reference/AffiliatesTable.tsx +0 -178
  150. package/src/v2/shadcn/_reference/AuditArchive.tsx +0 -165
  151. package/src/v2/shadcn/_reference/AuditContent.tsx +0 -270
  152. package/src/v2/shadcn/_reference/AutomationsGeneralSettings.tsx +0 -251
  153. package/src/v2/shadcn/_reference/AvatarUpload.tsx +0 -150
  154. package/src/v2/shadcn/_reference/BookingsSummaryCard.tsx +0 -268
  155. package/src/v2/shadcn/_reference/CodeCleanUpAudit.tsx +0 -274
  156. package/src/v2/shadcn/_reference/CompaniesTable.tsx +0 -387
  157. package/src/v2/shadcn/_reference/ComponentAudit.tsx +0 -239
  158. package/src/v2/shadcn/_reference/ConfigureSettingsCard.tsx +0 -95
  159. package/src/v2/shadcn/_reference/CustomerCard.tsx +0 -155
  160. package/src/v2/shadcn/_reference/DashboardCards.tsx +0 -50
  161. package/src/v2/shadcn/_reference/DashboardFooter.tsx +0 -18
  162. package/src/v2/shadcn/_reference/DiarySettings.tsx +0 -187
  163. package/src/v2/shadcn/_reference/DiaryView.tsx +0 -998
  164. package/src/v2/shadcn/_reference/EmptyState.tsx +0 -76
  165. package/src/v2/shadcn/_reference/EntityInfoCard.tsx +0 -48
  166. package/src/v2/shadcn/_reference/ExistingUserAssignments.tsx +0 -131
  167. package/src/v2/shadcn/_reference/FeatureToggle.tsx +0 -72
  168. package/src/v2/shadcn/_reference/FlowCard.tsx +0 -170
  169. package/src/v2/shadcn/_reference/FlowsContent.tsx +0 -688
  170. package/src/v2/shadcn/_reference/FlowsGeneralSettings.tsx +0 -27
  171. package/src/v2/shadcn/_reference/GeneralSettings.tsx +0 -33
  172. package/src/v2/shadcn/_reference/InventoryGeneralSettings.tsx +0 -82
  173. package/src/v2/shadcn/_reference/LanguageSelector.tsx +0 -97
  174. package/src/v2/shadcn/_reference/LoadingScreen.tsx +0 -25
  175. package/src/v2/shadcn/_reference/LoadingSpinner.tsx +0 -41
  176. package/src/v2/shadcn/_reference/ManagedClientsList.tsx +0 -121
  177. package/src/v2/shadcn/_reference/NPSScore.tsx +0 -379
  178. package/src/v2/shadcn/_reference/NPSSummaryCard.tsx +0 -181
  179. package/src/v2/shadcn/_reference/NotificationBanner.tsx +0 -129
  180. package/src/v2/shadcn/_reference/NotificationPanel.tsx +0 -208
  181. package/src/v2/shadcn/_reference/OnlineUsersCard.tsx +0 -73
  182. package/src/v2/shadcn/_reference/ProtectedRoute.tsx +0 -39
  183. package/src/v2/shadcn/_reference/ProvidersTable.tsx +0 -353
  184. package/src/v2/shadcn/_reference/QuickAddPanel.tsx +0 -1057
  185. package/src/v2/shadcn/_reference/QuickFilters.tsx +0 -112
  186. package/src/v2/shadcn/_reference/ScheduleView.tsx +0 -410
  187. package/src/v2/shadcn/_reference/ScrollToTop.tsx +0 -14
  188. package/src/v2/shadcn/_reference/SecondaryNav.tsx +0 -50
  189. package/src/v2/shadcn/_reference/SecuritySettings.tsx +0 -258
  190. package/src/v2/shadcn/_reference/SessionDetailView.tsx +0 -294
  191. package/src/v2/shadcn/_reference/Sidebar.tsx +0 -14
  192. package/src/v2/shadcn/_reference/SidebarAwareLayout.tsx +0 -30
  193. package/src/v2/shadcn/_reference/SidebarLabelCustomization.tsx +0 -285
  194. package/src/v2/shadcn/_reference/SimulationBanner.tsx +0 -57
  195. package/src/v2/shadcn/_reference/SortControls.tsx +0 -65
  196. package/src/v2/shadcn/_reference/StatusBadge.tsx +0 -49
  197. package/src/v2/shadcn/_reference/StyleGuideContent.tsx +0 -331
  198. package/src/v2/shadcn/_reference/TableActionMenu.tsx +0 -126
  199. package/src/v2/shadcn/_reference/ThemeProvider.tsx +0 -119
  200. package/src/v2/shadcn/_reference/ThemeSettings.tsx +0 -73
  201. package/src/v2/shadcn/_reference/TopNavigation.tsx +0 -332
  202. package/src/v2/shadcn/_reference/UserActivityHistory.tsx +0 -209
  203. package/src/v2/shadcn/_reference/UserLanguageSettings.tsx +0 -94
  204. package/src/v2/shadcn/_reference/UserPanel.tsx +0 -472
  205. package/src/v2/shadcn/_reference/UsersTable.tsx +0 -1023
  206. package/src/v2/shadcn/_reference/WaiverForm.tsx +0 -301
  207. package/src/v2/shadcn/_reference/WaiversGeneralSettings.tsx +0 -46
  208. package/src/v2/shadcn/_reference/WaiversTable.tsx +0 -290
  209. package/src/v2/shadcn/_reference/WaiversTemplatesSettings.tsx +0 -416
  210. package/src/v2/shadcn/_reference/ai/AIChatPanel.tsx +0 -313
  211. package/src/v2/shadcn/_reference/ai/AIChatSearchBar.tsx +0 -36
  212. package/src/v2/shadcn/_reference/ai/ChatInteractiveBlock.tsx +0 -298
  213. package/src/v2/shadcn/_reference/ai/ChatMessageContent.tsx +0 -40
  214. package/src/v2/shadcn/_reference/ai/parseInteractiveBlocks.ts +0 -142
  215. package/src/v2/shadcn/_reference/auth/AuthLayout.tsx +0 -55
  216. package/src/v2/shadcn/_reference/auth/CreatePasswordForm.tsx +0 -285
  217. package/src/v2/shadcn/_reference/auth/CreatePasswordPanel.tsx +0 -20
  218. package/src/v2/shadcn/_reference/auth/LoginFooter.tsx +0 -14
  219. package/src/v2/shadcn/_reference/auth/LoginForm.tsx +0 -205
  220. package/src/v2/shadcn/_reference/auth/LoginPanel.tsx +0 -41
  221. package/src/v2/shadcn/_reference/auth/ResetPasswordForm.tsx +0 -102
  222. package/src/v2/shadcn/_reference/auth/ResetPasswordPanel.tsx +0 -20
  223. package/src/v2/shadcn/_reference/auth/VerifyEmailForm.tsx +0 -95
  224. package/src/v2/shadcn/_reference/auth/VerifyEmailPanel.tsx +0 -20
  225. package/src/v2/shadcn/_reference/email/EmailAttachment.tsx +0 -119
  226. package/src/v2/shadcn/_reference/email/EmailAutomation.tsx +0 -92
  227. package/src/v2/shadcn/_reference/email/EmailPlaceholders.tsx +0 -64
  228. package/src/v2/shadcn/_reference/email/UnlayerEmailEditor.tsx +0 -41
  229. package/src/v2/shadcn/_reference/email/emailTemplateData.ts +0 -53
  230. package/src/v2/shadcn/_reference/emptyStateIcons.tsx +0 -103
  231. package/src/v2/shadcn/_reference/games/MazeGame.tsx +0 -394
  232. package/src/v2/shadcn/_reference/games/RunnerGame.tsx +0 -497
  233. package/src/v2/shadcn/_reference/logos/BookedLogoFull.tsx +0 -36
  234. package/src/v2/shadcn/_reference/logos/BookedLogoMark.tsx +0 -31
  235. package/src/v2/shadcn/_reference/logos/BookedLogoNew.tsx +0 -36
  236. package/src/v2/shadcn/_reference/pricing/DynamicPricingRulesEditor.tsx +0 -401
  237. package/src/v2/shadcn/_reference/pricing/DynamicPricingTierCard.tsx +0 -77
  238. package/src/v2/shadcn/_reference/pricing/DynamicPricingTiersList.tsx +0 -218
  239. package/src/v2/shadcn/_reference/pricing/PricingCalendar.tsx +0 -810
  240. package/src/v2/shadcn/_reference/pricing/PricingPeriodCard.tsx +0 -152
  241. package/src/v2/shadcn/_reference/pricing/PricingPeriodForm.tsx +0 -377
  242. package/src/v2/shadcn/_reference/pricing/PricingPeriodsList.tsx +0 -213
  243. package/src/v2/shadcn/_reference/pricing/getRuleSummary.ts +0 -39
  244. package/src/v2/shadcn/_reference/products/AvailabilityRulesSection.tsx +0 -184
  245. package/src/v2/shadcn/_reference/products/AvailabilitySection.tsx +0 -677
  246. package/src/v2/shadcn/_reference/products/BookingTypeConfigOptions.tsx +0 -40
  247. package/src/v2/shadcn/_reference/products/CapacityPeriodsSection.tsx +0 -238
  248. package/src/v2/shadcn/_reference/products/DynamicPricingTiersSection.tsx +0 -131
  249. package/src/v2/shadcn/_reference/products/GiftCardOrdersTab.tsx +0 -192
  250. package/src/v2/shadcn/_reference/products/GiftCardSettings.tsx +0 -342
  251. package/src/v2/shadcn/_reference/products/PackageProductsSection.tsx +0 -322
  252. package/src/v2/shadcn/_reference/products/PricingSection.tsx +0 -173
  253. package/src/v2/shadcn/_reference/products/ProductTypeFields.tsx +0 -353
  254. package/src/v2/shadcn/_reference/products/ProductTypeIcon.tsx +0 -95
  255. package/src/v2/shadcn/_reference/products/VariablePricingSection.tsx +0 -140
  256. package/src/v2/shadcn/_reference/products/productTypeConfig.ts +0 -182
  257. package/src/v2/shadcn/_reference/shared/BackButton.tsx +0 -50
  258. package/src/v2/shadcn/_reference/shared/CancelConfirmationDialog.tsx +0 -18
  259. package/src/v2/shadcn/_reference/shared/ConfirmationDialog.tsx +0 -136
  260. package/src/v2/shadcn/_reference/shared/DeleteConfirmationDialog.tsx +0 -18
  261. package/src/v2/shadcn/_reference/shared/DeleteEntityPage.tsx +0 -221
  262. package/src/v2/shadcn/_reference/shared/SidebarIcons.tsx +0 -108
  263. package/src/v2/shadcn/_reference/shared/UnifiedSidebar.tsx +0 -722
  264. package/src/v2/shadcn/_reference/tables/BulkActionsBar.tsx +0 -68
  265. package/src/v2/shadcn/_reference/tables/DataTable.tsx +0 -221
  266. package/src/v2/shadcn/_reference/tables/TableControls.tsx +0 -94
  267. package/src/v2/shadcn/_reference/tables/index.ts +0 -3
  268. package/src/v2/shadcn/_reference/tables/types.ts +0 -79
  269. package/src/v2/shadcn/_reference/zones/LegacyZoneSettings.tsx +0 -299
  270. package/src/v2/shadcn/components/ui/accordion.stories.tsx +0 -63
  271. package/src/v2/shadcn/components/ui/accordion.tsx +0 -52
  272. package/src/v2/shadcn/components/ui/alert-dialog.stories.tsx +0 -44
  273. package/src/v2/shadcn/components/ui/alert-dialog.tsx +0 -104
  274. package/src/v2/shadcn/components/ui/alert.stories.tsx +0 -44
  275. package/src/v2/shadcn/components/ui/alert.tsx +0 -43
  276. package/src/v2/shadcn/components/ui/aspect-ratio.stories.tsx +0 -46
  277. package/src/v2/shadcn/components/ui/aspect-ratio.tsx +0 -5
  278. package/src/v2/shadcn/components/ui/avatar.stories.tsx +0 -39
  279. package/src/v2/shadcn/components/ui/avatar.tsx +0 -38
  280. package/src/v2/shadcn/components/ui/badge.stories.tsx +0 -17
  281. package/src/v2/shadcn/components/ui/badge.tsx +0 -30
  282. package/src/v2/shadcn/components/ui/breadcrumb.stories.tsx +0 -91
  283. package/src/v2/shadcn/components/ui/breadcrumb.tsx +0 -90
  284. package/src/v2/shadcn/components/ui/button.stories.tsx +0 -20
  285. package/src/v2/shadcn/components/ui/button.tsx +0 -60
  286. package/src/v2/shadcn/components/ui/calendar.stories.tsx +0 -61
  287. package/src/v2/shadcn/components/ui/calendar.tsx +0 -54
  288. package/src/v2/shadcn/components/ui/card.stories.tsx +0 -37
  289. package/src/v2/shadcn/components/ui/card.tsx +0 -43
  290. package/src/v2/shadcn/components/ui/carousel.stories.tsx +0 -92
  291. package/src/v2/shadcn/components/ui/carousel.tsx +0 -224
  292. package/src/v2/shadcn/components/ui/checkbox.scss +0 -38
  293. package/src/v2/shadcn/components/ui/checkbox.stories.tsx +0 -23
  294. package/src/v2/shadcn/components/ui/checkbox.tsx +0 -24
  295. package/src/v2/shadcn/components/ui/collapsible.stories.tsx +0 -59
  296. package/src/v2/shadcn/components/ui/collapsible.tsx +0 -9
  297. package/src/v2/shadcn/components/ui/command.stories.tsx +0 -70
  298. package/src/v2/shadcn/components/ui/command.tsx +0 -132
  299. package/src/v2/shadcn/components/ui/context-menu.stories.tsx +0 -72
  300. package/src/v2/shadcn/components/ui/context-menu.tsx +0 -178
  301. package/src/v2/shadcn/components/ui/dialog.stories.tsx +0 -67
  302. package/src/v2/shadcn/components/ui/dialog.tsx +0 -95
  303. package/src/v2/shadcn/components/ui/drawer.stories.tsx +0 -50
  304. package/src/v2/shadcn/components/ui/drawer.tsx +0 -87
  305. package/src/v2/shadcn/components/ui/dropdown-menu.stories.tsx +0 -73
  306. package/src/v2/shadcn/components/ui/dropdown-menu.tsx +0 -179
  307. package/src/v2/shadcn/components/ui/form.stories.tsx +0 -105
  308. package/src/v2/shadcn/components/ui/form.tsx +0 -129
  309. package/src/v2/shadcn/components/ui/hover-card.stories.tsx +0 -35
  310. package/src/v2/shadcn/components/ui/hover-card.tsx +0 -27
  311. package/src/v2/shadcn/components/ui/input-otp.stories.tsx +0 -72
  312. package/src/v2/shadcn/components/ui/input-otp.tsx +0 -61
  313. package/src/v2/shadcn/components/ui/input.stories.tsx +0 -16
  314. package/src/v2/shadcn/components/ui/input.tsx +0 -25
  315. package/src/v2/shadcn/components/ui/label.stories.tsx +0 -13
  316. package/src/v2/shadcn/components/ui/label.tsx +0 -17
  317. package/src/v2/shadcn/components/ui/menubar.stories.tsx +0 -86
  318. package/src/v2/shadcn/components/ui/menubar.tsx +0 -207
  319. package/src/v2/shadcn/components/ui/navigation-menu.stories.tsx +0 -68
  320. package/src/v2/shadcn/components/ui/navigation-menu.tsx +0 -120
  321. package/src/v2/shadcn/components/ui/pagination.stories.tsx +0 -78
  322. package/src/v2/shadcn/components/ui/pagination.tsx +0 -81
  323. package/src/v2/shadcn/components/ui/popover.stories.tsx +0 -44
  324. package/src/v2/shadcn/components/ui/popover.tsx +0 -29
  325. package/src/v2/shadcn/components/ui/progress.stories.tsx +0 -17
  326. package/src/v2/shadcn/components/ui/progress.tsx +0 -23
  327. package/src/v2/shadcn/components/ui/radio-card.stories.tsx +0 -68
  328. package/src/v2/shadcn/components/ui/radio-card.tsx +0 -52
  329. package/src/v2/shadcn/components/ui/radio-group.stories.tsx +0 -77
  330. package/src/v2/shadcn/components/ui/radio-group.tsx +0 -35
  331. package/src/v2/shadcn/components/ui/scroll-area.stories.tsx +0 -56
  332. package/src/v2/shadcn/components/ui/scroll-area.tsx +0 -38
  333. package/src/v2/shadcn/components/ui/select.stories.tsx +0 -60
  334. package/src/v2/shadcn/components/ui/select.tsx +0 -148
  335. package/src/v2/shadcn/components/ui/separator.stories.tsx +0 -30
  336. package/src/v2/shadcn/components/ui/separator.tsx +0 -20
  337. package/src/v2/shadcn/components/ui/sheet.stories.tsx +0 -115
  338. package/src/v2/shadcn/components/ui/sheet.tsx +0 -107
  339. package/src/v2/shadcn/components/ui/sidebar.stories.tsx +0 -167
  340. package/src/v2/shadcn/components/ui/sidebar.tsx +0 -637
  341. package/src/v2/shadcn/components/ui/skeleton.stories.tsx +0 -36
  342. package/src/v2/shadcn/components/ui/skeleton.tsx +0 -7
  343. package/src/v2/shadcn/components/ui/slider.stories.tsx +0 -16
  344. package/src/v2/shadcn/components/ui/slider.tsx +0 -23
  345. package/src/v2/shadcn/components/ui/switch.scss +0 -63
  346. package/src/v2/shadcn/components/ui/switch.stories.tsx +0 -23
  347. package/src/v2/shadcn/components/ui/switch.tsx +0 -24
  348. package/src/v2/shadcn/components/ui/table-pagination.stories.tsx +0 -81
  349. package/src/v2/shadcn/components/ui/table-pagination.tsx +0 -61
  350. package/src/v2/shadcn/components/ui/table.stories.tsx +0 -40
  351. package/src/v2/shadcn/components/ui/table.tsx +0 -72
  352. package/src/v2/shadcn/components/ui/tabs.stories.tsx +0 -85
  353. package/src/v2/shadcn/components/ui/tabs.tsx +0 -53
  354. package/src/v2/shadcn/components/ui/textarea.stories.tsx +0 -15
  355. package/src/v2/shadcn/components/ui/textarea.tsx +0 -21
  356. package/src/v2/shadcn/components/ui/toast.stories.tsx +0 -77
  357. package/src/v2/shadcn/components/ui/toast.tsx +0 -111
  358. package/src/v2/shadcn/components/ui/toaster.stories.tsx +0 -46
  359. package/src/v2/shadcn/components/ui/toaster.tsx +0 -24
  360. package/src/v2/shadcn/components/ui/toggle-group.stories.tsx +0 -95
  361. package/src/v2/shadcn/components/ui/toggle-group.tsx +0 -49
  362. package/src/v2/shadcn/components/ui/toggle.stories.tsx +0 -18
  363. package/src/v2/shadcn/components/ui/toggle.tsx +0 -37
  364. package/src/v2/shadcn/components/ui/tooltip.stories.tsx +0 -57
  365. package/src/v2/shadcn/components/ui/tooltip.tsx +0 -28
  366. package/src/v2/shadcn/components/ui/use-toast.ts +0 -3
  367. package/src/v2/shadcn/hooks/use-mobile.tsx +0 -19
  368. package/src/v2/shadcn/hooks/use-toast.ts +0 -184
  369. package/src/v2/shadcn/index.ts +0 -76
  370. package/src/v2/shadcn/lib/utils.ts +0 -6
  371. package/src/v2/shadcn/styles/globals.css +0 -112
@@ -1,299 +0,0 @@
1
- import React from 'react';
2
- import { Input } from '../ui/input';
3
- import { Label } from '../ui/label';
4
- import { Textarea } from '../ui/textarea';
5
- import { RadioGroup } from '../ui/radio-group';
6
- import { RadioCard } from '../ui/radio-card';
7
- import { Switch } from '../ui/switch';
8
- import { Button } from '../ui/button';
9
- import { Checkbox } from '../ui/checkbox';
10
- import { useAppSettings } from '@/contexts/AppSettingsContext';
11
- import { IconPlus, IconDelete } from '../../../icons';
12
-
13
- const DAY_OPTIONS = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
14
-
15
- export interface StartTimePeriod {
16
- intervalMinutes: string;
17
- fromTime: string;
18
- toTime: string;
19
- days?: string[];
20
- }
21
-
22
- export interface LegacyZoneSettingsData {
23
- zoneType: string;
24
- avgResourceCapacity: string;
25
- avgSlotDuration: string;
26
- zoneServiceTime: string;
27
- description: string;
28
- sameStartTimesEveryDay: boolean;
29
- startTimePeriods: StartTimePeriod[];
30
- }
31
-
32
- interface LegacyZoneSettingsProps {
33
- data: LegacyZoneSettingsData;
34
- onChange: (data: LegacyZoneSettingsData) => void;
35
- }
36
-
37
- const LegacyZoneSettings: React.FC<LegacyZoneSettingsProps> = ({ data, onChange }) => {
38
- const { settings } = useAppSettings();
39
-
40
- if (!settings.legacySystemEnabled) return null;
41
-
42
- const update = (partial: Partial<LegacyZoneSettingsData>) => {
43
- onChange({ ...data, ...partial });
44
- };
45
-
46
- const addPeriod = () => {
47
- update({
48
- startTimePeriods: [
49
- ...data.startTimePeriods,
50
- { intervalMinutes: '15', fromTime: '09:00', toTime: '17:00', days: data.sameStartTimesEveryDay ? undefined : [] },
51
- ],
52
- });
53
- };
54
-
55
- const removePeriod = (index: number) => {
56
- update({
57
- startTimePeriods: data.startTimePeriods.filter((_, i) => i !== index),
58
- });
59
- };
60
-
61
- const updatePeriod = (index: number, partial: Partial<StartTimePeriod>) => {
62
- const updated = data.startTimePeriods.map((p, i) =>
63
- i === index ? { ...p, ...partial } : p
64
- );
65
- update({ startTimePeriods: updated });
66
- };
67
-
68
- const togglePeriodDay = (index: number, day: string) => {
69
- const period = data.startTimePeriods[index];
70
- const currentDays = period.days || [];
71
- const updatedDays = currentDays.includes(day)
72
- ? currentDays.filter(d => d !== day)
73
- : [...currentDays, day];
74
- updatePeriod(index, { days: updatedDays });
75
- };
76
-
77
- const getPeriodsOrDefault = () => {
78
- if (data.startTimePeriods.length > 0) return data.startTimePeriods;
79
- const defaultPeriods = [{ intervalMinutes: '15', fromTime: '09:00', toTime: '17:00', days: data.sameStartTimesEveryDay ? undefined : [] as string[] }];
80
- // Sync default to parent state
81
- onChange({ ...data, startTimePeriods: defaultPeriods });
82
- return defaultPeriods;
83
- };
84
-
85
- return (
86
- <>
87
- {/* Legacy Settings Section */}
88
- <div className="flex flex-col gap-6">
89
- <div className="flex flex-col gap-1">
90
- <h2 className="text-label-primary text-xl font-semibold">Legacy Settings</h2>
91
- <p className="text-label-secondary text-sm">Configuration for legacy system integration</p>
92
- </div>
93
- </div>
94
-
95
- {/* Zone Type */}
96
- <div className="flex flex-col gap-2">
97
- <Label className="text-sm font-semibold">Zone Type</Label>
98
- <RadioGroup
99
- value={data.zoneType}
100
- onValueChange={(value) => update({ zoneType: value })}
101
- className="flex flex-col gap-1"
102
- >
103
- <RadioCard
104
- value="regular"
105
- id="zone-type-regular"
106
- title="Regular"
107
- subtitle="Standard zone configuration"
108
- />
109
- <RadioCard
110
- value="bowling"
111
- id="zone-type-bowling"
112
- title="Bowling"
113
- subtitle="Bowling-specific zone configuration"
114
- />
115
- </RadioGroup>
116
- </div>
117
-
118
- {/* Average Resource Capacity */}
119
- <div className="flex flex-col gap-2">
120
- <Label htmlFor="avgResourceCapacity">Average Resource Capacity</Label>
121
- <Input
122
- id="avgResourceCapacity"
123
- type="number"
124
- value={data.avgResourceCapacity}
125
- onChange={(e) => update({ avgResourceCapacity: e.target.value })}
126
- />
127
- </div>
128
-
129
- {/* Average Slot Duration */}
130
- <div className="flex flex-col gap-2">
131
- <Label htmlFor="avgSlotDuration">Average Slot Duration</Label>
132
- <Input
133
- id="avgSlotDuration"
134
- type="number"
135
- value={data.avgSlotDuration}
136
- onChange={(e) => update({ avgSlotDuration: e.target.value })}
137
- />
138
- <span className="text-label-secondary text-xs">Duration in minutes</span>
139
- </div>
140
-
141
- {/* Service Time */}
142
- <div className="flex flex-col gap-2">
143
- <Label htmlFor="zoneServiceTime">Service Time</Label>
144
- <Input
145
- id="zoneServiceTime"
146
- type="number"
147
- value={data.zoneServiceTime}
148
- onChange={(e) => update({ zoneServiceTime: e.target.value })}
149
- />
150
- <span className="text-label-secondary text-xs">Service time in minutes</span>
151
- </div>
152
-
153
- {/* Description */}
154
- <div className="flex flex-col gap-2">
155
- <div className="flex items-center justify-between">
156
- <Label htmlFor="legacyDescription">Description</Label>
157
- <span className="text-label-secondary text-xs">(optional)</span>
158
- </div>
159
- <Textarea
160
- id="legacyDescription"
161
- value={data.description}
162
- onChange={(e) => update({ description: e.target.value })}
163
- rows={3}
164
- />
165
- </div>
166
-
167
- {/* Start Times */}
168
- <div className="flex flex-col gap-1">
169
- <Label className="text-sm font-semibold">Start Times</Label>
170
- <p className="text-label-secondary text-sm">Configure session start time intervals</p>
171
- </div>
172
-
173
- <label className="flex items-center gap-2 cursor-pointer">
174
- <Switch
175
- checked={data.sameStartTimesEveryDay}
176
- onCheckedChange={(checked) => {
177
- const periods = getPeriodsOrDefault().map(p => ({
178
- ...p,
179
- days: checked ? undefined : (p.days || []),
180
- }));
181
- update({
182
- sameStartTimesEveryDay: checked,
183
- startTimePeriods: periods,
184
- });
185
- }}
186
- />
187
- <span className="text-sm font-medium leading-none">Same start times every day</span>
188
- </label>
189
-
190
- <div className="flex flex-col gap-4">
191
- {getPeriodsOrDefault().map((period, index) => (
192
- <div key={index} className="flex flex-col gap-3 p-4 rounded-lg bg-surface-secondary">
193
- <div className="flex items-center justify-between">
194
- <span className="text-label-primary text-sm font-semibold">Period {index + 1}</span>
195
- {data.startTimePeriods.length > 1 && (
196
- <Button
197
- type="button"
198
- variant="ghost"
199
- size="icon"
200
- onClick={() => removePeriod(index)}
201
- className="h-8 w-8 bg-surface-danger-soft border-transparent hover:!bg-surface-danger-soft-hover [&_path]:fill-fill-danger"
202
- >
203
- <IconDelete className="w-4 h-4" />
204
- </Button>
205
- )}
206
- </div>
207
-
208
- <div className="flex flex-col gap-2">
209
- <Label>Sessions every</Label>
210
- <div className="flex items-center gap-2">
211
- <Input
212
- type="number"
213
- min={5}
214
- value={period.intervalMinutes}
215
- onChange={(e) => updatePeriod(index, { intervalMinutes: e.target.value })}
216
- className="w-24"
217
- />
218
- <span className="text-label-secondary text-sm">minutes</span>
219
- </div>
220
- </div>
221
-
222
- <div className="grid grid-cols-2 gap-4">
223
- <div className="flex flex-col gap-2">
224
- <Label>From</Label>
225
- <Input
226
- type="time"
227
- value={period.fromTime}
228
- onChange={(e) => updatePeriod(index, { fromTime: e.target.value })}
229
- />
230
- </div>
231
- <div className="flex flex-col gap-2">
232
- <Label>To</Label>
233
- <Input
234
- type="time"
235
- value={period.toTime}
236
- onChange={(e) => updatePeriod(index, { toTime: e.target.value })}
237
- />
238
- </div>
239
- </div>
240
-
241
- {/* Day checkboxes when not same every day */}
242
- {!data.sameStartTimesEveryDay && (
243
- <div className="flex flex-col gap-2">
244
- <Label className="text-sm font-semibold">Days</Label>
245
- <div className="grid grid-cols-2 gap-2">
246
- <div className="flex flex-col gap-2">
247
- {DAY_OPTIONS.slice(0, 4).map(day => (
248
- <label key={day} className="flex items-center gap-1.5">
249
- <Checkbox
250
- checked={(period.days || []).includes(day)}
251
- onCheckedChange={() => togglePeriodDay(index, day)}
252
- />
253
- <span className="text-label-primary text-sm">{day}</span>
254
- </label>
255
- ))}
256
- </div>
257
- <div className="flex flex-col gap-2">
258
- {DAY_OPTIONS.slice(4).map(day => (
259
- <label key={day} className="flex items-center gap-1.5">
260
- <Checkbox
261
- checked={(period.days || []).includes(day)}
262
- onCheckedChange={() => togglePeriodDay(index, day)}
263
- />
264
- <span className="text-label-primary text-sm">{day}</span>
265
- </label>
266
- ))}
267
- </div>
268
- </div>
269
- </div>
270
- )}
271
- </div>
272
- ))}
273
-
274
- <Button
275
- type="button"
276
- variant="ghost"
277
- withIcon
278
- onClick={addPeriod}
279
- className="self-start"
280
- >
281
- <IconPlus size={16} />
282
- Add Time Period
283
- </Button>
284
- </div>
285
- </>
286
- );
287
- };
288
-
289
- export const getDefaultLegacyData = (): LegacyZoneSettingsData => ({
290
- zoneType: 'regular',
291
- avgResourceCapacity: '',
292
- avgSlotDuration: '',
293
- zoneServiceTime: '',
294
- description: '',
295
- sameStartTimesEveryDay: true,
296
- startTimePeriods: [{ intervalMinutes: '15', fromTime: '09:00', toTime: '17:00' }],
297
- });
298
-
299
- export default LegacyZoneSettings;
@@ -1,63 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react'
2
- import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from './accordion'
3
-
4
- export default {
5
- title: 'v2/Shadcn/Accordion',
6
- component: Accordion,
7
- parameters: { layout: 'padded' },
8
- } as Meta<typeof Accordion>
9
-
10
- type Story = StoryObj<typeof Accordion>
11
-
12
- export const Default: Story = {
13
- render: () => (
14
- <Accordion type="single" collapsible className="w-full max-w-md">
15
- <AccordionItem value="item-1">
16
- <AccordionTrigger>Is it accessible?</AccordionTrigger>
17
- <AccordionContent>Yes. It adheres to the WAI-ARIA design pattern.</AccordionContent>
18
- </AccordionItem>
19
- <AccordionItem value="item-2">
20
- <AccordionTrigger>Is it styled?</AccordionTrigger>
21
- <AccordionContent>Yes. It comes with default styles that match your design system.</AccordionContent>
22
- </AccordionItem>
23
- <AccordionItem value="item-3">
24
- <AccordionTrigger>Is it animated?</AccordionTrigger>
25
- <AccordionContent>Yes. It uses CSS animations for smooth open/close transitions.</AccordionContent>
26
- </AccordionItem>
27
- </Accordion>
28
- ),
29
- }
30
-
31
- export const Multiple: Story = {
32
- render: () => (
33
- <Accordion type="multiple" className="w-full max-w-md">
34
- <AccordionItem value="item-1">
35
- <AccordionTrigger>First section</AccordionTrigger>
36
- <AccordionContent>Content for the first section.</AccordionContent>
37
- </AccordionItem>
38
- <AccordionItem value="item-2">
39
- <AccordionTrigger>Second section</AccordionTrigger>
40
- <AccordionContent>Content for the second section.</AccordionContent>
41
- </AccordionItem>
42
- <AccordionItem value="item-3">
43
- <AccordionTrigger>Third section</AccordionTrigger>
44
- <AccordionContent>Content for the third section.</AccordionContent>
45
- </AccordionItem>
46
- </Accordion>
47
- ),
48
- }
49
-
50
- export const DefaultOpen: Story = {
51
- render: () => (
52
- <Accordion type="single" collapsible defaultValue="item-1" className="w-full max-w-md">
53
- <AccordionItem value="item-1">
54
- <AccordionTrigger>Open by default</AccordionTrigger>
55
- <AccordionContent>This accordion item is open by default.</AccordionContent>
56
- </AccordionItem>
57
- <AccordionItem value="item-2">
58
- <AccordionTrigger>Closed by default</AccordionTrigger>
59
- <AccordionContent>This accordion item starts closed.</AccordionContent>
60
- </AccordionItem>
61
- </Accordion>
62
- ),
63
- }
@@ -1,52 +0,0 @@
1
- import * as React from "react";
2
- import * as AccordionPrimitive from "@radix-ui/react-accordion";
3
- import { IconChevronDown } from "../../../icons";
4
-
5
- import { cn } from "../../lib/utils";
6
-
7
- const Accordion = AccordionPrimitive.Root;
8
-
9
- const AccordionItem = React.forwardRef<
10
- React.ElementRef<typeof AccordionPrimitive.Item>,
11
- React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
12
- >(({ className, ...props }, ref) => (
13
- <AccordionPrimitive.Item ref={ref} className={cn("border-b", className)} {...props} />
14
- ));
15
- AccordionItem.displayName = "AccordionItem";
16
-
17
- const AccordionTrigger = React.forwardRef<
18
- React.ElementRef<typeof AccordionPrimitive.Trigger>,
19
- React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
20
- >(({ className, children, ...props }, ref) => (
21
- <AccordionPrimitive.Header className="flex">
22
- <AccordionPrimitive.Trigger
23
- ref={ref}
24
- className={cn(
25
- "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
26
- className,
27
- )}
28
- {...props}
29
- >
30
- {children}
31
- <IconChevronDown className="h-4 w-4 shrink-0 fill-fill-primary transition-transform duration-200" />
32
- </AccordionPrimitive.Trigger>
33
- </AccordionPrimitive.Header>
34
- ));
35
- AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
36
-
37
- const AccordionContent = React.forwardRef<
38
- React.ElementRef<typeof AccordionPrimitive.Content>,
39
- React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
40
- >(({ className, children, ...props }, ref) => (
41
- <AccordionPrimitive.Content
42
- ref={ref}
43
- className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
44
- {...props}
45
- >
46
- <div className={cn("pb-4 pt-0", className)}>{children}</div>
47
- </AccordionPrimitive.Content>
48
- ));
49
-
50
- AccordionContent.displayName = AccordionPrimitive.Content.displayName;
51
-
52
- export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -1,44 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react'
2
- import {
3
- AlertDialog,
4
- AlertDialogTrigger,
5
- AlertDialogContent,
6
- AlertDialogHeader,
7
- AlertDialogFooter,
8
- AlertDialogTitle,
9
- AlertDialogDescription,
10
- AlertDialogAction,
11
- AlertDialogCancel,
12
- } from './alert-dialog'
13
- import { Button } from './button'
14
-
15
- export default {
16
- title: 'v2/Shadcn/AlertDialog',
17
- component: AlertDialog,
18
- parameters: { layout: 'padded' },
19
- } as Meta<typeof AlertDialog>
20
-
21
- type Story = StoryObj<typeof AlertDialog>
22
-
23
- export const Default: Story = {
24
- render: () => (
25
- <AlertDialog>
26
- <AlertDialogTrigger asChild>
27
- <Button variant="outline">Delete Account</Button>
28
- </AlertDialogTrigger>
29
- <AlertDialogContent>
30
- <AlertDialogHeader>
31
- <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
32
- <AlertDialogDescription>
33
- This action cannot be undone. This will permanently delete your account and remove your data from our
34
- servers.
35
- </AlertDialogDescription>
36
- </AlertDialogHeader>
37
- <AlertDialogFooter>
38
- <AlertDialogCancel>Cancel</AlertDialogCancel>
39
- <AlertDialogAction>Continue</AlertDialogAction>
40
- </AlertDialogFooter>
41
- </AlertDialogContent>
42
- </AlertDialog>
43
- ),
44
- }
@@ -1,104 +0,0 @@
1
- import * as React from "react";
2
- import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
-
4
- import { cn } from "../../lib/utils";
5
- import { buttonVariants } from "./button";
6
-
7
- const AlertDialog = AlertDialogPrimitive.Root;
8
-
9
- const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
10
-
11
- const AlertDialogPortal = AlertDialogPrimitive.Portal;
12
-
13
- const AlertDialogOverlay = React.forwardRef<
14
- React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
15
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
16
- >(({ className, ...props }, ref) => (
17
- <AlertDialogPrimitive.Overlay
18
- className={cn(
19
- "fixed inset-0 z-50 bg-shade-darker/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
20
- className,
21
- )}
22
- {...props}
23
- ref={ref}
24
- />
25
- ));
26
- AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
27
-
28
- const AlertDialogContent = React.forwardRef<
29
- React.ElementRef<typeof AlertDialogPrimitive.Content>,
30
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
31
- >(({ className, ...props }, ref) => (
32
- <AlertDialogPortal>
33
- <AlertDialogOverlay />
34
- <AlertDialogPrimitive.Content
35
- ref={ref}
36
- className={cn(
37
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border-primary bg-surface-primary p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
38
- className,
39
- )}
40
- {...props}
41
- />
42
- </AlertDialogPortal>
43
- ));
44
- AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
45
-
46
- const AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
47
- <div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props} />
48
- );
49
- AlertDialogHeader.displayName = "AlertDialogHeader";
50
-
51
- const AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
52
- <div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props} />
53
- );
54
- AlertDialogFooter.displayName = "AlertDialogFooter";
55
-
56
- const AlertDialogTitle = React.forwardRef<
57
- React.ElementRef<typeof AlertDialogPrimitive.Title>,
58
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
59
- >(({ className, ...props }, ref) => (
60
- <AlertDialogPrimitive.Title ref={ref} className={cn("text-lg font-semibold text-label-primary", className)} {...props} />
61
- ));
62
- AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
63
-
64
- const AlertDialogDescription = React.forwardRef<
65
- React.ElementRef<typeof AlertDialogPrimitive.Description>,
66
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
67
- >(({ className, ...props }, ref) => (
68
- <AlertDialogPrimitive.Description ref={ref} className={cn("text-sm text-label-secondary", className)} {...props} />
69
- ));
70
- AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
71
-
72
- const AlertDialogAction = React.forwardRef<
73
- React.ElementRef<typeof AlertDialogPrimitive.Action>,
74
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
75
- >(({ className, ...props }, ref) => (
76
- <AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />
77
- ));
78
- AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
79
-
80
- const AlertDialogCancel = React.forwardRef<
81
- React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
82
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
83
- >(({ className, ...props }, ref) => (
84
- <AlertDialogPrimitive.Cancel
85
- ref={ref}
86
- className={cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className)}
87
- {...props}
88
- />
89
- ));
90
- AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
91
-
92
- export {
93
- AlertDialog,
94
- AlertDialogPortal,
95
- AlertDialogOverlay,
96
- AlertDialogTrigger,
97
- AlertDialogContent,
98
- AlertDialogHeader,
99
- AlertDialogFooter,
100
- AlertDialogTitle,
101
- AlertDialogDescription,
102
- AlertDialogAction,
103
- AlertDialogCancel,
104
- };
@@ -1,44 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react'
2
- import { Alert, AlertTitle, AlertDescription } from './alert'
3
-
4
- export default {
5
- title: 'v2/Shadcn/Alert',
6
- component: Alert,
7
- parameters: { layout: 'padded' },
8
- } as Meta<typeof Alert>
9
-
10
- type Story = StoryObj<typeof Alert>
11
-
12
- export const Default: Story = {
13
- render: () => (
14
- <Alert>
15
- <AlertTitle>Heads up!</AlertTitle>
16
- <AlertDescription>You can add components to your app using the CLI.</AlertDescription>
17
- </Alert>
18
- ),
19
- }
20
-
21
- export const Destructive: Story = {
22
- render: () => (
23
- <Alert variant="destructive">
24
- <AlertTitle>Error</AlertTitle>
25
- <AlertDescription>Your session has expired. Please log in again.</AlertDescription>
26
- </Alert>
27
- ),
28
- }
29
-
30
- export const TitleOnly: Story = {
31
- render: () => (
32
- <Alert>
33
- <AlertTitle>Note: This action cannot be undone.</AlertTitle>
34
- </Alert>
35
- ),
36
- }
37
-
38
- export const DescriptionOnly: Story = {
39
- render: () => (
40
- <Alert>
41
- <AlertDescription>Your changes have been saved successfully.</AlertDescription>
42
- </Alert>
43
- ),
44
- }
@@ -1,43 +0,0 @@
1
- import * as React from "react";
2
- import { cva, type VariantProps } from "class-variance-authority";
3
-
4
- import { cn } from "../../lib/utils";
5
-
6
- const alertVariants = cva(
7
- "relative w-full rounded-lg border border-border-primary p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-label-primary",
8
- {
9
- variants: {
10
- variant: {
11
- default: "bg-surface-primary text-label-primary",
12
- destructive: "border-fill-danger/50 text-label-danger dark:border-fill-danger [&>svg]:text-label-danger",
13
- },
14
- },
15
- defaultVariants: {
16
- variant: "default",
17
- },
18
- },
19
- );
20
-
21
- const Alert = React.forwardRef<
22
- HTMLDivElement,
23
- React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
24
- >(({ className, variant, ...props }, ref) => (
25
- <div ref={ref} role="alert" className={cn(alertVariants({ variant }), className)} {...props} />
26
- ));
27
- Alert.displayName = "Alert";
28
-
29
- const AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
30
- ({ className, ...props }, ref) => (
31
- <h5 ref={ref} className={cn("mb-1 font-medium leading-none tracking-tight", className)} {...props} />
32
- ),
33
- );
34
- AlertTitle.displayName = "AlertTitle";
35
-
36
- const AlertDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
37
- ({ className, ...props }, ref) => (
38
- <div ref={ref} className={cn("text-sm [&_p]:leading-relaxed", className)} {...props} />
39
- ),
40
- );
41
- AlertDescription.displayName = "AlertDescription";
42
-
43
- export { Alert, AlertTitle, AlertDescription };