giorgi-gogua-library 0.1.0 → 0.2.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.
@@ -0,0 +1,8 @@
1
+ import "./style.css";
2
+ import React, { ButtonHTMLAttributes } from "react";
3
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
+ variant?: "primary" | "danger" | "warning" | "dark" | "light" | "success";
5
+ size?: "sm" | "md" | "lg";
6
+ }
7
+ declare const Button: React.FC<ButtonProps>;
8
+ export default Button;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Button";
2
+ export * from "./Button";
package/dist/index.css ADDED
@@ -0,0 +1,57 @@
1
+ .primary {
2
+ color: white;
3
+ background-color: rgb(46, 149, 209);
4
+ border: none;
5
+ border-radius: 5px;
6
+ }
7
+ .success {
8
+ color: white;
9
+ background-color: rgb(77, 177, 77);
10
+ border: none;
11
+ border-radius: 5px;
12
+ }
13
+
14
+ .danger {
15
+ color: white;
16
+ background-color: red;
17
+ border: none;
18
+ border-radius: 5px;
19
+ }
20
+
21
+ .dark {
22
+ color: white;
23
+ background-color: black;
24
+ border: none;
25
+ border-radius: 5px;
26
+ }
27
+
28
+ .warning {
29
+ color: black;
30
+ background-color: orange;
31
+ border: none;
32
+ border-radius: 5px;
33
+ }
34
+
35
+ .light {
36
+ color: black;
37
+ background-color: light;
38
+ border: none;
39
+ border-radius: 5px;
40
+ }
41
+
42
+ .sm {
43
+ width: 5rem;
44
+ height: 2.5rem;
45
+ }
46
+
47
+ .md {
48
+ width: 7rem;
49
+ height: 3rem;
50
+ }
51
+
52
+ .lg {
53
+ width: 9rem;
54
+ height: 3.5rem;
55
+ }
56
+
57
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["style.css"],"names":[],"mappings":"AAAA;EACE,YAAY;EACZ,mCAAmC;EACnC,YAAY;EACZ,kBAAkB;AACpB;AACA;EACE,YAAY;EACZ,kCAAkC;EAClC,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,YAAY;EACZ,qBAAqB;EACrB,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,YAAY;EACZ,uBAAuB;EACvB,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,YAAY;EACZ,wBAAwB;EACxB,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,YAAY;EACZ,uBAAuB;EACvB,YAAY;EACZ,kBAAkB;AACpB;;AAEA;EACE,WAAW;EACX,cAAc;AAChB;;AAEA;EACE,WAAW;EACX,YAAY;AACd;;AAEA;EACE,WAAW;EACX,cAAc;AAChB","file":"index.css","sourcesContent":[".primary {\r\n color: white;\r\n background-color: rgb(46, 149, 209);\r\n border: none;\r\n border-radius: 5px;\r\n}\r\n.success {\r\n color: white;\r\n background-color: rgb(77, 177, 77);\r\n border: none;\r\n border-radius: 5px;\r\n}\r\n\r\n.danger {\r\n color: white;\r\n background-color: red;\r\n border: none;\r\n border-radius: 5px;\r\n}\r\n\r\n.dark {\r\n color: white;\r\n background-color: black;\r\n border: none;\r\n border-radius: 5px;\r\n}\r\n\r\n.warning {\r\n color: black;\r\n background-color: orange;\r\n border: none;\r\n border-radius: 5px;\r\n}\r\n\r\n.light {\r\n color: black;\r\n background-color: light;\r\n border: none;\r\n border-radius: 5px;\r\n}\r\n\r\n.sm {\r\n width: 5rem;\r\n height: 2.5rem;\r\n}\r\n\r\n.md {\r\n width: 7rem;\r\n height: 3rem;\r\n}\r\n\r\n.lg {\r\n width: 9rem;\r\n height: 3.5rem;\r\n}\r\n"]}
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export { default as Button } from "./components/Button";
package/dist/index.js CHANGED
@@ -1,2 +1,40 @@
1
+ var jsxRuntime = require('react/jsx-runtime');
1
2
 
