react-file-upload-ui 0.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/README.md +54 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +41 -0
- package/dist/index.mjs +16 -0
- package/package.json +53 -0
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# react-file-upload-ui
|
|
2
|
+
|
|
3
|
+
React File Upload UI — a small, customizable React component for file uploads.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install as a peer dependency alongside `react` and `react-dom`:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install react react-dom
|
|
11
|
+
npm install react-file-upload-ui
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
or with pnpm:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pnpm add react react-dom
|
|
18
|
+
pnpm add react-file-upload-ui
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
import React from "react";
|
|
25
|
+
import ReactFileUploaderUI from "react-file-upload-ui";
|
|
26
|
+
|
|
27
|
+
export default function App() {
|
|
28
|
+
return <ReactFileUploaderUI />;
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Building
|
|
33
|
+
|
|
34
|
+
This package uses `tsup` to build. To build locally run:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pnpm -C packages run build
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Publishing
|
|
41
|
+
|
|
42
|
+
Before publishing, make sure `name` in `package.json` is unique on npm and that you've logged in with `npm login`.
|
|
43
|
+
|
|
44
|
+
When ready to publish:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pnpm -C packages run build
|
|
48
|
+
cd packages
|
|
49
|
+
npm publish --access public
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
License: MIT
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ReactFileUploaderUIProps {
|
|
4
|
+
accept?: string;
|
|
5
|
+
multiple?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const ReactFileUploaderUI: React.FC<ReactFileUploaderUIProps>;
|
|
8
|
+
|
|
9
|
+
export { ReactFileUploaderUI, type ReactFileUploaderUIProps, ReactFileUploaderUI as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ReactFileUploaderUIProps {
|
|
4
|
+
accept?: string;
|
|
5
|
+
multiple?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const ReactFileUploaderUI: React.FC<ReactFileUploaderUIProps>;
|
|
8
|
+
|
|
9
|
+
export { ReactFileUploaderUI, type ReactFileUploaderUIProps, ReactFileUploaderUI as default };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.tsx
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
ReactFileUploaderUI: () => ReactFileUploaderUI,
|
|
24
|
+
default: () => index_default
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
+
var ReactFileUploaderUI = ({
|
|
29
|
+
accept,
|
|
30
|
+
multiple
|
|
31
|
+
}) => {
|
|
32
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "file", accept, multiple }),
|
|
34
|
+
"Test Package"
|
|
35
|
+
] });
|
|
36
|
+
};
|
|
37
|
+
var index_default = ReactFileUploaderUI;
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
ReactFileUploaderUI
|
|
41
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/index.tsx
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
var ReactFileUploaderUI = ({
|
|
4
|
+
accept,
|
|
5
|
+
multiple
|
|
6
|
+
}) => {
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
8
|
+
/* @__PURE__ */ jsx("input", { type: "file", accept, multiple }),
|
|
9
|
+
"Test Package"
|
|
10
|
+
] });
|
|
11
|
+
};
|
|
12
|
+
var index_default = ReactFileUploaderUI;
|
|
13
|
+
export {
|
|
14
|
+
ReactFileUploaderUI,
|
|
15
|
+
index_default as default
|
|
16
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-file-upload-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsup src/index.tsx --format cjs,esm --dts --clean",
|
|
8
|
+
"prepare": "pnpm run build",
|
|
9
|
+
"prepublishOnly": "pnpm run build",
|
|
10
|
+
"publish:beta": "npm publish --tag beta --access public",
|
|
11
|
+
"publish:latest": "npm publish --access public"
|
|
12
|
+
},
|
|
13
|
+
"peerDependencies": {
|
|
14
|
+
"react": "^19.0.0",
|
|
15
|
+
"react-dom": "^19.0.0"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"keywords": [
|
|
19
|
+
"react",
|
|
20
|
+
"file",
|
|
21
|
+
"upload",
|
|
22
|
+
"uploader",
|
|
23
|
+
"ui"
|
|
24
|
+
],
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/sakilanwar12/react-file-upload-ui.git"
|
|
28
|
+
},
|
|
29
|
+
"author": "sakilanwar12",
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"private": false,
|
|
35
|
+
"files": [
|
|
36
|
+
"dist"
|
|
37
|
+
],
|
|
38
|
+
"module": "dist/index.mjs",
|
|
39
|
+
"exports": {
|
|
40
|
+
".": {
|
|
41
|
+
"import": "./dist/index.mjs",
|
|
42
|
+
"require": "./dist/index.js"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/react": "^19.2.7",
|
|
47
|
+
"@types/react-dom": "^19.2.3",
|
|
48
|
+
"react": "^19.2.0",
|
|
49
|
+
"react-dom": "^19.2.0",
|
|
50
|
+
"tsup": "^8.5.1",
|
|
51
|
+
"typescript": "^5.9.3"
|
|
52
|
+
}
|
|
53
|
+
}
|