diff --git a/template/apps/web/components.json b/template/apps/web/components.json index 353e3ee79..85c215dcf 100644 --- a/template/apps/web/components.json +++ b/template/apps/web/components.json @@ -9,6 +9,7 @@ "baseColor": "slate", "cssVariables": true }, + "iconLibrary": "lucide", "aliases": { "components": "@/components", "utils": "@/lib/utils", @@ -16,5 +17,7 @@ "lib": "@/lib", "hooks": "@/hooks" }, - "iconLibrary": "lucide" + "registries": { + "@tailark": "https://tailark.com/r/{name}.json" + } } diff --git a/template/apps/web/package.json b/template/apps/web/package.json index 247ca0ea4..b79eb4aa7 100644 --- a/template/apps/web/package.json +++ b/template/apps/web/package.json @@ -25,14 +25,14 @@ "@radix-ui/react-label": "2.1.8", "@radix-ui/react-popover": "1.1.15", "@radix-ui/react-select": "2.2.6", - "@radix-ui/react-slot": "^1.1.0", + "@radix-ui/react-slot": "^1.2.4", "@svgr/webpack": "8.1.0", "@tabler/icons-react": "3.10.0", "@tailwindcss/typography": "0.5.19", "@tanstack/react-query": "5.74.4", "@tanstack/react-table": "8.19.2", "axios": "1.12.2", - "class-variance-authority": "^0.7.0", + "class-variance-authority": "^0.7.1", "clsx": "2.1.1", "date-fns": "4.1.0", "dayjs": "1.11.10", @@ -52,6 +52,7 @@ "react-dom": "catalog:", "react-dropzone": "15.0.0", "react-hook-form": "7.57.0", + "react-icons": "5.6.0", "shared": "workspace:*", "socket.io-client": "4.7.5", "sonner": "^1.7.4", diff --git a/template/apps/web/public/images/screen_admin.png b/template/apps/web/public/images/screen_admin.png deleted file mode 100644 index 67754d10e..000000000 Binary files a/template/apps/web/public/images/screen_admin.png and /dev/null differ diff --git a/template/apps/web/public/images/screen_admin_mob.png b/template/apps/web/public/images/screen_admin_mob.png deleted file mode 100644 index 50c71302c..000000000 Binary files a/template/apps/web/public/images/screen_admin_mob.png and /dev/null differ diff --git a/template/apps/web/public/images/screen_chat.png b/template/apps/web/public/images/screen_chat.png deleted file mode 100644 index 181541524..000000000 Binary files a/template/apps/web/public/images/screen_chat.png and /dev/null differ diff --git a/template/apps/web/public/images/screen_chat_mob.png b/template/apps/web/public/images/screen_chat_mob.png deleted file mode 100644 index b9cc13b34..000000000 Binary files a/template/apps/web/public/images/screen_chat_mob.png and /dev/null differ diff --git a/template/apps/web/public/images/screen_profile.png b/template/apps/web/public/images/screen_profile.png deleted file mode 100644 index ed4dc5dee..000000000 Binary files a/template/apps/web/public/images/screen_profile.png and /dev/null differ diff --git a/template/apps/web/public/images/screen_profile_mob.png b/template/apps/web/public/images/screen_profile_mob.png deleted file mode 100644 index 0fc9ee2d2..000000000 Binary files a/template/apps/web/public/images/screen_profile_mob.png and /dev/null differ diff --git a/template/apps/web/src/components/PublicHeader/index.tsx b/template/apps/web/src/components/PublicHeader/index.tsx index 53c52695e..799d63b83 100644 --- a/template/apps/web/src/components/PublicHeader/index.tsx +++ b/template/apps/web/src/components/PublicHeader/index.tsx @@ -22,19 +22,19 @@ const PublicHeader: FC = () => { const { theme, setTheme } = useTheme(); return ( -
-
-
- - +
+
+
+ + -
-
+
-
- {account ? ( - + ) : ( + <> + + - ) : ( - <> - - - - )} -
+ + )}
diff --git a/template/apps/web/src/components/ui/dialog.tsx b/template/apps/web/src/components/ui/dialog.tsx deleted file mode 100644 index d3639a90f..000000000 --- a/template/apps/web/src/components/ui/dialog.tsx +++ /dev/null @@ -1,136 +0,0 @@ -import * as React from 'react'; -import { XIcon } from 'lucide-react'; -import { Dialog as DialogPrimitive } from 'radix-ui'; - -import { cn } from '@/lib/utils'; -import { Button } from '@/components/ui/button'; - -function Dialog({ ...props }: React.ComponentProps) { - return ; -} - -function DialogTrigger({ ...props }: React.ComponentProps) { - return ; -} - -function DialogPortal({ ...props }: React.ComponentProps) { - return ; -} - -function DialogClose({ ...props }: React.ComponentProps) { - return ; -} - -function DialogOverlay({ className, ...props }: React.ComponentProps) { - return ( - - ); -} - -function DialogContent({ - className, - children, - showCloseButton = true, - ...props -}: React.ComponentProps & { - showCloseButton?: boolean; -}) { - return ( - - - - {children} - {showCloseButton && ( - - - Close - - )} - - - ); -} - -function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) { - return ( -
- ); -} - -function DialogFooter({ - className, - showCloseButton = false, - children, - ...props -}: React.ComponentProps<'div'> & { - showCloseButton?: boolean; -}) { - return ( -
- {children} - {showCloseButton && ( - - - - )} -
- ); -} - -function DialogTitle({ className, ...props }: React.ComponentProps) { - return ( - - ); -} - -function DialogDescription({ className, ...props }: React.ComponentProps) { - return ( - - ); -} - -export { - Dialog, - DialogClose, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogOverlay, - DialogPortal, - DialogTitle, - DialogTrigger, -}; diff --git a/template/apps/web/src/components/ui/dropzone.tsx b/template/apps/web/src/components/ui/dropzone.tsx deleted file mode 100644 index 3fb56dee3..000000000 --- a/template/apps/web/src/components/ui/dropzone.tsx +++ /dev/null @@ -1,83 +0,0 @@ -'use client'; - -import * as React from 'react'; -import { UploadCloud, X } from 'lucide-react'; -import { useDropzone, type DropzoneOptions, type FileRejection } from 'react-dropzone'; - -import { cn } from '@/lib/utils'; -import { Button } from '@/components/ui/button'; - -export interface DropzoneProps extends Omit { - className?: string; - value?: File[]; - onChange?: (files: File[]) => void; - onReject?: (rejections: FileRejection[]) => void; -} - -const Dropzone = ({ className, value = [], onChange, onReject, ...props }: DropzoneProps) => { - const onDrop = React.useCallback( - (acceptedFiles: File[], rejectedFiles: FileRejection[]) => { - if (rejectedFiles.length > 0 && onReject) { - onReject(rejectedFiles); - } - if (acceptedFiles.length > 0) { - onChange?.([...value, ...acceptedFiles]); - } - }, - [onChange, onReject, value], - ); - - const removeFile = (index: number) => { - const newFiles = [...value]; - newFiles.splice(index, 1); - onChange?.(newFiles); - }; - - const { getRootProps, getInputProps, isDragActive, isDragReject } = useDropzone({ - onDrop, - ...props, - }); - - return ( -
-
- - - {isDragActive ? ( -

{isDragReject ? 'File type not accepted' : 'Drop files here'}

- ) : ( - <> -

Drag & drop files here

-

or click to browse

- - )} -
- - {value.length > 0 && ( -
    - {value.map((file, index) => ( -
  • - {file.name} - -
  • - ))} -
- )} -
- ); -}; - -export { Dropzone }; diff --git a/template/apps/web/src/components/ui/form.tsx b/template/apps/web/src/components/ui/form.tsx deleted file mode 100644 index 10ba9eee1..000000000 --- a/template/apps/web/src/components/ui/form.tsx +++ /dev/null @@ -1,136 +0,0 @@ -import * as React from 'react'; -import type { Label as LabelPrimitive } from 'radix-ui'; -import { Slot } from 'radix-ui'; -import { - Controller, - FormProvider, - useFormContext, - useFormState, - type ControllerProps, - type FieldPath, - type FieldValues, -} from 'react-hook-form'; - -import { cn } from '@/lib/utils'; -import { Label } from '@/components/ui/label'; - -const Form = FormProvider; - -type FormFieldContextValue< - TFieldValues extends FieldValues = FieldValues, - TName extends FieldPath = FieldPath, -> = { - name: TName; -}; - -const FormFieldContext = React.createContext({} as FormFieldContextValue); - -const FormField = < - TFieldValues extends FieldValues = FieldValues, - TName extends FieldPath = FieldPath, ->({ - ...props -}: ControllerProps) => { - return ( - - - - ); -}; - -const useFormField = () => { - const fieldContext = React.useContext(FormFieldContext); - const itemContext = React.useContext(FormItemContext); - const { getFieldState } = useFormContext(); - const formState = useFormState({ name: fieldContext.name }); - const fieldState = getFieldState(fieldContext.name, formState); - - if (!fieldContext) { - throw new Error('useFormField should be used within '); - } - - const { id } = itemContext; - - return { - id, - name: fieldContext.name, - formItemId: `${id}-form-item`, - formDescriptionId: `${id}-form-item-description`, - formMessageId: `${id}-form-item-message`, - ...fieldState, - }; -}; - -type FormItemContextValue = { - id: string; -}; - -const FormItemContext = React.createContext({} as FormItemContextValue); - -function FormItem({ className, ...props }: React.ComponentProps<'div'>) { - const id = React.useId(); - - return ( - -
- - ); -} - -function FormLabel({ className, ...props }: React.ComponentProps) { - const { error, formItemId } = useFormField(); - - return ( -