Updated UI package to work with the new Shadcn CLI (#59)
Updated UI package to work with the new Shadcn CLI
This commit is contained in:
committed by
GitHub
parent
b3b061fc2e
commit
fafcafc221
@@ -3,13 +3,13 @@
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
|
||||
import { cn, isRouteActive } from '../lib/utils';
|
||||
import { Button } from '../shadcn/button';
|
||||
import {
|
||||
NavigationMenu,
|
||||
NavigationMenuItem,
|
||||
NavigationMenuList,
|
||||
} from '../shadcn/navigation-menu';
|
||||
import { cn, isRouteActive } from '../utils';
|
||||
import { Trans } from './trans';
|
||||
|
||||
export function BorderedNavigationMenu(props: React.PropsWithChildren) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as React from 'react';
|
||||
import { Slot, Slottable } from '@radix-ui/react-slot';
|
||||
import { ChevronRight } from 'lucide-react';
|
||||
|
||||
import { cn } from '../utils';
|
||||
import { cn } from '../lib/utils';
|
||||
|
||||
export const CardButton = React.forwardRef<
|
||||
HTMLButtonElement,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { cn } from '../utils/cn';
|
||||
import { cn } from '../lib/utils';
|
||||
|
||||
export function Divider(props: { className?: string }) {
|
||||
return <div className={cn('h-[1px] w-full bg-border', props.className)} />;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import { cn } from '../lib/utils';
|
||||
import { Button } from '../shadcn/button';
|
||||
import { cn } from '../utils';
|
||||
|
||||
const EmptyStateHeading = React.forwardRef<
|
||||
HTMLHeadingElement,
|
||||
|
||||
@@ -7,9 +7,9 @@ import Image from 'next/image';
|
||||
|
||||
import { UploadCloud, X } from 'lucide-react';
|
||||
|
||||
import { cn } from '../lib/utils';
|
||||
import { Button } from '../shadcn/button';
|
||||
import { Label } from '../shadcn/label';
|
||||
import { cn } from '../utils';
|
||||
import { If } from './if';
|
||||
|
||||
type Props = Omit<React.InputHTMLAttributes<unknown>, 'value'> & {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { PropsWithChildren } from 'react';
|
||||
|
||||
import { cn } from '../utils';
|
||||
import { cn } from '../lib/utils';
|
||||
import { Spinner } from './spinner';
|
||||
|
||||
export function LoadingOverlay({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
import { cn } from '../../lib/utils';
|
||||
import { Button } from '../../shadcn/button';
|
||||
import { cn } from '../../utils';
|
||||
|
||||
export const CtaButton = forwardRef<
|
||||
HTMLButtonElement,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import React, { forwardRef } from 'react';
|
||||
|
||||
import { cn } from '../../lib/utils';
|
||||
import {
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from '../../shadcn/card';
|
||||
import { cn } from '../../utils';
|
||||
|
||||
interface FeatureCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
label: string;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { forwardRef } from 'react';
|
||||
|
||||
import { cn } from '../../utils';
|
||||
import { cn } from '../../lib/utils';
|
||||
|
||||
export const FeatureGrid = forwardRef<
|
||||
HTMLDivElement,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { forwardRef } from 'react';
|
||||
|
||||
import { cn } from '../../utils';
|
||||
import { cn } from '../../lib/utils';
|
||||
|
||||
interface FeatureShowcaseProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
heading: React.ReactNode;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
import { cn } from '../../utils';
|
||||
import { cn } from '../../lib/utils';
|
||||
|
||||
interface FooterSection {
|
||||
heading: React.ReactNode;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { forwardRef } from 'react';
|
||||
|
||||
import { Slot, Slottable } from '@radix-ui/react-slot';
|
||||
|
||||
import { cn } from '../../utils';
|
||||
import { cn } from '../../lib/utils';
|
||||
|
||||
export const GradientSecondaryText = forwardRef<
|
||||
HTMLSpanElement,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { forwardRef } from 'react';
|
||||
|
||||
import { cn } from '../../utils';
|
||||
import { cn } from '../../lib/utils';
|
||||
|
||||
export const GradientText = forwardRef<
|
||||
HTMLSpanElement,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
import { cn } from '../../utils';
|
||||
import { cn } from '../../lib/utils';
|
||||
|
||||
interface HeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
logo?: React.ReactNode;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { forwardRef } from 'react';
|
||||
|
||||
import { Slot, Slottable } from '@radix-ui/react-slot';
|
||||
|
||||
import { cn } from '../../utils';
|
||||
import { cn } from '../../lib/utils';
|
||||
|
||||
export const HeroTitle = forwardRef<
|
||||
HTMLHeadingElement,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import { cn } from '../../lib/utils';
|
||||
import { Heading } from '../../shadcn/heading';
|
||||
import { cn } from '../../utils';
|
||||
import { HeroTitle } from './hero-title';
|
||||
|
||||
interface HeroProps {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
import { useCallback, useState } from 'react';
|
||||
|
||||
import { cn } from '../../lib/utils';
|
||||
import { Alert, AlertDescription, AlertTitle } from '../../shadcn/alert';
|
||||
import { Heading } from '../../shadcn/heading';
|
||||
import { cn } from '../../utils';
|
||||
import { Spinner } from '../spinner';
|
||||
import { NewsletterSignup } from './newsletter-signup';
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { cn } from '../../lib/utils';
|
||||
import { Button } from '../../shadcn/button';
|
||||
import {
|
||||
Form,
|
||||
@@ -13,7 +14,6 @@ import {
|
||||
FormMessage,
|
||||
} from '../../shadcn/form';
|
||||
import { Input } from '../../shadcn/input';
|
||||
import { cn } from '../../utils';
|
||||
|
||||
const NewsletterFormSchema = z.object({
|
||||
email: z.string().email('Please enter a valid email address'),
|
||||
|
||||
@@ -2,7 +2,7 @@ import { forwardRef } from 'react';
|
||||
|
||||
import { Slot, Slottable } from '@radix-ui/react-slot';
|
||||
|
||||
import { cn } from '../../utils';
|
||||
import { cn } from '../../lib/utils';
|
||||
import { GradientSecondaryText } from './gradient-secondary-text';
|
||||
|
||||
export const Pill = forwardRef<
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
import { cn } from '../../lib/utils';
|
||||
import { Heading } from '../../shadcn/heading';
|
||||
import { cn } from '../../utils';
|
||||
|
||||
interface SecondaryHeroProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
pill?: React.ReactNode;
|
||||
|
||||
@@ -5,6 +5,7 @@ import { useMemo } from 'react';
|
||||
import { Computer, Moon, Sun } from 'lucide-react';
|
||||
import { useTheme } from 'next-themes';
|
||||
|
||||
import { cn } from '../lib/utils';
|
||||
import { Button } from '../shadcn/button';
|
||||
import {
|
||||
DropdownMenu,
|
||||
@@ -16,7 +17,6 @@ import {
|
||||
DropdownMenuSubTrigger,
|
||||
DropdownMenuTrigger,
|
||||
} from '../shadcn/dropdown-menu';
|
||||
import { cn } from '../utils';
|
||||
import { Trans } from './trans';
|
||||
|
||||
const MODES = ['light', 'dark', 'system'];
|
||||
|
||||
@@ -16,7 +16,7 @@ import { useMutation } from '@tanstack/react-query';
|
||||
import { Path, UseFormReturn } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { cn } from '../utils';
|
||||
import { cn } from '../lib/utils';
|
||||
|
||||
interface MultiStepFormProps<T extends z.ZodType> {
|
||||
schema: T;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '../utils';
|
||||
import { cn } from '../lib/utils';
|
||||
|
||||
export type PageLayoutStyle = 'sidebar' | 'header' | 'custom';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { cn } from '../lib/utils';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '../shadcn/avatar';
|
||||
import { cn } from '../utils';
|
||||
|
||||
type SessionProps = {
|
||||
displayName: string | null;
|
||||
|
||||
@@ -9,6 +9,7 @@ import { cva } from 'class-variance-authority';
|
||||
import { ChevronDown } from 'lucide-react';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { cn, isRouteActive } from '../lib/utils';
|
||||
import { Button } from '../shadcn/button';
|
||||
import {
|
||||
Tooltip,
|
||||
@@ -16,7 +17,6 @@ import {
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from '../shadcn/tooltip';
|
||||
import { cn, isRouteActive } from '../utils';
|
||||
import { SidebarContext } from './context/sidebar.context';
|
||||
import { If } from './if';
|
||||
import type { NavigationConfigSchema } from './navigation-config.schema';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { cn } from '../utils';
|
||||
import { cn } from '../lib/utils';
|
||||
|
||||
export function Spinner(
|
||||
props: React.PropsWithChildren<{
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Fragment, useCallback } from 'react';
|
||||
|
||||
import { cva } from 'class-variance-authority';
|
||||
|
||||
import { cn } from '../utils';
|
||||
import { cn } from '../lib/utils';
|
||||
import { If } from './if';
|
||||
import { Trans } from './trans';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user