@djangocfg/ui-core 2.1.41 → 2.1.43

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/package.json +2 -2
  2. package/src/components/@old/calendar.tsx +5 -9
  3. package/src/components/@old/date-picker.tsx +9 -8
  4. package/src/components/accordion.tsx +6 -4
  5. package/src/components/alert-dialog.tsx +5 -4
  6. package/src/components/alert.tsx +3 -3
  7. package/src/components/aspect-ratio.tsx +1 -1
  8. package/src/components/avatar.tsx +4 -3
  9. package/src/components/badge.tsx +3 -3
  10. package/src/components/button-group.tsx +5 -4
  11. package/src/components/button.tsx +6 -5
  12. package/src/components/calendar/calendar.tsx +5 -9
  13. package/src/components/calendar/date-picker.tsx +9 -8
  14. package/src/components/card.tsx +2 -2
  15. package/src/components/carousel.tsx +7 -7
  16. package/src/components/chart.tsx +3 -3
  17. package/src/components/checkbox.tsx +6 -4
  18. package/src/components/collapsible.tsx +1 -1
  19. package/src/components/combobox.tsx +8 -16
  20. package/src/components/command.tsx +8 -6
  21. package/src/components/context-menu.tsx +6 -4
  22. package/src/components/copy.tsx +5 -4
  23. package/src/components/dialog.tsx +6 -4
  24. package/src/components/drawer.tsx +3 -3
  25. package/src/components/empty.tsx +2 -2
  26. package/src/components/field.tsx +5 -5
  27. package/src/components/form.tsx +9 -13
  28. package/src/components/hover-card.tsx +4 -3
  29. package/src/components/image-with-fallback.tsx +3 -2
  30. package/src/components/input-group.tsx +6 -6
  31. package/src/components/input-otp.tsx +6 -4
  32. package/src/components/input.tsx +2 -2
  33. package/src/components/item.tsx +6 -5
  34. package/src/components/kbd.tsx +1 -1
  35. package/src/components/label.tsx +5 -4
  36. package/src/components/multi-select.tsx +9 -17
  37. package/src/components/og-image.tsx +6 -3
  38. package/src/components/popover.tsx +4 -3
  39. package/src/components/preloader.tsx +2 -1
  40. package/src/components/progress.tsx +4 -3
  41. package/src/components/radio-group.tsx +6 -4
  42. package/src/components/resizable.tsx +5 -4
  43. package/src/components/scroll-area.tsx +4 -3
  44. package/src/components/select.tsx +6 -4
  45. package/src/components/separator.tsx +4 -3
  46. package/src/components/sheet.tsx +7 -5
  47. package/src/components/skeleton.tsx +1 -1
  48. package/src/components/slider.tsx +4 -3
  49. package/src/components/spinner.tsx +2 -2
  50. package/src/components/switch.tsx +4 -3
  51. package/src/components/table.tsx +2 -2
  52. package/src/components/tabs.tsx +10 -15
  53. package/src/components/textarea.tsx +2 -2
  54. package/src/components/toast.tsx +2 -1
  55. package/src/components/toaster.tsx +1 -1
  56. package/src/components/toggle-group.tsx +6 -5
  57. package/src/components/toggle.tsx +5 -4
  58. package/src/components/token-icon.tsx +9 -4
  59. package/src/components/tooltip-provider-safe.tsx +1 -0
  60. package/src/components/tooltip.tsx +4 -3
  61. package/src/hooks/useDebounce.ts +1 -1
  62. package/src/hooks/useImageLoader.ts +1 -1
  63. package/src/hooks/useMediaQuery.ts +1 -1
  64. package/src/lib/utils.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/ui-core",
3
- "version": "2.1.41",
3
+ "version": "2.1.43",
4
4
  "description": "Pure React UI component library without Next.js dependencies - for Electron, Vite, CRA apps",
5
5
  "keywords": [
6
6
  "ui-components",
@@ -102,7 +102,7 @@
102
102
  "vaul": "1.1.2"
103
103
  },