3
+ function _extends() {
4
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
5
+ for (var e = 1; e < arguments.length; e++) {
6
+ var t = arguments[e];
7
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
8
+ }
9
+ return n;
10
+ }, _extends.apply(null, arguments);
11
+ }
12
+ function _objectWithoutPropertiesLoose(r, e) {
13
+ if (null == r) return {};
14
+ var t = {};
15
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
16
+ if (-1 !== e.indexOf(n)) continue;
17
+ t[n] = r[n];
18
+ }
19
+ return t;
20
+ }
21
+
22
+ var _excluded = ["variant", "size", "children"];
23
+ var Button = function Button(_ref) {
24
+ var variant = _ref.variant,
25
+ size = _ref.size,
26
+ children = _ref.children,
27
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
28
+ var className = "button " + variant + " " + size + " " + (props.className || "");
29
+ return jsxRuntime.jsx("div", {
30
+ children: jsxRuntime.jsx("button", _extends({
31
+ type: "button",
32
+ className: className
33
+ }, props, {
34
+ children: children
35
+ }))
36
+ });
37
+ };
38
+
39
+ exports.Button = Button;
2
40
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sources":["../src/components/Button/Button.tsx"],"sourcesContent":["import \"./style.css\";\r\n\r\nimport React, { ButtonHTMLAttributes } from \"react\";\r\n\r\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\r\n variant?: \"primary\" | \"danger\" | \"warning\" | \"dark\" | \"light\" | \"success\";\r\n size?: \"sm\" | \"md\" | \"lg\";\r\n}\r\n\r\nconst Button: React.FC<ButtonProps> = ({\r\n variant,\r\n size,\r\n children,\r\n ...props\r\n}: ButtonProps) => {\r\n const className = `button ${variant} ${size} ${props.className || \"\"}`;\r\n return (\r\n <div>\r\n <button type=\"button\" className={className} {...props}>\r\n {children}\r\n </button>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Button;\r\n"],"names":["Button","_ref","variant","size","children","props","_objectWithoutPropertiesLoose","_excluded","className","_jsx","_extends","type"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,MAAM,GAA0B,SAAhCA,MAAMA,CAAAC,IAAA,EAKM;AAAA,EAAA,IAJhBC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;AACLC,IAAAA,KAAK,GAAAC,6BAAA,CAAAL,IAAA,EAAAM,SAAA,CAAA,CAAA;EAER,IAAMC,SAAS,GAAaN,SAAAA,GAAAA,OAAO,GAAIC,GAAAA,GAAAA,IAAI,GAAIE,GAAAA,IAAAA,KAAK,CAACG,SAAS,IAAI,EAAE,CAAE,CAAA;EACtE,OACEC,cACE,CAAA,KAAA,EAAA;AAAAL,IAAAA,QAAA,EAAAK,cAAA,CAAA,QAAA,EAAAC,QAAA,CAAA;AAAQC,MAAAA,IAAI,EAAC,QAAQ;AAACH,MAAAA,SAAS,EAAEA,SAAAA;AAAS,KAAA,EAAMH,KAAK,EAAA;AAAAD,MAAAA,QAAA,EAClDA,QAAAA;KACM,CAAA,CAAA;AAAA,GAAA,CACL,CAAA;AAEV;;;;"}
package/dist/index.mjs CHANGED
@@ -1,2 +1,40 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
 
3
+ function _extends() {
4
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
5
+ for (var e = 1; e < arguments.length; e++) {
6
+ var t = arguments[e];
7
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
8
+ }
9
+ return n;
10
+ }, _extends.apply(null, arguments);
11
+ }
12
+ function _objectWithoutPropertiesLoose(r, e) {
13
+ if (null == r) return {};
14
+ var t = {};
15
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
16
+ if (-1 !== e.indexOf(n)) continue;
17
+ t[n] = r[n];
18
+ }
19
+ return t;
20
+ }
21
+
22
+ var _excluded = ["variant", "size", "children"];
23
+ var Button = function Button(_ref) {
24
+ var variant = _ref.variant,
25
+ size = _ref.size,
26
+ children = _ref.children,
27
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
28
+ var className = "button " + variant + " " + size + " " + (props.className || "");
29
+ return jsx("div", {
30
+ children: jsx("button", _extends({
31
+ type: "button",
32
+ className: className
33
+ }, props, {
34
+ children: children
35
+ }))
36
+ });
37
+ };
38
+
39
+ export { Button };
2
40
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.mjs","sources":["../src/components/Button/Button.tsx"],"sourcesContent":["import \"./style.css\";\r\n\r\nimport React, { ButtonHTMLAttributes } from \"react\";\r\n\r\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\r\n variant?: \"primary\" | \"danger\" | \"warning\" | \"dark\" | \"light\" | \"success\";\r\n size?: \"sm\" | \"md\" | \"lg\";\r\n}\r\n\r\nconst Button: React.FC<ButtonProps> = ({\r\n variant,\r\n size,\r\n children,\r\n ...props\r\n}: ButtonProps) => {\r\n const className = `button ${variant} ${size} ${props.className || \"\"}`;\r\n return (\r\n <div>\r\n <button type=\"button\" className={className} {...props}>\r\n {children}\r\n </button>\r\n </div>\r\n );\r\n};\r\n\r\nexport default Button;\r\n"],"names":["Button","_ref","variant","size","children","props","_objectWithoutPropertiesLoose","_excluded","className","_jsx","_extends","type"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,MAAM,GAA0B,SAAhCA,MAAMA,CAAAC,IAAA,EAKM;AAAA,EAAA,IAJhBC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;AACLC,IAAAA,KAAK,GAAAC,6BAAA,CAAAL,IAAA,EAAAM,SAAA,CAAA,CAAA;EAER,IAAMC,SAAS,GAAaN,SAAAA,GAAAA,OAAO,GAAIC,GAAAA,GAAAA,IAAI,GAAIE,GAAAA,IAAAA,KAAK,CAACG,SAAS,IAAI,EAAE,CAAE,CAAA;EACtE,OACEC,GACE,CAAA,KAAA,EAAA;AAAAL,IAAAA,QAAA,EAAAK,GAAA,CAAA,QAAA,EAAAC,QAAA,CAAA;AAAQC,MAAAA,IAAI,EAAC,QAAQ;AAACH,MAAAA,SAAS,EAAEA,SAAAA;AAAS,KAAA,EAAMH,KAAK,EAAA;AAAAD,MAAAA,QAAA,EAClDA,QAAAA;KACM,CAAA,CAAA;AAAA,GAAA,CACL,CAAA;AAEV;;;;"}
package/package.json CHANGED
@@ -1,28 +1,46 @@
1
1
  {
2
2
  "name": "giorgi-gogua-library",
3
- "version": "0.1.0",
4
- "description": "My first React TypeScript library",
3
+ "version": "0.2.0",
4
+ "description": "Professional React TypeScript library",
5
5
  "source": "src/index.ts",
6
- "main": "dist/index.js",
7
- "module": "dist/index.mjs",
8
- "types": "dist/index.d.ts",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
9
+ "style": "./dist/index.css",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.mjs",
14
+ "require": "./dist/index.js"
15
+ },
16
+ "./dist/index.css": "./dist/index.css"
17
+ },
9
18
  "files": [
10
19
  "dist"
11
20
  ],
