@fernir2/saas-kit-cli 0.1.4 → 0.1.5
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.
- package/package.json +211 -7
- package/cli/.gitlab-ci.yml +0 -14
- package/cli/.husky/commit-msg +0 -1
- package/cli/.husky/pre-commit +0 -1
- package/cli/README.md +0 -101
- package/cli/bin/index.ts +0 -358
- package/cli/drizzle.config.ts +0 -12
- package/cli/global-setup.ts +0 -25
- package/cli/npm-commands/gen-meta/index.ts +0 -3
- package/cli/npm-commands/gen-schema/index.ts +0 -5
- package/cli/npm-commands/migrate-db/index.ts +0 -5
- package/cli/npm-commands/migrate-db/migrate-db.ts +0 -15
- package/cli/npm-commands/seed-db/index.ts +0 -5
- package/cli/npm-commands/seed-db/seed-db.ts +0 -15
- package/cli/playwright.config.ts +0 -34
- package/cli/postcss.config.mjs +0 -9
- package/cli/server.ts +0 -41
- package/cli/src/app/api/v1/[resourceName]/[id]/route.ts/route.ts +0 -11
- package/cli/src/app/api/v1/[resourceName]/route.ts/route.ts +0 -14
- package/cli/src/app/api/v1/[resourceName]/upsert/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/log/route.ts/route.ts +0 -7
- package/cli/src/app/api/v1/otheruser/[id]/route.ts/route.ts +0 -14
- package/cli/src/app/api/v1/otheruser/route.ts/route.ts +0 -7
- package/cli/src/app/api/v1/password/forgotpassword/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/password/resetpassword/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/payment/method/route.ts/route.ts +0 -4
- package/cli/src/app/api/v1/payment/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/payment/verify-fail/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/payment/verify-success/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/preload/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/searchable-resources/route.ts/route.ts +0 -11
- package/cli/src/app/api/v1/searchresult/route.ts/route.ts +0 -35
- package/cli/src/app/api/v1/sign-in/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/sign-out/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/sign-up/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/subscription/cancel/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/subscription/create/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/subscription/update/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/uimeta/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/uimetas/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/userpermission/route.ts/route.ts +0 -3
- package/cli/src/app/api/v1/visible-workspace/route.ts/route.ts +0 -5
- package/cli/src/app/api/v1/workspace/change/route.ts/route.ts +0 -5
- package/cli/src/app/favicon.ico +0 -0
- package/cli/src/app/layout.tsx +0 -42
- package/cli/src/app/page.tsx +0 -9
- package/cli/tailwind.config.ts +0 -13
- package/packages/base-repo/tools/git/commit-msg-script.ts +0 -42
- package/packages/base-repo/tools/git/pre-commit-script.ts +0 -431
- package/packages/level2/client/components/error-fallback/FdErrorFallback.jsx +0 -14
- package/packages/level2/client/components/feed/FdFeed.funcs.jsx +0 -65
- package/packages/level2/client/components/feed/FdFeed.jsx +0 -34
- package/packages/level2/client/components/feed/FdFeedActions.jsx +0 -15
- package/packages/level2/client/components/feed/FdFeedComments.jsx +0 -6
- package/packages/level2/client/components/feed/FdFeedEntry.jsx +0 -36
- package/packages/level2/client/components/feed/FdFeedHeader.jsx +0 -23
- package/packages/level2/client/components/feed/FdFeedReactionsSummary.jsx +0 -16
- package/packages/level2/client/components/providers/FdProviders.jsx +0 -28
- package/packages/level2/client/components/subscription-plan/FdSubscriptionPlan.jsx +0 -163
- package/packages/level2/client/components/wizard/FdWizard.jsx +0 -45
- package/packages/level2/client/components/wizard/FdWizardStepper.jsx +0 -55
- package/packages/level2/client/pages/dashboard-page/DashbordPage.jsx +0 -46
- package/packages/level2/client/pages/dynamic-layout-page/DynamicLayoutPage.jsx +0 -22
- package/packages/level2/client/pages/edit-password-page/EditPasswordPage.jsx +0 -8
- package/packages/level2/client/pages/edit-user-by-id-page/EditUserByIdPage.jsx +0 -14
- package/packages/level2/client/pages/edit-user-page/EditUserPage.jsx +0 -6
- package/packages/level2/client/pages/feed-page/FeedPage.jsx +0 -8
- package/packages/level2/client/pages/file-upload-page/FileUploadPage.jsx +0 -7
- package/packages/level2/client/pages/forgot-password-page/ForgotPasswordPage.jsx +0 -8
- package/packages/level2/client/pages/leads-viw-page/LeadsViewPage.jsx +0 -6
- package/packages/level2/client/pages/microsoft-page/MicrosoftPage.jsx +0 -16
- package/packages/level2/client/pages/payment-plan-page/PaymentPlanPage.jsx +0 -18
- package/packages/level2/client/pages/preload-page/PreloadPage.jsx +0 -25
- package/packages/level2/client/pages/reset-password-page/ResetPasswordPage.jsx +0 -8
- package/packages/level2/client/pages/screenshot-page/TestScreenshotPage.jsx +0 -23
- package/packages/level2/client/pages/sign-in-page/SignInPage.jsx +0 -24
- package/packages/level2/client/pages/sign-up-page/SignUpPage.jsx +0 -9
- package/packages/level2/client/pages/status-board-page/StatusBoardPage.jsx +0 -6
- package/packages/level2/client/pages/test-layout/TestLayout.jsx +0 -11
- package/packages/level2/client/pages/test-page/TestPage.jsx +0 -12
- package/packages/level2/client/pages/user-list-page/UserListPage.jsx +0 -4
- package/packages/level2/client/pages/view-page/ViewPage.jsx +0 -21
- package/packages/level2/client/payments/change-payment-method-field/ChangePaymentMethodField.jsx +0 -48
- package/packages/level2/client/payments/checkout-form/CheckoutForm.jsx +0 -95
- package/packages/level2/client/payments/checkout-form/CheckoutFormSubmit.jsx +0 -11
- package/packages/level2/client/payments/checkout-form/checkout-form-fields.jsx +0 -68
- package/packages/level2/client/website-scan/FdWebsiteScanResult.funcs.jsx +0 -12
- package/packages/level2/client/website-scan/FdWebsiteScanResult.jsx +0 -33
- package/packages/level2/client/website-scan/website-scan-data.jsx +0 -28
- package/packages/level2/client/website-scan/website-scan-icons/FacebookIcon.jsx +0 -6
- package/packages/level2/client/website-scan/website-scan-icons/FacebookPixelIcon.jsx +0 -49
- package/packages/level2/client/website-scan/website-scan-icons/GoogleAnalyticsIcon.jsx +0 -7
- package/packages/level2/client/website-scan/website-scan-icons/InstagramIcon.jsx +0 -32
- package/packages/level2/client/website-scan/website-scan-icons/LinkedinIcon.jsx +0 -6
- package/packages/level2/client/website-scan/website-scan-icons/OtherPlatformIcon.jsx +0 -110
- package/packages/level2/client/website-scan/website-scan-icons/ShopifyIcon.jsx +0 -46
- package/packages/level2/client/website-scan/website-scan-icons/SquarespaceIcon.jsx +0 -57
- package/packages/level2/client/website-scan/website-scan-icons/TiktokIcon.jsx +0 -15
- package/packages/level2/client/website-scan/website-scan-icons/WixIcon.jsx +0 -62
- package/packages/level2/client/website-scan/website-scan-icons/WordpressIcon.jsx +0 -53
- package/packages/level2/client/website-scan/website-scan-icons/XIcon.jsx +0 -6
- package/packages/level2/fd-app-toolbox/edit-other-user/EditOtherUser.jsx +0 -7
- package/packages/level2/fd-app-toolbox/edit-password-form/EditPasswordForm.jsx +0 -68
- package/packages/level2/fd-app-toolbox/edit-user-form/EditUserForm.jsx +0 -122
- package/packages/level2/fd-app-toolbox/edit-user-sheet/EditUserSheet.jsx +0 -35
- package/packages/level2/fd-app-toolbox/forgot-password-form/ForgotPasswordForm.jsx +0 -87
- package/packages/level2/fd-app-toolbox/layout/client-layout/ClientLayout.jsx +0 -19
- package/packages/level2/fd-app-toolbox/layout/client-root/ClientRoot.jsx +0 -32
- package/packages/level2/fd-app-toolbox/layout/hamburger-menu/FdHamburgerMenu.jsx +0 -47
- package/packages/level2/fd-app-toolbox/layout/navbar/FdNarrowNavbar.jsx +0 -40
- package/packages/level2/fd-app-toolbox/layout/sidebar/FdSidebar.jsx +0 -48
- package/packages/level2/fd-app-toolbox/layout/sidebar/sidebar-dropdown-menu/FdDropdownMenuItemTitle.jsx +0 -12
- package/packages/level2/fd-app-toolbox/layout/sidebar/sidebar-dropdown-menu/FdSidebarDropdownMenu.jsx +0 -81
- package/packages/level2/fd-app-toolbox/layout/sidebar/sidebar-resources-provider.jsx +0 -30
- package/packages/level2/fd-app-toolbox/layout/toolbar/FdToolbar.jsx +0 -89
- package/packages/level2/fd-app-toolbox/layout/toolbar/FdTopNav.jsx +0 -42
- package/packages/level2/fd-app-toolbox/layout/toolbar/title-provider/ToolbarTitleProvider.jsx +0 -10
- package/packages/level2/fd-app-toolbox/login-form/LoginForm.jsx +0 -165
- package/packages/level2/fd-app-toolbox/menu/notifications-menu/FdNotificationMenu.jsx +0 -43
- package/packages/level2/fd-app-toolbox/menu/notifications-menu/notification-list/FdNotificationList.jsx +0 -53
- package/packages/level2/fd-app-toolbox/menu/top-menu/FdTopMenu.jsx +0 -28
- package/packages/level2/fd-app-toolbox/menu/top-menu/top-menu-group/FdTopMenuGroup.jsx +0 -35
- package/packages/level2/fd-app-toolbox/menu/top-menu/top-menu-item/FdTopMenuItem.jsx +0 -47
- package/packages/level2/fd-app-toolbox/menu/user-dropdown-menu/FdUserDropdownMenu.jsx +0 -122
- package/packages/level2/fd-app-toolbox/menu/user-dropdown-menu/user-dropdown-menu-item/FdUserDropdownMenuItem.jsx +0 -56
- package/packages/level2/fd-app-toolbox/menu/visible-workspace-picker/FdVisibleWorkspacePicker.jsx +0 -36
- package/packages/level2/fd-app-toolbox/menu/workspace-picker/FdWorkspacePicker.jsx +0 -47
- package/packages/level2/fd-app-toolbox/providers/ThemeProvider/ThemeProvider.jsx +0 -27
- package/packages/level2/fd-app-toolbox/providers/auth-provider/AuthProvider.jsx +0 -38
- package/packages/level2/fd-app-toolbox/providers/sidebar-provider/FdSidebarContext.jsx +0 -17
- package/packages/level2/fd-app-toolbox/register-form/RegisterForm.jsx +0 -119
- package/packages/level2/fd-app-toolbox/report/FdChart.jsx +0 -120
- package/packages/level2/fd-app-toolbox/report/ReportChart.jsx +0 -29
- package/packages/level2/fd-app-toolbox/reset-password-form/ResetPasswordForm.jsx +0 -81
- package/packages/level2/fd-app-toolbox/search/FdSearch.jsx +0 -56
- package/packages/level2/fd-app-toolbox/search/search-dialog/FdSearchDialog.jsx +0 -72
- package/packages/level2/fd-app-toolbox/search/search-dialog-provider.jsx +0 -16
- package/packages/level2/fd-app-toolbox/search/search-input/FdSearchInput.jsx +0 -49
- package/packages/level2/fd-app-toolbox/search/search-resource-results/FdSearchResourcesResults.jsx +0 -36
- package/packages/level2/fd-app-toolbox/search/search-result/FdSearchResult.jsx +0 -46
- package/packages/level2/fd-app-toolbox/search/search-searchable-resource-results/FdSearchSearchableResourceResult.jsx +0 -43
- package/packages/level2/fd-app-toolbox/search/search-searchable-resource-results/FdSearchSearchableResourceResults.jsx +0 -22
- package/packages/level2/fd-app-toolbox/server/layout/private-layout/PrivateLayout.jsx +0 -32
- package/packages/level2/fd-app-toolbox/status-board/FdStatusBoard.jsx +0 -49
- package/packages/level2/fd-app-toolbox/status-board/status-board-item/FdStatusBoardItem.jsx +0 -17
- package/packages/level2/fd-app-toolbox/status-board/status-board-status/FdStatusBoardStatus.jsx +0 -27
- package/packages/level2/fd-app-toolbox/user-list/UserList.jsx +0 -58
- package/packages/level2/fd-component-toolbox/animation/FdLabelAnimation.jsx +0 -55
- package/packages/level2/fd-component-toolbox/avatar/FdAvatar.jsx +0 -50
- package/packages/level2/fd-component-toolbox/back-button/FdBackButton.jsx +0 -21
- package/packages/level2/fd-component-toolbox/badge/FdBadge.jsx +0 -19
- package/packages/level2/fd-component-toolbox/badge-toggle-list/FdBadgeToggleList.jsx +0 -47
- package/packages/level2/fd-component-toolbox/button/FdButton.jsx +0 -64
- package/packages/level2/fd-component-toolbox/calendar/FdCalendar.jsx +0 -68
- package/packages/level2/fd-component-toolbox/card/FdCard.jsx +0 -56
- package/packages/level2/fd-component-toolbox/card/FdCardBigDigits.jsx +0 -25
- package/packages/level2/fd-component-toolbox/chart/FdChart.jsx +0 -269
- package/packages/level2/fd-component-toolbox/checkbox/FdCheckbox.jsx +0 -39
- package/packages/level2/fd-component-toolbox/command/FdCommand.jsx +0 -123
- package/packages/level2/fd-component-toolbox/datepicker/FdDatePicker.jsx +0 -155
- package/packages/level2/fd-component-toolbox/dialog/FdDialog.jsx +0 -106
- package/packages/level2/fd-component-toolbox/dialog/YesOrNoDialog.jsx +0 -57
- package/packages/level2/fd-component-toolbox/drag-and-drop/FdDragDropContext.jsx +0 -19
- package/packages/level2/fd-component-toolbox/drag-and-drop/FdDraggable.jsx +0 -27
- package/packages/level2/fd-component-toolbox/drag-and-drop/FdDroppable.jsx +0 -22
- package/packages/level2/fd-component-toolbox/dropdown-menu/FdDropdownMenu.jsx +0 -198
- package/packages/level2/fd-component-toolbox/dynamic-layout/FdDynamicComponent.jsx +0 -27
- package/packages/level2/fd-component-toolbox/dynamic-layout/FdDynamicLayoutDragAndDrop.jsx +0 -78
- package/packages/level2/fd-component-toolbox/fade-out-text/FdFadeOutText.jsx +0 -52
- package/packages/level2/fd-component-toolbox/form/FdForm.jsx +0 -146
- package/packages/level2/fd-component-toolbox/icon/FdIcon.jsx +0 -192
- package/packages/level2/fd-component-toolbox/icon/custom-icons/FdFilterIcon.jsx +0 -11
- package/packages/level2/fd-component-toolbox/image/FdImage.jsx +0 -15
- package/packages/level2/fd-component-toolbox/input/FdInput.jsx +0 -94
- package/packages/level2/fd-component-toolbox/label/FdLabel.jsx +0 -19
- package/packages/level2/fd-component-toolbox/link/FdLink.jsx +0 -23
- package/packages/level2/fd-component-toolbox/list/FdList.jsx +0 -20
- package/packages/level2/fd-component-toolbox/list/list-item/FdListItem.jsx +0 -46
- package/packages/level2/fd-component-toolbox/loading/FdLoadingIndicator.jsx +0 -7
- package/packages/level2/fd-component-toolbox/logos/FacebookLogo.jsx +0 -11
- package/packages/level2/fd-component-toolbox/logos/GoogleLogo.jsx +0 -12
- package/packages/level2/fd-component-toolbox/logos/MicrosoftLogo.jsx +0 -11
- package/packages/level2/fd-component-toolbox/markdown/FdMarkdown.jsx +0 -105
- package/packages/level2/fd-component-toolbox/markdown/markdown-parser.jsx +0 -72
- package/packages/level2/fd-component-toolbox/multiselect/FdMultiselect.jsx +0 -240
- package/packages/level2/fd-component-toolbox/navigation/FdNavigation.jsx +0 -43
- package/packages/level2/fd-component-toolbox/navigation/navigation-item/FdNavigationItem.jsx +0 -23
- package/packages/level2/fd-component-toolbox/radio-group/FdRadioGroup.jsx +0 -46
- package/packages/level2/fd-component-toolbox/rich-text/FdRichText.jsx +0 -58
- package/packages/level2/fd-component-toolbox/save-status/FdSaveStatus.jsx +0 -40
- package/packages/level2/fd-component-toolbox/select/FdSelect.jsx +0 -173
- package/packages/level2/fd-component-toolbox/separator/FdSeparator.jsx +0 -19
- package/packages/level2/fd-component-toolbox/sheet/FdSheet.jsx +0 -121
- package/packages/level2/fd-component-toolbox/slide-toggle/FdSlideToggle.jsx +0 -57
- package/packages/level2/fd-component-toolbox/spinner/Spinner.jsx +0 -36
- package/packages/level2/fd-component-toolbox/subheading/FdSubHeading.jsx +0 -12
- package/packages/level2/fd-component-toolbox/switch/FdSwitch.jsx +0 -55
- package/packages/level2/fd-component-toolbox/tabs/FdTabs.jsx +0 -53
- package/packages/level2/fd-component-toolbox/textarea/FdTextArea.jsx +0 -42
- package/packages/level2/fd-component-toolbox/toaster/FdToaster.jsx +0 -20
- package/packages/level2/fd-component-toolbox/tooltip/FdTooltip.jsx +0 -80
- package/packages/level2/meta/browsers/base-multi-browser/FdBaseMultiBrowser.jsx +0 -72
- package/packages/level2/meta/browsers/base-multi-browser/base-multi-browser-dialog/FdBaseMultiBrowserDialog.jsx +0 -159
- package/packages/level2/meta/browsers/browser/FdBrowser.jsx +0 -58
- package/packages/level2/meta/browsers/browser/browser-dialog/FdBrowserDialog.jsx +0 -89
- package/packages/level2/meta/browsers/many-to-many-browser/FdManyToManyBrowser.jsx +0 -33
- package/packages/level2/meta/browsers/multi-browser/FdMultiBrowser.jsx +0 -32
- package/packages/level2/meta/card-list/FdCardList.jsx +0 -40
- package/packages/level2/meta/card-list/card/FdCard.jsx +0 -44
- package/packages/level2/meta/card-list/card/action-block/FdCardActionBlock.jsx +0 -70
- package/packages/level2/meta/card-list/card/content-block/FdCardContentBlock.jsx +0 -64
- package/packages/level2/meta/card-list/card/image-block/FdCardImage.jsx +0 -10
- package/packages/level2/meta/client/framework/hooks.jsx +0 -39
- package/packages/level2/meta/comment/FdComment.jsx +0 -16
- package/packages/level2/meta/comment/FdCommentList.jsx +0 -32
- package/packages/level2/meta/components/edit-image/FdEditImage.jsx +0 -42
- package/packages/level2/meta/components/edit-image/FdEditImageActionMenu.jsx +0 -31
- package/packages/level2/meta/components/edit-image/FdEditImageDropdownMenu.jsx +0 -42
- package/packages/level2/meta/components/file-upload/FileUpload.jsx +0 -103
- package/packages/level2/meta/components/file-upload/PreviewMedia.jsx +0 -36
- package/packages/level2/meta/components/multi-list/FdMultiList.jsx +0 -65
- package/packages/level2/meta/components/multi-list/FdMultiListEditResource.jsx +0 -31
- package/packages/level2/meta/edit-resource/FdEditResource.jsx +0 -135
- package/packages/level2/meta/edit-resource/FdEditResourceFormBody.jsx +0 -8
- package/packages/level2/meta/edit-resource/FdEditResourceHeader.jsx +0 -43
- package/packages/level2/meta/edit-resource/FdEditResourceSheet.jsx +0 -70
- package/packages/level2/meta/edit-resource/SaveCompleteProvider.jsx +0 -16
- package/packages/level2/meta/edit-resource/edit-link/FdEditLink.jsx +0 -48
- package/packages/level2/meta/edit-resource/edit-link/FdEditLinkResource.jsx +0 -18
- package/packages/level2/meta/edit-resource/edit-resource-dialog/FdEditResourceDialog.jsx +0 -34
- package/packages/level2/meta/edit-resource/edit-resource-property-block/FdEditResourceBlobField.jsx +0 -15
- package/packages/level2/meta/edit-resource/edit-resource-property-block/FdEditResourceEnumField.jsx +0 -35
- package/packages/level2/meta/edit-resource/edit-resource-property-block/FdEditResourceFlagsEnumField.jsx +0 -23
- package/packages/level2/meta/edit-resource/edit-resource-property-block/FdEditResourceImageField.jsx +0 -7
- package/packages/level2/meta/edit-resource/edit-resource-property-block/FdEditResourcePropertyBlock.jsx +0 -38
- package/packages/level2/meta/edit-resource/edit-resource-property-block/FdEditResourceRichTextField.jsx +0 -16
- package/packages/level2/meta/edit-resource/edit-resource-property-block/edit-resource-fields.jsx +0 -53
- package/packages/level2/meta/edit-resource/edit-resource-property-field/FdEditResourcePropertyField.jsx +0 -105
- package/packages/level2/meta/filtering/filter/FdEnumFlagFilter.jsx +0 -40
- package/packages/level2/meta/filtering/filter/FdFilter.jsx +0 -123
- package/packages/level2/meta/filtering/filter/filters/BooleanFilter.jsx +0 -25
- package/packages/level2/meta/filtering/filter/filters/DateFilter.jsx +0 -10
- package/packages/level2/meta/filtering/filter/filters/EnumFilter.jsx +0 -44
- package/packages/level2/meta/filtering/filter/filters/GuidFilter.jsx +0 -28
- package/packages/level2/meta/filtering/filter/filters/IntegerFilter.jsx +0 -28
- package/packages/level2/meta/filtering/filter/filters/TextFilter.jsx +0 -11
- package/packages/level2/meta/filtering/resource-filter-list/FdResourceFilterList.jsx +0 -120
- package/packages/level2/meta/filtering/resource-filter-list/resource-list-dropdown-menu/ResourceListDropdownMenu.funcs.jsx +0 -4
- package/packages/level2/meta/filtering/resource-filter-list/resource-list-dropdown-menu/ResourceListDropdownMenu.jsx +0 -43
- package/packages/level2/meta/providers/global-provider/FdGlobalContext.jsx +0 -17
- package/packages/level2/meta/resource-list/ResourceList.jsx +0 -63
- package/packages/level2/meta/resource-list/resource-add-button.jsx +0 -11
- package/packages/level2/meta/resource-list/resource-list-card/FdResourceListCard.jsx +0 -7
- package/packages/level2/meta/resource-list/resource-list-filter/FdResourceListFilter.jsx +0 -11
- package/packages/level2/meta/resource-list/resource-table-list/FdResourceTableList.jsx +0 -14
- package/packages/level2/meta/table/FdTable.jsx +0 -147
- package/packages/level2/meta/table/body/FdTableBody.jsx +0 -9
- package/packages/level2/meta/table/body-cell/FdActionBodyCell.jsx +0 -145
- package/packages/level2/meta/table/body-cell/FdBlobBodyCell.jsx +0 -27
- package/packages/level2/meta/table/body-cell/FdBodyCell.jsx +0 -133
- package/packages/level2/meta/table/body-cell/FdBodyCellValue.jsx +0 -59
- package/packages/level2/meta/table/body-cell/FdBodyExpandCell.jsx +0 -6
- package/packages/level2/meta/table/body-cell/FdBodyExpandPropertyCell.jsx +0 -22
- package/packages/level2/meta/table/body-cell/FdCustomActionLink.jsx +0 -16
- package/packages/level2/meta/table/body-cell/FdMultiselectCellTemplate.jsx +0 -39
- package/packages/level2/meta/table/body-cell/FdViewCell.jsx +0 -12
- package/packages/level2/meta/table/body-row/FdTableBodyRow.jsx +0 -49
- package/packages/level2/meta/table/header/FdTableHeader.jsx +0 -54
- package/packages/level2/meta/table/header-cell/FdResizable.jsx +0 -18
- package/packages/level2/meta/table/header-cell/FdResizableEdgeHandle.jsx +0 -4
- package/packages/level2/meta/table/header-cell/FdTableHeaderActionCell.jsx +0 -49
- package/packages/level2/meta/table/header-cell/FdTableHeaderCell.jsx +0 -89
- package/packages/level2/meta/table/header-cell/FdTableHeaderCellActionButton.jsx +0 -23
- package/packages/level2/meta/table/pager/FdPager.jsx +0 -72
- package/packages/level2/meta/table/table-custom-action/TableCustomAction.jsx +0 -26
- package/packages/level2/meta/view/FdView.jsx +0 -31
- package/packages/level2/meta/view/FdViewSheet.jsx +0 -103
- package/packages/level2/meta/view/view-resource/FdViewResource.jsx +0 -108
- package/packages/level2/meta/view/view-resource/templates/ManyToOneTableHeaderCellTemplate.jsx +0 -13
- package/src/app/error.jsx +0 -5
- package/src/app/global-error.jsx +0 -5
- package/src/app/loading.jsx +0 -11
- package/src/hd/footer/HdFooter.jsx +0 -27
- package/src/hd/footer/hd-footer-item/HdFooterItem.jsx +0 -14
- package/src/lm/ai-scan/AiScanAction.jsx +0 -21
- package/src/lm/ai-scan/cell-templates/AiScanWebsiteResultCellTemplate.jsx +0 -31
- package/src/lm/components/LmCardReport.jsx +0 -12
- package/src/lm/configs/lm-list-configs.jsx +0 -72
- package/src/lm/google-place/action-dropdown/GooglePlaceActionDropdown.jsx +0 -42
- package/src/lm/google-place/actions/GooglePlaceSaveToGroupAction.jsx +0 -22
- package/src/lm/google-place/cell-templates/GooglePlaceBusinessInfoCellTemplate.jsx +0 -59
- package/src/lm/google-place/cell-templates/GooglePlaceEmailsCellTemplate.jsx +0 -34
- package/src/lm/google-place/cell-templates/GooglePlaceScanAction.jsx +0 -15
- package/src/lm/lead/action-dropdown/LeadActionDropdown.jsx +0 -39
- package/src/lm/lead/actions/move-to-group-action/LeadMoveToGroupAction.jsx +0 -28
- package/src/lm/lead/cell-templates/LeadBusinessInfoCellTemplate.jsx +0 -64
- package/src/lm/lead/cell-templates/LeadScanAction.jsx +0 -15
- package/src/lm/lead/lead-google-place/LeadGooglePlaceIndicator.jsx +0 -8
- package/src/lm/lead/lead-google-place/LeadGooglePlaceIndicators.jsx +0 -17
- package/src/lm/lead/lead-google-place/LeadGooglePlaceInfo.jsx +0 -15
- package/src/lm/lead/view/LeadsView.jsx +0 -8
- package/src/lm/pages/HomePage.jsx +0 -53
- package/types-output/tsconfig.tsbuildinfo +0 -1
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
|
3
|
-
import { createDebouncedEditorUpdate, initializeEditor, } from "@fd-component-toolbox/rich-text/FdRichText.funcs";
|
|
4
|
-
import { cn } from "@fd-toolbox/lib/utils";
|
|
5
|
-
/**
|
|
6
|
-
* Rich text editor component with formatting capabilities and floating label
|
|
7
|
-
*
|
|
8
|
-
* Based on [Quill](https://quilljs.com/docs/quickstart)
|
|
9
|
-
*
|
|
10
|
-
* @param props - {@link FdRichTextProps}
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* function MyComponent() {
|
|
15
|
-
* const { error } = useFormField();
|
|
16
|
-
* const [value, setValue] = useState("");
|
|
17
|
-
*
|
|
18
|
-
* return (
|
|
19
|
-
* <FdRichText
|
|
20
|
-
* value={value}
|
|
21
|
-
* onChange={setValue}
|
|
22
|
-
* placeholder="Start typing..."
|
|
23
|
-
* debounceTime={500}
|
|
24
|
-
* defaultValue=""
|
|
25
|
-
* label="Description"
|
|
26
|
-
* isInvalid={!!error}
|
|
27
|
-
* onBlur={() => console.log("Field blurred")}
|
|
28
|
-
* />
|
|
29
|
-
* );
|
|
30
|
-
* }
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export function FdRichText({ value, onChange, placeholder, readOnly, className, debounceTime, onBlur, onFocus, onEditorCreated, defaultValue, label, isInvalid, id, }) {
|
|
34
|
-
const quillRef = useRef(null);
|
|
35
|
-
const quillEditorRef = useRef(null);
|
|
36
|
-
const debouncedEditorUpdate = useMemo(() => createDebouncedEditorUpdate(debounceTime ?? 300), [debounceTime]);
|
|
37
|
-
const initialize = useCallback(() => {
|
|
38
|
-
initializeEditor(onChange, { current: quillEditorRef.current ?? undefined }, onEditorCreated, quillRef?.current ?? undefined, placeholder ?? "Start typing...", readOnly, value, defaultValue, id);
|
|
39
|
-
}, [placeholder, readOnly, onChange, onEditorCreated, value, defaultValue, id]);
|
|
40
|
-
useEffect(() => {
|
|
41
|
-
if (quillEditorRef.current) {
|
|
42
|
-
debouncedEditorUpdate(value, quillEditorRef.current);
|
|
43
|
-
}
|
|
44
|
-
}, [value, debouncedEditorUpdate]);
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
initialize();
|
|
47
|
-
}, [initialize]);
|
|
48
|
-
function onEditorContainerClick() {
|
|
49
|
-
quillEditorRef.current?.focus();
|
|
50
|
-
}
|
|
51
|
-
return (<div className={cn("relative cursor-text shadow-sm")} onClick={onEditorContainerClick}>
|
|
52
|
-
<div ref={quillRef} className={cn("min-h-28 rounded-b-lg border border-border", className)} onBlur={onBlur} onFocus={onFocus}/>
|
|
53
|
-
|
|
54
|
-
{label && (<label className={cn("absolute left-1 top-0 -translate-y-1/2 bg-background px-1 text-xs font-medium text-muted-foreground", isInvalid && "text-destructive")}>
|
|
55
|
-
{label}
|
|
56
|
-
</label>)}
|
|
57
|
-
</div>);
|
|
58
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { FdIcon, iconNames, iconSizes } from "@fd-component-toolbox/icon/FdIcon";
|
|
2
|
-
import { FdTooltipProvider, FdTooltip, FdTooltipTrigger, FdTooltipContent, tooltipContentSides, tooltipContentSidesStrings, } from "@fd-component-toolbox/tooltip/FdTooltip";
|
|
3
|
-
import { elements } from "@fd-toolbox/constants/elements";
|
|
4
|
-
/**
|
|
5
|
-
* Renders a save status indicator with an icon and a tooltip.
|
|
6
|
-
*
|
|
7
|
-
* @param props - {@link FdSaveStatusProps}
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* // Shows a "check" icon to indicate that changes have been successfully saved.
|
|
12
|
-
* <FdSaveStatus isSaved={true} />
|
|
13
|
-
*
|
|
14
|
-
* // Shows a spinning "refresh" icon to indicate that changes are currently being saved.
|
|
15
|
-
* <FdSaveStatus isSaved={false} />
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export function FdSaveStatus({ isSaved }) {
|
|
19
|
-
return (<div className="flex size-5 items-center justify-center">
|
|
20
|
-
{isSaved ? (<FdTooltipProvider>
|
|
21
|
-
<FdTooltip>
|
|
22
|
-
<FdTooltipTrigger asChild>
|
|
23
|
-
<div>
|
|
24
|
-
<FdIcon name={iconNames.check} color="text-fd-green-accent" id={elements.view.viewSaved} size={iconSizes.medium}/>
|
|
25
|
-
</div>
|
|
26
|
-
</FdTooltipTrigger>
|
|
27
|
-
<FdTooltipContent side={tooltipContentSidesStrings[tooltipContentSides.bottom]}>Changes saved</FdTooltipContent>
|
|
28
|
-
</FdTooltip>
|
|
29
|
-
</FdTooltipProvider>) : (<FdTooltipProvider>
|
|
30
|
-
<FdTooltip>
|
|
31
|
-
<FdTooltipTrigger asChild>
|
|
32
|
-
<div>
|
|
33
|
-
<FdIcon name={iconNames.refresh} className="animate-spin" id={elements.view.viewSaving}/>
|
|
34
|
-
</div>
|
|
35
|
-
</FdTooltipTrigger>
|
|
36
|
-
<FdTooltipContent side={tooltipContentSidesStrings[tooltipContentSides.bottom]}>Saving changes</FdTooltipContent>
|
|
37
|
-
</FdTooltip>
|
|
38
|
-
</FdTooltipProvider>)}
|
|
39
|
-
</div>);
|
|
40
|
-
}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4
|
-
import { cn } from "@fd-toolbox/lib/utils";
|
|
5
|
-
import { FdIcon, iconNames } from "@fd-component-toolbox/icon/FdIcon";
|
|
6
|
-
import FdLabelAnimation from "@fd-component-toolbox/animation/FdLabelAnimation";
|
|
7
|
-
import { cva } from "class-variance-authority";
|
|
8
|
-
/**
|
|
9
|
-
* Using [class-variance-authority](https://cva.style/docs/getting-started/variants)
|
|
10
|
-
*/
|
|
11
|
-
export const selectVariants = cva("flex h-8 w-full items-center justify-between whitespace-nowrap bg-transparent py-2 pr-3 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", {
|
|
12
|
-
variants: {
|
|
13
|
-
variant: {
|
|
14
|
-
bordered: "rounded-md border border-input shadow-sm focus:ring-1 focus:ring-ring",
|
|
15
|
-
float: "rounded-none border-0 border-b border-border shadow-none transition hover:border-fd-accent",
|
|
16
|
-
},
|
|
17
|
-
size: {
|
|
18
|
-
default: "",
|
|
19
|
-
short: "",
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
defaultVariants: {
|
|
23
|
-
variant: "float",
|
|
24
|
-
size: "default",
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
/**
|
|
28
|
-
* Original Root component from Radix UI Select
|
|
29
|
-
*
|
|
30
|
-
* Based on [select](https://ui.shadcn.com/docs/components/select)
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```tsx
|
|
34
|
-
* function MyComponent() {
|
|
35
|
-
* const [value, setValue] = useState("");
|
|
36
|
-
*
|
|
37
|
-
* return (
|
|
38
|
-
* <FdSelect value={value} onValueChange={setValue}>
|
|
39
|
-
* ...
|
|
40
|
-
* </FdSelect>
|
|
41
|
-
* );
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
const FdSelect = SelectPrimitive.Root;
|
|
46
|
-
/**
|
|
47
|
-
* Original Group component from Radix UI Select
|
|
48
|
-
*
|
|
49
|
-
* Based on [select](https://ui.shadcn.com/docs/components/select)
|
|
50
|
-
*/
|
|
51
|
-
const FdSelectGroup = SelectPrimitive.Group;
|
|
52
|
-
/**
|
|
53
|
-
* Original Value component from Radix UI Select
|
|
54
|
-
*
|
|
55
|
-
* Based on [select](https://ui.shadcn.com/docs/components/select)
|
|
56
|
-
*/
|
|
57
|
-
const FdSelectValue = SelectPrimitive.Value;
|
|
58
|
-
/**
|
|
59
|
-
* Button component that triggers select dropdown
|
|
60
|
-
*
|
|
61
|
-
* @param props - {@link FdSelectTriggerProps}
|
|
62
|
-
*
|
|
63
|
-
* Based on [select](https://ui.shadcn.com/docs/components/select)
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* ```tsx
|
|
67
|
-
* function MyComponent() {
|
|
68
|
-
* const [value, setValue] = useState("");
|
|
69
|
-
*
|
|
70
|
-
* return (
|
|
71
|
-
* <FdSelectTrigger label="Status" shouldLabelAnimate={!!value} variant="float">
|
|
72
|
-
* ...
|
|
73
|
-
* </FdSelectTrigger>
|
|
74
|
-
* );
|
|
75
|
-
* }
|
|
76
|
-
* ```
|
|
77
|
-
*/
|
|
78
|
-
function isReactElementWithStringChildren(element) {
|
|
79
|
-
return React.isValidElement(element) &&
|
|
80
|
-
element.props !== null &&
|
|
81
|
-
typeof element.props === "object" &&
|
|
82
|
-
"children" in element.props &&
|
|
83
|
-
typeof element.props.children === "string";
|
|
84
|
-
}
|
|
85
|
-
function FdSelectTrigger({ className, children, label, shouldAnimate, skipAnimationOnce, variant, size, iconClassName, noUnderline, ref, ...props }) {
|
|
86
|
-
const isChildrenEmptyString = !children ||
|
|
87
|
-
(isReactElementWithStringChildren(children) &&
|
|
88
|
-
children.props.children.trim() === "");
|
|
89
|
-
const shouldShowIcon = isChildrenEmptyString || size !== "short";
|
|
90
|
-
return (<div className="flex w-full">
|
|
91
|
-
<SelectPrimitive.Trigger ref={ref} className={cn("flex h-8 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent py-2 pr-3 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-primary disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", selectVariants({ variant }), className, noUnderline && "border-0")} {...props}>
|
|
92
|
-
<div className={cn("relative h-full basis-full pl-3 text-start", !!label || "first-letter:text-sm")}>
|
|
93
|
-
{children}
|
|
94
|
-
{label && (<FdLabelAnimation label={label} shouldAnimate={shouldAnimate} skipAnimationOnce={skipAnimationOnce} className="top-0 max-w-full"/>)}
|
|
95
|
-
</div>
|
|
96
|
-
{shouldShowIcon && (<SelectPrimitive.Icon asChild>
|
|
97
|
-
<FdIcon name={iconNames.caretSort} className={cn("shrink-0 text-foreground opacity-50", iconClassName)}/>
|
|
98
|
-
</SelectPrimitive.Icon>)}
|
|
99
|
-
</SelectPrimitive.Trigger>
|
|
100
|
-
</div>);
|
|
101
|
-
}
|
|
102
|
-
FdSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
103
|
-
/**
|
|
104
|
-
* Button for scrolling select content up
|
|
105
|
-
*
|
|
106
|
-
* Based on [select](https://ui.shadcn.com/docs/components/select)
|
|
107
|
-
*/
|
|
108
|
-
function FdSelectScrollUpButton({ className, ref, ...props }) {
|
|
109
|
-
return (<SelectPrimitive.ScrollUpButton ref={ref} className={cn("flex cursor-default items-center justify-center py-1", className)} {...props}>
|
|
110
|
-
<FdIcon name={iconNames.caretSort}/>
|
|
111
|
-
</SelectPrimitive.ScrollUpButton>);
|
|
112
|
-
}
|
|
113
|
-
FdSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
114
|
-
/**
|
|
115
|
-
* Button for scrolling select content down
|
|
116
|
-
*
|
|
117
|
-
* Based on [select](https://ui.shadcn.com/docs/components/select)
|
|
118
|
-
*/
|
|
119
|
-
function FdSelectScrollDownButton({ className, ref, ...props }) {
|
|
120
|
-
return (<SelectPrimitive.ScrollDownButton ref={ref} className={cn("flex cursor-default items-center justify-center py-1", className)} {...props}>
|
|
121
|
-
<FdIcon name={iconNames.caretSort}/>
|
|
122
|
-
</SelectPrimitive.ScrollDownButton>);
|
|
123
|
-
}
|
|
124
|
-
FdSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
125
|
-
/**
|
|
126
|
-
* Container component for select dropdown content
|
|
127
|
-
*
|
|
128
|
-
* Based on [select](https://ui.shadcn.com/docs/components/select)
|
|
129
|
-
*/
|
|
130
|
-
function FdSelectContent({ className, children, position, ref, ...props }) {
|
|
131
|
-
return (<SelectPrimitive.Portal>
|
|
132
|
-
<SelectPrimitive.Content ref={ref} className={cn("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground 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", (position ?? "popper") === "popper" &&
|
|
133
|
-
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className)} position={position ?? "popper"} {...props}>
|
|
134
|
-
<FdSelectScrollUpButton />
|
|
135
|
-
<SelectPrimitive.Viewport className={cn("p-1", (position ?? "popper") === "popper" &&
|
|
136
|
-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")}>
|
|
137
|
-
{children}
|
|
138
|
-
</SelectPrimitive.Viewport>
|
|
139
|
-
<FdSelectScrollDownButton />
|
|
140
|
-
</SelectPrimitive.Content>
|
|
141
|
-
</SelectPrimitive.Portal>);
|
|
142
|
-
}
|
|
143
|
-
FdSelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
144
|
-
/**
|
|
145
|
-
* Label component for select groups
|
|
146
|
-
*
|
|
147
|
-
* Based on [select](https://ui.shadcn.com/docs/components/select)
|
|
148
|
-
*/
|
|
149
|
-
function FdSelectLabel({ className, ref, ...props }) {
|
|
150
|
-
return (<SelectPrimitive.Label ref={ref} className={cn("px-2 py-1.5 text-sm font-semibold", className)} {...props}/>);
|
|
151
|
-
}
|
|
152
|
-
FdSelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
153
|
-
function FdSelectItem({ className, id, children, ref, ...props }) {
|
|
154
|
-
return (<SelectPrimitive.Item id={id} ref={ref} className={cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-muted/50 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className)} {...props}>
|
|
155
|
-
<span className="absolute right-2 flex size-3.5 items-center justify-center">
|
|
156
|
-
<SelectPrimitive.ItemIndicator>
|
|
157
|
-
<FdIcon name={iconNames.check}/>
|
|
158
|
-
</SelectPrimitive.ItemIndicator>
|
|
159
|
-
</span>
|
|
160
|
-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
161
|
-
</SelectPrimitive.Item>);
|
|
162
|
-
}
|
|
163
|
-
FdSelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
164
|
-
/**
|
|
165
|
-
* Separator line between select options
|
|
166
|
-
*
|
|
167
|
-
* Based on [select](https://ui.shadcn.com/docs/components/select)
|
|
168
|
-
*/
|
|
169
|
-
function FdSelectSeparator({ className, ref, ...props }) {
|
|
170
|
-
return (<SelectPrimitive.Separator ref={ref} className={cn("-mx-1 my-1 h-px bg-muted", className)} {...props}/>);
|
|
171
|
-
}
|
|
172
|
-
FdSelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
173
|
-
export { FdSelect, FdSelectGroup, FdSelectValue, FdSelectTrigger, FdSelectContent, FdSelectLabel, FdSelectItem, FdSelectSeparator, FdSelectScrollUpButton, FdSelectScrollDownButton, };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
4
|
-
import { cn } from "@fd-toolbox/lib/utils";
|
|
5
|
-
/**
|
|
6
|
-
* Visual divider component for horizontal or vertical separation
|
|
7
|
-
*
|
|
8
|
-
* Based on [separator](https://ui.shadcn.com/docs/components/separator)
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* <FdSeparator orientation="vertical" />
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
function FdSeparator({ className, orientation, decorative, ref, ...props }) {
|
|
16
|
-
return (<SeparatorPrimitive.Root ref={ref} decorative={decorative ?? true} orientation={orientation ?? "horizontal"} className={cn("shrink-0 bg-border", (orientation ?? "horizontal") === "horizontal" ? "h-px w-full" : "h-full w-px", className)} {...props}/>);
|
|
17
|
-
}
|
|
18
|
-
FdSeparator.displayName = SeparatorPrimitive.Root.displayName;
|
|
19
|
-
export { FdSeparator };
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as FdSheetPrimitive from "@radix-ui/react-dialog";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
|
-
import { cn } from "@fd-toolbox/lib/utils";
|
|
5
|
-
import { FdIcon, iconNames } from "@fd-component-toolbox/icon/FdIcon";
|
|
6
|
-
import { sheetVariant } from "@fd-component-toolbox/sheet/fd-sheet-constants";
|
|
7
|
-
/**
|
|
8
|
-
* Root container for creating interactive overlay panels
|
|
9
|
-
*
|
|
10
|
-
* Based on {@link https://ui.shadcn.com/docs/components/sheet FdSheet}
|
|
11
|
-
*/
|
|
12
|
-
const FdSheet = FdSheetPrimitive.Root;
|
|
13
|
-
/**
|
|
14
|
-
* Trigger element that initiates the opening of an overlay panel
|
|
15
|
-
*
|
|
16
|
-
* Based on {@link https://ui.shadcn.com/docs/components/sheet FdSheet.Trigger}
|
|
17
|
-
*/
|
|
18
|
-
const FdSheetTrigger = FdSheetPrimitive.Trigger;
|
|
19
|
-
/**
|
|
20
|
-
* Button or element that closes the active overlay panel
|
|
21
|
-
*
|
|
22
|
-
* Based on {@link https://ui.shadcn.com/docs/components/sheet FdSheet.Close}
|
|
23
|
-
*/
|
|
24
|
-
const FdSheetClose = FdSheetPrimitive.Close;
|
|
25
|
-
/**
|
|
26
|
-
* Portal component for rendering content outside the current DOM hierarchy
|
|
27
|
-
*
|
|
28
|
-
* Based on {@link https://ui.shadcn.com/docs/components/sheet FdSheet.Portal}
|
|
29
|
-
*/
|
|
30
|
-
const FdSheetPortal = FdSheetPrimitive.Portal;
|
|
31
|
-
/**
|
|
32
|
-
* Overlay component that creates a darkened background behind the active panel.
|
|
33
|
-
*
|
|
34
|
-
* Based on {@link https://ui.shadcn.com/docs/components/sheet FdSheet.Overlay}
|
|
35
|
-
*/
|
|
36
|
-
function FdSheetOverlay({ className, ref, ...props }) {
|
|
37
|
-
return (<FdSheetPrimitive.Overlay className={cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)} {...props} ref={ref}/>);
|
|
38
|
-
}
|
|
39
|
-
FdSheetOverlay.displayName = FdSheetPrimitive.Overlay.displayName;
|
|
40
|
-
/**
|
|
41
|
-
* Using {@link https://cva.style/docs/getting-started/variants class-variance-authority}
|
|
42
|
-
*/
|
|
43
|
-
export const sheetVariants = cva("fixed z-50 gap-4 border-none bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out", {
|
|
44
|
-
variants: {
|
|
45
|
-
side: {
|
|
46
|
-
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
47
|
-
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
48
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left",
|
|
49
|
-
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right",
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
defaultVariants: {
|
|
53
|
-
side: "right",
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
/**
|
|
57
|
-
* Container for the content of the overlay panel with configurable positioning
|
|
58
|
-
*
|
|
59
|
-
* @param FdSheetContentProps {@link FdSheetContentProps}
|
|
60
|
-
*
|
|
61
|
-
* Based on {@link https://ui.shadcn.com/docs/components/sheet FdSheet.Content}
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
*```tsx
|
|
65
|
-
* <FdSheetContent side="right">
|
|
66
|
-
* ...
|
|
67
|
-
* </FdSheetContent>
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
function FdSheetContent({ side, className, children, ref, ...props }) {
|
|
71
|
-
return (<FdSheetPortal>
|
|
72
|
-
<FdSheetOverlay />
|
|
73
|
-
<FdSheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>
|
|
74
|
-
<div className="size-full focus:outline-none" tabIndex={0}>
|
|
75
|
-
<FdSheetPrimitive.Close hidden={side === sheetVariant.left} className="absolute right-3 top-2 z-50 rounded-md bg-fd-tertiary-50 opacity-100 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary sm:bg-transparent sm:opacity-70">
|
|
76
|
-
<FdIcon name={iconNames.cross2}/>
|
|
77
|
-
<span className="sr-only">Close</span>
|
|
78
|
-
</FdSheetPrimitive.Close>
|
|
79
|
-
{children}
|
|
80
|
-
</div>
|
|
81
|
-
</FdSheetPrimitive.Content>
|
|
82
|
-
</FdSheetPortal>);
|
|
83
|
-
}
|
|
84
|
-
FdSheetContent.displayName = FdSheetPrimitive.Content.displayName;
|
|
85
|
-
/**
|
|
86
|
-
* Header for a {@link FdSheet}
|
|
87
|
-
*
|
|
88
|
-
* Based on {@link https://ui.shadcn.com/docs/components/sheet FdSheet}
|
|
89
|
-
*/
|
|
90
|
-
function FdSheetHeader({ className, ...props }) {
|
|
91
|
-
return <div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props}/>;
|
|
92
|
-
}
|
|
93
|
-
FdSheetHeader.displayName = "SheetHeader";
|
|
94
|
-
/**
|
|
95
|
-
* Footer for a {@link FdSheet}
|
|
96
|
-
*
|
|
97
|
-
* Based on {@link https://ui.shadcn.com/docs/components/sheet FdSheet}
|
|
98
|
-
*/
|
|
99
|
-
function FdSheetFooter({ className, ...props }) {
|
|
100
|
-
return (<div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props}/>);
|
|
101
|
-
}
|
|
102
|
-
FdSheetFooter.displayName = "SheetFooter";
|
|
103
|
-
/**
|
|
104
|
-
* Title for a {@link FdSheet}
|
|
105
|
-
*
|
|
106
|
-
* Based on {@link https://ui.shadcn.com/docs/components/sheet FdSheet.Title}
|
|
107
|
-
*/
|
|
108
|
-
function FdSheetTitle({ className, ref, ...props }) {
|
|
109
|
-
return (<FdSheetPrimitive.Title ref={ref} className={cn("text-lg font-semibold text-foreground", className)} {...props}/>);
|
|
110
|
-
}
|
|
111
|
-
FdSheetTitle.displayName = FdSheetPrimitive.Title.displayName;
|
|
112
|
-
/**
|
|
113
|
-
* Description for a {@link FdSheet}
|
|
114
|
-
*
|
|
115
|
-
* Based on {@link https://ui.shadcn.com/docs/components/sheet FdSheet.Description}
|
|
116
|
-
*/
|
|
117
|
-
function FdSheetDescription({ className, ref, ...props }) {
|
|
118
|
-
return (<FdSheetPrimitive.Description ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props}/>);
|
|
119
|
-
}
|
|
120
|
-
FdSheetDescription.displayName = FdSheetPrimitive.Description.displayName;
|
|
121
|
-
export { FdSheet, FdSheetPortal, FdSheetOverlay, FdSheetTrigger, FdSheetClose, FdSheetContent, FdSheetHeader, FdSheetFooter, FdSheetTitle, FdSheetDescription, };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
4
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
5
|
-
import { cn } from "@fd-toolbox/lib/utils";
|
|
6
|
-
import { cva } from "class-variance-authority";
|
|
7
|
-
/**
|
|
8
|
-
* Switch component for toggling between two states
|
|
9
|
-
*
|
|
10
|
-
* Based on {@link https://ui.shadcn.com/docs/components/switch Switch}
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* function MyComponent() {
|
|
15
|
-
* const [isFeatureEnabled, setIsFeatureEnabled] = useState(false);
|
|
16
|
-
*
|
|
17
|
-
* return (
|
|
18
|
-
* <Switch checked={isFeatureEnabled} color="bg-blue-500" onCheckedChange={setIsFeatureEnabled}/>
|
|
19
|
-
* );
|
|
20
|
-
* };
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export function Switch({ className, ref, ...props }) {
|
|
24
|
-
return (<SwitchPrimitives.Root className={cn("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className)} {...props} ref={ref}>
|
|
25
|
-
<SwitchPrimitives.Thumb className={cn("pointer-events-none block size-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")}/>
|
|
26
|
-
</SwitchPrimitives.Root>);
|
|
27
|
-
}
|
|
28
|
-
Switch.displayName = "Switch";
|
|
29
|
-
/**
|
|
30
|
-
* Using {@link https://cva.style/docs/getting-started/variants class-variance-authority}
|
|
31
|
-
*/
|
|
32
|
-
const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
33
|
-
/**
|
|
34
|
-
* Styled label component
|
|
35
|
-
*
|
|
36
|
-
* Based on {@link https://ui.shadcn.com/docs/components/label Label}
|
|
37
|
-
*/
|
|
38
|
-
export function Label({ className, ref, ...props }) {
|
|
39
|
-
return <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props}/>;
|
|
40
|
-
}
|
|
41
|
-
Label.displayName = "Label";
|
|
42
|
-
/**
|
|
43
|
-
* Composite toggle component with a switch and label
|
|
44
|
-
*
|
|
45
|
-
* @param SlideToggleProps {@link SlideToggleProps}
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```tsx
|
|
49
|
-
* <FdSlideToggle text="Enable feature" isPrimary={false} color="bg-blue-500" onClick={...}/>
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
export function FdSlideToggle({ text, isPrimary, color, onClick }) {
|
|
53
|
-
return (<div className="flex items-center space-x-2">
|
|
54
|
-
<Switch id="switch" color={isPrimary ? "bg-primary" : color} onClick={onClick}/>
|
|
55
|
-
<Label htmlFor="switch">{text}</Label>
|
|
56
|
-
</div>);
|
|
57
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { cn } from "@fd-toolbox/lib/utils";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
|
-
import { Loader2 } from "lucide-react";
|
|
5
|
-
const spinnerVariants = cva("flex-col items-center justify-center", {
|
|
6
|
-
variants: {
|
|
7
|
-
show: {
|
|
8
|
-
true: "flex",
|
|
9
|
-
false: "hidden",
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
defaultVariants: {
|
|
13
|
-
show: true,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
const loaderVariants = cva("animate-spin text-primary", {
|
|
17
|
-
variants: {
|
|
18
|
-
size: {
|
|
19
|
-
small: "size-6",
|
|
20
|
-
medium: "size-8",
|
|
21
|
-
large: "size-12",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
defaultVariants: {
|
|
25
|
-
size: "medium",
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
/**
|
|
29
|
-
* Spinner for indicating loading state. Supports size.
|
|
30
|
-
*/
|
|
31
|
-
export function Spinner({ size, show, children, className }) {
|
|
32
|
-
return (<span className={spinnerVariants({ show })}>
|
|
33
|
-
<Loader2 className={cn(loaderVariants({ size }), className)}/>
|
|
34
|
-
{children}
|
|
35
|
-
</span>);
|
|
36
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { cn } from "@fd-toolbox/lib/utils";
|
|
3
|
-
/**
|
|
4
|
-
* Subheading component for secondary headings
|
|
5
|
-
*
|
|
6
|
-
* @param FdSubHeadingProps {@link FdSubHeadingProps}
|
|
7
|
-
*/
|
|
8
|
-
export function FdSubHeading({ children, className, ...props }) {
|
|
9
|
-
return (<h2 className={cn("pb-1.5 text-sm font-semibold text-muted-foreground", className)} {...props}>
|
|
10
|
-
{children}
|
|
11
|
-
</h2>);
|
|
12
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { useState, useEffect, useCallback } from "react";
|
|
4
|
-
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
5
|
-
import { cn } from "@fd-toolbox/lib/utils";
|
|
6
|
-
import { onInitFdSwitch } from "@fd-component-toolbox/switch/FdSwitch.funcs";
|
|
7
|
-
/**
|
|
8
|
-
* Advanced switch component with form integration and label
|
|
9
|
-
*
|
|
10
|
-
* @param FdSwitchProps {@link FdSwitchProps}
|
|
11
|
-
*
|
|
12
|
-
* Based on {@link https://ui.shadcn.com/docs/components/switch Switch}
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```tsx
|
|
16
|
-
* function MyForm() {
|
|
17
|
-
* const [isChecked, setIsChecked] = useState(false);
|
|
18
|
-
* const form = useForm();
|
|
19
|
-
*
|
|
20
|
-
* return (
|
|
21
|
-
* <FdSwitch
|
|
22
|
-
* text="Enable notifications"
|
|
23
|
-
* name="notifications"
|
|
24
|
-
* checked={isChecked}
|
|
25
|
-
* form={form}
|
|
26
|
-
* onCheckedChange={setIsChecked}
|
|
27
|
-
* readOnly={false}
|
|
28
|
-
* />
|
|
29
|
-
* );
|
|
30
|
-
* };
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export function FdSwitch({ className, text, form, name, checked, skipAnimationOnce, isDisabled, readOnly, ref, ...props }) {
|
|
34
|
-
const [isChecked, setIsChecked] = useState(checked);
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
onInitFdSwitch(name, checked, setIsChecked, form);
|
|
37
|
-
}, [checked, form, name]);
|
|
38
|
-
const onChange = useCallback((val) => {
|
|
39
|
-
if (!readOnly) {
|
|
40
|
-
setIsChecked(val);
|
|
41
|
-
form?.setValue(name, val);
|
|
42
|
-
}
|
|
43
|
-
}, [form, name, readOnly]);
|
|
44
|
-
return (<div className="flex h-9 items-center space-x-3 py-2">
|
|
45
|
-
<SwitchPrimitives.Root key={Number(skipAnimationOnce)} ref={ref} onCheckedChange={onChange} className={cn("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className)} checked={isChecked} disabled={isDisabled ?? false} {...props}>
|
|
46
|
-
<SwitchPrimitives.Thumb key={Number(skipAnimationOnce)} className={cn("pointer-events-none block size-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")}/>
|
|
47
|
-
</SwitchPrimitives.Root>
|
|
48
|
-
<div className="grid gap-1.5 leading-none">
|
|
49
|
-
<label className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
|
50
|
-
{text}
|
|
51
|
-
</label>
|
|
52
|
-
</div>
|
|
53
|
-
</div>);
|
|
54
|
-
}
|
|
55
|
-
FdSwitch.displayName = SwitchPrimitives.Root.displayName;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as Tabs from "@radix-ui/react-tabs";
|
|
2
|
-
/**
|
|
3
|
-
* Root container for tab
|
|
4
|
-
*
|
|
5
|
-
* Based on {@link https://ui.shadcn.com/docs/components/tabs Tabs}
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```tsx
|
|
9
|
-
* function MyComponent() {
|
|
10
|
-
* const [activeTab, setActiveTab] = useState("tab1");
|
|
11
|
-
*
|
|
12
|
-
* return (
|
|
13
|
-
* <FdTabs value={activeTab} onValueChange={setActiveTab}>
|
|
14
|
-
* ...
|
|
15
|
-
* </FdTabs>
|
|
16
|
-
* );
|
|
17
|
-
* }
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
const FdTabs = Tabs.Root;
|
|
21
|
-
/**
|
|
22
|
-
* Tab trigger for switching between tab contents
|
|
23
|
-
*
|
|
24
|
-
* Based on {@link https://ui.shadcn.com/docs/components/tabs Tabs.Trigger}
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```tsx
|
|
28
|
-
* <FdTabsTrigger value="tab1">
|
|
29
|
-
* ...
|
|
30
|
-
* </FdTabsTrigger>
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
const FdTabsTrigger = Tabs.Trigger;
|
|
34
|
-
/**
|
|
35
|
-
* Container for tab triggers
|
|
36
|
-
*
|
|
37
|
-
* Based on {@link https://ui.shadcn.com/docs/components/tabs Tabs.List}
|
|
38
|
-
*/
|
|
39
|
-
const FdTabsList = Tabs.List;
|
|
40
|
-
/**
|
|
41
|
-
* Content container for each tab
|
|
42
|
-
*
|
|
43
|
-
* Based on {@link https://ui.shadcn.com/docs/components/tabs Tabs.Content}
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```tsx
|
|
47
|
-
* <FdTabsContent value="tab1">
|
|
48
|
-
* ...
|
|
49
|
-
* </FdTabsContent>
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
const FdTabsContent = Tabs.Content;
|
|
53
|
-
export { FdTabs, FdTabsTrigger, FdTabsList, FdTabsContent };
|