{"_id":"s-image-uploader","_rev":"3-2ae50e99d2838f15b960f69d8b083be4","name":"s-image-uploader","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"s-image-uploader","version":"1.0.0","author":"","license":"ISC","_id":"s-image-uploader@1.0.0","maintainers":[{"name":"shaharulsiyam","email":"shaharulsiyam0273@gmail.com"}],"dist":{"shasum":"ab5b7f63319277ed9ffdc14550c3fe407a7151c4","tarball":"https://registry.npmjs.org/s-image-uploader/-/s-image-uploader-1.0.0.tgz","fileCount":11,"integrity":"sha512-uK0uo9jwWbCG07/BiBDkwYO7TAQj2tVsIS4y/eNoU8HPqDTL0vEOdPOpofPUWlvkz7Jyxg7NJz04ajXoe2Uciw==","signatures":[{"sig":"MEQCIAqE2wO7eMlOTkHtwnalobInpIjrxSAe44Lt3kiHvnT/AiBpp+qaarh2fk+4KXZxJDp2tbiWHq0YN8ZfSn5x12Vbmw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":175005},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","scripts":{"test":"echo \"Error: no test specified\" && exit 1","rollup":"rollup -c --bundleConfigAsCjs"},"_npmUser":{"name":"shaharulsiyam","email":"shaharulsiyam0273@gmail.com"},"_npmVersion":"10.9.2","directories":{},"_nodeVersion":"22.13.0","dependencies":{"rollup-plugin-dts":"^6.1.1","@rollup/plugin-terser":"^0.4.4","rollup-plugin-postcss":"^4.0.2","@rollup/plugin-commonjs":"^28.0.2","@rollup/plugin-typescript":"^12.1.2","@rollup/plugin-node-resolve":"^16.0.0","rollup-plugin-peer-deps-external":"^2.2.4"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.0.0","tslib":"^2.8.1","typescript":"^5.7.3"},"_npmOperationalInternal":{"tmp":"tmp/s-image-uploader_1.0.0_1740027227872_0.2270086836889882","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"s-image-uploader","version":"1.0.1","author":"","license":"ISC","_id":"s-image-uploader@1.0.1","maintainers":[{"name":"shaharulsiyam","email":"shaharulsiyam0273@gmail.com"}],"dist":{"shasum":"246b320d87195974f18b20f51b975b03bf5375ab","tarball":"https://registry.npmjs.org/s-image-uploader/-/s-image-uploader-1.0.1.tgz","fileCount":12,"integrity":"sha512-8x+kl5VWQCKVWf3p68t2VnLwOHq3jINOdtvxoH3vD5BQtZo/nS/h11eJLIncyKpq5jBmQsYsokvmX3TaLJUtHQ==","signatures":[{"sig":"MEYCIQC5qdy2zqvC+4dW+S2xKVFFP3OEGFkammrCuNnxAWBhvgIhAJCnCYMOqnsWC73vu7KTorIWdnMyOCfo5gwiJUGG6Fqy","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":178323},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"9740aa9bd27a6d3ef3eb82ffd5ad9c8fa0249881","scripts":{"test":"echo \"Error: no test specified\" && exit 1","rollup":"rollup -c --bundleConfigAsCjs"},"_npmUser":{"name":"shaharulsiyam","email":"shaharulsiyam0273@gmail.com"},"_npmVersion":"10.9.2","description":"## Overview","directories":{},"_nodeVersion":"22.13.0","dependencies":{"rollup-plugin-dts":"^6.1.1","@rollup/plugin-terser":"^0.4.4","rollup-plugin-postcss":"^4.0.2","@rollup/plugin-commonjs":"^28.0.2","@rollup/plugin-typescript":"^12.1.2","@rollup/plugin-node-resolve":"^16.0.0","rollup-plugin-peer-deps-external":"^2.2.4"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.0.0","tslib":"^2.8.1","typescript":"^5.7.3"},"_npmOperationalInternal":{"tmp":"tmp/s-image-uploader_1.0.1_1740028278372_0.15263172607265685","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"s-image-uploader","version":"1.1.1","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","rollup":"rollup -c --bundleConfigAsCjs"},"author":"","license":"ISC","description":"**FileUploader** is a customizable React component for handling file uploads with drag-and-drop functionality. It supports multiple file selection, previews, and deletion of uploaded files. This package is designed for easy integration into React applicat","devDependencies":{"react":"^19.0.0","tslib":"^2.8.1","typescript":"^5.7.3"},"dependencies":{"@rollup/plugin-commonjs":"^28.0.2","@rollup/plugin-node-resolve":"^16.0.0","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^12.1.2","rollup-plugin-dts":"^6.1.1","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.2"},"_id":"s-image-uploader@1.1.1","gitHead":"d4bcf493f0aefcde3361474adbbc38d556c133e7","_nodeVersion":"23.10.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-0xFBWB/g9eKkCWEcfJCVpkIPnQlchTCSrEH5JGVSA7YTy0AWY3ENo4vxbMTQ8jTXdNGRE/tfwV+0qo0m2MPVYg==","shasum":"8091729354f2091b65353bbea8585bb676a65ef8","tarball":"https://registry.npmjs.org/s-image-uploader/-/s-image-uploader-1.1.1.tgz","fileCount":12,"unpackedSize":179811,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCAKWQhSM4TBNjFz57Af7Oh562poHlCf9fsEdz0FBFSkAIhAJozpm1ujWck12FTIbKCObzO6YxLSZIvOqlTRaS4E1qF"}]},"_npmUser":{"name":"shaharulsiyam","email":"shaharulsiyam0273@gmail.com"},"directories":{},"maintainers":[{"name":"shaharulsiyam","email":"shaharulsiyam0273@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/s-image-uploader_1.1.1_1744790305419_0.3205076808759406"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-20T04:53:47.871Z","modified":"2025-04-16T07:58:25.741Z","1.0.0":"2025-02-20T04:53:48.050Z","1.0.1":"2025-02-20T05:11:18.643Z","1.1.1":"2025-04-16T07:58:25.589Z"},"license":"ISC","description":"**FileUploader** is a customizable React component for handling file uploads with drag-and-drop functionality. It supports multiple file selection, previews, and deletion of uploaded files. This package is designed for easy integration into React applicat","maintainers":[{"name":"shaharulsiyam","email":"shaharulsiyam0273@gmail.com"}],"readme":"# FileUploader - React File Upload Component\r\n\r\n## Overview\r\n\r\n**FileUploader** is a customizable React component for handling file uploads with drag-and-drop functionality. It supports multiple file selection, previews, and deletion of uploaded files. This package is designed for easy integration into React applications.\r\n\r\n## Features\r\n\r\n- Drag-and-drop file upload\r\n- Click-to-upload functionality\r\n- Supports single and multiple file uploads\r\n- File previews for images\r\n- Customizable appearance\r\n- Restrict file types\r\n- Delete uploaded files\r\n\r\n## Installation\r\n\r\nYou can install the package using npm or yarn:\r\n\r\n```sh\r\nnpm install s-image-uploader\r\n```\r\n\r\nor\r\n\r\n```sh\r\nyarn add s-image-uploader\r\n```\r\n\r\n## Usage\r\n\r\nImport and use the **FileUploader** component in your React project:\r\n\r\n```tsx\r\nimport { useState } from \"react\";\r\nimport FileUploader from \"./FileUploader\";\r\nfunction App() {\r\n  const [isDragging, setIsDragging] = useState(false);\r\n  const [image, setImage] = useState<File[] | []>([]);\r\n\r\n  return (\r\n    <div>\r\n      <FileUploader\r\n        multiple={true}\r\n        setDragging={(dragging) => {\r\n          setIsDragging(dragging);\r\n        }}\r\n        onFilesChange={(files) => {\r\n          setImage(files);\r\n        }}\r\n      >\r\n        <div\r\n          style={{\r\n            height: \"200px\",\r\n            width: \"300px\",\r\n            fontSize: \"16px\",\r\n            color: \"#666\",\r\n            border: \"2px dashed #ccc\",\r\n            borderRadius: \"8px\",\r\n            textAlign: \"center\",\r\n            cursor: \"pointer\",\r\n            transition: \"border 0.3s ease\",\r\n            borderColor: isDragging ? \"#007bff\" : \"#ccc\",\r\n            padding: \"20px\",\r\n            display: \"flex\",\r\n            justifyContent: \"center\",\r\n            alignItems: \"center\",\r\n          }}\r\n        >\r\n          <p>\r\n            {isDragging\r\n              ? \"Drop here your content here\"\r\n              : \"Drag & Drop or Click to Upload\"}\r\n          </p>\r\n        </div>\r\n      </FileUploader>\r\n    </div>\r\n  );\r\n}\r\n\r\nexport default App;\r\n```\r\n\r\n## Props\r\n\r\n| Prop            | Type                      | Default   | Description                                                  |\r\n| --------------- | ------------------------- | --------- | ------------------------------------------------------------ |\r\n| `background`    | `string`                  | `#f9f9f9` | Background color of the drop area                            |\r\n| `showOutPut`    | `boolean`                 | `true`    | Whether to display file previews                             |\r\n| `accept`        | `string`                  | `image`   | File type filter (e.g., `image`, `video`, `application/pdf`) |\r\n| `multiple`      | `boolean`                 | `false`   | Allows multiple file selection                               |\r\n| `children`      | `React.ReactNode`         | `null`    | Custom content inside the drop area                          |\r\n| `setDragging`   | `(arg0: boolean) => void` | Required  | Callback function when drag state changes                    |\r\n| `onFilesChange` | `(files: File[]) => void` | Required  | Callback function to receive uploaded files                  |\r\n\r\n## File Preview\r\n\r\n- If `multiple` is enabled, uploaded files will be displayed in a grid.\r\n- If `multiple` is disabled, only one file will be shown.\r\n- Clicking the delete button (`×`) will remove a file.\r\n<!--\r\n\r\n## Example Screenshots\r\n\r\n| Single File Upload                              | Multiple File Upload                               |\r\n| ----------------------------------------------- | -------------------------------------------------- | --- |\r\n| ![Single File](https://via.placeholder.com/100) | ![Multiple Files](https://via.placeholder.com/100) | --> |\r\n\r\n<!--\r\n## Contributing\r\n\r\nContributions are welcome! If you find any issues or have suggestions, feel free to open an issue or submit a pull request.\r\n\r\n## License\r\n\r\nThis package is licensed under the **MIT License**.\r\n\r\n---\r\n\r\nHappy Coding! 🚀 -->\r\n","readmeFilename":"Readme.md"}