@moontra/moonui 2.1.0 → 2.1.2

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 (43) hide show
  1. package/dist/index.js +433 -2025
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +198 -1896
  4. package/dist/index.mjs.map +1 -1
  5. package/package.json +3 -2
  6. package/src/components/ui/accordion.tsx +9 -6
  7. package/src/components/ui/alert.tsx +13 -10
  8. package/src/components/ui/aspect-ratio.tsx +9 -6
  9. package/src/components/ui/avatar.tsx +10 -7
  10. package/src/components/ui/badge.tsx +7 -4
  11. package/src/components/ui/breadcrumb.tsx +31 -29
  12. package/src/components/ui/calendar.tsx +9 -6
  13. package/src/components/ui/card.tsx +21 -18
  14. package/src/components/ui/checkbox.tsx +8 -5
  15. package/src/components/ui/collapsible.tsx +12 -10
  16. package/src/components/ui/color-picker.tsx +2 -2
  17. package/src/components/ui/command.tsx +28 -26
  18. package/src/components/ui/data-table.tsx +2 -2
  19. package/src/components/ui/date-picker.tsx +8 -8
  20. package/src/components/ui/dialog.tsx +23 -21
  21. package/src/components/ui/dropdown-menu.tsx +36 -34
  22. package/src/components/ui/file-upload.tsx +3 -3
  23. package/src/components/ui/input.tsx +9 -6
  24. package/src/components/ui/label.tsx +7 -4
  25. package/src/components/ui/locked-component.tsx +1 -1
  26. package/src/components/ui/moon-logo.tsx +1 -1
  27. package/src/components/ui/pagination.tsx +7 -5
  28. package/src/components/ui/popover.tsx +11 -9
  29. package/src/components/ui/progress.tsx +9 -6
  30. package/src/components/ui/radio-group.tsx +10 -7
  31. package/src/components/ui/select.tsx +23 -21
  32. package/src/components/ui/separator.tsx +8 -5
  33. package/src/components/ui/simple-editor.tsx +4 -4
  34. package/src/components/ui/skeleton.tsx +10 -7
  35. package/src/components/ui/slider.tsx +8 -5
  36. package/src/components/ui/switch.tsx +6 -3
  37. package/src/components/ui/table.tsx +31 -29
  38. package/src/components/ui/tabs.tsx +12 -9
  39. package/src/components/ui/textarea.tsx +7 -4
  40. package/src/components/ui/toast.tsx +9 -7
  41. package/src/components/ui/toggle.tsx +7 -4
  42. package/src/components/ui/tooltip.tsx +13 -11
  43. package/src/use-performance-optimizer.ts +1 -1
@@ -6,7 +6,7 @@ import { cva, type VariantProps } from "class-variance-authority"
6
6
 
7
7
  import { cn } from "../../lib/utils"
8
8
 
9
- const toggleVariants = cva(
9
+ const moonUIToggleVariants = cva(
10
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",
11
11
  {
12
12
  variants: {
@@ -28,9 +28,9 @@ const toggleVariants = cva(
28
28
  }
29
29
  )
30
30
 
31
- export interface ToggleProps extends React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>, VariantProps<typeof toggleVariants> {}
31
+ export interface MoonUIToggleProps extends React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>, VariantProps<typeof moonUIToggleVariants> {}
32
32
 
33
- const Toggle = React.forwardRef<
33
+ const MoonUIToggle = React.forwardRef<
34
34
  React.ElementRef<typeof TogglePrimitive.Root>,
35
35
  ToggleProps
36
36
  >(({ className, variant, size, ...props }, ref) => (
@@ -43,5 +43,8 @@ const Toggle = React.forwardRef<
43
43
 
44
44
  Toggle.displayName = TogglePrimitive.Root.displayName
45
45
 
46
- export { Toggle, toggleVariants }
46
+ export { MoonUIToggle, moonUIToggleVariants };
47
+
48
+ // Backward compatibility exports
49
+ export { MoonUIToggle as Toggle, moonUIToggleVariants as toggleVariants }
47
50
  export type { ToggleProps }
@@ -6,7 +6,7 @@ import { cva, type VariantProps } from "class-variance-authority"
6
6
 
7
7
  import { cn } from "../../lib/utils"
8
8
 
9
- const TooltipProvider = TooltipPrimitive.Provider
9
+ const MoonUITooltipProvider = TooltipPrimitive.Provider
10
10
 
11
11
  const tooltipVariants = cva(
12
12
  "z-50 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",
@@ -33,9 +33,9 @@ const tooltipVariants = cva(
33
33
  }
34
34
  )
35
35
 
36
- const Tooltip = TooltipPrimitive.Root
36
+ const MoonUITooltip = TooltipPrimitive.Root
37
37
 
38
- const TooltipTrigger = TooltipPrimitive.Trigger
38
+ const MoonUITooltipTrigger = TooltipPrimitive.Trigger
39
39
 
40
40
  const TooltipArrow = React.forwardRef<
41
41
  React.ElementRef<typeof TooltipPrimitive.Arrow>,
@@ -49,13 +49,13 @@ const TooltipArrow = React.forwardRef<
49
49
  ))
50
50
  TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName
51
51
 
52
- export interface TooltipContentProps
52
+ export interface MoonUITooltipContentProps
53
53
  extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>,
54
54
  VariantProps<typeof tooltipVariants> {
55
55
  showArrow?: boolean
56
56
  }
57
57
 
58
- const TooltipContent = React.forwardRef<
58
+ const MoonUITooltipContent = React.forwardRef<
59
59
  React.ElementRef<typeof TooltipPrimitive.Content>,
60
60
  TooltipContentProps
61
61
  >(({ className, variant, size, showArrow = false, sideOffset = 4, ...props }, ref) => (
@@ -141,12 +141,14 @@ const SimpleTooltip = React.forwardRef<
141
141
  )
142
142
  SimpleTooltip.displayName = "SimpleTooltip"
143
143
 
144
- export {
145
- Tooltip,
146
- TooltipProvider,
147
- TooltipTrigger,
148
- TooltipContent,
144
+ export { MoonUITooltip,
145
+ MoonUITooltipProvider,
146
+ MoonUITooltipTrigger,
147
+ MoonUITooltipContent,
149
148
  TooltipArrow,
150
149
  SimpleTooltip,
151
150
  tooltipVariants,
152
- }
151
+ };
152
+
153
+ // Backward compatibility exports
154
+ export { MoonUITooltip as Tooltip, MoonUITooltipTrigger as TooltipTrigger, MoonUITooltipContent as TooltipContent, MoonUITooltipProvider as TooltipProvider }
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import * as React from "react";
4
- import { performanceProfiler } from "@/lib/performance-profiler";
4
+ import { performanceProfiler } from "./lib/performance-profiler";
5
5
 
6
6
  // Performance optimization hooks
7
7
  export function usePerformanceOptimizer() {