ikoncomponents 1.4.7 → 1.4.9
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/commands/init.js +57 -0
- package/dist/index.js +3 -116
- package/dist/utlis/copyDir.js +7 -0
- package/package.json +12 -90
- package/templates/default/hooks/use-mobile.ts +19 -0
- package/templates/default/ikonShade/accordion.tsx +66 -0
- package/templates/default/ikonShade/alert-dialog.tsx +179 -0
- package/templates/default/ikonShade/alert.tsx +66 -0
- package/templates/default/ikonShade/aspect-ratio.tsx +11 -0
- package/templates/default/ikonShade/avatar.tsx +53 -0
- package/templates/default/ikonShade/badge.tsx +49 -0
- package/templates/default/ikonShade/breadcrumb.tsx +109 -0
- package/templates/default/ikonShade/button.tsx +64 -0
- package/templates/default/ikonShade/calendar.tsx +227 -0
- package/templates/default/ikonShade/card.tsx +92 -0
- package/templates/default/ikonShade/checkbox.tsx +33 -0
- package/templates/default/ikonShade/collapsible.tsx +33 -0
- package/templates/default/ikonShade/command.tsx +184 -0
- package/templates/default/ikonShade/date-input.tsx +259 -0
- package/templates/default/ikonShade/date-range-picker.tsx +103 -0
- package/templates/default/ikonShade/dialog.tsx +143 -0
- package/templates/default/ikonShade/drawer.tsx +134 -0
- package/templates/default/ikonShade/dropdown-menu.tsx +259 -0
- package/templates/default/ikonShade/form.tsx +166 -0
- package/templates/default/ikonShade/hover-card.tsx +44 -0
- package/templates/default/ikonShade/input-otp.tsx +71 -0
- package/templates/default/ikonShade/input.tsx +22 -0
- package/templates/default/ikonShade/label.tsx +24 -0
- package/templates/default/ikonShade/navigation-menu.tsx +195 -0
- package/templates/default/ikonShade/popover.tsx +48 -0
- package/templates/default/ikonShade/progress.tsx +40 -0
- package/templates/default/ikonShade/radio-group.tsx +45 -0
- package/templates/default/ikonShade/scroll-area.tsx +58 -0
- package/templates/default/ikonShade/select.tsx +184 -0
- package/templates/default/ikonShade/separator.tsx +28 -0
- package/templates/default/ikonShade/sheet.tsx +139 -0
- package/templates/default/ikonShade/sidebar.tsx +726 -0
- package/templates/default/ikonShade/skeleton.tsx +15 -0
- package/templates/default/ikonShade/slider.tsx +64 -0
- package/templates/default/ikonShade/sonner.tsx +25 -0
- package/templates/default/ikonShade/switch.tsx +31 -0
- package/templates/default/ikonShade/table.tsx +116 -0
- package/templates/default/ikonShade/tabs.tsx +67 -0
- package/templates/default/ikonShade/textarea.tsx +18 -0
- package/templates/default/ikonShade/toggle-group.tsx +83 -0
- package/templates/default/ikonShade/toggle.tsx +47 -0
- package/templates/default/ikonShade/tooltip.tsx +65 -0
- package/templates/default/ikonShade/workflow.tsx +119 -0
- package/templates/default/ikoncomponents/action-menu/index.tsx +108 -0
- package/templates/default/ikoncomponents/action-menu/type.ts +18 -0
- package/templates/default/ikoncomponents/activity-sheet/index.tsx +63 -0
- package/templates/default/ikoncomponents/alert-dialog/dialog-context.tsx +65 -0
- package/templates/default/ikoncomponents/alert-dialog/index.tsx +80 -0
- package/templates/default/ikoncomponents/app-breadcrumb/BreadcrumbProvider.tsx +68 -0
- package/templates/default/ikoncomponents/app-breadcrumb/index.tsx +222 -0
- package/templates/default/ikoncomponents/big-calendar/big-calender-event/index.tsx +38 -0
- package/templates/default/ikoncomponents/big-calendar/big-calender-toolbar/index.tsx +81 -0
- package/templates/default/ikoncomponents/big-calendar/index.css +879 -0
- package/templates/default/ikoncomponents/big-calendar/index.tsx +59 -0
- package/templates/default/ikoncomponents/big-calendar/type.ts +37 -0
- package/templates/default/ikoncomponents/buttons/index.tsx +127 -0
- package/templates/default/ikoncomponents/combobox-input/index.tsx +75 -0
- package/templates/default/ikoncomponents/combobox-input/type.ts +14 -0
- package/templates/default/ikoncomponents/custom-combo-dropdown/index.tsx +242 -0
- package/templates/default/ikoncomponents/data-table/datatable-column-filter/index.tsx +80 -0
- package/templates/default/ikoncomponents/data-table/datatable-faceted-filter/index.tsx +149 -0
- package/templates/default/ikoncomponents/data-table/datatable-filter-menu/index.tsx +98 -0
- package/templates/default/ikoncomponents/data-table/datatable-pagination/index.tsx +119 -0
- package/templates/default/ikoncomponents/data-table/datatable-toolbar/index.tsx +45 -0
- package/templates/default/ikoncomponents/data-table/function.ts +7 -0
- package/templates/default/ikoncomponents/data-table/index.tsx +549 -0
- package/templates/default/ikoncomponents/data-table/type.ts +75 -0
- package/templates/default/ikoncomponents/e-chart/index.tsx +183 -0
- package/templates/default/ikoncomponents/file-input/index.tsx +27 -0
- package/templates/default/ikoncomponents/fileUpload/index.tsx +121 -0
- package/templates/default/ikoncomponents/form-fields/combobox-input/index.tsx +111 -0
- package/templates/default/ikoncomponents/form-fields/combobox-input-value/index.tsx +121 -0
- package/templates/default/ikoncomponents/form-fields/date-input/index.tsx +80 -0
- package/templates/default/ikoncomponents/form-fields/file-input/index.tsx +9 -0
- package/templates/default/ikoncomponents/form-fields/input/index.tsx +27 -0
- package/{dist/ikoncomponents/form-fields/multi-combobox-input/index.js → templates/default/ikoncomponents/form-fields/multi-combobox-input/index.tsx} +574 -381
- package/templates/default/ikoncomponents/form-fields/otp-input/index.tsx +39 -0
- package/templates/default/ikoncomponents/form-fields/password-input/index.tsx +52 -0
- package/templates/default/ikoncomponents/form-fields/phone-input/index.tsx +7 -0
- package/templates/default/ikoncomponents/form-fields/textarea/index.tsx +28 -0
- package/templates/default/ikoncomponents/form-fields/types/index.ts +46 -0
- package/templates/default/ikoncomponents/glowing-effect/index.tsx +171 -0
- package/templates/default/ikoncomponents/icon/index.tsx +22 -0
- package/templates/default/ikoncomponents/image-cropper-upload/components/cropperImg.css +19 -0
- package/{dist/ikoncomponents/image-cropper-upload/components/newCropper.js → templates/default/ikoncomponents/image-cropper-upload/components/newCropper.tsx} +117 -85
- package/templates/default/ikoncomponents/image-cropper-upload/components/newImageUploadForm.tsx +352 -0
- package/templates/default/ikoncomponents/image-cropper-upload/cropper-form/index.tsx +250 -0
- package/templates/default/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.tsx +32 -0
- package/{dist/ikoncomponents/image-cropper-upload/image-cropper/index.js → templates/default/ikoncomponents/image-cropper-upload/image-cropper/index.tsx} +119 -87
- package/templates/default/ikoncomponents/image-cropper-upload/index.tsx +95 -0
- package/templates/default/ikoncomponents/image-cropper-upload/utils/index.ts +117 -0
- package/templates/default/ikoncomponents/loading-spinner/index.tsx +43 -0
- package/templates/default/ikoncomponents/main-layout/RefreshContext.tsx +30 -0
- package/templates/default/ikoncomponents/main-layout/SidebarNavContext.tsx +103 -0
- package/templates/default/ikoncomponents/main-layout/app-sidebar.tsx +36 -0
- package/templates/default/ikoncomponents/main-layout/footer.tsx +21 -0
- package/templates/default/ikoncomponents/main-layout/header.tsx +53 -0
- package/templates/default/ikoncomponents/main-layout/index.tsx +43 -0
- package/templates/default/ikoncomponents/main-layout/main-sidebar.tsx +389 -0
- package/templates/default/ikoncomponents/main-layout/nav-main.tsx +103 -0
- package/templates/default/ikoncomponents/multi-combobox/index.tsx +345 -0
- package/templates/default/ikoncomponents/no-data/index.tsx +11 -0
- package/templates/default/ikoncomponents/page-wrapper/index.tsx +30 -0
- package/templates/default/ikoncomponents/password-strength-meter/index.tsx +49 -0
- package/templates/default/ikoncomponents/phone-input/index.tsx +72 -0
- package/templates/default/ikoncomponents/provider-wrapper/index.tsx +32 -0
- package/templates/default/ikoncomponents/search-input/index.tsx +18 -0
- package/templates/default/ikoncomponents/sheet/index.tsx +34 -0
- package/templates/default/ikoncomponents/simple-widget/index.tsx +54 -0
- package/templates/default/ikoncomponents/skeleton-loader/skeleton-table.tsx +34 -0
- package/templates/default/ikoncomponents/skeleton-loader/skeleton-widget.tsx +13 -0
- package/templates/default/ikoncomponents/tabs/index.tsx +139 -0
- package/{dist/ikoncomponents/tabs/type.d.ts → templates/default/ikoncomponents/tabs/type.ts} +20 -20
- package/{dist/ikoncomponents/theme-toggle-btn/index.js → templates/default/ikoncomponents/theme-toggle-btn/index.tsx} +189 -118
- package/templates/default/ikoncomponents/title-progress/index.tsx +41 -0
- package/templates/default/ikoncomponents/tooltip/index.tsx +17 -0
- package/templates/default/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.tsx +33 -0
- package/templates/default/ikoncomponents/twolevel-dropdown/index.tsx +279 -0
- package/templates/default/ikoncomponents/upload-tab/index.tsx +237 -0
- package/templates/default/ikoncomponents/widgets/index.tsx +81 -0
- package/templates/default/ikoncomponents/widgets/type.ts +11 -0
- package/templates/default/ikoncomponents/work-in-progress/index.tsx +16 -0
- package/{dist/index.d.ts → templates/default/index.ts} +234 -139
- package/templates/default/styles.css +1159 -0
- package/templates/default/utils/actions/account/index.ts +33 -0
- package/templates/default/utils/actions/account/type.ts +4 -0
- package/{dist/utils/actions/auth/index.js → templates/default/utils/actions/auth/index.ts} +69 -58
- package/templates/default/utils/actions/common/revalidate.ts +18 -0
- package/templates/default/utils/actions/common/type.ts +4 -0
- package/{dist/utils/actions/common/utils.js → templates/default/utils/actions/common/utils.ts} +28 -25
- package/templates/default/utils/actions/software/index.ts +106 -0
- package/templates/default/utils/api/accountService/index.ts +103 -0
- package/templates/default/utils/api/accountService/type.ts +4 -0
- package/templates/default/utils/api/file-upload/index.ts +103 -0
- package/templates/default/utils/api/file-upload/type.ts +8 -0
- package/{dist/utils/api/ikonBaseApi.js → templates/default/utils/api/ikonBaseApi.ts} +132 -104
- package/templates/default/utils/api/loginService/index.ts +108 -0
- package/{dist/utils/api/loginService/type.d.ts → templates/default/utils/api/loginService/type.ts} +35 -32
- package/templates/default/utils/api/softwareService/index.ts +356 -0
- package/templates/default/utils/api/softwareService/type.ts +62 -0
- package/{dist/utils/border-radius-provider.js → templates/default/utils/border-radius-provider.tsx} +59 -35
- package/templates/default/utils/cn.ts +6 -0
- package/{dist/utils/font-provider.js → templates/default/utils/font-provider.tsx} +61 -37
- package/templates/default/utils/session/cookieSession.ts +49 -0
- package/templates/default/utils/theme-provider/index.tsx +11 -0
- package/templates/default/utils/token-management/index.ts +115 -0
- package/templates/default/utils/token-management/types.ts +6 -0
- package/dist/hooks/use-mobile.d.ts +0 -2
- package/dist/hooks/use-mobile.d.ts.map +0 -1
- package/dist/hooks/use-mobile.js +0 -15
- package/dist/ikoncomponents/action-menu/index.d.ts +0 -6
- package/dist/ikoncomponents/action-menu/index.d.ts.map +0 -1
- package/dist/ikoncomponents/action-menu/index.js +0 -42
- package/dist/ikoncomponents/action-menu/type.d.ts +0 -15
- package/dist/ikoncomponents/action-menu/type.d.ts.map +0 -1
- package/dist/ikoncomponents/action-menu/type.js +0 -1
- package/dist/ikoncomponents/activity-sheet/index.d.ts +0 -12
- package/dist/ikoncomponents/activity-sheet/index.d.ts.map +0 -1
- package/dist/ikoncomponents/activity-sheet/index.js +0 -23
- package/dist/ikoncomponents/alert-dialog/dialog-context.d.ts +0 -22
- package/dist/ikoncomponents/alert-dialog/dialog-context.d.ts.map +0 -1
- package/dist/ikoncomponents/alert-dialog/dialog-context.js +0 -30
- package/dist/ikoncomponents/alert-dialog/index.d.ts +0 -15
- package/dist/ikoncomponents/alert-dialog/index.d.ts.map +0 -1
- package/dist/ikoncomponents/alert-dialog/index.js +0 -20
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.d.ts +0 -19
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.d.ts.map +0 -1
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.js +0 -43
- package/dist/ikoncomponents/app-breadcrumb/index.d.ts +0 -6
- package/dist/ikoncomponents/app-breadcrumb/index.d.ts.map +0 -1
- package/dist/ikoncomponents/app-breadcrumb/index.js +0 -57
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.d.ts +0 -6
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.d.ts.map +0 -1
- package/dist/ikoncomponents/big-calendar/big-calender-event/index.js +0 -16
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.d.ts +0 -3
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.d.ts.map +0 -1
- package/dist/ikoncomponents/big-calendar/big-calender-toolbar/index.js +0 -39
- package/dist/ikoncomponents/big-calendar/index.d.ts +0 -4
- package/dist/ikoncomponents/big-calendar/index.d.ts.map +0 -1
- package/dist/ikoncomponents/big-calendar/index.js +0 -35
- package/dist/ikoncomponents/big-calendar/type.d.ts +0 -32
- package/dist/ikoncomponents/big-calendar/type.d.ts.map +0 -1
- package/dist/ikoncomponents/big-calendar/type.js +0 -1
- package/dist/ikoncomponents/buttons/index.d.ts +0 -19
- package/dist/ikoncomponents/buttons/index.d.ts.map +0 -1
- package/dist/ikoncomponents/buttons/index.js +0 -38
- package/dist/ikoncomponents/combobox-input/index.d.ts +0 -3
- package/dist/ikoncomponents/combobox-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/combobox-input/index.js +0 -18
- package/dist/ikoncomponents/combobox-input/type.d.ts +0 -14
- package/dist/ikoncomponents/combobox-input/type.d.ts.map +0 -1
- package/dist/ikoncomponents/combobox-input/type.js +0 -1
- package/dist/ikoncomponents/custom-combo-dropdown/index.d.ts +0 -22
- package/dist/ikoncomponents/custom-combo-dropdown/index.d.ts.map +0 -1
- package/dist/ikoncomponents/custom-combo-dropdown/index.js +0 -85
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.d.ts +0 -3
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/datatable-column-filter/index.js +0 -22
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.d.ts +0 -3
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.js +0 -35
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.d.ts +0 -3
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/datatable-filter-menu/index.js +0 -38
- package/dist/ikoncomponents/data-table/datatable-pagination/index.d.ts +0 -3
- package/dist/ikoncomponents/data-table/datatable-pagination/index.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/datatable-pagination/index.js +0 -13
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.d.ts +0 -3
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/datatable-toolbar/index.js +0 -18
- package/dist/ikoncomponents/data-table/function.d.ts +0 -2
- package/dist/ikoncomponents/data-table/function.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/function.js +0 -6
- package/dist/ikoncomponents/data-table/index.d.ts +0 -3
- package/dist/ikoncomponents/data-table/index.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/index.js +0 -223
- package/dist/ikoncomponents/data-table/type.d.ts +0 -61
- package/dist/ikoncomponents/data-table/type.d.ts.map +0 -1
- package/dist/ikoncomponents/data-table/type.js +0 -1
- package/dist/ikoncomponents/e-chart/index.d.ts +0 -16
- package/dist/ikoncomponents/e-chart/index.d.ts.map +0 -1
- package/dist/ikoncomponents/e-chart/index.js +0 -115
- package/dist/ikoncomponents/file-input/index.d.ts +0 -2
- package/dist/ikoncomponents/file-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/file-input/index.js +0 -21
- package/dist/ikoncomponents/fileUpload/index.d.ts +0 -16
- package/dist/ikoncomponents/fileUpload/index.d.ts.map +0 -1
- package/dist/ikoncomponents/fileUpload/index.js +0 -69
- package/dist/ikoncomponents/form-fields/combobox-input/index.d.ts +0 -3
- package/dist/ikoncomponents/form-fields/combobox-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/combobox-input/index.js +0 -21
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.d.ts +0 -19
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.js +0 -26
- package/dist/ikoncomponents/form-fields/date-input/index.d.ts +0 -3
- package/dist/ikoncomponents/form-fields/date-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/date-input/index.js +0 -15
- package/dist/ikoncomponents/form-fields/file-input/index.d.ts +0 -2
- package/dist/ikoncomponents/form-fields/file-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/file-input/index.js +0 -4
- package/dist/ikoncomponents/form-fields/input/index.d.ts +0 -3
- package/dist/ikoncomponents/form-fields/input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/input/index.js +0 -18
- package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts +0 -7
- package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/otp-input/index.d.ts +0 -3
- package/dist/ikoncomponents/form-fields/otp-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/otp-input/index.js +0 -18
- package/dist/ikoncomponents/form-fields/password-input/index.d.ts +0 -3
- package/dist/ikoncomponents/form-fields/password-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/password-input/index.js +0 -23
- package/dist/ikoncomponents/form-fields/phone-input/index.d.ts +0 -2
- package/dist/ikoncomponents/form-fields/phone-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/phone-input/index.js +0 -4
- package/dist/ikoncomponents/form-fields/textarea/index.d.ts +0 -3
- package/dist/ikoncomponents/form-fields/textarea/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/textarea/index.js +0 -18
- package/dist/ikoncomponents/form-fields/types/index.d.ts +0 -37
- package/dist/ikoncomponents/form-fields/types/index.d.ts.map +0 -1
- package/dist/ikoncomponents/form-fields/types/index.js +0 -1
- package/dist/ikoncomponents/glowing-effect/index.d.ts +0 -15
- package/dist/ikoncomponents/glowing-effect/index.d.ts.map +0 -1
- package/dist/ikoncomponents/glowing-effect/index.js +0 -84
- package/dist/ikoncomponents/icon/index.d.ts +0 -9
- package/dist/ikoncomponents/icon/index.d.ts.map +0 -1
- package/dist/ikoncomponents/icon/index.js +0 -23
- package/dist/ikoncomponents/image-cropper-upload/components/newCropper.d.ts +0 -16
- package/dist/ikoncomponents/image-cropper-upload/components/newCropper.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.d.ts +0 -8
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/components/newImageUploadForm.js +0 -145
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.d.ts +0 -7
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/cropper-form/index.js +0 -92
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.d.ts +0 -7
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/cropper-form-with-modal/index.js +0 -14
- package/dist/ikoncomponents/image-cropper-upload/image-cropper/index.d.ts +0 -15
- package/dist/ikoncomponents/image-cropper-upload/image-cropper/index.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/index.d.ts +0 -28
- package/dist/ikoncomponents/image-cropper-upload/index.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/index.js +0 -49
- package/dist/ikoncomponents/image-cropper-upload/utils/index.d.ts +0 -17
- package/dist/ikoncomponents/image-cropper-upload/utils/index.d.ts.map +0 -1
- package/dist/ikoncomponents/image-cropper-upload/utils/index.js +0 -73
- package/dist/ikoncomponents/loading-spinner/index.d.ts +0 -10
- package/dist/ikoncomponents/loading-spinner/index.d.ts.map +0 -1
- package/dist/ikoncomponents/loading-spinner/index.js +0 -19
- package/dist/ikoncomponents/main-layout/RefreshContext.d.ts +0 -11
- package/dist/ikoncomponents/main-layout/RefreshContext.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/RefreshContext.js +0 -17
- package/dist/ikoncomponents/main-layout/SidebarNavContext.d.ts +0 -34
- package/dist/ikoncomponents/main-layout/SidebarNavContext.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/SidebarNavContext.js +0 -52
- package/dist/ikoncomponents/main-layout/app-sidebar.d.ts +0 -4
- package/dist/ikoncomponents/main-layout/app-sidebar.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/app-sidebar.js +0 -24
- package/dist/ikoncomponents/main-layout/footer.d.ts +0 -2
- package/dist/ikoncomponents/main-layout/footer.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/footer.js +0 -5
- package/dist/ikoncomponents/main-layout/header.d.ts +0 -4
- package/dist/ikoncomponents/main-layout/header.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/header.js +0 -15
- package/dist/ikoncomponents/main-layout/index.d.ts +0 -7
- package/dist/ikoncomponents/main-layout/index.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/index.js +0 -12
- package/dist/ikoncomponents/main-layout/main-sidebar.d.ts +0 -61
- package/dist/ikoncomponents/main-layout/main-sidebar.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/main-sidebar.js +0 -119
- package/dist/ikoncomponents/main-layout/nav-main.d.ts +0 -12
- package/dist/ikoncomponents/main-layout/nav-main.d.ts.map +0 -1
- package/dist/ikoncomponents/main-layout/nav-main.js +0 -33
- package/dist/ikoncomponents/multi-combobox/index.d.ts +0 -14
- package/dist/ikoncomponents/multi-combobox/index.d.ts.map +0 -1
- package/dist/ikoncomponents/multi-combobox/index.js +0 -202
- package/dist/ikoncomponents/no-data/index.d.ts +0 -4
- package/dist/ikoncomponents/no-data/index.d.ts.map +0 -1
- package/dist/ikoncomponents/no-data/index.js +0 -5
- package/dist/ikoncomponents/page-wrapper/index.d.ts +0 -10
- package/dist/ikoncomponents/page-wrapper/index.d.ts.map +0 -1
- package/dist/ikoncomponents/page-wrapper/index.js +0 -7
- package/dist/ikoncomponents/password-strength-meter/index.d.ts +0 -4
- package/dist/ikoncomponents/password-strength-meter/index.d.ts.map +0 -1
- package/dist/ikoncomponents/password-strength-meter/index.js +0 -40
- package/dist/ikoncomponents/phone-input/index.d.ts +0 -2
- package/dist/ikoncomponents/phone-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/phone-input/index.js +0 -41
- package/dist/ikoncomponents/provider-wrapper/index.d.ts +0 -7
- package/dist/ikoncomponents/provider-wrapper/index.d.ts.map +0 -1
- package/dist/ikoncomponents/provider-wrapper/index.js +0 -10
- package/dist/ikoncomponents/search-input/index.d.ts +0 -2
- package/dist/ikoncomponents/search-input/index.d.ts.map +0 -1
- package/dist/ikoncomponents/search-input/index.js +0 -19
- package/dist/ikoncomponents/sheet/index.d.ts +0 -11
- package/dist/ikoncomponents/sheet/index.d.ts.map +0 -1
- package/dist/ikoncomponents/sheet/index.js +0 -6
- package/dist/ikoncomponents/simple-widget/index.d.ts +0 -15
- package/dist/ikoncomponents/simple-widget/index.d.ts.map +0 -1
- package/dist/ikoncomponents/simple-widget/index.js +0 -14
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.d.ts +0 -6
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.d.ts.map +0 -1
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.js +0 -6
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.d.ts +0 -4
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.d.ts.map +0 -1
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.js +0 -5
- package/dist/ikoncomponents/tabs/index.d.ts +0 -3
- package/dist/ikoncomponents/tabs/index.d.ts.map +0 -1
- package/dist/ikoncomponents/tabs/index.js +0 -50
- package/dist/ikoncomponents/tabs/type.d.ts.map +0 -1
- package/dist/ikoncomponents/tabs/type.js +0 -2
- package/dist/ikoncomponents/theme-toggle-btn/index.d.ts +0 -2
- package/dist/ikoncomponents/theme-toggle-btn/index.d.ts.map +0 -1
- package/dist/ikoncomponents/title-progress/index.d.ts +0 -13
- package/dist/ikoncomponents/title-progress/index.d.ts.map +0 -1
- package/dist/ikoncomponents/title-progress/index.js +0 -10
- package/dist/ikoncomponents/tooltip/index.d.ts +0 -6
- package/dist/ikoncomponents/tooltip/index.d.ts.map +0 -1
- package/dist/ikoncomponents/tooltip/index.js +0 -5
- package/dist/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.d.ts +0 -10
- package/dist/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.d.ts.map +0 -1
- package/dist/ikoncomponents/twolevel-dropdown/convertToDropdownNodes.js +0 -24
- package/dist/ikoncomponents/twolevel-dropdown/index.d.ts +0 -32
- package/dist/ikoncomponents/twolevel-dropdown/index.d.ts.map +0 -1
- package/dist/ikoncomponents/twolevel-dropdown/index.js +0 -143
- package/dist/ikoncomponents/upload-tab/index.d.ts +0 -2
- package/dist/ikoncomponents/upload-tab/index.d.ts.map +0 -1
- package/dist/ikoncomponents/upload-tab/index.js +0 -92
- package/dist/ikoncomponents/widgets/index.d.ts +0 -3
- package/dist/ikoncomponents/widgets/index.d.ts.map +0 -1
- package/dist/ikoncomponents/widgets/index.js +0 -14
- package/dist/ikoncomponents/widgets/type.d.ts +0 -11
- package/dist/ikoncomponents/widgets/type.d.ts.map +0 -1
- package/dist/ikoncomponents/widgets/type.js +0 -2
- package/dist/ikoncomponents/work-in-progress/index.d.ts +0 -2
- package/dist/ikoncomponents/work-in-progress/index.d.ts.map +0 -1
- package/dist/ikoncomponents/work-in-progress/index.js +0 -4
- package/dist/index.d.ts.map +0 -1
- package/dist/shadcn/accordion.d.ts +0 -8
- package/dist/shadcn/accordion.d.ts.map +0 -1
- package/dist/shadcn/accordion.js +0 -33
- package/dist/shadcn/alert-dialog.d.ts +0 -21
- package/dist/shadcn/alert-dialog.d.ts.map +0 -1
- package/dist/shadcn/alert-dialog.js +0 -83
- package/dist/shadcn/alert.d.ts +0 -10
- package/dist/shadcn/alert.d.ts.map +0 -1
- package/dist/shadcn/alert.js +0 -38
- package/dist/shadcn/aspect-ratio.d.ts +0 -4
- package/dist/shadcn/aspect-ratio.d.ts.map +0 -1
- package/dist/shadcn/aspect-ratio.js +0 -19
- package/dist/shadcn/avatar.d.ts +0 -7
- package/dist/shadcn/avatar.d.ts.map +0 -1
- package/dist/shadcn/avatar.js +0 -28
- package/dist/shadcn/badge.d.ts +0 -10
- package/dist/shadcn/badge.d.ts.map +0 -1
- package/dist/shadcn/badge.js +0 -35
- package/dist/shadcn/breadcrumb.d.ts +0 -12
- package/dist/shadcn/breadcrumb.d.ts.map +0 -1
- package/dist/shadcn/breadcrumb.js +0 -45
- package/dist/shadcn/button.d.ts +0 -11
- package/dist/shadcn/button.d.ts.map +0 -1
- package/dist/shadcn/button.js +0 -47
- package/dist/shadcn/calendar.d.ts +0 -9
- package/dist/shadcn/calendar.d.ts.map +0 -1
- package/dist/shadcn/calendar.js +0 -61
- package/dist/shadcn/card.d.ts +0 -10
- package/dist/shadcn/card.d.ts.map +0 -1
- package/dist/shadcn/card.js +0 -42
- package/dist/shadcn/checkbox.d.ts +0 -5
- package/dist/shadcn/checkbox.d.ts.map +0 -1
- package/dist/shadcn/checkbox.js +0 -21
- package/dist/shadcn/collapsible.d.ts +0 -6
- package/dist/shadcn/collapsible.d.ts.map +0 -1
- package/dist/shadcn/collapsible.js +0 -27
- package/dist/shadcn/command.d.ts +0 -19
- package/dist/shadcn/command.d.ts.map +0 -1
- package/dist/shadcn/command.js +0 -54
- package/dist/shadcn/date-input.d.ts +0 -8
- package/dist/shadcn/date-input.d.ts.map +0 -1
- package/dist/shadcn/date-input.js +0 -179
- package/dist/shadcn/date-range-picker.d.ts +0 -25
- package/dist/shadcn/date-range-picker.d.ts.map +0 -1
- package/dist/shadcn/date-range-picker.js +0 -45
- package/dist/shadcn/dialog.d.ts +0 -16
- package/dist/shadcn/dialog.d.ts.map +0 -1
- package/dist/shadcn/dialog.js +0 -57
- package/dist/shadcn/drawer.d.ts +0 -14
- package/dist/shadcn/drawer.d.ts.map +0 -1
- package/dist/shadcn/drawer.js +0 -56
- package/dist/shadcn/dropdown-menu.d.ts +0 -26
- package/dist/shadcn/dropdown-menu.d.ts.map +0 -1
- package/dist/shadcn/dropdown-menu.js +0 -77
- package/dist/shadcn/form.d.ts +0 -25
- package/dist/shadcn/form.d.ts.map +0 -1
- package/dist/shadcn/form.js +0 -70
- package/dist/shadcn/hover-card.d.ts +0 -7
- package/dist/shadcn/hover-card.d.ts.map +0 -1
- package/dist/shadcn/hover-card.js +0 -28
- package/dist/shadcn/input-otp.d.ts +0 -35
- package/dist/shadcn/input-otp.d.ts.map +0 -1
- package/dist/shadcn/input-otp.js +0 -40
- package/dist/shadcn/input.d.ts +0 -4
- package/dist/shadcn/input.d.ts.map +0 -1
- package/dist/shadcn/input.js +0 -18
- package/dist/shadcn/label.d.ts +0 -5
- package/dist/shadcn/label.d.ts.map +0 -1
- package/dist/shadcn/label.js +0 -20
- package/dist/shadcn/navigation-menu.d.ts +0 -17
- package/dist/shadcn/navigation-menu.d.ts.map +0 -1
- package/dist/shadcn/navigation-menu.js +0 -74
- package/dist/shadcn/popover.d.ts +0 -8
- package/dist/shadcn/popover.d.ts.map +0 -1
- package/dist/shadcn/popover.js +0 -32
- package/dist/shadcn/progress.d.ts +0 -9
- package/dist/shadcn/progress.d.ts.map +0 -1
- package/dist/shadcn/progress.js +0 -23
- package/dist/shadcn/radio-group.d.ts +0 -6
- package/dist/shadcn/radio-group.d.ts.map +0 -1
- package/dist/shadcn/radio-group.js +0 -25
- package/dist/shadcn/scroll-area.d.ts +0 -6
- package/dist/shadcn/scroll-area.d.ts.map +0 -1
- package/dist/shadcn/scroll-area.js +0 -26
- package/dist/shadcn/select.d.ts +0 -16
- package/dist/shadcn/select.d.ts.map +0 -1
- package/dist/shadcn/select.js +0 -59
- package/dist/shadcn/separator.d.ts +0 -5
- package/dist/shadcn/separator.d.ts.map +0 -1
- package/dist/shadcn/separator.js +0 -20
- package/dist/shadcn/sheet.d.ts +0 -14
- package/dist/shadcn/sheet.d.ts.map +0 -1
- package/dist/shadcn/sheet.js +0 -61
- package/dist/shadcn/sidebar.d.ts +0 -70
- package/dist/shadcn/sidebar.d.ts.map +0 -1
- package/dist/shadcn/sidebar.js +0 -242
- package/dist/shadcn/skeleton.d.ts +0 -4
- package/dist/shadcn/skeleton.d.ts.map +0 -1
- package/dist/shadcn/skeleton.js +0 -18
- package/dist/shadcn/slider.d.ts +0 -5
- package/dist/shadcn/slider.d.ts.map +0 -1
- package/dist/shadcn/slider.js +0 -26
- package/dist/shadcn/sonner.d.ts +0 -4
- package/dist/shadcn/sonner.d.ts.map +0 -1
- package/dist/shadcn/sonner.js +0 -25
- package/dist/shadcn/switch.d.ts +0 -5
- package/dist/shadcn/switch.d.ts.map +0 -1
- package/dist/shadcn/switch.js +0 -20
- package/dist/shadcn/table.d.ts +0 -11
- package/dist/shadcn/table.d.ts.map +0 -1
- package/dist/shadcn/table.js +0 -47
- package/dist/shadcn/tabs.d.ts +0 -8
- package/dist/shadcn/tabs.d.ts.map +0 -1
- package/dist/shadcn/tabs.js +0 -32
- package/dist/shadcn/textarea.d.ts +0 -4
- package/dist/shadcn/textarea.d.ts.map +0 -1
- package/dist/shadcn/textarea.js +0 -18
- package/dist/shadcn/toggle-group.d.ts +0 -10
- package/dist/shadcn/toggle-group.d.ts.map +0 -1
- package/dist/shadcn/toggle-group.js +0 -35
- package/dist/shadcn/toggle.d.ts +0 -10
- package/dist/shadcn/toggle.d.ts.map +0 -1
- package/dist/shadcn/toggle.js +0 -38
- package/dist/shadcn/tooltip.d.ts +0 -8
- package/dist/shadcn/tooltip.d.ts.map +0 -1
- package/dist/shadcn/tooltip.js +0 -32
- package/dist/shadcn/workflow.d.ts +0 -21
- package/dist/shadcn/workflow.d.ts.map +0 -1
- package/dist/shadcn/workflow.js +0 -20
- package/dist/styles.css +0 -1302
- package/dist/utils/actions/account/index.d.ts +0 -6
- package/dist/utils/actions/account/index.d.ts.map +0 -1
- package/dist/utils/actions/account/index.js +0 -28
- package/dist/utils/actions/account/type.d.ts +0 -5
- package/dist/utils/actions/account/type.d.ts.map +0 -1
- package/dist/utils/actions/account/type.js +0 -1
- package/dist/utils/actions/auth/index.d.ts +0 -8
- package/dist/utils/actions/auth/index.d.ts.map +0 -1
- package/dist/utils/actions/common/revalidate.d.ts +0 -3
- package/dist/utils/actions/common/revalidate.d.ts.map +0 -1
- package/dist/utils/actions/common/revalidate.js +0 -14
- package/dist/utils/actions/common/type.d.ts +0 -5
- package/dist/utils/actions/common/type.d.ts.map +0 -1
- package/dist/utils/actions/common/type.js +0 -1
- package/dist/utils/actions/common/utils.d.ts +0 -6
- package/dist/utils/actions/common/utils.d.ts.map +0 -1
- package/dist/utils/actions/software/index.d.ts +0 -12
- package/dist/utils/actions/software/index.d.ts.map +0 -1
- package/dist/utils/actions/software/index.js +0 -75
- package/dist/utils/api/accountService/index.d.ts +0 -24
- package/dist/utils/api/accountService/index.d.ts.map +0 -1
- package/dist/utils/api/accountService/index.js +0 -64
- package/dist/utils/api/accountService/type.d.ts +0 -5
- package/dist/utils/api/accountService/type.d.ts.map +0 -1
- package/dist/utils/api/accountService/type.js +0 -1
- package/dist/utils/api/file-upload/index.d.ts +0 -6
- package/dist/utils/api/file-upload/index.d.ts.map +0 -1
- package/dist/utils/api/file-upload/index.js +0 -80
- package/dist/utils/api/file-upload/type.d.ts +0 -7
- package/dist/utils/api/file-upload/type.d.ts.map +0 -1
- package/dist/utils/api/file-upload/type.js +0 -1
- package/dist/utils/api/ikonBaseApi.d.ts +0 -13
- package/dist/utils/api/ikonBaseApi.d.ts.map +0 -1
- package/dist/utils/api/loginService/index.d.ts +0 -13
- package/dist/utils/api/loginService/index.d.ts.map +0 -1
- package/dist/utils/api/loginService/index.js +0 -72
- package/dist/utils/api/loginService/type.d.ts.map +0 -1
- package/dist/utils/api/loginService/type.js +0 -1
- package/dist/utils/api/softwareService/index.d.ts +0 -65
- package/dist/utils/api/softwareService/index.d.ts.map +0 -1
- package/dist/utils/api/softwareService/index.js +0 -212
- package/dist/utils/api/softwareService/type.d.ts +0 -55
- package/dist/utils/api/softwareService/type.d.ts.map +0 -1
- package/dist/utils/api/softwareService/type.js +0 -1
- package/dist/utils/border-radius-provider.d.ts +0 -12
- package/dist/utils/border-radius-provider.d.ts.map +0 -1
- package/dist/utils/cn.d.ts +0 -3
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/cn.js +0 -5
- package/dist/utils/font-provider.d.ts +0 -12
- package/dist/utils/font-provider.d.ts.map +0 -1
- package/dist/utils/session/cookieSession.d.ts +0 -9
- package/dist/utils/session/cookieSession.d.ts.map +0 -1
- package/dist/utils/session/cookieSession.js +0 -33
- package/dist/utils/theme-provider/index.d.ts +0 -4
- package/dist/utils/theme-provider/index.d.ts.map +0 -1
- package/dist/utils/theme-provider/index.js +0 -18
- package/dist/utils/token-management/index.d.ts +0 -11
- package/dist/utils/token-management/index.d.ts.map +0 -1
- package/dist/utils/token-management/index.js +0 -69
- package/dist/utils/token-management/types.d.ts +0 -7
- package/dist/utils/token-management/types.d.ts.map +0 -1
- package/dist/utils/token-management/types.js +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Skeleton } from "../../ikonShade/skeleton";
|
|
2
|
+
|
|
3
|
+
export function SkeletonWidget({ count }: { count: number }) {
|
|
4
|
+
return (
|
|
5
|
+
<div className='flex flex-row gap-3 w-full'>
|
|
6
|
+
{count > 0 && Array.from({ length: count }).map((_, index) => (
|
|
7
|
+
<Skeleton key={'widget_' + index} className={"w-1/" + count + " flex flex-col md:flex-row gap-2 h-20"}>
|
|
8
|
+
<div className="flex flex-1 flex-row justify-between border rounded-md p-2 bg-card-new"></div>
|
|
9
|
+
</Skeleton>
|
|
10
|
+
))}
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { TabArray, TabProps } from "./type";
|
|
3
|
+
import {
|
|
4
|
+
Tabs as TabsComp,
|
|
5
|
+
TabsContent,
|
|
6
|
+
TabsList,
|
|
7
|
+
TabsTrigger,
|
|
8
|
+
} from "../../ikonShade/tabs";
|
|
9
|
+
import {
|
|
10
|
+
DropdownMenu,
|
|
11
|
+
DropdownMenuContent,
|
|
12
|
+
DropdownMenuItem,
|
|
13
|
+
DropdownMenuTrigger,
|
|
14
|
+
} from "../../ikonShade/dropdown-menu";
|
|
15
|
+
import { Ellipsis, EllipsisVertical } from "lucide-react";
|
|
16
|
+
import { TextButton } from "../buttons";
|
|
17
|
+
import { Card } from "../../ikonShade/card";
|
|
18
|
+
import React, { useEffect, useState } from "react";
|
|
19
|
+
import { useIsMobile } from "../../hooks/use-mobile";
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export function CustomTabs({
|
|
23
|
+
children,
|
|
24
|
+
tabArray,
|
|
25
|
+
pathName,
|
|
26
|
+
tabListClass = "",
|
|
27
|
+
tabListInnerClass = "",
|
|
28
|
+
tabListButtonClass = "",
|
|
29
|
+
tabContentClass = "",
|
|
30
|
+
headerEndComponent,
|
|
31
|
+
onTabChange,
|
|
32
|
+
isSeperatePage = false,
|
|
33
|
+
}: TabProps) {
|
|
34
|
+
// const pathName = usePathname();
|
|
35
|
+
const [itemToDisplay, setItemToDisplay] = useState<number>(5);
|
|
36
|
+
const isMobile = useIsMobile();
|
|
37
|
+
const [visibleTabs, setVisibleTabs] = useState<TabArray[]>([]);
|
|
38
|
+
const [groupedTabs, setGroupedTabs] = useState<TabArray[]>([]);
|
|
39
|
+
const [activeTab, setActiveTab] = useState<string>(
|
|
40
|
+
tabArray.find((tab) => tab.default)?.tabId || tabArray[0]?.tabId || ""
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
setItemToDisplay(isMobile ? 2 : 5);
|
|
45
|
+
}, [isMobile]);
|
|
46
|
+
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (pathName && isSeperatePage) {
|
|
49
|
+
const lastPath = pathName.split("/").pop() || "";
|
|
50
|
+
setActiveTab(lastPath);
|
|
51
|
+
}
|
|
52
|
+
}, [pathName, isSeperatePage]);
|
|
53
|
+
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
setVisibleTabs(tabArray.slice(0, itemToDisplay));
|
|
56
|
+
setGroupedTabs(tabArray.slice(itemToDisplay));
|
|
57
|
+
}, [tabArray, itemToDisplay]);
|
|
58
|
+
|
|
59
|
+
const handleTabChange = (tabId: string) => {
|
|
60
|
+
setActiveTab(tabId);
|
|
61
|
+
onTabChange?.(tabId);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const handleGroupedTabSelect = (tab: TabArray) => {
|
|
65
|
+
setVisibleTabs((prev) => {
|
|
66
|
+
const updatedTabs = [...prev];
|
|
67
|
+
const replacedTab = updatedTabs.pop();
|
|
68
|
+
if (replacedTab) {
|
|
69
|
+
setGroupedTabs((prevGrouped) => [
|
|
70
|
+
...prevGrouped.filter((t) => t.tabId !== tab.tabId),
|
|
71
|
+
replacedTab,
|
|
72
|
+
]);
|
|
73
|
+
}
|
|
74
|
+
return [...updatedTabs, tab];
|
|
75
|
+
});
|
|
76
|
+
handleTabChange(tab.tabId);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<TabsComp
|
|
81
|
+
value={activeTab}
|
|
82
|
+
onValueChange={handleTabChange}
|
|
83
|
+
className="w-full h-full flex flex-col"
|
|
84
|
+
>
|
|
85
|
+
<TabsList className={`flex justify-between items-center ${tabListClass}`}>
|
|
86
|
+
<div className={`flex w-full ${tabListInnerClass}`}>
|
|
87
|
+
{visibleTabs.map((tab) => (
|
|
88
|
+
<TabsTrigger
|
|
89
|
+
key={tab.tabId}
|
|
90
|
+
value={tab.tabId}
|
|
91
|
+
className={tabListButtonClass}
|
|
92
|
+
>
|
|
93
|
+
{tab.tabName}
|
|
94
|
+
</TabsTrigger>
|
|
95
|
+
))}
|
|
96
|
+
{groupedTabs.length > 0 && (
|
|
97
|
+
<DropdownMenu>
|
|
98
|
+
<DropdownMenuTrigger asChild>
|
|
99
|
+
<TextButton variant="outline" size='smIcon' className="mt-1">
|
|
100
|
+
<EllipsisVertical />
|
|
101
|
+
</TextButton>
|
|
102
|
+
</DropdownMenuTrigger>
|
|
103
|
+
<DropdownMenuContent>
|
|
104
|
+
{groupedTabs.map((tab) => (
|
|
105
|
+
<DropdownMenuItem
|
|
106
|
+
key={tab.tabId}
|
|
107
|
+
onClick={() => handleGroupedTabSelect(tab)}
|
|
108
|
+
>
|
|
109
|
+
{tab.tabName}
|
|
110
|
+
</DropdownMenuItem>
|
|
111
|
+
))}
|
|
112
|
+
</DropdownMenuContent>
|
|
113
|
+
</DropdownMenu>
|
|
114
|
+
)}
|
|
115
|
+
</div>
|
|
116
|
+
{headerEndComponent && <div>{headerEndComponent}</div>}
|
|
117
|
+
</TabsList>
|
|
118
|
+
{children ? (
|
|
119
|
+
<TabsContent
|
|
120
|
+
value={activeTab}
|
|
121
|
+
className={`mt-3 flex-grow overflow-auto h-full w-full ${tabContentClass}`}
|
|
122
|
+
>
|
|
123
|
+
<Card className="h-full w-full p-3">{children}</Card>
|
|
124
|
+
</TabsContent>
|
|
125
|
+
) : (
|
|
126
|
+
tabArray.map((tab) => (
|
|
127
|
+
<TabsContent
|
|
128
|
+
value={tab.tabId}
|
|
129
|
+
key={tab.tabId}
|
|
130
|
+
className={`mt-3 flex-grow overflow-auto h-full w-full ${tabContentClass}`}
|
|
131
|
+
>
|
|
132
|
+
|
|
133
|
+
<Card className="h-full w-full p-3">{tab?.tabContent}</Card>
|
|
134
|
+
</TabsContent>
|
|
135
|
+
))
|
|
136
|
+
)}
|
|
137
|
+
</TabsComp>
|
|
138
|
+
);
|
|
139
|
+
}
|
package/{dist/ikoncomponents/tabs/type.d.ts → templates/default/ikoncomponents/tabs/type.ts}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export interface TabArray {
|
|
2
|
-
tabName: string;
|
|
3
|
-
tabId: string;
|
|
4
|
-
default: boolean;
|
|
5
|
-
tabContent?: React.ReactNode;
|
|
6
|
-
url?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
export interface TabArray {
|
|
2
|
+
tabName: string;
|
|
3
|
+
tabId: string;
|
|
4
|
+
default: boolean;
|
|
5
|
+
tabContent?: React.ReactNode;
|
|
6
|
+
url?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export interface TabProps {
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
tabArray: TabArray[];
|
|
12
|
+
tabListClass?: string;
|
|
13
|
+
tabListInnerClass?: string;
|
|
14
|
+
tabListButtonClass?: string;
|
|
15
|
+
tabContentClass?: string;
|
|
16
|
+
pathName?: string;
|
|
17
|
+
headerEndComponent?: React.ReactNode;
|
|
18
|
+
onTabChange?: (tabId: string) => void;
|
|
19
|
+
isSeperatePage?: boolean;
|
|
20
|
+
}
|
|
@@ -1,118 +1,189 @@
|
|
|
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
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useTheme } from "next-themes";
|
|
4
|
+
import { useEffect, useState, useCallback } from "react";
|
|
5
|
+
|
|
6
|
+
import { Laptop, Moon, Sun, Check, Waves } from "lucide-react";
|
|
7
|
+
import { Button } from "../../ikonShade/button";
|
|
8
|
+
import {
|
|
9
|
+
DropdownMenu,
|
|
10
|
+
DropdownMenuContent,
|
|
11
|
+
DropdownMenuItem,
|
|
12
|
+
DropdownMenuTrigger,
|
|
13
|
+
} from "../../ikonShade/dropdown-menu";
|
|
14
|
+
|
|
15
|
+
export function ThemeToggleBtn() {
|
|
16
|
+
const { setTheme, theme, resolvedTheme } = useTheme();
|
|
17
|
+
const [mounted, setMounted] = useState(false);
|
|
18
|
+
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
setMounted(true);
|
|
21
|
+
}, []);
|
|
22
|
+
|
|
23
|
+
const activeTheme = theme === "system" ? resolvedTheme : theme;
|
|
24
|
+
|
|
25
|
+
const getLuminance = (hexColor: string): number => {
|
|
26
|
+
const rgb = parseInt(hexColor.slice(1), 16);
|
|
27
|
+
const r = (rgb >> 16) & 0xff;
|
|
28
|
+
const g = (rgb >> 8) & 0xff;
|
|
29
|
+
const b = (rgb >> 0) & 0xff;
|
|
30
|
+
|
|
31
|
+
const [rs, gs, bs] = [r, g, b].map(c => {
|
|
32
|
+
c = c / 255;
|
|
33
|
+
return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const getContrastColor = (bgColor: string): string => {
|
|
40
|
+
const luminance = getLuminance(bgColor);
|
|
41
|
+
return luminance > 0.25 ? '#000000' : '#ffffff';
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const applySavedColors = useCallback(() => {
|
|
45
|
+
const primaryColor = localStorage.getItem("primary") || '#0f172b';
|
|
46
|
+
const secondaryColor = localStorage.getItem("secondary") || '#1b2336';
|
|
47
|
+
const tertiaryColor = localStorage.getItem("tertiary") || '#1f3aba';
|
|
48
|
+
|
|
49
|
+
const pChartColor = localStorage.getItem("primaryChart") || '#00bc7d';
|
|
50
|
+
const sChartColor = localStorage.getItem("secondaryChart") || '#fd9a00';
|
|
51
|
+
const tChartColor = localStorage.getItem("tertiaryChart") || '#ad46ff';
|
|
52
|
+
|
|
53
|
+
document.documentElement.style.setProperty('--background', primaryColor);
|
|
54
|
+
document.documentElement.style.setProperty('--secondary', secondaryColor);
|
|
55
|
+
document.documentElement.style.setProperty('--card', secondaryColor);
|
|
56
|
+
document.documentElement.style.setProperty('--popover', secondaryColor);
|
|
57
|
+
document.documentElement.style.setProperty('--muted', secondaryColor);
|
|
58
|
+
document.documentElement.style.setProperty('--sidebar', secondaryColor);
|
|
59
|
+
document.documentElement.style.setProperty('--btn-secondary', secondaryColor);
|
|
60
|
+
document.documentElement.style.setProperty('--accent', tertiaryColor);
|
|
61
|
+
document.documentElement.style.setProperty('--sidebar-primary', tertiaryColor);
|
|
62
|
+
document.documentElement.style.setProperty('--sidebar-accent', tertiaryColor);
|
|
63
|
+
|
|
64
|
+
document.documentElement.style.setProperty('--foreground', getContrastColor(primaryColor));
|
|
65
|
+
document.documentElement.style.setProperty('--secondary-foreground', getContrastColor(secondaryColor));
|
|
66
|
+
document.documentElement.style.setProperty('--card-foreground', getContrastColor(secondaryColor));
|
|
67
|
+
document.documentElement.style.setProperty('--popover-foreground', getContrastColor(secondaryColor));
|
|
68
|
+
document.documentElement.style.setProperty('--muted-foreground', getContrastColor(secondaryColor));
|
|
69
|
+
document.documentElement.style.setProperty('--sidebar-foreground', getContrastColor(secondaryColor));
|
|
70
|
+
document.documentElement.style.setProperty('--accent-foreground', getContrastColor(tertiaryColor));
|
|
71
|
+
document.documentElement.style.setProperty('--sidebar-primary-foreground', getContrastColor(tertiaryColor));
|
|
72
|
+
document.documentElement.style.setProperty('--sidebar-accent-foreground', getContrastColor(tertiaryColor));
|
|
73
|
+
|
|
74
|
+
document.documentElement.style.setProperty('--chart-1', pChartColor);
|
|
75
|
+
document.documentElement.style.setProperty('--chart-2', sChartColor);
|
|
76
|
+
document.documentElement.style.setProperty('--chart-3', tChartColor);
|
|
77
|
+
document.documentElement.style.setProperty('--chart-4', pChartColor);
|
|
78
|
+
document.documentElement.style.setProperty('--chart-5', sChartColor);
|
|
79
|
+
}, []);
|
|
80
|
+
|
|
81
|
+
const resetColors = useCallback(() => {
|
|
82
|
+
document.documentElement.style.removeProperty('--background');
|
|
83
|
+
document.documentElement.style.removeProperty('--secondary');
|
|
84
|
+
document.documentElement.style.removeProperty('--card');
|
|
85
|
+
document.documentElement.style.removeProperty('--popover');
|
|
86
|
+
document.documentElement.style.removeProperty('--muted');
|
|
87
|
+
document.documentElement.style.removeProperty('--sidebar');
|
|
88
|
+
document.documentElement.style.removeProperty('--btn-secondary');
|
|
89
|
+
document.documentElement.style.removeProperty('--accent');
|
|
90
|
+
document.documentElement.style.removeProperty('--sidebar-primary');
|
|
91
|
+
document.documentElement.style.removeProperty('--sidebar-accent');
|
|
92
|
+
|
|
93
|
+
document.documentElement.style.removeProperty('--foreground');
|
|
94
|
+
document.documentElement.style.removeProperty('--secondary-foreground');
|
|
95
|
+
document.documentElement.style.removeProperty('--card-foreground');
|
|
96
|
+
document.documentElement.style.removeProperty('--popover-foreground');
|
|
97
|
+
document.documentElement.style.removeProperty('--muted-foreground');
|
|
98
|
+
document.documentElement.style.removeProperty('--sidebar-foreground');
|
|
99
|
+
document.documentElement.style.removeProperty('--accent-foreground');
|
|
100
|
+
document.documentElement.style.removeProperty('--sidebar-primary-foreground');
|
|
101
|
+
document.documentElement.style.removeProperty('--sidebar-accent-foreground');
|
|
102
|
+
|
|
103
|
+
document.documentElement.style.removeProperty('--chart-1');
|
|
104
|
+
document.documentElement.style.removeProperty('--chart-2');
|
|
105
|
+
document.documentElement.style.removeProperty('--chart-3');
|
|
106
|
+
document.documentElement.style.removeProperty('--chart-4');
|
|
107
|
+
document.documentElement.style.removeProperty('--chart-5');
|
|
108
|
+
}, []);
|
|
109
|
+
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
if (mounted && activeTheme === "blue-dark") {
|
|
112
|
+
document.documentElement.classList.add("blue-dark");
|
|
113
|
+
applySavedColors();
|
|
114
|
+
}
|
|
115
|
+
}, [mounted, activeTheme, applySavedColors]);
|
|
116
|
+
|
|
117
|
+
const setThemeSafe = useCallback(
|
|
118
|
+
(value: string) => {
|
|
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
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Progress } from "../../ikonShade/progress";
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
title: string;
|
|
6
|
+
value: number;
|
|
7
|
+
valueText?: string;
|
|
8
|
+
isPercent?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
titleClassName?: string;
|
|
11
|
+
valueClassName?: string;
|
|
12
|
+
progressClassName?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function TitleProgress({ title, value, valueText, isPercent = true, className, titleClassName, valueClassName, progressClassName }: Props) {
|
|
16
|
+
let finalValue = value.toFixed(2);
|
|
17
|
+
const parts = finalValue.split('.');
|
|
18
|
+
|
|
19
|
+
if (parts[1] === '00') {
|
|
20
|
+
finalValue = parts[0];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div className={'w-full ' + (className ?? '')}>
|
|
25
|
+
<div className={'flex items-center justify-between gap-4'}>
|
|
26
|
+
<div className={'text-muted-foreground text-sm ' + (titleClassName ?? '')}>
|
|
27
|
+
{title}
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div className={'text-sm ' + (valueClassName ?? '')}>
|
|
31
|
+
{valueText ?? `${finalValue}${isPercent ? '%' : ''}`}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<Progress
|
|
36
|
+
value={value}
|
|
37
|
+
className={'w-full mt-2 ' + (progressClassName ?? '')}
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Tooltip as TooltipComp, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ikonShade/tooltip";
|
|
3
|
+
|
|
4
|
+
export function TooltipComponent({ tooltipContent, children }: { tooltipContent: string | React.ReactNode, children: React.ReactNode }) {
|
|
5
|
+
return (
|
|
6
|
+
<TooltipProvider>
|
|
7
|
+
<TooltipComp>
|
|
8
|
+
<TooltipTrigger asChild>
|
|
9
|
+
{children}
|
|
10
|
+
</TooltipTrigger>
|
|
11
|
+
<TooltipContent>
|
|
12
|
+
{tooltipContent}
|
|
13
|
+
</TooltipContent>
|
|
14
|
+
</TooltipComp>
|
|
15
|
+
</TooltipProvider>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// import { entries, parentEntries } from "./your-json";
|
|
2
|
+
type DropdownNode = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
index: string;
|
|
7
|
+
children?: DropdownNode[];
|
|
8
|
+
};
|
|
9
|
+
export function convertToDropdownNodes(entriesMap: Record<string, any>, parentEntries: any[]): DropdownNode[] {
|
|
10
|
+
const map: Record<string, DropdownNode> = {};
|
|
11
|
+
|
|
12
|
+
// Create base nodes
|
|
13
|
+
Object.values(entriesMap).forEach((entry) => {
|
|
14
|
+
map[entry.id] = {
|
|
15
|
+
id: entry.id,
|
|
16
|
+
index: entry.index,
|
|
17
|
+
title: entry.title,
|
|
18
|
+
description: entry.description,
|
|
19
|
+
children: [],
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// Build tree
|
|
24
|
+
parentEntries.forEach((entry) => {
|
|
25
|
+
const node = map[entry.id];
|
|
26
|
+
entry.childrenArray?.forEach((childId: string) => {
|
|
27
|
+
node.children?.push(map[childId]);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// Return top-level (no parentId)
|
|
32
|
+
return parentEntries.filter(e => !e.parentId).map(e => map[e.id]);
|
|
33
|
+
}
|