ikoncomponents 1.4.8 → 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,184 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Command as CommandPrimitive } from "cmdk"
|
|
5
|
+
import { SearchIcon } from "lucide-react"
|
|
6
|
+
|
|
7
|
+
import { cn } from "../utils/cn"
|
|
8
|
+
import {
|
|
9
|
+
Dialog,
|
|
10
|
+
DialogContent,
|
|
11
|
+
DialogDescription,
|
|
12
|
+
DialogHeader,
|
|
13
|
+
DialogTitle,
|
|
14
|
+
} from "./dialog"
|
|
15
|
+
|
|
16
|
+
function Command({
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}: React.ComponentProps<typeof CommandPrimitive>) {
|
|
20
|
+
return (
|
|
21
|
+
<CommandPrimitive
|
|
22
|
+
data-slot="command"
|
|
23
|
+
className={cn(
|
|
24
|
+
"bg-card text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
25
|
+
className
|
|
26
|
+
)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function CommandDialog({
|
|
33
|
+
title = "Command Palette",
|
|
34
|
+
description = "Search for a command to run...",
|
|
35
|
+
children,
|
|
36
|
+
className,
|
|
37
|
+
showCloseButton = true,
|
|
38
|
+
...props
|
|
39
|
+
}: React.ComponentProps<typeof Dialog> & {
|
|
40
|
+
title?: string
|
|
41
|
+
description?: string
|
|
42
|
+
className?: string
|
|
43
|
+
showCloseButton?: boolean
|
|
44
|
+
}) {
|
|
45
|
+
return (
|
|
46
|
+
<Dialog {...props}>
|
|
47
|
+
<DialogHeader className="sr-only">
|
|
48
|
+
<DialogTitle>{title}</DialogTitle>
|
|
49
|
+
<DialogDescription>{description}</DialogDescription>
|
|
50
|
+
</DialogHeader>
|
|
51
|
+
<DialogContent
|
|
52
|
+
className={cn("overflow-hidden p-0", className)}
|
|
53
|
+
showCloseButton={showCloseButton}
|
|
54
|
+
>
|
|
55
|
+
<Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
|
|
56
|
+
{children}
|
|
57
|
+
</Command>
|
|
58
|
+
</DialogContent>
|
|
59
|
+
</Dialog>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function CommandInput({
|
|
64
|
+
className,
|
|
65
|
+
...props
|
|
66
|
+
}: React.ComponentProps<typeof CommandPrimitive.Input>) {
|
|
67
|
+
return (
|
|
68
|
+
<div
|
|
69
|
+
data-slot="command-input-wrapper"
|
|
70
|
+
className="flex h-9 items-center gap-2 border-b px-3"
|
|
71
|
+
>
|
|
72
|
+
<SearchIcon className="size-4 shrink-0 opacity-50" />
|
|
73
|
+
<CommandPrimitive.Input
|
|
74
|
+
data-slot="command-input"
|
|
75
|
+
className={cn(
|
|
76
|
+
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
77
|
+
className
|
|
78
|
+
)}
|
|
79
|
+
{...props}
|
|
80
|
+
/>
|
|
81
|
+
</div>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function CommandList({
|
|
86
|
+
className,
|
|
87
|
+
...props
|
|
88
|
+
}: React.ComponentProps<typeof CommandPrimitive.List>) {
|
|
89
|
+
return (
|
|
90
|
+
<CommandPrimitive.List
|
|
91
|
+
data-slot="command-list"
|
|
92
|
+
className={cn(
|
|
93
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
94
|
+
className
|
|
95
|
+
)}
|
|
96
|
+
{...props}
|
|
97
|
+
/>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function CommandEmpty({
|
|
102
|
+
...props
|
|
103
|
+
}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
|
|
104
|
+
return (
|
|
105
|
+
<CommandPrimitive.Empty
|
|
106
|
+
data-slot="command-empty"
|
|
107
|
+
className="py-6 text-center text-sm"
|
|
108
|
+
{...props}
|
|
109
|
+
/>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function CommandGroup({
|
|
114
|
+
className,
|
|
115
|
+
...props
|
|
116
|
+
}: React.ComponentProps<typeof CommandPrimitive.Group>) {
|
|
117
|
+
return (
|
|
118
|
+
<CommandPrimitive.Group
|
|
119
|
+
data-slot="command-group"
|
|
120
|
+
className={cn(
|
|
121
|
+
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
|
|
122
|
+
className
|
|
123
|
+
)}
|
|
124
|
+
{...props}
|
|
125
|
+
/>
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function CommandSeparator({
|
|
130
|
+
className,
|
|
131
|
+
...props
|
|
132
|
+
}: React.ComponentProps<typeof CommandPrimitive.Separator>) {
|
|
133
|
+
return (
|
|
134
|
+
<CommandPrimitive.Separator
|
|
135
|
+
data-slot="command-separator"
|
|
136
|
+
className={cn("bg-border -mx-1 h-px", className)}
|
|
137
|
+
{...props}
|
|
138
|
+
/>
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function CommandItem({
|
|
143
|
+
className,
|
|
144
|
+
...props
|
|
145
|
+
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
|
|
146
|
+
return (
|
|
147
|
+
<CommandPrimitive.Item
|
|
148
|
+
data-slot="command-item"
|
|
149
|
+
className={cn(
|
|
150
|
+
"data-[selected=true]:bg-[var(--input)] data-[selected=true]:text-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
151
|
+
className
|
|
152
|
+
)}
|
|
153
|
+
{...props}
|
|
154
|
+
/>
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function CommandShortcut({
|
|
159
|
+
className,
|
|
160
|
+
...props
|
|
161
|
+
}: React.ComponentProps<"span">) {
|
|
162
|
+
return (
|
|
163
|
+
<span
|
|
164
|
+
data-slot="command-shortcut"
|
|
165
|
+
className={cn(
|
|
166
|
+
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
167
|
+
className
|
|
168
|
+
)}
|
|
169
|
+
{...props}
|
|
170
|
+
/>
|
|
171
|
+
)
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export {
|
|
175
|
+
Command,
|
|
176
|
+
CommandDialog,
|
|
177
|
+
CommandInput,
|
|
178
|
+
CommandList,
|
|
179
|
+
CommandEmpty,
|
|
180
|
+
CommandGroup,
|
|
181
|
+
CommandItem,
|
|
182
|
+
CommandShortcut,
|
|
183
|
+
CommandSeparator,
|
|
184
|
+
}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from 'react'
|
|
2
|
+
|
|
3
|
+
interface DateInputProps {
|
|
4
|
+
value?: Date
|
|
5
|
+
onChange: (date: Date) => void
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface DateParts {
|
|
9
|
+
day: number
|
|
10
|
+
month: number
|
|
11
|
+
year: number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const DateInput: React.FC<DateInputProps> = ({ value, onChange }) => {
|
|
15
|
+
const [date, setDate] = React.useState<DateParts>(() => {
|
|
16
|
+
const d = value ? new Date(value) : new Date()
|
|
17
|
+
return {
|
|
18
|
+
day: d.getDate(),
|
|
19
|
+
month: d.getMonth() + 1, // JavaScript months are 0-indexed
|
|
20
|
+
year: d.getFullYear()
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const monthRef = useRef<HTMLInputElement | null>(null)
|
|
25
|
+
const dayRef = useRef<HTMLInputElement | null>(null)
|
|
26
|
+
const yearRef = useRef<HTMLInputElement | null>(null)
|
|
27
|
+
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
const d = value ? new Date(value) : new Date()
|
|
30
|
+
setDate({
|
|
31
|
+
day: d.getDate(),
|
|
32
|
+
month: d.getMonth() + 1,
|
|
33
|
+
year: d.getFullYear()
|
|
34
|
+
})
|
|
35
|
+
}, [value])
|
|
36
|
+
|
|
37
|
+
const validateDate = (field: keyof DateParts, value: number): boolean => {
|
|
38
|
+
if (
|
|
39
|
+
(field === 'day' && (value < 1 || value > 31)) ||
|
|
40
|
+
(field === 'month' && (value < 1 || value > 12)) ||
|
|
41
|
+
(field === 'year' && (value < 1000 || value > 9999))
|
|
42
|
+
) {
|
|
43
|
+
return false
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Validate the day of the month
|
|
47
|
+
const newDate = { ...date, [field]: value }
|
|
48
|
+
const d = new Date(newDate.year, newDate.month - 1, newDate.day)
|
|
49
|
+
return d.getFullYear() === newDate.year &&
|
|
50
|
+
d.getMonth() + 1 === newDate.month &&
|
|
51
|
+
d.getDate() === newDate.day
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const handleInputChange =
|
|
55
|
+
(field: keyof DateParts) => (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
56
|
+
const newValue = e.target.value ? Number(e.target.value) : ''
|
|
57
|
+
const isValid = typeof newValue === 'number' && validateDate(field, newValue)
|
|
58
|
+
|
|
59
|
+
// If the new value is valid, update the date
|
|
60
|
+
const newDate = { ...date, [field]: newValue }
|
|
61
|
+
setDate(newDate)
|
|
62
|
+
|
|
63
|
+
// only call onChange when the entry is valid
|
|
64
|
+
if (isValid) {
|
|
65
|
+
onChange(new Date(newDate.year, newDate.month - 1, newDate.day))
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const initialDate = useRef<DateParts>(date)
|
|
70
|
+
|
|
71
|
+
const handleBlur = (field: keyof DateParts) => (
|
|
72
|
+
e: React.FocusEvent<HTMLInputElement>
|
|
73
|
+
): void => {
|
|
74
|
+
if (!e.target.value) {
|
|
75
|
+
setDate(initialDate.current)
|
|
76
|
+
return
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const newValue = Number(e.target.value)
|
|
80
|
+
const isValid = validateDate(field, newValue)
|
|
81
|
+
|
|
82
|
+
if (!isValid) {
|
|
83
|
+
setDate(initialDate.current)
|
|
84
|
+
} else {
|
|
85
|
+
// If the new value is valid, update the initial value
|
|
86
|
+
initialDate.current = { ...date, [field]: newValue }
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const handleKeyDown =
|
|
91
|
+
(field: keyof DateParts) => (e: React.KeyboardEvent<HTMLInputElement>) => {
|
|
92
|
+
// Allow command (or control) combinations
|
|
93
|
+
if (e.metaKey || e.ctrlKey) {
|
|
94
|
+
return
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Prevent non-numeric characters, excluding allowed keys
|
|
98
|
+
if (
|
|
99
|
+
!/^[0-9]$/.test(e.key) &&
|
|
100
|
+
![
|
|
101
|
+
'ArrowUp',
|
|
102
|
+
'ArrowDown',
|
|
103
|
+
'ArrowLeft',
|
|
104
|
+
'ArrowRight',
|
|
105
|
+
'Delete',
|
|
106
|
+
'Tab',
|
|
107
|
+
'Backspace',
|
|
108
|
+
'Enter'
|
|
109
|
+
].includes(e.key)
|
|
110
|
+
) {
|
|
111
|
+
e.preventDefault()
|
|
112
|
+
return
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (e.key === 'ArrowUp') {
|
|
116
|
+
e.preventDefault()
|
|
117
|
+
let newDate = { ...date }
|
|
118
|
+
|
|
119
|
+
if (field === 'day') {
|
|
120
|
+
if (date[field] === new Date(date.year, date.month, 0).getDate()) {
|
|
121
|
+
newDate = { ...newDate, day: 1, month: (date.month % 12) + 1 }
|
|
122
|
+
if (newDate.month === 1) newDate.year += 1
|
|
123
|
+
} else {
|
|
124
|
+
newDate.day += 1
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (field === 'month') {
|
|
129
|
+
if (date[field] === 12) {
|
|
130
|
+
newDate = { ...newDate, month: 1, year: date.year + 1 }
|
|
131
|
+
} else {
|
|
132
|
+
newDate.month += 1
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (field === 'year') {
|
|
137
|
+
newDate.year += 1
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
setDate(newDate)
|
|
141
|
+
onChange(new Date(newDate.year, newDate.month - 1, newDate.day))
|
|
142
|
+
} else if (e.key === 'ArrowDown') {
|
|
143
|
+
e.preventDefault()
|
|
144
|
+
let newDate = { ...date }
|
|
145
|
+
|
|
146
|
+
if (field === 'day') {
|
|
147
|
+
if (date[field] === 1) {
|
|
148
|
+
newDate.month -= 1
|
|
149
|
+
if (newDate.month === 0) {
|
|
150
|
+
newDate.month = 12
|
|
151
|
+
newDate.year -= 1
|
|
152
|
+
}
|
|
153
|
+
newDate.day = new Date(newDate.year, newDate.month, 0).getDate()
|
|
154
|
+
} else {
|
|
155
|
+
newDate.day -= 1
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (field === 'month') {
|
|
160
|
+
if (date[field] === 1) {
|
|
161
|
+
newDate = { ...newDate, month: 12, year: date.year - 1 }
|
|
162
|
+
} else {
|
|
163
|
+
newDate.month -= 1
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (field === 'year') {
|
|
168
|
+
newDate.year -= 1
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
setDate(newDate)
|
|
172
|
+
onChange(new Date(newDate.year, newDate.month - 1, newDate.day))
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (e.key === 'ArrowRight') {
|
|
176
|
+
if (
|
|
177
|
+
e.currentTarget.selectionStart === e.currentTarget.value.length ||
|
|
178
|
+
(e.currentTarget.selectionStart === 0 &&
|
|
179
|
+
e.currentTarget.selectionEnd === e.currentTarget.value.length)
|
|
180
|
+
) {
|
|
181
|
+
e.preventDefault()
|
|
182
|
+
if (field === 'month') dayRef.current?.focus()
|
|
183
|
+
if (field === 'day') yearRef.current?.focus()
|
|
184
|
+
}
|
|
185
|
+
} else if (e.key === 'ArrowLeft') {
|
|
186
|
+
if (
|
|
187
|
+
e.currentTarget.selectionStart === 0 ||
|
|
188
|
+
(e.currentTarget.selectionStart === 0 &&
|
|
189
|
+
e.currentTarget.selectionEnd === e.currentTarget.value.length)
|
|
190
|
+
) {
|
|
191
|
+
e.preventDefault()
|
|
192
|
+
if (field === 'day') monthRef.current?.focus()
|
|
193
|
+
if (field === 'year') dayRef.current?.focus()
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return (
|
|
199
|
+
<div className="flex border rounded-lg items-center text-sm px-1">
|
|
200
|
+
<input
|
|
201
|
+
type="text"
|
|
202
|
+
ref={monthRef}
|
|
203
|
+
max={12}
|
|
204
|
+
maxLength={2}
|
|
205
|
+
value={date.month.toString()}
|
|
206
|
+
onChange={handleInputChange('month')}
|
|
207
|
+
onKeyDown={handleKeyDown('month')}
|
|
208
|
+
onFocus={(e) => {
|
|
209
|
+
if (window.innerWidth > 1024) {
|
|
210
|
+
e.target.select()
|
|
211
|
+
}
|
|
212
|
+
}}
|
|
213
|
+
onBlur={handleBlur('month')}
|
|
214
|
+
className="p-0 outline-none w-6 border-none text-center"
|
|
215
|
+
placeholder="M"
|
|
216
|
+
/>
|
|
217
|
+
<span className="opacity-20 -mx-px">/</span>
|
|
218
|
+
<input
|
|
219
|
+
type="text"
|
|
220
|
+
ref={dayRef}
|
|
221
|
+
max={31}
|
|
222
|
+
maxLength={2}
|
|
223
|
+
value={date.day.toString()}
|
|
224
|
+
onChange={handleInputChange('day')}
|
|
225
|
+
onKeyDown={handleKeyDown('day')}
|
|
226
|
+
onFocus={(e) => {
|
|
227
|
+
if (window.innerWidth > 1024) {
|
|
228
|
+
e.target.select()
|
|
229
|
+
}
|
|
230
|
+
}}
|
|
231
|
+
onBlur={handleBlur('day')}
|
|
232
|
+
className="p-0 outline-none w-7 border-none text-center"
|
|
233
|
+
placeholder="D"
|
|
234
|
+
/>
|
|
235
|
+
<span className="opacity-20 -mx-px">/</span>
|
|
236
|
+
<input
|
|
237
|
+
type="text"
|
|
238
|
+
ref={yearRef}
|
|
239
|
+
max={9999}
|
|
240
|
+
maxLength={4}
|
|
241
|
+
value={date.year.toString()}
|
|
242
|
+
onChange={handleInputChange('year')}
|
|
243
|
+
onKeyDown={handleKeyDown('year')}
|
|
244
|
+
onFocus={(e) => {
|
|
245
|
+
if (window.innerWidth > 1024) {
|
|
246
|
+
e.target.select()
|
|
247
|
+
}
|
|
248
|
+
}}
|
|
249
|
+
onBlur={handleBlur('year')}
|
|
250
|
+
className="p-0 outline-none w-12 border-none text-center"
|
|
251
|
+
placeholder="YYYY"
|
|
252
|
+
/>
|
|
253
|
+
</div>
|
|
254
|
+
)
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
DateInput.displayName = 'DateInput'
|
|
258
|
+
|
|
259
|
+
export { DateInput }
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
'use client'
|
|
3
|
+
|
|
4
|
+
import React, { type FC, useState, useEffect, useRef, JSX } from 'react'
|
|
5
|
+
import { Popover, PopoverContent, PopoverTrigger } from './popover'
|
|
6
|
+
import { Calendar } from './calendar'
|
|
7
|
+
import { ChevronRightIcon, ChevronLeftIcon } from '@radix-ui/react-icons' // Use these icons for the arrows in the header
|
|
8
|
+
import { Button } from './button'
|
|
9
|
+
|
|
10
|
+
export interface DateRangePickerProps {
|
|
11
|
+
/** Click handler for applying the updates from DateRangePicker. */
|
|
12
|
+
onUpdate?: (values: { range: DateRange }) => void
|
|
13
|
+
/** Initial value for start date */
|
|
14
|
+
initialDateFrom?: Date | string
|
|
15
|
+
/** Initial value for end date */
|
|
16
|
+
initialDateTo?: Date | string
|
|
17
|
+
/** Alignment of popover */
|
|
18
|
+
align?: 'start' | 'center' | 'end'
|
|
19
|
+
/** Option for locale */
|
|
20
|
+
locale?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const getDateAdjustedForTimezone = (dateInput: Date | string): Date => {
|
|
24
|
+
if (typeof dateInput === 'string') {
|
|
25
|
+
const parts = dateInput.split('-').map((part) => parseInt(part, 10))
|
|
26
|
+
const date = new Date(parts[0], parts[1] - 1, parts[2])
|
|
27
|
+
return date
|
|
28
|
+
} else {
|
|
29
|
+
return dateInput
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface DateRange {
|
|
34
|
+
from: Date | undefined
|
|
35
|
+
to: Date | undefined
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** The DateRangePicker component allows a user to select a range of dates */
|
|
39
|
+
export const DateRangePicker: FC<DateRangePickerProps> & {
|
|
40
|
+
filePath: string
|
|
41
|
+
} = ({
|
|
42
|
+
initialDateFrom = new Date(new Date().setHours(0, 0, 0, 0)),
|
|
43
|
+
initialDateTo,
|
|
44
|
+
onUpdate,
|
|
45
|
+
align = 'center',
|
|
46
|
+
locale = 'en-US'
|
|
47
|
+
}): JSX.Element => {
|
|
48
|
+
const [isOpen, setIsOpen] = useState(false)
|
|
49
|
+
|
|
50
|
+
const [range, setRange] = useState<DateRange>({
|
|
51
|
+
from: initialDateFrom
|
|
52
|
+
? getDateAdjustedForTimezone(initialDateFrom)
|
|
53
|
+
: undefined,
|
|
54
|
+
to: initialDateTo
|
|
55
|
+
? getDateAdjustedForTimezone(initialDateTo)
|
|
56
|
+
: initialDateFrom
|
|
57
|
+
? getDateAdjustedForTimezone(initialDateFrom)
|
|
58
|
+
: undefined
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
// This effect will be triggered when a date is selected.
|
|
63
|
+
// We update the state of the component using the new range.
|
|
64
|
+
if (onUpdate) {
|
|
65
|
+
onUpdate({ range })
|
|
66
|
+
}
|
|
67
|
+
}, [range, onUpdate])
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<Popover modal={true} open={isOpen} onOpenChange={setIsOpen}>
|
|
71
|
+
<PopoverTrigger asChild>
|
|
72
|
+
<Button size={'lg'} variant="secondary" className="w-auto px-3 py-2">
|
|
73
|
+
<div className="flex-grow text-left font-normal">
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
<span>Select a date range</span>
|
|
77
|
+
|
|
78
|
+
</div>
|
|
79
|
+
<div className="pl-1 opacity-60 -mr-2 scale-125">
|
|
80
|
+
{isOpen ? <ChevronLeftIcon width={24} /> : <ChevronRightIcon width={24} />}
|
|
81
|
+
</div>
|
|
82
|
+
</Button>
|
|
83
|
+
</PopoverTrigger>
|
|
84
|
+
<PopoverContent align={align} className="w-auto p-0">
|
|
85
|
+
<Calendar
|
|
86
|
+
mode="range"
|
|
87
|
+
onSelect={(value: { from?: Date, to?: Date } | undefined) => {
|
|
88
|
+
setRange({ from: value?.from, to: value?.to })
|
|
89
|
+
}}
|
|
90
|
+
selected={range}
|
|
91
|
+
numberOfMonths={2}
|
|
92
|
+
defaultMonth={
|
|
93
|
+
new Date(new Date().setMonth(new Date().getMonth() - 1))
|
|
94
|
+
}
|
|
95
|
+
/>
|
|
96
|
+
</PopoverContent>
|
|
97
|
+
</Popover>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
DateRangePicker.displayName = 'DateRangePicker'
|
|
102
|
+
DateRangePicker.filePath =
|
|
103
|
+
'libs/shared/ui-kit/src/lib/date-range-picker/date-range-picker.tsx'
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog"
|
|
5
|
+
import { XIcon } from "lucide-react"
|
|
6
|
+
|
|
7
|
+
import { cn } from "../utils/cn"
|
|
8
|
+
|
|
9
|
+
function Dialog({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof DialogPrimitive.Root>) {
|
|
12
|
+
return <DialogPrimitive.Root data-slot="dialog" {...props} />
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function DialogTrigger({
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
|
|
18
|
+
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function DialogPortal({
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<typeof DialogPrimitive.Portal>) {
|
|
24
|
+
return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function DialogClose({
|
|
28
|
+
...props
|
|
29
|
+
}: React.ComponentProps<typeof DialogPrimitive.Close>) {
|
|
30
|
+
return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function DialogOverlay({
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
|
|
37
|
+
return (
|
|
38
|
+
<DialogPrimitive.Overlay
|
|
39
|
+
data-slot="dialog-overlay"
|
|
40
|
+
className={cn(
|
|
41
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
42
|
+
className
|
|
43
|
+
)}
|
|
44
|
+
{...props}
|
|
45
|
+
/>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function DialogContent({
|
|
50
|
+
className,
|
|
51
|
+
children,
|
|
52
|
+
showCloseButton = true,
|
|
53
|
+
...props
|
|
54
|
+
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
55
|
+
showCloseButton?: boolean
|
|
56
|
+
}) {
|
|
57
|
+
return (
|
|
58
|
+
<DialogPortal data-slot="dialog-portal">
|
|
59
|
+
<DialogOverlay />
|
|
60
|
+
<DialogPrimitive.Content
|
|
61
|
+
data-slot="dialog-content"
|
|
62
|
+
className={cn(
|
|
63
|
+
"bg-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
64
|
+
className
|
|
65
|
+
)}
|
|
66
|
+
{...props}
|
|
67
|
+
>
|
|
68
|
+
{children}
|
|
69
|
+
{showCloseButton && (
|
|
70
|
+
<DialogPrimitive.Close
|
|
71
|
+
data-slot="dialog-close"
|
|
72
|
+
className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
73
|
+
>
|
|
74
|
+
<XIcon />
|
|
75
|
+
<span className="sr-only">Close</span>
|
|
76
|
+
</DialogPrimitive.Close>
|
|
77
|
+
)}
|
|
78
|
+
</DialogPrimitive.Content>
|
|
79
|
+
</DialogPortal>
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
84
|
+
return (
|
|
85
|
+
<div
|
|
86
|
+
data-slot="dialog-header"
|
|
87
|
+
className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
|
|
88
|
+
{...props}
|
|
89
|
+
/>
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
94
|
+
return (
|
|
95
|
+
<div
|
|
96
|
+
data-slot="dialog-footer"
|
|
97
|
+
className={cn(
|
|
98
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
99
|
+
className
|
|
100
|
+
)}
|
|
101
|
+
{...props}
|
|
102
|
+
/>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function DialogDescription({
|
|
107
|
+
className,
|
|
108
|
+
...props
|
|
109
|
+
}: React.ComponentProps<typeof DialogPrimitive.Description>) {
|
|
110
|
+
return (
|
|
111
|
+
<DialogPrimitive.Description
|
|
112
|
+
data-slot="dialog-description"
|
|
113
|
+
className={cn("text-lg leading-none font-semibold", className)}
|
|
114
|
+
{...props}
|
|
115
|
+
/>
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function DialogTitle({
|
|
120
|
+
className,
|
|
121
|
+
...props
|
|
122
|
+
}: React.ComponentProps<typeof DialogPrimitive.Title>) {
|
|
123
|
+
return (
|
|
124
|
+
<DialogPrimitive.Title
|
|
125
|
+
data-slot="dialog-title"
|
|
126
|
+
className={cn("text-muted-foreground text-sm", className)}
|
|
127
|
+
{...props}
|
|
128
|
+
/>
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export {
|
|
133
|
+
Dialog,
|
|
134
|
+
DialogClose,
|
|
135
|
+
DialogContent,
|
|
136
|
+
DialogDescription,
|
|
137
|
+
DialogFooter,
|
|
138
|
+
DialogHeader,
|
|
139
|
+
DialogOverlay,
|
|
140
|
+
DialogPortal,
|
|
141
|
+
DialogTitle,
|
|
142
|
+
DialogTrigger,
|
|
143
|
+
}
|