@arronqzy/ui 0.0.0
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/.eslintrc.cjs +10 -0
- package/.turbo/turbo-lint.log +4 -0
- package/components.json +20 -0
- package/dist/styles.css +3105 -0
- package/index.ts +7 -0
- package/package.json +76 -0
- package/postcss.config.cjs +7 -0
- package/scripts/sync-shadcn.mjs +144 -0
- package/src/hooks/use-toast.ts +194 -0
- package/src/lib/overlay-z-index.ts +8 -0
- package/src/lib/utils.ts +7 -0
- package/src/styles.css +89 -0
- package/src/theme-provider.tsx +36 -0
- package/src/ui/accordion.tsx +58 -0
- package/src/ui/alert-dialog.tsx +149 -0
- package/src/ui/alert.tsx +59 -0
- package/src/ui/aspect-ratio.tsx +7 -0
- package/src/ui/avatar.tsx +50 -0
- package/src/ui/badge.tsx +36 -0
- package/src/ui/breadcrumb.tsx +115 -0
- package/src/ui/button.tsx +56 -0
- package/src/ui/calendar.tsx +213 -0
- package/src/ui/card.tsx +79 -0
- package/src/ui/carousel.tsx +262 -0
- package/src/ui/chart.tsx +403 -0
- package/src/ui/checkbox.tsx +30 -0
- package/src/ui/collapsible.tsx +11 -0
- package/src/ui/command.tsx +153 -0
- package/src/ui/context-menu.tsx +200 -0
- package/src/ui/dialog.tsx +130 -0
- package/src/ui/drawer.tsx +124 -0
- package/src/ui/dropdown-menu.tsx +200 -0
- package/src/ui/empty.tsx +50 -0
- package/src/ui/form.tsx +178 -0
- package/src/ui/hover-card.tsx +29 -0
- package/src/ui/index.ts +50 -0
- package/src/ui/input-otp.tsx +71 -0
- package/src/ui/input.tsx +22 -0
- package/src/ui/label.tsx +26 -0
- package/src/ui/menubar.tsx +256 -0
- package/src/ui/navigation-menu.tsx +128 -0
- package/src/ui/pagination.tsx +117 -0
- package/src/ui/popover.tsx +31 -0
- package/src/ui/progress.tsx +28 -0
- package/src/ui/radio-group.tsx +44 -0
- package/src/ui/resizable.tsx +46 -0
- package/src/ui/scroll-area.tsx +48 -0
- package/src/ui/select.tsx +160 -0
- package/src/ui/separator.tsx +31 -0
- package/src/ui/sheet.tsx +146 -0
- package/src/ui/skeleton.tsx +15 -0
- package/src/ui/slider.tsx +28 -0
- package/src/ui/sonner.tsx +45 -0
- package/src/ui/switch.tsx +29 -0
- package/src/ui/table.tsx +117 -0
- package/src/ui/tabs.tsx +55 -0
- package/src/ui/textarea.tsx +22 -0
- package/src/ui/toast.tsx +129 -0
- package/src/ui/toaster.tsx +35 -0
- package/src/ui/toggle-group.tsx +61 -0
- package/src/ui/toggle.tsx +45 -0
- package/src/ui/tooltip.tsx +32 -0
- package/tailwind.config.ts +8 -0
- package/tsconfig.json +5 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle"
|
|
5
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
6
|
+
|
|
7
|
+
import { cn } from "../lib/utils"
|
|
8
|
+
|
|
9
|
+
const toggleVariants = cva(
|
|
10
|
+
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",
|
|
11
|
+
{
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
default: "bg-transparent",
|
|
15
|
+
outline:
|
|
16
|
+
"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
default: "h-10 px-3 min-w-10",
|
|
20
|
+
sm: "h-9 px-2.5 min-w-9",
|
|
21
|
+
lg: "h-11 px-5 min-w-11",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
variant: "default",
|
|
26
|
+
size: "default",
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
const Toggle = React.forwardRef<
|
|
32
|
+
React.ElementRef<typeof TogglePrimitive.Root>,
|
|
33
|
+
React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &
|
|
34
|
+
VariantProps<typeof toggleVariants>
|
|
35
|
+
>(({ className, variant, size, ...props }, ref) => (
|
|
36
|
+
<TogglePrimitive.Root
|
|
37
|
+
ref={ref}
|
|
38
|
+
className={cn(toggleVariants({ variant, size, className }))}
|
|
39
|
+
{...props}
|
|
40
|
+
/>
|
|
41
|
+
))
|
|
42
|
+
|
|
43
|
+
Toggle.displayName = TogglePrimitive.Root.displayName
|
|
44
|
+
|
|
45
|
+
export { Toggle, toggleVariants }
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
5
|
+
|
|
6
|
+
import { cn } from "../lib/utils"
|
|
7
|
+
|
|
8
|
+
const TooltipProvider = TooltipPrimitive.Provider
|
|
9
|
+
|
|
10
|
+
const Tooltip = TooltipPrimitive.Root
|
|
11
|
+
|
|
12
|
+
const TooltipTrigger = TooltipPrimitive.Trigger
|
|
13
|
+
|
|
14
|
+
const TooltipContent = React.forwardRef<
|
|
15
|
+
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
16
|
+
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
17
|
+
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
18
|
+
<TooltipPrimitive.Portal>
|
|
19
|
+
<TooltipPrimitive.Content
|
|
20
|
+
ref={ref}
|
|
21
|
+
sideOffset={sideOffset}
|
|
22
|
+
className={cn(
|
|
23
|
+
"z-[10000] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",
|
|
24
|
+
className
|
|
25
|
+
)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
</TooltipPrimitive.Portal>
|
|
29
|
+
))
|
|
30
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName
|
|
31
|
+
|
|
32
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|