pure-react-ui 1.0.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/index.css ADDED
@@ -0,0 +1,42 @@
1
+ .pru-btn {
2
+ cursor: pointer;
3
+ border: none;
4
+ border-radius: 6px;
5
+ padding: 10px 20px;
6
+ font-size: 16px;
7
+ font-weight: 500;
8
+ transition: background-color .2s;
9
+ }
10
+
11
+ .pru-btn:disabled {
12
+ opacity: .6;
13
+ cursor: not-allowed;
14
+ }
15
+
16
+ .pru-btn-primary {
17
+ color: #fff;
18
+ background-color: #007bff;
19
+ }
20
+
21
+ .pru-btn-primary:hover:not(:disabled) {
22
+ background-color: #0056b3;
23
+ }
24
+
25
+ .pru-btn-secondary {
26
+ color: #fff;
27
+ background-color: #6c757d;
28
+ }
29
+
30
+ .pru-btn-secondary:hover:not(:disabled) {
31
+ background-color: #545b62;
32
+ }
33
+
34
+ .pru-btn-danger {
35
+ color: #fff;
36
+ background-color: #dc3545;
37
+ }
38
+
39
+ .pru-btn-danger:hover:not(:disabled) {
40
+ background-color: #c82333;
41
+ }
42
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"mappings":"AAAA;;;;;;;;;;AAUA;;;;;AAKA;;;;;AAKA;;;;AAIA;;;;;AAKA;;;;AAIA;;;;;AAKA","sources":["components/Button/Button.css"],"sourcesContent":[".pru-btn {\r\n padding: 10px 20px;\r\n border: none;\r\n border-radius: 6px;\r\n font-size: 16px;\r\n font-weight: 500;\r\n cursor: pointer;\r\n transition: background-color 0.2s ease;\r\n}\r\n\r\n.pru-btn:disabled {\r\n opacity: 0.6;\r\n cursor: not-allowed;\r\n}\r\n\r\n.pru-btn-primary {\r\n background-color: #007bff;\r\n color: white;\r\n}\r\n\r\n.pru-btn-primary:hover:not(:disabled) {\r\n background-color: #0056b3;\r\n}\r\n\r\n.pru-btn-secondary {\r\n background-color: #6c757d;\r\n color: white;\r\n}\r\n\r\n.pru-btn-secondary:hover:not(:disabled) {\r\n background-color: #545b62;\r\n}\r\n\r\n.pru-btn-danger {\r\n background-color: #dc3545;\r\n color: white;\r\n}\r\n\r\n.pru-btn-danger:hover:not(:disabled) {\r\n background-color: #c82333;\r\n}"],"names":[],"version":3,"file":"index.css.map"}
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export interface ButtonProps {
3
+ children: React.ReactNode;
4
+ onClick?: () => void;
5
+ variant?: 'primary' | 'secondary' | 'danger';
6
+ disabled?: boolean;
7
+ type?: 'button' | 'submit' | 'reset';
8
+ }
9
+ export const Button: React.FC<ButtonProps>;
10
+
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"mappings":";AAGA;IACE,QAAQ,EAAE,MAAM,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC;AAED,OAAO,MAAM,QAAQ,MAAM,EAAE,CAAC,WAAW,CAiBxC,CAAC","sources":["components/Button/Button.tsx","components/Button/index.ts","components/index.ts","index.ts"],"sourcesContent":["import React from 'react';\r\nimport './Button.css';\r\n\r\nexport interface ButtonProps {\r\n children: React.ReactNode; // Content to be displayed inside the button\r\n onClick?: () => void; // Function to be called when the button is clicked\r\n variant?: 'primary' | 'secondary' | 'danger'; // Style variant of the button\r\n disabled?: boolean; // Whether the button is disabled\r\n type?: 'button' | 'submit' | 'reset'; // Type of the button\r\n}\r\n\r\nexport const Button: React.FC<ButtonProps> = ({\r\n children,\r\n onClick,\r\n variant = 'primary',\r\n disabled = false,\r\n type = 'button',\r\n}) => {\r\n return (\r\n <button\r\n className={`pru-btn pru-btn-${variant}`}\r\n onClick={onClick}\r\n disabled={disabled}\r\n type={type}\r\n >\r\n {children}\r\n </button>\r\n );\r\n};","export { Button } from './Button';\r\nexport type { ButtonProps } from './Button';","export * from './Button';","export * from './components';"],"names":[],"version":3,"file":"index.d.ts.map"}
@@ -0,0 +1,42 @@
1
+ .pru-btn {
2
+ cursor: pointer;
3
+ border: none;
4
+ border-radius: 6px;
5
+ padding: 10px 20px;
6
+ font-size: 16px;
7
+ font-weight: 500;
8
+ transition: background-color .2s;
9
+ }
10
+
11
+ .pru-btn:disabled {
12
+ opacity: .6;
13
+ cursor: not-allowed;
14
+ }
15
+
16
+ .pru-btn-primary {
17
+ color: #fff;
18
+ background-color: #007bff;
19
+ }
20
+
21
+ .pru-btn-primary:hover:not(:disabled) {
22
+ background-color: #0056b3;
23
+ }
24
+
25
+ .pru-btn-secondary {
26
+ color: #fff;
27
+ background-color: #6c757d;
28
+ }
29
+
30
+ .pru-btn-secondary:hover:not(:disabled) {
31
+ background-color: #545b62;
32
+ }
33
+
34
+ .pru-btn-danger {
35
+ color: #fff;
36
+ background-color: #dc3545;
37
+ }
38
+
39
+ .pru-btn-danger:hover:not(:disabled) {
40
+ background-color: #c82333;
41
+ }
42
+ /*# sourceMappingURL=index.esm.css.map */
@@ -0,0 +1 @@
1
+ {"mappings":"AAAA;;;;;;;;;;AAUA;;;;;AAKA;;;;;AAKA;;;;AAIA;;;;;AAKA;;;;AAIA;;;;;AAKA","sources":["components/Button/Button.css"],"sourcesContent":[".pru-btn {\r\n padding: 10px 20px;\r\n border: none;\r\n border-radius: 6px;\r\n font-size: 16px;\r\n font-weight: 500;\r\n cursor: pointer;\r\n transition: background-color 0.2s ease;\r\n}\r\n\r\n.pru-btn:disabled {\r\n opacity: 0.6;\r\n cursor: not-allowed;\r\n}\r\n\r\n.pru-btn-primary {\r\n background-color: #007bff;\r\n color: white;\r\n}\r\n\r\n.pru-btn-primary:hover:not(:disabled) {\r\n background-color: #0056b3;\r\n}\r\n\r\n.pru-btn-secondary {\r\n background-color: #6c757d;\r\n color: white;\r\n}\r\n\r\n.pru-btn-secondary:hover:not(:disabled) {\r\n background-color: #545b62;\r\n}\r\n\r\n.pru-btn-danger {\r\n background-color: #dc3545;\r\n color: white;\r\n}\r\n\r\n.pru-btn-danger:hover:not(:disabled) {\r\n background-color: #c82333;\r\n}"],"names":[],"version":3,"file":"index.esm.css.map"}
@@ -0,0 +1,52 @@
1
+ import "./index.esm.css";
2
+ import {jsx as $hCgyA$jsx} from "react/jsx-runtime";
3
+ import "react";
4
+
5
+
6
+ function $parcel$exportWildcard(dest, source) {
7
+ Object.keys(source).forEach(function(key) {
8
+ if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {
9
+ return;
10
+ }
11
+
12
+ Object.defineProperty(dest, key, {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return source[key];
16
+ }
17
+ });
18
+ });
19
+
20
+ return dest;
21
+ }
22
+
23
+ function $parcel$export(e, n, v, s) {
24
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
25
+ }
26
+ var $09061bf36a328a3d$exports = {};
27
+ var $718c29e90f2592b1$exports = {};
28
+
29
+ $parcel$export($718c29e90f2592b1$exports, "Button", () => $3b676a50c78284a9$export$353f5b6fc5456de1);
30
+
31
+
32
+
33
+ const $3b676a50c78284a9$export$353f5b6fc5456de1 = ({ children: children, onClick: onClick, variant: variant = 'primary', disabled: disabled = false, type: type = 'button' })=>{
34
+ return /*#__PURE__*/ (0, $hCgyA$jsx)("button", {
35
+ className: `pru-btn pru-btn-${variant}`,
36
+ onClick: onClick,
37
+ disabled: disabled,
38
+ type: type,
39
+ children: children
40
+ });
41
+ };
42
+
43
+
44
+
45
+
46
+ $parcel$exportWildcard($09061bf36a328a3d$exports, $718c29e90f2592b1$exports);
47
+
48
+
49
+
50
+
51
+ export {$3b676a50c78284a9$export$353f5b6fc5456de1 as Button};
52
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGWO,MAAM,4CAAgC,CAAC,YAC5C,QAAQ,WACR,OAAO,WACP,UAAU,qBACV,WAAW,aACX,OAAO,UACR;IACC,qBACE,gBAAC;QACC,WAAW,CAAC,gBAAgB,EAAE,SAAS;QACvC,SAAS;QACT,UAAU;QACV,MAAM;kBAEL;;AAGP","sources":["index.ts","components/index.ts","components/Button/index.ts","components/Button/Button.tsx"],"sourcesContent":["export * from './components';","export * from './Button';","export { Button } from './Button';\r\nexport type { ButtonProps } from './Button';","import React from 'react';\r\nimport './Button.css';\r\n\r\nexport interface ButtonProps {\r\n children: React.ReactNode; // Content to be displayed inside the button\r\n onClick?: () => void; // Function to be called when the button is clicked\r\n variant?: 'primary' | 'secondary' | 'danger'; // Style variant of the button\r\n disabled?: boolean; // Whether the button is disabled\r\n type?: 'button' | 'submit' | 'reset'; // Type of the button\r\n}\r\n\r\nexport const Button: React.FC<ButtonProps> = ({\r\n children,\r\n onClick,\r\n variant = 'primary',\r\n disabled = false,\r\n type = 'button',\r\n}) => {\r\n return (\r\n <button\r\n className={`pru-btn pru-btn-${variant}`}\r\n onClick={onClick}\r\n disabled={disabled}\r\n type={type}\r\n >\r\n {children}\r\n </button>\r\n );\r\n};"],"names":[],"version":3,"file":"index.esm.js.map"}
package/dist/index.js ADDED
@@ -0,0 +1,52 @@
1
+ require("./index.css");
2
+ var $g5Y9E$reactjsxruntime = require("react/jsx-runtime");
3
+ require("react");
4
+
5
+
6
+ function $parcel$exportWildcard(dest, source) {
7
+ Object.keys(source).forEach(function(key) {
8
+ if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {
9
+ return;
10
+ }
11
+
12
+ Object.defineProperty(dest, key, {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return source[key];
16
+ }
17
+ });
18
+ });
19
+
20
+ return dest;
21
+ }
22
+
23
+ function $parcel$export(e, n, v, s) {
24
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
25
+ }
26
+ var $0bfc0d07c177cab5$exports = {};
27
+ var $792310cfcca9bf5b$exports = {};
28
+
29
+ $parcel$export($792310cfcca9bf5b$exports, "Button", () => $af8861f1a735d489$export$353f5b6fc5456de1);
30
+
31
+
32
+
33
+ const $af8861f1a735d489$export$353f5b6fc5456de1 = ({ children: children, onClick: onClick, variant: variant = 'primary', disabled: disabled = false, type: type = 'button' })=>{
34
+ return /*#__PURE__*/ (0, $g5Y9E$reactjsxruntime.jsx)("button", {
35
+ className: `pru-btn pru-btn-${variant}`,
36
+ onClick: onClick,
37
+ disabled: disabled,
38
+ type: type,
39
+ children: children
40
+ });
41
+ };
42
+
43
+
44
+
45
+
46
+ $parcel$exportWildcard($0bfc0d07c177cab5$exports, $792310cfcca9bf5b$exports);
47
+
48
+
49
+ $parcel$exportWildcard(module.exports, $0bfc0d07c177cab5$exports);
50
+
51
+
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGWO,MAAM,4CAAgC,CAAC,YAC5C,QAAQ,WACR,OAAO,WACP,UAAU,qBACV,WAAW,aACX,OAAO,UACR;IACC,qBACE,gCAAC;QACC,WAAW,CAAC,gBAAgB,EAAE,SAAS;QACvC,SAAS;QACT,UAAU;QACV,MAAM;kBAEL;;AAGP","sources":["index.ts","components/index.ts","components/Button/index.ts","components/Button/Button.tsx"],"sourcesContent":["export * from './components';","export * from './Button';","export { Button } from './Button';\r\nexport type { ButtonProps } from './Button';","import React from 'react';\r\nimport './Button.css';\r\n\r\nexport interface ButtonProps {\r\n children: React.ReactNode; // Content to be displayed inside the button\r\n onClick?: () => void; // Function to be called when the button is clicked\r\n variant?: 'primary' | 'secondary' | 'danger'; // Style variant of the button\r\n disabled?: boolean; // Whether the button is disabled\r\n type?: 'button' | 'submit' | 'reset'; // Type of the button\r\n}\r\n\r\nexport const Button: React.FC<ButtonProps> = ({\r\n children,\r\n onClick,\r\n variant = 'primary',\r\n disabled = false,\r\n type = 'button',\r\n}) => {\r\n return (\r\n <button\r\n className={`pru-btn pru-btn-${variant}`}\r\n onClick={onClick}\r\n disabled={disabled}\r\n type={type}\r\n >\r\n {children}\r\n </button>\r\n );\r\n};"],"names":[],"version":3,"file":"index.js.map"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "pure-react-ui",
3
+ "version": "1.0.0",
4
+ "description": "Pure React UI components with zero external dependencies – only React and plain CSS",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.esm.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "parcel build index.ts --no-cache",
13
+ "prepublishOnly": "npm run build"
14
+ },
15
+ "keywords": [
16
+ "react",
17
+ "ui",
18
+ "components",
19
+ "pure",
20
+ "vanilla",
21
+ "lightweight",
22
+ "no-deps"
23
+ ],
24
+ "author": "Your Name <your.email@example.com>",
25
+ "license": "MIT",
26
+ "devDependencies": {
27
+ "@parcel/packager-ts": "^2.16.3",
28
+ "@parcel/transformer-typescript-types": "^2.16.3",
29
+ "@types/react": "^19.2.7",
30
+ "@types/react-dom": "^19.2.3",
31
+ "parcel": "^2.16.3",
32
+ "typescript": "^5.9.3"
33
+ },
34
+ "dependencies": {
35
+ "react": "^19.2.3",
36
+ "react-dom": "^19.2.3"
37
+ }
38
+ }