104
104
  "devDependencies": {
105
- "@djangocfg/typescript-config": "^2.1.41",
105
+ "@djangocfg/typescript-config": "^2.1.43",
106
106
  "@types/node": "^24.7.2",
107
107
  "@types/react": "^19.1.0",
108
108
  "@types/react-dom": "^19.1.0",
@@ -1,15 +1,11 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import {
5
- ChevronDownIcon,
6
- ChevronLeftIcon,
7
- ChevronRightIcon,
8
- } from "lucide-react"
9
- import { DayButton, DayPicker, getDefaultClassNames } from "react-day-picker"
3
+ import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
4
+ import * as React from 'react';
5
+ import { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';
10
6
 
11
- import { cn } from "../../lib/utils"
12
- import { Button, buttonVariants } from "../../components/button"
7
+ import { Button, buttonVariants } from '../../components/button';
8
+ import { cn } from '../../lib/utils';
13
9
 
14
10
  function Calendar({
15
11
  className,
@@ -1,14 +1,15 @@
1
1
  'use client'
2
2
 
3
- import * as React from 'react'
4
- import { format } from 'date-fns'
5
- import { CalendarIcon } from 'lucide-react'
6
- import type { SelectSingleEventHandler } from 'react-day-picker'
3
+ import { format } from 'date-fns';
4
+ import { CalendarIcon } from 'lucide-react';
5
+ import * as React from 'react';
6
+
7
+ import { Button } from '../../components/button';
8
+ import { Popover, PopoverContent, PopoverTrigger } from '../../components/popover';
9
+ import { cn } from '../../lib/utils';
10
+ import { Calendar } from './calendar';
7
11
 
8
- import { cn } from '../../lib/utils'
9
- import { Button } from '../../components/button'
10
- import { Calendar } from './calendar'
11
- import { Popover, PopoverContent, PopoverTrigger } from '../../components/popover'
12
+ import type { SelectSingleEventHandler } from 'react-day-picker'
12
13
 
13
14
  // =============================================================================
14
15
  // DatePicker - Single date selection with popover
@@ -1,9 +1,11 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as AccordionPrimitive from "@radix-ui/react-accordion"
5
- import { cn } from "../lib/utils"
6
- import { ChevronDownIcon } from "@radix-ui/react-icons"
3
+ import * as React from 'react';
4
+
5
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
6
+ import { ChevronDownIcon } from '@radix-ui/react-icons';
7
+
8
+ import { cn } from '../lib/utils';
7
9
 
8
10
  const Accordion = AccordionPrimitive.Root
9
11
 
@@ -1,10 +1,11 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
3
+ import * as React from 'react';
5
4
 
6
- import { cn } from "../lib/utils"
7
- import { buttonVariants } from "./button"
5
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
6
+
7
+ import { cn } from '../lib/utils';
8
+ import { buttonVariants } from './button';
8
9
 
9
10
  const AlertDialog = AlertDialogPrimitive.Root
10
11
 
@@ -1,7 +1,7 @@
1
- import * as React from "react"
2
- import { cva, type VariantProps } from "class-variance-authority"
1
+ import { cva, type VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
3
 
4
- import { cn } from "../lib/utils"
4
+ import { cn } from '../lib/utils';
5
5
 
6
6
  const alertVariants = cva(
7
7
  "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
 
3
- import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
3
+ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
4
4
 
5
5
  const AspectRatio = AspectRatioPrimitive.Root
6
6
 
@@ -1,9 +1,10 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as AvatarPrimitive from "@radix-ui/react-avatar"
3
+ import * as React from 'react';
5
4
 
6
- import { cn } from "../lib/utils"
5
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
6
+
7
+ import { cn } from '../lib/utils';
7
8
 
8
9
  const Avatar = React.forwardRef<
9
10
  React.ElementRef<typeof AvatarPrimitive.Root>,
@@ -1,7 +1,7 @@
1
- import * as React from "react"
2
- import { cva, type VariantProps } from "class-variance-authority"
1
+ import { cva, type VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
3
 
4
- import { cn } from "../lib/utils"
4
+ import { cn } from '../lib/utils';
5
5
 
6
6
  const badgeVariants = cva(
7
7
  "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
@@ -1,10 +1,11 @@
1
1
  "use client"
2
2
 
3
- import { Slot } from "@radix-ui/react-slot"
4
- import { cva, type VariantProps } from "class-variance-authority"
3
+ import { cva, type VariantProps } from 'class-variance-authority';
5
4
 
6
- import { cn } from "../lib/utils"
7
- import { Separator } from "./separator"
5
+ import { Slot } from '@radix-ui/react-slot';
6
+
7
+ import { cn } from '../lib/utils';
8
+ import { Separator } from './separator';
8
9
 
9
10
  const buttonGroupVariants = cva(
10
11
  "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
@@ -1,11 +1,12 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import { Slot } from "@radix-ui/react-slot"
5
- import { cva, type VariantProps } from "class-variance-authority"
6
- import { Loader2 } from "lucide-react"
3
+ import { cva, type VariantProps } from 'class-variance-authority';
4
+ import { Loader2 } from 'lucide-react';
5
+ import * as React from 'react';
7
6
 
8
- import { cn } from "../lib/utils"
7
+ import { Slot } from '@radix-ui/react-slot';
8
+
9
+ import { cn } from '../lib/utils';
9
10
 
10
11
  const buttonVariants = cva(
11
12
  "inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
@@ -1,15 +1,11 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import {
5
- ChevronDownIcon,
6
- ChevronLeftIcon,
7
- ChevronRightIcon,
8
- } from "lucide-react"
9
- import { DayButton, DayPicker, getDefaultClassNames } from "react-day-picker"
3
+ import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
4
+ import * as React from 'react';
5
+ import { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';
10
6
 
11
- import { cn } from "../../lib/utils"
12
- import { Button, buttonVariants } from "../button"
7
+ import { cn } from '../../lib/utils';
8
+ import { Button, buttonVariants } from '../button';
13
9
 
14
10
  function Calendar({
15
11
  className,
@@ -1,14 +1,15 @@
1
1
  'use client'
2
2
 
3
- import * as React from 'react'
4
- import { format } from 'date-fns'
5
- import { CalendarIcon } from 'lucide-react'
6
- import type { SelectSingleEventHandler, DateRange as RDPDateRange } from 'react-day-picker'
3
+ import { format } from 'date-fns';
4
+ import { CalendarIcon } from 'lucide-react';
5
+ import * as React from 'react';
6
+
7
+ import { cn } from '../../lib/utils';
8
+ import { Button } from '../button';
9
+ import { Popover, PopoverContent, PopoverTrigger } from '../popover';
10
+ import { Calendar } from './calendar';
7
11
 
8
- import { cn } from '../../lib/utils'
9
- import { Button } from '../button'
10
- import { Calendar } from './calendar'
11
- import { Popover, PopoverContent, PopoverTrigger } from '../popover'
12
+ import type { SelectSingleEventHandler, DateRange as RDPDateRange } from 'react-day-picker'
12
13
 
13
14
  // =============================================================================
14
15
  // DatePicker - Single date selection with popover
@@ -1,6 +1,6 @@
1
- import * as React from "react"
1
+ import * as React from 'react';
2
2
 
3
- import { cn } from "../lib/utils"
3
+ import { cn } from '../lib/utils';
4
4
 
5
5
  const Card = React.forwardRef<
6
6
  HTMLDivElement,
@@ -1,12 +1,12 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import useEmblaCarousel, {
5
- type UseEmblaCarouselType,
6
- } from "embla-carousel-react"
7
- import { cn } from "../lib/utils"
8
- import { Button } from "./button"
9
- import { ArrowLeftIcon, ArrowRightIcon } from "@radix-ui/react-icons"
3
+ import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';
4
+ import * as React from 'react';
5
+
6
+ import { ArrowLeftIcon, ArrowRightIcon } from '@radix-ui/react-icons';
7
+
8
+ import { cn } from '../lib/utils';
9
+ import { Button } from './button';
10
10
 
11
11
  type CarouselApi = UseEmblaCarouselType[1]
12
12
  type UseCarouselParameters = Parameters<typeof useEmblaCarousel>
@@ -1,9 +1,9 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as RechartsPrimitive from "recharts"
3
+ import * as React from 'react';
4
+ import * as RechartsPrimitive from 'recharts';
5
5
 
6
- import { cn } from "../lib/utils"
6
+ import { cn } from '../lib/utils';
7
7
 
8
8
  // Format: { THEME_NAME: CSS_SELECTOR }
9
9
  const THEMES = { light: "", dark: ".dark" } as const
@@ -1,9 +1,11 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
5
- import { cn } from "../lib/utils"
6
- import { CheckIcon } from "@radix-ui/react-icons"
3
+ import * as React from 'react';
4
+
5
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
6
+ import { CheckIcon } from '@radix-ui/react-icons';
7
+
8
+ import { cn } from '../lib/utils';
7
9
 
8
10
  const Checkbox = React.forwardRef<
9
11
  React.ElementRef<typeof CheckboxPrimitive.Root>,
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
 
3
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
3
+ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
4
4
 
5
5
  const Collapsible = CollapsiblePrimitive.Root
6
6
 
@@ -1,22 +1,14 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import { Check, ChevronsUpDown } from "lucide-react"
5
- import { cn } from "../lib/utils"
6
- import { Button } from "./button"
7
- import {
8
- Command,
9
- CommandEmpty,
10
- CommandGroup,
11
- CommandInput,
12
- CommandItem,
13
- CommandList,
14
- } from "./command"
3
+ import { Check, ChevronsUpDown } from 'lucide-react';
4
+ import * as React from 'react';
5
+
6
+ import { cn } from '../lib/utils';
7
+ import { Button } from './button';
15
8
  import {
16
- Popover,
17
- PopoverContent,
18
- PopoverTrigger,
19
- } from "./popover"
9
+ Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList
10
+ } from './command';
11
+ import { Popover, PopoverContent, PopoverTrigger } from './popover';
20
12
 
21
13
  export interface ComboboxOption {
22
14
  value: string
@@ -1,11 +1,13 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import { type DialogProps } from "@radix-ui/react-dialog"
5
- import { Command as CommandPrimitive } from "cmdk"
6
- import { cn } from "../lib/utils"
7
- import { Dialog, DialogContent } from "./dialog"
8
- import { MagnifyingGlassIcon } from "@radix-ui/react-icons"
3
+ import { Command as CommandPrimitive } from 'cmdk';
4
+ import * as React from 'react';
5
+
6
+ import { DialogProps} from '@radix-ui/react-dialog';
7
+ import { MagnifyingGlassIcon } from '@radix-ui/react-icons';
8
+
9
+ import { cn } from '../lib/utils';
10
+ import { Dialog, DialogContent } from './dialog';
9
11
 
10
12
  const Command = React.forwardRef<
11
13
  React.ElementRef<typeof CommandPrimitive>,
@@ -1,9 +1,11 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as ContextMenuPrimitive from "@radix-ui/react-context-menu"
5
- import { cn } from "../lib/utils"
6
- import { CheckIcon, ChevronRightIcon, DotFilledIcon } from "@radix-ui/react-icons"
3
+ import * as React from 'react';
4
+
5
+ import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
6
+ import { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';
7
+
8
+ import { cn } from '../lib/utils';
7
9
 
8
10
  const ContextMenu = ContextMenuPrimitive.Root
9
11
 
@@ -1,9 +1,10 @@
1
1
  'use client'
2
2
 
3
- import * as React from 'react'
4
- import { Check, Copy } from 'lucide-react'
5
- import { cn } from '../lib/utils'
6
- import { Button } from './button'
3
+ import { Check, Copy } from 'lucide-react';
4
+ import * as React from 'react';
5
+
6
+ import { cn } from '../lib/utils';
7
+ import { Button } from './button';
7
8
 
8
9
  // =============================================================================
9
10
  // CopyButton - Copy button with icon feedback
@@ -1,9 +1,11 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as DialogPrimitive from "@radix-ui/react-dialog"
5
- import { cn } from "../lib/utils"
6
- import { Cross2Icon } from "@radix-ui/react-icons"
3
+ import * as React from 'react';
4
+
5
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
6
+ import { Cross2Icon } from '@radix-ui/react-icons';
7
+
8
+ import { cn } from '../lib/utils';
7
9
 
8
10
  const Dialog = DialogPrimitive.Root
9
11
 
@@ -1,9 +1,9 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import { Drawer as DrawerPrimitive } from "vaul"
3
+ import * as React from 'react';
4
+ import { Drawer as DrawerPrimitive } from 'vaul';
5
5
 
6
- import { cn } from "../lib/utils"
6
+ import { cn } from '../lib/utils';
7
7
 
8
8
  const Drawer = ({
9
9
  shouldScaleBackground = true,
@@ -1,6 +1,6 @@
1
- import { cva, type VariantProps } from "class-variance-authority"
1
+ import { cva, type VariantProps } from 'class-variance-authority';
2
2
 
3
- import { cn } from "../lib/utils"
3
+ import { cn } from '../lib/utils';
4
4
 
5
5
  function Empty({ className, ...props }: React.ComponentProps<"div">) {
6
6
  return (
@@ -1,11 +1,11 @@
1
1
  "use client"
2
2
 
3
- import { useMemo } from "react"
4
- import { cva, type VariantProps } from "class-variance-authority"
3
+ import { cva, type VariantProps } from 'class-variance-authority';
4
+ import { useMemo } from 'react';
5
5
 
6
- import { cn } from "../lib/utils"
7
- import { Label } from "./label"
8
- import { Separator } from "./separator"
6
+ import { cn } from '../lib/utils';
7
+ import { Label } from './label';
8
+ import { Separator } from './separator';
9
9
 
10
10
  function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
11
11
  return (
@@ -1,19 +1,15 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as LabelPrimitive from "@radix-ui/react-label"
5
- import { Slot } from "@radix-ui/react-slot"
3
+ import * as React from 'react';
6
4
  import {
7
- Controller,
8
- FormProvider,
9
- useFormContext,
10
- type ControllerProps,
11
- type FieldPath,
12
- type FieldValues,
13
- } from "react-hook-form"
14
-
15
- import { cn } from "../lib/utils"
16
- import { Label } from "./label"
5
+ Controller, ControllerProps, FieldPath, FieldValues, FormProvider, useFormContext
6
+ } from 'react-hook-form';
7
+
8
+ import * as LabelPrimitive from '@radix-ui/react-label';
9
+ import { Slot } from '@radix-ui/react-slot';
10
+
11
+ import { cn } from '../lib/utils';
12
+ import { Label } from './label';
17
13
 
18
14
  const Form = FormProvider
19
15
 
@@ -1,9 +1,10 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as HoverCardPrimitive from "@radix-ui/react-hover-card"
3
+ import * as React from 'react';
5
4
 
6
- import { cn } from "../lib/utils"
5
+ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
6
+
7
+ import { cn } from '../lib/utils';
7
8
 
8
9
  const HoverCard = HoverCardPrimitive.Root
9
10
 
@@ -4,10 +4,11 @@
4
4
  * Advanced image component with loading states, error handling, and customizable fallbacks
5
5
  */
6
6
 
7
+ import { Car, ImageIcon, MapPin, Package, User } from 'lucide-react';
7
8
  import React, { forwardRef } from 'react';
8
- import { Car, ImageIcon, User, Package, MapPin } from 'lucide-react';
9
- import { cn } from '../lib/utils';
9
+
10
10
  import { useImageLoader } from '../hooks/useImageLoader';
11
+ import { cn } from '../lib/utils';
11
12
 
12
13
  export interface ImageWithFallbackProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'onLoad' | 'onError'> {
13
14
  src?: string;
@@ -1,12 +1,12 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import { cva, type VariantProps } from "class-variance-authority"
3
+ import { cva, type VariantProps } from 'class-variance-authority';
4
+ import * as React from 'react';
5
5
 
6
- import { cn } from "../lib/utils"
7
- import { Button } from "./button"
8
- import { Input } from "./input"
9
- import { Textarea } from "./textarea"
6
+ import { cn } from '../lib/utils';
7
+ import { Button } from './button';
8
+ import { Input } from './input';
9
+ import { Textarea } from './textarea';
10
10
 
11
11
  function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
12
12
  return (
@@ -1,9 +1,11 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import { OTPInput, OTPInputContext, type OTPInputProps as BaseOTPInputProps } from "input-otp"
5
- import { cn } from "../lib/utils"
6
- import { MinusIcon } from "@radix-ui/react-icons"
3
+ import { OTPInput, OTPInputContext, OTPInputProps as BaseOTPInputProps} from 'input-otp';
4
+ import * as React from 'react';
5
+
6
+ import { MinusIcon } from '@radix-ui/react-icons';
7
+
8
+ import { cn } from '../lib/utils';
7
9
 
8
10
  type ChildrenBranch = Extract<BaseOTPInputProps, { render?: never }>;
9
11
  type InputOTPProps = Omit<ChildrenBranch, 'className' | 'containerClassName'> & {
@@ -1,6 +1,6 @@
1
- import * as React from "react"
1
+ import * as React from 'react';
2
2
 
3
- import { cn } from "../lib/utils"
3
+ import { cn } from '../lib/utils';
4
4
 
5
5
  const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
6
6
  ({ className, type, ...props }, ref) => {
@@ -1,11 +1,12 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import { Slot } from "@radix-ui/react-slot"
5
- import { cva, type VariantProps } from "class-variance-authority"
3
+ import { cva, type VariantProps } from 'class-variance-authority';
4
+ import * as React from 'react';
6
5
 
7
- import { cn } from "../lib/utils"
8
- import { Separator } from "./separator"
6
+ import { Slot } from '@radix-ui/react-slot';
7
+
8
+ import { cn } from '../lib/utils';
9
+ import { Separator } from './separator';
9
10
 
10
11
  function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
11
12
  return (
@@ -1,4 +1,4 @@
1
- import { cn } from "../lib/utils"
1
+ import { cn } from '../lib/utils';
2
2
 
3
3
  type KbdSize = "xs" | "sm" | "default" | "lg";
4
4
 
@@ -1,10 +1,11 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as LabelPrimitive from "@radix-ui/react-label"
5
- import { cva, type VariantProps } from "class-variance-authority"
3
+ import { cva, type VariantProps } from 'class-variance-authority';
4
+ import * as React from 'react';
6
5
 
7
- import { cn } from "../lib/utils"
6
+ import * as LabelPrimitive from '@radix-ui/react-label';
7
+
8
+ import { cn } from '../lib/utils';
8
9
 
9
10
  const labelVariants = cva(
10
11
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
@@ -1,23 +1,15 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import { Check, ChevronsUpDown, X } from "lucide-react"
5
- import { cn } from "../lib/utils"
6
- import { Button } from "./button"
7
- import {
8
- Command,
9
- CommandEmpty,
10
- CommandGroup,
11
- CommandInput,
12
- CommandItem,
13
- CommandList,
14
- } from "./command"
3
+ import { Check, ChevronsUpDown, X } from 'lucide-react';
4
+ import * as React from 'react';
5
+
6
+ import { cn } from '../lib/utils';
7
+ import { Badge } from './badge';
8
+ import { Button } from './button';
15
9
  import {
16
- Popover,
17
- PopoverContent,
18
- PopoverTrigger,
19
- } from "./popover"
20
- import { Badge } from "./badge"
10
+ Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList
11
+ } from './command';
12
+ import { Popover, PopoverContent, PopoverTrigger } from './popover';
21
13
 
22
14
  export interface MultiSelectOption {
23
15
  value: string
@@ -1,8 +1,11 @@
1
1
  'use client'
2
2
 
3
- import * as React from 'react'
4
- import { generateOgImageUrl, type OgImageUrlParams, type GenerateOgImageUrlOptions } from '../lib/og-image'
5
- import { cn } from '../lib/utils'
3
+ import * as React from 'react';
4
+
5
+ import {
6
+ generateOgImageUrl, type GenerateOgImageUrlOptions, type OgImageUrlParams
7
+ } from '../lib/og-image';
8
+ import { cn } from '../lib/utils';
6
9
 
7
10
  export interface OgImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
8
11
  /** OG Image parameters */
@@ -1,9 +1,10 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as PopoverPrimitive from "@radix-ui/react-popover"
3
+ import * as React from 'react';
5
4
 
6
- import { cn } from "../lib/utils"
5
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
6
+
7
+ import { cn } from '../lib/utils';
7
8
 
8
9
  const Popover = PopoverPrimitive.Root
9
10
 
@@ -7,8 +7,9 @@
7
7
 
8
8
  'use client';
9
9
 
10
- import React from 'react';
11
10
  import { Loader2 } from 'lucide-react';
11
+ import React from 'react';
12
+
12
13
  import { cn } from '../lib/utils';
13
14
  import { Spinner } from './spinner';
14
15
 
@@ -1,9 +1,10 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as ProgressPrimitive from "@radix-ui/react-progress"
3
+ import * as React from 'react';
5
4
 
6
- import { cn } from "../lib/utils"
5
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
6
+
7
+ import { cn } from '../lib/utils';
7
8
 
8
9
  const Progress = React.forwardRef<
9
10
  React.ElementRef<typeof ProgressPrimitive.Root>,
@@ -1,9 +1,11 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"
5
- import { cn } from "../lib/utils"
6
- import { DotFilledIcon } from "@radix-ui/react-icons"
3
+ import * as React from 'react';
4
+
5
+ import { DotFilledIcon } from '@radix-ui/react-icons';
6
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
7
+
8
+ import { cn } from '../lib/utils';
7
9
 
8
10
  const RadioGroup = React.forwardRef<
9
11
  React.ElementRef<typeof RadioGroupPrimitive.Root>,
@@ -1,9 +1,10 @@
1
1
  "use client"
2
- import * as React from "react"
3
- import * as ResizablePrimitive from "react-resizable-panels"
2
+ import * as React from 'react';
3
+ import * as ResizablePrimitive from 'react-resizable-panels';
4
4
 
5
- import { cn } from "../lib/utils"
6
- import { DragHandleDots2Icon } from "@radix-ui/react-icons"
5
+ import { DragHandleDots2Icon } from '@radix-ui/react-icons';
6
+
7
+ import { cn } from '../lib/utils';
7
8
 
8
9
  // Context to share dragging state across panel group
9
10
  const ResizableDraggingContext = React.createContext<{
@@ -1,9 +1,10 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
3
+ import * as React from 'react';
5
4
 
6
- import { cn } from "../lib/utils"
5
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
6
+
7
+ import { cn } from '../lib/utils';
7
8
 
8
9
  /**
9
10
  * ScrollArea imperative handle for programmatic control
@@ -1,9 +1,11 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as SelectPrimitive from "@radix-ui/react-select"
5
- import { cn } from "../lib/utils"
6
- import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "@radix-ui/react-icons"
3
+ import * as React from 'react';
4
+
5
+ import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons';
6
+ import * as SelectPrimitive from '@radix-ui/react-select';
7
+
8
+ import { cn } from '../lib/utils';
7
9
 
8
10
  const Select = SelectPrimitive.Root
9
11
 
@@ -1,9 +1,10 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as SeparatorPrimitive from "@radix-ui/react-separator"
3
+ import * as React from 'react';
5
4
 
6
- import { cn } from "../lib/utils"
5
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
6
+
7
+ import { cn } from '../lib/utils';
7
8
 
8
9
  const Separator = React.forwardRef<
9
10
  React.ElementRef<typeof SeparatorPrimitive.Root>,
@@ -1,10 +1,12 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as SheetPrimitive from "@radix-ui/react-dialog"
5
- import { cva, type VariantProps } from "class-variance-authority"
6
- import { cn } from "../lib/utils"
7
- import { Cross2Icon } from "@radix-ui/react-icons"
3
+ import { cva, type VariantProps } from 'class-variance-authority';
4
+ import * as React from 'react';
5
+
6
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
7
+ import { Cross2Icon } from '@radix-ui/react-icons';
8
+
9
+ import { cn } from '../lib/utils';
8
10
 
9
11
  const Sheet = SheetPrimitive.Root
10
12
 
@@ -1,4 +1,4 @@
1
- import { cn } from "../lib/utils"
1
+ import { cn } from '../lib/utils';
2
2
 
3
3
  function Skeleton({
4
4
  className,
@@ -1,9 +1,10 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as SliderPrimitive from "@radix-ui/react-slider"
3
+ import * as React from 'react';
5
4
 
6
- import { cn } from "../lib/utils"
5
+ import * as SliderPrimitive from '@radix-ui/react-slider';
6
+
7
+ import { cn } from '../lib/utils';
7
8
 
8
9
  const Slider = React.forwardRef<
9
10
  React.ElementRef<typeof SliderPrimitive.Root>,
@@ -1,6 +1,6 @@
1
- import { Loader2Icon } from "lucide-react"
1
+ import { Loader2Icon } from 'lucide-react';
2
2
 
3
- import { cn } from "../lib/utils"
3
+ import { cn } from '../lib/utils';
4
4
 
5
5
  function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
6
6
  return (
@@ -1,9 +1,10 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as SwitchPrimitives from "@radix-ui/react-switch"
3
+ import * as React from 'react';
5
4
 
6
- import { cn } from "../lib/utils"
5
+ import * as SwitchPrimitives from '@radix-ui/react-switch';
6
+
7
+ import { cn } from '../lib/utils';
7
8
 
8
9
  const Switch = React.forwardRef<
9
10
  React.ElementRef<typeof SwitchPrimitives.Root>,
@@ -1,6 +1,6 @@
1
- import * as React from "react"
1
+ import * as React from 'react';
2
2
 
3
- import { cn } from "../lib/utils"
3
+ import { cn } from '../lib/utils';
4
4
 
5
5
  const Table = React.forwardRef<
6
6
  HTMLTableElement,
@@ -1,20 +1,15 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as TabsPrimitive from "@radix-ui/react-tabs"
5
- import { Menu } from "lucide-react"
6
-
7
- import { cn } from "../lib/utils"
8
- import { useIsMobile } from "../hooks"
9
- import {
10
- Sheet,
11
- SheetContent,
12
- SheetHeader,
13
- SheetTitle,
14
- SheetTrigger,
15
- } from "./sheet"
16
- import { Button } from "./button"
17
- import { ScrollArea, ScrollBar } from "./scroll-area"
3
+ import { Menu } from 'lucide-react';
4
+ import * as React from 'react';
5
+
6
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
7
+
8
+ import { useIsMobile } from '../hooks';
9
+ import { cn } from '../lib/utils';
10
+ import { Button } from './button';
11
+ import { ScrollArea, ScrollBar } from './scroll-area';
12
+ import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from './sheet';
18
13
 
19
14
  // ─────────────────────────────────────────────────────────────────────────
20
15
  // Tabs Root with Mobile Sheet Support
@@ -1,6 +1,6 @@
1
- import * as React from "react"
1
+ import * as React from 'react';
2
2
 
3
- import { cn } from "../lib/utils"
3
+ import { cn } from '../lib/utils';
4
4
 
5
5
  const Textarea = React.forwardRef<
6
6
  HTMLTextAreaElement,
@@ -4,9 +4,10 @@ import { cva, type VariantProps } from 'class-variance-authority';
4
4
  import { X } from 'lucide-react';
5
5
  import * as React from 'react';
6
6
 
7
- import { cn } from '../lib/utils';
8
7
  import * as ToastPrimitives from '@radix-ui/react-toast';
9
8
 
9
+ import { cn } from '../lib/utils';
10
+
10
11
  const ToastProvider = ToastPrimitives.Provider
11
12
 
12
13
  const ToastViewport = React.forwardRef<
@@ -1,8 +1,8 @@
1
1
  "use client"
2
2
 
3
3
  import { useEffect, useState } from 'react';
4
- import { useToast } from '../hooks/useToast';
5
4
 
5
+ import { useToast } from '../hooks/useToast';
6
6
  import {
7
7
  Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport
8
8
  } from './toast';
@@ -1,11 +1,12 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"
5
- import { type VariantProps } from "class-variance-authority"
3
+ import { type VariantProps } from 'class-variance-authority';
4
+ import * as React from 'react';
6
5
 
7
- import { cn } from "../lib/utils"
8
- import { toggleVariants } from "./toggle"
6
+ import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
7
+
8
+ import { cn } from '../lib/utils';
9
+ import { toggleVariants } from './toggle';
9
10
 
10
11
  const ToggleGroupContext = React.createContext<
11
12
  VariantProps<typeof toggleVariants>
@@ -1,10 +1,11 @@
1
1
  "use client"
2
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"
3
+ import { cva, type VariantProps } from 'class-variance-authority';
4
+ import * as React from 'react';
6
5
 
7
- import { cn } from "../lib/utils"
6
+ import * as TogglePrimitive from '@radix-ui/react-toggle';
7
+
8
+ import { cn } from '../lib/utils';
8
9
 
9
10
  const toggleVariants = cva(
10
11
  "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring 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",
@@ -1,7 +1,8 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import { cn } from "../lib/utils"
3
+ import * as React from 'react';
4
+
5
+ import { cn } from '../lib/utils';
5
6
 
6
7
  export interface TokenIconProps extends React.HTMLAttributes<HTMLDivElement> {
7
8
  symbol: string
@@ -131,6 +132,10 @@ export function TokenIcon({
131
132
  }
132
133
  }, [symbol])
133
134
 
135
+ // Pre-compute fallback values
136
+ const fallbackFontSize = Math.max(8, size * 0.4)
137
+ const truncatedSymbol = symbol?.slice(0, 3) || '?'
138
+
134
139
  return (
135
140
  <div
136
141
  className={cn("inline-flex items-center justify-center flex-shrink-0", className)}
@@ -146,9 +151,9 @@ export function TokenIcon({
146
151
  // Fallback: show symbol as text
147
152
  <span
148
153
  className="text-muted-foreground font-medium uppercase"
149
- style={{ fontSize: Math.max(8, size * 0.4) }}
154
+ style={{ fontSize: fallbackFontSize }}
150
155
  >
151
- {symbol?.slice(0, 3) || '?'}
156
+ {truncatedSymbol}
152
157
  </span>
153
158
  )}
154
159
  </div>
@@ -1,6 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from 'react';
4
+
4
5
  import { TooltipProvider as RadixTooltipProvider } from '@radix-ui/react-tooltip';
5
6
 
6
7
  interface SafeTooltipProviderProps {
@@ -1,9 +1,10 @@
1
1
  "use client"
2
2
 
3
- import * as React from "react"
4
- import * as TooltipPrimitive from "@radix-ui/react-tooltip"
3
+ import * as React from 'react';
5
4
 
6
- import { cn } from "../lib/utils"
5
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
6
+
7
+ import { cn } from '../lib/utils';
7
8
 
8
9
  const TooltipProvider = TooltipPrimitive.Provider
9
10
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  'use client';
8
8
 
9
- import { useState, useEffect } from 'react';
9
+ import { useEffect, useState } from 'react';
10
10
 
11
11
  export function useDebounce<T>(value: T, delay: number = 300): T {
12
12
  const [debouncedValue, setDebouncedValue] = useState<T>(value);
@@ -6,7 +6,7 @@
6
6
 
7
7
  'use client';
8
8
 
9
- import { useState, useEffect, useCallback } from 'react';
9
+ import { useCallback, useEffect, useState } from 'react';
10
10
 
11
11
  export interface ImageLoaderState {
12
12
  isLoading: boolean;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { useState, useEffect } from 'react';
3
+ import { useEffect, useState } from 'react';
4
4
 
5
5
  /**
6
6
  * Hook to check if a media query matches
package/src/lib/utils.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type ClassValue, clsx } from 'clsx';
1
+ import { ClassValue, clsx} from 'clsx';
2
2
  import { twMerge } from 'tailwind-merge';
3
3
 
4
4
  export function cn(...inputs: ClassValue[]) {