ikoncomponents 1.5.5 → 1.5.7
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/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/ikoncomponents/action-menu/index.d.ts +5 -0
- package/dist/ikoncomponents/action-menu/index.js +42 -0
- package/dist/ikoncomponents/action-menu/type.d.ts +14 -0
- package/dist/ikoncomponents/action-menu/type.js +1 -0
- package/dist/ikoncomponents/activity-sheet/index.d.ts +11 -0
- package/dist/ikoncomponents/activity-sheet/index.js +23 -0
- package/dist/ikoncomponents/alert-dialog/dialog-context.d.ts +21 -0
- package/dist/ikoncomponents/alert-dialog/dialog-context.js +30 -0
- package/dist/ikoncomponents/alert-dialog/index.d.ts +14 -0
- package/dist/ikoncomponents/alert-dialog/index.js +20 -0
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.d.ts +18 -0
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.js +43 -0
- package/dist/ikoncomponents/app-breadcrumb/index.d.ts +5 -0
- package/dist/ikoncomponents/app-breadcrumb/index.js +57 -0
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.d.ts +5 -0
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.js +16 -0
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.d.ts +2 -0
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.js +39 -0
- package/dist/ikoncomponents/big-calendar/index.d.ts +3 -0
- package/dist/ikoncomponents/big-calendar/index.js +35 -0
- package/dist/ikoncomponents/big-calendar/type.d.ts +31 -0
- package/dist/ikoncomponents/big-calendar/type.js +1 -0
- package/dist/ikoncomponents/buttons/index.d.ts +18 -0
- package/dist/ikoncomponents/buttons/index.js +38 -0
- package/dist/ikoncomponents/combobox-input/index.d.ts +2 -0
- package/dist/ikoncomponents/combobox-input/index.js +18 -0
- package/dist/ikoncomponents/combobox-input/type.d.ts +13 -0
- package/dist/ikoncomponents/combobox-input/type.js +1 -0
- package/dist/ikoncomponents/custom-combo-dropdown/index.d.ts +21 -0
- package/dist/ikoncomponents/custom-combo-dropdown/index.js +85 -0
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.d.ts +2 -0
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.js +22 -0
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.d.ts +2 -0
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.js +35 -0
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.d.ts +2 -0
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.js +38 -0
- package/dist/ikoncomponents/data-table/datatable-pagination/index.d.ts +2 -0
- package/dist/ikoncomponents/data-table/datatable-pagination/index.js +13 -0
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.d.ts +2 -0
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.js +18 -0
- package/dist/ikoncomponents/data-table/function.d.ts +1 -0
- package/dist/ikoncomponents/data-table/function.js +6 -0
- package/dist/ikoncomponents/data-table/index.d.ts +2 -0
- package/dist/ikoncomponents/data-table/index.js +223 -0
- package/dist/ikoncomponents/data-table/type.d.ts +60 -0
- package/dist/ikoncomponents/data-table/type.js +1 -0
- package/dist/ikoncomponents/e-chart/index.d.ts +15 -0
- package/dist/ikoncomponents/e-chart/index.js +115 -0
- package/dist/ikoncomponents/file-input/index.d.ts +1 -0
- package/dist/ikoncomponents/file-input/index.js +21 -0
- package/dist/ikoncomponents/fileUpload/index.d.ts +15 -0
- package/dist/ikoncomponents/fileUpload/index.js +69 -0
- package/dist/ikoncomponents/form-fields/combobox-input/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/combobox-input/index.js +21 -0
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.d.ts +18 -0
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.js +26 -0
- package/dist/ikoncomponents/form-fields/date-input/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/date-input/index.js +15 -0
- package/dist/ikoncomponents/form-fields/file-input/index.d.ts +1 -0
- package/dist/ikoncomponents/form-fields/file-input/index.js +4 -0
- package/dist/ikoncomponents/form-fields/input/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/input/index.js +18 -0
- package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts +6 -0
- package/{templates/default/ikoncomponents/form-fields/multi-combobox-input/index.tsx → dist/ikoncomponents/form-fields/multi-combobox-input/index.js} +381 -574
- package/dist/ikoncomponents/form-fields/otp-input/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/otp-input/index.js +18 -0
- package/dist/ikoncomponents/form-fields/phone-input/index.d.ts +1 -0
- package/dist/ikoncomponents/form-fields/phone-input/index.js +4 -0
- package/dist/ikoncomponents/form-fields/textarea/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/textarea/index.js +18 -0
- package/dist/ikoncomponents/form-fields/types/index.d.ts +36 -0
- package/dist/ikoncomponents/form-fields/types/index.js +1 -0
- package/dist/ikoncomponents/glowing-effect/index.d.ts +14 -0
- package/dist/ikoncomponents/glowing-effect/index.js +84 -0
- package/dist/ikoncomponents/icon/index.d.ts +8 -0
- package/dist/ikoncomponents/icon/index.js +23 -0
- package/dist/ikoncomponents/image-cropper-upload/components/newCropper.d.ts +15 -0
- package/{templates/default/ikoncomponents/image-cropper-upload/components/newCropper.tsx → dist/ikoncomponents/image-cropper-upload/components/newCropper.js} +85 -117
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.d.ts +7 -0
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.js +145 -0
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.d.ts +6 -0
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.js +92 -0
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.d.ts +6 -0
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.js +14 -0
- package/dist/ikoncomponents/image-cropper-upload/image-cropper/index.d.ts +14 -0
- package/{templates/default/ikoncomponents/image-cropper-upload/image-cropper/index.tsx → dist/ikoncomponents/image-cropper-upload/image-cropper/index.js} +87 -119
- package/dist/ikoncomponents/image-cropper-upload/index.d.ts +27 -0
- package/dist/ikoncomponents/image-cropper-upload/index.js +49 -0
- package/dist/ikoncomponents/image-cropper-upload/utils/index.d.ts +16 -0
- package/dist/ikoncomponents/image-cropper-upload/utils/index.js +73 -0
- package/dist/ikoncomponents/loading-spinner/index.d.ts +9 -0
- package/dist/ikoncomponents/loading-spinner/index.js +19 -0
- package/dist/ikoncomponents/main-layout/RefreshContext.d.ts +10 -0
- package/dist/ikoncomponents/main-layout/RefreshContext.js +17 -0
- package/dist/ikoncomponents/main-layout/SidebarNavContext.d.ts +33 -0
- package/dist/ikoncomponents/main-layout/SidebarNavContext.js +52 -0
- package/dist/ikoncomponents/main-layout/app-sidebar.d.ts +3 -0
- package/dist/ikoncomponents/main-layout/app-sidebar.js +24 -0
- package/dist/ikoncomponents/main-layout/footer.d.ts +1 -0
- package/dist/ikoncomponents/main-layout/footer.js +5 -0
- package/dist/ikoncomponents/main-layout/header.d.ts +3 -0
- package/dist/ikoncomponents/main-layout/header.js +15 -0
- package/dist/ikoncomponents/main-layout/index.d.ts +6 -0
- package/dist/ikoncomponents/main-layout/index.js +11 -0
- package/dist/ikoncomponents/main-layout/main-sidebar.d.ts +60 -0
- package/dist/ikoncomponents/main-layout/main-sidebar.js +119 -0
- package/dist/ikoncomponents/main-layout/nav-main.d.ts +11 -0
- package/dist/ikoncomponents/main-layout/nav-main.js +33 -0
- package/dist/ikoncomponents/multi-combobox/index.d.ts +13 -0
- package/dist/ikoncomponents/multi-combobox/index.js +202 -0
- package/dist/ikoncomponents/no-data/index.d.ts +3 -0
- package/dist/ikoncomponents/no-data/index.js +5 -0
- package/dist/ikoncomponents/page-wrapper/index.d.ts +9 -0
- package/dist/ikoncomponents/page-wrapper/index.js +7 -0
- package/dist/ikoncomponents/password-strength-meter/index.d.ts +3 -0
- package/dist/ikoncomponents/password-strength-meter/index.js +40 -0
- package/dist/ikoncomponents/phone-input/index.d.ts +1 -0
- package/dist/ikoncomponents/phone-input/index.js +41 -0
- package/dist/ikoncomponents/provider-wrapper/index.d.ts +6 -0
- package/dist/ikoncomponents/provider-wrapper/index.js +11 -0
- package/dist/ikoncomponents/search-input/index.d.ts +1 -0
- package/dist/ikoncomponents/search-input/index.js +19 -0
- package/dist/ikoncomponents/sheet/index.d.ts +10 -0
- package/dist/ikoncomponents/sheet/index.js +6 -0
- package/dist/ikoncomponents/simple-widget/index.d.ts +14 -0
- package/dist/ikoncomponents/simple-widget/index.js +14 -0
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.d.ts +5 -0
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.js +6 -0
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.d.ts +3 -0
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.js +5 -0
- package/dist/ikoncomponents/tabs/index.d.ts +2 -0
- package/dist/ikoncomponents/tabs/index.js +50 -0
- package/{templates/default/ikoncomponents/tabs/type.ts → dist/ikoncomponents/tabs/type.d.ts} +19 -20
- package/dist/ikoncomponents/tabs/type.js +2 -0
- package/dist/ikoncomponents/theme-toggle-btn/index.d.ts +1 -0
- package/{templates/default/ikoncomponents/theme-toggle-btn/index.tsx → dist/ikoncomponents/theme-toggle-btn/index.js} +118 -189
- package/dist/ikoncomponents/title-progress/index.d.ts +12 -0
- package/dist/ikoncomponents/title-progress/index.js +10 -0
- package/dist/ikoncomponents/tooltip/index.d.ts +5 -0
- package/dist/ikoncomponents/tooltip/index.js +5 -0
- package/dist/ikoncomponents/twolevel-dropdown/index.d.ts +31 -0
- package/dist/ikoncomponents/twolevel-dropdown/index.js +143 -0
- package/dist/ikoncomponents/upload-tab/index.d.ts +1 -0
- package/dist/ikoncomponents/upload-tab/index.js +92 -0
- package/dist/ikoncomponents/widgets/index.d.ts +2 -0
- package/dist/ikoncomponents/widgets/index.js +14 -0
- package/dist/ikoncomponents/widgets/type.d.ts +10 -0
- package/dist/ikoncomponents/widgets/type.js +2 -0
- package/dist/ikoncomponents/work-in-progress/index.d.ts +1 -0
- package/dist/ikoncomponents/work-in-progress/index.js +4 -0
- package/dist/index.d.ts +138 -0
- package/dist/index.js +116 -14
- package/dist/shadcn/accordion.d.ts +7 -0
- package/dist/shadcn/accordion.js +33 -0
- package/dist/shadcn/alert-dialog.d.ts +20 -0
- package/dist/shadcn/alert-dialog.js +83 -0
- package/dist/shadcn/alert.d.ts +9 -0
- package/dist/shadcn/alert.js +38 -0
- package/dist/shadcn/aspect-ratio.d.ts +3 -0
- package/dist/shadcn/aspect-ratio.js +19 -0
- package/dist/shadcn/avatar.d.ts +6 -0
- package/dist/shadcn/avatar.js +28 -0
- package/dist/shadcn/badge.d.ts +9 -0
- package/dist/shadcn/badge.js +35 -0
- package/dist/shadcn/breadcrumb.d.ts +11 -0
- package/dist/shadcn/breadcrumb.js +45 -0
- package/dist/shadcn/button.d.ts +10 -0
- package/dist/shadcn/button.js +47 -0
- package/dist/shadcn/calendar.d.ts +8 -0
- package/dist/shadcn/calendar.js +61 -0
- package/dist/shadcn/card.d.ts +9 -0
- package/dist/shadcn/card.js +42 -0
- package/dist/shadcn/checkbox.d.ts +4 -0
- package/dist/shadcn/checkbox.js +21 -0
- package/dist/shadcn/collapsible.d.ts +5 -0
- package/dist/shadcn/collapsible.js +27 -0
- package/dist/shadcn/command.d.ts +18 -0
- package/dist/shadcn/command.js +54 -0
- package/dist/shadcn/date-input.d.ts +7 -0
- package/dist/shadcn/date-input.js +179 -0
- package/dist/shadcn/date-range-picker.d.ts +24 -0
- package/dist/shadcn/date-range-picker.js +45 -0
- package/dist/shadcn/dialog.d.ts +15 -0
- package/dist/shadcn/dialog.js +57 -0
- package/dist/shadcn/drawer.d.ts +13 -0
- package/dist/shadcn/drawer.js +56 -0
- package/dist/shadcn/dropdown-menu.d.ts +25 -0
- package/dist/shadcn/dropdown-menu.js +77 -0
- package/dist/shadcn/form.d.ts +24 -0
- package/dist/shadcn/form.js +70 -0
- package/dist/shadcn/hover-card.d.ts +6 -0
- package/dist/shadcn/hover-card.js +28 -0
- package/dist/shadcn/input-otp.d.ts +34 -0
- package/dist/shadcn/input-otp.js +40 -0
- package/dist/shadcn/input.d.ts +3 -0
- package/dist/shadcn/input.js +18 -0
- package/dist/shadcn/label.d.ts +4 -0
- package/dist/shadcn/label.js +20 -0
- package/dist/shadcn/navigation-menu.d.ts +16 -0
- package/dist/shadcn/navigation-menu.js +74 -0
- package/dist/shadcn/popover.d.ts +7 -0
- package/dist/shadcn/popover.js +32 -0
- package/dist/shadcn/progress.d.ts +8 -0
- package/dist/shadcn/progress.js +23 -0
- package/dist/shadcn/radio-group.d.ts +5 -0
- package/dist/shadcn/radio-group.js +25 -0
- package/dist/shadcn/scroll-area.d.ts +5 -0
- package/dist/shadcn/scroll-area.js +26 -0
- package/dist/shadcn/select.d.ts +15 -0
- package/dist/shadcn/select.js +59 -0
- package/dist/shadcn/separator.d.ts +4 -0
- package/dist/shadcn/separator.js +20 -0
- package/dist/shadcn/sheet.d.ts +13 -0
- package/dist/shadcn/sheet.js +61 -0
- package/dist/shadcn/sidebar.d.ts +69 -0
- package/dist/shadcn/sidebar.js +242 -0
- package/dist/shadcn/skeleton.d.ts +3 -0
- package/dist/shadcn/skeleton.js +18 -0
- package/dist/shadcn/slider.d.ts +4 -0
- package/dist/shadcn/slider.js +26 -0
- package/dist/shadcn/sonner.d.ts +3 -0
- package/dist/shadcn/sonner.js +25 -0
- package/dist/shadcn/switch.d.ts +4 -0
- package/dist/shadcn/switch.js +20 -0
- package/dist/shadcn/table.d.ts +10 -0
- package/dist/shadcn/table.js +47 -0
- package/dist/shadcn/tabs.d.ts +7 -0
- package/dist/shadcn/tabs.js +32 -0
- package/dist/shadcn/textarea.d.ts +3 -0
- package/dist/shadcn/textarea.js +18 -0
- package/dist/shadcn/toggle-group.d.ts +9 -0
- package/dist/shadcn/toggle-group.js +35 -0
- package/dist/shadcn/toggle.d.ts +9 -0
- package/dist/shadcn/toggle.js +38 -0
- package/dist/shadcn/tooltip.d.ts +7 -0
- package/dist/shadcn/tooltip.js +32 -0
- package/dist/shadcn/workflow.d.ts +20 -0
- package/dist/shadcn/workflow.js +20 -0
- package/dist/styles.css +6163 -0
- package/dist/utils/actions/account/index.d.ts +5 -0
- package/dist/utils/actions/account/index.js +28 -0
- package/dist/utils/actions/account/type.d.ts +4 -0
- package/dist/utils/actions/account/type.js +1 -0
- package/dist/utils/actions/auth/index.d.ts +7 -0
- package/{templates/default/utils/actions/auth/index.ts → dist/utils/actions/auth/index.js} +58 -69
- package/dist/utils/actions/common/utils.d.ts +5 -0
- package/{templates/default/utils/actions/common/utils.ts → dist/utils/actions/common/utils.js} +25 -28
- package/dist/utils/actions/software/index.d.ts +11 -0
- package/dist/utils/actions/software/index.js +75 -0
- package/dist/utils/api/accountService/index.d.ts +23 -0
- package/dist/utils/api/accountService/index.js +64 -0
- package/dist/utils/api/accountService/type.d.ts +4 -0
- package/dist/utils/api/accountService/type.js +1 -0
- package/dist/utils/api/file-upload/index.d.ts +5 -0
- package/dist/utils/api/file-upload/index.js +80 -0
- package/dist/utils/api/file-upload/type.d.ts +6 -0
- package/dist/utils/api/file-upload/type.js +1 -0
- package/dist/utils/api/ikonBaseApi.d.ts +12 -0
- package/{templates/default/utils/api/ikonBaseApi.ts → dist/utils/api/ikonBaseApi.js} +104 -132
- package/dist/utils/api/loginService/index.d.ts +12 -0
- package/dist/utils/api/loginService/index.js +72 -0
- package/{templates/default/utils/api/loginService/type.ts → dist/utils/api/loginService/type.d.ts} +31 -35
- package/dist/utils/api/loginService/type.js +1 -0
- package/dist/utils/api/softwareService/index.d.ts +64 -0
- package/dist/utils/api/softwareService/index.js +212 -0
- package/dist/utils/api/softwareService/type.d.ts +54 -0
- package/dist/utils/api/softwareService/type.js +1 -0
- package/dist/utils/border-radius-provider.d.ts +11 -0
- package/{templates/default/utils/border-radius-provider.tsx → dist/utils/border-radius-provider.js} +35 -59
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.js +5 -0
- package/dist/utils/font-provider.d.ts +11 -0
- package/{templates/default/utils/font-provider.tsx → dist/utils/font-provider.js} +37 -61
- package/dist/utils/session/cookieSession.d.ts +8 -0
- package/dist/utils/session/cookieSession.js +33 -0
- package/dist/utils/theme-provider/index.d.ts +3 -0
- package/dist/utils/theme-provider/index.js +18 -0
- package/dist/utils/token-management/index.d.ts +10 -0
- package/dist/utils/token-management/index.js +69 -0
- package/dist/utils/token-management/types.d.ts +6 -0
- package/dist/utils/token-management/types.js +1 -0
- package/package.json +91 -17
- package/bin.js +0 -2
- package/dist/commands/init.js +0 -63
- package/dist/utlis/copyDir.js +0 -7
- package/templates/default/hooks/use-mobile.ts +0 -19
- package/templates/default/ikoncomponents/action-menu/index.tsx +0 -108
- package/templates/default/ikoncomponents/action-menu/type.ts +0 -18
- package/templates/default/ikoncomponents/activity-sheet/index.tsx +0 -63
- package/templates/default/ikoncomponents/alert-dialog/dialog-context.tsx +0 -65
- package/templates/default/ikoncomponents/alert-dialog/index.tsx +0 -80
- package/templates/default/ikoncomponents/app-breadcrumb/BreadcrumbProvider.tsx +0 -68
- package/templates/default/ikoncomponents/app-breadcrumb/index.tsx +0 -222
- package/templates/default/ikoncomponents/big-calendar/big-calender-event/index.tsx +0 -38
- package/templates/default/ikoncomponents/big-calendar/big-calender-toolbar/index.tsx +0 -81
- package/templates/default/ikoncomponents/big-calendar/index.css +0 -879
- package/templates/default/ikoncomponents/big-calendar/index.tsx +0 -59
- package/templates/default/ikoncomponents/big-calendar/type.ts +0 -37
- package/templates/default/ikoncomponents/buttons/index.tsx +0 -127
- package/templates/default/ikoncomponents/combobox-input/index.tsx +0 -75
- package/templates/default/ikoncomponents/combobox-input/type.ts +0 -14
- package/templates/default/ikoncomponents/custom-combo-dropdown/index.tsx +0 -242
- package/templates/default/ikoncomponents/data-table/datatable-column-filter/index.tsx +0 -80
- package/templates/default/ikoncomponents/data-table/datatable-faceted-filter/index.tsx +0 -149
- package/templates/default/ikoncomponents/data-table/datatable-filter-menu/index.tsx +0 -98
- package/templates/default/ikoncomponents/data-table/datatable-pagination/index.tsx +0 -119
- package/templates/default/ikoncomponents/data-table/datatable-toolbar/index.tsx +0 -45
- package/templates/default/ikoncomponents/data-table/function.ts +0 -7
- package/templates/default/ikoncomponents/data-table/index.tsx +0 -549
- package/templates/default/ikoncomponents/data-table/type.ts +0 -75
- package/templates/default/ikoncomponents/e-chart/index.tsx +0 -183
- package/templates/default/ikoncomponents/file-input/index.tsx +0 -27
- package/templates/default/ikoncomponents/fileUpload/index.tsx +0 -121
- package/templates/default/ikoncomponents/form-fields/combobox-input/index.tsx +0 -111
- package/templates/default/ikoncomponents/form-fields/combobox-input-value/index.tsx +0 -121
- package/templates/default/ikoncomponents/form-fields/date-input/index.tsx +0 -80
- package/templates/default/ikoncomponents/form-fields/file-input/index.tsx +0 -9
- package/templates/default/ikoncomponents/form-fields/input/index.tsx +0 -27
- package/templates/default/ikoncomponents/form-fields/otp-input/index.tsx +0 -39
- package/templates/default/ikoncomponents/form-fields/password-input/index.tsx +0 -52
- package/templates/default/ikoncomponents/form-fields/phone-input/index.tsx +0 -7
- package/templates/default/ikoncomponents/form-fields/textarea/index.tsx +0 -28
- package/templates/default/ikoncomponents/form-fields/types/index.ts +0 -46
- package/templates/default/ikoncomponents/glowing-effect/index.tsx +0 -171
- package/templates/default/ikoncomponents/icon/index.tsx +0 -22
- package/templates/default/ikoncomponents/image-cropper-upload/components/cropperImg.css +0 -19
- package/templates/default/ikoncomponents/image-cropper-upload/components/newImageUploadForm.tsx +0 -352
- package/templates/default/ikoncomponents/image-cropper-upload/cropper-form/index.tsx +0 -250
- package/templates/default/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.tsx +0 -32
- package/templates/default/ikoncomponents/image-cropper-upload/index.tsx +0 -95
- package/templates/default/ikoncomponents/image-cropper-upload/utils/index.ts +0 -117
- package/templates/default/ikoncomponents/loading-spinner/index.tsx +0 -43
- package/templates/default/ikoncomponents/main-layout/RefreshContext.tsx +0 -30
- package/templates/default/ikoncomponents/main-layout/SidebarNavContext.tsx +0 -103
- package/templates/default/ikoncomponents/main-layout/app-sidebar.tsx +0 -36
- package/templates/default/ikoncomponents/main-layout/footer.tsx +0 -21
- package/templates/default/ikoncomponents/main-layout/header.tsx +0 -53
- package/templates/default/ikoncomponents/main-layout/index.tsx +0 -38
- package/templates/default/ikoncomponents/main-layout/main-sidebar.tsx +0 -389
- package/templates/default/ikoncomponents/main-layout/nav-main.tsx +0 -103
- package/templates/default/ikoncomponents/multi-combobox/index.tsx +0 -345
- package/templates/default/ikoncomponents/no-data/index.tsx +0 -11
- package/templates/default/ikoncomponents/page-wrapper/index.tsx +0 -30
- package/templates/default/ikoncomponents/password-strength-meter/index.tsx +0 -49
- package/templates/default/ikoncomponents/phone-input/index.tsx +0 -72
- package/templates/default/ikoncomponents/provider-wrapper/index.tsx +0 -32
- package/templates/default/ikoncomponents/search-input/index.tsx +0 -18
- package/templates/default/ikoncomponents/sheet/index.tsx +0 -34
- package/templates/default/ikoncomponents/simple-widget/index.tsx +0 -54
- package/templates/default/ikoncomponents/skeleton-loader/skeleton-table.tsx +0 -34
- package/templates/default/ikoncomponents/skeleton-loader/skeleton-widget.tsx +0 -13
- package/templates/default/ikoncomponents/tabs/index.tsx +0 -139
- package/templates/default/ikoncomponents/title-progress/index.tsx +0 -41
- package/templates/default/ikoncomponents/tooltip/index.tsx +0 -17
- package/templates/default/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.tsx +0 -33
- package/templates/default/ikoncomponents/twolevel-dropdown/index.tsx +0 -279
- package/templates/default/ikoncomponents/upload-tab/index.tsx +0 -237
- package/templates/default/ikoncomponents/widgets/index.tsx +0 -81
- package/templates/default/ikoncomponents/widgets/type.ts +0 -11
- package/templates/default/ikoncomponents/work-in-progress/index.tsx +0 -16
- package/templates/default/shadcn/accordion.tsx +0 -66
- package/templates/default/shadcn/alert-dialog.tsx +0 -179
- package/templates/default/shadcn/alert.tsx +0 -66
- package/templates/default/shadcn/aspect-ratio.tsx +0 -11
- package/templates/default/shadcn/avatar.tsx +0 -53
- package/templates/default/shadcn/badge.tsx +0 -49
- package/templates/default/shadcn/breadcrumb.tsx +0 -109
- package/templates/default/shadcn/button.tsx +0 -64
- package/templates/default/shadcn/calendar.tsx +0 -227
- package/templates/default/shadcn/card.tsx +0 -92
- package/templates/default/shadcn/checkbox.tsx +0 -33
- package/templates/default/shadcn/collapsible.tsx +0 -33
- package/templates/default/shadcn/command.tsx +0 -184
- package/templates/default/shadcn/date-input.tsx +0 -259
- package/templates/default/shadcn/date-range-picker.tsx +0 -103
- package/templates/default/shadcn/dialog.tsx +0 -143
- package/templates/default/shadcn/drawer.tsx +0 -134
- package/templates/default/shadcn/dropdown-menu.tsx +0 -259
- package/templates/default/shadcn/form.tsx +0 -166
- package/templates/default/shadcn/hover-card.tsx +0 -44
- package/templates/default/shadcn/input-otp.tsx +0 -71
- package/templates/default/shadcn/input.tsx +0 -22
- package/templates/default/shadcn/label.tsx +0 -24
- package/templates/default/shadcn/navigation-menu.tsx +0 -195
- package/templates/default/shadcn/popover.tsx +0 -48
- package/templates/default/shadcn/progress.tsx +0 -40
- package/templates/default/shadcn/radio-group.tsx +0 -45
- package/templates/default/shadcn/scroll-area.tsx +0 -58
- package/templates/default/shadcn/select.tsx +0 -184
- package/templates/default/shadcn/separator.tsx +0 -28
- package/templates/default/shadcn/sheet.tsx +0 -139
- package/templates/default/shadcn/sidebar.tsx +0 -726
- package/templates/default/shadcn/skeleton.tsx +0 -15
- package/templates/default/shadcn/slider.tsx +0 -64
- package/templates/default/shadcn/sonner.tsx +0 -25
- package/templates/default/shadcn/switch.tsx +0 -31
- package/templates/default/shadcn/table.tsx +0 -116
- package/templates/default/shadcn/tabs.tsx +0 -67
- package/templates/default/shadcn/textarea.tsx +0 -18
- package/templates/default/shadcn/toggle-group.tsx +0 -83
- package/templates/default/shadcn/toggle.tsx +0 -47
- package/templates/default/shadcn/tooltip.tsx +0 -65
- package/templates/default/shadcn/workflow.tsx +0 -119
- package/templates/default/utils/actions/account/index.ts +0 -33
- package/templates/default/utils/actions/account/type.ts +0 -4
- package/templates/default/utils/actions/common/revalidate.ts +0 -18
- package/templates/default/utils/actions/common/type.ts +0 -4
- package/templates/default/utils/actions/software/index.ts +0 -106
- package/templates/default/utils/api/accountService/index.ts +0 -103
- package/templates/default/utils/api/accountService/type.ts +0 -4
- package/templates/default/utils/api/file-upload/index.ts +0 -103
- package/templates/default/utils/api/file-upload/type.ts +0 -8
- package/templates/default/utils/api/loginService/index.ts +0 -106
- package/templates/default/utils/api/softwareService/index.ts +0 -356
- package/templates/default/utils/api/softwareService/type.ts +0 -62
- package/templates/default/utils/cn.ts +0 -6
- package/templates/default/utils/session/cookieSession.ts +0 -49
- package/templates/default/utils/theme-provider/index.tsx +0 -11
- package/templates/default/utils/token-management/index.ts +0 -115
- package/templates/default/utils/token-management/types.ts +0 -6
package/package.json
CHANGED
|
@@ -1,29 +1,103 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ikoncomponents",
|
|
3
|
-
"version": "1.5.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
"exports": {
|
|
9
|
-
".": "./dist/index.js"
|
|
10
|
-
},
|
|
3
|
+
"version": "1.5.7",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"css": "dist/styles.css",
|
|
11
7
|
"files": [
|
|
12
|
-
"dist"
|
|
13
|
-
"templates",
|
|
14
|
-
"bin.js"
|
|
8
|
+
"dist"
|
|
15
9
|
],
|
|
16
10
|
"scripts": {
|
|
17
|
-
"build": "
|
|
11
|
+
"build": "npm run build:js && npm run build:css",
|
|
12
|
+
"build:js": "tsc -p tsconfig.json",
|
|
13
|
+
"build:css": "postcss src/styles.css -o dist/styles.css --config postcss.config.mjs --minify",
|
|
14
|
+
"clean": "rimraf dist",
|
|
18
15
|
"prepublishOnly": "npm run build"
|
|
19
16
|
},
|
|
20
17
|
"dependencies": {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
18
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
19
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
20
|
+
"@radix-ui/react-aspect-ratio": "^1.1.7",
|
|
21
|
+
"@radix-ui/react-avatar": "^1.1.10",
|
|
22
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
23
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
24
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
25
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
26
|
+
"@radix-ui/react-icons": "^1.3.0",
|
|
27
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
28
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
29
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
30
|
+
"@radix-ui/react-progress": "^1.1.7",
|
|
31
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
32
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
33
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
34
|
+
"@radix-ui/react-separator": "^1.1.7",
|
|
35
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
36
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
37
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
38
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
39
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
40
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
41
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
42
|
+
"@tanstack/react-table": "^8.21.3",
|
|
43
|
+
"axios": "^1.13.1",
|
|
44
|
+
"class-variance-authority": "^0.7.1",
|
|
45
|
+
"clsx": "^2.1.1",
|
|
46
|
+
"cmdk": "^1.1.1",
|
|
47
|
+
"countries-list": "^3.1.1",
|
|
48
|
+
"country-flag-icons": "^1.5.21",
|
|
49
|
+
"crypto-js": "^4.2.0",
|
|
50
|
+
"date-fns": "^4.1.0",
|
|
51
|
+
"echarts": "^6.0.0",
|
|
52
|
+
"eslint": "^9",
|
|
53
|
+
"framer-motion": "^12.23.22",
|
|
54
|
+
"input-otp": "^1.4.2",
|
|
55
|
+
"jwt-decode": "^4.0.0",
|
|
56
|
+
"lucide-react": "^0.552.0",
|
|
57
|
+
"motion": "^12.23.22",
|
|
58
|
+
"next": "16.0.0",
|
|
59
|
+
"next-themes": "^0.4.6",
|
|
60
|
+
"react": "^18.2.0",
|
|
61
|
+
"react-big-calendar": "^1.19.4",
|
|
62
|
+
"react-cropper": "^2.3.3",
|
|
63
|
+
"react-day-picker": "^9.9.0",
|
|
64
|
+
"react-dom": "^18.2.0",
|
|
65
|
+
"react-hook-form": "^7.64.0",
|
|
66
|
+
"shadcn": "^3.5.0",
|
|
67
|
+
"sonner": "^2.0.7",
|
|
68
|
+
"tailwind-merge": "^3.3.1",
|
|
69
|
+
"tailwindcss-animate": "^1.0.7",
|
|
70
|
+
"uuid": "^13.0.0",
|
|
71
|
+
"vaul": "^1.1.2",
|
|
72
|
+
"zxcvbn": "^4.4.2"
|
|
24
73
|
},
|
|
25
74
|
"devDependencies": {
|
|
26
|
-
"@
|
|
27
|
-
"
|
|
75
|
+
"@tailwindcss/postcss": "^4",
|
|
76
|
+
"@types/crypto-js": "^4.2.2",
|
|
77
|
+
"@types/node": "^20",
|
|
78
|
+
"@types/react": "^19",
|
|
79
|
+
"@types/react-big-calendar": "^1.16.3",
|
|
80
|
+
"@types/react-dom": "^19",
|
|
81
|
+
"@types/zxcvbn": "^4.4.5",
|
|
82
|
+
"autoprefixer": "^10.4.21",
|
|
83
|
+
"eslint": "^9",
|
|
84
|
+
"eslint-config-next": "16.0.0",
|
|
85
|
+
"next": "^14.0.0",
|
|
86
|
+
"postcss": "^8.5.6",
|
|
87
|
+
"postcss-cli": "^11.0.1",
|
|
88
|
+
"postcss-import": "^16.1.1",
|
|
89
|
+
"postcss-preset-env": "^10.4.0",
|
|
90
|
+
"rimraf": "^6.0.1",
|
|
91
|
+
"tailwindcss": "^4",
|
|
92
|
+
"tw-animate-css": "^1.4.0",
|
|
93
|
+
"typescript": "^5"
|
|
94
|
+
},
|
|
95
|
+
"peerDependencies": {
|
|
96
|
+
"clsx": "^2.1.1",
|
|
97
|
+
"next": "16.0.0",
|
|
98
|
+
"next-themes": "^0.4.6",
|
|
99
|
+
"react": "^18.2.0",
|
|
100
|
+
"react-dom": "^18.2.0",
|
|
101
|
+
"tailwind-merge": "^3.3.1"
|
|
28
102
|
}
|
|
29
103
|
}
|
package/bin.js
DELETED
package/dist/commands/init.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import process from "process";
|
|
3
|
-
import { fileURLToPath } from "url";
|
|
4
|
-
import { execa } from "execa";
|
|
5
|
-
import kleur from "kleur";
|
|
6
|
-
import { copyDir } from "../utlis/copyDir.js";
|
|
7
|
-
export async function init() {
|
|
8
|
-
const cwd = process.cwd();
|
|
9
|
-
console.log(kleur.cyan("\n🚀 Installing ikoncomponents...\n"));
|
|
10
|
-
// ✅ FIX FOR WINDOWS + ESM
|
|
11
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
-
const __dirname = path.dirname(__filename);
|
|
13
|
-
// templates/default inside the package
|
|
14
|
-
const templateDir = path.resolve(__dirname, "../../templates/default");
|
|
15
|
-
// 1️⃣ COPY templates/default → user src/
|
|
16
|
-
await copyDir(templateDir, path.join(cwd, "src"));
|
|
17
|
-
console.log(kleur.green("✔ Components copied"));
|
|
18
|
-
// 2️⃣ INSTALL ALL DEPENDENCIES
|
|
19
|
-
const dependencies = [
|
|
20
|
-
// radix
|
|
21
|
-
"@radix-ui/react-accordion",
|
|
22
|
-
"@radix-ui/react-alert-dialog",
|
|
23
|
-
"@radix-ui/react-avatar",
|
|
24
|
-
"@radix-ui/react-checkbox",
|
|
25
|
-
"@radix-ui/react-dialog",
|
|
26
|
-
"@radix-ui/react-dropdown-menu",
|
|
27
|
-
"@radix-ui/react-hover-card",
|
|
28
|
-
"@radix-ui/react-icons",
|
|
29
|
-
"@radix-ui/react-label",
|
|
30
|
-
"@radix-ui/react-navigation-menu",
|
|
31
|
-
"@radix-ui/react-popover",
|
|
32
|
-
"@radix-ui/react-progress",
|
|
33
|
-
"@radix-ui/react-radio-group",
|
|
34
|
-
"@radix-ui/react-scroll-area",
|
|
35
|
-
"@radix-ui/react-select",
|
|
36
|
-
"@radix-ui/react-separator",
|
|
37
|
-
"@radix-ui/react-slider",
|
|
38
|
-
"@radix-ui/react-slot",
|
|
39
|
-
"@radix-ui/react-switch",
|
|
40
|
-
"@radix-ui/react-tabs",
|
|
41
|
-
"@radix-ui/react-toggle",
|
|
42
|
-
"@radix-ui/react-toggle-group",
|
|
43
|
-
"@radix-ui/react-tooltip",
|
|
44
|
-
// utils
|
|
45
|
-
"class-variance-authority",
|
|
46
|
-
"clsx",
|
|
47
|
-
"tailwind-merge",
|
|
48
|
-
"lucide-react",
|
|
49
|
-
"framer-motion",
|
|
50
|
-
"sonner",
|
|
51
|
-
"vaul",
|
|
52
|
-
"cmdk",
|
|
53
|
-
"uuid",
|
|
54
|
-
"date-fns",
|
|
55
|
-
"axios"
|
|
56
|
-
];
|
|
57
|
-
console.log(kleur.yellow("\n📦 Installing dependencies...\n"));
|
|
58
|
-
await execa("npm", ["install", ...dependencies], {
|
|
59
|
-
cwd,
|
|
60
|
-
stdio: "inherit"
|
|
61
|
-
});
|
|
62
|
-
console.log(kleur.green("\n✔ ikoncomponents installed successfully\n"));
|
|
63
|
-
}
|
package/dist/utlis/copyDir.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
|
|
3
|
-
const MOBILE_BREAKPOINT = 768
|
|
4
|
-
|
|
5
|
-
export function useIsMobile() {
|
|
6
|
-
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
|
|
7
|
-
|
|
8
|
-
React.useEffect(() => {
|
|
9
|
-
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
|
|
10
|
-
const onChange = () => {
|
|
11
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
|
12
|
-
}
|
|
13
|
-
mql.addEventListener("change", onChange)
|
|
14
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
|
15
|
-
return () => mql.removeEventListener("change", onChange)
|
|
16
|
-
}, [])
|
|
17
|
-
|
|
18
|
-
return !!isMobile
|
|
19
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { Button } from "../../shadcn/button";
|
|
4
|
-
import {
|
|
5
|
-
DropdownMenu,
|
|
6
|
-
DropdownMenuContent,
|
|
7
|
-
DropdownMenuGroup,
|
|
8
|
-
DropdownMenuItem,
|
|
9
|
-
DropdownMenuLabel,
|
|
10
|
-
DropdownMenuPortal,
|
|
11
|
-
DropdownMenuSeparator,
|
|
12
|
-
DropdownMenuShortcut,
|
|
13
|
-
DropdownMenuSub,
|
|
14
|
-
DropdownMenuSubContent,
|
|
15
|
-
DropdownMenuSubTrigger,
|
|
16
|
-
DropdownMenuTrigger,
|
|
17
|
-
} from "../../shadcn/dropdown-menu";
|
|
18
|
-
import { MoreHorizontal } from "lucide-react";
|
|
19
|
-
import type { ActionMenuProps, ExtraActionParams } from "./type";
|
|
20
|
-
import { IconButtonWithTooltip } from "../buttons";
|
|
21
|
-
|
|
22
|
-
export function ActionMenu({
|
|
23
|
-
actionMenus,
|
|
24
|
-
extraActionParams,
|
|
25
|
-
}: {
|
|
26
|
-
actionMenus: ActionMenuProps[];
|
|
27
|
-
extraActionParams?: ExtraActionParams;
|
|
28
|
-
}) {
|
|
29
|
-
const renderMenuItems = (items: ActionMenuProps[]) => {
|
|
30
|
-
items = items.filter((item) => {
|
|
31
|
-
// biome-ignore lint/complexity/useOptionalChain: <explanation>
|
|
32
|
-
return (item?.visibility === undefined || item.visibility === true || (item.visibility && item.visibility(...(extraActionParams?.arguments || []))))
|
|
33
|
-
})
|
|
34
|
-
if (items.length === 0) {
|
|
35
|
-
return <DropdownMenuItem className="text-center">No action available.</DropdownMenuItem>
|
|
36
|
-
}
|
|
37
|
-
return items.map((item, index) => {
|
|
38
|
-
if (item.type === "label") {
|
|
39
|
-
return <DropdownMenuLabel key={index}>{String(item.label)}</DropdownMenuLabel>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (item.type === "separator") {
|
|
43
|
-
return <DropdownMenuSeparator key={index} />;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (item.type === "group" && item.items) {
|
|
47
|
-
return (
|
|
48
|
-
<DropdownMenuGroup key={index}>
|
|
49
|
-
{renderMenuItems(item.items)}
|
|
50
|
-
</DropdownMenuGroup>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (item.items) {
|
|
55
|
-
return (
|
|
56
|
-
<DropdownMenuSub key={index}>
|
|
57
|
-
<DropdownMenuSubTrigger>{String(item.label)}</DropdownMenuSubTrigger>
|
|
58
|
-
<DropdownMenuPortal>
|
|
59
|
-
<DropdownMenuSubContent>
|
|
60
|
-
{renderMenuItems(item.items)}
|
|
61
|
-
</DropdownMenuSubContent>
|
|
62
|
-
</DropdownMenuPortal>
|
|
63
|
-
</DropdownMenuSub>
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
let labelContent = "";
|
|
68
|
-
if (typeof item.label === "function") {
|
|
69
|
-
labelContent = item.label(...(extraActionParams?.arguments || []));
|
|
70
|
-
} else {
|
|
71
|
-
labelContent = item.label;
|
|
72
|
-
}
|
|
73
|
-
return (
|
|
74
|
-
|
|
75
|
-
<DropdownMenuItem
|
|
76
|
-
key={index}
|
|
77
|
-
disabled={item.disabled}
|
|
78
|
-
onClick={() =>
|
|
79
|
-
// biome-ignore lint/complexity/useOptionalChain: <explanation>
|
|
80
|
-
item.onClick &&
|
|
81
|
-
item.onClick(...(extraActionParams?.arguments || []))
|
|
82
|
-
}
|
|
83
|
-
>
|
|
84
|
-
{item.icon && <item.icon />}
|
|
85
|
-
{labelContent}
|
|
86
|
-
{/* {item.shortcut && <DropdownMenuShortcut>{item.shortcut}</DropdownMenuShortcut>} */}
|
|
87
|
-
</DropdownMenuItem>
|
|
88
|
-
);
|
|
89
|
-
});
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
return (
|
|
93
|
-
<DropdownMenu>
|
|
94
|
-
<DropdownMenuTrigger asChild>
|
|
95
|
-
<IconButtonWithTooltip
|
|
96
|
-
variant="ghost"
|
|
97
|
-
tooltipContent="Actions"
|
|
98
|
-
className="h-8 w-8 p-0 border-0 bg-transparent text-foreground keross:text-white elevation-0 shadow-none hover:bg-transparent"
|
|
99
|
-
>
|
|
100
|
-
<MoreHorizontal />
|
|
101
|
-
</IconButtonWithTooltip>
|
|
102
|
-
</DropdownMenuTrigger>
|
|
103
|
-
<DropdownMenuContent className="w-56" align="end">
|
|
104
|
-
{renderMenuItems(actionMenus)}
|
|
105
|
-
</DropdownMenuContent>
|
|
106
|
-
</DropdownMenu>
|
|
107
|
-
);
|
|
108
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { LucideProps } from "lucide-react";
|
|
2
|
-
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
|
3
|
-
|
|
4
|
-
export interface ActionMenuProps {
|
|
5
|
-
items?: ActionMenuProps[];
|
|
6
|
-
type?: "sub" | "group" | "separator" | "label" | null;
|
|
7
|
-
label: ((...args: any) => string) | string;
|
|
8
|
-
icon?: ForwardRefExoticComponent<
|
|
9
|
-
Omit<LucideProps, "ref"> & RefAttributes<SVGSVGElement>
|
|
10
|
-
>;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
visibility?: ((...args: any) => boolean) | boolean;
|
|
13
|
-
onClick?: (...args: any) => void;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface ExtraActionParams {
|
|
17
|
-
arguments?: any[];
|
|
18
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { AlignJustify } from "lucide-react";
|
|
4
|
-
import { TabArray } from "../tabs/type";
|
|
5
|
-
import {CustomTabs} from "../tabs";
|
|
6
|
-
import {NoDataComponent} from "../no-data";
|
|
7
|
-
import {UploadTab} from "../upload-tab";
|
|
8
|
-
import { SheetComponent } from "../sheet";
|
|
9
|
-
|
|
10
|
-
export type ActivityLogProps = {
|
|
11
|
-
id: string;
|
|
12
|
-
activity: string;
|
|
13
|
-
updatedBy: string;
|
|
14
|
-
updatedOn: string;
|
|
15
|
-
source: string;
|
|
16
|
-
parentId: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export function ActivitySheet({ activityLogs = [] }: { activityLogs?: ActivityLogProps[] }) {
|
|
20
|
-
|
|
21
|
-
const tabArray: TabArray[] = [
|
|
22
|
-
{
|
|
23
|
-
tabName: "Activity",
|
|
24
|
-
tabId: "tab-activity",
|
|
25
|
-
default: true,
|
|
26
|
-
tabContent: <div className="overflow-auto flex flex-col gap-2 h-full">
|
|
27
|
-
{activityLogs.length > 0 ? (
|
|
28
|
-
activityLogs.map((log: any) => (
|
|
29
|
-
<div key={log.id} className="border-b text-sm pb-2">
|
|
30
|
-
<p className="font-medium pb-1">{log.activity}</p>
|
|
31
|
-
<p className="text-gray-500 pb-1">
|
|
32
|
-
Updated On:{" "}
|
|
33
|
-
<span className="text-gray-700">
|
|
34
|
-
{new Date(log.updatedOn).toLocaleString()}
|
|
35
|
-
</span>
|
|
36
|
-
</p>
|
|
37
|
-
<p className="text-gray-500 pb-1">
|
|
38
|
-
{/* Updated By: <span className="text-gray-700">{userMap[log.updatedBy]?.userName || "n/a"}</span> */}
|
|
39
|
-
Updated By: <span className="text-gray-700">{log.updatedBy}</span>
|
|
40
|
-
</p>
|
|
41
|
-
</div>
|
|
42
|
-
))
|
|
43
|
-
) : (
|
|
44
|
-
<NoDataComponent text="No Activity Logs Available" />
|
|
45
|
-
)}
|
|
46
|
-
</div>
|
|
47
|
-
}, {
|
|
48
|
-
tabName: "File Upload",
|
|
49
|
-
tabId: "tab-upload",
|
|
50
|
-
default: false,
|
|
51
|
-
tabContent: <UploadTab />
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
return (
|
|
55
|
-
<SheetComponent
|
|
56
|
-
buttonText=""
|
|
57
|
-
buttonIcon={<AlignJustify />}
|
|
58
|
-
sheetTitle=""
|
|
59
|
-
sheetContent={<CustomTabs tabArray={tabArray} tabListClass='' />}
|
|
60
|
-
closeButton={true}
|
|
61
|
-
/>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import { createContext, useContext, useState, ReactNode } from "react"
|
|
3
|
-
import { CustomAlertDialog } from "../alert-dialog";
|
|
4
|
-
|
|
5
|
-
interface DialogContextProps {
|
|
6
|
-
openDialog: (options: DialogOptions) => void;
|
|
7
|
-
closeDialog: () => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface DialogOptions {
|
|
11
|
-
title: string;
|
|
12
|
-
description: string;
|
|
13
|
-
onConfirm?: () => void;
|
|
14
|
-
onCancel?: () => void;
|
|
15
|
-
onThird?: () => void;
|
|
16
|
-
confirmText?: string;
|
|
17
|
-
cancelText?: string;
|
|
18
|
-
thirdOptionText?: string;
|
|
19
|
-
fontSize?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const DialogContext = createContext<DialogContextProps | undefined>(undefined);
|
|
23
|
-
|
|
24
|
-
export const useDialog = () => {
|
|
25
|
-
const context = useContext(DialogContext);
|
|
26
|
-
if (!context) {
|
|
27
|
-
throw new Error("useDialog must be used within a DialogProvider");
|
|
28
|
-
}
|
|
29
|
-
return context;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const DialogProvider: React.FC<{ children: ReactNode }> = ({ children }) => {
|
|
33
|
-
const [dialogOptions, setDialogOptions] = useState<DialogOptions | null>(null);
|
|
34
|
-
|
|
35
|
-
const openDialog = (options: DialogOptions) => setDialogOptions(options);
|
|
36
|
-
const closeDialog = () => setDialogOptions(null);
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<DialogContext.Provider value={{ openDialog, closeDialog }}>
|
|
40
|
-
{children}
|
|
41
|
-
{dialogOptions && (
|
|
42
|
-
<CustomAlertDialog
|
|
43
|
-
title={dialogOptions.title}
|
|
44
|
-
description={dialogOptions.description}
|
|
45
|
-
fontSize={dialogOptions.fontSize || "text-base"}
|
|
46
|
-
cancelText={dialogOptions.cancelText || ""}
|
|
47
|
-
confirmText={dialogOptions.confirmText || ""}
|
|
48
|
-
thirdOptionText={dialogOptions.thirdOptionText || ""}
|
|
49
|
-
onConfirm={() => {
|
|
50
|
-
if (dialogOptions.onConfirm) dialogOptions.onConfirm();
|
|
51
|
-
closeDialog();
|
|
52
|
-
}}
|
|
53
|
-
onCancel={() => {
|
|
54
|
-
if (dialogOptions.onCancel) dialogOptions.onCancel();
|
|
55
|
-
closeDialog();
|
|
56
|
-
}}
|
|
57
|
-
onThird={() => {
|
|
58
|
-
if (dialogOptions.onThird) dialogOptions.onThird();
|
|
59
|
-
closeDialog();
|
|
60
|
-
}}
|
|
61
|
-
/>
|
|
62
|
-
)}
|
|
63
|
-
</DialogContext.Provider>
|
|
64
|
-
);
|
|
65
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
AlertDialog,
|
|
4
|
-
AlertDialogAction,
|
|
5
|
-
AlertDialogCancel,
|
|
6
|
-
AlertDialogContent,
|
|
7
|
-
AlertDialogDescription,
|
|
8
|
-
AlertDialogFooter,
|
|
9
|
-
AlertDialogHeader,
|
|
10
|
-
AlertDialogTitle,
|
|
11
|
-
} from "../../shadcn/alert-dialog";
|
|
12
|
-
|
|
13
|
-
interface CustomAlertDialogProps {
|
|
14
|
-
title: string;
|
|
15
|
-
description?: string;
|
|
16
|
-
fontSize?: string; // Tailwind font size class, e.g., "text-sm", "text-lg"
|
|
17
|
-
cancelText?: string; // Custom text for the cancel button
|
|
18
|
-
confirmText?: string; // Custom text for the confirm button
|
|
19
|
-
thirdOptionText?: string; // Custom text for the third button
|
|
20
|
-
onCancel?: () => void; // Callback function for cancel action
|
|
21
|
-
onConfirm?: () => void; // Callback function for confirm action
|
|
22
|
-
onThird?: () => void;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const CustomAlertDialog: React.FC<CustomAlertDialogProps> = ({
|
|
26
|
-
title,
|
|
27
|
-
description,
|
|
28
|
-
fontSize = "text-base",
|
|
29
|
-
cancelText = "", // Default cancel button text
|
|
30
|
-
confirmText = "", // Default confirm button text
|
|
31
|
-
thirdOptionText = "", // Default third button text
|
|
32
|
-
onCancel, // Optional callback for cancel action
|
|
33
|
-
onConfirm, // Optional callback for confirm action
|
|
34
|
-
onThird, // Optional callback for third action
|
|
35
|
-
}) => {
|
|
36
|
-
return (
|
|
37
|
-
<AlertDialog open={true}>
|
|
38
|
-
<AlertDialogContent>
|
|
39
|
-
<AlertDialogHeader>
|
|
40
|
-
<AlertDialogTitle className={fontSize}>{title}</AlertDialogTitle>
|
|
41
|
-
<AlertDialogDescription className={fontSize}>
|
|
42
|
-
{description}
|
|
43
|
-
</AlertDialogDescription>
|
|
44
|
-
</AlertDialogHeader>
|
|
45
|
-
<AlertDialogFooter>
|
|
46
|
-
{cancelText != "" && (
|
|
47
|
-
<AlertDialogCancel
|
|
48
|
-
onClick={() => {
|
|
49
|
-
if (onCancel) onCancel(); // Execute cancel callback if provided
|
|
50
|
-
}}
|
|
51
|
-
>
|
|
52
|
-
{cancelText}
|
|
53
|
-
</AlertDialogCancel>
|
|
54
|
-
)}
|
|
55
|
-
{thirdOptionText != "" && (
|
|
56
|
-
<AlertDialogAction
|
|
57
|
-
className="bg-blue-500"
|
|
58
|
-
color="black"
|
|
59
|
-
onClick={() => {
|
|
60
|
-
if (onThird) onThird(); // Execute confirm callback if provided
|
|
61
|
-
}}
|
|
62
|
-
>
|
|
63
|
-
{thirdOptionText}
|
|
64
|
-
</AlertDialogAction>
|
|
65
|
-
)}
|
|
66
|
-
{confirmText != "" && (
|
|
67
|
-
<AlertDialogAction
|
|
68
|
-
onClick={() => {
|
|
69
|
-
if (onConfirm) onConfirm(); // Execute confirm callback if provided
|
|
70
|
-
}}
|
|
71
|
-
>
|
|
72
|
-
{confirmText}
|
|
73
|
-
</AlertDialogAction>
|
|
74
|
-
)}
|
|
75
|
-
</AlertDialogFooter>
|
|
76
|
-
</AlertDialogContent>
|
|
77
|
-
</AlertDialog>
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
import { createContext, useContext, useState, ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
// Define the type for a breadcrumb item
|
|
5
|
-
export interface BreadcrumbItemProps {
|
|
6
|
-
title: string;
|
|
7
|
-
href?: string;
|
|
8
|
-
level: number;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// Define the type for the context state
|
|
12
|
-
interface BreadcrumbContextType {
|
|
13
|
-
breadcrumbItems: BreadcrumbItemProps[];
|
|
14
|
-
addBreadcrumb: (item: BreadcrumbItemProps) => void;
|
|
15
|
-
backBreadcrumb: (item: BreadcrumbItemProps) => void;
|
|
16
|
-
addBreadcrumbItems: (items: BreadcrumbItemProps[], isReplace?: boolean) => void;
|
|
17
|
-
clearBreadcrumb: () => void;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Create the context with a default value
|
|
21
|
-
const BreadcrumbContext = createContext<BreadcrumbContextType | undefined>(undefined);
|
|
22
|
-
|
|
23
|
-
// Create a provider component
|
|
24
|
-
export function BreadcrumbProvider({ children }: { children: ReactNode }) {
|
|
25
|
-
const [breadcrumbItems, setBreadcrumbItems] = useState<BreadcrumbItemProps[]>([]);
|
|
26
|
-
// Function to add a breadcrumb item
|
|
27
|
-
const addBreadcrumb = (item: BreadcrumbItemProps) => {
|
|
28
|
-
setBreadcrumbItems((prevItems) => {
|
|
29
|
-
const filterState = prevItems.filter((e) => e.level < item.level);
|
|
30
|
-
return [...filterState, item];
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const addBreadcrumbItems = (items: BreadcrumbItemProps[], isReplace?: boolean) => {
|
|
35
|
-
if (isReplace) {
|
|
36
|
-
setBreadcrumbItems(items);
|
|
37
|
-
} else {
|
|
38
|
-
setBreadcrumbItems((prevItems) => [...prevItems, ...items]);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// Function to go back in the breadcrumb
|
|
43
|
-
const backBreadcrumb = (item: BreadcrumbItemProps) => {
|
|
44
|
-
setBreadcrumbItems((prevItems) => {
|
|
45
|
-
const filterState = prevItems.filter((e) => e.level <= item.level);
|
|
46
|
-
return [...filterState];
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const clearBreadcrumb = () => {
|
|
51
|
-
setBreadcrumbItems([]);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<BreadcrumbContext.Provider value={{ breadcrumbItems, addBreadcrumb, backBreadcrumb, addBreadcrumbItems, clearBreadcrumb }}>
|
|
56
|
-
{children}
|
|
57
|
-
</BreadcrumbContext.Provider>
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Custom hook to use the BreadcrumbContext
|
|
62
|
-
export function useBreadcrumb() {
|
|
63
|
-
const context = useContext(BreadcrumbContext);
|
|
64
|
-
if (!context) {
|
|
65
|
-
throw new Error('useBreadcrumb must be used within a BreadcrumbProvider');
|
|
66
|
-
}
|
|
67
|
-
return context;
|
|
68
|
-
}
|