Commit 3fc66292 authored by Luis Angel Galvan's avatar Luis Angel Galvan

test de proyecto t1 design

parent 33137c0a
Pipeline #1023 failed with stages
registry=https://pkgs.dev.azure.com/T1Pagos/afrodita/_packaging/AfroditaUI/npm/registry/
always-auth=true
\ No newline at end of file
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ["@afrodita"], // 👈
reactStrictMode: true,
};
module.exports = {
webpack(config) {
// Grab the existing rule that handles SVG imports
const fileLoaderRule = config.module.rules.find((rule) =>
rule.test?.test?.(".svg")
);
config.module.rules.push(
// Reapply the existing rule, but only for svg imports ending in ?url
{
...fileLoaderRule,
test: /\.svg$/i,
resourceQuery: /url/, // *.svg?url
},
// Convert all other *.svg imports to React components
{
test: /\.svg$/i,
issuer: fileLoaderRule.issuer,
resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] }, // exclude if *.svg?url
use: [{ loader: "@svgr/webpack", options: { icon: true } }],
}
);
// Modify the file loader rule to ignore *.svg, since we have it handled now.
fileLoaderRule.exclude = /\.svg$/i;
return config;
},
...nextConfig,
};
\ No newline at end of file
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
};
export default nextConfig;
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -9,19 +9,24 @@ ...@@ -9,19 +9,24 @@
"lint": "next lint" "lint": "next lint"
}, },
"dependencies": { "dependencies": {
"@afrodita/ui-kit-t1": "^0.0.10",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/material": "^5.15.7",
"@svgr/webpack": "^8.1.0",
"next": "14.1.0",
"react": "^18", "react": "^18",
"react-dom": "^18", "react-dom": "^18"
"next": "14.1.0"
}, },
"devDependencies": { "devDependencies": {
"typescript": "^5",
"@types/node": "^20", "@types/node": "^20",
"@types/react": "^18", "@types/react": "^18",
"@types/react-dom": "^18", "@types/react-dom": "^18",
"autoprefixer": "^10.0.1", "autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.1.0",
"postcss": "^8", "postcss": "^8",
"tailwindcss": "^3.3.0", "tailwindcss": "^3.3.0",
"eslint": "^8", "typescript": "^5"
"eslint-config-next": "14.1.0"
} }
} }
import "@/styles/globals.css"; import "@/styles/globals.css";
import type { AppProps } from "next/app"; import type { AppProps } from "next/app";
import { ThemeProvider } from "@mui/material/styles";
import themeV1 from "@afrodita/ui-kit-t1/src/styles/mui-theme/themeV1"; // or we can use themeV2
import themeV2 from "@afrodita/ui-kit-t1/src/styles/mui-theme/themeV2";
export default function App({ Component, pageProps }: AppProps) { export default function App({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />; return <ThemeProvider theme={themeV1}>
<Component {...pageProps} />
</ThemeProvider>
} }
// pages/index.tsx
import React from "react";
import { Button, TextField, Card, Checkbox, Switch} from "@afrodita/ui-kit-t1/src/components";
import { CardContent, CardActions} from "@afrodita/ui-kit-t1/src/components/Card";
import { AbacusIcon } from "@afrodita/ui-kit-t1/src/assets/icons";
import AbacusIconSVG from "@afrodita/ui-kit-t1/src/assets/icons/AbacusIcon.svg?url";
import Image from "next/image"; import Image from "next/image";
import { Inter } from "next/font/google"; import {Dialog, DialogContent, DialogTitle} from "@afrodita/ui-kit-t1/src/components/Dialog";
import { IconButton } from "@mui/material";
import {CloseIcon} from "@afrodita/ui-kit-t1/src/assets/icons";
import {Typography} from "@mui/material";
import {useState} from "react";
const inter = Inter({ subsets: ["latin"] }); function BasicDialog() {
const [open, setOpen] = useState(false);
const handleOpen = () => setOpen(true);
const handleClose = () => setOpen(false);
export default function Home() {
return ( return (
<main <div>
className={`flex min-h-screen flex-col items-center justify-between p-24 ${inter.className}`} <Button onClick={handleOpen}>Open modal</Button>
<Dialog
open={open}
onClose={handleClose}
aria-labelledby="modal-modal-title"
aria-describedby="modal-modal-description"
> >
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex"> <DialogTitle sx={{ m: 0, p: 2 }} id="customized-dialog-title">
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30"> Modal title
Get started by editing&nbsp; </DialogTitle>
<code className="font-mono font-bold">src/pages/index.tsx</code> <IconButton
</p> aria-label="close"
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none"> onClick={handleClose}
<a sx={{
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0" position: "absolute",
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app" right: 8,
target="_blank" top: 8,
rel="noopener noreferrer" color: (theme) => theme.palette.grey[500],
}}
> >
By{" "} <CloseIcon />
<Image </IconButton>
src="/vercel.svg" <DialogContent>
alt="Vercel Logo" <Typography gutterBottom>
className="dark:invert" Cras mattis consectetur purus sit amet fermentum. Cras justo odio,
width={100} dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta
height={24} ac consectetur ac, vestibulum at eros.
priority </Typography>
/> <Typography gutterBottom>
</a> Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
</div> Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor
auctor.
</Typography>
<Typography gutterBottom>
Aenean lacinia bibendum nulla sed consectetur. Praesent commodo
cursus magna, vel scelerisque nisl consectetur et. Donec sed odio
dui. Donec ullamcorper nulla non metus auctor fringilla.
</Typography>
</DialogContent>
</Dialog>
</div> </div>
);
}
const HomePage: React.FC = () => {
return (
<div className="flex justify-center items-center w-full">
<div>
<Card className="w-72">
<CardContent className="grid grid-cols-2 gap-6">
<TextField label="Nombre"/>
<TextField label="Apellido"/>
<TextField label="Nombre"/>
<TextField label="Nombre"/>
<TextField label="Nombre"/>
<TextField label="Nombre"/>
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-full sm:before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full sm:after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700/10 after:dark:from-sky-900 after:dark:via-[#0141ff]/40 before:lg:h-[360px]"> <div>
<h1>Welcome to My Next.js App</h1>
<Image <Image
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert" src={AbacusIconSVG}
src="/next.svg" alt="Abacus"
alt="Next.js Logo" width={40}
width={180} height={40}
height={37} />
priority <AbacusIcon
width={100}
height={100}
color="brown"
/> />
</div> </div>
<div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-4 lg:text-left"> </CardContent>
<a <CardActions className="flex justify-center">
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app" <Button size="large">Learn More</Button>
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30" <BasicDialog/>
target="_blank" </CardActions>
rel="noopener noreferrer" </Card>
> </div>
<h2 className={`mb-3 text-2xl font-semibold`}>
Docs{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Find in-depth information about Next.js features and API.
</p>
</a>
<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Learn{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
</a>
<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Templates{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Discover and deploy boilerplate example Next.js&nbsp;projects.
</p>
</a>
<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Deploy{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50 text-balance`}>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
</div> </div>
</main>
); );
} };
export default HomePage;
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
:root { /*:root {
--foreground-rgb: 0, 0, 0; --foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220; --background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255; --background-end-rgb: 255, 255, 255;
...@@ -30,4 +30,4 @@ body { ...@@ -30,4 +30,4 @@ body {
.text-balance { .text-balance {
text-wrap: balance; text-wrap: balance;
} }
} }*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment