citrica-ui-toolkit 0.0.1 → 0.0.2

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 @@
1
+ # CITRICA UI TOOLKIT
@@ -0,0 +1,11 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
+ variant?: 'primary' | 'secondary' | 'outline' | 'ghost';
6
+ size?: 'sm' | 'md' | 'lg';
7
+ children: React.ReactNode;
8
+ }
9
+ declare const Button: ({ variant, size, children, className, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
10
+
11
+ export { Button, type ButtonProps };
@@ -0,0 +1,11 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
+ variant?: 'primary' | 'secondary' | 'outline' | 'ghost';
6
+ size?: 'sm' | 'md' | 'lg';
7
+ children: React.ReactNode;
8
+ }
9
+ declare const Button: ({ variant, size, children, className, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
10
+
11
+ export { Button, type ButtonProps };
package/dist/index.js ADDED
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ Button: () => Button
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+
27
+ // src/components/atoms/Button/Button.tsx
28
+ var import_jsx_runtime = require("react/jsx-runtime");
29
+ var Button = ({
30
+ variant = "primary",
31
+ size = "md",
32
+ children,
33
+ className = "",
34
+ ...props
35
+ }) => {
36
+ const baseClasses = "inline-flex items-center justify-center rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none";
37
+ const variantClasses = {
38
+ primary: "bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500",
39
+ secondary: "bg-gray-600 text-white hover:bg-gray-700 focus:ring-gray-500",
40
+ outline: "border border-gray-300 bg-white text-gray-700 hover:bg-gray-50 focus:ring-blue-500",
41
+ ghost: "text-gray-700 hover:bg-gray-100 focus:ring-gray-500"
42
+ };
43
+ const sizeClasses = {
44
+ sm: "h-8 px-3 text-sm",
45
+ md: "h-10 px-4 text-base",
46
+ lg: "h-12 px-6 text-lg"
47
+ };
48
+ const classes = `${baseClasses} ${variantClasses[variant]} ${sizeClasses[size]} ${className}`;
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: classes, ...props, children });
50
+ };
51
+ // Annotate the CommonJS export names for ESM import in node:
52
+ 0 && (module.exports = {
53
+ Button
54
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,27 @@
1
+ // src/components/atoms/Button/Button.tsx
2
+ import { jsx } from "react/jsx-runtime";
3
+ var Button = ({
4
+ variant = "primary",
5
+ size = "md",
6
+ children,
7
+ className = "",
8
+ ...props
9
+ }) => {
10
+ const baseClasses = "inline-flex items-center justify-center rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none";
11
+ const variantClasses = {
12
+ primary: "bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500",
13
+ secondary: "bg-gray-600 text-white hover:bg-gray-700 focus:ring-gray-500",
14
+ outline: "border border-gray-300 bg-white text-gray-700 hover:bg-gray-50 focus:ring-blue-500",
15
+ ghost: "text-gray-700 hover:bg-gray-100 focus:ring-gray-500"
16
+ };
17
+ const sizeClasses = {
18
+ sm: "h-8 px-3 text-sm",
19
+ md: "h-10 px-4 text-base",
20
+ lg: "h-12 px-6 text-lg"
21
+ };
22
+ const classes = `${baseClasses} ${variantClasses[variant]} ${sizeClasses[size]} ${className}`;
23
+ return /* @__PURE__ */ jsx("button", { className: classes, ...props, children });
24
+ };
25
+ export {
26
+ Button
27
+ };
package/package.json CHANGED
@@ -1,14 +1,31 @@
1
1
  {
2
2
  "name": "citrica-ui-toolkit",
3
- "version": "0.0.1",
4
- "main": "dist-node/index.js",
5
- "browser": "dist-browser/index.js",
3
+ "version": "0.0.2",
4
+ "main": "dist/index.js",
5
+ "module": "dist/index.mjs",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
6
17
  "scripts": {
7
- "build-browser": "tsc src/index.ts --outDir dist-browser --module ES6",
8
- "build-node": "tsc src/index.ts --outDir dist-node",
9
- "build": "npm run build-browser && npm run build-node"
18
+ "build": "tsup src/index.ts --format cjs,esm --dts",
19
+ "dev": "tsup src/index.ts --format cjs,esm --dts --watch"
20
+ },
21
+ "peerDependencies": {
22
+ "react": ">=17.0.0",
23
+ "@types/react": ">=17.0.0"
10
24
  },
11
25
  "devDependencies": {
26
+ "@types/react": "^17.0.21",
27
+ "react": "^18.0.0",
28
+ "tsup": "^8.5.1",
12
29
  "typescript": "5.9.3"
13
30
  }
14
31
  }
@@ -1,27 +0,0 @@
1
- /**
2
- *
3
- * @param a number
4
- * @param b number
5
- * @returns sum of a and b
6
- */
7
- export var add = function (a, b) {
8
- return a + b;
9
- };
10
- /**
11
- *
12
- * @param a number
13
- * @param b number
14
- * @returns difference of a and b
15
- */
16
- export var subtract = function (a, b) {
17
- return a - b;
18
- };
19
- /**
20
- *
21
- * @param a number
22
- * @param b number
23
- * @returns product of a and b
24
- */
25
- export var multiply = function (a, b) {
26
- return a * b;
27
- };
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.multiply = exports.subtract = exports.add = void 0;
4
- /**
5
- *
6
- * @param a number
7
- * @param b number
8
- * @returns sum of a and b
9
- */
10
- var add = function (a, b) {
11
- return a + b;
12
- };
13
- exports.add = add;
14
- /**
15
- *
16
- * @param a number
17
- * @param b number
18
- * @returns difference of a and b
19
- */
20
- var subtract = function (a, b) {
21
- return a - b;
22
- };
23
- exports.subtract = subtract;
24
- /**
25
- *
26
- * @param a number
27
- * @param b number
28
- * @returns product of a and b
29
- */
30
- var multiply = function (a, b) {
31
- return a * b;
32
- };
33
- exports.multiply = multiply;
package/src/index.ts DELETED
@@ -1,29 +0,0 @@
1
- /**
2
- *
3
- * @param a number
4
- * @param b number
5
- * @returns sum of a and b
6
- */
7
- export const add = (a: number, b: number): number => {
8
- return a + b;
9
- };
10
-
11
- /**
12
- *
13
- * @param a number
14
- * @param b number
15
- * @returns difference of a and b
16
- */
17
- export const subtract = (a: number, b: number): number => {
18
- return a - b;
19
- };
20
-
21
- /**
22
- *
23
- * @param a number
24
- * @param b number
25
- * @returns product of a and b
26
- */
27
- export const multiply = (a: number, b: number): number => {
28
- return a * b;
29
- };