ikoncomponents 1.5.8 → 1.5.10
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/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 +18 -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/ikonS/accordion.tsx +0 -66
- package/templates/default/ikonS/alert-dialog.tsx +0 -179
- package/templates/default/ikonS/alert.tsx +0 -66
- package/templates/default/ikonS/aspect-ratio.tsx +0 -11
- package/templates/default/ikonS/avatar.tsx +0 -53
- package/templates/default/ikonS/badge.tsx +0 -49
- package/templates/default/ikonS/breadcrumb.tsx +0 -109
- package/templates/default/ikonS/button.tsx +0 -64
- package/templates/default/ikonS/calendar.tsx +0 -227
- package/templates/default/ikonS/card.tsx +0 -92
- package/templates/default/ikonS/checkbox.tsx +0 -33
- package/templates/default/ikonS/collapsible.tsx +0 -33
- package/templates/default/ikonS/command.tsx +0 -184
- package/templates/default/ikonS/date-input.tsx +0 -259
- package/templates/default/ikonS/date-range-picker.tsx +0 -103
- package/templates/default/ikonS/dialog.tsx +0 -143
- package/templates/default/ikonS/drawer.tsx +0 -134
- package/templates/default/ikonS/dropdown-menu.tsx +0 -259
- package/templates/default/ikonS/form.tsx +0 -166
- package/templates/default/ikonS/hover-card.tsx +0 -44
- package/templates/default/ikonS/input-otp.tsx +0 -71
- package/templates/default/ikonS/input.tsx +0 -22
- package/templates/default/ikonS/label.tsx +0 -24
- package/templates/default/ikonS/navigation-menu.tsx +0 -195
- package/templates/default/ikonS/popover.tsx +0 -48
- package/templates/default/ikonS/progress.tsx +0 -40
- package/templates/default/ikonS/radio-group.tsx +0 -45
- package/templates/default/ikonS/scroll-area.tsx +0 -58
- package/templates/default/ikonS/select.tsx +0 -184
- package/templates/default/ikonS/separator.tsx +0 -28
- package/templates/default/ikonS/sheet.tsx +0 -139
- package/templates/default/ikonS/sidebar.tsx +0 -726
- package/templates/default/ikonS/skeleton.tsx +0 -15
- package/templates/default/ikonS/slider.tsx +0 -64
- package/templates/default/ikonS/sonner.tsx +0 -25
- package/templates/default/ikonS/switch.tsx +0 -31
- package/templates/default/ikonS/table.tsx +0 -116
- package/templates/default/ikonS/tabs.tsx +0 -67
- package/templates/default/ikonS/textarea.tsx +0 -18
- package/templates/default/ikonS/toggle-group.tsx +0 -83
- package/templates/default/ikonS/toggle.tsx +0 -47
- package/templates/default/ikonS/tooltip.tsx +0 -65
- package/templates/default/ikonS/workflow.tsx +0 -119
- 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/styles.css +0 -1159
- 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
|
@@ -1,189 +1,118 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useTheme } from "next-themes";
|
|
4
|
-
import { useEffect, useState, useCallback } from "react";
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
document.documentElement.style.setProperty('--
|
|
54
|
-
document.documentElement.style.setProperty('--
|
|
55
|
-
document.documentElement.style.setProperty('--
|
|
56
|
-
document.documentElement.style.setProperty('--
|
|
57
|
-
document.documentElement.style.setProperty('--
|
|
58
|
-
document.documentElement.style.setProperty('--
|
|
59
|
-
document.documentElement.style.setProperty('--
|
|
60
|
-
document.documentElement.style.setProperty('--
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
document.documentElement.style.
|
|
65
|
-
document.documentElement.style.
|
|
66
|
-
document.documentElement.style.
|
|
67
|
-
document.documentElement.style.
|
|
68
|
-
document.documentElement.style.
|
|
69
|
-
document.documentElement.style.
|
|
70
|
-
document.documentElement.style.
|
|
71
|
-
document.documentElement.style.
|
|
72
|
-
document.documentElement.style.
|
|
73
|
-
|
|
74
|
-
document.documentElement.style.
|
|
75
|
-
document.documentElement.style.
|
|
76
|
-
document.documentElement.style.
|
|
77
|
-
document.documentElement.style.
|
|
78
|
-
document.documentElement.style.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
document.documentElement.style.removeProperty('--
|
|
83
|
-
document.documentElement.style.removeProperty('--
|
|
84
|
-
document.documentElement.style.removeProperty('--
|
|
85
|
-
document.documentElement.style.removeProperty('--
|
|
86
|
-
document.documentElement.style.removeProperty('--
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
setTheme(value);
|
|
120
|
-
if (value === "light" || value === "dark") {
|
|
121
|
-
document.documentElement.classList.remove("blue-dark");
|
|
122
|
-
resetColors();
|
|
123
|
-
}
|
|
124
|
-
if (value === "blue-dark") {
|
|
125
|
-
document.documentElement.classList.add("blue-dark");
|
|
126
|
-
applySavedColors();
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
[setTheme, applySavedColors, resetColors]
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
if (!mounted) return null;
|
|
133
|
-
|
|
134
|
-
const triggerIcon = (() => {
|
|
135
|
-
if (activeTheme === "blue-dark") return <Waves className="h-5 w-5" />;
|
|
136
|
-
if (activeTheme === "dark") return <Moon className="h-5 w-5" />;
|
|
137
|
-
if (activeTheme === "light") return <Sun className="h-5 w-5" />;
|
|
138
|
-
return <Laptop className="h-5 w-5" />;
|
|
139
|
-
})();
|
|
140
|
-
|
|
141
|
-
const isActive = (value: string) => activeTheme === value;
|
|
142
|
-
|
|
143
|
-
return (
|
|
144
|
-
<DropdownMenu>
|
|
145
|
-
<DropdownMenuTrigger asChild>
|
|
146
|
-
<Button
|
|
147
|
-
variant="outline"
|
|
148
|
-
size="icon"
|
|
149
|
-
aria-label="Change theme"
|
|
150
|
-
title={`Theme: ${theme === "system" ? `system (${resolvedTheme})` : theme}`}
|
|
151
|
-
>
|
|
152
|
-
{triggerIcon}
|
|
153
|
-
</Button>
|
|
154
|
-
</DropdownMenuTrigger>
|
|
155
|
-
|
|
156
|
-
<DropdownMenuContent align="end" sideOffset={8}>
|
|
157
|
-
<DropdownMenuItem
|
|
158
|
-
onClick={() => setThemeSafe("light")}
|
|
159
|
-
className="flex items-center justify-between gap-2"
|
|
160
|
-
>
|
|
161
|
-
<div className="flex items-center">
|
|
162
|
-
<Sun className="mr-2 h-4 w-4" /> Light
|
|
163
|
-
</div>
|
|
164
|
-
{isActive("light") && <Check className="h-4 w-4" />}
|
|
165
|
-
</DropdownMenuItem>
|
|
166
|
-
|
|
167
|
-
<DropdownMenuItem
|
|
168
|
-
onClick={() => setThemeSafe("dark")}
|
|
169
|
-
className="flex items-center justify-between gap-2"
|
|
170
|
-
>
|
|
171
|
-
<div className="flex items-center">
|
|
172
|
-
<Moon className="mr-2 h-4 w-4" /> Dark
|
|
173
|
-
</div>
|
|
174
|
-
{isActive("dark") && <Check className="h-4 w-4" />}
|
|
175
|
-
</DropdownMenuItem>
|
|
176
|
-
|
|
177
|
-
<DropdownMenuItem
|
|
178
|
-
onClick={() => setThemeSafe("blue-dark")}
|
|
179
|
-
className="flex items-center justify-between gap-2"
|
|
180
|
-
>
|
|
181
|
-
<div className="flex items-center">
|
|
182
|
-
<Waves className="mr-2 h-4 w-4" /> Custom
|
|
183
|
-
</div>
|
|
184
|
-
{isActive("blue-dark") && <Check className="h-4 w-4" />}
|
|
185
|
-
</DropdownMenuItem>
|
|
186
|
-
</DropdownMenuContent>
|
|
187
|
-
</DropdownMenu>
|
|
188
|
-
);
|
|
189
|
-
}
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useTheme } from "next-themes";
|
|
4
|
+
import { useEffect, useState, useCallback } from "react";
|
|
5
|
+
import { Laptop, Moon, Sun, Check, Waves } from "lucide-react";
|
|
6
|
+
import { Button } from "../../shadcn/button";
|
|
7
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "../../shadcn/dropdown-menu";
|
|
8
|
+
export function ThemeToggleBtn() {
|
|
9
|
+
const { setTheme, theme, resolvedTheme } = useTheme();
|
|
10
|
+
const [mounted, setMounted] = useState(false);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
setMounted(true);
|
|
13
|
+
}, []);
|
|
14
|
+
const activeTheme = theme === "system" ? resolvedTheme : theme;
|
|
15
|
+
const getLuminance = (hexColor) => {
|
|
16
|
+
const rgb = parseInt(hexColor.slice(1), 16);
|
|
17
|
+
const r = (rgb >> 16) & 0xff;
|
|
18
|
+
const g = (rgb >> 8) & 0xff;
|
|
19
|
+
const b = (rgb >> 0) & 0xff;
|
|
20
|
+
const [rs, gs, bs] = [r, g, b].map(c => {
|
|
21
|
+
c = c / 255;
|
|
22
|
+
return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
|
|
23
|
+
});
|
|
24
|
+
return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
|
|
25
|
+
};
|
|
26
|
+
const getContrastColor = (bgColor) => {
|
|
27
|
+
const luminance = getLuminance(bgColor);
|
|
28
|
+
return luminance > 0.25 ? '#000000' : '#ffffff';
|
|
29
|
+
};
|
|
30
|
+
const applySavedColors = useCallback(() => {
|
|
31
|
+
const primaryColor = localStorage.getItem("primary") || '#0f172b';
|
|
32
|
+
const secondaryColor = localStorage.getItem("secondary") || '#1b2336';
|
|
33
|
+
const tertiaryColor = localStorage.getItem("tertiary") || '#1f3aba';
|
|
34
|
+
const pChartColor = localStorage.getItem("primaryChart") || '#00bc7d';
|
|
35
|
+
const sChartColor = localStorage.getItem("secondaryChart") || '#fd9a00';
|
|
36
|
+
const tChartColor = localStorage.getItem("tertiaryChart") || '#ad46ff';
|
|
37
|
+
document.documentElement.style.setProperty('--background', primaryColor);
|
|
38
|
+
document.documentElement.style.setProperty('--secondary', secondaryColor);
|
|
39
|
+
document.documentElement.style.setProperty('--card', secondaryColor);
|
|
40
|
+
document.documentElement.style.setProperty('--popover', secondaryColor);
|
|
41
|
+
document.documentElement.style.setProperty('--muted', secondaryColor);
|
|
42
|
+
document.documentElement.style.setProperty('--sidebar', secondaryColor);
|
|
43
|
+
document.documentElement.style.setProperty('--btn-secondary', secondaryColor);
|
|
44
|
+
document.documentElement.style.setProperty('--accent', tertiaryColor);
|
|
45
|
+
document.documentElement.style.setProperty('--sidebar-primary', tertiaryColor);
|
|
46
|
+
document.documentElement.style.setProperty('--sidebar-accent', tertiaryColor);
|
|
47
|
+
document.documentElement.style.setProperty('--foreground', getContrastColor(primaryColor));
|
|
48
|
+
document.documentElement.style.setProperty('--secondary-foreground', getContrastColor(secondaryColor));
|
|
49
|
+
document.documentElement.style.setProperty('--card-foreground', getContrastColor(secondaryColor));
|
|
50
|
+
document.documentElement.style.setProperty('--popover-foreground', getContrastColor(secondaryColor));
|
|
51
|
+
document.documentElement.style.setProperty('--muted-foreground', getContrastColor(secondaryColor));
|
|
52
|
+
document.documentElement.style.setProperty('--sidebar-foreground', getContrastColor(secondaryColor));
|
|
53
|
+
document.documentElement.style.setProperty('--accent-foreground', getContrastColor(tertiaryColor));
|
|
54
|
+
document.documentElement.style.setProperty('--sidebar-primary-foreground', getContrastColor(tertiaryColor));
|
|
55
|
+
document.documentElement.style.setProperty('--sidebar-accent-foreground', getContrastColor(tertiaryColor));
|
|
56
|
+
document.documentElement.style.setProperty('--chart-1', pChartColor);
|
|
57
|
+
document.documentElement.style.setProperty('--chart-2', sChartColor);
|
|
58
|
+
document.documentElement.style.setProperty('--chart-3', tChartColor);
|
|
59
|
+
document.documentElement.style.setProperty('--chart-4', pChartColor);
|
|
60
|
+
document.documentElement.style.setProperty('--chart-5', sChartColor);
|
|
61
|
+
}, []);
|
|
62
|
+
const resetColors = useCallback(() => {
|
|
63
|
+
document.documentElement.style.removeProperty('--background');
|
|
64
|
+
document.documentElement.style.removeProperty('--secondary');
|
|
65
|
+
document.documentElement.style.removeProperty('--card');
|
|
66
|
+
document.documentElement.style.removeProperty('--popover');
|
|
67
|
+
document.documentElement.style.removeProperty('--muted');
|
|
68
|
+
document.documentElement.style.removeProperty('--sidebar');
|
|
69
|
+
document.documentElement.style.removeProperty('--btn-secondary');
|
|
70
|
+
document.documentElement.style.removeProperty('--accent');
|
|
71
|
+
document.documentElement.style.removeProperty('--sidebar-primary');
|
|
72
|
+
document.documentElement.style.removeProperty('--sidebar-accent');
|
|
73
|
+
document.documentElement.style.removeProperty('--foreground');
|
|
74
|
+
document.documentElement.style.removeProperty('--secondary-foreground');
|
|
75
|
+
document.documentElement.style.removeProperty('--card-foreground');
|
|
76
|
+
document.documentElement.style.removeProperty('--popover-foreground');
|
|
77
|
+
document.documentElement.style.removeProperty('--muted-foreground');
|
|
78
|
+
document.documentElement.style.removeProperty('--sidebar-foreground');
|
|
79
|
+
document.documentElement.style.removeProperty('--accent-foreground');
|
|
80
|
+
document.documentElement.style.removeProperty('--sidebar-primary-foreground');
|
|
81
|
+
document.documentElement.style.removeProperty('--sidebar-accent-foreground');
|
|
82
|
+
document.documentElement.style.removeProperty('--chart-1');
|
|
83
|
+
document.documentElement.style.removeProperty('--chart-2');
|
|
84
|
+
document.documentElement.style.removeProperty('--chart-3');
|
|
85
|
+
document.documentElement.style.removeProperty('--chart-4');
|
|
86
|
+
document.documentElement.style.removeProperty('--chart-5');
|
|
87
|
+
}, []);
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
if (mounted && activeTheme === "blue-dark") {
|
|
90
|
+
document.documentElement.classList.add("blue-dark");
|
|
91
|
+
applySavedColors();
|
|
92
|
+
}
|
|
93
|
+
}, [mounted, activeTheme, applySavedColors]);
|
|
94
|
+
const setThemeSafe = useCallback((value) => {
|
|
95
|
+
setTheme(value);
|
|
96
|
+
if (value === "light" || value === "dark") {
|
|
97
|
+
document.documentElement.classList.remove("blue-dark");
|
|
98
|
+
resetColors();
|
|
99
|
+
}
|
|
100
|
+
if (value === "blue-dark") {
|
|
101
|
+
document.documentElement.classList.add("blue-dark");
|
|
102
|
+
applySavedColors();
|
|
103
|
+
}
|
|
104
|
+
}, [setTheme, applySavedColors, resetColors]);
|
|
105
|
+
if (!mounted)
|
|
106
|
+
return null;
|
|
107
|
+
const triggerIcon = (() => {
|
|
108
|
+
if (activeTheme === "blue-dark")
|
|
109
|
+
return _jsx(Waves, { className: "h-5 w-5" });
|
|
110
|
+
if (activeTheme === "dark")
|
|
111
|
+
return _jsx(Moon, { className: "h-5 w-5" });
|
|
112
|
+
if (activeTheme === "light")
|
|
113
|
+
return _jsx(Sun, { className: "h-5 w-5" });
|
|
114
|
+
return _jsx(Laptop, { className: "h-5 w-5" });
|
|
115
|
+
})();
|
|
116
|
+
const isActive = (value) => activeTheme === value;
|
|
117
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", size: "icon", "aria-label": "Change theme", title: `Theme: ${theme === "system" ? `system (${resolvedTheme})` : theme}`, children: triggerIcon }) }), _jsxs(DropdownMenuContent, { align: "end", sideOffset: 8, children: [_jsxs(DropdownMenuItem, { onClick: () => setThemeSafe("light"), className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: "flex items-center", children: [_jsx(Sun, { className: "mr-2 h-4 w-4" }), " Light"] }), isActive("light") && _jsx(Check, { className: "h-4 w-4" })] }), _jsxs(DropdownMenuItem, { onClick: () => setThemeSafe("dark"), className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: "flex items-center", children: [_jsx(Moon, { className: "mr-2 h-4 w-4" }), " Dark"] }), isActive("dark") && _jsx(Check, { className: "h-4 w-4" })] }), _jsxs(DropdownMenuItem, { onClick: () => setThemeSafe("blue-dark"), className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: "flex items-center", children: [_jsx(Waves, { className: "mr-2 h-4 w-4" }), " Custom"] }), isActive("blue-dark") && _jsx(Check, { className: "h-4 w-4" })] })] })] }));
|
|
118
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
title: string;
|
|
3
|
+
value: number;
|
|
4
|
+
valueText?: string;
|
|
5
|
+
isPercent?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
titleClassName?: string;
|
|
8
|
+
valueClassName?: string;
|
|
9
|
+
progressClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function TitleProgress({ title, value, valueText, isPercent, className, titleClassName, valueClassName, progressClassName }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Progress } from "../../shadcn/progress";
|
|
3
|
+
export function TitleProgress({ title, value, valueText, isPercent = true, className, titleClassName, valueClassName, progressClassName }) {
|
|
4
|
+
let finalValue = value.toFixed(2);
|
|
5
|
+
const parts = finalValue.split('.');
|
|
6
|
+
if (parts[1] === '00') {
|
|
7
|
+
finalValue = parts[0];
|
|
8
|
+
}
|
|
9
|
+
return (_jsxs("div", { className: 'w-full ' + (className !== null && className !== void 0 ? className : ''), children: [_jsxs("div", { className: 'flex items-center justify-between gap-4', children: [_jsx("div", { className: 'text-muted-foreground text-sm ' + (titleClassName !== null && titleClassName !== void 0 ? titleClassName : ''), children: title }), _jsx("div", { className: 'text-sm ' + (valueClassName !== null && valueClassName !== void 0 ? valueClassName : ''), children: valueText !== null && valueText !== void 0 ? valueText : `${finalValue}${isPercent ? '%' : ''}` })] }), _jsx(Progress, { value: value, className: 'w-full mt-2 ' + (progressClassName !== null && progressClassName !== void 0 ? progressClassName : '') })] }));
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip as TooltipComp, TooltipContent, TooltipProvider, TooltipTrigger } from "../../shadcn/tooltip";
|
|
3
|
+
export function TooltipComponent({ tooltipContent, children }) {
|
|
4
|
+
return (_jsx(TooltipProvider, { children: _jsxs(TooltipComp, { children: [_jsx(TooltipTrigger, { asChild: true, children: children }), _jsx(TooltipContent, { children: tooltipContent })] }) }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface FrameworkEntry {
|
|
2
|
+
id: string;
|
|
3
|
+
index: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
parentId: string | null;
|
|
7
|
+
treatAsParent: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface TreeNode extends FrameworkEntry {
|
|
10
|
+
level: number;
|
|
11
|
+
}
|
|
12
|
+
export interface ParentEntry extends FrameworkEntry {
|
|
13
|
+
childrenArray: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface ProcessedFrameworkData {
|
|
16
|
+
flatTree: TreeNode[];
|
|
17
|
+
itemMap: Record<string, {
|
|
18
|
+
parentId: string | null;
|
|
19
|
+
childrenIds: string[];
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
22
|
+
interface FrameworkItemDropdownProps {
|
|
23
|
+
processedData: ProcessedFrameworkData;
|
|
24
|
+
value: string[];
|
|
25
|
+
onChange: (newSelection: string[]) => void;
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
searchPlaceholder?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function FrameworkItemDropdown({ processedData, value, onChange, placeholder, searchPlaceholder, className, }: FrameworkItemDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,143 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function UploadTab(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
}
|