@fernir2/saas-kit-cli 0.1.4 → 0.1.6

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 (303) hide show
  1. package/package.json +211 -7
  2. package/cli/.gitlab-ci.yml +0 -14
  3. package/cli/.husky/commit-msg +0 -1
  4. package/cli/.husky/pre-commit +0 -1
  5. package/cli/README.md +0 -101
  6. package/cli/bin/index.ts +0 -358
  7. package/cli/drizzle.config.ts +0 -12
  8. package/cli/global-setup.ts +0 -25
  9. package/cli/npm-commands/gen-meta/index.ts +0 -3
  10. package/cli/npm-commands/gen-schema/index.ts +0 -5
  11. package/cli/npm-commands/migrate-db/index.ts +0 -5
  12. package/cli/npm-commands/migrate-db/migrate-db.ts +0 -15
  13. package/cli/npm-commands/seed-db/index.ts +0 -5
  14. package/cli/npm-commands/seed-db/seed-db.ts +0 -15
  15. package/cli/playwright.config.ts +0 -34
  16. package/cli/postcss.config.mjs +0 -9
  17. package/cli/server.ts +0 -41
  18. package/cli/src/app/api/v1/[resourceName]/[id]/route.ts/route.ts +0 -11
  19. package/cli/src/app/api/v1/[resourceName]/route.ts/route.ts +0 -14
  20. package/cli/src/app/api/v1/[resourceName]/upsert/route.ts/route.ts +0 -3
  21. package/cli/src/app/api/v1/log/route.ts/route.ts +0 -7
  22. package/cli/src/app/api/v1/otheruser/[id]/route.ts/route.ts +0 -14
  23. package/cli/src/app/api/v1/otheruser/route.ts/route.ts +0 -7
  24. package/cli/src/app/api/v1/password/forgotpassword/route.ts/route.ts +0 -3
  25. package/cli/src/app/api/v1/password/resetpassword/route.ts/route.ts +0 -3
  26. package/cli/src/app/api/v1/payment/method/route.ts/route.ts +0 -4
  27. package/cli/src/app/api/v1/payment/route.ts/route.ts +0 -3
  28. package/cli/src/app/api/v1/payment/verify-fail/route.ts/route.ts +0 -3
  29. package/cli/src/app/api/v1/payment/verify-success/route.ts/route.ts +0 -3
  30. package/cli/src/app/api/v1/preload/route.ts/route.ts +0 -3
  31. package/cli/src/app/api/v1/searchable-resources/route.ts/route.ts +0 -11
  32. package/cli/src/app/api/v1/searchresult/route.ts/route.ts +0 -35
  33. package/cli/src/app/api/v1/sign-in/route.ts/route.ts +0 -3
  34. package/cli/src/app/api/v1/sign-out/route.ts/route.ts +0 -3
  35. package/cli/src/app/api/v1/sign-up/route.ts/route.ts +0 -3
  36. package/cli/src/app/api/v1/subscription/cancel/route.ts/route.ts +0 -3
  37. package/cli/src/app/api/v1/subscription/create/route.ts/route.ts +0 -3
  38. package/cli/src/app/api/v1/subscription/update/route.ts/route.ts +0 -3
  39. package/cli/src/app/api/v1/uimeta/route.ts/route.ts +0 -3
  40. package/cli/src/app/api/v1/uimetas/route.ts/route.ts +0 -3
  41. package/cli/src/app/api/v1/userpermission/route.ts/route.ts +0 -3
  42. package/cli/src/app/api/v1/visible-workspace/route.ts/route.ts +0 -5
  43. package/cli/src/app/api/v1/workspace/change/route.ts/route.ts +0 -5
  44. package/cli/src/app/favicon.ico +0 -0
  45. package/cli/src/app/layout.tsx +0 -42
  46. package/cli/src/app/page.tsx +0 -9
  47. package/cli/tailwind.config.ts +0 -13
  48. package/packages/base-repo/tools/git/commit-msg-script.ts +0 -42
  49. package/packages/base-repo/tools/git/pre-commit-script.ts +0 -431
  50. package/packages/level2/client/components/error-fallback/FdErrorFallback.jsx +0 -14
  51. package/packages/level2/client/components/feed/FdFeed.funcs.jsx +0 -65
  52. package/packages/level2/client/components/feed/FdFeed.jsx +0 -34
  53. package/packages/level2/client/components/feed/FdFeedActions.jsx +0 -15
  54. package/packages/level2/client/components/feed/FdFeedComments.jsx +0 -6
  55. package/packages/level2/client/components/feed/FdFeedEntry.jsx +0 -36
  56. package/packages/level2/client/components/feed/FdFeedHeader.jsx +0 -23
  57. package/packages/level2/client/components/feed/FdFeedReactionsSummary.jsx +0 -16
  58. package/packages/level2/client/components/providers/FdProviders.jsx +0 -28
  59. package/packages/level2/client/components/subscription-plan/FdSubscriptionPlan.jsx +0 -163
  60. package/packages/level2/client/components/wizard/FdWizard.jsx +0 -45
  61. package/packages/level2/client/components/wizard/FdWizardStepper.jsx +0 -55
  62. package/packages/level2/client/pages/dashboard-page/DashbordPage.jsx +0 -46
  63. package/packages/level2/client/pages/dynamic-layout-page/DynamicLayoutPage.jsx +0 -22
  64. package/packages/level2/client/pages/edit-password-page/EditPasswordPage.jsx +0 -8
  65. package/packages/level2/client/pages/edit-user-by-id-page/EditUserByIdPage.jsx +0 -14
  66. package/packages/level2/client/pages/edit-user-page/EditUserPage.jsx +0 -6
  67. package/packages/level2/client/pages/feed-page/FeedPage.jsx +0 -8
  68. package/packages/level2/client/pages/file-upload-page/FileUploadPage.jsx +0 -7
  69. package/packages/level2/client/pages/forgot-password-page/ForgotPasswordPage.jsx +0 -8
  70. package/packages/level2/client/pages/leads-viw-page/LeadsViewPage.jsx +0 -6
  71. package/packages/level2/client/pages/microsoft-page/MicrosoftPage.jsx +0 -16
  72. package/packages/level2/client/pages/payment-plan-page/PaymentPlanPage.jsx +0 -18
  73. package/packages/level2/client/pages/preload-page/PreloadPage.jsx +0 -25
  74. package/packages/level2/client/pages/reset-password-page/ResetPasswordPage.jsx +0 -8
  75. package/packages/level2/client/pages/screenshot-page/TestScreenshotPage.jsx +0 -23
  76. package/packages/level2/client/pages/sign-in-page/SignInPage.jsx +0 -24
  77. package/packages/level2/client/pages/sign-up-page/SignUpPage.jsx +0 -9
  78. package/packages/level2/client/pages/status-board-page/StatusBoardPage.jsx +0 -6
  79. package/packages/level2/client/pages/test-layout/TestLayout.jsx +0 -11
  80. package/packages/level2/client/pages/test-page/TestPage.jsx +0 -12
  81. package/packages/level2/client/pages/user-list-page/UserListPage.jsx +0 -4
  82. package/packages/level2/client/pages/view-page/ViewPage.jsx +0 -21
  83. package/packages/level2/client/payments/change-payment-method-field/ChangePaymentMethodField.jsx +0 -48
  84. package/packages/level2/client/payments/checkout-form/CheckoutForm.jsx +0 -95
  85. package/packages/level2/client/payments/checkout-form/CheckoutFormSubmit.jsx +0 -11
  86. package/packages/level2/client/payments/checkout-form/checkout-form-fields.jsx +0 -68
  87. package/packages/level2/client/website-scan/FdWebsiteScanResult.funcs.jsx +0 -12
  88. package/packages/level2/client/website-scan/FdWebsiteScanResult.jsx +0 -33
  89. package/packages/level2/client/website-scan/website-scan-data.jsx +0 -28
  90. package/packages/level2/client/website-scan/website-scan-icons/FacebookIcon.jsx +0 -6
  91. package/packages/level2/client/website-scan/website-scan-icons/FacebookPixelIcon.jsx +0 -49
  92. package/packages/level2/client/website-scan/website-scan-icons/GoogleAnalyticsIcon.jsx +0 -7
  93. package/packages/level2/client/website-scan/website-scan-icons/InstagramIcon.jsx +0 -32
  94. package/packages/level2/client/website-scan/website-scan-icons/LinkedinIcon.jsx +0 -6
  95. package/packages/level2/client/website-scan/website-scan-icons/OtherPlatformIcon.jsx +0 -110
  96. package/packages/level2/client/website-scan/website-scan-icons/ShopifyIcon.jsx +0 -46
  97. package/packages/level2/client/website-scan/website-scan-icons/SquarespaceIcon.jsx +0 -57
  98. package/packages/level2/client/website-scan/website-scan-icons/TiktokIcon.jsx +0 -15
  99. package/packages/level2/client/website-scan/website-scan-icons/WixIcon.jsx +0 -62
  100. package/packages/level2/client/website-scan/website-scan-icons/WordpressIcon.jsx +0 -53
  101. package/packages/level2/client/website-scan/website-scan-icons/XIcon.jsx +0 -6
  102. package/packages/level2/fd-app-toolbox/edit-other-user/EditOtherUser.jsx +0 -7
  103. package/packages/level2/fd-app-toolbox/edit-password-form/EditPasswordForm.jsx +0 -68
  104. package/packages/level2/fd-app-toolbox/edit-user-form/EditUserForm.jsx +0 -122
  105. package/packages/level2/fd-app-toolbox/edit-user-sheet/EditUserSheet.jsx +0 -35
  106. package/packages/level2/fd-app-toolbox/forgot-password-form/ForgotPasswordForm.jsx +0 -87
  107. package/packages/level2/fd-app-toolbox/layout/client-layout/ClientLayout.jsx +0 -19
  108. package/packages/level2/fd-app-toolbox/layout/client-root/ClientRoot.jsx +0 -32
  109. package/packages/level2/fd-app-toolbox/layout/hamburger-menu/FdHamburgerMenu.jsx +0 -47
  110. package/packages/level2/fd-app-toolbox/layout/navbar/FdNarrowNavbar.jsx +0 -40
  111. package/packages/level2/fd-app-toolbox/layout/sidebar/FdSidebar.jsx +0 -48
  112. package/packages/level2/fd-app-toolbox/layout/sidebar/sidebar-dropdown-menu/FdDropdownMenuItemTitle.jsx +0 -12
  113. package/packages/level2/fd-app-toolbox/layout/sidebar/sidebar-dropdown-menu/FdSidebarDropdownMenu.jsx +0 -81
  114. package/packages/level2/fd-app-toolbox/layout/sidebar/sidebar-resources-provider.jsx +0 -30
  115. package/packages/level2/fd-app-toolbox/layout/toolbar/FdToolbar.jsx +0 -89
  116. package/packages/level2/fd-app-toolbox/layout/toolbar/FdTopNav.jsx +0 -42
  117. package/packages/level2/fd-app-toolbox/layout/toolbar/title-provider/ToolbarTitleProvider.jsx +0 -10
  118. package/packages/level2/fd-app-toolbox/login-form/LoginForm.jsx +0 -165
  119. package/packages/level2/fd-app-toolbox/menu/notifications-menu/FdNotificationMenu.jsx +0 -43
  120. package/packages/level2/fd-app-toolbox/menu/notifications-menu/notification-list/FdNotificationList.jsx +0 -53
  121. package/packages/level2/fd-app-toolbox/menu/top-menu/FdTopMenu.jsx +0 -28
  122. package/packages/level2/fd-app-toolbox/menu/top-menu/top-menu-group/FdTopMenuGroup.jsx +0 -35
  123. package/packages/level2/fd-app-toolbox/menu/top-menu/top-menu-item/FdTopMenuItem.jsx +0 -47
  124. package/packages/level2/fd-app-toolbox/menu/user-dropdown-menu/FdUserDropdownMenu.jsx +0 -122
  125. package/packages/level2/fd-app-toolbox/menu/user-dropdown-menu/user-dropdown-menu-item/FdUserDropdownMenuItem.jsx +0 -56
  126. package/packages/level2/fd-app-toolbox/menu/visible-workspace-picker/FdVisibleWorkspacePicker.jsx +0 -36
  127. package/packages/level2/fd-app-toolbox/menu/workspace-picker/FdWorkspacePicker.jsx +0 -47
  128. package/packages/level2/fd-app-toolbox/providers/ThemeProvider/ThemeProvider.jsx +0 -27
  129. package/packages/level2/fd-app-toolbox/providers/auth-provider/AuthProvider.jsx +0 -38
  130. package/packages/level2/fd-app-toolbox/providers/sidebar-provider/FdSidebarContext.jsx +0 -17
  131. package/packages/level2/fd-app-toolbox/register-form/RegisterForm.jsx +0 -119
  132. package/packages/level2/fd-app-toolbox/report/FdChart.jsx +0 -120
  133. package/packages/level2/fd-app-toolbox/report/ReportChart.jsx +0 -29
  134. package/packages/level2/fd-app-toolbox/reset-password-form/ResetPasswordForm.jsx +0 -81
  135. package/packages/level2/fd-app-toolbox/search/FdSearch.jsx +0 -56
  136. package/packages/level2/fd-app-toolbox/search/search-dialog/FdSearchDialog.jsx +0 -72
  137. package/packages/level2/fd-app-toolbox/search/search-dialog-provider.jsx +0 -16
  138. package/packages/level2/fd-app-toolbox/search/search-input/FdSearchInput.jsx +0 -49
  139. package/packages/level2/fd-app-toolbox/search/search-resource-results/FdSearchResourcesResults.jsx +0 -36
  140. package/packages/level2/fd-app-toolbox/search/search-result/FdSearchResult.jsx +0 -46
  141. package/packages/level2/fd-app-toolbox/search/search-searchable-resource-results/FdSearchSearchableResourceResult.jsx +0 -43
  142. package/packages/level2/fd-app-toolbox/search/search-searchable-resource-results/FdSearchSearchableResourceResults.jsx +0 -22
  143. package/packages/level2/fd-app-toolbox/server/layout/private-layout/PrivateLayout.jsx +0 -32
  144. package/packages/level2/fd-app-toolbox/status-board/FdStatusBoard.jsx +0 -49
  145. package/packages/level2/fd-app-toolbox/status-board/status-board-item/FdStatusBoardItem.jsx +0 -17
  146. package/packages/level2/fd-app-toolbox/status-board/status-board-status/FdStatusBoardStatus.jsx +0 -27
  147. package/packages/level2/fd-app-toolbox/user-list/UserList.jsx +0 -58
  148. package/packages/level2/fd-component-toolbox/animation/FdLabelAnimation.jsx +0 -55
  149. package/packages/level2/fd-component-toolbox/avatar/FdAvatar.jsx +0 -50
  150. package/packages/level2/fd-component-toolbox/back-button/FdBackButton.jsx +0 -21
  151. package/packages/level2/fd-component-toolbox/badge/FdBadge.jsx +0 -19
  152. package/packages/level2/fd-component-toolbox/badge-toggle-list/FdBadgeToggleList.jsx +0 -47
  153. package/packages/level2/fd-component-toolbox/button/FdButton.jsx +0 -64
  154. package/packages/level2/fd-component-toolbox/calendar/FdCalendar.jsx +0 -68
  155. package/packages/level2/fd-component-toolbox/card/FdCard.jsx +0 -56
  156. package/packages/level2/fd-component-toolbox/card/FdCardBigDigits.jsx +0 -25
  157. package/packages/level2/fd-component-toolbox/chart/FdChart.jsx +0 -269
  158. package/packages/level2/fd-component-toolbox/checkbox/FdCheckbox.jsx +0 -39
  159. package/packages/level2/fd-component-toolbox/command/FdCommand.jsx +0 -123
  160. package/packages/level2/fd-component-toolbox/datepicker/FdDatePicker.jsx +0 -155
  161. package/packages/level2/fd-component-toolbox/dialog/FdDialog.jsx +0 -106
  162. package/packages/level2/fd-component-toolbox/dialog/YesOrNoDialog.jsx +0 -57
  163. package/packages/level2/fd-component-toolbox/drag-and-drop/FdDragDropContext.jsx +0 -19
  164. package/packages/level2/fd-component-toolbox/drag-and-drop/FdDraggable.jsx +0 -27
  165. package/packages/level2/fd-component-toolbox/drag-and-drop/FdDroppable.jsx +0 -22
  166. package/packages/level2/fd-component-toolbox/dropdown-menu/FdDropdownMenu.jsx +0 -198
  167. package/packages/level2/fd-component-toolbox/dynamic-layout/FdDynamicComponent.jsx +0 -27
  168. package/packages/level2/fd-component-toolbox/dynamic-layout/FdDynamicLayoutDragAndDrop.jsx +0 -78
  169. package/packages/level2/fd-component-toolbox/fade-out-text/FdFadeOutText.jsx +0 -52
  170. package/packages/level2/fd-component-toolbox/form/FdForm.jsx +0 -146
  171. package/packages/level2/fd-component-toolbox/icon/FdIcon.jsx +0 -192
  172. package/packages/level2/fd-component-toolbox/icon/custom-icons/FdFilterIcon.jsx +0 -11
  173. package/packages/level2/fd-component-toolbox/image/FdImage.jsx +0 -15
  174. package/packages/level2/fd-component-toolbox/input/FdInput.jsx +0 -94
  175. package/packages/level2/fd-component-toolbox/label/FdLabel.jsx +0 -19
  176. package/packages/level2/fd-component-toolbox/link/FdLink.jsx +0 -23
  177. package/packages/level2/fd-component-toolbox/list/FdList.jsx +0 -20
  178. package/packages/level2/fd-component-toolbox/list/list-item/FdListItem.jsx +0 -46
  179. package/packages/level2/fd-component-toolbox/loading/FdLoadingIndicator.jsx +0 -7
  180. package/packages/level2/fd-component-toolbox/logos/FacebookLogo.jsx +0 -11
  181. package/packages/level2/fd-component-toolbox/logos/GoogleLogo.jsx +0 -12
  182. package/packages/level2/fd-component-toolbox/logos/MicrosoftLogo.jsx +0 -11
  183. package/packages/level2/fd-component-toolbox/markdown/FdMarkdown.jsx +0 -105
  184. package/packages/level2/fd-component-toolbox/markdown/markdown-parser.jsx +0 -72
  185. package/packages/level2/fd-component-toolbox/multiselect/FdMultiselect.jsx +0 -240
  186. package/packages/level2/fd-component-toolbox/navigation/FdNavigation.jsx +0 -43
  187. package/packages/level2/fd-component-toolbox/navigation/navigation-item/FdNavigationItem.jsx +0 -23
  188. package/packages/level2/fd-component-toolbox/radio-group/FdRadioGroup.jsx +0 -46
  189. package/packages/level2/fd-component-toolbox/rich-text/FdRichText.jsx +0 -58
  190. package/packages/level2/fd-component-toolbox/save-status/FdSaveStatus.jsx +0 -40
  191. package/packages/level2/fd-component-toolbox/select/FdSelect.jsx +0 -173
  192. package/packages/level2/fd-component-toolbox/separator/FdSeparator.jsx +0 -19
  193. package/packages/level2/fd-component-toolbox/sheet/FdSheet.jsx +0 -121
  194. package/packages/level2/fd-component-toolbox/slide-toggle/FdSlideToggle.jsx +0 -57
  195. package/packages/level2/fd-component-toolbox/spinner/Spinner.jsx +0 -36
  196. package/packages/level2/fd-component-toolbox/subheading/FdSubHeading.jsx +0 -12
  197. package/packages/level2/fd-component-toolbox/switch/FdSwitch.jsx +0 -55
  198. package/packages/level2/fd-component-toolbox/tabs/FdTabs.jsx +0 -53
  199. package/packages/level2/fd-component-toolbox/textarea/FdTextArea.jsx +0 -42
  200. package/packages/level2/fd-component-toolbox/toaster/FdToaster.jsx +0 -20
  201. package/packages/level2/fd-component-toolbox/tooltip/FdTooltip.jsx +0 -80
  202. package/packages/level2/meta/browsers/base-multi-browser/FdBaseMultiBrowser.jsx +0 -72
  203. package/packages/level2/meta/browsers/base-multi-browser/base-multi-browser-dialog/FdBaseMultiBrowserDialog.jsx +0 -159
  204. package/packages/level2/meta/browsers/browser/FdBrowser.jsx +0 -58
  205. package/packages/level2/meta/browsers/browser/browser-dialog/FdBrowserDialog.jsx +0 -89
  206. package/packages/level2/meta/browsers/many-to-many-browser/FdManyToManyBrowser.jsx +0 -33
  207. package/packages/level2/meta/browsers/multi-browser/FdMultiBrowser.jsx +0 -32
  208. package/packages/level2/meta/card-list/FdCardList.jsx +0 -40
  209. package/packages/level2/meta/card-list/card/FdCard.jsx +0 -44
  210. package/packages/level2/meta/card-list/card/action-block/FdCardActionBlock.jsx +0 -70
  211. package/packages/level2/meta/card-list/card/content-block/FdCardContentBlock.jsx +0 -64
  212. package/packages/level2/meta/card-list/card/image-block/FdCardImage.jsx +0 -10
  213. package/packages/level2/meta/client/framework/hooks.jsx +0 -39
  214. package/packages/level2/meta/comment/FdComment.jsx +0 -16
  215. package/packages/level2/meta/comment/FdCommentList.jsx +0 -32
  216. package/packages/level2/meta/components/edit-image/FdEditImage.jsx +0 -42
  217. package/packages/level2/meta/components/edit-image/FdEditImageActionMenu.jsx +0 -31
  218. package/packages/level2/meta/components/edit-image/FdEditImageDropdownMenu.jsx +0 -42
  219. package/packages/level2/meta/components/file-upload/FileUpload.jsx +0 -103
  220. package/packages/level2/meta/components/file-upload/PreviewMedia.jsx +0 -36
  221. package/packages/level2/meta/components/multi-list/FdMultiList.jsx +0 -65
  222. package/packages/level2/meta/components/multi-list/FdMultiListEditResource.jsx +0 -31
  223. package/packages/level2/meta/edit-resource/FdEditResource.jsx +0 -135
  224. package/packages/level2/meta/edit-resource/FdEditResourceFormBody.jsx +0 -8
  225. package/packages/level2/meta/edit-resource/FdEditResourceHeader.jsx +0 -43
  226. package/packages/level2/meta/edit-resource/FdEditResourceSheet.jsx +0 -70
  227. package/packages/level2/meta/edit-resource/SaveCompleteProvider.jsx +0 -16
  228. package/packages/level2/meta/edit-resource/edit-link/FdEditLink.jsx +0 -48
  229. package/packages/level2/meta/edit-resource/edit-link/FdEditLinkResource.jsx +0 -18
  230. package/packages/level2/meta/edit-resource/edit-resource-dialog/FdEditResourceDialog.jsx +0 -34
  231. package/packages/level2/meta/edit-resource/edit-resource-property-block/FdEditResourceBlobField.jsx +0 -15
  232. package/packages/level2/meta/edit-resource/edit-resource-property-block/FdEditResourceEnumField.jsx +0 -35
  233. package/packages/level2/meta/edit-resource/edit-resource-property-block/FdEditResourceFlagsEnumField.jsx +0 -23
  234. package/packages/level2/meta/edit-resource/edit-resource-property-block/FdEditResourceImageField.jsx +0 -7
  235. package/packages/level2/meta/edit-resource/edit-resource-property-block/FdEditResourcePropertyBlock.jsx +0 -38
  236. package/packages/level2/meta/edit-resource/edit-resource-property-block/FdEditResourceRichTextField.jsx +0 -16
  237. package/packages/level2/meta/edit-resource/edit-resource-property-block/edit-resource-fields.jsx +0 -53
  238. package/packages/level2/meta/edit-resource/edit-resource-property-field/FdEditResourcePropertyField.jsx +0 -105
  239. package/packages/level2/meta/filtering/filter/FdEnumFlagFilter.jsx +0 -40
  240. package/packages/level2/meta/filtering/filter/FdFilter.jsx +0 -123
  241. package/packages/level2/meta/filtering/filter/filters/BooleanFilter.jsx +0 -25
  242. package/packages/level2/meta/filtering/filter/filters/DateFilter.jsx +0 -10
  243. package/packages/level2/meta/filtering/filter/filters/EnumFilter.jsx +0 -44
  244. package/packages/level2/meta/filtering/filter/filters/GuidFilter.jsx +0 -28
  245. package/packages/level2/meta/filtering/filter/filters/IntegerFilter.jsx +0 -28
  246. package/packages/level2/meta/filtering/filter/filters/TextFilter.jsx +0 -11
  247. package/packages/level2/meta/filtering/resource-filter-list/FdResourceFilterList.jsx +0 -120
  248. package/packages/level2/meta/filtering/resource-filter-list/resource-list-dropdown-menu/ResourceListDropdownMenu.funcs.jsx +0 -4
  249. package/packages/level2/meta/filtering/resource-filter-list/resource-list-dropdown-menu/ResourceListDropdownMenu.jsx +0 -43
  250. package/packages/level2/meta/providers/global-provider/FdGlobalContext.jsx +0 -17
  251. package/packages/level2/meta/resource-list/ResourceList.jsx +0 -63
  252. package/packages/level2/meta/resource-list/resource-add-button.jsx +0 -11
  253. package/packages/level2/meta/resource-list/resource-list-card/FdResourceListCard.jsx +0 -7
  254. package/packages/level2/meta/resource-list/resource-list-filter/FdResourceListFilter.jsx +0 -11
  255. package/packages/level2/meta/resource-list/resource-table-list/FdResourceTableList.jsx +0 -14
  256. package/packages/level2/meta/table/FdTable.jsx +0 -147
  257. package/packages/level2/meta/table/body/FdTableBody.jsx +0 -9
  258. package/packages/level2/meta/table/body-cell/FdActionBodyCell.jsx +0 -145
  259. package/packages/level2/meta/table/body-cell/FdBlobBodyCell.jsx +0 -27
  260. package/packages/level2/meta/table/body-cell/FdBodyCell.jsx +0 -133
  261. package/packages/level2/meta/table/body-cell/FdBodyCellValue.jsx +0 -59
  262. package/packages/level2/meta/table/body-cell/FdBodyExpandCell.jsx +0 -6
  263. package/packages/level2/meta/table/body-cell/FdBodyExpandPropertyCell.jsx +0 -22
  264. package/packages/level2/meta/table/body-cell/FdCustomActionLink.jsx +0 -16
  265. package/packages/level2/meta/table/body-cell/FdMultiselectCellTemplate.jsx +0 -39
  266. package/packages/level2/meta/table/body-cell/FdViewCell.jsx +0 -12
  267. package/packages/level2/meta/table/body-row/FdTableBodyRow.jsx +0 -49
  268. package/packages/level2/meta/table/header/FdTableHeader.jsx +0 -54
  269. package/packages/level2/meta/table/header-cell/FdResizable.jsx +0 -18
  270. package/packages/level2/meta/table/header-cell/FdResizableEdgeHandle.jsx +0 -4
  271. package/packages/level2/meta/table/header-cell/FdTableHeaderActionCell.jsx +0 -49
  272. package/packages/level2/meta/table/header-cell/FdTableHeaderCell.jsx +0 -89
  273. package/packages/level2/meta/table/header-cell/FdTableHeaderCellActionButton.jsx +0 -23
  274. package/packages/level2/meta/table/pager/FdPager.jsx +0 -72
  275. package/packages/level2/meta/table/table-custom-action/TableCustomAction.jsx +0 -26
  276. package/packages/level2/meta/view/FdView.jsx +0 -31
  277. package/packages/level2/meta/view/FdViewSheet.jsx +0 -103
  278. package/packages/level2/meta/view/view-resource/FdViewResource.jsx +0 -108
  279. package/packages/level2/meta/view/view-resource/templates/ManyToOneTableHeaderCellTemplate.jsx +0 -13
  280. package/src/app/error.jsx +0 -5
  281. package/src/app/global-error.jsx +0 -5
  282. package/src/app/loading.jsx +0 -11
  283. package/src/hd/footer/HdFooter.jsx +0 -27
  284. package/src/hd/footer/hd-footer-item/HdFooterItem.jsx +0 -14
  285. package/src/lm/ai-scan/AiScanAction.jsx +0 -21
  286. package/src/lm/ai-scan/cell-templates/AiScanWebsiteResultCellTemplate.jsx +0 -31
  287. package/src/lm/components/LmCardReport.jsx +0 -12
  288. package/src/lm/configs/lm-list-configs.jsx +0 -72
  289. package/src/lm/google-place/action-dropdown/GooglePlaceActionDropdown.jsx +0 -42
  290. package/src/lm/google-place/actions/GooglePlaceSaveToGroupAction.jsx +0 -22
  291. package/src/lm/google-place/cell-templates/GooglePlaceBusinessInfoCellTemplate.jsx +0 -59
  292. package/src/lm/google-place/cell-templates/GooglePlaceEmailsCellTemplate.jsx +0 -34
  293. package/src/lm/google-place/cell-templates/GooglePlaceScanAction.jsx +0 -15
  294. package/src/lm/lead/action-dropdown/LeadActionDropdown.jsx +0 -39
  295. package/src/lm/lead/actions/move-to-group-action/LeadMoveToGroupAction.jsx +0 -28
  296. package/src/lm/lead/cell-templates/LeadBusinessInfoCellTemplate.jsx +0 -64
  297. package/src/lm/lead/cell-templates/LeadScanAction.jsx +0 -15
  298. package/src/lm/lead/lead-google-place/LeadGooglePlaceIndicator.jsx +0 -8
  299. package/src/lm/lead/lead-google-place/LeadGooglePlaceIndicators.jsx +0 -17
  300. package/src/lm/lead/lead-google-place/LeadGooglePlaceInfo.jsx +0 -15
  301. package/src/lm/lead/view/LeadsView.jsx +0 -8
  302. package/src/lm/pages/HomePage.jsx +0 -53
  303. package/types-output/tsconfig.tsbuildinfo +0 -1
