baaz-custom-components 1.0.1
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 +36 -0
- package/dist/index.d.mts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +60 -0
- package/dist/index.mjs +33 -0
- package/package.json +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
|
2
|
+
|
|
3
|
+
## Getting Started
|
|
4
|
+
|
|
5
|
+
First, run the development server:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm run dev
|
|
9
|
+
# or
|
|
10
|
+
yarn dev
|
|
11
|
+
# or
|
|
12
|
+
pnpm dev
|
|
13
|
+
# or
|
|
14
|
+
bun dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
18
|
+
|
|
19
|
+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
|
20
|
+
|
|
21
|
+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
|
22
|
+
|
|
23
|
+
## Learn More
|
|
24
|
+
|
|
25
|
+
To learn more about Next.js, take a look at the following resources:
|
|
26
|
+
|
|
27
|
+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
28
|
+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
29
|
+
|
|
30
|
+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
|
31
|
+
|
|
32
|
+
## Deploy on Vercel
|
|
33
|
+
|
|
34
|
+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
|
35
|
+
|
|
36
|
+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactNode, MouseEventHandler } from 'react';
|
|
2
|
+
|
|
3
|
+
type CustomButtonProps = {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
text: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
cancel?: boolean;
|
|
8
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
declare const CustomButton: React.FC<CustomButtonProps>;
|
|
12
|
+
|
|
13
|
+
export { CustomButton };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactNode, MouseEventHandler } from 'react';
|
|
2
|
+
|
|
3
|
+
type CustomButtonProps = {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
text: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
cancel?: boolean;
|
|
8
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
declare const CustomButton: React.FC<CustomButtonProps>;
|
|
12
|
+
|
|
13
|
+
export { CustomButton };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
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/components/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
CustomButton: () => button_default
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
|
+
|
|
27
|
+
// src/components/custom/button.tsx
|
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
var CustomButton = ({
|
|
30
|
+
disabled = false,
|
|
31
|
+
text,
|
|
32
|
+
icon,
|
|
33
|
+
cancel = false,
|
|
34
|
+
onClick
|
|
35
|
+
}) => {
|
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
37
|
+
"button",
|
|
38
|
+
{
|
|
39
|
+
disabled,
|
|
40
|
+
onClick,
|
|
41
|
+
className: `
|
|
42
|
+
inline-flex items-center justify-center gap-3
|
|
43
|
+
px-8 py-4 rounded-[0.9375rem]
|
|
44
|
+
text-[var(--text-primary)] cursor-pointer border-0
|
|
45
|
+
transition-colors duration-200 ease-in-out
|
|
46
|
+
${cancel ? "bg-[var(--warning-opacity)] hover:bg-[var(--warning)]" : "bg-[var(--blue-opacity)] hover:bg-[var(--blue)]"}
|
|
47
|
+
disabled:opacity-50
|
|
48
|
+
`,
|
|
49
|
+
children: [
|
|
50
|
+
text,
|
|
51
|
+
icon
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
var button_default = CustomButton;
|
|
57
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
58
|
+
0 && (module.exports = {
|
|
59
|
+
CustomButton
|
|
60
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// src/components/custom/button.tsx
|
|
2
|
+
import { jsxs } from "react/jsx-runtime";
|
|
3
|
+
var CustomButton = ({
|
|
4
|
+
disabled = false,
|
|
5
|
+
text,
|
|
6
|
+
icon,
|
|
7
|
+
cancel = false,
|
|
8
|
+
onClick
|
|
9
|
+
}) => {
|
|
10
|
+
return /* @__PURE__ */ jsxs(
|
|
11
|
+
"button",
|
|
12
|
+
{
|
|
13
|
+
disabled,
|
|
14
|
+
onClick,
|
|
15
|
+
className: `
|
|
16
|
+
inline-flex items-center justify-center gap-3
|
|
17
|
+
px-8 py-4 rounded-[0.9375rem]
|
|
18
|
+
text-[var(--text-primary)] cursor-pointer border-0
|
|
19
|
+
transition-colors duration-200 ease-in-out
|
|
20
|
+
${cancel ? "bg-[var(--warning-opacity)] hover:bg-[var(--warning)]" : "bg-[var(--blue-opacity)] hover:bg-[var(--blue)]"}
|
|
21
|
+
disabled:opacity-50
|
|
22
|
+
`,
|
|
23
|
+
children: [
|
|
24
|
+
text,
|
|
25
|
+
icon
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
var button_default = CustomButton;
|
|
31
|
+
export {
|
|
32
|
+
button_default as CustomButton
|
|
33
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "baaz-custom-components",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.mjs",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/index.mjs",
|
|
15
|
+
"types": "./dist/index.d.ts"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"dev": "next dev --turbopack",
|
|
20
|
+
"build": "tsup",
|
|
21
|
+
"start": "next start",
|
|
22
|
+
"lint": "eslint",
|
|
23
|
+
"release": "sh release.sh"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"next": ">=13.0.0",
|
|
27
|
+
"react": ">=18.0.0",
|
|
28
|
+
"react-dom": ">=18.0.0"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
32
|
+
"class-variance-authority": "^0.7.1",
|
|
33
|
+
"clsx": "^2.1.1",
|
|
34
|
+
"lucide-react": "^0.542.0",
|
|
35
|
+
"tailwind-merge": "^3.3.1"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@eslint/eslintrc": "^3",
|
|
39
|
+
"@tailwindcss/postcss": "^4.1.12",
|
|
40
|
+
"@types/node": "^20",
|
|
41
|
+
"@types/react": "^19",
|
|
42
|
+
"@types/react-dom": "^19",
|
|
43
|
+
"autoprefixer": "^10.4.21",
|
|
44
|
+
"eslint": "^9",
|
|
45
|
+
"eslint-config-next": "15.5.2",
|
|
46
|
+
"postcss": "^8.5.6",
|
|
47
|
+
"tailwindcss": "^4.1.12",
|
|
48
|
+
"tsup": "^8.5.0",
|
|
49
|
+
"tw-animate-css": "^1.3.7",
|
|
50
|
+
"typescript": "^5"
|
|
51
|
+
}
|
|
52
|
+
}
|