@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,111 +0,0 @@
1
- import * as React from "react";
2
- import * as ToastPrimitives from "@radix-ui/react-toast";
3
- import { cva, type VariantProps } from "class-variance-authority";
4
- import { IconCross } from "../../../icons";
5
-
6
- import { cn } from "../../lib/utils";
7
-
8
- const ToastProvider = ToastPrimitives.Provider;
9
-
10
- const ToastViewport = React.forwardRef<
11
- React.ElementRef<typeof ToastPrimitives.Viewport>,
12
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>
13
- >(({ className, ...props }, ref) => (
14
- <ToastPrimitives.Viewport
15
- ref={ref}
16
- className={cn(
17
- "fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
18
- className,
19
- )}
20
- {...props}
21
- />
22
- ));
23
- ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
24
-
25
- const toastVariants = cva(
26
- "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border border-border-primary p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
27
- {
28
- variants: {
29
- variant: {
30
- default: "bg-surface-primary text-label-primary",
31
- destructive: "destructive group border-fill-danger bg-fill-danger text-label-white",
32
- },
33
- },
34
- defaultVariants: {
35
- variant: "default",
36
- },
37
- },
38
- );
39
-
40
- const Toast = React.forwardRef<
41
- React.ElementRef<typeof ToastPrimitives.Root>,
42
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> & VariantProps<typeof toastVariants>
43
- >(({ className, variant, ...props }, ref) => {
44
- return <ToastPrimitives.Root ref={ref} className={cn(toastVariants({ variant }), className)} {...props} />;
45
- });
46
- Toast.displayName = ToastPrimitives.Root.displayName;
47
-
48
- const ToastAction = React.forwardRef<
49
- React.ElementRef<typeof ToastPrimitives.Action>,
50
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>
51
- >(({ className, ...props }, ref) => (
52
- <ToastPrimitives.Action
53
- ref={ref}
54
- className={cn(
55
- "inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-border-primary bg-transparent px-3 text-sm font-medium ring-offset-surface-primary transition-colors hover:bg-surface-secondary group-[.destructive]:border-border-primary/40 group-[.destructive]:hover:border-fill-danger/30 group-[.destructive]:hover:bg-fill-danger group-[.destructive]:hover:text-label-white focus:outline-none focus:ring-2 focus:ring-actions-regular focus:ring-offset-2 group-[.destructive]:focus:ring-fill-danger disabled:pointer-events-none disabled:opacity-50",
56
- className,
57
- )}
58
- {...props}
59
- />
60
- ));
61
- ToastAction.displayName = ToastPrimitives.Action.displayName;
62
-
63
- const ToastClose = React.forwardRef<
64
- React.ElementRef<typeof ToastPrimitives.Close>,
65
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>
66
- >(({ className, ...props }, ref) => (
67
- <ToastPrimitives.Close
68
- ref={ref}
69
- className={cn(
70
- "absolute right-2 top-2 rounded-md p-1 text-label-primary/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-label-white/50 hover:text-label-primary group-[.destructive]:hover:text-label-white focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-fill-danger group-[.destructive]:focus:ring-offset-fill-danger",
71
- className,
72
- )}
73
- toast-close=""
74
- {...props}
75
- >
76
- <IconCross className="h-4 w-4 fill-fill-primary" />
77
- </ToastPrimitives.Close>
78
- ));
79
- ToastClose.displayName = ToastPrimitives.Close.displayName;
80
-
81
- const ToastTitle = React.forwardRef<
82
- React.ElementRef<typeof ToastPrimitives.Title>,
83
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>
84
- >(({ className, ...props }, ref) => (
85
- <ToastPrimitives.Title ref={ref} className={cn("text-sm font-semibold", className)} {...props} />
86
- ));
87
- ToastTitle.displayName = ToastPrimitives.Title.displayName;
88
-
89
- const ToastDescription = React.forwardRef<
90
- React.ElementRef<typeof ToastPrimitives.Description>,
91
- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>
92
- >(({ className, ...props }, ref) => (
93
- <ToastPrimitives.Description ref={ref} className={cn("text-sm opacity-90", className)} {...props} />
94
- ));
95
- ToastDescription.displayName = ToastPrimitives.Description.displayName;
96
-
97
- type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
98
-
99
- type ToastActionElement = React.ReactElement<typeof ToastAction>;
100
-
101
- export {
102
- type ToastProps,
103
- type ToastActionElement,
104
- ToastProvider,
105
- ToastViewport,
106
- Toast,
107
- ToastTitle,
108
- ToastDescription,
109
- ToastClose,
110
- ToastAction,
111
- };
@@ -1,46 +0,0 @@
1
- import React from 'react'
2
- import type { Meta, StoryObj } from '@storybook/react'
3
- import { Toaster } from './toaster'
4
- import { Button } from './button'
5
- import { toast } from '../../hooks/use-toast'
6
-
7
- export default {
8
- title: 'v2/Shadcn/Toaster',
9
- component: Toaster,
10
- parameters: { layout: 'padded' },
11
- } as Meta<typeof Toaster>
12
-
13
- type Story = StoryObj<typeof Toaster>
14
-
15
- export const Default: Story = {
16
- render: () => (
17
- <div>
18
- <div className="flex gap-2 flex-wrap">
19
- <Button
20
- variant="outline"
21
- onClick={() => {
22
- toast({
23
- title: 'Event created',
24
- description: 'Your event has been created successfully.',
25
- })
26
- }}
27
- >
28
- Show Toast
29
- </Button>
30
- <Button
31
- variant="destructive"
32
- onClick={() => {
33
- toast({
34
- variant: 'destructive',
35
- title: 'Uh oh! Something went wrong.',
36
- description: 'There was a problem with your request.',
37
- })
38
- }}
39
- >
40
- Show Destructive Toast
41
- </Button>
42
- </div>
43
- <Toaster />
44
- </div>
45
- ),
46
- }
@@ -1,24 +0,0 @@
1
- import { useToast } from "../../hooks/use-toast";
2
- import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from "./toast";
3
-
4
- export function Toaster() {
5
- const { toasts } = useToast();
6
-
7
- return (
8
- <ToastProvider>
9
- {toasts.map(function ({ id, title, description, action, ...props }) {
10
- return (
11
- <Toast key={id} {...props}>
12
- <div className="grid gap-1">
13
- {title && <ToastTitle>{title}</ToastTitle>}
14
- {description && <ToastDescription>{description}</ToastDescription>}
15
- </div>
16
- {action}
17
- <ToastClose />
18
- </Toast>
19
- );
20
- })}
21
- <ToastViewport />
22
- </ToastProvider>
23
- );
24
- }
@@ -1,95 +0,0 @@
1
- import React from 'react'
2
- import type { Meta, StoryObj } from '@storybook/react'
3
- import { ToggleGroup, ToggleGroupItem } from './toggle-group'
4
-
5
- function ToggleGroupSingle() {
6
- return (
7
- <ToggleGroup type="single">
8
- <ToggleGroupItem value="left">Left</ToggleGroupItem>
9
- <ToggleGroupItem value="center">Center</ToggleGroupItem>
10
- <ToggleGroupItem value="right">Right</ToggleGroupItem>
11
- </ToggleGroup>
12
- )
13
- }
14
-
15
- function ToggleGroupMultiple() {
16
- return (
17
- <ToggleGroup type="multiple">
18
- <ToggleGroupItem value="bold">Bold</ToggleGroupItem>
19
- <ToggleGroupItem value="italic">Italic</ToggleGroupItem>
20
- <ToggleGroupItem value="underline">Underline</ToggleGroupItem>
21
- </ToggleGroup>
22
- )
23
- }
24
-
25
- function ToggleGroupOutline() {
26
- return (
27
- <ToggleGroup type="single" variant="outline">
28
- <ToggleGroupItem value="a">A</ToggleGroupItem>
29
- <ToggleGroupItem value="b">B</ToggleGroupItem>
30
- <ToggleGroupItem value="c">C</ToggleGroupItem>
31
- </ToggleGroup>
32
- )
33
- }
34
-
35
- function ToggleGroupSmall() {
36
- return (
37
- <ToggleGroup type="single" size="sm">
38
- <ToggleGroupItem value="1">1</ToggleGroupItem>
39
- <ToggleGroupItem value="2">2</ToggleGroupItem>
40
- <ToggleGroupItem value="3">3</ToggleGroupItem>
41
- </ToggleGroup>
42
- )
43
- }
44
-
45
- function ToggleGroupLarge() {
46
- return (
47
- <ToggleGroup type="single" size="lg">
48
- <ToggleGroupItem value="x">X</ToggleGroupItem>
49
- <ToggleGroupItem value="y">Y</ToggleGroupItem>
50
- <ToggleGroupItem value="z">Z</ToggleGroupItem>
51
- </ToggleGroup>
52
- )
53
- }
54
-
55
- function ToggleGroupDisabled() {
56
- return (
57
- <ToggleGroup type="single" disabled>
58
- <ToggleGroupItem value="a">A</ToggleGroupItem>
59
- <ToggleGroupItem value="b">B</ToggleGroupItem>
60
- <ToggleGroupItem value="c">C</ToggleGroupItem>
61
- </ToggleGroup>
62
- )
63
- }
64
-
65
- export default {
66
- title: 'v2/Shadcn/ToggleGroup',
67
- component: ToggleGroup,
68
- parameters: { layout: 'padded' },
69
- } as Meta<typeof ToggleGroup>
70
-
71
- type Story = StoryObj<typeof ToggleGroup>
72
-
73
- export const Single: Story = {
74
- render: () => React.createElement(ToggleGroupSingle),
75
- }
76
-
77
- export const Multiple: Story = {
78
- render: () => React.createElement(ToggleGroupMultiple),
79
- }
80
-
81
- export const Outline: Story = {
82
- render: () => React.createElement(ToggleGroupOutline),
83
- }
84
-
85
- export const Small: Story = {
86
- render: () => React.createElement(ToggleGroupSmall),
87
- }
88
-
89
- export const Large: Story = {
90
- render: () => React.createElement(ToggleGroupLarge),
91
- }
92
-
93
- export const Disabled: Story = {
94
- render: () => React.createElement(ToggleGroupDisabled),
95
- }
@@ -1,49 +0,0 @@
1
- import * as React from "react";
2
- import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
3
- import { type VariantProps } from "class-variance-authority";
4
-
5
- import { cn } from "../../lib/utils";
6
- import { toggleVariants } from "./toggle";
7
-
8
- const ToggleGroupContext = React.createContext<VariantProps<typeof toggleVariants>>({
9
- size: "default",
10
- variant: "default",
11
- });
12
-
13
- const ToggleGroup = React.forwardRef<
14
- React.ElementRef<typeof ToggleGroupPrimitive.Root>,
15
- React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>
16
- >(({ className, variant, size, children, ...props }, ref) => (
17
- <ToggleGroupPrimitive.Root ref={ref} className={cn("flex items-center justify-center gap-1", className)} {...props}>
18
- <ToggleGroupContext.Provider value={{ variant, size }}>{children}</ToggleGroupContext.Provider>
19
- </ToggleGroupPrimitive.Root>
20
- ));
21
-
22
- ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
23
-
24
- const ToggleGroupItem = React.forwardRef<
25
- React.ElementRef<typeof ToggleGroupPrimitive.Item>,
26
- React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>
27
- >(({ className, children, variant, size, ...props }, ref) => {
28
- const context = React.useContext(ToggleGroupContext);
29
-
30
- return (
31
- <ToggleGroupPrimitive.Item
32
- ref={ref}
33
- className={cn(
34
- toggleVariants({
35
- variant: context.variant || variant,
36
- size: context.size || size,
37
- }),
38
- className,
39
- )}
40
- {...props}
41
- >
42
- {children}
43
- </ToggleGroupPrimitive.Item>
44
- );
45
- });
46
-
47
- ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
48
-
49
- export { ToggleGroup, ToggleGroupItem };
@@ -1,18 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react'
2
- import { Toggle } from './toggle'
3
-
4
- export default {
5
- title: 'v2/Shadcn/Toggle',
6
- component: Toggle,
7
- parameters: { layout: 'padded' },
8
- } as Meta<typeof Toggle>
9
-
10
- type Story = StoryObj<typeof Toggle>
11
-
12
- export const Default: Story = { args: { children: 'Toggle' } }
13
- export const Outline: Story = { args: { children: 'Outline', variant: 'outline' } }
14
- export const Small: Story = { args: { children: 'Small', size: 'sm' } }
15
- export const Large: Story = { args: { children: 'Large', size: 'lg' } }
16
- export const Disabled: Story = { args: { children: 'Disabled', disabled: true } }
17
- export const Pressed: Story = { args: { children: 'Pressed', defaultPressed: true } }
18
- export const OutlinePressed: Story = { args: { children: 'Outline Pressed', variant: 'outline', defaultPressed: true } }
@@ -1,37 +0,0 @@
1
- import * as React from "react";
2
- import * as TogglePrimitive from "@radix-ui/react-toggle";
3
- import { cva, type VariantProps } from "class-variance-authority";
4
-
5
- import { cn } from "../../lib/utils";
6
-
7
- const toggleVariants = cva(
8
- "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-surface-primary transition-colors hover:bg-surface-secondary hover:text-label-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-actions-regular focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-surface-primary-hover data-[state=on]:text-label-primary",
9
- {
10
- variants: {
11
- variant: {
12
- default: "bg-transparent",
13
- outline: "border border-border-primary bg-transparent hover:bg-surface-primary-hover hover:text-label-primary",
14
- },
15
- size: {
16
- default: "h-10 px-3",
17
- sm: "h-9 px-2.5",
18
- lg: "h-11 px-5",
19
- },
20
- },
21
- defaultVariants: {
22
- variant: "default",
23
- size: "default",
24
- },
25
- },
26
- );
27
-
28
- const Toggle = React.forwardRef<
29
- React.ElementRef<typeof TogglePrimitive.Root>,
30
- React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>
31
- >(({ className, variant, size, ...props }, ref) => (
32
- <TogglePrimitive.Root ref={ref} className={cn(toggleVariants({ variant, size, className }))} {...props} />
33
- ));
34
-
35
- Toggle.displayName = TogglePrimitive.Root.displayName;
36
-
37
- export { Toggle, toggleVariants };
@@ -1,57 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react'
2
- import { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from './tooltip'
3
- import { Button } from './button'
4
-
5
- export default {
6
- title: 'v2/Shadcn/Tooltip',
7
- component: Tooltip,
8
- parameters: { layout: 'padded' },
9
- decorators: [
10
- (Story) => (
11
- <TooltipProvider>
12
- <Story />
13
- </TooltipProvider>
14
- ),
15
- ],
16
- } as Meta<typeof Tooltip>
17
-
18
- type Story = StoryObj<typeof Tooltip>
19
-
20
- export const Default: Story = {
21
- render: () => (
22
- <Tooltip>
23
- <TooltipTrigger asChild>
24
- <Button variant="outline">Hover me</Button>
25
- </TooltipTrigger>
26
- <TooltipContent>
27
- <p>This is a tooltip</p>
28
- </TooltipContent>
29
- </Tooltip>
30
- ),
31
- }
32
-
33
- export const Top: Story = {
34
- render: () => (
35
- <Tooltip>
36
- <TooltipTrigger asChild>
37
- <Button variant="outline">Top tooltip</Button>
38
- </TooltipTrigger>
39
- <TooltipContent side="top">
40
- <p>Shown on top</p>
41
- </TooltipContent>
42
- </Tooltip>
43
- ),
44
- }
45
-
46
- export const Bottom: Story = {
47
- render: () => (
48
- <Tooltip>
49
- <TooltipTrigger asChild>
50
- <Button variant="outline">Bottom tooltip</Button>
51
- </TooltipTrigger>
52
- <TooltipContent side="bottom">
53
- <p>Shown on bottom</p>
54
- </TooltipContent>
55
- </Tooltip>
56
- ),
57
- }
@@ -1,28 +0,0 @@
1
- import * as React from "react";
2
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3
-
4
- import { cn } from "../../lib/utils";
5
-
6
- const TooltipProvider = TooltipPrimitive.Provider;
7
-
8
- const Tooltip = TooltipPrimitive.Root;
9
-
10
- const TooltipTrigger = TooltipPrimitive.Trigger;
11
-
12
- const TooltipContent = React.forwardRef<
13
- React.ElementRef<typeof TooltipPrimitive.Content>,
14
- React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
15
- >(({ className, sideOffset = 4, ...props }, ref) => (
16
- <TooltipPrimitive.Content
17
- ref={ref}
18
- sideOffset={sideOffset}
19
- className={cn(
20
- "z-50 overflow-hidden rounded-md border border-border-primary bg-surface-primary px-3 py-1.5 text-sm text-label-primary shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
21
- className,
22
- )}
23
- {...props}
24
- />
25
- ));
26
- TooltipContent.displayName = TooltipPrimitive.Content.displayName;
27
-
28
- export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -1,3 +0,0 @@
1
- import { useToast, toast } from '../../hooks/use-toast';
2
-
3
- export { useToast, toast };
@@ -1,19 +0,0 @@
1
- import * as React from "react";
2
-
3
- const MOBILE_BREAKPOINT = 768;
4
-
5
- export function useIsMobile() {
6
- const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);
7
-
8
- React.useEffect(() => {
9
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
10
- const onChange = () => {
11
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
12
- };
13
- mql.addEventListener("change", onChange);
14
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
15
- return () => mql.removeEventListener("change", onChange);
16
- }, []);
17
-
18
- return !!isMobile;
19
- }
@@ -1,184 +0,0 @@
1
- import * as React from "react";
2
-
3
- import type { ToastActionElement, ToastProps } from "../components/ui/toast";
4
-
5
- const TOAST_LIMIT = 1;
6
- const TOAST_REMOVE_DELAY = 1000000;
7
-
8
- type ToasterToast = ToastProps & {
9
- id: string;
10
- title?: React.ReactNode;
11
- description?: React.ReactNode;
12
- action?: ToastActionElement;
13
- };
14
-
15
- const actionTypes = {
16
- ADD_TOAST: "ADD_TOAST",
17
- UPDATE_TOAST: "UPDATE_TOAST",
18
- DISMISS_TOAST: "DISMISS_TOAST",
19
- REMOVE_TOAST: "REMOVE_TOAST",
20
- } as const;
21
-
22
- let count = 0;
23
-
24
- function genId() {
25
- count = (count + 1) % Number.MAX_SAFE_INTEGER;
26
- return count.toString();
27
- }
28
-
29
- type ActionType = typeof actionTypes;
30
-
31
- type Action =
32
- | {
33
- type: ActionType["ADD_TOAST"];
34
- toast: ToasterToast;
35
- }
36
- | {
37
- type: ActionType["UPDATE_TOAST"];
38
- toast: Partial<ToasterToast>;
39
- }
40
- | {
41
- type: ActionType["DISMISS_TOAST"];
42
- toastId?: ToasterToast["id"];
43
- }
44
- | {
45
- type: ActionType["REMOVE_TOAST"];
46
- toastId?: ToasterToast["id"];
47
- };
48
-
49
- interface State {
50
- toasts: ToasterToast[];
51
- }
52
-
53
- const toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>();
54
-
55
- const addToRemoveQueue = (toastId: string) => {
56
- if (toastTimeouts.has(toastId)) {
57
- return;
58
- }
59
-
60
- const timeout = setTimeout(() => {
61
- toastTimeouts.delete(toastId);
62
- dispatch({
63
- type: "REMOVE_TOAST",
64
- toastId: toastId,
65
- });
66
- }, TOAST_REMOVE_DELAY);
67
-
68
- toastTimeouts.set(toastId, timeout);
69
- };
70
-
71
- export const reducer = (state: State, action: Action): State => {
72
- switch (action.type) {
73
- case "ADD_TOAST":
74
- return {
75
- ...state,
76
- toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
77
- };
78
-
79
- case "UPDATE_TOAST":
80
- return {
81
- ...state,
82
- toasts: state.toasts.map((t) => (t.id === action.toast.id ? { ...t, ...action.toast } : t)),
83
- };
84
-
85
- case "DISMISS_TOAST": {
86
- const { toastId } = action;
87
-
88
- if (toastId) {
89
- addToRemoveQueue(toastId);
90
- } else {
91
- state.toasts.forEach((toast) => {
92
- addToRemoveQueue(toast.id);
93
- });
94
- }
95
-
96
- return {
97
- ...state,
98
- toasts: state.toasts.map((t) =>
99
- t.id === toastId || toastId === undefined
100
- ? {
101
- ...t,
102
- open: false,
103
- }
104
- : t,
105
- ),
106
- };
107
- }
108
- case "REMOVE_TOAST":
109
- if (action.toastId === undefined) {
110
- return {
111
- ...state,
112
- toasts: [],
113
- };
114
- }
115
- return {
116
- ...state,
117
- toasts: state.toasts.filter((t) => t.id !== action.toastId),
118
- };
119
- }
120
- };
121
-
122
- const listeners: Array<(state: State) => void> = [];
123
-
124
- let memoryState: State = { toasts: [] };
125
-
126
- function dispatch(action: Action) {
127
- memoryState = reducer(memoryState, action);
128
- listeners.forEach((listener) => {
129
- listener(memoryState);
130
- });
131
- }
132
-
133
- type Toast = Omit<ToasterToast, "id">;
134
-
135
- function toast({ ...props }: Toast) {
136
- const id = genId();
137
-
138
- const update = (props: ToasterToast) =>
139
- dispatch({
140
- type: "UPDATE_TOAST",
141
- toast: { ...props, id },
142
- });
143
- const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
144
-
145
- dispatch({
146
- type: "ADD_TOAST",
147
- toast: {
148
- ...props,
149
- id,
150
- open: true,
151
- onOpenChange: (open) => {
152
- if (!open) dismiss();
153
- },
154
- },
155
- });
156
-
157
- return {
158
- id: id,
159
- dismiss,
160
- update,
161
- };
162
- }
163
-
164
- function useToast() {
165
- const [state, setState] = React.useState<State>(memoryState);
166
-
167
- React.useEffect(() => {
168
- listeners.push(setState);
169
- return () => {
170
- const index = listeners.indexOf(setState);
171
- if (index > -1) {
172
- listeners.splice(index, 1);
173
- }
174
- };
175
- }, [state]);
176
-
177
- return {
178
- ...state,
179
- toast,
180
- dismiss: (toastId?: string) => dispatch({ type: "DISMISS_TOAST", toastId }),
181
- };
182
- }
183
-
184
- export { useToast, toast };