@@ -1,68 +0,0 @@
1
- import { cn } from "@fd-toolbox/lib/utils";
2
- import { DayPicker } from "react-day-picker";
3
- import React from "react";
4
- import { FdIcon, iconNames } from "@fd-component-toolbox/icon/FdIcon";
5
- const chevronMap = {
6
- left: {
7
- name: iconNames.chevronLeft,
8
- className: "absolute left-1 top-[0.1rem]",
9
- },
10
- right: {
11
- name: iconNames.chevronRight,
12
- className: "absolute right-1 top-[0.1rem]",
13
- },
14
- };
15
- function CalendarChevron({ orientation, className }) {
16
- if (!orientation || !(orientation in chevronMap)) {
17
- return <span className="hidden"/>;
18
- }
19
- const { name, className: baseClass } = chevronMap[orientation];
20
- return <FdIcon name={name} color="text-fd-accent" className={cn(baseClass, className)}/>;
21
- }
22
- /**
23
- * Calendar component with customizable date selection and navigation
24
- *
25
- * @param props - {@link CalendarProps}
26
- *
27
- * Based on [DayPicker](https://react-day-picker.js.org/)
28
- *
29
- * @example
30
- * ```tsx
31
- function MyComponent() {
32
- const [date, setDate] = useState<Date>(new Date());
33
-
34
- return (
35
- <FdCalendar mode="single" selected={date} onSelect={setDate} initialFocus/>
36
- );
37
- }
38
- * ```
39
- */
40
- export function FdCalendar({ className, classNames, showOutsideDays, ...props }) {
41
- return (<DayPicker showOutsideDays={showOutsideDays ?? true} className={cn("p-3", className)} classNames={{
42
- months: "flex !flex-col sm:flex-row",
43
- month: "space-y-4",
44
- caption: "flex justify-center pt-1 relative items-center",
45
- caption_label: "flex text-sm font-medium justify-center",
46
- nav: "relative flex space-x-1 items-center",
47
- nav_button: "size-7 bg-transparent p-0 opacity-50 hover:opacity-100",
48
- table: "w-full border-collapse space-y-1",
49
- head_row: "flex",
50
- head_cell: "text-muted-foreground rounded-md w-8 font-normal text-3.5",
51
- row: "flex w-full mt-2",
52
- day: cn("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].outside)]:bg-accent/50 [&:has([aria-selected].range_end)]:rounded-r-md", props.mode === "range"
53
- ? "[&:has(>.range_end)]:rounded-r-md [&:has(>.range_start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md"
54
- : "[&:has([aria-selected])]:rounded-md"),
55
- day_button: cn("size-8 p-0 font-normal aria-selected:opacity-100"),
56
- range_start: "range_start",
57
- range_end: "range_end",
58
- selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground rounded-md",
59
- today: "bg-accent text-accent-foreground rounded-md",
60
- outside: "outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
61
- disabled: "text-muted-foreground opacity-50",
62
- range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
63
- hidden: "invisible",
64
- ...classNames,
65
- }} components={{
66
- Chevron: CalendarChevron,
67
- }} {...props}/>);
68
- }
@@ -1,56 +0,0 @@
1
- import * as React from "react";
2
- import { cn } from "@fd-toolbox/lib/utils";
3
- /**
4
- * Main card container component
5
- *
6
- * Based on {@link https://ui.shadcn.com/docs/components/card Card}
7
- */
8
- function FdCard({ className, ref, ...props }) {
9
- return (<div ref={ref} className={cn("rounded-xl border bg-card text-card-foreground shadow", className)} {...props}/>);
10
- }
11
- FdCard.displayName = "FdCard";
12
- /**
13
- * Header section of the card component for organizing title and description elements
14
- *
15
- * Based on {@link https://ui.shadcn.com/docs/components/card Card}
16
- */
17
- function FdCardHeader({ className, ref, ...props }) {
18
- return (<div ref={ref} className={cn("flex flex-col space-y-1.5 text-nowrap p-6", className)} {...props}/>);
19
- }
20
- FdCardHeader.displayName = "FdCardHeader";
21
- /**
22
- * Title component for displaying the main heading of the card
23
- *
24
- * Based on {@link https://ui.shadcn.com/docs/components/card Card}
25
- */
26
- function FdCardTitle({ className, ref, ...props }) {
27
- return <h3 ref={ref} className={cn("font-semibold leading-none tracking-tight", className)} {...props}/>;
28
- }
29
- FdCardTitle.displayName = "FdCardTitle";
30
- /**
31
- * Description component for displaying secondary text content below the card title
32
- *
33
- * Based on {@link https://ui.shadcn.com/docs/components/card Card}
34
- */
35
- function FdCardDescription({ className, ref, ...props }) {
36
- return <p ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props}/>;
37
- }
38
- FdCardDescription.displayName = "FdCardDescription";
39
- /**
40
- * Content section of the card
41
- *
42
- * Based on {@link https://ui.shadcn.com/docs/components/card Card}
43
- */
44
- function FdCardContent({ className, ref, ...props }) {
45
- return <div ref={ref} className={cn("p-3 pt-0", className)} {...props}/>;
46
- }
47
- FdCardContent.displayName = "FdCardContent";
48
- /**
49
- * Footer section of the card
50
- * Based on {@link https://ui.shadcn.com/docs/components/card Card}
51
- */
52
- function FdCardFooter({ className, ref, ...props }) {
53
- return <div ref={ref} className={cn("flex items-center p-6 pt-0", className)} {...props}/>;
54
- }
55
- FdCardFooter.displayName = "FdCardFooter";
56
- export { FdCard, FdCardHeader, FdCardFooter, FdCardTitle, FdCardDescription, FdCardContent };
@@ -1,25 +0,0 @@
1
- import { FdCard, FdCardHeader, FdCardTitle, FdCardContent } from "@fd-component-toolbox/card/FdCard";
2
- import { cn } from "@fd-toolbox/lib/utils";
3
- /**
4
- * Card component for displaying large numerical values with title and subtitle
5
- *
6
- * @param props - {@link FdCardBigDigitsProps}
7
- *
8
- * @example
9
- * ```tsx
10
- * <FdCardBigDigits title="Some metric" value="85.7%" subtitle="+12% increase"/>
11
- * ```
12
- */
13
- export function FdCardBigDigits({ title, value, subtitle, className }) {
14
- const headerVariation = subtitle ? "" : "mb-2";
15
- const contentVariation = subtitle ? "" : "text-center text-3xl";
16
- return (<FdCard className={cn("size-full", className)}>
17
- <FdCardHeader className={cn("flex flex-row items-center justify-between py-2", headerVariation)}>
18
- <FdCardTitle className="text-sm font-medium">{title}</FdCardTitle>
19
- </FdCardHeader>
20
- <FdCardContent>
21
- <div className={cn("text-2xl font-bold", contentVariation)}>{value}</div>
22
- {subtitle && <p className="text-xs text-subtle-500">{subtitle}</p>}
23
- </FdCardContent>
24
- </FdCard>);
25
- }
@@ -1,269 +0,0 @@
1
- "use client";
2
- import * as React from "react";
3
- import * as RechartsPrimitive from "recharts";
4
- import { cn } from "@fd-toolbox/lib/utils";
5
- import { createError } from "@fd-toolbox/errors/errors";
6
- /**
7
- * Format: { THEME_NAME: CSS_SELECTOR }
8
- *
9
- * Based on {@link https://ui.shadcn.com/docs/components/chart Chart}
10
- */
11
- export const THEMES = { light: "", dark: ".dark" };
12
- /**
13
- * Context of FdChart elements with {@link ChartContextProps} config
14
- *
15
- * Based on {@link https://ui.shadcn.com/docs/components/chart Chart}
16
- */
17
- export const ChartContext = React.createContext(null);
18
- /**
19
- * Hook for accessing chart context config - {@link ChartContext}
20
- *
21
- * Based on {@link https://ui.shadcn.com/docs/components/chart Chart}
22
- */
23
- export function useChart() {
24
- const context = React.useContext(ChartContext);
25
- if (!context) {
26
- throw createError("useChart must be used within a <ChartContainer />");
27
- }
28
- return context;
29
- }
30
- /**
31
- * Custom tooltip content component with formatted values and indicators
32
- *
33
- * Based on {@link https://ui.shadcn.com/docs/components/chart Chart}
34
- *
35
- * @example
36
- * ```tsx
37
- * <FdChartContainer
38
- * config={{
39
- * "Sales": { label: "Sales" },
40
- * "Revenue": { label: "Revenue" },
41
- * "Users": { label: "Users" }
42
- * }}
43
- * >
44
- * ...
45
- * </FdChartContainer>
46
- * ```
47
- */
48
- export function FdChartContainer({ id, className, children, config, ref, ...props }) {
49
- const uniqueId = React.useId();
50
- const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
51
- const contextValue = React.useMemo(() => ({ config }), [config]);
52
- return (<ChartContext.Provider value={contextValue}>
53
- <div data-chart={chartId} ref={ref} className={cn("flex aspect-video justify-center text-xs " +
54
- "[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground" +
55
- "[&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50" +
56
- "[&_.recharts-curve.recharts-tooltip-cursor]:stroke-border" +
57
- "[&_.recharts-dot[stroke='#fff']]:stroke-transparent" +
58
- "[&_.recharts-layer]:outline-none" +
59
- "[&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border" +
60
- "[&_.recharts-radial-bar-background-sector]:fill-muted" +
61
- "[&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted" +
62
- "[&_.recharts-reference-line_[stroke='#ccc']]:stroke-border" +
63
- "[&_.recharts-sector[stroke='#fff']]:stroke-transparent" +
64
- "[&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none", className)} {...props}>
65
- <FdChartStyle id={chartId} config={config}/>
66
- <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>
67
- </div>
68
- </ChartContext.Provider>);
69
- }
70
- FdChartContainer.displayName = "Chart";
71
- /**
72
- * Component for managing chart theme-based styling
73
- *
74
- * Based on {@link https://ui.shadcn.com/docs/components/chart Chart}
75
- *
76
- * @param props - {@link FdChartStyleProps}
77
- *
78
- * @example
79
- * ```tsx
80
- * <FdChartStyle
81
- * config={{
82
- * "Sales": { label: "Sales" },
83
- * "Revenue": { label: "Revenue" },
84
- * "Users": { label: "Users" }
85
- * }}
86
- * />
87
- * ```
88
- */
89
- export function FdChartStyle({ id, config }) {
90
- const colorConfig = Object.entries(config).filter((entry) => entry[1].theme ?? entry[1].color);
91
- if (!colorConfig.length) {
92
- return null;
93
- }
94
- return (<style dangerouslySetInnerHTML={{
95
- __html: Object.entries(THEMES)
96
- .map(([theme, prefix]) => `
97
- ${prefix} [data-chart=${id}] {
98
- ${colorConfig
99
- .map(([key, itemConfig]) => {
100
- const color = itemConfig.theme?.[theme] ?? itemConfig.color;
101
- return color ? ` --color-${key}: ${color};` : null;
102
- })
103
- .join("\n")}
104
- }
105
- `)
106
- .join("\n"),
107
- }}/>);
108
- }
109
- /**
110
- * Original Tooltip component from Recharts library
111
- *
112
- * Based on {@link https://ui.shadcn.com/docs/components/chart Chart}
113
- *
114
- * @example
115
- * ```tsx
116
- <FdChartTooltip cursor={false} content={<FdChartTooltipContent />} />
117
- * ```
118
- */
119
- export const FdChartTooltip = RechartsPrimitive.Tooltip;
120
- /**
121
- * Custom tooltip content component with formatted values and indicators
122
- *
123
- * Based on {@link https://ui.shadcn.com/docs/components/chart Chart}
124
- *
125
- * @example
126
- * ```tsx
127
- <FdChartTooltip
128
- cursor={false}
129
- content={
130
- <FdChartTooltipContent
131
- indicator="dashed"
132
- hideLabel={false}
133
- hideIndicator={false}
134
- labelKey="category"
135
- />
136
- }
137
- />
138
- * ```
139
- */
140
- export function FdChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, ref, }) {
141
- const { config } = useChart();
142
- const effectiveIndicator = indicator ?? "dot";
143
- const tooltipLabel = React.useMemo(() => {
144
- if (hideLabel || !payload?.length) {
145
- return null;
146
- }
147
- const [item] = payload;
148
- const key = `${labelKey ?? item.dataKey ?? item.name ?? "value"}`;
149
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
150
- const value = !labelKey && typeof label === "string"
151
- ? (config[label]?.label ?? label)
152
- : itemConfig?.label;
153
- if (labelFormatter) {
154
- return <div className={cn("font-medium", labelClassName)}>{labelFormatter(value, payload)}</div>;
155
- }
156
- if (!value) {
157
- return null;
158
- }
159
- return <div className={cn("font-medium", labelClassName)}>{value}</div>;
160
- }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
161
- if (!active || !payload?.length) {
162
- return null;
163
- }
164
- const nestLabel = payload.length === 1 && effectiveIndicator !== "dot";
165
- return (<div ref={ref} className={cn("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className)}>
166
- {!nestLabel ? tooltipLabel : null}
167
- <div className="grid gap-1.5">
168
- {payload.map((item, index) => {
169
- const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
170
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
171
- const indicatorColor = color ?? item.payload.fill ?? item.color;
172
- return (<div key={item.dataKey} className={cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:size-2.5 [&>svg]:text-muted-foreground", effectiveIndicator === "dot" && "items-center")}>
173
- {formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index, item.payload)) : (<>
174
- {itemConfig?.icon ? (<itemConfig.icon />) : (!hideIndicator && (<div className={cn("shrink-0 rounded-sm border-[--color-border] bg-[--color-bg]", {
175
- "h-2.5 w-2.5": effectiveIndicator === "dot",
176
- "w-1": effectiveIndicator === "line",
177
- "w-0 border border-dashed bg-transparent": effectiveIndicator === "dashed",
178
- "my-0.5": nestLabel && effectiveIndicator === "dashed",
179
- })} style={{
180
- "--color-bg": indicatorColor,
181
- "--color-border": indicatorColor,
182
- }}/>))}
183
- <div className={cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center")}>
184
- <div className="grid gap-1.5">
185
- {nestLabel ? tooltipLabel : null}
186
- <span className="text-muted-foreground">
187
- {itemConfig?.label ?? item.name}
188
- </span>
189
- </div>
190
- {item.value && (<span className="font-mono font-medium tabular-nums text-foreground">
191
- {item.value.toLocaleString()}
192
- </span>)}
193
- </div>
194
- </>)}
195
- </div>);
196
- })}
197
- </div>
198
- </div>);
199
- }
200
- FdChartTooltipContent.displayName = "ChartTooltip";
201
- /**
202
- * Original Legend component from Recharts library
203
- *
204
- * Based on {@link https://ui.shadcn.com/docs/components/chart Chart}
205
- *
206
- *
207
- * @example
208
- * ```tsx
209
- <ChartLegend content={<ChartLegendContent />} />
210
- * ```
211
- */
212
- export const FdChartLegend = RechartsPrimitive.Legend;
213
- /**
214
- * Custom legend content component with support for icons and custom labels
215
- *
216
- * Based on {@link https://ui.shadcn.com/docs/components/chart Chart}
217
- *
218
- *
219
- * @example
220
- * ```tsx
221
- * <FdChartLegend content={<FdChartLegendContent hideIcon={false} verticalAlign="bottom" nameKey="category"/>}/>
222
- * ```
223
- */
224
- export function FdChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, ref, }) {
225
- const { config } = useChart();
226
- if (!payload?.length) {
227
- return null;
228
- }
229
- return (<div ref={ref} className={cn("flex items-center justify-center gap-4", (verticalAlign ?? "bottom") === "top" ? "pb-3" : "pt-3", className)}>
230
- {payload.map((item) => {
231
- const key = `${nameKey ?? item.dataKey ?? "value"}`;
232
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
233
- return (<div key={item.value} className={cn("flex items-center gap-1.5 [&>svg]:size-3 [&>svg]:text-muted-foreground")}>
234
- {itemConfig?.icon && !hideIcon ? (<itemConfig.icon />) : (<div className="size-2 shrink-0 rounded-sm" style={{
235
- backgroundColor: item.color,
236
- }}/>)}
237
- {itemConfig?.label}
238
- </div>);
239
- })}
240
- </div>);
241
- }
242
- FdChartLegendContent.displayName = "ChartLegend";
243
- /**
244
- * Gets chart element configuration from payload data.
245
- * @param config Chart configuration object - {@link FdChartConfig}
246
- * @param payload Chart data payload
247
- * @param key Key to look up in config
248
- * @returns FdChartConfigValue or undefined if no match found.
249
- *
250
- * Based on {@link https://ui.shadcn.com/docs/components/chart Chart}
251
- */
252
- export function getPayloadConfigFromPayload(config, payload, key) {
253
- if (typeof payload !== "object" || payload === null) {
254
- return undefined;
255
- }
256
- const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null
257
- ? payload.payload
258
- : undefined;
259
- let configLabelKey = key;
260
- if (key in payload && typeof payload[key] === "string") {
261
- configLabelKey = payload[key];
262
- }
263
- else if (payloadPayload &&
264
- key in payloadPayload &&
265
- typeof payloadPayload[key] === "string") {
266
- configLabelKey = payloadPayload[key];
267
- }
268
- return configLabelKey in config ? config[configLabelKey] : config[key];
269
- }
@@ -1,39 +0,0 @@
1
- "use client";
2
- import * as React from "react";
3
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
4
- import { cn } from "@fd-toolbox/lib/utils";
5
- import { FdIcon } from "@fd-component-toolbox/icon/FdIcon";
6
- /**
7
- * Checkbox component with optional label text
8
- *
9
- * @param props - {@link CheckboxProps}
10
- *
11
- * Based on [Checkbox](https://ui.shadcn.com/docs/components/checkbox)
12
- *
13
- * @example
14
- * ```tsx
15
- * function MyComponent() {
16
- * const [isChecked, setIsChecked] = useState(false);
17
- *
18
- * return (
19
- * <FdCheckbox text="Accept terms and conditions" checked={isChecked} onCheckedChange={setIsChecked}/>
20
- * );
21
- * }
22
- * ```
23
- */
24
- function FdCheckbox({ className, text, ...props }) {
25
- return (<div className="flex items-center">
26
- <CheckboxPrimitive.Root className={cn("peer size-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary", "disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className)} {...props}>
27
- <CheckboxPrimitive.Indicator className={cn("flex items-center justify-center text-current")}>
28
- <FdIcon name="check" color="text-fd-tertiary-200"/>
29
- </CheckboxPrimitive.Indicator>
30
- </CheckboxPrimitive.Root>
31
- {text && (<div className="ml-2 grid gap-1.5 leading-none">
32
- <label className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
33
- {text}
34
- </label>
35
- </div>)}
36
- </div>);
37
- }
38
- FdCheckbox.displayName = CheckboxPrimitive.Root.displayName;
39
- export { FdCheckbox };
@@ -1,123 +0,0 @@
1
- "use client";
2
- import * as React from "react";
3
- import { FdDialog, FdDialogContent } from "@fd-component-toolbox/dialog/FdDialog";
4
- import { Command as CommandPrimitive } from "cmdk";
5
- import { cn } from "@fd-toolbox/lib/utils";
6
- import { FdIcon, iconNames } from "@fd-component-toolbox/icon/FdIcon";
7
- /**
8
- * Root component that provides functionality and styling
9
- *
10
- * Based on {@link https://ui.shadcn.com/docs/components/command Command}
11
- */
12
- function FdCommand({ className, ref, ...props }) {
13
- return (<CommandPrimitive ref={ref} className={cn("flex size-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className)} {...props}/>);
14
- }
15
- FdCommand.displayName = CommandPrimitive.displayName;
16
- /**
17
- * Modal dialog wrapper with custom styling
18
- *
19
- * @param props - {@link CommandDialogProps}
20
- *
21
- * Based on {@link https://ui.shadcn.com/docs/components/command Command}
22
- *
23
- * @example
24
- * ```tsx
25
- * function MyComponent() {
26
- * const [open, setOpen] = useState(false);
27
- *
28
- return (
29
- <FdCommandDialog open={open} onOpenChange={setOpen}>
30
- ...
31
- </FdCommandDialog>
32
- );
33
- }
34
- * ```
35
- */
36
- function FdCommandDialog({ children, ...props }) {
37
- return (<FdDialog {...props}>
38
- <FdDialogContent className="overflow-hidden p-0">
39
- <FdCommand className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5">
40
- {children}
41
- </FdCommand>
42
- </FdDialogContent>
43
- </FdDialog>);
44
- }
45
- /**
46
- * Search input field with magnifying glass icon
47
- *
48
- * Based on {@link https://ui.shadcn.com/docs/components/command Command}
49
- *
50
- * @example
51
- * ```tsx
52
- * <FdCommandInput placeholder="Type a command or search..." />
53
- * ```
54
- */
55
- function FdCommandInput({ className, ref, ...props }) {
56
- return (<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
57
- <FdIcon name={iconNames.magnifyingGlass} className="mr-2 shrink-0 opacity-50"/>
58
- <CommandPrimitive.Input ref={ref} className={cn("flex h-9 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className)} {...props}/>
59
- </div>);
60
- }
61
- FdCommandInput.displayName = CommandPrimitive.Input.displayName;
62
- /**
63
- * Scrollable container for list items
64
- *
65
- * Based on {@link https://ui.shadcn.com/docs/components/command Command}
66
- */
67
- function FdCommandList({ className, ref, ...props }) {
68
- return (<CommandPrimitive.List ref={ref} className={cn("max-h-72 overflow-y-auto overflow-x-hidden", className)} {...props}/>);
69
- }
70
- FdCommandList.displayName = CommandPrimitive.List.displayName;
71
- /**
72
- * Empty state component when no items match search
73
- *
74
- * Based on {@link https://ui.shadcn.com/docs/components/command Command}
75
- */
76
- function FdCommandEmpty({ className, ref, ...props }) {
77
- return (<CommandPrimitive.Empty ref={ref} className={cn("py-6 text-center text-sm", className)} {...props}/>);
78
- }
79
- FdCommandEmpty.displayName = CommandPrimitive.Empty.displayName;
80
- /**
81
- * Container for grouping related items
82
- *
83
- * Based on {@link https://ui.shadcn.com/docs/components/command Command}
84
- *
85
- * @example
86
- * ```tsx
87
- * <FdCommandGroup heading="Settings">
88
- * ...
89
- * </FdCommandGroup>
90
- * ```
91
- */
92
- function FdCommandGroup({ className, ref, ...props }) {
93
- return (<CommandPrimitive.Group ref={ref} className={cn("overflow-hidden p-1 text-foreground [&_[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-muted-foreground", className)} {...props}/>);
94
- }
95
- FdCommandGroup.displayName = CommandPrimitive.Group.displayName;
96
- /**
97
- * Visual separator line between groups or items
98
- *
99
- * Based on {@link https://ui.shadcn.com/docs/components/command Command}
100
- */
101
- function FdCommandSeparator({ className, ref, ...props }) {
102
- return (<CommandPrimitive.Separator ref={ref} className={cn("-mx-1 h-px bg-border", className)} {...props}/>);
103
- }
104
- FdCommandSeparator.displayName = CommandPrimitive.Separator.displayName;
105
- /**
106
- * Interactive item with selection states
107
- *
108
- * Based on {@link https://ui.shadcn.com/docs/components/command Command}
109
- */
110
- function FdCommandItem({ className, ref, ...props }) {
111
- return (<CommandPrimitive.Item ref={ref} className={cn("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-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50", className)} {...props}/>);
112
- }
113
- FdCommandItem.displayName = CommandPrimitive.Item.displayName;
114
- /**
115
- * Display component for keyboard shortcuts
116
- *
117
- * Based on {@link https://ui.shadcn.com/docs/components/command Command}
118
- */
119
- function FdCommandShortcut({ className, ...props }) {
120
- return (<span className={cn("ml-auto text-xs tracking-widest text-muted-foreground", className)} {...props}/>);
121
- }
122
- FdCommandShortcut.displayName = "CommandShortcut";
123
- export { FdCommand, FdCommandDialog, FdCommandInput, FdCommandList, FdCommandEmpty, FdCommandGroup, FdCommandItem, FdCommandShortcut, FdCommandSeparator, };