@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,92 +0,0 @@
1
- import React from 'react'
2
- import type { Meta, StoryObj } from '@storybook/react'
3
- import { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext } from './carousel'
4
- import { Card, CardContent } from './card'
5
-
6
- function CarouselDefault() {
7
- return (
8
- <div className="w-full max-w-xs mx-auto">
9
- <Carousel>
10
- <CarouselContent>
11
- {Array.from({ length: 5 }).map((_, index) => (
12
- <CarouselItem key={index}>
13
- <div className="p-1">
14
- <Card>
15
- <CardContent className="flex aspect-square items-center justify-center p-6">
16
- <span className="text-4xl font-semibold">{index + 1}</span>
17
- </CardContent>
18
- </Card>
19
- </div>
20
- </CarouselItem>
21
- ))}
22
- </CarouselContent>
23
- <CarouselPrevious />
24
- <CarouselNext />
25
- </Carousel>
26
- </div>
27
- )
28
- }
29
-
30
- function CarouselThreePerView() {
31
- return (
32
- <div className="w-full max-w-sm mx-auto">
33
- <Carousel>
34
- <CarouselContent className="-ml-2">
35
- {Array.from({ length: 8 }).map((_, index) => (
36
- <CarouselItem key={index} className="pl-2 basis-1/3">
37
- <Card>
38
- <CardContent className="flex aspect-square items-center justify-center p-2">
39
- <span className="text-2xl font-semibold">{index + 1}</span>
40
- </CardContent>
41
- </Card>
42
- </CarouselItem>
43
- ))}
44
- </CarouselContent>
45
- <CarouselPrevious />
46
- <CarouselNext />
47
- </Carousel>
48
- </div>
49
- )
50
- }
51
-
52
- function CarouselVertical() {
53
- return (
54
- <div className="w-full max-w-xs mx-auto">
55
- <Carousel orientation="vertical" className="w-full max-w-xs">
56
- <CarouselContent className="-mt-1 h-[200px]">
57
- {Array.from({ length: 5 }).map((_, index) => (
58
- <CarouselItem key={index} className="pt-1 basis-1/2">
59
- <Card>
60
- <CardContent className="flex items-center justify-center p-6">
61
- <span className="text-3xl font-semibold">{index + 1}</span>
62
- </CardContent>
63
- </Card>
64
- </CarouselItem>
65
- ))}
66
- </CarouselContent>
67
- <CarouselPrevious />
68
- <CarouselNext />
69
- </Carousel>
70
- </div>
71
- )
72
- }
73
-
74
- export default {
75
- title: 'v2/Shadcn/Carousel',
76
- component: Carousel,
77
- parameters: { layout: 'padded' },
78
- } as Meta<typeof Carousel>
79
-
80
- type Story = StoryObj<typeof Carousel>
81
-
82
- export const Default: Story = {
83
- render: () => React.createElement(CarouselDefault),
84
- }
85
-
86
- export const ThreePerView: Story = {
87
- render: () => React.createElement(CarouselThreePerView),
88
- }
89
-
90
- export const Vertical: Story = {
91
- render: () => React.createElement(CarouselVertical),
92
- }
@@ -1,224 +0,0 @@
1
- import * as React from "react";
2
- import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
3
- import { IconArrowLeft, IconArrowRight } from "../../../icons";
4
-
5
- import { cn } from "../../lib/utils";
6
- import { Button } from "./button";
7
-
8
- type CarouselApi = UseEmblaCarouselType[1];
9
- type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
10
- type CarouselOptions = UseCarouselParameters[0];
11
- type CarouselPlugin = UseCarouselParameters[1];
12
-
13
- type CarouselProps = {
14
- opts?: CarouselOptions;
15
- plugins?: CarouselPlugin;
16
- orientation?: "horizontal" | "vertical";
17
- setApi?: (api: CarouselApi) => void;
18
- };
19
-
20
- type CarouselContextProps = {
21
- carouselRef: ReturnType<typeof useEmblaCarousel>[0];
22
- api: ReturnType<typeof useEmblaCarousel>[1];
23
- scrollPrev: () => void;
24
- scrollNext: () => void;
25
- canScrollPrev: boolean;
26
- canScrollNext: boolean;
27
- } & CarouselProps;
28
-
29
- const CarouselContext = React.createContext<CarouselContextProps | null>(null);
30
-
31
- function useCarousel() {
32
- const context = React.useContext(CarouselContext);
33
-
34
- if (!context) {
35
- throw new Error("useCarousel must be used within a <Carousel />");
36
- }
37
-
38
- return context;
39
- }
40
-
41
- const Carousel = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & CarouselProps>(
42
- ({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }, ref) => {
43
- const [carouselRef, api] = useEmblaCarousel(
44
- {
45
- ...opts,
46
- axis: orientation === "horizontal" ? "x" : "y",
47
- },
48
- plugins,
49
- );
50
- const [canScrollPrev, setCanScrollPrev] = React.useState(false);
51
- const [canScrollNext, setCanScrollNext] = React.useState(false);
52
-
53
- const onSelect = React.useCallback((api: CarouselApi) => {
54
- if (!api) {
55
- return;
56
- }
57
-
58
- setCanScrollPrev(api.canScrollPrev());
59
- setCanScrollNext(api.canScrollNext());
60
- }, []);
61
-
62
- const scrollPrev = React.useCallback(() => {
63
- api?.scrollPrev();
64
- }, [api]);
65
-
66
- const scrollNext = React.useCallback(() => {
67
- api?.scrollNext();
68
- }, [api]);
69
-
70
- const handleKeyDown = React.useCallback(
71
- (event: React.KeyboardEvent<HTMLDivElement>) => {
72
- if (event.key === "ArrowLeft") {
73
- event.preventDefault();
74
- scrollPrev();
75
- } else if (event.key === "ArrowRight") {
76
- event.preventDefault();
77
- scrollNext();
78
- }
79
- },
80
- [scrollPrev, scrollNext],
81
- );
82
-
83
- React.useEffect(() => {
84
- if (!api || !setApi) {
85
- return;
86
- }
87
-
88
- setApi(api);
89
- }, [api, setApi]);
90
-
91
- React.useEffect(() => {
92
- if (!api) {
93
- return undefined;
94
- }
95
-
96
- onSelect(api);
97
- api.on("reInit", onSelect);
98
- api.on("select", onSelect);
99
-
100
- return () => {
101
- api?.off("select", onSelect);
102
- };
103
- }, [api, onSelect]);
104
-
105
- return (
106
- <CarouselContext.Provider
107
- value={{
108
- carouselRef,
109
- api: api,
110
- opts,
111
- orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
112
- scrollPrev,
113
- scrollNext,
114
- canScrollPrev,
115
- canScrollNext,
116
- }}
117
- >
118
- <div
119
- ref={ref}
120
- onKeyDownCapture={handleKeyDown}
121
- className={cn("relative", className)}
122
- role="region"
123
- aria-roledescription="carousel"
124
- {...props}
125
- >
126
- {children}
127
- </div>
128
- </CarouselContext.Provider>
129
- );
130
- },
131
- );
132
- Carousel.displayName = "Carousel";
133
-
134
- const CarouselContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
135
- ({ className, ...props }, ref) => {
136
- const { carouselRef, orientation } = useCarousel();
137
-
138
- return (
139
- <div ref={carouselRef} className="overflow-hidden">
140
- <div
141
- ref={ref}
142
- className={cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className)}
143
- {...props}
144
- />
145
- </div>
146
- );
147
- },
148
- );
149
- CarouselContent.displayName = "CarouselContent";
150
-
151
- const CarouselItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
152
- ({ className, ...props }, ref) => {
153
- const { orientation } = useCarousel();
154
-
155
- return (
156
- <div
157
- ref={ref}
158
- role="group"
159
- aria-roledescription="slide"
160
- className={cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className)}
161
- {...props}
162
- />
163
- );
164
- },
165
- );
166
- CarouselItem.displayName = "CarouselItem";
167
-
168
- const CarouselPrevious = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(
169
- ({ className, variant = "outline", size = "icon", ...props }, ref) => {
170
- const { orientation, scrollPrev, canScrollPrev } = useCarousel();
171
-
172
- return (
173
- <Button
174
- ref={ref}
175
- variant={variant}
176
- size={size}
177
- className={cn(
178
- "absolute h-8 w-8 rounded-full",
179
- orientation === "horizontal"
180
- ? "-left-12 top-1/2 -translate-y-1/2"
181
- : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
182
- className,
183
- )}
184
- disabled={!canScrollPrev}
185
- onClick={scrollPrev}
186
- {...props}
187
- >
188
- <IconArrowLeft className="h-4 w-4 fill-fill-primary" />
189
- <span className="sr-only">Previous slide</span>
190
- </Button>
191
- );
192
- },
193
- );
194
- CarouselPrevious.displayName = "CarouselPrevious";
195
-
196
- const CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(
197
- ({ className, variant = "outline", size = "icon", ...props }, ref) => {
198
- const { orientation, scrollNext, canScrollNext } = useCarousel();
199
-
200
- return (
201
- <Button
202
- ref={ref}
203
- variant={variant}
204
- size={size}
205
- className={cn(
206
- "absolute h-8 w-8 rounded-full",
207
- orientation === "horizontal"
208
- ? "-right-12 top-1/2 -translate-y-1/2"
209
- : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
210
- className,
211
- )}
212
- disabled={!canScrollNext}
213
- onClick={scrollNext}
214
- {...props}
215
- >
216
- <IconArrowRight className="h-4 w-4 fill-fill-primary" />
217
- <span className="sr-only">Next slide</span>
218
- </Button>
219
- );
220
- },
221
- );
222
- CarouselNext.displayName = "CarouselNext";
223
-
224
- export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext };
@@ -1,38 +0,0 @@
1
- .bkit-checkbox {
2
- position: relative;
3
- display: flex;
4
- align-items: center;
5
- justify-content: center;
6
- width: 20px;
7
- height: 20px;
8
- flex-shrink: 0;
9
- border-radius: 4px;
10
- border: 2px solid var(--border-primary, #E8E9EF);
11
- background: var(--surface-primary, #ffffff);
12
- cursor: pointer;
13
- transition: background-color 0.15s ease, border-color 0.15s ease;
14
-
15
- &[data-state='checked'],
16
- &[data-state='indeterminate'] {
17
- background: var(--fill-primary, #14215A);
18
- border-color: var(--fill-primary, #14215A);
19
- color: #ffffff;
20
- }
21
-
22
- &:focus-visible {
23
- outline: 2px solid var(--border-selected, #6200EE);
24
- outline-offset: 2px;
25
- }
26
-
27
- &:disabled {
28
- cursor: not-allowed;
29
- opacity: 0.5;
30
- }
31
- }
32
-
33
- .bkit-checkbox__indicator {
34
- display: flex;
35
- align-items: center;
36
- justify-content: center;
37
- color: currentColor;
38
- }
@@ -1,23 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react'
2
- import { Checkbox } from './checkbox'
3
- import { Label } from './label'
4
-
5
- export default {
6
- title: 'v2/Shadcn/Checkbox',
7
- component: Checkbox,
8
- parameters: { layout: 'padded' },
9
- } as Meta<typeof Checkbox>
10
-
11
- type Story = StoryObj<typeof Checkbox>
12
-
13
- export const Default: Story = { args: { id: 'cb1' } }
14
- export const Checked: Story = { args: { id: 'cb2', defaultChecked: true } }
15
- export const Disabled: Story = { args: { id: 'cb3', disabled: true } }
16
- export const WithLabel: Story = {
17
- render: () => (
18
- <div className="flex items-center gap-2">
19
- <Checkbox id="cb4" />
20
- <Label htmlFor="cb4">Accept terms and conditions</Label>
21
- </div>
22
- ),
23
- }
@@ -1,24 +0,0 @@
1
- import * as React from "react";
2
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
- import { cn } from "../../lib/utils";
4
- import './checkbox.scss';
5
-
6
- const Checkbox = React.forwardRef<
7
- React.ElementRef<typeof CheckboxPrimitive.Root>,
8
- React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
9
- >(({ className, ...props }, ref) => (
10
- <CheckboxPrimitive.Root
11
- ref={ref}
12
- className={cn("bkit-checkbox", className)}
13
- {...props}
14
- >
15
- <CheckboxPrimitive.Indicator className="bkit-checkbox__indicator">
16
- <svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
17
- <path d="M20 6L9 17L4 12" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round"/>
18
- </svg>
19
- </CheckboxPrimitive.Indicator>
20
- </CheckboxPrimitive.Root>
21
- ));
22
- Checkbox.displayName = CheckboxPrimitive.Root.displayName;
23
-
24
- export { Checkbox };
@@ -1,59 +0,0 @@
1
- import React from 'react'
2
- import type { Meta, StoryObj } from '@storybook/react'
3
- import { Collapsible, CollapsibleTrigger, CollapsibleContent } from './collapsible'
4
- import { Button } from './button'
5
-
6
- function CollapsibleDefault() {
7
- const [isOpen, setIsOpen] = React.useState(false)
8
- return (
9
- <Collapsible open={isOpen} onOpenChange={setIsOpen} className="w-[350px] space-y-2">
10
- <div className="flex items-center justify-between space-x-4 px-4">
11
- <h4 className="text-sm font-semibold">3 items tagged</h4>
12
- <CollapsibleTrigger asChild>
13
- <Button variant="ghost" size="sm">
14
- {isOpen ? 'Hide' : 'Show'}
15
- </Button>
16
- </CollapsibleTrigger>
17
- </div>
18
- <div className="rounded-md border border-border-primary px-4 py-3 text-sm">Item 1</div>
19
- <CollapsibleContent className="space-y-2">
20
- <div className="rounded-md border border-border-primary px-4 py-3 text-sm">Item 2</div>
21
- <div className="rounded-md border border-border-primary px-4 py-3 text-sm">Item 3</div>
22
- </CollapsibleContent>
23
- </Collapsible>
24
- )
25
- }
26
-
27
- function CollapsibleDefaultOpen() {
28
- return (
29
- <Collapsible defaultOpen className="w-[350px] space-y-2">
30
- <div className="flex items-center justify-between space-x-4 px-4">
31
- <h4 className="text-sm font-semibold">Settings</h4>
32
- <CollapsibleTrigger asChild>
33
- <Button variant="ghost" size="sm">Toggle</Button>
34
- </CollapsibleTrigger>
35
- </div>
36
- <div className="rounded-md border border-border-primary px-4 py-3 text-sm">Always visible</div>
37
- <CollapsibleContent className="space-y-2">
38
- <div className="rounded-md border border-border-primary px-4 py-3 text-sm">Hidden content A</div>
39
- <div className="rounded-md border border-border-primary px-4 py-3 text-sm">Hidden content B</div>
40
- </CollapsibleContent>
41
- </Collapsible>
42
- )
43
- }
44
-
45
- export default {
46
- title: 'v2/Shadcn/Collapsible',
47
- component: Collapsible,
48
- parameters: { layout: 'padded' },
49
- } as Meta<typeof Collapsible>
50
-
51
- type Story = StoryObj<typeof Collapsible>
52
-
53
- export const Default: Story = {
54
- render: () => React.createElement(CollapsibleDefault),
55
- }
56
-
57
- export const DefaultOpen: Story = {
58
- render: () => React.createElement(CollapsibleDefaultOpen),
59
- }
@@ -1,9 +0,0 @@
1
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2
-
3
- const Collapsible = CollapsiblePrimitive.Root;
4
-
5
- const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
6
-
7
- const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
8
-
9
- export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -1,70 +0,0 @@
1
- import React from 'react'
2
- import type { Meta, StoryObj } from '@storybook/react'
3
- import {
4
- Command,
5
- CommandInput,
6
- CommandList,
7
- CommandEmpty,
8
- CommandGroup,
9
- CommandItem,
10
- CommandSeparator,
11
- CommandShortcut,
12
- } from './command'
13
-
14
- function CommandDefault() {
15
- return (
16
- <Command className="rounded-lg border border-border-primary shadow-md w-[350px]">
17
- <CommandInput placeholder="Type a command or search..." />
18
- <CommandList>
19
- <CommandEmpty>No results found.</CommandEmpty>
20
- <CommandGroup heading="Suggestions">
21
- <CommandItem>Calendar</CommandItem>
22
- <CommandItem>Search</CommandItem>
23
- <CommandItem>Settings</CommandItem>
24
- </CommandGroup>
25
- <CommandSeparator />
26
- <CommandGroup heading="Settings">
27
- <CommandItem>
28
- Profile
29
- <CommandShortcut>Cmd+P</CommandShortcut>
30
- </CommandItem>
31
- <CommandItem>
32
- Billing
33
- <CommandShortcut>Cmd+B</CommandShortcut>
34
- </CommandItem>
35
- <CommandItem>
36
- Settings
37
- <CommandShortcut>Cmd+S</CommandShortcut>
38
- </CommandItem>
39
- </CommandGroup>
40
- </CommandList>
41
- </Command>
42
- )
43
- }
44
-
45
- function CommandEmptyState() {
46
- return (
47
- <Command className="rounded-lg border border-border-primary shadow-md w-[350px]">
48
- <CommandInput placeholder="Search..." value="nonexistent" />
49
- <CommandList>
50
- <CommandEmpty>No results found.</CommandEmpty>
51
- </CommandList>
52
- </Command>
53
- )
54
- }
55
-
56
- export default {
57
- title: 'v2/Shadcn/Command',
58
- component: Command,
59
- parameters: { layout: 'padded' },
60
- } as Meta<typeof Command>
61
-
62
- type Story = StoryObj<typeof Command>
63
-
64
- export const Default: Story = {
65
- render: () => React.createElement(CommandDefault),
66
- }
67
-
68
- export const Empty: Story = {
69
- render: () => React.createElement(CommandEmptyState),
70
- }
@@ -1,132 +0,0 @@
1
- import * as React from "react";
2
- import { type DialogProps } from "@radix-ui/react-dialog";
3
- import { Command as CommandPrimitive } from "cmdk";
4
- import { IconSearch } from "../../../icons";
5
-
6
- import { cn } from "../../lib/utils";
7
- import { Dialog, DialogContent } from "./dialog";
8
-
9
- const Command = React.forwardRef<
10
- React.ElementRef<typeof CommandPrimitive>,
11
- React.ComponentPropsWithoutRef<typeof CommandPrimitive>
12
- >(({ className, ...props }, ref) => (
13
- <CommandPrimitive
14
- ref={ref}
15
- className={cn(
16
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-surface-primary text-label-primary",
17
- className,
18
- )}
19
- {...props}
20
- />
21
- ));
22
- Command.displayName = CommandPrimitive.displayName;
23
-
24
- interface CommandDialogProps extends DialogProps {}
25
-
26
- const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
27
- return (
28
- <Dialog {...props}>
29
- <DialogContent className="overflow-hidden p-0 shadow-lg">
30
- <Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-label-secondary [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
31
- {children}
32
- </Command>
33
- </DialogContent>
34
- </Dialog>
35
- );
36
- };
37
-
38
- const CommandInput = React.forwardRef<
39
- React.ElementRef<typeof CommandPrimitive.Input>,
40
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
41
- >(({ className, ...props }, ref) => (
42
- <div className="flex items-center border-b border-border-primary px-3" cmdk-input-wrapper="">
43
- <IconSearch className="mr-2 h-4 w-4 shrink-0 opacity-50 fill-fill-secondary" />
44
- <CommandPrimitive.Input
45
- ref={ref}
46
- className={cn(
47
- "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-label-secondary disabled:cursor-not-allowed disabled:opacity-50",
48
- className,
49
- )}
50
- {...props}
51
- />
52
- </div>
53
- ));
54
-
55
- CommandInput.displayName = CommandPrimitive.Input.displayName;
56
-
57
- const CommandList = React.forwardRef<
58
- React.ElementRef<typeof CommandPrimitive.List>,
59
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
60
- >(({ className, ...props }, ref) => (
61
- <CommandPrimitive.List
62
- ref={ref}
63
- className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
64
- {...props}
65
- />
66
- ));
67
-
68
- CommandList.displayName = CommandPrimitive.List.displayName;
69
-
70
- const CommandEmpty = React.forwardRef<
71
- React.ElementRef<typeof CommandPrimitive.Empty>,
72
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
73
- >((props, ref) => <CommandPrimitive.Empty ref={ref} className="py-6 text-center text-sm" {...props} />);
74
-
75
- CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
76
-
77
- const CommandGroup = React.forwardRef<
78
- React.ElementRef<typeof CommandPrimitive.Group>,
79
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
80
- >(({ className, ...props }, ref) => (
81
- <CommandPrimitive.Group
82
- ref={ref}
83
- className={cn(
84
- "overflow-hidden p-1 text-label-primary [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-label-secondary",
85
- className,
86
- )}
87
- {...props}
88
- />
89
- ));
90
-
91
- CommandGroup.displayName = CommandPrimitive.Group.displayName;
92
-
93
- const CommandSeparator = React.forwardRef<
94
- React.ElementRef<typeof CommandPrimitive.Separator>,
95
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
96
- >(({ className, ...props }, ref) => (
97
- <CommandPrimitive.Separator ref={ref} className={cn("-mx-1 h-px bg-border-primary", className)} {...props} />
98
- ));
99
- CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
100
-
101
- const CommandItem = React.forwardRef<
102
- React.ElementRef<typeof CommandPrimitive.Item>,
103
- React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
104
- >(({ className, ...props }, ref) => (
105
- <CommandPrimitive.Item
106
- ref={ref}
107
- className={cn(
108
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-surface-primary-hover data-[selected=true]:text-label-primary data-[disabled=true]:opacity-50",
109
- className,
110
- )}
111
- {...props}
112
- />
113
- ));
114
-
115
- CommandItem.displayName = CommandPrimitive.Item.displayName;
116
-
117
- const CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
118
- return <span className={cn("ml-auto text-xs tracking-widest text-label-secondary", className)} {...props} />;
119
- };
120
- CommandShortcut.displayName = "CommandShortcut";
121
-
122
- export {
123
- Command,
124
- CommandDialog,
125
- CommandInput,
126
- CommandList,
127
- CommandEmpty,
128
- CommandGroup,
129
- CommandItem,
130
- CommandShortcut,
131
- CommandSeparator,
132
- };