@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.
Files changed (64) hide show
  1. package/.eslintrc.cjs +10 -0
  2. package/.turbo/turbo-lint.log +4 -0
  3. package/components.json +20 -0
  4. package/dist/styles.css +3105 -0
  5. package/index.ts +7 -0
  6. package/package.json +76 -0
  7. package/postcss.config.cjs +7 -0
  8. package/scripts/sync-shadcn.mjs +144 -0
  9. package/src/hooks/use-toast.ts +194 -0
  10. package/src/lib/overlay-z-index.ts +8 -0
  11. package/src/lib/utils.ts +7 -0
  12. package/src/styles.css +89 -0
  13. package/src/theme-provider.tsx +36 -0
  14. package/src/ui/accordion.tsx +58 -0
  15. package/src/ui/alert-dialog.tsx +149 -0
  16. package/src/ui/alert.tsx +59 -0
  17. package/src/ui/aspect-ratio.tsx +7 -0
  18. package/src/ui/avatar.tsx +50 -0
  19. package/src/ui/badge.tsx +36 -0
  20. package/src/ui/breadcrumb.tsx +115 -0
  21. package/src/ui/button.tsx +56 -0
  22. package/src/ui/calendar.tsx +213 -0
  23. package/src/ui/card.tsx +79 -0
  24. package/src/ui/carousel.tsx +262 -0
  25. package/src/ui/chart.tsx +403 -0
  26. package/src/ui/checkbox.tsx +30 -0
  27. package/src/ui/collapsible.tsx +11 -0
  28. package/src/ui/command.tsx +153 -0
  29. package/src/ui/context-menu.tsx +200 -0
  30. package/src/ui/dialog.tsx +130 -0
  31. package/src/ui/drawer.tsx +124 -0
  32. package/src/ui/dropdown-menu.tsx +200 -0
  33. package/src/ui/empty.tsx +50 -0
  34. package/src/ui/form.tsx +178 -0
  35. package/src/ui/hover-card.tsx +29 -0
  36. package/src/ui/index.ts +50 -0
  37. package/src/ui/input-otp.tsx +71 -0
  38. package/src/ui/input.tsx +22 -0
  39. package/src/ui/label.tsx +26 -0
  40. package/src/ui/menubar.tsx +256 -0
  41. package/src/ui/navigation-menu.tsx +128 -0
  42. package/src/ui/pagination.tsx +117 -0
  43. package/src/ui/popover.tsx +31 -0
  44. package/src/ui/progress.tsx +28 -0
  45. package/src/ui/radio-group.tsx +44 -0
  46. package/src/ui/resizable.tsx +46 -0
  47. package/src/ui/scroll-area.tsx +48 -0
  48. package/src/ui/select.tsx +160 -0
  49. package/src/ui/separator.tsx +31 -0
  50. package/src/ui/sheet.tsx +146 -0
  51. package/src/ui/skeleton.tsx +15 -0
  52. package/src/ui/slider.tsx +28 -0
  53. package/src/ui/sonner.tsx +45 -0
  54. package/src/ui/switch.tsx +29 -0
  55. package/src/ui/table.tsx +117 -0
  56. package/src/ui/tabs.tsx +55 -0
  57. package/src/ui/textarea.tsx +22 -0
  58. package/src/ui/toast.tsx +129 -0
  59. package/src/ui/toaster.tsx +35 -0
  60. package/src/ui/toggle-group.tsx +61 -0
  61. package/src/ui/toggle.tsx +45 -0
  62. package/src/ui/tooltip.tsx +32 -0
  63. package/tailwind.config.ts +8 -0
  64. 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 }
@@ -0,0 +1,8 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ import preset from "../tailwind/src/preset";
3
+
4
+ export default {
5
+ presets: [preset],
6
+ content: ["./src/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}"],
7
+ };
8
+
package/tsconfig.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "@arronqzy/typescript-config/react-library.json",
3
+ "include": ["."],
4
+ "exclude": ["node_modules"]
5
+ }