@tan-ahmed/tan-ui-kit 0.1.9 → 0.1.11
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 +8 -14
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -4
- package/src/components/ui/button.tsx +0 -53
- package/src/index.ts +0 -6
- package/src/lib/utils.ts +0 -6
package/README.md
CHANGED
|
@@ -33,6 +33,8 @@ See [INSTALLATION_TROUBLESHOOTING.md](./INSTALLATION_TROUBLESHOOTING.md) for mor
|
|
|
33
33
|
|
|
34
34
|
## Usage
|
|
35
35
|
|
|
36
|
+
The package includes pre-generated CSS with all utility classes, so **no Tailwind configuration is needed** - it works out of the box!
|
|
37
|
+
|
|
36
38
|
### 1. Import styles in your entry file
|
|
37
39
|
|
|
38
40
|
Import the styles once in your main entry point file:
|
|
@@ -45,7 +47,7 @@ Import the styles once in your main entry point file:
|
|
|
45
47
|
|
|
46
48
|
```tsx
|
|
47
49
|
// In your main entry point file (e.g., src/main.tsx, app.tsx, etc.)
|
|
48
|
-
import "@tan-ahmed/tan-ui-kit/styles";
|
|
50
|
+
import "@tan-ahmed/tan-ui-kit/styles"; // ⚠️ Import this at the top of your entry file
|
|
49
51
|
```
|
|
50
52
|
|
|
51
53
|
### 2. Use components anywhere
|
|
@@ -60,22 +62,14 @@ function MyComponent() {
|
|
|
60
62
|
}
|
|
61
63
|
```
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
## Peer Dependencies
|
|
64
66
|
|
|
65
|
-
This
|
|
67
|
+
This package requires the following peer dependencies:
|
|
66
68
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
import { Button } from "@tan-ahmed/tan-ui-kit";
|
|
69
|
+
- `react`: ^18.0.0 || ^19.0.0
|
|
70
|
+
- `react-dom`: ^18.0.0 || ^19.0.0
|
|
70
71
|
|
|
71
|
-
|
|
72
|
-
return (
|
|
73
|
-
<div>
|
|
74
|
-
<Button variant="destructive">Click me</Button>
|
|
75
|
-
</div>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
```
|
|
72
|
+
All other dependencies (base-ui, class-variance-authority, clsx, tailwind-merge) are bundled with the library, so you don't need to install them separately.
|
|
79
73
|
|
|
80
74
|
## License
|
|
81
75
|
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
|
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.11",
|
|
4
4
|
"description": "A React component library built with Tailwind CSS v4 and base-ui components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/tan-ui-kit.es.js",
|
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
21
|
-
"src/components",
|
|
22
|
-
"src/lib",
|
|
23
|
-
"src/index.ts",
|
|
24
21
|
"README.md"
|
|
25
22
|
],
|
|
26
23
|
"repository": {
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import { Button as ButtonPrimitive } from "@base-ui/react/button"
|
|
4
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
|
|
8
|
-
const buttonVariants = cva(
|
|
9
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",
|
|
10
|
-
{
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
14
|
-
outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground shadow-xs",
|
|
15
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
16
|
-
ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
17
|
-
destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
|
|
18
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
19
|
-
},
|
|
20
|
-
size: {
|
|
21
|
-
default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
22
|
-
xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
23
|
-
sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
24
|
-
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
25
|
-
icon: "size-9",
|
|
26
|
-
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
27
|
-
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
28
|
-
"icon-lg": "size-10",
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
defaultVariants: {
|
|
32
|
-
variant: "default",
|
|
33
|
-
size: "default",
|
|
34
|
-
},
|
|
35
|
-
}
|
|
36
|
-
)
|
|
37
|
-
|
|
38
|
-
function Button({
|
|
39
|
-
className,
|
|
40
|
-
variant = "default",
|
|
41
|
-
size = "default",
|
|
42
|
-
...props
|
|
43
|
-
}: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {
|
|
44
|
-
return (
|
|
45
|
-
<ButtonPrimitive
|
|
46
|
-
data-slot="button"
|
|
47
|
-
className={cn(buttonVariants({ variant, size, className }))}
|
|
48
|
-
{...props}
|
|
49
|
-
/>
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export { Button, buttonVariants }
|
package/src/index.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Note: index.css is NOT imported here - it's pre-generated during build
|
|
2
|
-
// The CSS is included in dist/tan-ui-kit.css via the build:css script
|
|
3
|
-
|
|
4
|
-
// Export shadcn button
|
|
5
|
-
export { Button, buttonVariants } from "./components/ui/button";
|
|
6
|
-
// export type { ButtonProps } from "./components/ui/button";
|