@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.
- package/package.json +2 -2
- package/src/components/@old/calendar.tsx +5 -9
- package/src/components/@old/date-picker.tsx +9 -8
- package/src/components/accordion.tsx +6 -4
- package/src/components/alert-dialog.tsx +5 -4
- package/src/components/alert.tsx +3 -3
- package/src/components/aspect-ratio.tsx +1 -1
- package/src/components/avatar.tsx +4 -3
- package/src/components/badge.tsx +3 -3
- package/src/components/button-group.tsx +5 -4
- package/src/components/button.tsx +6 -5
- package/src/components/calendar/calendar.tsx +5 -9
- package/src/components/calendar/date-picker.tsx +9 -8
- package/src/components/card.tsx +2 -2
- package/src/components/carousel.tsx +7 -7
- package/src/components/chart.tsx +3 -3
- package/src/components/checkbox.tsx +6 -4
- package/src/components/collapsible.tsx +1 -1
- package/src/components/combobox.tsx +8 -16
- package/src/components/command.tsx +8 -6
- package/src/components/context-menu.tsx +6 -4
- package/src/components/copy.tsx +5 -4
- package/src/components/dialog.tsx +6 -4
- package/src/components/drawer.tsx +3 -3
- package/src/components/empty.tsx +2 -2
- package/src/components/field.tsx +5 -5
- package/src/components/form.tsx +9 -13
- package/src/components/hover-card.tsx +4 -3
- package/src/components/image-with-fallback.tsx +3 -2
- package/src/components/input-group.tsx +6 -6
- package/src/components/input-otp.tsx +6 -4
- package/src/components/input.tsx +2 -2
- package/src/components/item.tsx +6 -5
- package/src/components/kbd.tsx +1 -1
- package/src/components/label.tsx +5 -4
- package/src/components/multi-select.tsx +9 -17
- package/src/components/og-image.tsx +6 -3
- package/src/components/popover.tsx +4 -3
- package/src/components/preloader.tsx +2 -1
- package/src/components/progress.tsx +4 -3
- package/src/components/radio-group.tsx +6 -4
- package/src/components/resizable.tsx +5 -4
- package/src/components/scroll-area.tsx +4 -3
- package/src/components/select.tsx +6 -4
- package/src/components/separator.tsx +4 -3
- package/src/components/sheet.tsx +7 -5
- package/src/components/skeleton.tsx +1 -1
- package/src/components/slider.tsx +4 -3
- package/src/components/spinner.tsx +2 -2
- package/src/components/switch.tsx +4 -3
- package/src/components/table.tsx +2 -2
- package/src/components/tabs.tsx +10 -15
- package/src/components/textarea.tsx +2 -2
- package/src/components/toast.tsx +2 -1
- package/src/components/toaster.tsx +1 -1
- package/src/components/toggle-group.tsx +6 -5
- package/src/components/toggle.tsx +5 -4
- package/src/components/token-icon.tsx +9 -4
- package/src/components/tooltip-provider-safe.tsx +1 -0
- package/src/components/tooltip.tsx +4 -3
- package/src/hooks/useDebounce.ts +1 -1
- package/src/hooks/useImageLoader.ts +1 -1
- package/src/hooks/useMediaQuery.ts +1 -1
- 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.
|
|
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.
|
|
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
|
|
4
|
-
import
|
|
5
|
-
|
|
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 {
|
|
12
|
-
import {
|
|
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
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
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 {
|
|
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
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import { ChevronDownIcon } from
|
|
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
|
|
4
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
|
|
6
|
-
import
|
|
7
|
-
|
|
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
|
|
package/src/components/alert.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
|
|
4
|
-
import { cn } from
|
|
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,9 +1,10 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as AvatarPrimitive from "@radix-ui/react-avatar"
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
|
|
6
|
-
import
|
|
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>,
|
package/src/components/badge.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
|
|
4
|
-
import { cn } from
|
|
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 {
|
|
4
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
5
4
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
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
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
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 {
|
|
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
|
|
4
|
-
import
|
|
5
|
-
|
|
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
|
|
12
|
-
import { Button, buttonVariants } from
|
|
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
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
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 {
|
|
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
|
package/src/components/card.tsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
} from
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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>
|
package/src/components/chart.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as RechartsPrimitive from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as RechartsPrimitive from 'recharts';
|
|
5
5
|
|
|
6
|
-
import { cn } from
|
|
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
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import { CheckIcon } from
|
|
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,22 +1,14 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import {
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
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
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import { CheckIcon, ChevronRightIcon, DotFilledIcon } from
|
|
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
|
|
package/src/components/copy.tsx
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import {
|
|
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
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import { Cross2Icon } from
|
|
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
|
|
4
|
-
import { Drawer as DrawerPrimitive } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
5
5
|
|
|
6
|
-
import { cn } from
|
|
6
|
+
import { cn } from '../lib/utils';
|
|
7
7
|
|
|
8
8
|
const Drawer = ({
|
|
9
9
|
shouldScaleBackground = true,
|
package/src/components/empty.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cva, type VariantProps } from
|
|
1
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
2
|
|
|
3
|
-
import { cn } from
|
|
3
|
+
import { cn } from '../lib/utils';
|
|
4
4
|
|
|
5
5
|
function Empty({ className, ...props }: React.ComponentProps<"div">) {
|
|
6
6
|
return (
|
package/src/components/field.tsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
5
|
|
|
6
|
-
import { cn } from
|
|
7
|
-
import { Label } from
|
|
8
|
-
import { Separator } from
|
|
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 (
|
package/src/components/form.tsx
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from
|
|
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
|
|
4
|
-
import * as HoverCardPrimitive from "@radix-ui/react-hover-card"
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
|
|
6
|
-
import
|
|
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
|
-
|
|
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
|
|
4
|
-
import
|
|
3
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as React from 'react';
|
|
5
5
|
|
|
6
|
-
import { cn } from
|
|
7
|
-
import { Button } from
|
|
8
|
-
import { Input } from
|
|
9
|
-
import { Textarea } from
|
|
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
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import { MinusIcon } from
|
|
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'> & {
|
package/src/components/input.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import { cn } from
|
|
3
|
+
import { cn } from '../lib/utils';
|
|
4
4
|
|
|
5
5
|
const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
|
|
6
6
|
({ className, type, ...props }, ref) => {
|
package/src/components/item.tsx
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
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 {
|
|
8
|
-
|
|
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 (
|
package/src/components/kbd.tsx
CHANGED
package/src/components/label.tsx
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import * as
|
|
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
|
|
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
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
5
|
-
import {
|
|
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
|
|
4
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover"
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
|
|
6
|
-
import
|
|
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
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as ProgressPrimitive from "@radix-ui/react-progress"
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
|
|
6
|
-
import
|
|
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
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
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
|
|
3
|
-
import * as ResizablePrimitive from
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
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
|
|
4
|
-
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
|
|
6
|
-
import
|
|
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
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
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
|
|
4
|
-
import * as SeparatorPrimitive from "@radix-ui/react-separator"
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
|
|
6
|
-
import
|
|
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>,
|
package/src/components/sheet.tsx
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import * as
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
import { Cross2Icon } from
|
|
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,9 +1,10 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as SliderPrimitive from "@radix-ui/react-slider"
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
|
|
6
|
-
import
|
|
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,9 +1,10 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as SwitchPrimitives from "@radix-ui/react-switch"
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
|
|
6
|
-
import
|
|
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>,
|
package/src/components/table.tsx
CHANGED
package/src/components/tabs.tsx
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import * as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { useIsMobile } from
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
package/src/components/toast.tsx
CHANGED
|
@@ -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
|
|
4
|
-
import * as
|
|
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
|
|
8
|
-
|
|
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
|
|
4
|
-
import * as
|
|
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
|
|
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
|
|
4
|
-
|
|
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:
|
|
154
|
+
style={{ fontSize: fallbackFontSize }}
|
|
150
155
|
>
|
|
151
|
-
{
|
|
156
|
+
{truncatedSymbol}
|
|
152
157
|
</span>
|
|
153
158
|
)}
|
|
154
159
|
</div>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
3
|
+
import * as React from 'react';
|
|
5
4
|
|
|
6
|
-
import
|
|
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
|
|
package/src/hooks/useDebounce.ts
CHANGED
package/src/lib/utils.ts
CHANGED