From 76a1efca96bd8535b500e342aea69c99b0c8c152 Mon Sep 17 00:00:00 2001 From: alexandre-kakal-akarah Date: Tue, 25 Jun 2024 23:40:10 +0200 Subject: [PATCH] WIP: journey form --- package-lock.json | 33 ++++ package.json | 1 + src/app/(app)/layout.tsx | 2 + src/app/(app)/parcours/[id]/page.tsx | 16 +- src/app/(app)/profil/page.tsx | 3 +- src/components/form/event/EventForm.tsx | 163 ++++++++++++------ .../form/event/steps/EventFormSteps.tsx | 23 --- src/components/ui/button.tsx | 43 ++++- src/components/ui/slider.tsx | 28 +++ src/store/eventFormStore.ts | 7 +- src/types/enums/button.ts | 5 + src/validators/EventFormSchema.ts | 24 +-- 12 files changed, 250 insertions(+), 98 deletions(-) delete mode 100644 src/components/form/event/steps/EventFormSteps.tsx create mode 100644 src/components/ui/slider.tsx create mode 100644 src/types/enums/button.ts diff --git a/package-lock.json b/package-lock.json index 559db5d..bb187a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@radix-ui/react-popover": "^1.1.1", "@radix-ui/react-radio-group": "^1.2.0", "@radix-ui/react-select": "^2.1.1", + "@radix-ui/react-slider": "^1.2.0", "@radix-ui/react-slot": "^1.1.0", "bcrypt": "^5.1.1", "class-variance-authority": "^0.7.0", @@ -3412,6 +3413,38 @@ } } }, + "node_modules/@radix-ui/react-slider": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slider/-/react-slider-1.2.0.tgz", + "integrity": "sha512-dAHCDA4/ySXROEPaRtaMV5WHL8+JB/DbtyTbJjYkY0RXmKMO2Ln8DFZhywG5/mVQ4WqHDBc8smc14yPXPqZHYA==", + "dependencies": { + "@radix-ui/number": "1.1.0", + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-collection": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-direction": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0", + "@radix-ui/react-use-previous": "1.1.0", + "@radix-ui/react-use-size": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-slot": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", diff --git a/package.json b/package.json index 3d6fcac..3fd10c6 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@radix-ui/react-popover": "^1.1.1", "@radix-ui/react-radio-group": "^1.2.0", "@radix-ui/react-select": "^2.1.1", + "@radix-ui/react-slider": "^1.2.0", "@radix-ui/react-slot": "^1.1.0", "bcrypt": "^5.1.1", "class-variance-authority": "^0.7.0", diff --git a/src/app/(app)/layout.tsx b/src/app/(app)/layout.tsx index dc31b80..3657450 100644 --- a/src/app/(app)/layout.tsx +++ b/src/app/(app)/layout.tsx @@ -1,6 +1,7 @@ import React from "react"; import Nav from "@/components/Nav"; import { ReactParallaxProvider } from "@/providers/Providers"; +import EventForm from "@/components/form/event/EventForm"; export default function AppLayout({ children, @@ -10,6 +11,7 @@ export default function AppLayout({ return ( {children} +