@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,179 +0,0 @@
1
- import * as React from "react";
2
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
- import { IconChevronRight, IconTick, IconRing } from "../../../icons";
4
-
5
- import { cn } from "../../lib/utils";
6
-
7
- const DropdownMenu = DropdownMenuPrimitive.Root;
8
-
9
- const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
10
-
11
- const DropdownMenuGroup = DropdownMenuPrimitive.Group;
12
-
13
- const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
14
-
15
- const DropdownMenuSub = DropdownMenuPrimitive.Sub;
16
-
17
- const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
18
-
19
- const DropdownMenuSubTrigger = React.forwardRef<
20
- React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
21
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
22
- inset?: boolean;
23
- }
24
- >(({ className, inset, children, ...props }, ref) => (
25
- <DropdownMenuPrimitive.SubTrigger
26
- ref={ref}
27
- className={cn(
28
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-surface-primary-hover focus:bg-surface-primary-hover",
29
- inset && "pl-8",
30
- className,
31
- )}
32
- {...props}
33
- >
34
- {children}
35
- <IconChevronRight className="ml-auto h-4 w-4 fill-fill-primary" />
36
- </DropdownMenuPrimitive.SubTrigger>
37
- ));
38
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
39
-
40
- const DropdownMenuSubContent = React.forwardRef<
41
- React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
42
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
43
- >(({ className, ...props }, ref) => (
44
- <DropdownMenuPrimitive.SubContent
45
- ref={ref}
46
- className={cn(
47
- "z-50 min-w-[8rem] overflow-hidden rounded-md border border-border-primary bg-surface-primary p-1 text-label-primary shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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",
48
- className,
49
- )}
50
- {...props}
51
- />
52
- ));
53
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
54
-
55
- const DropdownMenuContent = React.forwardRef<
56
- React.ElementRef<typeof DropdownMenuPrimitive.Content>,
57
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
58
- >(({ className, sideOffset = 4, ...props }, ref) => (
59
- <DropdownMenuPrimitive.Portal>
60
- <DropdownMenuPrimitive.Content
61
- ref={ref}
62
- sideOffset={sideOffset}
63
- className={cn(
64
- "z-50 min-w-[8rem] overflow-hidden rounded-md border border-border-primary bg-surface-primary p-1 text-label-primary shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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",
65
- className,
66
- )}
67
- {...props}
68
- />
69
- </DropdownMenuPrimitive.Portal>
70
- ));
71
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
72
-
73
- const DropdownMenuItem = React.forwardRef<
74
- React.ElementRef<typeof DropdownMenuPrimitive.Item>,
75
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
76
- inset?: boolean;
77
- }
78
- >(({ className, inset, ...props }, ref) => (
79
- <DropdownMenuPrimitive.Item
80
- ref={ref}
81
- className={cn(
82
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-surface-primary-hover focus:text-label-primary",
83
- inset && "pl-8",
84
- className,
85
- )}
86
- {...props}
87
- />
88
- ));
89
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
90
-
91
- const DropdownMenuCheckboxItem = React.forwardRef<
92
- React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
93
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
94
- >(({ className, children, checked, ...props }, ref) => (
95
- <DropdownMenuPrimitive.CheckboxItem
96
- ref={ref}
97
- className={cn(
98
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-surface-primary-hover focus:text-label-primary",
99
- className,
100
- )}
101
- checked={checked}
102
- {...props}
103
- >
104
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
105
- <DropdownMenuPrimitive.ItemIndicator>
106
- <IconTick className="h-4 w-4 fill-fill-primary" />
107
- </DropdownMenuPrimitive.ItemIndicator>
108
- </span>
109
- {children}
110
- </DropdownMenuPrimitive.CheckboxItem>
111
- ));
112
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
113
-
114
- const DropdownMenuRadioItem = React.forwardRef<
115
- React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
116
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
117
- >(({ className, children, ...props }, ref) => (
118
- <DropdownMenuPrimitive.RadioItem
119
- ref={ref}
120
- className={cn(
121
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-surface-primary-hover focus:text-label-primary",
122
- className,
123
- )}
124
- {...props}
125
- >
126
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
127
- <DropdownMenuPrimitive.ItemIndicator>
128
- <IconRing className="h-2 w-2 fill-current" />
129
- </DropdownMenuPrimitive.ItemIndicator>
130
- </span>
131
- {children}
132
- </DropdownMenuPrimitive.RadioItem>
133
- ));
134
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
135
-
136
- const DropdownMenuLabel = React.forwardRef<
137
- React.ElementRef<typeof DropdownMenuPrimitive.Label>,
138
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
139
- inset?: boolean;
140
- }
141
- >(({ className, inset, ...props }, ref) => (
142
- <DropdownMenuPrimitive.Label
143
- ref={ref}
144
- className={cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)}
145
- {...props}
146
- />
147
- ));
148
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
149
-
150
- const DropdownMenuSeparator = React.forwardRef<
151
- React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
152
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
153
- >(({ className, ...props }, ref) => (
154
- <DropdownMenuPrimitive.Separator ref={ref} className={cn("-mx-1 my-1 h-px bg-border-primary", className)} {...props} />
155
- ));
156
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
157
-
158
- const DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
159
- return <span className={cn("ml-auto text-xs tracking-widest opacity-60", className)} {...props} />;
160
- };
161
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
162
-
163
- export {
164
- DropdownMenu,
165
- DropdownMenuTrigger,
166
- DropdownMenuContent,
167
- DropdownMenuItem,
168
- DropdownMenuCheckboxItem,
169
- DropdownMenuRadioItem,
170
- DropdownMenuLabel,
171
- DropdownMenuSeparator,
172
- DropdownMenuShortcut,
173
- DropdownMenuGroup,
174
- DropdownMenuPortal,
175
- DropdownMenuSub,
176
- DropdownMenuSubContent,
177
- DropdownMenuSubTrigger,
178
- DropdownMenuRadioGroup,
179
- };
@@ -1,105 +0,0 @@
1
- import React from 'react'
2
- import type { Meta, StoryObj } from '@storybook/react'
3
- import { useForm } from 'react-hook-form'
4
- import { Form, FormField, FormItem, FormLabel, FormControl, FormDescription, FormMessage } from './form'
5
- import { Input } from './input'
6
- import { Button } from './button'
7
-
8
- export default {
9
- title: 'v2/Shadcn/Form',
10
- component: Form,
11
- parameters: { layout: 'padded' },
12
- } as Meta<typeof Form>
13
-
14
- type Story = StoryObj<typeof Form>
15
-
16
- function BasicFormExample() {
17
- const form = useForm({
18
- defaultValues: {
19
- username: '',
20
- email: '',
21
- },
22
- })
23
-
24
- const onSubmit = (data: any) => {
25
- alert(JSON.stringify(data, null, 2))
26
- }
27
-
28
- return (
29
- <Form {...form}>
30
- <form onSubmit={form.handleSubmit(onSubmit)} className="space-y-6 max-w-sm">
31
- <FormField
32
- control={form.control}
33
- name="username"
34
- rules={{ required: 'Username is required' }}
35
- render={({ field }) => (
36
- <FormItem>
37
- <FormLabel>Username</FormLabel>
38
- <FormControl>
39
- <Input placeholder="Enter username" {...field} />
40
- </FormControl>
41
- <FormDescription>This is your public display name.</FormDescription>
42
- <FormMessage />
43
- </FormItem>
44
- )}
45
- />
46
- <FormField
47
- control={form.control}
48
- name="email"
49
- rules={{ required: 'Email is required' }}
50
- render={({ field }) => (
51
- <FormItem>
52
- <FormLabel>Email</FormLabel>
53
- <FormControl>
54
- <Input type="email" placeholder="Enter email" {...field} />
55
- </FormControl>
56
- <FormDescription>We will never share your email.</FormDescription>
57
- <FormMessage />
58
- </FormItem>
59
- )}
60
- />
61
- <Button type="submit">Submit</Button>
62
- </form>
63
- </Form>
64
- )
65
- }
66
-
67
- export const Default: Story = {
68
- render: () => <BasicFormExample />,
69
- }
70
-
71
- function FormWithErrorsExample() {
72
- const form = useForm({
73
- defaultValues: {
74
- name: '',
75
- },
76
- })
77
-
78
- React.useEffect(() => {
79
- form.setError('name', { type: 'manual', message: 'This field has an error' })
80
- }, [form])
81
-
82
- return (
83
- <Form {...form}>
84
- <form className="space-y-6 max-w-sm">
85
- <FormField
86
- control={form.control}
87
- name="name"
88
- render={({ field }) => (
89
- <FormItem>
90
- <FormLabel>Name</FormLabel>
91
- <FormControl>
92
- <Input placeholder="Enter name" {...field} />
93
- </FormControl>
94
- <FormMessage />
95
- </FormItem>
96
- )}
97
- />
98
- </form>
99
- </Form>
100
- )
101
- }
102
-
103
- export const WithErrors: Story = {
104
- render: () => <FormWithErrorsExample />,
105
- }
@@ -1,129 +0,0 @@
1
- import * as React from "react";
2
- import * as LabelPrimitive from "@radix-ui/react-label";
3
- import { Slot } from "@radix-ui/react-slot";
4
- import { Controller, ControllerProps, FieldPath, FieldValues, FormProvider, useFormContext } from "react-hook-form";
5
-
6
- import { cn } from "../../lib/utils";
7
- import { Label } from "./label";
8
-
9
- const Form = FormProvider;
10
-
11
- type FormFieldContextValue<
12
- TFieldValues extends FieldValues = FieldValues,
13
- TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
14
- > = {
15
- name: TName;
16
- };
17
-
18
- const FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue);
19
-
20
- const FormField = <
21
- TFieldValues extends FieldValues = FieldValues,
22
- TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
23
- >({
24
- ...props
25
- }: ControllerProps<TFieldValues, TName>) => {
26
- return (
27
- <FormFieldContext.Provider value={{ name: props.name }}>
28
- <Controller {...props} />
29
- </FormFieldContext.Provider>
30
- );
31
- };
32
-
33
- const useFormField = () => {
34
- const fieldContext = React.useContext(FormFieldContext);
35
- const itemContext = React.useContext(FormItemContext);
36
- const { getFieldState, formState } = useFormContext();
37
-
38
- const fieldState = getFieldState(fieldContext.name, formState);
39
-
40
- if (!fieldContext) {
41
- throw new Error("useFormField should be used within <FormField>");
42
- }
43
-
44
- const { id } = itemContext;
45
-
46
- return {
47
- id,
48
- name: fieldContext.name,
49
- formItemId: `${id}-form-item`,
50
- formDescriptionId: `${id}-form-item-description`,
51
- formMessageId: `${id}-form-item-message`,
52
- ...fieldState,
53
- };
54
- };
55
-
56
- type FormItemContextValue = {
57
- id: string;
58
- };
59
-
60
- const FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue);
61
-
62
- const FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
63
- ({ className, ...props }, ref) => {
64
- const id = React.useId();
65
-
66
- return (
67
- <FormItemContext.Provider value={{ id }}>
68
- <div ref={ref} className={cn("space-y-2", className)} {...props} />
69
- </FormItemContext.Provider>
70
- );
71
- },
72
- );
73
- FormItem.displayName = "FormItem";
74
-
75
- const FormLabel = React.forwardRef<
76
- React.ElementRef<typeof LabelPrimitive.Root>,
77
- React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
78
- >(({ className, ...props }, ref) => {
79
- const { error, formItemId } = useFormField();
80
-
81
- return <Label ref={ref} className={cn(error && "text-danger-dark", className)} htmlFor={formItemId} {...props} />;
82
- });
83
- FormLabel.displayName = "FormLabel";
84
-
85
- const FormControl = React.forwardRef<React.ElementRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(
86
- ({ ...props }, ref) => {
87
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
88
-
89
- return (
90
- <Slot
91
- ref={ref}
92
- id={formItemId}
93
- aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}
94
- aria-invalid={!!error}
95
- {...props}
96
- />
97
- );
98
- },
99
- );
100
- FormControl.displayName = "FormControl";
101
-
102
- const FormDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
103
- ({ className, ...props }, ref) => {
104
- const { formDescriptionId } = useFormField();
105
-
106
- return <p ref={ref} id={formDescriptionId} className={cn("text-sm text-label-secondary", className)} {...props} />;
107
- },
108
- );
109
- FormDescription.displayName = "FormDescription";
110
-
111
- const FormMessage = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
112
- ({ className, children, ...props }, ref) => {
113
- const { error, formMessageId } = useFormField();
114
- const body = error ? String(error?.message) : children;
115
-
116
- if (!body) {
117
- return null;
118
- }
119
-
120
- return (
121
- <p ref={ref} id={formMessageId} className={cn("text-sm font-medium text-danger-dark", className)} {...props}>
122
- {body}
123
- </p>
124
- );
125
- },
126
- );
127
- FormMessage.displayName = "FormMessage";
128
-
129
- export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };
@@ -1,35 +0,0 @@
1
- import React from 'react'
2
- import type { Meta, StoryObj } from '@storybook/react'
3
- import { HoverCard, HoverCardTrigger, HoverCardContent } from './hover-card'
4
- import { Button } from './button'
5
-
6
- function HoverCardDefault() {
7
- return (
8
- <HoverCard>
9
- <HoverCardTrigger asChild>
10
- <Button variant="link">@nextjs</Button>
11
- </HoverCardTrigger>
12
- <HoverCardContent className="w-80">
13
- <div className="space-y-1">
14
- <h4 className="text-sm font-semibold">@nextjs</h4>
15
- <p className="text-sm text-label-secondary">The React Framework — created and maintained by @vercel.</p>
16
- <div className="flex items-center pt-2">
17
- <span className="text-xs text-label-secondary">Joined December 2021</span>
18
- </div>
19
- </div>
20
- </HoverCardContent>
21
- </HoverCard>
22
- )
23
- }
24
-
25
- export default {
26
- title: 'v2/Shadcn/HoverCard',
27
- component: HoverCard,
28
- parameters: { layout: 'centered' },
29
- } as Meta<typeof HoverCard>
30
-
31
- type Story = StoryObj<typeof HoverCard>
32
-
33
- export const Default: Story = {
34
- render: () => React.createElement(HoverCardDefault),
35
- }
@@ -1,27 +0,0 @@
1
- import * as React from "react";
2
- import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
3
-
4
- import { cn } from "../../lib/utils";
5
-
6
- const HoverCard = HoverCardPrimitive.Root;
7
-
8
- const HoverCardTrigger = HoverCardPrimitive.Trigger;
9
-
10
- const HoverCardContent = React.forwardRef<
11
- React.ElementRef<typeof HoverCardPrimitive.Content>,
12
- React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
13
- >(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
14
- <HoverCardPrimitive.Content
15
- ref={ref}
16
- align={align}
17
- sideOffset={sideOffset}
18
- className={cn(
19
- "z-50 w-64 rounded-md border border-border-primary bg-surface-primary p-4 text-label-primary shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[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",
20
- className,
21
- )}
22
- {...props}
23
- />
24
- ));
25
- HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
26
-
27
- export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -1,72 +0,0 @@
1
- import React from 'react'
2
- import type { Meta, StoryObj } from '@storybook/react'
3
- import { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator } from './input-otp'
4
-
5
- function InputOTPDefault() {
6
- return (
7
- <InputOTP maxLength={6}>
8
- <InputOTPGroup>
9
- <InputOTPSlot index={0} />
10
- <InputOTPSlot index={1} />
11
- <InputOTPSlot index={2} />
12
- </InputOTPGroup>
13
- <InputOTPSeparator />
14
- <InputOTPGroup>
15
- <InputOTPSlot index={3} />
16
- <InputOTPSlot index={4} />
17
- <InputOTPSlot index={5} />
18
- </InputOTPGroup>
19
- </InputOTP>
20
- )
21
- }
22
-
23
- function InputOTPFourDigits() {
24
- return (
25
- <InputOTP maxLength={4}>
26
- <InputOTPGroup>
27
- <InputOTPSlot index={0} />
28
- <InputOTPSlot index={1} />
29
- <InputOTPSlot index={2} />
30
- <InputOTPSlot index={3} />
31
- </InputOTPGroup>
32
- </InputOTP>
33
- )
34
- }
35
-
36
- function InputOTPDisabled() {
37
- return (
38
- <InputOTP maxLength={6} disabled>
39
- <InputOTPGroup>
40
- <InputOTPSlot index={0} />
41
- <InputOTPSlot index={1} />
42
- <InputOTPSlot index={2} />
43
- </InputOTPGroup>
44
- <InputOTPSeparator />
45
- <InputOTPGroup>
46
- <InputOTPSlot index={3} />
47
- <InputOTPSlot index={4} />
48
- <InputOTPSlot index={5} />
49
- </InputOTPGroup>
50
- </InputOTP>
51
- )
52
- }
53
-
54
- export default {
55
- title: 'v2/Shadcn/InputOTP',
56
- component: InputOTP,
57
- parameters: { layout: 'centered' },
58
- } as Meta<typeof InputOTP>
59
-
60
- type Story = StoryObj<typeof InputOTP>
61
-
62
- export const Default: Story = {
63
- render: () => React.createElement(InputOTPDefault),
64
- }
65
-
66
- export const FourDigits: Story = {
67
- render: () => React.createElement(InputOTPFourDigits),
68
- }
69
-
70
- export const Disabled: Story = {
71
- render: () => React.createElement(InputOTPDisabled),
72
- }
@@ -1,61 +0,0 @@
1
- import * as React from "react";
2
- import { OTPInput, OTPInputContext } from "input-otp";
3
- import { IconDot } from "../../../icons";
4
-
5
- import { cn } from "../../lib/utils";
6
-
7
- const InputOTP = React.forwardRef<React.ElementRef<typeof OTPInput>, React.ComponentPropsWithoutRef<typeof OTPInput>>(
8
- ({ className, containerClassName, ...props }, ref) => (
9
- <OTPInput
10
- ref={ref}
11
- containerClassName={cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName)}
12
- className={cn("disabled:cursor-not-allowed", className)}
13
- {...props}
14
- />
15
- ),
16
- );
17
- InputOTP.displayName = "InputOTP";
18
-
19
- const InputOTPGroup = React.forwardRef<React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div">>(
20
- ({ className, ...props }, ref) => <div ref={ref} className={cn("flex items-center", className)} {...props} />,
21
- );
22
- InputOTPGroup.displayName = "InputOTPGroup";
23
-
24
- const InputOTPSlot = React.forwardRef<
25
- React.ElementRef<"div">,
26
- React.ComponentPropsWithoutRef<"div"> & { index: number }
27
- >(({ index, className, ...props }, ref) => {
28
- const inputOTPContext = React.useContext(OTPInputContext);
29
- const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
30
-
31
- return (
32
- <div
33
- ref={ref}
34
- className={cn(
35
- "relative flex h-10 w-10 items-center justify-center border-y border-r border-border-primary text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
36
- isActive && "z-10 ring-2 ring-actions-regular ring-offset-surface-primary",
37
- className,
38
- )}
39
- {...props}
40
- >
41
- {char}
42
- {hasFakeCaret && (
43
- <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
44
- <div className="animate-caret-blink h-4 w-px bg-label-primary duration-1000" />
45
- </div>
46
- )}
47
- </div>
48
- );
49
- });
50
- InputOTPSlot.displayName = "InputOTPSlot";
51
-
52
- const InputOTPSeparator = React.forwardRef<React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div">>(
53
- ({ ...props }, ref) => (
54
- <div ref={ref} role="separator" {...props}>
55
- <IconDot className="w-4 h-4 fill-fill-primary" />
56
- </div>
57
- ),
58
- );
59
- InputOTPSeparator.displayName = "InputOTPSeparator";
60
-
61
- export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
@@ -1,16 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react'
2
- import { Input } from './input'
3
-
4
- export default {
5
- title: 'v2/Shadcn/Input',
6
- component: Input,
7
- parameters: { layout: 'padded' },
8
- } as Meta<typeof Input>
9
-
10
- type Story = StoryObj<typeof Input>
11
-
12
- export const Default: Story = { args: { placeholder: 'Enter text...' } }
13
- export const Email: Story = { args: { type: 'email', placeholder: 'you@example.com' } }
14
- export const Password: Story = { args: { type: 'password', placeholder: 'Password' } }
15
- export const Disabled: Story = { args: { placeholder: 'Disabled', disabled: true } }
16
- export const WithValue: Story = { args: { defaultValue: 'Hello world', readOnly: true } }
@@ -1,25 +0,0 @@
1
- import * as React from "react";
2
-
3
- import { cn } from "../../lib/utils";
4
-
5
- const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
6
- ({ className, type, ...props }, ref) => {
7
- return (
8
- <input
9
- type={type}
10
- className={cn(
11
- "flex h-10 w-full rounded-md border border-border-primary bg-surface-primary px-3 py-2 text-base text-label-primary placeholder:text-label-secondary focus-visible:outline-none focus-visible:border-border-selected disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
12
- className,
13
- )}
14
- ref={ref}
15
- {...props}
16
- />
17
- );
18
- },
19
- );
20
- Input.displayName = "Input";
21
-
22
- type InputProps = React.ComponentProps<"input">;
23
-
24
- export { Input };
25
- export type { InputProps };
@@ -1,13 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react'
2
- import { Label } from './label'
3
-
4
- export default {
5
- title: 'v2/Shadcn/Label',
6
- component: Label,
7
- parameters: { layout: 'padded' },
8
- } as Meta<typeof Label>
9
-
10
- type Story = StoryObj<typeof Label>
11
-
12
- export const Default: Story = { args: { children: 'Email address' } }
13
- export const Disabled: Story = { args: { children: 'Disabled field', className: 'opacity-50 cursor-not-allowed' } }
@@ -1,17 +0,0 @@
1
- import * as React from "react";
2
- import * as LabelPrimitive from "@radix-ui/react-label";
3
- import { cva, type VariantProps } from "class-variance-authority";
4
-
5
- import { cn } from "../../lib/utils";
6
-
7
- const labelVariants = cva("text-sm font-medium leading-none text-label-primary peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
8
-
9
- const Label = React.forwardRef<
10
- React.ElementRef<typeof LabelPrimitive.Root>,
11
- React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>
12
- >(({ className, ...props }, ref) => (
13
- <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />
14
- ));
15
- Label.displayName = LabelPrimitive.Root.displayName;
16
-
17
- export { Label };