@nethru/kit 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/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # <center>Nethru Kit</center>
2
+ * * *
3
+ Nethru Kit is a React component library by Nethru.
4
+
5
+
6
+ ### Installation
7
+ * * *
8
+ Install the package in your project directory with:
9
+ ```
10
+ npm install @nethru/kit
11
+ ```
12
+
13
+
14
+
15
+ ### Documentation
16
+ * * *
17
+ Visit [document](https://nethru.atlassian.net/wiki/spaces/UIUX/overview) to view the full documentation.
18
+
19
+
20
+ ### Examples
21
+ * * *
22
+ Visit [examples](https://nethru.atlassian.net/wiki/spaces/UIUX/pages/916422813/UI) to view several examples.
23
+
24
+
25
+ ### Changelog
26
+ * * *
27
+ The [changelog](https://nethru.atlassian.net/wiki/spaces/combuff/overview) is regularly updated to reflect what's changed in each new release.
28
+
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+
3
+ const Button = ({
4
+ children,
5
+ onClick,
6
+ variant = 'primary',
7
+ disabled = false
8
+ }) => {
9
+ const baseStyles = {
10
+ padding: '10px 20px',
11
+ fontSize: '16px',
12
+ border: 'none',
13
+ borderRadius: '4px',
14
+ cursor: disabled ? 'not-allowed' : 'pointer',
15
+ opacity: disabled ? 0.6 : 1,
16
+ transition: 'all 0.2s ease'
17
+ };
18
+ const variantStyles = {
19
+ primary: {
20
+ backgroundColor: '#007bff',
21
+ color: 'white'
22
+ },
23
+ secondary: {
24
+ backgroundColor: '#6c757d',
25
+ color: 'white'
26
+ }
27
+ };
28
+ return /*#__PURE__*/React.createElement("button", {
29
+ onClick: onClick,
30
+ disabled: disabled,
31
+ style: {
32
+ ...baseStyles,
33
+ ...variantStyles[variant]
34
+ }
35
+ }, children);
36
+ };
37
+
38
+ export { Button };
package/dist/index.js ADDED
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+
5
+ const Button = ({
6
+ children,
7
+ onClick,
8
+ variant = 'primary',
9
+ disabled = false
10
+ }) => {
11
+ const baseStyles = {
12
+ padding: '10px 20px',
13
+ fontSize: '16px',
14
+ border: 'none',
15
+ borderRadius: '4px',
16
+ cursor: disabled ? 'not-allowed' : 'pointer',
17
+ opacity: disabled ? 0.6 : 1,
18
+ transition: 'all 0.2s ease'
19
+ };
20
+ const variantStyles = {
21
+ primary: {
22
+ backgroundColor: '#007bff',
23
+ color: 'white'
24
+ },
25
+ secondary: {
26
+ backgroundColor: '#6c757d',
27
+ color: 'white'
28
+ }
29
+ };
30
+ return /*#__PURE__*/React.createElement("button", {
31
+ onClick: onClick,
32
+ disabled: disabled,
33
+ style: {
34
+ ...baseStyles,
35
+ ...variantStyles[variant]
36
+ }
37
+ }, children);
38
+ };
39
+
40
+ exports.Button = Button;
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@nethru/kit",
3
+ "version": "1.0.0",
4
+ "description": "A React component library by Nethru",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.esm.js",
8
+ "exports": {
9
+ ".": {
10
+ "require": "./dist/index.js",
11
+ "import": "./dist/index.esm.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "scripts": {
18
+ "dev": "vite",
19
+ "build": "rollup -c",
20
+ "prepublishOnly": "npm run build"
21
+ },
22
+ "keywords": [
23
+ "react",
24
+ "components",
25
+ "ui",
26
+ "nethru"
27
+ ],
28
+ "author": "Nethru",
29
+ "license": "MIT",
30
+ "peerDependencies": {
31
+ "react": "^18.0.0",
32
+ "react-dom": "^18.0.0"
33
+ },
34
+ "devDependencies": {
35
+ "@babel/core": "^7.23.0",
36
+ "@babel/preset-react": "^7.23.0",
37
+ "@rollup/plugin-babel": "^6.0.4",
38
+ "@rollup/plugin-node-resolve": "^15.2.3",
39
+ "@vitejs/plugin-react": "^5.1.1",
40
+ "react": "^18.2.0",
41
+ "react-dom": "^18.2.0",
42
+ "rollup": "^4.0.0",
43
+ "vite": "^7.2.6"
44
+ }
45
+ }