ikoncomponents 1.5.7 → 1.5.8
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/README.md +36 -36
- package/bin.js +2 -0
- package/dist/commands/init.js +63 -0
- package/dist/index.js +14 -116
- package/dist/utlis/copyDir.js +7 -0
- package/package.json +17 -91
- package/templates/default/hooks/use-mobile.ts +19 -0
- package/templates/default/ikonS/accordion.tsx +66 -0
- package/templates/default/ikonS/alert-dialog.tsx +179 -0
- package/templates/default/ikonS/alert.tsx +66 -0
- package/templates/default/ikonS/aspect-ratio.tsx +11 -0
- package/templates/default/ikonS/avatar.tsx +53 -0
- package/templates/default/ikonS/badge.tsx +49 -0
- package/templates/default/ikonS/breadcrumb.tsx +109 -0
- package/templates/default/ikonS/button.tsx +64 -0
- package/templates/default/ikonS/calendar.tsx +227 -0
- package/templates/default/ikonS/card.tsx +92 -0
- package/templates/default/ikonS/checkbox.tsx +33 -0
- package/templates/default/ikonS/collapsible.tsx +33 -0
- package/templates/default/ikonS/command.tsx +184 -0
- package/templates/default/ikonS/date-input.tsx +259 -0
- package/templates/default/ikonS/date-range-picker.tsx +103 -0
- package/templates/default/ikonS/dialog.tsx +143 -0
- package/templates/default/ikonS/drawer.tsx +134 -0
- package/templates/default/ikonS/dropdown-menu.tsx +259 -0
- package/templates/default/ikonS/form.tsx +166 -0
- package/templates/default/ikonS/hover-card.tsx +44 -0
- package/templates/default/ikonS/input-otp.tsx +71 -0
- package/templates/default/ikonS/input.tsx +22 -0
- package/templates/default/ikonS/label.tsx +24 -0
- package/templates/default/ikonS/navigation-menu.tsx +195 -0
- package/templates/default/ikonS/popover.tsx +48 -0
- package/templates/default/ikonS/progress.tsx +40 -0
- package/templates/default/ikonS/radio-group.tsx +45 -0
- package/templates/default/ikonS/scroll-area.tsx +58 -0
- package/templates/default/ikonS/select.tsx +184 -0
- package/templates/default/ikonS/separator.tsx +28 -0
- package/templates/default/ikonS/sheet.tsx +139 -0
- package/templates/default/ikonS/sidebar.tsx +726 -0
- package/templates/default/ikonS/skeleton.tsx +15 -0
- package/templates/default/ikonS/slider.tsx +64 -0
- package/templates/default/ikonS/sonner.tsx +25 -0
- package/templates/default/ikonS/switch.tsx +31 -0
- package/templates/default/ikonS/table.tsx +116 -0
- package/templates/default/ikonS/tabs.tsx +67 -0
- package/templates/default/ikonS/textarea.tsx +18 -0
- package/templates/default/ikonS/toggle-group.tsx +83 -0
- package/templates/default/ikonS/toggle.tsx +47 -0
- package/templates/default/ikonS/tooltip.tsx +65 -0
- package/templates/default/ikonS/workflow.tsx +119 -0
- package/templates/default/ikoncomponents/action-menu/index.tsx +108 -0
- package/templates/default/ikoncomponents/action-menu/type.ts +18 -0
- package/templates/default/ikoncomponents/activity-sheet/index.tsx +63 -0
- package/templates/default/ikoncomponents/alert-dialog/dialog-context.tsx +65 -0
- package/templates/default/ikoncomponents/alert-dialog/index.tsx +80 -0
- package/templates/default/ikoncomponents/app-breadcrumb/BreadcrumbProvider.tsx +68 -0
- package/templates/default/ikoncomponents/app-breadcrumb/index.tsx +222 -0
- package/templates/default/ikoncomponents/big-calendar/big-calender-event/index.tsx +38 -0
- package/templates/default/ikoncomponents/big-calendar/big-calender-toolbar/index.tsx +81 -0
- package/templates/default/ikoncomponents/big-calendar/index.css +879 -0
- package/templates/default/ikoncomponents/big-calendar/index.tsx +59 -0
- package/templates/default/ikoncomponents/big-calendar/type.ts +37 -0
- package/templates/default/ikoncomponents/buttons/index.tsx +127 -0
- package/templates/default/ikoncomponents/combobox-input/index.tsx +75 -0
- package/templates/default/ikoncomponents/combobox-input/type.ts +14 -0
- package/templates/default/ikoncomponents/custom-combo-dropdown/index.tsx +242 -0
- package/templates/default/ikoncomponents/data-table/datatable-column-filter/index.tsx +80 -0
- package/templates/default/ikoncomponents/data-table/datatable-faceted-filter/index.tsx +149 -0
- package/templates/default/ikoncomponents/data-table/datatable-filter-menu/index.tsx +98 -0
- package/templates/default/ikoncomponents/data-table/datatable-pagination/index.tsx +119 -0
- package/templates/default/ikoncomponents/data-table/datatable-toolbar/index.tsx +45 -0
- package/templates/default/ikoncomponents/data-table/function.ts +7 -0
- package/templates/default/ikoncomponents/data-table/index.tsx +549 -0
- package/templates/default/ikoncomponents/data-table/type.ts +75 -0
- package/templates/default/ikoncomponents/e-chart/index.tsx +183 -0
- package/templates/default/ikoncomponents/file-input/index.tsx +27 -0
- package/templates/default/ikoncomponents/fileUpload/index.tsx +121 -0
- package/templates/default/ikoncomponents/form-fields/combobox-input/index.tsx +111 -0
- package/templates/default/ikoncomponents/form-fields/combobox-input-value/index.tsx +121 -0
- package/templates/default/ikoncomponents/form-fields/date-input/index.tsx +80 -0
- package/templates/default/ikoncomponents/form-fields/file-input/index.tsx +9 -0
- package/templates/default/ikoncomponents/form-fields/input/index.tsx +27 -0
- package/{dist/ikoncomponents/form-fields/multi-combobox-input/index.js → templates/default/ikoncomponents/form-fields/multi-combobox-input/index.tsx} +574 -381
- package/templates/default/ikoncomponents/form-fields/otp-input/index.tsx +39 -0
- package/templates/default/ikoncomponents/form-fields/password-input/index.tsx +52 -0
- package/templates/default/ikoncomponents/form-fields/phone-input/index.tsx +7 -0
- package/templates/default/ikoncomponents/form-fields/textarea/index.tsx +28 -0
- package/templates/default/ikoncomponents/form-fields/types/index.ts +46 -0
- package/templates/default/ikoncomponents/glowing-effect/index.tsx +171 -0
- package/templates/default/ikoncomponents/icon/index.tsx +22 -0
- package/templates/default/ikoncomponents/image-cropper-upload/components/cropperImg.css +19 -0
- package/{dist/ikoncomponents/image-cropper-upload/components/newCropper.js → templates/default/ikoncomponents/image-cropper-upload/components/newCropper.tsx} +117 -85
- package/templates/default/ikoncomponents/image-cropper-upload/components/newImageUploadForm.tsx +352 -0
- package/templates/default/ikoncomponents/image-cropper-upload/cropper-form/index.tsx +250 -0
- package/templates/default/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.tsx +32 -0
- package/{dist/ikoncomponents/image-cropper-upload/image-cropper/index.js → templates/default/ikoncomponents/image-cropper-upload/image-cropper/index.tsx} +119 -87
- package/templates/default/ikoncomponents/image-cropper-upload/index.tsx +95 -0
- package/templates/default/ikoncomponents/image-cropper-upload/utils/index.ts +117 -0
- package/templates/default/ikoncomponents/loading-spinner/index.tsx +43 -0
- package/templates/default/ikoncomponents/main-layout/RefreshContext.tsx +30 -0
- package/templates/default/ikoncomponents/main-layout/SidebarNavContext.tsx +103 -0
- package/templates/default/ikoncomponents/main-layout/app-sidebar.tsx +36 -0
- package/templates/default/ikoncomponents/main-layout/footer.tsx +21 -0
- package/templates/default/ikoncomponents/main-layout/header.tsx +53 -0
- package/templates/default/ikoncomponents/main-layout/index.tsx +38 -0
- package/templates/default/ikoncomponents/main-layout/main-sidebar.tsx +389 -0
- package/templates/default/ikoncomponents/main-layout/nav-main.tsx +103 -0
- package/templates/default/ikoncomponents/multi-combobox/index.tsx +345 -0
- package/templates/default/ikoncomponents/no-data/index.tsx +11 -0
- package/templates/default/ikoncomponents/page-wrapper/index.tsx +30 -0
- package/templates/default/ikoncomponents/password-strength-meter/index.tsx +49 -0
- package/templates/default/ikoncomponents/phone-input/index.tsx +72 -0
- package/templates/default/ikoncomponents/provider-wrapper/index.tsx +32 -0
- package/templates/default/ikoncomponents/search-input/index.tsx +18 -0
- package/templates/default/ikoncomponents/sheet/index.tsx +34 -0
- package/templates/default/ikoncomponents/simple-widget/index.tsx +54 -0
- package/templates/default/ikoncomponents/skeleton-loader/skeleton-table.tsx +34 -0
- package/templates/default/ikoncomponents/skeleton-loader/skeleton-widget.tsx +13 -0
- package/templates/default/ikoncomponents/tabs/index.tsx +139 -0
- package/{dist/ikoncomponents/tabs/type.d.ts → templates/default/ikoncomponents/tabs/type.ts} +20 -19
- package/{dist/ikoncomponents/theme-toggle-btn/index.js → templates/default/ikoncomponents/theme-toggle-btn/index.tsx} +189 -118
- package/templates/default/ikoncomponents/title-progress/index.tsx +41 -0
- package/templates/default/ikoncomponents/tooltip/index.tsx +17 -0
- package/templates/default/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.tsx +33 -0
- package/templates/default/ikoncomponents/twolevel-dropdown/index.tsx +279 -0
- package/templates/default/ikoncomponents/upload-tab/index.tsx +237 -0
- package/templates/default/ikoncomponents/widgets/index.tsx +81 -0
- package/templates/default/ikoncomponents/widgets/type.ts +11 -0
- package/templates/default/ikoncomponents/work-in-progress/index.tsx +16 -0
- package/templates/default/styles.css +1159 -0
- package/templates/default/utils/actions/account/index.ts +33 -0
- package/templates/default/utils/actions/account/type.ts +4 -0
- package/{dist/utils/actions/auth/index.js → templates/default/utils/actions/auth/index.ts} +69 -58
- package/templates/default/utils/actions/common/revalidate.ts +18 -0
- package/templates/default/utils/actions/common/type.ts +4 -0
- package/{dist/utils/actions/common/utils.js → templates/default/utils/actions/common/utils.ts} +28 -25
- package/templates/default/utils/actions/software/index.ts +106 -0
- package/templates/default/utils/api/accountService/index.ts +103 -0
- package/templates/default/utils/api/accountService/type.ts +4 -0
- package/templates/default/utils/api/file-upload/index.ts +103 -0
- package/templates/default/utils/api/file-upload/type.ts +8 -0
- package/{dist/utils/api/ikonBaseApi.js → templates/default/utils/api/ikonBaseApi.ts} +132 -104
- package/templates/default/utils/api/loginService/index.ts +106 -0
- package/{dist/utils/api/loginService/type.d.ts → templates/default/utils/api/loginService/type.ts} +35 -31
- package/templates/default/utils/api/softwareService/index.ts +356 -0
- package/templates/default/utils/api/softwareService/type.ts +62 -0
- package/{dist/utils/border-radius-provider.js → templates/default/utils/border-radius-provider.tsx} +59 -35
- package/templates/default/utils/cn.ts +6 -0
- package/{dist/utils/font-provider.js → templates/default/utils/font-provider.tsx} +61 -37
- package/templates/default/utils/session/cookieSession.ts +49 -0
- package/templates/default/utils/theme-provider/index.tsx +11 -0
- package/templates/default/utils/token-management/index.ts +115 -0
- package/templates/default/utils/token-management/types.ts +6 -0
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-mobile.js +0 -15
- package/dist/ikoncomponents/action-menu/index.d.ts +0 -5
- package/dist/ikoncomponents/action-menu/index.js +0 -42
- package/dist/ikoncomponents/action-menu/type.d.ts +0 -14
- package/dist/ikoncomponents/action-menu/type.js +0 -1
- package/dist/ikoncomponents/activity-sheet/index.d.ts +0 -11
- package/dist/ikoncomponents/activity-sheet/index.js +0 -23
- package/dist/ikoncomponents/alert-dialog/dialog-context.d.ts +0 -21
- package/dist/ikoncomponents/alert-dialog/dialog-context.js +0 -30
- package/dist/ikoncomponents/alert-dialog/index.d.ts +0 -14
- package/dist/ikoncomponents/alert-dialog/index.js +0 -20
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.d.ts +0 -18
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.js +0 -43
- package/dist/ikoncomponents/app-breadcrumb/index.d.ts +0 -5
- package/dist/ikoncomponents/app-breadcrumb/index.js +0 -57
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.d.ts +0 -5
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.js +0 -16
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.d.ts +0 -2
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.js +0 -39
- package/dist/ikoncomponents/big-calendar/index.d.ts +0 -3
- package/dist/ikoncomponents/big-calendar/index.js +0 -35
- package/dist/ikoncomponents/big-calendar/type.d.ts +0 -31
- package/dist/ikoncomponents/big-calendar/type.js +0 -1
- package/dist/ikoncomponents/buttons/index.d.ts +0 -18
- package/dist/ikoncomponents/buttons/index.js +0 -38
- package/dist/ikoncomponents/combobox-input/index.d.ts +0 -2
- package/dist/ikoncomponents/combobox-input/index.js +0 -18
- package/dist/ikoncomponents/combobox-input/type.d.ts +0 -13
- package/dist/ikoncomponents/combobox-input/type.js +0 -1
- package/dist/ikoncomponents/custom-combo-dropdown/index.d.ts +0 -21
- package/dist/ikoncomponents/custom-combo-dropdown/index.js +0 -85
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.d.ts +0 -2
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.js +0 -22
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.d.ts +0 -2
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.js +0 -35
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.d.ts +0 -2
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.js +0 -38
- package/dist/ikoncomponents/data-table/datatable-pagination/index.d.ts +0 -2
- package/dist/ikoncomponents/data-table/datatable-pagination/index.js +0 -13
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.d.ts +0 -2
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.js +0 -18
- package/dist/ikoncomponents/data-table/function.d.ts +0 -1
- package/dist/ikoncomponents/data-table/function.js +0 -6
- package/dist/ikoncomponents/data-table/index.d.ts +0 -2
- package/dist/ikoncomponents/data-table/index.js +0 -223
- package/dist/ikoncomponents/data-table/type.d.ts +0 -60
- package/dist/ikoncomponents/data-table/type.js +0 -1
- package/dist/ikoncomponents/e-chart/index.d.ts +0 -15
- package/dist/ikoncomponents/e-chart/index.js +0 -115
- package/dist/ikoncomponents/file-input/index.d.ts +0 -1
- package/dist/ikoncomponents/file-input/index.js +0 -21
- package/dist/ikoncomponents/fileUpload/index.d.ts +0 -15
- package/dist/ikoncomponents/fileUpload/index.js +0 -69
- package/dist/ikoncomponents/form-fields/combobox-input/index.d.ts +0 -2
- package/dist/ikoncomponents/form-fields/combobox-input/index.js +0 -21
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.d.ts +0 -18
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.js +0 -26
- package/dist/ikoncomponents/form-fields/date-input/index.d.ts +0 -2
- package/dist/ikoncomponents/form-fields/date-input/index.js +0 -15
- package/dist/ikoncomponents/form-fields/file-input/index.d.ts +0 -1
- package/dist/ikoncomponents/form-fields/file-input/index.js +0 -4
- package/dist/ikoncomponents/form-fields/input/index.d.ts +0 -2
- package/dist/ikoncomponents/form-fields/input/index.js +0 -18
- package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts +0 -6
- package/dist/ikoncomponents/form-fields/otp-input/index.d.ts +0 -2
- package/dist/ikoncomponents/form-fields/otp-input/index.js +0 -18
- package/dist/ikoncomponents/form-fields/phone-input/index.d.ts +0 -1
- package/dist/ikoncomponents/form-fields/phone-input/index.js +0 -4
- package/dist/ikoncomponents/form-fields/textarea/index.d.ts +0 -2
- package/dist/ikoncomponents/form-fields/textarea/index.js +0 -18
- package/dist/ikoncomponents/form-fields/types/index.d.ts +0 -36
- package/dist/ikoncomponents/form-fields/types/index.js +0 -1
- package/dist/ikoncomponents/glowing-effect/index.d.ts +0 -14
- package/dist/ikoncomponents/glowing-effect/index.js +0 -84
- package/dist/ikoncomponents/icon/index.d.ts +0 -8
- package/dist/ikoncomponents/icon/index.js +0 -23
- package/dist/ikoncomponents/image-cropper-upload/components/newCropper.d.ts +0 -15
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.d.ts +0 -7
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.js +0 -145
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.d.ts +0 -6
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.js +0 -92
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.d.ts +0 -6
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.js +0 -14
- package/dist/ikoncomponents/image-cropper-upload/image-cropper/index.d.ts +0 -14
- package/dist/ikoncomponents/image-cropper-upload/index.d.ts +0 -27
- package/dist/ikoncomponents/image-cropper-upload/index.js +0 -49
- package/dist/ikoncomponents/image-cropper-upload/utils/index.d.ts +0 -16
- package/dist/ikoncomponents/image-cropper-upload/utils/index.js +0 -73
- package/dist/ikoncomponents/loading-spinner/index.d.ts +0 -9
- package/dist/ikoncomponents/loading-spinner/index.js +0 -19
- package/dist/ikoncomponents/main-layout/RefreshContext.d.ts +0 -10
- package/dist/ikoncomponents/main-layout/RefreshContext.js +0 -17
- package/dist/ikoncomponents/main-layout/SidebarNavContext.d.ts +0 -33
- package/dist/ikoncomponents/main-layout/SidebarNavContext.js +0 -52
- package/dist/ikoncomponents/main-layout/app-sidebar.d.ts +0 -3
- package/dist/ikoncomponents/main-layout/app-sidebar.js +0 -24
- package/dist/ikoncomponents/main-layout/footer.d.ts +0 -1
- package/dist/ikoncomponents/main-layout/footer.js +0 -5
- package/dist/ikoncomponents/main-layout/header.d.ts +0 -3
- package/dist/ikoncomponents/main-layout/header.js +0 -15
- package/dist/ikoncomponents/main-layout/index.d.ts +0 -6
- package/dist/ikoncomponents/main-layout/index.js +0 -11
- package/dist/ikoncomponents/main-layout/main-sidebar.d.ts +0 -60
- package/dist/ikoncomponents/main-layout/main-sidebar.js +0 -119
- package/dist/ikoncomponents/main-layout/nav-main.d.ts +0 -11
- package/dist/ikoncomponents/main-layout/nav-main.js +0 -33
- package/dist/ikoncomponents/multi-combobox/index.d.ts +0 -13
- package/dist/ikoncomponents/multi-combobox/index.js +0 -202
- package/dist/ikoncomponents/no-data/index.d.ts +0 -3
- package/dist/ikoncomponents/no-data/index.js +0 -5
- package/dist/ikoncomponents/page-wrapper/index.d.ts +0 -9
- package/dist/ikoncomponents/page-wrapper/index.js +0 -7
- package/dist/ikoncomponents/password-strength-meter/index.d.ts +0 -3
- package/dist/ikoncomponents/password-strength-meter/index.js +0 -40
- package/dist/ikoncomponents/phone-input/index.d.ts +0 -1
- package/dist/ikoncomponents/phone-input/index.js +0 -41
- package/dist/ikoncomponents/provider-wrapper/index.d.ts +0 -6
- package/dist/ikoncomponents/provider-wrapper/index.js +0 -11
- package/dist/ikoncomponents/search-input/index.d.ts +0 -1
- package/dist/ikoncomponents/search-input/index.js +0 -19
- package/dist/ikoncomponents/sheet/index.d.ts +0 -10
- package/dist/ikoncomponents/sheet/index.js +0 -6
- package/dist/ikoncomponents/simple-widget/index.d.ts +0 -14
- package/dist/ikoncomponents/simple-widget/index.js +0 -14
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.d.ts +0 -5
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.js +0 -6
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.d.ts +0 -3
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.js +0 -5
- package/dist/ikoncomponents/tabs/index.d.ts +0 -2
- package/dist/ikoncomponents/tabs/index.js +0 -50
- package/dist/ikoncomponents/tabs/type.js +0 -2
- package/dist/ikoncomponents/theme-toggle-btn/index.d.ts +0 -1
- package/dist/ikoncomponents/title-progress/index.d.ts +0 -12
- package/dist/ikoncomponents/title-progress/index.js +0 -10
- package/dist/ikoncomponents/tooltip/index.d.ts +0 -5
- package/dist/ikoncomponents/tooltip/index.js +0 -5
- package/dist/ikoncomponents/twolevel-dropdown/index.d.ts +0 -31
- package/dist/ikoncomponents/twolevel-dropdown/index.js +0 -143
- package/dist/ikoncomponents/upload-tab/index.d.ts +0 -1
- package/dist/ikoncomponents/upload-tab/index.js +0 -92
- package/dist/ikoncomponents/widgets/index.d.ts +0 -2
- package/dist/ikoncomponents/widgets/index.js +0 -14
- package/dist/ikoncomponents/widgets/type.d.ts +0 -10
- package/dist/ikoncomponents/widgets/type.js +0 -2
- package/dist/ikoncomponents/work-in-progress/index.d.ts +0 -1
- package/dist/ikoncomponents/work-in-progress/index.js +0 -4
- package/dist/index.d.ts +0 -138
- package/dist/shadcn/accordion.d.ts +0 -7
- package/dist/shadcn/accordion.js +0 -33
- package/dist/shadcn/alert-dialog.d.ts +0 -20
- package/dist/shadcn/alert-dialog.js +0 -83
- package/dist/shadcn/alert.d.ts +0 -9
- package/dist/shadcn/alert.js +0 -38
- package/dist/shadcn/aspect-ratio.d.ts +0 -3
- package/dist/shadcn/aspect-ratio.js +0 -19
- package/dist/shadcn/avatar.d.ts +0 -6
- package/dist/shadcn/avatar.js +0 -28
- package/dist/shadcn/badge.d.ts +0 -9
- package/dist/shadcn/badge.js +0 -35
- package/dist/shadcn/breadcrumb.d.ts +0 -11
- package/dist/shadcn/breadcrumb.js +0 -45
- package/dist/shadcn/button.d.ts +0 -10
- package/dist/shadcn/button.js +0 -47
- package/dist/shadcn/calendar.d.ts +0 -8
- package/dist/shadcn/calendar.js +0 -61
- package/dist/shadcn/card.d.ts +0 -9
- package/dist/shadcn/card.js +0 -42
- package/dist/shadcn/checkbox.d.ts +0 -4
- package/dist/shadcn/checkbox.js +0 -21
- package/dist/shadcn/collapsible.d.ts +0 -5
- package/dist/shadcn/collapsible.js +0 -27
- package/dist/shadcn/command.d.ts +0 -18
- package/dist/shadcn/command.js +0 -54
- package/dist/shadcn/date-input.d.ts +0 -7
- package/dist/shadcn/date-input.js +0 -179
- package/dist/shadcn/date-range-picker.d.ts +0 -24
- package/dist/shadcn/date-range-picker.js +0 -45
- package/dist/shadcn/dialog.d.ts +0 -15
- package/dist/shadcn/dialog.js +0 -57
- package/dist/shadcn/drawer.d.ts +0 -13
- package/dist/shadcn/drawer.js +0 -56
- package/dist/shadcn/dropdown-menu.d.ts +0 -25
- package/dist/shadcn/dropdown-menu.js +0 -77
- package/dist/shadcn/form.d.ts +0 -24
- package/dist/shadcn/form.js +0 -70
- package/dist/shadcn/hover-card.d.ts +0 -6
- package/dist/shadcn/hover-card.js +0 -28
- package/dist/shadcn/input-otp.d.ts +0 -34
- package/dist/shadcn/input-otp.js +0 -40
- package/dist/shadcn/input.d.ts +0 -3
- package/dist/shadcn/input.js +0 -18
- package/dist/shadcn/label.d.ts +0 -4
- package/dist/shadcn/label.js +0 -20
- package/dist/shadcn/navigation-menu.d.ts +0 -16
- package/dist/shadcn/navigation-menu.js +0 -74
- package/dist/shadcn/popover.d.ts +0 -7
- package/dist/shadcn/popover.js +0 -32
- package/dist/shadcn/progress.d.ts +0 -8
- package/dist/shadcn/progress.js +0 -23
- package/dist/shadcn/radio-group.d.ts +0 -5
- package/dist/shadcn/radio-group.js +0 -25
- package/dist/shadcn/scroll-area.d.ts +0 -5
- package/dist/shadcn/scroll-area.js +0 -26
- package/dist/shadcn/select.d.ts +0 -15
- package/dist/shadcn/select.js +0 -59
- package/dist/shadcn/separator.d.ts +0 -4
- package/dist/shadcn/separator.js +0 -20
- package/dist/shadcn/sheet.d.ts +0 -13
- package/dist/shadcn/sheet.js +0 -61
- package/dist/shadcn/sidebar.d.ts +0 -69
- package/dist/shadcn/sidebar.js +0 -242
- package/dist/shadcn/skeleton.d.ts +0 -3
- package/dist/shadcn/skeleton.js +0 -18
- package/dist/shadcn/slider.d.ts +0 -4
- package/dist/shadcn/slider.js +0 -26
- package/dist/shadcn/sonner.d.ts +0 -3
- package/dist/shadcn/sonner.js +0 -25
- package/dist/shadcn/switch.d.ts +0 -4
- package/dist/shadcn/switch.js +0 -20
- package/dist/shadcn/table.d.ts +0 -10
- package/dist/shadcn/table.js +0 -47
- package/dist/shadcn/tabs.d.ts +0 -7
- package/dist/shadcn/tabs.js +0 -32
- package/dist/shadcn/textarea.d.ts +0 -3
- package/dist/shadcn/textarea.js +0 -18
- package/dist/shadcn/toggle-group.d.ts +0 -9
- package/dist/shadcn/toggle-group.js +0 -35
- package/dist/shadcn/toggle.d.ts +0 -9
- package/dist/shadcn/toggle.js +0 -38
- package/dist/shadcn/tooltip.d.ts +0 -7
- package/dist/shadcn/tooltip.js +0 -32
- package/dist/shadcn/workflow.d.ts +0 -20
- package/dist/shadcn/workflow.js +0 -20
- package/dist/styles.css +0 -6163
- package/dist/utils/actions/account/index.d.ts +0 -5
- package/dist/utils/actions/account/index.js +0 -28
- package/dist/utils/actions/account/type.d.ts +0 -4
- package/dist/utils/actions/account/type.js +0 -1
- package/dist/utils/actions/auth/index.d.ts +0 -7
- package/dist/utils/actions/common/utils.d.ts +0 -5
- package/dist/utils/actions/software/index.d.ts +0 -11
- package/dist/utils/actions/software/index.js +0 -75
- package/dist/utils/api/accountService/index.d.ts +0 -23
- package/dist/utils/api/accountService/index.js +0 -64
- package/dist/utils/api/accountService/type.d.ts +0 -4
- package/dist/utils/api/accountService/type.js +0 -1
- package/dist/utils/api/file-upload/index.d.ts +0 -5
- package/dist/utils/api/file-upload/index.js +0 -80
- package/dist/utils/api/file-upload/type.d.ts +0 -6
- package/dist/utils/api/file-upload/type.js +0 -1
- package/dist/utils/api/ikonBaseApi.d.ts +0 -12
- package/dist/utils/api/loginService/index.d.ts +0 -12
- package/dist/utils/api/loginService/index.js +0 -72
- package/dist/utils/api/loginService/type.js +0 -1
- package/dist/utils/api/softwareService/index.d.ts +0 -64
- package/dist/utils/api/softwareService/index.js +0 -212
- package/dist/utils/api/softwareService/type.d.ts +0 -54
- package/dist/utils/api/softwareService/type.js +0 -1
- package/dist/utils/border-radius-provider.d.ts +0 -11
- package/dist/utils/cn.d.ts +0 -2
- package/dist/utils/cn.js +0 -5
- package/dist/utils/font-provider.d.ts +0 -11
- package/dist/utils/session/cookieSession.d.ts +0 -8
- package/dist/utils/session/cookieSession.js +0 -33
- package/dist/utils/theme-provider/index.d.ts +0 -3
- package/dist/utils/theme-provider/index.js +0 -18
- package/dist/utils/token-management/index.d.ts +0 -10
- package/dist/utils/token-management/index.js +0 -69
- package/dist/utils/token-management/types.d.ts +0 -6
- package/dist/utils/token-management/types.js +0 -1
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { ChevronsUpDown } from "lucide-react";
|
|
5
|
-
import { cn } from "../../utils/cn";
|
|
6
|
-
import { Button } from "../../shadcn/button";
|
|
7
|
-
import { Command, CommandEmpty, CommandInput, CommandItem, CommandList, } from "../../shadcn/command";
|
|
8
|
-
import { Popover, PopoverContent, PopoverTrigger } from "../../shadcn/popover";
|
|
9
|
-
export function FrameworkItemDropdown({ processedData, value, onChange, placeholder = "Select items...", searchPlaceholder = "Search...", className, }) {
|
|
10
|
-
const [open, setOpen] = React.useState(false);
|
|
11
|
-
const [searchQuery, setSearchQuery] = React.useState("");
|
|
12
|
-
const { flatTree, itemMap } = processedData;
|
|
13
|
-
const selectionState = React.useMemo(() => {
|
|
14
|
-
const state = new Map();
|
|
15
|
-
const selectedSet = new Set(value);
|
|
16
|
-
[...flatTree].reverse().forEach((item) => {
|
|
17
|
-
const nodeInfo = itemMap[item.id];
|
|
18
|
-
if (!nodeInfo ||
|
|
19
|
-
!item.treatAsParent ||
|
|
20
|
-
nodeInfo.childrenIds.length === 0) {
|
|
21
|
-
if (selectedSet.has(item.id)) {
|
|
22
|
-
state.set(item.id, "checked");
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
const childStates = nodeInfo.childrenIds.map((childId) => state.get(childId));
|
|
27
|
-
const checkedCount = childStates.filter((s) => s === "checked").length;
|
|
28
|
-
const indeterminateCount = childStates.filter((s) => s === "indeterminate").length;
|
|
29
|
-
if (checkedCount === nodeInfo.childrenIds.length) {
|
|
30
|
-
state.set(item.id, "checked");
|
|
31
|
-
}
|
|
32
|
-
else if (checkedCount > 0 || indeterminateCount > 0) {
|
|
33
|
-
state.set(item.id, "indeterminate");
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
return state;
|
|
38
|
-
}, [value, flatTree, itemMap]);
|
|
39
|
-
const handleSelect = (item) => {
|
|
40
|
-
var _a, _b, _c;
|
|
41
|
-
const newSelectedIds = new Set(value);
|
|
42
|
-
const currentState = selectionState.get(item.id);
|
|
43
|
-
const shouldBeChecked = !(currentState === "checked" || currentState === "indeterminate");
|
|
44
|
-
const descendants = new Set();
|
|
45
|
-
const queue = [...(((_a = itemMap[item.id]) === null || _a === void 0 ? void 0 : _a.childrenIds) || [])];
|
|
46
|
-
while (queue.length > 0) {
|
|
47
|
-
const currentId = queue.shift();
|
|
48
|
-
descendants.add(currentId);
|
|
49
|
-
const children = ((_b = itemMap[currentId]) === null || _b === void 0 ? void 0 : _b.childrenIds) || [];
|
|
50
|
-
children.forEach((childId) => queue.push(childId));
|
|
51
|
-
}
|
|
52
|
-
if (shouldBeChecked) {
|
|
53
|
-
newSelectedIds.add(item.id);
|
|
54
|
-
descendants.forEach((id) => newSelectedIds.add(id));
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
newSelectedIds.delete(item.id);
|
|
58
|
-
descendants.forEach((id) => newSelectedIds.delete(id));
|
|
59
|
-
}
|
|
60
|
-
let parentId = (_c = itemMap[item.id]) === null || _c === void 0 ? void 0 : _c.parentId;
|
|
61
|
-
while (parentId) {
|
|
62
|
-
const parentInfo = itemMap[parentId];
|
|
63
|
-
if (parentInfo && parentInfo.childrenIds.length > 0) {
|
|
64
|
-
const areAllChildrenSelected = parentInfo.childrenIds.every((childId) => newSelectedIds.has(childId));
|
|
65
|
-
if (areAllChildrenSelected) {
|
|
66
|
-
newSelectedIds.add(parentId);
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
newSelectedIds.delete(parentId);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
parentId = parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.parentId;
|
|
73
|
-
}
|
|
74
|
-
onChange(Array.from(newSelectedIds));
|
|
75
|
-
};
|
|
76
|
-
const filteredItems = React.useMemo(() => {
|
|
77
|
-
if (!searchQuery)
|
|
78
|
-
return flatTree.slice(); // Always return a new array in original order
|
|
79
|
-
const lowercasedQuery = searchQuery.toLowerCase();
|
|
80
|
-
const matchedIds = new Set();
|
|
81
|
-
// Step 1: collect directly matched items
|
|
82
|
-
flatTree.forEach((item) => {
|
|
83
|
-
const matches = item.title.toLowerCase().includes(lowercasedQuery) ||
|
|
84
|
-
item.description.toLowerCase().includes(lowercasedQuery) ||
|
|
85
|
-
item.index.toLowerCase().includes(lowercasedQuery);
|
|
86
|
-
if (matches) {
|
|
87
|
-
matchedIds.add(item.id);
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
// Step 2: collect ancestors and descendants
|
|
91
|
-
const expandedIds = new Set(matchedIds);
|
|
92
|
-
const addAncestors = (id) => {
|
|
93
|
-
var _a;
|
|
94
|
-
let current = id;
|
|
95
|
-
while (current) {
|
|
96
|
-
const parentId = (_a = itemMap[current]) === null || _a === void 0 ? void 0 : _a.parentId;
|
|
97
|
-
if (parentId && !expandedIds.has(parentId)) {
|
|
98
|
-
expandedIds.add(parentId);
|
|
99
|
-
current = parentId;
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
break;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
const addDescendants = (id) => {
|
|
107
|
-
var _a;
|
|
108
|
-
const children = ((_a = itemMap[id]) === null || _a === void 0 ? void 0 : _a.childrenIds) || [];
|
|
109
|
-
for (const childId of children) {
|
|
110
|
-
if (!expandedIds.has(childId)) {
|
|
111
|
-
expandedIds.add(childId);
|
|
112
|
-
addDescendants(childId);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
matchedIds.forEach((id) => {
|
|
117
|
-
addAncestors(id);
|
|
118
|
-
addDescendants(id);
|
|
119
|
-
});
|
|
120
|
-
// Step 3: Return nodes in the original flatTree order, but only those in expandedIds
|
|
121
|
-
return flatTree.filter((node) => expandedIds.has(node.id));
|
|
122
|
-
}, [searchQuery, flatTree, itemMap]);
|
|
123
|
-
const getSelectedLabel = () => {
|
|
124
|
-
const leafNodeIds = value.filter((id) => {
|
|
125
|
-
const nodeInfo = itemMap[id];
|
|
126
|
-
return !nodeInfo || nodeInfo.childrenIds.length === 0;
|
|
127
|
-
});
|
|
128
|
-
if (leafNodeIds.length === 0) {
|
|
129
|
-
return _jsx("span", { className: "text-muted-foreground", children: placeholder });
|
|
130
|
-
}
|
|
131
|
-
if (leafNodeIds.length === 1) {
|
|
132
|
-
const item = flatTree.find((i) => i.id === leafNodeIds[0]);
|
|
133
|
-
return item ? item.index : placeholder;
|
|
134
|
-
}
|
|
135
|
-
return `${leafNodeIds.length} items selected`;
|
|
136
|
-
};
|
|
137
|
-
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { variant: "outline", role: "combobox", "aria-expanded": open, className: cn("w-full justify-between transition-all duration-150 ease-in-out border hover:border-primary hover:shadow-sm bg-secondary cursor-pointer", className), children: [_jsx("span", { className: "truncate", children: getSelectedLabel() }), _jsx(ChevronsUpDown, { className: cn("ml-2 h-4 w-4 shrink-0 transition-transform duration-200", open && "rotate-180") })] }) }), _jsx(PopoverContent, { className: "w-[--radix-popover-trigger-width] p-0 max-h-[400px] overflow-y-auto", children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: searchPlaceholder, value: searchQuery, onValueChange: setSearchQuery }), _jsxs(CommandList, { className: "transition-all duration-200 ease-in-out", children: [_jsx(CommandEmpty, { children: "No results found." }), filteredItems.map((item) => (_jsxs(CommandItem, { value: `${item.index} ${item.title} ${item.description}`, onSelect: () => handleSelect(item), className: "flex items-start cursor-pointer gap-2", style: { paddingLeft: `${item.level * 1.5 + 0.75}rem` }, children: [_jsx("input", { type: "checkbox", className: "mt-1 h-4 w-4 accent-primary border rounded", checked: selectionState.get(item.id) === "checked", ref: (el) => {
|
|
138
|
-
if (el) {
|
|
139
|
-
el.indeterminate =
|
|
140
|
-
selectionState.get(item.id) === "indeterminate";
|
|
141
|
-
}
|
|
142
|
-
}, readOnly: true }), _jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("span", { className: "text-xs font-mono text-muted-foreground bg-muted px-1.5 py-0.5 rounded", children: item.index }), _jsx("span", { className: "font-medium", children: item.title })] }), _jsx("p", { className: "text-sm text-muted-foreground", children: item.description })] })] }, item.id)))] })] }) })] }));
|
|
143
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function UploadTab(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { useState, useEffect } from "react";
|
|
4
|
-
import { UploadIcon, X, Send } from "lucide-react";
|
|
5
|
-
import { Button } from "../../shadcn/button";
|
|
6
|
-
import { Input } from "../../shadcn/input";
|
|
7
|
-
import { Label } from "../../shadcn/label";
|
|
8
|
-
import { Progress } from "../../shadcn/progress";
|
|
9
|
-
import { useForm } from "react-hook-form";
|
|
10
|
-
import axios from "axios";
|
|
11
|
-
import { Form, FormField, FormItem, FormControl, FormMessage, } from "../../shadcn/form";
|
|
12
|
-
import { NoDataComponent } from "../no-data";
|
|
13
|
-
export function UploadTab() {
|
|
14
|
-
const form = useForm({
|
|
15
|
-
defaultValues: {
|
|
16
|
-
text: "",
|
|
17
|
-
fileNames: [],
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
const [inputValue, setInputValue] = useState("");
|
|
21
|
-
const [texts, setTexts] = useState([]);
|
|
22
|
-
const [fileNames, setFileNames] = useState([]); // Updated type
|
|
23
|
-
const [formattedDate, setFormattedDate] = useState("");
|
|
24
|
-
const [noFilesUploaded, setNoFilesUploaded] = useState(true);
|
|
25
|
-
const isUploading = fileNames.some((file) => file.progress < 100);
|
|
26
|
-
const simulateFileUpload = async (idx, file) => {
|
|
27
|
-
const formData = new FormData();
|
|
28
|
-
formData.append("file", file.file); // Use the actual file object
|
|
29
|
-
try {
|
|
30
|
-
const response = await axios.post("UPLOAD_ENDPOINT_URL", formData, {
|
|
31
|
-
onUploadProgress: (progressEvent) => {
|
|
32
|
-
const progress = Math.round((progressEvent.loaded * 100) / (progressEvent.total || 1));
|
|
33
|
-
setFileNames((prev) => prev.map((f, i) => (i === idx ? Object.assign(Object.assign({}, f), { progress }) : f)));
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
setFileNames((prev) => prev.map((f, i) => i === idx ? Object.assign(Object.assign({}, f), { url: response.data.url, progress: 100 }) : f));
|
|
37
|
-
}
|
|
38
|
-
catch (error) {
|
|
39
|
-
console.error("Upload failed:", error);
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
const currentDate = new Date();
|
|
44
|
-
const day = String(currentDate.getDate()).padStart(2, "0");
|
|
45
|
-
const month = String(currentDate.getMonth() + 1).padStart(2, "0");
|
|
46
|
-
const year = currentDate.getFullYear();
|
|
47
|
-
setFormattedDate(`${day}-${month}-${year}`);
|
|
48
|
-
}, []);
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
fileNames.forEach((file, idx) => {
|
|
51
|
-
if (file.progress === 0) {
|
|
52
|
-
simulateFileUpload(idx, file);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}, [fileNames]);
|
|
56
|
-
const handleAddText = () => {
|
|
57
|
-
if (inputValue.trim() || fileNames.length > 0) {
|
|
58
|
-
const newEntry = {
|
|
59
|
-
text: inputValue.trim(),
|
|
60
|
-
fileNames: fileNames.map((file) => file.name),
|
|
61
|
-
};
|
|
62
|
-
setTexts([newEntry, ...texts]);
|
|
63
|
-
setInputValue("");
|
|
64
|
-
setFileNames([]);
|
|
65
|
-
setNoFilesUploaded(false);
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
const handleFileUpload = (e) => {
|
|
69
|
-
if (e.target.files) {
|
|
70
|
-
const uploadedFiles = Array.from(e.target.files).map((file) => ({
|
|
71
|
-
name: file.name,
|
|
72
|
-
url: "",
|
|
73
|
-
progress: 0,
|
|
74
|
-
file,
|
|
75
|
-
}));
|
|
76
|
-
setFileNames((prev) => [...prev, ...uploadedFiles]); // Type now matches correctly
|
|
77
|
-
setNoFilesUploaded(false);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
const removeFile = (index) => {
|
|
81
|
-
const updatedFiles = fileNames.filter((_, idx) => idx !== index);
|
|
82
|
-
setFileNames(updatedFiles);
|
|
83
|
-
if (updatedFiles.length === 0 && texts.length === 0) {
|
|
84
|
-
setNoFilesUploaded(true);
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { className: "flex flex-col h-full w-full gap-3", children: [_jsxs("div", { className: "flex-grow overflow-auto flex flex-col-reverse gap-2", children: [noFilesUploaded && _jsx(NoDataComponent, { text: "No files uploaded" }), fileNames.length > 0 && (_jsxs("div", { className: "p-2 my-1 rounded-md border", children: [_jsx("p", { className: "font-bold", children: "Selected Files:" }), fileNames.map((file, idx) => (_jsxs("div", { className: "flex flex-col mb-2", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("a", { href: file.url, download: file.name, className: "text-sm text-blue-600 underline cursor-pointer", children: file.name }), _jsx("button", { onClick: () => removeFile(idx), className: "text-red-500 hover:text-red-800", children: _jsx(X, { className: "w-4 h-4" }) })] }), _jsx(Progress, { value: file.progress }), _jsxs("p", { className: "text-xs text-gray-500", children: [file.progress, "% uploaded"] })] }, idx)))] })), texts.map((entry, index) => (_jsxs("div", { className: "border-b text-sm pb-2", children: [entry.fileNames.map((fileName, idx) => {
|
|
88
|
-
var _a;
|
|
89
|
-
return (_jsx("p", { children: _jsx("a", { href: ((_a = fileNames.find((file) => file.name === fileName)) === null || _a === void 0 ? void 0 : _a.url) ||
|
|
90
|
-
"#", download: fileName, className: "text-sm text-blue-500 underline cursor-pointer", children: fileName }) }, idx));
|
|
91
|
-
}), _jsx("p", { children: entry.text || "(No Text)" }), _jsxs("div", { className: "flex justify-between", children: [_jsx("p", { children: "John Doe" }), _jsx("p", { children: formattedDate })] })] }, index)))] }), _jsx(Form, Object.assign({}, form, { children: _jsx("form", { onSubmit: form.handleSubmit(() => handleAddText()), children: _jsx("div", { className: "flex flex-col", children: _jsxs("div", { className: "flex items-center justify-center gap-2", children: [_jsx("div", { className: "flex-1", children: _jsx(FormField, { name: "text", render: ({ field }) => (_jsxs(FormItem, { children: [_jsx(FormControl, { children: _jsx(Input, { id: "text-input", type: "text", value: inputValue, onChange: (e) => setInputValue(e.target.value), placeholder: "Type something..." }) }), _jsx(FormMessage, {})] })) }) }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Label, { htmlFor: "file-upload", className: "sr-only", children: "Upload Files" }), _jsx(Button, { variant: "outline", asChild: true, children: _jsx("label", { htmlFor: "file-upload", className: "cursor-pointer", children: _jsx(UploadIcon, { className: "w-5 h-5" }) }) }), _jsx(Input, { id: "file-upload", type: "file", multiple: true, onChange: handleFileUpload, className: "hidden" })] }), _jsx(Button, { variant: "outline", type: "submit", disabled: isUploading, children: _jsx(Send, {}) })] }) }) }) }))] }) }));
|
|
92
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Icon } from "../icon";
|
|
4
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../shadcn/tooltip";
|
|
5
|
-
import { Button } from "../../shadcn/button";
|
|
6
|
-
export function Widgets({ widgetData }) {
|
|
7
|
-
const firstRowWidgets = widgetData.slice(0, 4);
|
|
8
|
-
const secondRowWidgets = widgetData.slice(4);
|
|
9
|
-
return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "flex flex-col md:flex-row gap-2", children: firstRowWidgets.map((widget) => (_jsxs("div", { className: "flex flex-1 flex-row justify-between border rounded-md p-2 border-l-4 border-l-primary", children: [_jsxs("div", { className: "flex flex-col", children: [_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { className: "cursor-default select-text", children: _jsx("p", { className: "font-medium max-w-[240px] truncate", children: widget.widgetText }) }), _jsx(TooltipContent, { children: _jsx("p", { children: widget.widgetText }) })] }) }), _jsx("div", { children: widget.onButtonClickfunc ?
|
|
10
|
-
_jsx(Button, { className: "px-0", variant: "link", onClick: () => { var _a; return (_a = widget.onButtonClickfunc) === null || _a === void 0 ? void 0 : _a.call(widget, { id: widget.id }); }, children: widget.widgetNumber }) :
|
|
11
|
-
_jsx("p", { className: "inline-flex items-center justify-center px-0 py-2 text-sm font-medium border border-transparent rounded-md", children: widget.widgetNumber }) })] }), _jsx("div", { className: "flex justify-end items-center", children: widget.iconName && _jsx(Icon, { name: widget.iconName }) })] }, widget.id))) }), secondRowWidgets.length > 0 && (_jsx("div", { className: "flex flex-col md:flex-row gap-2", children: secondRowWidgets.map((widget) => (_jsxs("div", { className: "flex flex-1 flex-row justify-between border rounded-md p-2 border-l-4 border-l-primary", children: [_jsxs("div", { className: "flex flex-col", children: [_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { className: "cursor-default select-text", children: _jsx("p", { className: "font-medium max-w-[240px] truncate", children: widget.widgetText }) }), _jsx(TooltipContent, { children: _jsx("p", { children: widget.widgetText }) })] }) }), _jsx("div", { children: widget.onButtonClickfunc ?
|
|
12
|
-
_jsx(Button, { className: "px-0", variant: "link", onClick: () => { var _a; return (_a = widget.onButtonClickfunc) === null || _a === void 0 ? void 0 : _a.call(widget, { id: widget.id }); }, children: widget.widgetNumber }) :
|
|
13
|
-
_jsx("p", { className: "inline-flex items-center justify-center px-0 py-2 text-sm font-medium border border-transparent rounded-md", children: widget.widgetNumber }) })] }), _jsx("div", { className: "flex justify-end items-center", children: widget.iconName && _jsx(Icon, { name: widget.iconName }) })] }, widget.id))) }))] }));
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface WidgetProps {
|
|
2
|
-
id: string;
|
|
3
|
-
widgetText: string;
|
|
4
|
-
widgetNumber: string;
|
|
5
|
-
iconName?: string;
|
|
6
|
-
onButtonClickfunc?: (...params: (string | (Record<string, string>))[]) => void;
|
|
7
|
-
}
|
|
8
|
-
export interface WidgetsFunctionProps {
|
|
9
|
-
widgetData: WidgetProps[];
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function WorkInProgress(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export function WorkInProgress() {
|
|
3
|
-
return (_jsx("div", { className: "flex h-full items-center justify-center", children: _jsxs("div", { className: "bg-background text-forefround rounded-xl p-6 text-center max-w-md", children: [_jsx("div", { className: "text-3xl font-bold mb-2 animate-pulse", children: "\uD83D\uDEA7 Work in Progress" }), _jsx("p", { className: "text-muted-foreground", children: "We\u2019re currently working on this section. Check back soon!" })] }) }));
|
|
4
|
-
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import "./styles.css";
|
|
2
|
-
export * from "./shadcn/accordion";
|
|
3
|
-
export * from "./shadcn/alert-dialog";
|
|
4
|
-
export * from "./shadcn/alert";
|
|
5
|
-
export * from "./shadcn/avatar";
|
|
6
|
-
export * from "./shadcn/badge";
|
|
7
|
-
export * from "./shadcn/button";
|
|
8
|
-
export * from "./shadcn/calendar";
|
|
9
|
-
export * from "./shadcn/card";
|
|
10
|
-
export * from "./shadcn/checkbox";
|
|
11
|
-
export * from "./shadcn/command";
|
|
12
|
-
export * from "./shadcn/date-input";
|
|
13
|
-
export * from "./shadcn/date-range-picker";
|
|
14
|
-
export * from "./shadcn/dialog";
|
|
15
|
-
export * from "./shadcn/dropdown-menu";
|
|
16
|
-
export * from "./shadcn/hover-card";
|
|
17
|
-
export * from "./shadcn/input";
|
|
18
|
-
export * from "./shadcn/label";
|
|
19
|
-
export * from "./shadcn/navigation-menu";
|
|
20
|
-
export * from "./shadcn/popover";
|
|
21
|
-
export * from "./shadcn/progress";
|
|
22
|
-
export * from "./shadcn/radio-group";
|
|
23
|
-
export * from "./shadcn/scroll-area";
|
|
24
|
-
export * from "./shadcn/select";
|
|
25
|
-
export * from "./shadcn/separator";
|
|
26
|
-
export * from "./shadcn/sheet";
|
|
27
|
-
export * from "./shadcn/sidebar";
|
|
28
|
-
export * from "./shadcn/skeleton";
|
|
29
|
-
export * from "./shadcn/slider";
|
|
30
|
-
export * from "./shadcn/sonner";
|
|
31
|
-
export * from "./shadcn/switch";
|
|
32
|
-
export * from "./shadcn/table";
|
|
33
|
-
export * from "./shadcn/tabs";
|
|
34
|
-
export * from "./shadcn/textarea";
|
|
35
|
-
export * from "./shadcn/tooltip";
|
|
36
|
-
export * from "./shadcn/workflow";
|
|
37
|
-
export * from "./shadcn/aspect-ratio";
|
|
38
|
-
export * from "./shadcn/breadcrumb";
|
|
39
|
-
export * from "./shadcn/collapsible";
|
|
40
|
-
export * from "./shadcn/drawer";
|
|
41
|
-
export * from "./shadcn/form";
|
|
42
|
-
export * from "./shadcn/input-otp";
|
|
43
|
-
export * from "./shadcn/toggle-group";
|
|
44
|
-
export * from "./shadcn/toggle";
|
|
45
|
-
export { ActionMenu } from "./ikoncomponents/action-menu";
|
|
46
|
-
export type { ActionMenuProps, ExtraActionParams, } from "./ikoncomponents/action-menu/type";
|
|
47
|
-
export { CustomAlertDialog } from "./ikoncomponents/alert-dialog";
|
|
48
|
-
export { useDialog, DialogProvider, } from "./ikoncomponents/alert-dialog/dialog-context";
|
|
49
|
-
export { TextButton, TextButtonWithTooltip, IconTextButton, IconTextButtonWithTooltip, IconButton, IconButtonWithTooltip, } from "./ikoncomponents/buttons";
|
|
50
|
-
export type { ButtonProps, ButtonWithTooltipProps, } from "./ikoncomponents/buttons";
|
|
51
|
-
export { ComboboxInput } from "./ikoncomponents/combobox-input";
|
|
52
|
-
export type { ComboBoxInputProps, ComboboxItemProps, } from "./ikoncomponents/combobox-input/type";
|
|
53
|
-
export { DataTableColumnFilter } from "./ikoncomponents/data-table/datatable-column-filter";
|
|
54
|
-
export { DataTableFacetedFilter } from "./ikoncomponents/data-table/datatable-faceted-filter";
|
|
55
|
-
export { DataTableFilterMenu } from "./ikoncomponents/data-table/datatable-filter-menu";
|
|
56
|
-
export { convertFileToObject, FileUploader, getImageFromObject, } from "./ikoncomponents/fileUpload";
|
|
57
|
-
export type { FileUploaderProps } from "./ikoncomponents/fileUpload";
|
|
58
|
-
export { DataTablePagination } from "./ikoncomponents/data-table/datatable-pagination";
|
|
59
|
-
export { DataTableToolbar } from "./ikoncomponents/data-table/datatable-toolbar";
|
|
60
|
-
export { getDataTableColumnTitle } from "./ikoncomponents/data-table/function";
|
|
61
|
-
export { DataTable } from "./ikoncomponents/data-table";
|
|
62
|
-
export type { DataTableProps, DTColumnsProps, DTExtraParamsProps, DTActionMenuProps, DataTableViewOptionsProps, DTToolBarProps, DataTableFilterProps, DataTableFacetedFilterProps, DataTablePaginationProps, DragDropHeaderProp, } from "./ikoncomponents/data-table/type";
|
|
63
|
-
export { EChart } from "./ikoncomponents/e-chart";
|
|
64
|
-
export { FileInput } from "./ikoncomponents/file-input";
|
|
65
|
-
export { GlowingEffect } from "./ikoncomponents/glowing-effect";
|
|
66
|
-
export { Icon } from "./ikoncomponents/icon";
|
|
67
|
-
export { LoadingSpinner } from "./ikoncomponents/loading-spinner";
|
|
68
|
-
export type { ISVGProps, LoadingSpinnerProps, } from "./ikoncomponents/loading-spinner";
|
|
69
|
-
export { MultiCombobox } from "./ikoncomponents/multi-combobox";
|
|
70
|
-
export { NoDataComponent } from "./ikoncomponents/no-data";
|
|
71
|
-
export { PageWrapper } from "./ikoncomponents/page-wrapper";
|
|
72
|
-
export { PasswordStrengthMeter } from "./ikoncomponents/password-strength-meter";
|
|
73
|
-
export { PhoneInput } from "./ikoncomponents/phone-input";
|
|
74
|
-
export { SearchInput } from "./ikoncomponents/search-input";
|
|
75
|
-
export { SheetComponent } from "./ikoncomponents/sheet";
|
|
76
|
-
export { SimpleWidget } from "./ikoncomponents/simple-widget";
|
|
77
|
-
export { CustomTabs } from "./ikoncomponents/tabs";
|
|
78
|
-
export type { TabArray, TabProps } from "./ikoncomponents/tabs/type";
|
|
79
|
-
export { ThemeToggleBtn } from "./ikoncomponents/theme-toggle-btn";
|
|
80
|
-
export { TitleProgress } from "./ikoncomponents/title-progress";
|
|
81
|
-
export { TooltipComponent } from "./ikoncomponents/tooltip";
|
|
82
|
-
export { FrameworkItemDropdown } from "./ikoncomponents/twolevel-dropdown";
|
|
83
|
-
export type { FrameworkEntry, TreeNode, ParentEntry, ProcessedFrameworkData, } from "./ikoncomponents/twolevel-dropdown";
|
|
84
|
-
export { Widgets } from "./ikoncomponents/widgets";
|
|
85
|
-
export type { WidgetProps, WidgetsFunctionProps, } from "./ikoncomponents/widgets/type";
|
|
86
|
-
export { BigCalendar } from "./ikoncomponents/big-calendar";
|
|
87
|
-
export type { BigCalendarProps, ExtraParamsEvent, BigCalendarEventProps, BigCalenderToolbarProps, } from "./ikoncomponents/big-calendar/type";
|
|
88
|
-
export { BreadcrumbProvider, useBreadcrumb, } from "./ikoncomponents/app-breadcrumb/BreadcrumbProvider";
|
|
89
|
-
export type { BreadcrumbItemProps } from "./ikoncomponents/app-breadcrumb/BreadcrumbProvider";
|
|
90
|
-
export { AppBreadcrumb, RenderAppBreadcrumb, } from "./ikoncomponents/app-breadcrumb";
|
|
91
|
-
export { FormComboboxInput } from "./ikoncomponents/form-fields/combobox-input";
|
|
92
|
-
export { FormComboboxInputWithValue } from "./ikoncomponents/form-fields/combobox-input-value";
|
|
93
|
-
export { FormDateInput } from "./ikoncomponents/form-fields/date-input";
|
|
94
|
-
export { FormFileInput } from "./ikoncomponents/form-fields/file-input";
|
|
95
|
-
export { FormInput } from "./ikoncomponents/form-fields/input";
|
|
96
|
-
export { FormMultiComboboxInput } from "./ikoncomponents/form-fields/multi-combobox-input";
|
|
97
|
-
export { FormOtpInput } from "./ikoncomponents/form-fields/otp-input";
|
|
98
|
-
export { FormPhoneInput } from "./ikoncomponents/form-fields/phone-input";
|
|
99
|
-
export { FormTextarea } from "./ikoncomponents/form-fields/textarea";
|
|
100
|
-
export type { FormFieldProps, FormInputProps, FormTextareaProps, FormDateInputProps, FormComboboxInputProps, FormComboboxItemProps, } from "./ikoncomponents/form-fields/types";
|
|
101
|
-
export { GradeTableLoader } from "./ikoncomponents/skeleton-loader/skeleton-table";
|
|
102
|
-
export type { GradeTableLoaderProps } from "./ikoncomponents/skeleton-loader/skeleton-table";
|
|
103
|
-
export { SkeletonWidget } from "./ikoncomponents/skeleton-loader/skeleton-widget";
|
|
104
|
-
export { UploadTab } from "./ikoncomponents/upload-tab";
|
|
105
|
-
export { AppSidebar } from "./ikoncomponents/main-layout/app-sidebar";
|
|
106
|
-
export { Footer } from "./ikoncomponents/main-layout/footer";
|
|
107
|
-
export { Header } from "./ikoncomponents/main-layout/header";
|
|
108
|
-
export type { Account, Software, } from "./ikoncomponents/main-layout/main-sidebar";
|
|
109
|
-
export { MainSidebar } from "./ikoncomponents/main-layout/main-sidebar";
|
|
110
|
-
export { NavMain } from "./ikoncomponents/main-layout/nav-main";
|
|
111
|
-
export type { SidebarNavSubItem, SidebarNavItem, SidebarNavContextType, } from "./ikoncomponents/main-layout/SidebarNavContext";
|
|
112
|
-
export { SidebarNavProvider, useSidebarNav, } from "./ikoncomponents/main-layout/SidebarNavContext";
|
|
113
|
-
export { MainLayout } from "./ikoncomponents/main-layout";
|
|
114
|
-
export { ProviderWrapper } from "./ikoncomponents/provider-wrapper";
|
|
115
|
-
export { ActivitySheet } from "./ikoncomponents/activity-sheet";
|
|
116
|
-
export type { ActivityLogProps } from "./ikoncomponents/activity-sheet";
|
|
117
|
-
export { ImageCropperProvider, useImageCropper, } from "./ikoncomponents/image-cropper-upload";
|
|
118
|
-
export type { ImageCropperProps, OriginalImageProps, AspectRatioWiseImagesProps, ImageCropperContextProps, } from "./ikoncomponents/image-cropper-upload";
|
|
119
|
-
export { ImageCropper } from "./ikoncomponents/image-cropper-upload/image-cropper";
|
|
120
|
-
export type { CropperImgProps } from "./ikoncomponents/image-cropper-upload/image-cropper";
|
|
121
|
-
export { CropperFormWithModal } from "./ikoncomponents/image-cropper-upload/cropper-form-with-modal";
|
|
122
|
-
export { CropperForm } from "./ikoncomponents/image-cropper-upload/cropper-form";
|
|
123
|
-
export { NewCropperImg } from "./ikoncomponents/image-cropper-upload/components/newCropper";
|
|
124
|
-
export type { CropperImgProps as NewCropperImgProps } from "./ikoncomponents/image-cropper-upload/components/newCropper";
|
|
125
|
-
export { NewImageForm } from "./ikoncomponents/image-cropper-upload/components/newImageUploadForm";
|
|
126
|
-
export type { ImageFormProps } from "./ikoncomponents/image-cropper-upload/components/newImageUploadForm";
|
|
127
|
-
export { WorkInProgress } from "./ikoncomponents/work-in-progress";
|
|
128
|
-
export { CustomComboboxInput } from "./ikoncomponents/custom-combo-dropdown";
|
|
129
|
-
export { ThemeProvider } from "./utils/theme-provider";
|
|
130
|
-
export { RadiusProvider, useRadius } from "./utils/border-radius-provider";
|
|
131
|
-
export { FontProvider, useFont } from "./utils/font-provider";
|
|
132
|
-
export { cn } from "./utils/cn";
|
|
133
|
-
export type { CookieSessionOptionsProps } from "./utils/session/cookieSession";
|
|
134
|
-
export { setCookieSession, getCookieSession, clearCookieSession, clearAllCookieSession, } from "./utils/session/cookieSession";
|
|
135
|
-
export { getValidAccessToken, refreshAccessToken, decodeAccessToken, logOut } from "./utils/token-management";
|
|
136
|
-
export type { TokenResponse } from "./utils/token-management/types";
|
|
137
|
-
export { useIsMobile } from "./hooks/use-mobile";
|
|
138
|
-
export { useRefresh } from "./ikoncomponents/main-layout/RefreshContext";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
|
-
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
package/dist/shadcn/accordion.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
15
|
-
import { ChevronDownIcon } from "lucide-react";
|
|
16
|
-
import { cn } from "../utils/cn";
|
|
17
|
-
function Accordion(_a) {
|
|
18
|
-
var props = __rest(_a, []);
|
|
19
|
-
return _jsx(AccordionPrimitive.Root, Object.assign({ "data-slot": "accordion" }, props));
|
|
20
|
-
}
|
|
21
|
-
function AccordionItem(_a) {
|
|
22
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
23
|
-
return (_jsx(AccordionPrimitive.Item, Object.assign({ "data-slot": "accordion-item", className: cn("border-b last:border-b-0", className) }, props)));
|
|
24
|
-
}
|
|
25
|
-
function AccordionTrigger(_a) {
|
|
26
|
-
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
27
|
-
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, Object.assign({ "data-slot": "accordion-trigger", className: cn("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", className) }, props, { children: [children, _jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })] })) }));
|
|
28
|
-
}
|
|
29
|
-
function AccordionContent(_a) {
|
|
30
|
-
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
31
|
-
return (_jsx(AccordionPrimitive.Content, Object.assign({ "data-slot": "accordion-content", className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm" }, props, { children: _jsx("div", { className: cn("pt-0 pb-4", className), children: children }) })));
|
|
32
|
-
}
|
|
33
|
-
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
3
|
-
declare const AlertDialog: {
|
|
4
|
-
(props: React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
displayName: string;
|
|
6
|
-
};
|
|
7
|
-
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
-
declare const AlertDialogPortal: {
|
|
9
|
-
(props: React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
displayName: string;
|
|
11
|
-
};
|
|
12
|
-
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
-
declare const AlertDialogHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
-
declare const AlertDialogFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
17
|
-
declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
18
|
-
declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
-
declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
-
export { AlertDialog, AlertDialogTrigger, AlertDialogPortal, AlertDialogOverlay, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
import * as React from "react";
|
|
15
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
16
|
-
import { cn } from "../utils/cn";
|
|
17
|
-
import { buttonVariants } from "./button";
|
|
18
|
-
// ✅ Root (NO ref here!)
|
|
19
|
-
const AlertDialog = (props) => _jsx(AlertDialogPrimitive.Root, Object.assign({ "data-slot": "alert-dialog" }, props));
|
|
20
|
-
AlertDialog.displayName = "AlertDialog";
|
|
21
|
-
// ✅ Trigger
|
|
22
|
-
const AlertDialogTrigger = React.forwardRef((props, ref) => (_jsx(AlertDialogPrimitive.Trigger, Object.assign({ "data-slot": "alert-dialog-trigger", ref: ref }, props))));
|
|
23
|
-
AlertDialogTrigger.displayName = "AlertDialogTrigger";
|
|
24
|
-
// ✅ Portal (NO ref here!)
|
|
25
|
-
const AlertDialogPortal = (props) => _jsx(AlertDialogPrimitive.Portal, Object.assign({ "data-slot": "alert-dialog-portal" }, props));
|
|
26
|
-
AlertDialogPortal.displayName = "AlertDialogPortal";
|
|
27
|
-
// ✅ Overlay
|
|
28
|
-
const AlertDialogOverlay = React.forwardRef((_a, ref) => {
|
|
29
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
30
|
-
return (_jsx(AlertDialogPrimitive.Overlay, Object.assign({ ref: ref, "data-slot": "alert-dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out " +
|
|
31
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 " +
|
|
32
|
-
"fixed inset-0 z-50 bg-black/50", className) }, props)));
|
|
33
|
-
});
|
|
34
|
-
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
35
|
-
// ✅ Content
|
|
36
|
-
const AlertDialogContent = React.forwardRef((_a, ref) => {
|
|
37
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
38
|
-
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, Object.assign({ ref: ref, "data-slot": "alert-dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out " +
|
|
39
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 " +
|
|
40
|
-
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 " +
|
|
41
|
-
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] " +
|
|
42
|
-
"translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 " +
|
|
43
|
-
"shadow-lg duration-200 sm:max-w-lg", className) }, props))] }));
|
|
44
|
-
});
|
|
45
|
-
AlertDialogContent.displayName = "AlertDialogContent";
|
|
46
|
-
// ✅ Header
|
|
47
|
-
const AlertDialogHeader = React.forwardRef((_a, ref) => {
|
|
48
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
49
|
-
return (_jsx("div", Object.assign({ ref: ref, "data-slot": "alert-dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className) }, props)));
|
|
50
|
-
});
|
|
51
|
-
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
52
|
-
// ✅ Footer
|
|
53
|
-
const AlertDialogFooter = React.forwardRef((_a, ref) => {
|
|
54
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
55
|
-
return (_jsx("div", Object.assign({ ref: ref, "data-slot": "alert-dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className) }, props)));
|
|
56
|
-
});
|
|
57
|
-
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
58
|
-
// ✅ Title
|
|
59
|
-
const AlertDialogTitle = React.forwardRef((_a, ref) => {
|
|
60
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
61
|
-
return (_jsx(AlertDialogPrimitive.Title, Object.assign({ ref: ref, "data-slot": "alert-dialog-title", className: cn("text-lg font-semibold bg-background", className) }, props)));
|
|
62
|
-
});
|
|
63
|
-
AlertDialogTitle.displayName = "AlertDialogTitle";
|
|
64
|
-
// ✅ Description
|
|
65
|
-
const AlertDialogDescription = React.forwardRef((_a, ref) => {
|
|
66
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
67
|
-
return (_jsx(AlertDialogPrimitive.Description, Object.assign({ ref: ref, "data-slot": "alert-dialog-description", className: cn("text-muted-foreground text-sm bg-background", className) }, props)));
|
|
68
|
-
});
|
|
69
|
-
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
70
|
-
// ✅ Action
|
|
71
|
-
const AlertDialogAction = React.forwardRef((_a, ref) => {
|
|
72
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
73
|
-
return (_jsx(AlertDialogPrimitive.Action, Object.assign({ ref: ref, className: cn(buttonVariants(), className) }, props)));
|
|
74
|
-
});
|
|
75
|
-
AlertDialogAction.displayName = "AlertDialogAction";
|
|
76
|
-
// ✅ Cancel
|
|
77
|
-
const AlertDialogCancel = React.forwardRef((_a, ref) => {
|
|
78
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
79
|
-
return (_jsx(AlertDialogPrimitive.Cancel, Object.assign({ ref: ref, className: cn(buttonVariants({ variant: "outline" }), "bg-background", className) }, props)));
|
|
80
|
-
});
|
|
81
|
-
AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
82
|
-
// ✅ Exports
|
|
83
|
-
export { AlertDialog, AlertDialogTrigger, AlertDialogPortal, AlertDialogOverlay, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
package/dist/shadcn/alert.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type VariantProps } from "class-variance-authority";
|
|
3
|
-
declare const alertVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
-
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { Alert, AlertTitle, AlertDescription };
|