notionsoft-ui 1.0.39 → 1.0.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notionsoft-ui",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "A React UI component installer (shadcn-style). Installs components directly into your project.",
5
5
  "bin": {
6
6
  "notionsoft-ui": "./cli/index.cjs"
@@ -0,0 +1,68 @@
1
+ // Card.stories.tsx
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+ import {
4
+ Card,
5
+ CardHeader,
6
+ CardTitle,
7
+ CardDescription,
8
+ CardContent,
9
+ CardFooter,
10
+ CardAction,
11
+ } from "./card";
12
+
13
+ const meta: Meta<typeof Card> = {
14
+ title: "Components/Card",
15
+ component: Card,
16
+ tags: ["autodocs"],
17
+ };
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof Card>;
21
+
22
+ export const Default: Story = {
23
+ render: () => (
24
+ <Card className="max-w-md">
25
+ <CardHeader>
26
+ <CardTitle>Card Title</CardTitle>
27
+ <CardDescription>
28
+ This is a short description for the card.
29
+ </CardDescription>
30
+ </CardHeader>
31
+
32
+ <CardContent>
33
+ <p className="text-sm">
34
+ This is the main content area of the card. You can place any elements
35
+ here.
36
+ </p>
37
+ </CardContent>
38
+
39
+ <CardFooter>
40
+ <span className="text-sm text-muted-foreground">
41
+ Footer content goes here
42
+ </span>
43
+ </CardFooter>
44
+ </Card>
45
+ ),
46
+ };
47
+
48
+ export const WithAction: Story = {
49
+ render: () => (
50
+ <Card className="max-w-md">
51
+ <CardHeader>
52
+ <CardTitle>Card with Action</CardTitle>
53
+ <CardDescription>
54
+ This card demonstrates the CardAction slot.
55
+ </CardDescription>
56
+ <CardAction>
57
+ <button className="text-sm font-medium text-primary">Action</button>
58
+ </CardAction>
59
+ </CardHeader>
60
+
61
+ <CardContent>
62
+ <p className="text-sm">
63
+ Card content with an action button aligned to the header.
64
+ </p>
65
+ </CardContent>
66
+ </Card>
67
+ ),
68
+ };
@@ -0,0 +1,91 @@
1
+ import { cn } from "@/utils/cn";
2
+ import * as React from "react";
3
+
4
+ function Card({ className, ...props }: React.ComponentProps<"div">) {
5
+ return (
6
+ <div
7
+ data-slot="card"
8
+ className={cn(
9
+ "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
10
+ className
11
+ )}
12
+ {...props}
13
+ />
14
+ );
15
+ }
16
+
17
+ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
18
+ return (
19
+ <div
20
+ data-slot="card-header"
21
+ className={cn(
22
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
23
+ className
24
+ )}
25
+ {...props}
26
+ />
27
+ );
28
+ }
29
+
30
+ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
31
+ return (
32
+ <div
33
+ data-slot="card-title"
34
+ className={cn("leading-none font-semibold", className)}
35
+ {...props}
36
+ />
37
+ );
38
+ }
39
+
40
+ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
41
+ return (
42
+ <div
43
+ data-slot="card-description"
44
+ className={cn("text-muted-foreground text-sm", className)}
45
+ {...props}
46
+ />
47
+ );
48
+ }
49
+
50
+ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
51
+ return (
52
+ <div
53
+ data-slot="card-action"
54
+ className={cn(
55
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
56
+ className
57
+ )}
58
+ {...props}
59
+ />
60
+ );
61
+ }
62
+
63
+ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
64
+ return (
65
+ <div
66
+ data-slot="card-content"
67
+ className={cn("px-6", className)}
68
+ {...props}
69
+ />
70
+ );
71
+ }
72
+
73
+ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
74
+ return (
75
+ <div
76
+ data-slot="card-footer"
77
+ className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
78
+ {...props}
79
+ />
80
+ );
81
+ }
82
+
83
+ export {
84
+ Card,
85
+ CardHeader,
86
+ CardFooter,
87
+ CardTitle,
88
+ CardAction,
89
+ CardDescription,
90
+ CardContent,
91
+ };
@@ -63,7 +63,7 @@ const Pagination: React.FC<PaginationProps> = ({ lastPage, onPageChange }) => {
63
63
  onClick={() => {
64
64
  if (currentPage !== 1) handlePrevPage();
65
65
  }}
66
- className={`size-8 rounded transition-[color,background-color,transform] cursor-pointer rtl:rotate-180 self-center p-2 ${
66
+ className={`size-7 rounded transition-[color,background-color,transform] cursor-pointer rtl:rotate-180 self-center p-2 ${
67
67
  currentPage === 1
68
68
  ? "text-primary/50"
69
69
  : "text-primary hover:scale-110 hover:bg-fourth/10"