From a65e34b41c187d8989165e7c7ac44a3de479dd51 Mon Sep 17 00:00:00 2001 From: Guillermo Arrieta Medina Date: Mon, 5 Jan 2026 13:24:48 -0600 Subject: [PATCH] =?UTF-8?q?Separaci=C3=B3n=20vista/l=C3=B3gica=20del=20wiz?= =?UTF-8?q?ard=20de=20creaci=C3=B3n=20de=20plan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/planes/App.css | 42 - src/components/planes/exampleStepper.tsx | 163 --- .../planes/wizard/PasoBasicosForm.tsx | 181 +++ .../planes/wizard/PasoDetallesPanel.tsx | 322 +++++ .../planes/wizard/PasoModoCardGroup.tsx | 122 ++ .../planes/wizard/PasoResumenCard.tsx | 74 + .../planes/wizard/StepWithTooltip.tsx | 41 + .../planes/wizard/WizardControls.tsx | 47 + src/components/planes/wizard/WizardHeader.tsx | 78 ++ src/components/stepper.tsx | 12 +- .../planes/new/NuevoPlanModalContainer.tsx | 205 +++ src/features/planes/new/catalogs.ts | 56 + .../planes/new/hooks/useNuevoPlanWizard.ts | 102 ++ src/features/planes/new/types.ts | 41 + src/routeTree.gen.ts | 224 ++- .../asignaturas/$asignaturaId/route.tsx | 2 +- .../$planId}/asignaturas/_lista/nueva.tsx | 12 +- .../$planId}/asignaturas/_lista/route.tsx | 3 +- .../planes/$planId/{route.tsx => index.tsx} | 2 +- src/routes/planes/_lista/nuevo.tsx | 1203 +---------------- src/routes/stepper.tsx | 65 - src/routes/stepper2.tsx | 82 -- 22 files changed, 1384 insertions(+), 1695 deletions(-) delete mode 100644 src/components/planes/App.css delete mode 100644 src/components/planes/exampleStepper.tsx create mode 100644 src/components/planes/wizard/PasoBasicosForm.tsx create mode 100644 src/components/planes/wizard/PasoDetallesPanel.tsx create mode 100644 src/components/planes/wizard/PasoModoCardGroup.tsx create mode 100644 src/components/planes/wizard/PasoResumenCard.tsx create mode 100644 src/components/planes/wizard/StepWithTooltip.tsx create mode 100644 src/components/planes/wizard/WizardControls.tsx create mode 100644 src/components/planes/wizard/WizardHeader.tsx create mode 100644 src/features/planes/new/NuevoPlanModalContainer.tsx create mode 100644 src/features/planes/new/catalogs.ts create mode 100644 src/features/planes/new/hooks/useNuevoPlanWizard.ts create mode 100644 src/features/planes/new/types.ts rename src/routes/{ => planes/$planId}/asignaturas/$asignaturaId/route.tsx (67%) rename src/routes/{ => planes/$planId}/asignaturas/_lista/nueva.tsx (99%) rename src/routes/{ => planes/$planId}/asignaturas/_lista/route.tsx (68%) rename src/routes/planes/$planId/{route.tsx => index.tsx} (77%) delete mode 100644 src/routes/stepper.tsx delete mode 100644 src/routes/stepper2.tsx diff --git a/src/components/planes/App.css b/src/components/planes/App.css deleted file mode 100644 index b9d355d..0000000 --- a/src/components/planes/App.css +++ /dev/null @@ -1,42 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: filter 300ms; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/src/components/planes/exampleStepper.tsx b/src/components/planes/exampleStepper.tsx deleted file mode 100644 index 569fa81..0000000 --- a/src/components/planes/exampleStepper.tsx +++ /dev/null @@ -1,163 +0,0 @@ -import { defineStepper } from '@stepperize/react' -import * as React from 'react' - -import { Button } from '@/components/ui/button' -import { Input } from '@/components/ui/input' -import { Separator } from '@/components/ui/separator' -import { Textarea } from '@/components/ui/textarea' -// import './App.css' - -const { useStepper, steps, utils } = defineStepper( - { - id: 'shipping', - title: 'Shipping', - description: 'Enter your shipping details', - }, - { - id: 'payment', - title: 'Payment', - description: 'Enter your payment details', - }, - { id: 'complete', title: 'Complete', description: 'Checkout complete' }, -) - -function App() { - const stepper = useStepper() - - const currentIndex = utils.getIndex(stepper.current.id) - return ( -
-
-

Checkout

-
- - Step {currentIndex + 1} of {steps.length} - -
-
-
- -
- {stepper.switch({ - shipping: () => , - payment: () => , - complete: () => , - })} - {!stepper.isLast ? ( -
- - -
- ) : ( - - )} -
-
- ) -} - -const ShippingComponent = () => { - return ( -
-
- - -
-
- -