create-huenei-template 0.2.14 → 0.2.15
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/dist/config/templates.js +7 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +22 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +24 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +32 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +25 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-component.md +97 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-page.md +95 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +66 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +89 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +94 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +120 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +209 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +101 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +10 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks.json +41 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/auth-patterns.mdc +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/code-quality.mdc +39 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/naming-conventions.mdc +32 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/nextjs-architecture.mdc +51 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/prisma-standards.mdc +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/react-conventions.mdc +52 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/testing-conventions.mdc +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/ui-stack.mdc +47 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/authjs-skills/SKILL.md +1149 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/SKILL.md +189 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/daisyUI5.skill +0 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/creating-components.md +412 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/data-display.md +341 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/feedback.md +240 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/input.md +283 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/layout.md +275 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/navigation.md +338 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/daisy-meta.ts +220 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/generate-daisy-safelist.ts +152 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/docker-expert/SKILL.md +413 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/nextjs-app-router-patterns/SKILL.md +537 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/SKILL.md +243 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-execute.md +75 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-pull.md +185 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-push.md +148 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-seed.md +191 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/debug.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/dev.md +157 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/format.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/generate.md +147 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/init.md +118 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-deploy.md +127 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-dev.md +143 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-diff.md +89 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-reset.md +72 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-resolve.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-status.md +65 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/studio.md +122 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/validate.md +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/SKILL.md +216 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/client-methods.md +221 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/constructor.md +185 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/filters.md +256 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/model-queries.md +281 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/query-options.md +276 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/raw-queries.md +194 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/relations.md +308 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/transactions.md +184 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/AGENTS.md +97 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/README.md +138 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/SKILL.md +116 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/assets/templates/_template.md +26 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/_sections.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/SKILL.md +713 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/api_reference.md +1121 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/best_practices.md +782 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/examples.md +940 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/SKILL.md +114 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-gc-time.md +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-invalidation.md +116 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-placeholder-vs-initial.md +156 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-stale-time.md +80 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/err-error-boundaries.md +150 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/inf-page-params.md +132 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-invalidate-queries.md +118 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-mutation-state.md +169 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-optimistic-updates.md +137 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/network-mode.md +179 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/parallel-use-queries.md +152 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/perf-select-transform.md +144 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/persist-queries.md +194 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/pf-intent-prefetch.md +143 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-array-structure.md +50 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-factory-pattern.md +102 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-hierarchical-organization.md +76 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-include-dependencies.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-serializable.md +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/query-cancellation.md +171 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/ssr-dehydration.md +158 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-table/SKILL.md +582 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/zod-4/SKILL.md +216 -0
- package/dist/templates/frontend/react-ssr/.dockerignore +14 -0
- package/dist/templates/frontend/react-ssr/.env.example +9 -0
- package/dist/templates/frontend/react-ssr/.husky/pre-commit +1 -0
- package/dist/templates/frontend/react-ssr/Dockerfile +41 -0
- package/dist/templates/frontend/react-ssr/README.md +121 -0
- package/dist/templates/frontend/react-ssr/components.json +22 -0
- package/dist/templates/frontend/react-ssr/docker-compose.yml +21 -0
- package/dist/templates/frontend/react-ssr/eslint.config.mjs +26 -0
- package/dist/templates/frontend/react-ssr/next.config.ts +7 -0
- package/dist/templates/frontend/react-ssr/package.json +86 -0
- package/dist/templates/frontend/react-ssr/postcss.config.mjs +5 -0
- package/dist/templates/frontend/react-ssr/prisma/schema.prisma +75 -0
- package/dist/templates/frontend/react-ssr/prisma/seed.ts +109 -0
- package/dist/templates/frontend/react-ssr/prisma.config.ts +17 -0
- package/dist/templates/frontend/react-ssr/skills-lock.json +65 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/badge.test.tsx +26 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/button.test.tsx +38 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/card.test.tsx +39 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/input.test.tsx +32 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/hooks/useLocalStorage.test.ts +53 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/lib/queryClient.test.ts +19 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/lib/utils.test.ts +24 -0
- package/dist/templates/frontend/react-ssr/src/actions/auth.ts +91 -0
- package/dist/templates/frontend/react-ssr/src/actions/contacto.ts +46 -0
- package/dist/templates/frontend/react-ssr/src/actions/proyectos.ts +159 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/dashboard-client.tsx +321 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/page.tsx +48 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/layout.tsx +34 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/perfil/page.tsx +85 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/page.tsx +23 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/proyectos-crud-client.tsx +472 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/ui-components/page.tsx +358 -0
- package/dist/templates/frontend/react-ssr/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/iniciar-sesion/page.tsx +148 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/recuperar-password/page.tsx +100 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/registro/page.tsx +154 -0
- package/dist/templates/frontend/react-ssr/src/app/contacto/contacto-form.tsx +189 -0
- package/dist/templates/frontend/react-ssr/src/app/contacto/page.tsx +11 -0
- package/dist/templates/frontend/react-ssr/src/app/globals.css +99 -0
- package/dist/templates/frontend/react-ssr/src/app/layout.tsx +22 -0
- package/dist/templates/frontend/react-ssr/src/app/loading.tsx +7 -0
- package/dist/templates/frontend/react-ssr/src/app/not-found.tsx +14 -0
- package/dist/templates/frontend/react-ssr/src/app/page.tsx +331 -0
- package/dist/templates/frontend/react-ssr/src/app/proyectos/page.tsx +178 -0
- package/dist/templates/frontend/react-ssr/src/auth.ts +64 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/navbar.tsx +68 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/sidebar.tsx +109 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/sign-out-button.tsx +16 -0
- package/dist/templates/frontend/react-ssr/src/components/providers.tsx +33 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/avatar.tsx +53 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/badge.tsx +42 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/breadcrumb.tsx +114 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/button.tsx +58 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/card.tsx +95 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/dialog.tsx +136 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/form.tsx +168 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/input.tsx +22 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/label.tsx +26 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/password-input.tsx +43 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/separator.tsx +30 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/table.tsx +240 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/tabs.tsx +76 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/textarea.tsx +21 -0
- package/dist/templates/frontend/react-ssr/src/data/dashboard.ts +179 -0
- package/dist/templates/frontend/react-ssr/src/hooks/useLocalStorage.ts +38 -0
- package/dist/templates/frontend/react-ssr/src/lib/prisma.ts +24 -0
- package/dist/templates/frontend/react-ssr/src/lib/queryClient.ts +25 -0
- package/dist/templates/frontend/react-ssr/src/lib/utils.ts +6 -0
- package/dist/templates/frontend/react-ssr/src/proxy.ts +31 -0
- package/dist/templates/frontend/react-ssr/src/test/mocks/next-navigation.ts +16 -0
- package/dist/templates/frontend/react-ssr/src/test/setup.ts +1 -0
- package/dist/templates/frontend/react-ssr/src/test/utils.tsx +30 -0
- package/dist/templates/frontend/react-ssr/src/types/index.ts +36 -0
- package/dist/templates/frontend/react-ssr/tsconfig.json +41 -0
- package/dist/templates/frontend/react-ssr/vitest.config.ts +41 -0
- package/package.json +1 -1
- package/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +22 -0
- package/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +24 -0
- package/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +32 -0
- package/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +25 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-component.md +97 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-page.md +95 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +66 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +89 -0
- package/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +64 -0
- package/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +94 -0
- package/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +120 -0
- package/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +209 -0
- package/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +101 -0
- package/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +93 -0
- package/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +10 -0
- package/templates/frontend/react-ssr/.cursor/hooks.json +41 -0
- package/templates/frontend/react-ssr/.cursor/rules/auth-patterns.mdc +48 -0
- package/templates/frontend/react-ssr/.cursor/rules/code-quality.mdc +39 -0
- package/templates/frontend/react-ssr/.cursor/rules/naming-conventions.mdc +32 -0
- package/templates/frontend/react-ssr/.cursor/rules/nextjs-architecture.mdc +51 -0
- package/templates/frontend/react-ssr/.cursor/rules/prisma-standards.mdc +53 -0
- package/templates/frontend/react-ssr/.cursor/rules/react-conventions.mdc +52 -0
- package/templates/frontend/react-ssr/.cursor/rules/testing-conventions.mdc +53 -0
- package/templates/frontend/react-ssr/.cursor/rules/ui-stack.mdc +47 -0
- package/templates/frontend/react-ssr/.cursor/skills/authjs-skills/SKILL.md +1149 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/SKILL.md +189 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/daisyUI5.skill +0 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/creating-components.md +412 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/data-display.md +341 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/feedback.md +240 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/input.md +283 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/layout.md +275 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/navigation.md +338 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/daisy-meta.ts +220 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/generate-daisy-safelist.ts +152 -0
- package/templates/frontend/react-ssr/.cursor/skills/docker-expert/SKILL.md +413 -0
- package/templates/frontend/react-ssr/.cursor/skills/nextjs-app-router-patterns/SKILL.md +537 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/SKILL.md +243 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-execute.md +75 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-pull.md +185 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-push.md +148 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-seed.md +191 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/debug.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/dev.md +157 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/format.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/generate.md +147 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/init.md +118 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-deploy.md +127 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-dev.md +143 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-diff.md +89 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-reset.md +72 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-resolve.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-status.md +65 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/studio.md +122 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/validate.md +53 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/SKILL.md +216 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/client-methods.md +221 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/constructor.md +185 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/filters.md +256 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/model-queries.md +281 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/query-options.md +276 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/raw-queries.md +194 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/relations.md +308 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/transactions.md +184 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/AGENTS.md +97 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/README.md +138 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/SKILL.md +116 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/assets/templates/_template.md +26 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/_sections.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/SKILL.md +713 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/api_reference.md +1121 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/best_practices.md +782 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/examples.md +940 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/SKILL.md +114 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-gc-time.md +93 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-invalidation.md +116 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-placeholder-vs-initial.md +156 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-stale-time.md +80 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/err-error-boundaries.md +150 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/inf-page-params.md +132 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-invalidate-queries.md +118 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-mutation-state.md +169 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-optimistic-updates.md +137 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/network-mode.md +179 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/parallel-use-queries.md +152 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/perf-select-transform.md +144 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/persist-queries.md +194 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/pf-intent-prefetch.md +143 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-array-structure.md +50 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-factory-pattern.md +102 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-hierarchical-organization.md +76 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-include-dependencies.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-serializable.md +93 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/query-cancellation.md +171 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/ssr-dehydration.md +158 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-table/SKILL.md +582 -0
- package/templates/frontend/react-ssr/.cursor/skills/zod-4/SKILL.md +216 -0
- package/templates/frontend/react-ssr/.dockerignore +14 -0
- package/templates/frontend/react-ssr/.env.example +9 -0
- package/templates/frontend/react-ssr/.husky/pre-commit +1 -0
- package/templates/frontend/react-ssr/Dockerfile +41 -0
- package/templates/frontend/react-ssr/README.md +121 -0
- package/templates/frontend/react-ssr/components.json +22 -0
- package/templates/frontend/react-ssr/docker-compose.yml +21 -0
- package/templates/frontend/react-ssr/eslint.config.mjs +26 -0
- package/templates/frontend/react-ssr/next.config.ts +7 -0
- package/templates/frontend/react-ssr/package.json +86 -0
- package/templates/frontend/react-ssr/postcss.config.mjs +5 -0
- package/templates/frontend/react-ssr/prisma/schema.prisma +75 -0
- package/templates/frontend/react-ssr/prisma/seed.ts +109 -0
- package/templates/frontend/react-ssr/prisma.config.ts +17 -0
- package/templates/frontend/react-ssr/skills-lock.json +65 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/badge.test.tsx +26 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/button.test.tsx +38 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/card.test.tsx +39 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/input.test.tsx +32 -0
- package/templates/frontend/react-ssr/src/__tests__/hooks/useLocalStorage.test.ts +53 -0
- package/templates/frontend/react-ssr/src/__tests__/lib/queryClient.test.ts +19 -0
- package/templates/frontend/react-ssr/src/__tests__/lib/utils.test.ts +24 -0
- package/templates/frontend/react-ssr/src/actions/auth.ts +91 -0
- package/templates/frontend/react-ssr/src/actions/contacto.ts +46 -0
- package/templates/frontend/react-ssr/src/actions/proyectos.ts +159 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/dashboard-client.tsx +321 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/page.tsx +48 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/layout.tsx +34 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/perfil/page.tsx +85 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/page.tsx +23 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/proyectos-crud-client.tsx +472 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/ui-components/page.tsx +358 -0
- package/templates/frontend/react-ssr/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/templates/frontend/react-ssr/src/app/auth/iniciar-sesion/page.tsx +148 -0
- package/templates/frontend/react-ssr/src/app/auth/recuperar-password/page.tsx +100 -0
- package/templates/frontend/react-ssr/src/app/auth/registro/page.tsx +154 -0
- package/templates/frontend/react-ssr/src/app/contacto/contacto-form.tsx +189 -0
- package/templates/frontend/react-ssr/src/app/contacto/page.tsx +11 -0
- package/templates/frontend/react-ssr/src/app/globals.css +99 -0
- package/templates/frontend/react-ssr/src/app/layout.tsx +22 -0
- package/templates/frontend/react-ssr/src/app/loading.tsx +7 -0
- package/templates/frontend/react-ssr/src/app/not-found.tsx +14 -0
- package/templates/frontend/react-ssr/src/app/page.tsx +331 -0
- package/templates/frontend/react-ssr/src/app/proyectos/page.tsx +178 -0
- package/templates/frontend/react-ssr/src/auth.ts +64 -0
- package/templates/frontend/react-ssr/src/components/layout/navbar.tsx +68 -0
- package/templates/frontend/react-ssr/src/components/layout/sidebar.tsx +109 -0
- package/templates/frontend/react-ssr/src/components/layout/sign-out-button.tsx +16 -0
- package/templates/frontend/react-ssr/src/components/providers.tsx +33 -0
- package/templates/frontend/react-ssr/src/components/ui/avatar.tsx +53 -0
- package/templates/frontend/react-ssr/src/components/ui/badge.tsx +42 -0
- package/templates/frontend/react-ssr/src/components/ui/breadcrumb.tsx +114 -0
- package/templates/frontend/react-ssr/src/components/ui/button.tsx +58 -0
- package/templates/frontend/react-ssr/src/components/ui/card.tsx +95 -0
- package/templates/frontend/react-ssr/src/components/ui/dialog.tsx +136 -0
- package/templates/frontend/react-ssr/src/components/ui/form.tsx +168 -0
- package/templates/frontend/react-ssr/src/components/ui/input.tsx +22 -0
- package/templates/frontend/react-ssr/src/components/ui/label.tsx +26 -0
- package/templates/frontend/react-ssr/src/components/ui/password-input.tsx +43 -0
- package/templates/frontend/react-ssr/src/components/ui/separator.tsx +30 -0
- package/templates/frontend/react-ssr/src/components/ui/table.tsx +240 -0
- package/templates/frontend/react-ssr/src/components/ui/tabs.tsx +76 -0
- package/templates/frontend/react-ssr/src/components/ui/textarea.tsx +21 -0
- package/templates/frontend/react-ssr/src/data/dashboard.ts +179 -0
- package/templates/frontend/react-ssr/src/hooks/useLocalStorage.ts +38 -0
- package/templates/frontend/react-ssr/src/lib/prisma.ts +24 -0
- package/templates/frontend/react-ssr/src/lib/queryClient.ts +25 -0
- package/templates/frontend/react-ssr/src/lib/utils.ts +6 -0
- package/templates/frontend/react-ssr/src/proxy.ts +31 -0
- package/templates/frontend/react-ssr/src/test/mocks/next-navigation.ts +16 -0
- package/templates/frontend/react-ssr/src/test/setup.ts +1 -0
- package/templates/frontend/react-ssr/src/test/utils.tsx +30 -0
- package/templates/frontend/react-ssr/src/types/index.ts +36 -0
- package/templates/frontend/react-ssr/tsconfig.json +41 -0
- package/templates/frontend/react-ssr/vitest.config.ts +41 -0
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useMemo, useState } from "react";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
import type { ColumnDef } from "@tanstack/react-table";
|
|
6
|
+
import { toast } from "react-toastify";
|
|
7
|
+
import {
|
|
8
|
+
Mail,
|
|
9
|
+
Loader2,
|
|
10
|
+
Trash2,
|
|
11
|
+
Plus,
|
|
12
|
+
ChevronRight,
|
|
13
|
+
Settings,
|
|
14
|
+
Bell,
|
|
15
|
+
Search,
|
|
16
|
+
Info,
|
|
17
|
+
CheckCircle2,
|
|
18
|
+
AlertTriangle,
|
|
19
|
+
XCircle,
|
|
20
|
+
Copy,
|
|
21
|
+
Download,
|
|
22
|
+
User,
|
|
23
|
+
} from "lucide-react";
|
|
24
|
+
import {
|
|
25
|
+
Breadcrumb,
|
|
26
|
+
BreadcrumbItem,
|
|
27
|
+
BreadcrumbLink,
|
|
28
|
+
BreadcrumbList,
|
|
29
|
+
BreadcrumbPage,
|
|
30
|
+
BreadcrumbSeparator,
|
|
31
|
+
} from "@/components/ui/breadcrumb";
|
|
32
|
+
import { Button } from "@/components/ui/button";
|
|
33
|
+
import { Badge } from "@/components/ui/badge";
|
|
34
|
+
import {
|
|
35
|
+
Card,
|
|
36
|
+
CardAction,
|
|
37
|
+
CardContent,
|
|
38
|
+
CardDescription,
|
|
39
|
+
CardFooter,
|
|
40
|
+
CardHeader,
|
|
41
|
+
CardTitle,
|
|
42
|
+
} from "@/components/ui/card";
|
|
43
|
+
import { Input } from "@/components/ui/input";
|
|
44
|
+
import { Textarea } from "@/components/ui/textarea";
|
|
45
|
+
import { Label } from "@/components/ui/label";
|
|
46
|
+
import { PasswordInput } from "@/components/ui/password-input";
|
|
47
|
+
import { Separator } from "@/components/ui/separator";
|
|
48
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
|
49
|
+
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
|
50
|
+
import { DataTable } from "@/components/ui/table";
|
|
51
|
+
import {
|
|
52
|
+
Dialog,
|
|
53
|
+
DialogContent,
|
|
54
|
+
DialogDescription,
|
|
55
|
+
DialogFooter,
|
|
56
|
+
DialogHeader,
|
|
57
|
+
DialogTitle,
|
|
58
|
+
DialogTrigger,
|
|
59
|
+
} from "@/components/ui/dialog";
|
|
60
|
+
|
|
61
|
+
function SectionTitle({ children }: { children: React.ReactNode }) {
|
|
62
|
+
return (
|
|
63
|
+
<h2 className="text-xl font-bold text-base-content mb-4">{children}</h2>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function ComponentCard({
|
|
68
|
+
title,
|
|
69
|
+
children,
|
|
70
|
+
}: {
|
|
71
|
+
title: string;
|
|
72
|
+
children: React.ReactNode;
|
|
73
|
+
}) {
|
|
74
|
+
return (
|
|
75
|
+
<Card>
|
|
76
|
+
<CardHeader>
|
|
77
|
+
<CardTitle className="text-base">{title}</CardTitle>
|
|
78
|
+
</CardHeader>
|
|
79
|
+
<CardContent className="space-y-4">{children}</CardContent>
|
|
80
|
+
</Card>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function ButtonsShowcase() {
|
|
85
|
+
return (
|
|
86
|
+
<div className="space-y-6">
|
|
87
|
+
<SectionTitle>Button</SectionTitle>
|
|
88
|
+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
|
89
|
+
<ComponentCard title="Variantes">
|
|
90
|
+
<div className="flex flex-wrap gap-2">
|
|
91
|
+
<Button variant="default">Primary</Button>
|
|
92
|
+
<Button variant="secondary">Secondary</Button>
|
|
93
|
+
<Button variant="destructive">Destructive</Button>
|
|
94
|
+
<Button variant="outline">Outline</Button>
|
|
95
|
+
<Button variant="ghost">Ghost</Button>
|
|
96
|
+
<Button variant="link">Link</Button>
|
|
97
|
+
</div>
|
|
98
|
+
</ComponentCard>
|
|
99
|
+
<ComponentCard title="Tamaños">
|
|
100
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
101
|
+
<Button size="lg">Grande</Button>
|
|
102
|
+
<Button size="default">Mediano</Button>
|
|
103
|
+
<Button size="sm">Chico</Button>
|
|
104
|
+
<Button size="icon"><Settings className="size-4" /></Button>
|
|
105
|
+
<Button size="icon-sm"><Bell className="size-4" /></Button>
|
|
106
|
+
</div>
|
|
107
|
+
</ComponentCard>
|
|
108
|
+
<ComponentCard title="Con íconos">
|
|
109
|
+
<div className="flex flex-wrap gap-2">
|
|
110
|
+
<Button><Mail className="size-4" /> Enviar email</Button>
|
|
111
|
+
<Button variant="outline"><Plus className="size-4" /> Agregar</Button>
|
|
112
|
+
<Button variant="destructive"><Trash2 className="size-4" /> Eliminar</Button>
|
|
113
|
+
</div>
|
|
114
|
+
</ComponentCard>
|
|
115
|
+
<ComponentCard title="Estados">
|
|
116
|
+
<div className="flex flex-wrap gap-2">
|
|
117
|
+
<Button disabled>Deshabilitado</Button>
|
|
118
|
+
<Button disabled><Loader2 className="size-4 animate-spin" /> Cargando</Button>
|
|
119
|
+
</div>
|
|
120
|
+
</ComponentCard>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function BadgesShowcase() {
|
|
127
|
+
return (
|
|
128
|
+
<div className="space-y-6">
|
|
129
|
+
<SectionTitle>Badge</SectionTitle>
|
|
130
|
+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
|
131
|
+
<ComponentCard title="Variantes shadcn">
|
|
132
|
+
<div className="flex flex-wrap gap-2">
|
|
133
|
+
<Badge variant="default">Primary</Badge>
|
|
134
|
+
<Badge variant="secondary">Secondary</Badge>
|
|
135
|
+
<Badge variant="destructive">Destructive</Badge>
|
|
136
|
+
<Badge variant="outline">Outline</Badge>
|
|
137
|
+
</div>
|
|
138
|
+
</ComponentCard>
|
|
139
|
+
<ComponentCard title="Clases DaisyUI">
|
|
140
|
+
<div className="flex flex-wrap gap-2">
|
|
141
|
+
<Badge className="badge-success">Producción</Badge>
|
|
142
|
+
<Badge className="badge-warning">Desarrollo</Badge>
|
|
143
|
+
<Badge className="badge-error">Pausado</Badge>
|
|
144
|
+
<Badge className="badge-info">Info</Badge>
|
|
145
|
+
<Badge className="badge-accent">Accent</Badge>
|
|
146
|
+
</div>
|
|
147
|
+
</ComponentCard>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function InputsShowcase() {
|
|
154
|
+
return (
|
|
155
|
+
<div className="space-y-6">
|
|
156
|
+
<SectionTitle>Input, Textarea, Label, PasswordInput</SectionTitle>
|
|
157
|
+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
|
158
|
+
<ComponentCard title="Input básico">
|
|
159
|
+
<div className="space-y-3">
|
|
160
|
+
<div className="grid gap-2">
|
|
161
|
+
<Label htmlFor="demo-email">Email</Label>
|
|
162
|
+
<Input id="demo-email" type="email" placeholder="tu@email.com" />
|
|
163
|
+
</div>
|
|
164
|
+
<div className="grid gap-2">
|
|
165
|
+
<Label htmlFor="demo-disabled">Deshabilitado</Label>
|
|
166
|
+
<Input id="demo-disabled" disabled placeholder="No editable" />
|
|
167
|
+
</div>
|
|
168
|
+
<div className="grid gap-2">
|
|
169
|
+
<Label htmlFor="demo-search">Con ícono</Label>
|
|
170
|
+
<div className="relative">
|
|
171
|
+
<Search className="absolute left-3 top-1/2 -translate-y-1/2 size-4 text-base-content/40" />
|
|
172
|
+
<Input id="demo-search" className="pl-9" placeholder="Buscar..." />
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</ComponentCard>
|
|
177
|
+
<ComponentCard title="Password & Textarea">
|
|
178
|
+
<div className="space-y-3">
|
|
179
|
+
<div className="grid gap-2">
|
|
180
|
+
<Label htmlFor="demo-pass">Contraseña</Label>
|
|
181
|
+
<PasswordInput id="demo-pass" placeholder="••••••••" />
|
|
182
|
+
</div>
|
|
183
|
+
<div className="grid gap-2">
|
|
184
|
+
<Label htmlFor="demo-textarea">Textarea</Label>
|
|
185
|
+
<Textarea id="demo-textarea" placeholder="Escribí tu mensaje..." />
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</ComponentCard>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function TabsShowcase() {
|
|
195
|
+
return (
|
|
196
|
+
<div className="space-y-6">
|
|
197
|
+
<SectionTitle>Tabs</SectionTitle>
|
|
198
|
+
<ComponentCard title="Tabs con contenido">
|
|
199
|
+
<Tabs defaultValue="general">
|
|
200
|
+
<TabsList>
|
|
201
|
+
<TabsTrigger value="general">General</TabsTrigger>
|
|
202
|
+
<TabsTrigger value="seguridad">Seguridad</TabsTrigger>
|
|
203
|
+
<TabsTrigger value="notificaciones">Notificaciones</TabsTrigger>
|
|
204
|
+
</TabsList>
|
|
205
|
+
<TabsContent value="general" className="mt-4">
|
|
206
|
+
<p className="text-sm text-base-content/70">
|
|
207
|
+
Configuración general de la cuenta.
|
|
208
|
+
</p>
|
|
209
|
+
</TabsContent>
|
|
210
|
+
<TabsContent value="seguridad" className="mt-4">
|
|
211
|
+
<p className="text-sm text-base-content/70">
|
|
212
|
+
Opciones de seguridad: cambiar contraseña, activar 2FA.
|
|
213
|
+
</p>
|
|
214
|
+
</TabsContent>
|
|
215
|
+
<TabsContent value="notificaciones" className="mt-4">
|
|
216
|
+
<p className="text-sm text-base-content/70">
|
|
217
|
+
Elegí qué notificaciones querés recibir.
|
|
218
|
+
</p>
|
|
219
|
+
</TabsContent>
|
|
220
|
+
</Tabs>
|
|
221
|
+
</ComponentCard>
|
|
222
|
+
</div>
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
type FacturaRow = { id: string; estado: string; metodo: string; monto: string };
|
|
227
|
+
|
|
228
|
+
const facturaRows: FacturaRow[] = [
|
|
229
|
+
{ id: "INV-001", estado: "Pagado", metodo: "Tarjeta", monto: "$1.250" },
|
|
230
|
+
{ id: "INV-002", estado: "Pendiente", metodo: "Transferencia", monto: "$830" },
|
|
231
|
+
{ id: "INV-003", estado: "Cancelado", metodo: "PayPal", monto: "$450" },
|
|
232
|
+
];
|
|
233
|
+
|
|
234
|
+
function TableShowcase() {
|
|
235
|
+
const columns = useMemo(
|
|
236
|
+
() =>
|
|
237
|
+
[
|
|
238
|
+
{ accessorKey: "id", header: "Factura", enableSorting: true, cell: ({ row }: { row: { original: FacturaRow } }) => <span className="font-medium">{row.original.id}</span> },
|
|
239
|
+
{ accessorKey: "estado", header: "Estado", enableSorting: true, cell: ({ row }: { row: { original: FacturaRow } }) => <Badge className={row.original.estado === "Pagado" ? "badge-success" : row.original.estado === "Pendiente" ? "badge-warning" : "badge-error"}>{row.original.estado}</Badge> },
|
|
240
|
+
{ accessorKey: "metodo", header: "Método", enableSorting: true, cell: ({ row }: { row: { original: FacturaRow } }) => <span className="text-base-content/70">{row.original.metodo}</span> },
|
|
241
|
+
{ accessorKey: "monto", header: "Monto", meta: { className: "text-right" }, enableSorting: true, cell: ({ row }: { row: { original: FacturaRow } }) => <span className="font-medium">{row.original.monto}</span> },
|
|
242
|
+
] as ColumnDef<FacturaRow>[],
|
|
243
|
+
[],
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
return (
|
|
247
|
+
<div className="space-y-6">
|
|
248
|
+
<SectionTitle>Table</SectionTitle>
|
|
249
|
+
<ComponentCard title="Tabla con datos (ordenamiento y filtro)">
|
|
250
|
+
<DataTable data={facturaRows} columns={columns} filterPlaceholder="Buscar factura..." />
|
|
251
|
+
</ComponentCard>
|
|
252
|
+
</div>
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function DialogShowcase() {
|
|
257
|
+
const [open, setOpen] = useState(false);
|
|
258
|
+
return (
|
|
259
|
+
<div className="space-y-6">
|
|
260
|
+
<SectionTitle>Dialog</SectionTitle>
|
|
261
|
+
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
|
262
|
+
<ComponentCard title="Dialog con trigger">
|
|
263
|
+
<Dialog>
|
|
264
|
+
<DialogTrigger asChild>
|
|
265
|
+
<Button variant="outline">Abrir dialog</Button>
|
|
266
|
+
</DialogTrigger>
|
|
267
|
+
<DialogContent>
|
|
268
|
+
<DialogHeader>
|
|
269
|
+
<DialogTitle>Título del dialog</DialogTitle>
|
|
270
|
+
<DialogDescription>Descripción del dialog.</DialogDescription>
|
|
271
|
+
</DialogHeader>
|
|
272
|
+
<div className="py-4">
|
|
273
|
+
<p className="text-sm text-base-content/70">Contenido del dialog.</p>
|
|
274
|
+
</div>
|
|
275
|
+
<DialogFooter>
|
|
276
|
+
<Button variant="ghost">Cancelar</Button>
|
|
277
|
+
<Button>Confirmar</Button>
|
|
278
|
+
</DialogFooter>
|
|
279
|
+
</DialogContent>
|
|
280
|
+
</Dialog>
|
|
281
|
+
</ComponentCard>
|
|
282
|
+
<ComponentCard title="Dialog controlado">
|
|
283
|
+
<Button variant="destructive" onClick={() => setOpen(true)}>Confirmar eliminación</Button>
|
|
284
|
+
<Dialog open={open} onOpenChange={setOpen}>
|
|
285
|
+
<DialogContent className="sm:max-w-md">
|
|
286
|
+
<DialogHeader>
|
|
287
|
+
<DialogTitle>¿Eliminar elemento?</DialogTitle>
|
|
288
|
+
<DialogDescription>Esta acción no se puede deshacer.</DialogDescription>
|
|
289
|
+
</DialogHeader>
|
|
290
|
+
<DialogFooter>
|
|
291
|
+
<Button variant="ghost" onClick={() => setOpen(false)}>Cancelar</Button>
|
|
292
|
+
<Button variant="destructive" onClick={() => setOpen(false)}>Eliminar</Button>
|
|
293
|
+
</DialogFooter>
|
|
294
|
+
</DialogContent>
|
|
295
|
+
</Dialog>
|
|
296
|
+
</ComponentCard>
|
|
297
|
+
</div>
|
|
298
|
+
</div>
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function ToastsShowcase() {
|
|
303
|
+
return (
|
|
304
|
+
<div className="space-y-6">
|
|
305
|
+
<SectionTitle>Toast (react-toastify)</SectionTitle>
|
|
306
|
+
<ComponentCard title="Variantes">
|
|
307
|
+
<div className="flex flex-wrap gap-2">
|
|
308
|
+
<Button variant="outline" size="sm" onClick={() => toast.success("Operación exitosa")}><CheckCircle2 className="size-4" /> Success</Button>
|
|
309
|
+
<Button variant="outline" size="sm" onClick={() => toast.error("Algo salió mal")}><XCircle className="size-4" /> Error</Button>
|
|
310
|
+
<Button variant="outline" size="sm" onClick={() => toast.warning("Atención requerida")}><AlertTriangle className="size-4" /> Warning</Button>
|
|
311
|
+
<Button variant="outline" size="sm" onClick={() => toast.info("Información importante")}><Info className="size-4" /> Info</Button>
|
|
312
|
+
</div>
|
|
313
|
+
</ComponentCard>
|
|
314
|
+
</div>
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
function AlertsShowcase() {
|
|
319
|
+
return (
|
|
320
|
+
<div className="space-y-6">
|
|
321
|
+
<SectionTitle>Alert (DaisyUI)</SectionTitle>
|
|
322
|
+
<div className="space-y-3">
|
|
323
|
+
<div role="alert" className="alert alert-info"><Info className="size-5" /><span>Información: se detectaron nuevas actualizaciones.</span></div>
|
|
324
|
+
<div role="alert" className="alert alert-success"><CheckCircle2 className="size-5" /><span>Cambios guardados correctamente.</span></div>
|
|
325
|
+
<div role="alert" className="alert alert-warning"><AlertTriangle className="size-5" /><span>Tu sesión expira en 5 minutos.</span></div>
|
|
326
|
+
<div role="alert" className="alert alert-error"><XCircle className="size-5" /><span>No se pudo conectar con el servidor.</span></div>
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export default function UIComponentsPage() {
|
|
333
|
+
return (
|
|
334
|
+
<div className="px-4 sm:px-6 lg:px-8 py-6 space-y-8">
|
|
335
|
+
<div>
|
|
336
|
+
<Breadcrumb>
|
|
337
|
+
<BreadcrumbList>
|
|
338
|
+
<BreadcrumbItem><BreadcrumbLink asChild><Link href="/dashboard">Páginas</Link></BreadcrumbLink></BreadcrumbItem>
|
|
339
|
+
<BreadcrumbSeparator />
|
|
340
|
+
<BreadcrumbItem><BreadcrumbPage>UI Components</BreadcrumbPage></BreadcrumbItem>
|
|
341
|
+
</BreadcrumbList>
|
|
342
|
+
</Breadcrumb>
|
|
343
|
+
<h1 className="text-2xl font-bold text-base-content mt-1">UI Components</h1>
|
|
344
|
+
<p className="text-sm text-base-content/50 mt-0.5">
|
|
345
|
+
Catálogo de componentes disponibles en el proyecto.
|
|
346
|
+
</p>
|
|
347
|
+
</div>
|
|
348
|
+
<ButtonsShowcase />
|
|
349
|
+
<BadgesShowcase />
|
|
350
|
+
<InputsShowcase />
|
|
351
|
+
<TabsShowcase />
|
|
352
|
+
<TableShowcase />
|
|
353
|
+
<DialogShowcase />
|
|
354
|
+
<ToastsShowcase />
|
|
355
|
+
<AlertsShowcase />
|
|
356
|
+
</div>
|
|
357
|
+
);
|
|
358
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { useSearchParams } from "next/navigation";
|
|
5
|
+
import { useActionState } from "react";
|
|
6
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
|
7
|
+
import { Button } from "@/components/ui/button";
|
|
8
|
+
import { Input } from "@/components/ui/input";
|
|
9
|
+
import { PasswordInput } from "@/components/ui/password-input";
|
|
10
|
+
import { Label } from "@/components/ui/label";
|
|
11
|
+
import { Separator } from "@/components/ui/separator";
|
|
12
|
+
import { LogIn, Mail, Lock } from "lucide-react";
|
|
13
|
+
import { signInAction, type AuthState } from "@/actions/auth";
|
|
14
|
+
|
|
15
|
+
export default function IniciarSesionPage() {
|
|
16
|
+
const searchParams = useSearchParams();
|
|
17
|
+
const callbackUrl = searchParams.get("callbackUrl") || "/dashboard";
|
|
18
|
+
const registered = searchParams.get("registered");
|
|
19
|
+
|
|
20
|
+
const [state, formAction, isPending] = useActionState<AuthState, FormData>(
|
|
21
|
+
signInAction,
|
|
22
|
+
{},
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div className="min-h-screen flex items-center justify-center bg-base-100 px-4 py-12">
|
|
27
|
+
<div className="w-full max-w-md">
|
|
28
|
+
<div className="text-center mb-8">
|
|
29
|
+
<h1 className="text-3xl font-bold text-base-content mb-2">
|
|
30
|
+
Iniciar Sesión
|
|
31
|
+
</h1>
|
|
32
|
+
<p className="text-base-content/70">
|
|
33
|
+
Ingresá tus credenciales para acceder a tu cuenta
|
|
34
|
+
</p>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
{registered && (
|
|
38
|
+
<div className="mb-4 rounded-lg bg-success/10 p-3 text-center text-sm text-success">
|
|
39
|
+
Cuenta creada exitosamente. Iniciá sesión con tus credenciales.
|
|
40
|
+
</div>
|
|
41
|
+
)}
|
|
42
|
+
|
|
43
|
+
<Card>
|
|
44
|
+
<CardHeader>
|
|
45
|
+
<CardTitle className="flex items-center gap-2">
|
|
46
|
+
<LogIn className="h-5 w-5" />
|
|
47
|
+
Acceso
|
|
48
|
+
</CardTitle>
|
|
49
|
+
<CardDescription>
|
|
50
|
+
Completá los siguientes campos para iniciar sesión
|
|
51
|
+
</CardDescription>
|
|
52
|
+
</CardHeader>
|
|
53
|
+
<CardContent>
|
|
54
|
+
<form action={formAction} className="space-y-6">
|
|
55
|
+
<input type="hidden" name="callbackUrl" value={callbackUrl} />
|
|
56
|
+
|
|
57
|
+
{state.error && (
|
|
58
|
+
<div className="rounded-lg bg-error/10 p-3 text-sm text-error">
|
|
59
|
+
{state.error}
|
|
60
|
+
</div>
|
|
61
|
+
)}
|
|
62
|
+
|
|
63
|
+
<div className="grid gap-2">
|
|
64
|
+
<Label htmlFor="email" className="flex items-center gap-2">
|
|
65
|
+
<Mail className="h-4 w-4" />
|
|
66
|
+
Email
|
|
67
|
+
</Label>
|
|
68
|
+
<Input
|
|
69
|
+
id="email"
|
|
70
|
+
name="email"
|
|
71
|
+
type="email"
|
|
72
|
+
placeholder="tu@email.com"
|
|
73
|
+
autoComplete="email"
|
|
74
|
+
required
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div className="grid gap-2">
|
|
79
|
+
<Label htmlFor="password" className="flex items-center gap-2">
|
|
80
|
+
<Lock className="h-4 w-4" />
|
|
81
|
+
Contraseña
|
|
82
|
+
</Label>
|
|
83
|
+
<PasswordInput
|
|
84
|
+
id="password"
|
|
85
|
+
name="password"
|
|
86
|
+
placeholder="••••••••"
|
|
87
|
+
autoComplete="current-password"
|
|
88
|
+
required
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div className="flex items-center justify-between text-sm">
|
|
93
|
+
<label className="flex items-center gap-2 cursor-pointer">
|
|
94
|
+
<input type="checkbox" className="rounded border-border" />
|
|
95
|
+
<span className="text-base-content/70">Recordarme</span>
|
|
96
|
+
</label>
|
|
97
|
+
<Link
|
|
98
|
+
href="/auth/recuperar-password"
|
|
99
|
+
className="text-primary hover:underline"
|
|
100
|
+
>
|
|
101
|
+
¿Olvidaste tu contraseña?
|
|
102
|
+
</Link>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<Button
|
|
106
|
+
type="submit"
|
|
107
|
+
className="w-full"
|
|
108
|
+
size="lg"
|
|
109
|
+
disabled={isPending}
|
|
110
|
+
>
|
|
111
|
+
{isPending ? (
|
|
112
|
+
<span className="loading loading-spinner loading-sm" />
|
|
113
|
+
) : (
|
|
114
|
+
"Iniciar Sesión"
|
|
115
|
+
)}
|
|
116
|
+
</Button>
|
|
117
|
+
</form>
|
|
118
|
+
|
|
119
|
+
<div className="mt-6">
|
|
120
|
+
<Separator />
|
|
121
|
+
<div className="mt-6 text-center text-sm">
|
|
122
|
+
<span className="text-base-content/70">
|
|
123
|
+
¿No tenés una cuenta?{" "}
|
|
124
|
+
</span>
|
|
125
|
+
<Link
|
|
126
|
+
href="/auth/registro"
|
|
127
|
+
className="text-primary font-medium hover:underline"
|
|
128
|
+
>
|
|
129
|
+
Registrate aquí
|
|
130
|
+
</Link>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div className="mt-4 rounded-lg bg-base-200 p-3 text-center text-sm text-base-content/70">
|
|
135
|
+
<p className="font-medium mb-1">Credenciales de prueba</p>
|
|
136
|
+
<p>
|
|
137
|
+
Email:{" "}
|
|
138
|
+
<code className="font-mono text-primary">admin@huenei.com</code>{" "}
|
|
139
|
+
— Password:{" "}
|
|
140
|
+
<code className="font-mono text-primary">123456</code>
|
|
141
|
+
</p>
|
|
142
|
+
</div>
|
|
143
|
+
</CardContent>
|
|
144
|
+
</Card>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
);
|
|
148
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
|
6
|
+
import { Button } from "@/components/ui/button";
|
|
7
|
+
import { Input } from "@/components/ui/input";
|
|
8
|
+
import { Label } from "@/components/ui/label";
|
|
9
|
+
import { Separator } from "@/components/ui/separator";
|
|
10
|
+
import { KeyRound, Mail } from "lucide-react";
|
|
11
|
+
|
|
12
|
+
export default function RecuperarPasswordPage() {
|
|
13
|
+
const [submitted, setSubmitted] = useState(false);
|
|
14
|
+
|
|
15
|
+
function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
setSubmitted(true);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div className="min-h-screen flex items-center justify-center bg-base-100 px-4 py-12">
|
|
22
|
+
<div className="w-full max-w-md">
|
|
23
|
+
<div className="text-center mb-8">
|
|
24
|
+
<h1 className="text-3xl font-bold text-base-content mb-2">
|
|
25
|
+
Recuperar Contraseña
|
|
26
|
+
</h1>
|
|
27
|
+
<p className="text-base-content/70">
|
|
28
|
+
Ingresá tu email y te enviaremos un enlace para restablecer tu
|
|
29
|
+
contraseña
|
|
30
|
+
</p>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<Card>
|
|
34
|
+
<CardHeader>
|
|
35
|
+
<CardTitle className="flex items-center gap-2">
|
|
36
|
+
<KeyRound className="h-5 w-5" />
|
|
37
|
+
Restablecer
|
|
38
|
+
</CardTitle>
|
|
39
|
+
<CardDescription>
|
|
40
|
+
Te enviaremos instrucciones a tu correo electrónico
|
|
41
|
+
</CardDescription>
|
|
42
|
+
</CardHeader>
|
|
43
|
+
<CardContent>
|
|
44
|
+
{submitted ? (
|
|
45
|
+
<div className="text-center py-4">
|
|
46
|
+
<div className="rounded-lg bg-success/10 p-4 text-sm text-success mb-4">
|
|
47
|
+
Si el email existe en nuestro sistema, recibirás un enlace
|
|
48
|
+
para restablecer tu contraseña.
|
|
49
|
+
</div>
|
|
50
|
+
<Button variant="outline" asChild>
|
|
51
|
+
<Link href="/auth/iniciar-sesion">Volver al login</Link>
|
|
52
|
+
</Button>
|
|
53
|
+
</div>
|
|
54
|
+
) : (
|
|
55
|
+
<>
|
|
56
|
+
<form onSubmit={handleSubmit} className="space-y-6">
|
|
57
|
+
<div className="grid gap-2">
|
|
58
|
+
<Label
|
|
59
|
+
htmlFor="email"
|
|
60
|
+
className="flex items-center gap-2"
|
|
61
|
+
>
|
|
62
|
+
<Mail className="h-4 w-4" />
|
|
63
|
+
Email
|
|
64
|
+
</Label>
|
|
65
|
+
<Input
|
|
66
|
+
id="email"
|
|
67
|
+
name="email"
|
|
68
|
+
type="email"
|
|
69
|
+
placeholder="tu@email.com"
|
|
70
|
+
required
|
|
71
|
+
/>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<Button type="submit" className="w-full" size="lg">
|
|
75
|
+
Enviar enlace de recuperación
|
|
76
|
+
</Button>
|
|
77
|
+
</form>
|
|
78
|
+
|
|
79
|
+
<div className="mt-6">
|
|
80
|
+
<Separator />
|
|
81
|
+
<div className="mt-6 text-center text-sm">
|
|
82
|
+
<span className="text-base-content/70">
|
|
83
|
+
¿Recordaste tu contraseña?{" "}
|
|
84
|
+
</span>
|
|
85
|
+
<Link
|
|
86
|
+
href="/auth/iniciar-sesion"
|
|
87
|
+
className="text-primary font-medium hover:underline"
|
|
88
|
+
>
|
|
89
|
+
Iniciá sesión aquí
|
|
90
|
+
</Link>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</>
|
|
94
|
+
)}
|
|
95
|
+
</CardContent>
|
|
96
|
+
</Card>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
);
|
|
100
|
+
}
|