@inspirare/design-system 0.0.11 → 0.0.12
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/dist/index.css +2 -2
- package/dist/index.d.ts +717 -154
- package/dist/index.js +11007 -3598
- package/package.json +10 -1
- package/src/components/ui/alert.tsx +59 -0
- package/src/components/ui/aspect-ratio.tsx +7 -0
- package/src/components/ui/breadcrumb.tsx +115 -0
- package/src/components/ui/button-group.tsx +83 -0
- package/src/components/ui/button.tsx +2 -0
- package/src/components/ui/carousel.tsx +262 -0
- package/src/components/ui/chart.tsx +369 -0
- package/src/components/ui/combobox.tsx +112 -0
- package/src/components/ui/context-menu.tsx +200 -0
- package/src/components/ui/empty.tsx +104 -0
- package/src/components/ui/field.tsx +244 -0
- package/src/components/ui/input-group.tsx +170 -0
- package/src/components/ui/input-otp.tsx +71 -0
- package/src/components/ui/item.tsx +193 -0
- package/src/components/ui/kbd.tsx +28 -0
- package/src/components/ui/menubar.tsx +256 -0
- package/src/components/ui/navigation-menu.tsx +128 -0
- package/src/components/ui/pagination.tsx +117 -0
- package/src/components/ui/resizable.tsx +43 -0
- package/src/components/ui/sidebar.tsx +773 -0
- package/src/components/ui/spinner.tsx +16 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/index.css +71 -174
- package/src/index.ts +22 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
import { type ButtonProps, buttonVariants } from "@/components/ui/button"
|
|
6
|
+
|
|
7
|
+
const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
|
|
8
|
+
<nav
|
|
9
|
+
role="navigation"
|
|
10
|
+
aria-label="pagination"
|
|
11
|
+
className={cn("mx-auto flex w-full justify-center", className)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
)
|
|
15
|
+
Pagination.displayName = "Pagination"
|
|
16
|
+
|
|
17
|
+
const PaginationContent = React.forwardRef<
|
|
18
|
+
HTMLUListElement,
|
|
19
|
+
React.ComponentProps<"ul">
|
|
20
|
+
>(({ className, ...props }, ref) => (
|
|
21
|
+
<ul
|
|
22
|
+
ref={ref}
|
|
23
|
+
className={cn("flex flex-row items-center gap-1", className)}
|
|
24
|
+
{...props}
|
|
25
|
+
/>
|
|
26
|
+
))
|
|
27
|
+
PaginationContent.displayName = "PaginationContent"
|
|
28
|
+
|
|
29
|
+
const PaginationItem = React.forwardRef<
|
|
30
|
+
HTMLLIElement,
|
|
31
|
+
React.ComponentProps<"li">
|
|
32
|
+
>(({ className, ...props }, ref) => (
|
|
33
|
+
<li ref={ref} className={cn("", className)} {...props} />
|
|
34
|
+
))
|
|
35
|
+
PaginationItem.displayName = "PaginationItem"
|
|
36
|
+
|
|
37
|
+
type PaginationLinkProps = {
|
|
38
|
+
isActive?: boolean
|
|
39
|
+
} & Pick<ButtonProps, "size"> &
|
|
40
|
+
React.ComponentProps<"a">
|
|
41
|
+
|
|
42
|
+
const PaginationLink = ({
|
|
43
|
+
className,
|
|
44
|
+
isActive,
|
|
45
|
+
size = "icon",
|
|
46
|
+
...props
|
|
47
|
+
}: PaginationLinkProps) => (
|
|
48
|
+
<a
|
|
49
|
+
aria-current={isActive ? "page" : undefined}
|
|
50
|
+
className={cn(
|
|
51
|
+
buttonVariants({
|
|
52
|
+
variant: isActive ? "outline" : "ghost",
|
|
53
|
+
size,
|
|
54
|
+
}),
|
|
55
|
+
className
|
|
56
|
+
)}
|
|
57
|
+
{...props}
|
|
58
|
+
/>
|
|
59
|
+
)
|
|
60
|
+
PaginationLink.displayName = "PaginationLink"
|
|
61
|
+
|
|
62
|
+
const PaginationPrevious = ({
|
|
63
|
+
className,
|
|
64
|
+
...props
|
|
65
|
+
}: React.ComponentProps<typeof PaginationLink>) => (
|
|
66
|
+
<PaginationLink
|
|
67
|
+
aria-label="Go to previous page"
|
|
68
|
+
size="default"
|
|
69
|
+
className={cn("gap-1 pl-2.5", className)}
|
|
70
|
+
{...props}
|
|
71
|
+
>
|
|
72
|
+
<ChevronLeft className="h-4 w-4" />
|
|
73
|
+
<span>Previous</span>
|
|
74
|
+
</PaginationLink>
|
|
75
|
+
)
|
|
76
|
+
PaginationPrevious.displayName = "PaginationPrevious"
|
|
77
|
+
|
|
78
|
+
const PaginationNext = ({
|
|
79
|
+
className,
|
|
80
|
+
...props
|
|
81
|
+
}: React.ComponentProps<typeof PaginationLink>) => (
|
|
82
|
+
<PaginationLink
|
|
83
|
+
aria-label="Go to next page"
|
|
84
|
+
size="default"
|
|
85
|
+
className={cn("gap-1 pr-2.5", className)}
|
|
86
|
+
{...props}
|
|
87
|
+
>
|
|
88
|
+
<span>Next</span>
|
|
89
|
+
<ChevronRight className="h-4 w-4" />
|
|
90
|
+
</PaginationLink>
|
|
91
|
+
)
|
|
92
|
+
PaginationNext.displayName = "PaginationNext"
|
|
93
|
+
|
|
94
|
+
const PaginationEllipsis = ({
|
|
95
|
+
className,
|
|
96
|
+
...props
|
|
97
|
+
}: React.ComponentProps<"span">) => (
|
|
98
|
+
<span
|
|
99
|
+
aria-hidden
|
|
100
|
+
className={cn("flex h-9 w-9 items-center justify-center", className)}
|
|
101
|
+
{...props}
|
|
102
|
+
>
|
|
103
|
+
<MoreHorizontal className="h-4 w-4" />
|
|
104
|
+
<span className="sr-only">More pages</span>
|
|
105
|
+
</span>
|
|
106
|
+
)
|
|
107
|
+
PaginationEllipsis.displayName = "PaginationEllipsis"
|
|
108
|
+
|
|
109
|
+
export {
|
|
110
|
+
Pagination,
|
|
111
|
+
PaginationContent,
|
|
112
|
+
PaginationEllipsis,
|
|
113
|
+
PaginationItem,
|
|
114
|
+
PaginationLink,
|
|
115
|
+
PaginationNext,
|
|
116
|
+
PaginationPrevious,
|
|
117
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { GripVertical } from "lucide-react"
|
|
4
|
+
import * as ResizablePrimitive from "react-resizable-panels"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
const ResizablePanelGroup = ({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof ResizablePrimitive.Group>) => (
|
|
12
|
+
<ResizablePrimitive.Group
|
|
13
|
+
className={cn(
|
|
14
|
+
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
const ResizablePanel = ResizablePrimitive.Panel
|
|
22
|
+
|
|
23
|
+
const ResizableHandle = ({
|
|
24
|
+
children,
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: React.ComponentProps<typeof ResizablePrimitive.Separator>) => (
|
|
28
|
+
<ResizablePrimitive.Separator
|
|
29
|
+
className={cn(
|
|
30
|
+
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
33
|
+
{...props}
|
|
34
|
+
>
|
|
35
|
+
{children ?? (
|
|
36
|
+
<div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
|
|
37
|
+
<GripVertical className="h-2.5 w-2.5" />
|
|
38
|
+
</div>
|
|
39
|
+
)}
|
|
40
|
+
</ResizablePrimitive.Separator>
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
|