naria-ui 0.1.5 → 0.1.6
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/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/naria.iml +12 -0
- package/.idea/vcs.xml +6 -0
- package/dist/index.js +31 -0
- package/package.json +20 -47
- package/src/index.js +17 -0
package/.idea/naria.iml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
+
</content>
|
|
9
|
+
<orderEntry type="inheritedJdk" />
|
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
+
</component>
|
|
12
|
+
</module>
|
package/.idea/vcs.xml
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
10
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
11
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
16
|
+
var Button = function Button() {
|
|
17
|
+
var _useState = (0, _react.useState)('blue'),
|
|
18
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
+
color = _useState2[0],
|
|
20
|
+
setColor = _useState2[1];
|
|
21
|
+
var changeColor = function changeColor() {
|
|
22
|
+
setColor(color === 'blue' ? 'red' : 'blue');
|
|
23
|
+
};
|
|
24
|
+
return /*#__PURE__*/_react["default"].createElement("button", {
|
|
25
|
+
style: {
|
|
26
|
+
backgroundColor: color
|
|
27
|
+
},
|
|
28
|
+
onClick: changeColor
|
|
29
|
+
}, "Click me");
|
|
30
|
+
};
|
|
31
|
+
var _default = exports["default"] = Button;
|
package/package.json
CHANGED
|
@@ -1,58 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "naria-ui",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"description": "This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "babel src --out-dir dist"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/mohammad-mehdi-mohammadi/naria-ui.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [],
|
|
5
14
|
"author": "",
|
|
6
15
|
"license": "ISC",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
],
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
14
|
-
"default": "./dist/index.js"
|
|
15
|
-
}
|
|
16
|
+
"type": "commonjs",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/mohammad-mehdi-mohammadi/naria-ui/issues"
|
|
16
19
|
},
|
|
20
|
+
"homepage": "https://github.com/mohammad-mehdi-mohammadi/naria-ui#readme",
|
|
17
21
|
"dependencies": {
|
|
18
|
-
"@testing-library/dom": "^10.4.1",
|
|
19
|
-
"@testing-library/jest-dom": "^6.9.1",
|
|
20
|
-
"@testing-library/react": "^16.3.0",
|
|
21
|
-
"@testing-library/user-event": "^13.5.0",
|
|
22
|
-
"@types/jest": "^27.5.2",
|
|
23
|
-
"@types/node": "^16.18.126",
|
|
24
|
-
"@types/react": "^19.2.2",
|
|
25
|
-
"@types/react-dom": "^19.2.2",
|
|
26
22
|
"react": "^19.2.0",
|
|
27
|
-
"react-dom": "^19.2.0"
|
|
28
|
-
"react-scripts": "5.0.1",
|
|
29
|
-
"typescript": "^4.9.5",
|
|
30
|
-
"web-vitals": "^2.1.4"
|
|
31
|
-
},
|
|
32
|
-
"scripts": {
|
|
33
|
-
"start": "react-scripts start",
|
|
34
|
-
"build": "react-scripts build",
|
|
35
|
-
"test": "react-scripts test",
|
|
36
|
-
"eject": "react-scripts eject"
|
|
37
|
-
},
|
|
38
|
-
"eslintConfig": {
|
|
39
|
-
"extends": [
|
|
40
|
-
"react-app",
|
|
41
|
-
"react-app/jest"
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
|
-
"browserslist": {
|
|
45
|
-
"production": [
|
|
46
|
-
">0.2%",
|
|
47
|
-
"not dead",
|
|
48
|
-
"not op_mini all"
|
|
49
|
-
],
|
|
50
|
-
"development": [
|
|
51
|
-
"last 1 chrome version",
|
|
52
|
-
"last 1 firefox version",
|
|
53
|
-
"last 1 safari version"
|
|
54
|
-
]
|
|
23
|
+
"react-dom": "^19.2.0"
|
|
55
24
|
},
|
|
56
25
|
"devDependencies": {
|
|
26
|
+
"@babel/cli": "^7.28.3",
|
|
27
|
+
"@babel/core": "^7.28.4",
|
|
28
|
+
"@babel/preset-env": "^7.28.3",
|
|
29
|
+
"@babel/preset-react": "^7.27.1"
|
|
57
30
|
}
|
|
58
31
|
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
const Button = () => {
|
|
4
|
+
const [color, setColor] = useState('blue');
|
|
5
|
+
|
|
6
|
+
const changeColor = () => {
|
|
7
|
+
setColor(color === 'blue' ? 'red' : 'blue');
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<button style={{ backgroundColor: color }} onClick={changeColor}>
|
|
12
|
+
Click me
|
|
13
|
+
</button>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default Button;
|