@tan-ahmed/tan-ui-kit 0.1.0 → 0.1.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 +64 -60
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -1,73 +1,77 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @tan-ahmed/tan-ui-kit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A React component library built with Tailwind CSS v4 and shadcn/ui components.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
### Recommended: Using pnpm
|
|
8
|
+
```bash
|
|
9
|
+
pnpm add @tan-ahmed/tan-ui-kit
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### Using yarn
|
|
13
|
+
```bash
|
|
14
|
+
yarn add @tan-ahmed/tan-ui-kit
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Using npm
|
|
18
|
+
```bash
|
|
19
|
+
npm install @tan-ahmed/tan-ui-kit
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Note:** If you encounter the error `Cannot read properties of null (reading 'matches')` with npm, this is a known npm bug with Node.js 23.x. Please use one of the following workarounds:
|
|
23
|
+
|
|
24
|
+
1. Use pnpm or yarn (recommended)
|
|
25
|
+
2. Use `npm install --legacy-peer-deps`
|
|
26
|
+
3. Clear npm cache: `npm cache clean --force` and retry
|
|
27
|
+
4. Update npm: `npm install -g npm@latest`
|
|
28
|
+
|
|
29
|
+
See [INSTALLATION_TROUBLESHOOTING.md](./INSTALLATION_TROUBLESHOOTING.md) for more details.
|
|
9
30
|
|
|
10
|
-
##
|
|
31
|
+
## Peer Dependencies
|
|
11
32
|
|
|
12
|
-
|
|
33
|
+
This package requires the following peer dependencies:
|
|
13
34
|
|
|
14
|
-
|
|
35
|
+
- `react`: ^18.0.0 || ^19.0.0
|
|
36
|
+
- `react-dom`: ^18.0.0 || ^19.0.0
|
|
37
|
+
- `@radix-ui/react-slot`: ^1.0.2
|
|
38
|
+
- `class-variance-authority`: ^0.7.0
|
|
39
|
+
- `clsx`: ^2.1.0
|
|
40
|
+
- `tailwind-merge`: ^2.5.0
|
|
15
41
|
|
|
16
|
-
|
|
42
|
+
Make sure to install these in your project:
|
|
17
43
|
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
extends: [
|
|
24
|
-
// Other configs...
|
|
44
|
+
```bash
|
|
45
|
+
pnpm add react react-dom @radix-ui/react-slot class-variance-authority clsx tailwind-merge
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
25
49
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
tseslint.configs.strictTypeChecked,
|
|
30
|
-
// Optionally, add this for stylistic rules
|
|
31
|
-
tseslint.configs.stylisticTypeChecked,
|
|
50
|
+
```tsx
|
|
51
|
+
import { Button } from '@tan-ahmed/tan-ui-kit'
|
|
52
|
+
import '@tan-ahmed/tan-ui-kit/styles'
|
|
32
53
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
parserOptions: {
|
|
37
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
38
|
-
tsconfigRootDir: import.meta.dirname,
|
|
39
|
-
},
|
|
40
|
-
// other options...
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
])
|
|
54
|
+
function App() {
|
|
55
|
+
return <Button>Click me</Button>
|
|
56
|
+
}
|
|
44
57
|
```
|
|
45
58
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
reactX.configs['recommended-typescript'],
|
|
61
|
-
// Enable lint rules for React DOM
|
|
62
|
-
reactDom.configs.recommended,
|
|
63
|
-
],
|
|
64
|
-
languageOptions: {
|
|
65
|
-
parserOptions: {
|
|
66
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
67
|
-
tsconfigRootDir: import.meta.dirname,
|
|
68
|
-
},
|
|
69
|
-
// other options...
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
])
|
|
59
|
+
## Development
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Install dependencies
|
|
63
|
+
pnpm install
|
|
64
|
+
|
|
65
|
+
# Start dev server
|
|
66
|
+
pnpm dev
|
|
67
|
+
|
|
68
|
+
# Build
|
|
69
|
+
pnpm build
|
|
70
|
+
|
|
71
|
+
# Lint
|
|
72
|
+
pnpm lint
|
|
73
73
|
```
|
|
74
|
+
|
|
75
|
+
## License
|
|
76
|
+
|
|
77
|
+
MIT
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants };
|
|
12
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,cAAc;;;8EA2BnB,CAAA;AAED,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,QAAA,MAAM,MAAM,uFAWX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAA;AAGrB,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC/D,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tan-ahmed/tan-ui-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A React component library built with Tailwind CSS v4 and shadcn/ui components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/tan-ui-kit.cjs.js",
|
|
@@ -12,14 +12,17 @@
|
|
|
12
12
|
"import": "./dist/tan-ui-kit.es.js",
|
|
13
13
|
"require": "./dist/tan-ui-kit.cjs.js"
|
|
14
14
|
},
|
|
15
|
-
"./styles":
|
|
15
|
+
"./styles": {
|
|
16
|
+
"types": "./dist/styles.d.ts",
|
|
17
|
+
"default": "./dist/tan-ui-kit.css"
|
|
18
|
+
}
|
|
16
19
|
},
|
|
17
20
|
"files": [
|
|
18
21
|
"dist"
|
|
19
22
|
],
|
|
20
23
|
"repository": {
|
|
21
24
|
"type": "git",
|
|
22
|
-
"url": "https://github.com/tan-ahmed/tan-ui-kit.git"
|
|
25
|
+
"url": "git+https://github.com/tan-ahmed/tan-ui-kit.git"
|
|
23
26
|
},
|
|
24
27
|
"publishConfig": {
|
|
25
28
|
"access": "public"
|
|
@@ -61,7 +64,7 @@
|
|
|
61
64
|
"eslint": "^9.39.1",
|
|
62
65
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
63
66
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
64
|
-
"globals": "^
|
|
67
|
+
"globals": "^15.0.0",
|
|
65
68
|
"tailwind-merge": "^2.5.0",
|
|
66
69
|
"tailwindcss": "^4.0.0",
|
|
67
70
|
"typescript": "~5.9.3",
|