@ereactthohir/rice-ui 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/README.md +292 -0
- package/dist/components/Accordion.d.ts +16 -0
- package/dist/components/Accordion.d.ts.map +1 -0
- package/dist/components/Accordion.js +74 -0
- package/dist/components/Accordion.js.map +1 -0
- package/dist/components/Alert.d.ts +12 -0
- package/dist/components/Alert.d.ts.map +1 -0
- package/dist/components/Alert.js +96 -0
- package/dist/components/Alert.js.map +1 -0
- package/dist/components/Badge.d.ts +10 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/Badge.js +35 -0
- package/dist/components/Badge.js.map +1 -0
- package/dist/components/Button.d.ts +9 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Button.js +29 -0
- package/dist/components/Button.js.map +1 -0
- package/dist/components/Card.d.ts +10 -0
- package/dist/components/Card.d.ts.map +1 -0
- package/dist/components/Card.js +17 -0
- package/dist/components/Card.js.map +1 -0
- package/dist/components/Dropdown.d.ts +18 -0
- package/dist/components/Dropdown.d.ts.map +1 -0
- package/dist/components/Dropdown.js +81 -0
- package/dist/components/Dropdown.js.map +1 -0
- package/dist/components/Input.d.ts +8 -0
- package/dist/components/Input.d.ts.map +1 -0
- package/dist/components/Input.js +56 -0
- package/dist/components/Input.js.map +1 -0
- package/dist/components/Layout.d.ts +9 -0
- package/dist/components/Layout.d.ts.map +1 -0
- package/dist/components/Layout.js +18 -0
- package/dist/components/Layout.js.map +1 -0
- package/dist/components/Modal.d.ts +11 -0
- package/dist/components/Modal.d.ts.map +1 -0
- package/dist/components/Modal.js +36 -0
- package/dist/components/Modal.js.map +1 -0
- package/dist/components/Progress.d.ts +14 -0
- package/dist/components/Progress.d.ts.map +1 -0
- package/dist/components/Progress.js +49 -0
- package/dist/components/Progress.js.map +1 -0
- package/dist/components/Skeleton.d.ts +9 -0
- package/dist/components/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton.js +22 -0
- package/dist/components/Skeleton.js.map +1 -0
- package/dist/components/Table.d.ts +13 -0
- package/dist/components/Table.d.ts.map +1 -0
- package/dist/components/Table.js +19 -0
- package/dist/components/Table.js.map +1 -0
- package/dist/components/Tabs.d.ts +17 -0
- package/dist/components/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs.js +91 -0
- package/dist/components/Tabs.js.map +1 -0
- package/dist/components/Toast.d.ts +9 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/Toast.js +60 -0
- package/dist/components/Toast.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/index.d.ts +8 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/styles/index.js +52 -0
- package/dist/styles/index.js.map +1 -0
- package/package.json +26 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Toast = void 0;
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
38
|
+
const Toast = ({ message, type = 'info', duration = 3000, onClose }) => {
|
|
39
|
+
const [visible, setVisible] = (0, react_1.useState)(true);
|
|
40
|
+
(0, react_1.useEffect)(() => {
|
|
41
|
+
const timer = setTimeout(() => {
|
|
42
|
+
setVisible(false);
|
|
43
|
+
if (onClose)
|
|
44
|
+
onClose();
|
|
45
|
+
}, duration);
|
|
46
|
+
return () => clearTimeout(timer);
|
|
47
|
+
}, [duration, onClose]);
|
|
48
|
+
if (!visible)
|
|
49
|
+
return null;
|
|
50
|
+
const types = {
|
|
51
|
+
success: 'bg-green-50 text-green-800 border-green-200',
|
|
52
|
+
error: 'bg-rose-50 text-rose-800 border-rose-200',
|
|
53
|
+
info: 'bg-blue-50 text-blue-800 border-blue-200',
|
|
54
|
+
warning: 'bg-yellow-50 text-yellow-800 border-yellow-200'
|
|
55
|
+
};
|
|
56
|
+
return (react_1.default.createElement("div", { className: `fixed bottom-4 right-4 z-50 flex items-center px-4 py-3 border rounded-lg shadow-lg max-w-sm w-full transition-all transform ${types[type]}` },
|
|
57
|
+
react_1.default.createElement("p", { className: "text-sm font-medium" }, message)));
|
|
58
|
+
};
|
|
59
|
+
exports.Toast = Toast;
|
|
60
|
+
//# sourceMappingURL=Toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.js","sourceRoot":"","sources":["../../src/components/Toast.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAmD;AAS5C,MAAM,KAAK,GAAyB,CAAC,EACxC,OAAO,EACP,IAAI,GAAG,MAAM,EACb,QAAQ,GAAG,IAAI,EACf,OAAO,EACV,EAAE,EAAE;IACD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IAE7C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YAC1B,UAAU,CAAC,KAAK,CAAC,CAAC;YAClB,IAAI,OAAO;gBAAE,OAAO,EAAE,CAAC;QAC3B,CAAC,EAAE,QAAQ,CAAC,CAAC;QAEb,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IAExB,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,MAAM,KAAK,GAAG;QACV,OAAO,EAAE,6CAA6C;QACtD,KAAK,EAAE,0CAA0C;QACjD,IAAI,EAAE,0CAA0C;QAChD,OAAO,EAAE,gDAAgD;KAC5D,CAAC;IAEF,OAAO,CACH,uCAAK,SAAS,EAAE,gIAAgI,KAAK,CAAC,IAAI,CAAC,EAAE;QACzJ,qCAAG,SAAS,EAAC,qBAAqB,IAAE,OAAO,CAAK,CAC9C,CACT,CAAC;AACN,CAAC,CAAC;AA/BW,QAAA,KAAK,SA+BhB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './components/Button';
|
|
2
|
+
export * from './components/Input';
|
|
3
|
+
export * from './components/Card';
|
|
4
|
+
export * from './components/Modal';
|
|
5
|
+
export * from './components/Toast';
|
|
6
|
+
export * from './components/Table';
|
|
7
|
+
export * from './components/Layout';
|
|
8
|
+
export * from './components/Badge';
|
|
9
|
+
export * from './components/Skeleton';
|
|
10
|
+
export * from './components/Dropdown';
|
|
11
|
+
export * from './components/Tabs';
|
|
12
|
+
export * from './components/Accordion';
|
|
13
|
+
export * from './components/Alert';
|
|
14
|
+
export * from './components/Progress';
|
|
15
|
+
export * from './styles';
|
|
16
|
+
export declare const VERSION = "0.0.1";
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,UAAU,CAAC;AAEzB,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.VERSION = void 0;
|
|
18
|
+
__exportStar(require("./components/Button"), exports);
|
|
19
|
+
__exportStar(require("./components/Input"), exports);
|
|
20
|
+
__exportStar(require("./components/Card"), exports);
|
|
21
|
+
__exportStar(require("./components/Modal"), exports);
|
|
22
|
+
__exportStar(require("./components/Toast"), exports);
|
|
23
|
+
__exportStar(require("./components/Table"), exports);
|
|
24
|
+
__exportStar(require("./components/Layout"), exports);
|
|
25
|
+
__exportStar(require("./components/Badge"), exports);
|
|
26
|
+
__exportStar(require("./components/Skeleton"), exports);
|
|
27
|
+
__exportStar(require("./components/Dropdown"), exports);
|
|
28
|
+
__exportStar(require("./components/Tabs"), exports);
|
|
29
|
+
__exportStar(require("./components/Accordion"), exports);
|
|
30
|
+
__exportStar(require("./components/Alert"), exports);
|
|
31
|
+
__exportStar(require("./components/Progress"), exports);
|
|
32
|
+
// Export Rice UI Styles
|
|
33
|
+
__exportStar(require("./styles"), exports);
|
|
34
|
+
exports.VERSION = '0.0.1';
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,qDAAmC;AACnC,oDAAkC;AAClC,qDAAmC;AACnC,qDAAmC;AACnC,qDAAmC;AACnC,sDAAoC;AACpC,qDAAmC;AACnC,wDAAsC;AACtC,wDAAsC;AACtC,oDAAkC;AAClC,yDAAuC;AACvC,qDAAmC;AACnC,wDAAsC;AAEtC,wBAAwB;AACxB,2CAAyB;AAEZ,QAAA,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,eAAO,MAAM,OAAO,QAAoC,CAAC;AAGzD,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Rice UI Styles
|
|
4
|
+
* Export CSS as string for injection
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.riceCSS = void 0;
|
|
41
|
+
exports.injectRiceStyles = injectRiceStyles;
|
|
42
|
+
const fs = __importStar(require("fs"));
|
|
43
|
+
const path = __importStar(require("path"));
|
|
44
|
+
// Read the CSS file
|
|
45
|
+
const cssPath = path.join(__dirname, 'rice.css');
|
|
46
|
+
exports.riceCSS = fs.readFileSync(cssPath, 'utf-8');
|
|
47
|
+
// Function to inject Rice UI styles
|
|
48
|
+
function injectRiceStyles() {
|
|
49
|
+
return `<style id="rice-ui-styles">${exports.riceCSS}</style>`;
|
|
50
|
+
}
|
|
51
|
+
exports.default = exports.riceCSS;
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/styles/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUH,4CAEC;AAVD,uCAAyB;AACzB,2CAA6B;AAE7B,oBAAoB;AACpB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AACpC,QAAA,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAEzD,oCAAoC;AACpC,SAAgB,gBAAgB;IAC5B,OAAO,8BAA8B,eAAO,UAAU,CAAC;AAC3D,CAAC;AAED,kBAAe,eAAO,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ereactthohir/rice-ui",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Beautiful React UI components library with 15+ professional components",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc"
|
|
16
|
+
},
|
|
17
|
+
"author": "KangPCode (Dhafa Nazula Permadi)",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"react": "^18.0.0",
|
|
21
|
+
"tailwindcss": "^3.0.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"typescript": "^5.0.0"
|
|
25
|
+
}
|
|
26
|
+
}
|