@cubone/react-file-manager 1.0.1 → 1.1.0

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/style.css CHANGED
@@ -1 +1 @@
1
- @import"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap";.background-secondary{background-color:#6155b4!important}.text-white{color:#fff}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}img,svg{vertical-align:middle}.fm-modal{border:1px solid #c6c6c6;border-radius:5px;width:fit-content;overflow-x:hidden;padding:0;box-shadow:0 2px 10px #00000041}.w-25{width:25%}.file-explorer{font-family:Nunito Sans,sans-serif;border:1px solid #dddddd;height:72dvh;position:relative;width:100%;background-color:#fff;margin-top:1rem;cursor:default;-webkit-user-select:none;-ms-user-select:none;user-select:none}.file-explorer button{font-family:Nunito Sans,sans-serif}.file-explorer .file-explorer-loading{z-index:3;position:fixed;display:flex;justify-content:center;align-items:center;height:72dvh;width:-webkit-fill-available;background-color:#ffffff8a}.file-explorer .toolbar{min-height:35px;border-bottom:1px solid #dddddd;padding:6px 10px}.file-explorer .toolbar .file-action-container{display:flex;justify-content:space-between}.file-explorer .toolbar .file-action-container>div{display:flex}.file-explorer .toolbar .file-action-container .file-action{background-color:transparent;gap:5px}.file-explorer .toolbar .file-action-container .file-action:hover:not(:disabled){cursor:pointer;background-color:#0000008c!important;border-radius:3px;color:#fff;text-shadow:0px 0px 1px white}.file-explorer .toolbar .file-action-container .file-action:hover:disabled{cursor:default;background-color:transparent!important;color:#b0b0b0;text-shadow:none}.file-explorer .toolbar .fm-toolbar{display:flex;justify-content:space-between}.file-explorer .toolbar .fm-toolbar>div{display:flex}.file-explorer .toolbar .fm-toolbar .toolbar-left-items{display:flex}.file-explorer .toolbar .item-action{background-color:#fff;display:flex;align-items:center;gap:7px;padding:8px 12px;font-size:14px;width:fit-content;border:none}.file-explorer .toolbar .item-action:hover{cursor:pointer;background-color:#0000001f!important;border-radius:3px;color:#5549a3}.file-explorer .toolbar .icon-only{padding:8px!important}.file-explorer .toolbar .item-separator{height:36px;background:#dee1e3;width:1px;margin:0 5px}.file-explorer .file-selected{background-color:#0000000a}.file-explorer .files-container{display:flex;height:calc(72dvh - 52px)}.file-explorer .files-container .navigation-pane{z-index:1;padding:8px 0;position:relative}.file-explorer .files-container .navigation-pane .sb-folders-list{list-style:none;padding:0 6px;height:100%;overflow-y:auto!important}.file-explorer .files-container .navigation-pane .sb-folders-list::-webkit-scrollbar{width:5px;height:8px;padding-top:2px}.file-explorer .files-container .navigation-pane .sb-folders-list::-webkit-scrollbar-thumb{background:#6155b4!important}.file-explorer .files-container .navigation-pane .sb-folders-list .folder-collapsible{margin-left:10px}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item{display:flex;align-items:center;margin-bottom:4px;padding:6px 5px;border-radius:4px}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item:hover{cursor:pointer;background-color:#0000000a}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .non-expanable{min-width:20px}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .sb-folder-details{display:flex;align-items:center}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .sb-folder-details .folder-open-icon{margin:0 7px}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .sb-folder-details .folder-close-icon{margin:1px 9px 0 8px}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .sb-folder-details .sb-folder-name{width:max-content}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .folder-rotate-down{animation:rotateFolderDown .5s linear forwards}@keyframes rotateFolderDown{0%{transform:rotate(0)}to{transform:rotate(90deg)}}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .folder-rotate-right{animation:rotateRight .5s linear forwards}@keyframes rotateRight{0%{transform:rotate(90deg)}to{transform:rotate(0)}}.file-explorer .files-container .navigation-pane .sb-folders-list .active-list-item{background-color:#6155b4;color:#fff}.file-explorer .files-container .navigation-pane .sb-folders-list .active-list-item:hover{cursor:pointer;background-color:#6155b4}.file-explorer .files-container .navigation-pane .sb-folders-list .empty-nav-pane{display:flex;justify-content:center;align-items:center;height:100%}.file-explorer .files-container .navigation-pane .sidebar-resize{position:absolute;right:0;top:0;bottom:0;width:5px;cursor:col-resize;z-index:10;border-right:1px solid #dee2e6}.file-explorer .files-container .navigation-pane .sidebar-resize:hover,.file-explorer .files-container .navigation-pane .sidebar-dragging{border-right:1px solid #1e3a8a}.file-explorer .files-container .folers-preview{z-index:2;background-color:#fff;padding-right:0;padding-left:0}.file-explorer .files-container .breadcrumb{display:flex;gap:.5rem;overflow-x:scroll;border-bottom:1px solid #dddddd;padding:10px 15px}.file-explorer .files-container .breadcrumb::-webkit-scrollbar{width:5px;padding-top:2px;scrollbar-width:none}.file-explorer .files-container .breadcrumb::-webkit-scrollbar-thumb{background:#6155b4!important}.file-explorer .files-container .folder-name{display:flex;align-items:center;gap:.25rem;font-weight:500;min-width:fit-content}.file-explorer .files-container .folder-name:hover{cursor:pointer;color:#6155b4}.file-explorer .files-container .files{display:flex;align-content:flex-start;flex-wrap:wrap;column-gap:.5em;row-gap:5px;height:60dvh;overflow-y:auto;padding:8px 4px 8px 8px}.file-explorer .files-container .files::-webkit-scrollbar{width:5px;padding-top:2px}.file-explorer .files-container .files::-webkit-scrollbar-thumb{background:#6155b4!important}.file-explorer .files-container .files .file-item{height:80px;width:118px;display:flex;flex-direction:column;gap:.5rem;align-items:center;padding:13px 10px 10px;margin:5px 0;border-radius:5px}.file-explorer .files-container .files .file-item:hover{cursor:pointer;background-color:#0000000a}.file-explorer .files-container .files .file-item .file-name{max-width:115px}.file-explorer .files-container .files .file-moving{opacity:.5}.file-explorer .files-container .empty-folder{display:flex;justify-content:center;align-items:center;width:100%;height:100%}@media screen and (min-height: 600px) and (max-height: 900px){.file-explorer,.file-explorer .file-explorer-loading{height:63dvh}.file-explorer .files-container{height:calc(63dvh - 51px)}.file-explorer .files-container .files{height:46dvh}}@media screen and (min-height: 550px) and (max-height: 600px){.file-explorer,.file-explorer .file-explorer-loading{height:58dvh}.file-explorer .files-container{height:calc(58dvh - 51px)}.file-explorer .files-container .files{height:46dvh}}.close-icon{padding:5px;border-radius:50%}.close-icon:hover{cursor:pointer;background-color:#00000012}.action-input{border:none;border-bottom:1px solid grey;border-top-left-radius:5px;border-top-right-radius:5px;transition:box-shadow .3s;background-color:#f5f5f5;padding:6px 9px;margin-right:8px;width:calc(100% - 18px)}.action-input:focus{outline:none;border-bottom-color:#6155b4!important;box-shadow:inset 0 -1px #6155b4}.folder-error{color:#dc3545;font-size:.8em;margin-top:4px}.file-upload-container .rs-uploader-file-items{max-height:165px;overflow-y:auto!important;overflow-x:hidden!important}.file-upload-container .rs-uploader-file-items::-webkit-scrollbar{width:5px;padding-top:2px}.file-upload-container .rs-uploader-file-items::-webkit-scrollbar-thumb{background:#6155b4!important}.file-upload-container .rs-uploader-file-items:before{content:"Selected files";color:#6155b4;font-weight:600;display:none;margin-left:1px}.file-upload-container .rs-uploader-file-item{border-radius:5px;margin:13px 5px 3px;box-shadow:1px 1px 3px 1px #00000038;-webkit-box-shadow:1px 1px 3px 1px rgba(0,0,0,.22);-moz-box-shadow:1px 1px 3px 1px rgba(0,0,0,.22)}.file-upload-container.show-uploaded-files .rs-uploader-file-items:before{display:block}.file-previewer{height:75vh}.file-previewer .photo-popup-image{opacity:1;object-fit:contain;height:100%;width:100%;transition:opacity .5s ease-in-out}.file-previewer .img-loading{opacity:0;height:0%;width:0%}.file-context-menu-list{font-size:1.1em}.file-context-menu-list ul{list-style-type:none;padding-left:0;margin:0}.file-context-menu-list ul li{display:flex;gap:6px;align-items:center;padding:6px 18px 6px 14px}.file-context-menu-list ul li:hover{cursor:pointer;background-color:#0000000a}.file-context-menu-list ul li.disable-paste{opacity:.5}.file-context-menu-list ul li.disable-paste:hover{cursor:default;background-color:transparent}.file-delete-confirm .file-delete-confirm-text{border-bottom:1px solid #dddddd;padding:10px 15px;margin-bottom:1rem}.file-delete-confirm .file-delete-confirm-actions{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:1rem;margin-right:1rem}.fm-create-folder-container{padding:8px 0}.fm-create-folder-container .fm-create-folder-input{border-bottom:1px solid #c6c6c6;padding:8px 12px 12px}.fm-create-folder-container .fm-create-folder-action{display:flex;gap:8px;justify-content:flex-end;padding:8px 8px 0 0}.fm-rename-folder-container{padding:8px 0}.fm-rename-folder-container .fm-rename-folder-input{border-bottom:1px solid #c6c6c6;padding:8px 12px 12px}.fm-rename-folder-container .fm-rename-folder-input .fm-rename-warning{display:flex;align-items:center;gap:10px}.fm-rename-folder-container .fm-rename-folder-action{display:flex;gap:8px;justify-content:flex-end;padding:8px 8px 0 0}.fm-upload-file{padding:18px 15px;display:flex;gap:18px}.fm-upload-file .select-files{width:100%}.fm-upload-file .select-files .draggable-file-input{color:#696969;background-color:#f7f7f7;margin-bottom:18px;height:220px;border:2px dashed #ccc;border-radius:5px;display:flex;justify-content:center;align-items:center}.fm-upload-file .select-files .draggable-file-input .input-text{pointer-events:none;display:flex;flex-direction:column;align-items:center}.fm-upload-file .select-files .draggable-file-input:hover,.fm-upload-file .select-files .draggable-file-input.dragging{border-color:#6155b4}.fm-upload-file .select-files .btn-choose-file{display:flex;justify-content:center}.fm-upload-file .select-files .btn-choose-file label{display:inline-block;padding:.4rem .8rem}.fm-upload-file .select-files .btn-choose-file label:hover{cursor:pointer}.fm-upload-file .select-files .btn-choose-file .choose-file-input{display:none}.fm-upload-file .files-progress{width:60%}.fm-upload-file .files-progress h2{font-size:.9em;margin:0}.fm-upload-file .files-progress ul{padding-left:0;padding-right:5px;padding-bottom:10px;margin-top:.7rem;height:220px;overflow-y:auto!important;font-weight:500}.fm-upload-file .files-progress ul::-webkit-scrollbar{width:3px;height:8px;padding-top:2px}.fm-upload-file .files-progress ul::-webkit-scrollbar-thumb{background:#6155b4!important}.fm-upload-file .files-progress ul li{list-style:none;border-bottom:1px solid #c6c6c6;display:flex;gap:5px;margin-bottom:18px;padding-bottom:12px}.fm-upload-file .files-progress ul li .file-icon{width:10%}.fm-upload-file .files-progress ul li .file{width:90%}.fm-upload-file .files-progress ul li .file .file-details{display:flex;align-items:center;justify-content:space-between;margin-bottom:5px}.fm-upload-file .files-progress ul li .file .file-details .file-info{width:90%;display:flex;align-items:baseline}.fm-upload-file .files-progress ul li .file .file-details .file-info .file-name{display:inline-block;max-width:72%;margin-right:8px}.fm-upload-file .files-progress ul li .file .file-details .file-size{font-size:.7em}.fm-upload-file .files-progress ul li .file .file-details .rm-file:hover{cursor:pointer;color:red}.file-selcted .select-files{width:40%}.fm-context-menu{position:absolute;background-color:#fff;border:1px solid #c6c6c6;border-radius:5px;padding:5px 0;z-index:1}.fm-modal-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e9ecef;padding:.5rem 1rem}.fm-modal-header .fm-modal-heading{margin:0;font-weight:700;color:#000}.dialog[open]{animation:expand .4s forwards}.dialog[open]::backdrop{background:#00000080}@keyframes expand{0%{transform:scale(.4)}to{transform:scale(1)}}.fm-button{border-radius:5px;font-weight:600;border:none}.fm-button:hover{cursor:pointer}.fm-button-primary{background-color:#6155b4;color:#fff}.fm-button-primary:hover{background-color:#4b3f9f}.fm-button-secondary{background-color:#f0f0f0;color:#000}.fm-button-secondary:hover{background-color:#e0e0e0}.fm-button-danger{background-color:#f44336;color:#fff}.fm-button-danger:hover{background-color:#d32f2f}.fm-progress{display:flex;flex-direction:column;gap:5px}.fm-progress .fm-progress-bar{width:100%;border-radius:5px;background-color:#c6c6c6;height:5px}.fm-progress .fm-progress-bar .fm-progress-bar-fill{height:100%;background-color:#6155b4;border-radius:5px;max-width:100%}.fm-progress .fm-progress-status{font-size:.7em}.fm-loader{z-index:3;position:absolute;display:flex;justify-content:center;align-items:center;height:100%;width:-webkit-fill-available;background-color:#ffffff8a}
1
+ @import"https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap";.background-secondary{background-color:#6155b4!important}.text-white{color:#fff}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}img,svg{vertical-align:middle}.fm-modal{border:1px solid #c6c6c6;border-radius:5px;width:fit-content;overflow-x:hidden;padding:0;box-shadow:0 2px 10px #00000041}.w-25{width:25%}.file-explorer{font-family:Nunito Sans,sans-serif;border:1px solid #dddddd;height:72dvh;position:relative;width:100%;background-color:#fff;margin-top:1rem;cursor:default;-webkit-user-select:none;-ms-user-select:none;user-select:none}.file-explorer button{font-family:Nunito Sans,sans-serif}.file-explorer .file-explorer-loading{z-index:3;position:fixed;display:flex;justify-content:center;align-items:center;height:72dvh;width:-webkit-fill-available;background-color:#ffffff8a}.file-explorer .toolbar{min-height:35px;border-bottom:1px solid #dddddd;padding:6px 10px}.file-explorer .toolbar .file-action-container{display:flex;justify-content:space-between}.file-explorer .toolbar .file-action-container>div{display:flex}.file-explorer .toolbar .file-action-container .file-action{background-color:transparent;gap:5px}.file-explorer .toolbar .file-action-container .file-action:hover:not(:disabled){cursor:pointer;background-color:#0000008c!important;border-radius:3px;color:#fff;text-shadow:0px 0px 1px white}.file-explorer .toolbar .file-action-container .file-action:hover:disabled{cursor:default;background-color:transparent!important;color:#b0b0b0;text-shadow:none}.file-explorer .toolbar .fm-toolbar{display:flex;justify-content:space-between}.file-explorer .toolbar .fm-toolbar>div{display:flex}.file-explorer .toolbar .fm-toolbar .toolbar-left-items{display:flex}.file-explorer .toolbar .item-action{background-color:#fff;display:flex;align-items:center;gap:7px;padding:8px 12px;font-size:14px;width:fit-content;border:none}.file-explorer .toolbar .item-action:hover{cursor:pointer;background-color:#0000001f!important;border-radius:3px;color:#5549a3}.file-explorer .toolbar .icon-only{padding:8px!important}.file-explorer .toolbar .item-separator{height:36px;background:#dee1e3;width:1px;margin:0 5px}.file-explorer .file-selected{background-color:#0000000a}.file-explorer .files-container{display:flex;height:calc(72dvh - 52px)}.file-explorer .files-container .navigation-pane{z-index:1;padding:8px 0;position:relative}.file-explorer .files-container .navigation-pane .sb-folders-list{list-style:none;padding:0 6px;height:100%;overflow-y:auto!important}.file-explorer .files-container .navigation-pane .sb-folders-list::-webkit-scrollbar{width:5px;height:8px;padding-top:2px}.file-explorer .files-container .navigation-pane .sb-folders-list::-webkit-scrollbar-thumb{background:#6155b4!important}.file-explorer .files-container .navigation-pane .sb-folders-list .folder-collapsible{margin-left:10px}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item{display:flex;align-items:center;margin-bottom:4px;padding:6px 5px;border-radius:4px}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item:hover{cursor:pointer;background-color:#0000000a}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .non-expanable{min-width:20px}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .sb-folder-details{display:flex;align-items:center}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .sb-folder-details .folder-open-icon{margin:0 7px}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .sb-folder-details .folder-close-icon{margin:1px 9px 0 8px}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .sb-folder-details .sb-folder-name{width:max-content}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .folder-rotate-down{animation:rotateFolderDown .5s linear forwards}@keyframes rotateFolderDown{0%{transform:rotate(0)}to{transform:rotate(90deg)}}.file-explorer .files-container .navigation-pane .sb-folders-list .sb-folders-list-item .folder-rotate-right{animation:rotateRight .5s linear forwards}@keyframes rotateRight{0%{transform:rotate(90deg)}to{transform:rotate(0)}}.file-explorer .files-container .navigation-pane .sb-folders-list .active-list-item{background-color:#6155b4;color:#fff}.file-explorer .files-container .navigation-pane .sb-folders-list .active-list-item:hover{cursor:pointer;background-color:#6155b4}.file-explorer .files-container .navigation-pane .sb-folders-list .empty-nav-pane{display:flex;justify-content:center;align-items:center;height:100%}.file-explorer .files-container .navigation-pane .sidebar-resize{position:absolute;right:0;top:0;bottom:0;width:5px;cursor:col-resize;z-index:10;border-right:1px solid #dee2e6}.file-explorer .files-container .navigation-pane .sidebar-resize:hover,.file-explorer .files-container .navigation-pane .sidebar-dragging{border-right:1px solid #1e3a8a}.file-explorer .files-container .folers-preview{z-index:2;background-color:#fff;padding-right:0;padding-left:0}.file-explorer .files-container .breadcrumb{display:flex;gap:.5rem;overflow-x:scroll;border-bottom:1px solid #dddddd;padding:10px 15px}.file-explorer .files-container .breadcrumb::-webkit-scrollbar{width:5px;padding-top:2px;scrollbar-width:none}.file-explorer .files-container .breadcrumb::-webkit-scrollbar-thumb{background:#6155b4!important}.file-explorer .files-container .folder-name{display:flex;align-items:center;gap:.25rem;font-weight:500;min-width:fit-content}.file-explorer .files-container .folder-name:hover{cursor:pointer;color:#6155b4}.file-explorer .files-container .files{display:flex;align-content:flex-start;flex-wrap:wrap;column-gap:.5em;row-gap:5px;height:60dvh;overflow-y:auto;padding:8px 4px 8px 8px}.file-explorer .files-container .files::-webkit-scrollbar{width:5px;padding-top:2px}.file-explorer .files-container .files::-webkit-scrollbar-thumb{background:#6155b4!important}.file-explorer .files-container .files .file-item{height:80px;width:118px;display:flex;flex-direction:column;gap:.5rem;align-items:center;padding:13px 10px 10px;margin:5px 0;border-radius:5px}.file-explorer .files-container .files .file-item:hover{cursor:pointer;background-color:#0000000a}.file-explorer .files-container .files .file-item .file-name{max-width:115px}.file-explorer .files-container .files .file-moving{opacity:.5}.file-explorer .files-container .empty-folder{display:flex;justify-content:center;align-items:center;width:100%;height:100%}@media screen and (min-height: 600px) and (max-height: 900px){.file-explorer,.file-explorer .file-explorer-loading{height:63dvh}.file-explorer .files-container{height:calc(63dvh - 51px)}.file-explorer .files-container .files{height:46dvh}}@media screen and (min-height: 550px) and (max-height: 600px){.file-explorer,.file-explorer .file-explorer-loading{height:58dvh}.file-explorer .files-container{height:calc(58dvh - 51px)}.file-explorer .files-container .files{height:46dvh}}.close-icon{padding:5px;border-radius:50%}.close-icon:hover{cursor:pointer;background-color:#00000012}.action-input{border:none;border-bottom:1px solid grey;border-top-left-radius:5px;border-top-right-radius:5px;transition:box-shadow .3s;background-color:#f5f5f5;padding:6px 9px;margin-right:8px;width:calc(100% - 18px)}.action-input:focus{outline:none;border-bottom-color:#6155b4!important;box-shadow:inset 0 -1px #6155b4}.folder-error{color:#dc3545;font-size:.8em;margin-top:4px}.file-upload-container .rs-uploader-file-items{max-height:165px;overflow-y:auto!important;overflow-x:hidden!important}.file-upload-container .rs-uploader-file-items::-webkit-scrollbar{width:5px;padding-top:2px}.file-upload-container .rs-uploader-file-items::-webkit-scrollbar-thumb{background:#6155b4!important}.file-upload-container .rs-uploader-file-items:before{content:"Selected files";color:#6155b4;font-weight:600;display:none;margin-left:1px}.file-upload-container .rs-uploader-file-item{border-radius:5px;margin:13px 5px 3px;box-shadow:1px 1px 3px 1px #00000038;-webkit-box-shadow:1px 1px 3px 1px rgba(0,0,0,.22);-moz-box-shadow:1px 1px 3px 1px rgba(0,0,0,.22)}.file-upload-container.show-uploaded-files .rs-uploader-file-items:before{display:block}.file-previewer{height:75vh}.file-previewer .photo-popup-image{opacity:1;object-fit:contain;height:100%;width:100%;transition:opacity .5s ease-in-out}.file-previewer .img-loading{opacity:0;height:0%;width:0%}.file-context-menu-list{font-size:1.1em}.file-context-menu-list ul{list-style-type:none;padding-left:0;margin:0}.file-context-menu-list ul li{display:flex;gap:6px;align-items:center;padding:6px 18px 6px 14px}.file-context-menu-list ul li:hover{cursor:pointer;background-color:#0000000a}.file-context-menu-list ul li.disable-paste{opacity:.5}.file-context-menu-list ul li.disable-paste:hover{cursor:default;background-color:transparent}.file-delete-confirm .file-delete-confirm-text{border-bottom:1px solid #dddddd;padding:10px 15px;margin-bottom:1rem}.file-delete-confirm .file-delete-confirm-actions{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:1rem;margin-right:1rem}.fm-create-folder-container{padding:8px 0}.fm-create-folder-container .fm-create-folder-input{border-bottom:1px solid #c6c6c6;padding:8px 12px 12px}.fm-create-folder-container .fm-create-folder-action{display:flex;gap:8px;justify-content:flex-end;padding:8px 8px 0 0}.fm-rename-folder-container{padding:8px 0}.fm-rename-folder-container .fm-rename-folder-input{border-bottom:1px solid #c6c6c6;padding:8px 12px 12px}.fm-rename-folder-container .fm-rename-folder-input .fm-rename-warning{display:flex;align-items:center;gap:10px}.fm-rename-folder-container .fm-rename-folder-action{display:flex;gap:8px;justify-content:flex-end;padding:8px 8px 0 0}.fm-upload-file{padding:18px 15px;display:flex;gap:18px}.fm-upload-file .select-files{width:100%}.fm-upload-file .select-files .draggable-file-input{color:#696969;background-color:#f7f7f7;margin-bottom:18px;height:220px;border:2px dashed #ccc;border-radius:5px;display:flex;justify-content:center;align-items:center}.fm-upload-file .select-files .draggable-file-input .input-text{pointer-events:none;display:flex;flex-direction:column;align-items:center}.fm-upload-file .select-files .draggable-file-input:hover,.fm-upload-file .select-files .draggable-file-input.dragging{border-color:#6155b4}.fm-upload-file .select-files .btn-choose-file{display:flex;justify-content:center}.fm-upload-file .select-files .btn-choose-file label{display:inline-block;padding:.4rem .8rem}.fm-upload-file .select-files .btn-choose-file label:hover{cursor:pointer}.fm-upload-file .select-files .btn-choose-file .choose-file-input{display:none}.fm-upload-file .files-progress{width:60%}.fm-upload-file .files-progress .heading{display:flex;gap:4px}.fm-upload-file .files-progress h2{font-size:.9em;margin:0}.fm-upload-file .files-progress ul{padding-left:0;padding-right:5px;padding-bottom:10px;margin-top:.7rem;height:220px;overflow-y:auto!important;font-weight:500}.fm-upload-file .files-progress ul::-webkit-scrollbar{width:3px;height:8px;padding-top:2px}.fm-upload-file .files-progress ul::-webkit-scrollbar-thumb{background:#6155b4!important}.fm-upload-file .files-progress ul li{list-style:none;border-bottom:1px solid #c6c6c6;display:flex;gap:5px;margin-bottom:18px;padding-bottom:12px}.fm-upload-file .files-progress ul li .file-icon{width:10%}.fm-upload-file .files-progress ul li .file{width:90%}.fm-upload-file .files-progress ul li .file .file-details{display:flex;align-items:center;justify-content:space-between;margin-bottom:5px}.fm-upload-file .files-progress ul li .file .file-details .file-info{width:90%;display:flex;align-items:baseline}.fm-upload-file .files-progress ul li .file .file-details .file-info .file-name{display:inline-block;max-width:72%;margin-right:8px}.fm-upload-file .files-progress ul li .file .file-details .file-size{font-size:.7em}.fm-upload-file .files-progress ul li .file .file-details .retry-upload{padding:3px;border-radius:50%}.fm-upload-file .files-progress ul li .file .file-details .retry-upload:hover{cursor:pointer;background-color:#00000012;color:#6155b4}.fm-upload-file .files-progress ul li .file .file-details .rm-file:hover{cursor:pointer;color:red}.file-selcted .select-files{width:40%}.fm-context-menu{position:absolute;background-color:#fff;border:1px solid #c6c6c6;border-radius:5px;padding:5px 0;z-index:1}.fm-modal-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e9ecef;padding:.5rem 1rem}.fm-modal-header .fm-modal-heading{margin:0;font-weight:700;color:#000}.dialog[open]{animation:expand .4s forwards}.dialog[open]::backdrop{background:#00000080}@keyframes expand{0%{transform:scale(.4)}to{transform:scale(1)}}.fm-button{border-radius:5px;font-weight:600;border:none}.fm-button:hover{cursor:pointer}.fm-button-primary{background-color:#6155b4;color:#fff}.fm-button-primary:hover{background-color:#4b3f9f}.fm-button-secondary{background-color:#f0f0f0;color:#000}.fm-button-secondary:hover{background-color:#e0e0e0}.fm-button-danger{background-color:#f44336;color:#fff}.fm-button-danger:hover{background-color:#d32f2f}.fm-progress{display:flex;flex-direction:column;gap:5px}.fm-progress .fm-progress-bar{width:100%;border-radius:5px;background-color:#c6c6c6;height:5px}.fm-progress .fm-progress-bar .fm-progress-bar-fill{height:100%;background-color:#6155b4;border-radius:5px;max-width:100%}.fm-progress .fm-progress-status{font-size:.75em;font-weight:600;display:flex;justify-content:space-between}.fm-progress .fm-upload-canceled{font-size:.75em;font-weight:600;color:red}.fm-loader{z-index:3;position:absolute;display:flex;justify-content:center;align-items:center;height:100%;width:-webkit-fill-available;background-color:#ffffff8a}
package/package.json CHANGED
@@ -1,57 +1,58 @@
1
- {
2
- "name": "@cubone/react-file-manager",
3
- "private": false,
4
- "version": "1.0.1",
5
- "type": "module",
6
- "module": "dist/react-file-manager.es.js",
7
- "files": [
8
- "dist/",
9
- "README.md"
10
- ],
11
- "publishConfig": {
12
- "access": "public"
13
- },
14
- "scripts": {
15
- "dev": "vite",
16
- "build": "vite build",
17
- "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
18
- "preview": "vite preview",
19
- "semantic-release": "semantic-release"
20
- },
21
- "dependencies": {
22
- "react": "^18.3.1",
23
- "react-collapsible": "^2.10.0",
24
- "react-dom": "^18.3.1",
25
- "react-icons": "^5.2.1",
26
- "react-loading": "^2.0.3"
27
- },
28
- "devDependencies": {
29
- "@types/react": "^18.3.3",
30
- "@types/react-dom": "^18.3.0",
31
- "@vitejs/plugin-react-swc": "^3.5.0",
32
- "eslint": "^8.57.0",
33
- "eslint-plugin-react": "^7.34.2",
34
- "eslint-plugin-react-hooks": "^4.6.2",
35
- "eslint-plugin-react-refresh": "^0.4.7",
36
- "sass": "^1.77.6",
37
- "semantic-release": "^24.1.0",
38
- "vite": "^5.3.1"
39
- },
40
- "description": "The File Manager Component is an open-source React.js package designed to help developers easily integrate a file manager into their applications. This component provides a user-friendly interface along with essential functionalities for managing files and folders, such as viewing, uploading and deleting within a specified directory structure. Ideal for anyone looking to build or enhance a file management system, this package offers both UI and backend integration capabilities.",
41
- "main": "src/index.js",
42
- "repository": {
43
- "type": "git",
44
- "url": "git+https://github.com/Saifullah-dev/react-file-manager.git"
45
- },
46
- "keywords": [
47
- "react",
48
- "file-manager",
49
- "component"
50
- ],
51
- "author": "Saifullah Zubair",
52
- "license": "MIT",
53
- "bugs": {
54
- "url": "https://github.com/Saifullah-dev/react-file-manager/issues"
55
- },
56
- "homepage": "https://github.com/Saifullah-dev/react-file-manager#readme"
57
- }
1
+ {
2
+ "name": "@cubone/react-file-manager",
3
+ "private": false,
4
+ "version": "1.1.0",
5
+ "type": "module",
6
+ "module": "dist/react-file-manager.es.js",
7
+ "files": [
8
+ "dist/",
9
+ "../README.md"
10
+ ],
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "scripts": {
15
+ "dev": "vite",
16
+ "build": "vite build",
17
+ "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
18
+ "preview": "vite preview",
19
+ "semantic-release": "semantic-release"
20
+ },
21
+ "dependencies": {
22
+ "axios": "^1.7.5",
23
+ "react": "^18.3.1",
24
+ "react-collapsible": "^2.10.0",
25
+ "react-dom": "^18.3.1",
26
+ "react-icons": "^5.2.1",
27
+ "react-loading": "^2.0.3"
28
+ },
29
+ "devDependencies": {
30
+ "@types/react": "^18.3.3",
31
+ "@types/react-dom": "^18.3.0",
32
+ "@vitejs/plugin-react-swc": "^3.5.0",
33
+ "eslint": "^8.57.0",
34
+ "eslint-plugin-react": "^7.34.2",
35
+ "eslint-plugin-react-hooks": "^4.6.2",
36
+ "eslint-plugin-react-refresh": "^0.4.7",
37
+ "sass": "^1.77.6",
38
+ "semantic-release": "^24.1.0",
39
+ "vite": "^5.3.1"
40
+ },
41
+ "description": "The File Manager Component is an open-source React.js package designed to help developers easily integrate a file manager into their applications. This component provides a user-friendly interface along with essential functionalities for managing files and folders, such as viewing, uploading and deleting within a specified directory structure. Ideal for anyone looking to build or enhance a file management system, this package offers both UI and backend integration capabilities.",
42
+ "main": "src/index.js",
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "git+https://github.com/Saifullah-dev/react-file-manager.git"
46
+ },
47
+ "keywords": [
48
+ "react",
49
+ "file-manager",
50
+ "component"
51
+ ],
52
+ "author": "Saifullah Zubair",
53
+ "license": "MIT",
54
+ "bugs": {
55
+ "url": "https://github.com/Saifullah-dev/react-file-manager/issues"
56
+ },
57
+ "homepage": "https://github.com/Saifullah-dev/react-file-manager#readme"
58
+ }
package/src/index.js CHANGED
@@ -1 +1 @@
1
- export { default as FileManager } from "./File Manager/FileManager";
1
+ export { default as FileManager } from "./File Manager/FileManager";
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Saifullah Zubair
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/README.md DELETED
@@ -1,93 +0,0 @@
1
- # React File Manager
2
-
3
- An open-source React.js package for easy integration of a file manager into applications. It provides a user-friendly interface for managing files and folders, including viewing, uploading, and deleting, with full UI and backend integration.
4
-
5
- ## Features
6
-
7
- - **View Files and Folders**: Display the directory structure with folders and files.
8
- - **Upload Files**: Upload new files to a selected directory.
9
- - **Delete Files and Folders**: Remove unwanted files or folders.
10
- - **Toolbar**: Access common file operations such as upload, delete, and refresh with a convenient toolbar.
11
- - **Breadcrumb Navigation**: Easily navigate through the directory structure.
12
- - **Navigation Pane**: Easily switch between folders and directories with a sidebar navigation pane.
13
- - **Context Menu**: Right-click to open a context menu with options for cutting, copying, pasting, renaming, and deleting files or folders.
14
-
15
- ## Installation
16
-
17
- To install `React File Manager`, use the following command:
18
-
19
- ```bash
20
- npm i @cubone/react-file-manager
21
- ```
22
-
23
- ## Usage
24
-
25
- Here’s a basic example of how to use the File Manager Component in your React application:
26
-
27
- ```javascript
28
- import { useState } from "react";
29
- import { FileManager } from "@cubone/react-file-manager";
30
- import "@cubone/react-file-manager/dist/style.css";
31
-
32
- function App() {
33
- const [files, setFiles] = useState([
34
- {
35
- name: "Documents",
36
- isDirectory: true,
37
- path: "", // Root directory
38
- },
39
- {
40
- name: "Pictures",
41
- isDirectory: true,
42
- path: "", // Root directory
43
- },
44
- {
45
- name: "Pic.png",
46
- isDirectory: false,
47
- path: "/Pictures", // Located inside the "Pictures" folder
48
- },
49
- ]);
50
-
51
- return (
52
- <>
53
- <FileManager files={files} />
54
- </>
55
- );
56
- }
57
- ```
58
- ## Props
59
-
60
- | Name | Type | Description |
61
- |-----------------|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|
62
- | `files` | `Array<{ name: string, isDirectory: boolean, path: string }>` | An array of file and folder objects representing the current directory structure. Each object includes `name`, `isDirectory`, and `path` properties. |
63
- | `isLoading` | `boolean` | A boolean indicating whether the application is currently performing an operation, such as creating, renaming, or deleting a file/folder. Displays a loading state if `true`. |
64
- | `onCreateFolder`| `(files: { name: string, isDirectory: boolean, path: string }[], folderName: string, folderPath: string) => void` | A callback function triggered when a new folder is created. Update the `files` state to include the new folder in the specified path. |
65
- | `onRename` | `(files: { name: string, isDirectory: boolean, path: string }[], selectedFile: { name: string, isDirectory: boolean, path: string }, newName: string) => void` | A callback function triggered when a file or folder is renamed. Update the `files` state to reflect the new name for the specified file or folder. |
66
- | `onDelete` | `(files: { name: string, isDirectory: boolean, path: string }[], file: { name: string, isDirectory: boolean, path: string }) => void` | A callback function triggered when a file or folder is deleted. Update the `files` state to remove the specified file or folder from the structure. |
67
- | `onPaste` | `(files: { name: string, isDirectory: boolean, path: string }[], pastePath: string, clipBoard: { isMoving: boolean, files: { name: string, isDirectory: boolean, path: string, children?: { name: string, isDirectory: boolean, path: string }[] }[] }) => void` | A callback function triggered when a file or folder is pasted (moved or copied). Update the files state to reflect the new location of the pasted items based on the clipBoard data. |
68
- | `onRefresh` | `() => void` | A callback function triggered when the file manager is refreshed. Use this to reload or refresh the `files` state to reflect any changes or updates. |
69
-
70
- ## Contributing
71
-
72
- Contributions are welcome! To contribute:
73
-
74
- 1. Fork the repository.
75
- 2. Create a new branch (`git checkout -b feature/branch-name`).
76
- 3. Make your changes.
77
- 4. Commit your changes (`git commit -m 'Add some feature'`).
78
- 5. Push to the branch (`git push origin feature/branch-name`).
79
- 6. Open a Pull Request.
80
-
81
- Get started by running following commands:
82
-
83
- ```bash
84
- git clone https://github.com/Saifullah-dev/react-file-manager.git
85
- cd react-file-manager
86
- npm i
87
- npm run dev
88
- ```
89
- The application should now be running on `http://localhost:5173`, have fun!
90
-
91
- ## License
92
-
93
- React File Manager is [MIT Licensed](LICENSE).