@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 CHANGED
@@ -1,73 +1,77 @@
1
- # React + TypeScript + Vite
1
+ # @tan-ahmed/tan-ui-kit
2
2
 
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3
+ A React component library built with Tailwind CSS v4 and shadcn/ui components.
4
4
 
5
- Currently, two official plugins are available:
5
+ ## Installation
6
6
 
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
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
- ## React Compiler
31
+ ## Peer Dependencies
11
32
 
12
- The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
33
+ This package requires the following peer dependencies:
13
34
 
14
- ## Expanding the ESLint configuration
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
- If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
42
+ Make sure to install these in your project:
17
43
 
18
- ```js
19
- export default defineConfig([
20
- globalIgnores(['dist']),
21
- {
22
- files: ['**/*.{ts,tsx}'],
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
- // Remove tseslint.configs.recommended and replace with this
27
- tseslint.configs.recommendedTypeChecked,
28
- // Alternatively, use this for stricter rules
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
- // Other configs...
34
- ],
35
- languageOptions: {
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
- You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
47
-
48
- ```js
49
- // eslint.config.js
50
- import reactX from 'eslint-plugin-react-x'
51
- import reactDom from 'eslint-plugin-react-dom'
52
-
53
- export default defineConfig([
54
- globalIgnores(['dist']),
55
- {
56
- files: ['**/*.{ts,tsx}'],
57
- extends: [
58
- // Other configs...
59
- // Enable lint rules for React
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
@@ -1 +1,3 @@
1
- export {}
1
+ export { Button, buttonVariants } from './components/ui/button';
2
+ export type { ButtonProps } from './components/ui/button';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -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,3 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare function cn(...inputs: ClassValue[]): string;
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -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.0",
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": "./dist/tan-ui-kit.css"
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": "^16.5.0",
67
+ "globals": "^15.0.0",
65
68
  "tailwind-merge": "^2.5.0",
66
69
  "tailwindcss": "^4.0.0",
67
70
  "typescript": "~5.9.3",