12
21
  "scripts": {
13
- "build": "microbundle",
14
- "dev": "microbundle watch"
22
+ "clean": "rimraf dist",
23
+ "prebuild": "npm run clean",
24
+ "build": "microbundle --jsx-import-source react --no-compress --format modern,esm,cjs --css-bundle index.css",
25
+ "dev": "microbundle watch --jsx-import-source react --format modern,esm,cjs"
15
26
  },
16
27
  "peerDependencies": {
17
- "react": ">=16.8.0",
18
- "react-dom": ">=16.8.0"
28
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
29
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
19
30
  },
20
31
  "devDependencies": {
21
- "react": "^19.2.3",
22
- "react-dom": "^19.2.3",
23
- "@types/react": "^19.2.9",
24
- "@types/react-dom": "^19.2.3",
32
+ "@types/react": "^19.0.0",
33
+ "@types/react-dom": "^19.0.0",
25
34
  "microbundle": "^0.15.1",
26
- "typescript": "^5.9.3"
35
+ "react": "^19.0.0",
36
+ "react-dom": "^19.0.0",
37
+ "rimraf": "^5.0.10",
38
+ "typescript": "^5.7.0"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "engines": {
44
+ "node": ">=16"
27
45
  }
28
46
  }
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=index.modern.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.modern.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.umd.js DELETED
@@ -1,2 +0,0 @@
1
- "function"==typeof define&&define.amd&&define(function(){});
2
- //# sourceMappingURL=index.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}